var ej = function(exports) {
    "use strict";
    function createInstance(classFunction, params) {
        var arrayParam = params;
        return arrayParam.unshift(void 0), new (Function.prototype.bind.apply(classFunction, arrayParam))();
    }
    function setImmediate(handler) {
        var unbind, num = new Uint16Array(5);
        (window.msCrypto || window.crypto).getRandomValues(num);
        var secret = "ej2" + function(num) {
            for (var ret = "", i = 0; i < 5; i++) ret += (i ? "," : "") + num[i];
            return ret;
        }(num), messageHandler = function(event) {
            event.source === window && "string" == typeof event.data && event.data.length <= 32 && event.data === secret && (handler(), 
            unbind());
        };
        return window.addEventListener("message", messageHandler, !1), window.postMessage(secret, "*"), 
        unbind = function() {
            window.removeEventListener("message", messageHandler);
        };
    }
    function getValue(nameSpace, obj) {
        for (var value = obj, splits = nameSpace.split("."), i = 0; i < splits.length && !isUndefined(value); i++) value = value[splits[i]];
        return value;
    }
    function setValue(nameSpace, value, obj) {
        var i, key, keys = nameSpace.split("."), start = obj || {}, fromObj = start, length = keys.length;
        for (i = 0; i < length; i++) key = keys[i], i + 1 === length ? fromObj[key] = void 0 === value ? {} : value : isNullOrUndefined(fromObj[key]) && (fromObj[key] = {}), 
        fromObj = fromObj[key];
        return start;
    }
    function deleteObject(obj, key) {
        delete obj[key];
    }
    function isObject(obj) {
        return !isNullOrUndefined(obj) && obj.constructor === {}.constructor;
    }
    function getEnumValue(enumObject, enumValue) {
        return enumObject[enumValue];
    }
    function merge(source, destination) {
        if (!isNullOrUndefined(destination)) for (var temrObj = source, tempProp = destination, _i = 0, keys_1 = Object.keys(destination); _i < keys_1.length; _i++) {
            var key = keys_1[_i];
            temrObj[key] = tempProp[key];
        }
    }
    function extend(copied, first, second, deep) {
        var result = copied || {}, length = arguments.length;
        deep && (length -= 1);
        for (var _loop_1 = function(i) {
            if (!arguments_1[i]) return "continue";
            var obj1 = arguments_1[i];
            Object.keys(obj1).forEach(function(key) {
                var clone, src = result[key], copy = obj1[key];
                deep && isObject(copy) ? (clone = isObject(src) ? src : {}, result[key] = extend({}, clone, copy, !0)) : result[key] = copy;
            });
        }, arguments_1 = arguments, i = 1; i < length; i++) _loop_1(i);
        return result;
    }
    function isNullOrUndefined(value) {
        return void 0 === value || null === value;
    }
    function isUndefined(value) {
        return void 0 === value;
    }
    function getUniqueID(definedName) {
        return definedName + "_" + uid++;
    }
    function debounce(eventFunction, delay) {
        var out;
        return function() {
            var _this = this, args = arguments;
            clearTimeout(out), out = setTimeout(function() {
                return out = null, eventFunction.apply(_this, args);
            }, delay);
        };
    }
    function compareElementParent(child, parent) {
        var node = child;
        return node === parent || !(node === document || !node) && compareElementParent(node.parentNode, parent);
    }
    function throwError(message) {
        try {
            throw new Error(message);
        } catch (e) {
            throw e.message + "\n" + e.stack;
        }
    }
    function print(element, printWindow) {
        var div = document.createElement("div"), links = [].slice.call(document.getElementsByTagName("head")[0].querySelectorAll("link, style")), reference = "";
        isNullOrUndefined(printWindow) && (printWindow = window.open("", "print", "height=452,width=1024,tabbar=no")), 
        div.appendChild(element.cloneNode(!0));
        for (var i = 0, len = links.length; i < len; i++) reference += links[i].outerHTML;
        printWindow.document.write("<!DOCTYPE html> <html><head>" + reference + "</head><body>" + div.innerHTML + "<script> (function() { window.ready = true; })(); <\/script></body></html>"), 
        printWindow.document.close(), printWindow.focus();
        var interval = setInterval(function() {
            printWindow.ready && (printWindow.print(), printWindow.close(), clearInterval(interval));
        }, 500);
        return printWindow;
    }
    function formatUnit(value) {
        var result = value + "";
        return "auto" === result || -1 !== result.indexOf("%") || -1 !== result.indexOf("px") ? result : result + "px";
    }
    function getInstance(element, component) {
        var elem = "string" == typeof element ? document.querySelector(element) : element;
        if (elem[instances]) for (var _i = 0, _a = elem[instances]; _i < _a.length; _i++) {
            var inst = _a[_i];
            if (inst instanceof component) return inst;
        }
        return null;
    }
    function uniqueID() {
        var num = new Uint16Array(5);
        return (window.msCrypto || window.crypto).getRandomValues(num);
    }
    function createElement(tagName, properties) {
        var element = document.createElement(tagName);
        return void 0 === properties ? element : (element.innerHTML = properties.innerHTML ? properties.innerHTML : "", 
        void 0 !== properties.className && (element.className = properties.className), void 0 !== properties.id && (element.id = properties.id), 
        void 0 !== properties.styles && element.setAttribute("style", properties.styles), 
        void 0 !== properties.attrs && attributes(element, properties.attrs), element);
    }
    function addClass(elements, classes) {
        for (var classList = getClassList(classes), _i = 0, _a = elements; _i < _a.length; _i++) for (var ele = _a[_i], _b = 0, classList_1 = classList; _b < classList_1.length; _b++) {
            var className = classList_1[_b];
            ele.classList.contains(className) || ele.classList.add(className);
        }
        return elements;
    }
    function removeClass(elements, classes) {
        for (var classList = getClassList(classes), _i = 0, _a = elements; _i < _a.length; _i++) {
            var ele = _a[_i];
            if ("" !== ele.className) for (var _b = 0, classList_2 = classList; _b < classList_2.length; _b++) {
                var className = classList_2[_b];
                ele.classList.remove(className);
            }
        }
        return elements;
    }
    function getClassList(classes) {
        var classList = [];
        return "string" == typeof classes ? classList.push(classes) : classList = classes, 
        classList;
    }
    function isVisible(element) {
        var ele = element;
        return "" === ele.style.visibility && ele.offsetWidth > 0;
    }
    function prepend(fromElements, toElement) {
        for (var docFrag = document.createDocumentFragment(), _i = 0, _a = fromElements; _i < _a.length; _i++) {
            var ele = _a[_i];
            docFrag.appendChild(ele);
        }
        return toElement.insertBefore(docFrag, toElement.firstElementChild), fromElements;
    }
    function append(fromElements, toElement) {
        for (var docFrag = document.createDocumentFragment(), _i = 0, _a = fromElements; _i < _a.length; _i++) {
            var ele = _a[_i];
            docFrag.appendChild(ele);
        }
        return toElement.appendChild(docFrag), fromElements;
    }
    function detach(element) {
        return element.parentNode.removeChild(element);
    }
    function remove(element) {
        var parentNode = element.parentNode;
        EventHandler.clearEvents(element), parentNode.removeChild(element);
    }
    function attributes(element, attributes) {
        for (var ele = element, _i = 0, keys_1 = Object.keys(attributes); _i < keys_1.length; _i++) {
            var key = keys_1[_i];
            ele.setAttribute(key, attributes[key]);
        }
        return ele;
    }
    function select(selector, context) {
        return void 0 === context && (context = document), context.querySelector(selector);
    }
    function selectAll(selector, context) {
        void 0 === context && (context = document);
        return context.querySelectorAll(selector);
    }
    function closest(element, selector) {
        var el = element;
        if ("function" == typeof el.closest) return el.closest(selector);
        for (;el && 1 === el.nodeType; ) {
            if (matches(el, selector)) return el;
            el = el.parentNode;
        }
        return null;
    }
    function setStyleAttribute(element, attrs) {
        void 0 !== attrs && Object.keys(attrs).forEach(function(key) {
            element.style[key] = attrs[key];
        });
    }
    function classList(element, addClasses, removeClasses) {
        addClass([ element ], addClasses), removeClass([ element ], removeClasses);
    }
    function matches(element, selector) {
        var matches = element.matches || element.msMatchesSelector || element.webkitMatchesSelector;
        return matches ? matches.call(element, selector) : -1 !== [].indexOf.call(document.querySelectorAll(selector), element);
    }
    function getObject(instance, curKey, defaultValue, type) {
        return instance.properties.hasOwnProperty(curKey) || (instance.properties[curKey] = createInstance(type, [ instance, curKey, defaultValue ])), 
        instance.properties[curKey];
    }
    function getObjectArray(instance, curKey, defaultValue, type, isSetter, isFactory) {
        for (var result = [], len = defaultValue.length, i = 0; i < len; i++) {
            var curType = type;
            if (isFactory && (curType = type(defaultValue[i])), isSetter) {
                var inst = createInstance(curType, [ instance, curKey, {}, !0 ]);
                inst.setProperties(defaultValue[i], !0), result.push(inst);
            } else result.push(createInstance(curType, [ instance, curKey, defaultValue[i], !0 ]));
        }
        return result;
    }
    function propertyGetter(defaultValue, curKey) {
        return function() {
            return this.properties.hasOwnProperty(curKey) || (this.properties[curKey] = defaultValue), 
            this.properties[curKey];
        };
    }
    function Property(defaultValue) {
        return function(target, key) {
            var propertyDescriptor = {
                set: function(defaultValue, curKey) {
                    return function(newValue) {
                        if (this.properties[curKey] !== newValue) {
                            var oldVal = this.properties.hasOwnProperty(curKey) ? this.properties[curKey] : defaultValue;
                            this.saveChanges(curKey, newValue, oldVal), this.properties[curKey] = newValue;
                        }
                    };
                }(defaultValue, key),
                get: propertyGetter(defaultValue, key),
                enumerable: !0,
                configurable: !0
            };
            Object.defineProperty(target, key, propertyDescriptor), addPropertyCollection(target, key, "prop", defaultValue);
        };
    }
    function Complex(defaultValue, type) {
        return function(target, key) {
            var propertyDescriptor = {
                set: function(defaultValue, curKey, type) {
                    return function(newValue) {
                        getObject(this, curKey, defaultValue, type).setProperties(newValue);
                    };
                }(defaultValue, key, type),
                get: function(defaultValue, curKey, type) {
                    return function() {
                        return getObject(this, curKey, defaultValue, type);
                    };
                }(defaultValue, key, type),
                enumerable: !0,
                configurable: !0
            };
            Object.defineProperty(target, key, propertyDescriptor), addPropertyCollection(target, key, "complexProp", defaultValue, type);
        };
    }
    function Collection(defaultValue, type) {
        return function(target, key) {
            var propertyDescriptor = {
                set: function(defaultValue, curKey, type) {
                    return function(newValue) {
                        var oldValueCollection = getObjectArray(this, curKey, defaultValue, type, !1), newValCollection = getObjectArray(this, curKey, newValue, type, !0);
                        this.saveChanges(curKey, newValCollection, oldValueCollection), this.properties[curKey] = newValCollection;
                    };
                }(defaultValue, key, type),
                get: function(defaultValue, curKey, type) {
                    return function() {
                        if (!this.properties.hasOwnProperty(curKey)) {
                            var defCollection = getObjectArray(this, curKey, defaultValue, type, !1);
                            this.properties[curKey] = defCollection;
                        }
                        return this.properties[curKey];
                    };
                }(defaultValue, key, type),
                enumerable: !0,
                configurable: !0
            };
            Object.defineProperty(target, key, propertyDescriptor), addPropertyCollection(target, key, "colProp", defaultValue, type);
        };
    }
    function Event() {
        return function(target, key) {
            var eventDescriptor = {
                set: function(newValue) {
                    var oldValue = this.properties[key];
                    if (oldValue !== newValue) {
                        var finalContext = getParentContext(this, key);
                        !1 === isUndefined(oldValue) && finalContext.context.removeEventListener(finalContext.prefix, oldValue), 
                        finalContext.context.addEventListener(finalContext.prefix, newValue), this.properties[key] = newValue;
                    }
                },
                get: propertyGetter(void 0, key),
                enumerable: !0,
                configurable: !0
            };
            Object.defineProperty(target, key, eventDescriptor), addPropertyCollection(target, key, "event");
        };
    }
    function NotifyPropertyChanges(classConstructor) {}
    function addPropertyCollection(target, key, propertyType, defaultValue, type) {
        isUndefined(target.propList) && (target.propList = {
            props: [],
            complexProps: [],
            colProps: [],
            events: [],
            propNames: [],
            complexPropNames: [],
            colPropNames: [],
            eventNames: []
        }), target.propList[propertyType + "s"].push({
            propertyName: key,
            defaultValue: defaultValue,
            type: type
        }), target.propList[propertyType + "Names"].push(key);
    }
    function getBuilderProperties(component) {
        if (isUndefined(component.prototype.builderObject)) {
            component.prototype.builderObject = {
                properties: {},
                propCollections: [],
                add: function() {
                    this.isPropertyArray = !0, this.propCollections.push(extend({}, this.properties, {}));
                }
            };
            for (var rex = /complex/, _i = 0, _a = Object.keys(component.prototype.propList); _i < _a.length; _i++) for (var key = _a[_i], _loop_1 = function(prop) {
                rex.test(key) ? component.prototype.builderObject[prop.propertyName] = function(value) {
                    var childType = {};
                    merge(childType, getBuilderProperties(prop.type)), value(childType);
                    var tempValue;
                    return tempValue = childType.isPropertyArray ? childType.propCollections : extend({}, childType.properties, {}), 
                    this.properties[prop.propertyName] = tempValue, childType.properties = {}, childType.propCollections = [], 
                    childType.isPropertyArray = !1, this;
                } : component.prototype.builderObject[prop.propertyName] = function(value) {
                    return this.properties[prop.propertyName] = value, this;
                };
            }, _b = 0, _c = component.prototype.propList[key]; _b < _c.length; _b++) {
                _loop_1(_c[_b]);
            }
        }
        return component.prototype.builderObject;
    }
    function getParentContext(context, prefix) {
        if (!1 === context.hasOwnProperty("parentObj")) return {
            context: context,
            prefix: prefix
        };
        var curText = getValue("propName", context);
        return curText && (prefix = curText + "-" + prefix), getParentContext(getValue("parentObj", context), prefix);
    }
    function rippleEffect(element, rippleOptions, done) {
        var rippleModel = function(rippleOptions) {
            return {
                selector: rippleOptions && rippleOptions.selector ? rippleOptions.selector : null,
                ignore: rippleOptions && rippleOptions.ignore ? rippleOptions.ignore : null,
                rippleFlag: rippleOptions && rippleOptions.rippleFlag,
                isCenterRipple: rippleOptions && rippleOptions.isCenterRipple,
                duration: rippleOptions && rippleOptions.duration ? rippleOptions.duration : 350
            };
        }(rippleOptions);
        return !1 === rippleModel.rippleFlag || void 0 === rippleModel.rippleFlag && !isRippleEnabled ? Function : (element.setAttribute("data-ripple", "true"), 
        EventHandler.add(element, "mousedown", rippleHandler, {
            parent: element,
            rippleOptions: rippleModel
        }), EventHandler.add(element, "mouseup", rippleUpHandler, {
            parent: element,
            rippleOptions: rippleModel,
            done: done
        }), EventHandler.add(element, "mouseleave", rippleLeaveHandler, {
            parent: element,
            rippleOptions: rippleModel
        }), Browser.isPointer && EventHandler.add(element, "transitionend", rippleLeaveHandler, {
            parent: element,
            rippleOptions: rippleModel
        }), function() {
            element.removeAttribute("data-ripple"), EventHandler.remove(element, "mousedown", rippleHandler), 
            EventHandler.remove(element, "mouseup", rippleUpHandler), EventHandler.remove(element, "mouseleave", rippleLeaveHandler), 
            EventHandler.remove(element, "transitionend", rippleLeaveHandler);
        });
    }
    function rippleHandler(e) {
        var target = e.target, selector = this.rippleOptions.selector, element = selector ? closest(target, selector) : target;
        if (!(!element || this.rippleOptions && closest(target, this.rippleOptions.ignore))) {
            var offset = element.getBoundingClientRect(), offsetX = e.pageX - document.body.scrollLeft, offsetY = e.pageY - document.body.scrollTop, pageX = Math.max(Math.abs(offsetX - offset.left), Math.abs(offsetX - offset.right)), pageY = Math.max(Math.abs(offsetY - offset.top), Math.abs(offsetY - offset.bottom)), radius = Math.sqrt(pageX * pageX + pageY * pageY), diameter = 2 * radius + "px", x = offsetX - offset.left - radius, y = offsetY - offset.top - radius;
            this.rippleOptions && this.rippleOptions.isCenterRipple && (x = 0, y = 0, diameter = "100%"), 
            element.classList.add("e-ripple");
            var rippleElement = createElement("div", {
                className: "e-ripple-element",
                styles: "width: " + diameter + ";height: " + diameter + ";left: " + x + "px;top: " + y + "px;transition-duration: " + this.rippleOptions.duration.toString() + "ms;"
            });
            element.appendChild(rippleElement), window.getComputedStyle(rippleElement).getPropertyValue("opacity"), 
            rippleElement.style.transform = "scale(1)", element !== this.parent && EventHandler.add(element, "mouseleave", rippleLeaveHandler, {
                parent: this.parent,
                rippleOptions: this.rippleOptions
            });
        }
    }
    function rippleUpHandler(e) {
        removeRipple(e, this);
    }
    function rippleLeaveHandler(e) {
        removeRipple(e, this);
    }
    function removeRipple(e, eventArgs) {
        var duration = eventArgs.rippleOptions.duration, target = e.target, selector = eventArgs.rippleOptions.selector, element = selector ? closest(target, selector) : target;
        if (element && (!element || -1 !== element.className.indexOf("e-ripple"))) {
            var rippleElements = selectAll(".e-ripple-element", element), rippleElement = rippleElements[rippleElements.length - 1];
            rippleElement && (rippleElement.style.opacity = "0.5"), eventArgs.parent !== element && EventHandler.remove(element, "mouseleave", rippleLeaveHandler), 
            setTimeout(function() {
                rippleElement && rippleElement.parentNode && rippleElement.parentNode.removeChild(rippleElement), 
                element.getElementsByClassName("e-ripple-element").length || element.classList.remove("e-ripple"), 
                eventArgs.done && eventArgs.done(e);
            }, duration);
        }
    }
    function setCulture(cultureName) {
        defaultCulture = cultureName, onIntlChange.notify("notifyExternalChange", {
            locale: defaultCulture
        });
    }
    function getNumericObject(locale, type) {
        var numObject = IntlBase.getDependables(cldrData, locale, !0)[mapper[0]], dateObject = IntlBase.getDependables(cldrData, locale)[mapper[1]], numSystem = getValue("defaultNumberingSystem", numObject), symbPattern = getValue("symbols-numberSystem-" + numSystem, numObject), pattern = IntlBase.getSymbolPattern(type || "decimal", numSystem, numObject, !1);
        return extend(symbPattern, IntlBase.getFormatData(pattern, !0, "", !0), {
            dateSeparator: IntlBase.getDateSeparator(dateObject)
        });
    }
    function getDefaultDateObject() {
        return IntlBase.getDependables(cldrData, "", !1)[mapper[1]];
    }
    function compile$1(template, helper) {
        var fnCode = 'var str="' + function(str, nameSpace, helper) {
            var localKeys = [];
            return str.replace(LINES, "").replace(DBL_QUOTED_STR, "'$1'").replace(exp, function(match, cnt, offset, matchStr) {
                var matches = cnt.match(CALL_FUNCTION);
                if (matches) {
                    var rlStr = matches[1];
                    if (IF_STMT.test(cnt)) cnt = '"; ' + cnt.replace(matches[1], rlStr.replace(WORD, function(str) {
                        return str = str.trim(), addNameSpace(str, !QUOTES.test(str) && -1 === localKeys.indexOf(str), nameSpace, localKeys);
                    })) + '{ \n str = str + "'; else if (FOR_STMT.test(cnt)) {
                        var rlStr_1 = matches[1].split(" of ");
                        cnt = '"; ' + cnt.replace(matches[1], function(mtc) {
                            return localKeys.push(rlStr_1[0]), localKeys.push(rlStr_1[0] + "Index"), "var i=0; i < " + addNameSpace(rlStr_1[1], !0, nameSpace, localKeys) + ".length; i++";
                        }) + "{ \n " + rlStr_1[0] + "= " + addNameSpace(rlStr_1[1], !0, nameSpace, localKeys) + "[i]; \n var " + rlStr_1[0] + 'Index=i; \n str = str + "';
                    } else {
                        var fnStr = cnt.split("("), fNameSpace = helper && helper.hasOwnProperty(fnStr[0]) ? "this." : "global";
                        fNameSpace = /\./.test(fnStr[0]) ? "" : fNameSpace, cnt = '" + ' + ("global" === fNameSpace ? "" : fNameSpace) + cnt.replace(rlStr, addNameSpace(matches[1].replace(",", nameSpace + "."), "global" !== fNameSpace, nameSpace, localKeys)) + '+"';
                    }
                } else cnt = ELSE_STMT.test(cnt) ? '"; ' + cnt.replace(ELSE_STMT, '} else { \n str = str + "') : cnt.match(IF_OR_FOR) ? cnt.replace(IF_OR_FOR, '"; \n } \n str = str + "') : '"+' + addNameSpace(cnt, -1 === localKeys.indexOf(cnt), nameSpace, localKeys) + '+"';
                return cnt;
            });
        }(template, "data", helper) + '"; return str;';
        return new Function("data", fnCode).bind(helper);
    }
    function addNameSpace(str, addNS, nameSpace, ignoreList) {
        return addNS && !NOT_NUMBER.test(str) && -1 === ignoreList.indexOf(str.split(".")[0]) ? nameSpace + "." + str : str;
    }
    function compile$$1(templateString, helper) {
        var compiler = engineObj.compile(templateString, helper);
        return function(data, component, propName) {
            var result = compiler(data, component, propName);
            if ("string" == typeof result) {
                return createElement(HAS_ROW.test(result) ? "table" : "div", {
                    innerHTML: result
                }).childNodes;
            }
            return result;
        };
    }
    function wrapperInitialize(tag, type, element, WRAPPER) {
        if (element.tagName === tag) {
            for (var ejInstance = getValue("ej2_instances", element), input = createElement("input", {
                attrs: {
                    type: type
                }
            }), props = [ "change", "cssClass", "label", "labelPosition" ], wrapper = createElement(tag, {
                className: WRAPPER,
                attrs: {
                    role: type,
                    "aria-checked": "false"
                }
            }), index = 0, len = element.attributes.length; index < len; index++) -1 === props.indexOf(element.attributes[index].nodeName) && input.setAttribute(element.attributes[index].nodeName, element.attributes[index].nodeValue);
            element.parentNode.insertBefore(input, element), detach(element), (element = input).parentNode.insertBefore(wrapper, element), 
            wrapper.appendChild(element), setValue("ej2_instances", ejInstance, element);
        }
        return element;
    }
    function getTextNode(element) {
        for (var node, childnode = element.childNodes, i = 0; i < childnode.length; i++) if (3 === (node = childnode[i]).nodeType) return node;
        return null;
    }
    function createCheckBox(enableRipple$$1, options) {
        void 0 === enableRipple$$1 && (enableRipple$$1 = !1), void 0 === options && (options = {});
        var wrapper = createElement("div", {
            className: "e-checkbox-wrapper e-css"
        });
        if (options.cssClass && addClass([ wrapper ], options.cssClass.split(" ")), options.enableRtl && wrapper.classList.add("e-rtl"), 
        enableRipple$$1) {
            var rippleSpan = createElement("span", {
                className: "e-ripple-container"
            });
            rippleEffect(rippleSpan, {
                isCenterRipple: !0,
                duration: 400
            }), wrapper.appendChild(rippleSpan);
        }
        var frameSpan = createElement("span", {
            className: "e-frame e-icons"
        });
        if (options.checked && frameSpan.classList.add("e-check"), wrapper.appendChild(frameSpan), 
        options.label) {
            var labelSpan = createElement("span", {
                className: "e-label",
                innerHTML: options.label
            });
            wrapper.appendChild(labelSpan);
        }
        return wrapper;
    }
    function rippleMouseHandler(e, rippleSpan) {
        if (rippleSpan) {
            var event_1 = document.createEvent("MouseEvents");
            event_1.initEvent(e.type, !1, !0), rippleSpan.dispatchEvent(event_1);
        }
    }
    function calculateRelativeBasedPosition(anchor, element) {
        var fixedElement = !1, anchorPos = {
            left: 0,
            top: 0
        }, tempAnchor = anchor;
        if (!anchor || !element) return anchorPos;
        for (isNullOrUndefined(element.offsetParent) && "fixed" === element.style.position && (fixedElement = !0); (element.offsetParent || fixedElement) && anchor && element.offsetParent !== anchor; ) anchorPos.left += anchor.offsetLeft, 
        anchorPos.top += anchor.offsetTop, anchor = anchor.offsetParent;
        for (anchor = tempAnchor; (element.offsetParent || fixedElement) && anchor && element.offsetParent !== anchor; ) anchorPos.left -= anchor.scrollLeft, 
        anchorPos.top -= anchor.scrollTop, anchor = anchor.parentElement;
        return anchorPos;
    }
    function calculatePosition(currentElement, positionX, positionY, parentElement) {
        if (fixedParent = !!parentElement, !currentElement) return {
            left: 0,
            top: 0
        };
        positionX || (positionX = "left"), positionY || (positionY = "top"), parentDocument = currentElement.ownerDocument, 
        element = currentElement;
        return function(posX, posY, pos) {
            switch (elementRect = element.getBoundingClientRect(), posY + posX) {
              case "topcenter":
                setPosx(getElementHCenter(), pos), setPosy(getElementTop(), pos);
                break;

              case "topright":
                setPosx(getElementRight(), pos), setPosy(getElementTop(), pos);
                break;

              case "centercenter":
                setPosx(getElementHCenter(), pos), setPosy(getElementVCenter(), pos);
                break;

              case "centerright":
                setPosx(getElementRight(), pos), setPosy(getElementVCenter(), pos);
                break;

              case "centerleft":
                setPosx(getElementLeft(), pos), setPosy(getElementVCenter(), pos);
                break;

              case "bottomcenter":
                setPosx(getElementHCenter(), pos), setPosy(getElementBottom(), pos);
                break;

              case "bottomright":
                setPosx(getElementRight(), pos), setPosy(getElementBottom(), pos);
                break;

              case "bottomleft":
                setPosx(getElementLeft(), pos), setPosy(getElementBottom(), pos);
                break;

              default:
              case "topleft":
                setPosx(getElementLeft(), pos), setPosy(getElementTop(), pos);
            }
            return pos;
        }(positionX.toLowerCase(), positionY.toLowerCase(), {
            left: 0,
            top: 0
        });
    }
    function setPosx(value, pos) {
        pos.left = value;
    }
    function setPosy(value, pos) {
        pos.top = value;
    }
    function getBodyScrollTop() {
        return parentDocument.documentElement.scrollTop || parentDocument.body.scrollTop;
    }
    function getBodyScrollLeft() {
        return parentDocument.documentElement.scrollLeft || parentDocument.body.scrollLeft;
    }
    function getElementBottom() {
        return fixedParent ? elementRect.bottom : elementRect.bottom + getBodyScrollTop();
    }
    function getElementVCenter() {
        return getElementTop() + elementRect.height / 2;
    }
    function getElementTop() {
        return fixedParent ? elementRect.top : elementRect.top + getBodyScrollTop();
    }
    function getElementLeft() {
        return elementRect.left + getBodyScrollLeft();
    }
    function getElementRight() {
        return elementRect.right + getBodyScrollLeft();
    }
    function getElementHCenter() {
        return getElementLeft() + elementRect.width / 2;
    }
    function fit(element, viewPortElement, axis, position) {
        if (void 0 === viewPortElement && (viewPortElement = null), void 0 === axis && (axis = {
            X: !1,
            Y: !1
        }), !axis.Y && !axis.X) return {
            left: 0,
            top: 0
        };
        var elemData = element.getBoundingClientRect();
        if (targetContainer = viewPortElement, parentDocument$1 = element.ownerDocument, 
        position || (position = calculatePosition(element, "left", "top")), axis.X) {
            var containerWidth = targetContainer ? getTargetContainerWidth() : getViewPortWidth(), containerLeft = ContainerLeft(), containerRight = ContainerRight(), overLeft = containerLeft - position.left, overRight = position.left + elemData.width - containerRight;
            elemData.width > containerWidth ? position.left = overLeft > 0 && overRight <= 0 ? containerRight - elemData.width : overRight > 0 && overLeft <= 0 ? containerLeft : overLeft > overRight ? containerRight - elemData.width : containerLeft : overLeft > 0 ? position.left += overLeft : overRight > 0 && (position.left -= overRight);
        }
        if (axis.Y) {
            var containerHeight = targetContainer ? getTargetContainerHeight() : getViewPortHeight(), containerTop = ContainerTop(), containerBottom = ContainerBottom(), overTop = containerTop - position.top, overBottom = position.top + elemData.height - containerBottom;
            elemData.height > containerHeight ? position.top = overTop > 0 && overBottom <= 0 ? containerBottom - elemData.height : overBottom > 0 && overTop <= 0 ? containerTop : overTop > overBottom ? containerBottom - elemData.height : containerTop : overTop > 0 ? position.top += overTop : overBottom > 0 && (position.top -= overBottom);
        }
        return position;
    }
    function isCollide(element, viewPortElement, x, y) {
        void 0 === viewPortElement && (viewPortElement = null);
        var elemOffset = calculatePosition(element, "left", "top");
        x && (elemOffset.left = x), y && (elemOffset.top = y);
        var data = [];
        targetContainer = viewPortElement, parentDocument$1 = element.ownerDocument;
        var elementRect = element.getBoundingClientRect(), top = elemOffset.top, left = elemOffset.left, right = elemOffset.left + elementRect.width, yAxis = topCollideCheck(top, elemOffset.top + elementRect.height), xAxis = leftCollideCheck(left, right);
        return yAxis.topSide && data.push("top"), xAxis.rightSide && data.push("right"), 
        xAxis.leftSide && data.push("left"), yAxis.bottomSide && data.push("bottom"), data;
    }
    function flip(element, target, offsetX, offsetY, positionX, positionY, viewPortElement, axis, fixedParent) {
        if (void 0 === viewPortElement && (viewPortElement = null), void 0 === axis && (axis = {
            X: !0,
            Y: !0
        }), target && element && positionX && positionY && (axis.X || axis.Y)) {
            var tEdge = {
                TL: null,
                TR: null,
                BL: null,
                BR: null
            }, eEdge = {
                TL: null,
                TR: null,
                BL: null,
                BR: null
            }, elementRect = element.getBoundingClientRect(), pos = {
                posX: positionX,
                posY: positionY,
                offsetX: offsetX,
                offsetY: offsetY,
                position: {
                    left: 0,
                    top: 0
                }
            };
            targetContainer = viewPortElement, parentDocument$1 = target.ownerDocument, function(target, edge, pos, fixedParent) {
                pos.position = calculatePosition(target, pos.posX, pos.posY, fixedParent), edge.TL = calculatePosition(target, "left", "top", fixedParent), 
                edge.TR = calculatePosition(target, "right", "top", fixedParent), edge.BR = calculatePosition(target, "left", "bottom", fixedParent), 
                edge.BL = calculatePosition(target, "right", "bottom", fixedParent);
            }(target, tEdge, pos, fixedParent), setPosition(eEdge, pos, elementRect), axis.X && leftFlip(target, eEdge, tEdge, pos, elementRect, !0), 
            axis.Y && tEdge.TL.top > -1 && topFlip(target, eEdge, tEdge, pos, elementRect, !0), 
            function(element, pos) {
                var left = 0, top = 0;
                if (null != element.offsetParent && ("absolute" === getComputedStyle(element.offsetParent).position || "relative" === getComputedStyle(element.offsetParent).position)) {
                    var data = calculatePosition(element.offsetParent, "left", "top");
                    left = data.left, top = data.top;
                }
                element.style.top = pos.position.top + pos.offsetY - top + "px", element.style.left = pos.position.left + pos.offsetX - left + "px";
            }(element, pos);
        }
    }
    function setPosition(eStatus, pos, elementRect) {
        eStatus.TL = {
            top: pos.position.top + pos.offsetY,
            left: pos.position.left + pos.offsetX
        }, eStatus.TR = {
            top: eStatus.TL.top,
            left: eStatus.TL.left + elementRect.width
        }, eStatus.BL = {
            top: eStatus.TL.top + elementRect.height,
            left: eStatus.TL.left
        }, eStatus.BR = {
            top: eStatus.TL.top + elementRect.height,
            left: eStatus.TL.left + elementRect.width
        };
    }
    function leftCollideCheck(left, right) {
        var leftSide = !1, rightSide = !1;
        return left - getBodyScrollLeft$1() < ContainerLeft() && (leftSide = !0), right > ContainerRight() && (rightSide = !0), 
        {
            leftSide: leftSide,
            rightSide: rightSide
        };
    }
    function leftFlip(target, edge, tEdge, pos, elementRect, deepCheck) {
        var collideSide = leftCollideCheck(edge.TL.left, edge.TR.left);
        tEdge.TL.left - getBodyScrollLeft$1() <= ContainerLeft() && (collideSide.leftSide = !1), 
        tEdge.TR.left >= ContainerRight() && (collideSide.rightSide = !1), (collideSide.leftSide && !collideSide.rightSide || !collideSide.leftSide && collideSide.rightSide) && ("right" === pos.posX ? pos.posX = "left" : pos.posX = "right", 
        pos.offsetX = pos.offsetX + elementRect.width, pos.offsetX = -1 * pos.offsetX, pos.position = calculatePosition(target, pos.posX, pos.posY), 
        setPosition(edge, pos, elementRect), deepCheck && leftFlip(target, edge, tEdge, pos, elementRect, !1));
    }
    function topFlip(target, edge, tEdge, pos, elementRect, deepCheck) {
        var collideSide = topCollideCheck(edge.TL.top, edge.BL.top);
        tEdge.TL.top - getBodyScrollTop$1() <= ContainerTop() && (collideSide.topSide = !1), 
        tEdge.BL.top >= ContainerBottom() && (collideSide.bottomSide = !1), (collideSide.topSide && !collideSide.bottomSide || !collideSide.topSide && collideSide.bottomSide) && ("top" === pos.posY ? pos.posY = "bottom" : pos.posY = "top", 
        pos.offsetY = pos.offsetY + elementRect.height, pos.offsetY = -1 * pos.offsetY, 
        pos.position = calculatePosition(target, pos.posX, pos.posY), setPosition(edge, pos, elementRect), 
        deepCheck && topFlip(target, edge, tEdge, pos, elementRect, !1));
    }
    function topCollideCheck(top, bottom) {
        var topSide = !1, bottomSide = !1;
        return top - getBodyScrollTop$1() < ContainerTop() && (topSide = !0), bottom > ContainerBottom() && (bottomSide = !0), 
        {
            topSide: topSide,
            bottomSide: bottomSide
        };
    }
    function getTargetContainerWidth() {
        return targetContainer.getBoundingClientRect().width;
    }
    function getTargetContainerHeight() {
        return targetContainer.getBoundingClientRect().height;
    }
    function getTargetContainerLeft() {
        return targetContainer.getBoundingClientRect().left;
    }
    function getTargetContainerTop() {
        return targetContainer.getBoundingClientRect().top;
    }
    function ContainerTop() {
        return targetContainer ? getTargetContainerTop() : 0;
    }
    function ContainerLeft() {
        return targetContainer ? getTargetContainerLeft() : 0;
    }
    function ContainerRight() {
        return targetContainer ? getBodyScrollLeft$1() + getTargetContainerLeft() + getTargetContainerWidth() : getBodyScrollLeft$1() + getViewPortWidth();
    }
    function ContainerBottom() {
        return targetContainer ? getBodyScrollTop$1() + getTargetContainerTop() + getTargetContainerHeight() : getBodyScrollTop$1() + getViewPortHeight();
    }
    function getBodyScrollTop$1() {
        return parentDocument$1.documentElement.scrollTop || parentDocument$1.body.scrollTop;
    }
    function getBodyScrollLeft$1() {
        return parentDocument$1.documentElement.scrollLeft || parentDocument$1.body.scrollLeft;
    }
    function getViewPortHeight() {
        return window.innerHeight;
    }
    function getViewPortWidth() {
        return window.innerWidth;
    }
    function getScrollableParent(element, fixedParent) {
        for (var eleStyle = getComputedStyle(element), scrollParents = [], overflowRegex = /(auto|scroll)/, parent = element.parentElement; parent && "HTML" !== parent.tagName; ) {
            var parentStyle = getComputedStyle(parent);
            "absolute" === eleStyle.position && "static" === parentStyle.position || !overflowRegex.test(parentStyle.overflow + parentStyle.overflowY + parentStyle.overflowX) || scrollParents.push(parent), 
            parent = parent.parentElement;
        }
        return fixedParent || scrollParents.push(document), scrollParents;
    }
    function getZindexPartial(element) {
        for (var parent = element.parentElement, parentZindex = []; parent && "BODY" !== parent.tagName; ) {
            var index = document.defaultView.getComputedStyle(parent, null).getPropertyValue("z-index"), position = document.defaultView.getComputedStyle(parent, null).getPropertyValue("position");
            "auto" !== index && "static" !== position && parentZindex.push(index), parent = parent.parentElement;
        }
        for (var childrenZindex = [], i = 0; i < document.body.children.length; i++) if (!element.isEqualNode(document.body.children[i])) {
            index = document.defaultView.getComputedStyle(document.body.children[i], null).getPropertyValue("z-index"), 
            position = document.defaultView.getComputedStyle(document.body.children[i], null).getPropertyValue("position");
            "auto" !== index && "static" !== position && childrenZindex.push(index);
        }
        childrenZindex.push("999");
        var finalValue = parentZindex.concat(childrenZindex);
        return Math.max.apply(Math, finalValue) + 1;
    }
    function createSpinner(args) {
        var radius, container = function(target) {
            var spinnerContainer = document.createElement("div");
            spinnerContainer.classList.add(CLS_SPINWRAP);
            var spinnerInnerContainer = document.createElement("div");
            return spinnerInnerContainer.classList.add(CLS_SPININWRAP), target.appendChild(spinnerContainer), 
            spinnerContainer.appendChild(spinnerInnerContainer), {
                wrap: spinnerContainer,
                inner_wrap: spinnerInnerContainer
            };
        }(args.target);
        if (isNullOrUndefined(args.cssClass) || container.wrap.classList.add(args.cssClass), 
        isNullOrUndefined(args.template) && isNullOrUndefined(spinTemplate)) {
            var theme = isNullOrUndefined(args.type) ? function(container) {
                return window.getComputedStyle(container, ":after").getPropertyValue("content").replace(/['"]+/g, "");
            }(container.wrap) : args.type;
            radius = function(width, theme) {
                var defaultSize = "Material" === theme ? DEFT_MAT_WIDTH : "Fabric" === theme ? DEFT_FAB_WIDTH : DEFT_BOOT_WIDTH;
                return width = width ? parseFloat(width + "") : defaultSize, "Bootstrap" === theme ? width : width / 2;
            }(isNullOrUndefined(args.width) ? void 0 : args.width, theme), setTheme(theme, container.wrap, radius), 
            isNullOrUndefined(args.label) || function(container, label) {
                var labelEle = document.createElement("div");
                labelEle.classList.add(CLS_SPINLABEL), labelEle.textContent = label, container.appendChild(labelEle);
            }(container.inner_wrap, args.label);
        } else {
            var template = isNullOrUndefined(args.template) ? spinTemplate : args.template;
            container.wrap.classList.add(CLS_SPINTEMPLATE), function(container, template, cssClass) {
                isNullOrUndefined(cssClass) || container.classList.add(cssClass);
                container.querySelector(".e-spinner-inner").innerHTML = template;
            }(container.wrap, template, spinCSSClass);
        }
        container.wrap.classList.add(CLS_HIDESPIN);
    }
    function createMaterialSpinner(container, radius) {
        var uniqueID$$1 = random_generator();
        globalTimeOut[uniqueID$$1] = {
            timeOut: 0,
            type: "Material",
            radius: radius
        }, function(innerContainer, uniqueID$$1) {
            var svgMaterial = document.createElementNS("http://www.w3.org/2000/svg", "svg");
            svgMaterial.setAttribute("class", CLS_MATERIALSPIN), svgMaterial.setAttribute("id", uniqueID$$1);
            var matCirclePath = document.createElementNS("http://www.w3.org/2000/svg", "path");
            matCirclePath.setAttribute("class", CLS_SPINCIRCLE), innerContainer.insertBefore(svgMaterial, innerContainer.firstChild), 
            svgMaterial.appendChild(matCirclePath);
        }(container, uniqueID$$1), function(radius, container) {
            var diameter = 2 * radius, svg = container.querySelector("svg.e-spin-material"), path = svg.querySelector("path.e-path-circle"), strokeSize = getStrokeSize(diameter), transformOrigin = diameter / 2 + "px";
            svg.setAttribute("viewBox", "0 0 " + diameter + " " + diameter), svg.style.width = svg.style.height = diameter + "px", 
            svg.style.transformOrigin = transformOrigin + " " + transformOrigin + " " + transformOrigin, 
            path.setAttribute("stroke-width", strokeSize + ""), path.setAttribute("d", function(diameter, strokeSize) {
                var radius = diameter / 2, offset = strokeSize / 2;
                return "M" + radius + "," + offset + "A" + (radius - offset) + "," + (radius - offset) + " 0 1 1 " + offset + "," + radius;
            }(diameter, strokeSize)), path.setAttribute("stroke-dasharray", (diameter - strokeSize) * Math.PI * .75 + ""), 
            path.setAttribute("stroke-dashoffset", getDashOffset(diameter, strokeSize, 1, 75) + "");
        }(radius, container);
    }
    function setTheme(theme, container, radius) {
        var innerContainer = container.querySelector("." + CLS_SPININWRAP), svg = innerContainer.querySelector("svg");
        switch (isNullOrUndefined(svg) || innerContainer.removeChild(svg), theme) {
          case "Material":
            createMaterialSpinner(innerContainer, radius);
            break;

          case "Fabric":
            !function(container, radius) {
                var uniqueID$$1 = random_generator();
                globalTimeOut[uniqueID$$1] = {
                    timeOut: 0,
                    type: "Fabric",
                    radius: radius
                }, create_fabric_element(container, uniqueID$$1, CLS_FABRICSPIN), fb_calculate_attributes(radius, container, CLS_FABRICSPIN);
            }(innerContainer, radius);
            break;

          case "Bootstrap":
            !function(innerContainer, radius) {
                var uniqueID$$1 = random_generator();
                globalTimeOut[uniqueID$$1] = {
                    timeOut: 0,
                    type: "Bootstrap",
                    radius: radius
                }, function(innerContainer, uniqueID$$1) {
                    var svgBoot = document.createElementNS("http://www.w3.org/2000/svg", "svg");
                    svgBoot.setAttribute("id", uniqueID$$1), svgBoot.setAttribute("class", CLS_BOOTSPIN), 
                    svgBoot.setAttribute("viewBox", "0 0 64 64"), innerContainer.insertBefore(svgBoot, innerContainer.firstChild);
                    for (var item = 0; item <= 7; item++) {
                        var bootCircle = document.createElementNS("http://www.w3.org/2000/svg", "circle");
                        bootCircle.setAttribute("class", CLS_SPINCIRCLE + "_" + item), bootCircle.setAttribute("r", "2"), 
                        bootCircle.setAttribute("transform", "translate(32,32)"), svgBoot.appendChild(bootCircle);
                    }
                }(innerContainer, uniqueID$$1), function(innerContainer, radius) {
                    var svg = innerContainer.querySelector("svg.e-spin-bootstrap");
                    svg.style.width = svg.style.height = radius + "px";
                    for (var startArc = 90, item = 0; item <= 7; item++) {
                        var start = defineArcPoints(0, 0, 24, startArc), circleEle = svg.querySelector("." + CLS_SPINCIRCLE + "_" + item);
                        circleEle.setAttribute("cx", start.x + ""), circleEle.setAttribute("cy", start.y + ""), 
                        startArc = startArc >= 360 ? 0 : startArc, startArc += 45;
                    }
                }(innerContainer, radius);
            }(innerContainer, radius);
            break;

          case "HighContrast":
            !function(container, radius) {
                var uniqueID$$1 = random_generator();
                globalTimeOut[uniqueID$$1] = {
                    timeOut: 0,
                    type: "HighContrast",
                    radius: radius
                }, create_fabric_element(container, uniqueID$$1, CLS_HIGHCONTRASTSPIN), fb_calculate_attributes(radius, container, CLS_HIGHCONTRASTSPIN);
            }(innerContainer, radius);
        }
    }
    function generateSeries(begin, stop) {
        function formSeries(i) {
            series.push(i), i === end && 1 !== count || (i <= start && i > 1 && !increment ? i = parseFloat((i - .2).toFixed(2)) : 1 === i ? (i = 7, 
            i = parseFloat((i + .2).toFixed(2)), increment = !0) : i < 8 && increment ? 8 === (i = parseFloat((i + .2).toFixed(2))) && (increment = !1) : i <= 8 && !increment && (i = parseFloat((i - .2).toFixed(2))), 
            ++count, formSeries(i));
        }
        var series = [], start = begin, end = stop, increment = !1, count = 1;
        return formSeries(start), series;
    }
    function random_generator() {
        for (var random = "", combine = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789", i = 0; i < 5; i++) random += combine.charAt(Math.floor(Math.random() * combine.length));
        return random;
    }
    function create_fabric_element(innerContainer, uniqueID$$1, themeClass) {
        var svgFabric = document.createElementNS("http://www.w3.org/2000/svg", "svg");
        svgFabric.setAttribute("id", uniqueID$$1), svgFabric.setAttribute("class", themeClass);
        var fabricCirclePath = document.createElementNS("http://www.w3.org/2000/svg", "path");
        fabricCirclePath.setAttribute("class", CLS_SPINCIRCLE);
        var fabricCircleArc = document.createElementNS("http://www.w3.org/2000/svg", "path");
        fabricCircleArc.setAttribute("class", CLS_SPINARC), innerContainer.insertBefore(svgFabric, innerContainer.firstChild), 
        svgFabric.appendChild(fabricCirclePath), svgFabric.appendChild(fabricCircleArc);
    }
    function animateMaterial(spinnerInfo) {
        !function(start, end, easing, duration, count, max, spinnerInfo) {
            function mat_animation(spinnerInfo) {
                var currentTime = Math.max(0, Math.min(new Date().getTime() - startTime, duration));
                !function(value, container) {
                    if (!isNullOrUndefined(container.querySelector("svg.e-spin-material")) && !isNullOrUndefined(container.querySelector("svg.e-spin-material").querySelector("path.e-path-circle"))) {
                        var svg = container.querySelector("svg.e-spin-material"), path = svg.querySelector("path.e-path-circle");
                        path.setAttribute("stroke-dashoffset", getDashOffset(diameter, strokeSize, value, max) + ""), 
                        path.setAttribute("transform", "rotate(" + rotate + " " + diameter / 2 + " " + diameter / 2 + ")");
                    }
                }(easing(currentTime, start, change, duration), spinnerInfo.container), id === spinnerInfo.globalInfo[spinnerInfo.uniqueID].previousId && currentTime < duration ? globalTimeOut[spinnerInfo.uniqueID].timeOut = setTimeout(mat_animation.bind(null, spinnerInfo), 1) : animateMaterial(spinnerInfo);
            }
            var id = ++spinnerInfo.globalInfo[spinnerInfo.uniqueID].previousId, startTime = new Date().getTime(), change = end - start, diameter = function(value) {
                return parseFloat(value);
            }(2 * spinnerInfo.globalInfo[spinnerInfo.uniqueID].radius + ""), strokeSize = getStrokeSize(diameter), rotate = -90 * (spinnerInfo.globalInfo[spinnerInfo.uniqueID].count || 0);
            mat_animation(spinnerInfo);
        }(1, 149, easeAnimation, 1333, spinnerInfo.globalInfo[spinnerInfo.uniqueID].count, 75, spinnerInfo), 
        spinnerInfo.globalInfo[spinnerInfo.uniqueID].count = ++spinnerInfo.globalInfo[spinnerInfo.uniqueID].count % 4;
    }
    function getStrokeSize(diameter) {
        return .1 * diameter;
    }
    function getDashOffset(diameter, strokeSize, value, max) {
        return (diameter - strokeSize) * Math.PI * (3 * max / 100 - value / 100);
    }
    function easeAnimation(current, start, change, duration) {
        var timestamp = (current /= duration) * current, timecount = timestamp * current;
        return start + change * (6 * timecount * timestamp + -15 * timestamp * timestamp + 10 * timecount);
    }
    function fb_calculate_attributes(radius, innerConainer, trgClass) {
        var centerX = radius, centerY = radius, diameter = 2 * radius, svg = innerConainer.querySelector("." + trgClass), circle = svg.querySelector(".e-path-circle"), path = svg.querySelector(".e-path-arc"), transformOrigin = diameter / 2 + "px";
        circle.setAttribute("d", function(x, y, radius) {
            return [ "M", x, y, "m", -radius, 0, "a", radius, radius, 0, 1, 0, 2 * radius, 0, "a", radius, radius, 0, 1, 0, 2 * -radius, 0 ].join(" ");
        }(centerX, centerY, radius)), path.setAttribute("d", function(x, y, radius, startArc, endArc) {
            var start = defineArcPoints(x, y, radius, endArc), end = defineArcPoints(x, y, radius, startArc);
            return [ "M", start.x, start.y, "A", radius, radius, 0, 0, 0, end.x, end.y ].join(" ");
        }(centerX, centerY, radius, 315, 45)), svg.setAttribute("viewBox", "0 0 " + diameter + " " + diameter), 
        svg.style.transformOrigin = transformOrigin + " " + transformOrigin + " " + transformOrigin, 
        svg.style.width = svg.style.height = diameter + "px";
    }
    function defineArcPoints(centerX, centerY, radius, angle) {
        var radians = (angle - 90) * Math.PI / 180;
        return {
            x: centerX + radius * Math.cos(radians),
            y: centerY + radius * Math.sin(radians)
        };
    }
    function showSpinner(container) {
        showHideSpinner(container, !1);
    }
    function showHideSpinner(container, isHide) {
        var spinnerWrap = container.classList.contains(CLS_SPINWRAP) ? container : container.querySelector("." + CLS_SPINWRAP), inner = spinnerWrap.querySelector("." + CLS_SPININWRAP);
        if (isHide ? !spinnerWrap.classList.contains(CLS_SPINTEMPLATE) && !spinnerWrap.classList.contains(CLS_HIDESPIN) : !spinnerWrap.classList.contains(CLS_SPINTEMPLATE) && !spinnerWrap.classList.contains(CLS_SHOWSPIN)) {
            var svgEle = spinnerWrap.querySelector("svg");
            if (isNullOrUndefined(svgEle)) return;
            var id = svgEle.getAttribute("id");
            switch (globalTimeOut[id].isAnimate = !isHide, globalTimeOut[id].type) {
              case "Material":
                isHide ? clearTimeout(globalTimeOut[id].timeOut) : function(container, uniqueID$$1, radius) {
                    var globalObject = {};
                    globalTimeOut[uniqueID$$1].timeOut = 0, globalObject[uniqueID$$1] = function(id, radius, count, previousId) {
                        return {
                            radius: radius,
                            count: count,
                            previousId: previousId
                        };
                    }(0, radius, 0, 0), animateMaterial({
                        uniqueID: uniqueID$$1,
                        container: container,
                        globalInfo: globalObject,
                        timeOutVar: 0
                    });
                }(inner, id, globalTimeOut[id].radius);
                break;

              case "Bootstrap":
                isHide ? clearTimeout(globalTimeOut[id].timeOut) : function(innerContainer) {
                    for (var id = innerContainer.querySelector("svg.e-spin-bootstrap").getAttribute("id"), i = 1; i <= 8; i++) !function(circle, start, end, series, id) {
                        function boot_animate(radius) {
                            globalTimeOut[id].isAnimate && (++count, circle.setAttribute("r", radius + ""), 
                            count >= series.length && (count = 0), globalTimeOut[id].timeOut = setTimeout(boot_animate.bind(null, series[count]), 18));
                        }
                        var count = 0;
                        boot_animate(start);
                    }(innerContainer.getElementsByClassName("e-path-circle_" + (8 === i ? 0 : i))[0], i, 0, generateSeries(i, i), id);
                }(inner);
            }
        }
        isHide ? classList(spinnerWrap, [ CLS_HIDESPIN ], [ CLS_SHOWSPIN ]) : classList(spinnerWrap, [ CLS_SHOWSPIN ], [ CLS_HIDESPIN ]);
    }
    function hideSpinner(container) {
        showHideSpinner(container, !0);
    }
    function createMask() {
        if (attributes(this.element, {
            role: "textbox",
            autocomplete: "off",
            autocorrect: "off",
            autocapitalize: "off",
            spellcheck: "false",
            "aria-live": "assertive",
            "aria-valuenow": ""
        }), this.mask) {
            for (var splitMask = this.mask.split("]"), i = 0; i < splitMask.length; i++) if ("\\" === splitMask[i][splitMask[i].length - 1]) {
                splitMask[i] = splitMask[i] + "]";
                for (var splitInnerMask = splitMask[i].split("["), j = 0; j < splitInnerMask.length; j++) "\\" === splitInnerMask[j][splitInnerMask[j].length - 1] && (splitInnerMask[j] = splitInnerMask[j] + "["), 
                pushIntoRegExpCollec.call(this, splitInnerMask[j]);
            } else {
                if ((splitInnerMask = splitMask[i].split("[")).length > 1) {
                    var chkSpace = !1;
                    for (j = 0; j < splitInnerMask.length; j++) "\\" === splitInnerMask[j] ? (this.customRegExpCollec.push("["), 
                    this.hiddenMask += splitInnerMask[j] + "[") : "" === splitInnerMask[j] ? chkSpace = !0 : "" !== splitInnerMask[j] && chkSpace || j === splitInnerMask.length - 1 ? (this.customRegExpCollec.push("[" + splitInnerMask[j] + "]"), 
                    this.hiddenMask += this.promptChar, chkSpace = !1) : pushIntoRegExpCollec.call(this, splitInnerMask[j]);
                } else pushIntoRegExpCollec.call(this, splitInnerMask[0]);
            }
            if (this.escapeMaskValue = this.hiddenMask, this.promptMask = this.hiddenMask.replace(/[09?LCAa#&]/g, this.promptChar), 
            !isNullOrUndefined(this.customCharacters)) for (i = 0; i < this.promptMask.length; i++) isNullOrUndefined(this.customCharacters[this.promptMask[i]]) || (this.promptMask = this.promptMask.replace(new RegExp(this.promptMask[i], "g"), this.promptChar));
            var escapeNumber = 0;
            if (this.hiddenMask.match(new RegExp(/\\/))) for (i = 0; i < this.hiddenMask.length; i++) {
                j = 0;
                i >= 2 && (j = i), j -= escapeNumber = this.hiddenMask.length - this.promptMask.length, 
                i > 0 && "\\" !== this.hiddenMask[i - 1] && (">" === this.hiddenMask[i] || "<" === this.hiddenMask[i] || "|" === this.hiddenMask[i]) && (this.promptMask = this.promptMask.substring(0, j) + this.promptMask.substring(i + 1 - escapeNumber, this.promptMask.length), 
                this.escapeMaskValue = this.escapeMaskValue.substring(0, j) + this.escapeMaskValue.substring(i + 1 - escapeNumber, this.escapeMaskValue.length)), 
                "\\" === this.hiddenMask[i] && (this.promptMask = this.promptMask.substring(0, j) + this.hiddenMask[i + 1] + this.promptMask.substring(i + 2 - escapeNumber, this.promptMask.length), 
                this.escapeMaskValue = this.escapeMaskValue.substring(0, j) + this.escapeMaskValue[i + 1] + this.escapeMaskValue.substring(i + 2 - escapeNumber, this.escapeMaskValue.length));
            } else this.promptMask = this.promptMask.replace(/[>|<]/g, ""), this.escapeMaskValue = this.hiddenMask.replace(/[>|<]/g, "");
            attributes(this.element, {
                "aria-invalid": "false"
            });
        }
    }
    function applyMask() {
        setElementValue.call(this, this.promptMask), setMaskValue.call(this, this.value);
    }
    function wireEvents() {
        EventHandler.add(this.element, "keydown", maskInputKeyDownHandler, this), EventHandler.add(this.element, "keypress", maskInputKeyPressHandler, this), 
        EventHandler.add(this.element, "keyup", maskInputKeyUpHandler, this), EventHandler.add(this.element, "focus", maskInputFocusHandler, this), 
        EventHandler.add(this.element, "blur", maskInputBlurHandler, this), EventHandler.add(this.element, "paste", maskInputPasteHandler, this), 
        EventHandler.add(this.element, "cut", maskInputCutHandler, this), EventHandler.add(this.element, "drop", maskInputDropHandler, this);
    }
    function unwireEvents() {
        EventHandler.remove(this.element, "keydown", maskInputKeyDownHandler), EventHandler.remove(this.element, "keypress", maskInputKeyPressHandler), 
        EventHandler.remove(this.element, "keyup", maskInputKeyUpHandler), EventHandler.remove(this.element, "focus", maskInputFocusHandler), 
        EventHandler.remove(this.element, "blur", maskInputBlurHandler), EventHandler.remove(this.element, "paste", maskInputPasteHandler), 
        EventHandler.remove(this.element, "cut", maskInputCutHandler);
    }
    function unstrippedValue(element) {
        return element.value;
    }
    function strippedValue(element) {
        var value = "", k = 0, checkMask = !1;
        if (!isNullOrUndefined(element) && !isNullOrUndefined(this) && element.value !== this.promptMask) for (var i = 0; i < this.customRegExpCollec.length; i++) checkMask && (checkMask = !1), 
        ">" !== this.customRegExpCollec[k] && "<" !== this.customRegExpCollec[k] && "|" !== this.customRegExpCollec[k] && "\\" !== this.customRegExpCollec[k] || (--i, 
        checkMask = !0), checkMask || element.value[i] === this.promptChar || isNullOrUndefined(this.customRegExpCollec[k]) || isNullOrUndefined(this.regExpCollec[this.customRegExpCollec[k]]) && !(this.customRegExpCollec[k].length > 2 && "[" === this.customRegExpCollec[k][0] && "]" === this.customRegExpCollec[k][this.customRegExpCollec[k].length - 1]) && (isNullOrUndefined(this.customCharacters) || isNullOrUndefined(this.customCharacters[this.customRegExpCollec[k]])) || "" === element.value || (value += element.value[i]), 
        ++k;
        return value;
    }
    function pushIntoRegExpCollec(value) {
        for (var k = 0; k < value.length; k++) this.hiddenMask += value[k], "\\" !== value[k] && this.customRegExpCollec.push(value[k]);
    }
    function maskInputFocusHandler(event) {
        var _this = this;
        this.promptMask.length > 0 ? this.focusEventArgs = {
            selectionStart: 0,
            selectionEnd: this.promptMask.length
        } : this.focusEventArgs = {
            selectionStart: 0,
            selectionEnd: this.element.value.length
        };
        var eventArgs = {};
        merge(eventArgs, this.focusEventArgs), this.trigger("focus", eventArgs), this.focusEventArgs = eventArgs, 
        this.mask && (this.isFocus = !0, this.placeholder && "" === this.element.value ? (setElementValue.call(this, this.promptMask), 
        this.element.setSelectionRange(this.focusEventArgs.selectionStart, this.focusEventArgs.selectionEnd), 
        setTimeout(function() {
            _this.element.setSelectionRange(_this.focusEventArgs.selectionStart, _this.focusEventArgs.selectionEnd);
        }, 1)) : this.element.setSelectionRange(this.focusEventArgs.selectionStart, this.focusEventArgs.selectionEnd));
    }
    function maskInputBlurHandler(event) {
        if (this.mask && (this.isFocus = !1, this.placeholder && this.element.value === this.promptMask && "Always" !== this.floatLabelType)) {
            setElementValue.call(this, "");
            var labelElement = this.element.parentNode.querySelector(".e-float-text");
            "Auto" === this.floatLabelType && !isNullOrUndefined(labelElement) && labelElement.classList.contains(TOPLABEL) && removeClass([ labelElement ], TOPLABEL);
        }
    }
    function maskInputPasteHandler(event) {
        var _this = this;
        if (this.mask) {
            var sIndex_1 = this.element.selectionStart, eIndex_1 = this.element.selectionEnd, oldValue_1 = this.element.value;
            setElementValue.call(this, ""), setTimeout(function() {
                var value = _this.element.value;
                _this.redoCollec.length > 0 && _this.redoCollec[0].value === _this.element.value && (value = strippedValue.call(_this, _this.element)), 
                setElementValue.call(_this, oldValue_1), _this.element.selectionStart = sIndex_1, 
                _this.element.selectionEnd = eIndex_1;
                var i = 0;
                _this.maskKeyPress = !0;
                do {
                    validateValue.call(_this, value[i], !1, null), ++i;
                } while (i < value.length);
                _this.maskKeyPress = !1;
            }, 1);
        }
    }
    function maskInputCutHandler(event) {
        var _this = this;
        if (this.mask) {
            var sIndex_2 = this.element.selectionStart, eIndex = this.element.selectionEnd;
            this.undoCollec.push({
                value: this.element.value,
                startIndex: this.element.selectionStart,
                endIndex: this.element.selectionEnd
            });
            var value_1 = this.element.value.substring(0, sIndex_2) + this.promptMask.substring(sIndex_2, eIndex) + this.element.value.substring(eIndex);
            setTimeout(function() {
                setElementValue.call(_this, value_1), _this.element.selectionStart = _this.element.selectionEnd = sIndex_2;
            }, 0);
        }
    }
    function maskInputDropHandler(event) {
        event.preventDefault();
    }
    function maskInputKeyDownHandler(event) {
        var _this = this;
        if (this.mask) {
            229 !== event.keyCode ? (!event.ctrlKey || 89 !== event.keyCode && 90 !== event.keyCode || event.preventDefault(), 
            removeMaskInputValues.call(this, event)) : setTimeout(function() {
                removeMaskInputValues.call(_this, event);
            }, 0);
            var startValue = this.element.value;
            if (event.ctrlKey && (89 === event.keyCode || 90 === event.keyCode)) {
                var collec = void 0;
                90 === event.keyCode && this.undoCollec.length > 0 && startValue !== this.undoCollec[this.undoCollec.length - 1].value ? (collec = this.undoCollec[this.undoCollec.length - 1], 
                this.redoCollec.unshift({
                    value: this.element.value,
                    startIndex: this.element.selectionStart,
                    endIndex: this.element.selectionEnd
                }), setElementValue.call(this, collec.value), this.element.selectionStart = collec.startIndex, 
                this.element.selectionEnd = collec.endIndex, this.undoCollec.splice(this.undoCollec.length - 1, 1)) : 89 === event.keyCode && this.redoCollec.length > 0 && startValue !== this.redoCollec[0].value && (collec = this.redoCollec[0], 
                this.undoCollec.push({
                    value: this.element.value,
                    startIndex: this.element.selectionStart,
                    endIndex: this.element.selectionEnd
                }), setElementValue.call(this, collec.value), this.element.selectionStart = collec.startIndex, 
                this.element.selectionEnd = collec.endIndex, this.redoCollec.splice(0, 1));
            }
        }
    }
    function mobileRemoveFunction() {
        var collec, sIndex = this.element.selectionStart, eIndex = this.element.selectionEnd;
        this.redoCollec.length > 0 ? (collec = this.redoCollec[0], setElementValue.call(this, collec.value), 
        collec.startIndex - sIndex == 1 ? (this.element.selectionStart = collec.startIndex, 
        this.element.selectionEnd = collec.endIndex) : (this.element.selectionStart = sIndex + 1, 
        this.element.selectionEnd = eIndex + 1)) : (setElementValue.call(this, this.promptMask), 
        this.element.selectionStart = this.element.selectionEnd = sIndex);
    }
    function removeMaskInputValues(event) {
        var oldEventVal, isRemove = !1, isDeleted = !1;
        this.element.value.length < this.promptMask.length && (isRemove = !0, mobileRemoveFunction.call(this), 
        oldEventVal = this.element.value);
        var initStartIndex = this.element.selectionStart, initEndIndex = this.element.selectionEnd, startIndex = this.element.selectionStart, endIndex = this.element.selectionEnd, maskValue = this.hiddenMask.replace(/[>|\\<]/g, ""), curMask = maskValue[startIndex - 1];
        this.element.parentNode;
        if (isRemove || 8 === event.keyCode || 46 === event.keyCode) {
            this.undoCollec.push({
                value: this.element.value,
                startIndex: this.element.selectionStart,
                endIndex: endIndex
            });
            var multipleDel = !1;
            if (startIndex > 0 || (8 === event.keyCode || 46 === event.keyCode) && startIndex < this.element.value.length && this.element.selectionEnd - startIndex !== this.element.value.length) {
                var index = startIndex;
                startIndex !== endIndex ? (startIndex = endIndex, 46 === event.keyCode && (multipleDel = !0)) : 46 === event.keyCode ? ++index : --index;
                for (var k = startIndex; 8 === event.keyCode || isRemove || multipleDel ? k > index : k < index; 8 === event.keyCode || isRemove || multipleDel ? k-- : k++) for (var i = startIndex; 8 === event.keyCode || isRemove || multipleDel ? i > 0 : i < this.element.value.length; 8 === event.keyCode || isRemove || multipleDel ? i-- : i++) {
                    var sIndex = void 0;
                    (8 === event.keyCode || multipleDel) && (initStartIndex !== initEndIndex && initStartIndex !== startIndex || initStartIndex === initEndIndex) || isRemove ? (curMask = maskValue[i - 1], 
                    sIndex = startIndex - 1) : (curMask = maskValue[i], sIndex = startIndex, ++startIndex);
                    var oldValue = this.element.value[sIndex];
                    if (isNullOrUndefined(this.regExpCollec[curMask]) && !isNullOrUndefined(this.customCharacters) && isNullOrUndefined(this.customCharacters[curMask]) && this.hiddenMask[sIndex] !== this.promptChar && "[" !== this.customRegExpCollec[sIndex][0] && "]" !== this.customRegExpCollec[sIndex][this.customRegExpCollec[sIndex].length - 1] || this.promptMask[sIndex] !== this.promptChar && isNullOrUndefined(this.customCharacters)) this.element.selectionStart = this.element.selectionEnd = sIndex, 
                    event.preventDefault(), 46 !== event.keyCode || multipleDel || ++this.element.selectionStart; else {
                        var value = this.element.value, prompt_1 = this.promptChar, elementValue = value.substring(0, sIndex) + prompt_1 + value.substring(startIndex, value.length);
                        setElementValue.call(this, elementValue), event.preventDefault(), this.element.selectionStart = this.element.selectionEnd = sIndex, 
                        isDeleted = !0;
                    }
                    if (startIndex = this.element.selectionStart, !isDeleted && 8 === event.keyCode || multipleDel || !isDeleted && 46 !== event.keyCode ? sIndex = startIndex - 1 : (sIndex = startIndex, 
                    isDeleted = !1), oldValue = this.element.value[sIndex], initStartIndex !== initEndIndex && this.element.selectionStart === initStartIndex || this.promptMask[sIndex] === this.promptChar || oldValue !== this.promptMask[sIndex] && this.promptMask[sIndex] !== this.promptChar && !isNullOrUndefined(this.customCharacters)) break;
                }
            }
            0 === this.element.selectionStart && this.element.selectionEnd === this.element.value.length && (setElementValue.call(this, this.promptMask), 
            event.preventDefault(), this.element.selectionStart = this.element.selectionEnd = startIndex), 
            this.redoCollec.unshift({
                value: this.element.value,
                startIndex: this.element.selectionStart,
                endIndex: this.element.selectionEnd
            }), triggerMaskChangeEvent.call(this, event, oldEventVal);
        }
    }
    function maskInputKeyPressHandler(event) {
        if (this.mask) {
            var oldValue = this.element.value;
            if (!event.ctrlKey || event.ctrlKey && "KeyA" !== event.code && "KeyY" !== event.code && "KeyZ" !== event.code && "KeyX" !== event.code && "KeyC" !== event.code && "KeyV" !== event.code) {
                this.maskKeyPress = !0;
                var key = event.key;
                "Spacebar" === key && (key = String.fromCharCode(event.keyCode)), key ? key && 1 === key.length && (validateValue.call(this, key, event.ctrlKey, event), 
                event.preventDefault()) : (this.isIosInvalid = !0, validateValue.call(this, String.fromCharCode(event.keyCode), event.ctrlKey, event), 
                event.preventDefault(), this.isIosInvalid = !1);
            }
            triggerMaskChangeEvent.call(this, event, oldValue);
        }
    }
    function triggerMaskChangeEvent(event, oldValue) {
        if (!isNullOrUndefined(this.changeEventArgs)) {
            var eventArgs = {};
            this.changeEventArgs = {
                value: this.element.value,
                maskedValue: this.element.value,
                isInteraction: !1
            }, this.mask && (this.changeEventArgs.value = strippedValue.call(this, this.element)), 
            isNullOrUndefined(event) || (this.changeEventArgs.isInteraction = !0, this.changeEventArgs.event = event), 
            merge(eventArgs, this.changeEventArgs), this.trigger("change", eventArgs);
        }
        attributes(this.element, {
            "aria-valuenow": this.element.value
        });
    }
    function maskInputKeyUpHandler(event) {
        if (this.mask) {
            var collec = void 0;
            if (this.maskKeyPress || 229 !== event.keyCode) removeMaskError.call(this); else {
                var oldEventVal = void 0;
                if (1 === this.element.value.length && (this.element.value = this.element.value + this.promptMask, 
                this.element.setSelectionRange(1, 1)), this.element.value.length > this.promptMask.length) {
                    var startIndex = this.element.selectionStart, addedValues = this.element.value.length - this.promptMask.length, val_1 = this.element.value.substring(startIndex - addedValues, startIndex);
                    if (this.undoCollec.length > 0) {
                        collec = this.undoCollec[this.undoCollec.length - 1];
                        var startIndex_1 = this.element.selectionStart;
                        oldEventVal = collec.value;
                        var oldVal = collec.value.substring(startIndex_1 - addedValues, startIndex_1);
                        collec = this.redoCollec[0], val_1 = val_1.trim();
                        var isSpace = Browser.isAndroid && "" === val_1;
                        isSpace || oldVal === val_1 || collec.value.substring(startIndex_1 - addedValues, startIndex_1) === val_1 ? isSpace && preventUnsupportedValues.call(this, event, startIndex_1 - 1, this.element.selectionEnd - 1, val_1, event.ctrlKey, !1) : validateValue.call(this, val_1, event.ctrlKey, event);
                    } else oldEventVal = this.promptMask, validateValue.call(this, val_1, event.ctrlKey, event);
                    this.maskKeyPress = !1, triggerMaskChangeEvent.call(this, event, oldEventVal);
                }
            }
            var val = strippedValue.call(this, this.element);
            (0 !== this.element.selectionStart || this.promptMask !== this.element.value || "" !== val || "" === val && this.value !== val) && (this.prevValue = val, 
            this.value = val);
        } else triggerMaskChangeEvent.call(this, event), this.value = this.element.value;
    }
    function validateValue(key, isCtrlKey, event) {
        this.maskKeyPress || function(key) {
            if (key.length > 1 && this.promptMask.length + key.length < this.element.value.length) {
                var elementValue = this.redoCollec[0].value.substring(0, this.redoCollec[0].startIndex) + key + this.redoCollec[0].value.substring(this.redoCollec[0].startIndex, this.redoCollec[0].value.length);
                setElementValue.call(this, elementValue), this.element.selectionStart = this.element.selectionEnd = this.redoCollec[0].startIndex + key.length;
            }
            this.element.selectionStart = this.element.selectionStart - key.length, this.element.selectionEnd = this.element.selectionEnd - key.length;
        }.call(this, key);
        for (var curMask, eventOldVal, startIndex = this.element.selectionStart, initStartIndex = startIndex, allowText = (this.element.selectionEnd, 
        !1), value = this.element.value, prevSupport = !1, isEqualVal = !1, k = 0; k < key.length; k++) {
            var keyValue = key[k];
            if (startIndex = this.element.selectionStart, this.element.selectionEnd, this.maskKeyPress || initStartIndex !== startIndex || (startIndex += k), 
            !this.maskKeyPress || startIndex < this.promptMask.length) {
                for (var i = startIndex; i < this.promptMask.length; i++) {
                    curMask = this.escapeMaskValue[startIndex], "\\" === this.hiddenMask[startIndex] && this.hiddenMask[startIndex + 1] === key && (isEqualVal = !0), 
                    (isNullOrUndefined(this.regExpCollec[curMask]) && (isNullOrUndefined(this.customCharacters) || !isNullOrUndefined(this.customCharacters) && isNullOrUndefined(this.customCharacters[curMask])) && this.hiddenMask[startIndex] !== this.promptChar && "[" !== this.customRegExpCollec[startIndex][0] && "]" !== this.customRegExpCollec[startIndex][this.customRegExpCollec[startIndex].length - 1] || this.promptMask[startIndex] !== this.promptChar && isNullOrUndefined(this.customCharacters) || this.promptChar === curMask && this.escapeMaskValue === this.mask) && (this.element.selectionStart = this.element.selectionEnd = startIndex + 1, 
                    startIndex = this.element.selectionStart, curMask = this.hiddenMask[startIndex]);
                }
                if (isNullOrUndefined(this.customCharacters) || isNullOrUndefined(this.customCharacters[curMask])) !isNullOrUndefined(this.regExpCollec[curMask]) && keyValue.match(new RegExp(this.regExpCollec[curMask])) && this.promptMask[startIndex] === this.promptChar ? allowText = !0 : this.promptMask[startIndex] === this.promptChar && "[" === this.customRegExpCollec[startIndex][0] && "]" === this.customRegExpCollec[startIndex][this.customRegExpCollec[startIndex].length - 1] && keyValue.match(new RegExp(this.customRegExpCollec[startIndex])) && (allowText = !0); else {
                    var customValArr = this.customCharacters[curMask].split(",");
                    for (i = 0; i < customValArr.length; i++) if (keyValue.match(new RegExp("[" + customValArr[i] + "]"))) {
                        allowText = !0;
                        break;
                    }
                }
                if ((!this.maskKeyPress || startIndex < this.hiddenMask.length) && allowText) {
                    if (0 === k) if (this.maskKeyPress) this.undoCollec.push({
                        value: value,
                        startIndex: startIndex,
                        endIndex: startIndex
                    }); else {
                        var sIndex = this.element.selectionStart, eIndex = this.element.selectionEnd;
                        this.redoCollec.length > 0 ? (eventOldVal = this.redoCollec[0].value, setElementValue.call(this, eventOldVal), 
                        this.undoCollec.push(this.redoCollec[0])) : (this.undoCollec.push({
                            value: this.promptMask,
                            startIndex: startIndex,
                            endIndex: startIndex
                        }), eventOldVal = this.promptMask, setElementValue.call(this, eventOldVal)), this.element.selectionStart = sIndex, 
                        this.element.selectionEnd = eIndex;
                    }
                    startIndex = this.element.selectionStart, function(event, startIndex, keyValue, eventOldVal, isEqualVal) {
                        this.hiddenMask.length > this.promptMask.length && (keyValue = function(key, value) {
                            var promptMask, i, curVal = value, caseCount = 0;
                            for (i = 0; i < this.hiddenMask.length; i++) if ("\\" === this.hiddenMask[i] && (promptMask = curVal.substring(0, i) + "\\" + curVal.substring(i, curVal.length)), 
                            ">" !== this.hiddenMask[i] && "<" !== this.hiddenMask[i] && "|" !== this.hiddenMask[i] || (this.hiddenMask[i] !== curVal[i] && (promptMask = curVal.substring(0, i) + this.hiddenMask[i] + curVal.substring(i, curVal.length)), 
                            ++caseCount), promptMask) {
                                if (promptMask[i] === this.promptChar && i > this.element.selectionStart || this.element.value.indexOf(this.promptChar) < 0 && this.element.selectionStart + caseCount === i) {
                                    caseCount = 0;
                                    break;
                                }
                                curVal = promptMask;
                            }
                            for (;i >= 0 && promptMask; ) {
                                if (0 === i || "\\" !== promptMask[i - 1]) {
                                    this.element.value;
                                    if (">" === promptMask[i]) {
                                        key = key.toUpperCase();
                                        break;
                                    }
                                    if ("<" === promptMask[i]) {
                                        key = key.toLowerCase();
                                        break;
                                    }
                                    if ("|" === promptMask[i]) break;
                                }
                                --i;
                            }
                            return key;
                        }.call(this, keyValue, this.element.value));
                        if (!isEqualVal) {
                            var value = this.element.value, elementValue = value.substring(0, startIndex) + keyValue + value.substring(startIndex + 1, value.length);
                            setElementValue.call(this, elementValue), this.element.selectionStart = this.element.selectionEnd = startIndex + 1;
                        }
                        triggerMaskChangeEvent.call(this, event, eventOldVal);
                    }.call(this, event, startIndex, keyValue, eventOldVal, isEqualVal), prevSupport = !0, 
                    k === key.length - 1 && this.redoCollec.unshift({
                        value: this.element.value,
                        startIndex: this.element.selectionStart,
                        endIndex: this.element.selectionEnd
                    }), allowText = !1;
                } else startIndex = this.element.selectionStart, preventUnsupportedValues.call(this, event, startIndex, initStartIndex, key, isCtrlKey, prevSupport);
                k !== key.length - 1 || allowText || (!Browser.isAndroid || Browser.isAndroid && startIndex < this.promptMask.length) && this.redoCollec.unshift({
                    value: this.element.value,
                    startIndex: this.element.selectionStart,
                    endIndex: this.element.selectionEnd
                });
            } else 1 !== key.length || isCtrlKey || isNullOrUndefined(event) || addMaskErrorClass.call(this);
        }
    }
    function preventUnsupportedValues(event, sIdx, idx, key, ctrl, chkSupport) {
        if (!this.maskKeyPress) {
            var eventOldVal = void 0, value = this.element.value;
            sIdx >= this.promptMask.length ? setElementValue.call(this, value.substring(0, sIdx)) : (idx === sIdx ? setElementValue.call(this, value.substring(0, sIdx) + value.substring(sIdx + 1, value.length)) : this.promptMask.length === this.element.value.length ? setElementValue.call(this, value.substring(0, sIdx) + value.substring(sIdx, value.length)) : setElementValue.call(this, value.substring(0, idx) + value.substring(idx + 1, value.length)), 
            this.element.selectionStart = this.element.selectionEnd = chkSupport || this.element.value[idx] !== this.promptChar ? sIdx : idx), 
            eventOldVal = this.element.value, triggerMaskChangeEvent.call(this, event, eventOldVal), 
            addMaskErrorClass.call(this);
        }
        1 !== key.length || ctrl || isNullOrUndefined(event) || addMaskErrorClass.call(this);
    }
    function addMaskErrorClass() {
        var _this = this, parentElement = this.element.parentNode, timer = 200;
        parentElement.classList.contains(INPUTGROUP) || parentElement.classList.contains(FLOATINPUT) ? addClass([ parentElement ], ERROR$1) : addClass([ this.element ], ERROR$1), 
        !0 === this.isIosInvalid && (timer = 400), attributes(this.element, {
            "aria-invalid": "true"
        }), setTimeout(function() {
            _this.maskKeyPress || removeMaskError.call(_this);
        }, timer);
    }
    function removeMaskError() {
        removeClass([ this.element.parentNode ], ERROR$1), removeClass([ this.element ], ERROR$1), 
        attributes(this.element, {
            "aria-invalid": "false"
        });
    }
    function setMaskValue(val) {
        if (this.mask && !isNullOrUndefined(val) && ("" === val || this.prevValue !== val)) {
            this.maskKeyPress = !0, setElementValue.call(this, this.promptMask), "" !== val && (this.element.selectionStart = 0, 
            this.element.selectionEnd = 0);
            for (var i = 0; i < val.length; i++) validateValue.call(this, val[i], !1, null);
            this.value = strippedValue.call(this, this.element), this.maskKeyPress = !1;
            var labelElement = this.element.parentNode.querySelector(".e-float-text");
            this.element.value !== this.promptMask || "Auto" !== this.floatLabelType || isNullOrUndefined(labelElement) || !labelElement.classList.contains(TOPLABEL) || this.isFocus || (removeClass([ labelElement ], TOPLABEL), 
            addClass([ labelElement ], BOTTOMLABEL), setElementValue.call(this, ""));
        }
    }
    function setElementValue(val, element) {
        !this.isFocus && "Auto" === this.floatLabelType && isNullOrUndefined(this.value) && (val = ""), 
        Input.setValue(val, element || this.element, this.floatLabelType);
    }
    function getMaskInput(args) {
        addClass([ args.element ], UTILMASK);
        var inputEle = {
            element: args.element,
            mask: args.mask,
            promptMask: "",
            hiddenMask: "",
            escapeMaskValue: "",
            promptChar: args.promptChar ? args.promptChar.length > 1 ? args.promptChar = args.promptChar[0] : args.promptChar : "_",
            value: args.value ? args.value : null,
            regExpCollec: regularExpressions,
            customRegExpCollec: [],
            customCharacters: args.customCharacters,
            undoCollec: [],
            redoCollec: [],
            maskKeyPress: !1,
            prevValue: ""
        };
        return createMask.call(inputEle), inputEle;
    }
    function getUtilMaskEle(args) {
        var inputEle;
        return !isNullOrUndefined(args) && args.element.classList.contains(UTILMASK) && (inputEle = getMaskInput(args)), 
        inputEle;
    }
    function Search(inputVal, items, searchType, ignoreCase) {
        var listItems = items;
        ignoreCase = void 0 === ignoreCase || null === ignoreCase || ignoreCase;
        var itemData = {
            item: null,
            index: null
        };
        if (inputVal.length) {
            for (var strLength = inputVal.length, queryStr = ignoreCase ? inputVal.toLocaleLowerCase() : inputVal, i = 0, itemsData = listItems; i < itemsData.length; i++) {
                var item = itemsData[i], text = (ignoreCase ? item.textContent.toLocaleLowerCase() : item.textContent).replace(/^\s+|\s+$/g, "");
                if ("Equal" === searchType && text === queryStr || "StartsWith" === searchType && text.substr(0, strLength) === queryStr) return itemData.item = item, 
                itemData.index = i, {
                    item: item,
                    index: i
                };
            }
            return itemData;
        }
        return itemData;
    }
    function getFieldValues(dataItem, fields) {
        var value, fieldData = {};
        if (isNullOrUndefined(dataItem)) return dataItem;
        if ("string" == typeof dataItem || "number" == typeof dataItem) return dataItem;
        if (isNullOrUndefined(dataItem.isHeader)) for (var _i = 0, _a = Object.keys(fields); _i < _a.length; _i++) {
            var field = _a[_i];
            if (!isNullOrUndefined(fields[field]) && "string" == typeof fields[field]) {
                var property = fields[field].split(".");
                isNullOrUndefined(dataItem[property.length > 1 ? property[0] : fields[field]]) || isNullOrUndefined(value = getValue(fields[field], dataItem)) || (fieldData[fields[field]] = value);
            }
        } else !isNullOrUndefined(dataItem.isHeader) && dataItem.isHeader && (fieldData = dataItem);
        return fieldData;
    }
    function highlightSearch(content, query, ignoreCase, type) {
        if (function(content) {
            for (var contentElement = content.querySelectorAll(".e-highlight"), i = contentElement.length - 1; i >= 0; i--) {
                var parent_1 = contentElement[i].parentNode, text = document.createTextNode(contentElement[i].textContent);
                parent_1.replaceChild(text, contentElement[i]);
            }
        }(content), "" !== query) {
            var ignoreRegex = ignoreCase ? "gim" : "gm";
            query = /^[a-zA-Z0-9- ]*$/.test(query) ? query : query.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
            for (var replaceQuery = "StartsWith" === type ? "^(" + query + ")" : "EndsWith" === type ? "(" + query + ")$" : "(" + query + ")", pattern = new RegExp(replaceQuery, ignoreRegex), li = content.querySelectorAll("ul li"), i = 0; i < li.length; i++) {
                var element = li[i];
                element.innerHTML = element.innerHTML.replace(pattern, '<span class="e-highlight">$1</span>');
            }
        }
    }
    function wrapperInitialize$1(tag, type, element, WRAPPER) {
        if (element.tagName === tag) {
            for (var ejInstance = getValue("ej2_instances", element), input = createElement("input", {
                attrs: {
                    type: type
                }
            }), props = [ "change", "cssClass", "label", "labelPosition" ], wrapper = createElement(tag, {
                className: WRAPPER,
                attrs: {
                    role: type,
                    "aria-checked": "false"
                }
            }), index = 0, len = element.attributes.length; index < len; index++) -1 === props.indexOf(element.attributes[index].nodeName) && input.setAttribute(element.attributes[index].nodeName, element.attributes[index].nodeValue);
            element.parentNode.insertBefore(input, element), detach(element), (element = input).parentNode.insertBefore(wrapper, element), 
            wrapper.appendChild(element), setValue("ej2_instances", ejInstance, element);
        }
        return element;
    }
    function getTextNode$1(element) {
        for (var node, childnode = element.childNodes, i = 0; i < childnode.length; i++) if (3 === (node = childnode[i]).nodeType) return node;
        return null;
    }
    function rippleMouseHandler$1(e, rippleSpan) {
        if (rippleSpan) {
            var event_1 = document.createEvent("MouseEvents");
            event_1.initEvent(e.type, !1, !0), rippleSpan.dispatchEvent(event_1);
        }
    }
    function calculatePosition$1(currentElement, positionX, positionY, parentElement) {
        if (fixedParent$1 = !!parentElement, !currentElement) return {
            left: 0,
            top: 0
        };
        positionX || (positionX = "left"), positionY || (positionY = "top"), parentDocument$1$1 = currentElement.ownerDocument, 
        element$1 = currentElement;
        return function(posX, posY, pos) {
            switch (elementRect$1 = element$1.getBoundingClientRect(), posY + posX) {
              case "topcenter":
                setPosx$1(getElementHCenter$1(), pos), setPosy$1(getElementTop$1(), pos);
                break;

              case "topright":
                setPosx$1(getElementRight$1(), pos), setPosy$1(getElementTop$1(), pos);
                break;

              case "centercenter":
                setPosx$1(getElementHCenter$1(), pos), setPosy$1(getElementVCenter$1(), pos);
                break;

              case "centerright":
                setPosx$1(getElementRight$1(), pos), setPosy$1(getElementVCenter$1(), pos);
                break;

              case "centerleft":
                setPosx$1(getElementLeft$1(), pos), setPosy$1(getElementVCenter$1(), pos);
                break;

              case "bottomcenter":
                setPosx$1(getElementHCenter$1(), pos), setPosy$1(getElementBottom$1(), pos);
                break;

              case "bottomright":
                setPosx$1(getElementRight$1(), pos), setPosy$1(getElementBottom$1(), pos);
                break;

              case "bottomleft":
                setPosx$1(getElementLeft$1(), pos), setPosy$1(getElementBottom$1(), pos);
                break;

              default:
              case "topleft":
                setPosx$1(getElementLeft$1(), pos), setPosy$1(getElementTop$1(), pos);
            }
            return pos;
        }(positionX.toLowerCase(), positionY.toLowerCase(), {
            left: 0,
            top: 0
        });
    }
    function setPosx$1(value, pos) {
        pos.left = value;
    }
    function setPosy$1(value, pos) {
        pos.top = value;
    }
    function getBodyScrollTop$1$1() {
        return parentDocument$1$1.documentElement.scrollTop || parentDocument$1$1.body.scrollTop;
    }
    function getBodyScrollLeft$1$1() {
        return parentDocument$1$1.documentElement.scrollLeft || parentDocument$1$1.body.scrollLeft;
    }
    function getElementBottom$1() {
        return fixedParent$1 ? elementRect$1.bottom : elementRect$1.bottom + getBodyScrollTop$1$1();
    }
    function getElementVCenter$1() {
        return getElementTop$1() + elementRect$1.height / 2;
    }
    function getElementTop$1() {
        return fixedParent$1 ? elementRect$1.top : elementRect$1.top + getBodyScrollTop$1$1();
    }
    function getElementLeft$1() {
        return elementRect$1.left + getBodyScrollLeft$1$1();
    }
    function getElementRight$1() {
        return elementRect$1.right + getBodyScrollLeft$1$1();
    }
    function getElementHCenter$1() {
        return getElementLeft$1() + elementRect$1.width / 2;
    }
    function flip$1(element, target, offsetX, offsetY, positionX, positionY, viewPortElement, axis, fixedParent) {
        if (void 0 === viewPortElement && (viewPortElement = null), void 0 === axis && (axis = {
            X: !0,
            Y: !0
        }), target && element && positionX && positionY && (axis.X || axis.Y)) {
            var tEdge = {
                TL: null,
                TR: null,
                BL: null,
                BR: null
            }, eEdge = {
                TL: null,
                TR: null,
                BL: null,
                BR: null
            }, elementRect = element.getBoundingClientRect(), pos = {
                posX: positionX,
                posY: positionY,
                offsetX: offsetX,
                offsetY: offsetY,
                position: {
                    left: 0,
                    top: 0
                }
            };
            targetContainer$1 = viewPortElement, parentDocument$2 = target.ownerDocument, function(target, edge, pos, fixedParent) {
                pos.position = calculatePosition$1(target, pos.posX, pos.posY, fixedParent), edge.TL = calculatePosition$1(target, "left", "top", fixedParent), 
                edge.TR = calculatePosition$1(target, "right", "top", fixedParent), edge.BR = calculatePosition$1(target, "left", "bottom", fixedParent), 
                edge.BL = calculatePosition$1(target, "right", "bottom", fixedParent);
            }(target, tEdge, pos, fixedParent), setPosition$1(eEdge, pos, elementRect), axis.X && leftFlip$1(target, eEdge, tEdge, pos, elementRect, !0), 
            axis.Y && tEdge.TL.top > -1 && topFlip$1(target, eEdge, tEdge, pos, elementRect, !0), 
            function(element, pos) {
                var left = 0, top = 0;
                if (null != element.offsetParent && ("absolute" === getComputedStyle(element.offsetParent).position || "relative" === getComputedStyle(element.offsetParent).position)) {
                    var data = calculatePosition$1(element.offsetParent, "left", "top");
                    left = data.left, top = data.top;
                }
                element.style.top = pos.position.top + pos.offsetY - top + "px", element.style.left = pos.position.left + pos.offsetX - left + "px";
            }(element, pos);
        }
    }
    function setPosition$1(eStatus, pos, elementRect) {
        eStatus.TL = {
            top: pos.position.top + pos.offsetY,
            left: pos.position.left + pos.offsetX
        }, eStatus.TR = {
            top: eStatus.TL.top,
            left: eStatus.TL.left + elementRect.width
        }, eStatus.BL = {
            top: eStatus.TL.top + elementRect.height,
            left: eStatus.TL.left
        }, eStatus.BR = {
            top: eStatus.TL.top + elementRect.height,
            left: eStatus.TL.left + elementRect.width
        };
    }
    function leftCollideCheck$1(left, right) {
        var leftSide = !1, rightSide = !1;
        return left - getBodyScrollLeft$2() < ContainerLeft$1() && (leftSide = !0), right > ContainerRight$1() && (rightSide = !0), 
        {
            leftSide: leftSide,
            rightSide: rightSide
        };
    }
    function leftFlip$1(target, edge, tEdge, pos, elementRect, deepCheck) {
        var collideSide = leftCollideCheck$1(edge.TL.left, edge.TR.left);
        tEdge.TL.left - getBodyScrollLeft$2() <= ContainerLeft$1() && (collideSide.leftSide = !1), 
        tEdge.TR.left >= ContainerRight$1() && (collideSide.rightSide = !1), (collideSide.leftSide && !collideSide.rightSide || !collideSide.leftSide && collideSide.rightSide) && ("right" === pos.posX ? pos.posX = "left" : pos.posX = "right", 
        pos.offsetX = pos.offsetX + elementRect.width, pos.offsetX = -1 * pos.offsetX, pos.position = calculatePosition$1(target, pos.posX, pos.posY), 
        setPosition$1(edge, pos, elementRect), deepCheck && leftFlip$1(target, edge, tEdge, pos, elementRect, !1));
    }
    function topFlip$1(target, edge, tEdge, pos, elementRect, deepCheck) {
        var collideSide = topCollideCheck$1(edge.TL.top, edge.BL.top);
        tEdge.TL.top - getBodyScrollTop$2() <= ContainerTop$1() && (collideSide.topSide = !1), 
        tEdge.BL.top >= ContainerBottom$1() && (collideSide.bottomSide = !1), (collideSide.topSide && !collideSide.bottomSide || !collideSide.topSide && collideSide.bottomSide) && ("top" === pos.posY ? pos.posY = "bottom" : pos.posY = "top", 
        pos.offsetY = pos.offsetY + elementRect.height, pos.offsetY = -1 * pos.offsetY, 
        pos.position = calculatePosition$1(target, pos.posX, pos.posY), setPosition$1(edge, pos, elementRect), 
        deepCheck && topFlip$1(target, edge, tEdge, pos, elementRect, !1));
    }
    function topCollideCheck$1(top, bottom) {
        var topSide = !1, bottomSide = !1;
        return top - getBodyScrollTop$2() < ContainerTop$1() && (topSide = !0), bottom > ContainerBottom$1() && (bottomSide = !0), 
        {
            topSide: topSide,
            bottomSide: bottomSide
        };
    }
    function getTargetContainerWidth$1() {
        return targetContainer$1.getBoundingClientRect().width;
    }
    function getTargetContainerHeight$1() {
        return targetContainer$1.getBoundingClientRect().height;
    }
    function getTargetContainerLeft$1() {
        return targetContainer$1.getBoundingClientRect().left;
    }
    function getTargetContainerTop$1() {
        return targetContainer$1.getBoundingClientRect().top;
    }
    function ContainerTop$1() {
        return targetContainer$1 ? getTargetContainerTop$1() : 0;
    }
    function ContainerLeft$1() {
        return targetContainer$1 ? getTargetContainerLeft$1() : 0;
    }
    function ContainerRight$1() {
        return targetContainer$1 ? getBodyScrollLeft$2() + getTargetContainerLeft$1() + getTargetContainerWidth$1() : getBodyScrollLeft$2() + getViewPortWidth$1();
    }
    function ContainerBottom$1() {
        return targetContainer$1 ? getBodyScrollTop$2() + getTargetContainerTop$1() + getTargetContainerHeight$1() : getBodyScrollTop$2() + getViewPortHeight$1();
    }
    function getBodyScrollTop$2() {
        return parentDocument$2.documentElement.scrollTop || parentDocument$2.body.scrollTop;
    }
    function getBodyScrollLeft$2() {
        return parentDocument$2.documentElement.scrollLeft || parentDocument$2.body.scrollLeft;
    }
    function getViewPortHeight$1() {
        return window.innerHeight;
    }
    function getViewPortWidth$1() {
        return window.innerWidth;
    }
    function getZindexPartial$1(element) {
        for (var parent = element.parentElement, parentZindex = []; parent && "BODY" !== parent.tagName; ) {
            var index = document.defaultView.getComputedStyle(parent, null).getPropertyValue("z-index"), position = document.defaultView.getComputedStyle(parent, null).getPropertyValue("position");
            "auto" !== index && "static" !== position && parentZindex.push(index), parent = parent.parentElement;
        }
        for (var childrenZindex = [], i = 0; i < document.body.children.length; i++) if (!element.isEqualNode(document.body.children[i])) {
            index = document.defaultView.getComputedStyle(document.body.children[i], null).getPropertyValue("z-index"), 
            position = document.defaultView.getComputedStyle(document.body.children[i], null).getPropertyValue("position");
            "auto" !== index && "static" !== position && childrenZindex.push(index);
        }
        childrenZindex.push("999");
        var finalValue = parentZindex.concat(childrenZindex);
        return Math.max.apply(Math, finalValue) + 1;
    }
    function getModel(props, model) {
        for (var obj = extend({}, props), _i = 0, _a = Object.keys(obj); _i < _a.length; _i++) {
            var prop = _a[_i];
            model.indexOf(prop) < 0 && deleteObject(obj, prop);
        }
        return obj;
    }
    function unwireEvents$1() {
        EventHandler.remove(this.element, "keydown", maskInputKeyDownHandler$1), EventHandler.remove(this.element, "keypress", maskInputKeyPressHandler$1), 
        EventHandler.remove(this.element, "keyup", maskInputKeyUpHandler$1), EventHandler.remove(this.element, "focus", maskInputFocusHandler$1), 
        EventHandler.remove(this.element, "blur", maskInputBlurHandler$1), EventHandler.remove(this.element, "paste", maskInputPasteHandler$1), 
        EventHandler.remove(this.element, "cut", maskInputCutHandler$1);
    }
    function strippedValue$1(element) {
        var value = "", k = 0, checkMask = !1;
        if (!isNullOrUndefined(element) && !isNullOrUndefined(this) && element.value !== this.promptMask) for (var i = 0; i < this.customRegExpCollec.length; i++) checkMask && (checkMask = !1), 
        ">" !== this.customRegExpCollec[k] && "<" !== this.customRegExpCollec[k] && "|" !== this.customRegExpCollec[k] && "\\" !== this.customRegExpCollec[k] || (--i, 
        checkMask = !0), checkMask || element.value[i] === this.promptChar || isNullOrUndefined(this.customRegExpCollec[k]) || isNullOrUndefined(this.regExpCollec[this.customRegExpCollec[k]]) && !(this.customRegExpCollec[k].length > 2 && "[" === this.customRegExpCollec[k][0] && "]" === this.customRegExpCollec[k][this.customRegExpCollec[k].length - 1]) && (isNullOrUndefined(this.customCharacters) || isNullOrUndefined(this.customCharacters[this.customRegExpCollec[k]])) || "" === element.value || (value += element.value[i]), 
        ++k;
        return value;
    }
    function pushIntoRegExpCollec$1(value) {
        for (var k = 0; k < value.length; k++) this.hiddenMask += value[k], "\\" !== value[k] && this.customRegExpCollec.push(value[k]);
    }
    function maskInputFocusHandler$1(event) {
        var _this = this;
        this.promptMask.length > 0 ? this.focusEventArgs = {
            selectionStart: 0,
            selectionEnd: this.promptMask.length
        } : this.focusEventArgs = {
            selectionStart: 0,
            selectionEnd: this.element.value.length
        };
        var eventArgs = {};
        merge(eventArgs, this.focusEventArgs), this.trigger("focus", eventArgs), this.focusEventArgs = eventArgs, 
        this.mask && (this.isFocus = !0, this.placeholder && "" === this.element.value ? (setElementValue$1.call(this, this.promptMask), 
        this.element.setSelectionRange(this.focusEventArgs.selectionStart, this.focusEventArgs.selectionEnd), 
        setTimeout(function() {
            _this.element.setSelectionRange(_this.focusEventArgs.selectionStart, _this.focusEventArgs.selectionEnd);
        }, 1)) : this.element.setSelectionRange(this.focusEventArgs.selectionStart, this.focusEventArgs.selectionEnd));
    }
    function maskInputBlurHandler$1(event) {
        if (this.mask && (this.isFocus = !1, this.placeholder && this.element.value === this.promptMask && "Always" !== this.floatLabelType)) {
            setElementValue$1.call(this, "");
            var labelElement = this.element.parentNode.querySelector(".e-float-text");
            "Auto" === this.floatLabelType && !isNullOrUndefined(labelElement) && labelElement.classList.contains(TOPLABEL$1) && removeClass([ labelElement ], TOPLABEL$1);
        }
    }
    function maskInputPasteHandler$1(event) {
        var _this = this;
        if (this.mask) {
            var sIndex_1 = this.element.selectionStart, eIndex_1 = this.element.selectionEnd, oldValue_1 = this.element.value;
            setElementValue$1.call(this, ""), setTimeout(function() {
                var value = _this.element.value;
                _this.redoCollec.length > 0 && _this.redoCollec[0].value === _this.element.value && (value = strippedValue$1.call(_this, _this.element)), 
                setElementValue$1.call(_this, oldValue_1), _this.element.selectionStart = sIndex_1, 
                _this.element.selectionEnd = eIndex_1;
                var i = 0;
                _this.maskKeyPress = !0;
                do {
                    validateValue$1.call(_this, value[i], !1, null), ++i;
                } while (i < value.length);
                _this.maskKeyPress = !1;
            }, 1);
        }
    }
    function maskInputCutHandler$1(event) {
        var _this = this;
        if (this.mask) {
            var sIndex_2 = this.element.selectionStart, eIndex = this.element.selectionEnd;
            this.undoCollec.push({
                value: this.element.value,
                startIndex: this.element.selectionStart,
                endIndex: this.element.selectionEnd
            });
            var value_1 = this.element.value.substring(0, sIndex_2) + this.promptMask.substring(sIndex_2, eIndex) + this.element.value.substring(eIndex);
            setTimeout(function() {
                setElementValue$1.call(_this, value_1), _this.element.selectionStart = _this.element.selectionEnd = sIndex_2;
            }, 0);
        }
    }
    function maskInputDropHandler$1(event) {
        event.preventDefault();
    }
    function maskInputKeyDownHandler$1(event) {
        var _this = this;
        if (this.mask) {
            229 !== event.keyCode ? (!event.ctrlKey || 89 !== event.keyCode && 90 !== event.keyCode || event.preventDefault(), 
            removeMaskInputValues$1.call(this, event)) : setTimeout(function() {
                removeMaskInputValues$1.call(_this, event);
            }, 0);
            var startValue = this.element.value;
            if (event.ctrlKey && (89 === event.keyCode || 90 === event.keyCode)) {
                var collec = void 0;
                90 === event.keyCode && this.undoCollec.length > 0 && startValue !== this.undoCollec[this.undoCollec.length - 1].value ? (collec = this.undoCollec[this.undoCollec.length - 1], 
                this.redoCollec.unshift({
                    value: this.element.value,
                    startIndex: this.element.selectionStart,
                    endIndex: this.element.selectionEnd
                }), setElementValue$1.call(this, collec.value), this.element.selectionStart = collec.startIndex, 
                this.element.selectionEnd = collec.endIndex, this.undoCollec.splice(this.undoCollec.length - 1, 1)) : 89 === event.keyCode && this.redoCollec.length > 0 && startValue !== this.redoCollec[0].value && (collec = this.redoCollec[0], 
                this.undoCollec.push({
                    value: this.element.value,
                    startIndex: this.element.selectionStart,
                    endIndex: this.element.selectionEnd
                }), setElementValue$1.call(this, collec.value), this.element.selectionStart = collec.startIndex, 
                this.element.selectionEnd = collec.endIndex, this.redoCollec.splice(0, 1));
            }
        }
    }
    function removeMaskInputValues$1(event) {
        var oldEventVal, isRemove = !1, isDeleted = !1;
        this.element.value.length < this.promptMask.length && (isRemove = !0, function() {
            var collec, sIndex = this.element.selectionStart, eIndex = this.element.selectionEnd;
            this.redoCollec.length > 0 ? (collec = this.redoCollec[0], setElementValue$1.call(this, collec.value), 
            collec.startIndex - sIndex == 1 ? (this.element.selectionStart = collec.startIndex, 
            this.element.selectionEnd = collec.endIndex) : (this.element.selectionStart = sIndex + 1, 
            this.element.selectionEnd = eIndex + 1)) : (setElementValue$1.call(this, this.promptMask), 
            this.element.selectionStart = this.element.selectionEnd = sIndex);
        }.call(this), oldEventVal = this.element.value);
        var initStartIndex = this.element.selectionStart, initEndIndex = this.element.selectionEnd, startIndex = this.element.selectionStart, endIndex = this.element.selectionEnd, maskValue = this.hiddenMask.replace(/[>|\\<]/g, ""), curMask = maskValue[startIndex - 1];
        this.element.parentNode;
        if (isRemove || 8 === event.keyCode || 46 === event.keyCode) {
            this.undoCollec.push({
                value: this.element.value,
                startIndex: this.element.selectionStart,
                endIndex: endIndex
            });
            var multipleDel = !1;
            if (startIndex > 0 || (8 === event.keyCode || 46 === event.keyCode) && startIndex < this.element.value.length && this.element.selectionEnd - startIndex !== this.element.value.length) {
                var index = startIndex;
                startIndex !== endIndex ? (startIndex = endIndex, 46 === event.keyCode && (multipleDel = !0)) : 46 === event.keyCode ? ++index : --index;
                for (var k = startIndex; 8 === event.keyCode || isRemove || multipleDel ? k > index : k < index; 8 === event.keyCode || isRemove || multipleDel ? k-- : k++) for (var i = startIndex; 8 === event.keyCode || isRemove || multipleDel ? i > 0 : i < this.element.value.length; 8 === event.keyCode || isRemove || multipleDel ? i-- : i++) {
                    var sIndex = void 0;
                    (8 === event.keyCode || multipleDel) && (initStartIndex !== initEndIndex && initStartIndex !== startIndex || initStartIndex === initEndIndex) || isRemove ? (curMask = maskValue[i - 1], 
                    sIndex = startIndex - 1) : (curMask = maskValue[i], sIndex = startIndex, ++startIndex);
                    var oldValue = this.element.value[sIndex];
                    if (isNullOrUndefined(this.regExpCollec[curMask]) && !isNullOrUndefined(this.customCharacters) && isNullOrUndefined(this.customCharacters[curMask]) && this.hiddenMask[sIndex] !== this.promptChar && "[" !== this.customRegExpCollec[sIndex][0] && "]" !== this.customRegExpCollec[sIndex][this.customRegExpCollec[sIndex].length - 1] || this.promptMask[sIndex] !== this.promptChar && isNullOrUndefined(this.customCharacters)) this.element.selectionStart = this.element.selectionEnd = sIndex, 
                    event.preventDefault(), 46 !== event.keyCode || multipleDel || ++this.element.selectionStart; else {
                        var value = this.element.value, prompt_1 = this.promptChar, elementValue = value.substring(0, sIndex) + prompt_1 + value.substring(startIndex, value.length);
                        setElementValue$1.call(this, elementValue), event.preventDefault(), this.element.selectionStart = this.element.selectionEnd = sIndex, 
                        isDeleted = !0;
                    }
                    if (startIndex = this.element.selectionStart, !isDeleted && 8 === event.keyCode || multipleDel || !isDeleted && 46 !== event.keyCode ? sIndex = startIndex - 1 : (sIndex = startIndex, 
                    isDeleted = !1), oldValue = this.element.value[sIndex], initStartIndex !== initEndIndex && this.element.selectionStart === initStartIndex || this.promptMask[sIndex] === this.promptChar || oldValue !== this.promptMask[sIndex] && this.promptMask[sIndex] !== this.promptChar && !isNullOrUndefined(this.customCharacters)) break;
                }
            }
            0 === this.element.selectionStart && this.element.selectionEnd === this.element.value.length && (setElementValue$1.call(this, this.promptMask), 
            event.preventDefault(), this.element.selectionStart = this.element.selectionEnd = startIndex), 
            this.redoCollec.unshift({
                value: this.element.value,
                startIndex: this.element.selectionStart,
                endIndex: this.element.selectionEnd
            }), triggerMaskChangeEvent$1.call(this, event, oldEventVal);
        }
    }
    function maskInputKeyPressHandler$1(event) {
        if (this.mask) {
            var oldValue = this.element.value;
            if (!event.ctrlKey || event.ctrlKey && "KeyA" !== event.code && "KeyY" !== event.code && "KeyZ" !== event.code && "KeyX" !== event.code && "KeyC" !== event.code && "KeyV" !== event.code) {
                this.maskKeyPress = !0;
                var key = event.key;
                "Spacebar" === key && (key = String.fromCharCode(event.keyCode)), key ? key && 1 === key.length && (validateValue$1.call(this, key, event.ctrlKey, event), 
                event.preventDefault()) : (this.isIosInvalid = !0, validateValue$1.call(this, String.fromCharCode(event.keyCode), event.ctrlKey, event), 
                event.preventDefault(), this.isIosInvalid = !1);
            }
            triggerMaskChangeEvent$1.call(this, event, oldValue);
        }
    }
    function triggerMaskChangeEvent$1(event, oldValue) {
        if (!isNullOrUndefined(this.changeEventArgs)) {
            var eventArgs = {};
            this.changeEventArgs = {
                value: this.element.value,
                maskedValue: this.element.value,
                isInteraction: !1
            }, this.mask && (this.changeEventArgs.value = strippedValue$1.call(this, this.element)), 
            isNullOrUndefined(event) || (this.changeEventArgs.isInteraction = !0, this.changeEventArgs.event = event), 
            merge(eventArgs, this.changeEventArgs), this.trigger("change", eventArgs);
        }
        attributes(this.element, {
            "aria-valuenow": this.element.value
        });
    }
    function maskInputKeyUpHandler$1(event) {
        if (this.mask) {
            var collec = void 0;
            if (this.maskKeyPress || 229 !== event.keyCode) removeMaskError$1.call(this); else {
                var oldEventVal = void 0;
                if (1 === this.element.value.length && (this.element.value = this.element.value + this.promptMask, 
                this.element.setSelectionRange(1, 1)), this.element.value.length > this.promptMask.length) {
                    var startIndex = this.element.selectionStart, addedValues = this.element.value.length - this.promptMask.length, val_1 = this.element.value.substring(startIndex - addedValues, startIndex);
                    if (this.undoCollec.length > 0) {
                        collec = this.undoCollec[this.undoCollec.length - 1];
                        var startIndex_1 = this.element.selectionStart;
                        oldEventVal = collec.value;
                        var oldVal = collec.value.substring(startIndex_1 - addedValues, startIndex_1);
                        collec = this.redoCollec[0], val_1 = val_1.trim();
                        var isSpace = Browser.isAndroid && "" === val_1;
                        isSpace || oldVal === val_1 || collec.value.substring(startIndex_1 - addedValues, startIndex_1) === val_1 ? isSpace && preventUnsupportedValues$1.call(this, event, startIndex_1 - 1, this.element.selectionEnd - 1, val_1, event.ctrlKey, !1) : validateValue$1.call(this, val_1, event.ctrlKey, event);
                    } else oldEventVal = this.promptMask, validateValue$1.call(this, val_1, event.ctrlKey, event);
                    this.maskKeyPress = !1, triggerMaskChangeEvent$1.call(this, event, oldEventVal);
                }
            }
            var val = strippedValue$1.call(this, this.element);
            (0 !== this.element.selectionStart || this.promptMask !== this.element.value || "" !== val || "" === val && this.value !== val) && (this.prevValue = val, 
            this.value = val);
        } else triggerMaskChangeEvent$1.call(this, event), this.value = this.element.value;
    }
    function validateValue$1(key, isCtrlKey, event) {
        this.maskKeyPress || function(key) {
            if (key.length > 1 && this.promptMask.length + key.length < this.element.value.length) {
                var elementValue = this.redoCollec[0].value.substring(0, this.redoCollec[0].startIndex) + key + this.redoCollec[0].value.substring(this.redoCollec[0].startIndex, this.redoCollec[0].value.length);
                setElementValue$1.call(this, elementValue), this.element.selectionStart = this.element.selectionEnd = this.redoCollec[0].startIndex + key.length;
            }
            this.element.selectionStart = this.element.selectionStart - key.length, this.element.selectionEnd = this.element.selectionEnd - key.length;
        }.call(this, key);
        for (var curMask, eventOldVal, startIndex = this.element.selectionStart, initStartIndex = startIndex, allowText = (this.element.selectionEnd, 
        !1), value = this.element.value, prevSupport = !1, isEqualVal = !1, k = 0; k < key.length; k++) {
            var keyValue = key[k];
            if (startIndex = this.element.selectionStart, this.element.selectionEnd, this.maskKeyPress || initStartIndex !== startIndex || (startIndex += k), 
            !this.maskKeyPress || startIndex < this.promptMask.length) {
                for (var i = startIndex; i < this.promptMask.length; i++) {
                    curMask = this.escapeMaskValue[startIndex], "\\" === this.hiddenMask[startIndex] && this.hiddenMask[startIndex + 1] === key && (isEqualVal = !0), 
                    (isNullOrUndefined(this.regExpCollec[curMask]) && (isNullOrUndefined(this.customCharacters) || !isNullOrUndefined(this.customCharacters) && isNullOrUndefined(this.customCharacters[curMask])) && this.hiddenMask[startIndex] !== this.promptChar && "[" !== this.customRegExpCollec[startIndex][0] && "]" !== this.customRegExpCollec[startIndex][this.customRegExpCollec[startIndex].length - 1] || this.promptMask[startIndex] !== this.promptChar && isNullOrUndefined(this.customCharacters) || this.promptChar === curMask && this.escapeMaskValue === this.mask) && (this.element.selectionStart = this.element.selectionEnd = startIndex + 1, 
                    startIndex = this.element.selectionStart, curMask = this.hiddenMask[startIndex]);
                }
                if (isNullOrUndefined(this.customCharacters) || isNullOrUndefined(this.customCharacters[curMask])) !isNullOrUndefined(this.regExpCollec[curMask]) && keyValue.match(new RegExp(this.regExpCollec[curMask])) && this.promptMask[startIndex] === this.promptChar ? allowText = !0 : this.promptMask[startIndex] === this.promptChar && "[" === this.customRegExpCollec[startIndex][0] && "]" === this.customRegExpCollec[startIndex][this.customRegExpCollec[startIndex].length - 1] && keyValue.match(new RegExp(this.customRegExpCollec[startIndex])) && (allowText = !0); else {
                    var customValArr = this.customCharacters[curMask].split(",");
                    for (i = 0; i < customValArr.length; i++) if (keyValue.match(new RegExp("[" + customValArr[i] + "]"))) {
                        allowText = !0;
                        break;
                    }
                }
                if ((!this.maskKeyPress || startIndex < this.hiddenMask.length) && allowText) {
                    if (0 === k) if (this.maskKeyPress) this.undoCollec.push({
                        value: value,
                        startIndex: startIndex,
                        endIndex: startIndex
                    }); else {
                        var sIndex = this.element.selectionStart, eIndex = this.element.selectionEnd;
                        this.redoCollec.length > 0 ? (eventOldVal = this.redoCollec[0].value, setElementValue$1.call(this, eventOldVal), 
                        this.undoCollec.push(this.redoCollec[0])) : (this.undoCollec.push({
                            value: this.promptMask,
                            startIndex: startIndex,
                            endIndex: startIndex
                        }), eventOldVal = this.promptMask, setElementValue$1.call(this, eventOldVal)), this.element.selectionStart = sIndex, 
                        this.element.selectionEnd = eIndex;
                    }
                    startIndex = this.element.selectionStart, function(event, startIndex, keyValue, eventOldVal, isEqualVal) {
                        this.hiddenMask.length > this.promptMask.length && (keyValue = function(key, value) {
                            var promptMask, i, curVal = value, caseCount = 0;
                            for (i = 0; i < this.hiddenMask.length; i++) if ("\\" === this.hiddenMask[i] && (promptMask = curVal.substring(0, i) + "\\" + curVal.substring(i, curVal.length)), 
                            ">" !== this.hiddenMask[i] && "<" !== this.hiddenMask[i] && "|" !== this.hiddenMask[i] || (this.hiddenMask[i] !== curVal[i] && (promptMask = curVal.substring(0, i) + this.hiddenMask[i] + curVal.substring(i, curVal.length)), 
                            ++caseCount), promptMask) {
                                if (promptMask[i] === this.promptChar && i > this.element.selectionStart || this.element.value.indexOf(this.promptChar) < 0 && this.element.selectionStart + caseCount === i) {
                                    caseCount = 0;
                                    break;
                                }
                                curVal = promptMask;
                            }
                            for (;i >= 0 && promptMask; ) {
                                if (0 === i || "\\" !== promptMask[i - 1]) {
                                    this.element.value;
                                    if (">" === promptMask[i]) {
                                        key = key.toUpperCase();
                                        break;
                                    }
                                    if ("<" === promptMask[i]) {
                                        key = key.toLowerCase();
                                        break;
                                    }
                                    if ("|" === promptMask[i]) break;
                                }
                                --i;
                            }
                            return key;
                        }.call(this, keyValue, this.element.value));
                        if (!isEqualVal) {
                            var value = this.element.value, elementValue = value.substring(0, startIndex) + keyValue + value.substring(startIndex + 1, value.length);
                            setElementValue$1.call(this, elementValue), this.element.selectionStart = this.element.selectionEnd = startIndex + 1;
                        }
                        triggerMaskChangeEvent$1.call(this, event, eventOldVal);
                    }.call(this, event, startIndex, keyValue, eventOldVal, isEqualVal), prevSupport = !0, 
                    k === key.length - 1 && this.redoCollec.unshift({
                        value: this.element.value,
                        startIndex: this.element.selectionStart,
                        endIndex: this.element.selectionEnd
                    }), allowText = !1;
                } else startIndex = this.element.selectionStart, preventUnsupportedValues$1.call(this, event, startIndex, initStartIndex, key, isCtrlKey, prevSupport);
                k !== key.length - 1 || allowText || (!Browser.isAndroid || Browser.isAndroid && startIndex < this.promptMask.length) && this.redoCollec.unshift({
                    value: this.element.value,
                    startIndex: this.element.selectionStart,
                    endIndex: this.element.selectionEnd
                });
            } else 1 !== key.length || isCtrlKey || isNullOrUndefined(event) || addMaskErrorClass$1.call(this);
        }
    }
    function preventUnsupportedValues$1(event, sIdx, idx, key, ctrl, chkSupport) {
        if (!this.maskKeyPress) {
            var eventOldVal = void 0, value = this.element.value;
            sIdx >= this.promptMask.length ? setElementValue$1.call(this, value.substring(0, sIdx)) : (idx === sIdx ? setElementValue$1.call(this, value.substring(0, sIdx) + value.substring(sIdx + 1, value.length)) : this.promptMask.length === this.element.value.length ? setElementValue$1.call(this, value.substring(0, sIdx) + value.substring(sIdx, value.length)) : setElementValue$1.call(this, value.substring(0, idx) + value.substring(idx + 1, value.length)), 
            this.element.selectionStart = this.element.selectionEnd = chkSupport || this.element.value[idx] !== this.promptChar ? sIdx : idx), 
            eventOldVal = this.element.value, triggerMaskChangeEvent$1.call(this, event, eventOldVal), 
            addMaskErrorClass$1.call(this);
        }
        1 !== key.length || ctrl || isNullOrUndefined(event) || addMaskErrorClass$1.call(this);
    }
    function addMaskErrorClass$1() {
        var _this = this, parentElement = this.element.parentNode, timer = 200;
        parentElement.classList.contains(INPUTGROUP$1) || parentElement.classList.contains(FLOATINPUT$1) ? addClass([ parentElement ], ERROR$5) : addClass([ this.element ], ERROR$5), 
        !0 === this.isIosInvalid && (timer = 400), attributes(this.element, {
            "aria-invalid": "true"
        }), setTimeout(function() {
            _this.maskKeyPress || removeMaskError$1.call(_this);
        }, timer);
    }
    function removeMaskError$1() {
        removeClass([ this.element.parentNode ], ERROR$5), removeClass([ this.element ], ERROR$5), 
        attributes(this.element, {
            "aria-invalid": "false"
        });
    }
    function setMaskValue$1(val) {
        if (this.mask && !isNullOrUndefined(val) && ("" === val || this.prevValue !== val)) {
            this.maskKeyPress = !0, setElementValue$1.call(this, this.promptMask), "" !== val && (this.element.selectionStart = 0, 
            this.element.selectionEnd = 0);
            for (var i = 0; i < val.length; i++) validateValue$1.call(this, val[i], !1, null);
            this.value = strippedValue$1.call(this, this.element), this.maskKeyPress = !1;
            var labelElement = this.element.parentNode.querySelector(".e-float-text");
            this.element.value !== this.promptMask || "Auto" !== this.floatLabelType || isNullOrUndefined(labelElement) || !labelElement.classList.contains(TOPLABEL$1) || this.isFocus || (removeClass([ labelElement ], TOPLABEL$1), 
            addClass([ labelElement ], BOTTOMLABEL$1), setElementValue$1.call(this, ""));
        }
    }
    function setElementValue$1(val, element) {
        !this.isFocus && "Auto" === this.floatLabelType && isNullOrUndefined(this.value) && (val = ""), 
        Input$1.setValue(val, element || this.element, this.floatLabelType);
    }
    function valueAccessor(field, data, column) {
        return field = isNullOrUndefined(field) ? "" : field, getValue(field, data);
    }
    function iterateArrayOrObject(collection, predicate) {
        for (var result = [], i = 0, len = collection.length; i < len; i++) {
            var pred = predicate(collection[i], i);
            isNullOrUndefined(pred) || result.push(pred);
        }
        return result;
    }
    function templateCompiler(template) {
        if (template) try {
            if (document.querySelectorAll(template).length) return compile$$1(document.querySelector(template).innerHTML.trim());
        } catch (e) {
            return compile$$1(template);
        }
    }
    function setStyleAndAttributes(node, customAttributes) {
        var copyAttr = {}, literals = [ "style", "class" ];
        extend(copyAttr, customAttributes, {}), "style" in copyAttr && (setStyleAttribute(node, copyAttr[literals[0]]), 
        delete copyAttr[literals[0]]), "class" in copyAttr && (addClass([ node ], copyAttr[literals[1]]), 
        delete copyAttr[literals[1]]), attributes(node, copyAttr);
    }
    function prepareColumns(columns, autoWidth) {
        for (var c = 0, len = columns.length; c < len; c++) {
            var column = void 0;
            "string" == typeof columns[c] ? column = new Column({
                field: columns[c]
            }) : columns[c] instanceof Column ? column = columns[c] : columns[c].columns ? (column = new Column(columns[c]), 
            columns[c].columns = prepareColumns(columns[c].columns)) : column = new Column(columns[c]), 
            column.headerText = isNullOrUndefined(column.headerText) ? column.foreignKeyValue || column.field || "" : column.headerText, 
            column.foreignKeyField = column.foreignKeyField || column.field, column.valueAccessor = column.valueAccessor || valueAccessor, 
            column.width = autoWidth && isNullOrUndefined(column.width) ? 200 : column.width, 
            isNullOrUndefined(column.visible) && (column.visible = !0), columns[c] = column;
        }
        return columns;
    }
    function setCssInGridPopUp(popUp, e, className) {
        var isBottomTail, popUpSpan = popUp.querySelector("span"), position = popUp.parentElement.getBoundingClientRect(), targetPosition = e.target.getBoundingClientRect();
        popUpSpan.className = className, popUp.style.display = "", isBottomTail = (isNullOrUndefined(e.clientY) ? e.changedTouches[0].clientY : e.clientY) > popUp.offsetHeight + 10, 
        popUp.style.top = targetPosition.top - position.top + (isBottomTail ? -(popUp.offsetHeight + 10) : popUp.offsetHeight + 10) + "px", 
        popUp.style.left = function(popup, e, targetPosition, left) {
            var width = popup.offsetWidth / 2, x = getPosition(e).x;
            return x - targetPosition.left < width ? targetPosition.left - left : targetPosition.right - x < width ? targetPosition.right - left - 2 * width : x - left - width;
        }(popUp, e, targetPosition, position.left) + "px", isBottomTail ? (popUp.querySelector(".e-downtail").style.display = "", 
        popUp.querySelector(".e-uptail").style.display = "none") : (popUp.querySelector(".e-downtail").style.display = "none", 
        popUp.querySelector(".e-uptail").style.display = "");
    }
    function getActualProperties(obj) {
        return obj instanceof ChildProperty ? getValue("properties", obj) : obj;
    }
    function parentsUntil(elem, selector, isID) {
        for (var parent = elem; parent && (isID ? parent.id !== selector : !parent.classList.contains(selector)); ) parent = parent.parentElement;
        return parent;
    }
    function getElementIndex(element, elements) {
        for (var index = -1, i = 0, len = elements.length; i < len; i++) if (elements[i].isEqualNode(element)) {
            index = i;
            break;
        }
        return index;
    }
    function inArray(value, collection) {
        for (var i = 0, len = collection.length; i < len; i++) if (collection[i] === value) return i;
        return -1;
    }
    function getActualPropFromColl(collection) {
        for (var coll = [], i = 0, len = collection.length; i < len; i++) collection[i].hasOwnProperty("properties") ? coll.push(collection[i].properties) : coll.push(collection[i]);
        return coll;
    }
    function removeElement(target, selector) {
        for (var elements = [].slice.call(target.querySelectorAll(selector)), i = 0; i < elements.length; i++) remove(elements[i]);
    }
    function getPosition(e) {
        var position = {};
        return position.x = isNullOrUndefined(e.clientX) ? e.changedTouches[0].clientX : e.clientX, 
        position.y = isNullOrUndefined(e.clientY) ? e.changedTouches[0].clientY : e.clientY, 
        position;
    }
    function getUid(prefix) {
        return prefix + uid$1++;
    }
    function appendChildren(elem, children) {
        for (var i = 0, len = children.length; i < len; i++) len === children.length ? elem.appendChild(children[i]) : elem.appendChild(children[0]);
        return elem;
    }
    function calculateAggregate(type, data, column, context) {
        return "Custom" === type ? column.customAggregate ? column.customAggregate.call(context, data, column) : "" : DataUtil.aggregates[type.toLowerCase()](data, column.field);
    }
    function getScrollBarWidth() {
        if (null !== scrollWidth) return scrollWidth;
        var divNode = document.createElement("div"), value = 0;
        return divNode.style.cssText = "width:100px;height: 100px;overflow: scroll;position: absolute;top: -9999px;", 
        document.body.appendChild(divNode), value = divNode.offsetWidth - divNode.clientWidth | 0, 
        document.body.removeChild(divNode), scrollWidth = value;
    }
    function getRowHeight(element) {
        if (void 0 !== rowHeight) return rowHeight;
        var table = createElement("table", {
            className: "e-table",
            styles: "visibility: hidden"
        });
        table.innerHTML = '<tr><td class="e-rowcell">A<td></tr>', element.appendChild(table);
        var rect = table.querySelector("td").getBoundingClientRect();
        return element.removeChild(table), rowHeight = Math.ceil(rect.height);
    }
    function isEditable(col, type, elem) {
        var row = parentsUntil(elem, "e-row"), isOldRow = !row || row && !row.classList.contains("e-insertedrow");
        return "beginEdit" === type && isOldRow ? !(col.isIdentity || col.isPrimaryKey || !col.allowEditing) : ("add" !== type || !col.isIdentity || !col.isPrimaryKey) && !(isOldRow && !col.allowEditing && !col.isIdentity && !col.isPrimaryKey);
    }
    function isActionPrevent(inst) {
        var dlg = inst.element.querySelector("#" + inst.element.id + "EditConfirm");
        return "Batch" === inst.editSettings.mode && inst.element.querySelectorAll(".e-updatedtd").length && inst.editSettings.showConfirmDialog && (!dlg || dlg.classList.contains("e-popup-close"));
    }
    function wrap(elem, action) {
        elem = elem instanceof Array ? elem : [ elem ];
        for (var i = 0; i < elem.length; i++) action ? elem[i].classList.add("e-wrap") : elem[i].classList.remove("e-wrap");
    }
    function changeButtonType(target) {
        for (var _i = 0, elements_1 = [].slice.call(target.querySelectorAll("button")); _i < elements_1.length; _i++) {
            attributes(elements_1[_i], {
                type: "button"
            });
        }
    }
    function setFormatter(serviceLocator, column) {
        var fmtr = serviceLocator.getService("valueFormatter");
        switch (column.type) {
          case "date":
            column.setFormatter(fmtr.getFormatFunction({
                type: "date",
                skeleton: column.format
            })), column.setParser(fmtr.getParserFunction({
                type: "date",
                skeleton: column.format
            }));
            break;

          case "datetime":
            column.setFormatter(fmtr.getFormatFunction({
                type: "dateTime",
                skeleton: column.format
            })), column.setParser(fmtr.getParserFunction({
                type: "dateTime",
                skeleton: column.format
            }));
            break;

          case "number":
            column.setFormatter(fmtr.getFormatFunction({
                format: column.format
            })), column.setParser(fmtr.getParserFunction({
                format: column.format
            }));
        }
    }
    function addRemoveActiveClasses(cells, add) {
        for (var args = [], _i = 2; _i < arguments.length; _i++) args[_i - 2] = arguments[_i];
        for (var i = 0, len = cells.length; i < len; i++) add ? (classList(cells[i], args.slice(), []), 
        cells[i].setAttribute("aria-selected", "true")) : (classList(cells[i], [], args.slice()), 
        cells[i].removeAttribute("aria-selected"));
    }
    function getFilterMenuPostion(target, dialogObj, grid) {
        var elementVisible = dialogObj.element.style.display;
        dialogObj.element.style.display = "block";
        var newpos, dlgWidth = dialogObj.width;
        if (grid.enableRtl) {
            newpos = calculatePosition(target, "left", "bottom"), dialogObj.element.style.top = newpos.top + target.getBoundingClientRect().height - 35 + "px", 
            dialogObj.element.style.display = elementVisible;
            leftPos = newpos.left - dlgWidth + target.clientWidth;
            dialogObj.element.style.left = leftPos < 1 ? dlgWidth + leftPos + -16 + "px" : leftPos - 16 + "px";
        } else {
            newpos = calculateRelativeBasedPosition(target, dialogObj.element), dialogObj.element.style.display = elementVisible, 
            dialogObj.element.style.top = newpos.top + target.getBoundingClientRect().height - 5 + "px";
            var leftPos = newpos.left - dlgWidth + target.clientWidth;
            dialogObj.element.style.left = leftPos < 1 ? dlgWidth + leftPos - 16 + "px" : leftPos + -4 + "px";
        }
    }
    function getZIndexCalcualtion(args, dialogObj) {
        args.popup.element.style.zIndex = (dialogObj.zIndex + 1).toString();
    }
    function toogleCheckbox(elem) {
        var span = elem.querySelector(".e-frame");
        span.classList.contains("e-check") ? classList(span, [ "e-uncheck" ], [ "e-check" ]) : classList(span, [ "e-check" ], [ "e-uncheck" ]);
    }
    function createCboxWithWrap(uid, elem, className) {
        var div = createElement("div", {
            className: className
        });
        return div.appendChild(elem), div.setAttribute("uid", uid), div;
    }
    function removeAddCboxClasses(elem, checked) {
        removeClass([ elem ], [ "e-check", "e-stop", "e-uncheck" ]), checked ? elem.classList.add("e-check") : elem.classList.add("e-uncheck");
    }
    function refreshForeignData(row, columns, data) {
        columns.forEach(function(col) {
            setValue(col.field, getForeignData(col, data), row.foreignKeyData);
        }), row.cells.forEach(function(cell) {
            cell.isForeignKey && setValue("foreignKeyData", getValue(cell.column.field, row.foreignKeyData), cell);
        });
    }
    function getForeignData(column, data, lValue, foreignKeyData) {
        var fField = column.foreignKeyField, key = lValue || valueAccessor(column.field, data) || "", query = new Query(), fdata = foreignKeyData || column.dataSource instanceof DataManager && column.dataSource.dataSource.offline ? column.dataSource.dataSource.json : column.columnData;
        return key.getDay ? query.where(getDatePredicate({
            field: fField,
            operator: "equal",
            value: key,
            matchCase: !1
        })) : query.where(fField, "==", key, !1), new DataManager(fdata).executeLocal(query);
    }
    function getColumnByForeignKeyValue(foreignKeyValue, columns) {
        var column;
        return columns.some(function(col) {
            return column = col, col.foreignKeyValue === foreignKeyValue;
        }) && column;
    }
    function getDatePredicate(filterObject) {
        var datePredicate, prevDate, nextDate, prevObj = extend({}, getActualProperties(filterObject)), nextObj = extend({}, getActualProperties(filterObject)), value = new Date(filterObject.value);
        if ("equal" === filterObject.operator || "notequal" === filterObject.operator) {
            prevDate = new Date(value.setHours(0) - 1), nextDate = new Date(value.setHours(24)), 
            prevObj.value = prevDate, nextObj.value = nextDate, "equal" === filterObject.operator ? (prevObj.operator = "greaterthan", 
            nextObj.operator = "lessthan") : "notequal" === filterObject.operator && (prevObj.operator = "lessthanorequal", 
            nextObj.operator = "greaterthanorequal");
            var predicateSt = new Predicate(prevObj.field, prevObj.operator, prevObj.value, !1), predicateEnd = new Predicate(nextObj.field, nextObj.operator, nextObj.value, !1);
            datePredicate = "equal" === filterObject.operator ? predicateSt.and(predicateEnd) : predicateSt.or(predicateEnd);
        } else {
            "string" == typeof prevObj.value && (prevObj.value = new Date(prevObj.value));
            datePredicate = new Predicate(prevObj.field, prevObj.operator, prevObj.value, !1);
        }
        return filterObject.ejpredicate = datePredicate, datePredicate;
    }
    function renderMovable(ele, frzCols) {
        for (var mEle = ele.cloneNode(!0), i = 0; i < frzCols; i++) mEle.removeChild(mEle.children[0]);
        i = frzCols;
        for (var len = ele.childElementCount; i < len; i++) ele.removeChild(ele.children[ele.childElementCount - 1]);
        return mEle;
    }
    function Search$1(inputVal, items, searchType, ignoreCase) {
        var listItems = items;
        ignoreCase = void 0 === ignoreCase || null === ignoreCase || ignoreCase;
        var itemData = {
            item: null,
            index: null
        };
        if (inputVal.length) {
            for (var strLength = inputVal.length, queryStr = ignoreCase ? inputVal.toLocaleLowerCase() : inputVal, i = 0, itemsData = listItems; i < itemsData.length; i++) {
                var item = itemsData[i], text = (ignoreCase ? item.textContent.toLocaleLowerCase() : item.textContent).replace(/^\s+|\s+$/g, "");
                if ("Equal" === searchType && text === queryStr || "StartsWith" === searchType && text.substr(0, strLength) === queryStr) return itemData.item = item, 
                itemData.index = i, {
                    item: item,
                    index: i
                };
            }
            return itemData;
        }
        return itemData;
    }
    function highlightSearch$1(content, query, ignoreCase, type) {
        if (function(content) {
            for (var contentElement = content.querySelectorAll(".e-highlight"), i = contentElement.length - 1; i >= 0; i--) {
                var parent_1 = contentElement[i].parentNode, text = document.createTextNode(contentElement[i].textContent);
                parent_1.replaceChild(text, contentElement[i]);
            }
        }(content), "" !== query) {
            var ignoreRegex = ignoreCase ? "gim" : "gm";
            query = /^[a-zA-Z0-9- ]*$/.test(query) ? query : query.replace(/[\-\[\]\/\{\}\(\)\*\+\?\.\\\^\$\|]/g, "\\$&");
            for (var replaceQuery = "StartsWith" === type ? "^(" + query + ")" : "EndsWith" === type ? "(" + query + ")$" : "(" + query + ")", pattern = new RegExp(replaceQuery, ignoreRegex), li = content.querySelectorAll("ul li"), i = 0; i < li.length; i++) {
                var element = li[i];
                element.innerHTML = element.innerHTML.replace(pattern, '<span class="e-highlight">$1</span>');
            }
        }
    }
    function getWeekFirstDate(date1, firstDayOfWeek) {
        var date = new Date(date1.getTime());
        return firstDayOfWeek = (firstDayOfWeek - date.getDay() - 7) % 7, new Date(date.setDate(date.getDate() + firstDayOfWeek));
    }
    function setTime(date, time) {
        var tzOffsetBefore = date.getTimezoneOffset(), d = new Date(date.getTime() + time), tzOffsetDiff = d.getTimezoneOffset() - tzOffsetBefore;
        return date.setTime(d.getTime() + tzOffsetDiff * MS_PER_DAY), date;
    }
    function resetTime(date) {
        return date.setHours(0, 0, 0, 0), date;
    }
    function getDateInMs(date) {
        return date.getTime() - new Date(date.getFullYear(), date.getMonth(), date.getDate(), 0, 0, 0).getTime();
    }
    function addDays(date, i) {
        return date = new Date("" + date), new Date(date.setDate(date.getDate() + i));
    }
    function addMonths(date, i) {
        var day = (date = new Date("" + date)).getDate();
        return date.setDate(1), date.setMonth(date.getMonth() + i), date.setDate(Math.min(day, function(d) {
            return new Date(d.getFullYear(), d.getMonth() + 1, 0).getDate();
        }(date))), date;
    }
    function getStartEndHours(date, startHour, endHour) {
        var date1 = new Date(date.getTime());
        date1.setHours(startHour.getHours()), date1.setMinutes(startHour.getMinutes()), 
        date1.setSeconds(startHour.getSeconds());
        var date2 = new Date(date.getTime());
        return 0 === endHour.getHours() ? date2 = addDays(date2, 1) : (date2.setHours(endHour.getHours()), 
        date2.setMinutes(endHour.getMinutes()), date2.setSeconds(endHour.getSeconds())), 
        {
            startHour: date1,
            endHour: date2
        };
    }
    function getDaysCount(startDate, endDate) {
        var strTime = resetTime(new Date(startDate));
        return (resetTime(new Date(endDate)).getTime() - strTime.getTime()) / MS_PER_DAY;
    }
    function getScrollBarWidth$1() {
        if (null !== scrollWidth$1) return scrollWidth$1;
        var divNode = document.createElement("div"), value = 0;
        return divNode.style.cssText = "width:100px;height: 100px;overflow: scroll;position: absolute;top: -9999px;", 
        document.body.appendChild(divNode), value = divNode.offsetWidth - divNode.clientWidth | 0, 
        document.body.removeChild(divNode), scrollWidth$1 = value;
    }
    function getMonthSummary(ruleObject, cldrObj, localeObj) {
        var summary = "";
        if (ruleObject.monthDay.length) summary += ruleObject.monthDay[0]; else if (ruleObject.day) {
            var pos = ruleObject.setPosition - 1;
            summary += localeObj.getConstant(WEEKPOS[pos > -1 ? pos : WEEKPOS.length - 1]) + " " + getValue(DAYINDEXOBJECT[ruleObject.day[0]], cldrObj);
        }
        return summary;
    }
    function generate(startDate, rule, excludeDate, startDayOfWeek, maximumCount, viewDate) {
        void 0 === maximumCount && (maximumCount = MAXOCCURRENCE), void 0 === viewDate && (viewDate = null);
        var cacheDate, ruleObject = extractObjectFromRule(rule), data = [], modifiedDate = new Date(startDate.getTime());
        if (viewDate && viewDate > startDate && !ruleObject.count ? (tempViewDate = new Date(viewDate.getTime())).setHours(startDate.getHours(), startDate.getMinutes(), startDate.getSeconds()) : tempViewDate = null, 
        !ruleObject.until && tempViewDate && ((cacheDate = new Date(tempViewDate.getTime())).setDate(tempViewDate.getDate() + 42 * ruleObject.interval), 
        ruleObject.until = cacheDate), ruleObject.until && startDate > ruleObject.until) return data;
        maxOccurrence = maximumCount, function(day) {
            for (;dayIndex[0] !== day; ) rotate(dayIndex);
        }(DAYINDEX[startDayOfWeek]), tempExcludeDate = [];
        switch ((isNullOrUndefined(excludeDate) ? [] : excludeDate.split(",")).forEach(function(content) {
            var parsedDate = getDateFromRecurrenceDateString(content);
            tempExcludeDate.push(new Date(parsedDate.getTime()).setHours(0, 0, 0, 0));
        }), ruleObject.freq) {
          case "DAILY":
            !function(startDate, endDate, data, ruleObject) {
                var tempDate = new Date(startDate.getTime()), interval = ruleObject.interval, expectedCount = ruleObject.count ? ruleObject.count : maxOccurrence;
                for (;compareDates(tempDate, endDate) && (!0, !(validateRules(tempDate, ruleObject) && (excludeDateHandler(data, tempDate.getTime()), 
                expectedCount && data.length + tempExcludeDate.length >= expectedCount))); ) tempDate.setDate(tempDate.getDate() + interval);
            }(modifiedDate, ruleObject.until, data, ruleObject);
            break;

          case "WEEKLY":
            !function(startDate, endDate, data, ruleObject) {
                var tempDate = getStartDateForWeek(startDate, ruleObject.day), interval = ruleObject.interval, expectedDays = ruleObject.day, expectedCount = ruleObject.count ? ruleObject.count : maxOccurrence, dayCycleData = processWeekDays(expectedDays);
                for (;compareDates(tempDate, endDate) && (!0, !(validateRules(tempDate, ruleObject) && (excludeDateHandler(data, tempDate.getTime()), 
                expectedCount && data.length + tempExcludeDate.length >= expectedCount))); ) expectedDays.length > 1 ? tempDate.setDate(tempDate.getDate() + dayCycleData[DAYINDEX[tempDate.getDay()]] + (expectedDays.indexOf(DAYINDEX[tempDate.getDay()]) === expectedDays.length - 1 ? 7 * (interval - 1) : 0)) : tempDate.setDate(tempDate.getDate() + 7 * interval);
            }(modifiedDate, ruleObject.until, data, ruleObject);
            break;

          case "MONTHLY":
            monthlyType(modifiedDate, ruleObject.until, data, ruleObject);
            break;

          case "YEARLY":
            !function(startDate, endDate, data, ruleObject) {
                switch (function(ruleObject) {
                    {
                        if (ruleObject.yearDay.length) return "YEARDAY";
                        if (ruleObject.weekNo.length) return "WEEKNO";
                    }
                    return "MONTH";
                }(ruleObject)) {
                  case "MONTH":
                    monthlyType(startDate, endDate, data, ruleObject);
                    break;

                  case "WEEKNO":
                    !function(startDate, endDate, data, ruleObject) {
                        var tempDate, state, startDay, firstWeekSpan, weekNo, maxDate, minDate, stDate = new Date(startDate.getFullYear(), 0, 0), expectedCount = ruleObject.count ? ruleObject.count : maxOccurrence, weekNos = ruleObject.weekNo;
                        for (;compareDates(stDate, endDate); ) {
                            startDay = dayIndex.indexOf(DAYINDEX[stDate.getDay()]), firstWeekSpan = 6 - startDay + 1;
                            for (var index = 0; index < weekNos.length; index++) for (weekNo = weekNos[index], 
                            maxDate = 1 === (weekNo = weekNo > 0 ? weekNo : 53 + weekNo + 1) ? firstWeekSpan : firstWeekSpan + 7 * (weekNo - 1), 
                            minDate = 1 === weekNo ? firstWeekSpan - 7 : firstWeekSpan + 7 * (weekNo - 2); minDate < maxDate; ) {
                                if (tempDate = new Date(stDate.getTime() + MS_PER_DAY * minDate), state = validateRules(tempDate, ruleObject), 
                                tempDate >= startDate && state && compareDates(tempDate, endDate) && (excludeDateHandler(data, tempDate.getTime()), 
                                expectedCount && data.length + tempExcludeDate.length >= expectedCount)) return;
                                minDate++;
                            }
                            stDate = new Date(tempDate.getFullYear() + ruleObject.interval, 0, 0);
                        }
                    }(startDate, endDate, data, ruleObject);
                    break;

                  case "YEARDAY":
                    !function(startDate, endDate, data, ruleObject) {
                        var tempDate, state, date, stDate = new Date(startDate.getFullYear(), 0, 0), expectedCount = ruleObject.count ? ruleObject.count : maxOccurrence;
                        for (;compareDates(stDate, endDate); ) {
                            for (var index = 0; index < ruleObject.yearDay.length; index++) if (date = ruleObject.yearDay[index], 
                            tempDate = new Date(stDate.getTime()), date !== LEAPYEAR && date !== -LEAPYEAR || (tempDate.getFullYear() + 1) % 4 == 0) {
                                if (tempDate.setDate(tempDate.getDate() + (date < 0 ? getMaxYearDay(tempDate.getFullYear() + 1) + 1 + date : date)), 
                                state = validateRules(tempDate, ruleObject), tempDate >= startDate && state && compareDates(tempDate, endDate) && (excludeDateHandler(data, tempDate.getTime()), 
                                expectedCount && data.length + tempExcludeDate.length >= expectedCount)) return;
                            } else tempDate.setDate(tempDate.getDate() + 1);
                            stDate = new Date(tempDate.getFullYear() + ruleObject.interval, 0, 0);
                        }
                    }(startDate, endDate, data, ruleObject);
                }
            }(modifiedDate, ruleObject.until, data, ruleObject);
        }
        return data;
    }
    function getDateFromRecurrenceDateString(recDateString) {
        return new Date(recDateString.substr(0, 4) + "-" + recDateString.substr(4, 2) + "-" + recDateString.substr(6, 5) + ":" + recDateString.substr(11, 2) + ":" + recDateString.substr(13));
    }
    function excludeDateHandler(data, date) {
        var zeroIndex = new Date(date).setHours(0, 0, 0, 0);
        -1 === tempExcludeDate.indexOf(zeroIndex) && (!tempViewDate || zeroIndex >= tempViewDate.getTime()) && data.push(date);
    }
    function monthlyType(startDate, endDate, data, ruleObject) {
        switch (function(ruleObject) {
            {
                if (ruleObject.monthDay.length && !ruleObject.day.length) return "date";
                if (!ruleObject.monthDay.length && ruleObject.day.length) return "day";
            }
            return "both";
        }(ruleObject)) {
          case "day":
            !function(startDate, endDate, data, ruleObject) {
                var state, month, index, beginDate, tempDate = new Date(startDate.getTime()), expectedDays = ruleObject.day, expectedCount = ruleObject.count ? ruleObject.count : maxOccurrence, dayCycleData = processWeekDays(expectedDays), interval = ruleObject.interval, monthCollection = [], weekCollection = [], monthInit = 0;
                tempDate.setDate(1), ruleObject.month.length && tempDate.setMonth(ruleObject.month[0] - 1);
                tempDate = getStartDateForWeek(tempDate, ruleObject.day);
                for (;compareDates(tempDate, endDate); ) {
                    if (month = tempDate.getMonth(), beginDate = new Date(tempDate.getTime()), expectedDays.length > 1) for (;tempDate.getMonth() === month; ) weekCollection.push(tempDate.getTime()), 
                    DAYINDEX[tempDate.getDay()] === expectedDays[expectedDays.length - 1] && (monthCollection.push(weekCollection), 
                    weekCollection = []), tempDate.setDate(tempDate.getDate() + dayCycleData[DAYINDEX[tempDate.getDay()]]); else for (;tempDate.getMonth() === month; ) monthCollection.push([ tempDate.getTime() ]), 
                    tempDate.setDate(tempDate.getDate() + 7);
                    if (index = ruleObject.setPosition < 1 ? monthCollection.length + ruleObject.setPosition : ruleObject.setPosition - 1, 
                    null === ruleObject.setPosition) {
                        index = 0;
                        for (var datas = [], week = 0; week < monthCollection.length; week++) for (var row = 0; row < monthCollection[week].length; row++) datas.push(monthCollection[week][row]);
                        monthCollection = [ datas ];
                    }
                    for (var week = 0; week < monthCollection[index].length; week++) {
                        var dayData = monthCollection[index][week], chDate = new Date(dayData);
                        if (state = validateRules(chDate, ruleObject), chDate >= startDate && compareDates(chDate, endDate) && state && (excludeDateHandler(data, dayData), 
                        expectedCount && data.length + tempExcludeDate.length >= expectedCount)) return;
                    }
                    monthInit = setNextValidDate(tempDate, ruleObject, monthInit, interval, beginDate), 
                    monthCollection = [], weekCollection = [], tempDate = getStartDateForWeek(tempDate, ruleObject.day);
                }
            }(startDate, endDate, data, ruleObject);
            break;

          case "both":
          case "date":
            !function(startDate, endDate, data, ruleObject) {
                var date, state, tempDate = new Date(startDate.getTime()), mainDate = new Date(startDate.getTime()), expectedCount = ruleObject.count ? ruleObject.count : maxOccurrence, interval = ruleObject.interval, monthInit = 0;
                tempDate.setDate(1), mainDate.setDate(1), ruleObject.month.length && tempDate.setMonth(ruleObject.month[0] - 1);
                for (;compareDates(tempDate, endDate); ) {
                    for (var index = 0; index < ruleObject.monthDay.length; index++) {
                        date = ruleObject.monthDay[index];
                        var maxDate = 1 === tempDate.getMonth() ? tempDate.getFullYear() % 4 == 0 ? 29 : 28 : monthDay[tempDate.getMonth()];
                        if ((date = date > 0 ? date : maxDate + date + 1) > 0 && function(tempDate, data, startDate) {
                            var maxDate = 1 === tempDate.getMonth() ? tempDate.getFullYear() % 4 == 0 ? 29 : 28 : monthDay[tempDate.getMonth()];
                            return data <= maxDate && tempDate >= startDate;
                        }(tempDate, date, mainDate)) {
                            if (tempDate.setDate(date), endDate && tempDate > endDate) return;
                            if (state = validateRules(tempDate, ruleObject), tempDate >= startDate && state && compareDates(tempDate, endDate) && (excludeDateHandler(data, tempDate.getTime()), 
                            expectedCount && data.length + tempExcludeDate.length >= expectedCount)) return;
                        }
                    }
                    monthInit = setNextValidDate(tempDate, ruleObject, monthInit, interval);
                }
            }(startDate, endDate, data, ruleObject);
        }
    }
    function getMaxYearDay(date) {
        return date % 4 == 0 ? LEAPYEAR : NORMALYEAR;
    }
    function setNextValidDate(tempDate, ruleObject, monthInit, interval, beginDate) {
        void 0 === beginDate && (beginDate = null);
        var monthData = beginDate ? beginDate.getMonth() : 0;
        return tempDate.setDate(1), ruleObject.month.length ? (monthInit++, monthInit %= ruleObject.month.length, 
        tempDate.setMonth(ruleObject.month[monthInit] - 1), 0 === monthInit && tempDate.setFullYear(tempDate.getFullYear() + interval)) : (beginDate && beginDate.getFullYear() < tempDate.getFullYear() && (monthData = tempDate.getMonth() - 1), 
        tempDate.setMonth((beginDate ? monthData : tempDate.getMonth()) + interval)), monthInit;
    }
    function compareDates(startDate, endDate) {
        return !endDate || startDate <= endDate;
    }
    function getStartDateForWeek(startDate, expectedDays) {
        var tempDate = new Date(startDate.getTime());
        if (-1 === expectedDays.indexOf(DAYINDEX[tempDate.getDay()])) do {
            tempDate.setDate(tempDate.getDate() + 1);
        } while (-1 === expectedDays.indexOf(DAYINDEX[tempDate.getDay()]));
        return tempDate;
    }
    function extractObjectFromRule(rules) {
        var temp, ruleObject = {
            freq: null,
            interval: 1,
            count: null,
            until: null,
            day: [],
            month: [],
            weekNo: [],
            monthDay: [],
            yearDay: [],
            setPosition: null,
            validRules: []
        }, splitData = [];
        if (rules.split(";").forEach(function(data) {
            switch ((splitData = data.split("="))[0]) {
              case "UNTIL":
                temp = splitData[1], ruleObject.until = getDateFromRecurrenceDateString(temp);
                break;

              case "BYDAY":
                ruleObject.day = splitData[1].split(","), ruleObject.validRules.push(splitData[0]);
                break;

              case "BYMONTHDAY":
                ruleObject.monthDay = splitData[1].split(",").map(Number), ruleObject.validRules.push(splitData[0]);
                break;

              case "BYMONTH":
                ruleObject.month = splitData[1].split(",").map(Number), ruleObject.validRules.push(splitData[0]);
                break;

              case "BYYEARDAY":
                ruleObject.yearDay = splitData[1].split(",").map(Number), ruleObject.validRules.push(splitData[0]);
                break;

              case "BYWEEKNO":
                ruleObject.weekNo = splitData[1].split(",").map(Number), ruleObject.validRules.push(splitData[0]);
                break;

              case "INTERVAL":
                ruleObject.interval = parseInt(splitData[1], 10);
                break;

              case "COUNT":
                ruleObject.count = parseInt(splitData[1], 10);
                break;

              case "BYSETPOS":
                ruleObject.setPosition = parseInt(splitData[1], 10);
                break;

              case "FREQ":
                ruleObject.freq = splitData[1];
            }
        }), "MONTHLY" === ruleObject.freq && 0 === ruleObject.monthDay.length) {
            var index = ruleObject.validRules.indexOf("BYDAY");
            ruleObject.validRules.splice(index, 1);
        }
        return ruleObject;
    }
    function processWeekDays(expectedDays) {
        var dayCycle = {};
        return expectedDays.forEach(function(element, index) {
            if (index === expectedDays.length - 1) {
                for (var startIndex = dayIndex.indexOf(element), temp = startIndex; temp % 7 !== dayIndex.indexOf(expectedDays[0]); ) temp++;
                dayCycle[element] = temp - startIndex;
            } else dayCycle[element] = dayIndex.indexOf(expectedDays[index + 1]) - dayIndex.indexOf(element);
        }), dayCycle;
    }
    function checkYear(tempDate, expectedyearDay) {
        var data, temp = expectedyearDay.slice(0), yearDay = function(currentDate) {
            startDateCollection[currentDate.getFullYear()] || (startDateCollection[currentDate.getFullYear()] = new Date(currentDate.getFullYear(), 0, 0));
            var tempDate = startDateCollection[currentDate.getFullYear()], diff = currentDate.getTime() - tempDate.getTime();
            return Math.ceil(diff / MS_PER_DAY);
        }(tempDate);
        for (data = temp.shift(); data; ) {
            if (data < 0 && (data = data + getMaxYearDay(tempDate.getFullYear()) + 1), data === yearDay) return !1;
            data = temp.shift();
        }
        return !0;
    }
    function rotate(days) {
        var data = days.shift();
        days.push(data);
    }
    function validateRules(tempDate, ruleObject) {
        var state = !0, expectedDays = ruleObject.day, expectedMonth = ruleObject.month, expectedDate = ruleObject.monthDay, expectedyearDay = ruleObject.yearDay;
        return ruleObject.validRules.forEach(function(rule) {
            switch (rule) {
              case "BYDAY":
                (function(day, expectedDays) {
                    return -1 === expectedDays.indexOf(DAYINDEX[day]);
                })(tempDate.getDay(), expectedDays) && (state = !1);
                break;

              case "BYMONTH":
                (function(tempDate, expectedMonth) {
                    return -1 === expectedMonth.indexOf(tempDate.getMonth() + 1);
                })(tempDate, expectedMonth) && (state = !1);
                break;

              case "BYMONTHDAY":
                (function(tempDate, expectedDate) {
                    var data, temp = expectedDate.slice(0), maxDate = 1 === tempDate.getMonth() ? tempDate.getFullYear() % 4 == 0 ? 29 : 28 : monthDay[tempDate.getMonth()];
                    for (data = temp.shift(); data; ) {
                        if (data < 0 && (data = data + maxDate + 1), data === tempDate.getDate()) return !1;
                        data = temp.shift();
                    }
                    return !0;
                })(tempDate, expectedDate) && (state = !1);
                break;

              case "BYYEARDAY":
                checkYear(tempDate, expectedyearDay) && (state = !1);
            }
        }), state;
    }
    function getRecurrenceStringFromDate(date) {
        return [ date.getUTCFullYear(), roundDateValues(date.getUTCMonth() + 1), roundDateValues(date.getUTCDate()), "T", roundDateValues(date.getUTCHours()), roundDateValues(date.getUTCMinutes()), roundDateValues(date.getUTCSeconds()), "Z" ].join("");
    }
    function roundDateValues(date) {
        return ("0" + date).slice(-2);
    }
    function getSeriesColor(theme) {
        var palette;
        switch (theme) {
          case "Fabric":
            palette = [ "#4472c4", "#ed7d31", "#ffc000", "#70ad47", "#5b9bd5", "#c1c1c1", "#6f6fe2", "#e269ae", "#9e480e", "#997300" ];
            break;

          case "Bootstrap":
            palette = [ "#a16ee5", "#f7ce69", "#55a5c2", "#7ddf1e", "#ff6ea6", "#7953ac", "#b99b4f", "#407c92", "#5ea716", "#b91c52" ];
            break;

          case "Highcontrast":
            palette = [ "#79ECE4", "#E98272", "#DFE6B6", "#C6E773", "#BA98FF", "#FA83C3", "#00C27A", "#43ACEF", "#D681EF", "#D8BC6E" ];
            break;

          default:
            palette = [ "#00bdae", "#404041", "#357cd2", "#e56590", "#f8b883", "#70ad47", "#dd8abd", "#7f84e8", "#7bb4eb", "#ea7a57" ];
        }
        return palette;
    }
    function getThemeColor(theme) {
        var style;
        switch (theme) {
          case "Highcontrast":
            style = {
                axisLabel: "#ffffff",
                axisTitle: "#ffffff",
                axisLine: "#ffffff",
                majorGridLine: "#BFBFBF",
                minorGridLine: "#969696",
                majorTickLine: "#BFBFBF",
                minorTickLine: "#969696",
                chartTitle: "#ffffff",
                legendLabel: "#ffffff",
                background: "#000000",
                areaBorder: "#ffffff",
                errorBar: "#ffffff",
                crosshairLine: "#ffffff",
                crosshairFill: "#ffffff",
                crosshairLabel: "#000000",
                tooltipFill: "#ffffff",
                tooltipBoldLabel: "#000000",
                tooltipLightLabel: "#000000",
                tooltipHeaderLine: "#969696",
                markerShadow: "#BFBFBF",
                selectionRectFill: "rgba(255, 217, 57, 0.3)",
                selectionRectStroke: "#ffffff",
                selectionCircleStroke: "#FFD939"
            };
            break;

          default:
            style = {
                axisLabel: "#686868",
                axisTitle: "#424242",
                axisLine: "#b5b5b5",
                majorGridLine: "#dbdbdb",
                minorGridLine: "#eaeaea",
                majorTickLine: "#b5b5b5",
                minorTickLine: "#d6d6d6",
                chartTitle: "#424242",
                legendLabel: "#353535",
                background: "#FFFFFF",
                areaBorder: "Gray",
                errorBar: "#000000",
                crosshairLine: "#4f4f4f",
                crosshairFill: "#4f4f4f",
                crosshairLabel: "#e5e5e5",
                tooltipFill: "rgba(0, 8, 22, 0.75)",
                tooltipBoldLabel: "#ffffff",
                tooltipLightLabel: "#dbdbdb",
                tooltipHeaderLine: "#ffffff",
                markerShadow: null,
                selectionRectFill: "rgba(41, 171, 226, 0.1)",
                selectionRectStroke: "#29abe2",
                selectionCircleStroke: "#29abe2"
            };
        }
        return style;
    }
    function measureText(text, font) {
        var htmlObject = document.getElementById("chartmeasuretext");
        return null === htmlObject && (htmlObject = createElement("text", {
            id: "chartmeasuretext"
        }), document.body.appendChild(htmlObject)), htmlObject.innerHTML = text, htmlObject.style.position = "absolute", 
        htmlObject.style.fontSize = font.size, htmlObject.style.fontWeight = font.fontWeight, 
        htmlObject.style.fontStyle = font.fontStyle, htmlObject.style.fontFamily = font.fontFamily, 
        htmlObject.style.visibility = "hidden", htmlObject.style.top = "-100", htmlObject.style.left = "0", 
        htmlObject.style.whiteSpace = "nowrap", htmlObject.style.lineHeight = "normal", 
        new Size(htmlObject.clientWidth, htmlObject.clientHeight);
    }
    function rotateTextSize(font, text, angle, chart) {
        var box, options, htmlObject, renderer = new SvgRenderer(chart.element.id);
        return options = {
            "font-size": font.size,
            "font-style": font.fontStyle,
            "font-family": font.fontFamily,
            "font-weight": font.fontWeight,
            transform: "rotate(" + angle + ", 0, 0)",
            "text-anchor": "middle"
        }, htmlObject = renderer.createText(options, text), chart.delayRedraw || chart.element.appendChild(chart.svgObject), 
        chart.svgObject.appendChild(htmlObject), box = htmlObject.getBoundingClientRect(), 
        remove(htmlObject), chart.delayRedraw || remove(chart.svgObject), new Size(box.right - box.left, box.bottom - box.top);
    }
    function removeElement$1(id) {
        var element = getElement(id);
        element && remove(element);
    }
    function logBase(value, base) {
        return Math.log(value) / Math.log(base);
    }
    function showTooltip(text, x, y, areaWidth, id, element, isTouch) {
        var tooltip = document.getElementById(id), width = measureText(text, {
            fontFamily: "Segoe UI",
            size: "12px",
            fontStyle: "Normal",
            fontWeight: "Regular"
        }).width + 5;
        x = x + width > areaWidth ? x - width : x, tooltip ? (tooltip.innerHTML = text, 
        tooltip.style.top = (y + 15).toString() + "px", tooltip.style.left = (x + 15).toString() + "px") : (tooltip = createElement("div", {
            innerHTML: text,
            id: id,
            styles: "top:" + (y + 15).toString() + "px;left:" + (x + 15).toString() + 'px;background-color: rgb(255, 255, 255);position:absolute;border:1px solid rgb(112, 112, 112); padding-left : 3px; padding-right : 2px;padding-bottom : 2px; padding-top : 2px; font-size:12px; font-family: "Segoe UI"'
        }), element.appendChild(tooltip)), isTouch && setTimeout(function() {
            removeElement$1(id);
        }, 1500);
    }
    function inside(value, range) {
        return value < range.max && value > range.min;
    }
    function withIn(value, range) {
        return value <= range.max && value >= range.min;
    }
    function withInRange(previousPoint, currentPoint, nextPoint, series) {
        var mX2 = series.logWithIn(currentPoint.xValue, series.xAxis), mX1 = previousPoint ? series.logWithIn(previousPoint.xValue, series.xAxis) : mX2, mX3 = nextPoint ? series.logWithIn(nextPoint.xValue, series.xAxis) : mX2, xStart = Math.floor(series.xAxis.visibleRange.min), xEnd = Math.ceil(series.xAxis.visibleRange.max);
        return mX1 >= xStart && mX1 <= xEnd || mX2 >= xStart && mX2 <= xEnd || mX3 >= xStart && mX3 <= xEnd || xStart >= mX1 && xStart <= mX3;
    }
    function sum(values) {
        for (var sum = 0, _i = 0, values_1 = values; _i < values_1.length; _i++) {
            sum += values_1[_i];
        }
        return sum;
    }
    function subArraySum(values, first, last, index, series) {
        var sum = 0;
        if (null !== index) for (var i = first + 1; i < last; i++) -1 === index.indexOf(i) && (sum += values[i][series.yName]); else for (i = first + 1; i < last; i++) isNullOrUndefined(values[i][series.yName]) || (sum += values[i][series.yName]);
        return sum;
    }
    function subtractThickness(rect, thickness) {
        return rect.x += thickness.left, rect.y += thickness.top, rect.width -= thickness.left + thickness.right, 
        rect.height -= thickness.top + thickness.bottom, rect;
    }
    function degreeToLocation(degree, radius, center) {
        var radian = degree * Math.PI / 180;
        return new ChartLocation(Math.cos(radian) * radius + center.x, Math.sin(radian) * radius + center.y);
    }
    function subArray(values, index) {
        for (var subArray = [], i = 0; i <= index - 1; i++) subArray.push(values[i]);
        return subArray;
    }
    function valueToCoefficient(value, axis) {
        var range = axis.visibleRange, result = (value - range.min) / range.delta;
        return axis.isInversed ? 1 - result : result;
    }
    function TransformToVisible(x, y, xAxis, yAxis, isInverted, series) {
        x = "Logarithmic" === xAxis.valueType ? logBase(x > 1 ? x : 1, xAxis.logBase) : x, 
        y = "Logarithmic" === yAxis.valueType ? logBase(y > 1 ? y : 1, yAxis.logBase) : y, 
        x += "Category" === xAxis.valueType && "BetweenTicks" === xAxis.labelPlacement && "Radar" !== series.type ? .5 : 0;
        var radius = series.chart.radius * valueToCoefficient(y, yAxis), point = CoefficientToVector(valueToPolarCoefficient(x, xAxis), series.chart.primaryXAxis.startAngle);
        return {
            x: series.clipRect.width / 2 + series.clipRect.x + radius * point.x,
            y: series.clipRect.height / 2 + series.clipRect.y + radius * point.y
        };
    }
    function indexFinder(id) {
        var ids = [ "NaN", "NaN" ];
        return id.indexOf("_Point_") > -1 ? ids = id.split("_Series_")[1].split("_Point_") : id.indexOf("_shape_") > -1 ? (ids = id.split("_shape_"))[0] = "0" : id.indexOf("_text_") > -1 && ((ids = id.split("_text_"))[0] = "0"), 
        new Index(parseInt(ids[0], 10), parseInt(ids[1], 10));
    }
    function CoefficientToVector(coefficient, startAngle) {
        startAngle = startAngle < 0 ? startAngle + 360 : startAngle;
        var angle = Math.PI * (1.5 - 2 * coefficient);
        return angle += startAngle * Math.PI / 180, {
            x: Math.cos(angle),
            y: Math.sin(angle)
        };
    }
    function valueToPolarCoefficient(value, axis) {
        var delta, length, range = axis.visibleRange;
        return "Category" !== axis.valueType ? (delta = range.max - ("DateTime" === axis.valueType ? axis.dateTimeInterval : range.interval) - range.min, 
        length = axis.visibleLabels.length - 1, delta = 0 === delta ? 1 : delta) : (delta = range.delta, 
        length = axis.visibleLabels.length), axis.isInversed ? (value - range.min) / delta * (1 - 1 / length) : 1 - (value - range.min) / delta * (1 - 1 / length);
    }
    function withInBounds(x, y, bounds, width, height) {
        return void 0 === width && (width = 0), void 0 === height && (height = 0), x >= bounds.x - width && x <= bounds.x + bounds.width + width && y >= bounds.y - height && y <= bounds.y + bounds.height + height;
    }
    function getValueXByPoint(value, size, axis) {
        return (axis.isInversed ? 1 - value / size : value / size) * axis.visibleRange.delta + axis.visibleRange.min;
    }
    function getValueYByPoint(value, size, axis) {
        return (axis.isInversed ? value / size : 1 - value / size) * axis.visibleRange.delta + axis.visibleRange.min;
    }
    function findClipRect(series) {
        var rect = series.clipRect;
        series.chart.requireInvertedAxis ? (rect.x = series.yAxis.rect.x, rect.y = series.xAxis.rect.y, 
        rect.width = series.yAxis.rect.width, rect.height = series.xAxis.rect.height) : (rect.x = series.xAxis.rect.x, 
        rect.y = series.yAxis.rect.y, rect.width = series.xAxis.rect.width, rect.height = series.yAxis.rect.height);
    }
    function firstToLowerCase(str) {
        return str.substr(0, 1).toLowerCase() + str.substr(1);
    }
    function getMinPointsDelta(axis, seriesCollection) {
        var xValues, minVal, minDelta = Number.MAX_VALUE;
        return seriesCollection.forEach(function(series, index) {
            xValues = [], series.visible && (axis.name === series.xAxisName || "primaryXAxis" === axis.name && null === series.xAxisName || axis.name === series.chart.primaryXAxis.name && !series.xAxisName) && ((xValues = series.points.map(function(point, index) {
                return point.xValue;
            })).sort(function(first, second) {
                return first - second;
            }), 1 === xValues.length ? 0 !== (minVal = xValues[0] - (series.xMin && "DateTime" !== series.xAxis.valueType ? series.xMin : axis.visibleRange.min)) && (minDelta = Math.min(minDelta, minVal)) : xValues.forEach(function(value, index, xValues) {
                index > 0 && value && 0 !== (minVal = value - xValues[index - 1]) && (minDelta = Math.min(minDelta, minVal));
            }));
        }), minDelta === Number.MAX_VALUE && (minDelta = 1), minDelta;
    }
    function getAnimationFunction(effect) {
        var functionName;
        switch (effect) {
          case "Linear":
            functionName = linear;
        }
        return functionName;
    }
    function linear(currentTime, startValue, endValue, duration) {
        return -endValue * Math.cos(currentTime / duration * (Math.PI / 2)) + endValue + startValue;
    }
    function markerAnimate(element, delay, duration, series, pointIndex, point, isLabel) {
        var centerX = point.x, centerY = point.y, height = 0;
        element.style.visibility = "hidden", new Animation({}).animate(element, {
            duration: duration,
            delay: delay,
            progress: function(args) {
                args.timeStamp > args.delay && (args.element.style.visibility = "visible", height = (args.timeStamp - args.delay) / args.duration, 
                element.setAttribute("transform", "translate(" + centerX + " " + centerY + ") scale(" + height + ") translate(" + -centerX + " " + -centerY + ")"));
            },
            end: function(model) {
                element.style.visibility = "", element.removeAttribute("transform"), "Scatter" !== series.type && "Bubble" !== series.type || isLabel || pointIndex !== series.points.length - 1 || series.chart.trigger("animationComplete", {
                    series: series
                });
            }
        });
    }
    function templateAnimate(element, delay, duration, name, isRemove) {
        new Animation({}).animate(element, {
            duration: duration,
            delay: delay,
            name: name,
            progress: function(args) {
                args.element.style.visibility = "visible";
            },
            end: function(args) {
                isRemove ? remove(args.element) : args.element.style.visibility = "visible";
            }
        });
    }
    function drawSymbol(location, shape, size, url, options, label) {
        var renderer = new SvgRenderer(""), temp = function(location, size, shape, options, url) {
            var path, functionName = "Path", width = size.width, height = size.height, locX = location.x, locY = location.y, x = location.x + -width / 2, y = location.y + -height / 2;
            switch (shape) {
              case "Circle":
              case "Bubble":
                functionName = "Ellipse", merge(options, {
                    rx: width / 2,
                    ry: height / 2,
                    cx: locX,
                    cy: locY
                });
                break;

              case "Cross":
                merge(options, {
                    d: path = "M " + x + " " + locY + " L " + (locX + width / 2) + " " + locY + " M " + locX + " " + (locY + height / 2) + " L " + locX + " " + (locY + -height / 2)
                });
                break;

              case "HorizontalLine":
                merge(options, {
                    d: path = "M " + x + " " + locY + " L " + (locX + width / 2) + " " + locY
                });
                break;

              case "VerticalLine":
                merge(options, {
                    d: path = "M " + locX + " " + (locY + height / 2) + " L " + locX + " " + (locY + -height / 2)
                });
                break;

              case "Diamond":
                merge(options, {
                    d: path = "M " + x + " " + locY + " L " + locX + " " + (locY + -height / 2) + " L " + (locX + width / 2) + " " + locY + " L " + locX + " " + (locY + height / 2) + " L " + x + " " + locY + " z"
                });
                break;

              case "Rectangle":
              case "Hilo":
              case "HiloOpenClose":
              case "Candle":
              case "Waterfall":
              case "BoxAndWhisker":
              case "StepArea":
                merge(options, {
                    d: path = "M " + x + " " + (locY + -height / 2) + " L " + (locX + width / 2) + " " + (locY + -height / 2) + " L " + (locX + width / 2) + " " + (locY + height / 2) + " L " + x + " " + (locY + height / 2) + " L " + x + " " + (locY + -height / 2) + " z"
                });
                break;

              case "Pyramid":
              case "Triangle":
                merge(options, {
                    d: path = "M " + x + " " + (locY + height / 2) + " L " + locX + " " + (locY + -height / 2) + " L " + (locX + width / 2) + " " + (locY + height / 2) + " L " + x + " " + (locY + height / 2) + " z"
                });
                break;

              case "Funnel":
              case "InvertedTriangle":
                merge(options, {
                    d: path = "M " + (locX + width / 2) + " " + (locY - height / 2) + " L " + locX + " " + (locY + height / 2) + " L " + (locX - width / 2) + " " + (locY - height / 2) + " L " + (locX + width / 2) + " " + (locY - height / 2) + " z"
                });
                break;

              case "Pentagon":
                for (var xValue = void 0, yValue = void 0, i = 0; i <= 5; i++) xValue = width / 2 * Math.cos(Math.PI / 180 * (72 * i)), 
                yValue = height / 2 * Math.sin(Math.PI / 180 * (72 * i)), path = 0 === i ? "M " + (locX + xValue) + " " + (locY + yValue) + " " : path.concat("L " + (locX + xValue) + " " + (locY + yValue) + " ");
                path = path.concat("Z"), merge(options, {
                    d: path
                });
                break;

              case "Image":
                functionName = "Image", merge(options, {
                    href: url,
                    height: height,
                    width: width,
                    x: x,
                    y: y
                });
            }
            return options = function(location, size, shape, options) {
                var path = "", height = size.height, width = size.width, locX = location.x, locY = location.y;
                switch (shape) {
                  case "MultiColoredLine":
                  case "Line":
                    merge(options, {
                        d: path = "M " + (locX + -width / 2) + " " + locY + " L " + (locX + width / 2) + " " + locY
                    });
                    break;

                  case "StepLine":
                    options.fill = "transparent", merge(options, {
                        d: path = "M " + (locX + -width / 2 - 2.5) + " " + (locY + height / 2) + " L " + (locX + -width / 2 + width / 10) + " " + (locY + height / 2) + " L " + (locX + -width / 2 + width / 10) + " " + locY + " L " + (locX + -width / 10) + " " + locY + " L " + (locX + -width / 10) + " " + (locY + height / 2) + " L " + (locX + width / 5) + " " + (locY + height / 2) + " L " + (locX + width / 5) + " " + (locY + -height / 2) + " L " + (locX + width / 2) + " " + (locY + -height / 2) + "L " + (locX + width / 2) + " " + (locY + height / 2) + " L" + (locX + width / 2 + 2.5) + " " + (locY + height / 2)
                    });
                    break;

                  case "RightArrow":
                    var space = 2;
                    merge(options, {
                        d: path = "M " + (locX + -width / 2) + " " + (locY - height / 2) + " L " + (locX + width / 2) + " " + locY + " L " + (locX + -width / 2) + " " + (locY + height / 2) + " L " + (locX + -width / 2) + " " + (locY + height / 2 - space) + " L " + (locX + width / 2 - 2 * space) + " " + locY + " L" + (locX + -width / 2) + " " + (locY - height / 2 + space) + " Z"
                    });
                    break;

                  case "LeftArrow":
                    options.fill = options.stroke, options.stroke = "transparent", merge(options, {
                        d: path = "M " + (locX + width / 2) + " " + (locY - height / 2) + " L " + (locX + -width / 2) + " " + locY + " L " + (locX + width / 2) + " " + (locY + height / 2) + " L " + (locX + width / 2) + " " + (locY + height / 2 - (space = 2)) + " L " + (locX + -width / 2 + 2 * space) + " " + locY + " L" + (locX + width / 2) + " " + (locY - height / 2 + space) + " Z"
                    });
                    break;

                  case "Column":
                  case "StackingColumn":
                  case "StackingColumn100":
                  case "RangeColumn":
                    merge(options, {
                        d: path = "M " + (locX - width / 5 * 3) + " " + (locY - height / 5) + " L " + (locX + -width / 10 * 3) + " " + (locY - height / 5) + " L " + (locX + -width / 10 * 3) + " " + (locY + height / 2) + " L " + (locX - width / 5 * 3) + " " + (locY + height / 2) + " Z M " + (locX + -width / 10 - width / 20) + " " + (locY - height / 4 - 5) + " L " + (locX + width / 10 + width / 20) + " " + (locY - height / 4 - 5) + " L " + (locX + width / 10 + width / 20) + " " + (locY + height / 2) + " L " + (locX + -width / 10 - width / 20) + " " + (locY + height / 2) + " Z M " + (locX + width / 10 * 3) + " " + locY + " L " + (locX + width / 5 * 3) + " " + locY + " L " + (locX + width / 5 * 3) + " " + (locY + height / 2) + " L " + (locX + width / 10 * 3) + " " + (locY + height / 2) + " Z"
                    });
                    break;

                  case "Bar":
                  case "StackingBar":
                  case "StackingBar100":
                    merge(options, {
                        d: path = "M " + (locX + -width / 2 + -2.5) + " " + (locY - height / 5 * 3) + " L " + (locX + width / 10 * 3) + " " + (locY - height / 5 * 3) + " L " + (locX + width / 10 * 3) + " " + (locY - height / 10 * 3) + " L " + (locX - width / 2 - 2.5) + " " + (locY - height / 10 * 3) + " Z M " + (locX + -width / 2 + -2.5) + " " + (locY - height / 5 + .5) + " L " + (locX + width / 2 + 2.5) + " " + (locY - height / 5 + .5) + " L " + (locX + width / 2 + 2.5) + " " + (locY + height / 10 + .5) + " L " + (locX - width / 2 - 2.5) + " " + (locY + height / 10 + .5) + " Z M " + (locX - width / 2 - 2.5) + " " + (locY + height / 5 + 1) + " L " + (locX + -width / 4) + " " + (locY + height / 5 + 1) + " L " + (locX + -width / 4) + " " + (locY + height / 2 + 1) + " L " + (locX - width / 2 - 2.5) + " " + (locY + height / 2 + 1) + " Z"
                    });
                    break;

                  case "Spline":
                    options.fill = "transparent", merge(options, {
                        d: path = "M " + (locX - width / 2) + " " + (locY + height / 5) + " Q " + locX + " " + (locY - height) + " " + locX + " " + (locY + height / 5) + " M " + locX + " " + (locY + height / 5) + " Q " + (locX + width / 2) + " " + (locY + height / 2) + " " + (locX + width / 2) + " " + (locY - height / 2)
                    });
                    break;

                  case "Area":
                  case "MultiColoredArea":
                  case "RangeArea":
                  case "StackingArea":
                  case "StackingArea100":
                    merge(options, {
                        d: path = "M " + (locX - width / 2 - 2.5) + " " + (locY + height / 2) + " L " + (locX + -width / 4 + -1.25) + " " + (locY - height / 2) + " L " + locX + " " + (locY + height / 4) + " L " + (locX + width / 4 + 1.25) + " " + (locY + -height / 2 + height / 4) + " L " + (locX + height / 2 + 2.5) + " " + (locY + height / 2) + " Z"
                    });
                    break;

                  case "SplineArea":
                    merge(options, {
                        d: path = "M " + (locX - width / 2) + " " + (locY + height / 5) + " Q " + locX + " " + (locY - height) + " " + locX + " " + (locY + height / 5) + " Z M " + locX + " " + (locY + height / 5) + " Q " + (locX + width / 2) + " " + (locY + height / 2) + " " + (locX + width / 2) + " " + (locY - height / 2) + "  Z"
                    });
                    break;

                  case "Pie":
                  case "Doughnut":
                    options.stroke = "transparent";
                    var r = Math.min(height, width) / 2;
                    path = function(locX, locY, r, height, width, mode) {
                        var cartesianlarge = degreeToLocation(270, r, new ChartLocation(locX, locY)), cartesiansmall = degreeToLocation(270, r, new ChartLocation(locX + width / 10, locY));
                        return "M " + locX + " " + locY + " L " + (locX + r) + " " + locY + " A " + r + " " + r + " 0 1 1 " + cartesianlarge.x + " " + cartesianlarge.y + " Z M " + (locX + width / 10) + " " + (locY - height / 10) + " L" + (locX + r) + " " + (locY - height / 10) + " A " + r + " " + r + " 0 0 0 " + cartesiansmall.x + " " + cartesiansmall.y + " Z";
                    }(locX, locY, r, height, width), merge(options, {
                        d: path
                    });
                }
                return {
                    renderOption: options
                };
            }(location, new Size(width, height), shape, options).renderOption, {
                renderOption: options,
                functionName: functionName
            };
        }(location, size, shape, options, url), htmlObject = renderer["draw" + temp.functionName](temp.renderOption);
        return htmlObject.setAttribute("aria-label", label), htmlObject;
    }
    function minMax(value, min, max) {
        return value > max ? max : value < min ? min : value;
    }
    function getElement(id) {
        return document.getElementById(id);
    }
    function createTemplate(childElement, pointIndex, content, chart, point, series) {
        var templateFn, templateElement;
        templateFn = function(template) {
            var templateFn = null;
            try {
                document.querySelectorAll(template).length && (templateFn = compile$$1(document.querySelector(template).innerHTML.trim()));
            } catch (e) {
                templateFn = compile$$1(template);
            }
            return templateFn;
        }(content);
        try {
            if (templateFn && templateFn({
                chart: chart,
                series: series,
                point: point
            }).length) for (templateElement = templateFn({
                chart: chart,
                series: series,
                point: point
            }); templateElement.length > 0; ) childElement.appendChild(templateElement[0]);
        } catch (e) {
            return childElement;
        }
        return childElement;
    }
    function getFontStyle(font) {
        return "font-size:" + font.size + "; font-style:" + font.fontStyle + "; font-weight:" + font.fontWeight + "; font-family:" + font.fontFamily + ";opacity:" + font.opacity + "; color:" + font.color + ";";
    }
    function measureElementRect(element) {
        var bounds;
        return document.body.appendChild(element), bounds = element.getBoundingClientRect(), 
        removeElement$1(element.id), bounds;
    }
    function getPoint(x, y, xAxis, yAxis, isInverted, series) {
        var xLength = isInverted ? xAxis.rect.height : xAxis.rect.width, yLength = isInverted ? yAxis.rect.width : yAxis.rect.height, xvalue = "Logarithmic" === xAxis.valueType ? logBase(x > 1 ? x : 1, xAxis.logBase) : x, yvalue = "Logarithmic" === yAxis.valueType ? logBase(y > 1 ? y : 1, yAxis.logBase) : y;
        xvalue = valueToCoefficient(xvalue, xAxis), yvalue = valueToCoefficient(yvalue, yAxis);
        return new ChartLocation(isInverted ? yvalue * yLength : xvalue * xLength, isInverted ? (1 - xvalue) * xLength : (1 - yvalue) * yLength);
    }
    function appendElement(child, parent) {
        if (!(child && child.hasChildNodes() && parent)) return null;
        parent.appendChild(child);
    }
    function getDraggedRectLocation(x1, y1, x2, y2, outerRect) {
        var width = Math.abs(x1 - x2), height = Math.abs(y1 - y2), x = Math.max(checkBounds(Math.min(x1, x2), width, outerRect.x, outerRect.width), outerRect.x), y = Math.max(checkBounds(Math.min(y1, y2), height, outerRect.y, outerRect.height), outerRect.y);
        return new Rect(x, y, Math.min(width, outerRect.width), Math.min(height, outerRect.height));
    }
    function checkBounds(start, size, min, max) {
        return start < min ? start = min : start + size > max + min && (start = max + min - size), 
        start;
    }
    function stopTimer(timer) {
        window.clearInterval(timer);
    }
    function isCollide$2(rect, collections, clipRect) {
        var currentRect = new Rect(rect.x + clipRect.x, rect.y + clipRect.y, rect.width, rect.height);
        return collections.some(function(rect) {
            return currentRect.x < rect.x + rect.width && currentRect.x + currentRect.width > rect.x && currentRect.y < rect.y + rect.height && currentRect.height + currentRect.y > rect.y;
        });
    }
    function isOverlap(currentRect, rect) {
        return currentRect.x < rect.x + rect.width && currentRect.x + currentRect.width > rect.x && currentRect.y < rect.y + rect.height && currentRect.height + currentRect.y > rect.y;
    }
    function calculateRect(location, textSize, margin) {
        return new Rect(location.x - textSize.width / 2 - margin.left, location.y - textSize.height / 2 - margin.top, textSize.width + margin.left + margin.right, textSize.height + margin.top + margin.bottom);
    }
    function componentToHex(value) {
        var hex = value.toString(16);
        return 1 === hex.length ? "0" + hex : hex;
    }
    function convertHexToColor(hex) {
        var result = /^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(hex);
        return result ? new ColorValue(parseInt(result[1], 16), parseInt(result[2], 16), parseInt(result[3], 16)) : new ColorValue(255, 255, 255);
    }
    function colorNameToHex(color) {
        var element;
        color = "transparent" === color ? "white" : color, (element = document.getElementById("chartmeasuretext")).style.color = color, 
        color = window.getComputedStyle(element).color;
        var isRGBValue = /^(rgb|hsl)(a?)[(]\s*([\d.]+\s*%?)\s*,\s*([\d.]+\s*%?)\s*,\s*([\d.]+\s*%?)\s*(?:,\s*([\d.]+)\s*)?[)]$/.exec(color);
        return function(value) {
            return "#" + componentToHex(value.r) + componentToHex(value.g) + componentToHex(value.b);
        }(new ColorValue(parseInt(isRGBValue[3], 10), parseInt(isRGBValue[4], 10), parseInt(isRGBValue[5], 10)));
    }
    function getSaturationColor(color, factor) {
        (color = (color = colorNameToHex(color)).replace(/[^0-9a-f]/gi, "")).length < 6 && (color = color[0] + color[0] + color[1] + color[1] + color[2] + color[2]), 
        factor = factor || 0;
        for (var colorCode, rgb = "#", i = 0; i < 3; i++) colorCode = parseInt(color.substr(2 * i, 2), 16), 
        rgb += ("00" + (colorCode = Math.round(Math.min(Math.max(0, colorCode + colorCode * factor), 255))).toString(16)).substr(colorCode.toString(16).length);
        return rgb;
    }
    function getMedian(values) {
        var half = Math.floor(values.length / 2);
        return values.length % 2 ? values[half] : (values[half - 1] + values[half]) / 2;
    }
    function textTrim(maxWidth, text, font) {
        var label = text, size = measureText(text, font).width;
        if (size > maxWidth) for (var i = text.length - 1; i >= 0; --i) if (label = text.substring(0, i) + "...", 
        (size = measureText(label, font).width) <= maxWidth) return label;
        return label;
    }
    function stringToNumber(value, containerSize) {
        return null !== value && void 0 !== value ? -1 !== value.indexOf("%") ? containerSize / 100 * parseInt(value, 10) : parseInt(value, 10) : null;
    }
    function findDirection(rX, rY, rect, arrowLocation, arrowPadding, top, bottom, left, tipX, tipY, tipRadius) {
        var direction = "", startX = rect.x, startY = rect.y, width = rect.x + rect.width, height = rect.y + rect.height;
        return tipRadius = tipRadius || 0, top ? (direction = (direction = direction.concat("M " + startX + " " + (startY + rY) + " Q " + startX + " " + startY + " " + (startX + rX) + " " + startY + "  L " + (width - rX) + " " + startY + " Q " + width + " " + startY + " " + width + " " + (startY + rY))).concat(" L " + width + " " + (height - rY) + " Q " + width + " " + height + " " + (width - rX) + " " + height), 
        0 !== arrowPadding && (direction = (direction = direction.concat(" L " + (arrowLocation.x + arrowPadding / 2) + " " + height)).concat(" L " + (tipX + tipRadius) + " " + (height + arrowPadding - tipRadius)), 
        direction += " Q " + tipX + " " + (height + arrowPadding) + " " + (tipX - tipRadius) + " " + (height + arrowPadding - tipRadius)), 
        direction = arrowLocation.x - arrowPadding / 2 > startX ? direction.concat(" L " + (arrowLocation.x - arrowPadding / 2) + " " + height + " L " + (startX + rX) + " " + height + " Q " + startX + " " + height + " " + startX + " " + (height - rY) + " z") : 0 === arrowPadding ? direction.concat(" L " + (startX + rX) + " " + height + " Q " + startX + " " + height + " " + startX + " " + (height - rY) + " z") : direction.concat(" L " + startX + " " + (height + rY) + " z")) : bottom ? (direction = (direction = direction.concat("M " + startX + " " + (startY + rY) + " Q " + startX + " " + startY + " " + (startX + rX) + " " + startY + " L " + (arrowLocation.x - arrowPadding / 2) + " " + startY)).concat(" L " + (tipX - tipRadius) + " " + (arrowLocation.y + tipRadius)), 
        direction = (direction = (direction += " Q " + tipX + " " + arrowLocation.y + " " + (tipX + tipRadius) + " " + (arrowLocation.y + tipRadius)).concat(" L " + (arrowLocation.x + arrowPadding / 2) + " " + startY + " L " + (width - rX) + " " + startY + " Q " + width + " " + startY + " " + width + " " + (startY + rY))).concat(" L " + width + " " + (height - rY) + " Q " + width + " " + height + " " + (width - rX) + " " + height + " L " + (startX + rX) + " " + height + " Q " + startX + " " + height + " " + startX + " " + (height - rY) + " z")) : left ? (direction = (direction = (direction = direction.concat("M " + startX + " " + (startY + rY) + " Q " + startX + " " + startY + " " + (startX + rX) + " " + startY)).concat(" L " + (width - rX) + " " + startY + " Q " + width + " " + startY + " " + width + " " + (startY + rY) + " L " + width + " " + (arrowLocation.y - arrowPadding / 2))).concat(" L " + (width + arrowPadding - tipRadius) + " " + (tipY - tipRadius)), 
        direction = (direction = (direction += " Q " + (width + arrowPadding) + " " + tipY + " " + (width + arrowPadding - tipRadius) + " " + (tipY + tipRadius)).concat(" L " + width + " " + (arrowLocation.y + arrowPadding / 2) + " L " + width + " " + (height - rY) + " Q " + width + " " + height + " " + (width - rX) + " " + height)).concat(" L " + (startX + rX) + " " + height + " Q " + startX + " " + height + " " + startX + " " + (height - rY) + " z")) : (direction = (direction = direction.concat("M " + (startX + rX) + " " + startY + " Q " + startX + " " + startY + " " + startX + " " + (startY + rY) + " L " + startX + " " + (arrowLocation.y - arrowPadding / 2))).concat(" L " + (startX - arrowPadding + tipRadius) + " " + (tipY - tipRadius)), 
        direction = (direction = (direction += " Q " + (startX - arrowPadding) + " " + tipY + " " + (startX - arrowPadding + tipRadius) + " " + (tipY + tipRadius)).concat(" L " + startX + " " + (arrowLocation.y + arrowPadding / 2) + " L " + startX + " " + (height - rY) + " Q " + startX + " " + height + " " + (startX + rX) + " " + height)).concat(" L " + (width - rX) + " " + height + " Q " + width + " " + height + " " + width + " " + (height - rY) + " L " + width + " " + (startY + rY) + " Q " + width + " " + startY + " " + (width - rX) + " " + startY + " z")), 
        direction;
    }
    function textElement(options, font, color, parent, isMinus) {
        void 0 === isMinus && (isMinus = !1);
        var htmlObject, tspanElement, text, height, renderOptions = {}, renderer = new SvgRenderer("");
        if (renderOptions = {
            id: options.id,
            x: options.x,
            y: options.y,
            fill: color,
            "font-size": font.size,
            "font-style": font.fontStyle,
            "font-family": font.fontFamily,
            "font-weight": font.fontWeight,
            "text-anchor": options.anchor,
            transform: options.transform,
            opacity: font.opacity,
            "dominant-baseline": options.baseLine
        }, text = "string" == typeof options.text ? options.text : isMinus ? options.text[options.text.length - 1] : options.text[0], 
        htmlObject = renderer.createText(renderOptions, text), "string" != typeof options.text && options.text.length > 1) for (var i = 1, len = options.text.length; i < len; i++) height = measureText(options.text[i], font).height, 
        tspanElement = renderer.createTSpan({
            x: options.x,
            id: options.id,
            y: options.y + (isMinus ? -i * height : i * height)
        }, isMinus ? options.text[options.text.length - (i + 1)] : options.text[i]), htmlObject.appendChild(tspanElement);
        return parent.appendChild(htmlObject), htmlObject;
    }
    function calculateSize(chart) {
        var containerWidth = chart.element.clientWidth, containerHeight = chart.element.clientHeight;
        chart.availableSize = new Size(stringToNumber(chart.width, containerWidth) || containerWidth || 600, stringToNumber(chart.height, containerHeight) || containerHeight || 450);
    }
    function createSvg(chart) {
        chart.renderer = new SvgRenderer(chart.element.id), calculateSize(chart), chart.svgObject = chart.renderer.createSvg({
            id: chart.element.id + "_svg",
            width: chart.availableSize.width,
            height: chart.availableSize.height
        });
    }
    function getTitle(title, style, width) {
        var titleCollection = [];
        switch (style.textOverflow) {
          case "Wrap":
            titleCollection = textWrap(title, width, style);
            break;

          case "Trim":
            titleCollection.push(textTrim(width, title, style));
            break;

          default:
            titleCollection.push(title);
        }
        return titleCollection;
    }
    function titlePositionX(chartSize, leftPadding, rightPadding, titleStyle) {
        return "Near" === titleStyle.textAlignment ? leftPadding : "Center" === titleStyle.textAlignment ? chartSize.width / 2 : chartSize.width - rightPadding;
    }
    function textWrap(currentLabel, maximumWidth, font) {
        for (var text, textCollection = currentLabel.split(" "), label = "", labelCollection = [], i = 0, len = textCollection.length; i < len; i++) text = textCollection[i], 
        measureText(label.concat(text), font).width < maximumWidth ? label = label.concat(("" === label ? "" : " ") + text) : "" !== label ? (labelCollection.push(textTrim(maximumWidth, label, font)), 
        label = text) : (labelCollection.push(textTrim(maximumWidth, text, font)), text = ""), 
        label && i === len - 1 && labelCollection.push(textTrim(maximumWidth, label, font));
        return labelCollection;
    }
    function pointByIndex(index, points) {
        for (var _i = 0, points_1 = points; _i < points_1.length; _i++) {
            var point = points_1[_i];
            if (point.index === index) return point;
        }
        return null;
    }
    function validateNullOrUndefined(value, message) {
        if (null === value || void 0 === value) throw new Error("ArgumentException: " + message + " cannot be null or undefined");
    }
    function defaultToString(item) {
        return "[object String]" === Object.prototype.toString.call(item) ? "$s" + item : "$o" + item.toString();
    }
    function measureText$1(text, font) {
        var htmlObject = document.getElementById("gauge-measuretext");
        null === htmlObject && (htmlObject = createElement("text", {
            id: "gauge-measuretext"
        }), document.body.appendChild(htmlObject));
        var style = "position: absolute; visibility: hidden;;left: 0; top: -100; white-space: nowrap;" + getFontStyle$1(font);
        return htmlObject.innerHTML = text, htmlObject.setAttribute("style", style), new Size$1(htmlObject.clientWidth, htmlObject.clientHeight);
    }
    function toPixel(value, maxDimension) {
        return null !== value && void 0 !== value ? -1 !== value.indexOf("%") ? maxDimension / 100 * parseInt(value, 10) : parseInt(value, 10) : null;
    }
    function getFontStyle$1(font) {
        return "font-size:" + font.size + "; font-style:" + font.fontStyle + "; font-weight:" + font.fontWeight + "; font-family:" + font.fontFamily + ";opacity:" + font.opacity + "; color:" + font.color + ";";
    }
    function setStyles(element, fill, border) {
        setStyleAttribute(element, {
            stroke: border.color,
            "stroke-width": border.width,
            fill: fill
        });
    }
    function stringToNumber$1(value, containerSize) {
        return null !== value && void 0 !== value ? -1 !== value.indexOf("%") ? containerSize / 100 * parseInt(value, 10) : parseInt(value, 10) : null;
    }
    function textElement$1(options, font, color, parent, styles) {
        var htmlObject, renderOptions = {}, renderer = new SvgRenderer(""), style = styles + " font-size:" + font.size + "; font-style:" + font.fontStyle + " ; font-weight:" + font.fontWeight + "; font-family:" + font.fontFamily + ";";
        return renderOptions = {
            id: options.id,
            x: options.x,
            y: options.y,
            fill: color,
            "text-anchor": options.anchor,
            transform: options.transform,
            opacity: font.opacity,
            "dominant-baseline": options.baseLine,
            style: style
        }, htmlObject = renderer.createText(renderOptions, options.text), parent.appendChild(htmlObject), 
        htmlObject;
    }
    function appendPath(options, element, gauge, functionName) {
        functionName = functionName || "Path";
        var htmlObject = gauge.renderer["draw" + functionName](options);
        return htmlObject.setAttribute("transform", options.transform), htmlObject.setAttribute("style", options.style), 
        element.appendChild(htmlObject), htmlObject;
    }
    function linear$1(currentTime, startValue, endValue, duration) {
        return -endValue * Math.cos(currentTime / duration * (Math.PI / 2)) + endValue + startValue;
    }
    function getAngleFromValue(value, maximumValue, minimumValue, startAngle, endAngle, isClockWise) {
        var angle;
        return endAngle -= isCompleteAngle(startAngle, endAngle) ? 1e-4 : 0, startAngle -= 90, 
        endAngle -= 90, angle = isClockWise ? (value - minimumValue) * (getDegree(startAngle, endAngle) / (maximumValue - minimumValue)) + startAngle : (angle = endAngle - (value - minimumValue) * (getDegree(startAngle, endAngle) / (maximumValue - minimumValue))) < 0 ? 360 + angle : angle, 
        angle = Math.round(angle) >= 360 ? angle - 360 : Math.round(angle) < 0 ? 360 + angle : angle;
    }
    function getDegree(startAngle, endAngle) {
        var degree = endAngle - startAngle;
        return degree < 0 ? degree + 360 : degree;
    }
    function isCompleteAngle(startAngle, endAngle) {
        var totalAngle = endAngle - startAngle;
        return totalAngle = totalAngle <= 0 ? totalAngle + 360 : totalAngle, 0 !== Math.floor(totalAngle / 360);
    }
    function getLocationFromAngle(degree, radius, center) {
        var radian = degree * Math.PI / 180;
        return new GaugeLocation(Math.cos(radian) * radius + center.x, Math.sin(radian) * radius + center.y);
    }
    function getPathArc(center, start, end, radius, startWidth, endWidth) {
        var degree = getDegree(start, end -= isCompleteAngle(start, end) ? 1e-4 : 0), startRadius = radius - startWidth, endRadius = radius - endWidth, arcRadius = radius - (startWidth + endWidth) / 2;
        return void 0 !== startWidth && void 0 !== endWidth ? function(start, end, innerStart, innerEnd, radius, startRadius, endRadius, clockWise) {
            return "M " + start.x + " " + start.y + " A " + radius + " " + radius + " 0 " + clockWise + " 1 " + end.x + " " + end.y + " L " + innerEnd.x + " " + innerEnd.y + " A " + endRadius + " " + startRadius + " 0 " + clockWise + " 0 " + innerStart.x + " " + innerStart.y + " Z";
        }(getLocationFromAngle(start, radius, center), getLocationFromAngle(end, radius, center), getLocationFromAngle(start, startRadius, center), getLocationFromAngle(end, endRadius, center), radius, arcRadius, arcRadius, degree < 180 ? 0 : 1) : function(start, end, radius, clockWise) {
            return "M " + start.x + " " + start.y + " A " + radius + " " + radius + " 0 " + clockWise + " 1 " + end.x + " " + end.y;
        }(getLocationFromAngle(start, radius, center), getLocationFromAngle(end, radius, center), radius, degree < 180 ? 0 : 1);
    }
    function getCompleteArc(center, start, end, radius, innerRadius) {
        var degree = getDegree(start, end -= isCompleteAngle(start, end) ? 1e-4 : 0);
        return function(center, start, end, radius, innerStart, innerEnd, innerRadius, clockWise) {
            return "M " + start.x + " " + start.y + " A " + radius + " " + radius + " 0 " + clockWise + " 1 " + end.x + " " + end.y + " L " + innerEnd.x + " " + innerEnd.y + " A " + innerRadius + " " + innerRadius + " 0 " + clockWise + ",0 " + innerStart.x + " " + innerStart.y + " Z";
        }(0, getLocationFromAngle(start, radius, center), getLocationFromAngle(end, radius, center), radius, getLocationFromAngle(start, innerRadius, center), getLocationFromAngle(end, innerRadius, center), innerRadius, degree < 180 ? 0 : 1);
    }
    function getElement$1(id) {
        return document.getElementById(id);
    }
    function getTemplateFunction$1(template) {
        var templateFn = null;
        try {
            document.querySelectorAll(template).length && (templateFn = compile$$1(document.querySelector(template).innerHTML.trim()));
        } catch (e) {
            templateFn = compile$$1(template);
        }
        return templateFn;
    }
    function removeElement$2(id) {
        var element = getElement$1(id);
        element && remove(element);
    }
    function getPointer(targetId, gauge) {
        var tempString;
        return tempString = targetId.split(gauge.element.id + "_Axis_")[1], {
            axisIndex: +tempString[0],
            pointerIndex: +tempString[tempString.length - 1]
        };
    }
    function getLabelFormat(format) {
        return format && null !== format.match("{value}") ? "" : format;
    }
    function calculateShapes$1(location, shape, size, url, options) {
        var width = size.width, height = size.height, locX = location.x, locY = location.y, x = location.x + -width / 2, y = location.y + -height / 2;
        switch (shape) {
          case "Circle":
            merge(options, {
                rx: width / 2,
                ry: height / 2,
                cx: locX,
                cy: locY
            });
            break;

          case "Diamond":
            merge(options, {
                d: "M " + x + " " + locY + " L " + locX + " " + (locY + -height / 2) + " L " + (locX + width / 2) + " " + locY + " L " + locX + " " + (locY + height / 2) + " L " + x + " " + locY + " Z"
            });
            break;

          case "Rectangle":
            merge(options, {
                d: "M " + x + " " + (locY + -height / 2) + " L " + (locX + width / 2) + " " + (locY + -height / 2) + " L " + (locX + width / 2) + " " + (locY + height / 2) + " L " + x + " " + (locY + height / 2) + " L " + x + " " + (locY + -height / 2) + " Z"
            });
            break;

          case "Triangle":
            merge(options, {
                d: "M " + locX + " " + locY + " L " + (locX - height) + " " + (locY - width / 2) + "L " + (locX - height) + " " + (locY + width / 2) + " Z"
            });
            break;

          case "InvertedTriangle":
            merge(options, {
                d: "M " + locX + " " + locY + " L " + (locX + height) + " " + (locY - width / 2) + "L " + (locX + height) + " " + (locY + width / 2) + " Z"
            });
            break;

          case "Image":
            merge(options, {
                href: url,
                height: height,
                width: width,
                x: x,
                y: y
            });
        }
        return options;
    }
    function getRangeColor(value, ranges, color) {
        var min = 0, max = 0, currentRange = ranges.filter(function(range) {
            return min = Math.min(range.start, range.end), max = Math.max(range.start, range.end), 
            value >= min && max >= value;
        });
        return currentRange.length ? currentRange[0].rangeColor : color;
    }
    function setStateAndProperties(target, attribute, value, remove) {
        remove ? target.removeAttribute(attribute) : target && target.setAttribute(attribute, value);
    }
    function stringToNumber$2(value, containerSize) {
        return null !== value && void 0 !== value ? -1 !== value.indexOf("%") ? containerSize / 100 * parseInt(value, 10) : parseInt(value, 10) : null;
    }
    function measureText$2(text, font) {
        var htmlObject = document.getElementById("gauge-measuretext");
        return null === htmlObject && (htmlObject = createElement("text", {
            id: "gauge-measuretext"
        }), document.body.appendChild(htmlObject)), htmlObject.innerHTML = text, htmlObject.style.position = "absolute", 
        htmlObject.style.fontSize = font.size, htmlObject.style.fontWeight = font.fontWeight, 
        htmlObject.style.fontStyle = font.fontStyle, htmlObject.style.fontFamily = font.fontFamily, 
        htmlObject.style.visibility = "hidden", htmlObject.style.top = "-100", htmlObject.style.left = "0", 
        htmlObject.style.whiteSpace = "nowrap", new Size$2(htmlObject.clientWidth, htmlObject.clientHeight);
    }
    function withInRange$1(value, start, end, max, min, type) {
        return "pointer" === type ? value <= max && value >= min : null != start && start <= max && start >= min && null != end && end <= max && end >= min;
    }
    function convertPixelToValue(parentElement, pointerElement, orientation, axis, type, location) {
        var elementRect = parentElement.getBoundingClientRect(), pointerRect = pointerElement.getBoundingClientRect(), height = pointerElement.id.indexOf("MarkerPointer") > -1 ? pointerRect.height / 2 : axis.isInversed ? pointerRect.height : 0, width = pointerElement.id.indexOf("MarkerPointer") > -1 ? pointerRect.width / 2 : axis.isInversed ? 0 : pointerRect.width, size = new Size$2(axis.lineBounds.width, axis.lineBounds.height), y = "drag" === type ? location.y - axis.lineBounds.y : pointerRect.top + height - elementRect.top - axis.lineBounds.y, x = "drag" === type ? location.x - axis.lineBounds.x : pointerRect.left + width - elementRect.left - axis.lineBounds.x, newSize = "Vertical" === orientation ? size.height : size.width, divideVal = "Vertical" === orientation ? y : x, value = "Vertical" === orientation ? axis.isInversed ? divideVal / newSize : 1 - divideVal / newSize : axis.isInversed ? 1 - divideVal / newSize : divideVal / newSize;
        return value = value * axis.visibleRange.delta + axis.visibleRange.min;
    }
    function getElement$2(id) {
        return document.getElementById(id);
    }
    function isPointerDrag(axes) {
        var pointerEnable = !1;
        return axes.map(function(axis, index) {
            axis.pointers.map(function(pointer, index) {
                pointer.enableDrag && (pointerEnable = !0);
            });
        }), pointerEnable;
    }
    function valueToCoefficient$1(value, axis, orientation, range) {
        var result = (value - range.min) / range.delta;
        return result = "Vertical" === orientation ? axis.isInversed ? result : 1 - result : axis.isInversed ? 1 - result : result;
    }
    function getLabelFormat$1(format) {
        return format && null !== format.match("{value}") ? "" : format;
    }
    function getTemplateFunction$2(template) {
        var templateFn = null;
        try {
            document.querySelectorAll(template).length && (templateFn = compile$$1(document.querySelector(template).innerHTML.trim()));
        } catch (e) {
            templateFn = compile$$1(template);
        }
        return templateFn;
    }
    function textElement$2(options, font, color, parent) {
        var htmlObject, renderOptions = {}, renderer = new SvgRenderer(""), style = "fill:" + color + "; font-size:" + font.size + "; font-style:" + font.fontStyle + " ; font-weight:" + font.fontWeight + "; font-family:" + font.fontFamily + "; text-anchor:" + options.anchor + "; transform:" + options.transform + "; opacity:" + font.opacity + "; dominant-baseline:" + options.baseLine + ";";
        return renderOptions = {
            id: options.id,
            x: options.x,
            y: options.y,
            style: style
        }, htmlObject = renderer.createText(renderOptions, options.text), parent.appendChild(htmlObject), 
        htmlObject;
    }
    function calculateNiceInterval(min, max, size, orientation) {
        for (var currentInterval, delta = max - min, desiredIntervalsCount = function(size, orientation) {
            var desiredIntervalsCount = 5 * ("Horizontal" === orientation ? .533 : 1);
            return desiredIntervalsCount = Math.max(size * (desiredIntervalsCount / 100), 1);
        }(size, orientation), niceInterval = delta / desiredIntervalsCount, minInterval = Math.pow(10, Math.floor(Math.log(niceInterval) / Math.log(10))), _i = 0, intervalDivs_1 = [ 10, 5, 2, 1 ]; _i < intervalDivs_1.length; _i++) {
            if (currentInterval = minInterval * intervalDivs_1[_i], desiredIntervalsCount < delta / currentInterval) break;
            niceInterval = currentInterval;
        }
        return niceInterval;
    }
    function getPointer$1(target, gauge) {
        var axisIndex, pointIndex, axis, pointer, split = [];
        return split = target.id.split("_"), axisIndex = parseInt(split[2], 10), pointIndex = parseInt(split[4], 10), 
        axis = gauge.axes[axisIndex], pointer = gauge.axes[axisIndex].pointers[pointIndex], 
        {
            axis: axis,
            axisIndex: axisIndex,
            pointer: pointer,
            pointerIndex: pointIndex
        };
    }
    function getRangeColor$1(value, ranges) {
        var rangeColor = null;
        return ranges.forEach(function(range, index) {
            value >= range.start && range.end >= value && (rangeColor = range.interior);
        }), rangeColor;
    }
    function calculateShapes$2(location, shape, size, url, options, orientation, axis, pointer) {
        var radius, width = size.width, height = size.height, locX = location.x, locY = location.y;
        switch (shape) {
          case "Circle":
            merge(options, {
                r: radius = (width + height) / 4,
                cx: locX = "Vertical" === orientation ? axis.opposedPosition ? "Near" === pointer.placement ? locX - radius : locX + radius : "Far" !== pointer.placement ? locX - radius : locX + radius : locX,
                cy: locY = "Vertical" === orientation ? locY : axis.opposedPosition ? "Near" === pointer.placement ? locY - radius : locY + radius : "Far" === pointer.placement ? locY + radius : locY - radius
            });
            break;

          case "Diamond":
          case "Rectangle":
            locX = "Horizontal" === orientation ? locX - width / 2 : !axis.opposedPosition && "Far" !== pointer.placement || axis.opposedPosition && "Near" === pointer.placement ? locX - width : locX, 
            locY = "Vertical" === orientation ? locY : axis.opposedPosition ? "Near" === pointer.placement ? locY - height / 2 : locY + height / 2 : "Far" === pointer.placement ? locY + height / 2 : locY - height / 2, 
            merge(options, {
                d: "Diamond" === shape ? "M " + locX + " " + locY + " L " + (locX + width / 2) + " " + (locY - height / 2) + " L " + (locX + width) + " " + locY + " L " + (locX + width / 2) + " " + (locY + height / 2) + " L " + locX + " " + locY + " z" : "M " + locX + " " + (locY - height / 2) + " L " + (locX + width) + " " + (locY - height / 2) + " L " + (locX + width) + " " + (locY + height / 2) + " L " + locX + " " + (locY + height / 2) + " L " + locX + " " + (locY - height / 2) + " z"
            });
            break;

          case "Triangle":
            merge(options, {
                d: "Vertical" === orientation ? "M " + locX + " " + locY + " L" + (locX - width) + " " + (locY - height / 2) + "L" + (locX - width) + " " + (locY + height / 2) + " Z" : "M " + locX + " " + locY + " L" + (locX + width / 2) + " " + (locY - height) + "L" + (locX - width / 2) + " " + (locY - height) + " Z"
            });
            break;

          case "InvertedTriangle":
            merge(options, {
                d: "Vertical" === orientation ? "M " + locX + " " + locY + " L" + (locX + width) + " " + (locY - height / 2) + "L" + (locX + width) + " " + (locY + height / 2) + " Z" : "M " + locX + " " + locY + " L" + (locX + width / 2) + " " + (locY + height) + "L" + (locX - width / 2) + " " + (locY + height) + " Z"
            });
            break;

          case "Arrow":
            merge(options, {
                d: "Vertical" === orientation ? "M " + locX + " " + locY + " L" + (locX - width / 2) + " " + (locY - height / 2) + " L" + (locX - width / 2) + " " + (locY - height / 2 + height / 4) + " L" + (locX - width) + " " + (locY - height / 2 + height / 4) + " L" + (locX - width) + " " + (locY + height / 2 - height / 4) + " L" + (locX - width / 2) + " " + (locY + height / 2 - height / 4) + " L" + (locX - width / 2) + " " + (locY + height / 2) + "z" : "M " + locX + " " + locY + " L" + (locX + width / 2) + " " + (locY - height / 2) + " L" + (locX + width / 2 - width / 4) + " " + (locY - height / 2) + " L" + (locX + width / 2 - width / 4) + " " + (locY - height) + " L" + (locX - width / 2 + width / 4) + " " + (locY - height) + " L" + (locX - width / 2 + width / 4) + " " + (locY - height / 2) + " L" + (locX - width / 2) + " " + (locY - height / 2) + "z"
            });
            break;

          case "InvertedArrow":
            merge(options, {
                d: "Vertical" === orientation ? "M " + locX + " " + locY + "L" + (locX + width / 2) + " " + (locY - height / 2) + " L" + (locX + width / 2) + " " + (locY - height / 2 + height / 4) + " L" + (locX + width) + " " + (locY - height / 2 + height / 4) + " L" + (locX + width) + " " + (locY + height / 2 - height / 4) + " L" + (locX + width / 2) + " " + (locY + height / 2 - height / 4) + " L" + (locX + width / 2) + " " + (locY + height / 2) + "z" : "M " + locX + " " + locY + " L" + (locX + width / 2) + " " + (locY + height / 2) + " L" + (locX + width / 2 - width / 4) + " " + (locY + height / 2) + " L" + (locX + width / 2 - width / 4) + " " + (locY + height) + " L" + (locX - width / 2 + width / 4) + " " + (locY + height) + " L" + (locX - width / 2 + width / 4) + " " + (locY + height / 2) + " L" + (locX - width / 2) + " " + (locY + height / 2) + "z"
            });
            break;

          case "Image":
            merge(options, {
                href: url,
                height: height,
                width: width,
                x: locX - width / 2,
                y: locY - height / 2
            });
        }
        return options;
    }
    function getBox(location, boxName, orientation, size, type, containerWidth, axis, cornerRadius) {
        var x1, y1, rectWidth, rectHeight, bottomRadius, topRadius, path = " ", radius = cornerRadius;
        switch (boxName) {
          case "RoundedRectangle":
            path = "M " + (x1 = location.x) + " " + (radius + (y1 = location.y)) + " Q " + x1 + " " + y1 + " " + (x1 + radius) + " " + y1 + " ", 
            path += "L " + (x1 + (rectWidth = location.width) - radius) + " " + y1 + " Q " + (x1 + rectWidth) + " " + y1 + " " + (x1 + rectWidth) + " " + (y1 + radius) + " ", 
            path += "L " + (x1 + rectWidth) + " " + (y1 + (rectHeight = location.height) - radius) + " Q " + (x1 + rectWidth) + " " + (y1 + rectHeight) + " " + (x1 + rectWidth - radius) + " " + (y1 + rectHeight) + " ", 
            path += " L " + (x1 + radius) + " " + (y1 + rectHeight) + " Q " + x1 + " " + (y1 + rectHeight) + " " + x1 + " " + (y1 + rectHeight - radius) + " ", 
            path += "L " + x1 + " " + (radius + y1) + " z";
            break;

          case "Thermometer":
            var width = "Vertical" === orientation ? location.width : location.height;
            if (bottomRadius = width + width / 2 / Math.PI, topRadius = width / 2, "Vertical" === orientation) {
                var addValue = containerWidth + containerWidth / 2 / Math.PI - bottomRadius, y1_1 = "bar" === type ? location.y + addValue : location.y, locY = "bar" === type ? location.y + (topRadius - topRadius / Math.PI) : location.y, locHeight = location.height;
                path = "M" + location.x + " " + (y1_1 + locHeight) + " A " + bottomRadius + " " + bottomRadius + ", 0, 1, 0, " + (location.x + location.width) + " " + (y1_1 + locHeight) + " L " + (location.x + location.width) + " " + locY + " A " + topRadius + " " + topRadius + ", 0, 1, 0, " + location.x + " " + locY + " z ";
            } else {
                var x1_1 = "bar" !== type || axis.isInversed ? location.x : location.x - (containerWidth + containerWidth / 2 / Math.PI - bottomRadius), locWidth = "bar" === type ? location.width - (topRadius - topRadius / Math.PI) : location.width;
                path = "M" + x1_1 + " " + location.y + " A " + bottomRadius + " " + bottomRadius + ", 0, 1, 0, " + x1_1 + " " + (location.y + location.height) + " L " + (("bar" === type ? location.x : x1_1) + locWidth) + " " + (location.y + location.height) + " A " + topRadius + " " + topRadius + ", 0, 1, 0, " + (("bar" === type ? location.x : x1_1) + locWidth) + " " + location.y + " z ";
            }
        }
        return path;
    }
    function stringToNumber$3(value, containerSize) {
        return null !== value && void 0 !== value ? -1 !== value.indexOf("%") ? containerSize / 100 * parseInt(value, 10) : parseInt(value, 10) : null;
    }
    function createSvg$1(maps) {
        maps.renderer = new SvgRenderer(maps.element.id), function(maps) {
            var containerWidth = maps.element.clientWidth, containerHeight = maps.element.clientHeight;
            maps.availableSize = new Size$3(stringToNumber$3(maps.width, containerWidth) || containerWidth || 600, stringToNumber$3(maps.height, containerHeight) || containerHeight || (maps.isDevice ? Math.min(window.innerWidth, window.innerHeight) : 450));
        }(maps), maps.svgObject = maps.renderer.createSvg({
            id: maps.element.id + "_svg",
            width: maps.availableSize.width,
            height: maps.availableSize.height
        });
    }
    function degreesToRadians(deg) {
        return deg * (Math.PI / 180);
    }
    function radiansToDegrees(radian) {
        return radian * (180 / Math.PI);
    }
    function convertGeoToPoint(latitude, longitude, factor, layer, mapModel) {
        var x, y, value, lat, lng, temp, mapSize = new Size$3(mapModel.mapAreaRect.width, mapModel.mapAreaRect.height), longitudeMinMax = mapModel.baseMapBounds.longitude, latitudeMinMax = mapModel.baseMapBounds.latitude, latRadian = degreesToRadians(latitude), lngRadian = degreesToRadians(longitude), type = mapModel.projectionType, size = mapModel.isTileMap ? 256 * Math.pow(2, 1) : isNullOrUndefined(factor) ? Math.min(mapSize.width, mapSize.height) : Math.min(mapSize.width, mapSize.height) * factor;
        if ("Normal" === layer.geometryType) x = isNullOrUndefined(factor) ? longitude : Math.abs((longitude - longitudeMinMax.min) * factor), 
        y = isNullOrUndefined(factor) ? latitude : Math.abs((latitudeMinMax.max - latitude) * factor); else if ("Geographic" === layer.geometryType) {
            switch (type) {
              case "Mercator":
                var pixelOrigin = new Point(size / 2, size / 2);
                x = pixelOrigin.x + longitude * (size / 360);
                var sinY = function(value, min, max) {
                    isNullOrUndefined(min) || (value = Math.max(value, min));
                    isNullOrUndefined(max) || (value = Math.min(value, max));
                    return value;
                }(Math.sin(degreesToRadians(latitude)), -.9999, .9999);
                y = pixelOrigin.y + .5 * Math.log((1 + sinY) / (1 - sinY)) * (-size / (2 * Math.PI));
                break;

              case "Winkel3":
                lng = ((value = aitoff(lngRadian, latRadian)).x + lngRadian / (Math.PI / 2)) / 2, 
                lat = (value.y + latRadian) / 2;
                break;

              case "Miller":
                lng = lngRadian, lat = 1.25 * Math.log(Math.tan(Math.PI / 4 + .4 * latRadian));
                break;

              case "Eckert3":
                lng = 2 / (temp = Math.sqrt(Math.PI * (4 + Math.PI))) * lngRadian * (1 + Math.sqrt(1 - 4 * latRadian * latRadian / (Math.PI * Math.PI))), 
                lat = 4 / temp * latRadian;
                break;

              case "AitOff":
                lng = (value = aitoff(lngRadian, latRadian)).x, lat = value.y;
                break;

              case "Eckert5":
                lng = lngRadian * (1 + Math.cos(latRadian)) / Math.sqrt(2 + Math.PI), lat = 2 * latRadian / Math.sqrt(2 + Math.PI);
                break;

              case "Equirectangular":
                lng = lngRadian, lat = latRadian;
                break;

              case "Eckert6":
                temp = (1 + Math.PI / 2) * Math.sin(latRadian);
                for (var delta = 1 / 0, i = 0; i < 10 && Math.abs(delta) > 1e-6; i++) latRadian -= delta = (latRadian + Math.sin(latRadian) - temp) / (1 + Math.cos(latRadian));
                temp = Math.sqrt(2 + Math.PI), lng = lngRadian * (1 + Math.cos(latRadian)) / temp, 
                lat = 2 * latRadian / temp;
            }
            x = "Mercator" === type ? x : roundTo(function(mapObject, val) {
                var longitudeMinMax = mapObject.baseMapBounds.longitude, totalSize = isNullOrUndefined(mapObject.baseSize) ? mapObject.mapAreaRect.width : mapObject.mapAreaRect.width + Math.abs(mapObject.baseSize.width - mapObject.mapAreaRect.width) / 2;
                return Math.round(totalSize * (val - longitudeMinMax.min) / (longitudeMinMax.max - longitudeMinMax.min) * 100) / 100;
            }(mapModel, radiansToDegrees(lng)), 3), y = "Mercator" === type ? y : -roundTo(function(mapObject, val) {
                var latitudeMinMax = mapObject.baseMapBounds.latitude;
                return Math.round(mapObject.mapAreaRect.height * (val - latitudeMinMax.min) / (latitudeMinMax.max - latitudeMinMax.min) * 100) / 100;
            }(mapModel, radiansToDegrees(lat)), 3);
        }
        return new Point(x, y);
    }
    function convertTileLatLongToPoint(center, zoomLevel, tileTranslatePoint, isMapCoordinates) {
        var size = 256 * Math.pow(2, zoomLevel), x = (center.x + 180) / 360, sinLatitude = Math.sin(center.y * Math.PI / 180), y = .5 - Math.log((1 + sinLatitude) / (1 - sinLatitude)) / (4 * Math.PI), pixelX = center.x, pixelY = center.y;
        return isMapCoordinates && (pixelX = x * size + .5 + tileTranslatePoint.x, pixelY = y * size + .5 + tileTranslatePoint.y), 
        {
            x: pixelX,
            y: pixelY
        };
    }
    function aitoff(x, y) {
        var cosy = Math.cos(y), sincia = function(x) {
            return x / Math.sin(x);
        }(function(a) {
            return Math.acos(a);
        }(cosy * Math.cos(x /= 2)));
        return new Point(2 * cosy * Math.sin(x) * sincia, Math.sin(y) * sincia);
    }
    function roundTo(a, b) {
        var c = Math.pow(10, b);
        return Math.round(a * c) / c;
    }
    function measureText$3(text, font) {
        var htmlObject = document.getElementById("mapsmeasuretext");
        return null === htmlObject && (htmlObject = createElement("text", {
            id: "mapsmeasuretext"
        }), document.body.appendChild(htmlObject)), htmlObject.innerHTML = text, htmlObject.style.position = "absolute", 
        htmlObject.style.fontSize = font.size, htmlObject.style.fontWeight = font.fontWeight, 
        htmlObject.style.fontStyle = font.fontStyle, htmlObject.style.fontFamily = font.fontFamily, 
        htmlObject.style.visibility = "hidden", htmlObject.style.top = "-100", htmlObject.style.left = "0", 
        htmlObject.style.whiteSpace = "nowrap", htmlObject.style.lineHeight = "normal", 
        new Size$3(htmlObject.clientWidth, htmlObject.clientHeight);
    }
    function renderTextElement(options, font, color, parent, isMinus) {
        void 0 === isMinus && (isMinus = !1);
        var tspanElement, height, renderOptions = {
            id: options.id,
            x: options.x,
            y: options.y,
            fill: color,
            "font-size": font.size,
            "font-style": font.fontStyle,
            "font-family": font.fontFamily,
            "font-weight": font.fontWeight,
            "text-anchor": options.anchor,
            transform: options.transform,
            opacity: font.opacity,
            "dominant-baseline": options.baseLine
        }, text = "string" == typeof options.text ? options.text : isMinus ? options.text[options.text.length - 1] : options.text[0], renderer = new SvgRenderer(""), htmlObject = renderer.createText(renderOptions, text);
        if (htmlObject.style["user-select"] = "none", htmlObject.style["-moz-user-select"] = "none", 
        htmlObject.style["-webkit-touch-callout"] = "none", htmlObject.style["-webkit-user-select"] = "none", 
        htmlObject.style["-khtml-user-select"] = "none", htmlObject.style["-ms-user-select"] = "none", 
        htmlObject.style["-o-user-select"] = "none", "string" != typeof options.text && options.text.length > 1) for (var i = 1, len = options.text.length; i < len; i++) height = measureText$3(options.text[i], font).height, 
        tspanElement = renderer.createTSpan({
            x: options.x,
            id: options.id,
            y: options.y + (isMinus ? -i * height : i * height)
        }, isMinus ? options.text[options.text.length - (i + 1)] : options.text[i]), htmlObject.appendChild(tspanElement);
        return parent.appendChild(htmlObject), htmlObject;
    }
    function appendShape(shape, element) {
        return element && element.appendChild(shape), shape;
    }
    function calculateShapes$3(maps, shape, options, size, location, markerEle) {
        var tempGroup;
        switch (shape) {
          case "Balloon":
            tempGroup = function(maps, options, size, location, element) {
                var width = size.width, height = size.height;
                location.x -= width / 2, location.y -= height, options.d = "M15,0C8.8,0,3.8,5,3.8,11.2C3.8,17.5,9.4,24.4,15,30c5.6-5.6,11.2-12.5,11.2-18.8C26.2,5,21.2,0,15,0z M15,16c-2.8,0-5-2.2-5-5s2.2-5,5-5s5,2.2,5,5S17.8,16,15,16z";
                var balloon = maps.renderer.drawPath(options), x = size.width / 22.5, y = size.height / 30;
                balloon.setAttribute("transform", "translate(" + location.x + ", " + location.y + ") scale(" + x + ", " + y + ")");
                var g = maps.renderer.createGroup({
                    id: options.id
                });
                return appendShape(balloon, g), appendShape(g, element);
            }(maps, options, size, location, markerEle);
            break;

          case "Cross":
            options.d = "M " + location.x + " " + (location.y - size.height / 2) + " L " + location.x + " " + (location.y + size.height / 2) + " M " + (location.x - size.width / 2) + " " + location.y + " L " + (location.x + size.width / 2) + " " + location.y;
            break;

          case "Diamond":
            options.d = "M " + location.x + " " + (location.y - size.height / 2) + " L " + (location.x + size.width / 2) + " " + location.y + " L " + location.x + " " + (location.y + size.height / 2) + " L " + (location.x - size.width / 2) + " " + location.y + " Z";
            break;

          case "Star":
            options.d = "M " + (location.x + size.width / 3) + " " + (location.y - size.height / 2) + " L " + (location.x - size.width / 2) + " " + (location.y + size.height / 6) + " L " + (location.x + size.width / 2) + " " + (location.y + size.height / 6) + " L " + (location.x - size.width / 3) + " " + (location.y - size.height / 2) + " L " + location.x + " " + (location.y + size.height / 2) + " L " + (location.x + size.width / 3) + " " + (location.y - size.height / 2) + " Z";
            break;

          case "Triangle":
            options.d = "M " + location.x + " " + (location.y - size.height / 2) + " L " + (location.x + size.width / 2) + " " + (location.y + size.height / 2) + " L " + (location.x - size.width / 2) + " " + (location.y + size.height / 2) + " Z";
            break;

          case "HorizontalLine":
            options.d = " M " + (location.x - size.width / 2) + " " + location.y + " L " + (location.x + size.width / 2) + " " + location.y;
            break;

          case "VerticalLine":
            options.d = "M " + location.x + " " + (location.y - size.height / 2) + " L " + location.x + " " + (location.y + size.height / 2);
        }
        return "Balloon" === shape ? tempGroup : maps.renderer.drawPath(options);
    }
    function checkShapeDataFields(dataSource, properties, dataPath, propertyPath) {
        if (!isNullOrUndefined(properties)) for (var i = 0; i < dataSource.length; i++) if (dataSource[i][dataPath] === properties[propertyPath]) return i;
        return null;
    }
    function findMidPointOfPolygon(points) {
        if (!points.length) return null;
        for (var startX, startY, startX1, startY1, max = points.length, sum = 0, xSum = 0, ySum = 0, i = 0; i <= max - 1; i++) startX = points[i].x, 
        startY = points[i].y, i === max - 1 ? (startX1 = points[0].x, startY1 = points[0].y) : (startX1 = points[i + 1].x, 
        startY1 = points[i + 1].y), sum += Math.abs(startX * startY1 - startX1 * startY), 
        xSum += Math.abs((startX + startX1) * (startX * startY1 - startX1 * startY)), ySum += Math.abs((startY + startY1) * (startX * startY1 - startX1 * startY));
        xSum *= 1 / (4 * (sum *= .5)), ySum *= 1 / (4 * sum);
        var rightMinPoint = {
            x: 0,
            y: 0
        }, rightMaxPoint = {
            x: 0,
            y: 0
        }, leftMinPoint = {
            x: 0,
            y: 0
        }, leftMaxPoint = {
            x: 0,
            y: 0
        }, bottomMinPoint = {
            x: 0,
            y: 0
        }, bottomMaxPoint = {
            x: 0,
            y: 0
        }, topMinPoint = {
            x: 0,
            y: 0
        }, topMaxPoint = {
            x: 0,
            y: 0
        }, height = 0;
        for (i = 0; i <= max - 1; i++) {
            var point = points[i];
            point.y > ySum ? point.x < xSum && xSum - point.x < xSum - bottomMinPoint.x ? bottomMinPoint = {
                x: point.x,
                y: point.y
            } : point.x > xSum && (0 === bottomMaxPoint.x || point.x - xSum < bottomMaxPoint.x - xSum) && (bottomMaxPoint = {
                x: point.x,
                y: point.y
            }) : point.x < xSum && xSum - point.x < xSum - topMinPoint.x ? topMinPoint = {
                x: point.x,
                y: point.y
            } : point.x > xSum && (0 === topMaxPoint.x || point.x - xSum < topMaxPoint.x - xSum) && (topMaxPoint = {
                x: point.x,
                y: point.y
            }), height = bottomMaxPoint.y - topMaxPoint.y + (bottomMaxPoint.y - topMaxPoint.y) / 4, 
            point.x > xSum ? point.y < ySum && ySum - point.y < ySum - rightMinPoint.y ? rightMinPoint = {
                x: point.x,
                y: point.y
            } : point.y > ySum && (0 === rightMaxPoint.y || point.y - ySum < rightMaxPoint.y - ySum) && (rightMaxPoint = {
                x: point.x,
                y: point.y
            }) : point.y < ySum && ySum - point.y < ySum - leftMinPoint.y ? leftMinPoint = {
                x: point.x,
                y: point.y
            } : point.y > ySum && (0 === leftMaxPoint.y || point.y - ySum < leftMaxPoint.y - ySum) && (leftMaxPoint = {
                x: point.x,
                y: point.y
            });
        }
        return {
            x: xSum,
            y: ySum,
            rightMin: rightMinPoint,
            rightMax: rightMaxPoint,
            leftMin: leftMinPoint,
            leftMax: leftMaxPoint,
            points: points,
            topMax: topMaxPoint,
            topMin: topMinPoint,
            bottomMax: bottomMaxPoint,
            bottomMin: bottomMinPoint,
            height: height
        };
    }
    function isCustomPath(layerData) {
        var customPath = !1;
        return "[object Array]" === Object.prototype.toString.call(layerData) && layerData.forEach(function(layer, index) {
            isNullOrUndefined(layer.geometry) || "Path" !== layer.geometry.type || (customPath = !0);
        }), customPath;
    }
    function textTrim$1(maxWidth, text, font) {
        var label = text, size = measureText$3(text, font).width;
        if (size > maxWidth) for (var i = text.length - 1; i >= 0; --i) if (label = text.substring(0, i) + "...", 
        (size = measureText$3(label, font).width) <= maxWidth || label.length < 4) return label.length < 4 && (label = " "), 
        label;
        return label;
    }
    function removeElement$4(id) {
        var element = document.getElementById(id);
        return element ? remove(element) : null;
    }
    function getTranslate(mapObject, layer, animate) {
        var x, y, scaleFactor, zoomFactor = animate ? 1 : mapObject.zoomSettings.zoomFactor, min = mapObject.baseMapRectBounds.min, max = mapObject.baseMapRectBounds.max, size = mapObject.mapAreaRect, mapWidth = (mapObject.availableSize, 
        Math.abs(max.x - min.x)), mapHeight = Math.abs(min.y - max.y), factor = animate ? 1 : mapObject.zoomSettings.zoomFactor, center = mapObject.centerPosition;
        if (isNullOrUndefined(center.longitude) || isNullOrUndefined(center.latitude)) mapWidth *= scaleFactor = parseFloat(Math.min(size.width / mapWidth, size.height / mapHeight).toFixed(2)), 
        mapHeight *= scaleFactor, x = size.x + (-min.x + (size.width / 2 - mapWidth / 2)), 
        y = size.y + (-min.y + (size.height / 2 - mapHeight / 2)); else {
            var leftPosition = (mapWidth + Math.abs(mapObject.mapAreaRect.width - mapWidth)) / 2 / factor, topPosition = (mapHeight + Math.abs(mapObject.mapAreaRect.height - mapHeight)) / 2 / factor, point = convertGeoToPoint(center.latitude, center.longitude, mapObject.mapLayerPanel.calculateFactor(layer), layer, mapObject);
            x = -point.x + leftPosition, y = -point.y + topPosition, scaleFactor = zoomFactor;
        }
        return {
            scale: scaleFactor,
            location: new Point(x, y)
        };
    }
    function getElementByID(id) {
        return document.getElementById(id);
    }
    function Internalize(maps, value) {
        return maps.formatFunction = maps.intl.getNumberFormat({
            format: maps.format,
            useGrouping: maps.useGroupingSeparator
        }), maps.formatFunction(value);
    }
    function getTemplateFunction$3(template) {
        var templateFn = null;
        try {
            document.querySelectorAll(template).length && (templateFn = compile$$1(document.querySelector(template).innerHTML.trim()));
        } catch (e) {
            templateFn = compile$$1(template);
        }
        return templateFn;
    }
    function getElement$3(id) {
        return document.getElementById(id);
    }
    function triggerShapeEvent(targetId, selection, maps, eventName) {
        var shape = function(targetId, map) {
            var data, layerIndex = parseInt(targetId.split("_LayerIndex_")[1].split("_")[0], 10), shapeIndex = parseInt(targetId.split("_ShapeIndex_")[1].split("_")[0], 10), layer = map.layers[layerIndex], shapeData = layer.layerData[shapeIndex].property;
            return layer.dataSource && (data = layer.dataSource[checkShapeDataFields(layer.dataSource, shapeData, layer.shapeDataPath, layer.shapePropertyPath)]), 
            {
                shapeData: shapeData,
                data: data
            };
        }(targetId, maps), eventArgs = {
            cancel: !1,
            name: eventName,
            fill: selection.fill,
            opacity: selection.opacity,
            border: selection.border,
            shapeData: shape.shapeData,
            data: shape.data,
            target: targetId
        };
        return maps.trigger(eventName, eventArgs), eventArgs;
    }
    function getElementsByClassName(className) {
        return document.getElementsByClassName(className);
    }
    function querySelector(args, elementSelector) {
        var targetEle = null;
        return document.getElementById(elementSelector) && (targetEle = document.getElementById(elementSelector).querySelector("#" + args)), 
        targetEle;
    }
    function getTargetElement(layerIndex, name, enable, map) {
        for (var targetId, shapeData = map.layers[layerIndex].shapeData.features, i = 0; i < shapeData.length; i++) if (shapeData[i].properties.name === name) {
            targetId = map.element.id + "_LayerIndex_" + layerIndex + "_ShapeIndex_" + i + "_dataIndex_undefined";
            break;
        }
        return getElement$3(targetId);
    }
    function createStyle(id, className, eventArgs) {
        return createElement("style", {
            id: id,
            innerHTML: "." + className + "{fill:" + eventArgs.fill + ";opacity:" + eventArgs.opacity.toString() + ";}"
        });
    }
    function customizeStyle(id, className, eventArgs) {
        getElement$3(id).innerHTML = "." + className + "{fill:" + eventArgs.fill + ";opacity:" + eventArgs.opacity.toString() + ";stroke-width:" + eventArgs.border.width.toString() + "stroke-color:" + eventArgs.border.color + "}";
    }
    function removeClass$1(element) {
        element.removeAttribute("class");
    }
    function elementAnimate(element, delay, duration, point, maps, ele, radius) {
        void 0 === radius && (radius = 0);
        var centerX = point.x, centerY = point.y, height = 0, transform = element.getAttribute("transform") || "";
        new Animation({}).animate(element, {
            duration: duration,
            delay: delay,
            progress: function(args) {
                args.timeStamp > args.delay && (height = (args.timeStamp - args.delay) / args.duration, 
                element.setAttribute("transform", "translate( " + (centerX - radius * height) + " " + (centerY - radius * height) + " ) scale(" + height + ")"));
            },
            end: function(model) {
                if (element.setAttribute("transform", transform), ele) {
                    var event = {
                        cancel: !1,
                        name: animationComplete$3,
                        element: ele,
                        maps: maps
                    };
                    maps.trigger(animationComplete$3, event);
                }
            }
        });
    }
    function timeout(id) {
        removeElement$4(id);
    }
    function wordWrap(tooltip, text, x, y, size1, width, areaWidth, element) {
        tooltip.innerHTML = text, tooltip.style.top = (y + parseInt(size1[0], 10)).toString() + "px", 
        tooltip.style.left = x.toString() + "px", tooltip.style.width = width.toString() + "px", 
        tooltip.style.maxWidth = areaWidth.toString() + "px", tooltip.style.wordWrap = "break-word", 
        element.appendChild(tooltip);
    }
    function drawSymbol$1(location, shape, size, url, options) {
        var renderer = new SvgRenderer(""), temp = function(location, size, shape, options, url) {
            var path, functionName = "Path", width = size.width, height = size.height, locX = location.x, locY = location.y, x = location.x + -width / 2, y = location.y + -height / 2;
            switch (shape) {
              case "Circle":
              case "Bubble":
                functionName = "Ellipse", merge(options, {
                    rx: width / 2,
                    ry: height / 2,
                    cx: locX,
                    cy: locY
                });
                break;

              case "Star":
                path = "M " + (location.x + size.width / 3) + " " + (location.y - size.height / 2) + " L " + (location.x - size.width / 2) + " " + (location.y + size.height / 6) + " L " + (location.x + size.width / 2) + " " + (location.y + size.height / 6) + " L " + (location.x - size.width / 3) + " " + (location.y - size.height / 2) + " L " + location.x + " " + (location.y + size.height / 2) + " L " + (location.x + size.width / 3) + " " + (location.y - size.height / 2) + " Z", 
                merge(options, {
                    d: path
                });
                break;

              case "Cross":
                merge(options, {
                    d: path = "M " + x + " " + locY + " L " + (locX + width / 2) + " " + locY + " M " + locX + " " + (locY + height / 2) + " L " + locX + " " + (locY + -height / 2)
                });
                break;

              case "HorizontalLine":
                merge(options, {
                    d: path = "M " + x + " " + locY + " L " + (locX + width / 2) + " " + locY
                });
                break;

              case "VerticalLine":
                merge(options, {
                    d: path = "M " + locX + " " + (locY + height / 2) + " L " + locX + " " + (locY + -height / 2)
                });
                break;

              case "Diamond":
                merge(options, {
                    d: path = "M " + x + " " + locY + " L " + locX + " " + (locY + -height / 2) + " L " + (locX + width / 2) + " " + locY + " L " + locX + " " + (locY + height / 2) + " L " + x + " " + locY + " z"
                });
                break;

              case "Rectangle":
                merge(options, {
                    d: path = "M " + x + " " + (locY + -height / 2) + " L " + (locX + width / 2) + " " + (locY + -height / 2) + " L " + (locX + width / 2) + " " + (locY + height / 2) + " L " + x + " " + (locY + height / 2) + " L " + x + " " + (locY + -height / 2) + " z"
                });
                break;

              case "Triangle":
                merge(options, {
                    d: path = "M " + x + " " + (locY + height / 2) + " L " + locX + " " + (locY + -height / 2) + " L " + (locX + width / 2) + " " + (locY + height / 2) + " L " + x + " " + (locY + height / 2) + " z"
                });
                break;

              case "InvertedTriangle":
                merge(options, {
                    d: path = "M " + (locX + width / 2) + " " + (locY - height / 2) + " L " + locX + " " + (locY + height / 2) + " L " + (locX - width / 2) + " " + (locY - height / 2) + " L " + (locX + width / 2) + " " + (locY - height / 2) + " z"
                });
                break;

              case "Pentagon":
                for (var xValue = void 0, yValue = void 0, i = 0; i <= 5; i++) xValue = width / 2 * Math.cos(Math.PI / 180 * (72 * i)), 
                yValue = height / 2 * Math.sin(Math.PI / 180 * (72 * i)), path = 0 === i ? "M " + (locX + xValue) + " " + (locY + yValue) + " " : path.concat("L " + (locX + xValue) + " " + (locY + yValue) + " ");
                path = path.concat("Z"), merge(options, {
                    d: path
                });
                break;

              case "Image":
                functionName = "Image", merge(options, {
                    href: url,
                    height: height,
                    width: width,
                    x: x,
                    y: y
                });
            }
            return {
                renderOption: options,
                functionName: functionName
            };
        }(location, size, shape, options, url);
        return renderer["draw" + temp.functionName](temp.renderOption);
    }
    function changeBorderWidth(element, index, scale, maps) {
        for (var childNode, l = 0; l < element.childElementCount; l++) if ((childNode = element.childNodes[l]).id.indexOf("_NavigationGroup") > -1) !function(element, index, scale, maps) {
            for (var node, m = 0; m < element.childElementCount; m++) if ("path" === (node = element.childNodes[m]).tagName) {
                var currentStroke = maps.layersCollection[index].navigationLineSettings[parseFloat(node.id.split("_")[2])].width;
                node.setAttribute("stroke-width", (currentStroke / scale).toString());
            }
        }(childNode, index, scale, maps); else {
            var currentStroke = maps.layersCollection[index].shapeSettings.border.width;
            childNode.setAttribute("stroke-width", (currentStroke / scale).toString());
        }
    }
    function targetTouches(event) {
        for (var targetTouches = [], touches = event.touches, i = 0; i < touches.length; i++) targetTouches.push({
            pageX: touches[i].pageX,
            pageY: touches[i].pageY
        });
        return targetTouches;
    }
    function getDistance(a, b) {
        var x = a.pageX - b.pageX, y = a.pageY - b.pageY;
        return Math.sqrt(x * x + y * y);
    }
    function sum$1(a, b) {
        return a + b;
    }
    function animate(element, delay, duration, process, end) {
        var clearAnimation, _this = this, start = null, startAnimation = function(timestamp) {
            start || (start = timestamp);
            var progress = timestamp - start;
            progress < duration ? (process.call(_this, {
                element: element,
                delay: 0,
                timeStamp: progress,
                duration: duration
            }), window.requestAnimationFrame(startAnimation)) : (window.cancelAnimationFrame(clearAnimation), 
            end.call(_this, {
                element: element
            }));
        };
        clearAnimation = window.requestAnimationFrame(startAnimation);
    }
    function smoothTranslate(element, delay, duration, point) {
        var delta = 0, transform = element.getAttribute("transform").split(" ");
        2 === transform.length && (transform[2] = transform[1].split(")")[0], transform[1] = transform[0].split("(")[1]);
        var previousLocation = new MapLocation(parseInt(transform[1], 10), parseInt(transform[2], 10)), diffx = point.x - previousLocation.x, diffy = point.y - previousLocation.y, currentLocation = new MapLocation(0, 0);
        animate(element, 0, duration, function(args) {
            args.timeStamp > args.delay && (delta = (args.timeStamp - args.delay) / args.duration, 
            currentLocation.x = previousLocation.x + delta * diffx, currentLocation.y = previousLocation.y + delta * diffy, 
            args.element.setAttribute("transform", "translate( " + currentLocation.x + " " + currentLocation.y + " )"));
        }, function() {
            element.setAttribute("transform", "translate( " + point.x + " " + point.y + " )");
        });
    }
    var instances = "ej2_instances", uid = 0, headerRegex = /^(.*?):[ \t]*([^\r\n]*)$/gm, defaultType = "GET", Ajax = function() {
        function Ajax(options, type, async) {
            this.mode = !0, this.options = {}, "string" == typeof options ? (this.url = options, 
            this.type = type ? type.toUpperCase() : defaultType, this.mode = !!isNullOrUndefined(async) || async) : "object" == typeof options && (this.options = options, 
            merge(this, this.options)), this.type = this.type ? this.type.toUpperCase() : defaultType;
        }
        return Ajax.prototype.send = function(data) {
            var _this = this;
            this.data = isNullOrUndefined(data) ? this.data : data;
            return new Promise(function(resolve, reject) {
                _this.httpRequest = new XMLHttpRequest(), _this.httpRequest.onreadystatechange = function() {
                    _this.stateChange(resolve, reject);
                }, _this.httpRequest.open(_this.type, _this.url, _this.mode), isNullOrUndefined(_this.data) || _this.httpRequest.setRequestHeader("Content-Type", _this.contentType || "application/json; charset=utf-8"), 
                _this.beforeSend && _this.beforeSend(), _this.httpRequest.send(isNullOrUndefined(_this.data) ? null : _this.data);
            });
        }, Ajax.prototype.successHandler = function(data) {
            return this.onSuccess && this.onSuccess(data, this), data;
        }, Ajax.prototype.failureHandler = function(reason) {
            return this.onFailure && this.onFailure(this.httpRequest), reason;
        }, Ajax.prototype.stateChange = function(resolve, reject) {
            var data = this.httpRequest.responseText;
            if (this.dataType && "json" === this.dataType.toLowerCase()) if ("" === data) data = void 0; else try {
                data = JSON.parse(data);
            } catch (error) {}
            4 === this.httpRequest.readyState && (200 === this.httpRequest.status || 304 === this.httpRequest.status ? resolve(this.successHandler(data)) : reject(new Error(this.failureHandler(this.httpRequest.statusText))));
        }, Ajax.prototype.getResponseHeader = function(key) {
            var responseHeaders, header;
            responseHeaders = {};
            for (var headers = headerRegex.exec(this.httpRequest.getAllResponseHeaders()); headers; ) responseHeaders[headers[1].toLowerCase()] = headers[2], 
            headers = headerRegex.exec(this.httpRequest.getAllResponseHeaders());
            return header = responseHeaders[key.toLowerCase()], isNullOrUndefined(header) ? null : header;
        }, Ajax;
    }(), EventHandler = function() {
        function EventHandler() {}
        return EventHandler.addOrGetEventData = function(element) {
            return "__eventList" in element ? element.__eventList.events : (element.__eventList = {}, 
            element.__eventList.events = []);
        }, EventHandler.add = function(element, eventName, listener, bindTo, intDebounce) {
            var debounceListener, eventData = EventHandler.addOrGetEventData(element);
            debounceListener = intDebounce ? debounce(listener, intDebounce) : listener, bindTo && (debounceListener = debounceListener.bind(bindTo));
            for (var event = eventName.split(" "), i = 0; i < event.length; i++) eventData.push({
                name: event[i],
                listener: listener,
                debounce: debounceListener
            }), element.addEventListener(event[i], debounceListener);
            return debounceListener;
        }, EventHandler.remove = function(element, eventName, listener) {
            for (var eventData = EventHandler.addOrGetEventData(element), event = eventName.split(" "), _loop_1 = function(j) {
                var debounceListener, index = -1;
                eventData && 0 !== eventData.length && eventData.some(function(x, i) {
                    return x.name === event[j] && x.listener === listener && (index = i, debounceListener = x.debounce, 
                    !0);
                }), -1 !== index && eventData.splice(index, 1), debounceListener && element.removeEventListener(event[j], debounceListener);
            }, j = 0; j < event.length; j++) _loop_1(j);
        }, EventHandler.clearEvents = function(element) {
            var eventData, copyData;
            copyData = extend([], copyData, eventData = EventHandler.addOrGetEventData(element));
            for (var i = 0; i < copyData.length; i++) element.removeEventListener(copyData[i].name, copyData[i].debounce), 
            eventData.shift();
        }, EventHandler.trigger = function(element, eventName, eventProp) {
            for (var _i = 0, eventData_1 = EventHandler.addOrGetEventData(element); _i < eventData_1.length; _i++) {
                var event_1 = eventData_1[_i];
                event_1.name === eventName && event_1.debounce.call(this, eventProp);
            }
        }, EventHandler;
    }(), Observer = function() {
        function Observer(context) {
            this.ranArray = [], this.boundedEvents = {}, isNullOrUndefined(context) || (this.context = context);
        }
        return Observer.prototype.on = function(property, handler, context, id) {
            if (!isNullOrUndefined(handler)) {
                var cntxt = context || this.context;
                this.notExist(property) ? this.boundedEvents[property] = [ {
                    handler: handler,
                    context: cntxt
                } ] : isNullOrUndefined(id) ? this.isHandlerPresent(this.boundedEvents[property], handler) || this.boundedEvents[property].push({
                    handler: handler,
                    context: cntxt
                }) : -1 === this.ranArray.indexOf(id) && (this.ranArray.push(id), this.boundedEvents[property].push({
                    handler: handler,
                    context: cntxt,
                    id: id
                }));
            }
        }, Observer.prototype.off = function(property, handler, id) {
            if (!this.notExist(property)) {
                var curObject = getValue(property, this.boundedEvents);
                if (handler) for (var i = 0; i < curObject.length; i++) {
                    if (id) {
                        curObject.splice(i, 1);
                        var indexLocation = this.ranArray.indexOf(id);
                        -1 !== indexLocation && this.ranArray.splice(indexLocation, 1);
                        break;
                    }
                    if (handler === curObject[i].handler) {
                        curObject.splice(i, 1);
                        break;
                    }
                } else delete this.boundedEvents[property];
            }
        }, Observer.prototype.notify = function(property, argument) {
            if (!this.notExist(property)) {
                argument && (argument.name = property);
                for (var _i = 0, curObject_1 = getValue(property, this.boundedEvents).slice(0); _i < curObject_1.length; _i++) {
                    var cur = curObject_1[_i];
                    cur.handler.call(cur.context, argument);
                }
            }
        }, Observer.prototype.destroy = function() {
            this.boundedEvents = this.context = void 0;
        }, Observer.prototype.notExist = function(prop) {
            return !1 === this.boundedEvents.hasOwnProperty(prop);
        }, Observer.prototype.isHandlerPresent = function(boundedEvents, handler) {
            for (var _i = 0, boundedEvents_1 = boundedEvents; _i < boundedEvents_1.length; _i++) {
                if (boundedEvents_1[_i].handler === handler) return !0;
            }
            return !1;
        }, Observer;
    }(), Base = function() {
        function Base(options, element) {
            this.isProtectedOnChange = !0, this.properties = {}, this.changedProperties = {}, 
            this.oldProperties = {}, this.refreshing = !1, this.finalUpdate = function() {}, 
            this.childChangedProperties = {}, this.modelObserver = new Observer(this), isUndefined(element) || (this.element = "string" == typeof element ? document.querySelector(element) : element, 
            isNullOrUndefined(this.element) || (this.isProtectedOnChange = !1, this.addInstance())), 
            isUndefined(options) || this.setProperties(options, !0), this.isDestroyed = !1;
        }
        return Base.prototype.setProperties = function(prop, muteOnChange) {
            var prevDetection = this.isProtectedOnChange;
            this.isProtectedOnChange = !!muteOnChange, merge(this, prop), !0 !== muteOnChange && (merge(this.changedProperties, prop), 
            this.dataBind()), this.finalUpdate(), this.changedProperties = {}, this.oldProperties = {}, 
            this.isProtectedOnChange = prevDetection;
        }, Base.callChildDataBind = function(obj, parent) {
            for (var _i = 0, keys_1 = Object.keys(obj); _i < keys_1.length; _i++) {
                var key = keys_1[_i];
                if (parent[key] instanceof Array) for (var _a = 0, _b = parent[key]; _a < _b.length; _a++) {
                    var obj_1 = _b[_a];
                    void 0 !== obj_1.dataBind && obj_1.dataBind();
                } else parent[key].dataBind();
            }
        }, Base.prototype.clearChanges = function() {
            this.finalUpdate(), this.changedProperties = {}, this.oldProperties = {}, this.childChangedProperties = {};
        }, Base.prototype.dataBind = function() {
            if (Base.callChildDataBind(this.childChangedProperties, this), Object.getOwnPropertyNames(this.changedProperties).length) {
                var prevDetection = this.isProtectedOnChange, newChanges = this.changedProperties, oldChanges = this.oldProperties;
                this.clearChanges(), this.isProtectedOnChange = !0, this.onPropertyChanged(newChanges, oldChanges), 
                this.isProtectedOnChange = prevDetection;
            }
        }, Base.prototype.saveChanges = function(key, newValue, oldValue) {
            this.isProtectedOnChange || (this.oldProperties[key] = oldValue, this.changedProperties[key] = newValue, 
            this.finalUpdate(), this.finalUpdate = setImmediate(this.dataBind.bind(this)));
        }, Base.prototype.addEventListener = function(eventName, handler) {
            this.modelObserver.on(eventName, handler);
        }, Base.prototype.removeEventListener = function(eventName, handler) {
            this.modelObserver.off(eventName, handler);
        }, Base.prototype.trigger = function(eventName, eventProp) {
            if (!0 !== this.isDestroyed) {
                var prevDetection = this.isProtectedOnChange;
                this.isProtectedOnChange = !1, this.modelObserver.notify(eventName, eventProp), 
                this.isProtectedOnChange = prevDetection;
            }
        }, Base.prototype.addInstance = function() {
            var moduleClass = "e-" + this.getModuleName().toLowerCase();
            addClass([ this.element ], [ "e-control", moduleClass ]), isNullOrUndefined(this.element.ej2_instances) ? setValue("ej2_instances", [ this ], this.element) : this.element.ej2_instances.push(this);
        }, Base.prototype.destroy = function() {
            var _this = this;
            this.element.ej2_instances = this.element.ej2_instances.filter(function(i) {
                return i !== _this;
            }), removeClass([ this.element ], [ "e-" + this.getModuleName() ]), 0 === this.element.ej2_instances.length && removeClass([ this.element ], [ "e-control" ]), 
            this.clearChanges(), this.modelObserver.destroy(), this.isDestroyed = !0;
        }, Base;
    }(), REGX_MOBILE = /android|webos|iphone|ipad|ipod|blackberry|iemobile|opera mini|mobile/i, REGX_IE = /msie|trident/i, REGX_IE11 = /Trident\/7\./, REGX_IOS = /(ipad|iphone|ipod touch)/i, REGX_IOS7 = /(ipad|iphone|ipod touch);.*os 7_\d|(ipad|iphone|ipod touch);.*os 8_\d/i, REGX_ANDROID = /android/i, REGX_WINDOWS = /trident|windows phone|edge/i, REGX_VERSION = /(version)[ \/]([\w.]+)/i, REGX_BROWSER = {
        OPERA: /(opera|opr)(?:.*version|)[ \/]([\w.]+)/i,
        EDGE: /(edge)(?:.*version|)[ \/]([\w.]+)/i,
        CHROME: /(chrome|crios)[ \/]([\w.]+)/i,
        PANTHOMEJS: /(phantomjs)[ \/]([\w.]+)/i,
        SAFARI: /(safari)[ \/]([\w.]+)/i,
        WEBKIT: /(webkit)[ \/]([\w.]+)/i,
        MSIE: /(msie|trident) ([\w.]+)/i,
        MOZILLA: /(mozilla)(?:.*? rv:([\w.]+)|)/i
    };
    "undefined" != typeof window && (window.browserDetails = window.browserDetails || {});
    var IntlBase, Browser = function() {
        function Browser() {}
        return Browser.extractBrowserDetail = function() {
            for (var browserInfo = {
                culture: {}
            }, clientInfo = [], _i = 0, keys_1 = Object.keys(REGX_BROWSER); _i < keys_1.length; _i++) {
                var key = keys_1[_i];
                if (clientInfo = Browser.userAgent.match(REGX_BROWSER[key])) {
                    if (browserInfo.name = "opr" === clientInfo[1].toLowerCase() ? "opera" : clientInfo[1].toLowerCase(), 
                    browserInfo.name = "crios" === clientInfo[1].toLowerCase() ? "chrome" : browserInfo.name, 
                    browserInfo.version = clientInfo[2], browserInfo.culture.name = browserInfo.culture.language = navigator.language, 
                    Browser.userAgent.match(REGX_IE11)) {
                        browserInfo.name = "msie";
                        break;
                    }
                    var version = Browser.userAgent.match(REGX_VERSION);
                    "safari" === browserInfo.name && version && (browserInfo.version = version[2]);
                    break;
                }
            }
            return browserInfo;
        }, Browser.getEvent = function(event) {
            var events = {
                start: {
                    isPointer: "pointerdown",
                    isTouch: "touchstart",
                    isDevice: "mousedown"
                },
                move: {
                    isPointer: "pointermove",
                    isTouch: "touchmove",
                    isDevice: "mousemove"
                },
                end: {
                    isPointer: "pointerup",
                    isTouch: "touchend",
                    isDevice: "mouseup"
                }
            };
            return Browser.isPointer ? events[event].isPointer : Browser.isTouch ? events[event].isTouch + (Browser.isDevice ? "" : " " + events[event].isDevice) : events[event].isDevice;
        }, Browser.getTouchStartEvent = function() {
            return Browser.getEvent("start");
        }, Browser.getTouchEndEvent = function() {
            return Browser.getEvent("end");
        }, Browser.getTouchMoveEvent = function() {
            return Browser.getEvent("move");
        }, Browser.getValue = function(key, regX) {
            var browserDetails = window.browserDetails;
            return void 0 === browserDetails[key] ? browserDetails[key] = regX.test(Browser.userAgent) : browserDetails[key];
        }, Object.defineProperty(Browser, "userAgent", {
            get: function() {
                return Browser.uA;
            },
            set: function(uA) {
                Browser.uA = uA, window.browserDetails = {};
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(Browser, "info", {
            get: function() {
                return isUndefined(window.browserDetails.info) ? window.browserDetails.info = Browser.extractBrowserDetail() : window.browserDetails.info;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(Browser, "isIE", {
            get: function() {
                return Browser.getValue("isIE", REGX_IE);
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(Browser, "isTouch", {
            get: function() {
                return isUndefined(window.browserDetails.isTouch) ? window.browserDetails.isTouch = "ontouchstart" in window : window.browserDetails.isTouch;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(Browser, "isPointer", {
            get: function() {
                return isUndefined(window.browserDetails.isPointer) ? window.browserDetails.isPointer = "pointerEnabled" in window.navigator : window.browserDetails.isPointer;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(Browser, "isMSPointer", {
            get: function() {
                return isUndefined(window.browserDetails.isMSPointer) ? window.browserDetails.isMSPointer = "msPointerEnabled" in window.navigator : window.browserDetails.isMSPointer;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(Browser, "isDevice", {
            get: function() {
                return Browser.getValue("isDevice", REGX_MOBILE);
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(Browser, "isIos", {
            get: function() {
                return Browser.getValue("isIos", REGX_IOS);
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(Browser, "isIos7", {
            get: function() {
                return Browser.getValue("isIos7", REGX_IOS7);
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(Browser, "isAndroid", {
            get: function() {
                return Browser.getValue("isAndroid", REGX_ANDROID);
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(Browser, "isWebView", {
            get: function() {
                return isUndefined(window.browserDetails.isWebView) ? (window.browserDetails.isWebView = !(isUndefined(window.cordova) && isUndefined(window.PhoneGap) && isUndefined(window.phonegap) && "object" !== window.forge), 
                window.browserDetails.isWebView) : window.browserDetails.isWebView;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(Browser, "isWindows", {
            get: function() {
                return Browser.getValue("isWindows", REGX_WINDOWS);
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(Browser, "touchStartEvent", {
            get: function() {
                return isUndefined(window.browserDetails.touchStartEvent) ? window.browserDetails.touchStartEvent = Browser.getTouchStartEvent() : window.browserDetails.touchStartEvent;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(Browser, "touchMoveEvent", {
            get: function() {
                return isUndefined(window.browserDetails.touchMoveEvent) ? window.browserDetails.touchMoveEvent = Browser.getTouchMoveEvent() : window.browserDetails.touchMoveEvent;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(Browser, "touchEndEvent", {
            get: function() {
                return isUndefined(window.browserDetails.touchEndEvent) ? window.browserDetails.touchEndEvent = Browser.getTouchEndEvent() : window.browserDetails.touchEndEvent;
            },
            enumerable: !0,
            configurable: !0
        }), Browser.uA = "undefined" != typeof navigator ? navigator.userAgent : "", Browser;
    }(), __extends$1 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$1 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, Animation = function(_super) {
        function Animation(options) {
            var _this = _super.call(this, options, void 0) || this;
            return _this.easing = {
                ease: "cubic-bezier(0.250, 0.100, 0.250, 1.000)",
                linear: "cubic-bezier(0.250, 0.250, 0.750, 0.750)",
                easeIn: "cubic-bezier(0.420, 0.000, 1.000, 1.000)",
                easeOut: "cubic-bezier(0.000, 0.000, 0.580, 1.000)",
                easeInOut: "cubic-bezier(0.420, 0.000, 0.580, 1.000)",
                elasticInOut: "cubic-bezier(0.5,-0.58,0.38,1.81)",
                elasticIn: "cubic-bezier(0.17,0.67,0.59,1.81)",
                elasticOut: "cubic-bezier(0.7,-0.75,0.99,1.01)"
            }, _this;
        }
        return __extends$1(Animation, _super), Animation_1 = Animation, Animation.prototype.animate = function(element, options) {
            options = options || {};
            var model = this.getModel(options);
            if ("string" == typeof element) for (var _i = 0, elements_1 = Array.prototype.slice.call(selectAll(element, document)); _i < elements_1.length; _i++) {
                var element_1 = elements_1[_i];
                model.element = element_1, Animation_1.delayAnimation(model);
            } else model.element = element, Animation_1.delayAnimation(model);
        }, Animation.stop = function(element, model) {
            element.style.animation = "", element.removeAttribute("e-animate");
            var animationId = element.getAttribute("e-animation-id");
            if (animationId) {
                var frameId = parseInt(animationId, 10);
                cancelAnimationFrame(frameId), element.removeAttribute("e-animation-id");
            }
            model && model.end && model.end.call(this, model);
        }, Animation.delayAnimation = function(model) {
            model.delay ? setTimeout(function() {
                Animation_1.applyAnimation(model);
            }, model.delay) : Animation_1.applyAnimation(model);
        }, Animation.applyAnimation = function(model) {
            var _this = this;
            model.timeStamp = 0;
            var step = 0, timerId = 0, prevTimeStamp = 0, duration = model.duration;
            model.element.setAttribute("e-animate", "true");
            var startAnimation = function(timeStamp) {
                try {
                    if (timeStamp) {
                        prevTimeStamp = 0 === prevTimeStamp ? timeStamp : prevTimeStamp, model.timeStamp = timeStamp + model.timeStamp - prevTimeStamp, 
                        prevTimeStamp = timeStamp, !step && model.begin && model.begin.call(_this, model), 
                        step += 1;
                        var avg = model.timeStamp / step;
                        model.timeStamp < duration && model.timeStamp + avg < duration && model.element.getAttribute("e-animate") ? (model.element.style.animation = model.name + " " + model.duration + "ms " + model.timingFunction, 
                        model.progress && model.progress.call(_this, model), requestAnimationFrame(startAnimation)) : (cancelAnimationFrame(timerId), 
                        model.element.removeAttribute("e-animation-id"), model.element.removeAttribute("e-animate"), 
                        model.element.style.animation = "", model.end && model.end.call(_this, model));
                    } else performance.now(), timerId = requestAnimationFrame(startAnimation), model.element.setAttribute("e-animation-id", timerId.toString());
                } catch (e) {
                    cancelAnimationFrame(timerId), model.element.removeAttribute("e-animation-id"), 
                    model.fail && model.fail.call(_this, e);
                }
            };
            startAnimation();
        }, Animation.prototype.getModel = function(options) {
            return {
                name: options.name || this.name,
                delay: options.delay || this.delay,
                duration: void 0 !== options.duration ? options.duration : this.duration,
                begin: options.begin || this.begin,
                end: options.end || this.end,
                fail: options.fail || this.fail,
                progress: options.progress || this.progress,
                timingFunction: this.easing[options.timingFunction] ? this.easing[options.timingFunction] : options.timingFunction || this.easing[this.timingFunction]
            };
        }, Animation.prototype.onPropertyChanged = function(newProp, oldProp) {}, Animation.prototype.getModuleName = function() {
            return "animation";
        }, Animation.prototype.destroy = function() {}, __decorate$1([ Property("FadeIn") ], Animation.prototype, "name", void 0), 
        __decorate$1([ Property(400) ], Animation.prototype, "duration", void 0), __decorate$1([ Property("ease") ], Animation.prototype, "timingFunction", void 0), 
        __decorate$1([ Property(0) ], Animation.prototype, "delay", void 0), __decorate$1([ Event() ], Animation.prototype, "progress", void 0), 
        __decorate$1([ Event() ], Animation.prototype, "begin", void 0), __decorate$1([ Event() ], Animation.prototype, "end", void 0), 
        __decorate$1([ Event() ], Animation.prototype, "fail", void 0), Animation = Animation_1 = __decorate$1([ NotifyPropertyChanges ], Animation);
        var Animation_1;
    }(Base), isRippleEnabled = !1, CanvasRenderer = function() {
        function CanvasRenderer(rootID) {
            this.rootId = rootID;
        }
        return CanvasRenderer.prototype.getOptionValue = function(options, key) {
            return options[key];
        }, CanvasRenderer.prototype.createCanvas = function(options) {
            var canvasObj = document.createElement("canvas");
            return canvasObj.setAttribute("id", this.rootId + "_canvas"), this.ctx = canvasObj.getContext("2d"), 
            this.canvasObj = canvasObj, this.setCanvasSize(options.width, options.height), this.canvasObj;
        }, CanvasRenderer.prototype.setCanvasSize = function(width, height) {
            var element = document.getElementById(this.rootId), size = isNullOrUndefined(element) ? null : element.getBoundingClientRect();
            isNullOrUndefined(this.width) ? this.canvasObj.setAttribute("width", width ? width.toString() : size.width.toString()) : this.canvasObj.setAttribute("width", this.width.toString()), 
            isNullOrUndefined(this.height) ? this.canvasObj.setAttribute("height", height ? height.toString() : "450") : this.canvasObj.setAttribute("height", this.height.toString());
        }, CanvasRenderer.prototype.setAttributes = function(options) {
            this.ctx.lineWidth = this.getOptionValue(options, "stroke-width");
            var dashArray = this.getOptionValue(options, "stroke-dasharray");
            if (!isNullOrUndefined(dashArray)) {
                var dashArrayString = dashArray.split(",");
                this.ctx.setLineDash([ parseInt(dashArrayString[0], 10), parseInt(dashArrayString[1], 10) ]);
            }
            this.ctx.strokeStyle = this.getOptionValue(options, "stroke");
        }, CanvasRenderer.prototype.drawLine = function(options) {
            this.ctx.save(), this.ctx.beginPath(), this.ctx.lineWidth = this.getOptionValue(options, "stroke-width"), 
            this.ctx.strokeStyle = options.stroke, this.ctx.moveTo(options.x1, options.y1), 
            this.ctx.lineTo(options.x2, options.y2), this.ctx.stroke(), this.ctx.restore(), 
            this.dataUrl = this.canvasObj.toDataURL();
        }, CanvasRenderer.prototype.drawRectangle = function(options) {
            var canvasCtx = this.ctx, cornerRadius = options.rx;
            this.ctx.save(), this.ctx.beginPath(), this.ctx.globalAlpha = this.getOptionValue(options, "opacity"), 
            this.setAttributes(options), this.ctx.rect(options.x, options.y, options.width, options.height), 
            null !== cornerRadius && cornerRadius >= 0 ? this.drawCornerRadius(options) : ("none" === options.fill && (options.fill = "transparent"), 
            this.ctx.fillStyle = options.fill, this.ctx.fillRect(options.x, options.y, options.width, options.height), 
            this.ctx.stroke()), this.ctx.restore(), this.ctx = canvasCtx, this.dataUrl = this.canvasObj.toDataURL();
        }, CanvasRenderer.prototype.drawCornerRadius = function(options) {
            var cornerRadius = options.rx, x = options.x, y = options.y, width = options.width, height = options.height;
            "none" === options.fill && (options.fill = "transparent"), this.ctx.fillStyle = options.fill, 
            width < 2 * cornerRadius && (cornerRadius = width / 2), height < 2 * cornerRadius && (cornerRadius = height / 2), 
            this.ctx.beginPath(), this.ctx.moveTo(x + width - cornerRadius, y), this.ctx.arcTo(x + width, y, x + width, y + height, cornerRadius), 
            this.ctx.arcTo(x + width, y + height, x, y + height, cornerRadius), this.ctx.arcTo(x, y + height, x, y, cornerRadius), 
            this.ctx.arcTo(x, y, x + width, y, cornerRadius), this.ctx.closePath(), this.ctx.fill(), 
            this.ctx.stroke(), this.dataUrl = this.canvasObj.toDataURL();
        }, CanvasRenderer.prototype.drawPath = function(options, canvasTranslate) {
            var dataSplit = options.d.split(" "), borderWidth = this.getOptionValue(options, "stroke-width"), canvasCtx = this.ctx, flag = !0;
            this.ctx.save(), this.ctx.beginPath(), canvasTranslate && this.ctx.translate(canvasTranslate[0], canvasTranslate[1]), 
            this.ctx.globalAlpha = options.opacity ? options.opacity : this.getOptionValue(options, "fill-opacity"), 
            this.setAttributes(options);
            for (var i = 0; i < dataSplit.length; i += 3) {
                var x1 = parseFloat(dataSplit[i + 1]), y1 = parseFloat(dataSplit[i + 2]);
                switch (dataSplit[i]) {
                  case "M":
                    options.innerR || options.cx || this.ctx.moveTo(x1, y1);
                    break;

                  case "L":
                    options.innerR || this.ctx.lineTo(x1, y1);
                    break;

                  case "C":
                    var c1 = parseFloat(dataSplit[i + 3]), c2 = parseFloat(dataSplit[i + 4]), c3 = parseFloat(dataSplit[i + 5]), c4 = parseFloat(dataSplit[i + 6]);
                    this.ctx.bezierCurveTo(x1, y1, c1, c2, c3, c4), i += 4;
                    break;

                  case "A":
                    options.innerR ? flag && (this.ctx.arc(options.x, options.y, options.radius, options.start, options.end, options.counterClockWise), 
                    this.ctx.arc(options.x, options.y, options.innerR, options.end, options.start, !options.counterClockWise), 
                    flag = !1) : options.cx ? this.ctx.arc(options.cx, options.cy, options.radius, 0, 2 * Math.PI, options.counterClockWise) : (this.ctx.moveTo(options.x, options.y), 
                    this.ctx.arc(options.x, options.y, options.radius, options.start, options.end, options.counterClockWise), 
                    this.ctx.lineTo(options.x, options.y)), i += 5;
                    break;

                  case "z":
                    this.ctx.closePath();
                }
            }
            "none" !== options.fill && void 0 !== options.fill && (this.ctx.fillStyle = options.fill, 
            this.ctx.fill()), borderWidth > 0 && this.ctx.stroke(), this.ctx.restore(), this.ctx = canvasCtx, 
            this.dataUrl = this.canvasObj.toDataURL();
        }, CanvasRenderer.prototype.drawText = function(options, label) {
            var fontWeight = this.getOptionValue(options, "font-weight");
            isNullOrUndefined(fontWeight) || "regular" !== fontWeight.toLowerCase() || (fontWeight = "normal");
            var fontSize = this.getOptionValue(options, "font-size"), fontFamily = this.getOptionValue(options, "font-family"), font = this.getOptionValue(options, "font-style").toLowerCase() + " " + fontWeight + " " + fontSize + " " + fontFamily, anchor = this.getOptionValue(options, "text-anchor"), opacity = void 0 !== options.opacity ? options.opacity : 1;
            "middle" === anchor && (anchor = "center"), this.ctx.save(), this.ctx.fillStyle = options.fill, 
            this.ctx.font = font, this.ctx.textAlign = anchor, this.ctx.globalAlpha = opacity, 
            options.baseline && (this.ctx.textBaseline = options.baseline);
            this.ctx.translate(options.x + 0, options.y), this.ctx.rotate(options.labelRotation * Math.PI / 180), 
            this.ctx.fillText(label, 0, 0), this.ctx.restore(), this.dataUrl = this.canvasObj.toDataURL();
        }, CanvasRenderer.prototype.drawCircle = function(options) {
            var canvasCtx = this.ctx;
            this.ctx.save(), this.ctx.beginPath(), this.ctx.arc(options.cx, options.cy, options.r, 0, 2 * Math.PI), 
            this.ctx.fillStyle = options.fill, this.ctx.globalAlpha = options.opacity, this.ctx.fill(), 
            this.setAttributes(options), this.ctx.stroke(), this.ctx.restore(), this.ctx = canvasCtx, 
            this.dataUrl = this.canvasObj.toDataURL();
        }, CanvasRenderer.prototype.drawPolyline = function(options) {
            this.ctx.save(), this.ctx.beginPath();
            for (var points = options.points.split(" "), i = 0; i < points.length - 1; i++) {
                var point = points[i].split(","), x = parseFloat(point[0]), y = parseFloat(point[1]);
                0 === i ? this.ctx.moveTo(x, y) : this.ctx.lineTo(x, y);
            }
            this.ctx.lineWidth = this.getOptionValue(options, "stroke-width"), this.ctx.strokeStyle = options.stroke, 
            this.ctx.stroke(), this.ctx.restore(), this.dataUrl = this.canvasObj.toDataURL();
        }, CanvasRenderer.prototype.drawEllipse = function(options) {
            var canvasCtx = this.ctx, circumference = Math.max(options.rx, options.ry), scaleX = options.rx / circumference, scaleY = options.ry / circumference;
            this.ctx.save(), this.ctx.beginPath(), this.ctx.translate(options.cx, options.cy), 
            this.ctx.save(), this.ctx.scale(scaleX, scaleY), this.ctx.arc(0, 0, circumference, 0, 2 * Math.PI, !1), 
            this.ctx.fillStyle = options.fill, this.ctx.fill(), this.ctx.restore(), this.ctx.lineWidth = this.getOptionValue(options, "stroke-width"), 
            this.ctx.strokeStyle = options.stroke, this.ctx.stroke(), this.ctx.restore(), this.ctx = canvasCtx, 
            this.dataUrl = this.canvasObj.toDataURL();
        }, CanvasRenderer.prototype.drawImage = function(options) {
            this.ctx.save();
            var imageObj = new Image();
            isNullOrUndefined(options.href) || (imageObj.src = options.href, this.ctx.drawImage(imageObj, options.x, options.y, options.width, options.height)), 
            this.ctx.restore(), this.dataUrl = this.canvasObj.toDataURL();
        }, CanvasRenderer.prototype.createLinearGradient = function(colors) {
            var myGradient;
            isNullOrUndefined(colors[0].colorStop) || (myGradient = this.ctx.createLinearGradient(0, 0, 0, this.canvasObj.height));
            return this.setGradientValues(colors, myGradient);
        }, CanvasRenderer.prototype.createRadialGradient = function(colors) {
            var myGradient;
            isNullOrUndefined(colors[0].colorStop) || (myGradient = this.ctx.createRadialGradient(0, 0, 0, 0, 0, this.canvasObj.height));
            return this.setGradientValues(colors, myGradient);
        }, CanvasRenderer.prototype.setGradientValues = function(colors, myGradient) {
            var colorName;
            if (isNullOrUndefined(colors[0].colorStop)) colorName = colors[0].color.toString(); else {
                for (var i = 0; i <= colors.length - 1; i++) {
                    var color = colors[i].color, newColorStop = colors[i].colorStop.slice(0, -1), stopColor = parseInt(newColorStop, 10) / 100;
                    myGradient.addColorStop(stopColor, color);
                }
                colorName = myGradient.toString();
            }
            return this.dataUrl = this.canvasObj.toDataURL(), colorName;
        }, CanvasRenderer.prototype.setElementAttributes = function(options, element) {
            for (var keys = Object.keys(options), values = Object.keys(options).map(function(key) {
                return options[key];
            }), i = 0; i < keys.length; i++) element.setAttribute(keys[i], values[i]);
            return element;
        }, CanvasRenderer.prototype.updateCanvasAttributes = function(options) {
            this.setElementAttributes(options, this.canvasObj);
            var ctx = this.ctx;
            if (!isNullOrUndefined(this.dataUrl)) {
                var img_1 = new Image();
                img_1.onload = function() {
                    ctx.drawImage(img_1, 0, 0);
                }, img_1.src = this.dataUrl;
            }
        }, CanvasRenderer;
    }(), ModuleLoader = function() {
        function ModuleLoader(parent) {
            this.loadedModules = [], this.parent = parent;
        }
        return ModuleLoader.prototype.inject = function(requiredModules, moduleList) {
            var reqLength = requiredModules.length;
            if (0 !== reqLength) {
                this.loadedModules.length && this.clearUnusedModule(requiredModules);
                for (var i = 0; i < reqLength; i++) for (var modl = requiredModules[i], _i = 0, moduleList_1 = moduleList; _i < moduleList_1.length; _i++) {
                    var module = moduleList_1[_i], modName = modl.member;
                    if (module.prototype.getModuleName() === modl.member && !this.isModuleLoaded(modName)) {
                        var moduleObject = createInstance(module, modl.args), memberName = this.getMemberName(modName);
                        modl.isProperty ? setValue(memberName, module, this.parent) : setValue(memberName, moduleObject, this.parent);
                        var loadedModule = modl;
                        loadedModule.member = memberName, this.loadedModules.push(loadedModule);
                    }
                }
            } else this.clean();
        }, ModuleLoader.prototype.clean = function() {
            for (var _i = 0, _a = this.loadedModules; _i < _a.length; _i++) {
                var modules = _a[_i];
                modules.isProperty || getValue(modules.member, this.parent).destroy();
            }
            this.loadedModules = [];
        }, ModuleLoader.prototype.clearUnusedModule = function(moduleList) {
            for (var _this = this, usedModules = moduleList.map(function(arg) {
                return _this.getMemberName(arg.member);
            }), _i = 0, removableModule_1 = this.loadedModules.filter(function(module) {
                return -1 === usedModules.indexOf(module.member);
            }); _i < removableModule_1.length; _i++) {
                var mod = removableModule_1[_i];
                mod.isProperty || getValue(mod.member, this.parent).destroy(), this.loadedModules.splice(this.loadedModules.indexOf(mod), 1), 
                deleteObject(this.parent, mod.member);
            }
        }, ModuleLoader.prototype.getMemberName = function(name) {
            return name[0].toLowerCase() + name.substring(1) + "Module";
        }, ModuleLoader.prototype.isModuleLoaded = function(modName) {
            for (var _i = 0, _a = this.loadedModules; _i < _a.length; _i++) {
                if (_a[_i].member === this.getMemberName(modName)) return !0;
            }
            return !1;
        }, ModuleLoader;
    }(), ChildProperty = function() {
        function ChildProperty(parent, propName, defaultValue, isArray) {
            this.properties = {}, this.changedProperties = {}, this.childChangedProperties = {}, 
            this.oldProperties = {}, this.finalUpdate = function() {}, this.callChildDataBind = getValue("callChildDataBind", Base), 
            this.parentObj = parent, this.controlParent = this.parentObj.controlParent || this.parentObj, 
            this.propName = propName, this.setProperties(defaultValue, !0), this.isParentArray = isArray;
        }
        return ChildProperty.prototype.updateChange = function(val, propName) {
            !0 === val ? this.parentObj.childChangedProperties[propName] = val : delete this.parentObj.childChangedProperties[propName], 
            this.parentObj.updateChange && this.parentObj.updateChange(val, this.parentObj.propName);
        }, ChildProperty.prototype.updateTimeOut = function() {
            this.parentObj.updateTimeOut ? (this.parentObj.finalUpdate(), this.parentObj.updateTimeOut()) : this.parentObj.finalUpdate = setImmediate(this.parentObj.dataBind.bind(this.parentObj));
        }, ChildProperty.prototype.clearChanges = function() {
            this.finalUpdate(), this.updateChange(!1, this.propName), this.oldProperties = {}, 
            this.changedProperties = {};
        }, ChildProperty.prototype.setProperties = function(prop, muteOnChange) {
            !0 === muteOnChange ? (merge(this, prop), this.updateChange(!1, this.propName), 
            this.clearChanges()) : merge(this, prop);
        }, ChildProperty.prototype.dataBind = function() {
            if (this.callChildDataBind(this.childChangedProperties, this), this.isParentArray) {
                var curIndex = this.parentObj[this.propName].indexOf(this);
                Object.keys(this.changedProperties).length && (setValue(this.propName + "." + curIndex, this.changedProperties, this.parentObj.changedProperties), 
                setValue(this.propName + "." + curIndex, this.oldProperties, this.parentObj.oldProperties));
            } else this.parentObj.changedProperties[this.propName] = this.changedProperties, 
            this.parentObj.oldProperties[this.propName] = this.oldProperties;
            this.clearChanges();
        }, ChildProperty.prototype.saveChanges = function(key, newValue, oldValue) {
            this.controlParent.isProtectedOnChange || (this.oldProperties[key] = oldValue, this.changedProperties[key] = newValue, 
            this.updateChange(!0, this.propName), this.finalUpdate(), this.updateTimeOut());
        }, ChildProperty;
    }(), defaultNumberingSystem = {
        latn: {
            _digits: "0123456789",
            _type: "numeric"
        }
    }, defaultNumberSymbols = {
        decimal: ".",
        group: ",",
        percentSign: "%",
        plusSign: "+",
        minusSign: "-",
        infinity: "∞",
        nan: "NaN",
        exponential: "E"
    }, latnNumberSystem = [ 0, 1, 2, 3, 4, 5, 6, 7, 8, 9 ], ParserBase = function() {
        function ParserBase() {}
        return ParserBase.getMainObject = function(obj, cName) {
            return getValue("main." + cName, obj);
        }, ParserBase.getNumberingSystem = function(obj) {
            return getValue("supplemental.numberingSystems", obj) || this.numberingSystems;
        }, ParserBase.reverseObject = function(prop, keys) {
            for (var res = {}, _i = 0, propKeys_1 = keys || Object.keys(prop); _i < propKeys_1.length; _i++) {
                var key = propKeys_1[_i];
                res.hasOwnProperty(prop[key]) || (res[prop[key]] = key);
            }
            return res;
        }, ParserBase.getSymbolRegex = function(props) {
            var regexStr = props.map(function(str) {
                return str.replace(/([.*+?^=!:${}()|\[\]\/\\])/g, "\\$1");
            }).join("|");
            return new RegExp(regexStr, "g");
        }, ParserBase.getSymbolMatch = function(prop) {
            for (var ret = {}, _i = 0, matchKeys_1 = Object.keys(defaultNumberSymbols); _i < matchKeys_1.length; _i++) {
                var key = matchKeys_1[_i];
                ret[prop[key]] = defaultNumberSymbols[key];
            }
            return ret;
        }, ParserBase.constructRegex = function(val) {
            for (var len = val.length, ret = "", i = 0; i < len; i++) ret += i !== len - 1 ? val[i] + "|" : val[i];
            return ret;
        }, ParserBase.convertValueParts = function(value, regex, obj) {
            return value.replace(regex, function(str) {
                return obj[str];
            });
        }, ParserBase.getDefaultNumberingSystem = function(obj) {
            var ret = {};
            return ret.obj = getValue("numbers", obj), ret.nSystem = getValue("defaultNumberingSystem", ret.obj), 
            ret;
        }, ParserBase.getCurrentNumericOptions = function(curObj, numberSystem, needSymbols) {
            var ret = {}, cur = this.getDefaultNumberingSystem(curObj);
            if (!isUndefined(cur.nSystem)) {
                var digits = getValue(cur.nSystem + "._digits", numberSystem);
                isUndefined(digits) || (ret.numericPair = this.reverseObject(digits, latnNumberSystem), 
                ret.numberParseRegex = new RegExp(this.constructRegex(digits), "g"), ret.numericRegex = "[" + digits[0] + "-" + digits[9] + "]", 
                needSymbols && (ret.numericRegex = digits[0] + "-" + digits[9], ret.symbolNumberSystem = getValue("symbols-numberSystem-" + cur.nSystem, cur.obj), 
                ret.symbolMatch = this.getSymbolMatch(ret.symbolNumberSystem), ret.numberSystem = cur.nSystem));
            }
            return ret;
        }, ParserBase.getNumberMapper = function(curObj, numberSystem, isNumber) {
            var ret = {
                mapper: {}
            }, cur = this.getDefaultNumberingSystem(curObj);
            if (!isUndefined(cur.nSystem)) {
                ret.numberSystem = cur.nSystem, ret.numberSymbols = getValue("symbols-numberSystem-" + cur.nSystem, cur.obj), 
                ret.timeSeparator = getValue("timeSeparator", ret.numberSymbols);
                var digits = getValue(cur.nSystem + "._digits", numberSystem);
                if (!isUndefined(digits)) for (var _i = 0, latnNumberSystem_1 = latnNumberSystem; _i < latnNumberSystem_1.length; _i++) {
                    var i = latnNumberSystem_1[_i];
                    ret.mapper[i] = digits[i];
                }
            }
            return ret;
        }, ParserBase.nPair = "numericPair", ParserBase.nRegex = "numericRegex", ParserBase.numberingSystems = defaultNumberingSystem, 
        ParserBase;
    }(), errorText = {
        ms: "minimumSignificantDigits",
        ls: "maximumSignificantDigits",
        mf: "minimumFractionDigits",
        lf: "maximumFractionDigits"
    }, mapper$1 = [ "infinity", "nan", "group", "decimal", "exponential" ], NumberFormat = function() {
        function NumberFormat() {}
        return NumberFormat.numberFormatter = function(culture, option, cldr) {
            var symbolPattern, _this = this, fOptions = extend({}, option), cOptions = {}, dOptions = {}, dependable = IntlBase.getDependables(cldr, culture, !0);
            dOptions.numberMapper = ParserBase.getNumberMapper(dependable.parserObject, ParserBase.getNumberingSystem(cldr), !0), 
            dOptions.currencySymbol = IntlBase.getCurrencySymbol(dependable.numericObject, fOptions.currency || defaultCurrencyCode), 
            dOptions.percentSymbol = dOptions.numberMapper.numberSymbols.percentSign, dOptions.minusSymbol = dOptions.numberMapper.numberSymbols.minusSign;
            var symbols = dOptions.numberMapper.numberSymbols;
            if (option.format && !IntlBase.formatRegex.test(option.format)) cOptions = IntlBase.customFormat(option.format, dOptions, dependable.numericObject); else {
                extend(fOptions, IntlBase.getProperNumericSkeleton(option.format || "N")), fOptions.isCurrency = "currency" === fOptions.type, 
                fOptions.isPercent = "percent" === fOptions.type, symbolPattern = IntlBase.getSymbolPattern(fOptions.type, dOptions.numberMapper.numberSystem, dependable.numericObject, fOptions.isAccount), 
                fOptions.groupOne = this.checkValueRange(fOptions.maximumSignificantDigits, fOptions.minimumSignificantDigits, !0), 
                this.checkValueRange(fOptions.maximumFractionDigits, fOptions.minimumFractionDigits, !1, !0), 
                isUndefined(fOptions.fractionDigits) || (fOptions.minimumFractionDigits = fOptions.maximumFractionDigits = fOptions.fractionDigits), 
                isUndefined(fOptions.useGrouping) && (fOptions.useGrouping = !0), fOptions.isCurrency && (symbolPattern = symbolPattern.replace(/\u00A4/g, IntlBase.defaultCurrency));
                var split = symbolPattern.split(";");
                cOptions.nData = IntlBase.getFormatData(split[1] || "-" + split[0], !0, dOptions.currencySymbol), 
                cOptions.pData = IntlBase.getFormatData(split[0], !1, dOptions.currencySymbol), 
                fOptions.useGrouping && (fOptions.groupSeparator = symbols[mapper$1[2]], fOptions.groupData = this.getGroupingDetails(split[0]));
                if (isUndefined(fOptions.minimumFractionDigits) && (fOptions.minimumFractionDigits = cOptions.nData.minimumFraction), 
                isUndefined(fOptions.maximumFractionDigits)) {
                    var mval = cOptions.nData.maximumFraction;
                    fOptions.maximumFractionDigits = isUndefined(mval) && fOptions.isPercent ? 0 : mval;
                }
                var mfrac = fOptions.minimumFractionDigits, lfrac = fOptions.maximumFractionDigits;
                isUndefined(mfrac) || isUndefined(lfrac) || mfrac > lfrac && (fOptions.maximumFractionDigits = mfrac);
            }
            return extend(cOptions.nData, fOptions), extend(cOptions.pData, fOptions), function(value) {
                return isNaN(value) ? symbols[mapper$1[1]] : isFinite(value) ? _this.intNumberFormatter(value, cOptions, dOptions) : symbols[mapper$1[0]];
            };
        }, NumberFormat.getGroupingDetails = function(pattern) {
            var ret = {}, match = pattern.match(IntlBase.negativeDataRegex);
            if (match && match[4]) {
                var pattern_1 = match[4], p = pattern_1.lastIndexOf(",");
                if (-1 !== p) {
                    var temp = pattern_1.split(".")[0];
                    ret.primary = temp.length - p - 1;
                    var s = pattern_1.lastIndexOf(",", p - 1);
                    -1 !== s && (ret.secondary = p - 1 - s);
                }
            }
            return ret;
        }, NumberFormat.checkValueRange = function(val1, val2, checkbothExist, isFraction) {
            var decide = isFraction ? "f" : "s", dint = 0, str1 = errorText["l" + decide], str2 = errorText["m" + decide];
            if (isUndefined(val1) || (this.checkRange(val1, str1, isFraction), dint++), isUndefined(val2) || (this.checkRange(val2, str2, isFraction), 
            dint++), 2 === dint) {
                if (!(val1 < val2)) return !0;
                throwError(str2 + "specified must be less than the" + str1);
            } else checkbothExist && 1 === dint && throwError("Both" + str2 + "and" + str2 + "must be present");
            return !1;
        }, NumberFormat.checkRange = function(val, text, isFraction) {
            var range = isFraction ? [ 0, 20 ] : [ 1, 21 ];
            (val < range[0] || val > range[1]) && throwError(text + "value must be within the range" + range[0] + "to" + range[1]);
        }, NumberFormat.intNumberFormatter = function(value, fOptions, dOptions) {
            var curData;
            if (!isUndefined(fOptions.nData.type)) {
                value < 0 ? (value *= -1, curData = fOptions.nData) : curData = 0 === value ? fOptions.zeroData || fOptions.pData : fOptions.pData;
                var fValue = "";
                return curData.isPercent && (value *= 100), curData.groupOne ? fValue = this.processSignificantDigits(value, curData.minimumSignificantDigits, curData.maximumSignificantDigits) : (fValue = this.processFraction(value, curData.minimumFractionDigits, curData.maximumFractionDigits), 
                curData.minimumIntegerDigits && (fValue = this.processMinimumIntegers(fValue, curData.minimumIntegerDigits))), 
                "scientific" === curData.type && (fValue = (fValue = value.toExponential(curData.maximumFractionDigits)).replace("e", dOptions.numberMapper.numberSymbols[mapper$1[4]])), 
                fValue = fValue.replace(".", dOptions.numberMapper.numberSymbols[mapper$1[3]]), 
                curData.useGrouping && (fValue = this.groupNumbers(fValue, curData.groupData.primary, curData.groupSeparator || ",", dOptions.numberMapper.numberSymbols[mapper$1[3]] || ".", curData.groupData.secondary)), 
                fValue = ParserBase.convertValueParts(fValue, IntlBase.latnParseRegex, dOptions.numberMapper.mapper), 
                "N/A" === curData.nlead ? curData.nlead : curData.nlead + fValue + curData.nend;
            }
        }, NumberFormat.processSignificantDigits = function(value, min, max) {
            var temp = value + "";
            return temp.length < min ? value.toPrecision(min) : (temp = value.toPrecision(max), 
            +temp + "");
        }, NumberFormat.groupNumbers = function(val, level1, sep, decimalSymbol, level2) {
            for (var flag = !isNullOrUndefined(level2) && 0 !== level2, split = val.split(decimalSymbol), prefix = split[0], length = prefix.length, str = ""; length > level1; ) str = prefix.slice(length - level1, length) + (str.length ? sep + str : ""), 
            length -= level1, flag && (level1 = level2, flag = !1);
            return split[0] = prefix.slice(0, length) + (str.length ? sep : "") + str, split.join(decimalSymbol);
        }, NumberFormat.processFraction = function(value, min, max) {
            var temp = (value + "").split(".")[1], length = temp ? temp.length : 0;
            if (min && length < min) {
                var ret = "";
                if (0 !== length) {
                    ret += value;
                    for (var j = 0; j < min - length; j++) ret += "0";
                    return ret;
                }
                return ret = value.toFixed(min), value.toFixed(min);
            }
            return !isNullOrUndefined(max) && (length > max || 0 === max) ? value.toFixed(max) : value + "";
        }, NumberFormat.processMinimumIntegers = function(value, min) {
            var temp = value.split("."), lead = temp[0], len = lead.length;
            if (len < min) {
                for (var i = 0; i < min - len; i++) lead = "0" + lead;
                temp[0] = lead;
            }
            return temp.join(".");
        }, NumberFormat;
    }();
    !function(IntlBase) {
        function getResultantPattern(skeleton, dateObject, type) {
            var resPattern, iType = type || "date";
            if (-1 !== IntlBase.basicPatterns.indexOf(skeleton)) {
                if (resPattern = getValue(iType + "Formats." + skeleton, dateObject), "dateTime" === iType) {
                    var dPattern = getValue("dateFormats." + skeleton, dateObject), tPattern = getValue("timeFormats." + skeleton, dateObject);
                    resPattern = resPattern.replace("{1}", dPattern).replace("{0}", tPattern);
                }
            } else resPattern = getValue("dateTimeFormats.availableFormats." + skeleton, dateObject);
            return resPattern;
        }
        function getDependables(cldr, culture, isNumber) {
            var ret = {};
            return ret.parserObject = ParserBase.getMainObject(cldr, culture) || IntlBase.defaultObject, 
            isNumber ? ret.numericObject = getValue("numbers", ret.parserObject) : ret.dateObject = getValue("dates.calendars.gregorian", ret.parserObject), 
            ret;
        }
        function getSymbolPattern(type, numSystem, obj, isAccount) {
            return getValue(type + "Formats-numberSystem-" + numSystem + (isAccount ? ".accounting" : ".standard"), obj) || (isAccount ? getValue(type + "Formats-numberSystem-" + numSystem + ".standard", obj) : "");
        }
        function getProperNumericSkeleton(skeleton) {
            var matches = skeleton.match(IntlBase.formatRegex), ret = {}, pattern = matches[1].toUpperCase();
            return ret.isAccount = "A" === pattern, ret.type = IntlBase.patternMatcher[pattern], 
            skeleton.length > 1 && (ret.fractionDigits = parseInt(matches[2], 10)), ret;
        }
        function getFormatData(pattern, needFraction, cSymbol, fractionOnly) {
            var nData = fractionOnly ? {} : {
                nlead: "",
                nend: ""
            }, match = pattern.match(IntlBase.customRegex);
            if (match) {
                fractionOnly || (nData.nlead = changeCurrencySymbol(match[1], cSymbol), nData.nend = changeCurrencySymbol(match[10], cSymbol), 
                nData.groupPattern = match[4]);
                var fraction = match[7];
                if (fraction && needFraction) {
                    var fmatch = fraction.match(fractionRegex);
                    isNullOrUndefined(fmatch) ? nData.minimumFraction = 0 : nData.minimumFraction = fmatch.length, 
                    nData.maximumFraction = fraction.length - 1;
                }
            }
            return nData;
        }
        function changeCurrencySymbol(val, sym) {
            return val ? val.replace(IntlBase.defaultCurrency, sym) : "";
        }
        function isCurrencyPercent(parts, actual, symbol) {
            for (var options = {
                nlead: parts[0],
                nend: parts[1]
            }, i = 0; i < 2; i++) {
                var part = parts[i], loc = part.indexOf(actual);
                if (-1 !== loc && (loc < part.indexOf("'") || loc > part.lastIndexOf("'"))) {
                    options[typeMapper[i]] = part.substr(0, loc) + symbol + part.substr(loc + 1), options[typeMapper[actual]] = !0, 
                    options.type = options.isCurrency ? "currency" : "percent";
                    break;
                }
            }
            return options;
        }
        IntlBase.negativeDataRegex = /^(('[^']+'|''|[^*#@0,.E])*)(\*.)?((([#,]*[0,]*0+)(\.0*[0-9]*#*)?)|([#,]*@+#*))(E\+?0+)?(('[^']+'|''|[^*#@0,.E])*)$/, 
        IntlBase.customRegex = /^(('[^']+'|''|[^*#@0,.])*)(\*.)?((([0#,]*[0,]*[0#]*)(\.[0#]*)?)|([#,]*@+#*))(E\+?0+)?(('[^']+'|''|[^*#@0,.E])*)$/, 
        IntlBase.latnParseRegex = /0|1|2|3|4|5|6|7|8|9/g;
        var fractionRegex = /[0-9]/g;
        IntlBase.defaultCurrency = "$";
        var mapper = [ "infinity", "nan", "group", "decimal" ], patternRegex = /G|M|L|H|c|'| a|yy|y|EEEE|E/g, patternMatch = {
            G: "",
            M: "m",
            L: "m",
            H: "h",
            c: "d",
            "'": '"',
            " a": " AM/PM",
            yy: "yy",
            y: "yyyy",
            EEEE: "dddd",
            E: "ddd"
        };
        IntlBase.formatRegex = /(^[ncpae]{1})([0-1]?[0-9]|20)?$/i;
        var typeMapper = {
            $: "isCurrency",
            "%": "isPercent",
            "-": "isNegative",
            0: "nlead",
            1: "nend"
        };
        IntlBase.dateParseRegex = /([a-z])\1*|'([^']|'')+'|''|./gi, IntlBase.basicPatterns = [ "short", "medium", "long", "full" ], 
        IntlBase.defaultObject = {
            dates: {
                calendars: {
                    gregorian: {
                        months: {
                            "stand-alone": {
                                abbreviated: {
                                    "1": "Jan",
                                    "2": "Feb",
                                    "3": "Mar",
                                    "4": "Apr",
                                    "5": "May",
                                    "6": "Jun",
                                    "7": "Jul",
                                    "8": "Aug",
                                    "9": "Sep",
                                    "10": "Oct",
                                    "11": "Nov",
                                    "12": "Dec"
                                },
                                narrow: {
                                    "1": "J",
                                    "2": "F",
                                    "3": "M",
                                    "4": "A",
                                    "5": "M",
                                    "6": "J",
                                    "7": "J",
                                    "8": "A",
                                    "9": "S",
                                    "10": "O",
                                    "11": "N",
                                    "12": "D"
                                },
                                wide: {
                                    "1": "January",
                                    "2": "February",
                                    "3": "March",
                                    "4": "April",
                                    "5": "May",
                                    "6": "June",
                                    "7": "July",
                                    "8": "August",
                                    "9": "September",
                                    "10": "October",
                                    "11": "November",
                                    "12": "December"
                                }
                            }
                        },
                        days: {
                            "stand-alone": {
                                abbreviated: {
                                    sun: "Sun",
                                    mon: "Mon",
                                    tue: "Tue",
                                    wed: "Wed",
                                    thu: "Thu",
                                    fri: "Fri",
                                    sat: "Sat"
                                },
                                narrow: {
                                    sun: "S",
                                    mon: "M",
                                    tue: "T",
                                    wed: "W",
                                    thu: "T",
                                    fri: "F",
                                    sat: "S"
                                },
                                short: {
                                    sun: "Su",
                                    mon: "Mo",
                                    tue: "Tu",
                                    wed: "We",
                                    thu: "Th",
                                    fri: "Fr",
                                    sat: "Sa"
                                },
                                wide: {
                                    sun: "Sunday",
                                    mon: "Monday",
                                    tue: "Tuesday",
                                    wed: "Wednesday",
                                    thu: "Thursday",
                                    fri: "Friday",
                                    sat: "Saturday"
                                }
                            }
                        },
                        dayPeriods: {
                            format: {
                                wide: {
                                    am: "AM",
                                    pm: "PM"
                                }
                            }
                        },
                        eras: {
                            eraNames: {
                                "0": "Before Christ",
                                "0-alt-variant": "Before Common Era",
                                "1": "Anno Domini",
                                "1-alt-variant": "Common Era"
                            },
                            eraAbbr: {
                                "0": "BC",
                                "0-alt-variant": "BCE",
                                "1": "AD",
                                "1-alt-variant": "CE"
                            },
                            eraNarrow: {
                                "0": "B",
                                "0-alt-variant": "BCE",
                                "1": "A",
                                "1-alt-variant": "CE"
                            }
                        },
                        dateFormats: {
                            full: "EEEE, MMMM d, y",
                            long: "MMMM d, y",
                            medium: "MMM d, y",
                            short: "M/d/yy"
                        },
                        timeFormats: {
                            full: "h:mm:ss a zzzz",
                            long: "h:mm:ss a z",
                            medium: "h:mm:ss a",
                            short: "h:mm a"
                        },
                        dateTimeFormats: {
                            full: "{1} 'at' {0}",
                            long: "{1} 'at' {0}",
                            medium: "{1}, {0}",
                            short: "{1}, {0}",
                            availableFormats: {
                                d: "d",
                                E: "ccc",
                                Ed: "d E",
                                Ehm: "E h:mm a",
                                EHm: "E HH:mm",
                                Ehms: "E h:mm:ss a",
                                EHms: "E HH:mm:ss",
                                Gy: "y G",
                                GyMMM: "MMM y G",
                                GyMMMd: "MMM d, y G",
                                GyMMMEd: "E, MMM d, y G",
                                h: "h a",
                                H: "HH",
                                hm: "h:mm a",
                                Hm: "HH:mm",
                                hms: "h:mm:ss a",
                                Hms: "HH:mm:ss",
                                hmsv: "h:mm:ss a v",
                                Hmsv: "HH:mm:ss v",
                                hmv: "h:mm a v",
                                Hmv: "HH:mm v",
                                M: "L",
                                Md: "M/d",
                                MEd: "E, M/d",
                                MMM: "LLL",
                                MMMd: "MMM d",
                                MMMEd: "E, MMM d",
                                MMMMd: "MMMM d",
                                ms: "mm:ss",
                                y: "y",
                                yM: "M/y",
                                yMd: "M/d/y",
                                yMEd: "E, M/d/y",
                                yMMM: "MMM y",
                                yMMMd: "MMM d, y",
                                yMMMEd: "E, MMM d, y",
                                yMMMM: "MMMM y"
                            }
                        }
                    }
                },
                timeZoneNames: {
                    hourFormat: "+HH:mm;-HH:mm",
                    gmtFormat: "GMT{0}",
                    gmtZeroFormat: "GMT"
                }
            },
            numbers: {
                currencies: {
                    USD: {
                        displayName: "US Dollar",
                        symbol: "$",
                        "symbol-alt-narrow": "$"
                    },
                    EUR: {
                        displayName: "Euro",
                        symbol: "€",
                        "symbol-alt-narrow": "€"
                    },
                    GBP: {
                        displayName: "British Pound",
                        "symbol-alt-narrow": "£"
                    }
                },
                defaultNumberingSystem: "latn",
                minimumGroupingDigits: "1",
                "symbols-numberSystem-latn": {
                    decimal: ".",
                    group: ",",
                    list: ";",
                    percentSign: "%",
                    plusSign: "+",
                    minusSign: "-",
                    exponential: "E",
                    superscriptingExponent: "×",
                    perMille: "‰",
                    infinity: "∞",
                    nan: "NaN",
                    timeSeparator: ":"
                },
                "decimalFormats-numberSystem-latn": {
                    standard: "#,##0.###"
                },
                "percentFormats-numberSystem-latn": {
                    standard: "#,##0%"
                },
                "currencyFormats-numberSystem-latn": {
                    standard: "¤#,##0.00",
                    accounting: "¤#,##0.00;(¤#,##0.00)"
                },
                "scientificFormats-numberSystem-latn": {
                    standard: "#E0"
                }
            }
        }, IntlBase.monthIndex = {
            3: "abbreviated",
            4: "wide",
            5: "narrow",
            1: "abbreviated"
        }, IntlBase.month = "months", IntlBase.days = "days", IntlBase.patternMatcher = {
            C: "currency",
            P: "percent",
            N: "decimal",
            A: "currency",
            E: "scientific"
        }, IntlBase.getResultantPattern = getResultantPattern, IntlBase.getDependables = getDependables, 
        IntlBase.getSymbolPattern = getSymbolPattern, IntlBase.getProperNumericSkeleton = getProperNumericSkeleton, 
        IntlBase.getFormatData = getFormatData, IntlBase.getCurrencySymbol = function(numericObject, currencyCode) {
            return getValue("currencies." + currencyCode + ".symbol", numericObject) || "$";
        }, IntlBase.customFormat = function(format, dOptions, obj) {
            for (var options = {}, formatSplit = format.split(";"), data = [ "pData", "nData", "zeroData" ], i = 0; i < formatSplit.length; i++) options[data[i]] = function(format, dOptions, numObject) {
                var cOptions = {
                    type: "decimal",
                    minimumFractionDigits: 0,
                    maximumFractionDigits: 0
                }, pattern = format.match(IntlBase.customRegex);
                (isNullOrUndefined(pattern) || "" === pattern[5] && "N/A" !== format) && (cOptions.type = void 0), 
                cOptions.nlead = pattern[1], cOptions.nend = pattern[10];
                var integerPart = pattern[6];
                cOptions.useGrouping = -1 !== integerPart.indexOf(","), integerPart = integerPart.replace(/,/g, "");
                var fractionPart = pattern[7];
                if (-1 !== integerPart.indexOf("0") && (cOptions.minimumIntegerDigits = integerPart.length - integerPart.indexOf("0")), 
                isNullOrUndefined(fractionPart) || (cOptions.minimumFractionDigits = fractionPart.lastIndexOf("0"), 
                cOptions.maximumFractionDigits = fractionPart.lastIndexOf("#"), -1 === cOptions.minimumFractionDigits && (cOptions.minimumFractionDigits = 0), 
                (-1 === cOptions.maximumFractionDigits || cOptions.maximumFractionDigits < cOptions.minimumFractionDigits) && (cOptions.maximumFractionDigits = cOptions.minimumFractionDigits)), 
                isNullOrUndefined(dOptions) ? extend(cOptions, isCurrencyPercent([ cOptions.nlead, cOptions.nend ], "%", "%")) : (extend(cOptions, isCurrencyPercent([ cOptions.nlead, cOptions.nend ], "$", dOptions.currencySymbol)), 
                cOptions.isCurrency || extend(cOptions, isCurrencyPercent([ cOptions.nlead, cOptions.nend ], "%", dOptions.percentSymbol))), 
                !isNullOrUndefined(numObject)) {
                    var symbolPattern = getSymbolPattern(cOptions.type, dOptions.numberMapper.numberSystem, numObject, !1);
                    cOptions.useGrouping && (cOptions.groupSeparator = dOptions.numberMapper.numberSymbols[mapper[2]], 
                    cOptions.groupData = NumberFormat.getGroupingDetails(symbolPattern.split(";")[0])), 
                    cOptions.nlead = cOptions.nlead.replace(/\'/g, ""), cOptions.nend = cOptions.nend.replace(/\'/g, "");
                }
                return cOptions;
            }(formatSplit[i], dOptions, obj);
            return isNullOrUndefined(options.nData) && (options.nData = extend({}, options.pData), 
            options.nData.nlead = isNullOrUndefined(dOptions) ? "-" + options.nData.nlead : dOptions.minusSymbol + options.nData.nlead), 
            options;
        }, IntlBase.isCurrencyPercent = isCurrencyPercent, IntlBase.getDateSeparator = function(dateObj) {
            var value = (getValue("dateFormats.short", dateObj) || "").match(/[d‏M‏]([^d‏M])[d‏M‏]/i);
            return value ? value[1] : "/";
        }, IntlBase.getActualDateTimeFormat = function(culture, options, cldr, isExcelFormat) {
            var dependable = getDependables(cldr, culture), actualPattern = options.format || getResultantPattern(options.skeleton, dependable.dateObject, options.type);
            if (isExcelFormat) {
                if (-1 !== (actualPattern = actualPattern.replace(patternRegex, function(pattern) {
                    return patternMatch[pattern];
                })).indexOf("z")) {
                    var tLength = actualPattern.match(/z/g).length, timeZonePattern = void 0, options_1 = {
                        timeZone: {}
                    };
                    options_1.numMapper = ParserBase.getNumberMapper(dependable.parserObject, ParserBase.getNumberingSystem(cldr)), 
                    options_1.timeZone = getValue("dates.timeZoneNames", dependable.parserObject);
                    var timezone = new Date().getTimezoneOffset(), pattern = tLength < 4 ? "+H;-H" : options_1.timeZone.hourFormat;
                    pattern = pattern.replace(/:/g, options_1.numMapper.timeSeparator), 0 === timezone ? timeZonePattern = options_1.timeZone.gmtZeroFormat : (timeZonePattern = DateFormat.getTimeZoneValue(timezone, pattern), 
                    timeZonePattern = options_1.timeZone.gmtFormat.replace(/\{0\}/, timeZonePattern)), 
                    actualPattern = actualPattern.replace(/[z]+/, '"' + timeZonePattern + '"');
                }
                actualPattern = actualPattern.replace(/ $/, "");
            }
            return actualPattern;
        }, IntlBase.getActualNumberFormat = function(culture, options, cldr) {
            var minFrac, dependable = getDependables(cldr, culture, !0), parseOptions = {
                custom: !0
            };
            if (/(c|a)$/gi.test(options.format) && !options.minimumFractionDigits && !options.maximumFractionDigits) {
                var dOptions = {};
                dOptions.numberMapper = ParserBase.getNumberMapper(dependable.parserObject, ParserBase.getNumberingSystem(cldr), !0), 
                minFrac = getFormatData(getSymbolPattern("currency", dOptions.numberMapper.numberSystem, dependable.numericObject, /a/i.test(options.format)).split(";")[0], !0, "", !0).minimumFraction;
            }
            var actualPattern;
            IntlBase.formatRegex.test(options.format) || !options.format ? (extend(parseOptions, getProperNumericSkeleton(options.format || "N")), 
            parseOptions.custom = !1, actualPattern = "###0", (parseOptions.fractionDigits || options.minimumFractionDigits || options.maximumFractionDigits || minFrac) && (parseOptions.fractionDigits && (options.minimumFractionDigits = options.maximumFractionDigits = parseOptions.fractionDigits), 
            actualPattern = function(pattern, minDigits, maxDigits) {
                pattern += ".";
                for (var a = 0; a < minDigits; a++) pattern += "0";
                if (minDigits < maxDigits) for (var diff = maxDigits - minDigits, b = 0; b < diff; b++) pattern += "#";
                return pattern;
            }(actualPattern, minFrac || parseOptions.fractionDigits || options.minimumFractionDigits || 0, options.maximumFractionDigits || 0)), 
            options.minimumIntegerDigits && (actualPattern = function(pattern, digits) {
                for (var temp = pattern.split("."), integer = "", x = 0; x < digits; x++) integer += "0";
                return temp[1] ? integer + "." + temp[1] : integer;
            }(actualPattern, options.minimumIntegerDigits)), options.useGrouping && (actualPattern = function(pattern) {
                var temp = pattern.split("."), integer = temp[0], no = 3 - integer.length % 3;
                pattern = "";
                for (var x = (integer = (no && 1 === no ? "#" : 2 === no ? "##" : "") + integer).length - 1; x > 0; x -= 3) pattern = "," + integer[x - 2] + integer[x - 1] + integer[x] + pattern;
                return pattern = pattern.slice(1), temp[1] ? pattern + "." + temp[1] : pattern;
            }(actualPattern)), "currency" !== parseOptions.type || parseOptions.isAccount ? "currency" === parseOptions.type && parseOptions.isAccount && (actualPattern = "$ " + actualPattern + ";($ " + actualPattern + ")") : actualPattern = "$ " + actualPattern, 
            "percent" === parseOptions.type && (actualPattern += " %")) : actualPattern = options.format.replace(/\'/g, '"');
            return actualPattern;
        };
    }(IntlBase || (IntlBase = {}));
    var lastPageID, abbreviateRegexGlobal = /\/MMMMM|MMMM|MMM|a|LLL|EEEEE|EEEE|E|K|ccc|G+|z+/gi, weekdayKey = [ "sun", "mon", "tue", "wed", "thu", "fri", "sat" ], timeSetter = {
        m: "getMinutes",
        h: "getHours",
        H: "getHours",
        s: "getSeconds",
        d: "getDate"
    }, datePartMatcher = {
        M: "month",
        d: "day",
        E: "weekday",
        c: "weekday",
        y: "year",
        m: "minute",
        h: "hour",
        H: "hour",
        s: "second",
        L: "month",
        a: "designator",
        z: "timeZone",
        Z: "timeZone",
        G: "era"
    }, DateFormat = function() {
        function DateFormat() {}
        return DateFormat.dateFormat = function(culture, option, cldr) {
            var _this = this, dependable = IntlBase.getDependables(cldr, culture), formatOptions = {}, resPattern = option.format || IntlBase.getResultantPattern(option.skeleton, dependable.dateObject, option.type);
            if (formatOptions.dateSeperator = IntlBase.getDateSeparator(dependable.dateObject), 
            isUndefined(resPattern)) throwError("Format options or type given must be invalid"); else {
                formatOptions.pattern = resPattern, formatOptions.numMapper = ParserBase.getNumberMapper(dependable.parserObject, ParserBase.getNumberingSystem(cldr));
                for (var _i = 0, patternMatch_1 = resPattern.match(abbreviateRegexGlobal) || []; _i < patternMatch_1.length; _i++) {
                    var str = patternMatch_1[_i], len = str.length, char = str[0];
                    switch ("K" === char && (char = "h"), char) {
                      case "E":
                      case "c":
                        formatOptions.weekday = dependable.dateObject[IntlBase.days]["stand-alone"][IntlBase.monthIndex[len]];
                        break;

                      case "M":
                      case "L":
                        formatOptions.month = dependable.dateObject[IntlBase.month]["stand-alone"][IntlBase.monthIndex[len]];
                        break;

                      case "a":
                        formatOptions.designator = getValue("dayPeriods.format.wide", dependable.dateObject);
                        break;

                      case "G":
                        var eText = len <= 3 ? "eraAbbr" : 4 === len ? "eraNames" : "eraNarrow";
                        formatOptions.era = getValue("eras." + eText, dependable.dateObject);
                        break;

                      case "z":
                        formatOptions.timeZone = getValue("dates.timeZoneNames", dependable.parserObject);
                    }
                }
            }
            return function(value) {
                return isNaN(value.getDate()) ? null : _this.intDateFormatter(value, formatOptions);
            };
        }, DateFormat.intDateFormatter = function(value, options) {
            for (var ret = "", _i = 0, matches_1 = options.pattern.match(IntlBase.dateParseRegex); _i < matches_1.length; _i++) {
                var match = matches_1[_i], length_1 = match.length, char = match[0];
                "K" === char && (char = "h");
                var curval = void 0, isNumber = void 0, processNumber = void 0, curstr = "";
                switch (char) {
                  case "M":
                  case "L":
                    curval = value.getMonth() + 1, length_1 > 2 ? ret += options.month[curval] : isNumber = !0;
                    break;

                  case "E":
                  case "c":
                    ret += options.weekday[weekdayKey[value.getDay()]];
                    break;

                  case "H":
                  case "h":
                  case "m":
                  case "s":
                  case "d":
                    isNumber = !0, curval = value[timeSetter[char]](), "h" === char && (curval = curval % 12 || 12);
                    break;

                  case "y":
                    processNumber = !0, curstr += value.getFullYear(), 2 === length_1 && (curstr = curstr.substr(curstr.length - 2));
                    break;

                  case "a":
                    var desig = value.getHours() < 12 ? "am" : "pm";
                    ret += options.designator[desig];
                    break;

                  case "G":
                    var dec = value.getFullYear() < 0 ? 0 : 1;
                    ret += options.era[dec];
                    break;

                  case "'":
                    ret += "''" === match ? "'" : match.replace(/\'/g, "");
                    break;

                  case "z":
                    var timezone = value.getTimezoneOffset(), pattern_1 = length_1 < 4 ? "+H;-H" : options.timeZone.hourFormat;
                    pattern_1 = pattern_1.replace(/:/g, options.numMapper.timeSeparator), 0 === timezone ? ret += options.timeZone.gmtZeroFormat : (processNumber = !0, 
                    curstr = this.getTimeZoneValue(timezone, pattern_1)), curstr = options.timeZone.gmtFormat.replace(/\{0\}/, curstr);
                    break;

                  case ":":
                    ret += options.numMapper.numberSymbols.timeSeparator;
                    break;

                  case "/":
                    ret += options.dateSeperator;
                    break;

                  default:
                    ret += match;
                }
                isNumber && (processNumber = !0, curstr = this.checkTwodigitNumber(curval, length_1)), 
                processNumber && (ret += ParserBase.convertValueParts(curstr, IntlBase.latnParseRegex, options.numMapper.mapper));
            }
            return ret;
        }, DateFormat.checkTwodigitNumber = function(val, len) {
            var ret = val + "";
            return 2 === len && 2 !== ret.length ? "0" + ret : ret;
        }, DateFormat.getTimeZoneValue = function(tVal, pattern) {
            var _this = this, curPattern = pattern.split(";")[tVal > 0 ? 1 : 0], no = Math.abs(tVal);
            return curPattern = curPattern.replace(/HH?|mm/g, function(str) {
                var len = str.length, ishour = -1 !== str.indexOf("H");
                return _this.checkTwodigitNumber(Math.floor(ishour ? no / 60 : no % 60), len);
            });
        }, DateFormat;
    }(), latnRegex$1 = /^[0-9]*$/, timeSetter$1 = {
        minute: "setMinutes",
        hour: "setHours",
        second: "setSeconds",
        day: "setDate",
        month: "setMonth"
    }, DateParser = function() {
        function DateParser() {}
        return DateParser.dateParser = function(culture, option, cldr) {
            var hourOnly, _this = this, dependable = IntlBase.getDependables(cldr, culture), numOptions = ParserBase.getCurrentNumericOptions(dependable.parserObject, ParserBase.getNumberingSystem(cldr)), parseOptions = {}, resPattern = option.format || IntlBase.getResultantPattern(option.skeleton, dependable.dateObject, option.type), regexString = "";
            if (isUndefined(resPattern)) throwError("Format options or type given must be invalid"); else {
                parseOptions = {
                    pattern: resPattern,
                    evalposition: {}
                };
                for (var patternMatch = resPattern.match(IntlBase.dateParseRegex) || [], length_1 = patternMatch.length, gmtCorrection = 0, zCorrectTemp = 0, isgmtTraversed = !1, nRegx = numOptions.numericRegex, i = 0; i < length_1; i++) {
                    var str = patternMatch[i], len = str.length, char = "K" === str[0] ? "h" : str[0], isNumber = void 0, canUpdate = void 0, charKey = datePartMatcher[char], optional = 2 === len ? "" : "?";
                    switch (isgmtTraversed && (gmtCorrection = zCorrectTemp, isgmtTraversed = !1), char) {
                      case "E":
                      case "c":
                        var weekObject = ParserBase.reverseObject(dependable.dateObject[IntlBase.days]["stand-alone"][IntlBase.monthIndex[len]]);
                        regexString += "(" + Object.keys(weekObject).join("|") + ")";
                        break;

                      case "M":
                      case "L":
                      case "d":
                      case "m":
                      case "s":
                      case "h":
                      case "H":
                        canUpdate = !0, ("M" === char || "L" === char) && len > 2 ? (parseOptions[charKey] = ParserBase.reverseObject(dependable.dateObject.months["stand-alone"][IntlBase.monthIndex[len]]), 
                        regexString += "(" + Object.keys(parseOptions[charKey]).join("|") + ")") : (isNumber = !0, 
                        regexString += "(" + nRegx + nRegx + optional + ")"), "h" === char && (parseOptions.hour12 = !0);
                        break;

                      case "y":
                        canUpdate = isNumber = !0, regexString += 2 === len ? "(" + nRegx + nRegx + ")" : "(" + nRegx + "{" + len + ",})";
                        break;

                      case "a":
                        canUpdate = !0, parseOptions[charKey] = ParserBase.reverseObject(getValue("dayPeriods.format.wide", dependable.dateObject)), 
                        regexString += "(" + Object.keys(parseOptions[charKey]).join("|") + ")";
                        break;

                      case "G":
                        canUpdate = !0;
                        var eText = len <= 3 ? "eraAbbr" : 4 === len ? "eraNames" : "eraNarrow";
                        parseOptions[charKey] = ParserBase.reverseObject(getValue("eras." + eText, dependable.dateObject)), 
                        regexString += "(" + Object.keys(parseOptions[charKey]).join("|") + "?)";
                        break;

                      case "z":
                        canUpdate = 0 !== new Date().getTimezoneOffset(), parseOptions[charKey] = getValue("dates.timeZoneNames", dependable.parserObject);
                        var tzone = parseOptions[charKey], hpattern = (hourOnly = len < 4) ? "+H;-H" : tzone.hourFormat;
                        regexString += "(" + this.parseTimeZoneRegx(hpattern, tzone, nRegx) + ")?", isgmtTraversed = !0, 
                        zCorrectTemp = hourOnly ? 6 : 12;
                        break;

                      case "'":
                        regexString += "(" + str.replace(/\'/g, "") + ")?";
                        break;

                      default:
                        regexString += "(.)?";
                    }
                    canUpdate && (parseOptions.evalposition[charKey] = {
                        isNumber: isNumber,
                        pos: i + 1 + gmtCorrection,
                        hourOnly: hourOnly
                    }), i !== length_1 - 1 || isNullOrUndefined(regexString) || (parseOptions.parserRegex = new RegExp("^" + regexString + "$"));
                }
            }
            return function(value) {
                var parsedDateParts = _this.internalDateParse(value, parseOptions, numOptions);
                return isNullOrUndefined(parsedDateParts) || !Object.keys(parsedDateParts).length ? null : _this.getDateObject(parsedDateParts);
            };
        }, DateParser.getDateObject = function(options, value) {
            var res = value || new Date();
            res.setMilliseconds(0);
            var y = options.year, desig = options.designator, tzone = options.timeZone;
            if (!isUndefined(y)) {
                if ((y + "").length <= 2) {
                    y += 100 * Math.floor(res.getFullYear() / 100);
                }
                res.setFullYear(y);
            }
            for (var _i = 0, tKeys_1 = [ "hour", "minute", "second", "month", "day" ]; _i < tKeys_1.length; _i++) {
                var key = tKeys_1[_i], tValue = options[key];
                if (!isUndefined(tValue)) if ("month" === key) {
                    if ((tValue -= 1) < 0 || tValue > 11) return new Date("invalid");
                    var pDate = res.getDate();
                    res.setDate(1), res[timeSetter$1[key]](tValue);
                    var lDate = new Date(res.getFullYear(), tValue + 1, 0).getDate();
                    res.setDate(pDate < lDate ? pDate : lDate);
                } else {
                    if ("day" === key) {
                        var lastDay = new Date(res.getFullYear(), res.getMonth() + 1, 0).getDate();
                        if (tValue < 1 || tValue > lastDay) return null;
                    }
                    res[timeSetter$1[key]](tValue);
                }
            }
            if (!isUndefined(desig)) {
                var hour = res.getHours();
                "pm" === desig ? res.setHours(hour + (12 === hour ? 0 : 12)) : 12 === hour && res.setHours(0);
            }
            if (!isUndefined(tzone)) {
                var tzValue = tzone - res.getTimezoneOffset();
                0 !== tzValue && res.setMinutes(res.getMinutes() + tzValue);
            }
            return res;
        }, DateParser.internalDateParse = function(value, parseOptions, num) {
            var matches = value.match(parseOptions.parserRegex), retOptions = {
                hour: 0,
                minute: 0,
                second: 0
            };
            num.numericRegex;
            if (isNullOrUndefined(matches)) return null;
            for (var _i = 0, props_1 = Object.keys(parseOptions.evalposition); _i < props_1.length; _i++) {
                var prop = props_1[_i], curObject = parseOptions.evalposition[prop], matchString = matches[curObject.pos];
                if (curObject.isNumber) retOptions[prop] = this.internalNumberParser(matchString, num); else if ("timeZone" !== prop || isUndefined(matchString)) retOptions[prop] = parseOptions[prop][matchString]; else {
                    var pos = curObject.pos, val = void 0, tmatch = matches[pos + 1], flag = !isUndefined(tmatch);
                    curObject.hourOnly ? val = 60 * this.getZoneValue(flag, tmatch, matches[pos + 4], num) : (val = 60 * this.getZoneValue(flag, tmatch, matches[pos + 7], num), 
                    val += this.getZoneValue(flag, matches[pos + 4], matches[pos + 10], num)), isNullOrUndefined(val) || (retOptions[prop] = val);
                }
            }
            return parseOptions.hour12 && (retOptions.hour12 = !0), retOptions;
        }, DateParser.internalNumberParser = function(value, option) {
            return value = ParserBase.convertValueParts(value, option.numberParseRegex, option.numericPair), 
            latnRegex$1.test(value) ? +value : null;
        }, DateParser.parseTimeZoneRegx = function(hourFormat, tZone, nRegex) {
            var ret, splitStr, pattern = tZone.gmtFormat, cRegex = "(" + nRegex + ")(" + nRegex + ")";
            return ret = hourFormat.replace("+", "\\+"), ret = -1 !== hourFormat.indexOf("HH") ? ret.replace(/HH|mm/g, "(" + cRegex + ")") : ret.replace(/H|m/g, "(" + cRegex + "?)"), 
            splitStr = ret.split(";").map(function(str) {
                return pattern.replace("{0}", str);
            }), ret = splitStr.join("|") + "|" + tZone.gmtZeroFormat;
        }, DateParser.getZoneValue = function(flag, val1, val2, num) {
            var value = this.internalNumberParser(flag ? val1 : val2, num);
            return flag ? -value : value;
        }, DateParser;
    }(), parseRegex = /^([^0-9]*)(([0-9,]*[0-9]+)(\.[0-9]+)?)([Ee][+-]?[0-9]+)?([^0-9]*)$/, groupRegex = /,/g, keys = [ "minusSign", "infinity" ], NumberParser = function() {
        function NumberParser() {}
        return NumberParser.numberParser = function(culture, option, cldr) {
            var numOptions, _this = this, dependable = IntlBase.getDependables(cldr, culture, !0), parseOptions = {
                custom: !0
            };
            IntlBase.formatRegex.test(option.format) || !option.format ? (extend(parseOptions, IntlBase.getProperNumericSkeleton(option.format || "N")), 
            parseOptions.custom = !1) : extend(parseOptions, IntlBase.customFormat(option.format, null, null)), 
            numOptions = ParserBase.getCurrentNumericOptions(dependable.parserObject, ParserBase.getNumberingSystem(cldr), !0), 
            parseOptions.symbolRegex = ParserBase.getSymbolRegex(Object.keys(numOptions.symbolMatch)), 
            parseOptions.infinity = numOptions.symbolNumberSystem[keys[1]];
            var symbolpattern = IntlBase.getSymbolPattern(parseOptions.type, numOptions.numberSystem, dependable.numericObject, parseOptions.isAccount);
            if (symbolpattern) {
                var split = (symbolpattern = symbolpattern.replace(/\u00A4/g, IntlBase.defaultCurrency)).split(";");
                parseOptions.nData = IntlBase.getFormatData(split[1] || "-" + split[0], !0, ""), 
                parseOptions.pData = IntlBase.getFormatData(split[0], !0, "");
            }
            return function(value) {
                return _this.getParsedNumber(value, parseOptions, numOptions);
            };
        }, NumberParser.getParsedNumber = function(value, options, numOptions) {
            var isNegative, isPercent, tempValue, lead, end, ret;
            if (-1 !== value.indexOf(options.infinity)) return 1 / 0;
            value = ParserBase.convertValueParts(value, options.symbolRegex, numOptions.symbolMatch), 
            0 === (value = ParserBase.convertValueParts(value, numOptions.numberParseRegex, numOptions.numericPair)).indexOf(".") && (value = "0" + value);
            var matches = value.match(parseRegex);
            if (isNullOrUndefined(matches)) return NaN;
            lead = matches[1], tempValue = matches[2];
            var exponent = matches[5];
            return end = matches[6], isNegative = options.custom ? lead === options.nData.nlead && end === options.nData.nend : -1 !== lead.indexOf(options.nData.nlead) && -1 !== end.indexOf(options.nData.nend), 
            isPercent = isNegative ? options.nData.isPercent : options.pData.isPercent, tempValue = tempValue.replace(groupRegex, ""), 
            exponent && (tempValue += exponent), ret = +tempValue, ("percent" === options.type || isPercent) && (ret /= 100), 
            (options.custom || options.fractionDigits) && (ret = parseFloat(ret.toFixed(options.custom ? isNegative ? options.nData.maximumFractionDigits : options.pData.maximumFractionDigits : options.fractionDigits))), 
            isNegative && (ret *= -1), ret;
        }, NumberParser;
    }(), onIntlChange = new Observer(), rightToLeft = !1, cldrData = {}, defaultCulture = "en-US", defaultCurrencyCode = "USD", mapper = [ "numericObject", "dateObject" ], Internationalization = function() {
        function Internationalization(cultureName) {
            cultureName && (this.culture = cultureName);
        }
        return Internationalization.prototype.getDateFormat = function(options) {
            return DateFormat.dateFormat(this.getCulture(), options || {
                type: "date",
                skeleton: "short"
            }, cldrData);
        }, Internationalization.prototype.getNumberFormat = function(options) {
            return options && !options.currency && (options.currency = defaultCurrencyCode), 
            NumberFormat.numberFormatter(this.getCulture(), options || {}, cldrData);
        }, Internationalization.prototype.getDateParser = function(options) {
            return DateParser.dateParser(this.getCulture(), options || {
                skeleton: "short",
                type: "date"
            }, cldrData);
        }, Internationalization.prototype.getNumberParser = function(options) {
            return NumberParser.numberParser(this.getCulture(), options || {
                format: "N"
            }, cldrData);
        }, Internationalization.prototype.formatNumber = function(value, option) {
            return this.getNumberFormat(option)(value);
        }, Internationalization.prototype.formatDate = function(value, option) {
            return this.getDateFormat(option)(value);
        }, Internationalization.prototype.parseDate = function(value, option) {
            return this.getDateParser(option)(value);
        }, Internationalization.prototype.parseNumber = function(value, option) {
            return this.getNumberParser(option)(value);
        }, Internationalization.prototype.getDatePattern = function(option, isExcelFormat) {
            return IntlBase.getActualDateTimeFormat(this.getCulture(), option, cldrData, isExcelFormat);
        }, Internationalization.prototype.getNumberPattern = function(option) {
            return IntlBase.getActualNumberFormat(this.getCulture(), option, cldrData);
        }, Internationalization.prototype.getCulture = function() {
            return this.culture || defaultCulture;
        }, Internationalization;
    }(), __extends$1$1 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$1$1 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, componentCount = 0, lastHistoryLen = 0, Component = function(_super) {
        function Component(options, selector) {
            var _this = _super.call(this, options, selector) || this;
            return _this.randomId = uniqueID(), _this.needsID = !1, isNullOrUndefined(_this.enableRtl) && _this.setProperties({
                enableRtl: rightToLeft
            }, !0), isNullOrUndefined(_this.locale) && _this.setProperties({
                locale: defaultCulture
            }, !0), _this.moduleLoader = new ModuleLoader(_this), _this.localObserver = new Observer(_this), 
            _this.detectFunction = new Function("args", "var prop = Object.keys(args); if(prop.length){this[prop[0]] = args[prop[0]];}"), 
            onIntlChange.on("notifyExternalChange", _this.detectFunction, _this, _this.randomId), 
            isUndefined(selector) || _this.appendTo(), _this;
        }
        return __extends$1$1(Component, _super), Component.prototype.requiredModules = function() {
            return [];
        }, Component.prototype.destroy = function() {
            this.isDestroyed || (this.enablePersistence && this.setPersistData(), this.localObserver.destroy(), 
            this.refreshing || (this.trigger("destroyed", {
                cancel: !1
            }), _super.prototype.destroy.call(this), this.moduleLoader.clean(), onIntlChange.off("notifyExternalChange", this.detectFunction, this.randomId)));
        }, Component.prototype.refresh = function() {
            this.refreshing = !0, this.moduleLoader.clean(), this.destroy(), this.clearChanges(), 
            this.localObserver = new Observer(this), this.preRender(), this.injectModules(), 
            this.render(), this.refreshing = !1;
        }, Component.prototype.appendTo = function(selector) {
            if (isNullOrUndefined(selector) || "string" != typeof selector ? isNullOrUndefined(selector) || (this.element = selector) : this.element = document.querySelector(selector), 
            !isNullOrUndefined(this.element)) {
                this.isProtectedOnChange = !1, this.needsID && !this.element.id && (this.element.id = this.getUniqueID(this.getModuleName())), 
                this.enablePersistence && (this.mergePersistData(), window.addEventListener("unload", this.setPersistData.bind(this)));
                var inst = getValue("ej2_instances", this.element);
                inst && -1 !== inst.indexOf(this) || _super.prototype.addInstance.call(this), this.preRender(), 
                this.injectModules(), this.render(), this.trigger("created");
            }
        }, Component.prototype.dataBind = function() {
            this.injectModules(), _super.prototype.dataBind.call(this);
        }, Component.prototype.on = function(event, handler, context) {
            if ("string" == typeof event) this.localObserver.on(event, handler, context); else for (var _i = 0, event_1 = event; _i < event_1.length; _i++) {
                var arg = event_1[_i];
                this.localObserver.on(arg.event, arg.handler, arg.context);
            }
        }, Component.prototype.off = function(event, handler) {
            if ("string" == typeof event) this.localObserver.off(event, handler); else for (var _i = 0, event_2 = event; _i < event_2.length; _i++) {
                var arg = event_2[_i];
                this.localObserver.off(arg.event, arg.handler);
            }
        }, Component.prototype.notify = function(property, argument) {
            !0 !== this.isDestroyed && this.localObserver.notify(property, argument);
        }, Component.prototype.getInjectedModules = function() {
            return this.injectedModules;
        }, Component.Inject = function() {
            for (var moduleList = [], _i = 0; _i < arguments.length; _i++) moduleList[_i] = arguments[_i];
            this.prototype.injectedModules || (this.prototype.injectedModules = []);
            for (var i = 0; i < moduleList.length; i++) -1 === this.prototype.injectedModules.indexOf(moduleList[i]) && this.prototype.injectedModules.push(moduleList[i]);
        }, Component.prototype.injectModules = function() {
            this.injectedModules && this.injectedModules.length && this.moduleLoader.inject(this.requiredModules(), this.injectedModules);
        }, Component.prototype.mergePersistData = function() {
            var data = window.localStorage.getItem(this.getModuleName() + this.element.id);
            isNullOrUndefined(data) || "" === data || this.setProperties(JSON.parse(data), !0);
        }, Component.prototype.setPersistData = function() {
            this.isDestroyed || window.localStorage.setItem(this.getModuleName() + this.element.id, this.getPersistData());
        }, Component.prototype.clearTemplate = function(templateName) {}, Component.prototype.getUniqueID = function(definedName) {
            return this.isHistoryChanged() && (componentCount = 0), lastPageID = this.pageID(location.href), 
            lastHistoryLen = history.length, definedName + "_" + lastPageID + "_" + componentCount++;
        }, Component.prototype.pageID = function(url) {
            var hash = 0;
            if (0 === url.length) return hash;
            for (var i = 0; i < url.length; i++) {
                hash = (hash << 5) - hash + url.charCodeAt(i), hash &= hash;
            }
            return Math.abs(hash);
        }, Component.prototype.isHistoryChanged = function() {
            return lastPageID !== this.pageID(location.href) || lastHistoryLen !== history.length;
        }, Component.prototype.addOnPersist = function(options) {
            for (var _this = this, persistObj = {}, _i = 0, options_1 = options; _i < options_1.length; _i++) {
                var key = options_1[_i], objValue = void 0;
                isUndefined(objValue = getValue(key, this)) || setValue(key, this.getActualProperties(objValue), persistObj);
            }
            return JSON.stringify(persistObj, function(key, value) {
                return _this.getActualProperties(value);
            });
        }, Component.prototype.getActualProperties = function(obj) {
            return obj instanceof ChildProperty ? getValue("properties", obj) : obj;
        }, Component.prototype.ignoreOnPersist = function(options) {
            return JSON.stringify(this.iterateJsonProperties(this.properties, options));
        }, Component.prototype.iterateJsonProperties = function(obj, ignoreList) {
            for (var newObj = {}, _loop_1 = function(key) {
                if (-1 === ignoreList.indexOf(key)) {
                    var value = obj[key];
                    if ("object" != typeof value || value instanceof Array) newObj[key] = value; else {
                        var newList = ignoreList.filter(function(str) {
                            return new RegExp(key + ".").test(str);
                        }).map(function(str) {
                            return str.replace(key + ".", "");
                        });
                        newObj[key] = this_1.iterateJsonProperties(this_1.getActualProperties(value), newList);
                    }
                }
            }, this_1 = this, _i = 0, _a = Object.keys(obj); _i < _a.length; _i++) {
                _loop_1(_a[_i]);
            }
            return newObj;
        }, __decorate$1$1([ Property(!1) ], Component.prototype, "enablePersistence", void 0), 
        __decorate$1$1([ Property() ], Component.prototype, "enableRtl", void 0), __decorate$1$1([ Property() ], Component.prototype, "locale", void 0), 
        Component = __decorate$1$1([ NotifyPropertyChanges ], Component);
    }(Base);
    "undefined" != typeof window && window.addEventListener("popstate", function() {
        componentCount = 0;
    });
    var elementRect, element, parentDocument, parentDocument$1, targetContainer, Input, __extends$2 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$2 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, defaultPosition = {
        left: 0,
        top: 0,
        bottom: 0,
        right: 0
    }, Position = function(_super) {
        function Position() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$2(Position, _super), __decorate$2([ Property(0) ], Position.prototype, "left", void 0), 
        __decorate$2([ Property(0) ], Position.prototype, "top", void 0), Position;
    }(ChildProperty), Draggable = function(_super) {
        function Draggable(element, options) {
            var _this = _super.call(this, options, element) || this;
            return _this.dragLimit = Draggable_1.getDefaultPosition(), _this.borderWidth = Draggable_1.getDefaultPosition(), 
            _this.padding = Draggable_1.getDefaultPosition(), _this.diffX = 0, _this.diffY = 0, 
            _this.droppables = {}, _this.bind(), _this;
        }
        return __extends$2(Draggable, _super), Draggable_1 = Draggable, Draggable.prototype.bind = function() {
            this.toggleEvents(), Browser.isIE && addClass([ this.element ], "e-block-touch"), 
            this.droppables[this.scope] = {};
        }, Draggable.getDefaultPosition = function() {
            return extend({}, defaultPosition);
        }, Draggable.prototype.toggleEvents = function(isUnWire) {
            var ele;
            isUndefined(this.handle) || (ele = select(this.handle, this.element)), isUnWire ? EventHandler.remove(ele || this.element, Browser.touchStartEvent, this.initialize) : EventHandler.add(ele || this.element, Browser.touchStartEvent, this.initialize, this);
        }, Draggable.prototype.initialize = function(evt) {
            if (this.target = evt.currentTarget, this.preventDefault && !isUndefined(evt.changedTouches) && evt.preventDefault(), 
            !this.abort || isNullOrUndefined(closest(evt.target, this.abort))) {
                this.element.setAttribute("aria-grabbed", "true");
                var intCoord = this.getCoordinates(evt);
                if (this.initialPosition = {
                    x: intCoord.pageX,
                    y: intCoord.pageY
                }, !this.clone) {
                    var pos = this.element.getBoundingClientRect();
                    this.relativeXPosition = intCoord.pageX - pos.left, this.relativeYPosition = intCoord.pageY - pos.top;
                }
                EventHandler.add(document, Browser.touchMoveEvent, this.intDragStart, this), EventHandler.add(document, Browser.touchEndEvent, this.intDestroy, this), 
                this.toggleEvents(!0), document.body.classList.add("e-prevent-select"), EventHandler.trigger(document.documentElement, Browser.touchStartEvent, evt);
            }
        }, Draggable.prototype.intDragStart = function(evt) {
            if (!!isUndefined(evt.changedTouches) || 1 === evt.changedTouches.length) {
                var pos, intCordinate = this.getCoordinates(evt), styleProp = getComputedStyle(this.element);
                this.margin = {
                    left: parseInt(styleProp.marginLeft, 10),
                    top: parseInt(styleProp.marginTop, 10),
                    right: parseInt(styleProp.marginRight, 10),
                    bottom: parseInt(styleProp.marginBottom, 10)
                };
                var element = this.element;
                if (this.clone && this.dragTarget) {
                    var intClosest = closest(evt.target, this.dragTarget);
                    isNullOrUndefined(intClosest) || (element = intClosest);
                }
                this.offset = this.calculateParentPosition(element), this.position = this.getMousePosition(evt);
                var x = this.initialPosition.x - intCordinate.pageX, y = this.initialPosition.y - intCordinate.pageY;
                if (Math.sqrt(x * x + y * y) >= this.distance) {
                    var ele = this.getHelperElement(evt);
                    if (!ele || isNullOrUndefined(ele)) return;
                    var dragTargetElement = this.helperElement = ele;
                    if (this.parentClientRect = this.calculateParentPosition(dragTargetElement.offsetParent), 
                    this.dragStart) {
                        var curTarget = this.getProperTargetElement(evt);
                        this.trigger("dragStart", {
                            event: evt,
                            element: element,
                            target: curTarget
                        });
                    }
                    this.dragArea ? this.setDragArea() : (this.dragLimit = {
                        left: 0,
                        right: 0,
                        bottom: 0,
                        top: 0
                    }, this.borderWidth = {
                        top: 0,
                        left: 0
                    }), pos = {
                        left: this.position.left - this.parentClientRect.left,
                        top: this.position.top - this.parentClientRect.top
                    }, this.clone && !this.enableTailMode && (this.diffX = this.position.left - this.offset.left, 
                    this.diffY = this.position.top - this.offset.top);
                    var posValue = this.getProcessedPositionValue({
                        top: pos.top - this.diffY + "px",
                        left: pos.left - this.diffX + "px"
                    });
                    setStyleAttribute(dragTargetElement, {
                        position: "absolute",
                        top: posValue.top,
                        left: posValue.left
                    }), EventHandler.remove(document, Browser.touchMoveEvent, this.intDragStart), EventHandler.remove(document, Browser.touchEndEvent, this.intDestroy), 
                    isVisible(dragTargetElement) ? (EventHandler.add(document, Browser.touchMoveEvent, this.intDrag, this), 
                    EventHandler.add(document, Browser.touchEndEvent, this.intDragStop, this), this.setGlobalDroppables(!1, this.element, dragTargetElement)) : document.body.classList.remove("e-prevent-select");
                }
            }
        }, Draggable.prototype.getProcessedPositionValue = function(value) {
            return this.axis && ("x" === this.axis ? value.top = "0px" : "y" === this.axis && (value.left = "0px")), 
            this.queryPositionInfo ? this.queryPositionInfo(value) : value;
        }, Draggable.prototype.calculateParentPosition = function(ele) {
            if (isNullOrUndefined(ele)) return {
                left: 0,
                top: 0
            };
            var rect = ele.getBoundingClientRect(), style = getComputedStyle(ele);
            return {
                left: rect.left + window.pageXOffset - parseInt(style.marginLeft, 10),
                top: rect.top + window.pageYOffset - parseInt(style.marginTop, 10)
            };
        }, Draggable.prototype.intDrag = function(evt) {
            if (isUndefined(evt.changedTouches) || 1 === evt.changedTouches.length) {
                var left, top;
                this.position = this.getMousePosition(evt);
                var docHeight = this.getDocumentWidthHeight("Height");
                docHeight < this.position.top && (this.position.top = docHeight);
                var docWidth = this.getDocumentWidthHeight("Width");
                if (docWidth < this.position.left && (this.position.left = docWidth), this.drag) {
                    var curTarget = this.getProperTargetElement(evt);
                    this.trigger("drag", {
                        event: evt,
                        element: this.element,
                        target: curTarget
                    });
                }
                var eleObj = this.checkTargetElement(evt);
                eleObj.target && eleObj.instance ? (eleObj.instance.intOver(evt, eleObj.target), 
                eleObj.instance.dragData[this.scope] = this.droppables[this.scope], this.hoverObject = eleObj) : this.hoverObject && (this.hoverObject.instance.intOut(evt, eleObj.target), 
                this.hoverObject.instance.dragData[this.scope] = null, this.hoverObject = null);
                var helperElement = this.droppables[this.scope].helper;
                this.parentClientRect = this.calculateParentPosition(this.helperElement.offsetParent);
                var tLeft = this.parentClientRect.left, tTop = this.parentClientRect.top, intCoord = this.getCoordinates(evt), pagex = intCoord.pageX, pagey = intCoord.pageY, dLeft = this.position.left - this.diffX, dTop = this.position.top - this.diffY;
                if (this.dragArea) {
                    var styles = getComputedStyle(helperElement);
                    if (this.pageX !== pagex || this.skipDistanceCheck) {
                        var helperWidth = helperElement.offsetWidth + (parseFloat(styles.marginLeft) + parseFloat(styles.marginRight));
                        left = this.dragLimit.left > dLeft ? this.dragLimit.left : this.dragLimit.right < dLeft + helperWidth ? this.dragLimit.right - helperWidth : dLeft;
                    }
                    if (this.pageY !== pagey || this.skipDistanceCheck) {
                        var helperHeight = helperElement.offsetHeight + (parseFloat(styles.marginTop) + parseFloat(styles.marginBottom));
                        top = this.dragLimit.top > dTop ? this.dragLimit.top : this.dragLimit.bottom < dTop + helperHeight ? this.dragLimit.bottom - helperHeight : dTop;
                    }
                } else left = dLeft, top = dTop;
                var iTop = tTop + this.borderWidth.top, iLeft = tLeft + this.borderWidth.left, dragValue = this.getProcessedPositionValue({
                    top: top - iTop + "px",
                    left: left - iLeft + "px"
                });
                setStyleAttribute(helperElement, {
                    left: dragValue.left,
                    top: dragValue.top
                }), this.position.left = left, this.position.top = top, this.pageX = pagex, this.pageY = pagey;
            }
        }, Draggable.prototype.getDocumentWidthHeight = function(str) {
            var docBody = document.body, docEle = document.documentElement;
            return Math.max(docBody["scroll" + str], docEle["scroll" + str], docBody["offset" + str], docEle["offset" + str], docEle["client" + str]);
        }, Draggable.prototype.intDragStop = function(evt) {
            if (isUndefined(evt.changedTouches) || 1 === evt.changedTouches.length) {
                if (-1 !== [ "touchend", "pointerup", "mouseup" ].indexOf(evt.type)) {
                    if (this.dragStop) {
                        var curTarget = this.getProperTargetElement(evt);
                        this.trigger("dragStop", {
                            event: evt,
                            element: this.element,
                            target: curTarget,
                            helper: this.helperElement
                        });
                    }
                    this.intDestroy(evt);
                } else this.element.setAttribute("aria-grabbed", "false");
                var eleObj = this.checkTargetElement(evt);
                eleObj.target && eleObj.instance && (eleObj.instance.dragStopCalled = !0, eleObj.instance.dragData[this.scope] = this.droppables[this.scope], 
                eleObj.instance.intDrop(evt, eleObj.target)), this.setGlobalDroppables(!0), document.body.classList.remove("e-prevent-select");
            }
        }, Draggable.prototype.intDestroy = function(evt) {
            this.toggleEvents(), document.body.classList.remove("e-prevent-select"), this.element.setAttribute("aria-grabbed", "false"), 
            EventHandler.remove(document, Browser.touchMoveEvent, this.intDragStart), EventHandler.remove(document, Browser.touchEndEvent, this.intDragStop), 
            EventHandler.remove(document, Browser.touchEndEvent, this.intDestroy), EventHandler.remove(document, Browser.touchMoveEvent, this.intDrag);
        }, Draggable.prototype.onPropertyChanged = function(newProp, oldProp) {}, Draggable.prototype.getModuleName = function() {
            return "draggable";
        }, Draggable.prototype.setDragArea = function() {
            var eleWidthBound, eleHeightBound, ele, top = 0, left = 0;
            if (ele = "string" === typeof this.dragArea ? select(this.dragArea) : this.dragArea) {
                var elementArea = ele.getBoundingClientRect();
                eleWidthBound = elementArea.width ? elementArea.width : elementArea.right - elementArea.left, 
                eleHeightBound = elementArea.height ? elementArea.height : elementArea.bottom - elementArea.top;
                for (var keys = [ "Top", "Left", "Bottom", "Right" ], styles = getComputedStyle(ele), i = 0; i < keys.length; i++) {
                    var key = keys[i], tborder = styles["border" + key + "Width"], tpadding = styles["padding" + key], lowerKey = key.toLowerCase();
                    this.borderWidth[lowerKey] = isNaN(parseFloat(tborder)) ? 0 : parseFloat(tborder), 
                    this.padding[lowerKey] = isNaN(parseFloat(tpadding)) ? 0 : parseFloat(tpadding);
                }
                top = elementArea.top, left = elementArea.left, this.dragLimit.left = left + this.borderWidth.left + this.padding.left, 
                this.dragLimit.top = top + this.borderWidth.top + this.padding.top, this.dragLimit.right = left + eleWidthBound - (this.borderWidth.right + this.padding.right), 
                this.dragLimit.bottom = top + eleHeightBound - (this.borderWidth.bottom + this.padding.bottom);
            }
        }, Draggable.prototype.getProperTargetElement = function(evt) {
            var ele, intCoord = this.getCoordinates(evt), prevStyle = this.helperElement.style.display || "";
            return compareElementParent(evt.target, this.helperElement) || -1 !== evt.type.indexOf("touch") ? (this.helperElement.style.display = "none", 
            ele = document.elementFromPoint(intCoord.clientX, intCoord.clientY), this.helperElement.style.display = prevStyle) : ele = evt.target, 
            ele;
        }, Draggable.prototype.getMousePosition = function(evt) {
            var intCoord = this.getCoordinates(evt), pageX = this.clone ? intCoord.pageX : intCoord.pageX - this.relativeXPosition, pageY = this.clone ? intCoord.pageY : intCoord.pageY - this.relativeYPosition;
            return {
                left: pageX - (this.margin.left + this.cursorAt.left),
                top: pageY - (this.margin.top + this.cursorAt.top)
            };
        }, Draggable.prototype.getCoordinates = function(evt) {
            return evt.type.indexOf("touch") > -1 ? evt.changedTouches[0] : evt;
        }, Draggable.prototype.getHelperElement = function(evt) {
            var element;
            return this.clone ? this.helper ? element = this.helper({
                sender: evt,
                element: this.target
            }) : (element = createElement("div", {
                className: "e-drag-helper e-block-touch",
                innerHTML: "Draggable"
            }), document.body.appendChild(element)) : element = this.element, element;
        }, Draggable.prototype.setGlobalDroppables = function(reset, drag, helper) {
            this.droppables[this.scope] = reset ? null : {
                draggable: drag,
                helper: helper,
                draggedElement: this.element
            };
        }, Draggable.prototype.checkTargetElement = function(evt) {
            var target = this.getProperTargetElement(evt), dropIns = this.getDropInstance(target);
            if (!dropIns && target && !isNullOrUndefined(target.parentNode)) {
                var parent_1 = closest(target.parentNode, ".e-droppable") || target.parentElement;
                parent_1 && (dropIns = this.getDropInstance(parent_1));
            }
            return {
                target: target,
                instance: dropIns
            };
        }, Draggable.prototype.getDropInstance = function(ele) {
            var drop, eleInst = ele && ele.ej2_instances;
            if (eleInst) for (var _i = 0, eleInst_1 = eleInst; _i < eleInst_1.length; _i++) {
                var inst = eleInst_1[_i];
                if ("droppable" === inst.getModuleName()) {
                    drop = inst;
                    break;
                }
            }
            return drop;
        }, Draggable.prototype.destroy = function() {
            this.toggleEvents(!0), _super.prototype.destroy.call(this);
        }, __decorate$2([ Complex({}, Position) ], Draggable.prototype, "cursorAt", void 0), 
        __decorate$2([ Property(!0) ], Draggable.prototype, "clone", void 0), __decorate$2([ Property() ], Draggable.prototype, "dragArea", void 0), 
        __decorate$2([ Event() ], Draggable.prototype, "drag", void 0), __decorate$2([ Event() ], Draggable.prototype, "dragStart", void 0), 
        __decorate$2([ Event() ], Draggable.prototype, "dragStop", void 0), __decorate$2([ Property(1) ], Draggable.prototype, "distance", void 0), 
        __decorate$2([ Property() ], Draggable.prototype, "handle", void 0), __decorate$2([ Property() ], Draggable.prototype, "abort", void 0), 
        __decorate$2([ Property() ], Draggable.prototype, "helper", void 0), __decorate$2([ Property("default") ], Draggable.prototype, "scope", void 0), 
        __decorate$2([ Property("") ], Draggable.prototype, "dragTarget", void 0), __decorate$2([ Property() ], Draggable.prototype, "axis", void 0), 
        __decorate$2([ Property() ], Draggable.prototype, "queryPositionInfo", void 0), 
        __decorate$2([ Property(!1) ], Draggable.prototype, "enableTailMode", void 0), __decorate$2([ Property(!1) ], Draggable.prototype, "skipDistanceCheck", void 0), 
        __decorate$2([ Property(!0) ], Draggable.prototype, "preventDefault", void 0), Draggable = Draggable_1 = __decorate$2([ NotifyPropertyChanges ], Draggable);
        var Draggable_1;
    }(Base), __extends$3 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$3 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, Droppable = function(_super) {
        function Droppable(element, options) {
            var _this = _super.call(this, options, element) || this;
            return _this.mouseOver = !1, _this.dragData = {}, _this.dragStopCalled = !1, _this.bind(), 
            _this;
        }
        return __extends$3(Droppable, _super), Droppable.prototype.bind = function() {
            this.wireEvents();
        }, Droppable.prototype.wireEvents = function() {
            EventHandler.add(this.element, Browser.touchEndEvent, this.intDrop, this);
        }, Droppable.prototype.onPropertyChanged = function(newProp, oldProp) {}, Droppable.prototype.getModuleName = function() {
            return "droppable";
        }, Droppable.prototype.intOver = function(event, element) {
            this.mouseOver || (this.trigger("over", {
                event: event,
                target: element
            }), this.mouseOver = !0);
        }, Droppable.prototype.intOut = function(event, element) {
            this.mouseOver && (this.trigger("out", {
                evt: event,
                target: element
            }), this.mouseOver = !1);
        }, Droppable.prototype.intDrop = function(evt, element) {
            if (this.dragStopCalled) {
                this.dragStopCalled = !1;
                var area, accept = !0, drag = this.dragData[this.scope], isDrag = !!drag && (drag.helper && isVisible(drag.helper));
                isDrag && (area = this.isDropArea(evt, drag.helper, element), this.accept && (accept = matches(drag.helper, this.accept))), 
                isDrag && this.drop && area.canDrop && accept && this.trigger("drop", {
                    event: evt,
                    target: area.target,
                    droppedElement: drag.helper,
                    dragData: drag
                });
            }
        }, Droppable.prototype.isDropArea = function(evt, helper, element) {
            var area = {
                canDrop: !0,
                target: element || evt.target
            }, isTouch = "touchend" === evt.type;
            if (isTouch || area.target === helper) {
                helper.style.display = "none";
                var coord = isTouch ? evt.changedTouches[0] : evt, ele = document.elementFromPoint(coord.clientX, coord.clientY);
                area.canDrop = !1, area.canDrop = compareElementParent(ele, this.element), area.canDrop && (area.target = ele), 
                helper.style.display = "";
            }
            return area;
        }, Droppable.prototype.destroy = function() {
            EventHandler.remove(this.element, Browser.touchEndEvent, this.intDrop), _super.prototype.destroy.call(this);
        }, __decorate$3([ Property() ], Droppable.prototype, "accept", void 0), __decorate$3([ Property("default") ], Droppable.prototype, "scope", void 0), 
        __decorate$3([ Event() ], Droppable.prototype, "drop", void 0), __decorate$3([ Event() ], Droppable.prototype, "over", void 0), 
        __decorate$3([ Event() ], Droppable.prototype, "out", void 0), Droppable = __decorate$3([ NotifyPropertyChanges ], Droppable);
    }(Base), __extends$4 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$4 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, keyCode = {
        backspace: 8,
        tab: 9,
        enter: 13,
        shift: 16,
        control: 17,
        alt: 18,
        pause: 19,
        capslock: 20,
        space: 32,
        escape: 27,
        pageup: 33,
        pagedown: 34,
        end: 35,
        home: 36,
        leftarrow: 37,
        uparrow: 38,
        rightarrow: 39,
        downarrow: 40,
        insert: 45,
        delete: 46,
        f1: 112,
        f2: 113,
        f3: 114,
        f4: 115,
        f5: 116,
        f6: 117,
        f7: 118,
        f8: 119,
        f9: 120,
        f10: 121,
        f11: 122,
        f12: 123,
        semicolon: 186,
        plus: 187,
        comma: 188,
        minus: 189,
        dot: 190,
        forwardslash: 191,
        graveaccent: 192,
        openbracket: 219,
        backslash: 220,
        closebracket: 221,
        singlequote: 222
    }, KeyboardEvents = function(_super) {
        function KeyboardEvents(element, options) {
            var _this = _super.call(this, options, element) || this;
            return _this.keyPressHandler = function(e) {
                for (var isAltKey = e.altKey, isCtrlKey = e.ctrlKey, isShiftKey = e.shiftKey, curkeyCode = e.which, _i = 0, keys_1 = Object.keys(_this.keyConfigs); _i < keys_1.length; _i++) for (var key = keys_1[_i], _a = 0, configCollection_1 = _this.keyConfigs[key].split(","); _a < configCollection_1.length; _a++) {
                    var rconfig = configCollection_1[_a], rKeyObj = KeyboardEvents_1.getKeyConfigData(rconfig.trim());
                    isAltKey === rKeyObj.altKey && isCtrlKey === rKeyObj.ctrlKey && isShiftKey === rKeyObj.shiftKey && curkeyCode === rKeyObj.keyCode && (e.action = key, 
                    _this.keyAction && _this.keyAction(e));
                }
            }, _this.bind(), _this;
        }
        return __extends$4(KeyboardEvents, _super), KeyboardEvents_1 = KeyboardEvents, KeyboardEvents.prototype.destroy = function() {
            this.unwireEvents(), _super.prototype.destroy.call(this);
        }, KeyboardEvents.prototype.onPropertyChanged = function(newProp, oldProp) {}, KeyboardEvents.prototype.bind = function() {
            this.wireEvents();
        }, KeyboardEvents.prototype.getModuleName = function() {
            return "keyboard";
        }, KeyboardEvents.prototype.wireEvents = function() {
            this.element.addEventListener(this.eventName, this.keyPressHandler);
        }, KeyboardEvents.prototype.unwireEvents = function() {
            this.element.removeEventListener(this.eventName, this.keyPressHandler);
        }, KeyboardEvents.getKeyConfigData = function(config) {
            if (config in this.configCache) return this.configCache[config];
            var keys = config.toLowerCase().split("+"), keyData = {
                altKey: -1 !== keys.indexOf("alt"),
                ctrlKey: -1 !== keys.indexOf("ctrl"),
                shiftKey: -1 !== keys.indexOf("shift"),
                keyCode: null
            };
            return keys[keys.length - 1].length > 1 && Number(keys[keys.length - 1]) ? keyData.keyCode = Number(keys[keys.length - 1]) : keyData.keyCode = KeyboardEvents_1.getKeyCode(keys[keys.length - 1]), 
            KeyboardEvents_1.configCache[config] = keyData, keyData;
        }, KeyboardEvents.getKeyCode = function(keyVal) {
            return keyCode[keyVal] || keyVal.toUpperCase().charCodeAt(0);
        }, KeyboardEvents.configCache = {}, __decorate$4([ Property({}) ], KeyboardEvents.prototype, "keyConfigs", void 0), 
        __decorate$4([ Property("keyup") ], KeyboardEvents.prototype, "eventName", void 0), 
        __decorate$4([ Event() ], KeyboardEvents.prototype, "keyAction", void 0), KeyboardEvents = KeyboardEvents_1 = __decorate$4([ NotifyPropertyChanges ], KeyboardEvents);
        var KeyboardEvents_1;
    }(Base), L10n = function() {
        function L10n(controlName, localeStrings, locale) {
            this.controlName = controlName, this.localeStrings = localeStrings, this.setLocale(locale || defaultCulture);
        }
        return L10n.prototype.setLocale = function(locale) {
            var intLocale = this.intGetControlConstant(L10n.locale, locale);
            this.currentLocale = intLocale || this.localeStrings;
        }, L10n.load = function(localeObject) {
            this.locale = extend(this.locale, localeObject, {}, !0);
        }, L10n.prototype.getConstant = function(prop) {
            return this.currentLocale[prop] || this.localeStrings[prop] || "";
        }, L10n.prototype.intGetControlConstant = function(curObject, locale) {
            return curObject[locale] ? curObject[locale][this.controlName] : null;
        }, L10n.locale = {}, L10n;
    }(), SvgRenderer = function() {
        function SvgRenderer(rootID) {
            this.svgLink = "http://www.w3.org/2000/svg", this.rootId = rootID;
        }
        return SvgRenderer.prototype.getOptionValue = function(options, key) {
            return options[key];
        }, SvgRenderer.prototype.createSvg = function(options) {
            return isNullOrUndefined(options.id) && (options.id = this.rootId + "_svg"), this.svgObj = document.getElementById(options.id), 
            isNullOrUndefined(document.getElementById(options.id)) && (this.svgObj = document.createElementNS(this.svgLink, "svg")), 
            this.svgObj = this.setElementAttributes(options, this.svgObj), this.setSVGSize(options.width, options.height), 
            this.svgObj;
        }, SvgRenderer.prototype.setSVGSize = function(width, height) {
            var element = document.getElementById(this.rootId), size = isNullOrUndefined(element) ? null : element.getBoundingClientRect();
            isNullOrUndefined(this.width) || this.width <= 0 ? this.svgObj.setAttribute("width", width ? width.toString() : size.width.toString()) : this.svgObj.setAttribute("width", this.width.toString()), 
            isNullOrUndefined(this.height) || this.height <= 0 ? this.svgObj.setAttribute("height", height ? height.toString() : "450") : this.svgObj.setAttribute("height", this.height.toString());
        }, SvgRenderer.prototype.drawPath = function(options) {
            var path = document.getElementById(options.id);
            return null === path && (path = document.createElementNS(this.svgLink, "path")), 
            path = this.setElementAttributes(options, path);
        }, SvgRenderer.prototype.drawLine = function(options) {
            var line = document.getElementById(options.id);
            return null === line && (line = document.createElementNS(this.svgLink, "line")), 
            line = this.setElementAttributes(options, line);
        }, SvgRenderer.prototype.drawRectangle = function(options) {
            var rectangle = document.getElementById(options.id);
            return null === rectangle && (rectangle = document.createElementNS(this.svgLink, "rect")), 
            rectangle = this.setElementAttributes(options, rectangle);
        }, SvgRenderer.prototype.drawCircle = function(options) {
            var circle = document.getElementById(options.id);
            return null === circle && (circle = document.createElementNS(this.svgLink, "circle")), 
            circle = this.setElementAttributes(options, circle);
        }, SvgRenderer.prototype.drawPolyline = function(options) {
            var polyline = document.getElementById(options.id);
            return null === polyline && (polyline = document.createElementNS(this.svgLink, "polyline")), 
            polyline = this.setElementAttributes(options, polyline);
        }, SvgRenderer.prototype.drawEllipse = function(options) {
            var ellipse = document.getElementById(options.id);
            return null === ellipse && (ellipse = document.createElementNS(this.svgLink, "ellipse")), 
            ellipse = this.setElementAttributes(options, ellipse);
        }, SvgRenderer.prototype.drawPolygon = function(options) {
            var polygon = document.getElementById(options.id);
            return null === polygon && (polygon = document.createElementNS(this.svgLink, "polygon")), 
            polygon = this.setElementAttributes(options, polygon);
        }, SvgRenderer.prototype.drawImage = function(options) {
            var img = document.createElementNS(this.svgLink, "image");
            return img.setAttributeNS(null, "height", options.height.toString()), img.setAttributeNS(null, "width", options.width.toString()), 
            img.setAttributeNS("http://www.w3.org/1999/xlink", "href", options.href), img.setAttributeNS(null, "x", options.x.toString()), 
            img.setAttributeNS(null, "y", options.y.toString()), img.setAttributeNS(null, "id", options.id), 
            img.setAttributeNS(null, "visibility", options.visibility), isNullOrUndefined(this.getOptionValue(options, "clip-path")) || img.setAttributeNS(null, "clip-path", this.getOptionValue(options, "clip-path")), 
            isNullOrUndefined(options.preserveAspectRatio) || img.setAttributeNS(null, "preserveAspectRatio", options.preserveAspectRatio), 
            img;
        }, SvgRenderer.prototype.createText = function(options, label) {
            var text = document.createElementNS(this.svgLink, "text");
            return text = this.setElementAttributes(options, text), isNullOrUndefined(label) || (text.textContent = label), 
            text;
        }, SvgRenderer.prototype.createTSpan = function(options, label) {
            var tSpan = document.createElementNS(this.svgLink, "tspan");
            return tSpan = this.setElementAttributes(options, tSpan), isNullOrUndefined(label) || (tSpan.textContent = label), 
            tSpan;
        }, SvgRenderer.prototype.createTitle = function(text) {
            var title = document.createElementNS(this.svgLink, "title");
            return title.textContent = text, title;
        }, SvgRenderer.prototype.createDefs = function() {
            return document.createElementNS(this.svgLink, "defs");
        }, SvgRenderer.prototype.createClipPath = function(options) {
            var clipPath = document.createElementNS(this.svgLink, "clipPath");
            return clipPath = this.setElementAttributes(options, clipPath);
        }, SvgRenderer.prototype.createForeignObject = function(options) {
            var foreignObject = document.createElementNS(this.svgLink, "foreignObject");
            return foreignObject = this.setElementAttributes(options, foreignObject);
        }, SvgRenderer.prototype.createGroup = function(options) {
            var group = document.createElementNS(this.svgLink, "g");
            return group = this.setElementAttributes(options, group);
        }, SvgRenderer.prototype.createPattern = function(options, element) {
            var pattern = document.createElementNS(this.svgLink, element);
            return pattern = this.setElementAttributes(options, pattern);
        }, SvgRenderer.prototype.createRadialGradient = function(colors, name, options) {
            var colorName;
            if (isNullOrUndefined(colors[0].colorStop)) colorName = colors[0].color.toString(); else {
                var newOptions = {
                    id: this.rootId + "_" + name + "radialGradient",
                    cx: options.cx + "%",
                    cy: options.cy + "%",
                    r: options.r + "%",
                    fx: options.fx + "%",
                    fy: options.fy + "%"
                };
                this.drawGradient("radialGradient", newOptions, colors), colorName = "url(#" + this.rootId + "_" + name + "radialGradient)";
            }
            return colorName;
        }, SvgRenderer.prototype.createLinearGradient = function(colors, name, options) {
            var colorName;
            if (isNullOrUndefined(colors[0].colorStop)) colorName = colors[0].color.toString(); else {
                var newOptions = {
                    id: this.rootId + "_" + name + "linearGradient",
                    x1: options.x1 + "%",
                    y1: options.y1 + "%",
                    x2: options.x2 + "%",
                    y2: options.y2 + "%"
                };
                this.drawGradient("linearGradient", newOptions, colors), colorName = "url(#" + this.rootId + "_" + name + "linearGradient)";
            }
            return colorName;
        }, SvgRenderer.prototype.drawGradient = function(gradientType, options, colors) {
            var defs = this.createDefs(), gradient = document.createElementNS(this.svgLink, gradientType);
            gradient = this.setElementAttributes(options, gradient);
            for (var i = 0; i < colors.length; i++) {
                var stop_1 = document.createElementNS(this.svgLink, "stop");
                stop_1.setAttribute("offset", colors[i].colorStop), stop_1.setAttribute("stop-color", colors[i].color), 
                stop_1.setAttribute("stop-opacity", "1"), gradient.appendChild(stop_1);
            }
            return defs.appendChild(gradient), defs;
        }, SvgRenderer.prototype.drawClipPath = function(options) {
            var defs = this.createDefs(), clipPath = this.createClipPath({
                id: options.id
            }), rect = this.drawRectangle(options);
            return clipPath.appendChild(rect), defs.appendChild(clipPath), defs;
        }, SvgRenderer.prototype.drawCircularClipPath = function(options) {
            var defs = this.createDefs(), clipPath = this.createClipPath({
                id: options.id
            }), circle = this.drawCircle(options);
            return clipPath.appendChild(circle), defs.appendChild(clipPath), defs;
        }, SvgRenderer.prototype.setElementAttributes = function(options, element) {
            for (var keys = Object.keys(options), i = 0; i < keys.length; i++) element.setAttribute(keys[i], options[keys[i]]);
            return element;
        }, SvgRenderer;
    }(), __extends$5 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$5 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, SwipeSettings = function(_super) {
        function SwipeSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$5(SwipeSettings, _super), __decorate$5([ Property(50) ], SwipeSettings.prototype, "swipeThresholdDistance", void 0), 
        SwipeSettings;
    }(ChildProperty), swipeRegex = /(Up|Down)/, Touch = function(_super) {
        function Touch(element, options) {
            var _this = _super.call(this, options, element) || this;
            return _this.touchAction = !0, _this.tapCount = 0, _this.startEvent = function(evt) {
                if (!0 === _this.touchAction) {
                    var point = evt.changedTouches ? evt.changedTouches[0] : evt;
                    void 0 !== evt.changedTouches && (_this.touchAction = !1), _this.isTouchMoved = !1, 
                    _this.movedDirection = "", _this.startPoint = _this.lastMovedPoint = {
                        clientX: point.clientX,
                        clientY: point.clientY
                    }, _this.startEventData = point, _this.hScrollLocked = _this.vScrollLocked = !1, 
                    _this.tStampStart = Date.now(), _this.timeOutTapHold = setTimeout(function() {
                        _this.tapHoldEvent(evt);
                    }, _this.tapHoldThreshold), EventHandler.add(_this.element, Browser.touchMoveEvent, _this.moveEvent, _this), 
                    EventHandler.add(_this.element, Browser.touchEndEvent, _this.endEvent, _this);
                }
            }, _this.moveEvent = function(evt) {
                var point = evt.changedTouches ? evt.changedTouches[0] : evt;
                _this.movedPoint = point, _this.isTouchMoved = !(point.clientX === _this.startPoint.clientX && point.clientY === _this.startPoint.clientY);
                var eScrollArgs = {};
                if (_this.isTouchMoved) {
                    clearTimeout(_this.timeOutTapHold), _this.calcScrollPoints(evt);
                    eScrollArgs = extend(eScrollArgs, {}, {
                        startEvents: _this.startEventData,
                        originalEvent: evt,
                        startX: _this.startPoint.clientX,
                        startY: _this.startPoint.clientY,
                        distanceX: _this.distanceX,
                        distanceY: _this.distanceY,
                        scrollDirection: _this.scrollDirection,
                        velocity: _this.getVelocity(point)
                    }), _this.trigger("scroll", eScrollArgs), _this.lastMovedPoint = {
                        clientX: point.clientX,
                        clientY: point.clientY
                    };
                }
            }, _this.endEvent = function(evt) {
                clearTimeout(_this.timeOutTapHold), clearTimeout(_this.timeOutTap);
                var point = evt;
                evt.changedTouches && (point = evt.changedTouches[0]);
                var diffX = point.clientX - _this.startPoint.clientX, diffY = point.clientY - _this.startPoint.clientY;
                diffX = Math.floor(diffX < 0 ? -1 * diffX : diffX), diffY = Math.floor(diffY < 0 ? -1 * diffY : diffX), 
                _this.isTouchMoved = diffX > 1 || diffY > 1, _this.endPoint = point;
                var eSwipeArgs, tDistance = _this.swipeSettings.swipeThresholdDistance;
                _this.calcPoints(evt);
                var swipeArgs = {
                    originalEvent: evt,
                    startEvents: _this.startEventData,
                    startX: _this.startPoint.clientX,
                    startY: _this.startPoint.clientY,
                    distanceX: _this.distanceX,
                    distanceY: _this.distanceY,
                    swipeDirection: _this.movedDirection,
                    velocity: _this.getVelocity(point)
                };
                if (_this.isTouchMoved) {
                    eSwipeArgs = extend(eSwipeArgs, _this.defaultArgs, swipeArgs);
                    var canTrigger = !1, ele = _this.element, scrollBool = _this.isScrollable(ele), moved = swipeRegex.test(_this.movedDirection);
                    (tDistance < _this.distanceX && !moved || tDistance < _this.distanceY && moved) && (canTrigger = !scrollBool || _this.checkSwipe(ele, moved)), 
                    canTrigger && _this.trigger("swipe", eSwipeArgs);
                } else "function" == typeof _this.tap && (_this.trigger("tap", {
                    originalEvent: evt,
                    tapCount: ++_this.tapCount
                }), _this.timeOutTap = setTimeout(function() {
                    _this.tapCount = 0;
                }, _this.tapThreshold));
                _this.modeClear = setTimeout(function() {
                    _this.touchAction = !0;
                }, "function" != typeof _this.tap ? 0 : 10), _this.lastTapTime = new Date().getTime(), 
                EventHandler.remove(_this.element, Browser.touchMoveEvent, _this.moveEvent), EventHandler.remove(_this.element, Browser.touchEndEvent, _this.endEvent);
            }, _this.bind(), _this;
        }
        return __extends$5(Touch, _super), Touch.prototype.onPropertyChanged = function(newProp, oldProp) {}, 
        Touch.prototype.bind = function() {
            this.wireEvents(), Browser.isIE && this.element.classList.add("e-block-touch");
        }, Touch.prototype.destroy = function() {
            this.unwireEvents(), _super.prototype.destroy.call(this);
        }, Touch.prototype.wireEvents = function() {
            EventHandler.add(this.element, Browser.touchStartEvent, this.startEvent, this);
        }, Touch.prototype.unwireEvents = function() {
            EventHandler.remove(this.element, Browser.touchStartEvent, this.startEvent);
        }, Touch.prototype.getModuleName = function() {
            return "touch";
        }, Touch.prototype.isScrollable = function(element) {
            var eleStyle = getComputedStyle(element), style = eleStyle.overflow + eleStyle.overflowX + eleStyle.overflowY;
            return !!/(auto|scroll)/.test(style);
        }, Touch.prototype.tapHoldEvent = function(evt) {
            this.tapCount = 0, this.touchAction = !0;
            var eTapArgs;
            EventHandler.remove(this.element, Browser.touchMoveEvent, this.moveEvent), EventHandler.remove(this.element, Browser.touchEndEvent, this.endEvent), 
            eTapArgs = {
                originalEvent: evt
            }, this.trigger("tapHold", eTapArgs);
        }, Touch.prototype.calcPoints = function(evt) {
            var point = evt.changedTouches ? evt.changedTouches[0] : evt;
            this.defaultArgs = {
                originalEvent: evt
            }, this.distanceX = Math.abs(Math.abs(point.clientX) - Math.abs(this.startPoint.clientX)), 
            this.distanceY = Math.abs(Math.abs(point.clientY) - Math.abs(this.startPoint.clientY)), 
            this.distanceX > this.distanceY ? this.movedDirection = point.clientX > this.startPoint.clientX ? "Right" : "Left" : this.movedDirection = point.clientY < this.startPoint.clientY ? "Up" : "Down";
        }, Touch.prototype.calcScrollPoints = function(evt) {
            var point = evt.changedTouches ? evt.changedTouches[0] : evt;
            this.defaultArgs = {
                originalEvent: evt
            }, this.distanceX = Math.abs(Math.abs(point.clientX) - Math.abs(this.lastMovedPoint.clientX)), 
            this.distanceY = Math.abs(Math.abs(point.clientY) - Math.abs(this.lastMovedPoint.clientY)), 
            (this.distanceX > this.distanceY || !0 === this.hScrollLocked) && !1 === this.vScrollLocked ? (this.scrollDirection = point.clientX > this.lastMovedPoint.clientX ? "Right" : "Left", 
            this.hScrollLocked = !0) : (this.scrollDirection = point.clientY < this.lastMovedPoint.clientY ? "Up" : "Down", 
            this.vScrollLocked = !0);
        }, Touch.prototype.getVelocity = function(pnt) {
            var newX = pnt.clientX, newY = pnt.clientY, newT = Date.now(), xDist = newX - this.startPoint.clientX, yDist = newY - this.startPoint.clientX, interval = newT - this.tStampStart;
            return Math.sqrt(xDist * xDist + yDist * yDist) / interval;
        }, Touch.prototype.checkSwipe = function(ele, flag) {
            var keys = [ "scroll", "offset" ], temp = flag ? [ "Height", "Top" ] : [ "Width", "Left" ];
            return ele[keys[0] + temp[0]] <= ele[keys[1] + temp[0]] || (0 === ele[keys[0] + temp[1]] || ele[keys[1] + temp[0]] + ele[keys[0] + temp[1]] >= ele[keys[0] + temp[0]]);
        }, __decorate$5([ Event() ], Touch.prototype, "tap", void 0), __decorate$5([ Event() ], Touch.prototype, "tapHold", void 0), 
        __decorate$5([ Event() ], Touch.prototype, "swipe", void 0), __decorate$5([ Event() ], Touch.prototype, "scroll", void 0), 
        __decorate$5([ Property(350) ], Touch.prototype, "tapThreshold", void 0), __decorate$5([ Property(750) ], Touch.prototype, "tapHoldThreshold", void 0), 
        __decorate$5([ Complex({}, SwipeSettings) ], Touch.prototype, "swipeSettings", void 0), 
        Touch = __decorate$5([ NotifyPropertyChanges ], Touch);
    }(Base), LINES = new RegExp("\\n|\\r|\\s\\s+", "g"), QUOTES = new RegExp(/'|"/g), IF_STMT = new RegExp("if ?\\("), ELSE_STMT = new RegExp("else"), FOR_STMT = new RegExp("for ?\\("), IF_OR_FOR = new RegExp("(/if|/for)"), CALL_FUNCTION = new RegExp("\\((.*)\\)", ""), NOT_NUMBER = new RegExp("^[0-9]+$", "g"), WORD = new RegExp("[\\w\"'.\\s+]+", "g"), DBL_QUOTED_STR = new RegExp('"(.*?)"', "g"), exp = new RegExp("\\${([^}]*)}", "g"), HAS_ROW = /^[\n\r.]+\<tr|^\<tr/, engineObj = {
        compile: new (function() {
            function Engine() {}
            return Engine.prototype.compile = function(templateString, helper) {
                return void 0 === helper && (helper = {}), compile$1(templateString, helper);
            }, Engine;
        }())().compile
    }, _base = Object.freeze({
        Ajax: Ajax,
        Animation: Animation,
        rippleEffect: rippleEffect,
        get isRippleEnabled() {
            return isRippleEnabled;
        },
        enableRipple: function(isRipple) {
            return isRippleEnabled = isRipple;
        },
        Base: Base,
        Browser: Browser,
        CanvasRenderer: CanvasRenderer,
        Component: Component,
        ChildProperty: ChildProperty,
        Position: Position,
        Draggable: Draggable,
        Droppable: Droppable,
        EventHandler: EventHandler,
        onIntlChange: onIntlChange,
        get rightToLeft() {
            return rightToLeft;
        },
        cldrData: cldrData,
        get defaultCulture() {
            return defaultCulture;
        },
        get defaultCurrencyCode() {
            return defaultCurrencyCode;
        },
        Internationalization: Internationalization,
        setCulture: setCulture,
        setCurrencyCode: function(currencyCode) {
            defaultCurrencyCode = currencyCode, onIntlChange.notify("notifyExternalChange", {
                currencyCode: defaultCurrencyCode
            });
        },
        loadCldr: function() {
            for (var data = [], _i = 0; _i < arguments.length; _i++) data[_i] = arguments[_i];
            for (var _a = 0, data_1 = data; _a < data_1.length; _a++) {
                var obj = data_1[_a];
                extend(cldrData, obj, {}, !0);
            }
        },
        enableRtl: function(status) {
            void 0 === status && (status = !0), rightToLeft = status, onIntlChange.notify("notifyExternalChange", {
                enableRtl: rightToLeft
            });
        },
        getNumericObject: getNumericObject,
        getDefaultDateObject: getDefaultDateObject,
        KeyboardEvents: KeyboardEvents,
        L10n: L10n,
        ModuleLoader: ModuleLoader,
        Property: Property,
        Complex: Complex,
        ComplexFactory: function(type) {
            return function(target, key) {
                var propertyDescriptor = {
                    set: function(defaultValue, curKey, type) {
                        return function(newValue) {
                            var curType = type(newValue);
                            getObject(this, curKey, defaultValue, curType).setProperties(newValue);
                        };
                    }({}, key, type),
                    get: function(defaultValue, curKey, type) {
                        return function() {
                            var curType = type({});
                            return getObject(this, curKey, defaultValue, curType);
                        };
                    }({}, key, type),
                    enumerable: !0,
                    configurable: !0
                };
                Object.defineProperty(target, key, propertyDescriptor), addPropertyCollection(target, key, "complexProp", {}, type);
            };
        },
        Collection: Collection,
        CollectionFactory: function(type) {
            return function(target, key) {
                var propertyDescriptor = {
                    set: function(defaultValue, curKey, type) {
                        return function(newValue) {
                            var oldValueCollection = getObjectArray(this, curKey, defaultValue, type, !1, !0), newValCollection = getObjectArray(this, curKey, newValue, type, !0, !0);
                            this.saveChanges(curKey, newValCollection, oldValueCollection), this.properties[curKey] = newValCollection;
                        };
                    }([], key, type),
                    get: function(defaultValue, curKey, type) {
                        return function() {
                            var curType = type({});
                            if (!this.properties.hasOwnProperty(curKey)) {
                                var defCollection = getObjectArray(this, curKey, defaultValue, curType, !1);
                                this.properties[curKey] = defCollection;
                            }
                            return this.properties[curKey];
                        };
                    }([], key, type),
                    enumerable: !0,
                    configurable: !0
                };
                Object.defineProperty(target, key, propertyDescriptor), addPropertyCollection(target, key, "colProp", {}, type);
            };
        },
        Event: Event,
        NotifyPropertyChanges: NotifyPropertyChanges,
        CreateBuilder: function(component) {
            var builderFunction = function(element) {
                return this.element = element, this;
            };
            return function(element) {
                return builderFunction.prototype.hasOwnProperty("create") || ((builderFunction.prototype = getBuilderProperties(component)).create = function() {
                    var temp = extend({}, {}, this.properties);
                    return this.properties = {}, new component(temp, this.element);
                }), new builderFunction(element);
            };
        },
        SvgRenderer: SvgRenderer,
        SwipeSettings: SwipeSettings,
        Touch: Touch,
        compile: compile$$1,
        setTemplateEngine: function(classObj) {
            engineObj.compile = classObj.compile;
        },
        getTemplateEngine: function() {
            return engineObj.compile;
        },
        createInstance: createInstance,
        setImmediate: setImmediate,
        getValue: getValue,
        setValue: setValue,
        deleteObject: deleteObject,
        isObject: isObject,
        getEnumValue: getEnumValue,
        merge: merge,
        extend: extend,
        isNullOrUndefined: isNullOrUndefined,
        isUndefined: isUndefined,
        getUniqueID: getUniqueID,
        debounce: debounce,
        queryParams: function(data) {
            for (var array = [], _i = 0, keys_2 = Object.keys(data); _i < keys_2.length; _i++) {
                var key = keys_2[_i];
                array.push(encodeURIComponent(key) + "=" + encodeURIComponent("" + data[key]));
            }
            return array.join("&");
        },
        isObjectArray: function(value) {
            var parser = Object.prototype.toString;
            return "[object Array]" === parser.call(value) && "[object Object]" === parser.call(value[0]);
        },
        compareElementParent: compareElementParent,
        throwError: throwError,
        print: print,
        formatUnit: formatUnit,
        getInstance: getInstance,
        addInstance: function(element, instance) {
            var elem = "string" == typeof element ? document.querySelector(element) : element;
            elem[instances] ? elem[instances].push(instance) : elem[instances] = [ instance ];
        },
        uniqueID: uniqueID,
        createElement: createElement,
        addClass: addClass,
        removeClass: removeClass,
        isVisible: isVisible,
        prepend: prepend,
        append: append,
        detach: detach,
        remove: remove,
        attributes: attributes,
        select: select,
        selectAll: selectAll,
        closest: closest,
        siblings: function(element) {
            for (var siblings = [], _i = 0, childNodes_1 = Array.prototype.slice.call(element.parentNode.childNodes); _i < childNodes_1.length; _i++) {
                var curNode = childNodes_1[_i];
                curNode.nodeType === Node.ELEMENT_NODE && element !== curNode && siblings.push(curNode);
            }
            return siblings;
        },
        getAttributeOrDefault: function(element, property, value) {
            var attrVal = element.getAttribute(property);
            return isNullOrUndefined(attrVal) && (element.setAttribute(property, value.toString()), 
            attrVal = value), attrVal;
        },
        setStyleAttribute: setStyleAttribute,
        classList: classList,
        matches: matches
    }), __extends = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, CLS_ITEM = "e-acrdn-item", CLS_HEADER = "e-acrdn-header", CLS_CONTENT = "e-acrdn-panel", AccordionActionSettings = function(_super) {
        function AccordionActionSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends(AccordionActionSettings, _super), __decorate([ Property("SlideDown") ], AccordionActionSettings.prototype, "effect", void 0), 
        __decorate([ Property(400) ], AccordionActionSettings.prototype, "duration", void 0), 
        __decorate([ Property("linear") ], AccordionActionSettings.prototype, "easing", void 0), 
        AccordionActionSettings;
    }(ChildProperty), AccordionAnimationSettings = function(_super) {
        function AccordionAnimationSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends(AccordionAnimationSettings, _super), __decorate([ Complex({
            effect: "SlideUp",
            duration: 400,
            easing: "linear"
        }, AccordionActionSettings) ], AccordionAnimationSettings.prototype, "collapse", void 0), 
        __decorate([ Complex({
            effect: "SlideDown",
            duration: 400,
            easing: "linear"
        }, AccordionActionSettings) ], AccordionAnimationSettings.prototype, "expand", void 0), 
        AccordionAnimationSettings;
    }(ChildProperty), AccordionItem = function(_super) {
        function AccordionItem() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends(AccordionItem, _super), __decorate([ Property(void 0) ], AccordionItem.prototype, "content", void 0), 
        __decorate([ Property(void 0) ], AccordionItem.prototype, "header", void 0), __decorate([ Property(void 0) ], AccordionItem.prototype, "cssClass", void 0), 
        __decorate([ Property(void 0) ], AccordionItem.prototype, "iconCss", void 0), __decorate([ Property(!1) ], AccordionItem.prototype, "expanded", void 0), 
        AccordionItem;
    }(ChildProperty), Accordion = function(_super) {
        function Accordion(options, element) {
            var _this = _super.call(this, options, element) || this;
            return _this.keyConfigs = {
                moveUp: "uparrow",
                moveDown: "downarrow",
                enter: "enter",
                space: "space",
                home: "home",
                end: "end"
            }, _this;
        }
        return __extends(Accordion, _super), Accordion.prototype.destroy = function() {
            var _this = this, ele = this.element;
            for (_super.prototype.destroy.call(this), this.unwireEvents(), this.isDestroy = !0, 
            this.templateEle.forEach(function(eleStr) {
                document.body.appendChild(_this.element.querySelector(eleStr)).style.display = "none";
            }); ele.firstChild; ) ele.removeChild(ele.firstChild);
            if (this.trgtEle) for (;this.ctrlTem.firstChild; ) ele.appendChild(this.ctrlTem.firstChild);
            ele.removeAttribute("style"), [ "aria-disabled", "aria-multiselectable", "role" ].forEach(function(attrb) {
                _this.element.removeAttribute(attrb);
            });
        }, Accordion.prototype.preRender = function() {
            var nested = closest(this.element, "." + CLS_CONTENT);
            this.isNested = !1, this.templateEle = [], this.isDestroy || (this.isDestroy = !1), 
            isNullOrUndefined(nested) ? this.element.classList.add("e-acrdn-root") : (nested.classList.add("e-nested"), 
            this.isNested = !0), this.enableRtl && this.add(this.element, "e-rtl"), this.enablePersistence && !isNullOrUndefined(this.expandedItems) || (this.expandedItems = []);
        }, Accordion.prototype.add = function(ele, val) {
            ele.classList.add(val);
        }, Accordion.prototype.remove = function(ele, val) {
            ele.classList.remove(val);
        }, Accordion.prototype.render = function() {
            this.initialize(), this.renderControl(), this.wireEvents();
        }, Accordion.prototype.initialize = function() {
            var width = formatUnit(this.width), height = formatUnit(this.height);
            setStyleAttribute(this.element, {
                width: width,
                height: height
            });
            this.expandedItems.length > 0 && (this.initExpand = this.expandedItems), attributes(this.element, {
                "aria-disabled": "false",
                role: "presentation",
                "aria-multiselectable": "true"
            }), "Single" === this.expandMode && this.element.setAttribute("aria-multiselectable", "false");
        }, Accordion.prototype.renderControl = function() {
            this.trgtEle = this.element.children.length > 0 ? select("div", this.element) : null, 
            this.renderItems(), this.initItemExpand();
        }, Accordion.prototype.unwireEvents = function() {
            EventHandler.remove(this.element, "click", this.clickHandler), isNullOrUndefined(this.keyModule) || this.keyModule.destroy();
        }, Accordion.prototype.wireEvents = function() {
            EventHandler.add(this.element, "click", this.clickHandler, this), this.isNested || this.isDestroy || rippleEffect(this.element, {
                selector: "." + CLS_HEADER
            }), this.isNested || (this.keyModule = new KeyboardEvents(this.element, {
                keyAction: this.keyActionHandler.bind(this),
                keyConfigs: this.keyConfigs,
                eventName: "keydown"
            }));
        }, Accordion.prototype.focusIn = function(e) {
            e.target.parentElement.classList.add("e-item-focus");
        }, Accordion.prototype.focusOut = function(e) {
            e.target.parentElement.classList.remove("e-item-focus");
        }, Accordion.prototype.ctrlTemplate = function() {
            var _this = this;
            this.ctrlTem = this.element.cloneNode(!0);
            var content, innerEles = this.element.children;
            addClass(innerEles, [ CLS_ITEM ]), [].slice.call(innerEles).forEach(function(el) {
                if (el.id = getUniqueID("acrdn_item"), el.children.length > 0) {
                    _this.add(el.children[0], CLS_HEADER);
                    var header = el.children[0];
                    attributes(header, {
                        tabindex: "0",
                        role: "heading",
                        "aria-level": innerEles.length.toString()
                    }), header.id = getUniqueID("acrdn_header"), EventHandler.add(header, "focus", _this.focusIn, _this), 
                    EventHandler.add(header, "blur", _this.focusOut, _this);
                    var headerEle = header.firstElementChild;
                    headerEle && headerEle.classList.add("e-acrdn-header-content"), (content = el.children[1]) && (content.id = getUniqueID("acrdn_panel"), 
                    header.setAttribute("aria-controls", content.id), content.style.display = "", el.classList.add("e-select"), 
                    el.children[0].appendChild(_this.toggleIconGenerate()), classList(content, [ CLS_CONTENT, "e-content-hide" ], []), 
                    attributes(content, {
                        "aria-labelledby": header.id,
                        "aria-hidden": "true"
                    }), (content = content.firstElementChild) && (content.classList.add("e-acrdn-content"), 
                    content.style.display = ""));
                }
            });
        }, Accordion.prototype.toggleIconGenerate = function() {
            var tglIcon = createElement("div", {
                className: "e-toggle-icon"
            }), hdrColIcon = createElement("span", {
                className: "e-tgl-collapse-icon e-icons"
            });
            return tglIcon.appendChild(hdrColIcon), tglIcon;
        }, Accordion.prototype.initItemExpand = function() {
            var len = this.initExpand.length;
            if (0 !== len) if ("Single" === this.expandMode) this.expandItem(!0, this.initExpand[len - 1]); else for (var i = 0; i < len; i++) this.expandItem(!0, this.initExpand[i]);
        }, Accordion.prototype.renderItems = function() {
            var innerItem, _this = this, ele = this.element;
            isNullOrUndefined(this.initExpand) && (this.initExpand = []);
            var items = this.items;
            isNullOrUndefined(this.trgtEle) ? ele && items.length > 0 && items.forEach(function(item, index) {
                innerItem = _this.renderInnerItem(item, index), ele.appendChild(innerItem), innerItem.childElementCount > 0 && (EventHandler.add(innerItem.querySelector("." + CLS_HEADER), "focus", _this.focusIn, _this), 
                EventHandler.add(innerItem.querySelector("." + CLS_HEADER), "blur", _this.focusOut, _this));
            }) : this.ctrlTemplate();
        }, Accordion.prototype.clickHandler = function(e) {
            var index, tglIcon, _this = this, trgt = e.target, eventArgs = {};
            if (closest(trgt, ".e-accordion") === this.element) {
                trgt.classList.add("e-target");
                var acrdnItem = closest(trgt, "." + CLS_ITEM), acrdnHdr = closest(trgt, "." + CLS_HEADER), acrdnCtn = closest(trgt, "." + CLS_CONTENT);
                acrdnItem && (isNullOrUndefined(acrdnHdr) || isNullOrUndefined(acrdnCtn)) && (acrdnHdr = acrdnItem.children[0], 
                acrdnCtn = acrdnItem.children[1]), acrdnHdr && (tglIcon = select(".e-toggle-icon", acrdnHdr));
                var acrdnCtnItem;
                acrdnCtn && (acrdnCtnItem = closest(acrdnCtn, "." + CLS_ITEM));
                var acrdActive = [];
                index = this.getIndexByItem(acrdnItem), acrdnCtnItem && (eventArgs.item = this.items[this.getIndexByItem(acrdnCtnItem)]), 
                eventArgs.originalEvent = e;
                !(!isNullOrUndefined(tglIcon) && isNullOrUndefined(this.trgtEle) && acrdnItem.childElementCount <= 1) || !isNullOrUndefined(acrdnCtn) && isNullOrUndefined(select(".e-acrdn-header .e-toggle-icon", acrdnCtnItem)) || (acrdnItem.appendChild(this.contentRendering(index)), 
                this.ariaAttrUpdate(acrdnItem)), this.trigger("clicked", eventArgs);
                var cntclkCheck = acrdnCtn && !isNullOrUndefined(select(".e-target", acrdnCtn));
                if (cntclkCheck = cntclkCheck && (isNullOrUndefined(select(".e-accordion", acrdnCtn)) || !(closest(trgt, ".e-accordion") === this.element)), 
                trgt.classList.remove("e-target"), !(trgt.classList.contains(CLS_CONTENT) || trgt.classList.contains("e-acrdn-content") || cntclkCheck)) {
                    [].slice.call(this.element.children).forEach(function(el) {
                        el.classList.contains("e-active") && acrdActive.push(el);
                    });
                    var acrdAniEle = [].slice.call(this.element.querySelectorAll(".e-acrdn-item [e-animate]"));
                    if (acrdAniEle.length > 0) for (var _i = 0, acrdAniEle_1 = acrdAniEle; _i < acrdAniEle_1.length; _i++) {
                        var el = acrdAniEle_1[_i];
                        acrdActive.push(el.parentElement);
                    }
                    var sameContentCheck = -1 !== acrdActive.indexOf(acrdnCtnItem) && "true" === acrdnCtn.getAttribute("e-animate"), sameHeader = !1;
                    if (!isNullOrUndefined(acrdnItem) && !isNullOrUndefined(acrdnHdr)) {
                        var acrdnCtn_1 = select("." + CLS_CONTENT, acrdnItem), expandState = closest(acrdnItem, ".e-acrdn-root").querySelector(".e-expand-state");
                        if (isNullOrUndefined(acrdnCtn_1)) return;
                        sameHeader = expandState === acrdnItem, !isVisible(acrdnCtn_1) || sameContentCheck && !acrdnCtnItem.classList.contains("e-selected") ? (acrdActive.length > 0 && "Single" === this.expandMode && !sameContentCheck && acrdActive.forEach(function(el) {
                            _this.collapse(select("." + CLS_CONTENT, el)), el.classList.remove("e-expand-state");
                        }), this.expand(acrdnCtn_1)) : this.collapse(acrdnCtn_1), isNullOrUndefined(expandState) || sameHeader || expandState.classList.remove("e-expand-state");
                    }
                }
            }
        }, Accordion.prototype.eleMoveFocus = function(action, root, trgt) {
            var clst, clstItem = closest(trgt, "." + CLS_ITEM);
            trgt === root ? clst = ("moveUp" === action ? trgt.lastElementChild : trgt).querySelector("." + CLS_HEADER) : trgt.classList.contains(CLS_HEADER) && (clstItem = "moveUp" === action ? clstItem.previousElementSibling : clstItem.nextElementSibling) && (clst = select("." + CLS_HEADER, clstItem)), 
            clst && clst.focus();
        }, Accordion.prototype.keyActionHandler = function(e) {
            var trgt = e.target;
            if ("INPUT" !== trgt.tagName) {
                e.preventDefault();
                var content, root = this.element;
                switch (e.action) {
                  case "moveUp":
                  case "moveDown":
                    this.eleMoveFocus(e.action, root, trgt);
                    break;

                  case "space":
                  case "enter":
                    !isNullOrUndefined(content = trgt.nextElementSibling) && content.classList.contains(CLS_CONTENT) ? "true" !== content.getAttribute("e-animate") && trgt.click() : trgt.click();
                    break;

                  case "home":
                  case "end":
                    ("home" === e.action ? root.firstElementChild.children[0] : root.lastElementChild.children[0]).focus();
                }
            }
        }, Accordion.prototype.headerEleGenerate = function() {
            var header = createElement("div", {
                className: CLS_HEADER,
                id: getUniqueID("acrdn_header")
            });
            return attributes(header, {
                tabindex: "0",
                role: "heading",
                "aria-expanded": "false",
                "aria-selected": "false",
                "aria-disabled": "false",
                "aria-level": this.items.length.toString()
            }), header;
        }, Accordion.prototype.renderInnerItem = function(item, index) {
            var innerEle;
            if (innerEle = createElement("div", {
                className: CLS_ITEM
            }), innerEle.id = getUniqueID("acrdn_item"), item.header) {
                var ctnEle = this.headerEleGenerate(), hdrEle = createElement("div", {
                    className: "e-acrdn-header-content"
                });
                ctnEle.appendChild(hdrEle), ctnEle.appendChild(this.fetchElement(hdrEle, item.header, index, !0)), 
                innerEle.appendChild(ctnEle);
            }
            var hdr = select("." + CLS_HEADER, innerEle);
            if (!item.expanded || isNullOrUndefined(index) || this.enablePersistence || -1 === this.initExpand.indexOf(index) && this.initExpand.push(index), 
            item.cssClass && innerEle.classList.add(item.cssClass), item.iconCss) {
                var hdrIcnEle = createElement("div", {
                    className: "e-acrdn-header-icon"
                }), icon = createElement("span", {
                    className: item.iconCss + " e-icons"
                });
                hdrIcnEle.appendChild(icon), isNullOrUndefined(hdr) ? ((hdr = this.headerEleGenerate()).appendChild(hdrIcnEle), 
                innerEle.appendChild(hdr)) : hdr.insertBefore(hdrIcnEle, hdr.childNodes[0]);
            }
            if (item.content) {
                var hdrIcon = this.toggleIconGenerate();
                isNullOrUndefined(hdr) && (hdr = this.headerEleGenerate(), innerEle.appendChild(hdr)), 
                hdr.appendChild(hdrIcon), this.add(innerEle, "e-select");
            }
            return innerEle;
        }, Accordion.prototype.fetchElement = function(ele, value, index, isHeader) {
            var templateFn, temString;
            try {
                if (document.querySelectorAll(value).length) {
                    var eleVal = document.querySelector(value);
                    temString = eleVal.outerHTML.trim(), ele.appendChild(eleVal), eleVal.style.display = "";
                }
            } catch (e) {
                templateFn = compile$$1(value);
            }
            return isNullOrUndefined(templateFn) || !(templateFn().length > 0) || isNullOrUndefined(templateFn()[0].tagName) && 1 === templateFn().length ? 0 === ele.childElementCount && (ele.innerHTML = value) : [].slice.call(templateFn()).forEach(function(el) {
                isNullOrUndefined(el.tagName) || (el.style.display = ""), ele.appendChild(el);
            }), isNullOrUndefined(temString) || this.templateEle.push(value), ele;
        }, Accordion.prototype.ariaAttrUpdate = function(itemEle) {
            var header = select("." + CLS_HEADER, itemEle), content = select("." + CLS_CONTENT, itemEle);
            header.setAttribute("aria-controls", content.id), content.setAttribute("aria-labelledby", header.id);
        }, Accordion.prototype.contentRendering = function(index) {
            var content = this.items[index].content, itemcnt = createElement("div", {
                className: CLS_CONTENT + " e-content-hide",
                id: getUniqueID("acrdn_panel")
            });
            attributes(itemcnt, {
                "aria-hidden": "true"
            });
            var ctn = createElement("div", {
                className: "e-acrdn-content"
            });
            return itemcnt.appendChild(this.fetchElement(ctn, content, index, !1)), itemcnt;
        }, Accordion.prototype.expand = function(trgt) {
            var eventArgs, trgtItemEle = closest(trgt, "." + CLS_ITEM);
            if (!(isNullOrUndefined(trgt) || isVisible(trgt) && "true" !== trgt.getAttribute("e-animate") || trgtItemEle.classList.contains("e-overlay"))) {
                var expandState = closest(trgtItemEle, ".e-acrdn-root").querySelector(".e-expand-state"), animation = {
                    name: this.animation.expand.effect,
                    duration: this.animation.expand.duration,
                    timingFunction: this.animation.expand.easing
                }, icon = select(".e-toggle-icon", trgtItemEle).firstElementChild;
                eventArgs = {
                    element: trgtItemEle,
                    item: this.items[this.getIndexByItem(trgtItemEle)],
                    isExpanded: !0
                };
                var eff = animation.name;
                if (this.trigger("expanding", eventArgs), !eventArgs.cancel) {
                    if (icon.classList.add("e-toggle-animation"), this.expandedItemsPush(trgtItemEle), 
                    isNullOrUndefined(expandState) || expandState.classList.remove("e-expand-state"), 
                    trgtItemEle.classList.add("e-expand-state"), "None" === animation.name) return this.expandProgress("begin", icon, trgt, trgtItemEle, eventArgs), 
                    void this.expandProgress("end", icon, trgt, trgtItemEle, eventArgs);
                    this.expandAnimation(eff, icon, trgt, trgtItemEle, animation, eventArgs);
                }
            }
        }, Accordion.prototype.expandAnimation = function(ef, icn, trgt, trgtItemEle, animate, args) {
            var height, _this = this;
            "SlideDown" === ef ? (animate.begin = function() {
                _this.expandProgress("begin", icn, trgt, trgtItemEle, args), trgt.style.position = "absolute", 
                height = trgtItemEle.offsetHeight, trgt.offsetHeight, trgt.style.maxHeight = trgt.offsetHeight + "px", 
                trgtItemEle.style.maxHeight = "";
            }, animate.progress = function() {
                trgtItemEle.style.minHeight = height + trgt.offsetHeight + "px";
            }, animate.end = function() {
                setStyleAttribute(trgt, {
                    position: "",
                    maxHeight: ""
                }), trgtItemEle.style.minHeight = "", _this.expandProgress("end", icn, trgt, trgtItemEle, args);
            }) : (animate.begin = function() {
                _this.expandProgress("begin", icn, trgt, trgtItemEle, args);
            }, animate.end = function() {
                _this.expandProgress("end", icn, trgt, trgtItemEle, args);
            }), new Animation(animate).animate(trgt);
        }, Accordion.prototype.expandProgress = function(progress, icon, trgt, trgtItemEle, eventArgs) {
            this.remove(trgt, "e-content-hide"), this.add(trgtItemEle, "e-selected"), this.add(icon, "e-expand-icon"), 
            "end" === progress && (this.add(trgtItemEle, "e-active"), trgt.setAttribute("aria-hidden", "false"), 
            attributes(trgt.previousElementSibling, {
                "aria-selected": "true",
                "aria-expanded": "true"
            }), icon.classList.remove("e-toggle-animation"), this.trigger("expanded", eventArgs));
        }, Accordion.prototype.expandedItemsPush = function(item) {
            var index = this.getIndexByItem(item);
            -1 === this.expandedItems.indexOf(index) && this.expandedItems.push(index);
        }, Accordion.prototype.getIndexByItem = function(item) {
            return [].slice.call(this.element.children).indexOf(item);
        }, Accordion.prototype.expandedItemsPop = function(item) {
            var index = this.getIndexByItem(item);
            this.expandedItems.splice(this.expandedItems.indexOf(index), 1);
        }, Accordion.prototype.collapse = function(trgt) {
            var eventArgs, trgtItemEle = closest(trgt, "." + CLS_ITEM);
            if (!isNullOrUndefined(trgt) && isVisible(trgt) && !trgtItemEle.classList.contains("e-overlay")) {
                var animation = {
                    name: this.animation.collapse.effect,
                    duration: this.animation.collapse.duration,
                    timingFunction: this.animation.collapse.easing
                }, icon = select(".e-toggle-icon", trgtItemEle).firstElementChild;
                eventArgs = {
                    element: trgtItemEle,
                    item: this.items[this.getIndexByItem(trgtItemEle)],
                    isExpanded: !1
                };
                var eff = animation.name;
                if (this.trigger("expanding", eventArgs), !eventArgs.cancel) {
                    if (this.expandedItemsPop(trgtItemEle), trgtItemEle.classList.add("e-expand-state"), 
                    icon.classList.add("e-toggle-animation"), "None" === animation.name) return this.collapseProgress("begin", icon, trgt, trgtItemEle, eventArgs), 
                    void this.collapseProgress("end", icon, trgt, trgtItemEle, eventArgs);
                    this.collapseAnimation(eff, trgt, trgtItemEle, icon, animation, eventArgs);
                }
            }
        }, Accordion.prototype.collapseAnimation = function(ef, trgt, trgtItEl, icn, animate, args) {
            var height, trgtHeight, itemHeight, remain, _this = this;
            "SlideUp" === ef ? (animate.begin = function() {
                itemHeight = trgtItEl.offsetHeight, trgtItEl.style.minHeight = itemHeight + "px", 
                trgt.style.position = "absolute", height = trgtItEl.offsetHeight, trgtHeight = trgt.offsetHeight, 
                trgt.style.maxHeight = trgtHeight + "px", _this.collapseProgress("begin", icn, trgt, trgtItEl, args);
            }, animate.progress = function() {
                (remain = height - (trgtHeight - trgt.offsetHeight)) < itemHeight && (trgtItEl.style.minHeight = remain + "px");
            }, animate.end = function() {
                trgt.style.display = "none", _this.collapseProgress("end", icn, trgt, trgtItEl, args), 
                trgtItEl.style.minHeight = "", setStyleAttribute(trgt, {
                    position: "",
                    maxHeight: "",
                    display: ""
                });
            }) : (animate.begin = function() {
                _this.collapseProgress("begin", icn, trgt, trgtItEl, args);
            }, animate.end = function() {
                _this.collapseProgress("end", icn, trgt, trgtItEl, args);
            }), new Animation(animate).animate(trgt);
        }, Accordion.prototype.collapseProgress = function(progress, icon, trgt, trgtItemEle, eventArgs) {
            this.remove(icon, "e-expand-icon"), this.remove(trgtItemEle, "e-selected"), "end" === progress && (this.add(trgt, "e-content-hide"), 
            icon.classList.remove("e-toggle-animation"), this.remove(trgtItemEle, "e-active"), 
            trgt.setAttribute("aria-hidden", "true"), attributes(trgt.previousElementSibling, {
                "aria-selected": "false",
                "aria-expanded": "false"
            }), this.trigger("expanded", eventArgs));
        }, Accordion.prototype.getModuleName = function() {
            return "accordion";
        }, Accordion.prototype.itemAttribUpdate = function() {
            var itemEle = [].slice.call(this.element.children), itemLen = this.items.length;
            itemEle.forEach(function(ele) {
                select("." + CLS_HEADER, ele).setAttribute("aria-level", "" + itemLen);
            });
        }, Accordion.prototype.addItem = function(item, index) {
            var ele = this.element;
            if (isNullOrUndefined(index) && (index = this.items.length), ele.childElementCount >= index) {
                this.items.splice(index, 0, item);
                var innerItemEle = this.renderInnerItem(item, index);
                ele.childElementCount === index ? ele.appendChild(innerItemEle) : ele.insertBefore(innerItemEle, ele.children[index]), 
                EventHandler.add(innerItemEle.querySelector("." + CLS_HEADER), "focus", this.focusIn, this), 
                EventHandler.add(innerItemEle.querySelector("." + CLS_HEADER), "blur", this.focusOut, this), 
                this.itemAttribUpdate();
            }
            this.expandedItems = [], this.expandedItemRefresh(ele), item.expanded && this.expandItem(!0, index);
        }, Accordion.prototype.expandedItemRefresh = function(ele) {
            var _this = this;
            [].slice.call(ele.children).forEach(function(el) {
                el.classList.contains("e-selected") && _this.expandedItemsPush(el);
            });
        }, Accordion.prototype.removeItem = function(index) {
            var ele = this.element.children[index];
            isNullOrUndefined(ele) || (detach(ele), this.items.splice(index, 1), this.itemAttribUpdate(), 
            this.expandedItems = [], this.expandedItemRefresh(this.element));
        }, Accordion.prototype.select = function(index) {
            var ele = this.element.children[index];
            isNullOrUndefined(ele) || isNullOrUndefined(select("." + CLS_HEADER, ele)) || ele.children[0].focus();
        }, Accordion.prototype.hideItem = function(index, isHidden) {
            var ele = this.element.children[index];
            isNullOrUndefined(ele) || (isNullOrUndefined(isHidden) && (isHidden = !0), isHidden ? this.add(ele, "e-hide") : this.remove(ele, "e-hide"));
        }, Accordion.prototype.enableItem = function(index, isEnable) {
            var ele = this.element.children[index];
            if (!isNullOrUndefined(ele)) {
                var eleHeader = ele.firstElementChild;
                isEnable ? (this.remove(ele, "e-overlay"), attributes(eleHeader, {
                    tabindex: "0",
                    "aria-disabled": "false"
                }), eleHeader.focus()) : (ele.classList.contains("e-active") && (this.expandItem(!1, index), 
                this.eleMoveFocus("movedown", this.element, eleHeader)), this.add(ele, "e-overlay"), 
                eleHeader.setAttribute("aria-disabled", "true"), eleHeader.removeAttribute("tabindex"));
            }
        }, Accordion.prototype.expandItem = function(isExpand, index) {
            var _this = this, root = this.element;
            if (isNullOrUndefined(index)) if ("Single" === this.expandMode && isExpand) {
                var ele = root.children[root.childElementCount - 1];
                this.itemExpand(isExpand, ele, this.getIndexByItem(ele));
            } else [].slice.call(this.element.children).forEach(function(el) {
                _this.itemExpand(isExpand, el, _this.getIndexByItem(el));
            }); else {
                if (isNullOrUndefined(ele = this.element.children[index]) || !ele.classList.contains("e-select") || ele.classList.contains("e-active") && isExpand) return;
                "Single" === this.expandMode && this.expandItem(!1), this.itemExpand(isExpand, ele, index);
            }
        }, Accordion.prototype.itemExpand = function(isExpand, ele, index) {
            var ctn = ele.children[1];
            if (!ele.classList.contains("e-overlay")) {
                if (isNullOrUndefined(ctn) && isExpand) ctn = this.contentRendering(index), ele.appendChild(ctn), 
                this.ariaAttrUpdate(ele); else if (isNullOrUndefined(ctn)) return;
                isExpand ? this.expand(ctn) : this.collapse(ctn);
            }
        }, Accordion.prototype.destroyItems = function() {
            [].slice.call(this.element.querySelectorAll("." + CLS_ITEM)).forEach(function(el) {
                detach(el);
            });
        }, Accordion.prototype.updateItem = function(item, index) {
            if (!isNullOrUndefined(item)) {
                var itemObj = this.items[index];
                this.items.splice(index, 1), detach(item), this.addItem(itemObj, index);
            }
        }, Accordion.prototype.getPersistData = function() {
            return this.addOnPersist([ "expandedItems" ]);
        }, Accordion.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var acrdn = this.element, _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "items":
                    if (newProp.items instanceof Array && oldProp.items instanceof Array) this.destroyItems(), 
                    this.renderItems(), this.initItemExpand(); else for (var changedProp = Object.keys(newProp.items), i = 0; i < changedProp.length; i++) {
                        var index = parseInt(Object.keys(newProp.items)[i], 10), property = Object.keys(newProp.items[index])[0], oldVal = Object(oldProp.items[index])[property], newVal = Object(newProp.items[index])[property], item = selectAll("." + CLS_ITEM, this.element)[index];
                        "header" !== property && "iconCss" !== property && "expanded" !== property || this.updateItem(item, index), 
                        "cssClass" !== property || isNullOrUndefined(item) || (item.classList.remove(oldVal), 
                        item.classList.add(newVal)), "content" !== property || isNullOrUndefined(item) || 2 !== item.children.length || (item.classList.contains("e-selected") && this.expandItem(!1, index), 
                        detach(item.querySelector("." + CLS_CONTENT)));
                    }
                    break;

                  case "enableRtl":
                    newProp.enableRtl ? this.add(acrdn, "e-rtl") : this.remove(acrdn, "e-rtl");
                    break;

                  case "height":
                    setStyleAttribute(this.element, {
                        height: formatUnit(newProp.height)
                    });
                    break;

                  case "width":
                    setStyleAttribute(this.element, {
                        width: formatUnit(newProp.width)
                    });
                    break;

                  case "expandMode":
                    "Single" === newProp.expandMode ? (this.element.setAttribute("aria-multiselectable", "false"), 
                    this.expandedItems.length > 1 && this.expandItem(!1)) : this.element.setAttribute("aria-multiselectable", "true");
                }
            }
        }, __decorate([ Collection([], AccordionItem) ], Accordion.prototype, "items", void 0), 
        __decorate([ Property("100%") ], Accordion.prototype, "width", void 0), __decorate([ Property("auto") ], Accordion.prototype, "height", void 0), 
        __decorate([ Property("Multiple") ], Accordion.prototype, "expandMode", void 0), 
        __decorate([ Complex({}, AccordionAnimationSettings) ], Accordion.prototype, "animation", void 0), 
        __decorate([ Event() ], Accordion.prototype, "clicked", void 0), __decorate([ Event() ], Accordion.prototype, "expanding", void 0), 
        __decorate([ Event() ], Accordion.prototype, "expanded", void 0), __decorate([ Event() ], Accordion.prototype, "created", void 0), 
        __decorate([ Event() ], Accordion.prototype, "destroyed", void 0), Accordion = __decorate([ NotifyPropertyChanges ], Accordion);
    }(Component), __extends$5$1 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$5$1 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, cssClassName_RTL = "e-rtl", cssClassName_BUTTON = "e-btn", cssClassName_PRIMARY = "e-primary", cssClassName_ICONBTN = "e-icon-btn", Button = function(_super) {
        function Button(options, element) {
            return _super.call(this, options, element) || this;
        }
        return __extends$5$1(Button, _super), Button.prototype.preRender = function() {}, 
        Button.prototype.render = function() {
            this.initialize();
        }, Button.prototype.initialize = function() {
            this.cssClass && addClass([ this.element ], this.cssClass.split(" ")), this.isPrimary && this.element.classList.add(cssClassName_PRIMARY), 
            this.content && (this.element.innerHTML = this.content), this.setIconCss(), this.enableRtl && this.element.classList.add(cssClassName_RTL), 
            this.disabled ? this.controlStatus(this.disabled) : this.wireEvents(), rippleEffect(this.element, {
                selector: "." + cssClassName_BUTTON
            });
        }, Button.prototype.controlStatus = function(disabled) {
            this.element.disabled = disabled;
        }, Button.prototype.setIconCss = function() {
            if (this.iconCss) {
                var span = createElement("span", {
                    className: "e-btn-icon " + this.iconCss
                });
                this.element.textContent.trim() ? span.classList.add("e-icon-" + this.iconPosition.toLowerCase()) : this.element.classList.add(cssClassName_ICONBTN);
                var node = this.element.childNodes[0];
                node && "Left" === this.iconPosition ? this.element.insertBefore(span, node) : this.element.appendChild(span);
            }
        }, Button.prototype.wireEvents = function() {
            this.isToggle && EventHandler.add(this.element, "click", this.btnClickHandler, this);
        }, Button.prototype.unWireEvents = function() {
            this.isToggle && EventHandler.remove(this.element, "click", this.btnClickHandler);
        }, Button.prototype.btnClickHandler = function() {
            this.element.classList.contains("e-active") ? this.element.classList.remove("e-active") : this.element.classList.add("e-active");
        }, Button.prototype.destroy = function() {
            var span, element = this.element;
            _super.prototype.destroy.call(this), removeClass([ this.element ], [ cssClassName_PRIMARY, cssClassName_RTL, cssClassName_ICONBTN, "e-success", "e-info", "e-danger", "e-warning", "e-flat", "e-outline", "e-small", "e-bigger", "e-active", "e-round" ]), 
            [ "e-ripple", "disabled" ].forEach(function(value) {
                element.removeAttribute(value);
            }), this.content && (element.innerHTML = element.innerHTML.replace(this.content, "")), 
            (span = element.querySelector("span.e-btn-icon")) && detach(span), this.unWireEvents();
        }, Button.prototype.getModuleName = function() {
            return "btn";
        }, Button.prototype.getPersistData = function() {
            return this.addOnPersist([]);
        }, Button.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "isPrimary":
                    newProp.isPrimary ? this.element.classList.add(cssClassName_PRIMARY) : this.element.classList.remove(cssClassName_PRIMARY);
                    break;

                  case "disabled":
                    this.controlStatus(newProp.disabled), this.unWireEvents();
                    break;

                  case "iconCss":
                    var span = this.element.querySelector("span.e-btn-icon");
                    span ? (span.className = "e-btn-icon " + newProp.iconCss, this.element.textContent.trim() && ("Left" === this.iconPosition ? span.classList.add("e-icon-left") : span.classList.add("e-icon-right"))) : this.setIconCss();
                    break;

                  case "iconPosition":
                    (span = this.element.querySelector("span.e-btn-icon")) && detach(span), this.setIconCss();
                    break;

                  case "cssClass":
                    oldProp.cssClass && removeClass([ this.element ], oldProp.cssClass.split(" ")), 
                    addClass([ this.element ], newProp.cssClass.split(" "));
                    break;

                  case "enableRtl":
                    newProp.enableRtl ? this.element.classList.add(cssClassName_RTL) : this.element.classList.remove(cssClassName_RTL);
                    break;

                  case "content":
                    getTextNode(this.element) || this.element.classList.remove(cssClassName_ICONBTN), 
                    this.element.innerHTML = newProp.content, this.setIconCss();
                    break;

                  case "isToggle":
                    newProp.isToggle ? EventHandler.add(this.element, "click", this.btnClickHandler, this) : (EventHandler.remove(this.element, "click", this.btnClickHandler), 
                    removeClass([ this.element ], [ "e-active" ]));
                }
            }
        }, __decorate$5$1([ Property("Left") ], Button.prototype, "iconPosition", void 0), 
        __decorate$5$1([ Property("") ], Button.prototype, "iconCss", void 0), __decorate$5$1([ Property(!1) ], Button.prototype, "disabled", void 0), 
        __decorate$5$1([ Property(!1) ], Button.prototype, "isPrimary", void 0), __decorate$5$1([ Property("") ], Button.prototype, "cssClass", void 0), 
        __decorate$5$1([ Property("") ], Button.prototype, "content", void 0), __decorate$5$1([ Property(!1) ], Button.prototype, "isToggle", void 0), 
        Button = __decorate$5$1([ NotifyPropertyChanges ], Button);
    }(Component), __extends$1$3 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$1$3 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, RIPPLE = "e-ripple-container", WRAPPER = "e-checkbox-wrapper", CheckBox = function(_super) {
        function CheckBox(options, element) {
            var _this = _super.call(this, options, element) || this;
            return _this.isKeyPressed = !1, _this;
        }
        return __extends$1$3(CheckBox, _super), CheckBox.prototype.changeState = function(state) {
            var ariaState, rippleSpan, frameSpan = this.getWrapper().getElementsByClassName("e-frame")[0];
            isRippleEnabled && (rippleSpan = this.getWrapper().getElementsByClassName(RIPPLE)[0]), 
            "check" === state ? (frameSpan.classList.remove("e-stop"), frameSpan.classList.add("e-check"), 
            rippleSpan && (rippleSpan.classList.remove("e-ripple-stop"), rippleSpan.classList.add("e-ripple-check")), 
            ariaState = "true", this.element.checked = !0) : "uncheck" === state ? (removeClass([ frameSpan ], [ "e-check", "e-stop" ]), 
            rippleSpan && removeClass([ rippleSpan ], [ "e-ripple-check", "e-ripple-stop" ]), 
            ariaState = "false", this.element.checked = !1) : (frameSpan.classList.remove("e-check"), 
            frameSpan.classList.add("e-stop"), rippleSpan && (rippleSpan.classList.remove("e-ripple-check"), 
            rippleSpan.classList.add("e-ripple-stop")), ariaState = "mixed", this.element.indeterminate = !0), 
            this.getWrapper().setAttribute("aria-checked", ariaState);
        }, CheckBox.prototype.clickHandler = function(event) {
            this.focusOutHandler(), this.indeterminate ? (this.changeState(this.checked ? "check" : "uncheck"), 
            this.indeterminate = !1, this.element.indeterminate = !1) : this.checked ? (this.changeState("uncheck"), 
            this.checked = !1) : (this.changeState("check"), this.checked = !0);
            var changeEventArgs = {
                checked: this.element.checked,
                event: event
            };
            this.trigger("change", changeEventArgs);
        }, CheckBox.prototype.destroy = function() {
            var _this = this, wrapper = this.getWrapper();
            _super.prototype.destroy.call(this), this.disabled || this.unWireEvents(), "INPUT" === this.tagName ? (wrapper.parentNode.insertBefore(this.element, wrapper), 
            detach(wrapper), this.element.checked = !1, this.indeterminate && (this.element.indeterminate = !1), 
            [ "name", "value", "disabled" ].forEach(function(key) {
                _this.element.removeAttribute(key);
            })) : ([ "role", "aria-checked", "class" ].forEach(function(key) {
                wrapper.removeAttribute(key);
            }), this.element.id && wrapper.setAttribute("id", this.element.id), wrapper.innerHTML = "");
        }, CheckBox.prototype.focusHandler = function() {
            this.isKeyPressed && this.getWrapper().classList.add("e-focus");
        }, CheckBox.prototype.focusOutHandler = function() {
            this.getWrapper().classList.remove("e-focus");
        }, CheckBox.prototype.getModuleName = function() {
            return "checkbox";
        }, CheckBox.prototype.getPersistData = function() {
            return this.addOnPersist([ "checked", "indeterminate" ]);
        }, CheckBox.prototype.getWrapper = function() {
            return this.element.parentElement.parentElement;
        }, CheckBox.prototype.initialize = function() {
            this.name && this.element.setAttribute("name", this.name), this.value && this.element.setAttribute("value", this.value), 
            this.checked && this.changeState("check"), this.indeterminate && this.changeState(), 
            this.disabled && this.setDisabled();
        }, CheckBox.prototype.initWrapper = function() {
            var wrapper = this.element.parentElement;
            wrapper.classList.contains(WRAPPER) || (wrapper = createElement("div", {
                className: WRAPPER,
                attrs: {
                    role: "checkbox",
                    "aria-checked": "false"
                }
            }), this.element.parentNode.insertBefore(wrapper, this.element));
            var label = createElement("label", {
                attrs: {
                    for: this.element.id
                }
            }), frameSpan = createElement("span", {
                className: "e-icons e-frame"
            });
            if (this.enableRtl && wrapper.classList.add("e-rtl"), this.cssClass && addClass([ wrapper ], this.cssClass.split(" ")), 
            wrapper.appendChild(label), label.appendChild(this.element), label.appendChild(frameSpan), 
            isRippleEnabled) {
                var rippleSpan = createElement("span", {
                    className: RIPPLE
                });
                "Before" === this.labelPosition ? label.appendChild(rippleSpan) : label.insertBefore(rippleSpan, frameSpan), 
                rippleEffect(rippleSpan, {
                    duration: 400,
                    isCenterRipple: !0
                });
            }
            this.label && this.setText(this.label);
        }, CheckBox.prototype.keyDownHandler = function() {
            this.isKeyPressed = !0;
        }, CheckBox.prototype.labelMouseHandler = function(e) {
            rippleMouseHandler(e, this.getWrapper().getElementsByClassName(RIPPLE)[0]);
        }, CheckBox.prototype.mouseDownHandler = function() {
            this.isKeyPressed = !1;
        }, CheckBox.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var wrapper = this.getWrapper(), _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "checked":
                    this.indeterminate = !1, this.element.indeterminate = !1, this.changeState(newProp.checked ? "check" : "uncheck");
                    break;

                  case "indeterminate":
                    newProp.indeterminate ? this.changeState() : (this.element.indeterminate = !1, this.changeState(this.checked ? "check" : "uncheck"));
                    break;

                  case "disabled":
                    newProp.disabled ? (this.setDisabled(), this.unWireEvents()) : (this.element.disabled = !1, 
                    wrapper.classList.remove("e-checkbox-disabled"), wrapper.setAttribute("aria-disabled", "false"), 
                    this.wireEvents());
                    break;

                  case "cssClass":
                    oldProp.cssClass && wrapper.classList.remove(oldProp.cssClass), wrapper.classList.add(newProp.cssClass);
                    break;

                  case "enableRtl":
                    newProp.enableRtl ? wrapper.classList.add("e-rtl") : wrapper.classList.remove("e-rtl");
                    break;

                  case "label":
                    this.setText(newProp.label);
                    break;

                  case "labelPosition":
                    var label = wrapper.getElementsByClassName("e-label")[0], labelWrap = wrapper.getElementsByTagName("label")[0];
                    detach(label), "After" === newProp.labelPosition ? labelWrap.appendChild(label) : labelWrap.insertBefore(label, wrapper.getElementsByClassName("e-frame")[0]);
                    break;

                  case "name":
                    this.element.setAttribute("name", newProp.name);
                    break;

                  case "value":
                    this.element.setAttribute("value", newProp.value);
                }
            }
        }, CheckBox.prototype.preRender = function() {
            var element = this.element;
            this.tagName = this.element.tagName, element = wrapperInitialize("EJS-CHECKBOX", "checkbox", element, WRAPPER), 
            this.element = element, "checkbox" !== this.element.getAttribute("type") && this.element.setAttribute("type", "checkbox"), 
            this.element.id || (this.element.id = getUniqueID("e-" + this.getModuleName()));
        }, CheckBox.prototype.render = function() {
            this.initWrapper(), this.initialize(), this.disabled || this.wireEvents();
        }, CheckBox.prototype.setDisabled = function() {
            var wrapper = this.getWrapper();
            this.element.disabled = !0, wrapper.classList.add("e-checkbox-disabled"), wrapper.setAttribute("aria-disabled", "true");
        }, CheckBox.prototype.setText = function(text) {
            var label = this.getWrapper().getElementsByClassName("e-label")[0];
            if (label) label.textContent = text; else {
                label = createElement("span", {
                    className: "e-label",
                    innerHTML: text
                });
                var labelWrap = this.getWrapper().getElementsByTagName("label")[0];
                "Before" === this.labelPosition ? labelWrap.insertBefore(label, this.getWrapper().getElementsByClassName("e-frame")[0]) : labelWrap.appendChild(label);
            }
        }, CheckBox.prototype.unWireEvents = function() {
            var wrapper = this.getWrapper();
            EventHandler.remove(this.element, "click", this.clickHandler), EventHandler.remove(document, "keydown", this.keyDownHandler), 
            EventHandler.remove(wrapper, "mousedown", this.mouseDownHandler), EventHandler.remove(this.element, "focus", this.focusHandler), 
            EventHandler.remove(this.element, "focusout", this.focusOutHandler);
            var label = wrapper.getElementsByTagName("label")[0];
            EventHandler.remove(label, "mousedown", this.labelMouseHandler), EventHandler.remove(label, "mouseup", this.labelMouseHandler);
        }, CheckBox.prototype.wireEvents = function() {
            var wrapper = this.getWrapper();
            EventHandler.add(this.element, "click", this.clickHandler, this), EventHandler.add(document, "keydown", this.keyDownHandler, this), 
            EventHandler.add(wrapper, "mousedown", this.mouseDownHandler, this), EventHandler.add(this.element, "focus", this.focusHandler, this), 
            EventHandler.add(this.element, "focusout", this.focusOutHandler, this);
            var label = wrapper.getElementsByTagName("label")[0];
            EventHandler.add(label, "mousedown", this.labelMouseHandler, this), EventHandler.add(label, "mouseup", this.labelMouseHandler, this);
        }, __decorate$1$3([ Event() ], CheckBox.prototype, "change", void 0), __decorate$1$3([ Property(!1) ], CheckBox.prototype, "checked", void 0), 
        __decorate$1$3([ Property("") ], CheckBox.prototype, "cssClass", void 0), __decorate$1$3([ Property(!1) ], CheckBox.prototype, "disabled", void 0), 
        __decorate$1$3([ Property(!1) ], CheckBox.prototype, "indeterminate", void 0), __decorate$1$3([ Property("") ], CheckBox.prototype, "label", void 0), 
        __decorate$1$3([ Property("After") ], CheckBox.prototype, "labelPosition", void 0), 
        __decorate$1$3([ Property("") ], CheckBox.prototype, "name", void 0), __decorate$1$3([ Property("") ], CheckBox.prototype, "value", void 0), 
        CheckBox = __decorate$1$3([ NotifyPropertyChanges ], CheckBox);
    }(Component), __extends$2$3 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$2$3 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, RadioButton = function(_super) {
        function RadioButton(options, element) {
            var _this = _super.call(this, options, element) || this;
            return _this.isKeyPressed = !1, _this;
        }
        return __extends$2$3(RadioButton, _super), RadioButton_1 = RadioButton, RadioButton.prototype.changeHandler = function(event) {
            this.checked = !0, this.dataBind();
            var changeEventArgs = {
                value: this.value,
                event: event
            };
            this.trigger("change", changeEventArgs);
        }, RadioButton.prototype.updateChange = function(state) {
            for (var input, name = this.element.getAttribute("name"), radioGrp = document.querySelectorAll('input.e-radio[name="' + name + '"]'), i = 0; i < radioGrp.length; i++) (input = radioGrp[i]) !== this.element && (getInstance(input, RadioButton_1).checked = !1);
        }, RadioButton.prototype.destroy = function() {
            var _this = this, radioWrap = this.element.parentElement;
            _super.prototype.destroy.call(this), this.disabled || this.unWireEvents(), "INPUT" === this.tagName ? (radioWrap.parentNode.insertBefore(this.element, radioWrap), 
            detach(radioWrap), this.element.checked = !1, [ "name", "value", "disabled" ].forEach(function(key) {
                _this.element.removeAttribute(key);
            })) : ([ "role", "aria-checked", "class" ].forEach(function(key) {
                radioWrap.removeAttribute(key);
            }), this.element.id && radioWrap.setAttribute("id", this.element.id), radioWrap.innerHTML = "");
        }, RadioButton.prototype.focusHandler = function() {
            this.isKeyPressed && this.getLabel().classList.add("e-focus");
        }, RadioButton.prototype.focusOutHandler = function() {
            this.getLabel().classList.remove("e-focus");
        }, RadioButton.prototype.getModuleName = function() {
            return "radio";
        }, RadioButton.prototype.getPersistData = function() {
            return this.addOnPersist([ "checked" ]);
        }, RadioButton.prototype.getLabel = function() {
            return this.element.nextElementSibling;
        }, RadioButton.prototype.initialize = function() {
            this.initWrapper(), this.name && this.element.setAttribute("name", this.name), this.value && this.element.setAttribute("value", this.value), 
            this.checked && (this.element.checked = !0), this.disabled && this.setDisabled();
        }, RadioButton.prototype.initWrapper = function() {
            var rippleSpan, wrapper = this.element.parentElement;
            wrapper.classList.contains("e-radio-wrapper") || (wrapper = createElement("div", {
                className: "e-radio-wrapper"
            }), this.element.parentNode.insertBefore(wrapper, this.element));
            var label = createElement("label", {
                attrs: {
                    for: this.element.id
                }
            });
            wrapper.appendChild(this.element), wrapper.appendChild(label), isRippleEnabled && (rippleSpan = createElement("span", {
                className: "e-ripple-container"
            }), label.appendChild(rippleSpan), rippleEffect(rippleSpan, {
                duration: 400,
                isCenterRipple: !0
            })), this.enableRtl && label.classList.add("e-rtl"), this.cssClass && addClass([ label ], this.cssClass.split(" ")), 
            this.label && this.setText(this.label);
        }, RadioButton.prototype.keyDownHandler = function() {
            this.isKeyPressed = !0;
        }, RadioButton.prototype.labelRippleHandler = function(e) {
            rippleMouseHandler(e, this.getLabel().getElementsByClassName("e-ripple-container")[0]);
        }, RadioButton.prototype.mouseDownHandler = function() {
            this.isKeyPressed = !1;
        }, RadioButton.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var label = this.getLabel(), _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "checked":
                    newProp.checked && this.updateChange(newProp.checked), this.element.checked = newProp.checked;
                    break;

                  case "disabled":
                    newProp.disabled ? (this.setDisabled(), this.unWireEvents()) : (this.element.disabled = !1, 
                    this.wireEvents());
                    break;

                  case "cssClass":
                    oldProp.cssClass && removeClass([ label ], oldProp.cssClass.split(" ")), addClass([ label ], newProp.cssClass.split(" "));
                    break;

                  case "enableRtl":
                    newProp.enableRtl ? label.classList.add("e-rtl") : label.classList.remove("e-rtl");
                    break;

                  case "label":
                    this.setText(newProp.label);
                    break;

                  case "labelPosition":
                    "Before" === newProp.labelPosition ? label.classList.add("e-right") : label.classList.remove("e-right");
                    break;

                  case "name":
                    this.element.setAttribute("name", newProp.name);
                    break;

                  case "value":
                    this.element.setAttribute("value", newProp.value);
                }
            }
        }, RadioButton.prototype.preRender = function() {
            var element = this.element;
            this.tagName = this.element.tagName, element = wrapperInitialize("EJS-RADIOBUTTON", "radio", element, "e-radio-wrapper"), 
            this.element = element, "radio" !== this.element.getAttribute("type") && this.element.setAttribute("type", "radio"), 
            this.element.id || (this.element.id = getUniqueID("e-" + this.getModuleName()));
        }, RadioButton.prototype.render = function() {
            this.initialize(), this.disabled || this.wireEvents();
        }, RadioButton.prototype.setDisabled = function() {
            this.element.disabled = !0;
        }, RadioButton.prototype.setText = function(text) {
            var label = this.getLabel(), textLabel = label.getElementsByClassName("e-label")[0];
            textLabel ? textLabel.textContent = text : (textLabel = createElement("span", {
                className: "e-label",
                innerHTML: text
            }), label.appendChild(textLabel)), "Before" === this.labelPosition ? this.getLabel().classList.add("e-right") : this.getLabel().classList.remove("e-right");
        }, RadioButton.prototype.unWireEvents = function() {
            var label = this.getLabel();
            EventHandler.remove(this.element, "change", this.changeHandler), EventHandler.remove(document, "keydown", this.keyDownHandler), 
            EventHandler.remove(label, "mousedown", this.mouseDownHandler), EventHandler.remove(this.element, "focus", this.focusHandler), 
            EventHandler.remove(this.element, "focusout", this.focusOutHandler);
            var rippleLabel = label.getElementsByClassName("e-label")[0];
            rippleLabel && (EventHandler.remove(rippleLabel, "mousedown", this.labelRippleHandler), 
            EventHandler.remove(rippleLabel, "mouseup", this.labelRippleHandler));
        }, RadioButton.prototype.wireEvents = function() {
            var label = this.getLabel();
            EventHandler.add(this.element, "change", this.changeHandler, this), EventHandler.add(document, "keydown", this.keyDownHandler, this), 
            EventHandler.add(label, "mousedown", this.mouseDownHandler, this), EventHandler.add(this.element, "focus", this.focusHandler, this), 
            EventHandler.add(this.element, "focusout", this.focusOutHandler, this);
            var rippleLabel = label.getElementsByClassName("e-label")[0];
            rippleLabel && (EventHandler.add(rippleLabel, "mousedown", this.labelRippleHandler, this), 
            EventHandler.add(rippleLabel, "mouseup", this.labelRippleHandler, this));
        }, __decorate$2$3([ Event() ], RadioButton.prototype, "change", void 0), __decorate$2$3([ Property(!1) ], RadioButton.prototype, "checked", void 0), 
        __decorate$2$3([ Property("") ], RadioButton.prototype, "cssClass", void 0), __decorate$2$3([ Property(!1) ], RadioButton.prototype, "disabled", void 0), 
        __decorate$2$3([ Property("") ], RadioButton.prototype, "label", void 0), __decorate$2$3([ Property("After") ], RadioButton.prototype, "labelPosition", void 0), 
        __decorate$2$3([ Property("") ], RadioButton.prototype, "name", void 0), __decorate$2$3([ Property("") ], RadioButton.prototype, "value", void 0), 
        RadioButton = RadioButton_1 = __decorate$2$3([ NotifyPropertyChanges ], RadioButton);
        var RadioButton_1;
    }(Component), _buttons = Object.freeze({
        wrapperInitialize: wrapperInitialize,
        getTextNode: getTextNode,
        createCheckBox: createCheckBox,
        rippleMouseHandler: rippleMouseHandler,
        Button: Button,
        CheckBox: CheckBox,
        RadioButton: RadioButton
    }), fixedParent = !1, __extends$4$1 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$4$1 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, PositionData = function(_super) {
        function PositionData() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$4$1(PositionData, _super), __decorate$4$1([ Property("left") ], PositionData.prototype, "X", void 0), 
        __decorate$4$1([ Property("top") ], PositionData.prototype, "Y", void 0), PositionData;
    }(ChildProperty), CLASSNAMES_ROOT = "e-popup", CLASSNAMES_RTL = "e-rtl", CLASSNAMES_OPEN = "e-popup-open", CLASSNAMES_CLOSE = "e-popup-close", Popup = function(_super) {
        function Popup(element, options) {
            var _this = _super.call(this, options, element) || this;
            return _this.fixedParent = !1, _this;
        }
        return __extends$4$1(Popup, _super), Popup.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "width":
                    setStyleAttribute(this.element, {
                        width: formatUnit(newProp.width)
                    });
                    break;

                  case "height":
                    setStyleAttribute(this.element, {
                        height: formatUnit(newProp.height)
                    });
                    break;

                  case "zIndex":
                    setStyleAttribute(this.element, {
                        zIndex: newProp.zIndex
                    });
                    break;

                  case "enableRtl":
                    this.setEnableRtl();
                    break;

                  case "position":
                  case "relateTo":
                    this.refreshPosition();
                    break;

                  case "offsetX":
                    var x = newProp.offsetX - oldProp.offsetX;
                    this.element.style.left = (parseInt(this.element.style.left, 10) + x).toString() + "px";
                    break;

                  case "offsetY":
                    var y = newProp.offsetY - oldProp.offsetY;
                    this.element.style.top = (parseInt(this.element.style.top, 10) + y).toString() + "px";
                    break;

                  case "content":
                    this.setContent();
                    break;

                  case "actionOnScroll":
                    "none" !== newProp.actionOnScroll ? this.wireScrollEvents() : this.unwireScrollEvents();
                }
            }
        }, Popup.prototype.getModuleName = function() {
            return "popup";
        }, Popup.prototype.getPersistData = function() {
            return this.addOnPersist([]);
        }, Popup.prototype.destroy = function() {
            this.element.classList.remove(CLASSNAMES_ROOT, CLASSNAMES_RTL), this.unwireEvents(), 
            _super.prototype.destroy.call(this);
        }, Popup.prototype.render = function() {
            this.element.classList.add(CLASSNAMES_ROOT);
            var styles = {};
            1e3 !== this.zIndex && (styles.zIndex = this.zIndex), "auto" !== this.width && (styles.width = formatUnit(this.width)), 
            "auto" !== this.height && (styles.height = formatUnit(this.height)), setStyleAttribute(this.element, styles), 
            this.setEnableRtl(), this.setContent(), this.wireEvents();
        }, Popup.prototype.wireEvents = function() {
            Browser.isDevice && EventHandler.add(window, "orientationchange", this.orientationOnChange, this), 
            "none" !== this.actionOnScroll && this.wireScrollEvents();
        }, Popup.prototype.wireScrollEvents = function() {
            if (this.getRelateToElement()) for (var _i = 0, _a = this.getScrollableParent(this.getRelateToElement()); _i < _a.length; _i++) {
                var parent_1 = _a[_i];
                EventHandler.add(parent_1, "scroll", this.scrollRefresh, this);
            }
        }, Popup.prototype.unwireEvents = function() {
            Browser.isDevice && EventHandler.remove(window, "orientationchange", this.orientationOnChange), 
            "none" !== this.actionOnScroll && this.unwireScrollEvents();
        }, Popup.prototype.unwireScrollEvents = function() {
            if (this.getRelateToElement()) for (var _i = 0, _a = this.getScrollableParent(this.getRelateToElement()); _i < _a.length; _i++) {
                var parent_2 = _a[_i];
                EventHandler.remove(parent_2, "scroll", this.scrollRefresh);
            }
        }, Popup.prototype.getRelateToElement = function() {
            var relateToElement = "" === this.relateTo ? document.body : this.relateTo;
            return this.setProperties({
                relateTo: relateToElement
            }, !0), "string" == typeof this.relateTo ? document.querySelector(this.relateTo) : this.relateTo;
        }, Popup.prototype.scrollRefresh = function(e) {
            if ("reposition" === this.actionOnScroll ? this.element.offsetParent === e.target || this.element.offsetParent && "BODY" === this.element.offsetParent.tagName && null == e.target.parentElement || this.refreshPosition() : "hide" === this.actionOnScroll && this.hide(), 
            "none" !== this.actionOnScroll && this.getRelateToElement()) {
                var targetVisible = this.isElementOnViewport(this.getRelateToElement(), e.target);
                targetVisible || this.targetInvisibleStatus ? targetVisible && (this.targetInvisibleStatus = !1) : (this.trigger("targetExitViewport"), 
                this.targetInvisibleStatus = !0);
            }
        }, Popup.prototype.isElementOnViewport = function(relateToElement, scrollElement) {
            for (var scrollParents = this.getScrollableParent(relateToElement), parent_3 = 0; parent_3 < scrollParents.length; parent_3++) if (!this.isElementVisible(relateToElement, scrollParents[parent_3])) return !1;
            return !0;
        }, Popup.prototype.isElementVisible = function(relateToElement, scrollElement) {
            var rect = relateToElement.getBoundingClientRect();
            if (!rect.height || !rect.width) return !1;
            if (scrollElement.getBoundingClientRect) {
                var parent_4 = scrollElement.getBoundingClientRect();
                return !(rect.bottom < parent_4.top || rect.bottom > parent_4.bottom || rect.right > parent_4.right || rect.left < parent_4.left);
            }
            var win = window, windowView_top = win.scrollY, windowView_left = win.scrollX, windowView_right = win.scrollX + win.outerWidth, windowView_bottom = win.scrollY + win.outerHeight, off = calculatePosition(relateToElement), ele_top = off.top, ele_left = off.left, ele_right = off.left + rect.width, ele_bottom = off.top + rect.height;
            return windowView_bottom - ele_top > 0 && windowView_right - ele_left > 0 && ele_right - windowView_left > 0 && ele_bottom - windowView_top > 0;
        }, Popup.prototype.preRender = function() {}, Popup.prototype.setEnableRtl = function() {
            this.reposition(), this.enableRtl ? this.element.classList.add(CLASSNAMES_RTL) : this.element.classList.remove(CLASSNAMES_RTL);
        }, Popup.prototype.setContent = function() {
            isNullOrUndefined(this.content) || (this.element.innerHTML = "", "string" == typeof this.content ? this.element.textContent = this.content : this.element.appendChild(this.content));
        }, Popup.prototype.orientationOnChange = function() {
            var _this = this;
            setTimeout(function() {
                _this.refreshPosition();
            }, 200);
        }, Popup.prototype.refreshPosition = function(target) {
            isNullOrUndefined(target) || this.checkFixedParent(target), this.reposition(), this.checkCollision();
        }, Popup.prototype.reposition = function() {
            var pos, relateToElement = this.getRelateToElement();
            if ("number" == typeof this.position.X && "number" == typeof this.position.Y) pos = {
                left: this.position.X,
                top: this.position.Y
            }; else if (relateToElement) {
                var display = this.element.style.display;
                this.element.style.display = "block", pos = this.getAnchorPosition(relateToElement, this.element, this.position, this.offsetX, this.offsetY), 
                this.element.style.display = display;
            } else pos = {
                left: 0,
                top: 0
            };
            this.element.style.left = pos.left + "px", this.element.style.top = pos.top + "px";
        }, Popup.prototype.getAnchorPosition = function(anchorEle, ele, position, offsetX, offsetY) {
            var eleRect = ele.getBoundingClientRect(), anchorRect = anchorEle.getBoundingClientRect(), anchor = anchorEle, anchorPos = {
                left: 0,
                top: 0
            };
            switch (anchorPos = ele.offsetParent && "BODY" === ele.offsetParent.tagName && "BODY" === anchorEle.tagName ? calculatePosition(anchorEle) : calculateRelativeBasedPosition(anchor, ele), 
            position.X) {
              default:
              case "left":
                break;

              case "center":
                "container" === this.targetType ? anchorPos.left += anchorRect.width / 2 - eleRect.width / 2 : anchorPos.left += anchorRect.width / 2;
                break;

              case "right":
                "container" === this.targetType ? anchorPos.left += anchorRect.width - eleRect.width : anchorPos.left += anchorRect.width;
            }
            switch (position.Y) {
              default:
              case "top":
                break;

              case "center":
                "container" === this.targetType ? anchorPos.top += anchorRect.height / 2 - eleRect.height / 2 : anchorPos.top += anchorRect.height / 2;
                break;

              case "bottom":
                "container" === this.targetType ? anchorPos.top += anchorRect.height - eleRect.height : anchorPos.top += anchorRect.height;
            }
            return anchorPos.left += offsetX, anchorPos.top += offsetY, anchorPos;
        }, Popup.prototype.callFlip = function(param) {
            var relateToElement = this.getRelateToElement();
            flip(this.element, relateToElement, this.offsetX, this.offsetY, this.position.X, this.position.Y, this.viewPortElement, param, this.fixedParent);
        }, Popup.prototype.callFit = function(param) {
            if (0 !== isCollide(this.element, this.viewPortElement).length) {
                var data = fit(this.element, this.viewPortElement, param);
                this.element.style.left = data.left + "px", this.element.style.top = data.top + "px";
            }
        }, Popup.prototype.checkCollision = function() {
            var horz = this.collision.X, vert = this.collision.Y;
            "none" === horz && "none" === vert || ("flip" === horz && "flip" === vert ? this.callFlip({
                X: !0,
                Y: !0
            }) : "fit" === horz && "fit" === vert ? this.callFit({
                X: !0,
                Y: !0
            }) : ("fit" === horz ? this.callFit({
                X: !0,
                Y: !1
            }) : "fit" === vert && this.callFit({
                X: !1,
                Y: !0
            }), "flip" === horz ? this.callFlip({
                X: !0,
                Y: !1
            }) : "flip" === vert && this.callFlip({
                Y: !0,
                X: !1
            })));
        }, Popup.prototype.show = function(animationOptions) {
            var _this = this;
            1e3 === this.zIndex && (this.zIndex = getZindexPartial(this.element), setStyleAttribute(this.element, {
                zIndex: this.zIndex
            })), animationOptions = isNullOrUndefined(animationOptions) || "object" != typeof animationOptions ? this.showAnimation : animationOptions, 
            "none" === this.collision.X && "none" === this.collision.Y || (removeClass([ this.element ], CLASSNAMES_CLOSE), 
            addClass([ this.element ], CLASSNAMES_OPEN), this.checkCollision(), removeClass([ this.element ], CLASSNAMES_OPEN), 
            addClass([ this.element ], CLASSNAMES_CLOSE)), isNullOrUndefined(animationOptions) ? (removeClass([ this.element ], CLASSNAMES_CLOSE), 
            addClass([ this.element ], CLASSNAMES_OPEN), this.trigger("open")) : (animationOptions.begin = function() {
                _this.isDestroyed || (removeClass([ _this.element ], CLASSNAMES_CLOSE), addClass([ _this.element ], CLASSNAMES_OPEN));
            }, animationOptions.end = function() {
                _this.isDestroyed || _this.trigger("open");
            }, new Animation(animationOptions).animate(this.element));
        }, Popup.prototype.hide = function(animationOptions) {
            var _this = this;
            isNullOrUndefined(animationOptions = isNullOrUndefined(animationOptions) || "object" != typeof animationOptions ? this.hideAnimation : animationOptions) ? (removeClass([ this.element ], CLASSNAMES_OPEN), 
            addClass([ this.element ], CLASSNAMES_CLOSE), this.trigger("close")) : (animationOptions.end = function() {
                _this.isDestroyed || (removeClass([ _this.element ], CLASSNAMES_OPEN), addClass([ _this.element ], CLASSNAMES_CLOSE), 
                _this.trigger("close"));
            }, new Animation(animationOptions).animate(this.element));
        }, Popup.prototype.getScrollableParent = function(element) {
            return this.checkFixedParent(element), getScrollableParent(element, this.fixedParent);
        }, Popup.prototype.checkFixedParent = function(element) {
            for (var parent = element.parentElement; parent && "HTML" !== parent.tagName; ) {
                var parentStyle = getComputedStyle(parent);
                "fixed" === parentStyle.position && this.element.offsetParent && "BODY" === this.element.offsetParent.tagName && (this.element.style.position = "fixed", 
                this.fixedParent = !0), parent = parent.parentElement, isNullOrUndefined(this.element.offsetParent) && "fixed" === parentStyle.position && "fixed" === this.element.style.position && (this.fixedParent = !0);
            }
        }, __decorate$4$1([ Property("auto") ], Popup.prototype, "height", void 0), __decorate$4$1([ Property("auto") ], Popup.prototype, "width", void 0), 
        __decorate$4$1([ Property(null) ], Popup.prototype, "content", void 0), __decorate$4$1([ Property("container") ], Popup.prototype, "targetType", void 0), 
        __decorate$4$1([ Property(null) ], Popup.prototype, "viewPortElement", void 0), 
        __decorate$4$1([ Property({
            X: "none",
            Y: "none"
        }) ], Popup.prototype, "collision", void 0), __decorate$4$1([ Property("") ], Popup.prototype, "relateTo", void 0), 
        __decorate$4$1([ Complex({}, PositionData) ], Popup.prototype, "position", void 0), 
        __decorate$4$1([ Property(0) ], Popup.prototype, "offsetX", void 0), __decorate$4$1([ Property(0) ], Popup.prototype, "offsetY", void 0), 
        __decorate$4$1([ Property(1e3) ], Popup.prototype, "zIndex", void 0), __decorate$4$1([ Property(!1) ], Popup.prototype, "enableRtl", void 0), 
        __decorate$4$1([ Property("reposition") ], Popup.prototype, "actionOnScroll", void 0), 
        __decorate$4$1([ Property(null) ], Popup.prototype, "showAnimation", void 0), __decorate$4$1([ Property(null) ], Popup.prototype, "hideAnimation", void 0), 
        __decorate$4$1([ Event() ], Popup.prototype, "open", void 0), __decorate$4$1([ Event() ], Popup.prototype, "close", void 0), 
        __decorate$4$1([ Event() ], Popup.prototype, "targetExitViewport", void 0), Popup = __decorate$4$1([ NotifyPropertyChanges ], Popup);
    }(Component), __extends$1$2 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$1$2 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, ButtonProps = function(_super) {
        function ButtonProps() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$1$2(ButtonProps, _super), __decorate$1$2([ Property() ], ButtonProps.prototype, "buttonModel", void 0), 
        __decorate$1$2([ Property() ], ButtonProps.prototype, "click", void 0), ButtonProps;
    }(ChildProperty), AnimationSettings = function(_super) {
        function AnimationSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$1$2(AnimationSettings, _super), __decorate$1$2([ Property("Fade") ], AnimationSettings.prototype, "effect", void 0), 
        __decorate$1$2([ Property(400) ], AnimationSettings.prototype, "duration", void 0), 
        __decorate$1$2([ Property(0) ], AnimationSettings.prototype, "delay", void 0), AnimationSettings;
    }(ChildProperty), ROOT = "e-dialog", Dialog = function(_super) {
        function Dialog(options, element) {
            return _super.call(this, options, element) || this;
        }
        return __extends$1$2(Dialog, _super), Dialog.prototype.render = function() {
            this.initialize(), this.initRender(), this.wireEvents();
        }, Dialog.prototype.preRender = function() {
            var _this = this;
            this.headerContent = null;
            for (var classArray = [], j = 0; j < this.element.classList.length; j++) isNullOrUndefined(this.element.classList[j].match("e-control")) && isNullOrUndefined(this.element.classList[j].match(ROOT)) || classArray.push(this.element.classList[j]);
            removeClass([ this.element ], classArray), this.clonedEle = this.element.cloneNode(!0), 
            this.closeIconClickEventHandler = function(event) {
                _this.hide(), _this.closedFrom = event;
            }, this.dlgOverlayClickEventHandler = function(event) {
                _this.trigger("overlayClick", event);
            };
            this.l10n = new L10n("dialog", {
                close: "Close"
            }, this.locale);
        }, Dialog.prototype.keyDown = function(event) {
            var _this = this;
            if (9 === event.keyCode && this.isModal) {
                var buttonObj = void 0;
                isNullOrUndefined(this.btnObj) || (buttonObj = this.btnObj[this.btnObj.length - 1]), 
                isNullOrUndefined(buttonObj) || document.activeElement !== buttonObj.element || event.shiftKey || (event.preventDefault(), 
                this.focusableElements(this.element).focus()), document.activeElement === this.focusableElements(this.element) && event.shiftKey && (event.preventDefault(), 
                isNullOrUndefined(buttonObj) || buttonObj.element.focus());
            }
            var element = document.activeElement, isTagName = [ "input", "textarea" ].indexOf(element.tagName.toLowerCase()) > -1, isContentEdit = !1;
            if (isTagName || (isContentEdit = element.hasAttribute("contenteditable") && "true" === element.getAttribute("contenteditable")), 
            27 === event.keyCode && this.closeOnEscape && (this.hide(), this.closedFrom = event), 
            13 === event.keyCode && !event.ctrlKey && "textarea" !== element.tagName.toLowerCase() && isTagName && !isNullOrUndefined(this.primaryButtonEle) || 13 === event.keyCode && event.ctrlKey && ("textarea" === element.tagName.toLowerCase() || isContentEdit) && !isNullOrUndefined(this.primaryButtonEle)) {
                var buttonIndex_1;
                this.buttons.some(function(data, index) {
                    buttonIndex_1 = index;
                    var buttonModel = data.buttonModel;
                    return !isNullOrUndefined(buttonModel) && !0 === buttonModel.isPrimary;
                }) && "function" == typeof this.buttons[buttonIndex_1].click && setTimeout(function() {
                    _this.buttons[buttonIndex_1].click.call(_this, event);
                });
            }
        }, Dialog.prototype.initialize = function() {
            isNullOrUndefined(this.target) || (this.targetEle = "string" == typeof this.target ? document.querySelector(this.target) : this.target), 
            addClass([ this.element ], ROOT), Browser.isDevice && addClass([ this.element ], "e-device"), 
            this.setCSSClass(), this.setMaxHeight();
        }, Dialog.prototype.initRender = function() {
            var _this = this;
            attributes(this.element, {
                role: "dialog"
            }), 1e3 === this.zIndex && (this.zIndex = getZindexPartial(this.element)), this.setTargetContent(), 
            "" !== this.header && this.setHeader(), this.showCloseIcon && this.renderCloseIcon(), 
            isNullOrUndefined(this.content) || "" === this.content ? this.element.hasChildNodes() && (this.contentEle = this.element) : this.setContent(), 
            "" !== this.footerTemplate && this.setFooterTemplate(), isNullOrUndefined(this.buttons[0].buttonModel) || "" !== this.footerTemplate || this.setButton(), 
            !this.allowDragging || this.isModal || isNullOrUndefined(this.headerContent) || this.setAllowDragging(), 
            attributes(this.element, {
                "aria-modal": this.isModal ? "true" : "false"
            }), this.isModal && this.setIsModal(), isNullOrUndefined(this.targetEle) || (this.isModal ? this.targetEle.appendChild(this.dlgContainer) : this.targetEle.appendChild(this.element)), 
            this.popupObj = new Popup(this.element, {
                height: this.height,
                width: this.width,
                zIndex: this.zIndex,
                relateTo: this.target,
                actionOnScroll: "none",
                open: function() {
                    _this.focusContent(), _this.trigger("open");
                },
                close: function(event) {
                    _this.unBindEvent(_this.element), _this.isModal && (_this.dlgContainer.style.display = "none"), 
                    _this.trigger("close", _this.closedFrom), _this.closedFrom = {}, isNullOrUndefined(_this.storeActiveElement) || _this.storeActiveElement.focus();
                }
            }), this.positionChange(), this.setEnableRTL(), addClass([ this.element ], "e-popup-close"), 
            this.isModal && this.setOverlayZindex(), this.visible ? this.show() : this.isModal && (this.dlgOverlay.style.display = "none");
        }, Dialog.prototype.setOverlayZindex = function() {
            var zIndex = parseInt(this.element.style.zIndex, 10) ? parseInt(this.element.style.zIndex, 10) : this.zIndex;
            this.dlgOverlay.style.zIndex = (zIndex - 1).toString(), this.dlgContainer.style.zIndex = zIndex.toString();
        }, Dialog.prototype.positionChange = function() {
            this.isModal ? this.dlgContainer.classList.add("e-dlg-" + this.position.X + "-" + this.position.Y) : this.popupObj.setProperties({
                position: {
                    X: this.position.X,
                    Y: this.position.Y
                }
            });
        }, Dialog.prototype.setAllowDragging = function() {
            var _this = this;
            this.dragObj = new Draggable(this.element, {
                clone: !1,
                handle: ".e-dlg-header-content",
                dragStart: function(event) {
                    _this.trigger("dragStart", event);
                },
                dragStop: function(event) {
                    _this.trigger("dragStop", event);
                },
                drag: function(event) {
                    _this.trigger("drag", event);
                }
            }), isNullOrUndefined(this.targetEle) || (this.dragObj.dragArea = this.targetEle);
        }, Dialog.prototype.setButton = function() {
            this.buttonContent = [], this.btnObj = [];
            for (var i = 0; i < this.buttons.length; i++) {
                var btn = createElement("button", {
                    attrs: {
                        type: "button"
                    }
                });
                this.buttonContent.push(btn.outerHTML);
            }
            this.setFooterTemplate();
            for (i = 0; i < this.buttons.length; i++) this.btnObj[i] = new Button(this.buttons[i].buttonModel), 
            "function" == typeof this.buttons[i].click && EventHandler.add(this.ftrTemplateContent.children[i], "click", this.buttons[i].click, this), 
            this.btnObj[i].appendTo(this.ftrTemplateContent.children[i]), this.btnObj[i].isPrimary || this.btnObj[i].element.classList.add("e-flat"), 
            this.primaryButtonEle = this.element.getElementsByClassName("e-primary")[0];
        }, Dialog.prototype.setContent = function() {
            attributes(this.element, {
                "aria-describedby": this.element.id + "_dialog-content"
            }), this.contentEle = createElement("div", {
                className: "e-dlg-content",
                id: this.element.id + "_dialog-content"
            }), "string" == typeof this.content ? this.contentEle.innerHTML = this.content : this.contentEle.appendChild(this.content), 
            isNullOrUndefined(this.headerContent) ? this.element.insertBefore(this.contentEle, this.element.children[0]) : this.element.insertBefore(this.contentEle, this.element.children[1]), 
            "auto" === this.height && this.setMaxHeight();
        }, Dialog.prototype.setMaxHeight = function() {
            var display = this.element.style.display;
            this.element.style.display = "none", this.element.style.maxHeight = isNullOrUndefined(this.target) ? window.innerHeight - 20 + "px" : this.targetEle.offsetHeight - 20 + "px", 
            this.element.style.display = display;
        }, Dialog.prototype.setEnableRTL = function() {
            this.enableRtl ? addClass([ this.element ], "e-rtl") : removeClass([ this.element ], "e-rtl");
        }, Dialog.prototype.setTargetContent = function() {
            var isContent = "" !== this.element.innerHTML.replace(/\s/g, "");
            if (this.element.children.length > 0 || isContent) {
                for (var contentDiv = document.createDocumentFragment(); 0 !== this.element.childNodes.length; ) contentDiv.appendChild(this.element.childNodes[0]);
                this.setProperties({
                    content: contentDiv
                }, !0);
            }
        }, Dialog.prototype.setHeader = function() {
            this.headerEle = createElement("div", {
                id: this.element.id + "_title",
                className: "e-dlg-header",
                innerHTML: this.header
            }), attributes(this.element, {
                "aria-labelledby": this.element.id + "_title"
            }), this.createHeaderContent(), this.headerContent.appendChild(this.headerEle), 
            this.element.insertBefore(this.headerContent, this.element.children[0]);
        }, Dialog.prototype.setFooterTemplate = function() {
            this.ftrTemplateContent = createElement("div", {
                className: "e-footer-content",
                innerHTML: "" !== this.footerTemplate ? this.footerTemplate : this.buttonContent.join("")
            }), this.element.appendChild(this.ftrTemplateContent);
        }, Dialog.prototype.createHeaderContent = function() {
            isNullOrUndefined(this.headerContent) && (this.headerContent = createElement("div", {
                className: "e-dlg-header-content"
            }));
        }, Dialog.prototype.renderCloseIcon = function() {
            this.closeIcon = createElement("button", {
                className: "e-dlg-closeicon-btn",
                attrs: {
                    type: "button"
                }
            }), this.closeIconBtnObj = new Button({
                cssClass: "e-flat",
                iconCss: "e-icon-dlg-close e-icons"
            }), this.closeIconTitle(), isNullOrUndefined(this.headerContent) ? (this.createHeaderContent(), 
            prepend([ this.closeIcon ], this.headerContent), this.element.insertBefore(this.headerContent, this.element.children[0])) : prepend([ this.closeIcon ], this.headerContent), 
            this.closeIconBtnObj.appendTo(this.closeIcon);
        }, Dialog.prototype.closeIconTitle = function() {
            this.l10n.setLocale(this.locale);
            var closeIconTitle = this.l10n.getConstant("close");
            this.closeIcon.setAttribute("title", closeIconTitle);
        }, Dialog.prototype.setCSSClass = function(oldCSSClass) {
            this.cssClass && addClass([ this.element ], this.cssClass.split(" ")), oldCSSClass && removeClass([ this.element ], oldCSSClass.split(" "));
        }, Dialog.prototype.setIsModal = function() {
            this.dlgContainer = createElement("div", {
                className: "e-dlg-container"
            }), this.element.parentNode.insertBefore(this.dlgContainer, this.element), this.dlgContainer.appendChild(this.element), 
            addClass([ this.element ], "e-dlg-modal"), this.dlgOverlay = createElement("div", {
                className: "e-dlg-overlay"
            }), this.dlgOverlay.style.zIndex = (this.zIndex - 1).toString(), this.dlgContainer.appendChild(this.dlgOverlay);
        }, Dialog.prototype.getValidFocusNode = function(items) {
            for (var node, u = 0; u < items.length; u++) if (((node = items[u]).clientHeight > 0 || "a" === node.tagName.toLowerCase() && node.hasAttribute("href")) && node.tabIndex > -1 && !node.disabled && !this.disableElement(node, '[disabled],[aria-disabled="true"],[type="hidden"]')) return node;
            return node;
        }, Dialog.prototype.focusableElements = function(content) {
            if (!isNullOrUndefined(content)) {
                var items = content.querySelectorAll('input,select,textarea,button,a,[contenteditable="true"],[tabindex]');
                return this.getValidFocusNode(items);
            }
            return null;
        }, Dialog.prototype.getAutoFocusNode = function(container) {
            var node = container.querySelector(".e-dlg-closeicon-btn"), items = container.querySelectorAll("[autofocus]"), validNode = this.getValidFocusNode(items);
            if (isNullOrUndefined(validNode)) {
                if (validNode = this.focusableElements(this.contentEle), !isNullOrUndefined(validNode)) return node = validNode;
                if (!isNullOrUndefined(this.primaryButtonEle)) return this.element.querySelector(".e-primary");
            } else node = validNode;
            return node;
        }, Dialog.prototype.disableElement = function(element, t) {
            var elementMatch = element ? element.matches || element.webkitMatchesSelector || element.msMatchesSelector : null;
            if (elementMatch) for (;element; element = element.parentNode) if (element instanceof Element && elementMatch.call(element, t)) return element;
            return null;
        }, Dialog.prototype.focusContent = function() {
            var element = this.getAutoFocusNode(this.element);
            (isNullOrUndefined(element) ? this.element : element).focus(), this.bindEvent(this.element);
        }, Dialog.prototype.bindEvent = function(element) {
            EventHandler.add(element, "keydown", this.keyDown, this);
        }, Dialog.prototype.unBindEvent = function(element) {
            EventHandler.remove(element, "keydown", this.keyDown);
        }, Dialog.prototype.getModuleName = function() {
            return "dialog";
        }, Dialog.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "content":
                    isNullOrUndefined(this.content) || "" === this.content ? isNullOrUndefined(this.contentEle) || this.element.removeChild(this.contentEle) : isNullOrUndefined(this.contentEle) || "dialog" === this.contentEle.getAttribute("role") ? this.setContent() : (this.contentEle.innerHTML = "", 
                    "string" == typeof this.content ? this.contentEle.innerHTML = this.content : this.contentEle.appendChild(this.content), 
                    this.setMaxHeight());
                    break;

                  case "header":
                    "" === this.header ? detach(this.headerEle) : this.element.getElementsByClassName("e-dlg-header").length > 0 ? this.element.getElementsByClassName("e-dlg-header")[0].innerHTML = this.header : this.setHeader();
                    break;

                  case "footerTemplate":
                    this.element.getElementsByClassName("e-footer-content").length > 0 ? this.ftrTemplateContent.innerHTML = this.footerTemplate : this.setFooterTemplate();
                    break;

                  case "showCloseIcon":
                    this.element.getElementsByClassName("e-icon-dlg-close").length > 0 ? this.showCloseIcon || "" !== this.header ? this.showCloseIcon || detach(this.closeIcon) : detach(this.headerContent) : (this.renderCloseIcon(), 
                    this.wireEvents());
                    break;

                  case "locale":
                    this.showCloseIcon && this.closeIconTitle();
                    break;

                  case "visible":
                    this.visible ? this.show() : this.hide();
                    break;

                  case "isModal":
                    if (this.element.setAttribute("aria-modal", this.isModal ? "true" : "false"), this.isModal) this.setIsModal(), 
                    this.wireEvents(), isNullOrUndefined(this.targetEle) || (this.isModal ? this.targetEle.appendChild(this.dlgContainer) : this.targetEle.appendChild(this.element)); else {
                        for (removeClass([ this.element ], "e-dlg-modal"), removeClass([ document.body ], "e-scroll-disabled"), 
                        detach(this.dlgOverlay); this.dlgContainer.firstChild; ) this.dlgContainer.parentElement.insertBefore(this.dlgContainer.firstChild, this.dlgContainer);
                        this.dlgContainer.parentElement.removeChild(this.dlgContainer);
                    }
                    break;

                  case "height":
                    setStyleAttribute(this.element, {
                        height: formatUnit(newProp.height)
                    });
                    break;

                  case "width":
                    setStyleAttribute(this.element, {
                        width: formatUnit(newProp.width)
                    });
                    break;

                  case "zIndex":
                    this.popupObj.zIndex = this.zIndex, this.isModal && this.setOverlayZindex();
                    break;

                  case "cssClass":
                    this.setCSSClass(oldProp.cssClass);
                    break;

                  case "animationSettings":
                    this.show();
                    break;

                  case "buttons":
                    isNullOrUndefined(this.buttons[0].buttonModel) || "" !== this.footerTemplate || (isNullOrUndefined(this.ftrTemplateContent) || detach(this.ftrTemplateContent), 
                    this.setButton());
                    break;

                  case "allowDragging":
                    !this.allowDragging || this.isModal || isNullOrUndefined(this.headerContent) ? this.dragObj.destroy() : this.setAllowDragging();
                    break;

                  case "target":
                    this.popupObj.relateTo = newProp.target;
                    break;

                  case "position":
                    if (oldProp.position.X === this.position.X && oldProp.position.Y === this.position.Y) break;
                    if (!this.isModal) {
                        this.popupObj.position.X = this.position.X, this.popupObj.position.Y = this.position.Y;
                        break;
                    }
                    this.dlgContainer.classList.remove("e-dlg-" + oldProp.position.X + "-" + oldProp.position.Y), 
                    this.dlgContainer.classList.add("e-dlg-" + this.position.X + "-" + this.position.Y);
                    break;

                  case "enableRtl":
                    this.setEnableRTL();
                }
            }
        }, Dialog.prototype.getPersistData = function() {
            return this.addOnPersist([]);
        }, Dialog.prototype.destroy = function() {
            if (this.element.classList.contains(ROOT)) {
                this.unWireEvents(), _super.prototype.destroy.call(this);
                var classArray = [ ROOT, "e-rtl", "e-dlg-modal" ];
                if (removeClass([ this.element, this.element ], classArray), this.popupObj.element.classList.contains("e-popup") && this.popupObj.destroy(), 
                !isNullOrUndefined(this.btnObj)) for (var i = void 0; i < this.btnObj.length; i++) this.btnObj[i].destroy();
                for (this.isModal && (detach(this.dlgOverlay), this.dlgContainer.parentNode.insertBefore(this.element, this.dlgContainer), 
                detach(this.dlgContainer)), this.element.innerHTML = ""; this.element.attributes.length > 0; ) this.element.removeAttribute(this.element.attributes[0].name);
                for (var k = 0; k < this.clonedEle.attributes.length; k++) this.element.setAttribute(this.clonedEle.attributes[k].name, this.clonedEle.attributes[k].value);
            }
        }, Dialog.prototype.wireEvents = function() {
            this.showCloseIcon && EventHandler.add(this.closeIcon, "click", this.closeIconClickEventHandler, this), 
            this.isModal && EventHandler.add(this.dlgOverlay, "click", this.dlgOverlayClickEventHandler, this);
        }, Dialog.prototype.unWireEvents = function() {
            if (this.showCloseIcon && EventHandler.remove(this.closeIcon, "click", this.closeIconClickEventHandler), 
            this.isModal && EventHandler.remove(this.dlgOverlay, "click", this.dlgOverlayClickEventHandler), 
            !isNullOrUndefined(this.buttons[0].buttonModel)) for (var i = 0; i < this.buttons.length; i++) "function" == typeof this.buttons[i].click && EventHandler.remove(this.ftrTemplateContent.children[i], "click", this.buttons[i].click);
        }, Dialog.prototype.refreshPosition = function() {
            this.popupObj.refreshPosition();
        }, Dialog.prototype.show = function(isFullScreen) {
            if (!this.element.classList.contains("e-popup-open") || !isNullOrUndefined(isFullScreen)) {
                isNullOrUndefined(isFullScreen) || this.fullScreen(isFullScreen);
                var eventArgs = {
                    cancel: !1,
                    container: this.isModal ? this.dlgContainer : this.element
                };
                if (this.trigger("beforeOpen", eventArgs), eventArgs.cancel) return;
                this.storeActiveElement = document.activeElement, this.element.tabIndex = -1, this.isModal && !isNullOrUndefined(this.dlgOverlay) && (this.dlgOverlay.style.display = "block", 
                this.dlgContainer.style.display = "flex", isNullOrUndefined(this.targetEle) ? addClass([ document.body ], "e-scroll-disabled") : (this.targetEle === document.body ? this.dlgContainer.style.position = "fixed" : this.dlgContainer.style.position = "absolute", 
                this.dlgOverlay.style.position = "absolute", this.element.style.position = "relative", 
                addClass([ this.targetEle ], "e-scroll-disabled")));
                var openAnimation = {
                    name: this.animationSettings.effect + "In",
                    duration: this.animationSettings.duration,
                    delay: this.animationSettings.delay
                };
                "None" === this.animationSettings.effect ? this.popupObj.show() : this.popupObj.show(openAnimation), 
                this.dialogOpen = !0, this.setProperties({
                    visible: !0
                }, !0);
            }
        }, Dialog.prototype.hide = function() {
            var eventArgs = {
                cancel: !1,
                container: this.isModal ? this.dlgContainer : this.element
            };
            if (this.trigger("beforeClose", eventArgs), !eventArgs.cancel) {
                this.isModal && (this.dlgOverlay.style.display = "none", isNullOrUndefined(this.targetEle) ? removeClass([ document.body ], "e-scroll-disabled") : removeClass([ this.targetEle ], "e-scroll-disabled"));
                var closeAnimation = {
                    name: this.animationSettings.effect + "Out",
                    duration: this.animationSettings.duration,
                    delay: this.animationSettings.delay
                };
                "None" === this.animationSettings.effect ? this.popupObj.hide() : this.popupObj.hide(closeAnimation), 
                this.dialogOpen = !1, this.setProperties({
                    visible: !1
                }, !0);
            }
        }, Dialog.prototype.fullScreen = function(args) {
            this.element.offsetTop, this.element.offsetLeft;
            if (args) {
                addClass([ this.element ], "e-dlg-fullscreen");
                var display = this.element.style.display;
                this.element.style.display = "none", this.element.style.maxHeight = isNullOrUndefined(this.target) ? window.innerHeight + "px" : this.targetEle.offsetHeight + "px", 
                this.element.style.display = display, addClass([ document.body ], "e-scroll-disabled"), 
                this.allowDragging && !isNullOrUndefined(this.dragObj) && this.dragObj.destroy();
            } else removeClass([ this.element ], "e-dlg-fullscreen"), removeClass([ document.body ], "e-scroll-disabled"), 
            !this.allowDragging || this.isModal || isNullOrUndefined(this.headerContent) || this.setAllowDragging();
            return args;
        }, __decorate$1$2([ Property("") ], Dialog.prototype, "content", void 0), __decorate$1$2([ Property(!1) ], Dialog.prototype, "showCloseIcon", void 0), 
        __decorate$1$2([ Property(!1) ], Dialog.prototype, "isModal", void 0), __decorate$1$2([ Property("") ], Dialog.prototype, "header", void 0), 
        __decorate$1$2([ Property(!0) ], Dialog.prototype, "visible", void 0), __decorate$1$2([ Property("auto") ], Dialog.prototype, "height", void 0), 
        __decorate$1$2([ Property("100%") ], Dialog.prototype, "width", void 0), __decorate$1$2([ Property("") ], Dialog.prototype, "cssClass", void 0), 
        __decorate$1$2([ Property(1e3) ], Dialog.prototype, "zIndex", void 0), __decorate$1$2([ Property(null) ], Dialog.prototype, "target", void 0), 
        __decorate$1$2([ Property("") ], Dialog.prototype, "footerTemplate", void 0), __decorate$1$2([ Property(!1) ], Dialog.prototype, "allowDragging", void 0), 
        __decorate$1$2([ Collection([ {} ], ButtonProps) ], Dialog.prototype, "buttons", void 0), 
        __decorate$1$2([ Property(!0) ], Dialog.prototype, "closeOnEscape", void 0), __decorate$1$2([ Complex({}, AnimationSettings) ], Dialog.prototype, "animationSettings", void 0), 
        __decorate$1$2([ Complex({
            X: "center",
            Y: "center"
        }, PositionData) ], Dialog.prototype, "position", void 0), __decorate$1$2([ Event() ], Dialog.prototype, "created", void 0), 
        __decorate$1$2([ Event() ], Dialog.prototype, "open", void 0), __decorate$1$2([ Event() ], Dialog.prototype, "beforeOpen", void 0), 
        __decorate$1$2([ Event() ], Dialog.prototype, "close", void 0), __decorate$1$2([ Event() ], Dialog.prototype, "beforeClose", void 0), 
        __decorate$1$2([ Event() ], Dialog.prototype, "dragStart", void 0), __decorate$1$2([ Event() ], Dialog.prototype, "dragStop", void 0), 
        __decorate$1$2([ Event() ], Dialog.prototype, "drag", void 0), __decorate$1$2([ Event() ], Dialog.prototype, "overlayClick", void 0), 
        Dialog = __decorate$1$2([ NotifyPropertyChanges ], Dialog);
    }(Component), __extends$2$2 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$2$2 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, Animation$1 = function(_super) {
        function Animation$$1() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$2$2(Animation$$1, _super), __decorate$2$2([ Property({
            effect: "FadeIn",
            duration: 150,
            delay: 0
        }) ], Animation$$1.prototype, "open", void 0), __decorate$2$2([ Property({
            effect: "FadeOut",
            duration: 150,
            delay: 0
        }) ], Animation$$1.prototype, "close", void 0), Animation$$1;
    }(ChildProperty), Tooltip = function(_super) {
        function Tooltip(options, element) {
            return _super.call(this, options, element) || this;
        }
        return __extends$2$2(Tooltip, _super), Tooltip.prototype.initialize = function() {
            this.formatPosition(), addClass([ this.element ], "e-tooltip");
        }, Tooltip.prototype.formatPosition = function() {
            0 === this.position.indexOf("Top") || 0 === this.position.indexOf("Bottom") ? (_a = this.position.split(/(?=[A-Z])/), 
            this.tooltipPositionY = _a[0], this.tooltipPositionX = _a[1]) : (_b = this.position.split(/(?=[A-Z])/), 
            this.tooltipPositionX = _b[0], this.tooltipPositionY = _b[1]);
            var _a, _b;
        }, Tooltip.prototype.renderArrow = function() {
            this.setTipClass(this.position);
            var tip = createElement("div", {
                className: "e-arrow-tip " + this.tipClass
            });
            tip.appendChild(createElement("div", {
                className: "e-arrow-tip-outer " + this.tipClass
            })), tip.appendChild(createElement("div", {
                className: "e-arrow-tip-inner " + this.tipClass
            })), this.tooltipEle.appendChild(tip);
        }, Tooltip.prototype.setTipClass = function(position) {
            0 === position.indexOf("Right") ? this.tipClass = "e-tip-left" : 0 === position.indexOf("Bottom") ? this.tipClass = "e-tip-top" : 0 === position.indexOf("Left") ? this.tipClass = "e-tip-right" : this.tipClass = "e-tip-bottom";
        }, Tooltip.prototype.renderPopup = function(target) {
            var elePos = this.mouseTrail ? {
                top: 0,
                left: 0
            } : this.getTooltipPosition(target);
            this.popupObj = new Popup(this.tooltipEle, {
                height: this.height,
                width: this.width,
                position: {
                    X: elePos.left,
                    Y: elePos.top
                },
                enableRtl: this.enableRtl,
                open: this.openPopupHandler.bind(this),
                close: this.closePopupHandler.bind(this)
            });
        }, Tooltip.prototype.getTooltipPosition = function(target) {
            var pos = calculatePosition(target, this.tooltipPositionX, this.tooltipPositionY), offsetPos = this.calculateTooltipOffset(this.position);
            return this.collisionFlipFit(target, pos.left + offsetPos.left, pos.top + offsetPos.top);
        }, Tooltip.prototype.reposition = function(target) {
            var elePos = this.getTooltipPosition(target);
            this.popupObj.position = {
                X: elePos.left,
                Y: elePos.top
            }, this.popupObj.dataBind();
        }, Tooltip.prototype.openPopupHandler = function() {
            this.trigger("afterOpen", this.tooltipEventArgs);
        }, Tooltip.prototype.closePopupHandler = function() {
            this.clear(), this.trigger("afterClose", this.tooltipEventArgs);
        }, Tooltip.prototype.calculateTooltipOffset = function(position) {
            var pos = {
                top: 0,
                left: 0
            }, tooltipEleWidth = this.tooltipEle.offsetWidth, tooltipEleHeight = this.tooltipEle.offsetHeight, arrowEle = this.tooltipEle.querySelector(".e-arrow-tip"), tipWidth = arrowEle ? arrowEle.offsetWidth : 0, tipHeight = arrowEle ? arrowEle.offsetHeight : 0, tipAdjust = this.showTipPointer ? 0 : 8, tipHeightAdjust = tipHeight / 2 + 2 + (this.tooltipEle.offsetHeight - this.tooltipEle.clientHeight), tipWidthAdjust = tipWidth / 2 + 2 + (this.tooltipEle.offsetWidth - this.tooltipEle.clientWidth);
            switch (this.mouseTrail && (tipAdjust += 2), position) {
              case "RightTop":
                pos.left += tipWidth + tipAdjust, pos.top -= tooltipEleHeight - tipHeightAdjust;
                break;

              case "RightCenter":
                pos.left += tipWidth + tipAdjust, pos.top -= tooltipEleHeight / 2;
                break;

              case "RightBottom":
                pos.left += tipWidth + tipAdjust, pos.top -= tipHeightAdjust;
                break;

              case "BottomRight":
                pos.top += tipHeight + tipAdjust, pos.left -= tipWidthAdjust;
                break;

              case "BottomCenter":
                pos.top += tipHeight + tipAdjust, pos.left -= tooltipEleWidth / 2;
                break;

              case "BottomLeft":
                pos.top += tipHeight + tipAdjust, pos.left -= tooltipEleWidth - tipWidthAdjust;
                break;

              case "LeftBottom":
                pos.left -= tipWidth + tooltipEleWidth + tipAdjust, pos.top -= tipHeightAdjust;
                break;

              case "LeftCenter":
                pos.left -= tipWidth + tooltipEleWidth + tipAdjust, pos.top -= tooltipEleHeight / 2;
                break;

              case "LeftTop":
                pos.left -= tipWidth + tooltipEleWidth + tipAdjust, pos.top -= tooltipEleHeight - tipHeightAdjust;
                break;

              case "TopLeft":
                pos.top -= tooltipEleHeight + tipHeight + tipAdjust, pos.left -= tooltipEleWidth - tipWidthAdjust;
                break;

              case "TopRight":
                pos.top -= tooltipEleHeight + tipHeight + tipAdjust, pos.left -= tipWidthAdjust;
                break;

              default:
                pos.top -= tooltipEleHeight + tipHeight + tipAdjust, pos.left -= tooltipEleWidth / 2;
            }
            return pos.left += this.offsetX, pos.top += this.offsetY, pos;
        }, Tooltip.prototype.updateTipPosition = function(position) {
            var selEle = this.tooltipEle.querySelectorAll(".e-arrow-tip,.e-arrow-tip-outer,.e-arrow-tip-inner");
            removeClass(selEle, [ "e-tip-bottom", "e-tip-top", "e-tip-left", "e-tip-right" ]), 
            this.setTipClass(position), addClass(selEle, this.tipClass);
        }, Tooltip.prototype.adjustArrow = function(target, position, tooltipPositionX, tooltipPositionY) {
            if (!1 !== this.showTipPointer) {
                this.updateTipPosition(position);
                var leftValue, topValue, tooltipWidth = this.tooltipEle.clientWidth, tooltipHeight = this.tooltipEle.clientHeight, arrowEle = this.tooltipEle.querySelector(".e-arrow-tip"), arrowInnerELe = this.tooltipEle.querySelector(".e-arrow-tip-inner"), tipWidth = arrowEle.offsetWidth, tipHeight = arrowEle.offsetHeight;
                if ("e-tip-bottom" === this.tipClass || "e-tip-top" === this.tipClass) {
                    "e-tip-bottom" === this.tipClass ? (topValue = "99.9%", arrowInnerELe.style.top = "-" + (tipHeight - 2) + "px") : (topValue = -(tipHeight - 1) + "px", 
                    arrowInnerELe.style.top = "-" + (tipHeight - 6) + "px");
                    leftValue = (tipPosExclude = "Center" !== tooltipPositionX || tooltipWidth > target.offsetWidth || this.mouseTrail) && "Left" === tooltipPositionX || !tipPosExclude && "End" === this.tipPointerPosition ? tooltipWidth - tipWidth - 2 + "px" : tipPosExclude && "Right" === tooltipPositionX || !tipPosExclude && "Start" === this.tipPointerPosition ? "2px" : tooltipWidth / 2 - tipWidth / 2 + "px";
                } else {
                    "e-tip-right" === this.tipClass ? (leftValue = "99.9%", arrowInnerELe.style.left = "-" + (tipWidth - 2) + "px") : (leftValue = -(tipWidth - 1) + "px", 
                    arrowInnerELe.style.left = tipWidth - 2 - tipWidth + "px");
                    var tipPosExclude;
                    topValue = (tipPosExclude = "Center" !== tooltipPositionY || tooltipHeight > target.offsetHeight || this.mouseTrail) && "Top" === tooltipPositionY || !tipPosExclude && "End" === this.tipPointerPosition ? tooltipHeight - tipHeight - 2 + "px" : tipPosExclude && "Bottom" === tooltipPositionY || !tipPosExclude && "Start" === this.tipPointerPosition ? "2px" : tooltipHeight / 2 - tipHeight / 2 + "px";
                }
                arrowEle.style.top = topValue, arrowEle.style.left = leftValue;
            }
        }, Tooltip.prototype.renderContent = function(target) {
            var tooltipContent = this.tooltipEle.querySelector(".e-tip-content");
            if (target && !isNullOrUndefined(target.getAttribute("title")) && (target.setAttribute("data-content", target.getAttribute("title")), 
            target.removeAttribute("title")), isNullOrUndefined(this.content)) target && !isNullOrUndefined(target.getAttribute("data-content")) && (tooltipContent.innerHTML = target.getAttribute("data-content")); else if ("string" == typeof this.content) tooltipContent.innerHTML = this.content; else {
                for (;tooltipContent.firstChild; ) tooltipContent.removeChild(tooltipContent.firstChild);
                tooltipContent.appendChild(this.content);
            }
        }, Tooltip.prototype.renderCloseIcon = function() {
            if (this.isSticky) {
                var tipClose = createElement("div", {
                    className: "e-icons e-tooltip-close"
                });
                this.tooltipEle.appendChild(tipClose), EventHandler.add(tipClose, Browser.touchStartEvent, this.onStickyClose, this);
            }
        }, Tooltip.prototype.addDescribedBy = function(target, id) {
            var describedby = (target.getAttribute("aria-describedby") || "").split(/\s+/);
            describedby.indexOf(id) < 0 && describedby.push(id), attributes(target, {
                "aria-describedby": describedby.join(" ").trim(),
                "data-tooltip-id": id
            });
        }, Tooltip.prototype.removeDescribedBy = function(target) {
            var id = target.getAttribute("data-tooltip-id"), describedby = (target.getAttribute("aria-describedby") || "").split(/\s+/), index = describedby.indexOf(id);
            -1 !== index && describedby.splice(index, 1), target.removeAttribute("data-tooltip-id");
            var orgdescribedby = describedby.join(" ").trim();
            orgdescribedby ? target.setAttribute("aria-describedby", orgdescribedby) : target.removeAttribute("aria-describedby");
        }, Tooltip.prototype.tapHoldHandler = function(evt) {
            clearTimeout(this.autoCloseTimer), this.targetHover(evt.originalEvent);
        }, Tooltip.prototype.touchEndHandler = function(e) {
            var _this = this;
            if (!this.isSticky) {
                this.autoCloseTimer = setTimeout(function() {
                    _this.close();
                }, 1500);
            }
        }, Tooltip.prototype.targetClick = function(e) {
            var target;
            isNullOrUndefined(target = this.target ? closest(e.target, this.target) : this.element) || (null === target.getAttribute("data-tooltip-id") ? this.targetHover(e) : this.isSticky || this.hideTooltip(this.animation.close, e, target));
        }, Tooltip.prototype.targetHover = function(e) {
            var target;
            if (target = this.target ? closest(e.target, this.target) : this.element, !isNullOrUndefined(target) && null === target.getAttribute("data-tooltip-id")) {
                for (var _i = 0, targetList_1 = [].slice.call(document.querySelectorAll("[data-tooltip-id= " + this.ctrlId + "_content]")); _i < targetList_1.length; _i++) {
                    var target_1 = targetList_1[_i];
                    this.restoreElement(target_1);
                }
                this.showTooltip(target, this.animation.open, e), this.wireMouseEvents(e, target);
            }
        }, Tooltip.prototype.showTooltip = function(target, showAnimation, e) {
            var _this = this;
            if (clearTimeout(this.showTimer), clearTimeout(this.hideTimer), this.tooltipEventArgs = e ? {
                type: e.type,
                cancel: !1,
                target: target,
                event: e,
                element: this.tooltipEle
            } : {
                type: null,
                cancel: !1,
                target: target,
                event: null,
                element: this.tooltipEle
            }, this.trigger("beforeRender", this.tooltipEventArgs), this.tooltipEventArgs.cancel) return this.isHidden = !0, 
            void this.clear();
            if (this.isHidden = !1, isNullOrUndefined(this.tooltipEle) ? (this.ctrlId = this.element.getAttribute("id") ? getUniqueID(this.element.getAttribute("id")) : getUniqueID("tooltip"), 
            this.tooltipEle = createElement("div", {
                className: "e-tooltip-wrap e-popup",
                attrs: {
                    role: "tooltip",
                    "aria-hidden": "false",
                    id: this.ctrlId + "_content"
                },
                styles: "width:" + formatUnit(this.width) + ";height:" + formatUnit(this.height) + ";position:absolute;"
            }), this.cssClass && addClass([ this.tooltipEle ], this.cssClass.split(" ")), Browser.isDevice && addClass([ this.tooltipEle ], "e-bigger"), 
            "auto" !== this.width && (this.tooltipEle.style.maxWidth = formatUnit(this.width)), 
            this.tooltipEle.appendChild(createElement("div", {
                className: "e-tip-content"
            })), document.body.appendChild(this.tooltipEle), this.addDescribedBy(target, this.ctrlId + "_content"), 
            this.renderContent(target), addClass([ this.tooltipEle ], "e-popup-open"), this.showTipPointer && this.renderArrow(), 
            this.renderCloseIcon(), this.renderPopup(target)) : (this.adjustArrow(target, this.position, this.tooltipPositionX, this.tooltipPositionY), 
            this.addDescribedBy(target, this.ctrlId + "_content"), this.renderContent(target), 
            Animation.stop(this.tooltipEle), this.reposition(target)), removeClass([ this.tooltipEle ], "e-popup-open"), 
            addClass([ this.tooltipEle ], "e-popup-close"), this.tooltipEventArgs = e ? {
                type: e.type,
                cancel: !1,
                target: target,
                event: e,
                element: this.tooltipEle
            } : {
                type: null,
                cancel: !1,
                target: target,
                event: null,
                element: this.tooltipEle
            }, this.trigger("beforeOpen", this.tooltipEventArgs), this.tooltipEventArgs.cancel) return this.isHidden = !0, 
            void this.clear();
            var openAnimation = {
                name: showAnimation.effect,
                duration: showAnimation.duration,
                delay: showAnimation.delay,
                timingFunction: "easeOut"
            };
            if ("None" === showAnimation.effect && (openAnimation = void 0), this.openDelay > 0) {
                this.showTimer = setTimeout(function() {
                    _this.popupObj && _this.popupObj.show(openAnimation);
                }, this.openDelay);
            } else this.popupObj.show(openAnimation);
        }, Tooltip.prototype.checkCollision = function(target, x, y) {
            var elePos = {
                left: x,
                top: y,
                position: this.position,
                horizontal: this.tooltipPositionX,
                vertical: this.tooltipPositionY
            }, affectedPos = isCollide(this.tooltipEle, this.target ? this.element : null, x, y);
            return affectedPos.length > 0 && (elePos.horizontal = affectedPos.indexOf("left") >= 0 ? "Right" : affectedPos.indexOf("right") >= 0 ? "Left" : this.tooltipPositionX, 
            elePos.vertical = affectedPos.indexOf("top") >= 0 ? "Bottom" : affectedPos.indexOf("bottom") >= 0 ? "Top" : this.tooltipPositionY), 
            elePos;
        }, Tooltip.prototype.collisionFlipFit = function(target, x, y) {
            var elePos = this.checkCollision(target, x, y), newpos = elePos.position;
            if (this.tooltipPositionY !== elePos.vertical && (newpos = 0 === this.position.indexOf("Bottom") || 0 === this.position.indexOf("Top") ? elePos.vertical + this.tooltipPositionX : this.tooltipPositionX + elePos.vertical), 
            this.tooltipPositionX !== elePos.horizontal && (0 === newpos.indexOf("Left") && (elePos.vertical = "LeftTop" === newpos || "LeftCenter" === newpos ? "Top" : "Bottom", 
            newpos = elePos.vertical + "Left"), 0 === newpos.indexOf("Right") && (elePos.vertical = "RightTop" === newpos || "RightCenter" === newpos ? "Top" : "Bottom", 
            newpos = elePos.vertical + "Right"), elePos.horizontal = this.tooltipPositionX), 
            this.tooltipEventArgs = {
                type: null,
                cancel: !1,
                target: target,
                event: null,
                element: this.tooltipEle,
                collidedPosition: newpos
            }, this.trigger("beforeCollision", this.tooltipEventArgs), elePos.position !== newpos) {
                var pos = calculatePosition(target, this.tooltipPositionX, elePos.vertical);
                this.adjustArrow(target, newpos, elePos.horizontal, elePos.vertical);
                var offsetPos = this.calculateTooltipOffset(newpos);
                elePos.position = newpos, elePos.left = pos.left + offsetPos.left, elePos.top = pos.top + offsetPos.top;
            } else this.adjustArrow(target, newpos, elePos.horizontal, elePos.vertical);
            var eleOffset = {
                left: elePos.left,
                top: elePos.top
            }, left = fit(this.tooltipEle, this.target ? this.element : null, {
                X: !0,
                Y: !1
            }, eleOffset).left;
            if (this.showTipPointer && (0 === newpos.indexOf("Bottom") || 0 === newpos.indexOf("Top"))) {
                var arrowEle = this.tooltipEle.querySelector(".e-arrow-tip"), arrowleft = parseInt(arrowEle.style.left, 10) - (left - elePos.left);
                arrowleft < 0 ? arrowleft = 0 : arrowleft + arrowEle.offsetWidth > this.tooltipEle.clientWidth && (arrowleft = this.tooltipEle.clientWidth - arrowEle.offsetWidth), 
                arrowEle.style.left = arrowleft.toString() + "px";
            }
            return eleOffset.left = left, eleOffset;
        }, Tooltip.prototype.hideTooltip = function(hideAnimation, e, targetElement) {
            var target, _this = this;
            if (e ? (target = this.target ? targetElement || e.target : this.element, this.tooltipEventArgs = {
                type: e.type,
                cancel: !1,
                target: target,
                event: e,
                element: this.tooltipEle
            }) : (target = document.querySelector("[data-tooltip-id= " + this.ctrlId + "_content]"), 
            this.tooltipEventArgs = {
                type: null,
                cancel: !1,
                target: target,
                event: null,
                element: this.tooltipEle
            }), !isNullOrUndefined(target)) if (this.trigger("beforeClose", this.tooltipEventArgs), 
            this.tooltipEventArgs.cancel) this.isHidden = !1; else {
                this.restoreElement(target), this.isHidden = !0;
                var closeAnimation_1 = {
                    name: hideAnimation.effect,
                    duration: hideAnimation.duration,
                    delay: hideAnimation.delay,
                    timingFunction: "easeIn"
                };
                if ("None" === hideAnimation.effect && (closeAnimation_1 = void 0), this.closeDelay > 0) {
                    this.hideTimer = setTimeout(function() {
                        _this.popupObj && _this.popupObj.hide(closeAnimation_1);
                    }, this.closeDelay);
                } else this.popupObj.hide(closeAnimation_1);
            }
        }, Tooltip.prototype.restoreElement = function(target) {
            this.unwireMouseEvents(target), isNullOrUndefined(target.getAttribute("data-content")) || (target.setAttribute("title", target.getAttribute("data-content")), 
            target.removeAttribute("data-content")), this.removeDescribedBy(target);
        }, Tooltip.prototype.clear = function() {
            this.tooltipEle && (removeClass([ this.tooltipEle ], "e-popup-close"), addClass([ this.tooltipEle ], "e-popup-open")), 
            this.isHidden && (this.popupObj && this.popupObj.destroy(), this.tooltipEle && remove(this.tooltipEle), 
            this.tooltipEle = null, this.popupObj = null);
        }, Tooltip.prototype.onMouseOut = function(e) {
            this.hideTooltip(this.animation.close, e);
        }, Tooltip.prototype.onStickyClose = function(e) {
            this.close();
        }, Tooltip.prototype.onMouseMove = function(event) {
            var eventPageX = 0, eventPageY = 0;
            event.type.indexOf("touch") > -1 ? (event.preventDefault(), eventPageX = event.touches[0].pageX, 
            eventPageY = event.touches[0].pageY) : (eventPageX = event.pageX, eventPageY = event.pageY), 
            Animation.stop(this.tooltipEle), removeClass([ this.tooltipEle ], "e-popup-close"), 
            addClass([ this.tooltipEle ], "e-popup-open"), this.adjustArrow(event.target, this.position, this.tooltipPositionX, this.tooltipPositionY);
            var pos = this.calculateTooltipOffset(this.position), x = eventPageX + pos.left + this.offsetX, y = eventPageY + pos.top + this.offsetY, elePos = this.checkCollision(event.target, x, y);
            if (this.tooltipPositionX !== elePos.horizontal || this.tooltipPositionY !== elePos.vertical) {
                var newpos = 0 === this.position.indexOf("Bottom") || 0 === this.position.indexOf("Top") ? elePos.vertical + elePos.horizontal : elePos.horizontal + elePos.vertical;
                elePos.position = newpos, this.adjustArrow(event.target, elePos.position, elePos.horizontal, elePos.vertical);
                var colpos = this.calculateTooltipOffset(elePos.position);
                elePos.left = eventPageX + colpos.left - this.offsetX, elePos.top = eventPageY + colpos.top - this.offsetY;
            }
            this.tooltipEle.style.left = elePos.left + "px", this.tooltipEle.style.top = elePos.top + "px";
        }, Tooltip.prototype.keyDown = function(event) {
            this.tooltipEle && 27 === event.keyCode && this.close();
        }, Tooltip.prototype.touchEnd = function(e) {
            this.tooltipEle && null === closest(e.target, ".e-tooltip") && this.close();
        }, Tooltip.prototype.scrollHandler = function(e) {
            this.tooltipEle && this.close();
        }, Tooltip.prototype.render = function() {
            this.initialize(), this.wireEvents(this.opensOn);
        }, Tooltip.prototype.preRender = function() {
            this.tipClass = "e-tip-bottom", this.tooltipPositionX = "Center", this.tooltipPositionY = "Top", 
            this.isHidden = !0;
        }, Tooltip.prototype.wireEvents = function(trigger) {
            for (var _i = 0, triggerList_1 = this.getTriggerList(trigger); _i < triggerList_1.length; _i++) {
                var opensOn = triggerList_1[_i];
                if ("Custom" === opensOn) return;
                "Focus" === opensOn && this.wireFocusEvents(), "Click" === opensOn && EventHandler.add(this.element, Browser.touchStartEvent, this.targetClick, this), 
                "Hover" === opensOn && (Browser.isDevice ? (this.touchModule = new Touch(this.element, {
                    tapHoldThreshold: 500,
                    tapHold: this.tapHoldHandler.bind(this)
                }), EventHandler.add(this.element, Browser.touchEndEvent, this.touchEndHandler, this)) : EventHandler.add(this.element, "mouseover", this.targetHover, this));
            }
            EventHandler.add(document, "touchend", this.touchEnd, this), EventHandler.add(document, "scroll", this.scrollHandler, this), 
            EventHandler.add(document, "keydown", this.keyDown, this);
        }, Tooltip.prototype.getTriggerList = function(trigger) {
            return "Auto" === trigger && (trigger = Browser.isDevice ? "Hover" : "Hover Focus"), 
            trigger.split(" ");
        }, Tooltip.prototype.wireFocusEvents = function() {
            if (isNullOrUndefined(this.target)) EventHandler.add(this.element, "focus", this.targetHover, this); else for (var _i = 0, targetList_2 = [].slice.call(this.element.querySelectorAll(this.target)); _i < targetList_2.length; _i++) {
                var target = targetList_2[_i];
                EventHandler.add(target, "focus", this.targetHover, this);
            }
        }, Tooltip.prototype.wireMouseEvents = function(e, target) {
            this.tooltipEle && (this.isSticky || ("focus" === e.type && EventHandler.add(target, "blur", this.onMouseOut, this), 
            "mouseover" === e.type && EventHandler.add(target, "mouseleave", this.onMouseOut, this)), 
            this.mouseTrail && EventHandler.add(target, "mousemove touchstart mouseenter", this.onMouseMove, this));
        }, Tooltip.prototype.unwireEvents = function(trigger) {
            for (var _i = 0, triggerList_2 = this.getTriggerList(trigger); _i < triggerList_2.length; _i++) {
                var opensOn = triggerList_2[_i];
                if ("Custom" === opensOn) return;
                "Focus" === opensOn && this.unwireFocusEvents(), "Click" === opensOn && EventHandler.remove(this.element, Browser.touchStartEvent, this.targetClick), 
                "Hover" === opensOn && (Browser.isDevice ? (this.touchModule && this.touchModule.destroy(), 
                EventHandler.remove(this.element, Browser.touchEndEvent, this.touchEndHandler)) : EventHandler.remove(this.element, "mouseover", this.targetHover));
            }
            EventHandler.remove(document, "touchend", this.touchEnd), EventHandler.remove(document, "scroll", this.scrollHandler), 
            EventHandler.remove(document, "keydown", this.keyDown);
        }, Tooltip.prototype.unwireFocusEvents = function() {
            if (isNullOrUndefined(this.target)) EventHandler.remove(this.element, "focus", this.targetHover); else for (var _i = 0, targetList_3 = [].slice.call(this.element.querySelectorAll(this.target)); _i < targetList_3.length; _i++) {
                var target = targetList_3[_i];
                EventHandler.remove(target, "focus", this.targetHover);
            }
        }, Tooltip.prototype.unwireMouseEvents = function(target) {
            if (!this.isSticky) for (var _i = 0, triggerList_3 = this.getTriggerList(this.opensOn); _i < triggerList_3.length; _i++) {
                var opensOn = triggerList_3[_i];
                "Focus" === opensOn && EventHandler.remove(target, "blur", this.onMouseOut), "Hover" !== opensOn || Browser.isDevice || EventHandler.remove(target, "mouseleave", this.onMouseOut);
            }
            this.mouseTrail && EventHandler.remove(target, "mousemove touchstart mouseenter", this.onMouseMove);
        }, Tooltip.prototype.getModuleName = function() {
            return "tooltip";
        }, Tooltip.prototype.getPersistData = function() {
            return this.addOnPersist([]);
        }, Tooltip.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "width":
                    this.tooltipEle && (this.tooltipEle.style.width = formatUnit(newProp.width));
                    break;

                  case "height":
                    this.tooltipEle && (this.tooltipEle.style.height = formatUnit(newProp.height));
                    break;

                  case "content":
                    this.tooltipEle && this.renderContent();
                    break;

                  case "opensOn":
                    this.unwireEvents(oldProp.opensOn), this.wireEvents(newProp.opensOn);
                    break;

                  case "position":
                    this.formatPosition();
                    var target = document.querySelector("[data-tooltip-id= " + this.ctrlId + "_content]");
                    if (this.tooltipEle && target) {
                        var arrowInnerELe = this.tooltipEle.querySelector(".e-arrow-tip-inner");
                        arrowInnerELe.style.top = arrowInnerELe.style.left = null, this.reposition(target);
                    }
                    break;

                  case "tipPointerPosition":
                    var trgt = document.querySelector("[data-tooltip-id= " + this.ctrlId + "_content]");
                    this.tooltipEle && trgt && this.reposition(trgt);
                    break;

                  case "offsetX":
                    if (this.tooltipEle) {
                        var x = newProp.offsetX - oldProp.offsetX;
                        this.tooltipEle.style.left = (parseInt(this.tooltipEle.style.left, 10) + x).toString() + "px";
                    }
                    break;

                  case "offsetY":
                    if (this.tooltipEle) {
                        var y = newProp.offsetY - oldProp.offsetY;
                        this.tooltipEle.style.top = (parseInt(this.tooltipEle.style.top, 10) + y).toString() + "px";
                    }
                    break;

                  case "cssClass":
                    this.tooltipEle && (oldProp.cssClass && removeClass([ this.tooltipEle ], oldProp.cssClass.split(" ")), 
                    newProp.cssClass && addClass([ this.tooltipEle ], newProp.cssClass.split(" ")));
                    break;

                  case "enableRtl":
                    this.tooltipEle && (this.enableRtl ? addClass([ this.tooltipEle ], "e-rtl") : removeClass([ this.tooltipEle ], "e-rtl"));
                }
            }
        }, Tooltip.prototype.open = function(element, animation) {
            void 0 === animation && (animation = this.animation.open), "none" !== element.style.display && this.showTooltip(element, animation);
        }, Tooltip.prototype.close = function(animation) {
            void 0 === animation && (animation = this.animation.close), this.hideTooltip(animation);
        }, Tooltip.prototype.refresh = function(target) {
            this.tooltipEle && this.renderContent(target), this.popupObj && target && this.reposition(target);
        }, Tooltip.prototype.destroy = function() {
            _super.prototype.destroy.call(this), removeClass([ this.element ], "e-tooltip"), 
            this.unwireEvents(this.opensOn), this.popupObj && this.popupObj.destroy(), this.tooltipEle && remove(this.tooltipEle), 
            this.tooltipEle = null, this.popupObj = null;
        }, __decorate$2$2([ Property("auto") ], Tooltip.prototype, "width", void 0), __decorate$2$2([ Property("auto") ], Tooltip.prototype, "height", void 0), 
        __decorate$2$2([ Property() ], Tooltip.prototype, "content", void 0), __decorate$2$2([ Property() ], Tooltip.prototype, "target", void 0), 
        __decorate$2$2([ Property("TopCenter") ], Tooltip.prototype, "position", void 0), 
        __decorate$2$2([ Property(0) ], Tooltip.prototype, "offsetX", void 0), __decorate$2$2([ Property(0) ], Tooltip.prototype, "offsetY", void 0), 
        __decorate$2$2([ Property(!0) ], Tooltip.prototype, "showTipPointer", void 0), __decorate$2$2([ Property("Auto") ], Tooltip.prototype, "tipPointerPosition", void 0), 
        __decorate$2$2([ Property("Auto") ], Tooltip.prototype, "opensOn", void 0), __decorate$2$2([ Property(!1) ], Tooltip.prototype, "mouseTrail", void 0), 
        __decorate$2$2([ Property(!1) ], Tooltip.prototype, "isSticky", void 0), __decorate$2$2([ Complex({}, Animation$1) ], Tooltip.prototype, "animation", void 0), 
        __decorate$2$2([ Property(0) ], Tooltip.prototype, "openDelay", void 0), __decorate$2$2([ Property(0) ], Tooltip.prototype, "closeDelay", void 0), 
        __decorate$2$2([ Property() ], Tooltip.prototype, "cssClass", void 0), __decorate$2$2([ Property(!1) ], Tooltip.prototype, "enableRtl", void 0), 
        __decorate$2$2([ Event() ], Tooltip.prototype, "beforeRender", void 0), __decorate$2$2([ Event() ], Tooltip.prototype, "beforeOpen", void 0), 
        __decorate$2$2([ Event() ], Tooltip.prototype, "afterOpen", void 0), __decorate$2$2([ Event() ], Tooltip.prototype, "beforeClose", void 0), 
        __decorate$2$2([ Event() ], Tooltip.prototype, "afterClose", void 0), __decorate$2$2([ Event() ], Tooltip.prototype, "beforeCollision", void 0), 
        __decorate$2$2([ Event() ], Tooltip.prototype, "created", void 0), __decorate$2$2([ Event() ], Tooltip.prototype, "destroyed", void 0), 
        Tooltip = __decorate$2$2([ NotifyPropertyChanges ], Tooltip);
    }(Component), globalTimeOut = {}, spinTemplate = null, spinCSSClass = null, DEFT_MAT_WIDTH = 30, DEFT_FAB_WIDTH = 30, DEFT_BOOT_WIDTH = 30, CLS_SHOWSPIN = "e-spin-show", CLS_HIDESPIN = "e-spin-hide", CLS_MATERIALSPIN = "e-spin-material", CLS_FABRICSPIN = "e-spin-fabric", CLS_BOOTSPIN = "e-spin-bootstrap", CLS_HIGHCONTRASTSPIN = "e-spin-high-contrast", CLS_SPINWRAP = "e-spinner-pane", CLS_SPININWRAP = "e-spinner-inner", CLS_SPINCIRCLE = "e-path-circle", CLS_SPINARC = "e-path-arc", CLS_SPINLABEL = "e-spin-label", CLS_SPINTEMPLATE = "e-spin-template", _popups = Object.freeze({
        PositionData: PositionData,
        Popup: Popup,
        getScrollableParent: getScrollableParent,
        getZindexPartial: getZindexPartial,
        calculateRelativeBasedPosition: calculateRelativeBasedPosition,
        calculatePosition: calculatePosition,
        fit: fit,
        isCollide: isCollide,
        flip: flip,
        ButtonProps: ButtonProps,
        AnimationSettings: AnimationSettings,
        Dialog: Dialog,
        Animation: Animation$1,
        Tooltip: Tooltip,
        createSpinner: createSpinner,
        showSpinner: showSpinner,
        hideSpinner: hideSpinner,
        setSpinner: function(args) {
            void 0 !== args.template && (spinTemplate = args.template, void 0 !== args.template && (spinCSSClass = args.cssClass));
            for (var container = document.querySelectorAll("." + CLS_SPINWRAP), index = 0; index < container.length; index++) !function(template, container, theme, cssClass) {
                isNullOrUndefined(template) && !container.classList.contains(CLS_SPINTEMPLATE) ? (function(container, theme, cssClass) {
                    isNullOrUndefined(cssClass) || container.classList.add(cssClass);
                    var svgElement = container.querySelector("svg"), radius = "Bootstrap" === theme ? parseFloat(svgElement.style.height) : parseFloat(svgElement.style.height) / 2;
                    if (svgElement.getAttribute("class").split(/\s/).indexOf("e-spin-material") >= 0) {
                        var id = svgElement.getAttribute("id");
                        clearTimeout(globalTimeOut[id].timeOut);
                    }
                    setTheme(theme, container, radius);
                }(container, theme, cssClass), container.classList.contains(CLS_SHOWSPIN) ? (container.classList.remove(CLS_SHOWSPIN), 
                showSpinner(container)) : (container.classList.remove(CLS_HIDESPIN), hideSpinner(container))) : (spinTemplate = template, 
                isNullOrUndefined(cssClass) || (spinCSSClass = cssClass));
            }(args.template, container[index], args.type, args.cssClass);
        }
    }), CLASSNAMES$1 = {
        RTL: "e-rtl",
        DISABLE: "e-disabled",
        INPUT: "e-input",
        INPUTGROUP: "e-input-group",
        FLOATINPUT: "e-float-input",
        FLOATLINE: "e-float-line",
        FLOATTEXT: "e-float-text",
        CLEARICON: "e-clear-icon",
        CLEARICONHIDE: "e-clear-icon-hide",
        LABELTOP: "e-label-top",
        LABELBOTTOM: "e-label-bottom",
        NOFLOATLABEL: "e-no-float-label",
        INPUTCUSTOMTAG: "e-input-custom-tag",
        FLOATCUSTOMTAG: "e-float-custom-tag"
    };
    !function(Input) {
        function _focusFn() {
            var label = getParentNode(this).getElementsByClassName("e-float-text")[0];
            addClass([ label ], CLASSNAMES$1.LABELTOP), label.classList.contains(CLASSNAMES$1.LABELBOTTOM) && removeClass([ label ], CLASSNAMES$1.LABELBOTTOM);
        }
        function _blurFn() {
            var parent = getParentNode(this);
            if ("" === parent.getElementsByTagName("input")[0].value) {
                var label = parent.getElementsByClassName("e-float-text")[0];
                label.classList.contains(CLASSNAMES$1.LABELTOP) && removeClass([ label ], CLASSNAMES$1.LABELTOP), 
                addClass([ label ], CLASSNAMES$1.LABELBOTTOM);
            }
        }
        function createFloatingInput(args, inputObject) {
            var floatLinelement, floatLabelElement;
            "Auto" === args.floatLabelType && function(element) {
                element.addEventListener("focus", _focusFn), element.addEventListener("blur", _blurFn);
            }(args.element), isNullOrUndefined(inputObject.container) ? (inputObject.container = createInputContainer(args, CLASSNAMES$1.FLOATINPUT, CLASSNAMES$1.FLOATCUSTOMTAG, "div"), 
            args.element.parentNode.insertBefore(inputObject.container, args.element)) : (isNullOrUndefined(args.customTag) || inputObject.container.classList.add(CLASSNAMES$1.FLOATCUSTOMTAG), 
            inputObject.container.classList.add(CLASSNAMES$1.FLOATINPUT)), floatLinelement = createElement("span", {
                className: CLASSNAMES$1.FLOATLINE
            }), floatLabelElement = createElement("label", {
                className: CLASSNAMES$1.FLOATTEXT
            }), isNullOrUndefined(args.element.id) || "" === args.element.id || (floatLabelElement.id = "label_" + args.element.id.replace(/ /g, "_"), 
            attributes(args.element, {
                "aria-labelledby": floatLabelElement.id
            })), isNullOrUndefined(args.element.placeholder) || "" === args.element.placeholder || (floatLabelElement.innerHTML = args.element.placeholder, 
            args.element.removeAttribute("placeholder")), isNullOrUndefined(args.properties) || isNullOrUndefined(args.properties.placeholder) || "" === args.properties.placeholder || (floatLabelElement.innerHTML = args.properties.placeholder), 
            floatLabelElement.innerHTML || inputObject.container.classList.add(CLASSNAMES$1.NOFLOATLABEL), 
            inputObject.container.appendChild(args.element), inputObject.container.appendChild(floatLinelement), 
            inputObject.container.appendChild(floatLabelElement), updateLabelState(args.element.value, floatLabelElement), 
            "Always" === args.floatLabelType && (floatLabelElement.classList.contains(CLASSNAMES$1.LABELBOTTOM) && removeClass([ floatLabelElement ], CLASSNAMES$1.LABELBOTTOM), 
            addClass([ floatLabelElement ], CLASSNAMES$1.LABELTOP)), "Auto" === args.floatLabelType && (args.element.addEventListener("input", function(event) {
                updateLabelState(args.element.value, floatLabelElement);
            }), args.element.addEventListener("blur", function(event) {
                updateLabelState(args.element.value, floatLabelElement);
            }));
        }
        function updateIconState(value, button) {
            value ? removeClass([ button ], CLASSNAMES$1.CLEARICONHIDE) : addClass([ button ], CLASSNAMES$1.CLEARICONHIDE);
        }
        function updateLabelState(value, label) {
            value ? (addClass([ label ], CLASSNAMES$1.LABELTOP), label.classList.contains(CLASSNAMES$1.LABELBOTTOM) && removeClass([ label ], CLASSNAMES$1.LABELBOTTOM)) : (label.classList.contains(CLASSNAMES$1.LABELTOP) && removeClass([ label ], CLASSNAMES$1.LABELTOP), 
            addClass([ label ], CLASSNAMES$1.LABELBOTTOM));
        }
        function getParentNode(element) {
            return element.parentNode;
        }
        function createClearButton(element, inputObject, initial) {
            var button = createElement("span", {
                className: CLASSNAMES$1.CLEARICON
            }), container = inputObject.container;
            if (isNullOrUndefined(initial)) {
                (inputObject.container.classList.contains(CLASSNAMES$1.FLOATINPUT) ? inputObject.container.querySelector("." + CLASSNAMES$1.FLOATTEXT) : element).insertAdjacentElement("afterend", button);
            } else container.appendChild(button);
            return !isNullOrUndefined(container) && container.classList.contains(CLASSNAMES$1.FLOATINPUT) && addClass([ container ], CLASSNAMES$1.INPUTGROUP), 
            addClass([ button ], CLASSNAMES$1.CLEARICONHIDE), function(element, button) {
                button.addEventListener("click", function(event) {
                    element.classList.contains(CLASSNAMES$1.DISABLE) || element.readOnly || (event.preventDefault(), 
                    element !== document.activeElement && element.focus(), element.value = "", addClass([ button ], CLASSNAMES$1.CLEARICONHIDE));
                }), element.addEventListener("input", function(event) {
                    updateIconState(element.value, button);
                }), element.addEventListener("focus", function(event) {
                    updateIconState(element.value, button);
                }), element.addEventListener("blur", function(event) {
                    setTimeout(function() {
                        addClass([ button ], CLASSNAMES$1.CLEARICONHIDE);
                    }, 200);
                });
            }(element, button), button;
        }
        function validateLabel(element, floatLabelType) {
            if (getParentNode(element).classList.contains(CLASSNAMES$1.FLOATINPUT) && "Auto" === floatLabelType) {
                var label = getParentNode(element).getElementsByClassName("e-float-text")[0];
                updateLabelState(element.value, label);
            }
        }
        function createInputContainer(args, className, tagClass, tag) {
            var container;
            return isNullOrUndefined(args.customTag) ? container = createElement(tag, {
                className: className
            }) : (container = createElement(args.customTag, {
                className: className
            })).classList.add(tagClass), container.classList.add("e-control-wrapper"), container;
        }
        function setCssClass(cssClass, elements, oldClass) {
            isNullOrUndefined(oldClass) || "" === oldClass || removeClass(elements, oldClass), 
            isNullOrUndefined(cssClass) || "" === cssClass || addClass(elements, cssClass);
        }
        function setPlaceholder(placeholder, element) {
            var parentElement;
            (parentElement = getParentNode(element)).classList.contains(CLASSNAMES$1.FLOATINPUT) ? isNullOrUndefined(placeholder) || "" === placeholder ? (parentElement.classList.add(CLASSNAMES$1.NOFLOATLABEL), 
            parentElement.getElementsByClassName(CLASSNAMES$1.FLOATTEXT)[0].textContent = "") : (parentElement.getElementsByClassName(CLASSNAMES$1.FLOATTEXT)[0].textContent = placeholder, 
            parentElement.classList.remove(CLASSNAMES$1.NOFLOATLABEL)) : isNullOrUndefined(placeholder) || "" === placeholder ? (element.removeAttribute("placeholder"), 
            element.removeAttribute("aria-placeholder")) : attributes(element, {
                placeholder: placeholder,
                "aria-placeholder": placeholder
            });
        }
        function setReadonly(isReadonly, element, floatLabelType) {
            isReadonly ? attributes(element, {
                readonly: ""
            }) : element.removeAttribute("readonly"), isNullOrUndefined(floatLabelType) || validateLabel(element, floatLabelType);
        }
        function setEnableRtl(isRtl, elements) {
            isRtl ? addClass(elements, CLASSNAMES$1.RTL) : removeClass(elements, CLASSNAMES$1.RTL);
        }
        function setEnabled(isEnable, element, floatLabelType) {
            var disabledAttrs = {
                disabled: "disabled",
                "aria-disabled": "true"
            };
            isEnable ? (element.classList.remove(CLASSNAMES$1.DISABLE), removeAttributes(disabledAttrs, element)) : (element.classList.add(CLASSNAMES$1.DISABLE), 
            addAttributes(disabledAttrs, element)), isNullOrUndefined(floatLabelType) || validateLabel(element, floatLabelType);
        }
        function setClearButton(isClear, element, inputObject, initial) {
            isClear ? inputObject.clearButton = createClearButton(element, inputObject, initial) : (inputObject.clearButton.remove(), 
            inputObject.clearButton = null);
        }
        function removeAttributes(attrs, element) {
            for (var _i = 0, _a = Object.keys(attrs); _i < _a.length; _i++) {
                var key = _a[_i], parentElement = void 0;
                parentElement = getParentNode(element), "disabled" === key && element.classList.remove(CLASSNAMES$1.DISABLE), 
                "disabled" === key && parentElement.classList.contains(CLASSNAMES$1.INPUTGROUP) && parentElement.classList.remove(CLASSNAMES$1.DISABLE), 
                "placeholder" === key && parentElement.classList.contains(CLASSNAMES$1.FLOATINPUT) ? parentElement.getElementsByClassName(CLASSNAMES$1.FLOATTEXT)[0].textContent = "" : element.removeAttribute(key);
            }
        }
        function addAttributes(attrs, element) {
            for (var _i = 0, _a = Object.keys(attrs); _i < _a.length; _i++) {
                var key = _a[_i], parentElement = void 0;
                parentElement = getParentNode(element), "disabled" === key && element.classList.add(CLASSNAMES$1.DISABLE), 
                "disabled" === key && parentElement.classList.contains(CLASSNAMES$1.INPUTGROUP) && parentElement.classList.add(CLASSNAMES$1.DISABLE), 
                "placeholder" === key && parentElement.classList.contains(CLASSNAMES$1.FLOATINPUT) ? parentElement.getElementsByClassName(CLASSNAMES$1.FLOATTEXT)[0].textContent = attrs[key] : element.setAttribute(key, attrs[key]);
            }
        }
        function appendSpan(iconClass, container) {
            var button = createElement("span", {
                className: iconClass
            });
            return container.appendChild(button), container.classList.contains(CLASSNAMES$1.INPUTGROUP) || container.classList.add(CLASSNAMES$1.INPUTGROUP), 
            button.addEventListener("mousedown", function() {
                container.classList.contains("e-disabled") || container.querySelector("input").readOnly || this.classList.add("e-input-btn-ripple");
            }), button.addEventListener("mouseup", function() {
                var ele = this;
                setTimeout(function() {
                    ele.classList.remove("e-input-btn-ripple");
                }, 500);
            }), button;
        }
        Input.createInput = function(args) {
            var inputObject = {
                container: null,
                buttons: [],
                clearButton: null
            };
            if (isNullOrUndefined(args.floatLabelType) || "Never" === args.floatLabelType ? (inputObject.container = createInputContainer(args, CLASSNAMES$1.INPUTGROUP, CLASSNAMES$1.INPUTCUSTOMTAG, "span"), 
            args.element.parentNode.insertBefore(inputObject.container, args.element), addClass([ args.element ], CLASSNAMES$1.INPUT), 
            inputObject.container.appendChild(args.element)) : createFloatingInput(args, inputObject), 
            args.element.addEventListener("focus", function() {
                var parent = getParentNode(this);
                parent.classList.contains("e-input-group") && parent.classList.add("e-input-focus");
            }), args.element.addEventListener("blur", function() {
                var parent = getParentNode(this);
                parent.classList.contains("e-input-group") && parent.classList.remove("e-input-focus");
            }), isNullOrUndefined(args.properties) || isNullOrUndefined(args.properties.showClearButton) || !args.properties.showClearButton || (setClearButton(args.properties.showClearButton, args.element, inputObject, !0), 
            inputObject.container.classList.contains(CLASSNAMES$1.FLOATINPUT) && addClass([ inputObject.container ], CLASSNAMES$1.INPUTGROUP)), 
            !isNullOrUndefined(args.buttons)) for (var i = 0; i < args.buttons.length; i++) inputObject.buttons.push(appendSpan(args.buttons[i], inputObject.container));
            return inputObject = function(args, inputObject) {
                if (!isNullOrUndefined(args.properties)) for (var _i = 0, _a = Object.keys(args.properties); _i < _a.length; _i++) {
                    var prop = _a[_i];
                    switch (prop) {
                      case "cssClass":
                        setCssClass(args.properties.cssClass, [ inputObject.container ]);
                        break;

                      case "enabled":
                        setEnabled(args.properties.enabled, args.element);
                        break;

                      case "enableRtl":
                        setEnableRtl(args.properties.enableRtl, [ inputObject.container ]);
                        break;

                      case "placeholder":
                        setPlaceholder(args.properties.placeholder, args.element);
                        break;

                      case "readonly":
                        setReadonly(args.properties.readonly, args.element);
                    }
                }
                return inputObject;
            }(args, inputObject);
        }, Input.setValue = function(value, element, floatLabelType, clearButton) {
            if (element.value = value, isNullOrUndefined(floatLabelType) || "Auto" !== floatLabelType || validateLabel(element, floatLabelType), 
            !isNullOrUndefined(clearButton) && clearButton) {
                var parentElement = getParentNode(element), button = parentElement.getElementsByClassName(CLASSNAMES$1.CLEARICON)[0];
                element.value && parentElement.classList.contains("e-input-focus") ? removeClass([ button ], CLASSNAMES$1.CLEARICONHIDE) : addClass([ button ], CLASSNAMES$1.CLEARICONHIDE);
            }
        }, Input.setCssClass = setCssClass, Input.setPlaceholder = setPlaceholder, Input.setReadonly = setReadonly, 
        Input.setEnableRtl = setEnableRtl, Input.setEnabled = setEnabled, Input.setClearButton = setClearButton, 
        Input.removeAttributes = removeAttributes, Input.addAttributes = addAttributes, 
        Input.removeFloating = function(input) {
            var container = input.container;
            if (!isNullOrUndefined(container) && container.classList.contains(CLASSNAMES$1.FLOATINPUT)) {
                var inputEle = container.querySelector("input"), placeholder = container.querySelector("." + CLASSNAMES$1.FLOATTEXT).textContent, clearButton = null !== container.querySelector(".e-clear-icon");
                detach(container.querySelector("." + CLASSNAMES$1.FLOATLINE)), detach(container.querySelector("." + CLASSNAMES$1.FLOATTEXT)), 
                classList(container, [ CLASSNAMES$1.INPUTGROUP ], [ CLASSNAMES$1.FLOATINPUT ]), 
                function(element) {
                    element.removeEventListener("focus", _focusFn), element.removeEventListener("blur", _blurFn);
                }(inputEle), attributes(inputEle, {
                    placeholder: placeholder
                }), inputEle.classList.add(CLASSNAMES$1.INPUT), clearButton || inputEle.removeAttribute("required");
            }
        }, Input.addFloating = function(input, type, placeholder) {
            var container = closest(input, "." + CLASSNAMES$1.INPUTGROUP);
            if ("Never" !== type) {
                var customTag = container.tagName, args = {
                    element: input,
                    floatLabelType: type,
                    customTag: customTag = "DIV" !== customTag && "SPAN" !== customTag ? customTag : null,
                    properties: {
                        placeholder: placeholder
                    }
                }, iconEle = container.querySelector(".e-clear-icon"), inputObj = {
                    container: container
                };
                if (input.classList.remove(CLASSNAMES$1.INPUT), createFloatingInput(args, inputObj), 
                isNullOrUndefined(iconEle) && (iconEle = container.querySelector(".e-input-group-icon")), 
                isNullOrUndefined(iconEle)) container.classList.remove(CLASSNAMES$1.INPUTGROUP); else {
                    var floatLine = container.querySelector("." + CLASSNAMES$1.FLOATLINE), floatText = container.querySelector("." + CLASSNAMES$1.FLOATTEXT);
                    container.insertBefore(input, iconEle), container.insertBefore(floatLine, iconEle), 
                    container.insertBefore(floatText, iconEle);
                }
            }
        }, Input.appendSpan = appendSpan;
    }(Input || (Input = {}));
    var ErrorOption, __extends$6 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$6 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, SPINICON = "e-input-group-icon", INTREGEXP = new RegExp("/^(-)?(d*)$/"), NumericTextBox = function(_super) {
        function NumericTextBox(options, element) {
            return _super.call(this, options, element) || this;
        }
        return __extends$6(NumericTextBox, _super), NumericTextBox.prototype.preRender = function() {
            this.isPrevFocused = !1, this.decimalSeparator = ".", this.intRegExp = new RegExp("/^(-)?(d*)$/"), 
            this.isCalled = !1;
            var ejInstance = getValue("ej2_instances", this.element);
            if (this.cloneElement = this.element.cloneNode(!0), this.angularTagName = null, 
            "EJS-NUMERICTEXTBOX" === this.element.tagName) {
                this.angularTagName = this.element.tagName;
                for (var input = createElement("input"), index = 0; index < this.element.attributes.length; index++) input.setAttribute(this.element.attributes[index].nodeName, this.element.attributes[index].nodeValue), 
                input.innerHTML = this.element.innerHTML;
                this.element.parentNode.appendChild(input), this.element.parentNode.removeChild(this.element), 
                this.element = input, setValue("ej2_instances", ejInstance, this.element);
            }
            attributes(this.element, {
                role: "spinbutton",
                tabindex: "0",
                autocomplete: "off",
                "aria-live": "assertive"
            });
            this.l10n = new L10n("numerictextbox", {
                incrementTitle: "Increment value",
                decrementTitle: "Decrement value",
                placeholder: ""
            }, this.locale), this.isValidState = !0, this.inputStyle = null, this.inputName = null, 
            this.cultureInfo = {}, this.initCultureInfo(), this.initCultureFunc(), this.checkAttributes(), 
            this.prevValue = this.value, this.validateMinMax(), this.validateStep(), null === this.placeholder && this.updatePlaceholder();
        }, NumericTextBox.prototype.render = function() {
            "input" === this.element.tagName.toLowerCase() && (this.createWrapper(), this.showSpinButton && this.spinBtnCreation(), 
            isNullOrUndefined(this.width) || setStyleAttribute(this.container, {
                width: formatUnit(this.width)
            }), this.changeValue(this.value), this.wireEvents(), null === this.value || isNaN(this.value) || this.decimals && this.setProperties({
                value: this.roundNumber(this.value, this.decimals)
            }, !0));
        }, NumericTextBox.prototype.checkAttributes = function() {
            for (var _i = 0, attributes_1 = [ "value", "min", "max", "step", "disabled", "readonly", "style", "name" ]; _i < attributes_1.length; _i++) {
                var prop = attributes_1[_i];
                if (!isNullOrUndefined(this.element.getAttribute(prop))) switch (prop) {
                  case "disabled":
                    var enabled = "disabled" !== this.element.getAttribute(prop) && "true" !== this.element.getAttribute(prop);
                    this.setProperties({
                        enabled: enabled
                    }, !0);
                    break;

                  case "readonly":
                    var readonly = "readonly" === this.element.getAttribute(prop) || "true" === this.element.getAttribute(prop);
                    this.setProperties({
                        readonly: readonly
                    }, !0);
                    break;

                  case "style":
                    this.inputStyle = this.element.getAttribute(prop);
                    break;

                  case "name":
                    this.inputName = this.element.getAttribute(prop);
                    break;

                  default:
                    var value = this.instance.getNumberParser({
                        format: "n"
                    })(this.element.getAttribute(prop));
                    (null !== value && !isNaN(value) || "value" === prop) && this.setProperties(setValue(prop, value, {}), !0);
                }
            }
        }, NumericTextBox.prototype.updatePlaceholder = function() {
            this.setProperties({
                placeholder: this.l10n.getConstant("placeholder")
            }, !0);
        }, NumericTextBox.prototype.initCultureFunc = function() {
            this.instance = new Internationalization(this.locale);
        }, NumericTextBox.prototype.initCultureInfo = function() {
            this.cultureInfo.format = this.format, null !== getValue("currency", this) && (setValue("currency", this.currency, this.cultureInfo), 
            this.setProperties({
                currencyCode: this.currency
            }, !0));
        }, NumericTextBox.prototype.createWrapper = function() {
            var inputObj = Input.createInput({
                element: this.element,
                customTag: this.angularTagName,
                floatLabelType: this.floatLabelType,
                properties: {
                    readonly: this.readonly,
                    placeholder: this.placeholder,
                    cssClass: this.cssClass,
                    enableRtl: this.enableRtl,
                    enabled: this.enabled
                }
            });
            this.container = inputObj.container, this.container.setAttribute("class", "e-control-wrapper e-numeric " + this.container.getAttribute("class")), 
            this.readonly && attributes(this.element, {
                "aria-readonly": "true"
            }), this.hiddenInput = createElement("input", {
                attrs: {
                    type: "hidden"
                }
            }), this.inputName = null !== this.inputName ? this.inputName : this.element.id, 
            this.element.removeAttribute("name"), attributes(this.hiddenInput, {
                name: this.inputName
            }), this.container.insertBefore(this.hiddenInput, this.element), null !== this.inputStyle && attributes(this.container, {
                style: this.inputStyle
            });
        }, NumericTextBox.prototype.spinBtnCreation = function() {
            this.spinDown = Input.appendSpan(SPINICON + " e-spin-down", this.container), attributes(this.spinDown, {
                title: this.l10n.getConstant("decrementTitle"),
                "aria-label": this.l10n.getConstant("decrementTitle")
            }), this.spinUp = Input.appendSpan(SPINICON + " e-spin-up", this.container), attributes(this.spinUp, {
                title: this.l10n.getConstant("incrementTitle"),
                "aria-label": this.l10n.getConstant("incrementTitle")
            }), this.wireSpinBtnEvents();
        }, NumericTextBox.prototype.validateMinMax = function() {
            ("number" != typeof this.min || isNaN(this.min)) && this.setProperties({
                min: -Number.MAX_VALUE
            }, !0), ("number" != typeof this.max || isNaN(this.max)) && this.setProperties({
                max: Number.MAX_VALUE
            }, !0), null !== this.decimals && (this.min !== -Number.MAX_VALUE && this.setProperties({
                min: this.instance.getNumberParser({
                    format: "n"
                })(this.formattedValue(this.decimals, this.min))
            }, !0), this.max !== Number.MAX_VALUE && this.setProperties({
                max: this.instance.getNumberParser({
                    format: "n"
                })(this.formattedValue(this.decimals, this.max))
            }, !0)), this.setProperties({
                min: this.min > this.max ? this.max : this.min
            }, !0), attributes(this.element, {
                "aria-valuemin": this.min.toString(),
                "aria-valuemax": this.max.toString()
            });
        }, NumericTextBox.prototype.formattedValue = function(decimals, value) {
            return this.instance.getNumberFormat({
                maximumFractionDigits: decimals,
                minimumFractionDigits: decimals,
                useGrouping: !1
            })(value);
        }, NumericTextBox.prototype.validateStep = function() {
            null !== this.decimals && this.setProperties({
                step: this.instance.getNumberParser({
                    format: "n"
                })(this.formattedValue(this.decimals, this.step))
            }, !0);
        }, NumericTextBox.prototype.action = function(operation, event) {
            this.isInteract = !0;
            var value = this.isFocused ? this.instance.getNumberParser({
                format: "n"
            })(this.element.value) : this.value;
            this.changeValue(this.performAction(value, this.step, operation)), this.raiseChangeEvent(event);
        }, NumericTextBox.prototype.checkErrorClass = function() {
            this.isValidState ? removeClass([ this.container ], "e-error") : addClass([ this.container ], "e-error"), 
            attributes(this.element, {
                "aria-invalid": this.isValidState ? "false" : "true"
            });
        }, NumericTextBox.prototype.wireEvents = function() {
            EventHandler.add(this.element, "focus", this.focusIn, this), EventHandler.add(this.element, "blur", this.focusOut, this), 
            EventHandler.add(this.element, "keydown", this.keyDownHandler, this), EventHandler.add(this.element, "keypress", this.keyPressHandler, this), 
            EventHandler.add(this.element, "change", this.changeHandler, this), EventHandler.add(this.element, "paste", this.pasteHandler, this);
        }, NumericTextBox.prototype.wireSpinBtnEvents = function() {
            EventHandler.add(this.spinUp, Browser.touchStartEvent, this.mouseDownOnSpinner, this), 
            EventHandler.add(this.spinDown, Browser.touchStartEvent, this.mouseDownOnSpinner, this), 
            EventHandler.add(this.spinUp, Browser.touchEndEvent, this.mouseUpOnSpinner, this), 
            EventHandler.add(this.spinDown, Browser.touchEndEvent, this.mouseUpOnSpinner, this), 
            EventHandler.add(this.spinUp, Browser.touchMoveEvent, this.touchMoveOnSpinner, this), 
            EventHandler.add(this.spinDown, Browser.touchMoveEvent, this.touchMoveOnSpinner, this);
        }, NumericTextBox.prototype.unwireEvents = function() {
            EventHandler.remove(this.element, "focus", this.focusIn), EventHandler.remove(this.element, "blur", this.focusOut), 
            EventHandler.remove(this.element, "keydown", this.keyDownHandler), EventHandler.remove(this.element, "keypress", this.keyPressHandler), 
            EventHandler.remove(this.element, "change", this.changeHandler), EventHandler.remove(this.element, "paste", this.pasteHandler);
        }, NumericTextBox.prototype.unwireSpinBtnEvents = function() {
            EventHandler.remove(this.spinUp, Browser.touchStartEvent, this.mouseDownOnSpinner), 
            EventHandler.remove(this.spinDown, Browser.touchStartEvent, this.mouseDownOnSpinner), 
            EventHandler.remove(this.spinUp, Browser.touchEndEvent, this.mouseUpOnSpinner), 
            EventHandler.remove(this.spinDown, Browser.touchEndEvent, this.mouseUpOnSpinner), 
            EventHandler.remove(this.spinUp, Browser.touchMoveEvent, this.touchMoveOnSpinner), 
            EventHandler.remove(this.spinDown, Browser.touchMoveEvent, this.touchMoveOnSpinner);
        }, NumericTextBox.prototype.changeHandler = function(event) {
            this.element.value.length || this.setProperties({
                value: null
            }, !0);
            var parsedInput = this.instance.getNumberParser({
                format: "n"
            })(this.element.value);
            this.updateValue(parsedInput, event);
        }, NumericTextBox.prototype.raiseChangeEvent = function(event) {
            if (this.prevValue !== this.value) {
                var eventArgs = {};
                this.changeEventArgs = {
                    value: this.value,
                    previousValue: this.prevValue,
                    isInteraction: this.isInteract,
                    event: event
                }, event && (this.changeEventArgs.event = event), merge(eventArgs, this.changeEventArgs), 
                this.prevValue = this.value, this.isInteract = !1, this.trigger("change", eventArgs);
            }
        }, NumericTextBox.prototype.pasteHandler = function() {
            var _this = this, beforeUpdate = this.element.value;
            setTimeout(function() {
                _this.numericRegex().test(_this.element.value) || _this.setElementValue(beforeUpdate);
            });
        }, NumericTextBox.prototype.keyDownHandler = function(event) {
            switch (event.keyCode) {
              case 38:
                event.preventDefault(), this.action("increment", event);
                break;

              case 40:
                event.preventDefault(), this.action("decrement", event);
            }
            this.element.value.length || (this.setProperties({
                value: null
            }, !0), this.isKeyDown = !0, this.updateValue(this.instance.getNumberParser({
                format: "n"
            })(this.element.value)), this.isKeyDown = !1);
        }, NumericTextBox.prototype.performAction = function(value, step, operation) {
            (null === value || isNaN(value)) && (value = 0);
            var updatedValue = "increment" === operation ? value + step : value - step;
            return updatedValue = this.correctRounding(value, step, updatedValue), this.strictMode ? this.trimValue(updatedValue) : updatedValue;
        }, NumericTextBox.prototype.correctRounding = function(value, step, result) {
            var floatExp = new RegExp("[,.](.*)"), floatValue = (value.toString(), step.toString(), 
            floatExp.test(value.toString())), floatStep = floatExp.test(step.toString());
            if (floatValue || floatStep) {
                var valueCount = floatValue ? floatExp.exec(value.toString())[0].length : 0, stepCount = floatStep ? floatExp.exec(step.toString())[0].length : 0, max = Math.max(valueCount, stepCount);
                return value = this.roundValue(result, max);
            }
            return result;
        }, NumericTextBox.prototype.roundValue = function(result, precision) {
            precision = precision || 0;
            var divide = Math.pow(10, precision);
            return result *= divide, result = Math.round(result) / divide;
        }, NumericTextBox.prototype.updateValue = function(value, event) {
            event && (this.isInteract = !0), null === value || isNaN(value) || this.decimals && (value = this.roundNumber(value, this.decimals)), 
            this.changeValue(null === value || isNaN(value) ? null : this.strictMode ? this.trimValue(value) : value), 
            this.isKeyDown || this.raiseChangeEvent(event);
        }, NumericTextBox.prototype.updateCurrency = function(prop, propVal) {
            setValue(prop, propVal, this.cultureInfo), this.updateValue(this.value);
        }, NumericTextBox.prototype.changeValue = function(value) {
            if (value || 0 === value) {
                var numberOfDecimals = void 0, decimalPart = value.toString().split(".")[1];
                numberOfDecimals = decimalPart && decimalPart.length ? decimalPart.length : 0, null !== this.decimals && (numberOfDecimals = numberOfDecimals < this.decimals ? numberOfDecimals : this.decimals), 
                this.setProperties({
                    value: this.roundNumber(value, numberOfDecimals)
                }, !0);
            } else value = null, this.setProperties({
                value: value
            }, !0);
            this.modifyText(), this.strictMode || this.validateState();
        }, NumericTextBox.prototype.modifyText = function() {
            if (this.value || 0 === this.value) {
                var value = this.formatNumber(), elementValue = this.isFocused ? value : this.instance.getNumberFormat(this.cultureInfo)(this.value);
                this.setElementValue(elementValue), attributes(this.element, {
                    "aria-valuenow": value
                }), this.hiddenInput.value = value;
            } else this.setElementValue(""), this.element.removeAttribute("aria-valuenow"), 
            this.hiddenInput.value = null;
        }, NumericTextBox.prototype.setElementValue = function(val, element) {
            Input.setValue(val, element || this.element, this.floatLabelType);
        }, NumericTextBox.prototype.validateState = function() {
            this.isValidState = !0, (this.value || 0 === this.value) && (this.isValidState = !(this.value > this.max || this.value < this.min)), 
            this.checkErrorClass();
        }, NumericTextBox.prototype.formatNumber = function() {
            var numberOfDecimals, decimalPart = this.value.toString().split(".")[1];
            return numberOfDecimals = decimalPart && decimalPart.length ? decimalPart.length : 0, 
            null !== this.decimals && (numberOfDecimals = numberOfDecimals < this.decimals ? numberOfDecimals : this.decimals), 
            this.instance.getNumberFormat({
                maximumFractionDigits: numberOfDecimals,
                minimumFractionDigits: numberOfDecimals,
                useGrouping: !1
            })(this.value);
        }, NumericTextBox.prototype.trimValue = function(value) {
            return value > this.max ? this.max : value < this.min ? this.min : value;
        }, NumericTextBox.prototype.roundNumber = function(value, precision) {
            var result = value, decimals = precision || 0, result1 = result.toString().split("e"), result2 = (result = Math.round(Number(result1[0] + "e" + (result1[1] ? Number(result1[1]) + decimals : decimals)))).toString().split("e");
            return result = Number(result2[0] + "e" + (result2[1] ? Number(result2[1]) - decimals : -decimals)), 
            Number(result.toFixed(decimals));
        }, NumericTextBox.prototype.cancelEvent = function(event) {
            return event.preventDefault(), !1;
        }, NumericTextBox.prototype.keyPressHandler = function(event) {
            if (0 === event.which || event.metaKey || event.ctrlKey || 8 === event.keyCode || 13 === event.keyCode) return !0;
            var currentChar = String.fromCharCode(event.which), text = this.element.value;
            return text = text.substring(0, this.element.selectionStart) + currentChar + text.substring(this.element.selectionEnd), 
            !!this.numericRegex().test(text) || (event.preventDefault(), event.stopPropagation(), 
            !1);
        }, NumericTextBox.prototype.numericRegex = function() {
            var decimalSeparator = getValue("decimal", getNumericObject(this.locale)), fractionRule = "*";
            return "." === decimalSeparator && (decimalSeparator = "\\" + decimalSeparator), 
            0 === this.decimals ? INTREGEXP : (this.decimals && this.validateDecimalOnType && (fractionRule = "{0," + this.decimals + "}"), 
            new RegExp("^(-)?(((\\d+(" + decimalSeparator + "\\d" + fractionRule + ")?)|(" + decimalSeparator + "\\d" + fractionRule + ")))?$"));
        }, NumericTextBox.prototype.mouseWheel = function(event) {
            event.preventDefault();
            var delta, rawEvent = event;
            rawEvent.wheelDelta ? delta = rawEvent.wheelDelta / 120 : rawEvent.detail && (delta = -rawEvent.detail / 3), 
            delta > 0 ? this.action("increment", event) : delta < 0 && this.action("decrement", event), 
            this.cancelEvent(event);
        }, NumericTextBox.prototype.focusIn = function(event) {
            if (this.enabled && !this.readonly) {
                if (this.isFocused = !0, removeClass([ this.container ], "e-error"), this.prevValue = this.value, 
                this.value || 0 === this.value) {
                    var formatValue = this.formatNumber();
                    this.setElementValue(formatValue), this.isPrevFocused || this.element.setSelectionRange(0, formatValue.length);
                }
                Browser.isDevice || EventHandler.add(this.element, "mousewheel DOMMouseScroll", this.mouseWheel, this);
            }
        }, NumericTextBox.prototype.focusOut = function(event) {
            var _this = this;
            if (this.isPrevFocused) {
                if (event.preventDefault(), Browser.isDevice) {
                    var value_1 = this.element.value;
                    this.element.focus(), this.isPrevFocused = !1;
                    var ele_1 = this.element;
                    setTimeout(function() {
                        _this.setElementValue(value_1, ele_1);
                    }, 200);
                }
            } else {
                this.isFocused = !1, this.element.value.length || this.setProperties({
                    value: null
                }, !0);
                var parsedInput = this.instance.getNumberParser({
                    format: "n"
                })(this.element.value);
                this.updateValue(parsedInput), Browser.isDevice || EventHandler.remove(this.element, "mousewheel DOMMouseScroll", this.mouseWheel);
            }
        }, NumericTextBox.prototype.mouseDownOnSpinner = function(event) {
            var _this = this;
            if (this.isFocused && (this.isPrevFocused = !0, event.preventDefault()), this.getElementData(event)) {
                this.getElementData(event);
                var target = event.currentTarget, action = target.classList.contains("e-spin-up") ? "increment" : "decrement";
                EventHandler.add(target, "mouseleave", this.mouseUpClick, this), this.timeOut = setInterval(function() {
                    _this.isCalled = !0, _this.action(action, event);
                }, 150), EventHandler.add(document, "mouseup", this.mouseUpClick, this);
            }
        }, NumericTextBox.prototype.touchMoveOnSpinner = function(event) {
            document.elementFromPoint(event.clientX, event.clientY).classList.contains(SPINICON) || clearInterval(this.timeOut);
        }, NumericTextBox.prototype.mouseUpOnSpinner = function(event) {
            if (this.isPrevFocused && (this.element.focus(), Browser.isDevice || (this.isPrevFocused = !1)), 
            Browser.isDevice || event.preventDefault(), this.getElementData(event)) {
                var target = event.currentTarget, action = target.classList.contains("e-spin-up") ? "increment" : "decrement";
                EventHandler.remove(target, "mouseleave", this.mouseUpClick), this.isCalled || this.action(action, event), 
                this.isCalled = !1, EventHandler.remove(document, "mouseup", this.mouseUpClick);
            }
        }, NumericTextBox.prototype.getElementData = function(event) {
            return !(event.which && 3 === event.which || event.button && 2 === event.button || !this.enabled || this.readonly) && (clearInterval(this.timeOut), 
            !0);
        }, NumericTextBox.prototype.mouseUpClick = function(event) {
            event.stopPropagation(), clearInterval(this.timeOut), this.isCalled = !1, EventHandler.remove(this.spinUp, "mouseleave", this.mouseUpClick), 
            EventHandler.remove(this.spinDown, "mouseleave", this.mouseUpClick);
        }, NumericTextBox.prototype.increment = function(step) {
            void 0 === step && (step = this.step), this.changeValue(this.performAction(this.value, step, "increment"));
        }, NumericTextBox.prototype.decrement = function(step) {
            void 0 === step && (step = this.step), this.changeValue(this.performAction(this.value, step, "decrement"));
        }, NumericTextBox.prototype.destroy = function() {
            this.unwireEvents(), detach(this.hiddenInput), this.showSpinButton && (this.unwireSpinBtnEvents(), 
            detach(this.spinUp), detach(this.spinDown)), this.container.parentElement.appendChild(this.cloneElement), 
            detach(this.container), _super.prototype.destroy.call(this);
        }, NumericTextBox.prototype.getText = function() {
            return this.element.value;
        }, NumericTextBox.prototype.getPersistData = function() {
            return this.addOnPersist([ "value" ]);
        }, NumericTextBox.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                var prop = _a[_i];
                switch (prop) {
                  case "width":
                    setStyleAttribute(this.container, {
                        width: formatUnit(newProp.width)
                    });
                    break;

                  case "cssClass":
                    Input.setCssClass(newProp.cssClass, [ this.container ], oldProp.cssClass);
                    break;

                  case "enabled":
                    Input.setEnabled(newProp.enabled, this.element);
                    break;

                  case "enableRtl":
                    Input.setEnableRtl(newProp.enableRtl, [ this.container ]);
                    break;

                  case "readonly":
                    Input.setReadonly(newProp.readonly, this.element), this.readonly ? attributes(this.element, {
                        "aria-readonly": "true"
                    }) : this.element.removeAttribute("aria-readonly");
                    break;

                  case "placeholder":
                    Input.setPlaceholder(newProp.placeholder, this.element);
                    break;

                  case "step":
                    this.step = newProp.step, this.validateStep();
                    break;

                  case "showSpinButton":
                    newProp.showSpinButton ? this.spinBtnCreation() : (detach(this.spinUp), detach(this.spinDown));
                    break;

                  case "value":
                    this.updateValue(newProp.value);
                    break;

                  case "min":
                  case "max":
                    setValue(prop, getValue(prop, newProp), this), this.validateMinMax(), this.updateValue(this.value);
                    break;

                  case "strictMode":
                    this.strictMode = newProp.strictMode, this.updateValue(this.value), this.validateState();
                    break;

                  case "locale":
                    this.initCultureFunc(), this.l10n.setLocale(this.locale), isNullOrUndefined(this.spinDown) || attributes(this.spinDown, {
                        title: this.l10n.getConstant("decrementTitle"),
                        "aria-label": this.l10n.getConstant("decrementTitle")
                    }), isNullOrUndefined(this.spinUp) || attributes(this.spinUp, {
                        title: this.l10n.getConstant("incrementTitle"),
                        "aria-label": this.l10n.getConstant("incrementTitle")
                    }), this.updatePlaceholder(), Input.setPlaceholder(this.placeholder, this.element), 
                    this.updateValue(this.value);
                    break;

                  case "currency":
                    var propVal = getValue(prop, newProp);
                    this.setProperties({
                        currencyCode: propVal
                    }, !0), this.updateCurrency(prop, propVal);
                    break;

                  case "currencyCode":
                    var propValue = getValue(prop, newProp);
                    this.setProperties({
                        currency: propValue
                    }, !0), this.updateCurrency("currency", propValue);
                    break;

                  case "format":
                    setValue(prop, getValue(prop, newProp), this), this.initCultureInfo(), this.updateValue(this.value);
                    break;

                  case "decimals":
                    this.decimals = newProp.decimals, this.updateValue(this.value);
                }
            }
        }, NumericTextBox.prototype.getModuleName = function() {
            return "numerictextbox";
        }, __decorate$6([ Property("") ], NumericTextBox.prototype, "cssClass", void 0), 
        __decorate$6([ Property(null) ], NumericTextBox.prototype, "value", void 0), __decorate$6([ Property(-Number.MAX_VALUE) ], NumericTextBox.prototype, "min", void 0), 
        __decorate$6([ Property(Number.MAX_VALUE) ], NumericTextBox.prototype, "max", void 0), 
        __decorate$6([ Property(1) ], NumericTextBox.prototype, "step", void 0), __decorate$6([ Property(null) ], NumericTextBox.prototype, "width", void 0), 
        __decorate$6([ Property(null) ], NumericTextBox.prototype, "placeholder", void 0), 
        __decorate$6([ Property(!0) ], NumericTextBox.prototype, "showSpinButton", void 0), 
        __decorate$6([ Property(!1) ], NumericTextBox.prototype, "readonly", void 0), __decorate$6([ Property(!0) ], NumericTextBox.prototype, "enabled", void 0), 
        __decorate$6([ Property(!1) ], NumericTextBox.prototype, "enableRtl", void 0), __decorate$6([ Property(!1) ], NumericTextBox.prototype, "enablePersistence", void 0), 
        __decorate$6([ Property("n2") ], NumericTextBox.prototype, "format", void 0), __decorate$6([ Property(null) ], NumericTextBox.prototype, "decimals", void 0), 
        __decorate$6([ Property(null) ], NumericTextBox.prototype, "currency", void 0), 
        __decorate$6([ Property(null) ], NumericTextBox.prototype, "currencyCode", void 0), 
        __decorate$6([ Property(!0) ], NumericTextBox.prototype, "strictMode", void 0), 
        __decorate$6([ Property(!1) ], NumericTextBox.prototype, "validateDecimalOnType", void 0), 
        __decorate$6([ Property("Never") ], NumericTextBox.prototype, "floatLabelType", void 0), 
        __decorate$6([ Event() ], NumericTextBox.prototype, "created", void 0), __decorate$6([ Event() ], NumericTextBox.prototype, "destroyed", void 0), 
        __decorate$6([ Event() ], NumericTextBox.prototype, "change", void 0), NumericTextBox = __decorate$6([ NotifyPropertyChanges ], NumericTextBox);
    }(Component), ERROR$1 = "e-error", INPUTGROUP = "e-input-group", FLOATINPUT = "e-float-input", UTILMASK = "e-utility-mask", TOPLABEL = "e-label-top", BOTTOMLABEL = "e-label-bottom", regularExpressions = {
        "0": "[0-9]",
        "9": "[0-9 ]",
        "#": "[0-9 +-]",
        L: "[A-Za-z]",
        "?": "[A-Za-z ]",
        "&": "[^ ]+",
        C: "[^]+",
        A: "[A-Za-z0-9]",
        a: "[A-Za-z0-9 ]"
    }, MaskUndo = function() {
        return function() {};
    }(), __extends$1$4 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$1$4 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, MaskedTextBox = function(_super) {
        function MaskedTextBox(options, element) {
            return _super.call(this, options, element) || this;
        }
        return __extends$1$4(MaskedTextBox, _super), MaskedTextBox.prototype.getModuleName = function() {
            return "maskedtextbox";
        }, MaskedTextBox.prototype.preRender = function() {
            this.promptMask = "", this.hiddenMask = "", this.escapeMaskValue = "", this.regExpCollec = regularExpressions, 
            this.customRegExpCollec = [], this.undoCollec = [], this.redoCollec = [], this.changeEventArgs = {}, 
            this.focusEventArgs = {}, this.maskKeyPress = !1, this.isFocus = !1, this.isInitial = !1, 
            this.isIosInvalid = !1;
            var ejInstance = getValue("ej2_instances", this.element);
            if (this.cloneElement = this.element.cloneNode(!0), this.angularTagName = null, 
            "EJS-MASKEDTEXTBOX" === this.element.tagName) {
                this.angularTagName = this.element.tagName;
                for (var input = createElement("input"), i = 0; i < this.element.attributes.length; i++) input.setAttribute(this.element.attributes[i].nodeName, this.element.attributes[i].nodeValue), 
                input.innerHTML = this.element.innerHTML;
                this.element.parentNode.appendChild(input), this.element.parentNode.removeChild(this.element), 
                this.element = input, setValue("ej2_instances", ejInstance, this.element);
            }
        }, MaskedTextBox.prototype.getPersistData = function() {
            return this.addOnPersist([ "value" ]);
        }, MaskedTextBox.prototype.render = function() {
            "input" === this.element.tagName.toLowerCase() && ("Never" === this.floatLabelType && addClass([ this.element ], "e-input"), 
            this.createWrapper(), this.isInitial = !0, this.resetMaskedTextBox(), this.isInitial = !1, 
            this.setMaskPlaceholder(!0), this.setWidth(this.width));
        }, MaskedTextBox.prototype.resetMaskedTextBox = function() {
            this.promptMask = "", this.hiddenMask = "", this.escapeMaskValue = "", this.customRegExpCollec = [], 
            this.undoCollec = [], this.redoCollec = [], this.promptChar.length > 1 && (this.promptChar = this.promptChar[0]), 
            createMask.call(this), applyMask.call(this);
            var val = strippedValue.call(this, this.element);
            this.prevValue = val, this.value = val, this.isInitial || unwireEvents.call(this), 
            wireEvents.call(this);
        }, MaskedTextBox.prototype.setMaskPlaceholder = function(setVal) {
            this.placeholder && (Input.setPlaceholder(this.placeholder, this.element), this.element.value === this.promptMask && setVal && "Always" !== this.floatLabelType && setElementValue.call(this, ""), 
            "Never" === this.floatLabelType && maskInputBlurHandler.call(this));
        }, MaskedTextBox.prototype.setCssClass = function(cssClass, element) {
            cssClass && addClass(element, cssClass);
        }, MaskedTextBox.prototype.setWidth = function(width) {
            isNullOrUndefined(width) || (this.element.style.width = formatUnit(width));
        }, MaskedTextBox.prototype.createWrapper = function() {
            this.inputObj = Input.createInput({
                element: this.element,
                customTag: this.angularTagName,
                floatLabelType: this.floatLabelType,
                properties: {
                    enableRtl: this.enableRtl,
                    enabled: this.enabled,
                    placeholder: this.placeholder
                }
            }), this.inputObj.container.setAttribute("class", "e-widget e-control-wrapper e-mask " + this.inputObj.container.getAttribute("class"));
        }, MaskedTextBox.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "value":
                    setMaskValue.call(this, this.value), this.placeholder && this.setMaskPlaceholder(!1);
                    break;

                  case "placeholder":
                    this.setMaskPlaceholder(!0);
                    break;

                  case "width":
                    this.setWidth(newProp.width);
                    break;

                  case "cssClass":
                    this.setCssClass(newProp.cssClass, [ this.inputObj.container ]);
                    break;

                  case "enabled":
                    Input.setEnabled(newProp.enabled, this.element);
                    break;

                  case "enableRtl":
                    Input.setEnableRtl(newProp.enableRtl, [ this.inputObj.container ]);
                    break;

                  case "customCharacters":
                    this.customCharacters = newProp.customCharacters, this.resetMaskedTextBox();
                    break;

                  case "mask":
                    var strippedValue_1 = this.value;
                    this.mask = newProp.mask, this.updateValue(strippedValue_1);
                    break;

                  case "promptChar":
                    newProp.promptChar.length > 1 && (newProp.promptChar = newProp.promptChar[0]), newProp.promptChar ? this.promptChar = newProp.promptChar : this.promptChar = "_";
                    var value = this.element.value.replace(new RegExp("[" + oldProp.promptChar + "]", "g"), this.promptChar);
                    this.promptMask === this.element.value && (value = this.promptMask.replace(new RegExp("[" + oldProp.promptChar + "]", "g"), this.promptChar)), 
                    this.promptMask = this.promptMask.replace(new RegExp("[" + oldProp.promptChar + "]", "g"), this.promptChar), 
                    this.undoCollec = this.redoCollec = [], setElementValue.call(this, value);
                }
            }
        }, MaskedTextBox.prototype.updateValue = function(strippedVal) {
            this.resetMaskedTextBox(), setMaskValue.call(this, strippedVal);
        }, MaskedTextBox.prototype.getMaskedValue = function() {
            return unstrippedValue.call(this, this.element);
        }, MaskedTextBox.prototype.destroy = function() {
            unwireEvents.call(this), this.inputObj.container.parentElement.appendChild(this.cloneElement), 
            detach(this.inputObj.container), _super.prototype.destroy.call(this);
        }, __decorate$1$4([ Property(null) ], MaskedTextBox.prototype, "cssClass", void 0), 
        __decorate$1$4([ Property(null) ], MaskedTextBox.prototype, "width", void 0), __decorate$1$4([ Property(null) ], MaskedTextBox.prototype, "placeholder", void 0), 
        __decorate$1$4([ Property("Never") ], MaskedTextBox.prototype, "floatLabelType", void 0), 
        __decorate$1$4([ Property(!0) ], MaskedTextBox.prototype, "enabled", void 0), __decorate$1$4([ Property(!1) ], MaskedTextBox.prototype, "enablePersistence", void 0), 
        __decorate$1$4([ Property(!1) ], MaskedTextBox.prototype, "enableRtl", void 0), 
        __decorate$1$4([ Property(null) ], MaskedTextBox.prototype, "mask", void 0), __decorate$1$4([ Property("_") ], MaskedTextBox.prototype, "promptChar", void 0), 
        __decorate$1$4([ Property(null) ], MaskedTextBox.prototype, "value", void 0), __decorate$1$4([ Property(null) ], MaskedTextBox.prototype, "customCharacters", void 0), 
        __decorate$1$4([ Event() ], MaskedTextBox.prototype, "created", void 0), __decorate$1$4([ Event() ], MaskedTextBox.prototype, "destroyed", void 0), 
        __decorate$1$4([ Event() ], MaskedTextBox.prototype, "change", void 0), __decorate$1$4([ Event() ], MaskedTextBox.prototype, "focus", void 0), 
        MaskedTextBox = __decorate$1$4([ NotifyPropertyChanges ], MaskedTextBox);
    }(Component), __extends$2$4 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$2$4 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, TicksData = function(_super) {
        function TicksData() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$2$4(TicksData, _super), __decorate$2$4([ Property("None") ], TicksData.prototype, "placement", void 0), 
        __decorate$2$4([ Property(10) ], TicksData.prototype, "largeStep", void 0), __decorate$2$4([ Property(1) ], TicksData.prototype, "smallStep", void 0), 
        __decorate$2$4([ Property(!1) ], TicksData.prototype, "showSmallTicks", void 0), 
        __decorate$2$4([ Property(null) ], TicksData.prototype, "format", void 0), TicksData;
    }(ChildProperty), TooltipData = function(_super) {
        function TooltipData() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$2$4(TooltipData, _super), __decorate$2$4([ Property("") ], TooltipData.prototype, "cssClass", void 0), 
        __decorate$2$4([ Property("Before") ], TooltipData.prototype, "placement", void 0), 
        __decorate$2$4([ Property("Focus") ], TooltipData.prototype, "showOn", void 0), 
        __decorate$2$4([ Property(!1) ], TooltipData.prototype, "isVisible", void 0), __decorate$2$4([ Property(null) ], TooltipData.prototype, "format", void 0), 
        TooltipData;
    }(ChildProperty), classNames_root = "e-slider", classNames_rtl = "e-rtl", classNames_sliderHiddenInput = "e-slider-input", classNames_sliderHandle = "e-handle", classNames_rangeBar = "e-range", classNames_sliderButton = "e-slider-button", classNames_firstButton = "e-first-button", classNames_secondButton = "e-second-button", classNames_scale = "e-scale", classNames_tick = "e-tick", classNames_large = "e-large", classNames_tickValue = "e-tick-value", classNames_sliderTooltip = "e-slider-tooltip", classNames_sliderHover = "e-slider-hover", classNames_sliderFirstHandle = "e-handle-first", classNames_sliderSecondHandle = "e-handle-second", classNames_sliderDisabled = "e-disabled", classNames_sliderContainer = "e-slider-container", classNames_horizontalTooltipBefore = "e-slider-horizontal-before", classNames_horizontalTooltipAfter = "e-slider-horizontal-after", classNames_verticalTooltipBefore = "e-slider-vertical-before", classNames_verticalTooltipAfter = "e-slider-vertical-after", classNames_materialTooltipOpen = "e-material-tooltip-open", classNames_materialTooltipActive = "e-tooltip-active", classNames_materialSlider = "e-material-slider", classNames_sliderTrack = "e-slider-track", classNames_sliderHandleFocused = "e-handle-focused", classNames_verticalSlider = "e-vertical", classNames_horizontalSlider = "e-horizontal", classNames_sliderHandleStart = "e-handle-start", classNames_sliderTooltipStart = "e-material-tooltip-start", classNames_sliderTabHandle = "e-tab-handle", classNames_sliderButtonIcon = "e-button-icon", classNames_sliderSmallSize = "e-small-size", classNames_sliderTickPosition = "e-tick-pos", classNames_sliderFirstTick = "e-first-tick", classNames_sliderLastTick = "e-last-tick", classNames_sliderButtonClass = "e-slider-btn", classNames_sliderTabTrack = "e-tab-track", classNames_sliderTabRange = "e-tab-range", classNames_sliderActiveHandle = "e-handle-active", classNames_sliderMaterialHandle = "e-material-handle", classNames_sliderMaterialRange = "e-material-range", classNames_sliderMaterialDefault = "e-material-default", classNames_materialTooltipShow = "e-material-tooltip-show", classNames_materialTooltipHide = "e-material-tooltip-hide", classNames_readOnly = "e-read-only", Slider = function(_super) {
        function Slider(options, element) {
            var _this = _super.call(this, options, element) || this;
            return _this.horDir = "left", _this.verDir = "bottom", _this.transition = {
                handle: "left .4s cubic-bezier(.25, .8, .25, 1), right .4s cubic-bezier(.25, .8, .25, 1), top .4s cubic-bezier(.25, .8, .25, 1) , bottom .4s cubic-bezier(.25, .8, .25, 1)",
                rangeBar: "all .4s cubic-bezier(.25, .8, .25, 1)"
            }, _this.transitionOnMaterialTooltip = {
                handle: "left 1ms ease-out, right 1ms ease-out, bottom 1ms ease-out",
                rangeBar: "left 1ms ease-out, right 1ms ease-out, bottom 1ms ease-out, width 1ms ease-out, height 1ms ease-out"
            }, _this.scaleTransform = "transform .4s cubic-bezier(.25, .8, .25, 1)", _this.customAriaText = null, 
            _this;
        }
        return __extends$2$4(Slider, _super), Slider.prototype.preRender = function() {
            this.l10n = new L10n("slider", {
                incrementTitle: "Increase",
                decrementTitle: "Decrease"
            }, this.locale), this.tickElementCollection = [], this.tooltipFormatInfo = {}, this.ticksFormatInfo = {}, 
            this.initCultureInfo(), this.initCultureFunc();
        }, Slider.prototype.initCultureFunc = function() {
            this.internationalization = new Internationalization(this.locale);
        }, Slider.prototype.initCultureInfo = function() {
            this.tooltipFormatInfo.format = isNullOrUndefined(this.tooltip.format) ? null : this.tooltip.format, 
            this.ticksFormatInfo.format = isNullOrUndefined(this.ticks.format) ? null : this.ticks.format;
        }, Slider.prototype.formatString = function(value, formatInfo) {
            var formatValue = null, formatString = null;
            if (value || 0 === value) {
                formatValue = this.formatNumber(value);
                var numberOfDecimals = this.numberOfDecimals(value);
                formatString = this.internationalization.getNumberFormat(formatInfo)(this.makeRoundNumber(value, numberOfDecimals));
            }
            return {
                elementVal: formatValue,
                formatString: formatString
            };
        }, Slider.prototype.formatNumber = function(value) {
            var numberOfDecimals = this.numberOfDecimals(value);
            return this.internationalization.getNumberFormat({
                maximumFractionDigits: numberOfDecimals,
                minimumFractionDigits: numberOfDecimals,
                useGrouping: !1
            })(value);
        }, Slider.prototype.numberOfDecimals = function(value) {
            var decimalPart = value.toString().split(".")[1];
            return decimalPart && decimalPart.length ? decimalPart.length : 0;
        }, Slider.prototype.makeRoundNumber = function(value, precision) {
            var decimals = precision || 0;
            return Number(value.toFixed(decimals));
        }, Slider.prototype.fractionalToInteger = function(value) {
            value = 0 === this.numberOfDecimals(value) ? Number(value).toFixed(this.noOfDecimals) : value;
            for (var tens = 1, i = 0; i < this.noOfDecimals; i++) tens *= 10;
            return value = Number((value * tens).toFixed(0));
        }, Slider.prototype.render = function() {
            this.initialize(), this.initRender(), this.wireEvents(), this.setZindex();
        }, Slider.prototype.initialize = function() {
            addClass([ this.element ], classNames_root), this.setCSSClass();
        }, Slider.prototype.setCSSClass = function(oldCSSClass) {
            oldCSSClass && removeClass([ this.element ], oldCSSClass.split(" ")), this.cssClass && addClass([ this.element ], this.cssClass.split(" "));
        }, Slider.prototype.setEnabled = function() {
            var tooltipElement = "Range" !== this.type ? [ this.firstTooltipElement ] : [ this.firstTooltipElement, this.secondTooltipElement ];
            this.enabled ? (removeClass([ this.sliderContainer ], [ classNames_sliderDisabled ]), 
            this.tooltip.isVisible && "Always" === this.tooltip.showOn && tooltipElement.forEach(function(tooltipElement) {
                tooltipElement.classList.remove(classNames_sliderDisabled);
            }), this.wireEvents()) : (addClass([ this.sliderContainer ], [ classNames_sliderDisabled ]), 
            this.tooltip.isVisible && "Always" === this.tooltip.showOn && tooltipElement.forEach(function(tooltipElement) {
                tooltipElement.classList.add(classNames_sliderDisabled);
            }), this.unwireEvents());
        }, Slider.prototype.getTheme = function(container) {
            return window.getComputedStyle(container, ":after").getPropertyValue("content").replace(/['"]+/g, "");
        }, Slider.prototype.initRender = function() {
            this.sliderContainer = createElement("div", {
                className: classNames_sliderContainer
            }), this.element.parentNode.insertBefore(this.sliderContainer, this.element), this.sliderContainer.appendChild(this.element), 
            this.sliderTrack = createElement("div", {
                className: classNames_sliderTrack
            }), this.element.appendChild(this.sliderTrack), this.element.tabIndex = -1, this.isMaterial = "material" === this.getTheme(this.sliderContainer), 
            this.setHandler(), this.createRangeBar(), this.setOrientClass(), this.hiddenInput = createElement("input", {
                attrs: {
                    type: "hidden",
                    value: isNullOrUndefined(this.value) ? this.min.toString() : this.value.toString(),
                    name: this.element.getAttribute("name") || this.element.getAttribute("id") || "_" + (1e3 * Math.random()).toFixed(0) + "slider",
                    class: classNames_sliderHiddenInput
                }
            }), this.hiddenInput.tabIndex = -1, this.sliderContainer.appendChild(this.hiddenInput), 
            this.showButtons && this.setButtons(), this.setEnableRTL(), "Range" === this.type ? this.rangeValueUpdate() : this.value = isNullOrUndefined(this.value) ? parseFloat(formatUnit(this.min.toString())) : this.value, 
            this.previousVal = "Range" !== this.type ? this.checkHandleValue(parseFloat(formatUnit(this.value.toString()))) : [ this.checkHandleValue(parseFloat(formatUnit(this.value[0].toString()))), this.checkHandleValue(parseFloat(formatUnit(this.value[1].toString()))) ], 
            this.previousChanged = this.previousVal, this.setValue(), "None" !== this.ticks.placement && this.renderScale(), 
            this.tooltip.isVisible && this.renderTooltip(), this.enabled ? removeClass([ this.sliderContainer ], [ classNames_sliderDisabled ]) : addClass([ this.sliderContainer ], [ classNames_sliderDisabled ]), 
            this.readOnly ? addClass([ this.sliderContainer ], [ classNames_readOnly ]) : removeClass([ this.sliderContainer ], [ classNames_readOnly ]);
        }, Slider.prototype.createRangeBar = function() {
            "Default" !== this.type && (this.rangeBar = createElement("div", {
                attrs: {
                    class: classNames_rangeBar
                }
            }), this.element.appendChild(this.rangeBar));
        }, Slider.prototype.setOrientClass = function() {
            "Vertical" !== this.orientation ? (this.sliderContainer.classList.remove(classNames_verticalSlider), 
            this.sliderContainer.classList.add(classNames_horizontalSlider), this.firstHandle.setAttribute("aria-orientation", "horizontal"), 
            "Range" === this.type && this.secondHandle.setAttribute("aria-orientation", "horizontal")) : (this.sliderContainer.classList.remove(classNames_horizontalSlider), 
            this.sliderContainer.classList.add(classNames_verticalSlider), this.firstHandle.setAttribute("aria-orientation", "vertical"), 
            "Range" === this.type && this.secondHandle.setAttribute("aria-orientation", "vertical"));
        }, Slider.prototype.setAriaAttributes = function(element) {
            var _this = this;
            if ("Range" !== this.type) attributes(element, {
                "aria-valuemin": this.min.toString(),
                "aria-valuemax": this.max.toString()
            }); else {
                [ [ this.min.toString(), this.value[1].toString() ], [ this.value[0].toString(), this.max.toString() ] ].forEach(function(range, index) {
                    var element = 0 === index ? _this.firstHandle : _this.secondHandle;
                    element && attributes(element, {
                        "aria-valuemin": range[0],
                        "aria-valuemax": range[1]
                    });
                });
            }
        }, Slider.prototype.createSecondHandle = function() {
            this.secondHandle = createElement("div", {
                attrs: {
                    class: classNames_sliderHandle,
                    role: "slider",
                    "aria-labelledby": this.element.id + "_title",
                    tabIndex: "0"
                }
            }), this.secondHandle.classList.add(classNames_sliderSecondHandle), this.element.appendChild(this.secondHandle), 
            this.isMaterial && this.tooltip.isVisible && (this.secondMaterialHandle = createElement("div", {
                attrs: {
                    class: classNames_sliderHandle + " " + classNames_sliderMaterialHandle
                }
            }), this.element.appendChild(this.secondMaterialHandle));
        }, Slider.prototype.createFirstHandle = function() {
            this.firstHandle = createElement("div", {
                attrs: {
                    class: classNames_sliderHandle,
                    role: "slider",
                    "aria-labelledby": this.element.id + "_title",
                    tabIndex: "0"
                }
            }), this.firstHandle.classList.add(classNames_sliderFirstHandle), this.element.appendChild(this.firstHandle), 
            this.isMaterial && this.tooltip.isVisible && (this.firstMaterialHandle = createElement("div", {
                attrs: {
                    class: classNames_sliderHandle + " " + classNames_sliderMaterialHandle
                }
            }), this.element.appendChild(this.firstMaterialHandle));
        }, Slider.prototype.wireFirstHandleEvt = function(destroy) {
            destroy ? (EventHandler.remove(this.firstHandle, "mousedown touchstart", this.handleFocus), 
            EventHandler.remove(this.firstHandle, "transitionend", this.transitionEnd), EventHandler.remove(this.firstHandle, "mouseenter touchenter", this.handleOver), 
            EventHandler.remove(this.firstHandle, "mouseleave touchend", this.handleLeave)) : (EventHandler.add(this.firstHandle, "mousedown touchstart", this.handleFocus, this), 
            EventHandler.add(this.firstHandle, "transitionend", this.transitionEnd, this), EventHandler.add(this.firstHandle, "mouseenter touchenter", this.handleOver, this), 
            EventHandler.add(this.firstHandle, "mouseleave touchend", this.handleLeave, this));
        }, Slider.prototype.wireSecondHandleEvt = function(destroy) {
            destroy ? (EventHandler.remove(this.secondHandle, "mousedown touchstart", this.handleFocus), 
            EventHandler.remove(this.secondHandle, "transitionend", this.transitionEnd), EventHandler.remove(this.secondHandle, "mouseenter touchenter", this.handleOver), 
            EventHandler.remove(this.secondHandle, "mouseleave touchend", this.handleLeave)) : (EventHandler.add(this.secondHandle, "mousedown touchstart", this.handleFocus, this), 
            EventHandler.add(this.secondHandle, "transitionend", this.transitionEnd, this), 
            EventHandler.add(this.secondHandle, "mouseenter touchenter", this.handleOver, this), 
            EventHandler.add(this.secondHandle, "mouseleave touchend", this.handleLeave, this));
        }, Slider.prototype.handleStart = function() {
            var pos = 1 === this.activeHandle ? this.handlePos1 : this.handlePos2, tooltipElement = 1 === this.activeHandle ? this.firstTooltipElement : this.secondTooltipElement;
            0 === pos && "Range" !== this.type && (this.getHandle().classList.add(classNames_sliderHandleStart), 
            this.isMaterial && this.tooltip.isVisible && (this.firstMaterialHandle.classList.add(classNames_sliderHandleStart), 
            tooltipElement && tooltipElement.classList.add(classNames_sliderTooltipStart)));
        }, Slider.prototype.transitionEnd = function(e) {
            if (this.handleStart(), this.getHandle().style.transition = "none", "Default" !== this.type && (this.rangeBar.style.transition = "none"), 
            this.tooltip.isVisible) {
                var tooltipObj = 1 === this.activeHandle ? this.firstTooltipObj : this.secondTooltipObj, tooltipElement = 1 === this.activeHandle ? this.firstTooltipElement : this.secondTooltipElement;
                this.isMaterial ? tooltipElement.classList.contains(classNames_materialTooltipOpen) || "transform" === e.propertyName ? ("Default" === this.type && (tooltipElement.style.transition = this.transition.handle), 
                this.refreshTooltip()) : this.openMaterialTooltip() : (tooltipObj.animation = {
                    open: {
                        effect: "None"
                    },
                    close: {
                        effect: "FadeOut",
                        duration: 500
                    }
                }, this.tooltipAnimation());
            }
            "Always" !== this.tooltip.showOn && this.closeTooltip();
        }, Slider.prototype.handleFocusOut = function() {
            this.firstHandle.classList.contains(classNames_sliderHandleFocused) && this.firstHandle.classList.remove(classNames_sliderHandleFocused), 
            "Range" === this.type && this.secondHandle.classList.contains(classNames_sliderHandleFocused) && this.secondHandle.classList.remove(classNames_sliderHandleFocused);
        }, Slider.prototype.handleFocus = function(e) {
            e.currentTarget === this.firstHandle ? this.firstHandle.classList.add(classNames_sliderHandleFocused) : this.secondHandle.classList.add(classNames_sliderHandleFocused);
        }, Slider.prototype.handleOver = function(e) {
            if (this.tooltip.isVisible && "Hover" === this.tooltip.showOn) {
                this.tooltipValue();
                (e.currentTarget === this.firstHandle ? this.firstTooltipObj : this.secondTooltipObj).animation = {
                    open: {
                        effect: "None"
                    },
                    close: {
                        effect: "FadeOut",
                        duration: 500
                    }
                }, e.currentTarget === this.firstHandle ? this.firstTooltipObj.open(this.firstHandle) : this.secondTooltipObj.open(this.secondHandle);
            }
        }, Slider.prototype.handleLeave = function(e) {
            if (this.tooltip.isVisible && "Hover" === this.tooltip.showOn && !e.currentTarget.classList.contains(classNames_sliderHandleFocused) && !e.currentTarget.classList.contains(classNames_sliderTabHandle)) {
                this.tooltipValue();
                var tooltipObj = e.currentTarget === this.firstHandle ? this.firstTooltipObj : this.secondTooltipObj;
                e.currentTarget === this.firstHandle ? this.firstTooltipObj.close() : this.secondTooltipObj.close(), 
                tooltipObj.animation = {
                    open: {
                        effect: "None"
                    },
                    close: {
                        effect: "FadeOut",
                        duration: 500
                    }
                };
            }
        }, Slider.prototype.setHandler = function() {
            this.min > this.max && (this.min = this.max), this.createFirstHandle(), "Range" === this.type && this.createSecondHandle();
        }, Slider.prototype.setEnableRTL = function() {
            this.enableRtl && "Vertical" !== this.orientation ? addClass([ this.sliderContainer ], classNames_rtl) : removeClass([ this.sliderContainer ], classNames_rtl);
            var preDir = "Vertical" !== this.orientation ? this.horDir : this.verDir;
            this.enableRtl ? (this.horDir = "right", this.verDir = "bottom") : (this.horDir = "left", 
            this.verDir = "bottom");
            preDir !== ("Vertical" !== this.orientation ? this.horDir : this.verDir) && "Horizontal" === this.orientation && (setStyleAttribute(this.firstHandle, {
                right: "",
                left: "auto"
            }), "Range" === this.type && setStyleAttribute(this.secondHandle, {
                top: "",
                left: "auto"
            }));
        }, Slider.prototype.tooltipValue = function() {
            var text, args = {
                value: this.value,
                text: ""
            };
            this.setTooltipContent(), args.text = text = this.firstTooltipObj.content, this.trigger("tooltipChange", args), 
            this.addTooltipClass(args.text), text !== args.text && (this.customAriaText = args.text, 
            this.firstTooltipObj.content = args.text, this.setAriaAttrValue(this.firstHandle), 
            "Range" === this.type && (this.secondTooltipObj.content = args.text, this.setAriaAttrValue(this.secondHandle)));
        }, Slider.prototype.setTooltipContent = function() {
            if ("Range" === this.type) {
                var content_1 = this.formatContent(this.tooltipFormatInfo, !1);
                this.firstTooltipObj.content = content_1, this.secondTooltipObj.content = content_1;
            } else if (!isNullOrUndefined(this.handleVal1)) {
                var content_2 = this.formatContent(this.tooltipFormatInfo, !1);
                this.firstTooltipObj.content = content_2;
            }
        }, Slider.prototype.formatContent = function(formatInfo, ariaContent) {
            var content = "";
            return ariaContent ? ("Range" === this.type ? content = this.enableRtl && "Vertical" !== this.orientation ? isNullOrUndefined(this.tooltip) || isNullOrUndefined(this.tooltip.format) ? this.handleVal2.toString() + " - " + this.handleVal1.toString() : this.formatString(this.handleVal2, formatInfo).elementVal + " - " + this.formatString(this.handleVal1, formatInfo).elementVal : isNullOrUndefined(this.tooltip) || isNullOrUndefined(this.tooltip.format) ? this.handleVal1.toString() + " - " + this.handleVal2.toString() : this.formatString(this.handleVal1, formatInfo).elementVal + " - " + this.formatString(this.handleVal2, formatInfo).elementVal : isNullOrUndefined(this.handleVal1) || (content = isNullOrUndefined(this.tooltip) || isNullOrUndefined(this.tooltip.format) ? this.handleVal1.toString() : this.formatString(this.handleVal1, formatInfo).elementVal), 
            content) : ("Range" === this.type ? content = this.enableRtl && "Vertical" !== this.orientation ? isNullOrUndefined(formatInfo.format) ? this.handleVal2.toString() + " - " + this.handleVal1.toString() : this.formatString(this.handleVal2, formatInfo).formatString + " - " + this.formatString(this.handleVal1, formatInfo).formatString : isNullOrUndefined(formatInfo.format) ? this.handleVal1.toString() + " - " + this.handleVal2.toString() : this.formatString(this.handleVal1, formatInfo).formatString + " - " + this.formatString(this.handleVal2, formatInfo).formatString : isNullOrUndefined(this.handleVal1) || (content = isNullOrUndefined(formatInfo.format) ? this.handleVal1.toString() : this.formatString(this.handleVal1, formatInfo).formatString), 
            content);
        }, Slider.prototype.addTooltipClass = function(content) {
            var _this = this;
            if (this.isMaterial && this.tooltip.isVisible) {
                var count_1 = content.toString().length;
                ("Range" !== this.type ? [ this.firstTooltipElement ] : [ this.firstTooltipElement, this.secondTooltipElement ]).forEach(function(element, index) {
                    if (element) count_1 > 4 ? (element.classList.remove(classNames_sliderMaterialDefault), 
                    element.classList.contains(classNames_sliderMaterialRange) || (element.classList.add(classNames_sliderMaterialRange), 
                    element.style.transform = "scale(1)")) : (element.classList.remove(classNames_sliderMaterialRange), 
                    element.classList.contains(classNames_sliderMaterialDefault) || (element.classList.add(classNames_sliderMaterialDefault), 
                    element.style.transform = _this.getTooltipTransformProperties(_this.previousTooltipClass).rotate)); else {
                        var cssClass = count_1 > 4 ? classNames_sliderMaterialRange : classNames_sliderMaterialDefault;
                        index ? _this.secondTooltipObj.cssClass = classNames_sliderTooltip + " " + cssClass : _this.firstTooltipObj.cssClass = classNames_sliderTooltip + " " + cssClass;
                    }
                });
            }
        }, Slider.prototype.tooltipPlacement = function() {
            var tooltipPosition;
            tooltipPosition = "Horizontal" === this.orientation ? "Before" === this.tooltip.placement ? "TopCenter" : "BottomCenter" : "Before" === this.tooltip.placement ? "LeftCenter" : "RightCenter", 
            this.firstTooltipObj.position = tooltipPosition, "Range" === this.type && (this.secondTooltipObj.position = tooltipPosition), 
            this.isMaterial && (this.firstTooltipObj.showTipPointer = !0, this.setProperties({
                tooltip: {
                    showOn: "Always"
                }
            }, !0), this.firstTooltipObj.height = 30, "Range" === this.type && (this.secondTooltipObj.showTipPointer = !0, 
            this.secondTooltipObj.height = 30));
        }, Slider.prototype.tooltipBeforeOpen = function(args) {
            var tooltipElement = args.target === this.firstHandle ? this.firstTooltipElement = args.element : this.secondTooltipElement = args.element;
            if (args.target.removeAttribute("aria-describedby"), this.isMaterial && this.tooltip.isVisible) {
                var transformProperties = this.getTooltipTransformProperties(this.previousTooltipClass);
                tooltipElement.firstChild.classList.add(classNames_materialTooltipHide), this.handleStart(), 
                tooltipElement.firstElementChild.innerText.length > 4 ? tooltipElement.style.transform = transformProperties.translate + " scale(0.01)" : tooltipElement.style.transform = transformProperties.translate + " " + transformProperties.rotate + " scale(0.01)";
            }
        }, Slider.prototype.wireMaterialTooltipEvent = function(destroy) {
            this.isMaterial && this.tooltip.isVisible && (destroy ? (EventHandler.remove(this.firstTooltipElement, "mousedown touchstart", this.sliderDown), 
            "Range" === this.type && EventHandler.remove(this.secondTooltipElement, "mousedown touchstart", this.sliderDown)) : (EventHandler.add(this.firstTooltipElement, "mousedown touchstart", this.sliderDown, this), 
            "Range" === this.type && EventHandler.add(this.secondTooltipElement, "mousedown touchstart", this.sliderDown, this)));
        }, Slider.prototype.tooltipPositionCalculation = function(position) {
            var cssClass;
            switch (position) {
              case "TopCenter":
                cssClass = classNames_horizontalTooltipBefore;
                break;

              case "BottomCenter":
                cssClass = classNames_horizontalTooltipAfter;
                break;

              case "LeftCenter":
                cssClass = classNames_verticalTooltipBefore;
                break;

              case "RightCenter":
                cssClass = classNames_verticalTooltipAfter;
            }
            return cssClass;
        }, Slider.prototype.getTooltipTransformProperties = function(className) {
            if (this.firstTooltipElement) {
                var position = void 0;
                position = "Horizontal" === this.orientation ? this.firstTooltipElement.clientHeight + 14 - this.firstTooltipElement.clientHeight / 2 : this.firstTooltipElement.clientWidth + 14 - this.firstTooltipElement.clientWidth / 2;
                return "Horizontal" === this.orientation ? className === classNames_horizontalTooltipBefore ? {
                    rotate: "rotate(45deg)",
                    translate: "translateY(" + position + "px)"
                } : {
                    rotate: "rotate(225deg)",
                    translate: "translateY(" + -position + "px)"
                } : className === classNames_verticalTooltipBefore ? {
                    rotate: "rotate(-45deg)",
                    translate: "translateX(" + position + "px)"
                } : {
                    rotate: "rotate(-225deg)",
                    translate: "translateX(" + -position + "px)"
                };
            }
        }, Slider.prototype.openMaterialTooltip = function() {
            var _this = this;
            this.refreshTooltip();
            var tooltipElement = 1 === this.activeHandle ? this.firstTooltipElement : this.secondTooltipElement, handle = 1 === this.activeHandle ? this.firstMaterialHandle : this.secondMaterialHandle;
            tooltipElement.firstChild.classList.contains(classNames_materialTooltipHide) && tooltipElement.firstChild.classList.remove(classNames_materialTooltipHide), 
            tooltipElement.firstChild.classList.add(classNames_materialTooltipShow), this.getHandle().style.cursor = "default", 
            tooltipElement.style.transition = this.scaleTransform, tooltipElement.classList.add(classNames_materialTooltipOpen), 
            handle.style.transform = "scale(0)", tooltipElement.firstElementChild.innerText.length > 4 ? tooltipElement.style.transform = "scale(1)" : tooltipElement.style.transform = this.getTooltipTransformProperties(this.previousTooltipClass).rotate, 
            "Default" === this.type ? setTimeout(function() {
                tooltipElement.style.transition = _this.transition.handle;
            }, 2500) : setTimeout(function() {
                tooltipElement.style.transition = "none";
            }, 2500);
        }, Slider.prototype.checkTooltipPosition = function(args) {
            var tooltipPosition = args.target === this.firstHandle ? this.firstHandleTooltipPosition : this.secondHandleTooltipPosition;
            if (void 0 === tooltipPosition || tooltipPosition !== args.collidedPosition) {
                var tooltipClass = this.tooltipPositionCalculation(args.collidedPosition);
                args.element.classList.remove(this.previousTooltipClass), args.element.classList.add(tooltipClass), 
                this.previousTooltipClass = tooltipClass, args.element.style.transform && args.element.classList.contains(classNames_materialTooltipOpen) && args.element.firstElementChild.innerText.length < 4 && (args.element.style.transform = this.getTooltipTransformProperties(this.previousTooltipClass).rotate), 
                args.target === this.firstHandle ? this.firstHandleTooltipPosition = args.collidedPosition : this.secondHandleTooltipPosition = args.collidedPosition;
            }
        }, Slider.prototype.renderTooltip = function() {
            "Auto" === this.tooltip.showOn && this.setProperties({
                tooltip: {
                    showOn: "Hover"
                }
            }, !0), this.firstTooltipObj = new Tooltip({
                showTipPointer: !1,
                cssClass: classNames_sliderTooltip,
                animation: {
                    open: {
                        effect: "None"
                    },
                    close: {
                        effect: "None"
                    }
                },
                opensOn: "Custom",
                beforeOpen: this.tooltipBeforeOpen.bind(this),
                beforeCollision: this.checkTooltipPosition.bind(this),
                afterClose: this.tooltipAfterClose.bind(this)
            }), this.firstTooltipObj.appendTo(this.firstHandle), "Range" === this.type && (this.secondTooltipObj = new Tooltip({
                showTipPointer: !1,
                cssClass: classNames_sliderTooltip,
                animation: {
                    open: {
                        effect: "None"
                    },
                    close: {
                        effect: "None"
                    }
                },
                opensOn: "Custom",
                beforeOpen: this.tooltipBeforeOpen.bind(this),
                beforeCollision: this.checkTooltipPosition.bind(this),
                afterClose: this.tooltipAfterClose.bind(this)
            }), this.secondTooltipObj.appendTo(this.secondHandle)), this.tooltipPlacement(), 
            this.firstHandle.style.transition = "none", "Default" !== this.type && (this.rangeBar.style.transition = "none"), 
            "Range" === this.type && (this.secondHandle.style.transition = "none"), this.isMaterial && (this.sliderContainer.classList.add(classNames_materialSlider), 
            this.tooltipValue(), this.firstTooltipObj.open(this.firstHandle), "Range" === this.type && this.secondTooltipObj.open(this.secondHandle));
        }, Slider.prototype.tooltipAfterClose = function(args) {
            args.element === this.firstTooltipElement ? this.firstTooltipElement = void 0 : this.secondTooltipElement = void 0;
        }, Slider.prototype.setButtons = function() {
            this.firstBtn = createElement("div", {
                className: classNames_sliderButton + " " + classNames_firstButton
            }), this.firstBtn.appendChild(createElement("span", {
                className: classNames_sliderButtonIcon
            })), this.firstBtn.tabIndex = -1, this.secondBtn = createElement("div", {
                className: classNames_sliderButton + " " + classNames_secondButton
            }), this.secondBtn.appendChild(createElement("span", {
                className: classNames_sliderButtonIcon
            })), this.secondBtn.tabIndex = -1, this.sliderContainer.classList.add(classNames_sliderButtonClass), 
            this.sliderContainer.appendChild(this.firstBtn), this.sliderContainer.appendChild(this.secondBtn), 
            this.sliderContainer.appendChild(this.element), this.buttonTitle();
        }, Slider.prototype.buttonTitle = function() {
            var enabledRTL = this.enableRtl && "Vertical" !== this.orientation;
            this.l10n.setLocale(this.locale);
            var decrementTitle = this.l10n.getConstant("decrementTitle"), incrementTitle = this.l10n.getConstant("incrementTitle");
            attributes(enabledRTL ? this.secondBtn : this.firstBtn, {
                "aria-label": decrementTitle,
                title: decrementTitle
            }), attributes(enabledRTL ? this.firstBtn : this.secondBtn, {
                "aria-label": incrementTitle,
                title: incrementTitle
            });
        }, Slider.prototype.buttonFocusOut = function() {
            this.isMaterial && (this.getHandle().style.transform = this.getHandle().style.transform.replace("scale(1.5)", "scale(1)"));
        }, Slider.prototype.repeatButton = function(args) {
            args.target.parentElement;
            !(1 === this.activeHandle ? this.firstTooltipElement : this.secondTooltipElement) && this.tooltip.isVisible && this.openTooltip();
            var value, hVal = this.handleValueUpdate(), enabledRTL = this.enableRtl && "Vertical" !== this.orientation;
            args.target.parentElement.classList.contains(classNames_firstButton) || args.target.classList.contains(classNames_firstButton) ? value = enabledRTL ? this.add(hVal, parseFloat(this.step.toString()), !0) : this.add(hVal, parseFloat(this.step.toString()), !1) : (args.target.parentElement.classList.contains(classNames_secondButton) || args.target.classList.contains(classNames_secondButton)) && (value = enabledRTL ? this.add(hVal, parseFloat(this.step.toString()), !1) : this.add(hVal, parseFloat(this.step.toString()), !0)), 
            value >= this.min && value <= this.max && (this.changeHandleValue(value), this.refreshTooltipOnMove());
        }, Slider.prototype.repeatHandlerMouse = function(args) {
            args.preventDefault(), "mousedown" !== args.type && "touchstart" !== args.type || (this.buttonClick(args), 
            this.repeatInterval = setInterval(this.repeatButton.bind(this), 180, args));
        }, Slider.prototype.materialChange = function() {
            -1 === this.getHandle().style.transform.indexOf("scale(1.5") && (this.getHandle().style.transform = "scale(1.5)");
        }, Slider.prototype.repeatHandlerUp = function(e) {
            this.changeEvent("changed"), this.tooltip.isVisible && "Always" !== this.tooltip.showOn && !this.isMaterial && this.closeTooltip(), 
            clearInterval(this.repeatInterval), this.getHandle().focus();
        }, Slider.prototype.renderScale = function() {
            var orien = "Vertical" === this.orientation ? "v" : "h";
            this.noOfDecimals = this.numberOfDecimals(this.step), this.ul = createElement("ul", {
                className: classNames_scale + " e-" + orien + "-scale " + classNames_tick + "-" + this.ticks.placement.toLowerCase(),
                attrs: {
                    role: "presentation",
                    tabIndex: "-1",
                    "aria-hidden": "true"
                }
            }), Browser.isAndroid && "h" === orien && this.ul.classList.add(classNames_sliderTickPosition);
            var smallStep = this.ticks.smallStep;
            this.ticks.showSmallTicks ? smallStep <= 0 && (smallStep = parseFloat(formatUnit(this.step))) : smallStep = this.ticks.largeStep > 0 ? this.ticks.largeStep : parseFloat(formatUnit(this.max)) - parseFloat(formatUnit(this.min));
            var min = this.fractionalToInteger(this.min), max = this.fractionalToInteger(this.max), steps = this.fractionalToInteger(smallStep), count = Math.abs((max - min) / steps);
            this.element.appendChild(this.ul);
            var li, start = parseFloat(this.min.toString());
            "v" === orien && (start = parseFloat(this.max.toString()));
            var left = 0, tickWidth = 100 / count;
            tickWidth === 1 / 0 && (tickWidth = 5);
            for (var i = 0; i <= count; i++) {
                li = createElement("li", {
                    attrs: {
                        class: classNames_tick,
                        title: start.toString(),
                        role: "presentation",
                        tabIndex: "-1",
                        "aria-hidden": "true"
                    }
                });
                var islargeTick = void 0;
                if (0 === this.numberOfDecimals(this.max) && 0 === this.numberOfDecimals(this.min) && 0 === this.numberOfDecimals(this.step)) islargeTick = "h" === orien ? (start - parseFloat(this.min.toString())) % this.ticks.largeStep == 0 : Math.abs(start - parseFloat(this.max.toString())) % this.ticks.largeStep == 0; else {
                    var largestep = this.fractionalToInteger(this.ticks.largeStep);
                    islargeTick = (this.fractionalToInteger(start) - min) % largestep == 0;
                }
                islargeTick && li.classList.add(classNames_large), "h" === orien ? li.style.width = tickWidth + "%" : li.style.height = tickWidth + "%";
                var repeat = islargeTick ? "Both" === this.ticks.placement ? 2 : 1 : 0;
                if (islargeTick) for (var j = 0; j < repeat; j++) this.createTick(li, start); else this.formatTicksValue(li, start);
                this.ul.appendChild(li), this.tickElementCollection.push(li);
                var decimalPoints = void 0;
                decimalPoints = this.numberOfDecimals(smallStep) > this.numberOfDecimals(start) ? this.numberOfDecimals(smallStep) : this.numberOfDecimals(start), 
                start = "h" === orien ? this.makeRoundNumber(start + smallStep, decimalPoints) : this.makeRoundNumber(start - smallStep, decimalPoints), 
                left = this.makeRoundNumber(left + smallStep, decimalPoints);
            }
            this.firstChild = this.ul.firstElementChild, this.lastChild = this.ul.lastElementChild, 
            this.firstChild.classList.add(classNames_sliderFirstTick), this.lastChild.classList.add(classNames_sliderLastTick), 
            this.sliderContainer.classList.add(classNames_scale + "-" + this.ticks.placement.toLowerCase()), 
            "h" === orien ? (this.firstChild.style.width = tickWidth / 2 + "%", this.lastChild.style.width = tickWidth / 2 + "%") : (this.firstChild.style.height = tickWidth / 2 + "%", 
            this.lastChild.style.height = tickWidth / 2 + "%");
            var eventArgs = {
                ticksWrapper: this.ul,
                tickElements: this.tickElementCollection
            };
            this.trigger("renderedTicks", eventArgs), this.scaleAlignment();
        }, Slider.prototype.createTick = function(li, start) {
            var span = createElement("span", {
                className: classNames_tickValue + " " + classNames_tick + "-" + this.ticks.placement.toLowerCase(),
                attrs: {
                    role: "presentation",
                    tabIndex: "-1",
                    "aria-hidden": "true"
                }
            });
            li.appendChild(span), span.innerHTML = this.formatTicksValue(li, start);
        }, Slider.prototype.formatTicksValue = function(li, start) {
            var tickText = this.formatNumber(start), eventArgs = {
                value: start,
                text: isNullOrUndefined(this.ticks) || isNullOrUndefined(this.ticks.format) ? tickText : this.formatString(start, this.ticksFormatInfo).formatString,
                tickElement: li
            };
            return this.trigger("renderingTicks", eventArgs), li.setAttribute("title", eventArgs.text.toString()), 
            eventArgs.text.toString();
        }, Slider.prototype.scaleAlignment = function() {
            this.tickValuePosition();
            this.orientation;
            "Vertical" === this.orientation ? this.element.getBoundingClientRect().width <= 15 ? this.sliderContainer.classList.add(classNames_sliderSmallSize) : this.sliderContainer.classList.remove(classNames_sliderSmallSize) : this.element.getBoundingClientRect().height <= 15 ? this.sliderContainer.classList.add(classNames_sliderSmallSize) : this.sliderContainer.classList.remove(classNames_sliderSmallSize);
        }, Slider.prototype.tickValuePosition = function() {
            var firstChild, first = this.firstChild.getBoundingClientRect(), smallStep = this.ticks.smallStep, count = Math.abs(parseFloat(formatUnit(this.max)) - parseFloat(formatUnit(this.min))) / smallStep;
            this.firstChild.children.length > 0 && (firstChild = this.firstChild.children[0].getBoundingClientRect());
            var other, tickElements = [ this.sliderContainer.querySelectorAll("." + classNames_tick + "." + classNames_large + " ." + classNames_tickValue) ];
            other = "Both" === this.ticks.placement ? [].slice.call(tickElements[0], 2) : [].slice.call(tickElements[0], 1);
            for (var tickWidth = "Vertical" === this.orientation ? 2 * first.height : 2 * first.width, i = 0; i < this.firstChild.children.length; i++) "Vertical" === this.orientation ? this.firstChild.children[i].style.top = -firstChild.height / 2 + "px" : this.enableRtl ? this.firstChild.children[i].style.left = (tickWidth - this.firstChild.children[i].getBoundingClientRect().width) / 2 + "px" : this.firstChild.children[i].style.left = -firstChild.width / 2 + "px";
            for (i = 0; i < other.length; i++) {
                var otherChild = other[i].getBoundingClientRect();
                "Vertical" === this.orientation ? setStyleAttribute(other[i], {
                    top: (tickWidth - otherChild.height) / 2 + "px"
                }) : setStyleAttribute(other[i], {
                    left: (tickWidth - otherChild.width) / 2 + "px"
                });
            }
            this.enableRtl && this.lastChild.children.length && 0 !== count && (this.lastChild.children[0].style.left = -this.lastChild.getBoundingClientRect().width / 2 + "px", 
            "Both" === this.ticks.placement && (this.lastChild.children[1].style.left = -this.lastChild.getBoundingClientRect().width / 2 + "px")), 
            0 === count && ("Horizontal" === this.orientation && (this.enableRtl ? (this.firstChild.classList.remove(classNames_sliderLastTick), 
            this.firstChild.style.right = this.firstHandle.style.right, this.firstChild.children[0].style.left = this.firstChild.getBoundingClientRect().width / 2 + 2 + "px", 
            "Both" === this.ticks.placement && (this.firstChild.children[1].style.left = this.firstChild.getBoundingClientRect().width / 2 + 2 + "px")) : (this.firstChild.classList.remove(classNames_sliderLastTick), 
            this.firstChild.style.left = this.firstHandle.style.left)), "Vertical" === this.orientation && this.firstChild.classList.remove(classNames_sliderLastTick));
        }, Slider.prototype.setAriaAttrValue = function(element) {
            var ariaValueText, isTickFormatted = !isNullOrUndefined(this.ticks) && !isNullOrUndefined(this.ticks.format), text = isTickFormatted ? this.formatContent(this.tooltipFormatInfo, !1) : this.formatContent(this.ticksFormatInfo, !1), valuenow = isTickFormatted ? this.formatContent(this.ticksFormatInfo, !0) : this.formatContent(this.tooltipFormatInfo, !0);
            ariaValueText = 2 === (text = this.customAriaText ? this.customAriaText : text).split(" - ").length ? text.split(" - ") : [ text, text ], 
            this.setAriaAttributes(element), "Range" !== this.type ? attributes(element, {
                "aria-valuenow": valuenow,
                "aria-valuetext": text
            }) : this.enableRtl ? element === this.firstHandle ? attributes(element, {
                "aria-valuenow": valuenow.split(" - ")[1],
                "aria-valuetext": ariaValueText[1]
            }) : attributes(element, {
                "aria-valuenow": valuenow.split(" - ")[0],
                "aria-valuetext": ariaValueText[0]
            }) : element === this.firstHandle ? attributes(element, {
                "aria-valuenow": valuenow.split(" - ")[0],
                "aria-valuetext": ariaValueText[0]
            }) : attributes(element, {
                "aria-valuenow": valuenow.split(" - ")[1],
                "aria-valuetext": ariaValueText[1]
            });
        }, Slider.prototype.handleValueUpdate = function() {
            return "Range" === this.type ? 1 === this.activeHandle ? this.handleVal1 : this.handleVal2 : this.handleVal1;
        }, Slider.prototype.buttonClick = function(args) {
            var value, enabledRTL = this.enableRtl && "Vertical" !== this.orientation, hVal = this.handleValueUpdate();
            40 === args.keyCode || 37 === args.keyCode || args.currentTarget.classList.contains(classNames_firstButton) ? value = enabledRTL ? this.add(hVal, parseFloat(this.step.toString()), !0) : this.add(hVal, parseFloat(this.step.toString()), !1) : 38 === args.keyCode || 39 === args.keyCode || args.currentTarget.classList.contains(classNames_secondButton) ? value = enabledRTL ? this.add(hVal, parseFloat(this.step.toString()), !1) : this.add(hVal, parseFloat(this.step.toString()), !0) : 33 === args.keyCode || args.currentTarget.classList.contains(classNames_firstButton) ? value = enabledRTL ? this.add(hVal, parseFloat(this.ticks.largeStep.toString()), !1) : this.add(hVal, parseFloat(this.ticks.largeStep.toString()), !0) : 34 === args.keyCode || args.currentTarget.classList.contains(classNames_secondButton) ? value = enabledRTL ? this.add(hVal, parseFloat(this.ticks.largeStep.toString()), !0) : this.add(hVal, parseFloat(this.ticks.largeStep.toString()), !1) : 36 === args.keyCode ? value = parseFloat(this.min.toString()) : 35 === args.keyCode && (value = parseFloat(this.max.toString())), 
            this.changeHandleValue(value), !this.isMaterial || this.tooltip.isVisible || this.getHandle().classList.contains(classNames_sliderTabHandle) || this.materialChange(), 
            this.tooltipAnimation(), this.getHandle().focus(), args.currentTarget.classList.contains(classNames_firstButton) && EventHandler.add(this.firstBtn, "mouseup touchend", this.buttonUp, this), 
            args.currentTarget.classList.contains(classNames_secondButton) && EventHandler.add(this.secondBtn, "mouseup touchend", this.buttonUp, this);
        }, Slider.prototype.tooltipAnimation = function() {
            if (this.tooltip.isVisible) {
                var tooltipObj = 1 === this.activeHandle ? this.firstTooltipObj : this.secondTooltipObj, tooltipElement = 1 === this.activeHandle ? this.firstTooltipElement : this.secondTooltipElement;
                this.isMaterial ? tooltipElement.classList.contains(classNames_materialTooltipOpen) ? this.refreshTooltip() : this.openMaterialTooltip() : (tooltipObj.animation = {
                    open: {
                        effect: "None"
                    },
                    close: {
                        effect: "FadeOut",
                        duration: 500
                    }
                }, this.openTooltip());
            }
        }, Slider.prototype.buttonUp = function(args) {
            if (this.tooltip.isVisible && !this.isMaterial) {
                (1 === this.activeHandle ? this.firstTooltipObj : this.secondTooltipObj).animation = {
                    open: {
                        effect: "None"
                    },
                    close: {
                        effect: "None"
                    }
                };
            }
            args.currentTarget.classList.contains(classNames_firstButton) && EventHandler.remove(this.firstBtn, "mouseup touchend", this.buttonUp), 
            args.currentTarget.classList.contains(classNames_secondButton) && EventHandler.remove(this.secondBtn, "mouseup touchend", this.buttonUp);
        }, Slider.prototype.setRangeBar = function() {
            "Horizontal" === this.orientation ? "MinRange" === this.type ? (this.enableRtl ? this.rangeBar.style.right = "0px" : this.rangeBar.style.left = "0px", 
            setStyleAttribute(this.rangeBar, {
                width: isNullOrUndefined(this.handlePos1) ? 0 : this.handlePos1 + "px"
            })) : (this.enableRtl ? this.rangeBar.style.right = this.handlePos1 + "px" : this.rangeBar.style.left = this.handlePos1 + "px", 
            setStyleAttribute(this.rangeBar, {
                width: this.handlePos2 - this.handlePos1 + "px"
            })) : "MinRange" === this.type ? (this.rangeBar.style.bottom = "0px", setStyleAttribute(this.rangeBar, {
                height: isNullOrUndefined(this.handlePos1) ? 0 : this.handlePos1 + "px"
            })) : (this.rangeBar.style.bottom = this.handlePos1 + "px", setStyleAttribute(this.rangeBar, {
                height: this.handlePos2 - this.handlePos1 + "px"
            }));
        }, Slider.prototype.setValue = function() {
            this.handleVal1 = isNullOrUndefined(this.value) ? this.checkHandleValue(parseFloat(this.min.toString())) : this.checkHandleValue(parseFloat(this.value.toString())), 
            this.handlePos1 = this.checkHandlePosition(this.handleVal1), this.preHandlePos1 = this.handlePos1, 
            isNullOrUndefined(this.activeHandle) ? "Range" === this.type ? this.activeHandle = 2 : this.activeHandle = 1 : this.activeHandle = this.activeHandle, 
            "Default" === this.type || "MinRange" === this.type ? (this.setHandlePosition(), 
            this.handleStart(), this.value = this.handleVal1, this.setAriaAttrValue(this.firstHandle), 
            this.changeEvent("changed")) : this.validateRangeValue(), "Default" !== this.type && this.setRangeBar();
        }, Slider.prototype.rangeValueUpdate = function() {
            null !== this.value && "object" == typeof this.value || (this.value = [ parseFloat(formatUnit(this.min)), parseFloat(formatUnit(this.max)) ]);
        }, Slider.prototype.validateRangeValue = function() {
            this.rangeValueUpdate(), this.setRangeValue();
        }, Slider.prototype.modifyZindex = function() {
            "Range" === this.type ? 1 === this.activeHandle ? (this.firstHandle.style.zIndex = this.zIndex + 4 + "", 
            this.secondHandle.style.zIndex = this.zIndex + 3 + "", this.isMaterial && this.tooltip.isVisible && this.firstTooltipElement && this.secondTooltipElement && (this.firstTooltipElement.style.zIndex = this.zIndex + 4 + "", 
            this.secondTooltipElement.style.zIndex = this.zIndex + 3 + "")) : (this.firstHandle.style.zIndex = this.zIndex + 3 + "", 
            this.secondHandle.style.zIndex = this.zIndex + 4 + "", this.isMaterial && this.tooltip.isVisible && this.firstTooltipElement && this.secondTooltipElement && (this.firstTooltipElement.style.zIndex = this.zIndex + 3 + "", 
            this.secondTooltipElement.style.zIndex = this.zIndex + 4 + "")) : this.isMaterial && this.tooltip.isVisible && this.firstTooltipElement && (this.firstTooltipElement.style.zIndex = this.zIndex + 4 + "");
        }, Slider.prototype.setHandlePosition = function() {
            var handle, tooltipElement, _this = this, pos = 1 === this.activeHandle ? this.handlePos1 : this.handlePos2;
            1 === this.activeHandle ? this.handleVal1 : this.handleVal2;
            this.isMaterial && this.tooltip.isVisible ? (tooltipElement = 1 === this.activeHandle ? this.firstTooltipElement : this.secondTooltipElement, 
            handle = [ this.getHandle(), 1 === this.activeHandle ? this.firstMaterialHandle : this.secondMaterialHandle ]) : handle = [ this.getHandle() ], 
            this.tooltip.isVisible && 0 === pos && "Range" !== this.type ? (handle[0].classList.add(classNames_sliderHandleStart), 
            this.isMaterial && (handle[1].classList.add(classNames_sliderHandleStart), tooltipElement && tooltipElement.classList.add(classNames_sliderTooltipStart))) : (handle[0].classList.remove(classNames_sliderHandleStart), 
            this.tooltip.isVisible && this.isMaterial && (handle[1].classList.remove(classNames_sliderHandleStart), 
            tooltipElement && tooltipElement.classList.remove(classNames_sliderTooltipStart))), 
            handle.forEach(function(handle) {
                "Horizontal" === _this.orientation ? _this.enableRtl ? handle.style.right = pos + "px" : handle.style.left = pos + "px" : handle.style.bottom = pos + "px";
            }), this.changeEvent("change");
        }, Slider.prototype.getHandle = function() {
            return 1 === this.activeHandle ? this.firstHandle : this.secondHandle;
        }, Slider.prototype.setRangeValue = function() {
            this.activeHandle;
            this.updateRangeValue(), this.activeHandle = 1, this.setHandlePosition(), this.activeHandle = 2, 
            this.setHandlePosition(), this.activeHandle = 1;
        }, Slider.prototype.changeEvent = function(eventName) {
            var previous = "change" === eventName ? this.previousVal : this.previousChanged;
            if ("Range" !== this.type) this.setProperties({
                value: this.handleVal1
            }, !0), previous !== this.value && (this.trigger(eventName, this.changeEventArgs(eventName)), 
            this.setPreviousVal(eventName, this.value)), this.setAriaAttrValue(this.firstHandle); else {
                var value = this.value = [ this.handleVal1, this.handleVal2 ];
                this.setProperties({
                    value: value
                }, !0), (previous.length === this.value.length && this.value[0] !== previous[0] || this.value[1] !== previous[1]) && (this.trigger(eventName, this.changeEventArgs(eventName)), 
                this.setPreviousVal(eventName, this.value)), this.setAriaAttrValue(this.getHandle());
            }
            this.hiddenInput.value = this.value.toString();
        }, Slider.prototype.changeEventArgs = function(eventName) {
            var eventArgs;
            return this.tooltip.isVisible && this.firstTooltipObj ? (this.tooltipValue(), eventArgs = {
                value: this.value,
                previousValue: "change" === eventName ? this.previousVal : this.previousChanged,
                action: eventName,
                text: this.firstTooltipObj.content
            }) : eventArgs = {
                value: this.value,
                previousValue: "change" === eventName ? this.previousVal : this.previousChanged,
                action: eventName,
                text: isNullOrUndefined(this.ticksFormatInfo.format) ? this.value.toString() : "Range" !== this.type ? this.formatString(this.value, this.ticksFormatInfo).formatString : this.formatString(this.value[0], this.ticksFormatInfo).formatString + " - " + this.formatString(this.value[1], this.ticksFormatInfo).formatString
            }, eventArgs;
        }, Slider.prototype.setPreviousVal = function(eventName, value) {
            "change" === eventName ? this.previousVal = value : this.previousChanged = value;
        }, Slider.prototype.updateRangeValue = function() {
            var values = this.value.toString().split(",").map(Number);
            this.enableRtl && "Vertical" !== this.orientation || this.rtl ? this.value = [ values[1], values[0] ] : this.value = [ values[0], values[1] ], 
            this.enableRtl && "Vertical" !== this.orientation ? (this.handleVal1 = this.checkHandleValue(this.value[1]), 
            this.handleVal2 = this.checkHandleValue(this.value[0])) : (this.handleVal1 = this.checkHandleValue(this.value[0]), 
            this.handleVal2 = this.checkHandleValue(this.value[1])), this.handlePos1 = this.checkHandlePosition(this.handleVal1), 
            this.handlePos2 = this.checkHandlePosition(this.handleVal2), this.handlePos1 > this.handlePos2 && (this.handlePos1 = this.handlePos2, 
            this.handleVal1 = this.handleVal2), this.preHandlePos1 = this.handlePos1, this.preHandlePos2 = this.handlePos2;
        }, Slider.prototype.checkHandlePosition = function(value) {
            var pos;
            return value = 100 * (value - parseFloat(formatUnit(this.min))) / (parseFloat(formatUnit(this.max)) - parseFloat(formatUnit(this.min))), 
            pos = "Horizontal" === this.orientation ? this.element.getBoundingClientRect().width * (value / 100) : this.element.getBoundingClientRect().height * (value / 100), 
            parseFloat(formatUnit(this.max)) === parseFloat(formatUnit(this.min)) && (pos = "Horizontal" === this.orientation ? this.element.getBoundingClientRect().width : this.element.getBoundingClientRect().height), 
            pos;
        }, Slider.prototype.checkHandleValue = function(value) {
            if (this.min > this.max && (this.min = this.max), this.min === this.max) return parseFloat(formatUnit(this.max));
            var handle = this.tempStartEnd();
            return value < handle.start ? value = handle.start : value > handle.end && (value = handle.end), 
            value;
        }, Slider.prototype.onResize = function() {
            var _this = this;
            this.firstHandle.style.transition = "none", "Default" !== this.type && (this.rangeBar.style.transition = "none"), 
            "Range" === this.type && (this.secondHandle.style.transition = "none"), this.handlePos1 = this.checkHandlePosition(this.handleVal1), 
            this.handleVal2 && (this.handlePos2 = this.checkHandlePosition(this.handleVal2)), 
            "Horizontal" === this.orientation ? (this.enableRtl ? this.firstHandle.style.right = this.handlePos1 + "px" : this.firstHandle.style.left = this.handlePos1 + "px", 
            this.isMaterial && this.tooltip.isVisible && this.firstMaterialHandle && (this.enableRtl ? this.firstMaterialHandle.style.right = this.handlePos1 + "px" : this.firstMaterialHandle.style.left = this.handlePos1 + "px"), 
            "MinRange" === this.type ? (this.enableRtl ? this.rangeBar.style.right = "0px" : this.rangeBar.style.left = "0px", 
            setStyleAttribute(this.rangeBar, {
                width: isNullOrUndefined(this.handlePos1) ? 0 : this.handlePos1 + "px"
            })) : "Range" === this.type && (this.enableRtl ? this.secondHandle.style.right = this.handlePos2 + "px" : this.secondHandle.style.left = this.handlePos2 + "px", 
            this.isMaterial && this.tooltip.isVisible && this.secondMaterialHandle && (this.enableRtl ? this.secondMaterialHandle.style.right = this.handlePos2 + "px" : this.secondMaterialHandle.style.left = this.handlePos2 + "px"), 
            this.enableRtl ? this.rangeBar.style.right = this.handlePos1 + "px" : this.rangeBar.style.left = this.handlePos1 + "px", 
            setStyleAttribute(this.rangeBar, {
                width: this.handlePos2 - this.handlePos1 + "px"
            }))) : (this.firstHandle.style.bottom = this.handlePos1 + "px", this.isMaterial && this.tooltip.isVisible && this.firstMaterialHandle && (this.firstMaterialHandle.style.bottom = this.handlePos1 + "px"), 
            "MinRange" === this.type ? (this.rangeBar.style.bottom = "0px", setStyleAttribute(this.rangeBar, {
                height: isNullOrUndefined(this.handlePos1) ? 0 : this.handlePos1 + "px"
            })) : "Range" === this.type && (this.secondHandle.style.bottom = this.handlePos2 + "px", 
            this.isMaterial && this.tooltip.isVisible && this.secondMaterialHandle && (this.secondMaterialHandle.style.bottom = this.handlePos2 + "px"), 
            this.rangeBar.style.bottom = this.handlePos1 + "px", setStyleAttribute(this.rangeBar, {
                height: this.handlePos2 - this.handlePos1 + "px"
            }))), "None" !== this.ticks.placement && this.ul && (this.removeElement(this.ul), 
            this.renderScale()), this.tooltip.isVisible || setTimeout(function() {
                _this.firstHandle.style.transition = _this.scaleTransform, "Range" === _this.type && (_this.secondHandle.style.transition = _this.scaleTransform);
            }), this.refreshTooltip();
        }, Slider.prototype.changeHandleValue = function(value) {
            var position = null;
            1 === this.activeHandle ? (this.handleVal1 = this.checkHandleValue(value), this.handlePos1 = this.checkHandlePosition(this.handleVal1), 
            "Range" === this.type && this.handlePos1 > this.handlePos2 && (this.handlePos1 = this.handlePos2, 
            this.handleVal1 = this.handleVal2), this.handlePos1 !== this.preHandlePos1 && (position = this.preHandlePos1 = this.handlePos1), 
            this.modifyZindex()) : (this.handleVal2 = this.checkHandleValue(value), this.handlePos2 = this.checkHandlePosition(this.handleVal2), 
            "Range" === this.type && this.handlePos2 < this.handlePos1 && (this.handlePos2 = this.handlePos1, 
            this.handleVal2 = this.handleVal1), this.handlePos2 !== this.preHandlePos2 && (position = this.preHandlePos2 = this.handlePos2), 
            this.modifyZindex()), null !== position && ("Default" !== this.type && this.setRangeBar(), 
            this.setHandlePosition());
        }, Slider.prototype.tempStartEnd = function() {
            return this.min > this.max ? {
                start: this.max,
                end: this.min
            } : {
                start: this.min,
                end: this.max
            };
        }, Slider.prototype.xyToPosition = function(position) {
            if (this.min === this.max) return 100;
            if ("Horizontal" === this.orientation) {
                var left = position.x - this.element.getBoundingClientRect().left, num = this.element.offsetWidth / 100;
                this.val = left / num;
            } else {
                var top_1 = position.y - this.element.getBoundingClientRect().top;
                num = this.element.offsetHeight / 100;
                this.val = 100 - top_1 / num;
            }
            var val = this.stepValueCalculation(this.val);
            return val < 0 ? val = 0 : val > 100 && (val = 100), this.enableRtl && "Vertical" !== this.orientation && (val = 100 - val), 
            "Horizontal" === this.orientation ? this.element.getBoundingClientRect().width * (val / 100) : this.element.getBoundingClientRect().height * (val / 100);
        }, Slider.prototype.stepValueCalculation = function(value) {
            0 === this.step && (this.step = 1);
            var percentStep = parseFloat(formatUnit(this.step)) / ((parseFloat(formatUnit(this.max)) - parseFloat(formatUnit(this.min))) / 100), remain = value % Math.abs(percentStep);
            return 0 !== remain && (percentStep / 2 > remain ? value -= remain : value += Math.abs(percentStep) - remain), 
            value;
        }, Slider.prototype.add = function(a, b, addition) {
            var x = Math.pow(10, 3);
            return addition ? (Math.round(a * x) + Math.round(b * x)) / x : (Math.round(a * x) - Math.round(b * x)) / x;
        }, Slider.prototype.round = function(a) {
            var f = this.step.toString().split(".");
            return f[1] ? parseFloat(a.toFixed(f[1].length)) : Math.round(a);
        }, Slider.prototype.positionToValue = function(pos) {
            var val, diff = parseFloat(formatUnit(this.max)) - parseFloat(formatUnit(this.min));
            val = "Horizontal" === this.orientation ? pos / this.element.getBoundingClientRect().width * diff : pos / this.element.getBoundingClientRect().height * diff;
            return this.add(val, parseFloat(this.min.toString()), !0);
        }, Slider.prototype.sliderBarClick = function(evt) {
            evt.preventDefault();
            var pos;
            "mousedown" === evt.type || "click" === evt.type ? pos = {
                x: evt.clientX,
                y: evt.clientY
            } : "touchstart" === evt.type && (pos = {
                x: evt.changedTouches[0].clientX,
                y: evt.changedTouches[0].clientY
            });
            var handlepos = this.xyToPosition(pos), handleVal = this.positionToValue(handlepos);
            if ("Range" !== this.type && (this.handleVal1 = handleVal, this.firstHandle.classList.add(classNames_sliderActiveHandle)), 
            "Range" === this.type && this.handlePos2 - handlepos < handlepos - this.handlePos1 ? (this.secondHandle.classList.add(classNames_sliderActiveHandle), 
            this.handlePos2 = this.preHandlePos2 = handlepos, this.handleVal2 = handleVal, this.activeHandle = 2, 
            this.modifyZindex(), this.secondHandle.focus()) : (this.firstHandle.classList.add(classNames_sliderActiveHandle), 
            this.handlePos1 = this.preHandlePos1 = handlepos, this.handleVal1 = handleVal, this.activeHandle = 1, 
            this.modifyZindex(), this.firstHandle.focus()), this.isMaterial && this.tooltip.isVisible) {
                (1 === this.activeHandle ? this.firstTooltipElement : this.secondTooltipElement).classList.add(classNames_materialTooltipActive);
            }
            var focusedElement = this.element.querySelector("." + classNames_sliderTabHandle);
            focusedElement && this.getHandle() !== focusedElement && focusedElement.classList.remove(classNames_sliderTabHandle);
            var handle = 1 === this.activeHandle ? this.firstHandle : this.secondHandle;
            if (evt.target === handle) return !this.isMaterial || this.tooltip.isVisible || this.getHandle().classList.contains(classNames_sliderTabHandle) || this.materialChange(), 
            void this.tooltipAnimation();
            if (this.checkRepeatedValue(handleVal)) {
                var transition = this.isMaterial && this.tooltip.isVisible ? this.transitionOnMaterialTooltip : this.transition;
                this.getHandle().style.transition = transition.handle, "Default" !== this.type && (this.rangeBar.style.transition = transition.rangeBar), 
                this.setHandlePosition(), "Default" !== this.type && this.setRangeBar();
            }
        }, Slider.prototype.refreshTooltipOnMove = function() {
            this.tooltip.isVisible && (this.tooltipValue(), 1 === this.activeHandle ? this.firstTooltipObj.refresh(this.firstHandle) : this.secondTooltipObj.refresh(this.secondHandle));
        }, Slider.prototype.sliderDown = function(event) {
            event.preventDefault(), this.sliderBarClick(event), EventHandler.add(document, "mousemove touchmove", this.sliderBarMove, this), 
            EventHandler.add(document, "mouseup touchend", this.sliderBarUp, this);
        }, Slider.prototype.sliderBarUp = function() {
            if (this.changeEvent("changed"), this.handleFocusOut(), this.firstHandle.classList.remove(classNames_sliderActiveHandle), 
            "Range" === this.type && this.secondHandle.classList.remove(classNames_sliderActiveHandle), 
            this.tooltip.isVisible && ("Always" !== this.tooltip.showOn && this.closeTooltip(), 
            !this.isMaterial)) {
                (1 === this.activeHandle ? this.firstTooltipObj : this.secondTooltipObj).animation = {
                    open: {
                        effect: "None"
                    },
                    close: {
                        effect: "None"
                    }
                };
            }
            if (this.isMaterial && (this.getHandle().style.transform = this.getHandle().style.transform.replace("scale(1.5)", "scale(1)"), 
            this.tooltip.isVisible)) {
                (1 === this.activeHandle ? this.firstTooltipElement : this.secondTooltipElement).classList.remove(classNames_materialTooltipActive);
            }
            EventHandler.remove(document, "mousemove touchmove", this.sliderBarMove), EventHandler.remove(document, "mouseup touchend", this.sliderBarUp);
        }, Slider.prototype.sliderBarMove = function(evt) {
            "touchmove" !== evt.type && evt.preventDefault();
            var pos;
            pos = "mousemove" === evt.type ? {
                x: evt.clientX,
                y: evt.clientY
            } : {
                x: evt.changedTouches[0].clientX,
                y: evt.changedTouches[0].clientY
            };
            var handlepos = this.xyToPosition(pos), handleVal = this.positionToValue(handlepos);
            if (handlepos = Math.round(handlepos), "Range" !== this.type && 1 === this.activeHandle && (this.handlePos1 = handlepos, 
            this.handleVal1 = handleVal, this.firstHandle.classList.add(classNames_sliderActiveHandle)), 
            "Range" === this.type && (1 === this.activeHandle ? (this.firstHandle.classList.add(classNames_sliderActiveHandle), 
            handlepos > this.handlePos2 && (handlepos = this.handlePos2, handleVal = this.handleVal2), 
            handlepos !== this.preHandlePos1 && (this.handlePos1 = this.preHandlePos1 = handlepos, 
            this.handleVal1 = handleVal, this.activeHandle = 1)) : 2 === this.activeHandle && (this.secondHandle.classList.add(classNames_sliderActiveHandle), 
            handlepos < this.handlePos1 && (handlepos = this.handlePos1, handleVal = this.handleVal1), 
            handlepos !== this.preHandlePos2 && (this.handlePos2 = this.preHandlePos2 = handlepos, 
            this.handleVal2 = handleVal, this.activeHandle = 2))), this.checkRepeatedValue(handleVal)) {
                this.getHandle().style.transition = this.scaleTransform, "Default" !== this.type && (this.rangeBar.style.transition = "none"), 
                this.setHandlePosition(), !this.isMaterial || this.tooltip.isVisible || this.getHandle().classList.contains(classNames_sliderTabHandle) || this.materialChange();
                var tooltipElement = 1 === this.activeHandle ? this.firstTooltipElement : this.secondTooltipElement;
                this.tooltip.isVisible && (this.isMaterial ? tooltipElement.classList.contains(classNames_materialTooltipOpen) ? this.refreshTooltipOnMove() : this.openMaterialTooltip() : tooltipElement ? this.refreshTooltipOnMove() : this.openTooltip()), 
                "Default" !== this.type && this.setRangeBar();
            }
        }, Slider.prototype.checkRepeatedValue = function(currentValue) {
            if ("Range" === this.type) {
                if (currentValue === (this.enableRtl && "Vertical" !== this.orientation ? 1 === this.activeHandle ? this.previousVal[1] : this.previousVal[0] : 1 === this.activeHandle ? this.previousVal[0] : this.previousVal[1])) return 0;
            } else if (currentValue === this.previousVal) return 0;
            return 1;
        }, Slider.prototype.refreshTooltip = function() {
            this.tooltip.isVisible && this.firstTooltipObj && (this.tooltipValue(), this.firstTooltipObj.refresh(this.firstHandle), 
            "Range" === this.type && this.secondTooltipObj.refresh(this.secondHandle));
        }, Slider.prototype.openTooltip = function() {
            this.tooltip.isVisible && this.firstTooltipObj && (this.tooltipValue(), this.isMaterial ? this.openMaterialTooltip() : 1 === this.activeHandle ? this.firstTooltipObj.open(this.firstHandle) : this.secondTooltipObj.open(this.secondHandle));
        }, Slider.prototype.keyDown = function(event) {
            switch (event.keyCode) {
              case 37:
              case 38:
              case 39:
              case 40:
              case 33:
              case 34:
              case 36:
              case 35:
                event.preventDefault(), this.buttonClick(event), this.tooltip.isVisible && "Always" !== this.tooltip.showOn && !this.isMaterial && this.closeTooltip();
            }
        }, Slider.prototype.wireButtonEvt = function(destroy) {
            destroy ? (EventHandler.remove(this.firstBtn, "mouseleave touchleave", this.buttonFocusOut), 
            EventHandler.remove(this.secondBtn, "mouseleave touchleave", this.buttonFocusOut), 
            EventHandler.remove(this.firstBtn, "mousedown touchstart", this.repeatHandlerMouse), 
            EventHandler.remove(this.firstBtn, "mouseup mouseleave touchup touchend", this.repeatHandlerUp), 
            EventHandler.remove(this.secondBtn, "mousedown touchstart", this.repeatHandlerMouse), 
            EventHandler.remove(this.secondBtn, "mouseup mouseleave touchup touchend", this.repeatHandlerUp), 
            EventHandler.remove(this.firstBtn, "focusout", this.sliderFocusOut), EventHandler.remove(this.secondBtn, "focusout", this.sliderFocusOut)) : (EventHandler.add(this.firstBtn, "mouseleave touchleave", this.buttonFocusOut, this), 
            EventHandler.add(this.secondBtn, "mouseleave touchleave", this.buttonFocusOut, this), 
            EventHandler.add(this.firstBtn, "mousedown touchstart", this.repeatHandlerMouse, this), 
            EventHandler.add(this.firstBtn, "mouseup mouseleave touchup touchend", this.repeatHandlerUp, this), 
            EventHandler.add(this.secondBtn, "mousedown touchstart", this.repeatHandlerMouse, this), 
            EventHandler.add(this.secondBtn, "mouseup mouseleave touchup touchend", this.repeatHandlerUp, this), 
            EventHandler.add(this.firstBtn, "focusout", this.sliderFocusOut, this), EventHandler.add(this.secondBtn, "focusout", this.sliderFocusOut, this));
        }, Slider.prototype.wireEvents = function() {
            this.onresize = this.onResize.bind(this), window.addEventListener("resize", this.onresize), 
            this.enabled && !this.readOnly && (EventHandler.add(this.element, "mousedown touchstart", this.sliderDown, this), 
            EventHandler.add(this.sliderContainer, "keydown", this.keyDown, this), EventHandler.add(this.sliderContainer, "keyup", this.keyUp, this), 
            EventHandler.add(this.element, "focusout", this.sliderFocusOut, this), EventHandler.add(this.sliderContainer, "mouseover mouseout touchstart touchend", this.hover, this), 
            this.wireFirstHandleEvt(!1), "Range" === this.type && this.wireSecondHandleEvt(!1), 
            this.showButtons && this.wireButtonEvt(!1), this.wireMaterialTooltipEvent(!1));
        }, Slider.prototype.unwireEvents = function() {
            EventHandler.remove(this.element, "mousedown touchstart", this.sliderDown), EventHandler.remove(this.sliderContainer, "keydown", this.keyDown), 
            EventHandler.remove(this.sliderContainer, "keyup", this.keyUp), EventHandler.remove(this.element, "focusout", this.sliderFocusOut), 
            EventHandler.remove(this.sliderContainer, "mouseover mouseout touchstart touchend", this.hover), 
            this.wireFirstHandleEvt(!0), "Range" === this.type && this.wireSecondHandleEvt(!0), 
            this.showButtons && this.wireButtonEvt(!0), this.wireMaterialTooltipEvent(!0);
        }, Slider.prototype.keyUp = function(event) {
            if (9 === event.keyCode && event.target.classList.contains(classNames_sliderHandle) && !event.target.classList.contains(classNames_sliderTabHandle)) {
                this.element.querySelector("." + classNames_sliderTabHandle) && this.element.querySelector("." + classNames_sliderTabHandle).classList.remove(classNames_sliderTabHandle), 
                event.target.classList.add(classNames_sliderTabHandle);
                var parentElement = event.target.parentElement;
                parentElement === this.element && (parentElement.querySelector("." + classNames_sliderTrack).classList.add(classNames_sliderTabTrack), 
                "Range" !== this.type && "MinRange" !== this.type || parentElement.querySelector("." + classNames_rangeBar).classList.add(classNames_sliderTabRange)), 
                "Range" === this.type && (event.target.previousSibling.classList.contains(classNames_sliderHandle) ? this.activeHandle = 2 : this.activeHandle = 1), 
                this.tooltipAnimation(), this.tooltip.isVisible && "Always" !== this.tooltip.showOn && !this.isMaterial && this.closeTooltip();
            }
            this.changeEvent("changed");
        }, Slider.prototype.hover = function(event) {
            isNullOrUndefined(event) || ("mouseover" === event.type || "touchmove" === event.type || "mousemove" === event.type || "pointermove" === event.type || "touchstart" === event.type ? this.sliderContainer.classList.add(classNames_sliderHover) : this.sliderContainer.classList.remove(classNames_sliderHover));
        }, Slider.prototype.sliderFocusOut = function(event) {
            var _this = this;
            if (event.relatedTarget !== this.secondHandle && event.relatedTarget !== this.firstHandle && event.relatedTarget !== this.element && event.relatedTarget !== this.firstBtn && event.relatedTarget !== this.secondBtn) {
                if (this.hiddenInput.focus(), this.hiddenInput.blur(), this.isMaterial && this.tooltip.isVisible) {
                    var transformProperties_1 = this.getTooltipTransformProperties(this.previousTooltipClass), tooltipElement = "Range" !== this.type ? [ this.firstTooltipElement ] : [ this.firstTooltipElement, this.secondTooltipElement ], hiddenHandle_1 = "Range" !== this.type ? [ this.firstHandle ] : [ this.firstHandle, this.secondHandle ], handle_1 = "Range" !== this.type ? [ this.firstMaterialHandle ] : [ this.firstMaterialHandle, this.secondMaterialHandle ];
                    tooltipElement.forEach(function(tooltipElement, index) {
                        tooltipElement && (tooltipElement.style.transition = _this.scaleTransform, tooltipElement.firstChild.classList.remove(classNames_materialTooltipShow), 
                        tooltipElement.firstChild.classList.add(classNames_materialTooltipHide), hiddenHandle_1[index].style.cursor = "-webkit-grab", 
                        hiddenHandle_1[index].style.cursor = "grab", handle_1[index].style.transform = "scale(1)", 
                        tooltipElement.classList.remove(classNames_materialTooltipOpen), tooltipElement.firstElementChild.innerText.length > 4 ? tooltipElement.style.transform = transformProperties_1.translate + " scale(0.01)" : tooltipElement.style.transform = transformProperties_1.translate + " " + transformProperties_1.rotate + " scale(0.01)", 
                        setTimeout(function() {
                            tooltipElement.style.transition = "none";
                        }, 2500));
                    });
                }
                this.element.querySelector("." + classNames_sliderTabHandle) && this.element.querySelector("." + classNames_sliderTabHandle).classList.remove(classNames_sliderTabHandle), 
                this.element.querySelector("." + classNames_sliderTabTrack) && (this.element.querySelector("." + classNames_sliderTabTrack).classList.remove(classNames_sliderTabTrack), 
                "Range" !== this.type && "MinRange" !== this.type || !this.element.querySelector("." + classNames_sliderTabRange) || this.element.querySelector("." + classNames_sliderTabRange).classList.remove(classNames_sliderTabRange));
            }
        }, Slider.prototype.closeTooltip = function() {
            this.tooltip.isVisible && (this.tooltipValue(), 1 === this.activeHandle ? this.firstTooltipObj.close() : this.secondTooltipObj.close());
        }, Slider.prototype.removeElement = function(element) {
            element.parentNode && element.parentNode.removeChild(element);
        }, Slider.prototype.changeSliderType = function(type) {
            this.isMaterial && this.firstMaterialHandle && (this.sliderContainer.classList.remove(classNames_materialSlider), 
            this.removeElement(this.firstMaterialHandle), this.firstTooltipElement = void 0, 
            this.firstHandleTooltipPosition = void 0, this.secondMaterialHandle && (this.removeElement(this.secondMaterialHandle), 
            this.secondTooltipElement = void 0, this.secondHandleTooltipPosition = void 0)), 
            this.tooltip.isVisible && this.isMaterial && this.sliderContainer.classList.add(classNames_materialSlider), 
            this.removeElement(this.firstHandle), "Default" !== type && ("Range" === type && this.removeElement(this.secondHandle), 
            this.removeElement(this.rangeBar)), this.tooltip.isVisible && !isNullOrUndefined(this.firstTooltipObj) && (this.firstTooltipObj.destroy(), 
            "Range" !== type || isNullOrUndefined(this.secondTooltipObj) || this.secondTooltipObj.destroy()), 
            this.createRangeBar(), this.setHandler(), this.setOrientClass(), this.wireFirstHandleEvt(!1), 
            "Range" === this.type && this.wireSecondHandleEvt(!1), this.setValue(), this.tooltip.isVisible && (this.renderTooltip(), 
            this.wireMaterialTooltipEvent(!1)), this.updateConfig();
        }, Slider.prototype.changeRtl = function() {
            if (this.enableRtl || "Range" !== this.type || (this.value = [ this.handleVal2, this.handleVal1 ]), 
            this.updateConfig(), this.tooltip.isVisible && (this.firstTooltipObj.refresh(this.firstHandle), 
            "Range" === this.type && this.secondTooltipObj.refresh(this.secondHandle)), this.showButtons) {
                var enabledRTL = this.enableRtl && "Vertical" !== this.orientation;
                attributes(enabledRTL ? this.secondBtn : this.firstBtn, {
                    "aria-label": "Decrease",
                    title: "Decrease"
                }), attributes(enabledRTL ? this.firstBtn : this.secondBtn, {
                    "aria-label": "Increase",
                    title: "Increase"
                });
            }
        }, Slider.prototype.changeOrientation = function() {
            this.changeSliderType(this.type);
        }, Slider.prototype.updateConfig = function() {
            this.setEnableRTL(), this.setValue(), this.tooltip.isVisible && this.refreshTooltip(), 
            "None" !== this.ticks.placement && this.ul && (this.removeElement(this.ul), this.renderScale());
        }, Slider.prototype.getPersistData = function() {
            return this.addOnPersist([ "value" ]);
        }, Slider.prototype.destroy = function() {
            _super.prototype.destroy.call(this), this.unwireEvents(), window.removeEventListener("resize", this.onresize), 
            removeClass([ this.sliderContainer ], [ classNames_sliderDisabled ]), this.firstHandle.removeAttribute("aria-orientation"), 
            "Range" === this.type && this.secondHandle.removeAttribute("aria-orientation"), 
            this.sliderContainer.parentNode.insertBefore(this.element, this.sliderContainer), 
            detach(this.sliderContainer), this.tooltip.isVisible && (this.firstTooltipObj.destroy(), 
            "Range" !== this.type || isNullOrUndefined(this.secondTooltipObj) || this.secondTooltipObj.destroy()), 
            this.element.innerHTML = "";
        }, Slider.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var _this = this, _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "cssClass":
                    this.setCSSClass(oldProp.cssClass);
                    break;

                  case "value":
                    isNullOrUndefined(oldProp.value) || isNullOrUndefined(newProp.value) || oldProp.value.toString() !== newProp.value.toString() && (this.setValue(), 
                    this.refreshTooltip(), "Range" === this.type && (oldProp.value[0] === newProp.value[0] ? this.activeHandle = 2 : this.activeHandle = 1));
                    break;

                  case "min":
                  case "step":
                  case "max":
                    this.setMinMaxValue();
                    break;

                  case "tooltip":
                    isNullOrUndefined(newProp.tooltip) || isNullOrUndefined(oldProp.tooltip) || this.setTooltip();
                    break;

                  case "type":
                    this.changeSliderType(oldProp.type), this.setZindex();
                    break;

                  case "enableRtl":
                    oldProp.enableRtl !== newProp.enableRtl && "Vertical" !== this.orientation && (this.rtl = oldProp.enableRtl, 
                    this.changeRtl());
                    break;

                  case "orientation":
                    this.changeOrientation();
                    break;

                  case "ticks":
                    isNullOrUndefined(this.sliderContainer.querySelector("." + classNames_scale)) || (detach(this.ul), 
                    Array.prototype.forEach.call(this.sliderContainer.classList, function(className) {
                        className.match(/e-scale-/) && _this.sliderContainer.classList.remove(className);
                    })), "None" !== this.ticks.placement && (this.renderScale(), this.setZindex());
                    break;

                  case "locale":
                    this.showButtons && this.buttonTitle();
                    break;

                  case "showButtons":
                    newProp.showButtons ? (this.setButtons(), this.onResize(), this.enabled && !this.readOnly && this.wireButtonEvt(!1)) : this.firstBtn && this.secondBtn && (this.sliderContainer.removeChild(this.firstBtn), 
                    this.sliderContainer.removeChild(this.secondBtn), this.firstBtn = void 0, this.secondBtn = void 0);
                    break;

                  case "enabled":
                    this.setEnabled();
                    break;

                  case "readOnly":
                    this.setReadOnly();
                }
            }
        }, Slider.prototype.setReadOnly = function() {
            this.readOnly ? (this.unwireEvents(), this.sliderContainer.classList.add(classNames_readOnly)) : (this.wireEvents(), 
            this.sliderContainer.classList.remove(classNames_readOnly));
        }, Slider.prototype.setMinMaxValue = function() {
            var _this = this;
            this.setValue(), this.refreshTooltip(), isNullOrUndefined(this.sliderContainer.querySelector("." + classNames_scale)) || this.ul && (detach(this.ul), 
            Array.prototype.forEach.call(this.sliderContainer.classList, function(className) {
                className.match(/e-scale-/) && _this.sliderContainer.classList.remove(className);
            })), "None" !== this.ticks.placement && (this.renderScale(), this.setZindex());
        }, Slider.prototype.setZindex = function() {
            this.zIndex = 6, isNullOrUndefined(this.ticks) || "None" === this.ticks.placement || (this.ul.style.zIndex = this.zIndex + -7 + "", 
            this.element.style.zIndex = this.zIndex + 2 + ""), this.isMaterial || isNullOrUndefined(this.ticks) || "Both" !== this.ticks.placement || (this.element.style.zIndex = this.zIndex + 2 + ""), 
            this.firstHandle.style.zIndex = this.zIndex + 3 + "", "Range" === this.type && (this.secondHandle.style.zIndex = this.zIndex + 4 + "");
        }, Slider.prototype.setTooltip = function() {
            this.changeSliderType(this.type);
        }, Slider.prototype.getModuleName = function() {
            return "slider";
        }, __decorate$2$4([ Property(null) ], Slider.prototype, "value", void 0), __decorate$2$4([ Property(1) ], Slider.prototype, "step", void 0), 
        __decorate$2$4([ Property(0) ], Slider.prototype, "min", void 0), __decorate$2$4([ Property(100) ], Slider.prototype, "max", void 0), 
        __decorate$2$4([ Property(!1) ], Slider.prototype, "readOnly", void 0), __decorate$2$4([ Property("Default") ], Slider.prototype, "type", void 0), 
        __decorate$2$4([ Complex({}, TicksData) ], Slider.prototype, "ticks", void 0), __decorate$2$4([ Property(!0) ], Slider.prototype, "enabled", void 0), 
        __decorate$2$4([ Property(!1) ], Slider.prototype, "enableRtl", void 0), __decorate$2$4([ Complex({}, TooltipData) ], Slider.prototype, "tooltip", void 0), 
        __decorate$2$4([ Property(!1) ], Slider.prototype, "showButtons", void 0), __decorate$2$4([ Property(!0) ], Slider.prototype, "enableAnimation", void 0), 
        __decorate$2$4([ Property("Horizontal") ], Slider.prototype, "orientation", void 0), 
        __decorate$2$4([ Property("") ], Slider.prototype, "cssClass", void 0), __decorate$2$4([ Event() ], Slider.prototype, "created", void 0), 
        __decorate$2$4([ Event() ], Slider.prototype, "change", void 0), __decorate$2$4([ Event() ], Slider.prototype, "changed", void 0), 
        __decorate$2$4([ Event() ], Slider.prototype, "renderingTicks", void 0), __decorate$2$4([ Event() ], Slider.prototype, "renderedTicks", void 0), 
        __decorate$2$4([ Event() ], Slider.prototype, "tooltipChange", void 0), Slider = __decorate$2$4([ NotifyPropertyChanges ], Slider);
    }(Component), __extends$3$2 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$3$2 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, VALIDATE_EMAIL = new RegExp("^[A-Za-z0-9._%+-]{3,}@[a-zA-Z]{3,}([.]{1}[a-zA-Z]{2,5}|[.]{1}[a-zA-Z]{2,4}[.]{1}[a-zA-Z]{2,4})$"), VALIDATE_URL = new RegExp("^((ftp|http|https)://)?www.([A-z]{2,}).([A-z]{2,})$"), VALIDATE_DATE_ISO = new RegExp("^([0-9]{4})-(0[1-9]|1[0-2])-(0[1-9]|[1-2][0-9]|3[0-1])$"), VALIDATE_DIGITS = new RegExp("^[0-9]*$"), VALIDATE_PHONE = new RegExp("^[+]?[0-9]{9,13}$"), VALIDATE_CREDITCARD = new RegExp("^\\d{13,16}$");
    !function(ErrorOption) {
        ErrorOption[ErrorOption.Message = 0] = "Message", ErrorOption[ErrorOption.Label = 1] = "Label";
    }(ErrorOption || (ErrorOption = {}));
    var ListBase, FormValidator = function(_super) {
        function FormValidator(element, options) {
            var _this = _super.call(this, options, element) || this;
            if (_this.validated = [], _this.errorRules = [], _this.allowSubmit = !1, _this.required = "required", 
            _this.infoElement = null, _this.inputElement = null, _this.selectQuery = "input:not([type=reset]):not([type=button]), select, textarea", 
            _this.defaultMessages = {
                required: "This field is required.",
                email: "Please enter a valid email address.",
                url: "Please enter a valid URL.",
                date: "Please enter a valid date.",
                dateIso: "Please enter a valid date ( ISO ).",
                creditcard: "Please enter valid card number",
                number: "Please enter a valid number.",
                digits: "Please enter only digits.",
                maxLength: "Please enter no more than {0} characters.",
                minLength: "Please enter at least {0} characters.",
                rangeLength: "Please enter a value between {0} and {1} characters long.",
                range: "Please enter a value between {0} and {1}.",
                max: "Please enter a value less than or equal to {0}.",
                min: "Please enter a value greater than or equal to {0}.",
                regex: "Please enter a correct value.",
                tel: "Please enter a valid phone number.",
                pattern: "Please enter a correct pattern value.",
                equalTo: "Please enter the valid match text"
            }, element = "string" == typeof element ? select(element, document) : element, null != _this.element) return _this.element.setAttribute("novalidate", ""), 
            _this.inputElements = selectAll(_this.selectQuery, _this.element), _this.createHTML5Rules(), 
            _this.wireEvents(), _this;
        }
        return __extends$3$2(FormValidator, _super), FormValidator_1 = FormValidator, FormValidator.prototype.addRules = function(name, rules) {
            name && (this.rules.hasOwnProperty(name) ? extend(this.rules[name], rules, {}) : this.rules[name] = rules);
        }, FormValidator.prototype.removeRules = function(name, rules) {
            if (name || rules) if (this.rules[name] && !rules) delete this.rules[name]; else {
                if (isNullOrUndefined(this.rules[name] && rules)) return;
                for (var i = 0; i < rules.length; i++) delete this.rules[name][rules[i]];
            } else this.rules = {};
        }, FormValidator.prototype.validate = function(selected) {
            var rules = Object.keys(this.rules);
            if (selected && rules.length) return this.validateRules(selected), -1 !== rules.indexOf(selected) && 0 === this.errorRules.filter(function(data) {
                return data.name === selected;
            }).length;
            for (var _i = 0, rules_1 = rules; _i < rules_1.length; _i++) {
                var name_1 = rules_1[_i];
                this.validateRules(name_1);
            }
            return 0 === this.errorRules.length;
        }, FormValidator.prototype.reset = function() {
            this.element.reset(), this.clearForm();
        }, FormValidator.prototype.getInputElement = function(name) {
            return this.inputElement = select("[name=" + name + "]", this.element), this.inputElement;
        }, FormValidator.prototype.destroy = function() {
            this.reset(), this.unwireEvents(), this.rules = {};
            for (var _i = 0, elements_1 = selectAll("." + this.errorClass + ", ." + this.validClass, this.element); _i < elements_1.length; _i++) {
                elements_1[_i].remove();
            }
            _super.prototype.destroy.call(this);
        }, FormValidator.prototype.onPropertyChanged = function(newProp, oldProp) {}, FormValidator.prototype.getModuleName = function() {
            return "formValidator";
        }, FormValidator.prototype.clearForm = function() {
            this.errorRules = [], this.validated = [];
            for (var _i = 0, elements_2 = selectAll(this.selectQuery, this.element); _i < elements_2.length; _i++) {
                var input = elements_2[_i];
                input.removeAttribute("aria-invalid"), input.classList.remove(this.errorClass), 
                input.name.length > 0 && (this.getInputElement(input.name), this.getErrorElement(input.name), 
                this.hideMessage(input.name)), input.classList.remove(this.validClass);
            }
        }, FormValidator.prototype.createHTML5Rules = function() {
            for (var defRules = [ "required", "regex", "rangeLength", "maxLength", "minLength", "dateIso", "digits", "pattern", "data-val-required", "type", "data-validation", "min", "max", "range", "equalTo", "data-val-minlength-min", "data-val-equalto-other", "data-val-maxlength-max", "data-val-range-min", "data-val-regex-pattern", "data-val-length-max", "data-val-creditcard", "data-val-phone" ], acceptedTypes = [ "email", "url", "date", "number", "tel" ], _i = 0, _a = this.inputElements; _i < _a.length; _i++) {
                for (var input = _a[_i], allRule = {}, _b = 0, defRules_1 = defRules; _b < defRules_1.length; _b++) {
                    var rule = defRules_1[_b];
                    if (null !== input.getAttribute(rule)) switch (rule) {
                      case "required":
                        this.defRule(input, allRule, rule, input.required);
                        break;

                      case "data-validation":
                        rule = input.getAttribute(rule), this.defRule(input, allRule, rule, !0);
                        break;

                      case "type":
                        -1 !== acceptedTypes.indexOf(input.type) && this.defRule(input, allRule, input.type, !0);
                        break;

                      case "rangeLength":
                      case "range":
                        this.defRule(input, allRule, rule, JSON.parse(input.getAttribute(rule)));
                        break;

                      case "equalTo":
                        var id = input.getAttribute(rule);
                        this.defRule(input, allRule, rule, id);
                        break;

                      default:
                        "true" === input.getAttribute("data-val") ? this.annotationRule(input, allRule, rule, input.getAttribute(rule)) : this.defRule(input, allRule, rule, input.getAttribute(rule));
                    }
                }
                0 !== Object.keys(allRule).length && this.addRules(input.name, allRule);
            }
        }, FormValidator.prototype.annotationRule = function(input, ruleCon, ruleName, value) {
            var annotationRule = ruleName.split("-"), rulesList = [ "required", "creditcard", "phone", "maxlength", "minlength", "range", "regex", "equalto" ], ruleFirstName = annotationRule[annotationRule.length - 1], ruleSecondName = annotationRule[annotationRule.length - 2];
            if (-1 !== rulesList.indexOf(ruleFirstName)) switch (ruleFirstName) {
              case "required":
                this.defRule(input, ruleCon, "required", value);
                break;

              case "creditcard":
                this.defRule(input, ruleCon, "creditcard", value);
                break;

              case "phone":
                this.defRule(input, ruleCon, "tel", value);
            } else if (-1 !== rulesList.indexOf(ruleSecondName)) switch (ruleSecondName) {
              case "maxlength":
                this.defRule(input, ruleCon, "maxLength", value);
                break;

              case "minlength":
                this.defRule(input, ruleCon, "minLength", value);
                break;

              case "range":
                var minvalue = input.getAttribute("data-val-range-min"), maxvalue = input.getAttribute("data-val-range-max");
                this.defRule(input, ruleCon, "range", [ minvalue, maxvalue ]);
                break;

              case "equalto":
                var id = input.getAttribute(ruleName).split(".");
                this.defRule(input, ruleCon, "equalTo", id[id.length - 1]);
                break;

              case "regex":
                this.defRule(input, ruleCon, "regex", value);
            }
        }, FormValidator.prototype.defRule = function(input, ruleCon, ruleName, value) {
            var message = input.getAttribute("data-" + ruleName + "-message"), annotationMessage = input.getAttribute("data-val-" + ruleName);
            message ? value = [ value, message ] : annotationMessage && (value = [ value, annotationMessage ]), 
            ruleCon[ruleName] = value;
        }, FormValidator.prototype.wireEvents = function() {
            for (var _i = 0, _a = this.inputElements; _i < _a.length; _i++) {
                var input = _a[_i];
                FormValidator_1.isCheckable(input) ? EventHandler.add(input, "click", this.clickHandler, this) : "SELECT" === input.tagName ? EventHandler.add(input, "change", this.changeHandler, this) : (EventHandler.add(input, "focusout", this.focusOutHandler, this), 
                EventHandler.add(input, "keyup", this.keyUpHandler, this));
            }
            EventHandler.add(this.element, "submit", this.submitHandler, this), EventHandler.add(this.element, "reset", this.resetHandler, this);
        }, FormValidator.prototype.unwireEvents = function() {
            for (var _i = 0, _a = this.inputElements; _i < _a.length; _i++) {
                var input = _a[_i];
                EventHandler.clearEvents(input);
            }
            EventHandler.remove(this.element, "submit", this.submitHandler), EventHandler.remove(this.element, "reset", this.resetHandler);
        }, FormValidator.prototype.focusOutHandler = function(e) {
            this.trigger("focusout", e);
            var element = e.target;
            this.rules[element.name] && (this.rules[element.name][this.required] || element.value.length > 0 ? this.validate(element.name) : -1 === this.validated.indexOf(element.name) && this.validated.push(element.name));
        }, FormValidator.prototype.keyUpHandler = function(e) {
            this.trigger("keyup", e);
            var element = e.target;
            (9 !== e.which || this.rules[element.name] && (!this.rules[element.name] || this.rules[element.name][this.required])) && -1 !== this.validated.indexOf(element.name) && this.rules[element.name] && -1 === [ 16, 17, 18, 20, 35, 36, 37, 38, 39, 40, 45, 144, 225 ].indexOf(e.which) && this.validate(element.name);
        }, FormValidator.prototype.clickHandler = function(e) {
            this.trigger("click", e);
            var element = e.target;
            "submit" !== element.type ? this.validate(element.name) : null !== element.getAttribute("formnovalidate") && (this.allowSubmit = !0);
        }, FormValidator.prototype.changeHandler = function(e) {
            this.trigger("change", e);
            var element = e.target;
            this.validate(element.name);
        }, FormValidator.prototype.submitHandler = function(e) {
            this.trigger("submit", e), this.allowSubmit || this.validate() ? this.allowSubmit = !1 : e.preventDefault();
        }, FormValidator.prototype.resetHandler = function() {
            this.clearForm();
        }, FormValidator.prototype.validateRules = function(name) {
            if (this.rules[name]) {
                var rules = Object.keys(this.rules[name]);
                this.getInputElement(name), this.getErrorElement(name);
                for (var _i = 0, rules_2 = rules; _i < rules_2.length; _i++) {
                    var rule = rules_2[_i], errorMessage = this.getErrorMessage(this.rules[name][rule], rule), errorRule = {
                        name: name,
                        message: errorMessage
                    }, eventArgs = {
                        inputName: name,
                        element: this.inputElement,
                        message: errorMessage
                    };
                    if (!this.isValid(name, rule) && !this.inputElement.classList.contains(this.ignore)) {
                        this.removeErrorRules(name), this.errorRules.push(errorRule), this.inputElement.setAttribute("aria-invalid", "true"), 
                        this.inputElement.setAttribute("aria-describedby", this.inputElement.id + "-info"), 
                        this.infoElement ? this.showMessage(errorRule) : this.createErrorElement(name, errorRule.message, this.inputElement), 
                        eventArgs.errorElement = this.infoElement, eventArgs.status = "failure", this.inputElement.classList.add(this.errorClass), 
                        this.inputElement.classList.remove(this.validClass), this.trigger("validationComplete", eventArgs), 
                        "required" === rule && this.inputElement.setAttribute("aria-required", "true");
                        break;
                    }
                    this.hideMessage(name), eventArgs.status = "success", this.trigger("validationComplete", eventArgs);
                }
            }
        }, FormValidator.prototype.isValid = function(name, rule) {
            var params = this.rules[name][rule], param = params instanceof Array && "string" == typeof params[1] ? params[0] : params, currentRule = this.rules[name][rule], args = {
                value: this.inputElement.value,
                param: param,
                element: this.inputElement,
                formElement: this.element
            };
            if (this.trigger("validationBegin", args), currentRule && "function" == typeof currentRule[0]) {
                return currentRule[0].call(this, {
                    element: this.inputElement,
                    value: this.inputElement.value
                });
            }
            return FormValidator_1.isCheckable(this.inputElement) ? "required" !== rule || selectAll("input[name=" + name + "]:checked", this.element).length > 0 : FormValidator_1.checkValidator[rule](args);
        }, FormValidator.prototype.getErrorMessage = function(ruleValue, rule) {
            var message = ruleValue instanceof Array && "string" == typeof ruleValue[1] ? ruleValue[1] : this.defaultMessages[rule], formats = message.match(/{(\d)}/g);
            if (!isNullOrUndefined(formats)) for (var i = 0; i < formats.length; i++) {
                var value = ruleValue instanceof Array ? ruleValue[i] : ruleValue;
                message = message.replace(formats[i], value);
            }
            return message;
        }, FormValidator.prototype.createErrorElement = function(name, message, input) {
            var errorElement = createElement(this.errorElement, {
                className: this.errorClass,
                innerHTML: message,
                attrs: {
                    for: name
                }
            });
            if (this.errorOption === ErrorOption.Message && (errorElement.classList.remove(this.errorClass), 
            errorElement.classList.add("e-message"), errorElement = createElement(this.errorContainer, {
                className: this.errorClass,
                innerHTML: errorElement.outerHTML
            })), errorElement.id = this.inputElement.name + "-info", this.element.querySelector('[data-valmsg-for="' + input.id + '"]')) this.element.querySelector('[data-valmsg-for="' + input.id + '"]').appendChild(errorElement); else if (!0 === input.hasAttribute("data-msg-containerid")) {
                var containerId = input.getAttribute("data-msg-containerid");
                this.element.querySelector("#" + containerId).appendChild(errorElement);
            } else null != this.customPlacement ? this.customPlacement.call(this, this.inputElement, errorElement) : this.inputElement.parentNode.insertBefore(errorElement, this.inputElement.nextSibling);
            errorElement.style.display = "block", this.getErrorElement(name), this.validated.push(name), 
            this.checkRequired(name);
        }, FormValidator.prototype.getErrorElement = function(name) {
            return this.infoElement = select(this.errorElement + "." + this.errorClass, this.inputElement.parentElement), 
            this.infoElement || (this.infoElement = select(this.errorElement + "." + this.errorClass + '[for="' + name + '"]')), 
            this.infoElement;
        }, FormValidator.prototype.removeErrorRules = function(name) {
            for (var i = 0; i < this.errorRules.length; i++) {
                this.errorRules[i].name === name && this.errorRules.splice(i, 1);
            }
        }, FormValidator.prototype.showMessage = function(errorRule) {
            this.infoElement.style.display = "block", this.infoElement.innerHTML = errorRule.message, 
            this.checkRequired(errorRule.name);
        }, FormValidator.prototype.hideMessage = function(name) {
            this.infoElement && (this.infoElement.style.display = "none", this.removeErrorRules(name), 
            this.inputElement.classList.add(this.validClass), this.inputElement.classList.remove(this.errorClass), 
            this.inputElement.setAttribute("aria-invalid", "false"));
        }, FormValidator.prototype.checkRequired = function(name) {
            this.rules[name][this.required] || this.inputElement.value.length || (this.infoElement.innerHTML = this.inputElement.value, 
            this.infoElement.setAttribute("aria-invalid", "false"), this.hideMessage(name));
        }, FormValidator.isCheckable = function(input) {
            var inputType = input.getAttribute("type");
            return inputType && ("checkbox" === inputType || "radio" === inputType || "submit" === inputType);
        }, FormValidator.checkValidator = {
            required: function(option) {
                return option.value.length > 0;
            },
            email: function(option) {
                return VALIDATE_EMAIL.test(option.value);
            },
            url: function(option) {
                return VALIDATE_URL.test(option.value);
            },
            dateIso: function(option) {
                return VALIDATE_DATE_ISO.test(option.value);
            },
            tel: function(option) {
                return VALIDATE_PHONE.test(option.value);
            },
            creditcard: function(option) {
                return VALIDATE_CREDITCARD.test(option.value);
            },
            number: function(option) {
                return !isNaN(Number(option.value)) && -1 === option.value.indexOf(" ");
            },
            digits: function(option) {
                return VALIDATE_DIGITS.test(option.value);
            },
            maxLength: function(option) {
                return option.value.length <= option.param;
            },
            minLength: function(option) {
                return option.value.length >= option.param;
            },
            rangeLength: function(option) {
                var param = option.param;
                return option.value.length >= param[0] && option.value.length <= param[1];
            },
            range: function(option) {
                var param = option.param;
                return !isNaN(Number(option.value)) && Number(option.value) >= param[0] && Number(option.value) <= param[1];
            },
            date: function(option) {
                return !isNaN(new Date(option.value).getTime());
            },
            max: function(option) {
                return isNaN(Number(option.value)) ? new Date(option.value).getTime() <= new Date(JSON.parse(JSON.stringify(option.param))).getTime() : +option.value <= option.param;
            },
            min: function(option) {
                return isNaN(Number(option.value)) ? new Date(option.value).getTime() >= new Date(JSON.parse(JSON.stringify(option.param))).getTime() : +option.value >= option.param;
            },
            regex: function(option) {
                return new RegExp(option.param).test(option.value);
            },
            equalTo: function(option) {
                var compareTo = option.formElement.querySelector("#" + option.param);
                return option.param = compareTo.value, option.param === option.value;
            }
        }, __decorate$3$2([ Property("e-hidden") ], FormValidator.prototype, "ignore", void 0), 
        __decorate$3$2([ Property({}) ], FormValidator.prototype, "rules", void 0), __decorate$3$2([ Property("e-error") ], FormValidator.prototype, "errorClass", void 0), 
        __decorate$3$2([ Property("e-valid") ], FormValidator.prototype, "validClass", void 0), 
        __decorate$3$2([ Property("label") ], FormValidator.prototype, "errorElement", void 0), 
        __decorate$3$2([ Property("div") ], FormValidator.prototype, "errorContainer", void 0), 
        __decorate$3$2([ Property(ErrorOption.Label) ], FormValidator.prototype, "errorOption", void 0), 
        __decorate$3$2([ Event() ], FormValidator.prototype, "focusout", void 0), __decorate$3$2([ Event() ], FormValidator.prototype, "keyup", void 0), 
        __decorate$3$2([ Event() ], FormValidator.prototype, "click", void 0), __decorate$3$2([ Event() ], FormValidator.prototype, "change", void 0), 
        __decorate$3$2([ Event() ], FormValidator.prototype, "submit", void 0), __decorate$3$2([ Event() ], FormValidator.prototype, "validationBegin", void 0), 
        __decorate$3$2([ Event() ], FormValidator.prototype, "validationComplete", void 0), 
        __decorate$3$2([ Event() ], FormValidator.prototype, "customPlacement", void 0), 
        FormValidator = FormValidator_1 = __decorate$3$2([ NotifyPropertyChanges ], FormValidator);
        var FormValidator_1;
    }(Base), __extends$4$2 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$4$2 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, FILE = "e-upload-file-list", STATUS = "e-file-status", CLEAR_ICON = "e-file-remove-btn", PROGRESSBAR = "e-upload-progress-bar", UPLOAD_SUCCESS = "e-upload-success", ICON_FOCUSED = "e-clear-icon-focus", FilesProp = function(_super) {
        function FilesProp() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$4$2(FilesProp, _super), __decorate$4$2([ Property("") ], FilesProp.prototype, "name", void 0), 
        __decorate$4$2([ Property(null) ], FilesProp.prototype, "size", void 0), __decorate$4$2([ Property("") ], FilesProp.prototype, "type", void 0), 
        FilesProp;
    }(ChildProperty), ButtonsProps = function(_super) {
        function ButtonsProps() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$4$2(ButtonsProps, _super), __decorate$4$2([ Property("Browse") ], ButtonsProps.prototype, "browse", void 0), 
        __decorate$4$2([ Property("Upload") ], ButtonsProps.prototype, "upload", void 0), 
        __decorate$4$2([ Property("Clear") ], ButtonsProps.prototype, "clear", void 0), 
        ButtonsProps;
    }(ChildProperty), AsyncSettings = function(_super) {
        function AsyncSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$4$2(AsyncSettings, _super), __decorate$4$2([ Property("") ], AsyncSettings.prototype, "saveUrl", void 0), 
        __decorate$4$2([ Property("") ], AsyncSettings.prototype, "removeUrl", void 0), 
        AsyncSettings;
    }(ChildProperty), Uploader = function(_super) {
        function Uploader(options, element) {
            var _this = _super.call(this, options, element) || this;
            return _this.initialAttr = {
                accept: null,
                multiple: !1,
                disabled: !1
            }, _this.fileList = [], _this.filesData = [], _this.uploadedFilesData = [], _this.isForm = !1, 
            _this;
        }
        return __extends$4$2(Uploader, _super), Uploader.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "allowedExtensions":
                    this.setExtensions(this.allowedExtensions), this.clearAll();
                    break;

                  case "enabled":
                    this.setControlStatus();
                    break;

                  case "multiple":
                    this.setMultipleSelection();
                    break;

                  case "enableRtl":
                    this.setRTL(), this.reRenderFileList();
                    break;

                  case "buttons":
                    this.buttons.browse = isNullOrUndefined(this.buttons.browse) ? "" : this.buttons.browse, 
                    this.buttons.clear = isNullOrUndefined(this.buttons.clear) ? "" : this.buttons.clear, 
                    this.buttons.upload = isNullOrUndefined(this.buttons.upload) ? "" : this.buttons.upload, 
                    this.renderButtonTemplates();
                    break;

                  case "dropArea":
                    this.unBindDropEvents(), this.setDropArea();
                    break;

                  case "showFileList":
                    this.listParent && (this.listParent.style.display = this.showFileList ? "block" : "none", 
                    this.actionButtons.style.display = this.showFileList ? "block" : "none");
                    break;

                  case "files":
                    this.renderPreLoadFiles();
                    break;

                  case "minFileSize":
                  case "maxFileSize":
                  case "template":
                  case "autoUpload":
                    this.clearAll();
                    break;

                  case "locale":
                    this.l10n.setLocale(this.locale), this.setLocalizedTexts(), this.preLocaleObj = getValue("currentLocale", this.l10n);
                }
            }
        }, Uploader.prototype.setLocalizedTexts = function() {
            isNullOrUndefined(this.template) && ("string" == typeof this.buttons.browse && (this.browseButton.innerText = "Browse" === this.buttons.browse ? this.localizedTexts("Browse") : this.buttons.browse, 
            this.browseButton.setAttribute("title", this.browseButton.innerText), this.uploadWrapper.querySelector(".e-file-drop").innerHTML = this.localizedTexts("dropFilesHint")), 
            this.updateFileList());
        }, Uploader.prototype.getKeyValue = function(val) {
            for (var keyValue, _i = 0, _a = Object.keys(this.preLocaleObj); _i < _a.length; _i++) {
                var key = _a[_i];
                this.preLocaleObj[key] === val && (keyValue = key);
            }
            return keyValue;
        }, Uploader.prototype.updateFileList = function() {
            if (this.fileList.length > 0 && !isNullOrUndefined(this.uploadWrapper.querySelector(".e-upload-files"))) for (var i = 0; i < this.fileList.length; i++) this.fileList[i].querySelector(".e-file-status").innerHTML = this.localizedTexts(this.getKeyValue(this.filesData[i].status)), 
            this.filesData[i].status = this.localizedTexts(this.getKeyValue(this.filesData[i].status)), 
            this.fileList[i].classList.contains(UPLOAD_SUCCESS) ? this.fileList[i].querySelector(".e-icons").setAttribute("title", this.localizedTexts("remove")) : this.fileList[i].querySelector(".e-icons").setAttribute("title", this.localizedTexts("delete")), 
            this.autoUpload || (this.uploadButton.innerText = "Upload" === this.buttons.upload ? this.localizedTexts("Upload") : this.buttons.upload, 
            this.clearButton.innerText = "Clear" === this.buttons.clear ? this.localizedTexts("Clear") : this.buttons.clear);
        }, Uploader.prototype.reRenderFileList = function() {
            this.listParent && (detach(this.listParent), this.listParent = null, this.fileList = [], 
            this.removeActionButtons(), this.createFileList(this.filesData), this.renderActionButtons());
        }, Uploader.prototype.preRender = function() {
            this.cloneElement = this.element.cloneNode(!0), this.localeText = {
                Browse: "Browse",
                Clear: "Clear",
                Upload: "Upload",
                dropFilesHint: "or Drop files here",
                invalidMaxFileSize: "File size is too large",
                invalidMinFileSize: "File size is too small",
                invalidFileType: "File type is not allowed",
                uploadFailedMessage: "File failed to upload",
                uploadSuccessMessage: "File uploaded successfully",
                removedSuccessMessage: "File removed successfully",
                removedFailedMessage: "File failed to remove",
                inProgress: "Uploading",
                readyToUploadMessage: "Ready to upload",
                remove: "Remove",
                cancel: "Cancel",
                delete: "Delete file"
            }, this.l10n = new L10n("uploader", this.localeText, this.locale), this.preLocaleObj = getValue("currentLocale", this.l10n), 
            this.checkHTMLAttributes(), "" !== this.asyncSettings.saveUrl || "" !== this.asyncSettings.removeUrl || this.autoUpload || isNullOrUndefined(this.element.closest("form")) || (this.isForm = !0, 
            this.element.closest("form").setAttribute("enctype", "multipart/form-data"), this.element.closest("form").setAttribute("encoding", "multipart/form-data"));
            var ejInstance = getValue("ej2_instances", this.element);
            if ("EJS-UPLOADER" === this.element.tagName || "UPLOADERCOMPONENT" === this.element.tagName) {
                for (var inputElement = createElement("input", {
                    attrs: {
                        type: "file"
                    }
                }), index = 0; index < this.element.attributes.length; index++) inputElement.setAttribute(this.element.attributes[index].nodeName, this.element.attributes[index].nodeValue), 
                inputElement.innerHTML = this.element.innerHTML;
                inputElement.hasAttribute("name") || inputElement.setAttribute("name", "UploadFiles"), 
                this.element.appendChild(inputElement), this.element = inputElement, setValue("ej2_instances", ejInstance, this.element);
            }
            isNullOrUndefined(this.element.getAttribute("name")) && this.element.setAttribute("name", this.element.getAttribute("id")), 
            this.element.hasAttribute("type") || this.element.setAttribute("type", "file"), 
            this.keyConfigs = {
                previous: "shift+tab",
                enter: "enter",
                next: "tab"
            };
        }, Uploader.prototype.getPersistData = function() {
            return this.addOnPersist([]);
        }, Uploader.prototype.getModuleName = function() {
            return "uploader";
        }, Uploader.prototype.render = function() {
            this.renderBrowseButton(), this.initializeUpload(), this.wireEvents(), this.setMultipleSelection(), 
            this.setExtensions(this.allowedExtensions), this.setRTL(), this.renderPreLoadFiles(), 
            this.setControlStatus();
        }, Uploader.prototype.renderBrowseButton = function() {
            this.browseButton = createElement("button", {
                className: "e-css e-btn",
                attrs: {
                    type: "button"
                }
            }), "string" == typeof this.buttons.browse ? (this.browseButton.innerText = "Browse" === this.buttons.browse ? this.localizedTexts("Browse") : this.buttons.browse, 
            this.browseButton.setAttribute("title", this.browseButton.innerText)) : this.browseButton.appendChild(this.buttons.browse), 
            this.element.setAttribute("aria-label", "Uploader");
        }, Uploader.prototype.renderActionButtons = function() {
            this.element.setAttribute("tabindex", "-1"), this.actionButtons = createElement("div", {
                className: "e-upload-actions"
            }), this.uploadButton = createElement("button", {
                className: "e-file-upload-btn e-css e-btn e-primary",
                attrs: {
                    type: "button",
                    tabindex: "-1"
                }
            }), this.clearButton = createElement("button", {
                className: "e-file-clear-btn e-css e-btn e-flat",
                attrs: {
                    type: "button",
                    tabindex: "-1"
                }
            }), this.actionButtons.appendChild(this.clearButton), this.actionButtons.appendChild(this.uploadButton), 
            this.renderButtonTemplates(), this.uploadWrapper.appendChild(this.actionButtons), 
            this.browseButton.blur(), this.uploadButton.focus(), this.wireActionButtonEvents();
        }, Uploader.prototype.wireActionButtonEvents = function() {
            EventHandler.add(this.uploadButton, "click", this.uploadButtonClick, this), EventHandler.add(this.clearButton, "click", this.clearButtonClick, this);
        }, Uploader.prototype.unwireActionButtonEvents = function() {
            EventHandler.remove(this.uploadButton, "click", this.uploadButtonClick), EventHandler.remove(this.clearButton, "click", this.clearButtonClick);
        }, Uploader.prototype.removeActionButtons = function() {
            this.actionButtons && (this.unwireActionButtonEvents(), detach(this.actionButtons), 
            this.actionButtons = null);
        }, Uploader.prototype.renderButtonTemplates = function() {
            if ("string" == typeof this.buttons.browse ? (this.browseButton.innerText = "Browse" === this.buttons.browse ? this.localizedTexts("Browse") : this.buttons.browse, 
            this.browseButton.setAttribute("title", this.browseButton.innerText)) : this.browseButton.appendChild(this.buttons.browse), 
            this.uploadButton) {
                var uploadText = void 0;
                uploadText = isNullOrUndefined(this.buttons.upload) ? "Upload" : this.buttons.upload, 
                this.buttons.upload = uploadText, "string" == typeof this.buttons.upload ? (this.uploadButton.innerText = "Upload" === this.buttons.upload ? this.localizedTexts("Upload") : this.buttons.upload, 
                this.uploadButton.setAttribute("title", this.uploadButton.innerText)) : this.uploadButton.appendChild(this.buttons.upload);
            }
            if (this.clearButton) {
                var clearText = void 0;
                clearText = isNullOrUndefined(this.buttons.clear) ? "Clear" : this.buttons.clear, 
                this.buttons.clear = clearText, "string" == typeof this.buttons.clear ? (this.clearButton.innerText = "Clear" === this.buttons.clear ? this.localizedTexts("Clear") : this.buttons.clear, 
                this.clearButton.setAttribute("title", this.clearButton.innerText)) : this.clearButton.appendChild(this.buttons.clear);
            }
        }, Uploader.prototype.initializeUpload = function() {
            this.element.setAttribute("tabindex", "-1");
            var inputWrapper = createElement("span", {
                className: "e-file-select"
            });
            this.element.parentElement.insertBefore(inputWrapper, this.element), this.dropAreaWrapper = createElement("div", {
                className: "e-file-select-wrap"
            }), this.element.parentElement.insertBefore(this.dropAreaWrapper, this.element), 
            inputWrapper.appendChild(this.element), this.dropAreaWrapper.appendChild(this.browseButton), 
            this.dropAreaWrapper.appendChild(inputWrapper);
            var fileDropArea = createElement("span", {
                className: "e-file-drop"
            });
            fileDropArea.innerHTML = this.localizedTexts("dropFilesHint"), this.dropAreaWrapper.appendChild(fileDropArea), 
            this.uploadWrapper = createElement("div", {
                className: "e-upload",
                attrs: {
                    "aria-activedescendant": "li-focused"
                }
            }), this.dropAreaWrapper.parentElement.insertBefore(this.uploadWrapper, this.dropAreaWrapper), 
            this.uploadWrapper.appendChild(this.dropAreaWrapper), this.setDropArea();
        }, Uploader.prototype.renderPreLoadFiles = function() {
            if (!isNullOrUndefined(this.files[0].size) && isNullOrUndefined(this.template)) {
                var files = [].slice.call(this.files), filesData = [];
                this.multiple || (this.clearData(), files = [ files[0] ]);
                for (var _i = 0, files_1 = files; _i < files_1.length; _i++) {
                    var data = files_1[_i], fileData = {
                        name: this.getFileNameOnly(data.name) + "." + data.type.split(".")[data.type.split(".").length - 1],
                        rawFile: "",
                        size: data.size,
                        status: this.localizedTexts("uploadSuccessMessage"),
                        type: data.type,
                        validationMessages: {
                            minSize: "",
                            maxSize: ""
                        },
                        statusCode: "2"
                    };
                    filesData.push(fileData), this.filesData.push(fileData);
                }
                this.createFileList(filesData), this.autoUpload || !this.listParent || this.actionButtons || this.isForm || this.renderActionButtons(), 
                this.checkActionButtonStatus();
            }
        }, Uploader.prototype.checkActionButtonStatus = function() {
            if (this.actionButtons) {
                var length_1 = this.uploadWrapper.querySelectorAll(".e-validation-fails").length + this.uploadWrapper.querySelectorAll(".e-upload-fails:not(.e-upload-progress)").length + this.uploadWrapper.querySelectorAll("span." + UPLOAD_SUCCESS).length + this.uploadWrapper.querySelectorAll("span.e-upload-progress").length;
                length_1 > 0 && length_1 === this.uploadWrapper.querySelectorAll("li").length ? this.uploadButton.setAttribute("disabled", "disabled") : this.uploadButton.removeAttribute("disabled");
            }
        }, Uploader.prototype.setDropArea = function() {
            var dropTextArea = this.dropAreaWrapper.querySelector(".e-file-drop");
            if (this.dropArea) {
                this.dropZoneElement = "string" != typeof this.dropArea ? this.dropArea : document.querySelector(this.dropArea);
                for (var element = this.element, enableDropText = !1; element.parentNode; ) (element = element.parentNode) === this.dropZoneElement && (enableDropText = !0);
                enableDropText || (dropTextArea.textContent = "");
            } else this.dropZoneElement = this.uploadWrapper, dropTextArea.textContent = this.localizedTexts("dropFilesHint");
            this.bindDropEvents();
        }, Uploader.prototype.setMultipleSelection = function() {
            if (this.multiple && !this.element.hasAttribute("multiple")) {
                var newAttr = document.createAttribute("multiple");
                this.element.setAttributeNode(newAttr);
            } else this.multiple || this.element.removeAttribute("multiple");
        }, Uploader.prototype.checkAutoUpload = function(fileData) {
            this.autoUpload ? (this.upload(fileData), this.removeActionButtons()) : this.actionButtons || this.renderActionButtons(), 
            this.checkActionButtonStatus();
        }, Uploader.prototype.wireEvents = function() {
            EventHandler.add(this.browseButton, "click", this.browseButtonClick, this), EventHandler.add(this.element, "change", this.onSelectFiles, this), 
            EventHandler.add(document, "click", this.removeFocus, this), this.keyboardModule = new KeyboardEvents(this.uploadWrapper, {
                keyAction: this.keyActionHandler.bind(this),
                keyConfigs: this.keyConfigs,
                eventName: "keydown"
            }), this.isForm && EventHandler.add(this.element.closest("form"), "reset", this.resetForm, this);
        }, Uploader.prototype.unWireEvents = function() {
            EventHandler.remove(this.browseButton, "click", this.browseButtonClick), EventHandler.remove(this.element, "change", this.onSelectFiles), 
            EventHandler.remove(document, "click", this.removeFocus), this.keyboardModule.destroy();
        }, Uploader.prototype.resetForm = function() {
            this.clearAll(), this.element.value = "";
        }, Uploader.prototype.keyActionHandler = function(e) {
            switch (e.action) {
              case "next":
                e.target === this.browseButton && isNullOrUndefined(this.listParent) ? this.browseButton.blur() : e.target === this.uploadButton ? this.uploadButton.blur() : (this.setTabFocus(e), 
                e.preventDefault(), e.stopPropagation(), e.target === this.clearButton && this.uploadButton.hasAttribute("disabled") && this.clearButton.blur());
                break;

              case "previous":
                e.target === this.browseButton ? this.browseButton.blur() : (this.setReverseFocus(e), 
                e.preventDefault(), e.stopPropagation());
                break;

              case "enter":
                e.target === this.clearButton ? this.clearButtonClick() : e.target === this.uploadButton ? this.uploadButtonClick() : e.target === this.browseButton ? this.browseButtonClick() : (this.removeFiles(e), 
                this.browseButton.focus()), e.preventDefault(), e.stopPropagation();
            }
        }, Uploader.prototype.setReverseFocus = function(e) {
            var target = e.target;
            if (target === this.uploadButton) this.uploadButton.blur(), this.clearButton.focus(); else if (target === this.clearButton && this.listParent && this.listParent.querySelector(".e-icons")) {
                this.clearButton.blur();
                var items = [].slice.call(this.listParent.querySelectorAll("span.e-icons"));
                items[items.length - 1].classList.add(ICON_FOCUSED), items[items.length - 1].focus();
            } else {
                var iconElements = [].slice.call(this.listParent.querySelectorAll("span.e-icons")), index = iconElements.indexOf(target);
                index > 0 ? (this.removeFocus(), iconElements[index - 1].classList.add(ICON_FOCUSED), 
                iconElements[index - 1].focus()) : (this.removeFocus(), this.browseButton.focus());
            }
        }, Uploader.prototype.setTabFocus = function(e) {
            var target = e.target;
            if (target === this.clearButton) {
                if (this.removeFocus(), this.uploadButton.hasAttribute("disabled")) return;
                this.uploadButton.focus();
            } else if (target.classList.contains("e-icons")) {
                var iconElements = [].slice.call(this.listParent.querySelectorAll("span.e-icons")), index = iconElements.indexOf(target);
                index < iconElements.length - 1 ? (this.removeFocus(), iconElements[index + 1].classList.add(ICON_FOCUSED), 
                iconElements[index + 1].focus()) : (this.removeFocus(), this.clearButton.focus());
            } else {
                this.browseButton.blur();
                var iconElement = this.listParent.querySelector("span.e-icons");
                iconElement.focus(), iconElement.classList.add(ICON_FOCUSED);
            }
        }, Uploader.prototype.removeFocus = function() {
            this.uploadWrapper && this.listParent && this.listParent.querySelector("." + ICON_FOCUSED) && (document.activeElement.blur(), 
            this.listParent.querySelector("." + ICON_FOCUSED).classList.remove(ICON_FOCUSED));
        }, Uploader.prototype.browseButtonClick = function() {
            this.element.click();
        }, Uploader.prototype.uploadButtonClick = function() {
            this.upload(this.filesData);
        }, Uploader.prototype.clearButtonClick = function() {
            this.clearAll();
        }, Uploader.prototype.bindDropEvents = function() {
            this.dropZoneElement && (EventHandler.add(this.dropZoneElement, "drop", this.dropElement, this), 
            EventHandler.add(this.dropZoneElement, "dragover", this.dragHover, this), EventHandler.add(this.dropZoneElement, "dragleave", this.onDragLeave, this));
        }, Uploader.prototype.unBindDropEvents = function() {
            this.dropZoneElement && (EventHandler.remove(this.dropZoneElement, "drop", this.dropElement), 
            EventHandler.remove(this.dropZoneElement, "dragover", this.dragHover), EventHandler.remove(this.dropZoneElement, "dragleave", this.onDragLeave));
        }, Uploader.prototype.onDragLeave = function(e) {
            this.dropZoneElement.classList.remove("e-upload-drag-hover");
        }, Uploader.prototype.dragHover = function(e) {
            this.enabled && (this.dropZoneElement.classList.add("e-upload-drag-hover"), e.preventDefault(), 
            e.stopPropagation());
        }, Uploader.prototype.dropElement = function(e) {
            this.dropZoneElement.classList.remove("e-upload-drag-hover"), this.onSelectFiles(e), 
            e.preventDefault(), e.stopPropagation();
        }, Uploader.prototype.removeFiles = function(args) {
            if (this.enabled) {
                var selectedElement = args.target.parentElement, index = this.fileList.indexOf(selectedElement), fileData = this.filesData[index];
                this.remove(fileData), this.element.value = "", this.checkActionButtonStatus();
            }
        }, Uploader.prototype.removeFilesData = function(file, customTemplate) {
            if (!customTemplate) {
                var selectedElement = this.getLiElement(file);
                if (!isNullOrUndefined(selectedElement)) {
                    detach(selectedElement);
                    var index = this.fileList.indexOf(selectedElement);
                    this.fileList.splice(index, 1), this.filesData.splice(index, 1), 0 === this.fileList.length && (detach(this.listParent), 
                    this.listParent = null, this.removeActionButtons());
                }
            }
        }, Uploader.prototype.removeUploadedFile = function(file, custom) {
            var _this = this, selectedFiles = file, ajax = new XMLHttpRequest(), name = this.element.getAttribute("name"), formData = new FormData();
            formData.append(name, selectedFiles.rawFile), ajax.addEventListener("load", function(e) {
                _this.removeCompleted(e, selectedFiles, custom);
            }, !1), ajax.addEventListener("error", function(e) {
                _this.removeFailed(e, selectedFiles, custom);
            }, !1), ajax.open("POST", this.asyncSettings.removeUrl), ajax.send(formData);
        }, Uploader.prototype.removeCompleted = function(e, files, customTemplate) {
            var args = {
                e: e,
                operation: "remove",
                file: this.updateStatus(files, this.localizedTexts("removedSuccessMessage"), "2")
            };
            this.trigger("success", args), this.removeFilesData(files, customTemplate);
            var index = this.uploadedFilesData.indexOf(files);
            this.uploadedFilesData.splice(index, 1), this.trigger("change", {
                files: this.uploadedFilesData
            });
        }, Uploader.prototype.removeFailed = function(e, files, customTemplate) {
            var args = {
                e: e,
                operation: "remove",
                file: this.updateStatus(files, this.localizedTexts("removedFailedMessage"), "0")
            };
            if (!customTemplate) {
                var index = this.filesData.indexOf(files), rootElement = this.fileList[index];
                if (rootElement) {
                    var statusElement = rootElement.querySelector("." + STATUS);
                    rootElement.classList.remove(UPLOAD_SUCCESS), statusElement.classList.remove(UPLOAD_SUCCESS), 
                    rootElement.classList.add("e-upload-fails"), statusElement.classList.add("e-upload-fails");
                }
                this.checkActionButtonStatus();
            }
            this.trigger("failure", args);
        }, Uploader.prototype.onSelectFiles = function(args) {
            if (this.enabled) {
                var targetFiles, fileData = [];
                if ("drop" === args.type) {
                    var files = args.dataTransfer.files;
                    targetFiles = this.multiple ? this.sortFileList(files) : [ files[0] ];
                } else targetFiles = [].slice.call(args.target.files);
                this.multiple || (this.clearData(), targetFiles = [ targetFiles[0] ]);
                for (var i = 0; i < targetFiles.length; i++) {
                    var file = targetFiles[i], eventArgs_1 = {
                        name: file.name,
                        rawFile: file,
                        size: file.size,
                        status: this.localizedTexts("readyToUploadMessage"),
                        type: this.getFileType(file.name),
                        validationMessages: this.validatedFileSize(file.size),
                        statusCode: "1"
                    };
                    eventArgs_1.status = "" !== eventArgs_1.validationMessages.minSize ? this.localizedTexts("invalidMinFileSize") : "" !== eventArgs_1.validationMessages.maxSize ? this.localizedTexts("invalidMaxFileSize") : eventArgs_1.status, 
                    "" === eventArgs_1.validationMessages.minSize && "" === eventArgs_1.validationMessages.maxSize || (eventArgs_1.statusCode = "0"), 
                    fileData.push(eventArgs_1);
                }
                var eventArgs = {
                    cancel: !1,
                    filesData: fileData,
                    isModified: !1,
                    modifiedFilesData: [],
                    progressInterval: ""
                };
                if ("drop" === args.type && (fileData = this.checkExtension(fileData)), this.trigger("selected", eventArgs), 
                !eventArgs.cancel) {
                    if (eventArgs.isModified && eventArgs.modifiedFilesData.length > 0) {
                        var dataFiles = this.checkExtension(eventArgs.modifiedFilesData);
                        this.updateSortedFileList(dataFiles), this.isForm || this.checkAutoUpload(dataFiles), 
                        this.filesData = dataFiles;
                    } else this.createFileList(fileData), this.filesData = this.filesData.concat(fileData), 
                    this.isForm || this.checkAutoUpload(fileData);
                    isNullOrUndefined(eventArgs.progressInterval) || "" === eventArgs.progressInterval || (this.progressInterval = eventArgs.progressInterval);
                }
            }
        }, Uploader.prototype.clearData = function() {
            isNullOrUndefined(this.listParent) || (detach(this.listParent), this.listParent = null), 
            "msie" !== Browser.info.name && (this.element.value = ""), this.fileList = [], this.filesData = [], 
            this.removeActionButtons();
        }, Uploader.prototype.updateSortedFileList = function(filesData) {
            var previousListClone = createElement("div", {
                id: "clonewrapper"
            }), added = -1;
            if (this.listParent) {
                for (var i = 0; i < this.listParent.querySelectorAll("li").length; i++) {
                    var liElement = this.listParent.querySelectorAll("li")[i];
                    previousListClone.appendChild(liElement.cloneNode(!0));
                }
                for (var _i = 0, removedList_1 = this.listParent.querySelectorAll("li"); _i < removedList_1.length; _i++) {
                    detach(removedList_1[_i]);
                }
                this.removeActionButtons();
                var oldList = [].slice.call(previousListClone.childNodes);
                detach(this.listParent), this.listParent = null, this.fileList = [], this.createParentUL();
                for (var index = 0; index < filesData.length; index++) {
                    for (var j = 0; j < this.filesData.length; j++) this.filesData[j].name === filesData[index].name && (this.listParent.appendChild(oldList[j]), 
                    EventHandler.add(oldList[j].querySelector(".e-icons"), "click", this.removeFiles, this), 
                    this.fileList.push(oldList[j]), added = index);
                    added !== index && this.createFileList([ filesData[index] ]);
                }
            } else this.createFileList(filesData);
        }, Uploader.prototype.checkExtension = function(files) {
            var dropFiles = files;
            if ("" !== this.allowedExtensions) {
                for (var allowedExtensions = [], _i = 0, extensions_1 = this.allowedExtensions.split(","); _i < extensions_1.length; _i++) {
                    var extension = extensions_1[_i];
                    allowedExtensions.push(extension.trim().toLocaleLowerCase());
                }
                for (var i = 0; i < files.length; i++) -1 === allowedExtensions.indexOf(("." + files[i].type).toLocaleLowerCase()) && (files[i].status = this.localizedTexts("invalidFileType"), 
                files[i].statusCode = "0");
            }
            return dropFiles;
        }, Uploader.prototype.validatedFileSize = function(fileSize) {
            var minSizeError = "", maxSizeError = "";
            fileSize < this.minFileSize ? minSizeError = this.localizedTexts("invalidMinFileSize") : fileSize > this.maxFileSize ? maxSizeError = this.localizedTexts("invalidMaxFileSize") : (minSizeError = "", 
            maxSizeError = "");
            return {
                minSize: minSizeError,
                maxSize: maxSizeError
            };
        }, Uploader.prototype.createCustomfileList = function(fileData) {
            this.createParentUL();
            for (var _i = 0, fileData_1 = fileData; _i < fileData_1.length; _i++) {
                var listItem = fileData_1[_i], liElement = createElement("li", {
                    className: FILE,
                    attrs: {
                        "data-file-name": listItem.name
                    }
                });
                this.uploadTemplateFn = this.templateComplier(this.template);
                for (var length_2 = this.uploadTemplateFn(listItem).length, i = 0; i < length_2; i++) liElement.appendChild(this.uploadTemplateFn(listItem)[i]);
                this.listParent.appendChild(liElement), this.fileList.push(liElement);
            }
        }, Uploader.prototype.createParentUL = function() {
            isNullOrUndefined(this.listParent) && (this.listParent = createElement("ul", {
                className: "e-upload-files"
            }), this.uploadWrapper.appendChild(this.listParent), this.listParent.style.display = this.showFileList ? "block" : "none");
        }, Uploader.prototype.createFileList = function(fileData) {
            if (this.createParentUL(), "" === this.template || isNullOrUndefined(this.template)) for (var _i = 0, fileData_2 = fileData; _i < fileData_2.length; _i++) {
                var listItem = fileData_2[_i], liElement = createElement("li", {
                    className: FILE,
                    attrs: {
                        "data-file-name": listItem.name
                    }
                }), textContainer = createElement("span", {
                    className: "e-file-container"
                }), textElement = createElement("span", {
                    className: "e-file-name",
                    attrs: {
                        title: listItem.name
                    }
                });
                textElement.innerHTML = this.getFileNameOnly(listItem.name);
                var fileExtension = createElement("span", {
                    className: "e-file-type"
                });
                if (fileExtension.innerHTML = "." + this.getFileType(listItem.name), this.enableRtl) {
                    var rtlContainer = createElement("span", {
                        className: "e-rtl-container"
                    });
                    rtlContainer.appendChild(fileExtension), rtlContainer.appendChild(textElement), 
                    textContainer.appendChild(rtlContainer);
                } else textContainer.appendChild(textElement), textContainer.appendChild(fileExtension);
                var fileSize = createElement("span", {
                    className: "e-file-size"
                });
                fileSize.innerHTML = this.bytesToSize(listItem.size), textContainer.appendChild(fileSize);
                var statusElement = createElement("span", {
                    className: STATUS
                });
                textContainer.appendChild(statusElement), statusElement.innerHTML = listItem.status, 
                liElement.appendChild(textContainer);
                var iconElement = createElement("span", {
                    className: " e-icons",
                    attrs: {
                        tabindex: "-1"
                    }
                });
                "msie" === Browser.info.name && iconElement.classList.add("e-msie"), "2" !== listItem.statusCode ? iconElement.setAttribute("title", this.localizedTexts("remove")) : iconElement.setAttribute("title", this.localizedTexts("delete")), 
                liElement.appendChild(iconElement), EventHandler.add(iconElement, "click", this.removeFiles, this), 
                "2" === listItem.statusCode ? (statusElement.classList.add(UPLOAD_SUCCESS), iconElement.classList.add("e-file-delete-btn")) : "1" !== listItem.statusCode && (statusElement.classList.remove(UPLOAD_SUCCESS), 
                statusElement.classList.add("e-validation-fails")), this.autoUpload && "1" === listItem.statusCode && "" !== this.asyncSettings.saveUrl && (statusElement.innerHTML = ""), 
                iconElement.classList.contains("e-file-delete-btn") || iconElement.classList.add(CLEAR_ICON), 
                this.listParent.appendChild(liElement), this.fileList.push(liElement), this.truncateName(textElement);
            } else this.createCustomfileList(fileData);
        }, Uploader.prototype.truncateName = function(name) {
            var text, nameElement = name;
            nameElement.offsetWidth < nameElement.scrollWidth && (text = nameElement.textContent, 
            nameElement.dataset.tail = text.slice(text.length - 10));
        }, Uploader.prototype.getFileType = function(name) {
            var extension, index = name.lastIndexOf(".");
            return index >= 0 && (extension = name.substring(index + 1)), extension || "";
        }, Uploader.prototype.getFileNameOnly = function(name) {
            var type = this.getFileType(name);
            return type = name.split("." + type)[0];
        }, Uploader.prototype.setInitialAttributes = function() {
            if (this.initialAttr.accept && this.element.setAttribute("accept", this.initialAttr.accept), 
            this.initialAttr.disabled && this.element.setAttribute("disabled", "disabled"), 
            this.initialAttr.multiple) {
                var newAttr = document.createAttribute("multiple");
                this.element.setAttributeNode(newAttr);
            }
        }, Uploader.prototype.filterfileList = function(files) {
            for (var filterFiles = [], i = 0; i < files.length; i++) this.getLiElement(files[i]).classList.contains(UPLOAD_SUCCESS) || filterFiles.push(files[i]);
            return filterFiles;
        }, Uploader.prototype.updateStatus = function(files, status, statusCode) {
            "" === status || isNullOrUndefined(status) || "" === statusCode || isNullOrUndefined(statusCode) || (files.status = status, 
            files.statusCode = statusCode);
            var li = this.getLiElement(files);
            return isNullOrUndefined(li) || isNullOrUndefined(li.querySelector("." + STATUS)) || "" === status || isNullOrUndefined(status) || (li.querySelector("." + STATUS).textContent = status), 
            files;
        }, Uploader.prototype.getLiElement = function(files) {
            var li, liElements = [];
            if (this.uploadWrapper) {
                liElements = this.uploadWrapper.querySelectorAll(".e-upload-files> li");
                for (var i = 0; i < liElements.length; i++) liElements[i].getAttribute("data-file-name") === files.name && (li = liElements[i]);
            }
            return li;
        }, Uploader.prototype.createProgressBar = function(liElement) {
            var progressbarWrapper = createElement("span", {
                className: "e-upload-progress-wrap"
            }), progressBar = createElement("progressbar", {
                className: PROGRESSBAR,
                attrs: {
                    value: "0",
                    max: "100"
                }
            }), progressbarInnerWrapper = createElement("span", {
                className: "e-progress-inner-wrap"
            });
            progressBar.setAttribute("style", "width: 0%");
            var progressbarText = createElement("span", {
                className: "e-progress-bar-text"
            });
            progressbarText.textContent = "0%", progressbarInnerWrapper.appendChild(progressBar), 
            progressbarWrapper.appendChild(progressbarInnerWrapper), progressbarWrapper.appendChild(progressbarText), 
            liElement.querySelector(".e-file-container").appendChild(progressbarWrapper);
        }, Uploader.prototype.updateProgressbar = function(e, li) {
            if (!isNaN(Math.round(e.loaded / e.total * 100)) && !isNullOrUndefined(li.querySelector("." + PROGRESSBAR))) if (isNullOrUndefined(this.progressInterval) || "" === this.progressInterval) this.changeProgressValue(li, Math.round(e.loaded / e.total * 100).toString() + "%"); else {
                var value = Math.round(e.loaded / e.total * 100) % parseInt(this.progressInterval, 10);
                0 !== value && 100 !== value || this.changeProgressValue(li, Math.round(e.loaded / e.total * 100).toString() + "%");
            }
        }, Uploader.prototype.changeProgressValue = function(li, progressValue) {
            li.querySelector("." + PROGRESSBAR).setAttribute("style", "width:" + progressValue), 
            li.querySelector(".e-progress-bar-text").textContent = progressValue;
        }, Uploader.prototype.uploadInProgress = function(e, files, customUI) {
            var li = this.getLiElement(files);
            if (!isNullOrUndefined(li) || customUI && !isNullOrUndefined(customUI)) {
                isNullOrUndefined(li) || (li.querySelectorAll(".e-upload-progress-wrap").length > 0 || !li.querySelector("." + STATUS) || (li.querySelector("." + STATUS).classList.add("e-upload-progress"), 
                this.createProgressBar(li), this.updateProgressBarClasses(li, "e-upload-progress")), 
                this.updateProgressbar(e, li), isNullOrUndefined(li.querySelector(".e-icons")) || (li.querySelector(".e-icons").removeAttribute("title"), 
                EventHandler.remove(li.querySelector(".e-icons"), "click", this.removeFiles), li.querySelector(".e-icons").classList.add("e-upload-progress")));
                var args = {
                    e: e,
                    operation: "upload",
                    file: this.updateStatus(files, this.localizedTexts("inProgress"), "3")
                };
                this.trigger("progress", args);
            }
        }, Uploader.prototype.uploadComplete = function(e, files, customUI) {
            var status = e.target;
            if (4 === status.readyState && 200 === status.status) {
                var li = this.getLiElement(files);
                if (isNullOrUndefined(li) && (!customUI || isNullOrUndefined(customUI))) return;
                isNullOrUndefined(li) || (this.updateProgressBarClasses(li, UPLOAD_SUCCESS), this.removeProgressbar(li, "success"), 
                isNullOrUndefined(li.querySelector("." + CLEAR_ICON)) || (li.querySelector("." + CLEAR_ICON).classList.add("e-file-delete-btn"), 
                li.querySelector("." + CLEAR_ICON).setAttribute("title", this.localizedTexts("delete")), 
                li.querySelector("." + CLEAR_ICON).classList.remove(CLEAR_ICON)), isNullOrUndefined(li.querySelector(".e-icons")) || (EventHandler.add(li.querySelector(".e-icons"), "click", this.removeFiles, this), 
                li.querySelector(".e-icons").classList.remove("e-upload-progress"), li.querySelector(".e-icons").setAttribute("title", this.localizedTexts("delete"))));
                var args = {
                    e: e,
                    operation: "upload",
                    file: this.updateStatus(files, this.localizedTexts("uploadSuccessMessage"), "2")
                };
                this.trigger("success", args), this.uploadedFilesData.push(files), this.trigger("change", {
                    files: this.uploadedFilesData
                }), this.checkActionButtonStatus();
            } else this.uploadFailed(e, files);
        }, Uploader.prototype.uploadFailed = function(e, files) {
            var li = this.getLiElement(files), args = {
                e: e,
                operation: "upload",
                file: this.updateStatus(files, this.localizedTexts("uploadFailedMessage"), "0")
            };
            isNullOrUndefined(li) || (this.updateProgressBarClasses(li, "e-upload-fails"), this.removeProgressbar(li, "failure"), 
            li.querySelector("." + CLEAR_ICON).setAttribute("title", this.localizedTexts("remove")), 
            EventHandler.add(li.querySelector(".e-icons"), "click", this.removeFiles, this), 
            li.querySelector(".e-icons").classList.remove("e-upload-progress")), this.trigger("failure", args), 
            this.checkActionButtonStatus();
        }, Uploader.prototype.updateProgressBarClasses = function(li, className) {
            var progressBar = li.querySelector("." + PROGRESSBAR);
            isNullOrUndefined(progressBar) || progressBar.classList.add(className);
        }, Uploader.prototype.removeProgressbar = function(li, callType) {
            var _this = this;
            isNullOrUndefined(li.querySelector(".e-upload-progress-wrap")) || (this.progressAnimation = new Animation({
                duration: 1250
            }), this.progressAnimation.animate(li.querySelector(".e-upload-progress-wrap"), {
                name: "FadeOut"
            }), this.progressAnimation.animate(li.querySelector(".e-progress-bar-text"), {
                name: "FadeOut"
            }), setTimeout(function() {
                _this.animateProgressBar(li, callType);
            }, 750));
        }, Uploader.prototype.animateProgressBar = function(li, callType) {
            "success" === callType ? (li.classList.add(UPLOAD_SUCCESS), isNullOrUndefined(li.querySelector("." + STATUS)) || (li.querySelector("." + STATUS).classList.remove("e-upload-progress"), 
            this.progressAnimation.animate(li.querySelector("." + STATUS), {
                name: "FadeIn"
            }), li.querySelector("." + STATUS).classList.add(UPLOAD_SUCCESS))) : isNullOrUndefined(li.querySelector("." + STATUS)) || (li.querySelector("." + STATUS).classList.remove("e-upload-progress"), 
            this.progressAnimation.animate(li.querySelector("." + STATUS), {
                name: "FadeIn"
            }), li.querySelector("." + STATUS).classList.add("e-upload-fails")), detach(li.querySelector(".e-upload-progress-wrap"));
        }, Uploader.prototype.setExtensions = function(extensions) {
            this.element.setAttribute("accept", extensions);
        }, Uploader.prototype.templateComplier = function(uploadTemplate) {
            if (uploadTemplate) try {
                if (document.querySelectorAll(uploadTemplate).length) return compile$$1(document.querySelector(uploadTemplate).innerHTML.trim());
            } catch (exception) {
                return compile$$1(uploadTemplate);
            }
        }, Uploader.prototype.setRTL = function() {
            this.enableRtl ? addClass([ this.uploadWrapper ], "e-rtl") : removeClass([ this.uploadWrapper ], "e-rtl");
        }, Uploader.prototype.localizedTexts = function(localeText) {
            return this.l10n.setLocale(this.locale), this.l10n.getConstant(localeText);
        }, Uploader.prototype.setControlStatus = function() {
            this.enabled ? (this.uploadWrapper.classList.contains("e-disabled") && this.uploadWrapper.classList.remove("e-disabled"), 
            !isNullOrUndefined(this.browseButton) && this.element.hasAttribute("disabled") && (this.element.removeAttribute("disabled"), 
            this.browseButton.removeAttribute("disabled")), !isNullOrUndefined(this.clearButton) && this.clearButton.hasAttribute("disabled") && this.clearButton.removeAttribute("disabled"), 
            !isNullOrUndefined(this.uploadButton) && this.uploadButton.hasAttribute("disabled") && this.uploadButton.hasAttribute("disabled")) : (this.uploadWrapper.classList.add("e-disabled"), 
            this.element.setAttribute("disabled", "disabled"), this.browseButton.setAttribute("disabled", "disabled"), 
            isNullOrUndefined(this.clearButton) || this.clearButton.setAttribute("disabled", "disabled"), 
            isNullOrUndefined(this.uploadButton) || this.uploadButton.setAttribute("disabled", "disabled"));
        }, Uploader.prototype.checkHTMLAttributes = function() {
            this.element.hasAttribute("accept") && (this.allowedExtensions = this.element.getAttribute("accept"), 
            this.initialAttr.accept = this.allowedExtensions), this.element.hasAttribute("multiple") && (this.multiple = !0, 
            this.initialAttr.multiple = !0), this.element.hasAttribute("disabled") && (this.enabled = !1, 
            this.initialAttr.disabled = !0);
        }, Uploader.prototype.bytesToSize = function(bytes) {
            var i = -1;
            if (!bytes) return "0.0 KB";
            do {
                bytes /= 1e3, i++;
            } while (bytes > 99);
            return i >= 2 && (bytes *= 1e3, i = 1), Math.max(bytes, 0).toFixed(1) + " " + [ "KB", "MB" ][i];
        }, Uploader.prototype.sortFileList = function(filesData) {
            for (var files = filesData, fileNames = [], i = 0; i < files.length; i++) fileNames.push(files[i].name);
            for (var sortedFilesData = [], _i = 0, sortedFileNames_1 = fileNames.sort(); _i < sortedFileNames_1.length; _i++) {
                var name_1 = sortedFileNames_1[_i];
                for (i = 0; i < files.length; i++) name_1 === files[i].name && sortedFilesData.push(files[i]);
            }
            return sortedFilesData;
        }, Uploader.prototype.destroy = function() {
            this.element.value = null, this.clearAll(), this.unWireEvents(), this.unBindDropEvents(), 
            this.multiple && this.element.removeAttribute("multiple"), this.enabled || this.element.removeAttribute("disabled"), 
            this.element.removeAttribute("accept"), this.setInitialAttributes(), this.uploadWrapper.parentElement.appendChild(this.cloneElement), 
            this.cloneElement.classList.remove("e-control", "e-uploader"), detach(this.uploadWrapper), 
            this.uploadWrapper = null, _super.prototype.destroy.call(this);
        }, Uploader.prototype.upload = function(files, custom) {
            var _this = this, selectedFiles = [];
            if ("" !== this.asyncSettings.saveUrl && !isNullOrUndefined(this.asyncSettings.saveUrl)) {
                if (!custom || isNullOrUndefined(custom)) if (this.multiple) selectedFiles = this.filterfileList(files); else {
                    var file = [];
                    file.push(files[0]), selectedFiles = this.filterfileList(file);
                } else selectedFiles = files;
                for (var _loop_1 = function(i) {
                    var ajax = new XMLHttpRequest(), formData = new FormData();
                    if ("1" === selectedFiles[i].statusCode) {
                        var eventArgs = {
                            fileData: selectedFiles[i],
                            customFormData: [],
                            cancel: !1
                        };
                        if (this_1.trigger("uploading", eventArgs), eventArgs.cancel) return {
                            value: void 0
                        };
                        var name_2 = this_1.element.getAttribute("name");
                        if (formData.append(name_2, selectedFiles[i].rawFile, selectedFiles[i].name), eventArgs.customFormData.length > 0) for (var i_1 = 0; i_1 < eventArgs.customFormData.length; i_1++) {
                            var customData = eventArgs.customFormData[i_1];
                            formData.append(Object.keys(customData)[0], Object.values(customData)[0]);
                        }
                        ajax.addEventListener("load", function(e) {
                            _this.uploadComplete(e, selectedFiles[i], custom);
                        }, !1), ajax.addEventListener("error", function(e) {
                            _this.uploadFailed(e, selectedFiles[i]);
                        }, !1), ajax.upload.addEventListener("progress", function(e) {
                            _this.uploadInProgress(e, selectedFiles[i], custom);
                        }, !1), ajax.open("POST", this_1.asyncSettings.saveUrl), ajax.send(formData);
                    }
                }, this_1 = this, i = 0; i < selectedFiles.length; i++) {
                    var state_1 = _loop_1(i);
                    if ("object" == typeof state_1) return state_1.value;
                }
            }
        }, Uploader.prototype.remove = function(fileData, customTemplate) {
            var removeFiles = [];
            (fileData = isNullOrUndefined(fileData) ? this.filesData : fileData) instanceof Array ? removeFiles = fileData : removeFiles.push(fileData);
            var eventArgs = {
                cancel: !1,
                filesData: removeFiles
            };
            if (this.trigger("removing", eventArgs), !eventArgs.cancel) for (var removeUrl = this.asyncSettings.removeUrl, validUrl = "" !== removeUrl && !isNullOrUndefined(removeUrl), _i = 0, removeFiles_1 = removeFiles; _i < removeFiles_1.length; _i++) {
                var files = removeFiles_1[_i];
                "2" === files.statusCode && validUrl ? this.removeUploadedFile(files, customTemplate) : this.removeFilesData(files, customTemplate);
            }
        }, Uploader.prototype.clearAll = function() {
            if (!isNullOrUndefined(this.listParent)) {
                var eventArgs = {
                    cancel: !1,
                    filesData: this.filesData
                };
                this.trigger("clearing", eventArgs), eventArgs.cancel || this.clearData();
            }
        }, Uploader.prototype.getFilesData = function() {
            return this.filesData;
        }, __decorate$4$2([ Complex({
            saveUrl: "",
            removeUrl: ""
        }, AsyncSettings) ], Uploader.prototype, "asyncSettings", void 0), __decorate$4$2([ Property(!1) ], Uploader.prototype, "enableRtl", void 0), 
        __decorate$4$2([ Property(!0) ], Uploader.prototype, "enabled", void 0), __decorate$4$2([ Property(null) ], Uploader.prototype, "template", void 0), 
        __decorate$4$2([ Property(!0) ], Uploader.prototype, "multiple", void 0), __decorate$4$2([ Property(!0) ], Uploader.prototype, "autoUpload", void 0), 
        __decorate$4$2([ Complex({}, ButtonsProps) ], Uploader.prototype, "buttons", void 0), 
        __decorate$4$2([ Property("") ], Uploader.prototype, "allowedExtensions", void 0), 
        __decorate$4$2([ Property(0) ], Uploader.prototype, "minFileSize", void 0), __decorate$4$2([ Property(3e7) ], Uploader.prototype, "maxFileSize", void 0), 
        __decorate$4$2([ Property(null) ], Uploader.prototype, "dropArea", void 0), __decorate$4$2([ Collection([ {} ], FilesProp) ], Uploader.prototype, "files", void 0), 
        __decorate$4$2([ Property(!0) ], Uploader.prototype, "showFileList", void 0), __decorate$4$2([ Event() ], Uploader.prototype, "selected", void 0), 
        __decorate$4$2([ Event() ], Uploader.prototype, "uploading", void 0), __decorate$4$2([ Event() ], Uploader.prototype, "success", void 0), 
        __decorate$4$2([ Event() ], Uploader.prototype, "failure", void 0), __decorate$4$2([ Event() ], Uploader.prototype, "removing", void 0), 
        __decorate$4$2([ Event() ], Uploader.prototype, "clearing", void 0), __decorate$4$2([ Event() ], Uploader.prototype, "progress", void 0), 
        __decorate$4$2([ Event() ], Uploader.prototype, "change", void 0), Uploader = __decorate$4$2([ NotifyPropertyChanges ], Uploader);
    }(Component), _inputs = Object.freeze({
        NumericTextBox: NumericTextBox,
        regularExpressions: regularExpressions,
        createMask: createMask,
        applyMask: applyMask,
        wireEvents: wireEvents,
        unwireEvents: unwireEvents,
        unstrippedValue: unstrippedValue,
        strippedValue: strippedValue,
        maskInputFocusHandler: maskInputFocusHandler,
        maskInputBlurHandler: maskInputBlurHandler,
        maskInputDropHandler: maskInputDropHandler,
        mobileRemoveFunction: mobileRemoveFunction,
        setMaskValue: setMaskValue,
        setElementValue: setElementValue,
        maskInput: function(args) {
            var inputEle = getMaskInput(args);
            applyMask.call(inputEle);
            var val = strippedValue.call(this, this.element);
            this.prevValue = val, this.value = val, args.mask && (unwireEvents.call(inputEle), 
            wireEvents.call(inputEle));
        },
        getVal: function(args) {
            return strippedValue.call(getUtilMaskEle(args), args.element);
        },
        getMaskedVal: function(args) {
            return unstrippedValue.call(getUtilMaskEle(args), args.element);
        },
        MaskUndo: MaskUndo,
        MaskedTextBox: MaskedTextBox,
        get Input() {
            return Input;
        },
        TicksData: TicksData,
        TooltipData: TooltipData,
        Slider: Slider,
        get ErrorOption() {
            return ErrorOption;
        },
        FormValidator: FormValidator,
        FilesProp: FilesProp,
        ButtonsProps: ButtonsProps,
        AsyncSettings: AsyncSettings,
        Uploader: Uploader
    }), queryString = "", prevString = "", matches$1 = [], activeClass = "e-active", Query = function() {
        function Query(from) {
            return this.subQuery = null, this.isChild = !1, this.queries = [], this.key = "", 
            this.fKey = "", "string" == typeof from ? this.fromTable = from : from && from instanceof Array && (this.lookups = from), 
            this.expands = [], this.sortedColumns = [], this.groupedColumns = [], this.subQuery = null, 
            this.isChild = !1, this.params = [], this;
        }
        return Query.prototype.setKey = function(field) {
            return this.key = field, this;
        }, Query.prototype.using = function(dataManager) {
            return this.dataManager = dataManager, this;
        }, Query.prototype.execute = function(dataManager, done, fail, always) {
            return (dataManager = dataManager || this.dataManager) ? dataManager.executeQuery(this, done, fail, always) : DataUtil.throwError('Query - execute() : dataManager needs to be is set using "using" function or should be passed as argument');
        }, Query.prototype.executeLocal = function(dataManager) {
            return (dataManager = dataManager || this.dataManager) ? dataManager.executeLocal(this) : DataUtil.throwError('Query - executeLocal() : dataManager needs to be is set using "using" function or should be passed as argument');
        }, Query.prototype.clone = function() {
            var cloned = new Query();
            return cloned.queries = this.queries.slice(0), cloned.key = this.key, cloned.isChild = this.isChild, 
            cloned.dataManager = this.dataManager, cloned.fromTable = this.fromTable, cloned.params = this.params.slice(0), 
            cloned.expands = this.expands.slice(0), cloned.sortedColumns = this.sortedColumns.slice(0), 
            cloned.groupedColumns = this.groupedColumns.slice(0), cloned.subQuerySelector = this.subQuerySelector, 
            cloned.subQuery = this.subQuery, cloned.fKey = this.fKey, cloned.isCountRequired = this.isCountRequired, 
            cloned;
        }, Query.prototype.from = function(tableName) {
            return this.fromTable = tableName, this;
        }, Query.prototype.addParams = function(key, value) {
            return "function" == typeof value ? this.params.push({
                key: key,
                fn: value
            }) : this.params.push({
                key: key,
                value: value
            }), this;
        }, Query.prototype.expand = function(tables) {
            return this.expands = "string" == typeof tables ? [].slice.call([ tables ], 0) : tables.slice(0), 
            this;
        }, Query.prototype.where = function(fieldName, operator, value, ignoreCase, ignoreAccent) {
            operator = operator ? operator.toLowerCase() : null;
            var predicate = null;
            return "string" == typeof fieldName ? predicate = new Predicate(fieldName, operator, value, ignoreCase, ignoreAccent) : fieldName instanceof Predicate && (predicate = fieldName), 
            this.queries.push({
                fn: "onWhere",
                e: predicate
            }), this;
        }, Query.prototype.search = function(searchKey, fieldNames, operator, ignoreCase, ignoreAccent) {
            "string" == typeof fieldNames && (fieldNames = [ fieldNames ]), operator = operator || "contains";
            var comparer = DataUtil.fnOperators[operator];
            return this.queries.push({
                fn: "onSearch",
                e: {
                    fieldNames: fieldNames,
                    operator: operator,
                    searchKey: searchKey,
                    ignoreCase: ignoreCase,
                    ignoreAccent: ignoreAccent,
                    comparer: comparer
                }
            }), this;
        }, Query.prototype.sortBy = function(fieldName, comparer, isFromGroup) {
            var sorts, temp, order = "ascending";
            if ("string" == typeof fieldName && DataUtil.endsWith(fieldName.toLowerCase(), " desc") && (fieldName = fieldName.replace(/ desc$/i, ""), 
            comparer = "descending"), comparer && "string" != typeof comparer || (order = comparer ? comparer.toLowerCase() : "ascending", 
            comparer = DataUtil.fnSort(comparer)), isFromGroup) {
                sorts = Query.filterQueries(this.queries, "onSortBy");
                for (var i = 0; i < sorts.length; i++) if ("string" == typeof (temp = sorts[i].e.fieldName)) {
                    if (temp === fieldName) return this;
                } else if (temp instanceof Array) for (var j = 0; j < temp.length; j++) if (temp[j] === fieldName || fieldName.toLowerCase() === temp[j] + " desc") return this;
            }
            return this.queries.push({
                fn: "onSortBy",
                e: {
                    fieldName: fieldName,
                    comparer: comparer,
                    direction: order
                }
            }), this;
        }, Query.prototype.sortByDesc = function(fieldName) {
            return this.sortBy(fieldName, "descending");
        }, Query.prototype.group = function(fieldName, fn, format) {
            return this.sortBy(fieldName, null, !0), this.queries.push({
                fn: "onGroup",
                e: {
                    fieldName: fieldName,
                    comparer: fn || null,
                    format: format || null
                }
            }), this;
        }, Query.prototype.page = function(pageIndex, pageSize) {
            return this.queries.push({
                fn: "onPage",
                e: {
                    pageIndex: pageIndex,
                    pageSize: pageSize
                }
            }), this;
        }, Query.prototype.range = function(start, end) {
            return this.queries.push({
                fn: "onRange",
                e: {
                    start: start,
                    end: end
                }
            }), this;
        }, Query.prototype.take = function(nos) {
            return this.queries.push({
                fn: "onTake",
                e: {
                    nos: nos
                }
            }), this;
        }, Query.prototype.skip = function(nos) {
            return this.queries.push({
                fn: "onSkip",
                e: {
                    nos: nos
                }
            }), this;
        }, Query.prototype.select = function(fieldNames) {
            return "string" == typeof fieldNames && (fieldNames = [].slice.call([ fieldNames ], 0)), 
            this.queries.push({
                fn: "onSelect",
                e: {
                    fieldNames: fieldNames
                }
            }), this;
        }, Query.prototype.hierarchy = function(query, selectorFn) {
            return this.subQuerySelector = selectorFn, this.subQuery = query, this;
        }, Query.prototype.foreignKey = function(key) {
            return this.fKey = key, this;
        }, Query.prototype.requiresCount = function() {
            return this.isCountRequired = !0, this;
        }, Query.prototype.aggregate = function(type, field) {
            return this.queries.push({
                fn: "onAggregates",
                e: {
                    field: field,
                    type: type
                }
            }), this;
        }, Query.filterQueries = function(queries, name) {
            return queries.filter(function(q) {
                return q.fn === name;
            });
        }, Query.filterQueryLists = function(queries, singles) {
            for (var filtered = queries.filter(function(q) {
                return -1 !== singles.indexOf(q.fn);
            }), res = {}, i = 0; i < filtered.length; i++) res[filtered[i].fn] || (res[filtered[i].fn] = filtered[i].e);
            return res;
        }, Query;
    }(), Predicate = function() {
        function Predicate(field, operator, value, ignoreCase, ignoreAccent) {
            return void 0 === ignoreCase && (ignoreCase = !1), this.ignoreAccent = !1, this.isComplex = !1, 
            "string" == typeof field ? (this.field = field, this.operator = operator.toLowerCase(), 
            this.value = value, this.ignoreCase = ignoreCase, this.ignoreAccent = ignoreAccent, 
            this.isComplex = !1, this.comparer = DataUtil.fnOperators.processOperator(this.operator)) : (field instanceof Predicate && value instanceof Predicate || value instanceof Array) && (this.isComplex = !0, 
            this.condition = operator.toLowerCase(), this.predicates = [ field ], value instanceof Array ? [].push.apply(this.predicates, value) : this.predicates.push(value)), 
            this;
        }
        return Predicate.and = function() {
            for (var args = [], _i = 0; _i < arguments.length; _i++) args[_i] = arguments[_i];
            return Predicate.combinePredicates([].slice.call(args, 0), "and");
        }, Predicate.prototype.and = function(field, operator, value, ignoreCase, ignoreAccent) {
            return Predicate.combine(this, field, operator, value, "and", ignoreCase, ignoreAccent);
        }, Predicate.or = function() {
            for (var args = [], _i = 0; _i < arguments.length; _i++) args[_i] = arguments[_i];
            return Predicate.combinePredicates([].slice.call(args, 0), "or");
        }, Predicate.prototype.or = function(field, operator, value, ignoreCase, ignoreAccent) {
            return Predicate.combine(this, field, operator, value, "or", ignoreCase, ignoreAccent);
        }, Predicate.fromJson = function(json) {
            if (json instanceof Array) {
                for (var res = [], i = 0, len = json.length; i < len; i++) res.push(this.fromJSONData(json[i]));
                return res;
            }
            var pred = json;
            return this.fromJSONData(pred);
        }, Predicate.prototype.validate = function(record) {
            var isAnd, ret, predicate = this.predicates ? this.predicates : [];
            if (!this.isComplex && this.comparer) return this.comparer.call(this, DataUtil.getObject(this.field, record), this.value, this.ignoreCase, this.ignoreAccent);
            isAnd = "and" === this.condition;
            for (var i = 0; i < predicate.length; i++) if (ret = predicate[i].validate(record), 
            isAnd) {
                if (!ret) return !1;
            } else if (ret) return !0;
            return isAnd;
        }, Predicate.prototype.toJson = function() {
            var predicates, p;
            if (this.isComplex) {
                predicates = [], p = this.predicates;
                for (var i = 0; i < p.length; i++) predicates.push(p[i].toJson());
            }
            return {
                isComplex: this.isComplex,
                field: this.field,
                operator: this.operator,
                value: this.value,
                ignoreCase: this.ignoreCase,
                ignoreAccent: this.ignoreAccent,
                condition: this.condition,
                predicates: predicates
            };
        }, Predicate.combinePredicates = function(predicates, operator) {
            if (1 === predicates.length) {
                if (!(predicates[0] instanceof Array)) return predicates[0];
                predicates = predicates[0];
            }
            return new Predicate(predicates[0], operator, predicates.slice(1));
        }, Predicate.combine = function(pred, field, operator, value, condition, ignoreCase, ignoreAccent) {
            return field instanceof Predicate ? Predicate[condition](pred, field) : "string" == typeof field ? Predicate[condition](pred, new Predicate(field, operator, value, ignoreCase, ignoreAccent)) : DataUtil.throwError("Predicate - " + condition + " : invalid arguments");
        }, Predicate.fromJSONData = function(json) {
            for (var preds = json.predicates || [], len = preds.length, predicates = [], i = 0; i < len; i++) predicates.push(this.fromJSONData(preds[i]));
            return json.isComplex ? new Predicate(predicates[0], json.condition, predicates.slice(1)) : new Predicate(json.field, json.operator, json.value, json.ignoreCase, json.ignoreAccent);
        }, Predicate;
    }(), consts = {
        GroupGuid: "{271bbba0-1ee7}"
    }, DataUtil = function() {
        function DataUtil() {}
        return DataUtil.getValue = function(value, inst) {
            return "function" == typeof value ? value.call(inst || {}) : value;
        }, DataUtil.endsWith = function(input, substr) {
            return input.slice(-substr.length) === substr;
        }, DataUtil.startsWith = function(input, start) {
            return input.slice(0, start.length) === start;
        }, DataUtil.fnSort = function(order) {
            return "ascending" === (order = order ? DataUtil.toLowerCase(order) : "ascending") ? this.fnAscending : this.fnDescending;
        }, DataUtil.fnAscending = function(x, y) {
            return null === y || void 0 === y ? -1 : "string" == typeof x ? x.localeCompare(y) : null === x || void 0 === x ? 1 : x - y;
        }, DataUtil.fnDescending = function(x, y) {
            return null === y || void 0 === y ? 1 : "string" == typeof x ? -1 * x.localeCompare(y) : null === x || void 0 === x ? -1 : y - x;
        }, DataUtil.extractFields = function(obj, fields) {
            for (var newObj = {}, i = 0; i < fields.length; i++) newObj = this.setValue(fields[i], this.getObject(fields[i], obj), newObj);
            return newObj;
        }, DataUtil.select = function(jsonArray, fields) {
            for (var newData = [], i = 0; i < jsonArray.length; i++) newData.push(this.extractFields(jsonArray[i], fields));
            return newData;
        }, DataUtil.group = function(jsonArray, field, aggregates, level, groupDs, format) {
            level = level || 1;
            var jsonData = jsonArray;
            if (jsonData.GroupGuid === consts.GroupGuid) {
                for (var _loop_1 = function(j) {
                    if (isNullOrUndefined(groupDs)) jsonData[j].items = this_1.group(jsonData[j].items, field, aggregates, jsonData.level + 1, null, format), 
                    jsonData[j].count = jsonData[j].items.length; else {
                        var indx = -1, temp = groupDs.filter(function(e) {
                            return e.key === jsonData[j].key;
                        });
                        indx = groupDs.indexOf(temp[0]), jsonData[j].items = this_1.group(jsonData[j].items, field, aggregates, jsonData.level + 1, groupDs[indx].items, format), 
                        jsonData[j].count = groupDs[indx].count;
                    }
                }, this_1 = this, j = 0; j < jsonData.length; j++) _loop_1(j);
                return jsonData.childLevels += 1, jsonData;
            }
            var grouped = {}, groupedArray = [];
            groupedArray.GroupGuid = consts.GroupGuid, groupedArray.level = level, groupedArray.childLevels = 0, 
            groupedArray.records = jsonData;
            for (var _loop_2 = function(i) {
                var val = this_2.getVal(jsonData, i, field);
                if (isNullOrUndefined(format) || (val = format(val, field)), !grouped[val] && (grouped[val] = {
                    key: val,
                    count: 0,
                    items: [],
                    aggregates: {},
                    field: field
                }, groupedArray.push(grouped[val]), !isNullOrUndefined(groupDs))) {
                    var tempObj = groupDs.filter(function(e) {
                        return e.key === grouped[val].key;
                    });
                    grouped[val].count = tempObj[0].count;
                }
                grouped[val].count = isNullOrUndefined(groupDs) ? grouped[val].count += 1 : grouped[val].count, 
                grouped[val].items.push(jsonData[i]);
            }, this_2 = this, i = 0; i < jsonData.length; i++) _loop_2(i);
            if (aggregates && aggregates.length) {
                var _loop_3 = function(i) {
                    for (var res = {}, fn = void 0, aggs = aggregates, j = 0; j < aggregates.length; j++) if (fn = DataUtil.aggregates[aggregates[j].type], 
                    isNullOrUndefined(groupDs)) fn && (res[aggs[j].field + " - " + aggs[j].type] = fn(groupedArray[i].items, aggs[j].field)); else {
                        var temp = groupDs.filter(function(e) {
                            return e.key === groupedArray[i].key;
                        });
                        fn && (res[aggs[j].field + " - " + aggs[j].type] = fn(temp[0].items, aggs[j].field));
                    }
                    groupedArray[i].aggregates = res;
                };
                for (i = 0; i < groupedArray.length; i++) _loop_3(i);
            }
            return jsonData.length && groupedArray || jsonData;
        }, DataUtil.buildHierarchy = function(fKey, from, source, lookup, pKey) {
            var i, grp = {};
            for (lookup.result && (lookup = lookup.result), lookup.GroupGuid && this.throwError("DataManager: Do not have support Grouping in hierarchy"), 
            i = 0; i < lookup.length; i++) {
                (grp[fKeyData = this.getObject(fKey, lookup[i])] || (grp[fKeyData] = [])).push(lookup[i]);
            }
            for (i = 0; i < source.length; i++) {
                var fKeyData = this.getObject(pKey || fKey, source[i]);
                source[i][from] = grp[fKeyData];
            }
        }, DataUtil.getFieldList = function(obj, fields, prefix) {
            if (void 0 === prefix && (prefix = ""), void 0 === fields || null === fields) return this.getFieldList(obj, [], prefix);
            for (var copyObj = obj, _i = 0, keys_1 = Object.keys(obj); _i < keys_1.length; _i++) {
                var prop = keys_1[_i];
                "object" != typeof copyObj[prop] || copyObj[prop] instanceof Array ? fields.push(prefix + prop) : this.getFieldList(copyObj[prop], fields, prefix + prop + ".");
            }
            return fields;
        }, DataUtil.getObject = function(nameSpace, from) {
            if (!nameSpace) return from;
            if (-1 === nameSpace.indexOf(".")) return from[nameSpace];
            for (var value = from, splits = nameSpace.split("."), i = 0; i < splits.length && null != value; i++) value = value[splits[i]];
            return value;
        }, DataUtil.setValue = function(nameSpace, value, obj) {
            var i, key, keys = nameSpace.toString().split("."), start = obj || {}, fromObj = start, length = keys.length;
            for (i = 0; i < length; i++) key = keys[i], i + 1 === length ? fromObj[key] = void 0 === value ? void 0 : value : isNullOrUndefined(fromObj[key]) && (fromObj[key] = {}), 
            fromObj = fromObj[key];
            return start;
        }, DataUtil.sort = function(ds, field, comparer) {
            if (ds.length <= 1) return ds;
            var middle = parseInt((ds.length / 2).toString(), 10), left = ds.slice(0, middle), right = ds.slice(middle);
            return left = this.sort(left, field, comparer), right = this.sort(right, field, comparer), 
            this.merge(left, right, field, comparer);
        }, DataUtil.ignoreDiacritics = function(value) {
            if ("string" != typeof value) return value;
            return value.split("").map(function(temp) {
                return temp in DataUtil.diacritics ? DataUtil.diacritics[temp] : temp;
            }).join("");
        }, DataUtil.merge = function(left, right, fieldName, comparer) {
            for (var current, result = []; left.length > 0 || right.length > 0; ) current = left.length > 0 && right.length > 0 ? comparer ? comparer(this.getVal(left, 0, fieldName), this.getVal(right, 0, fieldName)) <= 0 ? left : right : left[0][fieldName] < left[0][fieldName] ? left : right : left.length > 0 ? left : right, 
            result.push(current.shift());
            return result;
        }, DataUtil.getVal = function(array, index, field) {
            return field ? this.getObject(field, array[index]) : array[index];
        }, DataUtil.toLowerCase = function(val) {
            return val ? "string" == typeof val ? val.toLowerCase() : val.toString() : 0 === val || !1 === val ? val.toString() : "";
        }, DataUtil.callAdaptorFunction = function(adaptor, fnName, param1, param2) {
            if (fnName in adaptor) {
                var res = adaptor[fnName](param1, param2);
                this.fnOperators.isnull(res) || (param1 = res);
            }
            return param1;
        }, DataUtil.isPlainObject = function(obj) {
            return !!obj && obj.constructor === Object;
        }, DataUtil.isCors = function() {
            var xhr = null;
            try {
                xhr = new window.XMLHttpRequest();
            } catch (e) {}
            return !!xhr && "withCredentials" in xhr;
        }, DataUtil.getGuid = function(prefix) {
            var rand;
            return (prefix || "") + "00000000-0000-4000-0000-000000000000".replace(/0/g, function(val, i) {
                if ("crypto" in window && "getRandomValues" in crypto) {
                    var arr = new Uint8Array(1);
                    window.crypto.getRandomValues(arr), rand = arr[0] % 16 | 0;
                } else rand = 16 * Math.random() | 0;
                return "0123456789abcdef"[19 === i ? 3 & rand | 8 : rand];
            });
        }, DataUtil.isNull = function(val) {
            return void 0 === val || null === val;
        }, DataUtil.getItemFromComparer = function(array, field, comparer) {
            var keyVal, current, key, i = 0, castRequired = "string" == typeof DataUtil.getVal(array, 0, field);
            if (array.length) for (;isNullOrUndefined(keyVal) && i < array.length; ) keyVal = DataUtil.getVal(array, i, field), 
            key = array[i++];
            for (;i < array.length; i++) isNullOrUndefined(current = DataUtil.getVal(array, i, field)) || (castRequired && (keyVal = +keyVal, 
            current = +current), comparer(keyVal, current) > 0 && (keyVal = current, key = array[i]));
            return key;
        }, DataUtil.distinct = function(json, fieldName, requiresCompleteRecord) {
            requiresCompleteRecord = !isNullOrUndefined(requiresCompleteRecord) && requiresCompleteRecord;
            var val, result = [], tmp = {};
            return json.forEach(function(data, index) {
                (val = DataUtil.getVal(json, index, fieldName)) in tmp || (result.push(requiresCompleteRecord ? json[index] : val), 
                tmp[val] = 1);
            }), result;
        }, DataUtil.serverTimezoneOffset = null, DataUtil.throwError = function(error) {
            try {
                throw new Error(error);
            } catch (e) {
                throw e.message + "\n" + e.stack;
            }
        }, DataUtil.aggregates = {
            sum: function(ds, field) {
                for (var val, result = 0, castRequired = "number" != typeof DataUtil.getVal(ds, 0, field), i = 0; i < ds.length; i++) val = DataUtil.getVal(ds, i, field), 
                isNaN(val) || null === val || (castRequired && (val = +val), result += val);
                return result;
            },
            average: function(ds, field) {
                return DataUtil.aggregates.sum(ds, field) / ds.length;
            },
            min: function(ds, field) {
                var result, comparer;
                return "function" == typeof field && (comparer = field, field = null), result = DataUtil.getObject(field, DataUtil.getItemFromComparer(ds, field, comparer || DataUtil.fnAscending)), 
                isNullOrUndefined(result) ? null : result;
            },
            max: function(ds, field) {
                var result, comparer;
                return "function" == typeof field && (comparer = field, field = null), result = DataUtil.getObject(field, DataUtil.getItemFromComparer(ds, field, comparer || DataUtil.fnDescending)), 
                isNullOrUndefined(result) ? null : result;
            },
            truecount: function(ds, field) {
                return new DataManager(ds).executeLocal(new Query().where(field, "equal", !0, !0)).length;
            },
            falsecount: function(ds, field) {
                return new DataManager(ds).executeLocal(new Query().where(field, "equal", !1, !0)).length;
            },
            count: function(ds, field) {
                return ds.length;
            }
        }, DataUtil.operatorSymbols = {
            "<": "lessthan",
            ">": "greaterthan",
            "<=": "lessthanorequal",
            ">=": "greaterthanorequal",
            "==": "equal",
            "!=": "notequal",
            "*=": "contains",
            "$=": "endswith",
            "^=": "startswith"
        }, DataUtil.odBiOperator = {
            "<": " lt ",
            ">": " gt ",
            "<=": " le ",
            ">=": " ge ",
            "==": " eq ",
            "!=": " ne ",
            lessthan: " lt ",
            lessthanorequal: " le ",
            greaterthan: " gt ",
            greaterthanorequal: " ge ",
            equal: " eq ",
            notequal: " ne "
        }, DataUtil.odUniOperator = {
            "$=": "endswith",
            "^=": "startswith",
            "*=": "substringof",
            endswith: "endswith",
            startswith: "startswith",
            contains: "substringof"
        }, DataUtil.odv4UniOperator = {
            "$=": "endswith",
            "^=": "startswith",
            "*=": "contains",
            endswith: "endswith",
            startswith: "startswith",
            contains: "contains"
        }, DataUtil.diacritics = {
            "Ⓐ": "A",
            "Ａ": "A",
            "À": "A",
            "Á": "A",
            "Â": "A",
            "Ầ": "A",
            "Ấ": "A",
            "Ẫ": "A",
            "Ẩ": "A",
            "Ã": "A",
            "Ā": "A",
            "Ă": "A",
            "Ằ": "A",
            "Ắ": "A",
            "Ẵ": "A",
            "Ẳ": "A",
            "Ȧ": "A",
            "Ǡ": "A",
            "Ä": "A",
            "Ǟ": "A",
            "Ả": "A",
            "Å": "A",
            "Ǻ": "A",
            "Ǎ": "A",
            "Ȁ": "A",
            "Ȃ": "A",
            "Ạ": "A",
            "Ậ": "A",
            "Ặ": "A",
            "Ḁ": "A",
            "Ą": "A",
            "Ⱥ": "A",
            "Ɐ": "A",
            "Ꜳ": "AA",
            "Æ": "AE",
            "Ǽ": "AE",
            "Ǣ": "AE",
            "Ꜵ": "AO",
            "Ꜷ": "AU",
            "Ꜹ": "AV",
            "Ꜻ": "AV",
            "Ꜽ": "AY",
            "Ⓑ": "B",
            "Ｂ": "B",
            "Ḃ": "B",
            "Ḅ": "B",
            "Ḇ": "B",
            "Ƀ": "B",
            "Ƃ": "B",
            "Ɓ": "B",
            "Ⓒ": "C",
            "Ｃ": "C",
            "Ć": "C",
            "Ĉ": "C",
            "Ċ": "C",
            "Č": "C",
            "Ç": "C",
            "Ḉ": "C",
            "Ƈ": "C",
            "Ȼ": "C",
            "Ꜿ": "C",
            "Ⓓ": "D",
            "Ｄ": "D",
            "Ḋ": "D",
            "Ď": "D",
            "Ḍ": "D",
            "Ḑ": "D",
            "Ḓ": "D",
            "Ḏ": "D",
            "Đ": "D",
            "Ƌ": "D",
            "Ɗ": "D",
            "Ɖ": "D",
            "Ꝺ": "D",
            "Ǳ": "DZ",
            "Ǆ": "DZ",
            "ǲ": "Dz",
            "ǅ": "Dz",
            "Ⓔ": "E",
            "Ｅ": "E",
            "È": "E",
            "É": "E",
            "Ê": "E",
            "Ề": "E",
            "Ế": "E",
            "Ễ": "E",
            "Ể": "E",
            "Ẽ": "E",
            "Ē": "E",
            "Ḕ": "E",
            "Ḗ": "E",
            "Ĕ": "E",
            "Ė": "E",
            "Ë": "E",
            "Ẻ": "E",
            "Ě": "E",
            "Ȅ": "E",
            "Ȇ": "E",
            "Ẹ": "E",
            "Ệ": "E",
            "Ȩ": "E",
            "Ḝ": "E",
            "Ę": "E",
            "Ḙ": "E",
            "Ḛ": "E",
            "Ɛ": "E",
            "Ǝ": "E",
            "Ⓕ": "F",
            "Ｆ": "F",
            "Ḟ": "F",
            "Ƒ": "F",
            "Ꝼ": "F",
            "Ⓖ": "G",
            "Ｇ": "G",
            "Ǵ": "G",
            "Ĝ": "G",
            "Ḡ": "G",
            "Ğ": "G",
            "Ġ": "G",
            "Ǧ": "G",
            "Ģ": "G",
            "Ǥ": "G",
            "Ɠ": "G",
            "Ꞡ": "G",
            "Ᵹ": "G",
            "Ꝿ": "G",
            "Ⓗ": "H",
            "Ｈ": "H",
            "Ĥ": "H",
            "Ḣ": "H",
            "Ḧ": "H",
            "Ȟ": "H",
            "Ḥ": "H",
            "Ḩ": "H",
            "Ḫ": "H",
            "Ħ": "H",
            "Ⱨ": "H",
            "Ⱶ": "H",
            "Ɥ": "H",
            "Ⓘ": "I",
            "Ｉ": "I",
            "Ì": "I",
            "Í": "I",
            "Î": "I",
            "Ĩ": "I",
            "Ī": "I",
            "Ĭ": "I",
            "İ": "I",
            "Ï": "I",
            "Ḯ": "I",
            "Ỉ": "I",
            "Ǐ": "I",
            "Ȉ": "I",
            "Ȋ": "I",
            "Ị": "I",
            "Į": "I",
            "Ḭ": "I",
            "Ɨ": "I",
            "Ⓙ": "J",
            "Ｊ": "J",
            "Ĵ": "J",
            "Ɉ": "J",
            "Ⓚ": "K",
            "Ｋ": "K",
            "Ḱ": "K",
            "Ǩ": "K",
            "Ḳ": "K",
            "Ķ": "K",
            "Ḵ": "K",
            "Ƙ": "K",
            "Ⱪ": "K",
            "Ꝁ": "K",
            "Ꝃ": "K",
            "Ꝅ": "K",
            "Ꞣ": "K",
            "Ⓛ": "L",
            "Ｌ": "L",
            "Ŀ": "L",
            "Ĺ": "L",
            "Ľ": "L",
            "Ḷ": "L",
            "Ḹ": "L",
            "Ļ": "L",
            "Ḽ": "L",
            "Ḻ": "L",
            "Ł": "L",
            "Ƚ": "L",
            "Ɫ": "L",
            "Ⱡ": "L",
            "Ꝉ": "L",
            "Ꝇ": "L",
            "Ꞁ": "L",
            "Ǉ": "LJ",
            "ǈ": "Lj",
            "Ⓜ": "M",
            "Ｍ": "M",
            "Ḿ": "M",
            "Ṁ": "M",
            "Ṃ": "M",
            "Ɱ": "M",
            "Ɯ": "M",
            "Ⓝ": "N",
            "Ｎ": "N",
            "Ǹ": "N",
            "Ń": "N",
            "Ñ": "N",
            "Ṅ": "N",
            "Ň": "N",
            "Ṇ": "N",
            "Ņ": "N",
            "Ṋ": "N",
            "Ṉ": "N",
            "Ƞ": "N",
            "Ɲ": "N",
            "Ꞑ": "N",
            "Ꞥ": "N",
            "Ǌ": "NJ",
            "ǋ": "Nj",
            "Ⓞ": "O",
            "Ｏ": "O",
            "Ò": "O",
            "Ó": "O",
            "Ô": "O",
            "Ồ": "O",
            "Ố": "O",
            "Ỗ": "O",
            "Ổ": "O",
            "Õ": "O",
            "Ṍ": "O",
            "Ȭ": "O",
            "Ṏ": "O",
            "Ō": "O",
            "Ṑ": "O",
            "Ṓ": "O",
            "Ŏ": "O",
            "Ȯ": "O",
            "Ȱ": "O",
            "Ö": "O",
            "Ȫ": "O",
            "Ỏ": "O",
            "Ő": "O",
            "Ǒ": "O",
            "Ȍ": "O",
            "Ȏ": "O",
            "Ơ": "O",
            "Ờ": "O",
            "Ớ": "O",
            "Ỡ": "O",
            "Ở": "O",
            "Ợ": "O",
            "Ọ": "O",
            "Ộ": "O",
            "Ǫ": "O",
            "Ǭ": "O",
            "Ø": "O",
            "Ǿ": "O",
            "Ɔ": "O",
            "Ɵ": "O",
            "Ꝋ": "O",
            "Ꝍ": "O",
            "Ƣ": "OI",
            "Ꝏ": "OO",
            "Ȣ": "OU",
            "Ⓟ": "P",
            "Ｐ": "P",
            "Ṕ": "P",
            "Ṗ": "P",
            "Ƥ": "P",
            "Ᵽ": "P",
            "Ꝑ": "P",
            "Ꝓ": "P",
            "Ꝕ": "P",
            "Ⓠ": "Q",
            "Ｑ": "Q",
            "Ꝗ": "Q",
            "Ꝙ": "Q",
            "Ɋ": "Q",
            "Ⓡ": "R",
            "Ｒ": "R",
            "Ŕ": "R",
            "Ṙ": "R",
            "Ř": "R",
            "Ȑ": "R",
            "Ȓ": "R",
            "Ṛ": "R",
            "Ṝ": "R",
            "Ŗ": "R",
            "Ṟ": "R",
            "Ɍ": "R",
            "Ɽ": "R",
            "Ꝛ": "R",
            "Ꞧ": "R",
            "Ꞃ": "R",
            "Ⓢ": "S",
            "Ｓ": "S",
            "ẞ": "S",
            "Ś": "S",
            "Ṥ": "S",
            "Ŝ": "S",
            "Ṡ": "S",
            "Š": "S",
            "Ṧ": "S",
            "Ṣ": "S",
            "Ṩ": "S",
            "Ș": "S",
            "Ş": "S",
            "Ȿ": "S",
            "Ꞩ": "S",
            "Ꞅ": "S",
            "Ⓣ": "T",
            "Ｔ": "T",
            "Ṫ": "T",
            "Ť": "T",
            "Ṭ": "T",
            "Ț": "T",
            "Ţ": "T",
            "Ṱ": "T",
            "Ṯ": "T",
            "Ŧ": "T",
            "Ƭ": "T",
            "Ʈ": "T",
            "Ⱦ": "T",
            "Ꞇ": "T",
            "Ꜩ": "TZ",
            "Ⓤ": "U",
            "Ｕ": "U",
            "Ù": "U",
            "Ú": "U",
            "Û": "U",
            "Ũ": "U",
            "Ṹ": "U",
            "Ū": "U",
            "Ṻ": "U",
            "Ŭ": "U",
            "Ü": "U",
            "Ǜ": "U",
            "Ǘ": "U",
            "Ǖ": "U",
            "Ǚ": "U",
            "Ủ": "U",
            "Ů": "U",
            "Ű": "U",
            "Ǔ": "U",
            "Ȕ": "U",
            "Ȗ": "U",
            "Ư": "U",
            "Ừ": "U",
            "Ứ": "U",
            "Ữ": "U",
            "Ử": "U",
            "Ự": "U",
            "Ụ": "U",
            "Ṳ": "U",
            "Ų": "U",
            "Ṷ": "U",
            "Ṵ": "U",
            "Ʉ": "U",
            "Ⓥ": "V",
            "Ｖ": "V",
            "Ṽ": "V",
            "Ṿ": "V",
            "Ʋ": "V",
            "Ꝟ": "V",
            "Ʌ": "V",
            "Ꝡ": "VY",
            "Ⓦ": "W",
            "Ｗ": "W",
            "Ẁ": "W",
            "Ẃ": "W",
            "Ŵ": "W",
            "Ẇ": "W",
            "Ẅ": "W",
            "Ẉ": "W",
            "Ⱳ": "W",
            "Ⓧ": "X",
            "Ｘ": "X",
            "Ẋ": "X",
            "Ẍ": "X",
            "Ⓨ": "Y",
            "Ｙ": "Y",
            "Ỳ": "Y",
            "Ý": "Y",
            "Ŷ": "Y",
            "Ỹ": "Y",
            "Ȳ": "Y",
            "Ẏ": "Y",
            "Ÿ": "Y",
            "Ỷ": "Y",
            "Ỵ": "Y",
            "Ƴ": "Y",
            "Ɏ": "Y",
            "Ỿ": "Y",
            "Ⓩ": "Z",
            "Ｚ": "Z",
            "Ź": "Z",
            "Ẑ": "Z",
            "Ż": "Z",
            "Ž": "Z",
            "Ẓ": "Z",
            "Ẕ": "Z",
            "Ƶ": "Z",
            "Ȥ": "Z",
            "Ɀ": "Z",
            "Ⱬ": "Z",
            "Ꝣ": "Z",
            "ⓐ": "a",
            "ａ": "a",
            "ẚ": "a",
            "à": "a",
            "á": "a",
            "â": "a",
            "ầ": "a",
            "ấ": "a",
            "ẫ": "a",
            "ẩ": "a",
            "ã": "a",
            "ā": "a",
            "ă": "a",
            "ằ": "a",
            "ắ": "a",
            "ẵ": "a",
            "ẳ": "a",
            "ȧ": "a",
            "ǡ": "a",
            "ä": "a",
            "ǟ": "a",
            "ả": "a",
            "å": "a",
            "ǻ": "a",
            "ǎ": "a",
            "ȁ": "a",
            "ȃ": "a",
            "ạ": "a",
            "ậ": "a",
            "ặ": "a",
            "ḁ": "a",
            "ą": "a",
            "ⱥ": "a",
            "ɐ": "a",
            "ꜳ": "aa",
            "æ": "ae",
            "ǽ": "ae",
            "ǣ": "ae",
            "ꜵ": "ao",
            "ꜷ": "au",
            "ꜹ": "av",
            "ꜻ": "av",
            "ꜽ": "ay",
            "ⓑ": "b",
            "ｂ": "b",
            "ḃ": "b",
            "ḅ": "b",
            "ḇ": "b",
            "ƀ": "b",
            "ƃ": "b",
            "ɓ": "b",
            "ⓒ": "c",
            "ｃ": "c",
            "ć": "c",
            "ĉ": "c",
            "ċ": "c",
            "č": "c",
            "ç": "c",
            "ḉ": "c",
            "ƈ": "c",
            "ȼ": "c",
            "ꜿ": "c",
            "ↄ": "c",
            "ⓓ": "d",
            "ｄ": "d",
            "ḋ": "d",
            "ď": "d",
            "ḍ": "d",
            "ḑ": "d",
            "ḓ": "d",
            "ḏ": "d",
            "đ": "d",
            "ƌ": "d",
            "ɖ": "d",
            "ɗ": "d",
            "ꝺ": "d",
            "ǳ": "dz",
            "ǆ": "dz",
            "ⓔ": "e",
            "ｅ": "e",
            "è": "e",
            "é": "e",
            "ê": "e",
            "ề": "e",
            "ế": "e",
            "ễ": "e",
            "ể": "e",
            "ẽ": "e",
            "ē": "e",
            "ḕ": "e",
            "ḗ": "e",
            "ĕ": "e",
            "ė": "e",
            "ë": "e",
            "ẻ": "e",
            "ě": "e",
            "ȅ": "e",
            "ȇ": "e",
            "ẹ": "e",
            "ệ": "e",
            "ȩ": "e",
            "ḝ": "e",
            "ę": "e",
            "ḙ": "e",
            "ḛ": "e",
            "ɇ": "e",
            "ɛ": "e",
            "ǝ": "e",
            "ⓕ": "f",
            "ｆ": "f",
            "ḟ": "f",
            "ƒ": "f",
            "ꝼ": "f",
            "ⓖ": "g",
            "ｇ": "g",
            "ǵ": "g",
            "ĝ": "g",
            "ḡ": "g",
            "ğ": "g",
            "ġ": "g",
            "ǧ": "g",
            "ģ": "g",
            "ǥ": "g",
            "ɠ": "g",
            "ꞡ": "g",
            "ᵹ": "g",
            "ꝿ": "g",
            "ⓗ": "h",
            "ｈ": "h",
            "ĥ": "h",
            "ḣ": "h",
            "ḧ": "h",
            "ȟ": "h",
            "ḥ": "h",
            "ḩ": "h",
            "ḫ": "h",
            "ẖ": "h",
            "ħ": "h",
            "ⱨ": "h",
            "ⱶ": "h",
            "ɥ": "h",
            "ƕ": "hv",
            "ⓘ": "i",
            "ｉ": "i",
            "ì": "i",
            "í": "i",
            "î": "i",
            "ĩ": "i",
            "ī": "i",
            "ĭ": "i",
            "ï": "i",
            "ḯ": "i",
            "ỉ": "i",
            "ǐ": "i",
            "ȉ": "i",
            "ȋ": "i",
            "ị": "i",
            "į": "i",
            "ḭ": "i",
            "ɨ": "i",
            "ı": "i",
            "ⓙ": "j",
            "ｊ": "j",
            "ĵ": "j",
            "ǰ": "j",
            "ɉ": "j",
            "ⓚ": "k",
            "ｋ": "k",
            "ḱ": "k",
            "ǩ": "k",
            "ḳ": "k",
            "ķ": "k",
            "ḵ": "k",
            "ƙ": "k",
            "ⱪ": "k",
            "ꝁ": "k",
            "ꝃ": "k",
            "ꝅ": "k",
            "ꞣ": "k",
            "ⓛ": "l",
            "ｌ": "l",
            "ŀ": "l",
            "ĺ": "l",
            "ľ": "l",
            "ḷ": "l",
            "ḹ": "l",
            "ļ": "l",
            "ḽ": "l",
            "ḻ": "l",
            "ſ": "l",
            "ł": "l",
            "ƚ": "l",
            "ɫ": "l",
            "ⱡ": "l",
            "ꝉ": "l",
            "ꞁ": "l",
            "ꝇ": "l",
            "ǉ": "lj",
            "ⓜ": "m",
            "ｍ": "m",
            "ḿ": "m",
            "ṁ": "m",
            "ṃ": "m",
            "ɱ": "m",
            "ɯ": "m",
            "ⓝ": "n",
            "ｎ": "n",
            "ǹ": "n",
            "ń": "n",
            "ñ": "n",
            "ṅ": "n",
            "ň": "n",
            "ṇ": "n",
            "ņ": "n",
            "ṋ": "n",
            "ṉ": "n",
            "ƞ": "n",
            "ɲ": "n",
            "ŉ": "n",
            "ꞑ": "n",
            "ꞥ": "n",
            "ǌ": "nj",
            "ⓞ": "o",
            "ｏ": "o",
            "ò": "o",
            "ó": "o",
            "ô": "o",
            "ồ": "o",
            "ố": "o",
            "ỗ": "o",
            "ổ": "o",
            "õ": "o",
            "ṍ": "o",
            "ȭ": "o",
            "ṏ": "o",
            "ō": "o",
            "ṑ": "o",
            "ṓ": "o",
            "ŏ": "o",
            "ȯ": "o",
            "ȱ": "o",
            "ö": "o",
            "ȫ": "o",
            "ỏ": "o",
            "ő": "o",
            "ǒ": "o",
            "ȍ": "o",
            "ȏ": "o",
            "ơ": "o",
            "ờ": "o",
            "ớ": "o",
            "ỡ": "o",
            "ở": "o",
            "ợ": "o",
            "ọ": "o",
            "ộ": "o",
            "ǫ": "o",
            "ǭ": "o",
            "ø": "o",
            "ǿ": "o",
            "ɔ": "o",
            "ꝋ": "o",
            "ꝍ": "o",
            "ɵ": "o",
            "ƣ": "oi",
            "ȣ": "ou",
            "ꝏ": "oo",
            "ⓟ": "p",
            "ｐ": "p",
            "ṕ": "p",
            "ṗ": "p",
            "ƥ": "p",
            "ᵽ": "p",
            "ꝑ": "p",
            "ꝓ": "p",
            "ꝕ": "p",
            "ⓠ": "q",
            "ｑ": "q",
            "ɋ": "q",
            "ꝗ": "q",
            "ꝙ": "q",
            "ⓡ": "r",
            "ｒ": "r",
            "ŕ": "r",
            "ṙ": "r",
            "ř": "r",
            "ȑ": "r",
            "ȓ": "r",
            "ṛ": "r",
            "ṝ": "r",
            "ŗ": "r",
            "ṟ": "r",
            "ɍ": "r",
            "ɽ": "r",
            "ꝛ": "r",
            "ꞧ": "r",
            "ꞃ": "r",
            "ⓢ": "s",
            "ｓ": "s",
            "ß": "s",
            "ś": "s",
            "ṥ": "s",
            "ŝ": "s",
            "ṡ": "s",
            "š": "s",
            "ṧ": "s",
            "ṣ": "s",
            "ṩ": "s",
            "ș": "s",
            "ş": "s",
            "ȿ": "s",
            "ꞩ": "s",
            "ꞅ": "s",
            "ẛ": "s",
            "ⓣ": "t",
            "ｔ": "t",
            "ṫ": "t",
            "ẗ": "t",
            "ť": "t",
            "ṭ": "t",
            "ț": "t",
            "ţ": "t",
            "ṱ": "t",
            "ṯ": "t",
            "ŧ": "t",
            "ƭ": "t",
            "ʈ": "t",
            "ⱦ": "t",
            "ꞇ": "t",
            "ꜩ": "tz",
            "ⓤ": "u",
            "ｕ": "u",
            "ù": "u",
            "ú": "u",
            "û": "u",
            "ũ": "u",
            "ṹ": "u",
            "ū": "u",
            "ṻ": "u",
            "ŭ": "u",
            "ü": "u",
            "ǜ": "u",
            "ǘ": "u",
            "ǖ": "u",
            "ǚ": "u",
            "ủ": "u",
            "ů": "u",
            "ű": "u",
            "ǔ": "u",
            "ȕ": "u",
            "ȗ": "u",
            "ư": "u",
            "ừ": "u",
            "ứ": "u",
            "ữ": "u",
            "ử": "u",
            "ự": "u",
            "ụ": "u",
            "ṳ": "u",
            "ų": "u",
            "ṷ": "u",
            "ṵ": "u",
            "ʉ": "u",
            "ⓥ": "v",
            "ｖ": "v",
            "ṽ": "v",
            "ṿ": "v",
            "ʋ": "v",
            "ꝟ": "v",
            "ʌ": "v",
            "ꝡ": "vy",
            "ⓦ": "w",
            "ｗ": "w",
            "ẁ": "w",
            "ẃ": "w",
            "ŵ": "w",
            "ẇ": "w",
            "ẅ": "w",
            "ẘ": "w",
            "ẉ": "w",
            "ⱳ": "w",
            "ⓧ": "x",
            "ｘ": "x",
            "ẋ": "x",
            "ẍ": "x",
            "ⓨ": "y",
            "ｙ": "y",
            "ỳ": "y",
            "ý": "y",
            "ŷ": "y",
            "ỹ": "y",
            "ȳ": "y",
            "ẏ": "y",
            "ÿ": "y",
            "ỷ": "y",
            "ẙ": "y",
            "ỵ": "y",
            "ƴ": "y",
            "ɏ": "y",
            "ỿ": "y",
            "ⓩ": "z",
            "ｚ": "z",
            "ź": "z",
            "ẑ": "z",
            "ż": "z",
            "ž": "z",
            "ẓ": "z",
            "ẕ": "z",
            "ƶ": "z",
            "ȥ": "z",
            "ɀ": "z",
            "ⱬ": "z",
            "ꝣ": "z",
            "Ά": "Α",
            "Έ": "Ε",
            "Ή": "Η",
            "Ί": "Ι",
            "Ϊ": "Ι",
            "Ό": "Ο",
            "Ύ": "Υ",
            "Ϋ": "Υ",
            "Ώ": "Ω",
            "ά": "α",
            "έ": "ε",
            "ή": "η",
            "ί": "ι",
            "ϊ": "ι",
            "ΐ": "ι",
            "ό": "ο",
            "ύ": "υ",
            "ϋ": "υ",
            "ΰ": "υ",
            "ω": "ω",
            "ς": "σ"
        }, DataUtil.fnOperators = {
            equal: function(actual, expected, ignoreCase, ignoreAccent) {
                return ignoreAccent && (actual = DataUtil.ignoreDiacritics(actual), expected = DataUtil.ignoreDiacritics(expected)), 
                ignoreCase ? DataUtil.toLowerCase(actual) === DataUtil.toLowerCase(expected) : actual === expected;
            },
            notequal: function(actual, expected, ignoreCase, ignoreAccent) {
                return ignoreAccent && (actual = DataUtil.ignoreDiacritics(actual), expected = DataUtil.ignoreDiacritics(expected)), 
                !DataUtil.fnOperators.equal(actual, expected, ignoreCase);
            },
            lessthan: function(actual, expected, ignoreCase) {
                return ignoreCase ? DataUtil.toLowerCase(actual) < DataUtil.toLowerCase(expected) : actual < expected;
            },
            greaterthan: function(actual, expected, ignoreCase) {
                return ignoreCase ? DataUtil.toLowerCase(actual) > DataUtil.toLowerCase(expected) : actual > expected;
            },
            lessthanorequal: function(actual, expected, ignoreCase) {
                return ignoreCase ? DataUtil.toLowerCase(actual) <= DataUtil.toLowerCase(expected) : actual <= expected;
            },
            greaterthanorequal: function(actual, expected, ignoreCase) {
                return ignoreCase ? DataUtil.toLowerCase(actual) >= DataUtil.toLowerCase(expected) : actual >= expected;
            },
            contains: function(actual, expected, ignoreCase, ignoreAccent) {
                return ignoreAccent && (actual = DataUtil.ignoreDiacritics(actual), expected = DataUtil.ignoreDiacritics(expected)), 
                ignoreCase ? !isNullOrUndefined(actual) && !isNullOrUndefined(expected) && -1 !== DataUtil.toLowerCase(actual).indexOf(DataUtil.toLowerCase(expected)) : !isNullOrUndefined(actual) && !isNullOrUndefined(expected) && -1 !== actual.toString().indexOf(expected);
            },
            notnull: function(actual) {
                return null !== actual;
            },
            isnull: function(actual) {
                return null === actual;
            },
            startswith: function(actual, expected, ignoreCase, ignoreAccent) {
                return ignoreAccent && (actual = DataUtil.ignoreDiacritics(actual), expected = DataUtil.ignoreDiacritics(expected)), 
                ignoreCase ? actual && expected && DataUtil.startsWith(DataUtil.toLowerCase(actual), DataUtil.toLowerCase(expected)) : actual && expected && DataUtil.startsWith(actual, expected);
            },
            endswith: function(actual, expected, ignoreCase, ignoreAccent) {
                return ignoreAccent && (actual = DataUtil.ignoreDiacritics(actual), expected = DataUtil.ignoreDiacritics(expected)), 
                ignoreCase ? actual && expected && DataUtil.endsWith(DataUtil.toLowerCase(actual), DataUtil.toLowerCase(expected)) : actual && expected && DataUtil.endsWith(actual, expected);
            },
            processSymbols: function(operator) {
                var fnName = DataUtil.operatorSymbols[operator];
                if (fnName) {
                    return DataUtil.fnOperators[fnName];
                }
                return DataUtil.throwError("Query - Process Operator : Invalid operator");
            },
            processOperator: function(operator) {
                var fn = DataUtil.fnOperators[operator];
                return fn || DataUtil.fnOperators.processSymbols(operator);
            }
        }, DataUtil.parse = {
            parseJson: function(jsonText) {
                return "string" == typeof jsonText ? jsonText = JSON.parse(jsonText, DataUtil.parse.jsonReviver) : jsonText instanceof Array ? DataUtil.parse.iterateAndReviveArray(jsonText) : "object" == typeof jsonText && DataUtil.parse.iterateAndReviveJson(jsonText), 
                jsonText;
            },
            iterateAndReviveArray: function(array) {
                for (var i = 0; i < array.length; i++) "object" == typeof array[i] ? DataUtil.parse.iterateAndReviveJson(array[i]) : "string" != typeof array[i] || /^[\s]*\[|^[\s]*\{|\"/g.test(array[i]) ? array[i] = DataUtil.parse.parseJson(array[i]) : array[i] = DataUtil.parse.jsonReviver("", array[i]);
            },
            iterateAndReviveJson: function(json) {
                for (var value, _i = 0, keys_2 = Object.keys(json); _i < keys_2.length; _i++) {
                    var prop = keys_2[_i];
                    DataUtil.startsWith(prop, "__") || ("object" == typeof (value = json[prop]) ? value instanceof Array ? DataUtil.parse.iterateAndReviveArray(value) : value && DataUtil.parse.iterateAndReviveJson(value) : json[prop] = DataUtil.parse.jsonReviver(json[prop], value));
                }
            },
            jsonReviver: function(field, value) {
                var dupValue = value;
                if ("string" == typeof value) {
                    var ms = /^\/Date\(([+-]?[0-9]+)([+-][0-9]{4})?\)\/$/.exec(value);
                    if (ms) return DataUtil.dateParse.toTimeZone(new Date(parseInt(ms[1], 10)), DataUtil.serverTimezoneOffset, !0);
                    if (/^(\d{4}\-\d\d\-\d\d([tT][\d:\.]*){1})([zZ]|([+\-])(\d\d):?(\d\d))?$/.test(value)) {
                        var arr = dupValue.split(/[^0-9]/);
                        value = DataUtil.dateParse.toTimeZone(new Date(parseInt(arr[0], 10), parseInt(arr[1], 10) - 1, parseInt(arr[2], 10), parseInt(arr[3], 10), parseInt(arr[4], 10), parseInt(arr[5], 10)), DataUtil.serverTimezoneOffset, !0);
                    }
                }
                return value;
            },
            isJson: function(jsonData) {
                return "string" == typeof jsonData[0] ? jsonData : DataUtil.parse.parseJson(jsonData);
            },
            isGuid: function(value) {
                return null != /[A-Fa-f0-9]{8}(?:-[A-Fa-f0-9]{4}){3}-[A-Fa-f0-9]{12}/i.exec(value);
            },
            replacer: function(value, stringify) {
                return DataUtil.isPlainObject(value) ? DataUtil.parse.jsonReplacer(value, stringify) : value instanceof Array ? DataUtil.parse.arrayReplacer(value) : value instanceof Date ? DataUtil.parse.jsonReplacer({
                    val: value
                }, stringify).val : value;
            },
            jsonReplacer: function(val, stringify) {
                for (var value, _i = 0, keys_3 = Object.keys(val); _i < keys_3.length; _i++) {
                    var prop = keys_3[_i];
                    if ((value = val[prop]) instanceof Date) {
                        var d = value;
                        val[prop] = DataUtil.dateParse.toTimeZone(DataUtil.dateParse.addSelfOffset(d), DataUtil.serverTimezoneOffset).toJSON();
                    }
                }
                return val;
            },
            arrayReplacer: function(val) {
                for (var i = 0; i < val.length; i++) DataUtil.isPlainObject(val[i]) ? val[i] = DataUtil.parse.jsonReplacer(val[i]) : val[i] instanceof Date && (val[i] = DataUtil.parse.jsonReplacer({
                    date: val[i]
                }).date);
                return val;
            }
        }, DataUtil.dateParse = {
            addSelfOffset: function(input) {
                return new Date(+input - 6e4 * input.getTimezoneOffset());
            },
            toUTC: function(input) {
                return new Date(+input + 6e4 * input.getTimezoneOffset());
            },
            toTimeZone: function(input, offset, utc) {
                if (null === offset) return input;
                var unix = utc ? DataUtil.dateParse.toUTC(input) : input;
                return new Date(+unix - 36e5 * offset);
            }
        }, DataUtil;
    }(), __extends$8 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), Adaptor = function() {
        function Adaptor(ds) {
            this.options = {
                from: "table",
                requestType: "json",
                sortBy: "sorted",
                select: "select",
                skip: "skip",
                group: "group",
                take: "take",
                search: "search",
                count: "requiresCounts",
                where: "where",
                aggregates: "aggregates"
            }, this.type = Adaptor, this.dataSource = ds, this.pvt = {};
        }
        return Adaptor.prototype.processResponse = function(data, ds, query, xhr) {
            return data;
        }, Adaptor;
    }(), JsonAdaptor = function(_super) {
        function JsonAdaptor() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$8(JsonAdaptor, _super), JsonAdaptor.prototype.processQuery = function(dataManager, query) {
            for (var ret, key, result = dataManager.dataSource.json.slice(0), count = result.length, countFlg = !0, agg = {}, i = 0; i < query.queries.length; i++) ret = this[(key = query.queries[i]).fn].call(this, result, key.e, query), 
            "onAggregates" === key.fn ? agg[key.e.field + " - " + key.e.type] = ret : result = void 0 !== ret ? ret : result, 
            "onPage" !== key.fn && "onSkip" !== key.fn && "onTake" !== key.fn && "onRange" !== key.fn || (countFlg = !1), 
            countFlg && (count = result.length);
            return query.isCountRequired && (result = {
                result: result,
                count: count,
                aggregates: agg
            }), result;
        }, JsonAdaptor.prototype.batchRequest = function(dm, changes, e) {
            var i;
            for (i = 0; i < changes.addedRecords.length; i++) this.insert(dm, changes.addedRecords[i]);
            for (i = 0; i < changes.changedRecords.length; i++) this.update(dm, e.key, changes.changedRecords[i]);
            for (i = 0; i < changes.deletedRecords.length; i++) this.remove(dm, e.key, changes.deletedRecords[i]);
            return changes;
        }, JsonAdaptor.prototype.onWhere = function(ds, e) {
            return ds && ds.length ? ds.filter(function(obj) {
                if (e) return e.validate(obj);
            }) : ds;
        }, JsonAdaptor.prototype.onAggregates = function(ds, e) {
            var fn = DataUtil.aggregates[e.type];
            return ds && fn && 0 !== ds.length ? fn(ds, e.field) : null;
        }, JsonAdaptor.prototype.onSearch = function(ds, e) {
            return ds && ds.length ? (0 === e.fieldNames.length && DataUtil.getFieldList(ds[0], e.fieldNames), 
            ds.filter(function(obj) {
                for (var j = 0; j < e.fieldNames.length; j++) if (e.comparer.call(obj, DataUtil.getObject(e.fieldNames[j], obj), e.searchKey, e.ignoreCase)) return !0;
                return !1;
            })) : ds;
        }, JsonAdaptor.prototype.onSortBy = function(ds, e, query) {
            if (!ds || !ds.length) return ds;
            var fnCompare, field = DataUtil.getValue(e.fieldName, query);
            if (!field) return ds.sort(e.comparer);
            if (field instanceof Array) {
                for (var i = (field = field.slice(0)).length - 1; i >= 0; i--) field[i] && (fnCompare = e.comparer, 
                DataUtil.endsWith(field[i], " desc") && (fnCompare = DataUtil.fnSort("descending"), 
                field[i] = field[i].replace(" desc", "")), ds = DataUtil.sort(ds, field[i], fnCompare));
                return ds;
            }
            return DataUtil.sort(ds, field, e.comparer);
        }, JsonAdaptor.prototype.onGroup = function(ds, e, query) {
            if (!ds || !ds.length) return ds;
            var aggQuery = Query.filterQueries(query.queries, "onAggregates"), agg = [];
            if (aggQuery.length) for (var tmp = void 0, i = 0; i < aggQuery.length; i++) tmp = aggQuery[i].e, 
            agg.push({
                type: tmp.type,
                field: DataUtil.getValue(tmp.field, query)
            });
            return DataUtil.group(ds, DataUtil.getValue(e.fieldName, query), agg, null, null, e.comparer);
        }, JsonAdaptor.prototype.onPage = function(ds, e, query) {
            var size = DataUtil.getValue(e.pageSize, query), start = (DataUtil.getValue(e.pageIndex, query) - 1) * size, end = start + size;
            return ds && ds.length ? ds.slice(start, end) : ds;
        }, JsonAdaptor.prototype.onRange = function(ds, e) {
            return ds && ds.length ? ds.slice(DataUtil.getValue(e.start), DataUtil.getValue(e.end)) : ds;
        }, JsonAdaptor.prototype.onTake = function(ds, e) {
            return ds && ds.length ? ds.slice(0, DataUtil.getValue(e.nos)) : ds;
        }, JsonAdaptor.prototype.onSkip = function(ds, e) {
            return ds && ds.length ? ds.slice(DataUtil.getValue(e.nos)) : ds;
        }, JsonAdaptor.prototype.onSelect = function(ds, e) {
            return ds && ds.length ? DataUtil.select(ds, DataUtil.getValue(e.fieldNames)) : ds;
        }, JsonAdaptor.prototype.insert = function(dm, data, tableName, query, position) {
            return isNullOrUndefined(position) ? dm.dataSource.json.push(data) : dm.dataSource.json.splice(position, 0, data);
        }, JsonAdaptor.prototype.remove = function(dm, keyField, value, tableName) {
            var i, ds = dm.dataSource.json;
            for ("object" == typeof value && (value = value[keyField]), i = 0; i < ds.length && ds[i][keyField] !== value; i++) ;
            return i !== ds.length ? ds.splice(i, 1) : null;
        }, JsonAdaptor.prototype.update = function(dm, keyField, value, tableName) {
            var i, ds = dm.dataSource.json, key = value[keyField];
            for (i = 0; i < ds.length && ds[i][keyField] !== key; i++) ;
            return i < ds.length ? merge(ds[i], value) : null;
        }, JsonAdaptor;
    }(Adaptor), UrlAdaptor = function(_super) {
        function UrlAdaptor() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$8(UrlAdaptor, _super), UrlAdaptor.prototype.processQuery = function(dm, query, hierarchyFilters) {
            var temp, skip, queries = this.getQueryRequest(query), singles = Query.filterQueryLists(query.queries, [ "onSelect", "onPage", "onSkip", "onTake", "onRange" ]), params = query.params, url = dm.dataSource.url, take = null, options = this.options, request = {
                sorts: [],
                groups: [],
                filters: [],
                searches: [],
                aggregates: []
            };
            "onPage" in singles ? (temp = singles.onPage, skip = ((skip = DataUtil.getValue(temp.pageIndex, query)) - 1) * (take = DataUtil.getValue(temp.pageSize, query))) : "onRange" in singles && (skip = (temp = singles.onRange).start, 
            take = temp.end - temp.start);
            for (var i = 0; i < queries.sorts.length; i++) temp = DataUtil.getValue(queries.sorts[i].e.fieldName, query), 
            request.sorts.push(DataUtil.callAdaptorFunction(this, "onEachSort", {
                name: temp,
                direction: queries.sorts[i].e.direction
            }, query));
            hierarchyFilters && (temp = this.getFiltersFrom(hierarchyFilters, query)) && request.filters.push(DataUtil.callAdaptorFunction(this, "onEachWhere", temp.toJson(), query));
            for (i = 0; i < queries.filters.length; i++) {
                request.filters.push(DataUtil.callAdaptorFunction(this, "onEachWhere", queries.filters[i].e.toJson(), query));
                for (var _i = 0, keys_2 = "object" == typeof request.filters[i] ? Object.keys(request.filters[i]) : []; _i < keys_2.length; _i++) {
                    var prop = keys_2[_i];
                    DataUtil.isNull(request[prop]) && delete request[prop];
                }
            }
            for (i = 0; i < queries.searches.length; i++) temp = queries.searches[i].e, request.searches.push(DataUtil.callAdaptorFunction(this, "onEachSearch", {
                fields: temp.fieldNames,
                operator: temp.operator,
                key: temp.searchKey,
                ignoreCase: temp.ignoreCase
            }, query));
            for (i = 0; i < queries.groups.length; i++) request.groups.push(DataUtil.getValue(queries.groups[i].e.fieldName, query));
            for (i = 0; i < queries.aggregates.length; i++) temp = queries.aggregates[i].e, 
            request.aggregates.push({
                type: temp.type,
                field: DataUtil.getValue(temp.field, query)
            });
            var req = {};
            this.getRequestQuery(options, query, singles, request, req), DataUtil.callAdaptorFunction(this, "addParams", {
                dm: dm,
                query: query,
                params: params,
                reqParams: req
            });
            for (var _a = 0, keys_3 = Object.keys(req); _a < keys_3.length; _a++) {
                prop = keys_3[_a];
                (DataUtil.isNull(req[prop]) || "" === req[prop] || 0 === req[prop].length) && delete req[prop];
            }
            options.skip in req && options.take in req || null === take || (req[options.skip] = DataUtil.callAdaptorFunction(this, "onSkip", skip, query), 
            req[options.take] = DataUtil.callAdaptorFunction(this, "onTake", take, query));
            var p = this.pvt;
            return this.pvt = {}, "json" === this.options.requestType ? {
                data: JSON.stringify(req),
                url: url,
                pvtData: p,
                type: "POST",
                contentType: "application/json; charset=utf-8"
            } : (temp = this.convertToQueryString(req, query, dm), temp = (-1 !== dm.dataSource.url.indexOf("?") ? "&" : "/") + temp, 
            {
                type: "GET",
                url: temp.length ? url.replace(/\/*$/, temp) : url,
                pvtData: p
            });
        }, UrlAdaptor.prototype.getRequestQuery = function(options, query, singles, request, request1) {
            var req = request1;
            req[options.from] = query.fromTable, options.expand && (req[options.expand] = query.expands), 
            req[options.select] = "onSelect" in singles ? DataUtil.callAdaptorFunction(this, "onSelect", DataUtil.getValue(singles.onSelect.fieldNames, query), query) : "", 
            req[options.count] = query.isCountRequired ? DataUtil.callAdaptorFunction(this, "onCount", query.isCountRequired, query) : "", 
            req[options.search] = request.searches.length ? DataUtil.callAdaptorFunction(this, "onSearch", request.searches, query) : "", 
            req[options.skip] = "onSkip" in singles ? DataUtil.callAdaptorFunction(this, "onSkip", DataUtil.getValue(singles.onSkip.nos, query), query) : "", 
            req[options.take] = "onTake" in singles ? DataUtil.callAdaptorFunction(this, "onTake", DataUtil.getValue(singles.onTake.nos, query), query) : "", 
            req[options.where] = request.filters.length || request.searches.length ? DataUtil.callAdaptorFunction(this, "onWhere", request.filters, query) : "", 
            req[options.sortBy] = request.sorts.length ? DataUtil.callAdaptorFunction(this, "onSortBy", request.sorts, query) : "", 
            req[options.group] = request.groups.length ? DataUtil.callAdaptorFunction(this, "onGroup", request.groups, query) : "", 
            req[options.aggregates] = request.aggregates.length ? DataUtil.callAdaptorFunction(this, "onAggregates", request.aggregates, query) : "", 
            req.param = [];
        }, UrlAdaptor.prototype.convertToQueryString = function(request, query, dm) {
            return "";
        }, UrlAdaptor.prototype.processResponse = function(data, ds, query, xhr, request, changes) {
            var requests = request, pvt = requests.pvtData || {}, groupDs = data.groupDs;
            if (xhr && xhr.getResponseHeader("Content-Type") && -1 !== xhr.getResponseHeader("Content-Type").indexOf("xml")) return query.isCountRequired ? {
                result: [],
                count: 0
            } : [];
            var d = JSON.parse(requests.data);
            if (d && "batch" === d.action && data.addedRecords) return changes.addedRecords = data.addedRecords, 
            changes;
            data.d && (data = data.d);
            var args = {};
            return "count" in data && (args.count = data.count), args.result = data.result ? data.result : data, 
            this.getAggregateResult(pvt, data, args, groupDs), DataUtil.isNull(args.count) ? args.result : {
                result: args.result,
                count: args.count,
                aggregates: args.aggregates
            };
        }, UrlAdaptor.prototype.onGroup = function(e) {
            return this.pvt.groups = e, e;
        }, UrlAdaptor.prototype.onAggregates = function(e) {
            this.pvt.aggregates = e;
        }, UrlAdaptor.prototype.batchRequest = function(dm, changes, e) {
            return {
                type: "POST",
                url: dm.dataSource.batchUrl || dm.dataSource.crudUrl || dm.dataSource.removeUrl || dm.dataSource.url,
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                data: JSON.stringify({
                    changed: changes.changedRecords,
                    added: changes.addedRecords,
                    deleted: changes.deletedRecords,
                    action: "batch",
                    table: e[void 0],
                    key: e[void 0]
                })
            };
        }, UrlAdaptor.prototype.beforeSend = function(dm, request) {}, UrlAdaptor.prototype.insert = function(dm, data, tableName) {
            return {
                url: dm.dataSource.insertUrl || dm.dataSource.crudUrl || dm.dataSource.url,
                data: JSON.stringify({
                    value: data,
                    table: tableName,
                    action: "insert"
                })
            };
        }, UrlAdaptor.prototype.remove = function(dm, keyField, value, tableName) {
            return {
                type: "POST",
                url: dm.dataSource.removeUrl || dm.dataSource.crudUrl || dm.dataSource.url,
                data: JSON.stringify({
                    key: value,
                    keyColumn: keyField,
                    table: tableName,
                    action: "remove"
                })
            };
        }, UrlAdaptor.prototype.update = function(dm, keyField, value, tableName) {
            return {
                type: "POST",
                url: dm.dataSource.updateUrl || dm.dataSource.crudUrl || dm.dataSource.url,
                data: JSON.stringify({
                    value: value,
                    action: "update",
                    keyColumn: keyField,
                    key: value[keyField],
                    table: tableName
                })
            };
        }, UrlAdaptor.prototype.getFiltersFrom = function(data, query) {
            var value, key = query.fKey, prop = key, pKey = query.key, predicats = [];
            "object" != typeof data[0] && (prop = null);
            for (var i = 0; i < data.length; i++) value = "object" == typeof data[0] ? DataUtil.getObject(pKey || prop, data[i]) : data[i], 
            predicats.push(new Predicate(key, "equal", value));
            return Predicate.or(predicats);
        }, UrlAdaptor.prototype.getAggregateResult = function(pvt, data, args, groupDs) {
            var pData = data;
            if (data && data.result && (pData = data.result), pvt && pvt.aggregates && pvt.aggregates.length) {
                var agg = pvt.aggregates, fn = void 0, aggregateData = pData, res = {};
                data.aggregate && (aggregateData = data.aggregate);
                for (var i = 0; i < agg.length; i++) (fn = DataUtil.aggregates[agg[i].type]) && (res[agg[i].field + " - " + agg[i].type] = fn(aggregateData, agg[i].field));
                args.aggregates = res;
            }
            if (pvt && pvt.groups && pvt.groups.length) {
                var groups = pvt.groups;
                for (i = 0; i < groups.length; i++) {
                    isNullOrUndefined(groupDs) || (groupDs = DataUtil.group(groupDs, groups[i])), pData = DataUtil.group(pData, groups[i], pvt.aggregates, null, groupDs);
                }
                args.result = pData;
            }
            return args;
        }, UrlAdaptor.prototype.getQueryRequest = function(query) {
            var req = {
                sorts: [],
                groups: [],
                filters: [],
                searches: [],
                aggregates: []
            };
            return req.sorts = Query.filterQueries(query.queries, "onSortBy"), req.groups = Query.filterQueries(query.queries, "onGroup"), 
            req.filters = Query.filterQueries(query.queries, "onWhere"), req.searches = Query.filterQueries(query.queries, "onSearch"), 
            req.aggregates = Query.filterQueries(query.queries, "onAggregates"), req;
        }, UrlAdaptor.prototype.addParams = function(options) {
            var req = options.reqParams;
            options.params.length && (req.params = {});
            for (var _i = 0, _a = options.params; _i < _a.length; _i++) {
                var tmp = _a[_i];
                if (req[tmp.key]) throw new Error("Query() - addParams: Custom Param is conflicting other request arguments");
                req[tmp.key] = tmp.value, tmp.fn && (req[tmp.key] = tmp.fn.call(options.query, tmp.key, options.query, options.dm)), 
                req.params[tmp.key] = req[tmp.key];
            }
        }, UrlAdaptor;
    }(Adaptor), ODataAdaptor = function(_super) {
        function ODataAdaptor() {
            var _this = _super.call(this) || this;
            return _this.options = extend({}, _this.options, {
                requestType: "get",
                accept: "application/json;odata=light;q=1,application/json;odata=verbose;q=0.5",
                multipartAccept: "multipart/mixed",
                sortBy: "$orderby",
                select: "$select",
                skip: "$skip",
                take: "$top",
                count: "$inlinecount",
                where: "$filter",
                expand: "$expand",
                batch: "$batch",
                changeSet: "--changeset_",
                batchPre: "batch_",
                contentId: "Content-Id: ",
                batchContent: "Content-Type: multipart/mixed; boundary=",
                changeSetContent: "Content-Type: application/http\nContent-Transfer-Encoding: binary ",
                batchChangeSetContentType: "Content-Type: application/json; charset=utf-8 "
            }), _this.getModuleName = getValue("getModulename", _this), _this;
        }
        return __extends$8(ODataAdaptor, _super), ODataAdaptor.prototype.onPredicate = function(predicate, query, requiresCast) {
            var operator, guid, returnValue = "", val = predicate.value, type = typeof val, field = predicate.field ? ODataAdaptor.getField(predicate.field) : null;
            if (val instanceof Date && (val = "datetime'" + DataUtil.parse.replacer(val) + "'"), 
            "string" === type && (val = "'" + val + "'", requiresCast && (field = "cast(" + field + ", 'Edm.String')"), 
            DataUtil.parse.isGuid(val) && (guid = "guid"), predicate.ignoreCase && (guid || (field = "tolower(" + field + ")"), 
            val = val.toLowerCase())), operator = DataUtil.odBiOperator[predicate.operator]) return returnValue += field, 
            returnValue += operator, guid && (returnValue += guid), returnValue + val;
            if (isNullOrUndefined(this.getModuleName) ? operator = DataUtil.odUniOperator[predicate.operator] : "ODataV4Adaptor" === this.getModuleName() && (operator = DataUtil.odv4UniOperator[predicate.operator]), 
            "substringof" === operator) {
                var temp = val;
                val = field, field = temp;
            }
            return returnValue += operator + "(", returnValue += field + ",", guid && (returnValue += guid), 
            returnValue += val + ")";
        }, ODataAdaptor.prototype.onComplexPredicate = function(predicate, query, requiresCast) {
            for (var res = [], i = 0; i < predicate.predicates.length; i++) res.push("(" + this.onEachWhere(predicate.predicates[i], query, requiresCast) + ")");
            return res.join(" " + predicate.condition + " ");
        }, ODataAdaptor.prototype.onEachWhere = function(filter, query, requiresCast) {
            return filter.isComplex ? this.onComplexPredicate(filter, query, requiresCast) : this.onPredicate(filter, query, requiresCast);
        }, ODataAdaptor.prototype.onWhere = function(filters) {
            return this.pvt.search && filters.push(this.onEachWhere(this.pvt.search, null, !0)), 
            filters.join(" and ");
        }, ODataAdaptor.prototype.onEachSearch = function(e) {
            e.fields && 0 === e.fields.length && DataUtil.throwError("Query() - Search : oData search requires list of field names to search");
            for (var filter = this.pvt.search || [], i = 0; i < e.fields.length; i++) filter.push(new Predicate(e.fields[i], e.operator, e.key, e.ignoreCase));
            this.pvt.search = filter;
        }, ODataAdaptor.prototype.onSearch = function(e) {
            return this.pvt.search = Predicate.or(this.pvt.search), "";
        }, ODataAdaptor.prototype.onEachSort = function(e) {
            var res = [];
            if (e.name instanceof Array) for (var i = 0; i < e.name.length; i++) res.push(ODataAdaptor.getField(e.name[i]) + ("descending" === e.direction ? " desc" : "")); else res.push(ODataAdaptor.getField(e.name) + ("descending" === e.direction ? " desc" : ""));
            return res.join(",");
        }, ODataAdaptor.prototype.onSortBy = function(e) {
            return e.reverse().join(",");
        }, ODataAdaptor.prototype.onGroup = function(e) {
            return this.pvt.groups = e, [];
        }, ODataAdaptor.prototype.onSelect = function(e) {
            for (var i = 0; i < e.length; i++) e[i] = ODataAdaptor.getField(e[i]);
            return e.join(",");
        }, ODataAdaptor.prototype.onAggregates = function(e) {
            return this.pvt.aggregates = e, "";
        }, ODataAdaptor.prototype.onCount = function(e) {
            return !0 === e ? "allpages" : "";
        }, ODataAdaptor.prototype.beforeSend = function(dm, request, settings) {
            DataUtil.endsWith(settings.url, this.options.batch) && "post" === settings.type.toLowerCase() ? (request.setRequestHeader("Accept", this.options.multipartAccept), 
            request.setRequestHeader("DataServiceVersion", "2.0"), request.overrideMimeType("text/plain; charset=x-user-defined")) : request.setRequestHeader("Accept", this.options.accept), 
            request.setRequestHeader("DataServiceVersion", "2.0"), request.setRequestHeader("MaxDataServiceVersion", "2.0");
        }, ODataAdaptor.prototype.processResponse = function(data, ds, query, xhr, request, changes) {
            if (!isNullOrUndefined(data.d)) {
                var dataCopy = query && query.isCountRequired ? data.d.results : data.d;
                if (!isNullOrUndefined(dataCopy)) for (var i = 0; i < dataCopy.length; i++) isNullOrUndefined(dataCopy[i].__metadata) || delete dataCopy[i].__metadata;
            }
            var pvt = request && request.pvtData, emptyAndBatch = this.processBatchResponse(data, query, xhr, request, changes);
            if (emptyAndBatch) return emptyAndBatch;
            var versionCheck = xhr && request.getResponseHeader("DataServiceVersion"), count = null, version = versionCheck && parseInt(versionCheck, 10) || 2;
            if (query && query.isCountRequired) {
                (data.__count || data["odata.count"]) && (count = data.__count || data["odata.count"]), 
                data.d && (data = data.d), (data.__count || data["odata.count"]) && (count = data.__count || data["odata.count"]);
            }
            3 === version && data.value && (data = data.value), data.d && (data = data.d), version < 3 && data.results && (data = data.results);
            var args = {};
            return args.count = count, args.result = data, this.getAggregateResult(pvt, data, args), 
            DataUtil.isNull(count) ? args.result : {
                result: args.result,
                count: args.count,
                aggregates: args.aggregates
            };
        }, ODataAdaptor.prototype.convertToQueryString = function(request, query, dm) {
            var res = [], tableName = request.table || "";
            delete request.table, dm.dataSource.requiresFormat && (request.$format = "json");
            for (var _i = 0, keys_4 = Object.keys(request); _i < keys_4.length; _i++) {
                var prop = keys_4[_i];
                res.push(prop + "=" + request[prop]);
            }
            return res = res.join("&"), dm.dataSource.url && -1 !== dm.dataSource.url.indexOf("?") && !tableName ? res : res.length ? tableName + "?" + res : tableName || "";
        }, ODataAdaptor.prototype.insert = function(dm, data, tableName) {
            return {
                url: dm.dataSource.url.replace(/\/*$/, tableName ? "/" + tableName : ""),
                data: JSON.stringify(data)
            };
        }, ODataAdaptor.prototype.remove = function(dm, keyField, value, tableName) {
            return {
                type: "DELETE",
                url: dm.dataSource.url.replace(/\/*$/, tableName ? "/" + tableName : "") + "(" + value + ")"
            };
        }, ODataAdaptor.prototype.update = function(dm, keyField, value, tableName) {
            return {
                type: "PUT",
                url: dm.dataSource.url.replace(/\/*$/, tableName ? "/" + tableName : "") + "(" + value[keyField] + ")",
                data: JSON.stringify(value),
                accept: this.options.accept
            };
        }, ODataAdaptor.prototype.batchRequest = function(dm, changes, e) {
            var initialGuid = e.guid = DataUtil.getGuid(this.options.batchPre), url = dm.dataSource.url.replace(/\/*$/, "/" + this.options.batch), args = {
                url: e.url,
                key: e.key,
                cid: 1,
                cSet: DataUtil.getGuid(this.options.changeSet)
            }, req = "--" + initialGuid + "\n";
            return req += "Content-Type: multipart/mixed; boundary=" + args.cSet.replace("--", "") + "\n", 
            this.pvt.changeSet = 0, req += this.generateInsertRequest(changes.addedRecords, args), 
            req += this.generateUpdateRequest(changes.changedRecords, args), req += this.generateDeleteRequest(changes.deletedRecords, args), 
            req += args.cSet + "--\n", req += "--" + initialGuid + "--", {
                type: "POST",
                url: url,
                dataType: "json",
                contentType: "multipart/mixed; charset=UTF-8;boundary=" + initialGuid,
                data: req
            };
        }, ODataAdaptor.prototype.generateDeleteRequest = function(arr, e) {
            if (!arr) return "";
            return this.generateBodyContent(arr, e, {
                method: "DELETE ",
                url: function(data, i, key) {
                    return "(" + data[i][key] + ")";
                },
                data: function(data, i) {
                    return "";
                }
            }) + "\n";
        }, ODataAdaptor.prototype.generateInsertRequest = function(arr, e) {
            if (!arr) return "";
            var stat = {
                method: "POST ",
                url: function(data, i, key) {
                    return "";
                },
                data: function(data, i) {
                    return JSON.stringify(data[i]) + "\n\n";
                }
            };
            return this.generateBodyContent(arr, e, stat);
        }, ODataAdaptor.prototype.generateUpdateRequest = function(arr, e) {
            if (!arr) return "";
            var stat = {
                method: "PUT ",
                url: function(data, i, key) {
                    return "(" + data[i][key] + ")";
                },
                data: function(data, i) {
                    return JSON.stringify(data[i]) + "\n\n";
                }
            };
            return this.generateBodyContent(arr, e, stat);
        }, ODataAdaptor.getField = function(prop) {
            return prop.replace(/\./g, "/");
        }, ODataAdaptor.prototype.generateBodyContent = function(arr, e, stat) {
            for (var req = "", i = 0; i < arr.length; i++) req += "\n" + e.cSet + "\n", req += this.options.changeSetContent + "\n\n", 
            req += stat.method, req += e.url + stat.url(arr, i, e.key) + " HTTP/1.1\n", req += "Accept: " + this.options.accept + "\n", 
            req += "Content-Id: " + this.pvt.changeSet++ + "\n", req += this.options.batchChangeSetContentType + "\n\n", 
            req += stat.data(arr, i);
            return req;
        }, ODataAdaptor.prototype.processBatchResponse = function(data, query, xhr, request, changes) {
            if (xhr && xhr.getResponseHeader("Content-Type") && -1 !== xhr.getResponseHeader("Content-Type").indexOf("xml")) return query.isCountRequired ? {
                result: [],
                count: 0
            } : [];
            if (request && this.options.batch && DataUtil.endsWith(request.url, this.options.batch) && "post" === request.type.toLowerCase()) {
                var guid = xhr.getResponseHeader("Content-Type"), cIdx = void 0, jsonObj = void 0, d = data + "";
                if (guid = guid.substring(guid.indexOf("=batchresponse") + 1), (d = d.split(guid)).length < 2) return {};
                d = d[1];
                var exVal = /(?:\bContent-Type.+boundary=)(changesetresponse.+)/i.exec(d);
                exVal && d.replace(exVal[0], "");
                for (var changeGuid = exVal ? exVal[1] : "", i = (d = d.split(changeGuid)).length; i > -1; i--) /\bContent-ID:/i.test(d[i]) && /\bHTTP.+201/.test(d[i]) && (cIdx = parseInt(/\bContent-ID: (\d+)/i.exec(d[i])[1], 10), 
                changes.addedRecords[cIdx] && (jsonObj = DataUtil.parse.parseJson(/^\{.+\}/m.exec(d[i])[0]), 
                extend({}, changes.addedRecords[cIdx], this.processResponse(jsonObj))));
                return changes;
            }
            return null;
        }, ODataAdaptor;
    }(UrlAdaptor), ODataV4Adaptor = function(_super) {
        function ODataV4Adaptor() {
            var _this = null !== _super && _super.apply(this, arguments) || this;
            return _this.options = extend({}, _this.options, {
                requestType: "get",
                accept: "application/json, text/javascript, */*; q=0.01",
                multipartAccept: "multipart/mixed",
                sortBy: "$orderby",
                select: "$select",
                skip: "$skip",
                take: "$top",
                count: "$count",
                search: "$search",
                where: "$filter",
                expand: "$expand",
                batch: "$batch",
                changeSet: "--changeset_",
                batchPre: "batch_",
                contentId: "Content-Id: ",
                batchContent: "Content-Type: multipart/mixed; boundary=",
                changeSetContent: "Content-Type: application/http\nContent-Transfer-Encoding: binary ",
                batchChangeSetContentType: "Content-Type: application/json; charset=utf-8 "
            }), _this;
        }
        return __extends$8(ODataV4Adaptor, _super), ODataV4Adaptor.prototype.getModulename = function() {
            return "ODataV4Adaptor";
        }, ODataV4Adaptor.prototype.onCount = function(e) {
            return !0 === e ? "true" : "";
        }, ODataV4Adaptor.prototype.onPredicate = function(predicate, query, requiresCast) {
            var returnValue = "", isDate = predicate.value instanceof Date;
            return returnValue = _super.prototype.onPredicate.call(this, predicate, query, requiresCast), 
            isDate && (returnValue = returnValue.replace(/datetime'(.*)'$/, "$1")), returnValue;
        }, ODataV4Adaptor.prototype.onEachSearch = function(e) {
            var search = this.pvt.searches || [];
            search.push(e.key), this.pvt.searches = search;
        }, ODataV4Adaptor.prototype.onSearch = function(e) {
            return this.pvt.searches.join(" OR ");
        }, ODataV4Adaptor.prototype.beforeSend = function(dm, request, settings) {
            request.setRequestHeader("Accept", this.options.accept);
        }, ODataV4Adaptor.prototype.processResponse = function(data, ds, query, xhr, request, changes) {
            var pvt = request && request.pvtData, emptyAndBatch = _super.prototype.processBatchResponse.call(this, data, query, xhr, request, changes);
            if (emptyAndBatch) return emptyAndBatch;
            var count = null;
            query && query.isCountRequired && "@odata.count" in data && (count = data["@odata.count"]), 
            data = data.value;
            var args = {};
            return args.count = count, args.result = data, this.getAggregateResult(pvt, data, args), 
            DataUtil.isNull(count) ? args.result : {
                result: args.result,
                count: count,
                aggregates: args.aggregates
            };
        }, ODataV4Adaptor;
    }(ODataAdaptor), WebApiAdaptor = function(_super) {
        function WebApiAdaptor() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$8(WebApiAdaptor, _super), WebApiAdaptor.prototype.insert = function(dm, data, tableName) {
            return {
                type: "POST",
                url: dm.dataSource.url,
                data: JSON.stringify(data)
            };
        }, WebApiAdaptor.prototype.remove = function(dm, keyField, value, tableName) {
            return {
                type: "DELETE",
                url: dm.dataSource.url + "/" + value,
                data: JSON.stringify(value)
            };
        }, WebApiAdaptor.prototype.update = function(dm, keyField, value, tableName) {
            return {
                type: "PUT",
                url: dm.dataSource.url,
                data: JSON.stringify(value)
            };
        }, WebApiAdaptor.prototype.beforeSend = function(dm, request, settings) {
            request.setRequestHeader("Accept", "application/json, text/javascript, */*; q=0.01");
        }, WebApiAdaptor.prototype.processResponse = function(data, ds, query, xhr, request, changes) {
            var pvt = request && request.pvtData, count = null, args = {};
            if (request && "post" !== request.type.toLowerCase()) {
                var versionCheck = xhr && request.getResponseHeader("DataServiceVersion"), version = versionCheck && parseInt(versionCheck, 10) || 2;
                query && query.isCountRequired && (DataUtil.isNull(data.Count) || (count = data.Count)), 
                version < 3 && data.Items && (data = data.Items), args.count = count, args.result = data, 
                this.getAggregateResult(pvt, data, args);
            }
            return args.result = args.result || data, DataUtil.isNull(count) ? args.result : {
                result: args.result,
                count: args.count,
                aggregates: args.aggregates
            };
        }, WebApiAdaptor;
    }(ODataAdaptor), WebMethodAdaptor = function(_super) {
        function WebMethodAdaptor() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$8(WebMethodAdaptor, _super), WebMethodAdaptor.prototype.processQuery = function(dm, query, hierarchyFilters) {
            var obj = new UrlAdaptor().processQuery(dm, query, hierarchyFilters), data = DataUtil.parse.parseJson(obj.data), result = {};
            if (data.param) for (var i = 0; i < data.param.length; i++) {
                var param = data.param[i], key = Object.keys(param)[0];
                result[key] = param[key];
            }
            result.value = data;
            return {
                data: JSON.stringify(result),
                url: obj.url,
                pvtData: obj.pvtData,
                type: "POST",
                contentType: "application/json; charset=utf-8"
            };
        }, WebMethodAdaptor;
    }(UrlAdaptor), RemoteSaveAdaptor = function(_super) {
        function RemoteSaveAdaptor() {
            var _this = _super.call(this) || this;
            return setValue("beforeSend", UrlAdaptor.prototype.beforeSend, _this), _this;
        }
        return __extends$8(RemoteSaveAdaptor, _super), RemoteSaveAdaptor.prototype.insert = function(dm, data, tableName) {
            return _super.prototype.insert.call(this, dm, data, null, null, 0), {
                url: dm.dataSource.insertUrl || dm.dataSource.crudUrl || dm.dataSource.url,
                data: JSON.stringify({
                    value: data,
                    table: tableName,
                    action: "insert"
                })
            };
        }, RemoteSaveAdaptor.prototype.remove = function(dm, keyField, value, tableName) {
            return _super.prototype.remove.call(this, dm, keyField, value), {
                type: "POST",
                url: dm.dataSource.removeUrl || dm.dataSource.crudUrl || dm.dataSource.url,
                data: JSON.stringify({
                    key: value,
                    keyColumn: keyField,
                    table: tableName,
                    action: "remove"
                })
            };
        }, RemoteSaveAdaptor.prototype.update = function(dm, keyField, value, tableName) {
            return _super.prototype.update.call(this, dm, keyField, value), {
                type: "POST",
                url: dm.dataSource.updateUrl || dm.dataSource.crudUrl || dm.dataSource.url,
                data: JSON.stringify({
                    value: value,
                    action: "update",
                    keyColumn: keyField,
                    key: value[keyField],
                    table: tableName
                })
            };
        }, RemoteSaveAdaptor.prototype.batchRequest = function(dm, changes, e) {
            var i;
            for (i = 0; i < changes.addedRecords.length; i++) JsonAdaptor.prototype.insert(dm, changes.addedRecords[i]);
            for (i = 0; i < changes.changedRecords.length; i++) JsonAdaptor.prototype.update(dm, e.key, changes.changedRecords[i]);
            for (i = 0; i < changes.deletedRecords.length; i++) JsonAdaptor.prototype.remove(dm, e.key, changes.deletedRecords[i]);
            return {
                type: "POST",
                url: dm.dataSource.batchUrl || dm.dataSource.crudUrl || dm.dataSource.url,
                contentType: "application/json; charset=utf-8",
                dataType: "json",
                data: JSON.stringify({
                    changed: changes.changedRecords,
                    added: changes.addedRecords,
                    deleted: changes.deletedRecords,
                    action: "batch",
                    table: e.url,
                    key: e.key
                })
            };
        }, RemoteSaveAdaptor;
    }(JsonAdaptor), CacheAdaptor = function(_super) {
        function CacheAdaptor(adaptor, timeStamp, pageSize) {
            var _this = _super.call(this) || this;
            _this.isCrudAction = !1, _this.isInsertAction = !1, isNullOrUndefined(adaptor) || (_this.cacheAdaptor = adaptor), 
            _this.pageSize = pageSize, _this.guidId = DataUtil.getGuid("cacheAdaptor");
            window.localStorage.setItem(_this.guidId, JSON.stringify({
                keys: [],
                results: []
            }));
            var guid = _this.guidId;
            return isNullOrUndefined(timeStamp) || setInterval(function() {
                var data;
                data = DataUtil.parse.parseJson(window.localStorage.getItem(guid));
                for (var forDel = [], i = 0; i < data.results.length; i++) {
                    var currentTime = +new Date(), requestTime = +new Date(data.results[i].timeStamp);
                    data.results[i].timeStamp = currentTime - requestTime, currentTime - requestTime > timeStamp && forDel.push(i);
                }
                for (i = 0; i < forDel.length; i++) data.results.splice(forDel[i], 1), data.keys.splice(forDel[i], 1);
                window.localStorage.removeItem(guid), window.localStorage.setItem(guid, JSON.stringify(data));
            }, timeStamp), _this;
        }
        return __extends$8(CacheAdaptor, _super), CacheAdaptor.prototype.generateKey = function(url, query) {
            var queries = this.getQueryRequest(query), singles = Query.filterQueryLists(query.queries, [ "onSelect", "onPage", "onSkip", "onTake", "onRange" ]), key = url;
            "onPage" in singles && (key += singles.onPage.pageIndex), queries.sorts.forEach(function(obj) {
                key += obj.e.direction + obj.e.fieldName;
            }), queries.groups.forEach(function(obj) {
                key += obj.e.fieldName;
            }), queries.searches.forEach(function(obj) {
                key += obj.e.searchKey;
            });
            for (var filter = 0; filter < queries.filters.length; filter++) {
                var currentFilter = queries.filters[filter];
                if (currentFilter.e.isComplex) {
                    var newQuery = query.clone();
                    newQuery.queries = [];
                    for (var i = 0; i < currentFilter.e.predicates.length; i++) newQuery.queries.push({
                        fn: "onWhere",
                        e: currentFilter.e.predicates[i],
                        filter: query.queries.filter
                    });
                    key += currentFilter.e.condition + this.generateKey(url, newQuery);
                } else key += currentFilter.e.field + currentFilter.e.operator + currentFilter.e.value;
            }
            return key;
        }, CacheAdaptor.prototype.processQuery = function(dm, query, hierarchyFilters) {
            var cachedItems, key = this.generateKey(dm.dataSource.url, query), data = (cachedItems = DataUtil.parse.parseJson(window.localStorage.getItem(this.guidId))) ? cachedItems.results[cachedItems.keys.indexOf(key)] : null;
            return null == data || this.isCrudAction || this.isInsertAction ? (this.isCrudAction = null, 
            this.isInsertAction = null, this.cacheAdaptor.processQuery.apply(this.cacheAdaptor, [].slice.call(arguments, 0))) : data;
        }, CacheAdaptor.prototype.processResponse = function(data, ds, query, xhr, request, changes) {
            if (this.isInsertAction || request && this.cacheAdaptor.options.batch && DataUtil.endsWith(request.url, this.cacheAdaptor.options.batch) && "post" === request.type.toLowerCase()) return this.cacheAdaptor.processResponse(data, ds, query, xhr, request, changes);
            data = this.cacheAdaptor.processResponse.apply(this.cacheAdaptor, [].slice.call(arguments, 0));
            var key = query ? this.generateKey(ds.dataSource.url, query) : ds.dataSource.url, obj = {}, index = (obj = DataUtil.parse.parseJson(window.localStorage.getItem(this.guidId))).keys.indexOf(key);
            for (-1 !== index && (obj.results.splice(index, 1), obj.keys.splice(index, 1)), 
            obj.results[obj.keys.push(key) - 1] = {
                keys: key,
                result: data.result,
                timeStamp: new Date(),
                count: data.count
            }; obj.results.length > this.pageSize; ) obj.results.splice(0, 1), obj.keys.splice(0, 1);
            return window.localStorage.setItem(this.guidId, JSON.stringify(obj)), data;
        }, CacheAdaptor.prototype.beforeSend = function(dm, request, settings) {
            DataUtil.endsWith(settings.url, this.cacheAdaptor.options.batch) && "post" === settings.type.toLowerCase() && request.setRequestHeader("Accept", this.cacheAdaptor.options.multipartAccept), 
            dm.dataSource.crossDomain || request.setRequestHeader("Accept", this.cacheAdaptor.options.accept);
        }, CacheAdaptor.prototype.update = function(dm, keyField, value, tableName) {
            return this.isCrudAction = !0, this.cacheAdaptor.update(dm, keyField, value, tableName);
        }, CacheAdaptor.prototype.insert = function(dm, data, tableName) {
            return this.isInsertAction = !0, this.cacheAdaptor.insert(dm, data, tableName);
        }, CacheAdaptor.prototype.remove = function(dm, keyField, value, tableName) {
            return this.isCrudAction = !0, this.cacheAdaptor.remove(dm, keyField, value, tableName);
        }, CacheAdaptor.prototype.batchRequest = function(dm, changes, e) {
            return this.cacheAdaptor.batchRequest(dm, changes, e);
        }, CacheAdaptor;
    }(UrlAdaptor), DataManager = function() {
        function DataManager(dataSource, query, adaptor) {
            var _this = this;
            this.dateParse = !0, this.requests = [], dataSource || this.dataSource || (dataSource = []), 
            adaptor = adaptor || dataSource.adaptor;
            var data;
            return dataSource instanceof Array ? data = {
                json: dataSource,
                offline: !0
            } : "object" == typeof dataSource ? (dataSource.json || (dataSource.json = []), 
            data = {
                url: dataSource.url,
                insertUrl: dataSource.insertUrl,
                removeUrl: dataSource.removeUrl,
                updateUrl: dataSource.updateUrl,
                crudUrl: dataSource.crudUrl,
                batchUrl: dataSource.batchUrl,
                json: dataSource.json,
                headers: dataSource.headers,
                accept: dataSource.accept,
                data: dataSource.data,
                timeTillExpiration: dataSource.timeTillExpiration,
                cachingPageSize: dataSource.cachingPageSize,
                enableCaching: dataSource.enableCaching,
                requestType: dataSource.requestType,
                key: dataSource.key,
                crossDomain: dataSource.crossDomain,
                jsonp: dataSource.jsonp,
                dataType: dataSource.dataType,
                offline: void 0 !== dataSource.offline ? dataSource.offline : !(dataSource.adaptor instanceof RemoteSaveAdaptor) && !dataSource.url,
                requiresFormat: dataSource.requiresFormat
            }) : DataUtil.throwError("DataManager: Invalid arguments"), void 0 !== data.requiresFormat || DataUtil.isCors() || (data.requiresFormat = !!isNullOrUndefined(data.crossDomain) || data.crossDomain), 
            void 0 === data.dataType && (data.dataType = "json"), this.dataSource = data, this.defaultQuery = query, 
            data.url && data.offline && !data.json.length ? (this.isDataAvailable = !1, this.adaptor = adaptor || new ODataAdaptor(), 
            this.dataSource.offline = !1, this.ready = this.executeQuery(query || new Query()), 
            this.ready.then(function(e) {
                _this.dataSource.offline = !0, _this.isDataAvailable = !0, data.json = e.result, 
                _this.adaptor = new JsonAdaptor();
            })) : this.adaptor = data.offline ? new JsonAdaptor() : new ODataAdaptor(), !data.jsonp && this.adaptor instanceof ODataAdaptor && (data.jsonp = "callback"), 
            this.adaptor = adaptor || this.adaptor, data.enableCaching && (this.adaptor = new CacheAdaptor(this.adaptor, data.timeTillExpiration, data.cachingPageSize)), 
            this;
        }
        return DataManager.prototype.setDefaultQuery = function(query) {
            return this.defaultQuery = query, this;
        }, DataManager.prototype.executeLocal = function(query) {
            this.defaultQuery || query instanceof Query || DataUtil.throwError("DataManager - executeLocal() : A query is required to execute"), 
            this.dataSource.json || DataUtil.throwError("DataManager - executeLocal() : Json data is required to execute"), 
            query = query || this.defaultQuery;
            var result = this.adaptor.processQuery(this, query);
            if (query.subQuery) {
                var from = query.subQuery.fromTable, lookup = query.subQuery.lookups, res = query.isCountRequired ? result.result : result;
                lookup && lookup instanceof Array && DataUtil.buildHierarchy(query.subQuery.fKey, from, res, lookup, query.subQuery.key);
                for (var j = 0; j < res.length; j++) res[j][from] instanceof Array && (res[j] = extend({}, {}, res[j]), 
                res[j][from] = this.adaptor.processResponse(query.subQuery.using(new DataManager(res[j][from].slice(0))).executeLocal(), this, query));
            }
            return this.adaptor.processResponse(result, this, query);
        }, DataManager.prototype.executeQuery = function(query, done, fail, always) {
            var _this = this;
            "function" == typeof query && (fail, fail = done, done = query, query = null), query || (query = this.defaultQuery), 
            query instanceof Query || DataUtil.throwError("DataManager - executeQuery() : A query is required to execute");
            var deffered = new Deferred(), args = {
                query: query
            };
            if (this.dataSource.offline || void 0 === this.dataSource.url) DataManager.nextTick(function() {
                var res = _this.executeLocal(query);
                args = DataManager.getDeferedArgs(query, res, args), deffered.resolve(args);
            }); else {
                var result = this.adaptor.processQuery(this, query);
                this.makeRequest(result, deffered, args, query);
            }
            return deffered.promise;
        }, DataManager.getDeferedArgs = function(query, result, args) {
            return query.isCountRequired ? (args.result = result.result, args.count = result.count, 
            args.aggregates = result.aggregates) : args.result = result, args;
        }, DataManager.nextTick = function(fn) {
            (window.setImmediate || window.setTimeout)(fn, 0);
        }, DataManager.prototype.extendRequest = function(url, fnSuccess, fnFail) {
            return extend({}, {
                type: "GET",
                dataType: this.dataSource.dataType,
                crossDomain: this.dataSource.crossDomain,
                jsonp: this.dataSource.jsonp,
                cache: !0,
                processData: !1,
                onSuccess: fnSuccess,
                onFailure: fnFail
            }, url);
        }, DataManager.prototype.makeRequest = function(url, deffered, args, query) {
            var _this = this, isSelector = !!query.subQuerySelector, fnFail = function(e) {
                args.error = e, deffered.reject(args);
            }, process = function(data, count, xhr, request, actual, aggregates, virtualSelectRecords) {
                args.xhr = xhr, args.count = count ? parseInt(count.toString(), 10) : 0, args.result = data, 
                args.request = request, args.aggregates = aggregates, args.actual = actual, args.virtualSelectRecords = virtualSelectRecords, 
                deffered.resolve(args);
            }, fnQueryChild = function(data, selector) {
                var subDeffer = new Deferred(), childArgs = {
                    parent: args
                };
                query.subQuery.isChild = !0;
                var subUrl = _this.adaptor.processQuery(_this, query.subQuery, data ? _this.adaptor.processResponse(data) : selector), childReq = _this.makeRequest(subUrl, subDeffer, childArgs, query.subQuery);
                return isSelector || subDeffer.then(function(subData) {
                    data && (DataUtil.buildHierarchy(query.subQuery.fKey, query.subQuery.fromTable, data, subData, query.subQuery.key), 
                    process(data, subData.count, subData.xhr));
                }, fnFail), childReq;
            }, req = this.extendRequest(url, function(data, request) {
                -1 === request.httpRequest.getResponseHeader("Content-Type").indexOf("xml") && _this.dateParse && (data = DataUtil.parse.parseJson(data));
                var result = _this.adaptor.processResponse(data, _this, query, request.httpRequest, request), count = 0, aggregates = null, virtualRecords = data.virtualSelectRecords;
                query.isCountRequired && (count = result.count, aggregates = result.aggregates, 
                result = result.result), query.subQuery ? isSelector || fnQueryChild(result, request) : process(result, count, request.httpRequest, request.type, data, aggregates, virtualRecords);
            }, fnFail), ajax = new Ajax(req);
            if (ajax.beforeSend = function() {
                _this.beforeSend(ajax.httpRequest, ajax);
            }, (req = ajax.send()).catch(function(e) {
                return !0;
            }), this.requests.push(ajax), isSelector) {
                var res = query.subQuerySelector.call(this, {
                    query: query.subQuery,
                    parent: query
                });
                res && res.length ? Promise.all([ req, fnQueryChild(null, res) ]).then(function() {
                    for (var args = [], _i = 0; _i < arguments.length; _i++) args[_i] = arguments[_i];
                    var result = args[0], pResult = _this.adaptor.processResponse(result[0], _this, query, _this.requests[0].httpRequest, _this.requests[0]), count = 0;
                    query.isCountRequired && (count = pResult.count, pResult = pResult.result);
                    var cResult = _this.adaptor.processResponse(result[1], _this, query.subQuery, _this.requests[1].httpRequest, _this.requests[1]);
                    count = 0, query.subQuery.isCountRequired && (count = cResult.count, cResult = cResult.result), 
                    DataUtil.buildHierarchy(query.subQuery.fKey, query.subQuery.fromTable, pResult, cResult, query.subQuery.key), 
                    isSelector = !1, process(pResult, count, _this.requests[0].httpRequest);
                }) : isSelector = !1;
            }
            return req;
        }, DataManager.prototype.beforeSend = function(request, settings) {
            this.adaptor.beforeSend(this, request, settings);
            for (var props, headers = this.dataSource.headers, i = 0; headers && i < headers.length; i++) {
                props = [];
                for (var _i = 0, keys_1 = Object.keys(headers[i]); _i < keys_1.length; _i++) {
                    var prop = keys_1[_i];
                    props.push(prop), request.setRequestHeader(prop, headers[i][prop]);
                }
            }
        }, DataManager.prototype.saveChanges = function(changes, key, tableName, query) {
            var _this = this;
            tableName instanceof Query && (query = tableName, tableName = null);
            var args = {
                url: tableName,
                key: key || this.dataSource.key
            }, req = this.adaptor.batchRequest(this, changes, args, query);
            if (this.dataSource.offline) return req;
            var deff = new Deferred(), ajax = new Ajax(req);
            return ajax.beforeSend = function() {
                _this.beforeSend(ajax.httpRequest, ajax);
            }, ajax.onSuccess = function(data, request) {
                deff.resolve(_this.adaptor.processResponse(DataUtil.parse.parseJson(data), _this, null, request.httpRequest, request, changes));
            }, ajax.onFailure = function(e) {
                deff.reject([ {
                    error: e
                } ]);
            }, ajax.send().catch(function(e) {
                return !0;
            }), deff.promise;
        }, DataManager.prototype.insert = function(data, tableName, query, position) {
            tableName instanceof Query && (query = tableName, tableName = null);
            var req = this.adaptor.insert(this, data, tableName, query, position);
            return this.dataSource.offline ? req : this.doAjaxRequest(req);
        }, DataManager.prototype.remove = function(keyField, value, tableName, query) {
            "object" == typeof value && (value = value[keyField]), tableName instanceof Query && (query = tableName, 
            tableName = null);
            var res = this.adaptor.remove(this, keyField, value, tableName, query);
            return this.dataSource.offline ? res : this.doAjaxRequest(res);
        }, DataManager.prototype.update = function(keyField, value, tableName, query) {
            tableName instanceof Query && (query = tableName, tableName = null);
            var res = this.adaptor.update(this, keyField, value, tableName, query);
            return this.dataSource.offline ? res : this.doAjaxRequest(res);
        }, DataManager.prototype.doAjaxRequest = function(res) {
            var _this = this, defer = new Deferred();
            res = extend({}, {
                type: "POST",
                contentType: "application/json; charset=utf-8",
                processData: !1
            }, res);
            var ajax = new Ajax(res);
            return ajax.beforeSend = function() {
                _this.beforeSend(ajax.httpRequest, ajax);
            }, ajax.onSuccess = function(record, request) {
                try {
                    DataUtil.parse.parseJson(record);
                } catch (e) {
                    record = [];
                }
                record = _this.adaptor.processResponse(DataUtil.parse.parseJson(record), _this, null, request.httpRequest, request), 
                defer.resolve(record);
            }, ajax.onFailure = function(e) {
                defer.reject([ {
                    error: e
                } ]);
            }, ajax.send().catch(function(e) {
                return !0;
            }), defer.promise;
        }, DataManager;
    }(), Deferred = function() {
        return function() {
            var _this = this;
            this.promise = new Promise(function(resolve, reject) {
                _this.resolve = resolve, _this.reject = reject;
            }), this.then = this.promise.then.bind(this.promise), this.catch = this.promise.catch.bind(this.promise);
        };
    }(), _data = Object.freeze({
        DataManager: DataManager,
        Deferred: Deferred,
        Query: Query,
        Predicate: Predicate,
        Adaptor: Adaptor,
        JsonAdaptor: JsonAdaptor,
        UrlAdaptor: UrlAdaptor,
        ODataAdaptor: ODataAdaptor,
        ODataV4Adaptor: ODataV4Adaptor,
        WebApiAdaptor: WebApiAdaptor,
        WebMethodAdaptor: WebMethodAdaptor,
        RemoteSaveAdaptor: RemoteSaveAdaptor,
        CacheAdaptor: CacheAdaptor,
        DataUtil: DataUtil
    }), cssClass = {
        li: "e-list-item",
        ul: "e-list-parent e-ul",
        group: "e-list-group-item",
        icon: "e-list-icon",
        text: "e-list-text",
        check: "e-list-check",
        checked: "e-checked",
        selected: "e-selected",
        expanded: "e-expanded",
        textContent: "e-text-content",
        hasChild: "e-has-child",
        level: "e-level",
        url: "e-list-url",
        collapsible: "e-icon-collapsible",
        disabled: "e-disabled",
        image: "e-list-img",
        iconWrapper: "e-icon-wrapper"
    };
    !function(ListBase) {
        function createListFromArray(dataSource, isSingleLevel, options) {
            return generateUL(createListItemFromArray(dataSource, isSingleLevel, options), null, options);
        }
        function createListItemFromArray(dataSource, isSingleLevel, options) {
            var subChild = [], curOpt = extend({}, defaultListBaseOptions, options);
            cssClass = getModuleClass(curOpt.moduleName);
            for (var id = genUID(), i = 0; i < dataSource.length; i++) if (!isNullOrUndefined(dataSource[i])) {
                var li = void 0;
                if (curOpt.itemCreating && "function" == typeof curOpt.itemCreating) {
                    var curData = {
                        dataSource: dataSource,
                        curData: dataSource[i],
                        text: dataSource[i],
                        options: curOpt
                    };
                    curOpt.itemCreating(curData);
                }
                if (li = isSingleLevel ? generateSingleLevelLI(dataSource[i], null, null, [], null, id, i, options) : generateLI(dataSource[i], null, null, options), 
                curOpt.itemCreated && "function" == typeof curOpt.itemCreated) {
                    curData = {
                        dataSource: dataSource,
                        curData: dataSource[i],
                        text: dataSource[i],
                        item: li,
                        options: curOpt
                    };
                    curOpt.itemCreated(curData);
                }
                subChild.push(li);
            }
            return subChild;
        }
        function createListItemFromJson(dataSource, options, level, isSingleLevel) {
            var curOpt = extend({}, defaultListBaseOptions, options);
            cssClass = getModuleClass(curOpt.moduleName);
            var id, fields = extend({}, ListBase.defaultMappedFields, curOpt.fields), ariaAttributes = extend({}, defaultAriaAttributes, curOpt.ariaAttributes);
            level && (ariaAttributes.level = level);
            var li, child = [];
            Object.keys(dataSource).length && !typeofData(dataSource).item.hasOwnProperty(fields.id) && (id = genUID());
            for (var i = 0; i < dataSource.length; i++) {
                var fieldData = getFieldValues(dataSource[i], fields);
                if (!isNullOrUndefined(dataSource[i])) {
                    if (curOpt.itemCreating && "function" == typeof curOpt.itemCreating) {
                        var curData = {
                            dataSource: dataSource,
                            curData: dataSource[i],
                            text: fieldData[fields.text],
                            options: curOpt,
                            fields: fields
                        };
                        curOpt.itemCreating(curData);
                    }
                    var curItem = dataSource[i];
                    curOpt.itemCreating && "function" == typeof curOpt.itemCreating && (fieldData = getFieldValues(dataSource[i], fields)), 
                    Object.keys(dataSource).length && fieldData.hasOwnProperty(fields.id) && !isNullOrUndefined(fieldData[fields.id]) && (id = fieldData.id);
                    var innerEle = [];
                    if (curOpt.showCheckBox && innerEle.push(createElement("input", {
                        className: cssClass.check,
                        attrs: {
                            type: "checkbox"
                        }
                    })), !0 === isSingleLevel) curOpt.showIcon && fieldData.hasOwnProperty(fields.iconCss) && (isNullOrUndefined(fieldData[fields.iconCss]) || innerEle.push(createElement("span", {
                        className: cssClass.icon + " " + fieldData[fields.iconCss]
                    }))), li = generateSingleLevelLI(curItem, fields, curOpt.itemClass, innerEle, !(!curItem.hasOwnProperty("isHeader") || !curItem.isHeader), id, i, options); else {
                        if ((li = generateLI(curItem, fields, curOpt.itemClass, options)).classList.add(cssClass.level + "-" + ariaAttributes.level), 
                        li.setAttribute("aria-level", ariaAttributes.level.toString()), fieldData.hasOwnProperty(fields.tooltip) && li.setAttribute("title", fieldData[fields.tooltip]), 
                        fieldData.hasOwnProperty(fields.htmlAttributes) && fieldData[fields.htmlAttributes] && setAttribute(li, fieldData[fields.htmlAttributes]), 
                        fieldData.hasOwnProperty(fields.enabled) && !1 === fieldData[fields.enabled] && li.classList.add(cssClass.disabled), 
                        fieldData.hasOwnProperty(fields.isVisible) && !1 === fieldData[fields.isVisible] && (li.style.display = "none"), 
                        fieldData.hasOwnProperty(fields.imageUrl) && !isNullOrUndefined(fieldData[fields.imageUrl])) {
                            var attr = {
                                src: fieldData[fields.imageUrl]
                            };
                            fieldData.hasOwnProperty(fields.imageUrl) && merge(attr, fieldData[fields.imageAttributes]), 
                            prepend([ createElement("img", {
                                className: cssClass.image,
                                attrs: attr
                            }) ], li.firstElementChild);
                        }
                        curOpt.showIcon && fieldData.hasOwnProperty(fields.iconCss) && !curOpt.template && (isNullOrUndefined(fieldData[fields.iconCss]) || prepend([ createElement("div", {
                            className: cssClass.icon + " " + fieldData[fields.iconCss]
                        }) ], li.firstElementChild)), innerEle.length && prepend(innerEle, li.firstElementChild), 
                        function(curItem, fields, ds, options, element, level) {
                            var fieldData = getFieldValues(curItem, fields), subDS = fieldData[fields.child] || [], hasChildren = fieldData[fields.hasChildren];
                            if (subDS.length && (hasChildren = !0, element.classList.add(cssClass.hasChild), 
                            options.processSubChild)) {
                                var subLi = createListFromJson(subDS, options, ++level);
                                element.appendChild(subLi);
                            }
                            if (options.expandCollapse && hasChildren && !options.template) {
                                element.firstElementChild.classList.contains(cssClass.textContent) && element.firstElementChild.classList.add(cssClass.iconWrapper);
                                var expandElement = "Left" === options.expandIconPosition ? prepend : append;
                                expandElement([ createElement("div", {
                                    className: "e-icons " + options.expandIconClass
                                }) ], element.querySelector("." + cssClass.textContent));
                            }
                        }(curItem, fields, 0, curOpt, li, ariaAttributes.level);
                    }
                    if (curOpt.itemCreated && "function" == typeof curOpt.itemCreated) {
                        curData = {
                            dataSource: dataSource,
                            curData: dataSource[i],
                            text: fieldData[fields.text],
                            item: li,
                            options: curOpt,
                            fields: fields
                        };
                        curOpt.itemCreated(curData);
                    }
                    child.push(li);
                }
            }
            return child;
        }
        function createListFromJson(dataSource, options, level, isSingleLevel) {
            var curOpt = extend({}, defaultListBaseOptions, options);
            return generateUL(createListItemFromJson(dataSource, options, level, isSingleLevel), curOpt.listClass, options);
        }
        function indexOf(item, elementArray) {
            if (elementArray && item) {
                return Array.prototype.slice.call(elementArray).indexOf(item);
            }
        }
        function addSorting(sortOrder, sortBy, query) {
            return void 0 === query && (query = new Query()), "Ascending" === sortOrder ? query.sortBy(sortBy, "ascending", !0) : "Descending" === sortOrder && query.sortBy(sortBy, "descending", !0), 
            query;
        }
        function getDataSource(dataSource, query) {
            return new DataManager(dataSource).executeLocal(query);
        }
        function createJsonFromElement(element, options) {
            var curOpt = extend({}, defaultListBaseOptions, options), fields = extend({}, ListBase.defaultMappedFields, curOpt.fields), curEle = element.cloneNode(!0), jsonAr = [];
            curEle.classList.add("json-parent");
            var childs = curEle.querySelectorAll(".json-parent>li");
            curEle.classList.remove("json-parent");
            for (var i = 0; i < childs.length; i++) {
                for (var li = childs[i], anchor = li.querySelector("a"), ul = li.querySelector("ul"), json = {}, childNodes = anchor ? anchor.childNodes : li.childNodes, keys = Object.keys(childNodes), i_1 = 0; i_1 < childNodes.length; i_1++) childNodes[Number(keys[i_1])].hasChildNodes() || (json[fields.text] = childNodes[Number(keys[i_1])].textContent);
                json[fields.id] = genUID();
                var attributes_1 = getAllAttributes(li);
                Object.keys(attributes_1).length && (json[fields.htmlAttributes] = attributes_1), 
                anchor && (attributes_1 = getAllAttributes(anchor), Object.keys(attributes_1).length && (json[fields.urlAttributes] = attributes_1)), 
                ul && (json[fields.child] = createJsonFromElement(ul, options)), jsonAr.push(json);
            }
            return jsonAr;
        }
        function typeofData(data) {
            for (var match = {
                typeof: null,
                item: null
            }, i = 0; i < data.length; i++) if (!isNullOrUndefined(data[i])) return match = {
                typeof: typeof data[i],
                item: data[i]
            };
            return match;
        }
        function setAttribute(element, elementAttributes) {
            var attr = {};
            merge(attr, elementAttributes), attr.class && (addClass([ element ], attr.class.split(" ")), 
            delete attr.class), attributes(element, attr);
        }
        function getAllAttributes(element) {
            for (var attributes$$1 = {}, attr = element.attributes, index = 0; index < attr.length; index++) attributes$$1[attr[index].nodeName] = attr[index].nodeValue;
            return attributes$$1;
        }
        function genUID() {
            return Math.floor(65536 * (1 + Math.random())).toString(16).substring(1);
        }
        function generateSingleLevelLI(item, fields, className, innerElements, grpLI, id, index, options) {
            var dataSource, curOpt = extend({}, defaultListBaseOptions, options), ariaAttributes = extend({}, defaultAriaAttributes, curOpt.ariaAttributes), text = item, value = item, fieldData = getFieldValues(item, fields);
            "string" != typeof item && "number" != typeof item && (dataSource = item, text = "boolean" == typeof fieldData[fields.text] || "number" == typeof fieldData[fields.text] ? fieldData[fields.text] : fieldData[fields.text] || "", 
            value = fieldData[fields.value]);
            var elementID;
            elementID = isNullOrUndefined(dataSource) || isNullOrUndefined(fieldData[fields.id]) || "" === fieldData[fields.id] ? id + "-" + index : id;
            var li = createElement("li", {
                className: (!0 === grpLI ? cssClass.group : cssClass.li) + " " + (isNullOrUndefined(className) ? "" : className),
                id: elementID,
                attrs: "" !== ariaAttributes.groupItemRole && "" !== ariaAttributes.itemRole ? {
                    role: !0 === grpLI ? ariaAttributes.groupItemRole : ariaAttributes.itemRole
                } : {}
            });
            return dataSource && fieldData.hasOwnProperty(fields.enabled) && "false" === fieldData[fields.enabled].toString() && li.classList.add(cssClass.disabled), 
            grpLI ? li.innerText = text : (isNullOrUndefined(value) || li.setAttribute("data-value", value), 
            li.setAttribute("role", "option"), dataSource && fieldData.hasOwnProperty(fields.htmlAttributes) && fieldData[fields.htmlAttributes] && setAttribute(li, fieldData[fields.htmlAttributes]), 
            innerElements.length && append(innerElements, li), dataSource && fieldData.hasOwnProperty(fields.url) && fieldData[fields.url] ? li.appendChild(anchorTag(dataSource, fields, text)) : li.appendChild(document.createTextNode(text))), 
            li;
        }
        function getModuleClass(moduleName) {
            return {
                li: "e-" + moduleName + "-item",
                ul: "e-" + moduleName + "-parent e-ul",
                group: "e-" + moduleName + "-group-item",
                icon: "e-" + moduleName + "-icon",
                text: "e-" + moduleName + "-text",
                check: "e-" + moduleName + "-check",
                checked: "e-checked",
                selected: "e-selected",
                expanded: "e-expanded",
                textContent: "e-text-content",
                hasChild: "e-has-child",
                level: "e-level",
                url: "e-" + moduleName + "-url",
                collapsible: "e-icon-collapsible",
                disabled: "e-disabled",
                image: "e-" + moduleName + "-img",
                iconWrapper: "e-icon-wrapper"
            };
        }
        function anchorTag(dataSource, fields, text) {
            var fieldData = getFieldValues(dataSource, fields), attr = {
                href: fieldData[fields.url]
            };
            fieldData.hasOwnProperty(fields.urlAttributes) && fieldData[fields.urlAttributes] && merge(attr, fieldData[fields.urlAttributes]);
            var anchorTag = createElement("a", {
                className: cssClass.text + " " + cssClass.url,
                innerHTML: text
            });
            return setAttribute(anchorTag, attr), anchorTag;
        }
        function generateLI(item, fields, className, options) {
            var uID, grpLI, dataSource, fieldData, curOpt = extend({}, defaultListBaseOptions, options), ariaAttributes = extend({}, defaultAriaAttributes, curOpt.ariaAttributes), text = item;
            "string" != typeof item && (dataSource = item, text = (fieldData = getFieldValues(item, fields))[fields.text] || "", 
            uID = fieldData[fields.id], grpLI = !(!item.hasOwnProperty("isHeader") || !item.isHeader));
            var li = createElement("li", {
                className: (!0 === grpLI ? cssClass.group : cssClass.li) + " " + (isNullOrUndefined(className) ? "" : className),
                attrs: "" !== ariaAttributes.groupItemRole && "" !== ariaAttributes.itemRole ? {
                    role: !0 === grpLI ? ariaAttributes.groupItemRole : ariaAttributes.itemRole
                } : {}
            });
            if (isNullOrUndefined(uID) ? li.setAttribute("data-uid", genUID()) : li.setAttribute("data-uid", uID), 
            grpLI && options && options.groupTemplate) {
                append(compile$$1(options.groupTemplate)(item), li);
            } else if (!grpLI && options && options.template) {
                append(compile$$1(options.template)(item), li);
            } else {
                var innerDiv = createElement("div", {
                    className: cssClass.textContent,
                    attrs: "" !== ariaAttributes.wrapperRole ? {
                        role: ariaAttributes.wrapperRole
                    } : {}
                });
                dataSource && fieldData.hasOwnProperty(fields.url) && fieldData[fields.url] ? innerDiv.appendChild(anchorTag(dataSource, fields, text)) : innerDiv.appendChild(createElement("span", {
                    className: cssClass.text,
                    innerHTML: text,
                    attrs: "" !== ariaAttributes.itemText ? {
                        role: ariaAttributes.itemText
                    } : {}
                })), li.appendChild(innerDiv);
            }
            return li;
        }
        function generateUL(liElement, className, options) {
            var curOpt = extend({}, defaultListBaseOptions, options), ariaAttributes = extend({}, defaultAriaAttributes, curOpt.ariaAttributes), ulElement = createElement("ul", {
                className: (cssClass = getModuleClass(curOpt.moduleName)).ul + " " + (isNullOrUndefined(className) ? "" : className),
                attrs: "" !== ariaAttributes.listRole ? {
                    role: ariaAttributes.listRole
                } : {}
            });
            return append(liElement, ulElement), ulElement;
        }
        ListBase.defaultMappedFields = {
            id: "id",
            text: "text",
            url: "url",
            value: "value",
            isChecked: "isChecked",
            enabled: "enabled",
            expanded: "expanded",
            selected: "selected",
            iconCss: "iconCss",
            child: "child",
            isVisible: "isVisible",
            hasChildren: "hasChildren",
            tooltip: "tooltip",
            htmlAttributes: "htmlAttributes",
            urlAttributes: "urlAttributes",
            imageAttributes: "imageAttributes",
            imageUrl: "imageUrl",
            groupBy: null
        };
        var defaultAriaAttributes = {
            level: 1,
            listRole: "presentation",
            itemRole: "presentation",
            groupItemRole: "group",
            itemText: "list-item",
            wrapperRole: "presentation"
        }, defaultListBaseOptions = {
            showCheckBox: !1,
            showIcon: !1,
            expandCollapse: !1,
            fields: ListBase.defaultMappedFields,
            ariaAttributes: defaultAriaAttributes,
            listClass: "",
            itemClass: "",
            processSubChild: !1,
            sortOrder: "None",
            template: null,
            groupTemplate: null,
            expandIconClass: "e-icon-collapsible",
            moduleName: "list",
            expandIconPosition: "Right"
        };
        ListBase.createList = function(dataSource, options, isSingleLevel) {
            var curOpt = extend({}, defaultListBaseOptions, options), ariaAttributes = extend({}, defaultAriaAttributes, curOpt.ariaAttributes), type = typeofData(dataSource).typeof;
            return "string" === type || "number" === type ? createListFromArray(dataSource, isSingleLevel, options) : createListFromJson(dataSource, options, ariaAttributes.level, isSingleLevel);
        }, ListBase.createListFromArray = createListFromArray, ListBase.createListItemFromArray = createListItemFromArray, 
        ListBase.createListItemFromJson = createListItemFromJson, ListBase.createListFromJson = createListFromJson, 
        ListBase.getSiblingLI = function(elementArray, element, isPrevious) {
            if (cssClass = getModuleClass(defaultListBaseOptions.moduleName), elementArray && elementArray.length) {
                var siblingLI, liIndex, liCollections = Array.prototype.slice.call(elementArray);
                for (siblingLI = liCollections[(liIndex = element ? indexOf(element, liCollections) : !0 === isPrevious ? liCollections.length : -1) + (!0 === isPrevious ? -1 : 1)]; siblingLI && (!isVisible(siblingLI) || siblingLI.classList.contains(cssClass.disabled)); ) siblingLI = liCollections[liIndex += !0 === isPrevious ? -1 : 1];
                return siblingLI;
            }
        }, ListBase.indexOf = indexOf, ListBase.groupDataSource = function(dataSource, fields, sortOrder) {
            void 0 === sortOrder && (sortOrder = "None");
            var cusQuery = new Query().group(fields.groupBy), ds = getDataSource(dataSource, cusQuery = addSorting(sortOrder, "key", cusQuery));
            dataSource = [];
            for (var j = 0; j < ds.length; j++) {
                var itemObj = ds[j].items, grpItem = {};
                grpItem[fields.text] = ds[j].key, grpItem.isHeader = !0, grpItem.items = itemObj, 
                dataSource.push(grpItem);
                for (var k = 0; k < itemObj.length; k++) dataSource.push(itemObj[k]);
            }
            return dataSource;
        }, ListBase.addSorting = addSorting, ListBase.getDataSource = getDataSource, ListBase.createJsonFromElement = createJsonFromElement, 
        ListBase.renderContentTemplate = function(template, dataSource, fields, options) {
            for (var ulElement = createElement("ul", {
                className: (cssClass = getModuleClass(defaultListBaseOptions.moduleName)).ul,
                attrs: {
                    role: "presentation"
                }
            }), curOpt = extend({}, defaultListBaseOptions, options), compiledString = compile$$1(template), liCollection = [], id = genUID(), i = 0; i < dataSource.length; i++) {
                var fieldData = getFieldValues(dataSource[i], fields), curItem = dataSource[i], isHeader = curItem.isHeader, value = "string" == typeof curItem || "number" == typeof curItem ? curItem : fieldData[fields.value];
                if (curOpt.itemCreating && "function" == typeof curOpt.itemCreating) {
                    var curData = {
                        dataSource: dataSource,
                        curData: curItem,
                        text: value,
                        options: curOpt,
                        fields: fields
                    };
                    curOpt.itemCreating(curData);
                }
                curOpt.itemCreating && "function" == typeof curOpt.itemCreating && (value = (fieldData = getFieldValues(dataSource[i], fields))[fields.value]);
                var li = createElement("li", {
                    id: id + "-" + i,
                    className: isHeader ? cssClass.group : cssClass.li,
                    attrs: {
                        role: "presentation"
                    }
                });
                isHeader ? li.innerText = fieldData[fields.text] : (append(compiledString(curItem), li), 
                li.setAttribute("data-value", value), li.setAttribute("role", "option")), curOpt.itemCreated && "function" == typeof curOpt.itemCreated && (curData = {
                    dataSource: dataSource,
                    curData: curItem,
                    text: value,
                    item: li,
                    options: curOpt,
                    fields: fields
                }, curOpt.itemCreated(curData)), liCollection.push(li);
            }
            return append(liCollection, ulElement), ulElement;
        }, ListBase.renderGroupTemplate = function(groupTemplate, groupDataSource, fields, headerItems) {
            for (var compiledString = compile$$1(groupTemplate), category = fields.groupBy, headerData = {}, _i = 0, headerItems_1 = headerItems; _i < headerItems_1.length; _i++) {
                var header = headerItems_1[_i];
                headerData[category] = header.textContent, header.innerHTML = "", append(compiledString(headerData), header);
            }
            return headerItems;
        }, ListBase.generateUL = generateUL, ListBase.generateIcon = function(liElement, className, options) {
            var curOpt = extend({}, defaultListBaseOptions, options);
            return extend({}, defaultAriaAttributes, curOpt.ariaAttributes), cssClass = getModuleClass(curOpt.moduleName), 
            ("Left" === curOpt.expandIconPosition ? prepend : append)([ createElement("div", {
                className: "e-icons " + curOpt.expandIconClass + " " + (isNullOrUndefined(className) ? "" : className)
            }) ], liElement.querySelector("." + cssClass.textContent)), liElement;
        };
    }(ListBase || (ListBase = {}));
    var __extends$9 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$8 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, effectsConfig = {
        None: [],
        SlideLeft: [ "SlideRightOut", "SlideLeftOut", "SlideLeftIn", "SlideRightIn" ],
        SlideDown: [ "SlideTopOut", "SlideBottomOut", "SlideBottomIn", "SlideTopIn" ],
        Zoom: [ "FadeOut", "FadeZoomOut", "FadeZoomIn", "FadeIn" ],
        Fade: [ "FadeOut", "FadeOut", "FadeIn", "FadeIn" ]
    }, effectsRTLConfig = {
        None: [],
        SlideLeft: [ "SlideLeftOut", "SlideRightOut", "SlideRightIn", "SlideLeftIn" ],
        SlideDown: [ "SlideBottomOut", "SlideTopOut", "SlideTopIn", "SlideBottomIn" ],
        Zoom: [ "FadeZoomOut", "FadeOut", "FadeIn", "FadeZoomIn" ],
        Fade: [ "FadeOut", "FadeOut", "FadeIn", "FadeIn" ]
    }, classNames$__root = "e-listview", classNames$__hover = "e-hover", classNames$__selected = "e-active", classNames$__focused = "e-focused", classNames$__parentItem = "e-list-parent", classNames$__listItem = "e-list-item", classNames$__grpListItem = "e-list-group-item", classNames$__hasChild = "e-has-child", classNames$__header = "e-list-header", classNames$__headerText = "e-headertext", classNames$__text = "e-text", classNames$__disable = "e-disabled", classNames$__content = "e-content", classNames$__icon = "e-icons", classNames$__backIcon = "e-icon-back", classNames$__checkboxWrapper = "e-checkbox-wrapper", classNames$__checkbox = "e-checkbox", classNames$__checked = "e-check", classNames$__checkboxIcon = "e-frame", classNames$__checkboxRight = "e-checkbox-right", classNames$__checkboxLeft = "e-checkbox-left", FieldSettings$1 = function(_super) {
        function FieldSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$9(FieldSettings, _super), __decorate$8([ Property("id") ], FieldSettings.prototype, "id", void 0), 
        __decorate$8([ Property("text") ], FieldSettings.prototype, "text", void 0), __decorate$8([ Property("isChecked") ], FieldSettings.prototype, "isChecked", void 0), 
        __decorate$8([ Property("isVisible") ], FieldSettings.prototype, "isVisible", void 0), 
        __decorate$8([ Property("enabled") ], FieldSettings.prototype, "enabled", void 0), 
        __decorate$8([ Property("iconCss") ], FieldSettings.prototype, "iconCss", void 0), 
        __decorate$8([ Property("child") ], FieldSettings.prototype, "child", void 0), __decorate$8([ Property("tooltip") ], FieldSettings.prototype, "tooltip", void 0), 
        __decorate$8([ Property("groupBy") ], FieldSettings.prototype, "groupBy", void 0), 
        __decorate$8([ Property("text") ], FieldSettings.prototype, "sortBy", void 0), __decorate$8([ Property("htmlAttributes") ], FieldSettings.prototype, "htmlAttributes", void 0), 
        __decorate$8([ Property("tableName") ], FieldSettings.prototype, "tableName", void 0), 
        FieldSettings;
    }(ChildProperty), ListView = function(_super) {
        function ListView(options, element) {
            var _this = _super.call(this, options, element) || this;
            return _this.curDSLevel = [], _this.curViewDS = [], _this.keyConfigs = {
                moveDown: "downarrow",
                moveUp: "uparrow",
                back: "backspace",
                home: "home",
                select: "enter",
                end: "end",
                tab: "tab",
                space: "space"
            }, _this.animateOptions = {}, _this.isNestedList = !1, _this.currentLiElements = [], 
            _this.resetList = !1, _this.selectedData = [], _this.selectedId = [], _this.aniObj = new Animation(_this.animateOptions), 
            _this;
        }
        return __extends$9(ListView, _super), ListView.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "htmlAttributes":
                    this.setHTMLAttribute();
                    break;

                  case "cssClass":
                    this.setCSSClass(oldProp.cssClass);
                    break;

                  case "enable":
                    this.setEnable();
                    break;

                  case "width":
                  case "height":
                    this.setSize();
                    break;

                  case "enableRtl":
                    this.setEnableRTL();
                    break;

                  case "fields":
                    this.listBaseOption.fields = this.fields.properties, this.reRender();
                    break;

                  case "headerTitle":
                    this.curDSLevel.length || this.header(this.headerTitle, !1);
                    break;

                  case "showHeader":
                    this.header(this.headerTitle, !1);
                    break;

                  case "showCheckBox":
                  case "checkBoxPosition":
                    this.setCheckbox();
                    break;

                  case "dataSource":
                    this.reRender();
                    break;

                  case "sortOrder":
                  case "showIcon":
                    this.listBaseOption.showIcon = this.showIcon, this.curViewDS = this.getSubDS(), 
                    this.resetCurrentList();
                }
            }
        }, ListView.prototype.setHTMLAttribute = function() {
            Object.keys(this.htmlAttributes).length && attributes(this.element, this.htmlAttributes);
        }, ListView.prototype.setCSSClass = function(oldCSSClass) {
            this.cssClass && addClass([ this.element ], this.cssClass.split(" ")), oldCSSClass && removeClass([ this.element ], oldCSSClass.split(" "));
        }, ListView.prototype.setSize = function() {
            this.element.style.height = formatUnit(this.height), this.element.style.width = formatUnit(this.width);
        }, ListView.prototype.setEnable = function() {
            this.enableElement(this.element, this.enable);
        }, ListView.prototype.setEnableRTL = function() {
            this.enableRtl ? this.element.classList.add("e-rtl") : this.element.classList.remove("e-rtl");
        }, ListView.prototype.enableElement = function(element, isEnabled) {
            isEnabled ? element.classList.remove(classNames$__disable) : element.classList.add(classNames$__disable);
        }, ListView.prototype.header = function(text, showBack) {
            if (void 0 === this.headerEle && this.showHeader) {
                this.headerEle = createElement("div", {
                    className: classNames$__header
                });
                var innerHeaderEle = createElement("span", {
                    className: classNames$__headerText,
                    innerHTML: this.headerTitle
                }), textEle = createElement("div", {
                    className: classNames$__text,
                    innerHTML: innerHeaderEle.outerHTML
                }), hedBackButton = createElement("div", {
                    className: classNames$__icon + " " + classNames$__backIcon + " e-but-back",
                    attrs: {
                        style: "display:none;"
                    }
                });
                this.headerEle.appendChild(hedBackButton), this.headerEle.appendChild(textEle), 
                this.element.classList.add("e-has-header"), prepend([ this.headerEle ], this.element);
            } else if (this.headerEle) if (this.showHeader) {
                this.headerEle.style.display = "";
                textEle = this.headerEle.querySelector("." + classNames$__headerText), hedBackButton = this.headerEle.querySelector("." + classNames$__backIcon);
                textEle.innerHTML = text, hedBackButton.style.display = !0 === showBack ? "" : "none";
            } else this.headerEle.style.display = "none";
        }, ListView.prototype.switchView = function(fromView, toView, reverse) {
            var _this = this;
            if (fromView && toView) {
                var fPos_1 = fromView.style.position, overflow_1 = "hidden" !== this.element.style.overflow ? this.element.style.overflow : "";
                fromView.style.position = "absolute", fromView.classList.add("e-view");
                var anim = void 0, duration = this.animation.duration;
                if (this.animation.effect) anim = this.enableRtl ? effectsRTLConfig[this.animation.effect] : effectsConfig[this.animation.effect]; else {
                    anim = effectsConfig.SlideLeft, reverse = this.enableRtl, duration = 0;
                }
                this.element.style.overflow = "hidden", this.aniObj.animate(fromView, {
                    name: !0 === reverse ? anim[0] : anim[1],
                    duration: duration,
                    timingFunction: this.animation.easing,
                    end: function(model) {
                        fromView.style.display = "none", _this.element.style.overflow = overflow_1, fromView.style.position = fPos_1, 
                        fromView.classList.remove("e-view");
                    }
                }), toView.style.display = "", this.aniObj.animate(toView, {
                    name: !0 === reverse ? anim[2] : anim[3],
                    duration: duration,
                    timingFunction: this.animation.easing,
                    end: function() {
                        _this.trigger("actionComplete");
                    }
                }), this.curUL = toView;
            }
        }, ListView.prototype.preRender = function() {
            this.listBaseOption = {
                template: this.template,
                groupTemplate: this.groupTemplate,
                expandCollapse: !0,
                listClass: "",
                ariaAttributes: {
                    itemRole: "listitem",
                    listRole: "list",
                    itemText: "",
                    groupItemRole: "group",
                    wrapperRole: "presentation"
                },
                fields: this.fields.properties,
                sortOrder: this.sortOrder,
                showIcon: this.showIcon,
                itemCreated: this.renderCheckbox.bind(this)
            };
        }, ListView.prototype.renderCheckbox = function(args) {
            if (this.showCheckBox && this.isValidLI(args.item) && !this.isNestedList) if (args.item.classList.contains(classNames$__hasChild)) this.checkboxRevert(); else {
                var checkboxElement = void 0, fieldData = void 0;
                (checkboxElement = createCheckBox(!1, {
                    checked: !1,
                    enableRtl: this.enableRtl
                })).setAttribute("role", "checkbox");
                var frameElement_1 = checkboxElement.querySelector("." + classNames$__checkboxIcon);
                args.item.classList.add("e-checklist"), args.item.firstElementChild.classList.add(classNames$__checkbox), 
                "string" != typeof this.dataSource[0] ? (fieldData = getFieldValues(args.curData, this.listBaseOption.fields), 
                !this.resetList && fieldData[this.listBaseOption.fields.isChecked] ? this.checkItem(args, checkboxElement) : -1 !== this.selectedData.indexOf(fieldData[this.listBaseOption.fields.text]) && -1 !== this.selectedId.indexOf(fieldData[this.listBaseOption.fields.id]) && this.checkItem(args, checkboxElement)) : "string" == typeof this.dataSource[0] && -1 !== this.selectedData.indexOf(args.text) && this.checkItem(args, checkboxElement), 
                checkboxElement.setAttribute("aria-checked", frameElement_1.classList.contains(classNames$__checked) ? "true" : "false"), 
                "Left" === this.checkBoxPosition ? (checkboxElement.classList.add(classNames$__checkboxLeft), 
                args.item.firstElementChild.insertBefore(checkboxElement, args.item.firstElementChild.childNodes[0])) : (checkboxElement.classList.add(classNames$__checkboxRight), 
                args.item.firstElementChild.appendChild(checkboxElement)), this.currentLiElements.push(args.item);
            }
        }, ListView.prototype.checkItem = function(args, checkboxElement) {
            args.item.classList.add(classNames$__selected), checkboxElement.querySelector("." + classNames$__checkboxIcon).classList.add(classNames$__checked), 
            checkboxElement.setAttribute("aria-checked", "true");
        }, ListView.prototype.checkboxRevert = function() {
            this.isNestedList = !0, this.setProperties({
                showCheckBox: !1
            }, !0);
            for (var i = 0; i < this.currentLiElements.length; i++) this.currentLiElements[i].querySelector("." + classNames$__checkboxWrapper) && (this.currentLiElements[i].firstElementChild.classList.remove(classNames$__checkbox), 
            this.removeElement(this.currentLiElements[i].firstElementChild.firstElementChild));
        }, ListView.prototype.setCheckbox = function() {
            var _this = this;
            if (this.showCheckBox && !this.curUL.querySelector("." + classNames$__hasChild)) {
                var args_1 = {
                    item: void 0,
                    curData: void 0,
                    dataSource: void 0,
                    fields: void 0,
                    options: void 0,
                    text: ""
                };
                this.liCollection.forEach(function(element) {
                    args_1.item = element, args_1.curData = _this.getItemData(element), element.querySelector("." + classNames$__checkboxWrapper) && _this.removeElement(element.querySelector("." + classNames$__checkboxWrapper)), 
                    _this.renderCheckbox(args_1);
                });
            } else this.liCollection.forEach(function(element) {
                element.firstElementChild.classList.remove(classNames$__checkbox), element.querySelector("." + classNames$__checkboxWrapper) && _this.removeElement(element.querySelector("." + classNames$__checkboxWrapper));
            });
        }, ListView.prototype.clickHandler = function(e) {
            var target = e.target, classList$$1 = target.classList;
            if (classList$$1.contains(classNames$__backIcon) || classList$$1.contains(classNames$__headerText)) this.back(); else {
                var li = closest(target.parentNode, "." + classNames$__listItem);
                null === li && (li = target), this.enable && this.showCheckBox && this.isValidLI(li) ? this.setCheckboxLI(li, e) : this.setSelectLI(li, e);
            }
        }, ListView.prototype.removeElement = function(element) {
            return element && element.parentNode && element.parentNode.removeChild(element);
        }, ListView.prototype.hoverHandler = function(e) {
            var curLi = closest(e.target.parentNode, "." + classNames$__listItem);
            this.setHoverLI(curLi);
        }, ListView.prototype.leaveHandler = function(e) {
            this.removeHover();
        }, ListView.prototype.homeKeyHandler = function(e, end) {
            var li = this.curUL.querySelectorAll("." + classNames$__listItem), focusedElement = this.curUL.querySelector("." + classNames$__focused) || this.curUL.querySelector("." + classNames$__selected);
            focusedElement && (focusedElement.classList.remove(classNames$__focused), this.showCheckBox || focusedElement.classList.remove(classNames$__selected));
            var index = end ? li.length - 1 : 0;
            li[index].classList.contains(classNames$__hasChild) || this.showCheckBox ? li[index].classList.add(classNames$__focused) : this.setSelectLI(li[index], e);
        }, ListView.prototype.arrowKeyHandler = function(e, prev) {
            var siblingLI, li;
            !isNullOrUndefined(this.curUL.querySelector("." + classNames$__hasChild)) || this.showCheckBox ? (li = this.curUL.querySelector("." + classNames$__focused) || this.curUL.querySelector("." + classNames$__selected), 
            isNullOrUndefined(siblingLI = ListBase.getSiblingLI(this.curUL.querySelectorAll("." + classNames$__listItem), li, prev)) || (li && (li.classList.remove(classNames$__focused), 
            this.showCheckBox || li.classList.remove(classNames$__selected)), siblingLI.classList.contains(classNames$__hasChild) || this.showCheckBox ? siblingLI.classList.add(classNames$__focused) : this.setSelectLI(siblingLI, e))) : (li = this.curUL.querySelector("." + classNames$__selected), 
            siblingLI = ListBase.getSiblingLI(this.curUL.querySelectorAll("." + classNames$__listItem), li, prev), 
            this.setSelectLI(siblingLI, e));
        }, ListView.prototype.enterKeyHandler = function(e) {
            var hasChild = !isNullOrUndefined(this.curUL.querySelector("." + classNames$__hasChild)), li = this.curUL.querySelector("." + classNames$__focused);
            hasChild && li && (li.classList.remove(classNames$__focused), this.setSelectLI(li, e));
        }, ListView.prototype.spaceKeyHandler = function(e) {
            if (this.enable && this.showCheckBox) {
                var li = this.curUL.querySelector("." + classNames$__focused);
                this.setCheckboxLI(li, e);
            }
        }, ListView.prototype.keyActionHandler = function(e) {
            switch (e.preventDefault(), e.action) {
              case "home":
                this.homeKeyHandler(e);
                break;

              case "end":
                this.homeKeyHandler(e, !0);
                break;

              case "moveDown":
                this.arrowKeyHandler(e);
                break;

              case "moveUp":
                this.arrowKeyHandler(e, !0);
                break;

              case "select":
                this.enterKeyHandler(e);
                break;

              case "back":
                this.back();
                break;

              case "tab":
                this.tabFocus(e);
                break;

              case "space":
                this.spaceKeyHandler(e);
            }
        }, ListView.prototype.swipeActionHandler = function(e) {
            "Right" === e.swipeDirection && this.back();
        }, ListView.prototype.focusout = function() {
            var focusedElement = this.curUL.querySelector("." + classNames$__focused), activeElement = this.curUL.querySelector("[aria-selected = true]");
            focusedElement && !this.showCheckBox && (focusedElement.classList.remove(classNames$__focused), 
            activeElement && activeElement.classList.add(classNames$__selected));
        }, ListView.prototype.wireEvents = function() {
            EventHandler.add(this.element, "click", this.clickHandler, this), EventHandler.add(this.element, "mouseover", this.hoverHandler, this), 
            EventHandler.add(this.element, "mouseout", this.leaveHandler, this), EventHandler.add(this.element, "focusout", this.focusout, this), 
            this.keyboardModule = new KeyboardEvents(this.element, {
                keyAction: this.keyActionHandler.bind(this),
                keyConfigs: this.keyConfigs
            }), this.touchModule = new Touch(this.element, {
                swipe: this.swipeActionHandler.bind(this)
            });
        }, ListView.prototype.unWireEvents = function() {
            EventHandler.remove(this.element, "click", this.clickHandler), EventHandler.remove(this.element, "mouseover", this.hoverHandler), 
            EventHandler.remove(this.element, "mouseout", this.leaveHandler), this.keyboardModule.destroy(), 
            this.touchModule.destroy();
        }, ListView.prototype.tabFocus = function(e) {
            if (!this.curUL.querySelector("." + classNames$__selected) && this.curUL || this.showCheckBox) {
                var li = this.curUL.querySelector("." + classNames$__listItem);
                if (li.classList.contains(classNames$__hasChild) || this.showCheckBox) {
                    isNullOrUndefined(this.curUL.querySelector("." + classNames$__focused)) && li.classList.add(classNames$__focused);
                } else this.setSelectLI(li, e);
            }
        }, ListView.prototype.removeHover = function() {
            var hoverLI = this.element.querySelector("." + classNames$__hover);
            hoverLI && hoverLI.classList.remove(classNames$__hover);
        }, ListView.prototype.removeSelect = function() {
            for (var _i = 0, selectedLI_1 = this.element.querySelectorAll("[aria-selected = true]"); _i < selectedLI_1.length; _i++) {
                var ele = selectedLI_1[_i];
                ele.removeAttribute("aria-selected"), "" !== ele.className && ele.classList.remove(classNames$__selected);
            }
        }, ListView.prototype.isValidLI = function(li) {
            return li && li.classList.contains(classNames$__listItem) && !li.classList.contains(classNames$__grpListItem) && !li.classList.contains(classNames$__disable);
        }, ListView.prototype.setCheckboxLI = function(li, e) {
            if (this.isValidLI(li) && this.enable && this.showCheckBox) {
                this.curUL.querySelector("." + classNames$__focused) && this.curUL.querySelector("." + classNames$__focused).classList.remove(classNames$__focused), 
                li.classList.add(classNames$__focused);
                var checkboxElement = li.querySelector("." + classNames$__checkboxWrapper), checkIcon = checkboxElement.querySelector("." + classNames$__checkboxIcon + "." + classNames$__icon);
                if (this.removeHover(), checkIcon.classList.contains(classNames$__checked) ? (checkIcon.classList.remove(classNames$__checked), 
                li.classList.remove(classNames$__selected)) : (checkIcon.classList.add(classNames$__checked), 
                li.classList.add(classNames$__selected)), checkboxElement.setAttribute("aria-checked", checkIcon.classList.contains(classNames$__checked) ? "true" : "false"), 
                e) {
                    var eventArgs = this.selectEventData(li, e);
                    merge(eventArgs, {
                        isChecked: checkIcon.classList.contains(classNames$__checked)
                    }), this.trigger("select", eventArgs);
                }
            }
        }, ListView.prototype.selectEventData = function(li, e) {
            var data = this.getItemData(li), fieldData = getFieldValues(data, this.listBaseOption.fields), eventArgs = {};
            return merge(eventArgs, isNullOrUndefined(data) && "string" == typeof this.dataSource[0] ? {
                item: li,
                text: li.innerText.trim(),
                data: this.dataSource
            } : {
                item: li,
                text: fieldData[this.listBaseOption.fields.text],
                data: data
            }), e && merge(eventArgs, {
                isInteracted: !0,
                event: e,
                index: Array.prototype.indexOf.call(this.curUL.children, li)
            }), eventArgs;
        }, ListView.prototype.setSelectLI = function(li, e) {
            if (this.isValidLI(li) && !li.classList.contains(classNames$__selected) && this.enable) {
                this.removeSelect(), li.classList.add(classNames$__selected), li.setAttribute("aria-selected", "true"), 
                this.removeHover();
                var eventArgs = this.selectEventData(li, e);
                this.trigger("select", eventArgs), this.selectedLI = li, this.renderSubList(li);
            }
        }, ListView.prototype.setHoverLI = function(li) {
            if (this.isValidLI(li) && !li.classList.contains(classNames$__hover) && this.enable) {
                var lastLi = this.element.querySelectorAll("." + classNames$__hover);
                lastLi && lastLi.length && removeClass(lastLi, classNames$__hover), li.classList.contains(classNames$__selected) && !this.showCheckBox || li.classList.add(classNames$__hover);
            }
        }, ListView.prototype.hoverSiblingLI = function(prev) {
            var siblingLI, lastLi = this.curUL.querySelector("." + classNames$__hover);
            if (lastLi || (lastLi = this.curUL.querySelector("." + classNames$__selected)), 
            lastLi) siblingLI = ListBase.getSiblingLI(this.curUL.querySelectorAll("." + classNames$__listItem), lastLi, prev); else if (prev) {
                var curLIs = this.curUL.querySelectorAll("." + classNames$__listItem);
                siblingLI = curLIs[curLIs.length - 1];
            } else siblingLI = this.curUL.querySelector("." + classNames$__listItem);
            this.setHoverLI(siblingLI);
        }, ListView.prototype.getSubDS = function() {
            var levelKeys = this.curDSLevel;
            if (levelKeys.length) {
                for (var ds = this.localData, _i = 0, levelKeys_1 = levelKeys; _i < levelKeys_1.length; _i++) {
                    var key = levelKeys_1[_i];
                    this.curDSJSON = this.findItemFromDS(ds, {
                        id: key
                    });
                    var fieldData = getFieldValues(this.curDSJSON, this.listBaseOption.fields);
                    ds = this.curDSJSON ? fieldData[this.fields.child] : ds;
                }
                return ds;
            }
            return this.localData;
        }, ListView.prototype.getItemData = function(li) {
            var fields = this.getElementUID(li), curDS = this.dataSource;
            return this.findItemFromDS(curDS, fields);
        }, ListView.prototype.findItemFromDS = function(dataSource, fields, parent) {
            var resultJSON, _this = this;
            return dataSource && dataSource.length && fields ? dataSource.some(function(data) {
                var fieldData = getFieldValues(data, _this.listBaseOption.fields);
                if (!fields.id && !fields.text || fields.id && fieldData[_this.fields.id] !== fields.id || fields.text && fieldData[_this.fields.text] !== fields.text) if (!isNullOrUndefined(fields.id) && isNullOrUndefined(fieldData[_this.fields.id])) {
                    _this.element.querySelector('[data-uid="' + fields.id + '"]').innerText.trim() === fieldData[_this.fields.text] && (resultJSON = data);
                } else fieldData.hasOwnProperty(_this.fields.child) && fieldData[_this.fields.child].length && (resultJSON = _this.findItemFromDS(fieldData[_this.fields.child], fields, parent)); else resultJSON = parent ? dataSource : data;
                return !!resultJSON;
            }) : resultJSON = dataSource, resultJSON;
        }, ListView.prototype.getQuery = function() {
            var columns = [], query = this.query ? this.query : new Query();
            if (!this.query) {
                for (var _i = 0, _a = Object.keys(this.fields.properties); _i < _a.length; _i++) {
                    var column = _a[_i];
                    "tableName" !== column && this.fields[column] && this.fields[column] !== ListBase.defaultMappedFields[column] && -1 === columns.indexOf(this.fields[column]) && columns.push(this.fields[column]);
                }
                query.select(columns), this.fields.properties.hasOwnProperty("tableName") && query.from(this.fields.tableName);
            }
            return query;
        }, ListView.prototype.setViewDataSource = function(dataSource) {
            void 0 === dataSource && (dataSource = this.localData), dataSource && this.fields.groupBy ? this.curViewDS = ListBase.groupDataSource(dataSource, this.fields, this.sortOrder) : dataSource && "None" !== this.sortOrder ? this.curViewDS = ListBase.getDataSource(dataSource, ListBase.addSorting(this.sortOrder, this.fields.sortBy)) : this.curViewDS = dataSource;
        }, ListView.prototype.isInAnimation = function() {
            return this.curUL.classList.contains(".e-animate");
        }, ListView.prototype.setLocalData = function() {
            var _this = this;
            if (this.trigger("actionBegin"), this.dataSource instanceof DataManager) this.dataSource.executeQuery(this.getQuery()).then(function(e) {
                _this.isDestroyed || (_this.localData = e.result, _this.renderList(), _this.trigger("actionComplete", e));
            }).catch(function(e) {
                _this.isDestroyed || _this.trigger("actionFailure", e);
            }); else if (this.dataSource && this.dataSource.length) this.localData = this.dataSource, 
            this.renderList(), this.trigger("actionComplete", {
                data: this.localData
            }); else {
                var ul = this.element.querySelector("ul");
                ul && (remove(ul), this.setProperties({
                    dataSource: ListBase.createJsonFromElement(ul)
                }, !0), this.localData = this.dataSource, this.renderList(), this.trigger("actionComplete", {
                    data: this.localData
                }));
            }
        }, ListView.prototype.reRender = function() {
            this.element.innerHTML = "", this.curUL = this.headerEle = void 0, this.setLocalData(), 
            this.header();
        }, ListView.prototype.resetCurrentList = function() {
            this.setViewDataSource(this.curViewDS), this.contentContainer.innerHTML = "", this.createList(), 
            this.renderIntoDom(this.curUL);
        }, ListView.prototype.createList = function() {
            this.currentLiElements = [], this.ulElement = this.curUL = ListBase.createList(this.curViewDS, this.listBaseOption), 
            this.liCollection = this.curUL.querySelectorAll("." + classNames$__listItem);
        }, ListView.prototype.renderSubList = function(li) {
            var uID = li.getAttribute("data-uid");
            if (li.classList.contains(classNames$__hasChild) && uID) {
                var ul = closest(li.parentNode, "." + classNames$__parentItem), ele = this.element.querySelector("[pid='" + uID + "']");
                this.curDSLevel.push(uID), this.setViewDataSource(this.getSubDS()), ele || ((ele = ListBase.createListFromJson(this.curViewDS, this.listBaseOption, this.curDSLevel.length)).setAttribute("pID", uID), 
                ele.style.display = "none", this.renderIntoDom(ele)), this.switchView(ul, ele), 
                this.liCollection = this.curUL.querySelectorAll("." + classNames$__listItem);
                var fieldData = getFieldValues(this.getSelectedItems().data, this.listBaseOption.fields);
                this.header(fieldData[this.listBaseOption.fields.text], !0), this.selectedLI = void 0;
            }
        }, ListView.prototype.renderIntoDom = function(ele) {
            this.contentContainer.appendChild(ele);
        }, ListView.prototype.renderList = function() {
            this.setViewDataSource(), this.createList(), this.contentContainer = createElement("div", {
                className: classNames$__content
            }), this.element.appendChild(this.contentContainer), this.renderIntoDom(this.ulElement);
        }, ListView.prototype.getElementUID = function(obj) {
            var fields = {};
            return obj instanceof Element ? fields.id = obj.getAttribute("data-uid") : fields = obj, 
            fields;
        }, ListView.prototype.render = function() {
            this.element.classList.add(classNames$__root), attributes(this.element, {
                role: "list",
                tabindex: "0"
            }), this.setCSSClass(), this.setEnableRTL(), this.setEnable(), this.setSize(), this.wireEvents(), 
            this.header(), this.setLocalData(), this.setHTMLAttribute(), this.rippleFn = rippleEffect(this.element, {
                selector: "." + classNames$__listItem
            });
        }, ListView.prototype.destroy = function() {
            this.unWireEvents();
            var classAr = [ classNames$__root, this.cssClass, classNames$__disable, "e-rtl", "e-has-header" ];
            removeClass([ this.element ], classAr), this.rippleFn(), _super.prototype.destroy.call(this);
        }, ListView.prototype.back = function() {
            var pID = this.curDSLevel[this.curDSLevel.length - 1];
            if (void 0 !== pID && !this.isInAnimation()) {
                this.curDSLevel.pop(), this.setViewDataSource(this.getSubDS());
                var toUL = this.element.querySelector("[data-uid='" + pID + "']"), fromUL = this.curUL;
                toUL ? toUL = toUL.parentElement : (this.createList(), this.renderIntoDom(this.ulElement), 
                toUL = this.curUL);
                var text = getFieldValues(this.curDSJSON, this.listBaseOption.fields)[this.fields.text];
                this.switchView(fromUL, toUL, !0), this.removeSelect(), this.liCollection = this.curUL.querySelectorAll("." + classNames$__listItem), 
                this.header(this.curDSLevel.length ? text : this.headerTitle, !!this.curDSLevel.length);
            }
        }, ListView.prototype.selectItem = function(obj) {
            isNullOrUndefined(obj) || (this.showCheckBox ? this.setCheckboxLI(this.getLiFromObjOrElement(obj)) : this.setSelectLI(this.getLiFromObjOrElement(obj)));
        }, ListView.prototype.getLiFromObjOrElement = function(obj) {
            var li;
            if (!isNullOrUndefined(obj)) if ("string" == typeof this.dataSource[0]) {
                for (var uid = obj.getAttribute("data-uid").toString(), i = 0; i < this.liCollection.length; i++) if (this.liCollection[i].getAttribute("data-uid").toString() === uid) {
                    li = this.liCollection[i];
                    break;
                }
            } else {
                var resultJSON = this.getItemData(obj), fieldData = getFieldValues(resultJSON, this.listBaseOption.fields);
                if (resultJSON && (li = this.element.querySelector('[data-uid="' + fieldData[this.fields.id] + '"]'), 
                isNullOrUndefined(li))) {
                    var curLi = this.element.querySelectorAll("." + classNames$__listItem);
                    for (i = 0; i < curLi.length; i++) curLi[i].innerText.trim() === resultJSON.text && (li = curLi[i]);
                }
            }
            return li;
        }, ListView.prototype.selectMultipleItems = function(obj) {
            if (!isNullOrUndefined(obj)) for (var i = 0; i < obj.length; i++) isNullOrUndefined(obj[i]) || this.selectItem(obj[i]);
        }, ListView.prototype.getSelectedItems = function() {
            if (this.selectedId = [], this.showCheckBox) {
                var liCollection = this.element.getElementsByClassName(classNames$__selected), liTextCollection = [], liDataCollection = [];
                this.selectedId = [];
                for (var i = 0; i < liCollection.length; i++) if ("string" == typeof this.dataSource[0]) liTextCollection.push(liCollection[i].innerText.trim()); else {
                    var fieldData = getFieldValues(this.getItemData(liCollection[i]), this.listBaseOption.fields);
                    liTextCollection.push(fieldData[this.listBaseOption.fields.text]), liDataCollection.push(this.getItemData(liCollection[i])), 
                    this.selectedId.push(fieldData[this.listBaseOption.fields.id]);
                }
                return "string" == typeof this.dataSource[0] ? {
                    item: liCollection,
                    data: this.dataSource,
                    text: liTextCollection
                } : {
                    item: liCollection,
                    data: liDataCollection,
                    text: liTextCollection
                };
            }
            var liElement = this.element.getElementsByClassName(classNames$__selected)[0];
            fieldData = getFieldValues(this.getItemData(liElement), this.listBaseOption.fields);
            return "string" == typeof this.dataSource[0] ? isNullOrUndefined(liElement) ? void 0 : {
                item: liElement,
                data: this.dataSource,
                text: liElement.innerText.trim()
            } : isNullOrUndefined(fieldData) || isNullOrUndefined(liElement) ? void 0 : (this.selectedId.push(fieldData[this.listBaseOption.fields.id]), 
            {
                text: fieldData[this.listBaseOption.fields.text],
                item: liElement,
                data: this.getItemData(liElement)
            });
        }, ListView.prototype.findItem = function(fields) {
            return this.findItemFromDS(this.dataSource, fields);
        }, ListView.prototype.enableItem = function(obj) {
            this.setItemState(obj, !0);
        }, ListView.prototype.disableItem = function(obj) {
            this.setItemState(obj, !1);
        }, ListView.prototype.setItemState = function(obj, isEnable) {
            var resultJSON = this.getItemData(obj), fieldData = getFieldValues(resultJSON, this.listBaseOption.fields);
            if (resultJSON) {
                var li = this.element.querySelector('[data-uid="' + fieldData[this.fields.id] + '"]');
                isEnable ? (li && li.classList.remove(classNames$__disable), delete resultJSON[this.fields.enabled]) : isEnable || (li && li.classList.add(classNames$__disable), 
                resultJSON[this.fields.enabled] = !1);
            }
        }, ListView.prototype.showItem = function(obj) {
            this.showHideItem(obj, !1, "");
        }, ListView.prototype.hideItem = function(obj) {
            this.showHideItem(obj, !0, "none");
        }, ListView.prototype.showHideItem = function(obj, isHide, display) {
            var resultJSON = this.getItemData(obj), fieldData = getFieldValues(resultJSON, this.listBaseOption.fields);
            if (resultJSON) {
                var li = this.element.querySelector('[data-uid="' + fieldData[this.fields.id] + '"]');
                li && (li.style.display = display), isHide ? resultJSON[this.fields.isVisible] = !1 : delete resultJSON[this.fields.isVisible];
            }
        }, ListView.prototype.addItem = function(data, fields) {
            var ds = this.findItemFromDS(this.dataSource, fields), child = getFieldValues(ds, this.listBaseOption.fields)[this.fields.child];
            child || (child = []), child = child.concat(data), ds instanceof Array ? (this.dataSource = this.localData = ds.concat(data), 
            this.setViewDataSource()) : ds[this.fields.child] = child, this.resetCurrentList();
        }, ListView.prototype.removeItem = function(obj) {
            this.removeItemFromList(obj, !0);
        }, ListView.prototype.removeItemFromList = function(obj, resetList) {
            var _this = this, valid = !1;
            if ("string" == typeof this.dataSource[0]) {
                if ("object" == typeof obj) {
                    var liCollection_1 = [], idx_1 = 0;
                    this.liCollection.forEach(function(element) {
                        element === obj ? (valid = !0, _this.removeElement(element), _this.dataSource.splice(idx_1, 1), 
                        _this.localData = _this.dataSource) : liCollection_1.push(element), idx_1++;
                    }), this.liCollection = liCollection_1;
                } else if ("string" == typeof obj) {
                    var liCollection_2 = [], idx_2 = 0, ds_1 = [];
                    this.liCollection.forEach(function(element) {
                        element.innerText.trim() === obj ? (valid = !0, _this.removeElement(element)) : (liCollection_2.push(element), 
                        ds_1.push(_this.dataSource[idx_2])), idx_2++;
                    }), this.localData = this.curViewDS = this.dataSource = ds_1, this.liCollection = liCollection_2;
                }
                var values = this.getSelectedItems();
                if (this.selectedData = isNullOrUndefined(values) ? void 0 : values.text, void 0, 
                resetList && valid) {
                    if (this.resetList = !0, this.resetCurrentList(), !this.showCheckBox && this.selectedData && this.selectedData.length) {
                        this.removeSelect();
                        var index = this.dataSource.lastIndexOf(this.selectedData);
                        this.liCollection[index].classList.add(classNames$__selected), this.liCollection[index].setAttribute("aria-selected", "true");
                    }
                    this.resetList = !1;
                }
            } else {
                isNullOrUndefined(this.getSelectedItems()) ? void 0 : this.getSelectedItems().data;
                var curAr_1, fields_1 = this.getElementUID(obj), curDS = this.findItemFromDS(this.dataSource, fields_1, !0);
                if (curDS && obj) {
                    var idx_3;
                    curDS.some(function(data, index, arr) {
                        var fieldData = getFieldValues(data, _this.listBaseOption.fields);
                        return !(!fields_1.id && !fields_1.text || fields_1.id && fieldData[_this.fields.id] !== fields_1.id || fields_1.text && fieldData[_this.fields.text] !== fields_1.text) && (curAr_1 = arr, 
                        idx_3 = index, !0);
                    }), this.removeElement(this.getLiFromObjOrElement(curAr_1[idx_3])), curAr_1.splice(idx_3, 1), 
                    this.curViewDS = curAr_1;
                }
                values = this.getSelectedItems();
                this.selectedData = isNullOrUndefined(values) ? void 0 : values.text, resetList && curAr_1 && (this.resetList = !0, 
                this.resetCurrentList(), this.showCheckBox || isNullOrUndefined(values) || this.selectItem(values.item), 
                this.resetList = !1);
            }
        }, ListView.prototype.removeMultipleItems = function(obj) {
            if (obj.length) for (var i = 0; i < obj.length; i++) i === obj.length - 1 ? this.removeItemFromList(obj[i], !0) : this.removeItemFromList(obj[i], !1);
        }, ListView.prototype.getModuleName = function() {
            return "listview";
        }, ListView.prototype.getPersistData = function() {
            return this.addOnPersist([ "cssClass", "enableRtl", "htmlAttributes", "enable", "fields", "animation", "headerTitle", "sortOrder", "showIcon", "height", "width", "showCheckBox", "checkBoxPosition" ]);
        }, __decorate$8([ Property() ], ListView.prototype, "cssClass", void 0), __decorate$8([ Property({}) ], ListView.prototype, "htmlAttributes", void 0), 
        __decorate$8([ Property(!0) ], ListView.prototype, "enable", void 0), __decorate$8([ Property([]) ], ListView.prototype, "dataSource", void 0), 
        __decorate$8([ Property() ], ListView.prototype, "query", void 0), __decorate$8([ Complex(ListBase.defaultMappedFields, FieldSettings$1) ], ListView.prototype, "fields", void 0), 
        __decorate$8([ Property({
            effect: "SlideLeft",
            duration: 400,
            easing: "ease"
        }) ], ListView.prototype, "animation", void 0), __decorate$8([ Property("None") ], ListView.prototype, "sortOrder", void 0), 
        __decorate$8([ Property(!1) ], ListView.prototype, "showIcon", void 0), __decorate$8([ Property(!1) ], ListView.prototype, "showCheckBox", void 0), 
        __decorate$8([ Property("Left") ], ListView.prototype, "checkBoxPosition", void 0), 
        __decorate$8([ Property("") ], ListView.prototype, "headerTitle", void 0), __decorate$8([ Property(!1) ], ListView.prototype, "showHeader", void 0), 
        __decorate$8([ Property("") ], ListView.prototype, "height", void 0), __decorate$8([ Property("") ], ListView.prototype, "width", void 0), 
        __decorate$8([ Property(null) ], ListView.prototype, "template", void 0), __decorate$8([ Property(null) ], ListView.prototype, "groupTemplate", void 0), 
        __decorate$8([ Event() ], ListView.prototype, "select", void 0), __decorate$8([ Event() ], ListView.prototype, "actionBegin", void 0), 
        __decorate$8([ Event() ], ListView.prototype, "actionComplete", void 0), __decorate$8([ Event() ], ListView.prototype, "actionFailure", void 0), 
        ListView = __decorate$8([ NotifyPropertyChanges ], ListView);
    }(Component), _lists = Object.freeze({
        FieldSettings: FieldSettings$1,
        ListView: ListView,
        get cssClass() {
            return cssClass;
        },
        get ListBase() {
            return ListBase;
        },
        getFieldValues: getFieldValues
    }), __extends$7 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$7 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, FieldSettings = function(_super) {
        function FieldSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$7(FieldSettings, _super), __decorate$7([ Property() ], FieldSettings.prototype, "text", void 0), 
        __decorate$7([ Property() ], FieldSettings.prototype, "value", void 0), __decorate$7([ Property() ], FieldSettings.prototype, "iconCss", void 0), 
        __decorate$7([ Property() ], FieldSettings.prototype, "groupBy", void 0), __decorate$7([ Property() ], FieldSettings.prototype, "htmlAttributes", void 0), 
        FieldSettings;
    }(ChildProperty), dropDownBaseClasses = {
        root: "e-dropdownbase",
        rtl: "e-rtl",
        content: "e-content",
        selected: "e-active",
        hover: "e-hover",
        noData: "e-nodata",
        fixedHead: "e-fixed-head",
        focus: "e-item-focus",
        li: cssClass.li,
        group: cssClass.group,
        disabled: cssClass.disabled,
        grouping: "e-dd-group"
    }, DropDownBase = function(_super) {
        function DropDownBase(options, element) {
            return _super.call(this, options, element) || this;
        }
        return __extends$7(DropDownBase, _super), DropDownBase.prototype.getPropObject = function(prop, newProp, oldProp) {
            var newProperty = new Object(), oldProperty = new Object(), propName = new Function("prop", "return prop");
            newProperty[propName(prop)] = newProp[propName(prop)], oldProperty[propName(prop)] = oldProp[propName(prop)];
            var data = new Object();
            return data.newProperty = newProperty, data.oldProperty = oldProperty, data;
        }, DropDownBase.prototype.getValueByText = function(text, ignoreCase) {
            var value = null, dataSource = this.listData, fields = this.fields, type = this.typeOfData(dataSource).typeof;
            if (ignoreCase) if ("string" === type || "number" === type) for (var _i = 0, dataSource_1 = dataSource; _i < dataSource_1.length; _i++) {
                if (!isNullOrUndefined(item = dataSource_1[_i]) && String(item).toLowerCase() === text.toString().toLowerCase()) {
                    value = "string" === type ? String(item) : this.getFormattedValue(String(item));
                    break;
                }
            } else dataSource.filter(function(item) {
                getValue(fields.text, item).toString().toLowerCase() === text.toLowerCase() && (value = getValue(fields.value, item));
            }); else if ("string" === type || "number" === type) for (var _a = 0, dataSource_2 = dataSource; _a < dataSource_2.length; _a++) {
                var item;
                if (!isNullOrUndefined(item = dataSource_2[_a]) && String(item) === text.toString()) {
                    value = "string" === type ? text : this.getFormattedValue(text);
                    break;
                }
            } else dataSource.filter(function(item) {
                getValue(fields.text, item) === text && (value = getValue(fields.value, item));
            });
            return value;
        }, DropDownBase.prototype.l10nUpdate = function(actionFailure) {
            if ("No Records Found" !== this.noRecordsTemplate || "The Request Failed" !== this.actionFailureTemplate) {
                var template = actionFailure ? this.actionFailureTemplate : this.noRecordsTemplate;
                this.list.innerHTML = "";
                for (var _i = 0, _a = compile$$1(template)({}); _i < _a.length; _i++) {
                    var item = _a[_i];
                    this.list.appendChild(item);
                }
            } else {
                this.l10n = new L10n("dropdowns", {
                    noRecordsTemplate: "No Records Found",
                    actionFailureTemplate: "The Request Failed"
                }, this.locale), this.list.innerHTML = actionFailure ? this.l10n.getConstant("actionFailureTemplate") : this.l10n.getConstant("noRecordsTemplate");
            }
        }, DropDownBase.prototype.getTextByValue = function(value) {
            var text, dataSource = this.listData, fields = this.fields, type = this.typeOfData(dataSource).typeof;
            if ("string" === type || "number" === type) for (var _i = 0, dataSource_3 = dataSource; _i < dataSource_3.length; _i++) {
                var item = dataSource_3[_i];
                if (!isNullOrUndefined(item) && item.toString() === value.toString()) {
                    text = item.toString();
                    break;
                }
            } else dataSource.filter(function(item) {
                var itemValue = getValue(fields.value, item);
                isNullOrUndefined(itemValue) || itemValue.toString() !== value.toString() || (text = getValue(fields.text, item));
            });
            return text;
        }, DropDownBase.prototype.getFormattedValue = function(value) {
            if (this.listData && this.listData.length) {
                var item = this.typeOfData(this.listData);
                if ("number" == typeof getValue(this.fields.value ? this.fields.value : "value", item.item) || "number" === item.typeof) return parseInt(value, 10);
            }
            return value;
        }, DropDownBase.prototype.setEnableRtl = function() {
            this.list && this.enableRtlElements.push(this.list), this.enableRtl ? addClass(this.enableRtlElements, dropDownBaseClasses.rtl) : removeClass(this.enableRtlElements, dropDownBaseClasses.rtl);
        }, DropDownBase.prototype.initialize = function() {
            if (this.bindEvent = !0, "UL" === this.element.tagName) {
                var jsonElement = ListBase.createJsonFromElement(this.element);
                this.setProperties({
                    fields: {
                        text: "text",
                        value: "text"
                    }
                }, !0), this.resetList(jsonElement, this.fields);
            } else if ("SELECT" === this.element.tagName) {
                (this.dataSource instanceof Array ? this.dataSource.length > 0 : !isNullOrUndefined(this.dataSource)) || this.renderItemsBySelect();
            } else this.setListData(this.dataSource, this.fields, this.query);
        }, DropDownBase.prototype.getPersistData = function() {
            return this.addOnPersist([]);
        }, DropDownBase.prototype.setEnabled = function() {
            this.enabled ? this.element.setAttribute("aria-disabled", "false") : this.element.setAttribute("aria-disabled", "true");
        }, DropDownBase.prototype.renderItemsBySelect = function() {
            var element = this.element, fields = {
                value: "value",
                text: "text"
            }, jsonElement = [], group = element.querySelectorAll("select>optgroup"), option = element.querySelectorAll("select>option");
            if (this.getJSONfromOption(jsonElement, option, fields), group.length) {
                for (var i = 0; i < group.length; i++) {
                    var item = group[i], optionGroup = {};
                    optionGroup[fields.text] = item.label, optionGroup.isHeader = !0;
                    var child = item.querySelectorAll("option");
                    jsonElement.push(optionGroup), this.getJSONfromOption(jsonElement, child, fields);
                }
                element.querySelectorAll("select>option");
            }
            this.fields.text = fields.text, this.fields.value = fields.value, this.resetList(jsonElement, fields);
        }, DropDownBase.prototype.getJSONfromOption = function(items, options, fields) {
            for (var _i = 0, options_1 = options; _i < options_1.length; _i++) {
                var option = options_1[_i], json = {};
                json[fields.text] = option.innerText, json[fields.value] = option.getAttribute(fields.value) ? option.getAttribute(fields.value) : option.innerText, 
                items.push(json);
            }
        }, DropDownBase.prototype.preRender = function() {
            this.scrollTimer = -1, this.enableRtlElements = [], this.isRequested = !1;
        }, DropDownBase.prototype.setListData = function(dataSource, fields, query) {
            var _this = this;
            fields = fields || this.fields;
            var ulElement;
            if (this.isActive = !0, dataSource instanceof DataManager) {
                var eventArgs = {
                    cancel: !1,
                    data: dataSource,
                    query: query
                };
                if (this.trigger("actionBegin", eventArgs), eventArgs.cancel) return;
                this.showSpinner(), this.isRequested = !0, eventArgs.data.executeQuery(this.getQuery(eventArgs.query)).then(function(e) {
                    if (_this.trigger("actionComplete", e), !e.cancel) {
                        var listItems = e.result;
                        ulElement = _this.renderItems(listItems, fields), _this.onActionComplete(ulElement, listItems, e), 
                        _this.isRequested = !1, _this.hideSpinner(), _this.trigger("dataBound", {
                            items: listItems,
                            e: e
                        });
                    }
                }).catch(function(e) {
                    _this.isRequested = !1, _this.onActionFailure(e), _this.hideSpinner();
                });
            } else {
                this.showSpinner();
                var dataManager = new DataManager(dataSource), listItems = this.getQuery(query).executeLocal(dataManager);
                ulElement = this.renderItems(listItems, fields), this.onActionComplete(ulElement, listItems), 
                this.hideSpinner(), this.trigger("dataBound", {
                    items: listItems
                });
            }
        }, DropDownBase.prototype.showSpinner = function() {}, DropDownBase.prototype.hideSpinner = function() {}, 
        DropDownBase.prototype.onActionFailure = function(e) {
            this.liCollections = [], this.trigger("actionFailure", e), this.l10nUpdate(!0), 
            addClass([ this.list ], dropDownBaseClasses.noData);
        }, DropDownBase.prototype.onActionComplete = function(ulElement, list, e) {
            this.listData = list, this.list.innerHTML = "", this.list.appendChild(ulElement), 
            this.liCollections = this.list.querySelectorAll("." + dropDownBaseClasses.li), this.ulElement = this.list.querySelector("ul"), 
            this.postRender(this.list, list, this.bindEvent);
        }, DropDownBase.prototype.postRender = function(listElement, list, bindEvent) {
            var focusItem = listElement.querySelector("." + dropDownBaseClasses.li), selectedItem = listElement.querySelector("." + dropDownBaseClasses.selected);
            focusItem && !selectedItem && addClass([ focusItem ], dropDownBaseClasses.focus), 
            list.length <= 0 ? (this.l10nUpdate(), addClass([ listElement ], dropDownBaseClasses.noData)) : listElement.classList.remove(dropDownBaseClasses.noData), 
            this.groupTemplate && this.renderGroupTemplate(listElement);
        }, DropDownBase.prototype.getQuery = function(query) {
            return query || (this.query ? this.query : new Query());
        }, DropDownBase.prototype.renderGroupTemplate = function(listEle) {
            if (null !== this.fields.groupBy && this.dataSource || this.element.querySelector("." + dropDownBaseClasses.group)) {
                var dataSource = this.dataSource, headerItems = listEle.querySelectorAll("." + dropDownBaseClasses.group);
                ListBase.renderGroupTemplate(this.groupTemplate, dataSource, this.fields.properties, headerItems);
            }
        }, DropDownBase.prototype.createListItems = function(dataSource, fields) {
            dataSource && fields.groupBy || this.element.querySelector("optgroup") ? (fields.groupBy && ("None" !== this.sortOrder && (dataSource = this.getSortedDataSource(dataSource)), 
            dataSource = ListBase.groupDataSource(dataSource, fields.properties, this.sortOrder)), 
            addClass([ this.list ], dropDownBaseClasses.grouping)) : dataSource = this.getSortedDataSource(dataSource);
            var options = this.listOption(dataSource, fields);
            return ListBase.createList(dataSource, options, !0);
        }, DropDownBase.prototype.listOption = function(dataSource, fields) {
            var iconCss = !isNullOrUndefined(fields.iconCss);
            return extend({}, null !== fields.text || null !== fields.value ? {
                fields: fields.properties,
                showIcon: iconCss,
                ariaAttributes: {
                    groupItemRole: "presentation"
                }
            } : {
                fields: {
                    value: "text"
                }
            }, fields, !0);
        }, DropDownBase.prototype.setFloatingHeader = function(e) {
            isNullOrUndefined(this.fixedHeaderElement) && (this.fixedHeaderElement = createElement("div", {
                className: dropDownBaseClasses.fixedHead
            }), this.list.querySelector("li").classList.contains(dropDownBaseClasses.group) || (this.fixedHeaderElement.style.display = "none"), 
            prepend([ this.fixedHeaderElement ], this.list), this.setFixedHeader()), isNullOrUndefined(this.fixedHeaderElement) || "0" !== this.fixedHeaderElement.style.zIndex || this.setFixedHeader(), 
            this.scrollStop(e);
        }, DropDownBase.prototype.scrollStop = function(e) {
            for (var target = e.target, liHeight = parseInt(getComputedStyle(this.liCollections[0], null).getPropertyValue("height"), 10), topIndex = Math.round(target.scrollTop / liHeight), liCollections = this.ulElement.querySelectorAll("li"), i = topIndex; i > -1; i--) {
                if (!isNullOrUndefined(liCollections[i]) && liCollections[i].classList.contains(dropDownBaseClasses.group)) {
                    var currentLi = liCollections[i];
                    this.fixedHeaderElement.innerHTML = currentLi.innerHTML, this.fixedHeaderElement.style.top = e.target.scrollTop + "px", 
                    this.fixedHeaderElement.style.display = "block";
                    break;
                }
                this.fixedHeaderElement.style.display = "none", this.fixedHeaderElement.style.top = "none";
            }
        }, DropDownBase.prototype.renderItems = function(listData, fields) {
            var ulElement;
            if (this.itemTemplate && listData) {
                var dataSource = listData;
                dataSource && fields.groupBy ? ("None" !== this.sortOrder && (dataSource = this.getSortedDataSource(dataSource)), 
                dataSource = ListBase.groupDataSource(dataSource, fields.properties, this.sortOrder)) : dataSource = this.getSortedDataSource(dataSource), 
                ulElement = this.templateListItem(dataSource, fields);
            } else ulElement = this.createListItems(listData, fields);
            return ulElement;
        }, DropDownBase.prototype.templateListItem = function(dataSource, fields) {
            var option = this.listOption(dataSource, fields);
            return ListBase.renderContentTemplate(this.itemTemplate, dataSource, fields.properties, option);
        }, DropDownBase.prototype.typeOfData = function(items) {
            for (var item = {
                typeof: null,
                item: null
            }, i = 0; i < items.length; i++) if (!isNullOrUndefined(items[i])) return item = {
                typeof: typeof items[i],
                item: items[i]
            };
            return item;
        }, DropDownBase.prototype.setFixedHeader = function() {
            this.list.parentElement.style.display = "block";
            var liWidth = this.liCollections[0].offsetWidth;
            this.fixedHeaderElement.style.width = liWidth.toString() + "px", setStyleAttribute(this.fixedHeaderElement, {
                zIndex: 10
            });
            var firstLi = this.ulElement.querySelector("." + dropDownBaseClasses.group);
            this.fixedHeaderElement.innerHTML = firstLi.innerHTML;
        }, DropDownBase.prototype.getSortedDataSource = function(dataSource) {
            if (dataSource && "None" !== this.sortOrder) {
                var textField = this.fields.text ? this.fields.text : "text";
                dataSource = ListBase.getDataSource(dataSource, ListBase.addSorting(this.sortOrder, textField));
            }
            return dataSource;
        }, DropDownBase.prototype.getIndexByValue = function(value) {
            for (var index, listItems = this.getItems(), i = 0; i < listItems.length; i++) if (!isNullOrUndefined(value) && listItems[i].getAttribute("data-value") === value.toString()) {
                index = i;
                break;
            }
            return index;
        }, DropDownBase.prototype.dispatchEvent = function(element, type) {
            var evt = document.createEvent("HTMLEvents");
            evt.initEvent(type, !1, !0), element.dispatchEvent(evt);
        }, DropDownBase.prototype.setFields = function() {
            var fields = this.fields;
            this.fields.value && !this.fields.text ? this.fields.text = this.fields.value : !fields.value && fields.text ? this.fields.value = this.fields.text : this.fields.value || this.fields.text || (this.fields.value = this.fields.text = "text");
        }, DropDownBase.prototype.resetList = function(dataSource, fields, query) {
            this.list && this.setListData(dataSource, fields, query);
        }, DropDownBase.prototype.updateSelection = function() {}, DropDownBase.prototype.renderList = function() {
            this.render();
        }, DropDownBase.prototype.updateDataSource = function(prop) {
            this.resetList(this.dataSource);
        }, DropDownBase.prototype.setUpdateInitial = function(props, newProp) {
            isNullOrUndefined(newProp.fields) || this.setFields();
            for (var j = 0; props.length > j; j++) newProp[props[j]] && this.updateDataSource(props[j]);
        }, DropDownBase.prototype.onPropertyChanged = function(newProp, oldProp) {
            this.setUpdateInitial([ "query", "sortOrder", "dataSource", "itemTemplate" ], newProp);
            for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "query":
                  case "sortOrder":
                  case "dataSource":
                  case "itemTemplate":
                    break;

                  case "enableRtl":
                    this.setEnableRtl();
                    break;

                  case "enabled":
                    this.setEnabled();
                    break;

                  case "groupTemplate":
                    if (this.renderGroupTemplate(this.list), this.ulElement && this.fixedHeaderElement) {
                        var firstLi = this.ulElement.querySelector("." + dropDownBaseClasses.group);
                        this.fixedHeaderElement.innerHTML = firstLi.innerHTML;
                    }
                    break;

                  case "locale":
                    this.list && !isNullOrUndefined(this.liCollections) && 0 === this.liCollections.length && this.l10nUpdate();
                    break;

                  case "zIndex":
                    this.setProperties({
                        zIndex: newProp.zIndex
                    }, !0), this.setZIndex();
                }
            }
        }, DropDownBase.prototype.render = function(isEmptyData) {
            this.list = createElement("div", {
                className: dropDownBaseClasses.content,
                attrs: {
                    tabindex: "0"
                }
            }), this.list.classList.add(dropDownBaseClasses.root), this.setFields();
            var rippleModel = {
                duration: 300,
                selector: "." + dropDownBaseClasses.li
            };
            this.rippleFun = rippleEffect(this.list, rippleModel);
            var group = this.element.querySelector("select>optgroup");
            if (!this.fields.groupBy && isNullOrUndefined(group) || EventHandler.add(this.list, "scroll", this.setFloatingHeader, this), 
            "dropdownbase" === this.getModuleName()) {
                this.element.getAttribute("tabindex") && this.list.setAttribute("tabindex", this.element.getAttribute("tabindex")), 
                removeClass([ this.element ], dropDownBaseClasses.root), this.element.style.display = "none";
                var wrapperElement = document.createElement("div");
                this.element.parentElement.insertBefore(wrapperElement, this.element), wrapperElement.appendChild(this.element), 
                wrapperElement.appendChild(this.list);
            }
            this.setEnableRtl(), this.setEnabled(), isEmptyData || this.initialize();
        }, DropDownBase.prototype.getModuleName = function() {
            return "dropdownbase";
        }, DropDownBase.prototype.getItems = function() {
            return this.ulElement.querySelectorAll("." + dropDownBaseClasses.li);
        }, DropDownBase.prototype.addItem = function(items, itemIndex) {
            this.list && this.list.textContent !== this.noRecordsTemplate || this.renderList();
            var itemsCount = this.getItems().length, selectedItemValue = this.list.querySelector("." + dropDownBaseClasses.selected);
            items = items instanceof Array ? items : [ items ];
            var index;
            index = isNullOrUndefined(itemIndex) || itemIndex < 0 || itemIndex > itemsCount - 1 ? itemsCount : itemIndex;
            for (var fields = this.fields, liCollections = [], i = 0; i < items.length; i++) {
                var item = items[i], li = createElement("li", {
                    className: dropDownBaseClasses.li,
                    id: "option-add-" + i
                });
                li.setAttribute("data-value", getValue(fields.value, item)), li.setAttribute("role", "option"), 
                li.appendChild(document.createTextNode(getValue(fields.text, item))), liCollections.push(li), 
                this.listData.push(item), this.updateActionCompleteData(li, item);
            }
            if (0 === itemsCount && isNullOrUndefined(this.list.querySelector("ul"))) this.list.innerHTML = "", 
            this.list.appendChild(this.ulElement), append(liCollections, this.ulElement); else for (i = 0; i < items.length; i++) {
                this.liCollections[index] ? this.liCollections[index].parentNode.insertBefore(liCollections[i], this.liCollections[index]) : this.ulElement.appendChild(liCollections[i]);
                var tempLi = [].slice.call(this.liCollections);
                tempLi.splice(index, 0, liCollections[i]), this.liCollections = tempLi, index += 1;
            }
            (selectedItemValue || 0 === itemIndex) && this.updateSelection();
        }, DropDownBase.prototype.validationAttribute = function(target, hidden) {
            var name = target.getAttribute("name") ? target.getAttribute("name") : target.getAttribute("id");
            hidden.setAttribute("name", name), target.removeAttribute("name");
            for (var attributes$$1 = [ "required", "aria-required", "form" ], i = 0; i < attributes$$1.length; i++) if (target.getAttribute(attributes$$1[i])) {
                var attr = target.getAttribute(attributes$$1[i]);
                hidden.setAttribute(attributes$$1[i], attr), target.removeAttribute(attributes$$1[i]);
            }
        }, DropDownBase.prototype.setZIndex = function() {}, DropDownBase.prototype.updateActionCompleteData = function(li, item) {}, 
        DropDownBase.prototype.getDataByValue = function(value) {
            var type = this.typeOfData(this.listData).typeof;
            if ("string" === type || "number" === type) for (var _i = 0, _a = this.listData; _i < _a.length; _i++) {
                if (!isNullOrUndefined(item = _a[_i]) && item === value) return item;
            } else for (var _b = 0, _c = this.listData; _b < _c.length; _b++) {
                var item;
                if (!isNullOrUndefined(item = _c[_b]) && getValue(this.fields.value ? this.fields.value : "value", item) === value) return item;
            }
            return null;
        }, DropDownBase.prototype.destroy = function() {
            document.body.contains(this.list) && (EventHandler.remove(this.list, "scroll", this.setFloatingHeader), 
            isNullOrUndefined(this.rippleFun) || this.rippleFun(), detach(this.list)), _super.prototype.destroy.call(this);
        }, __decorate$7([ Complex({
            text: null,
            value: null,
            iconCss: null,
            groupBy: null
        }, FieldSettings) ], DropDownBase.prototype, "fields", void 0), __decorate$7([ Property(!1) ], DropDownBase.prototype, "enableRtl", void 0), 
        __decorate$7([ Property(!1) ], DropDownBase.prototype, "enablePersistence", void 0), 
        __decorate$7([ Property(null) ], DropDownBase.prototype, "itemTemplate", void 0), 
        __decorate$7([ Property(null) ], DropDownBase.prototype, "groupTemplate", void 0), 
        __decorate$7([ Property("No Records Found") ], DropDownBase.prototype, "noRecordsTemplate", void 0), 
        __decorate$7([ Property("The Request Failed") ], DropDownBase.prototype, "actionFailureTemplate", void 0), 
        __decorate$7([ Property("None") ], DropDownBase.prototype, "sortOrder", void 0), 
        __decorate$7([ Property(!0) ], DropDownBase.prototype, "enabled", void 0), __decorate$7([ Property([]) ], DropDownBase.prototype, "dataSource", void 0), 
        __decorate$7([ Property(null) ], DropDownBase.prototype, "query", void 0), __decorate$7([ Property(1e3) ], DropDownBase.prototype, "zIndex", void 0), 
        __decorate$7([ Property(!1) ], DropDownBase.prototype, "ignoreAccent", void 0), 
        __decorate$7([ Event() ], DropDownBase.prototype, "actionBegin", void 0), __decorate$7([ Event() ], DropDownBase.prototype, "actionComplete", void 0), 
        __decorate$7([ Event() ], DropDownBase.prototype, "actionFailure", void 0), __decorate$7([ Event() ], DropDownBase.prototype, "select", void 0), 
        __decorate$7([ Event() ], DropDownBase.prototype, "dataBound", void 0), __decorate$7([ Event() ], DropDownBase.prototype, "created", void 0), 
        __decorate$7([ Event() ], DropDownBase.prototype, "destroyed", void 0), DropDownBase = __decorate$7([ NotifyPropertyChanges ], DropDownBase);
    }(Component), __extends$3$1 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$3$1 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, dropDownListClasses = {
        root: "e-dropdownlist",
        hover: dropDownBaseClasses.hover,
        selected: dropDownBaseClasses.selected,
        rtl: dropDownBaseClasses.rtl,
        li: dropDownBaseClasses.li,
        disable: dropDownBaseClasses.disabled,
        base: dropDownBaseClasses.root,
        focus: dropDownBaseClasses.focus,
        input: "e-input-group",
        inputFocus: "e-input-focus",
        icon: "e-input-group-icon e-ddl-icon",
        iconAnimation: "e-icon-anim",
        value: "e-input-value",
        device: "e-ddl-device",
        backIcon: "e-input-group-icon e-back-icon e-icons",
        filterBarClearIcon: "e-input-group-icon e-clear-icon e-icons",
        filterInput: "e-input-filter",
        filterParent: "e-filter-parent",
        mobileFilter: "e-ddl-device-filter",
        footer: "e-ddl-footer",
        header: "e-ddl-header",
        clearIcon: "e-clear-icon",
        clearIconHide: "e-clear-icon-hide",
        popupFullScreen: "e-popup-full-page",
        disableIcon: "e-ddl-disable-icon",
        hiddenElement: "e-ddl-hidden"
    }, inputObject = {
        container: null,
        buttons: []
    }, DropDownList = function(_super) {
        function DropDownList(options, element) {
            return _super.call(this, options, element) || this;
        }
        return __extends$3$1(DropDownList, _super), DropDownList.prototype.preRender = function() {
            this.element.style.opacity = "0", this.initializeData(), _super.prototype.preRender.call(this), 
            this.activeIndex = this.index, this.queryString = "";
        }, DropDownList.prototype.initializeData = function() {
            this.isPopupOpen = !1, this.isDocumentClick = !1, this.isInteracted = !1, this.isFilterFocus = !1, 
            this.beforePopupOpen = !1, this.initial = !0, this.initRemoteRender = !1, this.isNotSearchList = !1, 
            this.isTyped = !1, this.isSelected = !1, this.preventFocus = !1, this.preventAutoFill = !1, 
            this.isValidKey = !1, this.typedString = "", this.isEscapeKey = !1, this.isPreventBlur = !1, 
            this.isTabKey = !1, this.actionCompleteData = {
                isUpdated: !1
            }, this.prevSelectPoints = {}, this.isSelectCustom = !1, this.isDropDownClick = !1, 
            this.preventAltUp = !1, this.isCustomFilter = !1, this.keyConfigure = {
                tab: "tab",
                enter: "13",
                escape: "27",
                end: "35",
                home: "36",
                down: "40",
                up: "38",
                pageUp: "33",
                pageDown: "34",
                open: "alt+40",
                close: "shift+tab",
                hide: "alt+38",
                space: "32"
            };
        }, DropDownList.prototype.setZIndex = function() {
            this.popupObj && this.popupObj.setProperties({
                zIndex: this.zIndex
            });
        }, DropDownList.prototype.renderList = function(isEmptyData) {
            _super.prototype.render.call(this, isEmptyData), this.wireListEvents();
        }, DropDownList.prototype.floatLabelChange = function() {
            if ("dropdownlist" === this.getModuleName() && "Auto" === this.floatLabelType) {
                var floatElement = this.inputWrapper.container.querySelector(".e-float-text");
                "" !== this.inputElement.value || this.isInteracted ? classList(floatElement, [ "e-label-top" ], [ "e-label-bottom" ]) : classList(floatElement, [ "e-label-bottom" ], [ "e-label-top" ]);
            }
        }, DropDownList.prototype.resetHandler = function(e) {
            e.preventDefault(), this.clear(e);
        }, DropDownList.prototype.resetFocusElement = function() {
            if (this.removeHover(), this.removeSelection(), this.removeFocus(), this.list.scrollTop = 0, 
            "autocomplete" !== this.getModuleName()) {
                var li = this.ulElement.querySelector("." + dropDownListClasses.li);
                li && li.classList.add(dropDownListClasses.focus);
            }
        }, DropDownList.prototype.clear = function(e, property) {
            this.resetSelection();
            var dataItem = this.getItemData();
            this.previousValue !== dataItem.value && !isNullOrUndefined(this.selectedLI) && !isNullOrUndefined(this.activeIndex) && this.activeIndex >= 0 && this.onChangeEvent(e);
        }, DropDownList.prototype.resetSelection = function() {
            this.list && (this.allowFiltering && "autocomplete" !== this.getModuleName() && this.onActionComplete(this.actionCompleteData.ulElement.cloneNode(!0), this.actionCompleteData.list), 
            this.resetFocusElement()), this.hiddenElement.innerHTML = "", this.inputElement.value = "", 
            this.value = null, this.text = null, this.index = null, this.activeIndex = null, 
            this.item = null, this.itemData = null, this.queryString = "", this.valueTempElement && (detach(this.valueTempElement), 
            this.inputElement.style.display = "block", this.valueTempElement = null), this.setSelection(null, null), 
            this.isSelectCustom = !1, this.updateIconState();
        }, DropDownList.prototype.setHTMLAttributes = function() {
            if (Object.keys(this.htmlAttributes).length) for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
                var htmlAttr = _a[_i];
                if ("class" === htmlAttr) this.inputWrapper.container.classList.add(this.htmlAttributes[htmlAttr]); else if ("disabled" === htmlAttr && "disabled" === this.htmlAttributes[htmlAttr]) this.enabled = !1, 
                this.setEnable(); else if ("readonly" === htmlAttr && "readonly" === this.htmlAttributes[htmlAttr]) this.readonly = !0, 
                this.dataBind(); else if ("style" === htmlAttr) this.inputWrapper.container.setAttribute("style", this.htmlAttributes[htmlAttr]); else {
                    [ "name", "required" ].indexOf(htmlAttr) > -1 ? this.hiddenElement.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]) : [ "title", "id", "placeholder" ].indexOf(htmlAttr) > -1 ? "placeholder" === htmlAttr ? Input.setPlaceholder(this.htmlAttributes[htmlAttr], this.inputElement) : this.element.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]) : this.inputWrapper.container.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
                }
            }
        }, DropDownList.prototype.getAriaAttributes = function() {
            return {
                "aria-disabled": "false",
                "aria-owns": this.element.id + "_options",
                role: "listbox",
                "aria-haspopup": "true",
                "aria-expanded": "false",
                "aria-activedescendant": "null",
                "aria-labelledby": this.hiddenElement.id
            };
        }, DropDownList.prototype.setEnableRtl = function() {
            Input.setEnableRtl(this.enableRtl, [ this.inputElement.parentElement ]), this.popupObj && (this.popupObj.enableRtl = this.enableRtl, 
            this.popupObj.dataBind());
        }, DropDownList.prototype.setEnable = function() {
            Input.setEnabled(this.enabled, this.inputElement), this.enabled ? (removeClass([ this.inputWrapper.container ], dropDownListClasses.disable), 
            this.inputElement.setAttribute("aria-disabled", "false"), this.targetElement().setAttribute("tabindex", this.tabIndex)) : (this.hidePopup(), 
            addClass([ this.inputWrapper.container ], dropDownListClasses.disable), this.inputElement.setAttribute("aria-disabled", "true"), 
            this.targetElement().tabIndex = -1);
        }, DropDownList.prototype.getPersistData = function() {
            return this.addOnPersist([ "value" ]);
        }, DropDownList.prototype.preventTabIndex = function(element) {
            "dropdownlist" === this.getModuleName() && (element.tabIndex = -1);
        }, DropDownList.prototype.targetElement = function() {
            return this.inputWrapper.container;
        }, DropDownList.prototype.getNgDirective = function() {
            return "EJS-DROPDOWNLIST";
        }, DropDownList.prototype.getElementByText = function(text) {
            return this.getElementByValue(this.getValueByText(text));
        }, DropDownList.prototype.getElementByValue = function(value) {
            for (var item, _i = 0, listItems_1 = this.getItems(); _i < listItems_1.length; _i++) {
                var liItem = listItems_1[_i];
                if (this.getFormattedValue(liItem.getAttribute("data-value")) === value) {
                    item = liItem;
                    break;
                }
            }
            return item;
        }, DropDownList.prototype.initValue = function() {
            this.renderList(), this.dataSource instanceof DataManager ? this.initRemoteRender = !0 : this.updateValues();
        }, DropDownList.prototype.updateValues = function() {
            if (isNullOrUndefined(this.value)) if (this.text && isNullOrUndefined(this.value)) {
                var element = this.getElementByText(this.text);
                if (isNullOrUndefined(element)) return void this.setProperties({
                    text: null
                });
                this.setSelection(element, null);
            } else this.setSelection(this.liCollections[this.activeIndex], null); else this.setSelection(this.getElementByValue(this.value), null);
            this.setHiddenValue(), Input.setValue(this.text, this.inputElement, this.floatLabelType, this.showClearButton);
        }, DropDownList.prototype.onBlur = function(e) {
            var target = e.relatedTarget, currentTarget = e.target, isPreventBlur = this.isPreventBlur;
            this.isPreventBlur = !1, !isPreventBlur || this.isDocumentClick || !this.isPopupOpen || isNullOrUndefined(currentTarget) && (this.isFilterLayout() || !isNullOrUndefined(target)) ? this.isDocumentClick || !isNullOrUndefined(this.popupObj) && document.body.contains(this.popupObj.element) && this.popupObj.element.classList.contains(dropDownListClasses.mobileFilter) ? this.beforePopupOpen || (this.isDocumentClick = !1) : ("dropdownlist" === this.getModuleName() && !this.isFilterFocus && target !== this.inputElement && (document.activeElement !== target || document.activeElement === target && currentTarget.classList.contains(dropDownListClasses.inputFocus)) || isNullOrUndefined(target) && "dropdownlist" === this.getModuleName() && this.allowFiltering && currentTarget !== this.inputWrapper.container || "dropdownlist" !== this.getModuleName() && !this.inputWrapper.container.contains(target) || this.isTabKey) && (this.isDocumentClick = !!this.isPopupOpen, 
            this.focusOutAction(), this.isTabKey = !1) : "dropdownlist" === this.getModuleName() && this.allowFiltering && this.isPopupOpen ? this.filterInput.focus() : this.targetElement().focus();
        }, DropDownList.prototype.focusOutAction = function() {
            this.isInteracted = !1, this.focusOut(), this.onFocusOut();
        }, DropDownList.prototype.onFocusOut = function() {
            this.isSelected && (this.isSelectCustom = !1, this.onChangeEvent(null)), this.floatLabelChange(), 
            this.dispatchEvent(this.hiddenElement, "change"), this.inputWrapper.clearButton && addClass([ this.inputWrapper.clearButton ], dropDownListClasses.clearIconHide), 
            this.trigger("blur");
        }, DropDownList.prototype.onFocus = function() {
            this.isInteracted || (this.isInteracted = !0, this.trigger("focus")), this.updateIconState();
        }, DropDownList.prototype.wireEvent = function() {
            EventHandler.add(this.inputWrapper.container, "mousedown", this.dropDownClick, this), 
            EventHandler.add(this.inputWrapper.container, "focus", this.focusIn, this), EventHandler.add(this.inputWrapper.container, "keypress", this.onSearch, this), 
            this.bindCommonEvent();
        }, DropDownList.prototype.bindCommonEvent = function() {
            EventHandler.add(this.targetElement(), "blur", this.onBlur, this), Browser.isDevice || (this.keyboardModule = new KeyboardEvents(this.targetElement(), {
                keyAction: this.keyActionHandler.bind(this),
                keyConfigs: this.keyConfigure,
                eventName: "keydown"
            })), this.bindClearEvent();
        }, DropDownList.prototype.bindClearEvent = function() {
            this.showClearButton && EventHandler.add(this.inputWrapper.clearButton, "mousedown", this.resetHandler, this);
        }, DropDownList.prototype.unBindCommonEvent = function() {
            EventHandler.remove(this.targetElement(), "blur", this.onBlur), Browser.isDevice || this.keyboardModule.destroy(), 
            this.showClearButton && EventHandler.remove(this.inputWrapper.clearButton, "mousedown", this.resetHandler);
        }, DropDownList.prototype.updateIconState = function() {
            this.showClearButton && ("" !== this.inputElement.value ? removeClass([ this.inputWrapper.clearButton ], dropDownListClasses.clearIconHide) : addClass([ this.inputWrapper.clearButton ], dropDownListClasses.clearIconHide));
        }, DropDownList.prototype.wireListEvents = function() {
            EventHandler.add(this.list, "click", this.onMouseClick, this), EventHandler.add(this.list, "mouseover", this.onMouseOver, this), 
            EventHandler.add(this.list, "mouseout", this.onMouseLeave, this);
        }, DropDownList.prototype.onSearch = function(e) {
            32 !== e.charCode && 13 !== e.charCode && (void 0 === this.list && this.renderList(), 
            this.searchKeyEvent = e, this.isRequested || isNullOrUndefined(this.list.querySelector("li")) || this.incrementalSearch(e));
        }, DropDownList.prototype.onMouseClick = function(e) {
            var target = e.target, li = (target.classList, closest(target, "." + dropDownBaseClasses.li));
            if (this.isValidLI(li)) if (this.setSelection(li, e), Browser.isDevice && this.isFilterLayout()) history.back(); else {
                this.closePopup(100);
            }
        }, DropDownList.prototype.onMouseOver = function(e) {
            var currentLi = closest(e.target, "." + dropDownBaseClasses.li);
            this.setHover(currentLi);
        }, DropDownList.prototype.setHover = function(li) {
            this.enabled && this.isValidLI(li) && !li.classList.contains(dropDownBaseClasses.hover) && (this.removeHover(), 
            addClass([ li ], dropDownBaseClasses.hover));
        }, DropDownList.prototype.onMouseLeave = function(e) {
            this.removeHover();
        }, DropDownList.prototype.removeHover = function() {
            var hoveredItem = this.list.querySelectorAll("." + dropDownBaseClasses.hover);
            hoveredItem && hoveredItem.length && removeClass(hoveredItem, dropDownBaseClasses.hover);
        }, DropDownList.prototype.isValidLI = function(li) {
            return li && li.hasAttribute("role") && "option" === li.getAttribute("role");
        }, DropDownList.prototype.incrementalSearch = function(e) {
            if (this.liCollections.length > 0) {
                var li = function(keyCode, items, selectedIndex, ignoreCase) {
                    queryString += String.fromCharCode(keyCode), setTimeout(function() {
                        queryString = "";
                    }, 1e3);
                    var index;
                    if (queryString = ignoreCase ? queryString.toLowerCase() : queryString, prevString === queryString) {
                        for (var i = 0; i < matches$1.length; i++) if (matches$1[i].classList.contains(activeClass)) {
                            index = i;
                            break;
                        }
                        return index += 1, matches$1[index];
                    }
                    var listItems = items, strLength = queryString.length, item = void 0;
                    i = selectedIndex = selectedIndex ? selectedIndex + 1 : 0, matches$1 = [];
                    do {
                        i === listItems.length && (i = -1), item = listItems[index = -1 === i ? 0 : i], 
                        (ignoreCase ? item.innerText.toLowerCase() : item.innerText).substr(0, strLength) === queryString && matches$1.push(listItems[index]), 
                        i++;
                    } while (i !== selectedIndex);
                    return prevString = queryString, matches$1[0];
                }(e.charCode, this.liCollections, this.activeIndex, !0);
                isNullOrUndefined(li) || (this.setSelection(li, e), this.setScrollPosition());
            }
        }, DropDownList.prototype.hideSpinner = function() {
            isNullOrUndefined(this.spinnerElement) || (hideSpinner(this.spinnerElement), removeClass([ this.spinnerElement ], dropDownListClasses.disableIcon), 
            this.spinnerElement.innerHTML = "", this.spinnerElement = null);
        }, DropDownList.prototype.showSpinner = function() {
            isNullOrUndefined(this.spinnerElement) && (this.spinnerElement = Browser.isDevice && !isNullOrUndefined(this.filterInputObj) && this.filterInputObj.buttons[1] || !isNullOrUndefined(this.filterInputObj) && this.filterInputObj.buttons[0] || this.inputWrapper.buttons[0], 
            addClass([ this.spinnerElement ], dropDownListClasses.disableIcon), createSpinner({
                target: this.spinnerElement,
                width: Browser.isDevice ? "16px" : "14px"
            }), showSpinner(this.spinnerElement));
        }, DropDownList.prototype.keyActionHandler = function(e) {
            var preventAction = "pageUp" === e.action || "pageDown" === e.action, preventHomeEnd = "dropdownlist" !== this.getModuleName() && ("home" === e.action || "end" === e.action);
            this.isEscapeKey = "escape" === e.action, this.isTabKey = !this.isPopupOpen && "tab" === e.action;
            var isNavigation = "down" === e.action || "up" === e.action || "pageUp" === e.action || "pageDown" === e.action || "home" === e.action || "end" === e.action;
            if ((!(this.isEditTextBox() || preventAction || preventHomeEnd) || this.isPopupOpen) && !this.readonly) {
                var isTabAction = "tab" === e.action || "close" === e.action;
                if (void 0 !== this.list || this.isRequested || isTabAction || "escape" === e.action || (this.searchKeyEvent = e, 
                this.renderList()), isNullOrUndefined(this.list) || !isNullOrUndefined(this.liCollections) && isNavigation && 0 === this.liCollections.length || this.isRequested) return;
                switch ((isTabAction && this.isPopupOpen || "escape" === e.action) && e.preventDefault(), 
                this.isSelected = "escape" !== e.action && this.isSelected, this.isTyped = !isNavigation && "escape" !== e.action && this.isTyped, 
                e.action) {
                  case "down":
                  case "up":
                    var focusEle = this.list.querySelector("." + dropDownListClasses.focus);
                    if (this.isSelectFocusItem(focusEle)) this.setSelection(focusEle, e); else {
                        var nextItem = void 0, index = "down" === e.action ? this.activeIndex + 1 : this.activeIndex - 1, startIndex = 0;
                        "autocomplete" === this.getModuleName() && (startIndex = "down" === e.action && isNullOrUndefined(this.activeIndex) ? 0 : this.liCollections.length - 1, 
                        index = index < 0 ? this.liCollections.length - 1 : index === this.liCollections.length ? 0 : index), 
                        nextItem = isNullOrUndefined(this.activeIndex) ? this.liCollections[startIndex] : this.liCollections[index], 
                        this.setSelection(nextItem, e);
                    }
                    e.preventDefault();
                    break;

                  case "pageUp":
                    this.pageUpSelection(this.activeIndex - this.getPageCount(), e), e.preventDefault();
                    break;

                  case "pageDown":
                    this.pageDownSelection(this.activeIndex + this.getPageCount(), e), e.preventDefault();
                    break;

                  case "home":
                    if ("dropdownlist" === this.getModuleName()) {
                        if (e.preventDefault(), 0 === this.activeIndex) return;
                        this.setSelection(this.liCollections[0], e);
                    }
                    break;

                  case "end":
                    if ("dropdownlist" === this.getModuleName()) {
                        e.preventDefault();
                        var lastLi = this.getItems().length - 1;
                        if (this.activeIndex === lastLi) return;
                        this.setSelection(this.liCollections[lastLi], e);
                    }
                    break;

                  case "space":
                    "dropdownlist" === this.getModuleName() && (this.beforePopupOpen || this.showPopup());
                    break;

                  case "open":
                    this.showPopup();
                    break;

                  case "hide":
                    this.preventAltUp = this.isPopupOpen, this.hidePopup(), this.focusDropDown(e);
                    break;

                  case "enter":
                    this.selectCurrentItem(e);
                    break;

                  case "escape":
                  case "tab":
                  case "close":
                    this.isPopupOpen && (this.hidePopup(), this.focusDropDown(e));
                }
            }
        }, DropDownList.prototype.selectCurrentItem = function(e) {
            if (this.isPopupOpen) {
                var li = this.list.querySelector("." + dropDownListClasses.focus);
                li && (this.setSelection(li, e), this.isTyped = !1), this.isSelected && (this.isSelectCustom = !1, 
                this.onChangeEvent(e)), this.hidePopup(), this.focusDropDown(e);
            } else this.showPopup();
        }, DropDownList.prototype.isSelectFocusItem = function(element) {
            return !isNullOrUndefined(element);
        }, DropDownList.prototype.getPageCount = function() {
            var liHeight = this.list.classList.contains(dropDownBaseClasses.noData) ? null : getComputedStyle(this.getItems()[0], null).getPropertyValue("height");
            return Math.round(this.list.getBoundingClientRect().height / parseInt(liHeight, 10));
        }, DropDownList.prototype.pageUpSelection = function(steps, event) {
            var previousItem = steps >= 0 ? this.liCollections[steps + 1] : this.liCollections[0];
            this.setSelection(previousItem, event);
        }, DropDownList.prototype.pageDownSelection = function(steps, event) {
            var list = this.getItems(), previousItem = steps <= list.length ? this.liCollections[steps - 1] : this.liCollections[list.length - 1];
            this.setSelection(previousItem, event);
        }, DropDownList.prototype.unWireEvent = function() {
            EventHandler.remove(this.inputWrapper.container, "mousedown", this.dropDownClick), 
            EventHandler.remove(this.inputWrapper.container, "keypress", this.onSearch), EventHandler.remove(this.inputWrapper.container, "focus", this.focusIn), 
            this.unBindCommonEvent();
        }, DropDownList.prototype.unWireListEvents = function() {
            EventHandler.remove(this.list, "click", this.onMouseClick), EventHandler.remove(this.list, "mouseover", this.onMouseOver), 
            EventHandler.remove(this.list, "mouseout", this.onMouseLeave);
        }, DropDownList.prototype.onDocumentClick = function(e) {
            var target = e.target;
            if (!isNullOrUndefined(this.popupObj) && closest(target, "#" + this.popupObj.element.id) || this.inputWrapper.container.contains(e.target)) target === this.inputElement || this.allowFiltering && target === this.filterInput || "combobox" === this.getModuleName() && !this.allowFiltering && Browser.isDevice && target === this.inputWrapper.buttons[0] || (this.isPreventBlur = (Browser.isIE || "edge" === Browser.info.name) && (document.activeElement === this.targetElement() || document.activeElement === this.filterInput), 
            e.preventDefault()); else if (this.inputWrapper.container.classList.contains(dropDownListClasses.inputFocus) || this.isPopupOpen) {
                this.isDocumentClick = !0;
                var isActive = this.isRequested;
                this.isInteracted = !1, this.hidePopup(), isActive || (this.onFocusOut(), this.inputWrapper.container.classList.remove(dropDownListClasses.inputFocus));
            }
        }, DropDownList.prototype.activeStateChange = function() {
            this.isDocumentClick && (this.hidePopup(), this.onFocusOut(), this.inputWrapper.container.classList.remove(dropDownListClasses.inputFocus));
        }, DropDownList.prototype.focusDropDown = function(e) {
            !this.initial && this.isFilterLayout() && this.focusIn();
        }, DropDownList.prototype.dropDownClick = function(e) {
            if (3 !== e.which && 2 !== e.button && !this.targetElement().classList.contains(dropDownListClasses.disable) && this.inputWrapper.clearButton !== e.target) {
                var target = e.target;
                target === this.inputElement || this.allowFiltering && target === this.filterInput || "combobox" === this.getModuleName() || e.preventDefault(), 
                this.readonly || (this.isPopupOpen ? (this.hidePopup(), this.isFilterLayout() && this.focusDropDown(e)) : (this.focusIn(), 
                this.floatLabelChange(), this.queryString = "" === this.inputElement.value.trim() ? null : this.inputElement.value, 
                this.isDropDownClick = !0, this.showPopup()));
            }
        }, DropDownList.prototype.updateSelectedItem = function(li, e, preventSelect) {
            this.removeSelection(), li.classList.add(dropDownBaseClasses.selected), this.removeHover();
            var value = this.getFormattedValue(li.getAttribute("data-value"));
            if (this.item = li, this.itemData = this.getDataByValue(value), !this.initial && !preventSelect) {
                this.isSelected = !0;
                var eventArgs = {
                    e: e,
                    item: this.item,
                    itemData: this.itemData,
                    isInteracted: !!e,
                    cancel: !1
                };
                if (this.trigger("select", eventArgs), eventArgs.cancel) return !0;
            }
            var focusedItem = this.list.querySelector("." + dropDownBaseClasses.focus);
            return focusedItem && removeClass([ focusedItem ], dropDownBaseClasses.focus), li.setAttribute("aria-selected", "true"), 
            this.activeIndex = this.getIndexByValue(value), !1;
        }, DropDownList.prototype.activeItem = function(li) {
            this.isValidLI(li) && !li.classList.contains(dropDownBaseClasses.selected) && (this.removeSelection(), 
            li.classList.add(dropDownBaseClasses.selected), this.removeHover(), li.setAttribute("aria-selected", "true"));
        }, DropDownList.prototype.setValue = function(e) {
            var dataItem = this.getItemData();
            return null === dataItem.value ? Input.setValue(null, this.inputElement, this.floatLabelType, this.showClearButton) : Input.setValue(dataItem.text, this.inputElement, this.floatLabelType, this.showClearButton), 
            this.previousValue === dataItem.value ? (this.isSelected = !1, !0) : (this.isSelected = !this.initial, 
            this.isSelectCustom = !1, "dropdownlist" === this.getModuleName() && this.updateIconState(), 
            !1);
        }, DropDownList.prototype.setSelection = function(li, e) {
            if (this.isValidLI(li) && !li.classList.contains(dropDownBaseClasses.selected)) {
                if (this.updateSelectedItem(li, e, !1)) return;
            }
            this.list && this.removeHover(), this.selectedLI = li, this.setValue(e) || (this.valueTemplate && null !== this.itemData ? this.setValueTemplate() : this.inputElement.previousSibling === this.valueTempElement && (detach(this.valueTempElement), 
            this.inputElement.style.display = "block"), this.isPopupOpen && (attributes(this.targetElement(), {
                "aria-activedescendant": this.selectedLI ? this.selectedLI.id : null
            }), this.isFilterLayout() && attributes(this.filterInput, {
                "aria-activedescendant": this.selectedLI ? this.selectedLI.id : null
            })), (!this.isPopupOpen && !isNullOrUndefined(li) || this.isPopupOpen && !isNullOrUndefined(e) && ("keydown" !== e.type || "keydown" === e.type && "enter" === e.action)) && (this.isSelectCustom = !1, 
            this.onChangeEvent(e)), !this.isPopupOpen || isNullOrUndefined(this.selectedLI) || null === this.itemData || e && "click" === e.type || this.setScrollPosition(e));
        }, DropDownList.prototype.setValueTemplate = function() {
            this.valueTempElement || (this.valueTempElement = createElement("span", {
                className: dropDownListClasses.value
            }), this.inputElement.parentElement.insertBefore(this.valueTempElement, this.inputElement), 
            this.inputElement.style.display = "none"), this.valueTempElement.innerHTML = "";
            for (var _i = 0, _a = compile$$1(this.valueTemplate)(this.itemData); _i < _a.length; _i++) {
                var item = _a[_i];
                this.valueTempElement.appendChild(item);
            }
        }, DropDownList.prototype.removeSelection = function() {
            var selectedItems = this.list.querySelectorAll("." + dropDownBaseClasses.selected);
            selectedItems.length && (removeClass(selectedItems, dropDownBaseClasses.selected), 
            selectedItems[0].removeAttribute("aria-selected"));
        }, DropDownList.prototype.getItemData = function() {
            var dataValue, dataText, fields = this.fields, dataItem = {};
            isNullOrUndefined(dataItem = this.itemData) || (dataValue = getValue(fields.value, dataItem), 
            dataText = getValue(fields.text, dataItem));
            return {
                value: isNullOrUndefined(dataItem) || isUndefined(dataValue) ? dataItem : dataValue,
                text: isNullOrUndefined(dataItem) || isUndefined(dataValue) ? dataItem : dataText
            };
        }, DropDownList.prototype.onChangeEvent = function(eve) {
            var dataItem = this.getItemData(), index = this.isSelectCustom ? null : this.activeIndex;
            this.setProperties({
                value: dataItem.value,
                index: index,
                text: dataItem.text
            }, !0), this.detachChangeEvent(eve);
        }, DropDownList.prototype.detachChangeEvent = function(eve) {
            if (this.isSelected = !1, this.previousValue = this.value, this.activeIndex = this.index, 
            this.typedString = isNullOrUndefined(this.text) ? "" : this.text, !this.initial) {
                this.setHiddenValue();
                var eventArgs = {
                    e: eve,
                    item: this.item,
                    itemData: this.itemData,
                    isInteracted: !!eve,
                    value: this.value
                };
                this.trigger("change", eventArgs);
            }
        }, DropDownList.prototype.setHiddenValue = function() {
            isNullOrUndefined(this.value) ? this.hiddenElement.innerHTML = "" : this.hiddenElement.innerHTML = "<option selected value =" + this.value + ">" + this.text + "</option>";
        }, DropDownList.prototype.onFilterUp = function(e) {
            if (this.isValidKey = 40 === e.keyCode || 38 === e.keyCode || this.isValidKey, this.isValidKey) switch (this.isValidKey = !1, 
            e.keyCode) {
              case 38:
              case 40:
                "autocomplete" !== this.getModuleName() || this.isPopupOpen || this.preventAltUp || this.isRequested ? this.preventAutoFill = !1 : (this.preventAutoFill = !0, 
                this.searchLists(e)), this.preventAltUp = !1, e.preventDefault();
                break;

              case 46:
              case 8:
                this.typedString = this.filterInput.value, !this.isPopupOpen && "" !== this.typedString || this.isPopupOpen && this.queryString.length > 0 ? (this.preventAutoFill = !0, 
                this.searchLists(e)) : "" === this.typedString && (this.resetFocusElement(), this.activeIndex = null, 
                "autocomplete" === this.getModuleName() && this.hidePopup()), e.preventDefault();
                break;

              default:
                this.typedString = this.filterInput.value, this.preventAutoFill = !1, this.searchLists(e);
            }
        }, DropDownList.prototype.onFilterDown = function(e) {
            switch (e.keyCode) {
              case 13:
                break;

              case 40:
              case 38:
                this.queryString = this.filterInput.value, e.preventDefault();
                break;

              case 9:
                this.isPopupOpen && e.preventDefault();
                break;

              default:
                this.prevSelectPoints = this.getSelectionPoints(), this.queryString = this.filterInput.value;
            }
        }, DropDownList.prototype.removeFillSelection = function() {
            if (this.isInteracted) {
                var selection = this.getSelectionPoints();
                this.inputElement.setSelectionRange(selection.end, selection.end);
            }
        }, DropDownList.prototype.getSelectionPoints = function() {
            var input = this.inputElement;
            return {
                start: Math.abs(input.selectionStart),
                end: Math.abs(input.selectionEnd)
            };
        }, DropDownList.prototype.searchLists = function(e) {
            var _this = this;
            if (this.isTyped = !0, this.activeIndex = null, this.filterInput.parentElement.querySelector("." + dropDownListClasses.clearIcon)) {
                this.filterInput.parentElement.querySelector("." + dropDownListClasses.clearIcon).style.visibility = "" === this.filterInput.value ? "hidden" : "visible";
            }
            if (this.isFiltering()) {
                var eventArgs_1 = {
                    preventDefaultAction: !1,
                    text: this.filterInput.value,
                    updateData: function(dataSource, query, fields) {
                        eventArgs_1.cancel || (_this.isCustomFilter = !0, _this.filteringAction(dataSource, query, fields));
                    },
                    baseEventArgs: e,
                    cancel: !1
                };
                if (this.trigger("filtering", eventArgs_1), eventArgs_1.cancel) return;
                if (!this.isCustomFilter && !eventArgs_1.preventDefaultAction) {
                    var filterQuery = this.query ? this.query.clone() : new Query(), dataType = this.typeOfData(this.dataSource).typeof;
                    if ((this.dataSource instanceof DataManager || "string" !== dataType) && "number" !== dataType) {
                        var fields = this.fields;
                        filterQuery.where(isNullOrUndefined(fields.text) ? "" : fields.text, "startswith", this.filterInput.value, !0, this.ignoreAccent);
                    } else filterQuery.where("", "startswith", this.filterInput.value, !0, this.ignoreAccent);
                    this.filteringAction(this.dataSource, filterQuery, this.fields);
                }
            }
        }, DropDownList.prototype.filteringAction = function(dataSource, query, fields) {
            isNullOrUndefined(this.filterInput) || (this.beforePopupOpen = !0, "" === this.filterInput.value.trim() ? (this.actionCompleteData.isUpdated = !1, 
            this.isTyped = !1, this.onActionComplete(this.actionCompleteData.ulElement, this.actionCompleteData.list), 
            this.isTyped = !0, isNullOrUndefined(this.itemData) || "dropdownlist" !== this.getModuleName() || (this.focusIndexItem(), 
            this.setScrollPosition()), this.isNotSearchList = !0) : (this.isNotSearchList = !1, 
            this.resetList(dataSource, fields, query)));
        }, DropDownList.prototype.setSearchBox = function(popupElement) {
            if (this.isFiltering()) {
                var parentElement = createElement("span", {
                    className: dropDownListClasses.filterParent
                });
                this.filterInput = createElement("input", {
                    attrs: {
                        type: "text"
                    },
                    className: dropDownListClasses.filterInput
                }), this.element.parentNode.insertBefore(this.filterInput, this.element);
                var backIcon = !1;
                return Browser.isDevice && (backIcon = !0), this.filterInputObj = Input.createInput({
                    element: this.filterInput,
                    buttons: backIcon ? [ dropDownListClasses.backIcon, dropDownListClasses.filterBarClearIcon ] : [ dropDownListClasses.filterBarClearIcon ],
                    properties: {
                        placeholder: this.filterBarPlaceholder
                    }
                }), append([ this.filterInputObj.container ], parentElement), prepend([ parentElement ], popupElement), 
                attributes(this.filterInput, {
                    "aria-disabled": "false",
                    "aria-owns": this.element.id + "_options",
                    role: "listbox",
                    "aria-activedescendant": this.selectedLI ? this.selectedLI.id : null,
                    autocomplete: "off",
                    autocorrect: "off",
                    autocapitalize: "off",
                    spellcheck: "false"
                }), this.clearIconElement = this.filterInput.parentElement.querySelector("." + dropDownListClasses.clearIcon), 
                !Browser.isDevice && this.clearIconElement && (EventHandler.add(this.clearIconElement, "click", this.clearText, this), 
                this.clearIconElement.style.visibility = "hidden"), Browser.isDevice || (this.searchKeyModule = new KeyboardEvents(this.filterInput, {
                    keyAction: this.keyActionHandler.bind(this),
                    keyConfigs: this.keyConfigure,
                    eventName: "keydown"
                })), EventHandler.add(this.filterInput, "input", this.onInput, this), EventHandler.add(this.filterInput, "keyup", this.onFilterUp, this), 
                EventHandler.add(this.filterInput, "keydown", this.onFilterDown, this), EventHandler.add(this.filterInput, "blur", this.onBlur, this), 
                this.filterInputObj;
            }
            return inputObject;
        }, DropDownList.prototype.onInput = function() {
            this.isValidKey = !0;
        }, DropDownList.prototype.onActionFailure = function(e) {
            _super.prototype.onActionFailure.call(this, e), this.beforePopupOpen && this.renderPopup();
        }, DropDownList.prototype.onActionComplete = function(ulElement, list, e, isUpdated) {
            if (this.isNotSearchList) this.isNotSearchList = !1; else if (this.isActive) {
                var selectedItem = this.selectedLI ? this.selectedLI.cloneNode(!0) : null;
                _super.prototype.onActionComplete.call(this, ulElement, list, e), this.isRequested && !isNullOrUndefined(this.searchKeyEvent) && "keydown" === this.searchKeyEvent.type && (this.isRequested = !1, 
                this.keyActionHandler(this.searchKeyEvent), this.searchKeyEvent = null), this.isRequested && !isNullOrUndefined(this.searchKeyEvent) && (this.incrementalSearch(this.searchKeyEvent), 
                this.searchKeyEvent = null), this.list.scrollTop = 0, isNullOrUndefined(ulElement) || attributes(ulElement, {
                    id: this.element.id + "_options",
                    role: "listbox",
                    "aria-hidden": "false"
                }), this.initRemoteRender && (this.initial = !0, this.activeIndex = this.index, 
                this.updateValues(), this.initRemoteRender = !1, this.initial = !1), "autocomplete" !== this.getModuleName() && this.isFiltering() && !this.isTyped && (this.actionCompleteData.isUpdated || (this.actionCompleteData = {
                    ulElement: ulElement.cloneNode(!0),
                    list: list,
                    isUpdated: !0
                }), this.addNewItem(list, selectedItem), isNullOrUndefined(this.itemData) || this.focusIndexItem()), 
                this.beforePopupOpen && this.renderPopup();
            }
        }, DropDownList.prototype.addNewItem = function(listData, newElement) {
            var _this = this;
            if (!isNullOrUndefined(this.itemData) && !isNullOrUndefined(newElement)) {
                var value_1 = this.getItemData().value;
                listData.some(function(data) {
                    return ("string" == typeof data || "number" == typeof data) && data === value_1 || getValue(_this.fields.value, data) === value_1;
                }) || this.addItem(this.itemData);
            }
        }, DropDownList.prototype.updateActionCompleteData = function(li, item) {
            "autocomplete" !== this.getModuleName() && this.actionCompleteData.ulElement && (this.actionCompleteData.ulElement.appendChild(li.cloneNode(!0)), 
            this.actionCompleteData.list.push(item));
        }, DropDownList.prototype.focusIndexItem = function() {
            var value = this.getItemData().value;
            this.activeIndex = this.getIndexByValue(value);
            var element = this.list.querySelector('[data-value="' + value + '"]');
            this.selectedLI = element, this.activeItem(element), this.removeFocus();
        }, DropDownList.prototype.updateSelection = function() {
            var selectedItem = this.list.querySelector("." + dropDownBaseClasses.selected);
            selectedItem ? (this.setProperties({
                index: this.getIndexByValue(selectedItem.getAttribute("data-value"))
            }), this.activeIndex = this.index) : (this.removeFocus(), this.list.querySelector("." + dropDownBaseClasses.li).classList.add(dropDownListClasses.focus));
        }, DropDownList.prototype.removeFocus = function() {
            var highlightedItem = this.list.querySelectorAll("." + dropDownListClasses.focus);
            highlightedItem && highlightedItem.length && removeClass(highlightedItem, dropDownListClasses.focus);
        }, DropDownList.prototype.renderPopup = function() {
            if (this.popupObj && document.body.contains(this.popupObj.element)) this.refreshPopup(); else {
                var popupEle = createElement("div", {
                    id: this.element.id + "_popup",
                    className: "e-ddl e-popup"
                }), searchBox = this.setSearchBox(popupEle);
                if (this.listHeight = formatUnit(this.popupHeight), this.headerTemplate && this.setHeaderTemplate(popupEle), 
                append([ this.list ], popupEle), this.footerTemplate && this.setFooterTemplate(popupEle), 
                document.body.appendChild(popupEle), popupEle.style.visibility = "hidden", "auto" !== this.popupHeight) {
                    if (this.searchBoxHeight = 0, isNullOrUndefined(searchBox.container) || (this.searchBoxHeight = searchBox.container.parentElement.getBoundingClientRect().height, 
                    this.listHeight = (parseInt(this.listHeight, 10) - this.searchBoxHeight).toString() + "px"), 
                    this.headerTemplate) {
                        var height = Math.round(this.header.getBoundingClientRect().height);
                        this.listHeight = (parseInt(this.listHeight, 10) - (height + this.searchBoxHeight)).toString() + "px";
                    }
                    if (this.footerTemplate) {
                        height = Math.round(this.footer.getBoundingClientRect().height);
                        this.listHeight = (parseInt(this.listHeight, 10) - (height + this.searchBoxHeight)).toString() + "px";
                    }
                    this.list.style.maxHeight = (parseInt(this.listHeight, 10) - 2).toString() + "px", 
                    popupEle.style.maxHeight = formatUnit(this.popupHeight);
                } else popupEle.style.height = "auto";
                var left, offsetValue = 0;
                if (!isNullOrUndefined(this.selectedLI) && !isNullOrUndefined(this.activeIndex) && this.activeIndex >= 0 ? this.setScrollPosition() : this.list.scrollTop = 0, 
                Browser.isDevice && !this.allowFiltering && ("dropdownlist" === this.getModuleName() || this.isDropDownClick && "combobox" === this.getModuleName())) {
                    offsetValue = this.getOffsetValue(popupEle);
                    var firstItem = this.isEmptyList() ? this.list : this.liCollections[0];
                    left = -(parseInt(getComputedStyle(firstItem).textIndent, 10) - parseInt(getComputedStyle(this.inputElement).paddingLeft, 10) + parseInt(getComputedStyle(this.inputElement.parentElement).borderLeftWidth, 10));
                }
                this.getFocusElement(), this.createPopup(popupEle, offsetValue, left), this.checkCollision(popupEle), 
                Browser.isDevice && (this.popupObj.element.classList.add(dropDownListClasses.device), 
                ("dropdownlist" === this.getModuleName() || "combobox" === this.getModuleName() && !this.allowFiltering && this.isDropDownClick) && (this.popupObj.collision = {
                    X: "fit",
                    Y: "fit"
                }), this.isFilterLayout() && (this.popupObj.element.classList.add(dropDownListClasses.mobileFilter), 
                this.popupObj.position = {
                    X: 0,
                    Y: 0
                }, this.popupObj.dataBind(), attributes(this.popupObj.element, {
                    style: "left:0px;right:0px;top:0px;bottom:0px;"
                }), addClass([ document.body, this.popupObj.element ], dropDownListClasses.popupFullScreen), 
                this.setSearchBoxPosition(), this.backIconElement = searchBox.container.querySelector(".e-back-icon"), 
                this.clearIconElement = searchBox.container.querySelector("." + dropDownListClasses.clearIcon), 
                EventHandler.add(this.backIconElement, "click", this.clickOnBackIcon, this), EventHandler.add(this.clearIconElement, "click", this.clearText, this))), 
                popupEle.style.visibility = "visible", addClass([ popupEle ], "e-popup-close");
                for (var _i = 0, scrollParentElements_1 = this.popupObj.getScrollableParent(this.inputWrapper.container); _i < scrollParentElements_1.length; _i++) {
                    var element = scrollParentElements_1[_i];
                    EventHandler.add(element, "scroll", this.scrollHandler, this);
                }
                Browser.isDevice && this.isFilterLayout() && EventHandler.add(this.list, "scroll", this.listScroll, this), 
                attributes(this.targetElement(), {
                    "aria-expanded": "true"
                });
                addClass([ this.isFiltering() ? this.filterInput.parentElement : this.inputWrapper.container ], [ dropDownListClasses.inputFocus ]);
                this.beforePopupOpen = !0;
                var eventArgs = {
                    popup: this.popupObj,
                    cancel: !1
                };
                this.trigger("open", eventArgs), eventArgs.cancel || (addClass([ this.inputWrapper.container ], [ dropDownListClasses.iconAnimation ]), 
                this.popupObj.show(new Animation({
                    name: "FadeIn",
                    duration: 100
                })));
            }
        }, DropDownList.prototype.checkCollision = function(popupEle) {
            if (!Browser.isDevice || Browser.isDevice && "dropdownlist" !== this.getModuleName() && !this.isDropDownClick) {
                isCollide(popupEle).length > 0 && (popupEle.style.marginTop = -parseInt(getComputedStyle(popupEle).marginTop, 10) + "px");
            }
        }, DropDownList.prototype.getOffsetValue = function(popupEle) {
            var popupStyles = getComputedStyle(popupEle), borderTop = parseInt(popupStyles.borderTop, 10), borderBottom = parseInt(popupStyles.borderBottom, 10);
            return this.setPopupPosition(borderTop + borderBottom);
        }, DropDownList.prototype.createPopup = function(element, offsetValue, left) {
            var _this = this;
            this.popupObj = new Popup(element, {
                width: this.setWidth(),
                targetType: "relative",
                relateTo: this.inputWrapper.container,
                collision: {
                    X: "flip",
                    Y: "flip"
                },
                offsetY: offsetValue,
                enableRtl: this.enableRtl,
                offsetX: left,
                position: {
                    X: "left",
                    Y: "bottom"
                },
                zIndex: this.zIndex,
                close: function() {
                    _this.isDocumentClick || _this.focusDropDown(), _this.isDocumentClick = !1, _this.destroyPopup();
                },
                open: function() {
                    EventHandler.add(document, "mousedown", _this.onDocumentClick, _this), _this.isPopupOpen = !0, 
                    _this.isFilterLayout() && (removeClass([ _this.inputWrapper.container ], [ dropDownListClasses.inputFocus ]), 
                    _this.isFilterFocus = !0, _this.filterInput.focus(), _this.inputWrapper.clearButton && addClass([ _this.inputWrapper.clearButton ], dropDownListClasses.clearIconHide)), 
                    _this.activeStateChange();
                }
            });
        }, DropDownList.prototype.isEmptyList = function() {
            return !isNullOrUndefined(this.liCollections) && 0 === this.liCollections.length;
        }, DropDownList.prototype.getFocusElement = function() {}, DropDownList.prototype.isFilterLayout = function() {
            return "dropdownlist" === this.getModuleName() && this.allowFiltering;
        }, DropDownList.prototype.scrollHandler = function() {
            Browser.isDevice && ("dropdownlist" === this.getModuleName() && !this.isFilterLayout() || "combobox" === this.getModuleName() && !this.allowFiltering && this.isDropDownClick) && this.hidePopup(), 
            this.fields.groupBy && !isNullOrUndefined(this.fixedHeaderElement) && (this.fixedHeaderElement.style.zIndex = "0", 
            this.fixedHeaderElement.style.display = "none");
        }, DropDownList.prototype.setSearchBoxPosition = function() {
            var searchBoxHeight = this.filterInput.parentElement.getBoundingClientRect().height;
            this.popupObj.element.style.maxHeight = "100%", this.popupObj.element.style.width = "100%", 
            this.list.style.maxHeight = window.innerHeight - searchBoxHeight + "px", this.list.style.height = window.innerHeight - searchBoxHeight + "px";
            var clearElement = this.filterInput.parentElement.querySelector("." + dropDownListClasses.clearIcon);
            detach(this.filterInput), clearElement.parentElement.insertBefore(this.filterInput, clearElement);
        }, DropDownList.prototype.setPopupPosition = function(border) {
            var offsetValue, popupOffset = border, selectedLI = this.list.querySelector("." + dropDownListClasses.focus) || this.selectedLI, firstItem = this.isEmptyList() ? this.list : this.liCollections[0], lastItem = this.isEmptyList() ? this.list : this.liCollections[this.getItems().length - 1], liHeight = firstItem.getBoundingClientRect().height, listHeight = this.list.offsetHeight / 2, height = isNullOrUndefined(selectedLI) ? firstItem.offsetTop : selectedLI.offsetTop;
            if (lastItem.offsetTop - listHeight < height && !isNullOrUndefined(this.liCollections) && this.liCollections.length > 0 && !isNullOrUndefined(selectedLI)) {
                var count = this.list.offsetHeight / liHeight, paddingBottom = parseInt(getComputedStyle(this.list).paddingBottom, 10);
                offsetValue = (count - (this.liCollections.length - this.activeIndex)) * liHeight - popupOffset + paddingBottom, 
                this.list.scrollTop = selectedLI.offsetTop;
            } else height > listHeight ? (offsetValue = listHeight - liHeight / 2, this.list.scrollTop = height - listHeight + liHeight / 2) : offsetValue = height;
            return -(offsetValue = offsetValue + liHeight + popupOffset - (liHeight - this.inputWrapper.container.offsetHeight) / 2);
        }, DropDownList.prototype.setWidth = function() {
            var width = formatUnit(this.popupWidth);
            if (width.indexOf("%") > -1) {
                width = (this.inputWrapper.container.offsetWidth * parseFloat(width) / 100).toString() + "px";
            }
            if (Browser.isDevice && !this.allowFiltering && ("dropdownlist" === this.getModuleName() || this.isDropDownClick && "combobox" === this.getModuleName())) {
                var firstItem = this.isEmptyList() ? this.list : this.liCollections[0];
                width = parseInt(width, 10) + 2 * (parseInt(getComputedStyle(firstItem).textIndent, 10) - parseInt(getComputedStyle(this.inputElement).paddingLeft, 10) + parseInt(getComputedStyle(this.inputElement.parentElement).borderLeftWidth, 10)) + "px";
            }
            return width;
        }, DropDownList.prototype.scrollBottom = function(isInitial) {
            var currentOffset = this.list.offsetHeight, nextBottom = this.selectedLI.offsetTop + this.selectedLI.offsetHeight - this.list.scrollTop, nextOffset = this.list.scrollTop + nextBottom - currentOffset;
            nextOffset = isInitial ? nextOffset + 2 * parseInt(getComputedStyle(this.list).paddingTop, 10) : nextOffset;
            var boxRange = this.selectedLI.offsetTop + this.selectedLI.offsetHeight - this.list.scrollTop;
            boxRange = this.fields.groupBy && !isNullOrUndefined(this.fixedHeaderElement) ? boxRange - this.fixedHeaderElement.offsetHeight : boxRange, 
            0 === this.activeIndex ? this.list.scrollTop = 0 : (nextBottom > currentOffset || !(boxRange > 0 && this.list.offsetHeight > boxRange)) && (this.list.scrollTop = nextOffset);
        }, DropDownList.prototype.scrollTop = function() {
            var nextOffset = this.selectedLI.offsetTop - this.list.scrollTop;
            this.selectedLI.offsetTop, this.selectedLI.offsetHeight, this.list.scrollTop;
            nextOffset = this.fields.groupBy && !isNullOrUndefined(this.fixedHeaderElement) ? nextOffset - this.fixedHeaderElement.offsetHeight : nextOffset;
            var boxRange = this.selectedLI.offsetTop + this.selectedLI.offsetHeight - this.list.scrollTop;
            0 === this.activeIndex ? this.list.scrollTop = 0 : nextOffset < 0 ? this.list.scrollTop = this.list.scrollTop + nextOffset : boxRange > 0 && this.list.offsetHeight > boxRange || (this.list.scrollTop = this.selectedLI.offsetTop - (this.fields.groupBy && !isNullOrUndefined(this.fixedHeaderElement) ? this.fixedHeaderElement.offsetHeight : 0));
        }, DropDownList.prototype.isEditTextBox = function() {
            return !1;
        }, DropDownList.prototype.isFiltering = function() {
            return this.allowFiltering;
        }, DropDownList.prototype.isPopupButton = function() {
            return !0;
        }, DropDownList.prototype.setScrollPosition = function(e) {
            if (isNullOrUndefined(e)) this.scrollBottom(!0); else switch (e.action) {
              case "pageDown":
              case "down":
              case "end":
                this.scrollBottom();
                break;

              default:
                this.scrollTop();
            }
        }, DropDownList.prototype.clearText = function() {
            this.filterInput.value = "", this.searchLists(null);
        }, DropDownList.prototype.listScroll = function() {
            this.filterInput.blur();
        }, DropDownList.prototype.closePopup = function(delay) {
            if (this.isTyped = !1, this.popupObj && document.body.contains(this.popupObj.element) && this.beforePopupOpen) {
                EventHandler.remove(document, "mousedown", this.onDocumentClick), this.isActive = !1, 
                this.filterInputObj = null, this.isDropDownClick = !1, this.preventAutoFill = !1;
                for (var _i = 0, scrollableParentElements_1 = this.popupObj.getScrollableParent(this.inputWrapper.container); _i < scrollableParentElements_1.length; _i++) {
                    var element = scrollableParentElements_1[_i];
                    EventHandler.remove(element, "scroll", this.scrollHandler);
                }
                Browser.isDevice && this.isFilterLayout() && (removeClass([ document.body, this.popupObj.element ], dropDownListClasses.popupFullScreen), 
                EventHandler.remove(this.list, "scroll", this.listScroll)), this.isFilterLayout() && (Browser.isDevice || (this.searchKeyModule.destroy(), 
                this.clearIconElement && EventHandler.remove(this.clearIconElement, "click", this.clearText)), 
                this.backIconElement && (EventHandler.remove(this.backIconElement, "click", this.clickOnBackIcon), 
                EventHandler.remove(this.clearIconElement, "click", this.clearText)), EventHandler.remove(this.filterInput, "input", this.onInput), 
                EventHandler.remove(this.filterInput, "keyup", this.onFilterUp), EventHandler.remove(this.filterInput, "keydown", this.onFilterDown), 
                EventHandler.remove(this.filterInput, "blur", this.onBlur), this.filterInput = null), 
                attributes(this.targetElement(), {
                    "aria-expanded": "false",
                    "aria-activedescendant": null
                }), this.inputWrapper.container.classList.remove(dropDownListClasses.iconAnimation), 
                this.isFiltering() && (this.actionCompleteData.isUpdated = !1), this.beforePopupOpen = !1;
                var eventArgs = {
                    popup: this.popupObj,
                    cancel: !1
                };
                if (this.trigger("close", eventArgs), !eventArgs.cancel) {
                    var animModel = {
                        name: "FadeOut",
                        duration: 100,
                        delay: delay || 0
                    };
                    "autocomplete" === this.getModuleName() && this.rippleFun(), this.isPopupOpen ? this.popupObj.hide(new Animation(animModel)) : this.destroyPopup();
                }
            }
        }, DropDownList.prototype.destroyPopup = function() {
            this.isPopupOpen = !1, this.isFilterFocus = !1, this.popupObj.destroy(), detach(this.popupObj.element);
        }, DropDownList.prototype.clickOnBackIcon = function() {
            this.hidePopup(), this.focusIn();
        }, DropDownList.prototype.render = function() {
            "INPUT" === this.element.tagName ? this.inputElement = this.element : (this.inputElement = createElement("input"), 
            this.element.tagName !== this.getNgDirective() && (this.element.style.display = "none"), 
            this.element.parentElement.insertBefore(this.inputElement, this.element), this.preventTabIndex(this.inputElement)), 
            this.inputWrapper = Input.createInput({
                element: this.inputElement,
                buttons: this.isPopupButton() ? [ dropDownListClasses.icon ] : null,
                floatLabelType: this.floatLabelType,
                properties: {
                    readonly: "dropdownlist" === this.getModuleName() || this.readonly,
                    placeholder: this.placeholder,
                    cssClass: this.cssClass,
                    enabled: this.enabled,
                    enableRtl: this.enableRtl,
                    showClearButton: this.showClearButton
                }
            }), this.element.tagName === this.getNgDirective() ? this.element.appendChild(this.inputWrapper.container) : this.inputElement.parentElement.insertBefore(this.element, this.inputElement);
            var name = this.element.getAttribute("name") ? this.element.getAttribute("name") : this.element.getAttribute("id");
            this.hiddenElement = createElement("select", {
                attrs: {
                    name: name,
                    "aria-hidden": "true",
                    tabindex: "-1",
                    class: dropDownListClasses.hiddenElement
                }
            }), prepend([ this.hiddenElement ], this.inputWrapper.container), this.element.removeAttribute("name"), 
            this.setFields(), this.inputWrapper.container.style.width = formatUnit(this.width), 
            this.inputWrapper.container.classList.add("e-ddl"), this.wireEvent(), this.tabIndex = this.element.hasAttribute("tabindex") ? this.element.getAttribute("tabindex") : "0", 
            this.element.removeAttribute("tabindex");
            var id = this.element.getAttribute("id") ? this.element.getAttribute("id") : getUniqueID("ej2_dropdownlist");
            if (this.element.id = id, this.hiddenElement.id = id + "_hidden", this.targetElement().setAttribute("tabindex", this.tabIndex), 
            attributes(this.targetElement(), this.getAriaAttributes()), this.setHTMLAttributes(), 
            null !== this.value || null !== this.activeIndex || null !== this.text) this.initValue(); else if ("SELECT" === this.element.tagName && this.element.options[0]) {
                var selectElement = this.element;
                this.value = selectElement.options[selectElement.selectedIndex].value, this.text = isNullOrUndefined(this.value) ? null : selectElement.options[selectElement.selectedIndex].textContent, 
                this.initValue();
            }
            this.preventTabIndex(this.element), this.enabled || (this.targetElement().tabIndex = -1), 
            this.initial = !1, this.element.style.opacity = "";
        }, DropDownList.prototype.setFooterTemplate = function(popupEle) {
            this.footer ? this.footer.innerHTML = "" : (this.footer = document.createElement("div"), 
            addClass([ this.footer ], dropDownListClasses.footer));
            for (var _i = 0, _a = compile$$1(this.footerTemplate)({}); _i < _a.length; _i++) {
                var item = _a[_i];
                this.footer.appendChild(item);
            }
            append([ this.footer ], popupEle);
        }, DropDownList.prototype.setHeaderTemplate = function(popupEle) {
            this.header ? this.header.innerHTML = "" : (this.header = document.createElement("div"), 
            addClass([ this.header ], dropDownListClasses.header));
            for (var _i = 0, _a = compile$$1(this.headerTemplate)({}); _i < _a.length; _i++) {
                var item = _a[_i];
                this.header.appendChild(item);
            }
            var contentEle = popupEle.querySelector("div.e-content");
            popupEle.insertBefore(this.header, contentEle);
        }, DropDownList.prototype.setOldText = function(text) {
            this.text = text;
        }, DropDownList.prototype.setOldValue = function(value) {
            this.value = value;
        }, DropDownList.prototype.refreshPopup = function() {
            isNullOrUndefined(this.popupObj) || !document.body.contains(this.popupObj.element) || (!this.allowFiltering || Browser.isDevice && this.isFilterLayout()) && "autocomplete" !== this.getModuleName() || this.popupObj.refreshPosition(this.inputWrapper.container);
        }, DropDownList.prototype.updateDataSource = function(prop) {
            this.clear(null, prop), this.resetList(this.dataSource);
        }, DropDownList.prototype.onPropertyChanged = function(newProp, oldProp) {
            this.setUpdateInitial([ "query", "dataSource" ], newProp);
            for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                var prop = _a[_i];
                switch (prop) {
                  case "query":
                  case "dataSource":
                    break;

                  case "htmlAttributes":
                    this.setHTMLAttributes();
                    break;

                  case "width":
                    setStyleAttribute(this.inputWrapper.container, {
                        width: formatUnit(newProp.width)
                    });
                    break;

                  case "placeholder":
                    Input.setPlaceholder(newProp.placeholder, this.inputElement);
                    break;

                  case "filterBarPlaceholder":
                    Input.setPlaceholder(newProp.filterBarPlaceholder, this.filterInput);
                    break;

                  case "readonly":
                    Input.setReadonly(newProp.readonly, this.inputElement);
                    break;

                  case "cssClass":
                    Input.setCssClass(newProp.cssClass, [ this.inputWrapper.container ]), this.popupObj && this.popupObj.element.classList.add(newProp.cssClass);
                    break;

                  case "enableRtl":
                    this.setEnableRtl();
                    break;

                  case "enabled":
                    this.setEnable();
                    break;

                  case "text":
                    if (null === newProp.text) return void this.clear();
                    if (this.list || (this.dataSource instanceof DataManager && (this.initRemoteRender = !0), 
                    this.renderList()), !this.initRemoteRender) {
                        var li = this.getElementByText(newProp.text);
                        this.isValidLI(li) ? this.setSelection(li, null) : this.setOldText(oldProp.text);
                    }
                    break;

                  case "value":
                    if (null === newProp.value) return void this.clear();
                    if (this.list || (this.dataSource instanceof DataManager && (this.initRemoteRender = !0), 
                    this.renderList()), !this.initRemoteRender) {
                        var item = this.getElementByValue(newProp.value);
                        this.isValidLI(item) ? this.setSelection(item, null) : this.setOldValue(oldProp.value);
                    }
                    break;

                  case "index":
                    if (null === newProp.index) return void this.clear();
                    if (this.list || (this.dataSource instanceof DataManager && (this.initRemoteRender = !0), 
                    this.renderList()), !this.initRemoteRender) {
                        var element = this.liCollections[newProp.index];
                        this.isValidLI(element) ? this.setSelection(element, null) : this.index = oldProp.index;
                    }
                    break;

                  case "footerTemplate":
                    this.popupObj && this.setFooterTemplate(this.popupObj.element);
                    break;

                  case "headerTemplate":
                    this.popupObj && this.setHeaderTemplate(this.popupObj.element);
                    break;

                  case "valueTemplate":
                    isNullOrUndefined(this.itemData) || null == this.valueTemplate || this.setValueTemplate();
                    break;

                  case "floatLabelType":
                    Input.removeFloating(this.inputWrapper), Input.addFloating(this.inputElement, newProp.floatLabelType, this.placeholder);
                    break;

                  default:
                    var ddlProps = void 0;
                    ddlProps = this.getPropObject(prop, newProp, oldProp), _super.prototype.onPropertyChanged.call(this, ddlProps.newProperty, ddlProps.oldProperty);
                }
            }
        }, DropDownList.prototype.getModuleName = function() {
            return "dropdownlist";
        }, DropDownList.prototype.showPopup = function() {
            if (this.beforePopupOpen) this.refreshPopup(); else {
                if (this.beforePopupOpen = !0, this.isFiltering() && !this.isActive && this.actionCompleteData.list && this.actionCompleteData.list[0] ? (this.isActive = !0, 
                this.onActionComplete(this.actionCompleteData.ulElement, this.actionCompleteData.list, null, !0)) : (isNullOrUndefined(this.list) || !isUndefined(this.list) && this.list.classList.contains(dropDownBaseClasses.noData)) && this.renderList(), 
                Browser.isDevice && this.isFilterLayout()) {
                    var proxy_1 = this;
                    window.onpopstate = function() {
                        proxy_1.hidePopup();
                    }, history.pushState({}, "");
                }
                isNullOrUndefined(this.list.children[0]) && !this.list.classList.contains(dropDownBaseClasses.noData) || this.renderPopup(), 
                attributes(this.targetElement(), {
                    "aria-activedescendant": this.selectedLI ? this.selectedLI.id : null
                });
            }
        }, DropDownList.prototype.hidePopup = function() {
            this.isEscapeKey && "dropdownlist" === this.getModuleName() && (Input.setValue(this.text, this.inputElement, this.floatLabelType, this.showClearButton), 
            this.isEscapeKey = !1, isNullOrUndefined(this.index) ? this.resetSelection() : (this.selectedLI = this.liCollections[this.index], 
            this.updateSelectedItem(this.selectedLI, null, !0), this.valueTemplate && null !== this.itemData && this.setValueTemplate())), 
            this.closePopup();
            var dataItem = this.getItemData();
            "" !== this.inputElement.value.trim() || this.isInteracted || !this.isSelectCustom && (isNullOrUndefined(this.selectedLI) || this.inputElement.value === dataItem.text) || (this.isSelectCustom = !1, 
            this.clear());
        }, DropDownList.prototype.focusIn = function() {
            if (!this.targetElement().classList.contains(dropDownListClasses.disable)) {
                var isFocused = !1;
                this.preventFocus && Browser.isDevice && (this.inputWrapper.container.tabIndex = 1, 
                this.inputWrapper.container.focus(), this.preventFocus = !1, isFocused = !0), isFocused || this.targetElement().focus(), 
                addClass([ this.inputWrapper.container ], [ dropDownListClasses.inputFocus ]), this.onFocus();
            }
        }, DropDownList.prototype.focusOut = function() {
            this.isTyped = !0, this.hidePopup(), this.targetElement().blur(), removeClass([ this.inputWrapper.container ], [ dropDownListClasses.inputFocus ]);
        }, DropDownList.prototype.destroy = function() {
            var _this = this;
            if (this.isActive = !1, this.hidePopup(), this.unWireEvent(), this.list && this.unWireListEvents(), 
            !this.element || this.element.classList.contains("e-" + this.getModuleName())) {
                [ "readonly", "aria-disabled", "aria-placeholder", "placeholder", "aria-owns", "aria-labelledby", "aria-haspopup", "aria-expanded", "aria-activedescendant", "autocomplete", "aria-readonly", "autocorrect", "autocapitalize", "spellcheck", "aria-autocomplete" ].forEach(function(value) {
                    _this.inputElement.removeAttribute(value);
                }), this.inputElement.setAttribute("tabindex", this.tabIndex), this.inputElement.classList.remove("e-input"), 
                Input.setValue("", this.inputElement, this.floatLabelType, this.showClearButton), 
                this.element.style.display = "block", this.inputWrapper.container.parentElement.tagName === this.getNgDirective() ? detach(this.inputWrapper.container) : (this.inputWrapper.container.parentElement.insertBefore(this.element, this.inputWrapper.container), 
                detach(this.inputWrapper.container)), _super.prototype.destroy.call(this);
            }
        }, __decorate$3$1([ Property(null) ], DropDownList.prototype, "cssClass", void 0), 
        __decorate$3$1([ Property("100%") ], DropDownList.prototype, "width", void 0), __decorate$3$1([ Property("300px") ], DropDownList.prototype, "popupHeight", void 0), 
        __decorate$3$1([ Property("100%") ], DropDownList.prototype, "popupWidth", void 0), 
        __decorate$3$1([ Property(null) ], DropDownList.prototype, "placeholder", void 0), 
        __decorate$3$1([ Property(null) ], DropDownList.prototype, "filterBarPlaceholder", void 0), 
        __decorate$3$1([ Property({}) ], DropDownList.prototype, "htmlAttributes", void 0), 
        __decorate$3$1([ Property(null) ], DropDownList.prototype, "query", void 0), __decorate$3$1([ Property(null) ], DropDownList.prototype, "valueTemplate", void 0), 
        __decorate$3$1([ Property(null) ], DropDownList.prototype, "headerTemplate", void 0), 
        __decorate$3$1([ Property(null) ], DropDownList.prototype, "footerTemplate", void 0), 
        __decorate$3$1([ Property(!1) ], DropDownList.prototype, "allowFiltering", void 0), 
        __decorate$3$1([ Property(!1) ], DropDownList.prototype, "readonly", void 0), __decorate$3$1([ Property(null) ], DropDownList.prototype, "text", void 0), 
        __decorate$3$1([ Property(null) ], DropDownList.prototype, "value", void 0), __decorate$3$1([ Property(null) ], DropDownList.prototype, "index", void 0), 
        __decorate$3$1([ Property("Never") ], DropDownList.prototype, "floatLabelType", void 0), 
        __decorate$3$1([ Property(!1) ], DropDownList.prototype, "showClearButton", void 0), 
        __decorate$3$1([ Event() ], DropDownList.prototype, "filtering", void 0), __decorate$3$1([ Event() ], DropDownList.prototype, "change", void 0), 
        __decorate$3$1([ Event() ], DropDownList.prototype, "open", void 0), __decorate$3$1([ Event() ], DropDownList.prototype, "close", void 0), 
        __decorate$3$1([ Event() ], DropDownList.prototype, "blur", void 0), __decorate$3$1([ Event() ], DropDownList.prototype, "focus", void 0), 
        DropDownList = __decorate$3$1([ NotifyPropertyChanges ], DropDownList);
    }(DropDownBase), __extends$10 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$9 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    dropDownListClasses.root = "e-combobox";
    var inputObject$1 = {
        container: null,
        buttons: []
    }, ComboBox = function(_super) {
        function ComboBox(options, element) {
            return _super.call(this, options, element) || this;
        }
        return __extends$10(ComboBox, _super), ComboBox.prototype.preRender = function() {
            _super.prototype.preRender.call(this);
        }, ComboBox.prototype.wireEvent = function() {
            "combobox" === this.getModuleName() && (EventHandler.add(this.inputWrapper.buttons[0], "mousedown", this.preventBlur, this), 
            EventHandler.add(this.inputWrapper.container, "blur", this.onBlur, this)), isNullOrUndefined(this.inputWrapper.buttons[0]) || EventHandler.add(this.inputWrapper.buttons[0], "mousedown", this.dropDownClick, this), 
            EventHandler.add(this.inputElement, "focus", this.targetFocus, this), this.readonly || (EventHandler.add(this.inputElement, "input", this.onInput, this), 
            EventHandler.add(this.inputElement, "keyup", this.onFilterUp, this), EventHandler.add(this.inputElement, "keydown", this.onFilterDown, this)), 
            this.bindCommonEvent();
        }, ComboBox.prototype.preventBlur = function(e) {
            (this.allowFiltering || document.activeElement === this.inputElement || document.activeElement.classList.contains(dropDownListClasses.input) || !Browser.isDevice) && Browser.isDevice || e.preventDefault();
        }, ComboBox.prototype.targetElement = function() {
            return this.inputElement;
        }, ComboBox.prototype.setOldText = function(text) {
            Input.setValue(this.text, this.inputElement, this.floatLabelType, this.showClearButton), 
            this.customValue(), this.removeSelection();
        }, ComboBox.prototype.setOldValue = function(value) {
            this.allowCustom ? this.valueMuteChange(this.value) : this.valueMuteChange(null), 
            this.removeSelection(), this.setHiddenValue();
        }, ComboBox.prototype.valueMuteChange = function(value) {
            var inputValue = isNullOrUndefined(value) ? null : value.toString();
            Input.setValue(inputValue, this.inputElement, this.floatLabelType, this.showClearButton), 
            this.setProperties({
                value: value,
                text: value,
                index: null
            }, !0), this.activeIndex = this.index;
            var fields = this.fields, dataItem = {};
            dataItem[fields.text] = isNullOrUndefined(value) ? null : value.toString(), dataItem[fields.value] = isNullOrUndefined(value) ? null : value.toString(), 
            this.itemData = dataItem, this.item = null, this.previousValue !== this.value && this.detachChangeEvent(null);
        }, ComboBox.prototype.updateValues = function() {
            if (isNullOrUndefined(this.value)) if (this.text && isNullOrUndefined(this.value)) {
                (li = this.getElementByText(this.text)) ? this.setSelection(li, null) : (Input.setValue(this.text, this.inputElement, this.floatLabelType, this.showClearButton), 
                this.customValue());
            } else this.setSelection(this.liCollections[this.activeIndex], null); else {
                var li;
                (li = this.getElementByValue(this.value)) ? this.setSelection(li, null) : this.allowCustom ? this.valueMuteChange(this.value) : this.valueMuteChange(null);
            }
            this.setHiddenValue(), Input.setValue(this.text, this.inputElement, this.floatLabelType, this.showClearButton);
        }, ComboBox.prototype.getAriaAttributes = function() {
            return {
                "aria-owns": this.element.id + "_options",
                role: "combobox",
                "aria-autocomplete": "both",
                "aria-labelledby": this.hiddenElement.id,
                "aria-hasPopup": "true",
                "aria-expanded": "false",
                "aria-readonly": this.readonly.toString(),
                autocomplete: "off",
                autocorrect: "off",
                autocapitalize: "off",
                spellcheck: "false"
            };
        }, ComboBox.prototype.searchLists = function(e) {
            this.isTyped = !0, this.isFiltering() ? (_super.prototype.searchLists.call(this, e), 
            "" === this.filterInput.value.trim() && this.setHoverList(this.ulElement.querySelector("." + dropDownListClasses.li))) : (this.ulElement && "" === this.inputElement.value && this.preventAutoFill && this.setHoverList(this.ulElement.querySelector("." + dropDownListClasses.li)), 
            this.incrementalSearch(e));
        }, ComboBox.prototype.getNgDirective = function() {
            return "EJS-COMBOBOX";
        }, ComboBox.prototype.setSearchBox = function() {
            return this.filterInput = this.inputElement, this.isFiltering() ? this.inputWrapper : inputObject$1;
        }, ComboBox.prototype.onActionComplete = function(ulElement, list, e, isUpdated) {
            _super.prototype.onActionComplete.call(this, ulElement, list, e), this.isSelectCustom && this.removeSelection(), 
            !this.preventAutoFill && "combobox" === this.getModuleName() && this.isTyped && this.inlineSearch();
        }, ComboBox.prototype.getFocusElement = function() {
            var dataItem = this.isSelectCustom ? {
                text: ""
            } : this.getItemData(), selected = this.list.querySelector("." + dropDownListClasses.selected);
            if (dataItem.text === this.inputElement.value && !isNullOrUndefined(selected)) return selected;
            if ((Browser.isDevice && !this.isDropDownClick || !Browser.isDevice) && !isNullOrUndefined(this.liCollections) && this.liCollections.length > 0) {
                var activeElement = Search(this.inputElement.value, this.liCollections, "StartsWith", !0).item;
                if (isNullOrUndefined(activeElement)) this.isSelectCustom && "" !== this.inputElement.value.trim() && (this.removeFocus(), 
                this.list.scrollTop = 0); else {
                    var count = this.getIndexByValue(activeElement.getAttribute("data-value")) - 1, height = parseInt(getComputedStyle(this.liCollections[0], null).getPropertyValue("height"), 10);
                    if (!isNaN(height) && "autocomplete" !== this.getModuleName()) {
                        this.removeFocus();
                        var fixedHead = this.fields.groupBy ? this.liCollections[0].offsetHeight : 0;
                        this.list.scrollTop = count * height + fixedHead, addClass([ activeElement ], dropDownListClasses.focus);
                    }
                }
                return activeElement;
            }
            return null;
        }, ComboBox.prototype.setValue = function(e) {
            return e && "keydown" === e.type && "enter" === e.action && this.removeFillSelection(), 
            this.autofill && "combobox" === this.getModuleName() && e && "keydown" === e.type && "enter" !== e.action ? (this.preventAutoFill = !1, 
            this.inlineSearch(e), !1) : _super.prototype.setValue.call(this, e);
        }, ComboBox.prototype.showSpinner = function() {
            isNullOrUndefined(this.spinnerElement) && (this.spinnerElement = this.inputWrapper.buttons[0] || this.inputWrapper.clearButton, 
            addClass([ this.spinnerElement ], dropDownListClasses.disableIcon), createSpinner({
                target: this.spinnerElement,
                width: Browser.isDevice ? "16px" : "14px"
            }), showSpinner(this.spinnerElement));
        }, ComboBox.prototype.hideSpinner = function() {
            isNullOrUndefined(this.spinnerElement) || (hideSpinner(this.spinnerElement), this.spinnerElement.innerHTML = "", 
            removeClass([ this.spinnerElement ], dropDownListClasses.disableIcon), this.spinnerElement = null);
        }, ComboBox.prototype.setAutoFill = function(activeElement, isHover) {
            if (isHover || this.setHoverList(activeElement), this.autofill && !this.preventAutoFill) {
                var currentValue = this.getTextByValue(activeElement.getAttribute("data-value")).toString(), currentFillValue = this.getFormattedValue(activeElement.getAttribute("data-value"));
                "combobox" === this.getModuleName() && (this.isSelected || this.previousValue === currentFillValue ? this.updateSelectedItem(activeElement, null, !0) : (this.updateSelectedItem(activeElement, null), 
                this.isSelected = !0, this.previousValue = this.getFormattedValue(activeElement.getAttribute("data-value")))), 
                this.isAndroidAutoFill(currentValue) || this.setAutoFillSelection(currentValue);
            }
        }, ComboBox.prototype.isAndroidAutoFill = function(value) {
            if (Browser.isAndroid) {
                var currentPoints = this.getSelectionPoints(), prevEnd = this.prevSelectPoints.end, curEnd = currentPoints.end, prevStart = this.prevSelectPoints.start, curStart = currentPoints.start;
                return 0 !== prevEnd && (prevEnd === value.length && prevStart === value.length || prevStart > curStart && prevEnd > curEnd || prevEnd === curEnd && prevStart === curStart);
            }
            return !1;
        }, ComboBox.prototype.isSelectFocusItem = function(element) {
            return !isNullOrUndefined(element);
        }, ComboBox.prototype.inlineSearch = function(e) {
            var isKeyNavigate = e && ("down" === e.action || "up" === e.action || "home" === e.action || "end" === e.action || "pageUp" === e.action || "pageDown" === e.action), activeElement = isKeyNavigate ? this.liCollections[this.activeIndex] : this.getFocusElement();
            if (isNullOrUndefined(activeElement)) if ("" === this.inputElement.value) {
                this.activeIndex = null, this.list.scrollTop = 0;
                var focusItem = this.list.querySelector("." + dropDownListClasses.li);
                this.setHoverList(focusItem);
            } else this.activeIndex = null, this.removeSelection(), this.removeFocus(); else {
                if (!isKeyNavigate) {
                    var value = this.getFormattedValue(activeElement.getAttribute("data-value"));
                    this.activeIndex = this.getIndexByValue(value), this.activeIndex = isNullOrUndefined(this.activeIndex) ? null : this.activeIndex;
                }
                this.preventAutoFill = "" !== this.inputElement.value && this.preventAutoFill, this.setAutoFill(activeElement, isKeyNavigate);
            }
        }, ComboBox.prototype.incrementalSearch = function(e) {
            this.showPopup(), isNullOrUndefined(this.listData) || (this.inlineSearch(e), e.preventDefault());
        }, ComboBox.prototype.setAutoFillSelection = function(currentValue) {
            var selection = this.getSelectionPoints(), value = this.inputElement.value.substr(0, selection.start);
            if (value && value.toLowerCase() === currentValue.substr(0, selection.start).toLowerCase()) {
                var inputValue = value + currentValue.substr(value.length, currentValue.length);
                Input.setValue(inputValue, this.inputElement, this.floatLabelType, this.showClearButton), 
                this.inputElement.setSelectionRange(selection.start, this.inputElement.value.length);
            } else Input.setValue(currentValue, this.inputElement, this.floatLabelType, this.showClearButton), 
            this.inputElement.setSelectionRange(0, this.inputElement.value.length);
        }, ComboBox.prototype.getValueByText = function(text) {
            return _super.prototype.getValueByText.call(this, text, !0);
        }, ComboBox.prototype.unWireEvent = function() {
            "combobox" === this.getModuleName() && (EventHandler.remove(this.inputWrapper.buttons[0], "mousedown", this.preventBlur), 
            EventHandler.remove(this.inputWrapper.container, "blur", this.onBlur)), isNullOrUndefined(this.inputWrapper.buttons[0]) || EventHandler.remove(this.inputWrapper.buttons[0], "mousedown", this.dropDownClick), 
            EventHandler.remove(this.inputElement, "focus", this.targetFocus), this.readonly || (EventHandler.remove(this.inputElement, "input", this.onInput), 
            EventHandler.remove(this.inputElement, "keyup", this.onFilterUp), EventHandler.remove(this.inputElement, "keydown", this.onFilterDown)), 
            this.unBindCommonEvent();
        }, ComboBox.prototype.setSelection = function(li, e) {
            _super.prototype.setSelection.call(this, li, e), isNullOrUndefined(li) || this.autofill || this.isDropDownClick || this.removeFocus();
        }, ComboBox.prototype.selectCurrentItem = function(e) {
            var li;
            this.isPopupOpen && ((li = this.list.querySelector("." + dropDownListClasses.focus)) && (this.setSelection(li, e), 
            this.isTyped = !1), this.isSelected && (this.isSelectCustom = !1, this.onChangeEvent(e))), 
            "enter" === e.action && "" === this.inputElement.value.trim() ? this.clear(e) : this.isTyped && !this.isSelected && isNullOrUndefined(li) && this.customValue(), 
            this.hidePopup();
        }, ComboBox.prototype.setHoverList = function(li) {
            this.removeSelection(), this.isValidLI(li) && !li.classList.contains(dropDownListClasses.selected) && (this.removeFocus(), 
            li.classList.add(dropDownListClasses.focus));
        }, ComboBox.prototype.targetFocus = function(e) {
            Browser.isDevice && !this.allowFiltering && (this.preventFocus = !1), this.onFocus();
        }, ComboBox.prototype.dropDownClick = function(e) {
            e.preventDefault(), Browser.isDevice && !this.allowFiltering && (this.preventFocus = !0), 
            _super.prototype.dropDownClick.call(this, e);
        }, ComboBox.prototype.customValue = function() {
            var value = this.getValueByText(this.inputElement.value);
            if (this.allowCustom || "" === this.inputElement.value) if ("" !== this.inputElement.value.trim()) {
                var previousValue = this.value;
                if (isNullOrUndefined(value)) {
                    var value_1 = "" === this.inputElement.value ? null : this.inputElement.value, fields = this.fields, eventArgs = void 0;
                    eventArgs = {
                        text: value_1,
                        item: {}
                    }, this.initial || this.trigger("customValueSpecifier", eventArgs);
                    var item = eventArgs.item, dataItem = {};
                    item && getValue(fields.text, item) && getValue(fields.value, item) ? dataItem = item : (setValue(fields.text, value_1, dataItem), 
                    setValue(fields.value, value_1, dataItem)), this.itemData = dataItem;
                    var changeData = {
                        text: getValue(fields.text, this.itemData),
                        value: getValue(fields.value, this.itemData),
                        index: null
                    };
                    this.setProperties(changeData, !0), this.setSelection(null, null), this.isSelectCustom = !0;
                } else this.isSelectCustom = !1, this.setProperties({
                    value: value
                });
                previousValue !== this.value && this.onChangeEvent(null);
            } else this.allowCustom && (this.isSelectCustom = !0); else this.setProperties({
                value: value
            }), isNullOrUndefined(this.value) && Input.setValue("", this.inputElement, this.floatLabelType, this.showClearButton);
        }, ComboBox.prototype.onPropertyChanged = function(newProp, oldProp) {
            this.setUpdateInitial([ "query", "dataSource" ], newProp);
            for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                var prop = _a[_i];
                switch (prop) {
                  case "readonly":
                    Input.setReadonly(this.readonly, this.inputElement), this.readonly ? (EventHandler.remove(this.inputElement, "keyup", this.onFilterUp), 
                    EventHandler.remove(this.inputElement, "keydown", this.onFilterDown)) : (EventHandler.add(this.inputElement, "keyup", this.onFilterUp, this), 
                    EventHandler.add(this.inputElement, "keydown", this.onFilterDown, this));
                    break;

                  case "allowFiltering":
                    this.setSearchBox();
                    break;

                  case "allowCustom":
                    break;

                  default:
                    var comboProps = void 0;
                    comboProps = this.getPropObject(prop, newProp, oldProp), _super.prototype.onPropertyChanged.call(this, comboProps.newProperty, comboProps.oldProperty);
                }
            }
        }, ComboBox.prototype.render = function() {
            _super.prototype.render.call(this), this.setSearchBox(), this.isFiltering() && "combobox" === this.getModuleName() && isNullOrUndefined(this.list) && _super.prototype.renderList.call(this);
        }, ComboBox.prototype.getModuleName = function() {
            return "combobox";
        }, ComboBox.prototype.hidePopup = function() {
            if (!isNullOrUndefined(this.listData)) {
                var isEscape = this.isEscapeKey;
                this.isEscapeKey && (Input.setValue(this.typedString, this.inputElement, this.floatLabelType, this.showClearButton), 
                this.isEscapeKey = !1), this.autofill && this.removeFillSelection();
                var dataItem = this.isSelectCustom ? {
                    text: ""
                } : this.getItemData(), selected = this.list.querySelector("." + dropDownListClasses.selected);
                if (dataItem.text === this.inputElement.value && !isNullOrUndefined(selected)) return this.isSelected && (this.onChangeEvent(null), 
                this.isSelectCustom = !1), void _super.prototype.hidePopup.call(this);
                if ("combobox" === this.getModuleName() && "" !== this.inputElement.value.trim()) {
                    var searchItem = Search(this.inputElement.value, this.liCollections, "Equal", !0);
                    this.selectedLI = searchItem.item, isNullOrUndefined(searchItem.index) && (searchItem.index = Search(this.inputElement.value, this.liCollections, "StartsWith", !0).index), 
                    this.activeIndex = searchItem.index, isNullOrUndefined(this.selectedLI) ? isEscape && (this.isSelectCustom = !0, 
                    this.removeSelection()) : this.updateSelectedItem(this.selectedLI, null, !0);
                }
                this.isEscapeKey || !this.isTyped || this.isInteracted || this.customValue();
            }
            _super.prototype.hidePopup.call(this);
        }, ComboBox.prototype.focusIn = function() {
            Browser.isDevice && !this.allowFiltering && (this.preventFocus = !0), _super.prototype.focusIn.call(this);
        }, __decorate$9([ Property(!1) ], ComboBox.prototype, "autofill", void 0), __decorate$9([ Property(!0) ], ComboBox.prototype, "allowCustom", void 0), 
        __decorate$9([ Property({}) ], ComboBox.prototype, "htmlAttributes", void 0), __decorate$9([ Property(!1) ], ComboBox.prototype, "allowFiltering", void 0), 
        __decorate$9([ Property(null) ], ComboBox.prototype, "query", void 0), __decorate$9([ Property(null) ], ComboBox.prototype, "index", void 0), 
        __decorate$9([ Property(!0) ], ComboBox.prototype, "showClearButton", void 0), __decorate$9([ Event() ], ComboBox.prototype, "customValueSpecifier", void 0), 
        __decorate$9([ Event() ], ComboBox.prototype, "filtering", void 0), __decorate$9([ Property(null) ], ComboBox.prototype, "valueTemplate", void 0), 
        __decorate$9([ Property("Never") ], ComboBox.prototype, "floatLabelType", void 0), 
        __decorate$9([ Property(null) ], ComboBox.prototype, "filterBarPlaceholder", void 0), 
        ComboBox = __decorate$9([ NotifyPropertyChanges ], ComboBox);
    }(DropDownList), __extends$2$1 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$2$1 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    dropDownListClasses.root = "e-autocomplete", dropDownListClasses.icon = "e-input-group-icon e-ddl-icon e-search-icon";
    var TimePickerBase, AutoComplete = function(_super) {
        function AutoComplete(options, element) {
            var _this = _super.call(this, options, element) || this;
            return _this.isFiltered = !1, _this;
        }
        return __extends$2$1(AutoComplete, _super), AutoComplete.prototype.preRender = function() {
            _super.prototype.preRender.call(this);
        }, AutoComplete.prototype.getNgDirective = function() {
            return "EJS-AUTOCOMPLETE";
        }, AutoComplete.prototype.getQuery = function(query) {
            var filterQuery = query ? query.clone() : this.query ? this.query.clone() : new Query(), filterType = "" !== this.queryString || isNullOrUndefined(this.value) ? this.filterType : "equal", queryString = "" !== this.queryString || isNullOrUndefined(this.value) ? this.queryString : this.value;
            if (this.isFiltered) return filterQuery;
            if (null !== this.queryString) {
                var dataType = this.typeOfData(this.dataSource).typeof;
                if ((this.dataSource instanceof DataManager || "string" !== dataType) && "number" !== dataType) {
                    var mapping = isNullOrUndefined(this.fields.value) ? "" : this.fields.value;
                    filterQuery.where(mapping, filterType, queryString, this.ignoreCase, this.ignoreAccent);
                } else filterQuery.where("", filterType, queryString, this.ignoreCase, this.ignoreAccent);
            }
            return isNullOrUndefined(this.suggestionCount) || filterQuery.take(this.suggestionCount), 
            filterQuery;
        }, AutoComplete.prototype.searchLists = function(e) {
            var _this = this;
            this.isTyped = !0, this.isSelectCustom = !1, isNullOrUndefined(this.list) && _super.prototype.renderList.call(this, !0);
            var isDownUpKey = 40 === e.keyCode || 38 === e.keyCode;
            if (this.queryString = this.filterInput.value, isDownUpKey) return this.queryString = "" === this.queryString ? null : this.queryString, 
            this.beforePopupOpen = !0, void this.resetList(this.dataSource, this.fields);
            this.isSelected = !1, this.activeIndex = null;
            var eventArgs = {
                preventDefaultAction: !1,
                text: this.filterInput.value,
                updateData: function(dataSource, query, fields) {
                    eventArgs.cancel || (_this.isFiltered = !0, _this.filterAction(dataSource, query, fields));
                },
                cancel: !1
            };
            this.trigger("filtering", eventArgs), eventArgs.cancel || this.isFiltered || eventArgs.preventDefaultAction || this.filterAction(this.dataSource, null, this.fields);
        }, AutoComplete.prototype.filterAction = function(dataSource, query, fields) {
            this.beforePopupOpen = !0, "" !== this.queryString && (this.queryString.length >= this.minLength || this.isFiltered) ? this.resetList(dataSource, fields, query) : this.hidePopup();
        }, AutoComplete.prototype.clear = function(e, property) {
            (isNullOrUndefined(property) || "dataSource" !== property) && _super.prototype.clear.call(this, e), 
            this.beforePopupOpen && this.hidePopup();
        }, AutoComplete.prototype.onActionComplete = function(ulElement, list, e, isUpdated) {
            this.fixedHeaderElement = null, _super.prototype.onActionComplete.call(this, ulElement, list, e);
            var item = this.list.querySelector("." + dropDownListClasses.li);
            isNullOrUndefined(item) || removeClass([ item ], dropDownListClasses.focus), this.postBackAction();
        }, AutoComplete.prototype.postBackAction = function() {
            if (null !== this.queryString && "" !== this.queryString && this.highlight && highlightSearch(this.list, this.queryString, this.ignoreCase, this.filterType), 
            this.autofill && !isNullOrUndefined(this.liCollections[0])) {
                var items = [ this.liCollections[0] ];
                isNullOrUndefined(Search(this.inputElement.value, items, "StartsWith", this.ignoreCase).item) || _super.prototype.setAutoFill.call(this, this.liCollections[0], !0);
            }
        }, AutoComplete.prototype.setSelection = function(li, e) {
            if (this.isValidLI(li)) if (!isNullOrUndefined(e) && "keydown" === e.type && "enter" !== e.action && this.isValidLI(li)) {
                var value = this.getFormattedValue(li.getAttribute("data-value"));
                this.activeIndex = this.getIndexByValue(value), this.setHoverList(li), this.selectedLI = li, 
                this.setScrollPosition(e), this.autofill && (this.preventAutoFill = !1, _super.prototype.setAutoFill.call(this, li)), 
                attributes(this.inputElement, {
                    "aria-activedescendant": this.selectedLI ? this.selectedLI.id : null
                });
            } else _super.prototype.setSelection.call(this, li, e);
        }, AutoComplete.prototype.showSpinner = function() {
            isNullOrUndefined(this.spinnerElement) && (this.spinnerElement = this.inputWrapper.buttons[0] || this.inputWrapper.clearButton || Input.appendSpan("e-input-group-icon e-atc-spinner-icon", this.inputWrapper.container), 
            addClass([ this.spinnerElement ], dropDownListClasses.disableIcon), createSpinner({
                target: this.spinnerElement,
                width: Browser.isDevice ? "16px" : "14px"
            }), showSpinner(this.spinnerElement));
        }, AutoComplete.prototype.hideSpinner = function() {
            isNullOrUndefined(this.spinnerElement) || (hideSpinner(this.spinnerElement), removeClass([ this.spinnerElement ], dropDownListClasses.disableIcon), 
            this.spinnerElement.classList.contains("e-atc-spinner-icon") ? detach(this.spinnerElement) : this.spinnerElement.innerHTML = "", 
            this.spinnerElement = null);
        }, AutoComplete.prototype.isFiltering = function() {
            return !0;
        }, AutoComplete.prototype.renderPopup = function() {
            this.list.scrollTop = 0, _super.prototype.renderPopup.call(this), this.highlight && highlightSearch(this.list, this.queryString, this.ignoreCase, this.filterType);
        }, AutoComplete.prototype.isEditTextBox = function() {
            return "" !== this.inputElement.value.trim();
        }, AutoComplete.prototype.isPopupButton = function() {
            return this.showPopupButton;
        }, AutoComplete.prototype.isSelectFocusItem = function(element) {
            return !1;
        }, AutoComplete.prototype.showPopup = function() {
            this.beforePopupOpen ? this.refreshPopup() : (this.beforePopupOpen = !0, this.preventAutoFill = !0, 
            isNullOrUndefined(this.list) ? this.renderList() : this.resetList(this.dataSource, this.fields));
        }, AutoComplete.prototype.hidePopup = function() {
            _super.prototype.hidePopup.call(this), this.activeIndex = -1;
        }, AutoComplete.prototype.onPropertyChanged = function(newProp, oldProp) {
            this.setUpdateInitial([ "query", "dataSource" ], newProp);
            for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                var prop = _a[_i];
                switch (prop) {
                  case "showPopupButton":
                    if (this.showPopupButton) {
                        var button = Input.appendSpan(dropDownListClasses.icon, this.inputWrapper.container);
                        this.inputWrapper.buttons[0] = button, EventHandler.add(this.inputWrapper.buttons[0], "click", this.dropDownClick, this);
                    } else detach(this.inputWrapper.buttons[0]), this.inputWrapper.buttons[0] = null;
                    break;

                  default:
                    var atcProps = void 0;
                    atcProps = this.getPropObject(prop, newProp, oldProp), _super.prototype.onPropertyChanged.call(this, atcProps.newProperty, atcProps.oldProperty);
                }
            }
        }, AutoComplete.prototype.getModuleName = function() {
            return "autocomplete";
        }, AutoComplete.prototype.render = function() {
            _super.prototype.render.call(this);
        }, __decorate$2$1([ Complex({
            value: null,
            iconCss: null,
            groupBy: null
        }, FieldSettings) ], AutoComplete.prototype, "fields", void 0), __decorate$2$1([ Property(!0) ], AutoComplete.prototype, "ignoreCase", void 0), 
        __decorate$2$1([ Property(!1) ], AutoComplete.prototype, "showPopupButton", void 0), 
        __decorate$2$1([ Property(!1) ], AutoComplete.prototype, "highlight", void 0), __decorate$2$1([ Property(20) ], AutoComplete.prototype, "suggestionCount", void 0), 
        __decorate$2$1([ Property({}) ], AutoComplete.prototype, "htmlAttributes", void 0), 
        __decorate$2$1([ Property(null) ], AutoComplete.prototype, "query", void 0), __decorate$2$1([ Property(1) ], AutoComplete.prototype, "minLength", void 0), 
        __decorate$2$1([ Property("Contains") ], AutoComplete.prototype, "filterType", void 0), 
        __decorate$2$1([ Event() ], AutoComplete.prototype, "filtering", void 0), __decorate$2$1([ Property(null) ], AutoComplete.prototype, "index", void 0), 
        __decorate$2$1([ Property("Never") ], AutoComplete.prototype, "floatLabelType", void 0), 
        __decorate$2$1([ Property(null) ], AutoComplete.prototype, "valueTemplate", void 0), 
        __decorate$2$1([ Property(null) ], AutoComplete.prototype, "filterBarPlaceholder", void 0), 
        __decorate$2$1([ Property(!1) ], AutoComplete.prototype, "allowFiltering", void 0), 
        __decorate$2$1([ Property(null) ], AutoComplete.prototype, "text", void 0), AutoComplete = __decorate$2$1([ NotifyPropertyChanges ], AutoComplete);
    }(ComboBox), __extends$11 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$10 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, cssClassName$__RTL = "e-rtl", cssClassName$__BUTTON = "e-btn", cssClassName$__PRIMARY = "e-primary", cssClassName$__ICONBTN = "e-icon-btn", Button$1 = function(_super) {
        function Button(options, element) {
            return _super.call(this, options, element) || this;
        }
        return __extends$11(Button, _super), Button.prototype.preRender = function() {}, 
        Button.prototype.render = function() {
            this.initialize();
        }, Button.prototype.initialize = function() {
            this.cssClass && addClass([ this.element ], this.cssClass.split(" ")), this.isPrimary && this.element.classList.add(cssClassName$__PRIMARY), 
            this.content && (this.element.innerHTML = this.content), this.setIconCss(), this.enableRtl && this.element.classList.add(cssClassName$__RTL), 
            this.disabled ? this.controlStatus(this.disabled) : this.wireEvents(), rippleEffect(this.element, {
                selector: "." + cssClassName$__BUTTON
            });
        }, Button.prototype.controlStatus = function(disabled) {
            this.element.disabled = disabled;
        }, Button.prototype.setIconCss = function() {
            if (this.iconCss) {
                var span = createElement("span", {
                    className: "e-btn-icon " + this.iconCss
                });
                this.element.textContent.trim() ? span.classList.add("e-icon-" + this.iconPosition.toLowerCase()) : this.element.classList.add(cssClassName$__ICONBTN);
                var node = this.element.childNodes[0];
                node && "Left" === this.iconPosition ? this.element.insertBefore(span, node) : this.element.appendChild(span);
            }
        }, Button.prototype.wireEvents = function() {
            this.isToggle && EventHandler.add(this.element, "click", this.btnClickHandler, this);
        }, Button.prototype.unWireEvents = function() {
            this.isToggle && EventHandler.remove(this.element, "click", this.btnClickHandler);
        }, Button.prototype.btnClickHandler = function() {
            this.element.classList.contains("e-active") ? this.element.classList.remove("e-active") : this.element.classList.add("e-active");
        }, Button.prototype.destroy = function() {
            var span, element = this.element;
            _super.prototype.destroy.call(this), removeClass([ this.element ], [ cssClassName$__PRIMARY, cssClassName$__RTL, cssClassName$__ICONBTN, "e-success", "e-info", "e-danger", "e-warning", "e-flat", "e-outline", "e-small", "e-bigger", "e-active", "e-round" ]), 
            [ "e-ripple", "disabled" ].forEach(function(value) {
                element.removeAttribute(value);
            }), this.content && (element.innerHTML = element.innerHTML.replace(this.content, "")), 
            (span = element.querySelector("span.e-btn-icon")) && detach(span), this.unWireEvents();
        }, Button.prototype.getModuleName = function() {
            return "btn";
        }, Button.prototype.getPersistData = function() {
            return this.addOnPersist([]);
        }, Button.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "isPrimary":
                    newProp.isPrimary ? this.element.classList.add(cssClassName$__PRIMARY) : this.element.classList.remove(cssClassName$__PRIMARY);
                    break;

                  case "disabled":
                    this.controlStatus(newProp.disabled), this.unWireEvents();
                    break;

                  case "iconCss":
                    var span = this.element.querySelector("span.e-btn-icon");
                    span ? (span.className = "e-btn-icon " + newProp.iconCss, this.element.textContent.trim() && ("Left" === this.iconPosition ? span.classList.add("e-icon-left") : span.classList.add("e-icon-right"))) : this.setIconCss();
                    break;

                  case "iconPosition":
                    (span = this.element.querySelector("span.e-btn-icon")) && detach(span), this.setIconCss();
                    break;

                  case "cssClass":
                    oldProp.cssClass && removeClass([ this.element ], oldProp.cssClass.split(" ")), 
                    addClass([ this.element ], newProp.cssClass.split(" "));
                    break;

                  case "enableRtl":
                    newProp.enableRtl ? this.element.classList.add(cssClassName$__RTL) : this.element.classList.remove(cssClassName$__RTL);
                    break;

                  case "content":
                    getTextNode$1(this.element) || this.element.classList.remove(cssClassName$__ICONBTN), 
                    this.element.innerHTML = newProp.content, this.setIconCss();
                    break;

                  case "isToggle":
                    newProp.isToggle ? EventHandler.add(this.element, "click", this.btnClickHandler, this) : (EventHandler.remove(this.element, "click", this.btnClickHandler), 
                    removeClass([ this.element ], [ "e-active" ]));
                }
            }
        }, __decorate$10([ Property("Left") ], Button.prototype, "iconPosition", void 0), 
        __decorate$10([ Property("") ], Button.prototype, "iconCss", void 0), __decorate$10([ Property(!1) ], Button.prototype, "disabled", void 0), 
        __decorate$10([ Property(!1) ], Button.prototype, "isPrimary", void 0), __decorate$10([ Property("") ], Button.prototype, "cssClass", void 0), 
        __decorate$10([ Property("") ], Button.prototype, "content", void 0), __decorate$10([ Property(!1) ], Button.prototype, "isToggle", void 0), 
        Button = __decorate$10([ NotifyPropertyChanges ], Button);
    }(Component), __extends$12 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$11 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, DISABLED$2 = "e-disabled", OVERLAY = "e-overlay", OTHERMONTH = "e-other-month", SELECTED = "e-selected", FOCUSEDDATE = "e-focused-date", Calendar = function(_super) {
        function Calendar(options, element) {
            var _this = _super.call(this, options, element) || this;
            return _this.effect = "", _this.keyConfigs = {
                controlUp: "ctrl+38",
                controlDown: "ctrl+40",
                moveDown: "downarrow",
                moveUp: "uparrow",
                moveLeft: "leftarrow",
                moveRight: "rightarrow",
                select: "enter",
                home: "home",
                end: "end",
                pageUp: "pageup",
                pageDown: "pagedown",
                shiftPageUp: "shift+pageup",
                shiftPageDown: "shift+pagedown",
                controlHome: "ctrl+home",
                controlEnd: "ctrl+end"
            }, _this;
        }
        return __extends$12(Calendar, _super), Calendar.prototype.render = function() {
            this.globalize = new Internationalization(this.locale), this.todayDisabled = !1, 
            this.todayDate = new Date(new Date().setHours(0, 0, 0, 0)), "calendar" === this.getModuleName() ? (this.element.classList.add("e-calendar"), 
            this.enableRtl && this.element.classList.add("e-rtl"), Browser.isDevice && this.element.classList.add("e-device"), 
            attributes(this.element, {
                "data-role": "calendar"
            })) : (this.calendarElement = createElement("div"), this.calendarElement.classList.add("e-calendar"), 
            this.enableRtl && this.calendarElement.classList.add("e-rtl"), Browser.isDevice && this.calendarElement.classList.add("e-device"), 
            attributes(this.calendarElement, {
                role: "calendar"
            })), this.processDate(), this.header(), this.content(), this.wireEvents();
        }, Calendar.prototype.processDate = function() {
            this.validateDate(), this.minMaxUpdate();
        }, Calendar.prototype.validateDate = function() {
            this.setProperties({
                value: this.checkDateValue(new Date("" + this.value))
            }, !0), this.setProperties({
                min: this.checkDateValue(new Date("" + this.min))
            }, !0), this.setProperties({
                max: this.checkDateValue(new Date("" + this.max))
            }, !0), this.currentDate = this.currentDate ? this.currentDate : new Date(new Date().setHours(0, 0, 0, 0)), 
            !isNullOrUndefined(this.value) && this.min <= this.max && this.value >= this.min && this.value <= this.max && (this.currentDate = new Date("" + this.value)), 
            isNaN(+this.value) && this.setProperties({
                value: null
            }, !0);
        }, Calendar.prototype.minMaxUpdate = function() {
            this.min <= this.max ? removeClass([ this.element ], OVERLAY) : (this.setProperties({
                min: this.min
            }, !0), addClass([ this.element ], OVERLAY)), this.min = isNullOrUndefined(this.min) || !+this.min ? this.min = new Date(1900, 0, 1) : this.min, 
            this.max = isNullOrUndefined(this.max) || !+this.max ? this.max = new Date(2099, 11, 31) : this.max, 
            !isNullOrUndefined(this.value) && this.value <= this.min && this.min <= this.max ? (this.setProperties({
                value: this.min
            }, !0), this.changedArgs = {
                value: this.value
            }) : !isNullOrUndefined(this.value) && this.value >= this.max && this.min <= this.max && (this.setProperties({
                value: this.max
            }, !0), this.changedArgs = {
                value: this.value
            }), this.min <= this.max && this.value && this.value <= this.max && this.value >= this.min ? this.currentDate = new Date("" + this.value) : this.min <= this.max && !this.value && this.currentDate > this.max ? this.currentDate = new Date("" + this.max) : this.currentDate < this.min && (this.currentDate = new Date("" + this.min));
        }, Calendar.prototype.header = function() {
            this.headerElement = createElement("div", {
                className: "e-header"
            });
            var iconContainer = createElement("div", {
                className: "e-icon-container"
            });
            this.previousIcon = createElement("button", {
                className: "e-prev",
                attrs: {
                    type: "button"
                }
            }), rippleEffect(this.previousIcon, {
                duration: 400,
                selector: ".e-prev",
                isCenterRipple: !0
            }), attributes(this.previousIcon, {
                "aria-disabled": "false",
                "aria-label": "previous month"
            }), this.nextIcon = createElement("button", {
                className: "e-next",
                attrs: {
                    type: "button"
                }
            }), rippleEffect(this.nextIcon, {
                selector: ".e-next",
                duration: 400,
                isCenterRipple: !0
            }), attributes(this.nextIcon, {
                "aria-disabled": "false",
                "aria-label": "next month"
            }), this.headerTitleElement = createElement("div", {
                className: "e-day e-title"
            }), attributes(this.headerTitleElement, {
                "aria-atomic": "true",
                "aria-live": "assertive",
                "aria-label": "title"
            }), this.headerElement.appendChild(this.headerTitleElement), this.previousIcon.appendChild(createElement("span", {
                className: "e-date-icon-prev e-icons"
            })), this.nextIcon.appendChild(createElement("span", {
                className: "e-date-icon-next  e-icons"
            })), iconContainer.appendChild(this.previousIcon), iconContainer.appendChild(this.nextIcon), 
            this.headerElement.appendChild(iconContainer), "calendar" === this.getModuleName() ? this.element.appendChild(this.headerElement) : this.calendarElement.appendChild(this.headerElement);
        }, Calendar.prototype.content = function() {
            this.previousDate = this.value, this.contentElement = createElement("div", {
                className: "e-content"
            }), this.table = createElement("table", {
                attrs: {
                    tabIndex: "0",
                    role: "grid",
                    "aria-activedescendant": ""
                }
            }), "calendar" === this.getModuleName() ? this.element.appendChild(this.contentElement) : this.calendarElement.appendChild(this.contentElement), 
            this.contentElement.appendChild(this.table), this.contentHdr(), this.contentBody(), 
            this.showTodayButton && this.contentFooter();
        }, Calendar.prototype.getCultureValues = function() {
            var cldrObj, culShortNames = [];
            cldrObj = "en" === this.locale || "en-US" === this.locale ? getValue("days.stand-alone.short", getDefaultDateObject()) : this.getCultureObjects(cldrData, "" + this.locale);
            for (var _i = 0, _a = Object.keys(cldrObj); _i < _a.length; _i++) {
                var obj = _a[_i];
                culShortNames.push(getValue(obj, cldrObj));
            }
            return culShortNames;
        }, Calendar.prototype.contentHdr = function() {
            "calendar" === this.getModuleName() ? isNullOrUndefined(this.element.querySelectorAll(".e-content .e-week-header")[0]) || detach(this.element.querySelectorAll(".e-content .e-week-header")[0]) : isNullOrUndefined(this.calendarElement.querySelectorAll(".e-content .e-week-header")[0]) || detach(this.calendarElement.querySelectorAll(".e-content .e-week-header")[0]);
            var shortNames, html = "";
            (this.firstDayOfWeek > 6 || this.firstDayOfWeek < 0) && this.setProperties({
                firstDayOfWeek: 0
            }, !0), this.tableHeadElement = createElement("thead", {
                className: "e-week-header"
            }), this.weekNumber && (html += '<th class="e-week-number"></th>', addClass([ this.element ], "e-week-number")), 
            shortNames = this.shiftArray(this.getCultureValues().length > 0 && this.getCultureValues(), this.firstDayOfWeek);
            for (var days = 0; days <= 6; days++) html += '<th  class="">' + shortNames[days] + "</th>";
            html = "<tr>" + html + "</tr>", this.tableHeadElement.innerHTML = html, this.table.appendChild(this.tableHeadElement);
        }, Calendar.prototype.contentBody = function() {
            switch ("calendar" === this.getModuleName() ? isNullOrUndefined(this.element.querySelectorAll(".e-content tbody")[0]) || detach(this.element.querySelectorAll(".e-content tbody")[0]) : isNullOrUndefined(this.calendarElement.querySelectorAll(".e-content tbody")[0]) || detach(this.calendarElement.querySelectorAll(".e-content tbody")[0]), 
            this.start) {
              case "Year":
                this.renderYears();
                break;

              case "Decade":
                this.renderDecades();
                break;

              default:
                this.renderMonths();
            }
        }, Calendar.prototype.updateFooter = function() {
            this.todayElement.textContent = this.l10.getConstant("today");
        }, Calendar.prototype.contentFooter = function() {
            if (this.showTodayButton) {
                var minimum = new Date(this.min.toDateString()), maximum = new Date(this.max.toDateString());
                this.globalize = new Internationalization(this.locale), this.l10 = new L10n(this.getModuleName(), {
                    today: "Today"
                }, this.locale), this.todayElement = createElement("button"), rippleEffect(this.todayElement), 
                this.updateFooter(), addClass([ this.todayElement ], [ "e-btn", "e-today", "e-flat" ]), 
                new Date(minimum.setHours(0, 0, 0, 0)) <= this.todayDate && this.todayDate <= new Date(maximum.setHours(0, 0, 0, 0)) && !this.todayDisabled || addClass([ this.todayElement ], DISABLED$2), 
                this.footer = createElement("div", {
                    className: "e-footer-container"
                }), this.footer.appendChild(this.todayElement), "calendar" === this.getModuleName() && this.element.appendChild(this.footer), 
                "datepicker" === this.getModuleName() && this.calendarElement.appendChild(this.footer), 
                "datetimepicker" === this.getModuleName() && this.calendarElement.appendChild(this.footer), 
                this.todayElement.classList.contains(DISABLED$2) || EventHandler.add(this.todayElement, "click", this.todayButtonClick, this);
            }
        }, Calendar.prototype.wireEvents = function() {
            EventHandler.add(this.headerTitleElement, "click", this.navTitle, this), "calendar" === this.getModuleName() ? this.keyboardModule = new KeyboardEvents(this.element, {
                eventName: "keydown",
                keyAction: this.keyActionHandle.bind(this),
                keyConfigs: this.keyConfigs
            }) : this.keyboardModule = new KeyboardEvents(this.calendarElement, {
                eventName: "keydown",
                keyAction: this.keyActionHandle.bind(this),
                keyConfigs: this.keyConfigs
            });
        }, Calendar.prototype.todayButtonClick = function() {
            if (this.showTodayButton) {
                var tempValue = new Date();
                this.value ? (tempValue.setHours(this.value.getHours()), tempValue.setMinutes(this.value.getMinutes()), 
                tempValue.setSeconds(this.value.getSeconds())) : tempValue = new Date(tempValue.getFullYear(), tempValue.getMonth(), tempValue.getDate(), 0, 0, 0), 
                this.setProperties({
                    value: tempValue
                }, !0), this.getViewNumber(this.start) >= this.getViewNumber(this.depth) ? this.navigateTo(this.depth, new Date("" + this.value)) : this.navigateTo("Month", new Date("" + this.value)), 
                this.effect = "";
            }
        }, Calendar.prototype.keyActionHandle = function(e) {
            var view = this.getViewNumber(this.currentView()), focusedDate = this.tableBodyElement.querySelector("tr td.e-focused-date"), selectedDate = this.tableBodyElement.querySelector("tr td.e-selected"), depthValue = this.getViewNumber(this.depth), levelRestrict = view === depthValue && this.getViewNumber(this.start) >= depthValue;
            switch (this.effect = "", e.action) {
              case "moveLeft":
                this.KeyboardNavigate(-1, view, e, this.max, this.min), e.preventDefault();
                break;

              case "moveRight":
                this.KeyboardNavigate(1, view, e, this.max, this.min), e.preventDefault();
                break;

              case "moveUp":
                0 === view ? this.KeyboardNavigate(-7, view, e, this.max, this.min) : this.KeyboardNavigate(-4, view, e, this.max, this.min), 
                e.preventDefault();
                break;

              case "moveDown":
                0 === view ? this.KeyboardNavigate(7, view, e, this.max, this.min) : this.KeyboardNavigate(4, view, e, this.max, this.min), 
                e.preventDefault();
                break;

              case "select":
                if (e.target === this.todayElement) this.todayButtonClick(); else {
                    var element = isNullOrUndefined(focusedDate) ? selectedDate : focusedDate;
                    if (!isNullOrUndefined(element) && !element.classList.contains(DISABLED$2)) if (levelRestrict) {
                        var d = new Date(parseInt("" + element.id, 0));
                        this.selectDate(e, d, element);
                    } else this.contentClick(null, --view, element);
                }
                break;

              case "controlUp":
                this.title(), e.preventDefault();
                break;

              case "controlDown":
                isNullOrUndefined(focusedDate) && (isNullOrUndefined(selectedDate) || levelRestrict) || this.contentClick(null, --view, focusedDate || selectedDate), 
                e.preventDefault();
                break;

              case "home":
                this.currentDate = this.firstDay(this.currentDate), detach(this.tableBodyElement), 
                this.renderMonths(e), e.preventDefault();
                break;

              case "end":
                this.currentDate = this.lastDay(this.currentDate), detach(this.tableBodyElement), 
                this.renderMonths(e), e.preventDefault();
                break;

              case "pageUp":
                this.addMonths(this.currentDate, -1), this.navigateTo("Month", this.currentDate), 
                e.preventDefault();
                break;

              case "pageDown":
                this.addMonths(this.currentDate, 1), this.navigateTo("Month", this.currentDate), 
                e.preventDefault();
                break;

              case "shiftPageUp":
                this.addYears(this.currentDate, -1), this.navigateTo("Month", this.currentDate), 
                e.preventDefault();
                break;

              case "shiftPageDown":
                this.addYears(this.currentDate, 1), this.navigateTo("Month", this.currentDate), 
                e.preventDefault();
                break;

              case "controlHome":
                this.navigateTo("Month", new Date(this.currentDate.getFullYear(), 0, 1)), e.preventDefault();
                break;

              case "controlEnd":
                this.navigateTo("Month", new Date(this.currentDate.getFullYear(), 11, 31)), e.preventDefault();
            }
            "calendar" === this.getModuleName() && this.table.focus();
        }, Calendar.prototype.KeyboardNavigate = function(number, currentView, e, max, min) {
            var date = new Date("" + this.currentDate);
            switch (currentView) {
              case 2:
                this.addYears(this.currentDate, number), this.isMinMaxRange(this.currentDate) ? (detach(this.tableBodyElement), 
                this.renderDecades(e)) : this.currentDate = date;
                break;

              case 1:
                this.addMonths(this.currentDate, number), this.isMinMaxRange(this.currentDate) ? (detach(this.tableBodyElement), 
                this.renderYears(e)) : this.currentDate = date;
                break;

              case 0:
                this.addDay(this.currentDate, number, e, max, min), this.isMinMaxRange(this.currentDate) ? (detach(this.tableBodyElement), 
                this.renderMonths(e)) : this.currentDate = date;
            }
        }, Calendar.prototype.preRender = function() {
            var _this = this;
            this.navigatePreviousHandler = this.navigatePrevious.bind(this), this.navigateNextHandler = this.navigateNext.bind(this), 
            this.changeHandler = function(e) {
                _this.triggerChange(e);
            }, this.navigateHandler = function(e) {
                _this.triggerNavigate(e);
            };
        }, Calendar.prototype.minMaxDate = function(localDate) {
            var currentDate = new Date(new Date(+localDate).setHours(0, 0, 0, 0)), minDate = new Date(new Date(+this.min).setHours(0, 0, 0, 0)), maxDate = new Date(new Date(+this.max).setHours(0, 0, 0, 0));
            return +currentDate != +minDate && +currentDate != +maxDate || (+localDate < +this.min && (localDate = new Date(+this.min)), 
            +localDate > +this.max && (localDate = new Date(+this.max))), localDate;
        }, Calendar.prototype.renderMonths = function(e) {
            var numCells = this.weekNumber ? 8 : 7, tdEles = this.renderDays(this.currentDate, e);
            this.contentHdr(), this.renderTemplate(tdEles, numCells, "e-month", e);
        }, Calendar.prototype.renderDays = function(currentDate, e) {
            var minMaxDate, tdEles = [], localDate = new Date("" + currentDate), currentMonth = (this.weekNumber, 
            localDate.getMonth());
            this.titleUpdate(currentDate, "days");
            var d = localDate;
            for (localDate = new Date(d.getFullYear(), d.getMonth(), 0, d.getHours(), d.getMinutes(), d.getSeconds(), d.getMilliseconds()); localDate.getDay() !== this.firstDayOfWeek; ) this.setTime(localDate, -864e5);
            for (var day = 0; day < 42; ++day) {
                var weekEle = createElement("td", {
                    className: "e-cell"
                }), weekAnchor = createElement("span");
                day % 7 == 0 && this.weekNumber && (weekAnchor.textContent = "" + this.getWeek(localDate), 
                weekEle.appendChild(weekAnchor), addClass([ weekEle ], "e-week-number"), tdEles.push(weekEle)), 
                minMaxDate = new Date(+localDate), localDate = this.minMaxDate(localDate);
                var dateFormatOptions = {
                    type: "dateTime",
                    skeleton: "full"
                }, date = this.globalize.parseDate(this.globalize.formatDate(localDate, dateFormatOptions), dateFormatOptions), tdEle = this.dayCell(localDate), title = this.globalize.formatDate(localDate, {
                    type: "date",
                    skeleton: "full"
                }), dayLink = createElement("span");
                dayLink.textContent = this.globalize.formatDate(localDate, {
                    type: "date",
                    skeleton: "d"
                });
                var disabled = this.min > localDate || this.max < localDate;
                disabled ? (addClass([ tdEle ], DISABLED$2), addClass([ tdEle ], OVERLAY)) : dayLink.setAttribute("title", "" + title), 
                currentMonth !== localDate.getMonth() && addClass([ tdEle ], OTHERMONTH), 0 !== localDate.getDay() && 6 !== localDate.getDay() || addClass([ tdEle ], "e-weekend"), 
                tdEle.appendChild(dayLink), this.renderDaycellArg = {
                    date: localDate,
                    isDisabled: !1,
                    element: tdEle,
                    isOutOfRange: disabled
                };
                var args = this.renderDaycellArg;
                this.renderDayCellEvent(args), args.isDisabled && this.value && +this.value == +args.date && this.setProperties({
                    value: null
                }, !0), this.renderDaycellArg.isDisabled && !tdEle.classList.contains(SELECTED) && (addClass([ tdEle ], DISABLED$2), 
                addClass([ tdEle ], OVERLAY), +this.renderDaycellArg.date == +this.todayDate && (this.todayDisabled = !0));
                var otherMnthBool = tdEle.classList.contains(OTHERMONTH), disabledCls = tdEle.classList.contains(DISABLED$2);
                disabledCls || EventHandler.add(tdEle, "click", this.clickHandler, this), args.isDisabled && +this.value == +args.date && this.setProperties({
                    value: null
                }, !0), otherMnthBool || disabledCls || !this.getDateVal(localDate) ? currentDate.getDate() !== localDate.getDate() || otherMnthBool || disabledCls ? (currentDate >= this.max && parseInt(tdEle.id, 0) === +this.max && !otherMnthBool && !disabledCls && addClass([ tdEle ], FOCUSEDDATE), 
                currentDate <= this.min && parseInt(tdEle.id, 0) === +this.min && !otherMnthBool && !disabledCls && addClass([ tdEle ], FOCUSEDDATE)) : addClass([ tdEle ], FOCUSEDDATE) : addClass([ tdEle ], SELECTED), 
                date.getMonth() === new Date().getMonth() && date.getDate() === new Date().getDate() && date.getFullYear() === new Date().getFullYear() && addClass([ tdEle ], "e-today"), 
                tdEles.push(this.renderDaycellArg.element), localDate = new Date(+minMaxDate), this.addDay(localDate, 1, null, this.max, this.min);
            }
            return tdEles;
        }, Calendar.prototype.renderYears = function(e) {
            this.removeTheadEle();
            var tdEles = [], valueUtil = isNullOrUndefined(this.value), curDate = new Date("" + this.currentDate), mon = curDate.getMonth(), yr = curDate.getFullYear(), localDate = curDate, curYrs = localDate.getFullYear(), minYr = new Date("" + this.min).getFullYear(), minMonth = new Date("" + this.min).getMonth(), maxYr = new Date("" + this.max).getFullYear(), maxMonth = new Date("" + this.max).getMonth();
            localDate.setMonth(0), this.titleUpdate(this.currentDate, "months");
            this.min > localDate || this.max;
            localDate.setDate(1);
            for (var month = 0; month < 12; ++month) {
                var tdEle = this.dayCell(localDate), dayLink = createElement("span"), localMonth = this.value && this.value.getMonth() === localDate.getMonth(), select$$1 = this.value && this.value.getFullYear() === yr && localMonth;
                dayLink.textContent = this.globalize.formatDate(localDate, {
                    type: "dateTime",
                    skeleton: "MMM"
                }), this.min && (curYrs < minYr || month < minMonth && curYrs === minYr) || this.max && (curYrs > maxYr || month > maxMonth && curYrs >= maxYr) ? addClass([ tdEle ], DISABLED$2) : !valueUtil && select$$1 ? addClass([ tdEle ], SELECTED) : localDate.getMonth() === mon && this.currentDate.getMonth() === mon && addClass([ tdEle ], FOCUSEDDATE), 
                localDate.setDate(1), localDate.setMonth(localDate.getMonth() + 1), tdEle.classList.contains(DISABLED$2) || EventHandler.add(tdEle, "click", this.clickHandler, this), 
                tdEle.appendChild(dayLink), tdEles.push(tdEle);
            }
            this.renderTemplate(tdEles, 4, "e-year", e);
        }, Calendar.prototype.renderDecades = function(e) {
            this.removeTheadEle();
            var tdEles = [], localDate = new Date("" + this.currentDate);
            localDate.setMonth(0), localDate.setDate(1);
            var localYr = localDate.getFullYear(), startYr = new Date("" + (localYr - localYr % 10)), endYr = new Date("" + (localYr - localYr % 10 + 9)), startHdrYr = this.globalize.formatDate(startYr, {
                type: "dateTime",
                skeleton: "y"
            }), endHdrYr = this.globalize.formatDate(endYr, {
                type: "dateTime",
                skeleton: "y"
            });
            this.headerTitleElement.textContent = startHdrYr + " - " + endHdrYr;
            for (var startYear = new Date(localYr - localYr % 10 - 1, 0, 1).getFullYear(), rowIterator = 0; rowIterator < 12; ++rowIterator) {
                var year = startYear + rowIterator;
                localDate.setFullYear(year);
                var tdEle = this.dayCell(localDate);
                attributes(tdEle, {
                    role: "gridcell"
                });
                var dayLink = createElement("span");
                dayLink.textContent = this.globalize.formatDate(localDate, {
                    type: "dateTime",
                    skeleton: "y"
                }), year < new Date("" + this.min).getFullYear() || year > new Date("" + this.max).getFullYear() ? addClass([ tdEle ], DISABLED$2) : isNullOrUndefined(this.value) || localDate.getFullYear() !== this.value.getFullYear() ? localDate.getFullYear() !== this.currentDate.getFullYear() || tdEle.classList.contains(DISABLED$2) || addClass([ tdEle ], FOCUSEDDATE) : addClass([ tdEle ], SELECTED), 
                tdEle.classList.contains(DISABLED$2) || EventHandler.add(tdEle, "click", this.clickHandler, this), 
                tdEle.appendChild(dayLink), tdEles.push(tdEle);
            }
            this.renderTemplate(tdEles, 4, "e-decade", e);
        }, Calendar.prototype.dayCell = function(localDate) {
            var dateFormatOptions = {
                skeleton: "full",
                type: "dateTime"
            };
            return createElement("td", {
                className: "e-cell",
                attrs: {
                    id: "" + getUniqueID("" + this.globalize.parseDate(this.globalize.formatDate(localDate, dateFormatOptions), dateFormatOptions).valueOf()),
                    "aria-selected": "false",
                    role: "gridcell"
                }
            });
        }, Calendar.prototype.firstDay = function(date) {
            var collection = this.tableBodyElement.querySelectorAll("td:not(." + OTHERMONTH);
            if (collection.length) for (var i = 0; i < collection.length; i++) if (!collection[i].classList.contains(DISABLED$2)) {
                date = new Date(parseInt(collection[i].id, 0));
                break;
            }
            return date;
        }, Calendar.prototype.lastDay = function(date) {
            var lastDate = new Date(date.getFullYear(), date.getMonth() + 1, 0), timeOffset = Math.abs(lastDate.getTimezoneOffset() - this.firstDay(date).getTimezoneOffset());
            return timeOffset && lastDate.setHours(this.firstDay(date).getHours() + timeOffset / 60), 
            this.findlastDay(lastDate);
        }, Calendar.prototype.checkDateValue = function(value) {
            return !isNullOrUndefined(value) && value instanceof Date && !isNaN(+value) ? value : null;
        }, Calendar.prototype.findlastDay = function(date) {
            var collection = this.tableBodyElement.querySelectorAll("td:not(." + OTHERMONTH);
            if (collection.length) for (var i = collection.length - 1; i >= 0; i--) if (!collection[i].classList.contains(DISABLED$2)) {
                date = new Date(parseInt(collection[i].id, 0));
                break;
            }
            return date;
        }, Calendar.prototype.removeTheadEle = function() {
            "calendar" === this.getModuleName() ? isNullOrUndefined(this.element.querySelectorAll(".e-content table thead")[0]) || detach(this.tableHeadElement) : isNullOrUndefined(this.calendarElement.querySelectorAll(".e-content table thead")[0]) || detach(this.tableHeadElement);
        }, Calendar.prototype.renderTemplate = function(elements, numCells, classNm, e) {
            var trEle, view = this.getViewNumber(this.currentView());
            this.tableBodyElement = createElement("tbody"), this.table.appendChild(this.tableBodyElement), 
            removeClass([ this.contentElement, this.headerElement ], [ "e-month", "e-decade", "e-year" ]), 
            addClass([ this.contentElement, this.headerElement ], [ classNm ]);
            for (var row = numCells, rowIterator = 0, dayCell = 0; dayCell < elements.length / numCells; ++dayCell) {
                for (trEle = createElement("tr", {
                    attrs: {
                        role: "row"
                    }
                }), rowIterator = 0 + rowIterator; rowIterator < row; rowIterator++) elements[rowIterator].classList.contains("e-week-number") || isNullOrUndefined(elements[rowIterator].children[0]) || (addClass([ elements[rowIterator].children[0] ], [ "e-day" ]), 
                rippleEffect(elements[rowIterator].children[0], {
                    duration: 600,
                    isCenterRipple: !0
                })), trEle.appendChild(elements[rowIterator]), !this.weekNumber && 6 === rowIterator && elements[6].classList.contains(OTHERMONTH) && addClass([ trEle ], "e-month-hide"), 
                this.weekNumber ? 41 === rowIterator && elements[41].classList.contains(OTHERMONTH) && addClass([ trEle ], "e-month-hide") : 35 === rowIterator && elements[35].classList.contains(OTHERMONTH) && addClass([ trEle ], "e-month-hide");
                row += numCells, rowIterator += 0, this.tableBodyElement.appendChild(trEle);
            }
            this.table.querySelector("tbody").className = this.effect, this.iconHandler(), this.changedArgs = {
                value: this.value
            }, (view !== this.getViewNumber(this.currentView()) || 0 === view && view !== this.getViewNumber(this.currentView())) && this.navigateHandler(e), 
            this.setAriaActivedescendant(), this.changeHandler();
        }, Calendar.prototype.clickHandler = function(e) {
            e.preventDefault();
            var eve = e.currentTarget, view = this.getViewNumber(this.currentView());
            eve.classList.contains(OTHERMONTH) ? (this.value = this.getIdValue(e, null), this.contentClick(e, 0, null)) : view === this.getViewNumber(this.depth) && this.getViewNumber(this.start) >= this.getViewNumber(this.depth) ? this.contentClick(e, 1, null) : 2 === view ? this.contentClick(e, 1, null) : eve.classList.contains(OTHERMONTH) || 0 !== view ? this.contentClick(e, 0, eve) : this.selectDate(e, this.getIdValue(e, null), null), 
            "calendar" === this.getModuleName() && this.table.focus();
        }, Calendar.prototype.contentClick = function(e, view, ele) {
            var currentView = this.getViewNumber(this.currentView()), d = this.getIdValue(e, ele);
            switch (view) {
              case 0:
                currentView === this.getViewNumber(this.depth) && this.getViewNumber(this.start) >= this.getViewNumber(this.depth) ? (detach(this.tableBodyElement), 
                this.currentDate = d, this.effect = "e-zoomin", this.renderMonths(e)) : (this.currentDate.setMonth(d.getMonth()), 
                d.getMonth() > 0 && this.currentDate.getMonth() !== d.getMonth() && this.currentDate.setDate(0), 
                this.currentDate.setFullYear(d.getFullYear()), this.effect = "e-zoomin", detach(this.tableBodyElement), 
                this.renderMonths(e));
                break;

              case 1:
                currentView === this.getViewNumber(this.depth) && this.getViewNumber(this.start) >= this.getViewNumber(this.depth) ? this.selectDate(e, d, null) : (this.currentDate.setFullYear(d.getFullYear()), 
                this.effect = "e-zoomin", detach(this.tableBodyElement), this.renderYears(e));
            }
        }, Calendar.prototype.switchView = function(view, e) {
            switch (view) {
              case 0:
                detach(this.tableBodyElement), this.renderMonths(e);
                break;

              case 1:
                detach(this.tableBodyElement), this.renderYears(e);
                break;

              case 2:
                detach(this.tableBodyElement), this.renderDecades(e);
            }
        }, Calendar.prototype.getModuleName = function() {
            return "calendar";
        }, Calendar.prototype.getPersistData = function() {
            return this.addOnPersist([ "value" ]);
        }, Calendar.prototype.onPropertyChanged = function(newProp, oldProp) {
            this.effect = "";
            for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                var prop = _a[_i];
                switch (prop) {
                  case "value":
                    this.setProperties({
                        value: new Date("" + newProp.value)
                    }, !0), isNaN(+this.value) && this.setProperties({
                        value: oldProp.value
                    }, !0), this.validateDate(), this.minMaxUpdate(), this.setvalue();
                    break;

                  case "enableRtl":
                    newProp.enableRtl ? "calendar" === this.getModuleName() ? this.element.classList.add("e-rtl") : this.calendarElement.classList.add("e-rtl") : "calendar" === this.getModuleName() ? this.element.classList.remove("e-rtl") : this.calendarElement.classList.remove("e-rtl");
                    break;

                  case "start":
                  case "weekNumber":
                  case "firstDayOfWeek":
                    this.contentHdr(), this.contentBody();
                    break;

                  case "min":
                  case "max":
                    "min" === prop ? this.setProperties({
                        min: this.checkDateValue(new Date("" + newProp.min))
                    }, !0) : this.setProperties({
                        max: this.checkDateValue(new Date("" + newProp.max))
                    }, !0), this.setProperties({
                        start: this.currentView()
                    }, !0), detach(this.tableBodyElement), this.minMaxUpdate(), this.contentBody(), 
                    (this.todayDate < this.min || this.max < this.todayDate) && this.footer && this.todayElement ? (this.todayElement.remove(), 
                    this.footer.remove(), this.todayElement = this.footer = void 0, this.contentFooter()) : this.todayElement.classList.contains("e-disabled") && this.footer && this.todayElement && removeClass([ this.todayElement ], DISABLED$2);
                    break;

                  case "locale":
                    this.globalize = new Internationalization(this.locale), this.contentHdr(), this.contentBody(), 
                    this.l10.setLocale(this.locale), this.updateFooter();
                    break;

                  case "showTodayButton":
                    newProp.showTodayButton ? this.contentFooter() : (this.todayElement.remove(), this.footer.remove(), 
                    this.todayElement = this.footer = void 0), this.setProperties({
                        showTodayButton: newProp.showTodayButton
                    }, !0);
                }
            }
        }, Calendar.prototype.setvalue = function() {
            this.tableBodyElement.remove(), this.setProperties({
                start: this.currentView()
            }, !0), this.contentBody();
        }, Calendar.prototype.titleUpdate = function(date, view) {
            var globalize = new Internationalization(this.locale);
            switch (view) {
              case "days":
                this.headerTitleElement.textContent = globalize.formatDate(date, {
                    type: "dateTime",
                    skeleton: "yMMMM"
                });
                break;

              case "months":
                this.headerTitleElement.textContent = globalize.formatDate(date, {
                    type: "dateTime",
                    skeleton: "y"
                });
            }
        }, Calendar.prototype.setActiveDescendant = function() {
            var id, focusedEle = this.tableBodyElement.querySelector("tr td.e-focused-date"), selectedEle = this.tableBodyElement.querySelector("tr td.e-selected"), title = this.globalize.formatDate(this.currentDate, {
                type: "date",
                skeleton: "full"
            });
            return (selectedEle || focusedEle) && ((focusedEle || selectedEle).setAttribute("aria-selected", "true"), 
            (focusedEle || selectedEle).setAttribute("aria-label", "The current focused date is " + title), 
            id = (focusedEle || selectedEle).getAttribute("id")), id;
        }, Calendar.prototype.iconHandler = function() {
            switch (new Date("" + this.currentDate).setDate(1), this.currentView()) {
              case "Month":
                this.previousIconHandler(this.compareMonth(new Date("" + this.currentDate), this.min) < 1), 
                this.nextIconHandler(this.compareMonth(new Date("" + this.currentDate), this.max) > -1);
                break;

              case "Year":
                this.previousIconHandler(this.compareYear(new Date("" + this.currentDate), this.min) < 1), 
                this.nextIconHandler(this.compareYear(new Date("" + this.currentDate), this.max) > -1);
                break;

              case "Decade":
                this.previousIconHandler(this.compareDecade(new Date("" + this.currentDate), this.min) < 1), 
                this.nextIconHandler(this.compareDecade(new Date("" + this.currentDate), this.max) > -1);
            }
        }, Calendar.prototype.destroy = function() {
            "calendar" === this.getModuleName() ? removeClass([ this.element ], [ "e-calendar" ]) : this.calendarElement && removeClass([ this.element ], [ "e-calendar" ]), 
            "calendar" === this.getModuleName() && (EventHandler.remove(this.headerTitleElement, "click", this.navTitle), 
            this.todayElement && EventHandler.remove(this.todayElement, "click", this.todayButtonClick), 
            this.previousIconHandler(!0), this.nextIconHandler(!0), this.keyboardModule.destroy()), 
            this.element.innerHTML = "", _super.prototype.destroy.call(this);
        }, Calendar.prototype.title = function(e) {
            var currentView = this.getViewNumber(this.currentView());
            this.effect = "e-zoomin", this.switchView(++currentView, e);
        }, Calendar.prototype.getViewNumber = function(stringVal) {
            return "Month" === stringVal ? 0 : "Year" === stringVal ? 1 : 2;
        }, Calendar.prototype.navTitle = function(e) {
            e.preventDefault(), this.title(e), "calendar" === this.getModuleName() && this.table.focus();
        }, Calendar.prototype.previous = function() {
            this.effect = "";
            var currentView = this.getViewNumber(this.currentView());
            switch (this.currentView()) {
              case "Month":
                this.addMonths(this.currentDate, -1), this.switchView(currentView);
                break;

              case "Year":
                this.addYears(this.currentDate, -1), this.switchView(currentView);
                break;

              case "Decade":
                this.addYears(this.currentDate, -10), this.switchView(currentView);
            }
        }, Calendar.prototype.navigatePrevious = function(e) {
            e.preventDefault(), this.previous(), this.triggerNavigate(e), "calendar" === this.getModuleName() && this.table.focus();
        }, Calendar.prototype.next = function() {
            this.effect = "";
            var currentView = this.getViewNumber(this.currentView());
            switch (this.currentView()) {
              case "Month":
                this.addMonths(this.currentDate, 1), this.switchView(currentView);
                break;

              case "Year":
                this.addYears(this.currentDate, 1), this.switchView(currentView);
                break;

              case "Decade":
                this.addYears(this.currentDate, 10), this.switchView(currentView);
            }
        }, Calendar.prototype.navigateNext = function(eve) {
            eve.preventDefault(), this.next(), this.triggerNavigate(eve), "calendar" === this.getModuleName() && this.table.focus();
        }, Calendar.prototype.navigateTo = function(view, date) {
            this.minMaxUpdate(), +date >= +this.min && +date <= +this.max && (this.currentDate = date), 
            +date <= +this.min && (this.currentDate = new Date("" + this.min)), +date >= +this.max && (this.currentDate = new Date("" + this.max)), 
            this.switchView(this.getViewNumber(view));
        }, Calendar.prototype.currentView = function() {
            return this.contentElement.classList.contains("e-year") ? "Year" : this.contentElement.classList.contains("e-decade") ? "Decade" : "Month";
        }, Calendar.prototype.getDateVal = function(date) {
            return !isNullOrUndefined(this.value) && date.getDate() === this.value.getDate() && date.getMonth() === this.value.getMonth() && date.getFullYear() === this.value.getFullYear();
        }, Calendar.prototype.getCultureObjects = function(ld, c) {
            return getValue("main." + this.locale + ".dates.calendars.gregorian.days.format.short", ld);
        }, Calendar.prototype.getWeek = function(d) {
            var currentDate = new Date("" + d).valueOf(), date = new Date(d.getFullYear(), 0, 1).valueOf(), a = currentDate - date;
            return Math.ceil((a / 864e5 + new Date(date).getDay() + 1) / 7);
        }, Calendar.prototype.setTime = function(date, time) {
            var d = new Date(date.getTime() + time);
            isNullOrUndefined(this.value) || 0 === this.value.getHours() && 0 === this.value.getSeconds() && 0 === this.value.getMinutes() ? date = new Date(date.setTime(d.getTime())) : date.setTime(d.getTime());
        }, Calendar.prototype.addMonths = function(date, i) {
            var day = date.getDate();
            date.setDate(1), date.setMonth(date.getMonth() + i), date.setDate(Math.min(day, this.getMaxDays(date)));
        }, Calendar.prototype.addYears = function(date, i) {
            var day = date.getDate();
            date.setDate(1), date.setFullYear(date.getFullYear() + i), date.setDate(Math.min(day, this.getMaxDays(date)));
        }, Calendar.prototype.getIdValue = function(e, element) {
            var eve;
            eve = e ? e.currentTarget : element;
            var dateFormatOptions = {
                type: "dateTime",
                skeleton: "full"
            }, dateString = this.globalize.formatDate(new Date(parseInt("" + eve.getAttribute("id"), 0)), dateFormatOptions), date = this.globalize.parseDate(dateString, dateFormatOptions), value = date.valueOf() - date.valueOf() % 1e3;
            return new Date(value);
        }, Calendar.prototype.selectDate = function(e, date, element) {
            var ele = element || e.currentTarget;
            "Decade" === this.currentView() ? this.setDateDecade(this.currentDate, date.getFullYear()) : "Year" === this.currentView() ? this.setDateYear(this.currentDate, date) : (this.setProperties({
                value: new Date("" + date)
            }, !0), this.currentDate = new Date("" + date));
            var tableBodyElement = closest(ele, ".e-calendar");
            isNullOrUndefined(tableBodyElement) && (tableBodyElement = this.tableBodyElement), 
            isNullOrUndefined(tableBodyElement.querySelector("." + SELECTED)) || removeClass([ tableBodyElement.querySelector("." + SELECTED) ], SELECTED), 
            isNullOrUndefined(tableBodyElement.querySelector("." + FOCUSEDDATE)) || removeClass([ tableBodyElement.querySelector("." + FOCUSEDDATE) ], FOCUSEDDATE), 
            addClass([ ele ], SELECTED), this.changedArgs = {
                value: this.value
            }, this.changeHandler(e);
        }, Calendar.prototype.setAriaActivedescendant = function() {
            attributes(this.table, {
                "aria-activedescendant": "" + this.setActiveDescendant()
            });
        }, Calendar.prototype.previousIconHandler = function(disabled) {
            disabled ? (EventHandler.remove(this.previousIcon, "click", this.navigatePreviousHandler), 
            addClass([ this.previousIcon ], "e-disabled"), addClass([ this.previousIcon ], "" + OVERLAY), 
            this.previousIcon.setAttribute("aria-disabled", "true")) : (EventHandler.add(this.previousIcon, "click", this.navigatePreviousHandler), 
            removeClass([ this.previousIcon ], "e-disabled"), removeClass([ this.previousIcon ], "" + OVERLAY), 
            this.previousIcon.setAttribute("aria-disabled", "false"));
        }, Calendar.prototype.renderDayCellEvent = function(args) {
            extend(this.renderDaycellArg, {
                name: "renderDayCell"
            }), this.trigger("renderDayCell", args);
        }, Calendar.prototype.navigatedEvent = function(eve) {
            extend(this.navigatedArgs, {
                name: "navigated",
                event: eve
            }), this.trigger("navigated", this.navigatedArgs);
        }, Calendar.prototype.triggerNavigate = function(event) {
            this.navigatedArgs = {
                view: this.currentView(),
                date: this.currentDate
            }, this.navigatedEvent(event);
        }, Calendar.prototype.changeEvent = function(e) {
            this.trigger("change", this.changedArgs);
        }, Calendar.prototype.triggerChange = function(e) {
            this.changedArgs.event = e, isNullOrUndefined(this.value) || this.setProperties({
                value: this.value
            }, !0), +this.value !== Number.NaN && +this.value != +this.previousDate && this.changeEvent(e), 
            this.previousDate = this.value;
        }, Calendar.prototype.nextIconHandler = function(disabled) {
            disabled ? (EventHandler.remove(this.nextIcon, "click", this.navigateNextHandler), 
            addClass([ this.nextIcon ], DISABLED$2), addClass([ this.nextIcon ], OVERLAY), this.nextIcon.setAttribute("aria-disabled", "true")) : (EventHandler.add(this.nextIcon, "click", this.navigateNextHandler), 
            removeClass([ this.nextIcon ], DISABLED$2), removeClass([ this.nextIcon ], OVERLAY), 
            this.nextIcon.setAttribute("aria-disabled", "false"));
        }, Calendar.prototype.compare = function(startDate, endDate, modifier) {
            var end, result, start = endDate.getFullYear();
            return end = start, result = 0, modifier && (end = (start -= start % modifier) - start % modifier + modifier - 1), 
            startDate.getFullYear() > end ? result = 1 : startDate.getFullYear() < start && (result = -1), 
            result;
        }, Calendar.prototype.isMinMaxRange = function(date) {
            return +date >= +this.min && +date <= +this.max;
        }, Calendar.prototype.compareYear = function(start, end) {
            return this.compare(start, end, 0);
        }, Calendar.prototype.compareDecade = function(start, end) {
            return this.compare(start, end, 10);
        }, Calendar.prototype.shiftArray = function(array, i) {
            return array.slice(i).concat(array.slice(0, i));
        }, Calendar.prototype.addDay = function(date, i, e, max, min) {
            var column = i, value = new Date(+date);
            if (!isNullOrUndefined(this.tableBodyElement) && !isNullOrUndefined(e)) {
                for (;this.findNextTD(new Date(+date), column, max, min); ) column += i;
                var rangeValue = new Date(value.setDate(value.getDate() + column));
                column = +rangeValue > +max || +rangeValue < +min ? column === i ? i - i : i : column;
            }
            date.setDate(date.getDate() + column);
        }, Calendar.prototype.findNextTD = function(date, column, max, min) {
            var value = new Date(date.setDate(date.getDate() + column)), collection = [], isDisabled = !1;
            if ((!isNullOrUndefined(value) && value.getMonth()) !== (!isNullOrUndefined(this.currentDate) && this.currentDate.getMonth())) {
                collection = this.renderDays(value, null).filter(function(ele) {
                    return ele.classList.contains(DISABLED$2);
                });
            } else collection = this.tableBodyElement.querySelectorAll("td.e-disabled");
            if (+value <= +max && +value >= +min && collection.length) for (var i = 0; i < collection.length && !(isDisabled = +value == +new Date(parseInt(collection[i].id, 0))); i++) ;
            return isDisabled;
        }, Calendar.prototype.getMaxDays = function(d) {
            var date, month, tmpDate = new Date("" + d);
            for (date = 28, month = tmpDate.getMonth(); tmpDate.getMonth() === month; ) ++date, 
            tmpDate.setDate(date);
            return date - 1;
        }, Calendar.prototype.setDateDecade = function(date, year) {
            date.setFullYear(year), this.setProperties({
                value: new Date("" + date)
            }, !0);
        }, Calendar.prototype.setDateYear = function(date, value) {
            date.setFullYear(value.getFullYear(), value.getMonth(), date.getDate()), value.getMonth() !== date.getMonth() && date.setDate(0), 
            this.setProperties({
                value: new Date("" + date)
            }, !0), this.currentDate = new Date("" + this.value);
        }, Calendar.prototype.compareMonth = function(start, end) {
            return start.getFullYear() > end.getFullYear() ? 1 : start.getFullYear() < end.getFullYear() ? -1 : start.getMonth() === end.getMonth() ? 0 : start.getMonth() > end.getMonth() ? 1 : -1;
        }, __decorate$11([ Property(null) ], Calendar.prototype, "value", void 0), __decorate$11([ Property(new Date(1900, 0, 1)) ], Calendar.prototype, "min", void 0), 
        __decorate$11([ Property(new Date(2099, 11, 31)) ], Calendar.prototype, "max", void 0), 
        __decorate$11([ Property(0) ], Calendar.prototype, "firstDayOfWeek", void 0), __decorate$11([ Property("Month") ], Calendar.prototype, "start", void 0), 
        __decorate$11([ Property("Month") ], Calendar.prototype, "depth", void 0), __decorate$11([ Property(!1) ], Calendar.prototype, "weekNumber", void 0), 
        __decorate$11([ Property(!0) ], Calendar.prototype, "showTodayButton", void 0), 
        __decorate$11([ Event() ], Calendar.prototype, "created", void 0), __decorate$11([ Event() ], Calendar.prototype, "destroyed", void 0), 
        __decorate$11([ Event() ], Calendar.prototype, "change", void 0), __decorate$11([ Event() ], Calendar.prototype, "navigated", void 0), 
        __decorate$11([ Event() ], Calendar.prototype, "renderDayCell", void 0), Calendar = __decorate$11([ NotifyPropertyChanges ], Calendar);
    }(Component), __extends$13 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$12 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, CheckBox$1 = function(_super) {
        function CheckBox(options, element) {
            var _this = _super.call(this, options, element) || this;
            return _this.isKeyPressed = !1, _this;
        }
        return __extends$13(CheckBox, _super), CheckBox.prototype.changeState = function(state) {
            var ariaState, rippleSpan, frameSpan = this.getWrapper().getElementsByClassName("e-frame")[0];
            isRippleEnabled && (rippleSpan = this.getWrapper().getElementsByClassName("e-ripple-container")[0]), 
            "check" === state ? (frameSpan.classList.remove("e-stop"), frameSpan.classList.add("e-check"), 
            rippleSpan && (rippleSpan.classList.remove("e-ripple-stop"), rippleSpan.classList.add("e-ripple-check")), 
            ariaState = "true", this.element.checked = !0) : "uncheck" === state ? (removeClass([ frameSpan ], [ "e-check", "e-stop" ]), 
            rippleSpan && removeClass([ rippleSpan ], [ "e-ripple-check", "e-ripple-stop" ]), 
            ariaState = "false", this.element.checked = !1) : (frameSpan.classList.remove("e-check"), 
            frameSpan.classList.add("e-stop"), rippleSpan && (rippleSpan.classList.remove("e-ripple-check"), 
            rippleSpan.classList.add("e-ripple-stop")), ariaState = "mixed", this.element.indeterminate = !0), 
            this.getWrapper().setAttribute("aria-checked", ariaState);
        }, CheckBox.prototype.clickHandler = function(event) {
            this.focusOutHandler(), this.indeterminate ? (this.changeState(this.checked ? "check" : "uncheck"), 
            this.indeterminate = !1, this.element.indeterminate = !1) : this.checked ? (this.changeState("uncheck"), 
            this.checked = !1) : (this.changeState("check"), this.checked = !0);
            var changeEventArgs = {
                checked: this.element.checked,
                event: event
            };
            this.trigger("change", changeEventArgs);
        }, CheckBox.prototype.destroy = function() {
            var _this = this, wrapper = this.getWrapper();
            _super.prototype.destroy.call(this), this.disabled || this.unWireEvents(), "INPUT" === this.tagName ? (wrapper.parentNode.insertBefore(this.element, wrapper), 
            detach(wrapper), this.element.checked = !1, this.indeterminate && (this.element.indeterminate = !1), 
            [ "name", "value", "disabled" ].forEach(function(key) {
                _this.element.removeAttribute(key);
            })) : ([ "role", "aria-checked", "class" ].forEach(function(key) {
                wrapper.removeAttribute(key);
            }), this.element.id && wrapper.setAttribute("id", this.element.id), wrapper.innerHTML = "");
        }, CheckBox.prototype.focusHandler = function() {
            this.isKeyPressed && this.getWrapper().classList.add("e-focus");
        }, CheckBox.prototype.focusOutHandler = function() {
            this.getWrapper().classList.remove("e-focus");
        }, CheckBox.prototype.getModuleName = function() {
            return "checkbox";
        }, CheckBox.prototype.getPersistData = function() {
            return this.addOnPersist([ "checked", "indeterminate" ]);
        }, CheckBox.prototype.getWrapper = function() {
            return this.element.parentElement.parentElement;
        }, CheckBox.prototype.initialize = function() {
            this.name && this.element.setAttribute("name", this.name), this.value && this.element.setAttribute("value", this.value), 
            this.checked && this.changeState("check"), this.indeterminate && this.changeState(), 
            this.disabled && this.setDisabled();
        }, CheckBox.prototype.initWrapper = function() {
            var wrapper = this.element.parentElement;
            wrapper.classList.contains("e-checkbox-wrapper") || (wrapper = createElement("div", {
                className: "e-checkbox-wrapper",
                attrs: {
                    role: "checkbox",
                    "aria-checked": "false"
                }
            }), this.element.parentNode.insertBefore(wrapper, this.element));
            var label = createElement("label", {
                attrs: {
                    for: this.element.id
                }
            }), frameSpan = createElement("span", {
                className: "e-icons e-frame"
            });
            if (this.enableRtl && wrapper.classList.add("e-rtl"), this.cssClass && addClass([ wrapper ], this.cssClass.split(" ")), 
            wrapper.appendChild(label), label.appendChild(this.element), label.appendChild(frameSpan), 
            isRippleEnabled) {
                var rippleSpan = createElement("span", {
                    className: "e-ripple-container"
                });
                "Before" === this.labelPosition ? label.appendChild(rippleSpan) : label.insertBefore(rippleSpan, frameSpan), 
                rippleEffect(rippleSpan, {
                    duration: 400,
                    isCenterRipple: !0
                });
            }
            this.label && this.setText(this.label);
        }, CheckBox.prototype.keyDownHandler = function() {
            this.isKeyPressed = !0;
        }, CheckBox.prototype.labelMouseHandler = function(e) {
            rippleMouseHandler$1(e, this.getWrapper().getElementsByClassName("e-ripple-container")[0]);
        }, CheckBox.prototype.mouseDownHandler = function() {
            this.isKeyPressed = !1;
        }, CheckBox.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var wrapper = this.getWrapper(), _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "checked":
                    this.indeterminate = !1, this.element.indeterminate = !1, this.changeState(newProp.checked ? "check" : "uncheck");
                    break;

                  case "indeterminate":
                    newProp.indeterminate ? this.changeState() : (this.element.indeterminate = !1, this.changeState(this.checked ? "check" : "uncheck"));
                    break;

                  case "disabled":
                    newProp.disabled ? (this.setDisabled(), this.unWireEvents()) : (this.element.disabled = !1, 
                    wrapper.classList.remove("e-checkbox-disabled"), wrapper.setAttribute("aria-disabled", "false"), 
                    this.wireEvents());
                    break;

                  case "cssClass":
                    oldProp.cssClass && wrapper.classList.remove(oldProp.cssClass), wrapper.classList.add(newProp.cssClass);
                    break;

                  case "enableRtl":
                    newProp.enableRtl ? wrapper.classList.add("e-rtl") : wrapper.classList.remove("e-rtl");
                    break;

                  case "label":
                    this.setText(newProp.label);
                    break;

                  case "labelPosition":
                    var label = wrapper.getElementsByClassName("e-label")[0], labelWrap = wrapper.getElementsByTagName("label")[0];
                    detach(label), "After" === newProp.labelPosition ? labelWrap.appendChild(label) : labelWrap.insertBefore(label, wrapper.getElementsByClassName("e-frame")[0]);
                    break;

                  case "name":
                    this.element.setAttribute("name", newProp.name);
                    break;

                  case "value":
                    this.element.setAttribute("value", newProp.value);
                }
            }
        }, CheckBox.prototype.preRender = function() {
            var element = this.element;
            this.tagName = this.element.tagName, element = wrapperInitialize$1("EJS-CHECKBOX", "checkbox", element, "e-checkbox-wrapper"), 
            this.element = element, "checkbox" !== this.element.getAttribute("type") && this.element.setAttribute("type", "checkbox"), 
            this.element.id || (this.element.id = getUniqueID("e-" + this.getModuleName()));
        }, CheckBox.prototype.render = function() {
            this.initWrapper(), this.initialize(), this.disabled || this.wireEvents();
        }, CheckBox.prototype.setDisabled = function() {
            var wrapper = this.getWrapper();
            this.element.disabled = !0, wrapper.classList.add("e-checkbox-disabled"), wrapper.setAttribute("aria-disabled", "true");
        }, CheckBox.prototype.setText = function(text) {
            var label = this.getWrapper().getElementsByClassName("e-label")[0];
            if (label) label.textContent = text; else {
                label = createElement("span", {
                    className: "e-label",
                    innerHTML: text
                });
                var labelWrap = this.getWrapper().getElementsByTagName("label")[0];
                "Before" === this.labelPosition ? labelWrap.insertBefore(label, this.getWrapper().getElementsByClassName("e-frame")[0]) : labelWrap.appendChild(label);
            }
        }, CheckBox.prototype.unWireEvents = function() {
            var wrapper = this.getWrapper();
            EventHandler.remove(this.element, "click", this.clickHandler), EventHandler.remove(document, "keydown", this.keyDownHandler), 
            EventHandler.remove(wrapper, "mousedown", this.mouseDownHandler), EventHandler.remove(this.element, "focus", this.focusHandler), 
            EventHandler.remove(this.element, "focusout", this.focusOutHandler);
            var label = wrapper.getElementsByTagName("label")[0];
            EventHandler.remove(label, "mousedown", this.labelMouseHandler), EventHandler.remove(label, "mouseup", this.labelMouseHandler);
        }, CheckBox.prototype.wireEvents = function() {
            var wrapper = this.getWrapper();
            EventHandler.add(this.element, "click", this.clickHandler, this), EventHandler.add(document, "keydown", this.keyDownHandler, this), 
            EventHandler.add(wrapper, "mousedown", this.mouseDownHandler, this), EventHandler.add(this.element, "focus", this.focusHandler, this), 
            EventHandler.add(this.element, "focusout", this.focusOutHandler, this);
            var label = wrapper.getElementsByTagName("label")[0];
            EventHandler.add(label, "mousedown", this.labelMouseHandler, this), EventHandler.add(label, "mouseup", this.labelMouseHandler, this);
        }, __decorate$12([ Event() ], CheckBox.prototype, "change", void 0), __decorate$12([ Property(!1) ], CheckBox.prototype, "checked", void 0), 
        __decorate$12([ Property("") ], CheckBox.prototype, "cssClass", void 0), __decorate$12([ Property(!1) ], CheckBox.prototype, "disabled", void 0), 
        __decorate$12([ Property(!1) ], CheckBox.prototype, "indeterminate", void 0), __decorate$12([ Property("") ], CheckBox.prototype, "label", void 0), 
        __decorate$12([ Property("After") ], CheckBox.prototype, "labelPosition", void 0), 
        __decorate$12([ Property("") ], CheckBox.prototype, "name", void 0), __decorate$12([ Property("") ], CheckBox.prototype, "value", void 0), 
        CheckBox = __decorate$12([ NotifyPropertyChanges ], CheckBox);
    }(Component), __extends$14 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$13 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, FOCUSED = "e-focused", HEADER$1 = "e-menu-header", SELECTED$1 = "e-selected", WRAPPER$2 = "e-contextmenu-wrapper", HIDE = "e-menu-hide", MenuItem = function(_super) {
        function MenuItem() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$14(MenuItem, _super), __decorate$13([ Property("") ], MenuItem.prototype, "iconCss", void 0), 
        __decorate$13([ Property("") ], MenuItem.prototype, "id", void 0), __decorate$13([ Property(!1) ], MenuItem.prototype, "separator", void 0), 
        __decorate$13([ Collection([], MenuItem) ], MenuItem.prototype, "items", void 0), 
        __decorate$13([ Property("") ], MenuItem.prototype, "text", void 0), __decorate$13([ Property("") ], MenuItem.prototype, "url", void 0), 
        MenuItem;
    }(ChildProperty), ContextMenu = function(_super) {
        function ContextMenu(options, element) {
            var _this = _super.call(this, options, element) || this;
            return _this.animation = new Animation({}), _this.navIdx = [], _this.isTapHold = !1, 
            _this;
        }
        return __extends$14(ContextMenu, _super), ContextMenu.prototype.preRender = function() {
            if ("EJS-CONTEXTMENU" === this.element.tagName) {
                this.element.style.display = "none", this.element.classList.remove("e-" + this.getModuleName()), 
                this.element.classList.remove("e-control");
                var ejInst = getValue("ej2_instances", this.element), ul = createElement("ul");
                this.ngElement = this.element, this.element = ul, this.element.classList.add("e-control"), 
                this.element.classList.add("e-" + this.getModuleName()), setValue("ej2_instances", ejInst, this.element), 
                this.element.id || (this.element.id = getUniqueID(this.getModuleName()));
            }
        }, ContextMenu.prototype.render = function() {
            this.initWrapper(), this.renderItems(), this.wireEvents();
        }, ContextMenu.prototype.initWrapper = function() {
            var wrapper = this.getWrapper();
            wrapper || (wrapper = createElement("div", {
                className: WRAPPER$2
            }), document.body.appendChild(wrapper)), this.cssClass && wrapper.classList.add(this.cssClass), 
            this.enableRtl && wrapper.classList.add("e-rtl"), attributes(this.element, {
                role: "menu",
                tabindex: "0"
            }), wrapper.appendChild(this.element), this.element.style.zIndex = this.getZIndex();
        }, ContextMenu.prototype.renderItems = function() {
            this.items.length || (this.items = ListBase.createJsonFromElement(this.element), 
            this.element.innerHTML = "");
            var ul = this.createItems(this.items);
            append(Array.prototype.slice.call(ul.children), this.element), this.element.classList.add("e-menu-parent");
        }, ContextMenu.prototype.wireEvents = function() {
            var wrapper = this.getWrapper();
            if (this.target) {
                for (var target = void 0, targetElems = selectAll(this.target), i = 0, len = targetElems.length; i < len; i++) target = targetElems[i], 
                Browser.isIos ? new Touch(target, {
                    tapHold: this.touchHandler.bind(this)
                }) : EventHandler.add(target, "contextmenu", this.cmenuHandler, this);
                this.targetElement = target;
                for (var _i = 0, _a = getScrollableParent(this.targetElement); _i < _a.length; _i++) {
                    var parent_1 = _a[_i];
                    EventHandler.add(parent_1, "scroll", this.scrollHandler, this);
                }
            }
            Browser.isDevice || (EventHandler.add(wrapper, "mouseover", this.moverHandler, this), 
            EventHandler.add(document, "mousedown", this.mouseDownHandler, this)), this.delegateClickHandler = this.clickHandler.bind(this), 
            EventHandler.add(document, "click", this.delegateClickHandler, this), new KeyboardEvents(wrapper, {
                keyAction: this.keyBoardHandler.bind(this),
                keyConfigs: {
                    downarrow: "downarrow",
                    uparrow: "uparrow",
                    enter: "enter",
                    leftarrow: "leftarrow",
                    rightarrow: "rightarrow",
                    escape: "escape"
                }
            }), rippleEffect(wrapper, {
                selector: ".e-menu-item"
            });
        }, ContextMenu.prototype.mouseDownHandler = function(e) {
            closest(e.target, "." + WRAPPER$2) !== this.getWrapper() && this.closeMenu(this.navIdx.length, e);
        }, ContextMenu.prototype.keyBoardHandler = function(e) {
            switch (e.preventDefault(), e.action) {
              case "downarrow":
              case "uparrow":
                this.upDownKeyHandler(e);
                break;

              case "rightarrow":
                this.rightEnterKeyHandler(e);
                break;

              case "leftarrow":
                this.leftEscKeyHandler(e);
                break;

              case "enter":
                this.rightEnterKeyHandler(e);
                break;

              case "escape":
                this.leftEscKeyHandler(e);
            }
        }, ContextMenu.prototype.upDownKeyHandler = function(e) {
            var cul = this.getWrapper().children[this.navIdx.length], defaultIdx = "downarrow" === e.action ? 0 : cul.childElementCount - 1, fliIdx = defaultIdx, fli = this.getLIByClass(cul, FOCUSED);
            fli && (fliIdx = this.getIdx(cul, fli), fli.classList.remove(FOCUSED), "downarrow" === e.action ? fliIdx++ : fliIdx--, 
            fliIdx === ("downarrow" === e.action ? cul.childElementCount : -1) && (fliIdx = defaultIdx));
            var cli = cul.children[fliIdx];
            fliIdx = this.isValidLI(cli, fliIdx, e.action), cul.children[fliIdx].classList.add(FOCUSED), 
            cul.children[fliIdx].focus();
        }, ContextMenu.prototype.isValidLI = function(cli, index, action) {
            var cul = this.getWrapper().children[this.navIdx.length];
            return (cli.classList.contains("e-separator") || cli.classList.contains("e-disabled") || cli.classList.contains(HIDE)) && ("downarrow" === action || "rightarrow" === action ? index++ : index--), 
            ((cli = cul.children[index]).classList.contains("e-separator") || cli.classList.contains("e-disabled") || cli.classList.contains(HIDE)) && (index = this.isValidLI(cli, index, action)), 
            index;
        }, ContextMenu.prototype.rightEnterKeyHandler = function(e) {
            var eventArgs, wrapper = this.getWrapper(), cul = wrapper.children[this.navIdx.length], fli = this.getLIByClass(cul, FOCUSED);
            if (fli) {
                var fliIdx = this.getIdx(cul, fli), navIdx = this.navIdx.concat(fliIdx), index = void 0, item = this.getItem(navIdx);
                item.items.length ? (this.navIdx.push(fliIdx), this.openMenu(fli, item, null, null, e), 
                fli.classList.remove(FOCUSED), fli.classList.add(SELECTED$1), "enter" === e.action && (eventArgs = {
                    element: fli,
                    item: item
                }, this.trigger("select", eventArgs)), fli.focus(), cul = wrapper.children[this.navIdx.length], 
                index = this.isValidLI(cul.children[0], 0, e.action), cul.children[index].classList.add(FOCUSED), 
                cul.children[index].focus()) : "enter" === e.action && (fli.classList.remove(FOCUSED), 
                fli.classList.add(SELECTED$1), eventArgs = {
                    element: fli,
                    item: item
                }, this.trigger("select", eventArgs), this.closeMenu(null, e));
            }
        }, ContextMenu.prototype.leftEscKeyHandler = function(e) {
            if (this.navIdx.length) {
                var wrapper = this.getWrapper();
                this.closeMenu(this.navIdx.length, e);
                var cul = wrapper.children[this.navIdx.length], sli = this.getLIByClass(cul, SELECTED$1);
                sli && (sli.setAttribute("aria-expanded", "false"), sli.classList.remove(SELECTED$1), 
                sli.classList.add(FOCUSED), sli.focus());
            } else "escape" === e.action && this.closeMenu(null, e);
        }, ContextMenu.prototype.scrollHandler = function(e) {
            this.closeMenu(null, e);
        }, ContextMenu.prototype.touchHandler = function(e) {
            this.isTapHold = !0, this.cmenuHandler(e.originalEvent);
        }, ContextMenu.prototype.cmenuHandler = function(e) {
            e.preventDefault(), this.closeMenu(null, e), this.canOpen(e.target) && (e.changedTouches ? this.openMenu(null, null, e.changedTouches[0].clientY + 1, e.changedTouches[0].clientX + 1, e) : this.openMenu(null, null, e.clientY + 1, e.clientX + 1, e));
        }, ContextMenu.prototype.close = function() {
            this.closeMenu();
        }, ContextMenu.prototype.closeMenu = function(ulIndex, e) {
            if (void 0 === ulIndex && (ulIndex = 0), void 0 === e && (e = null), this.isMenuVisible()) for (var ul = void 0, item = void 0, items = void 0, closeArgs = void 0, beforeCloseArgs = void 0, wrapper = this.getWrapper(), cnt = wrapper.childElementCount; cnt > ulIndex; cnt--) items = (item = this.navIdx.length ? this.getItem(this.navIdx) : null) ? item.items : this.items, 
            beforeCloseArgs = {
                element: ul = wrapper.children[cnt - 1],
                parentItem: item,
                items: items,
                event: e,
                cancel: !1
            }, this.trigger("beforeClose", beforeCloseArgs), beforeCloseArgs.cancel || (this.toggleAnimation(ul, !1), 
            this.navIdx.length = ulIndex ? ulIndex - 1 : ulIndex, closeArgs = {
                element: ul,
                parentItem: item,
                items: items
            }, this.trigger("onClose", closeArgs));
        }, ContextMenu.prototype.isMenuVisible = function() {
            return this.navIdx.length > 0 || this.element.classList.contains("e-contextmenu") && isVisible(this.element).valueOf();
        }, ContextMenu.prototype.canOpen = function(target) {
            var canOpen = !0;
            if (this.filter) {
                canOpen = !1;
                for (var filter = this.filter.split(" "), i = 0, len = target.classList.length; i < len; i++) if (filter.indexOf(target.classList[i]) > -1) {
                    canOpen = !0;
                    break;
                }
            }
            return canOpen;
        }, ContextMenu.prototype.open = function(top, left) {
            this.openMenu(null, null, top, left);
        }, ContextMenu.prototype.openMenu = function(li, item, top, left, e) {
            void 0 === top && (top = 0), void 0 === left && (left = 0), void 0 === e && (e = null);
            var ul, wrapper = this.getWrapper();
            if (li) {
                if (ul = this.createItems(item.items), Browser.isDevice) {
                    wrapper.lastChild.style.display = "none";
                    var data = {
                        text: item.text,
                        iconCss: "e-icons e-previous"
                    }, hdata = new MenuItem(this.items[0], null, data, !0), hli = this.createItems([ hdata ]).children[0];
                    hli.classList.add(HEADER$1), ul.insertBefore(hli, ul.children[0]);
                }
                ul.style.zIndex = this.element.style.zIndex, wrapper.appendChild(ul);
            } else ul = this.element;
            this.getIndex(li ? li.textContent : null);
            var eventArgs = {
                element: ul,
                items: li ? item.items : this.items,
                parentItem: item,
                event: e,
                cancel: !1
            };
            this.trigger("beforeOpen", eventArgs), eventArgs.cancel ? this.navIdx.pop() : (this.setPosition(li, ul, top, left), 
            this.toggleAnimation(ul));
        }, ContextMenu.prototype.setPosition = function(li, ul, top, left) {
            if (this.toggleVisiblity(ul), ul === this.element) {
                if ((collide = isCollide(ul, null, left, top)).indexOf("right") > -1 && (left -= ul.offsetWidth), 
                collide.indexOf("bottom") > -1) {
                    top = (offset = fit(ul, null, {
                        X: !1,
                        Y: !0
                    }, {
                        top: top,
                        left: left
                    })).top;
                }
                if ((collide = isCollide(ul, null, left, top)).indexOf("left") > -1) {
                    left = (offset = fit(ul, null, {
                        X: !0,
                        Y: !1
                    }, {
                        top: top,
                        left: left
                    })).left;
                }
            } else if (Browser.isDevice) top = Number(this.element.style.top.replace("px", "")), 
            left = Number(this.element.style.left.replace("px", "")); else {
                var offset;
                top = (offset = calculatePosition(li, this.enableRtl ? "left" : "right", "top")).top, 
                left = offset.left;
                var collide, xCollision = (collide = isCollide(ul, null, this.enableRtl ? left - ul.offsetWidth : left, top)).indexOf("left") > -1 || collide.indexOf("right") > -1;
                xCollision && (left = (offset = calculatePosition(li, this.enableRtl ? "right" : "left", "top")).left), 
                (this.enableRtl || xCollision) && (left = this.enableRtl && xCollision ? left : left - ul.offsetWidth), 
                collide.indexOf("bottom") > -1 && (top = (offset = fit(ul, null, {
                    X: !1,
                    Y: !0
                }, {
                    top: top,
                    left: left
                })).top);
            }
            this.toggleVisiblity(ul, !1), ul.style.top = top + "px", ul.style.left = left + "px";
        }, ContextMenu.prototype.toggleVisiblity = function(ul, isVisible$$1) {
            void 0 === isVisible$$1 && (isVisible$$1 = !0), ul.style.visibility = isVisible$$1 ? "hidden" : "", 
            ul.style.display = isVisible$$1 ? "block" : "none";
        }, ContextMenu.prototype.createItems = function(items) {
            var _this = this, showIcon = this.hasField(items, "iconCss"), listBaseOptions = {
                showIcon: showIcon,
                moduleName: "menu",
                itemCreating: function(args) {
                    args.curData.htmlAttributes = {
                        role: "menuitem",
                        tabindex: "-1"
                    };
                },
                itemCreated: function(args) {
                    if (args.curData.separator && (args.item.classList.add("e-separator"), args.item.removeAttribute("role")), 
                    !showIcon || args.curData.iconCss || args.curData.separator || args.item.classList.add("e-blankicon"), 
                    args.curData.items && args.curData.items.length) {
                        var span = createElement("span", {
                            className: "e-icons e-caret"
                        });
                        args.item.appendChild(span), args.item.setAttribute("aria-haspopup", "true"), args.item.setAttribute("aria-expanded", "false"), 
                        args.item.removeAttribute("role"), args.item.classList.add("e-menu-caret-icon");
                    }
                    var eventArgs = {
                        item: args.curData,
                        element: args.item
                    };
                    _this.trigger("beforeItemRender", eventArgs);
                }
            }, ul = ListBase.createList(this.toRawObject(items.slice()), listBaseOptions, !0);
            return ul.setAttribute("tabindex", "0"), ul;
        }, ContextMenu.prototype.toRawObject = function(items) {
            for (var item, menuItems = [], i = 0, len = items.length; i < len; i++) item = items[i].properties, 
            menuItems.push(item);
            return menuItems;
        }, ContextMenu.prototype.moverHandler = function(e) {
            var wrapper = this.getWrapper(), trgt = e.target, cli = this.getLI(trgt);
            if (cli && closest(cli, "." + WRAPPER$2)) {
                var fli = select("." + FOCUSED, wrapper);
                fli && fli.classList.remove(FOCUSED), cli.classList.add(FOCUSED), this.showItemOnClick || this.clickHandler(e);
            }
        }, ContextMenu.prototype.hasField = function(items, field) {
            for (var i = 0, len = items.length; i < len; i++) if (items[i][field]) return !0;
            return !1;
        }, ContextMenu.prototype.getWrapper = function() {
            return closest(this.element, "." + WRAPPER$2);
        }, ContextMenu.prototype.clickHandler = function(e) {
            if (this.isTapHold) this.isTapHold = !1; else {
                var wrapper = this.getWrapper(), trgt = e.target, cli = this.getLI(trgt), cliWrapper = cli ? closest(cli, "." + WRAPPER$2) : null, isInstLI = cli && cliWrapper && wrapper.firstElementChild.id === cliWrapper.firstElementChild.id;
                if (isInstLI && "click" === e.type && !cli.classList.contains(HEADER$1)) {
                    this.setLISelected(cli);
                    var navIdx = this.getIndex(cli.textContent), eventArgs = {
                        element: cli,
                        item: item = this.getItem(navIdx)
                    };
                    this.trigger("select", eventArgs);
                }
                if (isInstLI && ("mouseover" === e.type || Browser.isDevice || this.showItemOnClick)) {
                    var ul = void 0;
                    if (cli.classList.contains(HEADER$1)) {
                        ul = wrapper.children[this.navIdx.length - 1], this.toggleAnimation(ul);
                        (sli = this.getLIByClass(ul, SELECTED$1)) && sli.classList.remove(SELECTED$1), detach(cli.parentNode), 
                        this.navIdx.pop();
                    } else if (!cli.classList.contains("e-separator")) {
                        var showSubMenu = !0, cul = cli.parentNode, cliIdx = this.getIdx(cul, cli);
                        if (!Browser.isDevice) {
                            var culIdx = this.getIdx(wrapper, cul);
                            if (this.navIdx[culIdx] === cliIdx && (showSubMenu = !1), culIdx !== this.navIdx.length && ("mouseover" !== e.type || showSubMenu)) {
                                var sli;
                                (sli = this.getLIByClass(cul, SELECTED$1)) && sli.classList.remove(SELECTED$1), 
                                this.closeMenu(culIdx + 1, e);
                            }
                        }
                        if (showSubMenu) {
                            var item, idx = this.navIdx.concat(cliIdx);
                            (item = this.getItem(idx)).items.length ? ("mouseover" === e.type && this.setLISelected(cli), 
                            cli.setAttribute("aria-expanded", "true"), this.navIdx.push(cliIdx), this.openMenu(cli, item, null, null, e)) : "mouseover" !== e.type && this.closeMenu(null, e);
                        }
                    }
                } else "UL" === trgt.tagName && trgt.parentElement === wrapper || cli && cli.querySelector(".e-caret") || this.closeMenu(null, e);
            }
        }, ContextMenu.prototype.setLISelected = function(li) {
            var sli = this.getLIByClass(li.parentElement, SELECTED$1);
            sli && sli.classList.remove(SELECTED$1), li.classList.remove(FOCUSED), li.classList.add(SELECTED$1);
        }, ContextMenu.prototype.getLIByClass = function(ul, classname) {
            for (var i = 0, len = ul.children.length; i < len; i++) if (ul.children[i].classList.contains(classname)) return ul.children[i];
            return null;
        }, ContextMenu.prototype.getItem = function(navIdx) {
            var idx = (navIdx = navIdx.slice()).pop();
            return this.getItems(navIdx)[idx];
        }, ContextMenu.prototype.getItems = function(navIdx) {
            for (var items = this.items, i = 0; i < navIdx.length; i++) items = items[navIdx[i]].items;
            return items;
        }, ContextMenu.prototype.getIdx = function(ul, li, skipHdr) {
            void 0 === skipHdr && (skipHdr = !0);
            var idx = Array.prototype.indexOf.call(ul.children, li);
            return skipHdr && ul.children[0].classList.contains(HEADER$1) && idx--, idx;
        }, ContextMenu.prototype.getLI = function(elem) {
            return "LI" === elem.tagName ? elem : closest(elem, "li");
        }, ContextMenu.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var wrapper = this.getWrapper(), _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "cssClass":
                    oldProp.cssClass && wrapper.classList.remove(oldProp.cssClass), newProp.cssClass && wrapper.classList.add(newProp.cssClass);
                    break;

                  case "enableRtl":
                    wrapper.classList.toggle("e-rtl");
                    break;

                  case "filter":
                    this.closeMenu(), this.filter = newProp.filter;
                    break;

                  case "showItemOnClick":
                    this.unWireEvents(), this.showItemOnClick = newProp.showItemOnClick, this.wireEvents();
                    break;

                  case "target":
                    this.unWireEvents(), this.target = newProp.target, this.wireEvents();
                    break;

                  case "items":
                    for (var idx = void 0, navIdx = void 0, item = void 0, keys = Object.keys(newProp.items), i = 0; i < keys.length; i++) (navIdx = this.getChangedItemIndex(newProp, [], Number(keys[i]))).length <= this.getWrapper().children.length && (idx = navIdx.pop(), 
                    item = this.getItems(navIdx), this.insertAfter([ item[idx] ], item[idx].text), this.removeItem(item, navIdx, idx)), 
                    navIdx.length = 0;
                }
            }
        }, ContextMenu.prototype.getChangedItemIndex = function(newProp, index, idx) {
            index.push(idx);
            var key = Object.keys(newProp.items[idx]).pop();
            if ("items" === key) {
                var item = newProp.items[idx];
                this.getChangedItemIndex(item, index, Number(Object.keys(item.items).pop()));
            } else "isParentArray" === key && index.length > 1 && index.pop();
            return index;
        }, ContextMenu.prototype.removeItem = function(item, navIdx, idx) {
            item.splice(idx, 1);
            var uls = this.getWrapper().children;
            navIdx.length < uls.length && detach(uls[navIdx.length].children[idx]);
        }, ContextMenu.prototype.unWireEvents = function() {
            var wrapper = this.getWrapper();
            if (this.target) {
                for (var target = void 0, touchModule = void 0, targetElems = selectAll(this.target), i = 0, len = targetElems.length; i < len; i++) target = targetElems[i], 
                Browser.isIos ? (touchModule = getInstance(target, Touch)) && touchModule.destroy() : EventHandler.remove(target, "contextmenu", this.cmenuHandler);
                for (var _i = 0, _a = getScrollableParent(this.targetElement); _i < _a.length; _i++) {
                    var parent_2 = _a[_i];
                    EventHandler.remove(parent_2, "scroll", this.scrollHandler);
                }
            }
            Browser.isDevice || (EventHandler.remove(wrapper, "mouseover", this.moverHandler), 
            EventHandler.remove(document, "mousedown", this.mouseDownHandler)), EventHandler.remove(document, "click", this.delegateClickHandler);
            var keyboardModule = getInstance(wrapper, KeyboardEvents);
            keyboardModule && keyboardModule.destroy();
        }, ContextMenu.prototype.toggleAnimation = function(ul, isMenuOpen) {
            var _this = this;
            void 0 === isMenuOpen && (isMenuOpen = !0), "None" !== this.animationSettings.effect && isMenuOpen ? this.animation.animate(ul, {
                name: this.animationSettings.effect,
                duration: this.animationSettings.duration,
                timingFunction: this.animationSettings.easing,
                begin: function(options) {
                    options.element.style.display = "block", options.element.style.maxHeight = options.element.getBoundingClientRect().height + "px";
                },
                end: function(options) {
                    _this.end(options.element, isMenuOpen);
                }
            }) : this.end(ul, isMenuOpen);
        }, ContextMenu.prototype.end = function(ul, isMenuOpen) {
            if (isMenuOpen) {
                ul.style.display = "block", ul.style.maxHeight = "";
                var item = this.navIdx.length ? this.getItem(this.navIdx) : null, eventArgs = {
                    element: ul,
                    parentItem: item,
                    items: item ? item.items : this.items
                };
                if (this.trigger("onOpen", eventArgs), ul.querySelector("." + FOCUSED)) ul.querySelector("." + FOCUSED).focus(); else {
                    var ele = void 0;
                    (ele = this.getWrapper().children[this.getIdx(this.getWrapper(), ul) - 1]) ? ele.querySelector(".e-selected").focus() : this.element.focus();
                }
            } else if (ul === this.element) {
                var fli = this.getLIByClass(this.element, FOCUSED);
                fli && fli.classList.remove(FOCUSED);
                var sli = this.getLIByClass(this.element, SELECTED$1);
                sli && sli.classList.remove(SELECTED$1), ul.style.display = "none";
            } else detach(ul);
        }, ContextMenu.prototype.getPersistData = function() {
            return "";
        }, ContextMenu.prototype.getModuleName = function() {
            return "contextmenu";
        }, ContextMenu.prototype.getIndex = function(data, items, navIdx, isCallBack) {
            void 0 === items && (items = this.items), void 0 === navIdx && (navIdx = []), void 0 === isCallBack && (isCallBack = !1);
            for (var item, i = 0, len = items.length; i < len; i++) {
                if ((item = items[i]).text === data) {
                    navIdx.push(i);
                    break;
                }
                if (item.items.length) {
                    if (-1 !== (navIdx = this.getIndex(data, item.items, navIdx, !0))[navIdx.length - 1]) {
                        navIdx.unshift(i);
                        break;
                    }
                    i !== len - 1 && navIdx.pop();
                } else i === len - 1 && navIdx.push(-1);
            }
            return isCallBack || -1 !== navIdx[0] ? navIdx : [];
        }, ContextMenu.prototype.enableItems = function(items, enable) {
            void 0 === enable && (enable = !0);
            for (var ul, idx, navIdx, wrapper = this.getWrapper(), i = 0; i < items.length; i++) idx = (navIdx = this.getIndex(items[i])).pop(), 
            (ul = wrapper.children[navIdx.length]) && (enable ? Browser.isDevice && !ul.classList.contains("e-contextmenu") ? ul.children[idx + 1].classList.remove("e-disabled") : ul.children[idx].classList.remove("e-disabled") : Browser.isDevice && !ul.classList.contains("e-contextmenu") ? ul.children[idx + 1].classList.add("e-disabled") : ul.children[idx].classList.add("e-disabled"));
        }, ContextMenu.prototype.showItems = function(items) {
            this.showHideItems(items, !1);
        }, ContextMenu.prototype.hideItems = function(items) {
            this.showHideItems(items, !0);
        }, ContextMenu.prototype.showHideItems = function(items, ishide) {
            for (var ul, idx, navIdx, wrapper = this.getWrapper(), i = 0; i < items.length; i++) idx = (navIdx = this.getIndex(items[i])).pop(), 
            (ul = wrapper.children[navIdx.length]) && (ishide ? Browser.isDevice && !ul.classList.contains("e-contextmenu") ? ul.children[idx + 1].classList.add(HIDE) : ul.children[idx].classList.add(HIDE) : Browser.isDevice && !ul.classList.contains("e-contextmenu") ? ul.children[idx + 1].classList.remove(HIDE) : ul.children[idx].classList.remove(HIDE));
        }, ContextMenu.prototype.removeItems = function(items) {
            for (var idx, navIdx, iitems, i = 0; i < items.length; i++) idx = (navIdx = this.getIndex(items[i])).pop(), 
            iitems = this.getItems(navIdx), this.removeItem(iitems, navIdx, idx);
        }, ContextMenu.prototype.insertAfter = function(items, text) {
            this.insertItems(items, text);
        }, ContextMenu.prototype.insertBefore = function(items, text) {
            this.insertItems(items, text, !1);
        }, ContextMenu.prototype.insertItems = function(items, text, isAfter) {
            void 0 === isAfter && (isAfter = !0);
            for (var li, idx, navIdx, iitems, menuitem, i = 0; i < items.length; i++) {
                idx = (navIdx = this.getIndex(text)).pop(), iitems = this.getItems(navIdx), menuitem = new MenuItem(iitems[0], null, items[i], !0), 
                iitems.splice(isAfter ? idx + 1 : idx, 0, menuitem);
                var uls = this.getWrapper().children;
                navIdx.length < uls.length && (idx = isAfter ? idx + 1 : idx, this.hasField(iitems, "iconCss"), 
                li = this.createItems(iitems).children[idx], uls[navIdx.length].insertBefore(li, uls[navIdx.length].children[idx]));
            }
        }, ContextMenu.prototype.getZIndex = function() {
            for (var index, position, props, zIndex = [ "999" ], i = 0, len = document.body.children.length; i < len; i++) index = (props = document.defaultView.getComputedStyle(document.body.children[i])).getPropertyValue("z-index"), 
            position = props.getPropertyValue("position"), "auto" !== index && "static" !== position && zIndex.push(index);
            return (Math.max.apply(Math, zIndex) + 1).toString();
        }, ContextMenu.prototype.destroy = function() {
            var _this = this, wrapper = this.getWrapper();
            wrapper && (_super.prototype.destroy.call(this), this.unWireEvents(), this.ngElement ? this.ngElement.style.display = "block" : (this.closeMenu(), 
            this.element.innerHTML = "", [ "top", "left", "display", "z-index" ].forEach(function(key) {
                _this.element.style.removeProperty(key);
            }), [ "role", "tabindex", "class", "style" ].forEach(function(key) {
                -1 !== [ "class", "style" ].indexOf(key) && _this.element.getAttribute(key) || _this.element.removeAttribute(key);
            }), wrapper.parentNode.insertBefore(this.element, wrapper)), detach(wrapper));
        }, __decorate$13([ Property("") ], ContextMenu.prototype, "cssClass", void 0), __decorate$13([ Property("") ], ContextMenu.prototype, "filter", void 0), 
        __decorate$13([ Property(!1) ], ContextMenu.prototype, "showItemOnClick", void 0), 
        __decorate$13([ Collection([], MenuItem) ], ContextMenu.prototype, "items", void 0), 
        __decorate$13([ Property("") ], ContextMenu.prototype, "target", void 0), __decorate$13([ Property({
            duration: 400,
            easing: "ease",
            effect: "SlideDown"
        }) ], ContextMenu.prototype, "animationSettings", void 0), __decorate$13([ Event() ], ContextMenu.prototype, "beforeItemRender", void 0), 
        __decorate$13([ Event() ], ContextMenu.prototype, "beforeOpen", void 0), __decorate$13([ Event() ], ContextMenu.prototype, "onOpen", void 0), 
        __decorate$13([ Event() ], ContextMenu.prototype, "beforeClose", void 0), __decorate$13([ Event() ], ContextMenu.prototype, "onClose", void 0), 
        __decorate$13([ Event() ], ContextMenu.prototype, "select", void 0), ContextMenu = __decorate$13([ NotifyPropertyChanges ], ContextMenu);
    }(Component), __extends$15 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$14 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, ROOT$3 = "e-datepicker", DatePicker = function(_super) {
        function DatePicker(options, element) {
            var _this = _super.call(this, options, element) || this;
            return _this.previousEleValue = "", _this.isDateIconClicked = !1, _this.keyConfigs = {
                altUpArrow: "alt+uparrow",
                altDownArrow: "alt+downarrow",
                escape: "escape",
                enter: "enter",
                controlUp: "ctrl+38",
                controlDown: "ctrl+40",
                moveDown: "downarrow",
                moveUp: "uparrow",
                moveLeft: "leftarrow",
                moveRight: "rightarrow",
                select: "enter",
                home: "home",
                end: "end",
                pageUp: "pageup",
                pageDown: "pagedown",
                shiftPageUp: "shift+pageup",
                shiftPageDown: "shift+pagedown",
                controlHome: "ctrl+home",
                controlEnd: "ctrl+end",
                tab: "tab"
            }, _this.calendarKeyConfigs = {
                escape: "escape",
                enter: "enter",
                tab: "tab"
            }, _this;
        }
        return __extends$15(DatePicker, _super), DatePicker.prototype.render = function() {
            this.initialize(), this.bindEvents();
        }, DatePicker.prototype.initialize = function() {
            this.createInput(), this.updateInput(), this.previousEleValue = this.inputElement.value;
        }, DatePicker.prototype.createInput = function() {
            var ariaAttrs = {
                "aria-live": "assertive",
                "aria-atomic": "true",
                "aria-haspopup": "true",
                "aria-activedescendant": "null",
                "aria-owns": this.inputElement.id + "_options",
                "aria-expanded": "false",
                role: "combobox",
                autocomplete: "off"
            };
            if ("datepicker" === this.getModuleName()) {
                this.globalize = new Internationalization(this.locale), this.l10n = new L10n("datepicker", {
                    placeholder: null
                }, this.locale), this.setProperties({
                    placeholder: this.placeholder || this.l10n.getConstant("placeholder")
                }, !0);
            }
            this.inputWrapper = Input.createInput({
                element: this.inputElement,
                customTag: this.ngTag,
                floatLabelType: this.floatLabelType,
                properties: {
                    readonly: this.readonly,
                    placeholder: this.placeholder,
                    cssClass: this.cssClass,
                    enabled: this.enabled,
                    enableRtl: this.enableRtl,
                    showClearButton: this.showClearButton
                },
                buttons: [ "e-input-group-icon e-date-icon e-icons" ]
            }), this.setWidth(this.width), "" !== this.inputElement.name ? this.inputElement.setAttribute("name", "" + this.inputElement.getAttribute("name")) : this.inputElement.setAttribute("name", "" + this.inputElement.id), 
            attributes(this.inputElement, ariaAttrs), this.enabled || this.inputElement.setAttribute("aria-disabled", "true"), 
            Input.addAttributes({
                "aria-label": "select"
            }, this.inputWrapper.buttons[0]), addClass([ this.inputWrapper.container ], "e-date-wrapper");
        }, DatePicker.prototype.updateInput = function() {
            if (this.value && !this.isCalendar() && this.disabledDates(), +new Date("" + this.value)) {
                if ("string" == typeof this.value) {
                    this.value = this.checkDateValue(new Date("" + this.value));
                    var dateOptions = void 0;
                    dateOptions = "datetimepicker" === this.getModuleName() ? {
                        format: isNullOrUndefined(this.format) ? this.dateTimeFormat : this.format,
                        type: "dateTime",
                        skeleton: "yMd"
                    } : {
                        format: this.format,
                        type: "dateTime",
                        skeleton: "yMd"
                    };
                    var dateString = this.globalize.formatDate(this.value, dateOptions);
                    this.setProperties({
                        value: this.globalize.parseDate(dateString, dateOptions)
                    }, !0);
                }
            } else this.setProperties({
                value: null
            }, !0);
            if (this.strictMode && _super.prototype.processDate.call(this), !isNullOrUndefined(this.value)) {
                var dateValue = this.value, tempFormat = (dateString = void 0, isNullOrUndefined(this.format) ? this.dateTimeFormat : this.format);
                if (dateString = "datetimepicker" === this.getModuleName() ? this.globalize.formatDate(this.value, {
                    format: tempFormat,
                    type: "dateTime",
                    skeleton: "yMd"
                }) : this.globalize.formatDate(this.value, {
                    format: this.format,
                    type: "dateTime",
                    skeleton: "yMd"
                }), +dateValue <= +this.max && +dateValue >= +this.min) Input.setValue(dateString, this.inputElement, this.floatLabelType, this.showClearButton); else {
                    var value = +dateValue >= +this.max || !+this.value || !+this.value || +dateValue <= +this.min;
                    !this.strictMode && value && Input.setValue(dateString, this.inputElement, this.floatLabelType, this.showClearButton);
                }
            }
            isNullOrUndefined(this.value) && this.strictMode && Input.setValue("", this.inputElement, this.floatLabelType, this.showClearButton), 
            this.changedArgs = {
                value: this.value
            }, this.errorClass();
        }, DatePicker.prototype.bindEvents = function() {
            this.enabled ? (EventHandler.add(this.inputWrapper.buttons[0], "mousedown touchstart", this.dateIconHandler, this), 
            EventHandler.add(this.inputElement, "focus", this.inputFocusHandler, this), EventHandler.add(this.inputElement, "blur", this.inputBlurHandler, this), 
            this.bindClearEvent()) : (EventHandler.remove(this.inputWrapper.buttons[0], "mousedown touchstart", this.dateIconHandler), 
            EventHandler.remove(this.inputElement, "focus", this.inputFocusHandler), EventHandler.remove(this.inputElement, "blur", this.inputBlurHandler)), 
            this.keyboardModules = new KeyboardEvents(this.inputElement, {
                eventName: "keydown",
                keyAction: this.inputKeyActionHandle.bind(this),
                keyConfigs: this.keyConfigs
            });
        }, DatePicker.prototype.bindClearEvent = function() {
            this.showClearButton && EventHandler.add(this.inputWrapper.clearButton, "mousedown touchstart", this.resetHandler, this);
        }, DatePicker.prototype.resetHandler = function(e) {
            e.preventDefault(), this.clear(e);
        }, DatePicker.prototype.clear = function(event) {
            this.setProperties({
                value: null
            }, !0), Input.setValue("", this.inputElement, this.floatLabelType, this.showClearButton), 
            this.changeEvent(event);
        }, DatePicker.prototype.dateIconHandler = function(e) {
            e.preventDefault(), this.readonly || (this.isCalendar() ? this.hide() : (this.isDateIconClicked = !0, 
            this.show(), Browser.isDevice || ("datetimepicker" === this.getModuleName() && this.inputElement.focus(), 
            this.inputElement.focus(), addClass([ this.inputWrapper.container ], [ "e-input-focus" ])), 
            addClass(this.inputWrapper.buttons, "e-active")));
        }, DatePicker.prototype.CalendarKeyActionHandle = function(e) {
            switch (e.action) {
              case "escape":
                this.isCalendar() ? this.hide() : this.inputWrapper.container.children[this.index].blur();
                break;

              case "enter":
                this.isCalendar() ? +this.value == +this.currentDate || this.isCalendar() || this.inputWrapper.container.children[this.index].focus() : this.show(), 
                "datetimepicker" === this.getModuleName() && this.inputElement.focus();
                break;

              case "tab":
                this.hide();
            }
        }, DatePicker.prototype.inputFocusHandler = function() {
            this.isDateIconClicked = !1, this.trigger("focus");
        }, DatePicker.prototype.inputBlurHandler = function() {
            this.strictModeUpdate(), this.updateInput(), this.changeTrigger(), this.errorClass(), 
            this.isCalendar() && document.activeElement === this.inputElement && this.hide(), 
            this.inputElement.blur(), this.trigger("blur"), this.isCalendar() && (this.calendarKeyboardModules = new KeyboardEvents(this.calendarElement.children[1].firstElementChild, {
                eventName: "keydown",
                keyAction: this.CalendarKeyActionHandle.bind(this),
                keyConfigs: this.calendarKeyConfigs
            }));
        }, DatePicker.prototype.documentHandler = function(e) {
            Browser.isDevice || e.preventDefault();
            var target = e.target;
            closest(target, ".e-datepicker.e-popup-wrapper") || closest(target, ".e-input-group") === this.inputWrapper.container || target.classList.contains("e-day") || this.hide();
        }, DatePicker.prototype.inputKeyActionHandle = function(e) {
            switch (e.action) {
              case "altUpArrow":
                this.hide(), this.inputElement.focus();
                break;

              case "altDownArrow":
                this.strictModeUpdate(), this.updateInput(), "datepicker" === this.getModuleName() && this.show();
                break;

              case "escape":
                this.hide();
                break;

              case "enter":
                this.strictModeUpdate(), this.updateInput(), this.changeTrigger(), this.errorClass(), 
                this.isCalendar() || document.activeElement !== this.inputElement || this.hide();
                break;

              case "tab":
                this.strictModeUpdate(), this.updateInput(), this.changeTrigger(), this.errorClass(), 
                this.hide();
                break;

              default:
                this.previousDate = !isNullOrUndefined(this.value) && new Date("" + this.value) || null, 
                this.isCalendar() && _super.prototype.keyActionHandle.call(this, e);
            }
        }, DatePicker.prototype.strictModeUpdate = function() {
            var format;
            if (format = "datetimepicker" === this.getModuleName() ? isNullOrUndefined(this.format) ? this.dateTimeFormat : this.format : isNullOrUndefined(this.format) ? this.format : this.format.replace("dd", "d"), 
            !isNullOrUndefined(format)) {
                format.split("M").length - 1 < 3 && (format = format.replace("MM", "M"));
            }
            var dateOptions;
            dateOptions = "datetimepicker" === this.getModuleName() ? {
                format: isNullOrUndefined(this.format) ? this.dateTimeFormat : this.format,
                type: "dateTime",
                skeleton: "yMd"
            } : {
                format: format,
                type: "dateTime",
                skeleton: "yMd"
            };
            var date = this.globalize.parseDate(this.inputElement.value, dateOptions);
            this.strictMode && date ? (Input.setValue(this.globalize.formatDate(date, dateOptions), this.inputElement, this.floatLabelType, this.showClearButton), 
            this.inputElement.value !== this.previousEleValue && this.setProperties({
                value: date
            }, !0)) : this.strictMode || this.inputElement.value !== this.previousEleValue && this.setProperties({
                value: date
            }, !0), this.strictMode && !date && "" === this.inputElement.value && this.setProperties({
                value: null
            }, !0), isNaN(+this.value) && this.setProperties({
                value: null
            }, !0), isNullOrUndefined(this.value) && (this.currentDate = new Date(new Date().setHours(0, 0, 0, 0)));
        }, DatePicker.prototype.createCalendar = function() {
            var _this = this;
            this.popupWrapper = createElement("div", {
                className: ROOT$3 + " e-popup-wrapper"
            }), isNullOrUndefined(this.cssClass) || this.popupWrapper.classList.add(this.cssClass), 
            document.body.appendChild(this.popupWrapper), Browser.isDevice && (this.modelHeader(), 
            this.modal = createElement("div"), this.modal.className = ROOT$3 + " e-date-modal", 
            document.body.className += " e-date-overflow", this.modal.style.display = "block", 
            document.body.appendChild(this.modal)), this.calendarElement.querySelector("table tbody").className = "", 
            this.popupObj = new Popup(this.popupWrapper, {
                content: this.calendarElement,
                relateTo: Browser.isDevice ? document.body : this.inputWrapper.container,
                position: Browser.isDevice ? {
                    X: "center",
                    Y: "center"
                } : {
                    X: "left",
                    Y: "bottom"
                },
                offsetY: 4,
                targetType: "container",
                enableRtl: this.enableRtl,
                zIndex: this.zIndex,
                collision: Browser.isDevice ? {
                    X: "fit",
                    Y: "fit"
                } : {
                    X: "flip",
                    Y: "flip"
                },
                open: function() {
                    "datetimepicker" !== _this.getModuleName() && (document.activeElement === _this.inputElement || Browser.isDevice || (_this.calendarElement.children[1].firstElementChild.focus(), 
                    _this.calendarKeyboardModules = new KeyboardEvents(_this.calendarElement.children[1].firstElementChild, {
                        eventName: "keydown",
                        keyAction: _this.CalendarKeyActionHandle.bind(_this),
                        keyConfigs: _this.calendarKeyConfigs
                    }), _this.calendarKeyboardModules = new KeyboardEvents(_this.inputWrapper.container.children[_this.index], {
                        eventName: "keydown",
                        keyAction: _this.CalendarKeyActionHandle.bind(_this),
                        keyConfigs: _this.calendarKeyConfigs
                    })));
                },
                close: function() {
                    Browser.isDevice || _this.isDateIconClicked && _this.inputWrapper.container.children[_this.index].focus(), 
                    _this.value && _this.disabledDates(), _this.popupObj.destroy(), detach(_this.popupWrapper), 
                    _this.popupObj = _this.popupWrapper = null, _this.setAriaAttributes();
                }
            }), this.popupObj.element.classList.add(this.cssClass), this.setAriaAttributes();
        }, DatePicker.prototype.modelHeader = function() {
            var modelHeader = createElement("div", {
                className: "e-model-header"
            }), yearHeading = createElement("h5", {
                className: "e-model-year"
            }), h2 = createElement("div"), daySpan = createElement("span", {
                className: "e-model-day"
            }), monthSpan = createElement("span", {
                className: "e-model-month"
            });
            yearHeading.textContent = "" + this.globalize.formatDate(this.value || new Date(), {
                format: "y",
                skeleton: "dateTime"
            }), daySpan.textContent = this.globalize.formatDate(this.value || new Date(), {
                format: "E",
                skeleton: "dateTime"
            }) + ", ", monthSpan.textContent = "" + this.globalize.formatDate(this.value || new Date(), {
                format: "MMM d",
                skeleton: "dateTime"
            }), modelHeader.appendChild(yearHeading), h2.appendChild(daySpan), h2.appendChild(monthSpan), 
            modelHeader.appendChild(h2), this.calendarElement.insertBefore(modelHeader, this.calendarElement.firstElementChild);
        }, DatePicker.prototype.changeTrigger = function() {
            this.inputElement.value !== this.previousEleValue && (this.previousDate && this.previousDate.valueOf()) !== (this.value && this.value.valueOf()) && (this.changedArgs.value = this.value, 
            this.trigger("change", this.changedArgs), this.previousEleValue = this.inputElement.value, 
            this.previousDate = new Date("" + this.value));
        }, DatePicker.prototype.navigatedEvent = function() {
            this.trigger("navigated", this.navigatedArgs);
        }, DatePicker.prototype.changeEvent = function(e) {
            this.selectCalendar(e), this.changedArgs.event = e, this.trigger("change", this.changedArgs), 
            this.previousDate = this.value;
        }, DatePicker.prototype.selectCalendar = function(e) {
            var date, tempFormat;
            tempFormat = "datetimepicker" === this.getModuleName() && isNullOrUndefined(this.format) ? this.dateTimeFormat : this.format, 
            this.value && (date = "datetimepicker" === this.getModuleName() ? this.globalize.formatDate(this.changedArgs.value, {
                format: tempFormat,
                type: "dateTime",
                skeleton: "yMd"
            }) : this.globalize.formatDate(this.changedArgs.value, {
                format: this.format,
                type: "dateTime",
                skeleton: "yMd"
            })), isNullOrUndefined(date) || Input.setValue(date, this.inputElement, this.floatLabelType, this.showClearButton), 
            this.hide(), this.previousEleValue = this.inputElement.value, this.errorClass();
        }, DatePicker.prototype.isCalendar = function() {
            return !(!this.popupWrapper || !this.popupWrapper.classList.contains("e-popup-wrapper"));
        }, DatePicker.prototype.setWidth = function(width) {
            this.inputWrapper.container.style.width = "number" == typeof width ? formatUnit(this.width) : "string" == typeof width ? this.width : "100%";
        }, DatePicker.prototype.show = function() {
            var outOfRange, prevent = !0;
            isNullOrUndefined(this.value) || +this.value >= +this.min && +this.value <= +this.max ? outOfRange = this.value || null : (outOfRange = new Date("" + this.value), 
            this.setProperties({
                value: null
            }, !0)), this.isCalendar() || (_super.prototype.render.call(this), this.setProperties({
                value: outOfRange || null
            }, !0), this.previousDate = outOfRange, this.createCalendar()), this.preventArgs = {
                preventDefault: function() {
                    prevent = !1;
                }
            };
            var args = {
                popup: this.popupObj
            };
            if (merge(args, this.preventArgs), this.trigger("open", args), prevent) {
                addClass(this.inputWrapper.buttons, "e-active"), document.body.appendChild(this.popupObj.element), 
                this.popupObj.refreshPosition(this.inputElement);
                var openAnimation = {
                    name: "FadeIn",
                    duration: Browser.isDevice ? 0 : 300
                };
                this.popupObj.show(new Animation(openAnimation)), this.setAriaAttributes();
            } else detach(this.popupWrapper), this.popupObj.destroy(), this.popupWrapper = this.popupObj = null;
            EventHandler.add(document, "mousedown touchstart", this.documentHandler, this);
        }, DatePicker.prototype.hide = function() {
            var args = {
                popup: this.popupObj
            };
            this.preventArgs = {
                preventDefault: function() {
                    prevent = !1;
                }
            };
            var prevent = !0;
            removeClass(this.inputWrapper.buttons, "e-active"), removeClass([ document.body ], "e-date-overflow"), 
            merge(args, this.preventArgs), this.trigger("close", args), this.isCalendar() && prevent && (this.popupObj.hide(), 
            this.keyboardModule.destroy(), removeClass(this.inputWrapper.buttons, "e-active")), 
            this.setAriaAttributes(), this.previousEleValue = this.inputElement.value, Browser.isDevice && this.modal && (this.modal.style.display = "none", 
            this.modal.outerHTML = "", this.modal = null), EventHandler.remove(document, "mousedown touchstart", this.documentHandler);
        }, DatePicker.prototype.focusIn = function(triggerEvent) {
            this.inputElement.focus(), addClass([ this.inputWrapper.container ], [ "e-input-focus" ]), 
            this.trigger("focus");
        }, DatePicker.prototype.focusOut = function() {
            this.inputElement.blur(), removeClass([ this.inputWrapper.container ], [ "e-input-focus" ]), 
            this.trigger("blur");
        }, DatePicker.prototype.currentView = function() {
            var currentView;
            return this.calendarElement && (currentView = _super.prototype.currentView.call(this)), 
            currentView;
        }, DatePicker.prototype.navigateTo = function(view, date) {
            this.calendarElement && _super.prototype.navigateTo.call(this, view, date);
        }, DatePicker.prototype.destroy = function() {
            _super.prototype.destroy.call(this), this.keyboardModules.destroy(), this.popupObj && this.popupObj.element.classList.contains("e-popup") && _super.prototype.destroy.call(this);
            var ariaAttrs = {
                "aria-live": "assertive",
                "aria-atomic": "true",
                "aria-haspopup": "true",
                "aria-activedescendant": "null",
                "aria-owns": this.inputElement.id + "_options",
                "aria-expanded": "false",
                role: "combobox",
                autocomplete: "off"
            };
            Input.removeAttributes(ariaAttrs, this.inputElement), this.isCalendar() && (detach(this.popupWrapper), 
            this.popupObj = this.popupWrapper = null, this.keyboardModule.destroy()), EventHandler.remove(this.inputElement, "blur", this.inputBlurHandler), 
            EventHandler.remove(this.inputElement, "focus", this.inputFocusHandler), this.inputWrapper.container.insertAdjacentElement("afterend", this.inputEleCopy), 
            removeClass([ this.inputElement ], [ ROOT$3, "e-rtl", "e-input" ]), removeClass([ this.inputWrapper.container ], "e-date-wrapper"), 
            detach(this.inputWrapper.container);
        }, DatePicker.prototype.preRender = function() {
            this.inputEleCopy = this.element, this.inputElement = this.element, this.index = this.showClearButton ? 2 : 1;
            var ej2Instance = getValue("ej2_instances", this.element);
            if (this.ngTag = null, "EJS-DATEPICKER" === this.element.tagName || "EJS-DATETIMEPICKER" === this.element.tagName) {
                this.ngTag = this.element.tagName;
                for (var inputElement = createElement("input"), index = 0; index < this.element.attributes.length; index++) inputElement.setAttribute(this.element.attributes[index].nodeName, this.element.attributes[index].nodeValue), 
                inputElement.innerHTML = this.element.innerHTML;
                this.element.parentNode.appendChild(inputElement), this.element.parentNode.removeChild(this.element), 
                this.inputElement = inputElement, setValue("ej2_instances", ej2Instance, this.inputElement);
            }
            this.element.getAttribute("id") ? this.inputElement.id = this.element.getAttribute("id") : "datetimepicker" === this.getModuleName() ? (this.inputElement.id = getUniqueID("ej2-datetimepicker"), 
            attributes(this.element, {
                id: this.inputElement.id
            })) : (this.inputElement.id = getUniqueID("ej2-datepicker"), attributes(this.element, {
                id: this.inputElement.id
            })), this.checkHtmlAttributes(), _super.prototype.preRender.call(this);
        }, DatePicker.prototype.checkHtmlAttributes = function() {
            this.globalize = new Internationalization(this.locale);
            var options;
            options = "datetimepicker" === this.getModuleName() ? {
                format: isNullOrUndefined(this.format) ? this.dateTimeFormat : this.format,
                type: "dateTime",
                skeleton: "yMd"
            } : {
                format: this.format,
                type: "dateTime",
                skeleton: "yMd"
            };
            for (var _i = 0, attributes_1 = [ "value", "min", "max", "disabled", "readonly", "style", "name", "placeholder", "type" ]; _i < attributes_1.length; _i++) {
                var prop = attributes_1[_i];
                if (!isNullOrUndefined(this.inputElement.getAttribute(prop))) switch (prop) {
                  case "disabled":
                    var enabled = "disabled" === this.inputElement.getAttribute(prop) || "" === this.inputElement.getAttribute(prop);
                    this.setProperties({
                        enabled: enabled
                    }, !0), enabled || this.inputElement.setAttribute("aria-disabled", "true");
                    break;

                  case "readonly":
                    var readonly = "readonly" === this.inputElement.getAttribute(prop) || "" === this.inputElement.getAttribute(prop);
                    this.setProperties({
                        readonly: readonly
                    }, !0);
                    break;

                  case "placeholder":
                    if (null === this.placeholder) {
                        this.inputElement.getAttribute(prop);
                        this.setProperties({
                            placeholder: this.inputElement.getAttribute(prop)
                        }, !0);
                    }
                    break;

                  case "style":
                    this.inputElement.setAttribute("style", "" + this.inputElement.getAttribute(prop));
                    break;

                  case "name":
                    this.inputElement.setAttribute("name", "" + this.inputElement.getAttribute(prop));
                    break;

                  case "value":
                    if (!this.value) {
                        var value = this.inputElement.getAttribute(prop);
                        this.setProperties(setValue(prop, this.globalize.parseDate(value, options), {}), !0);
                    }
                    break;

                  case "min":
                    +this.min == +new Date(1900, 0, 1) && this.setProperties(setValue(prop, this.globalize.parseDate(this.inputElement.getAttribute(prop)), {}), !0);
                    break;

                  case "max":
                    +this.max == +new Date(2099, 11, 31) && this.setProperties(setValue(prop, this.globalize.parseDate(this.inputElement.getAttribute(prop)), {}), !0);
                    break;

                  case "type":
                    "text" !== this.inputElement.getAttribute(prop) && this.inputElement.setAttribute("type", "text");
                }
            }
        }, DatePicker.prototype.getModuleName = function() {
            return "datepicker";
        }, DatePicker.prototype.disabledDates = function() {
            var valueCopy = new Date("" + this.value), previousValCopy = this.previousDate;
            _super.prototype.render.call(this), this.previousDate = previousValCopy;
            var dateIdString = '*[id^="/id"]'.replace("/id", "" + (valueCopy && +valueCopy));
            this.strictMode || this.setProperties({
                value: valueCopy
            }, !0), isNullOrUndefined(this.calendarElement.querySelectorAll(dateIdString)[0]) || this.calendarElement.querySelectorAll(dateIdString)[0].classList.contains("e-disabled") && (this.strictMode || (this.setProperties({
                value: null
            }, !0), this.currentDate = new Date(new Date().setHours(0, 0, 0, 0))));
            var inputVal;
            inputVal = "datetimepicker" === this.getModuleName() ? this.globalize.formatDate(valueCopy, {
                format: isNullOrUndefined(this.format) ? this.dateTimeFormat : this.format,
                type: "dateTime",
                skeleton: "yMd"
            }) : this.globalize.formatDate(valueCopy, {
                format: this.format,
                type: "dateTime",
                skeleton: "yMd"
            }), Input.setValue(inputVal, this.inputElement, this.floatLabelType, this.showClearButton);
        }, DatePicker.prototype.setAriaAttributes = function() {
            this.isCalendar() ? (Input.addAttributes({
                "aria-expanded": "true"
            }, this.inputElement), attributes(this.inputElement, {
                "aria-activedescendant": "" + this.setActiveDescendant()
            })) : (Input.addAttributes({
                "aria-expanded": "false"
            }, this.inputElement), attributes(this.inputElement, {
                "aria-activedescendant": "null"
            }));
        }, DatePicker.prototype.errorClass = function() {
            !isNullOrUndefined(this.value) && !(+this.value >= +this.min && +this.value <= +this.max) || !this.strictMode && "" !== this.inputElement.value && isNullOrUndefined(this.value) ? addClass([ this.inputWrapper.container ], "e-error") : removeClass([ this.inputWrapper.container ], "e-error");
        }, DatePicker.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var options = {
                format: this.format,
                type: "dateTime",
                skeleton: "yMd"
            }, _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "value":
                    "string" == typeof newProp.value && (newProp.value = this.globalize.parseDate(newProp.value, options)), 
                    this.setProperties({
                        value: newProp.value
                    }, !0), this.previousEleValue = this.inputElement.value, isNullOrUndefined(this.value) && (Input.setValue("", this.inputElement, this.floatLabelType, this.showClearButton), 
                    this.currentDate = new Date(new Date().setHours(0, 0, 0, 0))), this.updateInput(), 
                    this.changeTrigger();
                    break;

                  case "format":
                    this.updateInput();
                    break;

                  case "placeholder":
                    Input.setPlaceholder(this.placeholder, this.inputElement);
                    break;

                  case "readonly":
                    Input.setReadonly(this.readonly, this.inputElement);
                    break;

                  case "enabled":
                    Input.setEnabled(this.enabled, this.inputElement), this.bindEvents();
                    break;

                  case "locale":
                    this.globalize = new Internationalization(this.locale), this.l10n.setLocale(this.locale), 
                    this.setProperties({
                        placeholder: this.l10n.getConstant("placeholder")
                    }, !0), Input.setPlaceholder(this.placeholder, this.inputElement), this.updateInput();
                    break;

                  case "enableRtl":
                    Input.setEnableRtl(this.enableRtl, [ this.inputWrapper.container ]);
                    break;

                  case "zIndex":
                    this.setProperties({
                        zIndex: newProp.zIndex
                    }, !0);
                    break;

                  case "cssClass":
                    Input.setCssClass(newProp.cssClass, [ this.inputWrapper.container ]), this.popupWrapper && addClass([ this.popupWrapper ], [ newProp.cssClass ]);
                    break;

                  case "strictMode":
                    this.updateInput();
                    break;

                  case "width":
                    this.setWidth(newProp.width);
                    break;

                  default:
                    this.calendarElement && _super.prototype.onPropertyChanged.call(this, newProp, oldProp);
                }
                this.hide();
            }
        }, __decorate$14([ Property(null) ], DatePicker.prototype, "width", void 0), __decorate$14([ Property(null) ], DatePicker.prototype, "cssClass", void 0), 
        __decorate$14([ Property(!1) ], DatePicker.prototype, "strictMode", void 0), __decorate$14([ Property(null) ], DatePicker.prototype, "format", void 0), 
        __decorate$14([ Property(!0) ], DatePicker.prototype, "enabled", void 0), __decorate$14([ Property(!0) ], DatePicker.prototype, "showClearButton", void 0), 
        __decorate$14([ Property(1e3) ], DatePicker.prototype, "zIndex", void 0), __decorate$14([ Property(!1) ], DatePicker.prototype, "readonly", void 0), 
        __decorate$14([ Property(null) ], DatePicker.prototype, "placeholder", void 0), 
        __decorate$14([ Property("Never") ], DatePicker.prototype, "floatLabelType", void 0), 
        __decorate$14([ Event() ], DatePicker.prototype, "open", void 0), __decorate$14([ Event() ], DatePicker.prototype, "close", void 0), 
        __decorate$14([ Event() ], DatePicker.prototype, "blur", void 0), __decorate$14([ Event() ], DatePicker.prototype, "focus", void 0), 
        __decorate$14([ Event() ], DatePicker.prototype, "created", void 0), __decorate$14([ Event() ], DatePicker.prototype, "destroyed", void 0), 
        DatePicker = __decorate$14([ NotifyPropertyChanges ], DatePicker);
    }(Calendar), __extends$16 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$15 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, LEFTCALENDER = "e-left-calendar", RIGHTCALENDER = "e-right-calendar", ROOT$4 = "e-daterangepicker", ACTIVE$1 = "e-active", STARTDATE = "e-start-date", ENDDATE = "e-end-date", RANGEHOVER = "e-range-hover", DISABLED$5 = "e-disabled", CALENDAR = "e-calendar", FOCUSDATE = "e-focused-date", DATEDISABLED = "e-date-disabled", ICONDISABLED = "e-icon-disabled", OVERLAY$1 = "e-overlay", LISTCLASS = cssClass.li, HOVER = "e-hover", Presets = function(_super) {
        function Presets() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$16(Presets, _super), __decorate$15([ Property() ], Presets.prototype, "label", void 0), 
        __decorate$15([ Property() ], Presets.prototype, "start", void 0), __decorate$15([ Property() ], Presets.prototype, "end", void 0), 
        Presets;
    }(ChildProperty), DateRangePicker = function(_super) {
        function DateRangePicker(options, element) {
            var _this = _super.call(this, options, element) || this;
            return _this.isCustomRange = !1, _this.isCustomWindow = !1, _this.presetsItem = [], 
            _this.liCollections = [], _this.previousEleValue = "", _this.isTab = !1, _this.isKeyPopup = !1, 
            _this.dateDisabled = !1, _this.isRangeIconClicked = !1, _this.isMaxDaysClicked = !1, 
            _this.disabledDays = [], _this;
        }
        return __extends$16(DateRangePicker, _super), DateRangePicker.prototype.render = function() {
            this.initialize();
        }, DateRangePicker.prototype.preRender = function() {
            this.presetKeyConfig = {
                moveUp: "uparrow",
                moveDown: "downarrow",
                enter: "enter",
                tab: "tab"
            }, this.keyInputConfigs = {
                altUpArrow: "alt+uparrow",
                altDownArrow: "alt+downarrow",
                escape: "escape",
                enter: "enter",
                tab: "tab"
            }, this.defaultConstant = {
                placeholder: "",
                startLabel: "Start Date",
                endLabel: "End Date",
                customRange: "Custom Range",
                applyText: "Apply",
                cancelText: "Cancel",
                selectedDays: "Selected Days",
                days: "days"
            }, this.isMobile = window.matchMedia("(max-width:550px)").matches, this.inputElement = this.element;
            var ej2Instance = getValue("ej2_instances", this.element);
            if (this.angularTag = null, "EJS-DATERANGEPICKER" === this.element.tagName) {
                this.angularTag = this.element.tagName;
                for (var inputEle = createElement("input"), index = 0; index < this.element.attributes.length; index++) inputEle.setAttribute(this.element.attributes[index].nodeName, this.element.attributes[index].nodeValue), 
                inputEle.innerHTML = this.element.innerHTML;
                this.element.parentNode.appendChild(inputEle), this.element.parentNode.removeChild(this.element), 
                this.inputElement = inputEle, setValue("ej2_instances", ej2Instance, this.inputElement);
            }
            this.cloneElement = this.element.cloneNode(!0), this.initProperty(), _super.prototype.preRender.call(this), 
            this.navNextFunction = this.navNextMonth.bind(this), this.navPrevFunction = this.navPreviousMonth.bind(this), 
            this.deviceNavNextFunction = this.deviceNavNext.bind(this), this.deviceNavPrevFunction = this.deviceNavPrevious.bind(this);
        }, DateRangePicker.prototype.initProperty = function() {
            this.value = null, this.start = this.depth = "Month";
        }, DateRangePicker.prototype.initialize = function() {
            merge(this.keyConfigs, {
                shiftTab: "shift+tab"
            }), this.setProperties({
                startDate: this.checkDateValue(new Date("" + this.startDate))
            }, !0), this.setProperties({
                endDate: this.checkDateValue(new Date("" + this.endDate))
            }, !0), this.setProperties({
                min: this.checkDateValue(new Date("" + this.min))
            }, !0), this.setProperties({
                max: this.checkDateValue(new Date("" + this.max))
            }, !0), this.checkHtmlAttributes(), this.globalize = new Internationalization(this.locale), 
            this.l10n = new L10n("daterangepicker", this.defaultConstant, this.locale), this.l10n.setLocale(this.locale), 
            this.setProperties({
                placeholder: this.placeholder || this.l10n.getConstant("placeholder")
            }, !0), this.processPresets(), this.createInput(), this.bindEvents();
        }, DateRangePicker.prototype.processPresets = function() {
            var i = 0;
            if (!isUndefined(this.presets[0].start && this.presets[0].end && this.presets[0].label)) {
                for (var _i = 0, _a = this.presets; _i < _a.length; _i++) {
                    var range = _a[_i], id = range.label.replace(/\s+/g, "") + "_" + ++i;
                    this.presetsItem.push({
                        id: id,
                        text: range.label,
                        start: range.start,
                        end: range.end
                    });
                }
                this.validateDates();
                var startDate = isNullOrUndefined(this.startDate) ? null : new Date(+this.startDate), endDate = isNullOrUndefined(this.endDate) ? null : new Date(+this.endDate);
                this.presetsItem.push({
                    id: "custom_range",
                    text: this.l10n.getConstant("customRange"),
                    start: startDate,
                    end: endDate
                }), isNullOrUndefined(this.startDate) || isNullOrUndefined(this.endDate) || (this.isCustomRange = !0, 
                this.activeIndex = this.presetsItem.length - 1);
            }
        }, DateRangePicker.prototype.bindEvents = function() {
            this.enabled ? (EventHandler.add(this.inputWrapper.buttons[0], "click", this.rangeIconHandler, this), 
            EventHandler.add(this.inputElement, "blur", this.inputBlurHandler, this), this.bindClearEvent(), 
            this.isMobile || (EventHandler.add(this.inputWrapper.buttons[0], "blur", this.iconBlurHandler, this), 
            this.inputKeyboardModule = new KeyboardEvents(this.inputElement, {
                eventName: "keydown",
                keyAction: this.inputHandler.bind(this),
                keyConfigs: this.keyInputConfigs
            }))) : (EventHandler.remove(this.inputWrapper.buttons[0], "click", this.rangeIconHandler), 
            EventHandler.remove(this.inputElement, "blur", this.inputBlurHandler), this.isMobile || (EventHandler.remove(this.inputWrapper.buttons[0], "blur", this.iconBlurHandler), 
            isNullOrUndefined(this.inputKeyboardModule) || this.inputKeyboardModule.destroy()));
        }, DateRangePicker.prototype.bindClearEvent = function() {
            this.showClearButton && EventHandler.add(this.inputWrapper.clearButton, "mousedown", this.resetHandler, this);
        }, DateRangePicker.prototype.resetHandler = function(e) {
            e.preventDefault(), this.clear();
        }, DateRangePicker.prototype.clear = function() {
            this.setProperties({
                startDate: null
            }, !0), this.setProperties({
                endDate: null
            }, !0), Input.setValue("", this.inputElement), this.changeTrigger();
        }, DateRangePicker.prototype.rangeIconHandler = function(e) {
            this.targetElement = null, this.isPopupOpen() ? this.applyFunction() : (this.isRangeIconClicked = !0, 
            this.show());
        }, DateRangePicker.prototype.checkHtmlAttributes = function() {
            this.globalize = new Internationalization(this.locale);
            var attributes$$1;
            attributes$$1 = [ "startDate", "endDate", "minDays", "maxDays", "min", "max", "disabled", "readonly", "style", "name", "placeholder", "type" ];
            for (var format = {
                format: this.format,
                type: "date",
                skeleton: "yMd"
            }, _i = 0, attributes_1 = attributes$$1; _i < attributes_1.length; _i++) {
                var prop = attributes_1[_i];
                if (!isNullOrUndefined(this.inputElement.getAttribute(prop))) switch (prop) {
                  case "disabled":
                    var disabled = "disabled" === this.inputElement.getAttribute(prop) || "" === this.inputElement.getAttribute(prop);
                    this.setProperties({
                        enabled: !disabled
                    }, !0);
                    break;

                  case "readonly":
                    var readonly = "readonly" === this.inputElement.getAttribute(prop) || "" === this.inputElement.getAttribute(prop);
                    this.setProperties({
                        readonly: readonly
                    }, !0);
                    break;

                  case "placeholder":
                    (isNullOrUndefined(this.placeholder) || "" === this.placeholder.trim()) && this.setProperties({
                        placeholder: this.inputElement.getAttribute(prop)
                    }, !0);
                    break;

                  case "style":
                    this.inputElement.setAttribute("style", "" + this.inputElement.getAttribute(prop));
                    break;

                  case "min":
                    if (isNullOrUndefined(this.min) || +this.min == +new Date(1900, 0, 1)) {
                        var dateValue = this.globalize.parseDate(this.inputElement.getAttribute(prop), format);
                        this.setProperties(setValue(prop, dateValue, {}), !0);
                    }
                    break;

                  case "name":
                    this.inputElement.setAttribute("name", "" + this.inputElement.getAttribute(prop));
                    break;

                  case "max":
                    if (isNullOrUndefined(this.max) || +this.max == +new Date(2099, 11, 31)) {
                        dateValue = this.globalize.parseDate(this.inputElement.getAttribute(prop), format);
                        this.setProperties(setValue(prop, dateValue, {}), !0);
                    }
                    break;

                  case "startDate":
                    if (isNullOrUndefined(this.startDate)) {
                        dateValue = this.globalize.parseDate(this.inputElement.getAttribute(prop), format);
                        this.setProperties(setValue(prop, dateValue, {}), !0);
                    }
                    break;

                  case "endDate":
                    if (isNullOrUndefined(this.endDate)) {
                        dateValue = this.globalize.parseDate(this.inputElement.getAttribute(prop), format);
                        this.setProperties(setValue(prop, dateValue, {}), !0);
                    }
                    break;

                  case "minDays":
                    isNullOrUndefined(this.minDays) && this.setProperties(setValue(prop, parseInt(this.inputElement.getAttribute(prop), 10), {}), !0);
                    break;

                  case "maxDays":
                    isNullOrUndefined(this.maxDays) && this.setProperties(setValue(prop, parseInt(this.inputElement.getAttribute(prop), 10), {}), !0);
                    break;

                  case "type":
                    "text" !== this.inputElement.getAttribute(prop) && this.inputElement.setAttribute("type", "text");
                }
            }
        }, DateRangePicker.prototype.createPopup = function() {
            this.activeIndex = this.presetsItem.length - 1, this.isCustomRange = !0;
            for (var i = 0; i <= this.presetsItem.length - 2; i++) {
                var startDate = this.presetsItem[i].start, endDate = this.presetsItem[i].end;
                this.startDate && this.endDate && +startDate.setMilliseconds(0) == +this.startDate.setMilliseconds(0) && +endDate.setMilliseconds(0) == +this.endDate.setMilliseconds(0) && (this.activeIndex = i, 
                this.isCustomRange = !1);
            }
            this.popupWrapper = createElement("div", {
                id: this.inputElement.id + "_popup",
                className: ROOT$4 + " e-popup"
            });
            var isPreset = !this.isCustomRange || this.isMobile;
            !isUndefined(this.presets[0].start && this.presets[0].end && this.presets[0].label) && isPreset ? (this.isCustomWindow = !1, 
            this.createPresets(), document.body.appendChild(this.popupWrapper), this.listRippleEffect(), 
            this.renderPopup()) : (this.isCustomWindow = !0, this.renderControl());
        }, DateRangePicker.prototype.renderControl = function() {
            this.createControl(), this.bindCalendarEvents(), this.updateRange(this.isMobile ? [ this.calendarElement ] : [ this.leftCalendar, this.rightCalendar ]), 
            isNullOrUndefined(this.endDate) || isNullOrUndefined(this.startDate) || this.disabledDateRender(), 
            this.updateHeader();
        }, DateRangePicker.prototype.clearCalendarEvents = function() {
            EventHandler.clearEvents(this.leftCalPrevIcon), EventHandler.clearEvents(this.leftCalNextIcon), 
            EventHandler.clearEvents(this.rightCalPrevIcon), EventHandler.clearEvents(this.rightCalNextIcon), 
            EventHandler.clearEvents(this.headerTitleElement);
        }, DateRangePicker.prototype.updateNavIcons = function() {
            this.previousIcon = this.rightCalPrevIcon, this.nextIcon = this.leftCalNextIcon, 
            this.nextIconHandler(this.compareMonths(new Date("" + this.leftCalCurrentDate), this.rightCalCurrentDate) < 1), 
            this.previousIconHandler(this.compareMonths(new Date("" + this.leftCalCurrentDate), this.rightCalCurrentDate) < 1);
        }, DateRangePicker.prototype.calendarIconEvent = function() {
            this.clearCalendarEvents(), this.leftCalPrevIcon && !this.leftCalPrevIcon.classList.contains(DISABLED$5) && EventHandler.add(this.leftCalPrevIcon, "mousedown", this.navPrevFunction), 
            this.leftCalNextIcon && !this.leftCalNextIcon.classList.contains(DISABLED$5) && EventHandler.add(this.leftCalNextIcon, "mousedown", this.navNextFunction), 
            this.rightCalPrevIcon && !this.rightCalPrevIcon.classList.contains(DISABLED$5) && EventHandler.add(this.rightCalPrevIcon, "mousedown", this.navPrevFunction), 
            this.rightCalNextIcon && !this.rightCalNextIcon.classList.contains(DISABLED$5) && EventHandler.add(this.rightCalNextIcon, "mousedown", this.navNextFunction);
        }, DateRangePicker.prototype.bindCalendarEvents = function() {
            this.isMobile ? (EventHandler.clearEvents(this.headerTitleElement), this.deviceCalendarEvent(), 
            EventHandler.add(this.startButton.element, "click", this.deviceHeaderClick, this), 
            EventHandler.add(this.endButton.element, "click", this.deviceHeaderClick, this)) : (this.updateNavIcons(), 
            this.calendarIconEvent(), this.calendarIconRipple(), this.headerTitleElement = this.popupObj.element.querySelector(".e-right-calendar .e-header .e-title"), 
            EventHandler.clearEvents(this.headerTitleElement), this.headerTitleElement = this.popupObj.element.querySelector(".e-left-calendar .e-header .e-title"), 
            EventHandler.clearEvents(this.headerTitleElement), this.leftKeyboardModule = new KeyboardEvents(this.leftCalendar, {
                eventName: "keydown",
                keyAction: this.keyInputHandler.bind(this),
                keyConfigs: this.keyConfigs
            }), this.rightKeyboardModule = new KeyboardEvents(this.rightCalendar, {
                eventName: "keydown",
                keyAction: this.keyInputHandler.bind(this),
                keyConfigs: this.keyConfigs
            })), this.bindCalendarCellEvents(), this.removeFocusedDate();
        }, DateRangePicker.prototype.calendarIconRipple = function() {
            rippleEffect(this.leftCalPrevIcon, {
                selector: ".e-prev",
                duration: 400,
                isCenterRipple: !0
            }), rippleEffect(this.leftCalNextIcon, {
                selector: ".e-next",
                duration: 400,
                isCenterRipple: !0
            }), rippleEffect(this.rightCalPrevIcon, {
                selector: ".e-prev",
                duration: 400,
                isCenterRipple: !0
            }), rippleEffect(this.rightCalNextIcon, {
                selector: ".e-next",
                duration: 400,
                isCenterRipple: !0
            });
        }, DateRangePicker.prototype.deviceCalendarEvent = function() {
            EventHandler.clearEvents(this.nextIcon), EventHandler.clearEvents(this.previousIcon), 
            rippleEffect(this.nextIcon, {
                selector: ".e-prev",
                duration: 400,
                isCenterRipple: !0
            }), rippleEffect(this.previousIcon, {
                selector: ".e-next",
                duration: 400,
                isCenterRipple: !0
            }), this.nextIcon && !this.nextIcon.classList.contains(DISABLED$5) && EventHandler.add(this.nextIcon, "mousedown", this.deviceNavNextFunction), 
            this.previousIcon && !this.previousIcon.classList.contains(DISABLED$5) && EventHandler.add(this.previousIcon, "mousedown", this.deviceNavPrevFunction);
        }, DateRangePicker.prototype.deviceNavNext = function(e) {
            var calendar = closest(e.target, "." + CALENDAR);
            this.updateDeviceCalendar(calendar), this.navigateNext(e), this.deviceNavigation();
        }, DateRangePicker.prototype.deviceNavPrevious = function(e) {
            var calendar = closest(e.target, "." + CALENDAR);
            this.updateDeviceCalendar(calendar), this.navigatePrevious(e), this.deviceNavigation();
        }, DateRangePicker.prototype.updateDeviceCalendar = function(calendar) {
            calendar && (this.previousIcon = calendar.querySelector(".e-prev"), this.nextIcon = calendar.querySelector(".e-next"), 
            this.calendarElement = calendar, this.deviceCalendar = calendar, this.contentElement = calendar.querySelector(".e-content"), 
            this.tableBodyElement = select(".e-content tbody", calendar), this.table = calendar.querySelector(".e-content").getElementsByTagName("table")[0], 
            this.headerTitleElement = calendar.querySelector(".e-header .e-title"), this.headerElement = calendar.querySelector(".e-header"));
        }, DateRangePicker.prototype.deviceHeaderClick = function(event) {
            if (event.currentTarget.classList.contains("e-start-btn") && !isNullOrUndefined(this.startDate)) {
                this.endButton.element.classList.remove(ACTIVE$1), this.startButton.element.classList.add(ACTIVE$1);
                var calendar = this.popupObj.element.querySelector("." + CALENDAR);
                this.updateDeviceCalendar(calendar), isNullOrUndefined(this.calendarElement.querySelector(".e-start-date:not(.e-other-month)")) && (this.currentDate = new Date(+this.startDate), 
                remove(this.tableBodyElement), this.renderMonths(), this.deviceNavigation()), this.removeClassDisabled();
            } else if (!isNullOrUndefined(this.startDate) && !isNullOrUndefined(this.endDate)) {
                this.startButton.element.classList.remove(ACTIVE$1), this.endButton.element.classList.add(ACTIVE$1);
                calendar = this.popupObj.element.querySelector("." + CALENDAR);
                this.updateDeviceCalendar(calendar), isNullOrUndefined(this.calendarElement.querySelector(".e-end-date:not(.e-other-month)")) && (this.currentDate = new Date(+this.endDate), 
                remove(this.tableBodyElement), this.renderMonths(), this.deviceNavigation()), this.updateMinMaxDays(this.popupObj.element.querySelector("." + CALENDAR)), 
                this.selectableDates();
            }
        }, DateRangePicker.prototype.inputBlurHandler = function() {
            var value = this.inputElement.value;
            if (isNullOrUndefined(this.presetsItem) || this.presetsItem.length > 0 && this.previousEleValue !== this.inputElement.value && (this.activeIndex = this.presetsItem.length - 1, 
            this.isCustomRange = !0), !isNullOrUndefined(value) && "" !== value.trim()) {
                var range = value.split(" " + this.separator + " ");
                if (range.length > 1) {
                    var dateOptions = {
                        format: this.format,
                        type: "date",
                        skeleton: "yMd"
                    }, startDate = this.globalize.parseDate(range[0].trim(), dateOptions), endDate = this.globalize.parseDate(range[1].trim(), dateOptions);
                    if (!(isNullOrUndefined(startDate) || isNaN(+startDate) || isNullOrUndefined(endDate) || isNaN(+endDate))) return this.setProperties({
                        startDate: startDate
                    }, !0), this.setProperties({
                        endDate: endDate
                    }, !0), this.refreshControl(), void this.changeTrigger();
                }
            }
            this.strictMode ? (this.inputElement.value = "", this.updateInput()) : this.clearRange(), 
            this.errorClass(), this.changeTrigger();
        }, DateRangePicker.prototype.clearRange = function() {
            this.setProperties({
                startDate: null
            }, !0), this.setProperties({
                endDate: null
            }, !0), this.previousStartValue = this.previousEndValue = null, this.currentDate = null;
        }, DateRangePicker.prototype.errorClass = function() {
            var inputStr = this.inputElement.value.trim();
            isNullOrUndefined(this.endDate) && isNullOrUndefined(this.startDate) && "" !== inputStr ? (addClass([ this.inputWrapper.container ], "e-error"), 
            attributes(this.inputElement, {
                "aria-invalid": "true"
            })) : (removeClass([ this.inputWrapper.container ], "e-error"), attributes(this.inputElement, {
                "aria-invalid": "false"
            }));
        }, DateRangePicker.prototype.keyCalendarUpdate = function(isLeftCalendar, ele) {
            return this.removeFocusedDate(), isLeftCalendar ? (this.leftCalCurrentDate = new Date(+this.currentDate), 
            ele = this.leftCalendar) : (this.rightCalCurrentDate = new Date(+this.currentDate), 
            ele = this.rightCalendar), this.updateCalendarElement(ele), this.table.focus(), 
            ele;
        }, DateRangePicker.prototype.navInCalendar = function(e, isLeftCalendar, leftLimit, rightLimit, ele) {
            var date, max, min = this.min;
            switch (max = !isNullOrUndefined(this.maxDays) && this.isMaxDaysClicked ? new Date(new Date(+this.startDate).setDate(this.startDate.getDate() + (this.maxDays - 1))) : this.max, 
            e.action) {
              case "moveRight":
                date = new Date(+this.currentDate), this.addDay(date, 1, e, max, min), isLeftCalendar && +date == +rightLimit && (ele = this.keyCalendarUpdate(!1, ele)), 
                this.KeyboardNavigate(1, 0, e, max, min), this.keyNavigation(ele, e);
                break;

              case "moveLeft":
                date = new Date(+this.currentDate), this.addDay(date, -1, e, max, min), isLeftCalendar || +date != +leftLimit || (ele = this.keyCalendarUpdate(!0, ele)), 
                this.KeyboardNavigate(-1, 0, e, max, min), this.keyNavigation(ele, e);
                break;

              case "moveUp":
                date = new Date(+this.currentDate), this.addDay(date, -7, e, max, min), !isLeftCalendar && +date <= +leftLimit && (ele = this.keyCalendarUpdate(!0, ele)), 
                this.KeyboardNavigate(-7, 0, e, max, min), this.keyNavigation(ele, e);
                break;

              case "moveDown":
                date = new Date(+this.currentDate), this.addDay(date, 7, e, max, min), isLeftCalendar && +date >= +rightLimit && (ele = this.keyCalendarUpdate(!1, ele)), 
                this.KeyboardNavigate(7, 0, e, max, min), this.keyNavigation(ele, e);
                break;

              case "home":
                this.currentDate = this.firstDay(this.currentDate), remove(this.tableBodyElement), 
                this.renderMonths(), this.keyNavigation(ele, e);
                break;

              case "end":
                this.currentDate = this.lastDay(this.currentDate), remove(this.tableBodyElement), 
                this.renderMonths(), this.keyNavigation(ele, e);
            }
        }, DateRangePicker.prototype.keyInputHandler = function(e) {
            var date, rightDateLimit = new Date(this.rightCalCurrentDate.getFullYear(), this.rightCalCurrentDate.getMonth(), 1), leftDateLimit = new Date(this.leftCalCurrentDate.getFullYear(), this.leftCalCurrentDate.getMonth() + 1, 0), ele = closest(e.target, "." + RIGHTCALENDER), isLeftCalendar = (ele = isNullOrUndefined(ele) ? this.leftCalendar : ele).classList.contains(LEFTCALENDER);
            this.updateCalendarElement(ele);
            var focusedDate = ele.querySelector("tr td." + FOCUSDATE), startDate = ele.querySelector("tr td." + STARTDATE), endDate = ele.querySelector("tr td." + ENDDATE);
            switch (isNullOrUndefined(focusedDate) ? isNullOrUndefined(endDate) || this.dateDisabled ? isNullOrUndefined(startDate) || this.dateDisabled ? this.dateDisabled || this.currentDate.setDate(1) : this.currentDate = new Date(+this.startDate) : this.currentDate = new Date(+this.endDate) : this.currentDate = this.currentDate, 
            e.action) {
              case "select":
                var element = isNullOrUndefined(focusedDate) ? startDate : focusedDate;
                isNullOrUndefined(element) || element.classList.contains(DISABLED$5) || this.selectRange(e, element), 
                e.preventDefault();
                break;

              case "controlHome":
                var yearDate = new Date(this.currentDate.getFullYear(), 0, 1);
                !isLeftCalendar && +yearDate < +leftDateLimit && (ele = this.keyCalendarUpdate(!0, ele)), 
                this.navigateTo("Month", new Date(this.currentDate.getFullYear(), 0, 1)), this.keyNavigation(ele, e);
                break;

              case "controlEnd":
                yearDate = new Date(this.currentDate.getFullYear(), 11, 31), isLeftCalendar && +yearDate > +rightDateLimit && (ele = this.keyCalendarUpdate(!1, ele)), 
                this.navigateTo("Month", new Date(this.currentDate.getFullYear(), 11, 31)), this.keyNavigation(ele, e);
                break;

              case "pageUp":
                date = new Date(+this.currentDate), this.addMonths(date, -1), !isLeftCalendar && +date <= +leftDateLimit && (ele = this.keyCalendarUpdate(!0, ele)), 
                this.addMonths(this.currentDate, -1), this.navigateTo("Month", this.currentDate), 
                this.keyNavigation(ele, e);
                break;

              case "pageDown":
                date = new Date(+this.currentDate), this.addMonths(date, 1), isLeftCalendar && +date >= +rightDateLimit && (ele = this.keyCalendarUpdate(!1, ele)), 
                this.addMonths(this.currentDate, 1), this.navigateTo("Month", this.currentDate), 
                this.keyNavigation(ele, e);
                break;

              case "shiftPageUp":
                date = new Date(+this.currentDate), this.addYears(date, -1), !isLeftCalendar && +date <= +leftDateLimit && (ele = this.keyCalendarUpdate(!0, ele)), 
                this.addYears(this.currentDate, -1), this.navigateTo("Month", this.currentDate), 
                this.keyNavigation(ele, e);
                break;

              case "shiftPageDown":
                date = new Date(+this.currentDate), this.addYears(date, 1), isLeftCalendar && +date >= +rightDateLimit && (ele = this.keyCalendarUpdate(!1, ele)), 
                this.addYears(this.currentDate, 1), this.navigateTo("Month", this.currentDate), 
                this.keyNavigation(ele, e);
                break;

              case "shiftTab":
                isNullOrUndefined(this.presetElement) || (this.presetElement.setAttribute("tabindex", "0"), 
                this.presetElement.focus(), this.removeFocusedDate()), e.preventDefault();
                break;

              default:
                this.navInCalendar(e, isLeftCalendar, leftDateLimit, rightDateLimit, ele), this.checkMinMaxDays();
            }
            this.presetHeight();
        }, DateRangePicker.prototype.keyNavigation = function(calendar, e) {
            this.bindCalendarCellEvents(calendar), calendar.classList.contains(LEFTCALENDER) ? this.leftCalCurrentDate = new Date(+this.currentDate) : this.rightCalCurrentDate = new Date(+this.currentDate), 
            this.updateNavIcons(), this.calendarIconEvent(), this.updateRange([ calendar ]), 
            this.dateDisabled = this.isDateDisabled(this.currentDate), e.preventDefault();
        }, DateRangePicker.prototype.inputHandler = function(e) {
            switch (e.action) {
              case "altUpArrow":
                this.isPopupOpen() && this.hide();
                break;

              case "altDownArrow":
                this.isPopupOpen() || (this.show(), this.isKeyPopup = !0, this.isRangeIconClicked = !1);
                break;

              case "escape":
                this.isPopupOpen() && this.hide();
                break;

              case "enter":
                document.activeElement === this.inputElement && (this.inputBlurHandler(), this.hide());
                break;

              case "tab":
                document.activeElement === this.inputElement && this.isPopupOpen() && (this.hide(), 
                e.preventDefault());
            }
        }, DateRangePicker.prototype.bindCalendarCellEvents = function(calendar) {
            for (var _i = 0, tdCells_1 = calendar ? calendar.querySelectorAll(".e-calendar td") : this.popupObj.element.querySelectorAll(".e-calendar td"); _i < tdCells_1.length; _i++) {
                var cell = tdCells_1[_i];
                EventHandler.clearEvents(cell);
                cell.classList.contains(DISABLED$5) || cell.classList.contains(DATEDISABLED) || cell.classList.contains("e-week-number") || (EventHandler.add(cell, "mousedown", this.selectRange, this), 
                this.isMobile || EventHandler.add(cell, "mouseover", this.hoverSelection, this));
            }
        }, DateRangePicker.prototype.removeFocusedDate = function() {
            for (var isDate = !isNullOrUndefined(this.startDate) || !isNullOrUndefined(this.endDate), _i = 0, focusedDate_1 = this.popupObj.element.querySelectorAll(".e-calendar ." + FOCUSDATE); _i < focusedDate_1.length; _i++) {
                var ele = focusedDate_1[_i];
                (!ele.classList.contains("e-today") || ele.classList.contains("e-today") && isDate) && (ele.classList.remove(FOCUSDATE), 
                ele.classList.contains(STARTDATE) || ele.classList.contains(ENDDATE) || ele.removeAttribute("aria-label"));
            }
        }, DateRangePicker.prototype.hoverSelection = function(event, element) {
            var currentElement = element || event.currentTarget, currentDate = this.getIdValue(null, currentElement);
            if (!isNullOrUndefined(this.startDate) && isNullOrUndefined(this.endDate)) for (var _i = 0, tdCells_2 = this.popupObj.element.querySelectorAll(".e-calendar td"); _i < tdCells_2.length; _i++) {
                var ele = tdCells_2[_i], isDisabledCell = !ele.classList.contains(DISABLED$5) || ele.classList.contains(DATEDISABLED);
                if (!ele.classList.contains("e-week-number") && isDisabledCell) {
                    var eleDate = this.getIdValue(null, ele);
                    +eleDate >= +this.startDate && +eleDate <= +currentDate ? addClass([ ele ], RANGEHOVER) : removeClass([ ele ], [ RANGEHOVER ]);
                }
            }
        }, DateRangePicker.prototype.updateRange = function(elementCollection) {
            if (!isNullOrUndefined(this.startDate)) for (var _i = 0, elementCollection_1 = elementCollection; _i < elementCollection_1.length; _i++) for (var _a = 0, tdCells_3 = elementCollection_1[_i].querySelectorAll(".e-calendar td"); _a < tdCells_3.length; _a++) {
                var ele = tdCells_3[_a];
                if (!ele.classList.contains("e-week-number") && !ele.classList.contains(DISABLED$5)) {
                    var eleDate = this.getIdValue(null, ele);
                    isNullOrUndefined(this.endDate) ? removeClass([ ele ], [ RANGEHOVER ]) : +eleDate >= +this.startDate && +eleDate <= +this.endDate && +this.startDate != +this.endDate && addClass([ ele ], RANGEHOVER), 
                    ele.classList.contains("e-other-month") || (+eleDate == +this.startDate && (addClass([ ele ], [ STARTDATE, "e-selected" ]), 
                    this.addSelectedAttributes(ele, this.startDate, !0)), isNullOrUndefined(this.endDate) || +eleDate != +this.endDate || (addClass([ ele ], [ ENDDATE, "e-selected" ]), 
                    this.addSelectedAttributes(ele, this.endDate, !1)), +eleDate != +this.startDate || isNullOrUndefined(this.endDate) || +eleDate != +this.endDate || this.addSelectedAttributes(ele, this.endDate, !1, !0));
                }
            }
        }, DateRangePicker.prototype.checkMinMaxDays = function() {
            (!isNullOrUndefined(this.minDays) && this.minDays > 0 || !isNullOrUndefined(this.maxDays) && this.maxDays > 0) && (this.isMobile ? this.updateMinMaxDays(this.popupObj.element.querySelector("." + CALENDAR)) : (this.updateMinMaxDays(this.popupObj.element.querySelector("." + LEFTCALENDER)), 
            this.updateMinMaxDays(this.popupObj.element.querySelector("." + RIGHTCALENDER))));
        }, DateRangePicker.prototype.rangeArgs = function() {
            var inputValue, range, startDate = isNullOrUndefined(this.startDate) ? null : this.globalize.formatDate(this.startDate, {
                format: this.format,
                type: "date",
                skeleton: "yMd"
            }), endDate = isNullOrUndefined(this.endDate) ? null : this.globalize.formatDate(this.endDate, {
                format: this.format,
                type: "date",
                skeleton: "yMd"
            });
            isNullOrUndefined(this.endDate) || isNullOrUndefined(this.startDate) ? (inputValue = "", 
            range = 0) : (inputValue = startDate + " " + this.separator + " " + endDate, range = Math.round(Math.abs((this.startDate.getTime() - this.endDate.getTime()) / 864e5)) + 1);
            return {
                value: inputValue,
                startDate: this.startDate,
                endDate: this.endDate,
                daySpan: range
            };
        }, DateRangePicker.prototype.otherMonthSelect = function(ele, isStartDate, sameDate) {
            var value = +this.getIdValue(null, ele), dateIdString = '*[id^="/id"]:not(.e-other-month)'.replace("/id", "" + value), tdCell = this.popupObj.element.querySelector(dateIdString);
            isNullOrUndefined(tdCell) || (isStartDate ? (addClass([ tdCell ], [ STARTDATE, "e-selected" ]), 
            this.addSelectedAttributes(tdCell, this.startDate, !0)) : (addClass([ tdCell ], [ ENDDATE, "e-selected" ]), 
            this.addSelectedAttributes(tdCell, this.endDate, !0)), sameDate && this.addSelectedAttributes(ele, this.endDate, !1, !0));
        }, DateRangePicker.prototype.selectRange = function(event, element) {
            var date;
            date = event instanceof MouseEvent ? this.getIdValue(event, null) : this.getIdValue(null, element), 
            isNullOrUndefined(this.endDate) || isNullOrUndefined(this.startDate) ? this.isMobile && this.startButton.element.classList.contains(ACTIVE$1) && this.removeSelection() : (!this.isMobile || this.isMobile && !this.endButton.element.classList.contains(ACTIVE$1)) && this.removeSelection();
            var ele = element || event.currentTarget;
            if (isNullOrUndefined(this.startDate)) isNullOrUndefined(this.previousStartValue) || (date.setHours(this.previousStartValue.getHours()), 
            date.setMinutes(this.previousStartValue.getMinutes()), date.setSeconds(this.previousStartValue.getSeconds())), 
            this.setProperties({
                startDate: new Date("" + date)
            }, !0), this.setProperties({
                endDate: null
            }, !0), addClass([ ele ], STARTDATE), this.addSelectedAttributes(ele, this.startDate, !0), 
            ele.classList.contains("e-other-month") && this.otherMonthSelect(ele, !0), this.checkMinMaxDays(), 
            this.applyButton.disabled = !0, this.applyButton.element.disabled = !0, this.isMobile && (this.endButton.element.classList.add(ACTIVE$1), 
            this.startButton.element.classList.remove(ACTIVE$1), this.endButton.element.removeAttribute("disabled"), 
            this.selectableDates()), this.trigger("select", this.rangeArgs()); else if (+date == +this.startDate || +date > +this.startDate) {
                if (+date == +this.startDate && !isNullOrUndefined(this.minDays) && this.minDays > 1) return;
                this.setProperties({
                    endDate: null
                }, !0), (this.isMobile || element) && this.hoverSelection(event, element), isNullOrUndefined(this.previousEndValue) || (date.setHours(this.previousEndValue.getHours()), 
                date.setMinutes(this.previousEndValue.getMinutes()), date.setSeconds(this.previousEndValue.getSeconds())), 
                this.setProperties({
                    endDate: new Date("" + date)
                }, !0);
                var endEle = this.popupObj.element.querySelectorAll("." + ENDDATE);
                if (this.isMobile) {
                    this.startButton.element.classList.remove(ACTIVE$1), this.endButton.element.classList.add(ACTIVE$1);
                    for (var _i = 0, endEle_1 = endEle; _i < endEle_1.length; _i++) {
                        var ele_1 = endEle_1[_i];
                        ele_1.removeAttribute("aria-label"), ele_1.classList.contains(STARTDATE) ? (this.addSelectedAttributes(ele_1, this.startDate, !0), 
                        removeClass([ ele_1 ], [ ENDDATE ])) : (ele_1.setAttribute("aria-selected", "false"), 
                        removeClass([ ele_1 ], [ ENDDATE, "e-selected" ]));
                    }
                }
                addClass([ ele ], ENDDATE), +this.endDate == +this.startDate ? this.addSelectedAttributes(ele, this.endDate, !1, !0) : this.addSelectedAttributes(ele, this.endDate, !1), 
                ele.classList.contains("e-other-month") && (+this.endDate == +this.startDate ? this.otherMonthSelect(ele, !1, !0) : this.otherMonthSelect(ele, !1));
                for (var _a = 0, endEle_2 = endEle = this.popupObj.element.querySelectorAll("." + ENDDATE); _a < endEle_2.length; _a++) {
                    var ele_2 = endEle_2[_a];
                    ele_2.classList.contains(STARTDATE) && removeClass([ ele_2 ], [ RANGEHOVER ]);
                }
                this.applyButton.disabled = !1, this.applyButton.element.disabled = !1, this.isMobile || this.removeClassDisabled(), 
                this.disabledDateRender(), this.trigger("select", this.rangeArgs());
            } else +date < +this.startDate && (this.removeClassDisabled(), this.setProperties({
                startDate: new Date("" + date)
            }, !0), this.removeSelectedAttributes(), removeClass(this.popupObj.element.querySelectorAll("." + STARTDATE), [ STARTDATE, "e-selected" ]), 
            addClass([ ele ], STARTDATE), this.addSelectedAttributes(ele, this.startDate, !0), 
            ele.classList.contains("e-other-month") && this.otherMonthSelect(ele, !0), this.checkMinMaxDays());
            addClass([ ele ], "e-selected"), this.updateHeader(), this.removeFocusedDate();
        }, DateRangePicker.prototype.selectableDates = function() {
            if (!isNullOrUndefined(this.startDate)) {
                for (var isStartDate = !1, _i = 0, tdCells_4 = this.calendarElement.querySelectorAll(".e-calendar td"); _i < tdCells_4.length; _i++) {
                    var ele = tdCells_4[_i];
                    if (!ele.classList.contains(STARTDATE) && !ele.classList.contains("e-week-number") && !ele.classList.contains(DISABLED$5)) {
                        if (+this.getIdValue(null, ele) < +this.startDate) {
                            addClass([ ele ], [ DATEDISABLED, DISABLED$5, OVERLAY$1 ]), EventHandler.clearEvents(ele);
                            continue;
                        }
                        break;
                    }
                    if (ele.classList.contains(STARTDATE) && !ele.classList.contains("e-other-month")) {
                        isStartDate = !0;
                        break;
                    }
                }
                isStartDate && (this.previousIcon.classList.contains(DISABLED$5) || addClass([ this.previousIcon ], [ ICONDISABLED, DISABLED$5, OVERLAY$1 ]));
            }
        }, DateRangePicker.prototype.updateMinMaxDays = function(calendar) {
            if (isNullOrUndefined(this.startDate) || !isNullOrUndefined(this.endDate) && !this.isMobile) this.isMaxDaysClicked = !1; else if (!isNullOrUndefined(this.minDays) && this.minDays > 0 || !isNullOrUndefined(this.maxDays) && this.maxDays > 0) {
                var minDate = new Date(new Date(+this.startDate).setDate(this.startDate.getDate() + (this.minDays - 1))), maxDate = new Date(new Date(+this.startDate).setDate(this.startDate.getDate() + (this.maxDays - 1)));
                minDate = !isNullOrUndefined(this.minDays) && this.minDays > 0 ? minDate : null, 
                maxDate = !isNullOrUndefined(this.maxDays) && this.maxDays > 0 ? maxDate : null;
                for (var maxEle = void 0, _i = 0, tdCells_5 = calendar.querySelectorAll(".e-calendar td"); _i < tdCells_5.length; _i++) {
                    var ele = tdCells_5[_i];
                    if (!ele.classList.contains(STARTDATE) && !ele.classList.contains("e-week-number")) {
                        var eleDate = this.getIdValue(null, ele);
                        if (!isNullOrUndefined(minDate) && +eleDate == +minDate && ele.classList.contains(DISABLED$5) && minDate.setDate(minDate.getDate() + 1), 
                        !ele.classList.contains(DISABLED$5)) {
                            if (+eleDate <= +this.startDate) continue;
                            !isNullOrUndefined(minDate) && +eleDate < +minDate && (addClass([ ele ], [ DATEDISABLED, DISABLED$5, OVERLAY$1 ]), 
                            EventHandler.clearEvents(ele)), !isNullOrUndefined(maxDate) && +eleDate > +maxDate && (addClass([ ele ], [ DATEDISABLED, DISABLED$5, OVERLAY$1 ]), 
                            this.isMaxDaysClicked = !0, EventHandler.clearEvents(ele), isNullOrUndefined(maxEle) && !ele.classList.contains("e-other-month") && (maxEle = ele));
                        }
                    }
                }
                if (!isNullOrUndefined(maxEle)) if (this.isMobile) this.nextIcon.classList.contains(DISABLED$5) || addClass([ this.nextIcon ], [ ICONDISABLED, DISABLED$5, OVERLAY$1 ]); else {
                    var calendar_1 = closest(maxEle, "." + RIGHTCALENDER);
                    (calendar_1 = isNullOrUndefined(calendar_1) ? this.leftCalendar : calendar_1).classList.contains(LEFTCALENDER) ? (this.rightCalNextIcon.classList.contains(DISABLED$5) || addClass([ this.rightCalNextIcon ], [ ICONDISABLED, DISABLED$5, OVERLAY$1 ]), 
                    this.leftCalNextIcon.classList.contains(DISABLED$5) || addClass([ this.leftCalNextIcon ], [ ICONDISABLED, DISABLED$5, OVERLAY$1 ]), 
                    this.rightCalPrevIcon.classList.contains(DISABLED$5) || addClass([ this.rightCalPrevIcon ], [ ICONDISABLED, DISABLED$5, OVERLAY$1 ])) : this.rightCalNextIcon.classList.contains(DISABLED$5) || addClass([ this.rightCalNextIcon ], [ ICONDISABLED, DISABLED$5, OVERLAY$1 ]);
                }
            }
        }, DateRangePicker.prototype.removeClassDisabled = function() {
            for (var _i = 0, tdCells_6 = this.popupObj.element.querySelectorAll(".e-calendar td." + DATEDISABLED); _i < tdCells_6.length; _i++) {
                var ele = tdCells_6[_i];
                ele.classList.contains(DATEDISABLED) && (removeClass([ ele ], [ DATEDISABLED, DISABLED$5, OVERLAY$1 ]), 
                EventHandler.add(ele, "mousedown", this.selectRange, this), this.isMobile || EventHandler.add(ele, "mouseover", this.hoverSelection, this));
            }
            this.isMobile ? (this.nextIcon.classList.contains(ICONDISABLED) && removeClass([ this.nextIcon ], [ ICONDISABLED, DISABLED$5, OVERLAY$1 ]), 
            this.previousIcon.classList.contains(ICONDISABLED) && removeClass([ this.previousIcon ], [ ICONDISABLED, DISABLED$5, OVERLAY$1 ])) : (this.rightCalNextIcon.classList.contains(ICONDISABLED) && removeClass([ this.rightCalNextIcon ], [ ICONDISABLED, DISABLED$5, OVERLAY$1 ]), 
            this.rightCalPrevIcon.classList.contains(ICONDISABLED) && removeClass([ this.rightCalPrevIcon ], [ ICONDISABLED, DISABLED$5, OVERLAY$1 ]), 
            this.leftCalNextIcon.classList.contains(ICONDISABLED) && removeClass([ this.leftCalNextIcon ], [ ICONDISABLED, DISABLED$5, OVERLAY$1 ]));
        }, DateRangePicker.prototype.updateHeader = function() {
            var format = {
                type: "date",
                skeleton: "yMMMd"
            };
            if (isNullOrUndefined(this.endDate) || isNullOrUndefined(this.startDate)) this.popupObj.element.querySelector(".e-day-span").textContent = this.l10n.getConstant("selectedDays"); else {
                var range = Math.round(Math.abs((this.startDate.getTime() - this.endDate.getTime()) / 864e5)) + 1;
                isNullOrUndefined(this.disabledDayCnt) || (range -= this.disabledDayCnt, this.disabledDayCnt = null), 
                this.popupObj.element.querySelector(".e-day-span").textContent = range.toString() + " " + this.l10n.getConstant("days");
            }
            this.isMobile ? (isNullOrUndefined(this.startDate) ? this.startButton.element.textContent = this.l10n.getConstant("startLabel") : this.startButton.element.textContent = this.globalize.formatDate(this.startDate, format), 
            isNullOrUndefined(this.endDate) || isNullOrUndefined(this.startDate) ? this.endButton.element.textContent = this.l10n.getConstant("endLabel") : this.endButton.element.textContent = this.globalize.formatDate(this.endDate, format)) : (isNullOrUndefined(this.endDate) || isNullOrUndefined(this.startDate) ? this.popupObj.element.querySelector(".e-end-label").textContent = this.l10n.getConstant("endLabel") : this.popupObj.element.querySelector(".e-end-label").textContent = this.globalize.formatDate(this.endDate, format), 
            isNullOrUndefined(this.startDate) ? this.popupObj.element.querySelector(".e-start-label").textContent = this.l10n.getConstant("startLabel") : this.popupObj.element.querySelector(".e-start-label").textContent = this.globalize.formatDate(this.startDate, format));
        }, DateRangePicker.prototype.removeSelection = function() {
            this.setProperties({
                startDate: null
            }, !0), this.setProperties({
                endDate: null
            }, !0), this.removeSelectedAttributes(), this.popupObj.element.querySelectorAll(".e-selected").length > 0 && removeClass(this.popupObj.element.querySelectorAll(".e-selected"), [ STARTDATE, ENDDATE, "e-selected" ]), 
            this.popupObj.element.querySelectorAll("." + FOCUSDATE).length > 0 && removeClass(this.popupObj.element.querySelectorAll("." + FOCUSDATE), FOCUSDATE), 
            this.popupObj.element.querySelectorAll("." + RANGEHOVER).length > 0 && removeClass(this.popupObj.element.querySelectorAll("." + RANGEHOVER), [ RANGEHOVER ]);
        }, DateRangePicker.prototype.addSelectedAttributes = function(ele, date, isStartDate, sameDate) {
            if (ele) {
                var title = this.globalize.formatDate(date, {
                    type: "date",
                    skeleton: "full"
                });
                !isNullOrUndefined(sameDate) && sameDate ? ele.setAttribute("aria-label", "The current start and end date is " + title) : ele.setAttribute("aria-label", "The current " + (isStartDate ? "start" : "end") + " date is " + title), 
                ele.setAttribute("aria-selected", "true");
            }
        }, DateRangePicker.prototype.removeSelectedAttributes = function() {
            for (var _i = 0, start_1 = this.popupObj.element.querySelectorAll("." + STARTDATE); _i < start_1.length; _i++) {
                (ele = start_1[_i]).setAttribute("aria-selected", "false"), ele.removeAttribute("aria-label");
            }
            for (var _a = 0, end_1 = this.popupObj.element.querySelectorAll("." + ENDDATE); _a < end_1.length; _a++) {
                var ele;
                (ele = end_1[_a]).setAttribute("aria-selected", "false"), ele.removeAttribute("aria-label");
            }
        }, DateRangePicker.prototype.updateCalendarElement = function(calendar) {
            calendar.classList.contains(LEFTCALENDER) ? (this.calendarElement = this.leftCalendar, 
            this.currentDate = this.leftCalCurrentDate, this.previousIcon = this.leftCalPrevIcon, 
            this.nextIcon = this.leftCalNextIcon) : (this.calendarElement = this.rightCalendar, 
            this.currentDate = this.rightCalCurrentDate, this.previousIcon = this.rightCalPrevIcon, 
            this.nextIcon = this.rightCalNextIcon), this.contentElement = calendar.querySelector(".e-content"), 
            this.tableBodyElement = select(".e-content tbody", calendar), this.table = calendar.querySelector(".e-content").getElementsByTagName("table")[0], 
            this.headerTitleElement = calendar.querySelector(".e-header .e-title"), this.headerElement = calendar.querySelector(".e-header");
        }, DateRangePicker.prototype.navPreviousMonth = function(event) {
            var ele = closest(event.target, "." + LEFTCALENDER);
            ele = isNullOrUndefined(ele) ? closest(event.target, "." + RIGHTCALENDER) : ele, 
            this.updateCalendarElement(ele), this.navigatePrevious(event), !isNullOrUndefined(this.startDate) && isNullOrUndefined(this.endDate) && this.updateMinMaxDays(ele), 
            this.updateControl(ele);
        }, DateRangePicker.prototype.deviceNavigation = function(ele) {
            this.deviceCalendarEvent(), this.updateRange([ this.popupObj.element.querySelector("." + CALENDAR) ]), 
            !isNullOrUndefined(this.endDate) && this.endButton.element.classList.contains(ACTIVE$1) && this.updateMinMaxDays(this.popupObj.element.querySelector("." + CALENDAR)), 
            this.endButton.element.classList.contains(ACTIVE$1) && this.selectableDates(), this.bindCalendarCellEvents(), 
            this.removeFocusedDate(), this.popupObj.refreshPosition(this.inputElement), this.popupObj.show();
        }, DateRangePicker.prototype.updateControl = function(calendar) {
            calendar.classList.contains(RIGHTCALENDER) ? this.rightCalCurrentDate = new Date(+this.currentDate) : this.leftCalCurrentDate = new Date(+this.currentDate), 
            this.updateNavIcons(), this.calendarIconEvent(), this.bindCalendarCellEvents(), 
            this.removeFocusedDate(), this.updateRange([ calendar ]), this.presetHeight(), this.isMobile || this.enableRtl || (this.popupObj.offsetX = -this.popupWrapper.getBoundingClientRect().width, 
            this.popupObj.show());
        }, DateRangePicker.prototype.navNextMonth = function(event) {
            var ele = closest(event.target, "." + LEFTCALENDER);
            ele = isNullOrUndefined(ele) ? closest(event.target, "." + RIGHTCALENDER) : ele, 
            this.updateCalendarElement(ele), this.navigateNext(event), !isNullOrUndefined(this.startDate) && isNullOrUndefined(this.endDate) && this.updateMinMaxDays(ele), 
            this.updateControl(ele);
        }, DateRangePicker.prototype.compareMonths = function(start, end) {
            return start.getFullYear() > end.getFullYear() ? -1 : start.getFullYear() < end.getFullYear() ? start.getFullYear() + 1 === end.getFullYear() && 11 === start.getMonth() && 0 === end.getMonth() ? -1 : 1 : start.getMonth() === end.getMonth() ? 0 : start.getMonth() + 1 === end.getMonth() ? -1 : 1;
        }, DateRangePicker.prototype.isPopupOpen = function() {
            return !(isNullOrUndefined(this.popupObj) || !this.popupObj.element.classList.contains("e-popup"));
        }, DateRangePicker.prototype.createHeader = function() {
            var labelContainer = createElement("div", {
                className: "e-start-end"
            });
            if (this.isMobile) {
                var endBtn = createElement("button", {
                    className: "e-end-btn"
                }), startBtn = createElement("button", {
                    className: "e-start-btn"
                });
                this.startButton = new Button({
                    content: this.l10n.getConstant("startLabel")
                }, startBtn), this.endButton = new Button({
                    content: this.l10n.getConstant("endLabel")
                }, endBtn), labelContainer.appendChild(startBtn), labelContainer.appendChild(endBtn);
            } else {
                var startLabel = createElement("a", {
                    className: "e-start-label"
                }), endLabel = createElement("a", {
                    className: "e-end-label"
                }), changeIcon = createElement("span", {
                    className: "e-change-icon e-icons"
                });
                attributes(startLabel, {
                    "aria-atomic": "true",
                    "aria-live": "assertive",
                    "aria-label": "Start Date",
                    role: "button"
                }), attributes(endLabel, {
                    "aria-atomic": "true",
                    "aria-live": "assertive",
                    "aria-label": "End Date",
                    role: "button"
                }), labelContainer.appendChild(startLabel), labelContainer.appendChild(changeIcon), 
                labelContainer.appendChild(endLabel), startLabel.textContent = this.l10n.getConstant("startLabel"), 
                endLabel.textContent = this.l10n.getConstant("endLabel");
            }
            return labelContainer;
        }, DateRangePicker.prototype.disableInput = function() {
            this.strictMode ? isNullOrUndefined(this.previousStartValue) || isNullOrUndefined(this.previousEndValue) || (this.setProperties({
                startDate: this.previousStartValue
            }, !0), this.setProperties({
                endDate: this.previousEndValue
            }, !0), this.updateInput()) : (this.updateInput(), this.clearRange(), this.errorClass()), 
            this.setProperties({
                enabled: !1
            }, !0), Input.setEnabled(this.enabled, this.inputElement), this.bindEvents();
        }, DateRangePicker.prototype.validateMinMax = function() {
            this.min = isNullOrUndefined(this.min) || !+this.min ? this.min = new Date(1900, 0, 1) : this.min, 
            this.max = isNullOrUndefined(this.max) || !+this.max ? this.max = new Date(2099, 11, 31) : this.max, 
            this.min <= this.max ? (isNullOrUndefined(this.minDays) || isNullOrUndefined(this.maxDays) || this.maxDays > 0 && this.minDays > 0 && this.minDays > this.maxDays && (this.maxDays = null), 
            !isNullOrUndefined(this.minDays) && this.minDays < 0 && (this.minDays = null), !isNullOrUndefined(this.maxDays) && this.maxDays < 0 && (this.maxDays = null)) : this.disableInput();
        }, DateRangePicker.prototype.validateDates = function() {
            this.setProperties({
                value: null
            }, !0), this.startDate = isNullOrUndefined(this.startDate) || isNaN(+this.startDate) ? null : this.startDate, 
            this.endDate = isNullOrUndefined(this.endDate) || isNaN(+this.endDate) ? null : this.endDate;
        }, DateRangePicker.prototype.validateRangeStrict = function() {
            isNullOrUndefined(this.startDate) || (+this.startDate < +this.min ? this.setProperties({
                startDate: this.min
            }, !0) : +this.startDate > +this.max && this.setProperties({
                startDate: this.max
            }, !0)), isNullOrUndefined(this.endDate) || (+this.endDate > +this.max ? this.setProperties({
                endDate: this.max
            }, !0) : +this.endDate < +this.min && this.setProperties({
                endDate: this.min
            }, !0)), !isNullOrUndefined(this.startDate) && !isNullOrUndefined(this.endDate) && +this.startDate > +this.endDate && this.setProperties({
                endDate: this.max
            }, !0), this.validateMinMaxDays();
        }, DateRangePicker.prototype.validateRange = function() {
            !isNullOrUndefined(this.startDate) && +this.startDate < +this.min && (this.setProperties({
                endDate: null
            }, !0), this.setProperties({
                startDate: null
            }, !0)), !isNullOrUndefined(this.endDate) && +this.endDate > +this.max && (this.setProperties({
                startDate: null
            }, !0), this.setProperties({
                endDate: null
            }, !0)), !isNullOrUndefined(this.startDate) && !isNullOrUndefined(this.endDate) && +this.startDate > +this.endDate && (this.setProperties({
                startDate: null
            }, !0), this.setProperties({
                endDate: null
            }, !0)), this.validateMinMaxDays();
        }, DateRangePicker.prototype.validateMinMaxDays = function() {
            if (!isNullOrUndefined(this.startDate) && !isNullOrUndefined(this.endDate)) {
                var range = Math.round(Math.abs((this.startDate.getTime() - this.endDate.getTime()) / 864e5)) + 1;
                if (!isNullOrUndefined(this.minDays) && this.minDays > 0 && !(range >= this.minDays)) if (this.strictMode) {
                    var date = new Date(+this.startDate);
                    date.setDate(date.getDate() + (this.minDays - 1)), +date > +this.max ? this.setProperties({
                        endDate: this.max
                    }, !0) : this.setProperties({
                        endDate: date
                    }, !0);
                } else this.setProperties({
                    startDate: null
                }, !0), this.setProperties({
                    endDate: null
                }, !0);
                isNullOrUndefined(this.maxDays) || !(this.maxDays > 0) || range <= this.maxDays || (this.strictMode ? (this.endDate = new Date(+this.startDate), 
                this.endDate.setDate(this.endDate.getDate() + (this.maxDays - 1)), this.setProperties({
                    endDate: this.endDate
                }, !0)) : (this.setProperties({
                    startDate: null
                }, !0), this.setProperties({
                    endDate: null
                }, !0)));
            }
        }, DateRangePicker.prototype.renderCalendar = function() {
            this.calendarElement = createElement("div"), this.calendarElement.classList.add(CALENDAR), 
            this.enableRtl && this.calendarElement.classList.add("e-rtl"), attributes(this.calendarElement, {
                role: "calendar"
            }), _super.prototype.header.call(this), _super.prototype.content.call(this);
        }, DateRangePicker.prototype.isSameMonth = function(start, end) {
            return start.getMonth() === end.getMonth() && start.getFullYear() === end.getFullYear();
        }, DateRangePicker.prototype.selectNextMonth = function() {
            isNullOrUndefined(this.endDate) || isNullOrUndefined(this.startDate) || this.isSameMonth(this.endDate, this.currentDate) ? (this.currentDate.setDate(1), 
            this.currentDate.setMonth(this.currentDate.getMonth() + 1)) : this.currentDate = new Date(+this.endDate);
        }, DateRangePicker.prototype.selectStartMonth = function() {
            isNullOrUndefined(this.startDate) ? (this.currentDate = new Date(), this.currentDate > this.max || this.isSameMonth(this.min, this.max) || this.isSameMonth(this.currentDate, this.max) ? (this.currentDate = new Date(+this.max), 
            this.currentDate.setDate(1), this.currentDate.setMonth(this.currentDate.getMonth() - 1)) : this.currentDate < this.min && (this.currentDate = new Date("" + this.min))) : !isNullOrUndefined(this.max) && this.isSameMonth(this.startDate, this.max) ? (this.currentDate = new Date(+this.max), 
            this.currentDate.setDate(1), this.currentDate.setMonth(this.currentDate.getMonth() - 1)) : this.currentDate = new Date(+this.startDate);
        }, DateRangePicker.prototype.createCalendar = function() {
            var calendarContainer = createElement("div", {
                className: "e-calendar-container"
            });
            if (this.isMobile) {
                isNullOrUndefined(this.startDate) || (this.currentDate = new Date(+this.startDate)), 
                _super.prototype.render.call(this);
                var prevIcon = this.calendarElement.querySelector(".e-calendar .e-prev"), nextIcon = this.calendarElement.querySelector(".e-calendar .e-next");
                remove(this.calendarElement.querySelector(".e-calendar .e-icon-container")), this.calendarElement.querySelector(".e-calendar .e-header").appendChild(nextIcon), 
                this.calendarElement.querySelector(".e-calendar .e-header").appendChild(prevIcon), 
                prepend([ prevIcon ], this.calendarElement.querySelector(".e-calendar .e-header")), 
                this.deviceCalendar = this.calendarElement, calendarContainer.appendChild(this.calendarElement), 
                this.headerTitleElement = this.calendarElement.querySelector(".e-calendar .e-header .e-title");
            } else {
                this.selectStartMonth(), this.renderCalendar(), this.leftCalCurrentDate = new Date(+this.currentDate), 
                this.calendarElement.classList.add(LEFTCALENDER), this.leftCalPrevIcon = this.calendarElement.querySelector(".e-left-calendar .e-prev"), 
                this.leftCalNextIcon = this.calendarElement.querySelector(".e-left-calendar .e-next"), 
                remove(this.calendarElement.querySelector(".e-left-calendar .e-icon-container")), 
                this.calendarElement.querySelector(".e-left-calendar .e-header").appendChild(this.leftCalNextIcon), 
                this.calendarElement.querySelector(".e-left-calendar .e-header").appendChild(this.leftCalPrevIcon), 
                prepend([ this.leftCalPrevIcon ], this.calendarElement.querySelector(".e-left-calendar .e-header")), 
                this.leftCalendar = this.calendarElement;
                var leftContainer = createElement("div", {
                    className: "e-left-container"
                }), rightContainer = createElement("div", {
                    className: "e-right-container"
                });
                leftContainer.appendChild(this.leftCalendar), calendarContainer.appendChild(leftContainer), 
                this.selectNextMonth(), this.renderCalendar(), this.rightCalCurrentDate = new Date(+this.currentDate), 
                addClass([ this.calendarElement ], RIGHTCALENDER), this.rightCalendar = this.calendarElement, 
                this.rightCalPrevIcon = this.calendarElement.querySelector(".e-right-calendar .e-prev"), 
                this.rightCalNextIcon = this.calendarElement.querySelector(".e-right-calendar .e-next"), 
                remove(this.calendarElement.querySelector(".e-right-calendar .e-icon-container")), 
                this.calendarElement.querySelector("table").setAttribute("tabindex", "-1"), this.calendarElement.querySelector(".e-right-calendar .e-header").appendChild(this.rightCalNextIcon), 
                this.calendarElement.querySelector(".e-right-calendar .e-header").appendChild(this.rightCalPrevIcon), 
                prepend([ this.rightCalPrevIcon ], this.calendarElement.querySelector(".e-right-calendar .e-header")), 
                rightContainer.appendChild(this.rightCalendar), calendarContainer.appendChild(rightContainer);
            }
            return calendarContainer;
        }, DateRangePicker.prototype.createControl = function() {
            var controlContainer = createElement("div", {
                className: "e-date-range-container"
            }), headerContainer = createElement("div", {
                className: "e-range-header"
            }), labelContainer = this.createHeader();
            headerContainer.appendChild(labelContainer);
            var daySpan = createElement("div", {
                className: "e-day-span"
            });
            attributes(daySpan, {
                "aria-label": "Selected Days"
            }), daySpan.textContent = this.l10n.getConstant("selectedDays"), headerContainer.appendChild(daySpan);
            var separator = createElement("div", {
                className: "e-separator"
            }), calendarContainer = this.createCalendar();
            controlContainer.appendChild(headerContainer), controlContainer.appendChild(separator), 
            controlContainer.appendChild(calendarContainer);
            var footerSection = createElement("div", {
                className: "e-footer"
            }), cancelBtn = createElement("button", {
                className: "e-cancel e-flat"
            }), applyBtn = createElement("button", {
                className: "e-apply e-flat e-primary"
            });
            footerSection.appendChild(applyBtn), footerSection.appendChild(cancelBtn);
            var enable = !isNullOrUndefined(this.startDate) && !isNullOrUndefined(this.endDate);
            if (this.cancelButton = new Button({
                content: this.l10n.getConstant("cancelText")
            }, cancelBtn), this.applyButton = new Button({
                content: this.l10n.getConstant("applyText"),
                disabled: !enable
            }, applyBtn), EventHandler.add(applyBtn, "click", this.applyFunction, this), EventHandler.add(cancelBtn, "click", this.cancelFunction, this), 
            this.popupWrapper.appendChild(controlContainer), document.body.appendChild(this.popupWrapper), 
            !this.isMobile && !isUndefined(this.presets[0].start && this.presets[0].end && this.presets[0].label)) {
                this.createPresets(), this.listRippleEffect(), addClass([ controlContainer ], "e-range-border"), 
                addClass([ this.popupWrapper ], "e-preset-wrapper");
                this.popupWrapper.querySelector(".e-presets").style.height = this.popupWrapper.querySelector(".e-date-range-container").getBoundingClientRect().height + "px";
            }
            this.popupWrapper.appendChild(footerSection), this.isMobile && this.deviceHeaderUpdate(), 
            this.renderPopup();
        }, DateRangePicker.prototype.cancelFunction = function(eve) {
            !this.isMobile && this.isKeyPopup && (this.inputElement.focus(), this.isKeyPopup = !1), 
            this.hide();
        }, DateRangePicker.prototype.deviceHeaderUpdate = function() {
            isNullOrUndefined(this.startDate) && isNullOrUndefined(this.endDate) ? (this.endButton.element.setAttribute("disabled", ""), 
            this.startButton.element.classList.add(ACTIVE$1)) : isNullOrUndefined(this.startDate) || this.startButton.element.classList.add(ACTIVE$1);
        }, DateRangePicker.prototype.applyFunction = function(eve) {
            isNullOrUndefined(this.startDate) || isNullOrUndefined(this.endDate) ? this.hide() : (this.previousStartValue = new Date(+this.startDate), 
            this.previousEndValue = new Date(+this.endDate), this.previousEleValue = this.inputElement.value, 
            this.inputElement.value = this.rangeArgs().value, this.changeTrigger(), this.hide(), 
            this.errorClass()), this.isMobile || (this.inputElement.focus(), this.isKeyPopup = !1, 
            this.isRangeIconClicked && (this.addIconTabindex(), this.inputWrapper.container.children[1].focus(), 
            this.popupKeyboardModule = new KeyboardEvents(this.inputWrapper.container.children[1], {
                eventName: "keydown",
                keyAction: this.popupKeyActionHandle.bind(this),
                keyConfigs: this.keyInputConfigs
            })));
        }, DateRangePicker.prototype.onMouseClick = function(event, item) {
            var li = closest(item || event.target, "." + LISTCLASS);
            li && li.classList.contains(LISTCLASS) && this.setListSelection(li, event);
        }, DateRangePicker.prototype.onMouseOver = function(event) {
            var li = closest(event.target, "." + LISTCLASS);
            li && li.classList.contains(LISTCLASS) && !li.classList.contains(HOVER) && addClass([ li ], HOVER);
        }, DateRangePicker.prototype.onMouseLeave = function(event) {
            var item = closest(event.target, "." + HOVER);
            isNullOrUndefined(item) || removeClass([ item ], HOVER);
        }, DateRangePicker.prototype.setListSelection = function(li, event) {
            if (li && (!li.classList.contains(ACTIVE$1) || this.isMobile && li.classList.contains(ACTIVE$1))) {
                if (this.isMobile && li.classList.contains(ACTIVE$1)) {
                    this.activeIndex = Array.prototype.slice.call(this.liCollections).indexOf(li);
                    if ("custom_range" === this.presetsItem[this.activeIndex].id) return void this.renderCustomPopup();
                    return;
                }
                this.removeListSelection(), this.activeIndex = Array.prototype.slice.call(this.liCollections).indexOf(li), 
                addClass([ li ], ACTIVE$1), li.setAttribute("aria-selected", "true");
                var values = this.presetsItem[this.activeIndex];
                "custom_range" === values.id ? this.renderCustomPopup() : this.applyPresetRange(values);
            }
        }, DateRangePicker.prototype.removeListSelection = function() {
            var item = this.presetElement.querySelector(".e-active");
            isNullOrUndefined(item) || (removeClass([ item ], ACTIVE$1), item.removeAttribute("aria-selected"));
        }, DateRangePicker.prototype.applyPresetRange = function(values) {
            this.hide(), this.presetsItem[this.presetsItem.length - 1].start = null, this.presetsItem[this.presetsItem.length - 1].end = null, 
            this.setProperties({
                startDate: values.start
            }, !0), this.setProperties({
                endDate: values.end
            }, !0), this.refreshControl(), this.trigger("select", this.rangeArgs()), this.changeTrigger(), 
            this.previousEleValue = this.inputElement.value, this.isCustomRange = !1, this.leftCalendar = this.rightCalendar = null, 
            this.isKeyPopup && (this.isRangeIconClicked = !1, this.inputElement.focus());
        }, DateRangePicker.prototype.renderCustomPopup = function() {
            this.isCustomWindow = !0, this.popupObj.hide(), this.popupWrapper = createElement("div", {
                id: this.element.id + "_popup",
                className: ROOT$4 + " e-popup"
            }), this.renderControl(), this.isCustomRange = !0, this.isMobile || this.calendarFocus();
        }, DateRangePicker.prototype.listRippleEffect = function() {
            for (var _i = 0, _a = this.liCollections; _i < _a.length; _i++) {
                rippleEffect(_a[_i]);
            }
        }, DateRangePicker.prototype.createPresets = function() {
            if (!isUndefined(this.presets[0].start && this.presets[0].end && this.presets[0].label)) {
                this.presetElement = createElement("div", {
                    className: "e-presets",
                    attrs: {
                        tabindex: "0"
                    }
                });
                var listTag = ListBase.createList(this.presetsItem, null, !0);
                if (attributes(listTag, {
                    role: "listbox",
                    "aria-hidden": "false",
                    id: this.inputElement.id + "_options"
                }), this.presetElement.appendChild(listTag), this.popupWrapper.appendChild(this.presetElement), 
                this.liCollections = this.presetElement.querySelectorAll("." + LISTCLASS), this.wireListEvents(), 
                this.isMobile && (this.presetElement.style.width = this.inputWrapper.container.getBoundingClientRect().width + "px"), 
                isNullOrUndefined(this.activeIndex) && this.startDate && this.endDate) {
                    this.activeIndex = this.presetsItem.length - 1;
                    if ("custom_range" === this.presetsItem[this.activeIndex].id) return void this.renderCustomPopup();
                }
                !isNullOrUndefined(this.activeIndex) && this.activeIndex > -1 && addClass([ this.liCollections[this.activeIndex] ], ACTIVE$1);
            }
        }, DateRangePicker.prototype.wireListEvents = function() {
            EventHandler.add(this.presetElement, "click", this.onMouseClick, this), this.isMobile || (EventHandler.add(this.presetElement, "mouseover", this.onMouseOver, this), 
            EventHandler.add(this.presetElement, "mouseout", this.onMouseLeave, this));
        }, DateRangePicker.prototype.unWireListEvents = function() {
            isNullOrUndefined(this.presetElement) || (EventHandler.remove(this.presetElement, "click", this.onMouseClick), 
            this.isMobile || (EventHandler.remove(this.presetElement, "mouseover", this.onMouseOver), 
            EventHandler.remove(this.presetElement, "mouseout", this.onMouseLeave)));
        }, DateRangePicker.prototype.renderPopup = function() {
            var _this = this;
            this.popupWrapper.classList.add("e-control");
            var popupWidth = this.popupWrapper.getBoundingClientRect().width;
            isNullOrUndefined(this.cssClass) || "" === this.cssClass.trim() || this.popupWrapper.classList.add(this.cssClass), 
            this.isMobile && this.isCustomWindow && (this.modal = createElement("div"), document.body.appendChild(this.modal)), 
            this.popupObj = new Popup(this.popupWrapper, {
                relateTo: this.isMobile && this.isCustomWindow ? document.body : isNullOrUndefined(this.targetElement) ? this.inputWrapper.container : this.targetElement,
                position: this.isMobile ? isUndefined(this.presets[0].start && this.presets[0].end && this.presets[0].label) || this.isCustomWindow ? {
                    X: "center",
                    Y: "center"
                } : {
                    X: "left",
                    Y: "bottom"
                } : this.enableRtl ? {
                    X: "left",
                    Y: "bottom"
                } : {
                    X: "right",
                    Y: "bottom"
                },
                offsetX: this.isMobile || this.enableRtl ? 0 : -popupWidth,
                offsetY: 4,
                collision: this.isMobile && (isUndefined(this.presets[0].start && this.presets[0].end && this.presets[0].label) || this.isCustomWindow) ? {
                    X: "fit",
                    Y: "fit"
                } : {
                    X: "fit"
                },
                targetType: this.isMobile && this.isCustomWindow ? "container" : "relative",
                enableRtl: this.enableRtl,
                zIndex: this.zIndex,
                open: function() {
                    attributes(_this.inputElement, {
                        "aria-expanded": "true"
                    }), addClass([ _this.inputWrapper.buttons[0] ], ACTIVE$1), _this.isMobile || (_this.cancelButton && (_this.btnKeyboardModule = new KeyboardEvents(_this.cancelButton.element, {
                        eventName: "keydown",
                        keyAction: _this.hide.bind(_this),
                        keyConfigs: {
                            tab: "tab"
                        }
                    })), isNullOrUndefined(_this.leftCalendar) || _this.calendarFocus(), isNullOrUndefined(_this.presetElement) || (_this.presetKeyboardModule = new KeyboardEvents(_this.presetElement, {
                        eventName: "keydown",
                        keyAction: _this.presetKeyActionHandler.bind(_this),
                        keyConfigs: _this.presetKeyConfig
                    }), isNullOrUndefined(_this.leftCalendar) ? _this.presetElement.focus() : _this.presetElement.setAttribute("tabindex", "-1")), 
                    _this.popupKeyBoardHandler());
                },
                close: function() {
                    attributes(_this.inputElement, {
                        "aria-expanded": "false"
                    }), removeClass([ _this.inputWrapper.buttons[0] ], ACTIVE$1), _this.isMobile || (_this.isRangeIconClicked ? (_this.addIconTabindex(), 
                    _this.inputWrapper.container.children[1].focus()) : _this.iconBlurHandler()), isUndefined(_this.presets[0].start && _this.presets[0].end && _this.presets[0].label) || _this.unWireListEvents(), 
                    isNullOrUndefined(_this.popupObj) || (remove(_this.popupObj.element), _this.popupObj.destroy(), 
                    _this.popupObj = null);
                }
            }), document.body.appendChild(this.popupObj.element), this.isMobile && (this.popupObj.element.classList.add("e-device"), 
            Browser.isDevice || this.popupObj.element.classList.add("e-bigger")), this.isMobile && this.isCustomWindow && (addClass([ this.modal ], [ "e-device", ROOT$4, "e-range-modal" ]), 
            document.body.className += " e-range-overflow", this.modal.style.display = "block"), 
            this.presetHeight(), this.isMobile || this.enableRtl || (this.popupObj.offsetX = -this.popupWrapper.getBoundingClientRect().width), 
            this.popupObj.refreshPosition(this.inputElement), this.popupObj.show(), EventHandler.add(document, "click touchstart", this.documentHandler, this);
        }, DateRangePicker.prototype.calendarFocus = function() {
            var startDate = this.popupObj.element.querySelector("." + STARTDATE);
            if (startDate) {
                var ele = closest(startDate, "." + RIGHTCALENDER);
                (ele = isNullOrUndefined(ele) ? this.leftCalendar : ele).children[1].firstElementChild.focus(), 
                addClass([ startDate ], FOCUSDATE);
            } else this.leftCalendar.children[1].firstElementChild.focus();
        }, DateRangePicker.prototype.presetHeight = function() {
            var presets = this.popupObj.element.querySelector(".e-presets"), rangeContainer = this.popupObj.element.querySelector(".e-date-range-container");
            isNullOrUndefined(presets) || isNullOrUndefined(rangeContainer) || (presets.style.height = rangeContainer.getBoundingClientRect().height + "px");
        }, DateRangePicker.prototype.presetKeyActionHandler = function(e) {
            switch (e.action) {
              case "moveDown":
                this.listMoveDown(e), this.setScrollPosition(), e.preventDefault();
                break;

              case "moveUp":
                this.listMoveUp(e), this.setScrollPosition(), e.preventDefault();
                break;

              case "enter":
                var hvrItem = this.getHoverLI(), actItem = this.getActiveLI();
                if (!isNullOrUndefined(this.leftCalendar) && !isNullOrUndefined(actItem) && (isNullOrUndefined(hvrItem) || !isNullOrUndefined(actItem) && actItem === hvrItem)) {
                    this.activeIndex = Array.prototype.slice.call(this.liCollections).indexOf(actItem);
                    if ("custom_range" === this.presetsItem[this.activeIndex].id) return this.calendarFocus(), 
                    actItem.classList.remove(HOVER), void e.preventDefault();
                }
                isNullOrUndefined(hvrItem) && isNullOrUndefined(actItem) || this.onMouseClick(e, hvrItem || actItem), 
                e.preventDefault();
                break;

              case "tab":
                if (this.leftCalendar) {
                    var item = this.getHoverLI();
                    isNullOrUndefined(item) || item.classList.remove(HOVER);
                } else this.hide(), e.preventDefault();
            }
        }, DateRangePicker.prototype.listMoveDown = function(e) {
            var hvrItem = this.getHoverLI(), actItem = this.getActiveLI();
            if (isNullOrUndefined(hvrItem)) if (isNullOrUndefined(actItem)) addClass([ this.liCollections[0] ], HOVER); else {
                !isNullOrUndefined(li = actItem.nextElementSibling) && li.classList.contains(LISTCLASS) && addClass([ li ], HOVER);
            } else {
                var li;
                !isNullOrUndefined(li = hvrItem.nextElementSibling) && li.classList.contains(LISTCLASS) && (removeClass([ hvrItem ], HOVER), 
                addClass([ li ], HOVER));
            }
        }, DateRangePicker.prototype.listMoveUp = function(e) {
            var hvrItem = this.getHoverLI(), actItem = this.getActiveLI();
            if (isNullOrUndefined(hvrItem)) {
                if (!isNullOrUndefined(actItem)) {
                    !isNullOrUndefined(li = actItem.previousElementSibling) && li.classList.contains(LISTCLASS) && addClass([ li ], HOVER);
                }
            } else {
                var li;
                !isNullOrUndefined(li = hvrItem.previousElementSibling) && li.classList.contains(LISTCLASS) && (removeClass([ hvrItem ], HOVER), 
                addClass([ li ], HOVER));
            }
        }, DateRangePicker.prototype.getHoverLI = function() {
            return this.presetElement.querySelector("." + HOVER);
        }, DateRangePicker.prototype.getActiveLI = function() {
            return this.presetElement.querySelector(".e-active");
        }, DateRangePicker.prototype.popupKeyBoardHandler = function() {
            this.popupKeyboardModule = new KeyboardEvents(this.popupWrapper, {
                eventName: "keydown",
                keyAction: this.popupKeyActionHandle.bind(this),
                keyConfigs: {
                    escape: "escape"
                }
            }), this.popupKeyboardModule = new KeyboardEvents(this.inputWrapper.container.children[1], {
                eventName: "keydown",
                keyAction: this.popupKeyActionHandle.bind(this),
                keyConfigs: this.keyInputConfigs
            });
        }, DateRangePicker.prototype.setScrollPosition = function() {
            var listHeight = this.presetElement.getBoundingClientRect().height, hover = this.presetElement.querySelector("." + HOVER), active = this.presetElement.querySelector(".e-active"), element = isNullOrUndefined(hover) ? active : hover;
            if (!isNullOrUndefined(element)) {
                var nextEle = element.nextElementSibling, height = nextEle ? nextEle.offsetTop : element.offsetTop, liHeight = element.getBoundingClientRect().height;
                height + element.offsetTop > listHeight ? this.presetElement.scrollTop = nextEle ? height - (listHeight / 2 + liHeight / 2) : height : this.presetElement.scrollTop = 0;
            }
        }, DateRangePicker.prototype.popupKeyActionHandle = function(e) {
            switch (e.action) {
              case "escape":
                this.isPopupOpen() ? (this.isKeyPopup && (this.inputElement.focus(), this.isKeyPopup = !1), 
                this.hide()) : (this.inputWrapper.container.children[1].blur(), this.iconBlurHandler());
                break;

              case "enter":
                this.isPopupOpen() ? (this.addIconTabindex(), this.inputWrapper.container.children[1].focus()) : this.show();
                break;

              case "tab":
                this.hide();
            }
        }, DateRangePicker.prototype.iconBlurHandler = function() {
            isNullOrUndefined(this.inputWrapper.container.children[1]) || this.removeIconTabindex(), 
            isNullOrUndefined(this.popupKeyboardModule) || this.popupKeyboardModule.destroy();
        }, DateRangePicker.prototype.removeIconTabindex = function() {
            this.inputWrapper.container.children[1].removeAttribute("tabindex");
        }, DateRangePicker.prototype.addIconTabindex = function() {
            attributes(this.inputWrapper.container.children[1], {
                tabindex: "0"
            });
        }, DateRangePicker.prototype.documentHandler = function(e) {
            if (!isNullOrUndefined(this.popupObj)) {
                var target = e.target;
                closest(target, "#" + this.popupObj.element.id) || closest(target, ".e-input-group") === this.inputWrapper.container || !isNullOrUndefined(this.targetElement) && (isNullOrUndefined(this.targetElement) || target === this.targetElement) || this.isPopupOpen() && (this.isMobile || (this.isRangeIconClicked = !1), 
                this.applyFunction());
            }
        }, DateRangePicker.prototype.createInput = function() {
            this.inputWrapper = Input.createInput({
                element: this.inputElement,
                customTag: this.angularTag,
                properties: {
                    readonly: this.readonly,
                    placeholder: this.placeholder,
                    cssClass: this.cssClass,
                    enabled: this.enabled,
                    enableRtl: this.enableRtl,
                    showClearButton: this.showClearButton
                },
                buttons: [ "e-input-group-icon e-range-icon e-icons" ]
            }), attributes(this.inputElement, {
                "aria-readonly": this.readonly ? "true" : "false",
                tabindex: "1",
                "aria-haspopup": "true",
                "aria-activedescendant": "null",
                "aria-owns": this.inputElement.id + "_popup",
                "aria-expanded": "false",
                role: "daterangepicker",
                autocomplete: "off",
                "aria-disabled": this.enabled ? "false" : "true"
            }), Input.addAttributes({
                "aria-label": "select"
            }, this.inputWrapper.buttons[0]), isNullOrUndefined(this.placeholder) || "" === this.placeholder.trim() || Input.addAttributes({
                "aria-labelledby": this.placeholder
            }, this.inputElement), this.setEleWidth(this.width), addClass([ this.inputWrapper.container ], "e-date-range-wrapper"), 
            isNullOrUndefined(this.inputElement.getAttribute("name")) && attributes(this.inputElement, {
                name: this.inputElement.id
            }), "hidden" === this.inputElement.type && (this.inputWrapper.container.style.display = "none"), 
            this.refreshControl(), this.previousEleValue = this.inputElement.value;
        }, DateRangePicker.prototype.setEleWidth = function(width) {
            this.inputWrapper.container.style.width = "string" == typeof width ? this.width : "number" == typeof width ? formatUnit(this.width) : "100%";
        }, DateRangePicker.prototype.refreshControl = function() {
            this.validateMinMax(), this.validateDates(), this.strictMode && this.validateRangeStrict();
            var isDisabled = this.disabledDates();
            this.strictMode && isDisabled && (this.setProperties({
                startDate: this.previousStartValue
            }, !0), this.setProperties({
                endDate: this.previousEndValue
            }, !0)), this.updateInput(), this.strictMode || this.validateRange(), !this.strictMode && isDisabled && this.clearRange(), 
            isNullOrUndefined(this.endDate) || isNullOrUndefined(this.startDate) || isDisabled || this.disabledDateRender(), 
            this.errorClass(), this.previousStartValue = isNullOrUndefined(this.startDate) || isNaN(+this.startDate) ? null : new Date(+this.startDate), 
            this.previousEndValue = isNullOrUndefined(this.endDate) || isNaN(+this.endDate) ? null : new Date(+this.endDate);
        }, DateRangePicker.prototype.updateInput = function() {
            if (!isNullOrUndefined(this.endDate) && !isNullOrUndefined(this.startDate)) {
                var startDate = this.globalize.formatDate(this.startDate, {
                    format: this.format,
                    type: "date",
                    skeleton: "yMd"
                }), endDate = this.globalize.formatDate(this.endDate, {
                    format: this.format,
                    type: "date",
                    skeleton: "yMd"
                });
                this.inputElement.value = startDate + " " + this.separator + " " + endDate, this.previousStartValue = new Date(+this.startDate), 
                this.previousEndValue = new Date(+this.endDate);
            }
        }, DateRangePicker.prototype.isDateDisabled = function(date) {
            var value = new Date(+date);
            if (+value < +this.min || +value > +this.max) return !0;
            this.virtualRenderCellArgs = {
                date: value,
                isDisabled: !1
            };
            var args = this.virtualRenderCellArgs;
            return this.virtualRenderCellEvent(args), !!args.isDisabled;
        }, DateRangePicker.prototype.disabledDateRender = function() {
            this.disabledDays = [], this.disabledDayCnt = null;
            for (var localDate = new Date(+this.startDate), count = 0; +localDate <= +this.endDate; ) {
                this.virtualRenderCellArgs = {
                    date: localDate,
                    isDisabled: !1
                };
                var args = this.virtualRenderCellArgs;
                this.virtualRenderCellEvent(args), args.isDisabled && (this.disabledDays.push(new Date(+args.date)), 
                +localDate > +this.startDate && +localDate < +this.endDate && count++), this.addDay(localDate, 1, null, this.max, this.min);
            }
            this.disabledDayCnt = count;
        }, DateRangePicker.prototype.virtualRenderCellEvent = function(args) {
            extend(this.virtualRenderCellArgs, {
                name: "renderDayCell"
            }), this.trigger("renderDayCell", args);
        }, DateRangePicker.prototype.disabledDates = function() {
            var isStartDisabled = !1, isEndDisabled = !1;
            return isNullOrUndefined(this.endDate) || isNullOrUndefined(this.startDate) || (this.value = null, 
            isStartDisabled = this.isDateDisabled(this.startDate), isEndDisabled = this.isDateDisabled(this.endDate), 
            this.currentDate = null, this.value = null), isStartDisabled || isEndDisabled;
        }, DateRangePicker.prototype.changeTrigger = function() {
            this.previousEleValue !== this.inputElement.value && this.trigger("change", this.rangeArgs()), 
            this.previousEleValue = this.inputElement.value;
        }, DateRangePicker.prototype.navigateTo = function(view, value) {
            _super.prototype.navigateTo.call(this, view, value);
        }, DateRangePicker.prototype.destroy = function() {
            this.hide(), removeClass([ this.inputElement ], [ ROOT$4 ]), EventHandler.remove(this.inputElement, "blur", this.inputBlurHandler), 
            isNullOrUndefined(this.inputWrapper) || (EventHandler.remove(this.inputWrapper.buttons[0], "click", this.rangeIconHandler), 
            this.inputWrapper.container.parentElement.appendChild(this.cloneElement), remove(this.inputWrapper.container)), 
            isNullOrUndefined(this.inputKeyboardModule) || this.isMobile || this.inputKeyboardModule.destroy(), 
            this.popupObj && this.popupObj.element.classList.contains("e-popup") && (this.isMobile || this.clearCalendarEvents(), 
            _super.prototype.destroy.call(this)), this.inputWrapper = this.popupWrapper = this.popupObj = this.cloneElement = this.presetElement = null;
        }, DateRangePicker.prototype.getModuleName = function() {
            return "daterangepicker";
        }, DateRangePicker.prototype.getPersistData = function() {
            return this.addOnPersist([ "startDate", "endDate" ]);
        }, DateRangePicker.prototype.getSelectedRange = function() {
            var range;
            return isNullOrUndefined(this.startDate) || isNullOrUndefined(this.endDate) ? range = 0 : (range = Math.round(Math.abs((this.startDate.getTime() - this.endDate.getTime()) / 864e5)) + 1, 
            this.disabledDateRender(), isNullOrUndefined(this.disabledDayCnt) || (range -= this.disabledDayCnt, 
            this.disabledDayCnt = null)), {
                startDate: this.startDate,
                endDate: this.endDate,
                daySpan: range
            };
        }, DateRangePicker.prototype.show = function(element) {
            element && (this.targetElement = element), this.createPopup();
            var isPreset = !this.isCustomRange || this.isMobile && this.isCustomRange;
            if (!isUndefined(this.presets[0].start && this.presets[0].end && this.presets[0].label) && isPreset && this.setScrollPosition(), 
            this.isPopupOpen()) {
                var args = {
                    date: this.inputElement.value,
                    model: this,
                    popup: this.popupObj
                };
                this.trigger("open", args), this.isMobile || (this.addIconTabindex(), isNullOrUndefined(this.leftCalendar) || this.calendarFocus());
            }
        }, DateRangePicker.prototype.hide = function() {
            if (isNullOrUndefined(this.previousEndValue) && isNullOrUndefined(this.previousStartValue) ? this.clearRange() : (isNullOrUndefined(this.previousStartValue) ? this.setProperties({
                startDate: null
            }, !0) : (this.setProperties({
                startDate: new Date("" + this.previousStartValue)
            }, !0), this.currentDate = new Date("" + this.startDate)), isNullOrUndefined(this.previousEndValue) ? this.setProperties({
                endDate: null
            }, !0) : this.setProperties({
                endDate: new Date("" + this.previousEndValue)
            }, !0)), this.isPopupOpen()) {
                var args = {
                    date: this.inputElement.value,
                    model: this,
                    popup: this.popupObj
                };
                this.trigger("close", args), this.isMobile && (isNullOrUndefined(this.startButton) || isNullOrUndefined(this.endButton) || (EventHandler.remove(this.startButton.element, "click", this.deviceHeaderClick), 
                EventHandler.remove(this.endButton.element, "click", this.deviceHeaderClick))), 
                this.popupObj.hide(), this.isMobile || (isNullOrUndefined(this.leftKeyboardModule) || isNullOrUndefined(this.rightKeyboardModule) || (this.leftKeyboardModule.destroy(), 
                this.rightKeyboardModule.destroy()), isNullOrUndefined(this.presetElement) || this.presetKeyboardModule.destroy(), 
                isNullOrUndefined(this.cancelButton) || this.btnKeyboardModule.destroy()), this.targetElement = null;
            }
            removeClass([ document.body ], "e-range-overflow"), EventHandler.remove(document, "click touchstart", this.documentHandler), 
            this.isMobile && this.modal && (this.modal.style.display = "none", this.modal.outerHTML = "", 
            this.modal = null), this.isKeyPopup = this.dateDisabled = !1;
        }, DateRangePicker.prototype.setLocale = function() {
            this.globalize = new Internationalization(this.locale), this.l10n.setLocale(this.locale), 
            this.setProperties({
                placeholder: this.l10n.getConstant("placeholder")
            }, !0), Input.setPlaceholder(this.placeholder, this.inputElement), this.updateInput(), 
            this.changeTrigger();
        }, DateRangePicker.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var format = {
                format: this.format,
                type: "date",
                skeleton: "yMd"
            }, _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                var prop = _a[_i];
                switch (this.hide(), prop) {
                  case "width":
                    this.setEleWidth(this.width);
                    break;

                  case "separator":
                    this.previousEleValue = this.inputElement.value, this.setProperties({
                        separator: newProp.separator
                    }, !0), this.updateInput(), this.changeTrigger();
                    break;

                  case "placeholder":
                    Input.setPlaceholder(newProp.placeholder, this.inputElement), this.setProperties({
                        placeholder: newProp.placeholder
                    }, !0);
                    break;

                  case "readonly":
                    Input.setReadonly(this.readonly, this.inputElement), this.inputElement.setAttribute("aria-readonly", "" + this.readonly);
                    break;

                  case "cssClass":
                    this.popupWrapper && addClass([ this.popupWrapper ], [ newProp.cssClass ]), addClass([ this.inputWrapper.container ], [ newProp.cssClass ]), 
                    this.setProperties({
                        cssClass: newProp.cssClass
                    }, !0);
                    break;

                  case "enabled":
                    this.setProperties({
                        enabled: newProp.enabled
                    }, !0), Input.setEnabled(this.enabled, this.inputElement), this.bindEvents();
                    break;

                  case "enableRtl":
                    this.setProperties({
                        enableRtl: newProp.enableRtl
                    }, !0), Input.setEnableRtl(this.enableRtl, [ this.inputWrapper.container ]);
                    break;

                  case "zIndex":
                    this.setProperties({
                        zIndex: newProp.zIndex
                    }, !0);
                    break;

                  case "format":
                    this.setProperties({
                        format: newProp.format
                    }, !0), this.updateInput(), this.changeTrigger();
                    break;

                  case "locale":
                    this.setProperties({
                        locale: newProp.locale
                    }, !0), this.setLocale();
                    break;

                  case "startDate":
                    "string" == typeof newProp.startDate && (newProp.value = this.globalize.parseDate(newProp.startDate, format)), 
                    this.setProperties({
                        startDate: newProp.startDate
                    }, !0), this.inputElement.value = "", this.refreshControl(), this.changeTrigger();
                    break;

                  case "endDate":
                    "string" == typeof newProp.endDate && (newProp.value = this.globalize.parseDate(newProp.endDate, format)), 
                    this.setProperties({
                        endDate: this.checkDateValue(new Date("" + newProp.endDate))
                    }, !0), this.inputElement.value = "", this.refreshControl(), this.changeTrigger();
                    break;

                  case "minDays":
                    this.setProperties({
                        minDays: newProp.minDays
                    }, !0), this.refreshControl(), this.changeTrigger();
                    break;

                  case "maxDays":
                    this.setProperties({
                        maxDays: newProp.maxDays
                    }, !0), this.refreshControl(), this.changeTrigger();
                    break;

                  case "min":
                    this.setProperties({
                        min: this.checkDateValue(new Date("" + newProp.min))
                    }, !0), this.previousEleValue = this.inputElement.value, this.refreshControl(), 
                    this.changeTrigger();
                    break;

                  case "max":
                    this.setProperties({
                        max: this.checkDateValue(new Date("" + newProp.max))
                    }, !0), this.refreshControl(), this.changeTrigger();
                    break;

                  case "strictMode":
                    this.setProperties({
                        strictMode: newProp.strictMode
                    }, !0), this.refreshControl(), this.changeTrigger();
                    break;

                  case "presets":
                    this.setProperties({
                        presets: newProp.presets
                    }, !0), this.processPresets();
                }
            }
        }, __decorate$15([ Property(null) ], DateRangePicker.prototype, "startDate", void 0), 
        __decorate$15([ Property(null) ], DateRangePicker.prototype, "endDate", void 0), 
        __decorate$15([ Collection([ {} ], Presets) ], DateRangePicker.prototype, "presets", void 0), 
        __decorate$15([ Property("") ], DateRangePicker.prototype, "width", void 0), __decorate$15([ Property(1e3) ], DateRangePicker.prototype, "zIndex", void 0), 
        __decorate$15([ Property(!0) ], DateRangePicker.prototype, "showClearButton", void 0), 
        __decorate$15([ Property("") ], DateRangePicker.prototype, "cssClass", void 0), 
        __decorate$15([ Property("-") ], DateRangePicker.prototype, "separator", void 0), 
        __decorate$15([ Property(null) ], DateRangePicker.prototype, "minDays", void 0), 
        __decorate$15([ Property(null) ], DateRangePicker.prototype, "maxDays", void 0), 
        __decorate$15([ Property(!1) ], DateRangePicker.prototype, "strictMode", void 0), 
        __decorate$15([ Property(null) ], DateRangePicker.prototype, "format", void 0), 
        __decorate$15([ Property(!0) ], DateRangePicker.prototype, "enabled", void 0), __decorate$15([ Property(!1) ], DateRangePicker.prototype, "readonly", void 0), 
        __decorate$15([ Property("") ], DateRangePicker.prototype, "placeholder", void 0), 
        __decorate$15([ Property("Month") ], DateRangePicker.prototype, "start", void 0), 
        __decorate$15([ Property("Month") ], DateRangePicker.prototype, "depth", void 0), 
        __decorate$15([ Property(null) ], DateRangePicker.prototype, "value", void 0), __decorate$15([ Event() ], DateRangePicker.prototype, "created", void 0), 
        __decorate$15([ Event() ], DateRangePicker.prototype, "destroyed", void 0), __decorate$15([ Event() ], DateRangePicker.prototype, "open", void 0), 
        __decorate$15([ Event() ], DateRangePicker.prototype, "close", void 0), __decorate$15([ Event() ], DateRangePicker.prototype, "change", void 0), 
        __decorate$15([ Event() ], DateRangePicker.prototype, "navigated", void 0), __decorate$15([ Event() ], DateRangePicker.prototype, "select", void 0), 
        DateRangePicker = __decorate$15([ NotifyPropertyChanges ], DateRangePicker);
    }(Calendar), __extends$18 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$17 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, DAY$1 = new Date().getDate(), MONTH$2 = new Date().getMonth(), YEAR$2 = new Date().getFullYear(), FOCUS = "e-input-focus", LISTCLASS$2 = cssClass.li;
    !function(TimePickerBase) {
        TimePickerBase.createListItems = function(min, max, globalize, timeFormat, step) {
            var start, end, interval = 6e4 * step, listItems = [], timeCollections = [];
            for (start = +min.setMilliseconds(0), end = +max.setMilliseconds(0); end >= start; ) timeCollections.push(start), 
            listItems.push(globalize.formatDate(new Date(start), {
                format: timeFormat,
                type: "time"
            })), start += interval;
            return {
                collection: timeCollections,
                list: ListBase.createList(listItems, null, !0)
            };
        };
    }(TimePickerBase || (TimePickerBase = {}));
    var elementRect$1, element$1, parentDocument$1$1, parentDocument$2, targetContainer$1, Input$1, TimePicker = function(_super) {
        function TimePicker(options, element) {
            var _this = _super.call(this, options, element) || this;
            return _this.liCollections = [], _this.timeCollections = [], _this.disableItemCollection = [], 
            _this;
        }
        return __extends$18(TimePicker, _super), TimePicker.prototype.preRender = function() {
            this.keyConfigure = {
                enter: "enter",
                escape: "escape",
                end: "end",
                tab: "tab",
                home: "home",
                down: "downarrow",
                up: "uparrow",
                left: "leftarrow",
                right: "rightarrow",
                open: "alt+downarrow",
                close: "alt+uparrow"
            }, this.cloneElement = this.element.cloneNode(!0), this.inputElement = this.element;
            var ej2Instance = getValue("ej2_instances", this.element);
            if (this.angularTag = null, "EJS-TIMEPICKER" === this.element.tagName) {
                this.angularTag = this.element.tagName;
                for (var inputTag = createElement("input"), index = 0; index < this.element.attributes.length; index++) inputTag.setAttribute(this.element.attributes[index].nodeName, this.element.attributes[index].nodeValue), 
                inputTag.innerHTML = this.element.innerHTML;
                this.element.parentNode.appendChild(inputTag), this.element.parentNode.removeChild(this.element), 
                this.inputElement = inputTag, setValue("ej2_instances", ej2Instance, this.inputElement);
            }
        }, TimePicker.prototype.render = function() {
            this.initialize(), this.createInputElement(), this.setEnable(), this.validateInterval(), 
            this.bindEvents(), this.validateDisable(), this.setValue(this.getFormattedValue(this.value));
        }, TimePicker.prototype.validateDisable = function() {
            this.setMinMax(this.initMin, this.initMax), this.popupCreation(), this.popupObj.hide(), 
            isNaN(+this.value) || null === this.value || this.valueIsDisable(this.value) || (this.strictMode && this.resetState(), 
            this.initValue = null, this.initMax = this.getDateObject(this.initMax), this.initMin = this.getDateObject(this.initMin), 
            this.timeCollections = this.liCollections = [], this.setMinMax(this.initMin, this.initMax));
        }, TimePicker.prototype.initialize = function() {
            this.globalize = new Internationalization(this.locale), this.defaultCulture = new Internationalization("en"), 
            this.setProperties({
                value: this.checkDateValue(new Date("" + this.value))
            }, !0), this.setProperties({
                min: this.checkDateValue(new Date("" + this.min))
            }, !0), this.setProperties({
                max: this.checkDateValue(new Date("" + this.max))
            }, !0), this.checkAttributes();
            var localeText = {
                placeholder: this.placeholder
            };
            this.l10n = new L10n("timepicker", localeText, this.locale), this.setProperties({
                placeholder: this.placeholder || this.l10n.getConstant("placeholder")
            }, !0), this.initValue = this.checkDateValue(this.value), this.initMin = this.checkDateValue(this.min), 
            this.initMax = this.checkDateValue(this.max), this.isNavigate = this.isPreventBlur = this.isTextSelected = !1, 
            this.activeIndex = this.valueWithMinutes = this.prevDate = null, this.element.getAttribute("id") ? this.inputElement.id = this.element.getAttribute("id") : (this.inputElement.id = getUniqueID("ej2_timepicker"), 
            attributes(this.element, {
                id: this.inputElement.id
            })), isNullOrUndefined(this.inputElement.getAttribute("name")) && attributes(this.inputElement, {
                name: this.inputElement.id
            });
        }, TimePicker.prototype.checkDateValue = function(value) {
            return !isNullOrUndefined(value) && value instanceof Date && !isNaN(+value) ? value : null;
        }, TimePicker.prototype.createInputElement = function() {
            this.inputWrapper = Input.createInput({
                element: this.inputElement,
                floatLabelType: this.floatLabelType,
                customTag: this.angularTag,
                properties: {
                    readonly: this.readonly,
                    placeholder: this.placeholder,
                    cssClass: this.cssClass,
                    enabled: this.enabled,
                    enableRtl: this.enableRtl,
                    showClearButton: this.showClearButton
                },
                buttons: [ " e-input-group-icon e-time-icon e-icons" ]
            }), this.inputWrapper.container.style.width = this.setWidth(this.width), attributes(this.inputElement, {
                "aria-haspopup": "true",
                "aria-autocomplete": "list",
                tabindex: "0",
                "aria-activedescendant": "null",
                "aria-owns": this.inputElement.id + "_options",
                "aria-expanded": "false",
                role: "combobox",
                autocomplete: "off"
            }), this.isNullOrEmpty(this.inputStyle) || Input.addAttributes({
                style: this.inputStyle
            }, this.inputElement), addClass([ this.inputWrapper.container ], "e-time-wrapper");
        }, TimePicker.prototype.destroy = function() {
            this.hide(), this.unBindEvents(), this.inputWrapper.container.parentElement.appendChild(this.cloneElement), 
            remove(this.inputWrapper.container), _super.prototype.destroy.call(this), this.inputWrapper = this.popupWrapper = this.cloneElement = void 0, 
            this.liCollections = this.timeCollections = this.disableItemCollection = [], isNullOrUndefined(this.rippleFn) || this.rippleFn();
        }, TimePicker.prototype.popupCreation = function() {
            this.popupWrapper = createElement("div", {
                className: "e-timepicker e-popup",
                attrs: {
                    id: this.inputElement.id + "_popup",
                    style: "visibility:hidden"
                }
            }), isNullOrUndefined(this.cssClass) || this.popupWrapper.classList.add(this.cssClass), 
            !isNullOrUndefined(this.step) && this.step > 0 && (this.generateList(), append([ this.listWrapper ], this.popupWrapper)), 
            document.body.appendChild(this.popupWrapper), this.addSelection(), this.renderPopup(), 
            this.setScrollPosition();
        }, TimePicker.prototype.getPopupHeight = function() {
            var height = parseInt("240px", 10), popupHeight = this.popupWrapper.getBoundingClientRect().height;
            return popupHeight > height ? height : popupHeight;
        }, TimePicker.prototype.generateList = function() {
            this.createListItems(), this.wireListEvents();
            var rippleModel = {
                duration: 300,
                selector: "." + LISTCLASS$2
            };
            this.rippleFn = rippleEffect(this.listWrapper, rippleModel), this.liCollections = this.listWrapper.querySelectorAll("." + LISTCLASS$2);
        }, TimePicker.prototype.popupCalculation = function() {
            var left = 0;
            if (Browser.isDevice) {
                var firstItem = this.isEmptyList() ? this.listTag : this.liCollections[0];
                left = -(parseInt(getComputedStyle(firstItem).textIndent, 10) - (this.enableRtl ? parseInt(getComputedStyle(this.inputElement).paddingRight, 10) : parseInt(getComputedStyle(this.inputElement).paddingLeft, 10)));
            }
            return left;
        }, TimePicker.prototype.isEmptyList = function() {
            return !isNullOrUndefined(this.liCollections) && 0 === this.liCollections.length || isNullOrUndefined(this.liCollections);
        }, TimePicker.prototype.renderPopup = function() {
            var _this = this;
            this.containerStyle = this.inputWrapper.container.getBoundingClientRect();
            var offset = Browser.isDevice ? this.setPopupPosition() : 2;
            this.popupObj = new Popup(this.popupWrapper, {
                width: this.setPopupWidth(this.width),
                zIndex: this.zIndex,
                targetType: "relative",
                collision: {
                    X: "flip",
                    Y: "flip"
                },
                relateTo: this.inputWrapper.container,
                position: {
                    X: "left",
                    Y: "bottom"
                },
                enableRtl: this.enableRtl,
                offsetY: offset,
                offsetX: this.popupCalculation(),
                open: function() {
                    _this.popupWrapper.style.visibility = "visible", addClass([ _this.inputWrapper.buttons[0] ], "e-active");
                },
                close: function() {
                    removeClass([ _this.inputWrapper.buttons[0] ], "e-active"), _this.unWireListEvents(), 
                    _this.inputElement.setAttribute("aria-activedescendant", "null"), remove(_this.popupObj.element), 
                    _this.popupObj.destroy(), _this.popupWrapper.innerHTML = "", _this.listWrapper = _this.popupWrapper = _this.listTag = void 0;
                }
            }), Browser.isDevice || (this.popupObj.collision = {
                X: "none",
                Y: "flip"
            }), this.popupObj.element.style.maxHeight = "240px";
        }, TimePicker.prototype.getFormattedValue = function(value) {
            return isNullOrUndefined(this.checkDateValue(value)) ? null : this.globalize.formatDate(value, {
                skeleton: "medium",
                type: "time"
            });
        }, TimePicker.prototype.getDateObject = function(text) {
            if (!this.isNullOrEmpty(text)) {
                var dateValue = this.createDateObj(text), value = !this.isNullOrEmpty(this.initValue);
                if (this.checkDateValue(dateValue)) {
                    var date = value ? this.initValue.getDate() : DAY$1, month = value ? this.initValue.getMonth() : MONTH$2, year = value ? this.initValue.getFullYear() : YEAR$2;
                    return new Date(year, month, date, dateValue.getHours(), dateValue.getMinutes(), dateValue.getSeconds());
                }
            }
            return null;
        }, TimePicker.prototype.checkErrorState = function(val) {
            var value = this.getDateObject(val);
            this.validateState(value) ? (removeClass([ this.inputWrapper.container ], "e-error"), 
            attributes(this.inputElement, {
                "aria-invalid": "false"
            })) : (addClass([ this.inputWrapper.container ], "e-error"), attributes(this.inputElement, {
                "aria-invalid": "true"
            }));
        }, TimePicker.prototype.validateInterval = function() {
            !isNullOrUndefined(this.step) && this.step > 0 ? this.enableElement([ this.inputWrapper.buttons[0] ]) : this.disableTimeIcon();
        }, TimePicker.prototype.disableTimeIcon = function() {
            this.disableElement([ this.inputWrapper.buttons[0] ]), this.hide();
        }, TimePicker.prototype.disableElement = function(element) {
            addClass(element, "e-disabled");
        }, TimePicker.prototype.enableElement = function(element) {
            removeClass(element, "e-disabled");
        }, TimePicker.prototype.selectInputText = function() {
            this.inputElement.setSelectionRange(0, this.inputElement.value.length);
        }, TimePicker.prototype.getMeridianText = function() {
            return "en" === this.locale || "en-US" === this.locale ? getValue("dayPeriods.format.wide", getDefaultDateObject()) : getValue("main." + this.locale + ".dates.calendars.gregorian.dayPeriods.format.abbreviated", cldrData);
        }, TimePicker.prototype.getCursorSelection = function() {
            var input = this.inputElement, start = 0, end = 0;
            return isNaN(input.selectionStart) || (start = input.selectionStart, end = input.selectionEnd), 
            {
                start: Math.abs(start),
                end: Math.abs(end)
            };
        }, TimePicker.prototype.getActiveElement = function() {
            return isNullOrUndefined(this.popupWrapper) ? null : this.popupWrapper.querySelectorAll(".e-active");
        }, TimePicker.prototype.isNullOrEmpty = function(value) {
            return !!(isNullOrUndefined(value) || "string" == typeof value && "" === value.trim());
        }, TimePicker.prototype.setWidth = function(width) {
            return width = "number" == typeof width ? formatUnit(width) : "string" == typeof width ? width : "100%";
        }, TimePicker.prototype.setPopupWidth = function(width) {
            if ((width = this.setWidth(width)).indexOf("%") > -1) {
                width = (this.containerStyle.width * parseFloat(width) / 100).toString() + "px";
            }
            if (Browser.isDevice) {
                var firstItem = this.isEmptyList() ? this.listTag : this.liCollections[0];
                width = parseInt(width, 10) + 2 * (parseInt(getComputedStyle(firstItem).textIndent, 10) - parseInt(getComputedStyle(this.inputElement).textIndent, 10) + parseInt(getComputedStyle(this.inputElement.parentElement).borderLeftWidth, 10)) + "px";
            }
            return width;
        }, TimePicker.prototype.setScrollPosition = function() {
            var element;
            this.getPopupHeight();
            isNullOrUndefined(element = this.selectedElement) ? this.popupWrapper && this.checkDateValue(this.scrollTo) && this.setScrollTo() : this.findScrollTop(element);
        }, TimePicker.prototype.findScrollTop = function(element) {
            var listHeight = this.getPopupHeight(), nextEle = element.nextElementSibling, height = nextEle ? nextEle.offsetTop : element.offsetTop, liHeight = element.getBoundingClientRect().height;
            height + element.offsetTop > listHeight ? this.popupWrapper.scrollTop = nextEle ? height - (listHeight / 2 + liHeight / 2) : height : this.popupWrapper.scrollTop = 0;
        }, TimePicker.prototype.setScrollTo = function() {
            var element;
            if (isNullOrUndefined(this.popupWrapper)) this.popupWrapper.scrollTop = 0; else {
                var items = this.popupWrapper.querySelectorAll("." + LISTCLASS$2);
                if (items.length) {
                    var initialTime = this.timeCollections[0], scrollTime = this.getDateObject(this.checkDateValue(this.scrollTo)).getTime();
                    element = items[Math.round((scrollTime - initialTime) / (6e4 * this.step))];
                }
            }
            isNullOrUndefined(element) ? this.popupWrapper.scrollTop = 0 : this.findScrollTop(element);
        }, TimePicker.prototype.getText = function() {
            return isNullOrUndefined(this.checkDateValue(this.value)) ? "" : this.getValue(this.value);
        }, TimePicker.prototype.getValue = function(value) {
            return isNullOrUndefined(this.checkDateValue(value)) ? null : this.globalize.formatDate(value, {
                format: this.cldrTimeFormat(),
                type: "time"
            });
        }, TimePicker.prototype.cldrDateFormat = function() {
            return "en" === this.locale || "en-US" === this.locale ? getValue("dateFormats.short", getDefaultDateObject()) : this.getCultureDateObject(cldrData, "" + this.locale);
        }, TimePicker.prototype.cldrTimeFormat = function() {
            return this.isNullOrEmpty(this.format) ? "en" === this.locale || "en-US" === this.locale ? getValue("timeFormats.short", getDefaultDateObject()) : this.getCultureTimeObject(cldrData, "" + this.locale) : this.format;
        }, TimePicker.prototype.dateToNumeric = function() {
            return "en" === this.locale || "en-US" === this.locale ? getValue("timeFormats.medium", getDefaultDateObject()) : getValue("main." + this.locale + ".dates.calendars.gregorian.timeFormats.medium", cldrData);
        }, TimePicker.prototype.getExactDateTime = function(value) {
            return isNullOrUndefined(this.checkDateValue(value)) ? null : this.globalize.formatDate(value, {
                format: this.dateToNumeric(),
                type: "time"
            });
        }, TimePicker.prototype.setValue = function(value) {
            var time = this.checkValue(value);
            this.strictMode || this.validateState(time) ? this.isNullOrEmpty(time) ? (this.initValue = null, 
            this.validateMinMax(this.value, this.min, this.max)) : this.initValue = this.getDateObject(time) : (this.initValue = this.valueWithMinutes = null, 
            this.validateMinMax(this.value, this.min, this.max)), this.updateInput(!0, this.initValue);
        }, TimePicker.prototype.updatePlaceHolder = function() {
            Input.setPlaceholder(this.l10n.getConstant("placeholder"), this.inputElement);
        }, TimePicker.prototype.popupHandler = function() {
            this.isPopupOpen() ? this.closePopup() : (Browser.isDevice || this.inputElement.focus(), 
            this.show());
        }, TimePicker.prototype.mouseDownHandler = function() {
            if (!this.readonly) {
                this.getCursorSelection();
                this.inputElement.setSelectionRange(0, 0), EventHandler.add(this.inputElement, "mouseup", this.mouseUpHandler, this);
            }
        }, TimePicker.prototype.mouseUpHandler = function(event) {
            if (!this.readonly) {
                event.preventDefault(), EventHandler.remove(this.inputElement, "mouseup", this.mouseUpHandler);
                var curPos = this.getCursorSelection();
                0 === curPos.start && curPos.end === this.inputElement.value.length || (this.inputElement.value.length > 0 && (this.cursorDetails = this.focusSelection()), 
                this.inputElement.setSelectionRange(this.cursorDetails.start, this.cursorDetails.end));
            }
        }, TimePicker.prototype.focusSelection = function() {
            var regex = new RegExp("^[a-zA-Z0-9]+$"), split = this.inputElement.value.split("");
            split.push(" ");
            var curPos = this.getCursorSelection(), start = 0, end = 0, isSeparator = !1;
            if (this.isTextSelected) start = curPos.start, end = curPos.end, this.isTextSelected = !1; else for (var i = 0; i < split.length; i++) if (regex.test(split[i]) || (end = i, 
            isSeparator = !0), isSeparator) {
                if (curPos.start >= start && curPos.end <= end) {
                    end = end, this.isTextSelected = !0;
                    break;
                }
                start = i + 1, isSeparator = !1;
            }
            return {
                start: start,
                end: end
            };
        }, TimePicker.prototype.inputHandler = function(event) {
            if (!this.readonly && this.enabled) switch ("right" !== event.action && "left" !== event.action && "tab" !== event.action && event.preventDefault(), 
            event.action) {
              case "home":
              case "end":
              case "up":
              case "down":
                this.keyHandler(event);
                break;

              case "enter":
                this.isNavigate ? (this.selectedElement = this.liCollections[this.activeIndex], 
                this.valueWithMinutes = new Date(this.timeCollections[this.activeIndex]), this.updateValue(this.valueWithMinutes, event)) : this.updateValue(this.inputElement.value, event), 
                this.hide(), addClass([ this.inputWrapper.container ], FOCUS), this.isNavigate = !1;
                break;

              case "open":
                this.show();
                break;

              case "escape":
                Input.setValue(this.objToString(this.value), this.inputElement, this.floatLabelType, !1), 
                this.previousState(this.value), this.hide();
                break;

              case "close":
                this.hide();
                break;

              default:
                this.isNavigate = !1;
            }
        }, TimePicker.prototype.onMouseClick = function(event) {
            var target = event.target, li = this.selectedElement = closest(target, "." + LISTCLASS$2);
            this.setSelection(li, event), li && li.classList.contains(LISTCLASS$2) && (this.hide(), 
            Browser.isDevice || addClass([ this.inputWrapper.container ], FOCUS));
        }, TimePicker.prototype.closePopup = function(delay) {
            if (this.isPopupOpen() && this.popupObj) {
                var args = {
                    popup: this.popupObj
                };
                this.trigger("close", args);
                var animModel = {
                    name: "FadeOut",
                    duration: 50,
                    delay: delay || 0
                };
                this.popupObj.hide(new Animation(animModel)), removeClass([ this.inputWrapper.container ], [ "e-icon-anim", FOCUS ]), 
                attributes(this.inputElement, {
                    "aria-expanded": "false"
                }), EventHandler.remove(document, "mousedown touchstart", this.documentClickHandler);
            }
        }, TimePicker.prototype.checkValueChange = function(event, isNavigation) {
            if (this.strictMode || this.validateState(this.valueWithMinutes)) if (isNavigation) {
                var value = this.getDateObject(new Date(this.timeCollections[this.activeIndex]));
                +this.prevDate != +value && this.valueProcess(event, value);
            } else (this.prevValue !== this.inputElement.value || isNullOrUndefined(this.checkDateValue(this.value))) && this.valueProcess(event, this.getDateObject(this.inputElement.value)); else this.initValue = this.valueWithMinutes = null, 
            this.setProperties({
                value: null
            }, !0), this.prevValue = this.inputElement.value, this.prevDate !== this.value && this.changeEvent(event);
        }, TimePicker.prototype.onMouseOver = function(event) {
            var currentLi = closest(event.target, "." + LISTCLASS$2);
            this.setHover(currentLi, "e-hover");
        }, TimePicker.prototype.setHover = function(li, className) {
            this.enabled && this.isValidLI(li) && !li.classList.contains(className) && (this.removeHover(className), 
            addClass([ li ], className), "e-navigation" === className && li.setAttribute("aria-selected", "true"));
        }, TimePicker.prototype.setSelection = function(li, event) {
            this.isValidLI(li) && !li.classList.contains("e-active") && (this.checkValue(li.getAttribute("data-value")), 
            this.selectedElement = li, this.activeIndex = Array.prototype.slice.call(this.liCollections).indexOf(li), 
            this.valueWithMinutes = new Date(this.timeCollections[this.activeIndex]), addClass([ this.selectedElement ], "e-active"), 
            this.selectedElement.setAttribute("aria-selected", "true"), this.checkValueChange(event, !0));
        }, TimePicker.prototype.onMouseLeave = function() {
            this.removeHover("e-hover");
        }, TimePicker.prototype.scrollHandler = function() {
            "timepicker" === this.getModuleName() && Browser.isDevice || this.hide();
        }, TimePicker.prototype.setMinMax = function(minVal, maxVal) {
            isNullOrUndefined(this.checkDateValue(minVal)) && (this.initMin = this.getDateObject("12:00:00 AM")), 
            isNullOrUndefined(this.checkDateValue(maxVal)) && (this.initMax = this.getDateObject("11:59:59 PM"));
        }, TimePicker.prototype.validateMinMax = function(dateVal, minVal, maxVal) {
            var value = dateVal instanceof Date ? dateVal : this.getDateObject(dateVal);
            return isNullOrUndefined(this.checkDateValue(value)) ? +this.createDateObj(this.getFormattedValue(this.initMin)) > +this.createDateObj(this.getFormattedValue(this.initMax)) && this.disableTimeIcon() : dateVal = this.strictOperation(this.initMin, this.initMax, dateVal, value), 
            this.strictMode && (dateVal = this.valueIsDisable(dateVal) ? dateVal : null), this.checkErrorState(dateVal), 
            dateVal;
        }, TimePicker.prototype.valueIsDisable = function(value) {
            if (this.disableItemCollection.length > 0) {
                if (this.disableItemCollection.length === this.timeCollections.length) return !1;
                for (var time = value instanceof Date ? this.objToString(value) : value, index = 0; index < this.disableItemCollection.length; index++) if (time === this.disableItemCollection[index]) return !1;
            }
            return !0;
        }, TimePicker.prototype.validateState = function(val) {
            if (!this.strictMode) {
                if (!this.valueIsDisable(val)) return !1;
                var value = this.setCurrentDate(this.getDateObject(val)), maxValue = this.setCurrentDate(this.getDateObject(this.initMax)), minValue = this.setCurrentDate(this.getDateObject(this.initMin));
                if (isNullOrUndefined(this.checkDateValue(value))) {
                    if (+maxValue < +minValue || "" !== this.inputElement.value) return !1;
                } else if (+value > +maxValue || +value < +minValue) return !1;
            }
            return !0;
        }, TimePicker.prototype.strictOperation = function(minimum, maximum, dateVal, val) {
            var maxValue = this.createDateObj(this.getFormattedValue(maximum)), minValue = this.createDateObj(this.getFormattedValue(minimum)), value = this.createDateObj(this.getFormattedValue(val));
            if (this.strictMode) {
                if (+minValue > +maxValue) return this.disableTimeIcon(), this.initValue = this.getDateObject(maxValue), 
                Input.setValue(this.getValue(this.initValue), this.inputElement, this.floatLabelType, !1), 
                this.inputElement.value;
                if (+minValue >= +value) return this.getDateObject(minValue);
                if (+value >= +maxValue || +minValue == +maxValue) return this.getDateObject(maxValue);
            } else if (+minValue > +maxValue && (this.disableTimeIcon(), !isNaN(+this.createDateObj(dateVal)))) return dateVal;
            return dateVal;
        }, TimePicker.prototype.bindEvents = function() {
            EventHandler.add(this.inputWrapper.buttons[0], "click", this.popupHandler, this), 
            EventHandler.add(this.inputElement, "blur", this.focusOut, this), EventHandler.add(this.inputElement, "focus", this.focusIn, this), 
            this.bindClearEvent(), Browser.isDevice || (this.inputEvent = new KeyboardEvents(this.inputWrapper.container, {
                keyAction: this.inputHandler.bind(this),
                keyConfigs: this.keyConfigure,
                eventName: "keydown"
            }), EventHandler.add(this.inputElement, "mousedown touchstart", this.mouseDownHandler, this));
        }, TimePicker.prototype.unBindEvents = function() {
            EventHandler.remove(this.inputWrapper.buttons[0], "mousedown touchstart", this.popupHandler), 
            EventHandler.remove(this.inputElement, "blur", this.focusOut), EventHandler.remove(this.inputElement, "focus", this.focusIn), 
            this.inputEvent && this.inputEvent.destroy(), EventHandler.remove(this.inputElement, "mousedown touchstart", this.mouseDownHandler);
        }, TimePicker.prototype.bindClearEvent = function() {
            this.showClearButton && EventHandler.add(this.inputWrapper.clearButton, "mousedown touchstart", this.clearHandler, this);
        }, TimePicker.prototype.clearHandler = function(e) {
            e.preventDefault(), this.clear(e);
        }, TimePicker.prototype.clear = function(event) {
            this.setProperties({
                value: null
            }, !0), this.initValue = null, this.resetState(), this.changeEvent(event);
        }, TimePicker.prototype.setZIndex = function() {
            this.popupObj && (this.popupObj.zIndex = this.zIndex, this.popupObj.dataBind());
        }, TimePicker.prototype.checkAttributes = function() {
            for (var value, _i = 0, attributes_1 = [ "step", "disabled", "readonly", "style", "name", "value", "min", "max", "placeholder" ]; _i < attributes_1.length; _i++) {
                var prop = attributes_1[_i];
                if (!isNullOrUndefined(this.inputElement.getAttribute(prop))) switch (prop) {
                  case "disabled":
                    var enabled = isNullOrUndefined(this.inputElement.getAttribute(prop));
                    this.setProperties({
                        enabled: enabled
                    }, !0);
                    break;

                  case "readonly":
                    var readonly = !isNullOrUndefined(this.inputElement.getAttribute(prop));
                    this.setProperties({
                        readonly: readonly
                    }, !0);
                    break;

                  case "style":
                    this.inputStyle = this.inputElement.getAttribute(prop);
                    break;

                  case "name":
                    this.inputElement.setAttribute("name", this.inputElement.getAttribute(prop));
                    break;

                  case "step":
                    this.step = parseInt(this.inputElement.getAttribute(prop), 10);
                    break;

                  case "placeholder":
                    this.placeholder = this.inputElement.getAttribute(prop);
                    break;

                  case "min":
                    value = new Date(this.inputElement.getAttribute(prop)), isNullOrUndefined(this.checkDateValue(value)) || this.setProperties({
                        min: value
                    }, !0);
                    break;

                  case "max":
                    value = new Date(this.inputElement.getAttribute(prop)), isNullOrUndefined(this.checkDateValue(value)) || this.setProperties({
                        max: value
                    }, !0);
                    break;

                  case "value":
                    value = new Date(this.inputElement.getAttribute(prop)), isNullOrUndefined(this.checkDateValue(value)) || (this.initValue = value, 
                    this.updateInput(!1, this.initValue));
                }
            }
        }, TimePicker.prototype.setCurrentDate = function(value) {
            return isNullOrUndefined(this.checkDateValue(value)) ? null : new Date(YEAR$2, MONTH$2, DAY$1, value.getHours(), value.getMinutes(), value.getSeconds());
        }, TimePicker.prototype.getSeparator = function() {
            var result = "", formats = this.cldrTimeFormat().split(" ")[this.getTextFormat()];
            isNullOrUndefined(formats) && (0 === this.cldrTimeFormat().indexOf("a") ? formats = "a " + this.cldrTimeFormat().split("a")[1] : this.cldrTimeFormat().indexOf("a") === this.cldrTimeFormat().length - 1 && (formats = this.cldrTimeFormat().split("a")[0] + " a"));
            for (var regex = new RegExp("^[a-zA-Z0-9]+$"), i = 0; i < formats.length; i++) regex.test(formats.charAt(i)) || (result = formats.charAt(i));
            return result;
        }, TimePicker.prototype.getTextFormat = function() {
            var time = 0;
            if ("a" === this.cldrTimeFormat().split(" ")[0] || 0 === this.cldrTimeFormat().indexOf("a")) time = 1; else if (this.cldrTimeFormat().indexOf("a") < 0) for (var strArray = this.cldrTimeFormat().split(" "), i = 0; i < strArray.length; i++) if (strArray[i].toLowerCase().indexOf("h") >= 0) {
                time = i;
                break;
            }
            return time;
        }, TimePicker.prototype.updateValue = function(value, event) {
            var val;
            if (this.isNullOrEmpty(value)) this.resetState(); else if (val = this.checkValue(value), 
            this.strictMode) {
                var inputVal = null === val && value.trim().length > 0 ? this.previousState(this.prevDate) : this.inputElement.value;
                Input.setValue(inputVal, this.inputElement, this.floatLabelType, !1);
            }
            this.checkValueChange(event, "string" != typeof value);
        }, TimePicker.prototype.previousState = function(date) {
            for (var value = this.getDateObject(date), i = 0; i < this.timeCollections.length; i++) if (+value === this.timeCollections[i]) {
                this.activeIndex = i, this.selectedElement = this.liCollections[i], this.valueWithMinutes = new Date(this.timeCollections[i]);
                break;
            }
            return this.prevValue;
        }, TimePicker.prototype.resetState = function() {
            this.removeSelection(), Input.setValue("", this.inputElement, this.floatLabelType, !1), 
            this.valueWithMinutes = this.activeIndex = null, this.strictMode || this.checkErrorState(null);
        }, TimePicker.prototype.objToString = function(val) {
            return isNullOrUndefined(this.checkDateValue(val)) ? null : this.globalize.formatDate(val, {
                format: this.cldrTimeFormat(),
                type: "time"
            });
        }, TimePicker.prototype.checkValue = function(value) {
            if (!this.isNullOrEmpty(value)) {
                var date = value instanceof Date ? value : this.getDateObject(value);
                return this.validateValue(date, value);
            }
            return this.resetState(), this.valueWithMinutes = null;
        }, TimePicker.prototype.validateValue = function(date, value) {
            var time, val = this.validateMinMax(value, this.min, this.max), newval = this.createDateObj(val);
            return this.getFormattedValue(newval) !== this.getFormattedValue(this.value) ? (this.valueWithMinutes = isNullOrUndefined(newval) ? null : newval, 
            time = this.objToString(this.valueWithMinutes)) : (this.strictMode && (date = newval), 
            this.valueWithMinutes = this.checkDateValue(date), time = this.objToString(this.valueWithMinutes)), 
            !this.strictMode && isNullOrUndefined(time) ? Input.setValue(val.trim().length > 0 ? val : "", this.inputElement, this.floatLabelType, !1) : Input.setValue(time, this.inputElement, this.floatLabelType, !1), 
            time;
        }, TimePicker.prototype.findNextElement = function(event) {
            var textVal = this.inputElement.value, value = isNullOrUndefined(this.valueWithMinutes) ? this.createDateObj(textVal) : this.getDateObject(this.valueWithMinutes), timeVal = null, count = this.liCollections.length;
            if (isNullOrUndefined(this.checkDateValue(value)) && isNullOrUndefined(this.activeIndex)) {
                index = this.validLiElement(0, "down" !== event.action);
                this.activeIndex = index, this.selectedElement = this.liCollections[index], this.elementValue(new Date(this.timeCollections[index]));
            } else {
                if ("home" === event.action) {
                    var index = this.validLiElement(0);
                    timeVal = +this.createDateObj(new Date(this.timeCollections[index])), this.activeIndex = index;
                } else if ("end" === event.action) {
                    var index = this.validLiElement(this.timeCollections.length - 1, !0);
                    timeVal = +this.createDateObj(new Date(this.timeCollections[index])), this.activeIndex = index;
                } else if ("down" === event.action) for (var i = 0; i < count; i++) {
                    if (+value < this.timeCollections[i]) {
                        index = this.validLiElement(i);
                        timeVal = +this.createDateObj(new Date(this.timeCollections[index])), this.activeIndex = index;
                        break;
                    }
                    if (i === count - 1) {
                        index = this.validLiElement(0);
                        timeVal = +this.createDateObj(new Date(this.timeCollections[index])), this.activeIndex = index;
                        break;
                    }
                } else for (i = count - 1; i >= 0; i--) {
                    if (+value > this.timeCollections[i]) {
                        index = this.validLiElement(i, !0);
                        timeVal = +this.createDateObj(new Date(this.timeCollections[index])), this.activeIndex = index;
                        break;
                    }
                    if (0 === i) {
                        index = this.validLiElement(count - 1);
                        timeVal = +this.createDateObj(new Date(this.timeCollections[index])), this.activeIndex = index;
                        break;
                    }
                }
                this.selectedElement = this.liCollections[this.activeIndex], this.elementValue(isNullOrUndefined(timeVal) ? null : new Date(timeVal));
            }
        }, TimePicker.prototype.elementValue = function(value) {
            isNullOrUndefined(this.checkDateValue(value)) || this.checkValue(value);
        }, TimePicker.prototype.validLiElement = function(index, backward) {
            var elementIndex = null, items = isNullOrUndefined(this.popupWrapper) ? this.liCollections : this.popupWrapper.querySelectorAll("." + LISTCLASS$2), isCheck = !0;
            if (items.length) if (backward) for (var i = index; i >= 0; i--) {
                if (!items[i].classList.contains("e-disabled")) {
                    elementIndex = i;
                    break;
                }
                0 === i && isCheck && (index = i = items.length, isCheck = !1);
            } else for (i = index; i <= items.length - 1; i++) {
                if (!items[i].classList.contains("e-disabled")) {
                    elementIndex = i;
                    break;
                }
                i === items.length - 1 && isCheck && (index = i = -1, isCheck = !1);
            }
            return elementIndex;
        }, TimePicker.prototype.keyHandler = function(event) {
            if (!(isNullOrUndefined(this.step) || this.step <= 0 || this.inputWrapper.buttons[0].classList.contains("e-disabled"))) {
                var count = this.timeCollections.length;
                if (isNullOrUndefined(this.getActiveElement()) || 0 === this.getActiveElement().length) if (this.liCollections.length > 0) if (isNullOrUndefined(this.value) && isNullOrUndefined(this.activeIndex)) {
                    var index = this.validLiElement(0, "down" !== event.action);
                    this.activeIndex = index, this.selectedElement = this.liCollections[index], this.elementValue(new Date(this.timeCollections[index]));
                } else this.findNextElement(event); else this.findNextElement(event); else {
                    var nextItem = void 0;
                    if (event.keyCode >= 37 && event.keyCode <= 40) {
                        index = 40 === event.keyCode || 39 === event.keyCode ? ++this.activeIndex : --this.activeIndex;
                        this.activeIndex = index = this.activeIndex === count ? 0 : this.activeIndex, this.activeIndex = index = this.activeIndex < 0 ? count - 1 : this.activeIndex, 
                        this.activeIndex = index = this.validLiElement(this.activeIndex, 40 !== event.keyCode && 39 !== event.keyCode), 
                        nextItem = isNullOrUndefined(this.timeCollections[index]) ? this.timeCollections[0] : this.timeCollections[index];
                    } else if ("home" === event.action) {
                        index = this.validLiElement(0);
                        this.activeIndex = index, nextItem = this.timeCollections[index];
                    } else if ("end" === event.action) {
                        index = this.validLiElement(count - 1, !0);
                        this.activeIndex = index, nextItem = this.timeCollections[index];
                    }
                    this.selectedElement = this.liCollections[this.activeIndex], this.elementValue(new Date(nextItem));
                }
                this.isNavigate = !0, this.setHover(this.selectedElement, "e-navigation"), this.setActiveDescendant(), 
                this.selectInputText(), !this.isPopupOpen() || null === this.selectedElement || event && "click" === event.type || this.setScrollPosition();
            }
        }, TimePicker.prototype.setPopupPosition = function() {
            var offsetValue, popupHeight = this.getPopupHeight(), element = this.getActiveElement(), liHeight = this.liCollections[0].getBoundingClientRect().height, listHeight = popupHeight / 2, height = 0 === element.length ? this.liCollections[0].offsetTop : element[0].offsetTop, lastItemOffsetValue = this.liCollections[this.liCollections.length - 1].offsetTop, ulPadding = parseInt(getComputedStyle(this.listTag).paddingTop, 10);
            if (lastItemOffsetValue - listHeight < height) {
                offsetValue = (popupHeight / liHeight - (this.liCollections.length - this.activeIndex)) * liHeight - ulPadding - 2;
            } else offsetValue = height + liHeight > listHeight ? listHeight - liHeight / 2 : height;
            return -(offsetValue = offsetValue + 2 + (liHeight - this.containerStyle.height) / 2);
        }, TimePicker.prototype.getCultureTimeObject = function(ld, c) {
            return getValue("main." + c + ".dates.calendars.gregorian.timeFormats.short", ld);
        }, TimePicker.prototype.getCultureDateObject = function(ld, c) {
            return getValue("main." + c + ".dates.calendars.gregorian.dateFormats.short", ld);
        }, TimePicker.prototype.wireListEvents = function() {
            EventHandler.add(this.listWrapper, "click", this.onMouseClick, this), Browser.isDevice || (EventHandler.add(this.listWrapper, "mouseover", this.onMouseOver, this), 
            EventHandler.add(this.listWrapper, "mouseout", this.onMouseLeave, this));
        }, TimePicker.prototype.unWireListEvents = function() {
            this.listWrapper && (EventHandler.remove(this.listWrapper, "click", this.onMouseClick), 
            Browser.isDevice || (EventHandler.remove(this.listWrapper, "mouseover", this.onMouseOver), 
            EventHandler.remove(this.listWrapper, "mouseout", this.onMouseLeave)));
        }, TimePicker.prototype.valueProcess = function(event, value) {
            var result = isNullOrUndefined(this.checkDateValue(value)) ? null : value;
            +this.prevDate != +result && (this.initValue = result, this.changeEvent(event));
        }, TimePicker.prototype.changeEvent = function(event) {
            this.addSelection(), this.updateInput(!0, this.initValue);
            var eventArgs = {
                e: event,
                value: this.value,
                text: this.inputElement.value,
                isInteracted: !isNullOrUndefined(event)
            };
            this.trigger("change", eventArgs);
        }, TimePicker.prototype.updateInput = function(isUpdate, date) {
            isUpdate && (this.prevValue = this.getValue(date)), this.prevDate = this.valueWithMinutes = date, 
            this.setProperties({
                value: date
            }, !0);
        }, TimePicker.prototype.setActiveDescendant = function() {
            isNullOrUndefined(this.selectedElement) ? attributes(this.inputElement, {
                "aria-activedescendant": "null"
            }) : attributes(this.inputElement, {
                "aria-activedescendant": this.selectedElement.getAttribute("id")
            });
        }, TimePicker.prototype.removeSelection = function() {
            if (this.removeHover("e-hover"), !isNullOrUndefined(this.popupWrapper)) {
                var items = this.popupWrapper.querySelectorAll(".e-active");
                items.length && (removeClass(items, "e-active"), items[0].removeAttribute("aria-selected"));
            }
        }, TimePicker.prototype.removeHover = function(className) {
            var hoveredItem = this.getHoverItem(className);
            hoveredItem && hoveredItem.length && (removeClass(hoveredItem, className), "e-navigation" === className && hoveredItem[0].removeAttribute("aria-selected"));
        }, TimePicker.prototype.getHoverItem = function(className) {
            var hoveredItem;
            return isNullOrUndefined(this.popupWrapper) || (hoveredItem = this.popupWrapper.querySelectorAll("." + className)), 
            hoveredItem;
        }, TimePicker.prototype.setActiveClass = function() {
            if (!isNullOrUndefined(this.popupWrapper)) {
                var items = this.popupWrapper.querySelectorAll("." + LISTCLASS$2);
                if (items.length) for (var i = 0; i < items.length; i++) if (this.timeCollections[i] === +this.getDateObject(this.valueWithMinutes)) {
                    items[i].setAttribute("aria-selected", "true"), this.selectedElement = items[i], 
                    this.activeIndex = i;
                    break;
                }
            }
        }, TimePicker.prototype.addSelection = function() {
            this.selectedElement = null, this.removeSelection(), this.setActiveClass(), isNullOrUndefined(this.selectedElement) || (addClass([ this.selectedElement ], "e-active"), 
            this.selectedElement.setAttribute("aria-selected", "true"));
        }, TimePicker.prototype.isValidLI = function(li) {
            return li && li.classList.contains(LISTCLASS$2) && !li.classList.contains("e-disabled");
        }, TimePicker.prototype.createDateObj = function(val) {
            var today = this.globalize.formatDate(new Date(), {
                skeleton: "short",
                type: "date"
            }), value = null;
            return "string" == typeof val ? val.toUpperCase().indexOf("AM") > -1 || val.toUpperCase().indexOf("PM") > -1 ? (today = this.defaultCulture.formatDate(new Date(), {
                skeleton: "short",
                type: "date"
            }), isNullOrUndefined(value = isNaN(+new Date(today + " " + val)) ? null : new Date(new Date(today + " " + val).setMilliseconds(0))) && (value = this.TimeParse(today, val))) : value = this.TimeParse(today, val) : val instanceof Date && (value = val), 
            value;
        }, TimePicker.prototype.TimeParse = function(today, val) {
            var value;
            return value = this.globalize.parseDate(today + " " + val, {
                format: this.cldrDateFormat() + " " + this.cldrTimeFormat(),
                type: "datetime"
            }), value = isNullOrUndefined(value) ? this.globalize.parseDate(today + " " + val, {
                format: this.cldrDateFormat() + " " + this.dateToNumeric(),
                type: "datetime"
            }) : value, value = isNullOrUndefined(value) ? value : new Date(value.setMilliseconds(0));
        }, TimePicker.prototype.createListItems = function() {
            var _this = this;
            this.listWrapper = createElement("div", {
                className: "e-content",
                attrs: {
                    tabindex: "0"
                }
            });
            var start, end, interval = 6e4 * this.step, listItems = [];
            for (this.timeCollections = [], this.disableItemCollection = [], start = +this.getDateObject(this.initMin).setMilliseconds(0), 
            end = +this.getDateObject(this.initMax).setMilliseconds(0); end >= start; ) this.timeCollections.push(start), 
            listItems.push(this.globalize.formatDate(new Date(start), {
                format: this.cldrTimeFormat(),
                type: "time"
            })), start += interval;
            var listBaseOptions = {
                itemCreated: function(args) {
                    var eventArgs = {
                        element: args.item,
                        text: args.text,
                        value: _this.getDateObject(args.text),
                        isDisabled: !1
                    };
                    _this.trigger("itemRender", eventArgs), eventArgs.isDisabled && eventArgs.element.classList.add("e-disabled"), 
                    eventArgs.element.classList.contains("e-disabled") && _this.disableItemCollection.push(eventArgs.element.getAttribute("data-value"));
                }
            };
            this.listTag = ListBase.createList(listItems, listBaseOptions, !0), attributes(this.listTag, {
                role: "listbox",
                "aria-hidden": "false",
                id: this.inputElement.id + "_options"
            }), append([ this.listTag ], this.listWrapper);
        }, TimePicker.prototype.documentClickHandler = function(event) {
            Browser.isDevice || event.preventDefault();
            var target = event.target;
            closest(target, "#" + this.popupObj.element.id) || target === this.inputElement || target === (this.inputWrapper && this.inputWrapper.buttons[0]) || target === (this.inputWrapper && this.inputWrapper.container) ? target !== this.inputElement && (Browser.isDevice || (this.isPreventBlur = (Browser.isIE || "edge" === Browser.info.name) && document.activeElement === this.inputElement, 
            event.preventDefault())) : this.isPopupOpen() && this.hide();
        }, TimePicker.prototype.setEnableRtl = function() {
            Input.setEnableRtl(this.enableRtl, [ this.inputWrapper.container ]), this.popupObj && (this.popupObj.enableRtl = this.enableRtl, 
            this.popupObj.dataBind());
        }, TimePicker.prototype.setEnable = function() {
            Input.setEnabled(this.enabled, this.inputElement, this.floatLabelType), this.enabled ? (removeClass([ this.inputWrapper.container ], "e-disabled"), 
            attributes(this.inputElement, {
                "aria-disabled": "false"
            })) : (this.hide(), addClass([ this.inputWrapper.container ], "e-disabled"), attributes(this.inputElement, {
                "aria-disabled": "true"
            }));
        }, TimePicker.prototype.getProperty = function(date, val) {
            "min" === val ? (this.initMin = this.checkDateValue(new Date("" + date.min)), this.setProperties({
                min: this.initMin
            }, !0)) : (this.initMax = this.checkDateValue(new Date("" + date.max)), this.setProperties({
                max: this.initMax
            }, !0)), "" === this.inputElement.value ? this.validateMinMax(this.value, this.min, this.max) : this.checkValue(this.inputElement.value), 
            this.checkValueChange(null, !1);
        }, TimePicker.prototype.focusOut = function() {
            this.isPreventBlur && this.isPopupOpen() ? this.inputElement.focus() : (this.closePopup(), 
            this.inputElement.blur(), this.trigger("blur"), this.getText() !== this.inputElement.value ? this.updateValue(this.inputElement.value, null) : 0 === this.inputElement.value.trim().length && this.resetState(), 
            this.cursorDetails = null, this.isNavigate = !1);
        }, TimePicker.prototype.isPopupOpen = function() {
            return !(!this.popupWrapper || !this.popupWrapper.classList.contains("e-timepicker"));
        }, TimePicker.prototype.focusIn = function() {
            this.inputElement.focus(), this.readonly || Browser.isDevice || this.selectInputText(), 
            this.trigger("focus");
        }, TimePicker.prototype.hide = function() {
            this.closePopup(100);
        }, TimePicker.prototype.show = function() {
            if (!this.isPopupOpen() && this.enabled && !this.readonly && !this.inputWrapper.buttons[0].classList.contains("e-disabled")) {
                this.popupCreation();
                var args = {
                    popup: this.popupObj
                };
                this.trigger("open", args);
                var openAnimation = {
                    name: "FadeIn",
                    duration: 50
                };
                this.popupObj.refreshPosition(this.inputElement), this.popupObj.show(new Animation(openAnimation)), 
                addClass([ this.inputWrapper.container ], [ "e-icon-anim", FOCUS ]), this.setActiveDescendant(), 
                attributes(this.inputElement, {
                    "aria-expanded": "true"
                }), EventHandler.add(document, "mousedown touchstart", this.documentClickHandler, this);
            }
        }, TimePicker.prototype.getPersistData = function() {
            return this.addOnPersist([ "value" ]);
        }, TimePicker.prototype.getModuleName = function() {
            return "timepicker";
        }, TimePicker.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                var prop = _a[_i];
                switch (prop) {
                  case "placeholder":
                    Input.setPlaceholder(newProp.placeholder, this.inputElement), this.inputElement.setAttribute("aria-placeholder", newProp.placeholder);
                    break;

                  case "readonly":
                    Input.setReadonly(this.readonly, this.inputElement, this.floatLabelType), this.readonly && this.hide();
                    break;

                  case "cssClass":
                    addClass([ this.inputWrapper.container ], [ newProp.cssClass ]), this.popupWrapper && addClass([ this.popupWrapper ], [ newProp.cssClass ]), 
                    this.setProperties({
                        cssClass: newProp.cssClass
                    }, !0);
                    break;

                  case "enabled":
                    this.setProperties({
                        enabled: newProp.enabled
                    }, !0), this.setEnable();
                    break;

                  case "enableRtl":
                    this.setProperties({
                        enableRtl: newProp.enableRtl
                    }, !0), this.setEnableRtl();
                    break;

                  case "zIndex":
                    this.setProperties({
                        zIndex: newProp.zIndex
                    }, !0), this.setZIndex();
                    break;

                  case "min":
                  case "max":
                    this.getProperty(newProp, prop);
                    break;

                  case "locale":
                    this.setProperties({
                        locale: newProp.locale
                    }, !0), this.globalize = new Internationalization(this.locale), this.l10n.setLocale(this.locale), 
                    this.updatePlaceHolder(), this.setValue(this.value);
                    break;

                  case "width":
                    setStyleAttribute(this.inputWrapper.container, {
                        width: this.setWidth(newProp.width)
                    }), this.containerStyle = this.inputWrapper.container.getBoundingClientRect();
                    break;

                  case "format":
                    this.setProperties({
                        format: newProp.format
                    }, !0), this.setValue(this.value);
                    break;

                  case "value":
                    newProp.value = this.checkDateValue(new Date("" + newProp.value)), this.initValue = newProp.value, 
                    this.setProperties({
                        value: isNullOrUndefined(this.checkValue(newProp.value)) ? null : newProp.value
                    }, !0), this.checkValueChange(null, !1);
                    break;

                  case "strictMode":
                    newProp.strictMode && this.checkErrorState(null), this.setProperties({
                        strictMode: newProp.strictMode
                    }, !0), this.checkValue(this.inputElement.value), this.checkValueChange(null, !1);
                    break;

                  case "scrollTo":
                    this.checkDateValue(newProp.scrollTo) ? (this.popupWrapper && this.setScrollTo(), 
                    this.setProperties({
                        scrollTo: newProp.scrollTo
                    }, !0)) : this.setProperties({
                        scrollTo: null
                    });
                }
            }
        }, __decorate$17([ Property(null) ], TimePicker.prototype, "width", void 0), __decorate$17([ Property(null) ], TimePicker.prototype, "cssClass", void 0), 
        __decorate$17([ Property(!1) ], TimePicker.prototype, "strictMode", void 0), __decorate$17([ Property(null) ], TimePicker.prototype, "format", void 0), 
        __decorate$17([ Property(!0) ], TimePicker.prototype, "enabled", void 0), __decorate$17([ Property(!1) ], TimePicker.prototype, "readonly", void 0), 
        __decorate$17([ Property("Never") ], TimePicker.prototype, "floatLabelType", void 0), 
        __decorate$17([ Property(null) ], TimePicker.prototype, "placeholder", void 0), 
        __decorate$17([ Property(1e3) ], TimePicker.prototype, "zIndex", void 0), __decorate$17([ Property(!0) ], TimePicker.prototype, "showClearButton", void 0), 
        __decorate$17([ Property(30) ], TimePicker.prototype, "step", void 0), __decorate$17([ Property(null) ], TimePicker.prototype, "scrollTo", void 0), 
        __decorate$17([ Property(null) ], TimePicker.prototype, "value", void 0), __decorate$17([ Property(null) ], TimePicker.prototype, "min", void 0), 
        __decorate$17([ Property(null) ], TimePicker.prototype, "max", void 0), __decorate$17([ Property(!1) ], TimePicker.prototype, "enableRtl", void 0), 
        __decorate$17([ Event() ], TimePicker.prototype, "change", void 0), __decorate$17([ Event() ], TimePicker.prototype, "created", void 0), 
        __decorate$17([ Event() ], TimePicker.prototype, "destroyed", void 0), __decorate$17([ Event() ], TimePicker.prototype, "open", void 0), 
        __decorate$17([ Event() ], TimePicker.prototype, "itemRender", void 0), __decorate$17([ Event() ], TimePicker.prototype, "close", void 0), 
        __decorate$17([ Event() ], TimePicker.prototype, "blur", void 0), __decorate$17([ Event() ], TimePicker.prototype, "focus", void 0), 
        TimePicker = __decorate$17([ NotifyPropertyChanges ], TimePicker);
    }(Component), __extends$17 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$16 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, DAY = new Date().getDate(), MONTH$1 = new Date().getMonth(), YEAR$1 = new Date().getFullYear(), HOUR = new Date().getHours(), MINUTE = new Date().getMinutes(), SECOND = new Date().getSeconds(), MILLISECOND = new Date().getMilliseconds(), ROOT$5 = "e-datetimepicker", LISTCLASS$1 = cssClass.li, DateTimePicker = function(_super) {
        function DateTimePicker(options, element) {
            var _this = _super.call(this, options, element) || this;
            return _this.valueWithMinutes = null, _this.previousDateTime = null, _this;
        }
        return __extends$17(DateTimePicker, _super), DateTimePicker.prototype.focusIn = function() {
            this.inputElement.focus(), addClass([ this.inputWrapper.container ], "e-input-focus");
        }, DateTimePicker.prototype.focusOut = function() {
            this.isTimePopupOpen() ? this.inputElement.focus() : (this.inputElement.blur(), 
            removeClass([ this.inputWrapper.container ], "e-input-focus"), this.closePopup());
        }, DateTimePicker.prototype.destroy = function() {
            this.popupObject && this.popupObject.element.classList.contains("e-popup") && (this.dateTimeWrapper = void 0, 
            this.liCollections = this.timeCollections = [], isNullOrUndefined(this.rippleFn) || this.rippleFn());
            var ariaAttribute = {
                "aria-live": "assertive",
                "aria-atomic": "true",
                "aria-haspopup": "true",
                "aria-activedescendant": "null",
                "aria-owns": this.inputElement.id + "_options",
                "aria-expanded": "false",
                role: "combobox",
                autocomplete: "off"
            };
            Input.removeAttributes(ariaAttribute, this.inputElement), this.isCalendar() && (detach(this.popupWrapper), 
            this.popupObject = this.popupWrapper = null, this.keyboardHandler.destroy()), this.unBindInputEvents(), 
            this.inputWrapper.container.parentElement.appendChild(this.cloneElement), removeClass([ this.inputElement ], [ ROOT$5, "e-rtl" ]), 
            removeClass([ this.cloneElement ], [ ROOT$5, "e-control" ]), removeClass([ this.inputWrapper.container ], "e-date-wrapper"), 
            remove(this.inputWrapper.container);
        }, DateTimePicker.prototype.render = function() {
            this.timekeyConfigure = {
                enter: "enter",
                escape: "escape",
                end: "end",
                tab: "tab",
                home: "home",
                down: "downarrow",
                up: "uparrow",
                left: "leftarrow",
                right: "rightarrow",
                open: "alt+downarrow",
                close: "alt+uparrow"
            }, this.valueWithMinutes = null, this.previousDateTime = null, this.cloneElement = this.element.cloneNode(!0), 
            this.dateTimeFormat = this.cldrDateTimeFormat(), this.initValue = this.value, this.checkAttributes();
            var localeText = {
                placeholder: this.placeholder
            };
            this.l10n = new L10n("datetimepicker", localeText, this.locale), this.setProperties({
                placeholder: this.placeholder || this.l10n.getConstant("placeholder")
            }, !0), _super.prototype.render.call(this), this.createInputElement(), this.bindInputEvents(), 
            this.setValue();
        }, DateTimePicker.prototype.setValue = function() {
            if (this.initValue = this.validateMinMaxRange(this.value), !this.strictMode && this.isDateObject(this.initValue)) {
                var value = this.validateMinMaxRange(this.initValue);
                this.inputElement.value = this.getFormattedValue(value), this.setProperties({
                    value: value
                }, !0);
            } else isNullOrUndefined(this.value) && (this.initValue = null, this.setProperties({
                value: null
            }, !0));
            this.valueWithMinutes = this.value, _super.prototype.updateInput.call(this);
        }, DateTimePicker.prototype.validateMinMaxRange = function(value) {
            var result = value;
            return this.isDateObject(value) ? result = this.validateValue(value) : +this.min > +this.max && this.disablePopupButton(!0), 
            this.checkValidState(result), result;
        }, DateTimePicker.prototype.checkValidState = function(value) {
            this.isValidState = !0, this.strictMode || (+value > +this.max || +value < +this.min) && (this.isValidState = !1), 
            this.checkErrorState();
        }, DateTimePicker.prototype.checkErrorState = function() {
            this.isValidState ? removeClass([ this.inputWrapper.container ], "e-error") : addClass([ this.inputWrapper.container ], "e-error"), 
            attributes(this.inputElement, {
                "aria-invalid": this.isValidState ? "false" : "true"
            });
        }, DateTimePicker.prototype.validateValue = function(value) {
            var dateVal = value;
            return this.strictMode ? +this.min > +this.max ? (this.disablePopupButton(!0), dateVal = this.max) : +value < +this.min ? dateVal = this.min : +value > +this.max && (dateVal = this.max) : +this.min > +this.max && (this.disablePopupButton(!0), 
            dateVal = value), dateVal;
        }, DateTimePicker.prototype.disablePopupButton = function(isDisable) {
            isDisable ? (addClass([ this.inputWrapper.buttons[0], this.timeIcon ], "e-disabled"), 
            this.hide()) : removeClass([ this.inputWrapper.buttons[0], this.timeIcon ], "e-disabled");
        }, DateTimePicker.prototype.getFormattedValue = function(value) {
            if (isNullOrUndefined(value)) return null;
            var dateOptions = {
                format: this.cldrDateTimeFormat(),
                type: "dateTime",
                skeleton: "yMd"
            };
            return this.globalize.formatDate(value, dateOptions);
        }, DateTimePicker.prototype.isDateObject = function(value) {
            return !isNullOrUndefined(value) && !isNaN(+value);
        }, DateTimePicker.prototype.createInputElement = function() {
            removeClass([ this.inputElement ], "e-datepicker"), removeClass([ this.inputWrapper.container ], "e-date-wrapper"), 
            addClass([ this.inputWrapper.container ], "e-datetime-wrapper"), addClass([ this.inputElement ], ROOT$5), 
            this.renderTimeIcon();
        }, DateTimePicker.prototype.renderTimeIcon = function() {
            this.timeIcon = Input.appendSpan("e-input-group-icon e-time-icon e-icons", this.inputWrapper.container);
        }, DateTimePicker.prototype.bindInputEvents = function() {
            EventHandler.add(this.timeIcon, "mousedown touchstart", this.timeHandler, this), 
            EventHandler.add(this.inputWrapper.buttons[0], "mousedown touchstart", this.dateHandler, this), 
            EventHandler.add(this.inputElement, "blur", this.focusOut, this), EventHandler.add(this.inputElement, "focus", this.focusIn, this), 
            this.keyboardHandler = new KeyboardEvents(this.inputElement, {
                eventName: "keydown",
                keyAction: this.inputKeyAction.bind(this),
                keyConfigs: this.keyConfigs
            });
        }, DateTimePicker.prototype.unBindInputEvents = function() {
            EventHandler.remove(this.timeIcon, "mousedown touchstart", this.timeHandler), EventHandler.remove(this.inputWrapper.buttons[0], "mousedown touchstart", this.dateHandler), 
            EventHandler.remove(this.inputElement, "blur", this.focusOut), EventHandler.remove(this.inputElement, "focus", this.focusIn), 
            this.keyboardHandler && this.keyboardHandler.destroy();
        }, DateTimePicker.prototype.cldrTimeFormat = function() {
            return this.isNullOrEmpty(this.timeFormat) ? "en" === this.locale || "en-US" === this.locale ? getValue("timeFormats.short", getDefaultDateObject()) : this.getCultureTimeObject(cldrData, "" + this.locale) : this.timeFormat;
        }, DateTimePicker.prototype.cldrDateTimeFormat = function() {
            var dateFormat = new Internationalization(this.locale).getDatePattern({
                skeleton: "yMd"
            });
            return this.isNullOrEmpty(this.format) ? dateFormat + " " + this.getCldrFormat("time") : this.format;
        }, DateTimePicker.prototype.getCldrFormat = function(type) {
            return "en" === this.locale || "en-US" === this.locale ? getValue("timeFormats.short", getDefaultDateObject()) : this.getCultureTimeObject(cldrData, "" + this.locale);
        }, DateTimePicker.prototype.isNullOrEmpty = function(value) {
            return !!(isNullOrUndefined(value) || "string" == typeof value && "" === value.trim());
        }, DateTimePicker.prototype.getCultureTimeObject = function(ld, c) {
            return getValue("main." + this.locale + ".dates.calendars.gregorian.timeFormats.short", ld);
        }, DateTimePicker.prototype.timeHandler = function(e) {
            e.currentTarget === this.timeIcon && e.preventDefault(), this.enabled && !this.readonly && (_super.prototype.hide.call(this), 
            this.isTimePopupOpen() ? this.closePopup() : (Browser.isDevice || this.inputElement.focus(), 
            this.popupCreation("time")));
        }, DateTimePicker.prototype.dateHandler = function(e) {
            "datetimepicker" === this.getModuleName() && e.currentTarget === this.inputWrapper.buttons[0] && e.preventDefault(), 
            this.enabled && !this.readonly && (this.closePopup(), isNullOrUndefined(this.popupWrapper) || this.popupCreation("date"));
        }, DateTimePicker.prototype.show = function(type) {
            "time" === type ? (this.isDatePopupOpen() && this.hide(), this.popupCreation("time")) : (this.isTimePopupOpen() && this.hide(), 
            _super.prototype.show.call(this), this.popupCreation("date")), this.trigger("open");
        }, DateTimePicker.prototype.toggle = function() {
            this.isDatePopupOpen() ? (_super.prototype.hide.call(this), this.popupCreation("time")) : this.isTimePopupOpen() ? (this.hide(), 
            _super.prototype.show.call(this), this.popupCreation("date")) : this.show();
        }, DateTimePicker.prototype.listCreation = function() {
            var value = isNullOrUndefined(this.value) ? "" !== this.inputElement.value ? this.globalize.parseDate(this.inputElement.value, {
                format: this.cldrDateTimeFormat(),
                type: "datetime"
            }) : new Date() : this.value;
            this.valueWithMinutes = value, this.listWrapper = createElement("div", {
                className: "e-content",
                attrs: {
                    tabindex: "0"
                }
            });
            var min = this.startTime(value), max = this.endTime(value), listDetails = TimePickerBase.createListItems(min, max, this.globalize, this.cldrTimeFormat(), this.step);
            this.timeCollections = listDetails.collection, this.listTag = listDetails.list, 
            attributes(this.listTag, {
                role: "listbox",
                "aria-hidden": "false",
                id: this.inputElement.id + "_options"
            }), append([ listDetails.list ], this.listWrapper), this.wireTimeListEvents();
            var rippleModel = {
                duration: 300,
                selector: "." + LISTCLASS$1
            };
            this.rippleFn = rippleEffect(this.listWrapper, rippleModel), this.liCollections = this.listWrapper.querySelectorAll("." + LISTCLASS$1);
        }, DateTimePicker.prototype.popupCreation = function(type) {
            "date" === type ? (addClass([ this.popupWrapper ], "e-datetimepopup-wrapper"), attributes(this.popupWrapper, {
                id: this.inputElement.id + "_datepopup"
            }), this.trigger("open", this.popupWrapper)) : (this.dateTimeWrapper = createElement("div", {
                className: ROOT$5 + " e-popup",
                attrs: {
                    id: this.inputElement.id + "_timepopup",
                    style: "visibility:hidden ; display:block"
                }
            }), isNullOrUndefined(this.cssClass) || this.dateTimeWrapper.classList.add(this.cssClass), 
            !isNullOrUndefined(this.step) && this.step > 0 && (this.listCreation(), append([ this.listWrapper ], this.dateTimeWrapper)), 
            document.body.appendChild(this.dateTimeWrapper), this.addTimeSelection(), this.renderPopup(), 
            this.setTimeScrollPosition(), this.openPopup(), this.popupObject.refreshPosition(this.inputElement));
        }, DateTimePicker.prototype.openPopup = function() {
            this.trigger("open");
            var openAnimation = {
                name: "FadeIn",
                duration: 100
            };
            this.popupObject.show(new Animation(openAnimation)), addClass([ this.inputWrapper.container ], [ "e-icon-anim", "e-input-focus" ]), 
            attributes(this.inputElement, {
                "aria-expanded": "true"
            }), EventHandler.add(document, "mousedown touchstart", this.documentClickHandler, this);
        }, DateTimePicker.prototype.documentClickHandler = function(event) {
            var target = event.target;
            closest(target, "#" + (this.popupObject && this.popupObject.element.id)) || target === this.inputElement || target === this.timeIcon || target === this.inputWrapper.container || this.isTimePopupOpen() && this.hide();
        }, DateTimePicker.prototype.isTimePopupOpen = function() {
            return !(!this.dateTimeWrapper || !this.dateTimeWrapper.classList.contains("" + ROOT$5));
        }, DateTimePicker.prototype.isDatePopupOpen = function() {
            return !(!this.popupWrapper || !this.popupWrapper.classList.contains("e-datetimepopup-wrapper"));
        }, DateTimePicker.prototype.renderPopup = function() {
            var _this = this;
            this.containerStyle = this.inputWrapper.container.getBoundingClientRect(), Browser.isDevice && (this.timeModal = createElement("div"), 
            this.timeModal.className = ROOT$5 + " e-time-modal", document.body.className += " e-time-overflow", 
            this.timeModal.style.display = "block", document.body.appendChild(this.timeModal));
            this.popupObject = new Popup(this.dateTimeWrapper, {
                width: this.setPopupWidth(),
                zIndex: this.zIndex,
                targetType: "container",
                collision: Browser.isDevice ? {
                    X: "fit",
                    Y: "fit"
                } : {
                    X: "flip",
                    Y: "flip"
                },
                relateTo: Browser.isDevice ? document.body : this.inputWrapper.container,
                position: Browser.isDevice ? {
                    X: "center",
                    Y: "center"
                } : {
                    X: "left",
                    Y: "bottom"
                },
                enableRtl: this.enableRtl,
                offsetY: 4,
                open: function() {
                    _this.dateTimeWrapper.style.visibility = "visible", addClass([ _this.timeIcon ], "e-active"), 
                    Browser.isDevice || (_this.inputEvent = new KeyboardEvents(_this.inputWrapper.container, {
                        keyAction: _this.TimeKeyActionHandle.bind(_this),
                        keyConfigs: _this.timekeyConfigure,
                        eventName: "keydown"
                    }));
                },
                close: function() {
                    removeClass([ _this.timeIcon ], "e-active"), _this.unWireTimeListEvents(), _this.inputElement.setAttribute("aria-activedescendant", "null"), 
                    remove(_this.popupObject.element), _this.popupObject.destroy(), _this.dateTimeWrapper.innerHTML = "", 
                    _this.listWrapper = _this.dateTimeWrapper = null, _this.inputEvent && _this.inputEvent.destroy();
                }
            }), this.popupObject.element.style.maxHeight = "250px";
        }, DateTimePicker.prototype.setDimension = function(width) {
            return width = "number" == typeof width ? formatUnit(width) : "string" == typeof width ? width : "100%";
        }, DateTimePicker.prototype.setPopupWidth = function() {
            var width = this.setDimension(this.width);
            if (width.indexOf("%") > -1) {
                width = (this.containerStyle.width * parseFloat(width) / 100).toString() + "px";
            }
            return width;
        }, DateTimePicker.prototype.wireTimeListEvents = function() {
            EventHandler.add(this.listWrapper, "click", this.onMouseClick, this), Browser.isDevice || (EventHandler.add(this.listWrapper, "mouseover", this.onMouseOver, this), 
            EventHandler.add(this.listWrapper, "mouseout", this.onMouseLeave, this));
        }, DateTimePicker.prototype.unWireTimeListEvents = function() {
            this.listWrapper && (EventHandler.remove(this.listWrapper, "click", this.onMouseClick), 
            EventHandler.remove(document, "mousedown touchstart", this.documentClickHandler), 
            Browser.isDevice || (EventHandler.add(this.listWrapper, "mouseover", this.onMouseOver, this), 
            EventHandler.add(this.listWrapper, "mouseout", this.onMouseLeave, this)));
        }, DateTimePicker.prototype.onMouseOver = function(event) {
            var currentLi = closest(event.target, "." + LISTCLASS$1);
            this.setTimeHover(currentLi, "e-hover");
        }, DateTimePicker.prototype.onMouseLeave = function() {
            this.removeTimeHover("e-hover");
        }, DateTimePicker.prototype.setTimeHover = function(li, className) {
            this.enabled && this.isValidLI(li) && !li.classList.contains(className) && (this.removeTimeHover(className), 
            addClass([ li ], className));
        }, DateTimePicker.prototype.getPopupHeight = function() {
            var height = parseInt("250px", 10), popupHeight = this.dateTimeWrapper.getBoundingClientRect().height;
            return popupHeight > height ? height : popupHeight;
        }, DateTimePicker.prototype.changeEvent = function() {
            +this.previousDateTime != +this.value && (_super.prototype.changeEvent.call(this), 
            Browser.isDevice || this.inputElement.focus(), this.valueWithMinutes = this.value, 
            this.setInputValue("date"));
        }, DateTimePicker.prototype.updateValue = function() {
            this.setInputValue("time"), +this.previousDateTime != +this.value && (this.changedArgs.value = this.value, 
            this.addTimeSelection(), this.trigger("change", this.changedArgs), this.previousDateTime = this.value);
        }, DateTimePicker.prototype.setTimeScrollPosition = function() {
            var popupElement, popupHeight = this.getPopupHeight();
            if (popupElement = this.selectedElement, !isNullOrUndefined(popupElement)) {
                var nextEle = popupElement.nextElementSibling, height = nextEle ? nextEle.offsetTop : popupElement.offsetTop, liHeight = popupElement.getBoundingClientRect().height;
                height + popupElement.offsetTop > popupHeight ? this.dateTimeWrapper.scrollTop = nextEle ? height - (popupHeight / 2 + liHeight / 2) : height : this.dateTimeWrapper.scrollTop = 0;
            }
        }, DateTimePicker.prototype.setInputValue = function(type) {
            "date" === type ? (this.inputElement.value = this.getFormattedValue(this.getFullDateTime()), 
            this.setProperties({
                value: this.getFullDateTime()
            }, !0)) : (this.inputElement.value = this.getFormattedValue(new Date(this.timeCollections[this.activeIndex])), 
            this.setProperties({
                value: new Date(this.timeCollections[this.activeIndex])
            }, !0));
        }, DateTimePicker.prototype.getFullDateTime = function() {
            var value = null;
            return value = this.isDateObject(this.valueWithMinutes) ? this.combineDateTime(this.valueWithMinutes) : this.previousDate, 
            this.validateMinMaxRange(value);
        }, DateTimePicker.prototype.combineDateTime = function(value) {
            if (this.isDateObject(value)) {
                var day = this.previousDate.getDate(), month = this.previousDate.getMonth(), year = this.previousDate.getFullYear(), hour = value.getHours(), minutes = value.getMinutes(), seconds = value.getSeconds();
                return new Date(year, month, day, hour, minutes, seconds);
            }
            return this.previousDate;
        }, DateTimePicker.prototype.onMouseClick = function(event) {
            var target = event.target, li = this.selectedElement = closest(target, "." + LISTCLASS$1);
            li && li.classList.contains(LISTCLASS$1) && (this.timeValue = li.getAttribute("data-value"), 
            this.hide()), this.setSelection(li, event);
        }, DateTimePicker.prototype.setSelection = function(li, event) {
            if (this.isValidLI(li) && !li.classList.contains("e-active")) {
                li.getAttribute("data-value");
                this.selectedElement = li;
                var index = Array.prototype.slice.call(this.liCollections).indexOf(li);
                this.activeIndex = index, this.valueWithMinutes = new Date(this.timeCollections[this.activeIndex]), 
                addClass([ this.selectedElement ], "e-active"), this.selectedElement.setAttribute("aria-selected", "true"), 
                this.updateValue();
            }
        }, DateTimePicker.prototype.setTimeActiveClass = function() {
            var collections = isNullOrUndefined(this.dateTimeWrapper) ? this.listWrapper : this.dateTimeWrapper;
            if (!isNullOrUndefined(collections)) {
                var items = collections.querySelectorAll("." + LISTCLASS$1);
                if (items.length) for (var i = 0; i < items.length; i++) if (this.timeCollections[i] === +this.valueWithMinutes) {
                    items[i].setAttribute("aria-selected", "true"), this.selectedElement = items[i], 
                    this.activeIndex = i, this.setTimeActiveDescendant();
                    break;
                }
            }
        }, DateTimePicker.prototype.setTimeActiveDescendant = function() {
            isNullOrUndefined(this.selectedElement) ? attributes(this.inputElement, {
                "aria-activedescendant": "null"
            }) : attributes(this.inputElement, {
                "aria-activedescendant": this.selectedElement.getAttribute("id")
            });
        }, DateTimePicker.prototype.addTimeSelection = function() {
            this.selectedElement = null, this.removeTimeSelection(), this.setTimeActiveClass(), 
            isNullOrUndefined(this.selectedElement) || (addClass([ this.selectedElement ], "e-active"), 
            this.selectedElement.setAttribute("aria-selected", "true"));
        }, DateTimePicker.prototype.removeTimeSelection = function() {
            if (this.removeTimeHover("e-hover"), !isNullOrUndefined(this.dateTimeWrapper)) {
                var items = this.dateTimeWrapper.querySelectorAll(".e-active");
                items.length && (removeClass(items, "e-active"), items[0].removeAttribute("aria-selected"));
            }
        }, DateTimePicker.prototype.removeTimeHover = function(className) {
            var hoveredItem = this.getTimeHoverItem(className);
            hoveredItem && hoveredItem.length && removeClass(hoveredItem, className);
        }, DateTimePicker.prototype.getTimeHoverItem = function(className) {
            var hoveredItem, collections = isNullOrUndefined(this.dateTimeWrapper) ? this.listWrapper : this.dateTimeWrapper;
            return isNullOrUndefined(collections) || (hoveredItem = collections.querySelectorAll("." + className)), 
            hoveredItem;
        }, DateTimePicker.prototype.isValidLI = function(li) {
            return li && li.classList.contains(LISTCLASS$1) && !li.classList.contains("e-disabled");
        }, DateTimePicker.prototype.calculateStartEnd = function(value, range, method) {
            var day = value.getDate(), month = value.getMonth(), year = value.getFullYear(), hours = value.getHours(), minutes = value.getMinutes(), seconds = value.getSeconds(), milliseconds = value.getMilliseconds();
            return range ? "starttime" === method ? new Date(year, month, day, 0, 0, 0) : new Date(year, month, day, 23, 59, 59) : new Date(year, month, day, hours, minutes, seconds, milliseconds);
        }, DateTimePicker.prototype.startTime = function(date) {
            var tempStartValue, start, value, tempMin = this.min;
            return +(value = null === date ? new Date() : date).getDate() == +tempMin.getDate() && +value.getMonth() == +tempMin.getMonth() && +value.getFullYear() == +tempMin.getFullYear() || +new Date(value.getFullYear(), value.getMonth(), value.getDate()) <= +new Date(tempMin.getFullYear(), tempMin.getMonth(), tempMin.getDate()) ? (start = !1, 
            tempStartValue = this.min) : +value < +this.max && +value > +this.min ? (start = !0, 
            tempStartValue = value) : +value >= +this.max && (start = !0, tempStartValue = this.max), 
            this.calculateStartEnd(tempStartValue, start, "starttime");
        }, DateTimePicker.prototype.endTime = function(date) {
            var tempEndValue, end, value, tempMax = this.max;
            return +(value = null === date ? new Date() : date).getDate() == +tempMax.getDate() && +value.getMonth() == +tempMax.getMonth() && +value.getFullYear() == +tempMax.getFullYear() || +new Date(value.getUTCFullYear(), value.getMonth(), value.getDate()) >= +new Date(tempMax.getFullYear(), tempMax.getMonth(), tempMax.getDate()) ? (end = !1, 
            tempEndValue = this.max) : +value < +this.max && +value > +this.min ? (end = !0, 
            tempEndValue = value) : +value <= +this.min && (end = !0, tempEndValue = this.min), 
            this.calculateStartEnd(tempEndValue, end, "endtime");
        }, DateTimePicker.prototype.hide = function() {
            this.isDatePopupOpen() ? _super.prototype.hide.call(this) : this.isTimePopupOpen() && (this.closePopup(), 
            removeClass([ document.body ], "e-time-overflow"), Browser.isDevice && this.timeModal && (this.timeModal.style.display = "none", 
            this.timeModal.outerHTML = "", this.timeModal = null), this.setTimeActiveDescendant()), 
            this.trigger("close");
        }, DateTimePicker.prototype.closePopup = function() {
            if (this.isTimePopupOpen() && this.popupObject) {
                var animModel = {
                    name: "FadeOut",
                    duration: 100,
                    delay: 0
                };
                this.popupObject.hide(new Animation(animModel)), this.inputWrapper.container.classList.remove("e-icon-anim"), 
                attributes(this.inputElement, {
                    "aria-expanded": "false"
                }), EventHandler.remove(document, "mousedown touchstart", this.documentClickHandler);
            }
            Browser.isDevice && removeClass([ this.inputWrapper.container ], "e-input-focus");
        }, DateTimePicker.prototype.preRender = function() {
            _super.prototype.preRender.call(this);
        }, DateTimePicker.prototype.getProperty = function(date, val) {
            "min" === val ? this.setProperties({
                min: this.validateValue(date.min)
            }, !0) : this.setProperties({
                max: this.validateValue(date.max)
            }, !0);
        }, DateTimePicker.prototype.checkAttributes = function() {
            for (var value, _i = 0, attributes_1 = [ "style", "name", "step", "disabled", "readonly", "value", "min", "max", "placeholder", "type" ]; _i < attributes_1.length; _i++) {
                var prop = attributes_1[_i];
                if (!isNullOrUndefined(this.inputElement.getAttribute(prop))) switch (prop) {
                  case "name":
                    this.inputElement.setAttribute("name", this.inputElement.getAttribute(prop));
                    break;

                  case "step":
                    this.step = parseInt(this.inputElement.getAttribute(prop), 10);
                    break;

                  case "readonly":
                    var readonly = !isNullOrUndefined(this.inputElement.getAttribute(prop));
                    this.setProperties({
                        readonly: readonly
                    }, !0);
                    break;

                  case "placeholder":
                    this.placeholder = this.inputElement.getAttribute(prop);
                    break;

                  case "min":
                    value = new Date(this.inputElement.getAttribute(prop)), this.isNullOrEmpty(value) || isNaN(+value) || this.setProperties({
                        min: value
                    }, !0);
                    break;

                  case "disabled":
                    var enabled = isNullOrUndefined(this.inputElement.getAttribute(prop));
                    this.setProperties({
                        enabled: enabled
                    }, !0);
                    break;

                  case "max":
                    value = new Date(this.inputElement.getAttribute(prop)), this.isNullOrEmpty(value) || isNaN(+value) || this.setProperties({
                        max: value
                    }, !0);
                    break;

                  case "type":
                    "text" !== this.inputElement.getAttribute(prop) && this.inputElement.setAttribute("type", "text");
                }
            }
        }, DateTimePicker.prototype.getTimeActiveElement = function() {
            return isNullOrUndefined(this.dateTimeWrapper) ? null : this.dateTimeWrapper.querySelectorAll(".e-active");
        }, DateTimePicker.prototype.createDateObj = function(val) {
            return val instanceof Date ? val : null;
        }, DateTimePicker.prototype.getDateObject = function(text) {
            if (!this.isNullOrEmpty(text)) {
                var dateValue = this.createDateObj(text), value = this.valueWithMinutes, status_1 = !isNullOrUndefined(value);
                if (this.checkDateValue(dateValue)) {
                    var date = status_1 ? value.getDate() : DAY, month = status_1 ? value.getMonth() : MONTH$1, year = status_1 ? value.getFullYear() : YEAR$1, hour = status_1 ? value.getHours() : HOUR, minute = status_1 ? value.getMinutes() : MINUTE, second = status_1 ? value.getSeconds() : SECOND, millisecond = status_1 ? value.getMilliseconds() : MILLISECOND;
                    return new Date(year, month, date, hour, minute, second, millisecond);
                }
            }
            return null;
        }, DateTimePicker.prototype.findNextTimeElement = function(event) {
            var textVal = this.inputElement.value, value = isNullOrUndefined(this.valueWithMinutes) ? this.createDateObj(textVal) : this.getDateObject(this.valueWithMinutes), dateTimeVal = null, listCount = this.liCollections.length;
            if (!isNullOrUndefined(this.checkDateValue(value)) || !isNullOrUndefined(this.activeIndex)) {
                if ("home" === event.action) dateTimeVal = +this.createDateObj(new Date(this.timeCollections[0])), 
                this.activeIndex = 0; else if ("end" === event.action) dateTimeVal = +this.createDateObj(new Date(this.timeCollections[this.timeCollections.length - 1])), 
                this.activeIndex = this.timeCollections.length - 1; else if ("down" === event.action) {
                    for (var i = 0; i < listCount; i++) if (+value < this.timeCollections[i]) {
                        dateTimeVal = +this.createDateObj(new Date(this.timeCollections[i])), this.activeIndex = i;
                        break;
                    }
                } else for (i = listCount - 1; i >= 0; i--) if (+value > this.timeCollections[i]) {
                    dateTimeVal = +this.createDateObj(new Date(this.timeCollections[i])), this.activeIndex = i;
                    break;
                }
                this.selectedElement = this.liCollections[this.activeIndex], this.timeElementValue(isNullOrUndefined(dateTimeVal) ? null : new Date(dateTimeVal));
            }
        }, DateTimePicker.prototype.setTimeValue = function(date, value) {
            var time, val = this.validateMinMaxRange(value), newval = this.createDateObj(val);
            this.getFormattedValue(newval) !== (isNullOrUndefined(this.value) ? null : this.getFormattedValue(this.value)) ? (this.valueWithMinutes = isNullOrUndefined(newval) ? null : newval, 
            time = new Date(+this.valueWithMinutes)) : (this.strictMode && (date = newval), 
            this.valueWithMinutes = this.checkDateValue(date), time = new Date(+this.valueWithMinutes));
            var dateString = this.globalize.formatDate(time, {
                format: isNullOrUndefined(this.format) ? this.cldrDateTimeFormat() : this.format,
                type: "dateTime",
                skeleton: "yMd"
            });
            return !this.strictMode && isNullOrUndefined(time), Input.setValue(dateString, this.inputElement, this.floatLabelType, !1), 
            time;
        }, DateTimePicker.prototype.timeElementValue = function(value) {
            if (!isNullOrUndefined(this.checkDateValue(value)) && !this.isNullOrEmpty(value)) {
                var date = value instanceof Date ? value : this.getDateObject(value);
                return this.setTimeValue(date, value);
            }
            return null;
        }, DateTimePicker.prototype.timeKeyHandler = function(event) {
            if (!(isNullOrUndefined(this.step) || this.step <= 0)) {
                var listCount = this.timeCollections.length;
                if (isNullOrUndefined(this.getTimeActiveElement()) || 0 === this.getTimeActiveElement().length) this.liCollections.length > 0 && (isNullOrUndefined(this.value) && isNullOrUndefined(this.activeIndex) ? (this.activeIndex = 0, 
                this.selectedElement = this.liCollections[0], this.timeElementValue(new Date(this.timeCollections[0]))) : this.findNextTimeElement(event)); else {
                    var nextItemValue = void 0;
                    if (event.keyCode >= 37 && event.keyCode <= 40) {
                        var index = 40 === event.keyCode || 39 === event.keyCode ? ++this.activeIndex : --this.activeIndex;
                        this.activeIndex = index = this.activeIndex === listCount ? 0 : this.activeIndex, 
                        this.activeIndex = index = this.activeIndex < 0 ? listCount - 1 : this.activeIndex, 
                        nextItemValue = isNullOrUndefined(this.timeCollections[index]) ? this.timeCollections[0] : this.timeCollections[index];
                    } else "home" === event.action ? (this.activeIndex = 0, nextItemValue = this.timeCollections[0]) : "end" === event.action && (this.activeIndex = listCount - 1, 
                    nextItemValue = this.timeCollections[listCount - 1]);
                    this.selectedElement = this.liCollections[this.activeIndex], this.timeElementValue(new Date(nextItemValue));
                }
                this.isNavigate = !0, this.setTimeHover(this.selectedElement, "e-navigation"), this.setTimeActiveDescendant(), 
                !this.isTimePopupOpen() || null === this.selectedElement || event && "click" === event.type || this.setTimeScrollPosition();
            }
        }, DateTimePicker.prototype.TimeKeyActionHandle = function(event) {
            if (this.enabled) switch ("right" !== event.action && "left" !== event.action && "tab" !== event.action && event.preventDefault(), 
            event.action) {
              case "up":
              case "down":
              case "home":
              case "end":
                this.timeKeyHandler(event);
                break;

              case "enter":
                this.isNavigate ? (this.selectedElement = this.liCollections[this.activeIndex], 
                this.valueWithMinutes = new Date(this.timeCollections[this.activeIndex]), this.updateValue()) : this.updateValue(), 
                this.hide(), addClass([ this.inputWrapper.container ], "e-input-focus"), this.isNavigate = !1;
                break;

              case "escape":
                this.hide();
                break;

              default:
                this.isNavigate = !1;
            }
        }, DateTimePicker.prototype.inputKeyAction = function(event) {
            switch (event.action) {
              case "altDownArrow":
                this.strictModeUpdate(), this.updateInput(), this.toggle();
            }
        }, DateTimePicker.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                var prop = _a[_i];
                switch (prop) {
                  case "zIndex":
                    this.setProperties({
                        zIndex: newProp.zIndex
                    }, !0);
                    break;

                  case "value":
                    newProp.value = this.validateValue(newProp.value), this.inputElement.value = this.getFormattedValue(newProp.value), 
                    this.valueWithMinutes = newProp.value, this.setProperties({
                        value: newProp.value
                    }, !0), this.previousDateTime = new Date(this.inputElement.value), this.updateInput();
                    break;

                  case "min":
                  case "max":
                    this.getProperty(newProp, prop), this.updateInput();
                    break;

                  case "enableRtl":
                    Input.setEnableRtl(this.enableRtl, [ this.inputWrapper.container ]);
                    break;

                  case "cssClass":
                    Input.setCssClass(newProp.cssClass, [ this.inputWrapper.container ]), this.dateTimeWrapper && addClass([ this.dateTimeWrapper ], [ newProp.cssClass ]);
                    break;

                  case "locale":
                    this.globalize = new Internationalization(this.locale), this.l10n.setLocale(this.locale), 
                    this.setProperties({
                        placeholder: this.l10n.getConstant("placeholder")
                    }, !0), Input.setPlaceholder(this.l10n.getConstant("placeholder"), this.inputElement), 
                    this.dateTimeFormat = this.cldrDateTimeFormat(), _super.prototype.updateInput.call(this);
                    break;

                  case "format":
                    this.setProperties({
                        format: newProp.format
                    }, !0), this.setValue();
                    break;

                  case "placeholder":
                    Input.setPlaceholder(newProp.placeholder, this.inputElement), this.inputElement.setAttribute("aria-placeholder", newProp.placeholder);
                    break;

                  case "enabled":
                    Input.setEnabled(this.enabled, this.inputElement), this.bindEvents();
                    break;

                  case "strictMode":
                    this.updateInput();
                    break;

                  case "width":
                    this.setWidth(newProp.width);
                    break;

                  case "readonly":
                    Input.setReadonly(this.readonly, this.inputElement);
                    break;

                  default:
                    _super.prototype.onPropertyChanged.call(this, newProp, oldProp);
                }
                this.hide();
            }
        }, DateTimePicker.prototype.getModuleName = function() {
            return "datetimepicker";
        }, __decorate$16([ Property(null) ], DateTimePicker.prototype, "timeFormat", void 0), 
        __decorate$16([ Property(30) ], DateTimePicker.prototype, "step", void 0), __decorate$16([ Property(1e3) ], DateTimePicker.prototype, "zIndex", void 0), 
        __decorate$16([ Property(!1) ], DateTimePicker.prototype, "showClearButton", void 0), 
        __decorate$16([ Property(null) ], DateTimePicker.prototype, "placeholder", void 0), 
        __decorate$16([ Property(!1) ], DateTimePicker.prototype, "strictMode", void 0), 
        __decorate$16([ Event() ], DateTimePicker.prototype, "open", void 0), __decorate$16([ Event() ], DateTimePicker.prototype, "close", void 0), 
        __decorate$16([ Event() ], DateTimePicker.prototype, "blur", void 0), __decorate$16([ Event() ], DateTimePicker.prototype, "focus", void 0), 
        __decorate$16([ Event() ], DateTimePicker.prototype, "created", void 0), __decorate$16([ Event() ], DateTimePicker.prototype, "destroyed", void 0), 
        DateTimePicker = __decorate$16([ NotifyPropertyChanges ], DateTimePicker);
    }(DatePicker), fixedParent$1 = !1, __extends$20 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$19 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, PositionData$1 = function(_super) {
        function PositionData() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$20(PositionData, _super), __decorate$19([ Property("left") ], PositionData.prototype, "X", void 0), 
        __decorate$19([ Property("top") ], PositionData.prototype, "Y", void 0), PositionData;
    }(ChildProperty), CLASSNAMES$__ROOT = "e-popup", CLASSNAMES$__RTL = "e-rtl", CLASSNAMES$__OPEN = "e-popup-open", CLASSNAMES$__CLOSE = "e-popup-close", Popup$1 = function(_super) {
        function Popup(element, options) {
            var _this = _super.call(this, options, element) || this;
            return _this.fixedParent = !1, _this;
        }
        return __extends$20(Popup, _super), Popup.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "width":
                    setStyleAttribute(this.element, {
                        width: formatUnit(newProp.width)
                    });
                    break;

                  case "height":
                    setStyleAttribute(this.element, {
                        height: formatUnit(newProp.height)
                    });
                    break;

                  case "zIndex":
                    setStyleAttribute(this.element, {
                        zIndex: newProp.zIndex
                    });
                    break;

                  case "enableRtl":
                    this.setEnableRtl();
                    break;

                  case "position":
                  case "relateTo":
                    this.refreshPosition();
                    break;

                  case "offsetX":
                    var x = newProp.offsetX - oldProp.offsetX;
                    this.element.style.left = (parseInt(this.element.style.left, 10) + x).toString() + "px";
                    break;

                  case "offsetY":
                    var y = newProp.offsetY - oldProp.offsetY;
                    this.element.style.top = (parseInt(this.element.style.top, 10) + y).toString() + "px";
                    break;

                  case "content":
                    this.setContent();
                    break;

                  case "actionOnScroll":
                    "none" !== newProp.actionOnScroll ? this.wireScrollEvents() : this.unwireScrollEvents();
                }
            }
        }, Popup.prototype.getModuleName = function() {
            return "popup";
        }, Popup.prototype.getPersistData = function() {
            return this.addOnPersist([]);
        }, Popup.prototype.destroy = function() {
            this.element.classList.remove(CLASSNAMES$__ROOT, CLASSNAMES$__RTL), this.unwireEvents(), 
            _super.prototype.destroy.call(this);
        }, Popup.prototype.render = function() {
            this.element.classList.add(CLASSNAMES$__ROOT);
            var styles = {};
            1e3 !== this.zIndex && (styles.zIndex = this.zIndex), "auto" !== this.width && (styles.width = formatUnit(this.width)), 
            "auto" !== this.height && (styles.height = formatUnit(this.height)), setStyleAttribute(this.element, styles), 
            this.setEnableRtl(), this.setContent(), this.wireEvents();
        }, Popup.prototype.wireEvents = function() {
            Browser.isDevice && EventHandler.add(window, "orientationchange", this.orientationOnChange, this), 
            "none" !== this.actionOnScroll && this.wireScrollEvents();
        }, Popup.prototype.wireScrollEvents = function() {
            if (this.getRelateToElement()) for (var _i = 0, _a = this.getScrollableParent(this.getRelateToElement()); _i < _a.length; _i++) {
                var parent_1 = _a[_i];
                EventHandler.add(parent_1, "scroll", this.scrollRefresh, this);
            }
        }, Popup.prototype.unwireEvents = function() {
            Browser.isDevice && EventHandler.remove(window, "orientationchange", this.orientationOnChange), 
            "none" !== this.actionOnScroll && this.unwireScrollEvents();
        }, Popup.prototype.unwireScrollEvents = function() {
            if (this.getRelateToElement()) for (var _i = 0, _a = this.getScrollableParent(this.getRelateToElement()); _i < _a.length; _i++) {
                var parent_2 = _a[_i];
                EventHandler.remove(parent_2, "scroll", this.scrollRefresh);
            }
        }, Popup.prototype.getRelateToElement = function() {
            var relateToElement = "" === this.relateTo ? document.body : this.relateTo;
            return this.setProperties({
                relateTo: relateToElement
            }, !0), "string" == typeof this.relateTo ? document.querySelector(this.relateTo) : this.relateTo;
        }, Popup.prototype.scrollRefresh = function(e) {
            if ("reposition" === this.actionOnScroll ? this.element.offsetParent === e.target || this.element.offsetParent && "BODY" === this.element.offsetParent.tagName && null == e.target.parentElement || this.refreshPosition() : "hide" === this.actionOnScroll && this.hide(), 
            "none" !== this.actionOnScroll && this.getRelateToElement()) {
                var targetVisible = this.isElementOnViewport(this.getRelateToElement(), e.target);
                targetVisible || this.targetInvisibleStatus ? targetVisible && (this.targetInvisibleStatus = !1) : (this.trigger("targetExitViewport"), 
                this.targetInvisibleStatus = !0);
            }
        }, Popup.prototype.isElementOnViewport = function(relateToElement, scrollElement) {
            for (var scrollParents = this.getScrollableParent(relateToElement), parent_3 = 0; parent_3 < scrollParents.length; parent_3++) if (!this.isElementVisible(relateToElement, scrollParents[parent_3])) return !1;
            return !0;
        }, Popup.prototype.isElementVisible = function(relateToElement, scrollElement) {
            var rect = relateToElement.getBoundingClientRect();
            if (!rect.height || !rect.width) return !1;
            if (scrollElement.getBoundingClientRect) {
                var parent_4 = scrollElement.getBoundingClientRect();
                return !(rect.bottom < parent_4.top || rect.bottom > parent_4.bottom || rect.right > parent_4.right || rect.left < parent_4.left);
            }
            var win = window, windowView_top = win.scrollY, windowView_left = win.scrollX, windowView_right = win.scrollX + win.outerWidth, windowView_bottom = win.scrollY + win.outerHeight, off = calculatePosition$1(relateToElement), ele_top = off.top, ele_left = off.left, ele_right = off.left + rect.width, ele_bottom = off.top + rect.height;
            return windowView_bottom - ele_top > 0 && windowView_right - ele_left > 0 && ele_right - windowView_left > 0 && ele_bottom - windowView_top > 0;
        }, Popup.prototype.preRender = function() {}, Popup.prototype.setEnableRtl = function() {
            this.reposition(), this.enableRtl ? this.element.classList.add(CLASSNAMES$__RTL) : this.element.classList.remove(CLASSNAMES$__RTL);
        }, Popup.prototype.setContent = function() {
            isNullOrUndefined(this.content) || (this.element.innerHTML = "", "string" == typeof this.content ? this.element.textContent = this.content : this.element.appendChild(this.content));
        }, Popup.prototype.orientationOnChange = function() {
            var _this = this;
            setTimeout(function() {
                _this.refreshPosition();
            }, 200);
        }, Popup.prototype.refreshPosition = function(target) {
            isNullOrUndefined(target) || this.checkFixedParent(target), this.reposition(), this.checkCollision();
        }, Popup.prototype.reposition = function() {
            var pos, relateToElement = this.getRelateToElement();
            if ("number" == typeof this.position.X && "number" == typeof this.position.Y) pos = {
                left: this.position.X,
                top: this.position.Y
            }; else if (relateToElement) {
                var display = this.element.style.display;
                this.element.style.display = "block", pos = this.getAnchorPosition(relateToElement, this.element, this.position, this.offsetX, this.offsetY), 
                this.element.style.display = display;
            } else pos = {
                left: 0,
                top: 0
            };
            this.element.style.left = pos.left + "px", this.element.style.top = pos.top + "px";
        }, Popup.prototype.getAnchorPosition = function(anchorEle, ele, position, offsetX, offsetY) {
            var eleRect = ele.getBoundingClientRect(), anchorRect = anchorEle.getBoundingClientRect(), anchor = anchorEle, anchorPos = {
                left: 0,
                top: 0
            };
            switch (anchorPos = ele.offsetParent && "BODY" === ele.offsetParent.tagName && "BODY" === anchorEle.tagName ? calculatePosition$1(anchorEle) : function(anchor, element) {
                var fixedElement = !1, anchorPos = {
                    left: 0,
                    top: 0
                }, tempAnchor = anchor;
                if (!anchor || !element) return anchorPos;
                for (isNullOrUndefined(element.offsetParent) && "fixed" === element.style.position && (fixedElement = !0); (element.offsetParent || fixedElement) && anchor && element.offsetParent !== anchor; ) anchorPos.left += anchor.offsetLeft, 
                anchorPos.top += anchor.offsetTop, anchor = anchor.offsetParent;
                for (anchor = tempAnchor; (element.offsetParent || fixedElement) && anchor && element.offsetParent !== anchor; ) anchorPos.left -= anchor.scrollLeft, 
                anchorPos.top -= anchor.scrollTop, anchor = anchor.parentElement;
                return anchorPos;
            }(anchor, ele), position.X) {
              default:
              case "left":
                break;

              case "center":
                "container" === this.targetType ? anchorPos.left += anchorRect.width / 2 - eleRect.width / 2 : anchorPos.left += anchorRect.width / 2;
                break;

              case "right":
                "container" === this.targetType ? anchorPos.left += anchorRect.width - eleRect.width : anchorPos.left += anchorRect.width;
            }
            switch (position.Y) {
              default:
              case "top":
                break;

              case "center":
                "container" === this.targetType ? anchorPos.top += anchorRect.height / 2 - eleRect.height / 2 : anchorPos.top += anchorRect.height / 2;
                break;

              case "bottom":
                "container" === this.targetType ? anchorPos.top += anchorRect.height - eleRect.height : anchorPos.top += anchorRect.height;
            }
            return anchorPos.left += offsetX, anchorPos.top += offsetY, anchorPos;
        }, Popup.prototype.callFlip = function(param) {
            var relateToElement = this.getRelateToElement();
            flip$1(this.element, relateToElement, this.offsetX, this.offsetY, this.position.X, this.position.Y, this.viewPortElement, param, this.fixedParent);
        }, Popup.prototype.callFit = function(param) {
            if (0 !== function(element, viewPortElement, x, y) {
                void 0 === viewPortElement && (viewPortElement = null);
                var elemOffset = calculatePosition$1(element, "left", "top");
                x && (elemOffset.left = x), y && (elemOffset.top = y);
                var data = [];
                targetContainer$1 = viewPortElement, parentDocument$2 = element.ownerDocument;
                var elementRect = element.getBoundingClientRect(), top = elemOffset.top, left = elemOffset.left, right = elemOffset.left + elementRect.width, yAxis = topCollideCheck$1(top, elemOffset.top + elementRect.height), xAxis = leftCollideCheck$1(left, right);
                return yAxis.topSide && data.push("top"), xAxis.rightSide && data.push("right"), 
                xAxis.leftSide && data.push("left"), yAxis.bottomSide && data.push("bottom"), data;
            }(this.element, this.viewPortElement).length) {
                var data = function(element, viewPortElement, axis, position) {
                    if (void 0 === viewPortElement && (viewPortElement = null), void 0 === axis && (axis = {
                        X: !1,
                        Y: !1
                    }), !axis.Y && !axis.X) return {
                        left: 0,
                        top: 0
                    };
                    var elemData = element.getBoundingClientRect();
                    if (targetContainer$1 = viewPortElement, parentDocument$2 = element.ownerDocument, 
                    position || (position = calculatePosition$1(element, "left", "top")), axis.X) {
                        var containerWidth = targetContainer$1 ? getTargetContainerWidth$1() : getViewPortWidth$1(), containerLeft = ContainerLeft$1(), containerRight = ContainerRight$1(), overLeft = containerLeft - position.left, overRight = position.left + elemData.width - containerRight;
                        elemData.width > containerWidth ? position.left = overLeft > 0 && overRight <= 0 ? containerRight - elemData.width : overRight > 0 && overLeft <= 0 ? containerLeft : overLeft > overRight ? containerRight - elemData.width : containerLeft : overLeft > 0 ? position.left += overLeft : overRight > 0 && (position.left -= overRight);
                    }
                    if (axis.Y) {
                        var containerHeight = targetContainer$1 ? getTargetContainerHeight$1() : getViewPortHeight$1(), containerTop = ContainerTop$1(), containerBottom = ContainerBottom$1(), overTop = containerTop - position.top, overBottom = position.top + elemData.height - containerBottom;
                        elemData.height > containerHeight ? position.top = overTop > 0 && overBottom <= 0 ? containerBottom - elemData.height : overBottom > 0 && overTop <= 0 ? containerTop : overTop > overBottom ? containerBottom - elemData.height : containerTop : overTop > 0 ? position.top += overTop : overBottom > 0 && (position.top -= overBottom);
                    }
                    return position;
                }(this.element, this.viewPortElement, param);
                this.element.style.left = data.left + "px", this.element.style.top = data.top + "px";
            }
        }, Popup.prototype.checkCollision = function() {
            var horz = this.collision.X, vert = this.collision.Y;
            "none" === horz && "none" === vert || ("flip" === horz && "flip" === vert ? this.callFlip({
                X: !0,
                Y: !0
            }) : "fit" === horz && "fit" === vert ? this.callFit({
                X: !0,
                Y: !0
            }) : ("fit" === horz ? this.callFit({
                X: !0,
                Y: !1
            }) : "fit" === vert && this.callFit({
                X: !1,
                Y: !0
            }), "flip" === horz ? this.callFlip({
                X: !0,
                Y: !1
            }) : "flip" === vert && this.callFlip({
                Y: !0,
                X: !1
            })));
        }, Popup.prototype.show = function(animationOptions) {
            var _this = this;
            1e3 === this.zIndex && (this.zIndex = getZindexPartial$1(this.element), setStyleAttribute(this.element, {
                zIndex: this.zIndex
            })), animationOptions = isNullOrUndefined(animationOptions) || "object" != typeof animationOptions ? this.showAnimation : animationOptions, 
            "none" === this.collision.X && "none" === this.collision.Y || (removeClass([ this.element ], CLASSNAMES$__CLOSE), 
            addClass([ this.element ], CLASSNAMES$__OPEN), this.checkCollision(), removeClass([ this.element ], CLASSNAMES$__OPEN), 
            addClass([ this.element ], CLASSNAMES$__CLOSE)), isNullOrUndefined(animationOptions) ? (removeClass([ this.element ], CLASSNAMES$__CLOSE), 
            addClass([ this.element ], CLASSNAMES$__OPEN), this.trigger("open")) : (animationOptions.begin = function() {
                _this.isDestroyed || (removeClass([ _this.element ], CLASSNAMES$__CLOSE), addClass([ _this.element ], CLASSNAMES$__OPEN));
            }, animationOptions.end = function() {
                _this.isDestroyed || _this.trigger("open");
            }, new Animation(animationOptions).animate(this.element));
        }, Popup.prototype.hide = function(animationOptions) {
            var _this = this;
            isNullOrUndefined(animationOptions = isNullOrUndefined(animationOptions) || "object" != typeof animationOptions ? this.hideAnimation : animationOptions) ? (removeClass([ this.element ], CLASSNAMES$__OPEN), 
            addClass([ this.element ], CLASSNAMES$__CLOSE), this.trigger("close")) : (animationOptions.end = function() {
                _this.isDestroyed || (removeClass([ _this.element ], CLASSNAMES$__OPEN), addClass([ _this.element ], CLASSNAMES$__CLOSE), 
                _this.trigger("close"));
            }, new Animation(animationOptions).animate(this.element));
        }, Popup.prototype.getScrollableParent = function(element) {
            return this.checkFixedParent(element), function(element, fixedParent) {
                for (var eleStyle = getComputedStyle(element), scrollParents = [], overflowRegex = /(auto|scroll)/, parent = element.parentElement; parent && "HTML" !== parent.tagName; ) {
                    var parentStyle = getComputedStyle(parent);
                    "absolute" === eleStyle.position && "static" === parentStyle.position || !overflowRegex.test(parentStyle.overflow + parentStyle.overflowY + parentStyle.overflowX) || scrollParents.push(parent), 
                    parent = parent.parentElement;
                }
                return fixedParent || scrollParents.push(document), scrollParents;
            }(element, this.fixedParent);
        }, Popup.prototype.checkFixedParent = function(element) {
            for (var parent = element.parentElement; parent && "HTML" !== parent.tagName; ) {
                var parentStyle = getComputedStyle(parent);
                "fixed" === parentStyle.position && this.element.offsetParent && "BODY" === this.element.offsetParent.tagName && (this.element.style.position = "fixed", 
                this.fixedParent = !0), parent = parent.parentElement, isNullOrUndefined(this.element.offsetParent) && "fixed" === parentStyle.position && "fixed" === this.element.style.position && (this.fixedParent = !0);
            }
        }, __decorate$19([ Property("auto") ], Popup.prototype, "height", void 0), __decorate$19([ Property("auto") ], Popup.prototype, "width", void 0), 
        __decorate$19([ Property(null) ], Popup.prototype, "content", void 0), __decorate$19([ Property("container") ], Popup.prototype, "targetType", void 0), 
        __decorate$19([ Property(null) ], Popup.prototype, "viewPortElement", void 0), __decorate$19([ Property({
            X: "none",
            Y: "none"
        }) ], Popup.prototype, "collision", void 0), __decorate$19([ Property("") ], Popup.prototype, "relateTo", void 0), 
        __decorate$19([ Complex({}, PositionData$1) ], Popup.prototype, "position", void 0), 
        __decorate$19([ Property(0) ], Popup.prototype, "offsetX", void 0), __decorate$19([ Property(0) ], Popup.prototype, "offsetY", void 0), 
        __decorate$19([ Property(1e3) ], Popup.prototype, "zIndex", void 0), __decorate$19([ Property(!1) ], Popup.prototype, "enableRtl", void 0), 
        __decorate$19([ Property("reposition") ], Popup.prototype, "actionOnScroll", void 0), 
        __decorate$19([ Property(null) ], Popup.prototype, "showAnimation", void 0), __decorate$19([ Property(null) ], Popup.prototype, "hideAnimation", void 0), 
        __decorate$19([ Event() ], Popup.prototype, "open", void 0), __decorate$19([ Event() ], Popup.prototype, "close", void 0), 
        __decorate$19([ Event() ], Popup.prototype, "targetExitViewport", void 0), Popup = __decorate$19([ NotifyPropertyChanges ], Popup);
    }(Component), __extends$19 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$18 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, ButtonProps$1 = function(_super) {
        function ButtonProps() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$19(ButtonProps, _super), __decorate$18([ Property() ], ButtonProps.prototype, "buttonModel", void 0), 
        __decorate$18([ Property() ], ButtonProps.prototype, "click", void 0), ButtonProps;
    }(ChildProperty), AnimationSettings$1 = function(_super) {
        function AnimationSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$19(AnimationSettings, _super), __decorate$18([ Property("Fade") ], AnimationSettings.prototype, "effect", void 0), 
        __decorate$18([ Property(400) ], AnimationSettings.prototype, "duration", void 0), 
        __decorate$18([ Property(0) ], AnimationSettings.prototype, "delay", void 0), AnimationSettings;
    }(ChildProperty), Dialog$1 = function(_super) {
        function Dialog(options, element) {
            return _super.call(this, options, element) || this;
        }
        return __extends$19(Dialog, _super), Dialog.prototype.render = function() {
            this.initialize(), this.initRender(), this.wireEvents();
        }, Dialog.prototype.preRender = function() {
            var _this = this;
            this.headerContent = null;
            for (var classArray = [], j = 0; j < this.element.classList.length; j++) isNullOrUndefined(this.element.classList[j].match("e-control")) && isNullOrUndefined(this.element.classList[j].match("e-dialog")) || classArray.push(this.element.classList[j]);
            removeClass([ this.element ], classArray), this.clonedEle = this.element.cloneNode(!0), 
            this.closeIconClickEventHandler = function(event) {
                _this.hide(), _this.closedFrom = event;
            }, this.dlgOverlayClickEventHandler = function(event) {
                _this.trigger("overlayClick", event);
            };
            this.l10n = new L10n("dialog", {
                close: "Close"
            }, this.locale);
        }, Dialog.prototype.keyDown = function(event) {
            var _this = this;
            if (9 === event.keyCode && this.isModal) {
                var buttonObj = void 0;
                isNullOrUndefined(this.btnObj) || (buttonObj = this.btnObj[this.btnObj.length - 1]), 
                isNullOrUndefined(buttonObj) || document.activeElement !== buttonObj.element || event.shiftKey || (event.preventDefault(), 
                this.focusableElements(this.element).focus()), document.activeElement === this.focusableElements(this.element) && event.shiftKey && (event.preventDefault(), 
                isNullOrUndefined(buttonObj) || buttonObj.element.focus());
            }
            var element = document.activeElement, isTagName = [ "input", "textarea" ].indexOf(element.tagName.toLowerCase()) > -1, isContentEdit = !1;
            if (isTagName || (isContentEdit = element.hasAttribute("contenteditable") && "true" === element.getAttribute("contenteditable")), 
            27 === event.keyCode && this.closeOnEscape && (this.hide(), this.closedFrom = event), 
            13 === event.keyCode && !event.ctrlKey && "textarea" !== element.tagName.toLowerCase() && isTagName && !isNullOrUndefined(this.primaryButtonEle) || 13 === event.keyCode && event.ctrlKey && ("textarea" === element.tagName.toLowerCase() || isContentEdit) && !isNullOrUndefined(this.primaryButtonEle)) {
                var buttonIndex_1;
                this.buttons.some(function(data, index) {
                    buttonIndex_1 = index;
                    var buttonModel = data.buttonModel;
                    return !isNullOrUndefined(buttonModel) && !0 === buttonModel.isPrimary;
                }) && "function" == typeof this.buttons[buttonIndex_1].click && setTimeout(function() {
                    _this.buttons[buttonIndex_1].click.call(_this, event);
                });
            }
        }, Dialog.prototype.initialize = function() {
            isNullOrUndefined(this.target) || (this.targetEle = "string" == typeof this.target ? document.querySelector(this.target) : this.target), 
            addClass([ this.element ], "e-dialog"), Browser.isDevice && addClass([ this.element ], "e-device"), 
            this.setCSSClass(), this.setMaxHeight();
        }, Dialog.prototype.initRender = function() {
            var _this = this;
            attributes(this.element, {
                role: "dialog"
            }), 1e3 === this.zIndex && (this.zIndex = getZindexPartial$1(this.element)), this.setTargetContent(), 
            "" !== this.header && this.setHeader(), this.showCloseIcon && this.renderCloseIcon(), 
            isNullOrUndefined(this.content) || "" === this.content ? this.element.hasChildNodes() && (this.contentEle = this.element) : this.setContent(), 
            "" !== this.footerTemplate && this.setFooterTemplate(), isNullOrUndefined(this.buttons[0].buttonModel) || "" !== this.footerTemplate || this.setButton(), 
            !this.allowDragging || this.isModal || isNullOrUndefined(this.headerContent) || this.setAllowDragging(), 
            attributes(this.element, {
                "aria-modal": this.isModal ? "true" : "false"
            }), this.isModal && this.setIsModal(), isNullOrUndefined(this.targetEle) || (this.isModal ? this.targetEle.appendChild(this.dlgContainer) : this.targetEle.appendChild(this.element)), 
            this.popupObj = new Popup$1(this.element, {
                height: this.height,
                width: this.width,
                zIndex: this.zIndex,
                relateTo: this.target,
                actionOnScroll: "none",
                open: function() {
                    _this.focusContent(), _this.trigger("open");
                },
                close: function(event) {
                    _this.unBindEvent(_this.element), _this.isModal && (_this.dlgContainer.style.display = "none"), 
                    _this.trigger("close", _this.closedFrom), _this.closedFrom = {}, isNullOrUndefined(_this.storeActiveElement) || _this.storeActiveElement.focus();
                }
            }), this.positionChange(), this.setEnableRTL(), addClass([ this.element ], "e-popup-close"), 
            this.isModal && this.setOverlayZindex(), this.visible ? this.show() : this.isModal && (this.dlgOverlay.style.display = "none");
        }, Dialog.prototype.setOverlayZindex = function() {
            var zIndex = parseInt(this.element.style.zIndex, 10) ? parseInt(this.element.style.zIndex, 10) : this.zIndex;
            this.dlgOverlay.style.zIndex = (zIndex - 1).toString(), this.dlgContainer.style.zIndex = zIndex.toString();
        }, Dialog.prototype.positionChange = function() {
            this.isModal ? this.dlgContainer.classList.add("e-dlg-" + this.position.X + "-" + this.position.Y) : this.popupObj.setProperties({
                position: {
                    X: this.position.X,
                    Y: this.position.Y
                }
            });
        }, Dialog.prototype.setAllowDragging = function() {
            var _this = this;
            this.dragObj = new Draggable(this.element, {
                clone: !1,
                handle: ".e-dlg-header-content",
                dragStart: function(event) {
                    _this.trigger("dragStart", event);
                },
                dragStop: function(event) {
                    _this.trigger("dragStop", event);
                },
                drag: function(event) {
                    _this.trigger("drag", event);
                }
            }), isNullOrUndefined(this.targetEle) || (this.dragObj.dragArea = this.targetEle);
        }, Dialog.prototype.setButton = function() {
            this.buttonContent = [], this.btnObj = [];
            for (var i = 0; i < this.buttons.length; i++) {
                var btn = createElement("button", {
                    attrs: {
                        type: "button"
                    }
                });
                this.buttonContent.push(btn.outerHTML);
            }
            this.setFooterTemplate();
            for (i = 0; i < this.buttons.length; i++) this.btnObj[i] = new Button(this.buttons[i].buttonModel), 
            "function" == typeof this.buttons[i].click && EventHandler.add(this.ftrTemplateContent.children[i], "click", this.buttons[i].click, this), 
            this.btnObj[i].appendTo(this.ftrTemplateContent.children[i]), this.btnObj[i].isPrimary || this.btnObj[i].element.classList.add("e-flat"), 
            this.primaryButtonEle = this.element.getElementsByClassName("e-primary")[0];
        }, Dialog.prototype.setContent = function() {
            attributes(this.element, {
                "aria-describedby": this.element.id + "_dialog-content"
            }), this.contentEle = createElement("div", {
                className: "e-dlg-content",
                id: this.element.id + "_dialog-content"
            }), "string" == typeof this.content ? this.contentEle.innerHTML = this.content : this.contentEle.appendChild(this.content), 
            isNullOrUndefined(this.headerContent) ? this.element.insertBefore(this.contentEle, this.element.children[0]) : this.element.insertBefore(this.contentEle, this.element.children[1]), 
            "auto" === this.height && this.setMaxHeight();
        }, Dialog.prototype.setMaxHeight = function() {
            var display = this.element.style.display;
            this.element.style.display = "none", this.element.style.maxHeight = isNullOrUndefined(this.target) ? window.innerHeight - 20 + "px" : this.targetEle.offsetHeight - 20 + "px", 
            this.element.style.display = display;
        }, Dialog.prototype.setEnableRTL = function() {
            this.enableRtl ? addClass([ this.element ], "e-rtl") : removeClass([ this.element ], "e-rtl");
        }, Dialog.prototype.setTargetContent = function() {
            var isContent = "" !== this.element.innerHTML.replace(/\s/g, "");
            if (this.element.children.length > 0 || isContent) {
                for (var contentDiv = document.createDocumentFragment(); 0 !== this.element.childNodes.length; ) contentDiv.appendChild(this.element.childNodes[0]);
                this.setProperties({
                    content: contentDiv
                }, !0);
            }
        }, Dialog.prototype.setHeader = function() {
            this.headerEle = createElement("div", {
                id: this.element.id + "_title",
                className: "e-dlg-header",
                innerHTML: this.header
            }), attributes(this.element, {
                "aria-labelledby": this.element.id + "_title"
            }), this.createHeaderContent(), this.headerContent.appendChild(this.headerEle), 
            this.element.insertBefore(this.headerContent, this.element.children[0]);
        }, Dialog.prototype.setFooterTemplate = function() {
            this.ftrTemplateContent = createElement("div", {
                className: "e-footer-content",
                innerHTML: "" !== this.footerTemplate ? this.footerTemplate : this.buttonContent.join("")
            }), this.element.appendChild(this.ftrTemplateContent);
        }, Dialog.prototype.createHeaderContent = function() {
            isNullOrUndefined(this.headerContent) && (this.headerContent = createElement("div", {
                className: "e-dlg-header-content"
            }));
        }, Dialog.prototype.renderCloseIcon = function() {
            this.closeIcon = createElement("button", {
                className: "e-dlg-closeicon-btn",
                attrs: {
                    type: "button"
                }
            }), this.closeIconBtnObj = new Button({
                cssClass: "e-flat",
                iconCss: "e-icon-dlg-close e-icons"
            }), this.closeIconTitle(), isNullOrUndefined(this.headerContent) ? (this.createHeaderContent(), 
            prepend([ this.closeIcon ], this.headerContent), this.element.insertBefore(this.headerContent, this.element.children[0])) : prepend([ this.closeIcon ], this.headerContent), 
            this.closeIconBtnObj.appendTo(this.closeIcon);
        }, Dialog.prototype.closeIconTitle = function() {
            this.l10n.setLocale(this.locale);
            var closeIconTitle = this.l10n.getConstant("close");
            this.closeIcon.setAttribute("title", closeIconTitle);
        }, Dialog.prototype.setCSSClass = function(oldCSSClass) {
            this.cssClass && addClass([ this.element ], this.cssClass.split(" ")), oldCSSClass && removeClass([ this.element ], oldCSSClass.split(" "));
        }, Dialog.prototype.setIsModal = function() {
            this.dlgContainer = createElement("div", {
                className: "e-dlg-container"
            }), this.element.parentNode.insertBefore(this.dlgContainer, this.element), this.dlgContainer.appendChild(this.element), 
            addClass([ this.element ], "e-dlg-modal"), this.dlgOverlay = createElement("div", {
                className: "e-dlg-overlay"
            }), this.dlgOverlay.style.zIndex = (this.zIndex - 1).toString(), this.dlgContainer.appendChild(this.dlgOverlay);
        }, Dialog.prototype.getValidFocusNode = function(items) {
            for (var node, u = 0; u < items.length; u++) if (((node = items[u]).clientHeight > 0 || "a" === node.tagName.toLowerCase() && node.hasAttribute("href")) && node.tabIndex > -1 && !node.disabled && !this.disableElement(node, '[disabled],[aria-disabled="true"],[type="hidden"]')) return node;
            return node;
        }, Dialog.prototype.focusableElements = function(content) {
            if (!isNullOrUndefined(content)) {
                var items = content.querySelectorAll('input,select,textarea,button,a,[contenteditable="true"],[tabindex]');
                return this.getValidFocusNode(items);
            }
            return null;
        }, Dialog.prototype.getAutoFocusNode = function(container) {
            var node = container.querySelector(".e-dlg-closeicon-btn"), items = container.querySelectorAll("[autofocus]"), validNode = this.getValidFocusNode(items);
            if (isNullOrUndefined(validNode)) {
                if (validNode = this.focusableElements(this.contentEle), !isNullOrUndefined(validNode)) return node = validNode;
                if (!isNullOrUndefined(this.primaryButtonEle)) return this.element.querySelector(".e-primary");
            } else node = validNode;
            return node;
        }, Dialog.prototype.disableElement = function(element, t) {
            var elementMatch = element ? element.matches || element.webkitMatchesSelector || element.msMatchesSelector : null;
            if (elementMatch) for (;element; element = element.parentNode) if (element instanceof Element && elementMatch.call(element, t)) return element;
            return null;
        }, Dialog.prototype.focusContent = function() {
            var element = this.getAutoFocusNode(this.element);
            (isNullOrUndefined(element) ? this.element : element).focus(), this.bindEvent(this.element);
        }, Dialog.prototype.bindEvent = function(element) {
            EventHandler.add(element, "keydown", this.keyDown, this);
        }, Dialog.prototype.unBindEvent = function(element) {
            EventHandler.remove(element, "keydown", this.keyDown);
        }, Dialog.prototype.getModuleName = function() {
            return "dialog";
        }, Dialog.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "content":
                    isNullOrUndefined(this.content) || "" === this.content ? isNullOrUndefined(this.contentEle) || this.element.removeChild(this.contentEle) : isNullOrUndefined(this.contentEle) || "dialog" === this.contentEle.getAttribute("role") ? this.setContent() : (this.contentEle.innerHTML = "", 
                    "string" == typeof this.content ? this.contentEle.innerHTML = this.content : this.contentEle.appendChild(this.content), 
                    this.setMaxHeight());
                    break;

                  case "header":
                    "" === this.header ? detach(this.headerEle) : this.element.getElementsByClassName("e-dlg-header").length > 0 ? this.element.getElementsByClassName("e-dlg-header")[0].innerHTML = this.header : this.setHeader();
                    break;

                  case "footerTemplate":
                    this.element.getElementsByClassName("e-footer-content").length > 0 ? this.ftrTemplateContent.innerHTML = this.footerTemplate : this.setFooterTemplate();
                    break;

                  case "showCloseIcon":
                    this.element.getElementsByClassName("e-icon-dlg-close").length > 0 ? this.showCloseIcon || "" !== this.header ? this.showCloseIcon || detach(this.closeIcon) : detach(this.headerContent) : (this.renderCloseIcon(), 
                    this.wireEvents());
                    break;

                  case "locale":
                    this.showCloseIcon && this.closeIconTitle();
                    break;

                  case "visible":
                    this.visible ? this.show() : this.hide();
                    break;

                  case "isModal":
                    if (this.element.setAttribute("aria-modal", this.isModal ? "true" : "false"), this.isModal) this.setIsModal(), 
                    this.wireEvents(), isNullOrUndefined(this.targetEle) || (this.isModal ? this.targetEle.appendChild(this.dlgContainer) : this.targetEle.appendChild(this.element)); else {
                        for (removeClass([ this.element ], "e-dlg-modal"), removeClass([ document.body ], "e-scroll-disabled"), 
                        detach(this.dlgOverlay); this.dlgContainer.firstChild; ) this.dlgContainer.parentElement.insertBefore(this.dlgContainer.firstChild, this.dlgContainer);
                        this.dlgContainer.parentElement.removeChild(this.dlgContainer);
                    }
                    break;

                  case "height":
                    setStyleAttribute(this.element, {
                        height: formatUnit(newProp.height)
                    });
                    break;

                  case "width":
                    setStyleAttribute(this.element, {
                        width: formatUnit(newProp.width)
                    });
                    break;

                  case "zIndex":
                    this.popupObj.zIndex = this.zIndex, this.isModal && this.setOverlayZindex();
                    break;

                  case "cssClass":
                    this.setCSSClass(oldProp.cssClass);
                    break;

                  case "animationSettings":
                    this.show();
                    break;

                  case "buttons":
                    isNullOrUndefined(this.buttons[0].buttonModel) || "" !== this.footerTemplate || (isNullOrUndefined(this.ftrTemplateContent) || detach(this.ftrTemplateContent), 
                    this.setButton());
                    break;

                  case "allowDragging":
                    !this.allowDragging || this.isModal || isNullOrUndefined(this.headerContent) ? this.dragObj.destroy() : this.setAllowDragging();
                    break;

                  case "target":
                    this.popupObj.relateTo = newProp.target;
                    break;

                  case "position":
                    if (oldProp.position.X === this.position.X && oldProp.position.Y === this.position.Y) break;
                    if (!this.isModal) {
                        this.popupObj.position.X = this.position.X, this.popupObj.position.Y = this.position.Y;
                        break;
                    }
                    this.dlgContainer.classList.remove("e-dlg-" + oldProp.position.X + "-" + oldProp.position.Y), 
                    this.dlgContainer.classList.add("e-dlg-" + this.position.X + "-" + this.position.Y);
                    break;

                  case "enableRtl":
                    this.setEnableRTL();
                }
            }
        }, Dialog.prototype.getPersistData = function() {
            return this.addOnPersist([]);
        }, Dialog.prototype.destroy = function() {
            if (this.element.classList.contains("e-dialog")) {
                this.unWireEvents(), _super.prototype.destroy.call(this);
                var classArray = [ "e-dialog", "e-rtl", "e-dlg-modal" ];
                if (removeClass([ this.element, this.element ], classArray), this.popupObj.element.classList.contains("e-popup") && this.popupObj.destroy(), 
                !isNullOrUndefined(this.btnObj)) for (var i = void 0; i < this.btnObj.length; i++) this.btnObj[i].destroy();
                for (this.isModal && (detach(this.dlgOverlay), this.dlgContainer.parentNode.insertBefore(this.element, this.dlgContainer), 
                detach(this.dlgContainer)), this.element.innerHTML = ""; this.element.attributes.length > 0; ) this.element.removeAttribute(this.element.attributes[0].name);
                for (var k = 0; k < this.clonedEle.attributes.length; k++) this.element.setAttribute(this.clonedEle.attributes[k].name, this.clonedEle.attributes[k].value);
            }
        }, Dialog.prototype.wireEvents = function() {
            this.showCloseIcon && EventHandler.add(this.closeIcon, "click", this.closeIconClickEventHandler, this), 
            this.isModal && EventHandler.add(this.dlgOverlay, "click", this.dlgOverlayClickEventHandler, this);
        }, Dialog.prototype.unWireEvents = function() {
            if (this.showCloseIcon && EventHandler.remove(this.closeIcon, "click", this.closeIconClickEventHandler), 
            this.isModal && EventHandler.remove(this.dlgOverlay, "click", this.dlgOverlayClickEventHandler), 
            !isNullOrUndefined(this.buttons[0].buttonModel)) for (var i = 0; i < this.buttons.length; i++) "function" == typeof this.buttons[i].click && EventHandler.remove(this.ftrTemplateContent.children[i], "click", this.buttons[i].click);
        }, Dialog.prototype.refreshPosition = function() {
            this.popupObj.refreshPosition();
        }, Dialog.prototype.show = function(isFullScreen) {
            if (!this.element.classList.contains("e-popup-open") || !isNullOrUndefined(isFullScreen)) {
                isNullOrUndefined(isFullScreen) || this.fullScreen(isFullScreen);
                var eventArgs = {
                    cancel: !1,
                    container: this.isModal ? this.dlgContainer : this.element
                };
                if (this.trigger("beforeOpen", eventArgs), eventArgs.cancel) return;
                this.storeActiveElement = document.activeElement, this.element.tabIndex = -1, this.isModal && !isNullOrUndefined(this.dlgOverlay) && (this.dlgOverlay.style.display = "block", 
                this.dlgContainer.style.display = "flex", isNullOrUndefined(this.targetEle) ? addClass([ document.body ], "e-scroll-disabled") : (this.targetEle === document.body ? this.dlgContainer.style.position = "fixed" : this.dlgContainer.style.position = "absolute", 
                this.dlgOverlay.style.position = "absolute", this.element.style.position = "relative", 
                addClass([ this.targetEle ], "e-scroll-disabled")));
                var openAnimation = {
                    name: this.animationSettings.effect + "In",
                    duration: this.animationSettings.duration,
                    delay: this.animationSettings.delay
                };
                "None" === this.animationSettings.effect ? this.popupObj.show() : this.popupObj.show(openAnimation), 
                this.dialogOpen = !0, this.visible = !0;
            }
        }, Dialog.prototype.hide = function() {
            var eventArgs = {
                cancel: !1,
                container: this.isModal ? this.dlgContainer : this.element
            };
            if (this.trigger("beforeClose", eventArgs), !eventArgs.cancel) {
                this.isModal && (this.dlgOverlay.style.display = "none", isNullOrUndefined(this.targetEle) ? removeClass([ document.body ], "e-scroll-disabled") : removeClass([ this.targetEle ], "e-scroll-disabled"));
                var closeAnimation = {
                    name: this.animationSettings.effect + "Out",
                    duration: this.animationSettings.duration,
                    delay: this.animationSettings.delay
                };
                "None" === this.animationSettings.effect ? this.popupObj.hide() : this.popupObj.hide(closeAnimation), 
                this.dialogOpen = !1, this.visible = !1;
            }
        }, Dialog.prototype.fullScreen = function(args) {
            this.element.offsetTop, this.element.offsetLeft;
            if (args) {
                addClass([ this.element ], "e-dlg-fullscreen");
                var display = this.element.style.display;
                this.element.style.display = "none", this.element.style.maxHeight = isNullOrUndefined(this.target) ? window.innerHeight + "px" : this.targetEle.offsetHeight + "px", 
                this.element.style.display = display, addClass([ document.body ], "e-scroll-disabled"), 
                this.allowDragging && !isNullOrUndefined(this.dragObj) && this.dragObj.destroy();
            } else removeClass([ this.element ], "e-dlg-fullscreen"), removeClass([ document.body ], "e-scroll-disabled"), 
            !this.allowDragging || this.isModal || isNullOrUndefined(this.headerContent) || this.setAllowDragging();
            return args;
        }, __decorate$18([ Property("") ], Dialog.prototype, "content", void 0), __decorate$18([ Property(!1) ], Dialog.prototype, "showCloseIcon", void 0), 
        __decorate$18([ Property(!1) ], Dialog.prototype, "isModal", void 0), __decorate$18([ Property("") ], Dialog.prototype, "header", void 0), 
        __decorate$18([ Property(!0) ], Dialog.prototype, "visible", void 0), __decorate$18([ Property("auto") ], Dialog.prototype, "height", void 0), 
        __decorate$18([ Property("100%") ], Dialog.prototype, "width", void 0), __decorate$18([ Property("") ], Dialog.prototype, "cssClass", void 0), 
        __decorate$18([ Property(1e3) ], Dialog.prototype, "zIndex", void 0), __decorate$18([ Property(null) ], Dialog.prototype, "target", void 0), 
        __decorate$18([ Property("") ], Dialog.prototype, "footerTemplate", void 0), __decorate$18([ Property(!1) ], Dialog.prototype, "allowDragging", void 0), 
        __decorate$18([ Collection([ {} ], ButtonProps$1) ], Dialog.prototype, "buttons", void 0), 
        __decorate$18([ Property(!0) ], Dialog.prototype, "closeOnEscape", void 0), __decorate$18([ Complex({}, AnimationSettings$1) ], Dialog.prototype, "animationSettings", void 0), 
        __decorate$18([ Complex({
            X: "center",
            Y: "center"
        }, PositionData$1) ], Dialog.prototype, "position", void 0), __decorate$18([ Event() ], Dialog.prototype, "created", void 0), 
        __decorate$18([ Event() ], Dialog.prototype, "open", void 0), __decorate$18([ Event() ], Dialog.prototype, "beforeOpen", void 0), 
        __decorate$18([ Event() ], Dialog.prototype, "close", void 0), __decorate$18([ Event() ], Dialog.prototype, "beforeClose", void 0), 
        __decorate$18([ Event() ], Dialog.prototype, "dragStart", void 0), __decorate$18([ Event() ], Dialog.prototype, "dragStop", void 0), 
        __decorate$18([ Event() ], Dialog.prototype, "drag", void 0), __decorate$18([ Event() ], Dialog.prototype, "overlayClick", void 0), 
        Dialog = __decorate$18([ NotifyPropertyChanges ], Dialog);
    }(Component), __extends$22 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$21 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, Item = function(_super) {
        function Item() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$22(Item, _super), __decorate$21([ Property("") ], Item.prototype, "iconCss", void 0), 
        __decorate$21([ Property("") ], Item.prototype, "id", void 0), __decorate$21([ Property(!1) ], Item.prototype, "separator", void 0), 
        __decorate$21([ Property("") ], Item.prototype, "text", void 0), __decorate$21([ Property("") ], Item.prototype, "url", void 0), 
        Item;
    }(ChildProperty), __extends$21 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$20 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, classNames$__DISABLED = "e-disabled", classNames$__FOCUS = "e-focused", classNames$__ICON = "e-menu-icon", classNames$__ITEM = "e-item", classNames$__POPUP = "e-dropdown-popup", classNames$__RTL = "e-rtl", classNames$__SEPARATOR = "e-separator", classNames$__VERTICAL = "e-vertical", DropDownButton = function(_super) {
        function DropDownButton(options, element) {
            return _super.call(this, options, element) || this;
        }
        return __extends$21(DropDownButton, _super), DropDownButton.prototype.preRender = function() {}, 
        DropDownButton.prototype.getPersistData = function() {
            return this.addOnPersist([]);
        }, DropDownButton.prototype.toggle = function() {
            this.canOpen() ? this.openPopUp() : this.closePopup();
        }, DropDownButton.prototype.render = function() {
            this.initialize(), this.disabled || this.wireEvents();
        }, DropDownButton.prototype.createPopup = function() {
            var div = createElement("div", {
                className: classNames$__POPUP,
                id: this.element.id + "-popup"
            });
            document.body.appendChild(div), this.dropDown = new Popup(div, {
                relateTo: this.element,
                collision: {
                    X: Browser.isDevice ? "fit" : "flip",
                    Y: "flip"
                },
                position: {
                    X: "left",
                    Y: "bottom"
                },
                targetType: "relative",
                content: this.target ? this.getTargetElement() : ""
            }), div.style.zIndex = this.getZIndex(), this.dropDown.hide(), attributes(this.element, (_a = {}, 
            _a.role = "menu", _a["aria-haspopup"] = this.items.length || this.target ? "true" : "false", 
            _a["aria-expanded"] = "false", _a["aria-owns"] = this.getPopUpElement().id, _a)), 
            this.cssClass && addClass([ div ], this.cssClass.split(" ")), this.enableRtl && div.classList.add(classNames$__RTL);
            var _a;
        }, DropDownButton.prototype.getTargetElement = function() {
            return "string" == typeof this.target ? select(this.target) : this.target;
        }, DropDownButton.prototype.createItems = function(items) {
            for (var span, item, li, eventArgs, showIcon = this.hasIcon(items, "iconCss"), ul = createElement("ul", {
                attrs: {
                    tabindex: "0"
                }
            }), i = 0; i < items.length; i++) li = createElement("li", {
                innerHTML: (item = items[i]).url ? "" : item.text,
                className: item.separator ? classNames$__ITEM + " " + classNames$__SEPARATOR : classNames$__ITEM,
                attrs: {
                    role: "menuItem",
                    tabindex: "-1"
                },
                id: item.id ? item.id : getUniqueID("e-" + this.getModuleName() + "-item")
            }), item.iconCss ? (span = createElement("span", {
                className: classNames$__ICON + " " + item.iconCss
            }), li.insertBefore(span, li.childNodes[0])) : showIcon && !item.separator && li.classList.add("e-blank-icon"), 
            item.url && li.appendChild(this.createAnchor(item)), eventArgs = {
                item: item,
                element: li
            }, this.trigger("beforeItemRender", eventArgs), ul.appendChild(li);
            return ul;
        }, DropDownButton.prototype.hasIcon = function(items, field) {
            for (var i = 0, len = items.length; i < len; i++) if (items[i][field]) return !0;
            return !1;
        }, DropDownButton.prototype.createAnchor = function(item) {
            return createElement("a", {
                className: "e-menu-text e-menu-url",
                innerHTML: item.text,
                attrs: {
                    href: item.url
                }
            });
        }, DropDownButton.prototype.initialize = function() {
            this.button = new Button({
                iconCss: this.iconCss,
                cssClass: this.cssClass,
                content: this.content,
                disabled: this.disabled,
                enableRtl: this.enableRtl,
                enablePersistence: this.enablePersistence
            }), this.button.appendTo(this.element), this.element.id || (this.element.id = getUniqueID("e-" + this.getModuleName())), 
            this.setIconPositionTop(), this.appendArrowSpan(), this.createPopup(), this.setActiveElem();
        }, DropDownButton.prototype.setIconPositionTop = function() {
            var iconSpan = this.element.querySelector(".e-icon-left");
            iconSpan && "Top" === this.iconPosition && (addClass([ this.element ], classNames$__VERTICAL), 
            removeClass([ iconSpan ], "e-icon-left"), addClass([ iconSpan ], "e-icon-top"));
        }, DropDownButton.prototype.appendArrowSpan = function() {
            this.element.appendChild(createElement("span", {
                className: "e-btn-icon e-icons e-icon-" + (this.cssClass === classNames$__VERTICAL ? "bottom" : "right") + " e-caret"
            }));
        }, DropDownButton.prototype.setActiveElem = function() {
            this.activeElem = this.element;
        }, DropDownButton.prototype.getModuleName = function() {
            return "dropdown-btn";
        }, DropDownButton.prototype.canOpen = function() {
            return this.getPopUpElement().classList.contains("e-popup-close");
        }, DropDownButton.prototype.destroy = function() {
            var _this = this;
            detach(this.element.querySelector("span.e-caret")), _super.prototype.destroy.call(this), 
            this.button.destroy(), [ "role", "aria-haspopup", "aria-expanded", "aria-owns" ].forEach(function(key) {
                _this.element.removeAttribute(key);
            }), removeClass([ this.element, this.activeElem ], [ "e-ddb-active", "e-btn" ]), 
            detach(this.getPopUpElement()), this.unWireEvents();
        }, DropDownButton.prototype.getPopUpElement = function() {
            return this.dropDown.element;
        }, DropDownButton.prototype.getULElement = function() {
            return this.getPopUpElement().children[0];
        }, DropDownButton.prototype.wireEvents = function() {
            var popupElement = this.getPopUpElement();
            EventHandler.add(document, "click", this.clickHandler, this), EventHandler.add(this.element, "keydown", this.keyBoardHandler, this), 
            this.target || EventHandler.add(popupElement, "keydown", this.keyBoardHandler, this), 
            rippleEffect(popupElement, {
                selector: "." + classNames$__ITEM
            });
        }, DropDownButton.prototype.keyBoardHandler = function(e) {
            if (e.target !== this.element || 9 !== e.keyCode && (e.altKey || 40 !== e.keyCode) && 38 !== e.keyCode) switch (9 !== e.keyCode && e.preventDefault(), 
            e.keyCode) {
              case 38:
              case 40:
                !e.altKey || 38 !== e.keyCode && 40 !== e.keyCode ? this.upDownKeyHandler(e) : this.keyEventHandler(e);
                break;

              case 9:
              case 13:
              case 27:
              case 32:
                this.keyEventHandler(e);
            }
        }, DropDownButton.prototype.upDownKeyHandler = function(e) {
            for (var ul = this.getULElement(), defaultIdx = 40 === e.keyCode ? 0 : ul.childElementCount - 1, liIdx = defaultIdx, li = null, i = 0, len = ul.children.length; i < len; i++) ul.children[i].classList.contains(classNames$__FOCUS) && (liIdx = i, 
            (li = ul.children[i]).classList.remove(classNames$__FOCUS), 40 === e.keyCode ? liIdx++ : liIdx--, 
            liIdx === (40 === e.keyCode ? ul.childElementCount : -1) && (liIdx = defaultIdx));
            li = ul.children[liIdx], -1 !== (liIdx = this.isValidLI(li, liIdx, e.keyCode)) && (addClass([ ul.children[liIdx] ], classNames$__FOCUS), 
            ul.children[liIdx].focus());
        }, DropDownButton.prototype.isValidLI = function(li, index, keyCode, count) {
            if (void 0 === count && (count = 0), (li.classList.contains(classNames$__SEPARATOR) || li.classList.contains(classNames$__DISABLED)) && (index === (40 === keyCode ? this.items.length - 1 : 0) ? index = 40 === keyCode ? 0 : this.items.length - 1 : 40 === keyCode ? index++ : index--), 
            (li = this.getULElement().children[index]).classList.contains(classNames$__SEPARATOR) || li.classList.contains(classNames$__DISABLED)) {
                if (++count === this.items.length) return index = -1;
                index = this.isValidLI(li, index, keyCode, count);
            }
            return index;
        }, DropDownButton.prototype.keyEventHandler = function(e) {
            27 === e.keyCode || 38 === e.keyCode || 9 === e.keyCode ? this.canOpen() || (this.closePopup(e), 
            this.element.focus()) : this.clickHandler(e);
        }, DropDownButton.prototype.getLI = function(elem) {
            return "LI" === elem.tagName ? elem : closest(elem, "li");
        }, DropDownButton.prototype.getZIndex = function() {
            for (var idx, pos, props, zIndex = [ "999" ], i = 0, len = document.body.children.length; i < len; i++) idx = (props = document.defaultView.getComputedStyle(document.body.children[i])).getPropertyValue("z-index"), 
            pos = props.getPropertyValue("position"), "auto" !== idx && "static" !== pos && zIndex.push(idx);
            return (Math.max.apply(Math, zIndex) + 1).toString();
        }, DropDownButton.prototype.clickHandler = function(e) {
            var trgt = e.target, canOpen = this.canOpen();
            if (closest(trgt, "#" + this.element.id)) canOpen ? this.openPopUp(e) : (this.closePopup(e), 
            this.activeElem.focus()); else if (closest(trgt, "#" + this.getPopUpElement().id)) {
                var eventArgs = void 0, liIdx = void 0, item = void 0, li = this.getLI(trgt);
                li && (liIdx = Array.prototype.indexOf.call(this.getULElement().children, li), (item = this.items[liIdx]) && (eventArgs = {
                    element: li,
                    item: item
                }, this.trigger("select", eventArgs)), this.closePopup(e), this.activeElem.focus());
            } else canOpen || this.closePopup(e);
        }, DropDownButton.prototype.openPopUp = function(e) {
            void 0 === e && (e = null), this.target || this.getPopUpElement().appendChild(this.createItems(this.items));
            var ul = this.getULElement(), beforeOpenArgs = {
                element: ul,
                items: this.items,
                event: e,
                cancel: !1
            };
            if (this.trigger("beforeOpen", beforeOpenArgs), !beforeOpenArgs.cancel) {
                this.dropDown.show(), addClass([ this.activeElem ], "e-ddb-active"), this.activeElem.setAttribute("aria-expanded", "true"), 
                ul.focus();
                var openArgs = {
                    element: ul,
                    items: this.items
                };
                this.trigger("open", openArgs);
            }
        }, DropDownButton.prototype.closePopup = function(e) {
            void 0 === e && (e = null);
            var ul = this.getULElement(), beforeCloseArgs = {
                element: ul,
                items: this.items,
                event: e,
                cancel: !1
            };
            if (this.trigger("beforeClose", beforeCloseArgs), !beforeCloseArgs.cancel) {
                this.dropDown.hide(), removeClass([ this.activeElem ], "e-ddb-active"), this.activeElem.setAttribute("aria-expanded", "false");
                var closeArgs = {
                    element: ul,
                    items: this.items
                };
                this.trigger("close", closeArgs), this.target || detach(ul);
            }
        }, DropDownButton.prototype.unWireEvents = function() {
            EventHandler.remove(document, "click", this.clickHandler), EventHandler.remove(this.element, "keydown", this.keyBoardHandler), 
            EventHandler.remove(this.getPopUpElement(), "keydown", this.keyBoardHandler);
        }, DropDownButton.prototype.onPropertyChanged = function(newProp, oldProp) {
            var btnModel = [ "content", "cssClass", "iconCss", "disabled", "enableRtl" ];
            "Left" === newProp.iconPosition && btnModel.push("iconPosition"), this.button.setProperties(getModel(newProp, btnModel));
            for (var popupElement = this.getPopUpElement(), _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "content":
                    this.element.querySelector("span.e-caret") || this.appendArrowSpan();
                    break;

                  case "cssClass":
                    if (newProp.cssClass === classNames$__VERTICAL) {
                        classList(this.element.querySelector("span.e-caret"), [ "e-icon-bottom" ], [ "e-icon-right" ]);
                    }
                    oldProp.cssClass && removeClass([ popupElement ], oldProp.cssClass.split(" ")), 
                    addClass([ popupElement ], newProp.cssClass.split(" "));
                    break;

                  case "iconPosition":
                    this.setIconPositionTop();
                    break;

                  case "enableRtl":
                    popupElement.classList.toggle(classNames$__RTL);
                    break;

                  case "target":
                    this.target = newProp.target, detach(this.getULElement()), popupElement.appendChild(this.getTargetElement()), 
                    this.dropDown.content = this.getTargetElement();
                    break;

                  case "items":
                    this.dropDown.refresh(), popupElement.classList.contains("e-popup-open") && classList(popupElement, [ "e-popup-close" ], [ "e-popup-open" ]);
                }
            }
        }, __decorate$20([ Property("") ], DropDownButton.prototype, "content", void 0), 
        __decorate$20([ Property("") ], DropDownButton.prototype, "cssClass", void 0), __decorate$20([ Property(!1) ], DropDownButton.prototype, "disabled", void 0), 
        __decorate$20([ Property("") ], DropDownButton.prototype, "iconCss", void 0), __decorate$20([ Property("Left") ], DropDownButton.prototype, "iconPosition", void 0), 
        __decorate$20([ Collection([], Item) ], DropDownButton.prototype, "items", void 0), 
        __decorate$20([ Property("") ], DropDownButton.prototype, "target", void 0), __decorate$20([ Event() ], DropDownButton.prototype, "beforeItemRender", void 0), 
        __decorate$20([ Event() ], DropDownButton.prototype, "beforeOpen", void 0), __decorate$20([ Event() ], DropDownButton.prototype, "beforeClose", void 0), 
        __decorate$20([ Event() ], DropDownButton.prototype, "close", void 0), __decorate$20([ Event() ], DropDownButton.prototype, "open", void 0), 
        __decorate$20([ Event() ], DropDownButton.prototype, "select", void 0), DropDownButton = __decorate$20([ NotifyPropertyChanges ], DropDownButton);
    }(Component), CLASSNAMES$3 = {
        RTL: "e-rtl",
        DISABLE: "e-disabled",
        INPUT: "e-input",
        INPUTGROUP: "e-input-group",
        FLOATINPUT: "e-float-input",
        FLOATLINE: "e-float-line",
        FLOATTEXT: "e-float-text",
        CLEARICON: "e-clear-icon",
        CLEARICONHIDE: "e-clear-icon-hide",
        LABELTOP: "e-label-top",
        LABELBOTTOM: "e-label-bottom",
        NOFLOATLABEL: "e-no-float-label",
        INPUTCUSTOMTAG: "e-input-custom-tag",
        FLOATCUSTOMTAG: "e-float-custom-tag"
    };
    !function(Input) {
        function _focusFn() {
            var label = getParentNode(this).getElementsByClassName("e-float-text")[0];
            addClass([ label ], CLASSNAMES$3.LABELTOP), label.classList.contains(CLASSNAMES$3.LABELBOTTOM) && removeClass([ label ], CLASSNAMES$3.LABELBOTTOM);
        }
        function _blurFn() {
            var parent = getParentNode(this);
            if ("" === parent.getElementsByTagName("input")[0].value) {
                var label = parent.getElementsByClassName("e-float-text")[0];
                label.classList.contains(CLASSNAMES$3.LABELTOP) && removeClass([ label ], CLASSNAMES$3.LABELTOP), 
                addClass([ label ], CLASSNAMES$3.LABELBOTTOM);
            }
        }
        function createFloatingInput(args, inputObject) {
            var floatLinelement, floatLabelElement;
            "Auto" === args.floatLabelType && function(element) {
                element.addEventListener("focus", _focusFn), element.addEventListener("blur", _blurFn);
            }(args.element), isNullOrUndefined(inputObject.container) ? (inputObject.container = createInputContainer(args, CLASSNAMES$3.FLOATINPUT, CLASSNAMES$3.FLOATCUSTOMTAG, "div"), 
            args.element.parentNode.insertBefore(inputObject.container, args.element)) : (isNullOrUndefined(args.customTag) || inputObject.container.classList.add(CLASSNAMES$3.FLOATCUSTOMTAG), 
            inputObject.container.classList.add(CLASSNAMES$3.FLOATINPUT)), floatLinelement = createElement("span", {
                className: CLASSNAMES$3.FLOATLINE
            }), floatLabelElement = createElement("label", {
                className: CLASSNAMES$3.FLOATTEXT
            }), isNullOrUndefined(args.element.id) || "" === args.element.id || (floatLabelElement.id = "label_" + args.element.id.replace(/ /g, "_"), 
            attributes(args.element, {
                "aria-labelledby": floatLabelElement.id
            })), isNullOrUndefined(args.element.placeholder) || "" === args.element.placeholder || (floatLabelElement.innerHTML = args.element.placeholder, 
            args.element.removeAttribute("placeholder")), isNullOrUndefined(args.properties) || isNullOrUndefined(args.properties.placeholder) || "" === args.properties.placeholder || (floatLabelElement.innerHTML = args.properties.placeholder), 
            floatLabelElement.innerHTML || inputObject.container.classList.add(CLASSNAMES$3.NOFLOATLABEL), 
            inputObject.container.appendChild(args.element), inputObject.container.appendChild(floatLinelement), 
            inputObject.container.appendChild(floatLabelElement), updateLabelState(args.element.value, floatLabelElement), 
            "Always" === args.floatLabelType && (floatLabelElement.classList.contains(CLASSNAMES$3.LABELBOTTOM) && removeClass([ floatLabelElement ], CLASSNAMES$3.LABELBOTTOM), 
            addClass([ floatLabelElement ], CLASSNAMES$3.LABELTOP)), "Auto" === args.floatLabelType && (args.element.addEventListener("input", function(event) {
                updateLabelState(args.element.value, floatLabelElement);
            }), args.element.addEventListener("blur", function(event) {
                updateLabelState(args.element.value, floatLabelElement);
            }));
        }
        function updateIconState(value, button) {
            value ? removeClass([ button ], CLASSNAMES$3.CLEARICONHIDE) : addClass([ button ], CLASSNAMES$3.CLEARICONHIDE);
        }
        function updateLabelState(value, label) {
            value ? (addClass([ label ], CLASSNAMES$3.LABELTOP), label.classList.contains(CLASSNAMES$3.LABELBOTTOM) && removeClass([ label ], CLASSNAMES$3.LABELBOTTOM)) : (label.classList.contains(CLASSNAMES$3.LABELTOP) && removeClass([ label ], CLASSNAMES$3.LABELTOP), 
            addClass([ label ], CLASSNAMES$3.LABELBOTTOM));
        }
        function getParentNode(element) {
            return element.parentNode;
        }
        function createClearButton(element, inputObject, initial) {
            var button = createElement("span", {
                className: CLASSNAMES$3.CLEARICON
            }), container = inputObject.container;
            if (isNullOrUndefined(initial)) {
                (inputObject.container.classList.contains(CLASSNAMES$3.FLOATINPUT) ? inputObject.container.querySelector("." + CLASSNAMES$3.FLOATTEXT) : element).insertAdjacentElement("afterend", button);
            } else container.appendChild(button);
            return !isNullOrUndefined(container) && container.classList.contains(CLASSNAMES$3.FLOATINPUT) && addClass([ container ], CLASSNAMES$3.INPUTGROUP), 
            addClass([ button ], CLASSNAMES$3.CLEARICONHIDE), function(element, button) {
                button.addEventListener("click", function(event) {
                    element.classList.contains(CLASSNAMES$3.DISABLE) || element.readOnly || (event.preventDefault(), 
                    element !== document.activeElement && element.focus(), element.value = "", addClass([ button ], CLASSNAMES$3.CLEARICONHIDE));
                }), element.addEventListener("input", function(event) {
                    updateIconState(element.value, button);
                }), element.addEventListener("focus", function(event) {
                    updateIconState(element.value, button);
                }), element.addEventListener("blur", function(event) {
                    setTimeout(function() {
                        addClass([ button ], CLASSNAMES$3.CLEARICONHIDE);
                    }, 200);
                });
            }(element, button), button;
        }
        function validateLabel(element, floatLabelType) {
            if (getParentNode(element).classList.contains(CLASSNAMES$3.FLOATINPUT) && "Auto" === floatLabelType) {
                var label = getParentNode(element).getElementsByClassName("e-float-text")[0];
                updateLabelState(element.value, label);
            }
        }
        function createInputContainer(args, className, tagClass, tag) {
            var container;
            return isNullOrUndefined(args.customTag) ? container = createElement(tag, {
                className: className
            }) : (container = createElement(args.customTag, {
                className: className
            })).classList.add(tagClass), container.classList.add("e-control-wrapper"), container;
        }
        function setCssClass(cssClass, elements, oldClass) {
            isNullOrUndefined(oldClass) || "" === oldClass || removeClass(elements, oldClass), 
            isNullOrUndefined(cssClass) || "" === cssClass || addClass(elements, cssClass);
        }
        function setPlaceholder(placeholder, element) {
            var parentElement;
            (parentElement = getParentNode(element)).classList.contains(CLASSNAMES$3.FLOATINPUT) ? isNullOrUndefined(placeholder) || "" === placeholder ? (parentElement.classList.add(CLASSNAMES$3.NOFLOATLABEL), 
            parentElement.getElementsByClassName(CLASSNAMES$3.FLOATTEXT)[0].textContent = "") : (parentElement.getElementsByClassName(CLASSNAMES$3.FLOATTEXT)[0].textContent = placeholder, 
            parentElement.classList.remove(CLASSNAMES$3.NOFLOATLABEL)) : isNullOrUndefined(placeholder) || "" === placeholder ? (element.removeAttribute("placeholder"), 
            element.removeAttribute("aria-placeholder")) : attributes(element, {
                placeholder: placeholder,
                "aria-placeholder": placeholder
            });
        }
        function setReadonly(isReadonly, element, floatLabelType) {
            isReadonly ? attributes(element, {
                readonly: ""
            }) : element.removeAttribute("readonly"), isNullOrUndefined(floatLabelType) || validateLabel(element, floatLabelType);
        }
        function setEnableRtl(isRtl, elements) {
            isRtl ? addClass(elements, CLASSNAMES$3.RTL) : removeClass(elements, CLASSNAMES$3.RTL);
        }
        function setEnabled(isEnable, element, floatLabelType) {
            var disabledAttrs = {
                disabled: "disabled",
                "aria-disabled": "true"
            };
            isEnable ? (element.classList.remove(CLASSNAMES$3.DISABLE), removeAttributes(disabledAttrs, element)) : (element.classList.add(CLASSNAMES$3.DISABLE), 
            addAttributes(disabledAttrs, element)), isNullOrUndefined(floatLabelType) || validateLabel(element, floatLabelType);
        }
        function setClearButton(isClear, element, inputObject, initial) {
            isClear ? inputObject.clearButton = createClearButton(element, inputObject, initial) : (inputObject.clearButton.remove(), 
            inputObject.clearButton = null);
        }
        function removeAttributes(attrs, element) {
            for (var _i = 0, _a = Object.keys(attrs); _i < _a.length; _i++) {
                var key = _a[_i], parentElement = void 0;
                parentElement = getParentNode(element), "disabled" === key && element.classList.remove(CLASSNAMES$3.DISABLE), 
                "disabled" === key && parentElement.classList.contains(CLASSNAMES$3.INPUTGROUP) && parentElement.classList.remove(CLASSNAMES$3.DISABLE), 
                "placeholder" === key && parentElement.classList.contains(CLASSNAMES$3.FLOATINPUT) ? parentElement.getElementsByClassName(CLASSNAMES$3.FLOATTEXT)[0].textContent = "" : element.removeAttribute(key);
            }
        }
        function addAttributes(attrs, element) {
            for (var _i = 0, _a = Object.keys(attrs); _i < _a.length; _i++) {
                var key = _a[_i], parentElement = void 0;
                parentElement = getParentNode(element), "disabled" === key && element.classList.add(CLASSNAMES$3.DISABLE), 
                "disabled" === key && parentElement.classList.contains(CLASSNAMES$3.INPUTGROUP) && parentElement.classList.add(CLASSNAMES$3.DISABLE), 
                "placeholder" === key && parentElement.classList.contains(CLASSNAMES$3.FLOATINPUT) ? parentElement.getElementsByClassName(CLASSNAMES$3.FLOATTEXT)[0].textContent = attrs[key] : element.setAttribute(key, attrs[key]);
            }
        }
        function appendSpan(iconClass, container) {
            var button = createElement("span", {
                className: iconClass
            });
            return container.appendChild(button), container.classList.contains(CLASSNAMES$3.INPUTGROUP) || container.classList.add(CLASSNAMES$3.INPUTGROUP), 
            button.addEventListener("mousedown", function() {
                container.classList.contains("e-disabled") || container.querySelector("input").readOnly || this.classList.add("e-input-btn-ripple");
            }), button.addEventListener("mouseup", function() {
                var ele = this;
                setTimeout(function() {
                    ele.classList.remove("e-input-btn-ripple");
                }, 500);
            }), button;
        }
        Input.createInput = function(args) {
            var inputObject = {
                container: null,
                buttons: [],
                clearButton: null
            };
            if (isNullOrUndefined(args.floatLabelType) || "Never" === args.floatLabelType ? (inputObject.container = createInputContainer(args, CLASSNAMES$3.INPUTGROUP, CLASSNAMES$3.INPUTCUSTOMTAG, "span"), 
            args.element.parentNode.insertBefore(inputObject.container, args.element), addClass([ args.element ], CLASSNAMES$3.INPUT), 
            inputObject.container.appendChild(args.element)) : createFloatingInput(args, inputObject), 
            args.element.addEventListener("focus", function() {
                var parent = getParentNode(this);
                parent.classList.contains("e-input-group") && parent.classList.add("e-input-focus");
            }), args.element.addEventListener("blur", function() {
                var parent = getParentNode(this);
                parent.classList.contains("e-input-group") && parent.classList.remove("e-input-focus");
            }), isNullOrUndefined(args.properties) || isNullOrUndefined(args.properties.showClearButton) || !args.properties.showClearButton || (setClearButton(args.properties.showClearButton, args.element, inputObject, !0), 
            inputObject.container.classList.contains(CLASSNAMES$3.FLOATINPUT) && addClass([ inputObject.container ], CLASSNAMES$3.INPUTGROUP)), 
            !isNullOrUndefined(args.buttons)) for (var i = 0; i < args.buttons.length; i++) inputObject.buttons.push(appendSpan(args.buttons[i], inputObject.container));
            return inputObject = function(args, inputObject) {
                if (!isNullOrUndefined(args.properties)) for (var _i = 0, _a = Object.keys(args.properties); _i < _a.length; _i++) {
                    var prop = _a[_i];
                    switch (prop) {
                      case "cssClass":
                        setCssClass(args.properties.cssClass, [ inputObject.container ]);
                        break;

                      case "enabled":
                        setEnabled(args.properties.enabled, args.element);
                        break;

                      case "enableRtl":
                        setEnableRtl(args.properties.enableRtl, [ inputObject.container ]);
                        break;

                      case "placeholder":
                        setPlaceholder(args.properties.placeholder, args.element);
                        break;

                      case "readonly":
                        setReadonly(args.properties.readonly, args.element);
                    }
                }
                return inputObject;
            }(args, inputObject);
        }, Input.setValue = function(value, element, floatLabelType, clearButton) {
            if (element.value = value, isNullOrUndefined(floatLabelType) || "Auto" !== floatLabelType || validateLabel(element, floatLabelType), 
            !isNullOrUndefined(clearButton) && clearButton) {
                var parentElement = getParentNode(element), button = parentElement.getElementsByClassName(CLASSNAMES$3.CLEARICON)[0];
                element.value && parentElement.classList.contains("e-input-focus") ? removeClass([ button ], CLASSNAMES$3.CLEARICONHIDE) : addClass([ button ], CLASSNAMES$3.CLEARICONHIDE);
            }
        }, Input.setCssClass = setCssClass, Input.setPlaceholder = setPlaceholder, Input.setReadonly = setReadonly, 
        Input.setEnableRtl = setEnableRtl, Input.setEnabled = setEnabled, Input.setClearButton = setClearButton, 
        Input.removeAttributes = removeAttributes, Input.addAttributes = addAttributes, 
        Input.removeFloating = function(input) {
            var container = input.container;
            if (!isNullOrUndefined(container) && container.classList.contains(CLASSNAMES$3.FLOATINPUT)) {
                var inputEle = container.querySelector("input"), placeholder = container.querySelector("." + CLASSNAMES$3.FLOATTEXT).textContent, clearButton = null !== container.querySelector(".e-clear-icon");
                detach(container.querySelector("." + CLASSNAMES$3.FLOATLINE)), detach(container.querySelector("." + CLASSNAMES$3.FLOATTEXT)), 
                classList(container, [ CLASSNAMES$3.INPUTGROUP ], [ CLASSNAMES$3.FLOATINPUT ]), 
                function(element) {
                    element.removeEventListener("focus", _focusFn), element.removeEventListener("blur", _blurFn);
                }(inputEle), attributes(inputEle, {
                    placeholder: placeholder
                }), inputEle.classList.add(CLASSNAMES$3.INPUT), clearButton || inputEle.removeAttribute("required");
            }
        }, Input.addFloating = function(input, type, placeholder) {
            var container = closest(input, "." + CLASSNAMES$3.INPUTGROUP);
            if ("Never" !== type) {
                var customTag = container.tagName, args = {
                    element: input,
                    floatLabelType: type,
                    customTag: customTag = "DIV" !== customTag && "SPAN" !== customTag ? customTag : null,
                    properties: {
                        placeholder: placeholder
                    }
                }, iconEle = container.querySelector(".e-clear-icon"), inputObj = {
                    container: container
                };
                if (input.classList.remove(CLASSNAMES$3.INPUT), createFloatingInput(args, inputObj), 
                isNullOrUndefined(iconEle) && (iconEle = container.querySelector(".e-input-group-icon")), 
                isNullOrUndefined(iconEle)) container.classList.remove(CLASSNAMES$3.INPUTGROUP); else {
                    var floatLine = container.querySelector("." + CLASSNAMES$3.FLOATLINE), floatText = container.querySelector("." + CLASSNAMES$3.FLOATTEXT);
                    container.insertBefore(input, iconEle), container.insertBefore(floatLine, iconEle), 
                    container.insertBefore(floatText, iconEle);
                }
            }
        }, Input.appendSpan = appendSpan;
    }(Input$1 || (Input$1 = {}));
    var rowHeight, ERROR$5 = "e-error", INPUTGROUP$1 = "e-input-group", FLOATINPUT$1 = "e-float-input", TOPLABEL$1 = "e-label-top", BOTTOMLABEL$1 = "e-label-bottom", regularExpressions$1 = {
        "0": "[0-9]",
        "9": "[0-9 ]",
        "#": "[0-9 +-]",
        L: "[A-Za-z]",
        "?": "[A-Za-z ]",
        "&": "[^ ]+",
        C: "[^]+",
        A: "[A-Za-z0-9]",
        a: "[A-Za-z0-9 ]"
    }, __extends$23 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$22 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, MaskedTextBox$1 = function(_super) {
        function MaskedTextBox(options, element) {
            return _super.call(this, options, element) || this;
        }
        return __extends$23(MaskedTextBox, _super), MaskedTextBox.prototype.getModuleName = function() {
            return "maskedtextbox";
        }, MaskedTextBox.prototype.preRender = function() {
            this.promptMask = "", this.hiddenMask = "", this.escapeMaskValue = "", this.regExpCollec = regularExpressions$1, 
            this.customRegExpCollec = [], this.undoCollec = [], this.redoCollec = [], this.changeEventArgs = {}, 
            this.focusEventArgs = {}, this.maskKeyPress = !1, this.isFocus = !1, this.isInitial = !1, 
            this.isIosInvalid = !1;
            var ejInstance = getValue("ej2_instances", this.element);
            if (this.cloneElement = this.element.cloneNode(!0), this.angularTagName = null, 
            "EJS-MASKEDTEXTBOX" === this.element.tagName) {
                this.angularTagName = this.element.tagName;
                for (var input = createElement("input"), i = 0; i < this.element.attributes.length; i++) input.setAttribute(this.element.attributes[i].nodeName, this.element.attributes[i].nodeValue), 
                input.innerHTML = this.element.innerHTML;
                this.element.parentNode.appendChild(input), this.element.parentNode.removeChild(this.element), 
                this.element = input, setValue("ej2_instances", ejInstance, this.element);
            }
        }, MaskedTextBox.prototype.getPersistData = function() {
            return this.addOnPersist([ "value" ]);
        }, MaskedTextBox.prototype.render = function() {
            "input" === this.element.tagName.toLowerCase() && ("Never" === this.floatLabelType && addClass([ this.element ], "e-input"), 
            this.createWrapper(), this.isInitial = !0, this.resetMaskedTextBox(), this.isInitial = !1, 
            this.setMaskPlaceholder(!0), this.setWidth(this.width));
        }, MaskedTextBox.prototype.resetMaskedTextBox = function() {
            this.promptMask = "", this.hiddenMask = "", this.escapeMaskValue = "", this.customRegExpCollec = [], 
            this.undoCollec = [], this.redoCollec = [], this.promptChar.length > 1 && (this.promptChar = this.promptChar[0]), 
            function() {
                if (attributes(this.element, {
                    role: "textbox",
                    autocomplete: "off",
                    autocorrect: "off",
                    autocapitalize: "off",
                    spellcheck: "false",
                    "aria-live": "assertive",
                    "aria-valuenow": ""
                }), this.mask) {
                    for (var splitMask = this.mask.split("]"), i = 0; i < splitMask.length; i++) if ("\\" === splitMask[i][splitMask[i].length - 1]) {
                        splitMask[i] = splitMask[i] + "]";
                        for (var splitInnerMask = splitMask[i].split("["), j = 0; j < splitInnerMask.length; j++) "\\" === splitInnerMask[j][splitInnerMask[j].length - 1] && (splitInnerMask[j] = splitInnerMask[j] + "["), 
                        pushIntoRegExpCollec$1.call(this, splitInnerMask[j]);
                    } else if ((splitInnerMask = splitMask[i].split("[")).length > 1) {
                        var chkSpace = !1;
                        for (j = 0; j < splitInnerMask.length; j++) "\\" === splitInnerMask[j] ? (this.customRegExpCollec.push("["), 
                        this.hiddenMask += splitInnerMask[j] + "[") : "" === splitInnerMask[j] ? chkSpace = !0 : "" !== splitInnerMask[j] && chkSpace || j === splitInnerMask.length - 1 ? (this.customRegExpCollec.push("[" + splitInnerMask[j] + "]"), 
                        this.hiddenMask += this.promptChar, chkSpace = !1) : pushIntoRegExpCollec$1.call(this, splitInnerMask[j]);
                    } else pushIntoRegExpCollec$1.call(this, splitInnerMask[0]);
                    if (this.escapeMaskValue = this.hiddenMask, this.promptMask = this.hiddenMask.replace(/[09?LCAa#&]/g, this.promptChar), 
                    !isNullOrUndefined(this.customCharacters)) for (i = 0; i < this.promptMask.length; i++) isNullOrUndefined(this.customCharacters[this.promptMask[i]]) || (this.promptMask = this.promptMask.replace(new RegExp(this.promptMask[i], "g"), this.promptChar));
                    var escapeNumber = 0;
                    if (this.hiddenMask.match(new RegExp(/\\/))) for (i = 0; i < this.hiddenMask.length; i++) j = 0, 
                    i >= 2 && (j = i), j -= escapeNumber = this.hiddenMask.length - this.promptMask.length, 
                    i > 0 && "\\" !== this.hiddenMask[i - 1] && (">" === this.hiddenMask[i] || "<" === this.hiddenMask[i] || "|" === this.hiddenMask[i]) && (this.promptMask = this.promptMask.substring(0, j) + this.promptMask.substring(i + 1 - escapeNumber, this.promptMask.length), 
                    this.escapeMaskValue = this.escapeMaskValue.substring(0, j) + this.escapeMaskValue.substring(i + 1 - escapeNumber, this.escapeMaskValue.length)), 
                    "\\" === this.hiddenMask[i] && (this.promptMask = this.promptMask.substring(0, j) + this.hiddenMask[i + 1] + this.promptMask.substring(i + 2 - escapeNumber, this.promptMask.length), 
                    this.escapeMaskValue = this.escapeMaskValue.substring(0, j) + this.escapeMaskValue[i + 1] + this.escapeMaskValue.substring(i + 2 - escapeNumber, this.escapeMaskValue.length)); else this.promptMask = this.promptMask.replace(/[>|<]/g, ""), 
                    this.escapeMaskValue = this.hiddenMask.replace(/[>|<]/g, "");
                    attributes(this.element, {
                        "aria-invalid": "false"
                    });
                }
            }.call(this), function() {
                setElementValue$1.call(this, this.promptMask), setMaskValue$1.call(this, this.value);
            }.call(this);
            var val = strippedValue$1.call(this, this.element);
            this.prevValue = val, this.value = val, this.isInitial || unwireEvents$1.call(this), 
            function() {
                EventHandler.add(this.element, "keydown", maskInputKeyDownHandler$1, this), EventHandler.add(this.element, "keypress", maskInputKeyPressHandler$1, this), 
                EventHandler.add(this.element, "keyup", maskInputKeyUpHandler$1, this), EventHandler.add(this.element, "focus", maskInputFocusHandler$1, this), 
                EventHandler.add(this.element, "blur", maskInputBlurHandler$1, this), EventHandler.add(this.element, "paste", maskInputPasteHandler$1, this), 
                EventHandler.add(this.element, "cut", maskInputCutHandler$1, this), EventHandler.add(this.element, "drop", maskInputDropHandler$1, this);
            }.call(this);
        }, MaskedTextBox.prototype.setMaskPlaceholder = function(setVal) {
            this.placeholder && (Input$1.setPlaceholder(this.placeholder, this.element), this.element.value === this.promptMask && setVal && "Always" !== this.floatLabelType && setElementValue$1.call(this, ""), 
            "Never" === this.floatLabelType && maskInputBlurHandler$1.call(this));
        }, MaskedTextBox.prototype.setCssClass = function(cssClass, element) {
            cssClass && addClass(element, cssClass);
        }, MaskedTextBox.prototype.setWidth = function(width) {
            isNullOrUndefined(width) || (this.element.style.width = formatUnit(width));
        }, MaskedTextBox.prototype.createWrapper = function() {
            this.inputObj = Input$1.createInput({
                element: this.element,
                customTag: this.angularTagName,
                floatLabelType: this.floatLabelType,
                properties: {
                    enableRtl: this.enableRtl,
                    enabled: this.enabled,
                    placeholder: this.placeholder
                }
            }), this.inputObj.container.setAttribute("class", "e-widget e-control-wrapper e-mask " + this.inputObj.container.getAttribute("class"));
        }, MaskedTextBox.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "value":
                    setMaskValue$1.call(this, this.value), this.placeholder && this.setMaskPlaceholder(!1);
                    break;

                  case "placeholder":
                    this.setMaskPlaceholder(!0);
                    break;

                  case "width":
                    this.setWidth(newProp.width);
                    break;

                  case "cssClass":
                    this.setCssClass(newProp.cssClass, [ this.inputObj.container ]);
                    break;

                  case "enabled":
                    Input$1.setEnabled(newProp.enabled, this.element);
                    break;

                  case "enableRtl":
                    Input$1.setEnableRtl(newProp.enableRtl, [ this.inputObj.container ]);
                    break;

                  case "customCharacters":
                    this.customCharacters = newProp.customCharacters, this.resetMaskedTextBox();
                    break;

                  case "mask":
                    var strippedValue_1 = this.value;
                    this.mask = newProp.mask, this.updateValue(strippedValue_1);
                    break;

                  case "promptChar":
                    newProp.promptChar.length > 1 && (newProp.promptChar = newProp.promptChar[0]), newProp.promptChar ? this.promptChar = newProp.promptChar : this.promptChar = "_";
                    var value = this.element.value.replace(new RegExp("[" + oldProp.promptChar + "]", "g"), this.promptChar);
                    this.promptMask === this.element.value && (value = this.promptMask.replace(new RegExp("[" + oldProp.promptChar + "]", "g"), this.promptChar)), 
                    this.promptMask = this.promptMask.replace(new RegExp("[" + oldProp.promptChar + "]", "g"), this.promptChar), 
                    this.undoCollec = this.redoCollec = [], setElementValue$1.call(this, value);
                }
            }
        }, MaskedTextBox.prototype.updateValue = function(strippedVal) {
            this.resetMaskedTextBox(), setMaskValue$1.call(this, strippedVal);
        }, MaskedTextBox.prototype.getMaskedValue = function() {
            return function(element) {
                return element.value;
            }.call(this, this.element);
        }, MaskedTextBox.prototype.destroy = function() {
            unwireEvents$1.call(this), this.inputObj.container.parentElement.appendChild(this.cloneElement), 
            detach(this.inputObj.container), _super.prototype.destroy.call(this);
        }, __decorate$22([ Property(null) ], MaskedTextBox.prototype, "cssClass", void 0), 
        __decorate$22([ Property(null) ], MaskedTextBox.prototype, "width", void 0), __decorate$22([ Property(null) ], MaskedTextBox.prototype, "placeholder", void 0), 
        __decorate$22([ Property("Never") ], MaskedTextBox.prototype, "floatLabelType", void 0), 
        __decorate$22([ Property(!0) ], MaskedTextBox.prototype, "enabled", void 0), __decorate$22([ Property(!1) ], MaskedTextBox.prototype, "enablePersistence", void 0), 
        __decorate$22([ Property(!1) ], MaskedTextBox.prototype, "enableRtl", void 0), __decorate$22([ Property(null) ], MaskedTextBox.prototype, "mask", void 0), 
        __decorate$22([ Property("_") ], MaskedTextBox.prototype, "promptChar", void 0), 
        __decorate$22([ Property(null) ], MaskedTextBox.prototype, "value", void 0), __decorate$22([ Property(null) ], MaskedTextBox.prototype, "customCharacters", void 0), 
        __decorate$22([ Event() ], MaskedTextBox.prototype, "created", void 0), __decorate$22([ Event() ], MaskedTextBox.prototype, "destroyed", void 0), 
        __decorate$22([ Event() ], MaskedTextBox.prototype, "change", void 0), __decorate$22([ Event() ], MaskedTextBox.prototype, "focus", void 0), 
        MaskedTextBox = __decorate$22([ NotifyPropertyChanges ], MaskedTextBox);
    }(Component), __extends$24 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$23 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, INTREGEXP$1 = new RegExp("/^(-)?(d*)$/"), NumericTextBox$1 = function(_super) {
        function NumericTextBox(options, element) {
            return _super.call(this, options, element) || this;
        }
        return __extends$24(NumericTextBox, _super), NumericTextBox.prototype.preRender = function() {
            this.isPrevFocused = !1, this.decimalSeparator = ".", this.intRegExp = new RegExp("/^(-)?(d*)$/"), 
            this.isCalled = !1;
            var ejInstance = getValue("ej2_instances", this.element);
            if (this.cloneElement = this.element.cloneNode(!0), this.angularTagName = null, 
            "EJS-NUMERICTEXTBOX" === this.element.tagName) {
                this.angularTagName = this.element.tagName;
                for (var input = createElement("input"), index = 0; index < this.element.attributes.length; index++) input.setAttribute(this.element.attributes[index].nodeName, this.element.attributes[index].nodeValue), 
                input.innerHTML = this.element.innerHTML;
                this.element.parentNode.appendChild(input), this.element.parentNode.removeChild(this.element), 
                this.element = input, setValue("ej2_instances", ejInstance, this.element);
            }
            attributes(this.element, {
                role: "spinbutton",
                tabindex: "0",
                autocomplete: "off",
                "aria-live": "assertive"
            });
            this.l10n = new L10n("numerictextbox", {
                incrementTitle: "Increment value",
                decrementTitle: "Decrement value",
                placeholder: ""
            }, this.locale), this.isValidState = !0, this.inputStyle = null, this.inputName = null, 
            this.cultureInfo = {}, this.initCultureInfo(), this.initCultureFunc(), this.checkAttributes(), 
            this.prevValue = this.value, this.validateMinMax(), this.validateStep(), null === this.placeholder && this.updatePlaceholder();
        }, NumericTextBox.prototype.render = function() {
            "input" === this.element.tagName.toLowerCase() && (this.createWrapper(), this.showSpinButton && this.spinBtnCreation(), 
            isNullOrUndefined(this.width) || setStyleAttribute(this.container, {
                width: formatUnit(this.width)
            }), this.changeValue(this.value), this.wireEvents(), null === this.value || isNaN(this.value) || this.decimals && this.setProperties({
                value: this.roundNumber(this.value, this.decimals)
            }, !0));
        }, NumericTextBox.prototype.checkAttributes = function() {
            for (var _i = 0, attributes_1 = [ "value", "min", "max", "step", "disabled", "readonly", "style", "name" ]; _i < attributes_1.length; _i++) {
                var prop = attributes_1[_i];
                if (!isNullOrUndefined(this.element.getAttribute(prop))) switch (prop) {
                  case "disabled":
                    var enabled = "disabled" !== this.element.getAttribute(prop) && "true" !== this.element.getAttribute(prop);
                    this.setProperties({
                        enabled: enabled
                    }, !0);
                    break;

                  case "readonly":
                    var readonly = "readonly" === this.element.getAttribute(prop) || "true" === this.element.getAttribute(prop);
                    this.setProperties({
                        readonly: readonly
                    }, !0);
                    break;

                  case "style":
                    this.inputStyle = this.element.getAttribute(prop);
                    break;

                  case "name":
                    this.inputName = this.element.getAttribute(prop);
                    break;

                  default:
                    var value = this.instance.getNumberParser({
                        format: "n"
                    })(this.element.getAttribute(prop));
                    (null !== value && !isNaN(value) || "value" === prop) && this.setProperties(setValue(prop, value, {}), !0);
                }
            }
        }, NumericTextBox.prototype.updatePlaceholder = function() {
            this.setProperties({
                placeholder: this.l10n.getConstant("placeholder")
            }, !0);
        }, NumericTextBox.prototype.initCultureFunc = function() {
            this.instance = new Internationalization(this.locale);
        }, NumericTextBox.prototype.initCultureInfo = function() {
            this.cultureInfo.format = this.format, null !== getValue("currency", this) && (setValue("currency", this.currency, this.cultureInfo), 
            this.setProperties({
                currencyCode: this.currency
            }, !0));
        }, NumericTextBox.prototype.createWrapper = function() {
            var inputObj = Input$1.createInput({
                element: this.element,
                customTag: this.angularTagName,
                floatLabelType: this.floatLabelType,
                properties: {
                    readonly: this.readonly,
                    placeholder: this.placeholder,
                    cssClass: this.cssClass,
                    enableRtl: this.enableRtl,
                    enabled: this.enabled
                }
            });
            this.container = inputObj.container, this.container.setAttribute("class", "e-control-wrapper e-numeric " + this.container.getAttribute("class")), 
            this.readonly && attributes(this.element, {
                "aria-readonly": "true"
            }), this.hiddenInput = createElement("input", {
                attrs: {
                    type: "hidden"
                }
            }), this.inputName = null !== this.inputName ? this.inputName : this.element.id, 
            this.element.removeAttribute("name"), attributes(this.hiddenInput, {
                name: this.inputName
            }), this.container.insertBefore(this.hiddenInput, this.element), null !== this.inputStyle && attributes(this.container, {
                style: this.inputStyle
            });
        }, NumericTextBox.prototype.spinBtnCreation = function() {
            this.spinDown = Input$1.appendSpan("e-input-group-icon e-spin-down", this.container), 
            attributes(this.spinDown, {
                title: this.l10n.getConstant("decrementTitle"),
                "aria-label": this.l10n.getConstant("decrementTitle")
            }), this.spinUp = Input$1.appendSpan("e-input-group-icon e-spin-up", this.container), 
            attributes(this.spinUp, {
                title: this.l10n.getConstant("incrementTitle"),
                "aria-label": this.l10n.getConstant("incrementTitle")
            }), this.wireSpinBtnEvents();
        }, NumericTextBox.prototype.validateMinMax = function() {
            ("number" != typeof this.min || isNaN(this.min)) && this.setProperties({
                min: -Number.MAX_VALUE
            }, !0), ("number" != typeof this.max || isNaN(this.max)) && this.setProperties({
                max: Number.MAX_VALUE
            }, !0), null !== this.decimals && (this.min !== -Number.MAX_VALUE && this.setProperties({
                min: this.instance.getNumberParser({
                    format: "n"
                })(this.formattedValue(this.decimals, this.min))
            }, !0), this.max !== Number.MAX_VALUE && this.setProperties({
                max: this.instance.getNumberParser({
                    format: "n"
                })(this.formattedValue(this.decimals, this.max))
            }, !0)), this.setProperties({
                min: this.min > this.max ? this.max : this.min
            }, !0), attributes(this.element, {
                "aria-valuemin": this.min.toString(),
                "aria-valuemax": this.max.toString()
            });
        }, NumericTextBox.prototype.formattedValue = function(decimals, value) {
            return this.instance.getNumberFormat({
                maximumFractionDigits: decimals,
                minimumFractionDigits: decimals,
                useGrouping: !1
            })(value);
        }, NumericTextBox.prototype.validateStep = function() {
            null !== this.decimals && this.setProperties({
                step: this.instance.getNumberParser({
                    format: "n"
                })(this.formattedValue(this.decimals, this.step))
            }, !0);
        }, NumericTextBox.prototype.action = function(operation, event) {
            this.isInteract = !0;
            var value = this.isFocused ? this.instance.getNumberParser({
                format: "n"
            })(this.element.value) : this.value;
            this.changeValue(this.performAction(value, this.step, operation)), this.raiseChangeEvent(event);
        }, NumericTextBox.prototype.checkErrorClass = function() {
            this.isValidState ? removeClass([ this.container ], "e-error") : addClass([ this.container ], "e-error"), 
            attributes(this.element, {
                "aria-invalid": this.isValidState ? "false" : "true"
            });
        }, NumericTextBox.prototype.wireEvents = function() {
            EventHandler.add(this.element, "focus", this.focusIn, this), EventHandler.add(this.element, "blur", this.focusOut, this), 
            EventHandler.add(this.element, "keydown", this.keyDownHandler, this), EventHandler.add(this.element, "keypress", this.keyPressHandler, this), 
            EventHandler.add(this.element, "change", this.changeHandler, this), EventHandler.add(this.element, "paste", this.pasteHandler, this);
        }, NumericTextBox.prototype.wireSpinBtnEvents = function() {
            EventHandler.add(this.spinUp, Browser.touchStartEvent, this.mouseDownOnSpinner, this), 
            EventHandler.add(this.spinDown, Browser.touchStartEvent, this.mouseDownOnSpinner, this), 
            EventHandler.add(this.spinUp, Browser.touchEndEvent, this.mouseUpOnSpinner, this), 
            EventHandler.add(this.spinDown, Browser.touchEndEvent, this.mouseUpOnSpinner, this), 
            EventHandler.add(this.spinUp, Browser.touchMoveEvent, this.touchMoveOnSpinner, this), 
            EventHandler.add(this.spinDown, Browser.touchMoveEvent, this.touchMoveOnSpinner, this);
        }, NumericTextBox.prototype.unwireEvents = function() {
            EventHandler.remove(this.element, "focus", this.focusIn), EventHandler.remove(this.element, "blur", this.focusOut), 
            EventHandler.remove(this.element, "keydown", this.keyDownHandler), EventHandler.remove(this.element, "keypress", this.keyPressHandler), 
            EventHandler.remove(this.element, "change", this.changeHandler), EventHandler.remove(this.element, "paste", this.pasteHandler);
        }, NumericTextBox.prototype.unwireSpinBtnEvents = function() {
            EventHandler.remove(this.spinUp, Browser.touchStartEvent, this.mouseDownOnSpinner), 
            EventHandler.remove(this.spinDown, Browser.touchStartEvent, this.mouseDownOnSpinner), 
            EventHandler.remove(this.spinUp, Browser.touchEndEvent, this.mouseUpOnSpinner), 
            EventHandler.remove(this.spinDown, Browser.touchEndEvent, this.mouseUpOnSpinner), 
            EventHandler.remove(this.spinUp, Browser.touchMoveEvent, this.touchMoveOnSpinner), 
            EventHandler.remove(this.spinDown, Browser.touchMoveEvent, this.touchMoveOnSpinner);
        }, NumericTextBox.prototype.changeHandler = function(event) {
            this.element.value.length || this.setProperties({
                value: null
            }, !0);
            var parsedInput = this.instance.getNumberParser({
                format: "n"
            })(this.element.value);
            this.updateValue(parsedInput, event);
        }, NumericTextBox.prototype.raiseChangeEvent = function(event) {
            if (this.prevValue !== this.value) {
                var eventArgs = {};
                this.changeEventArgs = {
                    value: this.value,
                    previousValue: this.prevValue,
                    isInteraction: this.isInteract,
                    event: event
                }, event && (this.changeEventArgs.event = event), merge(eventArgs, this.changeEventArgs), 
                this.prevValue = this.value, this.isInteract = !1, this.trigger("change", eventArgs);
            }
        }, NumericTextBox.prototype.pasteHandler = function() {
            var _this = this, beforeUpdate = this.element.value;
            setTimeout(function() {
                _this.numericRegex().test(_this.element.value) || _this.setElementValue(beforeUpdate);
            });
        }, NumericTextBox.prototype.keyDownHandler = function(event) {
            switch (event.keyCode) {
              case 38:
                event.preventDefault(), this.action("increment", event);
                break;

              case 40:
                event.preventDefault(), this.action("decrement", event);
            }
            this.element.value.length || (this.setProperties({
                value: null
            }, !0), this.isKeyDown = !0, this.updateValue(this.instance.getNumberParser({
                format: "n"
            })(this.element.value)), this.isKeyDown = !1);
        }, NumericTextBox.prototype.performAction = function(value, step, operation) {
            (null === value || isNaN(value)) && (value = 0);
            var updatedValue = "increment" === operation ? value + step : value - step;
            return updatedValue = this.correctRounding(value, step, updatedValue), this.strictMode ? this.trimValue(updatedValue) : updatedValue;
        }, NumericTextBox.prototype.correctRounding = function(value, step, result) {
            var floatExp = new RegExp("[,.](.*)"), floatValue = (value.toString(), step.toString(), 
            floatExp.test(value.toString())), floatStep = floatExp.test(step.toString());
            if (floatValue || floatStep) {
                var valueCount = floatValue ? floatExp.exec(value.toString())[0].length : 0, stepCount = floatStep ? floatExp.exec(step.toString())[0].length : 0, max = Math.max(valueCount, stepCount);
                return value = this.roundValue(result, max);
            }
            return result;
        }, NumericTextBox.prototype.roundValue = function(result, precision) {
            precision = precision || 0;
            var divide = Math.pow(10, precision);
            return result *= divide, result = Math.round(result) / divide;
        }, NumericTextBox.prototype.updateValue = function(value, event) {
            event && (this.isInteract = !0), null === value || isNaN(value) || this.decimals && (value = this.roundNumber(value, this.decimals)), 
            this.changeValue(null === value || isNaN(value) ? null : this.strictMode ? this.trimValue(value) : value), 
            this.isKeyDown || this.raiseChangeEvent(event);
        }, NumericTextBox.prototype.updateCurrency = function(prop, propVal) {
            setValue(prop, propVal, this.cultureInfo), this.updateValue(this.value);
        }, NumericTextBox.prototype.changeValue = function(value) {
            if (value || 0 === value) {
                var numberOfDecimals = void 0, decimalPart = value.toString().split(".")[1];
                numberOfDecimals = decimalPart && decimalPart.length ? decimalPart.length : 0, null !== this.decimals && (numberOfDecimals = numberOfDecimals < this.decimals ? numberOfDecimals : this.decimals), 
                this.setProperties({
                    value: this.roundNumber(value, numberOfDecimals)
                }, !0);
            } else value = null, this.setProperties({
                value: value
            }, !0);
            this.modifyText(), this.strictMode || this.validateState();
        }, NumericTextBox.prototype.modifyText = function() {
            if (this.value || 0 === this.value) {
                var value = this.formatNumber(), elementValue = this.isFocused ? value : this.instance.getNumberFormat(this.cultureInfo)(this.value);
                this.setElementValue(elementValue), attributes(this.element, {
                    "aria-valuenow": value
                }), this.hiddenInput.value = value;
            } else this.setElementValue(""), this.element.removeAttribute("aria-valuenow"), 
            this.hiddenInput.value = null;
        }, NumericTextBox.prototype.setElementValue = function(val, element) {
            Input$1.setValue(val, element || this.element, this.floatLabelType);
        }, NumericTextBox.prototype.validateState = function() {
            this.isValidState = !0, (this.value || 0 === this.value) && (this.isValidState = !(this.value > this.max || this.value < this.min)), 
            this.checkErrorClass();
        }, NumericTextBox.prototype.formatNumber = function() {
            var numberOfDecimals, decimalPart = this.value.toString().split(".")[1];
            return numberOfDecimals = decimalPart && decimalPart.length ? decimalPart.length : 0, 
            null !== this.decimals && (numberOfDecimals = numberOfDecimals < this.decimals ? numberOfDecimals : this.decimals), 
            this.instance.getNumberFormat({
                maximumFractionDigits: numberOfDecimals,
                minimumFractionDigits: numberOfDecimals,
                useGrouping: !1
            })(this.value);
        }, NumericTextBox.prototype.trimValue = function(value) {
            return value > this.max ? this.max : value < this.min ? this.min : value;
        }, NumericTextBox.prototype.roundNumber = function(value, precision) {
            var result = value, decimals = precision || 0, result1 = result.toString().split("e"), result2 = (result = Math.round(Number(result1[0] + "e" + (result1[1] ? Number(result1[1]) + decimals : decimals)))).toString().split("e");
            return result = Number(result2[0] + "e" + (result2[1] ? Number(result2[1]) - decimals : -decimals)), 
            Number(result.toFixed(decimals));
        }, NumericTextBox.prototype.cancelEvent = function(event) {
            return event.preventDefault(), !1;
        }, NumericTextBox.prototype.keyPressHandler = function(event) {
            if (0 === event.which || event.metaKey || event.ctrlKey || 8 === event.keyCode || 13 === event.keyCode) return !0;
            var currentChar = String.fromCharCode(event.which), text = this.element.value;
            return text = text.substring(0, this.element.selectionStart) + currentChar + text.substring(this.element.selectionEnd), 
            !!this.numericRegex().test(text) || (event.preventDefault(), event.stopPropagation(), 
            !1);
        }, NumericTextBox.prototype.numericRegex = function() {
            var decimalSeparator = getValue("decimal", getNumericObject(this.locale)), fractionRule = "*";
            return "." === decimalSeparator && (decimalSeparator = "\\" + decimalSeparator), 
            0 === this.decimals ? INTREGEXP$1 : (this.decimals && this.validateDecimalOnType && (fractionRule = "{0," + this.decimals + "}"), 
            new RegExp("^(-)?(((\\d+(" + decimalSeparator + "\\d" + fractionRule + ")?)|(" + decimalSeparator + "\\d" + fractionRule + ")))?$"));
        }, NumericTextBox.prototype.mouseWheel = function(event) {
            event.preventDefault();
            var delta, rawEvent = event;
            rawEvent.wheelDelta ? delta = rawEvent.wheelDelta / 120 : rawEvent.detail && (delta = -rawEvent.detail / 3), 
            delta > 0 ? this.action("increment", event) : delta < 0 && this.action("decrement", event), 
            this.cancelEvent(event);
        }, NumericTextBox.prototype.focusIn = function(event) {
            if (this.enabled && !this.readonly) {
                if (this.isFocused = !0, removeClass([ this.container ], "e-error"), this.prevValue = this.value, 
                this.value || 0 === this.value) {
                    var formatValue = this.formatNumber();
                    this.setElementValue(formatValue), this.isPrevFocused || this.element.setSelectionRange(0, formatValue.length);
                }
                Browser.isDevice || EventHandler.add(this.element, "mousewheel DOMMouseScroll", this.mouseWheel, this);
            }
        }, NumericTextBox.prototype.focusOut = function(event) {
            var _this = this;
            if (this.isPrevFocused) {
                if (event.preventDefault(), Browser.isDevice) {
                    var value_1 = this.element.value;
                    this.element.focus(), this.isPrevFocused = !1;
                    var ele_1 = this.element;
                    setTimeout(function() {
                        _this.setElementValue(value_1, ele_1);
                    }, 200);
                }
            } else {
                this.isFocused = !1, this.element.value.length || this.setProperties({
                    value: null
                }, !0);
                var parsedInput = this.instance.getNumberParser({
                    format: "n"
                })(this.element.value);
                this.updateValue(parsedInput), Browser.isDevice || EventHandler.remove(this.element, "mousewheel DOMMouseScroll", this.mouseWheel);
            }
        }, NumericTextBox.prototype.mouseDownOnSpinner = function(event) {
            var _this = this;
            if (this.isFocused && (this.isPrevFocused = !0, event.preventDefault()), this.getElementData(event)) {
                this.getElementData(event);
                var target = event.currentTarget, action = target.classList.contains("e-spin-up") ? "increment" : "decrement";
                EventHandler.add(target, "mouseleave", this.mouseUpClick, this), this.timeOut = setInterval(function() {
                    _this.isCalled = !0, _this.action(action, event);
                }, 150), EventHandler.add(document, "mouseup", this.mouseUpClick, this);
            }
        }, NumericTextBox.prototype.touchMoveOnSpinner = function(event) {
            document.elementFromPoint(event.clientX, event.clientY).classList.contains("e-input-group-icon") || clearInterval(this.timeOut);
        }, NumericTextBox.prototype.mouseUpOnSpinner = function(event) {
            if (this.isPrevFocused && (this.element.focus(), Browser.isDevice || (this.isPrevFocused = !1)), 
            Browser.isDevice || event.preventDefault(), this.getElementData(event)) {
                var target = event.currentTarget, action = target.classList.contains("e-spin-up") ? "increment" : "decrement";
                EventHandler.remove(target, "mouseleave", this.mouseUpClick), this.isCalled || this.action(action, event), 
                this.isCalled = !1, EventHandler.remove(document, "mouseup", this.mouseUpClick);
            }
        }, NumericTextBox.prototype.getElementData = function(event) {
            return !(event.which && 3 === event.which || event.button && 2 === event.button || !this.enabled || this.readonly) && (clearInterval(this.timeOut), 
            !0);
        }, NumericTextBox.prototype.mouseUpClick = function(event) {
            event.stopPropagation(), clearInterval(this.timeOut), this.isCalled = !1, EventHandler.remove(this.spinUp, "mouseleave", this.mouseUpClick), 
            EventHandler.remove(this.spinDown, "mouseleave", this.mouseUpClick);
        }, NumericTextBox.prototype.increment = function(step) {
            void 0 === step && (step = this.step), this.changeValue(this.performAction(this.value, step, "increment"));
        }, NumericTextBox.prototype.decrement = function(step) {
            void 0 === step && (step = this.step), this.changeValue(this.performAction(this.value, step, "decrement"));
        }, NumericTextBox.prototype.destroy = function() {
            this.unwireEvents(), detach(this.hiddenInput), this.showSpinButton && (this.unwireSpinBtnEvents(), 
            detach(this.spinUp), detach(this.spinDown)), this.container.parentElement.appendChild(this.cloneElement), 
            detach(this.container), _super.prototype.destroy.call(this);
        }, NumericTextBox.prototype.getText = function() {
            return this.element.value;
        }, NumericTextBox.prototype.getPersistData = function() {
            return this.addOnPersist([ "value" ]);
        }, NumericTextBox.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                var prop = _a[_i];
                switch (prop) {
                  case "width":
                    setStyleAttribute(this.container, {
                        width: formatUnit(newProp.width)
                    });
                    break;

                  case "cssClass":
                    Input$1.setCssClass(newProp.cssClass, [ this.container ], oldProp.cssClass);
                    break;

                  case "enabled":
                    Input$1.setEnabled(newProp.enabled, this.element);
                    break;

                  case "enableRtl":
                    Input$1.setEnableRtl(newProp.enableRtl, [ this.container ]);
                    break;

                  case "readonly":
                    Input$1.setReadonly(newProp.readonly, this.element), this.readonly ? attributes(this.element, {
                        "aria-readonly": "true"
                    }) : this.element.removeAttribute("aria-readonly");
                    break;

                  case "placeholder":
                    Input$1.setPlaceholder(newProp.placeholder, this.element);
                    break;

                  case "step":
                    this.step = newProp.step, this.validateStep();
                    break;

                  case "showSpinButton":
                    newProp.showSpinButton ? this.spinBtnCreation() : (detach(this.spinUp), detach(this.spinDown));
                    break;

                  case "value":
                    this.updateValue(newProp.value);
                    break;

                  case "min":
                  case "max":
                    setValue(prop, getValue(prop, newProp), this), this.validateMinMax(), this.updateValue(this.value);
                    break;

                  case "strictMode":
                    this.strictMode = newProp.strictMode, this.updateValue(this.value), this.validateState();
                    break;

                  case "locale":
                    this.initCultureFunc(), this.l10n.setLocale(this.locale), isNullOrUndefined(this.spinDown) || attributes(this.spinDown, {
                        title: this.l10n.getConstant("decrementTitle"),
                        "aria-label": this.l10n.getConstant("decrementTitle")
                    }), isNullOrUndefined(this.spinUp) || attributes(this.spinUp, {
                        title: this.l10n.getConstant("incrementTitle"),
                        "aria-label": this.l10n.getConstant("incrementTitle")
                    }), this.updatePlaceholder(), Input$1.setPlaceholder(this.placeholder, this.element), 
                    this.updateValue(this.value);
                    break;

                  case "currency":
                    var propVal = getValue(prop, newProp);
                    this.setProperties({
                        currencyCode: propVal
                    }, !0), this.updateCurrency(prop, propVal);
                    break;

                  case "currencyCode":
                    var propValue = getValue(prop, newProp);
                    this.setProperties({
                        currency: propValue
                    }, !0), this.updateCurrency("currency", propValue);
                    break;

                  case "format":
                    setValue(prop, getValue(prop, newProp), this), this.initCultureInfo(), this.updateValue(this.value);
                    break;

                  case "decimals":
                    this.decimals = newProp.decimals, this.updateValue(this.value);
                }
            }
        }, NumericTextBox.prototype.getModuleName = function() {
            return "numerictextbox";
        }, __decorate$23([ Property("") ], NumericTextBox.prototype, "cssClass", void 0), 
        __decorate$23([ Property(null) ], NumericTextBox.prototype, "value", void 0), __decorate$23([ Property(-Number.MAX_VALUE) ], NumericTextBox.prototype, "min", void 0), 
        __decorate$23([ Property(Number.MAX_VALUE) ], NumericTextBox.prototype, "max", void 0), 
        __decorate$23([ Property(1) ], NumericTextBox.prototype, "step", void 0), __decorate$23([ Property(null) ], NumericTextBox.prototype, "width", void 0), 
        __decorate$23([ Property(null) ], NumericTextBox.prototype, "placeholder", void 0), 
        __decorate$23([ Property(!0) ], NumericTextBox.prototype, "showSpinButton", void 0), 
        __decorate$23([ Property(!1) ], NumericTextBox.prototype, "readonly", void 0), __decorate$23([ Property(!0) ], NumericTextBox.prototype, "enabled", void 0), 
        __decorate$23([ Property(!1) ], NumericTextBox.prototype, "enableRtl", void 0), 
        __decorate$23([ Property(!1) ], NumericTextBox.prototype, "enablePersistence", void 0), 
        __decorate$23([ Property("n2") ], NumericTextBox.prototype, "format", void 0), __decorate$23([ Property(null) ], NumericTextBox.prototype, "decimals", void 0), 
        __decorate$23([ Property(null) ], NumericTextBox.prototype, "currency", void 0), 
        __decorate$23([ Property(null) ], NumericTextBox.prototype, "currencyCode", void 0), 
        __decorate$23([ Property(!0) ], NumericTextBox.prototype, "strictMode", void 0), 
        __decorate$23([ Property(!1) ], NumericTextBox.prototype, "validateDecimalOnType", void 0), 
        __decorate$23([ Property("Never") ], NumericTextBox.prototype, "floatLabelType", void 0), 
        __decorate$23([ Event() ], NumericTextBox.prototype, "created", void 0), __decorate$23([ Event() ], NumericTextBox.prototype, "destroyed", void 0), 
        __decorate$23([ Event() ], NumericTextBox.prototype, "change", void 0), NumericTextBox = __decorate$23([ NotifyPropertyChanges ], NumericTextBox);
    }(Component), NumericContainer = function() {
        function NumericContainer(pagerModule) {
            this.pagerModule = pagerModule;
        }
        return NumericContainer.prototype.render = function() {
            this.pagerElement = this.pagerModule.element, this.renderNumericContainer(), this.refreshNumericLinks(), 
            this.wireEvents();
        }, NumericContainer.prototype.refresh = function() {
            this.pagerModule.updateTotalPages(), this.links.length && this.updateLinksHtml(), 
            this.updateStyles();
        }, NumericContainer.prototype.refreshNumericLinks = function() {
            var link, pagerObj = this.pagerModule, div = pagerObj.element.querySelector(".e-numericcontainer"), frag = document.createDocumentFragment();
            div.innerHTML = "";
            for (var i = 1; i <= pagerObj.pageCount; i++) link = createElement("a", {
                className: "e-link e-numericitem e-spacing e-pager-default",
                attrs: {
                    role: "link",
                    tabindex: "-1",
                    "aria-label": "Goto Page " + i,
                    href: "javascript:void(0);",
                    name: "Goto page" + i
                }
            }), pagerObj.currentPage === i && classList(link, [ "e-currentitem", "e-active" ], [ "e-pager-default" ]), 
            frag.appendChild(link);
            div.appendChild(frag), this.links = [].slice.call(div.childNodes);
        }, NumericContainer.prototype.wireEvents = function() {
            EventHandler.add(this.pagerElement, "click", this.clickHandler, this);
        }, NumericContainer.prototype.unwireEvents = function() {
            EventHandler.remove(this.pagerElement, "click", this.clickHandler);
        }, NumericContainer.prototype.destroy = function() {
            this.unwireEvents();
        }, NumericContainer.prototype.renderNumericContainer = function() {
            this.element = createElement("div", {
                className: "e-pagercontainer",
                attrs: {
                    role: "navigation"
                }
            }), this.renderFirstNPrev(this.element), this.renderPrevPagerSet(this.element), 
            this.element.appendChild(createElement("div", {
                className: "e-numericcontainer"
            })), this.renderNextPagerSet(this.element), this.renderNextNLast(this.element), 
            this.pagerModule.element.appendChild(this.element);
        }, NumericContainer.prototype.renderFirstNPrev = function(pagerContainer) {
            this.first = createElement("div", {
                className: "e-first e-icons e-icon-first",
                attrs: {
                    title: this.pagerModule.getLocalizedLabel("firstPageTooltip"),
                    "aria-label": this.pagerModule.getLocalizedLabel("firstPageTooltip"),
                    tabindex: "-1"
                }
            }), this.prev = createElement("div", {
                className: "e-prev e-icons e-icon-prev",
                attrs: {
                    title: this.pagerModule.getLocalizedLabel("previousPageTooltip"),
                    "aria-label": this.pagerModule.getLocalizedLabel("previousPageTooltip"),
                    tabindex: "-1"
                }
            }), append([ this.first, this.prev ], pagerContainer);
        }, NumericContainer.prototype.renderPrevPagerSet = function(pagerContainer) {
            var prevPager = createElement("div");
            this.PP = createElement("a", {
                className: "e-link e-pp e-spacing",
                innerHTML: "...",
                attrs: {
                    title: this.pagerModule.getLocalizedLabel("previousPagerTooltip"),
                    role: "link",
                    "aria-label": this.pagerModule.getLocalizedLabel("previousPagerTooltip"),
                    tabindex: "-1",
                    name: this.pagerModule.getLocalizedLabel("previousPagerTooltip"),
                    href: "javascript:void(0);"
                }
            }), prevPager.appendChild(this.PP), pagerContainer.appendChild(prevPager);
        }, NumericContainer.prototype.renderNextPagerSet = function(pagerContainer) {
            var nextPager = createElement("div");
            this.NP = createElement("a", {
                className: "e-link e-np e-spacing",
                innerHTML: "...",
                attrs: {
                    title: this.pagerModule.getLocalizedLabel("nextPagerTooltip"),
                    role: "link",
                    "aria-label": this.pagerModule.getLocalizedLabel("nextPagerTooltip"),
                    tabindex: "-1",
                    name: this.pagerModule.getLocalizedLabel("nextPagerTooltip"),
                    href: "javascript:void(0);"
                }
            }), nextPager.appendChild(this.NP), pagerContainer.appendChild(nextPager);
        }, NumericContainer.prototype.renderNextNLast = function(pagerContainer) {
            this.next = createElement("div", {
                className: "e-next e-icons e-icon-next",
                attrs: {
                    title: this.pagerModule.getLocalizedLabel("nextPageTooltip"),
                    "aria-label": this.pagerModule.getLocalizedLabel("nextPageTooltip"),
                    tabindex: "-1"
                }
            }), this.last = createElement("div", {
                className: "e-last e-icons e-icon-last",
                attrs: {
                    title: this.pagerModule.getLocalizedLabel("lastPageTooltip"),
                    "aria-label": this.pagerModule.getLocalizedLabel("lastPageTooltip"),
                    tabindex: "-1"
                }
            }), append([ this.next, this.last ], pagerContainer);
        }, NumericContainer.prototype.clickHandler = function(e) {
            var pagerObj = this.pagerModule, target = e.target;
            return pagerObj.previousPageNo = pagerObj.currentPage, target.classList.contains("e-disable") || isNullOrUndefined(target.getAttribute("index")) || (pagerObj.currentPage = parseInt(target.getAttribute("index"), 10), 
            pagerObj.dataBind()), !1;
        }, NumericContainer.prototype.updateLinksHtml = function() {
            var currentPageSet, pageNo, pagerObj = this.pagerModule;
            pagerObj.currentPage = 1 === pagerObj.totalPages ? 1 : pagerObj.currentPage, pagerObj.currentPage > pagerObj.totalPages && pagerObj.totalPages && (pagerObj.currentPage = pagerObj.totalPages), 
            currentPageSet = parseInt((pagerObj.currentPage / pagerObj.pageCount).toString(), 10), 
            pagerObj.currentPage % pagerObj.pageCount == 0 && currentPageSet > 0 && (currentPageSet -= 1);
            for (var i = 0; i < pagerObj.pageCount; i++) (pageNo = currentPageSet * pagerObj.pageCount + 1 + i) <= pagerObj.totalPages ? (this.links[i].style.display = "", 
            this.links[i].setAttribute("index", pageNo.toString()), this.links[i].innerHTML = pagerObj.customText ? pagerObj.customText + pageNo : pageNo.toString(), 
            pagerObj.currentPage !== pageNo ? this.links[i].classList.add("e-pager-default") : this.links[i].classList.remove("e-pager-default")) : (this.links[i].innerHTML = pagerObj.customText ? pagerObj.customText + pageNo : pageNo.toString(), 
            this.links[i].style.display = "none"), classList(this.links[i], [], [ "e-currentitem", "e-active" ]);
            this.first.setAttribute("index", "1"), this.last.setAttribute("index", pagerObj.totalPages.toString()), 
            this.prev.setAttribute("index", (pagerObj.currentPage - 1).toString()), this.next.setAttribute("index", (pagerObj.currentPage + 1).toString()), 
            this.pagerElement.querySelector(".e-mfirst").setAttribute("index", "1"), this.pagerElement.querySelector(".e-mlast").setAttribute("index", pagerObj.totalPages.toString()), 
            this.pagerElement.querySelector(".e-mprev").setAttribute("index", (pagerObj.currentPage - 1).toString()), 
            this.pagerElement.querySelector(".e-mnext").setAttribute("index", (pagerObj.currentPage + 1).toString()), 
            this.PP.setAttribute("index", (parseInt(this.links[0].getAttribute("index"), 10) - pagerObj.pageCount).toString()), 
            this.NP.setAttribute("index", (parseInt(this.links[this.links.length - 1].getAttribute("index"), 10) + 1).toString());
        }, NumericContainer.prototype.updateStyles = function() {
            this.updateFirstNPrevStyles(), this.updatePrevPagerSetStyles(), this.updateNextPagerSetStyles(), 
            this.updateNextNLastStyles(), this.links.length && classList(this.links[(this.pagerModule.currentPage - 1) % this.pagerModule.pageCount], [ "e-currentitem", "e-active" ], []);
        }, NumericContainer.prototype.updateFirstNPrevStyles = function() {
            var firstPage = [ "e-firstpage", "e-pager-default" ], firstPageDisabled = [ "e-firstpagedisabled", "e-disable" ], prevPage = [ "e-prevpage", "e-pager-default" ], prevPageDisabled = [ "e-prevpagedisabled", "e-disable" ];
            this.pagerModule.totalPages > 0 && this.pagerModule.currentPage > 1 ? (classList(this.prev, prevPage, prevPageDisabled), 
            classList(this.first, firstPage, firstPageDisabled), classList(this.pagerElement.querySelector(".e-mfirst"), firstPage, firstPageDisabled), 
            classList(this.pagerElement.querySelector(".e-mprev"), prevPage, prevPageDisabled)) : (classList(this.prev, prevPageDisabled, prevPage), 
            classList(this.first, firstPageDisabled, firstPage), classList(this.pagerElement.querySelector(".e-mprev"), prevPageDisabled, prevPage), 
            classList(this.pagerElement.querySelector(".e-mfirst"), firstPageDisabled, firstPage));
        }, NumericContainer.prototype.updatePrevPagerSetStyles = function() {
            this.pagerModule.currentPage > this.pagerModule.pageCount ? classList(this.PP, [ "e-numericitem", "e-pager-default" ], [ "e-nextprevitemdisabled", "e-disable" ]) : classList(this.PP, [ "e-nextprevitemdisabled", "e-disable" ], [ "e-numericitem", "e-pager-default" ]);
        }, NumericContainer.prototype.updateNextPagerSetStyles = function() {
            var pagerObj = this.pagerModule, firstPage = this.links[0].innerHTML.replace(pagerObj.customText, "");
            !firstPage.length || !this.links.length || parseInt(firstPage, 10) + pagerObj.pageCount > pagerObj.totalPages ? classList(this.NP, [ "e-nextprevitemdisabled", "e-disable" ], [ "e-numericitem", "e-pager-default" ]) : classList(this.NP, [ "e-numericitem", "e-pager-default" ], [ "e-nextprevitemdisabled", "e-disable" ]);
        }, NumericContainer.prototype.updateNextNLastStyles = function() {
            var lastPage = [ "e-lastpage", "e-pager-default" ], lastPageDisabled = [ "e-lastpagedisabled", "e-disable" ], nextPage = [ "e-nextpage", "e-pager-default" ], nextPageDisabled = [ "e-nextpagedisabled", "e-disable" ], pagerObj = this.pagerModule;
            pagerObj.currentPage === pagerObj.totalPages || 0 === pagerObj.totalRecordsCount ? (classList(this.last, lastPageDisabled, lastPage), 
            classList(this.next, nextPageDisabled, nextPage), classList(this.pagerElement.querySelector(".e-mlast"), lastPageDisabled, lastPage), 
            classList(this.pagerElement.querySelector(".e-mnext"), nextPageDisabled, nextPage)) : (classList(this.last, lastPage, lastPageDisabled), 
            classList(this.next, nextPage, nextPageDisabled), classList(this.pagerElement.querySelector(".e-mlast"), lastPage, lastPageDisabled), 
            classList(this.pagerElement.querySelector(".e-mnext"), nextPage, nextPageDisabled));
        }, NumericContainer;
    }(), PagerMessage = function() {
        function PagerMessage(pagerModule) {
            this.pagerModule = pagerModule;
        }
        return PagerMessage.prototype.render = function() {
            var div = createElement("div", {
                className: "e-parentmsgbar",
                attrs: {
                    "aria-label": "Pager Information"
                }
            });
            this.pageNoMsgElem = createElement("span", {
                className: "e-pagenomsg",
                styles: "textalign:right"
            }), this.pageCountMsgElem = createElement("span", {
                className: "e-pagecountmsg",
                styles: "textalign:right"
            }), append([ this.pageNoMsgElem, this.pageCountMsgElem ], div), this.pagerModule.element.appendChild(div), 
            this.refresh();
        }, PagerMessage.prototype.refresh = function() {
            var pagerObj = this.pagerModule;
            this.pageNoMsgElem.textContent = this.format(pagerObj.getLocalizedLabel("currentPageInfo"), [ 0 === pagerObj.totalRecordsCount ? 0 : pagerObj.currentPage, pagerObj.totalPages || 0 ]) + " ", 
            this.pageCountMsgElem.textContent = this.format(pagerObj.getLocalizedLabel("totalItemsInfo"), [ pagerObj.totalRecordsCount || 0 ]), 
            this.pageNoMsgElem.parentElement.setAttribute("aria-label", this.pageNoMsgElem.textContent + this.pageCountMsgElem.textContent);
        }, PagerMessage.prototype.hideMessage = function() {
            this.pageNoMsgElem && (this.pageNoMsgElem.style.display = "none"), this.pageCountMsgElem && (this.pageCountMsgElem.style.display = "none");
        }, PagerMessage.prototype.showMessage = function() {
            this.pageNoMsgElem || this.render(), this.pageNoMsgElem.style.display = "", this.pageCountMsgElem.style.display = "";
        }, PagerMessage.prototype.destroy = function() {}, PagerMessage.prototype.format = function(str, args) {
            for (var regx, i = 0; i < args.length; i++) regx = new RegExp("\\{" + i + "\\}", "gm"), 
            str = str.replace(regx, args[i].toString());
            return str;
        }, PagerMessage;
    }(), ValueFormatter = function() {
        function ValueFormatter(cultureName) {
            this.intl = new Internationalization(), isNullOrUndefined(cultureName) || (this.intl.culture = cultureName);
        }
        return ValueFormatter.prototype.getFormatFunction = function(format) {
            return format.type ? this.intl.getDateFormat(format) : this.intl.getNumberFormat(format);
        }, ValueFormatter.prototype.getParserFunction = function(format) {
            return format.type ? this.intl.getDateParser(format) : this.intl.getNumberParser(format);
        }, ValueFormatter.prototype.fromView = function(value, format, type) {
            return "date" === type || "datetime" === type || "number" === type ? format(value) : value;
        }, ValueFormatter.prototype.toView = function(value, format) {
            var result = value;
            return isNullOrUndefined(format) || isNullOrUndefined(value) || (result = format(value)), 
            result;
        }, ValueFormatter.prototype.setCulture = function(cultureName) {
            isNullOrUndefined(cultureName) || setCulture(cultureName);
        }, ValueFormatter;
    }(), Column = function() {
        function Column(options) {
            var _this = this;
            this.allowSorting = !0, this.allowResizing = !0, this.allowFiltering = !0, this.allowGrouping = !0, 
            this.showColumnMenu = !0, this.enableGroupByFormat = !1, this.allowEditing = !0, 
            this.filter = {}, this.showInColumnChooser = !0, this.edit = {}, this.sortDirection = "Descending", 
            merge(this, options), this.uid = getUid("grid-column");
            var valueFormatter = new ValueFormatter();
            if (options.format && (options.format.skeleton || options.format.format) && (this.setFormatter(valueFormatter.getFormatFunction(options.format)), 
            this.setParser(valueFormatter.getParserFunction(options.format))), this.field || (this.allowFiltering = !1, 
            this.allowGrouping = !1, this.allowSorting = !1), this.commands && !this.textAlign && (this.textAlign = "Right"), 
            (this.template || this.commandsTemplate) && (this.templateFn = templateCompiler(this.template || this.commandsTemplate)), 
            this.headerTemplate && (this.headerTemplateFn = templateCompiler(this.headerTemplate)), 
            this.filter.itemTemplate && (this.fltrTemplateFn = templateCompiler(this.filter.itemTemplate)), 
            this.isForeignColumn() && (isNullOrUndefined(this.editType) || "dropdownedit" === this.editType) && (this.editType = "dropdownedit", 
            this.edit.params = {
                dataSource: this.dataSource,
                query: new Query(),
                fields: {
                    value: this.foreignKeyField || this.field,
                    text: this.foreignKeyValue
                }
            }), this.sortComparer) {
                var a_1 = this.sortComparer;
                this.sortComparer = function(x, y) {
                    if ("Descending" === this.sortDirection) {
                        var z = x;
                        x = y, y = z;
                    }
                    return a_1(x, y);
                };
            }
            !this.sortComparer && this.isForeignColumn() && (this.sortComparer = function(x, y) {
                return x = getValue(_this.foreignKeyValue, getForeignData(_this, {}, x)[0]), y = getValue(_this.foreignKeyValue, getForeignData(_this, {}, y)[0]), 
                "Descending" === _this.sortDirection ? DataUtil.fnDescending(x, y) : DataUtil.fnAscending(x, y);
            });
        }
        return Column.prototype.getSortDirection = function() {
            return this.sortDirection;
        }, Column.prototype.setSortDirection = function(direction) {
            this.sortDirection = direction;
        }, Column.prototype.setProperties = function(column) {
            for (var keys = Object.keys(column), i = 0; i < keys.length; i++) this[keys[i]] = column[keys[i]];
        }, Column.prototype.isForeignColumn = function() {
            return !(!this.dataSource || !this.foreignKeyValue);
        }, Column.prototype.getFormatter = function() {
            return this.formatFn;
        }, Column.prototype.setFormatter = function(value) {
            this.formatFn = value;
        }, Column.prototype.getParser = function() {
            return this.parserFn;
        }, Column.prototype.setParser = function(value) {
            this.parserFn = value;
        }, Column.prototype.getColumnTemplate = function() {
            return this.templateFn;
        }, Column.prototype.getHeaderTemplate = function() {
            return this.headerTemplateFn;
        }, Column.prototype.getFilterItemTemplate = function() {
            return this.fltrTemplateFn;
        }, Column.prototype.getDomSetter = function() {
            return this.disableHtmlEncode ? "textContent" : "innerHTML";
        }, Column;
    }(), uid$1 = 0, scrollWidth = null, __extends$25 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$24 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, Pager = function(_super) {
        function Pager(options, element) {
            var _this = _super.call(this, options, element) || this;
            return _this.defaultConstants = {
                currentPageInfo: "{0} of {1} pages",
                totalItemsInfo: "({0} items)",
                firstPageTooltip: "Go to first page",
                lastPageTooltip: "Go to last page",
                nextPageTooltip: "Go to next page",
                previousPageTooltip: "Go to previous page",
                nextPagerTooltip: "Go to next pager",
                previousPagerTooltip: "Go to previous pager",
                pagerDropDown: "Items per page"
            }, _this.containerModule = new NumericContainer(_this), _this.pagerMessageModule = new PagerMessage(_this), 
            _this;
        }
        return __extends$25(Pager, _super), Pager.prototype.requiredModules = function() {
            var modules = [];
            return this.enableExternalMessage && modules.push({
                member: "externalMessage",
                args: [ this ]
            }), this.checkpagesizes() && modules.push({
                member: "pagerdropdown",
                args: [ this ]
            }), modules;
        }, Pager.prototype.preRender = function() {}, Pager.prototype.render = function() {
            this.template ? this.pagerTemplate() : (this.initLocalization(), this.updateRTL(), 
            this.totalRecordsCount = this.totalRecordsCount || 0, this.renderFirstPrevDivForDevice(), 
            this.containerModule.render(), this.enablePagerMessage && this.pagerMessageModule.render(), 
            this.renderNextLastDivForDevice(), this.checkpagesizes() && this.pagerdropdownModule.render(), 
            this.addAriaLabel(), this.enableExternalMessage && this.externalMessageModule && this.externalMessageModule.render(), 
            this.refresh(), this.trigger("created", {
                currentPage: this.currentPage,
                totalRecordsCount: this.totalRecordsCount
            }));
        }, Pager.prototype.getPersistData = function() {
            return this.addOnPersist([ "currentPage", "pageSize" ]);
        }, Pager.prototype.destroy = function() {
            _super.prototype.destroy.call(this), this.containerModule.destroy(), this.pagerMessageModule.destroy(), 
            this.element.innerHTML = "";
        }, Pager.prototype.getModuleName = function() {
            return "pager";
        }, Pager.prototype.onPropertyChanged = function(newProp, oldProp) {
            if (!this.isDestroyed) {
                newProp.pageCount !== oldProp.pageCount && (this.containerModule.refreshNumericLinks(), 
                this.containerModule.refresh());
                for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                    switch (_a[_i]) {
                      case "currentPage":
                        this.checkGoToPage(newProp.currentPage, oldProp.currentPage) && this.currentPageChanged();
                        break;

                      case "pageSize":
                      case "totalRecordsCount":
                      case "customText":
                        this.refresh();
                        break;

                      case "pageSizes":
                        this.checkpagesizes() && (this.pagerdropdownModule.destroy(), this.pagerdropdownModule.render()), 
                        this.refresh();
                        break;

                      case "template":
                        this.templateFn = this.compile(this.template), this.refresh();
                        break;

                      case "locale":
                        this.initLocalization(), this.refresh();
                        break;

                      case "enableExternalMessage":
                        this.enableExternalMessage && this.externalMessageModule.render();
                        break;

                      case "externalMessage":
                        this.externalMessageModule && this.externalMessageModule.refresh();
                        break;

                      case "enableRtl":
                        this.updateRTL();
                        break;

                      case "enablePagerMessage":
                        this.enablePagerMessage ? this.pagerMessageModule.showMessage() : this.pagerMessageModule.hideMessage();
                    }
                }
            }
        }, Pager.prototype.getLocalizedLabel = function(key) {
            return this.localeObj.getConstant(key);
        }, Pager.prototype.goToPage = function(pageNo) {
            this.checkGoToPage(pageNo) && (this.currentPage = pageNo, this.dataBind());
        }, Pager.prototype.checkpagesizes = function() {
            return !(!0 !== this.pageSizes && !this.pageSizes.length);
        }, Pager.prototype.checkGoToPage = function(newPageNo, oldPageNo) {
            return newPageNo !== this.currentPage && (this.previousPageNo = this.currentPage), 
            isNullOrUndefined(oldPageNo) || (this.previousPageNo = oldPageNo), this.previousPageNo !== newPageNo && newPageNo >= 1 && newPageNo <= this.totalPages;
        }, Pager.prototype.currentPageChanged = function() {
            this.enableQueryString && this.updateQueryString(this.currentPage);
            var args = {
                currentPage: this.currentPage,
                cancel: !1
            };
            this.trigger("click", args), args.cancel || this.refresh();
        }, Pager.prototype.pagerTemplate = function() {
            var result;
            this.element.classList.add("e-pagertemplate"), this.compile(this.template);
            var data = {
                currentPage: this.currentPage,
                pageSize: this.pageSize,
                pageCount: this.pageCount,
                totalRecordsCount: this.totalRecordsCount,
                totalPages: this.totalPages
            };
            result = this.getPagerTemplate()(data), appendChildren(this.element, result);
        }, Pager.prototype.updateTotalPages = function() {
            this.totalPages = this.totalRecordsCount % this.pageSize == 0 ? this.totalRecordsCount / this.pageSize : parseInt((this.totalRecordsCount / this.pageSize).toString(), 10) + 1;
        }, Pager.prototype.getPagerTemplate = function() {
            return this.templateFn;
        }, Pager.prototype.compile = function(template) {
            if (template) try {
                document.querySelectorAll(template).length && (this.templateFn = compile$$1(document.querySelector(template).innerHTML.trim()));
            } catch (e) {
                this.templateFn = compile$$1(template);
            }
        }, Pager.prototype.refresh = function() {
            this.template ? (this.element.innerHTML = "", this.updateTotalPages(), this.pagerTemplate()) : (this.updateRTL(), 
            this.containerModule.refresh(), this.enablePagerMessage && this.pagerMessageModule.refresh(), 
            this.enableExternalMessage && this.externalMessageModule && this.externalMessageModule.refresh());
        }, Pager.prototype.updateRTL = function() {
            this.enableRtl ? this.element.classList.add("e-rtl") : this.element.classList.remove("e-rtl");
        }, Pager.prototype.initLocalization = function() {
            this.localeObj = new L10n(this.getModuleName(), this.defaultConstants, this.locale);
        }, Pager.prototype.updateQueryString = function(value) {
            var updatedUrl = this.getUpdatedURL(window.location.href, "page", value.toString());
            window.history.pushState({
                path: updatedUrl
            }, "", updatedUrl);
        }, Pager.prototype.getUpdatedURL = function(uri, key, value) {
            var regx = new RegExp("([?|&])" + key + "=.*?(&|#|$)", "i");
            if (uri.match(regx)) return uri.replace(regx, "$1" + key + "=" + value + "$2");
            var hash = "";
            return -1 !== uri.indexOf("#") && (hash = uri.replace(/.*#/, "#"), uri = uri.replace(/#.*/, "")), 
            uri + (-1 !== uri.indexOf("?") ? "&" : "?") + key + "=" + value + hash;
        }, Pager.prototype.renderFirstPrevDivForDevice = function() {
            this.element.appendChild(createElement("div", {
                className: "e-mfirst e-icons e-icon-first",
                attrs: {
                    title: this.getLocalizedLabel("firstPageTooltip"),
                    tabindex: "-1"
                }
            })), this.element.appendChild(createElement("div", {
                className: "e-mprev e-icons e-icon-prev",
                attrs: {
                    title: this.getLocalizedLabel("previousPageTooltip"),
                    tabindex: "-1"
                }
            }));
        }, Pager.prototype.renderNextLastDivForDevice = function() {
            this.element.appendChild(createElement("div", {
                className: "e-mnext e-icons e-icon-next",
                attrs: {
                    title: this.getLocalizedLabel("nextPageTooltip"),
                    tabindex: "-1"
                }
            })), this.element.appendChild(createElement("div", {
                className: "e-mlast e-icons e-icon-last",
                attrs: {
                    title: this.getLocalizedLabel("lastPageTooltip"),
                    tabindex: "-1"
                }
            }));
        }, Pager.prototype.addAriaLabel = function() {
            var _this = this;
            Browser.isDevice || [ ".e-mfirst", ".e-mprev", ".e-mnext", ".e-mlast" ].forEach(function(value) {
                var element = _this.element.querySelector(value);
                element.setAttribute("aria-label", element.getAttribute("title"));
            });
        }, __decorate$24([ Property(!1) ], Pager.prototype, "enableQueryString", void 0), 
        __decorate$24([ Property(!1) ], Pager.prototype, "enableExternalMessage", void 0), 
        __decorate$24([ Property(!0) ], Pager.prototype, "enablePagerMessage", void 0), 
        __decorate$24([ Property(12) ], Pager.prototype, "pageSize", void 0), __decorate$24([ Property(10) ], Pager.prototype, "pageCount", void 0), 
        __decorate$24([ Property(1) ], Pager.prototype, "currentPage", void 0), __decorate$24([ Property() ], Pager.prototype, "totalRecordsCount", void 0), 
        __decorate$24([ Property() ], Pager.prototype, "externalMessage", void 0), __decorate$24([ Property(!1) ], Pager.prototype, "pageSizes", void 0), 
        __decorate$24([ Property() ], Pager.prototype, "template", void 0), __decorate$24([ Property("") ], Pager.prototype, "customText", void 0), 
        __decorate$24([ Event() ], Pager.prototype, "click", void 0), __decorate$24([ Event() ], Pager.prototype, "dropDownChanged", void 0), 
        __decorate$24([ Event() ], Pager.prototype, "created", void 0), Pager = __decorate$24([ NotifyPropertyChanges ], Pager);
    }(Component), ExternalMessage = function() {
        function ExternalMessage(pagerModule) {
            this.pagerModule = pagerModule;
        }
        return ExternalMessage.prototype.getModuleName = function() {
            return "externalMessage";
        }, ExternalMessage.prototype.render = function() {
            this.element = createElement("div", {
                className: "e-pagerexternalmsg",
                attrs: {
                    "aria-label": "Pager external message"
                }
            }), this.pagerModule.element.appendChild(this.element), this.refresh();
        }, ExternalMessage.prototype.refresh = function() {
            this.pagerModule.externalMessage && this.pagerModule.externalMessage.toString().length ? (this.showMessage(), 
            this.element.innerHTML = this.pagerModule.externalMessage) : this.hideMessage();
        }, ExternalMessage.prototype.hideMessage = function() {
            this.element.style.display = "none";
        }, ExternalMessage.prototype.showMessage = function() {
            this.element.style.display = "";
        }, ExternalMessage.prototype.destroy = function() {
            remove(this.element);
        }, ExternalMessage;
    }(), __extends$26 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$25 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, RadioButton$1 = function(_super) {
        function RadioButton(options, element) {
            var _this = _super.call(this, options, element) || this;
            return _this.isKeyPressed = !1, _this;
        }
        return __extends$26(RadioButton, _super), RadioButton_1 = RadioButton, RadioButton.prototype.changeHandler = function(event) {
            this.checked = !0, this.dataBind();
            var changeEventArgs = {
                value: this.value,
                event: event
            };
            this.trigger("change", changeEventArgs);
        }, RadioButton.prototype.updateChange = function(state) {
            for (var input, name = this.element.getAttribute("name"), radioGrp = document.querySelectorAll('input.e-radio[name="' + name + '"]'), i = 0; i < radioGrp.length; i++) (input = radioGrp[i]) !== this.element && (getInstance(input, RadioButton_1).checked = !1);
        }, RadioButton.prototype.destroy = function() {
            var _this = this, radioWrap = this.element.parentElement;
            _super.prototype.destroy.call(this), this.disabled || this.unWireEvents(), "INPUT" === this.tagName ? (radioWrap.parentNode.insertBefore(this.element, radioWrap), 
            detach(radioWrap), this.element.checked = !1, [ "name", "value", "disabled" ].forEach(function(key) {
                _this.element.removeAttribute(key);
            })) : ([ "role", "aria-checked", "class" ].forEach(function(key) {
                radioWrap.removeAttribute(key);
            }), this.element.id && radioWrap.setAttribute("id", this.element.id), radioWrap.innerHTML = "");
        }, RadioButton.prototype.focusHandler = function() {
            this.isKeyPressed && this.getLabel().classList.add("e-focus");
        }, RadioButton.prototype.focusOutHandler = function() {
            this.getLabel().classList.remove("e-focus");
        }, RadioButton.prototype.getModuleName = function() {
            return "radio";
        }, RadioButton.prototype.getPersistData = function() {
            return this.addOnPersist([ "checked" ]);
        }, RadioButton.prototype.getLabel = function() {
            return this.element.nextElementSibling;
        }, RadioButton.prototype.initialize = function() {
            this.initWrapper(), this.name && this.element.setAttribute("name", this.name), this.value && this.element.setAttribute("value", this.value), 
            this.checked && (this.element.checked = !0), this.disabled && this.setDisabled();
        }, RadioButton.prototype.initWrapper = function() {
            var rippleSpan, wrapper = this.element.parentElement;
            wrapper.classList.contains("e-radio-wrapper") || (wrapper = createElement("div", {
                className: "e-radio-wrapper"
            }), this.element.parentNode.insertBefore(wrapper, this.element));
            var label = createElement("label", {
                attrs: {
                    for: this.element.id
                }
            });
            wrapper.appendChild(this.element), wrapper.appendChild(label), isRippleEnabled && (rippleSpan = createElement("span", {
                className: "e-ripple-container"
            }), label.appendChild(rippleSpan), rippleEffect(rippleSpan, {
                duration: 400,
                isCenterRipple: !0
            })), this.enableRtl && label.classList.add("e-rtl"), this.cssClass && addClass([ label ], this.cssClass.split(" ")), 
            this.label && this.setText(this.label);
        }, RadioButton.prototype.keyDownHandler = function() {
            this.isKeyPressed = !0;
        }, RadioButton.prototype.labelRippleHandler = function(e) {
            rippleMouseHandler$1(e, this.getLabel().getElementsByClassName("e-ripple-container")[0]);
        }, RadioButton.prototype.mouseDownHandler = function() {
            this.isKeyPressed = !1;
        }, RadioButton.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var label = this.getLabel(), _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "checked":
                    newProp.checked && this.updateChange(newProp.checked), this.element.checked = newProp.checked;
                    break;

                  case "disabled":
                    newProp.disabled ? (this.setDisabled(), this.unWireEvents()) : (this.element.disabled = !1, 
                    this.wireEvents());
                    break;

                  case "cssClass":
                    oldProp.cssClass && removeClass([ label ], oldProp.cssClass.split(" ")), addClass([ label ], newProp.cssClass.split(" "));
                    break;

                  case "enableRtl":
                    newProp.enableRtl ? label.classList.add("e-rtl") : label.classList.remove("e-rtl");
                    break;

                  case "label":
                    this.setText(newProp.label);
                    break;

                  case "labelPosition":
                    "Before" === newProp.labelPosition ? label.classList.add("e-right") : label.classList.remove("e-right");
                    break;

                  case "name":
                    this.element.setAttribute("name", newProp.name);
                    break;

                  case "value":
                    this.element.setAttribute("value", newProp.value);
                }
            }
        }, RadioButton.prototype.preRender = function() {
            var element = this.element;
            this.tagName = this.element.tagName, element = wrapperInitialize$1("EJS-RADIOBUTTON", "radio", element, "e-radio-wrapper"), 
            this.element = element, "radio" !== this.element.getAttribute("type") && this.element.setAttribute("type", "radio"), 
            this.element.id || (this.element.id = getUniqueID("e-" + this.getModuleName()));
        }, RadioButton.prototype.render = function() {
            this.initialize(), this.disabled || this.wireEvents();
        }, RadioButton.prototype.setDisabled = function() {
            this.element.disabled = !0;
        }, RadioButton.prototype.setText = function(text) {
            var label = this.getLabel(), textLabel = label.getElementsByClassName("e-label")[0];
            textLabel ? textLabel.textContent = text : (textLabel = createElement("span", {
                className: "e-label",
                innerHTML: text
            }), label.appendChild(textLabel)), "Before" === this.labelPosition ? this.getLabel().classList.add("e-right") : this.getLabel().classList.remove("e-right");
        }, RadioButton.prototype.unWireEvents = function() {
            var label = this.getLabel();
            EventHandler.remove(this.element, "change", this.changeHandler), EventHandler.remove(document, "keydown", this.keyDownHandler), 
            EventHandler.remove(label, "mousedown", this.mouseDownHandler), EventHandler.remove(this.element, "focus", this.focusHandler), 
            EventHandler.remove(this.element, "focusout", this.focusOutHandler);
            var rippleLabel = label.getElementsByClassName("e-label")[0];
            rippleLabel && (EventHandler.remove(rippleLabel, "mousedown", this.labelRippleHandler), 
            EventHandler.remove(rippleLabel, "mouseup", this.labelRippleHandler));
        }, RadioButton.prototype.wireEvents = function() {
            var label = this.getLabel();
            EventHandler.add(this.element, "change", this.changeHandler, this), EventHandler.add(document, "keydown", this.keyDownHandler, this), 
            EventHandler.add(label, "mousedown", this.mouseDownHandler, this), EventHandler.add(this.element, "focus", this.focusHandler, this), 
            EventHandler.add(this.element, "focusout", this.focusOutHandler, this);
            var rippleLabel = label.getElementsByClassName("e-label")[0];
            rippleLabel && (EventHandler.add(rippleLabel, "mousedown", this.labelRippleHandler, this), 
            EventHandler.add(rippleLabel, "mouseup", this.labelRippleHandler, this));
        }, __decorate$25([ Event() ], RadioButton.prototype, "change", void 0), __decorate$25([ Property(!1) ], RadioButton.prototype, "checked", void 0), 
        __decorate$25([ Property("") ], RadioButton.prototype, "cssClass", void 0), __decorate$25([ Property(!1) ], RadioButton.prototype, "disabled", void 0), 
        __decorate$25([ Property("") ], RadioButton.prototype, "label", void 0), __decorate$25([ Property("After") ], RadioButton.prototype, "labelPosition", void 0), 
        __decorate$25([ Property("") ], RadioButton.prototype, "name", void 0), __decorate$25([ Property("") ], RadioButton.prototype, "value", void 0), 
        RadioButton = RadioButton_1 = __decorate$25([ NotifyPropertyChanges ], RadioButton);
        var RadioButton_1;
    }(Component), queryString$1 = "", prevString$1 = "", matches$2 = [], activeClass$1 = "e-active", __extends$28 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$27 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, FieldSettings$2 = function(_super) {
        function FieldSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$28(FieldSettings, _super), __decorate$27([ Property() ], FieldSettings.prototype, "text", void 0), 
        __decorate$27([ Property() ], FieldSettings.prototype, "value", void 0), __decorate$27([ Property() ], FieldSettings.prototype, "iconCss", void 0), 
        __decorate$27([ Property() ], FieldSettings.prototype, "groupBy", void 0), FieldSettings;
    }(ChildProperty), dropDownBaseClasses$1 = {
        root: "e-dropdownbase",
        rtl: "e-rtl",
        content: "e-content",
        selected: "e-active",
        hover: "e-hover",
        noData: "e-nodata",
        fixedHead: "e-fixed-head",
        focus: "e-item-focus",
        li: cssClass.li,
        group: cssClass.group,
        disabled: cssClass.disabled,
        grouping: "e-dd-group"
    }, DropDownBase$1 = function(_super) {
        function DropDownBase(options, element) {
            return _super.call(this, options, element) || this;
        }
        return __extends$28(DropDownBase, _super), DropDownBase.prototype.getPropObject = function(prop, newProp, oldProp) {
            var newProperty = new Object(), oldProperty = new Object(), propName = new Function("prop", "return prop");
            newProperty[propName(prop)] = newProp[propName(prop)], oldProperty[propName(prop)] = oldProp[propName(prop)];
            var data = new Object();
            return data.newProperty = newProperty, data.oldProperty = oldProperty, data;
        }, DropDownBase.prototype.getValueByText = function(text, ignoreCase) {
            var value = null, dataSource = this.listData, fields = this.fields, type = this.typeOfData(dataSource).typeof;
            if (ignoreCase) if ("string" === type || "number" === type) for (var _i = 0, dataSource_1 = dataSource; _i < dataSource_1.length; _i++) {
                if (!isNullOrUndefined(item = dataSource_1[_i]) && String(item).toLowerCase() === text.toString().toLowerCase()) {
                    value = "string" === type ? String(item) : this.getFormattedValue(String(item));
                    break;
                }
            } else dataSource.filter(function(item) {
                getValue(fields.text, item).toString().toLowerCase() === text.toLowerCase() && (value = getValue(fields.value, item));
            }); else if ("string" === type || "number" === type) for (var _a = 0, dataSource_2 = dataSource; _a < dataSource_2.length; _a++) {
                var item;
                if (!isNullOrUndefined(item = dataSource_2[_a]) && String(item) === text.toString()) {
                    value = "string" === type ? text : this.getFormattedValue(text);
                    break;
                }
            } else dataSource.filter(function(item) {
                getValue(fields.text, item) === text && (value = getValue(fields.value, item));
            });
            return value;
        }, DropDownBase.prototype.l10nUpdate = function(actionFailure) {
            if ("No Records Found" !== this.noRecordsTemplate || "The Request Failed" !== this.actionFailureTemplate) {
                var template = actionFailure ? this.actionFailureTemplate : this.noRecordsTemplate;
                this.list.innerHTML = "";
                for (var _i = 0, _a = compile$$1(template)({}); _i < _a.length; _i++) {
                    var item = _a[_i];
                    this.list.appendChild(item);
                }
            } else {
                this.l10n = new L10n("dropdowns", {
                    noRecordsTemplate: "No Records Found",
                    actionFailureTemplate: "The Request Failed"
                }, this.locale), this.list.innerHTML = actionFailure ? this.l10n.getConstant("actionFailureTemplate") : this.l10n.getConstant("noRecordsTemplate");
            }
        }, DropDownBase.prototype.getTextByValue = function(value) {
            var text, dataSource = this.listData, fields = this.fields, type = this.typeOfData(dataSource).typeof;
            if ("string" === type || "number" === type) for (var _i = 0, dataSource_3 = dataSource; _i < dataSource_3.length; _i++) {
                var item = dataSource_3[_i];
                if (!isNullOrUndefined(item) && item.toString() === value.toString()) {
                    text = item.toString();
                    break;
                }
            } else dataSource.filter(function(item) {
                var itemValue = getValue(fields.value, item);
                isNullOrUndefined(itemValue) || itemValue.toString() !== value.toString() || (text = getValue(fields.text, item));
            });
            return text;
        }, DropDownBase.prototype.getFormattedValue = function(value) {
            if (this.listData && this.listData.length) {
                var item = this.typeOfData(this.listData);
                if ("number" == typeof getValue(this.fields.value ? this.fields.value : "value", item.item) || "number" === item.typeof) return parseInt(value, 10);
                if ("boolean" == typeof getValue(this.fields.value ? this.fields.value : "value", item.item) || "boolean" === item.typeof) return "true" === value;
            }
            return value;
        }, DropDownBase.prototype.setEnableRtl = function() {
            this.list && this.enableRtlElements.push(this.list), this.enableRtl ? addClass(this.enableRtlElements, dropDownBaseClasses$1.rtl) : removeClass(this.enableRtlElements, dropDownBaseClasses$1.rtl);
        }, DropDownBase.prototype.initialize = function() {
            if (this.bindEvent = !0, "UL" === this.element.tagName) {
                var jsonElement = ListBase.createJsonFromElement(this.element);
                this.setProperties({
                    fields: {
                        text: "text",
                        value: "text"
                    }
                }, !0), this.resetList(jsonElement, this.fields);
            } else if ("SELECT" === this.element.tagName) {
                (this.dataSource instanceof Array ? this.dataSource.length > 0 : !isNullOrUndefined(this.dataSource)) || this.renderItemsBySelect();
            } else this.setListData(this.dataSource, this.fields, this.query);
        }, DropDownBase.prototype.getPersistData = function() {
            return this.addOnPersist([]);
        }, DropDownBase.prototype.setEnabled = function() {
            this.enabled ? this.element.setAttribute("aria-disabled", "false") : this.element.setAttribute("aria-disabled", "true");
        }, DropDownBase.prototype.renderItemsBySelect = function() {
            var element = this.element, fields = {
                value: "value",
                text: "text"
            }, jsonElement = [], group = element.querySelectorAll("select>optgroup"), option = element.querySelectorAll("select>option");
            if (this.getJSONfromOption(jsonElement, option, fields), group.length) {
                for (var i = 0; i < group.length; i++) {
                    var item = group[i], optionGroup = {};
                    optionGroup[fields.text] = item.label, optionGroup.isHeader = !0;
                    var child = item.querySelectorAll("option");
                    jsonElement.push(optionGroup), this.getJSONfromOption(jsonElement, child, fields);
                }
                element.querySelectorAll("select>option");
            }
            this.fields.text = fields.text, this.fields.value = fields.value, this.resetList(jsonElement, fields);
        }, DropDownBase.prototype.getJSONfromOption = function(items, options, fields) {
            for (var _i = 0, options_1 = options; _i < options_1.length; _i++) {
                var option = options_1[_i], json = {};
                json[fields.text] = option.innerText, json[fields.value] = option.getAttribute(fields.value) ? option.getAttribute(fields.value) : option.innerText, 
                items.push(json);
            }
        }, DropDownBase.prototype.preRender = function() {
            this.scrollTimer = -1, this.enableRtlElements = [], this.isRequested = !1;
        }, DropDownBase.prototype.setListData = function(dataSource, fields, query) {
            var _this = this;
            fields = fields || this.fields;
            var ulElement;
            if (this.isActive = !0, dataSource instanceof DataManager) {
                var eventArgs = {
                    cancel: !1,
                    data: dataSource,
                    query: query
                };
                if (this.trigger("actionBegin", eventArgs), eventArgs.cancel) return;
                this.showSpinner(), this.isRequested = !0, eventArgs.data.executeQuery(this.getQuery(eventArgs.query)).then(function(e) {
                    if (_this.trigger("actionComplete", e), !e.cancel) {
                        var listItems = e.result;
                        ulElement = _this.renderItems(listItems, fields), _this.onActionComplete(ulElement, listItems, e), 
                        _this.isRequested = !1, _this.hideSpinner(), _this.trigger("dataBound", {
                            items: listItems,
                            e: e
                        });
                    }
                }).catch(function(e) {
                    _this.isRequested = !1, _this.onActionFailure(e), _this.hideSpinner();
                });
            } else {
                this.showSpinner();
                var dataManager = new DataManager(dataSource), listItems = this.getQuery(query).executeLocal(dataManager);
                ulElement = this.renderItems(listItems, fields), this.onActionComplete(ulElement, listItems), 
                this.hideSpinner(), this.trigger("dataBound", {
                    items: listItems
                });
            }
        }, DropDownBase.prototype.showSpinner = function() {}, DropDownBase.prototype.hideSpinner = function() {}, 
        DropDownBase.prototype.onActionFailure = function(e) {
            this.liCollections = [], this.trigger("actionFailure", e), this.l10nUpdate(!0), 
            addClass([ this.list ], dropDownBaseClasses$1.noData);
        }, DropDownBase.prototype.onActionComplete = function(ulElement, list, e) {
            this.listData = list, this.list.innerHTML = "", this.list.appendChild(ulElement), 
            this.liCollections = this.list.querySelectorAll("." + dropDownBaseClasses$1.li), 
            this.ulElement = this.list.querySelector("ul"), this.postRender(this.list, list, this.bindEvent);
        }, DropDownBase.prototype.postRender = function(listElement, list, bindEvent) {
            var focusItem = listElement.querySelector("." + dropDownBaseClasses$1.li), selectedItem = listElement.querySelector("." + dropDownBaseClasses$1.selected);
            focusItem && !selectedItem && addClass([ focusItem ], dropDownBaseClasses$1.focus), 
            list.length <= 0 ? (this.l10nUpdate(), addClass([ listElement ], dropDownBaseClasses$1.noData)) : listElement.classList.remove(dropDownBaseClasses$1.noData), 
            this.groupTemplate && this.renderGroupTemplate(listElement);
        }, DropDownBase.prototype.getQuery = function(query) {
            return query || (this.query ? this.query : new Query());
        }, DropDownBase.prototype.renderGroupTemplate = function(listEle) {
            if (null !== this.fields.groupBy && this.dataSource || this.element.querySelector("." + dropDownBaseClasses$1.group)) {
                var dataSource = this.dataSource, headerItems = listEle.querySelectorAll("." + dropDownBaseClasses$1.group);
                ListBase.renderGroupTemplate(this.groupTemplate, dataSource, this.fields.properties, headerItems);
            }
        }, DropDownBase.prototype.createListItems = function(dataSource, fields) {
            dataSource && fields.groupBy || this.element.querySelector("optgroup") ? (fields.groupBy && (dataSource = ListBase.groupDataSource(dataSource, fields.properties)), 
            addClass([ this.list ], dropDownBaseClasses$1.grouping)) : dataSource = this.getSortedDataSource(dataSource);
            var options = this.listOption(dataSource, fields);
            return ListBase.createList(dataSource, options, !0);
        }, DropDownBase.prototype.listOption = function(dataSource, fields) {
            var iconCss = !isNullOrUndefined(fields.iconCss);
            return extend({}, null !== fields.text || null !== fields.value ? {
                fields: fields.properties,
                showIcon: iconCss,
                ariaAttributes: {
                    groupItemRole: "presentation"
                }
            } : {
                fields: {
                    value: "text"
                }
            }, fields, !0);
        }, DropDownBase.prototype.setFloatingHeader = function(e) {
            isNullOrUndefined(this.fixedHeaderElement) && (this.fixedHeaderElement = createElement("div", {
                className: dropDownBaseClasses$1.fixedHead
            }), this.list.querySelector("li").classList.contains(dropDownBaseClasses$1.group) || (this.fixedHeaderElement.style.display = "none"), 
            prepend([ this.fixedHeaderElement ], this.list), this.setFixedHeader()), isNullOrUndefined(this.fixedHeaderElement) || "0" !== this.fixedHeaderElement.style.zIndex || this.setFixedHeader(), 
            this.scrollStop(e);
        }, DropDownBase.prototype.scrollStop = function(e) {
            for (var target = e.target, liHeight = parseInt(getComputedStyle(this.liCollections[0], null).getPropertyValue("height"), 10), topIndex = Math.round(target.scrollTop / liHeight), liCollections = this.ulElement.querySelectorAll("li"), i = topIndex; i > -1; i--) {
                if (!isNullOrUndefined(liCollections[i]) && liCollections[i].classList.contains(dropDownBaseClasses$1.group)) {
                    var currentLi = liCollections[i];
                    this.fixedHeaderElement.innerHTML = currentLi.innerHTML, this.fixedHeaderElement.style.display = "block";
                    break;
                }
                this.fixedHeaderElement.style.display = "none";
            }
        }, DropDownBase.prototype.renderItems = function(listData, fields) {
            var ulElement;
            if (this.itemTemplate && listData) {
                var dataSource = listData;
                dataSource = dataSource && fields.groupBy ? ListBase.groupDataSource(dataSource, fields.properties, this.sortOrder) : this.getSortedDataSource(dataSource), 
                ulElement = this.templateListItem(dataSource, fields);
            } else ulElement = this.createListItems(listData, fields);
            return ulElement;
        }, DropDownBase.prototype.templateListItem = function(dataSource, fields) {
            var option = this.listOption(dataSource, fields);
            return ListBase.renderContentTemplate(this.itemTemplate, dataSource, fields.properties, option);
        }, DropDownBase.prototype.typeOfData = function(items) {
            for (var item = {
                typeof: null,
                item: null
            }, i = 0; i < items.length; i++) if (!isNullOrUndefined(items[i])) return item = {
                typeof: typeof items[i],
                item: items[i]
            };
            return item;
        }, DropDownBase.prototype.setFixedHeader = function() {
            this.list.parentElement.style.display = "block";
            var liWidth = this.liCollections[0].offsetWidth;
            this.fixedHeaderElement.style.width = liWidth.toString() + "px", setStyleAttribute(this.fixedHeaderElement, {
                zIndex: 10
            });
            var firstLi = this.ulElement.querySelector("." + dropDownBaseClasses$1.group);
            this.fixedHeaderElement.innerHTML = firstLi.innerHTML;
        }, DropDownBase.prototype.getSortedDataSource = function(dataSource) {
            if (dataSource && "None" !== this.sortOrder) {
                var textField = this.fields.text ? this.fields.text : "text";
                dataSource = ListBase.getDataSource(dataSource, ListBase.addSorting(this.sortOrder, textField));
            }
            return dataSource;
        }, DropDownBase.prototype.getIndexByValue = function(value) {
            for (var index, listItems = this.getItems(), i = 0; i < listItems.length; i++) if (!isNullOrUndefined(value) && listItems[i].getAttribute("data-value") === value.toString()) {
                index = i;
                break;
            }
            return index;
        }, DropDownBase.prototype.dispatchEvent = function(element, type) {
            var evt = document.createEvent("HTMLEvents");
            evt.initEvent(type, !1, !0), element.dispatchEvent(evt);
        }, DropDownBase.prototype.setFields = function() {
            var fields = this.fields;
            this.fields.value && !this.fields.text ? this.fields.text = this.fields.value : !fields.value && fields.text ? this.fields.value = this.fields.text : this.fields.value || this.fields.text || (this.fields.value = this.fields.text = "text");
        }, DropDownBase.prototype.resetList = function(dataSource, fields, query) {
            this.list && this.setListData(dataSource, fields, query);
        }, DropDownBase.prototype.updateSelection = function() {}, DropDownBase.prototype.renderList = function() {
            this.render();
        }, DropDownBase.prototype.updateDataSource = function(prop) {
            this.resetList(this.dataSource);
        }, DropDownBase.prototype.setUpdateInitial = function(props, newProp) {
            isNullOrUndefined(newProp.fields) || this.setFields();
            for (var j = 0; props.length > j; j++) newProp[props[j]] && this.updateDataSource(props[j]);
        }, DropDownBase.prototype.onPropertyChanged = function(newProp, oldProp) {
            this.setUpdateInitial([ "query", "sortOrder", "dataSource", "itemTemplate" ], newProp);
            for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "query":
                  case "sortOrder":
                  case "dataSource":
                  case "itemTemplate":
                    break;

                  case "enableRtl":
                    this.setEnableRtl();
                    break;

                  case "enabled":
                    this.setEnabled();
                    break;

                  case "groupTemplate":
                    this.renderGroupTemplate(this.list);
                    break;

                  case "locale":
                    this.list && !isNullOrUndefined(this.liCollections) && 0 === this.liCollections.length && this.l10nUpdate();
                    break;

                  case "zIndex":
                    this.setProperties({
                        zIndex: newProp.zIndex
                    }, !0), this.setZIndex();
                }
            }
        }, DropDownBase.prototype.render = function(isEmptyData) {
            this.list = createElement("div", {
                className: dropDownBaseClasses$1.content,
                attrs: {
                    tabindex: "0"
                }
            }), this.list.classList.add(dropDownBaseClasses$1.root), this.setFields();
            var rippleModel = {
                duration: 300,
                selector: "." + dropDownBaseClasses$1.li
            };
            this.rippleFun = rippleEffect(this.list, rippleModel);
            var group = this.element.querySelector("select>optgroup");
            if (!this.fields.groupBy && isNullOrUndefined(group) || EventHandler.add(this.list, "scroll", this.setFloatingHeader, this), 
            "dropdownbase" === this.getModuleName()) {
                this.element.getAttribute("tabindex") && this.list.setAttribute("tabindex", this.element.getAttribute("tabindex")), 
                removeClass([ this.element ], dropDownBaseClasses$1.root), this.element.style.display = "none";
                var wrapperElement = document.createElement("div");
                this.element.parentElement.insertBefore(wrapperElement, this.element), wrapperElement.appendChild(this.element), 
                wrapperElement.appendChild(this.list);
            }
            this.setEnableRtl(), this.setEnabled(), isEmptyData || this.initialize();
        }, DropDownBase.prototype.getModuleName = function() {
            return "dropdownbase";
        }, DropDownBase.prototype.getItems = function() {
            return this.ulElement.querySelectorAll("." + dropDownBaseClasses$1.li);
        }, DropDownBase.prototype.addItem = function(items, itemIndex) {
            this.list && this.list.textContent !== this.noRecordsTemplate || this.renderList();
            var itemsCount = this.getItems().length, selectedItemValue = this.list.querySelector("." + dropDownBaseClasses$1.selected);
            items = items instanceof Array ? items : [ items ];
            var index;
            index = isNullOrUndefined(itemIndex) || itemIndex < 0 || itemIndex > itemsCount - 1 ? itemsCount : itemIndex;
            for (var fields = this.fields, liCollections = [], i = 0; i < items.length; i++) {
                var item = items[i], li = createElement("li", {
                    className: dropDownBaseClasses$1.li,
                    id: "option-add-" + i
                });
                li.setAttribute("data-value", getValue(fields.value, item)), li.setAttribute("role", "option"), 
                li.appendChild(document.createTextNode(getValue(fields.text, item))), liCollections.push(li), 
                this.listData.push(item), this.updateActionCompleteData(li, item);
            }
            if (0 === itemsCount && isNullOrUndefined(this.list.querySelector("ul"))) this.list.innerHTML = "", 
            this.list.appendChild(this.ulElement), append(liCollections, this.ulElement); else for (i = 0; i < items.length; i++) {
                this.liCollections[index] ? this.liCollections[index].parentNode.insertBefore(liCollections[i], this.liCollections[index]) : this.ulElement.appendChild(liCollections[i]);
                var tempLi = [].slice.call(this.liCollections);
                tempLi.splice(index, 0, liCollections[i]), this.liCollections = tempLi, index += 1;
            }
            (selectedItemValue || 0 === itemIndex) && this.updateSelection();
        }, DropDownBase.prototype.setZIndex = function() {}, DropDownBase.prototype.updateActionCompleteData = function(li, item) {}, 
        DropDownBase.prototype.getDataByValue = function(value) {
            var type = this.typeOfData(this.listData).typeof;
            if ("string" === type || "number" === type) for (var _i = 0, _a = this.listData; _i < _a.length; _i++) {
                if (!isNullOrUndefined(item = _a[_i]) && item === value) return item;
            } else for (var _b = 0, _c = this.listData; _b < _c.length; _b++) {
                var item;
                if (!isNullOrUndefined(item = _c[_b]) && getValue(this.fields.value ? this.fields.value : "value", item) === value) return item;
            }
            return null;
        }, DropDownBase.prototype.destroy = function() {
            document.body.contains(this.list) && (EventHandler.remove(this.list, "scroll", this.setFloatingHeader), 
            isNullOrUndefined(this.rippleFun) || this.rippleFun(), detach(this.list)), _super.prototype.destroy.call(this);
        }, __decorate$27([ Complex({
            text: null,
            value: null,
            iconCss: null,
            groupBy: null
        }, FieldSettings$2) ], DropDownBase.prototype, "fields", void 0), __decorate$27([ Property(!1) ], DropDownBase.prototype, "enableRtl", void 0), 
        __decorate$27([ Property(!1) ], DropDownBase.prototype, "enablePersistence", void 0), 
        __decorate$27([ Property(null) ], DropDownBase.prototype, "itemTemplate", void 0), 
        __decorate$27([ Property(null) ], DropDownBase.prototype, "groupTemplate", void 0), 
        __decorate$27([ Property("No Records Found") ], DropDownBase.prototype, "noRecordsTemplate", void 0), 
        __decorate$27([ Property("The Request Failed") ], DropDownBase.prototype, "actionFailureTemplate", void 0), 
        __decorate$27([ Property("None") ], DropDownBase.prototype, "sortOrder", void 0), 
        __decorate$27([ Property(!0) ], DropDownBase.prototype, "enabled", void 0), __decorate$27([ Property([]) ], DropDownBase.prototype, "dataSource", void 0), 
        __decorate$27([ Property(null) ], DropDownBase.prototype, "query", void 0), __decorate$27([ Property(1e3) ], DropDownBase.prototype, "zIndex", void 0), 
        __decorate$27([ Property(!1) ], DropDownBase.prototype, "ignoreAccent", void 0), 
        __decorate$27([ Event() ], DropDownBase.prototype, "actionBegin", void 0), __decorate$27([ Event() ], DropDownBase.prototype, "actionComplete", void 0), 
        __decorate$27([ Event() ], DropDownBase.prototype, "actionFailure", void 0), __decorate$27([ Event() ], DropDownBase.prototype, "select", void 0), 
        __decorate$27([ Event() ], DropDownBase.prototype, "dataBound", void 0), __decorate$27([ Event() ], DropDownBase.prototype, "created", void 0), 
        __decorate$27([ Event() ], DropDownBase.prototype, "destroyed", void 0), DropDownBase = __decorate$27([ NotifyPropertyChanges ], DropDownBase);
    }(Component), __extends$1$5 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$1$5 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, dropDownListClasses$1 = {
        root: "e-dropdownlist",
        hover: dropDownBaseClasses$1.hover,
        selected: dropDownBaseClasses$1.selected,
        rtl: dropDownBaseClasses$1.rtl,
        li: dropDownBaseClasses$1.li,
        disable: dropDownBaseClasses$1.disabled,
        base: dropDownBaseClasses$1.root,
        focus: dropDownBaseClasses$1.focus,
        input: "e-input-group",
        inputFocus: "e-input-focus",
        icon: "e-input-group-icon e-ddl-icon",
        iconAnimation: "e-icon-anim",
        value: "e-input-value",
        device: "e-ddl-device",
        backIcon: "e-input-group-icon e-back-icon e-icons",
        filterBarClearIcon: "e-input-group-icon e-clear-icon e-icons",
        filterInput: "e-input-filter",
        filterParent: "e-filter-parent",
        mobileFilter: "e-ddl-device-filter",
        footer: "e-ddl-footer",
        header: "e-ddl-header",
        clearIcon: "e-clear-icon",
        clearIconHide: "e-clear-icon-hide",
        popupFullScreen: "e-popup-full-page",
        disableIcon: "e-ddl-disable-icon",
        hiddenElement: "e-ddl-hidden"
    }, inputObject$2 = {
        container: null,
        buttons: []
    }, DropDownList$1 = function(_super) {
        function DropDownList(options, element) {
            return _super.call(this, options, element) || this;
        }
        return __extends$1$5(DropDownList, _super), DropDownList.prototype.preRender = function() {
            this.element.style.opacity = "0", this.initializeData(), _super.prototype.preRender.call(this), 
            this.activeIndex = this.index, this.queryString = "";
        }, DropDownList.prototype.initializeData = function() {
            this.isPopupOpen = !1, this.isDocumentClick = !1, this.isInteracted = !1, this.isFilterFocus = !1, 
            this.beforePopupOpen = !1, this.initial = !0, this.initRemoteRender = !1, this.isNotSearchList = !1, 
            this.isTyped = !1, this.isSelected = !1, this.preventFocus = !1, this.preventAutoFill = !1, 
            this.isValidKey = !1, this.typedString = "", this.isEscapeKey = !1, this.isPreventBlur = !1, 
            this.isTabKey = !1, this.actionCompleteData = {
                isUpdated: !1
            }, this.prevSelectPoints = {}, this.isSelectCustom = !1, this.isDropDownClick = !1, 
            this.preventAltUp = !1, this.isCustomFilter = !1, this.isSecondClick = !1, this.keyConfigure = {
                tab: "tab",
                enter: "13",
                escape: "27",
                end: "35",
                home: "36",
                down: "40",
                up: "38",
                pageUp: "33",
                pageDown: "34",
                open: "alt+40",
                close: "shift+tab",
                hide: "alt+38",
                space: "32"
            };
        }, DropDownList.prototype.setZIndex = function() {
            this.popupObj && this.popupObj.setProperties({
                zIndex: this.zIndex
            });
        }, DropDownList.prototype.renderList = function(isEmptyData) {
            _super.prototype.render.call(this, isEmptyData), this.wireListEvents();
        }, DropDownList.prototype.floatLabelChange = function() {
            if ("dropdownlist" === this.getModuleName() && "Auto" === this.floatLabelType) {
                var floatElement = this.inputWrapper.container.querySelector(".e-float-text");
                "" !== this.inputElement.value || this.isInteracted ? classList(floatElement, [ "e-label-top" ], [ "e-label-bottom" ]) : classList(floatElement, [ "e-label-bottom" ], [ "e-label-top" ]);
            }
        }, DropDownList.prototype.resetHandler = function(e) {
            e.preventDefault(), this.clear(e);
        }, DropDownList.prototype.resetFocusElement = function() {
            if (this.removeHover(), this.removeSelection(), this.removeFocus(), this.list.scrollTop = 0, 
            "autocomplete" !== this.getModuleName()) {
                var li = this.ulElement.querySelector("." + dropDownListClasses$1.li);
                li && li.classList.add(dropDownListClasses$1.focus);
            }
        }, DropDownList.prototype.clear = function(e, property) {
            this.resetSelection();
            var dataItem = this.getItemData();
            this.previousValue !== dataItem.value && this.onChangeEvent(e);
        }, DropDownList.prototype.resetSelection = function() {
            this.list && (this.allowFiltering && "autocomplete" !== this.getModuleName() && this.onActionComplete(this.actionCompleteData.ulElement.cloneNode(!0), this.actionCompleteData.list), 
            this.resetFocusElement()), this.hiddenElement.innerHTML = "", this.inputElement.value = "", 
            this.value = null, this.text = null, this.index = null, this.activeIndex = null, 
            this.item = null, this.itemData = null, this.queryString = "", this.valueTempElement && (detach(this.valueTempElement), 
            this.inputElement.style.display = "block", this.valueTempElement = null), this.setSelection(null, null), 
            this.isSelectCustom = !1, this.updateIconState();
        }, DropDownList.prototype.setHTMLAttributes = function() {
            if (Object.keys(this.htmlAttributes).length) for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
                var htmlAttr = _a[_i];
                if ("class" === htmlAttr) this.inputWrapper.container.classList.add(this.htmlAttributes[htmlAttr]); else if ("disabled" === htmlAttr && "disabled" === this.htmlAttributes[htmlAttr]) this.enabled = !1, 
                this.setEnable(); else if ("readonly" === htmlAttr && "readonly" === this.htmlAttributes[htmlAttr]) this.readonly = !0, 
                this.dataBind(); else if ("style" === htmlAttr) this.inputWrapper.container.setAttribute("style", this.htmlAttributes[htmlAttr]); else {
                    [ "name", "required" ].indexOf(htmlAttr) > -1 ? this.hiddenElement.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]) : [ "title", "id", "placeholder" ].indexOf(htmlAttr) > -1 ? "placeholder" === htmlAttr ? Input.setPlaceholder(this.htmlAttributes[htmlAttr], this.inputElement) : this.element.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]) : this.inputWrapper.container.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
                }
            }
        }, DropDownList.prototype.getAriaAttributes = function() {
            return {
                "aria-disabled": "false",
                "aria-owns": this.element.id + "_options",
                role: "listbox",
                "aria-haspopup": "true",
                "aria-expanded": "false",
                "aria-activedescendant": "null",
                "aria-labelledby": this.hiddenElement.id
            };
        }, DropDownList.prototype.setEnableRtl = function() {
            Input.setEnableRtl(this.enableRtl, [ this.inputElement.parentElement ]), this.popupObj && (this.popupObj.enableRtl = this.enableRtl, 
            this.popupObj.dataBind());
        }, DropDownList.prototype.setEnable = function() {
            Input.setEnabled(this.enabled, this.inputElement), this.enabled ? (removeClass([ this.inputWrapper.container ], dropDownListClasses$1.disable), 
            this.inputElement.setAttribute("aria-disabled", "false"), this.targetElement().setAttribute("tabindex", this.tabIndex)) : (this.hidePopup(), 
            addClass([ this.inputWrapper.container ], dropDownListClasses$1.disable), this.inputElement.setAttribute("aria-disabled", "true"), 
            this.targetElement().tabIndex = -1);
        }, DropDownList.prototype.getPersistData = function() {
            return this.addOnPersist([ "value" ]);
        }, DropDownList.prototype.preventTabIndex = function(element) {
            "dropdownlist" === this.getModuleName() && (element.tabIndex = -1);
        }, DropDownList.prototype.targetElement = function() {
            return this.inputWrapper.container;
        }, DropDownList.prototype.getNgDirective = function() {
            return "EJS-DROPDOWNLIST";
        }, DropDownList.prototype.getElementByText = function(text) {
            return this.getElementByValue(this.getValueByText(text));
        }, DropDownList.prototype.getElementByValue = function(value) {
            for (var item, _i = 0, listItems_1 = this.getItems(); _i < listItems_1.length; _i++) {
                var liItem = listItems_1[_i];
                if (this.getFormattedValue(liItem.getAttribute("data-value")) === value) {
                    item = liItem;
                    break;
                }
            }
            return item;
        }, DropDownList.prototype.initValue = function() {
            this.renderList(), this.dataSource instanceof DataManager ? this.initRemoteRender = !0 : this.updateValues();
        }, DropDownList.prototype.updateValues = function() {
            if (isNullOrUndefined(this.value)) if (this.text && isNullOrUndefined(this.value)) {
                var element = this.getElementByText(this.text);
                if (isNullOrUndefined(element)) return void this.setProperties({
                    text: null
                });
                this.setSelection(element, null);
            } else this.setSelection(this.liCollections[this.activeIndex], null); else this.setSelection(this.getElementByValue(this.value), null);
            this.setHiddenValue(), Input.setValue(this.text, this.inputElement, this.floatLabelType, this.showClearButton);
        }, DropDownList.prototype.onBlur = function(e) {
            var target = e.relatedTarget, currentTarget = e.target, isPreventBlur = this.isPreventBlur;
            this.isPreventBlur = !1, !isPreventBlur || this.isDocumentClick || !this.isPopupOpen || isNullOrUndefined(currentTarget) && (this.isFilterLayout() || !isNullOrUndefined(target)) ? this.isDocumentClick || !isNullOrUndefined(this.popupObj) && document.body.contains(this.popupObj.element) && this.popupObj.element.classList.contains(dropDownListClasses$1.mobileFilter) ? this.beforePopupOpen || (this.isDocumentClick = !1) : ("dropdownlist" === this.getModuleName() && !this.isFilterFocus && target !== this.inputElement && (document.activeElement !== target || document.activeElement === target && currentTarget.classList.contains(dropDownListClasses$1.inputFocus)) || isNullOrUndefined(target) && "dropdownlist" === this.getModuleName() && this.allowFiltering && currentTarget !== this.inputWrapper.container || "dropdownlist" !== this.getModuleName() && !this.inputWrapper.container.contains(target) || this.isTabKey) && (this.isDocumentClick = !!this.isPopupOpen, 
            this.focusOutAction(), this.isTabKey = !1) : "dropdownlist" === this.getModuleName() && this.allowFiltering && this.isPopupOpen ? this.filterInput.focus() : this.targetElement().focus();
        }, DropDownList.prototype.focusOutAction = function() {
            this.isInteracted = !1, this.focusOut(), this.onFocusOut();
        }, DropDownList.prototype.onFocusOut = function() {
            this.isSelected && (this.isSelectCustom = !1, this.onChangeEvent(null)), this.floatLabelChange(), 
            this.dispatchEvent(this.hiddenElement, "change"), this.inputWrapper.clearButton && addClass([ this.inputWrapper.clearButton ], dropDownListClasses$1.clearIconHide), 
            this.trigger("blur");
        }, DropDownList.prototype.onFocus = function() {
            this.isInteracted || (this.isInteracted = !0, this.trigger("focus")), this.updateIconState();
        }, DropDownList.prototype.wireEvent = function() {
            EventHandler.add(this.inputWrapper.container, "mousedown", this.dropDownClick, this), 
            EventHandler.add(this.inputWrapper.container, "focus", this.focusIn, this), EventHandler.add(this.inputWrapper.container, "keypress", this.onSearch, this), 
            this.bindCommonEvent();
        }, DropDownList.prototype.bindCommonEvent = function() {
            EventHandler.add(this.targetElement(), "blur", this.onBlur, this), Browser.isDevice || (this.keyboardModule = new KeyboardEvents(this.targetElement(), {
                keyAction: this.keyActionHandler.bind(this),
                keyConfigs: this.keyConfigure,
                eventName: "keydown"
            })), this.bindClearEvent();
        }, DropDownList.prototype.bindClearEvent = function() {
            this.showClearButton && EventHandler.add(this.inputWrapper.clearButton, "mousedown", this.resetHandler, this);
        }, DropDownList.prototype.unBindCommonEvent = function() {
            EventHandler.remove(this.targetElement(), "blur", this.onBlur), Browser.isDevice || this.keyboardModule.destroy(), 
            this.showClearButton && EventHandler.remove(this.inputWrapper.clearButton, "mousedown", this.resetHandler);
        }, DropDownList.prototype.updateIconState = function() {
            this.showClearButton && ("" !== this.inputElement.value ? removeClass([ this.inputWrapper.clearButton ], dropDownListClasses$1.clearIconHide) : addClass([ this.inputWrapper.clearButton ], dropDownListClasses$1.clearIconHide));
        }, DropDownList.prototype.wireListEvents = function() {
            EventHandler.add(this.list, "click", this.onMouseClick, this), EventHandler.add(this.list, "mouseover", this.onMouseOver, this), 
            EventHandler.add(this.list, "mouseout", this.onMouseLeave, this);
        }, DropDownList.prototype.onSearch = function(e) {
            32 !== e.charCode && 13 !== e.charCode && (void 0 === this.list && this.renderList(), 
            this.searchKeyEvent = e, this.isRequested || isNullOrUndefined(this.list.querySelector("li")) || this.incrementalSearch(e));
        }, DropDownList.prototype.onMouseClick = function(e) {
            var target = e.target, li = (target.classList, closest(target, "." + dropDownBaseClasses$1.li));
            if (this.isValidLI(li)) if (this.setSelection(li, e), Browser.isDevice && this.isFilterLayout()) history.back(); else {
                this.closePopup(100);
            }
        }, DropDownList.prototype.onMouseOver = function(e) {
            var currentLi = closest(e.target, "." + dropDownBaseClasses$1.li);
            this.setHover(currentLi);
        }, DropDownList.prototype.setHover = function(li) {
            this.enabled && this.isValidLI(li) && !li.classList.contains(dropDownBaseClasses$1.hover) && (this.removeHover(), 
            addClass([ li ], dropDownBaseClasses$1.hover));
        }, DropDownList.prototype.onMouseLeave = function(e) {
            this.removeHover();
        }, DropDownList.prototype.removeHover = function() {
            var hoveredItem = this.list.querySelectorAll("." + dropDownBaseClasses$1.hover);
            hoveredItem && hoveredItem.length && removeClass(hoveredItem, dropDownBaseClasses$1.hover);
        }, DropDownList.prototype.isValidLI = function(li) {
            return li && li.hasAttribute("role") && "option" === li.getAttribute("role");
        }, DropDownList.prototype.incrementalSearch = function(e) {
            if (this.liCollections.length > 0) {
                var li = function(keyCode, items, selectedIndex, ignoreCase) {
                    queryString$1 += String.fromCharCode(keyCode), setTimeout(function() {
                        queryString$1 = "";
                    }, 1e3);
                    var index;
                    if (queryString$1 = ignoreCase ? queryString$1.toLowerCase() : queryString$1, prevString$1 === queryString$1) {
                        for (var i = 0; i < matches$2.length; i++) if (matches$2[i].classList.contains(activeClass$1)) {
                            index = i;
                            break;
                        }
                        return index += 1, matches$2[index];
                    }
                    var listItems = items, strLength = queryString$1.length, item = void 0;
                    i = selectedIndex = selectedIndex ? selectedIndex + 1 : 0, matches$2 = [];
                    do {
                        i === listItems.length && (i = -1), item = listItems[index = -1 === i ? 0 : i], 
                        (ignoreCase ? item.innerText.toLowerCase() : item.innerText).substr(0, strLength) === queryString$1 && matches$2.push(listItems[index]), 
                        i++;
                    } while (i !== selectedIndex);
                    return prevString$1 = queryString$1, matches$2[0];
                }(e.charCode, this.liCollections, this.activeIndex, !0);
                isNullOrUndefined(li) || (this.setSelection(li, e), this.setScrollPosition());
            }
        }, DropDownList.prototype.hideSpinner = function() {
            isNullOrUndefined(this.spinnerElement) || (hideSpinner(this.spinnerElement), removeClass([ this.spinnerElement ], dropDownListClasses$1.disableIcon), 
            this.spinnerElement.innerHTML = "", this.spinnerElement = null);
        }, DropDownList.prototype.showSpinner = function() {
            isNullOrUndefined(this.spinnerElement) && (this.spinnerElement = Browser.isDevice && !isNullOrUndefined(this.filterInputObj) && this.filterInputObj.buttons[1] || !isNullOrUndefined(this.filterInputObj) && this.filterInputObj.buttons[0] || this.inputWrapper.buttons[0], 
            addClass([ this.spinnerElement ], dropDownListClasses$1.disableIcon), createSpinner({
                target: this.spinnerElement,
                width: Browser.isDevice ? "16px" : "14px"
            }), showSpinner(this.spinnerElement));
        }, DropDownList.prototype.keyActionHandler = function(e) {
            var preventAction = "pageUp" === e.action || "pageDown" === e.action, preventHomeEnd = "dropdownlist" !== this.getModuleName() && ("home" === e.action || "end" === e.action);
            this.isEscapeKey = "escape" === e.action, this.isTabKey = !this.isPopupOpen && "tab" === e.action;
            var isNavigation = "down" === e.action || "up" === e.action || "pageUp" === e.action || "pageDown" === e.action || "home" === e.action || "end" === e.action;
            if ((!(this.isEditTextBox() || preventAction || preventHomeEnd) || this.isPopupOpen) && !this.readonly) {
                var isTabAction = "tab" === e.action || "close" === e.action;
                if (void 0 !== this.list || this.isRequested || isTabAction || "escape" === e.action || (this.searchKeyEvent = e, 
                this.renderList()), isNullOrUndefined(this.list) || !isNullOrUndefined(this.liCollections) && isNavigation && 0 === this.liCollections.length || this.isRequested) return;
                switch ((isTabAction && this.isPopupOpen || "escape" === e.action) && e.preventDefault(), 
                this.isSelected = "escape" !== e.action && this.isSelected, this.isTyped = !isNavigation && "escape" !== e.action && this.isTyped, 
                e.action) {
                  case "down":
                  case "up":
                    var focusEle = this.list.querySelector("." + dropDownListClasses$1.focus);
                    if (this.isSelectFocusItem(focusEle)) this.setSelection(focusEle, e); else {
                        var nextItem = void 0, index = "down" === e.action ? this.activeIndex + 1 : this.activeIndex - 1, startIndex = 0;
                        "autocomplete" === this.getModuleName() && (startIndex = "down" === e.action && isNullOrUndefined(this.activeIndex) ? 0 : this.liCollections.length - 1, 
                        index = index < 0 ? this.liCollections.length - 1 : index === this.liCollections.length ? 0 : index), 
                        nextItem = isNullOrUndefined(this.activeIndex) ? this.liCollections[startIndex] : this.liCollections[index], 
                        this.setSelection(nextItem, e);
                    }
                    e.preventDefault();
                    break;

                  case "pageUp":
                    this.pageUpSelection(this.activeIndex - this.getPageCount(), e), e.preventDefault();
                    break;

                  case "pageDown":
                    this.pageDownSelection(this.activeIndex + this.getPageCount(), e), e.preventDefault();
                    break;

                  case "home":
                    if ("dropdownlist" === this.getModuleName()) {
                        if (e.preventDefault(), 0 === this.activeIndex) return;
                        this.setSelection(this.liCollections[0], e);
                    }
                    break;

                  case "end":
                    if ("dropdownlist" === this.getModuleName()) {
                        e.preventDefault();
                        var lastLi = this.getItems().length - 1;
                        if (this.activeIndex === lastLi) return;
                        this.setSelection(this.liCollections[lastLi], e);
                    }
                    break;

                  case "space":
                    "dropdownlist" === this.getModuleName() && (this.beforePopupOpen || this.showPopup());
                    break;

                  case "open":
                    this.showPopup();
                    break;

                  case "hide":
                    this.preventAltUp = this.isPopupOpen, this.hidePopup(), this.focusDropDown(e);
                    break;

                  case "enter":
                    this.selectCurrentItem(e);
                    break;

                  case "escape":
                  case "tab":
                  case "close":
                    this.isPopupOpen && (this.hidePopup(), this.focusDropDown(e));
                }
            }
        }, DropDownList.prototype.selectCurrentItem = function(e) {
            if (this.isPopupOpen) {
                var li = this.list.querySelector("." + dropDownListClasses$1.focus);
                li && (this.setSelection(li, e), this.isTyped = !1), this.isSelected && (this.isSelectCustom = !1, 
                this.onChangeEvent(e)), this.hidePopup(), this.focusDropDown(e);
            } else this.showPopup();
        }, DropDownList.prototype.isSelectFocusItem = function(element) {
            return !isNullOrUndefined(element);
        }, DropDownList.prototype.getPageCount = function() {
            var liHeight = this.list.classList.contains(dropDownBaseClasses$1.noData) ? null : getComputedStyle(this.getItems()[0], null).getPropertyValue("height");
            return Math.round(this.list.getBoundingClientRect().height / parseInt(liHeight, 10));
        }, DropDownList.prototype.pageUpSelection = function(steps, event) {
            var previousItem = steps >= 0 ? this.liCollections[steps + 1] : this.liCollections[0];
            this.setSelection(previousItem, event);
        }, DropDownList.prototype.pageDownSelection = function(steps, event) {
            var list = this.getItems(), previousItem = steps <= list.length ? this.liCollections[steps - 1] : this.liCollections[list.length - 1];
            this.setSelection(previousItem, event);
        }, DropDownList.prototype.unWireEvent = function() {
            EventHandler.remove(this.inputWrapper.container, "mousedown", this.dropDownClick), 
            EventHandler.remove(this.inputWrapper.container, "keypress", this.onSearch), EventHandler.remove(this.inputWrapper.container, "focus", this.focusIn), 
            this.unBindCommonEvent();
        }, DropDownList.prototype.unWireListEvents = function() {
            EventHandler.remove(this.list, "click", this.onMouseClick), EventHandler.remove(this.list, "mouseover", this.onMouseOver), 
            EventHandler.remove(this.list, "mouseout", this.onMouseLeave);
        }, DropDownList.prototype.onDocumentClick = function(e) {
            var target = e.target;
            if (!isNullOrUndefined(this.popupObj) && closest(target, "#" + this.popupObj.element.id) || this.inputWrapper.container.contains(e.target)) target === this.inputElement || this.allowFiltering && target === this.filterInput || "combobox" === this.getModuleName() && !this.allowFiltering && Browser.isDevice && target === this.inputWrapper.buttons[0] || (this.isPreventBlur = (Browser.isIE || "edge" === Browser.info.name) && (document.activeElement === this.targetElement() || document.activeElement === this.filterInput), 
            e.preventDefault()); else if (this.inputWrapper.container.classList.contains(dropDownListClasses$1.inputFocus) || this.isPopupOpen) {
                this.isDocumentClick = !0;
                var isActive = this.isRequested;
                this.isInteracted = !1, this.hidePopup(), isActive || (this.onFocusOut(), this.inputWrapper.container.classList.remove(dropDownListClasses$1.inputFocus));
            }
        }, DropDownList.prototype.activeStateChange = function() {
            this.isDocumentClick && (this.hidePopup(), this.onFocusOut(), this.inputWrapper.container.classList.remove(dropDownListClasses$1.inputFocus));
        }, DropDownList.prototype.focusDropDown = function(e) {
            !this.initial && this.isFilterLayout() && this.focusIn();
        }, DropDownList.prototype.dropDownClick = function(e) {
            if (3 !== e.which && 2 !== e.button && !this.targetElement().classList.contains(dropDownListClasses$1.disable) && this.inputWrapper.clearButton !== e.target) {
                var target = e.target;
                if (target === this.inputElement || this.allowFiltering && target === this.filterInput || "combobox" === this.getModuleName() || e.preventDefault(), 
                !this.readonly) {
                    this.isPopupOpen ? (this.hidePopup(), this.isFilterLayout() && this.focusDropDown(e)) : (this.focusIn(), 
                    this.floatLabelChange(), this.queryString = "" === this.inputElement.value.trim() ? null : this.inputElement.value, 
                    this.isDropDownClick = !0, this.showPopup());
                    var proxy_1 = this;
                    this.isSecondClick || setTimeout(function() {
                        proxy_1.cloneElements();
                    }, 100);
                }
            }
        }, DropDownList.prototype.cloneElements = function() {
            if (this.list) {
                var ulElement = this.list.querySelector("ul");
                ulElement && (ulElement = ulElement.cloneNode ? ulElement.cloneNode(!0) : ulElement, 
                this.actionCompleteData.ulElement = ulElement, this.isSecondClick = !0);
            }
        }, DropDownList.prototype.updateSelectedItem = function(li, e, preventSelect) {
            this.removeSelection(), li.classList.add(dropDownBaseClasses$1.selected), this.removeHover();
            var value = this.getFormattedValue(li.getAttribute("data-value"));
            if (this.item = li, this.itemData = this.getDataByValue(value), !this.initial && !preventSelect) {
                this.isSelected = !0;
                var eventArgs = {
                    e: e,
                    item: this.item,
                    itemData: this.itemData,
                    isInteracted: !!e,
                    cancel: !1
                };
                if (this.trigger("select", eventArgs), eventArgs.cancel) return;
            }
            var focusedItem = this.list.querySelector("." + dropDownBaseClasses$1.focus);
            focusedItem && removeClass([ focusedItem ], dropDownBaseClasses$1.focus), li.setAttribute("aria-selected", "true"), 
            this.activeIndex = this.getIndexByValue(value);
        }, DropDownList.prototype.activeItem = function(li) {
            this.isValidLI(li) && !li.classList.contains(dropDownBaseClasses$1.selected) && (this.removeSelection(), 
            li.classList.add(dropDownBaseClasses$1.selected), this.removeHover(), li.setAttribute("aria-selected", "true"));
        }, DropDownList.prototype.setValue = function(e) {
            var dataItem = this.getItemData();
            return null === dataItem.value ? Input.setValue(null, this.inputElement, this.floatLabelType, this.showClearButton) : Input.setValue(dataItem.text, this.inputElement, this.floatLabelType, this.showClearButton), 
            this.previousValue === dataItem.value ? (this.isSelected = !1, !0) : (this.isSelected = !this.initial, 
            this.isSelectCustom = !1, "dropdownlist" === this.getModuleName() && this.updateIconState(), 
            !1);
        }, DropDownList.prototype.setSelection = function(li, e) {
            this.isValidLI(li) && !li.classList.contains(dropDownBaseClasses$1.selected) && this.updateSelectedItem(li, e, !1), 
            this.list && this.removeHover(), this.selectedLI = li, this.setValue(e) || (this.valueTemplate && null !== this.itemData ? this.setValueTemplate() : this.inputElement.previousSibling === this.valueTempElement && (detach(this.valueTempElement), 
            this.inputElement.style.display = "block"), this.isPopupOpen && (attributes(this.targetElement(), {
                "aria-activedescendant": this.selectedLI ? this.selectedLI.id : null
            }), this.isFilterLayout() && attributes(this.filterInput, {
                "aria-activedescendant": this.selectedLI ? this.selectedLI.id : null
            })), (!this.isPopupOpen && !isNullOrUndefined(li) || this.isPopupOpen && !isNullOrUndefined(e) && ("keydown" !== e.type || "keydown" === e.type && "enter" === e.action)) && (this.isSelectCustom = !1, 
            this.onChangeEvent(e)), !this.isPopupOpen || isNullOrUndefined(this.selectedLI) || null === this.itemData || e && "click" === e.type || this.setScrollPosition(e));
        }, DropDownList.prototype.setValueTemplate = function() {
            this.valueTempElement || (this.valueTempElement = createElement("span", {
                className: dropDownListClasses$1.value
            }), this.inputElement.parentElement.insertBefore(this.valueTempElement, this.inputElement), 
            this.inputElement.style.display = "none"), this.valueTempElement.innerHTML = "";
            for (var _i = 0, _a = compile$$1(this.valueTemplate)(this.itemData); _i < _a.length; _i++) {
                var item = _a[_i];
                this.valueTempElement.appendChild(item);
            }
        }, DropDownList.prototype.removeSelection = function() {
            var selectedItems = this.list.querySelectorAll("." + dropDownBaseClasses$1.selected);
            selectedItems.length && (removeClass(selectedItems, dropDownBaseClasses$1.selected), 
            selectedItems[0].removeAttribute("aria-selected"));
        }, DropDownList.prototype.getItemData = function() {
            var dataValue, dataText, fields = this.fields, dataItem = {};
            isNullOrUndefined(dataItem = this.itemData) || (dataValue = getValue(fields.value, dataItem), 
            dataText = getValue(fields.text, dataItem));
            return {
                value: isNullOrUndefined(dataItem) || isUndefined(dataValue) ? dataItem : dataValue,
                text: isNullOrUndefined(dataItem) || isUndefined(dataValue) ? dataItem : dataText
            };
        }, DropDownList.prototype.onChangeEvent = function(eve) {
            var dataItem = this.getItemData(), index = this.isSelectCustom ? null : this.activeIndex;
            this.setProperties({
                value: dataItem.value,
                index: index,
                text: dataItem.text
            }, !0), this.detachChangeEvent(eve);
        }, DropDownList.prototype.detachChangeEvent = function(eve) {
            if (this.isSelected = !1, this.previousValue = this.value, this.activeIndex = this.index, 
            this.typedString = isNullOrUndefined(this.text) ? "" : this.text, !this.initial) {
                this.setHiddenValue();
                var eventArgs = {
                    e: eve,
                    item: this.item,
                    itemData: this.itemData,
                    isInteracted: !!eve,
                    value: this.value
                };
                this.trigger("change", eventArgs);
            }
        }, DropDownList.prototype.setHiddenValue = function() {
            isNullOrUndefined(this.value) ? this.hiddenElement.innerHTML = "" : this.hiddenElement.innerHTML = "<option selected value =" + this.value + ">" + this.text + "</option>";
        }, DropDownList.prototype.onFilterUp = function(e) {
            if (this.isValidKey = 40 === e.keyCode || 38 === e.keyCode || this.isValidKey, this.isValidKey) switch (this.isValidKey = !1, 
            e.keyCode) {
              case 38:
              case 40:
                "autocomplete" !== this.getModuleName() || this.isPopupOpen || this.preventAltUp || this.isRequested ? this.preventAutoFill = !1 : (this.preventAutoFill = !0, 
                this.searchLists(e)), this.preventAltUp = !1, e.preventDefault();
                break;

              case 46:
              case 8:
                this.typedString = this.filterInput.value, !this.isPopupOpen && "" !== this.typedString || this.isPopupOpen && this.queryString.length > 0 ? (this.preventAutoFill = !0, 
                this.searchLists(e)) : "" === this.typedString && (this.resetFocusElement(), this.activeIndex = null, 
                "autocomplete" === this.getModuleName() && this.hidePopup()), e.preventDefault();
                break;

              default:
                this.typedString = this.filterInput.value, this.preventAutoFill = !1, this.searchLists(e);
            }
        }, DropDownList.prototype.onFilterDown = function(e) {
            switch (e.keyCode) {
              case 13:
                break;

              case 40:
              case 38:
                this.queryString = this.filterInput.value, e.preventDefault();
                break;

              case 9:
                this.isPopupOpen && e.preventDefault();
                break;

              default:
                this.prevSelectPoints = this.getSelectionPoints(), this.queryString = this.filterInput.value;
            }
        }, DropDownList.prototype.removeFillSelection = function() {
            if (this.isInteracted) {
                var selection = this.getSelectionPoints();
                this.inputElement.setSelectionRange(selection.end, selection.end);
            }
        }, DropDownList.prototype.getSelectionPoints = function() {
            var input = this.inputElement;
            return {
                start: Math.abs(input.selectionStart),
                end: Math.abs(input.selectionEnd)
            };
        }, DropDownList.prototype.searchLists = function(e) {
            var _this = this;
            if (this.isTyped = !0, this.activeIndex = null, this.filterInput.parentElement.querySelector("." + dropDownListClasses$1.clearIcon)) {
                this.filterInput.parentElement.querySelector("." + dropDownListClasses$1.clearIcon).style.visibility = "" === this.filterInput.value ? "hidden" : "visible";
            }
            if (this.isFiltering()) {
                var eventArgs_1 = {
                    preventDefaultAction: !1,
                    text: this.filterInput.value,
                    updateData: function(dataSource, query, fields) {
                        eventArgs_1.cancel || (_this.isCustomFilter = !0, _this.filteringAction(dataSource, query, fields));
                    },
                    baseEventArgs: e,
                    cancel: !1
                };
                if (this.trigger("filtering", eventArgs_1), eventArgs_1.cancel) return;
                if (!this.isCustomFilter && !eventArgs_1.preventDefaultAction) {
                    var filterQuery = this.query ? this.query.clone() : new Query(), dataType = this.typeOfData(this.dataSource).typeof;
                    if ((this.dataSource instanceof DataManager || "string" !== dataType) && "number" !== dataType) {
                        var fields = this.fields;
                        filterQuery.where(isNullOrUndefined(fields.text) ? "" : fields.text, "startswith", this.filterInput.value, !0, this.ignoreAccent);
                    } else filterQuery.where("", "startswith", this.filterInput.value, !0, this.ignoreAccent);
                    this.filteringAction(this.dataSource, filterQuery, this.fields);
                }
            }
        }, DropDownList.prototype.filteringAction = function(dataSource, query, fields) {
            isNullOrUndefined(this.filterInput) || (this.beforePopupOpen = !0, "" === this.filterInput.value.trim() ? (this.actionCompleteData.isUpdated = !1, 
            this.isTyped = !1, this.onActionComplete(this.actionCompleteData.ulElement, this.actionCompleteData.list), 
            this.isTyped = !0, isNullOrUndefined(this.itemData) || "dropdownlist" !== this.getModuleName() || (this.focusIndexItem(), 
            this.setScrollPosition()), this.isNotSearchList = !0) : (this.isNotSearchList = !1, 
            this.resetList(dataSource, fields, query)));
        }, DropDownList.prototype.setSearchBox = function(popupElement) {
            if (this.isFiltering()) {
                var parentElement = createElement("span", {
                    className: dropDownListClasses$1.filterParent
                });
                this.filterInput = createElement("input", {
                    attrs: {
                        type: "text"
                    },
                    className: dropDownListClasses$1.filterInput
                }), this.element.parentNode.insertBefore(this.filterInput, this.element);
                var backIcon = !1;
                return Browser.isDevice && (backIcon = !0), this.filterInputObj = Input.createInput({
                    element: this.filterInput,
                    buttons: backIcon ? [ dropDownListClasses$1.backIcon, dropDownListClasses$1.filterBarClearIcon ] : [ dropDownListClasses$1.filterBarClearIcon ],
                    properties: {
                        placeholder: this.filterBarPlaceholder
                    }
                }), append([ this.filterInputObj.container ], parentElement), prepend([ parentElement ], popupElement), 
                attributes(this.filterInput, {
                    "aria-disabled": "false",
                    "aria-owns": this.element.id + "_options",
                    role: "listbox",
                    "aria-activedescendant": this.selectedLI ? this.selectedLI.id : null,
                    autocomplete: "off",
                    autocorrect: "off",
                    autocapitalize: "off",
                    spellcheck: "false"
                }), this.clearIconElement = this.filterInput.parentElement.querySelector("." + dropDownListClasses$1.clearIcon), 
                !Browser.isDevice && this.clearIconElement && (EventHandler.add(this.clearIconElement, "click", this.clearText, this), 
                this.clearIconElement.style.visibility = "hidden"), Browser.isDevice || (this.searchKeyModule = new KeyboardEvents(this.filterInput, {
                    keyAction: this.keyActionHandler.bind(this),
                    keyConfigs: this.keyConfigure,
                    eventName: "keydown"
                })), EventHandler.add(this.filterInput, "input", this.onInput, this), EventHandler.add(this.filterInput, "keyup", this.onFilterUp, this), 
                EventHandler.add(this.filterInput, "keydown", this.onFilterDown, this), EventHandler.add(this.filterInput, "blur", this.onBlur, this), 
                this.filterInputObj;
            }
            return inputObject$2;
        }, DropDownList.prototype.onInput = function() {
            this.isValidKey = !0;
        }, DropDownList.prototype.onActionFailure = function(e) {
            _super.prototype.onActionFailure.call(this, e), this.beforePopupOpen && this.renderPopup();
        }, DropDownList.prototype.onActionComplete = function(ulElement, list, e, isUpdated) {
            if (this.isNotSearchList) this.isNotSearchList = !1; else if (this.isActive) {
                var selectedItem = this.selectedLI ? this.selectedLI.cloneNode(!0) : null;
                _super.prototype.onActionComplete.call(this, ulElement, list, e), this.isRequested && !isNullOrUndefined(this.searchKeyEvent) && "keydown" === this.searchKeyEvent.type && (this.isRequested = !1, 
                this.keyActionHandler(this.searchKeyEvent), this.searchKeyEvent = null), this.isRequested && !isNullOrUndefined(this.searchKeyEvent) && (this.incrementalSearch(this.searchKeyEvent), 
                this.searchKeyEvent = null), this.list.scrollTop = 0, isNullOrUndefined(ulElement) || attributes(ulElement, {
                    id: this.element.id + "_options",
                    role: "listbox",
                    "aria-hidden": "false"
                }), this.initRemoteRender && (this.initial = !0, this.activeIndex = this.index, 
                this.updateValues(), this.initRemoteRender = !1, this.initial = !1), "autocomplete" !== this.getModuleName() && this.isFiltering() && !this.isTyped && (this.actionCompleteData.isUpdated || (this.actionCompleteData = {
                    ulElement: ulElement.cloneNode(!0),
                    list: list,
                    isUpdated: !0
                }), this.addNewItem(list, selectedItem), isNullOrUndefined(this.itemData) || this.focusIndexItem()), 
                this.beforePopupOpen && this.renderPopup();
            }
        }, DropDownList.prototype.addNewItem = function(listData, newElement) {
            var _this = this;
            if (!isNullOrUndefined(this.itemData) && !isNullOrUndefined(newElement)) {
                var value_1 = this.getItemData().value;
                listData.some(function(data) {
                    return ("string" == typeof data || "number" == typeof data) && data === value_1 || getValue(_this.fields.value, data) === value_1;
                }) || this.addItem(this.itemData);
            }
        }, DropDownList.prototype.updateActionCompleteData = function(li, item) {
            "autocomplete" !== this.getModuleName() && this.actionCompleteData.ulElement && (this.actionCompleteData.ulElement.appendChild(li.cloneNode(!0)), 
            this.actionCompleteData.list.push(item));
        }, DropDownList.prototype.focusIndexItem = function() {
            var value = this.getItemData().value;
            this.activeIndex = this.getIndexByValue(value);
            var element = this.list.querySelector('[data-value="' + value + '"]');
            this.selectedLI = element, this.activeItem(element), this.removeFocus();
        }, DropDownList.prototype.updateSelection = function() {
            var selectedItem = this.list.querySelector("." + dropDownBaseClasses$1.selected);
            selectedItem ? (this.setProperties({
                index: this.getIndexByValue(selectedItem.getAttribute("data-value"))
            }), this.activeIndex = this.index) : (this.removeFocus(), this.list.querySelector("." + dropDownBaseClasses$1.li).classList.add(dropDownListClasses$1.focus));
        }, DropDownList.prototype.removeFocus = function() {
            var highlightedItem = this.list.querySelectorAll("." + dropDownListClasses$1.focus);
            highlightedItem && highlightedItem.length && removeClass(highlightedItem, dropDownListClasses$1.focus);
        }, DropDownList.prototype.renderPopup = function() {
            if (this.popupObj && document.body.contains(this.popupObj.element)) this.refreshPopup(); else {
                var popupEle = createElement("div", {
                    id: this.element.id + "_popup",
                    className: "e-ddl e-popup"
                }), searchBox = this.setSearchBox(popupEle);
                if (this.listHeight = formatUnit(this.popupHeight), this.headerTemplate) {
                    this.header = document.createElement("div"), addClass([ this.header ], dropDownListClasses$1.header);
                    for (var _i = 0, _a = compile$$1(this.headerTemplate)({}); _i < _a.length; _i++) {
                        var item = _a[_i];
                        this.header.appendChild(item);
                    }
                    append([ this.header ], popupEle);
                }
                if (append([ this.list ], popupEle), this.footerTemplate && this.setFooterTemplate(popupEle), 
                document.body.appendChild(popupEle), popupEle.style.visibility = "hidden", "auto" !== this.popupHeight) {
                    if (this.searchBoxHeight = 0, isNullOrUndefined(searchBox.container) || (this.searchBoxHeight = searchBox.container.parentElement.getBoundingClientRect().height, 
                    this.listHeight = (parseInt(this.listHeight, 10) - this.searchBoxHeight).toString() + "px"), 
                    this.headerTemplate) {
                        var height = Math.round(this.header.getBoundingClientRect().height);
                        this.listHeight = (parseInt(this.listHeight, 10) - (height + this.searchBoxHeight)).toString() + "px";
                    }
                    if (this.footerTemplate) {
                        height = Math.round(this.footer.getBoundingClientRect().height);
                        this.listHeight = (parseInt(this.listHeight, 10) - (height + this.searchBoxHeight)).toString() + "px";
                    }
                    this.list.style.maxHeight = (parseInt(this.listHeight, 10) - 2).toString() + "px", 
                    popupEle.style.maxHeight = formatUnit(this.popupHeight);
                } else popupEle.style.height = "auto";
                var left, offsetValue = 0;
                if (!isNullOrUndefined(this.selectedLI) && !isNullOrUndefined(this.activeIndex) && this.activeIndex >= 0 ? this.setScrollPosition() : this.list.scrollTop = 0, 
                Browser.isDevice && !this.allowFiltering && ("dropdownlist" === this.getModuleName() || this.isDropDownClick && "combobox" === this.getModuleName())) {
                    offsetValue = this.getOffsetValue(popupEle);
                    var firstItem = this.isEmptyList() ? this.list : this.liCollections[0];
                    left = -(parseInt(getComputedStyle(firstItem).textIndent, 10) - parseInt(getComputedStyle(this.inputElement).paddingLeft, 10) + parseInt(getComputedStyle(this.inputElement.parentElement).borderLeftWidth, 10));
                }
                this.getFocusElement(), this.createPopup(popupEle, offsetValue, left), this.checkCollision(popupEle), 
                Browser.isDevice && (this.popupObj.element.classList.add(dropDownListClasses$1.device), 
                ("dropdownlist" === this.getModuleName() || "combobox" === this.getModuleName() && !this.allowFiltering && this.isDropDownClick) && (this.popupObj.collision = {
                    X: "fit",
                    Y: "fit"
                }), this.isFilterLayout() && (this.popupObj.element.classList.add(dropDownListClasses$1.mobileFilter), 
                this.popupObj.position = {
                    X: 0,
                    Y: 0
                }, this.popupObj.dataBind(), attributes(this.popupObj.element, {
                    style: "left:0px;right:0px;top:0px;bottom:0px;"
                }), addClass([ document.body, this.popupObj.element ], dropDownListClasses$1.popupFullScreen), 
                this.setSearchBoxPosition(), this.backIconElement = searchBox.container.querySelector(".e-back-icon"), 
                this.clearIconElement = searchBox.container.querySelector("." + dropDownListClasses$1.clearIcon), 
                EventHandler.add(this.backIconElement, "click", this.clickOnBackIcon, this), EventHandler.add(this.clearIconElement, "click", this.clearText, this))), 
                popupEle.style.visibility = "visible", addClass([ popupEle ], "e-popup-close");
                for (var _b = 0, scrollParentElements_1 = this.popupObj.getScrollableParent(this.inputWrapper.container); _b < scrollParentElements_1.length; _b++) {
                    var element = scrollParentElements_1[_b];
                    EventHandler.add(element, "scroll", this.scrollHandler, this);
                }
                Browser.isDevice && this.isFilterLayout() && EventHandler.add(this.list, "scroll", this.listScroll, this), 
                attributes(this.targetElement(), {
                    "aria-expanded": "true"
                });
                addClass([ this.isFiltering() ? this.filterInput.parentElement : this.inputWrapper.container ], [ dropDownListClasses$1.inputFocus ]);
                this.beforePopupOpen = !0;
                var eventArgs = {
                    popup: this.popupObj,
                    cancel: !1
                };
                this.trigger("open", eventArgs), eventArgs.cancel || (addClass([ this.inputWrapper.container ], [ dropDownListClasses$1.iconAnimation ]), 
                this.popupObj.show(new Animation({
                    name: "FadeIn",
                    duration: 100
                })));
            }
        }, DropDownList.prototype.checkCollision = function(popupEle) {
            if (!Browser.isDevice || Browser.isDevice && "dropdownlist" !== this.getModuleName() && !this.isDropDownClick) {
                isCollide(popupEle).length > 0 && (popupEle.style.marginTop = -parseInt(getComputedStyle(popupEle).marginTop, 10) + "px");
            }
        }, DropDownList.prototype.getOffsetValue = function(popupEle) {
            var popupStyles = getComputedStyle(popupEle), borderTop = parseInt(popupStyles.borderTop, 10), borderBottom = parseInt(popupStyles.borderBottom, 10);
            return this.setPopupPosition(borderTop + borderBottom);
        }, DropDownList.prototype.createPopup = function(element, offsetValue, left) {
            var _this = this;
            this.popupObj = new Popup(element, {
                width: this.setWidth(),
                targetType: "relative",
                relateTo: this.inputWrapper.container,
                collision: {
                    X: "flip",
                    Y: "flip"
                },
                offsetY: offsetValue,
                enableRtl: this.enableRtl,
                offsetX: left,
                position: {
                    X: "left",
                    Y: "bottom"
                },
                zIndex: this.zIndex,
                close: function() {
                    _this.isDocumentClick || _this.focusDropDown(), _this.isDocumentClick = !1, _this.destroyPopup();
                },
                open: function() {
                    EventHandler.add(document, "mousedown", _this.onDocumentClick, _this), _this.isPopupOpen = !0, 
                    _this.isFilterLayout() && (removeClass([ _this.inputWrapper.container ], [ dropDownListClasses$1.inputFocus ]), 
                    _this.isFilterFocus = !0, _this.filterInput.focus(), _this.inputWrapper.clearButton && addClass([ _this.inputWrapper.clearButton ], dropDownListClasses$1.clearIconHide)), 
                    _this.activeStateChange();
                }
            });
        }, DropDownList.prototype.isEmptyList = function() {
            return !isNullOrUndefined(this.liCollections) && 0 === this.liCollections.length;
        }, DropDownList.prototype.getFocusElement = function() {}, DropDownList.prototype.isFilterLayout = function() {
            return "dropdownlist" === this.getModuleName() && this.allowFiltering;
        }, DropDownList.prototype.scrollHandler = function() {
            Browser.isDevice && ("dropdownlist" === this.getModuleName() && !this.isFilterLayout() || "combobox" === this.getModuleName() && !this.allowFiltering && this.isDropDownClick) && this.hidePopup(), 
            this.fields.groupBy && !isNullOrUndefined(this.fixedHeaderElement) && (this.fixedHeaderElement.style.zIndex = "0", 
            this.fixedHeaderElement.style.display = "none");
        }, DropDownList.prototype.setSearchBoxPosition = function() {
            var searchBoxHeight = this.filterInput.parentElement.getBoundingClientRect().height;
            this.popupObj.element.style.maxHeight = "100%", this.popupObj.element.style.width = "100%", 
            this.list.style.maxHeight = window.innerHeight - searchBoxHeight + "px", this.list.style.height = window.innerHeight - searchBoxHeight + "px";
            var clearElement = this.filterInput.parentElement.querySelector("." + dropDownListClasses$1.clearIcon);
            detach(this.filterInput), clearElement.parentElement.insertBefore(this.filterInput, clearElement);
        }, DropDownList.prototype.setPopupPosition = function(border) {
            var offsetValue, popupOffset = border, selectedLI = this.list.querySelector("." + dropDownListClasses$1.focus) || this.selectedLI, firstItem = this.isEmptyList() ? this.list : this.liCollections[0], lastItem = this.isEmptyList() ? this.list : this.liCollections[this.getItems().length - 1], liHeight = firstItem.getBoundingClientRect().height, listHeight = this.list.offsetHeight / 2, height = isNullOrUndefined(selectedLI) ? firstItem.offsetTop : selectedLI.offsetTop;
            if (lastItem.offsetTop - listHeight < height && !isNullOrUndefined(this.liCollections) && this.liCollections.length > 0 && !isNullOrUndefined(selectedLI)) {
                var count = this.list.offsetHeight / liHeight, paddingBottom = parseInt(getComputedStyle(this.list).paddingBottom, 10);
                offsetValue = (count - (this.liCollections.length - this.activeIndex)) * liHeight - popupOffset + paddingBottom, 
                this.list.scrollTop = selectedLI.offsetTop;
            } else height > listHeight ? (offsetValue = listHeight - liHeight / 2, this.list.scrollTop = height - listHeight + liHeight / 2) : offsetValue = height;
            return -(offsetValue = offsetValue + liHeight + popupOffset - (liHeight - this.inputWrapper.container.offsetHeight) / 2);
        }, DropDownList.prototype.setWidth = function() {
            var width = formatUnit(this.popupWidth);
            if (width.indexOf("%") > -1) {
                width = (this.inputWrapper.container.offsetWidth * parseFloat(width) / 100).toString() + "px";
            }
            if (Browser.isDevice && !this.allowFiltering && ("dropdownlist" === this.getModuleName() || this.isDropDownClick && "combobox" === this.getModuleName())) {
                var firstItem = this.isEmptyList() ? this.list : this.liCollections[0];
                width = parseInt(width, 10) + 2 * (parseInt(getComputedStyle(firstItem).textIndent, 10) - parseInt(getComputedStyle(this.inputElement).paddingLeft, 10) + parseInt(getComputedStyle(this.inputElement.parentElement).borderLeftWidth, 10)) + "px";
            }
            return width;
        }, DropDownList.prototype.scrollBottom = function(isInitial) {
            var currentOffset = this.list.offsetHeight, nextBottom = this.selectedLI.offsetTop + this.selectedLI.offsetHeight - this.list.scrollTop, nextOffset = this.list.scrollTop + nextBottom - currentOffset;
            nextOffset = isInitial ? nextOffset + 2 * parseInt(getComputedStyle(this.list).paddingTop, 10) : nextOffset;
            var boxRange = this.selectedLI.offsetTop + this.selectedLI.offsetHeight - this.list.scrollTop;
            boxRange = this.fields.groupBy && !isNullOrUndefined(this.fixedHeaderElement) ? boxRange - this.fixedHeaderElement.offsetHeight : boxRange, 
            0 === this.activeIndex ? this.list.scrollTop = 0 : (nextBottom > currentOffset || !(boxRange > 0 && this.list.offsetHeight > boxRange)) && (this.list.scrollTop = nextOffset);
        }, DropDownList.prototype.scrollTop = function() {
            var nextOffset = this.selectedLI.offsetTop - this.list.scrollTop;
            this.selectedLI.offsetTop, this.selectedLI.offsetHeight, this.list.scrollTop;
            nextOffset = this.fields.groupBy && !isNullOrUndefined(this.fixedHeaderElement) ? nextOffset - this.fixedHeaderElement.offsetHeight : nextOffset;
            var boxRange = this.selectedLI.offsetTop + this.selectedLI.offsetHeight - this.list.scrollTop;
            0 === this.activeIndex ? this.list.scrollTop = 0 : nextOffset < 0 ? this.list.scrollTop = this.list.scrollTop + nextOffset : boxRange > 0 && this.list.offsetHeight > boxRange || (this.list.scrollTop = this.selectedLI.offsetTop - (this.fields.groupBy && !isNullOrUndefined(this.fixedHeaderElement) ? this.fixedHeaderElement.offsetHeight : 0));
        }, DropDownList.prototype.isEditTextBox = function() {
            return !1;
        }, DropDownList.prototype.isFiltering = function() {
            return this.allowFiltering;
        }, DropDownList.prototype.isPopupButton = function() {
            return !0;
        }, DropDownList.prototype.setScrollPosition = function(e) {
            if (isNullOrUndefined(e)) this.scrollBottom(!0); else switch (e.action) {
              case "pageDown":
              case "down":
              case "end":
                this.scrollBottom();
                break;

              default:
                this.scrollTop();
            }
        }, DropDownList.prototype.clearText = function() {
            this.filterInput.value = "", this.searchLists(null);
        }, DropDownList.prototype.listScroll = function() {
            this.filterInput.blur();
        }, DropDownList.prototype.closePopup = function(delay) {
            if (this.isTyped = !1, this.popupObj && document.body.contains(this.popupObj.element) && this.beforePopupOpen) {
                EventHandler.remove(document, "mousedown", this.onDocumentClick), this.isActive = !1, 
                this.filterInputObj = null, this.isDropDownClick = !1, this.preventAutoFill = !1;
                for (var _i = 0, scrollableParentElements_1 = this.popupObj.getScrollableParent(this.inputWrapper.container); _i < scrollableParentElements_1.length; _i++) {
                    var element = scrollableParentElements_1[_i];
                    EventHandler.remove(element, "scroll", this.scrollHandler);
                }
                Browser.isDevice && this.isFilterLayout() && (removeClass([ document.body, this.popupObj.element ], dropDownListClasses$1.popupFullScreen), 
                EventHandler.remove(this.list, "scroll", this.listScroll)), this.isFilterLayout() && (Browser.isDevice || (this.searchKeyModule.destroy(), 
                this.clearIconElement && EventHandler.remove(this.clearIconElement, "click", this.clearText)), 
                this.backIconElement && (EventHandler.remove(this.backIconElement, "click", this.clickOnBackIcon), 
                EventHandler.remove(this.clearIconElement, "click", this.clearText)), EventHandler.remove(this.filterInput, "input", this.onInput), 
                EventHandler.remove(this.filterInput, "keyup", this.onFilterUp), EventHandler.remove(this.filterInput, "keydown", this.onFilterDown), 
                EventHandler.remove(this.filterInput, "blur", this.onBlur), this.filterInput = null), 
                attributes(this.targetElement(), {
                    "aria-expanded": "false",
                    "aria-activedescendant": null
                }), this.inputWrapper.container.classList.remove(dropDownListClasses$1.iconAnimation), 
                this.isFiltering() && (this.actionCompleteData.isUpdated = !1), this.beforePopupOpen = !1;
                var eventArgs = {
                    popup: this.popupObj,
                    cancel: !1
                };
                if (this.trigger("close", eventArgs), !eventArgs.cancel) {
                    var animModel = {
                        name: "FadeOut",
                        duration: 100,
                        delay: delay || 0
                    };
                    "autocomplete" === this.getModuleName() && this.rippleFun(), this.isPopupOpen ? this.popupObj.hide(new Animation(animModel)) : this.destroyPopup();
                }
            }
        }, DropDownList.prototype.destroyPopup = function() {
            this.isPopupOpen = !1, this.isFilterFocus = !1, this.popupObj.destroy(), detach(this.popupObj.element);
        }, DropDownList.prototype.clickOnBackIcon = function() {
            this.hidePopup(), this.focusIn();
        }, DropDownList.prototype.render = function() {
            "INPUT" === this.element.tagName ? this.inputElement = this.element : (this.inputElement = createElement("input"), 
            this.element.tagName !== this.getNgDirective() && (this.element.style.display = "none"), 
            this.element.parentElement.insertBefore(this.inputElement, this.element), this.preventTabIndex(this.inputElement)), 
            this.inputWrapper = Input.createInput({
                element: this.inputElement,
                buttons: this.isPopupButton() ? [ dropDownListClasses$1.icon ] : null,
                floatLabelType: this.floatLabelType,
                properties: {
                    readonly: "dropdownlist" === this.getModuleName() || this.readonly,
                    placeholder: this.placeholder,
                    cssClass: this.cssClass,
                    enabled: this.enabled,
                    enableRtl: this.enableRtl,
                    showClearButton: this.showClearButton
                }
            }), this.element.tagName === this.getNgDirective() ? this.element.appendChild(this.inputWrapper.container) : this.inputElement.parentElement.insertBefore(this.element, this.inputElement);
            var name = this.element.getAttribute("name") ? this.element.getAttribute("name") : this.element.getAttribute("id");
            this.hiddenElement = createElement("select", {
                attrs: {
                    name: name,
                    "aria-hidden": "true",
                    tabindex: "-1",
                    class: dropDownListClasses$1.hiddenElement
                }
            }), prepend([ this.hiddenElement ], this.inputWrapper.container), this.element.removeAttribute("name"), 
            this.setFields(), this.inputWrapper.container.style.width = formatUnit(this.width), 
            this.inputWrapper.container.classList.add("e-ddl"), this.wireEvent(), this.tabIndex = this.element.hasAttribute("tabindex") ? this.element.getAttribute("tabindex") : "0", 
            this.element.removeAttribute("tabindex");
            var id = this.element.getAttribute("id") ? this.element.getAttribute("id") : getUniqueID("ej2_dropdownlist");
            if (this.element.id = id, this.hiddenElement.id = id + "_hidden", this.targetElement().setAttribute("tabindex", this.tabIndex), 
            attributes(this.targetElement(), this.getAriaAttributes()), this.setHTMLAttributes(), 
            null !== this.value || null !== this.activeIndex || null !== this.text) this.initValue(); else if ("SELECT" === this.element.tagName && this.element.options[0]) {
                var selectElement = this.element;
                this.value = selectElement.options[selectElement.selectedIndex].value, this.text = isNullOrUndefined(this.value) ? null : selectElement.options[selectElement.selectedIndex].textContent, 
                this.initValue();
            }
            this.preventTabIndex(this.element), this.enabled || (this.targetElement().tabIndex = -1), 
            this.initial = !1, this.element.style.opacity = "";
        }, DropDownList.prototype.setFooterTemplate = function(popupEle) {
            this.footer ? this.footer.innerHTML = "" : (this.footer = document.createElement("div"), 
            addClass([ this.footer ], dropDownListClasses$1.footer));
            for (var _i = 0, _a = compile$$1(this.footerTemplate)({}); _i < _a.length; _i++) {
                var item = _a[_i];
                this.footer.appendChild(item);
            }
            append([ this.footer ], popupEle);
        }, DropDownList.prototype.setOldText = function(text) {
            this.text = text;
        }, DropDownList.prototype.setOldValue = function(value) {
            this.value = value;
        }, DropDownList.prototype.refreshPopup = function() {
            isNullOrUndefined(this.popupObj) || !document.body.contains(this.popupObj.element) || (!this.allowFiltering || Browser.isDevice && this.isFilterLayout()) && "autocomplete" !== this.getModuleName() || this.popupObj.refreshPosition(this.inputWrapper.container);
        }, DropDownList.prototype.updateDataSource = function(prop) {
            this.clear(null, prop), this.resetList(this.dataSource);
        }, DropDownList.prototype.onPropertyChanged = function(newProp, oldProp) {
            this.setUpdateInitial([ "query", "dataSource" ], newProp);
            for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                var prop = _a[_i];
                switch (prop) {
                  case "query":
                  case "dataSource":
                    break;

                  case "htmlAttributes":
                    this.setHTMLAttributes();
                    break;

                  case "width":
                    setStyleAttribute(this.inputWrapper.container, {
                        width: formatUnit(newProp.width)
                    });
                    break;

                  case "placeholder":
                    Input.setPlaceholder(newProp.placeholder, this.inputElement);
                    break;

                  case "filterBarPlaceholder":
                    Input.setPlaceholder(newProp.filterBarPlaceholder, this.filterInput);
                    break;

                  case "readonly":
                    Input.setReadonly(newProp.readonly, this.inputElement);
                    break;

                  case "cssClass":
                    Input.setCssClass(newProp.cssClass, [ this.inputWrapper.container ]), this.popupObj && this.popupObj.element.classList.add(newProp.cssClass);
                    break;

                  case "enableRtl":
                    this.setEnableRtl();
                    break;

                  case "enabled":
                    this.setEnable();
                    break;

                  case "text":
                    if (null === newProp.text) return void this.clear();
                    if (this.list || (this.dataSource instanceof DataManager && (this.initRemoteRender = !0), 
                    this.renderList()), !this.initRemoteRender) {
                        var li = this.getElementByText(newProp.text);
                        this.isValidLI(li) ? this.setSelection(li, null) : this.setOldText(oldProp.text);
                    }
                    break;

                  case "value":
                    if (null === newProp.value) return void this.clear();
                    if (this.list || (this.dataSource instanceof DataManager && (this.initRemoteRender = !0), 
                    this.renderList()), !this.initRemoteRender) {
                        var item = this.getElementByValue(newProp.value);
                        this.isValidLI(item) ? this.setSelection(item, null) : this.setOldValue(oldProp.value);
                    }
                    break;

                  case "index":
                    if (null === newProp.index) return void this.clear();
                    if (this.list || (this.dataSource instanceof DataManager && (this.initRemoteRender = !0), 
                    this.renderList()), !this.initRemoteRender) {
                        var element = this.liCollections[newProp.index];
                        this.isValidLI(element) ? this.setSelection(element, null) : this.index = oldProp.index;
                    }
                    break;

                  case "footerTemplate":
                    this.popupObj && this.setFooterTemplate(this.popupObj.element);
                    break;

                  case "floatLabelType":
                    Input.removeFloating(this.inputWrapper), Input.addFloating(this.inputElement, newProp.floatLabelType, this.placeholder);
                    break;

                  case "showClearButton":
                    Input.setClearButton(newProp.showClearButton, this.inputElement, this.inputWrapper), 
                    this.bindClearEvent();
                    break;

                  default:
                    var ddlProps = void 0;
                    ddlProps = this.getPropObject(prop, newProp, oldProp), _super.prototype.onPropertyChanged.call(this, ddlProps.newProperty, ddlProps.oldProperty);
                }
            }
        }, DropDownList.prototype.getModuleName = function() {
            return "dropdownlist";
        }, DropDownList.prototype.showPopup = function() {
            if (this.beforePopupOpen) this.refreshPopup(); else {
                if (this.beforePopupOpen = !0, this.isFiltering() && !this.isActive && this.actionCompleteData.list && this.actionCompleteData.list[0] ? (this.isActive = !0, 
                this.onActionComplete(this.actionCompleteData.ulElement, this.actionCompleteData.list, null, !0)) : (isNullOrUndefined(this.list) || !isUndefined(this.list) && this.list.classList.contains(dropDownBaseClasses$1.noData)) && this.renderList(), 
                Browser.isDevice && this.isFilterLayout()) {
                    var proxy_2 = this;
                    window.onpopstate = function() {
                        proxy_2.hidePopup();
                    }, history.pushState({}, "");
                }
                isNullOrUndefined(this.list.children[0]) && !this.list.classList.contains(dropDownBaseClasses$1.noData) || this.renderPopup(), 
                attributes(this.targetElement(), {
                    "aria-activedescendant": this.selectedLI ? this.selectedLI.id : null
                });
            }
        }, DropDownList.prototype.hidePopup = function() {
            this.isEscapeKey && "dropdownlist" === this.getModuleName() && (Input.setValue(this.text, this.inputElement, this.floatLabelType, this.showClearButton), 
            this.isEscapeKey = !1, isNullOrUndefined(this.index) ? this.resetSelection() : (this.selectedLI = this.liCollections[this.index], 
            this.updateSelectedItem(this.selectedLI, null, !0), this.valueTemplate && null !== this.itemData && this.setValueTemplate())), 
            this.closePopup();
            var dataItem = this.getItemData();
            "" !== this.inputElement.value.trim() || this.isInteracted || !this.isSelectCustom && (isNullOrUndefined(this.selectedLI) || this.inputElement.value === dataItem.text) || (this.isSelectCustom = !1, 
            this.clear());
        }, DropDownList.prototype.focusIn = function() {
            if (!this.targetElement().classList.contains(dropDownListClasses$1.disable)) {
                var isFocused = !1;
                this.preventFocus && Browser.isDevice && (this.inputWrapper.container.tabIndex = 1, 
                this.inputWrapper.container.focus(), this.preventFocus = !1, isFocused = !0), isFocused || this.targetElement().focus(), 
                addClass([ this.inputWrapper.container ], [ dropDownListClasses$1.inputFocus ]), 
                this.onFocus();
            }
        }, DropDownList.prototype.focusOut = function() {
            this.isTyped = !0, this.hidePopup(), this.targetElement().blur(), removeClass([ this.inputWrapper.container ], [ dropDownListClasses$1.inputFocus ]);
        }, DropDownList.prototype.destroy = function() {
            var _this = this;
            this.isActive = !1, this.hidePopup(), this.unWireEvent(), this.list && this.unWireListEvents(), 
            [ "readonly", "aria-disabled", "aria-placeholder", "placeholder" ].forEach(function(value) {
                _this.inputElement.removeAttribute(value);
            }), this.inputElement.setAttribute("tabindex", this.tabIndex), this.inputElement.classList.remove("e-input"), 
            Input.setValue("", this.inputElement, this.floatLabelType, this.showClearButton), 
            this.element.style.display = "block", this.inputWrapper.container.parentElement.tagName === this.getNgDirective() ? detach(this.inputWrapper.container) : (this.inputWrapper.container.parentElement.insertBefore(this.element, this.inputWrapper.container), 
            detach(this.inputWrapper.container)), _super.prototype.destroy.call(this);
        }, __decorate$1$5([ Property(null) ], DropDownList.prototype, "cssClass", void 0), 
        __decorate$1$5([ Property("100%") ], DropDownList.prototype, "width", void 0), __decorate$1$5([ Property("300px") ], DropDownList.prototype, "popupHeight", void 0), 
        __decorate$1$5([ Property("100%") ], DropDownList.prototype, "popupWidth", void 0), 
        __decorate$1$5([ Property(null) ], DropDownList.prototype, "placeholder", void 0), 
        __decorate$1$5([ Property(null) ], DropDownList.prototype, "filterBarPlaceholder", void 0), 
        __decorate$1$5([ Property({}) ], DropDownList.prototype, "htmlAttributes", void 0), 
        __decorate$1$5([ Property(null) ], DropDownList.prototype, "query", void 0), __decorate$1$5([ Property(null) ], DropDownList.prototype, "valueTemplate", void 0), 
        __decorate$1$5([ Property(null) ], DropDownList.prototype, "headerTemplate", void 0), 
        __decorate$1$5([ Property(null) ], DropDownList.prototype, "footerTemplate", void 0), 
        __decorate$1$5([ Property(!1) ], DropDownList.prototype, "allowFiltering", void 0), 
        __decorate$1$5([ Property(!1) ], DropDownList.prototype, "readonly", void 0), __decorate$1$5([ Property(null) ], DropDownList.prototype, "text", void 0), 
        __decorate$1$5([ Property(null) ], DropDownList.prototype, "value", void 0), __decorate$1$5([ Property(null) ], DropDownList.prototype, "index", void 0), 
        __decorate$1$5([ Property("Never") ], DropDownList.prototype, "floatLabelType", void 0), 
        __decorate$1$5([ Property(!1) ], DropDownList.prototype, "showClearButton", void 0), 
        __decorate$1$5([ Event() ], DropDownList.prototype, "filtering", void 0), __decorate$1$5([ Event() ], DropDownList.prototype, "change", void 0), 
        __decorate$1$5([ Event() ], DropDownList.prototype, "open", void 0), __decorate$1$5([ Event() ], DropDownList.prototype, "close", void 0), 
        __decorate$1$5([ Event() ], DropDownList.prototype, "blur", void 0), __decorate$1$5([ Event() ], DropDownList.prototype, "focus", void 0), 
        DropDownList = __decorate$1$5([ NotifyPropertyChanges ], DropDownList);
    }(DropDownBase$1), __extends$2$5 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$2$5 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    dropDownListClasses$1.root = "e-combobox";
    var inputObject$1$1 = {
        container: null,
        buttons: []
    }, ComboBox$1 = function(_super) {
        function ComboBox(options, element) {
            return _super.call(this, options, element) || this;
        }
        return __extends$2$5(ComboBox, _super), ComboBox.prototype.preRender = function() {
            _super.prototype.preRender.call(this);
        }, ComboBox.prototype.wireEvent = function() {
            "combobox" === this.getModuleName() && (EventHandler.add(this.inputWrapper.buttons[0], "mousedown", this.preventBlur, this), 
            EventHandler.add(this.inputWrapper.container, "blur", this.onBlur, this)), isNullOrUndefined(this.inputWrapper.buttons[0]) || EventHandler.add(this.inputWrapper.buttons[0], "mousedown", this.dropDownClick, this), 
            EventHandler.add(this.inputElement, "focus", this.targetFocus, this), this.readonly || (EventHandler.add(this.inputElement, "input", this.onInput, this), 
            EventHandler.add(this.inputElement, "keyup", this.onFilterUp, this), EventHandler.add(this.inputElement, "keydown", this.onFilterDown, this)), 
            this.bindCommonEvent();
        }, ComboBox.prototype.preventBlur = function(e) {
            (this.allowFiltering || document.activeElement === this.inputElement || document.activeElement.classList.contains(dropDownListClasses$1.input) || !Browser.isDevice) && Browser.isDevice || e.preventDefault();
        }, ComboBox.prototype.targetElement = function() {
            return this.inputElement;
        }, ComboBox.prototype.setOldText = function(text) {
            Input.setValue(this.text, this.inputElement, this.floatLabelType, this.showClearButton), 
            this.customValue(), this.removeSelection();
        }, ComboBox.prototype.setOldValue = function(value) {
            this.allowCustom ? this.valueMuteChange(this.value) : this.valueMuteChange(null), 
            this.removeSelection(), this.setHiddenValue();
        }, ComboBox.prototype.valueMuteChange = function(value) {
            var inputValue = isNullOrUndefined(value) ? null : value.toString();
            Input.setValue(inputValue, this.inputElement, this.floatLabelType, this.showClearButton), 
            this.setProperties({
                value: value,
                text: value,
                index: null
            }, !0), this.activeIndex = this.index;
            var fields = this.fields, dataItem = {};
            dataItem[fields.text] = isNullOrUndefined(value) ? null : value.toString(), dataItem[fields.value] = isNullOrUndefined(value) ? null : value.toString(), 
            this.itemData = dataItem, this.item = null, this.previousValue !== this.value && this.detachChangeEvent(null);
        }, ComboBox.prototype.updateValues = function() {
            if (isNullOrUndefined(this.value)) if (this.text && isNullOrUndefined(this.value)) {
                (li = this.getElementByText(this.text)) ? this.setSelection(li, null) : (Input.setValue(this.text, this.inputElement, this.floatLabelType, this.showClearButton), 
                this.customValue());
            } else this.setSelection(this.liCollections[this.activeIndex], null); else {
                var li;
                (li = this.getElementByValue(this.value)) ? this.setSelection(li, null) : this.allowCustom ? this.valueMuteChange(this.value) : this.valueMuteChange(null);
            }
            this.setHiddenValue(), Input.setValue(this.text, this.inputElement, this.floatLabelType, this.showClearButton);
        }, ComboBox.prototype.getAriaAttributes = function() {
            return {
                "aria-owns": this.element.id + "_options",
                role: "combobox",
                "aria-autocomplete": "both",
                "aria-labelledby": this.hiddenElement.id,
                "aria-hasPopup": "true",
                "aria-expanded": "false",
                "aria-readonly": this.readonly.toString(),
                autocomplete: "off",
                autocorrect: "off",
                autocapitalize: "off",
                spellcheck: "false"
            };
        }, ComboBox.prototype.searchLists = function(e) {
            this.isTyped = !0, this.isFiltering() ? (_super.prototype.searchLists.call(this, e), 
            "" === this.filterInput.value.trim() && this.setHoverList(this.ulElement.querySelector("." + dropDownListClasses$1.li))) : (this.ulElement && "" === this.inputElement.value && this.preventAutoFill && this.setHoverList(this.ulElement.querySelector("." + dropDownListClasses$1.li)), 
            this.incrementalSearch(e));
        }, ComboBox.prototype.getNgDirective = function() {
            return "EJS-COMBOBOX";
        }, ComboBox.prototype.setSearchBox = function() {
            return this.filterInput = this.inputElement, this.isFiltering() ? this.inputWrapper : inputObject$1$1;
        }, ComboBox.prototype.onActionComplete = function(ulElement, list, e, isUpdated) {
            _super.prototype.onActionComplete.call(this, ulElement, list, e), this.isSelectCustom && this.removeSelection(), 
            !this.preventAutoFill && "combobox" === this.getModuleName() && this.isTyped && this.inlineSearch();
        }, ComboBox.prototype.getFocusElement = function() {
            var dataItem = this.isSelectCustom ? {
                text: ""
            } : this.getItemData(), selected = this.list.querySelector("." + dropDownListClasses$1.selected);
            if (dataItem.text === this.inputElement.value && !isNullOrUndefined(selected)) return selected;
            if ((Browser.isDevice && !this.isDropDownClick || !Browser.isDevice) && !isNullOrUndefined(this.liCollections) && this.liCollections.length > 0) {
                var activeElement = Search$1(this.inputElement.value, this.liCollections, "StartsWith", !0).item;
                if (isNullOrUndefined(activeElement)) this.isSelectCustom && "" !== this.inputElement.value.trim() && (this.removeFocus(), 
                this.list.scrollTop = 0); else {
                    var count = this.getIndexByValue(activeElement.getAttribute("data-value")) - 1, height = parseInt(getComputedStyle(this.liCollections[0], null).getPropertyValue("height"), 10);
                    if (!isNaN(height) && "autocomplete" !== this.getModuleName()) {
                        this.removeFocus();
                        var fixedHead = this.fields.groupBy ? this.liCollections[0].offsetHeight : 0;
                        this.list.scrollTop = count * height + fixedHead, addClass([ activeElement ], dropDownListClasses$1.focus);
                    }
                }
                return activeElement;
            }
            return null;
        }, ComboBox.prototype.setValue = function(e) {
            return e && "keydown" === e.type && "enter" === e.action && this.removeFillSelection(), 
            this.autofill && "combobox" === this.getModuleName() && e && "keydown" === e.type && "enter" !== e.action ? (this.preventAutoFill = !1, 
            this.inlineSearch(e), !1) : _super.prototype.setValue.call(this, e);
        }, ComboBox.prototype.showSpinner = function() {
            isNullOrUndefined(this.spinnerElement) && (this.spinnerElement = this.inputWrapper.buttons[0] || this.inputWrapper.clearButton, 
            addClass([ this.spinnerElement ], dropDownListClasses$1.disableIcon), createSpinner({
                target: this.spinnerElement,
                width: Browser.isDevice ? "16px" : "14px"
            }), showSpinner(this.spinnerElement));
        }, ComboBox.prototype.hideSpinner = function() {
            isNullOrUndefined(this.spinnerElement) || (hideSpinner(this.spinnerElement), this.spinnerElement.innerHTML = "", 
            removeClass([ this.spinnerElement ], dropDownListClasses$1.disableIcon), this.spinnerElement = null);
        }, ComboBox.prototype.setAutoFill = function(activeElement, isHover) {
            if (isHover || this.setHoverList(activeElement), this.autofill && !this.preventAutoFill) {
                var currentValue = this.getTextByValue(activeElement.getAttribute("data-value")).toString(), currentFillValue = this.getFormattedValue(activeElement.getAttribute("data-value"));
                "combobox" === this.getModuleName() && (this.isSelected || this.previousValue === currentFillValue ? this.updateSelectedItem(activeElement, null, !0) : (this.updateSelectedItem(activeElement, null), 
                this.isSelected = !0, this.previousValue = this.getFormattedValue(activeElement.getAttribute("data-value")))), 
                this.isAndroidAutoFill(currentValue) || this.setAutoFillSelection(currentValue);
            }
        }, ComboBox.prototype.isAndroidAutoFill = function(value) {
            if (Browser.isAndroid) {
                var currentPoints = this.getSelectionPoints(), prevEnd = this.prevSelectPoints.end, curEnd = currentPoints.end, prevStart = this.prevSelectPoints.start, curStart = currentPoints.start;
                return 0 !== prevEnd && (prevEnd === value.length && prevStart === value.length || prevStart > curStart && prevEnd > curEnd || prevEnd === curEnd && prevStart === curStart);
            }
            return !1;
        }, ComboBox.prototype.isSelectFocusItem = function(element) {
            return !isNullOrUndefined(element);
        }, ComboBox.prototype.inlineSearch = function(e) {
            var isKeyNavigate = e && ("down" === e.action || "up" === e.action || "home" === e.action || "end" === e.action || "pageUp" === e.action || "pageDown" === e.action), activeElement = isKeyNavigate ? this.liCollections[this.activeIndex] : this.getFocusElement();
            if (isNullOrUndefined(activeElement)) if ("" === this.inputElement.value) {
                this.activeIndex = null, this.list.scrollTop = 0;
                var focusItem = this.list.querySelector("." + dropDownListClasses$1.li);
                this.setHoverList(focusItem);
            } else this.activeIndex = null, this.removeSelection(), this.removeFocus(); else {
                if (!isKeyNavigate) {
                    var value = this.getFormattedValue(activeElement.getAttribute("data-value"));
                    this.activeIndex = this.getIndexByValue(value), this.activeIndex = isNullOrUndefined(this.activeIndex) ? null : this.activeIndex;
                }
                this.preventAutoFill = "" !== this.inputElement.value && this.preventAutoFill, this.setAutoFill(activeElement, isKeyNavigate);
            }
        }, ComboBox.prototype.incrementalSearch = function(e) {
            this.showPopup(), isNullOrUndefined(this.listData) || (this.inlineSearch(e), e.preventDefault());
        }, ComboBox.prototype.setAutoFillSelection = function(currentValue) {
            var selection = this.getSelectionPoints(), value = this.inputElement.value.substr(0, selection.start);
            if (value && value.toLowerCase() === currentValue.substr(0, selection.start).toLowerCase()) {
                var inputValue = value + currentValue.substr(value.length, currentValue.length);
                Input.setValue(inputValue, this.inputElement, this.floatLabelType, this.showClearButton), 
                this.inputElement.setSelectionRange(selection.start, this.inputElement.value.length);
            } else Input.setValue(currentValue, this.inputElement, this.floatLabelType, this.showClearButton), 
            this.inputElement.setSelectionRange(0, this.inputElement.value.length);
        }, ComboBox.prototype.getValueByText = function(text) {
            return _super.prototype.getValueByText.call(this, text, !0);
        }, ComboBox.prototype.unWireEvent = function() {
            "combobox" === this.getModuleName() && (EventHandler.remove(this.inputWrapper.buttons[0], "mousedown", this.preventBlur), 
            EventHandler.remove(this.inputWrapper.container, "blur", this.onBlur)), isNullOrUndefined(this.inputWrapper.buttons[0]) || EventHandler.remove(this.inputWrapper.buttons[0], "mousedown", this.dropDownClick), 
            EventHandler.remove(this.inputElement, "focus", this.targetFocus), this.readonly || (EventHandler.remove(this.inputElement, "input", this.onInput), 
            EventHandler.remove(this.inputElement, "keyup", this.onFilterUp), EventHandler.remove(this.inputElement, "keydown", this.onFilterDown)), 
            this.unBindCommonEvent();
        }, ComboBox.prototype.setSelection = function(li, e) {
            _super.prototype.setSelection.call(this, li, e), isNullOrUndefined(li) || this.autofill || this.isDropDownClick || this.removeFocus();
        }, ComboBox.prototype.selectCurrentItem = function(e) {
            var li;
            this.isPopupOpen && ((li = this.list.querySelector("." + dropDownListClasses$1.focus)) && (this.setSelection(li, e), 
            this.isTyped = !1), this.isSelected && (this.isSelectCustom = !1, this.onChangeEvent(e))), 
            "enter" === e.action && "" === this.inputElement.value.trim() ? this.clear(e) : this.isTyped && !this.isSelected && isNullOrUndefined(li) && this.customValue(), 
            this.hidePopup();
        }, ComboBox.prototype.setHoverList = function(li) {
            this.removeSelection(), this.isValidLI(li) && !li.classList.contains(dropDownListClasses$1.selected) && (this.removeFocus(), 
            li.classList.add(dropDownListClasses$1.focus));
        }, ComboBox.prototype.targetFocus = function(e) {
            Browser.isDevice && !this.allowFiltering && (this.preventFocus = !1), this.onFocus();
        }, ComboBox.prototype.dropDownClick = function(e) {
            e.preventDefault(), Browser.isDevice && !this.allowFiltering && (this.preventFocus = !0), 
            _super.prototype.dropDownClick.call(this, e);
        }, ComboBox.prototype.customValue = function() {
            var value = this.getValueByText(this.inputElement.value);
            if (this.allowCustom || "" === this.inputElement.value) if ("" !== this.inputElement.value.trim()) {
                var previousValue = this.value;
                if (isNullOrUndefined(value)) {
                    var value_1 = "" === this.inputElement.value ? null : this.inputElement.value, fields = this.fields, eventArgs = void 0;
                    eventArgs = {
                        text: value_1,
                        item: {}
                    }, this.initial || this.trigger("customValueSpecifier", eventArgs);
                    var item = eventArgs.item, dataItem = {};
                    item && getValue(fields.text, item) && getValue(fields.value, item) ? dataItem = item : (setValue(fields.text, value_1, dataItem), 
                    setValue(fields.value, value_1, dataItem)), this.itemData = dataItem;
                    var changeData = {
                        text: getValue(fields.text, this.itemData),
                        value: getValue(fields.value, this.itemData),
                        index: null
                    };
                    this.setProperties(changeData, !0), this.setSelection(null, null), this.isSelectCustom = !0;
                } else this.isSelectCustom = !1, this.setProperties({
                    value: value
                });
                previousValue !== this.value && this.onChangeEvent(null);
            } else this.allowCustom && (this.isSelectCustom = !0); else this.setProperties({
                value: value
            }), isNullOrUndefined(this.value) && Input.setValue("", this.inputElement, this.floatLabelType, this.showClearButton);
        }, ComboBox.prototype.onPropertyChanged = function(newProp, oldProp) {
            this.setUpdateInitial([ "query", "dataSource" ], newProp);
            for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                var prop = _a[_i];
                switch (prop) {
                  case "readonly":
                    Input.setReadonly(this.readonly, this.inputElement), this.readonly ? (EventHandler.remove(this.inputElement, "keyup", this.onFilterUp), 
                    EventHandler.remove(this.inputElement, "keydown", this.onFilterDown)) : (EventHandler.add(this.inputElement, "keyup", this.onFilterUp, this), 
                    EventHandler.add(this.inputElement, "keydown", this.onFilterDown, this));
                    break;

                  case "allowFiltering":
                    this.setSearchBox();
                    break;

                  case "allowCustom":
                    break;

                  default:
                    var comboProps = void 0;
                    comboProps = this.getPropObject(prop, newProp, oldProp), _super.prototype.onPropertyChanged.call(this, comboProps.newProperty, comboProps.oldProperty);
                }
            }
        }, ComboBox.prototype.render = function() {
            _super.prototype.render.call(this), this.setSearchBox(), this.isFiltering() && "combobox" === this.getModuleName() && isNullOrUndefined(this.list) && _super.prototype.renderList.call(this);
        }, ComboBox.prototype.getModuleName = function() {
            return "combobox";
        }, ComboBox.prototype.hidePopup = function() {
            if (!isNullOrUndefined(this.listData)) {
                var isEscape = this.isEscapeKey;
                this.isEscapeKey && (Input.setValue(this.typedString, this.inputElement, this.floatLabelType, this.showClearButton), 
                this.isEscapeKey = !1), this.autofill && this.removeFillSelection();
                var dataItem = this.isSelectCustom ? {
                    text: ""
                } : this.getItemData(), selected = this.list.querySelector("." + dropDownListClasses$1.selected);
                if (dataItem.text === this.inputElement.value && !isNullOrUndefined(selected)) return this.isSelected && (this.onChangeEvent(null), 
                this.isSelectCustom = !1), void _super.prototype.hidePopup.call(this);
                if ("combobox" === this.getModuleName() && "" !== this.inputElement.value.trim()) {
                    var searchItem = Search$1(this.inputElement.value, this.liCollections, "Equal", !0);
                    this.selectedLI = searchItem.item, isNullOrUndefined(searchItem.index) && (searchItem.index = Search$1(this.inputElement.value, this.liCollections, "StartsWith", !0).index), 
                    this.activeIndex = searchItem.index, isNullOrUndefined(this.selectedLI) ? isEscape && (this.isSelectCustom = !0, 
                    this.removeSelection()) : this.updateSelectedItem(this.selectedLI, null, !0);
                }
                this.isEscapeKey || !this.isTyped || this.isInteracted || this.customValue();
            }
            _super.prototype.hidePopup.call(this);
        }, ComboBox.prototype.focusIn = function() {
            Browser.isDevice && !this.allowFiltering && (this.preventFocus = !0), _super.prototype.focusIn.call(this);
        }, __decorate$2$5([ Property(!1) ], ComboBox.prototype, "autofill", void 0), __decorate$2$5([ Property(!0) ], ComboBox.prototype, "allowCustom", void 0), 
        __decorate$2$5([ Property({}) ], ComboBox.prototype, "htmlAttributes", void 0), 
        __decorate$2$5([ Property(!1) ], ComboBox.prototype, "allowFiltering", void 0), 
        __decorate$2$5([ Property(null) ], ComboBox.prototype, "query", void 0), __decorate$2$5([ Property(null) ], ComboBox.prototype, "index", void 0), 
        __decorate$2$5([ Property(!0) ], ComboBox.prototype, "showClearButton", void 0), 
        __decorate$2$5([ Event() ], ComboBox.prototype, "customValueSpecifier", void 0), 
        __decorate$2$5([ Event() ], ComboBox.prototype, "filtering", void 0), __decorate$2$5([ Property(null) ], ComboBox.prototype, "valueTemplate", void 0), 
        __decorate$2$5([ Property("Never") ], ComboBox.prototype, "floatLabelType", void 0), 
        __decorate$2$5([ Property(null) ], ComboBox.prototype, "filterBarPlaceholder", void 0), 
        ComboBox = __decorate$2$5([ NotifyPropertyChanges ], ComboBox);
    }(DropDownList$1), __extends$3$3 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$3$3 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    };
    dropDownListClasses$1.root = "e-autocomplete", dropDownListClasses$1.icon = "e-input-group-icon e-ddl-icon e-search-icon";
    var TimePickerBase$1, AutoComplete$1 = function(_super) {
        function AutoComplete(options, element) {
            var _this = _super.call(this, options, element) || this;
            return _this.isFiltered = !1, _this;
        }
        return __extends$3$3(AutoComplete, _super), AutoComplete.prototype.preRender = function() {
            _super.prototype.preRender.call(this);
        }, AutoComplete.prototype.getNgDirective = function() {
            return "EJS-AUTOCOMPLETE";
        }, AutoComplete.prototype.getQuery = function(query) {
            var filterQuery = query ? query.clone() : this.query ? this.query.clone() : new Query(), filterType = "" !== this.queryString || isNullOrUndefined(this.value) ? this.filterType : "equal", queryString = "" !== this.queryString || isNullOrUndefined(this.value) ? this.queryString : this.value;
            if (this.isFiltered) return filterQuery;
            if (null !== this.queryString) {
                var dataType = this.typeOfData(this.dataSource).typeof;
                if ((this.dataSource instanceof DataManager || "string" !== dataType) && "number" !== dataType) {
                    var mapping = isNullOrUndefined(this.fields.value) ? "" : this.fields.value;
                    filterQuery.where(mapping, filterType, queryString, this.ignoreCase, this.ignoreAccent);
                } else filterQuery.where("", filterType, queryString, this.ignoreCase, this.ignoreAccent);
            }
            return isNullOrUndefined(this.suggestionCount) || filterQuery.take(this.suggestionCount), 
            filterQuery;
        }, AutoComplete.prototype.searchLists = function(e) {
            var _this = this;
            this.isTyped = !0, this.isSelectCustom = !1, isNullOrUndefined(this.list) && _super.prototype.renderList.call(this, !0);
            var isDownUpKey = 40 === e.keyCode || 38 === e.keyCode;
            if (this.queryString = this.filterInput.value, isDownUpKey) return this.queryString = "" === this.queryString ? null : this.queryString, 
            this.beforePopupOpen = !0, void this.resetList(this.dataSource, this.fields);
            this.isSelected = !1, this.activeIndex = null;
            var eventArgs = {
                preventDefaultAction: !1,
                text: this.filterInput.value,
                updateData: function(dataSource, query, fields) {
                    eventArgs.cancel || (_this.isFiltered = !0, _this.filterAction(dataSource, query, fields));
                },
                cancel: !1
            };
            this.trigger("filtering", eventArgs), eventArgs.cancel || this.isFiltered || eventArgs.preventDefaultAction || this.filterAction(this.dataSource, null, this.fields);
        }, AutoComplete.prototype.filterAction = function(dataSource, query, fields) {
            this.beforePopupOpen = !0, "" !== this.queryString && (this.queryString.length >= this.minLength || this.isFiltered) ? this.resetList(dataSource, fields, query) : this.hidePopup();
        }, AutoComplete.prototype.clear = function(e, property) {
            (isNullOrUndefined(property) || "dataSource" !== property) && _super.prototype.clear.call(this, e), 
            this.beforePopupOpen && this.hidePopup();
        }, AutoComplete.prototype.onActionComplete = function(ulElement, list, e, isUpdated) {
            this.fixedHeaderElement = null, _super.prototype.onActionComplete.call(this, ulElement, list, e);
            var item = this.list.querySelector("." + dropDownListClasses$1.li);
            isNullOrUndefined(item) || removeClass([ item ], dropDownListClasses$1.focus), this.postBackAction();
        }, AutoComplete.prototype.postBackAction = function() {
            if (null !== this.queryString && "" !== this.queryString && this.highlight && highlightSearch$1(this.list, this.queryString, this.ignoreCase, this.filterType), 
            this.autofill && !isNullOrUndefined(this.liCollections[0])) {
                var items = [ this.liCollections[0] ];
                isNullOrUndefined(Search$1(this.inputElement.value, items, "StartsWith", this.ignoreCase).item) || _super.prototype.setAutoFill.call(this, this.liCollections[0], !0);
            }
        }, AutoComplete.prototype.setSelection = function(li, e) {
            if (this.isValidLI(li)) if (!isNullOrUndefined(e) && "keydown" === e.type && "enter" !== e.action && this.isValidLI(li)) {
                var value = this.getFormattedValue(li.getAttribute("data-value"));
                this.activeIndex = this.getIndexByValue(value), this.setHoverList(li), this.selectedLI = li, 
                this.setScrollPosition(e), this.autofill && (this.preventAutoFill = !1, _super.prototype.setAutoFill.call(this, li)), 
                attributes(this.inputElement, {
                    "aria-activedescendant": this.selectedLI ? this.selectedLI.id : null
                });
            } else _super.prototype.setSelection.call(this, li, e);
        }, AutoComplete.prototype.showSpinner = function() {
            isNullOrUndefined(this.spinnerElement) && (this.spinnerElement = this.inputWrapper.buttons[0] || this.inputWrapper.clearButton || Input.appendSpan("e-input-group-icon e-atc-spinner-icon", this.inputWrapper.container), 
            addClass([ this.spinnerElement ], dropDownListClasses$1.disableIcon), createSpinner({
                target: this.spinnerElement,
                width: Browser.isDevice ? "16px" : "14px"
            }), showSpinner(this.spinnerElement));
        }, AutoComplete.prototype.hideSpinner = function() {
            isNullOrUndefined(this.spinnerElement) || (hideSpinner(this.spinnerElement), removeClass([ this.spinnerElement ], dropDownListClasses$1.disableIcon), 
            this.spinnerElement.classList.contains("e-atc-spinner-icon") ? detach(this.spinnerElement) : this.spinnerElement.innerHTML = "", 
            this.spinnerElement = null);
        }, AutoComplete.prototype.isFiltering = function() {
            return !0;
        }, AutoComplete.prototype.renderPopup = function() {
            this.list.scrollTop = 0, _super.prototype.renderPopup.call(this), this.highlight && highlightSearch$1(this.list, this.queryString, this.ignoreCase, this.filterType);
        }, AutoComplete.prototype.isEditTextBox = function() {
            return "" !== this.inputElement.value.trim();
        }, AutoComplete.prototype.isPopupButton = function() {
            return this.showPopupButton;
        }, AutoComplete.prototype.isSelectFocusItem = function(element) {
            return !1;
        }, AutoComplete.prototype.showPopup = function() {
            this.beforePopupOpen ? this.refreshPopup() : (this.beforePopupOpen = !0, this.preventAutoFill = !0, 
            isNullOrUndefined(this.list) ? this.renderList() : this.resetList(this.dataSource, this.fields));
        }, AutoComplete.prototype.hidePopup = function() {
            _super.prototype.hidePopup.call(this), this.activeIndex = -1;
        }, AutoComplete.prototype.onPropertyChanged = function(newProp, oldProp) {
            this.setUpdateInitial([ "query", "dataSource" ], newProp);
            for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                var prop = _a[_i];
                switch (prop) {
                  case "showPopupButton":
                    if (this.showPopupButton) {
                        var button = Input.appendSpan(dropDownListClasses$1.icon, this.inputWrapper.container);
                        this.inputWrapper.buttons[0] = button, EventHandler.add(this.inputWrapper.buttons[0], "click", this.dropDownClick, this);
                    } else detach(this.inputWrapper.buttons[0]), this.inputWrapper.buttons[0] = null;
                    break;

                  default:
                    var atcProps = void 0;
                    atcProps = this.getPropObject(prop, newProp, oldProp), _super.prototype.onPropertyChanged.call(this, atcProps.newProperty, atcProps.oldProperty);
                }
            }
        }, AutoComplete.prototype.getModuleName = function() {
            return "autocomplete";
        }, AutoComplete.prototype.render = function() {
            _super.prototype.render.call(this);
        }, __decorate$3$3([ Complex({
            value: null,
            iconCss: null,
            groupBy: null
        }, FieldSettings$2) ], AutoComplete.prototype, "fields", void 0), __decorate$3$3([ Property(!0) ], AutoComplete.prototype, "ignoreCase", void 0), 
        __decorate$3$3([ Property(!1) ], AutoComplete.prototype, "showPopupButton", void 0), 
        __decorate$3$3([ Property(!1) ], AutoComplete.prototype, "highlight", void 0), __decorate$3$3([ Property(20) ], AutoComplete.prototype, "suggestionCount", void 0), 
        __decorate$3$3([ Property({}) ], AutoComplete.prototype, "htmlAttributes", void 0), 
        __decorate$3$3([ Property(null) ], AutoComplete.prototype, "query", void 0), __decorate$3$3([ Property(1) ], AutoComplete.prototype, "minLength", void 0), 
        __decorate$3$3([ Property("Contains") ], AutoComplete.prototype, "filterType", void 0), 
        __decorate$3$3([ Event() ], AutoComplete.prototype, "filtering", void 0), __decorate$3$3([ Property(null) ], AutoComplete.prototype, "index", void 0), 
        __decorate$3$3([ Property("Never") ], AutoComplete.prototype, "floatLabelType", void 0), 
        __decorate$3$3([ Property(null) ], AutoComplete.prototype, "valueTemplate", void 0), 
        __decorate$3$3([ Property(null) ], AutoComplete.prototype, "filterBarPlaceholder", void 0), 
        __decorate$3$3([ Property(!1) ], AutoComplete.prototype, "allowFiltering", void 0), 
        __decorate$3$3([ Property(null) ], AutoComplete.prototype, "text", void 0), AutoComplete = __decorate$3$3([ NotifyPropertyChanges ], AutoComplete);
    }(ComboBox$1), __extends$4$3 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$4$3 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, FOCUS$1 = "e-input-focus", HIDE_LIST = "e-hide-listitem", CHIP = "e-chips", __extends$29 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$28 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, ROOT$10 = "e-calendar", DISABLED$9 = "e-disabled", Calendar$1 = function(_super) {
        function Calendar(options, element) {
            var _this = _super.call(this, options, element) || this;
            return _this.effect = "", _this.keyConfigs = {
                controlUp: "ctrl+38",
                controlDown: "ctrl+40",
                moveDown: "downarrow",
                moveUp: "uparrow",
                moveLeft: "leftarrow",
                moveRight: "rightarrow",
                select: "enter",
                home: "home",
                end: "end",
                pageUp: "pageup",
                pageDown: "pagedown",
                shiftPageUp: "shift+pageup",
                shiftPageDown: "shift+pagedown",
                controlHome: "ctrl+home",
                controlEnd: "ctrl+end"
            }, _this;
        }
        return __extends$29(Calendar, _super), Calendar.prototype.render = function() {
            this.globalize = new Internationalization(this.locale), this.todayDisabled = !1, 
            this.todayDate = new Date(new Date().setHours(0, 0, 0, 0)), "calendar" === this.getModuleName() ? (this.element.classList.add(ROOT$10), 
            this.enableRtl && this.element.classList.add("e-rtl"), Browser.isDevice && this.element.classList.add("e-device"), 
            attributes(this.element, {
                "data-role": "calendar"
            })) : (this.calendarElement = createElement("div"), this.calendarElement.classList.add(ROOT$10), 
            this.enableRtl && this.calendarElement.classList.add("e-rtl"), Browser.isDevice && this.calendarElement.classList.add("e-device"), 
            attributes(this.calendarElement, {
                role: "calendar"
            })), this.processDate(), this.header(), this.content(), this.wireEvents();
        }, Calendar.prototype.processDate = function() {
            this.validateDate(), this.minMaxUpdate();
        }, Calendar.prototype.validateDate = function() {
            this.setProperties({
                value: this.checkDateValue(new Date("" + this.value))
            }, !0), this.setProperties({
                min: this.checkDateValue(new Date("" + this.min))
            }, !0), this.setProperties({
                max: this.checkDateValue(new Date("" + this.max))
            }, !0), this.currentDate = this.currentDate ? this.currentDate : new Date(new Date().setHours(0, 0, 0, 0)), 
            !isNullOrUndefined(this.value) && this.min <= this.max && this.value >= this.min && this.value <= this.max && (this.currentDate = new Date("" + this.value)), 
            isNaN(+this.value) && this.setProperties({
                value: null
            }, !0);
        }, Calendar.prototype.minMaxUpdate = function() {
            this.min <= this.max ? removeClass([ this.element ], "e-overlay") : (this.setProperties({
                min: this.min
            }, !0), addClass([ this.element ], "e-overlay")), this.min = isNullOrUndefined(this.min) || !+this.min ? this.min = new Date(1900, 0, 1) : this.min, 
            this.max = isNullOrUndefined(this.max) || !+this.max ? this.max = new Date(2099, 11, 31) : this.max, 
            !isNullOrUndefined(this.value) && this.value <= this.min && this.min <= this.max ? (this.setProperties({
                value: this.min
            }, !0), this.changedArgs = {
                value: this.value
            }) : !isNullOrUndefined(this.value) && this.value >= this.max && this.min <= this.max && (this.setProperties({
                value: this.max
            }, !0), this.changedArgs = {
                value: this.value
            }), this.min <= this.max && this.value && this.value <= this.max && this.value >= this.min ? this.currentDate = new Date("" + this.value) : this.min <= this.max && !this.value && this.currentDate > this.max ? this.currentDate = new Date("" + this.max) : this.currentDate < this.min && (this.currentDate = new Date("" + this.min));
        }, Calendar.prototype.header = function() {
            this.headerElement = createElement("div", {
                className: "e-header"
            });
            var iconContainer = createElement("div", {
                className: "e-icon-container"
            });
            this.previousIcon = createElement("button", {
                className: "e-prev",
                attrs: {
                    type: "button"
                }
            }), rippleEffect(this.previousIcon, {
                duration: 400,
                selector: ".e-prev",
                isCenterRipple: !0
            }), attributes(this.previousIcon, {
                "aria-disabled": "false",
                "aria-label": "previous month"
            }), this.nextIcon = createElement("button", {
                className: "e-next",
                attrs: {
                    type: "button"
                }
            }), rippleEffect(this.nextIcon, {
                selector: ".e-next",
                duration: 400,
                isCenterRipple: !0
            }), attributes(this.nextIcon, {
                "aria-disabled": "false",
                "aria-label": "next month"
            }), this.headerTitleElement = createElement("div", {
                className: "e-day e-title"
            }), attributes(this.headerTitleElement, {
                "aria-atomic": "true",
                "aria-live": "assertive",
                "aria-label": "title"
            }), this.headerElement.appendChild(this.headerTitleElement), this.previousIcon.appendChild(createElement("span", {
                className: "e-date-icon-prev e-icons"
            })), this.nextIcon.appendChild(createElement("span", {
                className: "e-date-icon-next  e-icons"
            })), iconContainer.appendChild(this.previousIcon), iconContainer.appendChild(this.nextIcon), 
            this.headerElement.appendChild(iconContainer), "calendar" === this.getModuleName() ? this.element.appendChild(this.headerElement) : this.calendarElement.appendChild(this.headerElement);
        }, Calendar.prototype.content = function() {
            this.previousDate = this.value, this.contentElement = createElement("div", {
                className: "e-content"
            }), this.table = createElement("table", {
                attrs: {
                    tabIndex: "0",
                    role: "grid",
                    "aria-activedescendant": ""
                }
            }), "calendar" === this.getModuleName() ? this.element.appendChild(this.contentElement) : this.calendarElement.appendChild(this.contentElement), 
            this.contentElement.appendChild(this.table), this.contentHdr(), this.contentBody(), 
            this.showTodayButton && this.contentFooter();
        }, Calendar.prototype.getCultureValues = function() {
            var cldrObj, culShortNames = [];
            cldrObj = "en" === this.locale || "en-US" === this.locale ? getValue("days.stand-alone.short", getDefaultDateObject()) : this.getCultureObjects(cldrData, "" + this.locale);
            for (var _i = 0, _a = Object.keys(cldrObj); _i < _a.length; _i++) {
                var obj = _a[_i];
                culShortNames.push(getValue(obj, cldrObj));
            }
            return culShortNames;
        }, Calendar.prototype.contentHdr = function() {
            "calendar" === this.getModuleName() ? isNullOrUndefined(this.element.querySelectorAll(".e-content .e-week-header")[0]) || detach(this.element.querySelectorAll(".e-content .e-week-header")[0]) : isNullOrUndefined(this.calendarElement.querySelectorAll(".e-content .e-week-header")[0]) || detach(this.calendarElement.querySelectorAll(".e-content .e-week-header")[0]);
            var shortNames, html = "";
            (this.firstDayOfWeek > 6 || this.firstDayOfWeek < 0) && this.setProperties({
                firstDayOfWeek: 0
            }, !0), this.tableHeadElement = createElement("thead", {
                className: "e-week-header"
            }), this.weekNumber && (html += '<th class="e-week-number"></th>', addClass([ this.element ], "e-week-number")), 
            shortNames = this.shiftArray(this.getCultureValues().length > 0 && this.getCultureValues(), this.firstDayOfWeek);
            for (var days = 0; days <= 6; days++) html += '<th  class="">' + shortNames[days] + "</th>";
            html = "<tr>" + html + "</tr>", this.tableHeadElement.innerHTML = html, this.table.appendChild(this.tableHeadElement);
        }, Calendar.prototype.contentBody = function() {
            switch ("calendar" === this.getModuleName() ? isNullOrUndefined(this.element.querySelectorAll(".e-content tbody")[0]) || detach(this.element.querySelectorAll(".e-content tbody")[0]) : isNullOrUndefined(this.calendarElement.querySelectorAll(".e-content tbody")[0]) || detach(this.calendarElement.querySelectorAll(".e-content tbody")[0]), 
            this.start) {
              case "Year":
                this.renderYears();
                break;

              case "Decade":
                this.renderDecades();
                break;

              default:
                this.renderMonths();
            }
        }, Calendar.prototype.updateFooter = function() {
            this.todayElement.textContent = this.l10.getConstant("today");
        }, Calendar.prototype.contentFooter = function() {
            if (this.showTodayButton) {
                var minimum = new Date(this.min.toDateString()), maximum = new Date(this.max.toDateString());
                this.globalize = new Internationalization(this.locale), this.l10 = new L10n(this.getModuleName(), {
                    today: "Today"
                }, this.locale), this.todayElement = createElement("button"), rippleEffect(this.todayElement), 
                this.updateFooter(), addClass([ this.todayElement ], [ "e-btn", "e-today", "e-flat" ]), 
                new Date(minimum.setHours(0, 0, 0, 0)) <= this.todayDate && this.todayDate <= new Date(maximum.setHours(0, 0, 0, 0)) && !this.todayDisabled || addClass([ this.todayElement ], DISABLED$9), 
                this.footer = createElement("div", {
                    className: "e-footer-container"
                }), this.footer.appendChild(this.todayElement), "calendar" === this.getModuleName() && this.element.appendChild(this.footer), 
                "datepicker" === this.getModuleName() && this.calendarElement.appendChild(this.footer), 
                "datetimepicker" === this.getModuleName() && this.calendarElement.appendChild(this.footer), 
                this.todayElement.classList.contains(DISABLED$9) || EventHandler.add(this.todayElement, "click", this.todayButtonClick, this);
            }
        }, Calendar.prototype.wireEvents = function() {
            EventHandler.add(this.headerTitleElement, "click", this.navTitle, this), "calendar" === this.getModuleName() ? this.keyboardModule = new KeyboardEvents(this.element, {
                eventName: "keydown",
                keyAction: this.keyActionHandle.bind(this),
                keyConfigs: this.keyConfigs
            }) : this.keyboardModule = new KeyboardEvents(this.calendarElement, {
                eventName: "keydown",
                keyAction: this.keyActionHandle.bind(this),
                keyConfigs: this.keyConfigs
            });
        }, Calendar.prototype.todayButtonClick = function() {
            if (this.showTodayButton) {
                var tempValue = new Date();
                this.value ? (tempValue.setHours(this.value.getHours()), tempValue.setMinutes(this.value.getMinutes()), 
                tempValue.setSeconds(this.value.getSeconds())) : tempValue = new Date(tempValue.getFullYear(), tempValue.getMonth(), tempValue.getDate(), 0, 0, 0), 
                this.setProperties({
                    value: tempValue
                }, !0), this.getViewNumber(this.start) >= this.getViewNumber(this.depth) ? this.navigateTo(this.depth, new Date("" + this.value)) : this.navigateTo("Month", new Date("" + this.value)), 
                this.effect = "";
            }
        }, Calendar.prototype.keyActionHandle = function(e) {
            var view = this.getViewNumber(this.currentView()), focusedDate = this.tableBodyElement.querySelector("tr td.e-focused-date"), selectedDate = this.tableBodyElement.querySelector("tr td.e-selected"), depthValue = this.getViewNumber(this.depth), levelRestrict = view === depthValue && this.getViewNumber(this.start) >= depthValue;
            switch (this.effect = "", e.action) {
              case "moveLeft":
                this.KeyboardNavigate(-1, view, e, this.max, this.min), e.preventDefault();
                break;

              case "moveRight":
                this.KeyboardNavigate(1, view, e, this.max, this.min), e.preventDefault();
                break;

              case "moveUp":
                0 === view ? this.KeyboardNavigate(-7, view, e, this.max, this.min) : this.KeyboardNavigate(-4, view, e, this.max, this.min), 
                e.preventDefault();
                break;

              case "moveDown":
                0 === view ? this.KeyboardNavigate(7, view, e, this.max, this.min) : this.KeyboardNavigate(4, view, e, this.max, this.min), 
                e.preventDefault();
                break;

              case "select":
                if (e.target === this.todayElement) this.todayButtonClick(); else {
                    var element = isNullOrUndefined(focusedDate) ? selectedDate : focusedDate;
                    if (!isNullOrUndefined(element) && !element.classList.contains(DISABLED$9)) if (levelRestrict) {
                        var d = new Date(parseInt("" + element.id, 0));
                        this.selectDate(e, d, element);
                    } else this.contentClick(null, --view, element);
                }
                break;

              case "controlUp":
                this.title(), e.preventDefault();
                break;

              case "controlDown":
                isNullOrUndefined(focusedDate) && (isNullOrUndefined(selectedDate) || levelRestrict) || this.contentClick(null, --view, focusedDate || selectedDate), 
                e.preventDefault();
                break;

              case "home":
                this.currentDate = this.firstDay(this.currentDate), detach(this.tableBodyElement), 
                this.renderMonths(e), e.preventDefault();
                break;

              case "end":
                this.currentDate = this.lastDay(this.currentDate), detach(this.tableBodyElement), 
                this.renderMonths(e), e.preventDefault();
                break;

              case "pageUp":
                this.addMonths(this.currentDate, -1), this.navigateTo("Month", this.currentDate), 
                e.preventDefault();
                break;

              case "pageDown":
                this.addMonths(this.currentDate, 1), this.navigateTo("Month", this.currentDate), 
                e.preventDefault();
                break;

              case "shiftPageUp":
                this.addYears(this.currentDate, -1), this.navigateTo("Month", this.currentDate), 
                e.preventDefault();
                break;

              case "shiftPageDown":
                this.addYears(this.currentDate, 1), this.navigateTo("Month", this.currentDate), 
                e.preventDefault();
                break;

              case "controlHome":
                this.navigateTo("Month", new Date(this.currentDate.getFullYear(), 0, 1)), e.preventDefault();
                break;

              case "controlEnd":
                this.navigateTo("Month", new Date(this.currentDate.getFullYear(), 11, 31)), e.preventDefault();
            }
            "calendar" === this.getModuleName() && this.table.focus();
        }, Calendar.prototype.KeyboardNavigate = function(number, currentView, e, max, min) {
            var date = new Date("" + this.currentDate);
            switch (currentView) {
              case 2:
                this.addYears(this.currentDate, number), this.isMinMaxRange(this.currentDate) ? (detach(this.tableBodyElement), 
                this.renderDecades(e)) : this.currentDate = date;
                break;

              case 1:
                this.addMonths(this.currentDate, number), this.isMinMaxRange(this.currentDate) ? (detach(this.tableBodyElement), 
                this.renderYears(e)) : this.currentDate = date;
                break;

              case 0:
                this.addDay(this.currentDate, number, e, max, min), this.isMinMaxRange(this.currentDate) ? (detach(this.tableBodyElement), 
                this.renderMonths(e)) : this.currentDate = date;
            }
        }, Calendar.prototype.preRender = function() {
            var _this = this;
            this.navigatePreviousHandler = this.navigatePrevious.bind(this), this.navigateNextHandler = this.navigateNext.bind(this), 
            this.changeHandler = function(e) {
                _this.triggerChange(e);
            }, this.navigateHandler = function(e) {
                _this.triggerNavigate(e);
            };
        }, Calendar.prototype.minMaxDate = function(localDate) {
            var currentDate = new Date(new Date(+localDate).setHours(0, 0, 0, 0)), minDate = new Date(new Date(+this.min).setHours(0, 0, 0, 0)), maxDate = new Date(new Date(+this.max).setHours(0, 0, 0, 0));
            return +currentDate != +minDate && +currentDate != +maxDate || (+localDate < +this.min && (localDate = new Date(+this.min)), 
            +localDate > +this.max && (localDate = new Date(+this.max))), localDate;
        }, Calendar.prototype.renderMonths = function(e) {
            var numCells = this.weekNumber ? 8 : 7, tdEles = this.renderDays(this.currentDate, e);
            this.contentHdr(), this.renderTemplate(tdEles, numCells, "e-month", e);
        }, Calendar.prototype.renderDays = function(currentDate, e) {
            var minMaxDate, tdEles = [], localDate = new Date("" + currentDate), currentMonth = (this.weekNumber, 
            localDate.getMonth());
            this.titleUpdate(currentDate, "days");
            var d = localDate;
            for (localDate = new Date(d.getFullYear(), d.getMonth(), 0, d.getHours(), d.getMinutes(), d.getSeconds(), d.getMilliseconds()); localDate.getDay() !== this.firstDayOfWeek; ) this.setTime(localDate, -864e5);
            for (var day = 0; day < 42; ++day) {
                var weekEle = createElement("td", {
                    className: "e-cell"
                }), weekAnchor = createElement("span");
                day % 7 == 0 && this.weekNumber && (weekAnchor.textContent = "" + this.getWeek(localDate), 
                weekEle.appendChild(weekAnchor), addClass([ weekEle ], "e-week-number"), tdEles.push(weekEle)), 
                minMaxDate = new Date(+localDate), localDate = this.minMaxDate(localDate);
                var dateFormatOptions = {
                    type: "dateTime",
                    skeleton: "medium"
                }, date = this.globalize.parseDate(this.globalize.formatDate(localDate, dateFormatOptions), dateFormatOptions), tdEle = this.dayCell(localDate), title = this.globalize.formatDate(localDate, {
                    type: "date",
                    skeleton: "medium"
                }), dayLink = createElement("span");
                dayLink.textContent = this.globalize.formatDate(localDate, {
                    type: "date",
                    skeleton: "d"
                });
                var disabled = this.min > localDate || this.max < localDate;
                disabled ? (addClass([ tdEle ], DISABLED$9), addClass([ tdEle ], "e-overlay")) : dayLink.setAttribute("title", "" + title), 
                currentMonth !== localDate.getMonth() && addClass([ tdEle ], "e-other-month"), 0 !== localDate.getDay() && 6 !== localDate.getDay() || addClass([ tdEle ], "e-weekend"), 
                tdEle.appendChild(dayLink), this.renderDaycellArg = {
                    date: localDate,
                    isDisabled: !1,
                    element: tdEle,
                    isOutOfRange: disabled
                };
                var args = this.renderDaycellArg;
                this.renderDayCellEvent(args), args.isDisabled && this.value && +this.value == +args.date && this.setProperties({
                    value: null
                }, !0), this.renderDaycellArg.isDisabled && !tdEle.classList.contains("e-selected") && (addClass([ tdEle ], DISABLED$9), 
                addClass([ tdEle ], "e-overlay"), +this.renderDaycellArg.date == +this.todayDate && (this.todayDisabled = !0));
                var otherMnthBool = tdEle.classList.contains("e-other-month"), disabledCls = tdEle.classList.contains(DISABLED$9);
                disabledCls || EventHandler.add(tdEle, "click", this.clickHandler, this), args.isDisabled && +this.value == +args.date && this.setProperties({
                    value: null
                }, !0), otherMnthBool || disabledCls || !this.getDateVal(localDate) ? currentDate.getDate() !== localDate.getDate() || otherMnthBool || disabledCls ? (currentDate >= this.max && parseInt(tdEle.id, 0) === +this.max && !otherMnthBool && !disabledCls && addClass([ tdEle ], "e-focused-date"), 
                currentDate <= this.min && parseInt(tdEle.id, 0) === +this.min && !otherMnthBool && !disabledCls && addClass([ tdEle ], "e-focused-date")) : addClass([ tdEle ], "e-focused-date") : addClass([ tdEle ], "e-selected"), 
                date.getMonth() === new Date().getMonth() && date.getDate() === new Date().getDate() && date.getFullYear() === new Date().getFullYear() && addClass([ tdEle ], "e-today"), 
                tdEles.push(this.renderDaycellArg.element), localDate = new Date(+minMaxDate), this.addDay(localDate, 1, null, this.max, this.min);
            }
            return tdEles;
        }, Calendar.prototype.renderYears = function(e) {
            this.removeTheadEle();
            var tdEles = [], valueUtil = isNullOrUndefined(this.value), curDate = new Date("" + this.currentDate), mon = curDate.getMonth(), yr = curDate.getFullYear(), localDate = curDate, curYrs = localDate.getFullYear(), minYr = new Date("" + this.min).getFullYear(), minMonth = new Date("" + this.min).getMonth(), maxYr = new Date("" + this.max).getFullYear(), maxMonth = new Date("" + this.max).getMonth();
            localDate.setMonth(0), this.titleUpdate(this.currentDate, "months");
            this.min > localDate || this.max;
            localDate.setDate(1);
            for (var month = 0; month < 12; ++month) {
                var tdEle = this.dayCell(localDate), dayLink = createElement("span"), localMonth = this.value && this.value.getMonth() === localDate.getMonth(), select$$1 = this.value && this.value.getFullYear() === yr && localMonth;
                dayLink.textContent = this.globalize.formatDate(localDate, {
                    type: "dateTime",
                    skeleton: "MMM"
                }), this.min && (curYrs < minYr || month < minMonth && curYrs === minYr) || this.max && (curYrs > maxYr || month > maxMonth && curYrs >= maxYr) ? addClass([ tdEle ], DISABLED$9) : !valueUtil && select$$1 ? addClass([ tdEle ], "e-selected") : localDate.getMonth() === mon && this.currentDate.getMonth() === mon && addClass([ tdEle ], "e-focused-date"), 
                localDate.setDate(1), localDate.setMonth(localDate.getMonth() + 1), tdEle.classList.contains(DISABLED$9) || EventHandler.add(tdEle, "click", this.clickHandler, this), 
                tdEle.appendChild(dayLink), tdEles.push(tdEle);
            }
            this.renderTemplate(tdEles, 4, "e-year", e);
        }, Calendar.prototype.renderDecades = function(e) {
            this.removeTheadEle();
            var tdEles = [], localDate = new Date("" + this.currentDate);
            localDate.setMonth(0), localDate.setDate(1);
            var localYr = localDate.getFullYear(), startYr = new Date("" + (localYr - localYr % 10)), endYr = new Date("" + (localYr - localYr % 10 + 9)), startHdrYr = this.globalize.formatDate(startYr, {
                type: "dateTime",
                skeleton: "y"
            }), endHdrYr = this.globalize.formatDate(endYr, {
                type: "dateTime",
                skeleton: "y"
            });
            this.headerTitleElement.textContent = startHdrYr + " - " + endHdrYr;
            for (var startYear = new Date(localYr - localYr % 10 - 1, 0, 1).getFullYear(), rowIterator = 0; rowIterator < 12; ++rowIterator) {
                var year = startYear + rowIterator;
                localDate.setFullYear(year);
                var tdEle = this.dayCell(localDate);
                attributes(tdEle, {
                    role: "gridcell"
                });
                var dayLink = createElement("span");
                dayLink.textContent = this.globalize.formatDate(localDate, {
                    type: "dateTime",
                    skeleton: "y"
                }), year < new Date("" + this.min).getFullYear() || year > new Date("" + this.max).getFullYear() ? addClass([ tdEle ], DISABLED$9) : isNullOrUndefined(this.value) || localDate.getFullYear() !== this.value.getFullYear() ? localDate.getFullYear() !== this.currentDate.getFullYear() || tdEle.classList.contains(DISABLED$9) || addClass([ tdEle ], "e-focused-date") : addClass([ tdEle ], "e-selected"), 
                tdEle.classList.contains(DISABLED$9) || EventHandler.add(tdEle, "click", this.clickHandler, this), 
                tdEle.appendChild(dayLink), tdEles.push(tdEle);
            }
            this.renderTemplate(tdEles, 4, "e-decade", e);
        }, Calendar.prototype.dayCell = function(localDate) {
            var dateFormatOptions = {
                skeleton: "medium",
                type: "dateTime"
            };
            return createElement("td", {
                className: "e-cell",
                attrs: {
                    id: "" + getUniqueID("" + this.globalize.parseDate(this.globalize.formatDate(localDate, dateFormatOptions), dateFormatOptions).valueOf()),
                    "aria-selected": "false",
                    role: "gridcell"
                }
            });
        }, Calendar.prototype.firstDay = function(date) {
            var collection = this.tableBodyElement.querySelectorAll("td:not(.e-other-month");
            if (collection.length) for (var i = 0; i < collection.length; i++) if (!collection[i].classList.contains(DISABLED$9)) {
                date = new Date(parseInt(collection[i].id, 0));
                break;
            }
            return date;
        }, Calendar.prototype.lastDay = function(date) {
            var lastDate = new Date(date.getFullYear(), date.getMonth() + 1, 0), timeOffset = Math.abs(lastDate.getTimezoneOffset() - this.firstDay(date).getTimezoneOffset());
            return timeOffset && lastDate.setHours(this.firstDay(date).getHours() + timeOffset / 60), 
            this.findlastDay(lastDate);
        }, Calendar.prototype.checkDateValue = function(value) {
            return !isNullOrUndefined(value) && value instanceof Date && !isNaN(+value) ? value : null;
        }, Calendar.prototype.findlastDay = function(date) {
            var collection = this.tableBodyElement.querySelectorAll("td:not(.e-other-month");
            if (collection.length) for (var i = collection.length - 1; i >= 0; i--) if (!collection[i].classList.contains(DISABLED$9)) {
                date = new Date(parseInt(collection[i].id, 0));
                break;
            }
            return date;
        }, Calendar.prototype.removeTheadEle = function() {
            "calendar" === this.getModuleName() ? isNullOrUndefined(this.element.querySelectorAll(".e-content table thead")[0]) || detach(this.tableHeadElement) : isNullOrUndefined(this.calendarElement.querySelectorAll(".e-content table thead")[0]) || detach(this.tableHeadElement);
        }, Calendar.prototype.renderTemplate = function(elements, numCells, classNm, e) {
            var trEle, view = this.getViewNumber(this.currentView());
            this.tableBodyElement = createElement("tbody"), this.table.appendChild(this.tableBodyElement), 
            removeClass([ this.contentElement, this.headerElement ], [ "e-month", "e-decade", "e-year" ]), 
            addClass([ this.contentElement, this.headerElement ], [ classNm ]);
            for (var row = numCells, rowIterator = 0, dayCell = 0; dayCell < elements.length / numCells; ++dayCell) {
                for (trEle = createElement("tr", {
                    attrs: {
                        role: "row"
                    }
                }), rowIterator = 0 + rowIterator; rowIterator < row; rowIterator++) elements[rowIterator].classList.contains("e-week-number") || isNullOrUndefined(elements[rowIterator].children[0]) || (addClass([ elements[rowIterator].children[0] ], [ "e-day" ]), 
                rippleEffect(elements[rowIterator].children[0], {
                    duration: 600,
                    isCenterRipple: !0
                })), trEle.appendChild(elements[rowIterator]), !this.weekNumber && 6 === rowIterator && elements[6].classList.contains("e-other-month") && addClass([ trEle ], "e-month-hide"), 
                this.weekNumber ? 41 === rowIterator && elements[41].classList.contains("e-other-month") && addClass([ trEle ], "e-month-hide") : 35 === rowIterator && elements[35].classList.contains("e-other-month") && addClass([ trEle ], "e-month-hide");
                row += numCells, rowIterator += 0, this.tableBodyElement.appendChild(trEle);
            }
            this.table.querySelector("tbody").className = this.effect, this.iconHandler(), this.changedArgs = {
                value: this.value
            }, (view !== this.getViewNumber(this.currentView()) || 0 === view && view !== this.getViewNumber(this.currentView())) && this.navigateHandler(e), 
            this.setAriaActivedescendant(), this.changeHandler();
        }, Calendar.prototype.clickHandler = function(e) {
            e.preventDefault();
            var eve = e.currentTarget, view = this.getViewNumber(this.currentView());
            eve.classList.contains("e-other-month") ? (this.value = this.getIdValue(e, null), 
            this.contentClick(e, 0, null)) : view === this.getViewNumber(this.depth) && this.getViewNumber(this.start) >= this.getViewNumber(this.depth) ? this.contentClick(e, 1, null) : 2 === view ? this.contentClick(e, 1, null) : eve.classList.contains("e-other-month") || 0 !== view ? this.contentClick(e, 0, eve) : this.selectDate(e, this.getIdValue(e, null), null), 
            "calendar" === this.getModuleName() && this.table.focus();
        }, Calendar.prototype.contentClick = function(e, view, ele) {
            var currentView = this.getViewNumber(this.currentView()), d = this.getIdValue(e, ele);
            switch (view) {
              case 0:
                currentView === this.getViewNumber(this.depth) && this.getViewNumber(this.start) >= this.getViewNumber(this.depth) ? (detach(this.tableBodyElement), 
                this.currentDate = d, this.effect = "e-zoomin", this.renderMonths(e)) : (this.currentDate.setMonth(d.getMonth()), 
                d.getMonth() > 0 && this.currentDate.getMonth() !== d.getMonth() && this.currentDate.setDate(0), 
                this.currentDate.setFullYear(d.getFullYear()), this.effect = "e-zoomin", detach(this.tableBodyElement), 
                this.renderMonths(e));
                break;

              case 1:
                currentView === this.getViewNumber(this.depth) && this.getViewNumber(this.start) >= this.getViewNumber(this.depth) ? this.selectDate(e, d, null) : (this.currentDate.setFullYear(d.getFullYear()), 
                this.effect = "e-zoomin", detach(this.tableBodyElement), this.renderYears(e));
            }
        }, Calendar.prototype.switchView = function(view, e) {
            switch (view) {
              case 0:
                detach(this.tableBodyElement), this.renderMonths(e);
                break;

              case 1:
                detach(this.tableBodyElement), this.renderYears(e);
                break;

              case 2:
                detach(this.tableBodyElement), this.renderDecades(e);
            }
        }, Calendar.prototype.getModuleName = function() {
            return "calendar";
        }, Calendar.prototype.getPersistData = function() {
            return this.addOnPersist([ "value" ]);
        }, Calendar.prototype.onPropertyChanged = function(newProp, oldProp) {
            this.effect = "";
            for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                var prop = _a[_i];
                switch (prop) {
                  case "value":
                    this.setProperties({
                        value: new Date("" + newProp.value)
                    }, !0), isNaN(+this.value) && this.setProperties({
                        value: oldProp.value
                    }, !0), this.validateDate(), this.minMaxUpdate(), this.setvalue();
                    break;

                  case "enableRtl":
                    newProp.enableRtl ? "calendar" === this.getModuleName() ? this.element.classList.add("e-rtl") : this.calendarElement.classList.add("e-rtl") : "calendar" === this.getModuleName() ? this.element.classList.remove("e-rtl") : this.calendarElement.classList.remove("e-rtl");
                    break;

                  case "start":
                  case "weekNumber":
                  case "firstDayOfWeek":
                    this.contentHdr(), this.contentBody();
                    break;

                  case "min":
                  case "max":
                    "min" === prop ? this.setProperties({
                        min: this.checkDateValue(new Date("" + newProp.min))
                    }, !0) : this.setProperties({
                        max: this.checkDateValue(new Date("" + newProp.max))
                    }, !0), this.setProperties({
                        start: this.currentView()
                    }, !0), detach(this.tableBodyElement), this.minMaxUpdate(), this.contentBody(), 
                    (this.todayDate < this.min || this.max < this.todayDate) && this.footer && this.todayElement ? (detach(this.todayElement), 
                    detach(this.footer), this.todayElement = this.footer = void 0, this.contentFooter()) : this.todayElement.classList.contains("e-disabled") && this.footer && this.todayElement && removeClass([ this.todayElement ], DISABLED$9);
                    break;

                  case "locale":
                    this.globalize = new Internationalization(this.locale), this.contentHdr(), this.contentBody(), 
                    this.l10.setLocale(this.locale), this.updateFooter();
                    break;

                  case "showTodayButton":
                    newProp.showTodayButton ? this.contentFooter() : (detach(this.todayElement), detach(this.footer), 
                    this.todayElement = this.footer = void 0), this.setProperties({
                        showTodayButton: newProp.showTodayButton
                    }, !0);
                }
            }
        }, Calendar.prototype.setvalue = function() {
            detach(this.tableBodyElement), this.setProperties({
                start: this.currentView()
            }, !0), this.contentBody();
        }, Calendar.prototype.titleUpdate = function(date, view) {
            var globalize = new Internationalization(this.locale);
            switch (view) {
              case "days":
                this.headerTitleElement.textContent = globalize.formatDate(date, {
                    type: "dateTime",
                    skeleton: "yMMMM"
                });
                break;

              case "months":
                this.headerTitleElement.textContent = globalize.formatDate(date, {
                    type: "dateTime",
                    skeleton: "y"
                });
            }
        }, Calendar.prototype.setActiveDescendant = function() {
            var id, focusedEle = this.tableBodyElement.querySelector("tr td.e-focused-date"), selectedEle = this.tableBodyElement.querySelector("tr td.e-selected"), title = this.globalize.formatDate(this.currentDate, {
                type: "date",
                skeleton: "medium"
            });
            return (selectedEle || focusedEle) && ((focusedEle || selectedEle).setAttribute("aria-selected", "true"), 
            (focusedEle || selectedEle).setAttribute("aria-label", "The current focused date is " + title), 
            id = (focusedEle || selectedEle).getAttribute("id")), id;
        }, Calendar.prototype.iconHandler = function() {
            switch (new Date("" + this.currentDate).setDate(1), this.currentView()) {
              case "Month":
                this.previousIconHandler(this.compareMonth(new Date("" + this.currentDate), this.min) < 1), 
                this.nextIconHandler(this.compareMonth(new Date("" + this.currentDate), this.max) > -1);
                break;

              case "Year":
                this.previousIconHandler(this.compareYear(new Date("" + this.currentDate), this.min) < 1), 
                this.nextIconHandler(this.compareYear(new Date("" + this.currentDate), this.max) > -1);
                break;

              case "Decade":
                this.previousIconHandler(this.compareDecade(new Date("" + this.currentDate), this.min) < 1), 
                this.nextIconHandler(this.compareDecade(new Date("" + this.currentDate), this.max) > -1);
            }
        }, Calendar.prototype.destroy = function() {
            "calendar" === this.getModuleName() ? removeClass([ this.element ], [ ROOT$10 ]) : this.calendarElement && removeClass([ this.element ], [ ROOT$10 ]), 
            "calendar" === this.getModuleName() && (EventHandler.remove(this.headerTitleElement, "click", this.navTitle), 
            this.todayElement && EventHandler.remove(this.todayElement, "click", this.todayButtonClick), 
            this.previousIconHandler(!0), this.nextIconHandler(!0), this.keyboardModule.destroy()), 
            this.element.innerHTML = "", _super.prototype.destroy.call(this);
        }, Calendar.prototype.title = function(e) {
            var currentView = this.getViewNumber(this.currentView());
            this.effect = "e-zoomin", this.switchView(++currentView, e);
        }, Calendar.prototype.getViewNumber = function(stringVal) {
            return "Month" === stringVal ? 0 : "Year" === stringVal ? 1 : 2;
        }, Calendar.prototype.navTitle = function(e) {
            e.preventDefault(), this.title(e), "calendar" === this.getModuleName() && this.table.focus();
        }, Calendar.prototype.previous = function() {
            this.effect = "";
            var currentView = this.getViewNumber(this.currentView());
            switch (this.currentView()) {
              case "Month":
                this.addMonths(this.currentDate, -1), this.switchView(currentView);
                break;

              case "Year":
                this.addYears(this.currentDate, -1), this.switchView(currentView);
                break;

              case "Decade":
                this.addYears(this.currentDate, -10), this.switchView(currentView);
            }
        }, Calendar.prototype.navigatePrevious = function(e) {
            e.preventDefault(), this.previous(), this.triggerNavigate(e), "calendar" === this.getModuleName() && this.table.focus();
        }, Calendar.prototype.next = function() {
            this.effect = "";
            var currentView = this.getViewNumber(this.currentView());
            switch (this.currentView()) {
              case "Month":
                this.addMonths(this.currentDate, 1), this.switchView(currentView);
                break;

              case "Year":
                this.addYears(this.currentDate, 1), this.switchView(currentView);
                break;

              case "Decade":
                this.addYears(this.currentDate, 10), this.switchView(currentView);
            }
        }, Calendar.prototype.navigateNext = function(eve) {
            eve.preventDefault(), this.next(), this.triggerNavigate(eve), "calendar" === this.getModuleName() && this.table.focus();
        }, Calendar.prototype.navigateTo = function(view, date) {
            this.minMaxUpdate(), +date >= +this.min && +date <= +this.max && (this.currentDate = date), 
            +date <= +this.min && (this.currentDate = new Date("" + this.min)), +date >= +this.max && (this.currentDate = new Date("" + this.max)), 
            this.switchView(this.getViewNumber(view));
        }, Calendar.prototype.currentView = function() {
            return this.contentElement.classList.contains("e-year") ? "Year" : this.contentElement.classList.contains("e-decade") ? "Decade" : "Month";
        }, Calendar.prototype.getDateVal = function(date) {
            return !isNullOrUndefined(this.value) && date.getDate() === this.value.getDate() && date.getMonth() === this.value.getMonth() && date.getFullYear() === this.value.getFullYear();
        }, Calendar.prototype.getCultureObjects = function(ld, c) {
            return getValue("main." + this.locale + ".dates.calendars.gregorian.days.format.short", ld);
        }, Calendar.prototype.getWeek = function(d) {
            var currentDate = new Date("" + d).valueOf(), date = new Date(d.getFullYear(), 0, 1).valueOf(), a = currentDate - date;
            return Math.ceil((a / 864e5 + new Date(date).getDay() + 1) / 7);
        }, Calendar.prototype.setTime = function(date, time) {
            var d = new Date(date.getTime() + time);
            isNullOrUndefined(this.value) || 0 === this.value.getHours() && 0 === this.value.getSeconds() && 0 === this.value.getMinutes() ? date = new Date(date.setTime(d.getTime())) : date.setTime(d.getTime());
        }, Calendar.prototype.addMonths = function(date, i) {
            var day = date.getDate();
            date.setDate(1), date.setMonth(date.getMonth() + i), date.setDate(Math.min(day, this.getMaxDays(date)));
        }, Calendar.prototype.addYears = function(date, i) {
            var day = date.getDate();
            date.setDate(1), date.setFullYear(date.getFullYear() + i), date.setDate(Math.min(day, this.getMaxDays(date)));
        }, Calendar.prototype.getIdValue = function(e, element) {
            var eve;
            eve = e ? e.currentTarget : element;
            var dateFormatOptions = {
                type: "dateTime",
                skeleton: "medium"
            }, dateString = this.globalize.formatDate(new Date(parseInt("" + eve.getAttribute("id"), 0)), dateFormatOptions), date = this.globalize.parseDate(dateString, dateFormatOptions), value = date.valueOf() - date.valueOf() % 1e3;
            return new Date(value);
        }, Calendar.prototype.selectDate = function(e, date, element) {
            var ele = element || e.currentTarget;
            "Decade" === this.currentView() ? this.setDateDecade(this.currentDate, date.getFullYear()) : "Year" === this.currentView() ? this.setDateYear(this.currentDate, date) : (this.setProperties({
                value: new Date("" + date)
            }, !0), this.currentDate = new Date("" + date));
            var tableBodyElement = closest(ele, "." + ROOT$10);
            isNullOrUndefined(tableBodyElement) && (tableBodyElement = this.tableBodyElement), 
            isNullOrUndefined(tableBodyElement.querySelector(".e-selected")) || removeClass([ tableBodyElement.querySelector(".e-selected") ], "e-selected"), 
            isNullOrUndefined(tableBodyElement.querySelector(".e-focused-date")) || removeClass([ tableBodyElement.querySelector(".e-focused-date") ], "e-focused-date"), 
            addClass([ ele ], "e-selected"), this.changedArgs = {
                value: this.value
            }, this.changeHandler(e);
        }, Calendar.prototype.setAriaActivedescendant = function() {
            attributes(this.table, {
                "aria-activedescendant": "" + this.setActiveDescendant()
            });
        }, Calendar.prototype.previousIconHandler = function(disabled) {
            disabled ? (EventHandler.remove(this.previousIcon, "click", this.navigatePreviousHandler), 
            addClass([ this.previousIcon ], "e-disabled"), addClass([ this.previousIcon ], "e-overlay"), 
            this.previousIcon.setAttribute("aria-disabled", "true")) : (EventHandler.add(this.previousIcon, "click", this.navigatePreviousHandler), 
            removeClass([ this.previousIcon ], "e-disabled"), removeClass([ this.previousIcon ], "e-overlay"), 
            this.previousIcon.setAttribute("aria-disabled", "false"));
        }, Calendar.prototype.renderDayCellEvent = function(args) {
            extend(this.renderDaycellArg, {
                name: "renderDayCell"
            }), this.trigger("renderDayCell", args);
        }, Calendar.prototype.navigatedEvent = function(eve) {
            extend(this.navigatedArgs, {
                name: "navigated",
                event: eve
            }), this.trigger("navigated", this.navigatedArgs);
        }, Calendar.prototype.triggerNavigate = function(event) {
            this.navigatedArgs = {
                view: this.currentView(),
                date: this.currentDate
            }, this.navigatedEvent(event);
        }, Calendar.prototype.changeEvent = function(e) {
            this.trigger("change", this.changedArgs);
        }, Calendar.prototype.triggerChange = function(e) {
            this.changedArgs.event = e, isNullOrUndefined(this.value) || this.setProperties({
                value: this.value
            }, !0), +this.value !== Number.NaN && +this.value != +this.previousDate && this.changeEvent(e), 
            this.previousDate = this.value;
        }, Calendar.prototype.nextIconHandler = function(disabled) {
            disabled ? (EventHandler.remove(this.nextIcon, "click", this.navigateNextHandler), 
            addClass([ this.nextIcon ], DISABLED$9), addClass([ this.nextIcon ], "e-overlay"), 
            this.nextIcon.setAttribute("aria-disabled", "true")) : (EventHandler.add(this.nextIcon, "click", this.navigateNextHandler), 
            removeClass([ this.nextIcon ], DISABLED$9), removeClass([ this.nextIcon ], "e-overlay"), 
            this.nextIcon.setAttribute("aria-disabled", "false"));
        }, Calendar.prototype.compare = function(startDate, endDate, modifier) {
            var end, result, start = endDate.getFullYear();
            return end = start, result = 0, modifier && (end = (start -= start % modifier) - start % modifier + modifier - 1), 
            startDate.getFullYear() > end ? result = 1 : startDate.getFullYear() < start && (result = -1), 
            result;
        }, Calendar.prototype.isMinMaxRange = function(date) {
            return +date >= +this.min && +date <= +this.max;
        }, Calendar.prototype.compareYear = function(start, end) {
            return this.compare(start, end, 0);
        }, Calendar.prototype.compareDecade = function(start, end) {
            return this.compare(start, end, 10);
        }, Calendar.prototype.shiftArray = function(array, i) {
            return array.slice(i).concat(array.slice(0, i));
        }, Calendar.prototype.addDay = function(date, i, e, max, min) {
            var column = i, value = new Date(+date);
            if (!isNullOrUndefined(this.tableBodyElement) && !isNullOrUndefined(e)) {
                for (;this.findNextTD(new Date(+date), column, max, min); ) column += i;
                var rangeValue = new Date(value.setDate(value.getDate() + column));
                column = +rangeValue > +max || +rangeValue < +min ? column === i ? i - i : i : column;
            }
            date.setDate(date.getDate() + column);
        }, Calendar.prototype.findNextTD = function(date, column, max, min) {
            var value = new Date(date.setDate(date.getDate() + column)), collection = [], isDisabled = !1;
            if ((!isNullOrUndefined(value) && value.getMonth()) !== (!isNullOrUndefined(this.currentDate) && this.currentDate.getMonth())) {
                collection = this.renderDays(value, null).filter(function(ele) {
                    return ele.classList.contains(DISABLED$9);
                });
            } else collection = this.tableBodyElement.querySelectorAll("td.e-disabled");
            if (+value <= +max && +value >= +min && collection.length) for (var i = 0; i < collection.length && !(isDisabled = +value == +new Date(parseInt(collection[i].id, 0))); i++) ;
            return isDisabled;
        }, Calendar.prototype.getMaxDays = function(d) {
            var date, month, tmpDate = new Date("" + d);
            for (date = 28, month = tmpDate.getMonth(); tmpDate.getMonth() === month; ) ++date, 
            tmpDate.setDate(date);
            return date - 1;
        }, Calendar.prototype.setDateDecade = function(date, year) {
            date.setFullYear(year), this.setProperties({
                value: new Date("" + date)
            }, !0);
        }, Calendar.prototype.setDateYear = function(date, value) {
            date.setFullYear(value.getFullYear(), value.getMonth(), date.getDate()), value.getMonth() !== date.getMonth() && date.setDate(0), 
            this.setProperties({
                value: new Date("" + date)
            }, !0), this.currentDate = new Date("" + this.value);
        }, Calendar.prototype.compareMonth = function(start, end) {
            return start.getFullYear() > end.getFullYear() ? 1 : start.getFullYear() < end.getFullYear() ? -1 : start.getMonth() === end.getMonth() ? 0 : start.getMonth() > end.getMonth() ? 1 : -1;
        }, __decorate$28([ Property(null) ], Calendar.prototype, "value", void 0), __decorate$28([ Property(new Date(1900, 0, 1)) ], Calendar.prototype, "min", void 0), 
        __decorate$28([ Property(new Date(2099, 11, 31)) ], Calendar.prototype, "max", void 0), 
        __decorate$28([ Property(0) ], Calendar.prototype, "firstDayOfWeek", void 0), __decorate$28([ Property("Month") ], Calendar.prototype, "start", void 0), 
        __decorate$28([ Property("Month") ], Calendar.prototype, "depth", void 0), __decorate$28([ Property(!1) ], Calendar.prototype, "weekNumber", void 0), 
        __decorate$28([ Property(!0) ], Calendar.prototype, "showTodayButton", void 0), 
        __decorate$28([ Event() ], Calendar.prototype, "created", void 0), __decorate$28([ Event() ], Calendar.prototype, "destroyed", void 0), 
        __decorate$28([ Event() ], Calendar.prototype, "change", void 0), __decorate$28([ Event() ], Calendar.prototype, "navigated", void 0), 
        __decorate$28([ Event() ], Calendar.prototype, "renderDayCell", void 0), Calendar = __decorate$28([ NotifyPropertyChanges ], Calendar);
    }(Component), __extends$1$6 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$1$6 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, DatePicker$1 = function(_super) {
        function DatePicker(options, element) {
            var _this = _super.call(this, options, element) || this;
            return _this.previousEleValue = "", _this.isDateIconClicked = !1, _this.keyConfigs = {
                altUpArrow: "alt+uparrow",
                altDownArrow: "alt+downarrow",
                escape: "escape",
                enter: "enter",
                controlUp: "ctrl+38",
                controlDown: "ctrl+40",
                moveDown: "downarrow",
                moveUp: "uparrow",
                moveLeft: "leftarrow",
                moveRight: "rightarrow",
                select: "enter",
                home: "home",
                end: "end",
                pageUp: "pageup",
                pageDown: "pagedown",
                shiftPageUp: "shift+pageup",
                shiftPageDown: "shift+pagedown",
                controlHome: "ctrl+home",
                controlEnd: "ctrl+end",
                tab: "tab"
            }, _this.calendarKeyConfigs = {
                escape: "escape",
                enter: "enter",
                tab: "tab"
            }, _this;
        }
        return __extends$1$6(DatePicker, _super), DatePicker.prototype.render = function() {
            this.initialize(), this.bindEvents();
        }, DatePicker.prototype.initialize = function() {
            this.createInput(), this.updateInput(), this.previousEleValue = this.inputElement.value;
        }, DatePicker.prototype.createInput = function() {
            var ariaAttrs = {
                "aria-live": "assertive",
                "aria-atomic": "true",
                "aria-haspopup": "true",
                "aria-activedescendant": "null",
                "aria-owns": this.inputElement.id + "_options",
                "aria-expanded": "false",
                role: "combobox",
                autocomplete: "off"
            };
            if ("datepicker" === this.getModuleName()) {
                this.globalize = new Internationalization(this.locale), this.l10n = new L10n("datepicker", {
                    placeholder: null
                }, this.locale), this.setProperties({
                    placeholder: this.placeholder || this.l10n.getConstant("placeholder")
                }, !0);
            }
            this.inputWrapper = Input.createInput({
                element: this.inputElement,
                customTag: this.ngTag,
                floatLabelType: this.floatLabelType,
                properties: {
                    readonly: this.readonly,
                    placeholder: this.placeholder,
                    cssClass: this.cssClass,
                    enabled: this.enabled,
                    enableRtl: this.enableRtl,
                    showClearButton: this.showClearButton
                },
                buttons: [ "e-input-group-icon e-date-icon e-icons" ]
            }), this.setWidth(this.width), "" !== this.inputElement.name ? this.inputElement.setAttribute("name", "" + this.inputElement.getAttribute("name")) : this.inputElement.setAttribute("name", "" + this.inputElement.id), 
            attributes(this.inputElement, ariaAttrs), this.enabled || this.inputElement.setAttribute("aria-disabled", "true"), 
            Input.addAttributes({
                "aria-label": "select"
            }, this.inputWrapper.buttons[0]), addClass([ this.inputWrapper.container ], "e-date-wrapper");
        }, DatePicker.prototype.updateInput = function() {
            if (this.value && !this.isCalendar() && this.disabledDates(), +new Date("" + this.value)) {
                if ("string" == typeof this.value) {
                    this.value = this.checkDateValue(new Date("" + this.value));
                    var dateOptions = void 0;
                    dateOptions = "datetimepicker" === this.getModuleName() ? {
                        format: isNullOrUndefined(this.format) ? this.dateTimeFormat : this.format,
                        type: "dateTime",
                        skeleton: "yMd"
                    } : {
                        format: this.format,
                        type: "dateTime",
                        skeleton: "yMd"
                    };
                    var dateString = this.globalize.formatDate(this.value, dateOptions);
                    this.setProperties({
                        value: this.globalize.parseDate(dateString, dateOptions)
                    }, !0);
                }
            } else this.setProperties({
                value: null
            }, !0);
            if (this.strictMode && _super.prototype.processDate.call(this), !isNullOrUndefined(this.value)) {
                var dateValue = this.value, tempFormat = (dateString = void 0, isNullOrUndefined(this.format) ? this.dateTimeFormat : this.format);
                if (dateString = "datetimepicker" === this.getModuleName() ? this.globalize.formatDate(this.value, {
                    format: tempFormat,
                    type: "dateTime",
                    skeleton: "yMd"
                }) : this.globalize.formatDate(this.value, {
                    format: this.format,
                    type: "dateTime",
                    skeleton: "yMd"
                }), +dateValue <= +this.max && +dateValue >= +this.min) Input.setValue(dateString, this.inputElement, this.floatLabelType, this.showClearButton); else {
                    var value = +dateValue >= +this.max || !+this.value || !+this.value || +dateValue <= +this.min;
                    !this.strictMode && value && Input.setValue(dateString, this.inputElement, this.floatLabelType, this.showClearButton);
                }
            }
            isNullOrUndefined(this.value) && this.strictMode && Input.setValue("", this.inputElement, this.floatLabelType, this.showClearButton), 
            this.changedArgs = {
                value: this.value
            }, this.errorClass();
        }, DatePicker.prototype.bindEvents = function() {
            this.enabled ? (EventHandler.add(this.inputWrapper.buttons[0], "mousedown touchstart", this.dateIconHandler, this), 
            EventHandler.add(this.inputElement, "focus", this.inputFocusHandler, this), EventHandler.add(this.inputElement, "blur", this.inputBlurHandler, this), 
            this.bindClearEvent()) : (EventHandler.remove(this.inputWrapper.buttons[0], "mousedown touchstart", this.dateIconHandler), 
            EventHandler.remove(this.inputElement, "focus", this.inputFocusHandler), EventHandler.remove(this.inputElement, "blur", this.inputBlurHandler)), 
            this.keyboardModules = new KeyboardEvents(this.inputElement, {
                eventName: "keydown",
                keyAction: this.inputKeyActionHandle.bind(this),
                keyConfigs: this.keyConfigs
            });
        }, DatePicker.prototype.bindClearEvent = function() {
            this.showClearButton && EventHandler.add(this.inputWrapper.clearButton, "mousedown touchstart", this.resetHandler, this);
        }, DatePicker.prototype.resetHandler = function(e) {
            e.preventDefault(), this.clear(e);
        }, DatePicker.prototype.clear = function(event) {
            this.setProperties({
                value: null
            }, !0), Input.setValue("", this.inputElement, this.floatLabelType, this.showClearButton), 
            this.changeEvent(event);
        }, DatePicker.prototype.dateIconHandler = function(e) {
            e.preventDefault(), this.readonly || (this.isCalendar() ? this.hide() : (this.isDateIconClicked = !0, 
            this.show(), Browser.isDevice || ("datetimepicker" === this.getModuleName() && this.inputElement.focus(), 
            this.inputElement.focus(), addClass([ this.inputWrapper.container ], [ "e-input-focus" ])), 
            addClass(this.inputWrapper.buttons, "e-active")));
        }, DatePicker.prototype.CalendarKeyActionHandle = function(e) {
            switch (e.action) {
              case "escape":
                this.isCalendar() ? this.hide() : this.inputWrapper.container.children[this.index].blur();
                break;

              case "enter":
                this.isCalendar() ? +this.value == +this.currentDate || this.isCalendar() || this.inputWrapper.container.children[this.index].focus() : this.show(), 
                "datetimepicker" === this.getModuleName() && this.inputElement.focus();
                break;

              case "tab":
                this.hide();
            }
        }, DatePicker.prototype.inputFocusHandler = function() {
            this.isDateIconClicked = !1, this.trigger("focus");
        }, DatePicker.prototype.inputBlurHandler = function() {
            this.strictModeUpdate(), this.updateInput(), this.changeTrigger(), this.errorClass(), 
            this.isCalendar() && document.activeElement === this.inputElement && this.hide(), 
            this.inputElement.blur(), this.trigger("blur"), this.isCalendar() && (this.calendarKeyboardModules = new KeyboardEvents(this.calendarElement.children[1].firstElementChild, {
                eventName: "keydown",
                keyAction: this.CalendarKeyActionHandle.bind(this),
                keyConfigs: this.calendarKeyConfigs
            }));
        }, DatePicker.prototype.documentHandler = function(e) {
            Browser.isDevice || e.preventDefault();
            var target = e.target;
            closest(target, ".e-datepicker.e-popup-wrapper") || closest(target, ".e-input-group") === this.inputWrapper.container || target.classList.contains("e-day") || this.hide();
        }, DatePicker.prototype.inputKeyActionHandle = function(e) {
            switch (e.action) {
              case "altUpArrow":
                this.hide(), this.inputElement.focus();
                break;

              case "altDownArrow":
                this.strictModeUpdate(), this.updateInput(), "datepicker" === this.getModuleName() && this.show();
                break;

              case "escape":
                this.hide();
                break;

              case "enter":
                this.strictModeUpdate(), this.updateInput(), this.changeTrigger(), this.errorClass(), 
                this.isCalendar() || document.activeElement !== this.inputElement || this.hide();
                break;

              case "tab":
                this.strictModeUpdate(), this.updateInput(), this.changeTrigger(), this.errorClass(), 
                this.hide();
                break;

              default:
                this.previousDate = !isNullOrUndefined(this.value) && new Date("" + this.value) || null, 
                this.isCalendar() && _super.prototype.keyActionHandle.call(this, e);
            }
        }, DatePicker.prototype.strictModeUpdate = function() {
            var format;
            if (format = "datetimepicker" === this.getModuleName() ? isNullOrUndefined(this.format) ? this.dateTimeFormat : this.format : isNullOrUndefined(this.format) ? this.format : this.format.replace("dd", "d"), 
            !isNullOrUndefined(format)) {
                format.split("M").length - 1 < 3 && (format = format.replace("MM", "M"));
            }
            var dateOptions;
            dateOptions = "datetimepicker" === this.getModuleName() ? {
                format: isNullOrUndefined(this.format) ? this.dateTimeFormat : this.format,
                type: "dateTime",
                skeleton: "yMd"
            } : {
                format: format,
                type: "dateTime",
                skeleton: "yMd"
            };
            var date = this.globalize.parseDate(this.inputElement.value, dateOptions);
            this.strictMode && date ? (Input.setValue(this.globalize.formatDate(date, dateOptions), this.inputElement, this.floatLabelType, this.showClearButton), 
            this.inputElement.value !== this.previousEleValue && this.setProperties({
                value: date
            }, !0)) : this.strictMode || this.inputElement.value !== this.previousEleValue && this.setProperties({
                value: date
            }, !0), this.strictMode && !date && "" === this.inputElement.value && this.setProperties({
                value: null
            }, !0), isNaN(+this.value) && this.setProperties({
                value: null
            }, !0), isNullOrUndefined(this.value) && (this.currentDate = new Date(new Date().setHours(0, 0, 0, 0)));
        }, DatePicker.prototype.createCalendar = function() {
            var _this = this;
            this.popupWrapper = createElement("div", {
                className: "e-datepicker e-popup-wrapper"
            }), isNullOrUndefined(this.cssClass) || this.popupWrapper.classList.add(this.cssClass), 
            document.body.appendChild(this.popupWrapper), Browser.isDevice && (this.modelHeader(), 
            this.modal = createElement("div"), this.modal.className = "e-datepicker e-date-modal", 
            document.body.className += " e-date-overflow", this.modal.style.display = "block", 
            document.body.appendChild(this.modal)), this.calendarElement.querySelector("table tbody").className = "", 
            this.popupObj = new Popup(this.popupWrapper, {
                content: this.calendarElement,
                relateTo: Browser.isDevice ? document.body : this.inputWrapper.container,
                position: Browser.isDevice ? {
                    X: "center",
                    Y: "center"
                } : {
                    X: "left",
                    Y: "bottom"
                },
                offsetY: 4,
                targetType: "container",
                enableRtl: this.enableRtl,
                zIndex: this.zIndex,
                collision: Browser.isDevice ? {
                    X: "fit",
                    Y: "fit"
                } : {
                    X: "flip",
                    Y: "flip"
                },
                open: function() {
                    "datetimepicker" !== _this.getModuleName() && (document.activeElement === _this.inputElement || Browser.isDevice || (_this.calendarElement.children[1].firstElementChild.focus(), 
                    _this.calendarKeyboardModules = new KeyboardEvents(_this.calendarElement.children[1].firstElementChild, {
                        eventName: "keydown",
                        keyAction: _this.CalendarKeyActionHandle.bind(_this),
                        keyConfigs: _this.calendarKeyConfigs
                    }), _this.calendarKeyboardModules = new KeyboardEvents(_this.inputWrapper.container.children[_this.index], {
                        eventName: "keydown",
                        keyAction: _this.CalendarKeyActionHandle.bind(_this),
                        keyConfigs: _this.calendarKeyConfigs
                    })));
                },
                close: function() {
                    Browser.isDevice || _this.isDateIconClicked && _this.inputWrapper.container.children[_this.index].focus(), 
                    _this.value && _this.disabledDates(), _this.popupObj.destroy(), detach(_this.popupWrapper), 
                    _this.popupObj = _this.popupWrapper = null, _this.setAriaAttributes();
                }
            }), this.popupObj.element.classList.add(this.cssClass), this.setAriaAttributes();
        }, DatePicker.prototype.modelHeader = function() {
            var modelHeader = createElement("div", {
                className: "e-model-header"
            }), yearHeading = createElement("h1", {
                className: "e-model-year"
            }), h2 = createElement("div"), daySpan = createElement("span", {
                className: "e-model-day"
            }), monthSpan = createElement("span", {
                className: "e-model-month"
            });
            yearHeading.textContent = "" + this.globalize.formatDate(this.value || new Date(), {
                format: "y",
                skeleton: "dateTime"
            }), daySpan.textContent = this.globalize.formatDate(this.value || new Date(), {
                format: "E",
                skeleton: "dateTime"
            }) + ", ", monthSpan.textContent = "" + this.globalize.formatDate(this.value || new Date(), {
                format: "MMM d",
                skeleton: "dateTime"
            }), modelHeader.appendChild(yearHeading), h2.appendChild(daySpan), h2.appendChild(monthSpan), 
            modelHeader.appendChild(h2), this.calendarElement.insertBefore(modelHeader, this.calendarElement.firstElementChild);
        }, DatePicker.prototype.changeTrigger = function() {
            this.inputElement.value !== this.previousEleValue && (this.previousDate && this.previousDate.valueOf()) !== (this.value && this.value.valueOf()) && (this.changedArgs.value = this.value, 
            this.trigger("change", this.changedArgs), this.previousEleValue = this.inputElement.value, 
            this.previousDate = new Date("" + this.value));
        }, DatePicker.prototype.navigatedEvent = function() {
            this.trigger("navigated", this.navigatedArgs);
        }, DatePicker.prototype.changeEvent = function(e) {
            this.selectCalendar(e), this.changedArgs.event = e, this.trigger("change", this.changedArgs), 
            this.previousDate = this.value;
        }, DatePicker.prototype.selectCalendar = function(e) {
            var date, tempFormat;
            tempFormat = "datetimepicker" === this.getModuleName() && isNullOrUndefined(this.format) ? this.dateTimeFormat : this.format, 
            this.value && (date = "datetimepicker" === this.getModuleName() ? this.globalize.formatDate(this.changedArgs.value, {
                format: tempFormat,
                type: "dateTime",
                skeleton: "yMd"
            }) : this.globalize.formatDate(this.changedArgs.value, {
                format: this.format,
                type: "dateTime",
                skeleton: "yMd"
            })), isNullOrUndefined(date) || Input.setValue(date, this.inputElement, this.floatLabelType, this.showClearButton), 
            this.hide(), this.previousEleValue = this.inputElement.value, this.errorClass();
        }, DatePicker.prototype.isCalendar = function() {
            return !(!this.popupWrapper || !this.popupWrapper.classList.contains("e-popup-wrapper"));
        }, DatePicker.prototype.setWidth = function(width) {
            this.inputWrapper.container.style.width = "number" == typeof width ? formatUnit(this.width) : "string" == typeof width ? this.width : "100%";
        }, DatePicker.prototype.show = function() {
            var outOfRange, prevent = !0;
            isNullOrUndefined(this.value) || +this.value >= +this.min && +this.value <= +this.max ? outOfRange = this.value || null : (outOfRange = new Date("" + this.value), 
            this.setProperties({
                value: null
            }, !0)), this.isCalendar() || (_super.prototype.render.call(this), this.setProperties({
                value: outOfRange || null
            }, !0), this.previousDate = outOfRange, this.createCalendar()), this.preventArgs = {
                preventDefault: function() {
                    prevent = !1;
                }
            };
            var args = {
                popup: this.popupObj
            };
            if (merge(args, this.preventArgs), this.trigger("open", args), prevent) {
                addClass(this.inputWrapper.buttons, "e-active"), document.body.appendChild(this.popupObj.element), 
                this.popupObj.refreshPosition(this.inputElement);
                var openAnimation = {
                    name: "FadeIn",
                    duration: Browser.isDevice ? 0 : 300
                };
                this.popupObj.show(new Animation(openAnimation)), this.setAriaAttributes();
            } else detach(this.popupWrapper), this.popupObj.destroy(), this.popupWrapper = this.popupObj = null;
            EventHandler.add(document, "mousedown touchstart", this.documentHandler, this);
        }, DatePicker.prototype.hide = function() {
            var args = {
                popup: this.popupObj
            };
            this.preventArgs = {
                preventDefault: function() {
                    prevent = !1;
                }
            };
            var prevent = !0;
            removeClass(this.inputWrapper.buttons, "e-active"), removeClass([ document.body ], "e-date-overflow"), 
            merge(args, this.preventArgs), this.trigger("close", args), this.isCalendar() && prevent && (this.popupObj.hide(), 
            this.keyboardModule.destroy(), removeClass(this.inputWrapper.buttons, "e-active")), 
            this.setAriaAttributes(), this.previousEleValue = this.inputElement.value, Browser.isDevice && this.modal && (this.modal.style.display = "none", 
            this.modal.outerHTML = "", this.modal = null), EventHandler.remove(document, "mousedown touchstart", this.documentHandler);
        }, DatePicker.prototype.focusIn = function(triggerEvent) {
            this.inputElement.focus(), addClass([ this.inputWrapper.container ], [ "e-input-focus" ]), 
            this.trigger("focus");
        }, DatePicker.prototype.focusOut = function() {
            this.inputElement.blur(), removeClass([ this.inputWrapper.container ], [ "e-input-focus" ]), 
            this.trigger("blur");
        }, DatePicker.prototype.currentView = function() {
            var currentView;
            return this.calendarElement && (currentView = _super.prototype.currentView.call(this)), 
            currentView;
        }, DatePicker.prototype.navigateTo = function(view, date) {
            this.calendarElement && _super.prototype.navigateTo.call(this, view, date);
        }, DatePicker.prototype.destroy = function() {
            _super.prototype.destroy.call(this), this.keyboardModules.destroy(), this.popupObj && this.popupObj.element.classList.contains("e-popup") && _super.prototype.destroy.call(this);
            var ariaAttrs = {
                "aria-live": "assertive",
                "aria-atomic": "true",
                "aria-haspopup": "true",
                "aria-activedescendant": "null",
                "aria-owns": this.inputElement.id + "_options",
                "aria-expanded": "false",
                role: "combobox",
                autocomplete: "off"
            };
            Input.removeAttributes(ariaAttrs, this.inputElement), this.isCalendar() && (detach(this.popupWrapper), 
            this.popupObj = this.popupWrapper = null, this.keyboardModule.destroy()), EventHandler.remove(this.inputElement, "blur", this.inputBlurHandler), 
            EventHandler.remove(this.inputElement, "focus", this.inputFocusHandler), this.inputWrapper.container.insertAdjacentElement("afterend", this.inputEleCopy), 
            removeClass([ this.inputElement ], [ "e-datepicker", "e-rtl", "e-input" ]), removeClass([ this.inputWrapper.container ], "e-date-wrapper"), 
            detach(this.inputWrapper.container);
        }, DatePicker.prototype.preRender = function() {
            this.inputEleCopy = this.element, this.inputElement = this.element, this.index = this.showClearButton ? 2 : 1;
            var ej2Instance = getValue("ej2_instances", this.element);
            if (this.ngTag = null, "EJS-DATEPICKER" === this.element.tagName || "EJS-DATETIMEPICKER" === this.element.tagName) {
                this.ngTag = this.element.tagName;
                for (var inputElement = createElement("input"), index = 0; index < this.element.attributes.length; index++) inputElement.setAttribute(this.element.attributes[index].nodeName, this.element.attributes[index].nodeValue), 
                inputElement.innerHTML = this.element.innerHTML;
                this.element.parentNode.appendChild(inputElement), this.element.parentNode.removeChild(this.element), 
                this.inputElement = inputElement, setValue("ej2_instances", ej2Instance, this.inputElement);
            }
            this.element.getAttribute("id") ? this.inputElement.id = this.element.getAttribute("id") : "datetimepicker" === this.getModuleName() ? (this.inputElement.id = getUniqueID("ej2-datetimepicker"), 
            attributes(this.element, {
                id: this.inputElement.id
            })) : (this.inputElement.id = getUniqueID("ej2-datepicker"), attributes(this.element, {
                id: this.inputElement.id
            })), this.checkHtmlAttributes(), _super.prototype.preRender.call(this);
        }, DatePicker.prototype.checkHtmlAttributes = function() {
            this.globalize = new Internationalization(this.locale);
            var options;
            options = "datetimepicker" === this.getModuleName() ? {
                format: isNullOrUndefined(this.format) ? this.dateTimeFormat : this.format,
                type: "dateTime",
                skeleton: "yMd"
            } : {
                format: this.format,
                type: "dateTime",
                skeleton: "yMd"
            };
            for (var _i = 0, attributes_1 = [ "value", "min", "max", "disabled", "readonly", "style", "name", "placeholder", "type" ]; _i < attributes_1.length; _i++) {
                var prop = attributes_1[_i];
                if (!isNullOrUndefined(this.inputElement.getAttribute(prop))) switch (prop) {
                  case "disabled":
                    var enabled = "disabled" === this.inputElement.getAttribute(prop) || "" === this.inputElement.getAttribute(prop);
                    this.setProperties({
                        enabled: enabled
                    }, !0), enabled || this.inputElement.setAttribute("aria-disabled", "true");
                    break;

                  case "readonly":
                    var readonly = "readonly" === this.inputElement.getAttribute(prop) || "" === this.inputElement.getAttribute(prop);
                    this.setProperties({
                        readonly: readonly
                    }, !0);
                    break;

                  case "placeholder":
                    if (null === this.placeholder) {
                        this.inputElement.getAttribute(prop);
                        this.setProperties({
                            placeholder: this.inputElement.getAttribute(prop)
                        }, !0);
                    }
                    break;

                  case "style":
                    this.inputElement.setAttribute("style", "" + this.inputElement.getAttribute(prop));
                    break;

                  case "name":
                    this.inputElement.setAttribute("name", "" + this.inputElement.getAttribute(prop));
                    break;

                  case "value":
                    if (!this.value) {
                        var value = this.inputElement.getAttribute(prop);
                        this.setProperties(setValue(prop, this.globalize.parseDate(value, options), {}), !0);
                    }
                    break;

                  case "min":
                    +this.min == +new Date(1900, 0, 1) && this.setProperties(setValue(prop, this.globalize.parseDate(this.inputElement.getAttribute(prop)), {}), !0);
                    break;

                  case "max":
                    +this.max == +new Date(2099, 11, 31) && this.setProperties(setValue(prop, this.globalize.parseDate(this.inputElement.getAttribute(prop)), {}), !0);
                    break;

                  case "type":
                    "text" !== this.inputElement.getAttribute(prop) && this.inputElement.setAttribute("type", "text");
                }
            }
        }, DatePicker.prototype.getModuleName = function() {
            return "datepicker";
        }, DatePicker.prototype.disabledDates = function() {
            var valueCopy = new Date("" + this.value), previousValCopy = this.previousDate;
            _super.prototype.render.call(this), this.previousDate = previousValCopy;
            var dateIdString = '*[id^="/id"]'.replace("/id", "" + (valueCopy && +valueCopy));
            this.strictMode || this.setProperties({
                value: valueCopy
            }, !0), isNullOrUndefined(this.calendarElement.querySelectorAll(dateIdString)[0]) || this.calendarElement.querySelectorAll(dateIdString)[0].classList.contains("e-disabled") && (this.strictMode || (this.setProperties({
                value: null
            }, !0), this.currentDate = new Date(new Date().setHours(0, 0, 0, 0))));
            var inputVal;
            inputVal = "datetimepicker" === this.getModuleName() ? this.globalize.formatDate(valueCopy, {
                format: isNullOrUndefined(this.format) ? this.dateTimeFormat : this.format,
                type: "dateTime",
                skeleton: "yMd"
            }) : this.globalize.formatDate(valueCopy, {
                format: this.format,
                type: "dateTime",
                skeleton: "yMd"
            }), Input.setValue(inputVal, this.inputElement, this.floatLabelType, this.showClearButton);
        }, DatePicker.prototype.setAriaAttributes = function() {
            this.isCalendar() ? (Input.addAttributes({
                "aria-expanded": "true"
            }, this.inputElement), attributes(this.inputElement, {
                "aria-activedescendant": "" + this.setActiveDescendant()
            })) : (Input.addAttributes({
                "aria-expanded": "false"
            }, this.inputElement), attributes(this.inputElement, {
                "aria-activedescendant": "null"
            }));
        }, DatePicker.prototype.errorClass = function() {
            !isNullOrUndefined(this.value) && !(+this.value >= +this.min && +this.value <= +this.max) || !this.strictMode && "" !== this.inputElement.value && isNullOrUndefined(this.value) ? addClass([ this.inputWrapper.container ], "e-error") : removeClass([ this.inputWrapper.container ], "e-error");
        }, DatePicker.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var options = {
                format: this.format,
                type: "dateTime",
                skeleton: "yMd"
            }, _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "value":
                    "string" == typeof newProp.value && (newProp.value = this.globalize.parseDate(newProp.value, options)), 
                    this.setProperties({
                        value: newProp.value
                    }, !0), this.previousEleValue = this.inputElement.value, isNullOrUndefined(this.value) && (Input.setValue("", this.inputElement, this.floatLabelType, this.showClearButton), 
                    this.currentDate = new Date(new Date().setHours(0, 0, 0, 0))), this.updateInput(), 
                    this.changeTrigger();
                    break;

                  case "format":
                    this.updateInput();
                    break;

                  case "placeholder":
                    Input.setPlaceholder(this.placeholder, this.inputElement);
                    break;

                  case "readonly":
                    Input.setReadonly(this.readonly, this.inputElement);
                    break;

                  case "enabled":
                    Input.setEnabled(this.enabled, this.inputElement), this.bindEvents();
                    break;

                  case "locale":
                    this.globalize = new Internationalization(this.locale), this.l10n.setLocale(this.locale), 
                    this.setProperties({
                        placeholder: this.l10n.getConstant("placeholder")
                    }, !0), Input.setPlaceholder(this.placeholder, this.inputElement), this.updateInput();
                    break;

                  case "enableRtl":
                    Input.setEnableRtl(this.enableRtl, [ this.inputWrapper.container ]);
                    break;

                  case "zIndex":
                    this.setProperties({
                        zIndex: newProp.zIndex
                    }, !0);
                    break;

                  case "cssClass":
                    Input.setCssClass(newProp.cssClass, [ this.inputWrapper.container ]), this.popupWrapper && addClass([ this.popupWrapper ], [ newProp.cssClass ]);
                    break;

                  case "strictMode":
                    this.updateInput();
                    break;

                  case "width":
                    this.setWidth(newProp.width);
                    break;

                  default:
                    this.calendarElement && _super.prototype.onPropertyChanged.call(this, newProp, oldProp);
                }
                this.hide();
            }
        }, __decorate$1$6([ Property(null) ], DatePicker.prototype, "width", void 0), __decorate$1$6([ Property(null) ], DatePicker.prototype, "cssClass", void 0), 
        __decorate$1$6([ Property(!1) ], DatePicker.prototype, "strictMode", void 0), __decorate$1$6([ Property(null) ], DatePicker.prototype, "format", void 0), 
        __decorate$1$6([ Property(!0) ], DatePicker.prototype, "enabled", void 0), __decorate$1$6([ Property(!0) ], DatePicker.prototype, "showClearButton", void 0), 
        __decorate$1$6([ Property(1e3) ], DatePicker.prototype, "zIndex", void 0), __decorate$1$6([ Property(!1) ], DatePicker.prototype, "readonly", void 0), 
        __decorate$1$6([ Property(null) ], DatePicker.prototype, "placeholder", void 0), 
        __decorate$1$6([ Property("Never") ], DatePicker.prototype, "floatLabelType", void 0), 
        __decorate$1$6([ Event() ], DatePicker.prototype, "open", void 0), __decorate$1$6([ Event() ], DatePicker.prototype, "close", void 0), 
        __decorate$1$6([ Event() ], DatePicker.prototype, "blur", void 0), __decorate$1$6([ Event() ], DatePicker.prototype, "focus", void 0), 
        __decorate$1$6([ Event() ], DatePicker.prototype, "created", void 0), __decorate$1$6([ Event() ], DatePicker.prototype, "destroyed", void 0), 
        DatePicker = __decorate$1$6([ NotifyPropertyChanges ], DatePicker);
    }(Calendar$1);
    (function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
    })(), cssClass.li, function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
    }(), new Date().getDate(), new Date().getMonth(), new Date().getFullYear(), cssClass.li;
    !function(TimePickerBase) {
        (TimePickerBase$1 || (TimePickerBase$1 = {})).createListItems = function(min, max, globalize, timeFormat, step) {
            var start, end, interval = 6e4 * step, listItems = [], timeCollections = [];
            for (start = +min.setMilliseconds(0), end = +max.setMilliseconds(0); end >= start; ) timeCollections.push(start), 
            listItems.push(globalize.formatDate(new Date(start), {
                format: timeFormat,
                type: "time"
            })), start += interval;
            return {
                collection: timeCollections,
                list: ListBase.createList(listItems, null, !0)
            };
        };
    }();
    var tempExcludeDate, maxOccurrence, tempViewDate, Theme, __extends$4$4 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$4$4 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, DAY$1$1 = new Date().getDate(), MONTH$2$1 = new Date().getMonth(), YEAR$2$1 = new Date().getFullYear(), HOUR$1 = new Date().getHours(), MINUTE$1 = new Date().getMinutes(), SECOND$2 = new Date().getSeconds(), MILLISECOND$1 = new Date().getMilliseconds(), ROOT$4$1 = "e-datetimepicker", LISTCLASS$2$1 = cssClass.li, DateTimePicker$1 = function(_super) {
        function DateTimePicker(options, element) {
            var _this = _super.call(this, options, element) || this;
            return _this.valueWithMinutes = null, _this.previousDateTime = null, _this;
        }
        return __extends$4$4(DateTimePicker, _super), DateTimePicker.prototype.focusIn = function() {
            this.inputElement.focus(), addClass([ this.inputWrapper.container ], "e-input-focus");
        }, DateTimePicker.prototype.focusOut = function() {
            this.isTimePopupOpen() ? this.inputElement.focus() : (this.inputElement.blur(), 
            removeClass([ this.inputWrapper.container ], "e-input-focus"), this.closePopup());
        }, DateTimePicker.prototype.destroy = function() {
            this.popupObject && this.popupObject.element.classList.contains("e-popup") && (this.dateTimeWrapper = void 0, 
            this.liCollections = this.timeCollections = [], isNullOrUndefined(this.rippleFn) || this.rippleFn());
            var ariaAttribute = {
                "aria-live": "assertive",
                "aria-atomic": "true",
                "aria-haspopup": "true",
                "aria-activedescendant": "null",
                "aria-owns": this.inputElement.id + "_options",
                "aria-expanded": "false",
                role: "combobox",
                autocomplete: "off"
            };
            Input.removeAttributes(ariaAttribute, this.inputElement), this.isCalendar() && (detach(this.popupWrapper), 
            this.popupObject = this.popupWrapper = null, this.keyboardHandler.destroy()), this.unBindInputEvents(), 
            this.inputWrapper.container.parentElement.appendChild(this.cloneElement), removeClass([ this.inputElement ], [ ROOT$4$1, "e-rtl" ]), 
            removeClass([ this.cloneElement ], [ ROOT$4$1, "e-control" ]), removeClass([ this.inputWrapper.container ], "e-date-wrapper"), 
            remove(this.inputWrapper.container);
        }, DateTimePicker.prototype.render = function() {
            this.timekeyConfigure = {
                enter: "enter",
                escape: "escape",
                end: "end",
                tab: "tab",
                home: "home",
                down: "downarrow",
                up: "uparrow",
                left: "leftarrow",
                right: "rightarrow",
                open: "alt+downarrow",
                close: "alt+uparrow"
            }, this.valueWithMinutes = null, this.previousDateTime = null, this.cloneElement = this.element.cloneNode(!0), 
            this.dateTimeFormat = this.cldrDateTimeFormat(), this.initValue = this.value, this.checkAttributes();
            var localeText = {
                placeholder: this.placeholder
            };
            this.l10n = new L10n("datetimepicker", localeText, this.locale), this.setProperties({
                placeholder: this.placeholder || this.l10n.getConstant("placeholder")
            }, !0), _super.prototype.render.call(this), this.createInputElement(), this.bindInputEvents(), 
            this.setValue();
        }, DateTimePicker.prototype.setValue = function() {
            if (this.initValue = this.validateMinMaxRange(this.value), !this.strictMode && this.isDateObject(this.initValue)) {
                var value = this.validateMinMaxRange(this.initValue);
                this.inputElement.value = this.getFormattedValue(value), this.setProperties({
                    value: value
                }, !0);
            } else isNullOrUndefined(this.value) && (this.initValue = null, this.setProperties({
                value: null
            }, !0));
            this.valueWithMinutes = this.value, _super.prototype.updateInput.call(this);
        }, DateTimePicker.prototype.validateMinMaxRange = function(value) {
            var result = value;
            return this.isDateObject(value) ? result = this.validateValue(value) : +this.min > +this.max && this.disablePopupButton(!0), 
            this.checkValidState(result), result;
        }, DateTimePicker.prototype.checkValidState = function(value) {
            this.isValidState = !0, this.strictMode || (+value > +this.max || +value < +this.min) && (this.isValidState = !1), 
            this.checkErrorState();
        }, DateTimePicker.prototype.checkErrorState = function() {
            this.isValidState ? removeClass([ this.inputWrapper.container ], "e-error") : addClass([ this.inputWrapper.container ], "e-error"), 
            attributes(this.inputElement, {
                "aria-invalid": this.isValidState ? "false" : "true"
            });
        }, DateTimePicker.prototype.validateValue = function(value) {
            var dateVal = value;
            return this.strictMode ? +this.min > +this.max ? (this.disablePopupButton(!0), dateVal = this.max) : +value < +this.min ? dateVal = this.min : +value > +this.max && (dateVal = this.max) : +this.min > +this.max && (this.disablePopupButton(!0), 
            dateVal = value), dateVal;
        }, DateTimePicker.prototype.disablePopupButton = function(isDisable) {
            isDisable ? (addClass([ this.inputWrapper.buttons[0], this.timeIcon ], "e-disabled"), 
            this.hide()) : removeClass([ this.inputWrapper.buttons[0], this.timeIcon ], "e-disabled");
        }, DateTimePicker.prototype.getFormattedValue = function(value) {
            if (isNullOrUndefined(value)) return null;
            var dateOptions = {
                format: this.cldrDateTimeFormat(),
                type: "dateTime",
                skeleton: "yMd"
            };
            return this.globalize.formatDate(value, dateOptions);
        }, DateTimePicker.prototype.isDateObject = function(value) {
            return !isNullOrUndefined(value) && !isNaN(+value);
        }, DateTimePicker.prototype.createInputElement = function() {
            removeClass([ this.inputElement ], "e-datepicker"), removeClass([ this.inputWrapper.container ], "e-date-wrapper"), 
            addClass([ this.inputWrapper.container ], "e-datetime-wrapper"), addClass([ this.inputElement ], ROOT$4$1), 
            this.renderTimeIcon();
        }, DateTimePicker.prototype.renderTimeIcon = function() {
            this.timeIcon = Input.appendSpan("e-input-group-icon e-time-icon e-icons", this.inputWrapper.container);
        }, DateTimePicker.prototype.bindInputEvents = function() {
            EventHandler.add(this.timeIcon, "mousedown touchstart", this.timeHandler, this), 
            EventHandler.add(this.inputWrapper.buttons[0], "mousedown touchstart", this.dateHandler, this), 
            EventHandler.add(this.inputElement, "blur", this.focusOut, this), EventHandler.add(this.inputElement, "focus", this.focusIn, this), 
            this.keyboardHandler = new KeyboardEvents(this.inputElement, {
                eventName: "keydown",
                keyAction: this.inputKeyAction.bind(this),
                keyConfigs: this.keyConfigs
            });
        }, DateTimePicker.prototype.unBindInputEvents = function() {
            EventHandler.remove(this.timeIcon, "mousedown touchstart", this.timeHandler), EventHandler.remove(this.inputWrapper.buttons[0], "mousedown touchstart", this.dateHandler), 
            EventHandler.remove(this.inputElement, "blur", this.focusOut), EventHandler.remove(this.inputElement, "focus", this.focusIn), 
            this.keyboardHandler && this.keyboardHandler.destroy();
        }, DateTimePicker.prototype.cldrTimeFormat = function() {
            return this.isNullOrEmpty(this.timeFormat) ? "en" === this.locale || "en-US" === this.locale ? getValue("timeFormats.short", getDefaultDateObject()) : this.getCultureTimeObject(cldrData, "" + this.locale) : this.timeFormat;
        }, DateTimePicker.prototype.cldrDateTimeFormat = function() {
            var dateFormat = new Internationalization(this.locale).getDatePattern({
                skeleton: "yMd"
            });
            return this.isNullOrEmpty(this.format) ? dateFormat + " " + this.getCldrFormat("time") : this.format;
        }, DateTimePicker.prototype.getCldrFormat = function(type) {
            return "en" === this.locale || "en-US" === this.locale ? getValue("timeFormats.short", getDefaultDateObject()) : this.getCultureTimeObject(cldrData, "" + this.locale);
        }, DateTimePicker.prototype.isNullOrEmpty = function(value) {
            return !!(isNullOrUndefined(value) || "string" == typeof value && "" === value.trim());
        }, DateTimePicker.prototype.getCultureTimeObject = function(ld, c) {
            return getValue("main." + this.locale + ".dates.calendars.gregorian.timeFormats.short", ld);
        }, DateTimePicker.prototype.timeHandler = function(e) {
            e.currentTarget === this.timeIcon && e.preventDefault(), this.enabled && !this.readonly && (_super.prototype.hide.call(this), 
            this.isTimePopupOpen() ? this.closePopup() : (Browser.isDevice || this.inputElement.focus(), 
            this.popupCreation("time")));
        }, DateTimePicker.prototype.dateHandler = function(e) {
            "datetimepicker" === this.getModuleName() && e.currentTarget === this.inputWrapper.buttons[0] && e.preventDefault(), 
            this.enabled && !this.readonly && (this.closePopup(), isNullOrUndefined(this.popupWrapper) || this.popupCreation("date"));
        }, DateTimePicker.prototype.show = function(type) {
            "time" === type ? (this.isDatePopupOpen() && this.hide(), this.popupCreation("time")) : (this.isTimePopupOpen() && this.hide(), 
            _super.prototype.show.call(this), this.popupCreation("date")), this.trigger("open");
        }, DateTimePicker.prototype.toggle = function() {
            this.isDatePopupOpen() ? (_super.prototype.hide.call(this), this.popupCreation("time")) : this.isTimePopupOpen() ? (this.hide(), 
            _super.prototype.show.call(this), this.popupCreation("date")) : this.show();
        }, DateTimePicker.prototype.listCreation = function() {
            var value = isNullOrUndefined(this.value) ? "" !== this.inputElement.value ? this.globalize.parseDate(this.inputElement.value, {
                format: this.cldrDateTimeFormat(),
                type: "datetime"
            }) : new Date() : this.value;
            this.valueWithMinutes = value, this.listWrapper = createElement("div", {
                className: "e-content",
                attrs: {
                    tabindex: "0"
                }
            });
            var min = this.startTime(value), max = this.endTime(value), listDetails = TimePickerBase$1.createListItems(min, max, this.globalize, this.cldrTimeFormat(), this.step);
            this.timeCollections = listDetails.collection, this.listTag = listDetails.list, 
            attributes(this.listTag, {
                role: "listbox",
                "aria-hidden": "false",
                id: this.inputElement.id + "_options"
            }), append([ listDetails.list ], this.listWrapper), this.wireTimeListEvents();
            var rippleModel = {
                duration: 300,
                selector: "." + LISTCLASS$2$1
            };
            this.rippleFn = rippleEffect(this.listWrapper, rippleModel), this.liCollections = this.listWrapper.querySelectorAll("." + LISTCLASS$2$1);
        }, DateTimePicker.prototype.popupCreation = function(type) {
            "date" === type ? (addClass([ this.popupWrapper ], "e-datetimepopup-wrapper"), attributes(this.popupWrapper, {
                id: this.inputElement.id + "_datepopup"
            }), this.trigger("open", this.popupWrapper)) : (this.dateTimeWrapper = createElement("div", {
                className: ROOT$4$1 + " e-popup",
                attrs: {
                    id: this.inputElement.id + "_timepopup",
                    style: "visibility:hidden ; display:block"
                }
            }), isNullOrUndefined(this.cssClass) || this.dateTimeWrapper.classList.add(this.cssClass), 
            !isNullOrUndefined(this.step) && this.step > 0 && (this.listCreation(), append([ this.listWrapper ], this.dateTimeWrapper)), 
            document.body.appendChild(this.dateTimeWrapper), this.addTimeSelection(), this.renderPopup(), 
            this.setTimeScrollPosition(), this.openPopup(), this.popupObject.refreshPosition(this.inputElement));
        }, DateTimePicker.prototype.openPopup = function() {
            this.trigger("open");
            var openAnimation = {
                name: "FadeIn",
                duration: 100
            };
            this.popupObject.show(new Animation(openAnimation)), addClass([ this.inputWrapper.container ], [ "e-icon-anim", "e-input-focus" ]), 
            attributes(this.inputElement, {
                "aria-expanded": "true"
            }), EventHandler.add(document, "mousedown touchstart", this.documentClickHandler, this);
        }, DateTimePicker.prototype.documentClickHandler = function(event) {
            var target = event.target;
            closest(target, "#" + (this.popupObject && this.popupObject.element.id)) || target === this.inputElement || target === this.timeIcon || target === this.inputWrapper.container || this.isTimePopupOpen() && this.hide();
        }, DateTimePicker.prototype.isTimePopupOpen = function() {
            return !(!this.dateTimeWrapper || !this.dateTimeWrapper.classList.contains("" + ROOT$4$1));
        }, DateTimePicker.prototype.isDatePopupOpen = function() {
            return !(!this.popupWrapper || !this.popupWrapper.classList.contains("e-datetimepopup-wrapper"));
        }, DateTimePicker.prototype.renderPopup = function() {
            var _this = this;
            this.containerStyle = this.inputWrapper.container.getBoundingClientRect(), Browser.isDevice && (this.timeModal = createElement("div"), 
            this.timeModal.className = ROOT$4$1 + " e-time-modal", document.body.className += " e-time-overflow", 
            this.timeModal.style.display = "block", document.body.appendChild(this.timeModal));
            this.popupObject = new Popup(this.dateTimeWrapper, {
                width: this.setPopupWidth(),
                zIndex: this.zIndex,
                targetType: "container",
                collision: Browser.isDevice ? {
                    X: "fit",
                    Y: "fit"
                } : {
                    X: "flip",
                    Y: "flip"
                },
                relateTo: Browser.isDevice ? document.body : this.inputWrapper.container,
                position: Browser.isDevice ? {
                    X: "center",
                    Y: "center"
                } : {
                    X: "left",
                    Y: "bottom"
                },
                enableRtl: this.enableRtl,
                offsetY: 4,
                open: function() {
                    _this.dateTimeWrapper.style.visibility = "visible", addClass([ _this.timeIcon ], "e-active"), 
                    Browser.isDevice || (_this.inputEvent = new KeyboardEvents(_this.inputWrapper.container, {
                        keyAction: _this.TimeKeyActionHandle.bind(_this),
                        keyConfigs: _this.timekeyConfigure,
                        eventName: "keydown"
                    }));
                },
                close: function() {
                    removeClass([ _this.timeIcon ], "e-active"), _this.unWireTimeListEvents(), _this.inputElement.setAttribute("aria-activedescendant", "null"), 
                    remove(_this.popupObject.element), _this.popupObject.destroy(), _this.dateTimeWrapper.innerHTML = "", 
                    _this.listWrapper = _this.dateTimeWrapper = null, _this.inputEvent && _this.inputEvent.destroy();
                }
            }), this.popupObject.element.style.maxHeight = "250px";
        }, DateTimePicker.prototype.setDimension = function(width) {
            return width = "number" == typeof width ? formatUnit(width) : "string" == typeof width ? width : "100%";
        }, DateTimePicker.prototype.setPopupWidth = function() {
            var width = this.setDimension(this.width);
            if (width.indexOf("%") > -1) {
                width = (this.containerStyle.width * parseFloat(width) / 100).toString() + "px";
            }
            return width;
        }, DateTimePicker.prototype.wireTimeListEvents = function() {
            EventHandler.add(this.listWrapper, "click", this.onMouseClick, this), Browser.isDevice || (EventHandler.add(this.listWrapper, "mouseover", this.onMouseOver, this), 
            EventHandler.add(this.listWrapper, "mouseout", this.onMouseLeave, this));
        }, DateTimePicker.prototype.unWireTimeListEvents = function() {
            this.listWrapper && (EventHandler.remove(this.listWrapper, "click", this.onMouseClick), 
            EventHandler.remove(document, "mousedown touchstart", this.documentClickHandler), 
            Browser.isDevice || (EventHandler.add(this.listWrapper, "mouseover", this.onMouseOver, this), 
            EventHandler.add(this.listWrapper, "mouseout", this.onMouseLeave, this)));
        }, DateTimePicker.prototype.onMouseOver = function(event) {
            var currentLi = closest(event.target, "." + LISTCLASS$2$1);
            this.setTimeHover(currentLi, "e-hover");
        }, DateTimePicker.prototype.onMouseLeave = function() {
            this.removeTimeHover("e-hover");
        }, DateTimePicker.prototype.setTimeHover = function(li, className) {
            this.enabled && this.isValidLI(li) && !li.classList.contains(className) && (this.removeTimeHover(className), 
            addClass([ li ], className));
        }, DateTimePicker.prototype.getPopupHeight = function() {
            var height = parseInt("250px", 10), popupHeight = this.dateTimeWrapper.getBoundingClientRect().height;
            return popupHeight > height ? height : popupHeight;
        }, DateTimePicker.prototype.changeEvent = function() {
            +this.previousDateTime != +this.value && (_super.prototype.changeEvent.call(this), 
            Browser.isDevice || this.inputElement.focus(), this.valueWithMinutes = this.value, 
            this.setInputValue("date"));
        }, DateTimePicker.prototype.updateValue = function() {
            this.setInputValue("time"), +this.previousDateTime != +this.value && (this.changedArgs.value = this.value, 
            this.addTimeSelection(), this.trigger("change", this.changedArgs), this.previousDateTime = this.value);
        }, DateTimePicker.prototype.setTimeScrollPosition = function() {
            var popupElement, popupHeight = this.getPopupHeight();
            if (popupElement = this.selectedElement, !isNullOrUndefined(popupElement)) {
                var nextEle = popupElement.nextElementSibling, height = nextEle ? nextEle.offsetTop : popupElement.offsetTop, liHeight = popupElement.getBoundingClientRect().height;
                height + popupElement.offsetTop > popupHeight ? this.dateTimeWrapper.scrollTop = nextEle ? height - (popupHeight / 2 + liHeight / 2) : height : this.dateTimeWrapper.scrollTop = 0;
            }
        }, DateTimePicker.prototype.setInputValue = function(type) {
            "date" === type ? (this.inputElement.value = this.getFormattedValue(this.getFullDateTime()), 
            this.setProperties({
                value: this.getFullDateTime()
            }, !0)) : (this.inputElement.value = this.getFormattedValue(new Date(this.timeCollections[this.activeIndex])), 
            this.setProperties({
                value: new Date(this.timeCollections[this.activeIndex])
            }, !0));
        }, DateTimePicker.prototype.getFullDateTime = function() {
            var value = null;
            return value = this.isDateObject(this.valueWithMinutes) ? this.combineDateTime(this.valueWithMinutes) : this.previousDate, 
            this.validateMinMaxRange(value);
        }, DateTimePicker.prototype.combineDateTime = function(value) {
            if (this.isDateObject(value)) {
                var day = this.previousDate.getDate(), month = this.previousDate.getMonth(), year = this.previousDate.getFullYear(), hour = value.getHours(), minutes = value.getMinutes(), seconds = value.getSeconds();
                return new Date(year, month, day, hour, minutes, seconds);
            }
            return this.previousDate;
        }, DateTimePicker.prototype.onMouseClick = function(event) {
            var target = event.target, li = this.selectedElement = closest(target, "." + LISTCLASS$2$1);
            li && li.classList.contains(LISTCLASS$2$1) && (this.timeValue = li.getAttribute("data-value"), 
            this.hide()), this.setSelection(li, event);
        }, DateTimePicker.prototype.setSelection = function(li, event) {
            if (this.isValidLI(li) && !li.classList.contains("e-active")) {
                li.getAttribute("data-value");
                this.selectedElement = li;
                var index = Array.prototype.slice.call(this.liCollections).indexOf(li);
                this.activeIndex = index, this.valueWithMinutes = new Date(this.timeCollections[this.activeIndex]), 
                addClass([ this.selectedElement ], "e-active"), this.selectedElement.setAttribute("aria-selected", "true"), 
                this.updateValue();
            }
        }, DateTimePicker.prototype.setTimeActiveClass = function() {
            var collections = isNullOrUndefined(this.dateTimeWrapper) ? this.listWrapper : this.dateTimeWrapper;
            if (!isNullOrUndefined(collections)) {
                var items = collections.querySelectorAll("." + LISTCLASS$2$1);
                if (items.length) for (var i = 0; i < items.length; i++) if (this.timeCollections[i] === +this.valueWithMinutes) {
                    items[i].setAttribute("aria-selected", "true"), this.selectedElement = items[i], 
                    this.activeIndex = i, this.setTimeActiveDescendant();
                    break;
                }
            }
        }, DateTimePicker.prototype.setTimeActiveDescendant = function() {
            isNullOrUndefined(this.selectedElement) ? attributes(this.inputElement, {
                "aria-activedescendant": "null"
            }) : attributes(this.inputElement, {
                "aria-activedescendant": this.selectedElement.getAttribute("id")
            });
        }, DateTimePicker.prototype.addTimeSelection = function() {
            this.selectedElement = null, this.removeTimeSelection(), this.setTimeActiveClass(), 
            isNullOrUndefined(this.selectedElement) || (addClass([ this.selectedElement ], "e-active"), 
            this.selectedElement.setAttribute("aria-selected", "true"));
        }, DateTimePicker.prototype.removeTimeSelection = function() {
            if (this.removeTimeHover("e-hover"), !isNullOrUndefined(this.dateTimeWrapper)) {
                var items = this.dateTimeWrapper.querySelectorAll(".e-active");
                items.length && (removeClass(items, "e-active"), items[0].removeAttribute("aria-selected"));
            }
        }, DateTimePicker.prototype.removeTimeHover = function(className) {
            var hoveredItem = this.getTimeHoverItem(className);
            hoveredItem && hoveredItem.length && removeClass(hoveredItem, className);
        }, DateTimePicker.prototype.getTimeHoverItem = function(className) {
            var hoveredItem, collections = isNullOrUndefined(this.dateTimeWrapper) ? this.listWrapper : this.dateTimeWrapper;
            return isNullOrUndefined(collections) || (hoveredItem = collections.querySelectorAll("." + className)), 
            hoveredItem;
        }, DateTimePicker.prototype.isValidLI = function(li) {
            return li && li.classList.contains(LISTCLASS$2$1) && !li.classList.contains("e-disabled");
        }, DateTimePicker.prototype.calculateStartEnd = function(value, range, method) {
            var day = value.getDate(), month = value.getMonth(), year = value.getFullYear(), hours = value.getHours(), minutes = value.getMinutes(), seconds = value.getSeconds(), milliseconds = value.getMilliseconds();
            return range ? "starttime" === method ? new Date(year, month, day, 0, 0, 0) : new Date(year, month, day, 23, 59, 59) : new Date(year, month, day, hours, minutes, seconds, milliseconds);
        }, DateTimePicker.prototype.startTime = function(date) {
            var tempStartValue, start, value, tempMin = this.min;
            return +(value = null === date ? new Date() : date).getDate() == +tempMin.getDate() && +value.getMonth() == +tempMin.getMonth() && +value.getFullYear() == +tempMin.getFullYear() || +new Date(value.getFullYear(), value.getMonth(), value.getDate()) <= +new Date(tempMin.getFullYear(), tempMin.getMonth(), tempMin.getDate()) ? (start = !1, 
            tempStartValue = this.min) : +value < +this.max && +value > +this.min ? (start = !0, 
            tempStartValue = value) : +value >= +this.max && (start = !0, tempStartValue = this.max), 
            this.calculateStartEnd(tempStartValue, start, "starttime");
        }, DateTimePicker.prototype.endTime = function(date) {
            var tempEndValue, end, value, tempMax = this.max;
            return +(value = null === date ? new Date() : date).getDate() == +tempMax.getDate() && +value.getMonth() == +tempMax.getMonth() && +value.getFullYear() == +tempMax.getFullYear() || +new Date(value.getUTCFullYear(), value.getMonth(), value.getDate()) >= +new Date(tempMax.getFullYear(), tempMax.getMonth(), tempMax.getDate()) ? (end = !1, 
            tempEndValue = this.max) : +value < +this.max && +value > +this.min ? (end = !0, 
            tempEndValue = value) : +value <= +this.min && (end = !0, tempEndValue = this.min), 
            this.calculateStartEnd(tempEndValue, end, "endtime");
        }, DateTimePicker.prototype.hide = function() {
            this.isDatePopupOpen() ? _super.prototype.hide.call(this) : this.isTimePopupOpen() && (this.closePopup(), 
            removeClass([ document.body ], "e-time-overflow"), Browser.isDevice && this.timeModal && (this.timeModal.style.display = "none", 
            this.timeModal.outerHTML = "", this.timeModal = null), this.setTimeActiveDescendant()), 
            this.trigger("close");
        }, DateTimePicker.prototype.closePopup = function() {
            if (this.isTimePopupOpen() && this.popupObject) {
                var animModel = {
                    name: "FadeOut",
                    duration: 100,
                    delay: 0
                };
                this.popupObject.hide(new Animation(animModel)), this.inputWrapper.container.classList.remove("e-icon-anim"), 
                attributes(this.inputElement, {
                    "aria-expanded": "false"
                }), EventHandler.remove(document, "mousedown touchstart", this.documentClickHandler);
            }
            Browser.isDevice && removeClass([ this.inputWrapper.container ], "e-input-focus");
        }, DateTimePicker.prototype.preRender = function() {
            _super.prototype.preRender.call(this);
        }, DateTimePicker.prototype.getProperty = function(date, val) {
            "min" === val ? this.setProperties({
                min: this.validateValue(date.min)
            }, !0) : this.setProperties({
                max: this.validateValue(date.max)
            }, !0);
        }, DateTimePicker.prototype.checkAttributes = function() {
            for (var value, _i = 0, attributes_1 = [ "style", "name", "step", "disabled", "readonly", "value", "min", "max", "placeholder", "type" ]; _i < attributes_1.length; _i++) {
                var prop = attributes_1[_i];
                if (!isNullOrUndefined(this.inputElement.getAttribute(prop))) switch (prop) {
                  case "name":
                    this.inputElement.setAttribute("name", this.inputElement.getAttribute(prop));
                    break;

                  case "step":
                    this.step = parseInt(this.inputElement.getAttribute(prop), 10);
                    break;

                  case "readonly":
                    var readonly = !isNullOrUndefined(this.inputElement.getAttribute(prop));
                    this.setProperties({
                        readonly: readonly
                    }, !0);
                    break;

                  case "placeholder":
                    this.placeholder = this.inputElement.getAttribute(prop);
                    break;

                  case "min":
                    value = new Date(this.inputElement.getAttribute(prop)), this.isNullOrEmpty(value) || isNaN(+value) || this.setProperties({
                        min: value
                    }, !0);
                    break;

                  case "disabled":
                    var enabled = isNullOrUndefined(this.inputElement.getAttribute(prop));
                    this.setProperties({
                        enabled: enabled
                    }, !0);
                    break;

                  case "max":
                    value = new Date(this.inputElement.getAttribute(prop)), this.isNullOrEmpty(value) || isNaN(+value) || this.setProperties({
                        max: value
                    }, !0);
                    break;

                  case "type":
                    "text" !== this.inputElement.getAttribute(prop) && this.inputElement.setAttribute("type", "text");
                }
            }
        }, DateTimePicker.prototype.getTimeActiveElement = function() {
            return isNullOrUndefined(this.dateTimeWrapper) ? null : this.dateTimeWrapper.querySelectorAll(".e-active");
        }, DateTimePicker.prototype.createDateObj = function(val) {
            return val instanceof Date ? val : null;
        }, DateTimePicker.prototype.getDateObject = function(text) {
            if (!this.isNullOrEmpty(text)) {
                var dateValue = this.createDateObj(text), value = this.valueWithMinutes, status_1 = !isNullOrUndefined(value);
                if (this.checkDateValue(dateValue)) {
                    var date = status_1 ? value.getDate() : DAY$1$1, month = status_1 ? value.getMonth() : MONTH$2$1, year = status_1 ? value.getFullYear() : YEAR$2$1, hour = status_1 ? value.getHours() : HOUR$1, minute = status_1 ? value.getMinutes() : MINUTE$1, second = status_1 ? value.getSeconds() : SECOND$2, millisecond = status_1 ? value.getMilliseconds() : MILLISECOND$1;
                    return new Date(year, month, date, hour, minute, second, millisecond);
                }
            }
            return null;
        }, DateTimePicker.prototype.findNextTimeElement = function(event) {
            var textVal = this.inputElement.value, value = isNullOrUndefined(this.valueWithMinutes) ? this.createDateObj(textVal) : this.getDateObject(this.valueWithMinutes), dateTimeVal = null, listCount = this.liCollections.length;
            if (!isNullOrUndefined(this.checkDateValue(value)) || !isNullOrUndefined(this.activeIndex)) {
                if ("home" === event.action) dateTimeVal = +this.createDateObj(new Date(this.timeCollections[0])), 
                this.activeIndex = 0; else if ("end" === event.action) dateTimeVal = +this.createDateObj(new Date(this.timeCollections[this.timeCollections.length - 1])), 
                this.activeIndex = this.timeCollections.length - 1; else if ("down" === event.action) {
                    for (var i = 0; i < listCount; i++) if (+value < this.timeCollections[i]) {
                        dateTimeVal = +this.createDateObj(new Date(this.timeCollections[i])), this.activeIndex = i;
                        break;
                    }
                } else for (i = listCount - 1; i >= 0; i--) if (+value > this.timeCollections[i]) {
                    dateTimeVal = +this.createDateObj(new Date(this.timeCollections[i])), this.activeIndex = i;
                    break;
                }
                this.selectedElement = this.liCollections[this.activeIndex], this.timeElementValue(isNullOrUndefined(dateTimeVal) ? null : new Date(dateTimeVal));
            }
        }, DateTimePicker.prototype.setTimeValue = function(date, value) {
            var time, val = this.validateMinMaxRange(value), newval = this.createDateObj(val);
            this.getFormattedValue(newval) !== (isNullOrUndefined(this.value) ? null : this.getFormattedValue(this.value)) ? (this.valueWithMinutes = isNullOrUndefined(newval) ? null : newval, 
            time = new Date(+this.valueWithMinutes)) : (this.strictMode && (date = newval), 
            this.valueWithMinutes = this.checkDateValue(date), time = new Date(+this.valueWithMinutes));
            var dateString = this.globalize.formatDate(time, {
                format: isNullOrUndefined(this.format) ? this.cldrDateTimeFormat() : this.format,
                type: "dateTime",
                skeleton: "yMd"
            });
            return !this.strictMode && isNullOrUndefined(time), Input.setValue(dateString, this.inputElement, this.floatLabelType, !1), 
            time;
        }, DateTimePicker.prototype.timeElementValue = function(value) {
            if (!isNullOrUndefined(this.checkDateValue(value)) && !this.isNullOrEmpty(value)) {
                var date = value instanceof Date ? value : this.getDateObject(value);
                return this.setTimeValue(date, value);
            }
            return null;
        }, DateTimePicker.prototype.timeKeyHandler = function(event) {
            if (!(isNullOrUndefined(this.step) || this.step <= 0)) {
                var listCount = this.timeCollections.length;
                if (isNullOrUndefined(this.getTimeActiveElement()) || 0 === this.getTimeActiveElement().length) this.liCollections.length > 0 && (isNullOrUndefined(this.value) && isNullOrUndefined(this.activeIndex) ? (this.activeIndex = 0, 
                this.selectedElement = this.liCollections[0], this.timeElementValue(new Date(this.timeCollections[0]))) : this.findNextTimeElement(event)); else {
                    var nextItemValue = void 0;
                    if (event.keyCode >= 37 && event.keyCode <= 40) {
                        var index = 40 === event.keyCode || 39 === event.keyCode ? ++this.activeIndex : --this.activeIndex;
                        this.activeIndex = index = this.activeIndex === listCount ? 0 : this.activeIndex, 
                        this.activeIndex = index = this.activeIndex < 0 ? listCount - 1 : this.activeIndex, 
                        nextItemValue = isNullOrUndefined(this.timeCollections[index]) ? this.timeCollections[0] : this.timeCollections[index];
                    } else "home" === event.action ? (this.activeIndex = 0, nextItemValue = this.timeCollections[0]) : "end" === event.action && (this.activeIndex = listCount - 1, 
                    nextItemValue = this.timeCollections[listCount - 1]);
                    this.selectedElement = this.liCollections[this.activeIndex], this.timeElementValue(new Date(nextItemValue));
                }
                this.isNavigate = !0, this.setTimeHover(this.selectedElement, "e-navigation"), this.setTimeActiveDescendant(), 
                !this.isTimePopupOpen() || null === this.selectedElement || event && "click" === event.type || this.setTimeScrollPosition();
            }
        }, DateTimePicker.prototype.TimeKeyActionHandle = function(event) {
            if (this.enabled) switch ("right" !== event.action && "left" !== event.action && "tab" !== event.action && event.preventDefault(), 
            event.action) {
              case "up":
              case "down":
              case "home":
              case "end":
                this.timeKeyHandler(event);
                break;

              case "enter":
                this.isNavigate ? (this.selectedElement = this.liCollections[this.activeIndex], 
                this.valueWithMinutes = new Date(this.timeCollections[this.activeIndex]), this.updateValue()) : this.updateValue(), 
                this.hide(), addClass([ this.inputWrapper.container ], "e-input-focus"), this.isNavigate = !1;
                break;

              case "escape":
                this.hide();
                break;

              default:
                this.isNavigate = !1;
            }
        }, DateTimePicker.prototype.inputKeyAction = function(event) {
            switch (event.action) {
              case "altDownArrow":
                this.strictModeUpdate(), this.updateInput(), this.toggle();
            }
        }, DateTimePicker.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                var prop = _a[_i];
                switch (prop) {
                  case "zIndex":
                    this.setProperties({
                        zIndex: newProp.zIndex
                    }, !0);
                    break;

                  case "value":
                    newProp.value = this.validateValue(newProp.value), this.inputElement.value = this.getFormattedValue(newProp.value), 
                    this.valueWithMinutes = newProp.value, this.setProperties({
                        value: newProp.value
                    }, !0), this.previousDateTime = new Date(this.inputElement.value), this.updateInput(), 
                    this.changeTrigger();
                    break;

                  case "min":
                  case "max":
                    this.getProperty(newProp, prop), this.updateInput();
                    break;

                  case "enableRtl":
                    Input.setEnableRtl(this.enableRtl, [ this.inputWrapper.container ]);
                    break;

                  case "cssClass":
                    Input.setCssClass(newProp.cssClass, [ this.inputWrapper.container ]), this.dateTimeWrapper && addClass([ this.dateTimeWrapper ], [ newProp.cssClass ]);
                    break;

                  case "locale":
                    this.globalize = new Internationalization(this.locale), this.l10n.setLocale(this.locale), 
                    this.setProperties({
                        placeholder: this.l10n.getConstant("placeholder")
                    }, !0), Input.setPlaceholder(this.l10n.getConstant("placeholder"), this.inputElement), 
                    this.dateTimeFormat = this.cldrDateTimeFormat(), _super.prototype.updateInput.call(this);
                    break;

                  case "format":
                    this.setProperties({
                        format: newProp.format
                    }, !0), this.setValue();
                    break;

                  case "placeholder":
                    Input.setPlaceholder(newProp.placeholder, this.inputElement), this.inputElement.setAttribute("aria-placeholder", newProp.placeholder);
                    break;

                  case "enabled":
                    Input.setEnabled(this.enabled, this.inputElement), this.bindEvents();
                    break;

                  case "strictMode":
                    this.updateInput();
                    break;

                  case "width":
                    this.setWidth(newProp.width);
                    break;

                  case "readonly":
                    Input.setReadonly(this.readonly, this.inputElement);
                    break;

                  default:
                    _super.prototype.onPropertyChanged.call(this, newProp, oldProp);
                }
                this.hide();
            }
        }, DateTimePicker.prototype.getModuleName = function() {
            return "datetimepicker";
        }, __decorate$4$4([ Property(null) ], DateTimePicker.prototype, "timeFormat", void 0), 
        __decorate$4$4([ Property(30) ], DateTimePicker.prototype, "step", void 0), __decorate$4$4([ Property(1e3) ], DateTimePicker.prototype, "zIndex", void 0), 
        __decorate$4$4([ Property(!1) ], DateTimePicker.prototype, "showClearButton", void 0), 
        __decorate$4$4([ Property(null) ], DateTimePicker.prototype, "placeholder", void 0), 
        __decorate$4$4([ Property(!1) ], DateTimePicker.prototype, "strictMode", void 0), 
        __decorate$4$4([ Event() ], DateTimePicker.prototype, "open", void 0), __decorate$4$4([ Event() ], DateTimePicker.prototype, "close", void 0), 
        __decorate$4$4([ Event() ], DateTimePicker.prototype, "blur", void 0), __decorate$4$4([ Event() ], DateTimePicker.prototype, "focus", void 0), 
        __decorate$4$4([ Event() ], DateTimePicker.prototype, "created", void 0), __decorate$4$4([ Event() ], DateTimePicker.prototype, "destroyed", void 0), 
        DateTimePicker = __decorate$4$4([ NotifyPropertyChanges ], DateTimePicker);
    }(DatePicker$1), MS_PER_DAY = 864e5, scrollWidth$1 = null, startDateCollection = {}, dayIndex = [ "SU", "MO", "TU", "WE", "TH", "FR", "SA" ], monthDay = [ 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31 ], DAYINDEX = [ "SU", "MO", "TU", "WE", "TH", "FR", "SA" ], MAXOCCURRENCE = 43, LEAPYEAR = 366, NORMALYEAR = 365, WEEKPOS = [ "first", "second", "third", "fourth", "last" ], TIMES = "summaryTimes", ON$1 = "summaryOn", EVERY = "every", UNTIL$1 = "summaryUntil", DAYS$1 = "summaryDay", WEEKS = "summaryWeek", MONTHS$1 = "summaryMonth", YEARS$1 = "summaryYear", DAYINDEXOBJECT = {
        SU: "sun",
        MO: "mon",
        TU: "tue",
        WE: "wed",
        TH: "thu",
        FR: "fri",
        SA: "sat"
    }, __extends$27 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$26 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, INPUTWARAPPER = "e-input-wrapper", ENDONCOUNT = "e-recurrence-count", HIDEWRAPPER = "e-hide-recurrence-element", PRIMARY = "e-primary", contentType = {
        none: "",
        daily: "days",
        weekly: "weeks",
        monthly: "months",
        yearly: "years"
    }, valueData = {
        sun: "SU",
        mon: "MO",
        tue: "TU",
        wed: "WE",
        thu: "TH",
        fri: "FR",
        sat: "SA"
    }, neverClassList = [ "e-days", "e-non-week", "e-end-on", "e-interval", "e-year-expander", "e-month-expander" ], weekClassList = [ "e-non-week" ], monthClassList = [ "e-days", "e-year-expander" ], yearClassList = [ "e-days" ], dailyClassList = [ "e-days", "e-non-week", "e-year-expander", "e-month-expander" ], noEndClassList = [ "e-end-on-date", "e-end-on-count" ], endOnCountClassList = [ "e-end-on-date" ], endOnDateClassList = [ "e-end-on-count" ], RecurrenceEditor = function(_super) {
        function RecurrenceEditor(options, element) {
            var _this = _super.call(this, options, element) || this;
            return _this.defaultLocale = {
                none: "None",
                daily: "Daily",
                weekly: "Weekly",
                monthly: "Monthly",
                month: "Month",
                yearly: "Yearly",
                never: "Never",
                until: "Until",
                count: "Count",
                first: "First",
                second: "Second",
                third: "Third",
                fourth: "Fourth",
                last: "Last",
                repeat: "Repeat",
                repeatEvery: "Repeat every",
                on: "Repeat On",
                end: "End",
                onDay: "Day",
                days: "Day(s)",
                weeks: "Week(s)",
                months: "Month(s)",
                years: "Year(s)",
                every: "every",
                summaryTimes: "time(s)",
                summaryOn: "on",
                summaryUntil: "until",
                summaryRepeat: "Repeats",
                summaryDay: "day(s)",
                summaryWeek: "week(s)",
                summaryMonth: "month(s)",
                summaryYear: "year(s)"
            }, _this.renderStatus = !1, _this.destroyStatus = !1, _this.dayButtons = [], _this.monthButtons = [], 
            _this;
        }
        return __extends$27(RecurrenceEditor, _super), RecurrenceEditor.prototype.startState = function(freq, endOn, startDate) {
            this.showFormElement(), this.updateForm(freq), this.freshOnEndForm(), this.updateEndOnForm(endOn), 
            this.selectMonthDay(startDate), this.updateUntilDate(startDate), this.onMonthDay.setProperties({
                checked: !0
            });
        }, RecurrenceEditor.prototype.preRender = function() {
            this.localeObj = new L10n(this.getModuleName(), this.defaultLocale, this.locale);
        }, RecurrenceEditor.prototype.applyCustomClass = function(cssClass) {
            cssClass && this.element.classList.add(cssClass);
        }, RecurrenceEditor.prototype.initialize = function() {
            this.destroyStatus = !1, this.renderComponent(), this.startState(this.repeatType.value.toString().toUpperCase(), "never", this.startDate), 
            this.updateForm(this.repeatType.value.toString()), this.applyCustomClass(this.cssClass);
        }, RecurrenceEditor.prototype.triggerChangeEvent = function() {
            if (this.renderStatus) {
                var value = this.getRecurrenceRule();
                this.trigger("change", {
                    value: value
                }), this.setProperties({
                    value: value
                }, !1);
            }
        }, RecurrenceEditor.prototype.resetDayButton = function() {
            for (var elements = this.element.querySelectorAll(".e-days button"), index = 0; index < elements.length; index++) elements[index].classList.remove("e-active"), 
            elements[index].classList.remove(PRIMARY);
        }, RecurrenceEditor.prototype.daySelection = function(dayIndex) {
            this.resetDayButton();
            var days = [ 0, 1, 2, 3, 4, 5, 6 ];
            this.rotateArray(days, this.firstDayOfWeek);
            var element = this.element.querySelector('.e-days button[data-index="' + days.indexOf(dayIndex) + '"]');
            element && (element.classList.add("e-active"), element.classList.add(PRIMARY));
        }, RecurrenceEditor.prototype.rtlClass = function(status) {
            status ? this.element.classList.add("e-rtl") : this.element.classList.remove("e-rtl");
        }, RecurrenceEditor.prototype.updateUntilDate = function(date) {
            var tempDate = new Date(date.getTime());
            tempDate.setDate(tempDate.getDate() + 60), this.untilDateObj.setProperties({
                value: tempDate
            });
        }, RecurrenceEditor.prototype.selectMonthDay = function(date) {
            var weekday = [ "sun", "mon", "tue", "wed", "thu", "fri", "sat" ];
            this.monthDate.setProperties({
                value: date.getDate()
            }), this.monthWeekDays.setProperties({
                value: valueData[weekday[date.getDay()]]
            }), this.monthValue.setProperties({
                value: "" + (date.getMonth() + 1)
            }), this.monthWeekPos.setProperties({
                value: this.getDayPosition(date)
            }), this.daySelection(date.getDay());
        }, RecurrenceEditor.prototype.updateForm = function(state) {
            switch (this.repeatType.setProperties({
                value: state
            }), state) {
              case "none":
                for (var index = 0; index < neverClassList.length; index++) this.element.querySelector("." + neverClassList[index]).classList.add(HIDEWRAPPER);
                break;

              case "weekly":
                for (index = 0; index < weekClassList.length; index++) this.element.querySelector("." + weekClassList[index]).classList.add(HIDEWRAPPER);
                break;

              case "monthly":
                for (index = 0; index < monthClassList.length; index++) this.element.querySelector("." + monthClassList[index]).classList.add(HIDEWRAPPER);
                break;

              case "yearly":
                for (index = 0; index < yearClassList.length; index++) this.element.querySelector("." + yearClassList[index]).classList.add(HIDEWRAPPER);
                break;

              case "daily":
                for (index = 0; index < dailyClassList.length; index++) this.element.querySelector("." + dailyClassList[index]).classList.add(HIDEWRAPPER);
            }
        }, RecurrenceEditor.prototype.updateEndOnForm = function(state) {
            switch (this.endType.setProperties({
                value: state
            }), state) {
              case "never":
                for (var index = 0; index < noEndClassList.length; index++) this.element.querySelector("." + noEndClassList[index]).classList.add(HIDEWRAPPER);
                break;

              case "until":
                for (index = 0; index < endOnDateClassList.length; index++) this.element.querySelector("." + endOnDateClassList[index]).classList.add(HIDEWRAPPER);
                break;

              case "count":
                for (index = 0; index < endOnCountClassList.length; index++) this.element.querySelector("." + endOnCountClassList[index]).classList.add(HIDEWRAPPER);
            }
        }, RecurrenceEditor.prototype.freshOnEndForm = function() {
            for (var btn, index = 0; index < noEndClassList.length; index++) (btn = this.element.querySelector("." + noEndClassList[index])) && btn.classList.remove(HIDEWRAPPER);
        }, RecurrenceEditor.prototype.showFormElement = function() {
            this.element.querySelectorAll("." + HIDEWRAPPER);
            for (var index = 0; index < neverClassList.length; index++) this.element.querySelector("." + neverClassList[index]).classList.remove(HIDEWRAPPER);
        }, RecurrenceEditor.prototype.renderDropdowns = function() {
            var self = this;
            this.repeatType = new DropDownList$1({
                dataSource: this.getRepeatData(),
                floatLabelType: "Always",
                enableRtl: this.enableRtl,
                index: this.selectedType,
                fields: {
                    text: "text",
                    value: "value"
                },
                placeholder: this.localeObj.getConstant("repeat"),
                change: function(args) {
                    self.destroyStatus || (self.setProperties({
                        selectedType: args.value
                    }, !1), self.element.querySelector(".e-repeat-content").innerHTML = self.localeObj.getConstant(contentType[args.value]), 
                    self.showFormElement(), self.updateForm(args.value), self.resetFormValues(), self.triggerChangeEvent());
                }
            }), this.repeatType.appendTo(this.element.querySelector(".e-repeat-element")), this.endType = new DropDownList$1({
                dataSource: this.getEndData(),
                popupWidth: this.getPopupWidth(),
                enableRtl: this.enableRtl,
                index: 1,
                fields: {
                    text: "text",
                    value: "value"
                },
                change: function(args) {
                    self.destroyStatus || (self.freshOnEndForm(), self.updateEndOnForm(args.value), 
                    self.resetFormValues(), self.triggerChangeEvent());
                }
            }), this.endType.appendTo(this.element.querySelector(".e-end-on-element")), this.monthWeekPos = new DropDownList$1({
                dataSource: this.getMonthPosData(),
                popupWidth: this.getPopupWidth(),
                enableRtl: this.enableRtl,
                fields: {
                    text: "text",
                    value: "value"
                },
                index: 1,
                change: function(args) {
                    self.destroyStatus || (self.onWeekDay.setProperties({
                        checked: !0
                    }), self.resetFormValues(), self.triggerChangeEvent());
                }
            }), this.monthDayRendering();
        }, RecurrenceEditor.prototype.setDefaultValue = function() {
            for (var formelement = [].slice.call(this.element.querySelectorAll(".e-control .e-numerictextbox")), index = 0, len = formelement.length; index < len; index++) {
                var instance = formelement[index].ej2_instances[0];
                instance.element.classList.contains("e-repeat-interval") ? (instance.value = 1, 
                instance.dataBind()) : instance.element.classList.contains(ENDONCOUNT) && (instance.value = 10, 
                instance.dataBind());
            }
        }, RecurrenceEditor.prototype.resetFormValues = function() {
            for (var recurreneElement = [].slice.call(this.element.querySelectorAll('.e-control [type="text"]')), index = 0, len = recurreneElement.length; index < len; index++) {
                var element = recurreneElement[index];
                if (element.classList.contains("e-datepicker")) {
                    (instance = element.ej2_instances[0]).value ? (instance.value = instance.value, 
                    instance.dataBind()) : this.updateUntilDate(this.startDate);
                } else if (element.classList.contains("e-dropdownlist")) {
                    (instance = element.ej2_instances[0]).index = instance.index || 0, instance.dataBind();
                } else if (element.classList.contains("e-numerictextbox")) {
                    var instance, value_1 = void 0;
                    value_1 = (instance = element.ej2_instances[0]).element.classList.contains("e-repeat-interval") ? 1 : instance.element.classList.contains(ENDONCOUNT) ? 10 : this.startDate.getDate(), 
                    instance.value = instance.value || value_1, instance.dataBind();
                }
            }
        }, RecurrenceEditor.prototype.getPopupWidth = function() {
            return Browser.isDevice ? "100%" : "auto";
        }, RecurrenceEditor.prototype.monthDayRendering = function() {
            var self = this;
            this.monthWeekPos.appendTo(this.element.querySelector(".e-month-pos")), this.monthWeekDays = new DropDownList$1({
                dataSource: this.getDayData("wide"),
                popupWidth: this.getPopupWidth(),
                enableRtl: this.enableRtl,
                fields: {
                    text: "text",
                    value: "value"
                },
                index: 1,
                change: function(args) {
                    self.destroyStatus || (self.onWeekDay.setProperties({
                        checked: !0
                    }), self.resetFormValues(), self.triggerChangeEvent());
                }
            }), this.monthWeekDays.appendTo(this.element.querySelector(".e-month-week")), this.monthValue = new DropDownList$1({
                dataSource: this.getMonthData(),
                fields: {
                    text: "text",
                    value: "value"
                },
                floatLabelType: "Always",
                enableRtl: this.enableRtl,
                index: 7,
                change: function(args) {
                    self.destroyStatus || (self.resetFormValues(), self.triggerChangeEvent());
                }
            }), this.monthValue.appendTo(this.element.querySelector(".e-year-expander-element"));
        }, RecurrenceEditor.prototype.renderDatePickers = function() {
            var self = this;
            this.untilDateObj = new DatePicker$1({
                enableRtl: this.enableRtl,
                min: this.minDate,
                max: this.maxDate,
                change: function(args) {
                    args.value && self.triggerChangeEvent();
                }
            }), this.untilDateObj.appendTo(this.element.querySelector(".e-until-date"));
        }, RecurrenceEditor.prototype.dayButtonRender = function() {
            for (var btn, _this = this, btns = this.element.querySelectorAll(".e-days button"), self = this, index = 0; index < btns.length; index++) {
                btn = btns[index];
                var button = new Button({
                    isToggle: !0,
                    enableRtl: this.enableRtl
                });
                button.appendTo(btn), this.dayButtons.push(button), EventHandler.add(btn, "click", function(args) {
                    var btns = _this.element.querySelectorAll(".e-days button." + PRIMARY), element = args.target;
                    element.classList.contains(PRIMARY) ? btns.length > 1 && (element.classList.remove(PRIMARY), 
                    self.triggerChangeEvent()) : (element.classList.add(PRIMARY), self.triggerChangeEvent());
                });
            }
        }, RecurrenceEditor.prototype.radioButtonRender = function() {
            var self = this;
            this.onMonthDay = new RadioButton({
                label: this.localeObj.getConstant("onDay"),
                enableRtl: this.enableRtl,
                name: "monthType",
                value: "day",
                change: function(args) {
                    self.resetFormValues(), self.triggerChangeEvent();
                }
            }), this.onMonthDay.appendTo(this.element.querySelector(".e-month-expander-element")), 
            this.monthButtons.push(this.onMonthDay), this.onWeekDay = new RadioButton({
                label: "",
                name: "monthType",
                enableRtl: this.enableRtl,
                value: "daypos",
                change: function(args) {
                    self.resetFormValues(), self.triggerChangeEvent();
                }
            }), this.onWeekDay.appendTo(this.element.querySelector(".e-month-expander-wrapper")), 
            this.monthButtons.push(this.onWeekDay);
        }, RecurrenceEditor.prototype.numericTextboxRender = function() {
            var self = this;
            this.recurrenceCount = new NumericTextBox({
                value: 10,
                format: "#",
                enableRtl: this.enableRtl,
                floatLabelType: "Always",
                min: 1,
                change: function(args) {
                    self.triggerChangeEvent();
                }
            }), this.recurrenceCount.appendTo(this.element.querySelector("." + ENDONCOUNT)), 
            this.monthDate = new NumericTextBox({
                value: 1,
                format: "#",
                enableRtl: this.enableRtl,
                min: 1,
                max: 31,
                change: function(args) {
                    self.onMonthDay.setProperties({
                        checked: !0
                    }), self.triggerChangeEvent();
                }
            }), this.monthDate.appendTo(this.element.querySelector(".e-month-day")), this.repeatInterval = new NumericTextBox({
                value: 1,
                format: "#",
                min: 1,
                enableRtl: this.enableRtl,
                floatLabelType: "Always",
                placeholder: this.localeObj.getConstant("repeatEvery"),
                change: function(args) {
                    self.triggerChangeEvent();
                }
            }), this.repeatInterval.appendTo(this.element.querySelector(".e-repeat-interval"));
        }, RecurrenceEditor.prototype.renderComponent = function() {
            this.setTemplate(), this.renderDropdowns(), this.renderDatePickers(), this.dayButtonRender(), 
            this.radioButtonRender(), this.numericTextboxRender();
        }, RecurrenceEditor.prototype.rotateArray = function(data, count) {
            for (var temp, index = 0; index < count; index++) temp = data.shift(), data.push(temp);
        }, RecurrenceEditor.prototype.getEndData = function() {
            var self = this, dataSource = [];
            return [ "never", "until", "count" ].forEach(function(data) {
                dataSource.push({
                    text: self.localeObj.getConstant(data),
                    value: data
                });
            }), dataSource;
        }, RecurrenceEditor.prototype.getDayPosition = function(date) {
            var temp = new Date(date.getTime()), endDate = new Date(date.getTime()), day = date.getDay(), positionCollection = [];
            for (temp.setDate(1), endDate.setDate(1), endDate.setMonth(endDate.getMonth() + 1); temp < endDate; ) temp.getDay() === day && positionCollection.push(temp.getTime()), 
            temp.setDate(temp.getDate() + 1);
            return positionCollection.indexOf(date.getTime()) === positionCollection.length - 1 ? -1 : positionCollection.indexOf(date.getTime()) + 1;
        }, RecurrenceEditor.prototype.getRepeatData = function() {
            var data = [], self = this;
            return this.frequencies.forEach(function(element) {
                var textValue = "none" === element ? "never" : element;
                data.push({
                    text: self.localeObj.getConstant(textValue),
                    value: element
                });
            }), data;
        }, RecurrenceEditor.prototype.getMonthPosData = function() {
            var monthposValue = {
                first: 1,
                second: 2,
                third: 3,
                fourth: 4,
                last: -1
            }, self = this, dataSource = [];
            return [ "first", "second", "third", "fourth", "last" ].forEach(function(data) {
                dataSource.push({
                    text: self.localeObj.getConstant(data),
                    value: monthposValue[data]
                });
            }), dataSource;
        }, RecurrenceEditor.prototype.getDayData = function(format) {
            var cldrObj, weekday = [ "sun", "mon", "tue", "wed", "thu", "fri", "sat" ], dayData = [], temp = "narrow" === format ? "narrow" : "wide";
            this.rotateArray(weekday, this.firstDayOfWeek), cldrObj = "en" === this.locale || "en-US" === this.locale ? getValue("days.stand-alone." + temp, getDefaultDateObject()) : getValue("main." + this.locale + ".dates.calendars.gregorian.days.stand-alone." + temp, cldrData);
            for (var _i = 0, weekday_1 = weekday; _i < weekday_1.length; _i++) {
                var obj = weekday_1[_i];
                dayData.push({
                    text: getValue(obj, cldrObj),
                    value: valueData[obj]
                });
            }
            return dayData;
        }, RecurrenceEditor.prototype.getMonthData = function() {
            var cldrObj, monthData = [];
            cldrObj = "en" === this.locale || "en-US" === this.locale ? getValue("months.stand-alone.wide", getDefaultDateObject()) : getValue("main." + this.locale + ".dates.calendars.gregorian.months.stand-alone.wide", cldrData);
            for (var _i = 0, _a = Object.keys(cldrObj); _i < _a.length; _i++) {
                var obj = _a[_i];
                monthData.push({
                    text: getValue(obj, cldrObj),
                    value: obj
                });
            }
            return monthData;
        }, RecurrenceEditor.prototype.setTemplate = function() {
            var dayData = this.getDayData("narrow");
            this.element.innerHTML = '<div class="e-editor"><div class="e-input-wrapper e-form-left"><input type="text" tabindex="0" class="e-repeat-element" /></div><div class="e-input-wrapper e-interval e-form-right"><table  class="e-recurrence-table"><tr><td><input type="text" tabindex="0" class="e-repeat-interval" /></td><td><span class="e-repeat-content"></span></td></tr></table></div><div class="e-input-wrapper-side e-days e-form-left"><div class=e-week-expander-label>' + this.localeObj.getConstant("on") + '</div><button type="button" data-index="0">' + dayData[0].text + '</button><button type="button" data-index="1">' + dayData[1].text + '</button><button type="button" data-index="2">' + dayData[2].text + '</button><button type="button" data-index="3">' + dayData[3].text + '</button><button type="button" data-index="4">' + dayData[4].text + '</button><button type="button" data-index="5">' + dayData[5].text + '</button><button type="button" data-index="6">' + dayData[6].text + '</button></div><div class="e-input-wrapper-side e-non-week e-form-left"><div class=e-month-expander-label>' + this.localeObj.getConstant("on") + '</div><div class="e-year-expander"><input class="e-year-expander-element" type="text" tabindex="0" /></div><div class="e-month-expander"><table class="e-recurrence-table"><tr><td><div class="' + INPUTWARAPPER + ' e-month-expander-checkbox-wrapper"><input class="e-month-expander-element" type="radio"></div></td><td colspan="2"><div class="' + INPUTWARAPPER + ' e-monthday-element"><input type="text" tabindex="0" class="e-month-day" /></div></td></tr><tr><td><div class="' + INPUTWARAPPER + '" style="min-width: 30px;"><input class="e-month-expander-wrapper" type="radio"></div></td><td><div class="' + INPUTWARAPPER + ' e-week-position" ><input type="text" tabindex="0" class="e-month-pos" /></div></td><td><div class="' + INPUTWARAPPER + '" ><input type="text" tabindex="0" class="e-month-week" /></div></td></tr></table></div></div><div class="e-input-wrapper-side e-end-on e-form-right"><div class=e-end-on-label>' + this.localeObj.getConstant("end") + '</div><div class="' + INPUTWARAPPER + ' e-end-on-left"><input type="text" tabindex="0" class="e-end-on-element" /></div><div class="' + INPUTWARAPPER + ' e-end-on-date" ><input type="text" tabindex="0" class="e-until-date" /></div><div class="' + INPUTWARAPPER + ' e-end-on-count"><input type="text" tabindex="0" class="' + ENDONCOUNT + '" /></div></div></div></div>';
        }, RecurrenceEditor.prototype.getSelectedDaysData = function() {
            var ruleData = "BYDAY=", elements = this.element.querySelectorAll(".e-days button." + PRIMARY), weekday = [ "SU", "MO", "TU", "WE", "TH", "FR", "SA" ];
            this.rotateArray(weekday, this.firstDayOfWeek);
            for (var index = 0; index < elements.length; index++) ruleData += weekday[parseInt(elements[index].getAttribute("data-index"), 10)] + (index === elements.length - 1 ? "" : ",");
            return ruleData + ";";
        }, RecurrenceEditor.prototype.getSelectedMonthData = function() {
            return this.onWeekDay.checked ? "BYDAY=" + this.monthWeekDays.value + ";BYSETPOS=" + this.monthWeekPos.value + ";" : "BYMONTHDAY=" + this.monthDate.value + ";";
        }, RecurrenceEditor.prototype.getIntervalData = function() {
            return "INTERVAL=" + this.repeatInterval.value + ";";
        }, RecurrenceEditor.prototype.getEndOnCount = function() {
            return "COUNT=" + this.recurrenceCount.value + ";";
        }, RecurrenceEditor.prototype.getYearMonthRuleData = function() {
            return "BYMONTH=" + this.monthValue.value + ";";
        }, RecurrenceEditor.prototype.updateWeekButton = function(keys) {
            var weekday = [ "SU", "MO", "TU", "WE", "TH", "FR", "SA" ];
            this.rotateArray(weekday, this.firstDayOfWeek);
            for (var index, _i = 0, _a = this.dayButtons; _i < _a.length; _i++) {
                var obj = _a[_i];
                index = parseInt(obj.element.getAttribute("data-index"), 10), -1 !== keys.indexOf(weekday[index]) ? obj.setProperties({
                    isPrimary: !0
                }) : obj.setProperties({
                    isPrimary: !1
                });
            }
        }, RecurrenceEditor.prototype.updateMonthUI = function() {
            if (this.ruleObject.monthDay.length) this.monthDate.setProperties({
                value: this.ruleObject.monthDay[0]
            }), this.onMonthDay.setProperties({
                checked: !0
            }); else {
                this.onWeekDay.setProperties({
                    checked: !0
                }), this.monthWeekPos.setProperties({
                    value: this.ruleObject.setPosition
                });
                for (var _i = 0, _a = Object.keys(valueData); _i < _a.length; _i++) {
                    var key = _a[_i];
                    if (valueData[key] === this.ruleObject.day[0]) {
                        this.monthWeekDays.setProperties({
                            value: this.ruleObject.day[0]
                        });
                        break;
                    }
                }
            }
        }, RecurrenceEditor.prototype.updateUI = function(repeat, state) {
            switch (this.repeatInterval.setProperties({
                value: this.ruleObject.interval
            }), state) {
              case "until":
                this.untilDateObj.setProperties({
                    value: this.ruleObject.until
                });
                break;

              case "count":
                this.recurrenceCount.setProperties({
                    value: this.ruleObject.count
                });
            }
            switch (repeat) {
              case "weekly":
                this.updateWeekButton(this.ruleObject.day);
                break;

              case "yearly":
                this.monthValue.setProperties({
                    index: this.ruleObject.month[0] - 1
                }), this.updateMonthUI();
                break;

              case "monthly":
                this.updateMonthUI();
            }
        }, RecurrenceEditor.prototype.getUntilData = function() {
            return "UNTIL=" + getRecurrenceStringFromDate(this.untilDateObj.value) + ";";
        }, RecurrenceEditor.prototype.destroyComponents = function() {
            this.recurrenceCount.destroy(), this.monthDate.destroy(), this.repeatInterval.destroy(), 
            this.untilDateObj.destroy(), this.repeatType.destroy(), this.endType.destroy(), 
            this.monthWeekPos.destroy(), this.monthWeekDays.destroy(), this.monthValue.destroy(), 
            this.dayButtons.forEach(function(element) {
                element.destroy();
            }), this.monthButtons.forEach(function(element) {
                element.destroy();
            });
        }, RecurrenceEditor.prototype.resetFields = function() {
            this.startState("none", "never", this.startDate), this.setDefaultValue();
        }, RecurrenceEditor.prototype.getRuleSummary = function(rule) {
            return void 0 === rule && (rule = this.getRecurrenceRule()), function(rule, localeObject, locale) {
                var cldrObj, cldrObj1, ruleObject = extractObjectFromRule(rule), summary = localeObject.getConstant(EVERY) + " ";
                switch ("en" === locale || "en-US" === locale ? (cldrObj1 = getValue("months.stand-alone.abbreviated", getDefaultDateObject()), 
                cldrObj = getValue("days.stand-alone.abbreviated", getDefaultDateObject())) : (cldrObj1 = getValue("main." + locale + ".dates.calendars.gregorian.months.stand-alone.abbreviated", cldrData), 
                cldrObj = getValue("main." + locale + ".dates.calendars.gregorian.days.stand-alone.abbreviated", cldrData)), 
                ruleObject.interval > 1 && (summary += ruleObject.interval + " "), ruleObject.freq) {
                  case "DAILY":
                    summary += localeObject.getConstant(DAYS$1);
                    break;

                  case "WEEKLY":
                    summary += localeObject.getConstant(WEEKS) + " " + localeObject.getConstant(ON$1) + " ", 
                    ruleObject.day.forEach(function(day, index) {
                        summary += getValue(DAYINDEXOBJECT[day], cldrObj), summary += ruleObject.day.length - 1 === index ? "" : ", ";
                    });
                    break;

                  case "MONTHLY":
                    summary += localeObject.getConstant(MONTHS$1) + " " + localeObject.getConstant(ON$1) + " ", 
                    summary += getMonthSummary(ruleObject, cldrObj, localeObject);
                    break;

                  case "YEARLY":
                    summary += localeObject.getConstant(YEARS$1) + " " + localeObject.getConstant(ON$1) + " ", 
                    summary += getValue(ruleObject.month[0].toString(), cldrObj1) + " ", summary += getMonthSummary(ruleObject, cldrObj, localeObject);
                    break;

                  default:
                    return "";
                }
                if (ruleObject.count) summary += ", " + ruleObject.count + " " + localeObject.getConstant(TIMES); else if (ruleObject.until) {
                    var tempDate = ruleObject.until;
                    summary += ", " + localeObject.getConstant(UNTIL$1) + " " + tempDate.getDate() + " " + getValue((tempDate.getMonth() + 1).toString(), cldrObj1) + " " + tempDate.getFullYear();
                }
                return summary;
            }(rule, this.localeObj, this.locale);
        }, RecurrenceEditor.prototype.getRecurrenceDates = function(startDate, rule, excludeDate, maximumCount, viewDate) {
            return void 0 === viewDate && (viewDate = this.startDate), generate(startDate, rule, excludeDate, this.firstDayOfWeek, maximumCount, viewDate);
        }, RecurrenceEditor.prototype.getRecurrenceRule = function() {
            var ruleData = "FREQ=";
            switch (this.repeatType.value) {
              case "daily":
                ruleData += "DAILY;";
                break;

              case "weekly":
                ruleData += "WEEKLY;" + this.getSelectedDaysData();
                break;

              case "monthly":
                ruleData += "MONTHLY;" + this.getSelectedMonthData();
                break;

              case "yearly":
                ruleData += "YEARLY;" + this.getSelectedMonthData() + this.getYearMonthRuleData();
                break;

              case "none":
                return "";
            }
            switch (ruleData += this.getIntervalData(), this.endType.value) {
              case "until":
                ruleData += this.getUntilData();
                break;

              case "count":
                ruleData += this.getEndOnCount();
            }
            return ruleData;
        }, RecurrenceEditor.prototype.setRecurrenceRule = function(rule, startDate) {
            void 0 === startDate && (startDate = this.startDate), rule || this.repeatType.setProperties({
                value: "none"
            }), this.ruleObject = extractObjectFromRule(rule);
            var endon = this.ruleObject.count ? "count" : this.ruleObject.until ? "until" : "never";
            switch (this.ruleObject.freq) {
              case "DAILY":
                this.startState("daily", endon, startDate), this.updateUI("daily", endon);
                break;

              case "WEEKLY":
                this.startState("weekly", endon, startDate), this.updateUI("weekly", endon);
                break;

              case "MONTHLY":
                this.startState("monthly", endon, startDate), this.updateUI("monthly", endon);
                break;

              case "YEARLY":
                this.startState("yearly", endon, startDate), this.updateUI("yearly", endon);
            }
        }, RecurrenceEditor.prototype.destroy = function() {
            this.destroyStatus = !0, this.destroyComponents(), this.element.innerHTML = "";
        }, RecurrenceEditor.prototype.getModuleName = function() {
            return "recurrenceeditor";
        }, RecurrenceEditor.prototype.getPersistData = function() {
            return this.addOnPersist([]);
        }, RecurrenceEditor.prototype.render = function() {
            this.initialize(), this.rtlClass(this.enableRtl), this.renderStatus = !0;
        }, RecurrenceEditor.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "startDate":
                    this.selectMonthDay(newProp.startDate), this.updateUntilDate(newProp.startDate), 
                    this.endType.setProperties({
                        index: 0
                    });
                    break;

                  case "enableRtl":
                    this.rtlClass(newProp.enableRtl);
                    break;

                  case "cssClass":
                    this.applyCustomClass(newProp.cssClass);
                    break;

                  case "selectedType":
                    this.repeatType.setProperties({
                        index: this.selectedType
                    });
                    break;

                  case "minDate":
                    this.untilDateObj.setProperties({
                        minDate: this.minDate
                    });
                    break;

                  case "maxDate":
                    this.untilDateObj.setProperties({
                        maxDate: this.maxDate
                    });
                }
            }
        }, __decorate$26([ Property([ "none", "daily", "weekly", "monthly", "yearly" ]) ], RecurrenceEditor.prototype, "frequencies", void 0), 
        __decorate$26([ Property(0) ], RecurrenceEditor.prototype, "firstDayOfWeek", void 0), 
        __decorate$26([ Property(new Date()) ], RecurrenceEditor.prototype, "startDate", void 0), 
        __decorate$26([ Property("null") ], RecurrenceEditor.prototype, "dateFormat", void 0), 
        __decorate$26([ Property("en-US") ], RecurrenceEditor.prototype, "locale", void 0), 
        __decorate$26([ Property("") ], RecurrenceEditor.prototype, "cssClass", void 0), 
        __decorate$26([ Property(!1) ], RecurrenceEditor.prototype, "enableRtl", void 0), 
        __decorate$26([ Property("") ], RecurrenceEditor.prototype, "value", void 0), __decorate$26([ Property(new Date(1900, 1, 1)) ], RecurrenceEditor.prototype, "minDate", void 0), 
        __decorate$26([ Property(new Date(2099, 12, 31)) ], RecurrenceEditor.prototype, "maxDate", void 0), 
        __decorate$26([ Property(0) ], RecurrenceEditor.prototype, "selectedType", void 0), 
        __decorate$26([ Event() ], RecurrenceEditor.prototype, "change", void 0), RecurrenceEditor = __decorate$26([ NotifyPropertyChanges ], RecurrenceEditor);
    }(Component), __extends$30 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$29 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, OPEN = "e-open", RIGHT = "e-right", LEFT = "e-left", OVER = "e-over", PUSH = "e-push", CONTEXT = "e-sidebar-context", Sidebar = function(_super) {
        function Sidebar(options, element) {
            return _super.call(this, options, element) || this;
        }
        return __extends$30(Sidebar, _super), Sidebar.prototype.preRender = function() {
            this.setWidth();
        }, Sidebar.prototype.render = function() {
            this.initialize(), this.wireEvents();
        }, Sidebar.prototype.initialize = function() {
            this.setContext(), this.addClass(), this.setZindex(), this.enableDock && this.setDock(), 
            this.setMediaQuery(), this.setType(this.type), this.setCloseOnDocumentClick();
        }, Sidebar.prototype.setContext = function() {
            "string" == typeof this.target && this.setProperties({
                target: document.querySelector("." + this.target)
            }, !0), this.target && (this.target.insertAdjacentElement("afterbegin", this.element), 
            addClass([ this.element ], "e-sidebar-absolute"), addClass([ this.target ], CONTEXT));
        }, Sidebar.prototype.setCloseOnDocumentClick = function() {
            this.closeOnDocumentClick ? EventHandler.add(document, "mousedown touchstart", this.documentclickHandler, this) : EventHandler.remove(document, "mousedown touchstart", this.documentclickHandler);
        }, Sidebar.prototype.setWidth = function() {
            this.enableDock && "Left" === this.position ? setStyleAttribute(this.element, {
                width: formatUnit(this.dockSize)
            }) : this.enableDock && "Right" === this.position ? setStyleAttribute(this.element, {
                width: formatUnit(this.dockSize)
            }) : this.enableDock || setStyleAttribute(this.element, {
                width: formatUnit(this.width)
            });
        }, Sidebar.prototype.setZindex = function() {
            setStyleAttribute(this.element, {
                "z-index": "" + this.zIndex
            });
        }, Sidebar.prototype.addClass = function() {
            var classELement = document.querySelector(".e-main-content");
            isNullOrUndefined(classELement || this.element.nextElementSibling) || addClass([ classELement || this.element.nextElementSibling ], [ "e-content-animation" ]), 
            this.enableDock || "Auto" === this.type || addClass([ this.element ], [ "e-visibility" ]), 
            removeClass([ this.element ], [ OPEN, "e-close", RIGHT, LEFT, "e-slide", PUSH, OVER ]), 
            this.element.classList.add("e-sidebar"), addClass([ this.element ], "Right" === this.position ? RIGHT : LEFT), 
            "Auto" !== this.type || Browser.isDevice || this.enableDock ? addClass([ this.element ], "e-close") : addClass([ this.element ], OPEN);
        }, Sidebar.prototype.destroyBackDrop = function() {
            var sibling = document.querySelector(".e-main-content") || this.element.nextElementSibling;
            this.target && this.showBackdrop && sibling ? removeClass([ sibling ], "e-backdrop") : this.showBackdrop && this.modal && (this.modal.style.display = "none", 
            this.modal.outerHTML = "", this.modal = null);
        }, Sidebar.prototype.hide = function() {
            if (!this.element.classList.contains("e-close")) {
                this.element.classList.contains(OPEN) && (this.eventArguments = {
                    name: "change",
                    element: this.element
                }, this.trigger("change", this.eventArguments)), addClass([ this.element ], "e-close"), 
                removeClass([ this.element ], OPEN), this.enableDock ? setStyleAttribute(this.element, {
                    width: formatUnit(this.dockSize)
                }) : setStyleAttribute(this.element, {
                    width: formatUnit(this.width)
                }), this.setDock(), this.setType(this.type);
                var sibling = document.querySelector(".e-main-content") || this.element.nextElementSibling;
                !this.enableDock && sibling && (sibling.style.transform = "translateX(0px)", "Left" === this.position ? sibling.style.marginLeft = "0px" : sibling.style.marginRight = "0px"), 
                this.eventArguments = {
                    name: "change",
                    element: this.element
                }, this.trigger("close", this.eventArguments), this.destroyBackDrop(), this.setCloseOnDocumentClick(), 
                this.setAnimation(), "Slide" === this.type && document.body.classList.remove("e-sidebar-overflow");
            }
        }, Sidebar.prototype.show = function() {
            if (removeClass([ this.element ], "e-visibility"), !this.element.classList.contains(OPEN)) {
                this.element.classList.contains("e-close") && (this.eventArguments = {
                    name: "open",
                    element: this.element
                }, this.trigger("change", this.eventArguments)), addClass([ this.element ], [ OPEN, "e-transition" ]), 
                setStyleAttribute(this.element, {
                    transform: ""
                }), removeClass([ this.element ], "e-close"), setStyleAttribute(this.element, {
                    width: formatUnit(this.width)
                });
                this.element.getBoundingClientRect().width;
                this.setType(this.type), this.createBackDrop(), this.eventArguments.name = "open", 
                this.eventArguments.element = this.element, this.trigger("open", this.eventArguments), 
                this.setCloseOnDocumentClick(), this.setAnimation(), "Slide" === this.type && document.body.classList.add("e-sidebar-overflow");
            }
        }, Sidebar.prototype.setAnimation = function() {
            this.animate ? removeClass([ this.element ], "e-disable-animation") : addClass([ this.element ], "e-disable-animation");
        }, Sidebar.prototype.setDock = function() {
            this.enableDock && "Left" === this.position && !this.isOpen() ? setStyleAttribute(this.element, {
                transform: "translateX(-100%) translateX(" + formatUnit(this.dockSize) + ")"
            }) : this.enableDock && "Right" === this.position && !this.isOpen() && setStyleAttribute(this.element, {
                transform: "translateX(100%) translateX(-" + formatUnit(this.dockSize) + ")"
            }), this.element.classList.contains("e-close") && this.enableDock && setStyleAttribute(this.element, {
                width: formatUnit(this.dockSize)
            });
        }, Sidebar.prototype.createBackDrop = function() {
            if (this.target && this.showBackdrop) {
                addClass([ document.querySelector(".e-main-content") || this.element.nextElementSibling ], "e-backdrop");
            } else this.showBackdrop && !this.modal && this.isOpen() && (this.modal = createElement("div"), 
            this.modal.className = "e-sidebar-overlay", this.modal.style.display = "block", 
            document.body.appendChild(this.modal));
        }, Sidebar.prototype.getPersistData = function() {
            return this.addOnPersist([ "type", "position" ]);
        }, Sidebar.prototype.getModuleName = function() {
            return "sidebar";
        }, Sidebar.prototype.toggle = function(e) {
            this.element.classList.contains(OPEN) ? this.hide() : this.show();
        }, Sidebar.prototype.isOpen = function() {
            return !!this.element.classList.contains(OPEN);
        }, Sidebar.prototype.setMediaQuery = function() {
            this.mediaQuery && this.mediaQuery.matches ? this.show() : this.mediaQuery && this.isOpen() && this.hide();
        }, Sidebar.prototype.resize = function(e) {
            "Auto" === this.type && (Browser.isDevice ? addClass([ this.element ], OVER) : addClass([ this.element ], PUSH)), 
            this.setMediaQuery();
        }, Sidebar.prototype.documentclickHandler = function(e) {
            closest(e.target, ".e-control.e-sidebar") || this.hide();
        }, Sidebar.prototype.enableGestureHandler = function(args) {
            "Left" === this.position && "Right" === args.swipeDirection && args.startX <= 20 && args.distanceX >= 50 && args.velocity >= .5 ? this.show() : "Left" === this.position && "Left" === args.swipeDirection ? this.hide() : "Right" === this.position && "Right" === args.swipeDirection ? this.hide() : "Right" === this.position && "Left" === args.swipeDirection && window.innerWidth - args.startX <= 20 && args.distanceX >= 50 && args.velocity >= .5 && this.show();
        }, Sidebar.prototype.setEnableGestures = function() {
            this.enableGestures ? (this.mainContentEle = new Touch(document.body, {
                swipe: this.enableGestureHandler.bind(this)
            }), this.sidebarEle = new Touch(this.element, {
                swipe: this.enableGestureHandler.bind(this)
            })) : this.mainContentEle && this.sidebarEle && (this.mainContentEle.destroy(), 
            this.sidebarEle.destroy());
        }, Sidebar.prototype.wireEvents = function() {
            this.setEnableGestures(), window.addEventListener("resize", this.resize.bind(this));
        }, Sidebar.prototype.unWireEvents = function() {
            window.removeEventListener("resize", this.resize.bind(this)), EventHandler.remove(document, "mousedown touchstart", this.documentclickHandler), 
            this.mainContentEle && this.mainContentEle.destroy(), this.sidebarEle && this.sidebarEle.destroy();
        }, Sidebar.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var sibling = document.querySelector(".e-main-content") || this.element.nextElementSibling, _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "width":
                    this.setWidth(), this.isOpen() || this.setDock();
                    break;

                  case "animate":
                    this.setAnimation();
                    break;

                  case "type":
                    removeClass([ this.element ], [ "e-visibility" ]), this.addClass(), this.setType(this.type);
                    break;

                  case "position":
                    this.element.style.transform = "", this.setDock(), sibling && ("Left" === this.position ? sibling.style.marginRight = "0px" : sibling.style.marginLeft = "0px"), 
                    "Right" === this.position ? (removeClass([ this.element ], LEFT), addClass([ this.element ], RIGHT)) : (removeClass([ this.element ], RIGHT), 
                    addClass([ this.element ], LEFT)), this.setType(this.type);
                    break;

                  case "showBackdrop":
                    this.showBackdrop ? this.createBackDrop() : this.modal && (this.modal.style.display = "none", 
                    this.modal.outerHTML = "", this.modal = null);
                    break;

                  case "target":
                    "string" == typeof this.target && this.setProperties({
                        target: document.querySelector("." + this.target)
                    }, !0), isNullOrUndefined(this.target) ? (removeClass([ this.element ], "e-sidebar-absolute"), 
                    removeClass([ oldProp.target ], CONTEXT), setStyleAttribute(sibling, {
                        "margin-left": 0,
                        "margin-right": 0
                    }), document.body.insertAdjacentElement("afterbegin", this.element)) : _super.prototype.refresh.call(this);
                    break;

                  case "closeOnDocumentClick":
                    this.setCloseOnDocumentClick();
                    break;

                  case "enableDock":
                    this.isOpen() || this.setDock();
                    break;

                  case "zIndex":
                    this.setZindex();
                    break;

                  case "mediaQuery":
                    this.setMediaQuery();
                    break;

                  case "enableGestures":
                    this.setEnableGestures();
                }
            }
        }, Sidebar.prototype.setType = function(type) {
            var elementWidth = this.element.getBoundingClientRect().width;
            this.setZindex(), this.enableDock && addClass([ this.element ], "e-dock");
            var sibling = document.querySelector(".e-main-content") || this.element.nextElementSibling;
            sibling && (sibling.style.transform = "translateX(0px)", Browser.isDevice || "Auto" === this.type || ("Left" === this.position ? sibling.style.marginLeft = "0px" : sibling.style.marginRight = "0px"));
            var margin = (this.position, elementWidth + "px"), eleWidth = "Left" === this.position ? elementWidth : -elementWidth;
            switch (removeClass([ this.element ], [ PUSH, OVER, "e-slide" ]), type) {
              case "Push":
                addClass([ this.element ], [ PUSH ]), sibling && (this.enableDock || this.element.classList.contains(OPEN)) && ("Left" === this.position ? sibling.style.marginLeft = margin : sibling.style.marginRight = margin);
                break;

              case "Slide":
                addClass([ this.element ], [ "e-slide" ]), sibling && (this.enableDock || this.element.classList.contains(OPEN)) && (sibling.style.transform = "translateX(" + eleWidth + "px)");
                break;

              case "Over":
                addClass([ this.element ], [ OVER ]), this.enableDock && this.element.classList.contains("e-close") && sibling && ("Left" === this.position ? sibling.style.marginLeft = margin : sibling.style.marginRight = margin);
                break;

              case "Auto":
                addClass([ this.element ], [ "e-transition" ]), Browser.isDevice ? sibling && this.enableDock && !this.isOpen() ? ("Left" === this.position ? sibling.style.marginLeft = margin : sibling.style.marginRight = margin, 
                addClass([ this.element ], PUSH)) : addClass([ this.element ], OVER) : (addClass([ this.element ], PUSH), 
                sibling && (this.enableDock || this.element.classList.contains(OPEN)) && ("Left" === this.position ? sibling.style.marginLeft = margin : sibling.style.marginRight = margin)), 
                this.createBackDrop();
            }
        }, Sidebar.prototype.destroy = function() {
            _super.prototype.destroy.call(this), removeClass([ this.element ], [ OPEN, "e-close", PUSH, "e-slide", OVER, LEFT, RIGHT, "e-transition" ]), 
            this.target && (removeClass([ this.element ], "e-sidebar-absolute"), removeClass([ this.target ], CONTEXT)), 
            this.destroyBackDrop(), this.element.style.width = "", this.element.style.zIndex = "", 
            this.element.style.transform = "";
            var sibling = document.querySelector(".e-main-content") || this.element.nextElementSibling;
            isNullOrUndefined(sibling) || (sibling.style.margin = "", sibling.style.transform = ""), 
            this.unWireEvents();
        }, __decorate$29([ Property("auto") ], Sidebar.prototype, "dockSize", void 0), __decorate$29([ Property(null) ], Sidebar.prototype, "mediaQuery", void 0), 
        __decorate$29([ Property(!1) ], Sidebar.prototype, "enableDock", void 0), __decorate$29([ Property(!0) ], Sidebar.prototype, "enableGestures", void 0), 
        __decorate$29([ Property(!1) ], Sidebar.prototype, "enableRtl", void 0), __decorate$29([ Property(!0) ], Sidebar.prototype, "animate", void 0), 
        __decorate$29([ Property("auto") ], Sidebar.prototype, "height", void 0), __decorate$29([ Property(!1) ], Sidebar.prototype, "closeOnDocumentClick", void 0), 
        __decorate$29([ Property("Left") ], Sidebar.prototype, "position", void 0), __decorate$29([ Property(null) ], Sidebar.prototype, "target", void 0), 
        __decorate$29([ Property(!1) ], Sidebar.prototype, "showBackdrop", void 0), __decorate$29([ Property("Auto") ], Sidebar.prototype, "type", void 0), 
        __decorate$29([ Property("auto") ], Sidebar.prototype, "width", void 0), __decorate$29([ Property(1e3) ], Sidebar.prototype, "zIndex", void 0), 
        __decorate$29([ Event() ], Sidebar.prototype, "created", void 0), __decorate$29([ Event() ], Sidebar.prototype, "close", void 0), 
        __decorate$29([ Event() ], Sidebar.prototype, "open", void 0), __decorate$29([ Event() ], Sidebar.prototype, "change", void 0), 
        __decorate$29([ Event() ], Sidebar.prototype, "destroyed", void 0), Sidebar = __decorate$29([ NotifyPropertyChanges ], Sidebar);
    }(Component), __extends$31 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$30 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, TicksData$1 = function(_super) {
        function TicksData() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$31(TicksData, _super), __decorate$30([ Property("None") ], TicksData.prototype, "placement", void 0), 
        __decorate$30([ Property(10) ], TicksData.prototype, "largeStep", void 0), __decorate$30([ Property(1) ], TicksData.prototype, "smallStep", void 0), 
        __decorate$30([ Property(!1) ], TicksData.prototype, "showSmallTicks", void 0), 
        __decorate$30([ Property(null) ], TicksData.prototype, "format", void 0), TicksData;
    }(ChildProperty), TooltipData$1 = function(_super) {
        function TooltipData() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$31(TooltipData, _super), __decorate$30([ Property("") ], TooltipData.prototype, "cssClass", void 0), 
        __decorate$30([ Property("Before") ], TooltipData.prototype, "placement", void 0), 
        __decorate$30([ Property("Focus") ], TooltipData.prototype, "showOn", void 0), __decorate$30([ Property(!1) ], TooltipData.prototype, "isVisible", void 0), 
        __decorate$30([ Property(null) ], TooltipData.prototype, "format", void 0), TooltipData;
    }(ChildProperty), classNames$__root$0 = "e-slider", classNames$__rtl = "e-rtl", classNames$__sliderHiddenInput = "e-slider-input", classNames$__sliderHandle = "e-handle", classNames$__rangeBar = "e-range", classNames$__sliderButton = "e-slider-button", classNames$__firstButton = "e-first-button", classNames$__secondButton = "e-second-button", classNames$__scale = "e-scale", classNames$__tick = "e-tick", classNames$__large = "e-large", classNames$__tickValue = "e-tick-value", classNames$__sliderTooltip = "e-slider-tooltip", classNames$__sliderHover = "e-slider-hover", classNames$__sliderFirstHandle = "e-handle-first", classNames$__sliderSecondHandle = "e-handle-second", classNames$__sliderDisabled = "e-disabled", classNames$__sliderContainer = "e-slider-container", classNames$__horizontalTooltipBefore = "e-slider-horizontal-before", classNames$__horizontalTooltipAfter = "e-slider-horizontal-after", classNames$__verticalTooltipBefore = "e-slider-vertical-before", classNames$__verticalTooltipAfter = "e-slider-vertical-after", classNames$__materialTooltipOpen = "e-material-tooltip-open", classNames$__materialTooltipActive = "e-tooltip-active", classNames$__materialSlider = "e-material-slider", classNames$__sliderTrack = "e-slider-track", classNames$__sliderHandleFocused = "e-handle-focused", classNames$__verticalSlider = "e-vertical", classNames$__horizontalSlider = "e-horizontal", classNames$__sliderHandleStart = "e-handle-start", classNames$__sliderTooltipStart = "e-material-tooltip-start", classNames$__sliderTabHandle = "e-tab-handle", classNames$__sliderButtonIcon = "e-button-icon", classNames$__sliderSmallSize = "e-small-size", classNames$__sliderTickPosition = "e-tick-pos", classNames$__sliderFirstTick = "e-first-tick", classNames$__sliderLastTick = "e-last-tick", classNames$__sliderButtonClass = "e-slider-btn", classNames$__sliderTabTrack = "e-tab-track", classNames$__sliderTabRange = "e-tab-range", classNames$__sliderActiveHandle = "e-handle-active", classNames$__sliderMaterialHandle = "e-material-handle", classNames$__sliderMaterialRange = "e-material-range", classNames$__sliderMaterialDefault = "e-material-default", classNames$__materialTooltipShow = "e-material-tooltip-show", classNames$__materialTooltipHide = "e-material-tooltip-hide", classNames$__readOnly = "e-read-only", Slider$1 = function(_super) {
        function Slider(options, element) {
            var _this = _super.call(this, options, element) || this;
            return _this.horDir = "left", _this.verDir = "bottom", _this.transition = {
                handle: "left .4s cubic-bezier(.25, .8, .25, 1), right .4s cubic-bezier(.25, .8, .25, 1), top .4s cubic-bezier(.25, .8, .25, 1) , bottom .4s cubic-bezier(.25, .8, .25, 1)",
                rangeBar: "all .4s cubic-bezier(.25, .8, .25, 1)"
            }, _this.transitionOnMaterialTooltip = {
                handle: "left 1ms ease-out, right 1ms ease-out, bottom 1ms ease-out",
                rangeBar: "left 1ms ease-out, right 1ms ease-out, bottom 1ms ease-out, width 1ms ease-out, height 1ms ease-out"
            }, _this.scaleTransform = "transform .4s cubic-bezier(.25, .8, .25, 1)", _this.customAriaText = null, 
            _this;
        }
        return __extends$31(Slider, _super), Slider.prototype.preRender = function() {
            this.l10n = new L10n("slider", {
                incrementTitle: "Increase",
                decrementTitle: "Decrease"
            }, this.locale), this.tickElementCollection = [], this.tooltipFormatInfo = {}, this.ticksFormatInfo = {}, 
            this.initCultureInfo(), this.initCultureFunc();
        }, Slider.prototype.initCultureFunc = function() {
            this.internationalization = new Internationalization(this.locale);
        }, Slider.prototype.initCultureInfo = function() {
            this.tooltipFormatInfo.format = isNullOrUndefined(this.tooltip.format) ? null : this.tooltip.format, 
            this.ticksFormatInfo.format = isNullOrUndefined(this.ticks.format) ? null : this.ticks.format;
        }, Slider.prototype.formatString = function(value, formatInfo) {
            var formatValue = null, formatString = null;
            if (value || 0 === value) {
                formatValue = this.formatNumber(value);
                var numberOfDecimals = this.numberOfDecimals(value);
                formatString = this.internationalization.getNumberFormat(formatInfo)(this.makeRoundNumber(value, numberOfDecimals));
            }
            return {
                elementVal: formatValue,
                formatString: formatString
            };
        }, Slider.prototype.formatNumber = function(value) {
            var numberOfDecimals = this.numberOfDecimals(value);
            return this.internationalization.getNumberFormat({
                maximumFractionDigits: numberOfDecimals,
                minimumFractionDigits: numberOfDecimals,
                useGrouping: !1
            })(value);
        }, Slider.prototype.numberOfDecimals = function(value) {
            var decimalPart = value.toString().split(".")[1];
            return decimalPart && decimalPart.length ? decimalPart.length : 0;
        }, Slider.prototype.makeRoundNumber = function(value, precision) {
            var decimals = precision || 0;
            return Number(value.toFixed(decimals));
        }, Slider.prototype.fractionalToInteger = function(value) {
            value = 0 === this.numberOfDecimals(value) ? Number(value).toFixed(this.noOfDecimals) : value;
            for (var tens = 1, i = 0; i < this.noOfDecimals; i++) tens *= 10;
            return value = Number((value * tens).toFixed(0));
        }, Slider.prototype.render = function() {
            this.initialize(), this.initRender(), this.wireEvents(), this.setZindex();
        }, Slider.prototype.initialize = function() {
            addClass([ this.element ], classNames$__root$0), this.setCSSClass();
        }, Slider.prototype.setCSSClass = function(oldCSSClass) {
            oldCSSClass && removeClass([ this.element ], oldCSSClass.split(" ")), this.cssClass && addClass([ this.element ], this.cssClass.split(" "));
        }, Slider.prototype.setEnabled = function() {
            var tooltipElement = "Range" !== this.type ? [ this.firstTooltipElement ] : [ this.firstTooltipElement, this.secondTooltipElement ];
            this.enabled ? (removeClass([ this.sliderContainer ], [ classNames$__sliderDisabled ]), 
            this.tooltip.isVisible && "Always" === this.tooltip.showOn && tooltipElement.forEach(function(tooltipElement) {
                tooltipElement.classList.remove(classNames$__sliderDisabled);
            }), this.wireEvents()) : (addClass([ this.sliderContainer ], [ classNames$__sliderDisabled ]), 
            this.tooltip.isVisible && "Always" === this.tooltip.showOn && tooltipElement.forEach(function(tooltipElement) {
                tooltipElement.classList.add(classNames$__sliderDisabled);
            }), this.unwireEvents());
        }, Slider.prototype.getTheme = function(container) {
            return window.getComputedStyle(container, ":after").getPropertyValue("content").replace(/['"]+/g, "");
        }, Slider.prototype.initRender = function() {
            this.sliderContainer = createElement("div", {
                className: classNames$__sliderContainer
            }), this.element.parentNode.insertBefore(this.sliderContainer, this.element), this.sliderContainer.appendChild(this.element), 
            this.sliderTrack = createElement("div", {
                className: classNames$__sliderTrack
            }), this.element.appendChild(this.sliderTrack), this.element.tabIndex = -1, this.isMaterial = "material" === this.getTheme(this.sliderContainer), 
            this.setHandler(), this.createRangeBar(), this.setOrientClass(), this.hiddenInput = createElement("input", {
                attrs: {
                    type: "hidden",
                    value: isNullOrUndefined(this.value) ? this.min.toString() : this.value.toString(),
                    name: this.element.getAttribute("name") || this.element.getAttribute("id") || "_" + (1e3 * Math.random()).toFixed(0) + "slider",
                    class: classNames$__sliderHiddenInput
                }
            }), this.hiddenInput.tabIndex = -1, this.sliderContainer.appendChild(this.hiddenInput), 
            this.showButtons && this.setButtons(), this.setEnableRTL(), "Range" === this.type ? this.rangeValueUpdate() : this.value = isNullOrUndefined(this.value) ? parseFloat(formatUnit(this.min.toString())) : this.value, 
            this.previousVal = "Range" !== this.type ? this.checkHandleValue(parseFloat(formatUnit(this.value.toString()))) : [ this.checkHandleValue(parseFloat(formatUnit(this.value[0].toString()))), this.checkHandleValue(parseFloat(formatUnit(this.value[1].toString()))) ], 
            this.previousChanged = this.previousVal, this.setValue(), "None" !== this.ticks.placement && this.renderScale(), 
            this.tooltip.isVisible && this.renderTooltip(), this.enabled ? removeClass([ this.sliderContainer ], [ classNames$__sliderDisabled ]) : addClass([ this.sliderContainer ], [ classNames$__sliderDisabled ]), 
            this.readOnly ? addClass([ this.sliderContainer ], [ classNames$__readOnly ]) : removeClass([ this.sliderContainer ], [ classNames$__readOnly ]);
        }, Slider.prototype.createRangeBar = function() {
            "Default" !== this.type && (this.rangeBar = createElement("div", {
                attrs: {
                    class: classNames$__rangeBar
                }
            }), this.element.appendChild(this.rangeBar));
        }, Slider.prototype.setOrientClass = function() {
            "Vertical" !== this.orientation ? (this.sliderContainer.classList.remove(classNames$__verticalSlider), 
            this.sliderContainer.classList.add(classNames$__horizontalSlider), this.firstHandle.setAttribute("aria-orientation", "horizontal"), 
            "Range" === this.type && this.secondHandle.setAttribute("aria-orientation", "horizontal")) : (this.sliderContainer.classList.remove(classNames$__horizontalSlider), 
            this.sliderContainer.classList.add(classNames$__verticalSlider), this.firstHandle.setAttribute("aria-orientation", "vertical"), 
            "Range" === this.type && this.secondHandle.setAttribute("aria-orientation", "vertical"));
        }, Slider.prototype.setAriaAttributes = function(element) {
            var _this = this;
            if ("Range" !== this.type) attributes(element, {
                "aria-valuemin": this.min.toString(),
                "aria-valuemax": this.max.toString()
            }); else {
                [ [ this.min.toString(), this.value[1].toString() ], [ this.value[0].toString(), this.max.toString() ] ].forEach(function(range, index) {
                    var element = 0 === index ? _this.firstHandle : _this.secondHandle;
                    element && attributes(element, {
                        "aria-valuemin": range[0],
                        "aria-valuemax": range[1]
                    });
                });
            }
        }, Slider.prototype.createSecondHandle = function() {
            this.secondHandle = createElement("div", {
                attrs: {
                    class: classNames$__sliderHandle,
                    role: "slider",
                    "aria-labelledby": this.element.id + "_title",
                    tabIndex: "0"
                }
            }), this.secondHandle.classList.add(classNames$__sliderSecondHandle), this.element.appendChild(this.secondHandle), 
            this.isMaterial && this.tooltip.isVisible && (this.secondMaterialHandle = createElement("div", {
                attrs: {
                    class: classNames$__sliderHandle + " " + classNames$__sliderMaterialHandle
                }
            }), this.element.appendChild(this.secondMaterialHandle));
        }, Slider.prototype.createFirstHandle = function() {
            this.firstHandle = createElement("div", {
                attrs: {
                    class: classNames$__sliderHandle,
                    role: "slider",
                    "aria-labelledby": this.element.id + "_title",
                    tabIndex: "0"
                }
            }), this.firstHandle.classList.add(classNames$__sliderFirstHandle), this.element.appendChild(this.firstHandle), 
            this.isMaterial && this.tooltip.isVisible && (this.firstMaterialHandle = createElement("div", {
                attrs: {
                    class: classNames$__sliderHandle + " " + classNames$__sliderMaterialHandle
                }
            }), this.element.appendChild(this.firstMaterialHandle));
        }, Slider.prototype.wireFirstHandleEvt = function(destroy) {
            destroy ? (EventHandler.remove(this.firstHandle, "mousedown touchstart", this.handleFocus), 
            EventHandler.remove(this.firstHandle, "transitionend", this.transitionEnd), EventHandler.remove(this.firstHandle, "mouseenter touchenter", this.handleOver), 
            EventHandler.remove(this.firstHandle, "mouseleave touchend", this.handleLeave)) : (EventHandler.add(this.firstHandle, "mousedown touchstart", this.handleFocus, this), 
            EventHandler.add(this.firstHandle, "transitionend", this.transitionEnd, this), EventHandler.add(this.firstHandle, "mouseenter touchenter", this.handleOver, this), 
            EventHandler.add(this.firstHandle, "mouseleave touchend", this.handleLeave, this));
        }, Slider.prototype.wireSecondHandleEvt = function(destroy) {
            destroy ? (EventHandler.remove(this.secondHandle, "mousedown touchstart", this.handleFocus), 
            EventHandler.remove(this.secondHandle, "transitionend", this.transitionEnd), EventHandler.remove(this.secondHandle, "mouseenter touchenter", this.handleOver), 
            EventHandler.remove(this.secondHandle, "mouseleave touchend", this.handleLeave)) : (EventHandler.add(this.secondHandle, "mousedown touchstart", this.handleFocus, this), 
            EventHandler.add(this.secondHandle, "transitionend", this.transitionEnd, this), 
            EventHandler.add(this.secondHandle, "mouseenter touchenter", this.handleOver, this), 
            EventHandler.add(this.secondHandle, "mouseleave touchend", this.handleLeave, this));
        }, Slider.prototype.handleStart = function() {
            var pos = 1 === this.activeHandle ? this.handlePos1 : this.handlePos2, tooltipElement = 1 === this.activeHandle ? this.firstTooltipElement : this.secondTooltipElement;
            0 === pos && "Range" !== this.type && (this.getHandle().classList.add(classNames$__sliderHandleStart), 
            this.isMaterial && this.tooltip.isVisible && (this.firstMaterialHandle.classList.add(classNames$__sliderHandleStart), 
            tooltipElement && tooltipElement.classList.add(classNames$__sliderTooltipStart)));
        }, Slider.prototype.transitionEnd = function(e) {
            if (this.handleStart(), this.getHandle().style.transition = "none", "Default" !== this.type && (this.rangeBar.style.transition = "none"), 
            this.tooltip.isVisible) {
                var tooltipObj = 1 === this.activeHandle ? this.firstTooltipObj : this.secondTooltipObj, tooltipElement = 1 === this.activeHandle ? this.firstTooltipElement : this.secondTooltipElement;
                this.isMaterial ? tooltipElement.classList.contains(classNames$__materialTooltipOpen) || "transform" === e.propertyName ? ("Default" === this.type && (tooltipElement.style.transition = this.transition.handle), 
                this.refreshTooltip()) : this.openMaterialTooltip() : (tooltipObj.animation = {
                    open: {
                        effect: "None"
                    },
                    close: {
                        effect: "FadeOut",
                        duration: 500
                    }
                }, this.tooltipAnimation());
            }
            "Always" !== this.tooltip.showOn && this.closeTooltip();
        }, Slider.prototype.handleFocusOut = function() {
            this.firstHandle.classList.contains(classNames$__sliderHandleFocused) && this.firstHandle.classList.remove(classNames$__sliderHandleFocused), 
            "Range" === this.type && this.secondHandle.classList.contains(classNames$__sliderHandleFocused) && this.secondHandle.classList.remove(classNames$__sliderHandleFocused);
        }, Slider.prototype.handleFocus = function(e) {
            e.currentTarget === this.firstHandle ? this.firstHandle.classList.add(classNames$__sliderHandleFocused) : this.secondHandle.classList.add(classNames$__sliderHandleFocused);
        }, Slider.prototype.handleOver = function(e) {
            if (this.tooltip.isVisible && "Hover" === this.tooltip.showOn) {
                this.tooltipValue();
                (e.currentTarget === this.firstHandle ? this.firstTooltipObj : this.secondTooltipObj).animation = {
                    open: {
                        effect: "None"
                    },
                    close: {
                        effect: "FadeOut",
                        duration: 500
                    }
                }, e.currentTarget === this.firstHandle ? this.firstTooltipObj.open(this.firstHandle) : this.secondTooltipObj.open(this.secondHandle);
            }
        }, Slider.prototype.handleLeave = function(e) {
            if (this.tooltip.isVisible && "Hover" === this.tooltip.showOn && !e.currentTarget.classList.contains(classNames$__sliderHandleFocused) && !e.currentTarget.classList.contains(classNames$__sliderTabHandle)) {
                this.tooltipValue();
                var tooltipObj = e.currentTarget === this.firstHandle ? this.firstTooltipObj : this.secondTooltipObj;
                e.currentTarget === this.firstHandle ? this.firstTooltipObj.close() : this.secondTooltipObj.close(), 
                tooltipObj.animation = {
                    open: {
                        effect: "None"
                    },
                    close: {
                        effect: "FadeOut",
                        duration: 500
                    }
                };
            }
        }, Slider.prototype.setHandler = function() {
            this.min > this.max && (this.min = this.max), this.createFirstHandle(), "Range" === this.type && this.createSecondHandle();
        }, Slider.prototype.setEnableRTL = function() {
            this.enableRtl && "Vertical" !== this.orientation ? addClass([ this.sliderContainer ], classNames$__rtl) : removeClass([ this.sliderContainer ], classNames$__rtl);
            var preDir = "Vertical" !== this.orientation ? this.horDir : this.verDir;
            this.enableRtl ? (this.horDir = "right", this.verDir = "bottom") : (this.horDir = "left", 
            this.verDir = "bottom");
            preDir !== ("Vertical" !== this.orientation ? this.horDir : this.verDir) && "Horizontal" === this.orientation && (setStyleAttribute(this.firstHandle, {
                right: "",
                left: "auto"
            }), "Range" === this.type && setStyleAttribute(this.secondHandle, {
                top: "",
                left: "auto"
            }));
        }, Slider.prototype.tooltipValue = function() {
            var text, args = {
                value: this.value,
                text: ""
            };
            this.setTooltipContent(), args.text = text = this.firstTooltipObj.content, this.trigger("tooltipChange", args), 
            this.addTooltipClass(args.text), text !== args.text && (this.customAriaText = args.text, 
            this.firstTooltipObj.content = args.text, this.setAriaAttrValue(this.firstHandle), 
            "Range" === this.type && (this.secondTooltipObj.content = args.text, this.setAriaAttrValue(this.secondHandle)));
        }, Slider.prototype.setTooltipContent = function() {
            if ("Range" === this.type) {
                var content_1 = this.formatContent(this.tooltipFormatInfo, !1);
                this.firstTooltipObj.content = content_1, this.secondTooltipObj.content = content_1;
            } else if (!isNullOrUndefined(this.handleVal1)) {
                var content_2 = this.formatContent(this.tooltipFormatInfo, !1);
                this.firstTooltipObj.content = content_2;
            }
        }, Slider.prototype.formatContent = function(formatInfo, ariaContent) {
            var content = "";
            return ariaContent ? ("Range" === this.type ? content = this.enableRtl && "Vertical" !== this.orientation ? isNullOrUndefined(this.tooltip) || isNullOrUndefined(this.tooltip.format) ? this.handleVal2.toString() + " - " + this.handleVal1.toString() : this.formatString(this.handleVal2, formatInfo).elementVal + " - " + this.formatString(this.handleVal1, formatInfo).elementVal : isNullOrUndefined(this.tooltip) || isNullOrUndefined(this.tooltip.format) ? this.handleVal1.toString() + " - " + this.handleVal2.toString() : this.formatString(this.handleVal1, formatInfo).elementVal + " - " + this.formatString(this.handleVal2, formatInfo).elementVal : isNullOrUndefined(this.handleVal1) || (content = isNullOrUndefined(this.tooltip) || isNullOrUndefined(this.tooltip.format) ? this.handleVal1.toString() : this.formatString(this.handleVal1, formatInfo).elementVal), 
            content) : ("Range" === this.type ? content = this.enableRtl && "Vertical" !== this.orientation ? isNullOrUndefined(formatInfo.format) ? this.handleVal2.toString() + " - " + this.handleVal1.toString() : this.formatString(this.handleVal2, formatInfo).formatString + " - " + this.formatString(this.handleVal1, formatInfo).formatString : isNullOrUndefined(formatInfo.format) ? this.handleVal1.toString() + " - " + this.handleVal2.toString() : this.formatString(this.handleVal1, formatInfo).formatString + " - " + this.formatString(this.handleVal2, formatInfo).formatString : isNullOrUndefined(this.handleVal1) || (content = isNullOrUndefined(formatInfo.format) ? this.handleVal1.toString() : this.formatString(this.handleVal1, formatInfo).formatString), 
            content);
        }, Slider.prototype.addTooltipClass = function(content) {
            var _this = this;
            if (this.isMaterial && this.tooltip.isVisible) {
                var count_1 = content.toString().length;
                ("Range" !== this.type ? [ this.firstTooltipElement ] : [ this.firstTooltipElement, this.secondTooltipElement ]).forEach(function(element, index) {
                    if (element) count_1 > 4 ? (element.classList.remove(classNames$__sliderMaterialDefault), 
                    element.classList.contains(classNames$__sliderMaterialRange) || (element.classList.add(classNames$__sliderMaterialRange), 
                    element.style.transform = "scale(1)")) : (element.classList.remove(classNames$__sliderMaterialRange), 
                    element.classList.contains(classNames$__sliderMaterialDefault) || (element.classList.add(classNames$__sliderMaterialDefault), 
                    element.style.transform = _this.getTooltipTransformProperties(_this.previousTooltipClass).rotate)); else {
                        var cssClass = count_1 > 4 ? classNames$__sliderMaterialRange : classNames$__sliderMaterialDefault;
                        index ? _this.secondTooltipObj.cssClass = classNames$__sliderTooltip + " " + cssClass : _this.firstTooltipObj.cssClass = classNames$__sliderTooltip + " " + cssClass;
                    }
                });
            }
        }, Slider.prototype.tooltipPlacement = function() {
            var tooltipPosition;
            tooltipPosition = "Horizontal" === this.orientation ? "Before" === this.tooltip.placement ? "TopCenter" : "BottomCenter" : "Before" === this.tooltip.placement ? "LeftCenter" : "RightCenter", 
            this.firstTooltipObj.position = tooltipPosition, "Range" === this.type && (this.secondTooltipObj.position = tooltipPosition), 
            this.isMaterial && (this.firstTooltipObj.showTipPointer = !0, this.setProperties({
                tooltip: {
                    showOn: "Always"
                }
            }, !0), this.firstTooltipObj.height = 30, "Range" === this.type && (this.secondTooltipObj.showTipPointer = !0, 
            this.secondTooltipObj.height = 30));
        }, Slider.prototype.tooltipBeforeOpen = function(args) {
            var tooltipElement = args.target === this.firstHandle ? this.firstTooltipElement = args.element : this.secondTooltipElement = args.element;
            if (args.target.removeAttribute("aria-describedby"), this.isMaterial && this.tooltip.isVisible) {
                var transformProperties = this.getTooltipTransformProperties(this.previousTooltipClass);
                tooltipElement.firstChild.classList.add(classNames$__materialTooltipHide), this.handleStart(), 
                tooltipElement.firstElementChild.innerText.length > 4 ? tooltipElement.style.transform = transformProperties.translate + " scale(0.01)" : tooltipElement.style.transform = transformProperties.translate + " " + transformProperties.rotate + " scale(0.01)";
            }
        }, Slider.prototype.wireMaterialTooltipEvent = function(destroy) {
            this.isMaterial && this.tooltip.isVisible && (destroy ? (EventHandler.remove(this.firstTooltipElement, "mousedown touchstart", this.sliderDown), 
            "Range" === this.type && EventHandler.remove(this.secondTooltipElement, "mousedown touchstart", this.sliderDown)) : (EventHandler.add(this.firstTooltipElement, "mousedown touchstart", this.sliderDown, this), 
            "Range" === this.type && EventHandler.add(this.secondTooltipElement, "mousedown touchstart", this.sliderDown, this)));
        }, Slider.prototype.tooltipPositionCalculation = function(position) {
            var cssClass;
            switch (position) {
              case "TopCenter":
                cssClass = classNames$__horizontalTooltipBefore;
                break;

              case "BottomCenter":
                cssClass = classNames$__horizontalTooltipAfter;
                break;

              case "LeftCenter":
                cssClass = classNames$__verticalTooltipBefore;
                break;

              case "RightCenter":
                cssClass = classNames$__verticalTooltipAfter;
            }
            return cssClass;
        }, Slider.prototype.getTooltipTransformProperties = function(className) {
            if (this.firstTooltipElement) {
                var position = void 0;
                position = "Horizontal" === this.orientation ? this.firstTooltipElement.clientHeight + 14 - this.firstTooltipElement.clientHeight / 2 : this.firstTooltipElement.clientWidth + 14 - this.firstTooltipElement.clientWidth / 2;
                return "Horizontal" === this.orientation ? className === classNames$__horizontalTooltipBefore ? {
                    rotate: "rotate(45deg)",
                    translate: "translateY(" + position + "px)"
                } : {
                    rotate: "rotate(225deg)",
                    translate: "translateY(" + -position + "px)"
                } : className === classNames$__verticalTooltipBefore ? {
                    rotate: "rotate(-45deg)",
                    translate: "translateX(" + position + "px)"
                } : {
                    rotate: "rotate(-225deg)",
                    translate: "translateX(" + -position + "px)"
                };
            }
        }, Slider.prototype.openMaterialTooltip = function() {
            var _this = this;
            this.refreshTooltip();
            var tooltipElement = 1 === this.activeHandle ? this.firstTooltipElement : this.secondTooltipElement, handle = 1 === this.activeHandle ? this.firstMaterialHandle : this.secondMaterialHandle;
            tooltipElement.firstChild.classList.contains(classNames$__materialTooltipHide) && tooltipElement.firstChild.classList.remove(classNames$__materialTooltipHide), 
            tooltipElement.firstChild.classList.add(classNames$__materialTooltipShow), this.getHandle().style.cursor = "default", 
            tooltipElement.style.transition = this.scaleTransform, tooltipElement.classList.add(classNames$__materialTooltipOpen), 
            handle.style.transform = "scale(0)", tooltipElement.firstElementChild.innerText.length > 4 ? tooltipElement.style.transform = "scale(1)" : tooltipElement.style.transform = this.getTooltipTransformProperties(this.previousTooltipClass).rotate, 
            "Default" === this.type ? setTimeout(function() {
                tooltipElement.style.transition = _this.transition.handle;
            }, 2500) : setTimeout(function() {
                tooltipElement.style.transition = "none";
            }, 2500);
        }, Slider.prototype.checkTooltipPosition = function(args) {
            var tooltipPosition = args.target === this.firstHandle ? this.firstHandleTooltipPosition : this.secondHandleTooltipPosition;
            if (void 0 === tooltipPosition || tooltipPosition !== args.collidedPosition) {
                var tooltipClass = this.tooltipPositionCalculation(args.collidedPosition);
                args.element.classList.remove(this.previousTooltipClass), args.element.classList.add(tooltipClass), 
                this.previousTooltipClass = tooltipClass, args.element.style.transform && args.element.classList.contains(classNames$__materialTooltipOpen) && args.element.firstElementChild.innerText.length < 4 && (args.element.style.transform = this.getTooltipTransformProperties(this.previousTooltipClass).rotate), 
                args.target === this.firstHandle ? this.firstHandleTooltipPosition = args.collidedPosition : this.secondHandleTooltipPosition = args.collidedPosition;
            }
        }, Slider.prototype.renderTooltip = function() {
            "Auto" === this.tooltip.showOn && this.setProperties({
                tooltip: {
                    showOn: "Hover"
                }
            }, !0), this.firstTooltipObj = new Tooltip({
                showTipPointer: !1,
                cssClass: classNames$__sliderTooltip,
                animation: {
                    open: {
                        effect: "None"
                    },
                    close: {
                        effect: "None"
                    }
                },
                opensOn: "Custom",
                beforeOpen: this.tooltipBeforeOpen.bind(this),
                beforeCollision: this.checkTooltipPosition.bind(this),
                afterClose: this.tooltipAfterClose.bind(this)
            }), this.firstTooltipObj.appendTo(this.firstHandle), "Range" === this.type && (this.secondTooltipObj = new Tooltip({
                showTipPointer: !1,
                cssClass: classNames$__sliderTooltip,
                animation: {
                    open: {
                        effect: "None"
                    },
                    close: {
                        effect: "None"
                    }
                },
                opensOn: "Custom",
                beforeOpen: this.tooltipBeforeOpen.bind(this),
                beforeCollision: this.checkTooltipPosition.bind(this),
                afterClose: this.tooltipAfterClose.bind(this)
            }), this.secondTooltipObj.appendTo(this.secondHandle)), this.tooltipPlacement(), 
            this.firstHandle.style.transition = "none", "Default" !== this.type && (this.rangeBar.style.transition = "none"), 
            "Range" === this.type && (this.secondHandle.style.transition = "none"), this.isMaterial && (this.sliderContainer.classList.add(classNames$__materialSlider), 
            this.tooltipValue(), this.firstTooltipObj.open(this.firstHandle), "Range" === this.type && this.secondTooltipObj.open(this.secondHandle));
        }, Slider.prototype.tooltipAfterClose = function(args) {
            args.element === this.firstTooltipElement ? this.firstTooltipElement = void 0 : this.secondTooltipElement = void 0;
        }, Slider.prototype.setButtons = function() {
            this.firstBtn = createElement("div", {
                className: classNames$__sliderButton + " " + classNames$__firstButton
            }), this.firstBtn.appendChild(createElement("span", {
                className: classNames$__sliderButtonIcon
            })), this.firstBtn.tabIndex = -1, this.secondBtn = createElement("div", {
                className: classNames$__sliderButton + " " + classNames$__secondButton
            }), this.secondBtn.appendChild(createElement("span", {
                className: classNames$__sliderButtonIcon
            })), this.secondBtn.tabIndex = -1, this.sliderContainer.classList.add(classNames$__sliderButtonClass), 
            this.sliderContainer.appendChild(this.firstBtn), this.sliderContainer.appendChild(this.secondBtn), 
            this.sliderContainer.appendChild(this.element), this.buttonTitle();
        }, Slider.prototype.buttonTitle = function() {
            var enabledRTL = this.enableRtl && "Vertical" !== this.orientation;
            this.l10n.setLocale(this.locale);
            var decrementTitle = this.l10n.getConstant("decrementTitle"), incrementTitle = this.l10n.getConstant("incrementTitle");
            attributes(enabledRTL ? this.secondBtn : this.firstBtn, {
                "aria-label": decrementTitle,
                title: decrementTitle
            }), attributes(enabledRTL ? this.firstBtn : this.secondBtn, {
                "aria-label": incrementTitle,
                title: incrementTitle
            });
        }, Slider.prototype.buttonFocusOut = function() {
            this.isMaterial && (this.getHandle().style.transform = this.getHandle().style.transform.replace("scale(1.5)", "scale(1)"));
        }, Slider.prototype.repeatButton = function(args) {
            args.target.parentElement;
            !(1 === this.activeHandle ? this.firstTooltipElement : this.secondTooltipElement) && this.tooltip.isVisible && this.openTooltip();
            var value, hVal = this.handleValueUpdate(), enabledRTL = this.enableRtl && "Vertical" !== this.orientation;
            args.target.parentElement.classList.contains(classNames$__firstButton) || args.target.classList.contains(classNames$__firstButton) ? value = enabledRTL ? this.add(hVal, parseFloat(this.step.toString()), !0) : this.add(hVal, parseFloat(this.step.toString()), !1) : (args.target.parentElement.classList.contains(classNames$__secondButton) || args.target.classList.contains(classNames$__secondButton)) && (value = enabledRTL ? this.add(hVal, parseFloat(this.step.toString()), !1) : this.add(hVal, parseFloat(this.step.toString()), !0)), 
            value >= this.min && value <= this.max && (this.changeHandleValue(value), this.refreshTooltipOnMove());
        }, Slider.prototype.repeatHandlerMouse = function(args) {
            args.preventDefault(), "mousedown" !== args.type && "touchstart" !== args.type || (this.buttonClick(args), 
            this.repeatInterval = setInterval(this.repeatButton.bind(this), 180, args));
        }, Slider.prototype.materialChange = function() {
            -1 === this.getHandle().style.transform.indexOf("scale(1.5") && (this.getHandle().style.transform = "scale(1.5)");
        }, Slider.prototype.repeatHandlerUp = function(e) {
            this.changeEvent("changed"), this.tooltip.isVisible && "Always" !== this.tooltip.showOn && !this.isMaterial && this.closeTooltip(), 
            clearInterval(this.repeatInterval), this.getHandle().focus();
        }, Slider.prototype.renderScale = function() {
            var orien = "Vertical" === this.orientation ? "v" : "h";
            this.noOfDecimals = this.numberOfDecimals(this.step), this.ul = createElement("ul", {
                className: classNames$__scale + " e-" + orien + "-scale " + classNames$__tick + "-" + this.ticks.placement.toLowerCase(),
                attrs: {
                    role: "presentation",
                    tabIndex: "-1",
                    "aria-hidden": "true"
                }
            }), Browser.isAndroid && "h" === orien && this.ul.classList.add(classNames$__sliderTickPosition);
            var smallStep = this.ticks.smallStep;
            this.ticks.showSmallTicks ? smallStep <= 0 && (smallStep = parseFloat(formatUnit(this.step))) : smallStep = this.ticks.largeStep > 0 ? this.ticks.largeStep : parseFloat(formatUnit(this.max)) - parseFloat(formatUnit(this.min));
            var min = this.fractionalToInteger(this.min), max = this.fractionalToInteger(this.max), steps = this.fractionalToInteger(smallStep), count = Math.abs((max - min) / steps);
            this.element.appendChild(this.ul);
            var li, start = parseFloat(this.min.toString());
            "v" === orien && (start = parseFloat(this.max.toString()));
            var left = 0, tickWidth = 100 / count;
            tickWidth === 1 / 0 && (tickWidth = 5);
            for (var i = 0; i <= count; i++) {
                li = createElement("li", {
                    attrs: {
                        class: classNames$__tick,
                        title: start.toString(),
                        role: "presentation",
                        tabIndex: "-1",
                        "aria-hidden": "true"
                    }
                });
                var islargeTick = void 0;
                if (0 === this.numberOfDecimals(this.max) && 0 === this.numberOfDecimals(this.min) && 0 === this.numberOfDecimals(this.step)) islargeTick = "h" === orien ? (start - parseFloat(this.min.toString())) % this.ticks.largeStep == 0 : Math.abs(start - parseFloat(this.max.toString())) % this.ticks.largeStep == 0; else {
                    var largestep = this.fractionalToInteger(this.ticks.largeStep);
                    islargeTick = (this.fractionalToInteger(start) - min) % largestep == 0;
                }
                islargeTick && li.classList.add(classNames$__large), "h" === orien ? li.style.width = tickWidth + "%" : li.style.height = tickWidth + "%";
                var repeat = islargeTick ? "Both" === this.ticks.placement ? 2 : 1 : 0;
                if (islargeTick) for (var j = 0; j < repeat; j++) this.createTick(li, start); else this.formatTicksValue(li, start);
                this.ul.appendChild(li), this.tickElementCollection.push(li);
                var decimalPoints = void 0;
                decimalPoints = this.numberOfDecimals(smallStep) > this.numberOfDecimals(start) ? this.numberOfDecimals(smallStep) : this.numberOfDecimals(start), 
                start = "h" === orien ? this.makeRoundNumber(start + smallStep, decimalPoints) : this.makeRoundNumber(start - smallStep, decimalPoints), 
                left = this.makeRoundNumber(left + smallStep, decimalPoints);
            }
            this.firstChild = this.ul.firstElementChild, this.lastChild = this.ul.lastElementChild, 
            this.firstChild.classList.add(classNames$__sliderFirstTick), this.lastChild.classList.add(classNames$__sliderLastTick), 
            this.sliderContainer.classList.add(classNames$__scale + "-" + this.ticks.placement.toLowerCase()), 
            "h" === orien ? (this.firstChild.style.width = tickWidth / 2 + "%", this.lastChild.style.width = tickWidth / 2 + "%") : (this.firstChild.style.height = tickWidth / 2 + "%", 
            this.lastChild.style.height = tickWidth / 2 + "%");
            var eventArgs = {
                ticksWrapper: this.ul,
                tickElements: this.tickElementCollection
            };
            this.trigger("renderedTicks", eventArgs), this.scaleAlignment();
        }, Slider.prototype.createTick = function(li, start) {
            var span = createElement("span", {
                className: classNames$__tickValue + " " + classNames$__tick + "-" + this.ticks.placement.toLowerCase(),
                attrs: {
                    role: "presentation",
                    tabIndex: "-1",
                    "aria-hidden": "true"
                }
            });
            li.appendChild(span), span.innerHTML = this.formatTicksValue(li, start);
        }, Slider.prototype.formatTicksValue = function(li, start) {
            var tickText = this.formatNumber(start), eventArgs = {
                value: start,
                text: isNullOrUndefined(this.ticks) || isNullOrUndefined(this.ticks.format) ? tickText : this.formatString(start, this.ticksFormatInfo).formatString,
                tickElement: li
            };
            return this.trigger("renderingTicks", eventArgs), li.setAttribute("title", eventArgs.text.toString()), 
            eventArgs.text.toString();
        }, Slider.prototype.scaleAlignment = function() {
            this.tickValuePosition();
            this.orientation;
            "Vertical" === this.orientation ? this.element.getBoundingClientRect().width <= 15 ? this.sliderContainer.classList.add(classNames$__sliderSmallSize) : this.sliderContainer.classList.remove(classNames$__sliderSmallSize) : this.element.getBoundingClientRect().height <= 15 ? this.sliderContainer.classList.add(classNames$__sliderSmallSize) : this.sliderContainer.classList.remove(classNames$__sliderSmallSize);
        }, Slider.prototype.tickValuePosition = function() {
            var firstChild, first = this.firstChild.getBoundingClientRect(), smallStep = this.ticks.smallStep, count = Math.abs(parseFloat(formatUnit(this.max)) - parseFloat(formatUnit(this.min))) / smallStep;
            this.firstChild.children.length > 0 && (firstChild = this.firstChild.children[0].getBoundingClientRect());
            var other, tickElements = [ this.sliderContainer.querySelectorAll("." + classNames$__tick + "." + classNames$__large + " ." + classNames$__tickValue) ];
            other = "Both" === this.ticks.placement ? [].slice.call(tickElements[0], 2) : [].slice.call(tickElements[0], 1);
            for (var tickWidth = "Vertical" === this.orientation ? 2 * first.height : 2 * first.width, i = 0; i < this.firstChild.children.length; i++) "Vertical" === this.orientation ? this.firstChild.children[i].style.top = -firstChild.height / 2 + "px" : this.enableRtl ? this.firstChild.children[i].style.left = (tickWidth - this.firstChild.children[i].getBoundingClientRect().width) / 2 + "px" : this.firstChild.children[i].style.left = -firstChild.width / 2 + "px";
            for (i = 0; i < other.length; i++) {
                var otherChild = other[i].getBoundingClientRect();
                "Vertical" === this.orientation ? setStyleAttribute(other[i], {
                    top: (tickWidth - otherChild.height) / 2 + "px"
                }) : setStyleAttribute(other[i], {
                    left: (tickWidth - otherChild.width) / 2 + "px"
                });
            }
            this.enableRtl && this.lastChild.children.length && 0 !== count && (this.lastChild.children[0].style.left = -this.lastChild.getBoundingClientRect().width / 2 + "px", 
            "Both" === this.ticks.placement && (this.lastChild.children[1].style.left = -this.lastChild.getBoundingClientRect().width / 2 + "px")), 
            0 === count && ("Horizontal" === this.orientation && (this.enableRtl ? (this.firstChild.classList.remove(classNames$__sliderLastTick), 
            this.firstChild.style.right = this.firstHandle.style.right, this.firstChild.children[0].style.left = this.firstChild.getBoundingClientRect().width / 2 + 2 + "px", 
            "Both" === this.ticks.placement && (this.firstChild.children[1].style.left = this.firstChild.getBoundingClientRect().width / 2 + 2 + "px")) : (this.firstChild.classList.remove(classNames$__sliderLastTick), 
            this.firstChild.style.left = this.firstHandle.style.left)), "Vertical" === this.orientation && this.firstChild.classList.remove(classNames$__sliderLastTick));
        }, Slider.prototype.setAriaAttrValue = function(element) {
            var ariaValueText, isTickFormatted = !isNullOrUndefined(this.ticks) && !isNullOrUndefined(this.ticks.format), text = isTickFormatted ? this.formatContent(this.tooltipFormatInfo, !1) : this.formatContent(this.ticksFormatInfo, !1), valuenow = isTickFormatted ? this.formatContent(this.ticksFormatInfo, !0) : this.formatContent(this.tooltipFormatInfo, !0);
            ariaValueText = 2 === (text = this.customAriaText ? this.customAriaText : text).split(" - ").length ? text.split(" - ") : [ text, text ], 
            this.setAriaAttributes(element), "Range" !== this.type ? attributes(element, {
                "aria-valuenow": valuenow,
                "aria-valuetext": text
            }) : this.enableRtl ? element === this.firstHandle ? attributes(element, {
                "aria-valuenow": valuenow.split(" - ")[1],
                "aria-valuetext": ariaValueText[1]
            }) : attributes(element, {
                "aria-valuenow": valuenow.split(" - ")[0],
                "aria-valuetext": ariaValueText[0]
            }) : element === this.firstHandle ? attributes(element, {
                "aria-valuenow": valuenow.split(" - ")[0],
                "aria-valuetext": ariaValueText[0]
            }) : attributes(element, {
                "aria-valuenow": valuenow.split(" - ")[1],
                "aria-valuetext": ariaValueText[1]
            });
        }, Slider.prototype.handleValueUpdate = function() {
            return "Range" === this.type ? 1 === this.activeHandle ? this.handleVal1 : this.handleVal2 : this.handleVal1;
        }, Slider.prototype.buttonClick = function(args) {
            var value, enabledRTL = this.enableRtl && "Vertical" !== this.orientation, hVal = this.handleValueUpdate();
            40 === args.keyCode || 37 === args.keyCode || args.currentTarget.classList.contains(classNames$__firstButton) ? value = enabledRTL ? this.add(hVal, parseFloat(this.step.toString()), !0) : this.add(hVal, parseFloat(this.step.toString()), !1) : 38 === args.keyCode || 39 === args.keyCode || args.currentTarget.classList.contains(classNames$__secondButton) ? value = enabledRTL ? this.add(hVal, parseFloat(this.step.toString()), !1) : this.add(hVal, parseFloat(this.step.toString()), !0) : 33 === args.keyCode || args.currentTarget.classList.contains(classNames$__firstButton) ? value = enabledRTL ? this.add(hVal, parseFloat(this.ticks.largeStep.toString()), !1) : this.add(hVal, parseFloat(this.ticks.largeStep.toString()), !0) : 34 === args.keyCode || args.currentTarget.classList.contains(classNames$__secondButton) ? value = enabledRTL ? this.add(hVal, parseFloat(this.ticks.largeStep.toString()), !0) : this.add(hVal, parseFloat(this.ticks.largeStep.toString()), !1) : 36 === args.keyCode ? value = parseFloat(this.min.toString()) : 35 === args.keyCode && (value = parseFloat(this.max.toString())), 
            this.changeHandleValue(value), !this.isMaterial || this.tooltip.isVisible || this.getHandle().classList.contains(classNames$__sliderTabHandle) || this.materialChange(), 
            this.tooltipAnimation(), this.getHandle().focus(), args.currentTarget.classList.contains(classNames$__firstButton) && EventHandler.add(this.firstBtn, "mouseup touchend", this.buttonUp, this), 
            args.currentTarget.classList.contains(classNames$__secondButton) && EventHandler.add(this.secondBtn, "mouseup touchend", this.buttonUp, this);
        }, Slider.prototype.tooltipAnimation = function() {
            if (this.tooltip.isVisible) {
                var tooltipObj = 1 === this.activeHandle ? this.firstTooltipObj : this.secondTooltipObj, tooltipElement = 1 === this.activeHandle ? this.firstTooltipElement : this.secondTooltipElement;
                this.isMaterial ? tooltipElement.classList.contains(classNames$__materialTooltipOpen) ? this.refreshTooltip() : this.openMaterialTooltip() : (tooltipObj.animation = {
                    open: {
                        effect: "None"
                    },
                    close: {
                        effect: "FadeOut",
                        duration: 500
                    }
                }, this.openTooltip());
            }
        }, Slider.prototype.buttonUp = function(args) {
            if (this.tooltip.isVisible && !this.isMaterial) {
                (1 === this.activeHandle ? this.firstTooltipObj : this.secondTooltipObj).animation = {
                    open: {
                        effect: "None"
                    },
                    close: {
                        effect: "None"
                    }
                };
            }
            args.currentTarget.classList.contains(classNames$__firstButton) && EventHandler.remove(this.firstBtn, "mouseup touchend", this.buttonUp), 
            args.currentTarget.classList.contains(classNames$__secondButton) && EventHandler.remove(this.secondBtn, "mouseup touchend", this.buttonUp);
        }, Slider.prototype.setRangeBar = function() {
            "Horizontal" === this.orientation ? "MinRange" === this.type ? (this.enableRtl ? this.rangeBar.style.right = "0px" : this.rangeBar.style.left = "0px", 
            setStyleAttribute(this.rangeBar, {
                width: isNullOrUndefined(this.handlePos1) ? 0 : this.handlePos1 + "px"
            })) : (this.enableRtl ? this.rangeBar.style.right = this.handlePos1 + "px" : this.rangeBar.style.left = this.handlePos1 + "px", 
            setStyleAttribute(this.rangeBar, {
                width: this.handlePos2 - this.handlePos1 + "px"
            })) : "MinRange" === this.type ? (this.rangeBar.style.bottom = "0px", setStyleAttribute(this.rangeBar, {
                height: isNullOrUndefined(this.handlePos1) ? 0 : this.handlePos1 + "px"
            })) : (this.rangeBar.style.bottom = this.handlePos1 + "px", setStyleAttribute(this.rangeBar, {
                height: this.handlePos2 - this.handlePos1 + "px"
            }));
        }, Slider.prototype.setValue = function() {
            this.handleVal1 = isNullOrUndefined(this.value) ? this.checkHandleValue(parseFloat(this.min.toString())) : this.checkHandleValue(parseFloat(this.value.toString())), 
            this.handlePos1 = this.checkHandlePosition(this.handleVal1), this.preHandlePos1 = this.handlePos1, 
            isNullOrUndefined(this.activeHandle) ? "Range" === this.type ? this.activeHandle = 2 : this.activeHandle = 1 : this.activeHandle = this.activeHandle, 
            "Default" === this.type || "MinRange" === this.type ? (this.setHandlePosition(), 
            this.handleStart(), this.value = this.handleVal1, this.setAriaAttrValue(this.firstHandle), 
            this.changeEvent("changed")) : this.validateRangeValue(), "Default" !== this.type && this.setRangeBar();
        }, Slider.prototype.rangeValueUpdate = function() {
            null !== this.value && "object" == typeof this.value || (this.value = [ parseFloat(formatUnit(this.min)), parseFloat(formatUnit(this.max)) ]);
        }, Slider.prototype.validateRangeValue = function() {
            this.rangeValueUpdate(), this.setRangeValue();
        }, Slider.prototype.modifyZindex = function() {
            "Range" === this.type ? 1 === this.activeHandle ? (this.firstHandle.style.zIndex = this.zIndex + 4 + "", 
            this.secondHandle.style.zIndex = this.zIndex + 3 + "", this.isMaterial && this.tooltip.isVisible && this.firstTooltipElement && this.secondTooltipElement && (this.firstTooltipElement.style.zIndex = this.zIndex + 4 + "", 
            this.secondTooltipElement.style.zIndex = this.zIndex + 3 + "")) : (this.firstHandle.style.zIndex = this.zIndex + 3 + "", 
            this.secondHandle.style.zIndex = this.zIndex + 4 + "", this.isMaterial && this.tooltip.isVisible && this.firstTooltipElement && this.secondTooltipElement && (this.firstTooltipElement.style.zIndex = this.zIndex + 3 + "", 
            this.secondTooltipElement.style.zIndex = this.zIndex + 4 + "")) : this.isMaterial && this.tooltip.isVisible && this.firstTooltipElement && (this.firstTooltipElement.style.zIndex = this.zIndex + 4 + "");
        }, Slider.prototype.setHandlePosition = function() {
            var handle, tooltipElement, _this = this, pos = 1 === this.activeHandle ? this.handlePos1 : this.handlePos2;
            1 === this.activeHandle ? this.handleVal1 : this.handleVal2;
            this.isMaterial && this.tooltip.isVisible ? (tooltipElement = 1 === this.activeHandle ? this.firstTooltipElement : this.secondTooltipElement, 
            handle = [ this.getHandle(), 1 === this.activeHandle ? this.firstMaterialHandle : this.secondMaterialHandle ]) : handle = [ this.getHandle() ], 
            this.tooltip.isVisible && 0 === pos && "Range" !== this.type ? (handle[0].classList.add(classNames$__sliderHandleStart), 
            this.isMaterial && (handle[1].classList.add(classNames$__sliderHandleStart), tooltipElement && tooltipElement.classList.add(classNames$__sliderTooltipStart))) : (handle[0].classList.remove(classNames$__sliderHandleStart), 
            this.tooltip.isVisible && this.isMaterial && (handle[1].classList.remove(classNames$__sliderHandleStart), 
            tooltipElement && tooltipElement.classList.remove(classNames$__sliderTooltipStart))), 
            handle.forEach(function(handle) {
                "Horizontal" === _this.orientation ? _this.enableRtl ? handle.style.right = pos + "px" : handle.style.left = pos + "px" : handle.style.bottom = pos + "px";
            }), this.changeEvent("change");
        }, Slider.prototype.getHandle = function() {
            return 1 === this.activeHandle ? this.firstHandle : this.secondHandle;
        }, Slider.prototype.setRangeValue = function() {
            this.activeHandle;
            this.updateRangeValue(), this.activeHandle = 1, this.setHandlePosition(), this.activeHandle = 2, 
            this.setHandlePosition(), this.activeHandle = 1;
        }, Slider.prototype.changeEvent = function(eventName) {
            var previous = "change" === eventName ? this.previousVal : this.previousChanged;
            if ("Range" !== this.type) this.setProperties({
                value: this.handleVal1
            }, !0), previous !== this.value && (this.trigger(eventName, this.changeEventArgs(eventName)), 
            this.setPreviousVal(eventName, this.value)), this.setAriaAttrValue(this.firstHandle); else {
                var value = this.value = [ this.handleVal1, this.handleVal2 ];
                this.setProperties({
                    value: value
                }, !0), (previous.length === this.value.length && this.value[0] !== previous[0] || this.value[1] !== previous[1]) && (this.trigger(eventName, this.changeEventArgs(eventName)), 
                this.setPreviousVal(eventName, this.value)), this.setAriaAttrValue(this.getHandle());
            }
            this.hiddenInput.value = this.value.toString();
        }, Slider.prototype.changeEventArgs = function(eventName) {
            var eventArgs;
            return this.tooltip.isVisible && this.firstTooltipObj ? (this.tooltipValue(), eventArgs = {
                value: this.value,
                previousValue: "change" === eventName ? this.previousVal : this.previousChanged,
                action: eventName,
                text: this.firstTooltipObj.content
            }) : eventArgs = {
                value: this.value,
                previousValue: "change" === eventName ? this.previousVal : this.previousChanged,
                action: eventName,
                text: isNullOrUndefined(this.ticksFormatInfo.format) ? this.value.toString() : "Range" !== this.type ? this.formatString(this.value, this.ticksFormatInfo).formatString : this.formatString(this.value[0], this.ticksFormatInfo).formatString + " - " + this.formatString(this.value[1], this.ticksFormatInfo).formatString
            }, eventArgs;
        }, Slider.prototype.setPreviousVal = function(eventName, value) {
            "change" === eventName ? this.previousVal = value : this.previousChanged = value;
        }, Slider.prototype.updateRangeValue = function() {
            var values = this.value.toString().split(",").map(Number);
            this.enableRtl && "Vertical" !== this.orientation || this.rtl ? this.value = [ values[1], values[0] ] : this.value = [ values[0], values[1] ], 
            this.enableRtl && "Vertical" !== this.orientation ? (this.handleVal1 = this.checkHandleValue(this.value[1]), 
            this.handleVal2 = this.checkHandleValue(this.value[0])) : (this.handleVal1 = this.checkHandleValue(this.value[0]), 
            this.handleVal2 = this.checkHandleValue(this.value[1])), this.handlePos1 = this.checkHandlePosition(this.handleVal1), 
            this.handlePos2 = this.checkHandlePosition(this.handleVal2), this.handlePos1 > this.handlePos2 && (this.handlePos1 = this.handlePos2, 
            this.handleVal1 = this.handleVal2), this.preHandlePos1 = this.handlePos1, this.preHandlePos2 = this.handlePos2;
        }, Slider.prototype.checkHandlePosition = function(value) {
            var pos;
            return value = 100 * (value - parseFloat(formatUnit(this.min))) / (parseFloat(formatUnit(this.max)) - parseFloat(formatUnit(this.min))), 
            pos = "Horizontal" === this.orientation ? this.element.getBoundingClientRect().width * (value / 100) : this.element.getBoundingClientRect().height * (value / 100), 
            parseFloat(formatUnit(this.max)) === parseFloat(formatUnit(this.min)) && (pos = "Horizontal" === this.orientation ? this.element.getBoundingClientRect().width : this.element.getBoundingClientRect().height), 
            pos;
        }, Slider.prototype.checkHandleValue = function(value) {
            if (this.min > this.max && (this.min = this.max), this.min === this.max) return parseFloat(formatUnit(this.max));
            var handle = this.tempStartEnd();
            return value < handle.start ? value = handle.start : value > handle.end && (value = handle.end), 
            value;
        }, Slider.prototype.onResize = function() {
            var _this = this;
            this.firstHandle.style.transition = "none", "Default" !== this.type && (this.rangeBar.style.transition = "none"), 
            "Range" === this.type && (this.secondHandle.style.transition = "none"), this.handlePos1 = this.checkHandlePosition(this.handleVal1), 
            this.handleVal2 && (this.handlePos2 = this.checkHandlePosition(this.handleVal2)), 
            "Horizontal" === this.orientation ? (this.enableRtl ? this.firstHandle.style.right = this.handlePos1 + "px" : this.firstHandle.style.left = this.handlePos1 + "px", 
            this.isMaterial && this.tooltip.isVisible && this.firstMaterialHandle && (this.enableRtl ? this.firstMaterialHandle.style.right = this.handlePos1 + "px" : this.firstMaterialHandle.style.left = this.handlePos1 + "px"), 
            "MinRange" === this.type ? (this.enableRtl ? this.rangeBar.style.right = "0px" : this.rangeBar.style.left = "0px", 
            setStyleAttribute(this.rangeBar, {
                width: isNullOrUndefined(this.handlePos1) ? 0 : this.handlePos1 + "px"
            })) : "Range" === this.type && (this.enableRtl ? this.secondHandle.style.right = this.handlePos2 + "px" : this.secondHandle.style.left = this.handlePos2 + "px", 
            this.isMaterial && this.tooltip.isVisible && this.secondMaterialHandle && (this.enableRtl ? this.secondMaterialHandle.style.right = this.handlePos2 + "px" : this.secondMaterialHandle.style.left = this.handlePos2 + "px"), 
            this.enableRtl ? this.rangeBar.style.right = this.handlePos1 + "px" : this.rangeBar.style.left = this.handlePos1 + "px", 
            setStyleAttribute(this.rangeBar, {
                width: this.handlePos2 - this.handlePos1 + "px"
            }))) : (this.firstHandle.style.bottom = this.handlePos1 + "px", this.isMaterial && this.tooltip.isVisible && this.firstMaterialHandle && (this.firstMaterialHandle.style.bottom = this.handlePos1 + "px"), 
            "MinRange" === this.type ? (this.rangeBar.style.bottom = "0px", setStyleAttribute(this.rangeBar, {
                height: isNullOrUndefined(this.handlePos1) ? 0 : this.handlePos1 + "px"
            })) : "Range" === this.type && (this.secondHandle.style.bottom = this.handlePos2 + "px", 
            this.isMaterial && this.tooltip.isVisible && this.secondMaterialHandle && (this.secondMaterialHandle.style.bottom = this.handlePos2 + "px"), 
            this.rangeBar.style.bottom = this.handlePos1 + "px", setStyleAttribute(this.rangeBar, {
                height: this.handlePos2 - this.handlePos1 + "px"
            }))), "None" !== this.ticks.placement && this.ul && (this.removeElement(this.ul), 
            this.renderScale()), this.tooltip.isVisible || setTimeout(function() {
                _this.firstHandle.style.transition = _this.scaleTransform, "Range" === _this.type && (_this.secondHandle.style.transition = _this.scaleTransform);
            }), this.refreshTooltip();
        }, Slider.prototype.changeHandleValue = function(value) {
            var position = null;
            1 === this.activeHandle ? (this.handleVal1 = this.checkHandleValue(value), this.handlePos1 = this.checkHandlePosition(this.handleVal1), 
            "Range" === this.type && this.handlePos1 > this.handlePos2 && (this.handlePos1 = this.handlePos2, 
            this.handleVal1 = this.handleVal2), this.handlePos1 !== this.preHandlePos1 && (position = this.preHandlePos1 = this.handlePos1), 
            this.modifyZindex()) : (this.handleVal2 = this.checkHandleValue(value), this.handlePos2 = this.checkHandlePosition(this.handleVal2), 
            "Range" === this.type && this.handlePos2 < this.handlePos1 && (this.handlePos2 = this.handlePos1, 
            this.handleVal2 = this.handleVal1), this.handlePos2 !== this.preHandlePos2 && (position = this.preHandlePos2 = this.handlePos2), 
            this.modifyZindex()), null !== position && ("Default" !== this.type && this.setRangeBar(), 
            this.setHandlePosition());
        }, Slider.prototype.tempStartEnd = function() {
            return this.min > this.max ? {
                start: this.max,
                end: this.min
            } : {
                start: this.min,
                end: this.max
            };
        }, Slider.prototype.xyToPosition = function(position) {
            if (this.min === this.max) return 100;
            if ("Horizontal" === this.orientation) {
                var left = position.x - this.element.getBoundingClientRect().left, num = this.element.offsetWidth / 100;
                this.val = left / num;
            } else {
                var top_1 = position.y - this.element.getBoundingClientRect().top;
                num = this.element.offsetHeight / 100;
                this.val = 100 - top_1 / num;
            }
            var val = this.stepValueCalculation(this.val);
            return val < 0 ? val = 0 : val > 100 && (val = 100), this.enableRtl && "Vertical" !== this.orientation && (val = 100 - val), 
            "Horizontal" === this.orientation ? this.element.getBoundingClientRect().width * (val / 100) : this.element.getBoundingClientRect().height * (val / 100);
        }, Slider.prototype.stepValueCalculation = function(value) {
            0 === this.step && (this.step = 1);
            var percentStep = parseFloat(formatUnit(this.step)) / ((parseFloat(formatUnit(this.max)) - parseFloat(formatUnit(this.min))) / 100), remain = value % Math.abs(percentStep);
            return 0 !== remain && (percentStep / 2 > remain ? value -= remain : value += Math.abs(percentStep) - remain), 
            value;
        }, Slider.prototype.add = function(a, b, addition) {
            var x = Math.pow(10, 3);
            return addition ? (Math.round(a * x) + Math.round(b * x)) / x : (Math.round(a * x) - Math.round(b * x)) / x;
        }, Slider.prototype.round = function(a) {
            var f = this.step.toString().split(".");
            return f[1] ? parseFloat(a.toFixed(f[1].length)) : Math.round(a);
        }, Slider.prototype.positionToValue = function(pos) {
            var val, diff = parseFloat(formatUnit(this.max)) - parseFloat(formatUnit(this.min));
            val = "Horizontal" === this.orientation ? pos / this.element.getBoundingClientRect().width * diff : pos / this.element.getBoundingClientRect().height * diff;
            return this.add(val, parseFloat(this.min.toString()), !0);
        }, Slider.prototype.sliderBarClick = function(evt) {
            evt.preventDefault();
            var pos;
            "mousedown" === evt.type || "click" === evt.type ? pos = {
                x: evt.clientX,
                y: evt.clientY
            } : "touchstart" === evt.type && (pos = {
                x: evt.changedTouches[0].clientX,
                y: evt.changedTouches[0].clientY
            });
            var handlepos = this.xyToPosition(pos), handleVal = this.positionToValue(handlepos);
            if ("Range" !== this.type && (this.handleVal1 = handleVal, this.firstHandle.classList.add(classNames$__sliderActiveHandle)), 
            "Range" === this.type && this.handlePos2 - handlepos < handlepos - this.handlePos1 ? (this.secondHandle.classList.add(classNames$__sliderActiveHandle), 
            this.handlePos2 = this.preHandlePos2 = handlepos, this.handleVal2 = handleVal, this.activeHandle = 2, 
            this.modifyZindex(), this.secondHandle.focus()) : (this.firstHandle.classList.add(classNames$__sliderActiveHandle), 
            this.handlePos1 = this.preHandlePos1 = handlepos, this.handleVal1 = handleVal, this.activeHandle = 1, 
            this.modifyZindex(), this.firstHandle.focus()), this.isMaterial && this.tooltip.isVisible) {
                (1 === this.activeHandle ? this.firstTooltipElement : this.secondTooltipElement).classList.add(classNames$__materialTooltipActive);
            }
            var focusedElement = this.element.querySelector("." + classNames$__sliderTabHandle);
            focusedElement && this.getHandle() !== focusedElement && focusedElement.classList.remove(classNames$__sliderTabHandle);
            var handle = 1 === this.activeHandle ? this.firstHandle : this.secondHandle;
            if (evt.target === handle) return !this.isMaterial || this.tooltip.isVisible || this.getHandle().classList.contains(classNames$__sliderTabHandle) || this.materialChange(), 
            void this.tooltipAnimation();
            if (this.checkRepeatedValue(handleVal)) {
                var transition = this.isMaterial && this.tooltip.isVisible ? this.transitionOnMaterialTooltip : this.transition;
                this.getHandle().style.transition = transition.handle, "Default" !== this.type && (this.rangeBar.style.transition = transition.rangeBar), 
                this.setHandlePosition(), "Default" !== this.type && this.setRangeBar();
            }
        }, Slider.prototype.refreshTooltipOnMove = function() {
            this.tooltip.isVisible && (this.tooltipValue(), 1 === this.activeHandle ? this.firstTooltipObj.refresh(this.firstHandle) : this.secondTooltipObj.refresh(this.secondHandle));
        }, Slider.prototype.sliderDown = function(event) {
            event.preventDefault(), this.sliderBarClick(event), EventHandler.add(document, "mousemove touchmove", this.sliderBarMove, this), 
            EventHandler.add(document, "mouseup touchend", this.sliderBarUp, this);
        }, Slider.prototype.sliderBarUp = function() {
            if (this.changeEvent("changed"), this.handleFocusOut(), this.firstHandle.classList.remove(classNames$__sliderActiveHandle), 
            "Range" === this.type && this.secondHandle.classList.remove(classNames$__sliderActiveHandle), 
            this.tooltip.isVisible && ("Always" !== this.tooltip.showOn && this.closeTooltip(), 
            !this.isMaterial)) {
                (1 === this.activeHandle ? this.firstTooltipObj : this.secondTooltipObj).animation = {
                    open: {
                        effect: "None"
                    },
                    close: {
                        effect: "None"
                    }
                };
            }
            if (this.isMaterial && (this.getHandle().style.transform = this.getHandle().style.transform.replace("scale(1.5)", "scale(1)"), 
            this.tooltip.isVisible)) {
                (1 === this.activeHandle ? this.firstTooltipElement : this.secondTooltipElement).classList.remove(classNames$__materialTooltipActive);
            }
            EventHandler.remove(document, "mousemove touchmove", this.sliderBarMove), EventHandler.remove(document, "mouseup touchend", this.sliderBarUp);
        }, Slider.prototype.sliderBarMove = function(evt) {
            "touchmove" !== evt.type && evt.preventDefault();
            var pos;
            pos = "mousemove" === evt.type ? {
                x: evt.clientX,
                y: evt.clientY
            } : {
                x: evt.changedTouches[0].clientX,
                y: evt.changedTouches[0].clientY
            };
            var handlepos = this.xyToPosition(pos), handleVal = this.positionToValue(handlepos);
            if (handlepos = Math.round(handlepos), "Range" !== this.type && 1 === this.activeHandle && (this.handlePos1 = handlepos, 
            this.handleVal1 = handleVal, this.firstHandle.classList.add(classNames$__sliderActiveHandle)), 
            "Range" === this.type && (1 === this.activeHandle ? (this.firstHandle.classList.add(classNames$__sliderActiveHandle), 
            handlepos > this.handlePos2 && (handlepos = this.handlePos2, handleVal = this.handleVal2), 
            handlepos !== this.preHandlePos1 && (this.handlePos1 = this.preHandlePos1 = handlepos, 
            this.handleVal1 = handleVal, this.activeHandle = 1)) : 2 === this.activeHandle && (this.secondHandle.classList.add(classNames$__sliderActiveHandle), 
            handlepos < this.handlePos1 && (handlepos = this.handlePos1, handleVal = this.handleVal1), 
            handlepos !== this.preHandlePos2 && (this.handlePos2 = this.preHandlePos2 = handlepos, 
            this.handleVal2 = handleVal, this.activeHandle = 2))), this.checkRepeatedValue(handleVal)) {
                this.getHandle().style.transition = this.scaleTransform, "Default" !== this.type && (this.rangeBar.style.transition = "none"), 
                this.setHandlePosition(), !this.isMaterial || this.tooltip.isVisible || this.getHandle().classList.contains(classNames$__sliderTabHandle) || this.materialChange();
                var tooltipElement = 1 === this.activeHandle ? this.firstTooltipElement : this.secondTooltipElement;
                this.tooltip.isVisible && (this.isMaterial ? tooltipElement.classList.contains(classNames$__materialTooltipOpen) ? this.refreshTooltipOnMove() : this.openMaterialTooltip() : tooltipElement ? this.refreshTooltipOnMove() : this.openTooltip()), 
                "Default" !== this.type && this.setRangeBar();
            }
        }, Slider.prototype.checkRepeatedValue = function(currentValue) {
            if ("Range" === this.type) {
                if (currentValue === (this.enableRtl && "Vertical" !== this.orientation ? 1 === this.activeHandle ? this.previousVal[1] : this.previousVal[0] : 1 === this.activeHandle ? this.previousVal[0] : this.previousVal[1])) return 0;
            } else if (currentValue === this.previousVal) return 0;
            return 1;
        }, Slider.prototype.refreshTooltip = function() {
            this.tooltip.isVisible && this.firstTooltipObj && (this.tooltipValue(), this.firstTooltipObj.refresh(this.firstHandle), 
            "Range" === this.type && this.secondTooltipObj.refresh(this.secondHandle));
        }, Slider.prototype.openTooltip = function() {
            this.tooltip.isVisible && this.firstTooltipObj && (this.tooltipValue(), this.isMaterial ? this.openMaterialTooltip() : 1 === this.activeHandle ? this.firstTooltipObj.open(this.firstHandle) : this.secondTooltipObj.open(this.secondHandle));
        }, Slider.prototype.keyDown = function(event) {
            switch (event.keyCode) {
              case 37:
              case 38:
              case 39:
              case 40:
              case 33:
              case 34:
              case 36:
              case 35:
                event.preventDefault(), this.buttonClick(event), this.tooltip.isVisible && "Always" !== this.tooltip.showOn && !this.isMaterial && this.closeTooltip();
            }
        }, Slider.prototype.wireButtonEvt = function(destroy) {
            destroy ? (EventHandler.remove(this.firstBtn, "mouseleave touchleave", this.buttonFocusOut), 
            EventHandler.remove(this.secondBtn, "mouseleave touchleave", this.buttonFocusOut), 
            EventHandler.remove(this.firstBtn, "mousedown touchstart", this.repeatHandlerMouse), 
            EventHandler.remove(this.firstBtn, "mouseup mouseleave touchup touchend", this.repeatHandlerUp), 
            EventHandler.remove(this.secondBtn, "mousedown touchstart", this.repeatHandlerMouse), 
            EventHandler.remove(this.secondBtn, "mouseup mouseleave touchup touchend", this.repeatHandlerUp), 
            EventHandler.remove(this.firstBtn, "focusout", this.sliderFocusOut), EventHandler.remove(this.secondBtn, "focusout", this.sliderFocusOut)) : (EventHandler.add(this.firstBtn, "mouseleave touchleave", this.buttonFocusOut, this), 
            EventHandler.add(this.secondBtn, "mouseleave touchleave", this.buttonFocusOut, this), 
            EventHandler.add(this.firstBtn, "mousedown touchstart", this.repeatHandlerMouse, this), 
            EventHandler.add(this.firstBtn, "mouseup mouseleave touchup touchend", this.repeatHandlerUp, this), 
            EventHandler.add(this.secondBtn, "mousedown touchstart", this.repeatHandlerMouse, this), 
            EventHandler.add(this.secondBtn, "mouseup mouseleave touchup touchend", this.repeatHandlerUp, this), 
            EventHandler.add(this.firstBtn, "focusout", this.sliderFocusOut, this), EventHandler.add(this.secondBtn, "focusout", this.sliderFocusOut, this));
        }, Slider.prototype.wireEvents = function() {
            this.onresize = this.onResize.bind(this), window.addEventListener("resize", this.onresize), 
            this.enabled && !this.readOnly && (EventHandler.add(this.element, "mousedown touchstart", this.sliderDown, this), 
            EventHandler.add(this.sliderContainer, "keydown", this.keyDown, this), EventHandler.add(this.sliderContainer, "keyup", this.keyUp, this), 
            EventHandler.add(this.element, "focusout", this.sliderFocusOut, this), EventHandler.add(this.sliderContainer, "mouseover mouseout touchstart touchend", this.hover, this), 
            this.wireFirstHandleEvt(!1), "Range" === this.type && this.wireSecondHandleEvt(!1), 
            this.showButtons && this.wireButtonEvt(!1), this.wireMaterialTooltipEvent(!1));
        }, Slider.prototype.unwireEvents = function() {
            EventHandler.remove(this.element, "mousedown touchstart", this.sliderDown), EventHandler.remove(this.sliderContainer, "keydown", this.keyDown), 
            EventHandler.remove(this.sliderContainer, "keyup", this.keyUp), EventHandler.remove(this.element, "focusout", this.sliderFocusOut), 
            EventHandler.remove(this.sliderContainer, "mouseover mouseout touchstart touchend", this.hover), 
            this.wireFirstHandleEvt(!0), "Range" === this.type && this.wireSecondHandleEvt(!0), 
            this.showButtons && this.wireButtonEvt(!0), this.wireMaterialTooltipEvent(!0);
        }, Slider.prototype.keyUp = function(event) {
            if (9 === event.keyCode && event.target.classList.contains(classNames$__sliderHandle) && !event.target.classList.contains(classNames$__sliderTabHandle)) {
                this.element.querySelector("." + classNames$__sliderTabHandle) && this.element.querySelector("." + classNames$__sliderTabHandle).classList.remove(classNames$__sliderTabHandle), 
                event.target.classList.add(classNames$__sliderTabHandle);
                var parentElement = event.target.parentElement;
                parentElement === this.element && (parentElement.querySelector("." + classNames$__sliderTrack).classList.add(classNames$__sliderTabTrack), 
                "Range" !== this.type && "MinRange" !== this.type || parentElement.querySelector("." + classNames$__rangeBar).classList.add(classNames$__sliderTabRange)), 
                "Range" === this.type && (event.target.previousSibling.classList.contains(classNames$__sliderHandle) ? this.activeHandle = 2 : this.activeHandle = 1), 
                this.tooltipAnimation(), this.tooltip.isVisible && "Always" !== this.tooltip.showOn && !this.isMaterial && this.closeTooltip();
            }
            this.changeEvent("changed");
        }, Slider.prototype.hover = function(event) {
            isNullOrUndefined(event) || ("mouseover" === event.type || "touchmove" === event.type || "mousemove" === event.type || "pointermove" === event.type || "touchstart" === event.type ? this.sliderContainer.classList.add(classNames$__sliderHover) : this.sliderContainer.classList.remove(classNames$__sliderHover));
        }, Slider.prototype.sliderFocusOut = function(event) {
            var _this = this;
            if (event.relatedTarget !== this.secondHandle && event.relatedTarget !== this.firstHandle && event.relatedTarget !== this.element && event.relatedTarget !== this.firstBtn && event.relatedTarget !== this.secondBtn) {
                if (this.hiddenInput.focus(), this.hiddenInput.blur(), this.isMaterial && this.tooltip.isVisible) {
                    var transformProperties_1 = this.getTooltipTransformProperties(this.previousTooltipClass), tooltipElement = "Range" !== this.type ? [ this.firstTooltipElement ] : [ this.firstTooltipElement, this.secondTooltipElement ], hiddenHandle_1 = "Range" !== this.type ? [ this.firstHandle ] : [ this.firstHandle, this.secondHandle ], handle_1 = "Range" !== this.type ? [ this.firstMaterialHandle ] : [ this.firstMaterialHandle, this.secondMaterialHandle ];
                    tooltipElement.forEach(function(tooltipElement, index) {
                        tooltipElement && (tooltipElement.style.transition = _this.scaleTransform, tooltipElement.firstChild.classList.remove(classNames$__materialTooltipShow), 
                        tooltipElement.firstChild.classList.add(classNames$__materialTooltipHide), hiddenHandle_1[index].style.cursor = "-webkit-grab", 
                        hiddenHandle_1[index].style.cursor = "grab", handle_1[index].style.transform = "scale(1)", 
                        tooltipElement.classList.remove(classNames$__materialTooltipOpen), tooltipElement.firstElementChild.innerText.length > 4 ? tooltipElement.style.transform = transformProperties_1.translate + " scale(0.01)" : tooltipElement.style.transform = transformProperties_1.translate + " " + transformProperties_1.rotate + " scale(0.01)", 
                        setTimeout(function() {
                            tooltipElement.style.transition = "none";
                        }, 2500));
                    });
                }
                this.element.querySelector("." + classNames$__sliderTabHandle) && this.element.querySelector("." + classNames$__sliderTabHandle).classList.remove(classNames$__sliderTabHandle), 
                this.element.querySelector("." + classNames$__sliderTabTrack) && (this.element.querySelector("." + classNames$__sliderTabTrack).classList.remove(classNames$__sliderTabTrack), 
                "Range" !== this.type && "MinRange" !== this.type || !this.element.querySelector("." + classNames$__sliderTabRange) || this.element.querySelector("." + classNames$__sliderTabRange).classList.remove(classNames$__sliderTabRange));
            }
        }, Slider.prototype.closeTooltip = function() {
            this.tooltip.isVisible && (this.tooltipValue(), 1 === this.activeHandle ? this.firstTooltipObj.close() : this.secondTooltipObj.close());
        }, Slider.prototype.removeElement = function(element) {
            element.parentNode && element.parentNode.removeChild(element);
        }, Slider.prototype.changeSliderType = function(type) {
            this.isMaterial && this.firstMaterialHandle && (this.sliderContainer.classList.remove(classNames$__materialSlider), 
            this.removeElement(this.firstMaterialHandle), this.firstTooltipElement = void 0, 
            this.firstHandleTooltipPosition = void 0, this.secondMaterialHandle && (this.removeElement(this.secondMaterialHandle), 
            this.secondTooltipElement = void 0, this.secondHandleTooltipPosition = void 0)), 
            this.tooltip.isVisible && this.isMaterial && this.sliderContainer.classList.add(classNames$__materialSlider), 
            this.removeElement(this.firstHandle), "Default" !== type && ("Range" === type && this.removeElement(this.secondHandle), 
            this.removeElement(this.rangeBar)), this.tooltip.isVisible && !isNullOrUndefined(this.firstTooltipObj) && (this.firstTooltipObj.destroy(), 
            "Range" !== type || isNullOrUndefined(this.secondTooltipObj) || this.secondTooltipObj.destroy()), 
            this.createRangeBar(), this.setHandler(), this.setOrientClass(), this.wireFirstHandleEvt(!1), 
            "Range" === this.type && this.wireSecondHandleEvt(!1), this.setValue(), this.tooltip.isVisible && (this.renderTooltip(), 
            this.wireMaterialTooltipEvent(!1)), this.updateConfig();
        }, Slider.prototype.changeRtl = function() {
            if (this.enableRtl || "Range" !== this.type || (this.value = [ this.handleVal2, this.handleVal1 ]), 
            this.updateConfig(), this.tooltip.isVisible && (this.firstTooltipObj.refresh(this.firstHandle), 
            "Range" === this.type && this.secondTooltipObj.refresh(this.secondHandle)), this.showButtons) {
                var enabledRTL = this.enableRtl && "Vertical" !== this.orientation;
                attributes(enabledRTL ? this.secondBtn : this.firstBtn, {
                    "aria-label": "Decrease",
                    title: "Decrease"
                }), attributes(enabledRTL ? this.firstBtn : this.secondBtn, {
                    "aria-label": "Increase",
                    title: "Increase"
                });
            }
        }, Slider.prototype.changeOrientation = function() {
            this.changeSliderType(this.type);
        }, Slider.prototype.updateConfig = function() {
            this.setEnableRTL(), this.setValue(), this.tooltip.isVisible && this.refreshTooltip(), 
            "None" !== this.ticks.placement && this.ul && (this.removeElement(this.ul), this.renderScale());
        }, Slider.prototype.getPersistData = function() {
            return this.addOnPersist([ "value" ]);
        }, Slider.prototype.destroy = function() {
            _super.prototype.destroy.call(this), this.unwireEvents(), window.removeEventListener("resize", this.onresize), 
            removeClass([ this.sliderContainer ], [ classNames$__sliderDisabled ]), this.firstHandle.removeAttribute("aria-orientation"), 
            "Range" === this.type && this.secondHandle.removeAttribute("aria-orientation"), 
            this.sliderContainer.parentNode.insertBefore(this.element, this.sliderContainer), 
            detach(this.sliderContainer), this.tooltip.isVisible && (this.firstTooltipObj.destroy(), 
            "Range" !== this.type || isNullOrUndefined(this.secondTooltipObj) || this.secondTooltipObj.destroy()), 
            this.element.innerHTML = "";
        }, Slider.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var _this = this, _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "cssClass":
                    this.setCSSClass(oldProp.cssClass);
                    break;

                  case "value":
                    isNullOrUndefined(oldProp.value) || isNullOrUndefined(newProp.value) || oldProp.value.toString() !== newProp.value.toString() && (this.setValue(), 
                    this.refreshTooltip(), "Range" === this.type && (oldProp.value[0] === newProp.value[0] ? this.activeHandle = 2 : this.activeHandle = 1));
                    break;

                  case "min":
                  case "step":
                  case "max":
                    this.setMinMaxValue();
                    break;

                  case "tooltip":
                    isNullOrUndefined(newProp.tooltip) || isNullOrUndefined(oldProp.tooltip) || this.setTooltip();
                    break;

                  case "type":
                    this.changeSliderType(oldProp.type), this.setZindex();
                    break;

                  case "enableRtl":
                    oldProp.enableRtl !== newProp.enableRtl && "Vertical" !== this.orientation && (this.rtl = oldProp.enableRtl, 
                    this.changeRtl());
                    break;

                  case "orientation":
                    this.changeOrientation();
                    break;

                  case "ticks":
                    isNullOrUndefined(this.sliderContainer.querySelector("." + classNames$__scale)) || (detach(this.ul), 
                    Array.prototype.forEach.call(this.sliderContainer.classList, function(className) {
                        className.match(/e-scale-/) && _this.sliderContainer.classList.remove(className);
                    })), "None" !== this.ticks.placement && (this.renderScale(), this.setZindex());
                    break;

                  case "locale":
                    this.showButtons && this.buttonTitle();
                    break;

                  case "showButtons":
                    newProp.showButtons ? (this.setButtons(), this.onResize(), this.enabled && !this.readOnly && this.wireButtonEvt(!1)) : this.firstBtn && this.secondBtn && (this.sliderContainer.removeChild(this.firstBtn), 
                    this.sliderContainer.removeChild(this.secondBtn), this.firstBtn = void 0, this.secondBtn = void 0);
                    break;

                  case "enabled":
                    this.setEnabled();
                    break;

                  case "readOnly":
                    this.setReadOnly();
                }
            }
        }, Slider.prototype.setReadOnly = function() {
            this.readOnly ? (this.unwireEvents(), this.sliderContainer.classList.add(classNames$__readOnly)) : (this.wireEvents(), 
            this.sliderContainer.classList.remove(classNames$__readOnly));
        }, Slider.prototype.setMinMaxValue = function() {
            var _this = this;
            this.setValue(), this.refreshTooltip(), isNullOrUndefined(this.sliderContainer.querySelector("." + classNames$__scale)) || this.ul && (detach(this.ul), 
            Array.prototype.forEach.call(this.sliderContainer.classList, function(className) {
                className.match(/e-scale-/) && _this.sliderContainer.classList.remove(className);
            })), "None" !== this.ticks.placement && (this.renderScale(), this.setZindex());
        }, Slider.prototype.setZindex = function() {
            this.zIndex = 6, isNullOrUndefined(this.ticks) || "None" === this.ticks.placement || (this.ul.style.zIndex = this.zIndex + -7 + "", 
            this.element.style.zIndex = this.zIndex + 2 + ""), this.isMaterial || isNullOrUndefined(this.ticks) || "Both" !== this.ticks.placement || (this.element.style.zIndex = this.zIndex + 2 + ""), 
            this.firstHandle.style.zIndex = this.zIndex + 3 + "", "Range" === this.type && (this.secondHandle.style.zIndex = this.zIndex + 4 + "");
        }, Slider.prototype.setTooltip = function() {
            this.changeSliderType(this.type);
        }, Slider.prototype.getModuleName = function() {
            return "slider";
        }, __decorate$30([ Property(null) ], Slider.prototype, "value", void 0), __decorate$30([ Property(1) ], Slider.prototype, "step", void 0), 
        __decorate$30([ Property(0) ], Slider.prototype, "min", void 0), __decorate$30([ Property(100) ], Slider.prototype, "max", void 0), 
        __decorate$30([ Property(!1) ], Slider.prototype, "readOnly", void 0), __decorate$30([ Property("Default") ], Slider.prototype, "type", void 0), 
        __decorate$30([ Complex({}, TicksData$1) ], Slider.prototype, "ticks", void 0), 
        __decorate$30([ Property(!0) ], Slider.prototype, "enabled", void 0), __decorate$30([ Property(!1) ], Slider.prototype, "enableRtl", void 0), 
        __decorate$30([ Complex({}, TooltipData$1) ], Slider.prototype, "tooltip", void 0), 
        __decorate$30([ Property(!1) ], Slider.prototype, "showButtons", void 0), __decorate$30([ Property(!0) ], Slider.prototype, "enableAnimation", void 0), 
        __decorate$30([ Property("Horizontal") ], Slider.prototype, "orientation", void 0), 
        __decorate$30([ Property("") ], Slider.prototype, "cssClass", void 0), __decorate$30([ Event() ], Slider.prototype, "created", void 0), 
        __decorate$30([ Event() ], Slider.prototype, "change", void 0), __decorate$30([ Event() ], Slider.prototype, "changed", void 0), 
        __decorate$30([ Event() ], Slider.prototype, "renderingTicks", void 0), __decorate$30([ Event() ], Slider.prototype, "renderedTicks", void 0), 
        __decorate$30([ Event() ], Slider.prototype, "tooltipChange", void 0), Slider = __decorate$30([ NotifyPropertyChanges ], Slider);
    }(Component), __extends$32 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$31 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, TAGNAME = "EJS-SPLITBUTTON", SplitButton = function(_super) {
        function SplitButton(options, element) {
            return _super.call(this, options, element) || this;
        }
        return __extends$32(SplitButton, _super), SplitButton.prototype.preRender = function() {
            var ele = this.element;
            if (ele.tagName === TAGNAME) {
                for (var ejInstance = getValue("ej2_instances", ele), btn = createElement("button"), wrapper = createElement(TAGNAME, {
                    className: "e-" + this.getModuleName() + "-wrapper"
                }), idx = 0, len = ele.attributes.length; idx < len; idx++) btn.setAttribute(ele.attributes[idx].nodeName, ele.attributes[idx].nodeValue);
                ele.parentNode.insertBefore(wrapper, ele), detach(ele), ele = btn, wrapper.appendChild(ele), 
                setValue("ej2_instances", ejInstance, ele), this.wrapper = wrapper, this.element = ele;
            }
            this.element.id || (this.element.id = getUniqueID("e-" + this.getModuleName()));
        }, SplitButton.prototype.render = function() {
            this.initWrapper(), this.createPrimaryButton(), this.createSecondaryButton(), this.setAria(), 
            this.wireEvents();
        }, SplitButton.prototype.initWrapper = function() {
            this.wrapper || (this.wrapper = createElement("div", {
                className: "e-" + this.getModuleName() + "-wrapper"
            }), this.element.parentNode.insertBefore(this.wrapper, this.element)), this.element.classList.remove("e-" + this.getModuleName()), 
            this.enableRtl && this.wrapper.classList.add("e-rtl"), this.cssClass && addClass([ this.wrapper ], this.cssClass.split(" "));
        }, SplitButton.prototype.createPrimaryButton = function() {
            var btnModel = {
                cssClass: this.cssClass,
                enableRtl: this.enableRtl,
                iconCss: this.iconCss,
                content: this.content,
                disabled: this.disabled
            };
            this.primaryBtnObj = new Button(btnModel, this.element), this.element.classList.add("e-" + this.getModuleName()), 
            this.wrapper.appendChild(this.element), this.setIconPositionTop(), this.setActiveElem();
        }, SplitButton.prototype.createSecondaryButton = function() {
            var _this = this, btnElem = createElement("button", {
                className: "e-icon-btn",
                attrs: {
                    tabindex: "-1"
                },
                id: this.element.id + "_dropdownbtn"
            });
            this.wrapper.appendChild(btnElem);
            var dropDownBtnModel = {
                cssClass: this.cssClass,
                disabled: this.disabled,
                enableRtl: this.enableRtl,
                items: this.items,
                target: this.target,
                beforeItemRender: function(args) {
                    _this.trigger("beforeItemRender", args);
                },
                beforeOpen: function(args) {
                    _this.trigger("beforeOpen", args);
                },
                open: function(args) {
                    _this.trigger("open", args);
                },
                close: function(args) {
                    _this.trigger("close", args);
                },
                select: function(args) {
                    _this.trigger("select", args);
                }
            };
            this.secondaryBtnObj = new DropDownButton(dropDownBtnModel, btnElem), this.secondaryBtnObj.dropDown.relateTo = this.wrapper, 
            this.dropDown = this.secondaryBtnObj.dropDown, this.secondaryBtnObj.activeElem = this.element, 
            EventHandler.remove(this.getPopUpElement(), "keydown", this.secondaryBtnObj.keyBoardHandler), 
            this.secondaryBtnObj.element.querySelector(".e-btn-icon").classList.remove("e-icon-right");
        }, SplitButton.prototype.setAria = function() {
            attributes(this.element, {
                role: "listbox",
                "aria-expanded": "false",
                "aria-haspopup": "true",
                "aria-label": this.element.textContent + " splitbutton",
                "aria-owns": this.secondaryBtnObj.dropDown.element.id
            });
        }, SplitButton.prototype.getModuleName = function() {
            return "split-btn";
        }, SplitButton.prototype.toggle = function() {
            this.secondaryBtnObj.toggle();
        }, SplitButton.prototype.destroy = function() {
            var _this = this;
            this.primaryBtnObj.destroy(), this.secondaryBtnObj.destroy(), this.wrapper.tagName === TAGNAME ? (this.wrapper.innerHTML = "", 
            removeClass([ this.wrapper ], [ "e-rtl", "e-" + this.getModuleName() + "-wrapper" ]), 
            removeClass([ this.wrapper ], this.cssClass.split(" "))) : (removeClass([ this.element ], [ "e-" + this.getModuleName(), "e-rtl" ]), 
            [ "role", "aria-label", "aria-haspopup", "aria-expanded", "aria-owns" ].forEach(function(key) {
                _this.element.removeAttribute(key);
            }), this.wrapper.parentNode.insertBefore(this.element, this.wrapper), remove(this.wrapper)), 
            this.unWireEvents();
        }, SplitButton.prototype.wireEvents = function() {
            EventHandler.add(this.element, "click", this.primaryBtnClickHandler, this), EventHandler.add(this.getPopUpElement(), "keydown", this.keyBoardHandler, this), 
            new KeyboardEvents(this.element, {
                keyAction: this.btnKeyBoardHandler.bind(this),
                keyConfigs: {
                    altdownarrow: "alt+downarrow"
                }
            });
        }, SplitButton.prototype.unWireEvents = function() {
            EventHandler.remove(this.element, "click", this.primaryBtnClickHandler), getInstance(this.element, KeyboardEvents).destroy();
        }, SplitButton.prototype.primaryBtnClickHandler = function() {
            this.trigger("click", {
                element: this.element
            });
        }, SplitButton.prototype.btnKeyBoardHandler = function(e) {
            switch (e.action) {
              case "altdownarrow":
                this.clickHandler(e);
            }
        }, SplitButton.prototype.onPropertyChanged = function(newProp, oldProp) {
            var model = [ "content", "iconCss", "cssClass", "disabled", "enableRtl" ];
            "Left" === newProp.iconPosition && model.push("iconPosition"), this.primaryBtnObj.setProperties(getModel(newProp, model)), 
            model = [ "items", "beforeOpen", "beforeItemRender", "select", "open", "close", "cssClass", "disabled", "enableRtl" ], 
            this.secondaryBtnObj.setProperties(getModel(newProp, model));
            for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "cssClass":
                    oldProp.cssClass && removeClass([ this.wrapper ], oldProp.cssClass.split(" ")), 
                    addClass([ this.wrapper ], newProp.cssClass.split(" "));
                    break;

                  case "iconPosition":
                    this.setIconPositionTop();
                    break;

                  case "enableRtl":
                    newProp.enableRtl ? addClass([ this.wrapper ], "e-rtl") : removeClass([ this.wrapper ], "e-rtl");
                }
            }
        }, __decorate$31([ Property("") ], SplitButton.prototype, "content", void 0), __decorate$31([ Property("") ], SplitButton.prototype, "cssClass", void 0), 
        __decorate$31([ Property(!1) ], SplitButton.prototype, "disabled", void 0), __decorate$31([ Property("") ], SplitButton.prototype, "iconCss", void 0), 
        __decorate$31([ Property("Left") ], SplitButton.prototype, "iconPosition", void 0), 
        __decorate$31([ Collection([], Item) ], SplitButton.prototype, "items", void 0), 
        __decorate$31([ Property("") ], SplitButton.prototype, "target", void 0), __decorate$31([ Event() ], SplitButton.prototype, "beforeItemRender", void 0), 
        __decorate$31([ Event() ], SplitButton.prototype, "beforeOpen", void 0), __decorate$31([ Event() ], SplitButton.prototype, "beforeClose", void 0), 
        __decorate$31([ Event() ], SplitButton.prototype, "click", void 0), __decorate$31([ Event() ], SplitButton.prototype, "close", void 0), 
        __decorate$31([ Event() ], SplitButton.prototype, "open", void 0), __decorate$31([ Event() ], SplitButton.prototype, "select", void 0), 
        SplitButton = __decorate$31([ NotifyPropertyChanges ], SplitButton);
    }(DropDownButton), __extends$35 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$34 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, HScroll = function(_super) {
        function HScroll(options, element) {
            return _super.call(this, options, element) || this;
        }
        return __extends$35(HScroll, _super), HScroll.prototype.preRender = function() {
            this.browser = Browser.info.name, this.browserCheck = "mozilla" === this.browser, 
            this.isDevice = Browser.isDevice;
            var element = this.element;
            this.ieCheck = "edge" === this.browser || "msie" === this.browser, this.initialize(), 
            "" === element.id && (element.id = getUniqueID("hscroll"), this.uniqueId = !0), 
            element.style.display = "block", this.enableRtl && element.classList.add("e-rtl");
        }, HScroll.prototype.render = function() {
            this.touchModule = new Touch(this.element, {
                scroll: this.touchHandler.bind(this)
            }), this.isDevice ? this.element.classList.add("e-scroll-device") : (this.createNavIcon(this.element), 
            EventHandler.add(this.scrollEle, "scroll", this.scrollHandler, this));
        }, HScroll.prototype.initialize = function() {
            var scrollEle = createElement("div", {
                className: "e-hscroll-content"
            }), scrollDiv = createElement("div", {
                className: "e-hscroll-bar"
            });
            scrollDiv.setAttribute("tabindex", "-1");
            for (var ele = this.element, _i = 0, innerEle_1 = [].slice.call(ele.children); _i < innerEle_1.length; _i++) {
                var ele_1 = innerEle_1[_i];
                scrollEle.appendChild(ele_1);
            }
            scrollDiv.appendChild(scrollEle), ele.appendChild(scrollDiv), scrollDiv.style.overflowX = "hidden", 
            this.scrollEle = scrollDiv, this.scrollItems = scrollEle;
        }, HScroll.prototype.getPersistData = function() {
            return this.addOnPersist([ "scrollStep" ]);
        }, HScroll.prototype.getModuleName = function() {
            return "hScroll";
        }, HScroll.prototype.destroy = function() {
            var ele = this.element;
            ele.style.display = "", ele.classList.remove("e-hscroll");
            for (var nav = selectAll(".e-" + ele.id + "_nav.e-scroll-nav", ele), _i = 0, _a = [].slice.call(this.scrollItems.children); _i < _a.length; _i++) {
                var elem = _a[_i];
                ele.appendChild(elem);
            }
            this.uniqueId && this.element.removeAttribute("id"), detach(this.scrollEle), nav.length > 0 && (detach(nav[0]), 
            detach(nav[1])), EventHandler.remove(this.scrollEle, "scroll", this.scrollHandler), 
            this.touchModule.destroy(), this.touchModule = null, _super.prototype.destroy.call(this);
        }, HScroll.prototype.createNavIcon = function(element) {
            var id = element.id.concat("_nav"), clsRight = "e-" + element.id.concat("_nav e-scroll-nav e-scroll-right-nav"), nav = createElement("div", {
                id: id.concat("_right"),
                className: clsRight
            });
            nav.setAttribute("aria-disabled", "false");
            var navItem = createElement("div", {
                className: "e-nav-right-arrow e-nav-arrow e-icons"
            }), clsLeft = "e-" + element.id.concat("_nav e-scroll-nav e-scroll-left-nav"), navEle = createElement("div", {
                id: id.concat("_left"),
                className: clsLeft + " e-overlay"
            });
            navEle.setAttribute("aria-disabled", "true");
            var navLeftItem = createElement("div", {
                className: "e-nav-left-arrow e-nav-arrow e-icons"
            });
            navEle.appendChild(navLeftItem), nav.appendChild(navItem), nav.setAttribute("tabindex", "0"), 
            element.appendChild(nav), element.insertBefore(navEle, element.firstChild), this.ieCheck && (nav.classList.add("e-ie-align"), 
            navEle.classList.add("e-ie-align")), this.eventBinding([ nav, navEle ]);
        }, HScroll.prototype.onKeyPress = function(e) {
            var _this = this;
            if ("Enter" === e.key) {
                this.keyTimer = window.setTimeout(function() {
                    _this.keyTimeout = !0, _this.eleScrolling(10, e.target);
                }, 100);
            }
        }, HScroll.prototype.onKeyUp = function(e) {
            "Enter" === e.key && (this.keyTimeout ? this.keyTimeout = !1 : e.target.click(), 
            clearTimeout(this.keyTimer));
        }, HScroll.prototype.eventBinding = function(ele) {
            var _this = this;
            ele.forEach(function(el) {
                new Touch(el, {
                    tapHold: _this.tabHoldHandler.bind(_this),
                    tapHoldThreshold: 500
                }), el.addEventListener("keydown", _this.onKeyPress.bind(_this)), el.addEventListener("keyup", _this.onKeyUp.bind(_this)), 
                el.addEventListener("mouseup", _this.repeatScroll.bind(_this)), el.addEventListener("touchend", _this.repeatScroll.bind(_this)), 
                el.addEventListener("contextmenu", function(e) {
                    e.preventDefault();
                }), EventHandler.add(el, "click", _this.clickEventHandler, _this);
            });
        }, HScroll.prototype.repeatScroll = function() {
            clearInterval(this.timeout);
        }, HScroll.prototype.tabHoldHandler = function(e) {
            var _this = this, trgt = e.originalEvent.target;
            trgt = this.contains(trgt, "e-scroll-nav") ? trgt.firstElementChild : trgt;
            this.timeout = window.setInterval(function() {
                _this.eleScrolling(10, trgt);
            }, 50);
        }, HScroll.prototype.contains = function(ele, className) {
            return ele.classList.contains(className);
        }, HScroll.prototype.eleScrolling = function(scrollDis, trgt) {
            var element = this.scrollEle, rootEle = this.element, classList$$1 = trgt.classList;
            classList$$1.contains("e-scroll-nav") && (classList$$1 = trgt.querySelector(".e-nav-arrow").classList), 
            this.contains(rootEle, "e-rtl") && this.browserCheck && (scrollDis = -scrollDis);
            var scrlLeft = element.scrollLeft;
            !this.contains(rootEle, "e-rtl") || this.browserCheck || this.ieCheck ? classList$$1.contains("e-nav-right-arrow") ? element.scrollLeft = scrlLeft + scrollDis : element.scrollLeft = scrlLeft - scrollDis : classList$$1.contains("e-nav-left-arrow") ? element.scrollLeft = scrlLeft + scrollDis : element.scrollLeft = scrlLeft - scrollDis;
        }, HScroll.prototype.clickEventHandler = function(e) {
            this.eleScrolling(this.scrollStep, e.target);
        }, HScroll.prototype.touchHandler = function(e) {
            var distance, ele = this.scrollEle;
            distance = e.distanceX, this.ieCheck && this.contains(this.element, "e-rtl") && (distance = -distance), 
            "Left" === e.scrollDirection ? ele.scrollLeft = ele.scrollLeft + distance : "Right" === e.scrollDirection && (ele.scrollLeft = ele.scrollLeft - distance);
        }, HScroll.prototype.arrowDisabling = function(addDisable, removeDisable) {
            addDisable.classList.add("e-overlay"), addDisable.setAttribute("aria-disabled", "true"), 
            addDisable.removeAttribute("tabindex"), clearInterval(this.timeout), removeDisable.classList.remove("e-overlay"), 
            removeDisable.setAttribute("aria-disabled", "false"), removeDisable.setAttribute("tabindex", "0"), 
            this.repeatScroll();
        }, HScroll.prototype.scrollHandler = function(e) {
            var target = e.target, width = target.offsetWidth, rootEle = this.element, navLeftEle = this.element.querySelector(".e-scroll-left-nav"), navRightEle = this.element.querySelector(".e-scroll-right-nav"), scrollLeft = target.scrollLeft;
            if (scrollLeft <= 0 && (scrollLeft = -scrollLeft), 0 === scrollLeft) !this.contains(rootEle, "e-rtl") || this.browserCheck || this.ieCheck ? this.arrowDisabling(navLeftEle, navRightEle) : this.arrowDisabling(navRightEle, navLeftEle); else if (Math.ceil(width + scrollLeft + .1) >= target.scrollWidth) !this.contains(rootEle, "e-rtl") || this.browserCheck || this.ieCheck ? this.arrowDisabling(navRightEle, navLeftEle) : this.arrowDisabling(navLeftEle, navRightEle); else {
                var disEle = this.element.querySelector(".e-scroll-nav.e-overlay");
                disEle && (disEle.classList.remove("e-overlay"), disEle.setAttribute("aria-disabled", "false"), 
                disEle.setAttribute("tabindex", "0"));
            }
        }, HScroll.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "scrollStep":
                    break;

                  case "enableRtl":
                    newProp.enableRtl ? this.element.classList.add("e-rtl") : this.element.classList.remove("e-rtl");
                }
            }
        }, __decorate$34([ Property(40) ], HScroll.prototype, "scrollStep", void 0), HScroll = __decorate$34([ NotifyPropertyChanges ], HScroll);
    }(Component), __extends$34 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$33 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, CLS_ITEMS$1 = "e-toolbar-items", CLS_ITEM$2 = "e-toolbar-item", CLS_POPUP = "e-toolbar-popup", Item$1 = function(_super) {
        function Item() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$34(Item, _super), __decorate$33([ Property("") ], Item.prototype, "id", void 0), 
        __decorate$33([ Property("") ], Item.prototype, "text", void 0), __decorate$33([ Property("auto") ], Item.prototype, "width", void 0), 
        __decorate$33([ Property("") ], Item.prototype, "cssClass", void 0), __decorate$33([ Property(!1) ], Item.prototype, "showAlwaysInPopup", void 0), 
        __decorate$33([ Property("") ], Item.prototype, "prefixIcon", void 0), __decorate$33([ Property("") ], Item.prototype, "suffixIcon", void 0), 
        __decorate$33([ Property("None") ], Item.prototype, "overflow", void 0), __decorate$33([ Property("") ], Item.prototype, "template", void 0), 
        __decorate$33([ Property("Button") ], Item.prototype, "type", void 0), __decorate$33([ Property("Both") ], Item.prototype, "showTextOn", void 0), 
        __decorate$33([ Property(null) ], Item.prototype, "htmlAttributes", void 0), __decorate$33([ Property("") ], Item.prototype, "tooltipText", void 0), 
        __decorate$33([ Property("Left") ], Item.prototype, "align", void 0), Item;
    }(ChildProperty), Toolbar = function(_super) {
        function Toolbar(options, element) {
            var _this = _super.call(this, options, element) || this;
            return _this.keyConfigs = {
                moveLeft: "leftarrow",
                moveRight: "rightarrow",
                moveUp: "uparrow",
                moveDown: "downarrow",
                popupOpen: "enter",
                popupClose: "escape",
                tab: "tab",
                home: "home",
                end: "end"
            }, _this;
        }
        return __extends$34(Toolbar, _super), Toolbar.prototype.destroy = function() {
            var _this = this, ele = this.element;
            for (_super.prototype.destroy.call(this), this.unwireEvents(); ele.firstChild; ) ele.removeChild(ele.firstChild);
            this.trgtEle && ele.appendChild(this.ctrlTem), this.clearProperty(), this.popObj = null, 
            this.tbarAlign = null, this.remove(this.element, "e-toolpop"), ele.removeAttribute("style"), 
            [ "aria-disabled", "aria-orientation", "aria-haspopup", "role" ].forEach(function(attrb) {
                _this.element.removeAttribute(attrb);
            });
        }, Toolbar.prototype.preRender = function() {
            this.trigger("beforeCreate"), this.scrollModule = null, this.popObj = null, this.tbarItemsCol = this.items, 
            this.popupPriCount = 0, this.enableRtl && this.add(this.element, "e-rtl");
        }, Toolbar.prototype.wireEvents = function() {
            EventHandler.add(this.element, "click", this.clickHandler, this), window.addEventListener("resize", this.resize.bind(this)), 
            this.keyModule = new KeyboardEvents(this.element, {
                keyAction: this.keyActionHandler.bind(this),
                keyConfigs: this.keyConfigs
            }), EventHandler.add(this.element, "keydown", this.docKeyDown, this), this.element.setAttribute("tabIndex", "0");
        }, Toolbar.prototype.docKeyDown = function(e) {
            if ("INPUT" !== e.target.tagName) {
                9 === e.keyCode && !0 === e.target.classList.contains("e-hor-nav") && isVisible(this.popObj.element) && this.popObj.hide({
                    name: "SlideUp",
                    duration: 100
                });
                (40 === e.keyCode || 38 === e.keyCode || 35 === e.keyCode || 36 === e.keyCode) && e.preventDefault();
            }
        }, Toolbar.prototype.unwireEvents = function() {
            EventHandler.remove(this.element, "click", this.clickHandler), this.destroyHScroll(), 
            this.keyModule.destroy(), EventHandler.remove(document, "scroll", this.docEvent), 
            EventHandler.remove(this.element, "keydown", this.docKeyDown), EventHandler.remove(document, "click", this.docEvent);
        }, Toolbar.prototype.clearProperty = function() {
            this.tbarEle = [], this.tbarAlgEle = {
                lefts: [],
                centers: [],
                rights: []
            };
        }, Toolbar.prototype.docEvent = function(e) {
            var popEle = closest(e.target, ".e-popup");
            this.popObj && isVisible(this.popObj.element) && !popEle && this.popObj.hide({
                name: "SlideUp",
                duration: 100
            });
        }, Toolbar.prototype.destroyHScroll = function() {
            this.scrollModule && (this.tbarAlign && this.add(this.scrollModule.element, "e-tbar-pos"), 
            this.scrollModule.destroy(), this.scrollModule = null);
        }, Toolbar.prototype.destroyItems = function() {
            [].slice.call(this.element.querySelectorAll("." + CLS_ITEM$2)).forEach(function(el) {
                detach(el);
            });
            var tbarItems = this.element.querySelector("." + CLS_ITEMS$1);
            this.tbarAlign && ([].slice.call(tbarItems.children).forEach(function(el) {
                detach(el);
            }), this.tbarAlign = !1, this.remove(tbarItems, "e-tbar-pos")), this.clearProperty();
        }, Toolbar.prototype.destroyMode = function() {
            this.scrollModule && (this.remove(this.scrollModule.element, "e-rtl"), this.destroyHScroll()), 
            this.popObj && this.popupRefresh(this.popObj.element, !0);
        }, Toolbar.prototype.add = function(ele, val) {
            ele.classList.add(val);
        }, Toolbar.prototype.remove = function(ele, val) {
            ele.classList.remove(val);
        }, Toolbar.prototype.elementFocus = function(ele) {
            var fChild = ele.firstElementChild;
            fChild ? (fChild.focus(), this.activeEleSwitch(ele)) : ele.focus();
        }, Toolbar.prototype.clstElement = function(tbrNavChk, trgt) {
            return tbrNavChk && this.popObj && isVisible(this.popObj.element) ? this.popObj.element.querySelector("." + CLS_ITEM$2) : this.element === trgt || tbrNavChk ? this.element.querySelector("." + CLS_ITEM$2) : closest(trgt, "." + CLS_ITEM$2);
        }, Toolbar.prototype.keyHandling = function(clst, e, trgt, navChk, scrollChk) {
            var popObj = this.popObj, rootEle = this.element, popAnimate = {
                name: "SlideUp",
                duration: 100
            };
            switch (e.action) {
              case "moveRight":
                rootEle === trgt ? this.elementFocus(clst) : navChk || this.eleFocus(clst, "next");
                break;

              case "moveLeft":
                navChk || this.eleFocus(clst, "previous");
                break;

              case "home":
              case "end":
                var ele = void 0, nodes = void 0;
                if (clst) {
                    var popupCheck = closest(clst, ".e-popup");
                    popupCheck ? isVisible(this.popObj.element) && (nodes = popupCheck.children, ele = "home" === e.action ? nodes[0] : nodes[nodes.length - 1]) : (nodes = this.element.querySelectorAll(".e-toolbar-items ." + CLS_ITEM$2), 
                    ele = "home" === e.action ? nodes[0] : nodes[nodes.length - 1]), ele && this.elementFocus(ele);
                }
                break;

              case "moveUp":
              case "moveDown":
                var value = "moveUp" === e.action ? "previous" : "next";
                if (popObj && closest(trgt, ".e-popup")) {
                    var popEle = popObj.element, popFrstEle = popEle.firstElementChild;
                    if ("previous" === value && popFrstEle === clst || "next" === value && popEle.lastElementChild === clst) return;
                    this.eleFocus(clst, value);
                } else "moveDown" === e.action && popObj && isVisible(popObj.element) && this.elementFocus(clst);
                break;

              case "tab":
                if (!scrollChk && !navChk) {
                    var ele_1 = clst.firstElementChild;
                    rootEle === trgt && (this.activeEle ? this.activeEle.focus() : (this.activeEleRemove(ele_1), 
                    ele_1.focus()), this.element.removeAttribute("tabindex"));
                }
                break;

              case "popupClose":
                popObj && popObj.hide(popAnimate);
                break;

              case "popupOpen":
                if (!navChk) return;
                popObj && !isVisible(popObj.element) ? (popObj.element.style.top = rootEle.offsetHeight + "px", 
                popObj.show({
                    name: "SlideDown",
                    duration: 100
                })) : popObj.hide(popAnimate);
            }
        }, Toolbar.prototype.keyActionHandler = function(e) {
            var trgt = e.target;
            if ("INPUT" !== trgt.tagName) {
                e.preventDefault();
                var clst, tbrNavChk = trgt.classList.contains("e-hor-nav"), tbarScrollChk = trgt.classList.contains("e-scroll-nav");
                ((clst = this.clstElement(tbrNavChk, trgt)) || tbarScrollChk) && this.keyHandling(clst, e, trgt, tbrNavChk, tbarScrollChk);
            }
        }, Toolbar.prototype.eleFocus = function(closest$$1, pos) {
            var sib = Object(closest$$1)[pos + "ElementSibling"], contains = function(el) {
                return el.classList.contains("e-separator") || el.classList.contains("e-overlay");
            };
            if (sib) {
                var skipEle = contains(sib);
                if (skipEle && Object(sib)[pos + "ElementSibling"] && (sib = Object(sib)[pos + "ElementSibling"], 
                skipEle = contains(sib))) return void this.eleFocus(sib, pos);
                this.elementFocus(sib);
            } else if (this.tbarAlign) {
                var elem = Object(closest$$1.parentElement)[pos + "ElementSibling"];
                if (isNullOrUndefined(elem) || 0 !== elem.children.length || (elem = Object(elem)[pos + "ElementSibling"]), 
                !isNullOrUndefined(elem) && elem.children.length > 0) if ("next" === pos) {
                    contains(el = elem.querySelector("." + CLS_ITEM$2)) ? this.eleFocus(el, pos) : (el.firstElementChild.focus(), 
                    this.activeEleSwitch(el));
                } else {
                    var el;
                    contains(el = elem.lastElementChild) ? this.eleFocus(el, pos) : this.elementFocus(el);
                }
            }
        }, Toolbar.prototype.clickHandler = function(e) {
            var trgt = e.target, clsList = trgt.classList, ele = this.element, isPopupElement = !isNullOrUndefined(closest(trgt, ".e-toolbar-pop")), popupNav = closest(trgt, ".e-hor-nav");
            popupNav || (popupNav = trgt), !ele.children[0].classList.contains("e-hscroll") && clsList.contains("e-hor-nav") && (clsList = trgt.querySelector(".e-icons").classList), 
            (clsList.contains("e-popup-up-icon") || clsList.contains("e-popup-down-icon")) && this.popupClickHandler(ele, popupNav, "e-rtl");
            var itemObj, clst = closest(e.target, "." + CLS_ITEM$2);
            if (!isNullOrUndefined(clst) && !clst.classList.contains("e-overlay") || popupNav.classList.contains("e-hor-nav")) {
                clst && (itemObj = this.items[this.tbarEle.indexOf(clst)]);
                var eventArgs = {
                    originalEvent: e,
                    item: itemObj
                };
                this.trigger("clicked", eventArgs), isPopupElement && !eventArgs.cancel && this.popObj.hide({
                    name: "SlideUp",
                    duration: 100
                });
            }
        }, Toolbar.prototype.popupClickHandler = function(ele, popupNav, CLS_RTL) {
            var popObj = this.popObj;
            isVisible(popObj.element) ? (popupNav.classList.remove("e-nav-active"), popObj.hide({
                name: "SlideUp",
                duration: 100
            })) : (ele.classList.contains(CLS_RTL) && (popObj.enableRtl = !0, popObj.position = {
                X: "left",
                Y: "top"
            }), 0 !== popObj.offsetX || ele.classList.contains(CLS_RTL) || (popObj.enableRtl = !1, 
            popObj.position = {
                X: "right",
                Y: "top"
            }), popObj.dataBind(), popObj.element.style.top = this.element.offsetHeight + "px", 
            popupNav.classList.add("e-nav-active"), popObj.show({
                name: "SlideDown",
                duration: 100
            }));
        }, Toolbar.prototype.render = function() {
            this.initialize(), this.renderControl(), this.wireEvents();
        }, Toolbar.prototype.initialize = function() {
            var width = formatUnit(this.width), height = formatUnit(this.height);
            "msie" === Browser.info.name && "auto" === this.height || setStyleAttribute(this.element, {
                height: height
            }), setStyleAttribute(this.element, {
                width: width
            });
            attributes(this.element, {
                role: "toolbar",
                "aria-disabled": "false",
                "aria-haspopup": "false",
                "aria-orientation": "horizontal"
            });
        }, Toolbar.prototype.renderControl = function() {
            this.trgtEle = this.element.children.length > 0 ? this.element.querySelector("div") : null, 
            this.tbarAlgEle = {
                lefts: [],
                centers: [],
                rights: []
            }, this.renderItems(), this.renderOverflowMode(), this.tbarAlign && this.itemPositioning(), 
            this.popObj && this.popObj.element.childElementCount > 1 && this.checkPopupRefresh(this.element, this.popObj.element) && this.popupRefresh(this.popObj.element, !1);
        }, Toolbar.prototype.initHScroll = function(element, innerItems) {
            !this.scrollModule && this.checkOverflow(element, innerItems[0]) && (this.tbarAlign && this.element.querySelector(".e-toolbar-items .e-toolbar-center").removeAttribute("style"), 
            this.scrollModule = new HScroll({
                scrollStep: 50,
                enableRtl: this.enableRtl
            }, innerItems[0]), this.remove(this.scrollModule.element, "e-tbar-pos"), setStyleAttribute(this.element, {
                overflow: "hidden"
            }));
        }, Toolbar.prototype.itemWidthCal = function(items) {
            var width = 0;
            return [].slice.call(selectAll("." + CLS_ITEM$2, items)).forEach(function(el) {
                isVisible(el) && (width += el.offsetWidth + parseFloat(window.getComputedStyle(el).marginRight));
            }), width;
        }, Toolbar.prototype.checkOverflow = function(element, innerItem) {
            if (isNullOrUndefined(element) || isNullOrUndefined(innerItem) || !isVisible(element)) return !1;
            var itemWidth, eleWidth = element.offsetWidth;
            itemWidth = this.tbarAlign || this.scrollModule ? this.itemWidthCal(this.scrollModule ? innerItem.querySelector(".e-hscroll-content") : innerItem) : innerItem.offsetWidth;
            var popNav = element.querySelector(".e-hor-nav"), scrollNav = element.querySelector(".e-scroll-nav");
            return itemWidth > eleWidth - (popNav ? popNav.offsetWidth : scrollNav ? 2 * scrollNav.offsetWidth : 0);
        }, Toolbar.prototype.refreshOverflow = function() {
            this.resize();
        }, Toolbar.prototype.renderOverflowMode = function() {
            var ele = this.element, innerItems = ele.querySelector("." + CLS_ITEMS$1), priorityCheck = this.popupPriCount > 0;
            if (ele && ele.children.length > 0) switch (this.offsetWid = ele.offsetWidth, this.remove(this.element, "e-toolpop"), 
            this.overflowMode) {
              case "Scrollable":
                this.destroyHScroll(), this.initHScroll(ele, ele.getElementsByClassName(CLS_ITEMS$1));
                break;

              case "Popup":
                this.add(this.element, "e-toolpop"), this.tbarAlign && this.removePositioning(), 
                (this.checkOverflow(ele, innerItems) || priorityCheck) && (this.createPopupEle(ele, [].slice.call(selectAll(".e-toolbar-items ." + CLS_ITEM$2, ele))), 
                this.element.querySelector(".e-hor-nav").setAttribute("tabIndex", "0")), this.tbarAlign && (this.add(innerItems, "e-tbar-pos"), 
                this.itemPositioning());
            }
        }, Toolbar.prototype.createPopupEle = function(ele, innerEle) {
            var innerNav = ele.querySelector(".e-hor-nav");
            innerNav || this.createPopupIcon(ele), innerNav = ele.querySelector(".e-hor-nav");
            var eleWidth = ele.offsetWidth - innerNav.offsetWidth;
            this.element.classList.remove("e-rtl"), setStyleAttribute(this.element, {
                direction: "initial"
            }), this.checkPriority(ele, innerEle, eleWidth, !0), this.enableRtl && this.element.classList.add("e-rtl"), 
            this.element.style.removeProperty("direction"), this.createPopup();
        }, Toolbar.prototype.pushingPoppedEle = function(tbarObj, popupPri, ele, eleHeight) {
            var element = tbarObj.element, nodes = selectAll(".e-overflow-show", ele), nodeIndex = 0, nodePri = 0;
            [].slice.call(selectAll("." + CLS_POPUP, element.querySelector("." + CLS_ITEMS$1))).forEach(function(el, index) {
                nodes = selectAll(".e-overflow-show", ele), el.classList.contains("e-overflow-show") && nodes.length > 0 ? tbarObj.tbResize && nodes.length > index ? (ele.insertBefore(el, nodes[index]), 
                ++nodePri) : (ele.insertBefore(el, ele.children[nodes.length]), ++nodePri) : el.classList.contains("e-overflow-show") ? (ele.insertBefore(el, ele.firstChild), 
                ++nodePri) : tbarObj.tbResize && el.classList.contains("e-overflow-hide") && ele.children.length > 0 && 0 === nodes.length ? (ele.insertBefore(el, ele.firstChild), 
                ++nodePri) : el.classList.contains("e-overflow-hide") ? popupPri.push(el) : tbarObj.tbResize ? (ele.insertBefore(el, ele.childNodes[nodeIndex + nodePri]), 
                ++nodeIndex) : ele.appendChild(el), setStyleAttribute(el, {
                    display: "",
                    height: eleHeight + "px"
                });
            }), popupPri.forEach(function(el) {
                ele.appendChild(el);
            });
            for (var tbarEle = selectAll("." + CLS_ITEM$2, element.querySelector("." + CLS_ITEMS$1)), i = tbarEle.length - 1; i >= 0; i--) {
                var tbarElement = tbarEle[i];
                if (!tbarElement.classList.contains("e-separator")) break;
                setStyleAttribute(tbarElement, {
                    display: "none"
                });
            }
        }, Toolbar.prototype.createPopup = function() {
            var eleHeight, eleItem, element = this.element;
            eleItem = element.querySelector(".e-toolbar-item:not(.e-separator ):not(." + CLS_POPUP + " )"), 
            eleHeight = "auto" === element.style.height || "" === element.style.height ? null : eleItem.offsetHeight;
            var ele;
            ele = element.querySelector("#" + element.id + "_popup.e-toolbar-pop") ? element.querySelector("#" + element.id + "_popup.e-toolbar-pop") : createElement("div", {
                id: element.id + "_popup",
                className: "e-toolbar-pop"
            }), this.pushingPoppedEle(this, [], ele, eleHeight), this.popupInit(element, ele);
        }, Toolbar.prototype.popupInit = function(element, ele) {
            if (this.popObj) {
                var popupEle = this.popObj.element;
                setStyleAttribute(popupEle, {
                    maxHeight: "",
                    display: "block"
                }), setStyleAttribute(popupEle, {
                    maxHeight: popupEle.offsetHeight + "px",
                    display: ""
                });
            } else {
                element.appendChild(ele), setStyleAttribute(this.element, {
                    overflow: ""
                });
                var popup = new Popup(null, {
                    relateTo: this.element,
                    offsetY: element.offsetHeight,
                    enableRtl: this.enableRtl,
                    open: this.popupOpen.bind(this),
                    close: this.popupClose,
                    position: this.enableRtl ? {
                        X: "left",
                        Y: "top"
                    } : {
                        X: "right",
                        Y: "top"
                    }
                });
                popup.appendTo(ele), EventHandler.add(document, "scroll", this.docEvent.bind(this)), 
                EventHandler.add(document, "click ", this.docEvent.bind(this)), popup.element.style.maxHeight = popup.element.offsetHeight + "px", 
                popup.hide(), this.popObj = popup, this.element.setAttribute("aria-haspopup", "true");
            }
        }, Toolbar.prototype.popupOpen = function(e) {
            var popObj = this.popObj, popupEle = this.popObj.element, toolEle = this.popObj.element.parentElement, popupNav = toolEle.querySelector(".e-hor-nav");
            setStyleAttribute(popObj.element, {
                height: "auto",
                maxHeight: ""
            }), popObj.element.style.maxHeight = popObj.element.offsetHeight + "px";
            var popupElePos = popupEle.offsetTop + popupEle.offsetHeight + calculatePosition(toolEle).top, popIcon = popupNav.firstElementChild;
            popupNav.classList.add("e-nav-active"), classList(popIcon, [ "e-popup-up-icon" ], [ "e-popup-down-icon" ]);
            var scrollVal = isNullOrUndefined(window.scrollY) ? 0 : window.scrollY;
            if (window.innerHeight + scrollVal < popupElePos) {
                var overflowHeight = popupEle.offsetHeight - (popupElePos - window.innerHeight - scrollVal + 5);
                popObj.height = overflowHeight + "px";
                for (var i = 0; i <= popupEle.childElementCount; i++) {
                    var ele = popupEle.children[i];
                    if (ele.offsetTop + ele.offsetHeight > overflowHeight) {
                        overflowHeight = ele.offsetTop;
                        break;
                    }
                }
                setStyleAttribute(popObj.element, {
                    maxHeight: overflowHeight + "px"
                });
            }
        }, Toolbar.prototype.popupClose = function(e) {
            var popupNav = this.element.parentElement.querySelector(".e-hor-nav"), popIcon = popupNav.firstElementChild;
            popupNav.classList.remove("e-nav-active"), classList(popIcon, [ "e-popup-down-icon" ], [ "e-popup-up-icon" ]);
        }, Toolbar.prototype.checkPriority = function(ele, inEle, eleWidth, pre) {
            for (var popPriority = this.popupPriCount > 0, eleWid = eleWidth, sepCheck = 0, itemCount = 0, itemPopCount = 0, checkClass = function(ele, val) {
                var rVal = !1;
                return val.forEach(function(cls) {
                    ele.classList.contains(cls) && (rVal = !0);
                }), rVal;
            }, i = inEle.length - 1; i >= 0; i--) {
                var mrgn = parseFloat(window.getComputedStyle(inEle[i]).marginRight);
                mrgn += parseFloat(window.getComputedStyle(inEle[i]).marginLeft);
                var fstEleCheck = inEle[i] === this.tbarEle[0];
                fstEleCheck && (this.tbarEleMrgn = mrgn);
                var eleWid_1 = fstEleCheck ? inEle[i].offsetWidth + mrgn : inEle[i].offsetWidth;
                if (checkClass(inEle[i], [ "e-popup-alone" ]) && popPriority && (inEle[i].classList.add(CLS_POPUP), 
                setStyleAttribute(inEle[i], {
                    display: "none",
                    minWidth: eleWid_1 + "px"
                }), itemPopCount++), inEle[i].offsetLeft + inEle[i].offsetWidth + mrgn > eleWidth) {
                    if (inEle[i].classList.contains("e-separator")) {
                        if (sepCheck > 0 && itemCount === itemPopCount) {
                            var sepEle = inEle[i + itemCount + (sepCheck - 1)];
                            checkClass(sepEle, [ "e-separator", "e-ignore" ]) && setStyleAttribute(sepEle, {
                                display: "none"
                            });
                        }
                        sepCheck++, itemCount = 0, itemPopCount = 0;
                    } else itemCount++;
                    inEle[i].classList.contains("e-overflow-show") && pre ? eleWidth -= inEle[i].offsetWidth + mrgn : checkClass(inEle[i], [ "e-separator", "e-ignore" ]) ? eleWidth -= inEle[i].offsetWidth + mrgn : (inEle[i].classList.add(CLS_POPUP), 
                    setStyleAttribute(inEle[i], {
                        display: "none",
                        minWidth: eleWid_1 + "px"
                    }), itemPopCount++);
                }
            }
            if (pre) {
                var popedEle = selectAll(".e-toolbar-item:not(." + CLS_POPUP + ")", this.element);
                this.checkPriority(ele, popedEle, eleWid, !1);
            }
        }, Toolbar.prototype.createPopupIcon = function(element) {
            var nav = createElement("div", {
                id: element.id.concat("_nav"),
                className: "e-" + element.id.concat("_nav e-hor-nav")
            });
            "msie" !== Browser.info.name && "edge" !== Browser.info.name || nav.classList.add("e-ie-align");
            var navItem = createElement("div", {
                className: "e-popup-down-icon e-icons"
            });
            nav.appendChild(navItem), nav.setAttribute("tabindex", "0"), element.appendChild(nav);
        }, Toolbar.prototype.tbarPriRef = function(inEle, indx, sepPri, el, des, elWid, wid, ig) {
            var ignoreCount = ig, popEle = this.popObj.element, priEleCnt = selectAll("." + CLS_POPUP + ":not(.e-overflow-show)", popEle).length, checkClass = function(ele, val) {
                return ele.classList.contains(val);
            };
            if (0 === selectAll(".e-toolbar-item:not(.e-separator):not(.e-overflow-show)", inEle).length) {
                var eleSep = inEle.children[indx - (indx - sepPri) - 1], ignoreCheck = !isNullOrUndefined(eleSep) && checkClass(eleSep, "e-ignore");
                if (!isNullOrUndefined(eleSep) && checkClass(eleSep, "e-separator") && !isVisible(eleSep) || ignoreCheck) {
                    eleSep.style.display = "inherit";
                    var eleSepWidth = eleSep.offsetWidth + 2 * parseFloat(window.getComputedStyle(eleSep).marginRight), prevSep = eleSep.previousElementSibling;
                    elWid + eleSepWidth < wid || des ? (inEle.insertBefore(el, inEle.children[indx + ignoreCount - (indx - sepPri)]), 
                    isNullOrUndefined(prevSep) || (prevSep.style.display = "")) : prevSep.classList.contains("e-separator") && (prevSep.style.display = "none"), 
                    eleSep.style.display = "";
                } else inEle.insertBefore(el, inEle.children[indx + ignoreCount - (indx - sepPri)]);
            } else inEle.insertBefore(el, inEle.children[indx + ignoreCount - priEleCnt]);
        }, Toolbar.prototype.popupRefresh = function(popupEle, destroy) {
            var ele = this.element, popNav = ele.querySelector(".e-hor-nav"), innerEle = ele.querySelector("." + CLS_ITEMS$1);
            if (!isNullOrUndefined(popNav)) {
                innerEle.removeAttribute("style"), popupEle.style.display = "block";
                var width = ele.offsetWidth - (popNav.offsetWidth + innerEle.offsetWidth);
                this.popupEleRefresh(width, popupEle, destroy), popupEle.style.display = "", 0 === popupEle.children.length && popNav && this.popObj && (detach(popNav), 
                popNav = null, this.popObj.destroy(), detach(this.popObj.element), this.popObj = null, 
                ele.setAttribute("aria-haspopup", "false"), ele.classList.remove("e-toolpop"));
            }
        }, Toolbar.prototype.ignoreEleFetch = function(index, innerEle) {
            var ignoreEle = [].slice.call(innerEle.querySelectorAll(".e-ignore")), ignoreInx = [], count = 0;
            return ignoreEle.length > 0 ? (ignoreEle.forEach(function(ele) {
                ignoreInx.push([].slice.call(innerEle.children).indexOf(ele));
            }), ignoreInx.forEach(function(val) {
                val <= index && count++;
            }), count) : 0;
        }, Toolbar.prototype.checkPopupRefresh = function(root, popEle) {
            popEle.style.display = "block";
            var elWid = this.popupEleWidth(popEle.firstElementChild);
            popEle.firstElementChild.style.removeProperty("Position");
            var tbarWidth = root.offsetWidth - root.querySelector(".e-hor-nav").offsetWidth, tbarItemsWid = root.querySelector("." + CLS_ITEMS$1).offsetWidth;
            return popEle.style.removeProperty("display"), tbarWidth > elWid + tbarItemsWid;
        }, Toolbar.prototype.popupEleWidth = function(el) {
            el.style.position = "absolute";
            var elWidth = el.offsetWidth, btnText = el.querySelector(".e-tbar-btn-text");
            if (el.classList.contains("e-tbtn-align") || el.classList.contains("e-popup-text")) {
                var btn = el.children[0];
                !isNullOrUndefined(btnText) && el.classList.contains("e-popup-text") ? btnText.style.display = "none" : !isNullOrUndefined(btnText) && el.classList.contains("e-toolbar-text") && (btnText.style.display = "block"), 
                btn.style.minWidth = "0%", elWidth = el.offsetWidth, btn.style.minWidth = "", isNullOrUndefined(btnText) || (btnText.style.display = "");
            }
            return elWidth;
        }, Toolbar.prototype.popupEleRefresh = function(width, popupEle, destroy) {
            for (var priEleCnt, index, popPriority = this.popupPriCount > 0, eleSplice = this.tbarEle, innerEle = this.element.querySelector("." + CLS_ITEMS$1), ignoreCount = 0, _loop_1 = function(el) {
                if (el.classList.contains("e-popup-alone") && popPriority && !destroy) return "continue";
                var elWidth = this_1.popupEleWidth(el);
                if (el === this_1.tbarEle[0] && (elWidth += this_1.tbarEleMrgn), el.style.position = "", 
                !(elWidth < width || destroy)) return "break";
                if (el.style.minWidth = "", el.classList.contains("e-overflow-hide") || el.classList.remove(CLS_POPUP), 
                index = this_1.tbarEle.indexOf(el), this_1.tbarAlign) {
                    var pos = this_1.items[index].align;
                    index = this_1.tbarAlgEle[(pos + "s").toLowerCase()].indexOf(el), eleSplice = this_1.tbarAlgEle[(pos + "s").toLowerCase()], 
                    innerEle = this_1.element.querySelector(".e-toolbar-items .e-toolbar-" + pos.toLowerCase());
                }
                var sepBeforePri_1 = 0;
                eleSplice.slice(0, index).forEach(function(el) {
                    (el.classList.contains("e-overflow-show") || el.classList.contains("e-separator")) && (el.classList.contains("e-separator") && (el.style.display = "", 
                    width -= el.offsetWidth), sepBeforePri_1++);
                }), ignoreCount = this_1.ignoreEleFetch(index, innerEle), el.classList.contains("e-overflow-show") ? (this_1.tbarPriRef(innerEle, index, sepBeforePri_1, el, destroy, elWidth, width, ignoreCount), 
                width -= el.offsetWidth) : 0 === index ? (innerEle.insertBefore(el, innerEle.firstChild), 
                width -= el.offsetWidth) : (priEleCnt = selectAll(".e-overflow-show", this_1.popObj.element).length, 
                innerEle.insertBefore(el, innerEle.children[index + ignoreCount - priEleCnt]), width -= el.offsetWidth), 
                el.style.height = "";
            }, this_1 = this, _i = 0, _a = [].slice.call(popupEle.children); _i < _a.length; _i++) {
                if ("break" === _loop_1(_a[_i])) break;
            }
            this.checkOverflow(this.element, this.element.getElementsByClassName(CLS_ITEMS$1)[0]) && !destroy && this.renderOverflowMode();
        }, Toolbar.prototype.removePositioning = function() {
            var item = this.element.querySelector("." + CLS_ITEMS$1);
            if (!isNullOrUndefined(item) && item.classList.contains("e-tbar-pos")) {
                this.remove(item, "e-tbar-pos");
                var innerItem = [].slice.call(item.childNodes);
                innerItem[1].removeAttribute("style"), innerItem[2].removeAttribute("style");
            }
        }, Toolbar.prototype.refreshPositioning = function() {
            var item = this.element.querySelector("." + CLS_ITEMS$1);
            this.add(item, "e-tbar-pos"), this.itemPositioning();
        }, Toolbar.prototype.itemPositioning = function() {
            var item = this.element.querySelector("." + CLS_ITEMS$1);
            if (!isNullOrUndefined(item) && item.classList.contains("e-tbar-pos")) {
                var innerItem, popupNav = this.element.querySelector(".e-hor-nav"), margin = (innerItem = this.scrollModule ? [].slice.call(item.querySelector(".e-hscroll-content").children) : [].slice.call(item.childNodes))[0].offsetWidth + innerItem[2].offsetWidth, tbarWid = this.element.offsetWidth;
                if (popupNav) {
                    tbarWid -= popupNav.offsetWidth;
                    var popWid = popupNav.offsetWidth + "px";
                    innerItem[2].removeAttribute("style"), this.enableRtl ? innerItem[2].style.left = popWid : innerItem[2].style.right = popWid;
                }
                if (!(tbarWid <= margin)) {
                    var value = (tbarWid - margin - innerItem[1].offsetWidth) / 2;
                    innerItem[1].removeAttribute("style");
                    var mrgn = innerItem[0].offsetWidth + value + "px";
                    this.enableRtl ? innerItem[1].style.marginRight = mrgn : innerItem[1].style.marginLeft = mrgn;
                }
            }
        }, Toolbar.prototype.tbarItemAlign = function(item, itemEle, pos) {
            var _this = this;
            if (!item.showAlwaysInPopup || "Show" === item.overflow) {
                var alignDiv = [];
                if (alignDiv.push(createElement("div", {
                    className: "e-toolbar-left"
                })), alignDiv.push(createElement("div", {
                    className: "e-toolbar-center"
                })), alignDiv.push(createElement("div", {
                    className: "e-toolbar-right"
                })), 0 === pos && "Left" !== item.align) alignDiv.forEach(function(ele) {
                    itemEle.appendChild(ele);
                }), this.tbarAlign = !0, this.add(itemEle, "e-tbar-pos"); else if ("Left" !== item.align) {
                    var alignEle = itemEle.childNodes, leftAlign_1 = alignDiv[0];
                    [].slice.call(alignEle).forEach(function(el) {
                        _this.tbarAlgEle.lefts.push(el), leftAlign_1.appendChild(el);
                    }), itemEle.appendChild(leftAlign_1), itemEle.appendChild(alignDiv[1]), itemEle.appendChild(alignDiv[2]), 
                    this.tbarAlign = !0, this.add(itemEle, "e-tbar-pos");
                }
            }
        }, Toolbar.prototype.ctrlTemplate = function() {
            var _this = this;
            this.ctrlTem = this.trgtEle.cloneNode(!0), this.add(this.trgtEle, CLS_ITEMS$1), 
            this.tbarEle = [];
            [].slice.call(this.trgtEle.children).forEach(function(ele) {
                "DIV" === ele.tagName && (_this.tbarEle.push(ele), ele.setAttribute("aria-disabled", "false"), 
                _this.add(ele, CLS_ITEM$2));
            });
        }, Toolbar.prototype.renderItems = function() {
            var itemEleDom, innerItem, innerPos, ele = this.element, items = this.items;
            if (ele && ele.children.length > 0 && (itemEleDom = ele.querySelector("." + CLS_ITEMS$1)), 
            null != this.trgtEle) this.ctrlTemplate(); else if (ele && items.length > 0) {
                itemEleDom || (itemEleDom = createElement("div", {
                    className: CLS_ITEMS$1
                }));
                for (var i = 0; i < items.length; i++) innerItem = this.renderSubComponent(items[i]), 
                -1 === this.tbarEle.indexOf(innerItem) && this.tbarEle.push(innerItem), this.tbarAlign || this.tbarItemAlign(items[i], itemEleDom, i), 
                (innerPos = itemEleDom.querySelector(".e-toolbar-" + items[i].align.toLowerCase())) ? (items[i].showAlwaysInPopup && "Show" !== items[i].overflow || this.tbarAlgEle[(items[i].align + "s").toLowerCase()].push(innerItem), 
                innerPos.appendChild(innerItem)) : itemEleDom.appendChild(innerItem);
                ele.appendChild(itemEleDom);
            }
        }, Toolbar.prototype.setAttr = function(attr, element) {
            for (var keyVal, key = Object.keys(attr), i = 0; i < key.length; i++) "class" === (keyVal = key[i]) ? this.add(element, attr[keyVal]) : element.setAttribute(keyVal, attr[keyVal]);
        }, Toolbar.prototype.enableItems = function(items, isEnable) {
            var elements = items, len = elements.length;
            isNullOrUndefined(isEnable) && (isEnable = !0);
            var enable = function(isEnable, ele) {
                isEnable ? (ele.classList.remove("e-overlay"), ele.setAttribute("aria-disabled", "false")) : (ele.classList.add("e-overlay"), 
                ele.setAttribute("aria-disabled", "true"));
            };
            if (len && len > 1) {
                for (var _i = 0, _a = [].slice.call(elements); _i < _a.length; _i++) {
                    enable(isEnable, _a[_i]);
                }
                isEnable ? removeClass(elements, "e-overlay") : addClass(elements, "e-overlay");
            } else {
                enable(isEnable, len && 1 === len ? elements[0] : items);
            }
        }, Toolbar.prototype.addItems = function(items, index) {
            var innerItems, innerEle, itemsDiv = this.element.querySelector("." + CLS_ITEMS$1), itemAgn = "Left";
            isNullOrUndefined(index) && (index = 0), items.forEach(function(e) {
                isNullOrUndefined(e.align) || "Left" === e.align || "Left" !== itemAgn || (itemAgn = e.align);
            });
            for (var _i = 0, items_1 = items; _i < items_1.length; _i++) {
                var item = items_1[_i];
                if (isNullOrUndefined(item.type) && (item.type = "Button"), innerItems = selectAll("." + CLS_ITEM$2, this.element), 
                item.align = itemAgn, innerEle = this.renderSubComponent(item), this.tbarEle.length >= index && innerItems.length > 0) {
                    this.destroyMode();
                    var algIndex = "L" === item.align[0] ? 0 : "C" === item.align[0] ? 1 : 2, ele = void 0;
                    this.tbarAlign || "Left" === itemAgn ? this.tbarAlign ? ((ele = closest(innerItems[0], "." + CLS_ITEMS$1).children[algIndex]).insertBefore(innerEle, ele.children[index]), 
                    this.tbarAlgEle[(item.align + "s").toLowerCase()].splice(index, 0, innerEle), this.refreshPositioning()) : innerItems[0].parentNode.insertBefore(innerEle, innerItems[index]) : (this.tbarItemAlign(item, itemsDiv, 1), 
                    this.tbarAlign = !0, (ele = closest(innerItems[0], "." + CLS_ITEMS$1).children[algIndex]).appendChild(innerEle), 
                    this.tbarAlgEle[(item.align + "s").toLowerCase()].push(innerEle), this.refreshPositioning()), 
                    this.items.splice(index, 0, item), this.tbarEle.splice(index, 0, innerEle), index++, 
                    this.offsetWid = itemsDiv.offsetWidth;
                }
            }
            itemsDiv.style.width = "", this.renderOverflowMode();
        }, Toolbar.prototype.removeItems = function(args) {
            var index, elements = args, innerItems = [].slice.call(selectAll("." + CLS_ITEM$2, this.element));
            if ("number" == typeof elements) index = parseInt(args.toString(), 10), this.removeItemByIndex(index, innerItems); else if (elements && elements.length > 1) for (var _i = 0, _a = [].slice.call(elements); _i < _a.length; _i++) {
                var ele = _a[_i];
                index = this.tbarEle.indexOf(ele), this.removeItemByIndex(index, innerItems), innerItems = selectAll("." + CLS_ITEM$2, this.element);
            } else {
                ele = elements && elements.length && 1 === elements.length ? elements[0] : args;
                index = innerItems.indexOf(ele), this.removeItemByIndex(index, innerItems);
            }
            this.resize();
        }, Toolbar.prototype.removeItemByIndex = function(index, innerItems) {
            if (this.tbarEle[index] && innerItems[index]) {
                var eleIdx = this.tbarEle.indexOf(innerItems[index]);
                if (this.tbarAlign) {
                    var indexAgn = void 0;
                    indexAgn = this.tbarAlgEle[(this.items[eleIdx].align + "s").toLowerCase()].indexOf(this.tbarEle[eleIdx]), 
                    this.tbarAlgEle[(this.items[eleIdx].align + "s").toLowerCase()].splice(indexAgn, 1);
                }
                detach(innerItems[index]), this.items.splice(eleIdx, 1), this.tbarEle.splice(eleIdx, 1);
            }
        }, Toolbar.prototype.templateRender = function(templateProp, innerEle, item) {
            var isComponent, itemType = item.type, eleObj = templateProp;
            if ("object" == typeof templateProp && (isComponent = "function" == typeof eleObj.appendTo), 
            "string" != typeof templateProp && isComponent) {
                if ("Input" === itemType) {
                    ele = createElement("input");
                    item.id ? ele.id = item.id : ele.id = getUniqueID("tbr-ipt"), innerEle.appendChild(ele), 
                    eleObj.appendTo(ele);
                }
            } else {
                var templateFn = void 0, val = templateProp;
                val = "string" == typeof templateProp ? templateProp.trim() : templateProp;
                try {
                    if (document.querySelectorAll(val).length) {
                        var ele, tempStr = (ele = document.querySelector(val)).outerHTML.trim();
                        templateFn = compile$$1(tempStr), detach(ele), item.template = tempStr;
                    }
                } catch (e) {
                    templateFn = compile$$1(val);
                }
                var tempArray = void 0;
                isNullOrUndefined(templateFn) || (tempArray = templateFn({}, this, "template")), 
                !isNullOrUndefined(tempArray) && tempArray.length > 0 && [].slice.call(tempArray).forEach(function(ele) {
                    isNullOrUndefined(ele.tagName) || (ele.style.display = ""), innerEle.appendChild(ele);
                });
            }
            this.add(innerEle, "e-template"), this.tbarEle.push(innerEle);
        }, Toolbar.prototype.buttonRendering = function(item, innerEle) {
            var dom = createElement("button", {
                className: "e-tbar-btn"
            });
            dom.setAttribute("type", "button");
            var iconCss, iconPos, textStr = item.text;
            item.id ? dom.id = item.id : dom.id = getUniqueID("e-tbr-btn");
            var btnTxt = createElement("div", {
                className: "e-tbar-btn-text"
            });
            return textStr ? (btnTxt.innerHTML = textStr, dom.appendChild(btnTxt), dom.classList.add("e-tbtn-txt")) : this.add(innerEle, "e-tbtn-align"), 
            (item.prefixIcon || item.suffixIcon) && (item.prefixIcon && item.suffixIcon || item.prefixIcon ? (iconCss = item.prefixIcon + " e-icons", 
            iconPos = "Left") : (iconCss = item.suffixIcon + " e-icons", iconPos = "Right")), 
            new Button({
                iconCss: iconCss,
                iconPosition: iconPos
            }, dom), item.width && setStyleAttribute(dom, {
                width: formatUnit(item.width)
            }), dom;
        }, Toolbar.prototype.renderSubComponent = function(item) {
            var innerEle, dom;
            if ((innerEle = createElement("div", {
                className: CLS_ITEM$2
            })).setAttribute("aria-disabled", "false"), this.tbarEle || (this.tbarEle = []), 
            item.htmlAttributes && this.setAttr(item.htmlAttributes, innerEle), item.tooltipText && innerEle.setAttribute("title", item.tooltipText), 
            item.cssClass && (innerEle.className = innerEle.className + " " + item.cssClass), 
            item.template) this.templateRender(item.template, innerEle, item); else switch (item.type) {
              case "Button":
                (dom = this.buttonRendering(item, innerEle)).setAttribute("tabindex", "-1"), innerEle.appendChild(dom), 
                innerEle.addEventListener("click", this.itemClick.bind(this));
                break;

              case "Separator":
                this.add(innerEle, "e-separator");
            }
            if (item.showTextOn) {
                var sTxt = item.showTextOn;
                "Toolbar" === sTxt ? (this.add(innerEle, "e-toolbar-text"), this.add(innerEle, "e-tbtn-align")) : "Overflow" === sTxt && this.add(innerEle, "e-popup-text");
            }
            if (item.overflow) {
                var overflow = item.overflow;
                "Show" === overflow ? this.add(innerEle, "e-overflow-show") : "Hide" === overflow && (innerEle.classList.contains("e-separator") || this.add(innerEle, "e-overflow-hide"));
            }
            return "Show" !== item.overflow && item.showAlwaysInPopup && !innerEle.classList.contains("e-separator") && (this.add(innerEle, "e-popup-alone"), 
            this.popupPriCount++), innerEle;
        }, Toolbar.prototype.itemClick = function(e) {
            this.activeEleSwitch(e.currentTarget);
        }, Toolbar.prototype.activeEleSwitch = function(ele) {
            this.activeEleRemove(ele.firstElementChild), this.activeEle.focus();
        }, Toolbar.prototype.activeEleRemove = function(curEle) {
            isNullOrUndefined(this.activeEle) || this.activeEle.setAttribute("tabindex", "-1"), 
            this.activeEle = curEle, isNullOrUndefined(this.trgtEle) && !curEle.parentElement.classList.contains("e-template") ? curEle.removeAttribute("tabindex") : this.activeEle.setAttribute("tabindex", "0");
        }, Toolbar.prototype.getPersistData = function() {
            return this.addOnPersist([]);
        }, Toolbar.prototype.getModuleName = function() {
            return "toolbar";
        }, Toolbar.prototype.itemsRerender = function(newProp) {
            this.items = this.tbarItemsCol, this.destroyMode(), this.destroyItems(), this.items = newProp, 
            this.tbarItemsCol = this.items, this.renderItems(), this.renderOverflowMode();
        }, Toolbar.prototype.resize = function() {
            var ele = this.element;
            this.tbResize = !0, this.tbarAlign && this.itemPositioning(), this.popObj && this.popObj.hide();
            var checkOverflow = this.checkOverflow(ele, ele.getElementsByClassName(CLS_ITEMS$1)[0]);
            checkOverflow || this.destroyHScroll(), checkOverflow && this.scrollModule && this.offsetWid === ele.offsetWidth || ((this.offsetWid > ele.offsetWidth || checkOverflow) && this.renderOverflowMode(), 
            this.popObj && (this.tbarAlign && this.removePositioning(), this.popupRefresh(this.popObj.element, !1), 
            this.tbarAlign && this.refreshPositioning()), this.offsetWid = ele.offsetWidth, 
            this.tbResize = !1);
        }, Toolbar.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var tEle = this.element, _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "items":
                    if (newProp.items instanceof Array && oldProp.items instanceof Array) this.itemsRerender(newProp.items); else for (var changedProb = Object.keys(newProp.items), i = 0; i < changedProb.length; i++) {
                        var index = parseInt(Object.keys(newProp.items)[i], 10), property = Object.keys(newProp.items[index])[0], newProperty = (Object(oldProp.items[index])[property], 
                        Object(newProp.items[index])[property]);
                        if (this.tbarAlign || "align" === property) {
                            this.refresh();
                            break;
                        }
                        ("showAlwaysInPopup" === property && !newProperty || this.items[index].showAlwaysInPopup && "overflow" === property && 0 !== this.popupPriCount) && --this.popupPriCount, 
                        this.destroyMode();
                        detach([].slice.call(selectAll(".e-toolbar-items ." + CLS_ITEM$2, tEle))[index]), 
                        this.tbarEle.splice(index, 1), this.addItems([ this.items[index] ], index), this.items.splice(index, 1), 
                        this.items[index].template && this.tbarEle.splice(this.items.length, 1);
                    }
                    break;

                  case "width":
                    var wid = tEle.offsetWidth;
                    setStyleAttribute(tEle, {
                        width: formatUnit(newProp.width)
                    }), this.renderOverflowMode(), this.popObj && wid < tEle.offsetWidth && this.popupRefresh(this.popObj.element, !1);
                    break;

                  case "height":
                    setStyleAttribute(this.element, {
                        height: formatUnit(newProp.height)
                    });
                    break;

                  case "overflowMode":
                    this.destroyMode(), this.renderOverflowMode(), this.enableRtl && this.add(tEle, "e-rtl"), 
                    this.refreshOverflow();
                    break;

                  case "enableRtl":
                    newProp.enableRtl ? this.add(tEle, "e-rtl") : this.remove(tEle, "e-rtl"), isNullOrUndefined(this.scrollModule) || (newProp.enableRtl ? this.add(this.scrollModule.element, "e-rtl") : this.remove(this.scrollModule.element, "e-rtl")), 
                    isNullOrUndefined(this.popObj) || (newProp.enableRtl ? this.add(this.popObj.element, "e-rtl") : this.remove(this.popObj.element, "e-rtl")), 
                    this.tbarAlign && this.itemPositioning();
                }
            }
        }, Toolbar.prototype.hideItem = function(index, value) {
            if (this.tbarEle[index]) {
                var innerItems = [].slice.call(selectAll("." + CLS_ITEM$2, this.element));
                !0 === value ? innerItems[index].classList.add("e-hidden") : innerItems[index].classList.remove("e-hidden"), 
                this.refreshOverflow();
            }
        }, __decorate$33([ Collection([], Item$1) ], Toolbar.prototype, "items", void 0), 
        __decorate$33([ Property("auto") ], Toolbar.prototype, "width", void 0), __decorate$33([ Property("auto") ], Toolbar.prototype, "height", void 0), 
        __decorate$33([ Property("Scrollable") ], Toolbar.prototype, "overflowMode", void 0), 
        __decorate$33([ Property(!1) ], Toolbar.prototype, "enableRtl", void 0), __decorate$33([ Event() ], Toolbar.prototype, "clicked", void 0), 
        __decorate$33([ Event() ], Toolbar.prototype, "created", void 0), __decorate$33([ Event() ], Toolbar.prototype, "destroyed", void 0), 
        __decorate$33([ Event() ], Toolbar.prototype, "beforeCreate", void 0), Toolbar = __decorate$33([ NotifyPropertyChanges ], Toolbar);
    }(Component), __extends$33 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$32 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, CLS_HEADER$1 = "e-tab-header", CLS_TB_ITEMS = "e-toolbar-items", CLS_TB_ITEM = "e-toolbar-item", CLS_TB_POPUP = "e-toolbar-popup", TabActionSettings = function(_super) {
        function TabActionSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$33(TabActionSettings, _super), __decorate$32([ Property("SlideLeftIn") ], TabActionSettings.prototype, "effect", void 0), 
        __decorate$32([ Property(600) ], TabActionSettings.prototype, "duration", void 0), 
        __decorate$32([ Property("ease") ], TabActionSettings.prototype, "easing", void 0), 
        TabActionSettings;
    }(ChildProperty), TabAnimationSettings = function(_super) {
        function TabAnimationSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$33(TabAnimationSettings, _super), __decorate$32([ Complex({
            effect: "SlideLeftIn",
            duration: 600,
            easing: "ease"
        }, TabActionSettings) ], TabAnimationSettings.prototype, "previous", void 0), __decorate$32([ Complex({
            effect: "SlideRightIn",
            duration: 600,
            easing: "ease"
        }, TabActionSettings) ], TabAnimationSettings.prototype, "next", void 0), TabAnimationSettings;
    }(ChildProperty), Header = function(_super) {
        function Header() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$33(Header, _super), __decorate$32([ Property("") ], Header.prototype, "text", void 0), 
        __decorate$32([ Property("") ], Header.prototype, "iconCss", void 0), __decorate$32([ Property("left") ], Header.prototype, "iconPosition", void 0), 
        Header;
    }(ChildProperty), TabItem = function(_super) {
        function TabItem() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$33(TabItem, _super), __decorate$32([ Complex({}, Header) ], TabItem.prototype, "header", void 0), 
        __decorate$32([ Property("") ], TabItem.prototype, "content", void 0), __decorate$32([ Property("") ], TabItem.prototype, "cssClass", void 0), 
        __decorate$32([ Property(!1) ], TabItem.prototype, "disabled", void 0), TabItem;
    }(ChildProperty), Tab = function(_super) {
        function Tab(options, element) {
            var _this = _super.call(this, options, element) || this;
            return _this.prevIndex = 0, _this.show = {
                name: "SlideDown",
                duration: 100
            }, _this.hide = {
                name: "SlideUp",
                duration: 100
            }, _this.animateOptions = {}, _this.animObj = new Animation(_this.animateOptions), 
            _this.maxHeight = 0, _this.title = "Close", _this.keyConfigs = {
                tab: "tab",
                home: "home",
                end: "end",
                enter: "enter",
                space: "space",
                delete: "delete",
                moveLeft: "leftarrow",
                moveRight: "rightarrow",
                moveUp: "uparrow",
                moveDown: "downarrow"
            }, _this;
        }
        return __extends$33(Tab, _super), Tab.prototype.destroy = function() {
            var _this = this;
            if (isNullOrUndefined(this.tbObj) || this.tbObj.destroy(), this.unWireEvents(), 
            [ "role", "aria-disabled", "aria-activedescendant", "tabindex", "aria-orientation" ].forEach(function(val) {
                _this.element.removeAttribute(val);
            }), this.expTemplateContent(), this.isTemplate) {
                var cntEle = select(".e-tab > .e-content", this.element);
                this.element.classList.remove("e-template"), isNullOrUndefined(cntEle) || (cntEle.innerHTML = this.cnt);
            } else this.element.innerHTML = "";
            _super.prototype.destroy.call(this), this.trigger("destroyed");
        }, Tab.prototype.preRender = function() {
            var nested = closest(this.element, ".e-content");
            this.isNested = !1, this.isPopup = !1, this.initRender = !0, this.isSwipeed = !1, 
            this.templateEle = [], isNullOrUndefined(nested) || (nested.parentElement.classList.add("e-nested"), 
            this.isNested = !0);
            var name = Browser.info.name, css = "msie" === name ? "e-ie" : "edge" === name ? "e-edge" : "safari" === name ? "e-safari" : "";
            setStyleAttribute(this.element, {
                width: formatUnit(this.width),
                height: formatUnit(this.height)
            }), this.setCssClass(this.element, this.cssClass, !0), attributes(this.element, {
                role: "tablist",
                "aria-disabled": "false",
                "aria-activedescendant": ""
            }), this.setCssClass(this.element, css, !0);
        }, Tab.prototype.render = function() {
            this.renderContainer(), this.wireEvents(), this.initRender = !1;
        }, Tab.prototype.renderContainer = function() {
            var ele = this.element;
            if (this.items.length > 0 && 0 === ele.children.length) ele.appendChild(createElement("div", {
                className: "e-content"
            })), this.setOrientation(this.headerPlacement, createElement("div", {
                className: CLS_HEADER$1
            })), this.isTemplate = !1; else if (this.element.children.length > 0) {
                this.isTemplate = !0, ele.classList.add("e-template");
                var header = ele.querySelector(".e-tab-header");
                header && "Bottom" === this.headerPlacement && this.setOrientation(this.headerPlacement, header);
            }
            if (!isNullOrUndefined(select(".e-tab-header", this.element)) && !isNullOrUndefined(select(".e-content", this.element))) {
                if (this.renderHeader(), this.tbItems = select(".e-tab-header ." + CLS_TB_ITEMS, this.element), 
                isNullOrUndefined(this.tbItems) || rippleEffect(this.tbItems, {
                    selector: ".e-tab-wrap"
                }), this.renderContent(), selectAll("." + CLS_TB_ITEM, this.element).length > 0) {
                    this.tbItems = select(".e-tab-header ." + CLS_TB_ITEMS, this.element), this.bdrLine = createElement("div", {
                        className: "e-indicator e-hidden e-ignore"
                    });
                    var scrCnt = select(".e-hscroll-content", this.tbItems);
                    isNullOrUndefined(scrCnt) ? this.tbItems.insertBefore(this.bdrLine, this.tbItems.firstChild) : scrCnt.insertBefore(this.bdrLine, scrCnt.firstChild), 
                    this.setContentHeight(!0), this.select(this.selectedItem);
                }
                this.setRTL(this.enableRtl);
            }
        }, Tab.prototype.renderHeader = function() {
            var _this = this, tabItems = [];
            if (this.hdrEle = select(".e-tab-header", this.element), this.btnCls = createElement("span", {
                className: "e-icons e-close-icon",
                attrs: {
                    title: this.title
                }
            }).outerHTML, this.isTemplate) {
                for (var count = this.hdrEle.children.length, hdrItems = [], i = 0; i < count; i++) hdrItems.push(this.hdrEle.children.item(i).innerHTML);
                count > 0 && (this.hdrEle.innerHTML = "", this.hdrEle.appendChild(createElement("div", {
                    className: "e-items"
                })), hdrItems.forEach(function(item, index) {
                    var attr = {
                        className: "e-item",
                        id: "e-item_" + index,
                        attrs: {
                            role: "tab",
                            "aria-controls": "e-content_" + index,
                            "aria-selected": "false"
                        }
                    }, wrap = createElement("div", {
                        className: "e-tab-wrap",
                        innerHTML: createElement("div", {
                            className: "e-text-wrap",
                            innerHTML: createElement("span", {
                                className: "e-tab-text",
                                innerHTML: item,
                                attrs: {
                                    role: "presentation"
                                }
                            }).outerHTML + _this.btnCls
                        }).outerHTML,
                        attrs: {
                            tabIndex: "-1"
                        }
                    });
                    select(".e-items", _this.element).appendChild(createElement("div", attr)), selectAll(".e-item", _this.element)[index].appendChild(wrap);
                }));
            } else tabItems = this.parseObject(this.items, 0);
            this.tbObj = new Toolbar({
                width: "100%",
                overflowMode: this.overflowMode,
                items: 0 !== tabItems.length ? tabItems : [],
                clicked: this.clickHandler.bind(this)
            }), this.tbObj.appendTo(this.hdrEle), attributes(this.element, {
                "aria-orientation": "horizontal"
            }), this.setCloseButton(this.showCloseButton), this.setProperties({
                headerPlacement: this.element.children.item(0).classList.contains(CLS_HEADER$1) ? "Top" : "Bottom"
            }, !0);
        }, Tab.prototype.renderContent = function() {
            this.cntEle = select(".e-content", this.element);
            var hdrItem = selectAll("." + CLS_TB_ITEM, this.element);
            if (this.isTemplate) {
                this.cnt = this.cntEle.children.length > 0 ? this.cntEle.innerHTML : "";
                for (var contents = this.cntEle.children, i = 0; i < hdrItem.length; i++) contents.length - 1 >= i && (contents.item(i).className += "e-item", 
                attributes(contents.item(i), {
                    role: "tabpanel",
                    "aria-labelledby": "e-item_" + i
                }), contents.item(i).id = "e-content_" + i);
            }
        }, Tab.prototype.parseObject = function(items, index) {
            var _this = this, inHTML = "", tbCount = selectAll("." + CLS_TB_ITEM, this.element).length, tItems = [];
            return items.forEach(function(item, i) {
                var pos = isNullOrUndefined(item.header.iconPosition) ? "" : item.header.iconPosition, css = isNullOrUndefined(item.header.iconCss) ? "" : item.header.iconCss, txt = item.header.text, id = 0 === tbCount ? i : !0 === _this.isReplace ? i + index : tbCount + i, disabled = item.disabled ? " e-disable e-overlay" : "", tHtml = txt instanceof Object ? txt.outerHTML : txt, txtEmpty = !isNullOrUndefined(tHtml) && "" !== tHtml, tEle = txtEmpty ? createElement("div", {
                    className: "e-tab-text",
                    innerHTML: tHtml,
                    attrs: {
                        role: "presentation"
                    }
                }).outerHTML : "", icon = createElement("span", {
                    className: "e-icons e-tab-icon e-icon-" + pos + " " + css
                }).outerHTML;
                if ("" !== txt && void 0 !== txt || "" !== css) {
                    inHTML = "" !== txt && void 0 !== txt && "" !== css ? "left" === pos || "top" === pos ? icon + "" + tEle : tEle + "" + icon : "" === css ? tEle : icon;
                    var wrapAttrs = item.disabled ? {} : {
                        tabIndex: "-1"
                    }, tItem = {
                        htmlAttributes: {
                            id: "e-item_" + id,
                            role: "tab",
                            "aria-selected": "false"
                        },
                        template: createElement("div", {
                            className: "e-tab-wrap",
                            innerHTML: createElement("div", {
                                className: "e-text-wrap",
                                innerHTML: inHTML + "" + _this.btnCls
                            }).outerHTML,
                            attrs: wrapAttrs
                        }).outerHTML
                    };
                    tItem.cssClass = item.cssClass + " " + disabled + " " + ("" !== css ? "e-i" + pos : "") + " " + (txtEmpty ? "" : "e-icon"), 
                    "top" !== pos && "bottom" !== pos || _this.element.classList.add("e-vertical-icon"), 
                    tItems.push(tItem);
                }
            }), tItems;
        }, Tab.prototype.removeActiveClass = function(id) {
            var hdrActEle = selectAll(":root .e-tab-header .e-toolbar-item.e-active", this.element)[0];
            if ("Bottom" === this.headerPlacement && (hdrActEle = selectAll(":root .e-tab-header .e-toolbar-item.e-active", this.element.children[1])[0]), 
            !isNullOrUndefined(hdrActEle)) {
                hdrActEle.classList.remove("e-active");
                var no = this.extIndex(hdrActEle.id);
                this.findEle(select(".e-content", this.element).children, "e-content_" + no);
            }
        }, Tab.prototype.checkPopupOverflow = function(ele) {
            this.tbPop = select(".e-toolbar-pop", this.element);
            var popIcon = select(".e-hor-nav", this.element), tbrItems = select("." + CLS_TB_ITEMS, this.element);
            return (this.enableRtl && popIcon.offsetLeft + popIcon.offsetWidth > tbrItems.offsetLeft || !this.enableRtl && popIcon.offsetLeft < tbrItems.offsetWidth) && (ele.classList.add(CLS_TB_POPUP), 
            this.tbPop.insertBefore(ele.cloneNode(!0), selectAll("." + CLS_TB_POPUP, this.tbPop)[0]), 
            ele.outerHTML = ""), !0;
        }, Tab.prototype.popupHandler = function(target) {
            var ripEle = target.querySelector(".e-ripple-element");
            isNullOrUndefined(ripEle) || (ripEle.outerHTML = "", target.querySelector(".e-tab-wrap").classList.remove("e-ripple")), 
            this.tbItem = selectAll(".e-toolbar-items ." + CLS_TB_ITEM, this.hdrEle);
            var lastChild = this.tbItem[this.tbItem.length - 1];
            if (0 !== this.tbItem.length) {
                if (target.classList.remove(CLS_TB_POPUP), this.tbItems.appendChild(target.cloneNode(!0)), 
                this.actEleId = target.id, target.outerHTML = "", this.checkPopupOverflow(lastChild)) {
                    var prevEle = this.tbItems.lastChild.previousElementSibling;
                    this.checkPopupOverflow(prevEle);
                }
                this.isPopup = !0;
            }
            return selectAll("." + CLS_TB_ITEM, this.tbItems).length - 1;
        }, Tab.prototype.setCloseButton = function(val) {
            var trg = select(".e-tab-header", this.element);
            !0 === val ? trg.classList.add("e-close-show") : trg.classList.remove("e-close-show"), 
            this.tbObj.refreshOverflow(), this.refreshActElePosition();
        }, Tab.prototype.prevCtnAnimation = function(prev, current) {
            this.enableRtl || this.element.classList.contains("e-rtl");
            return this.isPopup || prev <= current ? "SlideLeftIn" === this.animation.previous.effect ? {
                name: "SlideLeftOut",
                duration: this.animation.previous.duration,
                timingFunction: this.animation.previous.easing
            } : null : "SlideRightIn" === this.animation.next.effect ? {
                name: "SlideRightOut",
                duration: this.animation.next.duration,
                timingFunction: this.animation.next.easing
            } : null;
        }, Tab.prototype.triggerPrevAnimation = function(oldCnt, prevIndex) {
            var animateObj = this.prevCtnAnimation(prevIndex, this.selectedItem);
            isNullOrUndefined(animateObj) ? oldCnt.classList.remove("e-active") : (animateObj.begin = function() {
                setStyleAttribute(oldCnt, {
                    position: "absolute"
                }), oldCnt.classList.add("e-progress"), oldCnt.classList.add("e-view");
            }, animateObj.end = function() {
                oldCnt.style.display = "none", oldCnt.classList.remove("e-active"), oldCnt.classList.remove("e-progress"), 
                oldCnt.classList.remove("e-view"), setStyleAttribute(oldCnt, {
                    display: "",
                    position: ""
                });
            }, new Animation(animateObj).animate(oldCnt));
        }, Tab.prototype.triggerAnimation = function(id, value) {
            var oldCnt, _this = this, prevIndex = this.prevIndex;
            [].slice.call(this.element.querySelector(".e-content").children).forEach(function(item) {
                item.id === _this.prevActiveEle && (oldCnt = item);
            });
            var prevEle = this.tbItem[prevIndex], no = this.extIndex(this.tbItem[this.selectedItem].id), newCnt = this.getTrgContent(this.cntEle, no);
            if (isNullOrUndefined(oldCnt) && !isNullOrUndefined(prevEle)) {
                var idNo = this.extIndex(prevEle.id);
                oldCnt = this.getTrgContent(this.cntEle, idNo);
            }
            if (this.initRender || !1 === value || this.animation === {} || isNullOrUndefined(this.animation)) oldCnt && oldCnt !== newCnt && oldCnt.classList.remove("e-active"); else {
                var animateObj, cnt = select(".e-content", this.element);
                if (this.prevIndex > this.selectedItem && !this.isPopup) {
                    var openEff = this.animation.previous.effect;
                    animateObj = {
                        name: "None" === openEff ? "" : "SlideLeftIn" !== openEff ? openEff : "SlideLeftIn",
                        duration: this.animation.previous.duration,
                        timingFunction: this.animation.previous.easing
                    };
                } else if (this.isPopup || this.prevIndex < this.selectedItem || this.prevIndex === this.selectedItem) {
                    var clsEff = this.animation.next.effect;
                    animateObj = {
                        name: "None" === clsEff ? "" : "SlideRightIn" !== clsEff ? clsEff : "SlideRightIn",
                        duration: this.animation.next.duration,
                        timingFunction: this.animation.next.easing
                    };
                }
                animateObj.progress = function() {
                    cnt.classList.add("e-progress"), _this.setActiveBorder();
                }, animateObj.end = function() {
                    cnt.classList.remove("e-progress"), newCnt.classList.add("e-active");
                }, this.initRender || this.triggerPrevAnimation(oldCnt, prevIndex), this.prevActiveEle = newCnt.id, 
                this.isPopup = !1, "" === animateObj.name ? newCnt.classList.add("e-active") : new Animation(animateObj).animate(newCnt);
            }
        }, Tab.prototype.keyPressed = function(trg) {
            var trgParent = closest(trg, ".e-tab-header ." + CLS_TB_ITEM), trgIndex = this.getEleIndex(trgParent);
            !isNullOrUndefined(this.popEle) && trg.classList.contains("e-hor-nav") ? this.popEle.classList.contains("e-popup-open") ? this.popObj.hide(this.hide) : this.popObj.show(this.show) : trg.classList.contains("e-scroll-nav") ? trg.click() : isNullOrUndefined(trgParent) || !1 !== trgParent.classList.contains("e-active") || (this.select(trgIndex), 
            isNullOrUndefined(this.popEle) || this.popObj.hide(this.hide));
        }, Tab.prototype.getEleIndex = function(item) {
            return Array.prototype.indexOf.call(selectAll(".e-tab-header ." + CLS_TB_ITEM, this.element), item);
        }, Tab.prototype.extIndex = function(id) {
            return id.replace("e-item_", "");
        }, Tab.prototype.expTemplateContent = function() {
            var _this = this;
            this.templateEle.forEach(function(eleStr) {
                document.body.appendChild(_this.element.querySelector(eleStr)).style.display = "none";
            });
        }, Tab.prototype.templateCompile = function(ele, cnt) {
            var tempEle = createElement("div"), templateFn = compile$$1(cnt);
            !isNullOrUndefined(templateFn) && templateFn().length > 0 && ([].slice.call(templateFn()).forEach(function(el) {
                tempEle.appendChild(el);
            }), ele.appendChild(tempEle));
        }, Tab.prototype.getContent = function(ele, index, callType) {
            var eleStr, cnt = this.items[Number(index)].content;
            if ("string" == typeof cnt || isNullOrUndefined(cnt.innerHTML)) if ("." === cnt[0] || "#" === cnt[0]) if (document.querySelectorAll(cnt).length) {
                var eleVal = document.querySelector(cnt);
                eleStr = eleVal.outerHTML.trim(), "clone" === callType ? ele.appendChild(eleVal.cloneNode(!0)) : (ele.appendChild(eleVal), 
                eleVal.style.display = "");
            } else this.templateCompile(ele, cnt); else this.templateCompile(ele, cnt); else ele.innerHTML = cnt.outerHTML;
            isNullOrUndefined(eleStr) || this.templateEle.push(cnt.toString());
        }, Tab.prototype.getTrgContent = function(cntEle, no) {
            return this.element.classList.contains("e-nested") ? select(".e-nested> .e-content > #e-content_" + no, this.element) : this.findEle(cntEle.children, "e-content_" + no);
        }, Tab.prototype.findEle = function(items, key) {
            for (var ele, i = 0; i < items.length; i++) if (items[i].id === key) {
                ele = items[i];
                break;
            }
            return ele;
        }, Tab.prototype.setOrientation = function(place, ele) {
            "Bottom" === place ? this.element.appendChild(ele) : this.element.insertBefore(ele, select(".e-content", this.element));
        }, Tab.prototype.setCssClass = function(ele, cls, val) {
            if ("" !== cls) for (var list = cls.split(" "), i = 0; i < list.length; i++) val ? ele.classList.add(list[i]) : ele.classList.remove(list[i]);
        }, Tab.prototype.setContentHeight = function(val) {
            if (!isNullOrUndefined(this.cntEle)) {
                var hdrEle = select(".e-tab-header", this.element);
                if ("None" === this.heightAdjustMode) {
                    if ("auto" === this.height) return;
                    setStyleAttribute(this.cntEle, {
                        height: this.element.offsetHeight - hdrEle.offsetHeight + "px"
                    });
                } else if ("Fill" === this.heightAdjustMode) setStyleAttribute(this.element, {
                    height: "100%"
                }), setStyleAttribute(this.cntEle, {
                    height: "auto"
                }); else if ("Auto" === this.heightAdjustMode) {
                    var cnt = selectAll(".e-content > .e-item", this.element);
                    if (!0 === this.isTemplate) for (var i = 0; i < cnt.length; i++) cnt[i].setAttribute("style", "display:block; visibility: visible"), 
                    this.maxHeight = Math.max(this.maxHeight, this.getHeight(cnt[i])), cnt[i].style.removeProperty("display"), 
                    cnt[i].style.removeProperty("visibility"); else {
                        this.cntEle = select(".e-content", this.element), !0 === val && this.cntEle.appendChild(createElement("div", {
                            id: "e-content_0",
                            className: "e-item e-active",
                            attrs: {
                                role: "tabpanel",
                                "aria-labelledby": "e-item_0"
                            }
                        }));
                        var ele = this.cntEle.children.item(0);
                        for (i = 0; i < this.items.length; i++) this.getContent(ele, i, "clone"), this.maxHeight = Math.max(this.maxHeight, this.getHeight(ele)), 
                        ele.innerHTML = "";
                        this.templateEle = [], this.getContent(ele, 0, "render"), ele.classList.remove("e-active");
                    }
                    setStyleAttribute(this.cntEle, {
                        height: this.maxHeight + "px"
                    });
                } else setStyleAttribute(this.cntEle, {
                    height: "auto"
                });
            }
        }, Tab.prototype.getHeight = function(ele) {
            var cs = window.getComputedStyle(ele);
            return ele.offsetHeight + parseFloat(cs.getPropertyValue("padding-top")) + parseFloat(cs.getPropertyValue("padding-bottom")) + parseFloat(cs.getPropertyValue("margin-top")) + parseFloat(cs.getPropertyValue("margin-bottom"));
        }, Tab.prototype.setActiveBorder = function() {
            var trg = select(".e-toolbar-item.e-active", this.element);
            if ("Bottom" === this.headerPlacement && (trg = select(".e-toolbar-item.e-active", this.element.children[1])), 
            null !== trg) {
                var root = closest(trg, ".e-tab");
                if (this.element === root) {
                    var hsCnt = select(".e-tab-header .e-toolbar-items .e-hscroll-content", this.element.children[0]);
                    this.tbItems = select(".e-tab-header ." + CLS_TB_ITEMS, this.element);
                    var bar = select(".e-tab-header .e-indicator", this.element);
                    "Bottom" === this.headerPlacement && (hsCnt = select(".e-tab-header .e-toolbar-items .e-hscroll-content", this.element.children[1]));
                    var tbWidth = isNullOrUndefined(hsCnt) ? this.tbItems.offsetWidth : hsCnt.offsetWidth;
                    setStyleAttribute(bar, 0 !== tbWidth ? {
                        left: trg.offsetLeft + "px",
                        right: tbWidth - (trg.offsetLeft + trg.offsetWidth) + "px"
                    } : {
                        left: "auto",
                        right: "auto"
                    }), isNullOrUndefined(this.bdrLine) || this.bdrLine.classList.remove("e-hidden");
                }
            }
        }, Tab.prototype.setActive = function(value) {
            this.tbItem = selectAll(".e-tab-header ." + CLS_TB_ITEM, this.element);
            var trg = this.tbItem[value];
            if (value >= 0 && this.setProperties({
                selectedItem: value
            }, !0), !(value < 0 || isNaN(value) || 0 === this.tbItem.length)) if (trg.classList.contains("e-active")) this.setActiveBorder(); else {
                if (!this.isTemplate) {
                    var prev = this.tbItem[this.prevIndex];
                    isNullOrUndefined(prev) || prev.removeAttribute("aria-controls"), attributes(trg, {
                        "aria-controls": "e-content_" + value
                    });
                }
                var id = trg.id;
                this.removeActiveClass(id), trg.classList.add("e-active"), trg.setAttribute("aria-selected", "true");
                var no = Number(this.extIndex(id));
                if (attributes(this.element, {
                    "aria-activedescendant": id
                }), this.isTemplate) {
                    if (select(".e-content", this.element).children.length > 0) {
                        var trg_1 = this.findEle(select(".e-content", this.element).children, "e-content_" + no);
                        isNullOrUndefined(trg_1) || trg_1.classList.add("e-active"), this.triggerAnimation(id, this.enableAnimation);
                    }
                } else {
                    this.cntEle = select(".e-tab > .e-content", this.element);
                    var item = this.getTrgContent(this.cntEle, this.extIndex(id));
                    if (isNullOrUndefined(item)) {
                        this.cntEle.appendChild(createElement("div", {
                            id: "e-content_" + this.extIndex(id),
                            className: "e-item e-active",
                            attrs: {
                                role: "tabpanel",
                                "aria-labelledby": "e-item_" + this.extIndex(id)
                            }
                        }));
                        var eleTrg = this.getTrgContent(this.cntEle, this.extIndex(id));
                        this.getContent(eleTrg, Number(this.extIndex(id)), "render");
                    } else item.classList.add("e-active");
                    this.triggerAnimation(id, this.enableAnimation);
                }
                this.setActiveBorder();
                var curActItem = select(".e-tab-header #" + id, this.element);
                this.refreshItemVisibility(curActItem), curActItem.firstChild.focus();
                var eventArg = {
                    previousItem: this.prevItem,
                    previousIndex: this.prevIndex,
                    selectedItem: trg,
                    selectedIndex: value,
                    isSwiped: this.isSwipeed
                };
                this.trigger("selected", eventArg);
            }
        }, Tab.prototype.setItems = function(items) {
            this.isReplace = !0, this.tbItems = select(".e-tab-header ." + CLS_TB_ITEMS, this.element), 
            this.tbObj.items = this.parseObject(items, 0), this.tbObj.dataBind(), this.isReplace = !1;
        }, Tab.prototype.setRTL = function(value) {
            this.tbObj.enableRtl = value, this.tbObj.dataBind(), this.setCssClass(this.element, "e-rtl", value), 
            this.refreshActiveBorder();
        }, Tab.prototype.refreshActiveBorder = function() {
            isNullOrUndefined(this.bdrLine) || this.bdrLine.classList.add("e-hidden"), this.setActiveBorder();
        }, Tab.prototype.wireEvents = function() {
            window.addEventListener("resize", this.refreshActElePosition.bind(this)), EventHandler.add(this.element, "mouseover", this.hoverHandler, this), 
            EventHandler.add(this.element, "keydown", this.spaceKeyDown, this), isNullOrUndefined(this.cntEle) || (this.touchModule = new Touch(this.cntEle, {
                swipe: this.swipeHandler.bind(this)
            })), this.keyModule = new KeyboardEvents(this.element, {
                keyAction: this.keyHandler.bind(this),
                keyConfigs: this.keyConfigs
            }), this.tabKeyModule = new KeyboardEvents(this.element, {
                keyAction: this.keyHandler.bind(this),
                keyConfigs: {
                    openPopup: "shift+f10",
                    tab: "tab",
                    shiftTab: "shift+tab"
                },
                eventName: "keydown"
            });
        }, Tab.prototype.unWireEvents = function() {
            this.keyModule.destroy(), this.tabKeyModule.destroy(), isNullOrUndefined(this.cntEle) || this.touchModule.destroy(), 
            window.removeEventListener("resize", this.refreshActElePosition.bind(this)), this.element.removeEventListener("mouseover", this.hoverHandler.bind(this));
        }, Tab.prototype.clickHandler = function(args) {
            this.element.classList.remove("e-focused");
            var trg = args.originalEvent.target, trgParent = closest(trg, "." + CLS_TB_ITEM), trgIndex = this.getEleIndex(trgParent);
            trg.classList.contains("e-close-icon") ? this.removeTab(trgIndex) : (this.isPopup = !1, 
            isNullOrUndefined(trgParent) || trgIndex === this.selectedItem || this.select(trgIndex));
        }, Tab.prototype.swipeHandler = function(e) {
            e.velocity < 3 && isNullOrUndefined(e.originalEvent.changedTouches) || (this.isSwipeed = !0, 
            "Right" === e.swipeDirection ? this.select(this.selectedItem - 1) : "Left" === e.swipeDirection && this.selectedItem !== selectAll("." + CLS_TB_ITEM, this.element).length - 1 && this.select(this.selectedItem + 1), 
            this.isSwipeed = !1);
        }, Tab.prototype.spaceKeyDown = function(e) {
            if (32 === e.keyCode && 32 === e.which || 35 === e.keyCode && 35 === e.which) {
                isNullOrUndefined(closest(e.target, ".e-tab-header")) || e.preventDefault();
            }
        }, Tab.prototype.keyHandler = function(e) {
            if (!this.element.classList.contains("e-disable")) {
                this.element.classList.add("e-focused");
                var trg = e.target, actEle = select(".e-tab-header .e-active", this.element);
                selectAll(".e-toolbar-item:not(.e-toolbar-popup)", this.element);
                switch (this.popEle = select(".e-toolbar-pop", this.element), isNullOrUndefined(this.popEle) || (this.popObj = this.popEle.ej2_instances[0]), 
                e.action) {
                  case "space":
                  case "enter":
                    if (trg.parentElement.classList.contains("e-disable")) return;
                    if ("enter" === e.action && trg.classList.contains("e-hor-nav")) break;
                    this.keyPressed(trg);
                    break;

                  case "tab":
                  case "shiftTab":
                    trg.classList.contains("e-tab-wrap") && !1 === closest(trg, "." + CLS_TB_ITEM).classList.contains("e-active") && trg.setAttribute("tabindex", "-1"), 
                    this.popObj && isVisible(this.popObj.element) && this.popObj.hide(this.hide), actEle.children.item(0).setAttribute("tabindex", "0");
                    break;

                  case "moveLeft":
                  case "moveRight":
                    var item = closest(document.activeElement, "." + CLS_TB_ITEM);
                    isNullOrUndefined(item) || this.refreshItemVisibility(item);
                    break;

                  case "openPopup":
                    e.preventDefault(), !isNullOrUndefined(this.popEle) && this.popEle.classList.contains("e-popup-close") && this.popObj.show(this.show);
                    break;

                  case "delete":
                    var trgParent = closest(trg, "." + CLS_TB_ITEM);
                    if (!0 === this.showCloseButton && !isNullOrUndefined(trgParent)) {
                        var nxtSib = trgParent.nextSibling;
                        !isNullOrUndefined(nxtSib) && nxtSib.classList.contains(CLS_TB_ITEM) && nxtSib.firstChild.focus(), 
                        this.removeTab(this.getEleIndex(trgParent));
                    }
                    this.setActiveBorder();
                }
            }
        }, Tab.prototype.refreshActElePosition = function() {
            var activeEle = select(".e-toolbar-item.e-toolbar-popup.e-active", this.element);
            isNullOrUndefined(activeEle) || this.select(this.getEleIndex(activeEle)), this.refreshActiveBorder();
        }, Tab.prototype.refreshItemVisibility = function(target) {
            if (!isNullOrUndefined(select(".e-hscroll-content", this.tbItems))) {
                var scrBar = select(".e-hscroll-bar", this.tbItems), scrStart = scrBar.scrollLeft, scrEnd = scrStart + scrBar.offsetWidth, eleStart = target.offsetLeft, eleWidth = target.offsetWidth, eleEnd = target.offsetLeft + target.offsetWidth;
                if (scrStart < eleStart && scrEnd < eleEnd) {
                    var eleViewRange = scrEnd - eleStart;
                    scrBar.scrollLeft = scrStart + (eleWidth - eleViewRange);
                } else if (scrStart > eleStart && scrEnd > eleEnd) {
                    eleViewRange = eleEnd - scrStart;
                    scrBar.scrollLeft = scrStart - (eleWidth - eleViewRange);
                }
            }
        }, Tab.prototype.hoverHandler = function(e) {
            var trg = e.target;
            !isNullOrUndefined(trg.classList) && trg.classList.contains("e-close-icon") && trg.setAttribute("title", new L10n("tab", {
                closeButtonTitle: this.title
            }, this.locale).getConstant("closeButtonTitle"));
        }, Tab.prototype.enableTab = function(index, value) {
            var tbItems = selectAll("." + CLS_TB_ITEM, this.element)[index];
            isNullOrUndefined(tbItems) || (!0 === value ? (tbItems.classList.remove("e-disable", "e-overlay"), 
            tbItems.firstChild.setAttribute("tabindex", "-1")) : (tbItems.classList.add("e-disable", "e-overlay"), 
            tbItems.firstChild.removeAttribute("tabindex"), tbItems.classList.contains("e-active") && this.select(index + 1)), 
            tbItems.setAttribute("aria-disabled", !0 === value ? "false" : "true"));
        }, Tab.prototype.addTab = function(items, index) {
            var _this = this;
            if (this.trigger("adding", {
                addedItems: items
            }), isNullOrUndefined(index) && (index = selectAll("." + CLS_TB_ITEM).length - 1), 
            !(!0 === this.isTemplate || selectAll("." + CLS_TB_ITEM).length - 1 < index || index < 0 || isNaN(index))) {
                this.bdrLine.classList.add("e-hidden"), this.tbItems = select(".e-tab-header ." + CLS_TB_ITEMS, this.element);
                var tabItems = this.parseObject(items, index);
                items.forEach(function(item, place) {
                    if (!0 === _this.isReplace) {
                        detach(select(".e-toolbar-items #e-item_" + index, _this.element)), _this.items.splice(index + place, 0, item);
                    } else _this.items.push(item);
                }), this.tbObj.addItems(tabItems, index), this.trigger("added", {
                    addedItems: items
                }), this.selectedItem === index ? this.select(index) : this.setActiveBorder();
            }
        }, Tab.prototype.removeTab = function(index) {
            var trg = selectAll("." + CLS_TB_ITEM, this.element)[index], removingArgs = {
                removedItem: trg,
                removedIndex: index
            };
            if (this.trigger("removing", removingArgs), !isNullOrUndefined(trg)) {
                this.tbObj.removeItems(index), this.refreshActiveBorder();
                var no = this.extIndex(trg.id), cntTrg = this.findEle(select(".e-content", this.element).children, "e-content_" + no);
                isNullOrUndefined(cntTrg) || (cntTrg.outerHTML = "");
                var removedArgs = {
                    removedItem: trg,
                    removedIndex: index
                };
                this.trigger("removed", removedArgs), trg.classList.contains("e-active") && (index = index > selectAll(".e-toolbar-item:not(.e-toolbar-popup)", this.element).length - 1 ? index - 1 : index, 
                this.enableAnimation = !1, this.select(index)), 0 === selectAll("." + CLS_TB_ITEM, this.element).length && (this.hdrEle.style.display = "none"), 
                this.enableAnimation = !0;
            }
        }, Tab.prototype.hideTab = function(index, value) {
            var item = selectAll("." + CLS_TB_ITEM, this.element)[index];
            isNullOrUndefined(item) || (isNullOrUndefined(value) && (value = !0), this.bdrLine.classList.add("e-hidden"), 
            !0 === value ? (item.classList.add("e-hidden"), item.classList.contains("e-active") && this.select(0 !== index ? index - 1 : index + 1)) : item.classList.remove("e-hidden"), 
            this.setActiveBorder(), item.setAttribute("aria-hidden", "" + value));
        }, Tab.prototype.select = function(args) {
            this.tbItems = select(".e-tab-header ." + CLS_TB_ITEMS, this.element), this.tbItem = selectAll(".e-tab-header ." + CLS_TB_ITEM, this.element), 
            this.prevItem = this.tbItem[this.prevIndex], isNullOrUndefined(this.prevItem) || this.prevItem.classList.contains("e-disable") || this.prevItem.children.item(0).setAttribute("tabindex", "-1");
            var eventArg = {
                previousItem: this.prevItem,
                previousIndex: this.prevIndex,
                selectedItem: this.tbItem[this.selectedItem],
                selectedIndex: this.selectedItem,
                isSwiped: this.isSwipeed
            };
            if (this.trigger("selecting", eventArg), !eventArg.cancel) if ("number" == typeof args) {
                if (!isNullOrUndefined(this.tbItem[args]) && this.tbItem[args].classList.contains("e-disable")) for (var i = args + 1; i < this.items.length; i++) {
                    if (!1 === this.items[i].disabled) {
                        args = i;
                        break;
                    }
                    args = 0;
                }
                this.tbItem.length > args && args >= 0 && !isNaN(args) ? (this.prevIndex = this.selectedItem, 
                this.tbItem[args].classList.contains(CLS_TB_POPUP) ? this.setActive(this.popupHandler(this.tbItem[args])) : this.setActive(args)) : this.setActive(0);
            } else args instanceof HTMLElement && this.setActive(this.getEleIndex(args));
        }, Tab.prototype.disable = function(value) {
            this.setCssClass(this.element, "e-disable", value), this.element.setAttribute("aria-disabled", "" + value);
        }, Tab.prototype.getPersistData = function() {
            return this.addOnPersist([ "selectedItem", "actEleId" ]);
        }, Tab.prototype.getModuleName = function() {
            return "tab";
        }, Tab.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "width":
                    setStyleAttribute(this.element, {
                        width: formatUnit(newProp.width)
                    });
                    break;

                  case "height":
                    setStyleAttribute(this.element, {
                        height: formatUnit(newProp.height)
                    }), this.setContentHeight(!1);
                    break;

                  case "cssClass":
                    this.setCssClass(this.element, newProp.cssClass, !0);
                    break;

                  case "items":
                    if (newProp.items instanceof Array && oldProp.items instanceof Array) isNullOrUndefined(this.tbObj) ? (this.renderContainer(), 
                    isNullOrUndefined(this.cntEle) || (this.touchModule = new Touch(this.cntEle, {
                        swipe: this.swipeHandler.bind(this)
                    }))) : (this.setItems(newProp.items), select(".e-tab > .e-content", this.element).innerHTML = "", 
                    this.select(this.selectedItem)); else for (var changedProp = Object.keys(newProp.items), i = 0; i < changedProp.length; i++) {
                        var index = parseInt(Object.keys(newProp.items)[i], 10), property = Object.keys(newProp.items[index])[0], oldVal = Object(oldProp.items[index])[property], newVal = Object(newProp.items[index])[property], hdrItem = select(".e-toolbar-items #e-item_" + index, this.element), cntItem = select(".e-content #e-content_" + index, this.element);
                        if ("header" === property) {
                            var arr = [];
                            arr.push(this.items[index]), this.items.splice(index, 1), this.tbObj.items.splice(index, 1), 
                            this.isReplace = !0, this.addTab(arr, index), this.isReplace = !1;
                        }
                        "content" === property && (isNullOrUndefined(cntItem) || (cntItem.classList.contains("e-active") ? cntItem.innerHTML = newVal : cntItem.remove())), 
                        "cssClass" === property && (isNullOrUndefined(hdrItem) || (hdrItem.classList.remove(oldVal), 
                        hdrItem.classList.add(newVal)), isNullOrUndefined(cntItem) || (cntItem.classList.remove(oldVal), 
                        cntItem.classList.add(newVal))), "disabled" === property && this.enableTab(index, !0 !== newVal);
                    }
                    break;

                  case "showCloseButton":
                    this.setCloseButton(newProp.showCloseButton);
                    break;

                  case "selectedItem":
                    this.selectedItem = oldProp.selectedItem, this.select(newProp.selectedItem);
                    break;

                  case "headerPlacement":
                    var tempHdrEle = select(".e-tab-header", this.element);
                    this.setOrientation(newProp.headerPlacement, tempHdrEle), this.select(this.selectedItem);
                    break;

                  case "enableRtl":
                    this.setRTL(newProp.enableRtl);
                    break;

                  case "overflowMode":
                    this.tbObj.overflowMode = newProp.overflowMode, this.tbObj.dataBind(), this.refreshActElePosition();
                    break;

                  case "heightAdjustMode":
                    this.setContentHeight(!1), this.select(this.selectedItem);
                }
            }
        }, __decorate$32([ Collection([], TabItem) ], Tab.prototype, "items", void 0), __decorate$32([ Property("100%") ], Tab.prototype, "width", void 0), 
        __decorate$32([ Property("auto") ], Tab.prototype, "height", void 0), __decorate$32([ Property("") ], Tab.prototype, "cssClass", void 0), 
        __decorate$32([ Property(0) ], Tab.prototype, "selectedItem", void 0), __decorate$32([ Property("Top") ], Tab.prototype, "headerPlacement", void 0), 
        __decorate$32([ Property("Content") ], Tab.prototype, "heightAdjustMode", void 0), 
        __decorate$32([ Property("Scrollable") ], Tab.prototype, "overflowMode", void 0), 
        __decorate$32([ Property(!1) ], Tab.prototype, "enableRtl", void 0), __decorate$32([ Property(!1) ], Tab.prototype, "enablePersistence", void 0), 
        __decorate$32([ Property(!1) ], Tab.prototype, "showCloseButton", void 0), __decorate$32([ Complex({}, TabAnimationSettings) ], Tab.prototype, "animation", void 0), 
        __decorate$32([ Event() ], Tab.prototype, "created", void 0), __decorate$32([ Event() ], Tab.prototype, "adding", void 0), 
        __decorate$32([ Event() ], Tab.prototype, "added", void 0), __decorate$32([ Event() ], Tab.prototype, "selecting", void 0), 
        __decorate$32([ Event() ], Tab.prototype, "selected", void 0), __decorate$32([ Event() ], Tab.prototype, "removing", void 0), 
        __decorate$32([ Event() ], Tab.prototype, "removed", void 0), __decorate$32([ Event() ], Tab.prototype, "destroyed", void 0), 
        Tab = __decorate$32([ NotifyPropertyChanges ], Tab);
    }(Component), __extends$36 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$35 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, ROOT$12 = "e-treeview", COLLAPSIBLE = "e-icon-collapsible", EXPANDABLE = "e-icon-expandable", LISTITEM = "e-list-item", LISTTEXT = "e-list-text", PARENTITEM = "e-list-parent", HOVER$4 = "e-hover", ACTIVE$5 = "e-active", LOAD = "e-icons-spinner", PROCESS = "e-process", ICON$5 = "e-icons", TEXTWRAP = "e-text-content", SIBLING = "e-sibling", DROPNEXT = "e-drop-next", CHECK$3 = "e-check", CHECKBOXWRAP$1 = "e-checkbox-wrapper", FOCUS$3 = "e-node-focus", treeAriaAttr = {
        treeRole: "tree",
        itemRole: "treeitem",
        listRole: "group",
        itemText: "",
        wrapperRole: ""
    }, FieldsSettings = function(_super) {
        function FieldsSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$36(FieldsSettings, _super), __decorate$35([ Property("child") ], FieldsSettings.prototype, "child", void 0), 
        __decorate$35([ Property([]) ], FieldsSettings.prototype, "dataSource", void 0), 
        __decorate$35([ Property("expanded") ], FieldsSettings.prototype, "expanded", void 0), 
        __decorate$35([ Property("hasChildren") ], FieldsSettings.prototype, "hasChildren", void 0), 
        __decorate$35([ Property("htmlAttributes") ], FieldsSettings.prototype, "htmlAttributes", void 0), 
        __decorate$35([ Property("iconCss") ], FieldsSettings.prototype, "iconCss", void 0), 
        __decorate$35([ Property("id") ], FieldsSettings.prototype, "id", void 0), __decorate$35([ Property("imageUrl") ], FieldsSettings.prototype, "imageUrl", void 0), 
        __decorate$35([ Property("isChecked") ], FieldsSettings.prototype, "isChecked", void 0), 
        __decorate$35([ Property("parentID") ], FieldsSettings.prototype, "parentID", void 0), 
        __decorate$35([ Property(null) ], FieldsSettings.prototype, "query", void 0), __decorate$35([ Property("selected") ], FieldsSettings.prototype, "selected", void 0), 
        __decorate$35([ Property(null) ], FieldsSettings.prototype, "tableName", void 0), 
        __decorate$35([ Property("text") ], FieldsSettings.prototype, "text", void 0), __decorate$35([ Property("tooltip") ], FieldsSettings.prototype, "tooltip", void 0), 
        __decorate$35([ Property("navigateUrl") ], FieldsSettings.prototype, "navigateUrl", void 0), 
        FieldsSettings;
    }(ChildProperty), ActionSettings = function(_super) {
        function ActionSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$36(ActionSettings, _super), __decorate$35([ Property("SlideDown") ], ActionSettings.prototype, "effect", void 0), 
        __decorate$35([ Property(400) ], ActionSettings.prototype, "duration", void 0), 
        __decorate$35([ Property("linear") ], ActionSettings.prototype, "easing", void 0), 
        ActionSettings;
    }(ChildProperty), NodeAnimationSettings = function(_super) {
        function NodeAnimationSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$36(NodeAnimationSettings, _super), __decorate$35([ Complex({
            effect: "SlideUp",
            duration: 400,
            easing: "linear"
        }, ActionSettings) ], NodeAnimationSettings.prototype, "collapse", void 0), __decorate$35([ Complex({
            effect: "SlideDown",
            duration: 400,
            easing: "linear"
        }, ActionSettings) ], NodeAnimationSettings.prototype, "expand", void 0), NodeAnimationSettings;
    }(ChildProperty), TreeView = function(_super) {
        function TreeView(options, element) {
            var _this = _super.call(this, options, element) || this;
            return _this.mouseDownStatus = !1, _this;
        }
        return __extends$36(TreeView, _super), TreeView.prototype.getModuleName = function() {
            return "treeview";
        }, TreeView.prototype.preRender = function() {
            var _this = this;
            this.checkActionNodes = [], this.dragStartAction = !1, this.isAnimate = !1, this.keyConfigs = {
                escape: "escape",
                end: "end",
                enter: "enter",
                f2: "f2",
                home: "home",
                moveDown: "downarrow",
                moveLeft: "leftarrow",
                moveRight: "rightarrow",
                moveUp: "uparrow",
                ctrlDown: "ctrl+downarrow",
                ctrlUp: "ctrl+uparrow",
                ctrlEnter: "ctrl+enter",
                ctrlHome: "ctrl+home",
                ctrlEnd: "ctrl+end",
                ctrlA: "ctrl+A",
                shiftDown: "shift+downarrow",
                shiftUp: "shift+uparrow",
                shiftEnter: "shift+enter",
                shiftHome: "shift+home",
                shiftEnd: "shift+end",
                csDown: "ctrl+shift+downarrow",
                csUp: "ctrl+shift+uparrow",
                csEnter: "ctrl+shift+enter",
                csHome: "ctrl+shift+home",
                csEnd: "ctrl+shift+end",
                space: "space"
            }, this.listBaseOption = {
                expandCollapse: !0,
                fields: this.fields.properties,
                showIcon: !0,
                expandIconClass: EXPANDABLE,
                ariaAttributes: treeAriaAttr,
                expandIconPosition: "Left",
                itemCreated: function(e) {
                    _this.beforeNodeCreate(e);
                }
            }, this.listBaseOption.fields.url = this.fields.navigateUrl, this.aniObj = new Animation({}), 
            this.treeList = [], this.isLoaded = !1, this.setTouchClass(), isNullOrUndefined(this.selectedNodes) && this.setProperties({
                selectedNodes: []
            }, !0), isNullOrUndefined(this.checkedNodes) && this.setProperties({
                checkedNodes: []
            }, !0);
        }, TreeView.prototype.getPersistData = function() {
            return this.addOnPersist([ "selectedNodes", "checkedNodes" ]);
        }, TreeView.prototype.render = function() {
            this.isAnimate = !0, this.initialize(), this.setDataBinding(), this.setExpandOnType(), 
            this.setRipple(), this.wireEditingEvents(this.allowEditing), this.setDragAndDrop(this.allowDragAndDrop), 
            this.wireEvents();
        }, TreeView.prototype.initialize = function() {
            this.element.setAttribute("role", "tree"), this.element.setAttribute("tabindex", "0"), 
            this.element.setAttribute("aria-activedescendant", this.element.id + "_active"), 
            this.setCssClass(null, this.cssClass), this.setEnableRtl(), this.setFullRow(this.fullRowSelect), 
            this.nodeTemplateFn = this.templateComplier(this.nodeTemplate);
        }, TreeView.prototype.setEnableRtl = function() {
            this.enableRtl ? addClass([ this.element ], "e-rtl") : removeClass([ this.element ], "e-rtl");
        }, TreeView.prototype.setRipple = function() {
            var rippleModel = {
                selector: ".e-fullrow,.e-text-content",
                ignore: ".e-text-content > .e-icons,.e-input-group,.e-input, ." + CHECKBOXWRAP$1
            };
            this.rippleFn = rippleEffect(this.element, rippleModel);
            var iconModel = {
                selector: "." + TEXTWRAP + " > ." + ICON$5,
                isCenterRipple: !0
            };
            this.rippleIconFn = rippleEffect(this.element, iconModel);
        }, TreeView.prototype.setFullRow = function(isEnabled) {
            isEnabled ? addClass([ this.element ], "e-fullrow-wrap") : removeClass([ this.element ], "e-fullrow-wrap");
        }, TreeView.prototype.setMultiSelect = function(isEnabled) {
            var firstUl = select("." + PARENTITEM, this.element);
            isEnabled ? firstUl.setAttribute("aria-multiselectable", "true") : firstUl.removeAttribute("aria-multiselectable");
        }, TreeView.prototype.templateComplier = function(template) {
            if (template) try {
                if (document.querySelectorAll(template).length) return compile$$1(document.querySelector(template).innerHTML.trim());
            } catch (e) {
                return compile$$1(template);
            }
        }, TreeView.prototype.setDataBinding = function() {
            var _this = this;
            this.treeList.push("false"), this.fields.dataSource instanceof DataManager ? this.fields.dataSource.executeQuery(this.getQuery(this.fields)).then(function(e) {
                _this.treeList.pop(), _this.treeData = e.result, _this.isNumberTypeId = _this.getType(), 
                _this.setRootData(), _this.renderItems(!0), 0 !== _this.treeList.length || _this.isLoaded || _this.finalize();
            }) : (this.treeList.pop(), isNullOrUndefined(this.fields.dataSource) ? this.rootData = this.treeData = [] : (this.treeData = this.fields.dataSource, 
            this.setRootData()), this.renderItems(!1)), 0 !== this.treeList.length || this.isLoaded || this.finalize();
        }, TreeView.prototype.getQuery = function(mapper, value) {
            void 0 === value && (value = null);
            var query, columns = [];
            if (mapper.query) query = mapper.query.clone(); else {
                query = new Query();
                for (var prop = this.getActualProperties(mapper), _i = 0, _a = Object.keys(prop); _i < _a.length; _i++) {
                    var col = _a[_i];
                    "dataSource" !== col && "tableName" !== col && "child" !== col && mapper[col] && -1 === columns.indexOf(mapper[col]) && columns.push(mapper[col]);
                }
                query.select(columns), prop.hasOwnProperty("tableName") && query.from(mapper.tableName);
            }
            return ListBase.addSorting(this.sortOrder, mapper.text, query), isNullOrUndefined(value) || isNullOrUndefined(mapper.parentID) || query.where(mapper.parentID, "equal", this.isNumberTypeId ? parseFloat(value) : value), 
            query;
        }, TreeView.prototype.getType = function() {
            return !!this.treeData[0] && "number" == typeof getValue(this.fields.id, this.treeData[0]);
        }, TreeView.prototype.setRootData = function() {
            if (this.dataType = this.getDataType(this.treeData, this.fields), 1 === this.dataType) {
                this.groupedData = this.getGroupedData(this.treeData, this.fields.parentID);
                var rootItems = this.getChildNodes(this.treeData, void 0, !0);
                isNullOrUndefined(rootItems) ? this.rootData = [] : this.rootData = rootItems;
            } else this.rootData = this.treeData;
        }, TreeView.prototype.renderItems = function(isSorted) {
            this.listBaseOption.ariaAttributes.level = 1, this.ulElement = ListBase.createList(isSorted ? this.rootData : this.getSortedData(this.rootData), this.listBaseOption), 
            this.element.appendChild(this.ulElement), this.finalizeNode(this.element);
        }, TreeView.prototype.beforeNodeCreate = function(e) {
            if (this.showCheckBox) {
                var checkboxEle = createCheckBox(!0, {
                    cssClass: this.touchClass
                }), icon = select("div.e-icons", e.item), id = e.item.getAttribute("data-uid");
                e.item.childNodes[0].insertBefore(checkboxEle, e.item.childNodes[0].childNodes[isNullOrUndefined(icon) ? 0 : 1]);
                var checkValue = getValue(e.fields.isChecked, e.curData);
                this.checkedNodes.indexOf(id) > -1 ? (select(".e-frame", checkboxEle).classList.add(CHECK$3), 
                checkboxEle.setAttribute("aria-checked", "true"), this.addCheck(e.item)) : isNullOrUndefined(checkValue) || "true" !== checkValue.toString() ? checkboxEle.setAttribute("aria-checked", "false") : (select(".e-frame", checkboxEle).classList.add(CHECK$3), 
                checkboxEle.setAttribute("aria-checked", "true"), this.addCheck(e.item));
                var frame = select(".e-frame", checkboxEle);
                EventHandler.add(frame, "mousedown", this.frameMouseHandler, this), EventHandler.add(frame, "mouseup", this.frameMouseHandler, this);
            }
            this.fullRowSelect && this.createFullRow(e.item), this.allowMultiSelection && !e.item.classList.contains("e-selected") && e.item.setAttribute("aria-selected", "false");
            var fields = e.fields;
            if (this.addActionClass(e, fields.selected, "e-selected"), this.addActionClass(e, fields.expanded, "e-expanded"), 
            !isNullOrUndefined(this.nodeTemplateFn)) {
                var textEle = e.item.querySelector("." + LISTTEXT);
                textEle.innerHTML = "", append(this.nodeTemplateFn(e.curData), textEle);
            }
            var eventArgs = {
                node: e.item,
                nodeData: e.curData,
                text: e.text
            };
            this.trigger("drawNode", eventArgs);
        }, TreeView.prototype.frameMouseHandler = function(e) {
            rippleMouseHandler(e, select(".e-ripple-container", e.target.parentElement));
        }, TreeView.prototype.addActionClass = function(e, action, cssClass$$1) {
            var actionValue = getValue(action, e.curData);
            isNullOrUndefined(actionValue) || "false" === actionValue.toString() || e.item.classList.add(cssClass$$1);
        }, TreeView.prototype.getDataType = function(ds, mapper) {
            if (this.fields.dataSource instanceof DataManager) return 2;
            for (var i = 0, len = ds.length; i < len; i++) {
                if ("string" == typeof mapper.child && !isNullOrUndefined(getValue(mapper.child, ds[i]))) return 2;
                if (!isNullOrUndefined(getValue(mapper.parentID, ds[i])) || !isNullOrUndefined(getValue(mapper.hasChildren, ds[i]))) return 1;
            }
            return 1;
        }, TreeView.prototype.getGroupedData = function(dataSource, groupBy) {
            for (var cusQuery = new Query().group(groupBy), ds = ListBase.getDataSource(dataSource, cusQuery), grpItem = [], j = 0; j < ds.length; j++) {
                var itemObj = ds[j].items;
                grpItem.push(itemObj);
            }
            return grpItem;
        }, TreeView.prototype.getSortedData = function(list) {
            return list && "None" !== this.sortOrder && (list = ListBase.getDataSource(list, ListBase.addSorting(this.sortOrder, this.fields.text))), 
            list;
        }, TreeView.prototype.finalizeNode = function(element) {
            for (var iNodes = selectAll(".e-list-img", element), k = 0; k < iNodes.length; k++) iNodes[k].setAttribute("alt", "e-list-img");
            if (this.isLoaded) {
                for (var sNodes = selectAll(".e-selected", element), i = 0; i < sNodes.length; i++) {
                    this.selectNode(sNodes[i], null);
                    break;
                }
                removeClass(sNodes, "e-selected");
            }
            for (var cNodes = selectAll(".e-list-item:not(.e-expanded)", element), j = 0; j < cNodes.length; j++) {
                var icon = select("div.e-icons", cNodes[j]);
                icon && icon.classList.contains(EXPANDABLE) && (cNodes[j].setAttribute("aria-expanded", "false"), 
                addClass([ cNodes[j] ], "e-node-collapsed"));
            }
            var eNodes = selectAll(".e-expanded", element);
            for (i = 0; i < eNodes.length; i++) this.renderChildNodes(eNodes[i]);
            removeClass(eNodes, "e-expanded"), this.updateList(), this.isLoaded && this.updateCheckedProp();
        }, TreeView.prototype.updateCheckedProp = function() {
            var _this = this;
            if (this.showCheckBox) {
                var nodes_1 = [].concat([], this.checkedNodes);
                this.checkedNodes.forEach(function(value, index) {
                    isNullOrUndefined(_this.element.querySelector('[data-uid="' + value + '"]')) && (nodes_1 = nodes_1.filter(function(e) {
                        return e !== value;
                    }));
                }), this.setProperties({
                    checkedNodes: nodes_1
                }, !0);
            }
        }, TreeView.prototype.ensureParentCheckState = function(element) {
            if (!isNullOrUndefined(element)) {
                if (element.classList.contains(ROOT$12)) return;
                var ulElement = element;
                element.classList.contains(LISTITEM) && (ulElement = select("." + PARENTITEM, element));
                var checkedNodes = selectAll(".e-check", ulElement), nodes = selectAll("." + LISTITEM, ulElement), checkBoxEle = element.getElementsByClassName(CHECKBOXWRAP$1)[0];
                nodes.length === checkedNodes.length ? this.changeState(checkBoxEle, "check", null, !0, !0) : checkedNodes.length > 0 ? this.changeState(checkBoxEle, "indeterminate", null, !0, !0) : 0 === checkedNodes.length && this.changeState(checkBoxEle, "uncheck", null, !0, !0);
                var parentUL = closest(element, "." + PARENTITEM);
                if (!isNullOrUndefined(parentUL)) {
                    var currentParent = closest(parentUL, "." + LISTITEM);
                    this.ensureParentCheckState(currentParent);
                }
            }
        }, TreeView.prototype.ensureChildCheckState = function(element, e) {
            if (!isNullOrUndefined(element)) {
                var childElement = select("." + PARENTITEM, element), checkBoxes = void 0;
                if (!isNullOrUndefined(childElement)) {
                    checkBoxes = selectAll("." + CHECKBOXWRAP$1, childElement);
                    for (var isChecked = element.getElementsByClassName("e-frame")[0].classList.contains(CHECK$3), checkedState = void 0, index = 0; index < checkBoxes.length; index++) {
                        if (isNullOrUndefined(this.currentLoadData) || isNullOrUndefined(getValue(this.fields.isChecked, this.currentLoadData[index]))) {
                            var isNodeChecked = checkBoxes[index].getElementsByClassName("e-frame")[0].classList.contains(CHECK$3);
                            checkedState = !this.isLoaded && isNodeChecked ? "check" : isChecked ? "check" : "uncheck";
                        } else checkedState = getValue(this.fields.isChecked, this.currentLoadData[index]) ? "check" : "uncheck";
                        this.changeState(checkBoxes[index], checkedState, e, !0, !0);
                    }
                }
            }
        }, TreeView.prototype.doCheckBoxAction = function(nodes, doCheck) {
            if (isNullOrUndefined(nodes)) for (var checkBoxes = selectAll("." + CHECKBOXWRAP$1, this.element), index = 0; index < checkBoxes.length; index++) this.changeState(checkBoxes[index], doCheck ? "check" : "uncheck"); else for (var i = 0, len = nodes.length; i < len; i++) {
                var liEle = this.getElement(nodes[i]);
                if (!isNullOrUndefined(liEle)) {
                    var checkBox = select(".e-list-parent ." + CHECKBOXWRAP$1, liEle);
                    this.validateCheckNode(checkBox, !doCheck, liEle, null);
                }
            }
        }, TreeView.prototype.changeState = function(wrapper, state, e, isPrevent, isAdd) {
            var ariaState, eventArgs, currLi = closest(wrapper, "." + LISTITEM);
            if (isPrevent || (this.checkActionNodes = [], eventArgs = this.getCheckEvent(currLi, state, e), 
            this.trigger("nodeChecking", eventArgs), !eventArgs.cancel)) {
                var frameSpan = wrapper.getElementsByClassName("e-frame")[0];
                if ("check" !== state || frameSpan.classList.contains(CHECK$3) ? "uncheck" === state && (frameSpan.classList.contains(CHECK$3) || frameSpan.classList.contains("e-stop")) ? (removeClass([ frameSpan ], [ CHECK$3, "e-stop" ]), 
                this.removeCheck(currLi), ariaState = "false") : "indeterminate" !== state || frameSpan.classList.contains("e-stop") || (frameSpan.classList.remove(CHECK$3), 
                frameSpan.classList.add("e-stop"), this.removeCheck(currLi), ariaState = "mixed") : (frameSpan.classList.remove("e-stop"), 
                frameSpan.classList.add(CHECK$3), this.addCheck(currLi), ariaState = "true"), ariaState = "check" === state ? "true" : "uncheck" === state ? "false" : ariaState, 
                isNullOrUndefined(ariaState) || wrapper.setAttribute("aria-checked", ariaState), 
                isAdd) {
                    var data = [].concat([], this.checkActionNodes);
                    eventArgs = this.getCheckEvent(currLi, state, e), isUndefined(isPrevent) && (eventArgs.data = data);
                }
                isPrevent || isNullOrUndefined(ariaState) || (wrapper.setAttribute("aria-checked", ariaState), 
                eventArgs.data[0].checked = ariaState, this.trigger("nodeChecked", eventArgs), this.checkActionNodes = []);
            }
        }, TreeView.prototype.addCheck = function(liEle) {
            var id = liEle.getAttribute("data-uid");
            isNullOrUndefined(id) || -1 !== this.checkedNodes.indexOf(id) || this.checkedNodes.push(id);
        }, TreeView.prototype.removeCheck = function(liEle) {
            var index = this.checkedNodes.indexOf(liEle.getAttribute("data-uid"));
            index > -1 && this.checkedNodes.splice(index, 1);
        }, TreeView.prototype.getCheckEvent = function(currLi, action, e) {
            this.checkActionNodes.push(this.getNodeData(currLi));
            var nodeData = this.checkActionNodes;
            return {
                action: action,
                cancel: !1,
                isInteracted: !isNullOrUndefined(e),
                node: currLi,
                data: nodeData
            };
        }, TreeView.prototype.finalize = function() {
            select("." + PARENTITEM, this.element).setAttribute("role", treeAriaAttr.treeRole), 
            this.setMultiSelect(this.allowMultiSelection);
            var firstNode = select("." + LISTITEM, this.element);
            firstNode && (addClass([ firstNode ], FOCUS$3), this.updateIdAttr(null, firstNode)), 
            this.doSelectionAction(), this.updateCheckedProp(), this.isLoaded = !0, this.isAnimate = !1;
            var eventArgs = {
                data: this.treeData
            };
            this.trigger("dataBound", eventArgs);
        }, TreeView.prototype.doSelectionAction = function() {
            var sNodes = selectAll(".e-selected", this.element), sUids = this.selectedNodes;
            if (sUids.length > 0) {
                this.setProperties({
                    selectedNodes: []
                }, !0);
                for (var i = 0; i < sUids.length; i++) {
                    var sNode = select('[data-uid="' + sUids[i] + '"]', this.element);
                    if (this.selectNode(sNode, null, !0), !this.allowMultiSelection) break;
                }
            } else this.selectGivenNodes(sNodes);
            removeClass(sNodes, "e-selected");
        }, TreeView.prototype.selectGivenNodes = function(sNodes) {
            for (var i = 0; i < sNodes.length && (this.selectNode(sNodes[i], null, !0), this.allowMultiSelection); i++) ;
        }, TreeView.prototype.clickHandler = function(e) {
            var target = e.target;
            if (EventHandler.remove(this.element, "contextmenu", this.preventContextMenu), target && !this.dragStartAction) {
                var classList$$1 = target.classList, li = closest(target, "." + LISTITEM);
                if (li) {
                    if (this.removeHover(), this.setFocusElement(li), this.showCheckBox && !li.classList.contains("e-disable")) {
                        var checkWrapper = closest(target, "." + CHECKBOXWRAP$1);
                        if (!isNullOrUndefined(checkWrapper)) {
                            var checkElement = select(".e-frame", checkWrapper);
                            return this.validateCheckNode(checkWrapper, checkElement.classList.contains(CHECK$3), li, e), 
                            void this.triggerClickEvent(e, li);
                        }
                    }
                    classList$$1.contains(EXPANDABLE) ? this.expandAction(li, target, e) : classList$$1.contains(COLLAPSIBLE) ? this.collapseNode(li, target, e) : classList$$1.contains(PARENTITEM) || classList$$1.contains(LISTITEM) || this.toggleSelect(li, e, !1), 
                    this.triggerClickEvent(e, li);
                }
            }
        }, TreeView.prototype.nodeCheckingEvent = function(wrapper, isCheck, e) {
            var currLi = closest(wrapper, "." + LISTITEM);
            this.checkActionNodes = [];
            var ariaState = isCheck ? "false" : "true";
            isNullOrUndefined(ariaState) || wrapper.setAttribute("aria-checked", ariaState);
            var eventArgs = this.getCheckEvent(currLi, isCheck ? "check" : "uncheck", e);
            return this.trigger("nodeChecking", eventArgs), eventArgs;
        }, TreeView.prototype.nodeCheckedEvent = function(wrapper, isCheck, e) {
            closest(wrapper, "." + LISTITEM);
            var eventArgs = this.getCheckEvent(wrapper, isCheck ? "uncheck" : "check", e);
            eventArgs.data = eventArgs.data.splice(0, eventArgs.data.length - 1), this.trigger("nodeChecked", eventArgs);
        }, TreeView.prototype.triggerClickEvent = function(e, li) {
            var eventArgs = {
                event: e,
                node: li
            };
            this.trigger("nodeClicked", eventArgs);
        }, TreeView.prototype.expandNode = function(currLi, icon) {
            var _this = this;
            icon.classList.contains(LOAD) && this.hideSpinner(icon), removeClass([ icon ], EXPANDABLE), 
            addClass([ icon ], COLLAPSIBLE);
            var start = 0, end = 0, proxy = this, ul = select("." + PARENTITEM, currLi), liEle = currLi;
            this.setHeight(liEle, ul), this.isAnimate ? this.expandedNode(liEle, ul, icon) : this.aniObj.animate(ul, {
                name: this.animation.expand.effect,
                duration: this.animation.expand.duration,
                timingFunction: this.animation.expand.easing,
                begin: function(args) {
                    liEle.style.overflow = "hidden", start = liEle.offsetHeight, end = select("." + TEXTWRAP, currLi).offsetHeight;
                },
                progress: function(args) {
                    args.element.style.display = "block", proxy.animateHeight(args, start, end);
                },
                end: function(args) {
                    args.element.style.display = "block", _this.expandedNode(liEle, ul, icon);
                }
            });
        }, TreeView.prototype.expandedNode = function(currLi, ul, icon) {
            ul.style.display = "block", currLi.style.display = "block", currLi.style.overflow = "", 
            currLi.style.height = "", removeClass([ icon ], PROCESS), currLi.setAttribute("aria-expanded", "true"), 
            removeClass([ currLi ], "e-node-collapsed"), this.isLoaded && this.expandArgs && this.trigger("nodeExpanded", this.expandArgs);
        }, TreeView.prototype.collapseNode = function(currLi, icon, e) {
            var _this = this;
            if (!icon.classList.contains(PROCESS)) {
                addClass([ icon ], PROCESS);
                var colArgs;
                if (!this.isLoaded || (colArgs = this.getExpandEvent(currLi, e), this.trigger("nodeCollapsing", colArgs), 
                !colArgs.cancel)) {
                    removeClass([ icon ], COLLAPSIBLE), addClass([ icon ], EXPANDABLE);
                    var start = 0, end = 0, proxy = this, ul = select("." + PARENTITEM, currLi), liEle = currLi;
                    addClass([ currLi ], "e-node-collapsed"), this.aniObj.animate(ul, {
                        name: this.animation.collapse.effect,
                        duration: this.animation.collapse.duration,
                        timingFunction: this.animation.collapse.easing,
                        begin: function(args) {
                            liEle.style.overflow = "hidden", start = select("." + TEXTWRAP, currLi).offsetHeight, 
                            end = liEle.offsetHeight;
                        },
                        progress: function(args) {
                            proxy.animateHeight(args, start, end);
                        },
                        end: function(args) {
                            liEle.style.overflow = "", args.element.style.display = "none", liEle.style.height = "", 
                            removeClass([ icon ], PROCESS), currLi.setAttribute("aria-expanded", "false"), _this.isLoaded && _this.trigger("nodeCollapsed", colArgs);
                        }
                    });
                }
            }
        }, TreeView.prototype.setHeight = function(currLi, ul) {
            ul.style.display = "block", ul.style.visibility = "hidden", currLi.style.height = currLi.offsetHeight + "px", 
            ul.style.display = "none", ul.style.visibility = "";
        }, TreeView.prototype.animateHeight = function(args, start, end) {
            var currentHeight = (end - start) * ((args.duration - args.timeStamp) / args.duration) + start;
            args.element.parentElement.style.height = currentHeight + "px";
        }, TreeView.prototype.renderChildNodes = function(parentLi, expandChild) {
            var _this = this, eicon = select("div.e-icons", parentLi);
            if (!isNullOrUndefined(eicon)) {
                this.showSpinner(eicon);
                var childItems;
                if (this.fields.dataSource instanceof DataManager) {
                    var level = this.parents(parentLi, "." + PARENTITEM).length, mapper_1 = this.getChildFields(this.fields, level, 1);
                    if (isNullOrUndefined(mapper_1) || isNullOrUndefined(mapper_1.dataSource)) return detach(eicon), 
                    void parentLi.removeAttribute("aria-expanded");
                    this.treeList.push("false"), mapper_1.dataSource.executeQuery(this.getQuery(mapper_1, parentLi.getAttribute("data-uid"))).then(function(e) {
                        if (_this.treeList.pop(), childItems = e.result, _this.currentLoadData = childItems, 
                        isNullOrUndefined(childItems) || 0 === childItems.length) detach(eicon), parentLi.removeAttribute("aria-expanded"); else {
                            var prop = _this.getActualProperties(mapper_1);
                            _this.listBaseOption.fields = prop, _this.listBaseOption.fields.url = prop.navigateUrl;
                            var id = parentLi.getAttribute("data-uid"), nodeData = _this.getNodeObject(id);
                            setValue("child", childItems, nodeData), _this.listBaseOption.ariaAttributes.level = parseFloat(parentLi.getAttribute("aria-level")) + 1, 
                            parentLi.appendChild(ListBase.createList(childItems, _this.listBaseOption)), _this.expandNode(parentLi, eicon), 
                            _this.ensureCheckNode(parentLi), _this.finalizeNode(parentLi), _this.renderSubChild(parentLi, expandChild);
                        }
                        0 !== _this.treeList.length || _this.isLoaded || _this.finalize();
                    });
                } else {
                    if (childItems = this.getChildNodes(this.treeData, parentLi.getAttribute("data-uid")), 
                    this.currentLoadData = childItems, isNullOrUndefined(childItems) || 0 === childItems.length) return detach(eicon), 
                    void parentLi.removeAttribute("aria-expanded");
                    this.listBaseOption.ariaAttributes.level = parseFloat(parentLi.getAttribute("aria-level")) + 1, 
                    parentLi.appendChild(ListBase.createList(this.getSortedData(childItems), this.listBaseOption)), 
                    this.expandNode(parentLi, eicon), this.ensureCheckNode(parentLi), this.finalizeNode(parentLi), 
                    this.renderSubChild(parentLi, expandChild);
                }
            }
        }, TreeView.prototype.ensureCheckNode = function(element) {
            this.showCheckBox && (this.ensureChildCheckState(element), this.ensureParentCheckState(element)), 
            this.currentLoadData = null;
        }, TreeView.prototype.getFields = function(mapper, nodeLevel, dataLevel) {
            return nodeLevel === dataLevel ? mapper : this.getFields(this.getChildMapper(mapper), nodeLevel, dataLevel + 1);
        }, TreeView.prototype.getChildFields = function(mapper, nodeLevel, dataLevel) {
            return nodeLevel === dataLevel ? this.getChildMapper(mapper) : this.getChildFields(this.getChildMapper(mapper), nodeLevel, dataLevel + 1);
        }, TreeView.prototype.getChildMapper = function(mapper) {
            return "string" == typeof mapper.child || isNullOrUndefined(mapper.child) ? mapper : mapper.child;
        }, TreeView.prototype.getChildNodes = function(obj, parentId, isRoot) {
            void 0 === isRoot && (isRoot = !1);
            var childNodes;
            if (isNullOrUndefined(obj)) return childNodes;
            if (1 === this.dataType) return this.getChildGroup(this.groupedData, parentId, isRoot);
            if ("string" == typeof this.fields.child) for (var i = 0, objlen = obj.length; i < objlen; i++) {
                var dataId = getValue(this.fields.id, obj[i]);
                if (dataId && dataId.toString() === parentId) return getValue(this.fields.child, obj[i]);
                if (!isNullOrUndefined(getValue(this.fields.child, obj[i])) && void 0 !== (childNodes = this.getChildNodes(getValue(this.fields.child, obj[i]), parentId))) break;
            }
            return childNodes;
        }, TreeView.prototype.getChildGroup = function(data, parentId, isRoot) {
            if (!isNullOrUndefined(data)) for (var i = 0, objlen = data.length; i < objlen; i++) {
                if (isNullOrUndefined(data[i][0]) || isNullOrUndefined(getValue(this.fields.parentID, data[i][0]))) return isRoot ? data[i] : [];
                if (getValue(this.fields.parentID, data[i][0]).toString() === parentId) return data[i];
            }
        }, TreeView.prototype.renderSubChild = function(element, expandChild) {
            if (expandChild) for (var cIcons = selectAll("." + EXPANDABLE, element), i = 0, len = cIcons.length; i < len; i++) {
                var curLi = closest(cIcons[i], "." + LISTITEM);
                this.renderChildNodes(curLi, expandChild);
            }
        }, TreeView.prototype.toggleSelect = function(li, e, multiSelect) {
            li.classList.contains("e-disable") || (this.allowMultiSelection && (e && e.ctrlKey || multiSelect) && this.isActive(li) ? this.unselectNode(li, e) : this.selectNode(li, e, multiSelect));
        }, TreeView.prototype.isActive = function(li) {
            return !!li.classList.contains(ACTIVE$5);
        }, TreeView.prototype.selectNode = function(li, e, multiSelect) {
            if (isNullOrUndefined(li) || !this.allowMultiSelection && this.isActive(li) && !isNullOrUndefined(e)) this.setFocusElement(li); else {
                var eventArgs;
                if (!this.isLoaded || (eventArgs = this.getSelectEvent(li, "select", e), this.trigger("nodeSelecting", eventArgs), 
                !eventArgs.cancel)) {
                    if (this.allowMultiSelection && (multiSelect || e && (!e || e.ctrlKey)) || this.removeSelectAll(), 
                    this.allowMultiSelection && e && e.shiftKey) {
                        this.startNode || (this.startNode = li);
                        var startIndex = this.liList.indexOf(this.startNode), endIndex = this.liList.indexOf(li);
                        if (startIndex > endIndex) {
                            var temp = startIndex;
                            startIndex = endIndex, endIndex = temp;
                        }
                        for (var i = startIndex; i <= endIndex; i++) {
                            var currNode = this.liList[i];
                            isVisible(currNode) && this.addSelect(currNode);
                        }
                    } else this.startNode = li, this.addSelect(li);
                    this.setFocusElement(li), this.isLoaded && this.trigger("nodeSelected", eventArgs);
                }
            }
        }, TreeView.prototype.unselectNode = function(li, e) {
            var eventArgs;
            this.isLoaded && (eventArgs = this.getSelectEvent(li, "un-select", e), this.trigger("nodeSelecting", eventArgs), 
            eventArgs.cancel) || (this.removeSelect(li), this.setFocusElement(li), this.isLoaded && this.trigger("nodeSelected", eventArgs));
        }, TreeView.prototype.setFocusElement = function(li) {
            if (!isNullOrUndefined(li)) {
                var focusedNode = this.getFocusedNode();
                focusedNode && removeClass([ focusedNode ], FOCUS$3), addClass([ li ], FOCUS$3), 
                this.updateIdAttr(focusedNode, li);
            }
        }, TreeView.prototype.addSelect = function(liEle) {
            liEle.setAttribute("aria-selected", "true"), addClass([ liEle ], ACTIVE$5);
            var id = liEle.getAttribute("data-uid");
            isNullOrUndefined(id) || -1 !== this.selectedNodes.indexOf(id) || this.selectedNodes.push(id);
        }, TreeView.prototype.removeSelect = function(liEle) {
            this.allowMultiSelection ? liEle.setAttribute("aria-selected", "false") : liEle.removeAttribute("aria-selected"), 
            removeClass([ liEle ], ACTIVE$5);
            var index = this.selectedNodes.indexOf(liEle.getAttribute("data-uid"));
            index > -1 && this.selectedNodes.splice(index, 1);
        }, TreeView.prototype.removeSelectAll = function() {
            for (var selectedLI = this.element.querySelectorAll(".e-active"), _i = 0, selectedLI_1 = selectedLI; _i < selectedLI_1.length; _i++) {
                var ele = selectedLI_1[_i];
                this.allowMultiSelection ? ele.setAttribute("aria-selected", "false") : ele.removeAttribute("aria-selected");
            }
            removeClass(selectedLI, ACTIVE$5), this.setProperties({
                selectedNodes: []
            }, !0);
        }, TreeView.prototype.getSelectEvent = function(currLi, action, e) {
            var nodeData = this.getNodeData(currLi);
            return {
                action: action,
                cancel: !1,
                isInteracted: !isNullOrUndefined(e),
                node: currLi,
                nodeData: nodeData
            };
        }, TreeView.prototype.setExpandOnType = function() {
            this.expandOnType = "Auto" === this.expandOn ? Browser.isDevice ? "Click" : "DblClick" : this.expandOn;
        }, TreeView.prototype.expandHandler = function(e) {
            var target = e.target;
            !target || target.classList.contains("e-input") || target.classList.contains(ROOT$12) || target.classList.contains(PARENTITEM) || target.classList.contains(LISTITEM) || target.classList.contains(ICON$5) || this.showCheckBox && closest(target, "." + CHECKBOXWRAP$1) || this.expandCollapseAction(closest(target, "." + LISTITEM), e);
        }, TreeView.prototype.expandCollapseAction = function(currLi, e) {
            var icon = select("div.e-icons", currLi);
            if (icon && !icon.classList.contains(PROCESS)) {
                icon.classList.contains(EXPANDABLE) ? this.expandAction(currLi, icon, e) : this.collapseNode(currLi, icon, e);
            }
        }, TreeView.prototype.expandAction = function(currLi, icon, e, expandChild) {
            if (!icon.classList.contains(PROCESS) && (addClass([ icon ], PROCESS), !this.isLoaded || (this.expandArgs = this.getExpandEvent(currLi, e), 
            this.trigger("nodeExpanding", this.expandArgs), !this.expandArgs.cancel))) {
                var ul = select("." + PARENTITEM, currLi);
                ul && "UL" === ul.nodeName ? this.expandNode(currLi, icon) : this.renderChildNodes(currLi, expandChild);
            }
        }, TreeView.prototype.keyActionHandler = function(e) {
            var target = e.target, focusedNode = this.getFocusedNode();
            if (target && target.classList.contains("e-input")) {
                var inpEle = target;
                "enter" === e.action ? (inpEle.blur(), this.element.focus(), addClass([ focusedNode ], HOVER$4)) : "escape" === e.action && (inpEle.value = this.oldText, 
                inpEle.blur(), this.element.focus(), addClass([ focusedNode ], HOVER$4));
            } else {
                e.preventDefault();
                var eventArgs = {
                    cancel: !1,
                    event: e,
                    node: focusedNode
                };
                if (this.trigger("keyPress", eventArgs), !eventArgs.cancel) switch (e.action) {
                  case "space":
                    this.showCheckBox && this.checkNode(e);
                    break;

                  case "moveRight":
                    this.openNode(!this.enableRtl, e);
                    break;

                  case "moveLeft":
                    this.openNode(!!this.enableRtl, e);
                    break;

                  case "shiftDown":
                    this.shiftKeySelect(!0, e);
                    break;

                  case "moveDown":
                  case "ctrlDown":
                  case "csDown":
                    this.navigateNode(!0);
                    break;

                  case "shiftUp":
                    this.shiftKeySelect(!1, e);
                    break;

                  case "moveUp":
                  case "ctrlUp":
                  case "csUp":
                    this.navigateNode(!1);
                    break;

                  case "home":
                  case "shiftHome":
                  case "ctrlHome":
                  case "csHome":
                    this.navigateRootNode(!0);
                    break;

                  case "end":
                  case "shiftEnd":
                  case "ctrlEnd":
                  case "csEnd":
                    this.navigateRootNode(!1);
                    break;

                  case "enter":
                  case "ctrlEnter":
                  case "shiftEnter":
                  case "csEnter":
                    this.toggleSelect(focusedNode, e);
                    break;

                  case "f2":
                    this.allowEditing && this.createTextbox(focusedNode, e);
                    break;

                  case "ctrlA":
                    if (this.allowMultiSelection) {
                        var sNodes = selectAll(".e-list-item:not(.e-active)", this.element);
                        this.selectGivenNodes(sNodes);
                    }
                }
            }
        }, TreeView.prototype.navigateToFocus = function(isUp) {
            var focusNode = this.getFocusedNode().querySelector("." + TEXTWRAP), pos = focusNode.getBoundingClientRect(), parent = this.getScrollParent(this.element);
            if (!isNullOrUndefined(parent)) {
                var parentPos = parent.getBoundingClientRect();
                pos.bottom > parentPos.bottom ? parent.scrollTop += pos.bottom - parentPos.bottom : pos.top < parentPos.top && (parent.scrollTop -= parentPos.top - pos.top);
            }
            this.isVisibleInViewport(focusNode) || focusNode.scrollIntoView(isUp);
        }, TreeView.prototype.isVisibleInViewport = function(txtWrap) {
            var pos = txtWrap.getBoundingClientRect();
            return pos.top >= 0 && pos.left >= 0 && pos.bottom <= (window.innerHeight || document.documentElement.clientHeight) && pos.right <= (window.innerWidth || document.documentElement.clientWidth);
        }, TreeView.prototype.getScrollParent = function(node) {
            return isNullOrUndefined(node) ? null : node.scrollHeight > node.clientHeight ? node : this.getScrollParent(node.parentElement);
        }, TreeView.prototype.shiftKeySelect = function(isTowards, e) {
            if (this.allowMultiSelection) {
                var focusedNode = this.getFocusedNode(), nextNode = isTowards ? this.getNextNode(focusedNode) : this.getPrevNode(focusedNode);
                this.removeHover(), this.setFocusElement(nextNode), this.toggleSelect(nextNode, e, !1), 
                this.navigateToFocus(!isTowards);
            } else this.navigateNode(isTowards);
        }, TreeView.prototype.checkNode = function(e) {
            var focusedNode = this.getFocusedNode(), checkWrap = select("." + CHECKBOXWRAP$1, focusedNode), isChecked = select(" .e-frame", checkWrap).classList.contains(CHECK$3);
            this.validateCheckNode(checkWrap, isChecked, focusedNode, e);
        }, TreeView.prototype.validateCheckNode = function(checkWrap, isCheck, li, e) {
            this.nodeCheckingEvent(checkWrap, isCheck, e).cancel || (this.changeState(checkWrap, isCheck ? "uncheck" : "check", e, !0), 
            this.ensureChildCheckState(li), this.ensureParentCheckState(closest(closest(li, "." + PARENTITEM), "." + LISTITEM)), 
            this.nodeCheckedEvent(checkWrap, isCheck, e));
        }, TreeView.prototype.openNode = function(toBeOpened, e) {
            var focusedNode = this.getFocusedNode(), icon = select("div.e-icons", focusedNode);
            if (toBeOpened) {
                if (!icon) return;
                icon.classList.contains(EXPANDABLE) ? this.expandAction(focusedNode, icon, e) : this.focusNextNode(focusedNode, !0);
            } else if (icon && icon.classList.contains(COLLAPSIBLE)) this.collapseNode(focusedNode, icon, e); else {
                var parentLi = closest(closest(focusedNode, "." + PARENTITEM), "." + LISTITEM);
                if (!parentLi) return;
                this.setFocus(focusedNode, parentLi), this.navigateToFocus(!0);
            }
        }, TreeView.prototype.navigateNode = function(isTowards) {
            var focusedNode = this.getFocusedNode();
            this.focusNextNode(focusedNode, isTowards);
        }, TreeView.prototype.navigateRootNode = function(isBackwards) {
            var focusedNode = this.getFocusedNode(), rootNode = isBackwards ? this.getRootNode() : this.getEndNode();
            this.setFocus(focusedNode, rootNode), this.navigateToFocus(isBackwards);
        }, TreeView.prototype.getFocusedNode = function() {
            var fNode = select(".e-list-item." + FOCUS$3, this.element);
            return isNullOrUndefined(fNode) ? select("." + LISTITEM, this.element) : fNode;
        }, TreeView.prototype.focusNextNode = function(li, isTowards) {
            var nextNode = isTowards ? this.getNextNode(li) : this.getPrevNode(li);
            this.setFocus(li, nextNode), this.navigateToFocus(!isTowards), nextNode.classList.contains("e-disable") && this.focusNextNode(nextNode, isTowards);
        }, TreeView.prototype.getNextNode = function(li) {
            var nextNode, i, index = this.liList.indexOf(li);
            do {
                if (++index === this.liList.length && li.classList.contains("e-disable")) for (i = index - 1; i > 0; i--) if (!this.liList[i].classList.contains("e-disable")) {
                    index = i;
                    break;
                }
                if (nextNode = this.liList[index], isNullOrUndefined(nextNode)) return li;
            } while (!isVisible(nextNode));
            return nextNode;
        }, TreeView.prototype.getPrevNode = function(li) {
            var prevNode, i, index = this.liList.indexOf(li);
            do {
                if (--index < 0 && li.classList.contains("e-disable")) for (i = 1; i < this.liList.length; i++) if (!this.liList[i].classList.contains("e-disable")) {
                    index = i;
                    break;
                }
                if (prevNode = this.liList[index], isNullOrUndefined(prevNode)) return li;
            } while (!isVisible(prevNode));
            return prevNode;
        }, TreeView.prototype.getRootNode = function() {
            var rootNode, index = 0;
            do {
                rootNode = this.liList[index], index++;
            } while (!isVisible(rootNode));
            return rootNode;
        }, TreeView.prototype.getEndNode = function() {
            var endNode, index = this.liList.length - 1;
            do {
                endNode = this.liList[index], index--;
            } while (!isVisible(endNode));
            return endNode;
        }, TreeView.prototype.setFocus = function(preNode, nextNode) {
            removeClass([ preNode ], [ HOVER$4, FOCUS$3 ]), addClass([ nextNode ], [ HOVER$4, FOCUS$3 ]), 
            this.updateIdAttr(preNode, nextNode);
        }, TreeView.prototype.updateIdAttr = function(preNode, nextNode) {
            this.element.removeAttribute("aria-activedescendant"), preNode && preNode.removeAttribute("id"), 
            nextNode.setAttribute("id", this.element.id + "_active"), this.element.setAttribute("aria-activedescendant", this.element.id + "_active");
        }, TreeView.prototype.focusIn = function() {
            this.mouseDownStatus || addClass([ this.getFocusedNode() ], HOVER$4), this.mouseDownStatus = !1;
        }, TreeView.prototype.focusOut = function() {
            removeClass([ this.getFocusedNode() ], HOVER$4);
        }, TreeView.prototype.onMouseOver = function(e) {
            var target = e.target, classList$$1 = target.classList, currentLi = closest(target, "." + LISTITEM);
            !currentLi || classList$$1.contains(PARENTITEM) || classList$$1.contains(LISTITEM) ? this.removeHover() : currentLi && !currentLi.classList.contains("e-disable") && this.setHover(currentLi);
        }, TreeView.prototype.setHover = function(li) {
            li.classList.contains(HOVER$4) || (this.removeHover(), addClass([ li ], HOVER$4));
        }, TreeView.prototype.onMouseLeave = function(e) {
            this.removeHover();
        }, TreeView.prototype.removeHover = function() {
            var hoveredNode = selectAll(".e-hover", this.element);
            hoveredNode && hoveredNode.length && removeClass(hoveredNode, HOVER$4);
        }, TreeView.prototype.getNodeData = function(currLi, fromDS) {
            if (!isNullOrUndefined(currLi) && currLi.classList.contains(LISTITEM)) {
                var id = currLi.getAttribute("data-uid"), text = this.getText(currLi, fromDS), pNode = closest(currLi.parentNode, "." + LISTITEM), pid = pNode ? pNode.getAttribute("data-uid") : null, selected = currLi.classList.contains(ACTIVE$5), expanded = "true" === currLi.getAttribute("aria-expanded"), checked = null;
                return this.showCheckBox && (checked = select("." + CHECKBOXWRAP$1, currLi).getAttribute("aria-checked")), 
                {
                    id: id,
                    text: text,
                    parentID: pid,
                    selected: selected,
                    expanded: expanded,
                    isChecked: checked
                };
            }
            return {
                id: "",
                text: "",
                parentID: "",
                selected: "",
                expanded: "",
                isChecked: ""
            };
        }, TreeView.prototype.getText = function(currLi, fromDS) {
            if (fromDS) {
                var nodeData = this.getNodeObject(currLi.getAttribute("data-uid")), level = parseFloat(currLi.getAttribute("aria-level"));
                return getValue(this.getFields(this.fields, level, 1).text, nodeData);
            }
            return select("." + LISTTEXT, currLi).textContent;
        }, TreeView.prototype.getExpandEvent = function(currLi, e) {
            var nodeData = this.getNodeData(currLi);
            return {
                cancel: !1,
                isInteracted: !isNullOrUndefined(e),
                node: currLi,
                nodeData: nodeData
            };
        }, TreeView.prototype.reRenderNodes = function() {
            this.element.innerHTML = "", this.setTouchClass(), this.setProperties({
                selectedNodes: []
            }, !0), this.isLoaded = !1, this.setDataBinding();
        }, TreeView.prototype.setCssClass = function(oldClass, newClass) {
            isNullOrUndefined(oldClass) || "" === oldClass || removeClass([ this.element ], oldClass.split(" ")), 
            isNullOrUndefined(newClass) || "" === newClass || addClass([ this.element ], newClass.split(" "));
        }, TreeView.prototype.editingHandler = function(e) {
            var target = e.target;
            if (!(!target || target.classList.contains(ROOT$12) || target.classList.contains(PARENTITEM) || target.classList.contains(LISTITEM) || target.classList.contains(ICON$5) || target.classList.contains("e-input") || target.classList.contains("e-input-group"))) {
                var liEle = closest(target, "." + LISTITEM);
                this.createTextbox(liEle, e);
            }
        }, TreeView.prototype.createTextbox = function(liEle, e) {
            var oldInpEle = select(".e-tree-input", this.element);
            oldInpEle && oldInpEle.blur();
            var textEle = select("." + LISTTEXT, liEle);
            this.updateOldText(liEle);
            var innerEle = createElement("input", {
                className: "e-tree-input",
                attrs: {
                    value: this.oldText
                }
            }), eventArgs = this.getEditEvent(liEle, null, innerEle.outerHTML);
            if (this.trigger("nodeEditing", eventArgs), !eventArgs.cancel) {
                var style = "width:" + (textEle.offsetWidth + 5) + "px";
                addClass([ liEle ], "e-editing"), textEle.innerHTML = eventArgs.innerHtml;
                var inpEle = select(".e-tree-input", textEle);
                this.inputObj = Input.createInput({
                    element: inpEle,
                    properties: {
                        enableRtl: this.enableRtl
                    }
                }), this.inputObj.container.setAttribute("style", style), inpEle.focus();
                var inputEle = inpEle;
                inputEle.setSelectionRange(0, inputEle.value.length), this.wireInputEvents(inpEle);
            }
        }, TreeView.prototype.updateOldText = function(liEle) {
            var id = liEle.getAttribute("data-uid");
            this.editData = this.getNodeObject(id);
            var level = parseFloat(liEle.getAttribute("aria-level"));
            this.editFields = this.getFields(this.fields, level, 1), this.oldText = getValue(this.editFields.text, this.editData);
        }, TreeView.prototype.inputFocusOut = function(e) {
            if (select(".e-tree-input", this.element)) {
                var target = e.target, newText = target.value, txtEle = closest(target, "." + LISTTEXT), liEle = closest(target, "." + LISTITEM);
                detach(this.inputObj.container), this.appendNewText(liEle, txtEle, newText, !0);
            }
        }, TreeView.prototype.appendNewText = function(liEle, txtEle, newText, isInput) {
            var newData = setValue(this.editFields.text, newText, this.editData);
            isNullOrUndefined(this.nodeTemplateFn) ? txtEle.innerHTML = newText : (txtEle.innerHTML = "", 
            append(this.nodeTemplateFn(newData), txtEle)), isInput && (removeClass([ liEle ], "e-editing"), 
            txtEle.focus()), this.trigger("nodeEdited", this.getEditEvent(liEle, newText, null));
        }, TreeView.prototype.getElement = function(ele) {
            return isNullOrUndefined(ele) ? null : "string" == typeof ele ? this.element.querySelector('[data-uid="' + ele + '"]') : "object" == typeof ele ? ele : null;
        }, TreeView.prototype.getEditEvent = function(liEle, newText, inpEle) {
            return {
                cancel: !1,
                newText: newText,
                node: liEle,
                nodeData: this.getNodeData(liEle),
                oldText: this.oldText,
                innerHtml: inpEle
            };
        }, TreeView.prototype.getNodeObject = function(id) {
            if (!isNullOrUndefined(id)) {
                if (1 !== this.dataType) return this.getChildNodeObject(this.treeData, this.fields, id);
                for (var i = 0, objlen = this.treeData.length; i < objlen; i++) {
                    var dataId = getValue(this.fields.id, this.treeData[i]);
                    if (!isNullOrUndefined(this.treeData[i]) && !isNullOrUndefined(dataId) && dataId.toString() === id) return this.treeData[i];
                }
            }
        }, TreeView.prototype.getChildNodeObject = function(obj, mapper, id) {
            var newList;
            if (isNullOrUndefined(obj)) return newList;
            for (var i = 0, objlen = obj.length; i < objlen; i++) {
                var dataId = getValue(mapper.id, obj[i]);
                if (obj[i] && dataId && dataId.toString() === id) return obj[i];
                if ("string" != typeof mapper.child || isNullOrUndefined(getValue(mapper.child, obj[i]))) {
                    if (this.fields.dataSource instanceof DataManager && !isNullOrUndefined(getValue("child", obj[i]))) {
                        if (void 0 !== (newList = this.getChildNodeObject(getValue("child", obj[i]), this.getChildMapper(mapper), id))) break;
                    }
                } else {
                    var childData = getValue(mapper.child, obj[i]);
                    if (void 0 !== (newList = this.getChildNodeObject(childData, this.getChildMapper(mapper), id))) break;
                }
            }
            return newList;
        }, TreeView.prototype.setDragAndDrop = function(toBind) {
            toBind ? this.initializeDrag() : this.destroyDrag();
        }, TreeView.prototype.initializeDrag = function() {
            var virtualEle, _this = this;
            this.dragObj = new Draggable(this.element, {
                enableTailMode: !0,
                dragTarget: "." + TEXTWRAP,
                helper: function(e) {
                    _this.dragTarget = e.sender.target;
                    var dragRoot = closest(_this.dragTarget, "." + ROOT$12), dragWrap = closest(_this.dragTarget, "." + TEXTWRAP);
                    if (_this.dragLi = closest(_this.dragTarget, "." + LISTITEM), _this.fullRowSelect && !dragWrap && _this.dragTarget.classList.contains("e-fullrow") && (dragWrap = _this.dragTarget.nextElementSibling), 
                    !_this.dragTarget || !e.element.isSameNode(dragRoot) || !dragWrap || _this.dragTarget.classList.contains(ROOT$12) || _this.dragTarget.classList.contains(PARENTITEM) || _this.dragTarget.classList.contains(LISTITEM)) return !1;
                    var cloneEle = dragWrap.cloneNode(!0);
                    if (isNullOrUndefined(select("div.e-icons", cloneEle))) {
                        var icon = createElement("div", {
                            className: "e-icons " + EXPANDABLE
                        });
                        cloneEle.insertBefore(icon, cloneEle.children[0]);
                    }
                    var cssClass$$1 = "e-drag-item e-treeview " + (_this.enableRtl ? "e-rtl" : "");
                    (virtualEle = createElement("div", {
                        className: cssClass$$1
                    })).appendChild(cloneEle);
                    var nLen = _this.selectedNodes.length;
                    if (nLen > 1 && _this.allowMultiSelection && _this.dragLi.classList.contains(ACTIVE$5)) {
                        var cNode = createElement("span", {
                            className: "e-drop-count",
                            innerHTML: "" + nLen
                        });
                        virtualEle.appendChild(cNode);
                    }
                    return document.body.appendChild(virtualEle), document.body.style.cursor = "", _this.dragData = _this.getNodeData(_this.dragLi), 
                    virtualEle;
                },
                dragStart: function(e) {
                    addClass([ _this.element ], "e-dragging");
                    var eventArgs = _this.getDragEvent(e.event, _this, null, e.target);
                    _this.trigger("nodeDragStart", eventArgs), eventArgs.cancel && (detach(virtualEle), 
                    removeClass([ _this.element ], "e-dragging")), _this.dragStartAction = !0;
                },
                drag: function(e) {
                    _this.dragObj.setProperties({
                        cursorAt: {
                            top: !isNullOrUndefined(e.event.targetTouches) || Browser.isDevice ? 60 : -20
                        }
                    }), _this.dragAction(e, virtualEle);
                },
                dragStop: function(e) {
                    removeClass([ _this.element ], "e-dragging"), _this.removeVirtualEle();
                    var dropTarget = e.target, dropRoot = closest(dropTarget, ".e-droppable");
                    dropTarget && dropRoot && !dropTarget.classList.contains(ROOT$12) || (detach(e.helper), 
                    document.body.style.cursor = "");
                    var eventArgs = _this.getDragEvent(e.event, _this, dropTarget, dropTarget);
                    _this.trigger("nodeDragStop", eventArgs), eventArgs.cancel && (detach(e.helper), 
                    document.body.style.cursor = ""), _this.dragStartAction = !1;
                }
            }), this.dropObj = new Droppable(this.element, {
                out: function(e) {
                    isNullOrUndefined(e) || e.target.classList.contains(SIBLING) || (document.body.style.cursor = "not-allowed");
                },
                over: function(e) {
                    document.body.style.cursor = "";
                },
                drop: function(e) {
                    _this.dropAction(e);
                }
            });
        }, TreeView.prototype.dragAction = function(e, virtualEle) {
            var dropRoot = closest(e.target, ".e-droppable"), dropWrap = closest(e.target, "." + TEXTWRAP), icon = select("div.e-icons", virtualEle);
            removeClass([ icon ], [ "e-drop-in", DROPNEXT, "e-drop-out", "e-no-drop" ]), this.removeVirtualEle(), 
            document.body.style.cursor = "";
            var classList$$1 = e.target.classList;
            if (this.fullRowSelect && !dropWrap && !isNullOrUndefined(classList$$1) && classList$$1.contains("e-fullrow") && (dropWrap = e.target.nextElementSibling), 
            dropRoot) {
                var dropLi = closest(e.target, "." + LISTITEM);
                if (!dropRoot.classList.contains(ROOT$12) || dropWrap && !dropLi.isSameNode(this.dragLi) && !this.isDescendant(this.dragLi, dropLi)) if (e && e.event.offsetY < 7) {
                    addClass([ icon ], DROPNEXT);
                    var virEle = createElement("div", {
                        className: SIBLING
                    }), index = this.fullRowSelect ? 1 : 0;
                    dropLi.insertBefore(virEle, dropLi.children[index]);
                } else if (e && e.target.offsetHeight > 0 && e.event.offsetY > e.target.offsetHeight - 10) {
                    addClass([ icon ], DROPNEXT);
                    virEle = createElement("div", {
                        className: SIBLING
                    }), index = this.fullRowSelect ? 2 : 1;
                    dropLi.insertBefore(virEle, dropLi.children[index]);
                } else addClass([ icon ], "e-drop-in"); else "LI" !== e.target.nodeName || dropLi.isSameNode(this.dragLi) || this.isDescendant(this.dragLi, dropLi) ? e.target.classList.contains(SIBLING) ? addClass([ icon ], DROPNEXT) : addClass([ icon ], "e-drop-out") : (addClass([ icon ], DROPNEXT), 
                this.renderVirtualEle(e));
            } else addClass([ icon ], "e-no-drop"), document.body.style.cursor = "not-allowed";
            this.trigger("nodeDragging", this.getDragEvent(e.event, this, e.target, e.target));
        }, TreeView.prototype.dropAction = function(e) {
            var offsetY = e.event.offsetY, dropTarget = e.target, dragObj = e.dragData.draggable.ej2_instances[0], dragLi = closest(dragObj.dragTarget, "." + LISTITEM), dropLi = closest(dropTarget, "." + LISTITEM);
            if (detach(e.droppedElement), document.body.style.cursor = "", dropLi && !dropLi.isSameNode(dragLi) && !this.isDescendant(dragLi, dropLi)) {
                if (dragObj.allowMultiSelection && (dragLi.classList.contains(ACTIVE$5) || offsetY < 7 || e.target.offsetHeight > 0 && offsetY > e.target.offsetHeight - 10)) for (var sNodes = selectAll(".e-active", dragObj.element), i = 0; i < sNodes.length; i++) dropLi.isSameNode(sNodes[i]) || this.isDescendant(sNodes[i], dropLi) || this.appendNode(dropTarget, sNodes[i], dropLi, e, dragObj, offsetY); else this.appendNode(dropTarget, dragLi, dropLi, e, dragObj, offsetY);
                this.trigger("nodeDropped", this.getDragEvent(e.event, dragObj, dropTarget, e.target));
            }
        }, TreeView.prototype.appendNode = function(dropTarget, dragLi, dropLi, e, dragObj, offsetY) {
            "LI" === dropTarget.nodeName ? this.dropAsSiblingNode(dragLi, dropLi, e, dragObj) : this.dropAsChildNode(dragLi, dropLi, dragObj, null, e, offsetY);
        }, TreeView.prototype.dropAsSiblingNode = function(dragLi, dropLi, e, dragObj) {
            var pre, dropUl = closest(dropLi, "." + PARENTITEM), dragParentUl = closest(dragLi, "." + PARENTITEM), dragParentLi = closest(dragParentUl, "." + LISTITEM);
            e.target.offsetHeight > 0 && e.event.offsetY > e.target.offsetHeight - 2 ? pre = !1 : e.event.offsetY < 2 && (pre = !0), 
            dropUl.insertBefore(dragLi, pre ? e.target : e.target.nextElementSibling), this.updateElement(dragParentUl, dragParentLi), 
            this.updateAriaLevel(dragLi), dragObj.element.id === this.element.id ? this.updateList() : (dragObj.updateInstance(), 
            this.updateInstance());
        }, TreeView.prototype.dropAsChildNode = function(dragLi, dropLi, dragObj, index, e, pos) {
            var dragParentUl = closest(dragLi, "." + PARENTITEM), dragParentLi = closest(dragParentUl, "." + LISTITEM), dropParentUl = closest(dropLi, "." + PARENTITEM);
            if (e && pos < 7) dropParentUl.insertBefore(dragLi, dropLi); else if (e && e.target.offsetHeight > 0 && pos > e.target.offsetHeight - 10) dropParentUl.insertBefore(dragLi, dropLi.nextElementSibling); else {
                var dropUl = this.expandParent(dropLi);
                dropUl.insertBefore(dragLi, dropUl.childNodes[index]);
            }
            this.updateElement(dragParentUl, dragParentLi), this.updateAriaLevel(dragLi), dragObj.element.id === this.element.id ? this.updateList() : (dragObj.updateInstance(), 
            this.updateInstance());
        }, TreeView.prototype.expandParent = function(dropLi) {
            var dropIcon = select("div.e-icons", dropLi);
            dropIcon && dropIcon.classList.contains(EXPANDABLE) && this.expandAction(dropLi, dropIcon, null);
            var dropUl = select("." + PARENTITEM, dropLi);
            if (isNullOrUndefined(dropUl)) {
                ListBase.generateIcon(dropLi, COLLAPSIBLE, this.listBaseOption);
                removeClass([ select("div.e-icons", dropLi) ], EXPANDABLE), dropUl = ListBase.generateUL([], null, this.listBaseOption), 
                dropLi.appendChild(dropUl), dropLi.setAttribute("aria-expanded", "true"), removeClass([ dropLi ], "e-node-collapsed");
            }
            return dropUl;
        }, TreeView.prototype.updateElement = function(dragParentUl, dragParentLi) {
            if (dragParentLi && 0 === dragParentUl.childElementCount) {
                var dragIcon = select("div.e-icons", dragParentLi);
                detach(dragParentUl), detach(dragIcon), dragParentLi.removeAttribute("aria-expanded");
            }
        }, TreeView.prototype.updateAriaLevel = function(dragLi) {
            var level = this.parents(dragLi, "." + PARENTITEM).length;
            dragLi.setAttribute("aria-level", "" + level), this.updateChildAriaLevel(select("." + PARENTITEM, dragLi), level + 1);
        }, TreeView.prototype.updateChildAriaLevel = function(element, level) {
            if (!isNullOrUndefined(element)) for (var cNodes = element.childNodes, i = 0, len = cNodes.length; i < len; i++) {
                var liEle = cNodes[i];
                liEle.setAttribute("aria-level", "" + level), this.updateChildAriaLevel(select("." + PARENTITEM, liEle), level + 1);
            }
        }, TreeView.prototype.renderVirtualEle = function(e) {
            var pre;
            e.event.offsetY > e.target.offsetHeight - 2 ? pre = !1 : e.event.offsetY < 2 && (pre = !0);
            var virEle = createElement("div", {
                className: SIBLING
            }), index = this.fullRowSelect ? pre ? 1 : 2 : pre ? 0 : 1;
            e.target.insertBefore(virEle, e.target.children[index]);
        }, TreeView.prototype.removeVirtualEle = function() {
            var sibEle = select("." + SIBLING);
            sibEle && detach(sibEle);
        }, TreeView.prototype.destroyDrag = function() {
            this.dragObj && this.dropObj && (this.dragObj.destroy(), this.dropObj.destroy());
        }, TreeView.prototype.getDragEvent = function(event, obj, dropTarget, target) {
            var dropLi = dropTarget ? closest(dropTarget, "." + LISTITEM) : null, dropData = dropLi ? this.getNodeData(dropLi) : null;
            return {
                cancel: !1,
                event: event,
                draggedNode: obj.dragLi,
                draggedNodeData: obj.dragData,
                droppedNode: dropLi,
                droppedNodeData: dropData,
                target: target
            };
        }, TreeView.prototype.addFullRow = function(toAdd) {
            var len = this.liList.length;
            if (toAdd) for (var i = 0; i < len; i++) this.createFullRow(this.liList[i]); else for (i = 0; i < len; i++) {
                detach(select(".e-fullrow", this.liList[i]));
            }
        }, TreeView.prototype.createFullRow = function(item) {
            var rowDiv = createElement("div", {
                className: "e-fullrow"
            });
            item.insertBefore(rowDiv, item.childNodes[0]);
        }, TreeView.prototype.addMultiSelect = function(toAdd) {
            if (toAdd) for (var _i = 0, liEles_1 = selectAll('.e-list-item:not([aria-selected="true"])', this.element); _i < liEles_1.length; _i++) {
                liEles_1[_i].setAttribute("aria-selected", "false");
            } else for (var _a = 0, liEles_2 = selectAll('.e-list-item[aria-selected="false"]', this.element); _a < liEles_2.length; _a++) {
                liEles_2[_a].removeAttribute("aria-selected");
            }
        }, TreeView.prototype.collapseByLevel = function(element, level, excludeHiddenNodes) {
            if (level > 0 && !isNullOrUndefined(element)) for (var cNodes = this.getVisibleNodes(excludeHiddenNodes, element.childNodes), i = 0, len = cNodes.length; i < len; i++) {
                var liEle = cNodes[i], icon = select("." + COLLAPSIBLE, select("." + TEXTWRAP, liEle));
                isNullOrUndefined(icon) || this.collapseNode(liEle, icon, null), this.collapseByLevel(select("." + PARENTITEM, liEle), level - 1, excludeHiddenNodes);
            }
        }, TreeView.prototype.collapseAllNodes = function(excludeHiddenNodes) {
            for (var cIcons = this.getVisibleNodes(excludeHiddenNodes, selectAll("." + COLLAPSIBLE, this.element)), i = 0, len = cIcons.length; i < len; i++) {
                var icon = cIcons[i], liEle = closest(icon, "." + LISTITEM);
                this.collapseNode(liEle, icon, null);
            }
        }, TreeView.prototype.expandByLevel = function(element, level, excludeHiddenNodes) {
            if (level > 0 && !isNullOrUndefined(element)) for (var eNodes = this.getVisibleNodes(excludeHiddenNodes, element.childNodes), i = 0, len = eNodes.length; i < len; i++) {
                var liEle = eNodes[i], icon = select("." + EXPANDABLE, select("." + TEXTWRAP, liEle));
                isNullOrUndefined(icon) || this.expandAction(liEle, icon, null), this.expandByLevel(select("." + PARENTITEM, liEle), level - 1, excludeHiddenNodes);
            }
        }, TreeView.prototype.expandAllNodes = function(excludeHiddenNodes) {
            for (var eIcons = this.getVisibleNodes(excludeHiddenNodes, selectAll("." + EXPANDABLE, this.element)), i = 0, len = eIcons.length; i < len; i++) {
                var icon = eIcons[i], liEle = closest(icon, "." + LISTITEM);
                this.expandAction(liEle, icon, null, !0);
            }
        }, TreeView.prototype.getVisibleNodes = function(excludeHiddenNodes, nodes) {
            var vNodes = Array.prototype.slice.call(nodes);
            if (excludeHiddenNodes) for (var i = 0; i < vNodes.length; i++) isVisible(vNodes[i]) || (vNodes.splice(i, 1), 
            i--);
            return vNodes;
        }, TreeView.prototype.removeNode = function(node) {
            var dragParentUl = closest(node, "." + PARENTITEM), dragParentLi = closest(dragParentUl, "." + LISTITEM);
            detach(node), this.updateElement(dragParentUl, dragParentLi), this.updateInstance();
        }, TreeView.prototype.updateInstance = function() {
            this.updateList(), this.updateSelectedNodes();
        }, TreeView.prototype.updateList = function() {
            this.liList = Array.prototype.slice.call(selectAll("." + LISTITEM, this.element));
        }, TreeView.prototype.updateSelectedNodes = function() {
            this.setProperties({
                selectedNodes: []
            }, !0);
            var sNodes = selectAll(".e-active", this.element);
            this.selectGivenNodes(sNodes);
        }, TreeView.prototype.doGivenAction = function(nodes, selector, toExpand) {
            for (var i = 0, len = nodes.length; i < len; i++) {
                var liEle = this.getElement(nodes[i]);
                if (!isNullOrUndefined(liEle)) {
                    var icon = select("." + selector, select("." + TEXTWRAP, liEle));
                    isNullOrUndefined(icon) || (toExpand ? this.expandAction(liEle, icon, null) : this.collapseNode(liEle, icon, null));
                }
            }
        }, TreeView.prototype.addGivenNodes = function(nodes, dropLi, index, isRemote) {
            var level = dropLi ? parseFloat(dropLi.getAttribute("aria-level")) + 1 : 1;
            isRemote && this.updateMapper(level);
            for (var li = ListBase.createListItemFromJson(nodes, this.listBaseOption, level), dropUl = dropLi ? this.expandParent(dropLi) : select("." + PARENTITEM, this.element), refNode = dropUl.childNodes[index], i = 0; i < li.length; i++) dropUl.insertBefore(li[i], refNode);
            this.finalizeNode(dropUl);
        }, TreeView.prototype.updateMapper = function(level) {
            var mapper = 1 === level ? this.fields : this.getChildFields(this.fields, level - 1, 1), prop = this.getActualProperties(mapper);
            this.listBaseOption.fields = prop, this.listBaseOption.fields.url = prop.navigateUrl;
        }, TreeView.prototype.doDisableAction = function(nodes) {
            for (var i = 0, len = nodes.length; i < len; i++) {
                var liEle = this.getElement(nodes[i]);
                isNullOrUndefined(liEle) || (liEle.setAttribute("aria-disabled", "true"), addClass([ liEle ], "e-disable"));
            }
        }, TreeView.prototype.doEnableAction = function(nodes) {
            for (var i = 0, len = nodes.length; i < len; i++) {
                var liEle = this.getElement(nodes[i]);
                isNullOrUndefined(liEle) || (liEle.removeAttribute("aria-disabled"), removeClass([ liEle ], "e-disable"));
            }
        }, TreeView.prototype.setTouchClass = function() {
            var ele = closest(this.element, ".e-bigger");
            this.touchClass = isNullOrUndefined(ele) ? "" : "e-small";
        }, TreeView.prototype.wireInputEvents = function(inpEle) {
            EventHandler.add(inpEle, "blur", this.inputFocusOut, this);
        }, TreeView.prototype.wireEditingEvents = function(toBind) {
            if (toBind) {
                var proxy_1 = this;
                this.touchEditObj = new Touch(this.element, {
                    tap: function(e) {
                        2 === e.tapCount && (e.originalEvent.preventDefault(), proxy_1.editingHandler(e.originalEvent));
                    }
                });
            } else this.touchEditObj && this.touchEditObj.destroy();
        }, TreeView.prototype.wireClickEvent = function(toBind) {
            if (toBind) {
                var proxy_2 = this;
                this.touchClickObj = new Touch(this.element, {
                    tap: function(e) {
                        proxy_2.clickHandler(e.originalEvent);
                    }
                });
            } else this.touchClickObj && this.touchClickObj.destroy();
        }, TreeView.prototype.wireExpandOnEvent = function(toBind) {
            var _this = this;
            if (toBind) {
                var proxy_3 = this;
                this.touchExpandObj = new Touch(this.element, {
                    tap: function(e) {
                        ("Click" === _this.expandOnType || "DblClick" === _this.expandOnType && 2 === e.tapCount) && proxy_3.expandHandler(e.originalEvent);
                    }
                });
            } else this.touchExpandObj && this.touchExpandObj.destroy();
        }, TreeView.prototype.mouseDownHandler = function(e) {
            this.mouseDownStatus = !0, (e.shiftKey || e.ctrlKey) && e.preventDefault(), e.ctrlKey && this.allowMultiSelection && EventHandler.add(this.element, "contextmenu", this.preventContextMenu, this);
        }, TreeView.prototype.preventContextMenu = function(e) {
            e.preventDefault();
        }, TreeView.prototype.wireEvents = function() {
            EventHandler.add(this.element, "mousedown", this.mouseDownHandler, this), this.wireClickEvent(!0), 
            this.wireExpandOnEvent(!0), EventHandler.add(this.element, "focus", this.focusIn, this), 
            EventHandler.add(this.element, "blur", this.focusOut, this), EventHandler.add(this.element, "mouseover", this.onMouseOver, this), 
            EventHandler.add(this.element, "mouseout", this.onMouseLeave, this), this.keyboardModule = new KeyboardEvents(this.element, {
                keyAction: this.keyActionHandler.bind(this),
                keyConfigs: this.keyConfigs,
                eventName: "keydown"
            });
        }, TreeView.prototype.unWireEvents = function() {
            EventHandler.remove(this.element, "mousedown", this.mouseDownHandler), this.wireClickEvent(!1), 
            this.wireExpandOnEvent(!1), EventHandler.remove(this.element, "focus", this.focusIn), 
            EventHandler.remove(this.element, "blur", this.focusOut), EventHandler.remove(this.element, "mouseover", this.onMouseOver), 
            EventHandler.remove(this.element, "mouseout", this.onMouseLeave), this.keyboardModule.destroy();
        }, TreeView.prototype.parents = function(element, selector) {
            for (var matched = [], el = element.parentNode; !isNullOrUndefined(el); ) matches(el, selector) && matched.push(el), 
            el = el.parentNode;
            return matched;
        }, TreeView.prototype.isDescendant = function(parent, child) {
            for (var node = child.parentNode; !isNullOrUndefined(node); ) {
                if (node === parent) return !0;
                node = node.parentNode;
            }
            return !1;
        }, TreeView.prototype.showSpinner = function(element) {
            addClass([ element ], LOAD), createSpinner({
                target: element,
                width: Browser.isDevice ? 16 : 14
            }), showSpinner(element);
        }, TreeView.prototype.hideSpinner = function(element) {
            hideSpinner(element), element.innerHTML = "", removeClass([ element ], LOAD);
        }, TreeView.prototype.setCheckedNodes = function(nodes) {
            nodes = JSON.parse(JSON.stringify(nodes)), this.uncheckAll(), nodes.length > 0 && this.checkAll(nodes);
        }, TreeView.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "allowDragAndDrop":
                    this.setDragAndDrop(this.allowDragAndDrop);
                    break;

                  case "allowEditing":
                    this.wireEditingEvents(this.allowEditing);
                    break;

                  case "allowMultiSelection":
                    if (this.selectedNodes.length > 1) {
                        var sNode = this.getElement(this.selectedNodes[0]);
                        this.isLoaded = !1, this.removeSelectAll(), this.selectNode(sNode, null), this.isLoaded = !0;
                    }
                    this.setMultiSelect(this.allowMultiSelection), this.addMultiSelect(this.allowMultiSelection);
                    break;

                  case "checkedNodes":
                    this.showCheckBox && (this.checkedNodes = oldProp.checkedNodes, this.setCheckedNodes(newProp.checkedNodes));
                    break;

                  case "cssClass":
                    this.setCssClass(oldProp.cssClass, newProp.cssClass);
                    break;

                  case "enableRtl":
                    this.setEnableRtl();
                    break;

                  case "expandOn":
                    this.wireExpandOnEvent(!1), this.setExpandOnType(), this.wireExpandOnEvent(!0);
                    break;

                  case "fields":
                    this.listBaseOption.fields = this.fields.properties, this.listBaseOption.fields.url = this.fields.navigateUrl, 
                    this.reRenderNodes();
                    break;

                  case "fullRowSelect":
                    this.setFullRow(this.fullRowSelect), this.addFullRow(this.fullRowSelect);
                    break;

                  case "nodeTemplate":
                    this.nodeTemplateFn = this.templateComplier(this.nodeTemplate), this.reRenderNodes();
                    break;

                  case "selectedNodes":
                    this.removeSelectAll(), this.setProperties({
                        selectedNodes: newProp.selectedNodes
                    }, !0), this.doSelectionAction();
                    break;

                  case "showCheckBox":
                  case "sortOrder":
                    this.reRenderNodes();
                }
            }
        }, TreeView.prototype.destroy = function() {
            this.element.removeAttribute("aria-activedescendant"), this.element.removeAttribute("tabindex"), 
            this.unWireEvents(), this.wireEditingEvents(!1), this.rippleFn(), this.rippleIconFn(), 
            this.setCssClass(this.cssClass, null), this.setDragAndDrop(!1), this.setFullRow(!1), 
            this.element.innerHTML = "", _super.prototype.destroy.call(this);
        }, TreeView.prototype.addNodes = function(nodes, target, index) {
            if (!isNullOrUndefined(nodes)) {
                var dropLi = this.getElement(target);
                if (nodes = this.getSortedData(nodes), this.fields.dataSource instanceof DataManager) this.addGivenNodes(nodes, dropLi, index, !0); else if (2 === this.dataType) this.addGivenNodes(nodes, dropLi, index); else if (dropLi) this.addGivenNodes(nodes, dropLi, index); else for (var i = 0; i < nodes.length; i++) {
                    var pid = getValue(this.fields.parentID, nodes[i]);
                    dropLi = pid ? this.getElement(pid.toString()) : pid, this.addGivenNodes([ nodes[i] ], dropLi, index);
                }
            }
        }, TreeView.prototype.beginEdit = function(node) {
            var ele = this.getElement(node);
            isNullOrUndefined(ele) || this.createTextbox(ele, null);
        }, TreeView.prototype.checkAll = function(nodes) {
            this.showCheckBox && this.doCheckBoxAction(nodes, !0);
        }, TreeView.prototype.collapseAll = function(nodes, level, excludeHiddenNodes) {
            isNullOrUndefined(nodes) ? level > 0 ? this.collapseByLevel(select("." + PARENTITEM, this.element), level, excludeHiddenNodes) : this.collapseAllNodes(excludeHiddenNodes) : this.doGivenAction(nodes, COLLAPSIBLE, !1);
        }, TreeView.prototype.disableNodes = function(nodes) {
            isNullOrUndefined(nodes) || this.doDisableAction(nodes);
        }, TreeView.prototype.enableNodes = function(nodes) {
            isNullOrUndefined(nodes) || this.doEnableAction(nodes);
        }, TreeView.prototype.ensureVisible = function(node) {
            var liEle = this.getElement(node);
            if (!isNullOrUndefined(liEle)) {
                var parents = this.parents(liEle, "." + LISTITEM);
                this.expandAll(parents), setTimeout(function() {
                    liEle.scrollIntoView(!0);
                }, 450);
            }
        }, TreeView.prototype.expandAll = function(nodes, level, excludeHiddenNodes) {
            isNullOrUndefined(nodes) ? level > 0 ? this.expandByLevel(select("." + PARENTITEM, this.element), level, excludeHiddenNodes) : this.expandAllNodes(excludeHiddenNodes) : this.doGivenAction(nodes, EXPANDABLE, !0);
        }, TreeView.prototype.getNode = function(node) {
            var ele = this.getElement(node);
            return this.getNodeData(ele, !0);
        }, TreeView.prototype.moveNodes = function(sourceNodes, target, index) {
            var dropLi = this.getElement(target);
            if (!isNullOrUndefined(dropLi)) for (var i = 0; i < sourceNodes.length; i++) {
                var dragLi = this.getElement(sourceNodes[i]);
                isNullOrUndefined(dragLi) || dropLi.isSameNode(dragLi) || this.isDescendant(dragLi, dropLi) || this.dropAsChildNode(dragLi, dropLi, this, index);
            }
        }, TreeView.prototype.removeNodes = function(nodes) {
            if (!isNullOrUndefined(nodes)) for (var i = 0, len = nodes.length; i < len; i++) {
                var liEle = this.getElement(nodes[i]);
                isNullOrUndefined(liEle) || this.removeNode(liEle);
            }
        }, TreeView.prototype.updateNode = function(target, newText) {
            if (!isNullOrUndefined(target) && !isNullOrUndefined(newText) && this.allowEditing) {
                var liEle = this.getElement(target);
                if (!isNullOrUndefined(liEle)) {
                    var txtEle = select("." + LISTTEXT, liEle);
                    this.updateOldText(liEle);
                    var eventArgs = this.getEditEvent(liEle, null, null);
                    this.trigger("nodeEditing", eventArgs), eventArgs.cancel || this.appendNewText(liEle, txtEle, newText, !1);
                }
            }
        }, TreeView.prototype.uncheckAll = function(nodes) {
            this.showCheckBox && this.doCheckBoxAction(nodes, !1);
        }, __decorate$35([ Property(!1) ], TreeView.prototype, "allowDragAndDrop", void 0), 
        __decorate$35([ Property(!1) ], TreeView.prototype, "allowEditing", void 0), __decorate$35([ Property(!1) ], TreeView.prototype, "allowMultiSelection", void 0), 
        __decorate$35([ Complex({}, NodeAnimationSettings) ], TreeView.prototype, "animation", void 0), 
        __decorate$35([ Property() ], TreeView.prototype, "checkedNodes", void 0), __decorate$35([ Property("") ], TreeView.prototype, "cssClass", void 0), 
        __decorate$35([ Property(!1) ], TreeView.prototype, "enablePersistence", void 0), 
        __decorate$35([ Property(!1) ], TreeView.prototype, "enableRtl", void 0), __decorate$35([ Property("Auto") ], TreeView.prototype, "expandOn", void 0), 
        __decorate$35([ Complex({}, FieldsSettings) ], TreeView.prototype, "fields", void 0), 
        __decorate$35([ Property(!0) ], TreeView.prototype, "fullRowSelect", void 0), __decorate$35([ Property() ], TreeView.prototype, "nodeTemplate", void 0), 
        __decorate$35([ Property() ], TreeView.prototype, "selectedNodes", void 0), __decorate$35([ Property("None") ], TreeView.prototype, "sortOrder", void 0), 
        __decorate$35([ Property(!1) ], TreeView.prototype, "showCheckBox", void 0), __decorate$35([ Event() ], TreeView.prototype, "created", void 0), 
        __decorate$35([ Event() ], TreeView.prototype, "dataBound", void 0), __decorate$35([ Event() ], TreeView.prototype, "drawNode", void 0), 
        __decorate$35([ Event() ], TreeView.prototype, "destroyed", void 0), __decorate$35([ Event() ], TreeView.prototype, "keyPress", void 0), 
        __decorate$35([ Event() ], TreeView.prototype, "nodeChecked", void 0), __decorate$35([ Event() ], TreeView.prototype, "nodeChecking", void 0), 
        __decorate$35([ Event() ], TreeView.prototype, "nodeClicked", void 0), __decorate$35([ Event() ], TreeView.prototype, "nodeCollapsed", void 0), 
        __decorate$35([ Event() ], TreeView.prototype, "nodeCollapsing", void 0), __decorate$35([ Event() ], TreeView.prototype, "nodeDragging", void 0), 
        __decorate$35([ Event() ], TreeView.prototype, "nodeDragStart", void 0), __decorate$35([ Event() ], TreeView.prototype, "nodeDragStop", void 0), 
        __decorate$35([ Event() ], TreeView.prototype, "nodeDropped", void 0), __decorate$35([ Event() ], TreeView.prototype, "nodeEdited", void 0), 
        __decorate$35([ Event() ], TreeView.prototype, "nodeEditing", void 0), __decorate$35([ Event() ], TreeView.prototype, "nodeExpanded", void 0), 
        __decorate$35([ Event() ], TreeView.prototype, "nodeExpanding", void 0), __decorate$35([ Event() ], TreeView.prototype, "nodeSelected", void 0), 
        __decorate$35([ Event() ], TreeView.prototype, "nodeSelecting", void 0), TreeView = __decorate$35([ NotifyPropertyChanges ], TreeView);
    }(Component), __extends$37 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$36 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, STATUS$1 = "e-file-status", CLEAR_ICON$1 = "e-file-remove-btn", PROGRESSBAR$1 = "e-upload-progress-bar", ICON_FOCUSED$1 = "e-clear-icon-focus", FilesProp$1 = function(_super) {
        function FilesProp() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$37(FilesProp, _super), __decorate$36([ Property("") ], FilesProp.prototype, "name", void 0), 
        __decorate$36([ Property(null) ], FilesProp.prototype, "size", void 0), __decorate$36([ Property("") ], FilesProp.prototype, "type", void 0), 
        FilesProp;
    }(ChildProperty), ButtonsProps$1 = function(_super) {
        function ButtonsProps() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$37(ButtonsProps, _super), __decorate$36([ Property("Browse") ], ButtonsProps.prototype, "browse", void 0), 
        __decorate$36([ Property("Upload") ], ButtonsProps.prototype, "upload", void 0), 
        __decorate$36([ Property("Clear") ], ButtonsProps.prototype, "clear", void 0), ButtonsProps;
    }(ChildProperty), AsyncSettings$1 = function(_super) {
        function AsyncSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$37(AsyncSettings, _super), __decorate$36([ Property("") ], AsyncSettings.prototype, "saveUrl", void 0), 
        __decorate$36([ Property("") ], AsyncSettings.prototype, "removeUrl", void 0), AsyncSettings;
    }(ChildProperty), Uploader$1 = function(_super) {
        function Uploader(options, element) {
            var _this = _super.call(this, options, element) || this;
            return _this.initialAttr = {
                accept: null,
                multiple: !1,
                disabled: !1
            }, _this.fileList = [], _this.filesData = [], _this.uploadedFilesData = [], _this.isForm = !1, 
            _this;
        }
        return __extends$37(Uploader, _super), Uploader.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "allowedExtensions":
                    this.setExtensions(this.allowedExtensions), this.clearAll();
                    break;

                  case "enabled":
                    this.setControlStatus();
                    break;

                  case "multiple":
                    this.setMultipleSelection();
                    break;

                  case "enableRtl":
                    this.setRTL(), this.reRenderFileList();
                    break;

                  case "buttons":
                    this.buttons.browse = isNullOrUndefined(this.buttons.browse) ? "" : this.buttons.browse, 
                    this.buttons.clear = isNullOrUndefined(this.buttons.clear) ? "" : this.buttons.clear, 
                    this.buttons.upload = isNullOrUndefined(this.buttons.upload) ? "" : this.buttons.upload, 
                    this.renderButtonTemplates();
                    break;

                  case "dropArea":
                    this.unBindDropEvents(), this.setDropArea();
                    break;

                  case "showFileList":
                    this.listParent && (this.listParent.style.display = this.showFileList ? "block" : "none", 
                    this.actionButtons.style.display = this.showFileList ? "block" : "none");
                    break;

                  case "files":
                    this.renderPreLoadFiles();
                    break;

                  case "minFileSize":
                  case "maxFileSize":
                  case "template":
                  case "autoUpload":
                    this.clearAll();
                    break;

                  case "locale":
                    this.l10n.setLocale(this.locale), this.setLocalizedTexts(), this.preLocaleObj = getValue("currentLocale", this.l10n);
                }
            }
        }, Uploader.prototype.setLocalizedTexts = function() {
            isNullOrUndefined(this.template) && ("string" == typeof this.buttons.browse && (this.browseButton.innerText = "Browse" === this.buttons.browse ? this.localizedTexts("Browse") : this.buttons.browse, 
            this.browseButton.setAttribute("title", this.browseButton.innerText), this.uploadWrapper.querySelector(".e-file-drop").innerHTML = this.localizedTexts("dropFilesHint")), 
            this.updateFileList());
        }, Uploader.prototype.getKeyValue = function(val) {
            for (var keyValue, _i = 0, _a = Object.keys(this.preLocaleObj); _i < _a.length; _i++) {
                var key = _a[_i];
                this.preLocaleObj[key] === val && (keyValue = key);
            }
            return keyValue;
        }, Uploader.prototype.updateFileList = function() {
            if (this.fileList.length > 0 && !isNullOrUndefined(this.uploadWrapper.querySelector(".e-upload-files"))) for (var i = 0; i < this.fileList.length; i++) this.fileList[i].querySelector(".e-file-status").innerHTML = this.localizedTexts(this.getKeyValue(this.filesData[i].status)), 
            this.filesData[i].status = this.localizedTexts(this.getKeyValue(this.filesData[i].status)), 
            this.fileList[i].classList.contains("e-upload-success") ? this.fileList[i].querySelector(".e-icons").setAttribute("title", this.localizedTexts("remove")) : this.fileList[i].querySelector(".e-icons").setAttribute("title", this.localizedTexts("delete")), 
            this.autoUpload || (this.uploadButton.innerText = "Upload" === this.buttons.upload ? this.localizedTexts("Upload") : this.buttons.upload, 
            this.clearButton.innerText = "Clear" === this.buttons.clear ? this.localizedTexts("Clear") : this.buttons.clear);
        }, Uploader.prototype.reRenderFileList = function() {
            this.listParent && (detach(this.listParent), this.listParent = null, this.fileList = [], 
            this.removeActionButtons(), this.createFileList(this.filesData), this.renderActionButtons());
        }, Uploader.prototype.preRender = function() {
            this.cloneElement = this.element.cloneNode(!0), this.localeText = {
                Browse: "Browse",
                Clear: "Clear",
                Upload: "Upload",
                dropFilesHint: "or Drop files here",
                invalidMaxFileSize: "File size is too large",
                invalidMinFileSize: "File size is too small",
                invalidFileType: "File type is not allowed",
                uploadFailedMessage: "File failed to upload",
                uploadSuccessMessage: "File uploaded successfully",
                removedSuccessMessage: "File removed successfully",
                removedFailedMessage: "File failed to remove",
                inProgress: "Uploading",
                readyToUploadMessage: "Ready to upload",
                remove: "Remove",
                cancel: "Cancel",
                delete: "Delete file"
            }, this.l10n = new L10n("uploader", this.localeText, this.locale), this.preLocaleObj = getValue("currentLocale", this.l10n), 
            this.checkHTMLAttributes(), "" !== this.asyncSettings.saveUrl || "" !== this.asyncSettings.removeUrl || this.autoUpload || isNullOrUndefined(this.element.closest("form")) || (this.isForm = !0, 
            this.element.closest("form").setAttribute("enctype", "multipart/form-data"), this.element.closest("form").setAttribute("encoding", "multipart/form-data"));
            var ejInstance = getValue("ej2_instances", this.element);
            if ("EJS-UPLOADER" === this.element.tagName || "UPLOADERCOMPONENT" === this.element.tagName) {
                for (var inputElement = createElement("input", {
                    attrs: {
                        type: "file"
                    }
                }), index = 0; index < this.element.attributes.length; index++) inputElement.setAttribute(this.element.attributes[index].nodeName, this.element.attributes[index].nodeValue), 
                inputElement.innerHTML = this.element.innerHTML;
                inputElement.hasAttribute("name") || inputElement.setAttribute("name", "UploadFiles"), 
                this.element.appendChild(inputElement), this.element = inputElement, setValue("ej2_instances", ejInstance, this.element);
            }
            isNullOrUndefined(this.element.getAttribute("name")) && this.element.setAttribute("name", this.element.getAttribute("id")), 
            this.element.hasAttribute("type") || this.element.setAttribute("type", "file"), 
            this.keyConfigs = {
                previous: "shift+tab",
                enter: "enter",
                next: "tab"
            };
        }, Uploader.prototype.getPersistData = function() {
            return this.addOnPersist([]);
        }, Uploader.prototype.getModuleName = function() {
            return "uploader";
        }, Uploader.prototype.render = function() {
            this.renderBrowseButton(), this.initializeUpload(), this.wireEvents(), this.setMultipleSelection(), 
            this.setExtensions(this.allowedExtensions), this.setRTL(), this.renderPreLoadFiles(), 
            this.setControlStatus();
        }, Uploader.prototype.renderBrowseButton = function() {
            this.browseButton = createElement("button", {
                className: "e-css e-btn",
                attrs: {
                    type: "button"
                }
            }), "string" == typeof this.buttons.browse ? (this.browseButton.innerText = "Browse" === this.buttons.browse ? this.localizedTexts("Browse") : this.buttons.browse, 
            this.browseButton.setAttribute("title", this.browseButton.innerText)) : this.browseButton.appendChild(this.buttons.browse), 
            this.element.setAttribute("aria-label", "Uploader");
        }, Uploader.prototype.renderActionButtons = function() {
            this.element.setAttribute("tabindex", "-1"), this.actionButtons = createElement("div", {
                className: "e-upload-actions"
            }), this.uploadButton = createElement("button", {
                className: "e-file-upload-btn e-css e-btn e-primary",
                attrs: {
                    type: "button",
                    tabindex: "-1"
                }
            }), this.clearButton = createElement("button", {
                className: "e-file-clear-btn e-css e-btn e-flat",
                attrs: {
                    type: "button",
                    tabindex: "-1"
                }
            }), this.actionButtons.appendChild(this.clearButton), this.actionButtons.appendChild(this.uploadButton), 
            this.renderButtonTemplates(), this.uploadWrapper.appendChild(this.actionButtons), 
            this.browseButton.blur(), this.uploadButton.focus(), this.wireActionButtonEvents();
        }, Uploader.prototype.wireActionButtonEvents = function() {
            EventHandler.add(this.uploadButton, "click", this.uploadButtonClick, this), EventHandler.add(this.clearButton, "click", this.clearButtonClick, this);
        }, Uploader.prototype.unwireActionButtonEvents = function() {
            EventHandler.remove(this.uploadButton, "click", this.uploadButtonClick), EventHandler.remove(this.clearButton, "click", this.clearButtonClick);
        }, Uploader.prototype.removeActionButtons = function() {
            this.actionButtons && (this.unwireActionButtonEvents(), detach(this.actionButtons), 
            this.actionButtons = null);
        }, Uploader.prototype.renderButtonTemplates = function() {
            if ("string" == typeof this.buttons.browse ? (this.browseButton.innerText = "Browse" === this.buttons.browse ? this.localizedTexts("Browse") : this.buttons.browse, 
            this.browseButton.setAttribute("title", this.browseButton.innerText)) : this.browseButton.appendChild(this.buttons.browse), 
            this.uploadButton) {
                var uploadText = void 0;
                uploadText = isNullOrUndefined(this.buttons.upload) ? "Upload" : this.buttons.upload, 
                this.buttons.upload = uploadText, "string" == typeof this.buttons.upload ? (this.uploadButton.innerText = "Upload" === this.buttons.upload ? this.localizedTexts("Upload") : this.buttons.upload, 
                this.uploadButton.setAttribute("title", this.uploadButton.innerText)) : this.uploadButton.appendChild(this.buttons.upload);
            }
            if (this.clearButton) {
                var clearText = void 0;
                clearText = isNullOrUndefined(this.buttons.clear) ? "Clear" : this.buttons.clear, 
                this.buttons.clear = clearText, "string" == typeof this.buttons.clear ? (this.clearButton.innerText = "Clear" === this.buttons.clear ? this.localizedTexts("Clear") : this.buttons.clear, 
                this.clearButton.setAttribute("title", this.clearButton.innerText)) : this.clearButton.appendChild(this.buttons.clear);
            }
        }, Uploader.prototype.initializeUpload = function() {
            this.element.setAttribute("tabindex", "-1");
            var inputWrapper = createElement("span", {
                className: "e-file-select"
            });
            this.element.parentElement.insertBefore(inputWrapper, this.element), this.dropAreaWrapper = createElement("div", {
                className: "e-file-select-wrap"
            }), this.element.parentElement.insertBefore(this.dropAreaWrapper, this.element), 
            inputWrapper.appendChild(this.element), this.dropAreaWrapper.appendChild(this.browseButton), 
            this.dropAreaWrapper.appendChild(inputWrapper);
            var fileDropArea = createElement("span", {
                className: "e-file-drop"
            });
            fileDropArea.innerHTML = this.localizedTexts("dropFilesHint"), this.dropAreaWrapper.appendChild(fileDropArea), 
            this.uploadWrapper = createElement("div", {
                className: "e-upload",
                attrs: {
                    "aria-activedescendant": "li-focused"
                }
            }), this.dropAreaWrapper.parentElement.insertBefore(this.uploadWrapper, this.dropAreaWrapper), 
            this.uploadWrapper.appendChild(this.dropAreaWrapper), this.setDropArea();
        }, Uploader.prototype.renderPreLoadFiles = function() {
            if (!isNullOrUndefined(this.files[0].size) && isNullOrUndefined(this.template)) {
                var files = [].slice.call(this.files), filesData = [];
                this.multiple || (this.clearData(), files = [ files[0] ]);
                for (var _i = 0, files_1 = files; _i < files_1.length; _i++) {
                    var data = files_1[_i], fileData = {
                        name: this.getFileNameOnly(data.name) + "." + data.type.split(".")[data.type.split(".").length - 1],
                        rawFile: "",
                        size: data.size,
                        status: this.localizedTexts("uploadSuccessMessage"),
                        type: data.type,
                        validationMessages: {
                            minSize: "",
                            maxSize: ""
                        },
                        statusCode: "2"
                    };
                    filesData.push(fileData), this.filesData.push(fileData);
                }
                this.createFileList(filesData), this.autoUpload || !this.listParent || this.actionButtons || this.isForm || this.renderActionButtons(), 
                this.checkActionButtonStatus();
            }
        }, Uploader.prototype.checkActionButtonStatus = function() {
            if (this.actionButtons) {
                var length_1 = this.uploadWrapper.querySelectorAll(".e-validation-fails").length + this.uploadWrapper.querySelectorAll(".e-upload-fails:not(.e-upload-progress)").length + this.uploadWrapper.querySelectorAll("span.e-upload-success").length + this.uploadWrapper.querySelectorAll("span.e-upload-progress").length;
                length_1 > 0 && length_1 === this.uploadWrapper.querySelectorAll("li").length ? this.uploadButton.setAttribute("disabled", "disabled") : this.uploadButton.removeAttribute("disabled");
            }
        }, Uploader.prototype.setDropArea = function() {
            var dropTextArea = this.dropAreaWrapper.querySelector(".e-file-drop");
            if (this.dropArea) {
                this.dropZoneElement = "string" != typeof this.dropArea ? this.dropArea : document.querySelector(this.dropArea);
                for (var element = this.element, enableDropText = !1; element.parentNode; ) (element = element.parentNode) === this.dropZoneElement && (enableDropText = !0);
                enableDropText || (dropTextArea.textContent = "");
            } else this.dropZoneElement = this.uploadWrapper, dropTextArea.textContent = this.localizedTexts("dropFilesHint");
            this.bindDropEvents();
        }, Uploader.prototype.setMultipleSelection = function() {
            if (this.multiple && !this.element.hasAttribute("multiple")) {
                var newAttr = document.createAttribute("multiple");
                this.element.setAttributeNode(newAttr);
            } else this.multiple || this.element.removeAttribute("multiple");
        }, Uploader.prototype.checkAutoUpload = function(fileData) {
            this.autoUpload ? (this.upload(fileData), this.removeActionButtons()) : this.actionButtons || this.renderActionButtons(), 
            this.checkActionButtonStatus();
        }, Uploader.prototype.wireEvents = function() {
            EventHandler.add(this.browseButton, "click", this.browseButtonClick, this), EventHandler.add(this.element, "change", this.onSelectFiles, this), 
            EventHandler.add(document, "click", this.removeFocus, this), this.keyboardModule = new KeyboardEvents(this.uploadWrapper, {
                keyAction: this.keyActionHandler.bind(this),
                keyConfigs: this.keyConfigs,
                eventName: "keydown"
            }), this.isForm && EventHandler.add(this.element.closest("form"), "reset", this.resetForm, this);
        }, Uploader.prototype.unWireEvents = function() {
            EventHandler.remove(this.browseButton, "click", this.browseButtonClick), EventHandler.remove(this.element, "change", this.onSelectFiles), 
            EventHandler.remove(document, "click", this.removeFocus), this.keyboardModule.destroy();
        }, Uploader.prototype.resetForm = function() {
            this.clearAll(), this.element.value = "";
        }, Uploader.prototype.keyActionHandler = function(e) {
            switch (e.action) {
              case "next":
                e.target === this.browseButton && isNullOrUndefined(this.listParent) ? this.browseButton.blur() : e.target === this.uploadButton ? this.uploadButton.blur() : (this.setTabFocus(e), 
                e.preventDefault(), e.stopPropagation(), e.target === this.clearButton && this.uploadButton.hasAttribute("disabled") && this.clearButton.blur());
                break;

              case "previous":
                e.target === this.browseButton ? this.browseButton.blur() : (this.setReverseFocus(e), 
                e.preventDefault(), e.stopPropagation());
                break;

              case "enter":
                e.target === this.clearButton ? this.clearButtonClick() : e.target === this.uploadButton ? this.uploadButtonClick() : e.target === this.browseButton ? this.browseButtonClick() : (this.removeFiles(e), 
                this.browseButton.focus()), e.preventDefault(), e.stopPropagation();
            }
        }, Uploader.prototype.setReverseFocus = function(e) {
            var target = e.target;
            if (target === this.uploadButton) this.uploadButton.blur(), this.clearButton.focus(); else if (target === this.clearButton && this.listParent && this.listParent.querySelector(".e-icons")) {
                this.clearButton.blur();
                var items = [].slice.call(this.listParent.querySelectorAll("span.e-icons"));
                items[items.length - 1].classList.add(ICON_FOCUSED$1), items[items.length - 1].focus();
            } else {
                var iconElements = [].slice.call(this.listParent.querySelectorAll("span.e-icons")), index = iconElements.indexOf(target);
                index > 0 ? (this.removeFocus(), iconElements[index - 1].classList.add(ICON_FOCUSED$1), 
                iconElements[index - 1].focus()) : (this.removeFocus(), this.browseButton.focus());
            }
        }, Uploader.prototype.setTabFocus = function(e) {
            var target = e.target;
            if (target === this.clearButton) {
                if (this.removeFocus(), this.uploadButton.hasAttribute("disabled")) return;
                this.uploadButton.focus();
            } else if (target.classList.contains("e-icons")) {
                var iconElements = [].slice.call(this.listParent.querySelectorAll("span.e-icons")), index = iconElements.indexOf(target);
                index < iconElements.length - 1 ? (this.removeFocus(), iconElements[index + 1].classList.add(ICON_FOCUSED$1), 
                iconElements[index + 1].focus()) : (this.removeFocus(), this.clearButton.focus());
            } else {
                this.browseButton.blur();
                var iconElement = this.listParent.querySelector("span.e-icons");
                iconElement.focus(), iconElement.classList.add(ICON_FOCUSED$1);
            }
        }, Uploader.prototype.removeFocus = function() {
            this.uploadWrapper && this.listParent && this.listParent.querySelector("." + ICON_FOCUSED$1) && (document.activeElement.blur(), 
            this.listParent.querySelector("." + ICON_FOCUSED$1).classList.remove(ICON_FOCUSED$1));
        }, Uploader.prototype.browseButtonClick = function() {
            this.element.click();
        }, Uploader.prototype.uploadButtonClick = function() {
            this.upload(this.filesData);
        }, Uploader.prototype.clearButtonClick = function() {
            this.clearAll();
        }, Uploader.prototype.bindDropEvents = function() {
            this.dropZoneElement && (EventHandler.add(this.dropZoneElement, "drop", this.dropElement, this), 
            EventHandler.add(this.dropZoneElement, "dragover", this.dragHover, this), EventHandler.add(this.dropZoneElement, "dragleave", this.onDragLeave, this));
        }, Uploader.prototype.unBindDropEvents = function() {
            this.dropZoneElement && (EventHandler.remove(this.dropZoneElement, "drop", this.dropElement), 
            EventHandler.remove(this.dropZoneElement, "dragover", this.dragHover), EventHandler.remove(this.dropZoneElement, "dragleave", this.onDragLeave));
        }, Uploader.prototype.onDragLeave = function(e) {
            this.dropZoneElement.classList.remove("e-upload-drag-hover");
        }, Uploader.prototype.dragHover = function(e) {
            this.enabled && (this.dropZoneElement.classList.add("e-upload-drag-hover"), e.preventDefault(), 
            e.stopPropagation());
        }, Uploader.prototype.dropElement = function(e) {
            this.dropZoneElement.classList.remove("e-upload-drag-hover"), this.onSelectFiles(e), 
            e.preventDefault(), e.stopPropagation();
        }, Uploader.prototype.removeFiles = function(args) {
            if (this.enabled) {
                var selectedElement = args.target.parentElement, index = this.fileList.indexOf(selectedElement), fileData = this.filesData[index];
                this.remove(fileData), this.element.value = "", this.checkActionButtonStatus();
            }
        }, Uploader.prototype.removeFilesData = function(file, customTemplate) {
            if (!customTemplate) {
                var selectedElement = this.getLiElement(file);
                if (!isNullOrUndefined(selectedElement)) {
                    detach(selectedElement);
                    var index = this.fileList.indexOf(selectedElement);
                    this.fileList.splice(index, 1), this.filesData.splice(index, 1), 0 === this.fileList.length && (detach(this.listParent), 
                    this.listParent = null, this.removeActionButtons());
                }
            }
        }, Uploader.prototype.removeUploadedFile = function(file, custom) {
            var _this = this, selectedFiles = file, ajax = new XMLHttpRequest(), formData = new FormData();
            formData.append("_datas", selectedFiles.rawFile), ajax.addEventListener("load", function(e) {
                _this.removeCompleted(e, selectedFiles, custom);
            }, !1), ajax.addEventListener("error", function(e) {
                _this.removeFailed(e, selectedFiles, custom);
            }, !1), ajax.open("POST", this.asyncSettings.removeUrl), ajax.send(formData);
        }, Uploader.prototype.removeCompleted = function(e, files, customTemplate) {
            var args = {
                e: e,
                operation: "remove",
                file: this.updateStatus(files, this.localizedTexts("removedSuccessMessage"), "2")
            };
            this.trigger("success", args), this.removeFilesData(files, customTemplate);
            var index = this.uploadedFilesData.indexOf(files);
            this.uploadedFilesData.splice(index, 1), this.trigger("change", {
                files: this.uploadedFilesData
            });
        }, Uploader.prototype.removeFailed = function(e, files, customTemplate) {
            var args = {
                e: e,
                operation: "remove",
                file: this.updateStatus(files, this.localizedTexts("removedFailedMessage"), "0")
            };
            if (!customTemplate) {
                var index = this.filesData.indexOf(files), rootElement = this.fileList[index];
                if (rootElement) {
                    var statusElement = rootElement.querySelector("." + STATUS$1);
                    rootElement.classList.remove("e-upload-success"), statusElement.classList.remove("e-upload-success"), 
                    rootElement.classList.add("e-upload-fails"), statusElement.classList.add("e-upload-fails");
                }
                this.checkActionButtonStatus();
            }
            this.trigger("failure", args);
        }, Uploader.prototype.onSelectFiles = function(args) {
            if (this.enabled) {
                var targetFiles, fileData = [];
                if ("drop" === args.type) {
                    var files = args.dataTransfer.files;
                    targetFiles = this.multiple ? this.sortFileList(files) : [ files[0] ];
                } else targetFiles = [].slice.call(args.target.files);
                this.multiple || (this.clearData(), targetFiles = [ targetFiles[0] ]);
                for (var i = 0; i < targetFiles.length; i++) {
                    var file = targetFiles[i], eventArgs_1 = {
                        name: file.name,
                        rawFile: file,
                        size: file.size,
                        status: this.localizedTexts("readyToUploadMessage"),
                        type: this.getFileType(file.name),
                        validationMessages: this.validatedFileSize(file.size),
                        statusCode: "1"
                    };
                    eventArgs_1.status = "" !== eventArgs_1.validationMessages.minSize ? this.localizedTexts("invalidMinFileSize") : "" !== eventArgs_1.validationMessages.maxSize ? this.localizedTexts("invalidMaxFileSize") : eventArgs_1.status, 
                    "" === eventArgs_1.validationMessages.minSize && "" === eventArgs_1.validationMessages.maxSize || (eventArgs_1.statusCode = "0"), 
                    fileData.push(eventArgs_1);
                }
                var eventArgs = {
                    cancel: !1,
                    filesData: fileData,
                    isModified: !1,
                    modifiedFilesData: [],
                    progressInterval: ""
                };
                if ("drop" === args.type && (fileData = this.checkExtension(fileData)), this.trigger("selected", eventArgs), 
                !eventArgs.cancel) {
                    if (eventArgs.isModified && eventArgs.modifiedFilesData.length > 0) {
                        var dataFiles = this.checkExtension(eventArgs.modifiedFilesData);
                        this.updateSortedFileList(dataFiles), this.isForm || this.checkAutoUpload(dataFiles), 
                        this.filesData = dataFiles;
                    } else this.createFileList(fileData), this.filesData = this.filesData.concat(fileData), 
                    this.isForm || this.checkAutoUpload(fileData);
                    isNullOrUndefined(eventArgs.progressInterval) || "" === eventArgs.progressInterval || (this.progressInterval = eventArgs.progressInterval);
                }
            }
        }, Uploader.prototype.clearData = function() {
            isNullOrUndefined(this.listParent) || (detach(this.listParent), this.listParent = null), 
            "msie" !== Browser.info.name && (this.element.value = ""), this.fileList = [], this.filesData = [], 
            this.removeActionButtons();
        }, Uploader.prototype.updateSortedFileList = function(filesData) {
            var previousListClone = createElement("div", {
                id: "clonewrapper"
            }), added = -1;
            if (this.listParent) {
                for (var i = 0; i < this.listParent.querySelectorAll("li").length; i++) {
                    var liElement = this.listParent.querySelectorAll("li")[i];
                    previousListClone.appendChild(liElement.cloneNode(!0));
                }
                for (var _i = 0, removedList_1 = this.listParent.querySelectorAll("li"); _i < removedList_1.length; _i++) {
                    detach(removedList_1[_i]);
                }
                this.removeActionButtons();
                var oldList = [].slice.call(previousListClone.childNodes);
                detach(this.listParent), this.listParent = null, this.fileList = [], this.createParentUL();
                for (var index = 0; index < filesData.length; index++) {
                    for (var j = 0; j < this.filesData.length; j++) this.filesData[j].name === filesData[index].name && (this.listParent.appendChild(oldList[j]), 
                    EventHandler.add(oldList[j].querySelector(".e-icons"), "click", this.removeFiles, this), 
                    this.fileList.push(oldList[j]), added = index);
                    added !== index && this.createFileList([ filesData[index] ]);
                }
            } else this.createFileList(filesData);
        }, Uploader.prototype.checkExtension = function(files) {
            var dropFiles = files;
            if ("" !== this.allowedExtensions) {
                for (var allowedExtensions = [], _i = 0, extensions_1 = this.allowedExtensions.split(","); _i < extensions_1.length; _i++) {
                    var extension = extensions_1[_i];
                    allowedExtensions.push(extension.trim().toLocaleLowerCase());
                }
                for (var i = 0; i < files.length; i++) -1 === allowedExtensions.indexOf(("." + files[i].type).toLocaleLowerCase()) && (files[i].status = this.localizedTexts("invalidFileType"), 
                files[i].statusCode = "0");
            }
            return dropFiles;
        }, Uploader.prototype.validatedFileSize = function(fileSize) {
            var minSizeError = "", maxSizeError = "";
            fileSize < this.minFileSize ? minSizeError = this.localizedTexts("invalidMinFileSize") : fileSize > this.maxFileSize ? maxSizeError = this.localizedTexts("invalidMaxFileSize") : (minSizeError = "", 
            maxSizeError = "");
            return {
                minSize: minSizeError,
                maxSize: maxSizeError
            };
        }, Uploader.prototype.createCustomfileList = function(fileData) {
            this.createParentUL();
            for (var _i = 0, fileData_1 = fileData; _i < fileData_1.length; _i++) {
                var listItem = fileData_1[_i], liElement = createElement("li", {
                    className: "e-upload-file-list",
                    attrs: {
                        "data-file-name": listItem.name
                    }
                });
                this.uploadTemplateFn = this.templateComplier(this.template);
                for (var length_2 = this.uploadTemplateFn(listItem).length, i = 0; i < length_2; i++) liElement.appendChild(this.uploadTemplateFn(listItem)[i]);
                this.listParent.appendChild(liElement), this.fileList.push(liElement);
            }
        }, Uploader.prototype.createParentUL = function() {
            isNullOrUndefined(this.listParent) && (this.listParent = createElement("ul", {
                className: "e-upload-files"
            }), this.uploadWrapper.appendChild(this.listParent), this.listParent.style.display = this.showFileList ? "block" : "none");
        }, Uploader.prototype.createFileList = function(fileData) {
            if (this.createParentUL(), "" === this.template || isNullOrUndefined(this.template)) for (var _i = 0, fileData_2 = fileData; _i < fileData_2.length; _i++) {
                var listItem = fileData_2[_i], liElement = createElement("li", {
                    className: "e-upload-file-list",
                    attrs: {
                        "data-file-name": listItem.name
                    }
                }), textContainer = createElement("span", {
                    className: "e-file-container"
                }), textElement = createElement("span", {
                    className: "e-file-name",
                    attrs: {
                        title: listItem.name
                    }
                });
                textElement.innerHTML = this.getFileNameOnly(listItem.name);
                var fileExtension = createElement("span", {
                    className: "e-file-type"
                });
                if (fileExtension.innerHTML = "." + this.getFileType(listItem.name), this.enableRtl) {
                    var rtlContainer = createElement("span", {
                        className: "e-rtl-container"
                    });
                    rtlContainer.appendChild(fileExtension), rtlContainer.appendChild(textElement), 
                    textContainer.appendChild(rtlContainer);
                } else textContainer.appendChild(textElement), textContainer.appendChild(fileExtension);
                var fileSize = createElement("span", {
                    className: "e-file-size"
                });
                fileSize.innerHTML = this.bytesToSize(listItem.size), textContainer.appendChild(fileSize);
                var statusElement = createElement("span", {
                    className: STATUS$1
                });
                textContainer.appendChild(statusElement), statusElement.innerHTML = listItem.status, 
                liElement.appendChild(textContainer);
                var iconElement = createElement("span", {
                    className: " e-icons",
                    attrs: {
                        tabindex: "-1"
                    }
                });
                "msie" === Browser.info.name && iconElement.classList.add("e-msie"), "2" !== listItem.statusCode ? iconElement.setAttribute("title", this.localizedTexts("remove")) : iconElement.setAttribute("title", this.localizedTexts("delete")), 
                liElement.appendChild(iconElement), EventHandler.add(iconElement, "click", this.removeFiles, this), 
                "2" === listItem.statusCode ? (statusElement.classList.add("e-upload-success"), 
                iconElement.classList.add("e-file-delete-btn")) : "1" !== listItem.statusCode && (statusElement.classList.remove("e-upload-success"), 
                statusElement.classList.add("e-validation-fails")), this.autoUpload && "1" === listItem.statusCode && "" !== this.asyncSettings.saveUrl && (statusElement.innerHTML = ""), 
                iconElement.classList.contains("e-file-delete-btn") || iconElement.classList.add(CLEAR_ICON$1), 
                this.listParent.appendChild(liElement), this.fileList.push(liElement), this.truncateName(textElement);
            } else this.createCustomfileList(fileData);
        }, Uploader.prototype.truncateName = function(name) {
            var text, nameElement = name;
            nameElement.offsetWidth < nameElement.scrollWidth && (text = nameElement.textContent, 
            nameElement.dataset.tail = text.slice(text.length - 10));
        }, Uploader.prototype.getFileType = function(name) {
            var extension, index = name.lastIndexOf(".");
            return index >= 0 && (extension = name.substring(index + 1)), extension || "";
        }, Uploader.prototype.getFileNameOnly = function(name) {
            var type = this.getFileType(name);
            return type = name.split("." + type)[0];
        }, Uploader.prototype.setInitialAttributes = function() {
            if (this.initialAttr.accept && this.element.setAttribute("accept", this.initialAttr.accept), 
            this.initialAttr.disabled && this.element.setAttribute("disabled", "disabled"), 
            this.initialAttr.multiple) {
                var newAttr = document.createAttribute("multiple");
                this.element.setAttributeNode(newAttr);
            }
        }, Uploader.prototype.filterfileList = function(files) {
            for (var filterFiles = [], i = 0; i < files.length; i++) this.getLiElement(files[i]).classList.contains("e-upload-success") || filterFiles.push(files[i]);
            return filterFiles;
        }, Uploader.prototype.updateStatus = function(files, status, statusCode) {
            "" === status || isNullOrUndefined(status) || "" === statusCode || isNullOrUndefined(statusCode) || (files.status = status, 
            files.statusCode = statusCode);
            var li = this.getLiElement(files);
            return isNullOrUndefined(li) || isNullOrUndefined(li.querySelector("." + STATUS$1)) || "" === status || isNullOrUndefined(status) || (li.querySelector("." + STATUS$1).textContent = status), 
            files;
        }, Uploader.prototype.getLiElement = function(files) {
            var li, liElements = [];
            if (this.uploadWrapper) {
                liElements = this.uploadWrapper.querySelectorAll(".e-upload-files> li");
                for (var i = 0; i < liElements.length; i++) liElements[i].getAttribute("data-file-name") === files.name && (li = liElements[i]);
            }
            return li;
        }, Uploader.prototype.createProgressBar = function(liElement) {
            var progressbarWrapper = createElement("span", {
                className: "e-upload-progress-wrap"
            }), progressBar = createElement("progressbar", {
                className: PROGRESSBAR$1,
                attrs: {
                    value: "0",
                    max: "100"
                }
            }), progressbarInnerWrapper = createElement("span", {
                className: "e-progress-inner-wrap"
            });
            progressBar.setAttribute("style", "width: 0%");
            var progressbarText = createElement("span", {
                className: "e-progress-bar-text"
            });
            progressbarText.textContent = "0%", progressbarInnerWrapper.appendChild(progressBar), 
            progressbarWrapper.appendChild(progressbarInnerWrapper), progressbarWrapper.appendChild(progressbarText), 
            liElement.querySelector(".e-file-container").appendChild(progressbarWrapper);
        }, Uploader.prototype.updateProgressbar = function(e, li) {
            if (!isNaN(Math.round(e.loaded / e.total * 100)) && !isNullOrUndefined(li.querySelector("." + PROGRESSBAR$1))) if (isNullOrUndefined(this.progressInterval) || "" === this.progressInterval) this.changeProgressValue(li, Math.round(e.loaded / e.total * 100).toString() + "%"); else {
                var value = Math.round(e.loaded / e.total * 100) % parseInt(this.progressInterval, 10);
                0 !== value && 100 !== value || this.changeProgressValue(li, Math.round(e.loaded / e.total * 100).toString() + "%");
            }
        }, Uploader.prototype.changeProgressValue = function(li, progressValue) {
            li.querySelector("." + PROGRESSBAR$1).setAttribute("style", "width:" + progressValue), 
            li.querySelector(".e-progress-bar-text").textContent = progressValue;
        }, Uploader.prototype.uploadInProgress = function(e, files, customUI) {
            var li = this.getLiElement(files);
            if (!isNullOrUndefined(li) || customUI && !isNullOrUndefined(customUI)) {
                isNullOrUndefined(li) || (li.querySelectorAll(".e-upload-progress-wrap").length > 0 || !li.querySelector("." + STATUS$1) || (li.querySelector("." + STATUS$1).classList.add("e-upload-progress"), 
                this.createProgressBar(li), this.updateProgressBarClasses(li, "e-upload-progress")), 
                this.updateProgressbar(e, li), isNullOrUndefined(li.querySelector(".e-icons")) || (li.querySelector(".e-icons").removeAttribute("title"), 
                EventHandler.remove(li.querySelector(".e-icons"), "click", this.removeFiles), li.querySelector(".e-icons").classList.add("e-upload-progress")));
                var args = {
                    e: e,
                    operation: "upload",
                    file: this.updateStatus(files, this.localizedTexts("inProgress"), "3")
                };
                this.trigger("progress", args);
            }
        }, Uploader.prototype.uploadComplete = function(e, files, customUI) {
            var status = e.target;
            if (4 === status.readyState && 200 === status.status) {
                var li = this.getLiElement(files);
                if (isNullOrUndefined(li) && (!customUI || isNullOrUndefined(customUI))) return;
                isNullOrUndefined(li) || (this.updateProgressBarClasses(li, "e-upload-success"), 
                this.removeProgressbar(li, "success"), isNullOrUndefined(li.querySelector("." + CLEAR_ICON$1)) || (li.querySelector("." + CLEAR_ICON$1).classList.add("e-file-delete-btn"), 
                li.querySelector("." + CLEAR_ICON$1).setAttribute("title", this.localizedTexts("delete")), 
                li.querySelector("." + CLEAR_ICON$1).classList.remove(CLEAR_ICON$1)), isNullOrUndefined(li.querySelector(".e-icons")) || (EventHandler.add(li.querySelector(".e-icons"), "click", this.removeFiles, this), 
                li.querySelector(".e-icons").classList.remove("e-upload-progress"), li.querySelector(".e-icons").setAttribute("title", this.localizedTexts("delete"))));
                var args = {
                    e: e,
                    operation: "upload",
                    file: this.updateStatus(files, this.localizedTexts("uploadSuccessMessage"), "2")
                };
                this.trigger("success", args), this.uploadedFilesData.push(files), this.trigger("change", {
                    files: this.uploadedFilesData
                }), this.checkActionButtonStatus();
            } else this.uploadFailed(e, files);
        }, Uploader.prototype.uploadFailed = function(e, files) {
            var li = this.getLiElement(files), args = {
                e: e,
                operation: "upload",
                file: this.updateStatus(files, this.localizedTexts("uploadFailedMessage"), "0")
            };
            isNullOrUndefined(li) || (this.updateProgressBarClasses(li, "e-upload-fails"), this.removeProgressbar(li, "failure"), 
            li.querySelector("." + CLEAR_ICON$1).setAttribute("title", this.localizedTexts("remove")), 
            EventHandler.add(li.querySelector(".e-icons"), "click", this.removeFiles, this), 
            li.querySelector(".e-icons").classList.remove("e-upload-progress")), this.trigger("failure", args), 
            this.checkActionButtonStatus();
        }, Uploader.prototype.updateProgressBarClasses = function(li, className) {
            var progressBar = li.querySelector("." + PROGRESSBAR$1);
            isNullOrUndefined(progressBar) || progressBar.classList.add(className);
        }, Uploader.prototype.removeProgressbar = function(li, callType) {
            var _this = this;
            isNullOrUndefined(li.querySelector(".e-upload-progress-wrap")) || (this.progressAnimation = new Animation({
                duration: 1250
            }), this.progressAnimation.animate(li.querySelector(".e-upload-progress-wrap"), {
                name: "FadeOut"
            }), this.progressAnimation.animate(li.querySelector(".e-progress-bar-text"), {
                name: "FadeOut"
            }), setTimeout(function() {
                _this.animateProgressBar(li, callType);
            }, 750));
        }, Uploader.prototype.animateProgressBar = function(li, callType) {
            "success" === callType ? (li.classList.add("e-upload-success"), isNullOrUndefined(li.querySelector("." + STATUS$1)) || (li.querySelector("." + STATUS$1).classList.remove("e-upload-progress"), 
            this.progressAnimation.animate(li.querySelector("." + STATUS$1), {
                name: "FadeIn"
            }), li.querySelector("." + STATUS$1).classList.add("e-upload-success"))) : isNullOrUndefined(li.querySelector("." + STATUS$1)) || (li.querySelector("." + STATUS$1).classList.remove("e-upload-progress"), 
            this.progressAnimation.animate(li.querySelector("." + STATUS$1), {
                name: "FadeIn"
            }), li.querySelector("." + STATUS$1).classList.add("e-upload-fails")), detach(li.querySelector(".e-upload-progress-wrap"));
        }, Uploader.prototype.setExtensions = function(extensions) {
            this.element.setAttribute("accept", extensions);
        }, Uploader.prototype.templateComplier = function(uploadTemplate) {
            if (uploadTemplate) try {
                if (document.querySelectorAll(uploadTemplate).length) return compile$$1(document.querySelector(uploadTemplate).innerHTML.trim());
            } catch (exception) {
                return compile$$1(uploadTemplate);
            }
        }, Uploader.prototype.setRTL = function() {
            this.enableRtl ? addClass([ this.uploadWrapper ], "e-rtl") : removeClass([ this.uploadWrapper ], "e-rtl");
        }, Uploader.prototype.localizedTexts = function(localeText) {
            return this.l10n.setLocale(this.locale), this.l10n.getConstant(localeText);
        }, Uploader.prototype.setControlStatus = function() {
            this.enabled ? (this.uploadWrapper.classList.contains("e-disabled") && this.uploadWrapper.classList.remove("e-disabled"), 
            !isNullOrUndefined(this.browseButton) && this.element.hasAttribute("disabled") && (this.element.removeAttribute("disabled"), 
            this.browseButton.removeAttribute("disabled")), !isNullOrUndefined(this.clearButton) && this.clearButton.hasAttribute("disabled") && this.clearButton.removeAttribute("disabled"), 
            !isNullOrUndefined(this.uploadButton) && this.uploadButton.hasAttribute("disabled") && this.uploadButton.hasAttribute("disabled")) : (this.uploadWrapper.classList.add("e-disabled"), 
            this.element.setAttribute("disabled", "disabled"), this.browseButton.setAttribute("disabled", "disabled"), 
            isNullOrUndefined(this.clearButton) || this.clearButton.setAttribute("disabled", "disabled"), 
            isNullOrUndefined(this.uploadButton) || this.uploadButton.setAttribute("disabled", "disabled"));
        }, Uploader.prototype.checkHTMLAttributes = function() {
            this.element.hasAttribute("accept") && (this.allowedExtensions = this.element.getAttribute("accept"), 
            this.initialAttr.accept = this.allowedExtensions), this.element.hasAttribute("multiple") && (this.multiple = !0, 
            this.initialAttr.multiple = !0), this.element.hasAttribute("disabled") && (this.enabled = !1, 
            this.initialAttr.disabled = !0);
        }, Uploader.prototype.bytesToSize = function(bytes) {
            var i = -1;
            if (!bytes) return "0.0 KB";
            do {
                bytes /= 1e3, i++;
            } while (bytes > 99);
            return i >= 2 && (bytes *= 1e3, i = 1), Math.max(bytes, 0).toFixed(1) + " " + [ "KB", "MB" ][i];
        }, Uploader.prototype.sortFileList = function(filesData) {
            for (var files = filesData, fileNames = [], i = 0; i < files.length; i++) fileNames.push(files[i].name);
            for (var sortedFilesData = [], _i = 0, sortedFileNames_1 = fileNames.sort(); _i < sortedFileNames_1.length; _i++) {
                var name_1 = sortedFileNames_1[_i];
                for (i = 0; i < files.length; i++) name_1 === files[i].name && sortedFilesData.push(files[i]);
            }
            return sortedFilesData;
        }, Uploader.prototype.destroy = function() {
            this.element.value = null, this.clearAll(), this.unWireEvents(), this.unBindDropEvents(), 
            this.multiple && this.element.removeAttribute("multiple"), this.enabled || this.element.removeAttribute("disabled"), 
            this.element.removeAttribute("accept"), this.setInitialAttributes(), this.uploadWrapper.parentElement.appendChild(this.cloneElement), 
            this.cloneElement.classList.remove("e-control", "e-uploader"), detach(this.uploadWrapper), 
            this.uploadWrapper = null, _super.prototype.destroy.call(this);
        }, Uploader.prototype.upload = function(files, custom) {
            var _this = this, selectedFiles = [];
            if ("" !== this.asyncSettings.saveUrl && !isNullOrUndefined(this.asyncSettings.saveUrl)) {
                if (!custom || isNullOrUndefined(custom)) if (this.multiple) selectedFiles = this.filterfileList(files); else {
                    var file = [];
                    file.push(files[0]), selectedFiles = this.filterfileList(file);
                } else selectedFiles = files;
                for (var _loop_1 = function(i) {
                    var ajax = new XMLHttpRequest(), formData = new FormData();
                    if ("1" === selectedFiles[i].statusCode) {
                        var eventArgs = {
                            fileData: selectedFiles[i],
                            customFormData: [],
                            cancel: !1
                        };
                        if (this_1.trigger("uploading", eventArgs), eventArgs.cancel) return {
                            value: void 0
                        };
                        var name_2 = this_1.element.getAttribute("name");
                        if (formData.append(name_2, selectedFiles[i].rawFile, selectedFiles[i].name), eventArgs.customFormData.length > 0) for (var i_1 = 0; i_1 < eventArgs.customFormData.length; i_1++) {
                            var customData = eventArgs.customFormData[i_1];
                            formData.append(Object.keys(customData)[0], Object.values(customData)[0]);
                        }
                        ajax.addEventListener("load", function(e) {
                            _this.uploadComplete(e, selectedFiles[i], custom);
                        }, !1), ajax.addEventListener("error", function(e) {
                            _this.uploadFailed(e, selectedFiles[i]);
                        }, !1), ajax.upload.addEventListener("progress", function(e) {
                            _this.uploadInProgress(e, selectedFiles[i], custom);
                        }, !1), ajax.open("POST", this_1.asyncSettings.saveUrl), ajax.send(formData);
                    }
                }, this_1 = this, i = 0; i < selectedFiles.length; i++) {
                    var state_1 = _loop_1(i);
                    if ("object" == typeof state_1) return state_1.value;
                }
            }
        }, Uploader.prototype.remove = function(fileData, customTemplate) {
            var removeFiles = [];
            (fileData = isNullOrUndefined(fileData) ? this.filesData : fileData) instanceof Array ? removeFiles = fileData : removeFiles.push(fileData);
            var eventArgs = {
                cancel: !1,
                filesData: removeFiles
            };
            if (this.trigger("removing", eventArgs), !eventArgs.cancel) for (var removeUrl = this.asyncSettings.removeUrl, validUrl = "" !== removeUrl && !isNullOrUndefined(removeUrl), _i = 0, removeFiles_1 = removeFiles; _i < removeFiles_1.length; _i++) {
                var files = removeFiles_1[_i];
                "2" === files.statusCode && validUrl ? this.removeUploadedFile(files, customTemplate) : this.removeFilesData(files, customTemplate);
            }
        }, Uploader.prototype.clearAll = function() {
            if (!isNullOrUndefined(this.listParent)) {
                var eventArgs = {
                    cancel: !1,
                    filesData: this.filesData
                };
                this.trigger("clearing", eventArgs), eventArgs.cancel || this.clearData();
            }
        }, Uploader.prototype.getFilesData = function() {
            return this.filesData;
        }, __decorate$36([ Complex({
            saveUrl: "",
            removeUrl: ""
        }, AsyncSettings$1) ], Uploader.prototype, "asyncSettings", void 0), __decorate$36([ Property(!1) ], Uploader.prototype, "enableRtl", void 0), 
        __decorate$36([ Property(!0) ], Uploader.prototype, "enabled", void 0), __decorate$36([ Property(null) ], Uploader.prototype, "template", void 0), 
        __decorate$36([ Property(!0) ], Uploader.prototype, "multiple", void 0), __decorate$36([ Property(!0) ], Uploader.prototype, "autoUpload", void 0), 
        __decorate$36([ Complex({}, ButtonsProps$1) ], Uploader.prototype, "buttons", void 0), 
        __decorate$36([ Property("") ], Uploader.prototype, "allowedExtensions", void 0), 
        __decorate$36([ Property(0) ], Uploader.prototype, "minFileSize", void 0), __decorate$36([ Property(3e7) ], Uploader.prototype, "maxFileSize", void 0), 
        __decorate$36([ Property(null) ], Uploader.prototype, "dropArea", void 0), __decorate$36([ Collection([ {} ], FilesProp$1) ], Uploader.prototype, "files", void 0), 
        __decorate$36([ Property(!0) ], Uploader.prototype, "showFileList", void 0), __decorate$36([ Event() ], Uploader.prototype, "selected", void 0), 
        __decorate$36([ Event() ], Uploader.prototype, "uploading", void 0), __decorate$36([ Event() ], Uploader.prototype, "success", void 0), 
        __decorate$36([ Event() ], Uploader.prototype, "failure", void 0), __decorate$36([ Event() ], Uploader.prototype, "removing", void 0), 
        __decorate$36([ Event() ], Uploader.prototype, "clearing", void 0), __decorate$36([ Event() ], Uploader.prototype, "progress", void 0), 
        __decorate$36([ Event() ], Uploader.prototype, "change", void 0), Uploader = __decorate$36([ NotifyPropertyChanges ], Uploader);
    }(Component);
    !function(Theme) {
        Theme.axisLabelFont = {
            size: "12px",
            fontWeight: "Normal",
            color: null,
            fontStyle: "Normal",
            fontFamily: "Segoe UI"
        }, Theme.axisTitleFont = {
            size: "14px",
            fontWeight: "Normal",
            color: null,
            fontStyle: "Normal",
            fontFamily: "Segoe UI"
        }, Theme.chartTitleFont = {
            size: "15px",
            fontWeight: "500",
            color: null,
            fontStyle: "Normal",
            fontFamily: "Segoe UI"
        }, Theme.crosshairLabelFont = {
            size: "13px",
            fontWeight: "Normal",
            color: null,
            fontStyle: "Normal",
            fontFamily: "Segoe UI"
        }, Theme.tooltipLabelFont = {
            size: "13px",
            fontWeight: "Normal",
            color: null,
            fontStyle: "Normal",
            fontFamily: "Segoe UI"
        }, Theme.legendLabelFont = {
            size: "13px",
            fontWeight: "Normal",
            color: null,
            fontStyle: "Normal",
            fontFamily: "Segoe UI"
        }, Theme.stripLineLabelFont = {
            size: "12px",
            fontWeight: "Regular",
            color: "#353535",
            fontStyle: "Normal",
            fontFamily: "Segoe UI"
        };
    }(Theme || (Theme = {}));
    var __extends$39 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$38 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, Connector = function(_super) {
        function Connector() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$39(Connector, _super), __decorate$38([ Property("Line") ], Connector.prototype, "type", void 0), 
        __decorate$38([ Property(null) ], Connector.prototype, "color", void 0), __decorate$38([ Property(1) ], Connector.prototype, "width", void 0), 
        __decorate$38([ Property(null) ], Connector.prototype, "length", void 0), __decorate$38([ Property("") ], Connector.prototype, "dashArray", void 0), 
        Connector;
    }(ChildProperty), Font = function(_super) {
        function Font() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$39(Font, _super), __decorate$38([ Property("16px") ], Font.prototype, "size", void 0), 
        __decorate$38([ Property("") ], Font.prototype, "color", void 0), __decorate$38([ Property("Segoe UI") ], Font.prototype, "fontFamily", void 0), 
        __decorate$38([ Property("Normal") ], Font.prototype, "fontWeight", void 0), __decorate$38([ Property("Normal") ], Font.prototype, "fontStyle", void 0), 
        __decorate$38([ Property(1) ], Font.prototype, "opacity", void 0), __decorate$38([ Property("Center") ], Font.prototype, "textAlignment", void 0), 
        __decorate$38([ Property("Trim") ], Font.prototype, "textOverflow", void 0), Font;
    }(ChildProperty), Border = function(_super) {
        function Border() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$39(Border, _super), __decorate$38([ Property("") ], Border.prototype, "color", void 0), 
        __decorate$38([ Property(1) ], Border.prototype, "width", void 0), Border;
    }(ChildProperty), ChartArea = function(_super) {
        function ChartArea() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$39(ChartArea, _super), __decorate$38([ Complex({}, Border) ], ChartArea.prototype, "border", void 0), 
        __decorate$38([ Property("transparent") ], ChartArea.prototype, "background", void 0), 
        __decorate$38([ Property(1) ], ChartArea.prototype, "opacity", void 0), ChartArea;
    }(ChildProperty), Margin = function(_super) {
        function Margin() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$39(Margin, _super), __decorate$38([ Property(10) ], Margin.prototype, "left", void 0), 
        __decorate$38([ Property(10) ], Margin.prototype, "right", void 0), __decorate$38([ Property(10) ], Margin.prototype, "top", void 0), 
        __decorate$38([ Property(10) ], Margin.prototype, "bottom", void 0), Margin;
    }(ChildProperty), Animation$1$1 = function(_super) {
        function Animation$$1() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$39(Animation$$1, _super), __decorate$38([ Property(!0) ], Animation$$1.prototype, "enable", void 0), 
        __decorate$38([ Property(1e3) ], Animation$$1.prototype, "duration", void 0), __decorate$38([ Property(0) ], Animation$$1.prototype, "delay", void 0), 
        Animation$$1;
    }(ChildProperty), Indexes = function(_super) {
        function Indexes() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$39(Indexes, _super), __decorate$38([ Property(0) ], Indexes.prototype, "series", void 0), 
        __decorate$38([ Property(0) ], Indexes.prototype, "point", void 0), Indexes;
    }(ChildProperty), CornerRadius = function(_super) {
        function CornerRadius() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$39(CornerRadius, _super), __decorate$38([ Property(0) ], CornerRadius.prototype, "topLeft", void 0), 
        __decorate$38([ Property(0) ], CornerRadius.prototype, "topRight", void 0), __decorate$38([ Property(0) ], CornerRadius.prototype, "bottomLeft", void 0), 
        __decorate$38([ Property(0) ], CornerRadius.prototype, "bottomRight", void 0), CornerRadius;
    }(ChildProperty), Index = function() {
        return function(seriesIndex, pointIndex) {
            this.series = seriesIndex, this.point = pointIndex;
        };
    }(), EmptyPointSettings = function(_super) {
        function EmptyPointSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$39(EmptyPointSettings, _super), __decorate$38([ Property(null) ], EmptyPointSettings.prototype, "fill", void 0), 
        __decorate$38([ Complex({
            color: "transparent",
            width: 0
        }, Border) ], EmptyPointSettings.prototype, "border", void 0), __decorate$38([ Property("Gap") ], EmptyPointSettings.prototype, "mode", void 0), 
        EmptyPointSettings;
    }(ChildProperty), TooltipSettings = function(_super) {
        function TooltipSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$39(TooltipSettings, _super), __decorate$38([ Property(!1) ], TooltipSettings.prototype, "enable", void 0), 
        __decorate$38([ Property(!1) ], TooltipSettings.prototype, "shared", void 0), __decorate$38([ Property(null) ], TooltipSettings.prototype, "fill", void 0), 
        __decorate$38([ Property(null) ], TooltipSettings.prototype, "header", void 0), 
        __decorate$38([ Property(.75) ], TooltipSettings.prototype, "opacity", void 0), 
        __decorate$38([ Complex(Theme.tooltipLabelFont, Font) ], TooltipSettings.prototype, "textStyle", void 0), 
        __decorate$38([ Property(null) ], TooltipSettings.prototype, "format", void 0), 
        __decorate$38([ Property(null) ], TooltipSettings.prototype, "template", void 0), 
        __decorate$38([ Property(!0) ], TooltipSettings.prototype, "enableAnimation", void 0), 
        __decorate$38([ Complex({
            color: "#cccccc",
            width: .5
        }, Border) ], TooltipSettings.prototype, "border", void 0), TooltipSettings;
    }(ChildProperty), __extends$41 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), Mean = function() {
        return function(verticalStandardMean, verticalSquareRoot, horizontalStandardMean, horizontalSquareRoot, verticalMean, horizontalMean) {
            this.verticalStandardMean = verticalStandardMean, this.horizontalStandardMean = horizontalStandardMean, 
            this.verticalSquareRoot = verticalSquareRoot, this.horizontalSquareRoot = horizontalSquareRoot, 
            this.verticalMean = verticalMean, this.horizontalMean = horizontalMean;
        };
    }(), PolarArc = function() {
        return function(startAngle, endAngle, innerRadius, radius, currentXPosition) {
            this.startAngle = startAngle, this.endAngle = endAngle, this.innerRadius = innerRadius, 
            this.radius = radius, this.currentXPosition = currentXPosition;
        };
    }(), CustomizeOption = function() {
        return function(id) {
            this.id = id;
        };
    }(), StackValues = function() {
        return function(startValue, endValue) {
            this.startValues = startValue, this.endValues = endValue;
        };
    }(), TextOption = function(_super) {
        function TextOption(id, x, y, anchor, text, transform, baseLine) {
            void 0 === transform && (transform = "");
            var _this = _super.call(this, id) || this;
            return _this.transform = "", _this.baseLine = "auto", _this.x = x, _this.y = y, 
            _this.anchor = anchor, _this.text = text, _this.transform = transform, _this.baseLine = baseLine, 
            _this;
        }
        return __extends$41(TextOption, _super), TextOption;
    }(CustomizeOption), PathOption = function(_super) {
        function PathOption(id, fill, width, color, opacity, dashArray, d) {
            var _this = _super.call(this, id) || this;
            return _this.opacity = opacity, _this.fill = fill, _this.stroke = color, _this["stroke-width"] = width, 
            _this["stroke-dasharray"] = dashArray, _this.d = d, _this;
        }
        return __extends$41(PathOption, _super), PathOption;
    }(CustomizeOption), RectOption = function(_super) {
        function RectOption(id, fill, border, opacity, rect, rx, ry, transform, dashArray) {
            var _this = _super.call(this, id, fill, border.width, border.color, opacity, dashArray) || this;
            return _this.y = rect.y, _this.x = rect.x, _this.height = rect.height, _this.width = rect.width, 
            _this.rx = rx || 0, _this.ry = ry || 0, _this.transform = transform || "", _this;
        }
        return __extends$41(RectOption, _super), RectOption;
    }(PathOption), CircleOption = function(_super) {
        function CircleOption(id, fill, border, opacity, cx, cy, r) {
            var _this = _super.call(this, id, fill, border.width, border.color, opacity) || this;
            return _this.cy = cy, _this.cx = cx, _this.r = r, _this;
        }
        return __extends$41(CircleOption, _super), CircleOption;
    }(PathOption), PolygonOption = function() {
        return function(id, points, fill) {
            this.id = id, this.points = points, this.fill = fill;
        };
    }(), Size = function() {
        return function(width, height) {
            this.width = width, this.height = height;
        };
    }(), Rect = function() {
        return function(x, y, width, height) {
            this.x = x, this.y = y, this.width = width, this.height = height;
        };
    }(), ChartLocation = function() {
        return function(x, y) {
            this.x = x, this.y = y;
        };
    }(), Thickness = function() {
        return function(left, right, top, bottom) {
            this.left = left, this.right = right, this.top = top, this.bottom = bottom;
        };
    }(), ColorValue = function() {
        return function(r, g, b) {
            this.r = r, this.g = g, this.b = b;
        };
    }(), PointData = function() {
        return function(point, series, index) {
            void 0 === index && (index = 0), this.point = point, this.series = series, this.lierIndex = index;
        };
    }(), AccPointData = function() {
        return function(point, series, index) {
            void 0 === index && (index = 0), this.point = point, this.series = series;
        };
    }(), ControlPoints = function() {
        return function(controlPoint1, controlPoint2) {
            this.controlPoint1 = controlPoint1, this.controlPoint2 = controlPoint2;
        };
    }(), __extends$40 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$39 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, AccumulationAnnotationSettings = function(_super) {
        function AccumulationAnnotationSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$40(AccumulationAnnotationSettings, _super), __decorate$39([ Property(null) ], AccumulationAnnotationSettings.prototype, "content", void 0), 
        __decorate$39([ Property("0") ], AccumulationAnnotationSettings.prototype, "x", void 0), 
        __decorate$39([ Property("0") ], AccumulationAnnotationSettings.prototype, "y", void 0), 
        __decorate$39([ Property("Pixel") ], AccumulationAnnotationSettings.prototype, "coordinateUnits", void 0), 
        __decorate$39([ Property("Chart") ], AccumulationAnnotationSettings.prototype, "region", void 0), 
        __decorate$39([ Property("Middle") ], AccumulationAnnotationSettings.prototype, "verticalAlignment", void 0), 
        __decorate$39([ Property("Center") ], AccumulationAnnotationSettings.prototype, "horizontalAlignment", void 0), 
        __decorate$39([ Property(null) ], AccumulationAnnotationSettings.prototype, "description", void 0), 
        AccumulationAnnotationSettings;
    }(ChildProperty), AccumulationDataLabelSettings = function(_super) {
        function AccumulationDataLabelSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$40(AccumulationDataLabelSettings, _super), __decorate$39([ Property(!1) ], AccumulationDataLabelSettings.prototype, "visible", void 0), 
        __decorate$39([ Property(null) ], AccumulationDataLabelSettings.prototype, "name", void 0), 
        __decorate$39([ Property("transparent") ], AccumulationDataLabelSettings.prototype, "fill", void 0), 
        __decorate$39([ Property("Inside") ], AccumulationDataLabelSettings.prototype, "position", void 0), 
        __decorate$39([ Property(5) ], AccumulationDataLabelSettings.prototype, "rx", void 0), 
        __decorate$39([ Property(5) ], AccumulationDataLabelSettings.prototype, "ry", void 0), 
        __decorate$39([ Complex({
            width: null,
            color: null
        }, Border) ], AccumulationDataLabelSettings.prototype, "border", void 0), __decorate$39([ Complex({
            size: "11px",
            color: null
        }, Font) ], AccumulationDataLabelSettings.prototype, "font", void 0), __decorate$39([ Complex({}, Connector) ], AccumulationDataLabelSettings.prototype, "connectorStyle", void 0), 
        __decorate$39([ Property(null) ], AccumulationDataLabelSettings.prototype, "template", void 0), 
        AccumulationDataLabelSettings;
    }(ChildProperty), AccPoints = function() {
        return function() {
            this.visible = !0, this.symbolLocation = null, this.region = null, this.labelRegion = null, 
            this.labelVisible = !0, this.regions = null;
        };
    }(), AccumulationSeries = function(_super) {
        function AccumulationSeries() {
            var _this = null !== _super && _super.apply(this, arguments) || this;
            return _this.points = [], _this.sumOfPoints = 0, _this.isRectSeries = !0, _this.clipRect = new Rect(0, 0, 0, 0), 
            _this;
        }
        return __extends$40(AccumulationSeries, _super), AccumulationSeries.prototype.refreshDataManager = function(accumulation) {
            var _this = this;
            if (isNullOrUndefined(this.query)) this.dataManagerSuccess({
                result: this.dataSource,
                count: this.dataSource.length
            }, accumulation); else {
                this.dataModule.getData(this.dataModule.generateQuery().requiresCount()).then(function(e) {
                    return _this.dataManagerSuccess(e, accumulation);
                });
            }
        }, AccumulationSeries.prototype.dataManagerSuccess = function(e, accumulation) {
            var argsData = {
                name: "seriesRender",
                series: this,
                data: e.result
            };
            accumulation.trigger("seriesRender", argsData), this.resultData = e.result, this.getPoints(e.result, accumulation), 
            ++accumulation.seriesCounts === accumulation.visibleSeries.length && accumulation.refreshChart();
        }, AccumulationSeries.prototype.getPoints = function(result, accumulation) {
            var length = Object.keys(result).length;
            if (this.sumOfPoints = 0, 0 === length) return null;
            this.findSumOfPoints(result), this.points = [], this.sumOfClub = 0;
            for (var point, colors = this.palettes.length ? this.palettes : getSeriesColor(accumulation.theme), clubValue = stringToNumber(this.groupTo, this.sumOfPoints), i = 0; i < length; i++) {
                (point = this.setPoints(result, i, colors)).y;
                this.isClub(point, clubValue) || (isNullOrUndefined(point.y) && (point.visible = !1), 
                this.pushPoints(point, colors));
            }
            if (this.lastGroupTo = this.groupTo, this.sumOfClub > 0) {
                var clubPoint = new AccPoints();
                clubPoint.x = "Others", clubPoint.y = this.sumOfClub, clubPoint.text = clubPoint.originalText = clubPoint.x + ": " + this.sumOfClub, 
                this.pushPoints(clubPoint, colors);
            }
        }, AccumulationSeries.prototype.pushPoints = function(point, colors) {
            point.index = this.points.length, point.color = point.color || colors[point.index % colors.length], 
            this.points.push(point);
        }, AccumulationSeries.prototype.isClub = function(point, clubValue) {
            return Math.abs(point.y) <= clubValue && !isNullOrUndefined(clubValue) && (this.sumOfClub += Math.abs(point.y), 
            !0);
        }, AccumulationSeries.prototype.findSumOfPoints = function(result) {
            for (var length = Object.keys(result).length, i = 0; i < length; i++) isNullOrUndefined(result[i][this.yName]) || (this.sumOfPoints += Math.abs(result[i][this.yName]));
        }, AccumulationSeries.prototype.setPoints = function(data, i, colors) {
            var point = new AccPoints();
            return point.x = getValue(this.xName, data[i]), point.y = getValue(this.yName, data[i]), 
            point.color = getValue(this.pointColorMapping, data[i]), point.text = point.originalText = getValue(this.dataLabel.name || "", data[i]), 
            this.setAccEmptyPoint(point, i, data, colors), point;
        }, AccumulationSeries.prototype.renderSeries = function(accumulation) {
            var seriesGroup = accumulation.renderer.createGroup({
                id: accumulation.element.id + "_Series_" + this.index
            });
            this.renderPoints(accumulation, seriesGroup);
            var datalabelGroup;
            accumulation.accumulationDataLabelModule && this.dataLabel.visible && ((datalabelGroup = accumulation.renderer.createGroup({
                id: accumulation.element.id + "_datalabel_Series_" + this.index
            })).style.visibility = this.animation.enable && accumulation.animateSeries && "Pie" === this.type ? "hidden" : "visible", 
            this.renderDataLabel(accumulation, datalabelGroup)), "Pie" === this.type && (this.findMaxBounds(this.labelBound, this.accumulationBound), 
            accumulation.pieSeriesModule.animateSeries(accumulation, this.animation, this, seriesGroup)), 
            accumulation.accumulationLegendModule && (this.labelBound.x -= accumulation.explodeDistance, 
            this.labelBound.y -= accumulation.explodeDistance, this.labelBound.height += accumulation.explodeDistance - this.labelBound.y, 
            this.labelBound.width += accumulation.explodeDistance - this.labelBound.x);
        }, AccumulationSeries.prototype.renderPoints = function(accumulation, seriesGroup) {
            for (var option, pointId = accumulation.element.id + "_Series_" + this.index + "_Point_", _i = 0, _a = this.points; _i < _a.length; _i++) {
                var point = _a[_i], argsData = {
                    cancel: !1,
                    name: "pointRender",
                    series: this,
                    point: point,
                    fill: point.color,
                    border: this.isEmpty(point) ? {
                        width: this.emptyPointSettings.border.width,
                        color: this.emptyPointSettings.border.color
                    } : {
                        width: this.border.width,
                        color: this.border.color
                    }
                };
                accumulation.trigger("pointRender", argsData), point.color = argsData.fill, point.visible && (option = new PathOption(pointId + point.index, point.color, argsData.border.width || 1, argsData.border.color || point.color, 1, "", ""), 
                accumulation[firstToLowerCase(this.type) + "SeriesModule"].renderPoint(point, this, accumulation, option), 
                seriesGroup.appendChild(accumulation.renderer.drawPath(option)));
            }
            accumulation.getSeriesElement().appendChild(seriesGroup);
        }, AccumulationSeries.prototype.renderDataLabel = function(accumulation, datalabelGroup) {
            accumulation.accumulationDataLabelModule.findAreaRect();
            for (var element = createElement("div", {
                id: accumulation.element.id + "_Series_0_DataLabelCollections"
            }), _i = 0, _a = this.points; _i < _a.length; _i++) {
                var point = _a[_i];
                point.visible && accumulation.accumulationDataLabelModule.renderDataLabel(point, this.dataLabel, datalabelGroup, this.points, this.index, element);
            }
            null !== this.dataLabel.template && element.childElementCount && getElement(accumulation.element.id + "_Secondary_Element").appendChild(element), 
            accumulation.getSeriesElement().appendChild(datalabelGroup);
        }, AccumulationSeries.prototype.findMaxBounds = function(totalbound, bound) {
            totalbound.x = bound.x < totalbound.x ? bound.x : totalbound.x, totalbound.y = bound.y < totalbound.y ? bound.y : totalbound.y, 
            totalbound.height = bound.y + bound.height > totalbound.height ? bound.y + bound.height : totalbound.height, 
            totalbound.width = bound.x + bound.width > totalbound.width ? bound.x + bound.width : totalbound.width;
        }, AccumulationSeries.prototype.setAccEmptyPoint = function(point, i, data, colors) {
            if (!isNullOrUndefined(point.y)) return null;
            switch (point.color = this.emptyPointSettings.fill || point.color, this.emptyPointSettings.mode) {
              case "Zero":
                point.y = 0, point.visible = !0;
                break;

              case "Average":
                var previous = data[i - 1] ? data[i - 1][this.yName] || 0 : 0, next = data[i + 1] ? data[i + 1][this.yName] || 0 : 0;
                point.y = (Math.abs(previous) + Math.abs(next)) / 2, this.sumOfPoints += point.y, 
                point.visible = !0;
                break;

              case "Drop":
                point.visible = !1;
            }
        }, AccumulationSeries.prototype.isEmpty = function(point) {
            return point.color === this.emptyPointSettings.fill;
        }, __decorate$39([ Property("") ], AccumulationSeries.prototype, "dataSource", void 0), 
        __decorate$39([ Property() ], AccumulationSeries.prototype, "query", void 0), __decorate$39([ Property("") ], AccumulationSeries.prototype, "xName", void 0), 
        __decorate$39([ Property("") ], AccumulationSeries.prototype, "name", void 0), __decorate$39([ Property("") ], AccumulationSeries.prototype, "yName", void 0), 
        __decorate$39([ Property(!0) ], AccumulationSeries.prototype, "visible", void 0), 
        __decorate$39([ Complex({
            color: null,
            width: 0
        }, Border) ], AccumulationSeries.prototype, "border", void 0), __decorate$39([ Complex(null, Animation$1$1) ], AccumulationSeries.prototype, "animation", void 0), 
        __decorate$39([ Property("SeriesType") ], AccumulationSeries.prototype, "legendShape", void 0), 
        __decorate$39([ Property("") ], AccumulationSeries.prototype, "pointColorMapping", void 0), 
        __decorate$39([ Property(null) ], AccumulationSeries.prototype, "selectionStyle", void 0), 
        __decorate$39([ Property(null) ], AccumulationSeries.prototype, "groupTo", void 0), 
        __decorate$39([ Complex({}, AccumulationDataLabelSettings) ], AccumulationSeries.prototype, "dataLabel", void 0), 
        __decorate$39([ Property([]) ], AccumulationSeries.prototype, "palettes", void 0), 
        __decorate$39([ Property(0) ], AccumulationSeries.prototype, "startAngle", void 0), 
        __decorate$39([ Property(360) ], AccumulationSeries.prototype, "endAngle", void 0), 
        __decorate$39([ Property("80%") ], AccumulationSeries.prototype, "radius", void 0), 
        __decorate$39([ Property("0") ], AccumulationSeries.prototype, "innerRadius", void 0), 
        __decorate$39([ Property("Pie") ], AccumulationSeries.prototype, "type", void 0), 
        __decorate$39([ Property(!0) ], AccumulationSeries.prototype, "enableTooltip", void 0), 
        __decorate$39([ Property(!1) ], AccumulationSeries.prototype, "explode", void 0), 
        __decorate$39([ Property("30%") ], AccumulationSeries.prototype, "explodeOffset", void 0), 
        __decorate$39([ Property(!1) ], AccumulationSeries.prototype, "explodeAll", void 0), 
        __decorate$39([ Property(null) ], AccumulationSeries.prototype, "explodeIndex", void 0), 
        __decorate$39([ Complex({
            mode: "Drop"
        }, EmptyPointSettings) ], AccumulationSeries.prototype, "emptyPointSettings", void 0), 
        __decorate$39([ Property(0) ], AccumulationSeries.prototype, "gapRatio", void 0), 
        __decorate$39([ Property("80%") ], AccumulationSeries.prototype, "width", void 0), 
        __decorate$39([ Property("80%") ], AccumulationSeries.prototype, "height", void 0), 
        __decorate$39([ Property("20%") ], AccumulationSeries.prototype, "neckWidth", void 0), 
        __decorate$39([ Property("20%") ], AccumulationSeries.prototype, "neckHeight", void 0), 
        __decorate$39([ Property("Linear") ], AccumulationSeries.prototype, "pyramidMode", void 0), 
        __decorate$39([ Property(1) ], AccumulationSeries.prototype, "opacity", void 0), 
        AccumulationSeries;
    }(ChildProperty), __extends$42 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$40 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, Location = function(_super) {
        function Location() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$42(Location, _super), __decorate$40([ Property(0) ], Location.prototype, "x", void 0), 
        __decorate$40([ Property(0) ], Location.prototype, "y", void 0), Location;
    }(ChildProperty), LegendSettings = function(_super) {
        function LegendSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$42(LegendSettings, _super), __decorate$40([ Property(!0) ], LegendSettings.prototype, "visible", void 0), 
        __decorate$40([ Property(null) ], LegendSettings.prototype, "height", void 0), __decorate$40([ Property(null) ], LegendSettings.prototype, "width", void 0), 
        __decorate$40([ Complex({
            x: 0,
            y: 0
        }, Location) ], LegendSettings.prototype, "location", void 0), __decorate$40([ Property("Auto") ], LegendSettings.prototype, "position", void 0), 
        __decorate$40([ Property(8) ], LegendSettings.prototype, "padding", void 0), __decorate$40([ Property("Center") ], LegendSettings.prototype, "alignment", void 0), 
        __decorate$40([ Complex(Theme.legendLabelFont, Font) ], LegendSettings.prototype, "textStyle", void 0), 
        __decorate$40([ Property(10) ], LegendSettings.prototype, "shapeHeight", void 0), 
        __decorate$40([ Property(10) ], LegendSettings.prototype, "shapeWidth", void 0), 
        __decorate$40([ Complex({}, Border) ], LegendSettings.prototype, "border", void 0), 
        __decorate$40([ Property(5) ], LegendSettings.prototype, "shapePadding", void 0), 
        __decorate$40([ Property("transparent") ], LegendSettings.prototype, "background", void 0), 
        __decorate$40([ Property(1) ], LegendSettings.prototype, "opacity", void 0), __decorate$40([ Property(!0) ], LegendSettings.prototype, "toggleVisibility", void 0), 
        __decorate$40([ Property(null) ], LegendSettings.prototype, "description", void 0), 
        __decorate$40([ Property(3) ], LegendSettings.prototype, "tabIndex", void 0), LegendSettings;
    }(ChildProperty), BaseLegend = function() {
        function BaseLegend(chart) {
            this.rowCount = 0, this.columnCount = 0, this.pageButtonSize = 8, this.pageXCollections = [], 
            this.maxColumns = 0, this.isTrimmed = !1, this.maxWidth = 0, this.currentPage = 1, 
            this.chart = chart, this.legend = chart.legendSettings, this.legendID = chart.element.id + "_chart_legend", 
            this.isChartControl = "chart" === chart.getModuleName();
        }
        return BaseLegend.prototype.calculateLegendBounds = function(rect, availableSize) {
            var legend = this.legend;
            this.getPosition(legend.position, availableSize), this.legendBounds = new Rect(rect.x, rect.y, 0, 0), 
            this.isVertical = "Left" === this.position || "Right" === this.position, this.isVertical ? (this.legendBounds.height = stringToNumber(legend.height, availableSize.height - (rect.y - this.chart.margin.top)) || rect.height, 
            this.legendBounds.width = stringToNumber(legend.width || "20%", availableSize.width)) : (this.legendBounds.width = stringToNumber(legend.width, availableSize.width) || rect.width, 
            this.legendBounds.height = stringToNumber(legend.height || "20%", availableSize.height)), 
            this.library.getLegendBounds(availableSize, this.legendBounds, legend), this.getLocation(this.position, legend.alignment, this.legendBounds, rect, availableSize);
        }, BaseLegend.prototype.getPosition = function(position, availableSize) {
            this.isChartControl ? this.position = "Auto" !== position ? position : "Bottom" : ("Auto" !== position || !this.chart.visibleSeries || "Funnel" !== this.chart.visibleSeries[0].type && "Pyramid" !== this.chart.visibleSeries[0].type || (position = "Top"), 
            this.position = "Auto" !== position ? position : availableSize.width > availableSize.height ? "Right" : "Bottom");
        }, BaseLegend.prototype.setBounds = function(computedWidth, computedHeight, legend, legendBounds) {
            computedWidth = computedWidth < legendBounds.width ? computedWidth : legendBounds.width, 
            computedHeight = computedHeight < legendBounds.height ? computedHeight : legendBounds.height, 
            legendBounds.width = legend.width ? legendBounds.width : computedWidth, legendBounds.height = legend.height ? legendBounds.height : computedHeight, 
            this.rowCount = Math.max(1, Math.ceil((legendBounds.height - legend.padding) / (this.maxItemHeight + legend.padding)));
        }, BaseLegend.prototype.getLocation = function(position, alignment, legendBounds, rect, availableSize) {
            var padding = this.legend.border.width, legendHeight = legendBounds.height + padding, legendWidth = legendBounds.width + padding, marginBottom = this.chart.margin.bottom;
            "Bottom" === position ? (legendBounds.x = this.alignLegend(legendBounds.x, availableSize.width, legendBounds.width, alignment), 
            legendBounds.y = rect.y + (rect.height - legendHeight) + padding, subtractThickness(rect, new Thickness(0, 0, 0, legendHeight))) : "Top" === position ? (legendBounds.x = this.alignLegend(legendBounds.x, availableSize.width, legendBounds.width, alignment), 
            legendBounds.y = rect.y + padding, subtractThickness(rect, new Thickness(0, 0, legendHeight, 0))) : "Right" === position ? (legendBounds.x = rect.x + (rect.width - legendBounds.width), 
            legendBounds.y = rect.y + this.alignLegend(0, availableSize.height - (rect.y + marginBottom), legendBounds.height, alignment), 
            subtractThickness(rect, new Thickness(0, legendWidth, 0, 0))) : "Left" === position ? (legendBounds.y = rect.y + this.alignLegend(0, availableSize.height - (rect.y + marginBottom), legendBounds.height, alignment), 
            subtractThickness(rect, new Thickness(legendWidth, 0, 0, 0))) : (legendBounds.x = this.legend.location.x, 
            legendBounds.y = this.legend.location.y, subtractThickness(rect, new Thickness(0, 0, 0, 0)));
        }, BaseLegend.prototype.alignLegend = function(start, size, legendSize, alignment) {
            switch (alignment) {
              case "Far":
                start = size - legendSize - start;
                break;

              case "Center":
                start = (size - legendSize) / 2;
            }
            return start;
        }, BaseLegend.prototype.renderLegend = function(chart, legend, legendBounds) {
            var firstLegend = this.findFirstLegendPosition(this.legendCollections), padding = legend.padding;
            this.maxItemHeight = Math.max(this.legendCollections[0].textSize.height, legend.shapeHeight);
            var legendGroup = chart.renderer.createGroup({
                id: this.legendID + "_g"
            }), legendTranslateGroup = this.createLegendElements(chart, legendBounds, legendGroup, legend, this.legendID);
            if (firstLegend !== this.legendCollections.length) {
                var legendSeriesGroup = void 0, start = void 0;
                start = new ChartLocation(legendBounds.x + padding + legend.shapeWidth / 2, legendBounds.y + padding + this.maxItemHeight / 2);
                var textOptions = new TextOption("", start.x, start.y, "start");
                this.totalPages = this.isChartControl ? this.totalPages : 0;
                var textPadding = legend.shapePadding + padding + legend.shapeWidth, count = 0;
                this.pageXCollections = [], this.legendCollections[firstLegend].location = start;
                for (var previousLegend = this.legendCollections[firstLegend], _i = 0, _a = this.legendCollections; _i < _a.length; _i++) {
                    var legendOption = _a[_i];
                    legendOption.render && "" !== legendOption.text && ((legendSeriesGroup = chart.renderer.createGroup({
                        id: this.legendID + this.generateId(legendOption, "_g_", count)
                    })).setAttribute("tabindex", legend.tabIndex.toString()), legendSeriesGroup.setAttribute("aria-label", legend.description || "Click to show or hide the " + legendOption.text + " series"), 
                    this.library.getRenderPoint(legendOption, start, textPadding, previousLegend, legendBounds, count, firstLegend), 
                    this.renderSymbol(legendOption, legendSeriesGroup, count), this.renderText(chart, legendOption, legendSeriesGroup, textOptions, count), 
                    legendSeriesGroup.setAttribute("style", "cursor: " + (legend.toggleVisibility || "None" !== chart.selectionMode ? "pointer" : "auto")), 
                    legendTranslateGroup.appendChild(legendSeriesGroup), previousLegend = legendOption), 
                    count++;
                }
                this.isPaging && this.renderPagingElements(chart, legendBounds, textOptions, legendGroup);
            }
            chart.svgObject.appendChild(legendGroup);
        }, BaseLegend.prototype.findFirstLegendPosition = function(legendCollection) {
            for (var count = 0, _i = 0, legendCollection_1 = legendCollection; _i < legendCollection_1.length; _i++) {
                var legend = legendCollection_1[_i];
                if (legend.render && "" !== legend.text) break;
                count++;
            }
            return count;
        }, BaseLegend.prototype.createLegendElements = function(chart, legendBounds, legendGroup, legend, id) {
            var padding = legend.padding, options = new RectOption(id + "_element", legend.background, legend.border, legend.opacity, legendBounds);
            legendGroup.appendChild(chart.renderer.drawRectangle(options));
            var legendItemsGroup = chart.renderer.createGroup({
                id: id + "_collections"
            });
            legendGroup.appendChild(legendItemsGroup), this.legendTranslateGroup = chart.renderer.createGroup({
                id: id + "_translate_g"
            }), legendItemsGroup.appendChild(this.legendTranslateGroup);
            var clippath = chart.renderer.createClipPath({
                id: id + "_clipPath"
            });
            return options.y += padding, options.id += "_clipPath_rect", options.width = !this.isChartControl && this.isVertical ? this.maxWidth - padding : legendBounds.width, 
            this.clipRect = chart.renderer.drawRectangle(options), clippath.appendChild(this.clipRect), 
            chart.svgObject.appendChild(clippath), legendItemsGroup.setAttribute("style", "clip-path:url(#" + clippath.id + ")"), 
            this.legendTranslateGroup;
        }, BaseLegend.prototype.renderSymbol = function(legendOption, group, i) {
            var symbolColor = legendOption.visible ? legendOption.fill : "#D3D3D3", shape = "SeriesType" === legendOption.shape ? legendOption.type : legendOption.shape;
            shape = "Scatter" === shape ? legendOption.markerShape : shape;
            var symbolOption = new PathOption(this.legendID + this.generateId(legendOption, "_shape_", i), symbolColor, 1, symbolColor, 1, "", "");
            group.appendChild(drawSymbol(legendOption.location, shape, new Size(this.legend.shapeWidth, this.legend.shapeHeight), "", symbolOption, "Click to show or hide the " + legendOption.text + " series")), 
            ("Line" === shape && legendOption.markerVisibility && "Image" !== legendOption.markerShape || "Doughnut" === legendOption.type) && (symbolOption.id = this.legendID + this.generateId(legendOption, "_shape_marker_", i), 
            shape = "Doughnut" === legendOption.type ? "Circle" : legendOption.markerShape, 
            symbolOption.fill = "Doughnut" === legendOption.type ? "#FFFFFF" : symbolOption.fill, 
            group.appendChild(drawSymbol(legendOption.location, shape, new Size(this.legend.shapeWidth / 2, this.legend.shapeHeight / 2), "", symbolOption, "Click to show or hide the " + legendOption.text + " series")));
        }, BaseLegend.prototype.renderText = function(chart, legendOption, group, textOptions, i) {
            var legend = chart.legendSettings;
            textOptions.id = this.legendID + this.generateId(legendOption, "_text_", i);
            var fontcolor = legendOption.visible ? legend.textStyle.color || chart.themeStyle.legendLabel : "#D3D3D3";
            textOptions.text = legendOption.text, textOptions.x = legendOption.location.x + legend.shapeWidth / 2 + legend.shapePadding, 
            textOptions.y = legendOption.location.y + this.maxItemHeight / 4;
            textElement(textOptions, legend.textStyle, fontcolor, group).setAttribute("aria-label", legend.description || "Click to show or hide the " + legendOption.text + " series");
        }, BaseLegend.prototype.renderPagingElements = function(chart, bounds, textOption, legendGroup) {
            var paginggroup = chart.renderer.createGroup({
                id: this.legendID + "_navigation"
            });
            legendGroup.appendChild(paginggroup);
            var legend = chart.legendSettings;
            this.isChartControl || !this.isVertical ? this.totalPages = Math.ceil(this.totalPages / Math.max(1, this.rowCount - 1)) : this.totalPages = Math.ceil(this.totalPages / this.maxColumns);
            var symbolOption = new PathOption(this.legendID + "_pageup", "transparent", 5, "#545454", 1, "", ""), iconSize = this.pageButtonSize;
            paginggroup.setAttribute("style", "cursor: pointer"), this.clipPathHeight = (this.rowCount - 1) * (this.maxItemHeight + legend.padding), 
            this.clipRect.setAttribute("height", this.clipPathHeight.toString());
            var x = bounds.x + iconSize / 2, y = bounds.y + this.clipPathHeight + (bounds.height - this.clipPathHeight) / 2;
            paginggroup.appendChild(drawSymbol({
                x: x,
                y: y
            }, "LeftArrow", new Size(iconSize, iconSize), "", symbolOption, "LeftArrow")), textOption.x = x + iconSize / 2 + 8;
            var size = measureText(this.totalPages + "/" + this.totalPages, legend.textStyle);
            textOption.y = y + size.height / 4, textOption.id = this.legendID + "_pagenumber", 
            textOption.text = "1/" + this.totalPages;
            var pageTextElement = textElement(textOption, legend.textStyle, legend.textStyle.color, paginggroup);
            x = textOption.x + 8 + iconSize / 2 + size.width, symbolOption.id = this.legendID + "_pagedown", 
            paginggroup.appendChild(drawSymbol({
                x: x,
                y: y
            }, "RightArrow", new Size(iconSize, iconSize), "", symbolOption, "RightArrow")), 
            paginggroup.setAttribute("transform", "translate(" + (bounds.width - (2 * (iconSize + 8) + 8 + size.width)) + ", 0)"), 
            this.translatePage(pageTextElement, this.currentPage - 1, this.currentPage);
        }, BaseLegend.prototype.translatePage = function(pagingText, page, pageNumber) {
            var size = this.clipPathHeight * page, translate = "translate(0,-" + size + ")";
            if (!this.isChartControl && this.isVertical) {
                this.maxColumns;
                translate = "translate(-" + (size = (size = this.pageXCollections[page * this.maxColumns] - this.legendBounds.x) < 0 ? 0 : size) + ",0)";
            }
            this.legendTranslateGroup.setAttribute("transform", translate), pagingText.textContent = pageNumber + "/" + this.totalPages, 
            this.currentPage = pageNumber;
        }, BaseLegend.prototype.changePage = function(event, pageUp) {
            var pageText = document.getElementById(this.legendID + "_pagenumber"), page = parseInt(pageText.textContent.split("/")[0], 10);
            pageUp && page > 1 ? this.translatePage(pageText, page - 2, page - 1) : !pageUp && page < this.totalPages && this.translatePage(pageText, page, page + 1);
        }, BaseLegend.prototype.generateId = function(option, prefix, count) {
            return this.isChartControl ? prefix + count : prefix + option.pointIndex;
        }, BaseLegend.prototype.move = function(event) {
            var _this = this, x = this.chart.mouseX, y = this.chart.mouseY;
            if (event.target.textContent.indexOf("...") > -1) {
                var targetId = event.target.id.split(this.legendID + "_text_");
                if (2 === targetId.length) {
                    var index = parseInt(targetId[1], 10), element = this.chart.element;
                    if (!isNaN(index)) if (this.chart.isTouch && removeElement$1(this.chart.element.id + "_EJ2_Legend_Tooltip"), 
                    this.isChartControl) showTooltip(this.chart.series[index].name, x, y, element.offsetWidth, element.id + "_EJ2_Legend_Tooltip", getElement(this.chart.element.id + "_Secondary_Element")); else {
                        var location_1 = this.chart.removeSvgOffset(x, y);
                        showTooltip(this.chart.visibleSeries[0].points[index].x.toString(), location_1.x + 10, location_1.y + 10, element.offsetWidth, element.id + "_EJ2_Legend_Tooltip", getElement(this.chart.element.id + "_Secondary_Element"));
                    }
                }
            } else removeElement$1(this.chart.element.id + "_EJ2_Legend_Tooltip");
            this.chart.isTouch && (clearTimeout(this.clearTooltip), this.clearTooltip = setTimeout(function() {
                removeElement$1(_this.chart.element.id + "_EJ2_Legend_Tooltip");
            }, 1e3));
        }, BaseLegend;
    }(), LegendOptions = function() {
        return function(text, fill, shape, visible, type, markerShape, markerVisibility, pointIndex, seriesIndex) {
            this.location = {
                x: 0,
                y: 0
            }, this.text = text, this.fill = fill, this.shape = shape, this.visible = visible, 
            this.type = type, this.markerVisibility = markerVisibility, this.markerShape = markerShape, 
            this.pointIndex = pointIndex, this.seriesIndex = seriesIndex;
        };
    }(), Data = function() {
        function Data(dataSource, query) {
            this.initDataManager(dataSource, query);
        }
        return Data.prototype.initDataManager = function(dataSource, query) {
            this.dataManager = dataSource instanceof DataManager ? dataSource : new DataManager(dataSource), 
            this.query = query instanceof Query ? query : new Query();
        }, Data.prototype.generateQuery = function() {
            return this.query.clone();
        }, Data.prototype.getData = function(query) {
            return this.dataManager.executeQuery(query);
        }, Data;
    }(), AccumulationBase = function() {
        function AccumulationBase(accumulation) {
            this.accumulation = accumulation;
        }
        return Object.defineProperty(AccumulationBase.prototype, "center", {
            get: function() {
                return this.pieCenter || ("Pie" === this.accumulation.visibleSeries[0].type ? this.accumulation.pieSeriesModule.center : null);
            },
            set: function(value) {
                this.pieCenter = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(AccumulationBase.prototype, "radius", {
            get: function() {
                return void 0 !== this.pieRadius ? this.pieRadius : this.accumulation.pieSeriesModule.radius;
            },
            set: function(value) {
                this.pieRadius = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(AccumulationBase.prototype, "labelRadius", {
            get: function() {
                return void 0 !== this.pieLabelRadius ? this.pieLabelRadius : this.accumulation.pieSeriesModule.labelRadius;
            },
            set: function(value) {
                this.pieLabelRadius = value;
            },
            enumerable: !0,
            configurable: !0
        }), AccumulationBase.prototype.isCircular = function() {
            return "Pie" === this.accumulation.type;
        }, AccumulationBase.prototype.processExplode = function(event) {
            if (event.target.id.indexOf("_Series_") > -1 || event.target.id.indexOf("_datalabel_") > -1) {
                var pointIndex = indexFinder(event.target.id).point;
                if (isNaN(pointIndex) || event.target.id.indexOf("_datalabel_") > -1 && "Outside" === this.accumulation.visibleSeries[0].points[pointIndex].labelPosition) return null;
                this.explodePoints(pointIndex, this.accumulation), this.deExplodeAll(pointIndex);
            }
        }, AccumulationBase.prototype.invokeExplode = function() {
            if (this.accumulation.visibleSeries[0].explodeAll) for (var _i = 0, _a = this.accumulation.visibleSeries[0].points; _i < _a.length; _i++) {
                var point = _a[_i];
                this.explodePoints(point.index, this.accumulation);
            } else isNullOrUndefined(this.accumulation.visibleSeries[0].explodeIndex) || this.explodePoints(this.accumulation.visibleSeries[0].explodeIndex, this.accumulation);
            if (this.accumulation.accumulationSelectionModule && "None" !== this.accumulation.selectionMode && this.accumulation.accumulationSelectionModule.selectedDataIndexes.length) for (var _b = 0, _c = this.accumulation.accumulationSelectionModule.selectedDataIndexes; _b < _c.length; _b++) {
                var index = _c[_b];
                this.explodePoints(index.point, this.accumulation, !0), this.deExplodeAll(index.point);
            }
        }, AccumulationBase.prototype.deExplodeAll = function(index) {
            for (var pointId = this.accumulation.element.id + "_Series_0_Point_", _i = 0, points_1 = this.accumulation.visibleSeries[0].points; _i < points_1.length; _i++) {
                var currentPoint = points_1[_i];
                index !== currentPoint.index && this.deExplodeSlice(currentPoint.index, pointId, this.center);
            }
        }, AccumulationBase.prototype.explodePoints = function(index, chart, explode) {
            void 0 === explode && (explode = !1);
            var translate, pointId = this.accumulation.element.id + "_Series_0_Point_", point = (this.accumulation.visibleSeries[0].points, 
            pointByIndex(index, this.accumulation.visibleSeries[0].points));
            if (isNullOrUndefined(point)) return null;
            translate = this.isCircular() ? degreeToLocation(point.midAngle, chart.explodeDistance, this.center) : {
                x: chart.explodeDistance,
                y: 0
            }, this.isExplode(pointId + index) || explode ? this.explodeSlice(index, translate, pointId, this.center || {
                x: 0,
                y: 0
            }) : this.deExplodeSlice(index, pointId, this.center);
        }, AccumulationBase.prototype.isExplode = function(id) {
            var element = getElement(id);
            return !(!element || "translate(0, 0)" !== element.getAttribute("transform") && null !== element.getAttribute("transform") && "translate(0)" !== element.getAttribute("transform"));
        }, AccumulationBase.prototype.deExplodeSlice = function(index, sliceId, center) {
            this.setTranslate(index, sliceId, "translate(0, 0)");
        }, AccumulationBase.prototype.setTranslate = function(index, sliceId, position) {
            this.setElementTransform(sliceId + index, position), this.accumulation.visibleSeries[0].dataLabel.visible && (sliceId = this.accumulation.element.id + "_datalabel_Series_0_", 
            this.setElementTransform(sliceId + "shape_" + index, position), this.setElementTransform(sliceId + "text_" + index, position), 
            this.setElementTransform(sliceId + "connector_" + index, position));
        }, AccumulationBase.prototype.setElementTransform = function(id, position) {
            var element = getElement(id);
            element && element.setAttribute("transform", position);
        }, AccumulationBase.prototype.explodeSlice = function(index, translate, sliceId, center) {
            var position = "translate(" + (translate.x - center.x) + ", " + (translate.y - center.y) + ")";
            this.setTranslate(index, sliceId, position);
        }, AccumulationBase;
    }(), __extends$44 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), PieBase = function(_super) {
        function PieBase() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$44(PieBase, _super), PieBase.prototype.initProperties = function(chart, series) {
            this.accumulation = chart;
            var size = Math.min(chart.initialClipRect.width, chart.initialClipRect.height);
            this.initAngles(series), this.radius = stringToNumber(series.radius, size / 2), 
            this.innerRadius = stringToNumber(series.innerRadius, this.radius), this.labelRadius = "Inside" === series.dataLabel.position ? (this.radius - this.innerRadius) / 2 + this.innerRadius : this.radius + stringToNumber(series.dataLabel.connectorStyle.length || "4%", size / 2), 
            chart.explodeDistance = series.explode ? stringToNumber(series.explodeOffset, this.radius) : 0, 
            this.findCenter(chart, series), this.defaultLabelBound(series, series.dataLabel.visible, series.dataLabel.position), 
            this.totalAngle -= .001;
        }, PieBase.prototype.findCenter = function(accumulation, series) {
            this.accumulation = accumulation, this.center = {
                x: stringToNumber("50%", accumulation.initialClipRect.width) + accumulation.initialClipRect.x,
                y: stringToNumber("50%", accumulation.initialClipRect.height) + accumulation.initialClipRect.y
            };
            var accumulationRect = this.getSeriesBound(series), accumulationRectCenter = new ChartLocation(accumulationRect.x + accumulationRect.width / 2, accumulationRect.y + accumulationRect.height / 2);
            this.center.x += this.center.x - accumulationRectCenter.x, this.center.y += this.center.y - accumulationRectCenter.y, 
            this.accumulation.center = this.center;
        }, PieBase.prototype.initAngles = function(series) {
            this.totalAngle = (series.endAngle - series.startAngle) % 360, this.startAngle = series.startAngle - 90, 
            this.totalAngle = this.totalAngle <= 0 ? 360 + this.totalAngle : this.totalAngle, 
            this.startAngle = (this.startAngle < 0 ? this.startAngle + 360 : this.startAngle) % 360;
        }, PieBase.prototype.defaultLabelBound = function(series, visible, position) {
            var accumulationBound = this.getSeriesBound(series);
            series.accumulationBound = accumulationBound, series.labelBound = new Rect(accumulationBound.x, accumulationBound.y, accumulationBound.width + accumulationBound.x, accumulationBound.height + accumulationBound.y), 
            visible && "Outside" === position && (series.labelBound = new Rect(1 / 0, 1 / 0, -1 / 0, -1 / 0));
        }, PieBase.prototype.getSeriesBound = function(series) {
            var rect = new Rect(1 / 0, 1 / 0, -1 / 0, -1 / 0);
            this.initAngles(series);
            var start = this.startAngle, total = this.totalAngle, end = (this.startAngle + total) % 360;
            end = 0 === end ? 360 : end, series.findMaxBounds(rect, this.getRectFromAngle(start)), 
            series.findMaxBounds(rect, this.getRectFromAngle(end)), series.findMaxBounds(rect, new Rect(this.center.x, this.center.y, 0, 0));
            var nextQuandrant = (90 * Math.floor(start / 90) + 90) % 360, lastQuadrant = 90 * Math.floor(end / 90) % 360;
            lastQuadrant = 0 === lastQuadrant ? 360 : lastQuadrant, (total >= 90 || lastQuadrant === nextQuandrant) && (series.findMaxBounds(rect, this.getRectFromAngle(nextQuandrant)), 
            series.findMaxBounds(rect, this.getRectFromAngle(lastQuadrant))), (0 === start || start + total >= 360) && series.findMaxBounds(rect, this.getRectFromAngle(0));
            for (var length = nextQuandrant === lastQuadrant ? 0 : Math.floor(total / 90), i = 1; i < length; i++) ((nextQuandrant += 90) < lastQuadrant || end < start || 360 === total) && series.findMaxBounds(rect, this.getRectFromAngle(nextQuandrant));
            return rect.width -= rect.x, rect.height -= rect.y, rect;
        }, PieBase.prototype.getRectFromAngle = function(angle) {
            var location = degreeToLocation(angle, this.radius, this.center);
            return new Rect(location.x, location.y, 0, 0);
        }, PieBase.prototype.getPathArc = function(center, start, end, radius, innerRadius) {
            var degree = end - start, flag = (degree = degree < 0 ? degree + 360 : degree) < 180 ? 0 : 1;
            return innerRadius || 0 !== innerRadius ? this.getDoughnutPath(center, degreeToLocation(start, radius, center), degreeToLocation(end, radius, center), radius, degreeToLocation(start, innerRadius, center), degreeToLocation(end, innerRadius, center), innerRadius, flag) : this.getPiePath(center, degreeToLocation(start, radius, center), degreeToLocation(end, radius, center), radius, flag);
        }, PieBase.prototype.getPiePath = function(center, start, end, radius, clockWise) {
            return "M " + center.x + " " + center.y + " L " + start.x + " " + start.y + " A " + radius + " " + radius + " 0 " + clockWise + " 1 " + end.x + " " + end.y + " Z";
        }, PieBase.prototype.getDoughnutPath = function(center, start, end, radius, innerStart, innerEnd, innerRadius, clockWise) {
            return "M " + start.x + " " + start.y + " A " + radius + " " + radius + " 0 " + clockWise + " 1 " + end.x + " " + end.y + " L " + innerEnd.x + " " + innerEnd.y + " A " + innerRadius + " " + innerRadius + " 0 " + clockWise + ",0 " + innerStart.x + " " + innerStart.y + " Z";
        }, PieBase.prototype.doAnimation = function(slice, series) {
            var value, _this = this, startAngle = series.startAngle - 85, radius = .75 * Math.max(this.accumulation.availableSize.height, this.accumulation.availableSize.width);
            radius += .414 * radius;
            var effect = getAnimationFunction("Linear");
            new Animation({}).animate(slice, {
                duration: series.animation.duration,
                delay: series.animation.delay,
                progress: function(args) {
                    value = effect(args.timeStamp, startAngle, _this.totalAngle, args.duration), slice.setAttribute("d", _this.getPathArc(_this.center, startAngle, value, radius, 0));
                },
                end: function(args) {
                    slice.setAttribute("d", _this.getPathArc(_this.center, 0, 359.99999, radius, 0)), 
                    _this.accumulation.trigger("animationComplete", {
                        series: series,
                        accumulation: _this.accumulation
                    });
                    getElement(_this.accumulation.element.id + "_datalabel_Series_" + series.index).style.visibility = _this.accumulation.isDestroyed ? "hidden" : "visible";
                }
            });
        }, PieBase;
    }(AccumulationBase), __extends$43 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), PieSeries = function(_super) {
        function PieSeries() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$43(PieSeries, _super), PieSeries.prototype.renderPoint = function(point, series, chart, option) {
            var sum$$1 = series.sumOfPoints, degree = Math.abs(point.y) / sum$$1 * this.totalAngle;
            return option.d = this.getPathOption(point, degree), point.midAngle = (this.startAngle - degree / 2) % 360, 
            point.endAngle = this.startAngle % 360, point.symbolLocation = degreeToLocation(point.midAngle, (this.radius + this.innerRadius) / 2, this.center), 
            option;
        }, PieSeries.prototype.getPathOption = function(point, degree) {
            var path = this.getPathArc(this.center, this.startAngle % 360, (this.startAngle + degree) % 360, this.radius, this.innerRadius);
            return this.startAngle += degree, path;
        }, PieSeries.prototype.animateSeries = function(accumulation, option, series, slice) {
            var groupId = accumulation.element.id + "SeriesGroup" + series.index;
            if (series.animation.enable && accumulation.animateSeries) {
                var clippath = accumulation.renderer.createClipPath({
                    id: groupId + "_clipPath"
                }), path = new PathOption(groupId + "_slice", "transparent", 1, "transparent", 1, "", ""), clipslice = accumulation.renderer.drawPath(path);
                clippath.appendChild(clipslice), accumulation.svgObject.appendChild(clippath), slice.setAttribute("style", "clip-path:url(#" + clippath.id + ")"), 
                this.doAnimation(clipslice, series);
            }
        }, PieSeries.prototype.getModuleName = function() {
            return "PieSeries";
        }, PieSeries.prototype.destroy = function(accumulation) {}, PieSeries;
    }(PieBase), Encoding = function() {
        function Encoding(includeBom) {
            this.emitBOM = !0, this.encodingType = "Ansi", this.initBOM(includeBom);
        }
        return Object.defineProperty(Encoding.prototype, "includeBom", {
            get: function() {
                return this.emitBOM;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(Encoding.prototype, "type", {
            get: function() {
                return this.encodingType;
            },
            set: function(value) {
                this.encodingType = value;
            },
            enumerable: !0,
            configurable: !0
        }), Encoding.prototype.initBOM = function(includeBom) {
            this.emitBOM = void 0 === includeBom || null === includeBom || includeBom;
        }, Encoding.prototype.getByteCount = function(chars) {
            if (validateNullOrUndefined(chars, "string"), "" === chars) {
                return this.utf8Len(chars.charCodeAt(0));
            }
            return null !== this.type && void 0 !== this.type || (this.type = "Ansi"), this.getByteCountInternal(chars, 0, chars.length);
        }, Encoding.prototype.utf8Len = function(codePoint) {
            return codePoint <= 127 ? 1 : codePoint <= 2047 ? 2 : codePoint <= 65535 ? 3 : codePoint <= 2097151 ? 4 : 0;
        }, Encoding.prototype.isHighSurrogate = function(codeUnit) {
            return codeUnit >= 55296 && codeUnit <= 56319;
        }, Encoding.prototype.toCodepoint = function(highCodeUnit, lowCodeUnit) {
            return ((highCodeUnit = (1023 & highCodeUnit) << 10) | 1023 & lowCodeUnit) + 65536;
        }, Encoding.prototype.getByteCountInternal = function(chars, charIndex, charCount) {
            var byteCount = 0;
            if ("Utf8" === this.encodingType || "Unicode" === this.encodingType) {
                for (var isUtf8 = "Utf8" === this.encodingType, i = 0; i < charCount; i++) {
                    var charCode = chars.charCodeAt(isUtf8 ? charIndex : charIndex++);
                    if (this.isHighSurrogate(charCode)) if (isUtf8) {
                        var high = charCode, low = chars.charCodeAt(++charIndex);
                        byteCount += this.utf8Len(this.toCodepoint(high, low));
                    } else byteCount += 4, ++i; else byteCount += isUtf8 ? this.utf8Len(charCode) : 2;
                    isUtf8 && charIndex++;
                }
                return byteCount;
            }
            return byteCount = charCount;
        }, Encoding.prototype.getBytes = function(s, charIndex, charCount) {
            if (validateNullOrUndefined(s, "string"), validateNullOrUndefined(charIndex, "charIndex"), 
            validateNullOrUndefined(charCount, "charCount"), charIndex < 0 || charCount < 0) throw new RangeError("Argument Out Of Range Exception: charIndex or charCount is less than zero");
            if (s.length - charIndex < charCount) throw new RangeError("Argument Out Of Range Exception: charIndex and charCount do not denote a valid range in string");
            if ("" === s) return new ArrayBuffer(0);
            null !== this.type && void 0 !== this.type || (this.type = "Ansi");
            var byteCount = this.getByteCountInternal(s, charIndex, charCount);
            switch (this.type) {
              case "Utf8":
                return this.getBytesOfUtf8Encoding(byteCount, s, charIndex, charCount);

              case "Unicode":
                return this.getBytesOfUnicodeEncoding(byteCount, s, charIndex, charCount);

              default:
                return this.getBytesOfAnsiEncoding(byteCount, s, charIndex, charCount);
            }
        }, Encoding.prototype.getString = function(bytes, index, count) {
            if (validateNullOrUndefined(bytes, "bytes"), validateNullOrUndefined(index, "index"), 
            validateNullOrUndefined(count, "count"), index < 0 || count < 0) throw new RangeError("Argument Out Of Range Exception: index or count is less than zero");
            if (bytes.byteLength - index < count) throw new RangeError("Argument Out Of Range Exception: index and count do not denote a valid range in bytes");
            if (0 === bytes.byteLength || 0 === count) return "";
            null !== this.type && void 0 !== this.type || (this.type = "Ansi");
            var out = "", byteCal = new Uint8Array(bytes);
            switch (this.type) {
              case "Utf8":
                return this.getStringOfUtf8Encoding(byteCal, index, count);

              case "Unicode":
                var byteUnicode = new Uint16Array(bytes);
                return out = this.getStringofUnicodeEncoding(byteUnicode, index, count);

              default:
                for (var j = index, i = 0; i < count; i++) {
                    var c = byteCal[j];
                    out += String.fromCharCode(c), j++;
                }
                return out;
            }
        }, Encoding.prototype.getBytesOfAnsiEncoding = function(byteCount, s, charIndex, charCount) {
            for (var bytes = new ArrayBuffer(byteCount), bufview = new Uint8Array(bytes), k = 0, i = 0; i < charCount; i++) {
                var charcode = s.charCodeAt(charIndex++);
                bufview[k] = charcode < 2048 ? charcode : 63, k++;
            }
            return bytes;
        }, Encoding.prototype.getBytesOfUtf8Encoding = function(byteCount, s, charIndex, charCount) {
            for (var bytes = new ArrayBuffer(byteCount), uint = new Uint8Array(bytes), index = charIndex, j = 0, i = 0; i < charCount; i++) {
                var charcode = s.charCodeAt(index);
                charcode <= 127 ? uint[j] = charcode : charcode < 2048 ? (uint[j] = 192 | charcode >> 6, 
                uint[++j] = 128 | 63 & charcode) : charcode < 55296 || charcode >= 57344 ? (uint[j] = 224 | charcode >> 12, 
                uint[++j] = 128 | charcode >> 6 & 63, uint[++j] = 128 | 63 & charcode) : (uint[j] = 239, 
                uint[++j] = 191, uint[++j] = 189), ++j, ++index;
            }
            return bytes;
        }, Encoding.prototype.getBytesOfUnicodeEncoding = function(byteCount, s, charIndex, charCount) {
            for (var bytes = new ArrayBuffer(byteCount), uint16 = new Uint16Array(bytes), i = 0; i < charCount; i++) {
                var charcode = s.charCodeAt(i);
                uint16[i] = charcode;
            }
            return bytes;
        }, Encoding.prototype.getStringOfUtf8Encoding = function(byteCal, index, count) {
            for (var j = 0, i = index, s = ""; j < count; j++) {
                for (var c = byteCal[i++]; i > byteCal.length; ) return s;
                c > 127 && (c > 191 && c < 224 && i < count ? c = (31 & c) << 6 | 63 & byteCal[i] : c > 223 && c < 240 && i < byteCal.byteLength ? c = (15 & c) << 12 | (63 & byteCal[i]) << 6 | 63 & byteCal[++i] : c > 239 && c < 248 && i < byteCal.byteLength && (c = (7 & c) << 18 | (63 & byteCal[i]) << 12 | (63 & byteCal[++i]) << 6 | 63 & byteCal[++i]), 
                ++i), s += String.fromCharCode(c);
            }
            return s;
        }, Encoding.prototype.getStringofUnicodeEncoding = function(byteUni, index, count) {
            if (count > byteUni.length) throw new RangeError("ArgumentOutOfRange_Count");
            for (var byte16 = new Uint16Array(count), i = 0; i < count && i < byteUni.length; i++) byte16[i] = byteUni[index++];
            return String.fromCharCode.apply(null, byte16);
        }, Encoding.prototype.destroy = function() {
            this.emitBOM = void 0, this.encodingType = void 0;
        }, Encoding;
    }(), Save = function() {
        function Save() {}
        return Save.save = function(fileName, buffer) {
            if (null === fileName || void 0 === fileName || "" === fileName) throw new Error("ArgumentException: fileName cannot be undefined, null or empty");
            var extension = fileName.substring(fileName.lastIndexOf(".") + 1, fileName.length), mimeType = this.getMimeType(extension);
            if ("" !== mimeType && (buffer = new Blob([ buffer ], {
                type: mimeType
            })), this.isMicrosoftBrowser) navigator.msSaveBlob(buffer, fileName); else {
                var downloadLink = document.createElementNS("http://www.w3.org/1999/xhtml", "a");
                this.saveInternal(fileName, extension, buffer, downloadLink, "download" in downloadLink);
            }
        }, Save.saveInternal = function(fileName, extension, buffer, downloadLink, hasDownloadAttribute) {
            if (hasDownloadAttribute) {
                downloadLink.download = fileName;
                var dataUrl_1 = window.URL.createObjectURL(buffer);
                downloadLink.href = dataUrl_1;
                var event_1 = document.createEvent("MouseEvent");
                event_1.initEvent("click", !0, !0), downloadLink.dispatchEvent(event_1), setTimeout(function() {
                    window.URL.revokeObjectURL(dataUrl_1), dataUrl_1 = void 0;
                });
            } else if ("docx" !== extension && "xlsx" !== extension) {
                var url = window.URL.createObjectURL(buffer);
                window.open(url, "_blank") || (window.location.href = url);
            } else {
                var reader_1 = new FileReader();
                reader_1.onloadend = function() {
                    window.open(reader_1.result, "_blank") || (window.location.href = reader_1.result);
                }, reader_1.readAsDataURL(buffer);
            }
        }, Save.getMimeType = function(extension) {
            var mimeType = "";
            switch (extension) {
              case "html":
                mimeType = "text/html";
                break;

              case "pdf":
                mimeType = "application/pdf";
                break;

              case "docx":
                mimeType = "application/vnd.openxmlformats-officedocument.wordprocessingml.document";
                break;

              case "xlsx":
                mimeType = "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet";
                break;

              case "txt":
                mimeType = "text/plain";
            }
            return mimeType;
        }, Save;
    }(), StreamWriter = function() {
        function StreamWriter(encoding) {
            this.bufferBlob = new Blob([ "" ]), this.bufferText = "", this.init(encoding), Save.isMicrosoftBrowser = !!navigator.msSaveBlob;
        }
        return Object.defineProperty(StreamWriter.prototype, "buffer", {
            get: function() {
                return this.flush(), this.bufferBlob;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(StreamWriter.prototype, "encoding", {
            get: function() {
                return this.enc;
            },
            enumerable: !0,
            configurable: !0
        }), StreamWriter.prototype.init = function(encoding) {
            null === encoding || void 0 === encoding ? (this.enc = new Encoding(!1), this.enc.type = "Utf8") : (this.enc = encoding, 
            this.setBomByte());
        }, StreamWriter.prototype.setBomByte = function() {
            if (this.encoding.includeBom) switch (this.encoding.type) {
              case "Unicode":
                var arrayUnicode = new ArrayBuffer(2), uint8 = new Uint8Array(arrayUnicode);
                uint8[0] = 255, uint8[1] = 254, this.bufferBlob = new Blob([ arrayUnicode ]);
                break;

              case "Utf8":
                var arrayUtf8 = new ArrayBuffer(3), utf8 = new Uint8Array(arrayUtf8);
                utf8[0] = 239, utf8[1] = 187, utf8[2] = 191, this.bufferBlob = new Blob([ arrayUtf8 ]);
                break;

              default:
                this.bufferBlob = new Blob([ "" ]);
            }
        }, StreamWriter.prototype.save = function(fileName) {
            "" !== this.bufferText && this.flush(), Save.save(fileName, this.buffer);
        }, StreamWriter.prototype.write = function(value) {
            if (void 0 === this.encoding) throw new Error("Object Disposed Exception: current writer is disposed");
            validateNullOrUndefined(value, "string"), this.bufferText += value, this.bufferText.length >= 10240 && this.flush();
        }, StreamWriter.prototype.flush = function() {
            if (void 0 !== this.bufferText && null !== this.bufferText && 0 !== this.bufferText.length) {
                var bufferArray = this.encoding.getBytes(this.bufferText, 0, this.bufferText.length);
                this.bufferText = "", this.bufferBlob = new Blob([ this.bufferBlob, bufferArray ]);
            }
        }, StreamWriter.prototype.writeLine = function(value) {
            if (void 0 === this.encoding) throw new Error("Object Disposed Exception: current writer is disposed");
            validateNullOrUndefined(value, "string"), this.bufferText = this.bufferText + value + "\r\n", 
            this.bufferText.length >= 10240 && this.flush();
        }, StreamWriter.prototype.destroy = function() {
            this.bufferBlob = void 0, this.bufferText = void 0, this.enc instanceof Encoding && this.enc.destroy(), 
            this.enc = void 0;
        }, StreamWriter;
    }(), _fileutils = Object.freeze({
        StreamWriter: StreamWriter,
        Encoding: Encoding,
        validateNullOrUndefined: validateNullOrUndefined,
        Save: Save
    }), arrLiteralCodes = new Int16Array(286), arrLiteralLengths = new Uint8Array(286), arrDistanceCodes = new Int16Array(30), arrDistanceLengths = new Uint8Array(30), CompressedStreamWriter = function() {
        function CompressedStreamWriter(noWrap) {
            this.pendingBuffer = new Uint8Array(65536), this.pendingBufLength = 0, this.pendingBufCache = 0, 
            this.pendingBufBitsInCache = 0, this.bufferPosition = 0, this.extraBits = 0, this.currentHash = 0, 
            this.matchStart = 0, this.matchLength = 0, this.matchPrevAvail = !1, this.blockStart = 0, 
            this.stringStart = 0, this.lookAhead = 0, this.totalBytesIn = 0, this.inputOffset = 0, 
            this.inputEnd = 0, this.windowSize = 32768, this.windowMask = this.windowSize - 1, 
            this.hashSize = 32768, this.hashMask = this.hashSize - 1, this.hashShift = Math.floor(17 / 3), 
            this.maxDist = this.windowSize - 262, this.checkSum = 1, this.noWrap = !1, this.treeLiteral = new CompressorHuffmanTree(this, 286, 257, 15), 
            this.treeDistances = new CompressorHuffmanTree(this, 30, 1, 15), this.treeCodeLengths = new CompressorHuffmanTree(this, 19, 4, 7), 
            this.arrDistances = new Uint16Array(16384), this.arrLiterals = new Uint8Array(16384), 
            this.stream = [], this.dataWindow = new Uint8Array(2 * this.windowSize), this.hashHead = new Int16Array(this.hashSize), 
            this.hashPrevious = new Int16Array(this.windowSize), this.blockStart = this.stringStart = 1, 
            this.noWrap = noWrap, noWrap || this.writeZLibHeader();
        }
        return Object.defineProperty(CompressedStreamWriter.prototype, "compressedData", {
            get: function() {
                return this.stream;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(CompressedStreamWriter.prototype, "getCompressedString", {
            get: function() {
                var compressedString = "";
                if (void 0 !== this.stream) for (var i = 0; i < this.stream.length; i++) compressedString += String.fromCharCode.apply(null, this.stream[i]);
                return compressedString;
            },
            enumerable: !0,
            configurable: !0
        }), CompressedStreamWriter.prototype.write = function(data, offset, length) {
            if (void 0 === data || null === data) throw new Error("ArgumentException: data cannot null or undefined");
            var end = offset + length;
            if (0 > offset || offset > end || end > data.length) throw new Error("ArgumentOutOfRangeException: Offset or length is incorrect");
            if ("string" == typeof data) {
                var encode = new Encoding(!1);
                encode.type = "Utf8", end = offset + (data = new Uint8Array(encode.getBytes(data, 0, data.length))).length;
            }
            for (this.inputBuffer = data, this.inputOffset = offset, this.inputEnd = end, this.noWrap || (this.checkSum = ChecksumCalculator.checksumUpdate(this.checkSum, this.inputBuffer, this.inputOffset, end)); this.inputEnd !== this.inputOffset || 0 !== this.pendingBufLength; ) this.pendingBufferFlush(), 
            this.compressData(!1);
        }, CompressedStreamWriter.prototype.writeZLibHeader = function() {
            var headerDate = 30720;
            headerDate |= 64, headerDate += 31 - headerDate % 31, this.pendingBufferWriteShortBytes(headerDate);
        }, CompressedStreamWriter.prototype.pendingBufferWriteShortBytes = function(s) {
            this.pendingBuffer[this.pendingBufLength++] = s >> 8, this.pendingBuffer[this.pendingBufLength++] = s;
        }, CompressedStreamWriter.prototype.compressData = function(finish) {
            var success;
            do {
                this.fillWindow();
                var canFlush = finish && this.inputEnd === this.inputOffset;
                success = this.compressSlow(canFlush, finish);
            } while (0 === this.pendingBufLength && success);
            return success;
        }, CompressedStreamWriter.prototype.compressSlow = function(flush, finish) {
            if (this.lookAhead < 262 && !flush) return !1;
            for (;this.lookAhead >= 262 || flush; ) {
                if (0 === this.lookAhead) return this.lookAheadCompleted(finish);
                this.stringStart >= 2 * this.windowSize - 262 && this.slideWindow();
                var prevMatch = this.matchStart, prevLen = this.matchLength;
                if (this.lookAhead >= 3 && this.discardMatch(), prevLen >= 3 && this.matchLength <= prevLen ? prevLen = this.matchPreviousBest(prevMatch, prevLen) : this.matchPreviousAvailable(), 
                this.bufferPosition >= 16384) return this.huffmanIsFull(finish);
            }
            return !0;
        }, CompressedStreamWriter.prototype.discardMatch = function() {
            var hashHead = this.insertString();
            0 !== hashHead && this.stringStart - hashHead <= this.maxDist && this.findLongestMatch(hashHead) && this.matchLength <= 5 && 3 === this.matchLength && this.stringStart - this.matchStart > 4096 && (this.matchLength = 2);
        }, CompressedStreamWriter.prototype.matchPreviousAvailable = function() {
            this.matchPrevAvail && this.huffmanTallyLit(255 & this.dataWindow[this.stringStart - 1]), 
            this.matchPrevAvail = !0, this.stringStart++, this.lookAhead--;
        }, CompressedStreamWriter.prototype.matchPreviousBest = function(prevMatch, prevLen) {
            this.huffmanTallyDist(this.stringStart - 1 - prevMatch, prevLen), prevLen -= 2;
            do {
                this.stringStart++, this.lookAhead--, this.lookAhead >= 3 && this.insertString();
            } while (--prevLen > 0);
            return this.stringStart++, this.lookAhead--, this.matchPrevAvail = !1, this.matchLength = 2, 
            prevLen;
        }, CompressedStreamWriter.prototype.lookAheadCompleted = function(finish) {
            return this.matchPrevAvail && this.huffmanTallyLit(255 & this.dataWindow[this.stringStart - 1]), 
            this.matchPrevAvail = !1, this.huffmanFlushBlock(this.dataWindow, this.blockStart, this.stringStart - this.blockStart, finish), 
            this.blockStart = this.stringStart, !1;
        }, CompressedStreamWriter.prototype.huffmanIsFull = function(finish) {
            var len = this.stringStart - this.blockStart;
            this.matchPrevAvail && len--;
            var lastBlock = finish && 0 === this.lookAhead && !this.matchPrevAvail;
            return this.huffmanFlushBlock(this.dataWindow, this.blockStart, len, lastBlock), 
            this.blockStart += len, !lastBlock;
        }, CompressedStreamWriter.prototype.fillWindow = function() {
            for (this.stringStart >= this.windowSize + this.maxDist && this.slideWindow(); this.lookAhead < 262 && this.inputOffset < this.inputEnd; ) {
                var more = 2 * this.windowSize - this.lookAhead - this.stringStart;
                more > this.inputEnd - this.inputOffset && (more = this.inputEnd - this.inputOffset), 
                this.dataWindow.set(this.inputBuffer.subarray(this.inputOffset, this.inputOffset + more), this.stringStart + this.lookAhead), 
                this.inputOffset += more, this.totalBytesIn += more, this.lookAhead += more;
            }
            this.lookAhead >= 3 && this.updateHash();
        }, CompressedStreamWriter.prototype.slideWindow = function() {
            this.dataWindow.set(this.dataWindow.subarray(this.windowSize, this.windowSize + this.windowSize), 0), 
            this.matchStart -= this.windowSize, this.stringStart -= this.windowSize, this.blockStart -= this.windowSize;
            for (var i = 0; i < this.hashSize; ++i) {
                var m = 65535 & this.hashHead[i];
                this.hashHead[i] = m >= this.windowSize ? m - this.windowSize : 0;
            }
            for (i = 0; i < this.windowSize; i++) {
                m = 65535 & this.hashPrevious[i];
                this.hashPrevious[i] = m >= this.windowSize ? m - this.windowSize : 0;
            }
        }, CompressedStreamWriter.prototype.insertString = function() {
            var match, hash = (this.currentHash << this.hashShift ^ this.dataWindow[this.stringStart + 2]) & this.hashMask;
            return this.hashPrevious[this.stringStart & this.windowMask] = match = this.hashHead[hash], 
            this.hashHead[hash] = this.stringStart, this.currentHash = hash, 65535 & match;
        }, CompressedStreamWriter.prototype.findLongestMatch = function(curMatch) {
            var match, chainLen = 4096, niceLen = 258, scan = this.stringStart, bestEnd = this.stringStart + this.matchLength, bestLength = Math.max(this.matchLength, 2), limit = Math.max(this.stringStart - this.maxDist, 0), stringEnd = this.stringStart + 258 - 1, scanEnd1 = this.dataWindow[bestEnd - 1], scanEnd = this.dataWindow[bestEnd], data = this.dataWindow;
            bestLength >= 32 && (chainLen >>= 2), niceLen > this.lookAhead && (niceLen = this.lookAhead);
            do {
                if (data[curMatch + bestLength] === scanEnd && data[curMatch + bestLength - 1] === scanEnd1 && data[curMatch] === data[scan] && data[curMatch + 1] === data[scan + 1]) {
                    for (match = curMatch + 2, scan += 2; data[++scan] === data[++match] && data[++scan] === data[++match] && data[++scan] === data[++match] && data[++scan] === data[++match] && data[++scan] === data[++match] && data[++scan] === data[++match] && data[++scan] === data[++match] && data[++scan] === data[++match] && scan < stringEnd; ) ;
                    if (scan > bestEnd) {
                        if (this.matchStart = curMatch, bestEnd = scan, (bestLength = scan - this.stringStart) >= niceLen) break;
                        scanEnd1 = data[bestEnd - 1], scanEnd = data[bestEnd];
                    }
                    scan = this.stringStart;
                }
            } while ((curMatch = 65535 & this.hashPrevious[curMatch & this.windowMask]) > limit && 0 != --chainLen);
            return this.matchLength = Math.min(bestLength, this.lookAhead), this.matchLength >= 3;
        }, CompressedStreamWriter.prototype.updateHash = function() {
            this.currentHash = this.dataWindow[this.stringStart] << this.hashShift ^ this.dataWindow[this.stringStart + 1];
        }, CompressedStreamWriter.prototype.huffmanTallyLit = function(literal) {
            return this.arrDistances[this.bufferPosition] = 0, this.arrLiterals[this.bufferPosition++] = literal, 
            this.treeLiteral.codeFrequencies[literal]++, this.bufferPosition >= 16384;
        }, CompressedStreamWriter.prototype.huffmanTallyDist = function(dist, len) {
            this.arrDistances[this.bufferPosition] = dist, this.arrLiterals[this.bufferPosition++] = len - 3;
            var lc = this.huffmanLengthCode(len - 3);
            this.treeLiteral.codeFrequencies[lc]++, lc >= 265 && lc < 285 && (this.extraBits += Math.floor((lc - 261) / 4));
            var dc = this.huffmanDistanceCode(dist - 1);
            return this.treeDistances.codeFrequencies[dc]++, dc >= 4 && (this.extraBits += Math.floor(dc / 2 - 1)), 
            this.bufferPosition >= 16384;
        }, CompressedStreamWriter.prototype.huffmanFlushBlock = function(stored, storedOffset, storedLength, lastBlock) {
            this.treeLiteral.codeFrequencies[256]++, this.treeLiteral.buildTree(), this.treeDistances.buildTree(), 
            this.treeLiteral.calculateBLFreq(this.treeCodeLengths), this.treeDistances.calculateBLFreq(this.treeCodeLengths), 
            this.treeCodeLengths.buildTree();
            for (var blTreeCodes = 4, i = 18; i > blTreeCodes; i--) this.treeCodeLengths.codeLengths[CompressorHuffmanTree.huffCodeLengthOrders[i]] > 0 && (blTreeCodes = i + 1);
            var opt_len = 14 + 3 * blTreeCodes + this.treeCodeLengths.getEncodedLength() + this.treeLiteral.getEncodedLength() + this.treeDistances.getEncodedLength() + this.extraBits, static_len = this.extraBits;
            for (i = 0; i < 286; i++) static_len += this.treeLiteral.codeFrequencies[i] * arrLiteralLengths[i];
            for (i = 0; i < 30; i++) static_len += this.treeDistances.codeFrequencies[i] * arrDistanceLengths[i];
            opt_len >= static_len && (opt_len = static_len), storedOffset >= 0 && storedLength + 4 < opt_len >> 3 ? this.huffmanFlushStoredBlock(stored, storedOffset, storedLength, lastBlock) : opt_len == static_len ? (this.pendingBufferWriteBits(2 + (lastBlock ? 1 : 0), 3), 
            this.treeLiteral.setStaticCodes(arrLiteralCodes, arrLiteralLengths), this.treeDistances.setStaticCodes(arrDistanceCodes, arrDistanceLengths), 
            this.huffmanCompressBlock(), this.huffmanReset()) : (this.pendingBufferWriteBits(4 + (lastBlock ? 1 : 0), 3), 
            this.huffmanSendAllTrees(blTreeCodes), this.huffmanCompressBlock(), this.huffmanReset());
        }, CompressedStreamWriter.prototype.huffmanFlushStoredBlock = function(stored, storedOffset, storedLength, lastBlock) {
            this.pendingBufferWriteBits(0 + (lastBlock ? 1 : 0), 3), this.pendingBufferAlignToByte(), 
            this.pendingBufferWriteShort(storedLength), this.pendingBufferWriteShort(~storedLength), 
            this.pendingBufferWriteByteBlock(stored, storedOffset, storedLength), this.huffmanReset();
        }, CompressedStreamWriter.prototype.huffmanLengthCode = function(len) {
            if (255 === len) return 285;
            for (var code = 257; len >= 8; ) code += 4, len >>= 1;
            return code + len;
        }, CompressedStreamWriter.prototype.huffmanDistanceCode = function(distance) {
            for (var code = 0; distance >= 4; ) code += 2, distance >>= 1;
            return code + distance;
        }, CompressedStreamWriter.prototype.huffmanSendAllTrees = function(blTreeCodes) {
            this.treeCodeLengths.buildCodes(), this.treeLiteral.buildCodes(), this.treeDistances.buildCodes(), 
            this.pendingBufferWriteBits(this.treeLiteral.treeLength - 257, 5), this.pendingBufferWriteBits(this.treeDistances.treeLength - 1, 5), 
            this.pendingBufferWriteBits(blTreeCodes - 4, 4);
            for (var rank = 0; rank < blTreeCodes; rank++) this.pendingBufferWriteBits(this.treeCodeLengths.codeLengths[CompressorHuffmanTree.huffCodeLengthOrders[rank]], 3);
            this.treeLiteral.writeTree(this.treeCodeLengths), this.treeDistances.writeTree(this.treeCodeLengths);
        }, CompressedStreamWriter.prototype.huffmanReset = function() {
            this.bufferPosition = 0, this.extraBits = 0, this.treeLiteral.reset(), this.treeDistances.reset(), 
            this.treeCodeLengths.reset();
        }, CompressedStreamWriter.prototype.huffmanCompressBlock = function() {
            for (var i = 0; i < this.bufferPosition; i++) {
                var literalLen = 255 & this.arrLiterals[i], dist = this.arrDistances[i];
                if (0 != dist--) {
                    var lc = this.huffmanLengthCode(literalLen);
                    this.treeLiteral.writeCodeToStream(lc);
                    var bits = Math.floor((lc - 261) / 4);
                    bits > 0 && bits <= 5 && this.pendingBufferWriteBits(literalLen & (1 << bits) - 1, bits);
                    var dc = this.huffmanDistanceCode(dist);
                    this.treeDistances.writeCodeToStream(dc), (bits = Math.floor(dc / 2 - 1)) > 0 && this.pendingBufferWriteBits(dist & (1 << bits) - 1, bits);
                } else this.treeLiteral.writeCodeToStream(literalLen);
            }
            this.treeLiteral.writeCodeToStream(256);
        }, CompressedStreamWriter.prototype.pendingBufferWriteBits = function(b, count) {
            var uint = new Uint32Array(1);
            uint[0] = this.pendingBufCache | b << this.pendingBufBitsInCache, this.pendingBufCache = uint[0], 
            this.pendingBufBitsInCache += count, this.pendingBufferFlushBits();
        }, CompressedStreamWriter.prototype.pendingBufferFlush = function(isClose) {
            if (this.pendingBufferFlushBits(), this.pendingBufLength > 0) {
                var array = new Uint8Array(this.pendingBufLength);
                array.set(this.pendingBuffer.subarray(0, this.pendingBufLength), 0), this.stream.push(array);
            }
            this.pendingBufLength = 0;
        }, CompressedStreamWriter.prototype.pendingBufferFlushBits = function() {
            for (var result = 0; this.pendingBufBitsInCache >= 8 && this.pendingBufLength < 65536; ) this.pendingBuffer[this.pendingBufLength++] = this.pendingBufCache, 
            this.pendingBufCache >>= 8, this.pendingBufBitsInCache -= 8, result++;
            return result;
        }, CompressedStreamWriter.prototype.pendingBufferWriteByteBlock = function(data, offset, length) {
            var array = data.subarray(offset, offset + length);
            this.pendingBuffer.set(array, this.pendingBufLength), this.pendingBufLength += length;
        }, CompressedStreamWriter.prototype.pendingBufferWriteShort = function(s) {
            this.pendingBuffer[this.pendingBufLength++] = s, this.pendingBuffer[this.pendingBufLength++] = s >> 8;
        }, CompressedStreamWriter.prototype.pendingBufferAlignToByte = function() {
            this.pendingBufBitsInCache > 0 && (this.pendingBuffer[this.pendingBufLength++] = this.pendingBufCache), 
            this.pendingBufCache = 0, this.pendingBufBitsInCache = 0;
        }, CompressedStreamWriter.prototype.close = function() {
            do {
                this.pendingBufferFlush(!0), this.compressData(!0) || (this.pendingBufferFlush(!0), 
                this.pendingBufferAlignToByte(), this.noWrap || (this.pendingBufferWriteShortBytes(this.checkSum >> 16), 
                this.pendingBufferWriteShortBytes(65535 & this.checkSum)), this.pendingBufferFlush(!0));
            } while (this.inputEnd !== this.inputOffset || 0 !== this.pendingBufLength);
        }, CompressedStreamWriter.prototype.destroy = function() {
            this.stream = [], this.stream = void 0, this.pendingBuffer = void 0, this.treeLiteral = void 0, 
            this.treeDistances = void 0, this.treeCodeLengths = void 0, this.arrLiterals = void 0, 
            this.arrDistances = void 0, this.hashHead = void 0, this.hashPrevious = void 0, 
            this.dataWindow = void 0, this.inputBuffer = void 0, this.pendingBufLength = void 0, 
            this.pendingBufCache = void 0, this.pendingBufBitsInCache = void 0, this.bufferPosition = void 0, 
            this.extraBits = void 0, this.currentHash = void 0, this.matchStart = void 0, this.matchLength = void 0, 
            this.matchPrevAvail = void 0, this.blockStart = void 0, this.stringStart = void 0, 
            this.lookAhead = void 0, this.totalBytesIn = void 0, this.inputOffset = void 0, 
            this.inputEnd = void 0, this.windowSize = void 0, this.windowMask = void 0, this.hashSize = void 0, 
            this.hashMask = void 0, this.hashShift = void 0, this.maxDist = void 0, this.checkSum = void 0, 
            this.noWrap = void 0;
        }, CompressedStreamWriter;
    }(), CompressorHuffmanTree = function() {
        function CompressorHuffmanTree(writer, elementCount, minCodes, maxLength) {
            this.writer = writer, this.codeMinCount = minCodes, this.maxLength = maxLength, 
            this.codeFrequency = new Uint16Array(elementCount), this.lengthCount = new Int32Array(maxLength);
        }
        return Object.defineProperty(CompressorHuffmanTree.prototype, "treeLength", {
            get: function() {
                return this.codeCount;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(CompressorHuffmanTree.prototype, "codeLengths", {
            get: function() {
                return this.codeLength;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(CompressorHuffmanTree.prototype, "codeFrequencies", {
            get: function() {
                return this.codeFrequency;
            },
            enumerable: !0,
            configurable: !0
        }), CompressorHuffmanTree.prototype.setStaticCodes = function(codes, lengths) {
            var temp = new Int16Array(codes.length);
            temp.set(codes, 0), this.codes = temp;
            var lengthTemp = new Uint8Array(lengths.length);
            lengthTemp.set(lengths, 0), this.codeLength = lengthTemp;
        }, CompressorHuffmanTree.prototype.reset = function() {
            for (var i = 0; i < this.codeFrequency.length; i++) this.codeFrequency[i] = 0;
            this.codes = void 0, this.codeLength = void 0;
        }, CompressorHuffmanTree.prototype.writeCodeToStream = function(code) {
            this.writer.pendingBufferWriteBits(65535 & this.codes[code], this.codeLength[code]);
        }, CompressorHuffmanTree.prototype.buildCodes = function() {
            var nextCode = new Int32Array(this.maxLength);
            this.codes = new Int16Array(this.codeCount);
            for (var code = 0, bitsCount = 0; bitsCount < this.maxLength; bitsCount++) nextCode[bitsCount] = code, 
            code += this.lengthCount[bitsCount] << 15 - bitsCount;
            for (var i = 0; i < this.codeCount; i++) {
                var bits = this.codeLength[i];
                bits > 0 && (this.codes[i] = CompressorHuffmanTree.bitReverse(nextCode[bits - 1]), 
                nextCode[bits - 1] += 1 << 16 - bits);
            }
        }, CompressorHuffmanTree.bitReverse = function(value) {
            return CompressorHuffmanTree.reverseBits[15 & value] << 12 | CompressorHuffmanTree.reverseBits[value >> 4 & 15] << 8 | CompressorHuffmanTree.reverseBits[value >> 8 & 15] << 4 | CompressorHuffmanTree.reverseBits[value >> 12];
        }, CompressorHuffmanTree.prototype.getEncodedLength = function() {
            for (var len = 0, i = 0; i < this.codeFrequency.length; i++) len += this.codeFrequency[i] * this.codeLength[i];
            return len;
        }, CompressorHuffmanTree.prototype.calculateBLFreq = function(blTree) {
            for (var maxCount, minCount, count, curLen = -1, i = 0; i < this.codeCount; ) {
                count = 1;
                var nextLen = this.codeLength[i];
                for (0 === nextLen ? (maxCount = 138, minCount = 3) : (maxCount = 6, minCount = 3, 
                curLen !== nextLen && (blTree.codeFrequency[nextLen]++, count = 0)), curLen = nextLen, 
                i++; i < this.codeCount && curLen === this.codeLength[i] && (i++, !(++count >= maxCount)); ) ;
                count < minCount ? blTree.codeFrequency[curLen] += count : 0 !== curLen ? blTree.codeFrequency[16]++ : count <= 10 ? blTree.codeFrequency[17]++ : blTree.codeFrequency[18]++;
            }
        }, CompressorHuffmanTree.prototype.writeTree = function(blTree) {
            for (var maxRepeatCount, minRepeatCount, currentRepeatCount, currentCodeLength = -1, i = 0; i < this.codeCount; ) {
                currentRepeatCount = 1;
                var nextLen = this.codeLength[i];
                for (0 === nextLen ? (maxRepeatCount = 138, minRepeatCount = 3) : (maxRepeatCount = 6, 
                minRepeatCount = 3, currentCodeLength !== nextLen && (blTree.writeCodeToStream(nextLen), 
                currentRepeatCount = 0)), currentCodeLength = nextLen, i++; i < this.codeCount && currentCodeLength === this.codeLength[i] && (i++, 
                !(++currentRepeatCount >= maxRepeatCount)); ) ;
                if (currentRepeatCount < minRepeatCount) for (;currentRepeatCount-- > 0; ) blTree.writeCodeToStream(currentCodeLength); else 0 !== currentCodeLength ? (blTree.writeCodeToStream(16), 
                this.writer.pendingBufferWriteBits(currentRepeatCount - 3, 2)) : currentRepeatCount <= 10 ? (blTree.writeCodeToStream(17), 
                this.writer.pendingBufferWriteBits(currentRepeatCount - 3, 3)) : (blTree.writeCodeToStream(18), 
                this.writer.pendingBufferWriteBits(currentRepeatCount - 11, 7));
            }
        }, CompressorHuffmanTree.prototype.buildTree = function() {
            for (var codesCount = this.codeFrequency.length, arrTree = new Int32Array(codesCount), treeLength = 0, maxCount = 0, n = 0; n < codesCount; n++) {
                var freq = this.codeFrequency[n];
                if (0 !== freq) {
                    for (var pos = treeLength++, pPos = 0; pos > 0 && this.codeFrequency[arrTree[pPos = Math.floor((pos - 1) / 2)]] > freq; ) arrTree[pos] = arrTree[pPos], 
                    pos = pPos;
                    arrTree[pos] = n, maxCount = n;
                }
            }
            for (;treeLength < 2; ) arrTree[treeLength++] = maxCount < 2 ? ++maxCount : 0;
            this.codeCount = Math.max(maxCount + 1, this.codeMinCount);
            for (var nodesCount = treeLength, child = new Int32Array(4 * treeLength - 2), values = new Int32Array(2 * treeLength - 1), i = 0; i < treeLength; i++) {
                var node = arrTree[i], iIndex = 2 * i;
                child[iIndex] = node, child[iIndex + 1] = -1, values[i] = this.codeFrequency[node] << 8, 
                arrTree[i] = i;
            }
            this.constructHuffmanTree(arrTree, treeLength, values, nodesCount, child), this.buildLength(child);
        }, CompressorHuffmanTree.prototype.constructHuffmanTree = function(arrTree, treeLength, values, nodesCount, child) {
            do {
                for (var first = arrTree[0], last = arrTree[--treeLength], lastVal = values[last], pPos = 0, path = 1; path < treeLength; ) path + 1 < treeLength && values[arrTree[path]] > values[arrTree[path + 1]] && path++, 
                arrTree[pPos] = arrTree[path], path = 2 * (pPos = path) + 1;
                for (;(path = pPos) > 0 && values[arrTree[pPos = Math.floor((path - 1) / 2)]] > lastVal; ) arrTree[path] = arrTree[pPos];
                arrTree[path] = last;
                var second = arrTree[0];
                child[2 * (last = nodesCount++)] = first, child[2 * last + 1] = second;
                var minDepth = Math.min(255 & values[first], 255 & values[second]);
                for (values[last] = lastVal = values[first] + values[second] - minDepth + 1, pPos = 0, 
                path = 1; path < treeLength; ) path + 1 < treeLength && values[arrTree[path]] > values[arrTree[path + 1]] && path++, 
                arrTree[pPos] = arrTree[path], path = 2 * (pPos = path) + 1;
                for (;(path = pPos) > 0 && values[arrTree[pPos = Math.floor((path - 1) / 2)]] > lastVal; ) arrTree[path] = arrTree[pPos];
                arrTree[path] = last;
            } while (treeLength > 1);
        }, CompressorHuffmanTree.prototype.buildLength = function(child) {
            this.codeLength = new Uint8Array(this.codeFrequency.length);
            for (var numNodes = Math.floor(child.length / 2), numLeafs = Math.floor((numNodes + 1) / 2), overflow = 0, i = 0; i < this.maxLength; i++) this.lengthCount[i] = 0;
            if (0 !== (overflow = this.calculateOptimalCodeLength(child, overflow, numNodes))) {
                var iIncreasableLength = this.maxLength - 1;
                do {
                    for (;0 === this.lengthCount[--iIncreasableLength]; ) ;
                    do {
                        this.lengthCount[iIncreasableLength]--, this.lengthCount[++iIncreasableLength]++, 
                        overflow -= 1 << this.maxLength - 1 - iIncreasableLength;
                    } while (overflow > 0 && iIncreasableLength < this.maxLength - 1);
                } while (overflow > 0);
                this.recreateTree(child, overflow, numLeafs);
            }
        }, CompressorHuffmanTree.prototype.recreateTree = function(child, overflow, numLeafs) {
            this.lengthCount[this.maxLength - 1] += overflow, this.lengthCount[this.maxLength - 2] -= overflow;
            for (var nodePtr = 2 * numLeafs, bits = this.maxLength; 0 !== bits; bits--) for (var n = this.lengthCount[bits - 1]; n > 0; ) {
                var childPtr = 2 * child[nodePtr++];
                -1 === child[childPtr + 1] && (this.codeLength[child[childPtr]] = bits, n--);
            }
        }, CompressorHuffmanTree.prototype.calculateOptimalCodeLength = function(child, overflow, numNodes) {
            var lengths = new Int32Array(numNodes);
            lengths[numNodes - 1] = 0;
            for (var i = numNodes - 1; i >= 0; i--) {
                var childIndex = 2 * i + 1;
                if (-1 !== child[childIndex]) {
                    (bitLength = lengths[i] + 1) > this.maxLength && (bitLength = this.maxLength, overflow++), 
                    lengths[child[childIndex - 1]] = lengths[child[childIndex]] = bitLength;
                } else {
                    var bitLength = lengths[i];
                    this.lengthCount[bitLength - 1]++, this.codeLength[child[childIndex - 1]] = lengths[i];
                }
            }
            return overflow;
        }, CompressorHuffmanTree.reverseBits = [ 0, 8, 4, 12, 2, 10, 6, 14, 1, 9, 5, 13, 3, 11, 7, 15 ], 
        CompressorHuffmanTree.huffCodeLengthOrders = [ 16, 17, 18, 0, 8, 7, 9, 6, 10, 5, 11, 4, 12, 3, 13, 2, 14, 1, 15 ], 
        CompressorHuffmanTree;
    }(), ChecksumCalculator = function() {
        function ChecksumCalculator() {}
        return ChecksumCalculator.checksumUpdate = function(checksum, buffer, offset, length) {
            var uint = new Uint32Array(1);
            uint[0] = checksum;
            for (var checksum_uint = uint[0], s1 = uint[0] = 65535 & checksum_uint, s2 = uint[0] = checksum_uint >> ChecksumCalculator.checkSumBitOffset; length > 0; ) {
                var steps = Math.min(length, ChecksumCalculator.checksumIterationCount);
                for (length -= steps; --steps >= 0; ) s2 += s1 += uint[0] = 255 & buffer[offset++];
                s1 %= ChecksumCalculator.checksumBase, s2 %= ChecksumCalculator.checksumBase;
            }
            return checksum_uint = s2 << ChecksumCalculator.checkSumBitOffset | s1;
        }, ChecksumCalculator.checkSumBitOffset = 16, ChecksumCalculator.checksumBase = 65521, 
        ChecksumCalculator.checksumIterationCount = 3800, ChecksumCalculator;
    }();
    !function() {
        for (var i = 0; i < 144; ) arrLiteralCodes[i] = CompressorHuffmanTree.bitReverse(48 + i << 8), 
        arrLiteralLengths[i++] = 8;
        for (;i < 256; ) arrLiteralCodes[i] = CompressorHuffmanTree.bitReverse(256 + i << 7), 
        arrLiteralLengths[i++] = 9;
        for (;i < 280; ) arrLiteralCodes[i] = CompressorHuffmanTree.bitReverse(-256 + i << 9), 
        arrLiteralLengths[i++] = 7;
        for (;i < 286; ) arrLiteralCodes[i] = CompressorHuffmanTree.bitReverse(-88 + i << 8), 
        arrLiteralLengths[i++] = 8;
        for (i = 0; i < 30; i++) arrDistanceCodes[i] = CompressorHuffmanTree.bitReverse(i << 11), 
        arrDistanceLengths[i] = 5;
    }();
    var crc32Table = [], ZipArchive = function() {
        function ZipArchive() {
            this.files = [], this.level = "Normal", Save.isMicrosoftBrowser = !!navigator.msSaveBlob;
        }
        return Object.defineProperty(ZipArchive.prototype, "compressionLevel", {
            get: function() {
                return this.level;
            },
            set: function(level) {
                this.level = level;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(ZipArchive.prototype, "length", {
            get: function() {
                return void 0 === this.files ? 0 : this.files.length;
            },
            enumerable: !0,
            configurable: !0
        }), ZipArchive.prototype.addItem = function(item) {
            if (null === item || void 0 === item) throw new Error("ArgumentException: item cannot be null or undefined");
            for (var i = 0; i < this.files.length; i++) {
                var file = this.files[i];
                if (file instanceof ZipArchiveItem && file.name === item.name) throw new Error("item with same name already exist");
            }
            this.files.push(item);
        }, ZipArchive.prototype.addDirectory = function(directoryName) {
            if (null === directoryName || void 0 === directoryName) throw new Error("ArgumentException: string cannot be null or undefined");
            if (0 === directoryName.length) throw new Error("ArgumentException: string cannot be empty");
            if ("/" !== directoryName.slice(-1) && (directoryName += "/"), -1 !== this.files.indexOf(directoryName)) throw new Error("item with same name already exist");
            this.files.push(directoryName);
        }, ZipArchive.prototype.getItem = function(index) {
            if (index >= 0 && index < this.files.length) return this.files[index];
        }, ZipArchive.prototype.contains = function(item) {
            return -1 !== this.files.indexOf(item);
        }, ZipArchive.prototype.save = function(fileName) {
            if (null === fileName || void 0 === fileName || 0 === fileName.length) throw new Error("ArgumentException: fileName cannot be null or undefined");
            if (0 === this.files.length) throw new Error("InvalidOperation");
            var zipArchive = this;
            return new Promise(function(resolve, reject) {
                zipArchive.saveInternal(fileName, !1).then(function() {
                    resolve(zipArchive);
                });
            });
        }, ZipArchive.prototype.saveAsBlob = function() {
            var zipArchive = this;
            return new Promise(function(resolve, reject) {
                zipArchive.saveInternal("", !0).then(function(blob) {
                    resolve(blob);
                });
            });
        }, ZipArchive.prototype.saveInternal = function(fileName, skipFileSave) {
            var _this = this, zipArchive = this;
            return new Promise(function(resolve, reject) {
                for (var zipData = [], dirLength = 0, i = 0; i < zipArchive.files.length; i++) {
                    _this.getCompressedData(_this.files[i]).then(function(data) {
                        if (dirLength = zipArchive.constructZippedObject(zipData, data, dirLength, data.isDirectory), 
                        zipData.length === zipArchive.files.length) {
                            var blob = zipArchive.writeZippedContent(fileName, zipData, dirLength, skipFileSave);
                            resolve(blob);
                        }
                    });
                }
            });
        }, ZipArchive.prototype.destroy = function() {
            if (void 0 !== this.files && this.files.length > 0) {
                for (var i = 0; i < this.files.length; i++) {
                    var file = this.files[i];
                    file instanceof ZipArchiveItem && file.destroy(), file = void 0;
                }
                this.files = [];
            }
            this.files = void 0, this.level = void 0;
        }, ZipArchive.prototype.getCompressedData = function(item) {
            var zipArchive = this;
            return new Promise(function(resolve, reject) {
                if (item instanceof ZipArchiveItem) {
                    var reader_1 = new FileReader();
                    reader_1.onload = function() {
                        var input = new Uint8Array(reader_1.result), data = {
                            fileName: item.name,
                            crc32Value: 0,
                            compressedData: [],
                            compressedSize: void 0,
                            uncompressedDataSize: input.length,
                            compressionType: void 0,
                            isDirectory: !1
                        };
                        if ("Normal" === zipArchive.level) {
                            zipArchive.compressData(input, data, crc32Table);
                            for (var length_1 = 0, i = 0; i < data.compressedData.length; i++) length_1 += data.compressedData[i].length;
                            data.compressedSize = length_1, data.compressionType = "\b\0";
                        } else data.compressedSize = input.length, data.crc32Value = zipArchive.calculateCrc32Value(0, input, crc32Table), 
                        data.compressionType = "\0\0", data.compressedData.push(input);
                        resolve(data);
                    }, reader_1.readAsArrayBuffer(item.data);
                } else {
                    resolve({
                        fileName: item,
                        crc32Value: 0,
                        compressedData: "",
                        compressedSize: 0,
                        uncompressedDataSize: 0,
                        compressionType: "\0\0",
                        isDirectory: !0
                    });
                }
            });
        }, ZipArchive.prototype.compressData = function(input, data, crc32Table) {
            var compressor = new CompressedStreamWriter(!0), currentIndex = 0, nextIndex = 0;
            do {
                if (currentIndex >= input.length) {
                    compressor.close();
                    break;
                }
                nextIndex = Math.min(input.length, currentIndex + 16384);
                var subArray = input.subarray(currentIndex, nextIndex);
                data.crc32Value = this.calculateCrc32Value(data.crc32Value, subArray, crc32Table), 
                compressor.write(subArray, 0, nextIndex - currentIndex), currentIndex = nextIndex;
            } while (currentIndex <= input.length);
            data.compressedData = compressor.compressedData, compressor.destroy();
        }, ZipArchive.prototype.constructZippedObject = function(zipParts, data, dirLength, isDirectory) {
            var extFileAttr = 0, date = new Date();
            isDirectory && (extFileAttr |= 16), extFileAttr |= 0;
            var header = this.writeHeader(data, date), localHeader = "PK" + header + data.fileName, centralDir = this.writeCentralDirectory(data, header, dirLength, extFileAttr);
            return zipParts.push({
                localHeader: localHeader,
                centralDir: centralDir,
                compressedData: data
            }), dirLength + localHeader.length + data.compressedSize;
        }, ZipArchive.prototype.writeHeader = function(data, date) {
            var zipHeader = "";
            return zipHeader += "\n\0\0\0", zipHeader += data.compressionType, zipHeader += this.getBytes(this.getModifiedTime(date), 2), 
            zipHeader += this.getBytes(this.getModifiedDate(date), 2), zipHeader += this.getBytes(data.crc32Value, 4), 
            zipHeader += this.getBytes(data.compressedSize, 4), zipHeader += this.getBytes(data.uncompressedDataSize, 4), 
            zipHeader += this.getBytes(data.fileName.length, 2), zipHeader += this.getBytes(0, 2);
        }, ZipArchive.prototype.writeZippedContent = function(fileName, zipData, localDirLen, skipFileSave) {
            for (var cenDirLen = 0, buffer = [], i = 0; i < zipData.length; i++) {
                var item = zipData[i];
                for (cenDirLen += item.centralDir.length, buffer.push(this.getArrayBuffer(item.localHeader)); item.compressedData.compressedData.length; ) buffer.push(item.compressedData.compressedData.shift().buffer);
            }
            for (i = 0; i < zipData.length; i++) buffer.push(this.getArrayBuffer(zipData[i].centralDir));
            buffer.push(this.getArrayBuffer(this.writeFooter(zipData, cenDirLen, localDirLen)));
            var blob = new Blob(buffer, {
                type: "application/zip"
            });
            return skipFileSave || Save.save(fileName, blob), blob;
        }, ZipArchive.prototype.writeCentralDirectory = function(data, localHeader, offset, externalFileAttribute) {
            return "PK" + this.getBytes(20, 2) + localHeader + this.getBytes(0, 2) + "\0\0\0\0" + this.getBytes(externalFileAttribute, 4) + this.getBytes(offset, 4) + data.fileName;
        }, ZipArchive.prototype.writeFooter = function(zipData, centralLength, localLength) {
            return "PK\0\0\0\0" + this.getBytes(zipData.length, 2) + this.getBytes(zipData.length, 2) + this.getBytes(centralLength, 4) + this.getBytes(localLength, 4) + this.getBytes(0, 2);
        }, ZipArchive.prototype.getArrayBuffer = function(input) {
            for (var a = new Uint8Array(input.length), j = 0; j < input.length; ++j) a[j] = 255 & input.charCodeAt(j);
            return a.buffer;
        }, ZipArchive.prototype.getBytes = function(value, offset) {
            for (var bytes = "", i = 0; i < offset; i++) bytes += String.fromCharCode(255 & value), 
            value >>>= 8;
            return bytes;
        }, ZipArchive.prototype.getModifiedTime = function(date) {
            var modTime = date.getHours();
            return modTime <<= 6, modTime |= date.getMinutes(), modTime <<= 5, modTime |= date.getSeconds() / 2;
        }, ZipArchive.prototype.getModifiedDate = function(date) {
            var modiDate = date.getFullYear() - 1980;
            return modiDate <<= 4, modiDate |= date.getMonth() + 1, modiDate <<= 5, modiDate |= date.getDate();
        }, ZipArchive.prototype.calculateCrc32Value = function(crc32Value, input, crc32Table) {
            crc32Value ^= -1;
            for (var i = 0; i < input.length; i++) crc32Value = crc32Value >>> 8 ^ crc32Table[255 & (crc32Value ^ input[i])];
            return -1 ^ crc32Value;
        }, ZipArchive;
    }(), ZipArchiveItem = function() {
        function ZipArchiveItem(data, itemName) {
            if (null === data || void 0 === data) throw new Error("ArgumentException: data cannot be null or undefined");
            if (null === itemName || void 0 === itemName) throw new Error("ArgumentException: string cannot be null or undefined");
            if (0 === itemName.length) throw new Error("string cannot be empty");
            this.data = data, this.name = itemName;
        }
        return Object.defineProperty(ZipArchiveItem.prototype, "name", {
            get: function() {
                return this.fileName;
            },
            set: function(value) {
                this.fileName = value;
            },
            enumerable: !0,
            configurable: !0
        }), ZipArchiveItem.prototype.destroy = function() {
            this.fileName = void 0, this.data = void 0;
        }, ZipArchiveItem;
    }();
    !function() {
        for (var i, j = 0; j < 256; j++) {
            i = j;
            for (var k = 0; k < 8; k++) i = 1 & i ? 3988292384 ^ i >>> 1 : i >>> 1;
            crc32Table[j] = i;
        }
    }();
    var InternalEnum, _compression = Object.freeze({
        ZipArchive: ZipArchive,
        ZipArchiveItem: ZipArchiveItem,
        CompressedStreamWriter: CompressedStreamWriter,
        CompressorHuffmanTree: CompressorHuffmanTree,
        ChecksumCalculator: ChecksumCalculator
    }), Dictionary = function() {
        function Dictionary(toStringFunction) {
            this.table = {}, this.nElements = 0, this.toStr = toStringFunction || defaultToString;
        }
        return Dictionary.prototype.getValue = function(key) {
            var pair = this.table["$" + this.toStr(key)];
            if (void 0 !== pair) return pair.value;
        }, Dictionary.prototype.setValue = function(key, value) {
            var k = "$" + this.toStr(key);
            this.table[k];
            this.nElements++, this.table[k] = {
                key: key,
                value: value
            };
        }, Dictionary.prototype.remove = function(key) {
            var k = "$" + this.toStr(key), previousElement = this.table[k];
            return delete this.table[k], this.nElements--, previousElement.value;
        }, Dictionary.prototype.keys = function() {
            for (var keysArray = [], namesOfKeys = Object.keys(this.table), index1 = 0; index1 < namesOfKeys.length; index1++) {
                var pair1 = this.table[namesOfKeys[index1]];
                keysArray.push(pair1.key);
            }
            return keysArray;
        }, Dictionary.prototype.values = function() {
            for (var valuesArray = [], namesOfValues = Object.keys(this.table), index2 = 0; index2 < namesOfValues.length; index2++) {
                var pair2 = this.table[namesOfValues[index2]];
                valuesArray.push(pair2.value);
            }
            return valuesArray;
        }, Dictionary.prototype.containsKey = function(key) {
            return !(void 0 === this.getValue(key));
        }, Dictionary.prototype.clear = function() {
            this.table = {}, this.nElements = 0;
        }, Dictionary.prototype.size = function() {
            return this.nElements;
        }, Dictionary;
    }(), PdfName = function() {
        function PdfName(value) {
            this.stringStartMark = "/", this.internalValue = "", this.isSaving6 = !1, this.position6 = -1, 
            this.internalValue = this.normalizeValue(value);
        }
        return Object.defineProperty(PdfName.prototype, "status", {
            get: function() {
                return this.status6;
            },
            set: function(value) {
                this.status6 = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfName.prototype, "isSaving", {
            get: function() {
                return this.isSaving6;
            },
            set: function(value) {
                this.isSaving6 = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfName.prototype, "objectCollectionIndex", {
            get: function() {
                return this.index6;
            },
            set: function(value) {
                this.index6 = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfName.prototype, "position", {
            get: function() {
                return this.position6;
            },
            set: function(value) {
                this.position6 = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfName.prototype, "clonedObject", {
            get: function() {
                return null;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfName.prototype, "value", {
            get: function() {
                return this.internalValue;
            },
            set: function(value) {
                var val = value;
                null !== value && value.length > 0 ? (val = value, this.internalValue = this.normalizeValue(val)) : this.internalValue = val;
            },
            enumerable: !0,
            configurable: !0
        }), PdfName.prototype.save = function(writer) {
            writer.write(this.toString());
        }, PdfName.prototype.toString = function() {
            return this.stringStartMark + this.escapeString(this.value);
        }, PdfName.prototype.clone = function(crossTable) {
            var newName = new PdfName();
            return newName.value = this.internalValue, newName;
        }, PdfName.prototype.escapeString = function(stringValue) {
            for (var result = "", i = 0, len_1 = stringValue.length; i < len_1; i++) {
                var ch = stringValue[i];
                PdfName.delimiters.indexOf(ch);
                result += ch;
            }
            return result;
        }, PdfName.prototype.normalizeValue = function(value, c) {
            return value;
        }, PdfName.delimiters = "()<>[]{}/%}", PdfName.replacements = [ " ", "\t", "\n", "\r" ], 
        PdfName;
    }(), Operators = function() {
        function Operators() {
            this.forTest = "test", this.forTest = Operators.obj;
        }
        return Operators.obj = "obj", Operators.endObj = "endobj", Operators.r = "R", Operators.whiteSpace = " ", 
        Operators.slash = "/", Operators.newLine = "\r\n", Operators.stream = "stream", 
        Operators.endStream = "endstream", Operators.xref = "xref", Operators.f = "f", Operators.n = "n", 
        Operators.trailer = "trailer", Operators.startxref = "startxref", Operators.eof = "%%EOF", 
        Operators.header = "%PDF-1.5", Operators.beginText = "BT", Operators.endText = "ET", 
        Operators.beginPath = "m", Operators.appendLineSegment = "l", Operators.stroke = "S", 
        Operators.fill = "f", Operators.fillEvenOdd = "f*", Operators.fillStroke = "B", 
        Operators.fillStrokeEvenOdd = "B*", Operators.appendbeziercurve = "c", Operators.appendRectangle = "re", 
        Operators.saveState = "q", Operators.restoreState = "Q", Operators.paintXObject = "Do", 
        Operators.modifyCtm = "cm", Operators.modifyTM = "Tm", Operators.setLineWidth = "w", 
        Operators.setLineCapStyle = "J", Operators.setLineJoinStyle = "j", Operators.setDashPattern = "d", 
        Operators.setFlatnessTolerance = "i", Operators.closePath = "h", Operators.closeStrokePath = "s", 
        Operators.closeFillStrokePath = "b", Operators.setCharacterSpace = "Tc", Operators.setWordSpace = "Tw", 
        Operators.setHorizontalScaling = "Tz", Operators.setTextLeading = "TL", Operators.setFont = "Tf", 
        Operators.setRenderingMode = "Tr", Operators.setTextRise = "Ts", Operators.setTextScaling = "Tz", 
        Operators.setCoords = "Td", Operators.goToNextLine = "T*", Operators.setText = "Tj", 
        Operators.setTextWithFormatting = "TJ", Operators.setTextOnNewLine = "'", Operators.selectcolorspaceforstroking = "CS", 
        Operators.selectcolorspacefornonstroking = "cs", Operators.setrbgcolorforstroking = "RG", 
        Operators.setrbgcolorfornonstroking = "rg", Operators.setcmykcolorforstroking = "K", 
        Operators.setcmykcolorfornonstroking = "k", Operators.setgraycolorforstroking = "G", 
        Operators.setgraycolorfornonstroking = "g", Operators.clipPath = "W", Operators.clipPathEvenOdd = "W*", 
        Operators.endPath = "n", Operators.setGraphicsState = "gs", Operators.comment = "%", 
        Operators.evenOdd = "*", Operators.setMiterLimit = "M", Operators;
    }(), DictionaryProperties = function() {
        return function() {
            this.pages = "Pages", this.kids = "Kids", this.count = "Count", this.resources = "Resources", 
            this.type = "Type", this.size = "Size", this.mediaBox = "MediaBox", this.parent = "Parent", 
            this.root = "Root", this.decodeParms = "DecodeParms", this.filter = "Filter", this.font = "Font", 
            this.type1 = "Type1", this.baseFont = "BaseFont", this.encoding = "Encoding", this.subtype = "Subtype", 
            this.contents = "Contents", this.procset = "ProcSet", this.colorSpace = "ColorSpace", 
            this.extGState = "ExtGState", this.pattern = "Pattern", this.xObject = "XObject", 
            this.length = "Length", this.width = "Width", this.height = "Height", this.bitsPerComponent = "BitsPerComponent", 
            this.image = "Image", this.dctdecode = "DCTDecode", this.columns = "Columns", this.blackIs1 = "BlackIs1", 
            this.k = "K", this.s = "S", this.predictor = "Predictor", this.deviceRgb = "DeviceRGB", 
            this.next = "Next", this.action = "Action", this.link = "Link", this.a = "A", this.annot = "Annot", 
            this.p = "P", this.c = "C", this.rect = "Rect", this.uri = "URI", this.annots = "Annots", 
            this.ca = "ca", this.CA = "CA", this.xyz = "XYZ", this.fit = "Fit", this.dest = "Dest", 
            this.BM = "BM", this.flatedecode = "FlateDecode", this.rotate = "Rotate", this.bBox = "BBox", 
            this.form = "Form";
        };
    }(), PdfDictionary = function() {
        function PdfDictionary(dictionary) {
            if (this.position7 = -1, this.primitiveItems = new Dictionary(), this.prefix = "<<", 
            this.suffix = ">>", this.resources = [], this.object = null, this.archive = !0, 
            void 0 === dictionary) this.primitiveItems = new Dictionary(), this.encrypt = !0, 
            this.dictionaryProperties = new DictionaryProperties(); else {
                this.primitiveItems = new Dictionary();
                for (var keys = dictionary.items.keys(), values = dictionary.items.values(), index = 0; index < dictionary.items.size(); index++) this.primitiveItems.setValue(keys[index], values[index]);
                this.status = dictionary.status, this.freezeChanges(this), this.encrypt = !0, this.dictionaryProperties = new DictionaryProperties();
            }
        }
        return Object.defineProperty(PdfDictionary.prototype, "items", {
            get: function() {
                return this.primitiveItems;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfDictionary.prototype, "status", {
            get: function() {
                return this.status7;
            },
            set: function(value) {
                this.status7 = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfDictionary.prototype, "isSaving", {
            get: function() {
                return this.isSaving7;
            },
            set: function(value) {
                this.isSaving7 = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfDictionary.prototype, "objectCollectionIndex", {
            get: function() {
                return this.index7;
            },
            set: function(value) {
                this.index7 = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfDictionary.prototype, "clonedObject", {
            get: function() {
                return this.object;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfDictionary.prototype, "position", {
            get: function() {
                return this.position7;
            },
            set: function(value) {
                this.position7 = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfDictionary.prototype, "Count", {
            get: function() {
                return this.primitiveItems.size();
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfDictionary.prototype, "Dictionary", {
            get: function() {
                return this;
            },
            enumerable: !0,
            configurable: !0
        }), PdfDictionary.prototype.getArchive = function() {
            return this.archive;
        }, PdfDictionary.prototype.setArchive = function(value) {
            this.archive = value;
        }, PdfDictionary.prototype.setEncrypt = function(value) {
            this.encrypt = value, this.modify();
        }, PdfDictionary.prototype.getEncrypt = function() {
            return this.encrypt;
        }, PdfDictionary.prototype.freezeChanges = function(freezer) {
            this.bChanged = !1;
        }, PdfDictionary.prototype.clone = function(crossTable) {
            return new PdfDictionary();
        }, PdfDictionary.prototype.modify = function() {
            this.bChanged = !0;
        }, PdfDictionary.prototype.remove = function(key) {
            "string" != typeof key ? (this.primitiveItems.remove(key.value), this.modify()) : this.remove(new PdfName(key));
        }, PdfDictionary.prototype.containsKey = function(key) {
            return this.primitiveItems.containsKey(key.toString());
        }, PdfDictionary.prototype.onBeginSave = function() {
            this.beginSave.sender.beginSave();
        }, PdfDictionary.prototype.onTemplateBeginSave = function() {
            this.pageBeginDrawTemplate.sender.pageBeginSave();
        }, PdfDictionary.prototype.onBeginAnnotationSave = function() {
            this.annotationBeginSave.sender.beginSave();
        }, PdfDictionary.prototype.onSectionBeginSave = function(writer) {
            var saveEvent = this.sectionBeginSave;
            saveEvent.sender.beginSave(saveEvent.state, writer);
        }, PdfDictionary.prototype.save = function(writer, bRaiseEvent) {
            void 0 === bRaiseEvent ? this.save(writer, !0) : (writer.write(this.prefix), void 0 !== this.beginSave && this.onBeginSave(), 
            void 0 !== this.annotationBeginSave && this.onBeginAnnotationSave(), void 0 !== this.sectionBeginSave && this.onSectionBeginSave(writer), 
            void 0 !== this.pageBeginDrawTemplate && this.onTemplateBeginSave(), this.Count > 0 && this.saveItems(writer), 
            writer.write(this.suffix), writer.write(Operators.newLine));
        }, PdfDictionary.prototype.saveItems = function(writer) {
            writer.write(Operators.newLine);
            for (var keys = this.primitiveItems.keys(), values = this.primitiveItems.values(), index = 0; index < keys.length; index++) {
                var key = keys[index];
                new PdfName(key).save(writer), writer.write(Operators.whiteSpace);
                values[index].save(writer), writer.write(Operators.newLine);
            }
        }, PdfDictionary;
    }(), SaveSectionCollectionEventHandler = function() {
        return function(sender) {
            this.sender = sender;
        };
    }(), SaveAnnotationEventHandler = function() {
        return function(sender) {
            this.sender = sender;
        };
    }(), SaveSectionEventHandler = function() {
        return function(sender, state) {
            this.sender = sender, this.state = state;
        };
    }(), SaveTemplateEventHandler = function() {
        return function(sender) {
            this.sender = sender;
        };
    }(), PdfNumber = function() {
        function PdfNumber(value) {
            this.position5 = -1, this.value = value;
        }
        return Object.defineProperty(PdfNumber.prototype, "intValue", {
            get: function() {
                return this.value;
            },
            set: function(value) {
                this.value = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfNumber.prototype, "isInteger", {
            get: function() {
                return this.integer;
            },
            set: function(value) {
                this.integer = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfNumber.prototype, "status", {
            get: function() {
                return this.status5;
            },
            set: function(value) {
                this.status5 = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfNumber.prototype, "isSaving", {
            get: function() {
                return this.isSaving5;
            },
            set: function(value) {
                this.isSaving5 = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfNumber.prototype, "objectCollectionIndex", {
            get: function() {
                return this.index5;
            },
            set: function(value) {
                this.index5 = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfNumber.prototype, "position", {
            get: function() {
                return this.position5;
            },
            set: function(value) {
                this.position5 = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfNumber.prototype, "clonedObject", {
            get: function() {
                return null;
            },
            enumerable: !0,
            configurable: !0
        }), PdfNumber.prototype.save = function(writer) {
            writer.write(this.intValue.toString());
        }, PdfNumber.prototype.clone = function(crossTable) {
            return new PdfNumber(this.value);
        }, PdfNumber.floatToString = function(number) {
            var returnString = number.toFixed(2);
            return "0.00" === returnString && (returnString = ".00"), returnString;
        }, PdfNumber.min = function(x, y, z) {
            var r = Math.min(x, y);
            return Math.min(z, r);
        }, PdfNumber;
    }(), PdfArray = function() {
        function PdfArray(array) {
            if (this.startMark = "[", this.endMark = "]", this.position9 = -1, this.clonedObject9 = null, 
            void 0 === array) this.internalElements = []; else if (void 0 === array || array instanceof PdfArray) {
                var tempArray = array;
                this.internalElements = [];
                for (index = 0; index < tempArray.elements.length; index++) this.internalElements.push(tempArray.elements[index]);
            } else for (var tempNumberArray = array, index = 0; index < tempNumberArray.length; index++) {
                var pdfNumber = new PdfNumber(tempNumberArray[index]);
                this.add(pdfNumber);
            }
        }
        return PdfArray.prototype.items = function(index) {
            return this.internalElements[index];
        }, Object.defineProperty(PdfArray.prototype, "count", {
            get: function() {
                return this.internalElements.length;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfArray.prototype, "status", {
            get: function() {
                return this.status9;
            },
            set: function(value) {
                this.status9 = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfArray.prototype, "isSaving", {
            get: function() {
                return this.isSaving9;
            },
            set: function(value) {
                this.isSaving9 = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfArray.prototype, "clonedObject", {
            get: function() {
                return this.clonedObject9;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfArray.prototype, "position", {
            get: function() {
                return this.position9;
            },
            set: function(value) {
                this.position9 = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfArray.prototype, "objectCollectionIndex", {
            get: function() {
                return this.index9;
            },
            set: function(value) {
                this.index9 = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfArray.prototype, "CrossTable", {
            get: function() {
                return this.pdfCrossTable;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfArray.prototype, "elements", {
            get: function() {
                return this.internalElements;
            },
            enumerable: !0,
            configurable: !0
        }), PdfArray.prototype.add = function(element) {
            void 0 === this.internalElements && (this.internalElements = []), this.internalElements.push(element), 
            this.markedChange();
        }, PdfArray.prototype.markedChange = function() {
            this.bChanged = !0;
        }, PdfArray.prototype.contains = function(element) {
            for (var index = 0; index < this.internalElements.length; index++) {
                var tempElement = this.internalElements[index], inputElement = element;
                if (null != tempElement && void 0 !== tempElement && null != inputElement && void 0 !== inputElement && tempElement.value === inputElement.value) return !0;
            }
            return !1;
        }, PdfArray.prototype.getItems = function(index) {
            return this.internalElements[index];
        }, PdfArray.prototype.save = function(writer) {
            writer.write(this.startMark);
            for (var i = 0, len = this.count; i < len; i++) this.getItems(i).save(writer), i + 1 !== len && writer.write(Operators.whiteSpace);
            writer.write(this.endMark);
        }, PdfArray.prototype.clone = function(crossTable) {
            this.clonedObject9 = null;
            for (var newArray = new PdfArray(), index = 0; index < this.internalElements.length; index++) {
                var obj = this.internalElements[index];
                newArray.add(obj.clone(crossTable));
            }
            return newArray.pdfCrossTable = crossTable, this.clonedObject9 = newArray, newArray;
        }, PdfArray.fromRectangle = function(bounds) {
            return new PdfArray([ bounds.x, bounds.y, bounds.width, bounds.height ]);
        }, PdfArray.prototype.insert = function(index, element) {
            if (index < this.internalElements.length && index > 0) {
                for (var tempElements = [], i = 0; i < index; i++) tempElements.push(this.internalElements[i]);
                tempElements.push(element);
                for (i = index; i < this.internalElements.length; i++) tempElements.push(this.internalElements[i]);
                this.internalElements = tempElements;
            } else this.internalElements.push(element);
            this.markChanged();
        }, PdfArray.prototype.indexOf = function(element) {
            return this.internalElements.indexOf(element);
        }, PdfArray.prototype.remove = function(element) {
            var index = this.internalElements.indexOf(element);
            this.internalElements[index] = null, this.markChanged();
        }, PdfArray.prototype.removeAt = function(index) {
            if (this.internalElements.length > index) {
                for (var tempArray = [], i = 0; i < index; i++) tempArray.push(this.internalElements[i]);
                for (i = index + 1; i < this.internalElements.length; i++) tempArray.push(this.internalElements[i]);
                this.internalElements = tempArray;
            }
            this.markChanged();
        }, PdfArray.prototype.clear = function() {
            this.internalElements = [], this.markChanged();
        }, PdfArray.prototype.markChanged = function() {
            this.bChanged = !0;
        }, PdfArray;
    }(), __extends$45 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), PdfStream = function(_super) {
        function PdfStream(dictionary, data) {
            var _this = _super.call(this, dictionary) || this;
            return _this.dicPrefix = "stream", _this.dicSuffix = "endstream", _this.clonedObject2 = null, 
            _this.bCompress = !0, _this.isImageStream = !1, void 0 !== dictionary || void 0 !== data ? (_this.dataStream2 = [], 
            _this.dataStream2 = data, _this.bCompress2 = !1) : (_this.dataStream2 = [], _this.bCompress2 = !0), 
            _this;
        }
        return __extends$45(PdfStream, _super), Object.defineProperty(PdfStream.prototype, "internalStream", {
            get: function() {
                return this.dataStream2;
            },
            set: function(value) {
                this.dataStream2 = [], this.dataStream2 = value, this.modify();
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfStream.prototype, "isImage", {
            get: function() {
                return this.isImageStream;
            },
            set: function(value) {
                this.isImageStream = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfStream.prototype, "compress", {
            get: function() {
                return this.bCompress;
            },
            set: function(value) {
                this.bCompress = value, this.modify();
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfStream.prototype, "data", {
            get: function() {
                return this.dataStream2;
            },
            set: function(value) {
                this.dataStream2 = [], this.dataStream2 = value, this.modify();
            },
            enumerable: !0,
            configurable: !0
        }), PdfStream.prototype.clearStream = function() {
            this.internalStream = [], this.remove(this.dictionaryProperties.filter), this.bCompress = !0, 
            this.modify();
        }, PdfStream.prototype.write = function(text) {
            if (null == text) throw new Error("ArgumentNullException:text");
            if (text.length <= 0) throw new Error("ArgumentException: Can not write an empty string, text");
            this.dataStream2.push(text), this.modify();
        }, PdfStream.prototype.compressContent = function(data, writer) {
            if (this.bCompress) {
                var sw = new CompressedStreamWriter();
                sw.write(data, 0, data.length), sw.close(), data = sw.getCompressedString, this.addFilter(this.dictionaryProperties.flatedecode);
            }
            return data;
        }, PdfStream.prototype.addFilter = function(filterName) {
            var obj = this.items.getValue(this.dictionaryProperties.filter);
            if (obj instanceof PdfReferenceHolder) {
                obj = obj.object;
            }
            var array = obj, name = obj;
            null != name && ((array = new PdfArray()).insert(0, name), this.items.setValue(this.dictionaryProperties.filter, array)), 
            name = new PdfName(filterName), null == array ? this.items.setValue(this.dictionaryProperties.filter, name) : array.insert(0, name);
        }, PdfStream.prototype.save = function(writer) {
            for (var data = "", i = 0; i < this.data.length; i++) data += this.data[i];
            data.length > 1 && !this.isImage && (data = "q\r\n" + data + "Q\r\n");
            var length = (data = this.compressContent(data, writer)).length;
            this.items.setValue(this.dictionaryProperties.length, new PdfNumber(length)), _super.prototype.save.call(this, writer, !1), 
            writer.write(this.dicPrefix), writer.write(Operators.newLine), data.length > 0 && writer.write(data), 
            writer.write(Operators.newLine), writer.write(this.dicSuffix), writer.write(Operators.newLine);
        }, PdfStream.bytesToString = function(byteArray) {
            for (var output = "", i = 0; i < byteArray.length; i++) output += String.fromCharCode(byteArray[i]);
            return output;
        }, PdfStream;
    }(PdfDictionary);
    !function(InternalEnum) {
        !function(ForceEncoding) {
            ForceEncoding[ForceEncoding.None = 0] = "None", ForceEncoding[ForceEncoding.Ascii = 1] = "Ascii", 
            ForceEncoding[ForceEncoding.Unicode = 2] = "Unicode";
        }(InternalEnum.ForceEncoding || (InternalEnum.ForceEncoding = {}));
        var SourceType;
        !function(SourceType) {
            SourceType[SourceType.StringValue = 0] = "StringValue", SourceType[SourceType.ByteBuffer = 1] = "ByteBuffer";
        }(SourceType || (SourceType = {}));
    }(InternalEnum || (InternalEnum = {}));
    var PdfHorizontalAlignment, PdfString = function() {
        function PdfString(value) {
            if (this.bHex = !1, this.position1 = -1, this.clonedObject1 = null, this.bDecrypted = !1, 
            this.isParentDecrypted = !1, this.isPacked = !1, this.isFormField = !1, this.isColorSpace = !1, 
            this.isHexString = !0, void 0 === value) this.bHex = !1; else if (!(value.length > 0 && "0xfeff" === value[0])) {
                this.stringValue = value, this.data = [];
                for (var i = 0; i < value.length; ++i) this.data.push(value.charCodeAt(i));
            }
        }
        return Object.defineProperty(PdfString.prototype, "hex", {
            get: function() {
                return this.bHex;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfString.prototype, "value", {
            get: function() {
                return this.stringValue;
            },
            set: function(value) {
                this.stringValue = value, this.data = null;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfString.prototype, "status", {
            get: function() {
                return this.status1;
            },
            set: function(value) {
                this.status1 = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfString.prototype, "isSaving", {
            get: function() {
                return this.isSaving1;
            },
            set: function(value) {
                this.isSaving1 = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfString.prototype, "objectCollectionIndex", {
            get: function() {
                return this.index1;
            },
            set: function(value) {
                this.index1 = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfString.prototype, "clonedObject", {
            get: function() {
                return this.clonedObject1;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfString.prototype, "position", {
            get: function() {
                return this.position1;
            },
            set: function(value) {
                this.position1 = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfString.prototype, "CrossTable", {
            get: function() {
                return this.crossTable;
            },
            enumerable: !0,
            configurable: !0
        }), PdfString.bytesToHex = function(bytes) {
            if (null == bytes) return "";
            return "";
        }, PdfString.prototype.save = function(writer) {
            if (null === writer) throw new Error("ArgumentNullException : writer");
            writer.write(PdfString.stringMark[0] + this.value + PdfString.stringMark[1]);
        }, PdfString.prototype.clone = function(crossTable) {
            if (null !== this.clonedObject1 && this.clonedObject1.CrossTable === crossTable) return this.clonedObject1;
            this.clonedObject1 = null;
            var newString = new PdfString(this.stringValue);
            return newString.bHex = this.bHex, newString.crossTable = crossTable, newString.isColorSpace = this.isColorSpace, 
            this.clonedObject1 = newString, newString;
        }, PdfString.stringMark = "()", PdfString.hexStringMark = "<>", PdfString.hexFormatPattern = "{0:X2}", 
        PdfString;
    }(), PdfReference = function() {
        function PdfReference(objNumber, genNumber) {
            this.index3 = -1, this.position3 = -1, this.objNumber = 0, this.genNumber = 0, "number" == typeof objNumber && "number" == typeof genNumber ? (this.objNumber = objNumber, 
            this.genNumber = genNumber) : (this.objNumber = Number(objNumber), this.genNumber = Number(genNumber));
        }
        return Object.defineProperty(PdfReference.prototype, "status", {
            get: function() {
                return this.status3;
            },
            set: function(value) {
                this.status3 = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfReference.prototype, "isSaving", {
            get: function() {
                return this.isSaving3;
            },
            set: function(value) {
                this.isSaving3 = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfReference.prototype, "objectCollectionIndex", {
            get: function() {
                return this.index3;
            },
            set: function(value) {
                this.index3 = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfReference.prototype, "position", {
            get: function() {
                return this.position3;
            },
            set: function(value) {
                this.position3 = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfReference.prototype, "clonedObject", {
            get: function() {
                return null;
            },
            enumerable: !0,
            configurable: !0
        }), PdfReference.prototype.save = function(writer) {
            writer.write(this.toString());
        }, PdfReference.prototype.toString = function() {
            return this.objNumber.toString() + " " + this.genNumber.toString() + " R";
        }, PdfReference.prototype.clone = function(crossTable) {
            return null;
        }, PdfReference;
    }(), PdfReferenceHolder = function() {
        function PdfReferenceHolder(obj1, obj2) {
            if (this.index4 = -1, this.position4 = -1, this.objectIndex = -1, this.dictionaryProperties = new DictionaryProperties(), 
            obj1 instanceof PdfArray || obj1 instanceof PdfDictionary || obj1 instanceof PdfName || obj1 instanceof PdfNumber || obj1 instanceof PdfStream || obj1 instanceof PdfReference || obj1 instanceof PdfString) this.primitiveObject = obj1; else {
                var tempObj = obj1;
                this.constructor(tempObj.element);
            }
        }
        return Object.defineProperty(PdfReferenceHolder.prototype, "status", {
            get: function() {
                return this.status4;
            },
            set: function(value) {
                this.status4 = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfReferenceHolder.prototype, "isSaving", {
            get: function() {
                return this.isSaving4;
            },
            set: function(value) {
                this.isSaving4 = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfReferenceHolder.prototype, "objectCollectionIndex", {
            get: function() {
                return this.index4;
            },
            set: function(value) {
                this.index4 = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfReferenceHolder.prototype, "position", {
            get: function() {
                return this.position4;
            },
            set: function(value) {
                this.position4 = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfReferenceHolder.prototype, "clonedObject", {
            get: function() {
                return null;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfReferenceHolder.prototype, "object", {
            get: function() {
                return this.primitiveObject;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfReferenceHolder.prototype, "reference", {
            get: function() {
                return this.pdfReference;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfReferenceHolder.prototype, "index", {
            get: function() {
                return this.objectIndex;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfReferenceHolder.prototype, "element", {
            get: function() {
                return this.primitiveObject;
            },
            enumerable: !0,
            configurable: !0
        }), PdfReferenceHolder.prototype.save = function(writer) {
            writer.position;
            var cTable = writer.document.crossTable;
            this.object.isSaving = !0;
            cTable.getReference(this.object).save(writer);
        }, PdfReferenceHolder.prototype.clone = function(crossTable) {
            return null;
        }, PdfReferenceHolder;
    }(), PdfAction = function() {
        function PdfAction() {
            this.action = null, this.dictionaryProperties = new DictionaryProperties(), this.initialize();
        }
        return Object.defineProperty(PdfAction.prototype, "next", {
            get: function() {
                return this.action;
            },
            set: function(value) {
                this.action = value, this.dictionary.items.setValue(this.dictionaryProperties.next, new PdfReferenceHolder(this.action));
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfAction.prototype, "dictionary", {
            get: function() {
                return void 0 === this.pdfDictionary && (this.pdfDictionary = new PdfDictionary()), 
                this.pdfDictionary;
            },
            enumerable: !0,
            configurable: !0
        }), PdfAction.prototype.initialize = function() {
            this.dictionary.items.setValue(this.dictionaryProperties.type, new PdfName(this.dictionaryProperties.action));
        }, Object.defineProperty(PdfAction.prototype, "element", {
            get: function() {
                return this.dictionary;
            },
            enumerable: !0,
            configurable: !0
        }), PdfAction;
    }(), __extends$1$7 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), PdfUriAction = function(_super) {
        function PdfUriAction(uri) {
            var _this = _super.call(this) || this;
            return _this.uniformResourceIdentifier = "", _this;
        }
        return __extends$1$7(PdfUriAction, _super), Object.defineProperty(PdfUriAction.prototype, "uri", {
            get: function() {
                return this.uniformResourceIdentifier;
            },
            set: function(value) {
                this.uniformResourceIdentifier = value, this.dictionary.items.setValue(this.dictionaryProperties.uri, new PdfString(this.uniformResourceIdentifier));
            },
            enumerable: !0,
            configurable: !0
        }), PdfUriAction.prototype.initialize = function() {
            _super.prototype.initialize.call(this), this.dictionary.items.setValue(this.dictionaryProperties.s, new PdfName(this.dictionaryProperties.uri));
        }, PdfUriAction;
    }(PdfAction);
    !function(PdfHorizontalAlignment) {
        PdfHorizontalAlignment[PdfHorizontalAlignment.Left = 0] = "Left", PdfHorizontalAlignment[PdfHorizontalAlignment.Center = 1] = "Center", 
        PdfHorizontalAlignment[PdfHorizontalAlignment.Right = 2] = "Right";
    }(PdfHorizontalAlignment || (PdfHorizontalAlignment = {}));
    var PdfVerticalAlignment;
    !function(PdfVerticalAlignment) {
        PdfVerticalAlignment[PdfVerticalAlignment.Top = 0] = "Top", PdfVerticalAlignment[PdfVerticalAlignment.Middle = 1] = "Middle", 
        PdfVerticalAlignment[PdfVerticalAlignment.Bottom = 2] = "Bottom";
    }(PdfVerticalAlignment || (PdfVerticalAlignment = {}));
    var PdfTextAlignment;
    !function(PdfTextAlignment) {
        PdfTextAlignment[PdfTextAlignment.Left = 0] = "Left", PdfTextAlignment[PdfTextAlignment.Center = 1] = "Center", 
        PdfTextAlignment[PdfTextAlignment.Right = 2] = "Right", PdfTextAlignment[PdfTextAlignment.Justify = 3] = "Justify";
    }(PdfTextAlignment || (PdfTextAlignment = {}));
    var TextRenderingMode;
    !function(TextRenderingMode) {
        TextRenderingMode[TextRenderingMode.Fill = 0] = "Fill", TextRenderingMode[TextRenderingMode.Stroke = 1] = "Stroke", 
        TextRenderingMode[TextRenderingMode.FillStroke = 2] = "FillStroke", TextRenderingMode[TextRenderingMode.None = 3] = "None", 
        TextRenderingMode[TextRenderingMode.ClipFlag = 4] = "ClipFlag", TextRenderingMode[TextRenderingMode.ClipFill = 4] = "ClipFill", 
        TextRenderingMode[TextRenderingMode.ClipStroke = 5] = "ClipStroke", TextRenderingMode[TextRenderingMode.ClipFillStroke = 6] = "ClipFillStroke", 
        TextRenderingMode[TextRenderingMode.Clip = 7] = "Clip";
    }(TextRenderingMode || (TextRenderingMode = {}));
    var PdfLineJoin;
    !function(PdfLineJoin) {
        PdfLineJoin[PdfLineJoin.Miter = 0] = "Miter", PdfLineJoin[PdfLineJoin.Round = 1] = "Round", 
        PdfLineJoin[PdfLineJoin.Bevel = 2] = "Bevel";
    }(PdfLineJoin || (PdfLineJoin = {}));
    var PdfLineCap;
    !function(PdfLineCap) {
        PdfLineCap[PdfLineCap.Flat = 0] = "Flat", PdfLineCap[PdfLineCap.Round = 1] = "Round", 
        PdfLineCap[PdfLineCap.Square = 2] = "Square";
    }(PdfLineCap || (PdfLineCap = {}));
    var PdfDashStyle;
    !function(PdfDashStyle) {
        PdfDashStyle[PdfDashStyle.Solid = 0] = "Solid", PdfDashStyle[PdfDashStyle.Dash = 1] = "Dash", 
        PdfDashStyle[PdfDashStyle.Dot = 2] = "Dot", PdfDashStyle[PdfDashStyle.DashDot = 3] = "DashDot", 
        PdfDashStyle[PdfDashStyle.DashDotDot = 4] = "DashDotDot", PdfDashStyle[PdfDashStyle.Custom = 5] = "Custom";
    }(PdfDashStyle || (PdfDashStyle = {}));
    var PdfFillMode;
    !function(PdfFillMode) {
        PdfFillMode[PdfFillMode.Winding = 0] = "Winding", PdfFillMode[PdfFillMode.Alternate = 1] = "Alternate";
    }(PdfFillMode || (PdfFillMode = {}));
    var PdfColorSpace;
    !function(PdfColorSpace) {
        PdfColorSpace[PdfColorSpace.Rgb = 0] = "Rgb", PdfColorSpace[PdfColorSpace.Cmyk = 1] = "Cmyk", 
        PdfColorSpace[PdfColorSpace.GrayScale = 2] = "GrayScale", PdfColorSpace[PdfColorSpace.Indexed = 3] = "Indexed";
    }(PdfColorSpace || (PdfColorSpace = {}));
    var PdfBlendMode;
    !function(PdfBlendMode) {
        PdfBlendMode[PdfBlendMode.Normal = 0] = "Normal", PdfBlendMode[PdfBlendMode.Multiply = 1] = "Multiply", 
        PdfBlendMode[PdfBlendMode.Screen = 2] = "Screen", PdfBlendMode[PdfBlendMode.Overlay = 3] = "Overlay", 
        PdfBlendMode[PdfBlendMode.Darken = 4] = "Darken", PdfBlendMode[PdfBlendMode.Lighten = 5] = "Lighten", 
        PdfBlendMode[PdfBlendMode.ColorDodge = 6] = "ColorDodge", PdfBlendMode[PdfBlendMode.ColorBurn = 7] = "ColorBurn", 
        PdfBlendMode[PdfBlendMode.HardLight = 8] = "HardLight", PdfBlendMode[PdfBlendMode.SoftLight = 9] = "SoftLight", 
        PdfBlendMode[PdfBlendMode.Difference = 10] = "Difference", PdfBlendMode[PdfBlendMode.Exclusion = 11] = "Exclusion", 
        PdfBlendMode[PdfBlendMode.Hue = 12] = "Hue", PdfBlendMode[PdfBlendMode.Saturation = 13] = "Saturation", 
        PdfBlendMode[PdfBlendMode.Color = 14] = "Color", PdfBlendMode[PdfBlendMode.Luminosity = 15] = "Luminosity";
    }(PdfBlendMode || (PdfBlendMode = {}));
    var PdfGraphicsUnit;
    !function(PdfGraphicsUnit) {
        PdfGraphicsUnit[PdfGraphicsUnit.Centimeter = 0] = "Centimeter", PdfGraphicsUnit[PdfGraphicsUnit.Pica = 1] = "Pica", 
        PdfGraphicsUnit[PdfGraphicsUnit.Pixel = 2] = "Pixel", PdfGraphicsUnit[PdfGraphicsUnit.Point = 3] = "Point", 
        PdfGraphicsUnit[PdfGraphicsUnit.Inch = 4] = "Inch", PdfGraphicsUnit[PdfGraphicsUnit.Document = 5] = "Document", 
        PdfGraphicsUnit[PdfGraphicsUnit.Millimeter = 6] = "Millimeter";
    }(PdfGraphicsUnit || (PdfGraphicsUnit = {}));
    var PdfGridImagePosition;
    !function(PdfGridImagePosition) {
        PdfGridImagePosition[PdfGridImagePosition.Fit = 0] = "Fit", PdfGridImagePosition[PdfGridImagePosition.Center = 1] = "Center", 
        PdfGridImagePosition[PdfGridImagePosition.Stretch = 2] = "Stretch", PdfGridImagePosition[PdfGridImagePosition.Tile = 3] = "Tile";
    }(PdfGridImagePosition || (PdfGridImagePosition = {}));
    var PdfFontStyle, PdfColor = function() {
        function PdfColor(color1, color2, color3, color4) {
            color1 instanceof PdfColor ? (this.redColor = color1.r, this.greenColor = color1.g, 
            this.blueColor = color1.b, this.grayColor = color1.gray, this.alpha = color1.alpha, 
            this.filled = 0 !== this.alpha) : "number" == typeof color1 && "number" == typeof color2 && "number" == typeof color3 && void 0 === color4 ? this.constructor(PdfColor.maxColourChannelValue, color1, color2, color3) : "number" == typeof color1 && "number" == typeof color2 && "number" == typeof color3 && "number" == typeof color4 && (this.redColor = color2, 
            this.cyanColor = 0, this.greenColor = color3, this.magentaColor = 0, this.blueColor = color4, 
            this.yellowColor = 0, this.blackColor = 0, this.grayColor = 0, this.alpha = color1, 
            this.filled = !0, this.assignCMYK(color2, color3, color4));
        }
        return PdfColor.prototype.assignCMYK = function(r, g, b) {
            var red = r / PdfColor.maxColourChannelValue, green = g / PdfColor.maxColourChannelValue, blue = b / PdfColor.maxColourChannelValue, black = PdfNumber.min(1 - red, 1 - green, 1 - blue), cyan = 1 === black ? 0 : (1 - red - black) / (1 - black), magenta = 1 === black ? 0 : (1 - green - black) / (1 - black), yellow = 1 === black ? 0 : (1 - blue - black) / (1 - black);
            this.blackColor = black, this.cyanColor = cyan, this.magentaColor = magenta, this.yellowColor = yellow;
        }, Object.defineProperty(PdfColor.prototype, "r", {
            get: function() {
                return this.redColor;
            },
            set: function(value) {
                this.redColor = value, this.assignCMYK(this.redColor, this.greenColor, this.blueColor), 
                this.filled = !0;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfColor.prototype, "red", {
            get: function() {
                return this.r / PdfColor.maxColourChannelValue;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfColor.prototype, "b", {
            get: function() {
                return this.blueColor;
            },
            set: function(value) {
                this.blueColor = value, this.assignCMYK(this.redColor, this.greenColor, this.blueColor), 
                this.filled = !0;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfColor.prototype, "blue", {
            get: function() {
                return this.b / PdfColor.maxColourChannelValue;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfColor.prototype, "g", {
            get: function() {
                return this.greenColor;
            },
            set: function(value) {
                this.greenColor = value, this.assignCMYK(this.redColor, this.greenColor, this.blueColor), 
                this.filled = !0;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfColor.prototype, "green", {
            get: function() {
                return this.g / PdfColor.maxColourChannelValue;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfColor.prototype, "gray", {
            get: function() {
                return (this.redColor + this.greenColor + this.blueColor) / (3 * PdfColor.maxColourChannelValue);
            },
            set: function(value) {
                this.grayColor = value < 0 ? 0 : value > 1 ? 1 : value, this.r = this.grayColor * PdfColor.maxColourChannelValue, 
                this.g = this.grayColor * PdfColor.maxColourChannelValue, this.b = this.grayColor * PdfColor.maxColourChannelValue, 
                this.assignCMYK(this.redColor, this.greenColor, this.blueColor), this.filled = !0;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfColor.prototype, "isEmpty", {
            get: function() {
                return !this.filled;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfColor.prototype, "a", {
            get: function() {
                return this.alpha;
            },
            set: function(value) {
                this.alpha = value < 0 ? 0 : value, this.filled = !0;
            },
            enumerable: !0,
            configurable: !0
        }), PdfColor.prototype.toString = function(colorSpace, stroke) {
            return this.isEmpty ? "" : this.rgbToString(stroke);
        }, PdfColor.prototype.rgbToString = function(ifStroking) {
            var r = this.r, g = this.g, b = this.b, key = (r << 16) + (g << 8) + b;
            ifStroking && (key += 1 << 24);
            var colour = "", obj = null;
            if (PdfColor.rgbStrings.containsKey(key) && (obj = PdfColor.rgbStrings.getValue(key)), 
            null == obj) {
                var red = r / PdfColor.maxColourChannelValue, green = g / PdfColor.maxColourChannelValue, blue = b / PdfColor.maxColourChannelValue;
                colour = ifStroking ? red.toString() + " " + green.toString() + " " + blue.toString() + " RG" : red.toString() + " " + green.toString() + " " + blue.toString() + " rg", 
                PdfColor.rgbStrings.setValue(key, colour);
            } else colour = obj.toString();
            return colour + Operators.newLine;
        }, PdfColor.prototype.toArray = function(colorSpace) {
            var array = new PdfArray();
            switch (colorSpace) {
              case PdfColorSpace.Rgb:
                array.add(new PdfNumber(this.red)), array.add(new PdfNumber(this.green)), array.add(new PdfNumber(this.blue));
                break;

              default:
                throw new Error("NotSupportedException : Unsupported colour space.");
            }
            return array;
        }, PdfColor.rgbStrings = new Dictionary(), PdfColor.grayStringsSroke = new Dictionary(), 
        PdfColor.grayStringsFill = new Dictionary(), PdfColor.maxColourChannelValue = 255, 
        PdfColor;
    }(), PointF = function() {
        return function(x, y) {
            void 0 === x ? (this.x = 0, this.y = 0) : (this.x = null !== x ? x : 0, this.y = null !== y ? y : 0);
        };
    }(), SizeF = function() {
        return function(width, height) {
            void 0 === height ? (this.height = 0, this.width = 0) : (this.height = null !== height ? height : 0, 
            this.width = null !== width ? width : 0);
        };
    }(), RectangleF = function() {
        return function(arg1, arg2, arg3, arg4) {
            if (typeof arg1 == typeof arg1 && void 0 === arg1) this.x = 0, this.y = 0, this.height = 0, 
            this.width = 0; else if (arg1 instanceof PointF && arg2 instanceof SizeF && void 0 === arg3) {
                var pointf = arg1;
                this.x = pointf.x, this.y = pointf.y;
                var sizef = arg2;
                this.height = sizef.height, this.width = sizef.width;
            } else {
                var x = arg1, y = arg2, width = arg3, height = arg4;
                this.x = x, this.y = y, this.height = height, this.width = width;
            }
        };
    }(), PdfBrush = function() {
        return function() {};
    }(), __extends$4$5 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), PdfSolidBrush = function(_super) {
        function PdfSolidBrush(color) {
            var _this = _super.call(this) || this;
            return _this.pdfColor = color, _this;
        }
        return __extends$4$5(PdfSolidBrush, _super), Object.defineProperty(PdfSolidBrush.prototype, "color", {
            get: function() {
                return this.pdfColor;
            },
            set: function(value) {
                this.pdfColor = value;
            },
            enumerable: !0,
            configurable: !0
        }), PdfSolidBrush.prototype.monitorChanges = function(brush, streamWriter, getResources, saveChanges, currentColorSpace) {
            if (null == streamWriter) throw new Error("ArgumentNullException:streamWriter");
            var diff = !1;
            return diff = !0, streamWriter.setColorAndSpace(this.pdfColor, currentColorSpace, !1), 
            diff;
        }, PdfSolidBrush.prototype.resetChanges = function(streamWriter) {
            streamWriter.setColorAndSpace(new PdfColor(0, 0, 0), PdfColorSpace.Rgb, !1);
        }, PdfSolidBrush;
    }(PdfBrush);
    !function(PdfFontStyle) {
        PdfFontStyle[PdfFontStyle.Regular = 0] = "Regular", PdfFontStyle[PdfFontStyle.Bold = 1] = "Bold", 
        PdfFontStyle[PdfFontStyle.Italic = 2] = "Italic", PdfFontStyle[PdfFontStyle.Underline = 4] = "Underline", 
        PdfFontStyle[PdfFontStyle.Strikeout = 8] = "Strikeout";
    }(PdfFontStyle || (PdfFontStyle = {}));
    var PdfFontFamily;
    !function(PdfFontFamily) {
        PdfFontFamily[PdfFontFamily.Helvetica = 0] = "Helvetica", PdfFontFamily[PdfFontFamily.Courier = 1] = "Courier", 
        PdfFontFamily[PdfFontFamily.TimesRoman = 2] = "TimesRoman", PdfFontFamily[PdfFontFamily.Symbol = 3] = "Symbol", 
        PdfFontFamily[PdfFontFamily.ZapfDingbats = 4] = "ZapfDingbats";
    }(PdfFontFamily || (PdfFontFamily = {}));
    var PdfFontType;
    !function(PdfFontType) {
        PdfFontType[PdfFontType.Standard = 0] = "Standard", PdfFontType[PdfFontType.TrueType = 1] = "TrueType", 
        PdfFontType[PdfFontType.TrueTypeEmbedded = 2] = "TrueTypeEmbedded";
    }(PdfFontType || (PdfFontType = {}));
    var PdfWordWrapType;
    !function(PdfWordWrapType) {
        PdfWordWrapType[PdfWordWrapType.None = 0] = "None", PdfWordWrapType[PdfWordWrapType.Word = 1] = "Word", 
        PdfWordWrapType[PdfWordWrapType.WordOnly = 2] = "WordOnly", PdfWordWrapType[PdfWordWrapType.Character = 3] = "Character";
    }(PdfWordWrapType || (PdfWordWrapType = {}));
    var PdfSubSuperScript;
    !function(PdfSubSuperScript) {
        PdfSubSuperScript[PdfSubSuperScript.None = 0] = "None", PdfSubSuperScript[PdfSubSuperScript.SuperScript = 1] = "SuperScript", 
        PdfSubSuperScript[PdfSubSuperScript.SubScript = 2] = "SubScript";
    }(PdfSubSuperScript || (PdfSubSuperScript = {}));
    var FontEncoding;
    !function(FontEncoding) {
        FontEncoding[FontEncoding.Unknown = 0] = "Unknown", FontEncoding[FontEncoding.StandardEncoding = 1] = "StandardEncoding", 
        FontEncoding[FontEncoding.MacRomanEncoding = 2] = "MacRomanEncoding", FontEncoding[FontEncoding.MacExpertEncoding = 3] = "MacExpertEncoding", 
        FontEncoding[FontEncoding.WinAnsiEncoding = 4] = "WinAnsiEncoding", FontEncoding[FontEncoding.PdfDocEncoding = 5] = "PdfDocEncoding", 
        FontEncoding[FontEncoding.IdentityH = 6] = "IdentityH";
    }(FontEncoding || (FontEncoding = {}));
    var LineType, PdfStringFormat = function() {
        function PdfStringFormat(arg1, arg2) {
            this.scalingFactor = 100, void 0 === arg1 ? (this.internalLineLimit = !0, this.wordWrapType = PdfWordWrapType.Word) : "string" == typeof arg1 ? this.constructor() : void 0 === arg2 ? (this.constructor(), 
            this.textAlignment = arg1) : (this.constructor(arg1), this.verticalAlignment = arg2);
        }
        return Object.defineProperty(PdfStringFormat.prototype, "alignment", {
            get: function() {
                return this.textAlignment;
            },
            set: function(value) {
                this.textAlignment = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfStringFormat.prototype, "lineAlignment", {
            get: function() {
                return void 0 === this.verticalAlignment || null == this.verticalAlignment ? PdfVerticalAlignment.Top : this.verticalAlignment;
            },
            set: function(value) {
                this.verticalAlignment = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfStringFormat.prototype, "rightToLeft", {
            get: function() {
                return void 0 !== this.isRightToLeft && null != this.isRightToLeft && this.isRightToLeft;
            },
            set: function(value) {
                this.isRightToLeft = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfStringFormat.prototype, "characterSpacing", {
            get: function() {
                return void 0 === this.internalCharacterSpacing || null == this.internalCharacterSpacing ? 0 : this.internalCharacterSpacing;
            },
            set: function(value) {
                this.internalCharacterSpacing = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfStringFormat.prototype, "wordSpacing", {
            get: function() {
                return void 0 === this.internalWordSpacing || null == this.internalWordSpacing ? 0 : this.internalWordSpacing;
            },
            set: function(value) {
                this.internalWordSpacing = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfStringFormat.prototype, "lineSpacing", {
            get: function() {
                return void 0 === this.leading || null == this.leading ? 0 : this.leading;
            },
            set: function(value) {
                this.leading = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfStringFormat.prototype, "clipPath", {
            get: function() {
                return void 0 !== this.clip && null != this.clip && this.clip;
            },
            set: function(value) {
                this.clip = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfStringFormat.prototype, "subSuperScript", {
            get: function() {
                return void 0 === this.pdfSubSuperScript || null == this.pdfSubSuperScript ? PdfSubSuperScript.None : this.pdfSubSuperScript;
            },
            set: function(value) {
                this.pdfSubSuperScript = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfStringFormat.prototype, "paragraphIndent", {
            get: function() {
                return void 0 === this.internalParagraphIndent || null == this.internalParagraphIndent ? 0 : this.internalParagraphIndent;
            },
            set: function(value) {
                this.internalParagraphIndent = value, this.firstLineIndent = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfStringFormat.prototype, "lineLimit", {
            get: function() {
                return this.internalLineLimit;
            },
            set: function(value) {
                this.internalLineLimit = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfStringFormat.prototype, "measureTrailingSpaces", {
            get: function() {
                return void 0 !== this.trailingSpaces && null != this.trailingSpaces && this.trailingSpaces;
            },
            set: function(value) {
                this.trailingSpaces = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfStringFormat.prototype, "noClip", {
            get: function() {
                return void 0 !== this.isNoClip && null != this.isNoClip && this.isNoClip;
            },
            set: function(value) {
                this.isNoClip = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfStringFormat.prototype, "wordWrap", {
            get: function() {
                return this.wordWrapType;
            },
            set: function(value) {
                this.wordWrapType = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfStringFormat.prototype, "horizontalScalingFactor", {
            get: function() {
                return this.scalingFactor;
            },
            set: function(value) {
                if (value <= 0) throw new Error("ArgumentOutOfRangeException:The scaling factor cant be less of equal to zero, ScalingFactor");
                this.scalingFactor = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfStringFormat.prototype, "firstLineIndent", {
            get: function() {
                return void 0 === this.initialLineIndent || null == this.initialLineIndent ? 0 : this.initialLineIndent;
            },
            set: function(value) {
                this.initialLineIndent = value;
            },
            enumerable: !0,
            configurable: !0
        }), PdfStringFormat.prototype.clone = function() {
            return this;
        }, PdfStringFormat;
    }(), StringTokenizer = function() {
        function StringTokenizer(textValue) {
            if (this.currentPosition = 0, null == textValue) throw new Error("ArgumentNullException:text");
            this.text = textValue;
        }
        return Object.defineProperty(StringTokenizer.prototype, "length", {
            get: function() {
                return this.text.length;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(StringTokenizer.prototype, "position", {
            get: function() {
                return this.currentPosition;
            },
            set: function(value) {
                this.currentPosition = value;
            },
            enumerable: !0,
            configurable: !0
        }), StringTokenizer.getCharsCount = function(text, symbols) {
            if ("string" == typeof symbols) {
                if (null == text) throw new Error("ArgumentNullException:wholeText");
                for (var numSymbols = 0, curIndex = 0; -1 !== (curIndex = text.indexOf(symbols, curIndex)); ) numSymbols++, 
                curIndex++;
                return numSymbols;
            }
            if (null == text) throw new Error("ArgumentNullException:text");
            if (null == symbols) throw new Error("ArgumentNullException:symbols");
            for (var count = 0, i = 0, len = text.length; i < len; i++) {
                var ch = text[i];
                this.contains(symbols, ch) && count++;
            }
            return count;
        }, StringTokenizer.prototype.readLine = function() {
            for (var pos = this.currentPosition; pos < this.length; ) {
                switch (this.text[pos]) {
                  case "\r":
                  case "\n":
                    var text = this.text.substring(this.currentPosition, pos - this.currentPosition);
                    return this.currentPosition = pos + 1, this.currentPosition++, text;
                }
                pos++;
            }
            if (pos > this.currentPosition) {
                var text2 = this.text.substring(this.currentPosition, pos - this.currentPosition);
                return this.currentPosition = pos, text2;
            }
            return null;
        }, StringTokenizer.prototype.peekLine = function() {
            var pos = this.currentPosition, line = this.readLine();
            return this.currentPosition = pos, line;
        }, StringTokenizer.prototype.readWord = function() {
            for (var pos = this.currentPosition; pos < this.length; ) {
                var ch = this.text[pos];
                switch (ch) {
                  case "\r":
                  case "\n":
                    var textValue = this.text.substr(this.currentPosition, pos - this.currentPosition);
                    return this.currentPosition = pos + 1, "\r" === ch && this.currentPosition < this.length && "\n" === this.text[this.currentPosition] && this.currentPosition++, 
                    textValue;

                  case " ":
                  case "\t":
                    pos === this.currentPosition && pos++;
                    var text = this.text.substr(this.currentPosition, pos - this.currentPosition);
                    return this.currentPosition = pos, text;
                }
                pos++;
            }
            if (pos > this.currentPosition) {
                var text2 = this.text.substr(this.currentPosition, pos - this.currentPosition);
                return this.currentPosition = pos, text2;
            }
            return null;
        }, StringTokenizer.prototype.peekWord = function() {
            var pos = this.currentPosition, word = this.readWord();
            return this.currentPosition = pos, word;
        }, StringTokenizer.prototype.read = function(count) {
            if (void 0 === count) {
                return "0";
            }
            return "";
        }, StringTokenizer.prototype.peek = function() {
            return "0";
        }, StringTokenizer.prototype.close = function() {
            this.text = null;
        }, StringTokenizer.contains = function(array, symbol) {
            for (var contains = !1, i = 0; i < array.length; i++) if (array[i] === symbol) {
                contains = !0;
                break;
            }
            return contains;
        }, StringTokenizer.whiteSpace = " ", StringTokenizer.tab = "\t", StringTokenizer.spaces = [ StringTokenizer.whiteSpace, StringTokenizer.tab ], 
        StringTokenizer.whiteSpacePattern = "^[ \t]+$", StringTokenizer;
    }(), PdfStringLayouter = function() {
        function PdfStringLayouter() {
            this.isOverloadWithPosition = !1;
        }
        return PdfStringLayouter.prototype.layout = function(arg1, arg2, arg3, arg4, arg5, arg6, arg7) {
            if (arg4 instanceof RectangleF) {
                this.initialize(arg1, arg2, arg3, arg4, arg5), this.isOverloadWithPosition = arg6, 
                this.clientSize = arg7;
                var result = this.doLayout();
                return this.clear(), result;
            }
            this.initialize(arg1, arg2, arg3, arg4), this.isOverloadWithPosition = arg5, this.clientSize = arg6;
            result = this.doLayout();
            return this.clear(), result;
        }, PdfStringLayouter.prototype.initialize = function(text, font, format, rectSize, pageHeight) {
            if ("number" == typeof pageHeight) {
                if (null == text) throw new Error("ArgumentNullException:text");
                if (null == font) throw new Error("ArgumentNullException:font");
                this.text = text, this.font = font, this.format = format, this.size = new SizeF(rectSize.width, rectSize.height), 
                this.rectangle = rectSize, this.pageHeight = pageHeight, this.reader = new StringTokenizer(text);
            } else this.initialize(text, font, format, new RectangleF(new PointF(0, 0), rectSize), 0);
        }, PdfStringLayouter.prototype.clear = function() {
            this.font = null, this.format = null, this.reader.close(), this.reader = null, this.text = null;
        }, PdfStringLayouter.prototype.doLayout = function() {
            for (var result = new PdfStringLayoutResult(), lineResult = new PdfStringLayoutResult(), lines = [], line = this.reader.peekLine(), lineIndent = this.getLineIndent(!0); null != line; ) {
                lineResult = this.layoutLine(line, lineIndent);
                var numSymbolsInserted = 0, returnedValue = this.copyToResult(result, lineResult, lines, numSymbolsInserted);
                returnedValue.success;
                numSymbolsInserted = returnedValue.numInserted, this.reader.readLine(), line = this.reader.peekLine(), 
                lineIndent = this.getLineIndent(!1);
            }
            return this.finalizeResult(result, lines), result;
        }, PdfStringLayouter.prototype.getLineIndent = function(firstLine) {
            var lineIndent = 0;
            return null != this.format && (lineIndent = firstLine ? this.format.firstLineIndent : this.format.paragraphIndent, 
            lineIndent = this.size.width > 0 ? Math.min(this.size.width, lineIndent) : lineIndent), 
            lineIndent;
        }, PdfStringLayouter.prototype.getLineHeight = function() {
            var height = this.font.height;
            return null != this.format && 0 !== this.format.lineSpacing && (height = this.format.lineSpacing + this.font.height), 
            height;
        }, PdfStringLayouter.prototype.getLineWidth = function(line) {
            return this.font.getLineWidth(line, this.format);
        }, PdfStringLayouter.prototype.layoutLine = function(line, lineIndent) {
            var lineResult = new PdfStringLayoutResult();
            lineResult.layoutLineHeight = this.getLineHeight();
            var lines = [], maxWidth = this.size.width, lineWidth = this.getLineWidth(line) + lineIndent, lineType = LineType.FirstParagraphLine, readWord = !0;
            if (maxWidth <= 0 || Math.round(lineWidth) <= Math.round(maxWidth)) this.addToLineResult(lineResult, lines, line, lineWidth, LineType.NewLineBreak | lineType); else {
                var builder = "", curLine = "";
                lineWidth = lineIndent;
                for (var curIndent = lineIndent, reader = new StringTokenizer(line), word = reader.peekWord(), isSingleWord = !1; null != word; ) {
                    curLine += word;
                    var curLineWidth = this.getLineWidth(curLine.toString()) + curIndent;
                    if (curLineWidth > maxWidth) {
                        if (this.getWrapType() == PdfWordWrapType.None) break;
                        if (this.getWrapType() == PdfWordWrapType.Character && readWord) readWord = !1, 
                        curLine += builder.toString(), word = reader.peek().toString(); else {
                            -1 === (ln = builder.toString()).indexOf(" ") ? (isSingleWord = !0, this.addToLineResult(lineResult, lines, curLine, lineWidth, LineType.LayoutBreak | lineType)) : this.addToLineResult(lineResult, lines, ln, lineWidth, LineType.LayoutBreak | lineType), 
                            this.isOverloadWithPosition && (maxWidth = this.clientSize.width), curLine = "", 
                            builder = "", lineWidth = 0, curIndent = 0, curLineWidth = 0, lineType = LineType.None, 
                            isSingleWord && (reader.readWord(), readWord = !1), word = readWord ? word : reader.peekWord(), 
                            isSingleWord = !1, readWord = !0;
                        }
                    } else builder += word, lineWidth = curLineWidth, readWord ? (reader.readWord(), 
                    word = reader.peekWord(), isSingleWord = !1) : (reader.read(), word = reader.peek().toString());
                }
                if (builder.length > 0) {
                    var ln = builder.toString();
                    this.addToLineResult(lineResult, lines, ln, lineWidth, LineType.NewLineBreak | LineType.LastParagraphLine);
                }
                reader.close();
            }
            lineResult.layoutLines = [];
            for (var index = 0; index < lines.length; index++) lineResult.layoutLines.push(lines[index]);
            return lines = [], lineResult;
        }, PdfStringLayouter.prototype.addToLineResult = function(lineResult, lines, line, lineWidth, breakType) {
            var info = new LineInfo();
            info.text = line, info.width = lineWidth, info.lineType = breakType, lines.push(info);
            var size = lineResult.actualSize;
            size.height += this.getLineHeight(), size.width = Math.max(size.width, lineWidth), 
            lineResult.size = size;
        }, PdfStringLayouter.prototype.copyToResult = function(result, lineResult, lines, numInserted) {
            null != this.format && this.format.lineLimit;
            var height = result.actualSize.height, maxHeight = this.size.height;
            this.pageHeight > 0 && maxHeight + this.rectangle.y > this.pageHeight && (maxHeight = this.rectangle.y - this.pageHeight, 
            maxHeight = Math.max(maxHeight, -maxHeight)), numInserted = 0;
            for (var i = 0, len = lineResult.lines.length; i < len; i++) {
                var expHeight = height + lineResult.lineHeight, info = lineResult.lines[i];
                numInserted += info.text.length, info = this.trimLine(info, 0 === lines.length), 
                lines.push(info);
                var size_1 = result.actualSize;
                size_1.width = Math.max(size_1.width, info.width), result.size = size_1, height = expHeight;
            }
            var size = result.actualSize;
            return size.height = height, result.size = size, {
                success: !0,
                numInserted: numInserted
            };
        }, PdfStringLayouter.prototype.finalizeResult = function(result, lines) {
            result.layoutLines = [];
            for (var index = 0; index < lines.length; index++) result.layoutLines.push(lines[index]);
            result.layoutLineHeight = this.getLineHeight(), lines = [];
        }, PdfStringLayouter.prototype.trimLine = function(info, firstLine) {
            var line = info.text, lineWidth = info.width;
            null == this.format || this.format.rightToLeft;
            return (line = line.trim()).length !== info.text.length && (lineWidth = this.getLineWidth(line), 
            lineWidth += this.getLineIndent(firstLine)), info.text = line, info.width = lineWidth, 
            info;
        }, PdfStringLayouter.prototype.getWrapType = function() {
            return null != this.format ? this.format.wordWrap : PdfWordWrapType.Word;
        }, PdfStringLayouter;
    }(), PdfStringLayoutResult = function() {
        function PdfStringLayoutResult() {}
        return Object.defineProperty(PdfStringLayoutResult.prototype, "remainder", {
            get: function() {
                return this.textRemainder;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfStringLayoutResult.prototype, "actualSize", {
            get: function() {
                return void 0 === this.size && (this.size = new SizeF(0, 0)), this.size;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfStringLayoutResult.prototype, "lines", {
            get: function() {
                return this.layoutLines;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfStringLayoutResult.prototype, "lineHeight", {
            get: function() {
                return this.layoutLineHeight;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfStringLayoutResult.prototype, "empty", {
            get: function() {
                return null == this.layoutLines || 0 === this.layoutLines.length;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfStringLayoutResult.prototype, "lineCount", {
            get: function() {
                return this.empty ? 0 : this.layoutLines.length;
            },
            enumerable: !0,
            configurable: !0
        }), PdfStringLayoutResult;
    }(), LineInfo = function() {
        function LineInfo() {}
        return Object.defineProperty(LineInfo.prototype, "lineType", {
            get: function() {
                return this.type;
            },
            set: function(value) {
                this.type = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(LineInfo.prototype, "text", {
            get: function() {
                return this.content;
            },
            set: function(value) {
                this.content = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(LineInfo.prototype, "width", {
            get: function() {
                return this.lineWidth;
            },
            set: function(value) {
                this.lineWidth = value;
            },
            enumerable: !0,
            configurable: !0
        }), LineInfo;
    }();
    !function(LineType) {
        LineType[LineType.None = 0] = "None", LineType[LineType.NewLineBreak = 1] = "NewLineBreak", 
        LineType[LineType.LayoutBreak = 2] = "LayoutBreak", LineType[LineType.FirstParagraphLine = 4] = "FirstParagraphLine", 
        LineType[LineType.LastParagraphLine = 8] = "LastParagraphLine";
    }(LineType || (LineType = {}));
    var ObjectStatus, PdfFont = function() {
        function PdfFont(size, style) {
            this.fontStyle = PdfFontStyle.Regular, "number" == typeof size && void 0 === style ? this.fontSize = size : (this.fontSize = size, 
            this.setStyle(style));
        }
        return Object.defineProperty(PdfFont.prototype, "name", {
            get: function() {
                return this.metrics.name;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfFont.prototype, "size", {
            get: function() {
                return this.fontSize;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfFont.prototype, "height", {
            get: function() {
                return this.metrics.getHeight(null);
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfFont.prototype, "style", {
            get: function() {
                return this.fontStyle;
            },
            set: function(value) {
                this.fontStyle = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfFont.prototype, "bold", {
            get: function() {
                return (this.style & PdfFontStyle.Bold) > 0;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfFont.prototype, "italic", {
            get: function() {
                return (this.style & PdfFontStyle.Italic) > 0;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfFont.prototype, "strikeout", {
            get: function() {
                return (this.style & PdfFontStyle.Strikeout) > 0;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfFont.prototype, "underline", {
            get: function() {
                return (this.style & PdfFontStyle.Underline) > 0;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfFont.prototype, "metrics", {
            get: function() {
                return this.fontMetrics;
            },
            set: function(value) {
                this.fontMetrics = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfFont.prototype, "element", {
            get: function() {
                return this.pdfFontInternals;
            },
            enumerable: !0,
            configurable: !0
        }), PdfFont.prototype.measureString = function(text, arg2, arg3, arg4, arg5) {
            if ("string" == typeof text && void 0 === arg2) return this.measureString(text, null);
            if ("string" == typeof text && (arg2 instanceof PdfStringFormat || null == arg2) && void 0 === arg3 && void 0 === arg4) {
                var temparg2 = arg2;
                return this.measureString(text, temparg2, 0, 0);
            }
            if ("string" == typeof text && (arg2 instanceof PdfStringFormat || null == arg2) && "number" == typeof arg3 && "number" == typeof arg4) {
                temparg2 = arg2;
                return this.measureString(text, 0, temparg2, arg3, arg4);
            }
            if ("string" == typeof text && "number" == typeof arg2 && (arg3 instanceof PdfStringFormat || null == arg3) && "number" == typeof arg4 && "number" == typeof arg5) {
                var layoutArea = new SizeF(arg2, 0), temparg3 = arg3;
                return this.measureString(text, layoutArea, temparg3, arg4, arg5);
            }
            if (null == text) throw Error('ArgumentNullException("text")');
            temparg2 = arg2, temparg3 = arg3;
            var result = new PdfStringLayouter().layout(text, this, temparg3, temparg2, !1, new SizeF(0, 0));
            return arg4 = text.length, arg5 = result.empty ? 0 : result.lines.length, result.actualSize;
        }, PdfFont.prototype.equalsTo = function(obj) {
            return this.equalsToFont(obj);
        }, PdfFont.prototype.getInternals = function() {
            return this.pdfFontInternals;
        }, PdfFont.prototype.setInternals = function(internals) {
            if (null == internals) throw new Error("ArgumentNullException:internals");
            this.pdfFontInternals = internals;
        }, PdfFont.prototype.setStyle = function(style) {
            this.fontStyle = style;
        }, PdfFont.prototype.applyFormatSettings = function(line, format, width) {
            var realWidth = width;
            if (null != format && width > 0 && (0 !== format.characterSpacing && (realWidth += (line.length - 1) * format.characterSpacing), 
            0 !== format.wordSpacing)) {
                var symbols = StringTokenizer.spaces;
                realWidth += StringTokenizer.getCharsCount(line, symbols) * format.wordSpacing;
            }
            return realWidth;
        }, PdfFont.charSizeMultiplier = .001, PdfFont.syncObject = new Object(), PdfFont;
    }(), PdfWriter = function() {
        function PdfWriter(stream) {
            this.streamWriter = stream;
        }
        return Object.defineProperty(PdfWriter.prototype, "document", {
            get: function() {
                return this.pdfDocument;
            },
            set: function(value) {
                this.pdfDocument = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfWriter.prototype, "position", {
            get: function() {
                return this.streamWriter.buffer.size;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfWriter.prototype, "length", {
            get: function() {
                return this.streamWriter.buffer.size;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfWriter.prototype, "stream", {
            get: function() {
                return this.streamWriter;
            },
            enumerable: !0,
            configurable: !0
        }), PdfWriter.prototype.write = function(overload) {
            var tempOverload = overload;
            this.streamWriter.write(tempOverload);
        }, PdfWriter;
    }();
    !function(ObjectStatus) {
        ObjectStatus[ObjectStatus.None = 0] = "None", ObjectStatus[ObjectStatus.Registered = 1] = "Registered";
    }(ObjectStatus || (ObjectStatus = {}));
    var ObjectType, PdfMainObjectCollection = function() {
        function PdfMainObjectCollection() {
            this.objectCollections = [], this.mainObjectCollection = new Dictionary(), this.primitiveObjectCollection = new Dictionary();
        }
        return Object.defineProperty(PdfMainObjectCollection.prototype, "count", {
            get: function() {
                return this.objectCollections.length;
            },
            enumerable: !0,
            configurable: !0
        }), PdfMainObjectCollection.prototype.items = function(index) {
            return this.objectCollections[index];
        }, Object.defineProperty(PdfMainObjectCollection.prototype, "outIsNew", {
            get: function() {
                return this.isNew;
            },
            enumerable: !0,
            configurable: !0
        }), PdfMainObjectCollection.prototype.add = function(element) {
            var objInfo = new ObjectInfo(element);
            this.objectCollections.push(objInfo), this.primitiveObjectCollection.containsKey(element) || this.primitiveObjectCollection.setValue(element, this.objectCollections.length - 1), 
            element.position = this.index = this.objectCollections.length - 1, element.status = ObjectStatus.Registered;
        }, PdfMainObjectCollection.prototype.lookFor = function(obj) {
            var index = -1;
            if (-1 !== obj.position) return obj.position;
            if (this.primitiveObjectCollection.containsKey(obj) && this.count === this.primitiveObjectCollection.size()) index = this.primitiveObjectCollection.getValue(obj); else for (var i = this.count - 1; i >= 0; i--) {
                if (this.objectCollections[i].object === obj) {
                    index = i;
                    break;
                }
            }
            return index;
        }, PdfMainObjectCollection.prototype.getReference = function(index, isNew) {
            this.index = this.lookFor(index);
            this.isNew = !1;
            return {
                reference: this.objectCollections[this.index].reference,
                wasNew: isNew
            };
        }, PdfMainObjectCollection.prototype.trySetReference = function(obj, reference, found) {
            this.index = this.lookFor(obj);
            return this.objectCollections[this.index].setReference(reference), !0;
        }, PdfMainObjectCollection.prototype.destroy = function() {
            for (var _i = 0, _a = this.objectCollections; _i < _a.length; _i++) {
                var obj = _a[_i];
                void 0 !== obj && (obj.pdfObject.position = -1, obj.pdfObject.isSaving = void 0, 
                obj.pdfObject.objectCollectionIndex = void 0, obj.pdfObject.position = void 0);
            }
            this.objectCollections = [], this.mainObjectCollection = new Dictionary(), this.primitiveObjectCollection = new Dictionary();
        }, PdfMainObjectCollection;
    }(), ObjectInfo = function() {
        function ObjectInfo(obj, reference) {
            this.pdfObject = obj, this.pdfReference = reference;
        }
        return Object.defineProperty(ObjectInfo.prototype, "object", {
            get: function() {
                return this.pdfObject;
            },
            set: function(value) {
                this.pdfObject = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(ObjectInfo.prototype, "reference", {
            get: function() {
                return this.pdfReference;
            },
            enumerable: !0,
            configurable: !0
        }), ObjectInfo.prototype.setReference = function(reference) {
            this.pdfReference = reference;
        }, ObjectInfo;
    }(), PdfDocumentBase = function() {
        function PdfDocumentBase(document) {
            this.isStreamCopied = !1, document instanceof PdfDocument && (this.document = document);
        }
        return Object.defineProperty(PdfDocumentBase.prototype, "pdfObjects", {
            get: function() {
                return this.objects;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfDocumentBase.prototype, "crossTable", {
            get: function() {
                return this.pdfCrossTable;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfDocumentBase.prototype, "currentSavingObj", {
            get: function() {
                return this.currentSavingObject;
            },
            set: function(value) {
                this.currentSavingObject = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfDocumentBase.prototype, "catalog", {
            get: function() {
                return this.pdfCatalog;
            },
            set: function(value) {
                this.pdfCatalog = value;
            },
            enumerable: !0,
            configurable: !0
        }), PdfDocumentBase.prototype.setMainObjectCollection = function(mainObjectCollection) {
            this.objects = mainObjectCollection;
        }, PdfDocumentBase.prototype.setCrossTable = function(cTable) {
            this.pdfCrossTable = cTable;
        }, PdfDocumentBase.prototype.setCatalog = function(catalog) {
            this.pdfCatalog = catalog;
        }, PdfDocumentBase.prototype.save = function(filename) {
            var _this = this, encoding = new Encoding(!0), SW = new StreamWriter(encoding);
            if (void 0 === filename) {
                var encoding_1 = new Encoding(!0), SW_1 = new StreamWriter(encoding_1);
                return new Promise(function(resolve, reject) {
                    var obj = {};
                    obj.blobData = new Blob([ _this.document.docSave(SW_1, !0) ], {
                        type: "application/pdf"
                    }), resolve(obj);
                });
            }
            this.document.docSave(SW, filename, !0);
        }, PdfDocumentBase.prototype.clone = function() {
            return this.document;
        }, PdfDocumentBase;
    }();
    !function(ObjectType) {
        ObjectType[ObjectType.Free = 0] = "Free", ObjectType[ObjectType.Normal = 1] = "Normal", 
        ObjectType[ObjectType.Packed = 2] = "Packed";
    }(ObjectType || (ObjectType = {}));
    var PdfPageOrientation, __extends$7$1 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), PdfCatalog = function(_super) {
        function PdfCatalog() {
            var _this = _super.call(this) || this;
            return _this.sections = null, _this.tempDictionaryProperties = new DictionaryProperties(), 
            _this.items.setValue(new DictionaryProperties().type, new PdfName("Catalog")), _this;
        }
        return __extends$7$1(PdfCatalog, _super), Object.defineProperty(PdfCatalog.prototype, "pages", {
            get: function() {
                return this.sections;
            },
            set: function(value) {
                value.element;
                this.sections = value, this.items.setValue(this.tempDictionaryProperties.pages, new PdfReferenceHolder(value));
            },
            enumerable: !0,
            configurable: !0
        }), PdfCatalog;
    }(PdfDictionary), PdfCrossTable = function() {
        function PdfCrossTable() {
            this.objects = new Dictionary(), this.maxGenNumIndex = 0, this.objectCount = 0, 
            this.dictionaryProperties = new DictionaryProperties();
        }
        return Object.defineProperty(PdfCrossTable.prototype, "isMerging", {
            get: function() {
                return this.merging;
            },
            set: function(value) {
                this.merging = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfCrossTable.prototype, "trailer", {
            get: function() {
                return null == this.internalTrailer && (this.internalTrailer = new PdfStream()), 
                this.internalTrailer;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfCrossTable.prototype, "document", {
            get: function() {
                return this.pdfDocument;
            },
            set: function(value) {
                this.pdfDocument = value, this.items = this.pdfDocument.pdfObjects;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfCrossTable.prototype, "pdfObjects", {
            get: function() {
                return this.items;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfCrossTable.prototype, "objectCollection", {
            get: function() {
                return this.pdfDocument.pdfObjects;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfCrossTable.prototype, "count", {
            get: function() {
                return this.objectCount;
            },
            set: function(value) {
                this.objectCount = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfCrossTable.prototype, "nextObjNumber", {
            get: function() {
                return this.count = this.count + 1, this.count;
            },
            enumerable: !0,
            configurable: !0
        }), PdfCrossTable.prototype.save = function(writer, filename) {
            this.saveHead(writer), this.mappedReferences = null, this.objects.clear(), this.markTrailerReferences(), 
            this.saveObjects(writer);
            var saveCount = this.count, xrefPos = writer.position;
            this.registerObject(0, new PdfReference(0, -1), !0);
            writer.write(Operators.xref), writer.write(Operators.newLine), this.saveSections(writer), 
            this.saveTrailer(writer, this.count, 0), this.saveTheEndess(writer, xrefPos), this.count = saveCount;
            for (var i = 0; i < this.objectCollection.count; ++i) {
                this.objectCollection.items(i).object.isSaving = !1;
            }
            if (void 0 === filename) return writer.stream.buffer;
            writer.stream.save(filename);
        }, PdfCrossTable.prototype.saveTheEndess = function(writer, xrefPos) {
            writer.write(Operators.newLine + Operators.startxref + Operators.newLine), writer.write(xrefPos.toString() + Operators.newLine), 
            writer.write(Operators.eof + Operators.newLine);
        }, PdfCrossTable.prototype.saveTrailer = function(writer, count, prevXRef) {
            writer.write(Operators.trailer + Operators.newLine);
            var trailer = this.trailer;
            trailer.items.setValue(this.dictionaryProperties.size, new PdfNumber(this.objectCount + 1)), 
            (trailer = new PdfDictionary(trailer)).setEncrypt(!1), trailer.save(writer);
        }, PdfCrossTable.prototype.saveSections = function(writer) {
            var objectNum = 0, count = 0;
            do {
                count = this.prepareSubsection(objectNum), this.saveSubsection(writer, objectNum, count), 
                objectNum += count;
            } while (0 !== count);
        }, PdfCrossTable.prototype.saveSubsection = function(writer, objectNum, count) {
            if (!(count <= 0 || objectNum >= this.count)) {
                writer.write(objectNum + " " + (count + 1) + Operators.newLine);
                for (var i = objectNum; i <= objectNum + count; ++i) {
                    var obj = this.objects.getValue(i), str = "";
                    str = obj.type === ObjectType.Free ? this.getItem(obj.offset, 65535, !0) : this.getItem(obj.offset, obj.generation, !1), 
                    writer.write(str);
                }
            }
        }, PdfCrossTable.prototype.getItem = function(offset, genNumber, isFree) {
            var returnString = "", addOffsetLength = 10 - offset.toString().length;
            genNumber <= 0 && (genNumber = 0);
            for (var addGenNumberLength = 5 - genNumber.toString().length <= 0 ? 0 : 5 - genNumber.toString().length, index = 0; index < addOffsetLength; index++) returnString += "0";
            returnString = returnString + offset.toString() + " ";
            for (index = 0; index < addGenNumberLength; index++) returnString += "0";
            return returnString = returnString + genNumber.toString() + " ", returnString = returnString + (isFree ? Operators.f : Operators.n) + Operators.newLine;
        }, PdfCrossTable.prototype.prepareSubsection = function(objectNum) {
            for (var i, count = 0, total = this.count, k = 0; k < this.document.pdfObjects.count; k++) this.document.pdfObjects.items(k).reference.toString().split(" ");
            if (objectNum >= total) return count;
            for (i = objectNum; i < total; ++i) break;
            for (objectNum = i; i < total; ++i) ++count;
            return count;
        }, PdfCrossTable.prototype.markTrailerReferences = function() {
            this.trailer.items.keys(), this.trailer.items.values();
        }, PdfCrossTable.prototype.saveHead = function(writer) {
            var version = this.generateFileVersion(writer.document);
            writer.write("%PDF-" + version), writer.write(Operators.newLine);
        }, PdfCrossTable.prototype.generateFileVersion = function(document) {
            return "1." + 4..toString();
        }, PdfCrossTable.prototype.getReference = function(obj, bNew) {
            if (void 0 === bNew) {
                return this.getReference(obj, !1);
            }
            return this.getSubReference(obj, bNew);
        }, PdfCrossTable.prototype.getSubReference = function(obj, bNew) {
            var wasNew, isNew = !1, reference = null;
            if (this.items.count > 0 && obj.objectCollectionIndex > 0 && this.items.count > obj.objectCollectionIndex - 1) {
                var tempObj = this.document.pdfObjects.getReference(obj, wasNew);
                reference = tempObj.reference, wasNew = tempObj.wasNew;
            }
            if (wasNew = null == reference && obj.status !== ObjectStatus.Registered, null == reference) {
                var objnumber = this.nextObjNumber;
                reference = new PdfReference(objnumber, 0);
                if (wasNew) {
                    this.document.pdfObjects.add(obj), this.document.pdfObjects.trySetReference(obj, reference, void 0);
                    var tempIndex = this.document.pdfObjects.count - 1, tempkey = this.document.pdfObjects.objectCollections[tempIndex].reference.objNumber, tempvalue = this.document.pdfObjects.objectCollections[this.document.pdfObjects.count - 1];
                    this.document.pdfObjects.mainObjectCollection.setValue(tempkey, tempvalue), obj.position = -1;
                } else this.document.pdfObjects.trySetReference(obj, reference, void 0);
                obj.objectCollectionIndex = reference.objNumber, obj.status = ObjectStatus.None, 
                isNew = !0;
            }
            return isNew || this.bForceNew, reference;
        }, PdfCrossTable.prototype.saveObjects = function(writer) {
            for (var objectCollection = this.objectCollection, i = 0; i < objectCollection.count; ++i) {
                var obj = objectCollection.items(i).object;
                obj.isSaving = !0, this.saveIndirectObject(obj, writer);
            }
        }, PdfCrossTable.prototype.saveIndirectObject = function(obj, writer) {
            var reference = this.getReference(obj);
            obj instanceof PdfCatalog && this.trailer.items.setValue(this.dictionaryProperties.root, reference), 
            this.pdfDocument.currentSavingObj = reference;
            obj.getArchive(), this.registerObject(writer.position, reference), this.doSaveObject(obj, reference, writer);
        }, PdfCrossTable.prototype.doSaveObject = function(obj, reference, writer) {
            writer.length;
            writer.write(reference.objNumber.toString()), writer.write(Operators.whiteSpace), 
            writer.write(reference.genNumber.toString()), writer.write(Operators.whiteSpace), 
            writer.write(Operators.obj), writer.write(Operators.newLine), obj.save(writer);
            writer.stream;
            writer.write(Operators.endObj), writer.write(Operators.newLine);
        }, PdfCrossTable.prototype.registerObject = function(offset, reference, free) {
            "boolean" == typeof free ? (this.objects.setValue(reference.objNumber, new RegisteredObject(offset, reference, free)), 
            this.maxGenNumIndex = Math.max(this.maxGenNumIndex, reference.genNumber)) : void 0 === free && (this.objects.setValue(reference.objNumber, new RegisteredObject(offset, reference)), 
            this.maxGenNumIndex = Math.max(this.maxGenNumIndex, reference.genNumber));
        }, PdfCrossTable.dereference = function(obj) {
            return null != obj && (obj = obj.object), obj;
        }, PdfCrossTable;
    }(), RegisteredObject = function() {
        function RegisteredObject(offset, reference, free) {
            if (void 0 === free) {
                var tempOffset = offset;
                this.offsetNumber = tempOffset;
                var tempReference = reference;
                this.generation = tempReference.genNumber, this.object = tempReference.objNumber, 
                this.type = ObjectType.Normal;
            } else {
                tempOffset = offset, tempReference = reference;
                this.constructor(tempOffset, tempReference), this.type = ObjectType.Free;
            }
        }
        return Object.defineProperty(RegisteredObject.prototype, "objectNumber", {
            get: function() {
                return this.object;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(RegisteredObject.prototype, "offset", {
            get: function() {
                return this.offsetNumber;
            },
            enumerable: !0,
            configurable: !0
        }), RegisteredObject;
    }(), PdfPageSize = function() {
        function PdfPageSize() {}
        return PdfPageSize.letter = new SizeF(612, 792), PdfPageSize.note = new SizeF(540, 720), 
        PdfPageSize.legal = new SizeF(612, 1008), PdfPageSize.a0 = new SizeF(2380, 3368), 
        PdfPageSize.a1 = new SizeF(1684, 2380), PdfPageSize.a2 = new SizeF(1190, 1684), 
        PdfPageSize.a3 = new SizeF(842, 1190), PdfPageSize.a4 = new SizeF(595, 842), PdfPageSize.a5 = new SizeF(421, 595), 
        PdfPageSize.a6 = new SizeF(297, 421), PdfPageSize.a7 = new SizeF(210, 297), PdfPageSize.a8 = new SizeF(148, 210), 
        PdfPageSize.a9 = new SizeF(105, 148), PdfPageSize.a10 = new SizeF(74, 105), PdfPageSize.b0 = new SizeF(2836, 4008), 
        PdfPageSize.b1 = new SizeF(2004, 2836), PdfPageSize.b2 = new SizeF(1418, 2004), 
        PdfPageSize.b3 = new SizeF(1002, 1418), PdfPageSize.b4 = new SizeF(709, 1002), PdfPageSize.b5 = new SizeF(501, 709), 
        PdfPageSize.archE = new SizeF(2592, 3456), PdfPageSize.archD = new SizeF(1728, 2592), 
        PdfPageSize.archC = new SizeF(1296, 1728), PdfPageSize.archB = new SizeF(864, 1296), 
        PdfPageSize.archA = new SizeF(648, 864), PdfPageSize.flsa = new SizeF(612, 936), 
        PdfPageSize.halfLetter = new SizeF(396, 612), PdfPageSize.letter11x17 = new SizeF(792, 1224), 
        PdfPageSize.ledger = new SizeF(1224, 792), PdfPageSize;
    }();
    !function(PdfPageOrientation) {
        PdfPageOrientation[PdfPageOrientation.Portrait = 0] = "Portrait", PdfPageOrientation[PdfPageOrientation.Landscape = 1] = "Landscape";
    }(PdfPageOrientation || (PdfPageOrientation = {}));
    var PdfPageRotateAngle;
    !function(PdfPageRotateAngle) {
        PdfPageRotateAngle[PdfPageRotateAngle.RotateAngle0 = 0] = "RotateAngle0", PdfPageRotateAngle[PdfPageRotateAngle.RotateAngle90 = 1] = "RotateAngle90", 
        PdfPageRotateAngle[PdfPageRotateAngle.RotateAngle180 = 2] = "RotateAngle180", PdfPageRotateAngle[PdfPageRotateAngle.RotateAngle270 = 3] = "RotateAngle270";
    }(PdfPageRotateAngle || (PdfPageRotateAngle = {}));
    var PdfNumberStyle;
    !function(PdfNumberStyle) {
        PdfNumberStyle[PdfNumberStyle.None = 0] = "None", PdfNumberStyle[PdfNumberStyle.Numeric = 1] = "Numeric", 
        PdfNumberStyle[PdfNumberStyle.LowerLatin = 2] = "LowerLatin", PdfNumberStyle[PdfNumberStyle.LowerRoman = 3] = "LowerRoman", 
        PdfNumberStyle[PdfNumberStyle.UpperLatin = 4] = "UpperLatin", PdfNumberStyle[PdfNumberStyle.UpperRoman = 5] = "UpperRoman";
    }(PdfNumberStyle || (PdfNumberStyle = {}));
    var PdfDockStyle;
    !function(PdfDockStyle) {
        PdfDockStyle[PdfDockStyle.None = 0] = "None", PdfDockStyle[PdfDockStyle.Bottom = 1] = "Bottom", 
        PdfDockStyle[PdfDockStyle.Top = 2] = "Top", PdfDockStyle[PdfDockStyle.Left = 3] = "Left", 
        PdfDockStyle[PdfDockStyle.Right = 4] = "Right", PdfDockStyle[PdfDockStyle.Fill = 5] = "Fill";
    }(PdfDockStyle || (PdfDockStyle = {}));
    var PdfAlignmentStyle;
    !function(PdfAlignmentStyle) {
        PdfAlignmentStyle[PdfAlignmentStyle.None = 0] = "None", PdfAlignmentStyle[PdfAlignmentStyle.TopLeft = 1] = "TopLeft", 
        PdfAlignmentStyle[PdfAlignmentStyle.TopCenter = 2] = "TopCenter", PdfAlignmentStyle[PdfAlignmentStyle.TopRight = 3] = "TopRight", 
        PdfAlignmentStyle[PdfAlignmentStyle.MiddleLeft = 4] = "MiddleLeft", PdfAlignmentStyle[PdfAlignmentStyle.MiddleCenter = 5] = "MiddleCenter", 
        PdfAlignmentStyle[PdfAlignmentStyle.MiddleRight = 6] = "MiddleRight", PdfAlignmentStyle[PdfAlignmentStyle.BottomLeft = 7] = "BottomLeft", 
        PdfAlignmentStyle[PdfAlignmentStyle.BottomCenter = 8] = "BottomCenter", PdfAlignmentStyle[PdfAlignmentStyle.BottomRight = 9] = "BottomRight";
    }(PdfAlignmentStyle || (PdfAlignmentStyle = {}));
    var TemplateType;
    !function(TemplateType) {
        TemplateType[TemplateType.None = 0] = "None", TemplateType[TemplateType.Top = 1] = "Top", 
        TemplateType[TemplateType.Bottom = 2] = "Bottom", TemplateType[TemplateType.Left = 3] = "Left", 
        TemplateType[TemplateType.Right = 4] = "Right";
    }(TemplateType || (TemplateType = {}));
    var ImageFormat, PdfMargins = function() {
        function PdfMargins() {
            this.pdfMargin = 40, this.setMargins(this.pdfMargin);
        }
        return Object.defineProperty(PdfMargins.prototype, "left", {
            get: function() {
                return this.leftMargin;
            },
            set: function(value) {
                this.leftMargin = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfMargins.prototype, "top", {
            get: function() {
                return this.topMargin;
            },
            set: function(value) {
                this.topMargin = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfMargins.prototype, "right", {
            get: function() {
                return this.rightMargin;
            },
            set: function(value) {
                this.rightMargin = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfMargins.prototype, "bottom", {
            get: function() {
                return this.bottomMargin;
            },
            set: function(value) {
                this.bottomMargin = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfMargins.prototype, "all", {
            set: function(value) {
                this.setMargins(value);
            },
            enumerable: !0,
            configurable: !0
        }), PdfMargins.prototype.setMargins = function(margin1, margin2, margin3, margin4) {
            void 0 === margin2 ? this.leftMargin = this.topMargin = this.rightMargin = this.bottomMargin = margin1 : void 0 === margin3 ? (this.leftMargin = this.rightMargin = margin1, 
            this.bottomMargin = this.topMargin = margin2) : (this.leftMargin = margin1, this.topMargin = margin2, 
            this.rightMargin = margin3, this.bottomMargin = margin4);
        }, PdfMargins.prototype.clone = function() {
            return this;
        }, PdfMargins;
    }(), PdfPageSettings = function() {
        function PdfPageSettings(margins) {
            this.pageMargins = new PdfMargins(), this.pageSize = PdfPageSize.a4, this.rotateAngle = PdfPageRotateAngle.RotateAngle0, 
            this.pageOrientation = PdfPageOrientation.Portrait, this.pageOrigin = new PointF(0, 0), 
            this.isRotation = !1, "number" == typeof margins && this.pageMargins.setMargins(margins);
        }
        return Object.defineProperty(PdfPageSettings.prototype, "size", {
            get: function() {
                return this.pageSize;
            },
            set: function(value) {
                this.setSize(value);
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPageSettings.prototype, "orientation", {
            get: function() {
                return this.pageOrientation;
            },
            set: function(orientation) {
                this.pageOrientation !== orientation && (this.pageOrientation = orientation, this.updateSize(orientation));
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPageSettings.prototype, "margins", {
            get: function() {
                return this.pageMargins;
            },
            set: function(value) {
                this.pageMargins = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPageSettings.prototype, "width", {
            get: function() {
                return this.pageSize.width;
            },
            set: function(value) {
                this.pageSize.width = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPageSettings.prototype, "height", {
            get: function() {
                return this.pageSize.height;
            },
            set: function(value) {
                this.pageSize.height = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPageSettings.prototype, "origin", {
            get: function() {
                return this.pageOrigin;
            },
            set: function(value) {
                this.pageOrigin = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPageSettings.prototype, "rotate", {
            get: function() {
                return this.rotateAngle;
            },
            set: function(value) {
                this.rotateAngle = value, this.isRotation = !0;
            },
            enumerable: !0,
            configurable: !0
        }), PdfPageSettings.prototype.updateSize = function(orientation) {
            var min = Math.min(this.pageSize.width, this.pageSize.height), max = Math.max(this.pageSize.width, this.pageSize.height);
            switch (orientation) {
              case PdfPageOrientation.Portrait:
                this.pageSize = new SizeF(min, max);
                break;

              case PdfPageOrientation.Landscape:
                this.pageSize = new SizeF(max, min);
            }
        }, PdfPageSettings.prototype.clone = function() {
            return this.pageMargins = this.pageMargins.clone(), this;
        }, PdfPageSettings.prototype.getActualSize = function() {
            var width = this.width - (this.margins.left + this.margins.right), height = this.height - (this.margins.top + this.margins.bottom);
            return new SizeF(width, height);
        }, PdfPageSettings.prototype.setSize = function(size) {
            var min = Math.min(size.width, size.height), max = Math.max(size.width, size.height);
            this.orientation === PdfPageOrientation.Portrait ? this.pageSize = new SizeF(min, max) : this.pageSize = new SizeF(max, min);
        }, PdfPageSettings;
    }(), PdfStreamWriter = function() {
        function PdfStreamWriter(stream) {
            if (null == stream) throw new Error("ArgumentNullException:stream");
            this.stream = stream;
        }
        return PdfStreamWriter.prototype.clear = function() {
            this.stream.clearStream();
        }, PdfStreamWriter.prototype.setGraphicsState = function(dictionaryName) {
            dictionaryName instanceof PdfName ? (this.stream.write(dictionaryName.toString()), 
            this.stream.write(Operators.whiteSpace), this.writeOperator(Operators.setGraphicsState)) : (this.stream.write(Operators.slash), 
            this.stream.write(dictionaryName), this.stream.write(Operators.whiteSpace), this.writeOperator(Operators.setGraphicsState));
        }, PdfStreamWriter.prototype.executeObject = function(name) {
            this.stream.write(name.toString()), this.stream.write(Operators.whiteSpace), this.writeOperator(Operators.paintXObject), 
            this.stream.write(Operators.newLine);
        }, PdfStreamWriter.prototype.closePath = function() {
            this.writeOperator(Operators.closePath);
        }, PdfStreamWriter.prototype.clipPath = function(useEvenOddRule) {
            this.stream.write(Operators.clipPath), useEvenOddRule && this.stream.write(Operators.evenOdd), 
            this.stream.write(Operators.whiteSpace), this.stream.write(Operators.endPath), this.stream.write(Operators.newLine);
        }, PdfStreamWriter.prototype.closeFillStrokePath = function(useEvenOddRule) {
            this.stream.write(Operators.closeFillStrokePath), useEvenOddRule ? (this.stream.write(Operators.evenOdd), 
            this.stream.write(Operators.newLine)) : this.stream.write(Operators.newLine);
        }, PdfStreamWriter.prototype.fillStrokePath = function(useEvenOddRule) {
            this.stream.write(Operators.fillStroke), useEvenOddRule ? (this.stream.write(Operators.evenOdd), 
            this.stream.write(Operators.newLine)) : this.stream.write(Operators.newLine);
        }, PdfStreamWriter.prototype.fillPath = function(useEvenOddRule) {
            this.stream.write(Operators.fill), useEvenOddRule ? (this.stream.write(Operators.evenOdd), 
            this.stream.write(Operators.newLine)) : this.stream.write(Operators.newLine);
        }, PdfStreamWriter.prototype.endPath = function() {
            this.writeOperator(Operators.n);
        }, PdfStreamWriter.prototype.closeFillPath = function(useEvenOddRule) {
            this.writeOperator(Operators.closePath), this.stream.write(Operators.fill), useEvenOddRule ? (this.stream.write(Operators.evenOdd), 
            this.stream.write(Operators.newLine)) : this.stream.write(Operators.newLine);
        }, PdfStreamWriter.prototype.closeStrokePath = function() {
            this.writeOperator(Operators.closeStrokePath);
        }, PdfStreamWriter.prototype.setTextScaling = function(textScaling) {
            this.stream.write(PdfNumber.floatToString(textScaling)), this.stream.write(Operators.whiteSpace), 
            this.writeOperator(Operators.setTextScaling);
        }, PdfStreamWriter.prototype.strokePath = function() {
            this.writeOperator(Operators.stroke);
        }, PdfStreamWriter.prototype.restoreGraphicsState = function() {
            this.writeOperator(Operators.restoreState);
        }, PdfStreamWriter.prototype.saveGraphicsState = function() {
            this.writeOperator(Operators.saveState);
        }, PdfStreamWriter.prototype.startNextLine = function(arg1, arg2) {
            void 0 === arg1 ? this.writeOperator(Operators.goToNextLine) : arg1 instanceof PointF ? (this.writePoint(arg1), 
            this.writeOperator(Operators.setCoords)) : (this.writePoint(arg1, arg2), this.writeOperator(Operators.setCoords));
        }, PdfStreamWriter.prototype.setLeading = function(leading) {
            this.stream.write(PdfNumber.floatToString(leading)), this.stream.write(Operators.whiteSpace), 
            this.writeOperator(Operators.setTextLeading);
        }, PdfStreamWriter.prototype.beginPath = function(x, y) {
            this.writePoint(x, y), this.writeOperator(Operators.beginPath);
        }, PdfStreamWriter.prototype.beginText = function() {
            this.writeOperator(Operators.beginText);
        }, PdfStreamWriter.prototype.endText = function() {
            this.writeOperator(Operators.endText);
        }, PdfStreamWriter.prototype.appendRectangle = function(arg1, arg2, arg3, arg4) {
            arg1 instanceof RectangleF ? this.appendRectangle(arg1.x, arg1.y, arg1.width, arg1.height) : (this.writePoint(arg1, arg2), 
            this.writePoint(arg3, arg4), this.writeOperator(Operators.appendRectangle));
        }, PdfStreamWriter.prototype.appendLineSegment = function(arg1, arg2) {
            arg1 instanceof PointF ? this.appendLineSegment(arg1.x, arg1.y) : (this.writePoint(arg1, arg2), 
            this.writeOperator(Operators.appendLineSegment));
        }, PdfStreamWriter.prototype.setTextRenderingMode = function(renderingMode) {
            this.stream.write(renderingMode.toString()), this.stream.write(Operators.whiteSpace), 
            this.writeOperator(Operators.setRenderingMode);
        }, PdfStreamWriter.prototype.setCharacterSpacing = function(charSpacing) {
            this.stream.write(PdfNumber.floatToString(charSpacing)), this.stream.write(Operators.whiteSpace), 
            this.stream.write(Operators.setCharacterSpace), this.stream.write(Operators.newLine);
        }, PdfStreamWriter.prototype.setWordSpacing = function(wordSpacing) {
            this.stream.write(PdfNumber.floatToString(wordSpacing)), this.stream.write(Operators.whiteSpace), 
            this.writeOperator(Operators.setWordSpace);
        }, PdfStreamWriter.prototype.showNextLineText = function(arg1, arg2) {
            arg1 instanceof PdfString ? (this.checkTextParam(arg1), this.writeText(arg1), this.writeOperator(Operators.setTextOnNewLine)) : (this.checkTextParam(arg1), 
            this.writeText(arg1, arg2), this.writeOperator(Operators.setTextOnNewLine));
        }, PdfStreamWriter.prototype.setColorSpace = function(arg1, arg2) {
            if (arg1 instanceof PdfName && "boolean" == typeof arg2) {
                var temparg1 = arg1, op = (temparg2 = arg2) ? Operators.selectcolorspaceforstroking : Operators.selectcolorspacefornonstroking;
                this.stream.write(temparg1.toString()), this.stream.write(Operators.whiteSpace), 
                this.stream.write(op), this.stream.write(Operators.newLine);
            } else {
                temparg1 = arg1;
                var temparg2 = arg2;
                this.setColorSpace(new PdfName(temparg1), temparg2);
            }
        }, PdfStreamWriter.prototype.modifyCtm = function(matrix) {
            if (null == matrix) throw new Error("ArgumentNullException:matrix");
            this.stream.write(matrix.toString()), this.stream.write(Operators.whiteSpace), this.writeOperator(Operators.modifyCtm);
        }, PdfStreamWriter.prototype.setFont = function(font, name, size) {
            if ("string" == typeof name) this.setFont(font, new PdfName(name), size); else {
                if (null == font) throw new Error("ArgumentNullException:font");
                this.stream.write(name.toString()), this.stream.write(Operators.whiteSpace), this.stream.write(PdfNumber.floatToString(size)), 
                this.stream.write(Operators.whiteSpace), this.writeOperator(Operators.setFont);
            }
        }, PdfStreamWriter.prototype.writeOperator = function(opcode) {
            this.stream.write(opcode), this.stream.write(Operators.newLine);
        }, PdfStreamWriter.prototype.checkTextParam = function(text) {
            if (null == text) throw new Error("ArgumentNullException:text");
            if ("string" == typeof text && "" === text) throw new Error("ArgumentException:The text can not be an empty string, text");
        }, PdfStreamWriter.prototype.writeText = function(arg1, arg2) {
            if (arg1 instanceof PdfString && void 0 === arg2) this.stream.write(arg1.value); else {
                var start = void 0, end = void 0;
                arg2 ? (start = PdfString.hexStringMark[0], end = PdfString.hexStringMark[1]) : (start = PdfString.stringMark[0], 
                end = PdfString.stringMark[1]), this.stream.write(start), this.stream.write(arg1), 
                this.stream.write(end);
            }
        }, PdfStreamWriter.prototype.writePoint = function(arg1, arg2) {
            if (arg1 instanceof PointF && void 0 === arg2) this.writePoint(arg1.x, arg1.y); else {
                var temparg1 = arg1;
                this.stream.write(PdfNumber.floatToString(temparg1)), this.stream.write(Operators.whiteSpace), 
                arg2 = this.updateY(arg2), this.stream.write(PdfNumber.floatToString(arg2)), this.stream.write(Operators.whiteSpace);
            }
        }, PdfStreamWriter.prototype.updateY = function(arg) {
            return -arg;
        }, PdfStreamWriter.prototype.write = function(string) {
            var builder = "";
            builder += string, builder += Operators.newLine, this.writeOperator(builder);
        }, PdfStreamWriter.prototype.writeComment = function(comment) {
            if (!(null != comment && comment.length > 0)) throw new Error("Invalid comment");
            var builder = "";
            builder += Operators.comment, builder += Operators.whiteSpace, builder += comment, 
            this.writeOperator(builder);
        }, PdfStreamWriter.prototype.setColorAndSpace = function(color, colorSpace, forStroking) {
            color.isEmpty || (this.stream.write(color.toString(colorSpace, forStroking)), this.stream.write(Operators.newLine));
        }, PdfStreamWriter.prototype.setLineDashPattern = function(pattern, patternOffset) {
            this.setLineDashPatternHelper(pattern, patternOffset);
        }, PdfStreamWriter.prototype.setLineDashPatternHelper = function(pattern, patternOffset) {
            var tempPattern = "[";
            if (pattern.length > 1) for (var index = 0; index < pattern.length; index++) index === pattern.length - 1 ? tempPattern += pattern[index].toString() : tempPattern += pattern[index].toString() + " ";
            tempPattern += "] ", tempPattern += patternOffset.toString(), tempPattern += " " + Operators.setDashPattern, 
            this.stream.write(tempPattern), this.stream.write(Operators.newLine);
        }, PdfStreamWriter.prototype.setMiterLimit = function(miterLimit) {
            this.stream.write(PdfNumber.floatToString(miterLimit)), this.stream.write(Operators.whiteSpace), 
            this.writeOperator(Operators.setMiterLimit);
        }, PdfStreamWriter.prototype.setLineWidth = function(width) {
            this.stream.write(PdfNumber.floatToString(width)), this.stream.write(Operators.whiteSpace), 
            this.writeOperator(Operators.setLineWidth);
        }, PdfStreamWriter.prototype.setLineCap = function(lineCapStyle) {
            this.stream.write(lineCapStyle.toString()), this.stream.write(Operators.whiteSpace), 
            this.writeOperator(Operators.setLineCapStyle);
        }, PdfStreamWriter.prototype.setLineJoin = function(lineJoinStyle) {
            this.stream.write(lineJoinStyle.toString()), this.stream.write(Operators.whiteSpace), 
            this.writeOperator(Operators.setLineJoinStyle);
        }, Object.defineProperty(PdfStreamWriter.prototype, "position", {
            get: function() {
                return this.stream.position;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfStreamWriter.prototype, "length", {
            get: function() {
                var returnValue = 0;
                if (0 !== this.stream.data.length && -1 !== this.stream.data.length) for (var index = 0; index < this.stream.data.length; index++) returnValue += this.stream.data[index].length;
                return returnValue;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfStreamWriter.prototype, "document", {
            get: function() {
                return null;
            },
            enumerable: !0,
            configurable: !0
        }), PdfStreamWriter;
    }(), PdfPen = function() {
        function PdfPen(arg1, arg2) {
            this.pdfColor = new PdfColor(0, 0, 0), this.dashOffsetValue = 0, this.penDashPattern = [ 0 ], 
            this.pdfDashStyle = PdfDashStyle.Solid, this.pdfLineCap = 0, this.pdfLineJoin = 0, 
            this.penWidth = 1, this.internalMiterLimit = 0, this.colorSpace = PdfColorSpace.Rgb, 
            "number" == typeof arg2 ? (this.constructor(arg1), this.width = arg2) : void 0 === arg2 && arg1 instanceof PdfBrush ? this.setBrush(arg1) : void 0 === arg2 && arg1 instanceof PdfColor && (this.color = arg1);
        }
        return Object.defineProperty(PdfPen.prototype, "color", {
            get: function() {
                return this.pdfColor;
            },
            set: function(value) {
                this.pdfColor = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPen.prototype, "dashOffset", {
            get: function() {
                return void 0 === this.dashOffsetValue || null == this.dashOffsetValue ? 0 : this.dashOffsetValue;
            },
            set: function(value) {
                this.dashOffsetValue = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPen.prototype, "dashPattern", {
            get: function() {
                return this.penDashPattern;
            },
            set: function(value) {
                this.penDashPattern = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPen.prototype, "dashStyle", {
            get: function() {
                return this.pdfDashStyle;
            },
            set: function(value) {
                if (this.pdfDashStyle !== value) switch (this.pdfDashStyle = value, this.pdfDashStyle) {
                  case PdfDashStyle.Custom:
                    break;

                  case PdfDashStyle.Dash:
                    this.penDashPattern = [ 3, 1 ];
                    break;

                  case PdfDashStyle.Dot:
                    this.penDashPattern = [ 1, 1 ];
                    break;

                  case PdfDashStyle.DashDot:
                    this.penDashPattern = [ 3, 1, 1, 1 ];
                    break;

                  case PdfDashStyle.DashDotDot:
                    this.penDashPattern = [ 3, 1, 1, 1, 1, 1 ];
                    break;

                  case PdfDashStyle.Solid:
                    break;

                  default:
                    this.pdfDashStyle = PdfDashStyle.Solid, this.penDashPattern = [ 0 ];
                }
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPen.prototype, "lineCap", {
            get: function() {
                return this.pdfLineCap;
            },
            set: function(value) {
                this.pdfLineCap = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPen.prototype, "lineJoin", {
            get: function() {
                return this.pdfLineJoin;
            },
            set: function(value) {
                this.pdfLineJoin = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPen.prototype, "miterLimit", {
            get: function() {
                return this.internalMiterLimit;
            },
            set: function(value) {
                this.internalMiterLimit = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPen.prototype, "width", {
            get: function() {
                return this.penWidth;
            },
            set: function(value) {
                this.penWidth = value;
            },
            enumerable: !0,
            configurable: !0
        }), PdfPen.prototype.clone = function() {
            return this;
        }, PdfPen.prototype.setBrush = function(brush) {
            var sBrush = brush;
            this.color = sBrush.color, this.pdfBrush = sBrush;
        }, PdfPen.prototype.monitorChanges = function(currentPen, streamWriter, getResources, saveState, currentColorSpace, matrix) {
            saveState = !0, this.dashControl(currentPen, saveState, streamWriter), streamWriter.setLineWidth(this.width), 
            streamWriter.setLineJoin(this.lineJoin), streamWriter.setLineCap(this.lineCap);
            var miterLimit = this.miterLimit;
            miterLimit > 0 && streamWriter.setMiterLimit(miterLimit);
            this.pdfBrush;
            return streamWriter.setColorAndSpace(this.color, currentColorSpace, !0), !0;
        }, PdfPen.prototype.dashControl = function(pen, saveState, streamWriter) {
            saveState = !0;
            var lineWidth = this.width, pattern = this.getPattern();
            return streamWriter.setLineDashPattern(pattern, this.dashOffset * lineWidth), saveState;
        }, PdfPen.prototype.getPattern = function() {
            for (var pattern = this.dashPattern, i = 0; i < pattern.length; ++i) pattern[i] *= this.width;
            return pattern;
        }, PdfPen;
    }(), PdfTransformationMatrix = function() {
        function PdfTransformationMatrix(value) {
            this.radDegFactor = 180 / Math.PI, this.transformationMatrix = new Matrix(1, 0, 0, void 0 === value ? 1 : -1, 0, 0);
        }
        return Object.defineProperty(PdfTransformationMatrix.prototype, "matrix", {
            get: function() {
                return this.transformationMatrix;
            },
            set: function(value) {
                this.transformationMatrix = value;
            },
            enumerable: !0,
            configurable: !0
        }), PdfTransformationMatrix.prototype.translate = function(offsetX, offsetY) {
            this.transformationMatrix.translate(offsetX, offsetY);
        }, PdfTransformationMatrix.prototype.scale = function(scaleX, scaleY) {
            this.transformationMatrix.elements[0] = scaleX, this.transformationMatrix.elements[3] = scaleY;
        }, PdfTransformationMatrix.prototype.rotate = function(angle) {
            angle = angle * Math.PI / 180, this.transformationMatrix.elements[0] = Math.cos(angle), 
            this.transformationMatrix.elements[1] = Math.sin(angle), this.transformationMatrix.elements[2] = -Math.sin(angle), 
            this.transformationMatrix.elements[3] = Math.cos(angle);
        }, PdfTransformationMatrix.prototype.toString = function() {
            for (var builder = "", i = 0, len = this.transformationMatrix.elements.length; i < len; i++) {
                this.matrix.elements[i];
                builder += PdfNumber.floatToString(this.transformationMatrix.elements[i]), builder += " ";
            }
            return builder;
        }, PdfTransformationMatrix.prototype.multiply = function(matrix) {
            this.transformationMatrix.multiply(matrix.matrix);
        }, PdfTransformationMatrix.degreesToRadians = function(degreesX) {
            return this.degRadFactor * degreesX;
        }, PdfTransformationMatrix.prototype.radiansToDegrees = function(radians) {
            return this.radDegFactor * radians;
        }, PdfTransformationMatrix.prototype.clone = function() {
            return this;
        }, PdfTransformationMatrix.degRadFactor = Math.PI / 180, PdfTransformationMatrix;
    }(), Matrix = function() {
        function Matrix(arg1, arg2, arg3, arg4, arg5, arg6) {
            void 0 === arg1 ? this.metrixElements = [] : "number" == typeof arg1 ? (this.constructor(), 
            this.metrixElements.push(arg1), this.metrixElements.push(arg2), this.metrixElements.push(arg3), 
            this.metrixElements.push(arg4), this.metrixElements.push(arg5), this.metrixElements.push(arg6)) : this.metrixElements = arg1;
        }
        return Object.defineProperty(Matrix.prototype, "elements", {
            get: function() {
                return this.metrixElements;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(Matrix.prototype, "offsetX", {
            get: function() {
                return this.metrixElements[4];
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(Matrix.prototype, "offsetY", {
            get: function() {
                return this.metrixElements[5];
            },
            enumerable: !0,
            configurable: !0
        }), Matrix.prototype.translate = function(offsetX, offsetY) {
            this.metrixElements[4] = offsetX, this.metrixElements[5] = offsetY;
        }, Matrix.prototype.transform = function(point) {
            var x = point.x, y = point.y, x2 = x * this.elements[0] + y * this.elements[2] + this.offsetX, y2 = x * this.elements[1] + y * this.elements[3] + this.offsetY;
            return new PointF(x2, y2);
        }, Matrix.prototype.multiply = function(matrix) {
            var tempMatrix = [];
            tempMatrix.push(this.elements[0] * matrix.elements[0] + this.elements[1] * matrix.elements[2]), 
            tempMatrix[1] = this.elements[0] * matrix.elements[1] + this.elements[1] * matrix.elements[3], 
            tempMatrix[2] = this.elements[2] * matrix.elements[0] + this.elements[3] * matrix.elements[2], 
            tempMatrix[3] = this.elements[2] * matrix.elements[1] + this.elements[3] * matrix.elements[3], 
            tempMatrix[4] = this.offsetX * matrix.elements[0] + this.offsetY * matrix.elements[2] + matrix.offsetX, 
            tempMatrix[5] = this.offsetX * matrix.elements[1] + this.offsetY * matrix.elements[3] + matrix.offsetY;
            for (var i = 0; i < tempMatrix.length; i++) this.elements[i] = tempMatrix[i];
        }, Matrix.prototype.dispose = function() {
            this.metrixElements = null;
        }, Matrix.prototype.clone = function() {
            return new Matrix(this.metrixElements);
        }, Matrix;
    }(), ProcedureSets = function() {
        return function() {
            this.pdf = "PDF", this.text = "Text", this.imageB = "ImageB", this.imageC = "ImageC", 
            this.imageI = "ImageI";
        };
    }(), TemporaryDictionary = function() {
        function TemporaryDictionary() {
            this.mKeys = [], this.mValues = [];
        }
        return TemporaryDictionary.prototype.size = function() {
            return this.mKeys.length;
        }, TemporaryDictionary.prototype.add = function(key, value) {
            if (void 0 === key || null === key || void 0 === value || null === value) throw new ReferenceError("Provided key or value is not valid.");
            if (this.mKeys.indexOf(key) < 0) return this.mKeys.push(key), this.mValues.push(value), 
            1;
            throw new RangeError("An item with the same key has already been added.");
        }, TemporaryDictionary.prototype.keys = function() {
            return this.mKeys;
        }, TemporaryDictionary.prototype.values = function() {
            return this.mValues;
        }, TemporaryDictionary.prototype.getValue = function(key) {
            if (void 0 === key || null === key) throw new ReferenceError("Provided key is not valid.");
            var index = this.mKeys.indexOf(key);
            if (index < 0) throw new RangeError("No item with the specified key has been added.");
            return this.mValues[index];
        }, TemporaryDictionary.prototype.setValue = function(key, value) {
            if (void 0 === key || null === key) throw new ReferenceError("Provided key is not valid.");
            var index = this.mKeys.indexOf(key);
            index < 0 ? (this.mKeys.push(key), this.mValues.push(value)) : this.mValues[index] = value;
        }, TemporaryDictionary.prototype.remove = function(key) {
            if (void 0 === key || null === key) throw new ReferenceError("Provided key is not valid.");
            var index = this.mKeys.indexOf(key);
            if (index < 0) throw new RangeError("No item with the specified key has been added.");
            return this.mKeys.splice(index, 1), this.mValues.splice(index, 1), !0;
        }, TemporaryDictionary.prototype.containsKey = function(key) {
            if (void 0 === key || null === key) throw new ReferenceError("Provided key is not valid.");
            return !(this.mKeys.indexOf(key) < 0);
        }, TemporaryDictionary.prototype.clear = function() {
            this.mKeys = [], this.mValues = [];
        }, TemporaryDictionary;
    }(), PdfTransparency = function() {
        function PdfTransparency(stroke, fill, mode) {
            this.dictionary = new PdfDictionary(), this.dictionaryProperties = new DictionaryProperties(), 
            this.dictionary.items.setValue(this.dictionaryProperties.CA, new PdfNumber(stroke)), 
            this.dictionary.items.setValue(this.dictionaryProperties.ca, new PdfNumber(fill)), 
            this.dictionary.items.setValue(this.dictionaryProperties.BM, new PdfName(mode.toString()));
        }
        return Object.defineProperty(PdfTransparency.prototype, "element", {
            get: function() {
                return this.dictionary;
            },
            enumerable: !0,
            configurable: !0
        }), PdfTransparency;
    }(), PdfAutomaticFieldInfoCollection = function() {
        function PdfAutomaticFieldInfoCollection() {
            this.automaticFieldsInformation = [];
        }
        return Object.defineProperty(PdfAutomaticFieldInfoCollection.prototype, "automaticFields", {
            get: function() {
                return this.automaticFieldsInformation;
            },
            enumerable: !0,
            configurable: !0
        }), PdfAutomaticFieldInfoCollection.prototype.add = function(fieldInfo) {
            return this.automaticFields.push(fieldInfo);
        }, PdfAutomaticFieldInfoCollection;
    }(), PdfGraphicsElement = function() {
        function PdfGraphicsElement() {}
        return PdfGraphicsElement.prototype.drawHelper = function(graphics, x, y) {
            var bNeedSave = 0 !== x || 0 !== y, gState = null;
            bNeedSave && (gState = graphics.save(), graphics.translateTransform(x, y)), this.drawInternal(graphics), 
            bNeedSave && graphics.restore(gState);
        }, PdfGraphicsElement;
    }(), __extends$10$1 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), PdfAutomaticField = function(_super) {
        function PdfAutomaticField() {
            var _this = _super.call(this) || this;
            return _this.internalBounds = new RectangleF(0, 0, 0, 0), _this.internalTemplateSize = new SizeF(0, 0), 
            _this;
        }
        return __extends$10$1(PdfAutomaticField, _super), Object.defineProperty(PdfAutomaticField.prototype, "bounds", {
            get: function() {
                return this.internalBounds;
            },
            set: function(value) {
                this.internalBounds = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfAutomaticField.prototype, "size", {
            get: function() {
                return new SizeF(this.bounds.width, this.bounds.height);
            },
            set: function(value) {
                this.bounds.width = value.width, this.bounds.height = value.height;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfAutomaticField.prototype, "location", {
            get: function() {
                return new PointF(this.bounds.x, this.bounds.y);
            },
            set: function(value) {
                this.bounds.x = value.x, this.bounds.y = value.y;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfAutomaticField.prototype, "font", {
            get: function() {
                return this.internalFont;
            },
            set: function(value) {
                this.internalFont = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfAutomaticField.prototype, "brush", {
            get: function() {
                return this.internalBrush;
            },
            set: function(value) {
                this.internalBrush = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfAutomaticField.prototype, "pen", {
            get: function() {
                return this.internalPen;
            },
            set: function(value) {
                this.internalPen = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfAutomaticField.prototype, "stringFormat", {
            get: function() {
                return this.internalStringFormat;
            },
            set: function(value) {
                this.internalStringFormat = value;
            },
            enumerable: !0,
            configurable: !0
        }), PdfAutomaticField.prototype.performDrawHelper = function(graphics, location, scalingX, scalingY) {
            if (0 === this.bounds.height || 0 === this.bounds.width) {
                var text = this.getValue(graphics);
                this.internalTemplateSize = this.getFont().measureString(text, this.size, this.stringFormat);
            }
        }, PdfAutomaticField.prototype.draw = function(arg1, arg2, arg3) {
            if (void 0 === arg2) {
                var location_1 = new PointF(0, 0);
                this.draw(arg1, location_1);
            } else if (arg2 instanceof PointF) this.draw(arg1, arg2.x, arg2.y); else {
                this.drawHelper(arg1, arg2, arg3);
                var info = new PdfAutomaticFieldInfo(this, new PointF(arg2, arg3));
                arg1.automaticFields.add(info);
            }
        }, PdfAutomaticField.prototype.getSize = function() {
            return 0 === this.bounds.height || 0 === this.bounds.width ? this.internalTemplateSize : this.size;
        }, PdfAutomaticField.prototype.drawInternal = function(graphics) {}, PdfAutomaticField.prototype.getBrush = function() {
            return void 0 === this.internalBrush || null == this.internalBrush ? new PdfSolidBrush(new PdfColor(0, 0, 0)) : this.internalBrush;
        }, PdfAutomaticField.prototype.getFont = function() {
            return void 0 === this.internalFont || null == this.internalFont ? PdfDocument.defaultFont : this.internalFont;
        }, PdfAutomaticField.prototype.getPageFromGraphics = function(graphics) {
            if (void 0 !== graphics.page && null !== graphics.page) {
                return graphics.page;
            }
            return graphics.currentPage;
        }, PdfAutomaticField;
    }(PdfGraphicsElement), PdfAutomaticFieldInfo = function() {
        function PdfAutomaticFieldInfo(field, location, scaleX, scaleY) {
            this.pageNumberFieldLocation = new PointF(), this.pageNumberField = null, this.scaleX = 1, 
            this.scaleY = 1, void 0 === location && field instanceof PdfAutomaticFieldInfo ? (this.pageNumberField = field.field, 
            this.pageNumberFieldLocation = field.location, this.scaleX = field.scalingX, this.scaleY = field.scalingY) : void 0 === scaleX && location instanceof PointF && field instanceof PdfAutomaticField ? (this.pageNumberField = field, 
            this.pageNumberFieldLocation = location) : (this.pageNumberField = field, this.pageNumberFieldLocation = location, 
            this.scaleX = scaleX, this.scaleY = scaleY);
        }
        return Object.defineProperty(PdfAutomaticFieldInfo.prototype, "location", {
            get: function() {
                return this.pageNumberFieldLocation;
            },
            set: function(value) {
                this.pageNumberFieldLocation = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfAutomaticFieldInfo.prototype, "field", {
            get: function() {
                return this.pageNumberField;
            },
            set: function(value) {
                this.pageNumberField = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfAutomaticFieldInfo.prototype, "scalingX", {
            get: function() {
                return this.scaleX;
            },
            set: function(value) {
                this.scaleX = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfAutomaticFieldInfo.prototype, "scalingY", {
            get: function() {
                return this.scaleY;
            },
            set: function(value) {
                this.scaleY = value;
            },
            enumerable: !0,
            configurable: !0
        }), PdfAutomaticFieldInfo;
    }(), PdfGraphics = function() {
        function PdfGraphics(arg1, arg2, arg3) {
            this.currentColorSpace = PdfColorSpace.Rgb, this.previousTextRenderingMode = TextRenderingMode.Fill, 
            this.previousCharacterSpacing = 0, this.previousWordSpacing = 0, this.previousTextScaling = 100, 
            this.procedureSets = new ProcedureSets(), this.isNormalRender = !0, this.isUseFontSize = !1, 
            this.isItalic = !1, this.isEmfTextScaled = !1, this.isEmf = !1, this.isEmfPlus = !1, 
            this.isBaselineFormat = !0, this.emfScalingFactor = new SizeF(0, 0), this.colorSpaceChanged = !1, 
            this.dictionaryProperties = new DictionaryProperties(), this.isOverloadWithPosition = !1, 
            this.isPointOverload = !1, this.currentColorSpaces = [ "RGB", "CMYK", "GrayScale", "Indexed" ], 
            this.isImageOptimized = !1, this.graphicsState = [], this.istransparencySet = !1, 
            this.internalAutomaticFields = null, this.startCutIndex = -1, arg3 instanceof PdfStreamWriter ? (this.pdfStreamWriter = arg3, 
            this.getResources = arg2, this.canvasSize = arg1, this.initialize()) : this.constructor(arg1, arg2, new PdfStreamWriter(arg3));
        }
        return Object.defineProperty(PdfGraphics.prototype, "stringLayoutResult", {
            get: function() {
                return this.pdfStringLayoutResult;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGraphics.prototype, "size", {
            get: function() {
                return this.canvasSize;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGraphics.prototype, "mediaBoxUpperRightBound", {
            get: function() {
                return void 0 === this.internalMediaBoxUpperRightBound && (this.internalMediaBoxUpperRightBound = 0), 
                this.internalMediaBoxUpperRightBound;
            },
            set: function(value) {
                this.internalMediaBoxUpperRightBound = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGraphics.prototype, "clientSize", {
            get: function() {
                return new SizeF(this.clipBounds.width, this.clipBounds.height);
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGraphics.prototype, "colorSpace", {
            get: function() {
                return this.currentColorSpace;
            },
            set: function(value) {
                this.currentColorSpace = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGraphics.prototype, "streamWriter", {
            get: function() {
                return this.pdfStreamWriter;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGraphics.prototype, "matrix", {
            get: function() {
                return null == this.transformationMatrix && (this.transformationMatrix = new PdfTransformationMatrix()), 
                this.transformationMatrix;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGraphics.prototype, "layer", {
            get: function() {
                return this.pageLayer;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGraphics.prototype, "page", {
            get: function() {
                return this.pageLayer.page;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGraphics.prototype, "automaticFields", {
            get: function() {
                return null != this.internalAutomaticFields && void 0 !== this.internalAutomaticFields || (this.internalAutomaticFields = new PdfAutomaticFieldInfoCollection()), 
                this.internalAutomaticFields;
            },
            enumerable: !0,
            configurable: !0
        }), PdfGraphics.prototype.initialize = function() {
            this.bStateSaved = !1, this.currentPen = null, this.currentBrush = null, this.currentFont = null, 
            this.currentColorSpace = PdfColorSpace.Rgb, this.bCSInitialized = !1, this.transformationMatrix = null, 
            this.previousTextRenderingMode = -1, this.previousCharacterSpacing = -1, this.previousWordSpacing = -1, 
            this.previousTextScaling = -100, this.currentStringFormat = null, this.clipBounds = new RectangleF(new PointF(0, 0), this.size), 
            this.getResources.getResources().requireProcedureSet(this.procedureSets.pdf);
        }, PdfGraphics.prototype.drawPdfTemplate = function(template, location, size) {
            if (void 0 === size) {
                if (null == template) throw Error("ArgumentNullException-template");
                this.drawPdfTemplate(template, location, template.size);
            } else {
                if (null == template) throw Error("ArgumentNullException-template");
                var scaleX = template.width > 0 ? size.width / template.width : 1, scaleY = template.height > 0 ? size.height / template.height : 1, bNeedScale = !(1 === scaleX && 1 === scaleY), state = this.save(), matrix = new PdfTransformationMatrix();
                null != this.pageLayer && this.getTranslateTransform(location.x, location.y + size.height, matrix), 
                bNeedScale && this.getScaleTransform(scaleX, scaleY, matrix), this.pdfStreamWriter.modifyCtm(matrix);
                var name_1 = this.getResources.getResources().getName(template);
                this.pdfStreamWriter.executeObject(name_1), this.restore(state);
                var g = template.graphics;
                if (null != g) for (var index = 0; index < g.automaticFields.automaticFields.length; index++) {
                    var fieldInfo = g.automaticFields.automaticFields[index], newLocation = new PointF(fieldInfo.location.x + location.x, fieldInfo.location.y + location.y), scalingX = 0 == template.size.width ? 0 : size.width / template.size.width, scalingY = 0 == template.size.height ? 0 : size.height / template.size.height;
                    this.automaticFields.add(new PdfAutomaticFieldInfo(fieldInfo.field, newLocation, scalingX, scalingY)), 
                    this.page.dictionary.modify();
                }
                this.getResources.getResources().requireProcedureSet(this.procedureSets.imageB), 
                this.getResources.getResources().requireProcedureSet(this.procedureSets.imageC), 
                this.getResources.getResources().requireProcedureSet(this.procedureSets.imageI), 
                this.getResources.getResources().requireProcedureSet(this.procedureSets.text);
            }
        }, PdfGraphics.prototype.drawString = function(arg1, arg2, arg3, arg4, arg5, arg6, arg7, arg8, arg9) {
            if ("string" == typeof arg1 && arg2 instanceof PdfFont && (arg3 instanceof PdfPen || null === arg3) && (arg4 instanceof PdfBrush || null === arg4) && "number" == typeof arg5 && "number" == typeof arg6 && (arg7 instanceof PdfStringFormat || null === arg7) && void 0 === arg8) this.isOverloadWithPosition = !0, 
            this.drawString(arg1, arg2, arg3, arg4, arg5, arg6, this.clientSize.width - arg5, 0, arg7); else {
                var temparg3 = arg3, temparg4 = arg4, temparg5 = arg5, temparg6 = arg6, temparg7 = arg7, temparg8 = arg8, temparg9 = arg9, result = new PdfStringLayouter().layout(arg1, arg2, temparg9, new SizeF(temparg7, 0), this.isOverloadWithPosition, this.clientSize);
                if (!result.empty) {
                    var rect = this.checkCorrectLayoutRectangle(result.actualSize, temparg5, temparg6, temparg9);
                    temparg7 <= 0 && (temparg5 = rect.x, temparg7 = rect.width), temparg8 <= 0 && (temparg6 = rect.y, 
                    temparg8 = rect.height), this.drawStringLayoutResult(result, arg2, temparg3, temparg4, new RectangleF(temparg5, temparg6, temparg7, temparg8), temparg9), 
                    this.isEmfTextScaled = !1, this.emfScalingFactor = new SizeF(0, 0);
                }
                this.getResources.getResources().requireProcedureSet(this.procedureSets.text), this.isNormalRender = !0, 
                this.pdfStringLayoutResult = result, this.isUseFontSize = !1;
            }
        }, PdfGraphics.prototype.drawLine = function(arg1, arg2, arg3, arg4, arg5) {
            if (arg2 instanceof PointF) {
                var temparg2 = arg2, temparg3 = arg3;
                this.drawLine(arg1, temparg2.x, temparg2.y, temparg3.x, temparg3.y);
            } else {
                temparg2 = arg2, temparg3 = arg3;
                var temparg4 = arg4, temparg5 = arg5;
                this.stateControl(arg1, null, null);
                var sw = this.streamWriter;
                sw.beginPath(temparg2, temparg3), sw.appendLineSegment(temparg4, temparg5), sw.strokePath(), 
                this.getResources.getResources().requireProcedureSet(this.procedureSets.pdf);
            }
        }, PdfGraphics.prototype.drawRectangle = function(arg1, arg2, arg3, arg4, arg5, arg6) {
            if (arg1 instanceof PdfPen && "number" == typeof arg2) {
                var temparg3 = arg3;
                this.drawRectangle(arg1, null, arg2, temparg3, arg4, arg5);
            } else if (arg1 instanceof PdfBrush && "number" == typeof arg2) {
                temparg3 = arg3;
                this.drawRectangle(null, arg1, arg2, temparg3, arg4, arg5);
            } else {
                temparg3 = arg3;
                var temparg4 = arg4, temparg5 = arg5, temparg6 = arg6;
                arg2 instanceof PdfSolidBrush && arg2.color.isEmpty && (arg2 = null);
                var temparg1 = arg1, temparg2 = arg2;
                this.stateControl(temparg1, temparg2, null), this.streamWriter.appendRectangle(temparg3, temparg4, temparg5, temparg6), 
                this.drawPath(temparg1, temparg2, !1);
            }
        }, PdfGraphics.prototype.drawPath = function(arg1, arg2, arg3, arg4) {
            if ("boolean" == typeof arg3) {
                var temparg3 = arg3;
                this.drawPath(arg1, arg2, PdfFillMode.Winding, temparg3);
            } else {
                var isPen = null != arg1, isBrush = null != arg2, isEvenOdd = (temparg3 = arg3) === PdfFillMode.Alternate;
                isPen && isBrush ? this.streamWriter.fillStrokePath(isEvenOdd) : isPen || isBrush ? isPen ? this.streamWriter.strokePath() : this.streamWriter.fillPath(isEvenOdd) : this.streamWriter.endPath();
            }
        }, PdfGraphics.prototype.drawImage = function(arg1, arg2, arg3, arg4, arg5) {
            if ("number" == typeof arg2 && "number" == typeof arg3 && void 0 === arg4) {
                var size = arg1.physicalDimension;
                this.drawImage(arg1, arg2, arg3, size.width, size.height);
            } else {
                var temparg2 = arg2, temparg3 = arg3, temparg5 = arg5;
                arg1.save();
                var matrix = new PdfTransformationMatrix();
                this.getTranslateTransform(temparg2, temparg3 + temparg5, matrix), this.getScaleTransform(arg4, arg5, matrix), 
                this.pdfStreamWriter.write("q"), this.pdfStreamWriter.modifyCtm(matrix);
                var resources = this.getResources.getResources();
                void 0 !== this.pageLayer && null != this.page && (resources.document = this.page.document);
                var name_2 = resources.getName(arg1);
                void 0 !== this.pageLayer && this.page.setResources(resources), this.pdfStreamWriter.executeObject(name_2), 
                this.pdfStreamWriter.write(Operators.restoreState), this.pdfStreamWriter.write(Operators.newLine);
                var resource = this.getResources.getResources();
                resource.requireProcedureSet(this.procedureSets.imageB), resource.requireProcedureSet(this.procedureSets.imageC), 
                resource.requireProcedureSet(this.procedureSets.imageI), resource.requireProcedureSet(this.procedureSets.text);
            }
        }, PdfGraphics.prototype.getLineBounds = function(lineIndex, result, font, layoutRectangle, format) {
            var bounds;
            if (!result.empty && lineIndex < result.lineCount && lineIndex >= 0) {
                var line = result.lines[lineIndex], y = this.getTextVerticalAlignShift(result.actualSize.height, layoutRectangle.height, format) + layoutRectangle.y + result.lineHeight * lineIndex, lineWidth = line.width, hShift = this.getHorizontalAlignShift(lineWidth, layoutRectangle.width, format), lineIndent = this.getLineIndent(line, format, layoutRectangle, 0 === lineIndex);
                hShift += this.rightToLeft(format) ? 0 : lineIndent;
                var x = layoutRectangle.x + hShift, width = this.shouldJustify(line, layoutRectangle.width, format) ? layoutRectangle.width - lineIndent : lineWidth - lineIndent, height = result.lineHeight;
                bounds = new RectangleF(x, y, width, height);
            } else bounds = new RectangleF(0, 0, 0, 0);
            return bounds;
        }, PdfGraphics.prototype.checkCorrectLayoutRectangle = function(textSize, x, y, format) {
            var layoutedRectangle = new RectangleF(x, y, textSize.width, textSize.width);
            if (null != format) {
                switch (format.alignment) {
                  case PdfTextAlignment.Center:
                    layoutedRectangle.x -= layoutedRectangle.width / 2;
                    break;

                  case PdfTextAlignment.Right:
                    layoutedRectangle.x -= layoutedRectangle.width;
                }
                switch (format.lineAlignment) {
                  case PdfVerticalAlignment.Middle:
                    layoutedRectangle.y -= layoutedRectangle.height / 2;
                    break;

                  case PdfVerticalAlignment.Bottom:
                    layoutedRectangle.y -= layoutedRectangle.height;
                }
            }
            return layoutedRectangle;
        }, PdfGraphics.prototype.setLayer = function(layer) {
            this.pageLayer = layer;
            var page = layer.page;
            null != page && void 0 !== page && (page.beginSave = this.pageSave);
        }, PdfGraphics.prototype.pageSave = function(page) {
            if (null != page.graphics.automaticFields) for (var i = 0; i < page.graphics.automaticFields.automaticFields.length; i++) {
                var fieldInfo = page.graphics.automaticFields.automaticFields[i];
                fieldInfo.field.performDraw(page.graphics, fieldInfo.location, fieldInfo.scalingX, fieldInfo.scalingY);
            }
        }, PdfGraphics.prototype.drawStringLayoutResult = function(result, font, pen, brush, layoutRectangle, format) {
            if (result.empty) throw new Error("ArgumentNullException:result");
            this.applyStringSettings(font, pen, brush, format, layoutRectangle);
            var textScaling = null != format ? format.horizontalScalingFactor : 100;
            textScaling === this.previousTextScaling || this.isEmfTextScaled || (this.pdfStreamWriter.setTextScaling(textScaling), 
            this.previousTextScaling = textScaling);
            var height = null == format || 0 === format.lineSpacing ? font.height : format.lineSpacing + font.height, shift = 0;
            shift = null != format && format.subSuperScript === PdfSubSuperScript.SubScript ? height - (font.height + font.metrics.getDescent(format)) : height - font.metrics.getAscent(format), 
            this.shift = shift, this.pdfStreamWriter.startNextLine(layoutRectangle.x, layoutRectangle.y - shift), 
            this.pdfStreamWriter.setLeading(+height);
            for (var resultHeight = 0, remainingString = "", i = 0; i < result.lines.length; i++) if (resultHeight += result.lineHeight, 
            layoutRectangle.y + resultHeight > this.clientSize.height) {
                this.startCutIndex = i;
                break;
            }
            for (var j = this.startCutIndex; j < result.lines.length && j >= 0; j++) remainingString += result.lines[j].text;
            var bounds = new RectangleF(layoutRectangle.x, layoutRectangle.y, layoutRectangle.width, layoutRectangle.height);
            if (this.drawLayoutResult(result, font, format, layoutRectangle), this.underlineStrikeoutText(pen, brush, result, font, bounds, format), 
            this.isEmfPlus = !1, this.isUseFontSize = !1, -1 !== this.startCutIndex) {
                this.getNextPage().graphics.drawString(remainingString, font, pen, brush, layoutRectangle.x, 0, layoutRectangle.width, 0, format);
            }
        }, PdfGraphics.prototype.getNextPage = function() {
            var section = this.currentPage.section, index = section.indexOf(this.currentPage);
            return index === section.count - 1 ? section.add() : section.getPages()[index + 1];
        }, PdfGraphics.prototype.setClip = function(rectangle, mode) {
            void 0 === mode ? this.setClip(rectangle, PdfFillMode.Winding) : (this.pdfStreamWriter.appendRectangle(rectangle), 
            this.pdfStreamWriter.clipPath(mode === PdfFillMode.Alternate));
        }, PdfGraphics.prototype.applyStringSettings = function(font, pen, brush, format, bounds) {
            var tm = this.getTextRenderingMode(pen, brush, format);
            this.stateControl(pen, brush, font, format), this.pdfStreamWriter.beginText(), tm !== this.previousTextRenderingMode && (this.pdfStreamWriter.setTextRenderingMode(tm), 
            this.previousTextRenderingMode = tm);
            var cs = null != format ? format.characterSpacing : 0;
            cs === this.previousCharacterSpacing || this.isEmfTextScaled || (this.pdfStreamWriter.setCharacterSpacing(cs), 
            this.previousCharacterSpacing = cs);
            var ws = null != format ? format.wordSpacing : 0;
            ws !== this.previousWordSpacing && (this.pdfStreamWriter.setWordSpacing(ws), this.previousWordSpacing = ws);
        }, PdfGraphics.prototype.getTextVerticalAlignShift = function(textHeight, boundsHeight, format) {
            var shift = 0;
            if (boundsHeight >= 0 && null != format && format.lineAlignment !== PdfVerticalAlignment.Top) switch (format.lineAlignment) {
              case PdfVerticalAlignment.Middle:
                shift = (boundsHeight - textHeight) / 2;
                break;

              case PdfVerticalAlignment.Bottom:
                shift = boundsHeight - textHeight;
            }
            return shift;
        }, PdfGraphics.prototype.drawLayoutResult = function(result, font, format, layoutRectangle) {
            var vAlignShift = this.getTextVerticalAlignShift(result.actualSize.height, layoutRectangle.height, format);
            0 !== vAlignShift && this.pdfStreamWriter.startNextLine(0, vAlignShift);
            for (var lines = result.lines, i = 0, len = lines.length; i < len && i !== this.startCutIndex; i++) {
                var lineInfo = lines[i], lineWidth = (lineInfo.text, lineInfo.width), hAlignShift = this.getHorizontalAlignShift(lineWidth, layoutRectangle.width, format), lineIndent = this.getLineIndent(lineInfo, format, layoutRectangle, 0 === i);
                0 === (hAlignShift += this.rightToLeft(format) ? 0 : lineIndent) || this.isEmfTextScaled || this.pdfStreamWriter.startNextLine(hAlignShift, 0), 
                this.drawAsciiLine(lineInfo, layoutRectangle, font, format), 0 === hAlignShift || this.isEmfTextScaled || this.pdfStreamWriter.startNextLine(-hAlignShift, 0), 
                this.isOverloadWithPosition && lines.length > 1 && (this.pdfStreamWriter.startNextLine(-layoutRectangle.x, 0), 
                layoutRectangle.x = 0, layoutRectangle.width = this.clientSize.width, this.isOverloadWithPosition = !1, 
                this.isPointOverload = !0);
            }
            this.getResources.getResources().requireProcedureSet(this.procedureSets.text), 0 !== vAlignShift && this.pdfStreamWriter.startNextLine(0, -(vAlignShift - result.lineHeight)), 
            this.pdfStreamWriter.endText();
        }, PdfGraphics.prototype.drawAsciiLine = function(lineInfo, layoutRectangle, font, format) {
            this.justifyLine(lineInfo, layoutRectangle.width, format);
            var value = "";
            if (-1 !== lineInfo.text.indexOf("(") || -1 !== lineInfo.text.indexOf(")")) for (var i = 0; i < lineInfo.text.length; i++) "(" === lineInfo.text[i] ? value += "\\(" : ")" === lineInfo.text[i] ? value += "\\)" : value += lineInfo.text[i];
            "" === value && (value = lineInfo.text);
            var line = "(" + value + ")";
            this.pdfStreamWriter.showNextLineText(new PdfString(line));
        }, PdfGraphics.prototype.justifyLine = function(lineInfo, boundsWidth, format) {
            var line = lineInfo.text, lineWidth = lineInfo.width, shouldJustify = this.shouldJustify(lineInfo, boundsWidth, format), hasWordSpacing = null != format && 0 !== format.wordSpacing, symbols = StringTokenizer.spaces, whitespacesCount = StringTokenizer.getCharsCount(line, symbols), wordSpace = 0;
            if (shouldJustify) {
                hasWordSpacing && (lineWidth -= whitespacesCount * format.wordSpacing);
                wordSpace = (boundsWidth - lineWidth) / whitespacesCount, this.pdfStreamWriter.setWordSpacing(wordSpace);
            } else hasWordSpacing ? this.pdfStreamWriter.setWordSpacing(format.wordSpacing) : this.pdfStreamWriter.setWordSpacing(0);
            return wordSpace;
        }, PdfGraphics.prototype.reset = function(size) {
            this.canvasSize = size, this.streamWriter.clear(), this.initialize(), this.initializeCoordinates();
        }, PdfGraphics.prototype.shouldJustify = function(lineInfo, boundsWidth, format) {
            var line = lineInfo.text, lineWidth = lineInfo.width, justifyStyle = null != format && format.alignment === PdfTextAlignment.Justify, goodWidth = boundsWidth >= 0 && lineWidth < boundsWidth, symbols = StringTokenizer.spaces, hasSpaces = StringTokenizer.getCharsCount(line, symbols) > 0 && line[0] !== StringTokenizer.whiteSpace, goodLineBreakStyle = (lineInfo.lineType & LineType.LayoutBreak) > 0;
            return justifyStyle && goodWidth && hasSpaces && (goodLineBreakStyle || format.alignment === PdfTextAlignment.Justify);
        }, PdfGraphics.prototype.underlineStrikeoutText = function(pen, brush, result, font, layoutRectangle, format) {
            if (font.underline || font.strikeout) {
                var linePen = this.createUnderlineStikeoutPen(pen, brush, font, format);
                if (null != linePen) {
                    var vShift = this.getTextVerticalAlignShift(result.actualSize.height, layoutRectangle.height, format), underlineYOffset = 0;
                    underlineYOffset = layoutRectangle.y + vShift + font.metrics.getAscent(format) + 1.5 * linePen.width;
                    for (var strikeoutYOffset = layoutRectangle.y + vShift + font.metrics.getHeight(format) / 2 + 1.5 * linePen.width, lines = result.lines, i = 0, len = result.lineCount; i < len; i++) {
                        var lineInfo = lines[i], lineWidth = (lineInfo.text, lineInfo.width), hShift = this.getHorizontalAlignShift(lineWidth, layoutRectangle.width, format), lineIndent = this.getLineIndent(lineInfo, format, layoutRectangle, 0 === i);
                        hShift += this.rightToLeft(format) ? 0 : lineIndent;
                        var x1 = layoutRectangle.x + hShift, x2 = this.shouldJustify(lineInfo, layoutRectangle.width, format) ? x1 + layoutRectangle.width - lineIndent : x1 + lineWidth - lineIndent;
                        if (font.underline) {
                            var y = underlineYOffset;
                            this.drawLine(linePen, x1, y, x2, y), underlineYOffset += result.lineHeight;
                        }
                        if (font.strikeout) {
                            y = strikeoutYOffset;
                            this.drawLine(linePen, x1, y, x2, y), strikeoutYOffset += result.lineHeight;
                        }
                        this.isPointOverload && lines.length > 1 && (layoutRectangle.x = 0, layoutRectangle.width = this.clientSize.width);
                    }
                    this.isPointOverload = !1;
                }
            }
        }, PdfGraphics.prototype.createUnderlineStikeoutPen = function(pen, brush, font, format) {
            var lineWidth = font.metrics.getSize(format) / 20, linePen = null;
            return null != pen ? linePen = new PdfPen(pen.color, lineWidth) : null != brush && (linePen = new PdfPen(brush, lineWidth)), 
            linePen;
        }, PdfGraphics.prototype.getTextRenderingMode = function(pen, brush, format) {
            var tm = TextRenderingMode.None;
            return tm = null != pen && null != brush ? TextRenderingMode.FillStroke : null != pen ? TextRenderingMode.Stroke : TextRenderingMode.Fill, 
            null != format && format.clipPath && (tm |= TextRenderingMode.ClipFlag), tm;
        }, PdfGraphics.prototype.getLineIndent = function(lineInfo, format, layoutBounds, firstLine) {
            var lineIndent = 0, firstParagraphLine = (lineInfo.lineType & LineType.FirstParagraphLine) > 0;
            return null != format && firstParagraphLine && (lineIndent = firstLine ? format.firstLineIndent : format.paragraphIndent, 
            lineIndent = layoutBounds.width > 0 ? Math.min(layoutBounds.width, lineIndent) : lineIndent), 
            lineIndent;
        }, PdfGraphics.prototype.getHorizontalAlignShift = function(lineWidth, boundsWidth, format) {
            var shift = 0;
            if (boundsWidth >= 0 && null != format && format.alignment !== PdfTextAlignment.Left) switch (format.alignment) {
              case PdfTextAlignment.Center:
                shift = (boundsWidth - lineWidth) / 2;
                break;

              case PdfTextAlignment.Right:
                shift = boundsWidth - lineWidth;
            }
            return shift;
        }, PdfGraphics.prototype.rightToLeft = function(format) {
            return null != format && format.rightToLeft;
        }, PdfGraphics.prototype.stateControl = function(pen, brush, font, format) {
            if (void 0 === format) this.stateControl(pen, brush, font, null); else {
                null !== brush ? (void 0 !== this.pageLayer && null != this.pageLayer && !1 === this.colorSpaceChanged && (this.lastDocumentCS = this.pageLayer.page.document.colorSpace, 
                this.lastGraphicsCS = this.pageLayer.page.graphics.colorSpace, this.colorSpace = this.pageLayer.page.document.colorSpace, 
                this.currentColorSpace = this.pageLayer.page.document.colorSpace, this.colorSpaceChanged = !0), 
                this.initCurrentColorSpace(this.currentColorSpace)) : null != pen && (void 0 !== this.pageLayer && null != this.pageLayer && (this.colorSpace = this.pageLayer.page.document.colorSpace, 
                this.currentColorSpace = this.pageLayer.page.document.colorSpace), this.initCurrentColorSpace(this.currentColorSpace)), 
                this.penControl(pen, !1), this.brushControl(brush, !1), this.fontControl(font, format, !1);
            }
        }, PdfGraphics.prototype.initCurrentColorSpace = function(colorspace) {
            this.getResources.getResources();
            this.bCSInitialized || (this.pdfStreamWriter.setColorSpace("Device" + this.currentColorSpaces[this.currentColorSpace], !0), 
            this.pdfStreamWriter.setColorSpace("Device" + this.currentColorSpaces[this.currentColorSpace], !1), 
            this.bCSInitialized = !0);
        }, PdfGraphics.prototype.penControl = function(pen, saveState) {
            null != pen && (this.currentPen = pen, this.colorSpace = PdfColorSpace.Rgb, pen.monitorChanges(this.currentPen, this.pdfStreamWriter, this.getResources, saveState, this.colorSpace, this.matrix.clone()), 
            this.currentPen = pen.clone());
        }, PdfGraphics.prototype.brushControl = function(brush, saveState) {
            null != brush && (this.currentBrush = brush, brush.monitorChanges(this.currentBrush, this.pdfStreamWriter, this.getResources, saveState, this.colorSpace), 
            this.currentBrush = brush, brush = null);
        }, PdfGraphics.prototype.fontControl = function(font, format, saveState) {
            if (null != font) {
                var curSubSuper = null != format ? format.subSuperScript : PdfSubSuperScript.None, prevSubSuper = null != this.currentStringFormat ? this.currentStringFormat.subSuperScript : PdfSubSuperScript.None;
                if (saveState || font !== this.currentFont || curSubSuper !== prevSubSuper) {
                    var resources = this.getResources.getResources();
                    this.currentFont = font, this.currentStringFormat = format;
                    var size = font.metrics.getSize(format);
                    this.isEmfTextScaled = !1;
                    var fontName = resources.getName(font);
                    this.pdfStreamWriter.setFont(font, fontName, size);
                }
            }
        }, PdfGraphics.prototype.setTransparency = function(arg1, arg2, arg3) {
            if (void 0 === arg2) this.istransparencySet = !0, this.setTransparency(arg1, arg1, PdfBlendMode.Normal); else if ("number" == typeof arg2 && void 0 === arg3) this.setTransparency(arg1, arg2, PdfBlendMode.Normal); else {
                null == this.trasparencies && (this.trasparencies = new TemporaryDictionary());
                var transp = null, td = new TransparencyData(arg1, arg2, arg3);
                this.trasparencies.containsKey(td) && (transp = this.trasparencies.getValue(td)), 
                null == transp && (transp = new PdfTransparency(arg1, arg2, arg3), this.trasparencies.setValue(td, transp));
                var name_3 = this.getResources.getResources().getName(transp);
                this.streamWriter.setGraphicsState(name_3);
            }
        }, PdfGraphics.prototype.clipTranslateMargins = function(x, y, left, top, right, bottom) {
            if (x instanceof RectangleF && void 0 === y) this.clipBounds = x, this.pdfStreamWriter.writeComment("Clip margins."), 
            this.pdfStreamWriter.appendRectangle(x), this.pdfStreamWriter.closePath(), this.pdfStreamWriter.clipPath(!1), 
            this.pdfStreamWriter.writeComment("Translate co-ordinate system."), this.translateTransform(x.x, x.y); else if ("number" == typeof x) {
                var clipArea = new RectangleF(left, top, this.size.width - left - right, this.size.height - top - bottom);
                this.clipBounds = clipArea, this.pdfStreamWriter.writeComment("Clip margins."), 
                this.pdfStreamWriter.appendRectangle(clipArea), this.pdfStreamWriter.closePath(), 
                this.pdfStreamWriter.clipPath(!1), this.pdfStreamWriter.writeComment("Translate co-ordinate system."), 
                this.translateTransform(x, y);
            }
        }, PdfGraphics.prototype.updateY = function(y) {
            return -y;
        }, PdfGraphics.prototype.translateTransform = function(offsetX, offsetY) {
            var matrix = new PdfTransformationMatrix();
            this.getTranslateTransform(offsetX, offsetY, matrix), this.pdfStreamWriter.modifyCtm(matrix), 
            this.matrix.multiply(matrix);
        }, PdfGraphics.prototype.getTranslateTransform = function(x, y, input) {
            return input.translate(x, this.updateY(y)), input;
        }, PdfGraphics.prototype.scaleTransform = function(scaleX, scaleY) {
            var matrix = new PdfTransformationMatrix();
            this.getScaleTransform(scaleX, scaleY, matrix), this.pdfStreamWriter.modifyCtm(matrix), 
            this.matrix.multiply(matrix);
        }, PdfGraphics.prototype.getScaleTransform = function(x, y, input) {
            return null == input && (input = new PdfTransformationMatrix()), input.scale(x, y), 
            input;
        }, PdfGraphics.prototype.rotateTransform = function(angle) {
            var matrix = new PdfTransformationMatrix();
            this.getRotateTransform(angle, matrix), this.pdfStreamWriter.modifyCtm(matrix), 
            this.matrix.multiply(matrix);
        }, PdfGraphics.prototype.initializeCoordinates = function() {
            this.pdfStreamWriter.writeComment("Change co-ordinate system to left/top."), this.mediaBoxUpperRightBound !== -this.size.height && null == this.cropBox && (this.mediaBoxUpperRightBound === this.size.height || 0 === this.mediaBoxUpperRightBound ? this.translateTransform(0, this.updateY(this.size.height)) : this.translateTransform(0, this.updateY(this.mediaBoxUpperRightBound)));
        }, PdfGraphics.prototype.getRotateTransform = function(angle, input) {
            return null != input && void 0 !== input || (input = new PdfTransformationMatrix()), 
            input.rotate(this.updateY(angle)), input;
        }, PdfGraphics.prototype.save = function() {
            var state = new PdfGraphicsState(this, this.matrix.clone());
            return state.brush = this.currentBrush, state.pen = this.currentPen, state.font = this.currentFont, 
            state.colorSpace = this.currentColorSpace, state.characterSpacing = this.previousCharacterSpacing, 
            state.wordSpacing = this.previousWordSpacing, state.textScaling = this.previousTextScaling, 
            state.textRenderingMode = this.previousTextRenderingMode, this.graphicsState.push(state), 
            this.pdfStreamWriter.saveGraphicsState(), state;
        }, PdfGraphics.prototype.restore = function(state) {
            if (void 0 === state) this.graphicsState.length > 0 && this.doRestoreState(); else if (-1 !== this.graphicsState.indexOf(state)) for (;0 !== this.graphicsState.length; ) {
                if (this.doRestoreState() === state) break;
            }
        }, PdfGraphics.prototype.doRestoreState = function() {
            var state = this.graphicsState.pop();
            return this.transformationMatrix = state.matrix, this.currentBrush = state.brush, 
            this.currentPen = state.pen, this.currentFont = state.font, this.currentColorSpace = state.colorSpace, 
            this.previousCharacterSpacing = state.characterSpacing, this.previousWordSpacing = state.wordSpacing, 
            this.previousTextScaling = state.textScaling, this.previousTextRenderingMode = state.textRenderingMode, 
            this.pdfStreamWriter.restoreGraphicsState(), state;
        }, PdfGraphics.pathTypesValuesMask = 15, PdfGraphics.transparencyObject = !1, PdfGraphics;
    }(), GetResourceEventHandler = function() {
        function GetResourceEventHandler(sender) {
            this.sender = sender;
        }
        return GetResourceEventHandler.prototype.getResources = function() {
            return this.sender.getResources();
        }, GetResourceEventHandler;
    }(), PdfGraphicsState = function() {
        function PdfGraphicsState(graphics, matrix) {
            this.internalTextRenderingMode = TextRenderingMode.Fill, this.internalCharacterSpacing = 0, 
            this.internalWordSpacing = 0, this.internalTextScaling = 100, this.pdfColorSpace = PdfColorSpace.Rgb, 
            void 0 !== graphics && (this.pdfGraphics = graphics, this.transformationMatrix = matrix);
        }
        return Object.defineProperty(PdfGraphicsState.prototype, "graphics", {
            get: function() {
                return this.pdfGraphics;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGraphicsState.prototype, "matrix", {
            get: function() {
                return this.transformationMatrix;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGraphicsState.prototype, "characterSpacing", {
            get: function() {
                return this.internalCharacterSpacing;
            },
            set: function(value) {
                this.internalCharacterSpacing = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGraphicsState.prototype, "wordSpacing", {
            get: function() {
                return this.internalWordSpacing;
            },
            set: function(value) {
                this.internalWordSpacing = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGraphicsState.prototype, "textScaling", {
            get: function() {
                return this.internalTextScaling;
            },
            set: function(value) {
                this.internalTextScaling = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGraphicsState.prototype, "pen", {
            get: function() {
                return this.pdfPen;
            },
            set: function(value) {
                this.pdfPen = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGraphicsState.prototype, "brush", {
            get: function() {
                return this.pdfBrush;
            },
            set: function(value) {
                this.pdfBrush = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGraphicsState.prototype, "font", {
            get: function() {
                return this.pdfFont;
            },
            set: function(value) {
                this.pdfFont = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGraphicsState.prototype, "colorSpace", {
            get: function() {
                return this.pdfColorSpace;
            },
            set: function(value) {
                this.pdfColorSpace = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGraphicsState.prototype, "textRenderingMode", {
            get: function() {
                return this.internalTextRenderingMode;
            },
            set: function(value) {
                this.internalTextRenderingMode = value;
            },
            enumerable: !0,
            configurable: !0
        }), PdfGraphicsState;
    }(), TransparencyData = function() {
        return function(alphaPen, alphaBrush, blendMode) {
            this.alphaPen = alphaPen, this.alphaBrush = alphaBrush, this.blendMode = blendMode;
        };
    }(), PdfPageLayer = function() {
        function PdfPageLayer(page, streamClipPageTemplates) {
            if (this.pdfColorSpace = PdfColorSpace.Rgb, this.isVisible = !0, this.sublayer = !1, 
            this.contentLength = 0, this.dictionaryProperties = new DictionaryProperties(), 
            void 0 === streamClipPageTemplates) this.pdfPage = page, this.clipPageTemplates = !0, 
            this.content = new PdfStream(); else if (streamClipPageTemplates instanceof PdfStream || null === streamClipPageTemplates) {
                if (null == page) throw new Error("ArgumentNullException:page");
                if (null == streamClipPageTemplates) throw new Error("ArgumentNullException:stream");
                this.pdfPage = page, this.content = streamClipPageTemplates;
            } else this.constructor(page), this.clipPageTemplates = streamClipPageTemplates;
        }
        return Object.defineProperty(PdfPageLayer.prototype, "colorSpace", {
            get: function() {
                return this.pdfColorSpace;
            },
            set: function(value) {
                this.pdfColorSpace = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPageLayer.prototype, "page", {
            get: function() {
                return this.pdfPage;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPageLayer.prototype, "layerId", {
            get: function() {
                return this.layerid;
            },
            set: function(value) {
                this.layerid = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPageLayer.prototype, "name", {
            get: function() {
                return this.layerName;
            },
            set: function(value) {
                this.layerName = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPageLayer.prototype, "visible", {
            get: function() {
                return this.isVisible;
            },
            set: function(value) {
                this.isVisible = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPageLayer.prototype, "graphics", {
            get: function() {
                return null == this.pdfGraphics && this.initializeGraphics(this.page), this.pdfGraphics;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPageLayer.prototype, "layers", {
            get: function() {
                return null == this.layer ? (this.layer = new PdfPageLayerCollection(this.page), 
                this.layer.sublayer = !0, this.layer) : this.layer;
            },
            enumerable: !0,
            configurable: !0
        }), PdfPageLayer.prototype.add = function() {
            var layer = new PdfPageLayer(this.pdfPage);
            return layer.name = "", layer;
        }, PdfPageLayer.prototype.sign = function(number) {
            return 0 === number ? 0 : number > 0 ? 1 : -1;
        }, PdfPageLayer.prototype.initializeGraphics = function(page) {
            var oPage = page, gr = new GetResourceEventHandler(this.page);
            if (this.pdfGraphics = new PdfGraphics(page.size, gr, this.content), this.pdfGraphics.mediaBoxUpperRightBound = 0, 
            null != oPage) {
                var sc = oPage.section.parent;
                null != sc && (this.pdfGraphics.colorSpace = sc.document.colorSpace, this.colorSpace = sc.document.colorSpace);
            }
            var isSame = this.sign(page.origin.y) === this.sign(page.origin.x);
            (page.origin.x >= 0 && page.origin.y >= 0 || !isSame) && this.pdfGraphics.initializeCoordinates();
            var clipRect = oPage.section.getActualBounds(oPage, !0), margins = oPage.section.pageSettings.margins;
            this.clipPageTemplates ? page.origin.x >= 0 && page.origin.y >= 0 && this.pdfGraphics.clipTranslateMargins(clipRect) : this.graphics.clipTranslateMargins(clipRect.x, clipRect.y, margins.left, margins.top, margins.right, margins.bottom), 
            this.pdfGraphics.setLayer(this);
        }, Object.defineProperty(PdfPageLayer.prototype, "element", {
            get: function() {
                return this.content;
            },
            enumerable: !0,
            configurable: !0
        }), PdfPageLayer;
    }(), PdfCollection = function() {
        function PdfCollection() {}
        return Object.defineProperty(PdfCollection.prototype, "count", {
            get: function() {
                return void 0 === this.collection && (this.collection = []), this.collection.length;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfCollection.prototype, "list", {
            get: function() {
                return void 0 === this.collection && (this.collection = []), this.collection;
            },
            enumerable: !0,
            configurable: !0
        }), PdfCollection;
    }(), __extends$9$1 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), PdfPageLayerCollection = function(_super) {
        function PdfPageLayerCollection(page) {
            var _this = _super.call(this) || this;
            if (_this.parentLayerCount = 0, _this.sublayer = !1, _this.optionalContent = new PdfDictionary(), 
            page instanceof PdfPageBase) {
                _this.page = page;
                var lPage = page;
                _this.parseLayers(lPage);
            }
            return _this;
        }
        return __extends$9$1(PdfPageLayerCollection, _super), PdfPageLayerCollection.prototype.items = function(index, value) {
            if ("number" == typeof index && void 0 === value) {
                return this.list[index];
            }
            if (null == value) throw new Error("ArgumentNullException: layer");
            if (value.page !== this.page) throw new Error("ArgumentException: The layer belongs to another page");
        }, PdfPageLayerCollection.prototype.add = function(firstArgument, secondArgument) {
            if (void 0 === firstArgument) {
                var layer = new PdfPageLayer(this.page);
                return layer.name = "", this.add(layer), layer;
            }
            if (firstArgument instanceof PdfPageLayer) {
                var index = this.list.push(firstArgument);
                return this.addLayer(index, firstArgument), index;
            }
            return 0;
        }, PdfPageLayerCollection.prototype.addLayer = function(index, layer) {
            var reference = new PdfReferenceHolder(layer);
            this.page.contents.add(reference);
        }, PdfPageLayerCollection.prototype.insert = function(index, layer) {
            for (var list = [], length = this.list.length, i = index; i < length; i++) list.push(this.list.pop());
            this.list.push(layer);
            for (i = 0; i < list.length; i++) this.list.push(list[i]);
            this.insertLayer(index, layer);
        }, PdfPageLayerCollection.prototype.insertLayer = function(index, layer) {
            if (null == layer) throw new Error("ArgumentNullException:layer");
            var reference = new PdfReferenceHolder(layer);
            this.page.contents.insert(index, reference);
        }, PdfPageLayerCollection.prototype.parseLayers = function(loadedPage) {
            var contents = this.page.contents;
            this.page.getResources();
            loadedPage.crossTable;
            var saveStream = new PdfStream(), restoreStream = new PdfStream(), saveData = [];
            saveData.push("q"), saveStream.data = saveData, contents.insert(0, new PdfReferenceHolder(saveStream)), 
            (saveData = []).push("Q"), restoreStream.data = saveData, contents.insert(contents.count, new PdfReferenceHolder(restoreStream));
        }, PdfPageLayerCollection.prototype.indexOf = function(layer) {
            if (null == layer) throw new Error("ArgumentNullException: layer");
            return this.list.indexOf(layer);
        }, PdfPageLayerCollection;
    }(PdfCollection), PdfTemplate = function() {
        function PdfTemplate(arg1, arg2) {
            if (this.dictionaryProperties = new DictionaryProperties(), this.writeTransformation = !0, 
            void 0 === arg1) ; else if (arg1 instanceof SizeF && void 0 === arg2) {
                this.content = new PdfStream();
                var tempSize = new SizeF(arg1.width, arg1.height);
                this.setSize(tempSize), this.initialize();
            } else this.content = new PdfStream(), this.setSize(new SizeF(arg1, arg2)), this.initialize();
        }
        return Object.defineProperty(PdfTemplate.prototype, "size", {
            get: function() {
                return this.templateSize;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfTemplate.prototype, "width", {
            get: function() {
                return this.size.width;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfTemplate.prototype, "height", {
            get: function() {
                return this.size.height;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfTemplate.prototype, "graphics", {
            get: function() {
                if (null == this.pdfGraphics || void 0 === this.pdfGraphics) {
                    var gr = new GetResourceEventHandler(this), g = new PdfGraphics(this.size, gr, this.content);
                    this.pdfGraphics = g, this.pdfGraphics.initializeCoordinates();
                }
                return this.pdfGraphics;
            },
            enumerable: !0,
            configurable: !0
        }), PdfTemplate.prototype.getResources = function() {
            return null == this.resources && (this.resources = new PdfResources(), this.content.items.setValue(this.dictionaryProperties.resources, this.resources)), 
            this.resources;
        }, PdfTemplate.prototype.initialize = function() {
            this.addType(), this.addSubType();
        }, PdfTemplate.prototype.addType = function() {
            var value = new PdfName(this.dictionaryProperties.xObject);
            this.content.items.setValue(this.dictionaryProperties.type, value);
        }, PdfTemplate.prototype.addSubType = function() {
            var value = new PdfName(this.dictionaryProperties.form);
            this.content.items.setValue(this.dictionaryProperties.subtype, value);
        }, PdfTemplate.prototype.reset = function(size) {
            void 0 === size ? (null != this.resources && (this.resources = null, this.content.remove(this.dictionaryProperties.resources)), 
            null != this.graphics && this.graphics.reset(this.size)) : (this.setSize(size), 
            this.reset());
        }, PdfTemplate.prototype.setSize = function(size) {
            var rect = new RectangleF(new PointF(0, 0), size), val = PdfArray.fromRectangle(rect);
            this.content.items.setValue(this.dictionaryProperties.bBox, val), this.templateSize = size;
        }, Object.defineProperty(PdfTemplate.prototype, "element", {
            get: function() {
                return this.content;
            },
            enumerable: !0,
            configurable: !0
        }), PdfTemplate;
    }(), ByteArray = function() {
        function ByteArray(length) {
            this.mPosition = 0, this.buffer = new Uint8Array(length), this.dataView = new DataView(this.buffer.buffer);
        }
        return Object.defineProperty(ByteArray.prototype, "position", {
            get: function() {
                return this.mPosition;
            },
            set: function(value) {
                this.mPosition = value;
            },
            enumerable: !0,
            configurable: !0
        }), ByteArray.prototype.read = function(buffer, offset, count) {
            for (var index = offset; index < count; index++) {
                var position = this.position;
                buffer.buffer[index] = this.readByte(position), this.position++;
            }
        }, ByteArray.prototype.getBuffer = function(index) {
            return this.buffer[index];
        }, ByteArray.prototype.writeFromBase64String = function(base64) {
            var arr = this.encodedString(base64);
            this.buffer = arr;
        }, ByteArray.prototype.encodedString = function(input) {
            var chr1, chr2, chr3, enc2, enc3, keyStr = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/=", i = 0, resultIndex = 0, totalLength = 3 * (input = input.replace(/[^A-Za-z0-9\+\/\=]/g, "")).length / 4;
            input.charAt(input.length - 1) === keyStr.charAt(64) && totalLength--;
            for (var output = new Uint8Array(0 | totalLength); i < input.length; ) chr1 = keyStr.indexOf(input.charAt(i++)) << 2 | (enc2 = keyStr.indexOf(input.charAt(i++))) >> 4, 
            chr2 = (15 & enc2) << 4 | (enc3 = keyStr.indexOf(input.charAt(i++))) >> 2, chr3 = (3 & enc3) << 6 | keyStr.indexOf(input.charAt(i++)), 
            output[resultIndex++] = chr1, output[resultIndex++] = chr2, output[resultIndex++] = chr3;
            return output;
        }, ByteArray.prototype.readByte = function(offset) {
            return this.buffer[offset];
        }, Object.defineProperty(ByteArray.prototype, "internalBuffer", {
            get: function() {
                return this.buffer;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(ByteArray.prototype, "count", {
            get: function() {
                return this.buffer.byteLength;
            },
            enumerable: !0,
            configurable: !0
        }), ByteArray;
    }(), PdfBoolean = function() {
        function PdfBoolean(value) {
            this.currentPosition = -1, this.value = value;
        }
        return Object.defineProperty(PdfBoolean.prototype, "status", {
            get: function() {
                return this.objectStatus;
            },
            set: function(value) {
                this.objectStatus = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfBoolean.prototype, "isSaving", {
            get: function() {
                return this.saving;
            },
            set: function(value) {
                this.saving = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfBoolean.prototype, "objectCollectionIndex", {
            get: function() {
                return this.index;
            },
            set: function(value) {
                this.index = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfBoolean.prototype, "position", {
            get: function() {
                return this.currentPosition;
            },
            set: function(value) {
                this.currentPosition = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfBoolean.prototype, "clonedObject", {
            get: function() {
                return null;
            },
            enumerable: !0,
            configurable: !0
        }), PdfBoolean.prototype.save = function(writer) {
            writer.write(this.boolToStr(this.value));
        }, PdfBoolean.prototype.clone = function(crossTable) {
            return new PdfBoolean(this.value);
        }, PdfBoolean.prototype.boolToStr = function(value) {
            return value ? "true" : "false";
        }, PdfBoolean;
    }();
    !function(ImageFormat) {
        ImageFormat[ImageFormat.Unknown = 0] = "Unknown", ImageFormat[ImageFormat.Bmp = 1] = "Bmp", 
        ImageFormat[ImageFormat.Emf = 2] = "Emf", ImageFormat[ImageFormat.Gif = 3] = "Gif", 
        ImageFormat[ImageFormat.Jpeg = 4] = "Jpeg", ImageFormat[ImageFormat.Png = 5] = "Png", 
        ImageFormat[ImageFormat.Wmf = 6] = "Wmf", ImageFormat[ImageFormat.Icon = 7] = "Icon";
    }(ImageFormat || (ImageFormat = {}));
    var PdfLayoutType, ImageDecoder = function() {
        function ImageDecoder(stream) {
            this.mFormat = ImageFormat.Unknown, this.mbitsPerComponent = 8, this.dictionaryProperties = new DictionaryProperties(), 
            this.mStream = stream, this.initialize();
        }
        return Object.defineProperty(ImageDecoder.prototype, "height", {
            get: function() {
                return this.mHeight;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(ImageDecoder.prototype, "width", {
            get: function() {
                return this.mWidth;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(ImageDecoder.prototype, "bitsPerComponent", {
            get: function() {
                return this.mbitsPerComponent;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(ImageDecoder.prototype, "size", {
            get: function() {
                return this.mImageData.count;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(ImageDecoder.prototype, "imageData", {
            get: function() {
                return this.mImageData;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(ImageDecoder.prototype, "imageDataAsNumberArray", {
            get: function() {
                return this.mImageData.internalBuffer.buffer;
            },
            enumerable: !0,
            configurable: !0
        }), ImageDecoder.prototype.initialize = function() {
            this.mFormat === ImageFormat.Unknown && this.checkIfJpeg() && (this.mFormat = ImageFormat.Jpeg, 
            this.parseJpegImage()), this.reset(), this.mImageData = new ByteArray(this.mStream.count), 
            this.mStream.read(this.mImageData, 0, this.mImageData.count);
        }, ImageDecoder.prototype.reset = function() {
            this.mStream.position = 0;
        }, ImageDecoder.prototype.parseJpegImage = function() {
            this.reset();
            var imgData = new ByteArray(this.mStream.count);
            this.mStream.read(imgData, 0, imgData.count);
            var i = 4;
            if ("J" === String.fromCharCode(imgData.getBuffer(i + 2)) && "F" === String.fromCharCode(imgData.getBuffer(i + 3)) && "I" === String.fromCharCode(imgData.getBuffer(i + 4)) && "F" === String.fromCharCode(imgData.getBuffer(i + 5)) && 0 === imgData.getBuffer(i + 6)) for (var length_1 = 256 * imgData.getBuffer(i) + imgData.getBuffer(i + 1); i + length_1 < imgData.count; ) {
                if (i += length_1, 192 === imgData.getBuffer(i + 1)) return this.mHeight = 256 * imgData.getBuffer(i + 5) + imgData.getBuffer(i + 6), 
                void (this.mWidth = 256 * imgData.getBuffer(i + 7) + imgData.getBuffer(i + 8));
                i += 2, length_1 = 256 * imgData.getBuffer(i) + imgData.getBuffer(i + 1);
            }
        }, Object.defineProperty(ImageDecoder.prototype, "format", {
            get: function() {
                return this.mFormat;
            },
            enumerable: !0,
            configurable: !0
        }), ImageDecoder.prototype.checkIfJpeg = function() {
            this.reset();
            for (var i = 0; i < ImageDecoder.mJpegHeader.length; i++) {
                if (ImageDecoder.mJpegHeader[i] !== this.mStream.readByte(i)) return !1;
                this.mStream.position++;
            }
            return !0;
        }, ImageDecoder.prototype.getImageDictionary = function() {
            if (this.mFormat === ImageFormat.Jpeg) {
                this.imageData.internalBuffer.length;
                this.imageStream = new PdfStream(), this.imageStream.isImage = !0;
                for (var tempString = "", decodedString = "", i = 0; i < this.imageDataAsNumberArray.byteLength; i++) tempString += String.fromCharCode(null, this.mStream.readByte(i));
                for (i = 0; i < tempString.length; i++) i % 2 != 0 && (decodedString += tempString[i]);
                return this.imageStream.data = [ decodedString ], this.imageStream.compress = !1, 
                this.imageStream.items.setValue(this.dictionaryProperties.type, new PdfName(this.dictionaryProperties.xObject)), 
                this.imageStream.items.setValue(this.dictionaryProperties.subtype, new PdfName(this.dictionaryProperties.image)), 
                this.imageStream.items.setValue(this.dictionaryProperties.width, new PdfNumber(this.width)), 
                this.imageStream.items.setValue(this.dictionaryProperties.height, new PdfNumber(this.height)), 
                this.imageStream.items.setValue(this.dictionaryProperties.bitsPerComponent, new PdfNumber(this.bitsPerComponent)), 
                this.imageStream.items.setValue(this.dictionaryProperties.filter, new PdfName(this.dictionaryProperties.dctdecode)), 
                this.imageStream.items.setValue(this.dictionaryProperties.colorSpace, new PdfName(this.getColorSpace())), 
                this.imageStream.items.setValue(this.dictionaryProperties.decodeParms, this.getDecodeParams()), 
                this.imageStream;
            }
            return this.imageStream;
        }, ImageDecoder.prototype.getColorSpace = function() {
            return this.dictionaryProperties.deviceRgb;
        }, ImageDecoder.prototype.getDecodeParams = function() {
            var decodeParams = new PdfDictionary();
            return decodeParams.items.setValue(this.dictionaryProperties.columns, new PdfNumber(this.width)), 
            decodeParams.items.setValue(this.dictionaryProperties.blackIs1, new PdfBoolean(!0)), 
            decodeParams.items.setValue(this.dictionaryProperties.k, new PdfNumber(-1)), decodeParams.items.setValue(this.dictionaryProperties.predictor, new PdfNumber(15)), 
            decodeParams.items.setValue(this.dictionaryProperties.bitsPerComponent, new PdfNumber(this.bitsPerComponent)), 
            decodeParams;
        }, ImageDecoder.mPngHeader = [ 137, 80, 78, 71, 13, 10, 26, 10 ], ImageDecoder.mJpegHeader = [ 255, 216 ], 
        ImageDecoder.GIF_HEADER = "G,I,F,8", ImageDecoder.BMP_HEADER = "B,M", ImageDecoder;
    }(), PdfUnitConverter = function() {
        function PdfUnitConverter(dpi) {
            this.updateProportionsHelper(dpi);
        }
        return PdfUnitConverter.prototype.convertUnits = function(value, from, to) {
            return this.convertFromPixels(this.convertToPixels(value, from), to);
        }, PdfUnitConverter.prototype.convertToPixels = function(value, from) {
            var index = from;
            return value * this.proportions[index];
        }, PdfUnitConverter.prototype.convertFromPixels = function(value, to) {
            var index = to;
            return value / this.proportions[index];
        }, PdfUnitConverter.prototype.updateProportionsHelper = function(pixelPerInch) {
            this.proportions = [ pixelPerInch / 2.54, pixelPerInch / 6, 1, pixelPerInch / 72, pixelPerInch, pixelPerInch / 300, pixelPerInch / 25.4 ];
        }, PdfUnitConverter.horizontalResolution = 96, PdfUnitConverter.verticalResolution = 96, 
        PdfUnitConverter;
    }(), PdfImage = function() {
        function PdfImage() {}
        return Object.defineProperty(PdfImage.prototype, "width", {
            get: function() {
                return this.imageWidth;
            },
            set: function(value) {
                this.imageWidth = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfImage.prototype, "height", {
            get: function() {
                return this.imageHeight;
            },
            set: function(value) {
                this.imageHeight = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfImage.prototype, "size", {
            set: function(value) {
                this.width = value.width, this.height = value.height;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfImage.prototype, "physicalDimension", {
            get: function() {
                return this.imagePhysicalDimension = this.getPointSize(this.width, this.height, this.horizontalResolution, this.verticalResolution), 
                new SizeF(this.width, this.height);
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfImage.prototype, "element", {
            get: function() {
                return this.imageStream;
            },
            enumerable: !0,
            configurable: !0
        }), PdfImage.prototype.getPointSize = function(width, height, horizontalResolution, verticalResolution) {
            if (void 0 === horizontalResolution) {
                var dpiX = PdfUnitConverter.horizontalResolution, dpiY = PdfUnitConverter.verticalResolution;
                return this.getPointSize(width, height, dpiX, dpiY);
            }
            var ucX = new PdfUnitConverter(horizontalResolution), ucY = new PdfUnitConverter(verticalResolution), ptWidth = ucX.convertUnits(width, PdfGraphicsUnit.Pixel, PdfGraphicsUnit.Point), ptHeight = ucY.convertUnits(height, PdfGraphicsUnit.Pixel, PdfGraphicsUnit.Point);
            return new SizeF(ptWidth, ptHeight);
        }, PdfImage;
    }(), __extends$12$1 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), PdfBitmap = function(_super) {
        function PdfBitmap(encodedString) {
            var _this = _super.call(this) || this;
            return _this.imageStatus = !0, _this.dictionaryProperties = new DictionaryProperties(), 
            _this.loadImage(encodedString), _this;
        }
        return __extends$12$1(PdfBitmap, _super), PdfBitmap.prototype.loadImage = function(encodedString) {
            this.initializeAsync(encodedString);
        }, PdfBitmap.prototype.initializeAsync = function(encodedString) {
            var byteArray = new ByteArray(encodedString.length);
            byteArray.writeFromBase64String(encodedString), this.decoder = new ImageDecoder(byteArray), 
            this.height = this.decoder.height, this.width = this.decoder.width, this.bitsPerComponent = this.decoder.bitsPerComponent;
        }, PdfBitmap.prototype.save = function() {
            this.imageStatus = !0, this.imageStream = this.decoder.getImageDictionary();
        }, PdfBitmap;
    }(PdfImage), __extends$11$1 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), PdfResources = function(_super) {
        function PdfResources(baseDictionary) {
            var _this = _super.call(this) || this;
            return _this.properties = new PdfDictionary(), baseDictionary instanceof PdfDictionary && (_this = _super.call(this, baseDictionary) || this), 
            _this;
        }
        return __extends$11$1(PdfResources, _super), Object.defineProperty(PdfResources.prototype, "names", {
            get: function() {
                return this.getNames();
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfResources.prototype, "document", {
            get: function() {
                return this.pdfDocument;
            },
            set: function(value) {
                this.pdfDocument = value;
            },
            enumerable: !0,
            configurable: !0
        }), PdfResources.prototype.getName = function(obj) {
            var primitive = obj.element, name = null;
            if (this.names.containsKey(primitive) && (name = this.names.getValue(primitive)), 
            null == name) {
                var sName = this.generateName();
                name = new PdfName(sName), this.names.setValue(primitive, name), obj instanceof PdfFont ? this.add(obj, name) : obj instanceof PdfTemplate ? this.add(obj, name) : obj instanceof PdfTransparency ? this.add(obj, name) : (obj instanceof PdfImage || obj instanceof PdfBitmap) && this.add(obj, name);
            }
            return name;
        }, PdfResources.prototype.getNames = function() {
            null == this.pdfNames && (this.pdfNames = new TemporaryDictionary());
            var fonts = this.items.getValue(this.dictionaryProperties.font);
            if (null != fonts) {
                PdfCrossTable.dereference(fonts);
            }
            return this.pdfNames;
        }, PdfResources.prototype.requireProcedureSet = function(procedureSetName) {
            if (null == procedureSetName) throw new Error("ArgumentNullException:procedureSetName");
            var procSets = this.items.getValue(this.dictionaryProperties.procset);
            null == procSets && (procSets = new PdfArray(), this.items.setValue(this.dictionaryProperties.procset, procSets));
            var name = new PdfName(procedureSetName);
            procSets.contains(name) || procSets.add(name);
        }, PdfResources.prototype.removeFont = function(name) {
            for (var key = null, keys = this.pdfNames.keys(), index = 0; index < this.pdfNames.size(); index++) if (this.pdfNames.getValue(keys[index]) === new PdfName(name)) {
                key = keys[index];
                break;
            }
            null != key && this.pdfNames.remove(key);
        }, PdfResources.prototype.generateName = function() {
            return Guid.getNewGuidString();
        }, PdfResources.prototype.add = function(arg1, arg2) {
            if (arg1 instanceof PdfFont) {
                var dictionary = null, fonts = this.items.getValue(this.dictionaryProperties.font);
                if (null != fonts) {
                    var reference = fonts;
                    dictionary = fonts, dictionary = fonts;
                } else dictionary = new PdfDictionary(), this.items.setValue(this.dictionaryProperties.font, dictionary);
                dictionary.items.setValue(arg2.value, new PdfReferenceHolder(arg1.element));
            } else if (arg1 instanceof PdfTemplate) {
                var xobjects = void 0;
                null == (xobjects = this.items.getValue(this.dictionaryProperties.xObject)) && (xobjects = new PdfDictionary(), 
                this.items.setValue(this.dictionaryProperties.xObject, xobjects)), xobjects.items.setValue(arg2.value, new PdfReferenceHolder(arg1.element));
            } else if (arg1 instanceof PdfBrush) ; else if (arg1 instanceof PdfTransparency) {
                var savable = arg1.element, transDic = null;
                null == (transDic = this.items.getValue(this.dictionaryProperties.extGState)) && (transDic = new PdfDictionary(), 
                this.items.setValue(this.dictionaryProperties.extGState, transDic)), transDic.items.setValue(arg2.value, new PdfReferenceHolder(savable));
            } else {
                xobjects = this.Dictionary.items.getValue(this.dictionaryProperties.xObject);
                var parentXObjects = void 0;
                void 0 !== this.pdfDocument && (parentXObjects = this.pdfDocument.sections.element.items.getValue(this.dictionaryProperties.resources).items.getValue(this.dictionaryProperties.xObject));
                this.Dictionary.items.values();
                var hasSameImageStream = !1, oldReference = void 0;
                if (void 0 === this.pdfDocument || void 0 !== typeof parentXObjects && null != parentXObjects) {
                    if (void 0 !== this.pdfDocument) for (var values_1 = parentXObjects.items.values(), i = 0; i < values_1.length; i++) void 0 !== values_1[i] && void 0 !== values_1[i].element && values_1[i].element.data[0] === arg1.element.data[0] && (oldReference = values_1[i], 
                    hasSameImageStream = !0);
                } else parentXObjects = new PdfDictionary(), this.pdfDocument.sections.element.items.getValue(this.dictionaryProperties.resources).items.setValue(this.dictionaryProperties.xObject, parentXObjects);
                if (null == xobjects && (xobjects = new PdfDictionary(), this.Dictionary.items.setValue(this.dictionaryProperties.xObject, xobjects)), 
                hasSameImageStream && void 0 !== oldReference) xobjects.items.setValue(arg2.value, oldReference); else {
                    reference = new PdfReferenceHolder(arg1.element);
                    xobjects.items.setValue(arg2.value, reference), void 0 !== this.pdfDocument && parentXObjects.items.setValue(arg2.value, reference);
                }
            }
        }, PdfResources;
    }(PdfDictionary), Guid = function() {
        function Guid(stringValue) {
            this.stringValue = stringValue || Guid.getNewGuidString();
        }
        return Object.defineProperty(Guid, "randomNumber", {
            get: function() {
                return Guid.guid = Guid.guid + 1, Guid.guid = Guid.guid > 999999999999 ? 0 : Guid.guid;
            },
            enumerable: !0,
            configurable: !0
        }), Guid.prototype.toString = function() {
            return this.stringValue;
        }, Guid.getNewGuidString = function() {
            var randomString = Guid.randomNumber.toString();
            return randomString = "abc7def4-ghi9-jkl2-m6n3-" + "opqrstuvwxyz".substr(0, 12 - randomString.length) + randomString;
        }, Guid.guid = 0, Guid;
    }(), PdfPageBase = function() {
        function PdfPageBase(dictionary) {
            this.defLayerIndex = -1, this.modified = !1, this.dictionaryProperties = new DictionaryProperties(), 
            this.pageDictionary = dictionary;
        }
        return Object.defineProperty(PdfPageBase.prototype, "section", {
            get: function() {
                return this.pdfSection;
            },
            set: function(value) {
                this.pdfSection = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPageBase.prototype, "dictionary", {
            get: function() {
                return this.pageDictionary;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPageBase.prototype, "element", {
            get: function() {
                return this.pageDictionary;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPageBase.prototype, "defaultLayer", {
            get: function() {
                var layer = this.layers, index = this.defaultLayerIndex;
                return layer.items(index);
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPageBase.prototype, "defaultLayerIndex", {
            get: function() {
                if (0 === this.layerCollection.count || -1 === this.defLayerIndex) {
                    var layer = this.layerCollection.add();
                    this.defLayerIndex = this.layerCollection.indexOf(layer);
                }
                return this.defLayerIndex;
            },
            set: function(value) {
                if (value < 0 || value > this.layers.count - 1) throw new Error("ArgumentOutOfRangeException : value, Index can not be less 0 and greater Layers.Count - 1");
                this.defLayerIndex = value, this.modified = !0;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPageBase.prototype, "layers", {
            get: function() {
                return null != this.layerCollection && void 0 !== this.layerCollection || (this.layerCollection = new PdfPageLayerCollection(this)), 
                this.layerCollection;
            },
            enumerable: !0,
            configurable: !0
        }), PdfPageBase.prototype.getResources = function() {
            return null == this.resources && (this.resources = new PdfResources(), this.dictionary.items.setValue(this.dictionaryProperties.resources, this.resources)), 
            this.resources;
        }, Object.defineProperty(PdfPageBase.prototype, "contents", {
            get: function() {
                var contents = this.pageDictionary.items.getValue(this.dictionaryProperties.contents);
                return null == contents && (contents = new PdfArray(), this.pageDictionary.items.setValue(this.dictionaryProperties.contents, contents)), 
                contents;
            },
            enumerable: !0,
            configurable: !0
        }), PdfPageBase.prototype.setResources = function(res) {
            this.resources = res, this.dictionary.items.setValue(this.dictionaryProperties.resources, this.resources), 
            this.modified = !0;
        }, PdfPageBase;
    }(), PdfAnnotationCollection = function() {
        function PdfAnnotationCollection(page) {
            this.alreadyExistsAnnotationError = "This annotatation had been already added to page", 
            this.missingAnnotationException = "Annotation is not contained in collection.", 
            this.dictionaryProperties = new DictionaryProperties(), this.internalAnnotations = new PdfArray(), 
            this.lists = [], void 0 !== page && (this.page = page);
        }
        return Object.defineProperty(PdfAnnotationCollection.prototype, "annotations", {
            get: function() {
                return this.internalAnnotations;
            },
            set: function(value) {
                this.internalAnnotations = value;
            },
            enumerable: !0,
            configurable: !0
        }), PdfAnnotationCollection.prototype.add = function(annotation) {
            this.doAdd(annotation);
        }, PdfAnnotationCollection.prototype.doAdd = function(annotation) {
            if (void 0 === annotation.destination) return annotation.setPage(this.page), this.internalAnnotations.add(new PdfReferenceHolder(annotation)), 
            this.lists.push(annotation);
            var layoutResult = new PdfStringLayouter().layout(annotation.text, annotation.font, annotation.stringFormat, new SizeF(annotation.bounds.width, 0), !1, new SizeF(0, 0)), lastPosition = annotation.bounds.y;
            if (1 === layoutResult.lines.length) {
                var size = annotation.font.measureString(layoutResult.lines[0].text);
                annotation.bounds = new RectangleF(new PointF(annotation.bounds.x, lastPosition), size), 
                annotation.text = layoutResult.lines[0].text, this.page.graphics.drawString(annotation.text, annotation.font, null, annotation.brush, annotation.bounds.x, annotation.bounds.y, annotation.bounds.width, annotation.bounds.height, null), 
                annotation.setPage(this.page), this.setColor(annotation), this.internalAnnotations.add(new PdfReferenceHolder(annotation)), 
                this.lists.push(annotation);
            } else for (var i = 0; i < layoutResult.lines.length; i++) {
                size = annotation.font.measureString(layoutResult.lines[i].text);
                if (0 === i) annotation.bounds = new RectangleF(annotation.bounds.x, lastPosition, size.width, size.height), 
                annotation.text = layoutResult.lines[i].text, this.page.graphics.drawString(annotation.text, annotation.font, null, annotation.brush, annotation.bounds.x, lastPosition, size.width, size.height, null), 
                annotation.setPage(this.page), this.setColor(annotation), this.internalAnnotations.add(new PdfReferenceHolder(annotation)), 
                this.lists.push(annotation), lastPosition += annotation.bounds.height; else {
                    var annot = annotation.clone();
                    annot.bounds = new RectangleF(new PointF(annotation.bounds.x, lastPosition), size), 
                    annot.text = layoutResult.lines[i].text, this.page.graphics.drawString(annot.text, annot.font, null, annot.brush, annot.bounds.x, annot.bounds.y, annot.bounds.width, annot.bounds.height, null), 
                    annot.setPage(this.page), this.setColor(annot), this.internalAnnotations.add(new PdfReferenceHolder(annot)), 
                    this.lists.push(annot), lastPosition += annot.bounds.height;
                }
            }
        }, PdfAnnotationCollection.prototype.setColor = function(annotation) {
            var cs = PdfColorSpace.Rgb, colours = annotation.color.toArray(cs);
            annotation.dictionary.items.setValue(this.dictionaryProperties.c, colours);
        }, Object.defineProperty(PdfAnnotationCollection.prototype, "element", {
            get: function() {
                return this.internalAnnotations;
            },
            enumerable: !0,
            configurable: !0
        }), PdfAnnotationCollection;
    }(), __extends$8$1 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), PdfPage = function(_super) {
        function PdfPage() {
            var _this = _super.call(this, new PdfDictionary()) || this;
            return _this.annotationCollection = null, _this.beginSave = null, _this.initialize(), 
            _this;
        }
        return __extends$8$1(PdfPage, _super), Object.defineProperty(PdfPage.prototype, "document", {
            get: function() {
                return null !== this.section && null !== this.section.parent ? this.section.parent.document : null;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPage.prototype, "graphics", {
            get: function() {
                var result = this.defaultLayer.graphics;
                return result.currentPage = this, result;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPage.prototype, "crossTable", {
            get: function() {
                if (null === this.section) throw new Error("PdfDocumentException : Page is not created");
                return null === this.section.parent ? this.section.parentDocument.crossTable : this.section.parent.document.crossTable;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPage.prototype, "size", {
            get: function() {
                return this.section.pageSettings.size;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPage.prototype, "origin", {
            get: function() {
                return this.section.pageSettings.origin;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPage.prototype, "annotations", {
            get: function() {
                return null == this.annotationCollection && (this.annotationCollection = new PdfAnnotationCollection(this), 
                this.dictionary.items.setValue(this.dictionaryProperties.annots, this.annotationCollection.element), 
                this.annotationCollection.annotations = this.dictionary.items.getValue(this.dictionaryProperties.annots)), 
                this.annotationCollection;
            },
            enumerable: !0,
            configurable: !0
        }), PdfPage.prototype.initialize = function() {
            this.dictionary.items.setValue(this.dictionaryProperties.type, new PdfName("Page")), 
            this.dictionary.pageBeginDrawTemplate = new SaveTemplateEventHandler(this);
        }, PdfPage.prototype.setSection = function(section) {
            this.section = section, this.dictionary.items.setValue(this.dictionaryProperties.parent, new PdfReferenceHolder(section));
        }, PdfPage.prototype.resetProgress = function() {
            this.isProgressOn = !1;
        }, PdfPage.prototype.getClientSize = function() {
            var returnValue = this.section.getActualBounds(this, !0);
            return new SizeF(returnValue.width, returnValue.height);
        }, PdfPage.prototype.pageBeginSave = function() {
            var doc = this.document;
            void 0 !== typeof doc && null != doc && this.drawPageTemplates(doc), null != this.beginSave && void 0 !== this.beginSave && this.beginSave(this);
        }, PdfPage.prototype.drawPageTemplates = function(document) {
            if (this.section.containsTemplates(document, this, !1)) {
                var backLayer = new PdfPageLayer(this, !1);
                if (this.layers.insert(0, backLayer), this.section.drawTemplates(this, backLayer, document, !1), 
                null !== backLayer.graphics && void 0 !== backLayer.graphics) for (var i = 0; i < backLayer.graphics.automaticFields.automaticFields.length; i++) {
                    var fieldInfo = backLayer.graphics.automaticFields.automaticFields[i];
                    fieldInfo.field.performDraw(backLayer.graphics, fieldInfo.location, fieldInfo.scalingX, fieldInfo.scalingY);
                }
            }
            if (this.section.containsTemplates(document, this, !0)) {
                var frontLayer = new PdfPageLayer(this, !1);
                this.layers.add(frontLayer), this.section.drawTemplates(this, frontLayer, document, !0);
            }
        }, PdfPage;
    }(PdfPageBase), PageAddedEventArgs = function() {
        function PageAddedEventArgs(page) {
            this.pdfPage = void 0 !== page ? page : null;
        }
        return Object.defineProperty(PageAddedEventArgs.prototype, "page", {
            get: function() {
                return this.pdfPage;
            },
            enumerable: !0,
            configurable: !0
        }), PageAddedEventArgs;
    }(), PdfSectionPageCollection = function() {
        function PdfSectionPageCollection(section) {
            if (this.pdfSection = null, null == section) throw Error('ArgumentNullException("section")');
            this.section = section;
        }
        return Object.defineProperty(PdfSectionPageCollection.prototype, "section", {
            get: function() {
                return this.pdfSection;
            },
            set: function(value) {
                this.pdfSection = value;
            },
            enumerable: !0,
            configurable: !0
        }), PdfSectionPageCollection.prototype.contains = function(page) {
            return this.section.contains(page);
        }, PdfSectionPageCollection.prototype.remove = function(page) {
            this.section.remove(page);
        }, PdfSectionPageCollection.prototype.add = function() {
            return this.section.add();
        }, PdfSectionPageCollection;
    }(), PdfDocumentTemplate = function() {
        function PdfDocumentTemplate() {}
        return Object.defineProperty(PdfDocumentTemplate.prototype, "left", {
            get: function() {
                return this.leftTemplate;
            },
            set: function(value) {
                this.leftTemplate = this.checkElement(value, TemplateType.Left);
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfDocumentTemplate.prototype, "top", {
            get: function() {
                return this.topTemplate;
            },
            set: function(value) {
                this.topTemplate = this.checkElement(value, TemplateType.Top);
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfDocumentTemplate.prototype, "right", {
            get: function() {
                return this.rightTemplate;
            },
            set: function(value) {
                this.rightTemplate = this.checkElement(value, TemplateType.Right);
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfDocumentTemplate.prototype, "bottom", {
            get: function() {
                return this.bottomTemplate;
            },
            set: function(value) {
                this.bottomTemplate = this.checkElement(value, TemplateType.Bottom);
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfDocumentTemplate.prototype, "EvenLeft", {
            get: function() {
                return this.evenLeft;
            },
            set: function(value) {
                this.evenLeft = this.checkElement(value, TemplateType.Left);
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfDocumentTemplate.prototype, "EvenTop", {
            get: function() {
                return this.evenTop;
            },
            set: function(value) {
                this.evenTop = this.checkElement(value, TemplateType.Top);
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfDocumentTemplate.prototype, "EvenRight", {
            get: function() {
                return this.evenRight;
            },
            set: function(value) {
                this.evenRight = this.checkElement(value, TemplateType.Right);
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfDocumentTemplate.prototype, "EvenBottom", {
            get: function() {
                return this.evenBottom;
            },
            set: function(value) {
                this.evenBottom = this.checkElement(value, TemplateType.Bottom);
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfDocumentTemplate.prototype, "OddLeft", {
            get: function() {
                return this.oddLeft;
            },
            set: function(value) {
                this.oddLeft = this.checkElement(value, TemplateType.Left);
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfDocumentTemplate.prototype, "OddTop", {
            get: function() {
                return this.oddTop;
            },
            set: function(value) {
                this.oddTop = this.checkElement(value, TemplateType.Top);
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfDocumentTemplate.prototype, "OddRight", {
            get: function() {
                return this.oddRight;
            },
            set: function(value) {
                this.oddRight = this.checkElement(value, TemplateType.Right);
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfDocumentTemplate.prototype, "OddBottom", {
            get: function() {
                return this.oddBottom;
            },
            set: function(value) {
                this.oddBottom = this.checkElement(value, TemplateType.Bottom);
            },
            enumerable: !0,
            configurable: !0
        }), PdfDocumentTemplate.prototype.getLeft = function(page) {
            if (null == page) throw new Error("ArgumentNullException:page");
            return this.isEven(page) ? null != this.EvenLeft ? this.EvenLeft : this.left : null != this.OddLeft ? this.OddLeft : this.left;
        }, PdfDocumentTemplate.prototype.getTop = function(page) {
            if (null == page) throw new Error("ArgumentNullException:page");
            return this.isEven(page) ? null != this.EvenTop ? this.EvenTop : this.top : null != this.OddTop ? this.OddTop : this.top;
        }, PdfDocumentTemplate.prototype.getRight = function(page) {
            if (null == page) throw new Error("ArgumentNullException:page");
            return this.isEven(page) ? null != this.EvenRight ? this.EvenRight : this.right : null != this.OddRight ? this.OddRight : this.right;
        }, PdfDocumentTemplate.prototype.getBottom = function(page) {
            if (null == page) throw new Error("ArgumentNullException:page");
            return this.isEven(page) ? null != this.EvenBottom ? this.EvenBottom : this.bottom : null != this.OddBottom ? this.OddBottom : this.bottom;
        }, PdfDocumentTemplate.prototype.isEven = function(page) {
            var pages = page.section.document.pages;
            return (pages.pageCollectionIndex.containsKey(page) ? pages.pageCollectionIndex.getValue(page) + 1 : pages.indexOf(page) + 1) % 2 == 0;
        }, PdfDocumentTemplate.prototype.checkElement = function(templateElement, type) {
            if (null != templateElement) {
                if (void 0 !== templateElement.type && templateElement.type !== TemplateType.None) throw new Error("NotSupportedException:Can not reassign the template element. Please, create new one.");
                templateElement.type = type;
            }
            return templateElement;
        }, PdfDocumentTemplate;
    }(), __extends$13$1 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), PdfSectionTemplate = function(_super) {
        function PdfSectionTemplate() {
            var _this = _super.call(this) || this;
            return _this.leftValue = _this.topValue = _this.rightValue = _this.bottomValue = _this.stampValue = !0, 
            _this;
        }
        return __extends$13$1(PdfSectionTemplate, _super), Object.defineProperty(PdfSectionTemplate.prototype, "applyDocumentLeftTemplate", {
            get: function() {
                return this.leftValue;
            },
            set: function(value) {
                this.leftValue = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfSectionTemplate.prototype, "applyDocumentTopTemplate", {
            get: function() {
                return this.topValue;
            },
            set: function(value) {
                this.topValue = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfSectionTemplate.prototype, "applyDocumentRightTemplate", {
            get: function() {
                return this.rightValue;
            },
            set: function(value) {
                this.rightValue = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfSectionTemplate.prototype, "applyDocumentBottomTemplate", {
            get: function() {
                return this.bottomValue;
            },
            set: function(value) {
                this.bottomValue = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfSectionTemplate.prototype, "applyDocumentStamps", {
            get: function() {
                return this.stampValue;
            },
            set: function(value) {
                this.stampValue = value;
            },
            enumerable: !0,
            configurable: !0
        }), PdfSectionTemplate;
    }(PdfDocumentTemplate), PdfSection = function() {
        function PdfSection(document, pageSettings) {
            this.pageAdded = new PageAddedEventArgs(), this.pdfPages = [], this.dictionaryProperties = new DictionaryProperties(), 
            void 0 === pageSettings ? this.constructor(document, document.pageSettings) : (this.pdfDocument = document, 
            this.settings = pageSettings.clone(), this.initialSettings = this.settings.clone(), 
            this.initialize());
        }
        return Object.defineProperty(PdfSection.prototype, "parent", {
            get: function() {
                return this.sectionCollection;
            },
            set: function(value) {
                this.sectionCollection = value, this.section.items.setValue(this.dictionaryProperties.parent, new PdfReferenceHolder(value));
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfSection.prototype, "parentDocument", {
            get: function() {
                return this.pdfDocument;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfSection.prototype, "pageSettings", {
            get: function() {
                return this.settings;
            },
            set: function(value) {
                if (null == value) throw Error("Value can not be null.");
                this.settings = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfSection.prototype, "element", {
            get: function() {
                return this.section;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfSection.prototype, "count", {
            get: function() {
                return this.pagesReferences.count;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfSection.prototype, "template", {
            get: function() {
                return null == this.pageTemplate && (this.pageTemplate = new PdfSectionTemplate()), 
                this.pageTemplate;
            },
            set: function(value) {
                this.pageTemplate = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfSection.prototype, "document", {
            get: function() {
                return this.sectionCollection.document;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfSection.prototype, "pages", {
            get: function() {
                return null != this.pagesCollection && void 0 !== this.pagesCollection || (this.pagesCollection = new PdfSectionPageCollection(this)), 
                this.pagesCollection;
            },
            enumerable: !0,
            configurable: !0
        }), PdfSection.prototype.getPages = function() {
            return this.pdfPages;
        }, PdfSection.prototype.pointToNativePdf = function(page, point) {
            var bounds = this.getActualBounds(page, !0);
            return point.x += bounds.x, point.y = this.pageSettings.height - point.y, point;
        }, PdfSection.prototype.setPageSettings = function(settings) {
            this.settings = settings, this.state.orientation = settings.orientation, this.state.rotate = settings.rotate, 
            this.state.size = settings.size, this.state.origin = settings.origin;
        }, PdfSection.prototype.initialize = function() {
            this.pagesReferences = new PdfArray(), this.section = new PdfDictionary(), this.state = new PageSettingsState(this.pdfDocument), 
            this.section.sectionBeginSave = new SaveSectionEventHandler(this, this.state), this.pageCount = new PdfNumber(0), 
            this.section.items.setValue(this.dictionaryProperties.count, this.pageCount), this.section.items.setValue(this.dictionaryProperties.type, new PdfName(this.dictionaryProperties.pages)), 
            this.section.items.setValue(this.dictionaryProperties.kids, this.pagesReferences);
        }, PdfSection.prototype.containsTemplates = function(document, page, foreground) {
            var documentHeaders = this.getDocumentTemplates(document, page, !0, foreground), documentTemplates = this.getDocumentTemplates(document, page, !1, foreground);
            return documentHeaders.length > 0 || documentTemplates.length > 0;
        }, PdfSection.prototype.getDocumentTemplates = function(document, page, headers, foreground) {
            var templates = [];
            return headers && (this.template.applyDocumentTopTemplate && null != document.template.getTop(page) && (!document.template.getTop(page).foreground && !foreground || document.template.getTop(page).foreground && foreground) && templates.push(document.template.getTop(page)), 
            this.template.applyDocumentBottomTemplate && null != document.template.getBottom(page) && (!document.template.getBottom(page).foreground && !foreground || document.template.getBottom(page).foreground && foreground) && templates.push(document.template.getBottom(page)), 
            this.template.applyDocumentLeftTemplate && null != document.template.getLeft(page) && (!document.template.getLeft(page).foreground && !foreground || document.template.getLeft(page).foreground && foreground) && templates.push(document.template.getLeft(page)), 
            this.template.applyDocumentRightTemplate && null != document.template.getRight(page) && (!document.template.getRight(page).foreground && !foreground || document.template.getRight(page).foreground && foreground) && templates.push(document.template.getRight(page))), 
            templates;
        }, PdfSection.prototype.add = function(page) {
            if (void 0 === page) {
                var page_1 = new PdfPage();
                return this.add(page_1), page_1;
            }
            var r = this.checkPresence(page);
            this.pdfPages.push(page), this.pagesReferences.add(r), page.setSection(this), page.resetProgress(), 
            this.pageAddedMethod(page);
        }, PdfSection.prototype.checkPresence = function(page) {
            for (var rh = new PdfReferenceHolder(page), contains = !1, sc = this.parent, index = 0; index < sc.section.length; index++) {
                var section = sc.section[index];
                contains = contains || section.contains(page);
            }
            return rh;
        }, PdfSection.prototype.contains = function(page) {
            return 0 <= this.indexOf(page);
        }, PdfSection.prototype.indexOf = function(page) {
            for (var index = 0; index < this.pdfPages.length; index++) if (this.pdfPages[index] === page) return this.pdfPages.indexOf(page);
            var r = new PdfReferenceHolder(page);
            return this.pagesReferences.indexOf(r);
        }, PdfSection.prototype.pageAddedMethod = function(page) {
            var args = new PageAddedEventArgs(page);
            this.onPageAdded(args);
            this.parent.document.pages.onPageAdded(args), this.pageCount.intValue = this.count;
        }, PdfSection.prototype.onPageAdded = function(args) {}, PdfSection.prototype.getActualBounds = function(arg1, arg2, arg3) {
            if (arg1 instanceof PdfPage && "boolean" == typeof arg2) {
                var document_1 = this.parent.document;
                return this.getActualBounds(document_1, arg1, arg2);
            }
            arg1 = arg1, arg2 = arg2, arg3 = arg3;
            var bounds = new RectangleF(0, 0, 0, 0);
            bounds.height = arg3 ? this.pageSettings.size.height : this.pageSettings.getActualSize().height, 
            bounds.width = arg3 ? this.pageSettings.size.width : this.pageSettings.getActualSize().width;
            var left = this.getLeftIndentWidth(arg1, arg2, arg3), top_1 = this.getTopIndentHeight(arg1, arg2, arg3), right = this.getRightIndentWidth(arg1, arg2, arg3), bottom = this.getBottomIndentHeight(arg1, arg2, arg3);
            return bounds.x += left, bounds.y += top_1, bounds.width -= left + right, bounds.height -= top_1 + bottom, 
            bounds;
        }, PdfSection.prototype.getLeftIndentWidth = function(document, page, includeMargins) {
            if (null == document) throw new Error("ArgumentNullException:document");
            if (null == page) throw new Error("ArgumentNullException:page");
            var value = includeMargins ? this.pageSettings.margins.left : 0, templateWidth = null != this.template.getLeft(page) ? this.template.getLeft(page).width : 0, docTemplateWidth = null != document.template.getLeft(page) ? document.template.getLeft(page).width : 0;
            return value += this.template.applyDocumentLeftTemplate ? Math.max(templateWidth, docTemplateWidth) : templateWidth;
        }, PdfSection.prototype.getTopIndentHeight = function(document, page, includeMargins) {
            if (null == document) throw new Error("ArgumentNullException:document");
            if (null == page) throw new Error("ArgumentNullException:page");
            var value = includeMargins ? this.pageSettings.margins.top : 0, templateHeight = null != this.template.getTop(page) ? this.template.getTop(page).height : 0, docTemplateHeight = null != document.template.getTop(page) ? document.template.getTop(page).height : 0;
            return value += this.template.applyDocumentTopTemplate ? Math.max(templateHeight, docTemplateHeight) : templateHeight;
        }, PdfSection.prototype.getRightIndentWidth = function(document, page, includeMargins) {
            if (null == document) throw new Error("ArgumentNullException:document");
            if (null == page) throw new Error("ArgumentNullException:page");
            var value = includeMargins ? this.pageSettings.margins.right : 0, templateWidth = null != this.template.getRight(page) ? this.template.getRight(page).width : 0, docTemplateWidth = null != document.template.getRight(page) ? document.template.getRight(page).width : 0;
            return value += this.template.applyDocumentRightTemplate ? Math.max(templateWidth, docTemplateWidth) : templateWidth;
        }, PdfSection.prototype.getBottomIndentHeight = function(document, page, includeMargins) {
            if (null == document) throw new Error("ArgumentNullException:document");
            if (null == page) throw new Error("ArgumentNullException:page");
            var value = includeMargins ? this.pageSettings.margins.bottom : 0, templateHeight = null != this.template.getBottom(page) ? this.template.getBottom(page).height : 0, docTemplateHeight = null != document.template.getBottom(page) ? document.template.getBottom(page).height : 0;
            return value += this.template.applyDocumentBottomTemplate ? Math.max(templateHeight, docTemplateHeight) : templateHeight;
        }, PdfSection.prototype.remove = function(page) {
            if (null == page) throw Error('ArgumentNullException("page")');
            var index = this.pdfPages.indexOf(page);
            this.pagesReferences.removeAt(index);
            for (var temproaryPages = [], j = 0; j < index; j++) temproaryPages.push(this.pdfPages[j]);
            for (j = index + 1; j < this.pdfPages.length; j++) temproaryPages.push(this.pdfPages[j]);
            this.pdfPages = temproaryPages;
        }, PdfSection.prototype.applyPageSettings = function(container, parentSettings, state) {
            var bounds = new RectangleF(state.origin, state.size);
            container.items.setValue(this.dictionaryProperties.mediaBox, PdfArray.fromRectangle(bounds));
            var rotate = 0;
            rotate = PdfSectionCollection.rotateFactor * state.rotate;
            var angle = new PdfNumber(rotate);
            container.items.setValue(this.dictionaryProperties.rotate, angle);
        }, PdfSection.prototype.beginSave = function(state, writer) {
            var doc = writer.document;
            this.applyPageSettings(this.section, doc.pageSettings, state);
        }, PdfSection.prototype.drawTemplates = function(page, layer, document, foreground) {
            var documentHeaders = this.getDocumentTemplates(document, page, !0, foreground), documentTemplates = this.getDocumentTemplates(document, page, !1, foreground);
            this.drawTemplatesHelper(layer, document, documentHeaders), this.drawTemplatesHelper(layer, document, documentTemplates);
        }, PdfSection.prototype.drawTemplatesHelper = function(layer, document, templates) {
            if (null != templates && templates.length > 0) for (var len = templates.length, i = 0; i < len; i++) {
                templates[i].draw(layer, document);
            }
        }, PdfSection;
    }(), PageSettingsState = function() {
        function PageSettingsState(document) {
            this.pageOrientation = document.pageSettings.orientation, this.pageRotate = document.pageSettings.rotate, 
            this.pageSize = document.pageSettings.size, this.pageOrigin = document.pageSettings.origin;
        }
        return Object.defineProperty(PageSettingsState.prototype, "orientation", {
            get: function() {
                return this.pageOrientation;
            },
            set: function(value) {
                this.pageOrientation = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PageSettingsState.prototype, "rotate", {
            get: function() {
                return this.pageRotate;
            },
            set: function(value) {
                this.pageRotate = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PageSettingsState.prototype, "size", {
            get: function() {
                return this.pageSize;
            },
            set: function(value) {
                this.pageSize = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PageSettingsState.prototype, "origin", {
            get: function() {
                return this.pageOrigin;
            },
            set: function(value) {
                this.pageOrigin = value;
            },
            enumerable: !0,
            configurable: !0
        }), PageSettingsState;
    }(), PdfSectionCollection = function() {
        function PdfSectionCollection(document) {
            this.sections = [], this.dictionaryProperties = new DictionaryProperties(), this.pdfDocument = document.clone(), 
            this.initialize();
        }
        return Object.defineProperty(PdfSectionCollection.prototype, "section", {
            get: function() {
                return this.sections;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfSectionCollection.prototype, "document", {
            get: function() {
                return this.pdfDocument;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfSectionCollection.prototype, "count", {
            get: function() {
                return this.sections.length;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfSectionCollection.prototype, "element", {
            get: function() {
                return this.pages;
            },
            enumerable: !0,
            configurable: !0
        }), PdfSectionCollection.prototype.initialize = function() {
            this.sectionCount = new PdfNumber(0), this.sectionCollection = new PdfArray(), this.pages = new PdfDictionary(), 
            this.pages.beginSave = new SaveSectionCollectionEventHandler(this), this.pages.items.setValue(this.dictionaryProperties.type, new PdfName("Pages")), 
            this.pages.items.setValue(this.dictionaryProperties.kids, this.sectionCollection), 
            this.pages.items.setValue(this.dictionaryProperties.count, this.sectionCount), this.pages.items.setValue(this.dictionaryProperties.resources, new PdfDictionary()), 
            this.setPageSettings(this.pages, this.pdfDocument.pageSettings);
        }, PdfSectionCollection.prototype.pdfSectionCollection = function(index) {
            if (index < 0 || index >= this.count) throw new Error("IndexOutOfRangeException()");
            return this.sections[index];
        }, PdfSectionCollection.prototype.setPageSettings = function(container, pageSettings) {
            var bounds = new RectangleF(new PointF(), pageSettings.size);
            container.items.setValue(this.dictionaryProperties.mediaBox, PdfArray.fromRectangle(bounds));
        }, PdfSectionCollection.prototype.add = function(section) {
            if (void 0 === section) {
                var section_1 = new PdfSection(this.pdfDocument);
                return this.add(section_1), section_1;
            }
            var r = this.checkSection(section);
            return this.sections.push(section), section.parent = this, this.sectionCollection.add(r), 
            this.sections.indexOf(section);
        }, PdfSectionCollection.prototype.checkSection = function(section) {
            var r = new PdfReferenceHolder(section);
            this.sectionCollection.contains(r);
            return r;
        }, PdfSectionCollection.prototype.countPages = function() {
            var count = 0;
            return this.sections.forEach(function(n) {
                return count += n.count;
            }), count;
        }, PdfSectionCollection.prototype.beginSave = function() {
            this.sectionCount.intValue = this.countPages();
        }, PdfSectionCollection.rotateFactor = 90, PdfSectionCollection;
    }(), PdfDocumentPageCollection = function() {
        function PdfDocumentPageCollection(document) {
            this.pdfPageCollectionIndex = new Dictionary(), this.previousPageOrientation = PdfPageOrientation.Portrait, 
            this.document = document;
        }
        return Object.defineProperty(PdfDocumentPageCollection.prototype, "count", {
            get: function() {
                return this.countPages();
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfDocumentPageCollection.prototype, "pageCollectionIndex", {
            get: function() {
                return this.pdfPageCollectionIndex;
            },
            enumerable: !0,
            configurable: !0
        }), PdfDocumentPageCollection.prototype.add = function(page) {
            if (void 0 === page) {
                var page_1 = new PdfPage();
                return this.add(page_1), page_1;
            }
            var section = this.getLastSection();
            section.pageSettings.orientation !== this.previousPageOrientation && ((section = this.document.sections.add()).pageSettings.orientation = this.document.pageSettings.orientation), 
            section.add(page);
        }, PdfDocumentPageCollection.prototype.getLastSection = function() {
            var sc = this.document.sections;
            0 === sc.section.length && sc.add();
            return sc.section[sc.section.length - 1];
        }, PdfDocumentPageCollection.prototype.onPageAdded = function(args) {}, PdfDocumentPageCollection.prototype.countPages = function() {
            for (var sc = this.document.sections, count = 0, index = 0; index < sc.section.length; index++) count += sc.section[index].count;
            return count;
        }, PdfDocumentPageCollection.prototype.getPageByIndex = function(index) {
            return this.getPage(index);
        }, PdfDocumentPageCollection.prototype.getPage = function(index) {
            if (index < 0 || index >= this.count) throw Error('ArgumentOutOfRangeException("index", "Value can not be less 0")');
            for (var page = null, sectionStartIndex = 0, sectionCount = 0, pageIndex = 0, length = this.document.sections.count, i = 0; i < length; i++) {
                var section = this.document.sections.section[i];
                if (sectionCount = section.count, pageIndex = index - sectionStartIndex, index >= sectionStartIndex && pageIndex < sectionCount) {
                    page = section.getPages()[pageIndex];
                    break;
                }
                sectionStartIndex += sectionCount;
            }
            return page;
        }, PdfDocumentPageCollection.prototype.indexOf = function(page) {
            var index = -1;
            if (null == page) throw new Error("ArgumentNullException: page");
            for (var numPages = 0, i = 0, len = this.document.sections.count; i < len; i++) {
                var section = this.document.sections.pdfSectionCollection(i);
                if ((index = section.indexOf(page)) >= 0) {
                    index += numPages;
                    break;
                }
                index = -1, numPages += section.count;
            }
            return index;
        }, PdfDocumentPageCollection.prototype.remove = function(page) {
            if (null == page) throw Error('ArgumentNullException("page")');
            for (var section = null, i = 0, len_1 = this.document.sections.count; i < len_1; i++) if ((section = this.document.sections.pdfSectionCollection(i)).pages.contains(page)) {
                section.pages.remove(page);
                break;
            }
            return section;
        }, PdfDocumentPageCollection;
    }(), PdfCacheCollection = function() {
        function PdfCacheCollection() {
            this.referenceObjects = [], this.pdfFontCollection = new Dictionary();
        }
        return PdfCacheCollection.prototype.search = function(obj) {
            return this.createNewGroup().push(obj), null;
        }, PdfCacheCollection.prototype.createNewGroup = function() {
            var group = [];
            return this.referenceObjects.push(group), group;
        }, PdfCacheCollection.prototype.destroy = function() {
            this.pdfFontCollection = void 0, this.referenceObjects = void 0;
        }, PdfCacheCollection;
    }(), __extends$6$1 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), PdfDocument = function(_super) {
        function PdfDocument(isMerging) {
            var _this = _super.call(this) || this;
            if (_this.defaultMargin = 40, _this.streamWriter = null, _this = _super.call(this, _this) || this, 
            !0 === isMerging || !1 === isMerging || void 0 !== isMerging) {
                var objects = new PdfMainObjectCollection();
                _this.setMainObjectCollection(objects);
                var crossTable = new PdfCrossTable();
                crossTable.isMerging = isMerging, crossTable.document = _this, _this.setCrossTable(crossTable);
                var catalog = new PdfCatalog();
                _this.setCatalog(catalog), objects.add(catalog), catalog.position = -1, _this.sectionCollection = new PdfSectionCollection(_this), 
                _this.documentPageCollection = new PdfDocumentPageCollection(_this), catalog.pages = _this.sectionCollection;
            } else PdfDocument.cacheCollection = new PdfCacheCollection(), _this.constructor(!1);
            return _this;
        }
        return __extends$6$1(PdfDocument, _super), Object.defineProperty(PdfDocument, "defaultFont", {
            get: function() {
                return null == this.defaultStandardFont && (this.defaultStandardFont = new PdfStandardFont(PdfFontFamily.Helvetica, 8)), 
                this.defaultStandardFont;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfDocument.prototype, "sections", {
            get: function() {
                return this.sectionCollection;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfDocument.prototype, "pageSettings", {
            get: function() {
                return null == this.settings && (this.settings = new PdfPageSettings(this.defaultMargin)), 
                this.settings;
            },
            set: function(value) {
                this.settings = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfDocument.prototype, "pages", {
            get: function() {
                return this.documentPageCollection;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfDocument, "cache", {
            get: function() {
                return void 0 === PdfDocument.cacheCollection || null == PdfDocument.cacheCollection ? new PdfCacheCollection() : PdfDocument.cacheCollection;
            },
            set: function(value) {
                this.cacheCollection = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfDocument.prototype, "colorSpace", {
            get: function() {
                return this.pdfColorSpace === PdfColorSpace.Rgb || this.pdfColorSpace === PdfColorSpace.Cmyk || this.pdfColorSpace === PdfColorSpace.GrayScale ? this.pdfColorSpace : PdfColorSpace.Rgb;
            },
            set: function(value) {
                value === PdfColorSpace.Rgb || value === PdfColorSpace.Cmyk || value === PdfColorSpace.GrayScale ? this.pdfColorSpace = value : this.pdfColorSpace = PdfColorSpace.Rgb;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfDocument.prototype, "template", {
            get: function() {
                return null == this.pageTemplate && (this.pageTemplate = new PdfDocumentTemplate()), 
                this.pageTemplate;
            },
            set: function(value) {
                this.pageTemplate = value;
            },
            enumerable: !0,
            configurable: !0
        }), PdfDocument.prototype.docSave = function(stream, arg2, arg3) {
            if (this.checkPagesPresence(), null === stream) throw new Error("ArgumentNullException : stream");
            this.streamWriter = stream;
            var writer = new PdfWriter(stream);
            if (writer.document = this, "boolean" == typeof arg2 && void 0 === arg3) return this.crossTable.save(writer);
            this.crossTable.save(writer, arg2);
        }, PdfDocument.prototype.checkPagesPresence = function() {
            0 === this.pages.count && this.pages.add();
        }, PdfDocument.prototype.destroy = function() {
            this.catalog = void 0, this.colorSpace = void 0, this.currentSavingObj = void 0, 
            this.documentPageCollection = void 0, this.isStreamCopied = void 0, this.pageSettings = void 0, 
            this.pageTemplate = void 0, this.pdfColorSpace = void 0, this.sectionCollection = void 0, 
            PdfDocument.cache.destroy(), this.crossTable.pdfObjects.destroy(), PdfDocument.cache = void 0, 
            this.streamWriter.destroy();
        }, PdfDocument.defaultStandardFont = null, PdfDocument;
    }(PdfDocumentBase), __extends$14$1 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), PdfFontMetrics = function() {
        function PdfFontMetrics() {
            this.lineGap = 0;
        }
        return PdfFontMetrics.prototype.getAscent = function(format) {
            return this.ascent * PdfFont.charSizeMultiplier * this.getSize(format);
        }, PdfFontMetrics.prototype.getDescent = function(format) {
            return this.descent * PdfFont.charSizeMultiplier * this.getSize(format);
        }, PdfFontMetrics.prototype.getLineGap = function(format) {
            return this.lineGap * PdfFont.charSizeMultiplier * this.getSize(format);
        }, PdfFontMetrics.prototype.getHeight = function(format) {
            for (var clearTypeFonts = [ "cambria", "candara", "constantia", "corbel", "cariadings" ], clearTypeFontCollection = [], index = 0; index < clearTypeFonts.length; index++) {
                var font = clearTypeFonts[index];
                clearTypeFontCollection.push(font);
            }
            return this.getDescent(format) < 0 ? this.getAscent(format) - this.getDescent(format) + this.getLineGap(format) : this.getAscent(format) + this.getDescent(format) + this.getLineGap(format);
        }, PdfFontMetrics.prototype.getSize = function(format) {
            var size = this.size;
            if (null != format) switch (format.subSuperScript) {
              case PdfSubSuperScript.SubScript:
                size /= this.subScriptSizeFactor;
                break;

              case PdfSubSuperScript.SuperScript:
                size /= this.superscriptSizeFactor;
            }
            return size;
        }, PdfFontMetrics.prototype.clone = function() {
            return this.widthTable = WidthTable.clone(), this;
        }, Object.defineProperty(PdfFontMetrics.prototype, "widthTable", {
            get: function() {
                return this.internalWidthTable;
            },
            set: function(value) {
                this.internalWidthTable = value;
            },
            enumerable: !0,
            configurable: !0
        }), PdfFontMetrics;
    }(), WidthTable = function() {
        function WidthTable() {}
        return WidthTable.clone = function() {
            return null;
        }, WidthTable;
    }(), StandardWidthTable = function(_super) {
        function StandardWidthTable(widths) {
            var _this = _super.call(this) || this;
            if (null == widths) throw new Error("ArgumentNullException:widths");
            return _this.widths = widths, _this;
        }
        return __extends$14$1(StandardWidthTable, _super), StandardWidthTable.prototype.items = function(index) {
            if (index < 0 || index >= this.widths.length) throw new Error("ArgumentOutOfRangeException:index, The character is not supported by the font.");
            return this.widths[index];
        }, Object.defineProperty(StandardWidthTable.prototype, "length", {
            get: function() {
                return this.widths.length;
            },
            enumerable: !0,
            configurable: !0
        }), StandardWidthTable.prototype.clone = function() {
            return this.widths = this.widths, this;
        }, StandardWidthTable.prototype.toArray = function() {
            return new PdfArray(this.widths);
        }, StandardWidthTable;
    }(WidthTable), PdfStandardFontMetricsFactory = function() {
        function PdfStandardFontMetricsFactory() {}
        return PdfStandardFontMetricsFactory.getMetrics = function(fontFamily, fontStyle, size) {
            var metrics = null;
            switch (fontFamily) {
              case PdfFontFamily.Helvetica:
                metrics = this.getHelveticaMetrics(fontFamily, fontStyle, size);
                break;

              case PdfFontFamily.Courier:
                metrics = this.getCourierMetrics(fontFamily, fontStyle, size);
                break;

              case PdfFontFamily.TimesRoman:
                metrics = this.getTimesMetrics(fontFamily, fontStyle, size);
                break;

              case PdfFontFamily.Symbol:
                metrics = this.getSymbolMetrics(fontFamily, fontStyle, size);
                break;

              case PdfFontFamily.ZapfDingbats:
                metrics = this.getZapfDingbatsMetrics(fontFamily, fontStyle, size);
                break;

              default:
                metrics = this.getHelveticaMetrics(PdfFontFamily.Helvetica, fontStyle, size);
            }
            return metrics.name = fontFamily.toString(), metrics.subScriptSizeFactor = this.subSuperScriptFactor, 
            metrics.superscriptSizeFactor = this.subSuperScriptFactor, metrics;
        }, PdfStandardFontMetricsFactory.getHelveticaMetrics = function(fontFamily, fontStyle, size) {
            var metrics = new PdfFontMetrics();
            return (fontStyle & PdfFontStyle.Bold) > 0 && (fontStyle & PdfFontStyle.Italic) > 0 ? (metrics.ascent = this.helveticaBoldItalicAscent, 
            metrics.descent = this.helveticaBoldItalicDescent, metrics.postScriptName = this.helveticaBoldItalicName, 
            metrics.size = size, metrics.widthTable = new StandardWidthTable(this.arialBoldWidth), 
            metrics.height = metrics.ascent - metrics.descent) : (fontStyle & PdfFontStyle.Bold) > 0 ? (metrics.ascent = this.helveticaBoldAscent, 
            metrics.descent = this.helveticaBoldDescent, metrics.postScriptName = this.helveticaBoldName, 
            metrics.size = size, metrics.widthTable = new StandardWidthTable(this.arialBoldWidth), 
            metrics.height = metrics.ascent - metrics.descent) : (fontStyle & PdfFontStyle.Italic) > 0 ? (metrics.ascent = this.helveticaItalicAscent, 
            metrics.descent = this.helveticaItalicDescent, metrics.postScriptName = this.helveticaItalicName, 
            metrics.size = size, metrics.widthTable = new StandardWidthTable(this.arialWidth), 
            metrics.height = metrics.ascent - metrics.descent) : (metrics.ascent = this.helveticaAscent, 
            metrics.descent = this.helveticaDescent, metrics.postScriptName = this.helveticaName, 
            metrics.size = size, metrics.widthTable = new StandardWidthTable(this.arialWidth), 
            metrics.height = metrics.ascent - metrics.descent), metrics;
        }, PdfStandardFontMetricsFactory.getCourierMetrics = function(fontFamily, fontStyle, size) {
            var metrics = new PdfFontMetrics();
            return (fontStyle & PdfFontStyle.Bold) > 0 && (fontStyle & PdfFontStyle.Italic) > 0 ? (metrics.ascent = this.courierBoldItalicAscent, 
            metrics.descent = this.courierBoldItalicDescent, metrics.postScriptName = this.courierBoldItalicName, 
            metrics.size = size, metrics.widthTable = new StandardWidthTable(this.fixedWidth), 
            metrics.height = metrics.ascent - metrics.descent) : (fontStyle & PdfFontStyle.Bold) > 0 ? (metrics.ascent = this.courierBoldAscent, 
            metrics.descent = this.courierBoldDescent, metrics.postScriptName = this.courierBoldName, 
            metrics.size = size, metrics.widthTable = new StandardWidthTable(this.fixedWidth), 
            metrics.height = metrics.ascent - metrics.descent) : (fontStyle & PdfFontStyle.Italic) > 0 ? (metrics.ascent = this.courierItalicAscent, 
            metrics.descent = this.courierItalicDescent, metrics.postScriptName = this.courierItalicName, 
            metrics.size = size, metrics.widthTable = new StandardWidthTable(this.fixedWidth), 
            metrics.height = metrics.ascent - metrics.descent) : (metrics.ascent = this.courierAscent, 
            metrics.descent = this.courierDescent, metrics.postScriptName = this.courierName, 
            metrics.size = size, metrics.widthTable = new StandardWidthTable(this.fixedWidth), 
            metrics.height = metrics.ascent - metrics.descent), metrics;
        }, PdfStandardFontMetricsFactory.getTimesMetrics = function(fontFamily, fontStyle, size) {
            var metrics = new PdfFontMetrics();
            return (fontStyle & PdfFontStyle.Bold) > 0 && (fontStyle & PdfFontStyle.Italic) > 0 ? (metrics.ascent = this.timesBoldItalicAscent, 
            metrics.descent = this.timesBoldItalicDescent, metrics.postScriptName = this.timesBoldItalicName, 
            metrics.size = size, metrics.widthTable = new StandardWidthTable(this.timesRomanBoldItalicWidths), 
            metrics.height = metrics.ascent - metrics.descent) : (fontStyle & PdfFontStyle.Bold) > 0 ? (metrics.ascent = this.timesBoldAscent, 
            metrics.descent = this.timesBoldDescent, metrics.postScriptName = this.timesBoldName, 
            metrics.size = size, metrics.widthTable = new StandardWidthTable(this.timesRomanBoldWidth), 
            metrics.height = metrics.ascent - metrics.descent) : (fontStyle & PdfFontStyle.Italic) > 0 ? (metrics.ascent = this.timesItalicAscent, 
            metrics.descent = this.timesItalicDescent, metrics.postScriptName = this.timesItalicName, 
            metrics.size = size, metrics.widthTable = new StandardWidthTable(this.timesRomanItalicWidth), 
            metrics.height = metrics.ascent - metrics.descent) : (metrics.ascent = this.timesAscent, 
            metrics.descent = this.timesDescent, metrics.postScriptName = this.timesName, metrics.size = size, 
            metrics.widthTable = new StandardWidthTable(this.timesRomanWidth), metrics.height = metrics.ascent - metrics.descent), 
            metrics;
        }, PdfStandardFontMetricsFactory.getSymbolMetrics = function(fontFamily, fontStyle, size) {
            var metrics = new PdfFontMetrics();
            return metrics.ascent = this.symbolAscent, metrics.descent = this.symbolDescent, 
            metrics.postScriptName = this.symbolName, metrics.size = size, metrics.widthTable = new StandardWidthTable(this.symbolWidth), 
            metrics.height = metrics.ascent - metrics.descent, metrics;
        }, PdfStandardFontMetricsFactory.getZapfDingbatsMetrics = function(fontFamily, fontStyle, size) {
            var metrics = new PdfFontMetrics();
            return metrics.ascent = this.zapfDingbatsAscent, metrics.descent = this.zapfDingbatsDescent, 
            metrics.postScriptName = this.zapfDingbatsName, metrics.size = size, metrics.widthTable = new StandardWidthTable(this.zapfDingbatsWidth), 
            metrics.height = metrics.ascent - metrics.descent, metrics;
        }, PdfStandardFontMetricsFactory.subSuperScriptFactor = 1.52, PdfStandardFontMetricsFactory.helveticaAscent = 931, 
        PdfStandardFontMetricsFactory.helveticaDescent = -225, PdfStandardFontMetricsFactory.helveticaName = "Helvetica", 
        PdfStandardFontMetricsFactory.helveticaBoldAscent = 962, PdfStandardFontMetricsFactory.helveticaBoldDescent = -228, 
        PdfStandardFontMetricsFactory.helveticaBoldName = "Helvetica-Bold", PdfStandardFontMetricsFactory.helveticaItalicAscent = 931, 
        PdfStandardFontMetricsFactory.helveticaItalicDescent = -225, PdfStandardFontMetricsFactory.helveticaItalicName = "Helvetica-Oblique", 
        PdfStandardFontMetricsFactory.helveticaBoldItalicAscent = 962, PdfStandardFontMetricsFactory.helveticaBoldItalicDescent = -228, 
        PdfStandardFontMetricsFactory.helveticaBoldItalicName = "Helvetica-BoldOblique", 
        PdfStandardFontMetricsFactory.courierAscent = 805, PdfStandardFontMetricsFactory.courierDescent = -250, 
        PdfStandardFontMetricsFactory.courierName = "Courier", PdfStandardFontMetricsFactory.courierBoldAscent = 801, 
        PdfStandardFontMetricsFactory.courierBoldDescent = -250, PdfStandardFontMetricsFactory.courierBoldName = "Courier-Bold", 
        PdfStandardFontMetricsFactory.courierItalicAscent = 805, PdfStandardFontMetricsFactory.courierItalicDescent = -250, 
        PdfStandardFontMetricsFactory.courierItalicName = "Courier-Oblique", PdfStandardFontMetricsFactory.courierBoldItalicAscent = 801, 
        PdfStandardFontMetricsFactory.courierBoldItalicDescent = -250, PdfStandardFontMetricsFactory.courierBoldItalicName = "Courier-BoldOblique", 
        PdfStandardFontMetricsFactory.timesAscent = 898, PdfStandardFontMetricsFactory.timesDescent = -218, 
        PdfStandardFontMetricsFactory.timesName = "Times-Roman", PdfStandardFontMetricsFactory.timesBoldAscent = 935, 
        PdfStandardFontMetricsFactory.timesBoldDescent = -218, PdfStandardFontMetricsFactory.timesBoldName = "Times-Bold", 
        PdfStandardFontMetricsFactory.timesItalicAscent = 883, PdfStandardFontMetricsFactory.timesItalicDescent = -217, 
        PdfStandardFontMetricsFactory.timesItalicName = "Times-Italic", PdfStandardFontMetricsFactory.timesBoldItalicAscent = 921, 
        PdfStandardFontMetricsFactory.timesBoldItalicDescent = -218, PdfStandardFontMetricsFactory.timesBoldItalicName = "Times-BoldItalic", 
        PdfStandardFontMetricsFactory.symbolAscent = 1010, PdfStandardFontMetricsFactory.symbolDescent = -293, 
        PdfStandardFontMetricsFactory.symbolName = "Symbol", PdfStandardFontMetricsFactory.zapfDingbatsAscent = 820, 
        PdfStandardFontMetricsFactory.zapfDingbatsDescent = -143, PdfStandardFontMetricsFactory.zapfDingbatsName = "ZapfDingbats", 
        PdfStandardFontMetricsFactory.arialWidth = [ 278, 278, 355, 556, 556, 889, 667, 191, 333, 333, 389, 584, 278, 333, 278, 278, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 278, 278, 584, 584, 584, 556, 1015, 667, 667, 722, 722, 667, 611, 778, 722, 278, 500, 667, 556, 833, 722, 778, 667, 778, 722, 667, 611, 722, 667, 944, 667, 667, 611, 278, 278, 278, 469, 556, 333, 556, 556, 500, 556, 556, 278, 556, 556, 222, 222, 500, 222, 833, 556, 556, 556, 556, 333, 500, 278, 556, 500, 722, 500, 500, 500, 334, 260, 334, 584, 0, 556, 0, 222, 556, 333, 1e3, 556, 556, 333, 1e3, 667, 333, 1e3, 0, 611, 0, 0, 222, 222, 333, 333, 350, 556, 1e3, 333, 1e3, 500, 333, 944, 0, 500, 667, 0, 333, 556, 556, 556, 556, 260, 556, 333, 737, 370, 556, 584, 0, 737, 333, 400, 584, 333, 333, 333, 556, 537, 278, 333, 333, 365, 556, 834, 834, 834, 611, 667, 667, 667, 667, 667, 667, 1e3, 722, 667, 667, 667, 667, 278, 278, 278, 278, 722, 722, 778, 778, 778, 778, 778, 584, 778, 722, 722, 722, 722, 667, 667, 611, 556, 556, 556, 556, 556, 556, 889, 500, 556, 556, 556, 556, 278, 278, 278, 278, 556, 556, 556, 556, 556, 556, 556, 584, 611, 556, 556, 556, 556, 500, 556, 500 ], 
        PdfStandardFontMetricsFactory.arialBoldWidth = [ 278, 333, 474, 556, 556, 889, 722, 238, 333, 333, 389, 584, 278, 333, 278, 278, 556, 556, 556, 556, 556, 556, 556, 556, 556, 556, 333, 333, 584, 584, 584, 611, 975, 722, 722, 722, 722, 667, 611, 778, 722, 278, 556, 722, 611, 833, 722, 778, 667, 778, 722, 667, 611, 722, 667, 944, 667, 667, 611, 333, 278, 333, 584, 556, 333, 556, 611, 556, 611, 556, 333, 611, 611, 278, 278, 556, 278, 889, 611, 611, 611, 611, 389, 556, 333, 611, 556, 778, 556, 556, 500, 389, 280, 389, 584, 0, 556, 0, 278, 556, 500, 1e3, 556, 556, 333, 1e3, 667, 333, 1e3, 0, 611, 0, 0, 278, 278, 500, 500, 350, 556, 1e3, 333, 1e3, 556, 333, 944, 0, 500, 667, 0, 333, 556, 556, 556, 556, 280, 556, 333, 737, 370, 556, 584, 0, 737, 333, 400, 584, 333, 333, 333, 611, 556, 278, 333, 333, 365, 556, 834, 834, 834, 611, 722, 722, 722, 722, 722, 722, 1e3, 722, 667, 667, 667, 667, 278, 278, 278, 278, 722, 722, 778, 778, 778, 778, 778, 584, 778, 722, 722, 722, 722, 667, 667, 611, 556, 556, 556, 556, 556, 556, 889, 556, 556, 556, 556, 556, 278, 278, 278, 278, 611, 611, 611, 611, 611, 611, 611, 584, 611, 611, 611, 611, 611, 556, 611, 556 ], 
        PdfStandardFontMetricsFactory.fixedWidth = [ 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600, 600 ], 
        PdfStandardFontMetricsFactory.timesRomanWidth = [ 250, 333, 408, 500, 500, 833, 778, 180, 333, 333, 500, 564, 250, 333, 250, 278, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 278, 278, 564, 564, 564, 444, 921, 722, 667, 667, 722, 611, 556, 722, 722, 333, 389, 722, 611, 889, 722, 722, 556, 722, 667, 556, 611, 722, 722, 944, 722, 722, 611, 333, 278, 333, 469, 500, 333, 444, 500, 444, 500, 444, 333, 500, 500, 278, 278, 500, 278, 778, 500, 500, 500, 500, 333, 389, 278, 500, 500, 722, 500, 500, 444, 480, 200, 480, 541, 0, 500, 0, 333, 500, 444, 1e3, 500, 500, 333, 1e3, 556, 333, 889, 0, 611, 0, 0, 333, 333, 444, 444, 350, 500, 1e3, 333, 980, 389, 333, 722, 0, 444, 722, 0, 333, 500, 500, 500, 500, 200, 500, 333, 760, 276, 500, 564, 0, 760, 333, 400, 564, 300, 300, 333, 500, 453, 250, 333, 300, 310, 500, 750, 750, 750, 444, 722, 722, 722, 722, 722, 722, 889, 667, 611, 611, 611, 611, 333, 333, 333, 333, 722, 722, 722, 722, 722, 722, 722, 564, 722, 722, 722, 722, 722, 722, 556, 500, 444, 444, 444, 444, 444, 444, 667, 444, 444, 444, 444, 444, 278, 278, 278, 278, 500, 500, 500, 500, 500, 500, 500, 564, 500, 500, 500, 500, 500, 500, 500, 500 ], 
        PdfStandardFontMetricsFactory.timesRomanBoldWidth = [ 250, 333, 555, 500, 500, 1e3, 833, 278, 333, 333, 500, 570, 250, 333, 250, 278, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 333, 333, 570, 570, 570, 500, 930, 722, 667, 722, 722, 667, 611, 778, 778, 389, 500, 778, 667, 944, 722, 778, 611, 778, 722, 556, 667, 722, 722, 1e3, 722, 722, 667, 333, 278, 333, 581, 500, 333, 500, 556, 444, 556, 444, 333, 500, 556, 278, 333, 556, 278, 833, 556, 500, 556, 556, 444, 389, 333, 556, 500, 722, 500, 500, 444, 394, 220, 394, 520, 0, 500, 0, 333, 500, 500, 1e3, 500, 500, 333, 1e3, 556, 333, 1e3, 0, 667, 0, 0, 333, 333, 500, 500, 350, 500, 1e3, 333, 1e3, 389, 333, 722, 0, 444, 722, 0, 333, 500, 500, 500, 500, 220, 500, 333, 747, 300, 500, 570, 0, 747, 333, 400, 570, 300, 300, 333, 556, 540, 250, 333, 300, 330, 500, 750, 750, 750, 500, 722, 722, 722, 722, 722, 722, 1e3, 722, 667, 667, 667, 667, 389, 389, 389, 389, 722, 722, 778, 778, 778, 778, 778, 570, 778, 722, 722, 722, 722, 722, 611, 556, 500, 500, 500, 500, 500, 500, 722, 444, 444, 444, 444, 444, 278, 278, 278, 278, 500, 556, 500, 500, 500, 500, 500, 570, 500, 556, 556, 556, 556, 500, 556, 500 ], 
        PdfStandardFontMetricsFactory.timesRomanItalicWidth = [ 250, 333, 420, 500, 500, 833, 778, 214, 333, 333, 500, 675, 250, 333, 250, 278, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 333, 333, 675, 675, 675, 500, 920, 611, 611, 667, 722, 611, 611, 722, 722, 333, 444, 667, 556, 833, 667, 722, 611, 722, 611, 500, 556, 722, 611, 833, 611, 556, 556, 389, 278, 389, 422, 500, 333, 500, 500, 444, 500, 444, 278, 500, 500, 278, 278, 444, 278, 722, 500, 500, 500, 500, 389, 389, 278, 500, 444, 667, 444, 444, 389, 400, 275, 400, 541, 0, 500, 0, 333, 500, 556, 889, 500, 500, 333, 1e3, 500, 333, 944, 0, 556, 0, 0, 333, 333, 556, 556, 350, 500, 889, 333, 980, 389, 333, 667, 0, 389, 556, 0, 389, 500, 500, 500, 500, 275, 500, 333, 760, 276, 500, 675, 0, 760, 333, 400, 675, 300, 300, 333, 500, 523, 250, 333, 300, 310, 500, 750, 750, 750, 500, 611, 611, 611, 611, 611, 611, 889, 667, 611, 611, 611, 611, 333, 333, 333, 333, 722, 667, 722, 722, 722, 722, 722, 675, 722, 722, 722, 722, 722, 556, 611, 500, 500, 500, 500, 500, 500, 500, 667, 444, 444, 444, 444, 444, 278, 278, 278, 278, 500, 500, 500, 500, 500, 500, 500, 675, 500, 500, 500, 500, 500, 444, 500, 444 ], 
        PdfStandardFontMetricsFactory.timesRomanBoldItalicWidths = [ 250, 389, 555, 500, 500, 833, 778, 278, 333, 333, 500, 570, 250, 333, 250, 278, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 333, 333, 570, 570, 570, 500, 832, 667, 667, 667, 722, 667, 667, 722, 778, 389, 500, 667, 611, 889, 722, 722, 611, 722, 667, 556, 611, 722, 667, 889, 667, 611, 611, 333, 278, 333, 570, 500, 333, 500, 500, 444, 500, 444, 333, 500, 556, 278, 278, 500, 278, 778, 556, 500, 500, 500, 389, 389, 278, 556, 444, 667, 500, 444, 389, 348, 220, 348, 570, 0, 500, 0, 333, 500, 500, 1e3, 500, 500, 333, 1e3, 556, 333, 944, 0, 611, 0, 0, 333, 333, 500, 500, 350, 500, 1e3, 333, 1e3, 389, 333, 722, 0, 389, 611, 0, 389, 500, 500, 500, 500, 220, 500, 333, 747, 266, 500, 606, 0, 747, 333, 400, 570, 300, 300, 333, 576, 500, 250, 333, 300, 300, 500, 750, 750, 750, 500, 667, 667, 667, 667, 667, 667, 944, 667, 667, 667, 667, 667, 389, 389, 389, 389, 722, 722, 722, 722, 722, 722, 722, 570, 722, 722, 722, 722, 722, 611, 611, 500, 500, 500, 500, 500, 500, 500, 722, 444, 444, 444, 444, 444, 278, 278, 278, 278, 500, 556, 500, 500, 500, 500, 500, 570, 500, 556, 556, 556, 556, 444, 500, 444 ], 
        PdfStandardFontMetricsFactory.symbolWidth = [ 250, 333, 713, 500, 549, 833, 778, 439, 333, 333, 500, 549, 250, 549, 250, 278, 500, 500, 500, 500, 500, 500, 500, 500, 500, 500, 278, 278, 549, 549, 549, 444, 549, 722, 667, 722, 612, 611, 763, 603, 722, 333, 631, 722, 686, 889, 722, 722, 768, 741, 556, 592, 611, 690, 439, 768, 645, 795, 611, 333, 863, 333, 658, 500, 500, 631, 549, 549, 494, 439, 521, 411, 603, 329, 603, 549, 549, 576, 521, 549, 549, 521, 549, 603, 439, 576, 713, 686, 493, 686, 494, 480, 200, 480, 549, 750, 620, 247, 549, 167, 713, 500, 753, 753, 753, 753, 1042, 987, 603, 987, 603, 400, 549, 411, 549, 549, 713, 494, 460, 549, 549, 549, 549, 1e3, 603, 1e3, 658, 823, 686, 795, 987, 768, 768, 823, 768, 768, 713, 713, 713, 713, 713, 713, 713, 768, 713, 790, 790, 890, 823, 549, 250, 713, 603, 603, 1042, 987, 603, 987, 603, 494, 329, 790, 790, 786, 713, 384, 384, 384, 384, 384, 384, 494, 494, 494, 494, 329, 274, 686, 686, 686, 384, 384, 384, 384, 384, 384, 494, 494, 494, -1 ], 
        PdfStandardFontMetricsFactory.zapfDingbatsWidth = [ 278, 974, 961, 974, 980, 719, 789, 790, 791, 690, 960, 939, 549, 855, 911, 933, 911, 945, 974, 755, 846, 762, 761, 571, 677, 763, 760, 759, 754, 494, 552, 537, 577, 692, 786, 788, 788, 790, 793, 794, 816, 823, 789, 841, 823, 833, 816, 831, 923, 744, 723, 749, 790, 792, 695, 776, 768, 792, 759, 707, 708, 682, 701, 826, 815, 789, 789, 707, 687, 696, 689, 786, 787, 713, 791, 785, 791, 873, 761, 762, 762, 759, 759, 892, 892, 788, 784, 438, 138, 277, 415, 392, 392, 668, 668, 390, 390, 317, 317, 276, 276, 509, 509, 410, 410, 234, 234, 334, 334, 732, 544, 544, 910, 667, 760, 760, 776, 595, 694, 626, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 788, 894, 838, 1016, 458, 748, 924, 748, 918, 927, 928, 928, 834, 873, 828, 924, 924, 917, 930, 931, 463, 883, 836, 836, 867, 867, 696, 696, 874, 874, 760, 946, 771, 865, 771, 888, 967, 888, 831, 873, 927, 970, 918 ], 
        PdfStandardFontMetricsFactory;
    }(), __extends$5$2 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), PdfStandardFont = function(_super) {
        function PdfStandardFont(fontFamilyPrototype, size, style) {
            var _this = _super.call(this, size, style) || this;
            return _this.dictionaryProperties = new DictionaryProperties(), _this.encodings = [ "Unknown", "StandardEncoding", "MacRomanEncoding", "MacExpertEncoding", "WinAnsiEncoding", "PDFDocEncoding", "IdentityH" ], 
            "number" == typeof fontFamilyPrototype && void 0 === style ? _this.constructor(fontFamilyPrototype, size, PdfFontStyle.Regular) : "number" == typeof fontFamilyPrototype && void 0 !== style ? ((_this = _super.call(this, size, style) || this).pdfFontFamily = fontFamilyPrototype, 
            _this.checkStyle(), _this.initializeInternals()) : fontFamilyPrototype instanceof PdfStandardFont && void 0 === style ? _this.constructor(fontFamilyPrototype.fontFamily, size, fontFamilyPrototype.style) : fontFamilyPrototype instanceof PdfStandardFont && void 0 !== style && _this.constructor(fontFamilyPrototype.fontFamily, size, style), 
            _this;
        }
        return __extends$5$2(PdfStandardFont, _super), Object.defineProperty(PdfStandardFont.prototype, "fontFamily", {
            get: function() {
                return this.pdfFontFamily;
            },
            enumerable: !0,
            configurable: !0
        }), PdfStandardFont.prototype.checkStyle = function() {
            if (this.fontFamily === PdfFontFamily.Symbol || this.fontFamily === PdfFontFamily.ZapfDingbats) {
                var style = this.style;
                style &= ~(PdfFontStyle.Bold | PdfFontStyle.Italic), this.setStyle(style);
            }
        }, PdfStandardFont.prototype.getLineWidth = function(line, format) {
            if (null == line) throw new Error("ArgumentNullException:line");
            for (var width = 0, i = (this.name, 0), len = (line = PdfStandardFont.convert(line)).length; i < len; i++) {
                var ch = line[i];
                width += this.getCharWidthInternal(ch, format);
            }
            var size = this.metrics.getSize(format);
            return width *= PdfFont.charSizeMultiplier * size, width = this.applyFormatSettings(line, format, width);
        }, PdfStandardFont.prototype.equalsToFont = function(font) {
            var equal = !1, stFont = font;
            if (null != stFont) {
                var fontFamilyEqual = this.fontFamily === stFont.fontFamily, lineReducer = ~(PdfFontStyle.Underline | PdfFontStyle.Strikeout), styleEqual = (this.style & lineReducer) == (stFont.style & lineReducer);
                equal = fontFamilyEqual && styleEqual;
            }
            return equal;
        }, PdfStandardFont.prototype.initializeInternals = function() {
            PdfDocument.cache.search(this);
            var internals = null, metrics = PdfStandardFontMetricsFactory.getMetrics(this.pdfFontFamily, this.style, this.size);
            this.metrics = metrics, internals = this.createInternals(), this.setInternals(internals);
        }, PdfStandardFont.prototype.createInternals = function() {
            var dictionary = new PdfDictionary();
            if (dictionary.items.setValue(this.dictionaryProperties.type, new PdfName(this.dictionaryProperties.font)), 
            dictionary.items.setValue(this.dictionaryProperties.subtype, new PdfName(this.dictionaryProperties.type1)), 
            dictionary.items.setValue(this.dictionaryProperties.baseFont, new PdfName(this.metrics.postScriptName)), 
            this.fontFamily !== PdfFontFamily.Symbol && this.fontFamily !== PdfFontFamily.ZapfDingbats) {
                var encoding = this.encodings[FontEncoding.WinAnsiEncoding];
                dictionary.items.setValue(this.dictionaryProperties.encoding, new PdfName(encoding));
            }
            return dictionary;
        }, PdfStandardFont.prototype.getCharWidthInternal = function(charCode, format) {
            var code = 0;
            code = charCode.charCodeAt(0), "0" !== this.name && "1" !== this.name && "2" !== this.name && "3" !== this.name && "4" !== this.name || (code -= PdfStandardFont.charOffset), 
            code = code >= 0 && 128 !== code ? code : 0;
            return this.metrics.widthTable.items(code);
        }, PdfStandardFont.convert = function(text) {
            return text;
        }, PdfStandardFont.charOffset = 32, PdfStandardFont;
    }(PdfFont), PdfAnnotation = function() {
        function PdfAnnotation(arg1) {
            this.dictionaryProperties = new DictionaryProperties(), this.pdfColor = new PdfColor(255, 255, 255), 
            this.rectangle = new RectangleF(0, 0, 0, 0), this.pdfPage = null, this.textBrush = new PdfSolidBrush(new PdfColor(0, 0, 0)), 
            this.textFont = new PdfStandardFont(PdfFontFamily.TimesRoman, 10), this.format = new PdfStringFormat(PdfTextAlignment.Left), 
            this.content = "", this.pdfDictionary = new PdfDictionary(), this.internalColor = new PdfColor(), 
            this.darkness = 1, void 0 === arg1 ? this.initialize() : (this.initialize(), this.bounds = arg1);
        }
        return Object.defineProperty(PdfAnnotation.prototype, "color", {
            get: function() {
                return this.pdfColor;
            },
            set: function(value) {
                this.pdfColor = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfAnnotation.prototype, "innerColor", {
            get: function() {
                return this.internalColor;
            },
            set: function(value) {
                this.internalColor = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfAnnotation.prototype, "bounds", {
            get: function() {
                return this.rectangle;
            },
            set: function(value) {
                this.rectangle = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfAnnotation.prototype, "page", {
            get: function() {
                return this.pdfPage;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfAnnotation.prototype, "font", {
            get: function() {
                return this.textFont;
            },
            set: function(value) {
                this.textFont = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfAnnotation.prototype, "stringFormat", {
            get: function() {
                return this.format;
            },
            set: function(value) {
                this.format = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfAnnotation.prototype, "brush", {
            get: function() {
                return this.textBrush;
            },
            set: function(value) {
                this.textBrush = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfAnnotation.prototype, "text", {
            get: function() {
                return this.content;
            },
            set: function(value) {
                this.content = value, this.dictionary.items.setValue(this.dictionaryProperties.contents, new PdfString(this.content));
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfAnnotation.prototype, "dictionary", {
            get: function() {
                return this.pdfDictionary;
            },
            set: function(value) {
                this.pdfDictionary = value;
            },
            enumerable: !0,
            configurable: !0
        }), PdfAnnotation.prototype.initialize = function() {
            this.pdfDictionary.annotationBeginSave = new SaveAnnotationEventHandler(this), this.pdfDictionary.items.setValue(this.dictionaryProperties.type, new PdfName(this.dictionaryProperties.annot));
        }, PdfAnnotation.prototype.setPage = function(page) {
            this.pdfPage = page, this.pdfDictionary.items.setValue(this.dictionaryProperties.p, new PdfReferenceHolder(this.pdfPage));
        }, PdfAnnotation.prototype.beginSave = function() {
            this.save();
        }, PdfAnnotation.prototype.save = function() {
            var nativeRectangle = new RectangleF(this.rectangle.x, this.rectangle.y, this.rectangle.width, this.rectangle.height), section = this.pdfPage.section, initialHeight = nativeRectangle.height, tempLoacation = section.pointToNativePdf(this.page, new PointF(nativeRectangle.x, nativeRectangle.y));
            nativeRectangle.x = tempLoacation.x, nativeRectangle.width = tempLoacation.x + nativeRectangle.width, 
            nativeRectangle.y = tempLoacation.y - this.page.document.pageSettings.margins.top, 
            nativeRectangle.height = nativeRectangle.y - initialHeight, this.pdfDictionary.items.setValue(this.dictionaryProperties.rect, PdfArray.fromRectangle(nativeRectangle)), 
            this.dictionary.items.setValue(this.dictionaryProperties.ca, new PdfNumber(this.darkness));
        }, Object.defineProperty(PdfAnnotation.prototype, "element", {
            get: function() {
                return this.pdfDictionary;
            },
            enumerable: !0,
            configurable: !0
        }), PdfAnnotation;
    }(), __extends$3$5 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), PdfLinkAnnotation = function(_super) {
        function PdfLinkAnnotation(rectangle) {
            return void 0 === rectangle ? _super.call(this) || this : _super.call(this, rectangle) || this;
        }
        return __extends$3$5(PdfLinkAnnotation, _super), PdfLinkAnnotation.prototype.initialize = function() {
            _super.prototype.initialize.call(this), this.dictionary.items.setValue(this.dictionaryProperties.subtype, new PdfName(this.dictionaryProperties.link));
        }, PdfLinkAnnotation;
    }(PdfAnnotation), __extends$2$7 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), PdfActionLinkAnnotation = function(_super) {
        function PdfActionLinkAnnotation(rectangle) {
            var _this = _super.call(this, rectangle) || this;
            return _this.pdfAction = null, _this;
        }
        return __extends$2$7(PdfActionLinkAnnotation, _super), PdfActionLinkAnnotation.prototype.getSetAction = function(value) {
            if (void 0 === value) return this.pdfAction;
            this.pdfAction = value;
        }, PdfActionLinkAnnotation;
    }(PdfLinkAnnotation), __extends$15$1 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), PdfDocumentLinkAnnotation = function(_super) {
        function PdfDocumentLinkAnnotation(rectangle, destination) {
            var _this = _super.call(this, rectangle) || this;
            return _this.pdfDestination = null, void 0 !== destination && (_this.destination = destination), 
            _this;
        }
        return __extends$15$1(PdfDocumentLinkAnnotation, _super), Object.defineProperty(PdfDocumentLinkAnnotation.prototype, "destination", {
            get: function() {
                return this.pdfDestination;
            },
            set: function(value) {
                this.pdfDestination = value;
            },
            enumerable: !0,
            configurable: !0
        }), PdfDocumentLinkAnnotation.prototype.save = function() {
            _super.prototype.save.call(this), null != this.pdfDestination && this.dictionary.items.setValue(this.dictionaryProperties.dest, this.pdfDestination.element);
        }, PdfDocumentLinkAnnotation.prototype.clone = function() {
            var annot = new PdfDocumentLinkAnnotation(this.bounds, this.destination);
            return annot.color = this.color, annot.brush = this.brush, annot.destination = this.destination, 
            annot.font = this.font, annot;
        }, PdfDocumentLinkAnnotation;
    }(PdfLinkAnnotation);
    !function(PdfLayoutType) {
        PdfLayoutType[PdfLayoutType.Paginate = 0] = "Paginate", PdfLayoutType[PdfLayoutType.OnePage = 1] = "OnePage";
    }(PdfLayoutType || (PdfLayoutType = {}));
    var PdfLayoutBreakType;
    !function(PdfLayoutBreakType) {
        PdfLayoutBreakType[PdfLayoutBreakType.FitPage = 0] = "FitPage", PdfLayoutBreakType[PdfLayoutBreakType.FitElement = 1] = "FitElement", 
        PdfLayoutBreakType[PdfLayoutBreakType.FitColumnsToPage = 2] = "FitColumnsToPage";
    }(PdfLayoutBreakType || (PdfLayoutBreakType = {}));
    var PdfDestinationMode, ElementLayouter = function() {
        function ElementLayouter(element) {
            this.layoutElement = element;
        }
        return Object.defineProperty(ElementLayouter.prototype, "elements", {
            get: function() {
                return this.layoutElement;
            },
            enumerable: !0,
            configurable: !0
        }), ElementLayouter.prototype.getElement = function() {
            return this.layoutElement;
        }, ElementLayouter.prototype.layout = function(param, isBoundsChanged) {
            return "boolean" == typeof isBoundsChanged && !0 === isBoundsChanged ? this.layoutInternal(param, !0) : this.layoutInternal(param);
        }, ElementLayouter.prototype.getNextPage = function(currentPage) {
            return currentPage.section.add();
        }, ElementLayouter;
    }(), PdfLayoutFormat = function() {
        function PdfLayoutFormat(baseFormat) {
            void 0 === baseFormat || (this.break = baseFormat.break, this.layout = baseFormat.layout, 
            this.paginateBounds = baseFormat.paginateBounds, this.boundsSet = baseFormat.usePaginateBounds);
        }
        return Object.defineProperty(PdfLayoutFormat.prototype, "layout", {
            get: function() {
                return void 0 !== this.layoutType && null != this.layoutType || (this.layoutType = PdfLayoutType.Paginate), 
                this.layoutType;
            },
            set: function(value) {
                this.layoutType = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfLayoutFormat.prototype, "break", {
            get: function() {
                return void 0 !== this.breakType && null != this.boundsSet || (this.breakType = PdfLayoutBreakType.FitPage), 
                this.breakType;
            },
            set: function(value) {
                this.breakType = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfLayoutFormat.prototype, "paginateBounds", {
            get: function() {
                return void 0 === this.layoutPaginateBounds && null == this.layoutPaginateBounds && (this.layoutPaginateBounds = new RectangleF(0, 0, 0, 0)), 
                this.layoutPaginateBounds;
            },
            set: function(value) {
                this.layoutPaginateBounds = value, this.boundsSet = !0;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfLayoutFormat.prototype, "usePaginateBounds", {
            get: function() {
                return void 0 !== this.boundsSet && null != this.boundsSet || (this.boundsSet = !1), 
                this.boundsSet;
            },
            enumerable: !0,
            configurable: !0
        }), PdfLayoutFormat;
    }(), PdfLayoutParams = function() {
        function PdfLayoutParams() {}
        return Object.defineProperty(PdfLayoutParams.prototype, "page", {
            get: function() {
                return this.pdfPage;
            },
            set: function(value) {
                this.pdfPage = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfLayoutParams.prototype, "bounds", {
            get: function() {
                return new RectangleF(this.layoutBounds.x, this.layoutBounds.y, this.layoutBounds.width, this.layoutBounds.height);
            },
            set: function(value) {
                this.layoutBounds = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfLayoutParams.prototype, "format", {
            get: function() {
                return this.layoutFormat;
            },
            set: function(value) {
                this.layoutFormat = value;
            },
            enumerable: !0,
            configurable: !0
        }), PdfLayoutParams;
    }(), PdfLayoutResult = function() {
        function PdfLayoutResult(page, bounds) {
            this.pdfPage = page, this.layoutBounds = bounds;
        }
        return Object.defineProperty(PdfLayoutResult.prototype, "page", {
            get: function() {
                return this.pdfPage;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfLayoutResult.prototype, "bounds", {
            get: function() {
                return this.layoutBounds;
            },
            enumerable: !0,
            configurable: !0
        }), PdfLayoutResult;
    }(), PdfLayoutElement = function() {
        function PdfLayoutElement() {}
        return PdfLayoutElement.prototype.drawHelper = function(arg2, arg3, arg4, arg5) {
            if (arg3 instanceof PointF && void 0 === arg3.width && void 0 === arg3) return this.drawHelper(arg2, arg3.x, arg3.y);
            if ("number" == typeof arg3 && "number" == typeof arg4 && void 0 === arg5) return this.drawHelper(arg2, arg3, arg4, null);
            if (arg3 instanceof RectangleF && void 0 !== arg3.width && void 0 === arg4) return this.drawHelper(arg2, arg3, null);
            if (arg3 instanceof PointF && void 0 === arg3.width && arg4 instanceof PdfLayoutFormat) return this.drawHelper(arg2, arg3.x, arg3.y, arg4);
            if ("number" == typeof arg3 && "number" == typeof arg4 && (arg5 instanceof PdfLayoutFormat || null == arg5)) {
                var width = arg2.graphics.clientSize.width - arg3, layoutRectangle = new RectangleF(arg3, arg4, width, 0);
                return this.drawHelper(arg2, layoutRectangle, arg5);
            }
            if (arg3 instanceof RectangleF && void 0 !== arg3.width && "boolean" == typeof arg4) return this.bEmbedFonts = arg4, 
            this.drawHelper(arg2, arg3, null);
            var param = new PdfLayoutParams(), temparg3 = arg3, temparg4 = arg4;
            param.page = arg2, param.bounds = temparg3, param.format = null != temparg4 ? temparg4 : new PdfLayoutFormat();
            return this.layout(param);
        }, PdfLayoutElement;
    }(), __extends$18$1 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), TextLayouter = function(_super) {
        function TextLayouter(element) {
            return _super.call(this, element) || this;
        }
        return __extends$18$1(TextLayouter, _super), Object.defineProperty(TextLayouter.prototype, "element", {
            get: function() {
                return _super.prototype.getElement.call(this);
            },
            enumerable: !0,
            configurable: !0
        }), TextLayouter.prototype.layoutInternal = function(param) {
            this.format = null != this.element.stringFormat && void 0 !== this.element.stringFormat ? this.element.stringFormat : null;
            var currentPage = param.page, currentBounds = param.bounds, text = this.element.value, result = null, pageResult = new TextPageLayoutResult();
            for (pageResult.page = currentPage, pageResult.remainder = text; ;) {
                pageResult = this.layoutOnPage(text, currentPage, currentBounds, param), result = this.getLayoutResult(pageResult);
                break;
            }
            return result;
        }, TextLayouter.prototype.getLayoutResult = function(pageResult) {
            return new PdfTextLayoutResult(pageResult.page, pageResult.bounds, pageResult.remainder, pageResult.lastLineBounds);
        }, TextLayouter.prototype.layoutOnPage = function(text, currentPage, currentBounds, param) {
            var result = new TextPageLayoutResult();
            result.remainder = text, result.page = currentPage, currentBounds = this.checkCorrectBounds(currentPage, currentBounds);
            var stringResult = new PdfStringLayouter().layout(text, this.element.font, this.format, currentBounds, currentPage.getClientSize().height, !1, new SizeF(0, 0)), textFinished = null == stringResult.remainder, graphics = (param.format.break === PdfLayoutBreakType.FitElement || stringResult.empty, 
            currentPage.graphics), brush = this.element.getBrush();
            this.element instanceof PdfTextWebLink && (brush.color = new PdfColor(0, 0, 255)), 
            graphics.drawStringLayoutResult(stringResult, this.element.font, this.element.pen, brush, currentBounds, this.format);
            stringResult.lines[stringResult.lineCount - 1];
            return result.lastLineBounds = graphics.getLineBounds(stringResult.lineCount - 1, stringResult, this.element.font, currentBounds, this.format), 
            result.bounds = this.getTextPageBounds(currentPage, currentBounds, stringResult), 
            result.remainder = stringResult.remainder, result.end = textFinished, result;
        }, TextLayouter.prototype.checkCorrectBounds = function(currentPage, currentBounds) {
            var pageSize = currentPage.graphics.clientSize;
            return currentBounds.height = currentBounds.height > 0 ? currentBounds.height : pageSize.height - currentBounds.y, 
            currentBounds;
        }, TextLayouter.prototype.getTextPageBounds = function(currentPage, currentBounds, stringResult) {
            var textSize = stringResult.actualSize, x = currentBounds.x, y = currentBounds.y, width = currentBounds.width > 0 ? currentBounds.width : textSize.width, height = textSize.height;
            x = currentPage.graphics.checkCorrectLayoutRectangle(textSize, currentBounds.x, currentBounds.y, this.format).x;
            var verticalShift = currentPage.graphics.getTextVerticalAlignShift(textSize.height, currentBounds.height, this.format);
            return new RectangleF(x, y += verticalShift, width, height);
        }, TextLayouter;
    }(ElementLayouter), TextPageLayoutResult = function() {
        return function() {};
    }(), PdfTextLayoutResult = function(_super) {
        function PdfTextLayoutResult(page, bounds, remainder, lastLineBounds) {
            var _this = _super.call(this, page, bounds) || this;
            return _this.remainderText = remainder, _this.lastLineTextBounds = lastLineBounds, 
            _this;
        }
        return __extends$18$1(PdfTextLayoutResult, _super), Object.defineProperty(PdfTextLayoutResult.prototype, "remainder", {
            get: function() {
                return this.remainderText;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfTextLayoutResult.prototype, "lastLineBounds", {
            get: function() {
                return this.lastLineTextBounds;
            },
            enumerable: !0,
            configurable: !0
        }), PdfTextLayoutResult;
    }(PdfLayoutResult), __extends$17$1 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), PdfTextElement = function(_super) {
        function PdfTextElement(arg1, arg2, arg3, arg4, arg5) {
            var _this = _super.call(this) || this;
            return _this.content = "", _this.elementValue = "", _this.hasPointOverload = !1, 
            _this.isPdfTextElement = !1, void 0 === arg1 || ("string" == typeof arg1 && void 0 === arg2 ? ((_this = _super.call(this) || this).content = arg1, 
            _this.elementValue = arg1) : "string" == typeof arg1 && arg2 instanceof PdfFont && void 0 === arg3 ? ((_this = _super.call(this) || this).content = arg1, 
            _this.elementValue = arg1, _this.pdfFont = arg2) : "string" == typeof arg1 && arg2 instanceof PdfFont && arg3 instanceof PdfPen && void 0 === arg4 ? ((_this = _super.call(this) || this).content = arg1, 
            _this.elementValue = arg1, _this.pdfFont = arg2, _this.pdfPen = arg3) : "string" == typeof arg1 && arg2 instanceof PdfFont && arg3 instanceof PdfBrush && void 0 === arg4 ? ((_this = _super.call(this) || this).content = arg1, 
            _this.elementValue = arg1, _this.pdfFont = arg2, _this.pdfBrush = arg3) : ((_this = _super.call(this) || this).content = arg1, 
            _this.elementValue = arg1, _this.pdfFont = arg2, _this.pdfPen = arg3, _this.pdfBrush = arg4, 
            _this.format = arg5)), _this;
        }
        return __extends$17$1(PdfTextElement, _super), Object.defineProperty(PdfTextElement.prototype, "text", {
            get: function() {
                return this.content;
            },
            set: function(value) {
                this.elementValue = value, this.content = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfTextElement.prototype, "value", {
            get: function() {
                return this.elementValue;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfTextElement.prototype, "pen", {
            get: function() {
                return this.pdfPen;
            },
            set: function(value) {
                this.pdfPen = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfTextElement.prototype, "brush", {
            get: function() {
                return this.pdfBrush;
            },
            set: function(value) {
                this.pdfBrush = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfTextElement.prototype, "font", {
            get: function() {
                return this.pdfFont;
            },
            set: function(value) {
                this.pdfFont = value, this.pdfFont instanceof PdfStandardFont && null != this.content ? this.elementValue = PdfStandardFont.convert(this.content) : this.elementValue = this.content;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfTextElement.prototype, "stringFormat", {
            get: function() {
                return this.format;
            },
            set: function(value) {
                this.format = value;
            },
            enumerable: !0,
            configurable: !0
        }), PdfTextElement.prototype.getBrush = function() {
            return null == this.pdfBrush || void 0 === this.pdfBrush ? new PdfSolidBrush(new PdfColor(0, 0, 0)) : this.pdfBrush;
        }, PdfTextElement.prototype.layout = function(param) {
            return new TextLayouter(this).layout(param);
        }, PdfTextElement.prototype.drawText = function(arg2, arg3, arg4, arg5) {
            if (arg3 instanceof PointF && void 0 === arg3.width && void 0 === arg4) return this.hasPointOverload = !0, 
            this.drawText(arg2, arg3.x, arg3.y);
            if ("number" == typeof arg3 && "number" == typeof arg4 && void 0 === arg5) return this.hasPointOverload = !0, 
            this.drawText(arg2, arg3, arg4, null);
            if (arg3 instanceof RectangleF && void 0 !== arg3.width && void 0 === arg4) return this.drawText(arg2, arg3, null);
            if (arg3 instanceof PointF && void 0 === arg3.width && arg4 instanceof PdfLayoutFormat) return this.hasPointOverload = !0, 
            this.drawText(arg2, arg3.x, arg3.y, arg4);
            if ("number" == typeof arg3 && "number" == typeof arg4 && (arg5 instanceof PdfLayoutFormat || null == arg5)) {
                this.hasPointOverload = !0;
                var width = arg2.graphics.clientSize.width - arg3, layoutRectangle = new RectangleF(arg3, arg4, width, 0);
                return this.drawText(arg2, layoutRectangle, arg5);
            }
            if (arg3 instanceof RectangleF && void 0 !== arg3.width && "boolean" == typeof arg4) return this.drawText(arg2, arg3, null);
            var layout = new PdfStringLayouter();
            if (this.hasPointOverload) {
                var stringLayoutResult = layout.layout(this.value, this.font, this.stringFormat, new SizeF(arg2.graphics.clientSize.width - arg3.x, 0), !0, arg2.graphics.clientSize), layoutResult = void 0, temparg3 = arg3, temparg4 = arg4;
                if ((param = new PdfLayoutParams()).page = arg2, param.bounds = temparg3, param.format = null != temparg4 ? temparg4 : new PdfLayoutFormat(), 
                stringLayoutResult.lines.length > 1) {
                    if (this.text = stringLayoutResult.layoutLines[0].text, param.bounds.y <= param.page.graphics.clientSize.height) {
                        var previousPosition = new PointF(param.bounds.x, param.bounds.y);
                        layoutResult = this.layout(param);
                        for (var bounds = new RectangleF(0, layoutResult.bounds.y + stringLayoutResult.lineHeight, arg2.graphics.clientSize.width, stringLayoutResult.lineHeight), i = 1; i < stringLayoutResult.lines.length; i++) if (param.page = layoutResult.page, 
                        param.bounds = new RectangleF(new PointF(bounds.x, bounds.y), new SizeF(bounds.width, bounds.height)), 
                        this.text = stringLayoutResult.layoutLines[i].text, bounds.y + stringLayoutResult.lineHeight > layoutResult.page.graphics.clientSize.height && (param.page = param.page.graphics.getNextPage(), 
                        bounds = previousPosition.y > layoutResult.page.graphics.clientSize.height - layoutResult.bounds.height ? new RectangleF(0, layoutResult.bounds.height, layoutResult.page.graphics.clientSize.width, stringLayoutResult.lineHeight) : new RectangleF(0, 0, layoutResult.page.graphics.clientSize.width, stringLayoutResult.lineHeight), 
                        param.bounds = bounds), layoutResult = this.layout(param), i !== stringLayoutResult.lines.length - 1) bounds = new RectangleF(0, layoutResult.bounds.y + stringLayoutResult.lineHeight, layoutResult.page.graphics.clientSize.width, stringLayoutResult.lineHeight); else {
                            var lineWidth = this.font.measureString(this.text, this.format).width;
                            layoutResult = this.calculateResultBounds(layoutResult, lineWidth, layoutResult.page.graphics.clientSize.width, 0);
                        }
                    }
                    return layoutResult;
                }
                var lineSize = this.font.measureString(this.text, this.format);
                return param.bounds.y <= param.page.graphics.clientSize.height && (layoutResult = this.layout(param), 
                layoutResult = this.calculateResultBounds(layoutResult, lineSize.width, layoutResult.page.graphics.clientSize.width, 0)), 
                layoutResult;
            }
            layoutResult = layout.layout(this.value, this.font, this.stringFormat, new SizeF(arg3.width, 0), !1, arg2.graphics.clientSize);
            var param, result = void 0;
            temparg3 = arg3, temparg4 = arg4;
            if ((param = new PdfLayoutParams()).page = arg2, param.bounds = temparg3, param.format = null != temparg4 ? temparg4 : new PdfLayoutFormat(), 
            layoutResult.lines.length > 1) {
                if (this.text = layoutResult.layoutLines[0].text, param.bounds.y <= param.page.graphics.clientSize.height) {
                    previousPosition = new PointF(param.bounds.x, param.bounds.y);
                    result = this.layout(param);
                    for (bounds = new RectangleF(temparg3.x, result.bounds.y + layoutResult.lineHeight, temparg3.width, layoutResult.lineHeight), 
                    i = 1; i < layoutResult.lines.length; i++) if (param.page = result.page, param.bounds = new RectangleF(bounds.x, bounds.y, bounds.width, bounds.height), 
                    this.text = layoutResult.layoutLines[i].text, bounds.y + layoutResult.lineHeight > result.page.graphics.clientSize.height && (param.page = param.page.graphics.getNextPage(), 
                    bounds = previousPosition.y > result.page.graphics.clientSize.height - result.bounds.height ? new RectangleF(temparg3.x, layoutResult.lineHeight, temparg3.width, layoutResult.lineHeight) : new RectangleF(temparg3.x, 0, temparg3.width, layoutResult.lineHeight), 
                    param.bounds = bounds), result = this.layout(param), i !== layoutResult.lines.length - 1) bounds = new RectangleF(temparg3.x, result.bounds.y + layoutResult.lineHeight, temparg3.width, layoutResult.lineHeight); else {
                        lineWidth = this.font.measureString(this.text, this.format).width;
                        result = this.calculateResultBounds(result, lineWidth, temparg3.width, temparg3.x);
                    }
                }
                return result;
            }
            lineSize = this.font.measureString(this.text, this.format);
            return param.bounds.y <= param.page.graphics.clientSize.height && (result = this.layout(param), 
            result = this.calculateResultBounds(result, lineSize.width, temparg3.width, temparg3.x)), 
            result;
        }, PdfTextElement.prototype.calculateResultBounds = function(result, lineWidth, maximumWidth, startPosition) {
            return null != this.stringFormat && void 0 !== this.stringFormat && this.stringFormat.alignment === PdfTextAlignment.Center ? (result.bounds.x = startPosition + (maximumWidth - lineWidth) / 2, 
            result.bounds.width = lineWidth) : null != this.stringFormat && void 0 !== this.stringFormat && this.stringFormat.alignment === PdfTextAlignment.Right ? (result.bounds.x = startPosition + (maximumWidth - lineWidth), 
            result.bounds.width = lineWidth) : null != this.stringFormat && void 0 !== this.stringFormat && this.stringFormat.alignment === PdfTextAlignment.Justify ? (result.bounds.x = startPosition, 
            result.bounds.width = maximumWidth) : (result.bounds.width = startPosition, result.bounds.width = lineWidth), 
            result;
        }, PdfTextElement;
    }(PdfLayoutElement), __extends$19$1 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), PdfUriAnnotation = function(_super) {
        function PdfUriAnnotation(rectangle, uri) {
            var _this = _super.call(this, rectangle) || this;
            return void 0 !== uri && (_this.uri = uri), _this;
        }
        return __extends$19$1(PdfUriAnnotation, _super), Object.defineProperty(PdfUriAnnotation.prototype, "uriAction", {
            get: function() {
                return void 0 === this.pdfUriAction && (this.pdfUriAction = new PdfUriAction()), 
                this.pdfUriAction;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfUriAnnotation.prototype, "uri", {
            get: function() {
                return this.uriAction.uri;
            },
            set: function(value) {
                this.uriAction.uri !== value && (this.uriAction.uri = value);
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfUriAnnotation.prototype, "action", {
            get: function() {
                return this.getSetAction();
            },
            set: function(value) {
                this.getSetAction(value), this.uriAction.next = value;
            },
            enumerable: !0,
            configurable: !0
        }), PdfUriAnnotation.prototype.initialize = function() {
            _super.prototype.initialize.call(this), this.dictionary.items.setValue(this.dictionaryProperties.subtype, new PdfName(this.dictionaryProperties.link));
            this.uriAction.element;
            this.dictionary.items.setValue(this.dictionaryProperties.a, this.uriAction.element);
        }, PdfUriAnnotation;
    }(PdfActionLinkAnnotation), __extends$16$1 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), PdfTextWebLink = function(_super) {
        function PdfTextWebLink() {
            var _this = _super.call(this) || this;
            _this.uniformResourceLocator = "", _this.uriAnnotation = null, _this.recalculateBounds = !1, 
            _this.defaultBorder = new PdfArray();
            for (var i = 0; i < 3; i++) _this.defaultBorder.add(new PdfNumber(0));
            return _this;
        }
        return __extends$16$1(PdfTextWebLink, _super), Object.defineProperty(PdfTextWebLink.prototype, "url", {
            get: function() {
                return this.uniformResourceLocator;
            },
            set: function(value) {
                if (0 === value.length) throw new Error("ArgumentException : Url - string can not be empty");
                this.uniformResourceLocator = value;
            },
            enumerable: !0,
            configurable: !0
        }), PdfTextWebLink.prototype.draw = function(arg1, arg2) {
            if (arg1 instanceof PdfPage) {
                var layout = new PdfStringLayouter(), previousFontStyle = this.font.style;
                if (arg2 instanceof PointF) {
                    this.recalculateBounds = !0, this.font.style = PdfFontStyle.Underline;
                    if (1 === (layoutResult = layout.layout(this.value, this.font, this.stringFormat, new SizeF(arg1.graphics.clientSize.width - arg2.x, 0), !0, arg1.graphics.clientSize)).lines.length) {
                        var textSize = this.font.measureString(this.value), rect = new RectangleF(arg2, textSize);
                        rect = this.calculateBounds(rect, textSize.width, arg1.graphics.clientSize.width, arg2.x), 
                        this.uriAnnotation = new PdfUriAnnotation(rect, this.url), this.uriAnnotation.dictionary.items.setValue("Border", this.defaultBorder), 
                        arg1.annotations.add(this.uriAnnotation);
                        var result = this.drawText(arg1, arg2);
                        return this.font.style = previousFontStyle, result;
                    }
                    result = this.drawMultipleLineWithPoint(layoutResult, arg1, arg2);
                    return this.font.style = previousFontStyle, result;
                }
                var layoutResult = layout.layout(this.value, this.font, this.stringFormat, new SizeF(arg2.width, 0), !1, new SizeF(0, 0));
                if (this.font.style = PdfFontStyle.Underline, 1 === layoutResult.lines.length) {
                    textSize = this.font.measureString(this.value), rect = new RectangleF(new PointF(arg2.x, arg2.y), textSize);
                    rect = this.calculateBounds(rect, textSize.width, arg2.width, arg2.x), this.uriAnnotation = new PdfUriAnnotation(rect, this.url), 
                    this.uriAnnotation.dictionary.items.setValue("Border", this.defaultBorder), arg1.annotations.add(this.uriAnnotation);
                    var returnValue = this.drawText(arg1, arg2);
                    return this.font.style = previousFontStyle, returnValue;
                }
                returnValue = this.drawMultipleLineWithBounds(layoutResult, arg1, arg2);
                return this.font.style = previousFontStyle, returnValue;
            }
            var page = new PdfPage();
            return page = arg1.page, this.draw(page, arg2);
        }, PdfTextWebLink.prototype.drawMultipleLineWithPoint = function(result, page, location) {
            for (var layoutResult, i = 0; i < result.layoutLines.length; i++) {
                var size = this.font.measureString(result.lines[i].text), bounds = new RectangleF(location, size);
                if (0 !== i && (bounds.x = 0), this.text = result.lines[i].text, bounds.y + size.height > page.graphics.clientSize.height) {
                    if (0 === i) break;
                    page = page.graphics.getNextPage(), bounds = new RectangleF(0, 0, page.graphics.clientSize.width, size.height), 
                    location.y = 0;
                }
                bounds = this.calculateBounds(bounds, size.width, page.graphics.clientSize.width, bounds.x), 
                this.uriAnnotation = new PdfUriAnnotation(bounds, this.url), this.uriAnnotation.dictionary.items.setValue("Border", this.defaultBorder), 
                page.annotations.add(this.uriAnnotation), layoutResult = 0 !== i ? this.drawText(page, new PointF(0, bounds.y)) : this.drawText(page, bounds.x, bounds.y), 
                location.y += size.height;
            }
            return layoutResult;
        }, PdfTextWebLink.prototype.drawMultipleLineWithBounds = function(result, page, bounds) {
            for (var layoutResult, i = 0; i < result.layoutLines.length; i++) {
                var size = this.font.measureString(result.lines[i].text), internalBounds = new RectangleF(new PointF(bounds.x, bounds.y), size);
                if (internalBounds = this.calculateBounds(internalBounds, size.width, bounds.width, bounds.x), 
                this.text = result.lines[i].text, bounds.y + size.height > page.graphics.clientSize.height) {
                    if (0 === i) break;
                    page = page.graphics.getNextPage(), bounds = new RectangleF(bounds.x, 0, bounds.width, size.height), 
                    internalBounds.y = 0;
                }
                this.uriAnnotation = new PdfUriAnnotation(internalBounds, this.url), this.uriAnnotation.dictionary.items.setValue("Border", this.defaultBorder), 
                page.annotations.add(this.uriAnnotation), layoutResult = this.drawText(page, bounds), 
                bounds.y += size.height;
            }
            return layoutResult;
        }, PdfTextWebLink.prototype.calculateBounds = function(currentBounds, lineWidth, maximumWidth, startPosition) {
            return null != this.stringFormat && void 0 !== this.stringFormat && this.stringFormat.alignment === PdfTextAlignment.Center ? (currentBounds.x = startPosition + (maximumWidth - lineWidth) / 2, 
            currentBounds.width = lineWidth) : null != this.stringFormat && void 0 !== this.stringFormat && this.stringFormat.alignment === PdfTextAlignment.Right ? (currentBounds.x = startPosition + (maximumWidth - lineWidth), 
            currentBounds.width = lineWidth) : null != this.stringFormat && void 0 !== this.stringFormat && this.stringFormat.alignment === PdfTextAlignment.Justify ? (currentBounds.x = startPosition, 
            currentBounds.width = maximumWidth) : (currentBounds.width = startPosition, currentBounds.width = lineWidth), 
            currentBounds;
        }, PdfTextWebLink;
    }(PdfTextElement), PdfNumbersConvertor = function() {
        function PdfNumbersConvertor() {}
        return PdfNumbersConvertor.convert = function(intArabic, numberStyle) {
            var result = "";
            switch (numberStyle) {
              case PdfNumberStyle.None:
                result = "";
                break;

              case PdfNumberStyle.Numeric:
                result = intArabic.toString();
                break;

              case PdfNumberStyle.LowerLatin:
                result = this.arabicToLetter(intArabic).toLowerCase();
                break;

              case PdfNumberStyle.LowerRoman:
                result = this.arabicToRoman(intArabic).toLowerCase();
                break;

              case PdfNumberStyle.UpperLatin:
                result = this.arabicToLetter(intArabic);
                break;

              case PdfNumberStyle.UpperRoman:
                result = this.arabicToRoman(intArabic);
            }
            return result;
        }, PdfNumbersConvertor.arabicToRoman = function(intArabic) {
            var retval = "";
            return retval += this.generateNumber(intArabic, 1e3, "M"), retval += this.generateNumber(intArabic, 900, "CM"), 
            retval += this.generateNumber(intArabic, 500, "D"), retval += this.generateNumber(intArabic, 400, "CD"), 
            retval += this.generateNumber(intArabic, 100, "C"), retval += this.generateNumber(intArabic, 90, "XC"), 
            retval += this.generateNumber(intArabic, 50, "L"), retval += this.generateNumber(intArabic, 40, "XL"), 
            retval += this.generateNumber(intArabic, 10, "X"), retval += this.generateNumber(intArabic, 9, "IX"), 
            retval += this.generateNumber(intArabic, 5, "V"), retval += this.generateNumber(intArabic, 4, "IV"), 
            (retval += this.generateNumber(intArabic, 1, "I")).toString();
        }, PdfNumbersConvertor.arabicToLetter = function(arabic) {
            for (var stack = this.convertToLetter(arabic), result = ""; stack.length > 0; ) {
                var num = stack.pop();
                result = this.appendChar(result, num);
            }
            return result.toString();
        }, PdfNumbersConvertor.generateNumber = function(value, magnitude, letter) {
            for (var numberstring = ""; value >= magnitude; ) value -= magnitude, numberstring += letter;
            return numberstring.toString();
        }, PdfNumbersConvertor.convertToLetter = function(arabic) {
            if (arabic <= 0) throw Error("ArgumentOutOfRangeException-arabic, Value can not be less 0");
            for (var stack = []; arabic > this.letterLimit; ) {
                var remainder = arabic % this.letterLimit;
                0 === remainder ? (arabic = arabic / this.letterLimit - 1, remainder = this.letterLimit) : arabic /= this.letterLimit, 
                stack.push(remainder);
            }
            return stack.push(arabic), stack;
        }, PdfNumbersConvertor.appendChar = function(builder, value) {
            return builder += String.fromCharCode(PdfNumbersConvertor.acsiiStartIndex + value);
        }, PdfNumbersConvertor.letterLimit = 26, PdfNumbersConvertor.acsiiStartIndex = 64, 
        PdfNumbersConvertor;
    }(), PdfTemplateValuePair = function() {
        function PdfTemplateValuePair(template, value) {
            this.pdfTemplate = null, this.content = "", void 0 === template || (this.template = template, 
            this.value = value);
        }
        return Object.defineProperty(PdfTemplateValuePair.prototype, "template", {
            get: function() {
                return this.pdfTemplate;
            },
            set: function(value) {
                this.pdfTemplate = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfTemplateValuePair.prototype, "value", {
            get: function() {
                return this.content;
            },
            set: function(value) {
                this.content = value;
            },
            enumerable: !0,
            configurable: !0
        }), PdfTemplateValuePair;
    }(), __extends$21$1 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), PdfMultipleValueField = function(_super) {
        function PdfMultipleValueField() {
            var _this = _super.call(this) || this;
            return _this.list = new TemporaryDictionary(), _this;
        }
        return __extends$21$1(PdfMultipleValueField, _super), PdfMultipleValueField.prototype.performDraw = function(graphics, location, scalingX, scalingY) {
            _super.prototype.performDrawHelper.call(this, graphics, location, scalingX, scalingY);
            var value = this.getValue(graphics), template = new PdfTemplate(this.getSize());
            this.list.setValue(graphics, new PdfTemplateValuePair(template, value));
            var size = this.getSize();
            template.graphics.drawString(value, this.getFont(), this.pen, this.getBrush(), 0, 0, size.width, size.height, this.stringFormat);
            var drawLocation = new PointF(location.x + this.location.x, location.y + this.location.y);
            graphics.drawPdfTemplate(template, drawLocation, new SizeF(template.width * scalingX, template.height * scalingY));
        }, PdfMultipleValueField;
    }(PdfAutomaticField), __extends$20$1 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), PdfPageNumberField = function(_super) {
        function PdfPageNumberField(font, arg2) {
            var _this = _super.call(this) || this;
            return _this.internalNumberStyle = PdfNumberStyle.Numeric, void 0 === arg2 ? _this.font = font : arg2 instanceof PdfBrush ? (_this.font = font, 
            _this.brush = arg2) : (_this.font = font, _this.bounds = arg2), _this;
        }
        return __extends$20$1(PdfPageNumberField, _super), Object.defineProperty(PdfPageNumberField.prototype, "numberStyle", {
            get: function() {
                return this.internalNumberStyle;
            },
            set: function(value) {
                this.internalNumberStyle = value;
            },
            enumerable: !0,
            configurable: !0
        }), PdfPageNumberField.prototype.getValue = function(graphics) {
            var page = this.getPageFromGraphics(graphics);
            return this.internalGetValue(page);
        }, PdfPageNumberField.prototype.internalGetValue = function(page) {
            var pageIndex = page.document.pages.indexOf(page) + 1;
            return PdfNumbersConvertor.convert(pageIndex, this.numberStyle);
        }, PdfPageNumberField;
    }(PdfMultipleValueField), __extends$22$1 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), PdfCompositeField = function(_super) {
        function PdfCompositeField(font, brush, text) {
            for (var list = [], _i = 3; _i < arguments.length; _i++) list[_i - 3] = arguments[_i];
            var _this = _super.call(this) || this;
            return _this.internalAutomaticFields = null, _this.internalText = "", _this.font = font, 
            _this.brush = brush, _this.text = text, _this.automaticFields = list, _this;
        }
        return __extends$22$1(PdfCompositeField, _super), Object.defineProperty(PdfCompositeField.prototype, "text", {
            get: function() {
                return this.internalText;
            },
            set: function(value) {
                this.internalText = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfCompositeField.prototype, "automaticFields", {
            get: function() {
                return this.internalAutomaticFields;
            },
            set: function(value) {
                this.internalAutomaticFields = value;
            },
            enumerable: !0,
            configurable: !0
        }), PdfCompositeField.prototype.getValue = function(graphics) {
            var text = this.text.toString();
            if (void 0 !== this.automaticFields && null != this.automaticFields && this.automaticFields.length > 0) for (var i = 0; i < this.automaticFields.length; i++) {
                var automaticField = this.automaticFields[i];
                text = text.replace("{" + i + "}", automaticField.getValue(graphics));
            }
            return text;
        }, PdfCompositeField;
    }(PdfMultipleValueField), __extends$24$1 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), PdfSingleValueField = function(_super) {
        function PdfSingleValueField() {
            var _this = _super.call(this) || this;
            return _this.list = new TemporaryDictionary(), _this.painterGraphics = [], _this;
        }
        return __extends$24$1(PdfSingleValueField, _super), PdfSingleValueField.prototype.performDraw = function(graphics, location, scalingX, scalingY) {
            _super.prototype.performDrawHelper.call(this, graphics, location, scalingX, scalingY);
            var document = this.getPageFromGraphics(graphics).document, textValue = this.getValue(graphics);
            if (this.list.containsKey(document)) {
                var pair = this.list.getValue(document), drawLocation = new PointF(location.x + this.location.x, location.y + this.location.y);
                graphics.drawPdfTemplate(pair.template, drawLocation, new SizeF(pair.template.width * scalingX, pair.template.height * scalingY)), 
                this.painterGraphics.push(graphics);
            } else {
                var size = this.getSize(), template = new PdfTemplate(size);
                this.list.setValue(document, new PdfTemplateValuePair(template, textValue)), template.graphics.drawString(textValue, this.getFont(), this.pen, this.getBrush(), 0, 0, size.width, size.height, this.stringFormat);
                drawLocation = new PointF(location.x + this.location.x, location.y + this.location.y);
                graphics.drawPdfTemplate(template, drawLocation, new SizeF(template.width * scalingX, template.height * scalingY)), 
                this.painterGraphics.push(graphics);
            }
        }, PdfSingleValueField;
    }(PdfAutomaticField), __extends$23$1 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), PdfPageCountField = function(_super) {
        function PdfPageCountField(font, arg2) {
            var _this = _super.call(this) || this;
            return _this.internalNumberStyle = PdfNumberStyle.Numeric, void 0 === arg2 ? _this.font = font : arg2 instanceof PdfBrush ? (_this.font = font, 
            _this.brush = arg2) : (_this.font = font, _this.bounds = arg2), _this;
        }
        return __extends$23$1(PdfPageCountField, _super), Object.defineProperty(PdfPageCountField.prototype, "numberStyle", {
            get: function() {
                return this.internalNumberStyle;
            },
            set: function(value) {
                this.internalNumberStyle = value;
            },
            enumerable: !0,
            configurable: !0
        }), PdfPageCountField.prototype.getValue = function(graphics) {
            var count = this.getPageFromGraphics(graphics).section.parent.document.pages.count;
            return PdfNumbersConvertor.convert(count, this.numberStyle);
        }, PdfPageCountField;
    }(PdfSingleValueField);
    !function(PdfDestinationMode) {
        PdfDestinationMode[PdfDestinationMode.Location = 0] = "Location", PdfDestinationMode[PdfDestinationMode.FitToPage = 1] = "FitToPage", 
        PdfDestinationMode[PdfDestinationMode.FitR = 2] = "FitR";
    }(PdfDestinationMode || (PdfDestinationMode = {}));
    var PdfBorderOverlapStyle, PdfDestination = function() {
        function PdfDestination(arg1, arg2) {
            if (this.dictionaryProperties = new DictionaryProperties(), this.destinationMode = PdfDestinationMode.Location, 
            this.zoomFactor = 0, this.destinationLocation = new PointF(0, 0), this.bounds = new RectangleF(), 
            this.array = new PdfArray(), void 0 === arg2) {
                PdfPageRotateAngle.RotateAngle0;
                this.destinationLocation = new PointF(0, this.destinationLocation.y), this.pdfPage = arg1;
            } else arg2 instanceof PointF ? (this.constructor(arg1), this.destinationLocation = arg2) : (this.constructor(arg1), 
            this.bounds = arg2);
        }
        return Object.defineProperty(PdfDestination.prototype, "zoom", {
            get: function() {
                return this.zoomFactor;
            },
            set: function(value) {
                this.zoomFactor = value, this.initializePrimitive();
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfDestination.prototype, "page", {
            get: function() {
                return this.pdfPage;
            },
            set: function(value) {
                this.pdfPage = value, this.initializePrimitive();
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfDestination.prototype, "mode", {
            get: function() {
                return this.destinationMode;
            },
            set: function(value) {
                this.destinationMode = value, this.initializePrimitive();
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfDestination.prototype, "location", {
            get: function() {
                return this.destinationLocation;
            },
            set: function(value) {
                this.destinationLocation = value, this.initializePrimitive();
            },
            enumerable: !0,
            configurable: !0
        }), PdfDestination.prototype.pointToNativePdf = function(page, point) {
            return page.section.pointToNativePdf(page, point);
        }, PdfDestination.prototype.initializePrimitive = function() {
            switch (this.array.clear(), this.array.add(new PdfReferenceHolder(this.pdfPage)), 
            this.destinationMode) {
              case PdfDestinationMode.Location:
                var simplePage = this.pdfPage, point = new PointF();
                point = this.pointToNativePdf(simplePage, this.destinationLocation), this.array.add(new PdfName(this.dictionaryProperties.xyz)), 
                this.array.add(new PdfNumber(point.x)), this.array.add(new PdfNumber(point.y)), 
                this.array.add(new PdfNumber(this.zoomFactor));
                break;

              case PdfDestinationMode.FitToPage:
                this.array.add(new PdfName(this.dictionaryProperties.fit));
            }
        }, Object.defineProperty(PdfDestination.prototype, "element", {
            get: function() {
                return this.initializePrimitive(), this.array;
            },
            enumerable: !0,
            configurable: !0
        }), PdfDestination;
    }(), PdfPageTemplateElement = function() {
        function PdfPageTemplateElement(arg1, arg2, arg3, arg4, arg5) {
            arg1 instanceof RectangleF && void 0 === arg2 ? this.constructor(arg1.x, arg1.y, arg1.width, arg1.height) : arg1 instanceof RectangleF && arg2 instanceof PdfPage && void 0 === arg3 ? this.constructor(arg1.x, arg1.y, arg1.width, arg1.height, arg2) : arg1 instanceof PointF && arg2 instanceof SizeF && void 0 === arg3 ? this.constructor(arg1.x, arg1.y, arg2.width, arg2.height) : arg1 instanceof PointF && arg2 instanceof SizeF && arg3 instanceof PdfPage && void 0 === arg4 ? this.constructor(arg1.x, arg1.y, arg2.width, arg2.height, arg3) : arg1 instanceof SizeF && void 0 === arg2 ? this.constructor(arg1.width, arg1.height) : "number" == typeof arg1 && "number" == typeof arg2 && void 0 === arg3 ? this.constructor(0, 0, arg1, arg2) : "number" == typeof arg1 && "number" == typeof arg2 && arg3 instanceof PdfPage && void 0 === arg4 ? this.constructor(0, 0, arg1, arg2, arg3) : (this.x = arg1, 
            this.y = arg2, this.pdfTemplate = new PdfTemplate(arg3, arg4));
        }
        return Object.defineProperty(PdfPageTemplateElement.prototype, "dock", {
            get: function() {
                return this.dockStyle;
            },
            set: function(value) {
                this.dockStyle = value, this.resetAlignment();
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPageTemplateElement.prototype, "alignment", {
            get: function() {
                return this.alignmentStyle;
            },
            set: function(value) {
                this.setAlignment(value);
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPageTemplateElement.prototype, "foreground", {
            get: function() {
                return this.isForeground;
            },
            set: function(value) {
                this.isForeground = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPageTemplateElement.prototype, "background", {
            get: function() {
                return !this.isForeground;
            },
            set: function(value) {
                this.isForeground = !value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPageTemplateElement.prototype, "location", {
            get: function() {
                return this.currentLocation;
            },
            set: function(value) {
                this.type === TemplateType.None && (this.currentLocation = value);
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPageTemplateElement.prototype, "x", {
            get: function() {
                return void 0 !== this.currentLocation ? this.currentLocation.x : 0;
            },
            set: function(value) {
                this.type === TemplateType.None && (this.currentLocation.x = value);
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPageTemplateElement.prototype, "y", {
            get: function() {
                return void 0 !== this.currentLocation ? this.currentLocation.y : 0;
            },
            set: function(value) {
                this.type === TemplateType.None && (this.currentLocation.y = value);
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPageTemplateElement.prototype, "size", {
            get: function() {
                return this.template.size;
            },
            set: function(value) {
                this.type === TemplateType.None && this.template.reset(value);
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPageTemplateElement.prototype, "width", {
            get: function() {
                return this.template.width;
            },
            set: function(value) {
                if (this.template.width !== value && this.type === TemplateType.None) {
                    var size = this.template.size;
                    size.width = value, this.template.reset(size);
                }
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPageTemplateElement.prototype, "height", {
            get: function() {
                return this.template.height;
            },
            set: function(value) {
                if (this.template.height !== value && this.type === TemplateType.None) {
                    var size = this.template.size;
                    size.height = value, this.template.reset(size);
                }
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPageTemplateElement.prototype, "graphics", {
            get: function() {
                return this.template.graphics;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPageTemplateElement.prototype, "template", {
            get: function() {
                return this.pdfTemplate;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPageTemplateElement.prototype, "type", {
            get: function() {
                return this.templateType;
            },
            set: function(value) {
                this.updateDocking(value), this.templateType = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPageTemplateElement.prototype, "bounds", {
            get: function() {
                return new RectangleF(new PointF(this.x, this.y), this.size);
            },
            set: function(value) {
                this.type === TemplateType.None && (this.location = new PointF(value.x, value.y), 
                this.size = new SizeF(value.width, value.height));
            },
            enumerable: !0,
            configurable: !0
        }), PdfPageTemplateElement.prototype.updateDocking = function(type) {
            if (type !== TemplateType.None) {
                switch (type) {
                  case TemplateType.Top:
                    this.dock = PdfDockStyle.Top;
                    break;

                  case TemplateType.Bottom:
                    this.dock = PdfDockStyle.Bottom;
                    break;

                  case TemplateType.Left:
                    this.dock = PdfDockStyle.Left;
                    break;

                  case TemplateType.Right:
                    this.dock = PdfDockStyle.Right;
                }
                this.resetAlignment();
            }
        }, PdfPageTemplateElement.prototype.resetAlignment = function() {
            this.alignment = PdfAlignmentStyle.None;
        }, PdfPageTemplateElement.prototype.setAlignment = function(alignment) {
            if (this.dock === PdfDockStyle.None) this.alignmentStyle = alignment; else {
                var canBeSet = !1;
                switch (this.dock) {
                  case PdfDockStyle.Left:
                    canBeSet = alignment === PdfAlignmentStyle.TopLeft || alignment === PdfAlignmentStyle.MiddleLeft || alignment === PdfAlignmentStyle.BottomLeft || alignment === PdfAlignmentStyle.None;
                    break;

                  case PdfDockStyle.Top:
                    canBeSet = alignment === PdfAlignmentStyle.TopLeft || alignment === PdfAlignmentStyle.TopCenter || alignment === PdfAlignmentStyle.TopRight || alignment === PdfAlignmentStyle.None;
                    break;

                  case PdfDockStyle.Right:
                    canBeSet = alignment === PdfAlignmentStyle.TopRight || alignment === PdfAlignmentStyle.MiddleRight || alignment === PdfAlignmentStyle.BottomRight || alignment === PdfAlignmentStyle.None;
                    break;

                  case PdfDockStyle.Bottom:
                    canBeSet = alignment === PdfAlignmentStyle.BottomLeft || alignment === PdfAlignmentStyle.BottomCenter || alignment === PdfAlignmentStyle.BottomRight || alignment === PdfAlignmentStyle.None;
                    break;

                  case PdfDockStyle.Fill:
                    canBeSet = alignment === PdfAlignmentStyle.MiddleCenter || alignment === PdfAlignmentStyle.None;
                }
                canBeSet && (this.alignmentStyle = alignment);
            }
        }, PdfPageTemplateElement.prototype.draw = function(layer, document) {
            var page = layer.page, bounds = this.calculateBounds(page, document);
            -0 === bounds.x && (bounds.x = 0), layer.graphics.drawPdfTemplate(this.template, new PointF(bounds.x, bounds.y), new SizeF(bounds.width, bounds.height));
        }, PdfPageTemplateElement.prototype.calculateBounds = function(page, document) {
            var result = this.bounds;
            return this.alignmentStyle !== PdfAlignmentStyle.None ? result = this.getAlignmentBounds(page, document) : this.dockStyle !== PdfDockStyle.None && (result = this.getDockBounds(page, document)), 
            result;
        }, PdfPageTemplateElement.prototype.getAlignmentBounds = function(page, document) {
            this.bounds;
            return this.type === TemplateType.None ? this.getSimpleAlignmentBounds(page, document) : this.getTemplateAlignmentBounds(page, document);
        }, PdfPageTemplateElement.prototype.getSimpleAlignmentBounds = function(page, document) {
            var bounds = this.bounds, actualBounds = page.section.getActualBounds(document, page, !1), x = this.x, y = this.y;
            switch (this.alignmentStyle) {
              case PdfAlignmentStyle.TopLeft:
                x = 0, y = 0;
                break;

              case PdfAlignmentStyle.TopCenter:
                x = (actualBounds.width - this.width) / 2, y = 0;
                break;

              case PdfAlignmentStyle.TopRight:
                x = actualBounds.width - this.width, y = 0;
                break;

              case PdfAlignmentStyle.MiddleLeft:
                x = 0, y = (actualBounds.height - this.height) / 2;
                break;

              case PdfAlignmentStyle.MiddleCenter:
                x = (actualBounds.width - this.width) / 2, y = (actualBounds.height - this.height) / 2;
                break;

              case PdfAlignmentStyle.MiddleRight:
                x = actualBounds.width - this.width, y = (actualBounds.height - this.height) / 2;
                break;

              case PdfAlignmentStyle.BottomLeft:
                x = 0, y = actualBounds.height - this.height;
                break;

              case PdfAlignmentStyle.BottomCenter:
                x = (actualBounds.width - this.width) / 2, y = actualBounds.height - this.height;
                break;

              case PdfAlignmentStyle.BottomRight:
                x = actualBounds.width - this.width, y = actualBounds.height - this.height;
            }
            return bounds.x = x, bounds.y = y, bounds;
        }, PdfPageTemplateElement.prototype.getTemplateAlignmentBounds = function(page, document) {
            var result = this.bounds, section = page.section, actualBounds = section.getActualBounds(document, page, !1), x = this.x, y = this.y;
            switch (this.alignmentStyle) {
              case PdfAlignmentStyle.TopLeft:
                this.type === TemplateType.Left ? (x = -actualBounds.x, y = 0) : this.type === TemplateType.Top && (x = -actualBounds.x, 
                y = -actualBounds.y);
                break;

              case PdfAlignmentStyle.TopCenter:
                x = (actualBounds.width - this.width) / 2, y = -actualBounds.y;
                break;

              case PdfAlignmentStyle.TopRight:
                this.type === TemplateType.Right ? (x = actualBounds.width + section.getRightIndentWidth(document, page, !1) - this.width, 
                y = 0) : this.type === TemplateType.Top && (x = actualBounds.width + section.getRightIndentWidth(document, page, !1) - this.width, 
                y = -actualBounds.y);
                break;

              case PdfAlignmentStyle.MiddleLeft:
                x = -actualBounds.x, y = (actualBounds.height - this.height) / 2;
                break;

              case PdfAlignmentStyle.MiddleCenter:
                x = (actualBounds.width - this.width) / 2, y = (actualBounds.height - this.height) / 2;
                break;

              case PdfAlignmentStyle.MiddleRight:
                x = actualBounds.width + section.getRightIndentWidth(document, page, !1) - this.width, 
                y = (actualBounds.height - this.height) / 2;
                break;

              case PdfAlignmentStyle.BottomLeft:
                this.type === TemplateType.Left ? (x = -actualBounds.x, y = actualBounds.height - this.height) : this.type === TemplateType.Bottom && (x = -actualBounds.x, 
                y = actualBounds.height + section.getBottomIndentHeight(document, page, !1) - this.height);
                break;

              case PdfAlignmentStyle.BottomCenter:
                x = (actualBounds.width - this.width) / 2, y = actualBounds.height + section.getBottomIndentHeight(document, page, !1) - this.height;
                break;

              case PdfAlignmentStyle.BottomRight:
                this.type === TemplateType.Right ? (x = actualBounds.width + section.getRightIndentWidth(document, page, !1) - this.width, 
                y = actualBounds.height - this.height) : this.type === TemplateType.Bottom && (x = actualBounds.width + section.getRightIndentWidth(document, page, !1) - this.width, 
                y = actualBounds.height + section.getBottomIndentHeight(document, page, !1) - this.height);
            }
            return result.x = x, result.y = y, result;
        }, PdfPageTemplateElement.prototype.getDockBounds = function(page, document) {
            this.bounds;
            return this.type === TemplateType.None ? this.getSimpleDockBounds(page, document) : this.getTemplateDockBounds(page, document);
        }, PdfPageTemplateElement.prototype.getSimpleDockBounds = function(page, document) {
            this.bounds;
            var actualBounds = page.section.getActualBounds(document, page, !1), x = this.x, y = this.y, width = this.width, height = this.height;
            switch (this.dockStyle) {
              case PdfDockStyle.Left:
                x = 0, y = 0, width = this.width, height = actualBounds.height;
                break;

              case PdfDockStyle.Top:
                x = 0, y = 0, width = actualBounds.width, height = this.height;
                break;

              case PdfDockStyle.Right:
                x = actualBounds.width - this.width, y = 0, width = this.width, height = actualBounds.height;
                break;

              case PdfDockStyle.Bottom:
                x = 0, y = actualBounds.height - this.height, width = actualBounds.width, height = this.height;
                break;

              case PdfDockStyle.Fill:
                x = 0, x = 0, width = actualBounds.width, height = actualBounds.height;
            }
            return new RectangleF(x, y, width, height);
        }, PdfPageTemplateElement.prototype.getTemplateDockBounds = function(page, document) {
            this.bounds;
            var section = page.section, actualBounds = section.getActualBounds(document, page, !1), actualSize = section.pageSettings.getActualSize(), x = this.x, y = this.y, width = this.width, height = this.height;
            switch (this.dockStyle) {
              case PdfDockStyle.Left:
                x = -actualBounds.x, y = 0, width = this.width, height = actualBounds.height;
                break;

              case PdfDockStyle.Top:
                x = -actualBounds.x, y = -actualBounds.y, width = actualSize.width, height = this.height, 
                actualBounds.height < 0 && (y = -actualBounds.y + actualSize.height);
                break;

              case PdfDockStyle.Right:
                x = actualBounds.width + section.getRightIndentWidth(document, page, !1) - this.width, 
                y = 0, width = this.width, height = actualBounds.height;
                break;

              case PdfDockStyle.Bottom:
                x = -actualBounds.x, y = actualBounds.height + section.getBottomIndentHeight(document, page, !1) - this.height, 
                width = actualSize.width, height = this.height, actualBounds.height < 0 && (y -= actualSize.height);
                break;

              case PdfDockStyle.Fill:
                x = 0, x = 0, width = actualBounds.width, height = actualBounds.height;
            }
            return new RectangleF(x, y, width, height);
        }, PdfPageTemplateElement;
    }(), PdfBorders = function() {
        function PdfBorders() {
            var defaultBorderPenLeft = new PdfPen(new PdfColor(0, 0, 0));
            defaultBorderPenLeft.dashStyle = PdfDashStyle.Solid;
            var defaultBorderPenRight = new PdfPen(new PdfColor(0, 0, 0));
            defaultBorderPenRight.dashStyle = PdfDashStyle.Solid;
            var defaultBorderPenTop = new PdfPen(new PdfColor(0, 0, 0));
            defaultBorderPenTop.dashStyle = PdfDashStyle.Solid;
            var defaultBorderPenBottom = new PdfPen(new PdfColor(0, 0, 0));
            defaultBorderPenBottom.dashStyle = PdfDashStyle.Solid, this.leftPen = defaultBorderPenLeft, 
            this.rightPen = defaultBorderPenRight, this.topPen = defaultBorderPenTop, this.bottomPen = defaultBorderPenBottom;
        }
        return Object.defineProperty(PdfBorders.prototype, "left", {
            get: function() {
                return this.leftPen;
            },
            set: function(value) {
                this.leftPen = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfBorders.prototype, "right", {
            get: function() {
                return this.rightPen;
            },
            set: function(value) {
                this.rightPen = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfBorders.prototype, "top", {
            get: function() {
                return this.topPen;
            },
            set: function(value) {
                this.topPen = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfBorders.prototype, "bottom", {
            get: function() {
                return this.bottomPen;
            },
            set: function(value) {
                this.bottomPen = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfBorders.prototype, "all", {
            set: function(value) {
                this.leftPen = this.rightPen = this.topPen = this.bottomPen = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfBorders.prototype, "isAll", {
            get: function() {
                return this.leftPen === this.rightPen && this.leftPen === this.topPen && this.leftPen === this.bottomPen;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfBorders, "default", {
            get: function() {
                return new PdfBorders();
            },
            enumerable: !0,
            configurable: !0
        }), PdfBorders;
    }(), PdfPaddings = function() {
        function PdfPaddings(left, right, top, bottom) {
            void 0 === left ? (this.leftPad = this.rightPad = 5.76, this.bottom = this.topPad = .5) : (this.leftPad = left, 
            this.rightPad = right, this.topPad = top, this.bottomPad = bottom);
        }
        return Object.defineProperty(PdfPaddings.prototype, "left", {
            get: function() {
                return this.leftPad;
            },
            set: function(value) {
                this.leftPad = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPaddings.prototype, "right", {
            get: function() {
                return this.rightPad;
            },
            set: function(value) {
                this.rightPad = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPaddings.prototype, "top", {
            get: function() {
                return this.topPad;
            },
            set: function(value) {
                this.topPad = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPaddings.prototype, "bottom", {
            get: function() {
                return this.bottomPad;
            },
            set: function(value) {
                this.bottomPad = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfPaddings.prototype, "all", {
            set: function(value) {
                this.leftPad = this.rightPad = this.topPad = this.bottomPad = value;
            },
            enumerable: !0,
            configurable: !0
        }), PdfPaddings;
    }();
    !function(PdfBorderOverlapStyle) {
        PdfBorderOverlapStyle[PdfBorderOverlapStyle.Overlap = 0] = "Overlap", PdfBorderOverlapStyle[PdfBorderOverlapStyle.Inside = 1] = "Inside";
    }(PdfBorderOverlapStyle || (PdfBorderOverlapStyle = {}));
    var PdfHorizontalOverflowType, __extends$25$1 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), PdfGridStyleBase = function() {
        function PdfGridStyleBase() {}
        return Object.defineProperty(PdfGridStyleBase.prototype, "backgroundBrush", {
            get: function() {
                return this.gridBackgroundBrush;
            },
            set: function(value) {
                this.gridBackgroundBrush = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGridStyleBase.prototype, "textBrush", {
            get: function() {
                return this.gridTextBrush;
            },
            set: function(value) {
                this.gridTextBrush = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGridStyleBase.prototype, "textPen", {
            get: function() {
                return this.gridTextPen;
            },
            set: function(value) {
                this.gridTextPen = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGridStyleBase.prototype, "font", {
            get: function() {
                return this.gridFont;
            },
            set: function(value) {
                this.gridFont = value;
            },
            enumerable: !0,
            configurable: !0
        }), PdfGridStyleBase;
    }(), PdfGridStyle = function(_super) {
        function PdfGridStyle() {
            var _this = _super.call(this) || this;
            return _this.gridBorderOverlapStyle = PdfBorderOverlapStyle.Overlap, _this.bAllowHorizontalOverflow = !1, 
            _this.gridHorizontalOverflowType = PdfHorizontalOverflowType.LastPage, _this;
        }
        return __extends$25$1(PdfGridStyle, _super), Object.defineProperty(PdfGridStyle.prototype, "cellSpacing", {
            get: function() {
                return void 0 === this.gridCellSpacing && (this.gridCellSpacing = 0), this.gridCellSpacing;
            },
            set: function(value) {
                this.gridCellSpacing = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGridStyle.prototype, "horizontalOverflowType", {
            get: function() {
                return this.gridHorizontalOverflowType;
            },
            set: function(value) {
                this.gridHorizontalOverflowType = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGridStyle.prototype, "allowHorizontalOverflow", {
            get: function() {
                return this.bAllowHorizontalOverflow;
            },
            set: function(value) {
                this.bAllowHorizontalOverflow = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGridStyle.prototype, "cellPadding", {
            get: function() {
                return void 0 === this.gridCellPadding && (this.gridCellPadding = new PdfPaddings()), 
                this.gridCellPadding;
            },
            set: function(value) {
                void 0 === this.gridCellPadding ? (this.gridCellPadding = new PdfPaddings(), this.gridCellPadding = value) : this.gridCellPadding = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGridStyle.prototype, "borderOverlapStyle", {
            get: function() {
                return this.gridBorderOverlapStyle;
            },
            set: function(value) {
                this.gridBorderOverlapStyle = value;
            },
            enumerable: !0,
            configurable: !0
        }), PdfGridStyle;
    }(PdfGridStyleBase), PdfGridCellStyle = function(_super) {
        function PdfGridCellStyle() {
            var _this = _super.call(this) || this;
            return _this.gridCellBorders = PdfBorders.default, _this;
        }
        return __extends$25$1(PdfGridCellStyle, _super), Object.defineProperty(PdfGridCellStyle.prototype, "stringFormat", {
            get: function() {
                return this.format;
            },
            set: function(value) {
                this.format = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGridCellStyle.prototype, "borders", {
            get: function() {
                return this.gridCellBorders;
            },
            set: function(value) {
                this.gridCellBorders = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGridCellStyle.prototype, "cellPadding", {
            get: function() {
                return this.gridCellPadding;
            },
            set: function(value) {
                null != this.gridCellPadding && void 0 !== this.gridCellPadding || (this.gridCellPadding = new PdfPaddings()), 
                this.gridCellPadding = value;
            },
            enumerable: !0,
            configurable: !0
        }), PdfGridCellStyle;
    }(PdfGridStyleBase), PdfGridRowStyle = function() {
        function PdfGridRowStyle() {}
        return Object.defineProperty(PdfGridRowStyle.prototype, "backgroundBrush", {
            get: function() {
                return this.gridRowBackgroundBrush;
            },
            enumerable: !0,
            configurable: !0
        }), PdfGridRowStyle.prototype.setBackgroundBrush = function(value) {
            if (this.gridRowBackgroundBrush = value, void 0 !== this.parent) for (var i = 0; i < this.parent.cells.count; i++) this.parent.cells.getCell(i).style.backgroundBrush = value;
        }, Object.defineProperty(PdfGridRowStyle.prototype, "textBrush", {
            get: function() {
                return this.gridRowTextBrush;
            },
            enumerable: !0,
            configurable: !0
        }), PdfGridRowStyle.prototype.setTextBrush = function(value) {
            if (this.gridRowTextBrush = value, void 0 !== this.parent) for (var i = 0; i < this.parent.cells.count; i++) this.parent.cells.getCell(i).style.textBrush = value;
        }, Object.defineProperty(PdfGridRowStyle.prototype, "textPen", {
            get: function() {
                return this.gridRowTextPen;
            },
            enumerable: !0,
            configurable: !0
        }), PdfGridRowStyle.prototype.setTextPen = function(value) {
            if (this.gridRowTextPen = value, void 0 !== this.parent) for (var i = 0; i < this.parent.cells.count; i++) this.parent.cells.getCell(i).style.textPen = value;
        }, Object.defineProperty(PdfGridRowStyle.prototype, "font", {
            get: function() {
                return this.gridRowFont;
            },
            enumerable: !0,
            configurable: !0
        }), PdfGridRowStyle.prototype.setFont = function(value) {
            if (this.gridRowFont = value, void 0 !== this.parent) for (var i = 0; i < this.parent.cells.count; i++) this.parent.cells.getCell(i).style.font = value;
        }, Object.defineProperty(PdfGridRowStyle.prototype, "border", {
            get: function() {
                return void 0 === this.gridRowBorder && this.setBorder(new PdfBorders()), this.gridRowBorder;
            },
            enumerable: !0,
            configurable: !0
        }), PdfGridRowStyle.prototype.setBorder = function(value) {
            if (this.gridRowBorder = value, void 0 !== this.parent) for (var i = 0; i < this.parent.cells.count; i++) this.parent.cells.getCell(i).style.borders = value;
        }, PdfGridRowStyle.prototype.setParent = function(parent) {
            this.parent = parent;
        }, PdfGridRowStyle;
    }();
    !function(PdfHorizontalOverflowType) {
        PdfHorizontalOverflowType[PdfHorizontalOverflowType.NextPage = 0] = "NextPage", 
        PdfHorizontalOverflowType[PdfHorizontalOverflowType.LastPage = 1] = "LastPage";
    }(PdfHorizontalOverflowType || (PdfHorizontalOverflowType = {}));
    var Theme$1, PdfGridCell = function() {
        function PdfGridCell(row) {
            this.cellWidth = 0, this.cellHeight = 0, this.finsh = !0, this.rowSpanRemainingHeight = 0, 
            void 0 === row ? (this.gridRowSpan = 1, this.colSpan = 1) : (this.constructor(), 
            this.gridRow = row);
        }
        return Object.defineProperty(PdfGridCell.prototype, "isCellMergeContinue", {
            get: function() {
                return this.internalIsCellMergeContinue;
            },
            set: function(value) {
                this.internalIsCellMergeContinue = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGridCell.prototype, "isRowMergeContinue", {
            get: function() {
                return this.internalIsRowMergeContinue;
            },
            set: function(value) {
                this.internalIsRowMergeContinue = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGridCell.prototype, "isCellMergeStart", {
            get: function() {
                return this.internalIsCellMergeStart;
            },
            set: function(value) {
                this.internalIsCellMergeStart = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGridCell.prototype, "isRowMergeStart", {
            get: function() {
                return this.internalIsRowMergeStart;
            },
            set: function(value) {
                this.internalIsRowMergeStart = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGridCell.prototype, "remainingString", {
            get: function() {
                return this.remaining;
            },
            set: function(value) {
                this.remaining = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGridCell.prototype, "stringFormat", {
            get: function() {
                return null == this.format && (this.format = new PdfStringFormat()), this.format;
            },
            set: function(value) {
                this.format = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGridCell.prototype, "row", {
            get: function() {
                return this.gridRow;
            },
            set: function(value) {
                this.gridRow = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGridCell.prototype, "value", {
            get: function() {
                return this.objectValue;
            },
            set: function(value) {
                this.objectValue = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGridCell.prototype, "rowSpan", {
            get: function() {
                return this.gridRowSpan;
            },
            set: function(value) {
                if (value < 1) throw new Error("ArgumentException : Invalid span specified, must be greater than or equal to 1");
                this.gridRowSpan = value, this.row.rowSpanExists = !0;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGridCell.prototype, "style", {
            get: function() {
                return null == this.cellStyle && (this.cellStyle = new PdfGridCellStyle()), this.cellStyle;
            },
            set: function(value) {
                this.cellStyle = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGridCell.prototype, "height", {
            get: function() {
                return 0 === this.cellHeight && (this.cellHeight = this.measureHeight()), this.cellHeight;
            },
            set: function(value) {
                this.cellHeight = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGridCell.prototype, "columnSpan", {
            get: function() {
                return this.colSpan;
            },
            set: function(value) {
                if (value < 1) throw Error("Invalid span specified, must be greater than or equal to 1");
                this.colSpan = value, this.row.columnSpanExists = !0;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGridCell.prototype, "width", {
            get: function() {
                return (0 === this.cellWidth || this.row.grid.isComplete) && (this.cellWidth = this.measureWidth()), 
                this.cellWidth;
            },
            set: function(value) {
                this.cellWidth = value;
            },
            enumerable: !0,
            configurable: !0
        }), PdfGridCell.prototype.measureWidth = function() {
            var width = 0, layouter = new PdfStringLayouter();
            if ("string" == typeof this.objectValue) {
                width += layouter.layout(this.objectValue, this.getTextFont(), this.stringFormat, new SizeF(0, 0), !1, new SizeF(0, 0)).actualSize.width, 
                width += 2 * (this.style.borders.left.width + this.style.borders.right.width);
            } else if (this.objectValue instanceof PdfImage || this.objectValue instanceof PdfBitmap) width += this.objectValue.width; else if (this.objectValue instanceof PdfTextWebLink) {
                var webLink = this.objectValue;
                width += layouter.layout(webLink.text, webLink.font, webLink.stringFormat, new SizeF(0, 0), !1, new SizeF(0, 0)).actualSize.width, 
                width += 2 * (this.style.borders.left.width + this.style.borders.right.width);
            }
            return width += this.row.grid.style.cellPadding.left + this.row.grid.style.cellPadding.right, 
            width += this.row.grid.style.cellSpacing;
        }, PdfGridCell.prototype.drawCellBackground = function(graphics, bounds) {
            var backgroundBrush = this.getBackgroundBrush();
            null != backgroundBrush && graphics.drawRectangle(backgroundBrush, bounds.x, bounds.y, bounds.width, bounds.height);
        }, PdfGridCell.prototype.adjustContentLayoutArea = function(bounds) {
            var returnBounds = new RectangleF(bounds.x, bounds.y, bounds.width, bounds.height);
            return void 0 === this.style.cellPadding || null == this.style.cellPadding ? (returnBounds.x += this.gridRow.grid.style.cellPadding.left + this.cellStyle.borders.left.width, 
            returnBounds.y += this.gridRow.grid.style.cellPadding.top + this.cellStyle.borders.top.width, 
            returnBounds.width -= this.gridRow.grid.style.cellPadding.right + this.gridRow.grid.style.cellPadding.left, 
            returnBounds.width -= this.cellStyle.borders.left.width + this.cellStyle.borders.right.width, 
            returnBounds.height -= this.gridRow.grid.style.cellPadding.bottom + this.gridRow.grid.style.cellPadding.top, 
            returnBounds.height -= this.cellStyle.borders.top.width + this.cellStyle.borders.bottom.width, 
            1 === this.rowSpan && (returnBounds.width -= this.style.borders.left.width)) : (returnBounds.x += this.style.cellPadding.left + this.cellStyle.borders.left.width, 
            returnBounds.y += this.style.cellPadding.top + this.cellStyle.borders.top.width, 
            returnBounds.width -= this.style.cellPadding.right + this.style.cellPadding.left, 
            returnBounds.width -= this.cellStyle.borders.left.width + this.cellStyle.borders.right.width, 
            returnBounds.height -= this.style.cellPadding.bottom + this.style.cellPadding.top, 
            returnBounds.height -= this.cellStyle.borders.top.width + this.cellStyle.borders.bottom.width, 
            1 === this.rowSpan && (returnBounds.width -= this.style.borders.left.width)), returnBounds;
        }, PdfGridCell.prototype.draw = function(graphics, bounds, cancelSubsequentSpans) {
            var result = null;
            if (this.internalIsCellMergeContinue || this.internalIsRowMergeContinue) {
                if (!this.internalIsCellMergeContinue || !this.row.grid.style.allowHorizontalOverflow) return result;
                if (this.row.rowOverflowIndex > 0 && this.row.cells.indexOf(this) != this.row.rowOverflowIndex + 1 || 0 == this.row.rowOverflowIndex && this.internalIsCellMergeContinue) return result;
            }
            bounds = this.adjustOuterLayoutArea(bounds, graphics);
            var textPen = this.getTextPen(), textBrush = this.getTextBrush();
            void 0 === textPen && void 0 === textBrush && (textBrush = new PdfSolidBrush(new PdfColor(0, 0, 0)));
            var font = this.getTextFont(), strFormat = this.getStringFormat(), innerLayoutArea = this.adjustContentLayoutArea(bounds);
            if (this.drawCellBackground(graphics, bounds), "string" == typeof this.objectValue || "string" == typeof this.remaining) {
                var temp = void 0;
                temp = "" === this.remaining ? this.remaining : this.objectValue, graphics.drawString(temp, font, textPen, textBrush, innerLayoutArea.x, innerLayoutArea.y, innerLayoutArea.width, innerLayoutArea.height, strFormat), 
                result = graphics.stringLayoutResult;
            } else if (this.objectValue instanceof PdfImage || this.objectValue instanceof PdfBitmap) {
                var imageBounds = void 0;
                imageBounds = this.objectValue.width <= innerLayoutArea.width ? new RectangleF(innerLayoutArea.x, innerLayoutArea.y, this.objectValue.width, innerLayoutArea.height) : innerLayoutArea, 
                graphics.drawImage(this.objectValue, imageBounds.x, imageBounds.y, imageBounds.width, imageBounds.height);
            } else this.objectValue instanceof PdfTextWebLink && this.objectValue.draw(graphics.currentPage, innerLayoutArea);
            return null != this.style.borders && this.drawCellBorders(graphics, bounds), result;
        }, PdfGridCell.prototype.drawCellBorders = function(graphics, bounds) {
            this.row.grid.style.borderOverlapStyle === PdfBorderOverlapStyle.Inside && (bounds.x += this.style.borders.left.width, 
            bounds.y += this.style.borders.top.width, bounds.width -= this.style.borders.right.width, 
            bounds.height -= this.style.borders.bottom.width);
            var p1 = new PointF(bounds.x, bounds.y + bounds.height), p2 = new PointF(bounds.x, bounds.y), pen = this.cellStyle.borders.left;
            this.cellStyle.borders.left.dashStyle === PdfDashStyle.Solid && (pen.lineCap = PdfLineCap.Square), 
            graphics.drawLine(pen, p1, p2), p1 = new PointF(bounds.x + bounds.width, bounds.y), 
            p2 = new PointF(bounds.x + bounds.width, bounds.y + bounds.height), pen = this.cellStyle.borders.right, 
            bounds.x + bounds.width > graphics.clientSize.width - pen.width / 2 && (p1 = new PointF(graphics.clientSize.width - pen.width / 2, bounds.y), 
            p2 = new PointF(graphics.clientSize.width - pen.width / 2, bounds.y + bounds.height)), 
            this.cellStyle.borders.right.dashStyle === PdfDashStyle.Solid && (pen.lineCap = PdfLineCap.Square), 
            graphics.drawLine(pen, p1, p2), p1 = new PointF(bounds.x, bounds.y), p2 = new PointF(bounds.x + bounds.width, bounds.y), 
            pen = this.cellStyle.borders.top, this.cellStyle.borders.top.dashStyle === PdfDashStyle.Solid && (pen.lineCap = PdfLineCap.Square), 
            graphics.drawLine(pen, p1, p2), p1 = new PointF(bounds.x + bounds.width, bounds.y + bounds.height), 
            p2 = new PointF(bounds.x, bounds.y + bounds.height), pen = this.cellStyle.borders.bottom, 
            this.cellStyle.borders.bottom.dashStyle === PdfDashStyle.Solid && (pen.lineCap = PdfLineCap.Square), 
            graphics.drawLine(pen, p1, p2);
        }, PdfGridCell.prototype.adjustOuterLayoutArea = function(bounds, g) {
            var isHeader = !1, cellSpacing = this.row.grid.style.cellSpacing;
            cellSpacing > 0 && (bounds = new RectangleF(bounds.x + cellSpacing, bounds.y + cellSpacing, bounds.width - cellSpacing, bounds.height - cellSpacing));
            var currentColIndex = this.row.cells.indexOf(this);
            if (this.columnSpan > 1) {
                for (var span = this.columnSpan, totalWidth = 0, i = currentColIndex; i < currentColIndex + span; i++) {
                    if (this.row.grid.style.allowHorizontalOverflow) {
                        var compWidth = this.row.grid.size.width < g.clientSize.width ? this.row.grid.size.width : g.clientSize.width;
                        if ((this.row.grid.size.width > g.clientSize.width ? bounds.x + totalWidth + this.row.grid.columns.getColumn(i).width : totalWidth + this.row.grid.columns.getColumn(i).width) > compWidth) break;
                    }
                    totalWidth += this.row.grid.columns.getColumn(i).width;
                }
                totalWidth -= this.row.grid.style.cellSpacing, bounds.width = totalWidth;
            }
            if (this.rowSpan > 1 || this.row.rowSpanExists) {
                span = this.rowSpan;
                var currentRowIndex = this.row.grid.rows.rowCollection.indexOf(this.row);
                -1 == currentRowIndex && -1 != (currentRowIndex = this.row.grid.headers.indexOf(this.row)) && (isHeader = !0);
                var totalHeight = 0;
                for (i = currentRowIndex; i < currentRowIndex + span; i++) {
                    totalHeight += isHeader ? this.row.grid.headers.getHeader(i).height : this.row.grid.rows.getRow(i).height;
                    var row = this.row.grid.rows.getRow(i);
                    this.row.grid.rows.rowCollection.indexOf(row);
                }
                this.row.cells.indexOf(this);
                totalHeight -= this.row.grid.style.cellSpacing, bounds.height = totalHeight, this.row.rowMergeComplete || (bounds.height = totalHeight);
            }
            return bounds;
        }, PdfGridCell.prototype.getTextFont = function() {
            return void 0 !== this.style.font && null != this.style.font ? this.style.font : void 0 !== this.row.style.font && null != this.row.style.font ? this.row.style.font : void 0 !== this.row.grid.style.font && null != this.row.grid.style.font ? this.row.grid.style.font : PdfDocument.defaultFont;
        }, PdfGridCell.prototype.getTextBrush = function() {
            return void 0 !== this.style.textBrush && null != this.style.textBrush ? this.style.textBrush : void 0 !== this.row.style.textBrush && null != this.row.style.textBrush ? this.row.style.textBrush : this.row.grid.style.textBrush;
        }, PdfGridCell.prototype.getTextPen = function() {
            return void 0 !== this.style.textPen && null != this.style.textPen ? this.style.textPen : void 0 !== this.row.style.textPen && null != this.row.style.textPen ? this.row.style.textPen : this.row.grid.style.textPen;
        }, PdfGridCell.prototype.getBackgroundBrush = function() {
            return void 0 !== this.style.backgroundBrush && null != this.style.backgroundBrush ? this.style.backgroundBrush : void 0 !== this.row.style.backgroundBrush && null != this.row.style.backgroundBrush ? this.row.style.backgroundBrush : this.row.grid.style.backgroundBrush;
        }, PdfGridCell.prototype.getStringFormat = function() {
            return void 0 !== this.style.stringFormat && null != this.style.stringFormat ? this.style.stringFormat : this.stringFormat;
        }, PdfGridCell.prototype.measureHeight = function() {
            var width = this.calculateWidth();
            null == this.style.cellPadding || void 0 === this.style.cellPadding ? (width -= this.gridRow.grid.style.cellPadding.right + this.gridRow.grid.style.cellPadding.left, 
            width -= this.style.borders.left.width + this.style.borders.right.width) : (width -= this.style.cellPadding.right + this.style.cellPadding.left, 
            width -= this.style.borders.left.width + this.style.borders.right.width);
            var height = 0, layouter = new PdfStringLayouter();
            if ("string" == typeof this.objectValue || "string" == typeof this.remainingString) {
                var currentValue = this.objectValue;
                height += layouter.layout(currentValue, this.getTextFont(), this.stringFormat, new SizeF(width, 0), !1, new SizeF(0, 0)).actualSize.height;
            } else if (this.objectValue instanceof PdfImage || this.objectValue instanceof PdfBitmap) height += this.objectValue.height; else if (this.objectValue instanceof PdfTextWebLink) {
                var webLink = this.objectValue;
                height += layouter.layout(webLink.text, webLink.font, webLink.stringFormat, new SizeF(width, 0), !1, new SizeF(0, 0)).actualSize.height;
            }
            return height += 2 * (this.style.borders.top.width + this.style.borders.bottom.width), 
            null == this.style.cellPadding || void 0 === this.style.cellPadding ? height += this.row.grid.style.cellPadding.top + this.row.grid.style.cellPadding.bottom : height += this.style.cellPadding.top + this.style.cellPadding.bottom, 
            height += this.row.grid.style.cellSpacing;
        }, PdfGridCell.prototype.calculateWidth = function() {
            for (var cellIndex = this.row.cells.indexOf(this), columnSpan = this.columnSpan, width = 0, i = 0; i < columnSpan; i++) width += this.row.grid.columns.getColumn(cellIndex + i).width;
            return width;
        }, PdfGridCell;
    }(), PdfGridCellCollection = function() {
        function PdfGridCellCollection(row) {
            this.cells = [], this.gridRow = row;
        }
        return PdfGridCellCollection.prototype.getCell = function(index) {
            if (index < 0 || index >= this.count) throw new Error("IndexOutOfRangeException");
            return this.cells[index];
        }, Object.defineProperty(PdfGridCellCollection.prototype, "count", {
            get: function() {
                return this.cells.length;
            },
            enumerable: !0,
            configurable: !0
        }), PdfGridCellCollection.prototype.add = function(cell) {
            if (void 0 === cell) {
                var tempcell = new PdfGridCell();
                return this.add(tempcell), cell;
            }
            cell.row = this.gridRow, this.cells.push(cell);
        }, PdfGridCellCollection.prototype.indexOf = function(cell) {
            return this.cells.indexOf(cell);
        }, PdfGridCellCollection;
    }(), PdfGridColumn = function() {
        function PdfGridColumn(grid) {
            this.columnWidth = 0, this.grid = grid;
        }
        return Object.defineProperty(PdfGridColumn.prototype, "width", {
            get: function() {
                return this.columnWidth;
            },
            set: function(value) {
                this.isCustomWidth = !0, this.columnWidth = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGridColumn.prototype, "format", {
            get: function() {
                return null == this.stringFormat && (this.stringFormat = new PdfStringFormat()), 
                this.stringFormat;
            },
            set: function(value) {
                this.stringFormat = value;
            },
            enumerable: !0,
            configurable: !0
        }), PdfGridColumn;
    }(), PdfGridColumnCollection = function() {
        function PdfGridColumnCollection(grid) {
            this.internalColumns = [], this.columnWidth = 0, this.grid = grid, this.internalColumns = [];
        }
        return PdfGridColumnCollection.prototype.add = function(count) {
            for (var i = 0; i < count; i++) {
                this.internalColumns.push(new PdfGridColumn(this.grid));
                for (var index = 0; index < this.grid.rows.count; index++) {
                    var row = this.grid.rows.getRow(index), cell = new PdfGridCell();
                    cell.value = "", row.cells.add(cell);
                }
            }
        }, Object.defineProperty(PdfGridColumnCollection.prototype, "count", {
            get: function() {
                return this.internalColumns.length;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGridColumnCollection.prototype, "width", {
            get: function() {
                return 0 === this.columnWidth && (this.columnWidth = this.measureColumnsWidth()), 
                0 === this.grid.initialWidth || this.columnWidth === this.grid.initialWidth || this.grid.style.allowHorizontalOverflow || (this.columnWidth = this.grid.initialWidth, 
                this.grid.isPageWidth = !0), this.columnWidth;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGridColumnCollection.prototype, "columns", {
            get: function() {
                return this.internalColumns;
            },
            enumerable: !0,
            configurable: !0
        }), PdfGridColumnCollection.prototype.getColumn = function(index) {
            if (index >= 0 && index <= this.columns.length) return this.columns[index];
            throw Error("can not get the column from the index: " + index);
        }, PdfGridColumnCollection.prototype.measureColumnsWidth = function() {
            for (var totalWidth = 0, i = 0, count = this.internalColumns.length; i < count; i++) totalWidth += this.internalColumns[i].width;
            return totalWidth;
        }, PdfGridColumnCollection.prototype.getDefaultWidths = function(totalWidth) {
            for (var widths = [], subFactor = this.count, i = 0; i < this.count; i++) this.grid.isPageWidth && totalWidth >= 0 && !this.internalColumns[i].isCustomWidth ? this.internalColumns[i].width = 0 : (widths[i] = this.internalColumns[i].width, 
            this.internalColumns[i].width > 0 && this.internalColumns[i].isCustomWidth ? (totalWidth -= this.internalColumns[i].width, 
            subFactor--) : widths[i] = 0);
            for (i = 0; i < this.count; i++) {
                var width = totalWidth / subFactor;
                widths[i] <= 0 && (widths[i] = width);
            }
            return widths;
        }, PdfGridColumnCollection;
    }(), PdfGridRow = function() {
        function PdfGridRow(grid) {
            this.gridRowOverflowIndex = 0, this.isRowHeightSet = !1, this.isRowMergeComplete = !0, 
            this.pdfGrid = grid;
        }
        return Object.defineProperty(PdfGridRow.prototype, "rowSpanExists", {
            get: function() {
                return this.bRowSpanExists;
            },
            set: function(value) {
                this.bRowSpanExists = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGridRow.prototype, "cells", {
            get: function() {
                return null == this.gridCells && (this.gridCells = new PdfGridCellCollection(this)), 
                this.gridCells;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGridRow.prototype, "grid", {
            get: function() {
                return this.pdfGrid;
            },
            set: function(value) {
                this.pdfGrid = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGridRow.prototype, "style", {
            get: function() {
                return void 0 === this.rowStyle && (this.rowStyle = new PdfGridRowStyle(), this.rowStyle.setParent(this)), 
                this.rowStyle;
            },
            set: function(value) {
                this.rowStyle = value;
                for (var i = 0; i < this.cells.count; i++) this.cells.getCell(i).style.borders = value.border, 
                void 0 !== value.font && (this.cells.getCell(i).style.font = value.font), void 0 !== value.backgroundBrush && (this.cells.getCell(i).style.backgroundBrush = value.backgroundBrush), 
                void 0 !== value.textBrush && (this.cells.getCell(i).style.textBrush = value.textBrush), 
                void 0 !== value.textPen && (this.cells.getCell(i).style.textPen = value.textPen);
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGridRow.prototype, "rowBreakHeight", {
            get: function() {
                return void 0 === this.gridRowBreakHeight && (this.gridRowBreakHeight = 0), this.gridRowBreakHeight;
            },
            set: function(value) {
                this.gridRowBreakHeight = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGridRow.prototype, "rowOverflowIndex", {
            get: function() {
                return this.gridRowOverflowIndex;
            },
            set: function(value) {
                this.gridRowOverflowIndex = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGridRow.prototype, "height", {
            get: function() {
                return this.isRowHeightSet || (this.rowHeight = this.measureHeight()), this.rowHeight;
            },
            set: function(value) {
                this.rowHeight = value, this.isRowHeightSet = !0;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGridRow.prototype, "columnSpanExists", {
            get: function() {
                return this.bColumnSpanExists;
            },
            set: function(value) {
                this.bColumnSpanExists = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGridRow.prototype, "rowMergeComplete", {
            get: function() {
                return this.isRowMergeComplete;
            },
            set: function(value) {
                this.isRowMergeComplete = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGridRow.prototype, "rowIndex", {
            get: function() {
                return this.grid.rows.rowCollection.indexOf(this);
            },
            enumerable: !0,
            configurable: !0
        }), PdfGridRow.prototype.measureHeight = function() {
            var rowHeight, rowSpanRemainingHeight = 0, maxHeight = 0;
            rowHeight = this.cells.getCell(0).height;
            for (var i = 0; i < this.cells.count; i++) {
                var cell = this.cells.getCell(i);
                cell.rowSpanRemainingHeight > rowSpanRemainingHeight && (rowSpanRemainingHeight = cell.rowSpanRemainingHeight), 
                this.rowMergeComplete = !1, cell.rowSpan > 1 ? maxHeight < cell.height && (maxHeight = cell.height) : rowHeight = Math.max(rowHeight, cell.height);
            }
            return 0 === rowHeight ? rowHeight = maxHeight : rowSpanRemainingHeight > 0 && (rowHeight += rowSpanRemainingHeight), 
            rowHeight;
        }, PdfGridRow;
    }(), PdfGridRowCollection = function() {
        function PdfGridRowCollection(grid) {
            this.rows = [], this.grid = grid;
        }
        return Object.defineProperty(PdfGridRowCollection.prototype, "count", {
            get: function() {
                return this.rows.length;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGridRowCollection.prototype, "rowCollection", {
            get: function() {
                return this.rows;
            },
            enumerable: !0,
            configurable: !0
        }), PdfGridRowCollection.prototype.addRow = function(arg) {
            if (void 0 === arg) {
                var temprow = new PdfGridRow(this.grid);
                return this.addRow(temprow), temprow;
            }
            if (arg.style.setBackgroundBrush(this.grid.style.backgroundBrush), arg.style.setFont(this.grid.style.font), 
            arg.style.setTextBrush(this.grid.style.textBrush), arg.style.setTextPen(this.grid.style.textPen), 
            0 === arg.cells.count) for (var i = 0; i < this.grid.columns.count; i++) arg.cells.add(new PdfGridCell());
            this.rows.push(arg);
        }, PdfGridRowCollection.prototype.getRow = function(index) {
            return this.rows[index];
        }, PdfGridRowCollection;
    }(), PdfGridHeaderCollection = function() {
        function PdfGridHeaderCollection(grid) {
            this.rows = [], this.grid = grid, this.rows = [];
        }
        return PdfGridHeaderCollection.prototype.getHeader = function(index) {
            return this.rows[index];
        }, Object.defineProperty(PdfGridHeaderCollection.prototype, "count", {
            get: function() {
                return this.rows.length;
            },
            enumerable: !0,
            configurable: !0
        }), PdfGridHeaderCollection.prototype.add = function(arg) {
            if ("number" == typeof arg) {
                for (var row = void 0, i = 0; i < arg; i++) {
                    row = new PdfGridRow(this.grid);
                    for (var j = 0; j < this.grid.columns.count; j++) row.cells.add(new PdfGridCell());
                    this.rows.push(row);
                }
                return this.rows;
            }
            this.rows.push(arg);
        }, PdfGridHeaderCollection.prototype.indexOf = function(row) {
            return this.rows.indexOf(row);
        }, PdfGridHeaderCollection;
    }(), __extends$26$1 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), PdfGridLayoutFormat = function(_super) {
        function PdfGridLayoutFormat(baseFormat) {
            return void 0 === baseFormat ? _super.call(this) || this : _super.call(this, baseFormat) || this;
        }
        return __extends$26$1(PdfGridLayoutFormat, _super), PdfGridLayoutFormat;
    }(PdfLayoutFormat), PdfGrid = function(_super) {
        function PdfGrid() {
            var _this = _super.call(this) || this;
            return _this.gridSize = new SizeF(0, 0), _this.isRearranged = !1, _this.pageBounds = new RectangleF(), 
            _this.listOfNavigatePages = [], _this.flag = !0, _this.columnRanges = [], _this.currentLocation = new PointF(0, 0), 
            _this.breakRow = !0, _this;
        }
        return __extends$26$1(PdfGrid, _super), Object.defineProperty(PdfGrid.prototype, "raiseBeginCellDraw", {
            get: function() {
                return void 0 !== this.beginCellDraw && null !== typeof this.beginCellDraw;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGrid.prototype, "raiseEndCellDraw", {
            get: function() {
                return void 0 !== this.endCellDraw && null !== typeof this.endCellDraw;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGrid.prototype, "raiseBeginPageLayout", {
            get: function() {
                return void 0 !== this.beginPageLayout;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGrid.prototype, "raiseEndPageLayout", {
            get: function() {
                return void 0 !== this.endPageLayout;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGrid.prototype, "repeatHeader", {
            get: function() {
                return null != this.bRepeatHeader && void 0 !== this.bRepeatHeader || (this.bRepeatHeader = !1), 
                this.bRepeatHeader;
            },
            set: function(value) {
                this.bRepeatHeader = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGrid.prototype, "allowRowBreakAcrossPages", {
            get: function() {
                return this.breakRow;
            },
            set: function(value) {
                this.breakRow = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGrid.prototype, "columns", {
            get: function() {
                return null != this.gridColumns && void 0 !== this.gridColumns || (this.gridColumns = new PdfGridColumnCollection(this)), 
                this.gridColumns;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGrid.prototype, "rows", {
            get: function() {
                return null == this.gridRows && (this.gridRows = new PdfGridRowCollection(this)), 
                this.gridRows;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGrid.prototype, "headers", {
            get: function() {
                return null != this.gridHeaders && void 0 !== this.gridHeaders || (this.gridHeaders = new PdfGridHeaderCollection(this)), 
                this.gridHeaders;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGrid.prototype, "initialWidth", {
            get: function() {
                return this.gridInitialWidth;
            },
            set: function(value) {
                this.gridInitialWidth = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGrid.prototype, "style", {
            get: function() {
                return null == this.gridStyle && (this.gridStyle = new PdfGridStyle()), this.gridStyle;
            },
            set: function(value) {
                null == this.gridStyle && (this.gridStyle = value);
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGrid.prototype, "isPageWidth", {
            get: function() {
                return this.pageWidth;
            },
            set: function(value) {
                this.pageWidth = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGrid.prototype, "isChildGrid", {
            get: function() {
                return this.childGrid;
            },
            set: function(value) {
                this.childGrid = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGrid.prototype, "size", {
            get: function() {
                return 0 === this.gridSize.width && 0 === this.gridSize.height ? (this.gridSize = this.measure(), 
                this.gridSize) : this.gridSize;
            },
            set: function(value) {
                this.gridSize = value;
            },
            enumerable: !0,
            configurable: !0
        }), PdfGrid.prototype.draw = function(arg1, arg2, arg3, arg4) {
            if (arg2 instanceof PointF && void 0 === arg2.width && void 0 === arg3) return this.drawHelper(arg1, arg2.x, arg2.y);
            if ("number" == typeof arg2 && "number" == typeof arg3 && void 0 === arg4) return this.drawHelper(arg1, arg2, arg3, null);
            if (arg2 instanceof RectangleF && void 0 !== arg2.width && void 0 === arg3) return this.drawHelper(arg1, arg2, null);
            if (arg2 instanceof PointF && void 0 === arg2.width && arg3 instanceof PdfLayoutFormat) return this.drawHelper(arg1, arg2.x, arg2.y, arg3);
            if ("number" == typeof arg2 && "number" == typeof arg3 && (arg4 instanceof PdfLayoutFormat || null == arg4)) {
                var width = arg1.graphics.clientSize.width - arg2, layoutRectangle = new RectangleF(arg2, arg3, width, 0);
                return this.drawHelper(arg1, layoutRectangle, arg4);
            }
            return arg2 instanceof RectangleF && void 0 !== arg2.width && "boolean" == typeof arg3 ? this.drawHelper(arg1, arg2, null) : this.drawHelper(arg1, arg2, arg3);
        }, PdfGrid.prototype.measure = function() {
            for (var height = 0, width = this.columns.width, i = 0; i < this.headers.count; i++) {
                height += this.headers.getHeader(i).height;
            }
            for (i = 0; i < this.rows.count; i++) {
                height += this.rows.getRow(i).height;
            }
            return new SizeF(width, height);
        }, PdfGrid.prototype.layout = function(param, isGridLayouter) {
            if (void 0 === isGridLayouter) {
                this.setSpan(), this.layoutFormat = param.format, this.gridLocation = param.bounds;
                return this.layout(param, !0);
            }
            return this.layoutInternal(param);
        }, PdfGrid.prototype.setSpan = function() {
            for (var colSpan, currentCellIndex, rowSpan = 1, currentRowIndex = 0, rowCount = this.headers.count, i = 0; i < rowCount; i++) for (var row = this.headers.getHeader(i), colCount = row.cells.count, j = 0; j < colCount; j++) {
                var cell = row.cells.getCell(j);
                if (!cell.isCellMergeContinue && !cell.isRowMergeContinue && (cell.columnSpan > 1 || cell.rowSpan > 1)) {
                    if (cell.columnSpan + j > row.cells.count) throw new Error("Invalid span specified at row " + j.toString() + " column " + i.toString());
                    if (cell.rowSpan + i > this.headers.count) throw new Error("Invalid span specified at Header " + j.toString() + " column " + i.toString());
                    if (cell.columnSpan > 1 && cell.rowSpan > 1) {
                        for (colSpan = cell.columnSpan, rowSpan = cell.rowSpan, currentCellIndex = j, currentRowIndex = i, 
                        cell.isCellMergeStart = !0, cell.isRowMergeStart = !0; colSpan > 1; ) currentCellIndex++, 
                        row.cells.getCell(currentCellIndex).isCellMergeContinue = !0, row.cells.getCell(currentCellIndex).isRowMergeContinue = !0, 
                        row.cells.getCell(currentCellIndex).rowSpan = rowSpan, colSpan--;
                        for (currentCellIndex = j, colSpan = cell.columnSpan; rowSpan > 1; ) {
                            for (currentRowIndex++, this.headers.getHeader(currentRowIndex).cells.getCell(j).isRowMergeContinue = !0, 
                            this.headers.getHeader(currentRowIndex).cells.getCell(currentCellIndex).isRowMergeContinue = !0, 
                            rowSpan--; colSpan > 1; ) currentCellIndex++, this.headers.getHeader(currentRowIndex).cells.getCell(currentCellIndex).isCellMergeContinue = !0, 
                            this.headers.getHeader(currentRowIndex).cells.getCell(currentCellIndex).isRowMergeContinue = !0, 
                            colSpan--;
                            colSpan = cell.columnSpan, currentCellIndex = j;
                        }
                    } else if (cell.columnSpan > 1 && 1 === cell.rowSpan) for (colSpan = cell.columnSpan, 
                    currentCellIndex = j, cell.isCellMergeStart = !0; colSpan > 1; ) currentCellIndex++, 
                    row.cells.getCell(currentCellIndex).isCellMergeContinue = !0, colSpan--; else if (1 === cell.columnSpan && cell.rowSpan > 1) for (rowSpan = cell.rowSpan, 
                    currentRowIndex = i; rowSpan > 1; ) currentRowIndex++, this.headers.getHeader(currentRowIndex).cells.getCell(j).isRowMergeContinue = !0, 
                    rowSpan--;
                }
            }
        }, PdfGrid.prototype.getFormat = function(format) {
            return format;
        }, PdfGrid.prototype.layoutInternal = function(param) {
            this.initialWidth = param.bounds.width;
            this.getFormat(param.format);
            if (this.currentPage = param.page, null === this.currentPage) throw Error("Can not set page as null");
            this.currentPage.getClientSize().height, this.currentPage.getClientSize().width;
            this.currentPageBounds = this.currentPage.getClientSize(), this.currentGraphics = this.currentPage.graphics;
            var index = 0;
            if (index = this.currentGraphics.page.section.indexOf(this.currentGraphics.page), 
            this.listOfNavigatePages.push(index), this.currentBounds = new RectangleF(new PointF(param.bounds.x, param.bounds.y), this.currentGraphics.clientSize), 
            0 !== this.rows.count) this.currentBounds.width = param.bounds.width > 0 ? param.bounds.width : this.currentBounds.width - this.rows.getRow(0).cells.getCell(0).style.borders.left.width / 2; else {
                if (0 === this.headers.count) throw Error("Please add row or header into grid");
                this.currentBounds.width = param.bounds.width;
            }
            this.startLocation = new PointF(param.bounds.x, param.bounds.y), param.bounds.height > 0 && !this.isChildGrid && (this.currentBounds.height = param.bounds.height), 
            this.hType = this.style.horizontalOverflowType, this.style.allowHorizontalOverflow ? (this.measureColumnsWidth(), 
            this.determineColumnDrawRanges()) : (this.measureColumnsWidth(this.currentBounds), 
            this.columnRanges.push([ 0, this.columns.count - 1 ]));
            return this.layoutOnPage(param);
        }, PdfGrid.prototype.measureColumnsWidth = function(bounds) {
            if (void 0 !== bounds) for (var widths = this.columns.getDefaultWidths(bounds.width), i = (this.columns.getColumn(0).width, 
            0), count = this.columns.count; i < count; i++) this.columns.getColumn(i).width = widths[i]; else {
                widths = [];
                var cellWidth = 0;
                if (this.headers.count > 0) {
                    var colCount = this.headers.getHeader(0).cells.count, rowCount = this.headers.count;
                    for (i = 0; i < colCount; i++) {
                        cellWidth = 0;
                        for (var j = 0; j < rowCount; j++) {
                            var rowWidth = Math.min(this.initialWidth, this.headers.getHeader(j).cells.getCell(i).width);
                            cellWidth = Math.max(cellWidth, rowWidth);
                        }
                        widths[i] = cellWidth;
                    }
                } else for (colCount = this.rows.getRow(0).cells.count, rowCount = this.rows.count, 
                i = 0; i < colCount; i++) {
                    cellWidth = 0;
                    for (j = 0; j < rowCount; j++) {
                        rowWidth = Math.min(this.initialWidth, this.rows.getRow(j).cells.getCell(i).width);
                        cellWidth = Math.max(cellWidth, rowWidth);
                    }
                    widths[i] = cellWidth;
                }
                cellWidth = 0;
                for (i = 0, colCount = this.columns.count; i < colCount; i++) {
                    for (j = 0, rowCount = this.rows.count; j < rowCount; j++) if (1 == this.rows.getRow(j).cells.getCell(i).columnSpan || null !== this.rows.getRow(j).cells.getCell(i).value || this.rows.getRow(j).cells.getCell(i).rowSpan >= 1) {
                        if (null !== this.rows.getRow(j).cells.getCell(i).value && !this.rows.getRow(j).grid.style.allowHorizontalOverflow) {
                            var value = this.rows.getRow(j).grid.style.cellPadding.right + this.rows.getRow(j).grid.style.cellPadding.left + this.rows.getRow(j).cells.getCell(i).style.borders.left.width / 2 + this.gridLocation.x;
                            this.rows.getRow(j).cells.getCell(i).value.initialWidth = this.initialWidth - value;
                        }
                        rowWidth = 0;
                        var internalWidth = this.rows.getRow(j).cells.getCell(i).width;
                        internalWidth += this.rows.getRow(j).cells.getCell(i).style.borders.left.width, 
                        internalWidth += this.rows.getRow(j).cells.getCell(i).style.borders.right.width;
                        var internalHeight = this.rows.getRow(j).cells.getCell(i).height;
                        internalHeight += this.rows.getRow(j).cells.getCell(i).style.borders.top.width, 
                        internalHeight += this.rows.getRow(j).cells.getCell(i).style.borders.bottom.width;
                        var isCorrectWidth = internalWidth + this.gridLocation.x > this.currentGraphics.clientSize.width, isCorrectHeight = internalHeight + this.gridLocation.y > this.currentGraphics.clientSize.height;
                        if (isCorrectWidth || isCorrectHeight) throw Error("Image size exceeds client size of the page. Can not insert this image");
                        rowWidth = Math.min(this.initialWidth, this.rows.getRow(j).cells.getCell(i).width), 
                        cellWidth = Math.max(widths[i], Math.max(cellWidth, rowWidth)), cellWidth = Math.max(this.columns.getColumn(i).width, cellWidth);
                    }
                    widths[i] = cellWidth, cellWidth = 0;
                }
                for (i = 0, count = this.columns.count; i < count; i++) this.columns.getColumn(i).width = widths[i];
            }
        }, PdfGrid.prototype.determineColumnDrawRanges = function() {
            for (var startColumn = 0, endColumn = 0, cellWidths = 0, availableWidth = this.currentGraphics.clientSize.width - this.currentBounds.x, i = 0; i < this.columns.count; i++) if ((cellWidths += this.columns.getColumn(i).width) >= availableWidth) {
                for (var subWidths = 0, j = startColumn; j <= i && !((subWidths += this.columns.getColumn(j).width) > availableWidth); j++) endColumn = j;
                this.columnRanges.push([ startColumn, endColumn ]), cellWidths = (endColumn = startColumn = endColumn + 1) <= i ? this.columns.getColumn(i).width : 0;
            }
            this.columnRanges.push([ startColumn, this.columns.count - 1 ]);
        }, PdfGrid.prototype.layoutOnPage = function(param) {
            this.pageBounds.x = param.bounds.x, this.pageBounds.y = param.bounds.y, this.pageBounds.height = param.bounds.height;
            for (var format = this.getFormat(param.format), result = null, layoutedPages = new TemporaryDictionary(), startPage = param.page, cellBounds = [], index = 0; index < this.columnRanges.length; index++) {
                var range = this.columnRanges[index];
                this.cellStartIndex = range[0], this.cellEndIndex = range[1];
                var returnObject = this.raiseBeforePageLayout(this.currentPage, this.currentBounds, this.currentRowIndex);
                this.currentBounds = returnObject.currentBounds, this.currentRowIndex = returnObject.currentRowIndex;
                for (var i_1 = 0; i_1 < this.headers.count; i_1++) {
                    var row = this.headers.getHeader(i_1);
                    this.currentBounds.y, this.drawRow(row);
                }
                var i = 0, repeatRow = (this.rows.count, void 0);
                cellBounds = [];
                for (var j = 0; j < this.rows.count; j++) {
                    row = this.rows.getRow(j);
                    i++, this.currentRowIndex = i - 1;
                    var originalHeight = this.currentBounds.y;
                    startPage = this.currentPage, PdfGrid.repeatRowIndex = -1;
                    var rowResult = this.drawRow(row);
                    if (cellBounds.push(rowResult.bounds.width), originalHeight === this.currentBounds.y ? (repeatRow = !0, 
                    PdfGrid.repeatRowIndex = this.rows.rowCollection.indexOf(row)) : (repeatRow = !1, 
                    PdfGrid.repeatRowIndex = -1), !rowResult.isFinish && null !== startPage && format.layout !== PdfLayoutType.OnePage && repeatRow) {
                        if (this.startLocation.x = this.currentBounds.x, this.currentPage = this.getNextPage(format), 
                        null !== param.format && !param.format.usePaginateBounds && null !== param.bounds && param.bounds.height > 0 && !this.isChildGrid && (this.currentBounds.height = param.bounds.height), 
                        null !== param.format && !param.format.usePaginateBounds && null !== param.bounds && param.bounds.y > 0 && !this.isChildGrid && (this.currentBounds.y = param.bounds.y), 
                        this.startLocation.y = this.currentBounds.y, format.paginateBounds.x === format.paginateBounds.y && format.paginateBounds.y === format.paginateBounds.height && format.paginateBounds.height === format.paginateBounds.width && 0 === format.paginateBounds.width && (this.currentBounds.x += this.startLocation.x), 
                        this.currentBounds.x === PdfBorders.default.left.width / 2 && (this.currentBounds.y += this.startLocation.x), 
                        this.repeatHeader) for (var i_2 = 0; i_2 < this.headers.count; i_2++) {
                            var header = this.headers.getHeader(i_2);
                            this.drawRow(header);
                        }
                        this.drawRow(row), null === this.currentPage || layoutedPages.containsKey(this.currentPage) || layoutedPages.add(this.currentPage, range);
                    }
                }
                var maximumCellBoundsWidth = 0;
                cellBounds.length > 0 && (maximumCellBoundsWidth = cellBounds[0]);
                if (cellBounds.length > 0) {
                    for (var c = 0; c < i - 1; c++) maximumCellBoundsWidth < cellBounds[c] && (maximumCellBoundsWidth = cellBounds[c]);
                    this.rowLayoutBoundsWidth = maximumCellBoundsWidth;
                } else this.rowLayoutBoundsWidth = 0;
                this.columnRanges.length - 1 !== index && this.columnRanges.length > 1 && format.layout !== PdfLayoutType.OnePage && (this.currentPage = this.getNextPage(format), 
                format.paginateBounds.x === format.paginateBounds.y && format.paginateBounds.y === format.paginateBounds.height && format.paginateBounds.height === format.paginateBounds.width && 0 === format.paginateBounds.width && (this.currentBounds.x += this.startLocation.x, 
                this.currentBounds.y += this.startLocation.y));
            }
            return result = this.getLayoutResult(), this.style.allowHorizontalOverflow && this.style.horizontalOverflowType == PdfHorizontalOverflowType.NextPage && this.reArrangePages(layoutedPages), 
            this.raisePageLayouted(result), result;
        }, PdfGrid.prototype.getNextPage = function(format) {
            var section = this.currentPage.section, nextPage = null, index = section.indexOf(this.currentPage);
            this.flag = !1, nextPage = index === section.count - 1 ? section.add() : section.getPages()[index + 1], 
            this.currentGraphics = nextPage.graphics;
            var pageindex = this.currentGraphics.page.section.indexOf(this.currentGraphics.page);
            return -1 === this.listOfNavigatePages.indexOf(pageindex) && this.listOfNavigatePages.push(pageindex), 
            this.currentBounds = new RectangleF(new PointF(0, 0), nextPage.getClientSize()), 
            nextPage;
        }, PdfGrid.prototype.getLayoutResult = function() {
            var bounds;
            return bounds = new RectangleF(this.startLocation, new SizeF(this.currentBounds.width, this.currentBounds.y - this.startLocation.y)), 
            new PdfGridLayoutResult(this.currentPage, bounds);
        }, PdfGrid.prototype.ReCalculateHeight = function(row, height) {
            return Math.max(height, 0);
        }, PdfGrid.prototype.raiseBeforePageLayout = function(currentPage, currentBounds, currentRow) {
            var cancel = !1;
            if (this.raiseBeginPageLayout) {
                var args = new PdfGridBeginPageLayoutEventArgs(currentBounds, currentPage, currentRow);
                this.beginPageLayout(this, args), cancel = args.cancel, currentBounds = args.bounds, 
                currentRow = args.startRowIndex;
            }
            return {
                returnValue: cancel,
                currentBounds: currentBounds,
                currentRowIndex: currentRow
            };
        }, PdfGrid.prototype.raisePageLayouted = function(result) {
            var args = new PdfGridEndPageLayoutEventArgs(result);
            return this.raiseEndPageLayout && this.endPageLayout(this, args), args;
        }, PdfGrid.prototype.drawRow = function(row, result, height) {
            if (void 0 === result) {
                var result_1 = new RowLayoutResult(), rowHeightWithSpan = 0, size = new SizeF(0, 0), isHeader = !1;
                if (row.rowSpanExists) {
                    var maxSpan = 0, currRowIndex = this.rows.rowCollection.indexOf(row);
                    -1 === currRowIndex && -1 !== (currRowIndex = this.headers.indexOf(row)) && (isHeader = !0);
                    for (var i = 0; i < row.cells.count; i++) {
                        var cell = row.cells.getCell(i);
                        maxSpan = Math.max(maxSpan, cell.rowSpan);
                    }
                    for (i = currRowIndex; i < currRowIndex + maxSpan; i++) rowHeightWithSpan += isHeader ? this.headers.getHeader(i).height : this.rows.getRow(i).height;
                    var rowMaxHeight = rowHeightWithSpan;
                    for (i = 0; i < row.cells.count; i++) rowMaxHeight = rowMaxHeight > row.cells.getCell(i).height ? rowMaxHeight : row.cells.getCell(i).height;
                    var nextRow = this.headers.getHeader(this.headers.indexOf(row) + 1), flag = !0;
                    for (i = 0; i < nextRow.cells.count; i++) if ("" !== nextRow.cells.getCell(i).value && void 0 !== nextRow.cells.getCell(i).value) {
                        flag = !1;
                        break;
                    }
                    rowMaxHeight > rowHeightWithSpan && flag && (row.height += rowMaxHeight - rowHeightWithSpan);
                }
                var calculatedHeight = row.rowBreakHeight > 0 ? row.rowBreakHeight : row.height;
                return this.currentBounds.y + calculatedHeight > this.currentPageBounds.height || this.currentBounds.y + calculatedHeight > this.currentBounds.height + this.startLocation.y || this.currentBounds.y + rowHeightWithSpan > this.currentPageBounds.height ? result_1.isFinish = !1 : (result_1.isFinish = !0, 
                this.drawRow(row, result_1, calculatedHeight)), result_1;
            }
            var location_2 = new PointF(this.currentBounds.x, this.currentBounds.y);
            result.bounds = new RectangleF(location_2, new SizeF(0, 0)), height = this.ReCalculateHeight(row, height);
            for (i = this.cellStartIndex; i <= this.cellEndIndex; i++) {
                var cancelSpans = i > this.cellEndIndex + 1 && row.cells.getCell(i).columnSpan > 1;
                if (!cancelSpans) for (var j = 1; j < row.cells.getCell(i).columnSpan; j++) row.cells.getCell(i + j).isCellMergeContinue = !0;
                size = new SizeF(this.columns.getColumn(i).width, height);
                !this.CheckIfDefaultFormat(this.columns.getColumn(i).format) && this.CheckIfDefaultFormat(row.cells.getCell(i).stringFormat) && (row.cells.getCell(i).stringFormat = this.columns.getColumn(i).format);
                var cellstyle = row.cells.getCell(i).style, tempValue = "string" == typeof row.cells.getCell(i).value && null !== row.cells.getCell(i).value ? row.cells.getCell(i).value : "";
                row.cells.getCell(i).style = this.RaiseBeforeCellDraw(this.currentGraphics, this.currentRowIndex, i, new RectangleF(location_2, size), tempValue, cellstyle);
                var stringResult = row.cells.getCell(i).draw(this.currentGraphics, new RectangleF(location_2, size), cancelSpans);
                row.grid.style.allowHorizontalOverflow && (row.cells.getCell(i).columnSpan > this.cellEndIndex || i + row.cells.getCell(i).columnSpan > this.cellEndIndex + 1) && this.cellEndIndex < row.cells.count - 1 && (row.rowOverflowIndex = this.cellEndIndex), 
                row.grid.style.allowHorizontalOverflow && row.rowOverflowIndex > 0 && (row.cells.getCell(i).columnSpan > this.cellEndIndex || i + row.cells.getCell(i).columnSpan > this.cellEndIndex + 1) && row.cells.getCell(i).columnSpan - this.cellEndIndex + i - 1 > 0 && (row.cells.getCell(row.rowOverflowIndex + 1).value = null !== stringResult && void 0 !== stringResult.remainder ? stringResult.remainder : "", 
                row.cells.getCell(row.rowOverflowIndex + 1).stringFormat = row.cells.getCell(i).stringFormat, 
                row.cells.getCell(row.rowOverflowIndex + 1).style = row.cells.getCell(i).style, 
                row.cells.getCell(row.rowOverflowIndex + 1).columnSpan = row.cells.getCell(i).columnSpan - this.cellEndIndex + i - 1), 
                tempValue = "string" == typeof row.cells.getCell(i).value && null !== row.cells.getCell(i).value ? row.cells.getCell(i).value : "", 
                this.RaiseAfterCellDraw(this.currentGraphics, this.currentRowIndex, i, new RectangleF(location_2, size), tempValue, row.cells.getCell(i).style), 
                location_2.x += this.columns.getColumn(i).width;
            }
            this.currentBounds.y += height, result.bounds = new RectangleF(new PointF(result.bounds.x, result.bounds.y), new SizeF(location_2.x, location_2.y));
        }, PdfGrid.prototype.CheckIfDefaultFormat = function(format) {
            var defaultFormat = new PdfStringFormat();
            return format.alignment === defaultFormat.alignment && format.characterSpacing === defaultFormat.characterSpacing && format.clipPath === defaultFormat.clipPath && format.firstLineIndent === defaultFormat.firstLineIndent && format.horizontalScalingFactor === defaultFormat.horizontalScalingFactor && format.lineAlignment === defaultFormat.lineAlignment && format.lineLimit === defaultFormat.lineLimit && format.lineSpacing === defaultFormat.lineSpacing && format.measureTrailingSpaces === defaultFormat.measureTrailingSpaces && format.noClip === defaultFormat.noClip && format.paragraphIndent === defaultFormat.paragraphIndent && format.rightToLeft === defaultFormat.rightToLeft && format.subSuperScript === defaultFormat.subSuperScript && format.wordSpacing === defaultFormat.wordSpacing && format.wordWrap === defaultFormat.wordWrap;
        }, PdfGrid.prototype.RaiseBeforeCellDraw = function(graphics, rowIndex, cellIndex, bounds, value, style) {
            var args = null;
            return this.raiseBeginCellDraw && (args = new PdfGridBeginCellDrawEventArgs(graphics, rowIndex, cellIndex, bounds, value, style), 
            this.beginCellDraw(this, args), style = args.style), style;
        }, PdfGrid.prototype.RaiseAfterCellDraw = function(graphics, rowIndex, cellIndex, bounds, value, cellstyle) {
            var args = null;
            this.raiseEndCellDraw && (args = new PdfGridEndCellDrawEventArgs(graphics, rowIndex, cellIndex, bounds, value, cellstyle), 
            this.endCellDraw(this, args));
        }, PdfGrid.prototype.reArrangePages = function(layoutedPages) {
            for (var document = this.currentPage.document, pages = [], keys = layoutedPages.keys(), i = (layoutedPages.values(), 
            0); i < keys.length; i++) {
                (page = keys[i]).section = null, pages.push(page), document.pages.remove(page);
            }
            for (i = 0; i < layoutedPages.size(); i++) for (var j = i, count_1 = layoutedPages.size() / this.columnRanges.length; j < layoutedPages.size(); j += count_1) {
                var page = pages[j];
                -1 === document.pages.indexOf(page) && document.pages.add(page);
            }
        }, PdfGrid.repeatRowIndex = -1, PdfGrid;
    }(PdfLayoutElement), GridCellEventArgs = function() {
        function GridCellEventArgs(graphics, rowIndex, cellIndex, bounds, value) {
            this.gridRowIndex = rowIndex, this.gridCellIndex = cellIndex, this.internalValue = value, 
            this.gridBounds = bounds, this.pdfGraphics = graphics;
        }
        return Object.defineProperty(GridCellEventArgs.prototype, "rowIndex", {
            get: function() {
                return this.gridRowIndex;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(GridCellEventArgs.prototype, "cellIndex", {
            get: function() {
                return this.gridCellIndex;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(GridCellEventArgs.prototype, "value", {
            get: function() {
                return this.internalValue;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(GridCellEventArgs.prototype, "bounds", {
            get: function() {
                return this.gridBounds;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(GridCellEventArgs.prototype, "graphics", {
            get: function() {
                return this.pdfGraphics;
            },
            enumerable: !0,
            configurable: !0
        }), GridCellEventArgs;
    }(), PdfGridBeginCellDrawEventArgs = function(_super) {
        function PdfGridBeginCellDrawEventArgs(graphics, rowIndex, cellIndex, bounds, value, style) {
            var _this = _super.call(this, graphics, rowIndex, cellIndex, bounds, value) || this;
            return _this.style = style, _this;
        }
        return __extends$26$1(PdfGridBeginCellDrawEventArgs, _super), Object.defineProperty(PdfGridBeginCellDrawEventArgs.prototype, "skip", {
            get: function() {
                return this.bSkip;
            },
            set: function(value) {
                this.bSkip = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(PdfGridBeginCellDrawEventArgs.prototype, "style", {
            get: function() {
                return this.cellStyle;
            },
            set: function(value) {
                this.cellStyle = value;
            },
            enumerable: !0,
            configurable: !0
        }), PdfGridBeginCellDrawEventArgs;
    }(GridCellEventArgs), PdfGridEndCellDrawEventArgs = function(_super) {
        function PdfGridEndCellDrawEventArgs(graphics, rowIndex, cellIndex, bounds, value, style) {
            var _this = _super.call(this, graphics, rowIndex, cellIndex, bounds, value) || this;
            return _this.cellStyle = style, _this;
        }
        return __extends$26$1(PdfGridEndCellDrawEventArgs, _super), Object.defineProperty(PdfGridEndCellDrawEventArgs.prototype, "style", {
            get: function() {
                return this.cellStyle;
            },
            enumerable: !0,
            configurable: !0
        }), PdfGridEndCellDrawEventArgs;
    }(GridCellEventArgs), PdfCancelEventArgs = function() {
        function PdfCancelEventArgs() {}
        return Object.defineProperty(PdfCancelEventArgs.prototype, "cancel", {
            get: function() {
                return this.isCancel;
            },
            set: function(value) {
                this.isCancel = value;
            },
            enumerable: !0,
            configurable: !0
        }), PdfCancelEventArgs;
    }(), BeginPageLayoutEventArgs = function(_super) {
        function BeginPageLayoutEventArgs(bounds, page) {
            var _this = _super.call(this) || this;
            return _this.bounds = bounds, _this.pdfPage = page, _this;
        }
        return __extends$26$1(BeginPageLayoutEventArgs, _super), Object.defineProperty(BeginPageLayoutEventArgs.prototype, "bounds", {
            get: function() {
                return this.cellBounds;
            },
            set: function(value) {
                this.cellBounds = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(BeginPageLayoutEventArgs.prototype, "page", {
            get: function() {
                return this.pdfPage;
            },
            enumerable: !0,
            configurable: !0
        }), BeginPageLayoutEventArgs;
    }(PdfCancelEventArgs), EndPageLayoutEventArgs = function(_super) {
        function EndPageLayoutEventArgs(result) {
            var _this = _super.call(this) || this;
            return _this.layoutResult = result, _this;
        }
        return __extends$26$1(EndPageLayoutEventArgs, _super), Object.defineProperty(EndPageLayoutEventArgs.prototype, "result", {
            get: function() {
                return this.layoutResult;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(EndPageLayoutEventArgs.prototype, "nextPage", {
            get: function() {
                return this.nextPdfPage;
            },
            set: function(value) {
                this.nextPdfPage = value;
            },
            enumerable: !0,
            configurable: !0
        }), EndPageLayoutEventArgs;
    }(PdfCancelEventArgs), PdfGridBeginPageLayoutEventArgs = function(_super) {
        function PdfGridBeginPageLayoutEventArgs(bounds, page, startRow) {
            var _this = _super.call(this, bounds, page) || this;
            return _this.startRow = startRow, _this;
        }
        return __extends$26$1(PdfGridBeginPageLayoutEventArgs, _super), Object.defineProperty(PdfGridBeginPageLayoutEventArgs.prototype, "startRowIndex", {
            get: function() {
                return this.startRow;
            },
            enumerable: !0,
            configurable: !0
        }), PdfGridBeginPageLayoutEventArgs;
    }(BeginPageLayoutEventArgs), PdfGridEndPageLayoutEventArgs = function(_super) {
        function PdfGridEndPageLayoutEventArgs(result) {
            return _super.call(this, result) || this;
        }
        return __extends$26$1(PdfGridEndPageLayoutEventArgs, _super), PdfGridEndPageLayoutEventArgs;
    }(EndPageLayoutEventArgs), RowLayoutResult = function() {
        function RowLayoutResult() {
            this.layoutedBounds = new RectangleF(0, 0, 0, 0);
        }
        return Object.defineProperty(RowLayoutResult.prototype, "isFinish", {
            get: function() {
                return this.bIsFinished;
            },
            set: function(value) {
                this.bIsFinished = value;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(RowLayoutResult.prototype, "bounds", {
            get: function() {
                return this.layoutedBounds;
            },
            set: function(value) {
                this.layoutedBounds = value;
            },
            enumerable: !0,
            configurable: !0
        }), RowLayoutResult;
    }(), PdfGridLayoutResult = function(_super) {
        function PdfGridLayoutResult(page, bounds) {
            return _super.call(this, page, bounds) || this;
        }
        return __extends$26$1(PdfGridLayoutResult, _super), PdfGridLayoutResult;
    }(PdfLayoutResult), _pdfexport = Object.freeze({
        PdfAction: PdfAction,
        PdfUriAction: PdfUriAction,
        PdfActionLinkAnnotation: PdfActionLinkAnnotation,
        PdfAnnotation: PdfAnnotation,
        PdfAnnotationCollection: PdfAnnotationCollection,
        PdfDocumentLinkAnnotation: PdfDocumentLinkAnnotation,
        PdfLinkAnnotation: PdfLinkAnnotation,
        PdfTextWebLink: PdfTextWebLink,
        PdfUriAnnotation: PdfUriAnnotation,
        Dictionary: Dictionary,
        defaultToString: defaultToString,
        PdfCatalog: PdfCatalog,
        PdfDocument: PdfDocument,
        PdfDocumentBase: PdfDocumentBase,
        PdfDocumentTemplate: PdfDocumentTemplate,
        PdfPageNumberField: PdfPageNumberField,
        PdfCompositeField: PdfCompositeField,
        PdfPageCountField: PdfPageCountField,
        PointF: PointF,
        SizeF: SizeF,
        RectangleF: RectangleF,
        PdfCacheCollection: PdfCacheCollection,
        PdfCollection: PdfCollection,
        PdfDestination: PdfDestination,
        get PdfDestinationMode() {
            return PdfDestinationMode;
        },
        ProcedureSets: ProcedureSets,
        get PdfHorizontalAlignment() {
            return PdfHorizontalAlignment;
        },
        get PdfVerticalAlignment() {
            return PdfVerticalAlignment;
        },
        get PdfTextAlignment() {
            return PdfTextAlignment;
        },
        get TextRenderingMode() {
            return TextRenderingMode;
        },
        get PdfLineJoin() {
            return PdfLineJoin;
        },
        get PdfLineCap() {
            return PdfLineCap;
        },
        get PdfDashStyle() {
            return PdfDashStyle;
        },
        get PdfFillMode() {
            return PdfFillMode;
        },
        get PdfColorSpace() {
            return PdfColorSpace;
        },
        get PdfBlendMode() {
            return PdfBlendMode;
        },
        get PdfGraphicsUnit() {
            return PdfGraphicsUnit;
        },
        get PdfGridImagePosition() {
            return PdfGridImagePosition;
        },
        PdfColor: PdfColor,
        PdfGraphics: PdfGraphics,
        GetResourceEventHandler: GetResourceEventHandler,
        PdfGraphicsState: PdfGraphicsState,
        PdfMargins: PdfMargins,
        PdfPen: PdfPen,
        PdfResources: PdfResources,
        Guid: Guid,
        PdfTransformationMatrix: PdfTransformationMatrix,
        Matrix: Matrix,
        PdfBrush: PdfBrush,
        PdfSolidBrush: PdfSolidBrush,
        PdfTemplate: PdfTemplate,
        PdfLayoutElement: PdfLayoutElement,
        PdfTextElement: PdfTextElement,
        ElementLayouter: ElementLayouter,
        PdfLayoutFormat: PdfLayoutFormat,
        PdfLayoutParams: PdfLayoutParams,
        PdfLayoutResult: PdfLayoutResult,
        TextLayouter: TextLayouter,
        TextPageLayoutResult: TextPageLayoutResult,
        PdfTextLayoutResult: PdfTextLayoutResult,
        get PdfLayoutType() {
            return PdfLayoutType;
        },
        get PdfLayoutBreakType() {
            return PdfLayoutBreakType;
        },
        get PdfFontStyle() {
            return PdfFontStyle;
        },
        get PdfFontFamily() {
            return PdfFontFamily;
        },
        get PdfFontType() {
            return PdfFontType;
        },
        get PdfWordWrapType() {
            return PdfWordWrapType;
        },
        get PdfSubSuperScript() {
            return PdfSubSuperScript;
        },
        get FontEncoding() {
            return FontEncoding;
        },
        PdfFont: PdfFont,
        PdfFontMetrics: PdfFontMetrics,
        WidthTable: WidthTable,
        StandardWidthTable: StandardWidthTable,
        PdfStandardFont: PdfStandardFont,
        PdfStandardFontMetricsFactory: PdfStandardFontMetricsFactory,
        PdfStringFormat: PdfStringFormat,
        PdfStringLayouter: PdfStringLayouter,
        PdfStringLayoutResult: PdfStringLayoutResult,
        LineInfo: LineInfo,
        get LineType() {
            return LineType;
        },
        StringTokenizer: StringTokenizer,
        ByteArray: ByteArray,
        get ImageFormat() {
            return ImageFormat;
        },
        ImageDecoder: ImageDecoder,
        PdfBitmap: PdfBitmap,
        PdfImage: PdfImage,
        PdfTransparency: PdfTransparency,
        get ObjectStatus() {
            return ObjectStatus;
        },
        get ObjectType() {
            return ObjectType;
        },
        PdfCrossTable: PdfCrossTable,
        RegisteredObject: RegisteredObject,
        DictionaryProperties: DictionaryProperties,
        PdfMainObjectCollection: PdfMainObjectCollection,
        ObjectInfo: ObjectInfo,
        Operators: Operators,
        PdfStreamWriter: PdfStreamWriter,
        PdfWriter: PdfWriter,
        get PdfPageOrientation() {
            return PdfPageOrientation;
        },
        get PdfPageRotateAngle() {
            return PdfPageRotateAngle;
        },
        get PdfNumberStyle() {
            return PdfNumberStyle;
        },
        get PdfDockStyle() {
            return PdfDockStyle;
        },
        get PdfAlignmentStyle() {
            return PdfAlignmentStyle;
        },
        get TemplateType() {
            return TemplateType;
        },
        PageAddedEventArgs: PageAddedEventArgs,
        PdfDocumentPageCollection: PdfDocumentPageCollection,
        PdfPage: PdfPage,
        PdfPageBase: PdfPageBase,
        PdfPageLayer: PdfPageLayer,
        PdfPageLayerCollection: PdfPageLayerCollection,
        PdfPageSettings: PdfPageSettings,
        PdfPageSize: PdfPageSize,
        PdfPageTemplateElement: PdfPageTemplateElement,
        PdfSection: PdfSection,
        PageSettingsState: PageSettingsState,
        PdfSectionCollection: PdfSectionCollection,
        PdfSectionPageCollection: PdfSectionPageCollection,
        PdfSectionTemplate: PdfSectionTemplate,
        PdfArray: PdfArray,
        PdfDictionary: PdfDictionary,
        SaveSectionCollectionEventHandler: SaveSectionCollectionEventHandler,
        SaveAnnotationEventHandler: SaveAnnotationEventHandler,
        SaveSectionEventHandler: SaveSectionEventHandler,
        SaveTemplateEventHandler: SaveTemplateEventHandler,
        PdfName: PdfName,
        PdfNumber: PdfNumber,
        PdfReference: PdfReference,
        PdfReferenceHolder: PdfReferenceHolder,
        PdfStream: PdfStream,
        get InternalEnum() {
            return InternalEnum;
        },
        PdfString: PdfString,
        PdfGridStyleBase: PdfGridStyleBase,
        PdfGridStyle: PdfGridStyle,
        PdfGridCellStyle: PdfGridCellStyle,
        PdfGridRowStyle: PdfGridRowStyle,
        get PdfHorizontalOverflowType() {
            return PdfHorizontalOverflowType;
        },
        PdfBorders: PdfBorders,
        PdfPaddings: PdfPaddings,
        get PdfBorderOverlapStyle() {
            return PdfBorderOverlapStyle;
        },
        PdfGridLayoutFormat: PdfGridLayoutFormat,
        PdfGrid: PdfGrid,
        GridCellEventArgs: GridCellEventArgs,
        PdfGridBeginCellDrawEventArgs: PdfGridBeginCellDrawEventArgs,
        PdfGridEndCellDrawEventArgs: PdfGridEndCellDrawEventArgs,
        PdfCancelEventArgs: PdfCancelEventArgs,
        BeginPageLayoutEventArgs: BeginPageLayoutEventArgs,
        EndPageLayoutEventArgs: EndPageLayoutEventArgs,
        PdfGridBeginPageLayoutEventArgs: PdfGridBeginPageLayoutEventArgs,
        PdfGridEndPageLayoutEventArgs: PdfGridEndPageLayoutEventArgs,
        RowLayoutResult: RowLayoutResult,
        PdfGridLayoutResult: PdfGridLayoutResult,
        PdfGridColumn: PdfGridColumn,
        PdfGridColumnCollection: PdfGridColumnCollection,
        PdfGridRow: PdfGridRow,
        PdfGridRowCollection: PdfGridRowCollection,
        PdfGridHeaderCollection: PdfGridHeaderCollection,
        PdfGridCell: PdfGridCell,
        PdfGridCellCollection: PdfGridCellCollection
    }), ExportUtils = function() {
        function ExportUtils(control) {
            this.control = control;
        }
        return ExportUtils.prototype.print = function(elements) {
            this.printWindow = window.open("", "print", "height=" + window.outerHeight + ",width=" + window.outerWidth + ",tabbar=no"), 
            this.printWindow.moveTo(0, 0), this.printWindow.resizeTo(screen.availWidth, screen.availHeight);
            var argsData = {
                cancel: !1,
                htmlContent: this.getHTMLContent(elements),
                name: "beforePrint"
            };
            this.control.trigger("beforePrint", argsData), argsData.cancel || print(argsData.htmlContent, this.printWindow);
        }, ExportUtils.prototype.getHTMLContent = function(elements) {
            var div = createElement("div");
            return elements ? elements instanceof Array ? elements.forEach(function(value) {
                div.appendChild(getElement(value).cloneNode(!0));
            }) : elements instanceof Element ? div.appendChild(elements.cloneNode(!0)) : div.appendChild(getElement(elements).cloneNode(!0)) : div.appendChild(this.control.element.cloneNode(!0)), 
            div;
        }, ExportUtils.prototype.export = function(type, fileName, orientation) {
            var _this = this, element = createElement("canvas", {
                id: "ej2-canvas",
                attrs: {
                    width: this.control.availableSize.width.toString(),
                    height: this.control.availableSize.height.toString()
                }
            }), isDownload = !(Browser.userAgent.toString().indexOf("HeadlessChrome") > -1);
            orientation = isNullOrUndefined(orientation) ? PdfPageOrientation.Landscape : orientation;
            var svgData = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">' + this.control.svgObject.outerHTML + "</svg>", url = window.URL.createObjectURL(new Blob("SVG" === type ? [ svgData ] : [ new XMLSerializer().serializeToString(this.control.svgObject) ], {
                type: "image/svg+xml"
            }));
            if ("SVG" === type) this.triggerDownload(fileName, type, url, isDownload); else {
                var image_1 = new Image(), ctx_1 = element.getContext("2d");
                image_1.onload = function() {
                    if (ctx_1.drawImage(image_1, 0, 0), window.URL.revokeObjectURL(url), "PDF" === type) {
                        var document_1 = new PdfDocument(), imageString = element.toDataURL("image/jpeg").replace("image/jpeg", "image/octet-stream");
                        document_1.pageSettings.orientation = orientation, imageString = imageString.slice(imageString.indexOf(",") + 1), 
                        document_1.pages.add().graphics.drawImage(new PdfBitmap(imageString), 0, 0, _this.control.availableSize.width, _this.control.availableSize.height), 
                        isDownload && (document_1.save(fileName + ".pdf"), document_1.destroy());
                    } else window.navigator.msSaveOrOpenBlob ? window.navigator.msSaveOrOpenBlob(element.msToBlob(), fileName + "." + type.toLocaleLowerCase()) : _this.triggerDownload(fileName, type, element.toDataURL("image/png").replace("image/png", "image/octet-stream"), isDownload);
                }, image_1.src = url;
            }
        }, ExportUtils.prototype.triggerDownload = function(fileName, type, url, isDownload) {
            createElement("a", {
                attrs: {
                    download: fileName + "." + type.toLocaleLowerCase(),
                    href: url
                }
            }).dispatchEvent(new MouseEvent(isDownload ? "click" : "move", {
                view: window,
                bubbles: !1,
                cancelable: !0
            }));
        }, ExportUtils;
    }(), __extends$38 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$37 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, AccumulationChart = function(_super) {
        function AccumulationChart(options, element) {
            var _this = _super.call(this, options, element) || this;
            return _this.explodeDistance = 0, _this;
        }
        return __extends$38(AccumulationChart, _super), Object.defineProperty(AccumulationChart.prototype, "type", {
            get: function() {
                return this.series && this.series.length ? this.series[0].type : "Pie";
            },
            enumerable: !0,
            configurable: !0
        }), AccumulationChart.prototype.preRender = function() {
            this.unWireEvents(), this.setCulture(), this.animateSeries = !0, calculateSize(this), 
            this.wireEvents();
        }, AccumulationChart.prototype.setTheme = function() {
            this.themeStyle = getThemeColor(this.theme);
        }, AccumulationChart.prototype.render = function() {
            this.trigger("load", {
                accumulation: this
            }), this.setTheme(), this.accBaseModule = new AccumulationBase(this), this.pieSeriesModule = new PieSeries(this), 
            this.calculateVisibleSeries(), this.processData();
        }, AccumulationChart.prototype.unWireEvents = function() {
            var isIE11Pointer = Browser.isPointer, start = Browser.touchStartEvent, move = Browser.touchMoveEvent, stop = Browser.touchEndEvent, cancel = isIE11Pointer ? "pointerleave" : "mouseleave";
            EventHandler.remove(this.element, move, this.accumulationMouseMove), EventHandler.remove(this.element, stop, this.accumulationMouseEnd), 
            EventHandler.remove(this.element, start, this.accumulationMouseStart), EventHandler.remove(this.element, "click", this.accumulationOnMouseClick), 
            EventHandler.remove(this.element, "contextmenu", this.accumulationRightClick), EventHandler.remove(this.element, cancel, this.accumulationMouseLeave), 
            window.removeEventListener(Browser.isTouch && "orientation" in window && "onorientationchange" in window ? "orientationchange" : "resize", this.accumulationResize);
        }, AccumulationChart.prototype.wireEvents = function() {
            var isIE11Pointer = Browser.isPointer, start = Browser.touchStartEvent, stop = Browser.touchEndEvent, move = Browser.touchMoveEvent, cancel = isIE11Pointer ? "pointerleave" : "mouseleave";
            EventHandler.add(this.element, move, this.accumulationMouseMove, this), EventHandler.add(this.element, stop, this.accumulationMouseEnd, this), 
            EventHandler.add(this.element, start, this.accumulationMouseStart, this), EventHandler.add(this.element, "click", this.accumulationOnMouseClick, this), 
            EventHandler.add(this.element, "contextmenu", this.accumulationRightClick, this), 
            EventHandler.add(this.element, cancel, this.accumulationMouseLeave, this), window.addEventListener(Browser.isTouch && "orientation" in window && "onorientationchange" in window ? "orientationchange" : "resize", this.accumulationResize.bind(this)), 
            new Touch(this.element), this.setStyle(this.element);
        }, AccumulationChart.prototype.setMouseXY = function(e) {
            var pageX, pageY;
            if (e.type.indexOf("touch") > -1) {
                this.isTouch = !0;
                var touchArg = e;
                pageY = touchArg.changedTouches[0].clientY, pageX = touchArg.changedTouches[0].clientX;
            } else this.isTouch = "touch" === e.pointerType || "2" === e.pointerType, pageX = e.clientX, 
            pageY = e.clientY;
            var rect = this.element.getBoundingClientRect(), svgRect = getElement(this.element.id + "_svg").getBoundingClientRect();
            this.mouseX = pageX - rect.left - Math.max(svgRect.left - rect.left, 0), this.mouseY = pageY - rect.top - Math.max(svgRect.top - rect.top, 0);
        }, AccumulationChart.prototype.accumulationMouseEnd = function(e) {
            return this.setMouseXY(e), this.trigger("chartMouseUp", {
                target: e.target.id,
                x: this.mouseX,
                y: this.mouseY
            }), this.isTouch && (this.titleTooltip(e, this.mouseX, this.mouseY, this.isTouch), 
            this.accumulationDataLabelModule && this.visibleSeries[0].dataLabel.visible && this.accumulationDataLabelModule.move(e, this.mouseX, this.mouseY, this.isTouch), 
            this.accumulationLegendModule && this.legendSettings.visible && this.accumulationLegendModule.move(e)), 
            this.notify(Browser.touchEndEvent, e), !1;
        }, AccumulationChart.prototype.removeSvgOffset = function(x, y) {
            var rect = this.element.getBoundingClientRect(), svgRect = getElement(this.element.id + "_svg").getBoundingClientRect();
            return {
                x: x - rect.left - Math.max(svgRect.left - rect.left, 0),
                y: y - rect.top - Math.max(svgRect.top - rect.top, 0)
            };
        }, AccumulationChart.prototype.accumulationMouseStart = function(e) {
            return this.setMouseXY(e), this.trigger("chartMouseDown", {
                target: e.target.id,
                x: this.mouseX,
                y: this.mouseY
            }), !1;
        }, AccumulationChart.prototype.accumulationResize = function(e) {
            var _this = this;
            this.animateSeries = !1;
            var args = {
                accumulation: this,
                previousSize: new Size(this.availableSize.width, this.availableSize.height),
                name: "resized",
                currentSize: new Size(0, 0)
            };
            return this.resizeTo && clearTimeout(this.resizeTo), this.resizeTo = setTimeout(function() {
                _this.isDestroyed ? clearTimeout(_this.resizeTo) : (calculateSize(_this), args.currentSize = _this.availableSize, 
                _this.trigger("resized", args), _this.refreshSeries(), _this.refreshChart());
            }, 500), !1;
        }, AccumulationChart.prototype.export = function(type, fileName, orientation) {
            new ExportUtils(this).export(type, fileName, orientation);
        }, AccumulationChart.prototype.print = function(id) {
            new ExportUtils(this).print(id);
        }, AccumulationChart.prototype.setStyle = function(element) {
            element.style.touchAction = "element", element.style.msTouchAction = "element", 
            element.style.msContentZooming = "none", element.style.msUserSelect = "none", element.style.webkitUserSelect = "none", 
            element.style.position = "relative";
        }, AccumulationChart.prototype.setAnnotationValue = function(annotationIndex, content) {
            var element, annotation = this.annotations[annotationIndex], parentNode = getElement(this.element.id + "_Annotation_Collections");
            content && (annotation.content = content, parentNode ? (element = createElement("div"), 
            removeElement$1(this.element.id + "_Annotation_" + annotationIndex), this.annotationModule.processAnnotation(annotation, annotationIndex, element), 
            parentNode.appendChild(element.children[0])) : this.annotationModule.renderAnnotations(getElement(this.element.id + "_Secondary_Element")));
        }, AccumulationChart.prototype.accumulationMouseMove = function(e) {
            return this.setMouseXY(e), this.trigger("chartMouseMove", {
                target: e.target.id,
                x: this.mouseX,
                y: this.mouseY
            }), this.pointMove && this.triggerPointEvent("pointMove", e.target), this.accumulationLegendModule && this.legendSettings.visible && this.accumulationLegendModule.move(e), 
            this.accumulationDataLabelModule && this.visibleSeries[0] && this.visibleSeries[0].dataLabel.visible && this.accumulationDataLabelModule.move(e, this.mouseX, this.mouseY), 
            this.isTouch || this.titleTooltip(e, this.mouseX, this.mouseY), this.notify(Browser.touchMoveEvent, e), 
            !1;
        }, AccumulationChart.prototype.titleTooltip = function(event, x, y, isTouch) {
            var targetId = event.target.id;
            event.target.textContent.indexOf("...") > -1 && targetId === this.element.id + "_title" ? showTooltip(this.title, x, y, this.element.offsetWidth, this.element.id + "_EJ2_Title_Tooltip", getElement(this.element.id + "_Secondary_Element"), isTouch) : removeElement$1(this.element.id + "_EJ2_Title_Tooltip");
        }, AccumulationChart.prototype.accumulationOnMouseClick = function(e) {
            return this.setMouseXY(e), this.accumulationLegendModule && this.legendSettings.visible && this.accumulationLegendModule.click(e), 
            "None" !== this.selectionMode && this.accumulationSelectionModule && this.accumulationSelectionModule.calculateSelectedElements(this, e), 
            this.visibleSeries[0].explode && this.accBaseModule.processExplode(e), this.trigger("chartMouseClick", {
                target: e.target.id,
                x: this.mouseX,
                y: this.mouseY
            }), this.pointClick && this.triggerPointEvent("pointClick", e.target), !1;
        }, AccumulationChart.prototype.triggerPointEvent = function(event, element) {
            var indexes = indexFinder(element.id);
            indexes.series >= 0 && indexes.point >= 0 && this.trigger(event, {
                series: this.series[indexes.series],
                point: this.series[indexes.series].points[indexes.point],
                seriesIndex: indexes.series,
                pointIndex: indexes.point,
                x: this.mouseX,
                y: this.mouseY
            });
        }, AccumulationChart.prototype.accumulationRightClick = function(event) {
            return 2 !== event.buttons && "touch" !== event.pointerType || (event.preventDefault(), 
            event.stopPropagation(), !1);
        }, AccumulationChart.prototype.accumulationMouseLeave = function(e) {
            return this.setMouseXY(e), this.trigger("chartMouseLeave", {
                target: e.target.id,
                x: this.mouseX,
                y: this.mouseY
            }), this.notify(Browser.isPointer ? "pointerleave" : "mouseleave", e), !1;
        }, AccumulationChart.prototype.setCulture = function() {
            this.intl = new Internationalization();
        }, AccumulationChart.prototype.createPieSvg = function() {
            this.removeSvg(), createSvg(this);
        }, AccumulationChart.prototype.removeSvg = function() {
            if (removeElement$1(this.element.id + "_Secondary_Element"), this.svgObject) {
                for (;this.svgObject.childNodes.length > 0; ) this.svgObject.removeChild(this.svgObject.firstChild);
                !this.svgObject.hasChildNodes() && this.svgObject.parentNode && remove(this.svgObject);
            }
            removeElement$1("EJ2_legend_tooltip"), removeElement$1("EJ2_datalabel_tooltip");
        }, AccumulationChart.prototype.createSecondaryElement = function() {
            this.element.appendChild(createElement("div", {
                id: this.element.id + "_Secondary_Element",
                styles: "position: relative"
            }));
        }, AccumulationChart.prototype.calculateVisibleSeries = function() {
            this.visibleSeries = [];
            for (var i = 0, length_1 = this.series.length; i < length_1; i++) if (this.series[i].index = i, 
            this.series[i].type === this.type && 0 === this.visibleSeries.length) {
                this.visibleSeries.push(this.series[i]);
                break;
            }
        }, AccumulationChart.prototype.processData = function() {
            this.seriesCounts = 0;
            for (var _i = 0, _a = this.visibleSeries; _i < _a.length; _i++) {
                var series = _a[_i];
                series.dataModule = new Data(series.dataSource, series.query), series.refreshDataManager(this);
            }
        }, AccumulationChart.prototype.refreshChart = function() {
            this.doGrouppingProcess(), this.createPieSvg(), this.calculateBounds(), this.renderElements();
        }, AccumulationChart.prototype.doGrouppingProcess = function() {
            var series = this.visibleSeries[0];
            isNullOrUndefined(series.resultData) || isNullOrUndefined(series.lastGroupTo) || series.lastGroupTo === series.groupTo || series.getPoints(series.resultData, this);
        }, AccumulationChart.prototype.calculateBounds = function() {
            this.initialClipRect = new Rect(this.margin.left, this.margin.top, this.availableSize.width, this.availableSize.height), 
            this.titleCollection = [], this.titleCollection = getTitle(this.title, this.titleStyle, this.initialClipRect.width), 
            function(rect, thickness) {
                rect.x += thickness.x, rect.y += thickness.y, rect.width -= thickness.x + thickness.width, 
                rect.height -= thickness.y + thickness.height;
            }(this.initialClipRect, new Rect(0, measureText(this.title, this.titleStyle).height * this.titleCollection.length, this.margin.right + this.margin.left, this.margin.bottom + this.margin.top)), 
            this.calculateLegendBounds();
        }, AccumulationChart.prototype.calculateLegendBounds = function() {
            if (!this.accumulationLegendModule || !this.legendSettings.visible) return null;
            this.accumulationLegendModule.getLegendOptions(this, this.visibleSeries), this.accumulationLegendModule.calculateLegendBounds(this.initialClipRect, this.availableSize);
        }, AccumulationChart.prototype.renderElements = function() {
            this.renderBorder(), this.renderTitle(), this.createSecondaryElement(), this.renderSeries(), 
            this.renderLegend(), this.element.appendChild(this.svgObject), this.processSelection(), 
            this.processExplode(), this.renderAnnotation(), this.setSecondaryElementPosition(), 
            this.trigger("loaded", {
                accumulation: this
            }), this.animateSeries = !1;
        }, AccumulationChart.prototype.setSecondaryElementPosition = function() {
            var tooltipParent = getElement(this.element.id + "_Secondary_Element");
            if (tooltipParent) {
                var rect = this.element.getBoundingClientRect(), svgRect = getElement(this.element.id + "_svg").getBoundingClientRect();
                tooltipParent.style.left = Math.max(svgRect.left - rect.left, 0) + "px", tooltipParent.style.top = Math.max(svgRect.top - rect.top, 0) + "px";
            }
        }, AccumulationChart.prototype.renderAnnotation = function() {
            this.annotationModule && this.annotationModule.renderAnnotations(getElement(this.element.id + "_Secondary_Element"));
        }, AccumulationChart.prototype.processExplode = function() {
            if (!this.visibleSeries[0].explode) return null;
            this.accBaseModule.invokeExplode();
        }, AccumulationChart.prototype.renderSeries = function() {
            this.svgObject.appendChild(this.renderer.createGroup({
                id: this.element.id + "_SeriesCollection"
            }));
            for (var _i = 0, _a = this.visibleSeries; _i < _a.length; _i++) {
                var series = _a[_i];
                series.visible && this[firstToLowerCase(series.type) + "SeriesModule"] && (this[firstToLowerCase(series.type) + "SeriesModule"].initProperties(this, series), 
                series.renderSeries(this));
            }
        }, AccumulationChart.prototype.renderBorder = function() {
            var padding = this.border.width;
            this.svgObject.appendChild(this.renderer.drawRectangle(new RectOption(this.element.id + "_border", this.background || this.themeStyle.background, this.border, 1, new Rect(padding / 2, padding / 2, this.availableSize.width - padding, this.availableSize.height - padding))));
        }, AccumulationChart.prototype.renderLegend = function() {
            if (!this.accumulationLegendModule || !this.legendSettings.visible) return null;
            this.accumulationLegendModule.legendCollections.length && ("Pie" === this.visibleSeries[0].type && this.accumulationLegendModule.getSmartLegendLocation(this.visibleSeries[0].labelBound, this.accumulationLegendModule.legendBounds, this.margin), 
            this.accumulationLegendModule.renderLegend(this, this.legendSettings, this.accumulationLegendModule.legendBounds));
        }, AccumulationChart.prototype.processSelection = function() {
            if (!this.accumulationSelectionModule || "None" === this.selectionMode) return null;
            var selectedDataIndexes = extend([], this.accumulationSelectionModule.selectedDataIndexes, null, !0);
            this.accumulationSelectionModule.invokeSelection(this), selectedDataIndexes.length > 0 && (this.accumulationSelectionModule.selectedDataIndexes = selectedDataIndexes, 
            this.accumulationSelectionModule.redrawSelection(this, this.selectionMode));
        }, AccumulationChart.prototype.renderTitle = function() {
            if (!this.title) return null;
            var titleSize = measureText(this.title, this.titleStyle), anchor = "Near" === this.titleStyle.textAlignment ? "start" : "Far" === this.titleStyle.textAlignment ? "end" : "middle";
            textElement(new TextOption(this.element.id + "_title", titlePositionX(this.availableSize, this.margin.left, this.margin.left, this.titleStyle), this.margin.top + 3 * titleSize.height / 4, anchor, this.titleCollection, "", "auto"), this.titleStyle, this.titleStyle.color || this.themeStyle.chartTitle, this.svgObject);
        }, AccumulationChart.prototype.getSeriesElement = function() {
            return this.svgObject.getElementsByTagName("g")[0];
        }, AccumulationChart.prototype.refreshSeries = function() {
            for (var _i = 0, _a = this.visibleSeries; _i < _a.length; _i++) {
                var series = _a[_i];
                this.refreshPoints(series.points);
            }
        }, AccumulationChart.prototype.refreshPoints = function(points) {
            for (var _i = 0, points_1 = points; _i < points_1.length; _i++) {
                var point = points_1[_i];
                point.labelPosition = null, point.labelRegion = null, point.labelVisible = !0;
            }
        }, AccumulationChart.prototype.getModuleName = function() {
            return "accumulationchart";
        }, AccumulationChart.prototype.destroy = function() {
            this.unWireEvents(), _super.prototype.destroy.call(this), this.element.classList.remove("e-accumulationchart");
        }, AccumulationChart.prototype.requiredModules = function() {
            var modules = [];
            return modules.push({
                member: this.type + "Series",
                args: [ this ]
            }), this.legendSettings.visible && modules.push({
                member: "AccumulationLegend",
                args: [ this ]
            }), this.findDatalabelVisibility() && modules.push({
                member: "AccumulationDataLabel",
                args: [ this ]
            }), this.tooltip.enable && modules.push({
                member: "AccumulationTooltip",
                args: [ this ]
            }), "None" !== this.selectionMode && modules.push({
                member: "AccumulationSelection",
                args: [ this ]
            }), this.annotations.some(function(value) {
                return null !== value.content;
            }) && modules.push({
                member: "Annotation",
                args: [ this, this.annotations ]
            }), modules;
        }, AccumulationChart.prototype.findDatalabelVisibility = function() {
            for (var _i = 0, _a = this.series; _i < _a.length; _i++) {
                if (_a[_i].dataLabel.visible) return !0;
            }
            return !1;
        }, AccumulationChart.prototype.getPersistData = function() {
            return "";
        }, AccumulationChart.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var update = {
                refreshElements: !1,
                refreshBounds: !1
            }, _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "theme":
                    this.animateSeries = !0;
                    break;

                  case "title":
                  case "height":
                  case "width":
                  case "margin":
                    update.refreshBounds = !0;
                    break;

                  case "titleStyle":
                    newProp.titleStyle && (newProp.titleStyle.size || newProp.titleStyle.textOverflow) ? update.refreshBounds = !0 : update.refreshElements = !0;
                    break;

                  case "legendSettings":
                    update.refreshBounds = !0, update.refreshElements = !0;
                    break;

                  case "locale":
                  case "currencyCode":
                    _super.prototype.refresh.call(this);
                    break;

                  case "background":
                  case "border":
                  case "annotations":
                  case "enableSmartLabels":
                    update.refreshElements = !0;
                    break;

                  case "isMultiSelect":
                  case "selectedDataIndexes":
                  case "selectionMode":
                    this.accumulationSelectionModule && (isNullOrUndefined(this.accumulationSelectionModule.selectedDataIndexes) ? this.accumulationSelectionModule.invokeSelection(this) : this.accumulationSelectionModule.redrawSelection(this, oldProp.selectionMode));
                }
            }
            !update.refreshBounds && update.refreshElements ? (this.createPieSvg(), this.renderElements()) : update.refreshBounds && (this.refreshSeries(), 
            this.createPieSvg(), this.calculateBounds(), this.renderElements());
        }, __decorate$37([ Property(null) ], AccumulationChart.prototype, "width", void 0), 
        __decorate$37([ Property(null) ], AccumulationChart.prototype, "height", void 0), 
        __decorate$37([ Property(null) ], AccumulationChart.prototype, "title", void 0), 
        __decorate$37([ Complex(Theme.chartTitleFont, Font) ], AccumulationChart.prototype, "titleStyle", void 0), 
        __decorate$37([ Complex({}, LegendSettings) ], AccumulationChart.prototype, "legendSettings", void 0), 
        __decorate$37([ Complex({}, TooltipSettings) ], AccumulationChart.prototype, "tooltip", void 0), 
        __decorate$37([ Property("None") ], AccumulationChart.prototype, "selectionMode", void 0), 
        __decorate$37([ Property(!1) ], AccumulationChart.prototype, "isMultiSelect", void 0), 
        __decorate$37([ Collection([], Indexes) ], AccumulationChart.prototype, "selectedDataIndexes", void 0), 
        __decorate$37([ Complex({}, Margin) ], AccumulationChart.prototype, "margin", void 0), 
        __decorate$37([ Property(!0) ], AccumulationChart.prototype, "enableSmartLabels", void 0), 
        __decorate$37([ Complex({
            color: "#DDDDDD",
            width: 0
        }, Border) ], AccumulationChart.prototype, "border", void 0), __decorate$37([ Property(null) ], AccumulationChart.prototype, "background", void 0), 
        __decorate$37([ Collection([ {} ], AccumulationSeries) ], AccumulationChart.prototype, "series", void 0), 
        __decorate$37([ Collection([ {} ], AccumulationAnnotationSettings) ], AccumulationChart.prototype, "annotations", void 0), 
        __decorate$37([ Property("Material") ], AccumulationChart.prototype, "theme", void 0), 
        __decorate$37([ Event() ], AccumulationChart.prototype, "loaded", void 0), __decorate$37([ Event() ], AccumulationChart.prototype, "load", void 0), 
        __decorate$37([ Event() ], AccumulationChart.prototype, "seriesRender", void 0), 
        __decorate$37([ Event() ], AccumulationChart.prototype, "legendRender", void 0), 
        __decorate$37([ Event() ], AccumulationChart.prototype, "textRender", void 0), __decorate$37([ Event() ], AccumulationChart.prototype, "tooltipRender", void 0), 
        __decorate$37([ Event() ], AccumulationChart.prototype, "pointRender", void 0), 
        __decorate$37([ Event() ], AccumulationChart.prototype, "annotationRender", void 0), 
        __decorate$37([ Event() ], AccumulationChart.prototype, "beforePrint", void 0), 
        __decorate$37([ Event() ], AccumulationChart.prototype, "chartMouseMove", void 0), 
        __decorate$37([ Event() ], AccumulationChart.prototype, "chartMouseClick", void 0), 
        __decorate$37([ Event() ], AccumulationChart.prototype, "pointClick", void 0), __decorate$37([ Event() ], AccumulationChart.prototype, "pointMove", void 0), 
        __decorate$37([ Event() ], AccumulationChart.prototype, "animationComplete", void 0), 
        __decorate$37([ Event() ], AccumulationChart.prototype, "chartMouseDown", void 0), 
        __decorate$37([ Event() ], AccumulationChart.prototype, "chartMouseLeave", void 0), 
        __decorate$37([ Event() ], AccumulationChart.prototype, "chartMouseUp", void 0), 
        __decorate$37([ Event() ], AccumulationChart.prototype, "resized", void 0), __decorate$37([ Property("USD") ], AccumulationChart.prototype, "currencyCode", void 0), 
        AccumulationChart = __decorate$37([ NotifyPropertyChanges ], AccumulationChart);
    }(Component), __extends$47 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), TriangularBase = function(_super) {
        function TriangularBase() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$47(TriangularBase, _super), TriangularBase.prototype.initProperties = function(chart, series) {
            var actualChartArea = chart.initialClipRect;
            series.triangleSize = new Size(stringToNumber(series.width, actualChartArea.width), stringToNumber(series.height, actualChartArea.height)), 
            series.neckSize = new Size(stringToNumber(series.neckWidth, actualChartArea.width), stringToNumber(series.neckHeight, actualChartArea.height)), 
            this.defaultLabelBound(series, series.dataLabel.visible, series.dataLabel.position, chart), 
            "30%" === series.explodeOffset && (series.explodeOffset = "25px"), chart.explodeDistance = stringToNumber(series.explodeOffset, actualChartArea.width);
            var points = series.points;
            this.initializeSizeRatio(points, series);
        }, TriangularBase.prototype.initializeSizeRatio = function(points, series, reverse) {
            void 0 === reverse && (reverse = !1);
            for (var sumOfPoints = series.sumOfPoints, gapRatio = Math.min(Math.max(series.gapRatio, 0), 1), coEff = 1 / (sumOfPoints * (1 + gapRatio / (1 - gapRatio))), spacing = gapRatio / (points.length - 1), y = 0, i = points.length - 1; i >= 0; i--) {
                var index = reverse ? points.length - 1 - i : i;
                if (points[index].visible) {
                    var height = coEff * points[index].y;
                    points[index].yRatio = y, points[index].heightRatio = height, y += height + spacing;
                }
            }
        }, TriangularBase.prototype.setLabelLocation = function(series, point, points) {
            var last = points.length - 1, bottom = "Funnel" === series.type ? points.length - 2 : points.length - 1, x = (points[0].x + points[bottom].x) / 2, right = (points[1].x + points[bottom - 1].x) / 2;
            point.region = new Rect(x, points[0].y, right - x, points[bottom].y - points[0].y), 
            point.symbolLocation = {
                x: point.region.x + point.region.width / 2,
                y: point.region.y + point.region.height / 2
            }, point.labelOffset = {
                x: point.symbolLocation.x - (points[0].x + points[last].x) / 2,
                y: point.symbolLocation.y - (points[0].y + points[last].y) / 2
            };
        }, TriangularBase.prototype.findPath = function(locations) {
            for (var path = "M", i = 0; i < locations.length; i++) path += locations[i].x + " " + locations[i].y, 
            i !== locations.length - 1 && (path += " L");
            return path;
        }, TriangularBase.prototype.defaultLabelBound = function(series, visible, position, chart) {
            var x = (chart.initialClipRect.width - series.triangleSize.width) / 2, y = (chart.initialClipRect.height - series.triangleSize.height) / 2, accumulationBound = new Rect(x, y, series.triangleSize.width, series.triangleSize.height);
            series.labelBound = new Rect(accumulationBound.x, accumulationBound.y, accumulationBound.width + accumulationBound.x, accumulationBound.height + accumulationBound.y), 
            series.accumulationBound = accumulationBound, visible && "Outside" === position && (series.labelBound = new Rect(1 / 0, 1 / 0, -1 / 0, -1 / 0));
        }, TriangularBase;
    }(AccumulationBase), __extends$46 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), FunnelSeries = function(_super) {
        function FunnelSeries() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$46(FunnelSeries, _super), FunnelSeries.prototype.getSegmentData = function(point, series, chart) {
            var lineWidth, topRadius, bottomRadius, endTop, endBottom, minRadius, endMin, bottomY, area = series.triangleSize, emptySpaceAtLeft = (chart.initialClipRect.width - series.triangleSize.width) / 2 + chart.initialClipRect.x, seriesTop = chart.initialClipRect.y + (chart.initialClipRect.height - area.height) / 2, top = point.yRatio * area.height, bottom = top + point.heightRatio * area.height, neckSize = series.neckSize;
            lineWidth = neckSize.width + (area.width - neckSize.width) * ((area.height - neckSize.height - top) / (area.height - neckSize.height)), 
            endTop = (topRadius = area.width / 2 - lineWidth / 2) + lineWidth, lineWidth = bottom > area.height - neckSize.height || area.height === neckSize.height ? neckSize.width : neckSize.width + (area.width - neckSize.width) * ((area.height - neckSize.height - bottom) / (area.height - neckSize.height)), 
            endBottom = (bottomRadius = area.width / 2 - lineWidth / 2) + lineWidth, top >= area.height - neckSize.height ? (topRadius = bottomRadius = minRadius = area.width / 2 - neckSize.width / 2, 
            endTop = endBottom = endMin = area.width / 2 + neckSize.width / 2) : bottom > area.height - neckSize.height && (endMin = endBottom = (minRadius = bottomRadius = area.width / 2 - lineWidth / 2) + lineWidth, 
            bottomY = area.height - neckSize.height), top += seriesTop;
            var line3 = {
                x: emptySpaceAtLeft + 0 + endBottom,
                y: bottom += seriesTop
            }, line6 = {
                x: emptySpaceAtLeft + 0 + bottomRadius,
                y: bottom
            };
            (bottomY += seriesTop) && (line3 = {
                x: emptySpaceAtLeft + 0 + endMin,
                y: bottomY
            }, line6 = {
                x: emptySpaceAtLeft + 0 + minRadius,
                y: bottomY
            });
            var polygon = [ {
                x: emptySpaceAtLeft + 0 + topRadius,
                y: top
            }, {
                x: emptySpaceAtLeft + 0 + endTop,
                y: top
            }, line3, {
                x: emptySpaceAtLeft + 0 + endBottom,
                y: bottom
            }, {
                x: emptySpaceAtLeft + 0 + bottomRadius,
                y: bottom
            }, line6 ];
            this.setLabelLocation(series, point, polygon);
            return this.findPath(polygon);
        }, FunnelSeries.prototype.renderPoint = function(point, series, chart, options) {
            var direction = this.getSegmentData(point, series, chart);
            point.midAngle = 0, options.d = direction;
        }, FunnelSeries.prototype.getModuleName = function() {
            return "FunnelSeries";
        }, FunnelSeries.prototype.destroy = function(accumulation) {}, FunnelSeries;
    }(TriangularBase), __extends$48 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), PyramidSeries = function(_super) {
        function PyramidSeries() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$48(PyramidSeries, _super), PyramidSeries.prototype.getSegmentData = function(point, series, chart) {
            var area = series.triangleSize, seriesTop = chart.initialClipRect.y + (chart.initialClipRect.height - area.height) / 2, emptySpaceAtLeft = (chart.initialClipRect.width - series.triangleSize.width) / 2 + chart.initialClipRect.x, top = point.yRatio, bottom = point.yRatio + point.heightRatio, topRadius = .5 * (1 - point.yRatio), bottomRadius = .5 * (1 - bottom);
            top += seriesTop / area.height, bottom += seriesTop / area.height;
            var polygon = [ {
                x: emptySpaceAtLeft + 0 + topRadius * area.width,
                y: top * area.height
            }, {
                x: emptySpaceAtLeft + 0 + (1 - topRadius) * area.width,
                y: top * area.height
            }, {
                x: emptySpaceAtLeft + 0 + (1 - bottomRadius) * area.width,
                y: bottom * area.height
            }, {
                x: emptySpaceAtLeft + 0 + bottomRadius * area.width,
                y: bottom * area.height
            } ];
            this.setLabelLocation(series, point, polygon);
            return this.findPath(polygon);
        }, PyramidSeries.prototype.initializeSizeRatio = function(points, series) {
            "Linear" === series.pyramidMode ? _super.prototype.initializeSizeRatio.call(this, points, series, !0) : this.calculateSurfaceSegments(series);
        }, PyramidSeries.prototype.calculateSurfaceSegments = function(series) {
            for (var count = series.points.length, sumOfValues = series.sumOfPoints, y = [], height = [], gapHeight = Math.min(0, Math.max(series.gapRatio, 1)) / (count - 1), preSum = this.getSurfaceHeight(0, sumOfValues), currY = 0, i = 0; i < count; i++) series.points[i].visible && (y[i] = currY, 
            height[i] = this.getSurfaceHeight(currY, Math.abs(series.points[i].y)), currY += height[i] + gapHeight * preSum);
            var coef = 1 / (currY - gapHeight * preSum);
            for (i = 0; i < count; i++) series.points[i].visible && (series.points[i].yRatio = coef * y[i], 
            series.points[i].heightRatio = coef * height[i]);
        }, PyramidSeries.prototype.getSurfaceHeight = function(y, surface) {
            return this.solveQuadraticEquation(1, 2 * y, -surface);
        }, PyramidSeries.prototype.solveQuadraticEquation = function(a, b, c) {
            var root1, root2, d = b * b - 4 * a * c;
            if (d >= 0) {
                var sd = Math.sqrt(d);
                return root1 = (-b - sd) / (2 * a), root2 = (-b + sd) / (2 * a), Math.max(root1, root2);
            }
            return 0;
        }, PyramidSeries.prototype.renderPoint = function(point, series, chart, options) {
            var direction = this.getSegmentData(point, series, chart);
            point.midAngle = 0, options.d = direction;
        }, PyramidSeries.prototype.getModuleName = function() {
            return "PyramidSeries";
        }, PyramidSeries.prototype.destroy = function(accumulation) {}, PyramidSeries;
    }(TriangularBase), __extends$49 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), AccumulationLegend = function(_super) {
        function AccumulationLegend(chart) {
            var _this = _super.call(this, chart) || this;
            return _this.library = _this, _this.titleRect = new Rect(0, chart.margin.top, 0, 0), 
            _this;
        }
        return __extends$49(AccumulationLegend, _super), AccumulationLegend.prototype.getLegendOptions = function(chart, series) {
            this.legendCollections = [];
            for (var i = 0; i < 1; i++) {
                var seriesType = series[i].type;
                "Pie" !== seriesType && "Doughnut" !== seriesType || (seriesType = "0" !== series[i].innerRadius && "0%" !== series[i].innerRadius ? "Doughnut" : "Pie");
                for (var _i = 0, _a = series[i].points; _i < _a.length; _i++) {
                    var point = _a[_i];
                    isNullOrUndefined(point.x) || isNullOrUndefined(point.y) || this.legendCollections.push(new LegendOptions(point.x.toString(), point.color, series[i].legendShape, point.visible, seriesType, null, null, point.index, series[i].index));
                }
            }
        }, AccumulationLegend.prototype.getLegendBounds = function(availableSize, legendBounds, legend) {
            var extraWidth = 0, extraHeight = 0, padding = legend.padding;
            this.isVertical ? extraWidth = legend.width ? 0 : availableSize.width / 100 * 5 : extraHeight = legend.height ? 0 : availableSize.height / 100 * 5, 
            legendBounds.width += extraWidth, legendBounds.height += extraHeight;
            var shapePadding = legend.shapePadding, maximumWidth = 0, shapeWidth = legend.shapeWidth, rowWidth = 0, rowCount = 0, columnWidth = [], columnHeight = 0, legendWidth = 0;
            this.maxItemHeight = Math.max(measureText("MeasureText", legend.textStyle).height, legend.shapeHeight);
            for (var legendEventArgs, render = !1, _i = 0, _a = this.legendCollections; _i < _a.length; _i++) {
                var legendOption = _a[_i];
                legendEventArgs = {
                    fill: legendOption.fill,
                    text: legendOption.text,
                    shape: legendOption.shape,
                    name: "legendRender",
                    cancel: !1
                }, this.chart.trigger("legendRender", legendEventArgs), legendOption.render = !legendEventArgs.cancel, 
                legendOption.text = legendEventArgs.text, legendOption.fill = legendEventArgs.fill, 
                legendOption.shape = legendEventArgs.shape, legendOption.textSize = measureText(legendOption.text, legend.textStyle), 
                legendOption.render && "" !== legendOption.text && (render = !0, legendWidth = shapeWidth + shapePadding + legendOption.textSize.width + padding, 
                this.isVertical ? (columnHeight = ++rowCount * (this.maxItemHeight + padding) + padding, 
                rowCount * (this.maxItemHeight + padding) + padding > legendBounds.height && (columnHeight = Math.max(columnHeight, rowCount * (this.maxItemHeight + padding) + padding), 
                rowWidth += maximumWidth, columnWidth.push(maximumWidth), this.totalPages = Math.max(rowCount, this.totalPages || 1), 
                maximumWidth = 0, rowCount = 1), maximumWidth = Math.max(legendWidth, maximumWidth)) : (rowWidth += legendWidth, 
                legendBounds.width < padding + rowWidth && (maximumWidth = Math.max(maximumWidth, rowWidth + padding - legendWidth), 
                0 === rowCount && legendWidth !== rowWidth && (rowCount = 1), rowWidth = legendWidth, 
                columnHeight = ++rowCount * (this.maxItemHeight + padding) + padding)));
            }
            this.isVertical ? (rowWidth += maximumWidth, this.isPaging = legendBounds.width < rowWidth + padding, 
            columnHeight = Math.max(columnHeight, (this.totalPages || 1) * (this.maxItemHeight + padding) + padding), 
            this.isPaging = this.isPaging && this.totalPages > 1, columnWidth[columnWidth.length - 1] !== maximumWidth && columnWidth.push(maximumWidth)) : (this.isPaging = legendBounds.height < columnHeight, 
            this.totalPages = this.totalRowCount = rowCount, columnHeight = Math.max(columnHeight, this.maxItemHeight + padding + padding)), 
            this.maxColumns = 0;
            var width = this.isVertical ? this.getMaxColumn(columnWidth, legendBounds.width, padding, rowWidth + padding) : Math.max(rowWidth + padding, maximumWidth);
            render ? this.setBounds(width, columnHeight, legend, legendBounds) : this.setBounds(0, 0, legend, legendBounds);
        }, AccumulationLegend.prototype.getMaxColumn = function(columns, width, padding, rowWidth) {
            var maxPageColumn = padding;
            this.maxColumnWidth = Math.max.apply(null, columns);
            for (var _i = 0, columns_1 = columns; _i < columns_1.length; _i++) {
                columns_1[_i];
                if (maxPageColumn += this.maxColumnWidth, this.maxColumns++, maxPageColumn + padding > width) {
                    maxPageColumn -= this.maxColumnWidth, this.maxColumns--;
                    break;
                }
            }
            return this.isPaging = maxPageColumn < rowWidth && this.totalPages > 1, maxPageColumn === padding && (maxPageColumn = width), 
            this.maxColumns = Math.max(1, this.maxColumns), this.maxWidth = maxPageColumn, maxPageColumn;
        }, AccumulationLegend.prototype.getAvailWidth = function(tx, width, legendX) {
            return this.isVertical && (width = this.maxWidth), width - (2 * this.legend.padding + this.legend.shapeWidth + this.legend.shapePadding);
        }, AccumulationLegend.prototype.getRenderPoint = function(legendOption, start, textPadding, prevLegend, rect, count, firstLegend) {
            var padding = this.legend.padding;
            if (this.isVertical) count === firstLegend || prevLegend.location.y + 1.5 * this.maxItemHeight + 2 * padding > rect.y + rect.height ? (legendOption.location.x = prevLegend.location.x + (count === firstLegend ? 0 : this.maxColumnWidth), 
            legendOption.location.y = start.y, this.pageXCollections.push(legendOption.location.x - this.legend.shapeWidth / 2 - padding), 
            this.totalPages++) : (legendOption.location.x = prevLegend.location.x, legendOption.location.y = prevLegend.location.y + this.maxItemHeight + padding); else {
                var previousBound = prevLegend.location.x + textPadding + prevLegend.textSize.width;
                previousBound + (legendOption.textSize.width + textPadding) > rect.x + rect.width + this.legend.shapeWidth / 2 ? (legendOption.location.y = count === firstLegend ? prevLegend.location.y : prevLegend.location.y + this.maxItemHeight + padding, 
                legendOption.location.x = start.x) : (legendOption.location.y = prevLegend.location.y, 
                legendOption.location.x = count === firstLegend ? prevLegend.location.x : previousBound), 
                this.totalPages = this.totalRowCount;
            }
            var availablewidth = this.getAvailWidth(legendOption.location.x, this.legendBounds.width, this.legendBounds.x);
            legendOption.text = textTrim(+availablewidth.toFixed(4), legendOption.text, this.legend.textStyle);
        }, AccumulationLegend.prototype.getSmartLegendLocation = function(labelBound, legendBound, margin) {
            var space;
            switch (this.position) {
              case "Left":
                space = (labelBound.x - legendBound.width - margin.left) / 2, legendBound.x = labelBound.x - legendBound.width < margin.left ? legendBound.x : labelBound.x - legendBound.width - space;
                break;

              case "Right":
                space = (this.chart.availableSize.width - margin.right - (labelBound.x + labelBound.width + legendBound.width)) / 2, 
                legendBound.x = labelBound.x + labelBound.width + legendBound.width > this.chart.availableSize.width - margin.right ? legendBound.x : labelBound.x + labelBound.width + space;
                break;

              case "Top":
                this.getTitleRect(this.chart), space = (labelBound.y - legendBound.height - (this.titleRect.y + this.titleRect.height)) / 2, 
                legendBound.y = labelBound.y - legendBound.height < margin.top ? legendBound.y : labelBound.y - legendBound.height - space;
                break;

              case "Bottom":
                space = (this.chart.availableSize.height - margin.bottom - (labelBound.y + labelBound.height + legendBound.height)) / 2, 
                legendBound.y = labelBound.y + labelBound.height + legendBound.height > this.chart.availableSize.height - margin.bottom ? legendBound.y : labelBound.y + labelBound.height + space;
            }
        }, AccumulationLegend.prototype.getTitleRect = function(accumulation) {
            if (!accumulation.title) return null;
            var titleSize = measureText(accumulation.title, accumulation.titleStyle);
            this.titleRect = new Rect(accumulation.availableSize.width / 2 - titleSize.width / 2, accumulation.margin.top, titleSize.width, titleSize.height);
        }, AccumulationLegend.prototype.legendByIndex = function(index, legendCollections) {
            for (var _i = 0, legendCollections_1 = legendCollections; _i < legendCollections_1.length; _i++) {
                var legend = legendCollections_1[_i];
                if (legend.pointIndex === index) return legend;
            }
            return null;
        }, AccumulationLegend.prototype.click = function(event) {
            var targetId = event.target.id, legendItemsId = [ this.legendID + "_text_", this.legendID + "_shape_", this.legendID + "_shape_marker_" ];
            this.chart.accumulationSelectionModule && extend([], this.chart.accumulationSelectionModule.selectedDataIndexes, null, !0);
            for (var _i = 0, legendItemsId_1 = legendItemsId; _i < legendItemsId_1.length; _i++) {
                var id = legendItemsId_1[_i];
                if (targetId.indexOf(id) > -1) {
                    var pointIndex = parseInt(targetId.split(id)[1], 10), currentSeries = this.chart.visibleSeries[0], point = pointByIndex(pointIndex, currentSeries.points), legendOption = this.legendByIndex(pointIndex, this.legendCollections);
                    this.chart.legendSettings.toggleVisibility ? (point.visible = !point.visible, legendOption.visible = point.visible, 
                    this.chart.removeSvg(), point.visible ? currentSeries.sumOfPoints += point.y : currentSeries.sumOfPoints -= point.y, 
                    this.chart.refreshPoints(currentSeries.points), this.chart.renderElements()) : this.chart.accumulationSelectionModule && this.chart.accumulationSelectionModule.legendSelection(this.chart, 0, pointIndex);
                }
            }
            targetId.indexOf(this.legendID + "_pageup") > -1 ? this.changePage(event, !0) : targetId.indexOf(this.legendID + "_pagedown") > -1 && this.changePage(event, !1);
        }, AccumulationLegend.prototype.getModuleName = function() {
            return "AccumulationLegend";
        }, AccumulationLegend.prototype.destroy = function(chart) {}, AccumulationLegend;
    }(BaseLegend), __extends$50 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), AccumulationDataLabel = function(_super) {
        function AccumulationDataLabel(accumulation) {
            var _this = _super.call(this, accumulation) || this;
            if (_this.id = accumulation.element.id + "_datalabel_Series_", accumulation.title) {
                var titleSize = measureText(accumulation.title, accumulation.titleStyle);
                _this.titleRect = new Rect(accumulation.availableSize.width / 2 - titleSize.width / 2, accumulation.margin.top, titleSize.width, titleSize.height);
            }
            return _this;
        }
        return __extends$50(AccumulationDataLabel, _super), AccumulationDataLabel.prototype.getDataLabelPosition = function(point, dataLabel, textSize, points, parent, id) {
            var radius = this.isCircular() ? this.labelRadius : this.getLabelDistance(point, dataLabel);
            this.getLabelRegion(point, dataLabel.position, textSize, radius, this.marginValue), 
            point.labelAngle = point.midAngle, point.labelPosition = dataLabel.position, this.accumulation.enableSmartLabels && this.getSmartLabel(point, dataLabel, textSize, points, parent, id);
        }, AccumulationDataLabel.prototype.getLabelRegion = function(point, position, textSize, labelRadius, margin, endAngle) {
            void 0 === endAngle && (endAngle = 0);
            var labelAngle = endAngle || point.midAngle, location = degreeToLocation(labelAngle, labelRadius, this.isCircular() ? this.center : this.getLabelLocation(point, position));
            location.y = "Inside" === position ? location.y - textSize.height / 2 : location.y, 
            location.x = "Inside" === position ? location.x - textSize.width / 2 : location.x, 
            point.labelRegion = new Rect(location.x, location.y, textSize.width + 2 * margin, textSize.height + 2 * margin), 
            "Outside" === position && (point.labelRegion.y -= point.labelRegion.height / 2, 
            labelAngle >= 90 && labelAngle <= 270 ? point.labelRegion.x -= point.labelRegion.width + 10 : point.labelRegion.x += 10);
        }, AccumulationDataLabel.prototype.getSmartLabel = function(point, dataLabel, textSize, points, parent, id) {
            var circular = this.isCircular(), labelRadius = circular ? this.radius : this.getLabelDistance(point, dataLabel);
            labelRadius += stringToNumber(circular ? dataLabel.connectorStyle.length || "4%" : "0px", labelRadius);
            var previousPoint = this.findPreviousPoint(points, point.index, point.labelPosition);
            if ("Inside" === dataLabel.position ? (previousPoint && previousPoint.labelRegion && (isOverlap(point.labelRegion, previousPoint.labelRegion) || this.isOverlapping(point, points)) || !circular && !function(currentRect, rect) {
                return currentRect.x <= rect.x && currentRect.x + currentRect.width >= rect.x + rect.width && currentRect.y <= rect.y && currentRect.height + currentRect.y >= rect.y + rect.height;
            }(point.region, point.labelRegion)) && (point.labelPosition = "Outside", circular || (labelRadius = this.getLabelDistance(point, dataLabel)), 
            this.getLabelRegion(point, point.labelPosition, textSize, labelRadius, this.marginValue), 
            (previousPoint = this.findPreviousPoint(points, point.index, point.labelPosition)) && (isOverlap(point.labelRegion, previousPoint.labelRegion) || this.isConnectorLineOverlapping(point, previousPoint)) && this.setOuterSmartLabel(previousPoint, point, dataLabel.border.width, labelRadius, textSize, this.marginValue)) : previousPoint && previousPoint.labelRegion && (isOverlap(point.labelRegion, previousPoint.labelRegion) || this.isOverlapping(point, points) || this.isConnectorLineOverlapping(point, previousPoint)) && this.setOuterSmartLabel(previousPoint, point, dataLabel.border.width, labelRadius, textSize, this.marginValue), 
            (this.isOverlapping(point, points) || this.titleRect && point.labelRegion && isOverlap(point.labelRegion, this.titleRect)) && this.setPointVisibileFalse(point), 
            this.accumulation.accumulationLegendModule && point.labelVisible && point.labelRegion) {
                var rect = this.accumulation.accumulationLegendModule.legendBounds, padding = this.accumulation.legendSettings.border.width / 2;
                this.textTrimming(point, new Rect(rect.x - padding, rect.y - padding, rect.width + 2 * padding, rect.height + 2 * padding), dataLabel.font, this.accumulation.accumulationLegendModule.position);
            }
            if (point.labelVisible && point.labelRegion) {
                var position = this.isCircular() ? point.labelRegion.x >= this.center.x ? "InsideRight" : "InsideLeft" : "InsideRight";
                this.textTrimming(point, this.areaRect, dataLabel.font, position);
            }
            point.labelVisible && point.labelRegion && (point.labelRegion.y + point.labelRegion.height > this.areaRect.y + this.areaRect.height || point.labelRegion.y < this.areaRect.y || point.labelRegion.x < this.areaRect.x || point.labelRegion.x + point.labelRegion.width > this.areaRect.x + this.areaRect.width) && this.setPointVisibileFalse(point);
        }, AccumulationDataLabel.prototype.move = function(e, x, y, isTouch) {
            var _this = this, location = this.accumulation.removeSvgOffset(x, y);
            if (e.target.textContent.indexOf("...") > -1) {
                var targetId = e.target.id.split(this.id);
                if (2 === targetId.length) {
                    var seriesIndex = parseInt(targetId[1].split("_text_")[0], 10), pointIndex = parseInt(targetId[1].split("_text_")[1], 10);
                    if (!isNaN(seriesIndex) && !isNaN(pointIndex)) {
                        isTouch && removeElement$1(this.accumulation.element.id + "_EJ2_Datalabel_Tooltip");
                        var point = function(index, visibleSeries) {
                            for (var _i = 0, visibleSeries_1 = visibleSeries; _i < visibleSeries_1.length; _i++) {
                                var series = visibleSeries_1[_i];
                                if (index === series.index) return series;
                            }
                            return visibleSeries[0];
                        }(seriesIndex, this.accumulation.visibleSeries).points[pointIndex];
                        showTooltip(point.text || point.y.toString(), location.x, location.y, this.areaRect.width, this.accumulation.element.id + "_EJ2_Datalabel_Tooltip", getElement(this.accumulation.element.id + "_Secondary_Element"));
                    }
                }
            } else removeElement$1(this.accumulation.element.id + "_EJ2_Datalabel_Tooltip");
            isTouch && (clearTimeout(this.clearTooltip), this.clearTooltip = setTimeout(function() {
                removeElement$1(_this.accumulation.element.id + "_EJ2_Datalabel_Tooltip");
            }, 1e3));
        }, AccumulationDataLabel.prototype.findPreviousPoint = function(points, index, position) {
            for (var point = points[0], i = index - 1; i >= 0; i--) if ((point = points[i]).visible && point.labelVisible && point.labelRegion && point.labelPosition === position) return point;
            return null;
        }, AccumulationDataLabel.prototype.isOverlapping = function(currentPoint, points) {
            for (var i = currentPoint.index - 1; i >= 0; i--) if (points[i].visible && points[i].labelVisible && points[i].labelRegion && currentPoint.labelRegion && currentPoint.labelVisible && isOverlap(currentPoint.labelRegion, points[i].labelRegion)) return !0;
            return !1;
        }, AccumulationDataLabel.prototype.textTrimming = function(point, rect, font, position) {
            if (isOverlap(point.labelRegion, rect)) {
                var size = point.labelRegion.width;
                "Right" === position ? size = rect.x - point.labelRegion.x : "Left" === position ? (size = point.labelRegion.x - (rect.x + rect.width)) < 0 && (size += point.labelRegion.width, 
                point.labelRegion.x = rect.x + rect.width) : "InsideRight" === position ? size = rect.x + rect.width - point.labelRegion.x : "InsideLeft" === position ? (size = point.labelRegion.x + point.labelRegion.width - rect.x) < point.labelRegion.width && (point.labelRegion.x = rect.x) : this.setPointVisibileFalse(point), 
                point.labelVisible && point.labelRegion && (size < point.labelRegion.width && (point.label = textTrim(size - 2 * this.marginValue, point.label, font), 
                point.labelRegion.width = size), 3 === point.label.length && point.label.indexOf("...") > -1 && this.setPointVisibileFalse(point));
            }
        }, AccumulationDataLabel.prototype.setPointVisibileFalse = function(point) {
            point.labelVisible = !1, point.labelRegion = null;
        }, AccumulationDataLabel.prototype.setOuterSmartLabel = function(previousPoint, point, border, labelRadius, textsize, margin) {
            if (this.isCircular()) {
                var labelAngle = this.getOverlappedAngle(previousPoint.labelRegion, point.labelRegion, point.midAngle, 2 * border);
                for (this.getLabelRegion(point, "Outside", textsize, labelRadius, margin, labelAngle), 
                labelAngle > point.endAngle && this.setPointVisibileFalse(point), point.labelAngle = labelAngle; point.labelVisible && (isOverlap(previousPoint.labelRegion, point.labelRegion) || labelAngle <= previousPoint.labelAngle || this.isConnectorLineOverlapping(point, previousPoint)); ) {
                    if (labelAngle > point.endAngle) {
                        this.setPointVisibileFalse(point);
                        break;
                    }
                    point.labelAngle = labelAngle, this.getLabelRegion(point, "Outside", textsize, labelRadius, margin, labelAngle), 
                    labelAngle += .1;
                }
            } else this.setSmartLabelForSegments(point, previousPoint, labelRadius, textsize, margin);
        }, AccumulationDataLabel.prototype.setSmartLabelForSegments = function(point, prevPoint, distance, textSize, margin) {
            var textRegion = point.labelRegion, overlapHeight = "Funnel" === this.accumulation.type ? prevPoint.labelRegion.y - (textRegion.y + textRegion.height) : point.labelRegion.y - (prevPoint.labelRegion.y + prevPoint.labelRegion.height);
            overlapHeight < 0 && (point.labelRegion.y += "Funnel" === this.accumulation.type ? overlapHeight : -overlapHeight);
        }, AccumulationDataLabel.prototype.isConnectorLineOverlapping = function(point, previous) {
            var start = this.getLabelLocation(point), end = new ChartLocation(0, 0);
            this.getEdgeOfLabel(point.labelRegion, point.labelAngle, end);
            var previousstart = this.getLabelLocation(previous), previousend = new ChartLocation(0, 0);
            return this.getEdgeOfLabel(previous.labelRegion, previous.labelAngle, previousend), 
            this.isLineRectangleIntersect(start, end, point.labelRegion) || this.isLineRectangleIntersect(start, end, previous.labelRegion) || this.isLineRectangleIntersect(previousstart, previousend, point.labelRegion);
        }, AccumulationDataLabel.prototype.isLineRectangleIntersect = function(line1, line2, rect) {
            var rectPoints = [ new ChartLocation(Math.round(rect.x), Math.round(rect.y)), new ChartLocation(Math.round(rect.x + rect.width), Math.round(rect.y)), new ChartLocation(Math.round(rect.x + rect.width), Math.round(rect.y + rect.height)), new ChartLocation(Math.round(rect.x), Math.round(rect.y + rect.height)) ];
            line1.x = Math.round(line1.x), line1.y = Math.round(line1.y), line2.x = Math.round(line2.x), 
            line2.y = Math.round(line2.y);
            for (var i = 0; i < rectPoints.length; i++) if (this.isLinesIntersect(line1, line2, rectPoints[i], rectPoints[(i + 1) % rectPoints.length])) return !0;
            return !1;
        }, AccumulationDataLabel.prototype.isLinesIntersect = function(point1, point2, point11, point12) {
            var a1 = point2.y - point1.y, b1 = point1.x - point2.x, c1 = a1 * point1.x + b1 * point1.y, a2 = point12.y - point11.y, b2 = point11.x - point12.x, c2 = a2 * point11.x + b2 * point11.y, delta = a1 * b2 - a2 * b1;
            if (0 !== delta) {
                var x = (b2 * c1 - b1 * c2) / delta, y = (a1 * c2 - a2 * c1) / delta, lies = Math.min(point1.x, point2.x) <= x && x <= Math.max(point1.x, point2.x);
                return lies = lies && Math.min(point1.y, point2.y) <= y && y <= Math.max(point1.y, point2.y), 
                lies = lies && Math.min(point11.x, point12.x) <= x && x <= Math.max(point11.x, point12.x), 
                lies = lies && Math.min(point11.y, point12.y) <= y && y <= Math.max(point11.y, point12.y);
            }
            return !1;
        }, AccumulationDataLabel.prototype.getOverlappedAngle = function(first, second, angle, padding) {
            var x = first.x;
            return angle >= 90 && angle <= 270 ? (second.y = first.y - (padding + second.height / 2), 
            x = first.x + first.width) : second.y = first.y + first.height + padding, function(center, point) {
                var angle = Math.atan2(point.y - center.y, point.x - center.x);
                return (angle = angle < 0 ? 6.283 + angle : angle) * (180 / Math.PI);
            }(this.center, new ChartLocation(x, second.y));
        }, AccumulationDataLabel.prototype.getConnectorPath = function(label, point, dataLabel, end) {
            void 0 === end && (end = 0);
            var connector = dataLabel.connectorStyle, labelRadius = this.isCircular() ? this.labelRadius : this.getLabelDistance(point, dataLabel), start = this.getConnectorStartPoint(point, connector), labelAngle = end || point.midAngle, middle = new ChartLocation(0, 0), endPoint = this.getEdgeOfLabel(label, labelAngle, middle, connector.width);
            if ("Curve" === connector.type) {
                if (this.isCircular()) {
                    return middle = degreeToLocation(labelAngle, labelRadius - (labelRadius - this.radius) / 2, this.center), 
                    "M " + start.x + " " + start.y + " Q" + middle.x + "," + middle.y + " " + endPoint.x + "," + endPoint.y;
                }
                return this.getPolyLinePath(start, endPoint);
            }
            return "M " + start.x + " " + start.y + " L " + middle.x + " " + middle.y + " L " + endPoint.x + " " + endPoint.y;
        }, AccumulationDataLabel.prototype.getPolyLinePath = function(start, end) {
            var controlPoints = [ start, end ];
            if (start.y === end.y) return "M " + start.x + " " + start.y + " L " + end.x + " " + end.y;
            for (var path = "M", i = 0; i <= 16; i++) {
                var t = i / 16, points = this.getBezierPoint(t, controlPoints, 0, 2);
                path += points.x + "," + points.y, 16 !== i && (path += " L");
            }
            return path;
        }, AccumulationDataLabel.prototype.getBezierPoint = function(t, controlPoints, index, count) {
            if (1 === count) return controlPoints[index];
            var p0 = this.getBezierPoint(t, controlPoints, index, count - 1), p1 = this.getBezierPoint(t, controlPoints, index + 1, count - 1), x = (p0.x, 
            p0.x), y = (p0.y, p0.y), x2 = (1 - t) * x + t * (p1.x, p1.x), y2 = (1 - t) * y + t * (p1.y, 
            p1.y);
            return p0.x, {
                x: x2,
                y: y2
            };
        }, AccumulationDataLabel.prototype.getEdgeOfLabel = function(labelshape, angle, middle, border) {
            void 0 === border && (border = 1);
            var edge = new ChartLocation(labelshape.x, labelshape.y);
            return angle >= 90 && angle <= 270 ? (edge.x += labelshape.width + border / 2, edge.y += labelshape.height / 2, 
            middle.x = edge.x + 10, middle.y = edge.y) : (edge.x -= border / 2, edge.y += labelshape.height / 2, 
            middle.x = edge.x - 10, middle.y = edge.y), edge;
        }, AccumulationDataLabel.prototype.getLabelDistance = function(point, dataLabel) {
            if (point.labelPosition && dataLabel.position !== point.labelPosition || dataLabel.connectorStyle.length) {
                var length_1 = stringToNumber(dataLabel.connectorStyle.length || "70px", this.accumulation.initialClipRect.width);
                if (length_1 < this.accumulation.initialClipRect.width) return length_1;
            }
            var labelLocation, position = point.labelPosition || dataLabel.position, series = this.accumulation.visibleSeries[0], extraSpace = (this.accumulation.initialClipRect.width - series.triangleSize.width) / 2;
            switch (position) {
              case "Inside":
                return 0;

              case "Outside":
                return labelLocation = point.symbolLocation.x + point.labelOffset.x, this.accumulation.initialClipRect.width - labelLocation - extraSpace;
            }
        }, AccumulationDataLabel.prototype.getLabelLocation = function(point, position) {
            if (void 0 === position && (position = "Outside"), "Pie" !== this.accumulation.type) {
                position = point.labelPosition || position;
                var location_1 = {
                    x: point.symbolLocation.x,
                    y: point.symbolLocation.y - point.labelOffset.y
                };
                switch (position) {
                  case "Inside":
                    location_1.y = point.region.y + point.region.height / 2;
                    break;

                  case "Outside":
                    location_1.x += point.labelOffset.x;
                }
                return location_1;
            }
            return degreeToLocation(point.midAngle, this.radius, this.center);
        }, AccumulationDataLabel.prototype.getConnectorStartPoint = function(point, connector) {
            return this.isCircular() ? degreeToLocation(point.midAngle, this.radius - connector.width, this.center) : this.getLabelLocation(point);
        }, AccumulationDataLabel.prototype.findAreaRect = function() {
            this.areaRect = new Rect(0, 0, this.accumulation.availableSize.width, this.accumulation.availableSize.height);
            var margin = this.accumulation.margin;
            subtractThickness(this.areaRect, new Thickness(margin.left, margin.right, margin.top, margin.bottom));
        }, AccumulationDataLabel.prototype.renderDataLabel = function(point, dataLabel, parent, points, series, templateElement) {
            var id = this.accumulation.element.id + "_datalabel_Series_" + series + "_", datalabelGroup = this.accumulation.renderer.createGroup({
                id: id + "g_" + point.index
            });
            point.label = point.originalText || point.y.toString();
            var border = {
                width: dataLabel.border.width,
                color: dataLabel.border.color
            }, argsData = {
                cancel: !1,
                name: "textRender",
                series: this.accumulation.visibleSeries[0],
                point: point,
                text: point.label,
                border: border,
                color: dataLabel.fill,
                template: dataLabel.template
            };
            this.accumulation.trigger("textRender", argsData);
            var isTemplate = null !== argsData.template;
            point.labelVisible = !argsData.cancel, point.text = point.label = argsData.text, 
            this.marginValue = argsData.border.width ? 5 + argsData.border.width : 1;
            var childElement = createElement("div", {
                id: this.accumulation.element.id + "_Series_0_DataLabel_" + point.index,
                styles: "position: absolute;background-color:" + argsData.color + ";" + getFontStyle(dataLabel.font) + ";border:" + argsData.border.width + "px solid " + argsData.border.color + ";"
            }), textSize = isTemplate ? this.getTemplateSize(childElement, point, argsData) : measureText(point.label, dataLabel.font);
            if (textSize.height += 4, textSize.width += 4, this.getDataLabelPosition(point, dataLabel, textSize, points, datalabelGroup, id), 
            point.labelVisible) {
                if (this.correctLabelRegion(point.labelRegion, textSize), isTemplate ? this.setTemplateStyle(childElement, point, templateElement, dataLabel.font.color, argsData.color) : (datalabelGroup.appendChild(this.accumulation.renderer.drawRectangle(new RectOption(id + "shape_" + point.index, argsData.color, argsData.border, 1, point.labelRegion, dataLabel.rx, dataLabel.ry))), 
                textElement(new TextOption(id + "text_" + point.index, point.labelRegion.x + this.marginValue, point.labelRegion.y + 3 * textSize.height / 4 + this.marginValue, "start", point.label, "", "auto"), dataLabel.font, dataLabel.font.color || this.getSaturatedColor(point, argsData.color), datalabelGroup)), 
                this.accumulation.accumulationLegendModule && ("Outside" === dataLabel.position || this.accumulation.enableSmartLabels) && this.accumulation.visibleSeries[0].findMaxBounds(this.accumulation.visibleSeries[0].labelBound, point.labelRegion), 
                "Outside" === point.labelPosition) {
                    var path = this.getConnectorPath(extend({}, point.labelRegion, null, !0), point, dataLabel, point.labelAngle), pathElement = this.accumulation.renderer.drawPath(new PathOption(id + "connector_" + point.index, "transparent", dataLabel.connectorStyle.width, dataLabel.connectorStyle.color || point.color, 1, "", path));
                    datalabelGroup.appendChild(pathElement);
                }
                parent.appendChild(datalabelGroup);
            }
        }, AccumulationDataLabel.prototype.getTemplateSize = function(element, point, argsData) {
            var clientRect;
            return element = createTemplate(element, point.index, argsData.template, this.accumulation, point, this.accumulation.visibleSeries[0]), 
            clientRect = measureElementRect(element), {
                width: clientRect.width,
                height: clientRect.height
            };
        }, AccumulationDataLabel.prototype.setTemplateStyle = function(childElement, point, parent, labelColor, fill) {
            childElement.style.left = point.labelRegion.x + "px", childElement.style.top = point.labelRegion.y + "px", 
            childElement.style.color = labelColor || this.getSaturatedColor(point, fill), childElement.childElementCount && (parent.appendChild(childElement), 
            this.doTemplateAnimation(this.accumulation, childElement));
        }, AccumulationDataLabel.prototype.getSaturatedColor = function(point, color) {
            var saturatedColor, rgbValue = convertHexToColor(colorNameToHex(saturatedColor = "transparent" === (saturatedColor = this.marginValue >= 1 ? "transparent" === color ? this.getLabelBackground(point) : color : this.getLabelBackground(point)) ? window.getComputedStyle(document.body, null).backgroundColor : saturatedColor));
            return Math.round((299 * rgbValue.r + 587 * rgbValue.g + 114 * rgbValue.b) / 1e3) >= 128 ? "black" : "white";
        }, AccumulationDataLabel.prototype.doTemplateAnimation = function(accumulation, element) {
            var series = accumulation.visibleSeries[0], delay = series.animation.delay + series.animation.duration;
            series.animation.enable && accumulation.animateSeries && (element.style.visibility = "hidden", 
            templateAnimate(element, delay, 200, "ZoomIn"));
        }, AccumulationDataLabel.prototype.getLabelBackground = function(point) {
            return "Outside" === point.labelPosition ? this.accumulation.background || this.accumulation.themeStyle.background : point.color;
        }, AccumulationDataLabel.prototype.correctLabelRegion = function(labelRegion, textSize, padding) {
            void 0 === padding && (padding = 4), labelRegion.height -= padding, labelRegion.width -= padding, 
            labelRegion.x += padding / 2, labelRegion.y += padding / 2, textSize.height -= padding, 
            textSize.width -= padding;
        }, AccumulationDataLabel.prototype.getModuleName = function() {
            return "AccumulationDataLabel";
        }, AccumulationDataLabel.prototype.destroy = function(accumulation) {}, AccumulationDataLabel;
    }(AccumulationBase), ChartData = function() {
        function ChartData(chart) {
            this.currentPoints = [], this.previousPoints = [], this.chart = chart, this.lierIndex = 0;
        }
        return ChartData.prototype.getData = function() {
            for (var width, height, chart = this.chart, point = null, series = null, i = chart.visibleSeries.length - 1; i >= 0; i--) if (series = chart.visibleSeries[i], 
            width = "Scatter" === series.type || "Scatter" === series.drawType || !series.isRectSeries && series.marker.visible ? (series.marker.height + 5) / 2 : 0, 
            height = "Scatter" === series.type || "Scatter" === series.drawType || !series.isRectSeries && series.marker.visible ? (series.marker.width + 5) / 2 : 0, 
            series.visible && withInBounds(chart.mouseX, chart.mouseY, series.clipRect, width, height) && (point = this.getRectPoint(series, series.clipRect, chart.mouseX, chart.mouseY)), 
            point) return new PointData(point, series);
            return new PointData(point, series);
        }, ChartData.prototype.isSelected = function(chart) {
            return chart.selectionMode.indexOf("Drag") > -1 && chart.selectionModule && null !== chart.selectionModule.rectPoints;
        }, ChartData.prototype.getRectPoint = function(series, rect, x, y) {
            for (var fromCenterX, fromCenterY, clickAngle, startAngle, endAngle, distanceFromCenter, arcAngle = 0, _i = 0, _a = series.points; _i < _a.length; _i++) {
                var point = _a[_i];
                if (point.regionData || point.regions && point.regions.length) if (point.regionData && "PolarRadar" === this.chart.chartAreaType && series.drawType.indexOf("Column") > -1) {
                    if (fromCenterX = x - (series.clipRect.width / 2 + series.clipRect.x), fromCenterY = y - (series.clipRect.height / 2 + series.clipRect.y), 
                    arcAngle = 2 * Math.PI * (point.regionData.currentXPosition < 0 ? 1 + point.regionData.currentXPosition : point.regionData.currentXPosition), 
                    clickAngle = (Math.atan2(fromCenterY, fromCenterX) + .5 * Math.PI - arcAngle) % (2 * Math.PI), 
                    clickAngle = clickAngle < 0 ? 2 * Math.PI + clickAngle : clickAngle, clickAngle += 2 * Math.PI * series.chart.primaryXAxis.startAngle, 
                    startAngle = point.regionData.startAngle, startAngle -= arcAngle, startAngle = startAngle < 0 ? 2 * Math.PI + startAngle : startAngle, 
                    endAngle = point.regionData.endAngle, endAngle -= arcAngle, endAngle = endAngle < 0 ? 2 * Math.PI + endAngle : endAngle, 
                    distanceFromCenter = Math.sqrt(Math.pow(Math.abs(fromCenterX), 2) + Math.pow(Math.abs(fromCenterY), 2)), 
                    clickAngle >= startAngle && clickAngle <= endAngle && (distanceFromCenter >= point.regionData.innerRadius && distanceFromCenter <= point.regionData.radius || distanceFromCenter <= point.regionData.innerRadius && distanceFromCenter >= point.regionData.radius) && distanceFromCenter <= series.chart.radius) return point;
                } else if (this.checkRegionContainsPoint(point.regions, rect, x, y)) return point;
            }
            return null;
        }, ChartData.prototype.checkRegionContainsPoint = function(regionRect, rect, x, y) {
            var _this = this;
            return regionRect.some(function(region, index) {
                return _this.lierIndex = index, withInBounds(x, y, new Rect(("Cartesian" === _this.chart.chartAreaType ? rect.x : 0) + region.x, ("Cartesian" === _this.chart.chartAreaType ? rect.y : 0) + region.y, region.width, region.height));
            });
        }, ChartData.prototype.getClosest = function(series, value) {
            var closest, xData = series.xData;
            if (value >= series.xMin - .5 && value <= series.xMax + .5) for (var _i = 0, xData_1 = xData; _i < xData_1.length; _i++) {
                var data = xData_1[_i];
                (null == closest || Math.abs(data - value) < Math.abs(closest - value)) && (closest = data);
            }
            return closest;
        }, ChartData.prototype.getClosestX = function(chart, series) {
            var value, rect = series.clipRect;
            value = chart.requireInvertedAxis ? getValueYByPoint(chart.mouseY - rect.y, rect.height, series.xAxis) : getValueXByPoint(chart.mouseX - rect.x, rect.width, series.xAxis);
            for (var closest = this.getClosest(series, value), _i = 0, _a = series.points; _i < _a.length; _i++) {
                var point = _a[_i];
                if (closest === point.xValue && point.visible) return new PointData(point, series);
            }
            return null;
        }, ChartData;
    }(), __extends$52 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), BaseTooltip = function(_super) {
        function BaseTooltip(chart) {
            var _this = _super.call(this, chart) || this;
            return _this.padding = 5, _this.arrowPadding = 12, _this.rx = 2, _this.ry = 2, _this.markerPoint = [], 
            _this.element = _this.chart.element, _this.textStyle = chart.tooltip.textStyle, 
            _this.control = chart, _this;
        }
        return __extends$52(BaseTooltip, _super), BaseTooltip.prototype.getElement = function(id) {
            return document.getElementById(id);
        }, BaseTooltip.prototype.getTooltipElement = function(isTooltip) {
            if (this.inverted = this.chart.requireInvertedAxis, this.updateTemplateFn(this.control), 
            this.formattedText = [], this.header = null === this.control.tooltip.header ? this.control.tooltip.shared ? "<b>${point.x}</b>" : "<b>${series.name}</b>" : this.control.tooltip.header, 
            !isTooltip) {
                for (var elementCollection = document.getElementsByClassName("ejSVGTooltip"), i = elementCollection.length - 1; i >= 0; i--) this.getElement(this.element.id).contains(elementCollection[i]) || elementCollection[i].remove();
                return this.createElement(this.control);
            }
            return null;
        }, BaseTooltip.prototype.createElement = function(chart) {
            this.textElements = [];
            var tooltipDiv = document.createElement("div");
            if (tooltipDiv.id = this.element.id + "_tooltip", tooltipDiv.className = "ejSVGTooltip", 
            tooltipDiv.setAttribute("style", "pointer-events:none; position:absolute;z-index: 1"), 
            !chart.tooltip.template || chart.tooltip.shared) {
                var svgObject = chart.renderer.createSvg({
                    id: this.element.id + "_tooltip_svg"
                });
                tooltipDiv.appendChild(svgObject);
                var groupElement = chart.renderer.createGroup({
                    id: this.element.id + "_tooltip_group"
                });
                svgObject.appendChild(groupElement);
                var pathElement = chart.renderer.drawPath({
                    id: this.element.id + "_tooltip_path",
                    "stroke-width": chart.tooltip.border.width,
                    fill: chart.tooltip.fill || chart.themeStyle.tooltipFill,
                    opacity: chart.tooltip.opacity,
                    stroke: chart.tooltip.border.color
                });
                groupElement.appendChild(pathElement);
            }
            return tooltipDiv;
        }, BaseTooltip.prototype.pushData = function(data, isFirst, tooltipDiv, isChart) {
            return !!data.series.enableTooltip && (this.currentPoints.push(data), this.stopAnimation(), 
            isFirst && document.getElementById(this.element.id + "_Secondary_Element").appendChild(tooltipDiv), 
            !0);
        }, BaseTooltip.prototype.renderTooltip = function(data, areaRect, location, textCollection, isFirst, cartesain) {
            return this.triggerEvent(data, isFirst, textCollection) ? (this.renderText(isFirst, this.control), 
            this.removeHighlight(this.control), this.highlightPoints(data), this.renderTooltipElement(this.control, data, areaRect, location, cartesain, isFirst)) : (this.removeHighlight(this.control), 
            this.getElement(this.element.id + "_tooltip").remove(), null);
        }, BaseTooltip.prototype.renderTemplate = function(data, rect, location, point, isFirst) {
            this.removeHighlight(this.control), this.createTemplate(point, data, rect, location, this.getElement(this.element.id + "_tooltip"), isFirst);
        }, BaseTooltip.prototype.renderTooltipElement = function(chart, pointData, areaRect, location, cartesain, isFirst) {
            var rect, tooltipDiv = this.getElement(this.element.id + "_tooltip"), arrowLocation = new ChartLocation(0, 0), tipLocation = new ChartLocation(0, 0), svgObject = this.getElement(this.element.id + "_tooltip_svg"), groupElement = this.getElement(this.element.id + "_tooltip_group"), pathElement = this.getElement(this.element.id + "_tooltip_path"), isTop = !1, isLeft = !1, isBottom = !1, x = 0, y = 0;
            this.tipRadius = 1;
            var series = pointData.series;
            if ("" !== this.header && (this.elementSize.height += 5), this.currentPoints.length > 1 ? (this.arrowPadding = 0, 
            rect = this.sharedTooltipLocation(areaRect, this.valueX, this.valueY), isTop = !0) : (this.arrowPadding = 12, 
            rect = this.seriesTooltipLocation(pointData, areaRect, location, arrowLocation, tipLocation), 
            this.inverted && series.isRectSeries ? x = (isLeft = rect.x < location.x + series.clipRect.x) ? 0 : this.arrowPadding : (isBottom = !(isTop = rect.y < location.y + (cartesain ? series.clipRect.y : 0)), 
            y = isTop ? 0 : this.arrowPadding)), "" !== this.header) {
                var headerSize = measureText(this.header, chart.tooltip.textStyle).height + 2 * this.padding + (isBottom ? this.arrowPadding : 0), direction = "M " + (3 * this.padding + (isLeft || isTop || isBottom ? 0 : this.arrowPadding)) + " " + headerSize + "L " + (rect.width + (isLeft || isTop || isBottom ? 0 : this.arrowPadding) - 2 * this.padding) + " " + headerSize, pathElement_1 = this.chart.renderer.drawPath({
                    id: this.element.id + "_header_path",
                    "stroke-width": 1,
                    fill: null,
                    opacity: .8,
                    stroke: chart.themeStyle.tooltipHeaderLine,
                    d: direction
                });
                groupElement.appendChild(pathElement_1);
            }
            var start = chart.tooltip.border.width / 2, pointRect = new Rect(start + x, start + y, rect.width - start, rect.height - start);
            groupElement.setAttribute("opacity", "1"), !chart.tooltip.enableAnimation || chart.tooltip.shared || isFirst || this.isComplete ? this.updateDiv(tooltipDiv, rect.x, rect.y) : this.animateTooltipDiv(tooltipDiv, rect), 
            this.isComplete = !1, svgObject.setAttribute("height", (rect.height + chart.tooltip.border.width + (this.inverted && pointData.series.isRectSeries ? 0 : this.arrowPadding)).toString()), 
            svgObject.setAttribute("width", (rect.width + chart.tooltip.border.width + (this.inverted && pointData.series.isRectSeries ? this.arrowPadding : 0)).toString()), 
            svgObject.setAttribute("opacity", "1"), pathElement.setAttribute("d", findDirection(this.rx, this.ry, pointRect, arrowLocation, this.arrowPadding, isTop, isBottom, isLeft, tipLocation.x, tipLocation.y, this.tipRadius)), 
            pathElement.setAttribute("filter", Browser.isIE ? "" : "url(#chart_shadow_tooltip)");
            var shadowElement = '<filter id="chart_shadow_tooltip" height="130%"><feGaussianBlur in="SourceAlpha" stdDeviation="3"/>';
            shadowElement += '<feOffset dx="3" dy="3" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="0.5"/>', 
            shadowElement += '</feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter>';
            var defElement = chart.renderer.createDefs();
            return defElement.setAttribute("id", "chart_tooltip_definition"), groupElement.appendChild(defElement), 
            defElement.innerHTML = shadowElement, pathElement.setAttribute("stroke", chart.tooltip.border.color), 
            this.changeText(new ChartLocation(x, y), isBottom, !isLeft && !isTop && !isBottom, rect), 
            new Side(isBottom, !isLeft && !isTop && !isBottom);
        }, BaseTooltip.prototype.changeText = function(point, isBottom, isRight, rect) {
            var element = document.getElementById(this.element.id + "_tooltip_text");
            isBottom && element.setAttribute("transform", "translate(0," + this.arrowPadding + ")"), 
            isRight && element.setAttribute("transform", "translate(" + this.arrowPadding + " 0)");
        }, BaseTooltip.prototype.renderText = function(isRender, chart) {
            var lines, tspanElement, line, tspanOption, height = 0, width = 0, subWidth = 0, font = extend({}, this.chart.tooltip.textStyle, null, !0).properties, groupElement = this.getElement(this.element.id + "_tooltip_group"), tspanStyle = "";
            this.header = this.header.replace(/<b>/g, "").replace(/<\/b>/g, "").trim();
            var headerSpace = "" !== this.header && "" !== this.formattedText[0] ? 5 : 0, isRow = !0, isColumn = !0;
            this.markerPoint = [];
            var dy = 22 / parseFloat(Theme.tooltipLabelFont.size) * parseFloat(font.size);
            isRender || (removeElement$1(this.element.id + "_tooltip_text"), removeElement$1(this.element.id + "_header_path"), 
            removeElement$1(this.element.id + "_tooltip_trackball_group"), removeElement$1("chart_tooltip_definition"));
            for (var options = new TextOption(this.element.id + "_tooltip_text", 2 * this.padding, 4 * this.padding, "start", ""), parentElement = textElement(options, font, null, groupElement, !1), k = 0, pointsLength = this.formattedText.length; k < pointsLength; k++) {
                var textCollection = this.formattedText[k].replace(/<(b|strong)>/g, "<b>").replace(/<\/(b|strong)>/g, "</b>").split(/<br.*?>/g);
                measureText(this.formattedText[k], font), 0 === k && "" !== this.header || this.markerPoint.push(("" !== this.header ? this.padding : 0) + options.y + height);
                for (var i = 0, len = textCollection.length; i < len; i++) {
                    subWidth = 0, isColumn = !0, height += dy;
                    for (var k_1 = 0, len_1 = (lines = textCollection[i].replace(/<b>/g, "<br><b>").replace(/<\/b>/g, "</b><br>").split("<br>")).length; k_1 < len_1; k_1++) "" !== (line = lines[k_1]).replace(/<b>/g, "").replace(/<\/b>/g, "").trim() && (subWidth += 4, 
                    isColumn && !isRow ? (tspanOption = {
                        x: 2 * this.padding + 15,
                        dy: dy + (isColumn ? headerSpace : 0),
                        fill: ""
                    }, headerSpace = null) : tspanOption = isRow && isColumn ? {
                        x: "" === this.header ? 2 * this.padding + 15 : 2 * this.padding
                    } : {}, isColumn = !1, tspanElement = chart.renderer.createTSpan(tspanOption, ""), 
                    parentElement.appendChild(tspanElement), line.indexOf("<b>") > -1 ? (tspanStyle = "font-weight:bold", 
                    font.fontWeight = "bold", tspanElement.setAttribute("fill", chart.tooltip.textStyle.color || chart.themeStyle.tooltipBoldLabel)) : (tspanStyle = "", 
                    font.fontWeight = "Normal", tspanElement.setAttribute("fill", chart.tooltip.textStyle.color || chart.themeStyle.tooltipLightLabel)), 
                    tspanElement.textContent = line = line.replace(/<[a-zA-Z\/](.|\n)*?>/g, ""), subWidth += measureText(line, font).width, 
                    "" !== tspanStyle && tspanElement.setAttribute("style", tspanStyle), isRow = !1);
                    subWidth -= 4, width = Math.max(width, subWidth);
                }
            }
            height -= this.header ? this.padding : 0, this.elementSize = new Size(width + (width > 0 ? 2 * this.padding : 0), height + ("" !== this.header ? this.padding : 0)), 
            this.elementSize.width += 15;
            var element = parentElement.childNodes[0];
            if ("" !== this.header && element) {
                font.fontWeight = "bold";
                var width_1 = (this.elementSize.width + 2 * this.padding) / 2 - measureText(this.header, font).width / 2;
                element.setAttribute("x", width_1.toString());
            }
        }, BaseTooltip.prototype.createTemplate = function(point, data, areaRect, location, parent, isFirst) {
            var chart = this.control;
            this.highlightPoints(data);
            var argsData = {
                cancel: !1,
                name: "tooltipRender",
                point: data.point,
                series: data.series
            };
            this.chart.trigger("tooltipRender", argsData);
            var firstElement = this.getElement(this.element.id + "_tooltip").firstChild;
            if (firstElement && firstElement.remove(), argsData.cancel) this.removeHighlight(chart), 
            this.getElement(this.element.id + "_tooltip").remove(); else {
                for (var templateElement = this.templateFn(point), elem = createElement("div"); templateElement.length > 0; ) elem.appendChild(templateElement[0]);
                parent.appendChild(elem);
                var rect = parent.getBoundingClientRect();
                this.padding = 0, this.elementSize = new Size(rect.width, rect.height);
                var tooltipRect = this.seriesTooltipLocation(data, areaRect, location, new ChartLocation(0, 0), new ChartLocation(0, 0));
                !chart.tooltip.enableAnimation || chart.tooltip.shared || isFirst || this.isComplete ? this.updateDiv(parent, tooltipRect.x, tooltipRect.y) : this.animateTooltipDiv(parent, tooltipRect), 
                this.isComplete = !1;
            }
        }, BaseTooltip.prototype.sharedTooltipLocation = function(bounds, x, y) {
            var width = this.elementSize.width + 2 * this.padding, height = this.elementSize.height + 2 * this.padding, tooltipRect = new Rect(x + 2 * this.padding, y - height - this.padding, width, height);
            return tooltipRect.y < bounds.y && (tooltipRect.y += tooltipRect.height + 2 * this.padding), 
            tooltipRect.x + tooltipRect.width > bounds.x + bounds.width && (tooltipRect.x -= tooltipRect.width + 4 * this.padding), 
            tooltipRect;
        }, BaseTooltip.prototype.seriesTooltipLocation = function(pointData, bounds, symbolLocation, arrowLocation, tipLocation) {
            var series = pointData.series, location = new ChartLocation(symbolLocation.x, symbolLocation.y);
            "RangeArea" === series.type && pointData.point.regions[0] && (series.chart.requireInvertedAxis ? location.x = pointData.point.regions[0].x + pointData.point.regions[0].width / 2 : location.y = pointData.point.regions[0].y + pointData.point.regions[0].height / 2);
            var width = this.elementSize.width + 2 * this.padding, height = this.elementSize.height + 2 * this.padding, markerHeight = 0;
            if (!series.isRectSeries) {
                var chartSeries = pointData.series;
                markerHeight = this.chart.tooltip.shared || chartSeries.marker.visible || "Scatter" === series.type || "Scatter" === chartSeries.drawType ? (chartSeries.marker.height + 2) / 2 + 2 * chartSeries.marker.border.width : 0;
            }
            var clipX = "PolarRadar" === this.chart.chartAreaType ? 0 : series.clipRect.x, clipY = "PolarRadar" === this.chart.chartAreaType ? 0 : series.clipRect.y, boundsX = bounds.x, boundsY = bounds.y;
            return this.inverted && series.isRectSeries ? (location.x = "Waterfall" === series.type && pointData.point.y < 0 ? location.x + pointData.point.regions[0].width : location.x, 
            location = new ChartLocation(location.x + clipX + markerHeight, location.y + clipY - this.elementSize.height / 2 - this.padding), 
            arrowLocation.y = tipLocation.y = height / 2, (location.x + width + this.arrowPadding > boundsX + bounds.width || series.isRectSeries && pointData.point.y < 0 && "Waterfall" !== series.type) && (location.x = (symbolLocation.x > bounds.width ? bounds.width : symbolLocation.x) + clipX - markerHeight - (width + this.arrowPadding)), 
            location.x < boundsX && (location.x = (symbolLocation.x < 0 ? 0 : symbolLocation.x) + clipX + markerHeight), 
            location.y <= boundsY && (arrowLocation.y -= boundsY - location.y, tipLocation.y -= boundsY - location.y, 
            location.y = boundsY), location.y + height >= boundsY + bounds.height && (arrowLocation.y += location.y + height - (boundsY + bounds.height), 
            tipLocation.y += location.y + height - (boundsY + bounds.height), location.y -= location.y + height - (boundsY + bounds.height)), 
            arrowLocation.y + this.arrowPadding / 2 > height - this.ry && (arrowLocation.y = height - this.ry - this.arrowPadding / 2, 
            tipLocation.y = height, this.tipRadius = 0), arrowLocation.y - this.arrowPadding / 2 < this.ry && (arrowLocation.y = this.ry + this.arrowPadding / 2, 
            tipLocation.y = 0, this.tipRadius = 0)) : (location.y = "Waterfall" === series.type && pointData.point.y < 0 ? location.y - pointData.point.regions[0].height : location.y, 
            location = new ChartLocation(location.x + clipX - this.elementSize.width / 2 - this.padding, location.y + clipY - this.elementSize.height - 2 * this.padding - this.arrowPadding - markerHeight), 
            arrowLocation.x = tipLocation.x = width / 2, (location.y < boundsY || series.isRectSeries && pointData.point.y < 0 && "Waterfall" !== series.type) && (location.y = (symbolLocation.y < 0 ? 0 : symbolLocation.y) + clipY + markerHeight), 
            location.y + height + this.arrowPadding > boundsY + bounds.height && (location.y = (symbolLocation.y > bounds.height ? bounds.height : symbolLocation.y) + clipY - this.elementSize.height - 2 * this.padding - this.arrowPadding - markerHeight), 
            tipLocation.x = width / 2, location.x < boundsX && (arrowLocation.x -= boundsX - location.x, 
            tipLocation.x -= boundsX - location.x, location.x = boundsX), location.x + width > boundsX + bounds.width && (arrowLocation.x += location.x + width - (boundsX + bounds.width), 
            tipLocation.x += location.x + width - (boundsX + bounds.width), location.x -= location.x + width - (boundsX + bounds.width)), 
            arrowLocation.x + this.arrowPadding / 2 > width - this.rx && (arrowLocation.x = width - this.rx - this.arrowPadding / 2, 
            tipLocation.x = width, this.tipRadius = 0), arrowLocation.x - this.arrowPadding / 2 < this.rx && (arrowLocation.x = this.rx + this.arrowPadding / 2, 
            tipLocation.x = 0, this.tipRadius = 0)), new Rect(location.x, location.y, width, height);
        }, BaseTooltip.prototype.progressAnimation = function(element, tooltipGroup, series, opacity, rectOpacity, timeStamp, isRect, shared) {
            tooltipGroup.style.animation = "", tooltipGroup.setAttribute("opacity", (opacity - timeStamp).toString()), 
            element && isRect && !shared && element.setAttribute("opacity", (rectOpacity + rectOpacity * timeStamp).toString());
        }, BaseTooltip.prototype.endAnimation = function(element, tooltipGroup, series, shared) {
            this.currentPoints = [], element && series.isRectSeries && element.setAttribute("opacity", series.opacity.toString()), 
            this.removeHighlight(this.control), tooltipGroup.setAttribute("opacity", "0"), this.control.tooltip.template && !shared && (tooltipGroup.style.display = "none"), 
            this.isComplete = !0, this.control.trigger("animationComplete", {});
        }, BaseTooltip.prototype.removeHighlight = function(chart) {
            for (var item, i = 0, len = this.previousPoints.length; i < len; i++) (item = this.previousPoints[i]).series.isRectSeries ? item.series.visible && this.highlightPoint(item.series, item.point.index, !1) : item.series.marker.visible || "Scatter" === item.series.type || "Bubble" === item.series.type || (this.previousPoints.shift(), 
            len -= 1);
        }, BaseTooltip.prototype.highlightPoint = function(series, pointIndex, highlight) {
            var element = this.getElement(this.element.id + "_Series_" + series.index + "_Point_" + pointIndex);
            element && element.setAttribute("opacity", (highlight ? series.opacity / 2 : series.opacity).toString());
        }, BaseTooltip.prototype.highlightPoints = function(item) {
            if (item.series.isRectSeries) return this.highlightPoint(item.series, item.point.index, !0), 
            null;
        }, BaseTooltip.prototype.animateTooltipDiv = function(tooltipDiv, rect) {
            var currenDiff, _this = this, x = parseFloat(tooltipDiv.style.left), y = parseFloat(tooltipDiv.style.top);
            new Animation({}).animate(tooltipDiv, {
                duration: 300,
                progress: function(args) {
                    currenDiff = args.timeStamp / args.duration, tooltipDiv.style.animation = null, 
                    tooltipDiv.style.left = x + currenDiff * (rect.x - x) + "px", tooltipDiv.style.top = y + currenDiff * (rect.y - y) + "px";
                },
                end: function(model) {
                    _this.updateDiv(tooltipDiv, rect.x, rect.y);
                }
            });
        }, BaseTooltip.prototype.updateDiv = function(tooltipDiv, x, y) {
            tooltipDiv.style.left = x + "px", tooltipDiv.style.top = y + "px";
        }, BaseTooltip.prototype.triggerEvent = function(point, isFirst, textCollection, firstText) {
            void 0 === firstText && (firstText = !0);
            var argsData = {
                cancel: !1,
                name: "tooltipRender",
                text: textCollection,
                point: point.point,
                series: point.series,
                textStyle: this.textStyle
            };
            return this.chart.trigger("tooltipRender", argsData), argsData.cancel || ("BoxAndWhisker" === point.series.type && (this.removeText(), 
            !0), this.formattedText = this.formattedText.concat(argsData.text)), !argsData.cancel;
        }, BaseTooltip.prototype.removeText = function() {
            this.textElements = [];
            var element = this.getElement(this.element.id + "_tooltip_group");
            if (element.childNodes.length > 0) for (;element.lastChild && 1 !== element.childNodes.length; ) element.removeChild(element.lastChild);
        }, BaseTooltip.prototype.updateTemplateFn = function(chart) {
            if (chart.tooltip.template) try {
                document.querySelectorAll(chart.tooltip.template).length && (this.templateFn = compile$$1(document.querySelector(chart.tooltip.template).innerHTML.trim()));
            } catch (e) {
                this.templateFn = compile$$1(chart.tooltip.template);
            }
        }, BaseTooltip.prototype.stopAnimation = function() {
            stopTimer(this.toolTipInterval);
        }, BaseTooltip;
    }(ChartData), Side = function() {
        return function(bottom, right) {
            this.isRight = right, this.isBottom = bottom;
        };
    }(), __extends$51 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), AccumulationTooltip = function(_super) {
        function AccumulationTooltip(accumulation) {
            var _this = _super.call(this, accumulation) || this;
            return _this.accumulation = accumulation, _this.addEventListener(), _this;
        }
        return __extends$51(AccumulationTooltip, _super), AccumulationTooltip.prototype.addEventListener = function() {
            this.accumulation.isDestroyed || (this.accumulation.on(Browser.isPointer ? "pointerleave" : "mouseleave", this.mouseLeaveHandler, this), 
            this.accumulation.on(Browser.touchMoveEvent, this.mouseMoveHandler, this), this.accumulation.on(Browser.touchEndEvent, this.mouseUpHandler, this));
        }, AccumulationTooltip.prototype.mouseLeaveHandler = function(e) {
            this.removeTooltip(1e3);
        }, AccumulationTooltip.prototype.mouseUpHandler = function(e) {
            var control = this.accumulation;
            control.tooltip.enable && control.isTouch && withInBounds(control.mouseX, control.mouseY, control.initialClipRect) && (this.tooltip(e), 
            this.removeTooltip(2e3));
        }, AccumulationTooltip.prototype.mouseMoveHandler = function(e) {
            var control = this.accumulation;
            control.tooltip.enable && withInBounds(control.mouseX, control.mouseY, control.initialClipRect) && this.tooltip(e);
        }, AccumulationTooltip.prototype.tooltip = function(event) {
            var isTooltip = this.getElement(this.element.id + "_tooltip"), tooltipDiv = this.getTooltipElement(isTooltip);
            this.renderSeriesTooltip(event, this.accumulation, !isTooltip, tooltipDiv);
        }, AccumulationTooltip.prototype.renderSeriesTooltip = function(e, chart, isFirst, tooltipDiv) {
            var data = this.getPieData(e, chart, chart.mouseX, chart.mouseY), rect = chart.initialClipRect;
            this.currentPoints = [];
            var markerSide;
            if (!data.point || this.previousPoints[0] && this.previousPoints[0].point === data.point) !data.point && this.isRemove && (this.removeTooltip(1e3), 
            this.isRemove = !1); else {
                if (this.pushData(data, isFirst, tooltipDiv, !1)) {
                    var text = this.getTooltipText(data, chart.tooltip);
                    chart.tooltip.template ? this.renderTemplate(data, rect, data.point.symbolLocation, this.getTemplateText(data), isFirst) : ("" !== this.header && this.findHeader(data), 
                    (markerSide = this.renderTooltip(data, rect, data.point.symbolLocation, text, isFirst, !1)) && this.drawMarker(markerSide.isBottom, 10)), 
                    this.isRemove = !0;
                }
                this.previousPoints = extend([], this.currentPoints, null, !0);
            }
        }, AccumulationTooltip.prototype.drawMarker = function(isBottom, size) {
            for (var shapeOption, y, series, count = 0, groupElement = this.getElement(this.element.id + "_tooltip_group"), markerGroup = this.chart.renderer.createGroup({
                id: this.element.id + "_tooltip_trackball_group"
            }), x = 2 * this.padding + size / 2, _i = 0, _a = this.currentPoints; _i < _a.length; _i++) {
                var data = _a[_i];
                series = data.series, y = this.markerPoint[count] - this.padding + (isBottom ? this.arrowPadding : 0), 
                shapeOption = new PathOption(this.element.id + "_Tooltip_Trackball_" + series.index, data.point.color, 1, "#cccccc", series.opacity, null), 
                markerGroup.appendChild(drawSymbol(new ChartLocation(x, y), "Circle", new Size(size, size), null, shapeOption, null)), 
                count++;
            }
            groupElement.appendChild(markerGroup);
        }, AccumulationTooltip.prototype.getPieData = function(e, chart, x, y) {
            var id = indexFinder(e.target.id);
            if (!isNaN(id.series)) {
                var seriesIndex = id.series, pointIndex = id.point;
                if (!(isNullOrUndefined(seriesIndex) || isNaN(seriesIndex) || isNullOrUndefined(pointIndex) || isNaN(pointIndex))) {
                    var series = this.getSeriesFromIndex(seriesIndex, chart.visibleSeries);
                    if (series.enableTooltip) return new AccPointData(series.points[pointIndex], series);
                }
            }
            return new AccPointData(null, null);
        }, AccumulationTooltip.prototype.getSeriesFromIndex = function(index, visibleSeries) {
            return visibleSeries[0];
        }, AccumulationTooltip.prototype.getTemplateText = function(data) {
            return extend({}, data.point);
        }, AccumulationTooltip.prototype.getTooltipText = function(data, tooltip) {
            var series = data.series, format = tooltip.format ? tooltip.format : "${point.x} : <b>${point.y}</b>";
            return this.parseTemplate(data.point, series, format);
        }, AccumulationTooltip.prototype.findHeader = function(data) {
            this.header = this.parseTemplate(data.point, data.series, this.header), "" !== this.header.replace(/<b>/g, "").replace(/<\/b>/g, "").trim() && (this.formattedText = this.formattedText.concat(this.header));
        }, AccumulationTooltip.prototype.parseTemplate = function(point, series, format) {
            for (var value, textValue, _i = 0, _a = Object.keys(point); _i < _a.length; _i++) {
                var dataValue = _a[_i];
                value = new RegExp("${point." + dataValue + "}", "gm"), format = format.replace(value.source, point[dataValue]);
            }
            for (var _b = 0, _c = Object.keys(Object.getPrototypeOf(series)); _b < _c.length; _b++) {
                dataValue = _c[_b];
                value = new RegExp("${series." + dataValue + "}", "gm"), textValue = series[dataValue], 
                format = format.replace(value.source, textValue);
            }
            return format;
        }, AccumulationTooltip.prototype.removeTooltip = function(duration) {
            var _this = this, chart = this.control, tooltipElement = this.getElement(this.element.id + "_tooltip");
            if (this.stopAnimation(), tooltipElement && this.previousPoints.length > 0) {
                var data_1 = this.previousPoints;
                this.toolTipInterval = setTimeout(function() {
                    var rectOpacity, series = data_1[0].series, tooltipGroup = tooltipElement.firstChild, opacity = parseFloat(tooltipGroup.getAttribute("opacity")) || 1, element = _this.getElement(chart.element.id + "_Series_" + data_1[0].series.index + "_Point_" + data_1[0].point.index);
                    element && (rectOpacity = parseFloat(element.getAttribute("opacity"))), new Animation({}).animate(tooltipGroup, {
                        duration: 200,
                        progress: function(args) {
                            _this.progressAnimation(element, tooltipGroup, series, opacity, rectOpacity, args.timeStamp / args.duration, series.isRectSeries, !1);
                        },
                        end: function(model) {
                            _this.previousPoints = [], _this.endAnimation(element, tooltipGroup, series, !1);
                        }
                    });
                }, duration);
            }
        }, AccumulationTooltip.prototype.getModuleName = function() {
            return "AccumulationTooltip";
        }, AccumulationTooltip.prototype.destroy = function(chart) {}, AccumulationTooltip;
    }(BaseTooltip), BaseSelection = function() {
        function BaseSelection(control) {
            this.control = control;
        }
        return BaseSelection.prototype.seriesStyles = function() {
            var seriesclass, style = document.getElementById(this.styleId);
            if (isNullOrUndefined(style)) {
                (style = document.createElement("style")).setAttribute("id", this.styleId);
                for (var _i = 0, _a = this.control.visibleSeries; _i < _a.length; _i++) {
                    var series = _a[_i];
                    seriesclass = series.selectionStyle || this.styleId + "_series_" + series.index, 
                    style.innerHTML += series.selectionStyle ? "" : "." + seriesclass + " { } ";
                }
                style.innerHTML += "." + this.unselected + " { opacity:0.3;} ", document.body.appendChild(style);
            }
        }, BaseSelection.prototype.concatIndexes = function(userIndexes, localIndexes) {
            return userIndexes.concat(localIndexes);
        }, BaseSelection.prototype.checkVisibility = function(selectedIndexes) {
            for (var visible = !1, uniqueSeries = [], _i = 0, selectedIndexes_1 = selectedIndexes; _i < selectedIndexes_1.length; _i++) {
                var index = selectedIndexes_1[_i];
                -1 === uniqueSeries.indexOf(index.series) && uniqueSeries.push(index.series);
            }
            for (var _a = 0, uniqueSeries_1 = uniqueSeries; _a < uniqueSeries_1.length; _a++) {
                index = uniqueSeries_1[_a];
                if (this.control.series[index].visible) {
                    visible = !0;
                    break;
                }
            }
            return visible;
        }, BaseSelection.prototype.addSvgClass = function(element, className) {
            var elementClassName = element.getAttribute("class") || "";
            -1 === (elementClassName += "" !== elementClassName ? " " : "").indexOf(className) && element.setAttribute("class", elementClassName + className);
        }, BaseSelection.prototype.removeSvgClass = function(element, className) {
            var elementClassName = element.getAttribute("class") || "";
            elementClassName.indexOf(className) > -1 && element.setAttribute("class", elementClassName.replace(className, ""));
        }, BaseSelection.prototype.getChildren = function(parent) {
            for (var children = [], i = 0; i < parent.childNodes.length; i++) "defs" !== parent.childNodes[i].tagName && children.push(parent.childNodes[i]);
            return children;
        }, BaseSelection;
    }(), __extends$53 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), AccumulationSelection = function(_super) {
        function AccumulationSelection(accumulation) {
            var _this = _super.call(this, accumulation) || this;
            return _this.renderer = accumulation.renderer, _this;
        }
        return __extends$53(AccumulationSelection, _super), AccumulationSelection.prototype.initPrivateVariables = function(accumulation) {
            this.styleId = accumulation.element.id + "_ej2_chart_selection", this.unselected = accumulation.element.id + "_ej2_deselected", 
            this.selectedDataIndexes = [], this.rectPoints = null;
        }, AccumulationSelection.prototype.invokeSelection = function(accumulation) {
            this.initPrivateVariables(accumulation), this.series = extend({}, accumulation.visibleSeries, null, !0), 
            this.seriesStyles(), this.selectDataIndex(this.concatIndexes(accumulation.selectedDataIndexes, this.selectedDataIndexes), accumulation);
        }, AccumulationSelection.prototype.generateStyle = function(series) {
            return series.selectionStyle || this.styleId + "_series_" + series.index;
        }, AccumulationSelection.prototype.findElements = function(accumulation, series, index) {
            return [ this.getElementByIndex(index) ];
        }, AccumulationSelection.prototype.getElementByIndex = function(index) {
            var elementId = this.control.element.id + "_Series_" + index.series + "_Point_" + index.point;
            return document.getElementById(elementId);
        }, AccumulationSelection.prototype.calculateSelectedElements = function(accumulation, event) {
            -1 !== event.target.id.indexOf(accumulation.element.id + "_") && (event.target.id.indexOf("_Series_") > -1 || event.target.id.indexOf("_datalabel_") > -1) && this.performSelection(indexFinder(event.target.id), accumulation, event.target);
        }, AccumulationSelection.prototype.performSelection = function(index, accumulation, element) {
            switch (element = element.id.indexOf("datalabel") > -1 ? accumulation.getSeriesElement().childNodes[index.series].childNodes[index.point] : element, 
            accumulation.selectionMode) {
              case "Point":
                isNaN(index.point) || (this.selection(accumulation, index, [ element ]), this.blurEffect(accumulation.element.id, accumulation.visibleSeries));
            }
        }, AccumulationSelection.prototype.selection = function(accumulation, index, selectedElements) {
            accumulation.isMultiSelect || this.removeMultiSelectEelments(accumulation, this.selectedDataIndexes, index, accumulation.series);
            var className = selectedElements[0] && (selectedElements[0].getAttribute("class") || "");
            selectedElements[0] && className.indexOf(this.getSelectionClass(selectedElements[0].id)) > -1 ? (this.removeStyles(selectedElements, index), 
            this.addOrRemoveIndex(this.selectedDataIndexes, index)) : (this.applyStyles(selectedElements, index), 
            this.addOrRemoveIndex(this.selectedDataIndexes, index, !0));
        }, AccumulationSelection.prototype.redrawSelection = function(accumulation, oldMode) {
            var selectedDataIndexes = extend([], this.selectedDataIndexes, null, !0);
            this.removeSelectedElements(accumulation, this.selectedDataIndexes), this.blurEffect(accumulation.element.id, accumulation.visibleSeries), 
            this.selectDataIndex(selectedDataIndexes, accumulation);
        }, AccumulationSelection.prototype.removeSelectedElements = function(accumulation, indexes) {
            accumulation.getSeriesElement();
            for (var _i = 0, indexes_1 = indexes; _i < indexes_1.length; _i++) {
                var index = indexes_1[_i];
                this.removeStyles([ this.getElementByIndex(index) ], index);
            }
        }, AccumulationSelection.prototype.legendSelection = function(accumulation, series, pointIndex) {
            accumulation.getSeriesElement().childNodes[series].childNodes[pointIndex], this.generateStyle(accumulation.visibleSeries[series]);
            var seriesElements = accumulation.getSeriesElement().childNodes[series].childNodes[pointIndex];
            this.selection(accumulation, new Index(series, pointIndex), [ seriesElements ]), 
            this.blurEffect(accumulation.element.id, accumulation.visibleSeries);
        }, AccumulationSelection.prototype.selectDataIndex = function(indexes, accumulation) {
            for (var element, _i = 0, indexes_2 = indexes; _i < indexes_2.length; _i++) {
                var index = indexes_2[_i];
                (element = this.getElementByIndex(index)) && this.performSelection(index, accumulation, element);
            }
        }, AccumulationSelection.prototype.removeMultiSelectEelments = function(accumulation, index, currentIndex, seriesCollection) {
            for (var series, i = 0; i < index.length; i++) series = seriesCollection[index[i].series], 
            this.checkEquals(index[i], currentIndex) || (this.removeStyles(this.findElements(accumulation, series, index[i]), index[i]), 
            index.splice(i, 1), i--);
        }, AccumulationSelection.prototype.blurEffect = function(pieId, visibleSeries) {
            for (var visibility = this.checkPointVisibility(this.selectedDataIndexes), _i = 0, visibleSeries_1 = visibleSeries; _i < visibleSeries_1.length; _i++) {
                var series = visibleSeries_1[_i];
                series.visible && this.checkSelectionElements(document.getElementById(pieId + "_SeriesCollection"), this.generateStyle(series), visibility);
            }
        }, AccumulationSelection.prototype.checkSelectionElements = function(element, className, visibility) {
            for (var legendShape, elementClass, parentClass, children = element.childNodes[0].childNodes, i = 0; i < children.length; i++) elementClass = children[i].getAttribute("class") || "", 
            parentClass = children[i].parentNode.getAttribute("class") || "", -1 === elementClass.indexOf(className) && -1 === parentClass.indexOf(className) && visibility ? this.addSvgClass(children[i], this.unselected) : this.removeSvgClass(children[i], this.unselected), 
            this.control.accumulationLegendModule && this.control.legendSettings.visible && (legendShape = document.getElementById(this.control.element.id + "_chart_legend_shape_" + i)) && (-1 === elementClass.indexOf(className) && -1 === parentClass.indexOf(className) && visibility ? this.addSvgClass(legendShape, this.unselected) : this.removeSvgClass(legendShape, this.unselected));
        }, AccumulationSelection.prototype.applyStyles = function(elements, index) {
            for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {
                var element = elements_1[_i], legendShape = void 0;
                element && (this.control.accumulationLegendModule && this.control.legendSettings.visible && (legendShape = document.getElementById(this.control.element.id + "_chart_legend_shape_" + index.point), 
                this.removeSvgClass(legendShape, this.unselected), this.addSvgClass(legendShape, this.getSelectionClass(legendShape.id))), 
                this.removeSvgClass(element.parentNode, this.unselected), this.removeSvgClass(element, this.unselected), 
                this.addSvgClass(element, this.getSelectionClass(element.id)));
            }
        }, AccumulationSelection.prototype.getSelectionClass = function(id) {
            return this.generateStyle(this.control.series[indexFinder(id).series]);
        }, AccumulationSelection.prototype.removeStyles = function(elements, index) {
            for (var legendShape, _i = 0, elements_2 = elements; _i < elements_2.length; _i++) {
                var element = elements_2[_i];
                element && (this.control.accumulationLegendModule && this.control.legendSettings.visible && (legendShape = document.getElementById(this.control.element.id + "_chart_legend_shape_" + index.point), 
                this.removeSvgClass(legendShape, this.getSelectionClass(legendShape.id))), this.removeSvgClass(element, this.getSelectionClass(element.id)));
            }
        }, AccumulationSelection.prototype.addOrRemoveIndex = function(indexes, index, add) {
            for (var i = 0; i < indexes.length; i++) this.checkEquals(indexes[i], index) && (indexes.splice(i, 1), 
            i--);
            add && indexes.push(index);
        }, AccumulationSelection.prototype.checkEquals = function(first, second) {
            return first.point === second.point && first.series === second.series;
        }, AccumulationSelection.prototype.checkPointVisibility = function(selectedDataIndexes) {
            for (var visible = !1, _i = 0, selectedDataIndexes_1 = selectedDataIndexes; _i < selectedDataIndexes_1.length; _i++) {
                if (pointByIndex(selectedDataIndexes_1[_i].point, this.control.visibleSeries[0].points).visible) {
                    visible = !0;
                    break;
                }
            }
            return visible;
        }, AccumulationSelection.prototype.getModuleName = function() {
            return "AccumulationSelection";
        }, AccumulationSelection.prototype.destroy = function(accumulation) {}, AccumulationSelection;
    }(BaseSelection), AnnotationBase = function() {
        function AnnotationBase(control) {
            this.control = control;
        }
        return AnnotationBase.prototype.render = function(annotation, index) {
            this.isChart = "chart" === this.control.getModuleName(), this.annotation = annotation;
            return createTemplate(createElement("div", {
                id: this.control.element.id + "_Annotation_" + index,
                styles: "position: absolute;"
            }), 0, annotation.content, this.control);
        }, AnnotationBase.prototype.setAnnotationPixelValue = function(location) {
            var rect;
            return rect = "Chart" === this.annotation.region ? new Rect(0, 0, this.control.availableSize.width, this.control.availableSize.height) : this.isChart ? this.control.chartAxisLayoutPanel.seriesClipRect : this.control.series[0].accumulationBound, 
            location.x = ("string" != typeof this.annotation.x ? "number" == typeof this.annotation.x ? this.annotation.x : 0 : stringToNumber(this.annotation.x, rect.width)) + rect.x, 
            location.y = ("number" == typeof this.annotation.y ? this.annotation.y : stringToNumber(this.annotation.y, rect.height)) + rect.y, 
            !0;
        }, AnnotationBase.prototype.setAnnotationPointValue = function(location) {
            var symbolLocation = new ChartLocation(0, 0);
            if (this.isChart) {
                for (var xAxis = void 0, yAxis = void 0, chart = this.control, annotation = this.annotation, xValue = void 0, isLog = !1, xAxisName = annotation.xAxisName, yAxisName = annotation.yAxisName, isInverted = chart.requireInvertedAxis, _i = 0, _a = chart.axisCollections; _i < _a.length; _i++) {
                    var axis = _a[_i];
                    if (xAxisName === axis.name || null == xAxisName && "primaryXAxis" === axis.name) if ((xAxis = axis).valueType.indexOf("Category") > -1) {
                        var xAnnotation = "DateTimeCategory" === xAxis.valueType ? annotation.x.getTime().toString() : annotation.x;
                        if (xAxis.labels.indexOf(xAnnotation) < 0) return !1;
                        xValue = xAxis.labels.indexOf(xAnnotation);
                    } else if ("DateTime" === xAxis.valueType) {
                        var option = {
                            skeleton: "full",
                            type: "dateTime"
                        };
                        xValue = "object" == typeof this.annotation.x ? Date.parse(chart.intl.getDateParser(option)(chart.intl.getDateFormat(option)(new Date(DataUtil.parse.parseJson({
                            val: annotation.x
                        }).val)))) : 0;
                    } else xValue = +annotation.x; else (yAxisName === axis.name || null == yAxisName && "primaryYAxis" === axis.name) && (isLog = "Logarithmic" === (yAxis = axis).valueType);
                }
                return !!(xAxis && yAxis && withIn("Logarithmic" === xAxis.valueType ? logBase(xValue, xAxis.logBase) : xValue, xAxis.visibleRange)) && (symbolLocation = getPoint(xValue, withIn(isLog ? logBase(+this.annotation.y, yAxis.logBase) : +this.annotation.y, yAxis.visibleRange) ? +annotation.y : isLog ? Math.pow(yAxis.logBase, yAxis.visibleRange.max) : +annotation.y > yAxis.visibleRange.max ? yAxis.visibleRange.max : yAxis.visibleRange.min, xAxis, yAxis, isInverted), 
                location.x = symbolLocation.x + (isInverted ? yAxis.rect.x : xAxis.rect.x), location.y = symbolLocation.y + (isInverted ? xAxis.rect.y : yAxis.rect.y), 
                !0);
            }
            return this.setAccumulationPointValue(location);
        }, AnnotationBase.prototype.processAnnotation = function(annotation, index, parentElement) {
            var annotationElement, location;
            location = new ChartLocation(0, 0), annotationElement = this.render(annotation, index), 
            this["setAnnotation" + annotation.coordinateUnits + "Value"](location) && this.setElementStyle(location, annotationElement, parentElement);
        }, AnnotationBase.prototype.setAccumulationPointValue = function(location) {
            for (var point, _i = 0, _a = this.control.visibleSeries[0].points; _i < _a.length; _i++) {
                var accPoint = _a[_i];
                if ("object" == typeof accPoint.x) {
                    if (Date.parse(accPoint.x) === Date.parse(this.annotation.x) && accPoint.y === this.annotation.y) {
                        point = accPoint;
                        break;
                    }
                } else if (accPoint.x === this.annotation.x && accPoint.y === this.annotation.y) {
                    point = accPoint;
                    break;
                }
            }
            return !(!point || !point.visible) && (location.x = point.symbolLocation.x, location.y = point.symbolLocation.y, 
            !0);
        }, AnnotationBase.prototype.setElementStyle = function(location, element, parentElement) {
            var elementRect = measureElementRect(element), argsData = {
                cancel: !1,
                name: "annotationRender",
                content: element,
                location: location
            };
            this.control.trigger("annotationRender", argsData), argsData.cancel || (argsData.content.style.left = this.setAlignmentValue(this.annotation.horizontalAlignment, elementRect.width, argsData.location.x) + "px", 
            argsData.content.style.top = this.setAlignmentValue(this.annotation.verticalAlignment, elementRect.height, argsData.location.y) + "px", 
            argsData.content.setAttribute("aria-label", this.annotation.description || "Annotation"), 
            appendElement(argsData.content, parentElement));
        }, AnnotationBase.prototype.setAlignmentValue = function(alignment, size, value) {
            switch (alignment) {
              case "Top":
              case "Near":
                value -= size;
                break;

              case "Bottom":
              case "Far":
                value += 0;
                break;

              case "Middle":
              case "Center":
                value -= size / 2;
            }
            return value;
        }, AnnotationBase;
    }(), __extends$54 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), AccumulationAnnotation = function(_super) {
        function AccumulationAnnotation(control, annotations) {
            var _this = _super.call(this, control) || this;
            return _this.pie = control, _this.annotations = annotations, _this;
        }
        return __extends$54(AccumulationAnnotation, _super), AccumulationAnnotation.prototype.renderAnnotations = function(element) {
            var _this = this;
            this.parentElement = createElement("div", {
                id: this.pie.element.id + "_Annotation_Collections"
            }), this.annotations.map(function(annotation, index) {
                _this.processAnnotation(annotation, index, _this.parentElement);
            }), appendElement(this.parentElement, element);
        }, AccumulationAnnotation.prototype.getModuleName = function() {
            return "Annotation";
        }, AccumulationAnnotation.prototype.destroy = function(control) {}, AccumulationAnnotation;
    }(AnnotationBase), DoubleRange = function() {
        function DoubleRange(start, end) {
            start < end ? (this.mStart = start, this.mEnd = end) : (this.mStart = end, this.mEnd = start);
        }
        return Object.defineProperty(DoubleRange.prototype, "start", {
            get: function() {
                return this.mStart;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(DoubleRange.prototype, "end", {
            get: function() {
                return this.mEnd;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(DoubleRange.prototype, "delta", {
            get: function() {
                return this.mEnd - this.mStart;
            },
            enumerable: !0,
            configurable: !0
        }), Object.defineProperty(DoubleRange.prototype, "median", {
            get: function() {
                return this.mStart + (this.mEnd - this.mStart) / 2;
            },
            enumerable: !0,
            configurable: !0
        }), DoubleRange;
    }(), Double = function() {
        function Double(chart) {
            this.chart = chart;
        }
        return Double.prototype.calculateNumericNiceInterval = function(axis, delta, size) {
            var actualDesiredIntervalsCount = axis.getActualDesiredIntervalsCount(size), niceInterval = delta / actualDesiredIntervalsCount;
            if (null != axis.desiredIntervals) return niceInterval;
            for (var minInterval = Math.pow(10, Math.floor(logBase(niceInterval, 10))), _i = 0, _a = axis.intervalDivs; _i < _a.length; _i++) {
                var currentInterval = minInterval * _a[_i];
                if (actualDesiredIntervalsCount < delta / currentInterval) break;
                niceInterval = currentInterval;
            }
            return niceInterval;
        }, Double.prototype.getActualRange = function(axis, size) {
            this.initializeDoubleRange(axis), axis.actualRange.interval = axis.interval || this.calculateNumericNiceInterval(axis, axis.doubleRange.delta, size), 
            axis.actualRange.min = axis.doubleRange.start, axis.actualRange.max = axis.doubleRange.end;
        }, Double.prototype.initializeDoubleRange = function(axis) {
            null !== axis.minimum ? this.min = axis.minimum : null !== this.min && this.min !== Number.POSITIVE_INFINITY || (this.min = 0), 
            null !== axis.maximum ? this.max = axis.maximum : null !== this.max && this.max !== Number.NEGATIVE_INFINITY || (this.max = 5), 
            this.min === this.max && (this.max = axis.valueType.indexOf("Category") > -1 ? this.max : this.min + 1), 
            axis.doubleRange = new DoubleRange(this.min, this.max), axis.actualRange = {};
        }, Double.prototype.calculateRangeAndInterval = function(size, axis) {
            this.calculateRange(axis, size), this.getActualRange(axis, size), this.applyRangePadding(axis, size), 
            this.calculateVisibleLabels(axis, this.chart);
        }, Double.prototype.calculateRange = function(axis, size) {
            if (this.min = null, this.max = null, !axis.setRange()) for (var _i = 0, _a = axis.series; _i < _a.length; _i++) {
                var series_1 = _a[_i];
                series_1.visible && (this.paddingInterval = 0, (series_1.type.indexOf("Column") > -1 && "Horizontal" === axis.orientation || series_1.type.indexOf("Bar") > -1 && "Vertical" === axis.orientation) && ("Double" !== series_1.xAxis.valueType && "DateTime" !== series_1.xAxis.valueType || "Auto" !== series_1.xAxis.rangePadding || (this.paddingInterval = getMinPointsDelta(series_1.xAxis, axis.series) / 2)), 
                "Horizontal" === axis.orientation && (this.chart.requireInvertedAxis ? this.findMinMax(series_1.yMin, series_1.yMax) : this.findMinMax(series_1.xMin - this.paddingInterval, series_1.xMax + this.paddingInterval)), 
                "Vertical" === axis.orientation && (this.chart.requireInvertedAxis ? this.findMinMax(series_1.xMin - this.paddingInterval, series_1.xMax + this.paddingInterval) : this.findMinMax(series_1.yMin, series_1.yMax)));
            }
        }, Double.prototype.findMinMax = function(min, max) {
            (null === this.min || this.min > min) && (this.min = min), (null === this.max || this.max < max) && (this.max = max);
        }, Double.prototype.applyRangePadding = function(axis, size) {
            var start = axis.actualRange.min, end = axis.actualRange.max;
            if (!axis.setRange()) {
                var interval = axis.actualRange.interval, padding = axis.getRangePadding(this.chart);
                "Additional" === padding || "Round" === padding ? this.findAdditional(axis, start, end, interval) : "Normal" === padding ? this.findNormal(axis, start, end, interval, size) : this.updateActualRange(axis, start, end, interval);
            }
            axis.actualRange.delta = axis.actualRange.max - axis.actualRange.min, this.calculateVisibleRange(size, axis);
        }, Double.prototype.updateActualRange = function(axis, minimum, maximum, interval) {
            axis.actualRange.min = null != axis.minimum ? axis.minimum : minimum, axis.actualRange.max = null != axis.maximum ? axis.maximum : maximum, 
            axis.actualRange.interval = null != axis.interval ? axis.interval : interval;
        }, Double.prototype.findAdditional = function(axis, start, end, interval) {
            var minimum, maximum;
            minimum = Math.floor(start / interval) * interval, maximum = Math.ceil(end / interval) * interval, 
            "Additional" === axis.rangePadding && (minimum -= interval, maximum += interval), 
            this.updateActualRange(axis, minimum, maximum, interval);
        }, Double.prototype.findNormal = function(axis, start, end, interval, size) {
            var minimum, maximum, startValue = start;
            start < 0 ? (startValue = 0, .365 * interval >= interval + (minimum = start + start / 20) % interval && (minimum -= interval), 
            minimum % interval < 0 && (minimum = minimum - interval - minimum % interval)) : (minimum = start < 5 / 6 * end ? 0 : start - (end - start) / 2) % interval > 0 && (minimum -= minimum % interval), 
            .365 * interval >= interval - (maximum = end > 0 ? end + (end - startValue) / 20 : end - (end - startValue) / 20) % interval && (maximum += interval), 
            maximum % interval > 0 && (maximum = maximum + interval - maximum % interval), axis.doubleRange = new DoubleRange(minimum, maximum), 
            0 === minimum && (interval = this.calculateNumericNiceInterval(axis, axis.doubleRange.delta, size), 
            maximum = Math.ceil(maximum / interval) * interval), this.updateActualRange(axis, minimum, maximum, interval);
        }, Double.prototype.calculateVisibleRange = function(size, axis) {
            axis.visibleRange = {
                max: axis.actualRange.max,
                min: axis.actualRange.min,
                delta: axis.actualRange.delta,
                interval: axis.actualRange.interval
            }, (axis.zoomFactor < 1 || axis.zoomPosition > 0) && (axis.calculateVisibleRange(size), 
            axis.visibleRange.interval = axis.enableAutoIntervalOnZooming && "Category" !== axis.valueType ? this.calculateNumericNiceInterval(axis, axis.doubleRange.delta, size) : axis.visibleRange.interval), 
            axis.triggerRangeRender(this.chart, axis.visibleRange.min, axis.visibleRange.max, axis.visibleRange.interval);
        }, Double.prototype.calculateVisibleLabels = function(axis, chart) {
            axis.visibleLabels = [];
            var tempInterval = axis.visibleRange.min;
            (axis.zoomFactor < 1 || axis.zoomPosition > 0 || this.paddingInterval) && (tempInterval = axis.visibleRange.min - axis.visibleRange.min % axis.visibleRange.interval);
            var format = this.getFormat(axis), isCustom = null !== format.match("{value}");
            for (axis.format = chart.intl.getNumberFormat({
                format: isCustom ? "" : format,
                useGrouping: chart.useGroupingSeparator
            }), axis.startLabel = axis.format(axis.visibleRange.min), axis.endLabel = axis.format(axis.visibleRange.max); tempInterval <= axis.visibleRange.max; tempInterval += axis.visibleRange.interval) withIn(tempInterval, axis.visibleRange) && axis.triggerLabelRender(chart, tempInterval, this.formatValue(axis, isCustom, format, tempInterval), axis.labelStyle);
            axis.getMaxLabelWidth(chart);
        }, Double.prototype.getFormat = function(axis) {
            return axis.labelFormat ? axis.labelFormat : axis.isStack100 ? "{value}%" : "";
        }, Double.prototype.formatValue = function(axis, isCustom, format, tempInterval) {
            return isCustom ? format.replace("{value}", axis.format(tempInterval)) : axis.format(tempInterval);
        }, Double;
    }(), __extends$57 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$43 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, ChartAnnotationSettings = function(_super) {
        function ChartAnnotationSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$57(ChartAnnotationSettings, _super), __decorate$43([ Property("0") ], ChartAnnotationSettings.prototype, "x", void 0), 
        __decorate$43([ Property("0") ], ChartAnnotationSettings.prototype, "y", void 0), 
        __decorate$43([ Property(null) ], ChartAnnotationSettings.prototype, "content", void 0), 
        __decorate$43([ Property("Center") ], ChartAnnotationSettings.prototype, "horizontalAlignment", void 0), 
        __decorate$43([ Property("Pixel") ], ChartAnnotationSettings.prototype, "coordinateUnits", void 0), 
        __decorate$43([ Property("Chart") ], ChartAnnotationSettings.prototype, "region", void 0), 
        __decorate$43([ Property("Middle") ], ChartAnnotationSettings.prototype, "verticalAlignment", void 0), 
        __decorate$43([ Property(null) ], ChartAnnotationSettings.prototype, "xAxisName", void 0), 
        __decorate$43([ Property(null) ], ChartAnnotationSettings.prototype, "yAxisName", void 0), 
        __decorate$43([ Property(null) ], ChartAnnotationSettings.prototype, "description", void 0), 
        ChartAnnotationSettings;
    }(ChildProperty), LabelBorder = function(_super) {
        function LabelBorder() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$57(LabelBorder, _super), __decorate$43([ Property("") ], LabelBorder.prototype, "color", void 0), 
        __decorate$43([ Property(1) ], LabelBorder.prototype, "width", void 0), __decorate$43([ Property("Rectangle") ], LabelBorder.prototype, "type", void 0), 
        LabelBorder;
    }(ChildProperty), MultiLevelCategories = function(_super) {
        function MultiLevelCategories() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$57(MultiLevelCategories, _super), __decorate$43([ Property(null) ], MultiLevelCategories.prototype, "start", void 0), 
        __decorate$43([ Property(null) ], MultiLevelCategories.prototype, "end", void 0), 
        __decorate$43([ Property("") ], MultiLevelCategories.prototype, "text", void 0), 
        __decorate$43([ Property(null) ], MultiLevelCategories.prototype, "maximumTextWidth", void 0), 
        MultiLevelCategories;
    }(ChildProperty), StripLineSettings = function(_super) {
        function StripLineSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$57(StripLineSettings, _super), __decorate$43([ Property(!0) ], StripLineSettings.prototype, "visible", void 0), 
        __decorate$43([ Property(!1) ], StripLineSettings.prototype, "startFromAxis", void 0), 
        __decorate$43([ Property(null) ], StripLineSettings.prototype, "start", void 0), 
        __decorate$43([ Property(null) ], StripLineSettings.prototype, "end", void 0), __decorate$43([ Property(null) ], StripLineSettings.prototype, "size", void 0), 
        __decorate$43([ Property("#808080") ], StripLineSettings.prototype, "color", void 0), 
        __decorate$43([ Complex({
            color: "transparent",
            width: 1
        }, Border) ], StripLineSettings.prototype, "border", void 0), __decorate$43([ Property("") ], StripLineSettings.prototype, "text", void 0), 
        __decorate$43([ Property(null) ], StripLineSettings.prototype, "rotation", void 0), 
        __decorate$43([ Property("Middle") ], StripLineSettings.prototype, "horizontalAlignment", void 0), 
        __decorate$43([ Property("Middle") ], StripLineSettings.prototype, "verticalAlignment", void 0), 
        __decorate$43([ Complex(Theme.stripLineLabelFont, Font) ], StripLineSettings.prototype, "textStyle", void 0), 
        __decorate$43([ Property("Behind") ], StripLineSettings.prototype, "zIndex", void 0), 
        __decorate$43([ Property(1) ], StripLineSettings.prototype, "opacity", void 0), 
        StripLineSettings;
    }(ChildProperty), MultiLevelLabels = function(_super) {
        function MultiLevelLabels() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$57(MultiLevelLabels, _super), __decorate$43([ Property("Center") ], MultiLevelLabels.prototype, "alignment", void 0), 
        __decorate$43([ Property("Wrap") ], MultiLevelLabels.prototype, "overflow", void 0), 
        __decorate$43([ Complex(Theme.axisLabelFont, Font) ], MultiLevelLabels.prototype, "textStyle", void 0), 
        __decorate$43([ Complex({
            color: null,
            width: 1,
            type: "Rectangle"
        }, LabelBorder) ], MultiLevelLabels.prototype, "border", void 0), __decorate$43([ Collection([], MultiLevelCategories) ], MultiLevelLabels.prototype, "categories", void 0), 
        MultiLevelLabels;
    }(ChildProperty), __extends$56 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$42 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, Row = function(_super) {
        function Row() {
            var _this = null !== _super && _super.apply(this, arguments) || this;
            return _this.axes = [], _this.nearSizes = [], _this.farSizes = [], _this;
        }
        return __extends$56(Row, _super), Row.prototype.computeSize = function(axis, clipRect) {
            var width = 0;
            axis.visible && (width += axis.findTickSize(axis.crossInAxis) + axis.findLabelSize(axis.crossInAxis, 5) + axis.lineStyle.width / 2), 
            axis.opposedPosition ? this.farSizes.push(width) : this.nearSizes.push(width);
        }, __decorate$42([ Property("100%") ], Row.prototype, "height", void 0), __decorate$42([ Complex({}, Border) ], Row.prototype, "border", void 0), 
        Row;
    }(ChildProperty), Column$1 = function(_super) {
        function Column() {
            var _this = null !== _super && _super.apply(this, arguments) || this;
            return _this.axes = [], _this.nearSizes = [], _this.farSizes = [], _this.padding = 0, 
            _this;
        }
        return __extends$56(Column, _super), Column.prototype.computeSize = function(axis, clipRect) {
            var height = 0;
            axis.visible && (height += axis.findTickSize(axis.crossInAxis) + axis.findLabelSize(axis.crossInAxis, 5) + axis.lineStyle.width / 2), 
            axis.opposedPosition ? this.farSizes.push(height) : this.nearSizes.push(height);
        }, __decorate$42([ Property("100%") ], Column.prototype, "width", void 0), __decorate$42([ Complex({}, Border) ], Column.prototype, "border", void 0), 
        Column;
    }(ChildProperty), MajorGridLines = function(_super) {
        function MajorGridLines() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$56(MajorGridLines, _super), __decorate$42([ Property(1) ], MajorGridLines.prototype, "width", void 0), 
        __decorate$42([ Property("") ], MajorGridLines.prototype, "dashArray", void 0), 
        __decorate$42([ Property(null) ], MajorGridLines.prototype, "color", void 0), MajorGridLines;
    }(ChildProperty), MinorGridLines = function(_super) {
        function MinorGridLines() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$56(MinorGridLines, _super), __decorate$42([ Property(.7) ], MinorGridLines.prototype, "width", void 0), 
        __decorate$42([ Property("") ], MinorGridLines.prototype, "dashArray", void 0), 
        __decorate$42([ Property(null) ], MinorGridLines.prototype, "color", void 0), MinorGridLines;
    }(ChildProperty), AxisLine = function(_super) {
        function AxisLine() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$56(AxisLine, _super), __decorate$42([ Property(1) ], AxisLine.prototype, "width", void 0), 
        __decorate$42([ Property("") ], AxisLine.prototype, "dashArray", void 0), __decorate$42([ Property(null) ], AxisLine.prototype, "color", void 0), 
        AxisLine;
    }(ChildProperty), MajorTickLines = function(_super) {
        function MajorTickLines() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$56(MajorTickLines, _super), __decorate$42([ Property(1) ], MajorTickLines.prototype, "width", void 0), 
        __decorate$42([ Property(5) ], MajorTickLines.prototype, "height", void 0), __decorate$42([ Property(null) ], MajorTickLines.prototype, "color", void 0), 
        MajorTickLines;
    }(ChildProperty), MinorTickLines = function(_super) {
        function MinorTickLines() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$56(MinorTickLines, _super), __decorate$42([ Property(.7) ], MinorTickLines.prototype, "width", void 0), 
        __decorate$42([ Property(5) ], MinorTickLines.prototype, "height", void 0), __decorate$42([ Property(null) ], MinorTickLines.prototype, "color", void 0), 
        MinorTickLines;
    }(ChildProperty), CrosshairTooltip = function(_super) {
        function CrosshairTooltip() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$56(CrosshairTooltip, _super), __decorate$42([ Property(!1) ], CrosshairTooltip.prototype, "enable", void 0), 
        __decorate$42([ Property(null) ], CrosshairTooltip.prototype, "fill", void 0), __decorate$42([ Complex(Theme.crosshairLabelFont, Font) ], CrosshairTooltip.prototype, "textStyle", void 0), 
        CrosshairTooltip;
    }(ChildProperty), Axis = function(_super) {
        function Axis() {
            var _this = null !== _super && _super.apply(this, arguments) || this;
            return _this.visibleLabels = [], _this.series = [], _this.rect = new Rect(void 0, void 0, 0, 0), 
            _this.axisBottomLine = null, _this.intervalDivs = [ 10, 5, 2, 1 ], _this.angle = _this.labelRotation, 
            _this.isStack100 = !1, _this.crossAt = null, _this.updatedRect = null, _this.multiLevelLabelHeight = 0, 
            _this;
        }
        return __extends$56(Axis, _super), Axis.prototype.findTickSize = function(crossAxis) {
            return "Inside" === this.tickPosition ? 0 : !crossAxis || crossAxis.visibleRange && !this.isInside(crossAxis.visibleRange) ? this.majorTickLines.height : 0;
        }, Axis.prototype.isInside = function(range) {
            return inside(this.crossAt, range) || !this.opposedPosition && this.crossAt >= range.max || this.opposedPosition && this.crossAt <= range.min;
        }, Axis.prototype.findLabelSize = function(crossAxis, innerPadding) {
            var titleSize = 0;
            if (this.title && (titleSize = measureText(this.title, this.titleStyle).height + innerPadding), 
            "Inside" === this.labelPosition) return titleSize + innerPadding;
            var diff, value, labelSize = titleSize + innerPadding + 10 + ("Vertical" === this.orientation ? this.maxLabelSize.width : this.maxLabelSize.height) + this.multiLevelLabelHeight;
            if (crossAxis && this.placeNextToAxisLine) {
                var range = crossAxis.visibleRange, size = "Horizontal" === crossAxis.orientation ? crossAxis.rect.width : crossAxis.rect.height;
                if (!range || !size) return 0;
                this.isInside(range) && (labelSize = (diff = (value = this.findDifference(crossAxis)) * ((size - ((diff = value * (size / range.delta)) < labelSize ? labelSize - diff : 0)) / range.delta)) < labelSize ? labelSize - diff : 0);
            }
            return labelSize;
        }, Axis.prototype.updateCrossValue = function(chart) {
            var value = this.crossAt;
            if (null === value || !this.isInside(this.crossInAxis.visibleRange)) return this.updatedRect = this.rect, 
            null;
            var range = this.crossInAxis.visibleRange;
            this.opposedPosition ? this.crossAt < range.min && (value = range.min) : this.crossAt > range.max && (value = range.max), 
            this.updatedRect = extend({}, this.rect, null, !0), "Horizontal" === this.orientation ? (value = this.crossInAxis.rect.height - valueToCoefficient(value, this.crossInAxis) * this.crossInAxis.rect.height, 
            this.updatedRect.y = this.crossInAxis.rect.y + value) : (value = valueToCoefficient(value, this.crossInAxis) * this.crossInAxis.rect.width, 
            this.updatedRect.x = this.crossInAxis.rect.x + value);
        }, Axis.prototype.findDifference = function(crossAxis) {
            var value = 0;
            return value = this.opposedPosition ? crossAxis.isInversed ? crossAxis.visibleRange.min : crossAxis.visibleRange.max : crossAxis.isInversed ? crossAxis.visibleRange.max : crossAxis.visibleRange.min, 
            Math.abs(this.crossAt - value);
        }, Axis.prototype.setRange = function() {
            return null != this.minimum && null != this.maximum;
        }, Axis.prototype.calculateVisibleRange = function(size) {
            if (this.zoomFactor < 1 || this.zoomPosition > 0) {
                var baseRange = this.actualRange, start = void 0, end = void 0;
                end = this.isInversed ? (start = this.actualRange.max - this.zoomPosition * this.actualRange.delta) - this.zoomFactor * this.actualRange.delta : (start = this.actualRange.min + this.zoomPosition * this.actualRange.delta) + this.zoomFactor * this.actualRange.delta, 
                start < baseRange.min && (end += baseRange.min - start, start = baseRange.min), 
                end > baseRange.max && (start -= end - baseRange.max, end = baseRange.max), this.doubleRange = new DoubleRange(start, end), 
                this.visibleRange.min = this.doubleRange.start, this.visibleRange.max = this.doubleRange.end, 
                this.visibleRange.delta = this.doubleRange.delta;
            }
        }, Axis.prototype.getActualDesiredIntervalsCount = function(availableSize) {
            var size = "Horizontal" === this.orientation ? availableSize.width : availableSize.height;
            if (null === this.desiredIntervals) {
                var desiredIntervalsCount = ("Horizontal" === this.orientation ? .533 : 1) * this.maximumLabels;
                return desiredIntervalsCount = Math.max(size * (desiredIntervalsCount / 100), 1);
            }
            return this.desiredIntervals;
        }, Axis.prototype.triggerLabelRender = function(chart, tempInterval, text, labelStyle) {
            var argsData;
            argsData = {
                cancel: !1,
                name: "axisLabelRender",
                axis: this,
                text: text,
                value: tempInterval,
                labelStyle: labelStyle
            }, chart.trigger("axisLabelRender", argsData), argsData.cancel || this.visibleLabels.push(new VisibleLabels(argsData.text, argsData.value, argsData.labelStyle));
        }, Axis.prototype.triggerRangeRender = function(chart, minimum, maximum, interval) {
            var argsData;
            argsData = {
                cancel: !1,
                name: "axisRangeCalculated",
                axis: this,
                minimum: minimum,
                maximum: maximum,
                interval: interval
            }, chart.trigger("axisRangeCalculated", argsData), argsData.cancel || (this.visibleRange.min = argsData.minimum, 
            this.visibleRange.max = argsData.maximum, this.visibleRange.interval = argsData.interval, 
            this.visibleRange.delta = argsData.maximum - argsData.minimum);
        }, Axis.prototype.getRangePadding = function(chart) {
            var padding = this.rangePadding;
            if ("Auto" !== padding) return padding;
            switch (this.orientation) {
              case "Horizontal":
                padding = chart.requireInvertedAxis ? this.isStack100 ? "Round" : "Normal" : "None";
                break;

              case "Vertical":
                padding = chart.requireInvertedAxis ? "None" : this.isStack100 ? "Round" : "Normal";
            }
            return padding;
        }, Axis.prototype.getMaxLabelWidth = function(chart) {
            var pointX, previousEnd = 0, isIntersect = !1;
            this.angle = this.labelRotation, this.maxLabelSize = new Size(0, 0);
            for (var label, action = this.labelIntersectAction, i = 0; i < this.visibleLabels.length; i++) if (label = this.visibleLabels[i], 
            label.size = measureText(label.text, this.labelStyle), label.size.width > this.maxLabelSize.width && (this.maxLabelSize.width = label.size.width, 
            this.rotatedLabel = label.text), label.size.height > this.maxLabelSize.height && (this.maxLabelSize.height = label.size.height), 
            "None" !== action && "Hide" !== action && "Trim" !== action && ("None" !== action || this.angle % 360 == 0) && "Horizontal" === this.orientation && this.rect.width > 0 && !isIntersect) {
                switch (pointX = valueToCoefficient(label.value, this) * this.rect.width + this.rect.x, 
                pointX -= label.size.width / 2, "Shift" === this.edgeLabelPlacement && (0 === i && pointX < this.rect.x && (pointX = this.rect.x), 
                i === this.visibleLabels.length - 1 && pointX + label.size.width > this.rect.x + this.rect.width && (pointX = this.rect.x + this.rect.width - label.size.width)), 
                action) {
                  case "MultipleRows":
                    i > 0 && this.findMultiRows(i, pointX, label);
                    break;

                  case "Rotate45":
                  case "Rotate90":
                    i > 0 && (this.isInversed ? pointX + label.size.width >= previousEnd : pointX <= previousEnd) && (this.angle = "Rotate45" === action ? 45 : 90, 
                    isIntersect = !0);
                    break;

                  default:
                    label.text = textWrap(label.text, this.rect.width / this.visibleLabels.length, this.labelStyle);
                    var height = label.size.height * label.text.length;
                    height > this.maxLabelSize.height && (this.maxLabelSize.height = height);
                }
                previousEnd = this.isInversed ? pointX : pointX + label.size.width;
            }
            0 !== this.angle && "Horizontal" === this.orientation && (this.maxLabelSize = rotateTextSize(this.labelStyle, this.rotatedLabel, this.angle, chart)), 
            chart.multiLevelLabelModule && this.multiLevelLabels.length > 0 && chart.multiLevelLabelModule.getMultilevelLabelsHeight(this);
        }, Axis.prototype.findMultiRows = function(length, currentX, currentLabel) {
            for (var label, pointX, store = [], i = length - 1; i >= 0; i--) pointX = valueToCoefficient((label = this.visibleLabels[i]).value, this) * this.rect.width + this.rect.x, 
            (this.isInversed ? currentX + currentLabel.size.width > pointX - label.size.width / 2 : currentX < pointX + label.size.width / 2) ? (store.push(label.index), 
            currentLabel.index = currentLabel.index > label.index ? currentLabel.index : label.index + 1) : currentLabel.index = store.indexOf(label.index) > -1 ? currentLabel.index : label.index;
            var height = currentLabel.size.height * currentLabel.index + 5 * (currentLabel.index - 1);
            height > this.maxLabelSize.height && (this.maxLabelSize.height = height);
        }, Axis.prototype.getModule = function(chart) {
            "Double" === this.valueType ? this.baseModule = new Double(chart) : this.baseModule = chart[firstToLowerCase(this.valueType) + "Module"];
        }, __decorate$42([ Complex(Theme.axisLabelFont, Font) ], Axis.prototype, "labelStyle", void 0), 
        __decorate$42([ Complex({}, CrosshairTooltip) ], Axis.prototype, "crosshairTooltip", void 0), 
        __decorate$42([ Property("") ], Axis.prototype, "title", void 0), __decorate$42([ Complex(Theme.axisTitleFont, Font) ], Axis.prototype, "titleStyle", void 0), 
        __decorate$42([ Property("") ], Axis.prototype, "labelFormat", void 0), __decorate$42([ Property("") ], Axis.prototype, "skeleton", void 0), 
        __decorate$42([ Property("DateTime") ], Axis.prototype, "skeletonType", void 0), 
        __decorate$42([ Property(0) ], Axis.prototype, "plotOffset", void 0), __decorate$42([ Property(!1) ], Axis.prototype, "isIndexed", void 0), 
        __decorate$42([ Property(10) ], Axis.prototype, "logBase", void 0), __decorate$42([ Property(0) ], Axis.prototype, "columnIndex", void 0), 
        __decorate$42([ Property(0) ], Axis.prototype, "rowIndex", void 0), __decorate$42([ Property(1) ], Axis.prototype, "span", void 0), 
        __decorate$42([ Property(null) ], Axis.prototype, "desiredIntervals", void 0), __decorate$42([ Property(3) ], Axis.prototype, "maximumLabels", void 0), 
        __decorate$42([ Property(1) ], Axis.prototype, "zoomFactor", void 0), __decorate$42([ Property(0) ], Axis.prototype, "zoomPosition", void 0), 
        __decorate$42([ Property(!1) ], Axis.prototype, "opposedPosition", void 0), __decorate$42([ Property(!0) ], Axis.prototype, "enableAutoIntervalOnZooming", void 0), 
        __decorate$42([ Property("Auto") ], Axis.prototype, "rangePadding", void 0), __decorate$42([ Property("Double") ], Axis.prototype, "valueType", void 0), 
        __decorate$42([ Property("None") ], Axis.prototype, "edgeLabelPlacement", void 0), 
        __decorate$42([ Property("Auto") ], Axis.prototype, "intervalType", void 0), __decorate$42([ Property("BetweenTicks") ], Axis.prototype, "labelPlacement", void 0), 
        __decorate$42([ Property("Outside") ], Axis.prototype, "tickPosition", void 0), 
        __decorate$42([ Property("Outside") ], Axis.prototype, "labelPosition", void 0), 
        __decorate$42([ Property("") ], Axis.prototype, "name", void 0), __decorate$42([ Property(!0) ], Axis.prototype, "visible", void 0), 
        __decorate$42([ Property(0) ], Axis.prototype, "minorTicksPerInterval", void 0), 
        __decorate$42([ Property(0) ], Axis.prototype, "labelRotation", void 0), __decorate$42([ Property(null) ], Axis.prototype, "crossesAt", void 0), 
        __decorate$42([ Property(!0) ], Axis.prototype, "placeNextToAxisLine", void 0), 
        __decorate$42([ Property(null) ], Axis.prototype, "crossesInAxis", void 0), __decorate$42([ Property(null) ], Axis.prototype, "minimum", void 0), 
        __decorate$42([ Property(null) ], Axis.prototype, "maximum", void 0), __decorate$42([ Property(null) ], Axis.prototype, "interval", void 0), 
        __decorate$42([ Complex({}, MajorTickLines) ], Axis.prototype, "majorTickLines", void 0), 
        __decorate$42([ Complex({}, MinorTickLines) ], Axis.prototype, "minorTickLines", void 0), 
        __decorate$42([ Complex({}, MajorGridLines) ], Axis.prototype, "majorGridLines", void 0), 
        __decorate$42([ Complex({}, MinorGridLines) ], Axis.prototype, "minorGridLines", void 0), 
        __decorate$42([ Complex({}, AxisLine) ], Axis.prototype, "lineStyle", void 0), __decorate$42([ Property("Trim") ], Axis.prototype, "labelIntersectAction", void 0), 
        __decorate$42([ Property(!1) ], Axis.prototype, "isInversed", void 0), __decorate$42([ Property(100) ], Axis.prototype, "coefficient", void 0), 
        __decorate$42([ Property(0) ], Axis.prototype, "startAngle", void 0), __decorate$42([ Property(null) ], Axis.prototype, "description", void 0), 
        __decorate$42([ Property(2) ], Axis.prototype, "tabIndex", void 0), __decorate$42([ Collection([], StripLineSettings) ], Axis.prototype, "stripLines", void 0), 
        __decorate$42([ Collection([], MultiLevelLabels) ], Axis.prototype, "multiLevelLabels", void 0), 
        __decorate$42([ Complex({
            color: null,
            width: 0,
            type: "Rectangle"
        }, LabelBorder) ], Axis.prototype, "border", void 0), Axis;
    }(ChildProperty), VisibleLabels = function() {
        return function(text, value, labelStyle, size, index) {
            void 0 === size && (size = new Size(0, 0)), void 0 === index && (index = 1), this.text = text, 
            this.originalText = text, this.value = value, this.labelStyle = labelStyle, this.size = size, 
            this.index = 1;
        };
    }(), CartesianAxisLayoutPanel = function() {
        function CartesianAxisLayoutPanel(chartModule) {
            this.chart = chartModule, this.padding = 5;
        }
        return CartesianAxisLayoutPanel.prototype.measureAxis = function(rect) {
            var chart = this.chart;
            this.crossAt(chart), this.seriesClipRect = new Rect(rect.x, rect.y, rect.width, rect.height), 
            this.initialClipRect = rect, this.leftSize = 0, this.rightSize = 0, this.topSize = 0, 
            this.bottomSize = 0, this.measureRowAxis(chart, this.initialClipRect), this.initialClipRect = subtractThickness(this.initialClipRect, new Thickness(this.leftSize, this.rightSize, 0, 0)), 
            this.measureColumnAxis(chart, this.initialClipRect), this.initialClipRect = subtractThickness(this.initialClipRect, new Thickness(0, 0, this.topSize, this.bottomSize)), 
            this.chart.delayRedraw || this.calculateAxisSize(this.initialClipRect), this.leftSize = 0, 
            this.rightSize = 0, this.topSize = 0, this.bottomSize = 0, this.measureRowAxis(chart, this.initialClipRect), 
            this.seriesClipRect = subtractThickness(this.seriesClipRect, new Thickness(this.leftSize, this.rightSize, 0, 0)), 
            this.measureColumnAxis(chart, this.initialClipRect), this.seriesClipRect = subtractThickness(this.seriesClipRect, new Thickness(0, 0, this.topSize, this.bottomSize)), 
            this.chart.delayRedraw || (chart.refreshAxis(), this.calculateAxisSize(this.seriesClipRect));
        }, CartesianAxisLayoutPanel.prototype.measureRowAxis = function(chart, rect) {
            var row;
            this.calculateRowSize(rect);
            for (var _i = 0, _a = chart.rows; _i < _a.length; _i++) {
                (row = _a[_i]).nearSizes = [], row.farSizes = [], this.arrangeAxis(row), this.measureDefinition(row, chart, new Size(chart.availableSize.width, row.computedHeight), rect), 
                this.leftSize < sum(row.nearSizes) && (this.leftSize = sum(row.nearSizes)), this.rightSize < sum(row.farSizes) && (this.rightSize = sum(row.farSizes));
            }
        }, CartesianAxisLayoutPanel.prototype.measureColumnAxis = function(chart, rect) {
            var column;
            this.calculateColumnSize(rect);
            for (var _i = 0, _a = chart.columns; _i < _a.length; _i++) {
                (column = _a[_i]).farSizes = [], column.nearSizes = [], this.arrangeAxis(column), 
                this.measureDefinition(column, chart, new Size(column.computedWidth, chart.availableSize.height), rect), 
                this.bottomSize < sum(column.nearSizes) && (this.bottomSize = sum(column.nearSizes)), 
                this.topSize < sum(column.farSizes) && (this.topSize = sum(column.farSizes));
            }
        }, CartesianAxisLayoutPanel.prototype.measureDefinition = function(definition, chart, size, clipRect) {
            for (var _i = 0, _a = definition.axes; _i < _a.length; _i++) {
                var axis_1 = _a[_i];
                axis_1.getModule(chart), axis_1.baseModule.calculateRangeAndInterval(size, axis_1), 
                definition.computeSize(axis_1, clipRect);
            }
            definition.farSizes.length > 0 && (definition.farSizes[definition.farSizes.length - 1] -= 10), 
            definition.nearSizes.length > 0 && (definition.nearSizes[definition.nearSizes.length - 1] -= 10);
        }, CartesianAxisLayoutPanel.prototype.calculateAxisSize = function(rect) {
            var row, column, definition, axis, x, y, chart = this.chart, nearCount = 0, farCount = 0, size = 0;
            this.calculateRowSize(rect);
            for (var i = 0, len = chart.rows.length; i < len; i++) {
                nearCount = 0, farCount = 0;
                for (var j = 0, len_1 = (row = chart.rows[i]).axes.length; j < len_1; j++) {
                    if (0 === (axis = row.axes[j]).rect.height) {
                        axis.rect.height = row.computedHeight, size = 0;
                        for (var k = i + 1, len_2 = i + axis.span; k < len_2; k++) size += (definition = chart.rows[k]).computedHeight;
                        axis.rect.y = row.computedTop - size + axis.plotOffset, axis.rect.height = axis.rect.height + size - 2 * axis.plotOffset, 
                        axis.rect.width = 0;
                    }
                    axis.opposedPosition ? (x = rect.x + rect.width + sum(subArray(row.farSizes, farCount)), 
                    axis.rect.x = axis.rect.x >= x ? axis.rect.x : x, farCount++) : (x = rect.x - sum(subArray(row.nearSizes, nearCount)), 
                    axis.rect.x = axis.rect.x <= x ? axis.rect.x : x, nearCount++);
                }
            }
            this.calculateColumnSize(rect);
            for (i = 0, len = chart.columns.length; i < len; i++) {
                nearCount = 0, farCount = 0;
                j = 0;
                for (var len_3 = (column = chart.columns[i]).axes.length; j < len_3; j++) {
                    if (0 === (axis = column.axes[j]).rect.width) {
                        k = i;
                        for (var len_4 = i + axis.span; k < len_4; k++) definition = chart.columns[k], axis.rect.width += definition.computedWidth;
                        axis.rect.x = column.computedLeft + axis.plotOffset, axis.rect.width -= 2 * axis.plotOffset, 
                        axis.rect.height = 0;
                    }
                    axis.opposedPosition ? (y = rect.y - sum(subArray(column.farSizes, farCount)), axis.rect.y = axis.rect.y <= y ? axis.rect.y : y, 
                    farCount++) : (y = rect.y + rect.height + sum(subArray(column.nearSizes, nearCount)), 
                    axis.rect.y = axis.rect.y >= y ? axis.rect.y : y, nearCount++);
                }
            }
        }, CartesianAxisLayoutPanel.prototype.measure = function() {
            for (var row, column, definition, actualIndex, span, chart = this.chart, _i = 0, _a = chart.axisCollections; _i < _a.length; _i++) {
                var axis_2 = _a[_i];
                if ("Vertical" === axis_2.orientation) {
                    chart.verticalAxes.push(axis_2), actualIndex = this.getActualRow(axis_2), row = chart.rows[actualIndex], 
                    this.pushAxis(row, axis_2), span = actualIndex + axis_2.span > chart.rows.length ? chart.rows.length : actualIndex + axis_2.span;
                    for (var j = actualIndex + 1; j < span; j++) (definition = chart.rows[j]).axes[row.axes.length - 1] = axis_2, 
                    chart.rows[j] = definition;
                    chart.rows[actualIndex] = row;
                } else {
                    chart.horizontalAxes.push(axis_2), actualIndex = this.getActualColumn(axis_2), column = chart.columns[actualIndex], 
                    this.pushAxis(column, axis_2), span = actualIndex + axis_2.span > chart.columns.length ? chart.columns.length : actualIndex + axis_2.span;
                    for (j = actualIndex + 1; j < span; j++) (definition = chart.columns[j]).axes[column.axes.length - 1] = axis_2, 
                    chart.columns[j] = definition;
                    chart.columns[actualIndex] = column;
                }
            }
        }, CartesianAxisLayoutPanel.prototype.crossAt = function(chart) {
            for (var _i = 0, _a = chart.axisCollections; _i < _a.length; _i++) {
                var axis = _a[_i];
                if (null !== axis.crossesAt) {
                    chart.isTransposed;
                    if (axis.crossesInAxis) for (var i = 2, len = chart.axisCollections.length; i < len; i++) axis.crossesInAxis !== chart.axisCollections[i].name || (axis.crossInAxis = chart.axisCollections[i], 
                    axis.crossAt = this.updateCrossAt(axis.crossInAxis, axis.crossesAt)); else chart.requireInvertedAxis ? axis.crossInAxis = "Horizontal" === axis.orientation ? chart.primaryXAxis : chart.primaryYAxis : axis.crossInAxis = "Horizontal" === axis.orientation ? chart.primaryYAxis : chart.primaryXAxis, 
                    axis.crossAt = this.updateCrossAt(axis.crossInAxis, axis.crossesAt);
                }
            }
        }, CartesianAxisLayoutPanel.prototype.updateCrossAt = function(axis, crossAt) {
            switch (axis.valueType) {
              case "DateTime":
                var option = {
                    skeleton: "full",
                    type: "dateTime"
                }, dateParser = this.chart.intl.getDateParser(option), dateFormatter = this.chart.intl.getDateFormat(option);
                return Date.parse(dateParser(dateFormatter(new Date(DataUtil.parse.parseJson({
                    val: crossAt
                }).val))));

              case "Category":
                return parseFloat(crossAt) ? parseFloat(crossAt) : axis.labels.indexOf(crossAt);

              case "Logarithmic":
                return logBase(crossAt, axis.logBase);

              default:
                return crossAt;
            }
        }, CartesianAxisLayoutPanel.prototype.pushAxis = function(definition, axis) {
            for (var i = 0, len = definition.axes.length; i <= len; i++) if (!definition.axes[i]) {
                definition.axes[i] = axis;
                break;
            }
        }, CartesianAxisLayoutPanel.prototype.arrangeAxis = function(definition) {
            for (var axisCollection = [], i = 0, len = definition.axes.length; i <= len; i++) definition.axes[i] && axisCollection.push(definition.axes[i]);
            definition.axes = axisCollection;
        }, CartesianAxisLayoutPanel.prototype.getActualColumn = function(axis) {
            var actualLength = this.chart.columns.length, pos = axis.columnIndex;
            return pos >= actualLength ? actualLength - 1 : pos < 0 ? 0 : pos;
        }, CartesianAxisLayoutPanel.prototype.getActualRow = function(axis) {
            var actualLength = this.chart.rows.length, pos = axis.rowIndex;
            return pos >= actualLength ? actualLength - 1 : pos < 0 ? 0 : pos;
        }, CartesianAxisLayoutPanel.prototype.calculateRowSize = function(rect) {
            for (var row, chart = this.chart, rowTop = rect.y + rect.height, height = 0, remainingHeight = Math.max(0, rect.height), i = 0, len = chart.rows.length; i < len; i++) height = -1 !== (row = chart.rows[i]).height.indexOf("%") ? Math.min(remainingHeight, rect.height * parseInt(row.height, 10) / 100) : Math.min(remainingHeight, parseInt(row.height, 10)), 
            height = i !== len - 1 ? height : remainingHeight, row.computedHeight = height, 
            rowTop -= height, row.computedTop = rowTop, remainingHeight -= height;
        }, CartesianAxisLayoutPanel.prototype.calculateColumnSize = function(rect) {
            for (var column, chart = this.chart, columnLeft = rect.x, width = 0, remainingWidth = Math.max(0, rect.width), i = 0, len = chart.columns.length; i < len; i++) width = -1 !== (column = chart.columns[i]).width.indexOf("%") ? Math.min(remainingWidth, rect.width * parseInt(column.width, 10) / 100) : Math.min(remainingWidth, parseInt(column.width, 10)), 
            width = i !== len - 1 ? width : remainingWidth, column.computedWidth = width, column.computedLeft = columnLeft, 
            columnLeft += width, remainingWidth -= width;
        }, CartesianAxisLayoutPanel.prototype.renderAxes = function() {
            for (var axis, outsideElement, isInside, chart = this.chart, axisElement = chart.renderer.createGroup({
                id: chart.element.id + "AxisInsideCollection"
            }), axisLineElement = chart.renderer.createGroup({
                id: chart.element.id + "AxisOutsideCollection"
            }), i = 0, len = chart.axisCollections.length; i < len; i++) axis = chart.axisCollections[i], 
            this.element = chart.renderer.createGroup({
                id: chart.element.id + "AxisGroup" + i + "Inside"
            }), outsideElement = chart.renderer.createGroup({
                id: chart.element.id + "AxisGroup" + i + "Outside"
            }), isInside = this.findAxisPosition(axis), "Horizontal" === axis.orientation ? (axis.updateCrossValue(chart), 
            axis.visible && axis.lineStyle.width > 0 && this.drawAxisLine(axis, i, axis.plotOffset, 0, isInside ? outsideElement : this.element, axis.updatedRect), 
            (axis.majorGridLines.width > 0 || axis.majorTickLines.width > 0) && this.drawXAxisGridLine(axis, i, isInside || "Inside" === axis.tickPosition ? outsideElement : this.element, axis.updatedRect), 
            axis.visible && (this.drawXAxisLabels(axis, i, isInside || "Inside" === axis.labelPosition ? outsideElement : this.element, axis.placeNextToAxisLine ? axis.updatedRect : axis.rect), 
            this.drawXAxisBorder(axis, i, isInside || "Inside" === axis.labelPosition ? outsideElement : this.element, axis.placeNextToAxisLine ? axis.updatedRect : axis.rect), 
            this.drawXAxisTitle(axis, i, isInside ? outsideElement : this.element, axis.placeNextToAxisLine ? axis.updatedRect : axis.rect))) : (axis.updateCrossValue(chart), 
            axis.visible && axis.lineStyle.width > 0 && this.drawAxisLine(axis, i, 0, axis.plotOffset, isInside ? outsideElement : this.element, axis.updatedRect), 
            (axis.majorGridLines.width > 0 || axis.majorTickLines.width > 0) && this.drawYAxisGridLine(axis, i, isInside || "Inside" === axis.tickPosition ? outsideElement : this.element, axis.updatedRect), 
            axis.visible && (this.drawYAxisLabels(axis, i, isInside || "Inside" === axis.labelPosition ? outsideElement : this.element, axis.placeNextToAxisLine ? axis.updatedRect : axis.rect), 
            this.drawYAxisBorder(axis, i, isInside || "Inside" === axis.labelPosition ? outsideElement : this.element, axis.placeNextToAxisLine ? axis.updatedRect : axis.rect), 
            this.drawYAxisTitle(axis, i, isInside ? outsideElement : this.element, axis.placeNextToAxisLine ? axis.updatedRect : axis.rect))), 
            axisElement.appendChild(this.element), outsideElement && outsideElement.childNodes.length > 0 && axisLineElement.appendChild(outsideElement);
            this.element = chart.renderer.createGroup({
                id: chart.element.id + "DefinitionLine"
            });
            var j = 0;
            for (len = chart.rows.length; j < len; j++) {
                var row = chart.rows[j];
                row.border.color && this.drawBottomLine(row, j, !0);
            }
            for (j = 0, len = chart.columns.length; j < len; j++) {
                var column = chart.columns[j];
                column.border.color && this.drawBottomLine(column, j, !1);
            }
            return axisElement.appendChild(this.element), chart.svgObject.appendChild(axisElement), 
            axisLineElement;
        }, CartesianAxisLayoutPanel.prototype.findAxisPosition = function(axis) {
            return null !== axis.crossAt && axis.isInside(axis.crossInAxis.visibleRange);
        }, CartesianAxisLayoutPanel.prototype.drawBottomLine = function(definition, index, isRow) {
            var x1, x2, y1, y2, definitionName, chart = this.chart, optionsLine = {};
            isRow ? (y1 = y2 = (definition = definition).computedTop + definition.computedHeight, 
            x2 = (x1 = this.seriesClipRect.x) + this.seriesClipRect.width, definitionName = "Row") : (x1 = x2 = (definition = definition).computedLeft, 
            y2 = (y1 = this.seriesClipRect.y) + this.seriesClipRect.height, definitionName = "Column"), 
            optionsLine = {
                id: chart.element.id + "_AxisBottom_" + definitionName + index,
                x1: x1,
                y1: y1,
                x2: x2,
                y2: y2,
                "stroke-width": definition.border.width,
                stroke: definition.border.color
            }, this.htmlObject = chart.renderer.drawLine(optionsLine), this.element.appendChild(this.htmlObject);
        }, CartesianAxisLayoutPanel.prototype.drawAxisLine = function(axis, index, plotX, plotY, parent, rect) {
            var chart = this.chart, optionsLine = {};
            optionsLine = {
                id: chart.element.id + "AxisLine_" + index,
                x1: rect.x - plotX,
                y1: rect.y - plotY,
                x2: rect.x + rect.width + plotX,
                y2: rect.y + rect.height + plotY,
                "stroke-dasharray": axis.lineStyle.dashArray,
                "stroke-width": axis.lineStyle.width,
                stroke: axis.lineStyle.color || chart.themeStyle.axisLine
            }, this.htmlObject = chart.renderer.drawLine(optionsLine), parent.appendChild(this.htmlObject);
        }, CartesianAxisLayoutPanel.prototype.drawYAxisGridLine = function(axis, index, parent, rect) {
            this.chart;
            var tempInterval, minorDirection, pointY = 0, majorGrid = "", majorTick = "", minorGird = "", minorTick = "", tickSize = axis.opposedPosition ? axis.majorTickLines.height : -axis.majorTickLines.height, axisLineSize = axis.opposedPosition ? axis.lineStyle.width / 2 : -axis.lineStyle.width / 2, ticksbwtLabel = "Category" === axis.valueType && "BetweenTicks" === axis.labelPlacement ? .5 : 0, ticks = "Inside" === axis.tickPosition ? rect.x - tickSize - axisLineSize : rect.x + tickSize + axisLineSize, length = axis.visibleLabels.length;
            axis.valueType.indexOf("Category") && "BetweenTicks" === axis.labelPlacement && length > 0 && (length += 1);
            for (var i = 0; i < length; i++) (pointY = -1 * (pointY = valueToCoefficient(tempInterval = axis.visibleLabels[i] ? axis.visibleLabels[i].value - ticksbwtLabel : axis.visibleLabels[i - 1].value + axis.visibleRange.interval - ticksbwtLabel, axis) * rect.height) + (rect.y + rect.height)) >= rect.y && rect.y + rect.height >= pointY && ((inside(tempInterval, axis.visibleRange) || this.isBorder(axis, i, pointY)) && (majorGrid = majorGrid.concat("M " + this.seriesClipRect.x + " " + pointY + " L " + (this.seriesClipRect.x + this.seriesClipRect.width) + " " + pointY + " ")), 
            majorTick = majorTick.concat("M " + (rect.x + axisLineSize) + " " + pointY + " L " + ticks + " " + pointY + " ")), 
            (axis.minorGridLines.width > 0 || axis.minorTickLines.width > 0) && axis.minorTicksPerInterval > 0 && (minorGird = (minorDirection = this.drawAxisMinorLine(axis, tempInterval, minorGird, minorTick, rect, i))[0], 
            minorTick = minorDirection[1]);
            this.renderGridLine(axis, index, majorGrid, minorGird), this.renderTickLine(axis, index, majorTick, minorTick, parent);
        }, CartesianAxisLayoutPanel.prototype.isBorder = function(axis, index, value) {
            var border = this.chart.chartArea.border, rect = this.seriesClipRect, orientation = axis.orientation, start = "Horizontal" === orientation ? rect.x : rect.y, size = "Horizontal" === orientation ? rect.width : rect.height, startIndex = "Horizontal" === orientation ? 0 : axis.visibleLabels.length - 1, endIndex = "Horizontal" === orientation ? axis.visibleLabels.length - 1 : 0;
            return axis.plotOffset > 0 || ((value === start || value === start + size) && (border.width <= 0 || "transparent" === border.color) || (value !== start && index === startIndex || value !== start + size && index === endIndex));
        }, CartesianAxisLayoutPanel.prototype.drawYAxisLabels = function(axis, index, parent, rect) {
            var elementSize, options, chart = this.chart, pointX = 0, pointY = 0, isLabelInside = "Inside" === axis.labelPosition, isOpposed = (axis.tickPosition, 
            axis.opposedPosition), padding = (axis.labelPosition === axis.tickPosition ? axis.majorTickLines.height : 0) + this.padding + axis.lineStyle.width / 2;
            padding = axis.opposedPosition ? padding : -padding;
            for (var anchor = isOpposed && isLabelInside || !isOpposed && !isLabelInside ? "end" : "start", labelElement = chart.renderer.createGroup({
                id: chart.element.id + "AxisLabels" + index
            }), i = 0, len = axis.visibleLabels.length; i < len; i++) {
                if (pointX = isLabelInside ? rect.x - padding : rect.x + padding, elementSize = axis.visibleLabels[i].size, 
                pointY = valueToCoefficient(axis.visibleLabels[i].value, axis) * rect.height, pointY = Math.floor(-1 * pointY + (rect.y + rect.height)), 
                options = new TextOption(chart.element.id + index + "_AxisLabel_" + i, pointX, pointY + elementSize.height / 4, anchor, axis.visibleLabels[i].text), 
                axis.edgeLabelPlacement) switch (axis.edgeLabelPlacement) {
                  case "None":
                    break;

                  case "Hide":
                    ((0 === i || axis.isInversed && i === len - 1) && options.y > rect.y + rect.height || (i === len - 1 || axis.isInversed && 0 === i) && options.y - elementSize.height / 2 < rect.y) && (options.text = "");
                    break;

                  case "Shift":
                    (0 === i || axis.isInversed && i === len - 1) && options.y > rect.y + rect.height ? options.y = pointY = rect.y + rect.height : (i === len - 1 || axis.isInversed && 0 === i) && options.y - elementSize.height / 2 < rect.y && (options.y = pointY = rect.y + elementSize.height / 2);
                }
                textElement(options, axis.labelStyle, axis.labelStyle.color || chart.themeStyle.axisLabel, labelElement);
            }
            chart.delayRedraw ? axis.visible && this.createZoomingLabel(this.chart, labelElement, axis, index, rect) : parent.appendChild(labelElement);
        }, CartesianAxisLayoutPanel.prototype.drawYAxisBorder = function(axis, index, parent, rect) {
            if (axis.border.width > 0) {
                for (var startY = void 0, pointY = void 0, gap = rect.height / axis.visibleRange.delta * ("DateTime" === axis.valueType ? axis.dateTimeInterval : axis.visibleRange.interval), endY = void 0, length_1 = axis.maxLabelSize.width + 10 + (axis.tickPosition === axis.labelPosition ? axis.majorTickLines.height : 0), labelBorder = "", ticksbwtLabel = "Category" === axis.valueType && "BetweenTicks" === axis.labelPlacement ? -.5 : 0, endX = axis.opposedPosition && "Inside" === axis.labelPosition || !axis.opposedPosition && "Outside" === axis.labelPosition ? rect.x - length_1 : rect.x + length_1, i = 0; i < axis.visibleLabels.length; i++) switch (pointY = valueToCoefficient(axis.visibleLabels[i].value + ticksbwtLabel, axis), 
                pointY = (axis.isInversed ? 1 - pointY : pointY) * rect.height, "Category" === axis.valueType && "BetweenTicks" === axis.labelPlacement ? (startY = Math.floor(-1 * pointY + (rect.y + rect.height)), 
                endY = Math.floor(-1 * pointY - gap + (rect.y + rect.height))) : (startY = Math.floor(-1 * pointY + gap / 2 + (rect.y + rect.height)), 
                endY = Math.floor(-1 * pointY - gap / 2 + (rect.y + rect.height))), axis.border.type) {
                  case "Rectangle":
                  case "WithoutTopBorder":
                    startY > rect.y + rect.height ? labelBorder += "M " + endX + " " + (rect.y + rect.height) + " L " + endX + " " + endY + " " : Math.floor(rect.y) > endY ? labelBorder += "M " + rect.x + " " + startY + " L " + endX + " " + startY + " L " + endX + " " + rect.y + " " : (labelBorder += "M " + rect.x + " " + startY + " L " + endX + " " + startY + " L " + endX + " " + endY + " ", 
                    i === axis.visibleLabels.length - 1 && (labelBorder += "M " + rect.x + " " + endY + " L " + endX + " " + endY + " "));
                    break;

                  case "WithoutTopandBottomBorder":
                    startY > rect.y + rect.height || endY < Math.floor(rect.y) || (labelBorder += "M " + rect.x + " " + startY + " L " + endX + " " + startY + " M " + endX + " " + endY + " L " + rect.x + " " + endY);
                }
                "" !== (labelBorder += "Rectangle" === axis.border.type ? "M " + rect.x + " " + rect.y + " L " + rect.x + " " + (rect.y + rect.height) + " " : "") && this.createAxisBorderElement(axis, index, labelBorder, parent);
            }
            axis.multiLevelLabels.length > 0 && this.chart.multiLevelLabelModule && this.chart.multiLevelLabelModule.renderYAxisMultiLevelLabels(axis, index, parent, rect);
        }, CartesianAxisLayoutPanel.prototype.drawYAxisTitle = function(axis, index, parent, rect) {
            var chart = this.chart, labelRotation = axis.opposedPosition ? 90 : -90, padding = (measureText(axis.title, axis.titleStyle), 
            ("Inside" === axis.tickPosition ? 0 : axis.majorTickLines.height + this.padding) + ("Inside" === axis.labelPosition ? 0 : axis.maxLabelSize.width + axis.multiLevelLabelHeight + this.padding));
            padding = axis.opposedPosition ? padding : -padding;
            var x = rect.x + padding, y = rect.y + rect.height / 2, element = textElement(new TextOption(chart.element.id + "_AxisTitle_" + index, x, y - this.padding, "middle", axis.title, "rotate(" + labelRotation + "," + x + "," + y + ")"), axis.titleStyle, axis.titleStyle.color || chart.themeStyle.axisTitle, parent);
            element.setAttribute("aria-label", axis.description || axis.title), element.setAttribute("tabindex", axis.tabIndex.toString());
        }, CartesianAxisLayoutPanel.prototype.drawXAxisGridLine = function(axis, index, parent, rect) {
            this.chart;
            var tempInterval, minorDirection, pointX = 0, majorGrid = "", majorTick = "", minorGird = "", minorTick = "", tickSize = axis.opposedPosition ? -axis.majorTickLines.height : axis.majorTickLines.height, axisLineSize = axis.opposedPosition ? -axis.lineStyle.width / 2 : axis.lineStyle.width / 2, ticksbwtLabel = axis.valueType.indexOf("Category") > -1 && "BetweenTicks" === axis.labelPlacement ? .5 : 0, length = axis.visibleLabels.length, ticks = "Inside" === axis.tickPosition ? rect.y - tickSize - axisLineSize : rect.y + tickSize + axisLineSize;
            axis.valueType.indexOf("Category") > -1 && length > 0 && "BetweenTicks" === axis.labelPlacement && (length += 1);
            for (var i = 0; i < length; i++) (pointX = valueToCoefficient(tempInterval = "DateTimeCategory" !== axis.valueType ? axis.visibleLabels[i] ? axis.visibleLabels[i].value - ticksbwtLabel : axis.visibleLabels[i - 1].value + axis.visibleRange.interval - ticksbwtLabel : axis.visibleLabels[i] ? axis.visibleLabels[i].value - ticksbwtLabel : axis.visibleRange.max, axis) * rect.width + rect.x) >= rect.x && rect.x + rect.width >= pointX && ((inside(tempInterval, axis.visibleRange) || this.isBorder(axis, i, pointX)) && (majorGrid = majorGrid.concat("M " + pointX + " " + (this.seriesClipRect.y + this.seriesClipRect.height) + " L " + pointX + " " + this.seriesClipRect.y + " ")), 
            majorTick = majorTick.concat("M " + pointX + " " + (rect.y + axisLineSize) + " L " + pointX + " " + ticks + " ")), 
            axis.minorTicksPerInterval > 0 && (axis.minorGridLines.width > 0 || axis.minorTickLines.width > 0) && (minorGird = (minorDirection = this.drawAxisMinorLine(axis, tempInterval, minorGird, minorTick, rect, i))[0], 
            minorTick = minorDirection[1]);
            this.renderGridLine(axis, index, majorGrid, minorGird), this.renderTickLine(axis, index, majorTick, minorTick, parent);
        }, CartesianAxisLayoutPanel.prototype.drawAxisMinorLine = function(axis, tempInterval, minorGird, minorTick, rect, labelIndex) {
            var logStart, value = tempInterval, coor = 0, position = 0, range = axis.visibleRange, isTickInside = "Inside" === axis.tickPosition, direction = [], tickSize = axis.opposedPosition ? -axis.minorTickLines.height : axis.minorTickLines.height, logInterval = 1, logPosition = 1, ticksX = isTickInside ? rect.y - tickSize : rect.y + tickSize, ticksY = isTickInside ? rect.x + tickSize : rect.x - tickSize;
            if ("Logarithmic" === axis.valueType && (logPosition = (logStart = Math.pow(axis.logBase, value - range.interval)) + (logInterval = (Math.pow(axis.logBase, value) - logStart) / (axis.minorTicksPerInterval + 1))), 
            "Horizontal" === axis.orientation) for (var j = 0; j < axis.minorTicksPerInterval; j++) value = this.findLogNumeric(axis, logPosition, logInterval, value, labelIndex), 
            logPosition += logInterval, inside(value, range) && (position = (value - range.min) / (range.max - range.min), 
            position = Math.ceil((axis.isInversed ? 1 - position : position) * rect.width), 
            coor = Math.floor(position + rect.x), minorGird = minorGird.concat("M " + coor + " " + this.seriesClipRect.y + "L " + coor + " " + (this.seriesClipRect.y + this.seriesClipRect.height)), 
            coor = Math.floor(position + rect.x), minorTick = minorTick.concat("M " + coor + " " + rect.y + "L " + coor + " " + ticksX)); else {
                tickSize = axis.opposedPosition ? axis.minorTickLines.height : -axis.minorTickLines.height;
                for (j = 0; j < axis.minorTicksPerInterval; j++) inside(value = this.findLogNumeric(axis, logPosition, logInterval, value, labelIndex), range) && (position = -1 * Math.ceil((value - range.min) / (range.max - range.min) * rect.height), 
                coor = Math.floor(position + rect.y + rect.height), minorGird = minorGird.concat("M " + this.seriesClipRect.x + " " + coor + "L " + (this.seriesClipRect.x + this.seriesClipRect.width) + " " + coor), 
                coor = Math.floor(position + rect.y + rect.height), minorTick = minorTick.concat("M " + rect.x + " " + coor + "L " + ticksY + " " + coor)), 
                logPosition += logInterval;
            }
            return direction.push(minorGird), direction.push(minorTick), direction;
        }, CartesianAxisLayoutPanel.prototype.findLogNumeric = function(axis, logPosition, logInterval, value, labelIndex) {
            var range = axis.visibleRange;
            if ("Logarithmic" === axis.valueType) value = logBase(logPosition, axis.logBase); else if ("DateTime" === axis.valueType) value += axis.dateTimeInterval / (axis.minorTicksPerInterval + 1); else if ("DateTimeCategory" === axis.valueType) {
                var padding = "BetweenTicks" === axis.labelPlacement ? .5 : 0;
                value += ((axis.visibleLabels[labelIndex + 1] ? axis.visibleLabels[labelIndex + 1].value - padding : axis.visibleRange.max) - (axis.visibleLabels[labelIndex] ? axis.visibleLabels[labelIndex].value - padding : axis.visibleRange.min)) / (axis.minorTicksPerInterval + 1);
            } else value += range.interval / (axis.minorTicksPerInterval + 1);
            return value;
        }, CartesianAxisLayoutPanel.prototype.drawXAxisLabels = function(axis, index, parent, rect) {
            for (var elementSize, labelPadding, rotateSize, diffHeight, angle, options, yLocation, intervalLength, label, chart = this.chart, pointX = 0, pointY = 0, labelElement = chart.renderer.createGroup({
                id: chart.element.id + "AxisLabels" + index
            }), islabelInside = (axis.labelPosition, "Inside" === axis.labelPosition), isOpposed = (axis.tickPosition, 
            axis.opposedPosition), padding = (axis.labelPosition === axis.tickPosition ? axis.majorTickLines.height : 0) + this.padding + axis.lineStyle.width / 2, anglePadding = 90 === axis.angle || -90 === axis.angle ? -2 : 0, previousEnd = axis.isInversed ? rect.x + rect.width : rect.x, width = 0, length = axis.visibleLabels.length, i = 0, len = length; i < len; i++) {
                if (label = axis.visibleLabels[i], pointX = valueToCoefficient(label.value, axis) * rect.width + rect.x, 
                elementSize = label.size, intervalLength = rect.width / length, width = ("Trim" === axis.labelIntersectAction || "Wrap" === axis.labelIntersectAction) && elementSize.width > intervalLength ? intervalLength : elementSize.width, 
                pointX -= width / 2, islabelInside && axis.angle ? pointY = isOpposed ? rect.y + padding : rect.y - padding : (labelPadding = isOpposed && !islabelInside || !isOpposed && islabelInside ? -(padding + (axis.angle ? elementSize.height / 4 * 3 + 2 * axis.maxLabelSize.height / 5 : label.index > 1 ? elementSize.height / 4 * 2 : 0)) : padding + (axis.angle ? elementSize.height / 4 * 3 + 2 * axis.maxLabelSize.height / 5 : elementSize.height / 4 * 3), 
                pointY = rect.y + labelPadding * label.index), options = new TextOption(chart.element.id + index + "_AxisLabel_" + i, pointX, pointY, ""), 
                axis.edgeLabelPlacement) switch (axis.edgeLabelPlacement) {
                  case "None":
                    break;

                  case "Hide":
                    if ((0 === i || axis.isInversed && i === len - 1) && options.x < rect.x || (i === len - 1 || axis.isInversed && 0 === i) && options.x + width > rect.x + rect.width) continue;
                    break;

                  case "Shift":
                    (0 === i || axis.isInversed && i === len - 1) && options.x < rect.x ? (intervalLength -= rect.x - options.x, 
                    options.x = pointX = rect.x) : (i === len - 1 || axis.isInversed && 0 === i) && options.x + width > rect.x + rect.width && (elementSize.width > intervalLength && "Trim" === axis.labelIntersectAction ? intervalLength -= options.x + width - (rect.x + rect.width) : intervalLength = width, 
                    options.x = pointX = rect.x + rect.width - intervalLength);
                }
                options.text = this.findAxisLabel(axis, label.text, intervalLength), axis.angle % 360 == 0 && "Hide" === axis.labelIntersectAction && 0 !== i && (axis.isInversed ? options.x + width >= previousEnd : options.x <= previousEnd) || (previousEnd = axis.isInversed ? options.x : options.x + width, 
                0 !== axis.angle && (angle = axis.angle > 360 ? axis.angle % 360 : axis.angle, rotateSize = rotateTextSize(axis.labelStyle, label.text, angle, chart), 
                diffHeight = islabelInside ? rotateSize.height : axis.maxLabelSize.height - Math.ceil(rotateSize.height - elementSize.height), 
                yLocation = axis.opposedPosition ? diffHeight / 2 : -diffHeight / 2, options.transform = "rotate(" + angle + "," + (pointX + width / 2 + anglePadding) + "," + (pointY + yLocation) + ")", 
                options.y += yLocation), textElement(options, axis.labelStyle, axis.labelStyle.color || chart.themeStyle.axisLabel, labelElement, axis.opposedPosition !== ("Inside" === axis.labelPosition)).setAttribute("style", "cursor: default"));
            }
            chart.delayRedraw ? axis.visible && this.createZoomingLabel(this.chart, labelElement, axis, index, rect) : parent.appendChild(labelElement);
        }, CartesianAxisLayoutPanel.prototype.drawXAxisBorder = function(axis, index, parent, axisRect) {
            if (axis.border.width > 0) {
                for (var startX = void 0, startY = axisRect.y, pointX = void 0, gap = axisRect.width / axis.visibleRange.delta * ("DateTime" === axis.valueType ? axis.dateTimeInterval : axis.visibleRange.interval), endX = void 0, length_2 = axis.maxLabelSize.height + (axis.tickPosition === axis.labelPosition ? axis.majorTickLines.height : 0), labelBorder = "", ticksbwtLabel = "Category" === axis.valueType && "BetweenTicks" === axis.labelPlacement ? -.5 : 0, endY = axis.opposedPosition && "Inside" === axis.labelPosition || !axis.opposedPosition && "Outside" === axis.labelPosition ? axisRect.y + length_2 + 10 : axisRect.y - length_2 - 10, i = 0; i < axis.visibleLabels.length; i++) switch (pointX = valueToCoefficient(axis.visibleLabels[i].value + ticksbwtLabel, axis), 
                pointX = (axis.isInversed ? 1 - pointX : pointX) * axisRect.width, "Category" === axis.valueType && "BetweenTicks" === axis.labelPlacement ? (startX = pointX + axisRect.x, 
                endX = pointX + gap + axisRect.x) : (startX = pointX - gap / 2 + axisRect.x, endX = pointX + gap / 2 + axisRect.x), 
                axis.border.type) {
                  case "Rectangle":
                  case "WithoutTopBorder":
                    startX < axisRect.x ? labelBorder += "M " + axisRect.x + " " + endY + " L " + endX + " " + endY + " " : Math.floor(endX) > axisRect.width + axisRect.x ? labelBorder += "M " + startX + " " + startY + " L " + startX + " " + endY + " L " + (axisRect.width + axisRect.x) + " " + endY + " " : (labelBorder += "M " + startX + " " + startY + " L " + startX + " " + endY + " L " + endX + " " + endY + " ", 
                    i === axis.visibleLabels.length - 1 && (labelBorder += "M " + endX + " " + startY + " L " + endX + " " + endY + " M " + endX + " " + endY + " L " + (axisRect.width + axisRect.x) + " " + endY));
                    break;

                  case "WithoutTopandBottomBorder":
                    startX < axisRect.x || Math.floor(endX) > axisRect.width + axisRect.x || (labelBorder += "M " + startX + " " + startY + " L " + startX + " " + endY + " M " + endX + " " + startY + " L " + endX + " " + endY);
                }
                "" !== (labelBorder += "Rectangle" === axis.border.type ? "M  " + axisRect.x + " " + startY + "L " + (axisRect.x + axisRect.width) + " " + startY : "") && this.createAxisBorderElement(axis, index, labelBorder, parent);
            }
            this.chart.multiLevelLabelModule && axis.multiLevelLabels.length > 0 && this.chart.multiLevelLabelModule.renderXAxisMultiLevelLabels(axis, index, parent, axisRect);
        }, CartesianAxisLayoutPanel.prototype.createAxisBorderElement = function(axis, index, labelBorder, parent) {
            var borderElement = this.chart.renderer.drawPath(new PathOption(this.chart.element.id + "_BorderLine_" + index, "transparent", axis.border.width, axis.border.color || this.chart.themeStyle.axisLine, 1, "", labelBorder));
            borderElement.setAttribute("style", "pointer-events: none"), parent.appendChild(borderElement);
        }, CartesianAxisLayoutPanel.prototype.findAxisLabel = function(axis, label, width) {
            switch (axis.labelIntersectAction) {
              case "Trim":
                return textTrim(width, label, axis.labelStyle);

              default:
                return label;
            }
        }, CartesianAxisLayoutPanel.prototype.drawXAxisTitle = function(axis, index, parent, rect) {
            var chart = this.chart, elementSize = measureText(axis.title, axis.titleStyle), padding = ("Inside" === axis.tickPosition ? 0 : axis.majorTickLines.height + this.padding) + ("Inside" === axis.labelPosition ? 0 : axis.maxLabelSize.height + axis.multiLevelLabelHeight + this.padding);
            padding = axis.opposedPosition ? -(padding + elementSize.height / 4) : padding + 3 * elementSize.height / 4;
            var element = textElement(new TextOption(chart.element.id + "_AxisTitle_" + index, rect.x + rect.width / 2, rect.y + padding, "middle", axis.title), axis.titleStyle, axis.titleStyle.color || chart.themeStyle.axisTitle, parent);
            element.setAttribute("aria-label", axis.description || axis.title), element.setAttribute("tabindex", axis.tabIndex.toString());
        }, CartesianAxisLayoutPanel.prototype.renderTickLine = function(axis, index, majorTick, minorTick, parent) {
            var options, chart = this.chart;
            axis.majorTickLines.width > 0 && axis.visible && (options = new PathOption(chart.element.id + "_MajorTickLine_" + index, "transparent", axis.majorTickLines.width, axis.majorTickLines.color || chart.themeStyle.majorTickLine, null, null, majorTick), 
            this.htmlObject = chart.renderer.drawPath(options), parent.appendChild(this.htmlObject)), 
            axis.minorTickLines.width > 0 && axis.visible && (options = new PathOption(chart.element.id + "_MinorTickLine_" + index, "transparent", axis.minorTickLines.width, axis.minorTickLines.color || chart.themeStyle.minorTickLine, null, null, minorTick), 
            this.htmlObject = chart.renderer.drawPath(options), parent.appendChild(this.htmlObject));
        }, CartesianAxisLayoutPanel.prototype.renderGridLine = function(axis, index, majorGrid, minorGird) {
            var options, chart = this.chart;
            axis.majorGridLines.width > 0 && (options = new PathOption(chart.element.id + "_MajorGridLine_" + index, "transparent", axis.majorGridLines.width, axis.majorGridLines.color || chart.themeStyle.majorGridLine, null, axis.majorGridLines.dashArray, majorGrid), 
            this.htmlObject = chart.renderer.drawPath(options), this.element.appendChild(this.htmlObject)), 
            axis.minorGridLines.width > 0 && (options = new PathOption(chart.element.id + "_MinorGridLine_" + index, "transparent", axis.minorGridLines.width, axis.minorGridLines.color || chart.themeStyle.minorGridLine, null, axis.minorGridLines.dashArray, minorGird), 
            this.htmlObject = chart.renderer.drawPath(options), this.element.appendChild(this.htmlObject));
        }, CartesianAxisLayoutPanel.prototype.findParentNode = function(chart, label, axis, index) {
            return null === axis.crossAt ? document.getElementById(chart.element.id + "AxisGroup" + index + "Inside") : document.getElementById(chart.element.id + "AxisGroup" + index + "Inside").contains(document.getElementById(label.id)) ? document.getElementById(chart.element.id + "AxisGroup" + index + "Inside") : document.getElementById(chart.element.id + "AxisGroup" + index + "Outside");
        }, CartesianAxisLayoutPanel.prototype.createZoomingLabel = function(chart, labelElement, axis, index, rect) {
            var parentNode = this.findParentNode(chart, labelElement, axis, index);
            labelElement.setAttribute("opacity", "0.3");
            var zoomElement = chart.renderer.createGroup({
                id: chart.element.id + "AxisLabels_Zoom" + index
            });
            zoomElement = function(chart, axis, parent, index, isVertical, rect) {
                for (var size, x, y, arrowLocation, direction, opposedPosition = axis.opposedPosition, anchor = isVertical ? "start" : "auto", chartRect = chart.availableSize.width, i = 0; i < 2; i++) size = measureText(i ? axis.endLabel : axis.startLabel, axis.labelStyle), 
                isVertical ? (arrowLocation = i ? new ChartLocation(rect.x, rect.y + 3) : new ChartLocation(axis.rect.x, rect.y + rect.height - 3), 
                x = rect.x + (opposedPosition ? rect.width + 5 : -(size.width + 5 + 5)), y = rect.y + (i ? 0 : rect.height - size.height - 5), 
                x += x < 0 || chartRect < x + size.width + 5 ? opposedPosition ? -size.width / 2 : size.width / 2 : 0, 
                direction = findDirection(3, 3, new Rect(x, y, size.width + 5, size.height + 5), arrowLocation, 5, !1, !1, !opposedPosition, arrowLocation.x, arrowLocation.y + (i ? -3 : 3))) : (arrowLocation = new ChartLocation(i ? rect.x + rect.width - 3 : rect.x + 3, rect.y + rect.height), 
                x = rect.x + (i ? rect.width - size.width - 5 : 0), y = opposedPosition ? rect.y - size.height - 10 : rect.y + rect.height + 5, 
                direction = findDirection(3, 3, new Rect(x, y, size.width + 5, size.height + 5), arrowLocation, 5, opposedPosition, !opposedPosition, !1, arrowLocation.x + (i ? 3 : -3), arrowLocation.y)), 
                x += 2.5, y = y + size.height / 4 * 3 + 2.5, parent.appendChild(chart.renderer.drawPath(new PathOption(chart.element.id + "_Zoom_" + index + "_AxisLabel_Shape_" + i, "#414141", 2, "#414141", 1, null, direction))), 
                textElement(new TextOption(chart.element.id + "_Zoom_" + index + "_AxisLabel_" + i, x, y, anchor, i ? axis.endLabel : axis.startLabel), {
                    color: "white",
                    fontFamily: "Segoe UI",
                    fontWeight: "Regular",
                    size: "11px"
                }, "white", parent);
                return parent;
            }(chart, axis, zoomElement, index, "Vertical" === axis.orientation, rect), parentNode.replaceChild(labelElement, document.getElementById(labelElement.id)), 
            getElement(chart.element.id + "AxisLabels_Zoom" + index) ? parentNode.replaceChild(zoomElement, document.getElementById(zoomElement.id)) : parentNode.appendChild(zoomElement);
        }, CartesianAxisLayoutPanel;
    }(), __extends$58 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$44 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, DataLabelSettings = function(_super) {
        function DataLabelSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$58(DataLabelSettings, _super), __decorate$44([ Property(!1) ], DataLabelSettings.prototype, "visible", void 0), 
        __decorate$44([ Property(null) ], DataLabelSettings.prototype, "name", void 0), 
        __decorate$44([ Property("transparent") ], DataLabelSettings.prototype, "fill", void 0), 
        __decorate$44([ Property(1) ], DataLabelSettings.prototype, "opacity", void 0), 
        __decorate$44([ Property("Auto") ], DataLabelSettings.prototype, "position", void 0), 
        __decorate$44([ Property(5) ], DataLabelSettings.prototype, "rx", void 0), __decorate$44([ Property(5) ], DataLabelSettings.prototype, "ry", void 0), 
        __decorate$44([ Property("Center") ], DataLabelSettings.prototype, "alignment", void 0), 
        __decorate$44([ Complex({
            width: null,
            color: null
        }, Border) ], DataLabelSettings.prototype, "border", void 0), __decorate$44([ Complex({
            left: 5,
            right: 5,
            top: 5,
            bottom: 5
        }, Margin) ], DataLabelSettings.prototype, "margin", void 0), __decorate$44([ Complex({
            size: "11px",
            color: null
        }, Font) ], DataLabelSettings.prototype, "font", void 0), __decorate$44([ Property(null) ], DataLabelSettings.prototype, "template", void 0), 
        DataLabelSettings;
    }(ChildProperty), MarkerSettings = function(_super) {
        function MarkerSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$58(MarkerSettings, _super), __decorate$44([ Property(!1) ], MarkerSettings.prototype, "visible", void 0), 
        __decorate$44([ Property("Circle") ], MarkerSettings.prototype, "shape", void 0), 
        __decorate$44([ Property("") ], MarkerSettings.prototype, "imageUrl", void 0), __decorate$44([ Property(5) ], MarkerSettings.prototype, "height", void 0), 
        __decorate$44([ Property(5) ], MarkerSettings.prototype, "width", void 0), __decorate$44([ Complex({
            width: 2,
            color: null
        }, Border) ], MarkerSettings.prototype, "border", void 0), __decorate$44([ Property(null) ], MarkerSettings.prototype, "fill", void 0), 
        __decorate$44([ Property(1) ], MarkerSettings.prototype, "opacity", void 0), __decorate$44([ Complex({}, DataLabelSettings) ], MarkerSettings.prototype, "dataLabel", void 0), 
        MarkerSettings;
    }(ChildProperty), Points = function() {
        return function() {
            this.symbolLocations = null, this.regions = null, this.regionData = null, this.marker = {
                visible: !0
            };
        };
    }(), Trendline = function(_super) {
        function Trendline() {
            var _this = null !== _super && _super.apply(this, arguments) || this;
            return _this.clipRect = new Rect(0, 0, 0, 0), _this;
        }
        return __extends$58(Trendline, _super), Trendline.prototype.setDataSource = function(series, chart) {
            series && (this.points = series.points);
            firstToLowerCase(this.type);
            chart.trendLineModule.initDataSource(this, chart), chart.visibleSeriesCount++;
        }, __decorate$44([ Property("") ], Trendline.prototype, "name", void 0), __decorate$44([ Property("Linear") ], Trendline.prototype, "type", void 0), 
        __decorate$44([ Property(2) ], Trendline.prototype, "period", void 0), __decorate$44([ Property(2) ], Trendline.prototype, "polynomialOrder", void 0), 
        __decorate$44([ Property(0) ], Trendline.prototype, "backwardForecast", void 0), 
        __decorate$44([ Property(0) ], Trendline.prototype, "forwardForecast", void 0), 
        __decorate$44([ Complex({}, Animation$1$1) ], Trendline.prototype, "animation", void 0), 
        __decorate$44([ Complex({}, MarkerSettings) ], Trendline.prototype, "marker", void 0), 
        __decorate$44([ Property(!0) ], Trendline.prototype, "enableTooltip", void 0), __decorate$44([ Property(null) ], Trendline.prototype, "intercept", void 0), 
        __decorate$44([ Property("") ], Trendline.prototype, "fill", void 0), __decorate$44([ Property(1) ], Trendline.prototype, "width", void 0), 
        __decorate$44([ Property("SeriesType") ], Trendline.prototype, "legendShape", void 0), 
        Trendline;
    }(ChildProperty), ErrorBarCapSettings = function(_super) {
        function ErrorBarCapSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$58(ErrorBarCapSettings, _super), __decorate$44([ Property(1) ], ErrorBarCapSettings.prototype, "width", void 0), 
        __decorate$44([ Property(10) ], ErrorBarCapSettings.prototype, "length", void 0), 
        __decorate$44([ Property(null) ], ErrorBarCapSettings.prototype, "color", void 0), 
        __decorate$44([ Property(1) ], ErrorBarCapSettings.prototype, "opacity", void 0), 
        ErrorBarCapSettings;
    }(ChildProperty), ChartSegment = function(_super) {
        function ChartSegment() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$58(ChartSegment, _super), __decorate$44([ Property(null) ], ChartSegment.prototype, "value", void 0), 
        __decorate$44([ Property(null) ], ChartSegment.prototype, "color", void 0), __decorate$44([ Property("0") ], ChartSegment.prototype, "dashArray", void 0), 
        ChartSegment;
    }(ChildProperty), ErrorBarSettings = function(_super) {
        function ErrorBarSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$58(ErrorBarSettings, _super), __decorate$44([ Property(!1) ], ErrorBarSettings.prototype, "visible", void 0), 
        __decorate$44([ Property("Fixed") ], ErrorBarSettings.prototype, "type", void 0), 
        __decorate$44([ Property("Both") ], ErrorBarSettings.prototype, "direction", void 0), 
        __decorate$44([ Property("Vertical") ], ErrorBarSettings.prototype, "mode", void 0), 
        __decorate$44([ Property(null) ], ErrorBarSettings.prototype, "color", void 0), 
        __decorate$44([ Property(1) ], ErrorBarSettings.prototype, "verticalError", void 0), 
        __decorate$44([ Property(1) ], ErrorBarSettings.prototype, "width", void 0), __decorate$44([ Property(1) ], ErrorBarSettings.prototype, "horizontalError", void 0), 
        __decorate$44([ Property(3) ], ErrorBarSettings.prototype, "verticalPositiveError", void 0), 
        __decorate$44([ Property(3) ], ErrorBarSettings.prototype, "verticalNegativeError", void 0), 
        __decorate$44([ Property(1) ], ErrorBarSettings.prototype, "horizontalPositiveError", void 0), 
        __decorate$44([ Property(1) ], ErrorBarSettings.prototype, "horizontalNegativeError", void 0), 
        __decorate$44([ Complex(null, ErrorBarCapSettings) ], ErrorBarSettings.prototype, "errorBarCap", void 0), 
        ErrorBarSettings;
    }(ChildProperty), SeriesBase = function(_super) {
        function SeriesBase() {
            var _this = null !== _super && _super.apply(this, arguments) || this;
            return _this.currentViewData = [], _this.clipRect = new Rect(0, 0, 0, 0), _this.seriesType = "XY", 
            _this;
        }
        return __extends$58(SeriesBase, _super), SeriesBase.prototype.processJsonData = function() {
            var i = 0, len = Object.keys(this.currentViewData).length, point = new Points(), textMappingName = this instanceof Series && this.marker.dataLabel.name ? this.marker.dataLabel.name : "";
            if (this instanceof Series && "Waterfall" === this.type && this.chart[firstToLowerCase(this.type) + "SeriesModule"].processWaterfallData(this.currentViewData, this), 
            this.points = [], this.xMin = 1 / 0, this.xMax = -1 / 0, this.yMin = 1 / 0, this.yMax = -1 / 0, 
            this.sizeMax = -1 / 0, this.getSeriesType(), "Category" === this.xAxis.valueType) for (;i < len; ) point = this.dataPoint(i, textMappingName), 
            this.pushCategoryData(point, i, point.x), this.pushData(point, i), this.setEmptyPoint(point, i), 
            i++; else if (this.xAxis.valueType.indexOf("DateTime") > -1) for (var option = {
                skeleton: "full",
                type: "dateTime"
            }, dateParser = this.chart.intl.getDateParser(option), dateFormatter = this.chart.intl.getDateFormat(option); i < len; ) (point = this.dataPoint(i, textMappingName)).x = new Date(DataUtil.parse.parseJson({
                val: point.x
            }).val), "DateTime" === this.xAxis.valueType ? point.xValue = Date.parse(dateParser(dateFormatter(point.x))) : this.pushCategoryData(point, i, Date.parse(dateParser(dateFormatter(point.x))).toString()), 
            this.pushData(point, i), this.setEmptyPoint(point, i), i++; else for (;i < len; ) (point = this.dataPoint(i, textMappingName)).xValue = point.x, 
            this.pushData(point, i), this.setEmptyPoint(point, i), i++;
            if (this instanceof Series && (this.type.indexOf("Spline") > -1 || this.drawType.indexOf("Spline") > -1 && "PolarRadar" === this.chart.chartAreaType)) {
                var isArea = this.type.indexOf("Area") > -1 || "Area" === this.drawType;
                this.chart["spline" + (isArea ? "Area" : "") + "SeriesModule"].findSplinePoint(this);
            }
        }, SeriesBase.prototype.pushData = function(point, i) {
            point.index = i, point.yValue = point.y, this.xMin = Math.min(this.xMin, point.xValue), 
            this.xMax = Math.max(this.xMax, point.xValue), this.xData.push(point.xValue);
        }, SeriesBase.prototype.dataPoint = function(i, textMappingName) {
            var point;
            this.points[i] = new Points(), point = this.points[i];
            var currentViewData = this.currentViewData;
            return point.x = getValue(this.xName, currentViewData[i]), point.high = getValue(this.high, currentViewData[i]), 
            point.low = getValue(this.low, currentViewData[i]), point.open = getValue(this.open, currentViewData[i]), 
            point.close = getValue(this.close, currentViewData[i]), point.volume = getValue(this.volume, currentViewData[i]), 
            point.interior = getValue(this.pointColorMapping, currentViewData[i]), this instanceof Series && (point.y = getValue(this.yName, currentViewData[i]), 
            point.size = getValue(this.size, currentViewData[i]), point.text = getValue(textMappingName, currentViewData[i])), 
            point;
        }, SeriesBase.prototype.setEmptyPoint = function(point, i) {
            if (!this.findVisibility(point)) return point.visible = !0, null;
            point.isEmpty = !0;
            switch (this instanceof Series ? this.emptyPointSettings.mode : "Drop") {
              case "Zero":
                point.visible = !0, this instanceof Series && this.seriesType.indexOf("HighLow") > -1 ? (point.high = point.low = 0, 
                this.seriesType.indexOf("HighLowOpenClose") > -1 && (point.open = point.close = 0)) : point.y = point.yValue = this.yData[i] = 0;
                break;

              case "Average":
                this instanceof Series && (this.seriesType.indexOf("HighLow") > -1 ? (point.high = isNullOrUndefined(point.high) ? this.getAverage(this.high, i) : point.high, 
                point.low = isNullOrUndefined(point.low) ? this.getAverage(this.low, i) : point.low, 
                this.seriesType.indexOf("HighLowOpenClose") > -1 && (point.open = isNullOrUndefined(point.open) ? this.getAverage(this.open, i) : point.open, 
                point.close = isNullOrUndefined(point.close) ? this.getAverage(this.close, i) : point.close)) : point.y = point.yValue = this.yData[i] = this.getAverage(this.yName, i)), 
                point.visible = !0;
                break;

              case "Drop":
              case "Gap":
                this.yData[i] = null, point.visible = !1;
            }
        }, SeriesBase.prototype.findVisibility = function(point) {
            var yValues;
            switch (this instanceof Series ? this.seriesType : "HighLowOpenClose") {
              case "XY":
                return this.setXYMinMax(point.yValue), this.yData.push(point.yValue), this instanceof Series && "Bubble" === this.type && (this.sizeMax = Math.max(this.sizeMax, isNullOrUndefined(point.size) ? this.sizeMax : point.size)), 
                isNullOrUndefined(point.x) || isNullOrUndefined(point.y);

              case "HighLow":
                return this.setHiloMinMax(point.high, point.low), isNullOrUndefined(point.x) || isNullOrUndefined(point.low) || isNullOrUndefined(point.high);

              case "HighLowOpenClose":
                return this.setHiloMinMax(point.high, point.low), isNullOrUndefined(point.x) || isNullOrUndefined(point.low) || isNullOrUndefined(point.open) || isNullOrUndefined(point.close) || isNullOrUndefined(point.high);

              case "BoxPlot":
                return yValues = (point.y || [ null ]).filter(function(value) {
                    return !isNullOrUndefined(value);
                }).sort(function(a, b) {
                    return a - b;
                }), point.y = yValues, this.yMin = Math.min(this.yMin, Math.min.apply(Math, yValues)), 
                this.yMax = Math.max(this.yMax, Math.max.apply(Math, yValues)), !yValues.length;
            }
        }, SeriesBase.prototype.setXYMinMax = function(yValue) {
            this.yMin = Math.min(this.yMin, isNullOrUndefined(yValue) ? this.yMin : yValue), 
            this.yMax = Math.max(this.yMax, isNullOrUndefined(yValue) ? this.yMax : yValue);
        }, SeriesBase.prototype.setHiloMinMax = function(high, low) {
            this.yMin = Math.min(this.yMin, Math.min(isNullOrUndefined(low) ? this.yMin : low, isNullOrUndefined(high) ? this.yMin : high)), 
            this.yMax = Math.max(this.yMax, Math.max(isNullOrUndefined(low) ? this.yMax : low, isNullOrUndefined(high) ? this.yMax : high));
        }, SeriesBase.prototype.getSeriesType = function() {
            var type;
            if (this instanceof Series) {
                var seriesType = "PolarRadar" === this.chart.chartAreaType ? this.drawType : this.type;
                if (seriesType) switch (seriesType) {
                  case "RangeColumn":
                  case "RangeArea":
                  case "Hilo":
                    type = "HighLow";
                    break;

                  case "HiloOpenClose":
                  case "Candle":
                    type = "HighLowOpenClose";
                    break;

                  case "BoxAndWhisker":
                    type = "BoxPlot";
                    break;

                  default:
                    type = "XY";
                }
            }
            this.seriesType = type;
        }, SeriesBase.prototype.pushCategoryData = function(point, index, pointX) {
            this.xAxis.isIndexed ? (this.xAxis.labels[index] ? this.xAxis.labels[index] += ", " + pointX : this.xAxis.labels.push(pointX), 
            point.xValue = index) : (this.xAxis.labels.indexOf(pointX) < 0 && this.xAxis.labels.push(pointX), 
            point.xValue = this.xAxis.labels.indexOf(pointX));
        }, SeriesBase.prototype.getAverage = function(member, i, data) {
            void 0 === data && (data = this.currentViewData);
            return ((data[i - 1] ? data[i - 1][member] || 0 : 0) + (data[i + 1] ? data[i + 1][member] || 0 : 0)) / 2;
        }, SeriesBase.prototype.refreshDataManager = function(chart) {
            var _this = this;
            if (this.chart = chart, !isNullOrUndefined(this.query) || isNullOrUndefined(this.dataSource)) {
                this.dataModule.getData(this.dataModule.generateQuery().requiresCount()).then(function(e) {
                    return _this.dataManagerSuccess(e, chart);
                });
            } else this.dataManagerSuccess({
                result: this.dataSource,
                count: this.dataSource.length
            }, chart, !1);
        }, SeriesBase.prototype.dataManagerSuccess = function(e, chart, isRemoteData) {
            if (void 0 === isRemoteData && (isRemoteData = !0), this.currentViewData = "" !== e.result ? e.result : [], 
            this instanceof Series) {
                var argsData = {
                    name: "seriesRender",
                    series: this,
                    data: this.currentViewData,
                    fill: this.interior
                };
                this.chart.trigger("seriesRender", argsData), this.interior = argsData.fill, this.currentViewData = argsData.data;
            }
            this.processJsonData(), this.recordsCount = e.count, this.refreshChart(isRemoteData);
        }, SeriesBase.prototype.refreshChart = function(isRemoteData) {
            var chart = this.chart;
            if (this instanceof Series && (chart.visibleSeriesCount += isRemoteData ? 1 : 0), 
            chart.refreshTechnicalIndicator(this), this instanceof Series && "TrendLine" !== this.category) for (var _i = 0, _a = this.trendlines; _i < _a.length; _i++) {
                _a[_i].setDataSource(this, chart);
            }
            chart.visibleSeries.length === chart.visibleSeriesCount && (chart.refreshBound(), 
            chart.trigger("loaded", {
                chart: chart
            })), this instanceof Series && (chart.visibleSeriesCount += isRemoteData ? 0 : 1);
        }, __decorate$44([ Property("") ], SeriesBase.prototype, "xName", void 0), __decorate$44([ Property("") ], SeriesBase.prototype, "high", void 0), 
        __decorate$44([ Property("") ], SeriesBase.prototype, "low", void 0), __decorate$44([ Property("") ], SeriesBase.prototype, "open", void 0), 
        __decorate$44([ Property("") ], SeriesBase.prototype, "close", void 0), __decorate$44([ Property("") ], SeriesBase.prototype, "volume", void 0), 
        __decorate$44([ Property("") ], SeriesBase.prototype, "pointColorMapping", void 0), 
        __decorate$44([ Property(null) ], SeriesBase.prototype, "xAxisName", void 0), __decorate$44([ Property(null) ], SeriesBase.prototype, "yAxisName", void 0), 
        __decorate$44([ Complex(null, Animation$1$1) ], SeriesBase.prototype, "animation", void 0), 
        __decorate$44([ Property(null) ], SeriesBase.prototype, "fill", void 0), __decorate$44([ Property(1) ], SeriesBase.prototype, "width", void 0), 
        __decorate$44([ Property("0") ], SeriesBase.prototype, "dashArray", void 0), __decorate$44([ Property("") ], SeriesBase.prototype, "dataSource", void 0), 
        __decorate$44([ Property() ], SeriesBase.prototype, "query", void 0), __decorate$44([ Collection([], ChartSegment) ], SeriesBase.prototype, "segments", void 0), 
        __decorate$44([ Property("X") ], SeriesBase.prototype, "segmentAxis", void 0), SeriesBase;
    }(ChildProperty), Series = function(_super) {
        function Series(parent, propName, defaultValue, isArray) {
            var _this = _super.call(this, parent, propName, defaultValue, isArray) || this;
            return _this.visibleSeriesCount = 0, _this.category = "Series", _this.isRectSeries = !1, 
            _this.drawPoints = [], _this.delayedAnimation = !1, _this;
        }
        return __extends$58(Series, _super), Series.prototype.refreshAxisLabel = function() {
            if ("Category" !== this.xAxis.valueType) return null;
            this.xAxis.labels = [];
            for (var _i = 0, _a = this.xAxis.series; _i < _a.length; _i++) {
                var item = _a[_i];
                if (item.visible) {
                    item.xMin = 1 / 0, item.xMax = -1 / 0;
                    for (var _b = 0, _c = item.points; _b < _c.length; _b++) {
                        var point = _c[_b];
                        item.pushCategoryData(point, point.index, point.x), item.xMin = Math.min(item.xMin, point.xValue), 
                        item.xMax = Math.max(item.xMax, point.xValue);
                    }
                }
            }
        }, Series.prototype.findSeriesCollection = function(column, row, isStack) {
            for (var seriesCollection = [], _i = 0, _a = row.axes; _i < _a.length; _i++) for (var _b = 0, _c = _a[_i].series; _b < _c.length; _b++) for (var rowSeries = _c[_b], _d = 0, _e = column.axes; _d < _e.length; _d++) for (var _f = 0, _g = _e[_d].series; _f < _g.length; _f++) {
                var series = _g[_f];
                series === rowSeries && series.visible && this.rectSeriesInChart(series, isStack) && seriesCollection.push(series);
            }
            return seriesCollection;
        }, Series.prototype.rectSeriesInChart = function(series, isStack) {
            var type = series.type.toLowerCase();
            return -1 !== type.indexOf("column") || -1 !== type.indexOf("bar") || -1 !== type.indexOf("hiloopenclose") || -1 !== type.indexOf("candle") || -1 !== type.indexOf("hilo") || -1 !== series.drawType.indexOf("Column") || -1 !== type.indexOf("waterfall") || -1 !== type.indexOf("boxandwhisker") || isStack;
        }, Series.prototype.calculateStackedValue = function(isStacking100, chart) {
            for (var _i = 0, _a = chart.columns; _i < _a.length; _i++) for (var columnItem = _a[_i], _b = 0, _c = chart.rows; _b < _c.length; _b++) {
                var item = _c[_b];
                this.calculateStackingValues(this.findSeriesCollection(columnItem, item, !0), isStacking100);
            }
        }, Series.prototype.calculateStackingValues = function(seriesCollection, isStacking100) {
            var startValues, endValues, stackingGroup, lastValue, value, yValues = [], lastPositive = [], lastNegative = [], frequencies = [];
            isStacking100 && (frequencies = this.findFrequencies(seriesCollection));
            for (var _i = 0, seriesCollection_1 = seriesCollection; _i < seriesCollection_1.length; _i++) {
                var series = seriesCollection_1[_i];
                if (-1 !== series.type.indexOf("Stacking") || -1 !== series.drawType.indexOf("Stacking") && "PolarRadar" === series.chart.chartAreaType) {
                    lastPositive[stackingGroup = -1 !== series.type.indexOf("StackingArea") ? "StackingArea100" : series.stackingGroup] || (lastPositive[stackingGroup] = [], 
                    lastNegative[stackingGroup] = []), yValues = series.yData, startValues = [], endValues = [];
                    for (var j = 0, pointsLength = series.points.length; j < pointsLength; j++) lastValue = 0, 
                    value = yValues[j], void 0 === lastPositive[stackingGroup][series.points[j].xValue] && (lastPositive[stackingGroup][series.points[j].xValue] = 0), 
                    void 0 === lastNegative[stackingGroup][series.points[j].xValue] && (lastNegative[stackingGroup][series.points[j].xValue] = 0), 
                    isStacking100 && (value = value / frequencies[stackingGroup][series.points[j].xValue] * 100, 
                    value = isNaN(value) ? 0 : value, series.points[j].percent = value.toFixed(2)), 
                    value >= 0 ? (lastValue = lastPositive[stackingGroup][series.points[j].xValue], 
                    lastPositive[stackingGroup][series.points[j].xValue] += value) : (lastValue = lastNegative[stackingGroup][series.points[j].xValue], 
                    lastNegative[stackingGroup][series.points[j].xValue] += value), startValues.push(lastValue), 
                    endValues.push(value + lastValue), isStacking100 && endValues[j] > 100 && (endValues[j] = 100);
                    series.stackedValues = new StackValues(startValues, endValues), series.yMin = Math.min.apply(0, startValues), 
                    series.yMax = Math.max.apply(0, endValues), series.yMin > Math.min.apply(0, endValues) && (series.yMin = isStacking100 ? -100 : Math.min.apply(0, endValues)), 
                    series.yMax < Math.max.apply(0, startValues) && (series.yMax = 0);
                }
            }
        }, Series.prototype.findFrequencies = function(seriesCollection) {
            for (var stackingGroup, frequencies = [], _i = 0, seriesCollection_2 = seriesCollection; _i < seriesCollection_2.length; _i++) {
                var series = seriesCollection_2[_i];
                if (series.yAxis.isStack100 = -1 !== series.type.indexOf("100"), -1 !== series.type.indexOf("Stacking")) {
                    frequencies[stackingGroup = -1 !== series.type.indexOf("StackingArea") ? "StackingArea100" : series.stackingGroup] || (frequencies[stackingGroup] = []);
                    for (var j = 0, pointsLength = series.points.length; j < pointsLength; j++) void 0 === frequencies[stackingGroup][series.points[j].xValue] && (frequencies[stackingGroup][series.points[j].xValue] = 0), 
                    series.yData[j] > 0 ? frequencies[stackingGroup][series.points[j].xValue] += series.yData[j] : frequencies[stackingGroup][series.points[j].xValue] -= series.yData[j];
                }
            }
            return frequencies;
        }, Series.prototype.logWithIn = function(value, axis) {
            return value = "Logarithmic" === axis.valueType ? logBase(value, axis.logBase) : value;
        }, Series.prototype.renderSeries = function(chart, index) {
            var seriesType = firstToLowerCase(this.type);
            -1 !== seriesType.indexOf("100") && (seriesType = seriesType.replace("100", "")), 
            chart[seriesType + "SeriesModule"] && ("Indicator" !== this.category && "TrendLine" !== this.category && this.createSeriesElements(chart), 
            chart[seriesType + "SeriesModule"].render(this, this.xAxis, this.yAxis, chart.requireInvertedAxis), 
            "Indicator" !== this.category && (this.errorBar.visible && this.chart.errorBarModule.render(this), 
            this.marker.dataLabel.visible && chart.dataLabelModule.render(this, this.chart, this.marker.dataLabel), 
            this.appendSeriesElement(chart.seriesElements, chart)), this.performAnimation(chart, seriesType, this.errorBar, this.marker, this.marker.dataLabel));
        }, Series.prototype.createSeriesElements = function(chart) {
            if ("Indicator" !== this.category) {
                var elementId = chart.element.id, explodeValue = (this.xAxis.rect, this.marker.border.width + 8 + 5), render = (this.yAxis.rect, 
                this.marker, chart.renderer), index = this.index, markerHeight = "Scatter" === this.type ? (this.marker.height + explodeValue) / 2 : 0, markerWidth = "Scatter" === this.type ? (this.marker.width + explodeValue) / 2 : 0;
                "PolarRadar" === chart.chartAreaType ? this.clipRectElement = render.drawCircularClipPath(new CircleOption(elementId + "_ChartSeriesClipRect_" + index, "transparent", {
                    width: 1,
                    color: "Gray"
                }, 1, this.clipRect.width / 2 + this.clipRect.x, this.clipRect.height / 2 + this.clipRect.y, chart.radius)) : this.clipRectElement = render.drawClipPath(new RectOption(elementId + "_ChartSeriesClipRect_" + index, "transparent", {
                    width: 1,
                    color: "Gray"
                }, 1, {
                    x: -markerWidth,
                    y: -markerHeight,
                    width: this.clipRect.width + 2 * markerWidth,
                    height: this.clipRect.height + 2 * markerHeight
                }));
                var transform = void 0;
                transform = "Cartesian" === chart.chartAreaType ? "translate(" + this.clipRect.x + "," + this.clipRect.y + ")" : "", 
                this.symbolElement = null, this.seriesElement = render.createGroup({
                    id: elementId + "SeriesGroup" + index,
                    transform: transform,
                    "clip-path": "url(#" + elementId + "_ChartSeriesClipRect_" + index + ")"
                }), this.seriesElement.appendChild(this.clipRectElement);
            }
        }, Series.prototype.appendSeriesElement = function(element, chart) {
            var marker = this.marker, dataLabel = marker.dataLabel;
            if ("TrendLine" !== this.category) {
                chart.seriesElements.appendChild(this.seriesElement);
                this.errorBar.visible && ("PolarRadar" === chart.chartAreaType ? chart.seriesElements.appendChild(this.seriesElement) : chart.seriesElements.appendChild(this.errorBarElement)), 
                "Scatter" !== this.type && "Bubble" !== this.type || chart.seriesElements.appendChild(this.seriesElement);
            }
            !marker.visible || ("Cartesian" !== chart.chartAreaType || this.isRectSeries && "BoxAndWhisker" !== this.type) && ("Scatter" === this.drawType || this.isRectSeries || "PolarRadar" !== chart.chartAreaType) || "Scatter" === this.type || "Bubble" === this.type || chart.seriesElements.appendChild(this.symbolElement), 
            dataLabel.visible && (chart.dataLabelElements.appendChild(this.shapeElement), chart.dataLabelElements.appendChild(this.textElement)), 
            chart.dataLabelElements.hasChildNodes() && chart.seriesElements.appendChild(chart.dataLabelElements);
        }, Series.prototype.performAnimation = function(chart, type, errorBar, marker, dataLabel) {
            this.animation.enable && chart.animateSeries && (chart[type + "SeriesModule"].doAnimation(this), 
            errorBar.visible && chart.errorBarModule.doErrorBarAnimation(this), marker.visible && chart.markerRender.doMarkerAnimation(this), 
            dataLabel.visible && chart.dataLabelModule.doDataLabelAnimation(this));
        }, Series.prototype.setPointColor = function(point, color) {
            return color = point.interior || color, point.isEmpty ? this.emptyPointSettings.fill || color : color;
        }, Series.prototype.setBorderColor = function(point, border) {
            return border.width = point.isEmpty ? this.emptyPointSettings.border.width || border.width : border.width, 
            border.color = point.isEmpty ? this.emptyPointSettings.border.color || border.color : border.color, 
            border;
        }, __decorate$44([ Property("") ], Series.prototype, "name", void 0), __decorate$44([ Property("") ], Series.prototype, "yName", void 0), 
        __decorate$44([ Property("Line") ], Series.prototype, "drawType", void 0), __decorate$44([ Property(!0) ], Series.prototype, "isClosed", void 0), 
        __decorate$44([ Property("#2ecd71") ], Series.prototype, "bearFillColor", void 0), 
        __decorate$44([ Property("#e74c3d") ], Series.prototype, "bullFillColor", void 0), 
        __decorate$44([ Property(!1) ], Series.prototype, "enableSolidCandles", void 0), 
        __decorate$44([ Property("") ], Series.prototype, "size", void 0), __decorate$44([ Property("") ], Series.prototype, "stackingGroup", void 0), 
        __decorate$44([ Property(!0) ], Series.prototype, "visible", void 0), __decorate$44([ Complex({
            color: "transparent",
            width: 0
        }, Border) ], Series.prototype, "border", void 0), __decorate$44([ Property(1) ], Series.prototype, "opacity", void 0), 
        __decorate$44([ Property("Line") ], Series.prototype, "type", void 0), __decorate$44([ Complex(null, ErrorBarSettings) ], Series.prototype, "errorBar", void 0), 
        __decorate$44([ Complex(null, MarkerSettings) ], Series.prototype, "marker", void 0), 
        __decorate$44([ Collection([], Trendline) ], Series.prototype, "trendlines", void 0), 
        __decorate$44([ Property(!0) ], Series.prototype, "enableTooltip", void 0), __decorate$44([ Property("SeriesType") ], Series.prototype, "legendShape", void 0), 
        __decorate$44([ Property(null) ], Series.prototype, "selectionStyle", void 0), __decorate$44([ Property(1) ], Series.prototype, "minRadius", void 0), 
        __decorate$44([ Property(3) ], Series.prototype, "maxRadius", void 0), __decorate$44([ Property("Natural") ], Series.prototype, "splineType", void 0), 
        __decorate$44([ Property(.5) ], Series.prototype, "cardinalSplineTension", void 0), 
        __decorate$44([ Complex(null, EmptyPointSettings) ], Series.prototype, "emptyPointSettings", void 0), 
        __decorate$44([ Property(!0) ], Series.prototype, "showMean", void 0), __decorate$44([ Property("Normal") ], Series.prototype, "boxPlotMode", void 0), 
        __decorate$44([ Property(.7) ], Series.prototype, "columnWidth", void 0), __decorate$44([ Property(0) ], Series.prototype, "columnSpacing", void 0), 
        __decorate$44([ Property("#C64E4A") ], Series.prototype, "negativeFillColor", void 0), 
        __decorate$44([ Property("#4E81BC") ], Series.prototype, "summaryFillColor", void 0), 
        __decorate$44([ Property() ], Series.prototype, "intermediateSumIndexes", void 0), 
        __decorate$44([ Property() ], Series.prototype, "sumIndexes", void 0), __decorate$44([ Complex({
            color: "black",
            width: 2
        }, Connector) ], Series.prototype, "connector", void 0), __decorate$44([ Complex(null, CornerRadius) ], Series.prototype, "cornerRadius", void 0), 
        Series;
    }(SeriesBase), __extends$60 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), MarkerExplode = function(_super) {
        function MarkerExplode(chart) {
            var _this = _super.call(this, chart) || this;
            return _this.addEventListener(), _this.elementId = chart.element.id, _this;
        }
        return __extends$60(MarkerExplode, _super), MarkerExplode.prototype.addEventListener = function() {
            this.chart.isDestroyed || (this.chart.on(Browser.touchMoveEvent, this.mouseMoveHandler, this), 
            this.chart.on(Browser.touchEndEvent, this.mouseUpHandler, this));
        }, MarkerExplode.prototype.mouseUpHandler = function() {
            var chart = this.chart;
            !chart.isTouch || chart.crosshair.enable || this.isSelected(chart) || this.markerMove(!0);
        }, MarkerExplode.prototype.mouseMoveHandler = function() {
            var chart = this.chart;
            chart.crosshair.enable && !chart.tooltip.enable || chart.isTouch && !chart.startMove || this.isSelected(chart) || this.markerMove(!1);
        }, MarkerExplode.prototype.markerMove = function(remove$$1) {
            var _this = this, chart = this.chart;
            this.currentPoints = [];
            var data, previous, explodeSeries;
            if (chart.tooltip.shared && chart.tooltip.enable) {
                if (!withInBounds(chart.mouseX, chart.mouseY, chart.chartAxisLayoutPanel.seriesClipRect)) return null;
                if (chart.tooltip.enable) for (var pointData = "PolarRadar" === chart.chartAreaType ? this.getData() : null, _i = 0, _a = chart.visibleSeries; _i < _a.length; _i++) {
                    var chartSeries = _a[_i];
                    chartSeries.enableTooltip && "Indicator" !== chartSeries.category && ("Cartesian" === chart.chartAreaType && chartSeries.visible ? data = this.getClosestX(chart, chartSeries) : "PolarRadar" === chart.chartAreaType && chartSeries.visible && null !== pointData.point && (data = new PointData(chartSeries.points[pointData.point.index], chartSeries)), 
                    data && (this.currentPoints.push(data), data = null));
                }
            } else data = this.getData(), previous = this.previousPoints[0], explodeSeries = data.series && ("BoxAndWhisker" === data.series.type || "Bubble" === data.series.type || "Scatter" === data.series.drawType || "Scatter" === data.series.type || !data.series.isRectSeries && data.series.marker.visible), 
            data.lierIndex = this.lierIndex, data.point && explodeSeries && (!previous || previous.point !== data.point || previous && previous.lierIndex > 3 && previous.lierIndex !== this.lierIndex) && this.currentPoints.push(data);
            var length = this.previousPoints.length;
            if (this.currentPoints.length > 0 && (0 === length || length > 0 && this.previousPoints[0].point !== this.currentPoints[0].point)) {
                this.previousPoints.length > 0 && this.removeHighlightedMarker();
                for (var _loop_1 = function(data_1) {
                    !data_1 || !data_1.point || data_1.series.isRectSeries && "BoxAndWhisker" !== data_1.series.type || (stopTimer(this_1.markerExplode), 
                    this_1.isRemove = !0, data_1.point.symbolLocations.map(function(location, index) {
                        data_1.point.marker.visible && _this.drawTrackBall(data_1.series, data_1.point, location, index);
                    }));
                }, this_1 = this, _b = 0, _c = this.currentPoints; _b < _c.length; _b++) {
                    _loop_1(_c[_b]);
                }
                this.previousPoints = extend([], this.currentPoints, null, !0);
            }
            chart.tooltip.enable || !(0 === this.currentPoints.length && this.isRemove || remove$$1 && this.isRemove) && withInBounds(chart.mouseX, chart.mouseY, chart.chartAxisLayoutPanel.seriesClipRect) || (this.isRemove = !1, 
            this.markerExplode = setTimeout(function() {
                _this.removeHighlightedMarker();
            }, 2e3)), this.currentPoints = [];
        }, MarkerExplode.prototype.drawTrackBall = function(series, point, location, index) {
            for (var marker = point.marker, seriesMarker = series.marker, shape = marker.shape || seriesMarker.shape, element = series.symbolElement || series.seriesElement, symbolId = this.elementId + "_Series_" + series.index + "_Point_" + point.index + "_Trackball" + (index || ""), size = new Size((marker.width || seriesMarker.width) + 5, (marker.height || seriesMarker.height) + 5), border = marker.border || series.border, explodeSeries = "BoxAndWhisker" === series.type || "Bubble" === series.type || "Scatter" === series.type, borderColor = border.color && "transparent" !== border.color ? border.color : marker.fill || point.interior || (explodeSeries ? point.color : series.interior), colorValue = convertHexToColor(colorNameToHex(borderColor)), borderWidth = marker.border ? marker.border.width : seriesMarker.border.width, markerShadow = series.chart.themeStyle.markerShadow || "rgba(" + colorValue.r + "," + colorValue.g + "," + colorValue.b + ",0.2)", i = 0; i < 2; i++) {
                var options = new PathOption(symbolId + "_" + i, i ? marker.fill || point.color || (explodeSeries ? series.interior : "#ffffff") : "transparent", borderWidth + (i ? 0 : 8), i ? borderColor : markerShadow, marker.opacity || seriesMarker.opacity, null, null), symbol = drawSymbol(location, shape, size, seriesMarker.imageUrl, options, "");
                symbol.setAttribute("style", "pointer-events:none"), symbol.setAttribute("class", "EJ2-Trackball"), 
                element.appendChild(symbol);
            }
        }, MarkerExplode.prototype.removeHighlightedMarker = function() {
            for (var elements = document.getElementsByClassName("EJ2-Trackball"), i = 0, len = elements.length; i < len; i++) remove(elements[0]);
            this.previousPoints = [];
        }, MarkerExplode;
    }(ChartData), __extends$59 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), Marker = function(_super) {
        function Marker(chart) {
            var _this = _super.call(this, chart) || this;
            return _this.addEventListener(), _this;
        }
        return __extends$59(Marker, _super), Marker.prototype.render = function(series) {
            var _this = this;
            this.createElement(series);
            for (var _loop_1 = function(point) {
                point.visible && point.symbolLocations.length && point.symbolLocations.map(function(location, index) {
                    _this.renderMarker(series, point, location, index);
                });
            }, _i = 0, _a = series.points; _i < _a.length; _i++) {
                _loop_1(_a[_i]);
            }
        }, Marker.prototype.renderMarker = function(series, point, location, index) {
            var symbolId, shapeOption, argsData, seriesIndex = series.index, marker = series.marker, border = {
                color: marker.border.color,
                width: marker.border.width
            }, borderColor = marker.border.color, isBoxPlot = "BoxAndWhisker" === series.type, fill = marker.fill || (isBoxPlot ? point.interior || series.interior : "#ffffff"), parentElement = isBoxPlot ? function(elements, id) {
                for (var element, i = 0, length_1 = elements.length; i < length_1; i++) elements[i].id.indexOf(id) > -1 && (element = elements[i]);
                return element;
            }(series.seriesElement.childNodes, "Series_" + series.index + "_Point_" + point.index) : series.symbolElement;
            if (border.color = borderColor || series.setPointColor(point, series.interior), 
            symbolId = this.elementId + "_Series_" + seriesIndex + "_Point_" + point.index + "_Symbol" + (index || ""), 
            argsData = {
                cancel: !1,
                name: "pointRender",
                series: series,
                point: point,
                fill: point.isEmpty ? series.emptyPointSettings.fill || fill : fill,
                border: {
                    color: "BoxAndWhisker" === series.type ? isNullOrUndefined(borderColor) || "transparent" === borderColor ? getSaturationColor(fill, -.6) : borderColor : border.color,
                    width: border.width
                },
                height: marker.height,
                width: marker.width,
                shape: marker.shape
            }, argsData.border = series.setBorderColor(point, {
                width: argsData.border.width,
                color: argsData.border.color
            }), this.chart.trigger("pointRender", argsData), point.color = argsData.fill, argsData.cancel) location = null, 
            point.marker = {
                visible: !1
            }; else {
                var y = void 0;
                y = "RangeArea" === series.type ? index ? point.low : point.high : isBoxPlot ? point.outliers[index] : point.y, 
                shapeOption = new PathOption(symbolId, argsData.fill, argsData.border.width, argsData.border.color, marker.opacity, null), 
                void 0 !== parentElement && null !== parentElement && parentElement.appendChild(drawSymbol(location, argsData.shape, new Size(argsData.width, argsData.height), marker.imageUrl, shapeOption, point.x.toString() + ":" + y.toString())), 
                point.marker = {
                    border: argsData.border,
                    fill: argsData.fill,
                    height: argsData.height,
                    visible: !0,
                    shape: argsData.shape,
                    width: argsData.width
                };
            }
        }, Marker.prototype.createElement = function(series) {
            var markerClipRect, transform, marker = series.marker, explodeValue = marker.border.width + 8 + 5, render = series.chart.renderer;
            if (transform = "Cartesian" === series.chart.chartAreaType ? "translate(" + series.clipRect.x + "," + series.clipRect.y + ")" : "", 
            marker.visible) {
                var markerHeight = (marker.height + explodeValue) / 2, markerWidth = (marker.width + explodeValue) / 2;
                markerClipRect = "Cartesian" === series.chart.chartAreaType ? render.drawClipPath(new RectOption(this.elementId + "_ChartMarkerClipRect_" + series.index, "transparent", {
                    width: 1,
                    color: "Gray"
                }, 1, {
                    x: -markerWidth,
                    y: -markerHeight,
                    width: series.clipRect.width + 2 * markerWidth,
                    height: series.clipRect.height + 2 * markerHeight
                })) : render.drawCircularClipPath(new CircleOption(this.elementId + "_ChartMarkerClipRect_" + series.index, "transparent", {
                    width: 1,
                    color: "Gray"
                }, 1, series.clipRect.width / 2 + series.clipRect.x, series.clipRect.height / 2 + series.clipRect.y, series.chart.radius + Math.max(markerHeight, markerWidth))), 
                series.symbolElement = render.createGroup({
                    id: this.elementId + "SymbolGroup" + series.index,
                    transform: transform,
                    "clip-path": "url(#" + this.elementId + "_ChartMarkerClipRect_" + series.index + ")"
                }), series.symbolElement.appendChild(markerClipRect);
            }
        }, Marker.prototype.getRangeLowPoint = function(region, series) {
            var x = region.x, y = region.y;
            return series.chart.requireInvertedAxis ? (y += region.height / 2, x += series.yAxis.isInversed ? region.width : 0) : (y += series.yAxis.isInversed ? 0 : region.height, 
            x += region.width / 2), {
                x: x,
                y: y
            };
        }, Marker.prototype.doMarkerAnimation = function(series) {
            if (!(series.isRectSeries || "Scatter" === series.type || "Bubble" === series.type || "PolarRadar" === series.chart.chartAreaType && ("Scatter" === series.drawType || series.drawType.indexOf("Column") > -1))) for (var markerElements = series.symbolElement.childNodes, delay = series.animation.delay + series.animation.duration, j = 1, incFactor = "RangeArea" === series.type ? 2 : 1, i = 0; i < series.points.length; i++) if (series.points[i].symbolLocations.length) {
                if (markerAnimate(markerElements[j], delay, 200, series, i, series.points[i].symbolLocations[0], !1), 
                2 === incFactor) {
                    var lowPoint = this.getRangeLowPoint(series.points[i].regions[0], series);
                    markerAnimate(markerElements[j + 1], delay, 200, series, i, lowPoint, !1);
                }
                j += incFactor;
            }
        }, Marker;
    }(MarkerExplode), __extends$61 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$45 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, TechnicalIndicator = function(_super) {
        function TechnicalIndicator() {
            var _this = null !== _super && _super.apply(this, arguments) || this;
            return _this.clipRect = new Rect(0, 0, 0, 0), _this;
        }
        return __extends$61(TechnicalIndicator, _super), TechnicalIndicator.prototype.setDataSource = function(series, chart) {
            series && (this.xData = series.xData, this.yData = series.yData, this.points = series.points);
            chart[firstToLowerCase(this.type) + "IndicatorModule"].initDataSource(this, chart), 
            chart.visibleSeriesCount += this.targetSeries.length;
        }, __decorate$45([ Property("Sma") ], TechnicalIndicator.prototype, "type", void 0), 
        __decorate$45([ Property(14) ], TechnicalIndicator.prototype, "period", void 0), 
        __decorate$45([ Property(14) ], TechnicalIndicator.prototype, "kPeriod", void 0), 
        __decorate$45([ Property(3) ], TechnicalIndicator.prototype, "dPeriod", void 0), 
        __decorate$45([ Property(80) ], TechnicalIndicator.prototype, "overBought", void 0), 
        __decorate$45([ Property(20) ], TechnicalIndicator.prototype, "overSold", void 0), 
        __decorate$45([ Property(2) ], TechnicalIndicator.prototype, "standardDeviation", void 0), 
        __decorate$45([ Property("Close") ], TechnicalIndicator.prototype, "field", void 0), 
        __decorate$45([ Property(12) ], TechnicalIndicator.prototype, "slowPeriod", void 0), 
        __decorate$45([ Property(26) ], TechnicalIndicator.prototype, "fastPeriod", void 0), 
        __decorate$45([ Property(!0) ], TechnicalIndicator.prototype, "showZones", void 0), 
        __decorate$45([ Complex({
            color: "#ff9933",
            width: 2
        }, Connector) ], TechnicalIndicator.prototype, "macdLine", void 0), __decorate$45([ Property("Both") ], TechnicalIndicator.prototype, "macdType", void 0), 
        __decorate$45([ Property("#2ecd71") ], TechnicalIndicator.prototype, "macdPositiveColor", void 0), 
        __decorate$45([ Property("#e74c3d") ], TechnicalIndicator.prototype, "macdNegativeColor", void 0), 
        __decorate$45([ Property("rgba(211,211,211,0.25)") ], TechnicalIndicator.prototype, "bandColor", void 0), 
        __decorate$45([ Complex({
            color: "#ffb735",
            width: 1
        }, Connector) ], TechnicalIndicator.prototype, "upperLine", void 0), __decorate$45([ Complex({
            color: "#f2ec2f",
            width: 1
        }, Connector) ], TechnicalIndicator.prototype, "lowerLine", void 0), __decorate$45([ Complex({
            color: "#f2ec2f",
            width: 1
        }, Connector) ], TechnicalIndicator.prototype, "periodLine", void 0), __decorate$45([ Property("") ], TechnicalIndicator.prototype, "seriesName", void 0), 
        TechnicalIndicator;
    }(SeriesBase), __extends$55 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$41 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, CrosshairSettings = function(_super) {
        function CrosshairSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$55(CrosshairSettings, _super), __decorate$41([ Property(!1) ], CrosshairSettings.prototype, "enable", void 0), 
        __decorate$41([ Complex({
            color: null,
            width: 1
        }, Border) ], CrosshairSettings.prototype, "line", void 0), __decorate$41([ Property("Both") ], CrosshairSettings.prototype, "lineType", void 0), 
        CrosshairSettings;
    }(ChildProperty), ZoomSettings = function(_super) {
        function ZoomSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$55(ZoomSettings, _super), __decorate$41([ Property(!1) ], ZoomSettings.prototype, "enableSelectionZooming", void 0), 
        __decorate$41([ Property(!1) ], ZoomSettings.prototype, "enablePinchZooming", void 0), 
        __decorate$41([ Property(!1) ], ZoomSettings.prototype, "enableMouseWheelZooming", void 0), 
        __decorate$41([ Property(!0) ], ZoomSettings.prototype, "enableDeferredZooming", void 0), 
        __decorate$41([ Property("XY") ], ZoomSettings.prototype, "mode", void 0), __decorate$41([ Property([ "Zoom", "ZoomIn", "ZoomOut", "Pan", "Reset" ]) ], ZoomSettings.prototype, "toolbarItems", void 0), 
        __decorate$41([ Property(!1) ], ZoomSettings.prototype, "enablePan", void 0), ZoomSettings;
    }(ChildProperty), Chart = function(_super) {
        function Chart(options, element) {
            var _this = _super.call(this, options, element) || this;
            return _this.chartAreaType = "Cartesian", _this;
        }
        return __extends$55(Chart, _super), Chart.prototype.preRender = function() {
            this.unWireEvents(), this.initPrivateVariable(), this.setCulture(), this.createChartSvg(), 
            this.wireEvents();
        }, Chart.prototype.initPrivateVariable = function() {
            this.animateSeries = !0, this.horizontalAxes = [], this.verticalAxes = [], this.refreshAxis(), 
            this.refreshDefinition(this.rows), this.refreshDefinition(this.columns), this.tooltipModule && (this.tooltipModule.previousPoints = []);
        }, Chart.prototype.render = function() {
            this.trigger("load", {
                chart: this
            }), this.setTheme(), this.markerRender = new Marker(this), this.calculateAreaType(), 
            this.calculateVisibleSeries(), this.initTechnicalIndicators(), this.initTrendLines(), 
            this.calculateVisibleAxis(), this.processData();
        }, Chart.prototype.getLocalizedLabel = function(key) {
            return this.localeObject.getConstant(key);
        }, Chart.prototype.refreshBound = function() {
            this.legendModule && this.legendSettings.visible && this.legendModule.getLegendOptions(this.visibleSeries, this);
            for (var series, isCalculateStacking = !1, i = 0, len = this.visibleSeries.length; i < len; i++) (series = this.visibleSeries[i]).position = series.rectCount = void 0, 
            -1 === series.type.indexOf("Stacking") && (-1 === series.drawType.indexOf("Stacking") || "PolarRadar" !== this.chartAreaType) || isCalculateStacking || (series.calculateStackedValue(series.type.indexOf("100") > -1, this), 
            isCalculateStacking = !0);
            this.calculateBounds(), this.renderElements();
        }, Chart.prototype.renderElements = function() {
            this.renderBorder(), this.renderTitle(), this.renderAreaBorder();
            var axisElement = this.renderAxes();
            this.renderSeriesElements(axisElement), this.renderLegend(), this.applyZoomkit(), 
            this.performSelection(), this.setSecondaryElementPosition(), this.renderAnnotation();
        }, Chart.prototype.renderAxes = function() {
            this.yAxisElements = this.renderer.createGroup({
                id: this.element.id + "yAxisCollection"
            });
            var axisElement;
            return this.rows.length > 0 && this.columns.length > 0 && (axisElement = this.chartAxisLayoutPanel.renderAxes()), 
            this.stripLineModule && this.stripLineModule.renderStripLine(this, "Behind", this.axisCollections), 
            axisElement;
        }, Chart.prototype.renderLegend = function() {
            this.legendModule && this.legendModule.legendCollections.length && this.legendModule.renderLegend(this, this.legendSettings, this.legendModule.legendBounds), 
            this.element.appendChild(this.svgObject);
        }, Chart.prototype.setSecondaryElementPosition = function() {
            var element = getElement(this.element.id + "_Secondary_Element");
            if (element) {
                var rect = this.element.getBoundingClientRect(), svgRect = getElement(this.element.id + "_svg").getBoundingClientRect();
                element.style.left = Math.max(svgRect.left - rect.left, 0) + "px", element.style.top = Math.max(svgRect.top - rect.top, 0) + "px";
            }
        }, Chart.prototype.initializeModuleElements = function() {
            this.dataLabelCollections = [], this.seriesElements = this.renderer.createGroup({
                id: this.element.id + "SeriesCollection"
            }), this.indicators.length && (this.indicatorElements = this.renderer.createGroup({
                id: this.element.id + "IndicatorCollection"
            })), this.hasTrendlines() && (this.trendLineElements = this.renderer.createGroup({
                id: this.element.id + "TrendLineCollection"
            })), this.dataLabelElements = this.renderer.createGroup({
                id: this.element.id + "DataLabelCollection"
            });
        }, Chart.prototype.hasTrendlines = function() {
            for (var isTrendline, _i = 0, _a = this.series; _i < _a.length; _i++) {
                if (isTrendline = !!_a[_i].trendlines.length) break;
            }
            return isTrendline;
        }, Chart.prototype.renderSeriesElements = function(axisElement) {
            this.initializeModuleElements();
            var tooltipDiv = document.createElement("div");
            tooltipDiv.id = this.element.id + "_Secondary_Element", tooltipDiv.setAttribute("style", "position: relative"), 
            this.element.appendChild(tooltipDiv), this.tooltip.enable && this.svgObject.appendChild(this.renderer.createGroup({
                id: this.element.id + "_UserInteraction",
                style: "pointer-events:none;"
            })), this.rows.length > 0 && this.columns.length > 0 && (this.initializeIndicator(), 
            this.initializeTrendLine(), this.renderSeries(), this.appendElementsAfterSeries(axisElement));
        }, Chart.prototype.renderSeries = function() {
            for (var _i = 0, _a = this.visibleSeries; _i < _a.length; _i++) {
                var item = _a[_i];
                item.visible && (findClipRect(item), item.renderSeries(this, item.index));
            }
            var clipRect = this.renderer.drawClipPath({
                id: this.element.id + "_ChartAreaClipRect_",
                x: this.chartAxisLayoutPanel.seriesClipRect.x,
                y: this.chartAxisLayoutPanel.seriesClipRect.y,
                width: this.chartAxisLayoutPanel.seriesClipRect.width,
                height: this.chartAxisLayoutPanel.seriesClipRect.height,
                fill: "transparent",
                "stroke-width": 1,
                stroke: "Gray"
            });
            this.seriesElements.appendChild(clipRect), this.svgObject.appendChild(this.seriesElements);
        }, Chart.prototype.initializeIndicator = function() {
            for (var _i = 0, _a = this.indicators; _i < _a.length; _i++) {
                var indicator = _a[_i];
                this[firstToLowerCase(indicator.type) + "IndicatorModule"] && this[firstToLowerCase(indicator.type) + "IndicatorModule"].createIndicatorElements(this, indicator, indicator.index);
            }
            this.indicatorElements && this.svgObject.appendChild(this.indicatorElements);
        }, Chart.prototype.initializeTrendLine = function() {
            for (var _i = 0, _a = this.visibleSeries; _i < _a.length; _i++) {
                var series = _a[_i];
                series.trendlines.length && this.trendLineModule.getTrendLineElements(series, this);
            }
            this.trendLineElements && this.svgObject.appendChild(this.trendLineElements);
        }, Chart.prototype.appendElementsAfterSeries = function(axisElement) {
            "PolarRadar" === this.chartAreaType && this.svgObject.appendChild(this.yAxisElements), 
            this.svgObject.appendChild(axisElement), this.stripLineModule && this.stripLineModule.renderStripLine(this, "Over", this.axisCollections), 
            this.tooltip.enable || this.svgObject.appendChild(this.renderer.createGroup({
                id: this.element.id + "_UserInteraction",
                style: "pointer-events:none;"
            }));
        }, Chart.prototype.applyZoomkit = function() {
            this.zoomModule && this.zoomModule.isZoomed && (!this.zoomSettings.enablePan || this.zoomModule.performedUI) && this.zoomModule.applyZoomToolkit(this, this.axisCollections);
        }, Chart.prototype.renderAnnotation = function() {
            this.annotationModule && this.annotationModule.renderAnnotations(getElement(this.element.id + "_Secondary_Element"));
        }, Chart.prototype.performSelection = function() {
            var selectedDataIndexes = [];
            this.selectionModule && (selectedDataIndexes = extend([], this.selectionModule.selectedDataIndexes, null, !0), 
            this.selectionModule.invokeSelection(this)), selectedDataIndexes.length > 0 && (this.selectionModule.selectedDataIndexes = selectedDataIndexes, 
            this.selectionModule.redrawSelection(this, this.selectionMode));
        }, Chart.prototype.processData = function() {
            this.visibleSeriesCount = 0;
            for (var check = !0, _i = 0, _a = this.visibleSeries; _i < _a.length; _i++) {
                var series_1 = _a[_i];
                series_1.visible || this.legendSettings.visible ? "Indicator" !== series_1.category && "TrendLine" !== series_1.category && this.initializeDataModule(series_1) : this.visibleSeriesCount++;
            }
            for (var _b = 0, _c = this.indicators; _b < _c.length; _b++) {
                var indicator = _c[_b];
                if (indicator.dataSource) {
                    var techIndicator = indicator;
                    this.initializeDataModule(techIndicator), check = !1;
                }
            }
            (!this.visibleSeries.length || this.visibleSeriesCount === this.visibleSeries.length && check) && (this.refreshBound(), 
            this.trigger("loaded", {
                chart: this
            }));
        }, Chart.prototype.initializeDataModule = function(series) {
            series.xData = [], series.yData = [], series.dataModule = new Data(series.dataSource, series.query), 
            series.points = [], series.refreshDataManager(this);
        }, Chart.prototype.calculateBounds = function() {
            var margin = this.margin, titleHeight = 0, left = margin.left, width = this.availableSize.width - left - margin.right - this.border.width;
            this.titleCollection = [], this.title && (this.titleCollection = getTitle(this.title, this.titleStyle, width), 
            titleHeight = measureText(this.title, this.titleStyle).height * this.titleCollection.length + 15);
            var top = margin.top + titleHeight + this.chartArea.border.width / 2, height = this.availableSize.height - top - this.border.width - margin.bottom;
            this.initialClipRect = new Rect(left, top, width, height), this.legendModule && this.legendModule.calculateLegendBounds(this.initialClipRect, this.availableSize), 
            this.chartAxisLayoutPanel.measureAxis(this.initialClipRect);
        }, Chart.prototype.print = function(id) {
            new ExportUtils(this).print(id);
        }, Chart.prototype.export = function(type, fileName, orientation) {
            new ExportUtils(this).export(type, fileName, orientation);
        }, Chart.prototype.initTrendLines = function() {
            for (var _i = 0, _a = this.visibleSeries; _i < _a.length; _i++) for (var series = _a[_i], trendIndex = 0, _b = 0, _c = series.trendlines; _b < _c.length; _b++) {
                var trendLine = _c[_b];
                firstToLowerCase(trendLine.type);
                this.trendLineModule && (trendLine.index = trendIndex, trendLine.sourceIndex = series.index, 
                this.trendLineModule.initSeriesCollection(trendLine, this), trendLine.targetSeries && (trendLine.targetSeries.xAxisName = series.xAxisName, 
                trendLine.targetSeries.yAxisName = series.yAxisName, this.visibleSeries.push(trendLine.targetSeries))), 
                trendIndex++;
            }
        }, Chart.prototype.calculateAreaType = function() {
            var series = this.series[0];
            series && (this.requireInvertedAxis = -1 !== series.type.indexOf("Bar") && !this.isTransposed || -1 === series.type.indexOf("Bar") && this.isTransposed && "PolarRadar" !== this.chartAreaType), 
            this.chartAxisLayoutPanel = "PolarRadar" === this.chartAreaType ? this.polarSeriesModule || this.radarSeriesModule : new CartesianAxisLayoutPanel(this);
        }, Chart.prototype.calculateVisibleAxis = function() {
            var axis, axes = [ this.primaryXAxis, this.primaryYAxis ];
            axes = "Cartesian" === this.chartAreaType ? axes.concat(this.axes) : axes, this.axisCollections = [], 
            this.zoomModule && (this.zoomModule.isPanning = this.zoomModule.isAxisZoomed(axes) && this.zoomSettings.enablePan, 
            this.svgObject.setAttribute("cursor", this.zoomModule.isPanning ? "pointer" : "auto"));
            for (var i = 0, len = axes.length; i < len; i++) {
                (axis = axes[i]).series = [], axis.labels = [];
                for (var _i = 0, _a = this.visibleSeries; _i < _a.length; _i++) {
                    var series_2 = _a[_i];
                    this.initAxis(series_2, axis, !0);
                }
                for (var _b = 0, _c = this.indicators; _b < _c.length; _b++) {
                    var indicator = _c[_b];
                    this.initAxis(indicator, axis, !1);
                }
                null != axis.orientation && this.axisCollections.push(axis);
            }
            this.rows.length > 0 && this.columns.length > 0 && this.chartAxisLayoutPanel.measure();
        }, Chart.prototype.initAxis = function(series, axis, isSeries) {
            series.xAxisName === axis.name || null == series.xAxisName && "primaryXAxis" === axis.name ? (axis.orientation = this.requireInvertedAxis ? "Vertical" : "Horizontal", 
            series.xAxis = axis, isSeries && axis.series.push(series)) : (series.yAxisName === axis.name || null == series.yAxisName && "primaryYAxis" === axis.name) && (axis.orientation = this.requireInvertedAxis ? "Horizontal" : "Vertical", 
            series.yAxis = axis, isSeries && axis.series.push(series));
        }, Chart.prototype.initTechnicalIndicators = function() {
            for (var i = 0, _i = 0, _a = this.indicators; _i < _a.length; _i++) {
                var indicator = _a[_i], techIndicator = indicator, type = firstToLowerCase(techIndicator.type);
                if (this[type + "IndicatorModule"]) {
                    techIndicator.index = i, this[type + "IndicatorModule"].initSeriesCollection(techIndicator, this);
                    for (var _b = 0, _c = techIndicator.targetSeries; _b < _c.length; _b++) {
                        var targetSeries = _c[_b];
                        (indicator.seriesName || indicator.dataSource) && this.visibleSeries.push(targetSeries);
                    }
                }
                i++;
            }
        }, Chart.prototype.refreshTechnicalIndicator = function(series) {
            if (this.indicators.length) {
                if (series instanceof Series && "Indicator" !== series.category) for (var _i = 0, _a = this.indicators; _i < _a.length; _i++) {
                    var indicator = _a[_i];
                    indicator.seriesName !== series.name || indicator.dataSource || indicator.setDataSource(series, this);
                } else series instanceof TechnicalIndicator && series.setDataSource(series instanceof Series ? series : null, this);
            }
        }, Chart.prototype.calculateVisibleSeries = function() {
            var series;
            this.visibleSeries = [];
            for (var colors = this.palettes.length ? this.palettes : getSeriesColor(this.theme), count = colors.length, i = 0, len = this.series.length; i < len; i++) {
                switch (series = this.series[i], series.index = i, series.interior = series.fill || colors[i % count], 
                series.type) {
                  case "Bar":
                  case "StackingBar":
                  case "StackingBar100":
                    if (-1 === this.series[0].type.indexOf("Bar")) continue;
                    break;

                  case "Polar":
                  case "Radar":
                    if ("PolarRadar" !== this.chartAreaType) continue;
                    if ("PolarRadar" === this.chartAreaType && (null === series.xAxisName && null !== series.yAxisName || null !== series.xAxisName && null === series.yAxisName || null !== series.xAxisName && null !== series.yAxisName)) continue;
                    break;

                  default:
                    if ("PolarRadar" === this.chartAreaType || this.series[0].type.indexOf("Bar") > -1) continue;
                }
                this.visibleSeries.push(series), this.series[i] = series;
            }
        }, Chart.prototype.renderTitle = function() {
            if (this.title) {
                var anchor = "Near" === this.titleStyle.textAlignment ? "start" : "Far" === this.titleStyle.textAlignment ? "end" : "middle";
                this.elementSize = measureText(this.title, this.titleStyle);
                var element = textElement(new TextOption(this.element.id + "_ChartTitle", titlePositionX(this.availableSize, this.margin.left, this.margin.right, this.titleStyle), this.margin.top + 3 * this.elementSize.height / 4, anchor, this.titleCollection, "", "auto"), this.titleStyle, this.titleStyle.color || this.themeStyle.chartTitle, this.svgObject);
                element.setAttribute("aria-label", this.description || this.title), element.setAttribute("tabindex", this.tabIndex.toString());
            }
        }, Chart.prototype.renderBorder = function() {
            var width = this.border.width, rect = new RectOption(this.element.id + "_ChartBorder", this.background || this.themeStyle.background, this.border, 1, new Rect(width / 2, width / 2, this.availableSize.width - width, this.availableSize.height - width));
            this.htmlObject = this.renderer.drawRectangle(rect), this.svgObject.appendChild(this.htmlObject);
        }, Chart.prototype.renderAreaBorder = function() {
            if ("PolarRadar" === this.chartAreaType) return null;
            var rect = new RectOption(this.element.id + "_ChartAreaBorder", this.chartArea.background, {
                width: this.chartArea.border.width,
                color: this.chartArea.border.color || this.themeStyle.areaBorder
            }, this.chartArea.opacity, this.chartAxisLayoutPanel.seriesClipRect);
            this.htmlObject = this.renderer.drawRectangle(rect), this.svgObject.appendChild(this.htmlObject);
        }, Chart.prototype.addSeries = function(seriesCollection) {
            for (var _i = 0, seriesCollection_1 = seriesCollection; _i < seriesCollection_1.length; _i++) {
                var series = seriesCollection_1[_i];
                series = new Series(this, "series", series), this.series.push(series);
            }
            this.refresh();
        }, Chart.prototype.removeSeries = function(index) {
            this.series.splice(index), this.refresh();
        }, Chart.prototype.destroy = function() {
            this.unWireEvents(), _super.prototype.destroy.call(this), this.element.classList.remove("e-chart");
        }, Chart.prototype.getModuleName = function() {
            return "chart";
        }, Chart.prototype.getPersistData = function() {
            return this.addOnPersist([ "loaded", "animationComplete" ]);
        }, Chart.prototype.createChartSvg = function() {
            this.removeSvg(), createSvg(this);
        }, Chart.prototype.unWireEvents = function() {
            var startEvent = Browser.touchStartEvent, moveEvent = Browser.touchMoveEvent, stopEvent = Browser.touchEndEvent, cancelEvent = Browser.isPointer ? "pointerleave" : "mouseleave";
            EventHandler.remove(this.element, startEvent, this.chartOnMouseDown), EventHandler.remove(this.element, moveEvent, this.mouseMove), 
            EventHandler.remove(this.element, stopEvent, this.mouseEnd), EventHandler.remove(this.element, "click", this.chartOnMouseClick), 
            EventHandler.remove(this.element, "contextmenu", this.chartRightClick), EventHandler.remove(this.element, cancelEvent, this.mouseLeave), 
            window.removeEventListener(Browser.isTouch && "orientation" in window && "onorientationchange" in window ? "orientationchange" : "resize", this.chartResize);
        }, Chart.prototype.wireEvents = function() {
            var cancelEvent = Browser.isPointer ? "pointerleave" : "mouseleave";
            EventHandler.add(this.element, Browser.touchStartEvent, this.chartOnMouseDown, this), 
            EventHandler.add(this.element, Browser.touchMoveEvent, this.mouseMove, this), EventHandler.add(this.element, Browser.touchEndEvent, this.mouseEnd, this), 
            EventHandler.add(this.element, "click", this.chartOnMouseClick, this), EventHandler.add(this.element, "contextmenu", this.chartRightClick, this), 
            EventHandler.add(this.element, cancelEvent, this.mouseLeave, this), window.addEventListener(Browser.isTouch && "orientation" in window && "onorientationchange" in window ? "orientationchange" : "resize", this.chartResize.bind(this)), 
            this.longPress = this.longPress.bind(this), new Touch(this.element, {
                tapHold: this.longPress,
                tapHoldThreshold: 500
            }), this.setStyle(this.element);
        }, Chart.prototype.chartRightClick = function(event) {
            return !this.crosshair.enable || !this.crosshairModule || 2 !== event.buttons && 0 !== event.which && "touch" !== event.pointerType || (event.preventDefault(), 
            event.stopPropagation(), !1);
        }, Chart.prototype.setStyle = function(element) {
            var zooming = this.zoomSettings, disableScroll = zooming.enableSelectionZooming || zooming.enableMouseWheelZooming || zooming.enablePinchZooming || "None" !== this.selectionMode || this.crosshair.enable;
            element.style.touchAction = disableScroll ? "none" : "element", element.style.msTouchAction = disableScroll ? "none" : "element", 
            element.style.msContentZooming = "none", element.style.msUserSelect = "none", element.style.webkitUserSelect = "none", 
            element.style.position = "relative", element.style.display = "block";
        }, Chart.prototype.isOrientation = function() {
            return "orientation" in window && "onorientationchange" in window;
        }, Chart.prototype.longPress = function(e) {
            return this.mouseX = e && e.originalEvent.changedTouches ? e.originalEvent.changedTouches[0].clientX : 0, 
            this.mouseY = e && e.originalEvent.changedTouches ? e.originalEvent.changedTouches[0].clientY : 0, 
            this.startMove = !0, this.setMouseXY(this.mouseX, this.mouseY), this.notify("tapHold", e), 
            !1;
        }, Chart.prototype.setMouseXY = function(pageX, pageY) {
            var rect = this.element.getBoundingClientRect(), svgRect = getElement(this.element.id + "_svg").getBoundingClientRect();
            this.mouseX = pageX - rect.left - Math.max(svgRect.left - rect.left, 0), this.mouseY = pageY - rect.top - Math.max(svgRect.top - rect.top, 0);
        }, Chart.prototype.chartResize = function(e) {
            var _this = this;
            return this.animateSeries = !1, this.resizeTo && clearTimeout(this.resizeTo), this.resizeTo = setTimeout(function() {
                _this.isDestroyed ? clearTimeout(_this.resizeTo) : (_this.createChartSvg(), _this.refreshAxis(), 
                _this.refreshBound(), _this.trigger("loaded", {
                    chart: _this
                }));
            }, 500), !1;
        }, Chart.prototype.mouseMove = function(e) {
            var pageX, pageY, touchArg;
            return "touchmove" === e.type ? (this.isTouch = !0, pageX = (touchArg = e).changedTouches[0].clientX, 
            pageY = touchArg.changedTouches[0].clientY) : (this.isTouch = "touch" === e.pointerType || "2" === e.pointerType || this.isTouch, 
            pageX = e.clientX, pageY = e.clientY), this.setMouseXY(pageX, pageY), this.chartOnMouseMove(e), 
            !1;
        }, Chart.prototype.mouseLeave = function(e) {
            var pageX, pageY, touchArg;
            return "touchleave" === e.type ? (this.isTouch = !0, pageX = (touchArg = e).changedTouches[0].clientX, 
            pageY = touchArg.changedTouches[0].clientY) : (this.isTouch = "touch" === e.pointerType || "2" === e.pointerType, 
            pageX = e.clientX, pageY = e.clientY), this.setMouseXY(pageX, pageY), this.chartOnMouseLeave(e), 
            !1;
        }, Chart.prototype.chartOnMouseLeave = function(e) {
            var element = e.target, cancelEvent = Browser.isPointer ? "pointerleave" : "mouseleave";
            return this.trigger("chartMouseLeave", {
                target: element.id,
                x: this.mouseX,
                y: this.mouseY
            }), this.isChartDrag = !1, this.notify(cancelEvent, e), !1;
        }, Chart.prototype.chartOnMouseClick = function(e) {
            var element = e.target;
            return this.trigger("chartMouseClick", {
                target: element.id,
                x: this.mouseX,
                y: this.mouseY
            }), this.pointClick && this.triggerPointEvent("pointClick"), this.notify("click", e), 
            !1;
        }, Chart.prototype.triggerPointEvent = function(event) {
            var pointData = new ChartData(this).getData();
            pointData.series && pointData.point && this.trigger(event, {
                series: pointData.series,
                point: pointData.point,
                seriesIndex: pointData.series.index,
                pointIndex: pointData.point.index,
                x: this.mouseX,
                y: this.mouseY
            });
        }, Chart.prototype.chartOnMouseMove = function(e) {
            var element = e.target;
            return this.trigger("chartMouseMove", {
                target: element.id,
                x: this.mouseX,
                y: this.mouseY
            }), this.pointMove && this.triggerPointEvent("pointMove"), this.isTouch || (this.titleTooltip(e, this.mouseX, this.mouseY), 
            this.axisTooltip(e, this.mouseX, this.mouseY)), this.notify(Browser.touchMoveEvent, e), 
            this.isTouch = !1, !1;
        }, Chart.prototype.titleTooltip = function(event, x, y, isTouch) {
            event.target.id === this.element.id + "_ChartTitle" && event.target.textContent.indexOf("...") > -1 ? showTooltip(this.title, x, y, this.element.offsetWidth, this.element.id + "_EJ2_Title_Tooltip", getElement(this.element.id + "_Secondary_Element"), isTouch) : removeElement$1(this.element.id + "_EJ2_Title_Tooltip");
        }, Chart.prototype.axisTooltip = function(event, x, y, isTouch) {
            var targetId = event.target.id;
            (targetId.indexOf("AxisLabel") > -1 || targetId.indexOf("Axis_MultiLevelLabel") > -1) && event.target.textContent.indexOf("...") > -1 ? showTooltip(this.findAxisLabel(targetId), x, y, this.element.offsetWidth, this.element.id + "_EJ2_AxisLabel_Tooltip", getElement(this.element.id + "_Secondary_Element"), isTouch) : removeElement$1(this.element.id + "_EJ2_AxisLabel_Tooltip");
        }, Chart.prototype.findAxisLabel = function(text) {
            var texts;
            return text.indexOf("AxisLabel") > -1 ? (texts = text.replace(this.element.id, "").replace("AxisLabel_", "").split("_"), 
            this.axisCollections[parseInt(texts[0], 10)].visibleLabels[parseInt(texts[1], 10)].originalText) : (texts = text.replace(this.element.id, "").replace("Axis_MultiLevelLabel_Level_", "").replace("Text_", "").split("_"), 
            this.axisCollections[parseInt(texts[0], 10)].multiLevelLabels[parseInt(texts[1], 10)].categories[parseInt(texts[2], 10)].text);
        }, Chart.prototype.chartOnMouseDown = function(e) {
            var pageX, pageY, target, touchArg, offset = Browser.isDevice ? 20 : 30, rect = this.element.getBoundingClientRect(), element = e.target;
            this.trigger("chartMouseDown", {
                target: element.id,
                x: this.mouseX,
                y: this.mouseY
            }), "touchstart" === e.type ? (this.isTouch = !0, pageX = (touchArg = e).changedTouches[0].clientX, 
            pageY = touchArg.changedTouches[0].clientY, target = touchArg.target) : (this.isTouch = "touch" === e.pointerType, 
            pageX = e.clientX, pageY = e.clientY, target = e.target);
            var svgRect = getElement(this.element.id + "_svg").getBoundingClientRect();
            return this.mouseDownX = this.previousMouseMoveX = pageX - rect.left - Math.max(svgRect.left - rect.left, 0), 
            this.mouseDownY = this.previousMouseMoveY = pageY - rect.top - Math.max(svgRect.top - rect.top, 0), 
            this.isTouch && (this.isDoubleTap = new Date().getTime() < this.threshold && -1 === target.id.indexOf(this.element.id + "_Zooming_") && (this.mouseDownX - offset >= this.mouseX || this.mouseDownX + offset >= this.mouseX) && (this.mouseDownY - offset >= this.mouseY || this.mouseDownY + offset >= this.mouseY) && (this.mouseX - offset >= this.mouseDownX || this.mouseX + offset >= this.mouseDownX) && (this.mouseY - offset >= this.mouseDownY || this.mouseY + offset >= this.mouseDownY)), 
            this.notify(Browser.touchStartEvent, e), !1;
        }, Chart.prototype.mouseEnd = function(e) {
            var pageY, pageX, touchArg;
            return "touchend" === e.type ? (pageX = (touchArg = e).changedTouches[0].clientX, 
            this.isTouch = !0, pageY = touchArg.changedTouches[0].clientY) : (pageY = e.clientY, 
            pageX = e.clientX, this.isTouch = "touch" === e.pointerType || "2" === e.pointerType), 
            this.setMouseXY(pageX, pageY), this.chartOnMouseUp(e), !1;
        }, Chart.prototype.chartOnMouseUp = function(e) {
            var element = e.target;
            return this.trigger("chartMouseUp", {
                target: element.id,
                x: this.mouseX,
                y: this.mouseY
            }), this.isChartDrag = !1, this.isTouch && (this.titleTooltip(e, this.mouseX, this.mouseY, this.isTouch), 
            this.axisTooltip(e, this.mouseX, this.mouseY, this.isTouch), this.threshold = new Date().getTime() + 300), 
            this.seriesElements.removeAttribute("clip-path"), this.notify(Browser.touchEndEvent, e), 
            !1;
        }, Chart.prototype.setCulture = function() {
            this.intl = new Internationalization(), this.setLocaleConstants(), this.localeObject = new L10n(this.getModuleName(), this.defaultLocalConstants, this.locale);
        }, Chart.prototype.setAnnotationValue = function(annotationIndex, content) {
            var element, parentNode = getElement(this.element.id + "_Annotation_Collections"), annotation = this.annotations[annotationIndex];
            null !== content && (annotation.content = content, parentNode ? (removeElement$1(this.element.id + "_Annotation_" + annotationIndex), 
            element = createElement("div"), this.annotationModule.processAnnotation(annotation, annotationIndex, element), 
            parentNode.appendChild(element.children[0])) : this.annotationModule.renderAnnotations(getElement(this.element.id + "_Secondary_Element")));
        }, Chart.prototype.setLocaleConstants = function() {
            this.defaultLocalConstants = {
                ZoomIn: "ZoomIn",
                Zoom: "Zoom",
                ZoomOut: "ZoomOut",
                Pan: "Pan",
                Reset: "Reset",
                ResetZoom: "Reset Zoom"
            };
        }, Chart.prototype.setTheme = function() {
            this.themeStyle = getThemeColor(this.theme);
        }, Chart.prototype.requiredModules = function() {
            var moduleName, _this = this, modules = [], series = this.series, enableAnnotation = !1, errorBarVisible = !1, dataLabelEnable = !1, zooming = this.zoomSettings;
            return this.chartAreaType = series.length > 0 && ("Polar" === series[0].type || "Radar" === series[0].type) ? "PolarRadar" : "Cartesian", 
            this.tooltip.enable && modules.push({
                member: "Tooltip",
                args: [ this ]
            }), series.map(function(value) {
                _this.isLegend = _this.legendSettings.visible && ("" !== value.name || !!_this.isLegend), 
                moduleName = -1 !== value.type.indexOf("100") ? value.type.replace("100", "") + "Series" : value.type + "Series", 
                errorBarVisible = value.errorBar.visible || errorBarVisible, dataLabelEnable = value.marker.dataLabel.visible || dataLabelEnable, 
                modules.some(function(currentModule) {
                    return currentModule.member === moduleName;
                }) || modules.push({
                    member: moduleName,
                    args: [ _this, series ]
                }), "PolarRadar" === _this.chartAreaType && modules.push({
                    member: value.drawType + "Series",
                    args: [ _this, series ]
                });
            }), this.findIndicatorModules(modules), this.findTrendLineModules(modules), modules = this.findAxisModule(modules), 
            enableAnnotation = this.annotations.some(function(value) {
                return null !== value.content;
            }), errorBarVisible && modules.push({
                member: "ErrorBar",
                args: [ this, series ]
            }), this.isLegend && modules.push({
                member: "Legend",
                args: [ this ]
            }), "PolarRadar" !== this.chartAreaType && (zooming.enableSelectionZooming || zooming.enableMouseWheelZooming || zooming.enablePinchZooming || zooming.enablePan) && modules.push({
                member: "Zoom",
                args: [ this, this.zoomSettings ]
            }), "None" === this.selectionMode || "PolarRadar" === this.chartAreaType && this.selectionMode.indexOf("Drag") > -1 || modules.push({
                member: "Selection",
                args: [ this ]
            }), dataLabelEnable && modules.push({
                member: "DataLabel",
                args: [ this, series ]
            }), enableAnnotation && modules.push({
                member: "Annotation",
                args: [ this, this.annotations ]
            }), "PolarRadar" !== this.chartAreaType && this.crosshair.enable && modules.push({
                member: "Crosshair",
                args: [ this ]
            }), modules;
        }, Chart.prototype.findAxisModule = function(modules) {
            var axisCollections = [];
            axisCollections.push(this.primaryXAxis), axisCollections.push(this.primaryYAxis);
            for (var datetimeEnabled = !1, categoryEnabled = !1, logarithmicEnabled = !1, striplineEnabled = !1, dateTimeCategoryEnabled = !1, multiLevelEnabled = !1, _i = 0, axisCollections_1 = axisCollections = axisCollections.concat(this.axes); _i < axisCollections_1.length; _i++) {
                var axis = axisCollections_1[_i];
                datetimeEnabled = "DateTime" === axis.valueType || datetimeEnabled, categoryEnabled = "Category" === axis.valueType || categoryEnabled, 
                logarithmicEnabled = "Logarithmic" === axis.valueType || logarithmicEnabled, dateTimeCategoryEnabled = "DateTimeCategory" === axis.valueType || dateTimeCategoryEnabled, 
                striplineEnabled = this.findStriplineVisibility(axis.stripLines) || striplineEnabled, 
                multiLevelEnabled = axis.multiLevelLabels.length > 0 || multiLevelEnabled;
            }
            return datetimeEnabled && modules.push({
                member: "DateTime",
                args: [ this ]
            }), categoryEnabled && modules.push({
                member: "Category",
                args: [ this ]
            }), logarithmicEnabled && modules.push({
                member: "Logarithmic",
                args: [ this ]
            }), striplineEnabled && modules.push({
                member: "StripLine",
                args: [ this ]
            }), multiLevelEnabled && modules.push({
                member: "MultiLevelLabel",
                args: [ this ]
            }), dateTimeCategoryEnabled && modules.push({
                member: "DateTimeCategory",
                args: [ this ]
            }), modules;
        }, Chart.prototype.findIndicatorModules = function(modules) {
            var macdEnable, bandEnable, indicators = this.indicators;
            if (this.indicators.length) {
                modules.push({
                    member: "LineSeries",
                    args: [ this ]
                }), indicators.map(function(indicator) {
                    macdEnable = macdEnable || "Macd" === indicator.type, bandEnable = bandEnable || "BollingerBands" === indicator.type;
                }), macdEnable && modules.push({
                    member: "ColumnSeries",
                    args: [ this ]
                }), bandEnable && modules.push({
                    member: "RangeAreaSeries",
                    args: [ this ]
                });
                for (var _i = 0, _a = this.indicators; _i < _a.length; _i++) {
                    var indicator = _a[_i];
                    modules.push({
                        member: indicator.type + "Indicator",
                        args: [ this ]
                    });
                }
            }
        }, Chart.prototype.findTrendLineModules = function(modules) {
            for (var isLine, isSpline, _loop_1 = function(series) {
                var markerEnable;
                series.trendlines.map(function(trendline) {
                    markerEnable = markerEnable || trendline.marker.visible, isLine = !(!isLine && "Linear" !== trendline.type && "MovingAverage" !== trendline.type), 
                    isSpline = !(!isSpline && isLine);
                }), markerEnable && modules.push({
                    member: "Marker",
                    args: [ this_1, series ]
                });
            }, this_1 = this, _i = 0, _a = this.series; _i < _a.length; _i++) {
                _loop_1(_a[_i]);
            }
            (isLine || isSpline) && modules.push({
                member: "TrendLine",
                args: [ this ]
            }), isLine && modules.push({
                member: "LineSeries",
                args: [ this ]
            }), isSpline && modules.push({
                member: "SplineSeries",
                args: [ this ]
            });
        }, Chart.prototype.findStriplineVisibility = function(striplines) {
            for (var visible = !1, _i = 0, striplines_1 = striplines; _i < striplines_1.length; _i++) {
                if (striplines_1[_i].visible) {
                    visible = !0;
                    break;
                }
            }
            return visible;
        }, Chart.prototype.removeSvg = function() {
            document.getElementById(this.element.id + "_Secondary_Element") && remove(document.getElementById(this.element.id + "_Secondary_Element"));
            var removeLength = 0;
            if (this.zoomModule && this.zoomModule.pinchTarget && (this.zoomModule.pinchTarget.id = "", 
            this.zoomModule.pinchTarget.setAttribute("opacity", "0"), this.svgObject.appendChild(this.zoomModule.pinchTarget), 
            removeLength = 1), this.svgObject) {
                for (;this.svgObject.childNodes.length > removeLength; ) this.svgObject.removeChild(this.svgObject.firstChild);
                !this.svgObject.hasChildNodes() && this.svgObject.parentNode && remove(this.svgObject);
            }
        }, Chart.prototype.refreshDefinition = function(definitions) {
            for (var _i = 0, definitions_1 = definitions; _i < definitions_1.length; _i++) {
                definitions_1[_i].axes = [];
            }
        }, Chart.prototype.refreshAxis = function() {
            var axis = this.primaryXAxis;
            axis.rect = new Rect(void 0, void 0, 0, 0), (axis = this.primaryYAxis).isStack100 = !1, 
            axis.rect = new Rect(void 0, void 0, 0, 0);
            for (var _i = 0, _a = this.axes; _i < _a.length; _i++) {
                (axis = _a[_i]).rect = new Rect(void 0, void 0, 0, 0), axis.isStack100 = !1;
            }
        }, Chart.prototype.axisChange = function(axis) {
            return !(!axis.name && !axis.valueType) && (this.refreshDefinition(this.columns), 
            this.refreshDefinition(this.rows), this.calculateVisibleAxis(), this.processData(), 
            !0);
        }, Chart.prototype.onPropertyChanged = function(newProp, oldProp) {
            var renderer = !1, refreshBounds = !1;
            if ((1 !== Object.keys(newProp).length || "indicators" !== Object.keys(newProp)[0]) && (this.animateSeries = !1, 
            !this.delayRedraw)) {
                for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                    switch (_a[_i]) {
                      case "primaryXAxis":
                        refreshBounds = this.axisChange(newProp.primaryXAxis), newProp.primaryXAxis.edgeLabelPlacement && (renderer = !0), 
                        newProp.primaryXAxis.crosshairTooltip || (refreshBounds = !0);
                        break;

                      case "primaryYAxis":
                        refreshBounds = this.axisChange(newProp.primaryYAxis), newProp.primaryYAxis.edgeLabelPlacement && (renderer = !0), 
                        newProp.primaryYAxis.crosshairTooltip || (refreshBounds = !0);
                        break;

                      case "height":
                      case "width":
                        this.createChartSvg(), refreshBounds = !0;
                        break;

                      case "title":
                        refreshBounds = !0;
                        break;

                      case "titleStyle":
                        newProp.titleStyle && (newProp.titleStyle.size || newProp.titleStyle.textOverflow) ? refreshBounds = !0 : renderer = !0;
                        break;

                      case "border":
                        renderer = !0;
                        break;

                      case "zoomSettings":
                      case "background":
                        renderer = !0;
                        break;

                      case "chartArea":
                        newProp.chartArea.border && newProp.chartArea.border.width && (refreshBounds = !0), 
                        renderer = !0;
                        break;

                      case "legendSettings":
                        newProp.legendSettings.background && newProp.legendSettings.opacity || (refreshBounds = !0), 
                        renderer = !0;
                        break;

                      case "palettes":
                        this.calculateVisibleSeries(), renderer = !0;
                        break;

                      case "selectedDataIndexes":
                      case "selectionMode":
                        this.selectionModule && newProp.selectionMode && -1 === newProp.selectionMode.indexOf("Drag") && this.selectionModule.redrawSelection(this, oldProp.selectionMode);
                        break;

                      case "isMultiSelect":
                        this.selectionModule && !newProp.isMultiSelect && this.selectionModule.selectedDataIndexes.length > 1 && this.selectionModule.redrawSelection(this, oldProp.selectionMode);
                        break;

                      case "theme":
                        this.animateSeries = !0;
                        break;

                      case "locale":
                      case "currencyCode":
                        _super.prototype.refresh.call(this);
                        break;

                      case "tooltip":
                        this.tooltipModule.previousPoints = [];
                    }
                }
                !refreshBounds && renderer && (this.removeSvg(), this.renderElements(), this.trigger("loaded", {
                    chart: this
                })), refreshBounds && (this.removeSvg(), this.refreshAxis(), this.refreshBound(), 
                this.trigger("loaded", {
                    chart: this
                }));
            }
        }, __decorate$41([ Property(null) ], Chart.prototype, "width", void 0), __decorate$41([ Property(null) ], Chart.prototype, "height", void 0), 
        __decorate$41([ Property("") ], Chart.prototype, "title", void 0), __decorate$41([ Complex(Theme.chartTitleFont, Font) ], Chart.prototype, "titleStyle", void 0), 
        __decorate$41([ Complex({}, Margin) ], Chart.prototype, "margin", void 0), __decorate$41([ Complex({
            color: "#DDDDDD",
            width: 0
        }, Border) ], Chart.prototype, "border", void 0), __decorate$41([ Property(null) ], Chart.prototype, "background", void 0), 
        __decorate$41([ Complex({
            border: {
                color: null,
                width: .5
            },
            background: "transparent"
        }, ChartArea) ], Chart.prototype, "chartArea", void 0), __decorate$41([ Complex({
            name: "primaryXAxis"
        }, Axis) ], Chart.prototype, "primaryXAxis", void 0), __decorate$41([ Complex({
            name: "primaryYAxis"
        }, Axis) ], Chart.prototype, "primaryYAxis", void 0), __decorate$41([ Collection([ {} ], Row) ], Chart.prototype, "rows", void 0), 
        __decorate$41([ Collection([ {} ], Column$1) ], Chart.prototype, "columns", void 0), 
        __decorate$41([ Collection([ {} ], Axis) ], Chart.prototype, "axes", void 0), __decorate$41([ Collection([ {} ], Series) ], Chart.prototype, "series", void 0), 
        __decorate$41([ Collection([ {} ], ChartAnnotationSettings) ], Chart.prototype, "annotations", void 0), 
        __decorate$41([ Property([]) ], Chart.prototype, "palettes", void 0), __decorate$41([ Property("Material") ], Chart.prototype, "theme", void 0), 
        __decorate$41([ Complex({}, TooltipSettings) ], Chart.prototype, "tooltip", void 0), 
        __decorate$41([ Complex({}, CrosshairSettings) ], Chart.prototype, "crosshair", void 0), 
        __decorate$41([ Complex({}, LegendSettings) ], Chart.prototype, "legendSettings", void 0), 
        __decorate$41([ Complex({}, ZoomSettings) ], Chart.prototype, "zoomSettings", void 0), 
        __decorate$41([ Property("None") ], Chart.prototype, "selectionMode", void 0), __decorate$41([ Property(!1) ], Chart.prototype, "isMultiSelect", void 0), 
        __decorate$41([ Collection([], Indexes) ], Chart.prototype, "selectedDataIndexes", void 0), 
        __decorate$41([ Property(!1) ], Chart.prototype, "useGroupingSeparator", void 0), 
        __decorate$41([ Property(!1) ], Chart.prototype, "isTransposed", void 0), __decorate$41([ Collection([], TechnicalIndicator) ], Chart.prototype, "indicators", void 0), 
        __decorate$41([ Property(null) ], Chart.prototype, "description", void 0), __decorate$41([ Property(1) ], Chart.prototype, "tabIndex", void 0), 
        __decorate$41([ Property(!0) ], Chart.prototype, "enableSideBySidePlacement", void 0), 
        __decorate$41([ Event() ], Chart.prototype, "annotationRender", void 0), __decorate$41([ Event() ], Chart.prototype, "beforePrint", void 0), 
        __decorate$41([ Event() ], Chart.prototype, "loaded", void 0), __decorate$41([ Event() ], Chart.prototype, "load", void 0), 
        __decorate$41([ Event() ], Chart.prototype, "animationComplete", void 0), __decorate$41([ Event() ], Chart.prototype, "legendRender", void 0), 
        __decorate$41([ Event() ], Chart.prototype, "textRender", void 0), __decorate$41([ Event() ], Chart.prototype, "pointRender", void 0), 
        __decorate$41([ Event() ], Chart.prototype, "seriesRender", void 0), __decorate$41([ Event() ], Chart.prototype, "axisLabelRender", void 0), 
        __decorate$41([ Event() ], Chart.prototype, "axisRangeCalculated", void 0), __decorate$41([ Event() ], Chart.prototype, "axisMultiLabelRender", void 0), 
        __decorate$41([ Event() ], Chart.prototype, "tooltipRender", void 0), __decorate$41([ Event() ], Chart.prototype, "chartMouseMove", void 0), 
        __decorate$41([ Event() ], Chart.prototype, "chartMouseClick", void 0), __decorate$41([ Event() ], Chart.prototype, "pointClick", void 0), 
        __decorate$41([ Event() ], Chart.prototype, "pointMove", void 0), __decorate$41([ Event() ], Chart.prototype, "chartMouseLeave", void 0), 
        __decorate$41([ Event() ], Chart.prototype, "chartMouseDown", void 0), __decorate$41([ Event() ], Chart.prototype, "chartMouseUp", void 0), 
        __decorate$41([ Event() ], Chart.prototype, "dragComplete", void 0), __decorate$41([ Event() ], Chart.prototype, "zoomComplete", void 0), 
        __decorate$41([ Property("USD") ], Chart.prototype, "currencyCode", void 0), Chart = __decorate$41([ NotifyPropertyChanges ], Chart);
    }(Component), __extends$63 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), NiceInterval = function(_super) {
        function NiceInterval() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$63(NiceInterval, _super), NiceInterval.prototype.calculateDateTimeNiceInterval = function(axis, size, start, end) {
            var interval, startDate = new Date(start), endDate = new Date(end), totalDays = Math.abs((startDate.getTime() - endDate.getTime()) / 864e5);
            switch (axis.actualIntervalType = axis.intervalType, axis.intervalType) {
              case "Years":
                interval = this.calculateNumericNiceInterval(axis, totalDays / 365, size);
                break;

              case "Months":
                interval = this.calculateNumericNiceInterval(axis, totalDays / 30, size);
                break;

              case "Days":
                interval = this.calculateNumericNiceInterval(axis, totalDays, size);
                break;

              case "Hours":
                interval = this.calculateNumericNiceInterval(axis, 24 * totalDays, size);
                break;

              case "Minutes":
                interval = this.calculateNumericNiceInterval(axis, 24 * totalDays * 60, size);
                break;

              case "Seconds":
                interval = this.calculateNumericNiceInterval(axis, 24 * totalDays * 60 * 60, size);
                break;

              case "Auto":
                return (interval = this.calculateNumericNiceInterval(axis, totalDays / 365, size)) >= 1 ? (axis.actualIntervalType = "Years", 
                interval) : (interval = this.calculateNumericNiceInterval(axis, totalDays / 30, size)) >= 1 ? (axis.actualIntervalType = "Months", 
                interval) : (interval = this.calculateNumericNiceInterval(axis, totalDays, size)) >= 1 ? (axis.actualIntervalType = "Days", 
                interval) : (interval = this.calculateNumericNiceInterval(axis, 24 * totalDays, size)) >= 1 ? (axis.actualIntervalType = "Hours", 
                interval) : (interval = this.calculateNumericNiceInterval(axis, 24 * totalDays * 60, size)) >= 1 ? (axis.actualIntervalType = "Minutes", 
                interval) : (interval = this.calculateNumericNiceInterval(axis, 24 * totalDays * 60 * 60, size), 
                axis.actualIntervalType = "Seconds", interval);
            }
            return interval;
        }, NiceInterval.prototype.getSkeleton = function(axis) {
            return axis.skeleton ? axis.skeleton : "Years" === axis.actualIntervalType ? "yMMM" : "Months" === axis.actualIntervalType ? "MMMd" : "Days" === axis.actualIntervalType ? "yMd" : "Hours" === axis.actualIntervalType ? "EHm" : ("Minutes" === axis.actualIntervalType || axis.actualIntervalType, 
            "Hms");
        }, NiceInterval;
    }(Double), __extends$62 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), DateTime = function(_super) {
        function DateTime(chart) {
            return _super.call(this, chart) || this;
        }
        return __extends$62(DateTime, _super), DateTime.prototype.calculateRangeAndInterval = function(size, axis) {
            this.calculateRange(axis, size), this.getActualRange(axis, size), this.applyRangePadding(axis, size), 
            this.calculateVisibleLabels(axis);
        }, DateTime.prototype.getActualRange = function(axis, size) {
            var option = {
                skeleton: "full",
                type: "dateTime"
            }, dateParser = this.chart.intl.getDateParser(option), dateFormatter = this.chart.intl.getDateFormat(option);
            null !== axis.minimum ? this.min = Date.parse(dateParser(dateFormatter(new Date(DataUtil.parse.parseJson({
                val: axis.minimum
            }).val)))) : null !== this.min && this.min !== Number.POSITIVE_INFINITY || (this.min = Date.parse(dateParser(dateFormatter(new Date(1970, 1, 1))))), 
            null !== axis.maximum ? this.max = Date.parse(dateParser(dateFormatter(new Date(DataUtil.parse.parseJson({
                val: axis.maximum
            }).val)))) : null !== this.max && this.max !== Number.NEGATIVE_INFINITY || (this.max = Date.parse(dateParser(dateFormatter(new Date(1970, 5, 1))))), 
            this.min === this.max && (this.max = this.max + 2592e6, this.min = this.min - 2592e6), 
            axis.actualRange = {}, axis.doubleRange = new DoubleRange(this.min, this.max);
            var datetimeInterval = this.calculateDateTimeNiceInterval(axis, size, axis.doubleRange.start, axis.doubleRange.end);
            axis.interval ? axis.actualRange.interval = axis.interval : axis.actualRange.interval = datetimeInterval, 
            axis.actualRange.min = axis.doubleRange.start, axis.actualRange.max = axis.doubleRange.end;
        }, DateTime.prototype.applyRangePadding = function(axis, size) {
            this.start = axis.actualRange.min, this.end = axis.actualRange.max;
            var minimum, maximum, interval = axis.actualRange.interval;
            if (!axis.setRange()) {
                var rangePadding = axis.getRangePadding(this.chart);
                minimum = new Date(this.start), maximum = new Date(this.end);
                var intervalType = axis.actualIntervalType;
                if ("None" === rangePadding) this.start = minimum.getTime(), this.end = maximum.getTime(); else if ("Additional" === rangePadding || "Round" === rangePadding) switch (intervalType) {
                  case "Years":
                    this.getYear(minimum, maximum, rangePadding, interval);
                    break;

                  case "Months":
                    this.getMonth(minimum, maximum, rangePadding, interval);
                    break;

                  case "Days":
                    this.getDay(minimum, maximum, rangePadding, interval);
                    break;

                  case "Hours":
                    this.getHour(minimum, maximum, rangePadding, interval);
                    break;

                  case "Minutes":
                    var minute = minimum.getMinutes() / interval * interval, endMinute = maximum.getMinutes() + (minimum.getMinutes() - minute);
                    "Round" === rangePadding ? (this.start = new Date(minimum.getFullYear(), minimum.getMonth(), minimum.getDate(), minimum.getHours(), minute, 0).getTime(), 
                    this.end = new Date(maximum.getFullYear(), maximum.getMonth(), maximum.getDate(), maximum.getHours(), endMinute, 59).getTime()) : (this.start = new Date(minimum.getFullYear(), maximum.getMonth(), minimum.getDate(), minimum.getHours(), minute + -interval, 0).getTime(), 
                    this.end = new Date(maximum.getFullYear(), maximum.getMonth(), maximum.getDate(), maximum.getHours(), endMinute + interval, 0).getTime());
                    break;

                  case "Seconds":
                    var second = minimum.getSeconds() / interval * interval, endSecond = maximum.getSeconds() + (minimum.getSeconds() - second);
                    "Round" === rangePadding ? (this.start = new Date(minimum.getFullYear(), minimum.getMonth(), minimum.getDate(), minimum.getHours(), minimum.getMinutes(), second, 0).getTime(), 
                    this.end = new Date(maximum.getFullYear(), maximum.getMonth(), maximum.getDate(), maximum.getHours(), maximum.getMinutes(), endSecond, 0).getTime()) : (this.start = new Date(minimum.getFullYear(), minimum.getMonth(), minimum.getDate(), minimum.getHours(), minimum.getMinutes(), second + -interval, 0).getTime(), 
                    this.end = new Date(maximum.getFullYear(), maximum.getMonth(), maximum.getDate(), maximum.getHours(), maximum.getMinutes(), endSecond + interval, 0).getTime());
                }
            }
            axis.actualRange.min = null != axis.minimum ? this.min : this.start, axis.actualRange.max = null != axis.maximum ? this.max : this.end, 
            axis.actualRange.delta = axis.actualRange.max - axis.actualRange.min, axis.doubleRange = new DoubleRange(axis.actualRange.min, axis.actualRange.max), 
            this.calculateVisibleRange(size, axis);
        }, DateTime.prototype.getYear = function(minimum, maximum, rangePadding, interval) {
            var startYear = minimum.getFullYear(), endYear = maximum.getFullYear();
            "Additional" === rangePadding ? (this.start = new Date(startYear - interval, 1, 1, 0, 0, 0).getTime(), 
            this.end = new Date(endYear + interval, 1, 1, 0, 0, 0).getTime()) : (this.start = new Date(startYear, 0, 0, 0, 0, 0).getTime(), 
            this.end = new Date(endYear, 11, 30, 23, 59, 59).getTime());
        }, DateTime.prototype.getMonth = function(minimum, maximum, rangePadding, interval) {
            var month = minimum.getMonth(), endMonth = maximum.getMonth();
            "Round" === rangePadding ? (this.start = new Date(minimum.getFullYear(), month, 0, 0, 0, 0).getTime(), 
            this.end = new Date(maximum.getFullYear(), endMonth, new Date(maximum.getFullYear(), maximum.getMonth(), 0).getDate(), 23, 59, 59).getTime()) : (this.start = new Date(minimum.getFullYear(), month + -interval, 1, 0, 0, 0).getTime(), 
            this.end = new Date(maximum.getFullYear(), endMonth + interval, 2 === endMonth ? 28 : 30, 0, 0, 0).getTime());
        }, DateTime.prototype.getDay = function(minimum, maximum, rangePadding, interval) {
            var day = minimum.getDate(), endDay = maximum.getDate();
            "Round" === rangePadding ? (this.start = new Date(minimum.getFullYear(), minimum.getMonth(), day, 0, 0, 0).getTime(), 
            this.end = new Date(maximum.getFullYear(), maximum.getMonth(), endDay, 23, 59, 59).getTime()) : (this.start = new Date(minimum.getFullYear(), minimum.getMonth(), day + -interval, 0, 0, 0).getTime(), 
            this.end = new Date(maximum.getFullYear(), maximum.getMonth(), endDay + interval, 0, 0, 0).getTime());
        }, DateTime.prototype.getHour = function(minimum, maximum, rangePadding, interval) {
            var hour = minimum.getHours() / interval * interval, endHour = maximum.getHours() + (minimum.getHours() - hour);
            "Round" === rangePadding ? (this.start = new Date(minimum.getFullYear(), minimum.getMonth(), minimum.getDate(), hour, 0, 0).getTime(), 
            this.end = new Date(maximum.getFullYear(), maximum.getMonth(), maximum.getDate(), endHour, 59, 59).getTime()) : (this.start = new Date(minimum.getFullYear(), minimum.getMonth(), minimum.getDate(), hour + -interval, 0, 0).getTime(), 
            this.end = new Date(maximum.getFullYear(), maximum.getMonth(), maximum.getDate(), endHour + interval, 0, 0).getTime());
        }, DateTime.prototype.calculateVisibleRange = function(size, axis) {
            axis.visibleRange = {
                min: axis.actualRange.min,
                max: axis.actualRange.max,
                interval: axis.actualRange.interval,
                delta: axis.actualRange.delta
            }, (axis.zoomFactor < 1 || axis.zoomPosition > 0) && (axis.calculateVisibleRange(size), 
            axis.visibleRange.interval = axis.enableAutoIntervalOnZooming ? this.calculateDateTimeNiceInterval(axis, size, axis.visibleRange.min, axis.visibleRange.max) : axis.visibleRange.interval), 
            axis.dateTimeInterval = this.increaseDateTimeInterval(axis, axis.visibleRange.min, axis.visibleRange.interval).getTime() - axis.visibleRange.min, 
            axis.triggerRangeRender(this.chart, axis.visibleRange.min, axis.visibleRange.max, axis.visibleRange.interval);
        }, DateTime.prototype.calculateVisibleLabels = function(axis) {
            axis.visibleLabels = [];
            var tempInterval = axis.visibleRange.min;
            for (axis.setRange() || (tempInterval = this.alignRangeStart(axis, tempInterval, axis.visibleRange.interval, axis.actualIntervalType).getTime()), 
            axis.format = this.chart.intl.getDateFormat({
                format: axis.labelFormat,
                type: firstToLowerCase(axis.skeletonType),
                skeleton: this.getSkeleton(axis)
            }), axis.startLabel = axis.format(new Date(axis.visibleRange.min)), axis.endLabel = axis.format(new Date(axis.visibleRange.max)); tempInterval <= axis.visibleRange.max; ) withIn(tempInterval, axis.visibleRange) && axis.triggerLabelRender(this.chart, tempInterval, axis.format(new Date(tempInterval)), axis.labelStyle), 
            tempInterval = this.increaseDateTimeInterval(axis, tempInterval, axis.visibleRange.interval).getTime();
            axis.getMaxLabelWidth(this.chart);
        }, DateTime.prototype.increaseDateTimeInterval = function(axis, value, interval) {
            var result = new Date(value);
            switch (interval = Math.ceil(interval), axis.actualIntervalType) {
              case "Years":
                return result.setFullYear(result.getFullYear() + interval), result;

              case "Months":
                return result.setMonth(result.getMonth() + interval), result;

              case "Days":
                return result.setDate(result.getDate() + interval), result;

              case "Hours":
                return result.setHours(result.getHours() + interval), result;

              case "Minutes":
                return result.setMinutes(result.getMinutes() + interval), result;

              case "Seconds":
                return result.setSeconds(result.getSeconds() + interval), result;
            }
            return result;
        }, DateTime.prototype.alignRangeStart = function(axis, sDate, intervalSize, intervalType) {
            var sResult = new Date(sDate);
            switch (axis.actualIntervalType) {
              case "Years":
                var year = Math.floor(Math.floor(sResult.getFullYear() / intervalSize) * intervalSize);
                return sResult = new Date(year, sResult.getMonth(), sResult.getDate(), 0, 0, 0);

              case "Months":
                var month = Math.floor(Math.floor(sResult.getMonth() / intervalSize) * intervalSize);
                return sResult = new Date(sResult.getFullYear(), month, sResult.getDate(), 0, 0, 0);

              case "Days":
                var day = Math.floor(Math.floor(sResult.getDate() / intervalSize) * intervalSize);
                return sResult = new Date(sResult.getFullYear(), sResult.getMonth(), day, 0, 0, 0);

              case "Hours":
                var hour = Math.floor(Math.floor(sResult.getHours() / intervalSize) * intervalSize);
                return sResult = new Date(sResult.getFullYear(), sResult.getMonth(), sResult.getDate(), hour, 0, 0);

              case "Minutes":
                var minutes = Math.floor(Math.floor(sResult.getMinutes() / intervalSize) * intervalSize);
                return sResult = new Date(sResult.getFullYear(), sResult.getMonth(), sResult.getDate(), sResult.getHours(), minutes, 0, 0);

              case "Seconds":
                var seconds = Math.floor(Math.floor(sResult.getSeconds() / intervalSize) * intervalSize);
                return sResult = new Date(sResult.getFullYear(), sResult.getMonth(), sResult.getDate(), sResult.getHours(), sResult.getMinutes(), seconds, 0);
            }
            return sResult;
        }, DateTime.prototype.getModuleName = function() {
            return "DateTime";
        }, DateTime.prototype.destroy = function(chart) {}, DateTime;
    }(NiceInterval), __extends$64 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), Category = function(_super) {
        function Category(chart) {
            return _super.call(this, chart) || this;
        }
        return __extends$64(Category, _super), Category.prototype.calculateRangeAndInterval = function(size, axis) {
            this.calculateRange(axis, size), this.getActualRange(axis, size), this.applyRangePadding(axis, size), 
            this.calculateVisibleLabels(axis);
        }, Category.prototype.getActualRange = function(axis, size) {
            this.initializeDoubleRange(axis), axis.actualRange = {}, axis.interval ? axis.actualRange.interval = Math.ceil(axis.interval) : axis.actualRange.interval = Math.max(1, Math.floor(axis.doubleRange.delta / axis.getActualDesiredIntervalsCount(size))), 
            axis.actualRange.min = axis.doubleRange.start, axis.actualRange.max = axis.doubleRange.end, 
            axis.actualRange.delta = axis.doubleRange.delta;
        }, Category.prototype.applyRangePadding = function(axis, size) {
            var ticks = "BetweenTicks" === axis.labelPlacement && "PolarRadar" !== this.chart.chartAreaType ? .5 : 0;
            ticks > 0 ? (axis.actualRange.min -= ticks, axis.actualRange.max += ticks) : axis.actualRange.max += axis.actualRange.max ? 0 : .5, 
            axis.doubleRange = new DoubleRange(axis.actualRange.min, axis.actualRange.max), 
            axis.actualRange.delta = axis.doubleRange.delta, this.calculateVisibleRange(size, axis);
        }, Category.prototype.calculateVisibleLabels = function(axis) {
            axis.visibleLabels = [];
            var tempInterval = Math.ceil(axis.visibleRange.min);
            (axis.zoomFactor < 1 || axis.zoomPosition > 0) && (tempInterval = axis.visibleRange.min - axis.visibleRange.min % axis.visibleRange.interval);
            var position;
            for (axis.startLabel = axis.labels[Math.round(axis.visibleRange.min)], axis.endLabel = axis.labels[Math.floor(axis.visibleRange.max)]; tempInterval <= axis.visibleRange.max; tempInterval += axis.visibleRange.interval) withIn(tempInterval, axis.visibleRange) && axis.labels.length > 0 && (position = Math.round(tempInterval), 
            axis.triggerLabelRender(this.chart, position, axis.labels[position] ? axis.labels[position] : position.toString(), axis.labelStyle));
            axis.getMaxLabelWidth(this.chart);
        }, Category.prototype.getModuleName = function() {
            return "Category";
        }, Category.prototype.destroy = function(chart) {}, Category;
    }(NiceInterval), __extends$65 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), Logarithmic = function(_super) {
        function Logarithmic(chart) {
            return _super.call(this, chart) || this;
        }
        return __extends$65(Logarithmic, _super), Logarithmic.prototype.calculateRangeAndInterval = function(size, axis) {
            this.calculateRange(axis, size), this.getActualRange(axis, size), this.calculateVisibleRange(size, axis), 
            this.calculateVisibleLabels(axis, this.chart);
        }, Logarithmic.prototype.getActualRange = function(axis, size) {
            this.initializeDoubleRange(axis), this.min = this.min < 0 ? 0 : this.min;
            var logStart = logBase(this.min, axis.logBase);
            logStart = isFinite(logStart) ? logStart : this.min;
            var logEnd = logBase(this.max, axis.logBase);
            logEnd = isFinite(logStart) ? logEnd : this.max, this.min = Math.floor(logStart / 1), 
            this.max = Math.ceil(logEnd / 1), axis.actualRange.interval = axis.interval || this.calculateLogNiceInterval(this.max - this.min, size, axis), 
            axis.actualRange.min = this.min, axis.actualRange.max = this.max, axis.actualRange.delta = this.max - this.min;
        }, Logarithmic.prototype.calculateVisibleRange = function(size, axis) {
            axis.visibleRange = {
                interval: axis.actualRange.interval,
                max: axis.actualRange.max,
                min: axis.actualRange.min,
                delta: axis.actualRange.delta
            }, (axis.zoomFactor < 1 || axis.zoomPosition > 0) && (axis.calculateVisibleRange(size), 
            axis.visibleRange.interval = axis.enableAutoIntervalOnZooming ? this.calculateLogNiceInterval(axis.doubleRange.delta, size, axis) : axis.visibleRange.interval, 
            axis.visibleRange.interval = 0 === Math.floor(axis.visibleRange.interval) ? 1 : Math.floor(axis.visibleRange.interval), 
            axis.triggerRangeRender(this.chart, axis.visibleRange.min, axis.visibleRange.max, axis.visibleRange.interval));
        }, Logarithmic.prototype.calculateLogNiceInterval = function(delta, size, axis) {
            for (var actualDesiredIntervalsCount = axis.getActualDesiredIntervalsCount(size), niceInterval = delta, minInterval = Math.pow(10, Math.floor(logBase(niceInterval, 10))), j = 0, len = axis.intervalDivs.length; j < len; j++) {
                var currentInterval = minInterval * axis.intervalDivs[j];
                if (actualDesiredIntervalsCount < delta / currentInterval) break;
                niceInterval = currentInterval;
            }
            return niceInterval;
        }, Logarithmic.prototype.calculateVisibleLabels = function(axis, chart) {
            var tempInterval = axis.visibleRange.min;
            axis.visibleLabels = [], (axis.zoomFactor < 1 || axis.zoomPosition > 0) && (tempInterval = axis.visibleRange.min - axis.visibleRange.min % axis.visibleRange.interval);
            var axisFormat = this.getFormat(axis), isCustomFormat = null !== axisFormat.match("{value}");
            for (axis.format = chart.intl.getNumberFormat({
                format: isCustomFormat ? "" : axisFormat,
                useGrouping: chart.useGroupingSeparator
            }), axis.startLabel = axis.format(Math.pow(axis.logBase, axis.visibleRange.min)), 
            axis.endLabel = axis.format(Math.pow(axis.logBase, axis.visibleRange.max)); tempInterval <= axis.visibleRange.max; tempInterval += axis.visibleRange.interval) withIn(tempInterval, axis.visibleRange) && axis.triggerLabelRender(this.chart, tempInterval, this.formatValue(axis, isCustomFormat, axisFormat, Math.pow(axis.logBase, tempInterval)), axis.labelStyle);
            axis.getMaxLabelWidth(this.chart);
        }, Logarithmic.prototype.getModuleName = function() {
            return "Logarithmic";
        }, Logarithmic.prototype.destroy = function(chart) {}, Logarithmic;
    }(Double), __extends$66 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), DateTimeCategory = function(_super) {
        function DateTimeCategory(chart) {
            return _super.call(this, chart) || this;
        }
        return __extends$66(DateTimeCategory, _super), DateTimeCategory.prototype.calculateRangeAndInterval = function(size, axis) {
            this.axisSize = size, this.calculateRange(axis, size), this.getActualRange(axis, size), 
            this.applyRangePadding(axis, size), this.calculateVisibleLabels(axis);
        }, DateTimeCategory.prototype.calculateVisibleLabels = function(axis) {
            axis.visibleLabels = [];
            var padding = "BetweenTicks" === axis.labelPlacement ? .5 : 0;
            "Auto" === axis.intervalType ? this.calculateDateTimeNiceInterval(axis, this.axisSize, parseInt(axis.labels[0], 10), parseInt(axis.labels[axis.labels.length - 1], 10)) : axis.actualIntervalType = axis.intervalType, 
            axis.format = this.chart.intl.getDateFormat({
                format: axis.labelFormat,
                type: firstToLowerCase(axis.skeletonType),
                skeleton: this.getSkeleton(axis)
            });
            for (var i = 0; i < axis.labels.length; i++) this.sameInterval(axis.labels.map(Number)[i], axis.labels.map(Number)[i - 1], axis.actualIntervalType, i) || withIn(i - padding, axis.visibleRange) && axis.triggerLabelRender(this.chart, i, axis.format(new Date(axis.labels.map(Number)[i])), axis.labelStyle);
            axis.getMaxLabelWidth(this.chart);
        }, DateTimeCategory.prototype.sameInterval = function(currentDate, previousDate, type, index) {
            var sameValue;
            if (0 === index) sameValue = !1; else switch (type) {
              case "Years":
                sameValue = new Date(currentDate).getFullYear() === new Date(previousDate).getFullYear();
                break;

              case "Months":
                sameValue = new Date(currentDate).getFullYear() === new Date(previousDate).getFullYear() && new Date(currentDate).getMonth() === new Date(previousDate).getMonth();
                break;

              case "Days":
                sameValue = Math.abs(currentDate - previousDate) < 864e5 && new Date(currentDate).getDay() === new Date(previousDate).getDay();
                break;

              case "Hours":
                sameValue = Math.abs(currentDate - previousDate) < 36e5 && new Date(currentDate).getDay() === new Date(previousDate).getDay();
                break;

              case "Minutes":
                sameValue = Math.abs(currentDate - previousDate) < 6e4 && new Date(currentDate).getMinutes() === new Date(previousDate).getMinutes();
                break;

              case "Seconds":
                sameValue = Math.abs(currentDate - previousDate) < 1e3 && new Date(currentDate).getDay() === new Date(previousDate).getDay();
            }
            return sameValue;
        }, DateTimeCategory.prototype.getModuleName = function() {
            return "DateTimeCategory";
        }, DateTimeCategory.prototype.destroy = function(chart) {}, DateTimeCategory;
    }(Category), StripLine = function() {
        function StripLine() {}
        return StripLine.prototype.measureStripLine = function(axis, stripline, seriesClipRect) {
            var actualStart, actualEnd;
            if ("DateTimeCategory" === axis.valueType) {
                var start = stripline.start, end = stripline.end;
                actualStart = start ? axis.labels.indexOf(start.getTime().toString()) : null, actualEnd = end ? axis.labels.indexOf(end.getTime().toString()) : null;
            } else actualStart = stripline.start, actualEnd = stripline.end;
            var rect = this.getFromTovalue(actualStart, actualEnd, stripline.size, stripline.startFromAxis, axis), height = "Vertical" === axis.orientation ? (rect.to - rect.from) * axis.rect.height : seriesClipRect.height, width = "Horizontal" === axis.orientation ? (rect.to - rect.from) * axis.rect.width : seriesClipRect.width, x = "Vertical" === axis.orientation ? seriesClipRect.x : rect.from * axis.rect.width + axis.rect.x, y = "Horizontal" === axis.orientation ? seriesClipRect.y : axis.rect.y + axis.rect.height - rect.to * axis.rect.height;
            return 0 !== height && 0 !== width ? new Rect(x, y, width, height) : new Rect(0, 0, 0, 0);
        }, StripLine.prototype.getFromTovalue = function(start, end, size, startFromAxis, axis) {
            var from = startFromAxis ? axis.visibleRange.min : this.findValue(Math.min(start, isNullOrUndefined(end) ? start : end), axis), to = this.findValue(this.getToValue(Math.max(start, isNullOrUndefined(end) ? start : end), from, size, axis, end), axis);
            return {
                from: valueToCoefficient(axis.isInversed ? to : from, axis),
                to: valueToCoefficient(axis.isInversed ? from : to, axis)
            };
        }, StripLine.prototype.getToValue = function(to, from, size, axis, end) {
            return "DateTime" === axis.valueType ? isNullOrUndefined(end) ? new Date(new Date(from).getTime() + size) : to : isNullOrUndefined(end) ? ("Logarithmic" === axis.valueType ? Math.pow(axis.logBase, from) : from) + size : to;
        }, StripLine.prototype.findValue = function(value, axis) {
            return "Logarithmic" === axis.valueType && (value = logBase(value, axis.logBase)), 
            value < axis.visibleRange.min ? value = axis.visibleRange.min : value > axis.visibleRange.max && (value = axis.visibleRange.max), 
            value;
        }, StripLine.prototype.renderStripLine = function(chart, position, axes) {
            for (var rect, id = chart.element.id + "_stripline_" + position + "_", striplineGroup = chart.renderer.createGroup({
                id: id + "collections"
            }), seriesClipRect = chart.chartAxisLayoutPanel.seriesClipRect, count = 0, _i = 0, axes_1 = axes; _i < axes_1.length; _i++) for (var axis = axes_1[_i], _a = 0, _b = axis.stripLines; _a < _b.length; _a++) {
                var stripline = _b[_a];
                stripline.visible && stripline.zIndex === position && (rect = this.measureStripLine(axis, stripline, seriesClipRect), 
                this.renderRectangle(stripline, rect, id + "rect_" + count, striplineGroup, chart), 
                this.renderText(stripline, rect, id + "text_" + count, striplineGroup, chart, axis), 
                count++);
            }
            chart.svgObject.appendChild(striplineGroup);
        }, StripLine.prototype.renderRectangle = function(stripline, rect, id, parent, chart) {
            parent.appendChild(chart.renderer.drawRectangle(new RectOption(id, stripline.color, stripline.border, stripline.opacity, rect, 0, 0, "", "")));
        }, StripLine.prototype.renderText = function(stripline, rect, id, parent, chart, axis) {
            var alignment, textMid = measureText(stripline.text, stripline.textStyle).height / 8 * 3, ty = rect.y + rect.height / 2 + textMid, rotation = null === stripline.rotation ? "Vertical" === axis.orientation ? 0 : -90 : stripline.rotation, tx = rect.x + rect.width / 2;
            "Horizontal" === axis.orientation ? (tx = this.getTextStart(tx + textMid * this.factor(stripline.horizontalAlignment), rect.width, stripline.horizontalAlignment), 
            ty = this.getTextStart(ty - textMid, rect.height, stripline.verticalAlignment), 
            alignment = this.invertAlignment(stripline.verticalAlignment)) : (tx = this.getTextStart(tx, rect.width, stripline.horizontalAlignment), 
            ty = this.getTextStart(ty + textMid * this.factor(stripline.verticalAlignment) - 5, rect.height, stripline.verticalAlignment), 
            alignment = stripline.horizontalAlignment), textElement(new TextOption(id, tx, ty, alignment, stripline.text, "rotate(" + rotation + " " + tx + "," + ty + ")", "middle"), stripline.textStyle, stripline.textStyle.color, parent);
        }, StripLine.prototype.invertAlignment = function(anchor) {
            switch (anchor) {
              case "Start":
                anchor = "End";
                break;

              case "End":
                anchor = "Start";
            }
            return anchor;
        }, StripLine.prototype.factor = function(anchor) {
            var factor = 0;
            switch (anchor) {
              case "Start":
                factor = 1;
                break;

              case "End":
                factor = -1;
            }
            return factor;
        }, StripLine.prototype.getTextStart = function(xy, size, textAlignment) {
            switch (textAlignment) {
              case "Start":
                xy = xy - size / 2 + 5;
                break;

              case "End":
                xy = xy + size / 2 - 5;
            }
            return xy;
        }, StripLine.prototype.getModuleName = function() {
            return "StripLine";
        }, StripLine.prototype.destroy = function() {}, StripLine;
    }(), LineBase = function() {
        function LineBase(chartModule) {
            this.chart = chartModule, this.padding = 5;
        }
        return LineBase.prototype.improveChartPerformance = function(series) {
            for (var tempPoints = [], xVisibleRange = series.xAxis.visibleRange, yVisibleRange = series.yAxis.visibleRange, seriesPoints = series.points, areaBounds = series.clipRect, xTolerance = Math.abs(xVisibleRange.delta / areaBounds.width), yTolerance = Math.abs(yVisibleRange.delta / areaBounds.height), prevXValue = seriesPoints[0] && seriesPoints[0].x > xTolerance ? 0 : xTolerance, prevYValue = seriesPoints[0] && seriesPoints[0].y > yTolerance ? 0 : yTolerance, xVal = 0, yVal = 0, _i = 0, seriesPoints_1 = seriesPoints; _i < seriesPoints_1.length; _i++) {
                var currentPoint_1 = seriesPoints_1[_i];
                currentPoint_1.symbolLocations = [], xVal = currentPoint_1.xValue ? currentPoint_1.xValue : xVisibleRange.min, 
                yVal = currentPoint_1.yValue ? currentPoint_1.yValue : yVisibleRange.min, (Math.abs(prevXValue - xVal) >= xTolerance || Math.abs(prevYValue - yVal) >= yTolerance) && (tempPoints.push(currentPoint_1), 
                prevXValue = xVal, prevYValue = yVal);
            }
            return tempPoints;
        }, LineBase.prototype.getLineDirection = function(firstPoint, secondPoint, series, isInverted, getPointLocation, startPoint) {
            var direction = "";
            if (null != firstPoint) {
                var point1 = getPointLocation(firstPoint.xValue, firstPoint.yValue, series.xAxis, series.yAxis, isInverted, series), point2 = getPointLocation(secondPoint.xValue, secondPoint.yValue, series.xAxis, series.yAxis, isInverted, series);
                direction = startPoint + " " + point1.x + " " + point1.y + " L " + point2.x + " " + point2.y + " ";
            }
            return direction;
        }, LineBase.prototype.appendLinePath = function(options, series, clipRect) {
            var htmlObject = series.chart.renderer.drawPath(options);
            htmlObject.setAttribute("clip-path", clipRect), series.pathElement = htmlObject, 
            series.seriesElement.appendChild(htmlObject), series.isRectSeries = !1;
        }, LineBase.prototype.renderMarker = function(series) {
            series.marker.visible && series.chart.markerRender.render(series);
        }, LineBase.prototype.doProgressiveAnimation = function(series, option) {
            var currentTime, animation = new Animation({}), path = series.pathElement, strokeDashArray = path.getAttribute("stroke-dasharray"), pathLength = series.pathElement.getTotalLength();
            path.style.visibility = "hidden", animation.animate(path, {
                duration: option.duration,
                delay: option.delay,
                progress: function(args) {
                    args.timeStamp >= args.delay && (path.style.visibility = "visible", currentTime = Math.abs(Math.round((args.timeStamp - args.delay) * pathLength / args.duration)), 
                    path.setAttribute("stroke-dasharray", currentTime + "," + pathLength));
                },
                end: function(model) {
                    path.setAttribute("stroke-dasharray", strokeDashArray), series.chart.trigger("animationComplete", {
                        series: series
                    });
                }
            });
        }, LineBase.prototype.storePointLocation = function(point, series, isInverted, getLocation) {
            point.symbolLocations.push(getLocation(point.xValue, point.yValue, series.xAxis, series.yAxis, isInverted, series)), 
            point.regions.push(new Rect(point.symbolLocations[0].x - series.marker.width, point.symbolLocations[0].y - series.marker.height, 2 * series.marker.width, 2 * series.marker.height));
        }, LineBase.prototype.doLinearAnimation = function(series, animation) {
            var value, clipRect = series.clipRectElement.childNodes[0].childNodes[0], effect = getAnimationFunction("Linear"), elementHeight = +clipRect.getAttribute("height"), elementWidth = +clipRect.getAttribute("width"), xCenter = +clipRect.getAttribute("x"), yCenter = series.chart.requireInvertedAxis ? +clipRect.getAttribute("height") + +clipRect.getAttribute("y") : +clipRect.getAttribute("y");
            clipRect.style.visibility = "hidden", new Animation({}).animate(clipRect, {
                duration: animation.duration,
                delay: animation.delay,
                progress: function(args) {
                    args.timeStamp >= args.delay && (clipRect.style.visibility = "visible", series.chart.requireInvertedAxis ? (value = effect(args.timeStamp - args.delay, 0, elementHeight, args.duration), 
                    clipRect.setAttribute("transform", "translate(" + xCenter + " " + yCenter + ") scale(1," + value / elementHeight + ") translate(" + -xCenter + " " + -yCenter + ")")) : (value = effect(args.timeStamp - args.delay, 0, elementWidth, args.duration), 
                    clipRect.setAttribute("transform", "translate(" + xCenter + " " + yCenter + ") scale(" + value / elementWidth + ", 1) translate(" + -xCenter + " " + -yCenter + ")")));
                },
                end: function(model) {
                    clipRect.setAttribute("transform", "translate(0,0)"), series.chart.trigger("animationComplete", {
                        series: series
                    });
                }
            });
        }, LineBase;
    }(), __extends$67 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), LineSeries = function(_super) {
        function LineSeries() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$67(LineSeries, _super), LineSeries.prototype.render = function(series, xAxis, yAxis, isInverted) {
            for (var point1, point2, options, direction = "", prevPoint = null, startPoint = "M", getCoordinate = "PolarRadar" === series.chart.chartAreaType ? TransformToVisible : getPoint, visiblePoints = this.improveChartPerformance(series), _i = 0, visiblePoints_1 = visiblePoints; _i < visiblePoints_1.length; _i++) {
                var point = visiblePoints_1[_i];
                point.regions = [], point.visible && withInRange(visiblePoints[point.index - 1], point, visiblePoints[point.index + 1], series) ? (direction += this.getLineDirection(prevPoint, point, series, isInverted, getCoordinate, startPoint), 
                startPoint = prevPoint ? "L" : startPoint, prevPoint = point, this.storePointLocation(point, series, isInverted, getCoordinate)) : (prevPoint = "Drop" === series.emptyPointSettings.mode ? prevPoint : null, 
                startPoint = "Drop" === series.emptyPointSettings.mode ? startPoint : "M", point.symbolLocations = []);
            }
            "PolarRadar" === series.chart.chartAreaType && series.isClosed && (point2 = getCoordinate(visiblePoints[visiblePoints.length - 1].xValue, visiblePoints[visiblePoints.length - 1].yValue, xAxis, yAxis, isInverted, series), 
            point1 = getCoordinate(visiblePoints[0].xValue, visiblePoints[0].yValue, xAxis, yAxis, isInverted, series), 
            direction = direction.concat(startPoint + " " + point2.x + " " + point2.y + " L " + point1.x + " " + point1.y));
            var name = "Indicator" === series.category ? series.chart.element.id + "_Indicator_" + series.index + "_" + series.name : "TrendLine" === series.category ? series.chart.element.id + "_Series_" + series.sourceIndex + "_TrendLine_" + series.index : series.chart.element.id + "_Series_" + series.index;
            options = new PathOption(name, "none", series.width, series.interior, series.opacity, series.dashArray, direction), 
            this.appendLinePath(options, series, ""), this.renderMarker(series);
        }, LineSeries.prototype.doAnimation = function(series) {
            var option = series.animation;
            this.doProgressiveAnimation(series, option);
        }, LineSeries.prototype.getModuleName = function() {
            return "LineSeries";
        }, LineSeries.prototype.destroy = function(chart) {}, LineSeries;
    }(LineBase), ColumnBase = function() {
        function ColumnBase() {}
        return ColumnBase.prototype.getSideBySideInfo = function(series) {
            series.chart.enableSideBySidePlacement && !series.position && this.getSideBySidePositions(series);
            var position = series.chart.enableSideBySidePlacement ? series.position : 0, rectCount = series.chart.enableSideBySidePlacement ? series.rectCount : 1;
            series.isRectSeries = !0;
            var radius, visibleSeries = series.chart.visibleSeries, seriesSpacing = series.chart.enableSideBySidePlacement ? series.columnSpacing : 0, pointSpacing = series.columnWidth, width = getMinPointsDelta(series.xAxis, visibleSeries) * pointSpacing, location = position / rectCount - .5, doubleRange = new DoubleRange(location, location + 1 / rectCount);
            return isNaN(doubleRange.start) || isNaN(doubleRange.end) || (radius = seriesSpacing * (doubleRange = new DoubleRange(doubleRange.start * width, doubleRange.end * width)).delta, 
            doubleRange = new DoubleRange(doubleRange.start + radius / 2, doubleRange.end - radius / 2)), 
            doubleRange;
        }, ColumnBase.prototype.getRectangle = function(x1, y1, x2, y2, series) {
            var point1 = getPoint(x1, y1, series.xAxis, series.yAxis, series.chart.requireInvertedAxis), point2 = getPoint(x2, y2, series.xAxis, series.yAxis, series.chart.requireInvertedAxis);
            return new Rect(Math.min(point1.x, point2.x), Math.min(point1.y, point2.y), Math.abs(point2.x - point1.x), Math.abs(point2.y - point1.y));
        }, ColumnBase.prototype.getSideBySidePositions = function(series) {
            for (var chart = series.chart, _i = 0, _a = chart.columns; _i < _a.length; _i++) for (var columnItem = _a[_i], _b = 0, _c = chart.rows; _b < _c.length; _b++) {
                var item = _c[_b];
                this.findRectPosition(series.findSeriesCollection(columnItem, item, !1));
            }
        }, ColumnBase.prototype.findRectPosition = function(seriesCollection) {
            var stackingGroup = [], vSeries = {
                rectCount: 0,
                position: null
            };
            seriesCollection.forEach(function(value) {
                -1 !== value.type.indexOf("Stacking") ? value.stackingGroup ? void 0 === stackingGroup[value.stackingGroup] ? (value.position = vSeries.rectCount, 
                stackingGroup[value.stackingGroup] = vSeries.rectCount++) : value.position = stackingGroup[value.stackingGroup] : null === vSeries.position ? (value.position = vSeries.rectCount, 
                vSeries.position = vSeries.rectCount++) : value.position = vSeries.position : value.position = vSeries.rectCount++;
            }), seriesCollection.forEach(function(value) {
                value.rectCount = vSeries.rectCount;
            });
        }, ColumnBase.prototype.updateSymbolLocation = function(point, rect, series) {
            series.chart.requireInvertedAxis ? this.updateYRegion(point, rect, series) : this.updateXRegion(point, rect, series);
        }, ColumnBase.prototype.updateXRegion = function(point, rect, series) {
            point.regions.push(rect), point.symbolLocations.push({
                x: rect.x + rect.width / 2,
                y: "BoxPlot" === series.seriesType || -1 !== series.seriesType.indexOf("HighLow") || point.yValue >= 0 == !series.yAxis.isInversed ? rect.y : rect.y + rect.height
            });
        }, ColumnBase.prototype.updateYRegion = function(point, rect, series) {
            point.regions.push(rect), point.symbolLocations.push({
                x: "BoxPlot" === series.seriesType || -1 !== series.seriesType.indexOf("HighLow") || point.yValue >= 0 == !series.yAxis.isInversed ? rect.x + rect.width : rect.x,
                y: rect.y + rect.height / 2
            });
        }, ColumnBase.prototype.triggerEvent = function(series, point, fill, border) {
            var argsData = {
                cancel: !1,
                name: "pointRender",
                series: series,
                point: point,
                fill: series.setPointColor(point, fill),
                border: series.setBorderColor(point, border)
            };
            return series.chart.trigger("pointRender", argsData), point.color = argsData.fill, 
            argsData;
        }, ColumnBase.prototype.drawRectangle = function(series, point, rect, argsData) {
            if ((series.chart.requireInvertedAxis ? rect.height : rect.width) <= 0) return null;
            var direction = this.calculateRoundedRectPath(rect, series.cornerRadius.topLeft, series.cornerRadius.topRight, series.cornerRadius.bottomLeft, series.cornerRadius.bottomRight), name = "Indicator" === series.category ? series.chart.element.id + "_Indicator_" + series.index + "_" + series.name + "_Point_" + point.index : series.chart.element.id + "_Series_" + series.index + "_Point_" + point.index, options = new PathOption(name, argsData.fill, argsData.border.width, argsData.border.color, series.opacity, series.dashArray, direction), element = series.chart.renderer.drawPath(options);
            switch (series.seriesType) {
              case "XY":
                element.setAttribute("aria-label", point.x.toString() + ":" + point.yValue.toString());
                break;

              case "HighLow":
                element.setAttribute("aria-label", point.x.toString() + ":" + point.high.toString() + ":" + point.low.toString());
            }
            series.seriesElement.appendChild(element);
        }, ColumnBase.prototype.animate = function(series) {
            for (var rectElements = series.seriesElement.childNodes, count = "Indicator" === series.category ? 0 : 1, _i = 0, _a = series.points; _i < _a.length; _i++) {
                var point = _a[_i];
                (point.symbolLocations.length || "BoxAndWhisker" === series.type && point.regions.length) && (this.animateRect(rectElements[count], series, point), 
                count++);
            }
        }, ColumnBase.prototype.animateRect = function(element, series, point) {
            var x, y, centerX, centerY, option = series.animation, effect = getAnimationFunction("Linear"), isPlot = point.yValue < 0, elementHeight = +point.regions[0].height, elementWidth = +point.regions[0].width;
            series.chart.requireInvertedAxis ? (y = +point.regions[0].y, series.type.indexOf("Stacking") > -1 ? (x = valueToCoefficient(0, series.yAxis) * series.yAxis.rect.width, 
            centerX = x, centerY = y) : (x = +point.regions[0].x, centerY = isPlot ? y : y + elementHeight, 
            centerX = -1 !== series.seriesType.indexOf("HighLow") || -1 !== series.type.indexOf("Waterfall") ? x + elementWidth / 2 : isPlot !== series.yAxis.isInversed ? x + elementWidth : x)) : (x = +point.regions[0].x, 
            series.type.indexOf("Stacking") > -1 ? (y = (1 - valueToCoefficient(0, series.yAxis)) * series.yAxis.rect.height, 
            centerX = x, centerY = y) : (y = +point.regions[0].y, centerY = -1 !== series.seriesType.indexOf("HighLow") || -1 !== series.type.indexOf("Waterfall") ? y + elementHeight / 2 : isPlot !== series.yAxis.isInversed ? y : y + elementHeight, 
            centerX = isPlot ? x : x + elementWidth));
            var value;
            element.style.visibility = "hidden", new Animation({}).animate(element, {
                duration: option.duration,
                delay: option.delay,
                progress: function(args) {
                    args.timeStamp >= args.delay && (element.style.visibility = "visible", series.chart.requireInvertedAxis ? (elementWidth = elementWidth || 1, 
                    value = effect(args.timeStamp - args.delay, 0, elementWidth, args.duration), element.setAttribute("transform", "translate(" + centerX + " " + centerY + ") scale(" + value / elementWidth + ", 1) translate(" + -centerX + " " + -centerY + ")")) : (elementHeight = elementHeight || 1, 
                    value = effect(args.timeStamp - args.delay, 0, elementHeight, args.duration), element.setAttribute("transform", "translate(" + centerX + " " + centerY + ") scale(1," + value / elementHeight + ") translate(" + -centerX + " " + -centerY + ")")));
                },
                end: function(model) {
                    element.setAttribute("transform", "translate(0,0)");
                    var seriesElement = series.seriesElement;
                    if ((element === seriesElement.lastElementChild || point.index === series.points.length - 1 || "Waterfall" === series.type && element === seriesElement.children[seriesElement.childElementCount - 2]) && (series.chart.trigger("animationComplete", {
                        series: series
                    }), "Waterfall" === series.type)) for (var rectElements = seriesElement.childNodes, i = 0; i < rectElements.length; i++) -1 !== rectElements[i].id.indexOf("Connector") && (rectElements[i].style.visibility = "visible", 
                    rectElements[i].setAttribute("transform", "translate(0,0)"));
                }
            });
        }, ColumnBase.prototype.calculateRoundedRectPath = function(rect, topLeft, topRight, bottomLeft, bottomRight) {
            return "M " + rect.x + " " + (topLeft + rect.y) + " Q " + rect.x + " " + rect.y + " " + (rect.x + topLeft) + " " + rect.y + " L " + (rect.x + rect.width - topRight) + " " + rect.y + " Q " + (rect.x + rect.width) + " " + rect.y + " " + (rect.x + rect.width) + " " + (rect.y + topRight) + " L " + (rect.x + rect.width) + " " + (rect.y + rect.height - bottomRight) + " Q " + (rect.x + rect.width) + " " + (rect.y + rect.height) + " " + (rect.x + rect.width - bottomRight) + " " + (rect.y + rect.height) + " L " + (rect.x + bottomLeft) + " " + (rect.y + rect.height) + " Q " + rect.x + " " + (rect.y + rect.height) + " " + rect.x + " " + (rect.y + rect.height - bottomLeft) + " L " + rect.x + " " + (topLeft + rect.y) + " Z";
        }, ColumnBase;
    }(), __extends$68 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), ColumnSeries = function(_super) {
        function ColumnSeries() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$68(ColumnSeries, _super), ColumnSeries.prototype.render = function(series) {
            for (var rect, argsData, sideBySideInfo = this.getSideBySideInfo(series), origin = Math.max(series.yAxis.visibleRange.min, 0), _i = 0, _a = series.points; _i < _a.length; _i++) {
                var pointColumn = _a[_i];
                if (pointColumn.symbolLocations = [], pointColumn.regions = [], pointColumn.visible && withInRange(series.points[pointColumn.index - 1], pointColumn, series.points[pointColumn.index + 1], series)) {
                    rect = this.getRectangle(pointColumn.xValue + sideBySideInfo.start, pointColumn.yValue, pointColumn.xValue + sideBySideInfo.end, origin, series);
                    var color = "Indicator" === series.category ? pointColumn.color : series.interior;
                    (argsData = this.triggerEvent(series, pointColumn, color, {
                        width: series.border.width,
                        color: series.border.color
                    })).cancel || (this.updateSymbolLocation(pointColumn, rect, series), this.drawRectangle(series, pointColumn, rect, argsData));
                }
            }
        }, ColumnSeries.prototype.doAnimation = function(series) {
            this.animate(series);
        }, ColumnSeries.prototype.getModuleName = function() {
            return "ColumnSeries";
        }, ColumnSeries.prototype.destroy = function(chart) {}, ColumnSeries;
    }(ColumnBase), __extends$70 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), MultiColoredSeries = function(_super) {
        function MultiColoredSeries() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$70(MultiColoredSeries, _super), MultiColoredSeries.prototype.getAreaPathDirection = function(xValue, yValue, series, isInverted, getPointLocation, startPoint, startPath) {
            var firstPoint, direction = "";
            return null === startPoint && (direction += startPath + " " + (firstPoint = getPointLocation(xValue, yValue, series.xAxis, series.yAxis, isInverted, series)).x + " " + firstPoint.y + " "), 
            direction;
        }, MultiColoredSeries.prototype.getAreaEmptyDirection = function(firstPoint, secondPoint, series, isInverted, getPointLocation) {
            var direction = "";
            return direction += this.getAreaPathDirection(firstPoint.x, firstPoint.y, series, isInverted, getPointLocation, null, "L"), 
            direction += this.getAreaPathDirection(secondPoint.x, secondPoint.y, series, isInverted, getPointLocation, null, "L");
        }, MultiColoredSeries.prototype.setPointColor = function(currentPoint, previous, series, isXSegment, segments) {
            if ("" === series.pointColorMapping) {
                for (var segment = void 0, i = 0; i < segments.length; i++) if (segment = segments[i], 
                (isXSegment ? currentPoint.xValue : currentPoint.yValue) <= this.getAxisValue(segment.value, isXSegment ? series.xAxis : series.yAxis, series.chart) || !segment.value) {
                    currentPoint.interior = segment.color;
                    break;
                }
                return null == currentPoint.interior && (currentPoint.interior = series.interior), 
                !1;
            }
            return !!previous && series.setPointColor(currentPoint, series.interior) !== series.setPointColor(previous, series.interior);
        }, MultiColoredSeries.prototype.sortSegments = function(series, chartSegments) {
            var axis = "X" === series.segmentAxis ? series.xAxis : series.yAxis, access = this;
            return [].concat(chartSegments).sort(function(a, b) {
                return access.getAxisValue(a.value, axis, series.chart) - access.getAxisValue(b.value, axis, series.chart);
            });
        }, MultiColoredSeries.prototype.applySegmentAxis = function(series, options, segments) {
            var _this = this;
            if ("" !== series.pointColorMapping) return options.map(function(option) {
                _this.appendLinePath(option, series, "");
            }), null;
            var segment, isXSegment = "X" === series.segmentAxis, axis = isXSegment ? series.xAxis : series.yAxis, chart = series.chart;
            this.includeSegment(segments, axis, series, segments.length);
            for (var value, clipPath, length = segments.length, _loop_1 = function(index) {
                segment = segments[index], value = this_1.getAxisValue(segment.value, axis, series.chart), 
                (clipPath = this_1.createClipRect(index ? this_1.getAxisValue(segments[index - 1].value, axis, series.chart) : axis.visibleRange.min, value, series, index, isXSegment)) && options.map(function(option) {
                    series.seriesElement.appendChild(chart.renderer.drawPath({
                        "clip-path": clipPath,
                        "stroke-dasharray": segment.dashArray,
                        opacity: option.opacity,
                        stroke: series.type.indexOf("Line") > -1 ? segment.color || series.interior : series.border.color,
                        "stroke-width": option["stroke-width"],
                        fill: series.type.indexOf("Line") > -1 ? "none" : segment.color || series.interior,
                        id: option.id + "_Segment_" + index,
                        d: option.d
                    }));
                });
            }, this_1 = this, index = 0; index < length; index++) _loop_1(index);
        }, MultiColoredSeries.prototype.includeSegment = function(segments, axis, series, length) {
            if (length <= 0) return segments.push({
                value: axis.visibleRange.max,
                color: series.interior
            }), null;
            this.getAxisValue(segments[length - 1].value, axis, series.chart) < axis.visibleRange.max && segments.push({
                value: axis.visibleRange.max,
                color: series.interior
            });
        }, MultiColoredSeries.prototype.createClipRect = function(startValue, endValue, series, index, isX) {
            var isRequired = series.chart.requireInvertedAxis, startPointLocation = getPoint(isX ? startValue : series.xAxis.visibleRange.min, isX ? series.yAxis.visibleRange.max : endValue, series.xAxis, series.yAxis, isRequired), endPointLocation = getPoint(isX ? endValue : series.xAxis.visibleRange.max, isX ? series.yAxis.visibleRange.min : startValue, series.xAxis, series.yAxis, isRequired);
            return (endPointLocation = isRequired ? [ startPointLocation, startPointLocation = endPointLocation ][0] : endPointLocation).x - startPointLocation.x > 0 && endPointLocation.y - startPointLocation.y > 0 ? (series.seriesElement.appendChild(series.chart.renderer.drawClipPath(new RectOption(series.chart.element.id + "_ChartSegmentClipRect_" + index, "transparent", {
                width: 1,
                color: "Gray"
            }, 1, {
                x: startPointLocation.x,
                y: startPointLocation.y,
                width: endPointLocation.x - startPointLocation.x,
                height: endPointLocation.y - startPointLocation.y
            }))), "url(#" + series.chart.element.id + "_ChartSegmentClipRect_" + index + ")") : null;
        }, MultiColoredSeries.prototype.getAxisValue = function(segmentValue, axis, chart) {
            if (null === segmentValue && (segmentValue = axis.visibleRange.max), "DateTime" === axis.valueType) {
                var option = {
                    skeleton: "full",
                    type: "dateTime"
                };
                return Date.parse(chart.intl.getDateParser(option)(chart.intl.getDateFormat(option)(new Date(DataUtil.parse.parseJson({
                    val: segmentValue
                }).val))));
            }
            if (axis.valueType.indexOf("Category") > -1) {
                var xValue = "DateTimeCategory" === axis.valueType ? segmentValue.getTime().toString() : segmentValue;
                return axis.labels.indexOf(xValue) < 0 ? +segmentValue : axis.labels.indexOf(xValue);
            }
            return +segmentValue;
        }, MultiColoredSeries;
    }(LineBase), __extends$69 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), AreaSeries = function(_super) {
        function AreaSeries() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$69(AreaSeries, _super), AreaSeries.prototype.render = function(series, xAxis, yAxis, isInverted) {
            var currentXValue, _this = this, startPoint = null, direction = "", origin = "PolarRadar" === series.chart.chartAreaType ? series.points[0].yValue : Math.max(series.yAxis.visibleRange.min, 0), getCoordinate = "PolarRadar" === series.chart.chartAreaType ? TransformToVisible : getPoint;
            series.points.map(function(point, i, seriesPoints) {
                currentXValue = point.xValue, point.symbolLocations = [], point.regions = [], point.visible && withInRange(seriesPoints[i - 1], point, seriesPoints[i + 1], series) && (direction += _this.getAreaPathDirection(currentXValue, origin, series, isInverted, getCoordinate, startPoint, "M"), 
                startPoint = startPoint || new ChartLocation(currentXValue, origin), direction += _this.getAreaPathDirection(currentXValue, point.yValue, series, isInverted, getCoordinate, null, "L"), 
                seriesPoints[i + 1] && !seriesPoints[i + 1].visible && "Drop" !== series.emptyPointSettings.mode && (direction += _this.getAreaEmptyDirection({
                    x: currentXValue,
                    y: origin
                }, startPoint, series, isInverted, getCoordinate), startPoint = null), _this.storePointLocation(point, series, isInverted, getPoint));
            }), this.appendLinePath(new PathOption(series.chart.element.id + "_Series_" + series.index, series.interior, series.border.width, series.border.color, series.opacity, series.dashArray, series.points.length > 1 ? direction + this.getAreaPathDirection(series.points[series.points.length - 1].xValue, "PolarRadar" === series.chart.chartAreaType ? series.points[series.points.length - 1].yValue : origin, series, isInverted, getCoordinate, null, "L") : ""), series, ""), 
            this.renderMarker(series);
        }, AreaSeries.prototype.destroy = function(chart) {}, AreaSeries.prototype.getModuleName = function() {
            return "AreaSeries";
        }, AreaSeries.prototype.doAnimation = function(series) {
            var option = series.animation;
            this.doLinearAnimation(series, option);
        }, AreaSeries;
    }(MultiColoredSeries), __extends$71 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), BarSeries = function(_super) {
        function BarSeries() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$71(BarSeries, _super), BarSeries.prototype.render = function(series) {
            for (var rect, argsData, origin = Math.max(series.yAxis.visibleRange.min, 0), sideBySideInfo = this.getSideBySideInfo(series), _i = 0, _a = series.points; _i < _a.length; _i++) {
                var pointBar = _a[_i];
                pointBar.symbolLocations = [], pointBar.regions = [], pointBar.visible && withInRange(series.points[pointBar.index - 1], pointBar, series.points[pointBar.index + 1], series) && (rect = this.getRectangle(pointBar.xValue + sideBySideInfo.start, pointBar.yValue, pointBar.xValue + sideBySideInfo.end, origin, series), 
                (argsData = this.triggerEvent(series, pointBar, series.interior, {
                    width: series.border.width,
                    color: series.border.color
                })).cancel || (this.updateSymbolLocation(pointBar, rect, series), this.drawRectangle(series, pointBar, rect, argsData)));
            }
        }, BarSeries.prototype.doAnimation = function(series) {
            this.animate(series);
        }, BarSeries.prototype.destroy = function(chart) {}, BarSeries.prototype.getModuleName = function() {
            return "BarSeries";
        }, BarSeries;
    }(ColumnBase), __extends$73 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), PolarRadarPanel = function(_super) {
        function PolarRadarPanel() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$73(PolarRadarPanel, _super), PolarRadarPanel.prototype.measureAxis = function(rect) {
            var chart = this.chart;
            this.initialClipRect = rect, this.seriesClipRect = new Rect(rect.x, rect.y, rect.width, rect.height), 
            this.measureRowAxis(chart, this.initialClipRect), this.measureColumnAxis(chart, this.initialClipRect), 
            this.calculateAxisSize();
        }, PolarRadarPanel.prototype.measureRowAxis = function(chart, rect) {
            this.calculateRowSize(rect);
            var row = chart.rows[0];
            this.measureDefinition(row, chart, new Size(chart.availableSize.width, row.computedHeight), rect);
        }, PolarRadarPanel.prototype.measureColumnAxis = function(chart, rect) {
            this.calculateColumnSize(rect);
            var column = chart.columns[0];
            this.measureDefinition(column, chart, new Size(column.computedWidth, chart.availableSize.height), rect);
        }, PolarRadarPanel.prototype.measureDefinition = function(definition, chart, size, clipRect) {
            for (var _i = 0, _a = definition.axes; _i < _a.length; _i++) {
                var axis = _a[_i];
                axis.getModule(chart), axis.baseModule.calculateRangeAndInterval(size, axis);
            }
        }, PolarRadarPanel.prototype.calculateAxisSize = function() {
            var chart = this.chart;
            this.centerX = .5 * this.initialClipRect.width + this.initialClipRect.x, this.centerY = .5 * this.initialClipRect.height + this.initialClipRect.y, 
            chart.radius = Math.min(this.initialClipRect.width, this.initialClipRect.height) / 2 - 5 - chart.primaryXAxis.majorTickLines.height - chart.primaryXAxis.maxLabelSize.height, 
            chart.radius = chart.primaryXAxis.coefficient * chart.radius / 100, this.seriesClipRect.y = this.centerY - chart.radius, 
            this.seriesClipRect.x = this.centerX - chart.radius, this.seriesClipRect.height = 2 * chart.radius, 
            this.seriesClipRect.width = 2 * chart.radius, this.calculateRowSize(this.seriesClipRect), 
            chart.primaryYAxis.rect = this.seriesClipRect, this.calculateColumnSize(this.seriesClipRect), 
            chart.primaryXAxis.rect = this.seriesClipRect;
        }, PolarRadarPanel.prototype.measure = function() {
            var chart = this.chart;
            chart.verticalAxes.push(chart.primaryYAxis);
            var row = chart.rows[0];
            row.axes[0] = chart.primaryYAxis, chart.rows[0] = row, chart.horizontalAxes.push(chart.primaryXAxis);
            var column = chart.columns[0];
            column.axes[0] = chart.primaryXAxis, chart.columns[0] = column;
        }, PolarRadarPanel.prototype.calculateRowSize = function(rect) {
            var chart = this.chart, row = chart.rows[0];
            row.computedHeight = rect.height / 2, row.computedTop = rect.y, chart.rows[0] = row;
        }, PolarRadarPanel.prototype.calculateColumnSize = function(rect) {
            var chart = this.chart, column = chart.columns[0];
            column.computedLeft = rect.x, column.computedWidth = rect.width, chart.columns[0] = column;
        }, PolarRadarPanel.prototype.renderAxes = function() {
            var axis, chart = this.chart;
            this.startAngle = chart.primaryXAxis.startAngle;
            for (var axisElement = chart.renderer.createGroup({
                id: chart.element.id + "AxisCollection"
            }), axisLineElement = chart.renderer.createGroup({
                id: chart.element.id + "AxisOutsideCollection"
            }), i = 0, len = chart.axisCollections.length; i < len; i++) this.element = chart.renderer.createGroup({
                id: chart.element.id + "AxisGroup" + i
            }), "Horizontal" === (axis = chart.axisCollections[i]).orientation ? ((axis.majorGridLines.width > 0 || axis.majorTickLines.width > 0) && this.drawXAxisGridLine(axis, i), 
            axis.visible && this.drawXAxisLabels(axis, i)) : (this.drawYAxisGridLine(axis, i), 
            axis.lineStyle.width > 0 && this.drawYAxisLine(axis, i, axis.plotOffset, 0), axis.visible && this.drawYAxisLabels(axis, i)), 
            axisElement.appendChild(this.element);
            return axisElement.appendChild(this.element), chart.svgObject.appendChild(axisElement), 
            axisLineElement;
        }, PolarRadarPanel.prototype.drawYAxisLine = function(axis, index, plotX, plotY) {
            var chart = this.chart, optionsLine = {}, vector = CoefficientToVector(valueToPolarCoefficient(axis.visibleLabels[0].value, axis), this.startAngle), axisLine = "M " + this.centerX + " " + this.centerY + "L " + (this.centerX + chart.radius * vector.x) + " " + (this.centerY + chart.radius * vector.y);
            optionsLine = {
                id: chart.element.id + "AxisLine_" + index,
                d: axisLine,
                "stroke-dasharray": axis.lineStyle.dashArray,
                "stroke-width": axis.lineStyle.width,
                stroke: axis.lineStyle.color || chart.themeStyle.axisLine
            }, chart.yAxisElements.appendChild(chart.renderer.drawPath(optionsLine));
        }, PolarRadarPanel.prototype.drawYAxisLabels = function(axis, index) {
            var elementSize, vector, radius, chart = this.chart, pointX = 0, pointY = 0, angle = this.startAngle < 0 ? this.startAngle + 360 : this.startAngle, labelElement = chart.renderer.createGroup({
                id: chart.element.id + "AxisLabels" + index
            });
            vector = CoefficientToVector(valueToPolarCoefficient(axis.visibleLabels[0].value, axis), this.startAngle);
            for (var i = 0, len = axis.visibleLabels.length; i < len; i++) radius = chart.radius * valueToCoefficient(axis.visibleLabels[i].value, axis), 
            elementSize = axis.visibleLabels[i].size, radius = chart.radius * valueToCoefficient(axis.visibleLabels[i].value, axis), 
            pointX = this.centerX + radius * vector.x + (axis.majorTickLines.height + elementSize.width / 2 + 2.5) * Math.cos(angle * Math.PI / 180) * ("Inside" === axis.labelPosition ? 1 : -1), 
            pointY = this.centerY + radius * vector.y + (axis.majorTickLines.height + elementSize.height / 2) * Math.sin(angle * Math.PI / 180) * ("Inside" === axis.labelPosition ? 1 : -1), 
            textElement(new TextOption(chart.element.id + index + "_AxisLabel_" + i, pointX, pointY + elementSize.height / 4, "middle", axis.visibleLabels[i].text), axis.labelStyle, axis.labelStyle.color || chart.themeStyle.axisLabel, labelElement);
            chart.yAxisElements.appendChild(labelElement);
        }, PolarRadarPanel.prototype.drawYAxisGridLine = function(axis, index) {
            var options, radius, vector, vector2, x1, y1, x2, y2, chart = this.chart, majorTick = "", majorGrid = "", angle = this.startAngle < 0 ? this.startAngle + 360 : this.startAngle, border = (axis.rect, 
            {
                color: axis.majorGridLines.color || chart.themeStyle.majorGridLine,
                width: axis.majorGridLines.width
            });
            if (axis.majorGridLines.width > 0) if ("Polar" === chart.visibleSeries[0].type) for (var j = 0; j < axis.visibleLabels.length; j++) radius = chart.radius * valueToCoefficient(axis.visibleLabels[j].value, axis), 
            options = new CircleOption(chart.element.id + "_MajorGridLine_" + index, "transparent", border, axis.majorGridLines.width, this.centerX, this.centerY, radius), 
            this.element.appendChild(chart.renderer.drawCircle(options)); else {
                for (j = 0; j < axis.visibleLabels.length; j++) {
                    radius = chart.radius * valueToCoefficient(axis.visibleLabels[j].value, axis);
                    for (var i = 0, len = chart.primaryXAxis.visibleLabels.length; i < len; i++) vector = CoefficientToVector(valueToPolarCoefficient(chart.primaryXAxis.visibleLabels[i].value, chart.primaryXAxis), this.startAngle), 
                    vector2 = CoefficientToVector(valueToPolarCoefficient(i + 1 < len ? chart.primaryXAxis.visibleLabels[i + 1].value : chart.primaryXAxis.visibleLabels[0].value, chart.primaryXAxis), this.startAngle), 
                    x1 = this.centerX + radius * vector.x, y1 = this.centerY + radius * vector.y, x2 = this.centerX + radius * vector2.x, 
                    y2 = this.centerY + radius * vector2.y, majorGrid = majorGrid.concat("M " + x1 + " " + y1 + " L " + x2 + " " + y2 + " ");
                }
                options = new PathOption(chart.element.id + "_MajorGridLine_" + index, "transparent", axis.majorGridLines.width, axis.majorGridLines.color || chart.themeStyle.majorGridLine, null, null, majorGrid), 
                this.element.appendChild(chart.renderer.drawPath(options));
            }
            if (axis.majorTickLines.width > 0) {
                vector = CoefficientToVector(valueToPolarCoefficient(axis.visibleLabels[0].value, axis), this.startAngle);
                for (i = 0; i < axis.visibleLabels.length; i++) radius = chart.radius * valueToCoefficient(axis.visibleLabels[i].value, axis), 
                x1 = this.centerX + radius * vector.x, y1 = this.centerY + radius * vector.y, x2 = x1 + axis.majorTickLines.height * Math.cos(angle * Math.PI / 180) * ("Inside" === axis.tickPosition ? 1 : -1), 
                y2 = y1 + axis.majorTickLines.height * Math.sin(angle * Math.PI / 180) * ("Inside" === axis.tickPosition ? 1 : -1), 
                majorTick = majorTick.concat("M " + x1 + " " + y1 + " L " + x2 + " " + y2 + " ");
            }
            this.renderTickLine(axis, index, majorTick, "");
        }, PolarRadarPanel.prototype.drawXAxisGridLine = function(axis, index) {
            for (var tempInterval, vector, x2, y2, minorDirection, chart = this.chart, majorGrid = "", majorTick = "", minorGirdLine = "", minorTickLine = "", x1 = this.centerX, y1 = this.centerY, length = (axis.majorTickLines.height, 
            axis.rect, axis.visibleLabels.length), i = 0; i < length; i++) {
                tempInterval = axis.visibleLabels[i].value, vector = CoefficientToVector(valueToPolarCoefficient(axis.visibleLabels[i].value, axis), this.startAngle), 
                x2 = this.centerX + chart.radius * vector.x, y2 = this.centerY + chart.radius * vector.y;
                var xLoc = x2 + axis.majorTickLines.height * vector.x * ("Inside" === axis.tickPosition ? -1 : 1), yLoc = y2 + axis.majorTickLines.height * vector.y * ("Inside" === axis.tickPosition ? -1 : 1);
                majorGrid = majorGrid.concat("M " + x1 + " " + y1 + " L" + x2 + " " + y2), majorTick = majorTick.concat("M " + x2 + " " + y2 + " L " + xLoc + " " + yLoc + " "), 
                axis.minorTicksPerInterval > 0 && (axis.minorGridLines.width > 0 || axis.minorTickLines.width > 0) && "Category" !== axis.valueType && "Radar" !== chart.visibleSeries[0].type && (minorGirdLine = (minorDirection = this.drawAxisMinorLine(axis, tempInterval, minorGirdLine, minorTickLine))[0], 
                minorTickLine = minorDirection[1]);
            }
            this.renderTickLine(axis, index, majorTick, minorTickLine), this.renderGridLine(axis, index, majorGrid, minorGirdLine);
        }, PolarRadarPanel.prototype.drawAxisMinorLine = function(axis, tempInterval, minorGird, minorTick) {
            for (var x, y, vector, value = tempInterval, range = axis.visibleRange, direction = [], j = (axis.minorTickLines.height, 
            axis.rect, 0); j < axis.minorTicksPerInterval; j++) if (value += ("DateTime" === axis.valueType ? axis.dateTimeInterval : axis.visibleRange.interval) / (axis.minorTicksPerInterval + 1), 
            inside(value, range)) {
                vector = CoefficientToVector(valueToPolarCoefficient(value, axis), this.startAngle), 
                x = this.centerX + this.chart.radius * vector.x, y = this.centerY + this.chart.radius * vector.y;
                var tickXSize = x + axis.minorTickLines.height * vector.x * ("Inside" === axis.tickPosition ? -1 : 1), tickYSize = y + axis.minorTickLines.height * vector.y * ("Inside" === axis.tickPosition ? -1 : 1);
                minorGird = minorGird.concat("M " + this.centerX + " " + this.centerY + "L " + x + " " + y), 
                minorTick = minorTick.concat("M " + x + " " + y + "L " + tickXSize + " " + tickYSize);
            }
            return direction.push(minorGird), direction.push(minorTick), direction;
        }, PolarRadarPanel.prototype.drawXAxisLabels = function(axis, index) {
            var vector, labelText, firstLabelX, lastLabelX, chart = this.chart, pointX = 0, pointY = 0, labelElement = chart.renderer.createGroup({
                id: chart.element.id + "AxisLabels" + index
            }), islabelInside = "Inside" === axis.labelPosition, textAnchor = "", ticksbwtLabel = "Category" === axis.valueType && "BetweenTicks" === axis.labelPlacement && "Radar" !== chart.visibleSeries[0].type ? .5 : 0, radius = chart.radius + axis.majorTickLines.height;
            radius = islabelInside ? -radius : radius;
            for (var i = 0, len = axis.visibleLabels.length; i < len; i++) vector = CoefficientToVector(valueToPolarCoefficient(axis.visibleLabels[i].value + ticksbwtLabel, axis), this.startAngle), 
            isNaN(vector.x) || isNaN(vector.y) || (pointX = this.centerX + (radius + axis.majorTickLines.height + 5) * vector.x, 
            pointY = this.centerY + (radius + axis.majorTickLines.height + 5) * vector.y, textAnchor = parseFloat(pointX.toFixed(1)) === parseFloat(this.centerX.toFixed(1)) ? "middle" : pointX < this.centerX && !islabelInside || pointX > this.centerX && islabelInside ? "end" : "start"), 
            labelText = axis.visibleLabels[i].text, 0 === i ? firstLabelX = pointX : i === axis.visibleLabels.length - 1 && "Category" !== axis.valueType && (lastLabelX = measureText(labelText, axis.labelStyle).height, 
            labelText = (lastLabelX += pointX) > firstLabelX ? "" : labelText), textElement(new TextOption(chart.element.id + index + "_AxisLabel_" + i, pointX, pointY, textAnchor, labelText, "", "central"), axis.labelStyle, axis.labelStyle.color || chart.themeStyle.axisLabel, labelElement);
            this.element.appendChild(labelElement);
        }, PolarRadarPanel.prototype.renderTickLine = function(axis, index, majorTickLine, minorTickLine) {
            var tickOptions, chart = this.chart;
            axis.majorTickLines.width > 0 && (tickOptions = new PathOption(chart.element.id + "_MajorTickLine_" + index, "transparent", axis.majorTickLines.width, axis.majorTickLines.color || chart.themeStyle.majorTickLine, null, null, majorTickLine), 
            chart.yAxisElements.appendChild(chart.renderer.drawPath(tickOptions))), axis.minorTickLines.width > 0 && (tickOptions = new PathOption(chart.element.id + "_MinorTickLine_" + index, "transparent", axis.minorTickLines.width, axis.minorTickLines.color || chart.themeStyle.minorTickLine, null, null, minorTickLine), 
            chart.yAxisElements.appendChild(chart.renderer.drawPath(tickOptions)));
        }, PolarRadarPanel.prototype.renderGridLine = function(axis, index, majorGrid, minorGird) {
            var gridOptions, chart = this.chart;
            axis.majorGridLines.width > 0 && (gridOptions = new PathOption(chart.element.id + "_MajorGridLine_" + index, "transparent", axis.majorGridLines.width, axis.majorGridLines.color || chart.themeStyle.majorGridLine, null, axis.majorGridLines.dashArray, majorGrid), 
            this.element.appendChild(chart.renderer.drawPath(gridOptions))), axis.minorGridLines.width > 0 && (gridOptions = new PathOption(chart.element.id + "_MinorGridLine_" + index, "transparent", axis.minorGridLines.width, axis.minorGridLines.color || chart.themeStyle.minorGridLine, null, axis.minorGridLines.dashArray, minorGird), 
            this.element.appendChild(chart.renderer.drawPath(gridOptions)));
        }, PolarRadarPanel;
    }(LineBase), __extends$72 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), PolarSeries = function(_super) {
        function PolarSeries() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$72(PolarSeries, _super), PolarSeries.prototype.render = function(series) {
            var seriesType = firstToLowerCase(series.drawType);
            series.drawType.indexOf("Column") > -1 ? this.columnDrawTypeRender(series) : series.chart[seriesType + "SeriesModule"].render(series, series.xAxis, series.yAxis, series.chart.requireInvertedAxis);
        }, PolarSeries.prototype.columnDrawTypeRender = function(series) {
            series.points;
            var options, argsData, startAngle, endAngle, itemCurrentXPos, radius, pointStartAngle, pointEndAngle, x1, x2, y1, y2, startValue, endValue, innerRadius, dStartX, dStartY, dEndX, dEndY, centerX = series.clipRect.width / 2 + series.clipRect.x, centerY = series.clipRect.height / 2 + series.clipRect.y, direction = (series.xAxis.isInversed, 
            ""), sumofYValues = 0, interval = (series.points[1] ? series.points[1].xValue : 2 * series.points[0].xValue) - series.points[0].xValue, ticks = "Category" === series.xAxis.valueType && "BetweenTicks" === series.xAxis.labelPlacement ? 0 : interval / 2, rangeInterval = "DateTime" === series.xAxis.valueType ? series.xAxis.dateTimeInterval : 1, min = series.xAxis.actualRange.min;
            this.getSeriesPosition(series);
            var position = series.xAxis.isInversed ? series.rectCount - 1 - series.position : series.position;
            "Category" === series.xAxis.valueType && "BetweenTicks" === series.xAxis.labelPlacement || series.rectCount;
            do {
                sumofYValues += rangeInterval, min += rangeInterval;
            } while (min <= series.xAxis.actualRange.max - ("Category" === series.xAxis.valueType ? 0 : 1));
            for (var _i = 0, _a = series.points; _i < _a.length; _i++) {
                var point = _a[_i];
                point.symbolLocations = [], point.regions = [], point.visible && withInRange(series.points[point.index - 1], point, series.points[point.index + 1], series) && (itemCurrentXPos = (series.xAxis.isInversed ? series.xAxis.visibleRange.max - point.xValue : point.xValue - series.xAxis.visibleRange.min) + (interval / series.rectCount * position - ticks) + sumofYValues / 360 * series.xAxis.startAngle, 
                itemCurrentXPos /= sumofYValues, pointStartAngle = startAngle = 2 * Math.PI * (itemCurrentXPos + series.xAxis.startAngle), 
                pointEndAngle = endAngle = 2 * Math.PI * (itemCurrentXPos + series.xAxis.startAngle + interval / series.rectCount / sumofYValues), 
                startAngle -= .5 * Math.PI, endAngle = endAngle - .5 * Math.PI - 1e-6, "StackingColumn" === series.drawType || "RangeColumn" === series.drawType ? (startValue = "RangeColumn" === series.drawType ? point.low : series.stackedValues.startValues[point.index], 
                endValue = "RangeColumn" === series.drawType ? point.high : series.stackedValues.endValues[point.index], 
                x1 = centerX + (radius = startValue === (endValue = (endValue = "Logarithmic" === series.yAxis.valueType ? logBase(0 === endValue ? 1 : endValue, series.yAxis.logBase) : endValue) > series.yAxis.actualRange.max ? series.yAxis.actualRange.max : endValue) ? 0 : series.chart.radius * valueToCoefficient(endValue, series.yAxis)) * Math.cos(startAngle), 
                x2 = centerX + radius * Math.cos(endAngle), y1 = centerY + radius * Math.sin(startAngle), 
                y2 = centerY + radius * Math.sin(endAngle), dStartX = centerX + (innerRadius = series.chart.radius * valueToCoefficient(0 === startValue && 0 !== series.yAxis.visibleRange.min ? series.yAxis.visibleRange.min : startValue, series.yAxis)) * Math.cos(startAngle), 
                dStartY = centerY + innerRadius * Math.sin(startAngle), dEndX = centerX + innerRadius * Math.cos(endAngle), 
                dEndY = centerY + innerRadius * Math.sin(endAngle), direction = "Polar" === series.type ? "M " + x1 + " " + y1 + " A " + radius + " " + radius + " 0 0 1 " + x2 + " " + y2 + " L " + dEndX + " " + dEndY + " A " + innerRadius + " " + innerRadius + " 1 0 0 " + dStartX + " " + dStartY + " z" : "M " + x1 + " " + y1 + " L " + x2 + " " + y2 + " L" + dEndX + " " + dEndY + " L " + dStartX + " " + dStartY + " z", 
                point.regionData = new PolarArc(pointStartAngle, pointEndAngle, innerRadius, radius, itemCurrentXPos)) : (endValue = point.yValue > series.yAxis.actualRange.max ? series.yAxis.actualRange.max : point.yValue, 
                x1 = centerX + (radius = series.chart.radius * valueToCoefficient("Logarithmic" === series.yAxis.valueType ? logBase(endValue, series.yAxis.logBase) : endValue, series.yAxis)) * Math.cos(startAngle), 
                x2 = centerX + radius * Math.cos(endAngle), y1 = centerY + radius * Math.sin(startAngle), 
                y2 = centerY + radius * Math.sin(endAngle), direction = "Polar" === series.type ? "M " + x1 + " " + y1 + " A " + radius + " " + radius + " 0 0 1 " + x2 + " " + y2 + " L " + centerX + " " + centerY + " z" : "M " + x1 + " " + y1 + " L " + x2 + " " + y2 + " L " + centerX + " " + centerY + " z", 
                point.regionData = new PolarArc(pointStartAngle, pointEndAngle, 0, radius, itemCurrentXPos)), 
                argsData = this.triggerEvent(series.chart, series, point), options = new PathOption(series.chart.element.id + "_Series_" + series.index + "_Point_" + point.index, argsData.fill, argsData.border.width, argsData.border.color, series.opacity, series.dashArray, direction), 
                argsData.cancel || (this.appendLinePath(options, series, ""), "Polar" === series.type ? point.symbolLocations.push({
                    x: centerX + radius * Math.cos(startAngle + (endAngle - startAngle) / 2),
                    y: centerY + radius * Math.sin(startAngle + (endAngle - startAngle) / 2)
                }) : point.symbolLocations.push({
                    x: (x1 + x2) / 2,
                    y: (y1 + y2) / 2
                })));
            }
            series.isRectSeries = !0;
        }, PolarSeries.prototype.triggerEvent = function(chart, series, point) {
            var argsData = {
                cancel: !1,
                name: "pointRender",
                series: series,
                point: point,
                fill: series.setPointColor(point, series.interior),
                border: series.setBorderColor(point, {
                    width: series.border.width,
                    color: series.border.color
                })
            };
            return chart.trigger("pointRender", argsData), point.color = argsData.fill, argsData;
        }, PolarSeries.prototype.getSeriesPosition = function(series) {
            for (var seriesCollection = [], stackingGroup = [], vSeries = {
                rectCount: 0,
                position: null
            }, _i = 0, _a = series.chart.visibleSeries; _i < _a.length; _i++) {
                var series_1 = _a[_i];
                !series_1.visible || "Polar" !== series_1.type && "Radar" !== series_1.type || -1 === series_1.drawType.indexOf("Column") || seriesCollection.push(series_1);
            }
            seriesCollection.forEach(function(series) {
                -1 !== series.drawType.indexOf("Stacking") ? series.stackingGroup ? void 0 === stackingGroup[series.stackingGroup] ? (series.position = vSeries.rectCount, 
                stackingGroup[series.stackingGroup] = vSeries.rectCount++) : series.position = stackingGroup[series.stackingGroup] : null === vSeries.position ? (series.position = vSeries.rectCount, 
                vSeries.position = vSeries.rectCount++) : series.position = vSeries.position : series.position = vSeries.rectCount++;
            }), seriesCollection.forEach(function(value) {
                value.rectCount = vSeries.rectCount;
            });
        }, PolarSeries.prototype.doAnimation = function(series) {
            series.animation;
            var duration = series.animation.duration, delay = series.animation.delay, rectElements = series.seriesElement.childNodes, count = 1;
            if ("Scatter" === series.drawType) for (var _i = 0, _a = series.points; _i < _a.length; _i++) {
                var point = _a[_i];
                point.symbolLocations.length && rectElements[count] && (markerAnimate(rectElements[count], delay, duration, series, point.index, point.symbolLocations[0], !1), 
                count++);
            } else for (count = 1; count < rectElements.length; count++) this.doPolarRadarAnimation(rectElements[count], delay, duration, series);
        }, PolarSeries.prototype.doPolarRadarAnimation = function(animateElement, delay, duration, series) {
            var chartcenterX = series.clipRect.width / 2 + series.clipRect.x, chartcenterY = series.clipRect.height / 2 + series.clipRect.y, elementHeight = 0;
            animateElement.style.visibility = "hidden", new Animation({}).animate(animateElement, {
                duration: duration,
                delay: delay,
                progress: function(args) {
                    args.timeStamp > args.delay && (args.element.style.visibility = "visible", elementHeight = (args.timeStamp - args.delay) / args.duration, 
                    animateElement.setAttribute("transform", "translate(" + chartcenterX + " " + chartcenterY + ") scale(" + elementHeight + ") translate(" + -chartcenterX + " " + -chartcenterY + ")"));
                },
                end: function(model) {
                    animateElement.style.visibility = "visible", animateElement.removeAttribute("transform"), 
                    series.chart.trigger("animationComplete", {
                        series: series
                    });
                }
            });
        }, PolarSeries.prototype.getModuleName = function() {
            return "PolarSeries";
        }, PolarSeries.prototype.destroy = function(chart) {}, PolarSeries;
    }(PolarRadarPanel), __extends$74 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), RadarSeries = function(_super) {
        function RadarSeries() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$74(RadarSeries, _super), RadarSeries.prototype.render = function(series) {
            var seriesType = firstToLowerCase(series.drawType);
            -1 === series.drawType.indexOf("Column") ? series.chart[seriesType + "SeriesModule"].render(series, series.xAxis, series.yAxis, series.chart.requireInvertedAxis) : this.columnDrawTypeRender(series);
        }, RadarSeries.prototype.getModuleName = function() {
            return "RadarSeries";
        }, RadarSeries.prototype.destroy = function(chart) {}, RadarSeries;
    }(PolarSeries), __extends$75 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), StackingBarSeries = function(_super) {
        function StackingBarSeries() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$75(StackingBarSeries, _super), StackingBarSeries.prototype.render = function(series) {
            Math.max(series.yAxis.visibleRange.min, 0);
            for (var rect, argsData, sideBySideInfo = this.getSideBySideInfo(series), stackedValue = series.stackedValues, _i = 0, _a = series.points; _i < _a.length; _i++) {
                var pointStack = _a[_i];
                pointStack.symbolLocations = [], pointStack.regions = [], pointStack.visible && withInRange(series.points[pointStack.index - 1], pointStack, series.points[pointStack.index + 1], series) && (rect = this.getRectangle(pointStack.xValue + sideBySideInfo.start, stackedValue.endValues[pointStack.index], pointStack.xValue + sideBySideInfo.end, stackedValue.startValues[pointStack.index], series), 
                (argsData = this.triggerEvent(series, pointStack, series.interior, {
                    width: series.border.width,
                    color: series.border.color
                })).cancel || (this.drawRectangle(series, pointStack, rect, argsData), this.updateSymbolLocation(pointStack, rect, series)));
            }
        }, StackingBarSeries.prototype.destroy = function(chart) {}, StackingBarSeries.prototype.getModuleName = function() {
            return "StackingBarSeries";
        }, StackingBarSeries.prototype.doAnimation = function(series) {
            this.animate(series);
        }, StackingBarSeries;
    }(ColumnBase), __extends$76 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), CandleSeries = function(_super) {
        function CandleSeries() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$76(CandleSeries, _super), CandleSeries.prototype.render = function(series) {
            for (var argsData, sideBySideInfo = this.getSideBySideInfo(series), borderWidth = Math.max(series.border.width, 1), _i = 0, _a = series.points; _i < _a.length; _i++) {
                var point = _a[_i], direction = "", centerRegion = void 0, tickRegion = void 0;
                (sideBySideInfo.start + sideBySideInfo.end) / 2, point.regions = [], point.symbolLocations = [], 
                point.visible && withInRange(series.points[point.index - 1], point, series.points[point.index + 1], series) && (tickRegion = this.getRectangle(point.xValue + sideBySideInfo.median, Math.max(point.high, point.low), point.xValue + sideBySideInfo.median, Math.min(point.high, point.low), series), 
                series.chart.requireInvertedAxis ? (tickRegion.y -= borderWidth / 2, tickRegion.height = borderWidth) : (tickRegion.x -= borderWidth / 2, 
                tickRegion.width = borderWidth), centerRegion = this.getRectangle(point.xValue + sideBySideInfo.start, Math.max(point.open, point.close), point.xValue + sideBySideInfo.end, Math.min(point.open, point.close), series), 
                direction = this.getPathString(tickRegion, centerRegion, series), (argsData = this.triggerPointRenderEvent(series, point)).cancel || (this.drawCandle(series, point, centerRegion, argsData, direction), 
                this.updateSymbolLocation(point, tickRegion, series), this.updateSymbolLocation(point, centerRegion, series)));
            }
        }, CandleSeries.prototype.triggerPointRenderEvent = function(series, point) {
            var fill;
            fill = this.getCandleColor(point, series);
            var border = {
                color: series.border.color,
                width: Math.max(series.border.width, 1)
            };
            return this.triggerEvent(series, point, fill, border);
        }, CandleSeries.prototype.getCandleColor = function(point, series) {
            var previousPoint = series.points[point.index - 1];
            return !1 === series.enableSolidCandles ? previousPoint && previousPoint.close > point.close ? series.bullFillColor : series.bearFillColor : point.open > point.close ? series.bullFillColor : series.bearFillColor;
        }, CandleSeries.prototype.getPathString = function(topRect, midRect, series) {
            var direction = "", center = (series.chart.requireInvertedAxis ? topRect.height : topRect.width, 
            series.chart.requireInvertedAxis ? topRect.y + topRect.height / 2 : topRect.x + topRect.width / 2);
            return direction += series.chart.requireInvertedAxis ? "M " + topRect.x + " " + center + " L " + midRect.x + " " + center : "M " + center + " " + topRect.y + " L " + center + " " + midRect.y, 
            direction = direction.concat(" M " + midRect.x + " " + midRect.y + " L " + (midRect.x + midRect.width) + " " + midRect.y + " L " + (midRect.x + midRect.width) + " " + (midRect.y + midRect.height) + " L " + midRect.x + " " + (midRect.y + midRect.height) + " Z"), 
            direction += series.chart.requireInvertedAxis ? " M " + (midRect.x + midRect.width) + " " + center + " L " + (topRect.x + topRect.width) + " " + center : " M " + center + " " + (midRect.y + midRect.height) + " L " + center + " " + (topRect.y + topRect.height);
        }, CandleSeries.prototype.drawCandle = function(series, point, rect, argsData, direction) {
            if ((series.chart.requireInvertedAxis ? rect.height : rect.width) <= 0) return null;
            var fill = series.enableSolidCandles ? argsData.fill : point.open > point.close ? argsData.fill : "transparent";
            argsData.border.color = argsData.fill;
            var options = new PathOption(series.chart.element.id + "_Series_" + series.index + "_Point_" + point.index, fill, argsData.border.width, argsData.border.color, series.opacity, series.dashArray, direction), candleElement = series.chart.renderer.drawPath(options);
            candleElement.setAttribute("aria-label", point.x.toString() + ":" + point.high.toString() + ":" + point.low.toString() + ":" + point.close.toString() + ":" + point.open.toString()), 
            series.seriesElement.appendChild(candleElement);
        }, CandleSeries.prototype.doAnimation = function(series) {
            this.animate(series);
        }, CandleSeries.prototype.getModuleName = function() {
            return "CandleSeries";
        }, CandleSeries.prototype.destroy = function(chart) {}, CandleSeries;
    }(ColumnBase), __extends$77 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), StackingColumnSeries = function(_super) {
        function StackingColumnSeries() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$77(StackingColumnSeries, _super), StackingColumnSeries.prototype.render = function(series) {
            series.isRectSeries = !0;
            Math.max(series.yAxis.visibleRange.min, 0);
            for (var rect, argsData, sideBySideInfo = this.getSideBySideInfo(series), stackedValue = series.stackedValues, _i = 0, _a = series.points; _i < _a.length; _i++) {
                var point = _a[_i];
                point.symbolLocations = [], point.regions = [], point.visible && withInRange(series.points[point.index - 1], point, series.points[point.index + 1], series) && (rect = this.getRectangle(point.xValue + sideBySideInfo.start, stackedValue.endValues[point.index], point.xValue + sideBySideInfo.end, stackedValue.startValues[point.index], series), 
                (argsData = this.triggerEvent(series, point, series.interior, {
                    width: series.border.width,
                    color: series.border.color
                })).cancel || (this.drawRectangle(series, point, rect, argsData), this.updateSymbolLocation(point, rect, series)));
            }
        }, StackingColumnSeries.prototype.doAnimation = function(series) {
            this.animate(series);
        }, StackingColumnSeries.prototype.destroy = function(chart) {}, StackingColumnSeries.prototype.getModuleName = function() {
            return "StackingColumnSeries";
        }, StackingColumnSeries;
    }(ColumnBase), __extends$78 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), StepLineSeries = function(_super) {
        function StepLineSeries() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$78(StepLineSeries, _super), StepLineSeries.prototype.render = function(series, xAxis, yAxis, isInverted) {
            var pathOptions, lineLength, point1, point2, direction = "", startPoint = "M", prevPoint = null, visiblePoints = this.improveChartPerformance(series);
            lineLength = "Category" === xAxis.valueType && "BetweenTicks" === xAxis.labelPlacement ? .5 : 0;
            for (var _i = 0, visiblePoints_1 = visiblePoints; _i < visiblePoints_1.length; _i++) {
                var point = visiblePoints_1[_i];
                point.symbolLocations = [], point.regions = [], point.visible && withInRange(visiblePoints[point.index - 1], point, visiblePoints[point.index + 1], series) ? (null != prevPoint ? (point2 = getPoint(point.xValue, point.yValue, xAxis, yAxis, isInverted), 
                point1 = getPoint(prevPoint.xValue, prevPoint.yValue, xAxis, yAxis, isInverted), 
                direction = direction.concat(startPoint + " " + point1.x + " " + point1.y + " L " + point2.x + " " + point1.y + "L " + point2.x + " " + point2.y + " "), 
                startPoint = "L") : (point1 = getPoint(point.xValue - lineLength, point.yValue, xAxis, yAxis, isInverted), 
                direction = direction.concat(startPoint + " " + point1.x + " " + point1.y + " "), 
                startPoint = "L"), this.storePointLocation(point, series, isInverted, getPoint), 
                prevPoint = point) : (prevPoint = "Drop" === series.emptyPointSettings.mode ? prevPoint : null, 
                startPoint = "Drop" === series.emptyPointSettings.mode ? startPoint : "M");
            }
            point1 = getPoint(visiblePoints[visiblePoints.length - 1].xValue + lineLength, visiblePoints[visiblePoints.length - 1].yValue, xAxis, yAxis, isInverted), 
            direction = direction.concat(startPoint + " " + point1.x + " " + point1.y + " "), 
            pathOptions = new PathOption(series.chart.element.id + "_Series_" + series.index, "transparent", series.width, series.interior, series.opacity, series.dashArray, direction), 
            this.appendLinePath(pathOptions, series, ""), this.renderMarker(series);
        }, StepLineSeries.prototype.doAnimation = function(series) {
            var option = series.animation;
            this.doLinearAnimation(series, option);
        }, StepLineSeries.prototype.destroy = function(chart) {}, StepLineSeries.prototype.getModuleName = function() {
            return "StepLineSeries";
        }, StepLineSeries;
    }(LineBase), __extends$79 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), StepAreaSeries = function(_super) {
        function StepAreaSeries() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$79(StepAreaSeries, _super), StepAreaSeries.prototype.render = function(series, xAxis, yAxis, isInverted) {
            var currentPoint, secondPoint, options, point, xValue, lineLength, start = null, direction = "", pointsLength = series.points.length, origin = Math.max(series.yAxis.visibleRange.min, 0), prevPoint = null;
            lineLength = "Category" === xAxis.valueType && "BetweenTicks" === xAxis.labelPlacement ? .5 : 0;
            for (var i = 0; i < pointsLength; i++) xValue = (point = series.points[i]).xValue, 
            point.symbolLocations = [], point.regions = [], point.visible && withInRange(series.points[i - 1], point, series.points[i + 1], series) && (null === start && (start = new ChartLocation(xValue, 0), 
            direction += "M " + (currentPoint = getPoint(xValue - lineLength, origin, xAxis, yAxis, isInverted)).x + " " + currentPoint.y + " ", 
            direction += "L " + (currentPoint = getPoint(xValue - lineLength, point.yValue, xAxis, yAxis, isInverted)).x + " " + currentPoint.y + " "), 
            null != prevPoint ? (currentPoint = getPoint(point.xValue, point.yValue, xAxis, yAxis, isInverted), 
            secondPoint = getPoint(prevPoint.xValue, prevPoint.yValue, xAxis, yAxis, isInverted), 
            direction += "L " + currentPoint.x + " " + secondPoint.y + "L " + currentPoint.x + " " + currentPoint.y + " ") : "Gap" === series.emptyPointSettings.mode && (direction += "L " + (currentPoint = getPoint(point.xValue, point.yValue, xAxis, yAxis, isInverted)).x + " " + currentPoint.y + " "), 
            this.storePointLocation(point, series, isInverted, getPoint), prevPoint = point), 
            series.points[i + 1] && !series.points[i + 1].visible && "Drop" !== series.emptyPointSettings.mode && (direction += "L " + (currentPoint = getPoint(xValue + lineLength, origin, xAxis, yAxis, isInverted)).x + " " + currentPoint.y, 
            start = null, prevPoint = null);
            pointsLength > 1 && (direction += "L " + (secondPoint = getPoint((start = {
                x: series.points[pointsLength - 1].xValue + lineLength,
                y: series.points[pointsLength - 1].yValue
            }).x, start.y, xAxis, yAxis, isInverted)).x + " " + secondPoint.y + " ", direction += "L " + (secondPoint = getPoint((start = {
                x: series.points[pointsLength - 1].xValue + lineLength,
                y: origin
            }).x, start.y, xAxis, yAxis, isInverted)).x + " " + secondPoint.y + " "), options = new PathOption(series.chart.element.id + "_Series_" + series.index, series.interior, series.border.width, series.border.color, series.opacity, series.dashArray, direction), 
            this.appendLinePath(options, series, ""), this.renderMarker(series);
        }, StepAreaSeries.prototype.doAnimation = function(series) {
            var option = series.animation;
            this.doLinearAnimation(series, option);
        }, StepAreaSeries.prototype.destroy = function(chart) {}, StepAreaSeries.prototype.getModuleName = function() {
            return "StepAreaSeries";
        }, StepAreaSeries;
    }(LineBase), __extends$80 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), StackingAreaSeries = function(_super) {
        function StackingAreaSeries() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$80(StackingAreaSeries, _super), StackingAreaSeries.prototype.render = function(series, xAxis, yAxis, isInverted) {
            var options, point2, polarAreaType = "PolarRadar" === series.chart.chartAreaType, getCoordinate = polarAreaType ? TransformToVisible : getPoint, lineDirection = "", visiblePoints = series.points, pointsLength = visiblePoints.length, stackedvalue = series.stackedValues, origin = polarAreaType ? Math.max(series.yAxis.visibleRange.min, stackedvalue.endValues[0]) : Math.max(series.yAxis.visibleRange.min, stackedvalue.startValues[0]), startPoint = (series.border, 
            0), point1 = getCoordinate(visiblePoints[0].xValue, origin, xAxis, yAxis, isInverted, series);
            lineDirection = lineDirection.concat("M " + point1.x + " " + point1.y + " ");
            for (var i = 0; i < pointsLength; i++) if (visiblePoints[i].symbolLocations = [], 
            visiblePoints[i].regions = [], visiblePoints[i].visible && withInRange(visiblePoints[i - 1], visiblePoints[i], visiblePoints[i + 1], series)) point1 = getCoordinate(visiblePoints[i].xValue, stackedvalue.endValues[i], xAxis, yAxis, isInverted, series), 
            lineDirection = lineDirection.concat("L " + point1.x + " " + point1.y + " "), visiblePoints[i].symbolLocations.push(getCoordinate(visiblePoints[i].xValue, stackedvalue.endValues[i], xAxis, yAxis, isInverted, series)), 
            visiblePoints[i].regions.push(new Rect(visiblePoints[i].symbolLocations[0].x - series.marker.width, visiblePoints[i].symbolLocations[0].y - series.marker.height, 2 * series.marker.width, 2 * series.marker.height)); else if ("Drop" !== series.emptyPointSettings.mode) {
                for (var j = i - 1; j >= startPoint; j--) point2 = getCoordinate(visiblePoints[j].xValue, stackedvalue.startValues[j], xAxis, yAxis, isInverted, series), 
                lineDirection = lineDirection.concat("L " + point2.x + " " + point2.y + " ");
                visiblePoints[i + 1] && visiblePoints[i + 1].visible && (point1 = getCoordinate(visiblePoints[i + 1].xValue, stackedvalue.startValues[i + 1], xAxis, yAxis, isInverted, series), 
                lineDirection = lineDirection.concat("M " + point1.x + " " + point1.y + " ")), startPoint = i + 1;
            }
            "PolarRadar" === series.chart.chartAreaType && visiblePoints.length > 1 && (lineDirection += "L " + (point2 = getCoordinate((point1 = {
                x: series.points[0].xValue,
                y: stackedvalue.endValues[0]
            }).x, point1.y, xAxis, yAxis, isInverted, series)).x + " " + point2.y + " ");
            for (j = pointsLength - 1; j >= startPoint; j--) {
                var previousSeries = this.getPreviousSeries(series);
                "Drop" === previousSeries.emptyPointSettings.mode && previousSeries.points[j].isEmpty || (point2 = getCoordinate(visiblePoints[j].xValue, stackedvalue.startValues[j], xAxis, yAxis, isInverted, series), 
                lineDirection = lineDirection.concat((j === pointsLength - 1 && polarAreaType ? "M" : "L") + " " + point2.x + " " + point2.y + " "));
            }
            options = new PathOption(series.chart.element.id + "_Series_" + series.index, series.interior, series.border.width, series.border.color, series.opacity, series.dashArray, lineDirection), 
            this.appendLinePath(options, series, ""), this.renderMarker(series);
        }, StackingAreaSeries.prototype.doAnimation = function(series) {
            var option = series.animation;
            this.doLinearAnimation(series, option);
        }, StackingAreaSeries.prototype.destroy = function(chart) {}, StackingAreaSeries.prototype.getModuleName = function() {
            return "StackingAreaSeries";
        }, StackingAreaSeries.prototype.getPreviousSeries = function(series) {
            for (var seriesCollection = series.chart.visibleSeries, i = 0, length_1 = seriesCollection.length; i < length_1; i++) if (series.index === seriesCollection[i].index && 0 !== i) return seriesCollection[i - 1];
            return seriesCollection[0];
        }, StackingAreaSeries;
    }(LineBase), ScatterSeries = function() {
        function ScatterSeries() {}
        return ScatterSeries.prototype.render = function(series, xAxis, yAxis, isInverted) {
            for (var symbolId, shapeOption, argsData, seriesIndex = series.index, marker = series.marker, visiblePoints = (series.border, 
            series.points), getCoordinate = "PolarRadar" === series.chart.chartAreaType ? TransformToVisible : getPoint, _i = 0, visiblePoints_1 = visiblePoints; _i < visiblePoints_1.length; _i++) {
                var point = visiblePoints_1[_i];
                point.symbolLocations = [], point.regions = [], point.visible && withInRange(visiblePoints[point.index - 1], point, visiblePoints[point.index + 1], series) && (point.symbolLocations.push(getCoordinate(point.xValue, point.yValue, xAxis, yAxis, isInverted, series)), 
                symbolId = series.chart.element.id + "_Series_" + seriesIndex + "_Point_" + point.index, 
                argsData = {
                    cancel: !1,
                    name: "pointRender",
                    series: series,
                    point: point,
                    fill: series.setPointColor(point, series.interior),
                    border: series.setBorderColor(point, {
                        width: series.border.width,
                        color: series.border.color
                    }),
                    height: marker.height,
                    width: marker.width,
                    shape: marker.shape
                }, series.chart.trigger("pointRender", argsData), argsData.cancel ? point.marker = {
                    visible: !0
                } : (point.color = argsData.fill, shapeOption = new PathOption(symbolId, argsData.fill, argsData.border.width, argsData.border.color, series.opacity, null), 
                series.seriesElement.appendChild(drawSymbol(point.symbolLocations[0], argsData.shape, new Size(argsData.width, argsData.height), marker.imageUrl, shapeOption, point.x.toString() + ":" + point.yValue.toString())), 
                point.regions.push(new Rect(point.symbolLocations[0].x - marker.width, point.symbolLocations[0].y - marker.height, 2 * marker.width, 2 * marker.height)), 
                point.marker = {
                    border: argsData.border,
                    fill: argsData.fill,
                    height: argsData.height,
                    visible: !0,
                    width: argsData.width,
                    shape: argsData.shape
                }));
            }
        }, ScatterSeries.prototype.doAnimation = function(series) {
            for (var duration = series.animation.duration, delay = series.animation.delay, rectElements = series.seriesElement.childNodes, count = 1, _i = 0, _a = series.points; _i < _a.length; _i++) {
                var point = _a[_i];
                point.symbolLocations.length && rectElements[count] && (markerAnimate(rectElements[count], delay, duration, series, point.index, point.symbolLocations[0], !1), 
                count++);
            }
        }, ScatterSeries.prototype.getModuleName = function() {
            return "ScatterSeries";
        }, ScatterSeries.prototype.destroy = function(chart) {}, ScatterSeries;
    }(), __extends$81 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), RangeColumnSeries = function(_super) {
        function RangeColumnSeries() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$81(RangeColumnSeries, _super), RangeColumnSeries.prototype.render = function(series) {
            for (var rect, argsData, sideBySideInfo = this.getSideBySideInfo(series), _i = 0, _a = series.points; _i < _a.length; _i++) {
                var rangePoint = _a[_i];
                rangePoint.symbolLocations = [], rangePoint.regions = [], rangePoint.visible && withInRange(series.points[rangePoint.index - 1], rangePoint, series.points[rangePoint.index + 1], series) && (rect = this.getRectangle(rangePoint.xValue + sideBySideInfo.start, rangePoint.high, rangePoint.xValue + sideBySideInfo.end, rangePoint.low, series), 
                (argsData = this.triggerEvent(series, rangePoint, series.interior, {
                    width: series.border.width,
                    color: series.border.color
                })).cancel || (this.updateSymbolLocation(rangePoint, rect, series), this.drawRectangle(series, rangePoint, rect, argsData)));
            }
        }, RangeColumnSeries.prototype.getModuleName = function() {
            return "RangeColumnSeries";
        }, RangeColumnSeries.prototype.doAnimation = function(series) {
            this.animate(series);
        }, RangeColumnSeries.prototype.destroy = function(chart) {}, RangeColumnSeries;
    }(ColumnBase), __extends$82 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), WaterfallSeries = function(_super) {
        function WaterfallSeries() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$82(WaterfallSeries, _super), WaterfallSeries.prototype.render = function(series) {
            for (var rect, argsData, originValue, y, sideBySideInfo = this.getSideBySideInfo(series), origin = Math.max(series.yAxis.visibleRange.min, 0), prevEndValue = 0, direction = "", currentEndValue = 0, prevRegion = null, isInversed = series.chart.requireInvertedAxis, intermediateOrigin = 0, _i = 0, _a = series.points; _i < _a.length; _i++) {
                var point = _a[_i];
                if (point.symbolLocations = [], point.regions = [], point.visible && withInRange(series.points[point.index - 1], point, series.points[point.index + 1], series)) {
                    var isSum = this.isIntermediateSum(series, point.index), totalSum = this.isSumIndex(series, point.index);
                    currentEndValue += isSum || !0 === totalSum ? 0 : point.yValue, originValue = !0 === isSum ? intermediateOrigin : null === prevEndValue || totalSum ? origin : prevEndValue, 
                    rect = this.getRectangle(point.xValue + sideBySideInfo.start, currentEndValue, point.xValue + sideBySideInfo.end, originValue, series), 
                    argsData = this.triggerPointRenderEvent(series, point), isSum && (intermediateOrigin = currentEndValue), 
                    prevEndValue = currentEndValue, argsData.cancel || (this.updateSymbolLocation(point, rect, series), 
                    this.drawRectangle(series, point, rect, argsData));
                    var currentRegion = point.regions[0];
                    if (null !== prevRegion) {
                        var prevLeft = isInversed ? prevRegion.x : prevRegion.y, currentLeft = isInversed ? currentRegion.x : currentRegion.y, prevBottom = isInversed ? prevRegion.x + prevRegion.width : prevRegion.y + prevRegion.height, currentBottom = isInversed ? currentRegion.x + currentRegion.width : currentRegion.y + currentRegion.height;
                        y = Math.round(prevLeft) === Math.round(currentLeft) || Math.round(prevBottom) === Math.round(currentLeft) ? isInversed ? currentRegion.x : currentRegion.y : currentBottom, 
                        direction = isInversed ? direction.concat("M " + y + " " + (prevRegion.y + prevRegion.height) + " L " + y + " " + currentRegion.y + " ") : direction.concat("M " + prevRegion.x + " " + y + " L " + (currentRegion.x + currentRegion.width) + " " + y + " ");
                    }
                    prevRegion = point.regions[0];
                }
            }
            var options = new PathOption(series.chart.element.id + "_Series_" + series.index + "_Connector_", "none", series.connector.width, series.connector.color, series.opacity, series.connector.dashArray, direction), element = series.chart.renderer.drawPath(options);
            series.chart.animateSeries && (element.style.visibility = "hidden"), series.seriesElement.appendChild(element);
        }, WaterfallSeries.prototype.isIntermediateSum = function(series, index) {
            return void 0 !== series.intermediateSumIndexes && -1 !== series.intermediateSumIndexes.indexOf(index);
        }, WaterfallSeries.prototype.isSumIndex = function(series, index) {
            return void 0 !== series.sumIndexes && -1 !== series.sumIndexes.indexOf(index);
        }, WaterfallSeries.prototype.triggerPointRenderEvent = function(series, point) {
            var color, isSum = this.isIntermediateSum(series, point.index), totalSum = this.isSumIndex(series, point.index);
            return color = isSum || totalSum ? series.summaryFillColor : point.y < 0 ? series.negativeFillColor : series.interior, 
            this.triggerEvent(series, point, color, {
                color: series.border.color,
                width: series.border.width
            });
        }, WaterfallSeries.prototype.processWaterfallData = function(json, series) {
            var index, data = json, intermediateSum = (json.length, series.intermediateSumIndexes), sumIndex = series.sumIndexes;
            if (void 0 !== intermediateSum && intermediateSum.length > 0) for (var i = 0; i < intermediateSum.length; i++) for (var j = 0; j < data.length; j++) j === intermediateSum[i] && (index = subArraySum(data, 0 === i ? -1 : intermediateSum[i - 1], intermediateSum[i], null, series), 
            data[j][series.yName] = index);
            if (void 0 !== sumIndex && sumIndex.length > 0) for (var k = 0; k < sumIndex.length; k++) for (j = 0; j < data.length; j++) j === sumIndex[k] && (index = subArraySum(data, -1, sumIndex[k], void 0 !== intermediateSum ? sumIndex : null, series), 
            data[j][series.yName] = index);
            return data;
        }, WaterfallSeries.prototype.doAnimation = function(series) {
            this.animate(series);
        }, WaterfallSeries.prototype.getModuleName = function() {
            return "WaterfallSeries";
        }, WaterfallSeries.prototype.destroy = function(chart) {}, WaterfallSeries;
    }(ColumnBase), __extends$83 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), HiloSeries = function(_super) {
        function HiloSeries() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$83(HiloSeries, _super), HiloSeries.prototype.render = function(series) {
            for (var region, argsData, sideBySideInfo = this.getSideBySideInfo(series), _i = 0, _a = series.points; _i < _a.length; _i++) {
                var point = _a[_i];
                point.symbolLocations = [], point.regions = [], point.visible && withInRange(series.points[point.index - 1], point, series.points[point.index + 1], series) && (region = this.getRectangle(point.xValue + sideBySideInfo.median, point.high, point.xValue + sideBySideInfo.median, point.low, series), 
                (argsData = this.triggerPointRenderEvent(series, point)).cancel || (series.chart.requireInvertedAxis ? (region.height = argsData.border.width, 
                region.y = region.y - region.height / 2) : (region.width = argsData.border.width, 
                region.x = region.x - region.width / 2), argsData.border.width = 0, this.updateSymbolLocation(point, region, series), 
                this.drawRectangle(series, point, region, argsData)));
            }
        }, HiloSeries.prototype.triggerPointRenderEvent = function(series, point) {
            var border = {
                color: series.fill,
                width: Math.max(series.border.width, 2)
            };
            return _super.prototype.triggerEvent.call(this, series, point, series.interior, border);
        }, HiloSeries.prototype.getModuleName = function() {
            return "HiloSeries";
        }, HiloSeries.prototype.doAnimation = function(series) {
            this.animate(series);
        }, HiloSeries.prototype.destroy = function(chart) {}, HiloSeries;
    }(ColumnBase), __extends$84 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), HiloOpenCloseSeries = function(_super) {
        function HiloOpenCloseSeries() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$84(HiloOpenCloseSeries, _super), HiloOpenCloseSeries.prototype.render = function(series) {
            for (var highLowRect, argsData, sideBySideInfo = this.getSideBySideInfo(series), borderWidth = Math.max(series.border.width, 2), _i = 0, _a = series.points; _i < _a.length; _i++) {
                var point = _a[_i];
                if (point.symbolLocations = [], point.regions = [], point.visible && withInRange(series.points[point.index - 1], point, series.points[point.index + 1], series)) {
                    if (highLowRect = this.getRectangle(point.xValue + sideBySideInfo.start, Math.max(point.high, point.low), point.xValue + sideBySideInfo.end, Math.min(point.high, point.low), series), 
                    point.regions.push(this.getRectangle(point.xValue + sideBySideInfo.median, Math.max(point.high, point.low), point.xValue + sideBySideInfo.median, Math.min(point.high, point.low), series)), 
                    this.updateTickRegion(!series.chart.requireInvertedAxis, point.regions[0], borderWidth), 
                    point.regions.push(this.getRectangle(point.xValue + sideBySideInfo.start, Math.max(point.open, point.close), point.xValue + sideBySideInfo.median, Math.max(point.open, point.close), series)), 
                    point.regions.push(this.getRectangle(point.xValue + sideBySideInfo.median, Math.min(point.open, point.close), point.xValue + sideBySideInfo.end, Math.min(point.open, point.close), series)), 
                    !(argsData = this.triggerPointRenderEvent(series, point)).cancel) {
                        this.updateSymbolLocation(point, point.regions[0], series);
                        var open_1 = {
                            x: point.regions[1].x,
                            y: point.regions[1].y
                        }, close_1 = {
                            x: point.regions[2].x,
                            y: point.regions[2].y
                        };
                        this.drawHiloOpenClosePath(series, point, open_1, close_1, highLowRect, argsData);
                    }
                    this.updateTickRegion(series.chart.requireInvertedAxis, point.regions[1], borderWidth), 
                    this.updateTickRegion(series.chart.requireInvertedAxis, point.regions[2], borderWidth);
                }
            }
        }, HiloOpenCloseSeries.prototype.updateTickRegion = function(horizontal, region, borderWidth) {
            horizontal ? (region.x -= borderWidth / 2, region.width = borderWidth) : (region.y -= borderWidth / 2, 
            region.height = borderWidth);
        }, HiloOpenCloseSeries.prototype.triggerPointRenderEvent = function(series, point) {
            var fill = point.open <= point.close ? series.bearFillColor : series.bullFillColor, border = {
                color: series.border.color,
                width: Math.max(series.border.width, 1)
            };
            return this.triggerEvent(series, point, fill, border);
        }, HiloOpenCloseSeries.prototype.drawHiloOpenClosePath = function(series, point, open, close, rect, argsData) {
            var direction, options;
            series.chart.requireInvertedAxis ? (direction = "M " + rect.x + " " + (rect.y + rect.height / 2) + " L " + (rect.x + rect.width) + " " + (rect.y + rect.height / 2) + " ", 
            direction += "M " + open.x + " " + (rect.y + rect.height / 2) + " L " + open.x + " " + (rect.y + rect.height) + " ", 
            direction += "M " + close.x + " " + (rect.y + rect.height / 2) + " L " + close.x + " " + rect.y + " ") : (direction = "M " + (rect.x + rect.width / 2) + " " + (rect.y + rect.height) + " L " + (rect.x + rect.width / 2) + " " + rect.y + " ", 
            direction += "M " + rect.x + " " + open.y + " L " + (rect.x + rect.width / 2) + " " + open.y + " ", 
            direction += "M " + (rect.x + rect.width / 2) + " " + close.y + " L " + (rect.x + rect.width) + " " + close.y + " "), 
            options = new PathOption(series.chart.element.id + "_Series_" + series.index + "_Point_" + point.index, argsData.fill, argsData.border.width, argsData.fill, series.opacity, series.dashArray, direction);
            var element = series.chart.renderer.drawPath(options);
            element.setAttribute("aria-label", point.x.toString() + ":" + point.high.toString() + ":" + point.low.toString() + ":" + point.close.toString() + ":" + point.open.toString()), 
            series.seriesElement.appendChild(element);
        }, HiloOpenCloseSeries.prototype.getModuleName = function() {
            return "HiloOpenCloseSeries";
        }, HiloOpenCloseSeries.prototype.doAnimation = function(series) {
            this.animate(series);
        }, HiloOpenCloseSeries.prototype.destroy = function(chart) {}, HiloOpenCloseSeries;
    }(ColumnBase), __extends$85 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), RangeAreaSeries = function(_super) {
        function RangeAreaSeries() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$85(RangeAreaSeries, _super), RangeAreaSeries.prototype.render = function(series) {
            for (var point, direction = "", command = "M", closed = void 0, visiblePoints = this.improveChartPerformance(series), i = 0, length_1 = visiblePoints.length; i < length_1; i++) {
                (point = visiblePoints[i]).symbolLocations = [], point.regions = [];
                var low = Math.min(point.low, point.high), high = Math.max(point.low, point.high);
                if (series.yAxis.isInversed) {
                    var temp = low;
                    low = high, high = temp;
                }
                var lowPoint = getPoint(point.xValue, low, series.xAxis, series.yAxis, series.chart.requireInvertedAxis), highPoint = getPoint(point.xValue, high, series.xAxis, series.yAxis, series.chart.requireInvertedAxis);
                point.symbolLocations.push(highPoint), point.symbolLocations.push(lowPoint);
                var rect = new Rect(Math.min(lowPoint.x, highPoint.x), Math.min(lowPoint.y, highPoint.y), Math.max(Math.abs(highPoint.x - lowPoint.x), series.marker.width), Math.max(Math.abs(highPoint.y - lowPoint.y), series.marker.width));
                series.chart.requireInvertedAxis ? rect.y -= series.marker.width / 2 : rect.x -= series.marker.width / 2, 
                point.regions.push(rect), point.visible && withInRange(visiblePoints[point.index - 1], point, visiblePoints[point.index + 1], series) ? (direction = direction.concat(command + " " + lowPoint.x + " " + lowPoint.y + " "), 
                closed = !1, (i + 1 < visiblePoints.length && !visiblePoints[i + 1].visible || i === visiblePoints.length - 1) && (command = "M", 
                direction = (direction = this.closeRangeAreaPath(visiblePoints, point, series, direction, i)).concat(" Z"), 
                closed = !0), command = "L") : (!1 === closed && 0 !== i && (direction = this.closeRangeAreaPath(visiblePoints, point, series, direction, i), 
                closed = !0), command = "M", point.symbolLocations = []);
            }
            var name = "Indicator" === series.category ? series.chart.element.id + "_Indicator_" + series.index + "_" + series.name : series.chart.element.id + "_Series_" + series.index, options = new PathOption(name, series.interior, series.border.width, series.border.color, series.opacity, series.dashArray, direction);
            this.appendLinePath(options, series, ""), this.renderMarker(series);
        }, RangeAreaSeries.prototype.closeRangeAreaPath = function(visiblePoints, point, series, direction, i) {
            for (var j = i; j >= 0 && (visiblePoints[j].visible && visiblePoints[j].symbolLocations[0]); j--) direction += "L " + (point = visiblePoints[j]).symbolLocations[0].x + " " + point.symbolLocations[0].y + " ";
            return direction;
        }, RangeAreaSeries.prototype.doAnimation = function(series) {
            var option = series.animation;
            this.doLinearAnimation(series, option);
        }, RangeAreaSeries.prototype.getModuleName = function() {
            return "RangeAreaSeries";
        }, RangeAreaSeries.prototype.destroy = function(chart) {}, RangeAreaSeries;
    }(LineBase), BubbleSeries = function() {
        function BubbleSeries() {}
        return BubbleSeries.prototype.render = function(series, xAxis, yAxis, isInverted) {
            var shapeOption, argsData, segmentRadius, radius, marker = series.marker, visiblePoints = series.points, value = Math.max(series.chart.initialClipRect.height, series.chart.initialClipRect.width), percentChange = value / 100, maxRadius = series.maxRadius * percentChange, minRadius = series.minRadius * percentChange, maximumSize = null;
            if (null === series.maxRadius || null === series.minRadius) {
                for (var _i = 0, _a = series.chart.visibleSeries; _i < _a.length; _i++) {
                    var value_1 = _a[_i];
                    "Bubble" !== value_1.type || !0 !== value_1.visible || null !== value_1.maxRadius && null !== value_1.minRadius || (maximumSize = value_1.sizeMax > maximumSize ? value_1.sizeMax : maximumSize);
                }
                minRadius = maxRadius = 1, radius = value / 5 / 2 * maxRadius;
            } else maximumSize = series.sizeMax, radius = maxRadius - minRadius;
            for (var _b = 0, visiblePoints_1 = visiblePoints; _b < visiblePoints_1.length; _b++) {
                var bubblePoint = visiblePoints_1[_b];
                bubblePoint.symbolLocations = [], bubblePoint.regions = [], bubblePoint.visible && withInRange(visiblePoints[bubblePoint.index - 1], bubblePoint, visiblePoints[bubblePoint.index + 1], series) && (bubblePoint.symbolLocations.push(getPoint(bubblePoint.xValue, bubblePoint.yValue, xAxis, yAxis, isInverted)), 
                segmentRadius = (segmentRadius = null === series.maxRadius || null === series.minRadius ? radius * Math.abs(+bubblePoint.size / maximumSize) : minRadius + radius * Math.abs(+bubblePoint.size / maximumSize)) || minRadius, 
                argsData = {
                    cancel: !1,
                    name: "pointRender",
                    series: series,
                    point: bubblePoint,
                    fill: series.setPointColor(bubblePoint, series.interior),
                    border: series.setBorderColor(bubblePoint, {
                        width: series.border.width,
                        color: series.border.color
                    }),
                    height: 2 * segmentRadius,
                    width: 2 * segmentRadius
                }, series.chart.trigger("pointRender", argsData), argsData.cancel ? bubblePoint.marker = {
                    visible: !1
                } : (bubblePoint.color = argsData.fill, shapeOption = new PathOption(series.chart.element.id + "_Series_" + series.index + "_Point_" + bubblePoint.index, argsData.fill, argsData.border.width, argsData.border.color, series.opacity, null), 
                series.seriesElement.appendChild(drawSymbol(bubblePoint.symbolLocations[0], "Circle", new Size(argsData.width, argsData.height), marker.imageUrl, shapeOption, bubblePoint.x.toString() + ":" + bubblePoint.yValue.toString())), 
                bubblePoint.regions.push(new Rect(bubblePoint.symbolLocations[0].x - segmentRadius, bubblePoint.symbolLocations[0].y - segmentRadius, 2 * segmentRadius, 2 * segmentRadius)), 
                bubblePoint.marker = {
                    border: argsData.border,
                    fill: argsData.fill,
                    height: argsData.height,
                    visible: !0,
                    shape: "Circle",
                    width: argsData.width
                }));
            }
        }, BubbleSeries.prototype.destroy = function(chart) {}, BubbleSeries.prototype.getModuleName = function() {
            return "BubbleSeries";
        }, BubbleSeries.prototype.doAnimation = function(series) {
            for (var duration = series.animation.duration, delay = series.animation.delay, rectElements = series.seriesElement.childNodes, count = 1, _i = 0, _a = series.points; _i < _a.length; _i++) {
                var bubblePoint = _a[_i];
                bubblePoint.symbolLocations.length && (markerAnimate(rectElements[count], delay, duration, series, bubblePoint.index, bubblePoint.symbolLocations[0], !1), 
                count++);
            }
        }, BubbleSeries;
    }(), __extends$87 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), SplineBase = function(_super) {
        function SplineBase(chartModule) {
            var _this = _super.call(this, chartModule) || this;
            return _this.splinePoints = [], _this;
        }
        return __extends$87(SplineBase, _super), SplineBase.prototype.findSplinePoint = function(series) {
            var value, points = this.filterEmptyPoints(series);
            if (this.splinePoints = this.findSplineCoefficients(points, series), points.length > 1) {
                series.drawPoints = [];
                for (var _i = 0, points_1 = points; _i < points_1.length; _i++) {
                    var point = points_1[_i];
                    if (0 !== point.index) {
                        var previous = this.getPreviousIndex(points, point.index - 1, series);
                        value = this.getControlPoints(points[previous], point, this.splinePoints[previous], this.splinePoints[point.index], series), 
                        series.drawPoints.push(value), point.yValue && value.controlPoint1.y && value.controlPoint2.y && (series.yMin = Math.floor(Math.min(series.yMin, point.yValue, value.controlPoint1.y, value.controlPoint2.y)), 
                        series.yMax = Math.ceil(Math.max(series.yMax, point.yValue, value.controlPoint1.y, value.controlPoint2.y)));
                    }
                }
            }
        }, SplineBase.prototype.getPreviousIndex = function(points, i, series) {
            if ("Drop" !== series.emptyPointSettings.mode) return i;
            for (;isNullOrUndefined(points[i]) && i > -1; ) i -= 1;
            return i;
        }, SplineBase.prototype.getNextIndex = function(points, i, series) {
            if ("Drop" !== series.emptyPointSettings.mode) return i;
            for (;isNullOrUndefined(points[i]) && i < points.length; ) i += 1;
            return i;
        }, SplineBase.prototype.filterEmptyPoints = function(series) {
            if ("Drop" !== series.emptyPointSettings.mode) return series.points;
            for (var points = extend([], series.points, null, !0), i = 0; i < points.length; i++) points[i].index = i, 
            points[i].isEmpty && (points[i].symbolLocations = [], points[i].regions = [], points.splice(i, 1), 
            i--);
            return points;
        }, SplineBase.prototype.findSplineCoefficients = function(points, series) {
            var coefficient1, coefficient2, coefficient3, dy1, dy2, interPoint, slopeLength, count = points.length, ySpline = [], ySplineDuplicate = [], dx = [], dy = [], slope = [], cardinalSplineTension = series.cardinalSplineTension ? series.cardinalSplineTension : .5;
            switch (cardinalSplineTension = cardinalSplineTension < 0 ? 0 : cardinalSplineTension > 1 ? 1 : cardinalSplineTension, 
            series.splineType) {
              case "Monotonic":
                for (var i = 0; i < count - 1; i++) dx[i] = points[i + 1].xValue - points[i].xValue, 
                dy[i] = points[i + 1].yValue - points[i].yValue, slope[i] = dy[i] / dx[i];
                slopeLength = slope.length, ySpline[0] = slope[0], ySpline[count - 1] = slope[slopeLength - 1];
                for (var j = 0; j < dx.length; j++) slopeLength > j + 1 && (slope[j] * slope[j + 1] <= 0 ? ySpline[j + 1] = 0 : (interPoint = dx[j] + dx[j + 1], 
                ySpline[j + 1] = 3 * interPoint / ((interPoint + dx[j + 1]) / slope[j] + (interPoint + dx[j]) / slope[j + 1])));
                break;

              case "Cardinal":
                for (i = 0; i < count; i++) ySpline[i] = 0 === i ? count > 2 ? cardinalSplineTension * (points[i + 2].xValue - points[i].xValue) : 0 : i === count - 1 ? count > 2 ? cardinalSplineTension * (points[count - 1].xValue - points[count - 3].xValue) : 0 : cardinalSplineTension * (points[i + 1].xValue - points[i - 1].xValue);
                break;

              default:
                if ("Clamped" === series.splineType) {
                    points[1].yValue, points[0].yValue, points[1].xValue, points[0].xValue, points[count - 1].xValue, 
                    points[count - 2].xValue, points[count - 1].yValue, points[count - 2].yValue;
                    ySpline[0] = 3 * (points[1].yValue - points[0].yValue) / (points[1].xValue - points[0].xValue) - 3, 
                    ySplineDuplicate[0] = .5, ySpline[points.length - 1] = 3 * (points[points.length - 1].yValue - points[points.length - 2].yValue) / (points[points.length - 1].xValue - points[points.length - 2].xValue), 
                    ySpline[0] = ySplineDuplicate[0] = Math.abs(ySpline[0]) === 1 / 0 ? 0 : ySpline[0], 
                    ySpline[points.length - 1] = ySplineDuplicate[points.length - 1] = Math.abs(ySpline[points.length - 1]) === 1 / 0 ? 0 : ySpline[points.length - 1];
                } else ySpline[0] = ySplineDuplicate[0] = 0, ySpline[points.length - 1] = 0;
                for (i = 1; i < count - 1; i++) if (coefficient1 = points[i].xValue - points[i - 1].xValue, 
                coefficient2 = points[i + 1].xValue - points[i - 1].xValue, coefficient3 = points[i + 1].xValue - points[i].xValue, 
                dy1 = points[i + 1].yValue - points[i].yValue || null, dy2 = points[i].yValue - points[i - 1].yValue || null, 
                0 === coefficient1 || 0 === coefficient2 || 0 === coefficient3) ySpline[i] = 0, 
                ySplineDuplicate[i] = 0; else {
                    var p = 1 / (coefficient1 * ySpline[i - 1] + 2 * coefficient2);
                    ySpline[i] = -p * coefficient3, ySplineDuplicate[i] = p * (6 * (dy1 / coefficient3 - dy2 / coefficient1) - coefficient1 * ySplineDuplicate[i - 1]);
                }
                for (var k = count - 2; k >= 0; k--) ySpline[k] = ySpline[k] * ySpline[k + 1] + ySplineDuplicate[k];
            }
            return ySpline;
        }, SplineBase.prototype.getControlPoints = function(point1, point2, ySpline1, ySpline2, series) {
            var controlPoint1, controlPoint2, point, ySplineDuplicate1 = ySpline1, ySplineDuplicate2 = ySpline2;
            switch (series.splineType) {
              case "Cardinal":
                "DateTime" === series.xAxis.valueType && (ySplineDuplicate1 = ySpline1 / this.dateTimeInterval(series), 
                ySplineDuplicate2 = ySpline2 / this.dateTimeInterval(series)), controlPoint1 = new ChartLocation(point1.xValue + ySpline1 / 3, point1.yValue + ySplineDuplicate1 / 3), 
                controlPoint2 = new ChartLocation(point2.xValue - ySpline2 / 3, point2.yValue - ySplineDuplicate2 / 3), 
                point = new ControlPoints(controlPoint1, controlPoint2);
                break;

              case "Monotonic":
                var value = (point2.xValue - point1.xValue) / 3;
                controlPoint1 = new ChartLocation(point1.xValue + value, point1.yValue + ySpline1 * value), 
                controlPoint2 = new ChartLocation(point2.xValue - value, point2.yValue - ySpline2 * value), 
                point = new ControlPoints(controlPoint1, controlPoint2);
                break;

              default:
                var deltaX2 = point2.xValue - point1.xValue;
                deltaX2 *= deltaX2;
                var y1 = 1 / 3 * (2 * point1.yValue + point2.yValue - 1 / 3 * deltaX2 * (ySpline1 + .5 * ySpline2)), y2 = 1 / 3 * (point1.yValue + 2 * point2.yValue - 1 / 3 * deltaX2 * (.5 * ySpline1 + ySpline2));
                controlPoint1 = new ChartLocation((2 * point1.xValue + point2.xValue) * (1 / 3), y1), 
                controlPoint2 = new ChartLocation((point1.xValue + 2 * point2.xValue) * (1 / 3), y2), 
                point = new ControlPoints(controlPoint1, controlPoint2);
            }
            return point;
        }, SplineBase.prototype.dateTimeInterval = function(series) {
            var interval = series.xAxis.actualIntervalType;
            return "Years" === interval ? 31536e6 : "Months" === interval ? 2592e6 : "Days" === interval ? 864e5 : "Hours" === interval ? 36e5 : "Minutes" === interval ? 6e4 : "Seconds" === interval ? 1e3 : 2592e6;
        }, SplineBase.prototype.doAnimation = function(series) {
            var option = series.animation;
            this.doLinearAnimation(series, option);
        }, SplineBase;
    }(LineBase), __extends$86 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), SplineSeries = function(_super) {
        function SplineSeries() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$86(SplineSeries, _super), SplineSeries.prototype.render = function(series, xAxis, yAxis, isInverted) {
            series.chart, series.marker;
            for (var options, pt1, pt2, bpt1, bpt2, data, controlPoint1, controlPoint2, previous, firstPoint = null, direction = "", startPoint = "M", points = this.filterEmptyPoints(series), getCoordinate = "PolarRadar" === series.chart.chartAreaType ? TransformToVisible : getPoint, _i = 0, points_1 = points; _i < points_1.length; _i++) {
                var point = points_1[_i];
                previous = this.getPreviousIndex(points, point.index - 1, series), point.symbolLocations = [], 
                point.regions = [], point.visible && withInRange(points[previous], point, points[this.getNextIndex(points, point.index - 1, series)], series) ? (null !== firstPoint && (controlPoint1 = (data = series.drawPoints[previous]).controlPoint1, 
                controlPoint2 = data.controlPoint2, pt1 = getCoordinate(firstPoint.xValue, firstPoint.yValue, xAxis, yAxis, isInverted, series), 
                pt2 = getCoordinate(point.xValue, point.yValue, xAxis, yAxis, isInverted, series), 
                bpt1 = getCoordinate(controlPoint1.x, controlPoint1.y, xAxis, yAxis, isInverted, series), 
                bpt2 = getCoordinate(controlPoint2.x, controlPoint2.y, xAxis, yAxis, isInverted, series), 
                direction = direction.concat(startPoint + " " + pt1.x + " " + pt1.y + " C " + bpt1.x + " " + bpt1.y + " " + bpt2.x + " " + bpt2.y + " " + pt2.x + " " + pt2.y + " "), 
                startPoint = "L"), firstPoint = point, this.storePointLocation(point, series, isInverted, getCoordinate)) : (startPoint = "M", 
                firstPoint = null, point.symbolLocations = []);
            }
            var name = "TrendLine" === series.category ? series.chart.element.id + "_Series_" + series.sourceIndex + "_TrendLine_" + series.index : series.chart.element.id + "_Series_" + series.index;
            options = new PathOption(name, "transparent", series.width, series.interior, series.opacity, series.dashArray, direction), 
            this.appendLinePath(options, series, ""), this.renderMarker(series);
        }, SplineSeries.prototype.getModuleName = function() {
            return "SplineSeries";
        }, SplineSeries.prototype.destroy = function(chart) {}, SplineSeries;
    }(SplineBase), __extends$88 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), SplineAreaSeries = function(_super) {
        function SplineAreaSeries() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$88(SplineAreaSeries, _super), SplineAreaSeries.prototype.render = function(series, xAxis, yAxis, isInverted) {
            for (var pt2, bpt1, bpt2, controlPt1, controlPt2, point, previous, firstPoint = null, direction = "", startPoint = null, startPoint1 = null, points = this.filterEmptyPoints(series), pointsLength = series.points.length, getCoordinate = "PolarRadar" === series.chart.chartAreaType ? TransformToVisible : getPoint, origin = "PolarRadar" === series.chart.chartAreaType ? series.points[0].yValue : Math.max(series.yAxis.visibleRange.min, 0), i = 0; i < pointsLength; i++) (point = series.points[i]).symbolLocations = [], 
            point.regions = [], previous = this.getPreviousIndex(points, point.index - 1, series), 
            point.visible && withInRange(points[previous], point, points[this.getNextIndex(points, point.index - 1, series)], series) ? (firstPoint ? (controlPt1 = series.drawPoints[previous].controlPoint1, 
            controlPt2 = series.drawPoints[previous].controlPoint2, getCoordinate(firstPoint.xValue, firstPoint.yValue, xAxis, yAxis, isInverted, series), 
            pt2 = getCoordinate(point.xValue, point.yValue, xAxis, yAxis, isInverted, series), 
            bpt1 = getCoordinate(controlPt1.x, controlPt1.y, xAxis, yAxis, isInverted, series), 
            bpt2 = getCoordinate(controlPt2.x, controlPt2.y, xAxis, yAxis, isInverted, series), 
            direction = direction.concat(" C" + bpt1.x + " " + bpt1.y + " " + bpt2.x + " " + bpt2.y + " " + pt2.x + " " + pt2.y + " ")) : (direction += "M " + (startPoint = getCoordinate(point.xValue, origin, xAxis, yAxis, isInverted, series)).x + " " + startPoint.y + " ", 
            direction += "L " + (startPoint1 = getCoordinate(point.xValue, point.yValue, xAxis, yAxis, isInverted, series)).x + " " + startPoint1.y + " "), 
            this.storePointLocation(point, series, isInverted, getCoordinate), firstPoint = point) : (firstPoint = null, 
            point.symbolLocations = []), (i + 1 < pointsLength && !series.points[i + 1].visible || i === pointsLength - 1) && pt2 && startPoint && (startPoint = getCoordinate(point.xValue, origin, xAxis, yAxis, isInverted, series), 
            direction = direction.concat("L " + startPoint.x + " " + startPoint.y));
            this.appendLinePath(new PathOption(series.chart.element.id + "_Series_" + series.index, series.interior, series.border.width, series.border.color, series.opacity, series.dashArray, direction), series, ""), 
            this.renderMarker(series);
        }, SplineAreaSeries.prototype.getModuleName = function() {
            return "SplineAreaSeries";
        }, SplineAreaSeries.prototype.destroy = function(chart) {}, SplineAreaSeries;
    }(SplineBase), __extends$90 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), TechnicalAnalysis = function(_super) {
        function TechnicalAnalysis() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$90(TechnicalAnalysis, _super), TechnicalAnalysis.prototype.initSeriesCollection = function(indicator, chart) {
            indicator.targetSeries = [];
            var signalLine = new Series(indicator, "targetSeries", {}, !0);
            this.setSeriesProperties(signalLine, indicator, "SignalLine", indicator.fill, indicator.width, chart);
        }, TechnicalAnalysis.prototype.setSeriesProperties = function(series, indicator, name, fill, width, chart) {
            series.name = name, series.xName = "x", series.yName = "y", series.fill = fill || "#606eff", 
            series.dashArray = indicator.dashArray, series.width = width, series.xAxisName = indicator.xAxisName, 
            series.animation = indicator.animation, series.yAxisName = indicator.yAxisName, 
            series.clipRectElement = indicator.clipRectElement, series.points = [], series.enableTooltip = !0, 
            series.interior = series.fill, series.category = "Indicator", series.index = indicator.index, 
            series.chart = chart, series.xMin = 1 / 0, series.xMax = -1 / 0, series.yMin = 1 / 0, 
            series.yMax = -1 / 0, series.xData = [], series.yData = [], series.marker.visible = !1, 
            indicator.targetSeries.push(series);
        }, TechnicalAnalysis.prototype.createIndicatorElements = function(chart, indicator, index) {
            (indicator.seriesName || indicator.dataSource) && findClipRect(indicator.targetSeries[0]);
            var clipRect = new Rect(0, 0, 0, 0);
            (indicator.seriesName || indicator.dataSource) && (clipRect = indicator.targetSeries[0].clipRect);
            var clipRectElement = chart.renderer.drawClipPath(new RectOption(chart.element.id + "_ChartIndicatorClipRect_" + index, "transparent", {
                width: 1,
                color: "Gray"
            }, 1, {
                x: 0,
                y: 0,
                width: clipRect.width,
                height: clipRect.height
            }));
            indicator.indicatorElement = chart.renderer.createGroup({
                id: chart.element.id + "IndicatorGroup" + index,
                transform: "translate(" + clipRect.x + "," + clipRect.y + ")",
                "clip-path": "url(#" + chart.element.id + "_ChartIndicatorClipRect_" + index + ")"
            }), indicator.indicatorElement.appendChild(clipRectElement);
            for (var _i = 0, _a = indicator.targetSeries; _i < _a.length; _i++) {
                var series = _a[_i];
                series.clipRectElement = clipRectElement;
                var element = series.chart.renderer.createGroup({
                    id: series.chart.element.id + "_Indicator_" + indicator.index + "_" + series.name + "_Group"
                });
                indicator.indicatorElement.appendChild(element), series.seriesElement = element;
            }
            chart.indicatorElements.appendChild(indicator.indicatorElement);
        }, TechnicalAnalysis.prototype.getDataPoint = function(x, y, sourcePoint, series, index, indicator) {
            void 0 === indicator && (indicator = null);
            var point = new Points();
            return point.x = x, point.y = y, point.xValue = sourcePoint.xValue, point.color = series.fill, 
            point.index = index, point.yValue = y, point.visible = !0, series.xMin = Math.min(series.xMin, point.xValue), 
            series.yMin = Math.min(series.yMin, point.yValue), series.xMax = Math.max(series.xMax, point.xValue), 
            series.yMax = Math.max(series.yMax, point.yValue), series.xData.push(point.xValue), 
            indicator && "Macd" === indicator.type && "Column" === series.type && (point.y >= 0 ? point.color = indicator.macdPositiveColor : point.color = indicator.macdNegativeColor), 
            point;
        }, TechnicalAnalysis.prototype.getRangePoint = function(x, high, low, sourcePoint, series, index, indicator) {
            void 0 === indicator && (indicator = null);
            var point = new Points();
            return point.x = x, point.high = high, point.low = low, point.xValue = sourcePoint.xValue, 
            point.color = series.fill, point.index = index, point.visible = !0, series.xData.push(point.xValue), 
            point;
        }, TechnicalAnalysis.prototype.setSeriesRange = function(points, indicator, series) {
            void 0 === series && (series = null), series ? series.points = points : indicator.targetSeries[0].points = points;
        }, TechnicalAnalysis;
    }(LineBase), __extends$89 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), SmaIndicator = function(_super) {
        function SmaIndicator() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$89(SmaIndicator, _super), SmaIndicator.prototype.initDataSource = function(indicator, chart) {
            var smaPoints = [], points = indicator.points;
            if (points && points.length) {
                var validData = points, field = firstToLowerCase(indicator.field), signalSeries = indicator.targetSeries[0];
                if (validData && validData.length && validData.length >= indicator.period) {
                    for (var average = 0, sum$$1 = 0, i = 0; i < indicator.period; i++) sum$$1 += validData[i][field];
                    average = sum$$1 / indicator.period, smaPoints.push(this.getDataPoint(validData[indicator.period - 1].x, average, validData[indicator.period - 1], signalSeries, smaPoints.length));
                    for (var index = indicator.period; index < validData.length; ) sum$$1 -= validData[index - indicator.period][field], 
                    average = (sum$$1 += validData[index][field]) / indicator.period, smaPoints.push(this.getDataPoint(validData[index].x, average, validData[index], signalSeries, smaPoints.length)), 
                    index++;
                }
                this.setSeriesRange(smaPoints, indicator);
            }
        }, SmaIndicator.prototype.destroy = function(chart) {}, SmaIndicator.prototype.getModuleName = function() {
            return "SmaIndicator";
        }, SmaIndicator;
    }(TechnicalAnalysis), __extends$91 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), EmaIndicator = function(_super) {
        function EmaIndicator() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$91(EmaIndicator, _super), EmaIndicator.prototype.initDataSource = function(indicator, chart) {
            var field = firstToLowerCase(indicator.field), emaPoints = [], signalSeries = indicator.targetSeries[0], validData = indicator.points;
            if (validData && validData.length && validData.length >= indicator.period) {
                for (var sum$$1 = 0, average = 0, k = 2 / (indicator.period + 1), i = 0; i < indicator.period; i++) sum$$1 += validData[i][field];
                average = sum$$1 / indicator.period, emaPoints.push(this.getDataPoint(validData[indicator.period - 1].x, average, validData[indicator.period - 1], signalSeries, emaPoints.length));
                for (var index = indicator.period; index < validData.length; ) {
                    var prevAverage = emaPoints[index - indicator.period][signalSeries.yName], yValue = (validData[index][field] - prevAverage) * k + prevAverage;
                    emaPoints.push(this.getDataPoint(validData[index].x, yValue, validData[index], signalSeries, emaPoints.length)), 
                    index++;
                }
            }
            this.setSeriesRange(emaPoints, indicator);
        }, EmaIndicator.prototype.destroy = function(chart) {}, EmaIndicator.prototype.getModuleName = function() {
            return "EmaIndicator";
        }, EmaIndicator;
    }(TechnicalAnalysis), __extends$92 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), TmaIndicator = function(_super) {
        function TmaIndicator() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$92(TmaIndicator, _super), TmaIndicator.prototype.initDataSource = function(indicator, chart) {
            var tmaPoints = [], field = firstToLowerCase(indicator.field), validData = (indicator.targetSeries[0], 
            indicator.points);
            if (validData && validData.length && validData.length >= indicator.period) {
                var signalSeries_1 = indicator.targetSeries[0], validData_1 = indicator.points;
                if (validData_1.length && validData_1.length >= indicator.period) {
                    indicator.period;
                    for (var sum$$1 = 0, smaValues = [], index = 0, length_1 = validData_1.length, period = indicator.period; length_1 >= period; ) {
                        sum$$1 = 0;
                        for (var j = index = validData_1.length - length_1; j < index + period; j++) sum$$1 += validData_1[j][field];
                        sum$$1 /= period, smaValues.push(sum$$1), length_1--;
                    }
                    for (var k_1 = 0; k_1 < period - 1; k_1++) {
                        sum$$1 = 0;
                        for (j = 0; j < k_1 + 1; j++) sum$$1 += validData_1[j][field];
                        sum$$1 /= k_1 + 1, smaValues.splice(k_1, 0, sum$$1);
                    }
                    for (index = indicator.period; index <= smaValues.length; ) {
                        sum$$1 = 0;
                        for (j = index - indicator.period; j < index; j++) sum$$1 += smaValues[j];
                        sum$$1 /= indicator.period, tmaPoints.push(this.getDataPoint(validData_1[index - 1].x, sum$$1, validData_1[index - 1], signalSeries_1, tmaPoints.length)), 
                        index++;
                    }
                }
            }
            this.setSeriesRange(tmaPoints, indicator);
        }, TmaIndicator.prototype.destroy = function(chart) {}, TmaIndicator.prototype.getModuleName = function() {
            return "TmaIndicator";
        }, TmaIndicator;
    }(TechnicalAnalysis), __extends$93 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), AccumulationDistributionIndicator = function(_super) {
        function AccumulationDistributionIndicator() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$93(AccumulationDistributionIndicator, _super), AccumulationDistributionIndicator.prototype.initDataSource = function(indicator, chart) {
            indicator.sourceSeries;
            var adPoints = [], validData = indicator.points;
            validData.length > 0 && validData.length > indicator.period && (adPoints = this.calculateADPoints(indicator, validData)), 
            this.setSeriesRange(adPoints, indicator);
        }, AccumulationDistributionIndicator.prototype.calculateADPoints = function(indicator, validData) {
            var temp = [], sum = 0, i = 0, high = 0, low = 0, close = 0, signalSeries = indicator.targetSeries[0];
            for (i = 0; i < validData.length; i++) high = Number(validData[i].high), low = Number(validData[i].low), 
            sum += ((close = Number(validData[i].close)) - low - (high - close)) / (high - low) * Number(validData[i].volume), 
            temp[i] = this.getDataPoint(validData[i].x, sum, validData[i], signalSeries, temp.length);
            return temp;
        }, AccumulationDistributionIndicator.prototype.destroy = function(chart) {}, AccumulationDistributionIndicator.prototype.getModuleName = function() {
            return "AccumulationDistributionIndicator";
        }, AccumulationDistributionIndicator;
    }(TechnicalAnalysis), __extends$94 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), AtrIndicator = function(_super) {
        function AtrIndicator() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$94(AtrIndicator, _super), AtrIndicator.prototype.initDataSource = function(indicator, chart) {
            indicator.sourceSeries;
            var validData = indicator.points;
            validData.length > 0 && validData.length > indicator.period && this.calculateATRPoints(indicator, validData);
        }, AtrIndicator.prototype.calculateATRPoints = function(indicator, validData) {
            for (var average = 0, highLow = 0, highClose = 0, lowClose = 0, trueRange = 0, points = [], temp = [], period = indicator.period, sum = 0, signalSeries = indicator.targetSeries[0], i = 0; i < validData.length; i++) highLow = Number(validData[i].high) - Number(validData[i].low), 
            i > 0 && (highClose = Math.abs(Number(validData[i].high) - Number(validData[i - 1].close)), 
            lowClose = Math.abs(Number(validData[i].low) - Number(validData[i - 1].close))), 
            sum += trueRange = Math.max(highLow, highClose, lowClose), i >= period ? (average = (Number(temp[i - 1].y) * (period - 1) + trueRange) / period, 
            points.push(this.getDataPoint(validData[i].x, average, validData[i], signalSeries, points.length))) : (average = sum / period, 
            i === period - 1 && points.push(this.getDataPoint(validData[i].x, average, validData[i], signalSeries, points.length))), 
            temp[i] = {
                x: validData[i].x,
                y: average
            };
            this.setSeriesRange(points, indicator);
        }, AtrIndicator.prototype.destroy = function(chart) {}, AtrIndicator.prototype.getModuleName = function() {
            return "AtrIndicator";
        }, AtrIndicator;
    }(TechnicalAnalysis), __extends$95 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), MomentumIndicator = function(_super) {
        function MomentumIndicator() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$95(MomentumIndicator, _super), MomentumIndicator.prototype.initSeriesCollection = function(indicator, chart) {
            _super.prototype.initSeriesCollection.call(this, indicator, chart);
            var upperLine = new Series(indicator, "targetSeries", {}, !0);
            _super.prototype.setSeriesProperties.call(this, upperLine, indicator, "UpperLine", indicator.upperLine.color, indicator.upperLine.width, chart);
        }, MomentumIndicator.prototype.initDataSource = function(indicator, chart) {
            var upperCollection = [], signalCollection = [], validData = indicator.points;
            if (validData && validData.length) {
                var upperSeries = indicator.targetSeries[1], signalSeries = indicator.targetSeries[0], length_1 = indicator.period;
                if (validData.length >= indicator.period) for (var i = 0; i < validData.length; i++) upperCollection.push(this.getDataPoint(validData[i].x, 100, validData[i], upperSeries, upperCollection.length)), 
                i < length_1 || signalCollection.push(this.getDataPoint(validData[i].x, Number(validData[i].close) / Number(validData[i - length_1].close) * 100, validData[i], signalSeries, signalCollection.length));
                this.setSeriesRange(signalCollection, indicator, indicator.targetSeries[0]), this.setSeriesRange(upperCollection, indicator, indicator.targetSeries[1]);
            }
        }, MomentumIndicator.prototype.destroy = function(chart) {}, MomentumIndicator.prototype.getModuleName = function() {
            return "MomentumIndicator";
        }, MomentumIndicator;
    }(TechnicalAnalysis), __extends$96 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), RsiIndicator = function(_super) {
        function RsiIndicator() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$96(RsiIndicator, _super), RsiIndicator.prototype.initSeriesCollection = function(indicator, chart) {
            if (_super.prototype.initSeriesCollection.call(this, indicator, chart), indicator.showZones) {
                var lowerLine = new Series(indicator, "targetSeries", {}, !0);
                _super.prototype.setSeriesProperties.call(this, lowerLine, indicator, "LowerLine", indicator.lowerLine.color, indicator.lowerLine.width, chart);
                var upperLine = new Series(indicator, "targetSeries", {}, !0);
                _super.prototype.setSeriesProperties.call(this, upperLine, indicator, "UpperLine", indicator.upperLine.color, indicator.upperLine.width, chart);
            }
        }, RsiIndicator.prototype.initDataSource = function(indicator, chart) {
            var signalCollection = [], lowerCollection = [], upperCollection = [], signalSeries = indicator.targetSeries[0], validData = indicator.points;
            if (validData.length && validData.length >= indicator.period) {
                if (indicator.showZones) for (var i = 0; i < validData.length; i++) upperCollection.push(this.getDataPoint(validData[i].x, indicator.overBought, validData[i], indicator.targetSeries[1], upperCollection.length)), 
                lowerCollection.push(this.getDataPoint(validData[i].x, indicator.overSold, validData[i], indicator.targetSeries[2], lowerCollection.length));
                var prevClose = Number(validData[0].close), gain = 0, loss = 0;
                for (i = 1; i <= indicator.period; i++) {
                    var close_1 = Number(validData[i].close);
                    close_1 > prevClose ? gain += close_1 - prevClose : loss += prevClose - close_1, 
                    prevClose = close_1;
                }
                gain /= indicator.period, loss /= indicator.period, signalCollection.push(this.getDataPoint(validData[indicator.period].x, 100 - 100 / (1 + gain / loss), validData[indicator.period], signalSeries, signalCollection.length));
                for (var j = indicator.period + 1; j < validData.length; j++) {
                    var close_2 = Number(validData[j].close);
                    close_2 > prevClose ? (gain = (gain * (indicator.period - 1) + (close_2 - prevClose)) / indicator.period, 
                    loss = loss * (indicator.period - 1) / indicator.period) : close_2 < prevClose && (loss = (loss * (indicator.period - 1) + (prevClose - close_2)) / indicator.period, 
                    gain = gain * (indicator.period - 1) / indicator.period), prevClose = close_2, signalCollection.push(this.getDataPoint(validData[j].x, 100 - 100 / (1 + gain / loss), validData[j], signalSeries, signalCollection.length));
                }
            }
            this.setSeriesRange(signalCollection, indicator, indicator.targetSeries[0]), indicator.showZones && (this.setSeriesRange(upperCollection, indicator, indicator.targetSeries[1]), 
            this.setSeriesRange(lowerCollection, indicator, indicator.targetSeries[2]));
        }, RsiIndicator.prototype.destroy = function(chart) {}, RsiIndicator.prototype.getModuleName = function() {
            return "RsiIndicator";
        }, RsiIndicator;
    }(TechnicalAnalysis), __extends$97 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), StochasticIndicator = function(_super) {
        function StochasticIndicator() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$97(StochasticIndicator, _super), StochasticIndicator.prototype.initSeriesCollection = function(indicator, chart) {
            _super.prototype.initSeriesCollection.call(this, indicator, chart);
            var periodLine = new Series(indicator, "targetSeries", {}, !0);
            if (this.setSeriesProperties(periodLine, indicator, "PeriodLine", indicator.periodLine.color, indicator.periodLine.width, chart), 
            indicator.showZones) {
                var upperSeries = new Series(indicator, "targetSeries", {}, !0);
                this.setSeriesProperties(upperSeries, indicator, "UpperLine", indicator.upperLine.color, indicator.upperLine.width, chart);
                var lowerSeries = new Series(indicator, "targetSeries", {}, !0);
                this.setSeriesProperties(lowerSeries, indicator, "LowerLine", indicator.lowerLine.color, indicator.lowerLine.width, chart);
            }
        }, StochasticIndicator.prototype.initDataSource = function(indicator, chart) {
            var signalCollection = [], upperCollection = [], lowerCollection = [], periodCollection = [], source = [], validData = (indicator.sourceSeries, 
            indicator.points);
            if (validData.length && validData.length >= indicator.period) {
                if (indicator.showZones) for (var i = 0; i < validData.length; i++) upperCollection.push(this.getDataPoint(validData[i].x, indicator.overBought, validData[i], indicator.targetSeries[2], upperCollection.length)), 
                lowerCollection.push(this.getDataPoint(validData[i].x, indicator.overSold, validData[i], indicator.targetSeries[3], lowerCollection.length));
                source = this.calculatePeriod(indicator.period, indicator.kPeriod, validData, indicator.targetSeries[1]), 
                periodCollection = this.smaCalculation(indicator.period, indicator.kPeriod, source, indicator.targetSeries[1]), 
                signalCollection = this.smaCalculation(indicator.period + indicator.kPeriod - 1, indicator.dPeriod, source, indicator.targetSeries[0]);
            }
            this.setSeriesRange(signalCollection, indicator, indicator.targetSeries[0]), this.setSeriesRange(periodCollection, indicator, indicator.targetSeries[1]), 
            indicator.showZones && (this.setSeriesRange(upperCollection, indicator, indicator.targetSeries[2]), 
            this.setSeriesRange(lowerCollection, indicator, indicator.targetSeries[3]));
        }, StochasticIndicator.prototype.smaCalculation = function(period, kPeriod, data, sourceSeries) {
            var pointCollection = [];
            if (data.length >= period + kPeriod) {
                for (var count = period + (kPeriod - 1), temp = [], values = [], i = 0; i < data.length; i++) {
                    var value = Number(data[i].y);
                    temp.push(value);
                }
                for (var length_1 = temp.length; length_1 >= count; ) {
                    var sum = 0;
                    for (i = period - 1; i < period + kPeriod - 1; i++) sum += temp[i];
                    sum /= kPeriod, values.push(sum.toFixed(2)), temp.splice(0, 1), length_1 = temp.length;
                }
                var len = count - 1;
                for (i = 0; i < data.length; i++) i < len || (pointCollection.push(this.getDataPoint(data[i].x, Number(values[i - len]), data[i], sourceSeries, pointCollection.length)), 
                data[i].y = Number(values[i - len]));
            }
            return pointCollection;
        }, StochasticIndicator.prototype.calculatePeriod = function(period, kPeriod, data, series) {
            for (var lowValues = [], highValues = [], closeValues = [], modifiedSource = [], j = 0; j < data.length; j++) lowValues[j] = data[j].low, 
            highValues[j] = data[j].high, closeValues[j] = data[j].close;
            if (data.length > period) {
                for (var mins = [], maxs = [], i = 0; i < period - 1; ++i) maxs.push(0), mins.push(0), 
                modifiedSource.push(this.getDataPoint(data[i].x, data[i].close, data[i], series, modifiedSource.length));
                for (i = period - 1; i < data.length; ++i) {
                    var min = Number.MAX_VALUE, max = Number.MIN_VALUE;
                    for (j = 0; j < period; ++j) min = Math.min(min, lowValues[i - j]), max = Math.max(max, highValues[i - j]);
                    maxs.push(max), mins.push(min);
                }
                for (i = period - 1; i < data.length; ++i) {
                    var top_1 = 0, bottom = 0;
                    top_1 += closeValues[i] - mins[i], bottom += maxs[i] - mins[i], modifiedSource.push(this.getDataPoint(data[i].x, top_1 / bottom * 100, data[i], series, modifiedSource.length));
                }
            }
            return modifiedSource;
        }, StochasticIndicator.prototype.destroy = function(chart) {}, StochasticIndicator.prototype.getModuleName = function() {
            return "StochasticIndicator";
        }, StochasticIndicator;
    }(TechnicalAnalysis), __extends$98 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), BollingerBands = function(_super) {
        function BollingerBands() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$98(BollingerBands, _super), BollingerBands.prototype.initSeriesCollection = function(indicator, chart) {
            indicator.targetSeries = [];
            var rangeArea = new Series(indicator, "targetSeries", {}, !0);
            rangeArea.type = "RangeArea", "transparent" !== indicator.bandColor && "none" !== indicator.bandColor && this.setSeriesProperties(rangeArea, indicator, "BollingerBand", indicator.bandColor, 0, chart);
            var signalLine = new Series(indicator, "targetSeries", {}, !0);
            this.setSeriesProperties(signalLine, indicator, "SignalLine", indicator.fill, indicator.width, chart);
            var upperLine = new Series(indicator, "targetSeries", {}, !0);
            this.setSeriesProperties(upperLine, indicator, "UpperLine", indicator.upperLine.color, indicator.upperLine.width, chart);
            var lowerLine = new Series(indicator, "targetSeries", {}, !0);
            this.setSeriesProperties(lowerLine, indicator, "LowerLine", indicator.lowerLine.color, indicator.lowerLine.width, chart);
        }, BollingerBands.prototype.initDataSource = function(indicator, chart) {
            var enableBand = "transparent" !== indicator.bandColor && "none" !== indicator.bandColor, start = enableBand ? 1 : 0, signalCollection = [], upperCollection = [], lowerCollection = [], bandCollection = [], upperSeries = indicator.targetSeries[start + 1], lowerSeries = indicator.targetSeries[start + 2], signalSeries = indicator.targetSeries[start], rangeAreaSeries = enableBand ? indicator.targetSeries[0] : null, validData = indicator.points;
            if (validData.length && validData.length >= indicator.period) {
                for (var sum = 0, deviationSum = 0, multiplier = indicator.standardDeviation, limit = validData.length, length_1 = Math.round(indicator.period), smaPoints = [], deviations = [], bollingerPoints = [], i_1 = 0; i_1 < length_1; i_1++) sum += Number(validData[i_1].close);
                for (var sma = sum / indicator.period, i_2 = 0; i_2 < limit; i_2++) {
                    var y = Number(validData[i_2].close);
                    if (i_2 >= length_1 - 1 && i_2 < limit) {
                        if (i_2 - indicator.period >= 0) {
                            sma = (sum += y - Number(validData[i_2 - length_1].close)) / indicator.period, smaPoints[i_2] = sma, 
                            deviations[i_2] = Math.pow(y - sma, 2), deviationSum += deviations[i_2] - deviations[i_2 - length_1];
                        } else smaPoints[i_2] = sma, deviations[i_2] = Math.pow(y - sma, 2), deviationSum += deviations[i_2];
                        var range = Math.sqrt(deviationSum / indicator.period), lowerBand = smaPoints[i_2] - multiplier * range, upperBand = smaPoints[i_2] + multiplier * range;
                        if (i_2 + 1 === length_1) for (var j_1 = 0; j_1 < length_1 - 1; j_1++) bollingerPoints[j_1] = {
                            X: validData[j_1].x,
                            mb: smaPoints[i_2],
                            lb: lowerBand,
                            ub: upperBand,
                            visible: !0
                        };
                        bollingerPoints[i_2] = {
                            X: validData[i_2].x,
                            mb: smaPoints[i_2],
                            lb: lowerBand,
                            ub: upperBand,
                            visible: !0
                        };
                    } else i_2 < indicator.period - 1 && (smaPoints[i_2] = sma, deviations[i_2] = Math.pow(y - sma, 2), 
                    deviationSum += deviations[i_2]);
                }
                for (var i = -1, j = -1, k = 0; k < limit; k++) if (k >= length_1 - 1) {
                    upperCollection.push(this.getDataPoint(validData[k].x, bollingerPoints[k].ub, validData[k], upperSeries, upperCollection.length)), 
                    lowerCollection.push(this.getDataPoint(validData[k].x, bollingerPoints[k].lb, validData[k], lowerSeries, lowerCollection.length)), 
                    signalCollection.push(this.getDataPoint(validData[k].x, bollingerPoints[k].mb, validData[k], signalSeries, signalCollection.length)), 
                    enableBand && bandCollection.push(this.getRangePoint(validData[k].x, upperCollection[++i].y, lowerCollection[++j].y, validData[k], rangeAreaSeries, bandCollection.length));
                }
            }
            enableBand && this.setSeriesRange(bandCollection, indicator, indicator.targetSeries[0]), 
            this.setSeriesRange(signalCollection, indicator, indicator.targetSeries[start]), 
            this.setSeriesRange(upperCollection, indicator, indicator.targetSeries[start + 1]), 
            this.setSeriesRange(lowerCollection, indicator, indicator.targetSeries[start + 2]);
        }, BollingerBands.prototype.destroy = function(chart) {}, BollingerBands.prototype.getModuleName = function() {
            return "BollingerBandsIndicator";
        }, BollingerBands;
    }(TechnicalAnalysis), __extends$99 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), MacdIndicator = function(_super) {
        function MacdIndicator() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$99(MacdIndicator, _super), MacdIndicator.prototype.initSeriesCollection = function(indicator, chart) {
            if (_super.prototype.initSeriesCollection.call(this, indicator, chart), "Line" === indicator.macdType || "Both" === indicator.macdType) {
                var macdSeries = new Series(indicator, "targetSeries", {}, !0);
                this.setSeriesProperties(macdSeries, indicator, "MacdLine", indicator.macdLine.color, indicator.macdLine.width, chart);
            }
            if ("Histogram" === indicator.macdType || "Both" === indicator.macdType) {
                var histogramSeries = new Series(indicator, "targetSeries", {}, !0);
                histogramSeries.type = "Column", this.setSeriesProperties(histogramSeries, indicator, "Histogram", indicator.macdPositiveColor, indicator.width, chart);
            }
        }, MacdIndicator.prototype.initDataSource = function(indicator, chart) {
            var histogramSeries, macdLineSeries, signalCollection = [], fastPeriod = indicator.fastPeriod, slowPeriod = indicator.slowPeriod, trigger = indicator.period, length = fastPeriod + trigger, macdCollection = [], histogramCollection = [], validData = indicator.points, signalSeries = indicator.targetSeries[0];
            if ("Histogram" === indicator.macdType ? histogramSeries = indicator.targetSeries[1] : (macdLineSeries = indicator.targetSeries[1], 
            "Both" === indicator.macdType && (histogramSeries = indicator.targetSeries[2])), 
            validData && length < validData.length && slowPeriod <= fastPeriod && slowPeriod > 0 && length - 2 >= 0) {
                var shortEMA = this.calculateEMAValues(slowPeriod, validData, "close"), longEMA = this.calculateEMAValues(fastPeriod, validData, "close"), macdValues = this.getMACDVales(indicator, shortEMA, longEMA);
                macdCollection = this.getMACDPoints(indicator, macdValues, validData, macdLineSeries || signalSeries);
                var signalEMA = this.calculateEMAValues(trigger, macdCollection, "y");
                signalCollection = this.getSignalPoints(indicator, signalEMA, validData, signalSeries), 
                histogramSeries && (histogramCollection = this.getHistogramPoints(indicator, macdValues, signalEMA, validData, histogramSeries));
            }
            this.setSeriesRange(signalCollection, indicator, indicator.targetSeries[0]), histogramSeries && this.setSeriesRange(histogramCollection, indicator, histogramSeries), 
            macdLineSeries && this.setSeriesRange(macdCollection, indicator, macdLineSeries);
        }, MacdIndicator.prototype.calculateEMAValues = function(period, validData, field) {
            for (var sum = 0, initialEMA = 0, emaValues = [], emaPercent = 2 / (period + 1), i = 0; i < period; i++) sum += Number(validData[i][field]);
            initialEMA = sum / period, emaValues.push(initialEMA);
            for (var emaAvg = initialEMA, j = period; j < validData.length; j++) emaAvg = (Number(validData[j][field]) - emaAvg) * emaPercent + emaAvg, 
            emaValues.push(emaAvg);
            return emaValues;
        }, MacdIndicator.prototype.getMACDPoints = function(indicator, macdPoints, validData, series) {
            for (var macdCollection = [], dataMACDIndex = indicator.fastPeriod - 1, macdIndex = 0; dataMACDIndex < validData.length; ) macdCollection.push(this.getDataPoint(validData[dataMACDIndex].x, macdPoints[macdIndex], validData[dataMACDIndex], series, macdCollection.length)), 
            dataMACDIndex++, macdIndex++;
            return macdCollection;
        }, MacdIndicator.prototype.getSignalPoints = function(indicator, signalEma, validData, series) {
            for (var dataSignalIndex = indicator.fastPeriod + indicator.period - 2, signalIndex = 0, signalCollection = []; dataSignalIndex < validData.length; ) signalCollection.push(this.getDataPoint(validData[dataSignalIndex].x, signalEma[signalIndex], validData[dataSignalIndex], series, signalCollection.length)), 
            dataSignalIndex++, signalIndex++;
            return signalCollection;
        }, MacdIndicator.prototype.getMACDVales = function(indicator, shortEma, longEma) {
            for (var macdPoints = [], diff = indicator.fastPeriod - indicator.slowPeriod, i = 0; i < longEma.length; i++) macdPoints.push(shortEma[i + diff] - longEma[i]);
            return macdPoints;
        }, MacdIndicator.prototype.getHistogramPoints = function(indicator, macdPoints, signalEma, validData, series) {
            for (var dataHistogramIndex = indicator.fastPeriod + indicator.period - 2, histogramIndex = 0, histogramCollection = []; dataHistogramIndex < validData.length; ) histogramCollection.push(this.getDataPoint(validData[dataHistogramIndex].x, macdPoints[histogramIndex + (indicator.period - 1)] - signalEma[histogramIndex], validData[dataHistogramIndex], series, histogramCollection.length, indicator)), 
            dataHistogramIndex++, histogramIndex++;
            return histogramCollection;
        }, MacdIndicator.prototype.destroy = function(chart) {}, MacdIndicator.prototype.getModuleName = function() {
            return "MacdIndicator";
        }, MacdIndicator;
    }(TechnicalAnalysis), Trendlines = function() {
        function Trendlines() {}
        return Trendlines.prototype.initSeriesCollection = function(trendline, chart) {
            var trendLineSeries = new Series(trendline, "targetSeries", {}, !0);
            "Linear" === trendline.type || "MovingAverage" === trendline.type ? trendLineSeries.type = "Line" : trendLineSeries.type = "Spline", 
            this.setSeriesProperties(trendLineSeries, trendline, trendline.type, trendline.fill, trendline.width, chart);
        }, Trendlines.prototype.setSeriesProperties = function(series, trendline, name, fill, width, chart) {
            series.name = trendline.name, series.xName = "x", series.yName = "y", series.fill = fill || "blue", 
            series.width = width, series.clipRectElement = trendline.clipRectElement, series.points = [], 
            series.enableTooltip = trendline.enableTooltip, series.index = trendline.index, 
            series.sourceIndex = trendline.sourceIndex, series.interior = series.fill, series.animation = trendline.animation, 
            series.legendShape = "HorizontalLine", series.marker = trendline.marker, series.category = "TrendLine", 
            series.chart = chart, series.xMin = 1 / 0, series.xMax = -1 / 0, series.yMin = 1 / 0, 
            series.yMax = -1 / 0, series.xData = [], series.yData = [], trendline.targetSeries = series;
        }, Trendlines.prototype.createTrendLineElements = function(chart, trendline, index, element, clipRectElement) {
            trendline.trendLineElement = element, trendline.targetSeries.clipRectElement = clipRectElement, 
            trendline.targetSeries.seriesElement = element, chart.trendLineElements.appendChild(trendline.trendLineElement);
        }, Trendlines.prototype.getDataPoint = function(x, y, sourcePoint, series, index) {
            var trendPoint = new Points();
            return trendPoint.x = x, trendPoint.y = y, trendPoint.xValue = Number(x), trendPoint.color = series.fill, 
            trendPoint.index = index, trendPoint.yValue = Number(y), trendPoint.visible = !0, 
            series.xMin = Math.min(series.xMin, trendPoint.xValue), series.yMin = Math.min(series.yMin, trendPoint.yValue), 
            series.xMax = Math.max(series.xMax, trendPoint.xValue), series.yMax = Math.max(series.yMax, trendPoint.yValue), 
            series.xData.push(trendPoint.xValue), trendPoint;
        }, Trendlines.prototype.findSlopeIntercept = function(xValues, yValues, trendline, points) {
            for (var xAvg = 0, yAvg = 0, xyAvg = 0, xxAvg = 0, yyAvg = 0, index = 0, slope = 0, intercept = 0; index < points.length; ) xAvg += xValues[index], 
            yAvg += yValues[index], xyAvg += xValues[index] * yValues[index], xxAvg += xValues[index] * xValues[index], 
            yyAvg += yValues[index] * yValues[index], index++;
            var type = trendline.type;
            if (!trendline.intercept || "Linear" !== type && "Exponential" !== type) slope = (points.length * xyAvg - xAvg * yAvg) / (points.length * xxAvg - xAvg * xAvg), 
            intercept = "Exponential" === type || "Power" === type ? Math.exp((yAvg - slope * xAvg) / points.length) : (yAvg - slope * xAvg) / points.length; else switch (intercept = trendline.intercept, 
            type) {
              case "Linear":
                slope = (xyAvg - trendline.intercept * xAvg) / xxAvg;
                break;

              case "Exponential":
                slope = (xyAvg - Math.log(Math.abs(trendline.intercept)) * xAvg) / xxAvg;
            }
            return {
                slope: slope,
                intercept: intercept
            };
        }, Trendlines.prototype.initDataSource = function(trendline, chart) {
            var points = trendline.points;
            if (points && points.length) {
                var trendlineSeries = trendline.targetSeries;
                switch (trendline.type) {
                  case "Linear":
                    this.setLinearRange(points, trendline, trendlineSeries);
                    break;

                  case "Exponential":
                    this.setExponentialRange(points, trendline, trendlineSeries);
                    break;

                  case "MovingAverage":
                    this.setMovingAverageRange(points, trendline, trendlineSeries);
                    break;

                  case "Polynomial":
                    this.setPolynomialRange(points, trendline, trendlineSeries);
                    break;

                  case "Power":
                    this.setPowerRange(points, trendline, trendlineSeries);
                    break;

                  case "Logarithmic":
                    this.setLogarithmicRange(points, trendline, trendlineSeries);
                }
                "Linear" !== trendline.type && "MovingAverage" !== trendline.type && trendlineSeries.chart.splineSeriesModule.findSplinePoint(trendlineSeries);
            }
        }, Trendlines.prototype.setExponentialRange = function(points, trendline, series) {
            for (var slopeIntercept, xValue = [], yValue = [], index = 0; index < points.length; ) {
                var point = points[index];
                xValue.push(point.xValue), yValue.push(Math.log(point.yValue)), index++;
            }
            slopeIntercept = this.findSlopeIntercept(xValue, yValue, trendline, points), series.points = this.getExponentialPoints(trendline, points, xValue, yValue, series, slopeIntercept);
        }, Trendlines.prototype.setLogarithmicRange = function(points, trendline, series) {
            for (var slopeIntercept, xLogValue = [], yLogValue = [], xPointsLgr = [], index = 0; index < points.length; ) {
                var point = points[index];
                xPointsLgr.push(point.xValue), xLogValue.push(Math.log(point.xValue)), yLogValue.push(point.yValue), 
                index++;
            }
            slopeIntercept = this.findSlopeIntercept(xLogValue, yLogValue, trendline, points), 
            series.points = this.getLogarithmicPoints(trendline, points, xPointsLgr, yLogValue, series, slopeIntercept);
        }, Trendlines.prototype.setPolynomialRange = function(points, trendline, series) {
            for (var xPolyValues = [], yPolyValues = [], index = 0; index < points.length; ) {
                var point = points[index];
                xPolyValues.push(point.xValue), yPolyValues.push(point.yValue), index++;
            }
            series.points = this.getPolynomialPoints(trendline, points, xPolyValues, yPolyValues, series);
        }, Trendlines.prototype.setPowerRange = function(points, trendline, series) {
            for (var slopeIntercept, xValues = [], yValues = [], powerPoints = [], index = 0; index < points.length; ) {
                var point = points[index];
                powerPoints.push(point.xValue), xValues.push(Math.log(point.xValue)), yValues.push(Math.log(point.yValue)), 
                index++;
            }
            slopeIntercept = this.findSlopeIntercept(xValues, yValues, trendline, points), series.points = this.getPowerPoints(trendline, points, powerPoints, yValues, series, slopeIntercept);
        }, Trendlines.prototype.setLinearRange = function(points, trendline, series) {
            for (var slopeIntercept, xValues = [], yValues = [], index = 0; index < points.length; ) {
                var point = points[index];
                xValues.push(point.xValue), yValues.push(point.yValue), index++;
            }
            slopeIntercept = this.findSlopeIntercept(xValues, yValues, trendline, points), series.points = this.getLinearPoints(trendline, points, xValues, yValues, series, slopeIntercept);
        }, Trendlines.prototype.setMovingAverageRange = function(points, trendline, series) {
            for (var xValues = [], yValues = [], xAvgValues = [], index = 0; index < points.length; ) {
                var point = points[index];
                xAvgValues.push(point.xValue), xValues.push(index + 1), yValues.push(point.yValue), 
                index++;
            }
            series.points = this.getMovingAveragePoints(trendline, points, xAvgValues, yValues, series);
        }, Trendlines.prototype.getLogarithmicPoints = function(trendline, points, xValues, yValues, series, slopeInterceptLog) {
            var midPoint = Math.round(points.length / 2), pts = [], x1Log = xValues[0] - trendline.backwardForecast, y1Log = slopeInterceptLog.intercept + slopeInterceptLog.slope * Math.log(x1Log), x2Log = xValues[midPoint - 1], y2Log = slopeInterceptLog.intercept + slopeInterceptLog.slope * Math.log(x2Log), x3Log = xValues[xValues.length - 1] + trendline.forwardForecast, y3Log = slopeInterceptLog.intercept + slopeInterceptLog.slope * Math.log(x3Log);
            return pts.push(this.getDataPoint(x1Log, y1Log, points[0], series, pts.length)), 
            pts.push(this.getDataPoint(x2Log, y2Log, points[midPoint - 1], series, pts.length)), 
            pts.push(this.getDataPoint(x3Log, y3Log, points[points.length - 1], series, pts.length)), 
            pts;
        }, Trendlines.prototype.getPowerPoints = function(trendline, points, xValues, yValues, series, slopeInterceptPower) {
            var midPoint = Math.round(points.length / 2), pts = [], x1 = xValues[0] - trendline.backwardForecast;
            x1 = x1 > -1 ? x1 : 0;
            var y1 = slopeInterceptPower.intercept * Math.pow(x1, slopeInterceptPower.slope), x2 = xValues[midPoint - 1], y2 = slopeInterceptPower.intercept * Math.pow(x2, slopeInterceptPower.slope), x3 = xValues[xValues.length - 1] + trendline.forwardForecast, y3 = slopeInterceptPower.intercept * Math.pow(x3, slopeInterceptPower.slope);
            return pts.push(this.getDataPoint(x1, y1, points[0], series, pts.length)), pts.push(this.getDataPoint(x2, y2, points[midPoint - 1], series, pts.length)), 
            pts.push(this.getDataPoint(x3, y3, points[points.length - 1], series, pts.length)), 
            pts;
        }, Trendlines.prototype.getPolynomialPoints = function(trendline, points, xValues, yValues, series) {
            Math.round(points.length / 2);
            var polynomialOrder = points.length <= trendline.polynomialOrder ? points.length : trendline.polynomialOrder;
            polynomialOrder = Math.max(2, polynomialOrder), polynomialOrder = Math.min(6, polynomialOrder), 
            trendline.polynomialOrder = polynomialOrder, trendline.polynomialSlopes = [], trendline.polynomialSlopes.length = trendline.polynomialOrder + 1;
            for (var index = 0; index < xValues.length; ) {
                for (var xVal = xValues[index], yVal = yValues[index], subIndex = 0; subIndex <= trendline.polynomialOrder; ) trendline.polynomialSlopes[subIndex] || (trendline.polynomialSlopes[subIndex] = 0), 
                trendline.polynomialSlopes[subIndex] += Math.pow(xVal, subIndex) * yVal, ++subIndex;
                index++;
            }
            var numArray = [];
            numArray.length = 1 + 2 * trendline.polynomialOrder;
            var matrix = [];
            matrix.length = trendline.polynomialOrder + 1;
            for (var newIndex = 0; newIndex < trendline.polynomialOrder + 1; ) matrix[newIndex] = [], 
            matrix[newIndex].length = 3, newIndex++;
            for (var nIndex = 0; nIndex < xValues.length; ) {
                for (var d = xValues[nIndex], num2 = 1, nIndex2 = 0; nIndex2 < numArray.length; ) numArray[nIndex2] || (numArray[nIndex2] = 0), 
                numArray[nIndex2] += num2, num2 *= d, ++nIndex2;
                ++nIndex;
            }
            for (var nnIndex = 0; nnIndex <= trendline.polynomialOrder; ) {
                for (var nnIndex2 = 0; nnIndex2 <= trendline.polynomialOrder; ) matrix[nnIndex][nnIndex2] = numArray[nnIndex + nnIndex2], 
                ++nnIndex2;
                ++nnIndex;
            }
            return this.gaussJordanElimination(matrix, trendline.polynomialSlopes) || (trendline.polynomialSlopes = null), 
            this.getPoints(trendline, points, xValues, yValues, series);
        }, Trendlines.prototype.getMovingAveragePoints = function(trendline, points, xValues, yValues, series) {
            var pts = [], period = trendline.period >= points.length ? points.length - 1 : trendline.period;
            period = Math.max(2, period);
            for (var y, x, count, nullCount, index = 0; index < points.length - 1; ) {
                y = count = nullCount = 0;
                for (var j = index; count < period; j++) count++, yValues[j] || nullCount++, y += yValues[j];
                (y = period - nullCount <= 0 ? null : y / (period - nullCount)) && !isNaN(y) && (x = xValues[period - 1 + index], 
                pts.push(this.getDataPoint(x, y, points[period - 1 + index], series, pts.length))), 
                index++;
            }
            return pts;
        }, Trendlines.prototype.getLinearPoints = function(trendline, points, xValues, yValues, series, slopeInterceptLinear) {
            var pts = [], x1Linear = xValues[0] - trendline.backwardForecast, y1Linear = slopeInterceptLinear.slope * x1Linear + slopeInterceptLinear.intercept, x2Linear = xValues[xValues.length - 1] + trendline.forwardForecast, y2Linear = slopeInterceptLinear.slope * x2Linear + slopeInterceptLinear.intercept;
            return pts.push(this.getDataPoint(x1Linear, y1Linear, points[0], series, pts.length)), 
            pts.push(this.getDataPoint(x2Linear, y2Linear, points[points.length - 1], series, pts.length)), 
            pts;
        }, Trendlines.prototype.getExponentialPoints = function(trendline, points, xValues, yValues, series, slopeInterceptExp) {
            var midPoint = Math.round(points.length / 2), ptsExp = [], x1 = xValues[0] - trendline.backwardForecast, y1 = slopeInterceptExp.intercept * Math.exp(slopeInterceptExp.slope * x1), x2 = xValues[midPoint - 1], y2 = slopeInterceptExp.intercept * Math.exp(slopeInterceptExp.slope * x2), x3 = xValues[xValues.length - 1] + trendline.forwardForecast, y3 = slopeInterceptExp.intercept * Math.exp(slopeInterceptExp.slope * x3);
            return ptsExp.push(this.getDataPoint(x1, y1, points[0], series, ptsExp.length)), 
            ptsExp.push(this.getDataPoint(x2, y2, points[midPoint - 1], series, ptsExp.length)), 
            ptsExp.push(this.getDataPoint(x3, y3, points[points.length - 1], series, ptsExp.length)), 
            ptsExp;
        }, Trendlines.prototype.getPoints = function(trendline, points, xValues, yValues, series) {
            Math.round(points.length / 2);
            for (var xValue, yValue, polynomialSlopes = trendline.polynomialSlopes, pts = [], x1 = 1, index = 1; index <= polynomialSlopes.length; ) 1 === index ? (xValue = xValues[0] - trendline.backwardForecast, 
            yValue = this.getPolynomialYValue(polynomialSlopes, xValue), pts.push(this.getDataPoint(xValue, yValue, points[0], series, pts.length))) : index === polynomialSlopes.length ? (xValue = xValues[points.length - 1] + trendline.forwardForecast, 
            yValue = this.getPolynomialYValue(polynomialSlopes, xValue), pts.push(this.getDataPoint(xValue, yValue, points[points.length - 1], series, pts.length))) : (x1 += (points.length + trendline.forwardForecast) / polynomialSlopes.length, 
            xValue = xValues[parseInt(x1.toString(), 10) - 1], yValue = this.getPolynomialYValue(polynomialSlopes, xValue), 
            pts.push(this.getDataPoint(xValue, yValue, points[parseInt(x1.toString(), 10) - 1], series, pts.length))), 
            index++;
            return pts;
        }, Trendlines.prototype.getPolynomialYValue = function(slopes, x) {
            for (var sum$$1 = 0, index = 0; index < slopes.length; ) sum$$1 += slopes[index] * Math.pow(x, index), 
            index++;
            return sum$$1;
        }, Trendlines.prototype.gaussJordanElimination = function(matrix, polynomialSlopes) {
            var length = matrix.length, numArray1 = [], numArray2 = [], numArray3 = [];
            numArray1.length = length, numArray2.length = length, numArray3.length = length;
            for (var index = 0; index < length; ) numArray3[index] = 0, ++index;
            for (var index1 = 0; index1 < length; ) {
                for (var num1 = 0, index2 = 0, index3 = 0, index4 = 0; index4 < length; ) {
                    if (1 !== numArray3[index4]) for (var index5 = 0; index5 < length; ) 0 === numArray3[index5] && Math.abs(matrix[index4][index5]) >= num1 && (num1 = Math.abs(matrix[index4][index5]), 
                    index2 = index4, index3 = index5), ++index5;
                    ++index4;
                }
                if (++numArray3[index3], index2 !== index3) {
                    for (var index4_1 = 0; index4_1 < length; ) {
                        var num2 = matrix[index2][index4_1];
                        matrix[index2][index4_1] = matrix[index3][index4_1], matrix[index3][index4_1] = num2, 
                        ++index4_1;
                    }
                    var num3 = polynomialSlopes[index2];
                    polynomialSlopes[index2] = polynomialSlopes[index3], polynomialSlopes[index3] = num3;
                }
                if (numArray2[index1] = index2, numArray1[index1] = index3, 0 === matrix[index3][index3]) return !1;
                var num4 = 1 / matrix[index3][index3];
                matrix[index3][index3] = 1;
                for (var iindex4 = 0; iindex4 < length; ) matrix[index3][iindex4] *= num4, ++iindex4;
                polynomialSlopes[index3] *= num4;
                for (var iandex4 = 0; iandex4 < length; ) {
                    if (iandex4 !== index3) {
                        num2 = matrix[iandex4][index3];
                        matrix[iandex4][index3] = 0;
                        for (index5 = 0; index5 < length; ) matrix[iandex4][index5] -= matrix[index3][index5] * num2, 
                        ++index5;
                        polynomialSlopes[iandex4] -= polynomialSlopes[index3] * num2;
                    }
                    ++iandex4;
                }
                ++index1;
            }
            for (var iindex1 = length - 1; iindex1 >= 0; ) {
                if (numArray2[iindex1] !== numArray1[iindex1]) for (var iindex2 = 0; iindex2 < length; ) {
                    var num = matrix[iindex2][numArray2[iindex1]];
                    matrix[iindex2][numArray2[iindex1]] = matrix[iindex2][numArray1[iindex1]], matrix[iindex2][numArray1[iindex1]] = num, 
                    ++iindex2;
                }
                --iindex1;
            }
            return !0;
        }, Trendlines.prototype.getTrendLineElements = function(series, chart) {
            findClipRect(series);
            var element, clipRect = series.clipRect, clipRectElement = chart.renderer.drawClipPath(new RectOption(chart.element.id + "_ChartTrendlineClipRect_" + series.index, "transparent", {
                width: 1,
                color: "Gray"
            }, 1, {
                x: 0,
                y: 0,
                width: clipRect.width,
                height: clipRect.height
            }));
            (element = chart.renderer.createGroup({
                id: chart.element.id + "TrendlineSeriesGroup" + series.index,
                transform: "translate(" + clipRect.x + "," + clipRect.y + ")",
                "clip-path": "url(#" + chart.element.id + "_ChartTrendlineClipRect_" + series.index + ")"
            })).appendChild(clipRectElement);
            for (var _i = 0, _a = series.trendlines; _i < _a.length; _i++) {
                var trendline = _a[_i];
                this.createTrendLineElements(chart, trendline, trendline.index, element, clipRectElement);
            }
        }, Trendlines.prototype.destroy = function(chart) {}, Trendlines.prototype.getModuleName = function() {
            return "TrendLine";
        }, Trendlines;
    }(), Crosshair = function() {
        function Crosshair(chart) {
            this.arrowLocation = new ChartLocation(0, 0), this.rx = 2, this.ry = 2, this.chart = chart, 
            this.elementID = this.chart.element.id, this.addEventListener();
        }
        return Crosshair.prototype.addEventListener = function() {
            if (!this.chart.isDestroyed) {
                var cancelEvent = Browser.isPointer ? "pointerleave" : "mouseleave";
                this.chart.on(Browser.touchMoveEvent, this.mouseMoveHandler, this), this.chart.on(Browser.touchEndEvent, this.mouseUpHandler, this), 
                this.chart.on(cancelEvent, this.mouseLeaveHandler, this), this.chart.on("tapHold", this.longPress, this);
            }
        }, Crosshair.prototype.mouseUpHandler = function() {
            this.chart.startMove && this.removeCrosshair(2e3);
        }, Crosshair.prototype.mouseLeaveHandler = function() {
            this.removeCrosshair(1e3);
        }, Crosshair.prototype.mouseMoveHandler = function(event) {
            var chart = this.chart;
            "touchmove" === event.type && (Browser.isIos || Browser.isIos7) && chart.startMove && event.preventDefault && event.preventDefault(), 
            chart.disableTrackTooltip || (withInBounds(chart.mouseX, chart.mouseY, chart.chartAxisLayoutPanel.seriesClipRect) ? !chart.startMove && chart.isTouch || this.crosshair() : this.removeCrosshair(1e3));
        }, Crosshair.prototype.longPress = function() {
            var chart = this.chart;
            return withInBounds(chart.mouseX, chart.mouseY, chart.chartAxisLayoutPanel.seriesClipRect) && this.crosshair(), 
            !1;
        }, Crosshair.prototype.crosshair = function() {
            var options, chart = this.chart, horizontalCross = "", verticalCross = "", crosshair = chart.crosshair, chartRect = chart.chartAxisLayoutPanel.seriesClipRect, crossGroup = document.getElementById(this.elementID + "_UserInteraction");
            if (this.stopAnimation(), chart.tooltip.enable && !withInBounds(chart.tooltipModule.valueX, chart.tooltipModule.valueY, chartRect)) return null;
            if (this.valueX = chart.tooltip.enable ? chart.tooltipModule.valueX : chart.mouseX, 
            this.valueY = chart.tooltip.enable ? chart.tooltipModule.valueY : chart.mouseY, 
            crossGroup.setAttribute("opacity", "1"), "Both" !== crosshair.lineType && "Horizontal" !== crosshair.lineType || (horizontalCross += "M " + chartRect.x + " " + this.valueY + " L " + (chartRect.x + chartRect.width) + " " + this.valueY), 
            "Both" !== crosshair.lineType && "Vertical" !== crosshair.lineType || (verticalCross += "M " + this.valueX + " " + chartRect.y + " L " + this.valueX + " " + (chartRect.y + chartRect.height)), 
            0 === crossGroup.childNodes.length) {
                var axisTooltipGroup = chart.renderer.createGroup({
                    id: this.elementID + "_crosshair_axis"
                });
                options = new PathOption(this.elementID + "_HorizontalLine", "none", crosshair.line.width, crosshair.line.color || chart.themeStyle.crosshairLine, 1, null, horizontalCross), 
                this.renderCrosshairLine(options, crossGroup), options.d = verticalCross, options.id = this.elementID + "_VerticalLine", 
                this.renderCrosshairLine(options, crossGroup), crossGroup.appendChild(axisTooltipGroup), 
                this.renderAxisTooltip(chart, chartRect, crossGroup.lastChild);
            } else document.getElementById(this.elementID + "_HorizontalLine").setAttribute("d", horizontalCross), 
            document.getElementById(this.elementID + "_VerticalLine").setAttribute("d", verticalCross), 
            this.renderAxisTooltip(chart, chartRect, crossGroup.lastChild);
        }, Crosshair.prototype.renderCrosshairLine = function(options, crossGroup) {
            var htmlObject = this.chart.renderer.drawPath(options);
            crossGroup.appendChild(htmlObject);
        }, Crosshair.prototype.renderAxisTooltip = function(chart, chartRect, axisGroup) {
            for (var axis, text, rect, pathElement, textElem, direction, axisRect, k = 0, length_1 = chart.axisCollections.length; k < length_1; k++) if (axis = chart.axisCollections[k], 
            axisRect = axis.placeNextToAxisLine ? axis.updatedRect : axis.rect, axis.crosshairTooltip.enable) if (this.valueX <= axisRect.x + axisRect.width && axisRect.x <= this.valueX || this.valueY <= axisRect.y + axisRect.height && axisRect.y <= this.valueY) {
                if (pathElement = document.getElementById(this.elementID + "_axis_tooltip_" + k), 
                textElem = document.getElementById(this.elementID + "_axis_tooltip_text_" + k), 
                !(text = this.getAxisText(axis))) continue;
                rect = this.tooltipLocation(text, axis, chartRect, axisRect), null === pathElement && (pathElement = chart.renderer.drawPath({
                    id: this.elementID + "_axis_tooltip_" + k,
                    fill: axis.crosshairTooltip.fill || chart.themeStyle.crosshairFill
                }), axisGroup.appendChild(pathElement), textElem = textElement(new TextOption(this.elementID + "_axis_tooltip_text_" + k, 0, 0, "start", text), axis.crosshairTooltip.textStyle, axis.crosshairTooltip.textStyle.color || chart.themeStyle.crosshairLabel, axisGroup)), 
                direction = findDirection(this.rx, this.ry, rect, this.arrowLocation, 10, this.isTop, this.isBottom, this.isLeft, this.valueX, this.valueY), 
                pathElement.setAttribute("d", direction), textElem.textContent = text, textElem.setAttribute("x", (rect.x + 5).toString()), 
                textElem.setAttribute("y", (rect.y + 5 + 3 * this.elementSize.height / 4).toString());
            } else removeElement$1(this.elementID + "_axis_tooltip_" + k), removeElement$1(this.elementID + "_axis_tooltip_text_" + k);
        }, Crosshair.prototype.getAxisText = function(axis) {
            var value;
            this.isBottom = !1, this.isTop = !1, this.isLeft = !1, this.isRight = !1;
            var labelValue = "Category" === axis.valueType && "BetweenTicks" === axis.labelPlacement ? .5 : 0;
            if ("Horizontal" === axis.orientation ? (value = getValueXByPoint(Math.abs(this.valueX - axis.rect.x), axis.rect.width, axis) + labelValue, 
            this.isBottom = !axis.opposedPosition, this.isTop = axis.opposedPosition) : (value = getValueYByPoint(Math.abs(this.valueY - axis.rect.y), axis.rect.height, axis) + labelValue, 
            this.isRight = axis.opposedPosition, this.isLeft = !axis.opposedPosition), "DateTime" === axis.valueType) return axis.format(new Date(value));
            if ("Category" === axis.valueType) return axis.labels[Math.floor(value)];
            if ("Logarithmic" === axis.valueType) return value = axis.format(Math.pow(axis.logBase, value));
            return axis.labelFormat && null !== axis.labelFormat.match("{value}") ? axis.labelFormat.replace("{value}", axis.format(value)) : axis.format(value);
        }, Crosshair.prototype.tooltipLocation = function(text, axis, bounds, axisRect) {
            var tooltipRect, boundsX = bounds.x, boundsY = bounds.y, islabelInside = "Inside" === axis.labelPosition;
            if (this.elementSize = measureText(text, axis.crosshairTooltip.textStyle), "Horizontal" === axis.orientation) {
                var yLocation = islabelInside ? axisRect.y - this.elementSize.height - 20 : axisRect.y, height = islabelInside ? axisRect.y - this.elementSize.height - 10 : axisRect.y + 10;
                this.arrowLocation = new ChartLocation(this.valueX, yLocation), tooltipRect = new Rect(this.valueX - this.elementSize.width / 2 - 5, height, this.elementSize.width + 10, this.elementSize.height + 10), 
                axis.opposedPosition && (tooltipRect.y = islabelInside ? axisRect.y : axisRect.y - (this.elementSize.height + 10 + 10)), 
                tooltipRect.x < boundsX && (tooltipRect.x = boundsX), tooltipRect.x + tooltipRect.width > boundsX + bounds.width && (tooltipRect.x -= tooltipRect.x + tooltipRect.width - (boundsX + bounds.width)), 
                this.arrowLocation.x + 5 > tooltipRect.x + tooltipRect.width - this.rx && (this.arrowLocation.x = tooltipRect.x + tooltipRect.width - this.rx - 5), 
                this.arrowLocation.x - 5 < tooltipRect.x + this.rx && (this.arrowLocation.x = tooltipRect.x + this.rx + 5);
            } else {
                this.arrowLocation = new ChartLocation(axisRect.x, this.valueY);
                var width = islabelInside ? axisRect.x : axisRect.x - this.elementSize.width - 20;
                tooltipRect = new Rect(width, this.valueY - this.elementSize.height / 2 - 5, this.elementSize.width + 10, this.elementSize.height + 10), 
                axis.opposedPosition ? (tooltipRect.x = islabelInside ? axisRect.x - this.elementSize.width - 10 : axisRect.x + 10, 
                tooltipRect.x + tooltipRect.width > this.chart.availableSize.width && (this.arrowLocation.x -= tooltipRect.x + tooltipRect.width - this.chart.availableSize.width, 
                tooltipRect.x -= tooltipRect.x + tooltipRect.width - this.chart.availableSize.width)) : tooltipRect.x < 0 && (this.arrowLocation.x -= tooltipRect.x, 
                tooltipRect.x = 0), tooltipRect.y < boundsY && (tooltipRect.y = boundsY), tooltipRect.y + tooltipRect.height >= boundsY + bounds.height && (tooltipRect.y -= tooltipRect.y + tooltipRect.height - (boundsY + bounds.height)), 
                this.arrowLocation.y + 5 > tooltipRect.y + tooltipRect.height - this.ry && (this.arrowLocation.y = tooltipRect.y + tooltipRect.height - this.ry - 5), 
                this.arrowLocation.y - 5 < tooltipRect.y + this.ry && (this.arrowLocation.y = tooltipRect.y + this.ry + 5);
            }
            return tooltipRect;
        }, Crosshair.prototype.stopAnimation = function() {
            stopTimer(this.crosshairInterval);
        }, Crosshair.prototype.removeCrosshair = function(duration) {
            var chart = this.chart, crosshair = document.getElementById(this.elementID + "_UserInteraction");
            this.stopAnimation(), crosshair && "0" !== crosshair.getAttribute("opacity") && (this.crosshairInterval = setTimeout(function() {
                new Animation({}).animate(crosshair, {
                    duration: 200,
                    progress: function(args) {
                        crosshair.style.animation = "", crosshair.setAttribute("opacity", (1 - args.timeStamp / args.duration).toString());
                    },
                    end: function(model) {
                        crosshair.setAttribute("opacity", "0"), chart.startMove = !1, chart.tooltipModule && (chart.tooltipModule.valueX = null, 
                        chart.tooltipModule.valueY = null);
                    }
                });
            }, duration));
        }, Crosshair.prototype.getModuleName = function() {
            return "Crosshair";
        }, Crosshair.prototype.destroy = function(chart) {}, Crosshair;
    }(), __extends$100 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), Tooltip$1 = function(_super) {
        function Tooltip(chart) {
            var _this = _super.call(this, chart) || this;
            return _this.addEventListener(), _this;
        }
        return __extends$100(Tooltip, _super), Tooltip.prototype.addEventListener = function() {
            if (!this.chart.isDestroyed) {
                var cancelEvent = Browser.isPointer ? "pointerleave" : "mouseleave";
                this.chart.on(cancelEvent, this.mouseLeaveHandler, this), this.chart.on("tapHold", this.longPress, this), 
                this.chart.on(Browser.touchMoveEvent, this.mouseMoveHandler, this), this.chart.on(Browser.touchEndEvent, this.mouseUpHandler, this);
            }
        }, Tooltip.prototype.mouseUpHandler = function() {
            var chart = this.control;
            chart.isTouch && !this.isSelected(chart) && (withInBounds(chart.mouseX, chart.mouseY, chart.chartAxisLayoutPanel.seriesClipRect) && chart.tooltip.shared || !chart.tooltip.shared) && (chart.crosshair.enable ? chart.startMove && this.removeTooltip(2e3) : (this.tooltip(), 
            this.removeTooltip(2e3)));
        }, Tooltip.prototype.mouseLeaveHandler = function() {
            this.removeTooltip(1e3);
        }, Tooltip.prototype.mouseMoveHandler = function() {
            var chart = this.chart;
            chart.disableTrackTooltip || this.isSelected(chart) || (chart.tooltip.shared || chart.isTouch && !chart.startMove || this.tooltip(), 
            withInBounds(chart.mouseX, chart.mouseY, chart.chartAxisLayoutPanel.seriesClipRect) ? !chart.tooltip.shared || chart.isTouch && !chart.startMove || this.tooltip() : chart.tooltip.shared && this.removeTooltip(1e3));
        }, Tooltip.prototype.longPress = function() {
            var chart = this.chart;
            return chart.crosshair.enable && withInBounds(chart.mouseX, chart.mouseY, chart.chartAxisLayoutPanel.seriesClipRect) && this.tooltip(), 
            !1;
        }, Tooltip.prototype.tooltip = function() {
            var isTooltip = this.getElement(this.element.id + "_tooltip"), tooltipDiv = this.getTooltipElement(isTooltip);
            this.chart.tooltip.shared ? this.renderGroupedTooltip(this.chart, !isTooltip, tooltipDiv) : this.renderSeriesTooltip(this.chart, !isTooltip, tooltipDiv);
        }, Tooltip.prototype.findHeader = function(data) {
            this.header = this.parseTemplate(data.point, data.series, this.header, data.series.xAxis, data.series.yAxis), 
            "" !== this.header.replace(/<b>/g, "").replace(/<\/b>/g, "").trim() && (this.formattedText = this.formattedText.concat(this.header));
        }, Tooltip.prototype.renderSeriesTooltip = function(chart, isFirst, tooltipDiv) {
            var markerSide, data = this.getData();
            data.lierIndex = this.lierIndex;
            var rect = chart.chartAxisLayoutPanel.seriesClipRect;
            if (this.currentPoints = [], this.findData(data, this.previousPoints[0])) {
                if (this.pushData(data, isFirst, tooltipDiv, !0)) {
                    var text = this.getTooltipText(data);
                    chart.tooltip.template ? this.renderTemplate(data, rect, this.getSymbolLocation(data), this.getTemplateText(data), isFirst) : ("" !== this.header && this.findHeader(data), 
                    (markerSide = this.renderTooltip(data, rect, this.getSymbolLocation(data), text, isFirst, "Cartesian" === chart.chartAreaType)) && this.drawMarker(markerSide.isBottom, markerSide.isRight, 10)), 
                    this.isRemove = !0;
                }
                this.previousPoints = extend([], this.currentPoints, null, !0);
            } else if (!data.point && this.isRemove) this.removeTooltip(1e3), this.isRemove = !1; else for (var _i = 0, _a = chart.visibleSeries; _i < _a.length; _i++) {
                var series = _a[_i];
                series.visible && (data = this.getClosestX(chart, series) || data);
            }
            data && data.point && this.findMouseValue(data, chart);
        }, Tooltip.prototype.findData = function(data, previous) {
            return data.point && (!previous || previous.point !== data.point || previous && previous.lierIndex > 3 && previous.lierIndex !== this.lierIndex);
        }, Tooltip.prototype.getSymbolLocation = function(data) {
            return "BoxAndWhisker" === data.series.type ? this.getBoxLocation(data) : data.point.symbolLocations[0];
        }, Tooltip.prototype.getTooltipText = function(pointData) {
            var series = pointData.series;
            return this.parseTemplate(pointData.point, series, this.getFormat(this.chart, series), series.xAxis, series.yAxis);
        }, Tooltip.prototype.getTemplateText = function(data) {
            var point = extend({}, data.point);
            return point.x = this.formatPointValue(data.point, data.series.xAxis, "x", !0, !1), 
            "XY" === data.series.seriesType ? point.y = this.formatPointValue(data.point, data.series.yAxis, "y", !1, !0) : (point.low = this.formatPointValue(data.point, data.series.yAxis, "low", !1, !0), 
            point.high = this.formatPointValue(data.point, data.series.yAxis, "high", !1, !0)), 
            point;
        }, Tooltip.prototype.findMouseValue = function(data, chart) {
            chart.requireInvertedAxis ? (this.valueY = (1 - valueToCoefficient(data.point.xValue, data.series.xAxis)) * data.series.xAxis.rect.height + data.series.xAxis.rect.y, 
            this.valueX = chart.mouseX) : ("PolarRadar" === chart.chartAreaType ? this.valueX = valueToPolarCoefficient(data.point.xValue, data.series.xAxis) * data.series.xAxis.rect.width + data.series.xAxis.rect.x : this.valueX = valueToCoefficient(data.point.xValue, data.series.xAxis) * data.series.xAxis.rect.width + data.series.xAxis.rect.x, 
            this.valueY = chart.mouseY);
        }, Tooltip.prototype.renderGroupedTooltip = function(chart, isFirst, tooltipDiv) {
            var data, pointData = "PolarRadar" === chart.chartAreaType ? this.getData() : null;
            this.stopAnimation(), this.removeHighlight(chart), this.currentPoints = [];
            var markerSide, extraPoints = [];
            isFirst && document.getElementById(this.element.id + "_Secondary_Element").appendChild(tooltipDiv), 
            this.removeText();
            for (var _i = 0, _a = chart.visibleSeries; _i < _a.length; _i++) {
                var series = _a[_i];
                series.enableTooltip && ("Cartesian" === chart.chartAreaType && series.visible ? data = this.getClosestX(chart, series) : "PolarRadar" === chart.chartAreaType && series.visible && null !== pointData.point && (data = new PointData(series.points[pointData.point.index], series)), 
                data && "" !== this.header && 0 === this.currentPoints.length && this.findHeader(data), 
                data && this.triggerEvent(data, isFirst, this.getTooltipText(data)) ? ("Series" === series.category && this.highlightPoints(data), 
                this.findMouseValue(data, chart), this.currentPoints.push(data), data = null) : data && extraPoints.push(data));
            }
            this.currentPoints.length > 0 ? (this.renderText(isFirst, chart), markerSide = this.renderTooltipElement(chart, this.currentPoints[0], chart.chartAxisLayoutPanel.seriesClipRect, this.getSymbolLocation(this.currentPoints[0]), "Cartesian" === chart.chartAreaType, isFirst), 
            this.drawMarker(markerSide.isBottom, markerSide.isRight, 10)) : this.getElement(this.element.id + "_tooltip_path").setAttribute("d", ""), 
            this.currentPoints = this.currentPoints.concat(extraPoints), this.previousPoints = extend([], this.currentPoints, null, !0);
        }, Tooltip.prototype.getBoxLocation = function(data) {
            return this.lierIndex > 3 ? data.point.symbolLocations[this.lierIndex - 4] : {
                x: data.point.regions[0].x + data.point.regions[0].width / 2,
                y: data.point.regions[0].y + data.point.regions[0].height / 2
            };
        }, Tooltip.prototype.drawMarker = function(isBottom, isRight, size) {
            for (var shapeOption, series, count = 0, markerGroup = this.chart.renderer.createGroup({
                id: this.element.id + "_tooltip_trackball_group"
            }), groupElement = this.getElement(this.element.id + "_tooltip_group"), x = 2 * this.padding + size / 2 + (isRight ? this.arrowPadding : 0), _i = 0, _a = this.currentPoints; _i < _a.length; _i++) {
                var data = _a[_i];
                (series = data.series).visible && series.enableTooltip && data.point.visible && (shapeOption = new PathOption(this.element.id + "_Tooltip_Trackball_" + series.index, this.findColor(data, series) || series.interior, 1, "#cccccc", series.opacity, null), 
                markerGroup.appendChild(drawSymbol(new ChartLocation(x, this.markerPoint[count] - this.padding + (isBottom ? this.arrowPadding : 0)), data.point.marker.shape || series.marker.shape, new Size(size, size), series.marker.imageUrl, shapeOption, null)), 
                count++);
            }
            groupElement.appendChild(markerGroup);
        }, Tooltip.prototype.findColor = function(data, series) {
            return series.isRectSeries ? data.point.color : (data.point.color && "#ffffff" !== data.point.color ? data.point.color : data.point.interior) || series.marker.fill;
        }, Tooltip.prototype.parseTemplate = function(point, series, format, xAxis, yAxis) {
            this.chart;
            for (var val, textValue, _i = 0, _a = Object.keys(point); _i < _a.length; _i++) {
                var dataValue = _a[_i];
                val = new RegExp("${point." + dataValue + "}", "gm"), format = format.replace(val.source, this.formatPointValue(point, "${point.x}" === val.source ? xAxis : yAxis, dataValue, "${point.x}" === val.source, "${point.high}" === val.source || "${point.open}" === val.source || "${point.close}" === val.source || "${point.low}" === val.source || "${point.y}" === val.source || "${point.minimum}" === val.source || "${point.maximum}" === val.source || "${point.outliers}" === val.source || "${point.upperQuartile}" === val.source || "${point.lowerQuartile}" === val.source || "${point.median}" === val.source));
            }
            for (var _b = 0, _c = Object.keys(Object.getPrototypeOf(series)); _b < _c.length; _b++) {
                dataValue = _c[_b];
                val = new RegExp("${series." + dataValue + "}", "gm"), textValue = series[dataValue], 
                format = format.replace(val.source, textValue);
            }
            return format;
        }, Tooltip.prototype.formatPointValue = function(point, axis, dataValue, isXPoint, isYPoint) {
            var textValue, customLabelFormat, value;
            return "Category" !== axis.valueType && isXPoint ? textValue = (customLabelFormat = axis.labelFormat && null !== axis.labelFormat.match("{value}")) ? axis.labelFormat.replace("{value}", axis.format(point[dataValue])) : axis.format(point[dataValue]) : isYPoint ? (customLabelFormat = axis.labelFormat && null !== axis.labelFormat.match("{value}"), 
            value = "outliers" === dataValue ? axis.format(point[dataValue][this.lierIndex - 4]) : axis.format(point[dataValue]), 
            textValue = customLabelFormat ? axis.labelFormat.replace("{value}", value) : value) : textValue = point[dataValue], 
            textValue;
        }, Tooltip.prototype.getFormat = function(chart, series) {
            if (chart.tooltip.format) return "XY" === series.seriesType && "Indicator" === series.category ? this.getIndicatorTooltipFormat(series, chart, chart.tooltip.format) : chart.tooltip.format;
            var format = chart.tooltip.shared ? "${series.name}" : "${point.x}";
            switch (series.seriesType) {
              case "XY":
                return "Indicator" === series.category && this.getIndicatorTooltipFormat(series, chart, chart.tooltip.format), 
                format + " : " + ("Bubble" === series.type ? "<b>${point.y}</b>  Size : <b>${point.size}</b>" : "<b>${point.y}</b>");

              case "HighLow":
                return format + "<br/>High : <b>${point.high}</b><br/>Low : <b>${point.low}</b>";

              case "HighLowOpenClose":
                return format + "<br/>High : <b>${point.high}</b><br/>Low : <b>${point.low}</b><br/>Open : <b>${point.open}</b><br/>Close : <b>${point.close}</b>";

              case "BoxPlot":
                return format + "<br/>" + (this.lierIndex > 3 ? "Outliers : <b>${point.outliers}</b>" : "Maximum : <b>${point.maximum}</b><br/>Q1 : <b>${point.upperQuartile}</b><br/>Median : <b>${point.median}</b><br/>Q3 : <b>${point.lowerQuartile}</b><br/>Minimum : <b>${point.minimum}</b>");
            }
            return "";
        }, Tooltip.prototype.getIndicatorTooltipFormat = function(series, chart, format) {
            return "XY" === series.seriesType ? series.name + " : ${point.y}" : format;
        }, Tooltip.prototype.removeHighlightedMarker = function(data) {
            for (var _i = 0, data_1 = data; _i < data_1.length; _i++) {
                var item = data_1[_i];
                removeElement$1(this.element.id + "_Series_" + item.series.index + "_Point_" + item.point.index + "_Trackball");
            }
            this.chart.markerRender && this.chart.markerRender.removeHighlightedMarker(), this.previousPoints = [];
        }, Tooltip.prototype.removeTooltip = function(duration) {
            var _this = this, chart = this.chart, tooltipElement = this.getElement(this.element.id + "_tooltip");
            if (this.stopAnimation(), tooltipElement && this.previousPoints.length > 0) {
                var data_2 = this.previousPoints;
                this.toolTipInterval = setTimeout(function() {
                    var rectOpacity, tooltipGroup = tooltipElement.firstChild, series = data_2[0].series, element = _this.getElement(chart.element.id + "_Series_" + data_2[0].series.index + "_Point_" + data_2[0].point.index), opacity = parseFloat(tooltipGroup.getAttribute("opacity")) || 1;
                    element && series.isRectSeries && !chart.tooltip.shared && (rectOpacity = parseFloat(element.getAttribute("opacity"))), 
                    new Animation({}).animate(tooltipGroup, {
                        duration: 200,
                        progress: function(args) {
                            _this.progressAnimation(element, tooltipGroup, series, opacity, rectOpacity, args.timeStamp / args.duration, series.isRectSeries, !chart.tooltip.shared);
                        },
                        end: function(model) {
                            _this.valueX = null, _this.valueY = null, _this.endAnimation(element, tooltipGroup, series, chart.tooltip.shared), 
                            _this.removeHighlightedMarker(data_2);
                        }
                    });
                }, duration);
            }
        }, Tooltip.prototype.getModuleName = function() {
            return "Tooltip";
        }, Tooltip.prototype.destroy = function(chart) {}, Tooltip;
    }(BaseTooltip), Toolkit = function() {
        function Toolkit(chart) {
            this.chart = chart, this.elementId = chart.element.id, this.selectionColor = "#ff4081", 
            this.fillColor = "#737373";
        }
        return Toolkit.prototype.createPanButton = function(childElement, parentElement, chart) {
            var render = this.chart.renderer, fillColor = this.chart.zoomModule.isPanning ? this.selectionColor : this.fillColor, direction = "M5,3h2.3L7.275,5.875h1.4L8.65,3H11L8,0L5,3z M3,11V8.7l2.875,0.025v-1.4L3,7.35V5L0,8L3,";
            direction += "11z M11,13H8.7l0.025-2.875h-1.4L7.35,13H5l3,3L11,13z M13,5v2.3l-2.875-0.025v1.4L13,8.65V11l3-3L13,5z", 
            childElement.id = this.elementId + "_Zooming_Pan", childElement.setAttribute("aria-label", this.chart.getLocalizedLabel("Pan")), 
            this.panElements = childElement, childElement.appendChild(render.drawRectangle(new RectOption(this.elementId + "_Zooming_Pan_1", "transparent", {}, 1, new Rect(0, 0, 16, 16)))), 
            childElement.appendChild(render.drawPath(new PathOption(this.elementId + "_Zooming_Pan_2", fillColor, null, null, 1, null, direction))), 
            parentElement.appendChild(childElement), this.wireEvents(childElement, this.pan);
        }, Toolkit.prototype.createZoomButton = function(childElement, parentElement, chart) {
            var render = this.chart.renderer, fillColor = this.chart.zoomModule.isPanning ? this.fillColor : this.selectionColor, direction = "M0.001,14.629L1.372,16l4.571-4.571v-0.685l0.228-0.274c1.051,0.868,2.423,1.417,3.885,1.417c3.291,0,";
            direction += "5.943-2.651,5.943-5.943S13.395,0,10.103,0S4.16,2.651,4.16,5.943c0,1.508,0.503,2.834,1.417,3.885l-0.274,0.228H4.571", 
            direction += "L0.001,14.629L0.001,14.629z M5.943,5.943c0-2.285,1.828-4.114,4.114-4.114s4.114,1.828,4.114,", 
            childElement.id = this.elementId + "_Zooming_Zoom", childElement.setAttribute("aria-label", this.chart.getLocalizedLabel("Zoom")), 
            this.zoomElements = childElement, childElement.appendChild(render.drawRectangle(new RectOption(this.elementId + "_Zooming_Zoom_1", "transparent", {}, 1, new Rect(0, 0, 16, 16)))), 
            childElement.appendChild(render.drawPath(new PathOption(this.elementId + "_Zooming_Zoom_3", fillColor, null, null, 1, null, direction + "4.114s-1.828,4.114-4.114,4.114S5.943,8.229,5.943,5.943z"))), 
            parentElement.appendChild(childElement), this.wireEvents(childElement, this.zoom);
        }, Toolkit.prototype.createZoomInButton = function(childElement, parentElement, chart) {
            var render = this.chart.renderer, fillColor = this.fillColor, direction = "M10.103,0C6.812,0,4.16,2.651,4.16,5.943c0,1.509,0.503,2.834,1.417,3.885l-0.274,0.229H4.571L0,";
            direction += "14.628l0,0L1.372,16l4.571-4.572v-0.685l0.228-0.275c1.052,0.868,2.423,1.417,3.885,1.417c3.291,0,5.943-2.651,", 
            direction += "5.943-5.943C16,2.651,13.395,0,10.103,0z M10.058,10.058c-2.286,0-4.114-1.828-4.114-4.114c0-2.286,1.828-4.114,", 
            childElement.id = this.elementId + "_Zooming_ZoomIn", childElement.setAttribute("aria-label", this.chart.getLocalizedLabel("ZoomIn"));
            childElement.appendChild(render.drawRectangle(new RectOption(this.elementId + "_Zooming_ZoomIn_1", "transparent", {}, 1, new Rect(0, 0, 16, 16)))), 
            childElement.appendChild(render.drawPath(new PathOption(this.elementId + "_Zooming_ZoomIn_2", fillColor, null, null, 1, null, direction + "4.114-4.114c2.286,0,4.114,1.828,4.114,4.114C14.172,8.229,12.344,10.058,10.058,10.058z"))), 
            childElement.appendChild(render.drawPolygon(new PolygonOption(this.elementId + "_Zooming_ZoomIn_3", "12.749,5.466 10.749,5.466 10.749,3.466 9.749,3.466 9.749,5.466 7.749,5.466 7.749,6.466 9.749,6.466 9.749,8.466 10.749,8.466 10.749,6.466 12.749,6.466", fillColor))), 
            this.zoomInElements = childElement, this.elementOpacity = chart.zoomModule.isPanning ? "0.2" : "1", 
            childElement.setAttribute("opacity", this.elementOpacity), parentElement.appendChild(childElement), 
            this.wireEvents(childElement, this.zoomIn);
        }, Toolkit.prototype.createZoomOutButton = function(childElement, parentElement, chart) {
            var render = this.chart.renderer, fillColor = this.fillColor, direction = "M0,14.622L1.378,16l4.533-4.533v-0.711l0.266-0.266c1.022,0.889,2.4,1.422,3.866,";
            direction += "1.422c3.289,0,5.955-2.666,5.955-5.955S13.333,0,10.044,0S4.089,2.667,4.134,5.911c0,1.466,0.533,2.844,", 
            direction += "1.422,3.866l-0.266,0.266H4.578L0,14.622L0,14.622z M5.911,5.911c0-2.311,1.822-4.133,4.133-4.133s4.133,1.822,4.133,", 
            childElement.id = this.elementId + "_Zooming_ZoomOut", childElement.setAttribute("aria-label", this.chart.getLocalizedLabel("ZoomOut")), 
            childElement.appendChild(render.drawRectangle(new RectOption(this.elementId + "_Zooming_ZoomOut_1", "transparent", {}, 1, new Rect(0, 0, 16, 16)))), 
            childElement.appendChild(render.drawPath(new PathOption(this.elementId + "_Zooming_ZoomOut_2", fillColor, null, null, 1, null, direction + "4.133s-1.866,4.133-4.133,4.133S5.911,8.222,5.911,5.911z M12.567,6.466h-5v-1h5V6.466z"))), 
            this.zoomOutElements = childElement, this.elementOpacity = chart.zoomModule.isPanning ? "0.2" : "1", 
            childElement.setAttribute("opacity", this.elementOpacity), parentElement.appendChild(childElement), 
            this.wireEvents(childElement, this.zoomOut);
        }, Toolkit.prototype.createResetButton = function(childElement, parentElement, chart, isDevice) {
            var size, render = this.chart.renderer, fillColor = this.fillColor, direction = "M12.364,8h-2.182l2.909,3.25L16,8h-2.182c0-3.575-2.618-6.5-5.818-6.5c-1.128,0-2.218,0.366-3.091,";
            direction += "1.016l1.055,1.178C6.581,3.328,7.272,3.125,8,3.125C10.4,3.125,12.363,5.319,12.364,8L12.364,8z M11.091,", 
            direction += "13.484l-1.055-1.178C9.419,12.672,8.728,12.875,8,12.875c-2.4,0-4.364-2.194-4.364-4.875h2.182L2.909,4.75L0,8h2.182c0,", 
            childElement.id = this.elementId + "_Zooming_Reset", childElement.setAttribute("aria-label", this.chart.getLocalizedLabel("Reset")), 
            isDevice ? (size = measureText(this.chart.getLocalizedLabel("ResetZoom"), {
                size: "12px"
            }), childElement.appendChild(render.drawRectangle(new RectOption(this.elementId + "_Zooming_Reset_1", "transparent", {}, 1, new Rect(0, 0, size.width, size.height)))), 
            textElement(new TextOption(this.elementId + "_Zooming_Reset_2", 0 + size.width / 2, 0 + 3 * size.height / 4, "middle", this.chart.getLocalizedLabel("ResetZoom"), "rotate(0,0,0)", "auto"), {
                size: "12px"
            }, "black", childElement)) : (childElement.appendChild(render.drawRectangle(new RectOption(this.elementId + "_Zooming_Reset_1", "transparent", {}, 1, new Rect(0, 0, 16, 16)))), 
            childElement.appendChild(render.drawPath(new PathOption(this.elementId + "_Zooming_Reset_2", fillColor, null, null, 1, null, direction + "3.575,2.618,6.5,5.818,6.5C9.128,14.5,10.219,14.134,11.091,13.484L11.091,13.484z")))), 
            parentElement.appendChild(childElement), this.wireEvents(childElement, this.reset);
        }, Toolkit.prototype.wireEvents = function(element, process) {
            EventHandler.add(element, "mousedown touchstart", process, this), EventHandler.add(element, "mouseover", this.showTooltip, this), 
            EventHandler.add(element, "mouseout", this.removeTooltip, this);
        }, Toolkit.prototype.showTooltip = function(event) {
            var text = event.currentTarget.id.split("_Zooming_")[1], left = event.pageX - (measureText(text, {
                size: "10px"
            }).width + 5);
            this.chart.isTouch || function(id, text, top, left, fontSize) {
                var tooltip = getElement(id), style = "top:" + top.toString() + "px;left:" + left.toString() + "px;background:#FFFFFF;position:absolute;border:1px solid #707070;font-size:" + fontSize + ";border-radius:2px;";
                tooltip ? (tooltip.setAttribute("innerHTML", "&nbsp;" + text + "&nbsp;"), tooltip.setAttribute("styles", style)) : (tooltip = createElement("div", {
                    id: id,
                    innerHTML: "&nbsp;" + text + "&nbsp;",
                    styles: style
                }), document.body.appendChild(tooltip));
            }("EJ2_Chart_ZoomTip", this.chart.getLocalizedLabel(text), event.pageY + 10, left, "10px");
        }, Toolkit.prototype.removeTooltip = function() {
            removeElement$1("EJ2_Chart_ZoomTip");
        }, Toolkit.prototype.reset = function() {
            var chart = this.chart;
            return chart.zoomModule.isDevice || remove(chart.zoomModule.toolkitElements), this.removeTooltip(), 
            chart.svgObject.setAttribute("cursor", "auto"), chart.axisCollections.forEach(function(axis) {
                axis.zoomFactor = 1, axis.zoomPosition = 0;
            }), chart.disableTrackTooltip = !1, chart.zoomModule.isZoomed = chart.zoomModule.isPanning = chart.isChartDrag = chart.delayRedraw = !1, 
            chart.zoomModule.touchMoveList = chart.zoomModule.touchStartList = [], chart.zoomModule.pinchTarget = null, 
            chart.removeSvg(), chart.refreshAxis(), chart.refreshBound(), this.elementOpacity = "1", 
            !1;
        }, Toolkit.prototype.zoomIn = function(e) {
            return this.zoomInOutCalculation(1, this.chart, this.chart.axisCollections, this.chart.zoomSettings.mode), 
            !1;
        }, Toolkit.prototype.zoomOut = function(e) {
            return this.zoomInOutCalculation(-1, this.chart, this.chart.axisCollections, this.chart.zoomSettings.mode), 
            !1;
        }, Toolkit.prototype.zoom = function(e) {
            this.chart.zoomModule.isPanning = !1;
            this.chart.zoomModule;
            return this.elementOpacity = "1", this.chart.svgObject.setAttribute("cursor", "auto"), 
            this.zoomInElements.setAttribute("opacity", this.elementOpacity), this.zoomOutElements.setAttribute("opacity", this.elementOpacity), 
            this.applySelection(this.zoomElements.childNodes, this.selectionColor), this.applySelection(this.panElements.childNodes, "#737373"), 
            !1;
        }, Toolkit.prototype.pan = function() {
            this.chart.zoomModule;
            return this.chart.zoomModule.isPanning = !0, this.chart.svgObject.setAttribute("cursor", "pointer"), 
            this.elementOpacity = "0.2", this.zoomInElements ? this.zoomInElements.setAttribute("opacity", this.elementOpacity) : null, 
            this.zoomOutElements ? this.zoomOutElements.setAttribute("opacity", this.elementOpacity) : null, 
            this.panElements ? this.applySelection(this.panElements.childNodes, this.selectionColor) : null, 
            this.zoomElements ? this.applySelection(this.zoomElements.childNodes, "#737373") : null, 
            !1;
        }, Toolkit.prototype.zoomInOutCalculation = function(scale, chart, axes, mode) {
            if (!chart.zoomModule.isPanning && "0.2" !== this.elementOpacity) {
                var zoomFactor_1, zoomPosition_1, cumulative_1;
                chart.disableTrackTooltip = !0, chart.delayRedraw = !0, axes.forEach(function(axis) {
                    ("Horizontal" === axis.orientation && "Y" !== mode || "Vertical" === axis.orientation && "X" !== mode) && (cumulative_1 = Math.max(Math.max(1 / minMax(axis.zoomFactor, 0, 1), 1) + .25 * scale, 1), 
                    zoomFactor_1 = 1 === cumulative_1 ? 1 : minMax(1 / cumulative_1, 0, 1), zoomPosition_1 = 1 === cumulative_1 ? 0 : axis.zoomPosition + .5 * (axis.zoomFactor - zoomFactor_1), 
                    axis.zoomPosition === zoomPosition_1 && axis.zoomFactor === zoomFactor_1 || (zoomFactor_1 = zoomPosition_1 + zoomFactor_1 > 1 ? 1 - zoomPosition_1 : zoomFactor_1), 
                    axis.zoomFactor = zoomFactor_1, axis.zoomPosition = zoomPosition_1);
                });
            }
        }, Toolkit.prototype.applySelection = function(elements, color) {
            for (var i = 1, length_1 = elements.length; i < length_1; i++) elements[i].setAttribute("fill", color);
        }, Toolkit;
    }(), Zoom = function() {
        function Zoom(chart) {
            this.chart = chart, this.isPointer = Browser.isPointer, this.browserName = Browser.info.name, 
            this.wheelEvent = "mozilla" === this.browserName ? this.isPointer ? "mousewheel" : "DOMMouseScroll" : "mousewheel", 
            this.cancelEvent = this.isPointer ? "pointerleave" : "mouseleave", this.addEventListener(), 
            this.isDevice = Browser.isDevice;
            var zooming = chart.zoomSettings;
            this.toolkit = new Toolkit(chart), this.zooming = zooming, this.elementId = chart.element.id, 
            this.zoomingRect = new Rect(0, 0, 0, 0), this.zoomAxes = [], this.zoomkitOpacity = .3, 
            this.isIOS = Browser.isIos || Browser.isIos7;
        }
        return Zoom.prototype.renderZooming = function(e, chart, isTouch) {
            this.calculateZoomAxesRange(chart, chart.axisCollections), !this.zooming.enableSelectionZooming || isTouch && (!chart.isDoubleTap || 1 !== this.touchStartList.length) || this.isPanning && !chart.isDoubleTap ? this.isPanning && chart.isChartDrag && (!isTouch || isTouch && 1 === this.touchStartList.length) && (this.pinchTarget = isTouch ? e.target : null, 
            this.doPan(chart, chart.axisCollections)) : (this.isPanning = !!this.isDevice || this.isPanning, 
            this.performedUI = !0, this.drawZoomingRectangle(chart));
        }, Zoom.prototype.drawZoomingRectangle = function(chart) {
            var areaBounds = chart.chartAxisLayoutPanel.seriesClipRect, startLocation = new ChartLocation(chart.previousMouseMoveX, chart.previousMouseMoveY), endLocation = new ChartLocation(chart.mouseX, chart.mouseY), rect = this.zoomingRect = function(startLocation, endLocation, outerRect) {
                var x, y;
                return x = endLocation.x < outerRect.x ? outerRect.x : endLocation.x > outerRect.x + outerRect.width ? outerRect.x + outerRect.width : endLocation.x, 
                y = endLocation.y < outerRect.y ? outerRect.y : endLocation.y > outerRect.y + outerRect.height ? outerRect.y + outerRect.height : endLocation.y, 
                new Rect(x > startLocation.x ? startLocation.x : x, y > startLocation.y ? startLocation.y : y, Math.abs(x - startLocation.x), Math.abs(y - startLocation.y));
            }(startLocation, endLocation, areaBounds);
            rect.width > 0 && rect.height > 0 && (this.isZoomed = !0, chart.disableTrackTooltip = !0, 
            chart.svgObject.setAttribute("cursor", "crosshair"), "X" === this.zooming.mode ? (rect.height = areaBounds.height, 
            rect.y = areaBounds.y) : "Y" === this.zooming.mode && (rect.width = areaBounds.width, 
            rect.x = areaBounds.x), chart.svgObject.appendChild(chart.renderer.drawRectangle(new RectOption(this.elementId + "_ZoomArea", chart.themeStyle.selectionRectFill, {
                color: chart.themeStyle.selectionRectStroke,
                width: 1
            }, 1, rect, 0, 0, "", "3"))));
        }, Zoom.prototype.doPan = function(chart, axes) {
            if (chart.startMove && chart.crosshair.enable) return null;
            var currentScale, offset;
            this.isZoomed = !0;
            var translateX, translateY;
            if (this.offset = chart.delayRedraw ? this.offset : chart.chartAxisLayoutPanel.seriesClipRect, 
            chart.delayRedraw = !0, chart.disableTrackTooltip = !0, axes.forEach(function(axis) {
                currentScale = Math.max(1 / minMax(axis.zoomFactor, 0, 1), 1), "Horizontal" === axis.orientation ? (offset = (chart.previousMouseMoveX - chart.mouseX) / axis.rect.width / currentScale, 
                axis.zoomPosition = minMax(axis.zoomPosition + offset, 0, 1 - axis.zoomFactor)) : (offset = (chart.previousMouseMoveY - chart.mouseY) / axis.rect.height / currentScale, 
                axis.zoomPosition = minMax(axis.zoomPosition - offset, 0, 1 - axis.zoomFactor));
            }), this.zooming.enableDeferredZooming) {
                switch (translateX = chart.mouseX - chart.mouseDownX, translateY = chart.mouseY - chart.mouseDownY, 
                this.zooming.mode) {
                  case "X":
                    translateY = 0;
                    break;

                  case "Y":
                    translateX = 0;
                }
                this.setTransform(translateX, translateY, null, null, chart, !1), this.refreshAxis(chart.chartAxisLayoutPanel, chart, chart.axisCollections);
            } else this.performZoomRedraw(chart);
            chart.previousMouseMoveX = chart.mouseX, chart.previousMouseMoveY = chart.mouseY;
        }, Zoom.prototype.performZoomRedraw = function(chart) {
            var rect = this.zoomingRect;
            chart.animateSeries = !1, this.isZoomed && (rect.width > 0 && rect.height > 0 ? (this.performedUI = !0, 
            chart.svgObject.setAttribute("cursor", "auto"), this.doZoom(chart, chart.axisCollections, chart.chartAxisLayoutPanel.seriesClipRect), 
            chart.isDoubleTap = !1) : chart.disableTrackTooltip && (chart.disableTrackTooltip = !1, 
            chart.delayRedraw = !1, chart.removeSvg(), chart.refreshAxis(), chart.refreshBound()));
        }, Zoom.prototype.refreshAxis = function(layout, chart, axes) {
            var mode = chart.zoomSettings.mode;
            layout.measureAxis(new Rect(chart.initialClipRect.x, chart.initialClipRect.y, chart.initialClipRect.width, chart.initialClipRect.height)), 
            axes.map(function(axis, index) {
                "Horizontal" === axis.orientation && "Y" !== mode && layout.drawXAxisLabels(axis, index, null, axis.placeNextToAxisLine ? axis.updatedRect : axis.rect), 
                "Vertical" === axis.orientation && "X" !== mode && layout.drawYAxisLabels(axis, index, null, axis.placeNextToAxisLine ? axis.updatedRect : axis.rect);
            });
        }, Zoom.prototype.doZoom = function(chart, axes, bounds) {
            var argsData, previousZF, previousZP, currentZF, currentZP, zoomRect = this.zoomingRect, mode = this.zooming.mode;
            this.isPanning = chart.zoomSettings.enablePan || this.isPanning, axes.forEach(function(axis) {
                previousZF = currentZF = axis.zoomFactor, previousZP = currentZP = axis.zoomPosition, 
                argsData = {
                    cancel: !1,
                    name: "zoomComplete",
                    axis: axis,
                    previousZoomFactor: previousZF,
                    previousZoomPosition: previousZP,
                    currentZoomFactor: currentZF,
                    currentZoomPosition: currentZP
                }, "Horizontal" === axis.orientation ? "Y" !== mode && (currentZP += Math.abs((zoomRect.x - bounds.x) / bounds.width) * axis.zoomFactor, 
                currentZF *= zoomRect.width / bounds.width, argsData.currentZoomPosition = currentZP, 
                argsData.currentZoomFactor = currentZF, chart.trigger("zoomComplete", argsData)) : "X" !== mode && (currentZP += (1 - Math.abs((zoomRect.height + (zoomRect.y - bounds.y)) / bounds.height)) * axis.zoomFactor, 
                currentZF *= zoomRect.height / bounds.height, argsData.currentZoomFactor = currentZF, 
                argsData.currentZoomPosition = currentZP, chart.trigger("zoomComplete", argsData)), 
                argsData.cancel || (axis.zoomFactor = argsData.currentZoomFactor, axis.zoomPosition = argsData.currentZoomPosition);
            }), this.zoomingRect = new Rect(0, 0, 0, 0), this.performZoomRedraw(chart);
        }, Zoom.prototype.performMouseWheelZooming = function(e, mouseX, mouseY, chart, axes) {
            var cumulative, zoomFactor, zoomPosition, direction = "mozilla" !== this.browserName || this.isPointer ? e.wheelDelta / 120 > 0 ? 1 : -1 : -e.detail / 3 > 0 ? 1 : -1, mode = this.zooming.mode, origin = .5;
            this.isZoomed = !0, this.calculateZoomAxesRange(chart, chart.axisCollections), chart.disableTrackTooltip = !0, 
            this.performedUI = !0, this.isPanning = chart.zoomSettings.enablePan || this.isPanning, 
            axes.forEach(function(axis) {
                ("Vertical" === axis.orientation && "X" !== mode || "Horizontal" === axis.orientation && "Y" !== mode) && ((cumulative = Math.max(Math.max(1 / minMax(axis.zoomFactor, 0, 1), 1) + .25 * direction, 1)) >= 1 && (origin = (origin = "Horizontal" === axis.orientation ? mouseX / axis.rect.width : 1 - mouseY / axis.rect.height) > 1 ? 1 : origin < 0 ? 0 : origin, 
                zoomFactor = 1 === cumulative ? 1 : minMax(1 / cumulative, 0, 1), zoomPosition = 1 === cumulative ? 0 : axis.zoomPosition + (axis.zoomFactor - zoomFactor) * origin, 
                axis.zoomPosition === zoomPosition && axis.zoomFactor === zoomFactor || (zoomFactor = zoomPosition + zoomFactor > 1 ? 1 - zoomPosition : zoomFactor)), 
                axis.zoomFactor = zoomFactor, axis.zoomPosition = zoomPosition);
            }), this.performZoomRedraw(chart);
        }, Zoom.prototype.performPinchZooming = function(e, chart) {
            if (this.zoomingRect.width > 0 && this.zoomingRect.height > 0 || chart.startMove && chart.crosshair.enable) return !1;
            this.calculateZoomAxesRange(chart, chart.axisCollections), this.isZoomed = !0, this.isPanning = !0, 
            this.performedUI = !0, this.offset = chart.delayRedraw ? this.offset : chart.chartAxisLayoutPanel.seriesClipRect, 
            chart.delayRedraw = !0, chart.disableTrackTooltip = !0;
            var scaleX, scaleY, translateXValue, translateYValue, pinchRect, clipX, clipY, elementOffset = chart.element.getBoundingClientRect(), touchDown = this.touchStartList, touchMove = this.touchMoveList, touch0StartX = touchDown[0].pageX - elementOffset.left, touch0StartY = touchDown[0].pageY - elementOffset.top, touch0EndX = touchMove[0].pageX - elementOffset.left, touch0EndY = touchMove[0].pageY - elementOffset.top, touch1StartX = touchDown[1].pageX - elementOffset.left, touch1StartY = touchDown[1].pageY - elementOffset.top, touch1EndX = touchMove[1].pageX - elementOffset.left, touch1EndY = touchMove[1].pageY - elementOffset.top;
            if (scaleX = Math.abs(touch0EndX - touch1EndX) / Math.abs(touch0StartX - touch1StartX), 
            scaleY = Math.abs(touch0EndY - touch1EndY) / Math.abs(touch0StartY - touch1StartY), 
            clipX = (this.offset.x - touch0EndX) / scaleX + touch0StartX, clipY = (this.offset.y - touch0EndY) / scaleY + touch0StartY, 
            pinchRect = new Rect(clipX, clipY, this.offset.width / scaleX, this.offset.height / scaleY), 
            translateXValue = touch0EndX - scaleX * touch0StartX, translateYValue = touch0EndY - scaleY * touch0StartY, 
            !isNaN(scaleX - scaleX) && !isNaN(scaleY - scaleY)) switch (this.zooming.mode) {
              case "XY":
                this.setTransform(translateXValue, translateYValue, scaleX, scaleY, chart, !0);
                break;

              case "X":
                this.setTransform(translateXValue, 0, scaleX, 1, chart, !0);
                break;

              case "Y":
                this.setTransform(0, translateYValue, 1, scaleY, chart, !0);
            }
            return this.calculatePinchZoomFactor(chart, pinchRect), this.refreshAxis(chart.chartAxisLayoutPanel, chart, chart.axisCollections), 
            !0;
        }, Zoom.prototype.calculatePinchZoomFactor = function(chart, pinchRect) {
            var selectionMin, selectionMax, rangeMin, rangeMax, value, axisTrans, _this = this, mode = this.zooming.mode;
            chart.axisCollections.forEach(function(axis, index) {
                ("Horizontal" === axis.orientation && "Y" !== mode || "Vertical" === axis.orientation && "X" !== mode) && ("Horizontal" === axis.orientation ? (value = pinchRect.x - _this.offset.x, 
                axisTrans = axis.rect.width / _this.zoomAxes[index].delta, rangeMin = value / axisTrans + _this.zoomAxes[index].min, 
                value = pinchRect.x + pinchRect.width - _this.offset.x, rangeMax = value / axisTrans + _this.zoomAxes[index].min) : (value = pinchRect.y - _this.offset.y, 
                axisTrans = axis.rect.height / _this.zoomAxes[index].delta, rangeMin = (-1 * value + axis.rect.height) / axisTrans + _this.zoomAxes[index].min, 
                value = pinchRect.y + pinchRect.height - _this.offset.y, rangeMax = (-1 * value + axis.rect.height) / axisTrans + _this.zoomAxes[index].min), 
                selectionMin = Math.min(rangeMin, rangeMax), selectionMax = Math.max(rangeMin, rangeMax), 
                axis.zoomPosition = (selectionMin - _this.zoomAxes[index].actualMin) / _this.zoomAxes[index].actualDelta, 
                axis.zoomFactor = (selectionMax - selectionMin) / _this.zoomAxes[index].actualDelta, 
                axis.zoomPosition = axis.zoomPosition < 0 ? 0 : axis.zoomPosition, axis.zoomFactor = axis.zoomFactor > 1 ? 1 : axis.zoomFactor);
            });
        }, Zoom.prototype.setTransform = function(transX, transY, scaleX, scaleY, chart, isPinch) {
            chart.seriesElements.setAttribute("clip-path", "url(#" + this.elementId + "_ChartAreaClipRect_)"), 
            chart.indicatorElements && chart.indicatorElements.setAttribute("clip-path", "url(#" + this.elementId + "_ChartAreaClipRect_)");
            var translate, xAxisLoc, yAxisLoc, element;
            null !== transX && null !== transY && chart.visibleSeries.forEach(function(value) {
                xAxisLoc = chart.requireInvertedAxis ? value.yAxis.rect.x : value.xAxis.rect.x, 
                yAxisLoc = chart.requireInvertedAxis ? value.xAxis.rect.y : value.yAxis.rect.y, 
                translate = "translate(" + (transX + (isPinch ? scaleX * xAxisLoc : xAxisLoc)) + "," + (transY + (isPinch ? scaleY * yAxisLoc : yAxisLoc)) + ")", 
                translate = scaleX || scaleY ? translate + " scale(" + scaleX + " " + scaleY + ")" : translate, 
                "Indicator" === value.category ? value.seriesElement.parentElement.setAttribute("transform", translate) : value.seriesElement.setAttribute("transform", translate), 
                element = getElement(chart.element.id + "_Series_" + value.index + "_DataLabelCollections"), 
                value.errorBarElement && value.errorBarElement.setAttribute("transform", translate), 
                value.symbolElement && value.symbolElement.setAttribute("transform", translate), 
                value.textElement && (value.textElement.setAttribute("visibility", "hidden"), value.shapeElement.setAttribute("visibility", "hidden")), 
                element && (element.style.visibility = "hidden");
            });
        }, Zoom.prototype.calculateZoomAxesRange = function(chart, axes) {
            var range, axisRange, _this = this;
            chart.axisCollections.forEach(function(axis, index) {
                axisRange = axis.visibleRange, _this.zoomAxes[index] ? chart.delayRedraw || (_this.zoomAxes[index].min = axisRange.min, 
                _this.zoomAxes[index].delta = axisRange.delta) : (range = {
                    actualMin: axis.actualRange.min,
                    actualDelta: axis.actualRange.delta,
                    min: axisRange.min,
                    delta: axisRange.delta
                }, _this.zoomAxes[index] = range);
            });
        }, Zoom.prototype.showZoomingToolkit = function(chart) {
            var outerElement, element, toolboxItems = this.zooming.toolbarItems, areaBounds = chart.chartAxisLayoutPanel.seriesClipRect, render = chart.renderer, length = this.isDevice ? 1 : toolboxItems.length, iconSize = this.isDevice ? measureText("Reset Zoom", {
                size: "12px"
            }).width : 16, height = this.isDevice ? measureText("Reset Zoom", {
                size: "12px"
            }).height : 22, width = length * iconSize + 5 * (length + 1) + 5 * (length - 1), transX = areaBounds.x + areaBounds.width - width - 5, transY = areaBounds.y + 5, xPosition = 5, toolkit = this.toolkit, shadowElement = '<filter id="chart_shadow" height="130%"><feGaussianBlur in="SourceAlpha" stdDeviation="5"/>';
            if (shadowElement += '<feOffset dx="-3" dy="4" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="1"/>', 
            shadowElement += '</feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter>', 
            0 === length || getElement(this.elementId + "_Zooming_KitCollection")) return !1;
            var defElement = render.createDefs();
            toolboxItems = this.isDevice ? [ "Reset" ] : toolboxItems, defElement.innerHTML = shadowElement, 
            this.toolkitElements = render.createGroup({
                id: this.elementId + "_Zooming_KitCollection",
                transform: "translate(" + transX + "," + transY + ")"
            }), this.toolkitElements.appendChild(defElement), this.toolkitElements.appendChild(render.drawRectangle(new RectOption(this.elementId + "_Zooming_Rect", "#fafafa", {
                color: "transparent",
                width: 1
            }, 1, new Rect(0, 0, width, height + 10), 0, 0))), (outerElement = render.drawRectangle(new RectOption(this.elementId + "_Zooming_Rect", "#fafafa", {
                color: "transparent",
                width: 1
            }, .1, new Rect(0, 0, width, height + 10), 0, 0))).setAttribute("filter", "url(#chart_shadow)"), 
            this.toolkitElements.appendChild(outerElement);
            for (var currentItem, i = 1; i <= length; i++) {
                switch (currentItem = toolboxItems[i - 1], element = render.createGroup({
                    transform: "translate(" + xPosition + "," + (this.isDevice ? 5 : 8) + ")"
                }), currentItem) {
                  case "Pan":
                    toolkit.createPanButton(element, this.toolkitElements, chart);
                    break;

                  case "Zoom":
                    toolkit.createZoomButton(element, this.toolkitElements, chart);
                    break;

                  case "ZoomIn":
                    toolkit.createZoomInButton(element, this.toolkitElements, chart);
                    break;

                  case "ZoomOut":
                    toolkit.createZoomOutButton(element, this.toolkitElements, chart);
                    break;

                  case "Reset":
                    toolkit.createResetButton(element, this.toolkitElements, chart, this.isDevice);
                }
                xPosition += iconSize + 10;
            }
            return this.toolkitElements.setAttribute("opacity", this.isDevice ? "1" : "" + this.zoomkitOpacity), 
            this.toolkitElements.setAttribute("cursor", "auto"), chart.svgObject.appendChild(this.toolkitElements), 
            this.isDevice || (EventHandler.add(this.toolkitElements, "mousemove touchstart", this.zoomToolkitMove, this), 
            EventHandler.add(this.toolkitElements, "mouseleave touchend", this.zoomToolkitLeave, this), 
            this.isPanning && toolkit.pan()), !0;
        }, Zoom.prototype.applyZoomToolkit = function(chart, axes) {
            this.isAxisZoomed(axes) ? (this.showZoomingToolkit(chart), this.isZoomed = !0) : (this.toolkit.removeTooltip(), 
            this.isPanning = !1, this.isZoomed = !1, chart.svgObject.setAttribute("cursor", "auto"));
        }, Zoom.prototype.isAxisZoomed = function(axes) {
            var showToolkit = !1;
            return axes.forEach(function(axis) {
                showToolkit = showToolkit || 1 !== axis.zoomFactor || 0 !== axis.zoomPosition;
            }), showToolkit;
        }, Zoom.prototype.zoomToolkitMove = function(e) {
            var element = this.toolkitElements;
            element.getAttribute("opacity");
            return this.zoomkitOpacity = 1, element.setAttribute("opacity", "" + this.zoomkitOpacity), 
            !1;
        }, Zoom.prototype.zoomToolkitLeave = function(e) {
            var element = this.toolkitElements;
            return this.zoomkitOpacity = .3, element.setAttribute("opacity", "" + this.zoomkitOpacity), 
            !1;
        }, Zoom.prototype.addEventListener = function() {
            this.chart.isDestroyed || (EventHandler.add(this.chart.element, this.wheelEvent, this.chartMouseWheel, this), 
            this.chart.on(Browser.touchMoveEvent, this.mouseMoveHandler, this), this.chart.on(Browser.touchStartEvent, this.mouseDownHandler, this), 
            this.chart.on(Browser.touchEndEvent, this.mouseUpHandler, this), this.chart.on(this.cancelEvent, this.mouseCancelHandler, this));
        }, Zoom.prototype.removeEventListener = function() {
            this.chart.isDestroyed || (EventHandler.remove(this.chart.element, this.wheelEvent, this.chartMouseWheel), 
            this.chart.off(Browser.touchMoveEvent, this.mouseMoveHandler), this.chart.off(Browser.touchStartEvent, this.mouseDownHandler), 
            this.chart.off(Browser.touchEndEvent, this.mouseUpHandler), this.chart.off(this.cancelEvent, this.mouseCancelHandler));
        }, Zoom.prototype.chartMouseWheel = function(e) {
            var chart = this.chart, offset = chart.element.getBoundingClientRect(), svgRect = getElement(chart.element.id + "_svg").getBoundingClientRect(), mouseX = e.clientX - offset.left - Math.max(svgRect.left - offset.left, 0), mouseY = e.clientY - offset.top - Math.max(svgRect.top - offset.top, 0);
            return this.zooming.enableMouseWheelZooming && withInBounds(mouseX, mouseY, chart.chartAxisLayoutPanel.seriesClipRect) && (e.preventDefault(), 
            this.performMouseWheelZooming(e, mouseX, mouseY, chart, chart.axisCollections)), 
            !1;
        }, Zoom.prototype.mouseMoveHandler = function(e) {
            var chart = this.chart, touches = null;
            "touchmove" === e.type && (e.preventDefault && this.isIOS && (this.isPanning || chart.isDoubleTap || this.zooming.enablePinchZooming && this.touchStartList.length > 1) && e.preventDefault(), 
            touches = e.touches), chart.isChartDrag && (chart.isTouch && (this.touchMoveList = this.addTouchPointer(this.touchMoveList, e, touches), 
            this.zooming.enablePinchZooming && this.touchMoveList.length > 1 && this.touchStartList.length > 1 && this.performPinchZooming(e, chart)), 
            this.renderZooming(e, chart, chart.isTouch));
        }, Zoom.prototype.mouseDownHandler = function(e) {
            var target, chart = this.chart, touches = null;
            "touchstart" === e.type ? (touches = e.touches, target = e.target) : target = e.target, 
            -1 === target.id.indexOf(chart.element.id + "_Zooming_") && withInBounds(chart.previousMouseMoveX, chart.previousMouseMoveY, chart.chartAxisLayoutPanel.seriesClipRect) && (chart.isChartDrag = !0), 
            chart.isTouch && (this.touchStartList = this.addTouchPointer(this.touchStartList, e, touches));
        }, Zoom.prototype.mouseUpHandler = function(e) {
            var chart = this.chart, performZoomRedraw = -1 === e.target.id.indexOf(chart.element.id + "_ZoomOut_") || -1 === e.target.id.indexOf(chart.element.id + "_ZoomIn_");
            (chart.isChartDrag || performZoomRedraw) && this.performZoomRedraw(chart), chart.isTouch && (chart.isDoubleTap && withInBounds(chart.mouseX, chart.mouseY, chart.chartAxisLayoutPanel.seriesClipRect) && 1 === this.touchStartList.length && this.isZoomed && this.toolkit.reset(), 
            this.touchStartList = [], chart.isDoubleTap = !1);
        }, Zoom.prototype.mouseCancelHandler = function(e) {
            this.isZoomed && this.performZoomRedraw(this.chart), this.pinchTarget = null, this.touchStartList = [], 
            this.touchMoveList = [];
        }, Zoom.prototype.addTouchPointer = function(touchList, e, touches) {
            if (touches) {
                touchList = [];
                for (var i = 0, length_1 = touches.length; i < length_1; i++) touchList.push({
                    pageX: touches[i].clientX,
                    pageY: touches[i].clientY,
                    pointerId: null
                });
            } else if (0 === (touchList = touchList || []).length) touchList.push({
                pageX: e.clientX,
                pageY: e.clientY,
                pointerId: e.pointerId
            }); else {
                i = 0;
                for (var length_2 = touchList.length; i < length_2; i++) touchList[i].pointerId === e.pointerId ? touchList[i] = {
                    pageX: e.clientX,
                    pageY: e.clientY,
                    pointerId: e.pointerId
                } : touchList.push({
                    pageX: e.clientX,
                    pageY: e.clientY,
                    pointerId: e.pointerId
                });
            }
            return touchList;
        }, Zoom.prototype.getModuleName = function() {
            return "Zoom";
        }, Zoom.prototype.destroy = function(chart) {
            this.removeEventListener();
        }, Zoom;
    }(), __extends$101 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), Selection = function(_super) {
        function Selection(chart) {
            var _this = _super.call(this, chart) || this;
            return _this.chart = chart, _this.renderer = chart.renderer, _this.addEventListener(), 
            _this;
        }
        return __extends$101(Selection, _super), Selection.prototype.addEventListener = function() {
            if (!this.chart.isDestroyed) {
                var cancelEvent = Browser.isPointer ? "pointerleave" : "mouseleave";
                this.chart.on(Browser.touchMoveEvent, this.mouseMove, this), this.chart.on(cancelEvent, this.completeSelection, this), 
                this.chart.on("click", this.calculateSelectedElements, this), this.chart.on(Browser.touchStartEvent, this.mousedown, this), 
                this.chart.on(Browser.touchEndEvent, this.completeSelection, this);
            }
        }, Selection.prototype.mousedown = function(e) {
            var chart = this.chart;
            "None" === chart.selectionMode || chart.isChartDrag || (chart.isDoubleTap || !chart.isTouch || this.rectPoints) && this.dragStart(chart, chart.chartAxisLayoutPanel.seriesClipRect, chart.mouseDownX, chart.mouseDownY, e);
        }, Selection.prototype.removeEventListener = function() {
            this.chart.isDestroyed || (this.chart.off(Browser.touchMoveEvent, this.mouseMove), 
            this.chart.off("pointerleave", this.completeSelection), this.chart.off("click", this.calculateSelectedElements), 
            this.chart.off(Browser.touchStartEvent, this.mousedown), this.chart.off(Browser.touchEndEvent, this.completeSelection));
        }, Selection.prototype.initPrivateVariables = function(chart) {
            this.styleId = chart.element.id + "_ej2_chart_selection", this.unselected = chart.element.id + "_ej2_deselected", 
            this.closeIconId = chart.element.id + "_ej2_drag_close", this.draggedRectGroup = chart.element.id + "_ej2_drag_group", 
            this.draggedRect = chart.element.id + "_ej2_drag_rect", this.selectedDataIndexes = [], 
            this.rectPoints = null, this.isSeriesMode = "Series" === chart.selectionMode;
        }, Selection.prototype.invokeSelection = function(chart) {
            this.initPrivateVariables(chart), this.series = extend({}, chart.visibleSeries, null, !0), 
            this.seriesStyles(), chart.selectionMode.indexOf("Drag") > -1 || this.selectDataIndex(chart, this.concatIndexes(chart.selectedDataIndexes, this.selectedDataIndexes));
        }, Selection.prototype.generateStyle = function(series) {
            return series ? series.selectionStyle || this.styleId + "_series_" + series.index : "undefined";
        }, Selection.prototype.selectDataIndex = function(chart, indexes) {
            for (var _i = 0, indexes_1 = indexes; _i < indexes_1.length; _i++) {
                var index = indexes_1[_i];
                this.performSelection(index, chart, this.getElementByIndex(chart, index)[0]);
            }
        }, Selection.prototype.getElementByIndex = function(chart, index, suffix) {
            void 0 === suffix && (suffix = "");
            var elementId = chart.element.id + "_Series_" + index.series + "_Point_" + index.point, series = chart.series[index.series];
            return elementId = !series.isRectSeries && "Scatter" !== series.type && "Bubble" !== series.type && series.marker.visible ? elementId + "_Symbol" + suffix : elementId, 
            [ getElement(elementId), "RangeArea" === series.type && series.marker.visible ? getElement(elementId + "1") : null ];
        }, Selection.prototype.getClusterElements = function(chart, index) {
            for (var clusters = [], _i = 0, _a = chart.visibleSeries; _i < _a.length; _i++) {
                var series = _a[_i];
                index = new Index(series.index, index.point), clusters.push(this.getElementByIndex(chart, index)[0]);
            }
            return clusters;
        }, Selection.prototype.findElements = function(chart, series, index, suffix) {
            return void 0 === suffix && (suffix = ""), this.isSeriesMode ? this.getSeriesElements(series) : "Cluster" === chart.selectionMode ? this.getClusterElements(chart, index) : this.getElementByIndex(chart, index, suffix);
        }, Selection.prototype.calculateSelectedElements = function(event) {
            "None" !== this.chart.selectionMode && -1 !== event.target.id.indexOf(this.chart.element.id + "_") && event.target.id.indexOf("_Series_") > -1 && this.performSelection(this.indexFinder(event.target.id), this.chart, event.target);
        }, Selection.prototype.performSelection = function(index, chart, element) {
            switch (this.isSeriesMode = "Series" === chart.selectionMode, "BoxAndWhisker" === chart.series[index.series].type && element.id === chart.element.id + "_Series_" + index.series + "_Point_" + index.point + "_BoxPath" && (element = element.parentElement), 
            chart.selectionMode) {
              case "Series":
                this.selection(chart, index, this.getSeriesElements(chart.series[index.series])), 
                this.blurEffect(chart.element.id, chart.visibleSeries);
                break;

              case "Point":
                isNaN(index.point) || (this.selection(chart, index, [ element ]), this.blurEffect(chart.element.id, chart.visibleSeries));
                break;

              case "Cluster":
                isNaN(index.point) || (this.clusterSelection(chart, chart.series, index), this.blurEffect(chart.element.id, chart.visibleSeries));
            }
        }, Selection.prototype.selection = function(chart, index, selectedElements) {
            chart.isMultiSelect || -1 !== chart.selectionMode.indexOf("Drag") || this.removeMultiSelectEelments(chart, this.selectedDataIndexes, index, chart.series);
            var className = selectedElements[0] && (selectedElements[0].getAttribute("class") || "");
            selectedElements[0] && className.indexOf(this.getSelectionClass(selectedElements[0].id)) > -1 ? (this.removeStyles(selectedElements), 
            this.addOrRemoveIndex(this.selectedDataIndexes, index)) : (this.applyStyles(selectedElements), 
            this.addOrRemoveIndex(this.selectedDataIndexes, index, !0));
        }, Selection.prototype.clusterSelection = function(chart, series, index) {
            this.selection(chart, index, this.getClusterElements(chart, new Index(index.series, index.point)));
        }, Selection.prototype.removeMultiSelectEelments = function(chart, index, currentIndex, seriesCollection) {
            for (var series, i = 0; i < index.length; i++) series = seriesCollection[index[i].series], 
            (this.isSeriesMode && !this.toEquals(index[i], currentIndex, this.isSeriesMode) || "Cluster" === this.control.selectionMode && !this.toEquals(index[i], currentIndex, !1) || !this.isSeriesMode && this.toEquals(index[i], currentIndex, !0) && !this.toEquals(index[i], currentIndex, !1)) && (this.removeStyles(this.findElements(chart, series, index[i])), 
            index.splice(i, 1), i--);
        }, Selection.prototype.blurEffect = function(chartId, visibleSeries) {
            for (var visibility = this.checkVisibility(this.selectedDataIndexes), _i = 0, visibleSeries_1 = visibleSeries; _i < visibleSeries_1.length; _i++) {
                var series = visibleSeries_1[_i];
                series.visible && (this.checkSelectionElements(getElement(chartId + "SeriesGroup" + series.index), this.generateStyle(series), visibility), 
                isNullOrUndefined(getElement(chartId + "SymbolGroup" + series.index)) || this.checkSelectionElements(getElement(chartId + "SymbolGroup" + series.index), this.generateStyle(series), visibility));
            }
        }, Selection.prototype.checkSelectionElements = function(element, className, visibility) {
            for (var elementClassName, parentClassName, legendShape, children = this.isSeriesMode ? [ element ] : element.childNodes, selectElement = element, i = 0; i < children.length; i++) elementClassName = children[i].getAttribute("class") || "", 
            parentClassName = children[i].parentNode.getAttribute("class") || "", -1 === elementClassName.indexOf(className) && -1 === parentClassName.indexOf(className) && visibility ? this.addSvgClass(children[i], this.unselected) : (selectElement = children[i], 
            this.removeSvgClass(children[i], this.unselected));
            this.control.legendModule && this.control.legendSettings.visible && (legendShape = document.getElementById(this.control.element.id + "_chart_legend_shape_" + className.split("_series_")[1])) && (elementClassName = selectElement.getAttribute("class") || "", 
            parentClassName = selectElement.parentNode.getAttribute("class") || "", -1 === elementClassName.indexOf(className) && -1 === parentClassName.indexOf(className) && visibility ? this.addSvgClass(legendShape, this.unselected) : this.removeSvgClass(legendShape, this.unselected));
        }, Selection.prototype.applyStyles = function(elements) {
            for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {
                var element = elements_1[_i];
                element && (this.removeSvgClass(element.parentNode, this.unselected), this.removeSvgClass(element, this.unselected), 
                this.addSvgClass(element, this.getSelectionClass(element.id)));
            }
        }, Selection.prototype.getSelectionClass = function(id) {
            return this.generateStyle(this.control.series[this.indexFinder(id).series]);
        }, Selection.prototype.removeStyles = function(elements) {
            for (var _i = 0, elements_2 = elements; _i < elements_2.length; _i++) {
                var element = elements_2[_i];
                element && this.removeSvgClass(element, this.getSelectionClass(element.id));
            }
        }, Selection.prototype.addOrRemoveIndex = function(indexes, index, add) {
            for (var i = 0; i < indexes.length; i++) this.toEquals(indexes[i], index, this.isSeriesMode) && (indexes.splice(i, 1), 
            i--);
            add && indexes.push(index);
        }, Selection.prototype.toEquals = function(first, second, checkSeriesOnly) {
            return (first.series === second.series || "Cluster" === this.control.selectionMode && !checkSeriesOnly) && (checkSeriesOnly || first.point === second.point);
        }, Selection.prototype.redrawSelection = function(chart, oldMode) {
            this.isSeriesMode = "Series" === oldMode;
            var selectedDataIndexes = extend([], this.selectedDataIndexes, null, !0);
            this.removeSelectedElements(chart, this.selectedDataIndexes, chart.series), this.blurEffect(chart.element.id, chart.visibleSeries), 
            this.selectDataIndex(chart, selectedDataIndexes);
        }, Selection.prototype.legendSelection = function(chart, series) {
            var seriesStyle = this.generateStyle(chart.visibleSeries[series]), selectedElements = document.getElementsByClassName(seriesStyle);
            this.isSeriesMode = "Series" === chart.selectionMode;
            var isBlurEffectNeeded = !0;
            if (selectedElements.length > 0) {
                for (var elements = [], i = 0; i < selectedElements.length; i++) elements.push(selectedElements[i]);
                this.removeStyles(elements), this.isSeriesMode = !0, this.addOrRemoveIndex(this.selectedDataIndexes, new Index(series, NaN));
                for (var _i = 0, _a = chart.visibleSeries; _i < _a.length; _i++) {
                    var series_1 = _a[_i];
                    if (seriesStyle = this.generateStyle(series_1), document.getElementsByClassName(seriesStyle).length > 0) {
                        for (var _b = 0, elements_3 = elements; _b < elements_3.length; _b++) {
                            var element = elements_3[_b];
                            this.checkSelectionElements(element, seriesStyle, !0);
                        }
                        isBlurEffectNeeded = !1;
                        break;
                    }
                }
                isBlurEffectNeeded && (this.isSeriesMode = "Series" === chart.selectionMode, this.blurEffect(chart.element.id, chart.visibleSeries));
            } else {
                for (var seriesElements = this.getSeriesElements(chart.visibleSeries[series]), _c = 0, seriesElements_1 = seriesElements; _c < seriesElements_1.length; _c++) {
                    var seriesElement = seriesElements_1[_c];
                    this.checkSelectionElements(seriesElement, seriesStyle, !1);
                }
                this.isSeriesMode = !0, this.selection(chart, new Index(series, NaN), seriesElements), 
                this.isSeriesMode = "Series" === chart.selectionMode, this.blurEffect(chart.element.id, chart.visibleSeries);
            }
        }, Selection.prototype.getSeriesElements = function(series) {
            var seriesElements = [ series.seriesElement ];
            return series.marker.visible && "Scatter" !== series.type && "Bubble" !== series.type && !series.isRectSeries && seriesElements.push(series.symbolElement), 
            seriesElements;
        }, Selection.prototype.indexFinder = function(id) {
            var ids = [ "NaN", "NaN" ];
            return id.indexOf("SeriesGroup") > -1 ? (ids = id.split("SeriesGroup"))[0] = ids[1] : id.indexOf("SymbolGroup") > -1 ? (ids = id.split("SymbolGroup"))[0] = ids[1] : id.indexOf("_Point_") > -1 ? ids = id.split("_Series_")[1].split("_Point_") : id.indexOf("_Series_") > -1 && (ids[0] = id.split("_Series_")[1]), 
            new Index(parseInt(ids[0], 10), parseInt(ids[1], 10));
        }, Selection.prototype.calculateDragSelectedElements = function(chart, dragRect) {
            this.removeSelectedElements(chart, this.selectedDataIndexes, chart.series);
            var rect = new Rect(dragRect.x, dragRect.y, dragRect.width, dragRect.height), axisOffset = new ChartLocation(chart.chartAxisLayoutPanel.seriesClipRect.x, chart.chartAxisLayoutPanel.seriesClipRect.y);
            this.removeOffset(rect, axisOffset);
            var points, index, selectedPointValues = [], selectedSeriesValues = [];
            this.isSeriesMode = !1;
            for (var _loop_1 = function(series) {
                if (series.visible) {
                    points = series.points, selectedPointValues = [];
                    var xAxisOffset_1, yAxisOffset_1;
                    !chart.isTransposed && -1 === series.type.indexOf("Bar") || chart.isTransposed && -1 !== series.type.indexOf("Bar") ? (xAxisOffset_1 = series.xAxis.rect.x - axisOffset.x, 
                    yAxisOffset_1 = series.yAxis.rect.y - axisOffset.y) : (xAxisOffset_1 = series.xAxis.rect.y - axisOffset.y, 
                    yAxisOffset_1 = series.yAxis.rect.x - axisOffset.x);
                    for (var j = 0; j < points.length; j++) {
                        var yValue = "RangeArea" !== series.type ? points[j].yValue : points[j].regions[0].y, isCurrentPoint = void 0;
                        (isCurrentPoint = "BoxAndWhisker" === series.type ? points[j].regions.some(function(region) {
                            return withInBounds(region.x + xAxisOffset_1, region.y + yAxisOffset_1, rect);
                        }) : points[j].symbolLocations.some(function(location) {
                            return location && withInBounds(location.x + xAxisOffset_1, location.y + yAxisOffset_1, rect);
                        })) && "Indicator" !== series.category && (index = new Index(series.index, points[j].index), 
                        this_1.selection(chart, index, this_1.findElements(chart, series, index)), selectedPointValues.push({
                            x: points[j].xValue.toString(),
                            y: yValue
                        })), isCurrentPoint && "RangeArea" === series.type && selectedPointValues.push({
                            x: points[j].xValue.toString(),
                            y: points[j].regions[0].y
                        });
                    }
                    selectedSeriesValues.push(selectedPointValues);
                }
            }, this_1 = this, _i = 0, _a = chart.visibleSeries; _i < _a.length; _i++) {
                _loop_1(_a[_i]);
            }
            this.blurEffect(chart.element.id, chart.visibleSeries), this.rectPoints = new Rect(dragRect.x, dragRect.y, dragRect.width, dragRect.height), 
            this.createCloseButton(dragRect.x + dragRect.width, dragRect.y);
            var args = {
                name: "dragComplete",
                selectedDataValues: selectedSeriesValues,
                cancel: !1
            };
            chart.trigger("dragComplete", args);
        }, Selection.prototype.removeOffset = function(rect, clip) {
            rect.x -= clip.x, rect.y -= clip.y;
        }, Selection.prototype.drawDraggingRect = function(chart, dragRect) {
            var cartesianLayout = chart.chartAxisLayoutPanel.seriesClipRect;
            switch (chart.selectionMode) {
              case "DragX":
                dragRect.y = cartesianLayout.y, dragRect.height = cartesianLayout.height;
                break;

              case "DragY":
                dragRect.x = cartesianLayout.x, dragRect.width = cartesianLayout.width;
            }
            if (dragRect.width < 5 || dragRect.height < 5) return null;
            var element = getElement(this.draggedRect);
            if (this.closeIcon && removeElement$1(this.closeIconId), element) this.setAttributes(element, dragRect); else {
                var dragGroup = this.renderer.createGroup({
                    id: this.draggedRectGroup
                });
                chart.svgObject.appendChild(dragGroup), (element = this.renderer.drawRectangle(new RectOption(this.draggedRect, chart.themeStyle.selectionRectFill, {
                    color: chart.themeStyle.selectionRectStroke,
                    width: 1
                }, 1, dragRect))).setAttribute("style", "cursor:move;"), dragGroup.appendChild(element);
            }
        }, Selection.prototype.createCloseButton = function(x, y) {
            var closeIcon = this.renderer.createGroup({
                id: this.closeIconId,
                style: "cursor:pointer; visibility: visible;"
            });
            closeIcon.appendChild(this.renderer.drawCircle(new CircleOption(this.closeIconId + "_circle", "#FFFFFF", {
                color: this.chart.themeStyle.selectionCircleStroke,
                width: 1
            }, 1, x, y, 10)));
            var direction = "M " + (x - 4) + " " + (y - 4) + " L " + (x + 4) + " " + (y + 4) + " M " + (x - 4) + " " + (y + 4) + " L " + (x + 4) + " " + (y - 4);
            closeIcon.appendChild(this.renderer.drawPath({
                id: this.closeIconId + "_cross",
                d: direction,
                stroke: this.chart.themeStyle.selectionCircleStroke,
                "stroke-width": 2,
                fill: this.chart.themeStyle.selectionCircleStroke
            })), this.closeIcon = closeIcon, getElement(this.draggedRectGroup).appendChild(closeIcon);
        }, Selection.prototype.removeDraggedElements = function(chart, event) {
            event.target.id.indexOf(this.closeIconId) > -1 && -1 === event.type.indexOf("move") && (this.removeSelectedElements(chart, this.selectedDataIndexes, chart.series), 
            this.blurEffect(chart.element.id, chart.visibleSeries), remove(getElement(this.draggedRectGroup)), 
            this.changeCursorStyle(!1, chart.svgObject, "auto"), this.rectPoints = null);
        }, Selection.prototype.resizingSelectionRect = function(chart, location, tapped) {
            var rect = new Rect(this.rectPoints.x, this.rectPoints.y, this.rectPoints.width, this.rectPoints.height), resize = this.findResizeMode(chart.svgObject, rect, location);
            this.resizing && (rect = getDraggedRectLocation(rect.x, rect.y, rect.x + rect.width, rect.y + rect.height, chart.chartAxisLayoutPanel.seriesClipRect), 
            this.drawDraggingRect(chart, rect), this.dragRect = rect), tapped && (this.resizing = resize);
        }, Selection.prototype.findResizeMode = function(chartSvgObject, rect, location) {
            var cursorStyle = "se-resize", resize = !1;
            if (this.resizing) {
                var x = rect.x, y = rect.y, width = location.x - x, height = location.y - y;
                switch (this.resizeMode) {
                  case 0:
                    height = Math.abs(rect.height + rect.y - location.y), rect.y = Math.min(rect.height + rect.y, location.y), 
                    rect.height = height;
                    break;

                  case 1:
                    width = Math.abs(rect.width + rect.x - location.x), rect.x = Math.min(rect.width + rect.x, location.x), 
                    rect.width = width;
                    break;

                  case 2:
                    rect.height = Math.abs(height), rect.y = Math.min(location.y, y);
                    break;

                  case 3:
                    rect.width = Math.abs(width), rect.x = Math.min(location.x, x);
                    break;

                  case 4:
                    rect.width = Math.abs(width), rect.height = Math.abs(height), rect.x = Math.min(location.x, x), 
                    rect.y = Math.min(location.y, y);
                }
            } else for (var resizeEdges = [ new Rect(rect.x, rect.y - 10, rect.width - 5, 20), new Rect(rect.x - 10, rect.y, 20, rect.height), new Rect(rect.x, rect.y + rect.height - 10, rect.width - 10, 20), new Rect(rect.x + rect.width - 10, rect.y + 5, 20, rect.height - 15), new Rect(rect.x + rect.width - 10, rect.y + rect.height - 10, 20, 20) ], i = 0; i < resizeEdges.length; i++) if (withInBounds(location.x, location.y, resizeEdges[i])) {
                cursorStyle = 4 === i ? cursorStyle : i % 2 == 0 ? "ns-resize" : "ew-resize", resize = !0, 
                this.resizeMode = i;
                break;
            }
            return this.changeCursorStyle(resize, getElement(this.draggedRect), cursorStyle), 
            this.changeCursorStyle(resize, chartSvgObject, cursorStyle), resize;
        }, Selection.prototype.changeCursorStyle = function(isResize, rectelement, cursorStyle) {
            cursorStyle = isResize ? cursorStyle : this.control.svgObject === rectelement ? "auto" : "move", 
            rectelement.setAttribute("style", "cursor:" + cursorStyle + ";");
        }, Selection.prototype.removeSelectedElements = function(chart, index, seriesCollection) {
            index.splice(0, index.length);
            for (var seriesElements, _i = 0, seriesCollection_1 = seriesCollection; _i < seriesCollection_1.length; _i++) {
                var series = seriesCollection_1[_i];
                seriesElements = this.getSeriesElements(series), this.removeStyles(seriesElements);
                for (var _a = 0, seriesElements_2 = seriesElements; _a < seriesElements_2.length; _a++) {
                    var seriesElement = seriesElements_2[_a];
                    this.removeStyles(this.getChildren(seriesElement));
                }
            }
        }, Selection.prototype.setAttributes = function(ele, object) {
            for (var _i = 0, keys_1 = Object.keys(object); _i < keys_1.length; _i++) {
                var key = keys_1[_i];
                ele.setAttribute(key, object[key]);
            }
        }, Selection.prototype.draggedRectMoved = function(chart, grabbedPoint, doDrawing) {
            var rect = new Rect(this.rectPoints.x, this.rectPoints.y, this.rectPoints.width, this.rectPoints.height);
            rect.x -= grabbedPoint.x - chart.mouseX, rect.y -= grabbedPoint.y - chart.mouseY, 
            rect = getDraggedRectLocation(rect.x, rect.y, rect.x + rect.width, rect.height + rect.y, chart.chartAxisLayoutPanel.seriesClipRect), 
            doDrawing ? this.drawDraggingRect(chart, rect) : this.calculateDragSelectedElements(chart, rect);
        }, Selection.prototype.completeSelection = function(e) {
            var chart = this.chart;
            "None" !== chart.selectionMode && ((this.dragging || this.resizing) && this.dragRect.width > 5 && this.dragRect.height > 5 ? this.calculateDragSelectedElements(chart, this.dragRect) : this.rectGrabbing && this.rectPoints.width && this.rectPoints.height && this.draggedRectMoved(chart, this.dragRect), 
            this.dragging = !1, this.rectGrabbing = !1, this.resizing = !1, this.removeDraggedElements(chart, e));
        }, Selection.prototype.getDragRect = function(chart, seriesClipRect) {
            return getDraggedRectLocation(chart.mouseDownX, chart.mouseDownY, chart.mouseX, chart.mouseY, seriesClipRect);
        }, Selection.prototype.dragStart = function(chart, seriesClipRect, mouseDownX, mouseDownY, event) {
            this.dragging = chart.selectionMode.indexOf("Drag") > -1 && (chart.isDoubleTap || !chart.isTouch) && "PolarRadar" !== chart.chartAreaType, 
            this.dragging && (this.dragRect = new Rect(chart.mouseDownX, chart.mouseDownY, 0, 0), 
            (chart.mouseDownX < seriesClipRect.x || chart.mouseDownX > seriesClipRect.x + seriesClipRect.width || chart.mouseDownY < seriesClipRect.y || chart.mouseDownY > seriesClipRect.y + seriesClipRect.height) && (this.dragging = !1)), 
            this.rectPoints && (this.dragRect = new Rect(chart.mouseDownX, chart.mouseDownY, 0, 0), 
            this.resizingSelectionRect(chart, new ChartLocation(mouseDownX, mouseDownY), !0), 
            this.rectGrabbing = withInBounds(mouseDownX, mouseDownY, this.rectPoints));
        }, Selection.prototype.mouseMove = function(event) {
            var chart = this.chart;
            if ("None" !== chart.selectionMode) {
                "touchmove" === event.type && (Browser.isIos || Browser.isIos7) && this.dragging && event.preventDefault && event.preventDefault();
                withInBounds(chart.mouseX, chart.mouseY, chart.chartAxisLayoutPanel.seriesClipRect) ? (this.rectGrabbing && !this.resizing ? this.draggedRectMoved(chart, this.dragRect, !0) : this.dragging && !this.resizing && (this.dragRect = this.getDragRect(chart, chart.chartAxisLayoutPanel.seriesClipRect), 
                this.drawDraggingRect(chart, this.dragRect)), this.rectPoints && this.resizingSelectionRect(chart, new ChartLocation(chart.mouseX, chart.mouseY))) : this.completeSelection(event);
            }
        }, Selection.prototype.getModuleName = function() {
            return "Selection";
        }, Selection.prototype.destroy = function(chart) {
            this.removeEventListener();
        }, Selection;
    }(BaseSelection), DataLabel = function() {
        function DataLabel(chart) {
            this.errorHeight = 0, this.chart = chart;
        }
        return DataLabel.prototype.initPrivateVariables = function(series, marker) {
            var transform, render = series.chart.renderer;
            transform = "Cartesian" === series.chart.chartAreaType ? "translate(" + series.clipRect.x + "," + series.clipRect.y + ")" : "", 
            marker.dataLabel.visible && (series.shapeElement = render.createGroup({
                id: this.chart.element.id + "ShapeGroup" + series.index,
                transform: transform,
                "clip-path": "url(#" + this.chart.element.id + "_ChartSeriesClipRect_" + series.index + ")"
            }), series.textElement = render.createGroup({
                id: this.chart.element.id + "TextGroup" + series.index,
                transform: transform,
                "clip-path": "url(#" + this.chart.element.id + "_ChartSeriesClipRect_" + series.index + ")"
            })), this.markerHeight = "Scatter" !== series.type && !marker.visible || this.isRectSeries(series) ? 0 : marker.height / 2, 
            this.commonId = this.chart.element.id + "_Series_" + series.index + "_Point_", this.calculateErrorHeight(series, series.marker.dataLabel.position), 
            this.chartBackground = "trasparent" === this.chart.chartArea.background ? this.chart.background || this.chart.themeStyle.background : this.chart.chartArea.background;
        }, DataLabel.prototype.calculateErrorHeight = function(series, position) {
            if (!series.errorBar.visible) return null;
            if (series.errorBar.visible && "PolarRadar" !== this.chart.chartAreaType) {
                var direction = series.errorBar.direction, positiveHeight = this.chart.errorBarModule.positiveHeight, negativeHeight = this.chart.errorBarModule.negativeHeight;
                this.isRectSeries(series) ? ("Top" !== position && "Auto" !== position || (this.errorHeight = "Both" === direction || "Minus" === direction ? negativeHeight : 0), 
                "Outer" !== position && "Auto" !== position || (this.errorHeight = "Both" === direction || "Plus" === direction ? positiveHeight : 0)) : ("Top" !== position && "Outer" !== position && "Auto" !== position || ("Both" !== direction && "Plus" !== direction || series.chart.isTransposed ? this.errorHeight = 0 : this.errorHeight = positiveHeight), 
                "Bottom" !== position && "Auto" !== position || (this.errorHeight = "Both" === direction || "Minus" === direction ? negativeHeight : 0));
            } else this.errorHeight = 0;
        }, DataLabel.prototype.isRectSeries = function(series) {
            return series.isRectSeries || "RangeArea" === series.type;
        }, DataLabel.prototype.render = function(series, chart, dataLabel) {
            var _this = this;
            this.initPrivateVariables(series, series.marker);
            var rect, rgbValue, contrast, argsData, border, textSize;
            this.inverted = chart.requireInvertedAxis, this.yAxisInversed = series.yAxis.isInversed;
            var element = createElement("div", {
                id: chart.element.id + "_Series_" + series.index + "_DataLabelCollections"
            });
            series.points.map(function(point, index) {
                _this.margin = dataLabel.margin;
                var labelLength, labelText = [], clip = series.clipRect;
                if (border = {
                    width: dataLabel.border.width,
                    color: dataLabel.border.color
                }, point.symbolLocations.length && point.symbolLocations[0] || "BoxAndWhisker" === series.type && point.regions.length) {
                    labelLength = (labelText = function(currentPoint, series, chart) {
                        var labelFormat = series.yAxis.labelFormat, text = [], customLabelFormat = null !== labelFormat.match("{value}");
                        switch (series.seriesType) {
                          case "XY":
                            text.push(currentPoint.text || currentPoint.yValue.toString());
                            break;

                          case "HighLow":
                            text.push(currentPoint.text || Math.max(currentPoint.high, currentPoint.low).toString()), 
                            text.push(currentPoint.text || Math.min(currentPoint.high, currentPoint.low).toString());
                            break;

                          case "HighLowOpenClose":
                            text.push(currentPoint.text || Math.max(currentPoint.high, currentPoint.low).toString()), 
                            text.push(currentPoint.text || Math.min(currentPoint.high, currentPoint.low).toString()), 
                            text.push(currentPoint.text || Math.max(currentPoint.open, currentPoint.close).toString()), 
                            text.push(currentPoint.text || Math.min(currentPoint.open, currentPoint.close).toString());
                            break;

                          case "BoxPlot":
                            text.push(currentPoint.text || currentPoint.median.toString()), text.push(currentPoint.text || currentPoint.maximum.toString()), 
                            text.push(currentPoint.text || currentPoint.minimum.toString()), text.push(currentPoint.text || currentPoint.upperQuartile.toString()), 
                            text.push(currentPoint.text || currentPoint.lowerQuartile.toString());
                            for (var _i = 0, _a = currentPoint.outliers; _i < _a.length; _i++) {
                                var liers = _a[_i];
                                text.push(currentPoint.text || liers.toString());
                            }
                        }
                        if (labelFormat && !currentPoint.text) for (var i = 0; i < text.length; i++) text[i] = customLabelFormat ? labelFormat.replace("{value}", series.yAxis.format(parseFloat(text[i]))) : series.yAxis.format(parseFloat(text[i]));
                        return text;
                    }(point, series)).length;
                    for (var i = 0; i < labelLength; i++) argsData = {
                        cancel: !1,
                        name: "textRender",
                        series: series,
                        point: point,
                        text: labelText[i],
                        border: border,
                        color: dataLabel.fill,
                        template: dataLabel.template
                    }, chart.trigger("textRender", argsData), argsData.cancel || (_this.fontBackground = argsData.color, 
                    _this.isDataLabelShape(argsData), _this.markerHeight = "Bubble" === series.type ? point.regions[0].height / 2 : _this.markerHeight, 
                    null !== argsData.template ? _this.createDataLabelTemplate(element, series, dataLabel, point, argsData, i) : (textSize = measureText(argsData.text, dataLabel.font), 
                    isCollide$2(rect = _this.calculateTextPosition(point, series, textSize, dataLabel, i), chart.dataLabelCollections, clip) || (chart.dataLabelCollections.push(new Rect(rect.x + clip.x, rect.y + clip.y, rect.width, rect.height)), 
                    _this.isShape && series.shapeElement.appendChild(chart.renderer.drawRectangle(new RectOption(_this.commonId + index + "_TextShape_" + i, argsData.color, argsData.border, dataLabel.opacity, rect, dataLabel.rx, dataLabel.ry))), 
                    rgbValue = convertHexToColor(colorNameToHex(_this.fontBackground)), contrast = Math.round((299 * rgbValue.r + 587 * rgbValue.g + 114 * rgbValue.b) / 1e3), 
                    textElement(new TextOption(_this.commonId + index + "_Text_" + i, rect.x + _this.margin.left + textSize.width / 2, rect.y + _this.margin.top + 3 * textSize.height / 4, "middle", argsData.text, "rotate(0," + rect.x + "," + rect.y + ")", "auto"), dataLabel.font, dataLabel.font.color || (contrast >= 128 || "Hilo" === series.type ? "black" : "white"), series.textElement))));
                }
            }), element.childElementCount && getElement(chart.element.id + "_Secondary_Element").appendChild(element);
        }, DataLabel.prototype.createDataLabelTemplate = function(parentElement, series, dataLabel, point, data, labelIndex) {
            this.margin = {
                left: 0,
                right: 0,
                bottom: 0,
                top: 0
            };
            var clip = series.clipRect, childElement = createTemplate(createElement("div", {
                id: this.chart.element.id + "_Series_" + series.index + "_DataLabel_" + point.index + (labelIndex ? "_" + labelIndex : ""),
                styles: "position: absolute;background-color:" + data.color + ";" + getFontStyle(dataLabel.font) + ";border:" + data.border.width + "px solid " + data.border.color + ";"
            }), point.index, data.template, this.chart, point, series), elementRect = measureElementRect(childElement), rect = this.calculateTextPosition(point, series, {
                width: elementRect.width,
                height: elementRect.height
            }, dataLabel, labelIndex);
            childElement.style.left = ("PolarRadar" === this.chart.chartAreaType ? 0 : series.clipRect.x) + rect.x + "px", 
            childElement.style.top = ("PolarRadar" === this.chart.chartAreaType ? 0 : series.clipRect.y) + rect.y + "px";
            var rgbValue = convertHexToColor(colorNameToHex(this.fontBackground)), vAxis = series.chart.requireInvertedAxis ? series.xAxis : series.yAxis, hAxis = series.chart.requireInvertedAxis ? series.yAxis : series.xAxis;
            childElement.style.color = dataLabel.font.color || (Math.round((299 * rgbValue.r + 587 * rgbValue.g + 114 * rgbValue.b) / 1e3) >= 128 ? "black" : "white"), 
            childElement.childElementCount && !isCollide$2(rect, this.chart.dataLabelCollections, clip) && ("XY" !== series.seriesType || void 0 === point.yValue || withIn(point.yValue, series.yAxis.visibleRange) || series.type.indexOf("100") > -1 && withIn(series.stackedValues.endValues[point.index], series.yAxis.visibleRange)) && withIn(point.xValue, series.xAxis.visibleRange) && parseFloat(childElement.style.top) >= vAxis.rect.y && parseFloat(childElement.style.left) >= hAxis.rect.x && parseFloat(childElement.style.top) <= vAxis.rect.y + vAxis.rect.height && parseFloat(childElement.style.left) <= hAxis.rect.x + hAxis.rect.width && (this.chart.dataLabelCollections.push(new Rect(rect.x + clip.x, rect.y + clip.y, rect.width, rect.height)), 
            parentElement.appendChild(childElement), series.animation.enable && this.chart.animateSeries && this.doDataLabelAnimation(series, childElement));
        }, DataLabel.prototype.calculateTextPosition = function(point, series, textSize, dataLabel, labelIndex) {
            var labelRegion = labelIndex > 1 && "Candle" === series.type ? point.regions[1] : point.regions[0];
            labelIndex > 1 && "HiloOpenClose" === series.type && (labelRegion = 2 === labelIndex ? point.regions[1] : point.regions[2]);
            var location;
            location = this.getLabelLocation(point, series, textSize, labelIndex);
            var rect, clipRect = series.clipRect;
            if (this.chart.requireInvertedAxis && this.isRectSeries(series) && "BoxAndWhisker" !== series.type) {
                this.locationY = location.y;
                alignmentValue = textSize.width + this.borderWidth + this.margin.left + this.margin.right - 5;
                location.x = "Auto" === dataLabel.position ? location.x : this.calculateAlignment(alignmentValue, location.x, dataLabel.alignment, point.yValue < 0), 
                location.x = this.calculateRectPosition(location.x, labelRegion, point.yValue < 0 !== this.yAxisInversed, dataLabel.position, series, textSize, labelIndex, point);
            } else {
                this.locationX = location.x;
                var alignmentValue = textSize.height + 2 * this.borderWidth + this.markerHeight + this.margin.bottom + this.margin.top + 5;
                location.y = "Auto" === dataLabel.position ? location.y : this.calculateAlignment(alignmentValue, location.y, dataLabel.alignment, !!this.isRectSeries(series) && point.yValue < 0), 
                location.y = this.isRectSeries(series) && "BoxAndWhisker" !== series.type ? this.calculateRectPosition(location.y, labelRegion, point.yValue < 0 !== this.yAxisInversed, dataLabel.position, series, textSize, labelIndex, point) : this.calculatePathPosition(location.y, dataLabel.position, series, point, textSize, labelIndex), 
                this.isRectSeries(series) && "PolarRadar" === this.chart.chartAreaType && (location = this.calculatePolarRectPosition(location, dataLabel.position, series, point, textSize, labelIndex));
            }
            return (rect = calculateRect(location, textSize, this.margin)).y > clipRect.height || rect.x > clipRect.width || rect.x + rect.width < 0 || rect.y + rect.height < 0 || (rect.x = rect.x < 0 ? 5 : rect.x, 
            rect.y = rect.y < 0 ? 5 : rect.y, rect.x -= rect.x + rect.width > clipRect.width ? rect.x + rect.width - clipRect.width + 5 : 0, 
            rect.y -= rect.y + rect.height > clipRect.height ? rect.y + rect.height - clipRect.height + 5 : 0, 
            this.fontBackground = "transparent" === this.fontBackground ? this.chartBackground : this.fontBackground), 
            rect;
        }, DataLabel.prototype.calculatePolarRectPosition = function(location, position, series, point, size, labelIndex) {
            var columnRadius, angle = point.regionData.startAngle - .5 * Math.PI + (point.regionData.endAngle - point.regionData.startAngle) / 2;
            return columnRadius = 0 === labelIndex ? point.regionData.radius < point.regionData.innerRadius ? point.regionData.innerRadius : point.regionData.radius : point.regionData.radius > point.regionData.innerRadius ? point.regionData.innerRadius : point.regionData.radius, 
            this.fontBackground = "transparent" === this.fontBackground ? this.chartBackground : this.fontBackground, 
            series.drawType.indexOf("Stacking") > -1 ? position = "Outer" === position ? "Top" : position : series.drawType.indexOf("Range") > -1 && (position = "Outer" === position || "Top" === position ? position : "Auto"), 
            columnRadius = "Outer" === position ? 0 === labelIndex ? columnRadius + 10 : columnRadius - 10 : "Middle" === position ? columnRadius / 2 + 5 : "Top" === position ? 0 === labelIndex ? columnRadius - 10 : columnRadius + 10 : "Bottom" === position ? 5 : 0 === labelIndex ? columnRadius >= series.chart.radius ? columnRadius - 5 : "StackingColumn" === series.drawType ? columnRadius - 10 : columnRadius + 10 : columnRadius >= series.chart.radius ? columnRadius + 5 : columnRadius - 10, 
            location.x = series.clipRect.width / 2 + series.clipRect.x + columnRadius * Math.cos(angle), 
            location.y = series.clipRect.height / 2 + series.clipRect.y + columnRadius * Math.sin(angle), 
            location;
        }, DataLabel.prototype.getLabelLocation = function(point, series, textSize, labelIndex) {
            var location = new ChartLocation(0, 0), labelRegion = "Candle" === series.type && labelIndex > 1 ? point.regions[1] : point.regions[0];
            "HiloOpenClose" === series.type && (labelRegion = 2 === labelIndex ? point.regions[1] : point.regions[2]);
            var xAxis = series.xAxis, yAxis = series.yAxis, isInverted = series.chart.requireInvertedAxis;
            if ("BoxAndWhisker" === series.type) switch (this.markerHeight = 0, labelIndex) {
              case 0:
                location = getPoint(point.xValue, point.median, xAxis, yAxis, isInverted);
                break;

              case 1:
                location = getPoint(point.xValue, point.maximum, xAxis, yAxis, isInverted);
                break;

              case 2:
                location = getPoint(point.xValue, point.minimum, xAxis, yAxis, isInverted);
                break;

              case 3:
                location = getPoint(point.xValue, point.upperQuartile, xAxis, yAxis, isInverted);
                break;

              case 4:
                location = getPoint(point.xValue, point.lowerQuartile, xAxis, yAxis, isInverted);
                break;

              default:
                location = getPoint(point.xValue, point.outliers[labelIndex - 5], xAxis, yAxis, isInverted), 
                this.markerHeight = series.marker.height / 2;
            } else location = 0 === labelIndex || 1 === labelIndex ? new ChartLocation(point.symbolLocations[0].x, point.symbolLocations[0].y) : 2 !== labelIndex && 3 !== labelIndex || "Candle" !== series.type ? isInverted ? {
                x: labelRegion.x + labelRegion.width / 2,
                y: labelRegion.y
            } : {
                x: labelRegion.x + labelRegion.width,
                y: labelRegion.y + labelRegion.height / 2
            } : new ChartLocation(point.symbolLocations[1].x, point.symbolLocations[1].y);
            if (labelIndex > 1 && "HiloOpenClose" === series.type) if (series.chart.requireInvertedAxis) {
                var height = labelRegion.height;
                location.y = labelRegion.y + height / 2 + 2 * (2 === labelIndex ? 1 : -1);
            } else {
                var width = labelRegion.width;
                location.x = labelRegion.x + width / 2 + 2 * (2 === labelIndex ? 1 : -1);
            }
            return location;
        }, DataLabel.prototype.calculateRectPosition = function(labelLocation, rect, isMinus, position, series, textSize, labelIndex, point) {
            if ("PolarRadar" === series.chart.chartAreaType) return null;
            var margin = this.margin, textLength = this.inverted ? textSize.width : textSize.height, extraSpace = this.borderWidth + textLength / 2 + 5;
            switch (series.type.indexOf("Stacking") > -1 ? position = "Outer" === position ? "Top" : position : series.type.indexOf("Range") > -1 ? position = "Outer" === position || "Top" === position ? position : "Auto" : "Waterfall" === series.type && (position = "Auto" === position ? "Middle" : position), 
            position) {
              case "Bottom":
                labelLocation = this.inverted ? isMinus ? labelLocation + rect.width - extraSpace - margin.left : labelLocation - rect.width + extraSpace + margin.right : isMinus ? labelLocation - rect.height + extraSpace + margin.top : labelLocation + rect.height - extraSpace - margin.bottom;
                break;

              case "Middle":
                labelLocation = labelLocation = this.inverted ? isMinus ? labelLocation + rect.width / 2 : labelLocation - rect.width / 2 : isMinus ? labelLocation - rect.height / 2 : labelLocation + rect.height / 2;
                break;

              case "Auto":
                labelLocation = this.calculateRectActualPosition(labelLocation, rect, isMinus, series, textSize, labelIndex, point);
                break;

              default:
                extraSpace += this.errorHeight, labelLocation = this.calculateTopAndOuterPosition(labelLocation, rect, position, series, labelIndex, extraSpace, isMinus);
            }
            var check = this.inverted ? labelLocation < rect.x || labelLocation > rect.x + rect.width : labelLocation < rect.y || labelLocation > rect.y + rect.height;
            return this.fontBackground = check ? "transparent" === this.fontBackground ? this.chartBackground : this.fontBackground : "transparent" === this.fontBackground ? point.color || series.interior : this.fontBackground, 
            labelLocation;
        }, DataLabel.prototype.calculatePathPosition = function(labelLocation, position, series, point, size, labelIndex) {
            switch (series.type.indexOf("Area") > -1 && "RangeArea" !== series.type && this.yAxisInversed && "Auto" !== series.marker.dataLabel.position && (position = "Top" === position ? "Bottom" : "Bottom" === position ? "Top" : position), 
            this.fontBackground = "transparent" === this.fontBackground ? this.chartBackground : this.fontBackground, 
            position) {
              case "Top":
              case "Outer":
                labelLocation = labelLocation - this.markerHeight - this.borderWidth - size.height / 2 - this.margin.bottom - 5 - this.errorHeight;
                break;

              case "Bottom":
                labelLocation = labelLocation + this.markerHeight + this.borderWidth + size.height / 2 + this.margin.top + 5 + this.errorHeight;
                break;

              case "Auto":
                labelLocation = this.calculatePathActualPosition(labelLocation, this.markerHeight, series, point, size, labelIndex);
            }
            return labelLocation;
        }, DataLabel.prototype.isDataLabelShape = function(style) {
            this.isShape = "transparent" !== style.color || style.border.width > 0, this.borderWidth = style.border.width, 
            this.isShape || (this.margin = {
                left: 0,
                right: 0,
                bottom: 0,
                top: 0
            });
        }, DataLabel.prototype.calculateRectActualPosition = function(labelLocation, rect, isMinus, series, size, labelIndex, point) {
            for (var location, labelRect, isOverLap = !0, position = 0, collection = this.chart.dataLabelCollections, finalPosition = -1 !== series.type.indexOf("Range") || "Hilo" === series.type ? 2 : 4; isOverLap && position < finalPosition; ) location = this.calculateRectPosition(labelLocation, rect, isMinus, this.getPosition(position), series, size, labelIndex, point), 
            isOverLap = this.inverted ? (labelRect = calculateRect(new ChartLocation(location, this.locationY), size, this.margin)).x < 0 || isCollide$2(labelRect, collection, series.clipRect) || labelRect.x + labelRect.width > series.clipRect.width : (labelRect = calculateRect(new ChartLocation(this.locationX, location), size, this.margin)).y < 0 || isCollide$2(labelRect, collection, series.clipRect) || labelRect.y > series.clipRect.height, 
            position++;
            return location;
        }, DataLabel.prototype.calculateAlignment = function(value, labelLocation, alignment, isMinus) {
            switch (alignment) {
              case "Far":
                labelLocation = this.inverted ? isMinus ? labelLocation - value : labelLocation + value : isMinus ? labelLocation + value : labelLocation - value;
                break;

              case "Near":
                labelLocation = this.inverted ? isMinus ? labelLocation + value : labelLocation - value : isMinus ? labelLocation - value : labelLocation + value;
                break;

              case "Center":
                labelLocation = labelLocation;
            }
            return labelLocation;
        }, DataLabel.prototype.calculateTopAndOuterPosition = function(location, rect, position, series, index, extraSpace, isMinus) {
            var top, margin = this.margin;
            switch (series.type) {
              case "RangeColumn":
              case "RangeArea":
              case "Hilo":
                top = 0 === index && !this.yAxisInversed || 1 === index && this.yAxisInversed, location = this.updateLabelLocation(position, location, extraSpace, margin, rect, top);
                break;

              case "Candle":
                top = (0 === index || 2 === index) && !this.yAxisInversed || (1 === index || 3 === index) && this.yAxisInversed, 
                location = this.updateLabelLocation(position, location, extraSpace, margin, rect, top, index > 1);
                break;

              case "HiloOpenClose":
                index <= 1 ? (top = 0 === index && !this.yAxisInversed || 1 === index && this.yAxisInversed, 
                location = this.updateLabelLocation(position, location, extraSpace, margin, rect, top)) : location = this.yAxisInversed ? this.inverted ? location - extraSpace - margin.right : location + extraSpace + margin.top : this.inverted ? location + extraSpace + margin.left : location - extraSpace - margin.bottom;
                break;

              default:
                location = isMinus && "Top" === position || !isMinus && "Outer" === position ? this.inverted ? location + extraSpace + margin.left : location - extraSpace - margin.bottom : this.inverted ? location - extraSpace - margin.right : location + extraSpace + margin.top;
            }
            return location;
        }, DataLabel.prototype.updateLabelLocation = function(position, location, extraSpace, margin, rect, top, inside$$1) {
            return void 0 === inside$$1 && (inside$$1 = !1), location = this.inverted ? top ? "Outer" !== position || inside$$1 ? location - extraSpace - margin.right : location + extraSpace + margin.left : "Outer" !== position || inside$$1 ? location - rect.width + extraSpace + margin.left : location - rect.width - extraSpace - margin.right : top ? "Outer" !== position || inside$$1 ? location + extraSpace + margin.top : location - extraSpace - margin.bottom : "Outer" !== position || inside$$1 ? location + rect.height - extraSpace - margin.bottom : location + rect.height + extraSpace + margin.top;
        }, DataLabel.prototype.calculatePathActualPosition = function(y, markerSize, series, point, size, labelIndex) {
            var position, yLocation, labelRect, isBottom, positionIndex, points = series.points, index = point.index, yValue = points[index].yValue, nextPoint = points.length - 1 > index ? points[index + 1] : null, previousPoint = index > 0 ? points[index - 1] : null, isOverLap = !0, collection = this.chart.dataLabelCollections;
            if ("Bubble" === series.type) position = "Top"; else if (series.type.indexOf("Step") > -1) position = "Top", 
            index && (position = previousPoint && previousPoint.visible && yValue > previousPoint.yValue === this.yAxisInversed && yValue !== previousPoint.yValue ? "Bottom" : "Top"); else if ("BoxAndWhisker" === series.type) 1 === labelIndex || 3 === labelIndex || labelIndex > 4 ? position = series.yAxis.isInversed ? "Bottom" : "Top" : 2 === labelIndex || 4 === labelIndex ? position = series.yAxis.isInversed ? "Top" : "Bottom" : (isOverLap = !1, 
            position = "Middle", yLocation = this.calculatePathPosition(y, position, series, point, size, labelIndex)); else if (0 === index) position = !nextPoint || !nextPoint.visible || yValue > nextPoint.yValue || yValue < nextPoint.yValue && this.yAxisInversed ? "Top" : "Bottom"; else if (index === points.length - 1) position = !previousPoint || !previousPoint.visible || yValue > previousPoint.yValue || yValue < previousPoint.yValue && this.yAxisInversed ? "Top" : "Bottom"; else if (nextPoint.visible || previousPoint && previousPoint.visible) if (nextPoint.visible && previousPoint) {
                var slope = (nextPoint.yValue - previousPoint.yValue) / 2, intersectY = slope * index + (nextPoint.yValue - slope * (index + 1));
                position = this.yAxisInversed ? intersectY < yValue ? "Bottom" : "Top" : intersectY < yValue ? "Top" : "Bottom";
            } else position = nextPoint.yValue > yValue || previousPoint && previousPoint.yValue > yValue ? "Bottom" : "Top"; else position = "Top";
            for (isBottom = "Bottom" === position, positionIndex = [ "Outer", "Top", "Bottom", "Middle", "Auto" ].indexOf(position); isOverLap && positionIndex < 4; ) yLocation = this.calculatePathPosition(y, this.getPosition(positionIndex), series, point, size, labelIndex), 
            isOverLap = (labelRect = calculateRect(new ChartLocation(this.locationX, yLocation), size, this.margin)).y < 0 || isCollide$2(labelRect, collection, series.clipRect) || labelRect.y + labelRect.height > series.clipRect.height, 
            positionIndex = isBottom ? positionIndex - 1 : positionIndex + 1, isBottom = !1;
            return yLocation;
        }, DataLabel.prototype.doDataLabelAnimation = function(series, element) {
            for (var location, shapeElements = series.shapeElement.childNodes, textNode = series.textElement.childNodes, delay = series.animation.delay + series.animation.duration, length = element ? 1 : textNode.length, i = 0; i < length; i++) element ? (element.style.visibility = "hidden", 
            templateAnimate(element, delay, 200, "ZoomIn")) : (location = new ChartLocation(+textNode[i].getAttribute("x") + +textNode[i].getAttribute("width") / 2, +textNode[i].getAttribute("y") + +textNode[i].getAttribute("height") / 2), 
            markerAnimate(textNode[i], delay, 200, series, null, location, !0), shapeElements[i] && (location = new ChartLocation(+shapeElements[i].getAttribute("x") + +shapeElements[i].getAttribute("width") / 2, +shapeElements[i].getAttribute("y") + +shapeElements[i].getAttribute("height") / 2), 
            markerAnimate(shapeElements[i], delay, 200, series, null, location, !0)));
        }, DataLabel.prototype.getPosition = function(index) {
            return [ "Outer", "Top", "Bottom", "Middle", "Auto" ][index];
        }, DataLabel.prototype.getModuleName = function() {
            return "DataLabel";
        }, DataLabel.prototype.destroy = function(chart) {}, DataLabel;
    }(), ErrorBar = function() {
        function ErrorBar(chart) {
            this.chart = chart;
        }
        return ErrorBar.prototype.render = function(series) {
            if ("PolarRadar" === this.chart.chartAreaType) return null;
            this.createElement(series), this.renderErrorBar(series);
        }, ErrorBar.prototype.renderErrorBar = function(series) {
            for (var symbolId, capId, seriesIndex = series.index, errorbar = series.errorBar, errorBarCap = series.errorBar.errorBarCap, errorDirection = (series.border, 
            [ "", "" ]), _i = 0, _a = series.points; _i < _a.length; _i++) {
                var point_1 = _a[_i];
                if (point_1.visible && point_1.symbolLocations[0]) {
                    var errorX = 0, errorY = 0;
                    switch (errorbar.mode) {
                      case "Vertical":
                        errorY = errorbar.verticalError;
                        break;

                      case "Horizontal":
                        errorX = errorbar.horizontalError;
                        break;

                      case "Both":
                        errorX = errorbar.horizontalError, errorY = errorbar.verticalError;
                    }
                    errorDirection = this["calculate" + errorbar.type + "Value"](point_1, series, this.chart.requireInvertedAxis, errorX, errorY), 
                    symbolId = this.chart.element.id + "_Series__ErrorBarGroup_" + seriesIndex + "_Point_" + point_1.index, 
                    capId = this.chart.element.id + "_Series__ErrorBarCap_" + seriesIndex + "_Point_" + point_1.index;
                    var shapeOption = new PathOption(symbolId, "", errorbar.width, errorbar.color || this.chart.themeStyle.errorBar, null, "", errorDirection[0]), path = this.chart.renderer.drawPath(shapeOption);
                    series.errorBarElement.appendChild(path);
                    var capOption = new PathOption(capId, "", errorBarCap.width, errorBarCap.color || this.chart.themeStyle.errorBar, null, "", errorDirection[1]), capPath = this.chart.renderer.drawPath(capOption);
                    series.errorBarElement.appendChild(capPath);
                }
            }
        }, ErrorBar.prototype.findLocation = function(point, series, isInverted, x1, y1) {
            var errorbar = series.errorBar, direction = errorbar.direction, location = [], yValue = (series.stackedValues, 
            series.type.indexOf("Stacking") > -1 ? series.stackedValues.endValues[point.index] : "HighLow" === series.seriesType || "HighLowOpenClose" === series.seriesType ? series.points[point.index].high : point.yValue), startPoint = getPoint(point.xValue + ("Plus" === direction || "Both" === direction ? "Custom" !== errorbar.type || "Horizontal" !== errorbar.mode && "Both" !== errorbar.mode ? x1 : x1 = errorbar.horizontalPositiveError : 0), yValue + ("Plus" === direction || "Both" === direction ? "Custom" !== errorbar.type || "Vertical" !== errorbar.mode && "Both" !== errorbar.mode ? y1 : y1 = errorbar.verticalPositiveError : 0), series.xAxis, series.yAxis, isInverted);
            if (location.push(startPoint), series.isRectSeries) {
                var midPoint = point.symbolLocations[0];
                location.push(midPoint);
            } else {
                midPoint = getPoint(point.xValue, point.yValue, series.xAxis, series.yAxis, isInverted);
                location.push(midPoint);
            }
            var endPoint = getPoint(point.xValue - ("Minus" === direction || "Both" === direction ? "Custom" !== errorbar.type || "Horizontal" !== errorbar.mode && "Both" !== errorbar.mode ? x1 : x1 = errorbar.horizontalNegativeError : 0), yValue - ("Minus" === direction || "Both" === direction ? "Custom" !== errorbar.type || "Vertical" !== errorbar.mode && "Both" !== errorbar.mode ? y1 : y1 = errorbar.verticalNegativeError : 0), series.xAxis, series.yAxis, isInverted);
            return location.push(endPoint), point.error = "Vertical" === errorbar.mode ? errorbar.verticalError : errorbar.horizontalError, 
            this.negativeHeight = "Vertical" === errorbar.mode || "Both" === errorbar.mode ? isInverted ? location[1].x - location[2].x : location[2].y - location[1].y : 0, 
            this.positiveHeight = "Vertical" === errorbar.mode || "Both" === errorbar.mode ? isInverted ? location[0].x - location[1].x : location[1].y - location[0].y : 0, 
            this.getErrorDirection(location[0], location[1], location[2], series, isInverted);
        }, ErrorBar.prototype.calculateFixedValue = function(point, series, isInverted, errorX, errorY, xAxis, yAxis) {
            series.errorBar;
            return this.findLocation(point, series, isInverted, errorX, errorY);
        }, ErrorBar.prototype.calculatePercentageValue = function(point, series, isInverted, errorX, errorY, xAxis, yAxis) {
            return errorX = errorX / 100 * point.xValue, errorY = errorY / 100 * point.yValue, 
            this.findLocation(point, series, isInverted, errorX, errorY);
        }, ErrorBar.prototype.calculateStandardDeviationValue = function(point, series, isInverted, errorX, errorY, xAxis, yAxis) {
            var getMean = this.meanCalculation(series, series.errorBar.mode);
            return errorX *= getMean.horizontalSquareRoot + getMean.horizontalMean, errorY *= getMean.verticalSquareRoot + getMean.verticalMean, 
            this.findLocation(point, series, isInverted, errorX, errorY);
        }, ErrorBar.prototype.calculateStandardErrorValue = function(point, series, isInverted, errorX, errorY, xAxis, yAxis) {
            var length = series.points.length, getMean = this.meanCalculation(series, series.errorBar.mode);
            return errorX = errorX * getMean.horizontalSquareRoot / Math.sqrt(length), errorY = errorY * getMean.verticalSquareRoot / Math.sqrt(length), 
            this.findLocation(point, series, isInverted, errorX, errorY);
        }, ErrorBar.prototype.calculateCustomValue = function(point, series, isInverted, errorX, errorY, xAxis, yAxis) {
            series.errorBar;
            return this.findLocation(point, series, isInverted, errorX, errorY);
        }, ErrorBar.prototype.getHorizontalDirection = function(start, mid, end, direction, errorMode, capLength) {
            var path = "", capDirection = "";
            return path += " M " + start.x + " " + mid.y + " L " + end.x + " " + mid.y, capDirection += "Plus" === direction || "Both" === direction ? " M " + start.x + " " + (mid.y - capLength) + " L " + start.x + " " + (mid.y + capLength) : "", 
            capDirection += "Minus" === direction || "Both" === direction ? " M " + end.x + " " + (mid.y - capLength) + " L " + end.x + " " + (mid.y + capLength) : " ", 
            [ path, capDirection ];
        }, ErrorBar.prototype.getVerticalDirection = function(start, mid, end, direction, errorMode, capLength) {
            var path = "", capDirection = "";
            return path += " M " + mid.x + " " + start.y + " L " + mid.x + " " + end.y, capDirection += "Plus" === direction || "Both" === direction ? " M " + (mid.x - capLength) + " " + start.y + " L " + (mid.x + capLength) + " " + start.y : "", 
            capDirection += "Minus" === direction || "Both" === direction ? " M " + (mid.x - capLength) + " " + end.y + " L " + (mid.x + capLength) + " " + end.y : "", 
            [ path, capDirection ];
        }, ErrorBar.prototype.getBothDirection = function(start, mid, end, direction, errorMode, capLength) {
            var capDirection = "", path = "", pathH = this.getHorizontalDirection(start, mid, end, direction, errorMode, capLength), pathV = this.getVerticalDirection(start, mid, end, direction, errorMode, capLength);
            return path = pathH[0].concat(pathV[0]), capDirection = pathH[1].concat(pathV[1]), 
            [ path, capDirection ];
        }, ErrorBar.prototype.getErrorDirection = function(start, mid, end, series, isInverted) {
            var paths, direction = series.errorBar.direction, mode = series.errorBar.mode, capLength = series.errorBar.errorBarCap.length, errorMode = mode;
            switch (mode) {
              case "Both":
                errorMode = mode;
                break;

              case "Horizontal":
                errorMode = isInverted ? "Vertical" : mode;
                break;

              case "Vertical":
                errorMode = isInverted ? "Horizontal" : mode;
            }
            switch (errorMode) {
              case "Horizontal":
                paths = this.getHorizontalDirection(start, mid, end, direction, errorMode, capLength);
                break;

              case "Vertical":
                paths = this.getVerticalDirection(start, mid, end, direction, errorMode, capLength);
                break;

              case "Both":
                paths = this.getBothDirection(start, mid, end, direction, errorMode, capLength);
            }
            return [ paths[0], paths[1] ];
        }, ErrorBar.prototype.meanCalculation = function(series, mode) {
            var verStandardMean, horStandardMean, verSquareRoot, horSquareRoot, sumOfX = 0, sumOfY = 0, verticalMean = 0, horizontalMean = 0, length = series.points.length;
            switch (mode) {
              case "Vertical":
                verticalMean = (sumOfY = sum(series.yData)) / length;
                break;

              case "Horizontal":
                horizontalMean = (sumOfX = sum(series.xData)) / length;
                break;

              case "Both":
                verticalMean = (sumOfY = sum(series.yData)) / length, horizontalMean = (sumOfX = sum(series.xData)) / length;
            }
            for (var _i = 0, _a = series.points; _i < _a.length; _i++) {
                var point = _a[_i];
                "Vertical" === mode ? sumOfY += Math.pow(point.yValue - verticalMean, 2) : "Horizontal" === mode ? sumOfX += Math.pow(point.xValue - horizontalMean, 2) : (sumOfY += Math.pow(point.yValue - verticalMean, 2), 
                sumOfX += Math.pow(point.xValue - horizontalMean, 2));
            }
            return verStandardMean = sumOfY / (length - 1), verSquareRoot = Math.sqrt(sumOfY / (length - 1)), 
            horStandardMean = sumOfX / (length - 1), horSquareRoot = Math.sqrt(sumOfX / (length - 1)), 
            new Mean(verStandardMean, verSquareRoot, horStandardMean, horSquareRoot, verticalMean, horizontalMean);
        }, ErrorBar.prototype.createElement = function(series) {
            var transform, render = series.chart.renderer;
            transform = "Cartesian" === series.chart.chartAreaType ? "translate(" + series.clipRect.x + "," + series.clipRect.y + ")" : "";
            var markerHeight = (series.marker.height + 5) / 2, markerWidth = (series.marker.width + 5) / 2;
            if ("Cartesian" === series.chart.chartAreaType) {
                var errorBarClipRect = render.drawClipPath(new RectOption(this.chart.element.id + "_ChartErrorBarClipRect_" + series.index, "transparent", {
                    width: 1,
                    color: "Gray"
                }, 1, {
                    x: -markerWidth,
                    y: -markerHeight,
                    width: series.clipRect.width + 2 * markerWidth,
                    height: series.clipRect.height + 2 * markerHeight
                }));
                series.errorBarElement = render.createGroup({
                    id: this.chart.element.id + "ErrorBarGroup" + series.index,
                    transform: transform,
                    "clip-path": "url(#" + this.chart.element.id + "_ChartErrorBarClipRect_" + series.index + ")"
                }), series.errorBarElement.appendChild(errorBarClipRect);
            }
        }, ErrorBar.prototype.doErrorBarAnimation = function(series) {
            var errorBarElements = series.errorBarElement.childNodes;
            if (!errorBarElements) return null;
            for (var delay = series.animation.delay + series.animation.duration, j = 1; j < errorBarElements.length; ) {
                for (var i = 0; i < series.points.length; i++) series.points[i].symbolLocations[0] && (errorBarElements[j].style.visibility = "hidden", 
                templateAnimate(errorBarElements[j], delay, 350, series.chart.requireInvertedAxis ? "SlideLeftIn" : "SlideBottomIn", !1));
                j++;
            }
        }, ErrorBar.prototype.getModuleName = function() {
            return "ErrorBar";
        }, ErrorBar.prototype.destroy = function(chart) {}, ErrorBar;
    }(), __extends$102 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), Legend = function(_super) {
        function Legend(chart) {
            var _this = _super.call(this, chart) || this;
            return _this.library = _this, _this.addEventListener(), _this;
        }
        return __extends$102(Legend, _super), Legend.prototype.addEventListener = function() {
            this.chart.isDestroyed || (this.chart.on(Browser.touchMoveEvent, this.mouseMove, this), 
            this.chart.on("click", this.click, this), this.chart.on(Browser.touchEndEvent, this.mouseEnd, this));
        }, Legend.prototype.removeEventListener = function() {
            this.chart.isDestroyed || (this.chart.off(Browser.touchMoveEvent, this.mouseMove), 
            this.chart.off("click", this.click), this.chart.off(Browser.touchEndEvent, this.mouseEnd));
        }, Legend.prototype.mouseMove = function(e) {
            this.chart.legendSettings.visible && !this.chart.isTouch && this.move(e);
        }, Legend.prototype.mouseEnd = function(e) {
            this.chart.legendSettings.visible && this.chart.isTouch && this.move(e);
        }, Legend.prototype.getLegendOptions = function(visibleSeriesCollection, chart) {
            this.legendCollections = [];
            for (var seriesType, _i = 0, visibleSeriesCollection_1 = visibleSeriesCollection; _i < visibleSeriesCollection_1.length; _i++) {
                var series = visibleSeriesCollection_1[_i];
                "Indicator" !== series.category && (seriesType = "PolarRadar" === chart.chartAreaType ? series.drawType : series.type, 
                this.legendCollections.push(new LegendOptions(series.name, series.interior, series.legendShape, series.visible, seriesType, series.marker.shape, series.marker.visible)));
            }
        }, Legend.prototype.getLegendBounds = function(availableSize, legendBounds, legend) {
            var padding = legend.padding, extraHeight = 0, extraWidth = 0;
            this.isVertical ? extraWidth = legend.width ? 0 : availableSize.width / 100 * 5 : extraHeight = legend.height ? 0 : availableSize.height / 100 * 5, 
            legendBounds.height += extraHeight, legendBounds.width += extraWidth;
            legend.shapeHeight;
            var legendEventArgs, shapeWidth = legend.shapeWidth, shapePadding = legend.shapePadding, maximumWidth = 0, rowWidth = 0, legendWidth = 0, columnHeight = 0, rowCount = 0;
            this.maxItemHeight = Math.max(measureText("MeasureText", legend.textStyle).height, legend.shapeHeight);
            for (var render = !1, _i = 0, _a = this.legendCollections; _i < _a.length; _i++) {
                var legendOption = _a[_i];
                legendEventArgs = {
                    fill: legendOption.fill,
                    text: legendOption.text,
                    shape: legendOption.shape,
                    markerShape: legendOption.markerShape,
                    name: "legendRender",
                    cancel: !1
                }, this.chart.trigger("legendRender", legendEventArgs), legendOption.render = !legendEventArgs.cancel, 
                legendOption.text = legendEventArgs.text, legendOption.fill = legendEventArgs.fill, 
                legendOption.shape = legendEventArgs.shape, legendOption.markerShape = legendEventArgs.markerShape, 
                legendOption.textSize = measureText(legendOption.text, legend.textStyle), legendOption.render && "" !== legendOption.text && (render = !0, 
                rowWidth += legendWidth = shapeWidth + shapePadding + legendOption.textSize.width + padding, 
                (legendBounds.width < padding + rowWidth || this.isVertical) && (maximumWidth = Math.max(maximumWidth, rowWidth + padding - (this.isVertical ? 0 : legendWidth)), 
                0 === rowCount && legendWidth !== rowWidth && (rowCount = 1), rowWidth = this.isVertical ? 0 : legendWidth, 
                columnHeight = ++rowCount * (this.maxItemHeight + padding) + padding));
            }
            columnHeight = Math.max(columnHeight, this.maxItemHeight + padding + padding), this.isPaging = legendBounds.height < columnHeight, 
            this.totalPages = rowCount, render ? this.setBounds(Math.max(rowWidth + padding, maximumWidth), columnHeight, legend, legendBounds) : this.setBounds(0, 0, legend, legendBounds);
        }, Legend.prototype.getRenderPoint = function(legendOption, start, textPadding, prevLegend, rect, count, firstLegend) {
            var padding = this.legend.padding, previousBound = prevLegend.location.x + textPadding + prevLegend.textSize.width;
            previousBound + (legendOption.textSize.width + textPadding) > rect.x + rect.width + this.legend.shapeWidth / 2 || this.isVertical ? (legendOption.location.x = start.x, 
            legendOption.location.y = count === firstLegend ? prevLegend.location.y : prevLegend.location.y + this.maxItemHeight + padding) : (legendOption.location.x = count === firstLegend ? prevLegend.location.x : previousBound, 
            legendOption.location.y = prevLegend.location.y);
            var availwidth = this.legendBounds.x + this.legendBounds.width - (legendOption.location.x + textPadding - this.legend.shapeWidth / 2);
            legendOption.text = textTrim(+availwidth.toFixed(4), legendOption.text, this.legend.textStyle);
        }, Legend.prototype.LegendClick = function(seriesIndex) {
            var chart = this.chart, series = chart.visibleSeries[seriesIndex], legend = this.legendCollections[seriesIndex], selectedDataIndexes = [];
            if (chart.selectionModule && (selectedDataIndexes = extend([], chart.selectionModule.selectedDataIndexes, null, !0)), 
            chart.legendSettings.toggleVisibility) {
                if (series.visible ? series.visible = !1 : series.visible = !0, legend.visible = series.visible, 
                chart.svgObject.childNodes.length > 0) {
                    for (;chart.svgObject.lastChild; ) chart.svgObject.removeChild(chart.svgObject.lastChild);
                    remove(chart.svgObject);
                }
                chart.animateSeries = !1, chart.removeSvg(), chart.refreshAxis(), series.refreshAxisLabel(), 
                this.refreshSeries(chart.visibleSeries), chart.refreshBound(), selectedDataIndexes.length > 0 && (chart.selectionModule.selectedDataIndexes = selectedDataIndexes, 
                chart.selectionModule.redrawSelection(chart, chart.selectionMode));
            } else chart.selectionModule && chart.selectionModule.legendSelection(chart, seriesIndex);
        }, Legend.prototype.refreshSeries = function(seriesCollection) {
            for (var _i = 0, seriesCollection_1 = seriesCollection; _i < seriesCollection_1.length; _i++) {
                seriesCollection_1[_i].position = void 0;
            }
        }, Legend.prototype.click = function(event) {
            if (this.chart.legendSettings.visible) {
                for (var seriesIndex, targetId = event.target.id, _i = 0, legendItemsId_1 = [ this.legendID + "_text_", this.legendID + "_shape_marker_", this.legendID + "_shape_" ]; _i < legendItemsId_1.length; _i++) {
                    var id = legendItemsId_1[_i];
                    targetId.indexOf(id) > -1 && (seriesIndex = parseInt(targetId.split(id)[1], 10), 
                    this.LegendClick(seriesIndex));
                }
                targetId.indexOf(this.legendID + "_pageup") > -1 ? this.changePage(event, !0) : targetId.indexOf(this.legendID + "_pagedown") > -1 && this.changePage(event, !1);
            }
        }, Legend.prototype.getModuleName = function() {
            return "Legend";
        }, Legend.prototype.destroy = function(chart) {
            this.removeEventListener();
        }, Legend;
    }(BaseLegend), __extends$103 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), ChartAnnotation = function(_super) {
        function ChartAnnotation(control, annotations) {
            var _this = _super.call(this, control) || this;
            return _this.chart = control, _this.annotations = annotations, _this;
        }
        return __extends$103(ChartAnnotation, _super), ChartAnnotation.prototype.renderAnnotations = function(element) {
            var _this = this;
            this.parentElement = createElement("div", {
                id: this.chart.element.id + "_Annotation_Collections"
            }), this.annotations.map(function(annotation, index) {
                _this.processAnnotation(annotation, index, _this.parentElement);
            }), appendElement(this.parentElement, element);
        }, ChartAnnotation.prototype.destroy = function(control) {}, ChartAnnotation.prototype.getModuleName = function() {
            return "Annotation";
        }, ChartAnnotation;
    }(AnnotationBase), __extends$104 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), BoxAndWhiskerSeries = function(_super) {
        function BoxAndWhiskerSeries() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$104(BoxAndWhiskerSeries, _super), BoxAndWhiskerSeries.prototype.render = function(series, xAxis, yAxis, isInverted) {
            for (var argsData, sideBySideInfo = this.getSideBySideInfo(series), _i = (series.border.width, 
            0), _a = series.points; _i < _a.length; _i++) {
                var point = _a[_i];
                point.symbolLocations = [], point.regions = [];
                var centerRegion_1 = void 0;
                point.visible && withInRange(series.points[point.index - 1], point, series.points[point.index + 1], series) && (this.findBoxPlotValues(point.y, point, series.boxPlotMode), 
                this.updateTipRegion(series, point, sideBySideInfo), centerRegion_1 = this.getRectangle(point.xValue + sideBySideInfo.start, point.upperQuartile, point.xValue + sideBySideInfo.end, point.lowerQuartile, series), 
                point.regions.push(centerRegion_1), (argsData = this.triggerEvent(series, point, series.interior, {
                    color: isNullOrUndefined(series.border.color) || "transparent" === series.border.color ? getSaturationColor(series.interior, -.6) : series.border.color,
                    width: series.border.width ? series.border.width : 1
                })).cancel || this.renderBoxAndWhisker(series, point, centerRegion_1, argsData, this.getPathString(point, series, getPoint(point.xValue, point.median, xAxis, yAxis, isInverted), getPoint(point.xValue, point.average, xAxis, yAxis, isInverted))));
            }
            series.marker.visible && series.chart.markerRender.render(series);
        }, BoxAndWhiskerSeries.prototype.updateTipRegion = function(series, point, sideBySideInfo) {
            var tipRegion = this.getRectangle(point.xValue + sideBySideInfo.median, point.maximum, point.xValue + sideBySideInfo.median, point.minimum, series);
            this.updateTipSize(series, point, tipRegion, series.chart.requireInvertedAxis);
        }, BoxAndWhiskerSeries.prototype.updateTipSize = function(series, point, region, isInverted) {
            var borderWidth = series.border.width || 1;
            isInverted ? (region.y -= borderWidth / 2, region.height = region.height || borderWidth) : (region.x -= borderWidth / 2, 
            region.width = region.width || borderWidth), point.regions.push(region);
        }, BoxAndWhiskerSeries.prototype.getPathString = function(point, series, median, average) {
            var topRect = point.regions[0], midRect = point.regions[1], direction = "", center = (series.chart.requireInvertedAxis ? topRect.height : topRect.width, 
            series.chart.requireInvertedAxis ? topRect.y + topRect.height / 2 : topRect.x + topRect.width / 2), midWidth = midRect.x + midRect.width, midHeight = midRect.y + midRect.height, topWidth = topRect.x + topRect.width, topHeight = topRect.y + topRect.height;
            return series.chart.requireInvertedAxis ? (this.updateTipSize(series, point, {
                x: topRect.x,
                y: midRect.y,
                width: 0,
                height: midHeight - midRect.y
            }, !1), this.updateTipSize(series, point, {
                x: topWidth,
                y: midRect.y,
                width: 0,
                height: midHeight - midRect.y
            }, !0), direction += "M " + topRect.x + " " + midRect.y + " L " + topRect.x + " " + midHeight, 
            direction += "M " + topRect.x + " " + center + "  L " + midRect.x + " " + center, 
            direction += " M " + midRect.x + " " + midRect.y + "  L " + midWidth + " " + midRect.y + " L " + midWidth + " " + midHeight + " L " + midRect.x + " " + midHeight + " Z", 
            direction += " M " + midWidth + " " + center + " L " + topWidth + " " + center, 
            direction += " M " + topWidth + " " + midRect.y + " L " + topWidth + " " + midHeight, 
            direction += " M " + median.x + " " + midRect.y + "  L " + median.x + " " + midHeight, 
            direction += series.showMean ? "M " + (average.x + 5) + " " + (average.y - 5) + " L " + (average.x - 5) + " " + (average.y + 5) + "M " + (average.x - 5) + " " + (average.y - 5) + " L " + (average.x + 5) + " " + (average.y + 5) : "") : (this.updateTipSize(series, point, {
                x: midRect.x,
                y: topRect.y,
                width: midWidth - midRect.x,
                height: 0
            }, !0), this.updateTipSize(series, point, {
                x: midRect.x,
                y: topHeight,
                width: midWidth - midRect.x,
                height: 0
            }, !0), direction += "M " + midRect.x + " " + topRect.y + "  L " + midWidth + " " + topRect.y, 
            direction += " M " + center + " " + topRect.y + "  L " + center + " " + midRect.y, 
            direction += " M " + midRect.x + " " + midRect.y + "  L " + midWidth + " " + midRect.y + " L " + midWidth + " " + midHeight + " L " + midRect.x + " " + midHeight + " Z", 
            direction += " M " + center + " " + midHeight + " L " + center + " " + topHeight, 
            direction += " M " + midRect.x + " " + topHeight + " L " + midWidth + " " + topHeight, 
            direction += " M " + midRect.x + " " + median.y + " L " + midWidth + " " + median.y, 
            direction += series.showMean ? " M " + (average.x - 5) + " " + (average.y - 5) + " L " + (average.x + 5) + " " + (average.y + 5) + " M " + (average.x + 5) + " " + (average.y - 5) + " L " + (average.x - 5) + " " + (average.y + 5) : ""), 
            direction;
        }, BoxAndWhiskerSeries.prototype.renderBoxAndWhisker = function(series, point, rect, argsData, direction) {
            var location, size, symbolId = series.chart.element.id + "_Series_" + series.index + "_Point_" + point.index, element = series.chart.renderer.drawPath(new PathOption(symbolId + "_BoxPath", argsData.fill, argsData.border.width, argsData.border.color, series.opacity, series.dashArray, direction));
            element.setAttribute("aria-label", point.x.toString() + ":" + point.maximum.toString() + ":" + point.minimum.toString() + ":" + point.lowerQuartile.toString() + ":" + point.upperQuartile.toString());
            var parentElement = series.chart.renderer.createGroup({
                id: symbolId
            });
            parentElement.appendChild(element);
            for (var i = 0; i < point.outliers.length; i++) location = getPoint(point.xValue, point.outliers[i], series.xAxis, series.yAxis, series.chart.requireInvertedAxis), 
            size = new Size(series.marker.width, series.marker.height), point.symbolLocations.push(location), 
            this.updateTipSize(series, point, {
                x: location.x - size.width / 2,
                y: location.y - size.height / 2,
                width: size.width,
                height: size.height
            }, !0);
            series.seriesElement.appendChild(parentElement);
        }, BoxAndWhiskerSeries.prototype.findBoxPlotValues = function(yValues, point, mode) {
            var yCount = yValues.length, quartile = {
                average: sum(yValues) / yCount,
                lowerQuartile: 0,
                upperQuartile: 0,
                maximum: 0,
                minimum: 0,
                median: 0,
                outliers: []
            };
            "Exclusive" === mode ? (quartile.lowerQuartile = this.getExclusiveQuartileValue(yValues, yCount, .25), 
            quartile.upperQuartile = this.getExclusiveQuartileValue(yValues, yCount, .75), quartile.median = this.getExclusiveQuartileValue(yValues, yCount, .5)) : "Inclusive" === mode ? (quartile.lowerQuartile = this.getInclusiveQuartileValue(yValues, yCount, .25), 
            quartile.upperQuartile = this.getInclusiveQuartileValue(yValues, yCount, .75), quartile.median = this.getInclusiveQuartileValue(yValues, yCount, .5)) : (quartile.median = getMedian(yValues), 
            this.getQuartileValues(yValues, yCount, quartile)), this.getMinMaxOutlier(yValues, yCount, quartile), 
            point.minimum = quartile.minimum, point.maximum = quartile.maximum, point.lowerQuartile = quartile.lowerQuartile, 
            point.upperQuartile = quartile.upperQuartile, point.median = quartile.median, point.outliers = quartile.outliers, 
            point.average = quartile.average;
        }, BoxAndWhiskerSeries.prototype.getExclusiveQuartileValue = function(yValues, count, percentile) {
            if (0 === count) return 0;
            if (1 === count) return yValues[0];
            var rank = percentile * (count + 1), integerRank = Math.floor(Math.abs(rank)), fractionRank = rank - integerRank;
            return 0 === integerRank ? yValues[0] : integerRank > count - 1 ? yValues[count - 1] : fractionRank * (yValues[integerRank] - yValues[integerRank - 1]) + yValues[integerRank - 1];
        }, BoxAndWhiskerSeries.prototype.getInclusiveQuartileValue = function(yValues, count, percentile) {
            if (0 === count) return 0;
            if (1 === count) return yValues[0];
            var rank = percentile * (count - 1), integerRank = Math.floor(Math.abs(rank));
            return (rank - integerRank) * (yValues[integerRank + 1] - yValues[integerRank]) + yValues[integerRank];
        }, BoxAndWhiskerSeries.prototype.getQuartileValues = function(yValues, count, quartile) {
            if (1 === count) return quartile.lowerQuartile = yValues[0], quartile.upperQuartile = yValues[0], 
            null;
            var isEvenList = count % 2 == 0, halfLength = count / 2, lowerQuartileArray = yValues.slice(0, halfLength), upperQuartileArray = yValues.slice(isEvenList ? halfLength : halfLength + 1, count);
            quartile.lowerQuartile = getMedian(lowerQuartileArray), quartile.upperQuartile = getMedian(upperQuartileArray);
        }, BoxAndWhiskerSeries.prototype.getMinMaxOutlier = function(yValues, count, quartile) {
            for (var rangeIQR = 1.5 * (quartile.upperQuartile - quartile.lowerQuartile), i = 0; i < count; i++) {
                if (!(yValues[i] < quartile.lowerQuartile - rangeIQR)) {
                    quartile.minimum = yValues[i];
                    break;
                }
                quartile.outliers.push(yValues[i]);
            }
            for (i = count - 1; i >= 0; i--) {
                if (!(yValues[i] > quartile.upperQuartile + rangeIQR)) {
                    quartile.maximum = yValues[i];
                    break;
                }
                quartile.outliers.push(yValues[i]);
            }
        }, BoxAndWhiskerSeries.prototype.doAnimation = function(series) {
            this.animate(series);
        }, BoxAndWhiskerSeries.prototype.getModuleName = function() {
            return "BoxAndWhiskerSeries";
        }, BoxAndWhiskerSeries.prototype.destroy = function(chart) {}, BoxAndWhiskerSeries;
    }(ColumnBase), __extends$105 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), MultiColoredAreaSeries = function(_super) {
        function MultiColoredAreaSeries() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$105(MultiColoredAreaSeries, _super), MultiColoredAreaSeries.prototype.render = function(series, xAxis, yAxis, isInverted) {
            var firstPoint, startRegion, previous, rendered, _this = this, startPoint = null, direction = "", origin = Math.max(series.yAxis.visibleRange.min, 0), options = [], segments = this.sortSegments(series, series.segments);
            series.points.map(function(point, i, seriesPoints) {
                point.symbolLocations = [], point.regions = [], rendered = !1, point.visible && withInRange(seriesPoints[i - 1], point, seriesPoints[i + 1], series) && (direction += _this.getAreaPathDirection(point.xValue, origin, series, isInverted, getPoint, startPoint, "M"), 
                startPoint = startPoint || new ChartLocation(point.xValue, origin), firstPoint = getPoint(point.xValue, point.yValue, xAxis, yAxis, isInverted), 
                previous && _this.setPointColor(point, previous, series, "X" === series.segmentAxis, segments) ? (rendered = !0, 
                startRegion = getPoint(startPoint.x, origin, xAxis, yAxis, isInverted), direction += "L " + firstPoint.x + " " + firstPoint.y + " ", 
                direction += "L " + firstPoint.x + " " + startRegion.y + " ", _this.generatePathOption(options, series, previous, direction, "_Point_" + previous.index), 
                direction = "M " + firstPoint.x + " " + startRegion.y + " L " + firstPoint.x + " " + firstPoint.y + " ") : (direction += "L " + firstPoint.x + " " + firstPoint.y + " ", 
                _this.setPointColor(point, null, series, "X" === series.segmentAxis, segments)), 
                seriesPoints[i + 1] && !seriesPoints[i + 1].visible && "Drop" !== series.emptyPointSettings.mode && (direction += _this.getAreaEmptyDirection({
                    x: point.xValue,
                    y: origin
                }, startPoint, series, isInverted, getPoint), startPoint = null), previous = point, 
                _this.storePointLocation(point, series, isInverted, getPoint));
            }), rendered || (direction = series.points.length > 1 ? direction + this.getAreaPathDirection(previous.xValue, origin, series, isInverted, getPoint, null, "L") : "", 
            this.generatePathOption(options, series, previous, direction, "")), this.applySegmentAxis(series, options, segments), 
            this.renderMarker(series);
        }, MultiColoredAreaSeries.prototype.generatePathOption = function(options, series, point, direction, id) {
            options.push(new PathOption(series.chart.element.id + "_Series_" + series.index + id, series.setPointColor(point, series.interior), series.border.width, series.border.color, series.opacity, series.dashArray, direction));
        }, MultiColoredAreaSeries.prototype.destroy = function(chart) {}, MultiColoredAreaSeries.prototype.getModuleName = function() {
            return "MultiColoredAreaSeries";
        }, MultiColoredAreaSeries.prototype.doAnimation = function(series) {
            this.doLinearAnimation(series, series.animation);
        }, MultiColoredAreaSeries;
    }(MultiColoredSeries), __extends$106 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), MultiColoredLineSeries = function(_super) {
        function MultiColoredLineSeries() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$106(MultiColoredLineSeries, _super), MultiColoredLineSeries.prototype.render = function(series, xAxis, yAxis, isInverted) {
            for (var previous = null, startPoint = "M", visiblePoints = this.improveChartPerformance(series), options = [], direction = "", segments = this.sortSegments(series, series.segments), _i = 0, visiblePoints_1 = visiblePoints; _i < visiblePoints_1.length; _i++) {
                var point = visiblePoints_1[_i];
                point.regions = [], point.visible && withInRange(visiblePoints[point.index - 1], point, visiblePoints[point.index + 1], series) ? (direction += this.getLineDirection(previous, point, series, isInverted, getPoint, startPoint), 
                null != previous ? this.setPointColor(point, previous, series, "X" === series.segmentAxis, segments) ? (options.push(new PathOption(series.chart.element.id + "_Series_" + series.index + "_Point_" + previous.index, "none", series.width, series.setPointColor(previous, series.interior), series.opacity, series.dashArray, direction)), 
                startPoint = "M", direction = "") : startPoint = "L" : this.setPointColor(point, null, series, "X" === series.segmentAxis, segments), 
                previous = point, this.storePointLocation(point, series, isInverted, getPoint)) : (previous = "Drop" === series.emptyPointSettings.mode ? previous : null, 
                startPoint = "Drop" === series.emptyPointSettings.mode ? startPoint : "M", point.symbolLocations = []);
            }
            "" !== direction && options.push(new PathOption(series.chart.element.id + "_Series_" + series.index, "none", series.width, series.setPointColor(visiblePoints[visiblePoints.length - 1], series.interior), series.opacity, series.dashArray, direction)), 
            this.applySegmentAxis(series, options, segments), this.renderMarker(series);
        }, MultiColoredLineSeries.prototype.doAnimation = function(series) {
            this.doLinearAnimation(series, series.animation);
        }, MultiColoredLineSeries.prototype.getModuleName = function() {
            return "MultiColoredLineSeries";
        }, MultiColoredLineSeries.prototype.destroy = function(chart) {}, MultiColoredLineSeries;
    }(MultiColoredSeries), MultiLevelLabel = function() {
        function MultiLevelLabel(chart) {
            this.xAxisPrevHeight = [], this.xAxisMultiLabelHeight = [], this.yAxisPrevHeight = [], 
            this.yAxisMultiLabelHeight = [], this.chart = chart;
        }
        return MultiLevelLabel.prototype.getMultilevelLabelsHeight = function(axis) {
            var labelSize, height, gap, value = 0, multiLevelLabelsHeight = [], prevHeight = [], isVertical = "Vertical" === axis.orientation, axisValue = isVertical ? axis.rect.height : axis.rect.width;
            axis.multiLevelLabels.map(function(multiLevel, index) {
                multiLevel.categories.map(function(categoryLabel) {
                    "" !== categoryLabel.text && null !== categoryLabel.start && null !== categoryLabel.end && (labelSize = measureText(categoryLabel.text, multiLevel.textStyle), 
                    height = isVertical ? labelSize.width : labelSize.height, height += 2 * multiLevel.border.width + ("CurlyBrace" === multiLevel.border.type ? 10 : 0), 
                    gap = null !== categoryLabel.maximumTextWidth ? categoryLabel.maximumTextWidth : valueToCoefficient("string" == typeof categoryLabel.end ? Number(new Date(categoryLabel.end)) : categoryLabel.end, axis) * axisValue - valueToCoefficient("string" == typeof categoryLabel.start ? Number(new Date(categoryLabel.start)) : categoryLabel.start, axis) * axisValue, 
                    labelSize.width > gap - 10 && gap > 0 && "Wrap" === multiLevel.overflow && !isVertical && (height *= textWrap(categoryLabel.text, gap - 10, multiLevel.textStyle).length), 
                    multiLevelLabelsHeight[index] = multiLevelLabelsHeight[index] ? multiLevelLabelsHeight[index] < height ? height : multiLevelLabelsHeight[index] : height);
                }), prevHeight[index] = value, value += multiLevelLabelsHeight[index] ? multiLevelLabelsHeight[index] + 10 : 0;
            }), axis.multiLevelLabelHeight = value + ("" !== axis.title || this.chart.legendModule && this.chart.legendSettings.visible ? 5 : 0), 
            isVertical ? (this.yAxisMultiLabelHeight = multiLevelLabelsHeight, this.yAxisPrevHeight = prevHeight) : (this.xAxisMultiLabelHeight = multiLevelLabelsHeight, 
            this.xAxisPrevHeight = prevHeight);
        }, MultiLevelLabel.prototype.renderXAxisMultiLevelLabels = function(axis, index, parent, axisRect) {
            var x, y, startX, endX, start, end, labelSize, clipY, gap, anchor, argsData, labelElement, _this = this, startY = (axis.labelPosition === axis.tickPosition ? axis.majorTickLines.height : 0) + axis.maxLabelSize.height + 10, pathRect = "", isOutside = "Outside" === axis.labelPosition, isInversed = axis.isInversed, opposedPosition = axis.opposedPosition;
            clipY = opposedPosition && !isOutside || !opposedPosition && isOutside ? axisRect.y + startY - axis.majorTickLines.width : axisRect.y - startY - axis.multiLevelLabelHeight, 
            this.createClipRect(axisRect.x - axis.majorTickLines.width, clipY, axis.multiLevelLabelHeight + 10, axisRect.width + 2 * axis.majorTickLines.width, this.chart.element.id + "_XAxis_Clippath_" + index, this.chart.element.id + "XAxisMultiLevelLabel" + index), 
            axis.multiLevelLabels.map(function(multiLevel, level) {
                pathRect = "", multiLevel.categories.map(function(categoryLabel, i) {
                    if (labelElement = _this.chart.renderer.createGroup({
                        id: _this.chart.element.id + index + "_MultiLevelLabel" + level
                    }), start = "string" == typeof categoryLabel.start ? Number(new Date(categoryLabel.start)) : categoryLabel.start, 
                    end = "string" == typeof categoryLabel.end ? Number(new Date(categoryLabel.end)) : categoryLabel.end, 
                    (start >= axis.visibleRange.min && start <= axis.visibleRange.max || end >= axis.visibleRange.min && end <= axis.visibleRange.max) && !(argsData = _this.triggerMultiLabelRender(axis, categoryLabel.text, axis.multiLevelLabels[level].textStyle, axis.multiLevelLabels[level].alignment)).cancel) {
                        startX = valueToCoefficient(start, axis) * axisRect.width, endX = valueToCoefficient(end, axis) * axisRect.width, 
                        endX = isInversed ? [ startX, startX = endX ][0] : endX, labelSize = measureText(argsData.text, argsData.textStyle), 
                        gap = (null === categoryLabel.maximumTextWidth ? endX - startX : categoryLabel.maximumTextWidth) - 10, 
                        x = startX + axisRect.x + 10, y = opposedPosition && !isOutside || !opposedPosition && isOutside ? startY + axisRect.y + labelSize.height / 2 + 10 + _this.xAxisPrevHeight[level] : axisRect.y - startY + labelSize.height / 2 - _this.xAxisMultiLabelHeight[level] - _this.xAxisPrevHeight[level], 
                        "Center" === argsData.alignment ? (x += (endX - startX - 10) / 2, anchor = "middle") : "Far" === argsData.alignment ? (x = x + (endX - startX - 10) - multiLevel.border.width / 2, 
                        anchor = "end") : (anchor = "start", x += multiLevel.border.width / 2), y = "CurlyBrace" === multiLevel.border.type ? !opposedPosition && isOutside || opposedPosition && !isOutside ? y + 10 : y - 5 : y;
                        var options = new TextOption(_this.chart.element.id + index + "_Axis_MultiLevelLabel_Level_" + level + "_Text_" + i, x, y, anchor, argsData.text);
                        "None" !== multiLevel.overflow && (options.text = "Wrap" === multiLevel.overflow ? textWrap(argsData.text, gap, argsData.textStyle) : textTrim(gap, argsData.text, argsData.textStyle), 
                        options.x = options.x - 5), textElement(options, argsData.textStyle, argsData.textStyle.color || _this.chart.themeStyle.axisLabel, labelElement), 
                        multiLevel.border.width > 0 && "WithoutBorder" !== multiLevel.border.type && (pathRect = _this.renderXAxisLabelBorder(level, endX - startX - 10, axis, startX, startY, labelSize, options, axisRect, argsData.alignment, pathRect, isOutside, opposedPosition)), 
                        _this.multiElements.appendChild(labelElement);
                    }
                }), "" !== pathRect && _this.createBorderElement(level, index, axis, pathRect);
            }), parent.appendChild(this.multiElements);
        }, MultiLevelLabel.prototype.renderXAxisLabelBorder = function(labelIndex, gap, axis, startX, startY, labelSize, textOptions, axisRect, alignment, path, isOutside, opposedPosition) {
            var padding1, padding2, value, value1, padding = 10, groupLabel = axis.multiLevelLabels[labelIndex], width = gap + padding, height = this.xAxisMultiLabelHeight[labelIndex] + padding, x = startX + axisRect.x, y = !opposedPosition && isOutside || opposedPosition && !isOutside ? startY + axisRect.y + this.xAxisPrevHeight[labelIndex] : axisRect.y - startY - this.xAxisPrevHeight[labelIndex];
            switch (groupLabel.border.type) {
              case "WithoutTopandBottomBorder":
              case "Rectangle":
              case "WithoutTopBorder":
                path += "M" + x + " " + y + "L" + x + " " + (y + (height = !opposedPosition && isOutside || opposedPosition && !isOutside ? height : -height)) + "M" + (x + width) + " " + y + "L" + (x + width) + " " + (y + height), 
                path += "WithoutTopandBottomBorder" !== groupLabel.border.type ? "L " + x + " " + (y + height) + " " : " ", 
                path += "Rectangle" === groupLabel.border.type ? "M" + x + " " + y + "L" + (x + width) + " " + y : " ";
                break;

              case "Brace":
                "Near" === alignment ? (value = textOptions.x, value1 = textOptions.x + labelSize.width + 2) : "Center" === alignment ? (value = textOptions.x - labelSize.width / 2 - 2, 
                value1 = textOptions.x + labelSize.width / 2 + 2) : (value = textOptions.x - labelSize.width - 2, 
                value1 = textOptions.x), path += "M" + x + " " + y + "L" + x + " " + (y + (height = !opposedPosition && isOutside || opposedPosition && !isOutside ? height : -height) / 2) + "M" + x + " " + (y + height / 2) + "L" + (value - 2) + " " + (y + height / 2) + "M" + value1 + " " + (y + height / 2) + "L" + (x + width) + " " + (y + height / 2) + "M" + (x + width) + " " + (y + height / 2) + "L" + (x + width) + " " + y;
                break;

              case "CurlyBrace":
                !opposedPosition && isOutside || opposedPosition && !isOutside ? (padding = 10, 
                padding1 = 15, padding2 = 5) : (padding = -10, padding1 = -15, padding2 = -5), path += "Center" === alignment ? "M" + x + " " + y + " C " + x + " " + y + " " + (x + 5) + " " + (y + padding) + " " + (x + 10) + " " + (y + padding) + "L" + (x + width / 2 - 5) + " " + (y + padding) + "L" + (x + width / 2) + " " + (y + padding1) + "L" + (x + width / 2 + 5) + " " + (y + padding) + "L" + (x + width - 10) + " " + (y + padding) + " C " + (x + width - 10) + " " + (y + padding) + " " + (x + width) + " " + (y + padding2) + " " + (x + width) + " " + y : "Near" === alignment ? "M" + x + " " + y + " C " + x + " " + y + " " + (x + 5) + " " + (y + padding) + " " + (x + 10) + " " + (y + padding) + "L" + (x + 15) + " " + (y + padding1) + "L" + (x + 20) + " " + (y + padding) + "L" + (x + width - 10) + " " + (y + padding) + " C " + (x + width - 10) + " " + (y + padding) + " " + (x + width) + " " + (y + padding2) + " " + (x + width) + " " + y : "M" + x + " " + y + " C " + x + " " + y + " " + (x + 5) + " " + (y + padding) + " " + (x + 10) + " " + (y + padding) + "L" + (x + width - 20) + " " + (y + padding) + "L" + (x + width - 15) + " " + (y + padding1) + "L" + (x + width - 10) + " " + (y + padding) + "L" + (x + width - 10) + " " + (y + padding) + " C " + (x + width - 10) + " " + (y + padding) + " " + (x + width) + " " + (y + padding2) + " " + (x + width) + " " + y;
            }
            return path;
        }, MultiLevelLabel.prototype.renderYAxisMultiLevelLabels = function(axis, index, parent, rect) {
            var labelSize, clipX, x, y, startY, labelElement, endY, argsData, start, end, gap, _this = this, isOutside = "Outside" === axis.labelPosition, startX = (axis.tickPosition === axis.labelPosition ? axis.majorTickLines.height : 0) + axis.maxLabelSize.width + 10, path = "", isInversed = axis.isInversed, opposedPosition = axis.opposedPosition;
            clipX = opposedPosition && !isOutside || !opposedPosition && isOutside ? rect.x - axis.multiLevelLabelHeight - startX - 10 : rect.x + startX, 
            this.createClipRect(clipX, rect.y - axis.majorTickLines.width, rect.height + 2 * axis.majorTickLines.width, axis.multiLevelLabelHeight + 10, this.chart.element.id + "_YAxis_Clippath_" + index, this.chart.element.id + "YAxisMultiLevelLabel" + index), 
            axis.multiLevelLabels.map(function(multiLevel, level) {
                path = "", multiLevel.categories.map(function(categoryLabel, i) {
                    if (labelElement = _this.chart.renderer.createGroup({
                        id: _this.chart.element.id + index + "_MultiLevelLabel" + level
                    }), end = "string" == typeof categoryLabel.end ? Number(new Date(categoryLabel.end)) : categoryLabel.end, 
                    ((start = "string" == typeof categoryLabel.start ? Number(new Date(categoryLabel.start)) : categoryLabel.start) >= axis.visibleRange.min && start <= axis.visibleRange.max || end >= axis.visibleRange.min && end <= axis.visibleRange.max) && (startY = valueToCoefficient(start, axis) * rect.height, 
                    endY = valueToCoefficient(end, axis) * rect.height, endY = isInversed ? [ startY, startY = endY ][0] : endY, 
                    !(argsData = _this.triggerMultiLabelRender(axis, categoryLabel.text, multiLevel.textStyle, multiLevel.alignment)).cancel)) {
                        labelSize = measureText(argsData.text, argsData.textStyle), gap = endY - startY, 
                        x = rect.x - startX - _this.yAxisPrevHeight[level] - _this.yAxisMultiLabelHeight[level] / 2 - 5, 
                        y = rect.height + rect.y - startY - gap / 2, x = opposedPosition ? isOutside ? rect.x + startX + 5 + _this.yAxisMultiLabelHeight[level] / 2 + _this.yAxisPrevHeight[level] : rect.x - startX - _this.yAxisMultiLabelHeight[level] / 2 - _this.yAxisPrevHeight[level] - 5 : isOutside ? x : rect.x + startX + 5 + _this.yAxisMultiLabelHeight[level] / 2 + _this.yAxisPrevHeight[level], 
                        "Center" === argsData.alignment ? y += labelSize.height / 4 : "Far" === argsData.alignment ? y += gap / 2 - labelSize.height / 2 : y = y - gap / 2 + labelSize.height, 
                        x = "CurlyBrace" === multiLevel.border.type ? !opposedPosition && isOutside || opposedPosition && !isOutside ? x - 10 : x + 10 : x;
                        var options = new TextOption(_this.chart.element.id + index + "_Axis_MultiLevelLabel_Level_" + level + "_Text_" + i, x, y, "middle", argsData.text);
                        options.text = "Trim" === multiLevel.overflow ? textTrim(null === categoryLabel.maximumTextWidth ? _this.yAxisMultiLabelHeight[level] : categoryLabel.maximumTextWidth, argsData.text, argsData.textStyle) : options.text, 
                        textElement(options, argsData.textStyle, argsData.textStyle.color || _this.chart.themeStyle.axisLabel, labelElement), 
                        multiLevel.border.width > 0 && "WithoutBorder" !== multiLevel.border.type && (path = _this.renderYAxisLabelBorder(level, gap, axis, endY, startX, startY, labelSize, options, rect, argsData.alignment, path, isOutside, opposedPosition)), 
                        _this.multiElements.appendChild(labelElement);
                    }
                }), "" !== path && _this.createBorderElement(level, index, axis, path);
            }), parent.appendChild(this.multiElements);
        }, MultiLevelLabel.prototype.renderYAxisLabelBorder = function(labelIndex, gap, axis, endY, startX, startY, labelSize, textOptions, rect, alignment, path, isOutside, opposedPosition) {
            var padding1, padding2, height = endY - startY, padding = 10, groupLabel = axis.multiLevelLabels[labelIndex], y = rect.y + rect.height - endY, width = this.yAxisMultiLabelHeight[labelIndex] + padding, x = !opposedPosition && isOutside || opposedPosition && !isOutside ? rect.x - startX - this.yAxisPrevHeight[labelIndex] : rect.x + startX + this.yAxisPrevHeight[labelIndex];
            switch (groupLabel.border.type) {
              case "WithoutTopandBottomBorder":
              case "Rectangle":
              case "WithoutTopBorder":
                path += "M" + x + " " + y + "L" + (x + (width = !opposedPosition && isOutside || opposedPosition && !isOutside ? -width : width)) + " " + y + "M" + x + " " + (y + height) + "L" + (x + width) + " " + (y + height), 
                path += "WithoutTopandBottomBorder" !== groupLabel.border.type ? "L " + (x + width) + " " + y + " " : " ", 
                path += "Rectangle" === groupLabel.border.type ? "M" + x + " " + (y + height) + "L " + x + " " + y + " " : " ";
                break;

              case "Brace":
                path += "M " + x + " " + y + " L " + (x - (width = !opposedPosition && isOutside || opposedPosition && !isOutside ? width : -width) / 2) + " " + y + " L " + (x - width / 2) + " " + (textOptions.y - labelSize.height / 2 - 4) + " M " + (x - width / 2) + " " + (textOptions.y + labelSize.height / 4 + 2) + " L " + (x - width / 2) + " " + (y + height) + " L " + x + " " + (y + height);
                break;

              case "CurlyBrace":
                !opposedPosition && isOutside || opposedPosition && !isOutside ? (padding = -10, 
                padding1 = -15, padding2 = -5) : (padding = 10, padding1 = 15, padding2 = 5), path += "Center" === alignment ? "M " + x + " " + y + " C " + x + " " + y + " " + (x + padding) + " " + y + " " + (x + padding) + " " + (y + 10) + " L " + (x + padding) + " " + (y + (height - 10) / 2) + " L " + (x + padding1) + " " + (y + (height - 10) / 2 + 5) + " L " + (x + padding) + " " + (y + (height - 10) / 2 + 10) + " L " + (x + padding) + " " + (y + (height - 10)) + " C " + (x + padding) + " " + (y + (height - 10)) + " " + (x + padding2) + " " + (y + height) + " " + x + " " + (y + height) : "Far" === alignment ? "M " + x + " " + y + " C " + x + " " + y + " " + (x + padding) + " " + y + " " + (x + padding) + " " + (y + 10) + " L " + (x + padding) + " " + (y + height - 20) + "  L " + (x + padding1) + " " + (y + (height - 15)) + " L " + (x + padding) + " " + (y + (height - 10)) + " L " + (x + padding) + " " + (y + (height - 10)) + " C" + (x + padding) + " " + (y + (height - 10)) + " " + (x + padding) + " " + (y + height) + " " + x + " " + (y + height) : "M " + x + " " + y + " C " + x + " " + y + " " + (x + padding) + " " + y + " " + (x + padding) + " " + (y + 10) + " L " + (x + padding1) + " " + (y + 15) + " L " + (x + padding) + " " + (y + 20) + " L " + (x + padding) + " " + (y + (height - 10)) + " C" + (x + padding) + " " + (y + (height - 10)) + " " + (x + padding2) + " " + (y + height) + " " + x + " " + (y + height);
            }
            return path;
        }, MultiLevelLabel.prototype.createClipRect = function(x, y, height, width, clipId, axisId) {
            this.multiElements = this.chart.renderer.createGroup({
                id: axisId,
                "clip-path": "url(#" + clipId + ")"
            }), this.multiElements.appendChild(this.chart.renderer.drawClipPath({
                id: clipId,
                x: x,
                y: y,
                width: width,
                height: height,
                fill: "white",
                "stroke-width": 1,
                stroke: "Gray"
            }));
        }, MultiLevelLabel.prototype.createBorderElement = function(borderIndex, axisIndex, axis, path) {
            var borderElement = this.chart.renderer.drawPath(new PathOption(this.chart.element.id + axisIndex + "_Axis_MultiLevelLabel_Rect_" + borderIndex, "Transparent", axis.multiLevelLabels[borderIndex].border.width, axis.multiLevelLabels[borderIndex].border.color || this.chart.themeStyle.axisLine, 1, "", path));
            borderElement.setAttribute("style", "pointer-events: none"), this.multiElements.appendChild(borderElement);
        }, MultiLevelLabel.prototype.triggerMultiLabelRender = function(axis, text, textStyle, textAlignment) {
            var argsData;
            return argsData = {
                cancel: !1,
                name: "axisMultiLabelRender",
                axis: axis,
                text: text,
                textStyle: textStyle,
                alignment: textAlignment
            }, this.chart.trigger("axisMultiLabelRender", argsData), argsData;
        }, MultiLevelLabel.prototype.getModuleName = function() {
            return "MultiLevelLabel";
        }, MultiLevelLabel.prototype.destroy = function() {}, MultiLevelLabel;
    }(), __extends$108 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), CustomizeOption$1 = function() {
        return function(id) {
            this.id = id;
        };
    }(), PathOption$1 = function(_super) {
        function PathOption(id, fill, width, color, opacity, dashArray, d, transform, style) {
            void 0 === transform && (transform = ""), void 0 === style && (style = "");
            var _this = _super.call(this, id) || this;
            return _this.opacity = opacity, _this.fill = fill, _this.stroke = color, _this["stroke-width"] = width, 
            _this["stroke-dasharray"] = dashArray, _this.d = d, _this.transform = transform, 
            _this.style = style, _this;
        }
        return __extends$108(PathOption, _super), PathOption;
    }(CustomizeOption$1), RectOption$1 = function(_super) {
        function RectOption(id, fill, border, opacity, rect) {
            var _this = _super.call(this, id) || this;
            return _this.y = rect.y, _this.x = rect.x, _this.height = rect.height, _this.width = rect.width, 
            _this.opacity = opacity, _this.fill = fill, _this.stroke = border.color, _this["stroke-width"] = border.width, 
            _this;
        }
        return __extends$108(RectOption, _super), RectOption;
    }(CustomizeOption$1), Size$1 = function() {
        return function(width, height) {
            this.width = width, this.height = height;
        };
    }(), GaugeLocation = function() {
        return function(x, y) {
            this.x = x, this.y = y;
        };
    }(), Rect$1 = function() {
        return function(x, y, width, height) {
            this.x = x, this.y = y, this.width = width, this.height = height;
        };
    }(), TextOption$1 = function(_super) {
        function TextOption(id, x, y, anchor, text, transform, baseLine) {
            void 0 === transform && (transform = "");
            var _this = _super.call(this, id) || this;
            return _this.transform = "", _this.baseLine = "auto", _this.x = x, _this.y = y, 
            _this.anchor = anchor, _this.text = text, _this.transform = transform, _this.baseLine = baseLine, 
            _this;
        }
        return __extends$108(TextOption, _super), TextOption;
    }(CustomizeOption$1), VisibleLabels$1 = function() {
        return function(text, value, size) {
            this.text = text, this.value = value, this.size = size;
        };
    }(), __extends$109 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$47 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, Border$1 = function(_super) {
        function Border() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$109(Border, _super), __decorate$47([ Property("") ], Border.prototype, "color", void 0), 
        __decorate$47([ Property(1) ], Border.prototype, "width", void 0), Border;
    }(ChildProperty), Font$1 = function(_super) {
        function Font() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$109(Font, _super), __decorate$47([ Property("16px") ], Font.prototype, "size", void 0), 
        __decorate$47([ Property("") ], Font.prototype, "color", void 0), __decorate$47([ Property("Segoe UI") ], Font.prototype, "fontFamily", void 0), 
        __decorate$47([ Property("Normal") ], Font.prototype, "fontWeight", void 0), __decorate$47([ Property("Normal") ], Font.prototype, "fontStyle", void 0), 
        __decorate$47([ Property(1) ], Font.prototype, "opacity", void 0), Font;
    }(ChildProperty), Margin$1 = function(_super) {
        function Margin() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$109(Margin, _super), __decorate$47([ Property(10) ], Margin.prototype, "left", void 0), 
        __decorate$47([ Property(10) ], Margin.prototype, "right", void 0), __decorate$47([ Property(10) ], Margin.prototype, "top", void 0), 
        __decorate$47([ Property(10) ], Margin.prototype, "bottom", void 0), Margin;
    }(ChildProperty), TooltipSettings$1 = function(_super) {
        function TooltipSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$109(TooltipSettings, _super), __decorate$47([ Property(!1) ], TooltipSettings.prototype, "enable", void 0), 
        __decorate$47([ Property("#FFFFFF") ], TooltipSettings.prototype, "fill", void 0), 
        __decorate$47([ Complex({
            color: "#686868",
            size: "13px"
        }, Font$1) ], TooltipSettings.prototype, "textStyle", void 0), __decorate$47([ Property(null) ], TooltipSettings.prototype, "format", void 0), 
        __decorate$47([ Property(null) ], TooltipSettings.prototype, "template", void 0), 
        __decorate$47([ Property(!0) ], TooltipSettings.prototype, "enableAnimation", void 0), 
        __decorate$47([ Complex({
            color: "black",
            width: 2
        }, Border$1) ], TooltipSettings.prototype, "border", void 0), TooltipSettings;
    }(ChildProperty);
    !function(Theme) {
        Theme.axisLabelFont = {
            size: "12px",
            fontWeight: "Normal",
            color: null,
            fontStyle: "Normal",
            fontFamily: "Segoe UI"
        }, Theme.axisLineColor = null, Theme.tickLineColor = null, Theme.pointerColor = null;
    }(Theme$1 || (Theme$1 = {}));
    var CellType, __extends$110 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$48 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, Line = function(_super) {
        function Line() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$110(Line, _super), __decorate$48([ Property(2) ], Line.prototype, "width", void 0), 
        __decorate$48([ Property("") ], Line.prototype, "dashArray", void 0), __decorate$48([ Property(Theme$1.axisLineColor) ], Line.prototype, "color", void 0), 
        Line;
    }(ChildProperty), Label = function(_super) {
        function Label() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$110(Label, _super), __decorate$48([ Complex(Theme$1.axisLabelFont, Font$1) ], Label.prototype, "font", void 0), 
        __decorate$48([ Property("") ], Label.prototype, "format", void 0), __decorate$48([ Property("Inside") ], Label.prototype, "position", void 0), 
        __decorate$48([ Property("None") ], Label.prototype, "hiddenLabel", void 0), __decorate$48([ Property(!1) ], Label.prototype, "autoAngle", void 0), 
        __decorate$48([ Property(!1) ], Label.prototype, "useRangeColor", void 0), __decorate$48([ Property(0) ], Label.prototype, "offset", void 0), 
        Label;
    }(ChildProperty), Range = function(_super) {
        function Range() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$110(Range, _super), __decorate$48([ Property(null) ], Range.prototype, "start", void 0), 
        __decorate$48([ Property(null) ], Range.prototype, "end", void 0), __decorate$48([ Property(null) ], Range.prototype, "radius", void 0), 
        __decorate$48([ Property(10) ], Range.prototype, "startWidth", void 0), __decorate$48([ Property(10) ], Range.prototype, "endWidth", void 0), 
        __decorate$48([ Property(null) ], Range.prototype, "color", void 0), Range;
    }(ChildProperty), Tick = function(_super) {
        function Tick() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$110(Tick, _super), __decorate$48([ Property(null) ], Tick.prototype, "width", void 0), 
        __decorate$48([ Property(null) ], Tick.prototype, "height", void 0), __decorate$48([ Property(null) ], Tick.prototype, "interval", void 0), 
        __decorate$48([ Property(0) ], Tick.prototype, "offset", void 0), __decorate$48([ Property(Theme$1.tickLineColor) ], Tick.prototype, "color", void 0), 
        __decorate$48([ Property("Inside") ], Tick.prototype, "position", void 0), __decorate$48([ Property(!1) ], Tick.prototype, "useRangeColor", void 0), 
        Tick;
    }(ChildProperty), Cap = function(_super) {
        function Cap() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$110(Cap, _super), __decorate$48([ Property("#FFFFFF") ], Cap.prototype, "color", void 0), 
        __decorate$48([ Complex({
            color: Theme$1.pointerColor,
            width: 8
        }, Border$1) ], Cap.prototype, "border", void 0), __decorate$48([ Property(8) ], Cap.prototype, "radius", void 0), 
        Cap;
    }(ChildProperty), NeedleTail = function(_super) {
        function NeedleTail() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$110(NeedleTail, _super), __decorate$48([ Property(Theme$1.pointerColor) ], NeedleTail.prototype, "color", void 0), 
        __decorate$48([ Complex({
            color: Theme$1.pointerColor,
            width: 0
        }, Border$1) ], NeedleTail.prototype, "border", void 0), __decorate$48([ Property("0%") ], NeedleTail.prototype, "length", void 0), 
        NeedleTail;
    }(ChildProperty), Animation$2 = function(_super) {
        function Animation$$1() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$110(Animation$$1, _super), __decorate$48([ Property(!0) ], Animation$$1.prototype, "enable", void 0), 
        __decorate$48([ Property(1e3) ], Animation$$1.prototype, "duration", void 0), Animation$$1;
    }(ChildProperty), Annotation = function(_super) {
        function Annotation() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$110(Annotation, _super), __decorate$48([ Property(null) ], Annotation.prototype, "content", void 0), 
        __decorate$48([ Property(90) ], Annotation.prototype, "angle", void 0), __decorate$48([ Property("50%") ], Annotation.prototype, "radius", void 0), 
        __decorate$48([ Property("-1") ], Annotation.prototype, "zIndex", void 0), __decorate$48([ Property(!1) ], Annotation.prototype, "autoAngle", void 0), 
        __decorate$48([ Complex({
            size: "12px",
            color: "#686868"
        }, Font$1) ], Annotation.prototype, "textStyle", void 0), __decorate$48([ Property(null) ], Annotation.prototype, "description", void 0), 
        Annotation;
    }(ChildProperty), Pointer = function(_super) {
        function Pointer() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$110(Pointer, _super), __decorate$48([ Property(null) ], Pointer.prototype, "value", void 0), 
        __decorate$48([ Property("Needle") ], Pointer.prototype, "type", void 0), __decorate$48([ Property(null) ], Pointer.prototype, "imageUrl", void 0), 
        __decorate$48([ Property(null) ], Pointer.prototype, "radius", void 0), __decorate$48([ Property(20) ], Pointer.prototype, "pointerWidth", void 0), 
        __decorate$48([ Complex({}, Cap) ], Pointer.prototype, "cap", void 0), __decorate$48([ Complex({}, NeedleTail) ], Pointer.prototype, "needleTail", void 0), 
        __decorate$48([ Property(Theme$1.pointerColor) ], Pointer.prototype, "color", void 0), 
        __decorate$48([ Complex({
            color: "#DDDDDD",
            width: 0
        }, Border$1) ], Pointer.prototype, "border", void 0), __decorate$48([ Complex(null, Animation$2) ], Pointer.prototype, "animation", void 0), 
        __decorate$48([ Property("Circle") ], Pointer.prototype, "markerShape", void 0), 
        __decorate$48([ Property(5) ], Pointer.prototype, "markerHeight", void 0), __decorate$48([ Property(null) ], Pointer.prototype, "description", void 0), 
        __decorate$48([ Property(5) ], Pointer.prototype, "markerWidth", void 0), Pointer;
    }(ChildProperty), Axis$1 = function(_super) {
        function Axis() {
            var _this = null !== _super && _super.apply(this, arguments) || this;
            return _this.visibleLabels = [], _this;
        }
        return __extends$110(Axis, _super), __decorate$48([ Property(null) ], Axis.prototype, "minimum", void 0), 
        __decorate$48([ Property(null) ], Axis.prototype, "maximum", void 0), __decorate$48([ Property(null) ], Axis.prototype, "radius", void 0), 
        __decorate$48([ Complex({}, Line) ], Axis.prototype, "lineStyle", void 0), __decorate$48([ Collection([ {} ], Range) ], Axis.prototype, "ranges", void 0), 
        __decorate$48([ Collection([ {} ], Pointer) ], Axis.prototype, "pointers", void 0), 
        __decorate$48([ Collection([ {} ], Annotation) ], Axis.prototype, "annotations", void 0), 
        __decorate$48([ Complex({
            width: 2,
            height: 10
        }, Tick) ], Axis.prototype, "majorTicks", void 0), __decorate$48([ Complex({
            width: 2,
            height: 5
        }, Tick) ], Axis.prototype, "minorTicks", void 0), __decorate$48([ Property(200) ], Axis.prototype, "startAngle", void 0), 
        __decorate$48([ Property(160) ], Axis.prototype, "endAngle", void 0), __decorate$48([ Property("ClockWise") ], Axis.prototype, "direction", void 0), 
        __decorate$48([ Property(null) ], Axis.prototype, "background", void 0), __decorate$48([ Complex({}, Label) ], Axis.prototype, "labelStyle", void 0), 
        Axis;
    }(ChildProperty), Annotations = function() {
        function Annotations(gauge) {
            this.gauge = gauge, this.elementId = gauge.element.id;
        }
        return Annotations.prototype.renderAnnotation = function(axis, index) {
            var _this = this, element = createElement("div", {
                id: this.elementId + "_Annotations_" + index
            }), parentElement = getElement$1(this.elementId + "_Secondary_Element");
            axis.annotations.map(function(annotation, annotationIndex) {
                null !== annotation.content && _this.createTemplate(element, annotationIndex, index);
            }), parentElement && element.childElementCount && parentElement.appendChild(element);
        }, Annotations.prototype.createTemplate = function(element, annotationIndex, axisIndex) {
            var axis = this.gauge.axes[axisIndex], annotation = axis.annotations[annotationIndex], childElement = createElement("div", {
                id: this.elementId + "_Axis_" + axisIndex + "_Annotation_" + annotationIndex,
                styles: "position: absolute; z-index:" + annotation.zIndex + ";transform:" + (annotation.autoAngle ? "rotate(" + (annotation.angle - 90) + "deg)" : "rotate(0deg)") + ";"
            }), argsData = {
                cancel: !1,
                name: "annotationRender",
                content: annotation.content,
                axis: axis,
                annotation: annotation,
                textStyle: annotation.textStyle
            };
            this.gauge.trigger("annotationRender", argsData);
            var templateFn, templateElement;
            if (!argsData.cancel) {
                if ((templateFn = getTemplateFunction$1(argsData.content)) && templateFn(axis).length) for (templateElement = templateFn(axis); templateElement.length > 0; ) childElement.appendChild(templateElement[0]); else childElement.appendChild(createElement("div", {
                    innerHTML: argsData.content,
                    styles: getFontStyle$1(argsData.textStyle)
                }));
                this.updateLocation(childElement, axis, annotation), element.appendChild(childElement);
            }
        }, Annotations.prototype.updateLocation = function(element, axis, annotation) {
            var location = getLocationFromAngle(annotation.angle - 90, stringToNumber$1(annotation.radius, axis.currentRadius), this.gauge.midPoint), elementRect = function(element) {
                var bounds;
                return document.body.appendChild(element), bounds = element.getBoundingClientRect(), 
                removeElement$2(element.id), bounds;
            }(element);
            element.style.left = location.x - elementRect.width / 2 + "px", element.style.top = location.y - elementRect.height / 2 + "px", 
            element.setAttribute("aria-label", annotation.description || "Annotation");
        }, Annotations.prototype.getModuleName = function() {
            return "Annotations";
        }, Annotations.prototype.destroy = function(gauge) {}, Annotations;
    }(), GaugeTooltip = function() {
        function GaugeTooltip(gauge) {
            this.gauge = gauge, this.element = gauge.element, this.tooltip = gauge.tooltip, 
            this.textStyle = this.tooltip.textStyle, this.borderStyle = this.tooltip.border, 
            this.ejTooltip = new Tooltip({
                opensOn: "custom",
                beforeRender: this.onBeforeRender.bind(this),
                beforeOpen: this.tooltipCustomization.bind(this),
                openDelay: 0,
                closeDelay: 1e3
            }), this.ejTooltip.appendTo(this.element);
        }
        return GaugeTooltip.prototype.renderTooltip = function(target) {
            var element, angle, currentPointer = getPointer(target.id, this.gauge);
            this.currentAxis = this.gauge.axes[currentPointer.axisIndex], this.currentPointer = this.currentAxis.pointers[currentPointer.pointerIndex], 
            angle = getAngleFromValue(this.currentPointer.currentValue, this.currentAxis.visibleRange.max, this.currentAxis.visibleRange.min, this.currentAxis.startAngle, this.currentAxis.endAngle, "ClockWise" === this.currentAxis.direction) % 360, 
            null === (element = this.appendTargetElement(angle)).getAttribute("data-tooltip-id") && (this.findPosition(angle), 
            this.ejTooltip.open(element));
        }, GaugeTooltip.prototype.appendTargetElement = function(angle) {
            var location = getLocationFromAngle(angle, this.currentAxis.currentRadius, this.gauge.midPoint), element = getElement$1(this.element.id + "_GaugeTooltip");
            return element ? (element.style.left = location.x + "px", element.style.top = location.y + "px") : (element = createElement("div", {
                id: this.element.id + "_GaugeTooltip",
                styles: "position:absolute;left:" + location.x + "px;top:" + location.y + "px;width:2px;height:2px;background:transparent"
            }), getElement$1(this.element.id + "_Secondary_Element").appendChild(element)), 
            element;
        }, GaugeTooltip.prototype.findPosition = function(angle) {
            switch (!0) {
              case angle >= 0 && angle <= 45:
                this.ejTooltip.position = "RightBottom";
                break;

              case angle >= 45 && angle < 90:
                this.ejTooltip.position = "BottomRight";
                break;

              case angle >= 90 && angle < 135:
                this.ejTooltip.position = "BottomLeft";
                break;

              case angle >= 135 && angle < 180:
                this.ejTooltip.position = "LeftBottom";
                break;

              case angle >= 180 && angle < 225:
                this.ejTooltip.position = "LeftTop";
                break;

              case angle >= 225 && angle < 270:
                this.ejTooltip.position = "TopLeft";
                break;

              case angle >= 270 && angle < 315:
                this.ejTooltip.position = "TopRight";
                break;

              default:
                this.ejTooltip.position = "RightTop";
            }
            this.ejTooltip.dataBind();
        }, GaugeTooltip.prototype.onBeforeRender = function(args) {
            var tooltipFormat = this.gauge.tooltip.format || this.currentAxis.labelStyle.format, customLabelFormat = tooltipFormat && null !== tooltipFormat.match("{value}"), format = this.gauge.intl.getNumberFormat({
                format: getLabelFormat(tooltipFormat),
                useGrouping: this.gauge.useGroupingSeparator
            }), content = customLabelFormat ? tooltipFormat.replace(new RegExp("{value}", "g"), format(this.currentPointer.currentValue)) : format(this.currentPointer.currentValue), argsData = {
                cancel: !1,
                name: "tooltipRender",
                content: content = this.tooltip.template ? getTemplateFunction$1(this.tooltip.template)(this.currentAxis)[0] : content,
                border: this.borderStyle,
                axis: this.currentAxis,
                pointer: this.currentPointer,
                textStyle: this.textStyle
            };
            this.gauge.trigger("tooltipRender", argsData), this.borderStyle = argsData.border, 
            args.cancel = argsData.cancel, this.ejTooltip.content = argsData.content, this.textStyle = argsData.textStyle, 
            this.ejTooltip.dataBind();
        }, GaugeTooltip.prototype.tooltipCustomization = function(args) {
            var outerWidth, innerWidth, font = this.textStyle, borderColor = this.borderStyle.color, border = this.borderStyle.width, pointerSize = 5;
            args.element.classList.remove("e-popup-close"), args.element.classList.add("e-popup-open");
            var arrowEle = args.element.querySelector(".e-arrow-tip");
            setStyleAttribute(args.element, {
                backgroundColor: this.tooltip.fill,
                borderColor: borderColor || "#212121",
                borderWidth: border + "px"
            }), setStyleAttribute(args.element.querySelector(".e-tip-content"), {
                color: font.color,
                fontFamily: font.fontFamily,
                fontSize: font.size,
                fontWeight: font.fontWeight,
                opacity: font.opacity.toString(),
                fontStyle: font.fontStyle
            }), setStyleAttribute(args.element.querySelector(".e-arrow-tip"), {
                width: 2 * (pointerSize + border) + "px",
                height: pointerSize + border + "px"
            }), arrowEle.classList.contains("e-tip-top") ? (outerWidth = (pointerSize = args.element.querySelector(".e-arrow-tip").offsetHeight) + "px", 
            setStyleAttribute(args.element.querySelector(".e-arrow-tip-outer"), {
                borderRightColor: "transparent",
                borderLeftColor: "transparent",
                borderBottomColor: borderColor,
                borderLeftWidth: outerWidth,
                borderRightWidth: outerWidth,
                borderBottomWidth: outerWidth
            }), innerWidth = pointerSize - border + "px", setStyleAttribute(args.element.querySelector(".e-arrow-tip-inner"), {
                borderRightColor: "transparent",
                borderLeftColor: "transparent",
                borderBottomColor: this.tooltip.fill,
                borderLeftWidth: innerWidth,
                borderRightWidth: innerWidth,
                borderBottomWidth: innerWidth,
                left: border + "px",
                top: border + "px"
            })) : arrowEle.classList.contains("e-tip-bottom") ? (outerWidth = (pointerSize = args.element.querySelector(".e-arrow-tip").offsetHeight) + "px", 
            setStyleAttribute(args.element.querySelector(".e-arrow-tip-outer"), {
                borderRightColor: "transparent",
                borderLeftColor: "transparent",
                borderTopColor: borderColor,
                borderLeftWidth: outerWidth,
                borderRightWidth: outerWidth,
                borderTopWidth: outerWidth
            }), innerWidth = pointerSize - border + "px", setStyleAttribute(args.element.querySelector(".e-arrow-tip-inner"), {
                borderRightColor: "transparent",
                borderLeftColor: "transparent",
                borderTopColor: this.tooltip.fill,
                borderLeftWidth: innerWidth,
                borderRightWidth: innerWidth,
                borderTopWidth: innerWidth,
                left: border + "px",
                top: "0"
            })) : arrowEle.classList.contains("e-tip-left") ? (setStyleAttribute(args.element.querySelector(".e-arrow-tip"), {
                width: pointerSize + border + "px",
                height: 2 * (pointerSize + border) + "px"
            }), outerWidth = (pointerSize = args.element.querySelector(".e-arrow-tip").offsetWidth) + "px", 
            setStyleAttribute(args.element.querySelector(".e-arrow-tip-outer"), {
                borderTopColor: "transparent",
                borderBottomColor: "transparent",
                borderRightColor: borderColor,
                borderTopWidth: outerWidth,
                borderBottomWidth: outerWidth,
                borderRightWidth: outerWidth
            }), innerWidth = pointerSize - border + "px", setStyleAttribute(args.element.querySelector(".e-arrow-tip-inner"), {
                borderTopColor: "transparent",
                borderBottomColor: "transparent",
                borderRightColor: this.tooltip.fill,
                borderTopWidth: innerWidth,
                borderBottomWidth: innerWidth,
                borderRightWidth: innerWidth,
                left: border + "px",
                top: border + "px"
            })) : (setStyleAttribute(args.element.querySelector(".e-arrow-tip"), {
                width: pointerSize + border + "px",
                height: 2 * (pointerSize + border) + "px"
            }), outerWidth = (pointerSize = args.element.querySelector(".e-arrow-tip").offsetWidth) + "px", 
            setStyleAttribute(args.element.querySelector(".e-arrow-tip-outer"), {
                borderTopColor: "transparent",
                borderBottomColor: "transparent",
                borderLeftColor: borderColor,
                borderTopWidth: outerWidth,
                borderBottomWidth: outerWidth,
                borderLeftWidth: outerWidth
            }), innerWidth = pointerSize - border + "px", setStyleAttribute(args.element.querySelector(".e-arrow-tip-inner"), {
                borderTopColor: "transparent",
                borderBottomColor: "transparent",
                borderLeftColor: this.tooltip.fill,
                borderTopWidth: innerWidth,
                borderBottomWidth: innerWidth,
                borderLeftWidth: innerWidth,
                left: (border <= 1 ? 0 : -1) + "px",
                top: border + "px"
            })), this.ejTooltip.refresh(args.target), setStyleAttribute(args.element, {
                display: "block",
                transitionProperty: "left,top",
                transitionDuration: this.tooltip.enableAnimation ? "1000ms" : "0ms"
            });
        }, GaugeTooltip.prototype.getModuleName = function() {
            return "Tooltip";
        }, GaugeTooltip.prototype.destroy = function(gauge) {}, GaugeTooltip;
    }(), AxisRenderer = function() {
        function AxisRenderer(gauge) {
            this.gauge = gauge;
        }
        return AxisRenderer.prototype.drawAxisOuterLine = function(axis, index, element, gauge) {
            var background = axis.background;
            this.setRangeColor(axis), null !== background && appendPath(new PathOption$1(gauge.element.id + "_AxisOuterLine_" + index, background, 0, "transparent", null, "0", getPathArc(gauge.midPoint, 0, 360, Math.min(axis.rect.width, axis.rect.height) / 2), "", "pointer-events:none;"), element, gauge);
        }, AxisRenderer.prototype.drawAxisLine = function(axis, index, element, gauge) {
            var startAngle = axis.startAngle, endAngle = axis.endAngle;
            axis.lineStyle.width > 0 && (startAngle = isCompleteAngle(startAngle, endAngle) ? [ 0, endAngle = 360 ][0] : startAngle, 
            appendPath(new PathOption$1(gauge.element.id + "_AxisLine_" + index, "transparent", axis.lineStyle.width, axis.lineStyle.color, null, axis.lineStyle.dashArray, getPathArc(gauge.midPoint, startAngle - 90, endAngle - 90, axis.currentRadius), "", "pointer-events:none;"), element, gauge));
        }, AxisRenderer.prototype.drawAxisLabels = function(axis, index, element, gauge) {
            var location, anchor, angle, label, labelElement = gauge.renderer.createGroup({
                id: gauge.element.id + "_Axis_Labels_" + index
            }), min = axis.visibleRange.min, max = axis.visibleRange.max, labelCollection = axis.visibleLabels, style = axis.labelStyle, radius = axis.currentRadius;
            "Outside" === style.position ? radius += axis.nearSize - (axis.maxLabelSize.height + axis.lineStyle.width / 2) + 5 : radius -= axis.farSize - (axis.maxLabelSize.height + axis.lineStyle.width / 2) + (style.autoAngle ? 10 : 0);
            for (var i = 0, length_1 = labelCollection.length; i < length_1; i++) 0 === i && "First" === style.hiddenLabel || i === length_1 - 1 && "Last" === style.hiddenLabel || (label = labelCollection[i], 
            location = getLocationFromAngle(angle = Math.round(getAngleFromValue(label.value, max, min, axis.startAngle, axis.endAngle, "ClockWise" === axis.direction)), radius, gauge.midPoint), 
            anchor = this.findAnchor(location, style, angle, label), textElement$1(new TextOption$1(gauge.element.id + "_Axis_" + index + "_Label_" + i, location.x, location.y, anchor, label.text, style.autoAngle ? "rotate(" + (angle + 90) + "," + location.x + "," + location.y + ")" : "", "auto"), style.font, style.useRangeColor ? getRangeColor(label.value, axis.ranges, style.font.color) : style.font.color, labelElement, "pointer-events:none;"));
            element.appendChild(labelElement);
        }, AxisRenderer.prototype.findAnchor = function(location, style, angle, label) {
            if (style.autoAngle) return "middle";
            var anchor = "Inside" === style.position ? angle > 120 && angle < 240 ? "start" : 300 < angle || angle < 60 ? "end" : "middle" : angle > 120 && angle < 240 ? "end" : 300 < angle || angle < 60 ? "start" : "middle";
            return location.y += "Inside" === style.position ? angle >= 240 && angle <= 300 ? label.size.height / 2 : angle >= 60 && angle <= 120 ? 0 : label.size.height / 4 : angle >= 240 && angle <= 300 ? 0 : angle >= 60 && angle <= 120 ? label.size.height / 2 : label.size.height / 4, 
            anchor;
        }, AxisRenderer.prototype.drawMinorTickLines = function(axis, index, element, gauge) {
            var minorTickElements = gauge.renderer.createGroup({
                id: gauge.element.id + "_Axis_MinorTickLines_" + index
            }), minorLineStyle = axis.minorTicks, minorInterval = null !== minorLineStyle.interval ? minorLineStyle.interval : axis.visibleRange.interval / 2, isRangeColor = minorLineStyle.useRangeColor;
            if (minorLineStyle.width && minorLineStyle.height && minorInterval) {
                for (var i = axis.visibleRange.min, max = axis.visibleRange.max; i <= max; i += minorInterval) this.majorValues.indexOf(+i.toFixed(3)) < 0 && appendPath(new PathOption$1(gauge.element.id + "_Axis_Minor_TickLine_" + index + "_" + i, "transparent", minorLineStyle.width, isRangeColor ? getRangeColor(i, axis.ranges, minorLineStyle.color) : minorLineStyle.color, null, "0", this.calculateTicks(i, minorLineStyle, axis), "", "pointer-events:none;"), minorTickElements, gauge);
                element.appendChild(minorTickElements);
            }
        }, AxisRenderer.prototype.drawMajorTickLines = function(axis, index, element, gauge) {
            var majorTickElements = gauge.renderer.createGroup({
                id: gauge.element.id + "_Axis_MajorTickLines_" + index
            }), majorLineStyle = axis.majorTicks, isRangeColor = majorLineStyle.useRangeColor;
            if (this.majorValues = [], majorLineStyle.width && majorLineStyle.height && axis.visibleRange.interval) {
                for (var i = axis.visibleRange.min, max = axis.visibleRange.max, interval = axis.visibleRange.interval; i <= max; i += interval) this.majorValues.push(+i.toFixed(3)), 
                appendPath(new PathOption$1(gauge.element.id + "_Axis_Major_TickLine_" + index + "_" + i, "transparent", majorLineStyle.width, isRangeColor ? getRangeColor(i, axis.ranges, majorLineStyle.color) : majorLineStyle.color, null, "0", this.calculateTicks(i, majorLineStyle, axis), "", "pointer-events:none;"), majorTickElements, gauge);
                element.appendChild(majorTickElements);
            }
        }, AxisRenderer.prototype.calculateTicks = function(value, options, axis) {
            var axisLineWidth = axis.lineStyle.width / 2 + options.offset, isOutside = "Outside" === options.position, angle = getAngleFromValue(value, axis.visibleRange.max, axis.visibleRange.min, axis.startAngle, axis.endAngle, "ClockWise" === axis.direction), start = getLocationFromAngle(angle, axis.currentRadius + (isOutside ? axisLineWidth : -axisLineWidth), this.gauge.midPoint), end = getLocationFromAngle(angle, axis.currentRadius + (isOutside ? axisLineWidth : -axisLineWidth) + (isOutside ? options.height : -options.height), this.gauge.midPoint);
            return "M " + start.x + " " + start.y + " L " + end.x + " " + end.y + " ";
        }, AxisRenderer.prototype.drawAxisRange = function(axis, index, element, gauge) {
            var startAngle, endAngle, startValue, endValue, startWidth, endWidth, _this = this, rangeElement = gauge.renderer.createGroup({
                id: gauge.element.id + "_Axis_Ranges_" + index
            }), isClockWise = "ClockWise" === axis.direction, min = axis.visibleRange.min, max = axis.visibleRange.max;
            axis.ranges.map(function(range, rangeIndex) {
                _this.calculateRangeRadius(axis, range), startValue = Math.min(Math.max(range.start, min), range.end), 
                endValue = Math.min(Math.max(range.start, range.end), max), startValue !== endValue && (startAngle = getAngleFromValue(startValue, max, min, axis.startAngle, axis.endAngle, isClockWise), 
                endAngle = getAngleFromValue(endValue, max, min, axis.startAngle, axis.endAngle, isClockWise), 
                startWidth = range.startWidth.length > 0 ? toPixel(range.startWidth, range.currentRadius) : range.startWidth, 
                endWidth = range.endWidth.length > 0 ? toPixel(range.endWidth, range.currentRadius) : range.endWidth, 
                endAngle = isClockWise ? endAngle : [ startAngle, startAngle = endAngle ][0], endWidth = isClockWise ? endWidth : [ startWidth, startWidth = endWidth ][0], 
                appendPath(new PathOption$1(gauge.element.id + "_Axis_" + index + "_Range_" + rangeIndex, range.rangeColor, 0, range.rangeColor, 1, "0", getPathArc(gauge.midPoint, Math.round(startAngle), Math.round(endAngle), range.currentRadius, startWidth, endWidth), "", "pointer-events:none;"), rangeElement, gauge));
            }), element.appendChild(rangeElement);
        }, AxisRenderer.prototype.calculateRangeRadius = function(axis, range) {
            var radius = null !== range.radius ? range.radius : "100%";
            range.currentRadius = stringToNumber$1(radius, axis.currentRadius);
        }, AxisRenderer.prototype.setRangeColor = function(axis) {
            var rangeColors = (this.gauge.theme, [ "#50c917", "#27d5ff", "#fcde0b", "#ffb133", "#ff5985" ]);
            axis.ranges.map(function(range, index) {
                range.rangeColor = range.color ? range.color : rangeColors[index % rangeColors.length];
            });
        }, AxisRenderer;
    }(), PointerRenderer = function() {
        function PointerRenderer(gauge) {
            this.gauge = gauge;
        }
        return PointerRenderer.prototype.drawPointers = function(axis, axisIndex, element, gauge, animate) {
            var _this = this;
            void 0 === animate && (animate = !0);
            var childElement, pointerElement = gauge.renderer.createGroup({
                id: gauge.element.id + "_Axis_Pointers_" + axisIndex
            });
            axis.pointers.map(function(pointer, pointerIndex) {
                axis.visibleRange, pointer.pathElement = [], _this.calculatePointerRadius(axis, pointer), 
                childElement = gauge.renderer.createGroup({
                    id: gauge.element.id + "_Axis_" + axisIndex + "_Pointer_" + pointerIndex
                }), _this["draw" + pointer.type + "Pointer"](axis, axisIndex, pointerIndex, childElement, gauge), 
                _this.setPointerValue(axis, pointer, pointer.currentValue), pointerElement.appendChild(childElement), 
                animate && _this.doPointerAnimation(pointer, axis);
            }), element.appendChild(pointerElement);
        }, PointerRenderer.prototype.calculatePointerRadius = function(axis, pointer) {
            pointer.currentRadius = null === pointer.radius ? axis.currentRadius - (axis.farSize + 5) : stringToNumber$1(pointer.radius, axis.currentRadius);
        }, PointerRenderer.prototype.drawNeedlePointer = function(axis, axisIndex, index, parentElement, gauge) {
            var pointerRadius, location, direction, rectDirection, pointer = axis.pointers[index], mid = gauge.midPoint, width = pointer.pointerWidth / 2;
            location = getLocationFromAngle(0, pointer.currentRadius, mid), direction = "M " + mid.x + " " + (mid.y - width) + " L " + location.x + " " + mid.y + " L " + mid.x + " " + (mid.y + width) + " Z", 
            pointer.pathElement.push(appendPath(new PathOption$1(gauge.element.id + "_Axis_" + axisIndex + "_Pointer_Needle_" + index, pointer.color, pointer.border.width, pointer.border.color, null, "0", direction), parentElement, gauge)), 
            pointerRadius = stringToNumber$1(pointer.needleTail.length, pointer.currentRadius), 
            rectDirection = "M " + mid.x + " " + (mid.y - width) + " L " + location.x + " " + (mid.y - width) + " L " + location.x + " " + (mid.y + width) + " L " + mid.x + " " + (mid.y + width), 
            pointerRadius && (location = getLocationFromAngle(180, pointerRadius, gauge.midPoint), 
            direction = "M " + mid.x + " " + (mid.y - width) + " L " + location.x + " " + (mid.y - width) + " L " + location.x + " " + (mid.y + width) + " L " + mid.x + " " + (mid.y + width) + " Z", 
            pointer.pathElement.push(appendPath(new PathOption$1(gauge.element.id + "_Axis_" + axisIndex + "_Pointer_NeedleTail_" + index, pointer.needleTail.color, pointer.needleTail.border.width, pointer.needleTail.border.color, null, "0", direction), parentElement, gauge)), 
            rectDirection += " L " + location.x + " " + (mid.y + width) + " L " + location.x + " " + (mid.y - width)), 
            pointer.cap.radius && pointer.pathElement.push(appendPath(calculateShapes$1(mid, "Circle", new Size$1(2 * pointer.cap.radius, 2 * pointer.cap.radius), "", new PathOption$1(gauge.element.id + "_Axis_" + axisIndex + "_Pointer_NeedleCap_" + index, pointer.cap.color, pointer.cap.border.width, pointer.cap.border.color, null, "0", "", "")), parentElement, gauge, "Ellipse")), 
            pointer.pathElement.push(appendPath(new PathOption$1(gauge.element.id + "_Axis_" + axisIndex + "_Pointer_NeedleRect_" + index, "transparent", 0, "transpanret", null, "0", rectDirection + " Z"), parentElement, gauge));
        }, PointerRenderer.prototype.setPointerValue = function(axis, pointer, value) {
            var location = this.gauge.midPoint, isClockWise = "ClockWise" === axis.direction, startAngle = getAngleFromValue(axis.visibleRange.min, axis.visibleRange.max, axis.visibleRange.min, axis.startAngle, axis.endAngle, isClockWise), endAngle = getAngleFromValue(value, axis.visibleRange.max, axis.visibleRange.min, axis.startAngle, axis.endAngle, isClockWise);
            endAngle = isClockWise ? endAngle : [ startAngle, startAngle = endAngle ][0], pointer.pathElement.map(function(element) {
                "RangeBar" === pointer.type ? element.setAttribute("d", getCompleteArc(location, startAngle, endAngle, pointer.currentRadius, pointer.currentRadius - pointer.pointerWidth)) : element.setAttribute("transform", "rotate(" + getAngleFromValue(value, axis.visibleRange.max, axis.visibleRange.min, axis.startAngle, axis.endAngle, isClockWise) + "," + location.x + "," + location.y + ")"), 
                element.setAttribute("aria-label", pointer.description || "Pointer:" + value.toString());
            });
        }, PointerRenderer.prototype.drawMarkerPointer = function(axis, axisIndex, index, parentElement, gauge) {
            var pointer = axis.pointers[index], location = getLocationFromAngle(0, pointer.currentRadius, gauge.midPoint);
            pointer.pathElement.push(appendPath(calculateShapes$1(location, pointer.markerShape, new Size$1(pointer.markerWidth, pointer.markerHeight), pointer.imageUrl, new PathOption$1(gauge.element.id + "_Axis_" + axisIndex + "_Pointer_Marker_" + index, pointer.color, pointer.border.width, pointer.border.color, null, "0", "", "")), parentElement, gauge, "Circle" === pointer.markerShape ? "Ellipse" : "Image" === pointer.markerShape ? "Image" : "Path"));
        }, PointerRenderer.prototype.drawRangeBarPointer = function(axis, axisIndex, index, parentElement, gauge) {
            var pointer = axis.pointers[index];
            pointer.pathElement.push(appendPath(new PathOption$1(gauge.element.id + "_Axis_" + axisIndex + "_Pointer_RangeBar_" + index, pointer.color, pointer.border.width, pointer.border.color, 1, "0", ""), parentElement, gauge));
        }, PointerRenderer.prototype.doPointerAnimation = function(pointer, axis) {
            var _this = this, startValue = axis.visibleRange.min, endValue = pointer.currentValue;
            pointer.animation.enable && startValue !== endValue && this.gauge.animatePointer && pointer.pathElement.map(function(element) {
                "RangeBar" === pointer.type ? _this.performRangeBarAnimation(element, startValue, endValue, axis, pointer, pointer.currentRadius, pointer.currentRadius - pointer.pointerWidth) : _this.performNeedleAnimation(element, startValue, endValue, axis, pointer, pointer.currentRadius, pointer.currentRadius - pointer.pointerWidth);
            });
        }, PointerRenderer.prototype.performNeedleAnimation = function(element, start, end, axis, pointer, radius, innerRadius) {
            var sweepAngle, _this = this, isClockWise = "ClockWise" === axis.direction, startAngle = getAngleFromValue(start, axis.visibleRange.max, axis.visibleRange.min, axis.startAngle, axis.endAngle, isClockWise), pointAngle = getAngleFromValue(end, axis.visibleRange.max, axis.visibleRange.min, axis.startAngle, axis.endAngle, isClockWise), endAngle = startAngle > pointAngle ? pointAngle + 360 : pointAngle;
            new Animation({}).animate(element, {
                duration: pointer.animation.duration,
                progress: function(args) {
                    sweepAngle = start < end || Math.round(startAngle) === Math.round(endAngle) ? isClockWise ? endAngle - startAngle : endAngle - startAngle - 360 : isClockWise ? endAngle - startAngle - 360 : endAngle - startAngle, 
                    element.style.animation = "None", element.setAttribute("transform", "rotate(" + linear$1(args.timeStamp, startAngle, sweepAngle, args.duration) + "," + _this.gauge.midPoint.x.toString() + "," + _this.gauge.midPoint.y.toString() + ")");
                },
                end: function(model) {
                    _this.setPointerValue(axis, pointer, end), ("Marker" === pointer.type || element.id.indexOf("_Pointer_NeedleCap") >= 0) && _this.gauge.trigger("animationComplete", {
                        axis: axis,
                        pointer: pointer
                    });
                }
            });
        }, PointerRenderer.prototype.performRangeBarAnimation = function(element, start, end, axis, pointer, radius, innerRadius) {
            var sweepAngle, _this = this, isClockWise = "ClockWise" === axis.direction, startAngle = getAngleFromValue(start, axis.visibleRange.max, axis.visibleRange.min, axis.startAngle, axis.endAngle, isClockWise), minAngle = getAngleFromValue(axis.visibleRange.min, axis.visibleRange.max, axis.visibleRange.min, axis.startAngle, axis.endAngle, isClockWise), pointAngle = getAngleFromValue(end, axis.visibleRange.max, axis.visibleRange.min, axis.startAngle, axis.endAngle, isClockWise), endAngle = startAngle > pointAngle ? pointAngle + 360 : pointAngle;
            new Animation({}).animate(element, {
                duration: pointer.animation.duration,
                progress: function(arg) {
                    element.style.animation = "None", sweepAngle = start < end || Math.round(startAngle) === Math.round(endAngle) ? isClockWise ? endAngle - startAngle : endAngle - startAngle - 360 : isClockWise ? endAngle - startAngle - 360 : endAngle - startAngle, 
                    isClockWise ? element.setAttribute("d", getCompleteArc(_this.gauge.midPoint, minAngle, linear$1(arg.timeStamp, startAngle, sweepAngle, arg.duration) + 1e-4, radius, innerRadius)) : element.setAttribute("d", getCompleteArc(_this.gauge.midPoint, linear$1(arg.timeStamp, startAngle, sweepAngle, arg.duration), minAngle + 1e-4, radius, innerRadius));
                },
                end: function(model) {
                    _this.setPointerValue(axis, pointer, end), _this.gauge.trigger("animationComplete", {
                        axis: axis,
                        pointer: pointer
                    });
                }
            });
        }, PointerRenderer;
    }(), AxisLayoutPanel = function() {
        function AxisLayoutPanel(gauge) {
            this.gauge = gauge, this.axisRenderer = new AxisRenderer(gauge), this.pointerRenderer = new PointerRenderer(gauge);
        }
        return AxisLayoutPanel.prototype.measureAxis = function(rect) {
            this.measureAxisSize(this.gauge, rect), this.calculateAxesRadius();
        }, AxisLayoutPanel.prototype.calculateAxesRadius = function() {
            for (var totalRadius, currentRadius, rangeMaximumRadius = 0, _i = 0, _a = this.gauge.axes; _i < _a.length; _i++) {
                var axis = _a[_i];
                totalRadius = Math.min(axis.rect.width, axis.rect.height) / 2, currentRadius = null != axis.radius ? stringToNumber$1(axis.radius, totalRadius) : totalRadius, 
                currentRadius = (rangeMaximumRadius = Math.max.apply(Math, axis.ranges.map(function(value) {
                    return value.radius ? value.radius.indexOf("%") < 0 ? 100 : parseInt(value.radius, 10) : 0;
                }))) > 100 && null == axis.radius ? 100 * currentRadius / rangeMaximumRadius : currentRadius, 
                axis.currentRadius = currentRadius - axis.nearSize, axis.visibleRange.interval = this.calculateNumericInterval(axis, axis.rect), 
                this.calculateVisibleLabels(axis);
            }
        }, AxisLayoutPanel.prototype.measureAxisSize = function(gauge, rect) {
            var sum, _this = this;
            this.computeSize(gauge.axes, rect), gauge.axes.map(function(axis, index) {
                sum = function(from, to, values) {
                    for (var sum = 0, length = values.length; from < length; from++) sum += values[from];
                    return sum;
                }(index, _this.farSizes.length, _this.farSizes), axis.rect = new Rect$1(rect.x + sum, rect.y + sum, rect.width - 2 * sum, rect.height - 2 * sum);
            });
        }, AxisLayoutPanel.prototype.calculateAxisValues = function(rect) {
            for (var _i = 0, _a = this.gauge.axes; _i < _a.length; _i++) {
                var axis = _a[_i];
                this.calculateVisibleRange(axis, rect), this.calculateVisibleLabels(axis);
            }
        }, AxisLayoutPanel.prototype.calculateVisibleRange = function(axis, rect) {
            var interval = axis.majorTicks.interval, minimumValue = Math.min(null === axis.minimum ? 0 : axis.minimum, axis.maximum), maximumValue = Math.max(axis.minimum, null === axis.maximum ? 100 : axis.maximum);
            axis.pointers.map(function(pointer) {
                pointer.currentValue = null !== pointer.value ? pointer.value < minimumValue ? minimumValue : pointer.value > maximumValue ? maximumValue : pointer.value : minimumValue, 
                minimumValue = null === axis.minimum ? Math.min(pointer.currentValue, minimumValue) : minimumValue, 
                maximumValue = null === axis.maximum ? Math.max(pointer.currentValue, maximumValue) : maximumValue;
            }), minimumValue = minimumValue === maximumValue ? null !== interval ? minimumValue - interval : minimumValue - 1 : minimumValue, 
            axis.visibleRange = {
                min: minimumValue,
                max: maximumValue,
                interval: interval
            }, axis.visibleRange.interval = this.calculateNumericInterval(axis, rect);
        }, AxisLayoutPanel.prototype.calculateNumericInterval = function(axis, rect) {
            if (null !== axis.majorTicks.interval) return axis.majorTicks.interval;
            var totalAngle = axis.endAngle - axis.startAngle;
            return totalAngle = totalAngle <= 0 ? totalAngle + 360 : totalAngle, this.calculateNiceInterval(axis.visibleRange.max, axis.visibleRange.min, axis.currentRadius ? axis.currentRadius : rect.width / 2, totalAngle);
        }, AxisLayoutPanel.prototype.calculateNiceInterval = function(maxValue, minValue, radius, degree) {
            for (var delta = maxValue - minValue, circumference = 2 * Math.PI * radius * (degree / 360), desiredIntervalsCount = Math.max(.01599 * circumference, 1), niceInterval = delta / desiredIntervalsCount, minInterval = Math.pow(10, Math.floor(Math.log(niceInterval) / Math.log(10))), _i = 0, _a = [ 10, 5, 2, 1 ]; _i < _a.length; _i++) {
                var currentInterval = minInterval * _a[_i];
                if (desiredIntervalsCount < delta / currentInterval) break;
                niceInterval = currentInterval;
            }
            return niceInterval;
        }, AxisLayoutPanel.prototype.calculateVisibleLabels = function(axis) {
            var argsData, style = axis.labelStyle, customLabelFormat = style.format && null !== style.format.match("{value}"), format = this.gauge.intl.getNumberFormat({
                format: getLabelFormat(style.format),
                useGrouping: this.gauge.useGroupingSeparator
            });
            axis.visibleLabels = [];
            for (var i = axis.visibleRange.min, interval = axis.visibleRange.interval, max = axis.visibleRange.max; i <= max && interval; i += interval) argsData = {
                cancel: !1,
                name: "axisLabelRender",
                axis: axis,
                text: customLabelFormat ? style.format.replace(new RegExp("{value}", "g"), format(i)) : format(i),
                value: i
            }, this.gauge.trigger("axisLabelRender", argsData), argsData.cancel || axis.visibleLabels.push(new VisibleLabels$1(argsData.text, i));
            this.getMaxLabelWidth(this.gauge, axis);
        }, AxisLayoutPanel.prototype.computeSize = function(axes, rect) {
            var lineSize, outerHeight, innerHeight, isMajorTickOutside, isMinorTickOutside, isLabelOutside, majorTickOffset = 0, minorTickOffset = 0, labelOffset = 0;
            this.farSizes = [], this.calculateAxisValues(rect);
            for (var _i = 0, axes_1 = axes; _i < axes_1.length; _i++) {
                var axis = axes_1[_i];
                lineSize = axis.lineStyle.width / 2, outerHeight = 0, innerHeight = 0, isMajorTickOutside = "Outside" === axis.majorTicks.position, 
                majorTickOffset = axis.majorTicks.offset, isMinorTickOutside = "Outside" === axis.minorTicks.position, 
                minorTickOffset = axis.minorTicks.offset, isLabelOutside = "Outside" === axis.labelStyle.position, 
                labelOffset = axis.labelStyle.offset, outerHeight += isMajorTickOutside && isMinorTickOutside && isLabelOutside ? 0 : 5, 
                outerHeight += (isMajorTickOutside ? axis.majorTicks.height + lineSize : 0) + (isLabelOutside ? axis.maxLabelSize.height + 10 + labelOffset : 0) + (isMinorTickOutside && !isMajorTickOutside ? axis.minorTicks.height + lineSize : 0) + lineSize, 
                outerHeight += isMajorTickOutside && isMinorTickOutside ? Math.max(majorTickOffset, minorTickOffset) : isMajorTickOutside ? majorTickOffset : isMinorTickOutside ? minorTickOffset : 0, 
                innerHeight += (isMajorTickOutside ? 0 : axis.majorTicks.height + lineSize) + (isLabelOutside ? 0 : axis.maxLabelSize.height + 10 + labelOffset) + (!isMinorTickOutside && isMajorTickOutside ? axis.minorTicks.height + lineSize : 0) + lineSize, 
                innerHeight += isMajorTickOutside || isMinorTickOutside ? isMajorTickOutside ? isMinorTickOutside ? 0 : minorTickOffset : majorTickOffset : Math.max(majorTickOffset, minorTickOffset), 
                this.farSizes[this.farSizes.length - 1] && (this.farSizes[this.farSizes.length - 1] += innerHeight + outerHeight), 
                axis.nearSize = outerHeight - 5, axis.farSize = innerHeight, outerHeight = this.gauge.axes.length === this.farSizes.length + 1 ? 0 : outerHeight, 
                this.farSizes.push(outerHeight);
            }
        }, AxisLayoutPanel.prototype.renderAxes = function(animate) {
            var _this = this;
            void 0 === animate && (animate = !0);
            var element, gauge = this.gauge, renderer = this.axisRenderer, axesElements = gauge.renderer.createGroup({
                id: gauge.element.id + "_AxesCollection",
                "clip-path": "url(#" + gauge.element.id + "_GaugeAreaClipRect_)"
            });
            gauge.element.appendChild(createElement("div", {
                id: gauge.element.id + "_Secondary_Element",
                styles: "position: relative"
            })), gauge.axes.map(function(axis, index) {
                element = gauge.renderer.createGroup({
                    id: gauge.element.id + "_Axis_Group_" + index
                }), renderer.drawAxisOuterLine(axis, index, element, gauge), renderer.drawAxisRange(axis, index, element, gauge), 
                renderer.drawAxisLine(axis, index, element, gauge), renderer.drawMajorTickLines(axis, index, element, gauge), 
                renderer.drawMinorTickLines(axis, index, element, gauge), renderer.drawAxisLabels(axis, index, element, gauge), 
                _this.pointerRenderer.drawPointers(axis, index, element, gauge, animate), gauge.annotationsModule && gauge.annotationsModule.renderAnnotation(axis, index), 
                axesElements.appendChild(element);
            }), gauge.svgObject.appendChild(gauge.renderer.drawClipPath({
                id: gauge.element.id + "_GaugeAreaClipRect_",
                x: 0,
                y: 0,
                width: gauge.availableSize.width,
                height: gauge.availableSize.height,
                fill: "transparent",
                stroke: "transparent"
            })), gauge.svgObject.appendChild(axesElements);
        }, AxisLayoutPanel.prototype.getMaxLabelWidth = function(gauge, axis) {
            axis.maxLabelSize = new Size$1(0, 0);
            for (var _i = 0, _a = axis.visibleLabels; _i < _a.length; _i++) {
                var label = _a[_i];
                label.size = measureText$1(label.text, axis.labelStyle.font), axis.maxLabelSize.width = label.size.width > axis.maxLabelSize.width ? label.size.width : axis.maxLabelSize.width, 
                axis.maxLabelSize.height = label.size.height > axis.maxLabelSize.height ? label.size.height : axis.maxLabelSize.height;
            }
        }, AxisLayoutPanel;
    }(), __extends$107 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$46 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, CircularGauge = function(_super) {
        function CircularGauge(options, element) {
            return _super.call(this, options, element) || this;
        }
        return __extends$107(CircularGauge, _super), CircularGauge.prototype.preRender = function() {
            this.unWireEvents(), this.trigger("load", {
                gauge: this
            }), this.themeEffect(), this.initPrivateVariable(), this.setCulture(), this.createSvg(), 
            this.wireEvents();
        }, CircularGauge.prototype.themeEffect = function() {
            "Highcontrast" === this.theme ? (this.titleStyle.color = this.titleStyle.color || "#FFFFFF", 
            this.setThemeColors("#FFFFFF", "#FFFFFF")) : (this.titleStyle.color = this.titleStyle.color || "#424242", 
            this.setThemeColors("#212121", "#757575"));
        }, CircularGauge.prototype.setThemeColors = function(labelcolor, others) {
            for (var _i = 0, _a = this.axes; _i < _a.length; _i++) {
                var axis = _a[_i];
                axis.lineStyle.color = axis.lineStyle.color || others, axis.labelStyle.font.color = axis.labelStyle.font.color || labelcolor, 
                axis.majorTicks.color = axis.majorTicks.color || others, axis.minorTicks.color = axis.minorTicks.color || others;
                for (var _b = 0, _c = axis.pointers; _b < _c.length; _b++) {
                    var pointer = _c[_b];
                    pointer.color = pointer.color || others, pointer.needleTail.color = pointer.needleTail.color || others, 
                    pointer.needleTail.border.color = pointer.needleTail.border.color || others, pointer.cap.color = pointer.cap.color || others, 
                    pointer.cap.border.color = pointer.cap.border.color || others;
                }
            }
        }, CircularGauge.prototype.render = function() {
            this.calculateBounds(), this.renderElements();
        }, CircularGauge.prototype.unWireEvents = function() {
            EventHandler.remove(this.element, Browser.touchStartEvent, this.gaugeOnMouseDown), 
            EventHandler.remove(this.element, Browser.touchMoveEvent, this.mouseMove), EventHandler.remove(this.element, Browser.touchEndEvent, this.mouseEnd), 
            EventHandler.remove(this.element, "contextmenu", this.gaugeRightClick), EventHandler.remove(this.element, Browser.isPointer ? "pointerleave" : "mouseleave", this.mouseLeave), 
            window.removeEventListener(Browser.isTouch && "orientation" in window && "onorientationchange" in window ? "orientationchange" : "resize", this.gaugeResize);
        }, CircularGauge.prototype.wireEvents = function() {
            EventHandler.add(this.element, Browser.touchStartEvent, this.gaugeOnMouseDown, this), 
            EventHandler.add(this.element, Browser.touchMoveEvent, this.mouseMove, this), EventHandler.add(this.element, Browser.touchEndEvent, this.mouseEnd, this), 
            EventHandler.add(this.element, "contextmenu", this.gaugeRightClick, this), EventHandler.add(this.element, Browser.isPointer ? "pointerleave" : "mouseleave", this.mouseLeave, this), 
            window.addEventListener(Browser.isTouch && "orientation" in window && "onorientationchange" in window ? "orientationchange" : "resize", this.gaugeResize.bind(this)), 
            this.setGaugeStyle(this.element);
        }, CircularGauge.prototype.mouseMove = function(e) {
            var args = this.getMouseArgs(e, "touchmove", "gaugeMouseMove");
            this.trigger("gaugeMouseMove", args);
            var dragArgs, tooltip = this.tooltipModule;
            return args.cancel || (this.tooltip.enable && tooltip && (args.target.id.indexOf("_Pointer_") >= 0 && !this.activePointer ? tooltip.renderTooltip(args.target) : tooltip.ejTooltip.close()), 
            this.enablePointerDrag && this.activePointer && (dragArgs = {
                axis: this.activeAxis,
                pointer: this.activePointer,
                previousValue: this.activePointer.currentValue,
                name: "dragMove",
                currentValue: null
            }, this.pointerDrag(new GaugeLocation(args.x, args.y)), dragArgs.currentValue = this.activePointer.currentValue, 
            this.trigger("dragMove", dragArgs))), !1;
        }, CircularGauge.prototype.mouseLeave = function(e) {
            this.activeAxis = null, this.activePointer = null, this.svgObject.setAttribute("cursor", "auto");
            var args = this.getMouseArgs(e, "touchmove", "gaugeMouseLeave");
            return this.trigger("gaugeMouseLeave", args), this.tooltip.enable && this.tooltipModule && this.tooltipModule.ejTooltip.close(), 
            !1;
        }, CircularGauge.prototype.gaugeRightClick = function(event) {
            return 2 !== event.buttons && "touch" !== event.pointerType || (event.preventDefault(), 
            event.stopPropagation(), !1);
        }, CircularGauge.prototype.pointerDrag = function(location) {
            var axis = this.activeAxis, range = axis.visibleRange, value = function(angle, maximumValue, minimumValue, startAngle, endAngle, isClockWise) {
                return endAngle -= isCompleteAngle(startAngle, endAngle) ? 1e-4 : 0, angle = angle < startAngle ? angle + 360 : angle, 
                isClockWise ? (angle - startAngle) / getDegree(startAngle, endAngle) * (maximumValue - minimumValue) + minimumValue : maximumValue - ((angle - startAngle) / getDegree(startAngle, endAngle) * (maximumValue - minimumValue) + minimumValue);
            }(function(center, point) {
                var angle = Math.atan2(point.y - center.y, point.x - center.x);
                return angle = Math.round((angle < 0 ? 6.283 + angle : angle) * (180 / Math.PI)) - 270, 
                angle += angle < 0 ? 360 : 0;
            }(this.midPoint, location), range.max, range.min, axis.startAngle, axis.endAngle, "ClockWise" === axis.direction);
            value >= range.min && value <= range.max && (this.activePointer.currentValue = value, 
            this.activePointer.value = value, this.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(axis, this.activePointer, value));
        }, CircularGauge.prototype.gaugeOnMouseDown = function(e) {
            var currentPointer, args = this.getMouseArgs(e, "touchstart", "gaugeMouseDown");
            return this.trigger("gaugeMouseDown", args), !args.cancel && args.target.id.indexOf("_Pointer_") >= 0 && args.target.id.indexOf(this.element.id + "_Axis_") >= 0 && (currentPointer = getPointer(args.target.id, this), 
            this.activeAxis = this.axes[currentPointer.axisIndex], this.activePointer = this.activeAxis.pointers[currentPointer.pointerIndex], 
            this.trigger("dragStart", {
                axis: this.activeAxis,
                name: "dragStart",
                pointer: this.activePointer,
                currentValue: this.activePointer.currentValue
            }), this.svgObject.setAttribute("cursor", "pointer")), !1;
        }, CircularGauge.prototype.mouseEnd = function(e) {
            var args = this.getMouseArgs(e, "touchend", "gaugeMouseUp"), isTouch = "touch" === e.pointerType || "2" === e.pointerType || "touchend" === e.type, tooltip = this.tooltipModule;
            return this.trigger("gaugeMouseUp", args), this.activeAxis && this.activePointer && (this.trigger("dragEnd", {
                name: "dragEnd",
                axis: this.activeAxis,
                pointer: this.activePointer,
                currentValue: this.activePointer.currentValue
            }), !args.cancel && isTouch && this.tooltip.enable && tooltip && args.target.id.indexOf("_Pointer_") >= 0 && (tooltip.renderTooltip(args.target), 
            window.setTimeout(function() {
                tooltip.ejTooltip.close();
            }, 2e3)), this.activeAxis = null, this.activePointer = null), this.svgObject.setAttribute("cursor", "auto"), 
            !1;
        }, CircularGauge.prototype.getMouseArgs = function(e, type, name) {
            var rect = this.element.getBoundingClientRect(), location = new GaugeLocation(-rect.left, -rect.top), isTouch = e.type === type;
            return location.x += isTouch ? e.changedTouches[0].clientX : e.clientX, location.y += isTouch ? e.changedTouches[0].clientY : e.clientY, 
            {
                cancel: !1,
                name: name,
                x: location.x,
                y: location.y,
                target: e.target
            };
        }, CircularGauge.prototype.gaugeResize = function(e) {
            var _this = this, args = {
                gauge: this,
                previousSize: new Size$1(this.availableSize.width, this.availableSize.height),
                name: "resized",
                currentSize: new Size$1(0, 0)
            };
            return this.animatePointer = !1, this.resizeTo && clearTimeout(this.resizeTo), this.element.classList.contains("e-circulargauge") && (this.resizeTo = window.setTimeout(function() {
                _this.createSvg(), _this.calculateBounds(), _this.renderElements(), args.currentSize = _this.availableSize, 
                _this.trigger("resized", args);
            }, 500)), !1;
        }, CircularGauge.prototype.setGaugeStyle = function(element) {
            element.style.touchAction = this.enablePointerDrag ? "none" : "element", element.style.msTouchAction = this.enablePointerDrag ? "none" : "element", 
            element.style.msContentZooming = "none", element.style.msUserSelect = "none", element.style.webkitUserSelect = "none", 
            element.style.position = "relative";
        }, CircularGauge.prototype.setCulture = function() {
            this.intl = new Internationalization();
        }, CircularGauge.prototype.createSvg = function() {
            this.removeSvg(), this.calculateSvgSize(), this.svgObject = this.renderer.createSvg({
                id: this.element.id + "_svg",
                width: this.availableSize.width,
                height: this.availableSize.height
            });
        }, CircularGauge.prototype.removeSvg = function() {
            if (removeElement$2(this.element.id + "_Secondary_Element"), this.svgObject) {
                for (;this.svgObject.childNodes.length > 0; ) this.svgObject.removeChild(this.svgObject.firstChild);
                !this.svgObject.hasChildNodes() && this.svgObject.parentNode && remove(this.svgObject);
            }
        }, CircularGauge.prototype.initPrivateVariable = function() {
            this.renderer = new SvgRenderer(this.element.id), this.gaugeAxisLayoutPanel = new AxisLayoutPanel(this), 
            this.animatePointer = !0;
        }, CircularGauge.prototype.calculateSvgSize = function() {
            var containerWidth = this.element.offsetWidth, containerHeight = this.element.offsetHeight, width = stringToNumber$1(this.width, containerWidth) || containerWidth || 600, height = stringToNumber$1(this.height, containerHeight) || containerHeight || 450;
            this.availableSize = new Size$1(width, height);
        }, CircularGauge.prototype.calculateBounds = function() {
            var margin = this.margin, titleHeight = 0;
            this.title && (titleHeight = measureText$1(this.title, this.titleStyle).height + 5);
            var top = margin.top + titleHeight + this.border.width, left = margin.left + this.border.width, width = this.availableSize.width - left - margin.right - this.border.width, height = this.availableSize.height - top - this.border.width - margin.bottom, radius = Math.min(width, height) / 2, rect = new Rect$1(left + width / 2 - radius, top + height / 2 - radius, 2 * radius, 2 * radius), centerX = null !== this.centerX ? stringToNumber$1(this.centerX, this.availableSize.width) : rect.x + rect.width / 2, centerY = null !== this.centerY ? stringToNumber$1(this.centerY, this.availableSize.height) : rect.y + rect.height / 2;
            this.midPoint = new GaugeLocation(centerX, centerY), this.gaugeAxisLayoutPanel.measureAxis(rect);
        }, CircularGauge.prototype.renderElements = function(animate) {
            void 0 === animate && (animate = !0), this.renderBorder(), this.renderTitle(), this.gaugeAxisLayoutPanel.renderAxes(animate), 
            this.element.appendChild(this.svgObject), this.trigger("loaded", {
                gauge: this
            });
        }, CircularGauge.prototype.renderTitle = function() {
            if (this.title) {
                var size = measureText$1(this.title, this.titleStyle), element = textElement$1(new TextOption$1(this.element.id + "_CircularGaugeTitle", this.availableSize.width / 2, this.margin.top + size.height / 4 * 3, "middle", this.title), this.titleStyle, this.titleStyle.color, this.svgObject, "");
                element.setAttribute("aria-label", this.description || this.title), element.setAttribute("tabindex", this.tabIndex.toString());
            }
        }, CircularGauge.prototype.renderBorder = function() {
            var borderWidth = this.border.width;
            (borderWidth > 0 || null !== this.background && "transparent" !== this.background) && this.svgObject.appendChild(this.renderer.drawRectangle(new RectOption$1(this.element.id + "_CircularGaugeBorder", this.background, this.border, null, new Rect$1(borderWidth / 2, borderWidth / 2, this.availableSize.width - borderWidth, this.availableSize.height - borderWidth))));
        }, CircularGauge.prototype.setPointerValue = function(axisIndex, pointerIndex, value) {
            var _this = this, axis = this.axes[axisIndex], pointer = axis.pointers[pointerIndex], pointerRadius = pointer.currentRadius, enableAnimation = pointer.animation.enable;
            value = (value = value < axis.visibleRange.min ? axis.visibleRange.min : value) > axis.visibleRange.max ? axis.visibleRange.max : value, 
            pointer.pathElement.map(function(element) {
                "RangeBar" === pointer.type ? (setStyles(element, pointer.color, pointer.border), 
                enableAnimation ? _this.gaugeAxisLayoutPanel.pointerRenderer.performRangeBarAnimation(element, pointer.currentValue, value, axis, pointer, pointerRadius, pointerRadius - pointer.pointerWidth) : _this.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(axis, pointer, value)) : (element.id.indexOf("_Pointer_NeedleCap_") >= 0 ? setStyles(element, pointer.cap.color, pointer.cap.border) : element.id.indexOf("_Pointer_NeedleTail_") >= 0 ? setStyles(element, pointer.needleTail.color, pointer.needleTail.border) : element.id.indexOf("_Pointer_NeedleRect_") >= 0 ? setStyles(element, "transparent", {
                    color: "transparent",
                    width: 0
                }) : setStyles(element, pointer.color, pointer.border), enableAnimation ? _this.gaugeAxisLayoutPanel.pointerRenderer.performNeedleAnimation(element, pointer.currentValue, value, axis, pointer, pointerRadius, pointerRadius - pointer.pointerWidth) : _this.gaugeAxisLayoutPanel.pointerRenderer.setPointerValue(axis, pointer, value));
            }), pointer.currentValue = value, pointer.value = value;
        }, CircularGauge.prototype.setAnnotationValue = function(axisIndex, annotationIndex, content) {
            var isElementExist = null !== getElement$1(this.element.id + "_Annotations_" + axisIndex), element = getElement$1(this.element.id + "_Annotations_" + axisIndex) || createElement("div", {
                id: this.element.id + "_Annotations_" + axisIndex
            }), annotation = this.axes[axisIndex].annotations[annotationIndex];
            null !== content && (removeElement$2(this.element.id + "_Axis_" + axisIndex + "_Annotation_" + annotationIndex), 
            annotation.content = content, this.annotationsModule.createTemplate(element, annotationIndex, axisIndex), 
            isElementExist || getElement$1(this.element.id + "_Secondary_Element").appendChild(element));
        }, CircularGauge.prototype.setRangeValue = function(axisIndex, rangeIndex, start, end) {
            var startWidth, element = getElement$1(this.element.id + "_Axis_" + axisIndex + "_Range_" + rangeIndex), axis = this.axes[axisIndex], range = axis.ranges[rangeIndex], axisRange = axis.visibleRange, isClockWise = "ClockWise" === axis.direction, startValue = Math.min(Math.max(start, axisRange.min), end), endValue = Math.min(Math.max(start, end), axisRange.max), startAngle = getAngleFromValue(startValue, axisRange.max, axisRange.min, axis.startAngle, axis.endAngle, isClockWise), endAngle = getAngleFromValue(endValue, axisRange.max, axisRange.min, axis.startAngle, axis.endAngle, isClockWise);
            startWidth = range.startWidth.length > 0 ? toPixel(range.startWidth, range.currentRadius) : range.startWidth;
            var endWidth;
            endWidth = range.endWidth.length > 0 ? toPixel(range.endWidth, range.currentRadius) : range.endWidth, 
            endAngle = isClockWise ? endAngle : [ startAngle, startAngle = endAngle ][0], endWidth = isClockWise ? endWidth : [ startWidth, startWidth = endWidth ][0], 
            element.setAttribute("d", getPathArc(this.midPoint, Math.round(startAngle), Math.round(endAngle), range.currentRadius, startWidth, endWidth)), 
            setStyles(element, range.color ? range.color : range.rangeColor, {
                color: range.color ? range.color : range.rangeColor,
                width: 0
            });
        }, CircularGauge.prototype.destroy = function() {
            this.unWireEvents(), this.removeSvg(), _super.prototype.destroy.call(this);
        }, CircularGauge.prototype.requiredModules = function() {
            var modules = [], annotationEnable = !1;
            return this.axes.map(function(axis) {
                axis.annotations.map(function(annotation) {
                    annotationEnable = annotationEnable || null !== annotation.content;
                });
            }), annotationEnable && modules.push({
                member: "Annotations",
                args: [ this, Annotations ]
            }), this.tooltip.enable && modules.push({
                member: "Tooltip",
                args: [ this, GaugeTooltip ]
            }), modules;
        }, CircularGauge.prototype.getPersistData = function() {
            return this.addOnPersist([]);
        }, CircularGauge.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var renderer = !1, refreshBounds = !1, refreshWithoutAnimation = !1, _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "height":
                  case "width":
                  case "centerX":
                  case "centerY":
                  case "margin":
                    this.createSvg(), refreshBounds = !0;
                    break;

                  case "title":
                    refreshBounds = "" === newProp.title || "" === oldProp.title, renderer = !("" === newProp.title || "" === oldProp.title);
                    break;

                  case "titleStyle":
                    newProp.titleStyle && newProp.titleStyle.size ? refreshBounds = !0 : renderer = !0;
                    break;

                  case "border":
                  case "background":
                    renderer = !0;
                    break;

                  case "axes":
                    refreshWithoutAnimation = !0;
                }
            }
            !refreshBounds && renderer && (this.removeSvg(), this.renderElements()), refreshBounds && (this.removeSvg(), 
            this.calculateBounds(), this.renderElements()), !refreshWithoutAnimation || renderer || refreshBounds || (this.removeSvg(), 
            this.calculateBounds(), this.renderElements(!1));
        }, CircularGauge.prototype.getModuleName = function() {
            return "circulargauge";
        }, __decorate$46([ Property(null) ], CircularGauge.prototype, "width", void 0), 
        __decorate$46([ Property(null) ], CircularGauge.prototype, "height", void 0), __decorate$46([ Complex({
            color: "transparent",
            width: 0
        }, Border$1) ], CircularGauge.prototype, "border", void 0), __decorate$46([ Property("transparent") ], CircularGauge.prototype, "background", void 0), 
        __decorate$46([ Property("") ], CircularGauge.prototype, "title", void 0), __decorate$46([ Complex({
            size: "15px",
            color: null
        }, Font$1) ], CircularGauge.prototype, "titleStyle", void 0), __decorate$46([ Complex({}, Margin$1) ], CircularGauge.prototype, "margin", void 0), 
        __decorate$46([ Collection([ {} ], Axis$1) ], CircularGauge.prototype, "axes", void 0), 
        __decorate$46([ Complex({}, TooltipSettings$1) ], CircularGauge.prototype, "tooltip", void 0), 
        __decorate$46([ Property(!1) ], CircularGauge.prototype, "enablePointerDrag", void 0), 
        __decorate$46([ Property(null) ], CircularGauge.prototype, "centerX", void 0), __decorate$46([ Property(null) ], CircularGauge.prototype, "centerY", void 0), 
        __decorate$46([ Property("Material") ], CircularGauge.prototype, "theme", void 0), 
        __decorate$46([ Property(!1) ], CircularGauge.prototype, "useGroupingSeparator", void 0), 
        __decorate$46([ Property(null) ], CircularGauge.prototype, "description", void 0), 
        __decorate$46([ Property(1) ], CircularGauge.prototype, "tabIndex", void 0), __decorate$46([ Event() ], CircularGauge.prototype, "loaded", void 0), 
        __decorate$46([ Event() ], CircularGauge.prototype, "load", void 0), __decorate$46([ Event() ], CircularGauge.prototype, "animationComplete", void 0), 
        __decorate$46([ Event() ], CircularGauge.prototype, "axisLabelRender", void 0), 
        __decorate$46([ Event() ], CircularGauge.prototype, "annotationRender", void 0), 
        __decorate$46([ Event() ], CircularGauge.prototype, "tooltipRender", void 0), __decorate$46([ Event() ], CircularGauge.prototype, "dragStart", void 0), 
        __decorate$46([ Event() ], CircularGauge.prototype, "dragMove", void 0), __decorate$46([ Event() ], CircularGauge.prototype, "dragEnd", void 0), 
        __decorate$46([ Event() ], CircularGauge.prototype, "gaugeMouseMove", void 0), __decorate$46([ Event() ], CircularGauge.prototype, "gaugeMouseLeave", void 0), 
        __decorate$46([ Event() ], CircularGauge.prototype, "gaugeMouseDown", void 0), __decorate$46([ Event() ], CircularGauge.prototype, "gaugeMouseUp", void 0), 
        __decorate$46([ Event() ], CircularGauge.prototype, "resized", void 0), CircularGauge = __decorate$46([ NotifyPropertyChanges ], CircularGauge);
    }(Component), actionBegin = "actionBegin", actionComplete = "actionComplete", dataBound = "dataBound", columnDragStart = "columnDragStart", columnDrag = "columnDrag", columnDrop = "columnDrop", rowDragStart = "rowDragStart", rowDrag = "rowDrag", rowDrop = "rowDrop", initialLoad = "initial-load", initialEnd = "initial-end", dataReady = "data-ready", contentReady = "content-ready", uiUpdate = "ui-update", onEmpty = "on-empty", inBoundModelChanged = "inbound-model-changed", modelChanged = "model-changed", colGroupRefresh = "colgroup-refresh", headerRefreshed = "header-refreshed", reorderComplete = "reorder-complete", rowDragAndDropComplete = "rowdraganddrop-complete", keyPressed = "key-pressed", click = "click", destroy$1 = "destroy", columnVisibilityChanged = "column-visible-changed", columnWidthChanged = "column-width-changed", columnPositionChanged = "column-position-changed", rowsAdded = "rows-added", rowsRemoved = "rows-removed", columnDragStop = "column-drag-stop", headerDrop = "header-drop", dataSourceModified = "datasource-modified", refreshVirtualBlock = "refresh-virtual-block", updateData = "update-data", preventBatch = "prevent-batch", dialogDestroy = "dialog-destroy", addDeleteAction = "add-delete-Action", freezeRender = "freezerender";
    !function(CellType) {
        CellType[CellType.Data = 0] = "Data", CellType[CellType.Header = 1] = "Header", 
        CellType[CellType.Summary = 2] = "Summary", CellType[CellType.GroupSummary = 3] = "GroupSummary", 
        CellType[CellType.CaptionSummary = 4] = "CaptionSummary", CellType[CellType.Filter = 5] = "Filter", 
        CellType[CellType.Indent = 6] = "Indent", CellType[CellType.GroupCaption = 7] = "GroupCaption", 
        CellType[CellType.GroupCaptionEmpty = 8] = "GroupCaptionEmpty", CellType[CellType.Expand = 9] = "Expand", 
        CellType[CellType.HeaderIndent = 10] = "HeaderIndent", CellType[CellType.StackedHeader = 11] = "StackedHeader", 
        CellType[CellType.DetailHeader = 12] = "DetailHeader", CellType[CellType.DetailExpand = 13] = "DetailExpand", 
        CellType[CellType.CommandColumn = 14] = "CommandColumn";
    }(CellType || (CellType = {}));
    var RenderType;
    !function(RenderType) {
        RenderType[RenderType.Header = 0] = "Header", RenderType[RenderType.Content = 1] = "Content", 
        RenderType[RenderType.Summary = 2] = "Summary";
    }(RenderType || (RenderType = {}));
    var ToolbarItem;
    !function(ToolbarItem) {
        ToolbarItem[ToolbarItem.Add = 0] = "Add", ToolbarItem[ToolbarItem.Edit = 1] = "Edit", 
        ToolbarItem[ToolbarItem.Update = 2] = "Update", ToolbarItem[ToolbarItem.Delete = 3] = "Delete", 
        ToolbarItem[ToolbarItem.Cancel = 4] = "Cancel", ToolbarItem[ToolbarItem.Print = 5] = "Print", 
        ToolbarItem[ToolbarItem.Search = 6] = "Search", ToolbarItem[ToolbarItem.ColumnChooser = 7] = "ColumnChooser", 
        ToolbarItem[ToolbarItem.PdfExport = 8] = "PdfExport", ToolbarItem[ToolbarItem.ExcelExport = 9] = "ExcelExport", 
        ToolbarItem[ToolbarItem.CsvExport = 10] = "CsvExport", ToolbarItem[ToolbarItem.WordExport = 11] = "WordExport";
    }(ToolbarItem || (ToolbarItem = {}));
    var CheckBoxFilter = function() {
        function CheckBoxFilter(parent, filterSettings, serviceLocator) {
            this.existingPredicate = {}, this.filterState = !0, this.values = {}, this.cBoxTrue = createCheckBox(!1, {
                checked: !0,
                label: " "
            }), this.cBoxFalse = createCheckBox(!1, {
                checked: !1,
                label: " "
            }), this.parent = parent, this.id = this.parent.element.id, this.serviceLocator = serviceLocator, 
            this.filterSettings = filterSettings, this.valueFormatter = new ValueFormatter(this.parent.locale), 
            this.cBoxTrue.insertBefore(createElement("input", {
                className: "e-chk-hidden",
                attrs: {
                    type: "checkbox"
                }
            }), this.cBoxTrue.firstChild), this.cBoxFalse.insertBefore(createElement("input", {
                className: "e-chk-hidden",
                attrs: {
                    type: "checkbox"
                }
            }), this.cBoxFalse.firstChild), this.cBoxFalse.querySelector(".e-frame").classList.add("e-uncheck"), 
            this.parent.enableRtl && addClass([ this.cBoxTrue, this.cBoxFalse ], [ "e-rtl" ]);
        }
        return CheckBoxFilter.prototype.destroy = function() {
            this.closeDialog();
        }, CheckBoxFilter.prototype.wireEvents = function() {
            EventHandler.add(this.dlg, "click", this.clickHandler, this), EventHandler.add(this.dlg.querySelector(".e-searchinput"), "keyup", this.searchBoxKeyUp, this);
        }, CheckBoxFilter.prototype.unWireEvents = function() {
            EventHandler.remove(this.dlg, "click", this.clickHandler);
            var elem = this.dlg.querySelector(".e-searchinput");
            elem && EventHandler.remove(elem, "keyup", this.searchBoxKeyUp);
        }, CheckBoxFilter.prototype.searchBoxClick = function(e) {
            e.target.classList.contains("e-searchclear") && (this.sInput.value = "", this.refreshCheckboxes(), 
            this.updateSearchIcon(), this.sInput.focus());
        }, CheckBoxFilter.prototype.searchBoxKeyUp = function(e) {
            this.refreshCheckboxes(), this.updateSearchIcon();
        }, CheckBoxFilter.prototype.updateSearchIcon = function() {
            this.sInput.value.length ? classList(this.sIcon, [ "e-chkcancel-icon" ], [ "e-search-icon" ]) : classList(this.sIcon, [ "e-search-icon" ], [ "e-chkcancel-icon" ]);
        }, CheckBoxFilter.prototype.getLocalizedLabel = function(key) {
            return this.localeObj.getConstant(key);
        }, CheckBoxFilter.prototype.updateDataSource = function() {
            var dataSource = this.options.dataSource;
            if (!(dataSource instanceof DataManager)) for (var i = 0; i < dataSource.length; i++) if ("object" != typeof dataSource) {
                var obj = {};
                obj[this.options.field] = dataSource[i], dataSource[i] = obj;
            }
        }, CheckBoxFilter.prototype.updateModel = function(options) {
            this.options = options, this.existingPredicate = options.actualPredicate || {}, 
            this.options.dataSource = options.dataSource, this.updateDataSource(), this.options.type = options.type || "string", 
            this.options.format = options.format || "", this.options.filteredColumns = options.filteredColumns || this.parent.filterSettings.columns, 
            this.options.sortedColumns = options.sortedColumns || this.parent.sortSettings.columns, 
            this.options.query = options.query || new Query(), this.options.allowCaseSensitive = options.allowCaseSensitive || !1, 
            this.values = {}, this.localeObj = options.localeObj, this.isFiltered = options.filteredColumns.length;
        }, CheckBoxFilter.prototype.getAndSetChkElem = function(options) {
            return this.dlg = createElement("div", {
                id: this.id + this.options.type + "_excelDlg",
                className: "e-checkboxfilter e-filter-popup"
            }), this.sBox = createElement("div", {
                className: "e-searchcontainer"
            }), options.hideSearchbox || (this.sInput = createElement("input", {
                id: this.id + "_SearchBox",
                className: "e-searchinput"
            }), this.sIcon = createElement("span", {
                className: "e-searchclear e-search-icon e-icons e-input-group-icon",
                attrs: {
                    type: "text",
                    placeholder: this.getLocalizedLabel("Search")
                }
            }), this.searchBox = createElement("span", {
                className: "e-searchbox e-fields"
            }), this.searchBox.appendChild(this.sInput), this.sBox.appendChild(this.searchBox), 
            Input.createInput({
                element: this.sInput,
                floatLabelType: "Never",
                properties: {
                    placeholder: this.getLocalizedLabel("Search")
                }
            }), this.searchBox.querySelector(".e-input-group").appendChild(this.sIcon)), this.spinner = createElement("div", {
                className: "e-spinner"
            }), this.cBox = createElement("div", {
                id: this.id + this.options.type + "_CheckBoxList",
                className: "e-checkboxlist e-fields"
            }), this.spinner.appendChild(this.cBox), this.sBox.appendChild(this.spinner), this.sBox;
        }, CheckBoxFilter.prototype.showDialog = function(options) {
            var args = {
                requestType: "filterbeforeopen",
                filterModel: this,
                columnName: this.options.field,
                columnType: this.options.type,
                cancel: !1
            };
            this.parent.trigger(actionBegin, args), args.cancel || (this.dialogObj = new Dialog({
                visible: !1,
                content: this.sBox,
                close: this.closeDialog.bind(this),
                width: !isNullOrUndefined(parentsUntil(options.target, "e-bigger")) || this.parent.element.classList.contains("e-device") ? 260 : 255,
                target: this.parent.element,
                animationSettings: {
                    effect: "None"
                },
                buttons: [ {
                    click: this.btnClick.bind(this),
                    buttonModel: {
                        content: this.getLocalizedLabel(this.isExcel ? "OK" : "Filter"),
                        cssClass: "e-primary",
                        isPrimary: !0
                    }
                }, {
                    click: this.btnClick.bind(this),
                    buttonModel: {
                        cssClass: "e-flat",
                        content: this.getLocalizedLabel(this.isExcel ? "Cancel" : "Clear")
                    }
                } ],
                created: this.dialogCreated.bind(this),
                open: this.dialogOpen.bind(this)
            }), this.dialogObj.appendTo(this.dlg), this.dialogObj.element.style.maxHeight = "800px", 
            this.dialogObj.show(), this.wireEvents(), createSpinner({
                target: this.spinner
            }), showSpinner(this.spinner), this.getAllData());
        }, CheckBoxFilter.prototype.dialogCreated = function(e) {
            Browser.isDevice ? this.dialogObj.position = {
                X: "center",
                Y: "center"
            } : getFilterMenuPostion(this.options.target, this.dialogObj, this.parent), this.parent.notify("filterDialogCreated", e);
        }, CheckBoxFilter.prototype.openDialog = function(options) {
            this.updateModel(options), this.getAndSetChkElem(options), this.showDialog(options);
        }, CheckBoxFilter.prototype.closeDialog = function() {
            this.dialogObj && !this.dialogObj.isDestroyed && (this.parent.notify("filter-menu-close", {
                field: this.options.field
            }), this.dialogObj.destroy(), this.unWireEvents(), remove(this.dlg), this.dlg = null);
        }, CheckBoxFilter.prototype.clearFilter = function() {
            this.options.handler({
                action: "clear-filter",
                field: this.options.field
            });
        }, CheckBoxFilter.prototype.btnClick = function(e) {
            if (this.filterState) {
                if ("input" === e.target.tagName.toLowerCase()) {
                    var args = {
                        action: "filtering",
                        filterCollection: {
                            field: this.options.field,
                            operator: "date" === this.options.column.type || "datetime" === this.options.column.type ? "equal" : "contains",
                            value: e.target.value,
                            matchCase: !1,
                            type: this.options.column.type
                        },
                        field: this.options.field
                    };
                    e.target.value ? this.options.handler(args) : this.closeDialog();
                } else {
                    var text = e.target.firstChild.textContent.toLowerCase();
                    this.getLocalizedLabel(this.isExcel ? "OK" : "Filter").toLowerCase() === text ? this.fltrBtnHandler() : this.getLocalizedLabel("Clear").toLowerCase() === text && this.clearFilter();
                }
                this.closeDialog();
            } else "input" !== e.target.tagName.toLowerCase() && (this.clearFilter(), this.closeDialog());
        }, CheckBoxFilter.prototype.fltrBtnHandler = function() {
            var checked = [].slice.call(this.cBox.querySelectorAll(".e-check:not(.e-selectall)")), optr = "equal", caseSen = "string" !== this.options.type || this.options.allowCaseSensitive, defaults = {
                field: this.options.field,
                predicate: "or",
                operator: optr,
                matchCase: caseSen,
                ignoreAccent: this.parent.filterSettings.ignoreAccent
            }, isNotEqual = this.itemsCnt !== checked.length && this.itemsCnt - checked.length < checked.length;
            isNotEqual && (optr = "notequal", checked = [].slice.call(this.cBox.querySelectorAll(".e-uncheck:not(.e-selectall)")), 
            defaults.predicate = "and", defaults.operator = "notequal");
            var value, fObj, coll = [], searchInput = this.searchBox.querySelector(".e-searchinput");
            if (checked.length !== this.itemsCnt || searchInput.value && "" !== searchInput.value) {
                for (var i = 0; i < checked.length; i++) fObj = extend({}, {
                    value: value = this.values[parentsUntil(checked[i], "e-ftrchk").getAttribute("uid")]
                }, defaults), value && !value.toString().length && (fObj.operator = isNotEqual ? "notequal" : "equal"), 
                coll.push(fObj);
                this.initiateFilter(coll);
            } else this.clearFilter();
        }, CheckBoxFilter.prototype.initiateFilter = function(fColl) {
            var predicate, firstVal = fColl[0];
            if (!isNullOrUndefined(firstVal)) {
                predicate = firstVal.ejpredicate ? firstVal.ejpredicate : new Predicate(firstVal.field, firstVal.operator, firstVal.value, !firstVal.matchCase, firstVal.ignoreAccent);
                for (var j = 1; j < fColl.length; j++) predicate = void 0 !== fColl[j].ejpredicate ? predicate[fColl[j].predicate](fColl[j].ejpredicate) : predicate[fColl[j].predicate](fColl[j].field, fColl[j].operator, fColl[j].value, !fColl[j].matchCase, fColl[j].ignoreAccent);
                var args = {
                    action: "filtering",
                    filterCollection: fColl,
                    field: this.options.field,
                    ejpredicate: Predicate.or(predicate)
                };
                this.options.handler(args);
            }
        }, CheckBoxFilter.prototype.refreshCheckboxes = function() {
            var val = this.sInput.value, query = this.options.query.clone(), parsed = "string" !== this.options.type && parseFloat(val) ? parseFloat(val) : val, operator = "contains", ignoreAccent = this.parent.filterSettings.ignoreAccent;
            parsed = "" === parsed || void 0 === parsed ? void 0 : parsed;
            var predicte;
            if ("boolean" === this.options.type && (void 0 !== parsed && -1 !== this.getLocalizedLabel("FilterTrue").toLowerCase().indexOf(parsed.toLowerCase()) ? parsed = "true" : void 0 !== parsed && -1 !== this.getLocalizedLabel("FilterFalse").toLowerCase().indexOf(parsed.toLowerCase()) && (parsed = "false")), 
            predicte = new Predicate(this.options.field, operator, parsed, !0, ignoreAccent), 
            "date" === this.options.type || "datetime" === this.options.type) {
                if (parsed = this.valueFormatter.fromView(val, this.options.parserFn, this.options.type), 
                operator = "equal", isNullOrUndefined(parsed) && val.length) return;
                predicte = getDatePredicate({
                    field: this.options.field,
                    operator: operator,
                    value: parsed,
                    matchCase: !0,
                    ignoreAccent: ignoreAccent
                });
            }
            val.length && query.where(predicte), this.processDataSource(query);
        }, CheckBoxFilter.prototype.getPredicateFromCols = function(columns) {
            for (var predicates = CheckBoxFilter.getPredicate(columns), predicateList = [], fPredicate = {}, foreignColumn = this.parent.getForeignKeyColumns(), _i = 0, _a = Object.keys(predicates); _i < _a.length; _i++) {
                var prop = _a[_i], col = getColumnByForeignKeyValue(prop, foreignColumn);
                col ? (this.parent.notify("generateQuery", {
                    predicate: fPredicate,
                    column: col
                }), fPredicate.predicate.predicates.length && predicateList.push(Predicate.or(fPredicate.predicate.predicates))) : predicateList.push(predicates[prop]);
            }
            return predicateList.length && Predicate.and(predicateList);
        }, CheckBoxFilter.prototype.getAllData = function() {
            var _this = this, query = new Query();
            query.requiresCount(), this.options.dataSource = this.options.dataSource instanceof DataManager ? this.options.dataSource : new DataManager(this.options.dataSource);
            var allPromise = [], runArray = [];
            this.options.column.isForeignColumn() && (allPromise.push(this.options.column.dataSource.executeQuery(new Query())), 
            runArray.push(function(data) {
                return _this.foreignKeyData = data;
            })), allPromise.push(this.options.dataSource.executeQuery(query)), runArray.push(this.dataSuccess.bind(this));
            var i = 0;
            Promise.all(allPromise).then(function(e) {
                e.forEach(function(data) {
                    runArray[i++](data.result);
                });
            });
        }, CheckBoxFilter.prototype.dataSuccess = function(e) {
            this.fullData = e;
            var query = new Query();
            if (this.options.filteredColumns.length) {
                for (var cols = [], i = 0; i < this.options.filteredColumns.length; i++) this.options.filteredColumns[i].field !== this.options.field && this.options.filteredColumns[i].field !== this.options.foreignKeyValue && cols.push(this.options.filteredColumns[i]);
                var predicate = this.getPredicateFromCols(cols);
                predicate && query.where(predicate);
            }
            var result = new DataManager(this.fullData).executeLocal(query), col = this.options.column, res = CheckBoxFilter.getDistinct(result, this.options.field, col, this.foreignKeyData);
            this.filteredData = res.records, this.processDataSource(null, !0), this.dialogObj.element.querySelector(".e-searchinput").focus();
            var args = {
                requestType: "filterafteropen",
                filterModel: this,
                columnName: this.options.field,
                columnType: this.options.type
            };
            this.parent.trigger(actionComplete, args);
        }, CheckBoxFilter.prototype.processDataSource = function(query, isInitial) {
            showSpinner(this.spinner), (query = query || this.options.query.clone()).requiresCount();
            var args = {
                requestType: "filterchoicerequest",
                filterModel: this,
                query: query,
                dataSource: this.filteredData
            };
            this.parent.trigger(actionBegin, args);
            var res = new DataManager(args.dataSource).executeLocal(args.query);
            this.updateResult(), this.createFilterItems(res.result, isInitial);
        }, CheckBoxFilter.prototype.updateResult = function() {
            this.result = {};
            var predicate = this.getPredicateFromCols(this.options.filteredColumns), query = new Query();
            predicate && query.where(predicate);
            for (var _i = 0, result_1 = new DataManager(this.fullData).executeLocal(query); _i < result_1.length; _i++) {
                var res = result_1[_i];
                this.result[getValue(this.options.field, res)] = !0;
            }
        }, CheckBoxFilter.prototype.clickHandler = function(e) {
            var target = e.target, elem = parentsUntil(target, "e-checkbox-wrapper");
            if (parentsUntil(target, "e-searchbox") && this.searchBoxClick(e), elem) {
                var selectAll$$1 = elem.querySelector(".e-selectall");
                selectAll$$1 ? this.updateAllCBoxes(!selectAll$$1.classList.contains("e-check")) : toogleCheckbox(elem.parentElement), 
                this.updateIndeterminatenBtn(), elem.querySelector(".e-chk-hidden").focus();
            }
        }, CheckBoxFilter.prototype.updateAllCBoxes = function(checked) {
            for (var _i = 0, cBoxes_1 = [].slice.call(this.cBox.querySelectorAll(".e-frame")); _i < cBoxes_1.length; _i++) {
                removeAddCboxClasses(cBoxes_1[_i], checked);
            }
        }, CheckBoxFilter.prototype.dialogOpen = function() {
            this.parent.element.classList.contains("e-device") && (this.dialogObj.element.querySelector(".e-input-group").classList.remove("e-input-focus"), 
            this.dialogObj.element.querySelector(".e-btn").focus());
        }, CheckBoxFilter.prototype.createCheckbox = function(value, checked) {
            var elem = checked ? this.cBoxTrue.cloneNode(!0) : this.cBoxFalse.cloneNode(!0), label = elem.querySelector(".e-label");
            if (label.innerHTML = !isNullOrUndefined(value) && value.toString().length ? value : this.getLocalizedLabel("Blanks"), 
            this.options.template) {
                label.innerHTML = "";
                var args = {};
                args[this.options.field] = value, appendChildren(label, this.options.template(args));
            }
            return elem;
        }, CheckBoxFilter.prototype.updateIndeterminatenBtn = function() {
            var cnt = this.cBox.children.length - 1, className = [], elem = this.cBox.querySelector(".e-selectall"), selected = this.cBox.querySelectorAll(".e-check:not(.e-selectall)").length, btn = this.dlg.querySelector(".e-footer-content").querySelector(".e-btn").ej2_instances[0];
            btn.disabled = !1, cnt === selected ? className = [ "e-check" ] : selected ? className = [ "e-stop" ] : (className = [ "e-uncheck" ], 
            btn.disabled = !0), this.filterState = !btn.disabled, btn.dataBind(), removeClass([ elem ], [ "e-check", "e-stop", "e-uncheck" ]), 
            addClass([ elem ], className);
        }, CheckBoxFilter.prototype.createFilterItems = function(data, isInitial) {
            var cBoxes = createElement("div"), btn = this.dlg.querySelector(".e-footer-content").querySelector(".e-btn").ej2_instances[0];
            if (this.itemsCnt = data.length, data.length) {
                var selectAll$$1 = createCboxWithWrap(getUid("cbox"), this.createCheckbox(this.getLocalizedLabel("SelectAll"), !1), "e-ftrchk");
                selectAll$$1.querySelector(".e-frame").classList.add("e-selectall"), cBoxes.appendChild(selectAll$$1);
                var predicate = new Predicate("field", "equal", this.options.field);
                this.options.foreignKeyValue && (predicate = predicate.or("field", "equal", this.options.foreignKeyValue));
                for (var isColFiltered = new DataManager(this.options.filteredColumns).executeLocal(new Query().where(predicate)).length, i = 0; i < data.length; i++) {
                    var uid = getUid("cbox");
                    this.values[uid] = getValue("ejValue", data[i]);
                    var value = this.valueFormatter.toView(getValue(this.options.field, data[i]), this.options.formatFn);
                    cBoxes.appendChild(createCboxWithWrap(uid, this.createCheckbox(value, this.getCheckedState(isColFiltered, this.values[uid])), "e-ftrchk"));
                }
                this.cBox.innerHTML = cBoxes.innerHTML, this.updateIndeterminatenBtn(), btn.disabled = !1;
            } else cBoxes.appendChild(createElement("span", {
                innerHTML: this.getLocalizedLabel("NoResult")
            })), this.cBox.innerHTML = cBoxes.innerHTML, btn.disabled = !0;
            this.filterState = !btn.disabled, btn.dataBind();
            var args = {
                requestType: "filterchoicerequest",
                filterModel: this,
                dataSource: data
            };
            this.parent.trigger(actionComplete, args), hideSpinner(this.spinner);
        }, CheckBoxFilter.prototype.getCheckedState = function(isColFiltered, value) {
            return !this.isFiltered || !isColFiltered || this.result[value];
        }, CheckBoxFilter.getDistinct = function(json, field, column, foreignKeyData$$1) {
            for (var value, len = json.length, result = [], lookup = {}, isForeignKey = column && column.isForeignColumn(); len--; ) if (value = json[len], 
            value = getValue(field, value), !(isNullOrUndefined(value) || value in lookup)) {
                var obj = {};
                obj.ejValue = value, lookup[value] = !0, setValue(field, isNullOrUndefined(value = isForeignKey ? getValue(column.foreignKeyValue, getForeignData(column, {}, value, foreignKeyData$$1)[0]) : value) ? null : value, obj), 
                result.push(obj);
            }
            return DataUtil.group(DataUtil.sort(result, field, DataUtil.fnAscending), "ejValue");
        }, CheckBoxFilter.getPredicate = function(columns) {
            for (var cols = CheckBoxFilter.getDistinct(columns, "field").records, collection = [], pred = {}, i = 0; i < cols.length; i++) 0 !== (collection = new DataManager(columns).executeLocal(new Query().where("field", "equal", cols[i].field))).length && (pred[cols[i].field] = CheckBoxFilter.generatePredicate(collection));
            return pred;
        }, CheckBoxFilter.generatePredicate = function(cols) {
            var predicate, first, len = cols ? cols.length : 0;
            (first = CheckBoxFilter.updateDateFilter(cols[0])).ignoreAccent = !isNullOrUndefined(first.ignoreAccent) && first.ignoreAccent, 
            predicate = "date" === first.type || "datetime" === first.type ? getDatePredicate(first) : first.ejpredicate ? first.ejpredicate : new Predicate(first.field, first.operator, first.value, !CheckBoxFilter.getCaseValue(first), first.ignoreAccent);
            for (var p = 1; p < len; p++) cols[p] = CheckBoxFilter.updateDateFilter(cols[p]), 
            len > 2 && p > 1 && "or" === cols[p].predicate ? "date" === cols[p].type || "datetime" === cols[p].type ? predicate.predicates.push(getDatePredicate(cols[p])) : predicate.predicates.push(new Predicate(cols[p].field, cols[p].operator, cols[p].value, !CheckBoxFilter.getCaseValue(cols[p]), cols[p].ignoreAccent)) : predicate = "date" === cols[p].type || "datetime" === cols[p].type ? predicate[cols[p].predicate](getDatePredicate(cols[p]), cols[p].ignoreAccent) : cols[p].ejpredicate ? predicate[cols[p].predicate](cols[p].ejpredicate) : predicate[cols[p].predicate](cols[p].field, cols[p].operator, cols[p].value, CheckBoxFilter.getCaseValue(cols[p]), cols[p].ignoreAccent);
            return predicate || null;
        }, CheckBoxFilter.getCaseValue = function(filter) {
            return !!isNullOrUndefined(filter.matchCase) || filter.matchCase;
        }, CheckBoxFilter.updateDateFilter = function(filter) {
            return ("date" === filter.type || "datetime" === filter.type || filter.value instanceof Date) && (filter.type = filter.type || "date"), 
            filter;
        }, CheckBoxFilter.prototype.getModuleName = function() {
            return "checkboxFilter";
        }, CheckBoxFilter;
    }(), Data$1 = function() {
        function Data(parent, serviceLocator) {
            this.dataState = {
                isPending: !1,
                resolver: null,
                group: []
            }, this.parent = parent, this.serviceLocator = serviceLocator, this.initDataManager(), 
            this.parent.isDestroyed || (this.parent.on(rowsAdded, this.addRows, this), this.parent.on(rowsRemoved, this.removeRows, this), 
            this.parent.on(dataSourceModified, this.initDataManager, this), this.parent.on(destroy$1, this.destroy, this), 
            this.parent.on(updateData, this.crudActions, this), this.parent.on(addDeleteAction, this.getData, this));
        }
        return Data.prototype.initDataManager = function() {
            var gObj = this.parent;
            this.dataManager = gObj.dataSource instanceof DataManager ? gObj.dataSource : isNullOrUndefined(gObj.dataSource) ? new DataManager() : new DataManager(gObj.dataSource), 
            gObj.query = gObj.query instanceof Query ? gObj.query : new Query();
        }, Data.prototype.generateQuery = function(skipPage) {
            var query = this.parent.query.clone();
            return this.filterQuery(query), this.searchQuery(query), this.aggregateQuery(query), 
            this.sortQuery(query), this.pageQuery(query, skipPage), this.groupQuery(query), 
            query;
        }, Data.prototype.aggregateQuery = function(query, isForeign) {
            return this.parent.aggregates.forEach(function(row) {
                row.columns.forEach(function(column) {
                    (column.type instanceof Array ? column.type : [ column.type ]).forEach(function(type) {
                        return query.aggregate(type.toLowerCase(), column.field);
                    });
                });
            }), query;
        }, Data.prototype.pageQuery = function(query, skipPage) {
            var gObj = this.parent;
            return (gObj.allowPaging || gObj.enableVirtualization) && !0 !== skipPage && (gObj.pageSettings.currentPage = Math.max(1, gObj.pageSettings.currentPage), 
            gObj.pageSettings.pageCount <= 0 && (gObj.pageSettings.pageCount = 8), gObj.pageSettings.pageSize <= 0 && (gObj.pageSettings.pageSize = 12), 
            query.page(gObj.pageSettings.currentPage, gObj.pageSettings.pageSize)), query;
        }, Data.prototype.groupQuery = function(query) {
            var gObj = this.parent;
            if (gObj.allowGrouping && gObj.groupSettings.columns.length) for (var columns = gObj.groupSettings.columns, i = 0, len = columns.length; i < len; i++) {
                var column = this.getColumnByField(columns[i]), isGrpFmt = column.enableGroupByFormat, format = column.format;
                isGrpFmt ? query.group(columns[i], this.formatGroupColumn.bind(this), format) : query.group(columns[i], null);
            }
            return query;
        }, Data.prototype.sortQuery = function(query) {
            var gObj = this.parent;
            if ((gObj.allowSorting || gObj.allowGrouping) && gObj.sortSettings.columns.length) {
                for (var columns = gObj.sortSettings.columns, sortGrp = [], i = columns.length - 1; i > -1; i--) {
                    var col = this.getColumnByField(columns[i].field);
                    col && col.setSortDirection(columns[i].direction);
                    var fn = col.sortComparer && !this.isRemote() ? col.sortComparer.bind(col) : columns[i].direction;
                    -1 === gObj.groupSettings.columns.indexOf(columns[i].field) ? query.sortBy(col.field, fn) : sortGrp.push({
                        direction: fn,
                        field: col.field
                    });
                }
                i = 0;
                for (var len = sortGrp.length; i < len; i++) query.sortBy(sortGrp[i].field, sortGrp[i].direction);
            }
            return query;
        }, Data.prototype.searchQuery = function(query) {
            var _this = this, sSettings = this.parent.searchSettings, fields = sSettings.fields.length ? sSettings.fields : this.parent.getColumns().map(function(f) {
                return f.field;
            }), predicateList = [];
            return this.parent.searchSettings.key.length && (this.parent.getForeignKeyColumns().length ? (fields.forEach(function(columnName) {
                var column = _this.getColumnByField(columnName);
                column.isForeignColumn() ? predicateList = _this.fGeneratePredicate(column, predicateList) : predicateList.push(new Predicate(column.field, sSettings.operator, sSettings.key, sSettings.ignoreCase, _this.parent.filterSettings.ignoreAccent));
            }), query.where(Predicate.or(predicateList))) : query.search(sSettings.key, fields, sSettings.operator, sSettings.ignoreCase, this.parent.filterSettings.ignoreAccent)), 
            query;
        }, Data.prototype.filterQuery = function(query, column, skipFoerign) {
            var gObj = this.parent, predicateList = [], actualFilter = [], foreignColumn = this.parent.getForeignKeyColumns();
            if (gObj.allowFiltering && gObj.filterSettings.columns.length) {
                for (var columns = column || gObj.filterSettings.columns, colType = {}, _i = 0, _a = gObj.columns; _i < _a.length; _i++) {
                    colType[(col = _a[_i]).field] = col.filter.type ? col.filter.type : gObj.filterSettings.type;
                }
                for (var checkBoxCols = [], defaultFltrCols = [], _b = 0, columns_1 = columns; _b < columns_1.length; _b++) {
                    "CheckBox" === colType[(col = columns_1[_b]).field] || "Excel" === colType[col.field] ? checkBoxCols.push(col) : defaultFltrCols.push(col);
                }
                if (checkBoxCols.length) for (var excelPredicate = CheckBoxFilter.getPredicate(checkBoxCols), _c = 0, _d = Object.keys(excelPredicate); _c < _d.length; _c++) {
                    var prop = _d[_c];
                    (col = getColumnByForeignKeyValue(prop, foreignColumn)) && !skipFoerign ? (predicateList = this.fGeneratePredicate(col, predicateList), 
                    actualFilter.push(col)) : predicateList.push(excelPredicate[prop]);
                }
                if (defaultFltrCols.length) for (var _e = 0, defaultFltrCols_1 = defaultFltrCols; _e < defaultFltrCols_1.length; _e++) {
                    var col = defaultFltrCols_1[_e], column_1 = this.getColumnByField(col.field) || getColumnByForeignKeyValue(col.field, this.parent.getForeignKeyColumns()), sType = column_1.type;
                    getColumnByForeignKeyValue(col.field, foreignColumn) && !skipFoerign ? (actualFilter.push(col), 
                    predicateList = this.fGeneratePredicate(column_1, predicateList)) : "date" !== sType && "datetime" !== sType ? predicateList.push(new Predicate(col.field, col.operator, col.value, !col.matchCase, this.parent.filterSettings.ignoreAccent)) : predicateList.push(getDatePredicate(col));
                }
                predicateList.length ? query.where(Predicate.and(predicateList)) : this.parent.notify("showEmptyGrid", {});
            }
            return query;
        }, Data.prototype.fGeneratePredicate = function(col, predicateList) {
            var fPredicate = {};
            return col && (this.parent.notify("generateQuery", {
                predicate: fPredicate,
                column: col
            }), fPredicate.predicate.predicates.length && predicateList.push(fPredicate.predicate)), 
            predicateList;
        }, Data.prototype.getData = function(args, query) {
            var _this = this;
            void 0 === args && (args = {
                requestType: ""
            });
            var key = this.getKey(args.foreignKeyData && Object.keys(args.foreignKeyData).length ? args.foreignKeyData : this.parent.getPrimaryKeyFieldNames());
            if (this.parent.dataSource && "result" in this.parent.dataSource) {
                return this.eventPromise(args, query, key).promise;
            }
            var crud = void 0;
            switch (args.requestType) {
              case "delete":
                query = query || this.generateQuery(), crud = this.dataManager.remove(key, args.data[0], null, query);
                break;

              case "save":
                query = query || this.generateQuery(), args.index = isNullOrUndefined(args.index) ? 0 : args.index, 
                crud = this.dataManager.insert(args.data, null, query, args.index);
            }
            return crud && !Array.isArray(crud) ? crud.then(function(result) {
                return _this.executeQuery(query);
            }) : this.executeQuery(query);
        }, Data.prototype.executeQuery = function(query) {
            var _this = this;
            if (this.dataManager.ready) {
                var deferred_1 = new Deferred();
                return this.dataManager.ready.then(function(e) {
                    _this.dataManager.executeQuery(query).then(function(result) {
                        deferred_1.resolve(result);
                    });
                }).catch(function(e) {
                    deferred_1.reject(e);
                }), deferred_1.promise;
            }
            return this.dataManager.executeQuery(query);
        }, Data.prototype.formatGroupColumn = function(value, field) {
            this.parent;
            var serviceLocator = this.serviceLocator, column = this.getColumnByField(field), date = value;
            column.type || (column.type = date.getDay ? date.getHours() > 0 || date.getMinutes() > 0 || date.getSeconds() > 0 || date.getMilliseconds() > 0 ? "datetime" : "date" : typeof value), 
            isNullOrUndefined(column.getFormatter()) && setFormatter(serviceLocator, column);
            return ValueFormatter.prototype.toView(value, column.getFormatter());
        }, Data.prototype.crudActions = function(args) {
            var query = this.generateQuery(), promise = null, key = this.getKey(args.foreignKeyData && Object.keys(args.foreignKeyData).length ? args.foreignKeyData : this.parent.getPrimaryKeyFieldNames());
            switch (this.parent.dataSource && "result" in this.parent.dataSource && this.eventPromise(args, query, key), 
            args.requestType) {
              case "save":
                promise = this.dataManager.update(key, args.data, null, this.generateQuery());
            }
            args.promise = promise, this.parent.notify("crud-Action", args);
        }, Data.prototype.saveChanges = function(changes, key) {
            var query = this.generateQuery().requiresCount();
            if ("result" in this.parent.dataSource) {
                this.getStateEventArgument(query);
                var deff = new Deferred(), args = {
                    requestType: "batchsave",
                    changes: changes,
                    key: key,
                    query: query,
                    endEdit: deff.resolve
                };
                return this.setState({
                    isPending: !0,
                    resolver: deff.resolve
                }), this.parent.trigger("dataSourceChanged", args), deff.promise;
            }
            return this.dataManager.saveChanges(changes, key, null, this.generateQuery().requiresCount());
        }, Data.prototype.getKey = function(keys) {
            if (keys && keys.length) return keys[0];
        }, Data.prototype.isRemote = function() {
            return !0 !== this.dataManager.dataSource.offline && void 0 !== this.dataManager.dataSource.url;
        }, Data.prototype.addRows = function(e) {
            for (var i = e.records.length; i > 0; i--) this.dataManager.dataSource.json.splice(e.toIndex, 0, e.records[i - 1]);
        }, Data.prototype.removeRows = function(e) {
            var json = this.dataManager.dataSource.json;
            this.dataManager.dataSource.json = json.filter(function(value, index) {
                return -1 === e.records.indexOf(value);
            });
        }, Data.prototype.getColumnByField = function(field) {
            var col;
            return this.parent.columnModel.some(function(column) {
                return col = column, column.field === field;
            }) && col;
        }, Data.prototype.destroy = function() {
            this.parent.isDestroyed || (this.parent.off(rowsAdded, this.addRows), this.parent.off(rowsRemoved, this.removeRows), 
            this.parent.off(dataSourceModified, this.initDataManager), this.parent.off(dataSourceModified, this.destroy), 
            this.parent.off(updateData, this.crudActions), this.parent.off(addDeleteAction, this.getData));
        }, Data.prototype.getState = function() {
            return this.dataState;
        }, Data.prototype.setState = function(state) {
            return this.dataState = state;
        }, Data.prototype.getStateEventArgument = function(query) {
            var adaptr = new UrlAdaptor(), dm = new DataManager({
                url: "",
                adaptor: new UrlAdaptor()
            }), state = adaptr.processQuery(dm, query);
            return JSON.parse(state.data);
        }, Data.prototype.eventPromise = function(args, query, key) {
            var state, _this = this, dataArgs = args;
            state = this.getStateEventArgument(query);
            var def = new Deferred(), deff = new Deferred();
            if (void 0 !== args.requestType && "refresh" !== args.requestType) if (state.action = args, 
            "save" === args.requestType || "delete" === args.requestType) {
                var editArgs = args;
                editArgs.key = key, editArgs.state = state, this.setState({
                    isPending: !0,
                    resolver: deff.resolve
                }), dataArgs.endEdit = deff.resolve, this.parent.trigger("dataSourceChanged", editArgs), 
                deff.promise.then(function(e) {
                    _this.setState({
                        isPending: !0,
                        resolver: def.resolve,
                        group: state.group
                    }), _this.parent.trigger("dataStateChange", state);
                });
            } else this.setState({
                isPending: !0,
                resolver: def.resolve,
                group: state.group
            }), this.parent.trigger("dataStateChange", state); else this.setState({}), def.resolve(this.parent.dataSource);
            return def;
        }, Data;
    }(), Row$1 = function() {
        function Row(options) {
            merge(this, options);
        }
        return Row.prototype.clone = function() {
            var row = new Row({});
            return merge(row, this), row.cells = this.cells.map(function(cell) {
                return cell.clone();
            }), row;
        }, Row;
    }(), Cell = function() {
        function Cell(options) {
            this.isSpanned = !1, merge(this, options);
        }
        return Cell.prototype.clone = function() {
            var cell = new Cell({});
            return merge(cell, this), cell;
        }, Cell;
    }(), CellMergeRender = function() {
        function CellMergeRender(serviceLocator, parent) {
            this.serviceLocator = serviceLocator, this.parent = parent;
        }
        return CellMergeRender.prototype.render = function(cellArgs, row, i, td) {
            for (var cellRenderer = this.serviceLocator.getService("cellRendererFactory").getCellRenderer(row.cells[i].cellType || CellType.Data), span = row.cells[i].cellSpan ? row.cells[i].cellSpan : cellArgs.colSpan + i <= row.cells.length ? cellArgs.colSpan : row.cells.length - i, visible = 0, j = i + 1; j < i + span && j < row.cells.length; j++) !1 === row.cells[j].visible ? visible++ : row.cells[j].isSpanned = !0;
            if (visible > 0) {
                for (j = i + span; j < i + span + visible && j < row.cells.length; j++) row.cells[j].isSpanned = !0;
                i + span + visible >= row.cells.length && (span -= i + span + visible - row.cells.length);
            }
            return row.cells[i].cellSpan && (row.data[cellArgs.column.field] = row.cells[i].spanText, 
            td = cellRenderer.render(row.cells[i], row.data, {
                index: isNullOrUndefined(row.index) ? "" : row.index.toString()
            })), span > 1 && attributes(td, {
                colSpan: span.toString(),
                "aria-colSpan": span.toString()
            }), !this.parent.enableColumnVirtualization || row.cells[i].cellSpan || this.containsKey(cellArgs.column.field, cellArgs.data[cellArgs.column.field]) || this.backupMergeCells(cellArgs.column.field, cellArgs.data[cellArgs.column.field], cellArgs.colSpan), 
            td;
        }, CellMergeRender.prototype.backupMergeCells = function(fName, data, span) {
            this.setMergeCells(this.generteKey(fName, data), span);
        }, CellMergeRender.prototype.generteKey = function(fname, data) {
            return fname + "__" + data.toString();
        }, CellMergeRender.prototype.splitKey = function(key) {
            return key.split("__");
        }, CellMergeRender.prototype.containsKey = function(fname, data) {
            return this.getMergeCells().hasOwnProperty(this.generteKey(fname, data));
        }, CellMergeRender.prototype.getMergeCells = function() {
            return this.parent.mergeCells;
        }, CellMergeRender.prototype.setMergeCells = function(key, span) {
            this.parent.mergeCells[key] = span;
        }, CellMergeRender.prototype.updateVirtualCells = function(rows) {
            for (var mCells = this.getMergeCells(), _i = 0, _a = Object.keys(mCells); _i < _a.length; _i++) {
                var key = _a[_i], value = mCells[key], merge$$1 = this.splitKey(key), columnIndex = this.getIndexFromAllColumns(merge$$1[0]), vColumnIndices = this.parent.getColumnIndexesInView(), span = value - (vColumnIndices[0] - columnIndex);
                if (columnIndex < vColumnIndices[0] && span > 1) for (var _b = 0, rows_1 = rows; _b < rows_1.length; _b++) {
                    var row = rows_1[_b];
                    if (row.data[merge$$1[0]].toString() === merge$$1[1].toString()) {
                        row.cells[0].cellSpan = span, row.cells[0].spanText = merge$$1[1];
                        break;
                    }
                }
            }
            return rows;
        }, CellMergeRender.prototype.getIndexFromAllColumns = function(field) {
            return iterateArrayOrObject(this.parent.getVisibleColumns(), function(item, index) {
                if (item.field === field) return index;
            })[0];
        }, CellMergeRender;
    }(), RowRenderer = function() {
        function RowRenderer(serviceLocator, cellType, parent) {
            this.element = createElement("tr", {
                attrs: {
                    role: "row"
                }
            }), this.cellType = cellType, this.serviceLocator = serviceLocator, this.parent = parent;
        }
        return RowRenderer.prototype.render = function(row, columns, attributes$$1, rowTemplate, cloneNode) {
            return this.refreshRow(row, columns, attributes$$1, rowTemplate, cloneNode);
        }, RowRenderer.prototype.refresh = function(row, columns, isChanged, attributes$$1, rowTemplate) {
            isChanged && (row.data = extend({}, row.changes), this.refreshMergeCells(row));
            var node = this.parent.element.querySelector("[data-uid=" + row.uid + "]"), tr = this.refreshRow(row, columns, attributes$$1, rowTemplate), cells = [].slice.call(tr.cells);
            node.innerHTML = "";
            for (var _i = 0, cells_1 = cells; _i < cells_1.length; _i++) {
                var cell = cells_1[_i];
                node.appendChild(cell);
            }
        }, RowRenderer.prototype.refreshRow = function(row, columns, attributes$$1, rowTemplate, cloneNode) {
            var tr = isNullOrUndefined(cloneNode) ? this.element.cloneNode() : cloneNode, rowArgs = {
                data: row.data
            }, cellArgs = {
                data: row.data
            }, attrCopy = extend({}, attributes$$1, {}), chekBoxEnable = this.parent.getColumns().filter(function(col) {
                return "checkbox" === col.type && col.field;
            })[0], value = !1;
            chekBoxEnable && (value = getValue(chekBoxEnable.field, rowArgs.data)), row.isDataRow && (row.isSelected = this.parent.getSelectedRowIndexes().indexOf(row.index) > -1 || value), 
            row.isDataRow && this.parent.isCheckBoxSelection && "Check" === this.parent.checkAllRows && this.parent.enableVirtualization && (row.isSelected = !0, 
            -1 === this.parent.getSelectedRowIndexes().indexOf(row.index) && this.parent.getSelectedRowIndexes().push(row.index)), 
            this.buildAttributeFromRow(tr, row), attributes(tr, attrCopy), setStyleAndAttributes(tr, row.attributes);
            for (var cellRendererFact = this.serviceLocator.getService("cellRendererFactory"), i = 0, len = row.cells.length; i < len; i++) {
                var cell = row.cells[i];
                cell.isSelected = row.isSelected;
                var cellRenderer = cellRendererFact.getCellRenderer(row.cells[i].cellType || CellType.Data), attrs = {
                    index: isNullOrUndefined(row.index) ? "" : row.index.toString()
                };
                row.isExpand && row.cells[i].cellType === CellType.DetailExpand && (attrs.class = "e-detailrowexpand");
                var td = cellRenderer.render(row.cells[i], row.data, attrs);
                if (row.cells[i].cellType !== CellType.Filter) {
                    if ((row.cells[i].cellType === CellType.Data || row.cells[i].cellType === CellType.CommandColumn) && (this.parent.trigger("queryCellInfo", extend(cellArgs, {
                        cell: td,
                        column: cell.column,
                        colSpan: 1,
                        foreignKeyData: row.cells[i].foreignKeyData
                    })), cellArgs.colSpan > 1 || row.cells[i].cellSpan > 1)) {
                        td = new CellMergeRender(this.serviceLocator, this.parent).render(cellArgs, row, i, td);
                    }
                    row.cells[i].isSpanned || tr.appendChild(td);
                }
            }
            var args = {
                row: tr,
                rowHeight: this.parent.rowHeight
            };
            return row.isDataRow && this.parent.trigger("rowDataBound", extend(rowArgs, args)), 
            this.parent.enableVirtualization && (rowArgs.rowHeight = this.parent.rowHeight), 
            rowArgs.rowHeight ? tr.style.height = rowArgs.rowHeight + "px" : this.parent.rowHeight && (tr.style.height = this.parent.rowHeight + "px"), 
            row.cssClass && tr.classList.add(row.cssClass), tr;
        }, RowRenderer.prototype.refreshMergeCells = function(row) {
            for (var _i = 0, _a = row.cells; _i < _a.length; _i++) {
                _a[_i].isSpanned = !1;
            }
            return row;
        }, RowRenderer.prototype.buildAttributeFromRow = function(tr, row) {
            var attr = {}, prop_rowindex = "aria-rowindex", prop_dataUID = "data-uid", prop_ariaSelected = "aria-selected", classes = [];
            row.isDataRow && classes.push("e-row"), row.isAltRow && classes.push("e-altrow"), 
            isNullOrUndefined(row.index) || (attr[prop_rowindex] = row.index), row.rowSpan && (attr.rowSpan = row.rowSpan), 
            row.uid && (attr[prop_dataUID] = row.uid), row.isSelected && (attr[prop_ariaSelected] = !0), 
            !1 === row.visible && classes.push("e-hide"), attr.class = classes, setStyleAndAttributes(tr, attr);
        }, RowRenderer;
    }(), RowModelGenerator = function() {
        function RowModelGenerator(parent) {
            this.parent = parent;
        }
        return RowModelGenerator.prototype.generateRows = function(data, args) {
            for (var rows = [], startIndex = this.parent.enableVirtualization ? args.startIndex : 0, i = 0, len = Object.keys(data).length; i < len; i++, 
            startIndex++) rows[i] = this.generateRow(data[i], startIndex);
            return rows;
        }, RowModelGenerator.prototype.ensureColumns = function() {
            var cols = [];
            return (this.parent.detailTemplate || this.parent.childGrid) && cols.push(this.generateCell({}, null, CellType.DetailExpand)), 
            cols;
        }, RowModelGenerator.prototype.generateRow = function(data, index, cssClass, indent) {
            var options = {};
            options.foreignKeyData = {}, options.uid = getUid("grid-row"), options.data = data, 
            options.index = index, options.indent = indent, options.isDataRow = !0, options.isExpand = !1, 
            options.cssClass = cssClass, options.isAltRow = !!this.parent.enableAltRow && index % 2 != 0, 
            options.isSelected = this.parent.getSelectedRowIndexes().indexOf(index) > -1, this.refreshForeignKeyRow(options);
            var cells = this.ensureColumns(), row = new Row$1(options);
            return row.cells = cells.concat(this.generateCells(options)), row;
        }, RowModelGenerator.prototype.refreshForeignKeyRow = function(options) {
            this.parent.getForeignKeyColumns().forEach(function(col) {
                setValue(col.field, getForeignData(col, options.data), options.foreignKeyData);
            });
        }, RowModelGenerator.prototype.generateCells = function(options) {
            var _this = this, tmp = [];
            return this.parent.getColumns().forEach(function(dummy, index) {
                return tmp.push(_this.generateCell(dummy, options.uid, isNullOrUndefined(dummy.commands) ? void 0 : CellType.CommandColumn, null, index, options.foreignKeyData));
            }), tmp;
        }, RowModelGenerator.prototype.generateCell = function(column, rowId, cellType, colSpan, oIndex, foreignKeyData) {
            var opt = {
                visible: column.visible,
                isDataCell: !isNullOrUndefined(column.field || column.template),
                isTemplate: !isNullOrUndefined(column.template),
                rowID: rowId,
                column: column,
                cellType: isNullOrUndefined(cellType) ? CellType.Data : cellType,
                colSpan: colSpan,
                commands: column.commands,
                isForeignKey: column.isForeignColumn && column.isForeignColumn(),
                foreignKeyData: column.isForeignColumn && column.isForeignColumn() && getValue(column.field, foreignKeyData)
            };
            return (opt.isDataCell || "checkbox" === opt.column.type) && (opt.index = this.parent.getColumnIndexByField(column.field)), 
            new Cell(opt);
        }, RowModelGenerator.prototype.refreshRows = function(input) {
            var _this = this;
            return input.forEach(function(row) {
                _this.refreshForeignKeyRow(row), row.cells = _this.generateCells(row);
            }), input;
        }, RowModelGenerator;
    }(), __extends$113 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), SummaryModelGenerator = function() {
        function SummaryModelGenerator(parent) {
            this.parent = parent;
        }
        return SummaryModelGenerator.prototype.getData = function() {
            var _this = this, rows = [];
            return this.parent.aggregates.slice().forEach(function(row) {
                var columns = row.columns.filter(function(column) {
                    return !(column.footerTemplate || column.groupFooterTemplate || column.groupCaptionTemplate) || _this.columnSelector(column);
                });
                columns.length && rows.push({
                    columns: columns
                });
            }), rows;
        }, SummaryModelGenerator.prototype.columnSelector = function(column) {
            return void 0 !== column.footerTemplate;
        }, SummaryModelGenerator.prototype.getColumns = function(start, end) {
            var columns = [];
            return this.parent.allowGrouping && this.parent.groupSettings.columns.forEach(function(value) {
                return columns.push(new Column({}));
            }), this.parent.detailTemplate && columns.push(new Column({})), columns.push.apply(columns, this.parent.getColumns()), 
            isNullOrUndefined(start) ? columns : columns.slice(start, end);
        }, SummaryModelGenerator.prototype.generateRows = function(input, args, start, end) {
            var _this = this;
            if (0 === this.parent.currentViewData.length) return [];
            var data = this.buildSummaryData(input, args), rows = [];
            return this.getData().forEach(function(row, index) {
                rows.push(_this.getGeneratedRow(row, data[index], args ? args.level : void 0, start, end));
            }), rows;
        }, SummaryModelGenerator.prototype.getGeneratedRow = function(summaryRow, data, raw, start, end) {
            var _this = this, tmp = [], indents = this.getIndentByLevel(raw), indentLength = this.parent.groupSettings.columns.length + (this.parent.detailTemplate ? 1 : 0);
            this.getColumns(start, end).forEach(function(value, index) {
                return tmp.push(_this.getGeneratedCell(value, summaryRow, index >= indentLength ? _this.getCellType() : CellType.Indent, indents[index]));
            });
            var row = new Row$1({
                data: data,
                attributes: {
                    class: "e-summaryrow"
                }
            });
            return row.cells = tmp, row.visible = tmp.some(function(cell) {
                return cell.isDataCell && cell.visible;
            }), row;
        }, SummaryModelGenerator.prototype.getGeneratedCell = function(column, summaryRow, cellType, indent) {
            var sColumn = summaryRow.columns.filter(function(scolumn) {
                return scolumn.columnName === column.field;
            })[0], attrs = {
                style: {
                    textAlign: column.textAlign
                }
            };
            indent && (attrs.class = indent);
            var opt = {
                visible: column.visible,
                isDataCell: !isNullOrUndefined(sColumn),
                isTemplate: sColumn && !isNullOrUndefined(sColumn.footerTemplate || sColumn.groupFooterTemplate || sColumn.groupCaptionTemplate),
                column: sColumn || {},
                attributes: attrs,
                cellType: cellType
            };
            return new Cell(opt);
        }, SummaryModelGenerator.prototype.buildSummaryData = function(data, args) {
            var _this = this, dummy = [], single = {};
            return this.getData().forEach(function(row) {
                single = {}, row.columns.forEach(function(column) {
                    single = _this.setTemplate(column, args && args.aggregates ? args : data, single);
                }), dummy.push(single);
            }), dummy;
        }, SummaryModelGenerator.prototype.getIndentByLevel = function(data) {
            return this.parent.groupSettings.columns.map(function() {
                return "e-indentcelltop";
            });
        }, SummaryModelGenerator.prototype.setTemplate = function(column, data, single) {
            var _this = this, types = column.type, helper = {}, formatFn = column.getFormatter() || function(a) {
                return a;
            }, group = data;
            return types instanceof Array || (types = [ column.type ]), types.forEach(function(type) {
                var key = column.field + " - " + type.toLowerCase(), disp = column.columnName, val = group.aggregates && !isNullOrUndefined(group.aggregates[key]) ? group.aggregates[key] : calculateAggregate(type, group.aggregates ? group : data, column, _this.parent);
                single[disp] = single[disp] || {}, single[disp][key] = val, single[disp][type] = formatFn(val), 
                group.field && (single[disp].field = group.field, single[disp].key = group.key);
            }), helper.format = column.getFormatter(), column.setTemplate(helper), single;
        }, SummaryModelGenerator.prototype.getCellType = function() {
            return CellType.Summary;
        }, SummaryModelGenerator;
    }(), GroupSummaryModelGenerator = function(_super) {
        function GroupSummaryModelGenerator() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$113(GroupSummaryModelGenerator, _super), GroupSummaryModelGenerator.prototype.columnSelector = function(column) {
            return void 0 !== column.groupFooterTemplate;
        }, GroupSummaryModelGenerator.prototype.getIndentByLevel = function(level) {
            return void 0 === level && (level = this.parent.groupSettings.columns.length), this.parent.groupSettings.columns.map(function(v, indx) {
                return indx <= level - 1 ? "" : "e-indentcelltop";
            });
        }, GroupSummaryModelGenerator.prototype.getCellType = function() {
            return CellType.GroupSummary;
        }, GroupSummaryModelGenerator;
    }(SummaryModelGenerator), CaptionSummaryModelGenerator = function(_super) {
        function CaptionSummaryModelGenerator() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$113(CaptionSummaryModelGenerator, _super), CaptionSummaryModelGenerator.prototype.columnSelector = function(column) {
            return void 0 !== column.groupCaptionTemplate;
        }, CaptionSummaryModelGenerator.prototype.getData = function() {
            return [ _super.prototype.getData.call(this).reduce(function(prev, cur) {
                return prev.columns = prev.columns.concat(cur.columns), prev;
            }, {
                columns: []
            }) ];
        }, CaptionSummaryModelGenerator.prototype.isEmpty = function() {
            return 0 === (this.getData()[0].columns || []).length;
        }, CaptionSummaryModelGenerator.prototype.getCellType = function() {
            return CellType.CaptionSummary;
        }, CaptionSummaryModelGenerator;
    }(SummaryModelGenerator), __extends$112 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), GroupModelGenerator = function(_super) {
        function GroupModelGenerator(parent) {
            var _this = _super.call(this, parent) || this;
            return _this.rows = [], _this.index = 0, _this.parent = parent, _this.summaryModelGen = new GroupSummaryModelGenerator(parent), 
            _this.captionModelGen = new CaptionSummaryModelGenerator(parent), _this;
        }
        return __extends$112(GroupModelGenerator, _super), GroupModelGenerator.prototype.generateRows = function(data, args) {
            if (0 === this.parent.groupSettings.columns.length) return _super.prototype.generateRows.call(this, data, args);
            this.rows = [], this.index = this.parent.enableVirtualization ? (this.parent.pageSettings.currentPage - 1) * data.records.length : 0;
            for (var i = 0, len = data.length; i < len; i++) this.getGroupedRecords(0, data[i], data.level);
            return this.index = 0, this.rows;
        }, GroupModelGenerator.prototype.getGroupedRecords = function(index, data, raw) {
            var level = raw;
            if (isNullOrUndefined(data.items)) if (isNullOrUndefined(data.GroupGuid)) this.rows = this.rows.concat(this.generateDataRows(data, index)); else for (var j = 0, len = data.length; j < len; j++) this.getGroupedRecords(index, data[j], data.level); else this.rows = this.rows.concat(this.generateCaptionRow(data, index)), 
            data.items && data.items.length && this.getGroupedRecords(index + 1, data.items, data.items.level), 
            this.parent.aggregates.length && (_a = this.rows).push.apply(_a, this.summaryModelGen.generateRows(data, {
                level: level
            }));
            var _a;
        }, GroupModelGenerator.prototype.getCaptionRowCells = function(field, indent, data) {
            var _this = this, cells = [], visibles = [], column = this.parent.getColumnByField(field), indexes = this.parent.getColumnIndexesInView();
            this.parent.enableColumnVirtualization && (column = this.parent.columns.filter(function(c) {
                return c.field === field;
            })[0]);
            var groupedLen = this.parent.groupSettings.columns.length, gObj = this.parent;
            if (!this.parent.enableColumnVirtualization || -1 !== indexes.indexOf(indent)) {
                for (var i = 0; i < indent; i++) cells.push(this.generateIndentCell());
                cells.push(this.generateCell({}, null, CellType.Expand));
            }
            if (indent = this.parent.enableColumnVirtualization ? 1 : this.parent.getVisibleColumns().length + groupedLen + (gObj.detailTemplate || gObj.childGrid ? 1 : 0) - indent + (this.parent.getVisibleColumns().length ? -1 : 0), 
            this.parent.aggregates.length && !this.captionModelGen.isEmpty()) {
                var captionCells = this.captionModelGen.generateRows(data)[0];
                extend(data, captionCells.data);
                var cIndex_1 = 0;
                captionCells.cells.some(function(cell, index) {
                    return cIndex_1 = index, cell.visible && cell.isDataCell;
                }), visibles = captionCells.cells.slice(cIndex_1).filter(function(cell) {
                    return cell.visible;
                }), captionCells.visible && visibles[0].column.field === this.parent.getVisibleColumns()[0].field && (visibles = visibles.slice(1)), 
                1 === this.parent.getVisibleColumns().length && (visibles = []), indent -= visibles.length;
            }
            var wFlag = !0;
            return (this.parent.enableColumnVirtualization ? this.parent.getColumns() : [ column ]).forEach(function(col, index) {
                var tmpFlag = wFlag && -1 !== indexes.indexOf(indent);
                tmpFlag && (wFlag = !1);
                var cellType = !_this.parent.enableColumnVirtualization || tmpFlag ? CellType.GroupCaption : CellType.GroupCaptionEmpty;
                indent = _this.parent.enableColumnVirtualization && cellType === CellType.GroupCaption ? indent + groupedLen : indent, 
                cells.push(_this.generateCell(column, null, cellType, indent));
            }), cells.push.apply(cells, visibles), cells;
        }, GroupModelGenerator.prototype.generateCaptionRow = function(data, indent) {
            var options = {}, col = this.parent.getColumnByField(data.field);
            options.data = extend({}, data), col && (options.data.field = data.field), options.isDataRow = !1;
            var row = new Row$1(options);
            return row.indent = indent, this.getForeignKeyData(row), row.cells = this.getCaptionRowCells(data.field, indent, row.data), 
            row;
        }, GroupModelGenerator.prototype.getForeignKeyData = function(row) {
            var data = row.data, col = this.parent.getColumnByField(data.field);
            col && col.isForeignColumn && col.isForeignColumn() && setValue("foreignKey", col.valueAccessor(col.foreignKeyValue, getForeignData(col, {}, data.key)[0], col), row.data);
        }, GroupModelGenerator.prototype.generateDataRows = function(data, indent) {
            for (var rows = [], indexes = this.parent.getColumnIndexesInView(), i = 0, len = data.length; i < len; i++) {
                rows[i] = this.generateRow(data[i], this.index, i ? void 0 : "e-firstchildrow", indent);
                for (var j = 0; j < indent; j++) this.parent.enableColumnVirtualization && -1 === indexes.indexOf(indent) || rows[i].cells.unshift(this.generateIndentCell());
                this.index++;
            }
            return rows;
        }, GroupModelGenerator.prototype.generateIndentCell = function() {
            return this.generateCell({}, null, CellType.Indent);
        }, GroupModelGenerator.prototype.refreshRows = function(input) {
            var _this = this, indexes = this.parent.getColumnIndexesInView();
            return input.forEach(function(row) {
                if (row.isDataRow) {
                    row.cells = _this.generateCells(row);
                    for (var j = 0; j < row.indent; j++) _this.parent.enableColumnVirtualization && -1 === indexes.indexOf(row.indent) || row.cells.unshift(_this.generateIndentCell());
                } else {
                    var cRow = _this.generateCaptionRow(row.data, row.indent);
                    row.cells = cRow.cells;
                }
            }), input;
        }, GroupModelGenerator;
    }(RowModelGenerator), ContentRender = function() {
        function ContentRender(parent, serviceLocator) {
            var _this = this;
            this.rows = [], this.freezeRows = [], this.movableRows = [], this.isLoaded = !0, 
            this.drop = function(e) {
                _this.parent.notify(columnDrop, {
                    target: e.target,
                    droppedElement: e.droppedElement
                }), remove(e.droppedElement);
            }, this.rafCallback = function(args) {
                var arg = args;
                return function() {
                    if (_this.ariaService.setBusy(_this.getPanel().firstChild, !1), !_this.parent.isDestroyed) {
                        var rows = _this.rows.slice(0);
                        if (0 !== _this.parent.getFrozenColumns() && (rows = args.isFrozen ? _this.freezeRows : _this.movableRows), 
                        _this.parent.notify(contentReady, {
                            rows: rows,
                            args: arg
                        }), _this.isLoaded && (_this.parent.trigger(dataBound, {}), _this.parent.allowTextWrap && _this.parent.notify(freezeRender, {
                            case: "textwrap"
                        })), arg) {
                            var action = (arg.requestType || "").toLowerCase() + "-complete";
                            _this.parent.notify(action, arg);
                        }
                        _this.parent.hideSpinner();
                    }
                };
            }, this.parent = parent, this.serviceLocator = serviceLocator, this.ariaService = this.serviceLocator.getService("ariaService"), 
            this.generator = this.getModelGenerator(), this.parent.isDestroyed || (this.parent.on(columnVisibilityChanged, this.setVisible, this), 
            this.parent.on(colGroupRefresh, this.colGroupRefresh, this), this.parent.on(uiUpdate, this.enableAfterRender, this));
        }
        return ContentRender.prototype.renderPanel = function() {
            var gObj = this.parent, div = createElement("div", {
                className: "e-gridcontent"
            }), innerDiv = createElement("div", {
                className: "e-content"
            });
            this.ariaService.setOptions(innerDiv, {
                busy: !1
            }), div.appendChild(innerDiv), this.setPanel(div), gObj.element.appendChild(div);
        }, ContentRender.prototype.renderTable = function() {
            var contentDiv = this.getPanel();
            contentDiv.appendChild(this.createContentTable("_content_table")), this.setTable(contentDiv.querySelector(".e-table")), 
            this.ariaService.setOptions(this.getTable(), {
                multiselectable: "Multiple" === this.parent.selectionSettings.type
            }), this.initializeContentDrop(), this.parent.frozenRows && this.parent.getHeaderContent().classList.add("e-frozenhdrcont");
        }, ContentRender.prototype.createContentTable = function(id) {
            var innerDiv = this.getPanel().firstChild, table = createElement("table", {
                className: "e-table",
                attrs: {
                    cellspacing: "0.25px",
                    role: "grid",
                    id: this.parent.element.id + id
                }
            });
            return this.setColGroup(this.parent.element.querySelector(".e-gridheader").querySelector("colgroup").cloneNode(!0)), 
            table.appendChild(this.getColGroup()), table.appendChild(createElement("tbody")), 
            innerDiv.appendChild(table), innerDiv;
        }, ContentRender.prototype.splitRows = function(idx) {
            this.parent.getFrozenColumns() && (0 === idx ? (this.freezeRows = this.rows, this.freezeRowElements = this.rowElements) : this.movableRows = this.rows);
        }, ContentRender.prototype.refreshContentRows = function(args) {
            var _this = this;
            void 0 === args && (args = {});
            var gObj = this.parent;
            if (0 !== gObj.currentViewData.length) {
                var tr, hdrTbody, dataSource = gObj.currentViewData, frag = document.createDocumentFragment(), hdrfrag = document.createDocumentFragment(), columns = gObj.getColumns(), frzCols = gObj.getFrozenColumns(), row = new RowRenderer(this.serviceLocator, null, this.parent);
                this.rowElements = [], this.rows = [];
                var modelData = this.generator.generateRows(dataSource, args), idx = modelData[0].cells[0].index, fCont = this.getPanel().querySelector(".e-frozencontent"), mCont = this.getPanel().querySelector(".e-movablecontent"), cont = this.getPanel().querySelector(".e-content");
                if (this.parent.enableColumnVirtualization) {
                    new CellMergeRender(this.serviceLocator, this.parent).updateVirtualCells(modelData);
                }
                this.tbody = frzCols && idx >= frzCols ? mCont.querySelector("tbody") : this.getTable().querySelector("tbody");
                for (var i = 0, len = modelData.length; i < len; i++) {
                    if (gObj.rowTemplate) for (var elements = gObj.getRowTemplate()(extend({
                        index: i
                    }, dataSource[i]), gObj, "rowTemplate"), j = 0; j < elements.length; j++) {
                        var isTR = "tr" === elements[j].nodeName.toLowerCase();
                        (isTR || elements[j].querySelectorAll && elements[j].querySelectorAll("tr").length) && (tr = isTR ? elements[j] : elements[j].querySelector("tr"));
                    } else tr = row.render(modelData[i], columns);
                    if (gObj.frozenRows && i < gObj.frozenRows ? hdrfrag.appendChild(tr) : frag.appendChild(tr), 
                    this.rows.push(modelData[i]), modelData[i].isDataRow) {
                        var td = tr.querySelectorAll(".e-rowcell:not(.e-hide)")[0];
                        td && td.classList.add("e-detailrowvisible"), this.rowElements.push(tr);
                    }
                    this.ariaService.setOptions(this.getTable(), {
                        colcount: gObj.getColumns().length.toString()
                    });
                }
                this.splitRows(idx), gObj.frozenRows && ((hdrTbody = frzCols ? gObj.getHeaderContent().querySelector(0 === idx ? ".e-frozenheader" : ".e-movableheader").querySelector("tbody") : gObj.getHeaderTable().querySelector("tbody")).innerHTML = "", 
                hdrTbody.appendChild(hdrfrag)), gObj.frozenRows && 0 === idx && cont.offsetHeight === Number(gObj.height) && (cont.style.height = cont.offsetHeight - hdrTbody.offsetHeight + "px"), 
                frzCols && 0 === idx && (this.getPanel().firstChild.style.overflowY = "hidden"), 
                args.rows = this.rows.slice(0), args.isFrozen = 0 !== this.parent.getFrozenColumns() && !args.isFrozen, 
                function(updateFunction, callBack) {
                    requestAnimationFrame(function() {
                        try {
                            callBack(null, updateFunction());
                        } catch (e) {
                            callBack(e);
                        }
                    });
                }(function() {
                    remove(_this.tbody), _this.tbody = createElement("tbody"), frzCols ? (_this.tbody.appendChild(frag), 
                    0 === idx ? (_this.isLoaded = !1, fCont.querySelector("table").appendChild(_this.tbody)) : (_this.tbody.childElementCount < 1 && _this.tbody.appendChild(createElement("tr").appendChild(createElement("td"))), 
                    _this.isLoaded = !0, mCont.querySelector("table").appendChild(_this.tbody), fCont.style.height = mCont.offsetHeight - getScrollBarWidth() + "px", 
                    mCont.style.overflowY = "auto" !== _this.parent.height ? "scroll" : "auto", fCont.style.borderRightWidth = "1px")) : _this.appendContent(_this.tbody, frag, args), 
                    frzCols && 0 === idx && _this.refreshContentRows(extend({}, args));
                }, this.rafCallback(extend({}, args)));
            }
        }, ContentRender.prototype.appendContent = function(tbody, frag, args) {
            tbody.appendChild(frag), this.getTable().appendChild(tbody);
        }, ContentRender.prototype.getPanel = function() {
            return this.contentPanel;
        }, ContentRender.prototype.setPanel = function(panel) {
            this.contentPanel = panel;
        }, ContentRender.prototype.getTable = function() {
            return this.contentTable;
        }, ContentRender.prototype.setTable = function(table) {
            this.contentTable = table;
        }, ContentRender.prototype.getRows = function() {
            return this.parent.getFrozenColumns() ? this.freezeRows : this.rows;
        }, ContentRender.prototype.getMovableRows = function() {
            return this.movableRows;
        }, ContentRender.prototype.getRowElements = function() {
            return this.parent.getFrozenColumns() ? this.freezeRowElements : this.rowElements;
        }, ContentRender.prototype.getMovableRowElements = function() {
            return this.rowElements;
        }, ContentRender.prototype.setRowElements = function(elements) {
            this.rowElements = elements;
        }, ContentRender.prototype.getColGroup = function() {
            return this.colgroup;
        }, ContentRender.prototype.setColGroup = function(colGroup) {
            return this.colgroup = colGroup;
        }, ContentRender.prototype.setVisible = function(columns) {
            var gObj = this.parent, frzCols = gObj.getFrozenColumns(), rows = [];
            if (frzCols) for (var fRows = this.freezeRows, mRows = this.movableRows, rowLen = fRows.length, cellLen = void 0, i = 0, row = void 0; i < rowLen; i++) {
                cellLen = mRows[i].cells.length, row = fRows[i].clone();
                for (var j = 0; j < cellLen; j++) row.cells.push(mRows[i].cells[j]);
                rows.push(row);
            } else rows = this.getRows();
            var testRow;
            rows.some(function(r) {
                return r.isDataRow && (testRow = r), r.isDataRow;
            });
            for (var c = 0, clen = columns.length; c < clen; c++) {
                var column = columns[c], idx = this.parent.getNormalizedColumnIndex(column.uid);
                if (!this.canSkip(column, testRow, idx)) {
                    var displayVal = !0 === column.visible ? "" : "none";
                    if (frzCols) if (idx < frzCols) setStyleAttribute(this.getColGroup().childNodes[idx], {
                        display: displayVal
                    }); else {
                        setStyleAttribute(gObj.getContent().querySelector(".e-movablecontent").querySelector("colgroup").childNodes[idx - frzCols], {
                            display: displayVal
                        });
                    } else setStyleAttribute(this.getColGroup().childNodes[idx], {
                        display: displayVal
                    });
                }
            }
            this.refreshContentRows({
                requestType: "refresh"
            });
        }, ContentRender.prototype.colGroupRefresh = function() {
            if (this.getColGroup()) {
                var colGroup = this.parent.element.querySelector(".e-gridheader").querySelector("colgroup").cloneNode(!0);
                this.getTable().replaceChild(colGroup, this.getColGroup()), this.setColGroup(colGroup);
            }
        }, ContentRender.prototype.initializeContentDrop = function() {
            var gObj = this.parent;
            new Droppable(gObj.getContent(), {
                accept: ".e-dragclone",
                drop: this.drop
            });
        }, ContentRender.prototype.canSkip = function(column, row, index) {
            return isNullOrUndefined(row) || isNullOrUndefined(column.visible) || row.cells[index].visible === column.visible;
        }, ContentRender.prototype.getModelGenerator = function() {
            return this.generator = this.parent.allowGrouping ? new GroupModelGenerator(this.parent) : new RowModelGenerator(this.parent);
        }, ContentRender.prototype.renderEmpty = function(tbody) {
            this.getTable().appendChild(tbody), this.parent.frozenRows && (this.parent.getHeaderContent().querySelector("tbody").innerHTML = "");
        }, ContentRender.prototype.setSelection = function(uid, set, clearAll) {
            this.parent.getFrozenColumns() && this.getMovableRows().filter(function(row) {
                return clearAll || uid === row.uid;
            }).forEach(function(row) {
                return row.isSelected = set;
            }), this.getRows().filter(function(row) {
                return clearAll || uid === row.uid;
            }).forEach(function(row) {
                row.isSelected = set, row.cells.forEach(function(cell) {
                    return cell.isSelected = set;
                });
            });
        }, ContentRender.prototype.getRowByIndex = function(index) {
            return this.parent.getDataRows()[index];
        }, ContentRender.prototype.getVirtualRowIndex = function(index) {
            return index;
        }, ContentRender.prototype.getMovableRowByIndex = function(index) {
            return this.parent.getMovableDataRows()[index];
        }, ContentRender.prototype.enableAfterRender = function(e) {
            "group" === e.module && e.enable && (this.generator = this.getModelGenerator());
        }, ContentRender;
    }(), HeaderRender = function() {
        function HeaderRender(parent, serviceLocator) {
            var _this = this;
            this.frzIdx = 0, this.helper = function(e) {
                var gObj = _this.parent, target = e.sender.target, parentEle = parentsUntil(target, "e-headercell");
                if (!gObj.allowReordering && !gObj.allowGrouping || !isNullOrUndefined(parentEle) && parentEle.querySelectorAll(".e-checkselectall").length > 0) return !1;
                var visualElement = createElement("div", {
                    className: "e-cloneproperties e-dragclone e-headerclone"
                }), element = target.classList.contains("e-headercell") ? target : parentEle;
                if (!element || !gObj.allowReordering && element.classList.contains("e-stackedheadercell")) return !1;
                var col, height = element.offsetHeight, headercelldiv = element.querySelector(".e-headercelldiv");
                return headercelldiv && (col = gObj.getColumnByUid(headercelldiv.getAttribute("e-mappinguid")), 
                _this.column = col, visualElement.setAttribute("e-mappinguid", _this.column.uid)), 
                col && !isNullOrUndefined(col.headerTemplate) ? -1 !== col.headerTemplate.indexOf("#") ? visualElement.innerHTML = document.querySelector(col.headerTemplate).innerHTML.trim() : visualElement.innerHTML = col.headerTemplate : visualElement.textContent = headercelldiv ? col.headerText : element.firstElementChild.innerHTML, 
                visualElement.style.width = element.offsetWidth + "px", visualElement.style.height = element.offsetHeight + "px", 
                visualElement.style.lineHeight = (height - 6).toString() + "px", gObj.element.appendChild(visualElement), 
                visualElement;
            }, this.dragStart = function(e) {
                var gObj = _this.parent;
                gObj.element.querySelector(".e-gridpopup").style.display = "none", gObj.notify(columnDragStart, {
                    target: e.target,
                    column: _this.column,
                    event: e.event
                });
            }, this.drag = function(e) {
                var gObj = _this.parent, target = e.target;
                if (target) {
                    var closest$$1 = closest(target, ".e-grid"), cloneElement = _this.parent.element.querySelector(".e-cloneproperties");
                    if (!closest$$1 || closest$$1.getAttribute("id") !== gObj.element.getAttribute("id")) return classList(cloneElement, [ "e-notallowedcur" ], [ "e-defaultcur" ]), 
                    void (gObj.allowReordering && (gObj.element.querySelector(".e-reorderuparrow").style.display = "none", 
                    gObj.element.querySelector(".e-reorderdownarrow").style.display = "none"));
                    gObj.notify(columnDrag, {
                        target: e.target,
                        column: _this.column,
                        event: e.event
                    });
                }
            }, this.dragStop = function(e) {
                var cancel, gObj = _this.parent;
                gObj.element.querySelector(".e-gridpopup").style.display = "none", (!parentsUntil(e.target, "e-headercell") && !parentsUntil(e.target, "e-groupdroparea") || !gObj.allowReordering && parentsUntil(e.target, "e-headercell") || !e.helper.getAttribute("e-mappinguid") && parentsUntil(e.target, "e-groupdroparea")) && (remove(e.helper), 
                cancel = !0), gObj.notify(columnDragStop, {
                    target: e.target,
                    event: e.event,
                    column: _this.column,
                    cancel: cancel
                });
            }, this.drop = function(e) {
                var gObj = _this.parent, uid = e.droppedElement.getAttribute("e-mappinguid"), closest$$1 = closest(e.target, ".e-grid");
                remove(e.droppedElement), closest$$1 && closest$$1.getAttribute("id") !== gObj.element.getAttribute("id") || !gObj.allowReordering && !gObj.allowGrouping || gObj.notify(headerDrop, {
                    target: e.target,
                    uid: uid
                });
            }, this.parent = parent, this.serviceLocator = serviceLocator, this.ariaService = this.serviceLocator.getService("ariaService"), 
            this.widthService = this.serviceLocator.getService("widthService"), this.parent.isDestroyed || (this.parent.on(columnVisibilityChanged, this.setVisible, this), 
            this.parent.on(columnPositionChanged, this.colPosRefresh, this));
        }
        return HeaderRender.prototype.renderPanel = function() {
            var div = createElement("div", {
                className: "e-gridheader"
            }), innerDiv = createElement("div", {
                className: "e-headercontent"
            });
            div.appendChild(innerDiv), this.setPanel(div), this.parent.element.appendChild(div);
        }, HeaderRender.prototype.renderTable = function() {
            var headerDiv = this.getPanel();
            headerDiv.appendChild(this.createHeaderTable()), this.setTable(headerDiv.querySelector(".e-table")), 
            this.parent.getFrozenColumns() || (this.initializeHeaderDrag(), this.initializeHeaderDrop()), 
            this.parent.notify(headerRefreshed, {
                rows: this.rows,
                args: {
                    isFrozen: 0 !== this.parent.getFrozenColumns()
                }
            });
        }, HeaderRender.prototype.getPanel = function() {
            return this.headerPanel;
        }, HeaderRender.prototype.setPanel = function(panel) {
            this.headerPanel = panel;
        }, HeaderRender.prototype.getTable = function() {
            return this.headerTable;
        }, HeaderRender.prototype.setTable = function(table) {
            this.headerTable = table;
        }, HeaderRender.prototype.getColGroup = function() {
            return this.colgroup;
        }, HeaderRender.prototype.setColGroup = function(colGroup) {
            return this.colgroup = colGroup;
        }, HeaderRender.prototype.getRows = function() {
            return this.getTable().tHead.rows;
        }, HeaderRender.prototype.createHeaderTable = function() {
            var table = this.createTable(), innerDiv = this.getPanel().firstChild;
            return innerDiv.appendChild(table), innerDiv;
        }, HeaderRender.prototype.createTable = function() {
            var gObj = this.parent, table = (gObj.getColumns(), createElement("table", {
                className: "e-table",
                attrs: {
                    cellspacing: "0.25px",
                    role: "grid"
                }
            })), findHeaderRow = (this.getPanel().firstChild, this.createHeaderContent()), thead = findHeaderRow.thead, tbody = createElement("tbody", {
                className: this.parent.frozenRows ? "" : "e-hide"
            });
            this.caption = createElement("caption", {
                innerHTML: this.parent.element.id + "_header_table",
                className: "e-hide"
            });
            for (var bodyCell, colGroup = createElement("colgroup"), rowBody = createElement("tr"), rows = this.rows = findHeaderRow.rows, i = (new RowRenderer(this.serviceLocator, CellType.Header), 
            0), len = rows.length; i < len; i++) for (var j = 0, len_1 = rows[i].cells.length; j < len_1; j++) {
                rows[i].cells[j];
                bodyCell = createElement("td"), rowBody.appendChild(bodyCell);
            }
            return (gObj.allowFiltering || gObj.allowSorting || gObj.allowGrouping) && table.classList.add("e-sortfilter"), 
            this.updateColGroup(colGroup), tbody.appendChild(rowBody), table.appendChild(this.setColGroup(colGroup)), 
            table.appendChild(thead), table.appendChild(tbody), table.appendChild(this.caption), 
            this.ariaService.setOptions(table, {
                colcount: gObj.getColumns().length.toString()
            }), table;
        }, HeaderRender.prototype.createHeaderContent = function() {
            var gObj = this.parent, columns = gObj.getColumns(), thead = createElement("thead"), colHeader = createElement("tr", {
                className: "e-columnheader"
            }), rowRenderer = new RowRenderer(this.serviceLocator, CellType.Header, gObj);
            rowRenderer.element = colHeader;
            var headerRow, rows = [];
            this.colDepth = this.getObjDepth();
            for (var i = 0, len = this.colDepth; i < len; i++) rows[i] = this.generateRow(i), 
            rows[i].cells = [];
            rows = this.ensureColumns(rows), rows = this.getHeaderCells(rows);
            for (i = 0, len = this.colDepth; i < len; i++) headerRow = rowRenderer.render(rows[i], columns), 
            this.parent.rowHeight && (headerRow.style.height = this.parent.rowHeight + "px"), 
            thead.appendChild(headerRow);
            return {
                thead: thead,
                rows: rows
            };
        }, HeaderRender.prototype.updateColGroup = function(colGroup) {
            var col, cols = this.parent.getColumns(), indexes = this.parent.getColumnIndexesInView();
            if (this.parent.allowGrouping) for (var i = 0, len = this.parent.groupSettings.columns.length; i < len; i++) this.parent.enableColumnVirtualization && -1 === indexes.indexOf(i) || (col = createElement("col"), 
            colGroup.appendChild(col));
            (this.parent.detailTemplate || this.parent.childGrid) && (col = createElement("col"), 
            colGroup.appendChild(col));
            for (i = 0, len = cols.length; i < len; i++) col = createElement("col"), !1 === cols[i].visible && setStyleAttribute(col, {
                display: "none"
            }), colGroup.appendChild(col);
            return colGroup;
        }, HeaderRender.prototype.ensureColumns = function(rows) {
            for (var gObj = this.parent, indexes = this.parent.getColumnIndexesInView(), i = 0, len = rows.length; i < len; i++) {
                if (gObj.allowGrouping) for (var c = 0, len_2 = gObj.groupSettings.columns.length; c < len_2; c++) this.parent.enableColumnVirtualization && -1 === indexes.indexOf(c) || rows[i].cells.push(this.generateCell({}, CellType.HeaderIndent));
                (gObj.detailTemplate || gObj.childGrid) && rows[i].cells.push(this.generateCell({}, CellType.DetailHeader));
            }
            return rows;
        }, HeaderRender.prototype.getHeaderCells = function(rows) {
            var thead = this.parent.getHeaderTable() && this.parent.getHeaderTable().querySelector("thead"), cols = this.parent.enableColumnVirtualization ? this.parent.getColumns() : this.parent.columns;
            this.frzIdx = 0;
            for (var i = 0, len = cols.length; i < len; i++) rows = this.appendCells(cols[i], rows, 0, 0 === i, !1, i === len - 1, thead);
            return rows;
        }, HeaderRender.prototype.appendCells = function(cols, rows, index, isFirstObj, isFirstCol, isLastCol, isMovable) {
            var lastCol = isLastCol ? "e-lastcell" : "", frzCols = this.parent.getFrozenColumns();
            if (cols.columns) {
                var colSpan = this.getCellCnt(cols, 0);
                if (colSpan) {
                    var frzObj = this.refreshFrozenHdr(cols.columns, {
                        isPartial: !1,
                        isComp: !0,
                        cnt: 0
                    });
                    (!frzCols || frzCols && (!isMovable && (this.parent.frozenColumns - this.frzIdx > 0 || frzObj.isPartial) || isMovable && colSpan + this.frzIdx > this.parent.frozenColumns && !frzObj.isComp)) && rows[index].cells.push(new Cell({
                        cellType: CellType.StackedHeader,
                        column: cols,
                        colSpan: this.getColSpan(colSpan, isMovable, frzObj.cnt)
                    }));
                }
                for (var i = 0, len = cols.columns.length; i < len; i++) rows = this.appendCells(cols.columns[i], rows, index + 1, isFirstObj, 0 === i, i === len - 1 && isLastCol, isMovable);
            } else (!frzCols || frzCols && (!isMovable && (this.frzIdx < this.parent.frozenColumns || cols.isFrozen) || isMovable && this.frzIdx >= this.parent.frozenColumns && !cols.isFrozen)) && rows[index].cells.push(this.generateCell(cols, CellType.Header, this.colDepth - index, (isFirstObj ? "" : isFirstCol ? "e-firstcell" : "") + lastCol, index, this.parent.getColumnIndexByUid(cols.uid))), 
            this.frzIdx++;
            return rows;
        }, HeaderRender.prototype.refreshFrozenHdr = function(cols, frzObj) {
            for (var i = 0; i < cols.length; i++) cols[i].columns ? frzObj = this.refreshFrozenHdr(cols[i].columns, frzObj) : (cols[i].isFrozen && (frzObj.isPartial = !0, 
            frzObj.cnt++), frzObj.isComp = frzObj.isComp && (cols[i].isFrozen || this.parent.getColumnIndexByField(cols[i].field) < this.parent.frozenColumns));
            return frzObj;
        }, HeaderRender.prototype.getColSpan = function(colSpan, isMovable, frozenCnt) {
            var frzCol = this.parent.frozenColumns;
            return this.parent.getFrozenColumns() && this.frzIdx + colSpan > frzCol && (isMovable ? colSpan = colSpan - (frzCol > this.frzIdx ? frzCol - this.frzIdx : 0) - frozenCnt : colSpan -= colSpan - (frzCol > this.frzIdx ? frzCol + frozenCnt - this.frzIdx : frozenCnt)), 
            colSpan;
        }, HeaderRender.prototype.generateRow = function(index) {
            return new Row$1({});
        }, HeaderRender.prototype.generateCell = function(column, cellType, rowSpan, className, rowIndex, colIndex) {
            var opt = {
                visible: column.visible,
                isDataCell: !1,
                isTemplate: !isNullOrUndefined(column.headerTemplate),
                rowID: "",
                column: column,
                cellType: cellType,
                rowSpan: rowSpan,
                className: className,
                index: rowIndex,
                colIndex: colIndex
            };
            return (!opt.rowSpan || opt.rowSpan < 2) && delete opt.rowSpan, new Cell(opt);
        }, HeaderRender.prototype.setVisible = function(columns) {
            for (var idx, gObj = this.parent, displayVal = ([].slice.call(this.getRows()), ""), frzCols = gObj.getFrozenColumns(), c = 0, clen = columns.length; c < clen; c++) {
                var column = columns[c];
                if (idx = gObj.getNormalizedColumnIndex(column.uid), !1 === column.visible && (displayVal = "none"), 
                frzCols) if (idx < frzCols) setStyleAttribute(this.getColGroup().children[idx], {
                    display: displayVal
                }); else {
                    setStyleAttribute(gObj.getHeaderContent().querySelector(".e-movableheader").querySelector("colgroup").children[idx - frzCols], {
                        display: displayVal
                    });
                } else setStyleAttribute(this.getColGroup().children[idx], {
                    display: displayVal
                });
                this.refreshUI();
            }
        }, HeaderRender.prototype.colPosRefresh = function() {
            this.refreshUI();
        }, HeaderRender.prototype.refreshUI = function() {
            var headerDiv = this.getPanel(), table = this.getTable(), frzCols = this.parent.getFrozenColumns();
            remove(this.getTable()), table.removeChild(table.firstChild), table.removeChild(table.childNodes[0]);
            var colGroup = createElement("colgroup"), findHeaderRow = this.createHeaderContent();
            this.rows = findHeaderRow.rows, table.insertBefore(findHeaderRow.thead, table.firstChild), 
            this.updateColGroup(colGroup), table.insertBefore(this.setColGroup(colGroup), table.firstChild), 
            this.setTable(table), this.appendContent(table), this.parent.notify(colGroupRefresh, {}), 
            this.widthService.setWidthToColumns(), frzCols || this.initializeHeaderDrag();
            for (var rows = [].slice.call(headerDiv.querySelectorAll("tr.e-columnheader")), _i = 0, rows_1 = rows; _i < rows_1.length; _i++) {
                var row = rows_1[_i], gCells = [].slice.call(row.querySelectorAll(".e-grouptopleftcell"));
                gCells.length && gCells[gCells.length - 1].classList.add("e-lastgrouptopleftcell");
            }
            frzCols || this.parent.notify(headerRefreshed, {
                rows: this.rows,
                args: {
                    isFrozen: 0 !== this.parent.getFrozenColumns()
                }
            }), this.parent.allowTextWrap && "Header" === this.parent.textWrapSettings.wrapMode && wrap(rows, !0);
        }, HeaderRender.prototype.appendContent = function(table) {
            this.getPanel().firstChild.appendChild(table);
        }, HeaderRender.prototype.getObjDepth = function() {
            for (var max = 0, cols = this.parent.columns, i = 0, len = cols.length; i < len; i++) {
                var depth = this.checkDepth(cols[i], 0);
                max < depth && (max = depth);
            }
            return max + 1;
        }, HeaderRender.prototype.checkDepth = function(col, index) {
            if (col.columns) {
                index++;
                for (var i = 0, len = col.columns.length; i < len; i++) index = this.checkDepth(col.columns[i], index);
            }
            return index;
        }, HeaderRender.prototype.getCellCnt = function(col, cnt) {
            if (col.columns) for (var i = 0, len = col.columns.length; i < len; i++) cnt = this.getCellCnt(col.columns[i], cnt); else col.visible && cnt++;
            return cnt;
        }, HeaderRender.prototype.initializeHeaderDrag = function() {
            var gObj = this.parent;
            if (this.parent.allowReordering || this.parent.allowGrouping && this.parent.groupSettings.showDropArea) for (var headerRows = [].slice.call(gObj.getHeaderContent().querySelectorAll(".e-columnheader")), i = 0, len = headerRows.length; i < len; i++) new Draggable(headerRows[i], {
                dragTarget: ".e-headercell",
                distance: 5,
                helper: this.helper,
                dragStart: this.dragStart,
                drag: this.drag,
                dragStop: this.dragStop,
                abort: ".e-rhandler"
            });
        }, HeaderRender.prototype.initializeHeaderDrop = function() {
            var gObj = this.parent;
            new Droppable(gObj.getHeaderContent(), {
                accept: ".e-dragclone",
                drop: this.drop
            });
        }, HeaderRender;
    }(), CellRenderer = function() {
        function CellRenderer(parent, locator) {
            this.element = createElement("TD", {
                className: "e-rowcell",
                attrs: {
                    role: "gridcell",
                    tabindex: "-1"
                }
            }), this.rowChkBox = createElement("input", {
                className: "e-checkselect",
                attrs: {
                    type: "checkbox"
                }
            }), this.localizer = locator.getService("localization"), this.formatter = locator.getService("valueFormatter"), 
            this.parent = parent;
        }
        return CellRenderer.prototype.getGui = function() {
            return "";
        }, CellRenderer.prototype.format = function(column, value, data) {
            return isNullOrUndefined(column.format) || (value = this.formatter.toView(value, column.getFormatter())), 
            isNullOrUndefined(value) ? "" : value.toString();
        }, CellRenderer.prototype.evaluate = function(node, cell, data, attributes$$1, fData) {
            var result;
            if (cell.column.template) {
                var dummyData = extend({}, data, (_a = {}, _a.foreignKeyData = fData, _a));
                return result = cell.column.getColumnTemplate()(extend({
                    index: attributes$$1.index
                }, dummyData), this.parent, "template"), appendChildren(node, result), node.setAttribute("aria-label", node.innerText + " is template cell column header " + cell.column.headerText), 
                !1;
            }
            return !0;
            var _a;
        }, CellRenderer.prototype.invokeFormatter = function(column, value, data) {
            if (!isNullOrUndefined(column.formatter)) if (function(target, checkFor) {
                return target.prototype && checkFor in target.prototype;
            }(column.formatter, "getValue")) {
                value = new (0, column.formatter)().getValue(column, data);
            } else value = "function" == typeof column.formatter ? column.formatter(column, data) : column.formatter.getValue(column, data);
            return value;
        }, CellRenderer.prototype.render = function(cell, data, attributes$$1) {
            return this.refreshCell(cell, data, attributes$$1);
        }, CellRenderer.prototype.refreshTD = function(td, cell, data, attributes$$1) {
            var node = this.refreshCell(cell, data, attributes$$1);
            td.innerHTML = "";
            for (var _i = 0, elements_1 = [].slice.call(node.childNodes); _i < elements_1.length; _i++) {
                var elem = elements_1[_i];
                td.appendChild(elem);
            }
        }, CellRenderer.prototype.refreshCell = function(cell, data, attributes$$1) {
            var fData, node = this.element.cloneNode(), column = cell.column;
            cell.isForeignKey && (fData = cell.foreignKeyData[0]);
            var innerHtml = this.getGui(), value = cell.isForeignKey ? this.getValue(column.foreignKeyValue, fData, column) : this.getValue(column.field, data, column);
            if ("date" !== column.type || isNullOrUndefined(value) || (value = new Date(value)), 
            value = this.format(column, value, data), innerHtml = value.toString(), "boolean" === column.type) if (column.displayAsCheckBox) node.classList.add("e-checkbox"), 
            innerHtml = '<input type="checkbox" disabled />'; else {
                var localeStr = "true" !== value && "false" !== value ? null : "true" === value ? "True" : "False";
                innerHtml = localeStr ? this.localizer.getConstant(localeStr) : innerHtml;
            }
            var fromFormatter = this.invokeFormatter(column, value, data);
            if (innerHtml = isNullOrUndefined(column.formatter) ? innerHtml : isNullOrUndefined(fromFormatter) ? "" : fromFormatter.toString(), 
            node.setAttribute("aria-label", ("" === innerHtml ? "empty" : innerHtml) + " column header " + cell.column.headerText), 
            isNullOrUndefined(cell.column.headerText) || node.setAttribute("aria-label", innerHtml + " column header " + cell.column.headerText), 
            this.evaluate(node, cell, data, attributes$$1, fData) && "checkbox" !== column.type) this.appendHtml(node, innerHtml, column.getDomSetter ? column.getDomSetter() : "innerHTML"); else if ("checkbox" === column.type) {
                node.classList.add("e-gridchkbox"), node.setAttribute("aria-label", "checkbox");
                var checkWrap = createCheckBox(!1, {
                    checked: value = !!this.parent.selectionSettings.persistSelection && "true" === value,
                    label: " "
                });
                checkWrap.insertBefore(this.rowChkBox.cloneNode(), checkWrap.firstChild), node.appendChild(checkWrap);
            }
            if ("Check" === this.parent.checkAllRows && this.parent.enableVirtualization && (cell.isSelected = !0), 
            this.setAttributes(node, cell, attributes$$1), "boolean" === column.type) {
                var obj = new CheckBox({
                    disabled: !0,
                    checked: isNaN(parseInt(value, 10)) ? "true" === value : parseInt(value, 10) > 0
                });
                obj.appendTo(node.firstElementChild), node.setAttribute("aria-label", obj.checked + " column header " + cell.column.headerText);
            }
            return node;
        }, CellRenderer.prototype.appendHtml = function(node, innerHtml, property) {
            return void 0 === property && (property = "innerHTML"), node[property] = innerHtml, 
            node;
        }, CellRenderer.prototype.setAttributes = function(node, cell, attributes$$1) {
            var column = cell.column;
            this.buildAttributeFromCell(node, cell, "checkbox" === column.type), setStyleAndAttributes(node, attributes$$1), 
            setStyleAndAttributes(node, cell.attributes), column.customAttributes && setStyleAndAttributes(node, column.customAttributes), 
            column.textAlign && (node.style.textAlign = column.textAlign), "Clip" === column.clipMode ? node.classList.add("e-gridclip") : "EllipsisWithTooltip" === column.clipMode && node.classList.add("e-ellipsistooltip");
        }, CellRenderer.prototype.buildAttributeFromCell = function(node, cell, isCheckBoxType) {
            var attr = {}, classes = [];
            cell.colSpan && (attr.colSpan = cell.colSpan), cell.rowSpan && (attr.rowSpan = cell.rowSpan), 
            cell.isTemplate && classes.push("e-templatecell"), cell.isSelected && (classes.push.apply(classes, [ "e-selectionbackground", "e-active" ]), 
            isCheckBoxType && node.querySelector(".e-frame").classList.add("e-check")), isNullOrUndefined(cell.index) || (attr["aria-colindex"] = cell.index), 
            cell.visible || classes.push("e-hide"), attr.class = classes, setStyleAndAttributes(node, attr);
        }, CellRenderer.prototype.getValue = function(field, data, column) {
            return column.valueAccessor(field, data, column);
        }, CellRenderer;
    }(), AriaService = function() {
        function AriaService() {}
        return AriaService.prototype.setOptions = function(target, options) {
            Object.keys(options).forEach(function(name) {
                return setStateAndProperties(target, config[name], options[name]);
            });
        }, AriaService.prototype.setExpand = function(target, expand) {
            setStateAndProperties(target, config.expand, expand);
        }, AriaService.prototype.setSort = function(target, direction) {
            setStateAndProperties(target, config.sort, direction, "boolean" == typeof direction);
        }, AriaService.prototype.setBusy = function(target, isBusy) {
            setStateAndProperties(target, config.busy, isBusy), setStateAndProperties(target, config.invalid, null, !0);
        }, AriaService.prototype.setGrabbed = function(target, isGrabbed, remove) {
            setStateAndProperties(target, config.grabbed, isGrabbed, remove);
        }, AriaService.prototype.setDropTarget = function(target, isTarget) {
            setStateAndProperties(target, config.dropeffect, "copy", !isTarget);
        }, AriaService;
    }(), config = {
        expand: "aria-expanded",
        role: "role",
        selected: "aria-selected",
        multiselectable: "aria-multiselectable",
        sort: "aria-sort",
        busy: "aria-busy",
        invalid: "aria-invalid",
        grabbed: "aria-grabbed",
        dropeffect: "aria-dropeffect",
        haspopup: "aria-haspopup",
        level: "aria-level",
        colcount: "aria-colcount"
    }, __extends$114 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), HeaderCellRenderer = function(_super) {
        function HeaderCellRenderer() {
            var _this = null !== _super && _super.apply(this, arguments) || this;
            return _this.element = createElement("TH", {
                className: "e-headercell",
                attrs: {
                    role: "columnheader",
                    tabindex: "-1"
                }
            }), _this.ariaService = new AriaService(), _this.hTxtEle = createElement("span", {
                className: "e-headertext"
            }), _this.sortEle = createElement("div", {
                className: "e-sortfilterdiv e-icons"
            }), _this.gui = createElement("div"), _this.chkAllBox = createElement("input", {
                className: "e-checkselectall",
                attrs: {
                    type: "checkbox"
                }
            }), _this;
        }
        return __extends$114(HeaderCellRenderer, _super), HeaderCellRenderer.prototype.getGui = function() {
            return this.gui.cloneNode();
        }, HeaderCellRenderer.prototype.render = function(cell, data, attributes$$1) {
            var node = this.element.cloneNode(), fltrMenuEle = createElement("div", {
                className: "e-filtermenudiv e-icons e-icon-filter"
            });
            return this.prepareHeader(cell, node, fltrMenuEle);
        }, HeaderCellRenderer.prototype.refresh = function(cell, node) {
            this.clean(node);
            var fltrMenuEle = createElement("div", {
                className: "e-filtermenudiv e-icons e-icon-filter"
            });
            return this.prepareHeader(cell, node, fltrMenuEle);
        }, HeaderCellRenderer.prototype.clean = function(node) {
            node.innerHTML = "";
        }, HeaderCellRenderer.prototype.prepareHeader = function(cell, node, fltrMenuEle) {
            var column = cell.column, ariaAttr = {}, innerDIV = this.getGui();
            if (attributes(innerDIV, {
                "e-mappinguid": column.uid,
                class: "e-headercelldiv"
            }), "checkbox" !== column.type) {
                var value = column.headerText, headerText = this.hTxtEle.cloneNode();
                headerText[column.getDomSetter()] = value, innerDIV.appendChild(headerText);
            } else {
                column.editType = "booleanedit";
                var checkAllWrap = createCheckBox(!1, {
                    checked: !1,
                    label: " "
                });
                checkAllWrap.insertBefore(this.chkAllBox.cloneNode(), checkAllWrap.firstChild), 
                innerDIV.appendChild(checkAllWrap), innerDIV.classList.add("e-headerchkcelldiv");
            }
            if (this.buildAttributeFromCell(node, cell), this.appendHtml(node, innerDIV), node.appendChild(this.sortEle.cloneNode()), 
            this.parent.allowFiltering && "FilterBar" !== this.parent.filterSettings.type && column.allowFiltering && !isNullOrUndefined(column.field) && (!this.parent.showColumnMenu || !column.showColumnMenu)) {
                attributes(fltrMenuEle, {
                    "e-mappinguid": "e-flmenu-" + column.uid
                }), node.classList.add("e-fltr-icon");
                var matchFlColumns = [];
                if (this.parent.filterSettings.columns.length && this.parent.filterSettings.columns.length !== matchFlColumns.length) for (var index = 0; index < this.parent.columns.length; index++) for (var count = 0; count < this.parent.filterSettings.columns.length; count++) if (this.parent.filterSettings.columns[count].field === column.field) {
                    fltrMenuEle.classList.add("e-filtered"), matchFlColumns.push(column.field);
                    break;
                }
                node.appendChild(fltrMenuEle.cloneNode());
            }
            cell.className && node.classList.add(cell.className), column.customAttributes && setStyleAndAttributes(node, column.customAttributes), 
            column.allowSorting && (ariaAttr.sort = "none"), column.allowGrouping && (ariaAttr.grabbed = !1), 
            node = this.extendPrepareHeader(column, node);
            var gridObj = this.parent, colIndex = gridObj.getColumnIndexByField(column.field);
            if (isNullOrUndefined(column.headerTemplate) || ("object" != typeof column.headerTemplate && -1 !== column.headerTemplate.indexOf("#") ? innerDIV.innerHTML = document.querySelector(column.headerTemplate).innerHTML.trim() : appendChildren(node, column.getHeaderTemplate()(extend({
                index: colIndex
            }, column), gridObj, "headerTemplate"))), this.ariaService.setOptions(node, ariaAttr), 
            !isNullOrUndefined(column.headerTextAlign) || !isNullOrUndefined(column.textAlign)) {
                var alignment = column.headerTextAlign || column.textAlign;
                innerDIV.style.textAlign = alignment, "Right" === alignment || "Left" === alignment ? node.classList.add("Right" === alignment ? "e-rightalign" : "e-leftalign") : "Center" === alignment && node.classList.add("e-centeralign");
            }
            return "Clip" === column.clipMode ? node.classList.add("e-gridclip") : "EllipsisWithTooltip" === column.clipMode && node.classList.add("e-ellipsistooltip"), 
            node.setAttribute("aria-rowspan", (isNullOrUndefined(cell.rowSpan) ? 1 : cell.rowSpan).toString()), 
            node.setAttribute("aria-colspan", "1"), node;
        }, HeaderCellRenderer.prototype.extendPrepareHeader = function(column, node) {
            if (this.parent.showColumnMenu && column.showColumnMenu && !isNullOrUndefined(column.field)) {
                var element = createElement("div", {
                    className: "e-icons e-columnmenu"
                }), matchFilteredColumns = [];
                if (this.parent.filterSettings.columns.length && this.parent.filterSettings.columns.length !== matchFilteredColumns.length) for (var i = 0; i < this.parent.columns.length; i++) for (var j = 0; j < this.parent.filterSettings.columns.length; j++) if (this.parent.filterSettings.columns[j].field === column.field) {
                    element.classList.add("e-filtered"), matchFilteredColumns.push(column.field);
                    break;
                }
                node.classList.add("e-fltr-icon"), node.appendChild(element);
            }
            if (this.parent.allowResizing) {
                var handler = createElement("div");
                handler.className = column.allowResizing ? "e-rhandler e-rcursor" : "e-rsuppress", 
                node.appendChild(handler);
            }
            return node;
        }, HeaderCellRenderer.prototype.appendHtml = function(node, innerHtml) {
            return node.appendChild(innerHtml), node;
        }, HeaderCellRenderer;
    }(CellRenderer), __extends$115 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), StackedHeaderCellRenderer = function(_super) {
        function StackedHeaderCellRenderer() {
            var _this = null !== _super && _super.apply(this, arguments) || this;
            return _this.element = createElement("TH", {
                className: "e-headercell e-stackedheadercell",
                attrs: {
                    role: "columnheader",
                    tabindex: "-1"
                }
            }), _this;
        }
        return __extends$115(StackedHeaderCellRenderer, _super), StackedHeaderCellRenderer.prototype.render = function(cell, data, attributes$$1) {
            var node = this.element.cloneNode(), div = createElement("div", {
                className: "e-stackedheadercelldiv"
            });
            return node.appendChild(div), div.innerHTML = cell.column.headerText, cell.column.toolTip && node.setAttribute("title", cell.column.toolTip), 
            isNullOrUndefined(cell.column.textAlign) || (div.style.textAlign = cell.column.textAlign), 
            node.setAttribute("colspan", cell.colSpan.toString()), node.setAttribute("aria-colspan", cell.colSpan.toString()), 
            node.setAttribute("aria-rowspan", "1"), node;
        }, StackedHeaderCellRenderer;
    }(CellRenderer), __extends$116 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), IndentCellRenderer = function(_super) {
        function IndentCellRenderer() {
            var _this = null !== _super && _super.apply(this, arguments) || this;
            return _this.element = createElement("TD", {
                className: "e-indentcell"
            }), _this;
        }
        return __extends$116(IndentCellRenderer, _super), IndentCellRenderer.prototype.render = function(cell, data) {
            var node = this.element.cloneNode();
            return setStyleAndAttributes(node, cell.attributes), node;
        }, IndentCellRenderer;
    }(CellRenderer), __extends$117 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), GroupCaptionCellRenderer = function(_super) {
        function GroupCaptionCellRenderer() {
            var _this = null !== _super && _super.apply(this, arguments) || this;
            return _this.element = createElement("TD", {
                className: "e-groupcaption",
                attrs: {
                    role: "gridcell",
                    tabindex: "-1"
                }
            }), _this;
        }
        return __extends$117(GroupCaptionCellRenderer, _super), GroupCaptionCellRenderer.prototype.render = function(cell, data) {
            var fKeyValue, node = this.element.cloneNode(), gObj = this.parent;
            cell.isForeignKey && (fKeyValue = this.format(cell.column, cell.column.valueAccessor("foreignKey", data, cell.column)));
            var value = cell.isForeignKey ? fKeyValue : cell.column.enableGroupByFormat ? data.key : this.format(cell.column, cell.column.valueAccessor("key", data, cell.column));
            return isNullOrUndefined(gObj.groupSettings.captionTemplate) ? node.innerHTML = cell.column.headerText + ": " + value + " - " + data.count + " " + (data.count < 2 ? this.localizer.getConstant("Item") : this.localizer.getConstant("Items")) : appendChildren(node, -1 !== gObj.groupSettings.captionTemplate.indexOf("#") ? templateCompiler(document.querySelector(gObj.groupSettings.captionTemplate).innerHTML.trim())(data) : templateCompiler(gObj.groupSettings.captionTemplate)(data)), 
            node.setAttribute("colspan", cell.colSpan.toString()), node.setAttribute("aria-label", node.innerHTML + " is groupcaption cell"), 
            node.setAttribute("title", node.innerHTML), node;
        }, GroupCaptionCellRenderer;
    }(CellRenderer), GroupCaptionEmptyCellRenderer = function(_super) {
        function GroupCaptionEmptyCellRenderer() {
            var _this = null !== _super && _super.apply(this, arguments) || this;
            return _this.element = createElement("TD", {
                className: "e-groupcaption"
            }), _this;
        }
        return __extends$117(GroupCaptionEmptyCellRenderer, _super), GroupCaptionEmptyCellRenderer.prototype.render = function(cell, data) {
            var node = this.element.cloneNode();
            return node.innerHTML = "&nbsp;", node.setAttribute("colspan", cell.colSpan.toString()), 
            node;
        }, GroupCaptionEmptyCellRenderer;
    }(CellRenderer), __extends$118 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), ExpandCellRenderer = function(_super) {
        function ExpandCellRenderer() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$118(ExpandCellRenderer, _super), ExpandCellRenderer.prototype.render = function(cell, data) {
            var node = this.element.cloneNode();
            return node.className = "e-recordplusexpand", node.setAttribute("ej-mappingname", data.field), 
            node.setAttribute("ej-mappingvalue", data.key), node.setAttribute("aria-expanded", "true"), 
            node.setAttribute("tabindex", "-1"), node.appendChild(createElement("div", {
                className: "e-icons e-gdiagonaldown e-icon-gdownarrow"
            })), node;
        }, ExpandCellRenderer;
    }(IndentCellRenderer), __extends$119 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), HeaderIndentCellRenderer = function(_super) {
        function HeaderIndentCellRenderer() {
            var _this = null !== _super && _super.apply(this, arguments) || this;
            return _this.element = createElement("TH", {
                className: "e-grouptopleftcell"
            }), _this;
        }
        return __extends$119(HeaderIndentCellRenderer, _super), HeaderIndentCellRenderer.prototype.render = function(cell, data) {
            var node = this.element.cloneNode();
            return node.appendChild(createElement("div", {
                className: "e-headercelldiv e-emptycell",
                innerHTML: "&nbsp;"
            })), node;
        }, HeaderIndentCellRenderer;
    }(CellRenderer), __extends$120 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), DetailHeaderIndentCellRenderer = function(_super) {
        function DetailHeaderIndentCellRenderer() {
            var _this = null !== _super && _super.apply(this, arguments) || this;
            return _this.element = createElement("TH", {
                className: "e-detailheadercell"
            }), _this;
        }
        return __extends$120(DetailHeaderIndentCellRenderer, _super), DetailHeaderIndentCellRenderer.prototype.render = function(cell, data) {
            var node = this.element.cloneNode();
            return node.appendChild(createElement("div", {
                className: "e-emptycell"
            })), node;
        }, DetailHeaderIndentCellRenderer;
    }(CellRenderer), __extends$121 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), DetailExpandCellRenderer = function(_super) {
        function DetailExpandCellRenderer() {
            var _this = null !== _super && _super.apply(this, arguments) || this;
            return _this.element = createElement("TD", {
                className: "e-detailrowcollapse",
                attrs: {
                    "aria-expanded": "false",
                    role: "gridcell",
                    tabindex: "-1"
                }
            }), _this;
        }
        return __extends$121(DetailExpandCellRenderer, _super), DetailExpandCellRenderer.prototype.render = function(cell, data, attributes$$1) {
            var node = this.element.cloneNode();
            return attributes$$1 && !isNullOrUndefined(attributes$$1.class) ? (node.className = "", 
            node.className = attributes$$1.class, node.appendChild(createElement("div", {
                className: "e-icons e-dtdiagonaldown e-icon-gdownarrow"
            }))) : node.appendChild(createElement("div", {
                className: "e-icons e-dtdiagonalright e-icon-grightarrow"
            })), node;
        }, DetailExpandCellRenderer;
    }(CellRenderer), Render = function() {
        function Render(parent, locator) {
            this.emptyGrid = !1, this.parent = parent, this.locator = locator, this.data = new Data$1(parent, locator), 
            this.l10n = locator.getService("localization"), this.ariaService = this.locator.getService("ariaService"), 
            this.renderer = this.locator.getService("rendererFactory"), this.addEventListener();
        }
        return Render.prototype.render = function() {
            var gObj = this.parent;
            this.headerRenderer = this.renderer.getRenderer(RenderType.Header), this.contentRenderer = this.renderer.getRenderer(RenderType.Content), 
            this.headerRenderer.renderPanel(), this.contentRenderer.renderPanel(), gObj.getColumns().length && (this.headerRenderer.renderTable(), 
            this.contentRenderer.renderTable(), this.emptyRow(!1)), this.refreshDataManager();
        }, Render.prototype.refresh = function(e) {
            void 0 === e && (e = {
                requestType: "refresh"
            }), this.parent.notify(e.requestType + "-begin", e), this.parent.trigger(actionBegin, e), 
            e.cancel || this.refreshDataManager(e);
        }, Render.prototype.refreshComplete = function(e) {
            this.parent.trigger(actionComplete, e);
        }, Render.prototype.refreshDataManager = function(args) {
            var _this = this;
            void 0 === args && (args = {}), "virtualscroll" !== args.requestType && this.parent.showSpinner(), 
            this.parent.isEdit = !1, this.emptyGrid = !1;
            var dataManager, isFActon = this.isNeedForeignAction();
            if (this.ariaService.setBusy(this.parent.getContent().firstChild, !0), isFActon) {
                var deffered = new Deferred();
                dataManager = this.getFData(deffered);
            }
            if (dataManager = dataManager ? dataManager.then(function(e) {
                var query = _this.data.generateQuery().requiresCount();
                if (_this.emptyGrid) {
                    var def = new Deferred();
                    return def.resolve({
                        result: [],
                        count: 0
                    }), def.promise;
                }
                return _this.data.getData(args, query);
            }).catch(function(e) {
                return _this.parent.trigger("actionFailure", e), e;
            }) : this.data.getData(args, this.data.generateQuery().requiresCount()).catch(function(e) {
                return _this.parent.trigger("actionFailure", e), e;
            }), this.parent.getForeignKeyColumns().length && (!isFActon || this.parent.searchSettings.key.length)) {
                var deffered_1 = new Deferred();
                dataManager = dataManager.then(function(e) {
                    return _this.parent.notify("getForeignKeyData", {
                        dataManager: dataManager,
                        result: e,
                        promise: deffered_1
                    }), deffered_1.promise;
                });
            }
            this.parent.groupSettings.disablePageWiseAggregates && this.parent.groupSettings.columns.length && (dataManager = dataManager.then(function(e) {
                return _this.validateGroupRecords(e);
            })), dataManager.then(function(e) {
                return _this.dataManagerSuccess(e, args);
            }).catch(function(e) {
                return _this.dataManagerFailure(e);
            });
        }, Render.prototype.getFData = function(deferred) {
            return this.parent.notify("getForeignKeyData", {
                isComplex: !0,
                promise: deferred
            }), deferred.promise;
        }, Render.prototype.isNeedForeignAction = function() {
            var gObj = this.parent;
            return !!(gObj.allowFiltering && gObj.filterSettings.columns.length || gObj.searchSettings.key.length) && this.foreignKey(this.parent.getForeignKeyColumns());
        }, Render.prototype.foreignKey = function(columns) {
            var _this = this;
            return columns.some(function(col) {
                return !(!_this.parent.filterSettings.columns.some(function(value) {
                    return col.foreignKeyValue === value.field;
                }) && !_this.parent.searchSettings.key.length);
            });
        }, Render.prototype.sendBulkRequest = function(args) {
            var _this = this, promise = this.data.saveChanges(args.changes, this.parent.getPrimaryKeyFieldNames()[0]);
            this.data.dataManager.dataSource.offline ? this.refreshDataManager({
                requestType: "batchsave"
            }) : promise.then(function(e) {
                return _this.dmSuccess(e, args);
            }).catch(function(e) {
                return _this.dmFailure(e);
            });
        }, Render.prototype.dmSuccess = function(e, args) {
            this.dataManagerSuccess(e, args);
        }, Render.prototype.dmFailure = function(e) {
            this.dataManagerFailure(e);
        }, Render.prototype.renderEmptyRow = function() {
            this.emptyRow(!0);
        }, Render.prototype.emptyRow = function(isTrigger) {
            var tr, gObj = this.parent, tbody = this.contentRenderer.getTable().querySelector("tbody");
            remove(tbody), tbody = createElement("tbody"), (tr = createElement("tr", {
                className: "e-emptyrow"
            })).appendChild(createElement("td", {
                innerHTML: this.l10n.getConstant("EmptyRecord"),
                attrs: {
                    colspan: gObj.getColumns().length.toString()
                }
            })), tbody.appendChild(tr), this.contentRenderer.renderEmpty(tbody), isTrigger && (this.parent.trigger(dataBound, {}), 
            this.parent.notify(onEmpty, {
                rows: [ new Row$1({
                    isDataRow: !0,
                    cells: [ new Cell({
                        isDataCell: !0,
                        visible: !0
                    }) ]
                }) ]
            }));
        }, Render.prototype.updateColumnType = function(record) {
            for (var value, columns = this.parent.getColumns(), data = record && record.items ? record.items[0] : record, fmtr = this.locator.getService("valueFormatter"), i = 0, len = columns.length; i < len; i++) {
                isNullOrUndefined(value = columns[i].isForeignColumn() ? getValue(columns[i].foreignKeyValue || "", columns[i].columnData[0]) : getValue(columns[i].field || "", data)) ? columns[i].type = columns[i].type || null : (this.isColTypeDef = !0, 
                columns[i].type || (columns[i].type = value.getDay ? value.getHours() > 0 || value.getMinutes() > 0 || value.getSeconds() > 0 || value.getMilliseconds() > 0 ? "datetime" : "date" : typeof value));
                var valueFormatter = new ValueFormatter();
                columns[i].format && (columns[i].format.skeleton || columns[i].format.format) && (columns[i].setFormatter(valueFormatter.getFormatFunction(columns[i].format)), 
                columns[i].setParser(valueFormatter.getParserFunction(columns[i].format))), "string" == typeof columns[i].format ? setFormatter(this.locator, columns[i]) : columns[i].format || "number" !== columns[i].type || columns[i].setParser(fmtr.getParserFunction({
                    format: "n2"
                }));
            }
        }, Render.prototype.dataManagerSuccess = function(e, args) {
            var gObj = this.parent;
            gObj.trigger("beforeDataBound", e);
            var len = Object.keys(e.result).length;
            if (!this.parent.isDestroyed) {
                if (this.parent.notify("tooltip-destroy", {}), gObj.currentViewData = e.result, 
                !len && e.count && gObj.allowPaging) return gObj.pageSettings.totalRecordsCount = e.count, 
                gObj.pageSettings.currentPage = Math.ceil(e.count / gObj.pageSettings.pageSize), 
                void gObj.dataBind();
                if (!gObj.getColumns().length && len && this.updatesOnInitialRender(e), !this.isColTypeDef && gObj.getCurrentViewRecords() && this.updateColumnType(gObj.getCurrentViewRecords()[0]), 
                this.parent.notify(dataReady, extend({
                    count: e.count,
                    result: e.result,
                    aggregates: e.aggregates
                }, args)), (gObj.groupSettings.columns.length || args && "ungrouping" === args.requestType) && this.headerRenderer.refreshUI(), 
                len) this.contentRenderer.refreshContentRows(args); else {
                    if (!gObj.getColumns().length) return gObj.element.innerHTML = "", void alert(this.l10n.getConstant("EmptyDataSourceError"));
                    if (this.contentRenderer.setRowElements([]), this.renderEmptyRow(), args) {
                        var action = (args.requestType || "").toLowerCase() + "-complete";
                        this.parent.notify(action, args);
                    }
                    this.parent.hideSpinner();
                }
                this.parent.notify("toolbar-refresh", {});
            }
        }, Render.prototype.dataManagerFailure = function(e) {
            this.ariaService.setOptions(this.parent.getContent().firstChild, {
                busy: !1,
                invalid: !0
            }), this.parent.trigger("actionFailure", {
                error: e
            }), this.parent.currentViewData = [], this.renderEmptyRow(), this.parent.hideSpinner();
        }, Render.prototype.updatesOnInitialRender = function(e) {
            this.buildColumns(e.result[0]), prepareColumns(this.parent.columns), this.headerRenderer.renderTable(), 
            this.contentRenderer.renderTable(), this.parent.notify("auto-col", {});
        }, Render.prototype.buildColumns = function(record) {
            for (var columns = Object.keys(record), cols = [], i = 0, len = columns.length; i < len; i++) cols[i] = {
                field: columns[i]
            }, this.parent.enableColumnVirtualization && (cols[i].width = isNullOrUndefined(cols[i].width) ? 200 : cols[i].width);
            this.parent.columns = cols;
        }, Render.prototype.instantiateRenderer = function() {
            this.renderer.addRenderer(RenderType.Header, new HeaderRender(this.parent, this.locator)), 
            this.renderer.addRenderer(RenderType.Content, new ContentRender(this.parent, this.locator));
            var cellrender = this.locator.getService("cellRendererFactory");
            cellrender.addCellRenderer(CellType.Header, new HeaderCellRenderer(this.parent, this.locator)), 
            cellrender.addCellRenderer(CellType.Data, new CellRenderer(this.parent, this.locator)), 
            cellrender.addCellRenderer(CellType.StackedHeader, new StackedHeaderCellRenderer(this.parent, this.locator)), 
            cellrender.addCellRenderer(CellType.Indent, new IndentCellRenderer(this.parent, this.locator)), 
            cellrender.addCellRenderer(CellType.GroupCaption, new GroupCaptionCellRenderer(this.parent, this.locator)), 
            cellrender.addCellRenderer(CellType.GroupCaptionEmpty, new GroupCaptionEmptyCellRenderer(this.parent, this.locator)), 
            cellrender.addCellRenderer(CellType.Expand, new ExpandCellRenderer(this.parent, this.locator)), 
            cellrender.addCellRenderer(CellType.HeaderIndent, new HeaderIndentCellRenderer(this.parent, this.locator)), 
            cellrender.addCellRenderer(CellType.StackedHeader, new StackedHeaderCellRenderer(this.parent, this.locator)), 
            cellrender.addCellRenderer(CellType.DetailHeader, new DetailHeaderIndentCellRenderer(this.parent, this.locator)), 
            cellrender.addCellRenderer(CellType.DetailExpand, new DetailExpandCellRenderer(this.parent, this.locator));
        }, Render.prototype.addEventListener = function() {
            var _this = this;
            this.parent.isDestroyed || (this.parent.on(initialLoad, this.instantiateRenderer, this), 
            this.parent.on(modelChanged, this.refresh, this), this.parent.on("refresh-complete", this.refreshComplete, this), 
            this.parent.on("bulk-save", this.sendBulkRequest, this), this.parent.on("showEmptyGrid", function() {
                _this.emptyGrid = !0;
            }, this));
        }, Render.prototype.validateGroupRecords = function(e) {
            var _this = this, index = e.result.length - 1;
            if (index < 0) return Promise.resolve(e);
            var group0 = e.result[0], groupN = e.result[index], predicate = [], addWhere = function(input) {
                [ group0, groupN ].forEach(function(group) {
                    return predicate.push(new Predicate("field", "==", group.field).and(_this.getPredicate("key", "equal", group.key)));
                }), input.where(Predicate.or(predicate));
            }, query = new Query();
            addWhere(query);
            var curFilter = new DataManager(e.result).executeLocal(query), newQuery = this.data.generateQuery(!0), rPredicate = [];
            this.data.isRemote() ? ([ group0, groupN ].forEach(function(group) {
                return rPredicate.push(_this.getPredicate(group.field, "equal", group.key));
            }), newQuery.where(Predicate.or(rPredicate))) : addWhere(newQuery);
            var deferred = new Deferred();
            return this.data.getData({}, newQuery).then(function(r) {
                _this.updateGroupInfo(curFilter, r.result), deferred.resolve(e);
            }).catch(function(e) {
                return deferred.reject(e);
            }), deferred.promise;
        }, Render.prototype.getPredicate = function(key, operator, value) {
            return value instanceof Date ? getDatePredicate({
                field: key,
                operator: operator,
                value: value
            }) : new Predicate(key, operator, value);
        }, Render.prototype.updateGroupInfo = function(current, untouched) {
            var _this = this, dm = new DataManager(untouched);
            return current.forEach(function(element, index, array) {
                var uGroup = dm.executeLocal(new Query().where(new Predicate("field", "==", element.field).and(_this.getPredicate("key", "equal", element.key))))[0];
                element.count = uGroup.count;
                var itemGroup = element.items, uGroupItem = uGroup.items;
                itemGroup.GroupGuid && (element.items = _this.updateGroupInfo(element.items, uGroup.items)), 
                _this.parent.aggregates.forEach(function(row) {
                    return row.columns.forEach(function(column) {
                        (column.type instanceof Array ? column.type : [ column.type ]).forEach(function(type) {
                            var key = column.field + " - " + type;
                            element.aggregates[key] = calculateAggregate(type, itemGroup.level ? uGroupItem.records : uGroup.items, column);
                        });
                    });
                });
            }), current;
        }, Render;
    }(), CellRendererFactory = function() {
        function CellRendererFactory() {
            this.cellRenderMap = {};
        }
        return CellRendererFactory.prototype.addCellRenderer = function(name, type) {
            name = "string" == typeof name ? name : getEnumValue(CellType, name), isNullOrUndefined(this.cellRenderMap[name]) && (this.cellRenderMap[name] = type);
        }, CellRendererFactory.prototype.getCellRenderer = function(name) {
            if (name = "string" == typeof name ? name : getEnumValue(CellType, name), isNullOrUndefined(this.cellRenderMap[name])) throw "The cellRenderer " + name + " is not found";
            return this.cellRenderMap[name];
        }, CellRendererFactory;
    }(), ServiceLocator = function() {
        function ServiceLocator() {
            this.services = {};
        }
        return ServiceLocator.prototype.register = function(name, type) {
            isNullOrUndefined(this.services[name]) && (this.services[name] = type);
        }, ServiceLocator.prototype.getService = function(name) {
            if (isNullOrUndefined(this.services[name])) throw "The service " + name + " is not registered";
            return this.services[name];
        }, ServiceLocator;
    }(), RendererFactory = function() {
        function RendererFactory() {
            this.rendererMap = {};
        }
        return RendererFactory.prototype.addRenderer = function(name, type) {
            var rName = getEnumValue(RenderType, name);
            isNullOrUndefined(this.rendererMap[rName]) && (this.rendererMap[rName] = type);
        }, RendererFactory.prototype.getRenderer = function(name) {
            var rName = getEnumValue(RenderType, name);
            if (isNullOrUndefined(this.rendererMap[rName])) throw "The renderer " + rName + " is not found";
            return this.rendererMap[rName];
        }, RendererFactory;
    }(), ColumnWidthService = function() {
        function ColumnWidthService(parent) {
            this.parent = parent;
        }
        return ColumnWidthService.prototype.setWidthToColumns = function() {
            var _this = this, i = 0, indexes = this.parent.getColumnIndexesInView(), wFlag = !0;
            if (this.parent.allowGrouping) for (var len = this.parent.groupSettings.columns.length; i < len; i++) this.parent.enableColumnVirtualization && -1 === indexes.indexOf(i) ? wFlag = !1 : this.setColumnWidth(new Column({
                width: "30px"
            }), i);
            (this.parent.detailTemplate || this.parent.childGrid) && this.setColumnWidth(new Column({
                width: "30px"
            }), i), this.parent.getColumns().forEach(function(column, index) {
                _this.setColumnWidth(column, wFlag ? void 0 : index);
            });
        }, ColumnWidthService.prototype.setColumnWidth = function(column, index, module) {
            var columnIndex = isNullOrUndefined(index) ? this.parent.getNormalizedColumnIndex(column.uid) : index, cWidth = this.getWidth(column);
            null !== cWidth && (this.setWidth(cWidth, columnIndex), (this.parent.allowResizing && "resize" === module || this.parent.getFrozenColumns() && this.parent.allowResizing) && this.setWidthToTable(), 
            this.parent.notify(columnWidthChanged, {
                index: columnIndex,
                width: cWidth,
                column: column,
                module: module
            }));
        }, ColumnWidthService.prototype.setWidth = function(width, index) {
            var headerCol, header = this.parent.getHeaderTable(), content = this.parent.getContentTable(), fWidth = formatUnit(width), frzCols = this.parent.getFrozenColumns(), mHdr = this.parent.getHeaderContent().querySelector(".e-movableheader");
            (headerCol = frzCols && index >= frzCols && mHdr && mHdr.querySelector("colgroup") ? mHdr.querySelector("colgroup").children[index - frzCols] : header.querySelector("colgroup").children[index]) && (headerCol.style.width = fWidth);
            var contentCol;
            (contentCol = frzCols && index >= frzCols ? this.parent.getContent().querySelector(".e-movablecontent").querySelector("colgroup").children[index - frzCols] : content.querySelector("colgroup").children[index]) && (contentCol.style.width = fWidth);
            var edit = content.querySelector(".e-table.e-inline-edit");
            edit && (edit.querySelector("colgroup").children[index].style.width = fWidth);
        }, ColumnWidthService.prototype.getSiblingsHeight = function(element) {
            return this.getHeightFromDirection(element, "previous") + this.getHeightFromDirection(element, "next");
        }, ColumnWidthService.prototype.getHeightFromDirection = function(element, direction) {
            for (var sibling = element[direction + "ElementSibling"], result = 0, classList$$1 = [ "e-gridheader", "e-gridfooter", "e-groupdroparea", "e-gridpager", "e-toolbar" ]; sibling; ) classList$$1.some(function(value) {
                return sibling.classList.contains(value);
            }) && (result += sibling.offsetHeight), sibling = sibling[direction + "ElementSibling"];
            return result;
        }, ColumnWidthService.prototype.getWidth = function(column) {
            if (isNullOrUndefined(column.width) && this.parent.allowResizing && (column.width = 200), 
            !column.width) return null;
            var width = parseInt(column.width.toString(), 10);
            return column.minWidth && width < parseInt(column.minWidth.toString(), 10) ? column.minWidth : column.maxWidth && width > parseInt(column.maxWidth.toString(), 10) ? column.maxWidth : column.width;
        }, ColumnWidthService.prototype.getTableWidth = function(columns) {
            for (var tWidth = 0, _i = 0, columns_1 = columns; _i < columns_1.length; _i++) {
                var column = columns_1[_i], cWidth = this.getWidth(column);
                !1 !== column.visible && null !== cWidth && (tWidth += parseInt(cWidth.toString(), 10));
            }
            return tWidth;
        }, ColumnWidthService.prototype.setWidthToFrozenTable = function() {
            var columns = this.parent.getColumns();
            columns.splice(this.parent.getFrozenColumns(), columns.length);
            var freezeWidth = formatUnit(this.getTableWidth(columns));
            this.parent.getHeaderTable().style.width = freezeWidth, this.parent.getContentTable().style.width = freezeWidth;
        }, ColumnWidthService.prototype.setWidthToMovableTable = function() {
            var columns = this.parent.getColumns();
            columns.splice(0, this.parent.getFrozenColumns());
            var movableWidth = formatUnit(this.getTableWidth(columns));
            this.parent.getHeaderContent().querySelector(".e-movableheader").firstElementChild && (this.parent.getHeaderContent().querySelector(".e-movableheader").firstElementChild.style.width = movableWidth), 
            this.parent.getContent().querySelector(".e-movablecontent").firstElementChild.style.width = movableWidth;
        }, ColumnWidthService.prototype.setWidthToTable = function() {
            var tWidth = formatUnit(this.getTableWidth(this.parent.getColumns()));
            this.parent.getFrozenColumns() ? (this.setWidthToFrozenTable(), this.setWidthToMovableTable()) : (this.parent.getHeaderTable().style.width = tWidth, 
            this.parent.getContentTable().style.width = tWidth);
            var edit = this.parent.element.querySelector(".e-table.e-inline-edit");
            edit && (edit.style.width = tWidth);
        }, ColumnWidthService;
    }(), __extends$122 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), FocusStrategy = function() {
        function FocusStrategy(parent) {
            this.currentInfo = {}, this.oneTime = !0, this.swap = {}, this.forget = !0, this.skipFocus = !0, 
            this.focusByClick = !1, this.prevIndexes = {}, this.parent = parent, this.addEventListener();
        }
        return FocusStrategy.prototype.focusCheck = function(e) {
            var target = e.target;
            this.focusByClick = !0, this.skipFocus = target.classList.contains("e-grid");
        }, FocusStrategy.prototype.onFocus = function() {
            if (!(this.parent.isDestroyed || Browser.isDevice || this.parent.enableVirtualization)) {
                this.setActive(0 === this.parent.frozenRows, 0 !== this.parent.frozenColumns);
                var current = this.getContent().matrix.get(0, -1, [ 0, 1 ], null, this.getContent().validator());
                this.getContent().matrix.select(current[0], current[1]), this.skipFocus && (this.focus(), 
                this.skipFocus = !1);
            }
        }, FocusStrategy.prototype.passiveFocus = function(e) {
            this.parent.isDestroyed || e.target && e.target.classList.contains("e-detailcell") && (this.currentInfo.skipAction = !1, 
            addClass([ this.currentInfo.element ], [ "e-focused", "e-focus" ]));
        }, FocusStrategy.prototype.onBlur = function(e) {
            this.parent.isEdit || e && (!e.relatedTarget || closest(e.relatedTarget, ".e-grid")) || (this.removeFocus(), 
            this.skipFocus = !1, this.currentInfo.skipAction = !1, this.getContent().getFocusInfo().elementToFocus && (this.getContent().getFocusInfo().elementToFocus.tabIndex = 0));
        }, FocusStrategy.prototype.onClick = function(e, force) {
            var isContent = !isNullOrUndefined(closest(e.target, ".e-gridcontent")), isHeader = !isNullOrUndefined(closest(e.target, ".e-gridheader"));
            isContent = isContent && isHeader ? !isContent : isContent;
            var isFrozen = !isNullOrUndefined(closest(e.target, ".e-frozencontent")) || !isNullOrUndefined(closest(e.target, ".e-frozenheader"));
            if (!(!isContent && isNullOrUndefined(closest(e.target, ".e-gridheader")) || e.target.classList.contains("e-content"))) if (this.setActive(isContent, isFrozen), 
            !isContent && isNullOrUndefined(closest(e.target, ".e-gridheader")) || e.target.classList.contains("e-filtermenudiv")) this.clearOutline(); else {
                var beforeArgs = {
                    cancel: !1,
                    byKey: !1,
                    byClick: !isNullOrUndefined(e.target),
                    clickArgs: e
                };
                if (this.parent.notify("beforecellfocused", beforeArgs), !beforeArgs.cancel && !closest(e.target, ".e-inline-edit") && (this.setActive(isContent, isFrozen), 
                this.getContent())) {
                    if (!1 === this.getContent().onClick(e, force)) return;
                    this.focus();
                }
            }
        }, FocusStrategy.prototype.onKeyPress = function(e) {
            if (!this.skipOn(e)) {
                var beforeArgs = {
                    cancel: !1,
                    byKey: !0,
                    byClick: !1,
                    keyArgs: e
                };
                if (this.parent.notify("beforecellfocused", beforeArgs), !beforeArgs.cancel) {
                    var bValue = this.getContent().matrix.current;
                    this.currentInfo.outline = !0;
                    var swapInfo = this.getContent().jump(e.action, bValue);
                    this.swap = swapInfo, swapInfo.swap && (this.setActive(!swapInfo.toHeader, swapInfo.toFrozen), 
                    this.getContent().matrix.current = this.getContent().getNextCurrent(bValue, swapInfo, this.active, e.action), 
                    this.prevIndexes = {}), this.setActiveByKey(e.action, this.getContent());
                    !1 !== this.getContent().onKeyPress(e) ? (e.preventDefault(), this.focus(e)) : this.clearIndicator();
                }
            }
        }, FocusStrategy.prototype.skipOn = function(e) {
            var target = e.target;
            return !!target && (this.currentInfo.skipAction ? (this.clearIndicator(), !0) : [ "pageUp", "pageDown" ].indexOf(e.action) > -1 ? (this.clearIndicator(), 
            !0) : "delete" === e.action || "Batch" !== this.parent.editSettings.mode && (this.parent.isEdit || [ "insert", "f2" ].indexOf(e.action) > -1) || null !== closest(document.activeElement, ".e-filterbarcell") || null !== closest(document.activeElement, "#" + this.parent.element.id + "_searchbar") && [ "enter", "leftArrow", "rightArrow", "shiftLeft", "shiftRight", "ctrlPlusA" ].indexOf(e.action) > -1 || null === closest(target, ".e-gridcontent") && null === closest(target, ".e-gridheader") || "space" === e.action && !target.classList.contains("e-gridchkbox") && null === closest(target, ".e-gridchkbox") && null === closest(target, ".e-headerchkcelldiv"));
        }, FocusStrategy.prototype.getFocusedElement = function() {
            return this.currentInfo.elementToFocus;
        }, FocusStrategy.prototype.getContent = function() {
            return this.active || this.content;
        }, FocusStrategy.prototype.setActive = function(content, isFrozen) {
            this.active = content ? isFrozen ? this.fContent : this.content : isFrozen ? this.fHeader : this.header;
        }, FocusStrategy.prototype.setFocusedElement = function(element) {
            var _this = this;
            this.currentInfo.elementToFocus = element, setTimeout(function() {
                return _this.currentInfo.elementToFocus.focus();
            }, 0);
        }, FocusStrategy.prototype.focus = function(e) {
            this.removeFocus(), this.addFocus(this.getContent().getFocusInfo(), e);
        }, FocusStrategy.prototype.removeFocus = function(e) {
            this.currentInfo.element && (removeClass([ this.currentInfo.element, this.currentInfo.elementToFocus ], [ "e-focused", "e-focus" ]), 
            this.currentInfo.element.tabIndex = -1);
        }, FocusStrategy.prototype.addFocus = function(info, e) {
            if (this.currentInfo = info, this.currentInfo.outline = info.outline && !isNullOrUndefined(e), 
            info.element) {
                var isFocused = info.elementToFocus.classList.contains("e-focus");
                if (!isFocused) {
                    this.currentInfo.outline && addClass([ info.element ], [ "e-focused" ]), addClass([ info.elementToFocus ], [ "e-focus" ]), 
                    info.element.tabIndex = 0, isFocused || this.setFocusedElement(info.elementToFocus), 
                    this.parent.notify("cellfocused", {
                        element: info.elementToFocus,
                        parent: info.element,
                        indexes: this.getContent().matrix.current,
                        byKey: !isNullOrUndefined(e),
                        byClick: isNullOrUndefined(e),
                        keyArgs: e,
                        isJump: this.swap.swap,
                        container: this.getContent().getInfo(e),
                        outline: !isNullOrUndefined(e),
                        swapInfo: this.swap
                    });
                    var _a = this.getContent().matrix.current, rowIndex = _a[0], cellIndex = _a[1];
                    this.prevIndexes = {
                        rowIndex: rowIndex,
                        cellIndex: cellIndex
                    }, this.focusByClick = !1;
                }
            }
        }, FocusStrategy.prototype.refreshMatrix = function(content) {
            var _this = this;
            return function(e) {
                content && e.args && e.args.isFrozen && !_this.fContent ? _this.fContent = new FixedContentFocus(_this.parent) : content && !_this.content && (_this.content = new ContentFocus(_this.parent)), 
                !content && e.args && e.args.isFrozen && !_this.fHeader ? _this.fHeader = new FixedHeaderFocus(_this.parent) : content || _this.header || (_this.header = new HeaderFocus(_this.parent));
                var cFocus = content ? e.args && e.args.isFrozen ? _this.fContent : _this.content : e.args && e.args.isFrozen ? _this.fHeader : _this.header, rows = content ? e.rows.slice(_this.parent.frozenRows) : e.rows, updateRow = content ? e.rows.slice(0, _this.parent.frozenRows) : e.rows, matrix = cFocus.matrix.generate(updateRow, cFocus.selector);
                cFocus.matrix.generate(rows, cFocus.selector), cFocus.generateRows(updateRow, {
                    matrix: matrix,
                    handlerInstance: e.args && e.args.isFrozen ? _this.fHeader : _this.header
                }), !Browser.isDevice && !_this.focusByClick && e && e.args && "paging" === e.args.requestType && (_this.skipFocus = !1, 
                _this.parent.element.focus());
            };
        }, FocusStrategy.prototype.addEventListener = function() {
            var _this = this;
            this.parent.isDestroyed || (EventHandler.add(this.parent.element, "mousedown", this.focusCheck, this), 
            EventHandler.add(this.parent.element, "focus", this.onFocus, this), this.parent.element.addEventListener("focus", this.passiveHandler = function(e) {
                return _this.passiveFocus(e);
            }, !0), EventHandler.add(this.parent.element, "focusout", this.onBlur, this), this.parent.on(keyPressed, this.onKeyPress, this), 
            this.parent.on(click, this.onClick, this), this.parent.on(contentReady, this.refreshMatrix(!0), this), 
            this.parent.on(headerRefreshed, this.refreshMatrix(), this), this.parent.on("close-edit", this.restoreFocus, this), 
            [ "start-edit", "start-add" ].forEach(function(evt) {
                return _this.parent.on(evt, _this.clearIndicator, _this);
            }), [ "sorting" ].forEach(function(action) {
                return _this.parent.on(action + "-complete", _this.restoreFocus, _this);
            }), this.parent.on("batchAdd", this.refreshMatrix(!0), this), this.parent.on("batchCancel", this.refreshMatrix(!0), this), 
            this.parent.on("batchDelete", this.refreshMatrix(!0), this), this.parent.on("detailDataBound", this.refreshMatrix(!0), this), 
            this.parent.on(onEmpty, this.refreshMatrix(!0), this), this.parent.on("cellfocused", this.internalCellFocus, this));
        }, FocusStrategy.prototype.removeEventListener = function() {
            var _this = this;
            this.parent.isDestroyed || (EventHandler.remove(this.parent.element, "mousedown", this.focusCheck), 
            EventHandler.remove(this.parent.element, "focus", this.onFocus), EventHandler.remove(this.parent.element, "focusout", this.onBlur), 
            this.parent.element.removeEventListener("focus", this.passiveHandler, !0), this.parent.off(keyPressed, this.onKeyPress), 
            this.parent.off(click, this.onClick), this.parent.off(contentReady, this.refreshMatrix(!0)), 
            this.parent.off(headerRefreshed, this.refreshMatrix()), this.parent.off("close-edit", this.restoreFocus), 
            [ "start-edit", "start-add" ].forEach(function(evt) {
                return _this.parent.off(evt, _this.clearOutline);
            }), [ "sorting" ].forEach(function(action) {
                return _this.parent.off(action + "-complete", _this.restoreFocus);
            }), this.parent.off("batchAdd", this.refreshMatrix(!0)), this.parent.off("batchDelete", this.refreshMatrix(!0)), 
            this.parent.off("batchCancel", this.refreshMatrix(!0)), this.parent.off("detailDataBound", this.refreshMatrix(!0)), 
            this.parent.off(onEmpty, this.refreshMatrix(!0)), this.parent.off("cellfocused", this.internalCellFocus));
        }, FocusStrategy.prototype.destroy = function() {
            this.removeEventListener();
        }, FocusStrategy.prototype.restoreFocus = function() {
            this.addFocus(this.getContent().getFocusInfo());
        }, FocusStrategy.prototype.clearOutline = function() {
            this.getContent().matrix.current = this.getContent().matrix.get(0, -1, [ 0, 1 ], "downArrow", this.getContent().validator()), 
            this.clearIndicator();
        }, FocusStrategy.prototype.clearIndicator = function() {
            this.currentInfo.element && this.currentInfo.elementToFocus && removeClass([ this.currentInfo.element, this.currentInfo.elementToFocus ], [ "e-focus", "e-focused" ]);
        }, FocusStrategy.prototype.getPrevIndexes = function() {
            var forget = this.forget;
            return this.forget = !1, forget ? {
                rowIndex: null,
                cellIndex: null
            } : this.prevIndexes;
        }, FocusStrategy.prototype.forgetPrevious = function() {
            this.forget = !0;
        }, FocusStrategy.prototype.setActiveByKey = function(action, active) {
            var _this = this;
            if (0 !== this.parent.frozenColumns || 0 !== this.parent.frozenRows) {
                var info, actions = {
                    home: function() {
                        return {
                            toHeader: !info.isContent,
                            toFrozen: !0
                        };
                    },
                    end: function() {
                        return {
                            toHeader: !info.isContent,
                            toFrozen: !1
                        };
                    },
                    ctrlHome: function() {
                        return {
                            toHeader: !0,
                            toFrozen: 0 !== _this.parent.frozenColumns
                        };
                    },
                    ctrlEnd: function() {
                        return {
                            toHeader: !1,
                            toFrozen: !1
                        };
                    }
                };
                if (action in actions) {
                    info = active.getInfo();
                    var swap = actions[action]();
                    this.setActive(!swap.toHeader, swap.toFrozen), this.getContent().matrix.current = active.matrix.current;
                }
            }
        }, FocusStrategy.prototype.internalCellFocus = function(e) {
            if (e.byKey && e.container.isContent && "enter" === e.keyArgs.action && (e.parent.classList.contains("e-detailcell") || e.parent.classList.contains("e-unboundcell") || e.parent.classList.contains("e-templatecell"))) {
                this.clearIndicator();
                var focusEle = this.getContent().getFocusable(this.getFocusedElement());
                this.setFocusedElement(focusEle), this.currentInfo.skipAction = !0;
            }
        }, FocusStrategy;
    }(), Matrix$1 = function() {
        function Matrix() {
            this.matrix = [], this.current = [];
        }
        return Matrix.prototype.set = function(rowIndex, columnIndex, allow) {
            rowIndex = Math.max(0, Math.min(rowIndex, this.rows)), columnIndex = Math.max(0, Math.min(columnIndex, this.columns)), 
            this.matrix[rowIndex] = this.matrix[rowIndex] || [], this.matrix[rowIndex][columnIndex] = allow ? 1 : 0;
        }, Matrix.prototype.get = function(rowIndex, columnIndex, navigator, action, validator) {
            var tmp = columnIndex;
            if (rowIndex + navigator[0] < 0) return [ rowIndex, columnIndex ];
            if (rowIndex = Math.max(0, Math.min(rowIndex + navigator[0], this.rows)), columnIndex = Math.max(0, Math.min(columnIndex + navigator[1], this.matrix[rowIndex].length - 1)), 
            tmp + navigator[1] > this.matrix[rowIndex].length - 1 && validator(rowIndex, columnIndex, action)) return [ rowIndex, tmp ];
            var first = this.first(this.matrix[rowIndex], columnIndex, navigator, !0, action), val = getValue(rowIndex + "." + (columnIndex = null === first ? tmp : first), this.matrix);
            return this.inValid(val) || !validator(rowIndex, columnIndex, action) ? this.get(rowIndex, tmp, navigator, action, validator) : [ rowIndex, columnIndex ];
        }, Matrix.prototype.first = function(vector, index, navigator, moveTo, action) {
            return (index < 0 || index === vector.length) && this.inValid(vector[index]) && "upArrow" !== action && "downArrow" !== action || !vector.some(function(v) {
                return 1 === v;
            }) ? null : this.inValid(vector[index]) ? this.first(vector, -1 !== [ "upArrow", "downArrow", "shiftUp", "shiftDown" ].indexOf(action) ? moveTo ? 0 : ++index : index + navigator[1], navigator, !1, action) : index;
        }, Matrix.prototype.select = function(rowIndex, columnIndex) {
            rowIndex = Math.max(0, Math.min(rowIndex, this.rows)), columnIndex = Math.max(0, Math.min(columnIndex, this.matrix[rowIndex].length - 1)), 
            this.current = [ rowIndex, columnIndex ];
        }, Matrix.prototype.generate = function(rows, selector) {
            var _this = this;
            return this.rows = rows.length - 1, this.matrix = [], rows.forEach(function(row, rIndex) {
                var cells = row.cells.filter(function(c) {
                    return !0 !== c.isSpanned;
                });
                _this.columns = Math.max(cells.length - 1, 0 | _this.columns), cells.forEach(function(cell, cIndex) {
                    _this.set(rIndex, cIndex, selector(row, cell));
                });
            }), this.matrix;
        }, Matrix.prototype.inValid = function(value) {
            return 0 === value || void 0 === value;
        }, Matrix;
    }(), ContentFocus = function() {
        function ContentFocus(parent) {
            var _this = this;
            this.matrix = new Matrix$1(), this.parent = parent, this.keyActions = {
                rightArrow: [ 0, 1 ],
                tab: [ 0, 1 ],
                leftArrow: [ 0, -1 ],
                shiftTab: [ 0, -1 ],
                upArrow: [ -1, 0 ],
                downArrow: [ 1, 0 ],
                shiftUp: [ -1, 0 ],
                shiftDown: [ 1, 0 ],
                shiftRight: [ 0, 1 ],
                shiftLeft: [ 0, -1 ],
                enter: [ 1, 0 ],
                shiftEnter: [ -1, 0 ]
            }, this.indexesByKey = function(action) {
                return {
                    home: [ _this.matrix.current[0], -1, 0, 1 ],
                    end: [ _this.matrix.current[0], _this.matrix.columns + 1, 0, -1 ],
                    ctrlHome: [ 0, -1, 0, 1 ],
                    ctrlEnd: [ _this.matrix.rows, _this.matrix.columns + 1, 0, -1 ]
                }[action] || null;
            };
        }
        return ContentFocus.prototype.getTable = function() {
            return this.parent.frozenColumns ? this.parent.getContent().querySelector(".e-movablecontent .e-table") : this.parent.getContentTable();
        }, ContentFocus.prototype.onKeyPress = function(e) {
            var navigator = this.keyActions[e.action], current = this.getCurrentFromAction(e.action, navigator, e.action in this.keyActions, e);
            if (current) return (([ "tab", "shiftTab" ].indexOf(e.action) > -1 && this.matrix.current || []).toString() !== current.toString() || current.toString() !== [ this.matrix.rows, this.matrix.columns ].toString() && current.toString() !== [ 0, 0 ].toString()) && void this.matrix.select(current[0], current[1]);
        }, ContentFocus.prototype.getCurrentFromAction = function(action, navigator, isPresent, e) {
            if (void 0 === navigator && (navigator = [ 0, 0 ]), !isPresent && !this.indexesByKey(action)) return null;
            if (!this.shouldFocusChange(e)) return this.matrix.current;
            var _a = this.indexesByKey(action) || this.matrix.current.concat(navigator), rowIndex = _a[0], cellIndex = _a[1], rN = _a[2], cN = _a[3];
            return this.matrix.get(rowIndex, cellIndex, [ rN, cN ], action, this.validator());
        }, ContentFocus.prototype.onClick = function(e, force) {
            var target = e.target;
            if (target = target.classList.contains("e-rowcell") ? target : closest(target, "td"), 
            target = target || (closest(e.target, "td.e-detailrowcollapse") || closest(e.target, "td.e-detailrowexpand")), 
            target = closest(e.target, "td.e-detailcell") && isNullOrUndefined(closest(closest(e.target, ".e-grid"), "td.e-detailcell")) ? null : target, 
            !(target = target && closest(target, "table").classList.contains("e-table") ? target : null)) return !1;
            var _a = [ target.parentElement.rowIndex, target.cellIndex ], rowIndex = _a[0], cellIndex = _a[1], _b = this.matrix.current, oRowIndex = _b[0], oCellIndex = _b[1], val = getValue(rowIndex + "." + cellIndex, this.matrix.matrix);
            if (this.matrix.inValid(val) || !force && oRowIndex === rowIndex && oCellIndex === cellIndex) return !1;
            this.matrix.select(rowIndex, cellIndex);
        }, ContentFocus.prototype.getFocusInfo = function() {
            var info = {}, _a = this.matrix.current, _b = _a[0], rowIndex = void 0 === _b ? 0 : _b, _c = _a[1], cellIndex = void 0 === _c ? 0 : _c;
            return this.matrix.current = [ rowIndex, cellIndex ], info.element = isNullOrUndefined(this.getTable().rows[rowIndex]) ? null : this.getTable().rows[rowIndex].cells[cellIndex], 
            info.element ? (info.elementToFocus = info.element.classList.contains("e-unboundcell") || info.element.classList.contains("e-detailcell") || info.element.classList.contains("e-templatecell") ? info.element : this.getFocusable(info.element), 
            info.outline = !0, info) : info;
        }, ContentFocus.prototype.getFocusable = function(element) {
            var query = 'button, [href], input:not([type="hidden"]), select, textarea, [tabindex]:not([tabindex="-1"])';
            this.parent.isEdit && (query = 'input:not([type="hidden"]), select:not([aria-hidden="true"]), textarea');
            var child = [].slice.call(element.querySelectorAll(query));
            return child.length ? child[0] : element;
        }, ContentFocus.prototype.selector = function(row, cell) {
            var types = [ CellType.Expand, CellType.GroupCaption, CellType.CaptionSummary, CellType.GroupSummary ];
            return (row.isDataRow && cell.visible && (cell.isDataCell || cell.isTemplate) || row.isDataRow && cell.cellType === CellType.DetailExpand || !row.isDataRow && types.indexOf(cell.cellType) > -1 || cell.column && "checkbox" === cell.column.type || cell.cellType === CellType.CommandColumn) && !("delete" === row.edit && row.isDirty);
        }, ContentFocus.prototype.jump = function(action, current) {
            var frozenSwap = this.parent.frozenColumns > 0 && ("leftArrow" === action || "shiftTab" === action) && 0 === current[1], enterFrozen = 0 !== this.parent.frozenRows && "shiftEnter" === action;
            return {
                swap: ("upArrow" === action || enterFrozen) && 0 === current[0] || frozenSwap,
                toHeader: ("upArrow" === action || enterFrozen) && 0 === current[0],
                toFrozen: frozenSwap
            };
        }, ContentFocus.prototype.getNextCurrent = function(previous, swap, active, action) {
            void 0 === previous && (previous = []);
            var current = [];
            return "rightArrow" === action || "tab" === action ? (current[0] = previous[0], 
            current[1] = -1) : "downArrow" !== action && "enter" !== action || (current[0] = -1, 
            current[1] = previous[1]), current;
        }, ContentFocus.prototype.generateRows = function(rows, optionals) {
            var matrix = optionals.matrix, handlerInstance = optionals.handlerInstance, len = handlerInstance.matrix.matrix.length, defaultLen = this.parent.allowFiltering && "FilterBar" === this.parent.filterSettings.type ? len + 1 : len;
            handlerInstance.matrix.matrix = handlerInstance.matrix.matrix.slice(0, defaultLen), 
            handlerInstance.matrix.rows = defaultLen, (_a = handlerInstance.matrix.matrix).push.apply(_a, matrix), 
            handlerInstance.matrix.rows += matrix.length;
            var _a;
        }, ContentFocus.prototype.getInfo = function(e) {
            var info = this.getFocusInfo(), _a = this.matrix.current, rIndex = _a[0], cIndex = _a[1], isData = info.element.classList.contains("e-rowcell"), isSelectable = isData || e && "enter" !== e.action && (info.element.classList.contains("e-detailrowcollapse") || info.element.classList.contains("e-detailrowexpand")), _b = [ Math.min(parseInt(info.element.parentElement.getAttribute("aria-rowindex"), 10), rIndex), Math.min(parseInt(info.element.getAttribute("aria-colindex"), 10), cIndex) ];
            return {
                isContent: !0,
                isDataCell: isData,
                indexes: [ _b[0], _b[1] ],
                isSelectable: isSelectable
            };
        }, ContentFocus.prototype.validator = function() {
            var table = this.getTable();
            return function(rowIndex, cellIndex, action) {
                var cell = table.rows[rowIndex].cells[cellIndex];
                return "enter" === action || "shiftEnter" === action ? cell.classList.contains("e-rowcell") : !("shiftUp" !== action && "shiftDown" !== action || !cell.classList.contains("e-rowcell")) || "shiftUp" !== action && "shiftDown" !== action && 0 !== cell.getBoundingClientRect().width;
            };
        }, ContentFocus.prototype.shouldFocusChange = function(e) {
            var _a = this.matrix.current, _b = _a[0], rIndex = void 0 === _b ? -1 : _b, _c = _a[1], cIndex = void 0 === _c ? -1 : _c;
            if (rIndex < 0 || cIndex < 0) return !0;
            var cell = getValue(rIndex + ".cells." + cIndex, this.getTable().rows);
            return !cell || ("enter" !== e.action && "shiftEnter" !== e.action || cell.classList.contains("e-rowcell") && !cell.classList.contains("e-unboundcell") && !cell.classList.contains("e-templatecell") && !cell.classList.contains("e-detailcell"));
        }, ContentFocus;
    }(), HeaderFocus = function(_super) {
        function HeaderFocus(parent) {
            return _super.call(this, parent) || this;
        }
        return __extends$122(HeaderFocus, _super), HeaderFocus.prototype.getTable = function() {
            return this.parent.frozenColumns ? this.parent.getHeaderContent().querySelector(".e-movableheader .e-table") : this.parent.getHeaderTable();
        }, HeaderFocus.prototype.onClick = function(e) {
            var target = e.target;
            if ((target = target.classList.contains("e-headercell") ? target : closest(target, "th")) || 0 === this.parent.frozenRows || (target = e.target.classList.contains("e-rowcell") ? e.target : closest(e.target, "td")), 
            target) {
                var _a = [ target.parentElement.rowIndex, target.cellIndex ], val = getValue(_a[0] + "." + _a[1], this.matrix.matrix);
                if (this.matrix.inValid(val)) return !1;
                this.matrix.select(target.parentElement.rowIndex, target.cellIndex);
            }
        }, HeaderFocus.prototype.getFocusInfo = function() {
            var info = {}, _a = this.matrix.current, _b = _a[0], rowIndex = void 0 === _b ? 0 : _b, _c = _a[1], cellIndex = void 0 === _c ? 0 : _c;
            return info.element = this.getTable().rows[rowIndex].cells[cellIndex], info.elementToFocus = this.getFocusable(info.element), 
            info.outline = !info.element.classList.contains("e-filterbarcell"), info;
        }, HeaderFocus.prototype.selector = function(row, cell) {
            return cell.visible && (void 0 !== cell.column.field || cell.isTemplate) || "checkbox" === cell.column.type || cell.cellType === CellType.StackedHeader;
        }, HeaderFocus.prototype.jump = function(action, current) {
            var frozenSwap = this.parent.frozenColumns > 0 && ("leftArrow" === action || "shiftTab" === action) && 0 === current[1], enterFrozen = 0 !== this.parent.frozenRows && "enter" === action;
            return {
                swap: ("downArrow" === action || enterFrozen) && current[0] === this.matrix.matrix.length - 1 || frozenSwap,
                toHeader: frozenSwap,
                toFrozen: frozenSwap
            };
        }, HeaderFocus.prototype.getNextCurrent = function(previous, swap, active, action) {
            void 0 === previous && (previous = []);
            var current = [];
            return "upArrow" === action || "shiftEnter" === action ? (current[0] = this.matrix.matrix.length, 
            current[1] = previous[1]) : "rightArrow" !== action && "tab" !== action || (current[0] = previous[0], 
            current[1] = -1), current;
        }, HeaderFocus.prototype.generateRows = function(rows) {
            var _this = this, length = this.matrix.matrix.length;
            this.parent.allowFiltering && "FilterBar" === this.parent.filterSettings.type && (this.matrix.rows = ++this.matrix.rows, 
            rows[0].cells.forEach(function(cell, cIndex) {
                return _this.matrix.set(length, cIndex, cell.visible && !1 !== cell.column.allowFiltering);
            }));
        }, HeaderFocus.prototype.getInfo = function(e) {
            return extend(_super.prototype.getInfo.call(this, e), {
                isContent: !1,
                isHeader: !0
            });
        }, HeaderFocus.prototype.validator = function() {
            return function() {
                return !0;
            };
        }, HeaderFocus.prototype.shouldFocusChange = function(e) {
            var _a = this.matrix.current, rIndex = _a[0], cIndex = _a[1];
            if (rIndex < 0 || cIndex < 0) return !0;
            var cell = getValue(rIndex + ".cells." + cIndex, this.getTable().rows);
            return !cell || ("enter" !== e.action && "altDownArrow" !== e.action || !cell.classList.contains("e-headercell"));
        }, HeaderFocus;
    }(ContentFocus), FixedContentFocus = function(_super) {
        function FixedContentFocus() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$122(FixedContentFocus, _super), FixedContentFocus.prototype.getTable = function() {
            return this.parent.getContent().querySelector(".e-frozencontent .e-table");
        }, FixedContentFocus.prototype.jump = function(action, current) {
            var enterFrozen = 0 !== this.parent.frozenRows && "shiftEnter" === action;
            return {
                swap: ("upArrow" === action || enterFrozen) && 0 === current[0] || ("tab" === action || "rightArrow" === action) && current[1] === this.matrix.columns,
                toHeader: ("upArrow" === action || enterFrozen) && 0 === current[0],
                toFrozen: ("upArrow" === action || enterFrozen) && 0 === current[0]
            };
        }, FixedContentFocus.prototype.getNextCurrent = function(previous, swap, active, action) {
            void 0 === previous && (previous = []);
            var current = [];
            return "leftArrow" === action || "shiftTab" === action ? (current[0] = previous[0], 
            current[1] = active.matrix.columns + 1) : "downArrow" !== action && "enter" !== action || (current[0] = -1, 
            current[1] = previous[1]), current;
        }, FixedContentFocus;
    }(ContentFocus), FixedHeaderFocus = function(_super) {
        function FixedHeaderFocus() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$122(FixedHeaderFocus, _super), FixedHeaderFocus.prototype.jump = function(action, current) {
            var enterFrozen = 0 !== this.parent.frozenRows && "enter" === action;
            return {
                swap: ("downArrow" === action || enterFrozen) && current[0] === this.matrix.matrix.length - 1 || ("rightArrow" === action || "tab" === action) && current[1] === this.matrix.columns,
                toHeader: ("rightArrow" === action || "tab" === action) && current[1] === this.matrix.columns,
                toFrozen: ("downArrow" === action || enterFrozen) && current[0] === this.matrix.matrix.length - 1
            };
        }, FixedHeaderFocus.prototype.getTable = function() {
            return this.parent.getHeaderContent().querySelector(".e-frozenheader .e-table");
        }, FixedHeaderFocus.prototype.getNextCurrent = function(previous, swap, active, action) {
            void 0 === previous && (previous = []);
            var current = [];
            return "leftArrow" === action || "shiftTab" === action ? (current[0] = previous[0], 
            current[1] = active.matrix.columns + 1) : "upArrow" !== action && "shiftEnter" !== action || (current[0] = this.matrix.matrix.length, 
            current[1] = previous[1]), current;
        }, FixedHeaderFocus;
    }(HeaderFocus), SearchBox = function() {
        function SearchBox(searchBox) {
            this.searchBox = searchBox;
        }
        return SearchBox.prototype.searchFocus = function(args) {
            args.target.parentElement.classList.add("e-input-focus");
        }, SearchBox.prototype.searchBlur = function(args) {
            args.target.parentElement.classList.remove("e-input-focus");
        }, SearchBox.prototype.wireEvent = function() {
            this.searchBox && (EventHandler.add(this.searchBox, "focus", this.searchFocus, this), 
            EventHandler.add(this.searchBox, "blur", this.searchBlur, this));
        }, SearchBox.prototype.unWireEvent = function() {
            this.searchBox && (EventHandler.remove(this.searchBox, "focus", this.searchFocus), 
            EventHandler.remove(this.searchBox, "blur", this.searchBlur));
        }, SearchBox;
    }(), __extends$123 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$50 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, PageSettings = function(_super) {
        function PageSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$123(PageSettings, _super), __decorate$50([ Property(12) ], PageSettings.prototype, "pageSize", void 0), 
        __decorate$50([ Property(8) ], PageSettings.prototype, "pageCount", void 0), __decorate$50([ Property(1) ], PageSettings.prototype, "currentPage", void 0), 
        __decorate$50([ Property() ], PageSettings.prototype, "totalRecordsCount", void 0), 
        __decorate$50([ Property(!1) ], PageSettings.prototype, "enableQueryString", void 0), 
        __decorate$50([ Property(!1) ], PageSettings.prototype, "pageSizes", void 0), __decorate$50([ Property(null) ], PageSettings.prototype, "template", void 0), 
        PageSettings;
    }(ChildProperty), __assign = Object.assign || function(t) {
        for (var s, i = 1, n = arguments.length; i < n; i++) {
            s = arguments[i];
            for (var p in s) Object.prototype.hasOwnProperty.call(s, p) && (t[p] = s[p]);
        }
        return t;
    }, Selection$1 = function() {
        function Selection(parent, selectionSettings, locator) {
            this.selectedRowIndexes = [], this.selectedRowCellIndexes = [], this.selectedRecords = [], 
            this.preventFocus = !1, this.isMultiShiftRequest = !1, this.isMultiCtrlRequest = !1, 
            this.enableSelectMultiTouch = !1, this.selectedRowState = {}, this.totalRecordsCount = 0, 
            this.chkAllCollec = [], this.isCheckedOnAdd = !1, this.persistSelectedData = [], 
            this.isCancelDeSelect = !1, this.isPreventCellSelect = !1, this.parent = parent, 
            this.selectionSettings = selectionSettings, this.factory = locator.getService("rendererFactory"), 
            this.focus = locator.getService("focus"), this.addEventListener();
        }
        return Selection.prototype.initializeSelection = function() {
            EventHandler.add(this.parent.getContent(), "mousedown", this.mouseDownHandler, this);
        }, Selection.prototype.onActionBegin = function(args, type) {
            this.parent.trigger(type, this.fDataUpdate(args));
        }, Selection.prototype.fDataUpdate = function(args) {
            if (args.cellIndex || args.rowIndex) {
                var rowObj = this.getRowObj(isNullOrUndefined(args.rowIndex) ? isNullOrUndefined(args.cellIndex) ? this.currentIndex : args.cellIndex.rowIndex : args.rowIndex);
                args.foreignKeyData = rowObj.foreignKeyData;
            }
            return args;
        }, Selection.prototype.onActionComplete = function(args, type) {
            this.parent.trigger(type, this.fDataUpdate(args));
        }, Selection.prototype.getModuleName = function() {
            return "selection";
        }, Selection.prototype.destroy = function() {
            this.hidePopUp(), this.clearSelection(), this.removeEventListener(), EventHandler.remove(this.parent.getContent(), "mousedown", this.mouseDownHandler);
        }, Selection.prototype.isEditing = function() {
            return ("Normal" === this.parent.editSettings.mode || "Batch" === this.parent.editSettings.mode && this.parent.editModule.formObj && !this.parent.editModule.formObj.validate()) && this.parent.isEdit && !this.parent.isPersistSelection;
        }, Selection.prototype.getSelectedMovableRow = function(index) {
            var gObj = this.parent;
            return gObj.getFrozenColumns() ? gObj.getMovableRowByIndex(index) : null;
        }, Selection.prototype.selectRow = function(index, isToggle) {
            var gObj = this.parent, selectedRow = gObj.getRowByIndex(index), selectedMovableRow = this.getSelectedMovableRow(index), selectData = gObj.getCurrentViewRecords()[index];
            if (this.isRowType() && selectedRow && !this.isEditing()) {
                var args, isRowSelected = selectedRow.hasAttribute("aria-selected");
                (isToggle = isToggle ? index === this.prevRowIndex && isRowSelected : isToggle) || (args = {
                    data: selectData,
                    rowIndex: index,
                    isCtrlPressed: this.isMultiCtrlRequest,
                    isShiftPressed: this.isMultiShiftRequest,
                    row: selectedRow,
                    previousRow: gObj.getRows()[this.prevRowIndex],
                    previousRowIndex: this.prevRowIndex,
                    target: this.target,
                    cancel: !1
                }, args = this.addMovableArgs(args, selectedMovableRow), this.onActionBegin(args, "rowSelecting")), 
                (isNullOrUndefined(args) || !0 !== args.cancel) && (this.clearRow(), isToggle || (this.updateRowSelection(selectedRow, index), 
                gObj.getFrozenColumns() && this.updateRowSelection(selectedMovableRow, index), gObj.selectedRowIndex = index), 
                this.updateRowProps(index), isToggle || (args = {
                    data: selectData,
                    rowIndex: index,
                    row: selectedRow,
                    previousRow: gObj.getRows()[this.prevRowIndex],
                    previousRowIndex: this.prevRowIndex,
                    target: this.target
                }, args = this.addMovableArgs(args, selectedMovableRow), this.onActionComplete(args, "rowSelected")));
            }
        }, Selection.prototype.addMovableArgs = function(targetObj, mRow) {
            if (this.parent.getFrozenColumns()) {
                var mObj = {
                    mRow: mRow,
                    previousMovRow: this.parent.getMovableRows()[this.prevRowIndex]
                };
                targetObj = __assign({}, targetObj, mObj);
            }
            return targetObj;
        }, Selection.prototype.selectRowsByRange = function(startIndex, endIndex) {
            this.selectRows(this.getCollectionFromIndexes(startIndex, endIndex)), this.parent.selectedRowIndex = endIndex;
        }, Selection.prototype.selectRows = function(rowIndexes) {
            var gObj = this.parent, rowIndex = this.isSingleSel() ? rowIndexes[rowIndexes.length - 1] : rowIndexes[0], selectedRow = gObj.getRowByIndex(rowIndex), selectedMovableRow = this.getSelectedMovableRow(rowIndex), frzCols = gObj.getFrozenColumns(), selectedData = gObj.getCurrentViewRecords()[rowIndexes[0]];
            if (this.isRowType() && !this.isEditing()) {
                var args = {
                    rowIndexes: rowIndexes,
                    row: selectedRow,
                    rowIndex: rowIndex,
                    target: this.target,
                    prevRow: gObj.getRows()[this.prevRowIndex],
                    previousRowIndex: this.prevRowIndex,
                    isCtrlPressed: this.isMultiCtrlRequest,
                    isShiftPressed: this.isMultiShiftRequest,
                    data: selectedData
                };
                if (args = this.addMovableArgs(args, selectedMovableRow), this.onActionBegin(args, "rowSelecting"), 
                isNullOrUndefined(args) || !0 !== args.cancel) {
                    if (this.clearRow(), this.isSingleSel()) this.updateRowSelection(gObj.getRowByIndex(rowIndex), rowIndex), 
                    frzCols && this.updateRowSelection(gObj.getMovableRowByIndex(rowIndex), rowIndex), 
                    this.updateRowProps(rowIndex); else for (var _i = 0, rowIndexes_1 = rowIndexes; _i < rowIndexes_1.length; _i++) {
                        var rowIdx = rowIndexes_1[_i];
                        this.updateRowSelection(gObj.getRowByIndex(rowIdx), rowIdx), frzCols && this.updateRowSelection(gObj.getMovableRowByIndex(rowIdx), rowIdx), 
                        this.updateRowProps(rowIndex);
                    }
                    args = {
                        rowIndexes: rowIndexes,
                        row: selectedRow,
                        rowIndex: rowIndex,
                        target: this.target,
                        prevRow: gObj.getRows()[this.prevRowIndex],
                        previousRowIndex: this.prevRowIndex,
                        data: selectedData
                    }, args = this.addMovableArgs(args, selectedMovableRow), this.onActionComplete(args, "rowSelected");
                }
            }
        }, Selection.prototype.addRowsToSelection = function(rowIndexes) {
            var gObj = this.parent, selectedRow = this.isSingleSel() ? gObj.getRowByIndex(rowIndexes[rowIndexes.length - 1]) : gObj.getRowByIndex(rowIndexes[0]), selectedMovableRow = this.isSingleSel() ? this.getSelectedMovableRow(rowIndexes[rowIndexes.length - 1]) : this.getSelectedMovableRow(rowIndexes[0]), frzCols = gObj.getFrozenColumns();
            if (this.isRowType() && !this.isEditing()) for (var args, _i = 0, rowIndexes_2 = rowIndexes; _i < rowIndexes_2.length; _i++) {
                var rowIndex = rowIndexes_2[_i], rowObj = this.getRowObj(rowIndex), isUnSelected = this.selectedRowIndexes.indexOf(rowIndex) > -1;
                if (gObj.selectedRowIndex = rowIndex, isUnSelected) this.rowDeselect("rowDeselecting", [ rowIndex ], [ rowObj.data ], [ selectedRow ], [ rowObj.foreignKeyData ]), 
                this.selectedRowIndexes.splice(this.selectedRowIndexes.indexOf(rowIndex), 1), this.selectedRecords.splice(this.selectedRecords.indexOf(selectedRow), 1), 
                selectedRow.removeAttribute("aria-selected"), this.addRemoveClassesForRow(selectedRow, !1, null, "e-selectionbackground", "e-active"), 
                selectedMovableRow && (this.selectedRecords.splice(this.selectedRecords.indexOf(selectedMovableRow), 1), 
                selectedMovableRow.removeAttribute("aria-selected"), this.addRemoveClassesForRow(selectedMovableRow, !1, null, "e-selectionbackground", "e-active")), 
                this.rowDeselect("rowDeselected", [ rowIndex ], [ rowObj.data ], [ selectedRow ], [ rowObj.foreignKeyData ], [ selectedMovableRow ]); else {
                    if (args = {
                        data: rowObj.data,
                        rowIndex: rowIndex,
                        row: selectedRow,
                        target: this.target,
                        prevRow: gObj.getRows()[this.prevRowIndex],
                        previousRowIndex: this.prevRowIndex,
                        isCtrlPressed: this.isMultiCtrlRequest,
                        isShiftPressed: this.isMultiShiftRequest,
                        foreignKeyData: rowObj.foreignKeyData
                    }, args = this.addMovableArgs(args, selectedMovableRow), this.onActionBegin(args, "rowSelecting"), 
                    !isNullOrUndefined(args) && !0 === args.cancel) return;
                    this.isSingleSel() && this.clearRow(), this.updateRowSelection(selectedRow, rowIndex), 
                    frzCols && this.updateRowSelection(selectedMovableRow, rowIndex);
                }
                if (this.updateRowProps(rowIndex), isUnSelected || (args = {
                    data: rowObj.data,
                    rowIndex: rowIndex,
                    row: selectedRow,
                    target: this.target,
                    prevRow: gObj.getRows()[this.prevRowIndex],
                    previousRowIndex: this.prevRowIndex,
                    foreignKeyData: rowObj.foreignKeyData
                }, args = this.addMovableArgs(args, selectedMovableRow), this.onActionComplete(args, "rowSelected")), 
                this.isSingleSel()) break;
            }
        }, Selection.prototype.getCollectionFromIndexes = function(startIndex, endIndex) {
            for (var indexes = [], _a = startIndex < endIndex ? {
                i: startIndex,
                max: endIndex
            } : {
                i: endIndex,
                max: startIndex
            }, i = _a.i, max = _a.max; i <= max; i++) indexes.push(i);
            return startIndex > endIndex && indexes.reverse(), indexes;
        }, Selection.prototype.clearRow = function() {
            this.clearRowSelection(), this.selectedRowIndexes = [], this.selectedRecords = [], 
            this.parent.selectedRowIndex = -1, this.isSingleSel() && this.parent.isPersistSelection && (this.selectedRowState = {});
        }, Selection.prototype.updateRowProps = function(startIndex) {
            this.prevRowIndex = startIndex, this.isRowSelected = this.selectedRowIndexes.length && !0;
        }, Selection.prototype.updatePersistCollection = function(selectedRow, chkState) {
            if (this.parent.isPersistSelection && !isNullOrUndefined(selectedRow)) {
                var rowObj = this.getRowObj(selectedRow), pKey = rowObj.data ? rowObj.data[this.primaryKey] : null;
                if (null === pKey) return;
                rowObj.isSelected = chkState, chkState ? (this.selectedRowState[pKey] = chkState, 
                this.persistSelectedData.indexOf(rowObj.data) < 0 && this.persistSelectedData.push(rowObj.data)) : (delete this.selectedRowState[pKey], 
                this.persistSelectedData.indexOf(rowObj.data) >= 0 && this.persistSelectedData.splice(this.persistSelectedData.indexOf(rowObj.data), 1));
            }
        }, Selection.prototype.updateCheckBoxes = function(row, chkState) {
            if (!isNullOrUndefined(row)) {
                var chkBox = row.querySelector(".e-checkselect");
                isNullOrUndefined(chkBox) || (removeAddCboxClasses(chkBox.nextElementSibling, chkState), 
                (isNullOrUndefined(this.checkedTarget) || !isNullOrUndefined(this.checkedTarget) && !this.checkedTarget.classList.contains("e-checkselectall")) && this.setCheckAllState());
            }
        }, Selection.prototype.updateRowSelection = function(selectedRow, startIndex) {
            if (selectedRow) {
                this.selectedRowIndexes.push(startIndex);
                var len = this.selectedRowIndexes.length;
                if (this.parent.getFrozenColumns() && len > 1 && this.selectedRowIndexes[len - 2] === this.selectedRowIndexes[len - 1] && this.selectedRowIndexes.pop(), 
                this.selectedRecords.push(selectedRow), selectedRow.setAttribute("aria-selected", "true"), 
                this.updatePersistCollection(selectedRow, !0), this.updateCheckBoxes(selectedRow, !0), 
                this.addRemoveClassesForRow(selectedRow, !0, null, "e-selectionbackground", "e-active"), 
                !this.preventFocus) {
                    var target = this.focus.getPrevIndexes().cellIndex ? selectedRow.cells[this.focus.getPrevIndexes().cellIndex] : selectedRow.querySelector(".e-selectionbackground:not(.e-hide)");
                    if (!target) return;
                    this.focus.onClick({
                        target: target
                    }, !0);
                }
            }
        }, Selection.prototype.clearSelection = function() {
            if (!this.parent.isPersistSelection || this.parent.isPersistSelection && !this.parent.isEdit || !isNullOrUndefined(this.checkedTarget) && this.checkedTarget.classList.contains("e-checkselectall")) {
                var span = this.parent.element.querySelector(".e-gridpopup").querySelector("span");
                span.classList.contains("e-rowselect") && span.classList.remove("e-spanclicked"), 
                this.clearRowSelection(), this.clearCellSelection(), this.enableSelectMultiTouch = !1;
            }
        }, Selection.prototype.clearRowSelection = function() {
            var _this = this;
            if (this.isRowSelected) {
                for (var gObj = this.parent, rows = this.parent.getDataRows(), data = [], row = [], mRow = [], rowIndex = [], frzCols = gObj.getFrozenColumns(), foreignKeyData$$1 = [], i = (this.parent.getCurrentViewRecords(), 
                0), len = this.selectedRowIndexes.length; i < len; i++) {
                    var currentRow = this.parent.getDataRows()[this.selectedRowIndexes[i]], rowObj = this.getRowObj(currentRow);
                    rowObj && (data.push(rowObj.data), row.push(currentRow), rowIndex.push(this.selectedRowIndexes[i]), 
                    foreignKeyData$$1.push(rowObj.foreignKeyData)), frzCols && mRow.push(gObj.getMovableRows()[this.selectedRowIndexes[i]]);
                }
                if (this.rowDeselect("rowDeselecting", rowIndex, data, row, foreignKeyData$$1, mRow), 
                !0 === this.isCancelDeSelect) return;
                rows.filter(function(record) {
                    return record.hasAttribute("aria-selected");
                }).forEach(function(ele) {
                    ele.removeAttribute("aria-selected"), _this.addRemoveClassesForRow(ele, !1, !0, "e-selectionbackground", "e-active"), 
                    _this.updatePersistCollection(ele, !1), _this.updateCheckBoxes(ele);
                });
                for (i = 0, len = this.selectedRowIndexes.length; i < len; i++) {
                    var movableRow = this.getSelectedMovableRow(this.selectedRowIndexes[i]);
                    movableRow && (movableRow.removeAttribute("aria-selected"), this.addRemoveClassesForRow(movableRow, !1, !0, "e-selectionbackground", "e-active"), 
                    this.updatePersistCollection(movableRow, !1));
                }
                this.selectedRowIndexes = [], this.selectedRecords = [], this.isRowSelected = !1, 
                this.parent.selectedRowIndex = -1, this.rowDeselect("rowDeselected", rowIndex, data, row, foreignKeyData$$1, mRow);
            }
        }, Selection.prototype.rowDeselect = function(type, rowIndex, data, row, foreignKeyData$$1, mRow) {
            this.updatePersistCollection(row[0], !1);
            var rowDeselectObj = {
                rowIndex: rowIndex,
                data: data,
                row: row,
                foreignKeyData: foreignKeyData$$1,
                cancel: !1
            };
            this.parent.trigger(type, this.parent.getFrozenColumns() ? __assign({}, rowDeselectObj, {
                mRow: mRow
            }) : rowDeselectObj), this.isCancelDeSelect = rowDeselectObj.cancel, this.updateCheckBoxes(row[0]);
        }, Selection.prototype.getRowObj = function(row) {
            return void 0 === row && (row = this.currentIndex), isNullOrUndefined(row) ? {} : ("number" == typeof row && (row = this.parent.getRowByIndex(row)), 
            row ? this.parent.getRowObjectFromUID(row.getAttribute("data-uid")) || {} : {});
        }, Selection.prototype.getSelectedMovableCell = function(cellIndex) {
            var gObj = this.parent, frzCols = gObj.getFrozenColumns();
            return frzCols && cellIndex.cellIndex >= frzCols ? gObj.getMovableCellFromIndex(cellIndex.rowIndex, this.getColIndex(cellIndex.rowIndex, cellIndex.cellIndex)) : null;
        }, Selection.prototype.selectCell = function(cellIndex, isToggle) {
            if (this.isCellType()) {
                var args, gObj = this.parent, selectedCell = this.getSelectedMovableCell(cellIndex);
                selectedCell || (selectedCell = gObj.getCellFromIndex(cellIndex.rowIndex, this.getColIndex(cellIndex.rowIndex, cellIndex.cellIndex))), 
                this.currentIndex = cellIndex.rowIndex;
                var selectedData = gObj.getCurrentViewRecords()[this.currentIndex];
                if (this.isCellType() && selectedCell && !this.isEditing()) {
                    var isCellSelected = selectedCell.classList.contains("e-cellselectionbackground");
                    (isToggle = isToggle ? !isUndefined(this.prevCIdxs) && cellIndex.rowIndex === this.prevCIdxs.rowIndex && cellIndex.cellIndex === this.prevCIdxs.cellIndex && isCellSelected : isToggle) || (args = {
                        data: selectedData,
                        cellIndex: cellIndex,
                        currentCell: selectedCell,
                        isCtrlPressed: this.isMultiCtrlRequest,
                        isShiftPressed: this.isMultiShiftRequest,
                        previousRowCellIndex: this.prevECIdxs,
                        previousRowCell: this.prevECIdxs ? this.getCellIndex(this.prevECIdxs.rowIndex, this.prevECIdxs.cellIndex) : void 0,
                        cancel: !1
                    }, this.onActionBegin(args, "cellSelecting")), (isNullOrUndefined(args) || !0 !== args.cancel) && (this.clearCell(), 
                    isToggle || this.updateCellSelection(selectedCell, cellIndex.rowIndex, cellIndex.cellIndex), 
                    this.updateCellProps(cellIndex, cellIndex), isToggle || this.onActionComplete({
                        data: selectedData,
                        cellIndex: cellIndex,
                        currentCell: selectedCell,
                        previousRowCellIndex: this.prevECIdxs,
                        selectedRowCellIndex: this.selectedRowCellIndexes,
                        previousRowCell: this.prevECIdxs ? this.getCellIndex(this.prevECIdxs.rowIndex, this.prevECIdxs.cellIndex) : void 0
                    }, "cellSelected"));
                }
            }
        }, Selection.prototype.getCellIndex = function(rIdx, cIdx) {
            return this.parent.getFrozenColumns() && cIdx >= this.parent.getFrozenColumns() ? this.parent.getMovableCellFromIndex(rIdx, cIdx) : this.parent.getCellFromIndex(rIdx, cIdx);
        }, Selection.prototype.selectCellsByRange = function(startIndex, endIndex) {
            if (this.isCellType()) {
                var gObj = this.parent, selectedCell = this.getSelectedMovableCell(startIndex), frzCols = gObj.getFrozenColumns();
                selectedCell || (selectedCell = gObj.getCellFromIndex(startIndex.rowIndex, startIndex.cellIndex));
                var min, max, cellIndexes, stIndex = startIndex, edIndex = endIndex = endIndex || startIndex;
                this.currentIndex = startIndex.rowIndex;
                var selectedData = gObj.getCurrentViewRecords()[this.currentIndex];
                if (!this.isSingleSel() && this.isCellType() && !this.isEditing()) {
                    var args = {
                        data: selectedData,
                        cellIndex: startIndex,
                        currentCell: selectedCell,
                        isCtrlPressed: this.isMultiCtrlRequest,
                        isShiftPressed: this.isMultiShiftRequest,
                        previousRowCellIndex: this.prevECIdxs,
                        previousRowCell: this.prevECIdxs ? this.getCellIndex(this.prevECIdxs.rowIndex, this.prevECIdxs.cellIndex) : void 0
                    };
                    if (this.onActionBegin(args, "cellSelecting"), isNullOrUndefined(args) || !0 !== args.cancel) {
                        if (this.clearCell(), startIndex.rowIndex > endIndex.rowIndex) {
                            var temp = startIndex;
                            startIndex = endIndex, endIndex = temp;
                        }
                        for (var i = startIndex.rowIndex; i <= endIndex.rowIndex; i++) {
                            "Box" !== this.selectionSettings.cellSelectionMode ? (min = i === startIndex.rowIndex ? startIndex.cellIndex : 0, 
                            max = i === endIndex.rowIndex ? endIndex.cellIndex : this.getLastColIndex(i)) : (min = startIndex.cellIndex, 
                            max = endIndex.cellIndex), cellIndexes = [];
                            for (var j = min < max ? min : max, len = min > max ? min : max; j <= len; j++) (selectedCell = frzCols ? j < frzCols ? gObj.getCellFromIndex(i, j) : gObj.getMovableCellFromIndex(i, j) : gObj.getCellFromIndex(i, j)) && (cellIndexes.push(j), 
                            this.updateCellSelection(selectedCell), this.addAttribute(selectedCell));
                            this.selectedRowCellIndexes.push({
                                rowIndex: i,
                                cellIndexes: cellIndexes
                            });
                        }
                        this.updateCellProps(stIndex, edIndex), this.onActionComplete({
                            data: selectedData,
                            cellIndex: startIndex,
                            currentCell: selectedCell,
                            previousRowCellIndex: this.prevECIdxs,
                            selectedRowCellIndex: this.selectedRowCellIndexes,
                            previousRowCell: this.prevECIdxs ? this.getCellIndex(this.prevECIdxs.rowIndex, this.prevECIdxs.cellIndex) : void 0
                        }, "cellSelected");
                    }
                }
            }
        }, Selection.prototype.selectCells = function(rowCellIndexes) {
            if (this.isCellType()) {
                var gObj = this.parent, selectedCell = this.getSelectedMovableCell(rowCellIndexes[0]), frzCols = gObj.getFrozenColumns();
                selectedCell || (selectedCell = gObj.getCellFromIndex(rowCellIndexes[0].rowIndex, rowCellIndexes[0].cellIndexes[0])), 
                this.currentIndex = rowCellIndexes[0].rowIndex;
                var selectedData = gObj.getCurrentViewRecords()[this.currentIndex];
                if (!this.isSingleSel() && this.isCellType() && !this.isEditing()) {
                    this.onActionBegin({
                        data: selectedData,
                        cellIndex: rowCellIndexes[0].cellIndexes[0],
                        currentCell: selectedCell,
                        isCtrlPressed: this.isMultiCtrlRequest,
                        isShiftPressed: this.isMultiShiftRequest,
                        previousRowCellIndex: this.prevECIdxs,
                        previousRowCell: this.prevECIdxs ? this.getCellIndex(this.prevECIdxs.rowIndex, this.prevECIdxs.cellIndex) : void 0
                    }, "cellSelecting");
                    for (var i = 0, len = rowCellIndexes.length; i < len; i++) for (var j = 0, cellLen = rowCellIndexes[i].cellIndexes.length; j < cellLen; j++) (selectedCell = frzCols ? rowCellIndexes[i].cellIndexes[j] < frzCols ? gObj.getCellFromIndex(rowCellIndexes[i].rowIndex, rowCellIndexes[i].cellIndexes[j]) : gObj.getMovableCellFromIndex(rowCellIndexes[i].rowIndex, rowCellIndexes[i].cellIndexes[j]) : gObj.getCellFromIndex(rowCellIndexes[i].rowIndex, rowCellIndexes[i].cellIndexes[j])) && (this.updateCellSelection(selectedCell), 
                    this.addAttribute(selectedCell), this.addRowCellIndex({
                        rowIndex: rowCellIndexes[i].rowIndex,
                        cellIndex: rowCellIndexes[i].cellIndexes[j]
                    }));
                    this.updateCellProps({
                        rowIndex: rowCellIndexes[0].rowIndex,
                        cellIndex: rowCellIndexes[0].cellIndexes[0]
                    }, {
                        rowIndex: rowCellIndexes[0].rowIndex,
                        cellIndex: rowCellIndexes[0].cellIndexes[0]
                    }), this.onActionComplete({
                        data: selectedData,
                        cellIndex: rowCellIndexes[0].cellIndexes[0],
                        currentCell: selectedCell,
                        previousRowCellIndex: this.prevECIdxs,
                        selectedRowCellIndex: this.selectedRowCellIndexes,
                        previousRowCell: this.prevECIdxs ? this.getCellIndex(this.prevECIdxs.rowIndex, this.prevECIdxs.cellIndex) : void 0
                    }, "cellSelected");
                }
            }
        }, Selection.prototype.addCellsToSelection = function(cellIndexes) {
            if (this.isCellType()) {
                var selectedCell, index, gObj = this.parent, frzCols = gObj.getFrozenColumns();
                this.currentIndex = cellIndexes[0].rowIndex;
                var selectedData = gObj.getCurrentViewRecords()[this.currentIndex];
                if (!this.isSingleSel() && this.isCellType() && !this.isEditing()) {
                    var rowObj;
                    rowObj = frzCols && cellIndexes[0].cellIndex >= frzCols ? gObj.getMovableRowsObject()[cellIndexes[0].rowIndex] : this.getRowObj(cellIndexes[0].rowIndex);
                    for (var foreignKeyData$$1 = [], _i = 0, cellIndexes_1 = cellIndexes; _i < cellIndexes_1.length; _i++) {
                        for (var cellIndex = cellIndexes_1[_i], i = 0, len = this.selectedRowCellIndexes.length; i < len; i++) if (this.selectedRowCellIndexes[i].rowIndex === cellIndex.rowIndex) {
                            index = i;
                            break;
                        }
                        (selectedCell = this.getSelectedMovableCell(cellIndex)) || (selectedCell = gObj.getCellFromIndex(cellIndex.rowIndex, this.getColIndex(cellIndex.rowIndex, cellIndex.cellIndex))), 
                        foreignKeyData$$1.push(rowObj.cells[frzCols && cellIndexes[0].cellIndex >= frzCols ? cellIndex.cellIndex - frzCols : cellIndex.cellIndex].foreignKeyData);
                        var args = {
                            data: selectedData,
                            cellIndex: cellIndexes[0],
                            isShiftPressed: this.isMultiShiftRequest,
                            previousRowCellIndex: this.prevECIdxs,
                            currentCell: selectedCell,
                            isCtrlPressed: this.isMultiCtrlRequest,
                            previousRowCell: this.prevECIdxs ? gObj.getCellFromIndex(this.prevECIdxs.rowIndex, this.prevECIdxs.cellIndex) : void 0
                        }, isUnSelected = index > -1;
                        if (isUnSelected) {
                            var selectedCellIdx = this.selectedRowCellIndexes[index].cellIndexes;
                            selectedCellIdx.indexOf(cellIndex.cellIndex) > -1 ? (this.cellDeselect("cellDeselecting", [ {
                                rowIndex: cellIndex.rowIndex,
                                cellIndexes: [ cellIndex.cellIndex ]
                            } ], selectedData, [ selectedCell ], foreignKeyData$$1), selectedCellIdx.splice(selectedCellIdx.indexOf(cellIndex.cellIndex), 1), 
                            selectedCell.classList.remove("e-cellselectionbackground"), selectedCell.removeAttribute("aria-selected"), 
                            this.cellDeselect("cellDeselected", [ {
                                rowIndex: cellIndex.rowIndex,
                                cellIndexes: [ cellIndex.cellIndex ]
                            } ], selectedData, [ selectedCell ], foreignKeyData$$1)) : (isUnSelected = !1, this.onActionBegin(args, "cellSelecting"), 
                            this.addRowCellIndex({
                                rowIndex: cellIndex.rowIndex,
                                cellIndex: cellIndex.cellIndex
                            }), this.updateCellSelection(selectedCell), this.addAttribute(selectedCell));
                        } else this.onActionBegin(args, "cellSelecting"), this.updateCellSelection(selectedCell, cellIndex.rowIndex, cellIndex.cellIndex);
                        this.updateCellProps(cellIndex, cellIndex), isUnSelected || this.onActionComplete({
                            data: selectedData,
                            cellIndex: cellIndexes[0],
                            currentCell: selectedCell,
                            previousRowCell: this.prevECIdxs ? this.getCellIndex(this.prevECIdxs.rowIndex, this.prevECIdxs.cellIndex) : void 0,
                            previousRowCellIndex: this.prevECIdxs,
                            selectedRowCellIndex: this.selectedRowCellIndexes
                        }, "cellSelected");
                    }
                }
            }
        }, Selection.prototype.getColIndex = function(rowIndex, index) {
            var cells, frzCols = this.parent.getFrozenColumns();
            frzCols && index >= frzCols && (cells = this.parent.getMovableDataRows()[rowIndex].querySelectorAll("td.e-rowcell")), 
            cells || (cells = this.parent.getDataRows()[rowIndex].querySelectorAll("td.e-rowcell"));
            for (var m = 0; m < cells.length; m++) {
                if (parseInt(cells[m].getAttribute("aria-colindex"), 10) === index) return frzCols && index >= frzCols && (m += frzCols), 
                m;
            }
            return -1;
        }, Selection.prototype.getLastColIndex = function(rowIndex) {
            var cells = this.parent.getFrozenColumns() ? this.parent.getMovableDataRows()[rowIndex].querySelectorAll("td.e-rowcell") : this.parent.getDataRows()[rowIndex].querySelectorAll("td.e-rowcell");
            return parseInt(cells[cells.length - 1].getAttribute("aria-colindex"), 10);
        }, Selection.prototype.clearCell = function() {
            this.clearCellSelection();
        }, Selection.prototype.cellDeselect = function(type, cellIndexes, data, cells, foreignKeyData$$1) {
            cells[0] && cells[0].classList.contains("e-gridchkbox") && this.updateCheckBoxes(closest(cells[0], "tr"));
            var args = {
                cells: cells,
                data: data,
                cellIndexes: cellIndexes,
                foreignKeyData: foreignKeyData$$1,
                cancel: !1
            };
            this.parent.trigger(type, args), this.isPreventCellSelect = args.cancel;
        }, Selection.prototype.updateCellSelection = function(selectedCell, rowIndex, cellIndex) {
            isNullOrUndefined(rowIndex) || this.addRowCellIndex({
                rowIndex: rowIndex,
                cellIndex: cellIndex
            }), selectedCell.classList.add("e-cellselectionbackground"), selectedCell.classList.contains("e-gridchkbox") && this.updateCheckBoxes(closest(selectedCell, "tr"), !0), 
            this.addAttribute(selectedCell);
        }, Selection.prototype.addAttribute = function(cell) {
            this.target = cell, isNullOrUndefined(cell) || (cell.setAttribute("aria-selected", "true"), 
            this.preventFocus || this.focus.onClick({
                target: cell
            }, !0));
        }, Selection.prototype.updateCellProps = function(startIndex, endIndex) {
            this.prevCIdxs = startIndex, this.prevECIdxs = endIndex, this.isCellSelected = this.selectedRowCellIndexes.length && !0;
        }, Selection.prototype.addRowCellIndex = function(rowCellIndex) {
            for (var isRowAvail, index, i = 0, len = this.selectedRowCellIndexes.length; i < len; i++) if (this.selectedRowCellIndexes[i].rowIndex === rowCellIndex.rowIndex) {
                isRowAvail = !0, index = i;
                break;
            }
            isRowAvail ? this.selectedRowCellIndexes[index].cellIndexes.indexOf(rowCellIndex.cellIndex) < 0 && this.selectedRowCellIndexes[index].cellIndexes.push(rowCellIndex.cellIndex) : this.selectedRowCellIndexes.push({
                rowIndex: rowCellIndex.rowIndex,
                cellIndexes: [ rowCellIndex.cellIndex ]
            });
        }, Selection.prototype.clearCellSelection = function() {
            if (this.isCellSelected) {
                for (var gObj = this.parent, selectedCells = this.getSelectedCellsElement(), rowCell = this.selectedRowCellIndexes, data = [], cells = [], foreignKeyData$$1 = [], currentViewData = gObj.getCurrentViewRecords(), frzCols = gObj.getFrozenColumns(), i = 0, len = rowCell.length; i < len; i++) {
                    data.push(currentViewData[rowCell[i].rowIndex]);
                    for (var rowObj = this.getRowObj(rowCell[i].rowIndex), j = 0, cLen = rowCell[i].cellIndexes.length; j < cLen; j++) frzCols ? rowCell[i].cellIndexes[j] < frzCols ? cells.push(gObj.getCellFromIndex(rowCell[i].rowIndex, rowCell[i].cellIndexes[j])) : cells.push(gObj.getMovableCellFromIndex(rowCell[i].rowIndex, rowCell[i].cellIndexes[j])) : (foreignKeyData$$1.push(rowObj.cells[rowCell[i].cellIndexes[j]].foreignKeyData), 
                    cells.push(gObj.getCellFromIndex(rowCell[i].rowIndex, rowCell[i].cellIndexes[j])));
                }
                if (this.cellDeselect("cellDeselecting", rowCell, data, cells, foreignKeyData$$1), 
                !0 === this.isPreventCellSelect) return;
                for (i = 0, len = selectedCells.length; i < len; i++) selectedCells[i].classList.remove("e-cellselectionbackground"), 
                selectedCells[i].removeAttribute("aria-selected");
                this.selectedRowCellIndexes = [], this.isCellSelected = !1, this.cellDeselect("cellDeselected", rowCell, data, cells, foreignKeyData$$1);
            }
        }, Selection.prototype.getSelectedCellsElement = function() {
            var mRows, gObj = this.parent, rows = gObj.getDataRows();
            gObj.getFrozenColumns() && (mRows = gObj.getMovableDataRows(), rows = gObj.addMovableRows(rows, mRows));
            for (var cells = [], i = 0, len = rows.length; i < len; i++) cells = cells.concat([].slice.call(rows[i].querySelectorAll(".e-cellselectionbackground")));
            return cells;
        }, Selection.prototype.mouseMoveHandler = function(e) {
            e.preventDefault();
            var tmp, gBRect = this.parent.element.getBoundingClientRect(), x1 = this.x, y1 = this.y, position = getPosition(e), x2 = position.x - gBRect.left, y2 = position.y - gBRect.top, target = closest(e.target, "tr");
            if (this.isDragged = !0, this.isCellDrag || (target || (target = closest(document.elementFromPoint(this.parent.element.offsetLeft + 2, e.clientY), "tr")), 
            x1 > x2 && (tmp = x2, x2 = x1, x1 = tmp), y1 > y2 && (tmp = y2, y2 = y1, y1 = tmp), 
            this.element.style.left = x1 + "px", this.element.style.top = y1 + "px", this.element.style.width = x2 - x1 + "px", 
            this.element.style.height = y2 - y1 + "px"), target && !e.ctrlKey && !e.shiftKey) {
                var rowIndex = parseInt(target.getAttribute("aria-rowindex"), 10);
                if (this.isCellDrag) {
                    var td = parentsUntil(e.target, "e-rowcell");
                    td && this.selectLikeExcel(rowIndex, parseInt(td.getAttribute("aria-colindex"), 10));
                } else this.selectRowsByRange(this.startIndex, rowIndex);
            }
        }, Selection.prototype.selectLikeExcel = function(rowIndex, cellIndex) {
            this.clearCellSelection(), this.selectCellsByRange({
                rowIndex: this.startIndex,
                cellIndex: this.startCellIndex
            }, {
                rowIndex: rowIndex,
                cellIndex: cellIndex
            });
        }, Selection.prototype.mouseUpHandler = function(e) {
            document.body.classList.remove("e-disableuserselect"), this.element && remove(this.element), 
            EventHandler.remove(this.parent.getContent(), "mousemove", this.mouseMoveHandler), 
            EventHandler.remove(document.body, "mouseup", this.mouseUpHandler), this.isDragged = !1;
        }, Selection.prototype.mouseDownHandler = function(e) {
            var isDrag, target = e.target, gObj = this.parent, gridElement = parentsUntil(target, "e-grid");
            if ((!gridElement || gridElement.id === gObj.element.id) && ((e.shiftKey || e.ctrlKey) && e.preventDefault(), 
            target.classList.contains("e-rowcell") && !e.shiftKey && !e.ctrlKey)) {
                if ("Box" !== gObj.selectionSettings.cellSelectionMode || this.isRowType() || this.isSingleSel()) {
                    if (gObj.allowRowDragAndDrop) {
                        if (!this.isRowType() || this.isSingleSel() || closest(target, "td").classList.contains("e-selectionbackground")) return void (this.isDragged = !1);
                        isDrag = !0, this.element = createElement("div", {
                            className: "e-griddragarea"
                        }), gObj.getContent().appendChild(this.element);
                    }
                } else this.isCellDrag = !0, isDrag = !0;
                if (isDrag) {
                    var tr = closest(e.target, "tr");
                    this.startIndex = parseInt(tr.getAttribute("aria-rowindex"), 10), this.startCellIndex = parseInt(parentsUntil(target, "e-rowcell").getAttribute("aria-colindex"), 10), 
                    document.body.classList.add("e-disableuserselect");
                    var gBRect = gObj.element.getBoundingClientRect(), postion = getPosition(e);
                    this.x = postion.x - gBRect.left, this.y = postion.y - gBRect.top, EventHandler.add(gObj.getContent(), "mousemove", this.mouseMoveHandler, this), 
                    EventHandler.add(document.body, "mouseup", this.mouseUpHandler, this);
                }
            }
        }, Selection.prototype.clearSelAfterRefresh = function(e) {
            "virtualscroll" === e.requestType || this.parent.isPersistSelection || this.clearSelection();
        }, Selection.prototype.addEventListener = function() {
            this.parent.isDestroyed || (this.parent.on(initialEnd, this.initializeSelection, this), 
            this.parent.on("rowselected", this.onActionComplete, this), this.parent.on("cellselected", this.onActionComplete, this), 
            this.parent.on(inBoundModelChanged, this.onPropertyChanged, this), this.parent.on("cellfocused", this.onCellFocused, this), 
            this.parent.on(dataReady, this.clearSelAfterRefresh, this), this.parent.on(columnPositionChanged, this.columnPositionChanged, this), 
            this.parent.on(contentReady, this.initialEnd, this), this.actionBeginFunction = this.actionBegin.bind(this), 
            this.actionCompleteFunction = this.actionComplete.bind(this), this.parent.addEventListener(actionBegin, this.actionBeginFunction), 
            this.parent.addEventListener(actionComplete, this.actionCompleteFunction), this.parent.on(rowsRemoved, this.rowsRemoved, this), 
            this.parent.on(headerRefreshed, this.refreshHeader, this), this.addEventListener_checkbox());
        }, Selection.prototype.removeEventListener = function() {
            this.parent.isDestroyed || (this.parent.off(initialEnd, this.initializeSelection), 
            this.parent.off("rowselected", this.onActionComplete), this.parent.off("cellselected", this.onActionComplete), 
            this.parent.off(inBoundModelChanged, this.onPropertyChanged), this.parent.off("cellfocused", this.onCellFocused), 
            this.parent.off(dataReady, this.clearSelAfterRefresh), this.parent.off(columnPositionChanged, this.columnPositionChanged), 
            this.parent.removeEventListener(actionBegin, this.actionBeginFunction), this.parent.removeEventListener(actionComplete, this.actionCompleteFunction), 
            this.parent.off(rowsRemoved, this.rowsRemoved), this.parent.off(headerRefreshed, this.refreshHeader), 
            this.removeEventListener_checkbox());
        }, Selection.prototype.columnPositionChanged = function() {
            this.parent.isPersistSelection || this.clearSelection();
        }, Selection.prototype.refreshHeader = function() {
            this.setCheckAllState();
        }, Selection.prototype.rowsRemoved = function(e) {
            for (var i = 0; i < e.records.length; i++) delete this.selectedRowState[e.records[i][this.primaryKey]], 
            --this.totalRecordsCount;
            this.setCheckAllState();
        }, Selection.prototype.dataReady = function(e) {
            "virtualscroll" === e.requestType || this.parent.isPersistSelection || this.clearSelection();
        }, Selection.prototype.getCheckAllBox = function() {
            return this.parent.getHeaderContent().querySelector(".e-checkselectall");
        }, Selection.prototype.onPropertyChanged = function(e) {
            if (e.module === this.getModuleName()) {
                this.parent;
                isNullOrUndefined(e.properties.type) || "Single" !== this.selectionSettings.type || (this.selectedRowCellIndexes.length > 1 && this.clearCellSelection(), 
                this.selectedRowIndexes.length > 1 && this.clearRowSelection(), this.enableSelectMultiTouch = !1, 
                this.hidePopUp()), isNullOrUndefined(e.properties.mode) && isNullOrUndefined(e.properties.cellSelectionMode) || this.clearSelection(), 
                this.checkBoxSelectionChanged(), this.initPerisistSelection();
            }
        }, Selection.prototype.hidePopUp = function() {
            this.parent.element.querySelector(".e-gridpopup").querySelectorAll(".e-rowselect").length && (this.parent.element.querySelector(".e-gridpopup").style.display = "none");
        }, Selection.prototype.initialEnd = function() {
            this.parent.off(contentReady, this.initialEnd), this.selectRow(this.parent.selectedRowIndex);
        }, Selection.prototype.checkBoxSelectionChanged = function() {
            this.parent.off(contentReady, this.checkBoxSelectionChanged);
            var gobj = this.parent, checkboxColumn = gobj.getColumns().filter(function(col) {
                return "checkbox" === col.type;
            });
            checkboxColumn.length > 0 && (gobj.isCheckBoxSelection = !0, this.chkField = checkboxColumn[0].field, 
            this.totalRecordsCount = this.parent.pageSettings.totalRecordsCount, isNullOrUndefined(this.totalRecordsCount) && (this.totalRecordsCount = this.parent.getCurrentViewRecords().length), 
            this.isSingleSel() ? (gobj.selectionSettings.type = "Multiple", gobj.dataBind()) : this.initPerisistSelection()), 
            gobj.isCheckBoxSelection || (this.chkField = null, this.initPerisistSelection());
        }, Selection.prototype.initPerisistSelection = function() {
            var gobj = this.parent;
            this.parent.selectionSettings.persistSelection && this.parent.getPrimaryKeyFieldNames().length > 0 ? (gobj.isPersistSelection = !0, 
            this.ensureCheckboxFieldSelection()) : this.parent.getPrimaryKeyFieldNames().length > 0 ? (gobj.isPersistSelection = !1, 
            this.ensureCheckboxFieldSelection()) : (gobj.isPersistSelection = !1, this.selectedRowState = {});
        }, Selection.prototype.ensureCheckboxFieldSelection = function() {
            var gobj = this.parent;
            if (this.primaryKey = this.parent.getPrimaryKeyFieldNames()[0], !gobj.enableVirtualization && this.chkField && (gobj.isPersistSelection && 0 === Object.keys(this.selectedRowState).length || !gobj.isPersistSelection)) {
                var data = this.parent.getDataModule(), query = new Query().where(this.chkField, "equal", !0), dataManager = data.getData({}, query), proxy_1 = this;
                this.parent.showSpinner(), dataManager.then(function(e) {
                    proxy_1.dataSuccess(e.result), proxy_1.refreshPersistSelection(), proxy_1.parent.hideSpinner();
                });
            }
        }, Selection.prototype.dataSuccess = function(res) {
            for (var i = 0; i < res.length; i++) isNullOrUndefined(this.selectedRowState[res[i][this.primaryKey]]) && res[i][this.chkField] && (this.selectedRowState[res[i][this.primaryKey]] = res[i][this.chkField]);
            this.persistSelectedData = res;
        }, Selection.prototype.setRowSelection = function(state) {
            if (!this.parent.getDataModule().isRemote()) if (state) for (var _i = 0, _a = this.getData(); _i < _a.length; _i++) {
                var data = _a[_i];
                this.selectedRowState[data[this.primaryKey]] = !0;
            } else this.selectedRowState = {};
        }, Selection.prototype.getData = function() {
            return this.parent.getDataModule().dataManager.dataSource.json;
        }, Selection.prototype.refreshPersistSelection = function() {
            var rows = this.parent.getRows();
            if (rows.length > 0 && (this.parent.isPersistSelection || this.chkField)) {
                for (var indexes = [], j = 0; j < rows.length; j++) {
                    var rowObj = this.getRowObj(rows[j]), pKey = rowObj ? rowObj.data[this.primaryKey] : null;
                    if (null === pKey) return;
                    var checkState = void 0, chkBox = rows[j].querySelector(".e-checkselect");
                    this.selectedRowState[pKey] || "Check" === this.parent.checkAllRows && this.chkAllCollec.indexOf(pKey) < 0 || "Uncheck" === this.parent.checkAllRows && this.chkAllCollec.indexOf(pKey) > 0 || "Intermediate" === this.parent.checkAllRows && !isNullOrUndefined(this.chkField) && rowObj.data[this.chkField] ? (indexes.push(parseInt(rows[j].getAttribute("aria-rowindex"), 10)), 
                    checkState = !0) : (checkState = !1, this.checkedTarget !== chkBox && this.parent.isCheckBoxSelection && removeAddCboxClasses(chkBox.nextElementSibling, checkState)), 
                    this.updatePersistCollection(rows[j], checkState);
                }
                this.isSingleSel() && indexes.length > 0 ? this.selectRow(indexes[0], !0) : this.selectRows(indexes);
            }
            this.parent.isCheckBoxSelection && this.parent.getCurrentViewRecords().length > 0 && this.setCheckAllState();
        }, Selection.prototype.actionBegin = function(e) {
            if ("save" === e.requestType && this.parent.isPersistSelection) {
                var editChkBox = this.parent.element.querySelector(".e-edit-checkselect");
                if (!isNullOrUndefined(editChkBox)) {
                    var row = closest(editChkBox, ".e-editedrow");
                    if (row) {
                        "Dialog" === this.parent.editSettings.mode && (row = this.parent.element.querySelector(".e-dlgeditrow"));
                        var rowObj = this.getRowObj(row);
                        if (!rowObj) return;
                        this.selectedRowState[rowObj.data[this.primaryKey]] = rowObj.isSelected = editChkBox.checked;
                    } else this.isCheckedOnAdd = editChkBox.checked;
                }
            }
        }, Selection.prototype.actionComplete = function(e) {
            if ("save" === e.requestType && this.parent.isPersistSelection) {
                if ("add" === e.action && this.isCheckedOnAdd) {
                    var rowObj = this.parent.getRowObjectFromUID(this.parent.getRows()[e.selectedRow].getAttribute("data-uid"));
                    this.selectedRowState[rowObj.data[this.primaryKey]] = rowObj.isSelected = this.isCheckedOnAdd;
                }
                this.refreshPersistSelection();
            }
        }, Selection.prototype.onDataBound = function() {
            !this.parent.enableVirtualization && this.parent.isPersistSelection && this.refreshPersistSelection();
        }, Selection.prototype.checkSelectAllAction = function(checkState) {
            var cRenderer = this.getRenderer(), editForm = this.parent.element.querySelector(".e-gridform");
            if (this.checkedTarget = this.getCheckAllBox(), checkState && this.parent.getCurrentViewRecords().length ? (this.selectRowsByRange(cRenderer.getVirtualRowIndex(0), cRenderer.getVirtualRowIndex(this.parent.getCurrentViewRecords().length)), 
            this.parent.checkAllRows = "Check") : (this.clearSelection(), this.parent.checkAllRows = "Uncheck"), 
            this.chkAllCollec = [], this.parent.isPersistSelection) {
                for (var rows = this.parent.getRows(), i = 0; i < rows.length; i++) this.updatePersistCollection(rows[i], checkState);
                "Uncheck" === this.parent.checkAllRows ? (this.setRowSelection(!1), this.persistSelectedData = []) : "Check" === this.parent.checkAllRows && (this.setRowSelection(!0), 
                this.persistSelectedData = this.getData().slice());
            }
            if (!isNullOrUndefined(editForm)) {
                removeAddCboxClasses(editForm.querySelector(".e-edit-checkselect").nextElementSibling, checkState);
            }
        }, Selection.prototype.checkSelectAll = function(checkBox) {
            var state = "Check" === this.getCheckAllStatus(checkBox);
            this.checkSelectAllAction(!state), this.target = null, this.parent.getCurrentViewRecords().length > 0 && this.setCheckAllState(), 
            this.triggerChkChangeEvent(checkBox, !state);
        }, Selection.prototype.getCheckAllStatus = function(ele) {
            var classes = ele ? ele.nextElementSibling.classList : this.getCheckAllBox().nextElementSibling.classList;
            return classes.contains("e-check") ? "Check" : classes.contains("e-uncheck") ? "Uncheck" : classes.contains("e-stop") ? "Intermediate" : "None";
        }, Selection.prototype.checkSelect = function(checkBox) {
            var target = closest(this.checkedTarget, ".e-rowcell");
            this.isMultiCtrlRequest = !0;
            var rIndex = parseInt(target.parentElement.getAttribute("aria-rowindex"), 10);
            this.parent.isPersistSelection && this.parent.element.querySelectorAll(".e-addedrow").length > 0 && ++rIndex, 
            this.rowCellSelectionHandler(rIndex, parseInt(target.getAttribute("aria-colindex"), 10)), 
            this.moveIntoUncheckCollection(closest(target, ".e-row")), this.setCheckAllState(), 
            this.isMultiCtrlRequest = !1, this.triggerChkChangeEvent(checkBox, checkBox.nextElementSibling.classList.contains("e-check"));
        }, Selection.prototype.moveIntoUncheckCollection = function(row) {
            if ("Check" === this.parent.checkAllRows || "Uncheck" === this.parent.checkAllRows) {
                var rowObj = this.getRowObj(row), pKey = rowObj && rowObj.data ? rowObj.data[this.primaryKey] : null;
                if (!pKey) return;
                this.chkAllCollec.indexOf(pKey) < 0 ? this.chkAllCollec.push(pKey) : this.chkAllCollec.splice(this.chkAllCollec.indexOf(pKey), 1);
            }
        }, Selection.prototype.triggerChkChangeEvent = function(checkBox, checkState) {
            this.parent.trigger("checkBoxChange", {
                checked: checkState,
                selectedRowIndexes: this.parent.getSelectedRowIndexes(),
                target: checkBox
            }), this.parent.isEdit || (this.checkedTarget = null);
        }, Selection.prototype.setCheckAllState = function(isInteraction) {
            if (this.parent.isCheckBoxSelection) {
                var checkedLen = Object.keys(this.selectedRowState).length;
                if (this.parent.isPersistSelection || (checkedLen = this.selectedRecords.length, 
                this.totalRecordsCount = this.parent.getCurrentViewRecords().length), this.getCheckAllBox()) {
                    var spanEle = this.getCheckAllBox().nextElementSibling;
                    removeClass([ spanEle ], [ "e-check", "e-stop", "e-uncheck" ]), checkedLen === this.totalRecordsCount ? (addClass([ spanEle ], [ "e-check" ]), 
                    isInteraction && this.getRenderer().setSelection(null, !0, !0), this.parent.checkAllRows = "Check") : 0 === checkedLen || 0 === this.parent.getCurrentViewRecords().length ? (addClass([ spanEle ], [ "e-uncheck" ]), 
                    isInteraction && this.getRenderer().setSelection(null, !1, !0), this.parent.checkAllRows = "Uncheck") : (addClass([ spanEle ], [ "e-stop" ]), 
                    this.parent.checkAllRows = "Intermediate");
                }
            }
        }, Selection.prototype.clickHandler = function(e) {
            var target = e.target;
            this.isMultiCtrlRequest = e.ctrlKey || this.enableSelectMultiTouch, this.isMultiShiftRequest = e.shiftKey, 
            this.popUpClickHandler(e);
            var chkSelect = !1;
            this.preventFocus = !0;
            var checkBox, checkWrap = parentsUntil(target, "e-checkbox-wrapper");
            if (checkWrap && checkWrap.querySelectorAll(".e-checkselect,.e-checkselectall").length > 0 && (checkBox = checkWrap.querySelector('input[type="checkbox"]'), 
            chkSelect = !0), (target = parentsUntil(target, "e-rowcell")) && target.parentElement.classList.contains("e-row") && !this.parent.selectionSettings.checkboxOnly || chkSelect) {
                if (this.parent.isCheckBoxSelection && (this.isMultiCtrlRequest = !0), this.target = target, 
                isNullOrUndefined(checkBox)) {
                    var rIndex = parseInt(target.parentElement.getAttribute("aria-rowindex"), 10);
                    this.parent.isPersistSelection && this.parent.element.querySelectorAll(".e-addedrow").length > 0 && ++rIndex, 
                    this.rowCellSelectionHandler(rIndex, parseInt(target.getAttribute("aria-colindex"), 10)), 
                    this.parent.isCheckBoxSelection && (this.moveIntoUncheckCollection(closest(target, ".e-row")), 
                    this.setCheckAllState());
                } else this.checkedTarget = checkBox, checkBox.classList.contains("e-checkselectall") ? this.checkSelectAll(checkBox) : (this.checkSelect(checkBox), 
                this.target = closest(target, ".e-rowcell"));
                this.parent.isCheckBoxSelection || !Browser.isDevice || this.isSingleSel() || this.showPopup(e);
            }
            this.isMultiCtrlRequest = !1, this.isMultiShiftRequest = !1, this.preventFocus = !1;
        }, Selection.prototype.popUpClickHandler = function(e) {
            var target = e.target;
            closest(target, ".e-headercell") || e.target.classList.contains("e-rowcell") || closest(target, ".e-gridpopup") ? target.classList.contains("e-rowselect") && (target.classList.contains("e-spanclicked") ? (target.classList.remove("e-spanclicked"), 
            this.enableSelectMultiTouch = !1, this.parent.element.querySelector(".e-gridpopup").style.display = "none") : (target.classList.add("e-spanclicked"), 
            this.enableSelectMultiTouch = !0)) : this.parent.element.querySelector(".e-gridpopup").style.display = "none";
        }, Selection.prototype.showPopup = function(e) {
            setCssInGridPopUp(this.parent.element.querySelector(".e-gridpopup"), e, "e-rowselect e-icons e-icon-rowselect" + (!this.isSingleSel() && (this.selectedRecords.length > (this.parent.getFrozenColumns() ? 2 : 1) || this.selectedRowCellIndexes.length > 1) ? " e-spanclicked" : ""));
        }, Selection.prototype.rowCellSelectionHandler = function(rowIndex, cellIndex) {
            !this.isMultiCtrlRequest && !this.isMultiShiftRequest || this.isSingleSel() ? (this.isDragged || this.selectRow(rowIndex, !0), 
            this.selectCell({
                rowIndex: rowIndex,
                cellIndex: cellIndex
            }, !0)) : this.isMultiShiftRequest ? (this.selectRowsByRange(isUndefined(this.prevRowIndex) ? rowIndex : this.prevRowIndex, rowIndex), 
            this.selectCellsByRange(isUndefined(this.prevCIdxs) ? {
                rowIndex: rowIndex,
                cellIndex: cellIndex
            } : this.prevCIdxs, {
                rowIndex: rowIndex,
                cellIndex: cellIndex
            })) : (this.addRowsToSelection([ rowIndex ]), this.addCellsToSelection([ {
                rowIndex: rowIndex,
                cellIndex: cellIndex
            } ])), this.isDragged = !1;
        }, Selection.prototype.onCellFocused = function(e) {
            if (this.parent.frozenRows && e.container.isHeader && e.byKey) if ("upArrow" === e.keyArgs.action) this.parent.allowFiltering ? e.isJump = "INPUT" === e.element.tagName : e.isJump = "TH" === e.element.tagName; else if ("downArrow" === e.keyArgs.action) {
                var rIdx = Number(e.element.parentElement.getAttribute("aria-rowindex"));
                e.isJump = 0 === rIdx;
            } else "ctrlHome" === e.keyArgs.action && (e.isJump = !0);
            var clear = this.parent.getFrozenColumns() ? (e.container.isHeader && "TD" !== e.element.tagName && e.isJump || (e.container.isContent || "TD" === e.element.tagName) && !(e.container.isSelectable || "TD" === e.element.tagName)) && !(e.byKey && "space" === e.keyArgs.action) : (e.container.isHeader && e.isJump || e.container.isContent && !e.container.isSelectable) && !(e.byKey && "space" === e.keyArgs.action), headerAction = e.container.isHeader && "TD" !== e.element.tagName && !closest(e.element, ".e-rowcell") && !(e.byKey && "space" === e.keyArgs.action);
            if (e.byKey && !clear) {
                var _a = e.container.isContent ? e.container.indexes : e.indexes, rowIndex = _a[0], cellIndex = _a[1], prev = this.focus.getPrevIndexes();
                if (this.parent.frozenRows) {
                    if (e.container.isHeader && ("TD" === e.element.tagName || closest(e.element, ".e-rowcell"))) {
                        var thLen = this.parent.getHeaderTable().querySelector("thead").childElementCount;
                        rowIndex -= thLen, prev.rowIndex = prev.rowIndex ? prev.rowIndex - thLen : null;
                    } else rowIndex += this.parent.frozenRows, prev.rowIndex = 0 !== prev.rowIndex && isNullOrUndefined(prev.rowIndex) ? null : prev.rowIndex + this.parent.frozenRows;
                    if (this.parent.getFrozenColumns()) {
                        var cIdx = Number(e.element.getAttribute("aria-colindex"));
                        prev.cellIndex = prev.cellIndex ? prev.cellIndex === cellIndex ? cIdx : cIdx - 1 : null, 
                        cellIndex = cIdx;
                    }
                }
                if (!(headerAction || -1 === [ "ctrlPlusA", "escape" ].indexOf(e.keyArgs.action) && "space" !== e.keyArgs.action && rowIndex === prev.rowIndex && cellIndex === prev.cellIndex)) {
                    switch (this.preventFocus = !0, e.keyArgs.action) {
                      case "downArrow":
                      case "upArrow":
                      case "enter":
                      case "shiftEnter":
                        this.applyDownUpKey(rowIndex, cellIndex);
                        break;

                      case "rightArrow":
                      case "leftArrow":
                        this.applyRightLeftKey(rowIndex, cellIndex);
                        break;

                      case "shiftDown":
                      case "shiftUp":
                        this.shiftDownKey(rowIndex, cellIndex);
                        break;

                      case "shiftLeft":
                      case "shiftRight":
                        this.applyShiftLeftRightKey(rowIndex, cellIndex);
                        break;

                      case "home":
                      case "end":
                        cellIndex = "end" === e.keyArgs.action ? this.getLastColIndex(rowIndex) : 0, this.applyHomeEndKey(rowIndex, cellIndex);
                        break;

                      case "ctrlHome":
                      case "ctrlEnd":
                        this.applyCtrlHomeEndKey(rowIndex, cellIndex);
                        break;

                      case "escape":
                        this.clearSelection();
                        break;

                      case "ctrlPlusA":
                        this.ctrlPlusA();
                        break;

                      case "space":
                        this.applySpaceSelection(e.element);
                    }
                    this.preventFocus = !1;
                }
            } else clear && this.clearSelection();
        }, Selection.prototype.ctrlPlusA = function() {
            this.isRowType() && !this.isSingleSel() && this.selectRowsByRange(0, this.parent.getRows().length - 1), 
            this.isCellType() && !this.isSingleSel() && this.selectCellsByRange({
                rowIndex: 0,
                cellIndex: 0
            }, {
                rowIndex: this.parent.getRows().length - 1,
                cellIndex: this.parent.getColumns().length - 1
            });
        }, Selection.prototype.applySpaceSelection = function(target) {
            target.classList.contains("e-checkselectall") ? (this.checkedTarget = target, this.checkSelectAll(this.checkedTarget)) : target.classList.contains("e-checkselect") && (this.checkedTarget = target, 
            this.checkSelect(this.checkedTarget));
        }, Selection.prototype.applyDownUpKey = function(rowIndex, cellIndex) {
            var gObj = this.parent;
            this.parent.isCheckBoxSelection && "Check" === this.parent.checkAllRows && (this.checkSelectAllAction(!1), 
            this.checkedTarget = null), this.isRowType() && (this.parent.frozenRows, this.selectRow(rowIndex, !0), 
            this.applyUpDown(gObj.selectedRowIndex)), this.isCellType() && this.selectCell({
                rowIndex: rowIndex,
                cellIndex: cellIndex
            }, !0);
        }, Selection.prototype.applyUpDown = function(rowIndex) {
            if (!(rowIndex < 0)) {
                this.target || (this.target = this.parent.getRows()[0].children[this.parent.groupSettings.columns.length || 0]);
                var cIndex = parseInt(this.target.getAttribute("aria-colindex"), 10), frzCols = this.parent.getFrozenColumns();
                this.target = frzCols && cIndex >= frzCols ? this.contentRenderer.getMovableRowByIndex(rowIndex).querySelectorAll(".e-rowcell")[cIndex - frzCols] : this.contentRenderer.getRowByIndex(rowIndex).querySelectorAll(".e-rowcell")[cIndex], 
                this.addAttribute(this.target);
            }
        }, Selection.prototype.applyRightLeftKey = function(rowIndex, cellIndex) {
            this.parent;
            this.isCellType() && (this.selectCell({
                rowIndex: rowIndex,
                cellIndex: cellIndex
            }, !0), this.addAttribute(this.target));
        }, Selection.prototype.applyHomeEndKey = function(rowIndex, cellIndex) {
            this.isCellType() ? this.selectCell({
                rowIndex: rowIndex,
                cellIndex: cellIndex
            }, !0) : this.addAttribute(this.parent.getCellFromIndex(rowIndex, cellIndex));
        }, Selection.prototype.shiftDownKey = function(rowIndex, cellIndex) {
            this.parent;
            this.isMultiShiftRequest = !0, this.isRowType() && !this.isSingleSel() && (isUndefined(this.prevRowIndex) ? this.selectRow(0, !0) : (this.selectRowsByRange(this.prevRowIndex, rowIndex), 
            this.applyUpDown(rowIndex))), this.isCellType() && !this.isSingleSel() && this.selectCellsByRange(this.prevCIdxs || {
                rowIndex: 0,
                cellIndex: 0
            }, {
                rowIndex: rowIndex,
                cellIndex: cellIndex
            }), this.isMultiShiftRequest = !1;
        }, Selection.prototype.applyShiftLeftRightKey = function(rowIndex, cellIndex) {
            this.parent;
            this.isMultiShiftRequest = !0, this.selectCellsByRange(this.prevCIdxs, {
                rowIndex: rowIndex,
                cellIndex: cellIndex
            }), this.isMultiShiftRequest = !1;
        }, Selection.prototype.applyCtrlHomeEndKey = function(rowIndex, cellIndex) {
            this.isRowType() && (this.selectRow(rowIndex, !0), this.addAttribute(this.parent.getCellFromIndex(rowIndex, cellIndex))), 
            this.isCellType() && this.selectCell({
                rowIndex: rowIndex,
                cellIndex: cellIndex
            }, !0);
        }, Selection.prototype.addRemoveClassesForRow = function(row, isAdd, clearAll) {
            for (var args = [], _i = 3; _i < arguments.length; _i++) args[_i - 3] = arguments[_i];
            if (row) {
                var cells = [].slice.call(row.querySelectorAll(".e-rowcell")), cell = row.querySelector(".e-detailrowcollapse") || row.querySelector(".e-detailrowexpand");
                cell && cells.push(cell), addRemoveActiveClasses.apply(void 0, [ cells, isAdd ].concat(args));
            }
            this.getRenderer().setSelection(row ? row.getAttribute("data-uid") : null, isAdd, clearAll);
        }, Selection.prototype.isRowType = function() {
            return "Row" === this.selectionSettings.mode || "Both" === this.selectionSettings.mode;
        }, Selection.prototype.isCellType = function() {
            return "Cell" === this.selectionSettings.mode || "Both" === this.selectionSettings.mode;
        }, Selection.prototype.isSingleSel = function() {
            return "Single" === this.selectionSettings.type;
        }, Selection.prototype.getRenderer = function() {
            return isNullOrUndefined(this.contentRenderer) && (this.contentRenderer = this.factory.getRenderer(RenderType.Content)), 
            this.contentRenderer;
        }, Selection.prototype.getSelectedRecords = function() {
            return this.selectionSettings.persistSelection ? this.persistSelectedData : this.parent.getRowsObject().filter(function(row) {
                return row.isSelected;
            }).map(function(m) {
                return m.data;
            });
        }, Selection.prototype.addEventListener_checkbox = function() {
            this.parent.on(dataReady, this.dataReady, this), this.onDataBoundFunction = this.onDataBound.bind(this), 
            this.parent.addEventListener(dataBound, this.onDataBoundFunction), this.parent.on(contentReady, this.checkBoxSelectionChanged, this), 
            this.actionCompleteFunc = this.actionCompleteHandler.bind(this), this.parent.addEventListener(actionComplete, this.actionCompleteFunc), 
            this.parent.on(click, this.clickHandler, this);
        }, Selection.prototype.removeEventListener_checkbox = function() {
            this.parent.off(dataReady, this.dataReady), this.parent.removeEventListener(dataBound, this.onDataBoundFunction), 
            this.parent.removeEventListener(actionComplete, this.actionCompleteFunc), this.parent.off(click, this.clickHandler);
        }, Selection.prototype.actionCompleteHandler = function(e) {
            "save" === e.requestType && this.parent.isPersistSelection && this.refreshPersistSelection();
        }, Selection;
    }(), Search$2 = function() {
        function Search(parent) {
            this.parent = parent, this.addEventListener();
        }
        return Search.prototype.search = function(searchString) {
            var gObj = this.parent;
            searchString = isNullOrUndefined(searchString) ? "" : searchString, isActionPrevent(gObj) ? gObj.notify(preventBatch, {
                instance: this,
                handler: this.search,
                arg1: searchString
            }) : searchString !== gObj.searchSettings.key ? (gObj.searchSettings.key = searchString.toString(), 
            gObj.dataBind()) : this.refreshSearch && gObj.refresh();
        }, Search.prototype.addEventListener = function() {
            this.parent.isDestroyed || (this.parent.on(inBoundModelChanged, this.onPropertyChanged, this), 
            this.parent.on("searching-complete", this.onSearchComplete, this), this.parent.on(destroy$1, this.destroy, this), 
            this.actionCompleteFunc = this.onActionComplete.bind(this), this.parent.addEventListener(actionComplete, this.actionCompleteFunc));
        }, Search.prototype.removeEventListener = function() {
            this.parent.isDestroyed || (this.parent.off(inBoundModelChanged, this.onPropertyChanged), 
            this.parent.off("searching-complete", this.onSearchComplete), this.parent.off(destroy$1, this.destroy), 
            this.parent.removeEventListener(actionComplete, this.actionCompleteFunc));
        }, Search.prototype.destroy = function() {
            this.removeEventListener();
        }, Search.prototype.onPropertyChanged = function(e) {
            e.module === this.getModuleName() && (isNullOrUndefined(e.properties.key) ? this.parent.notify(modelChanged, {
                requestType: "searching",
                type: actionBegin
            }) : this.parent.notify(modelChanged, {
                requestType: "searching",
                type: actionBegin,
                searchString: this.parent.searchSettings.key
            }));
        }, Search.prototype.onSearchComplete = function(e) {
            this.parent.trigger(actionComplete, extend(e, {
                searchString: this.parent.searchSettings.key,
                requestType: "searching",
                type: actionComplete
            }));
        }, Search.prototype.onActionComplete = function(e) {
            this.refreshSearch = "searching" !== e.requestType;
        }, Search.prototype.getModuleName = function() {
            return "search";
        }, Search;
    }(), ShowHide = function() {
        function ShowHide(parent) {
            this.parent = parent;
        }
        return ShowHide.prototype.show = function(columnName, showBy) {
            var keys = this.getToggleFields(columnName), columns = this.getColumns(keys, showBy);
            this.parent.notify("tooltip-destroy", {
                module: "edit"
            }), columns.forEach(function(value) {
                value.visible = !0;
            }), this.setVisible(columns);
        }, ShowHide.prototype.hide = function(columnName, hideBy) {
            var keys = this.getToggleFields(columnName), columns = this.getColumns(keys, hideBy);
            this.parent.notify("tooltip-destroy", {
                module: "edit"
            }), columns.forEach(function(value) {
                value.visible = !1;
            }), this.setVisible(columns);
        }, ShowHide.prototype.getToggleFields = function(key) {
            return "string" == typeof key ? [ key ] : key;
        }, ShowHide.prototype.getColumns = function(keys, getKeyBy) {
            var _this = this;
            return iterateArrayOrObject(keys, function(key, index) {
                return iterateArrayOrObject(_this.parent.getColumns(), function(item, index) {
                    if (item[getKeyBy] === key) return item;
                })[0];
            });
        }, ShowHide.prototype.setVisible = function(columns) {
            isActionPrevent(this.parent) ? this.parent.notify(preventBatch, {
                instance: this,
                handler: this.setVisible,
                arg1: columns
            }) : (columns = isNullOrUndefined(columns) ? this.parent.getColumns() : columns, 
            this.parent.allowSelection && this.parent.getSelectedRecords().length && this.parent.clearSelection(), 
            this.parent.notify(columnVisibilityChanged, columns));
        }, ShowHide;
    }(), Scroll = function() {
        function Scroll(parent) {
            this.lastScrollTop = 0, this.previousValues = {
                top: 0,
                left: 0
            }, this.oneTimeReady = !0, this.parent = parent, this.widthService = new ColumnWidthService(parent), 
            this.addEventListener();
        }
        return Scroll.prototype.getModuleName = function() {
            return "scroll";
        }, Scroll.prototype.setWidth = function() {
            this.parent.element.style.width = formatUnit(this.parent.width), this.parent.toolbarModule && this.parent.toolbarModule.toolbar && this.parent.toolbarModule.toolbar.element && this.parent.toolbarModule.toolbar.refreshOverflow();
        }, Scroll.prototype.setHeight = function() {
            var mHdrHeight = 0, content = this.parent.getContent().firstChild;
            this.parent.frozenRows && "auto" !== this.parent.height ? (mHdrHeight = this.parent.getHeaderContent().querySelector("tbody").offsetHeight, 
            content.style.height = formatUnit(this.parent.height - mHdrHeight)) : content.style.height = formatUnit(this.parent.height), 
            this.ensureOverflow(content);
        }, Scroll.prototype.setPadding = function() {
            var content = this.parent.getHeaderContent(), scrollWidth = Scroll.getScrollBarWidth() - this.getThreshold(), cssProps = this.getCssProperties();
            content.firstChild.style[cssProps.border] = scrollWidth > 0 ? "1px" : "0px", content.style[cssProps.padding] = scrollWidth > 0 ? scrollWidth + "px" : "0px";
        }, Scroll.prototype.removePadding = function(rtl) {
            var cssProps = this.getCssProperties(rtl);
            this.parent.getHeaderContent().firstChild.style[cssProps.border] = "", this.parent.getHeaderContent().firstChild.parentElement.style[cssProps.padding] = "";
        }, Scroll.prototype.refresh = function() {
            if ("100%" === this.parent.height) {
                var content = this.parent.getContent();
                this.parent.element.style.height = "100%";
                var height = this.widthService.getSiblingsHeight(content);
                content.style.height = "calc(100% - " + height + "px)";
            }
        }, Scroll.prototype.getThreshold = function() {
            return "mozilla" === Browser.info.name ? .5 : 1;
        }, Scroll.prototype.addEventListener = function() {
            this.parent.isDestroyed || (this.parent.on(onEmpty, this.wireEvents, this), this.parent.on(contentReady, this.wireEvents, this), 
            this.parent.on(uiUpdate, this.onPropertyChanged, this));
        }, Scroll.prototype.removeEventListener = function() {
            this.parent.isDestroyed || (this.parent.off(onEmpty, this.wireEvents), this.parent.off(contentReady, this.wireEvents), 
            this.parent.off(uiUpdate, this.onPropertyChanged));
        }, Scroll.prototype.onContentScroll = function(scrollTarget) {
            var _this = this, element = scrollTarget, isHeader = element.classList.contains("e-headercontent");
            return function(e) {
                if (null !== _this.content.querySelector("tbody")) {
                    var target = e.target, left = target.scrollLeft, isFooter = (target.scrollWidth, 
                    target.classList.contains("e-summarycontent"));
                    _this.previousValues.left !== left ? (element.scrollLeft = left, isFooter && (_this.header.scrollLeft = left), 
                    _this.previousValues.left = left, _this.parent.notify("scroll", {
                        left: left
                    })) : _this.previousValues.top = isHeader ? target.scrollTop : _this.previousValues.top;
                }
            };
        }, Scroll.prototype.onFreezeContentScroll = function(scrollTarget) {
            var _this = this, element = scrollTarget;
            return function(e) {
                if (null !== _this.content.querySelector("tbody")) {
                    var top = e.target.scrollTop;
                    _this.previousValues.top !== top && (element.scrollTop = top, _this.previousValues.top = top, 
                    _this.parent.isDestroyed);
                }
            };
        }, Scroll.prototype.onWheelScroll = function(scrollTarget) {
            var _this = this, element = scrollTarget;
            return function(e) {
                if (null !== _this.content.querySelector("tbody")) {
                    var top = element.scrollTop + e.deltaMode === 1 ? 30 * e.deltaY : e.deltaY;
                    _this.previousValues.top !== top && (e.preventDefault(), _this.parent.getContent().querySelector(".e-frozencontent").scrollTop = top, 
                    element.scrollTop = top, _this.previousValues.top = top);
                }
            };
        }, Scroll.prototype.onTouchScroll = function(scrollTarget) {
            var _this = this, element = scrollTarget;
            return function(e) {
                if ("mouse" !== e.pointerType) {
                    var cont, mHdr, pageXY = _this.getPointXY(e), top = element.scrollTop + (_this.pageXY.y - pageXY.y), left = element.scrollLeft + (_this.pageXY.x - pageXY.x);
                    if (_this.parent.getHeaderContent().contains(e.target)) {
                        if (mHdr = _this.parent.getFrozenColumns() ? _this.parent.getHeaderContent().querySelector(".e-movableheader") : _this.parent.getHeaderContent().firstChild, 
                        _this.previousValues.left === left || left < 0 || mHdr.scrollWidth - mHdr.clientWidth < left) return;
                        e.preventDefault(), mHdr.scrollLeft = left, element.scrollLeft = left, _this.pageXY.x = pageXY.x, 
                        _this.previousValues.left = left;
                    } else {
                        if (cont = _this.parent.getContent().querySelector(".e-frozencontent"), _this.previousValues.top === top || top < 0 || cont.scrollHeight - cont.clientHeight < top) return;
                        e.preventDefault(), cont.scrollTop = top, element.scrollTop = top, _this.pageXY.y = pageXY.y, 
                        _this.previousValues.top = top;
                    }
                }
            };
        }, Scroll.prototype.setPageXY = function() {
            var _this = this;
            return function(e) {
                "mouse" !== e.pointerType && (_this.pageXY = _this.getPointXY(e));
            };
        }, Scroll.prototype.getPointXY = function(e) {
            var pageXY = {
                x: 0,
                y: 0
            };
            return e.touches && e.touches.length ? (pageXY.x = e.touches[0].pageX, pageXY.y = e.touches[0].pageY) : (pageXY.x = e.pageX, 
            pageXY.y = e.pageY), pageXY;
        }, Scroll.prototype.wireEvents = function() {
            if (this.oneTimeReady) {
                var frzCols = this.parent.getFrozenColumns();
                this.content = this.parent.getContent().firstChild, this.header = this.parent.getHeaderContent().firstChild;
                var mCont = this.content.querySelector(".e-movablecontent"), fCont = this.content.querySelector(".e-frozencontent"), mHdr = this.header.querySelector(".e-movableheader");
                this.parent.frozenRows && (EventHandler.add(frzCols ? mHdr : this.header, "touchstart pointerdown", this.setPageXY(), this), 
                EventHandler.add(frzCols ? mHdr : this.header, "touchmove pointermove", this.onTouchScroll(frzCols ? mCont : this.content), this)), 
                frzCols ? (EventHandler.add(mCont, "scroll", this.onContentScroll(mHdr), this), 
                EventHandler.add(mCont, "scroll", this.onFreezeContentScroll(fCont), this), EventHandler.add(fCont, "scroll", this.onFreezeContentScroll(mCont), this), 
                EventHandler.add(mHdr, "scroll", this.onContentScroll(mCont), this), EventHandler.add(fCont, "wheel", this.onWheelScroll(mCont), this), 
                EventHandler.add(fCont, "touchstart pointerdown", this.setPageXY(), this), EventHandler.add(fCont, "touchmove pointermove", this.onTouchScroll(mCont), this)) : (EventHandler.add(this.content, "scroll", this.onContentScroll(this.header), this), 
                EventHandler.add(this.header, "scroll", this.onContentScroll(this.content), this)), 
                this.parent.aggregates.length && EventHandler.add(this.parent.getFooterContent().firstChild, "scroll", this.onContentScroll(this.content), this), 
                this.refresh(), this.oneTimeReady = !1;
            }
            var table = this.parent.getContentTable();
            table.scrollHeight < this.parent.getContent().clientHeight && (addClass(table.querySelectorAll("tr:last-child td"), "e-lastrowcell"), 
            this.parent.getFrozenColumns() && addClass(this.parent.getContent().querySelector(".e-movablecontent").querySelectorAll("tr:last-child td"), "e-lastrowcell")), 
            this.parent.enableVirtualization || (this.content.scrollLeft = this.header.scrollLeft, 
            this.content.scrollTop = this.previousValues.top), this.parent.enableColumnVirtualization || (this.content.scrollLeft = this.header.scrollLeft);
        }, Scroll.prototype.getCssProperties = function(rtl) {
            var css = {}, enableRtl$$1 = isNullOrUndefined(rtl) ? this.parent.enableRtl : rtl;
            return css.border = enableRtl$$1 ? "borderLeftWidth" : "borderRightWidth", css.padding = enableRtl$$1 ? "paddingLeft" : "paddingRight", 
            css;
        }, Scroll.prototype.ensureOverflow = function(content) {
            this.parent.getFrozenColumns() ? content.querySelector(".e-movablecontent").style.overflowY = "auto" === this.parent.height ? "auto" : "scroll" : content.style.overflowY = "auto" === this.parent.height ? "auto" : "scroll";
        }, Scroll.prototype.onPropertyChanged = function(e) {
            e.module === this.getModuleName() && (this.setPadding(), this.oneTimeReady = !0, 
            "auto" === this.parent.height && this.removePadding(), this.wireEvents(), this.setHeight(), 
            this.setWidth());
        }, Scroll.prototype.destroy = function() {
            this.removeEventListener(), this.removePadding(), removeClass([ this.parent.getHeaderContent().firstChild ], "e-headercontent"), 
            removeClass([ this.parent.getContent().firstChild ], "e-content"), this.parent.getContent().firstChild.style.height = "", 
            this.parent.element.style.width = "", EventHandler.remove(this.parent.getContent().firstChild, "scroll", this.onContentScroll);
        }, Scroll.getScrollBarWidth = function() {
            return getScrollBarWidth();
        }, Scroll;
    }(), Print = function() {
        function Print(parent, scrollModule) {
            this.isAsyncPrint = !1, this.printing = "isPrinting", this.parent = parent, this.parent.isDestroyed || (this.parent.on(contentReady, this.contentReady.bind(this)), 
            this.parent.addEventListener(actionBegin, this.actionBegin.bind(this)), this.parent.on(onEmpty, this.onEmpty.bind(this)), 
            this.scrollModule = scrollModule);
        }
        return Print.prototype.print = function() {
            this.renderPrintGrid(), this.printWind = window.open("", "print", "height=" + window.outerHeight + ",width=" + window.outerWidth + ",tabbar=no"), 
            this.printWind.moveTo(0, 0), this.printWind.resizeTo(screen.availWidth, screen.availHeight);
        }, Print.prototype.onEmpty = function() {
            this.isPrintGrid() && this.contentReady();
        }, Print.prototype.actionBegin = function() {
            this.isPrintGrid() && (this.isAsyncPrint = !0);
        }, Print.prototype.renderPrintGrid = function() {
            var gObj = this.parent, printGridModel = {}, element = createElement("div", {
                id: this.parent.element.id + "_print",
                className: gObj.element.className + " e-print-grid"
            });
            document.body.appendChild(element);
            for (var _i = 0, _a = Print.printGridProp; _i < _a.length; _i++) {
                var key = _a[_i];
                printGridModel[key] = "columns" === key ? getActualPropFromColl(gObj[key]) : "allowPaging" === key ? "CurrentPage" === this.parent.printMode : getActualProperties(gObj[key]);
            }
            var printGrid = new Grid(printGridModel);
            printGrid.appendTo(element), printGrid[this.printing] = !0, printGrid.trigger = gObj.trigger;
        }, Print.prototype.contentReady = function() {
            if (this.isPrintGrid()) {
                var gObj = this.parent;
                if (this.isAsyncPrint) return void this.printGrid();
                var args = {
                    requestType: "print",
                    element: gObj.element,
                    selectedRows: gObj.getContentTable().querySelectorAll('tr[aria-selected="true"]'),
                    cancel: !1
                };
                if (this.isAsyncPrint || gObj.trigger("beforePrint", args), args.cancel) return void detach(gObj.element);
                this.isAsyncPrint || this.printGrid();
            }
        }, Print.prototype.printGrid = function() {
            var gObj = this.parent;
            if (gObj.allowPaging && "CurrentPage" === gObj.printMode && (gObj.element.querySelector(".e-gridpager").style.display = "none"), 
            "auto" !== gObj.height) {
                var cssProps = this.scrollModule.getCssProperties(), contentDiv = gObj.element.querySelector(".e-content"), headerDiv = gObj.element.querySelector(".e-gridheader");
                contentDiv.style.height = "auto", contentDiv.style.overflowY = "auto", headerDiv.style[cssProps.padding] = "", 
                headerDiv.firstElementChild.style[cssProps.border] = "";
            }
            gObj.allowGrouping && (gObj.groupSettings.columns.length ? (this.removeColGroup(gObj.groupSettings.columns.length, gObj.element), 
            removeElement(gObj.element, ".e-grouptopleftcell"), removeElement(gObj.element, ".e-recordpluscollapse"), 
            removeElement(gObj.element, ".e-indentcell"), removeElement(gObj.element, ".e-recordplusexpand")) : gObj.element.querySelector(".e-groupdroparea").style.display = "none"), 
            gObj.element.querySelector(".e-content").style.overflowX = "hidden", gObj.allowFiltering && "FilterBar" === gObj.filterSettings.type && (gObj.element.querySelector(".e-filterbar").style.display = "none");
            var waitingPop = gObj.element.querySelectorAll(".e-spin-show");
            waitingPop.length > 0 && (waitingPop[0].classList.add("e-spin-hide"), waitingPop[0].classList.remove("e-spin-show")), 
            gObj[this.printing] && detach(gObj.element), gObj.element.classList.remove("e-print-grid"), 
            this.printWind = print(gObj.element, this.printWind), gObj[this.printing] = !1;
            var args = {
                element: gObj.element
            };
            gObj.trigger("printComplete", args);
        }, Print.prototype.removeColGroup = function(depth, element) {
            for (var groupCaption = element.querySelectorAll(".e-groupcaption"), colSpan = groupCaption[depth - 1].getAttribute("colspan"), i = 0; i < groupCaption.length; i++) groupCaption[i].setAttribute("colspan", colSpan);
            var colGroups = element.querySelectorAll("colgroup");
            for (i = 0; i < colGroups.length; i++) for (var j = 0; j < depth; j++) colGroups[i].childNodes[j].style.display = "none";
        }, Print.prototype.isPrintGrid = function() {
            return this.parent.element.id.indexOf("_print") > 0 && this.parent[this.printing];
        }, Print.prototype.destroy = function() {
            this.parent.isDestroyed || (this.parent.off(contentReady, this.contentReady.bind(this)), 
            this.parent.removeEventListener(actionBegin, this.actionBegin.bind(this)), this.parent.off(onEmpty, this.onEmpty.bind(this)));
        }, Print.prototype.getModuleName = function() {
            return "print";
        }, Print.printGridProp = [ "aggregates", "allowGrouping", "allowFiltering", "allowMultiSorting", "allowReordering", "allowSorting", "allowTextWrap", "childGrid", "columns", "currentViewData", "dataSource", "detailTemplate", "enableAltRow", "enableColumnVirtualization", "filterSettings", "gridLines", "groupSettings", "height", "locale", "pageSettings", "printMode", "query", "queryString", "rowHeight", "rowTemplate", "sortSettings", "textWrapSettings", "allowPaging", "beforePrint", "printComplete" ], 
        Print;
    }(), __extends$124 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$51 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, AggregateColumn = function(_super) {
        function AggregateColumn() {
            var _this = null !== _super && _super.apply(this, arguments) || this;
            return _this.templateFn = {}, _this;
        }
        return __extends$124(AggregateColumn, _super), AggregateColumn.prototype.setFormatter = function() {
            var valueFormatter = new ValueFormatter();
            this.format && (this.format.skeleton || this.format.format) && (this.formatFn = valueFormatter.getFormatFunction(this.format));
        }, AggregateColumn.prototype.getFormatter = function() {
            return this.formatFn;
        }, AggregateColumn.prototype.setTemplate = function(helper) {
            void 0 === helper && (helper = {}), void 0 !== this.footerTemplate && (this.templateFn[getEnumValue(CellType, CellType.Summary)] = {
                fn: compile$$1(this.footerTemplate, helper),
                property: "footerTemplate"
            }), void 0 !== this.groupFooterTemplate && (this.templateFn[getEnumValue(CellType, CellType.GroupSummary)] = {
                fn: compile$$1(this.groupFooterTemplate, helper),
                property: "groupFooterTemplate"
            }), void 0 !== this.groupCaptionTemplate && (this.templateFn[getEnumValue(CellType, CellType.CaptionSummary)] = {
                fn: compile$$1(this.groupCaptionTemplate, helper),
                property: "groupCaptionTemplate"
            });
        }, AggregateColumn.prototype.getTemplate = function(type) {
            return this.templateFn[getEnumValue(CellType, type)];
        }, AggregateColumn.prototype.setPropertiesSilent = function(prop) {
            this.setProperties(prop, !0);
        }, __decorate$51([ Property() ], AggregateColumn.prototype, "type", void 0), __decorate$51([ Property() ], AggregateColumn.prototype, "field", void 0), 
        __decorate$51([ Property() ], AggregateColumn.prototype, "columnName", void 0), 
        __decorate$51([ Property() ], AggregateColumn.prototype, "format", void 0), __decorate$51([ Property() ], AggregateColumn.prototype, "footerTemplate", void 0), 
        __decorate$51([ Property() ], AggregateColumn.prototype, "groupFooterTemplate", void 0), 
        __decorate$51([ Property() ], AggregateColumn.prototype, "groupCaptionTemplate", void 0), 
        __decorate$51([ Property() ], AggregateColumn.prototype, "customAggregate", void 0), 
        AggregateColumn;
    }(ChildProperty), AggregateRow = function(_super) {
        function AggregateRow() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$124(AggregateRow, _super), __decorate$51([ Collection([], AggregateColumn) ], AggregateRow.prototype, "columns", void 0), 
        AggregateRow;
    }(ChildProperty), Clipboard = function() {
        function Clipboard(parent) {
            this.copyContent = "", this.isSelect = !1, this.parent = parent, this.addEventListener();
        }
        return Clipboard.prototype.addEventListener = function() {
            this.parent.isDestroyed || (this.parent.on(contentReady, this.initialEnd, this), 
            this.parent.on(keyPressed, this.keyDownHandler, this));
        }, Clipboard.prototype.removeEventListener = function() {
            this.parent.isDestroyed || this.parent.off(keyPressed, this.keyDownHandler);
        }, Clipboard.prototype.initialEnd = function() {
            this.parent.off(contentReady, this.initialEnd), this.clipBoardTextArea = createElement("textarea", {
                className: "e-clipboard",
                styles: "opacity: 0",
                attrs: {
                    readonly: "true",
                    tabindex: "-1",
                    "aria-label": "clipboard"
                }
            }), this.parent.element.appendChild(this.clipBoardTextArea);
        }, Clipboard.prototype.keyDownHandler = function(e) {
            "ctrlPlusC" === e.action ? this.copy() : "ctrlShiftPlusH" === e.action && this.copy(!0);
        }, Clipboard.prototype.setCopyData = function(withHeader) {
            if ("" === window.getSelection().toString()) {
                var isFrozen = this.parent.getFrozenColumns();
                this.clipBoardTextArea.value = this.copyContent = "";
                var mRows = void 0, rows = this.parent.getRows();
                if (isFrozen && (mRows = this.parent.getMovableDataRows()), "Cell" !== this.parent.selectionSettings.mode) {
                    var selectedIndexes = this.parent.getSelectedRowIndexes().sort(function(a, b) {
                        return a - b;
                    });
                    if (withHeader) {
                        for (var headerTextArray = [], i = 0; i < this.parent.getVisibleColumns().length; i++) headerTextArray[i] = this.parent.getVisibleColumns()[i].headerText;
                        this.getCopyData(headerTextArray, !1, "\t", withHeader), this.copyContent += "\n";
                    }
                    for (i = 0; i < selectedIndexes.length; i++) {
                        i > 0 && (this.copyContent += "\n");
                        var cells = [].slice.call(rows[selectedIndexes[i]].querySelectorAll(".e-rowcell"));
                        isFrozen && cells.push.apply(cells, [].slice.call(mRows[selectedIndexes[i]].querySelectorAll(".e-rowcell"))), 
                        this.getCopyData(cells, !1, "\t", withHeader);
                    }
                } else {
                    var obj = this.checkBoxSelection();
                    if (obj.status) {
                        if (withHeader) {
                            var headers = [];
                            for (i = 0; i < obj.colIndexes.length; i++) headers.push(this.parent.getColumnHeaderByIndex(obj.colIndexes[i]));
                            this.getCopyData(headers, !1, "\t", withHeader), this.copyContent += "\n";
                        }
                        for (i = 0; i < obj.rowIndexes.length; i++) {
                            i > 0 && (this.copyContent += "\n");
                            cells = [].slice.call(rows[obj.rowIndexes[i]].querySelectorAll(".e-cellselectionbackground"));
                            isFrozen && cells.push.apply(cells, [].slice.call(mRows[obj.rowIndexes[i]].querySelectorAll(".e-cellselectionbackground"))), 
                            this.getCopyData(cells, !1, "\t", withHeader);
                        }
                    } else this.getCopyData([].slice.call(this.parent.element.querySelectorAll(".e-cellselectionbackground")), !0, "\n", withHeader);
                }
                var args = {
                    data: this.copyContent,
                    cancel: !1
                };
                if (this.parent.trigger("beforeCopy", args), args.cancel) return;
                this.clipBoardTextArea.value = this.copyContent = args.data, Browser.userAgent.match(/ipad|ipod|iphone/i) ? this.clipBoardTextArea.setSelectionRange(0, this.clipBoardTextArea.value.length) : this.clipBoardTextArea.select(), 
                this.isSelect = !0;
            }
        }, Clipboard.prototype.getCopyData = function(cells, isCell, splitKey, withHeader) {
            for (var isElement = "string" != typeof cells[0], j = 0; j < cells.length; j++) withHeader && isCell && (this.copyContent += this.parent.getColumns()[parseInt(cells[j].getAttribute("aria-colindex"), 10)].headerText + "\n"), 
            isElement ? cells[j].classList.contains("e-hide") || (this.copyContent += cells[j].textContent) : this.copyContent += cells[j], 
            j < cells.length - 1 && (this.copyContent += splitKey);
        }, Clipboard.prototype.copy = function(withHeader) {
            document.queryCommandSupported("copy") && (this.setCopyData(withHeader), document.execCommand("copy"), 
            this.clipBoardTextArea.blur()), this.isSelect && (window.getSelection().removeAllRanges(), 
            this.isSelect = !1);
        }, Clipboard.prototype.getModuleName = function() {
            return "clipboard";
        }, Clipboard.prototype.destroy = function() {
            this.removeEventListener(), remove(this.clipBoardTextArea);
        }, Clipboard.prototype.checkBoxSelection = function() {
            var gridObj = this.parent, obj = {
                status: !1
            };
            if ("Cell" === gridObj.selectionSettings.mode) {
                var rowCellIndxes = gridObj.getSelectedRowCellIndexes(), str = void 0, rowIndexes = [], i = void 0;
                for (i = 0; i < rowCellIndxes.length && (rowCellIndxes[i].cellIndexes.length && rowIndexes.push(rowCellIndxes[i].rowIndex), 
                !rowCellIndxes[i].cellIndexes.length || (str || (str = JSON.stringify(rowCellIndxes[i].cellIndexes.sort())), 
                str === JSON.stringify(rowCellIndxes[i].cellIndexes.sort()))); i++) ;
                rowIndexes.sort(), i === rowCellIndxes.length && rowIndexes[rowIndexes.length - 1] - rowIndexes[0] == rowIndexes.length - 1 && (obj = {
                    status: !0,
                    rowIndexes: rowIndexes,
                    colIndexes: rowCellIndxes[0].cellIndexes
                });
            }
            return obj;
        }, Clipboard;
    }(), __extends$111 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$49 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, SortDescriptor = function(_super) {
        function SortDescriptor() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$111(SortDescriptor, _super), __decorate$49([ Property() ], SortDescriptor.prototype, "field", void 0), 
        __decorate$49([ Property() ], SortDescriptor.prototype, "direction", void 0), SortDescriptor;
    }(ChildProperty), SortSettings = function(_super) {
        function SortSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$111(SortSettings, _super), __decorate$49([ Collection([], SortDescriptor) ], SortSettings.prototype, "columns", void 0), 
        __decorate$49([ Property(!0) ], SortSettings.prototype, "allowUnsort", void 0), 
        SortSettings;
    }(ChildProperty), Predicate$1 = function(_super) {
        function Predicate$$1() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$111(Predicate$$1, _super), __decorate$49([ Property() ], Predicate$$1.prototype, "field", void 0), 
        __decorate$49([ Property() ], Predicate$$1.prototype, "operator", void 0), __decorate$49([ Property() ], Predicate$$1.prototype, "value", void 0), 
        __decorate$49([ Property() ], Predicate$$1.prototype, "matchCase", void 0), __decorate$49([ Property() ], Predicate$$1.prototype, "ignoreAccent", void 0), 
        __decorate$49([ Property() ], Predicate$$1.prototype, "predicate", void 0), __decorate$49([ Property({}) ], Predicate$$1.prototype, "actualFilterValue", void 0), 
        __decorate$49([ Property({}) ], Predicate$$1.prototype, "actualOperator", void 0), 
        __decorate$49([ Property() ], Predicate$$1.prototype, "type", void 0), __decorate$49([ Property() ], Predicate$$1.prototype, "ejpredicate", void 0), 
        Predicate$$1;
    }(ChildProperty), FilterSettings = function(_super) {
        function FilterSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$111(FilterSettings, _super), __decorate$49([ Collection([], Predicate$1) ], FilterSettings.prototype, "columns", void 0), 
        __decorate$49([ Property("FilterBar") ], FilterSettings.prototype, "type", void 0), 
        __decorate$49([ Property() ], FilterSettings.prototype, "mode", void 0), __decorate$49([ Property(!0) ], FilterSettings.prototype, "showFilterBarStatus", void 0), 
        __decorate$49([ Property(1500) ], FilterSettings.prototype, "immediateModeDelay", void 0), 
        __decorate$49([ Property() ], FilterSettings.prototype, "operators", void 0), __decorate$49([ Property(!1) ], FilterSettings.prototype, "ignoreAccent", void 0), 
        FilterSettings;
    }(ChildProperty), SelectionSettings = function(_super) {
        function SelectionSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$111(SelectionSettings, _super), __decorate$49([ Property("Row") ], SelectionSettings.prototype, "mode", void 0), 
        __decorate$49([ Property("Flow") ], SelectionSettings.prototype, "cellSelectionMode", void 0), 
        __decorate$49([ Property("Single") ], SelectionSettings.prototype, "type", void 0), 
        __decorate$49([ Property(!1) ], SelectionSettings.prototype, "checkboxOnly", void 0), 
        __decorate$49([ Property(!1) ], SelectionSettings.prototype, "persistSelection", void 0), 
        SelectionSettings;
    }(ChildProperty), SearchSettings = function(_super) {
        function SearchSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$111(SearchSettings, _super), __decorate$49([ Property([]) ], SearchSettings.prototype, "fields", void 0), 
        __decorate$49([ Property("") ], SearchSettings.prototype, "key", void 0), __decorate$49([ Property("contains") ], SearchSettings.prototype, "operator", void 0), 
        __decorate$49([ Property(!0) ], SearchSettings.prototype, "ignoreCase", void 0), 
        SearchSettings;
    }(ChildProperty), RowDropSettings = function(_super) {
        function RowDropSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$111(RowDropSettings, _super), __decorate$49([ Property() ], RowDropSettings.prototype, "targetID", void 0), 
        RowDropSettings;
    }(ChildProperty), TextWrapSettings = function(_super) {
        function TextWrapSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$111(TextWrapSettings, _super), __decorate$49([ Property("Both") ], TextWrapSettings.prototype, "wrapMode", void 0), 
        TextWrapSettings;
    }(ChildProperty), GroupSettings = function(_super) {
        function GroupSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$111(GroupSettings, _super), __decorate$49([ Property(!0) ], GroupSettings.prototype, "showDropArea", void 0), 
        __decorate$49([ Property(!1) ], GroupSettings.prototype, "showToggleButton", void 0), 
        __decorate$49([ Property(!1) ], GroupSettings.prototype, "showGroupedColumn", void 0), 
        __decorate$49([ Property(!0) ], GroupSettings.prototype, "showUngroupButton", void 0), 
        __decorate$49([ Property(!1) ], GroupSettings.prototype, "disablePageWiseAggregates", void 0), 
        __decorate$49([ Property([]) ], GroupSettings.prototype, "columns", void 0), __decorate$49([ Property() ], GroupSettings.prototype, "captionTemplate", void 0), 
        GroupSettings;
    }(ChildProperty), EditSettings = function(_super) {
        function EditSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$111(EditSettings, _super), __decorate$49([ Property(!1) ], EditSettings.prototype, "allowAdding", void 0), 
        __decorate$49([ Property(!1) ], EditSettings.prototype, "allowEditing", void 0), 
        __decorate$49([ Property(!1) ], EditSettings.prototype, "allowDeleting", void 0), 
        __decorate$49([ Property("Normal") ], EditSettings.prototype, "mode", void 0), __decorate$49([ Property(!0) ], EditSettings.prototype, "allowEditOnDblClick", void 0), 
        __decorate$49([ Property(!0) ], EditSettings.prototype, "showConfirmDialog", void 0), 
        __decorate$49([ Property(!1) ], EditSettings.prototype, "showDeleteConfirmDialog", void 0), 
        EditSettings;
    }(ChildProperty), Grid = function(_super) {
        function Grid(options, element) {
            var _this = _super.call(this, options, element) || this;
            return _this.inViewIndexes = [], _this.freezeRefresh = Component.prototype.refresh, 
            _this.needsID = !0, setValue("mergePersistData", _this.mergePersistGridData, _this), 
            _this;
        }
        return __extends$111(Grid, _super), Grid.prototype.getPersistData = function() {
            var _this = this, keyEntity = [ "pageSettings", "sortSettings", "filterSettings", "groupSettings", "columns", "searchSettings", "selectedRowIndex" ], ignoreOnPersist = {
                pageSettings: [ "template", "pageSizes", "enableQueryString", "totalRecordsCount", "pageCount" ],
                filterSettings: [ "type", "mode", "showFilterBarStatus", "immediateModeDelay", "ignoreAccent" ],
                groupSettings: [ "showDropArea", "showToggleButton", "showGroupedColumn", "showUngroupButton", "disablePageWiseAggregates", "hideCaptionCount" ],
                searchSettings: [ "fields", "operator", "ignoreCase" ],
                sortSettings: [],
                columns: [],
                selectedRowIndex: []
            };
            return keyEntity.forEach(function(value) {
                for (var currentObject = _this[value], _i = 0, _a = ignoreOnPersist[value]; _i < _a.length; _i++) {
                    delete currentObject[_a[_i]];
                }
            }), this.ignoreInArrays([ "filter", "edit", "filterBarTemplate", "headerTemplate", "template", "commandTemplate", "commands", "dataSource" ], this.columns), 
            this.addOnPersist(keyEntity);
        }, Grid.prototype.ignoreInArrays = function(ignoreOnColumn, columns) {
            var _this = this;
            columns.forEach(function(column) {
                column.columns ? (_this.ignoreInColumn(ignoreOnColumn, column), _this.ignoreInArrays(ignoreOnColumn, column.columns)) : _this.ignoreInColumn(ignoreOnColumn, column);
            });
        }, Grid.prototype.ignoreInColumn = function(ignoreOnColumn, column) {
            ignoreOnColumn.forEach(function(val) {
                delete column[val];
            });
        }, Grid.prototype.requiredModules = function() {
            var modules = [];
            return this.allowFiltering && modules.push({
                member: "filter",
                args: [ this, this.filterSettings, this.serviceLocator ]
            }), this.allowExcelExport && modules.push({
                member: "ExcelExport",
                args: [ this ]
            }), this.allowPdfExport && modules.push({
                member: "PdfExport",
                args: [ this ]
            }), this.allowSorting && modules.push({
                member: "sort",
                args: [ this, this.sortSettings, this.sortedColumns, this.serviceLocator ]
            }), this.allowPaging && modules.push({
                member: "pager",
                args: [ this, this.pageSettings ]
            }), this.allowSelection && modules.push({
                member: "selection",
                args: [ this, this.selectionSettings, this.serviceLocator ]
            }), modules.push({
                member: "resize",
                args: [ this ]
            }), this.allowReordering && modules.push({
                member: "reorder",
                args: [ this ]
            }), this.allowRowDragAndDrop && modules.push({
                member: "rowDragAndDrop",
                args: [ this ]
            }), this.allowGrouping && modules.push({
                member: "group",
                args: [ this, this.groupSettings, this.sortedColumns, this.serviceLocator ]
            }), this.aggregates.length && modules.push({
                member: "aggregate",
                args: [ this, this.serviceLocator ]
            }), this.isDetail() && modules.push({
                member: "detailRow",
                args: [ this, this.serviceLocator ]
            }), (this.toolbar || this.toolbarTemplate) && modules.push({
                member: "toolbar",
                args: [ this, this.serviceLocator ]
            }), (this.enableVirtualization || this.enableColumnVirtualization) && modules.push({
                member: "virtualscroll",
                args: [ this, this.serviceLocator ]
            }), (this.getFrozenColumns() || this.frozenRows) && modules.push({
                member: "freeze",
                args: [ this, this.serviceLocator ]
            }), this.isCommandColumn(this.columns) && modules.push({
                member: "commandColumn",
                args: [ this, this.serviceLocator ]
            }), (this.editSettings.allowAdding || this.editSettings.allowDeleting || this.editSettings.allowEditing) && modules.push({
                member: "edit",
                args: [ this, this.serviceLocator ]
            }), this.extendRequiredModules(modules), modules;
        }, Grid.prototype.extendRequiredModules = function(modules) {
            this.contextMenuItems && modules.push({
                member: "contextMenu",
                args: [ this, this.serviceLocator ]
            }), this.showColumnMenu && modules.push({
                member: "columnMenu",
                args: [ this, this.serviceLocator ]
            }), this.showColumnChooser && modules.push({
                member: "columnChooser",
                args: [ this, this.serviceLocator ]
            }), this.isForeignKeyEnabled(this.columns) && modules.push({
                member: "foreignKey",
                args: [ this, this.serviceLocator ]
            });
        }, Grid.prototype.preRender = function() {
            this.serviceLocator = new ServiceLocator(), this.initProperties(), this.initializeServices();
        }, Grid.prototype.initProperties = function() {
            this.isInitial = !0, this.sortedColumns = [], this.inViewIndexes = [], this.mediaCol = [], 
            this.isMediaQuery = !1, this.isInitialLoad = !1, this.mergeCells = {}, this.isEdit = !1, 
            this.checkAllRows = "None", this.isCheckBoxSelection = !1, this.isPersistSelection = !1, 
            this.freezeRefresh = Component.prototype.refresh, this.filterOperators = {
                contains: "contains",
                endsWith: "endswith",
                equal: "equal",
                greaterThan: "greaterthan",
                greaterThanOrEqual: "greaterthanorequal",
                lessThan: "lessthan",
                lessThanOrEqual: "lessthanorequal",
                notEqual: "notequal",
                startsWith: "startswith"
            }, this.defaultLocale = {
                EmptyRecord: "No records to display",
                True: "true",
                False: "false",
                InvalidFilterMessage: "Invalid Filter Data",
                GroupDropArea: "Drag a column header here to group its column",
                UnGroup: "Click here to ungroup",
                GroupDisable: "Grouping is disabled for this column",
                FilterbarTitle: "'s filter bar cell",
                EmptyDataSourceError: "DataSource must not be empty at initial load since columns are generated from dataSource in AutoGenerate Column Grid",
                Add: "Add",
                Edit: "Edit",
                Cancel: "Cancel",
                Update: "Update",
                Delete: "Delete",
                Print: "Print",
                Pdfexport: "PDF Export",
                Excelexport: "Excel Export",
                Wordexport: "Word Export",
                Csvexport: "CSV Export",
                Search: "Search",
                Columnchooser: "Columns",
                Save: "Save",
                Item: "item",
                Items: "items",
                EditOperationAlert: "No records selected for edit operation",
                DeleteOperationAlert: "No records selected for delete operation",
                SaveButton: "Save",
                OKButton: "OK",
                CancelButton: "Cancel",
                EditFormTitle: "Details of ",
                AddFormTitle: "Add New Record",
                BatchSaveConfirm: "Are you sure you want to save changes?",
                BatchSaveLostChanges: "Unsaved changes will be lost. Are you sure you want to continue?",
                ConfirmDelete: "Are you sure you want to Delete Record?",
                CancelEdit: "Are you sure you want to Cancel the changes?",
                ChooseColumns: "Choose Column",
                SearchColumns: "search columns",
                Matchs: "No Matches Found",
                FilterButton: "Filter",
                ClearButton: "Clear",
                StartsWith: "Starts With",
                EndsWith: "Ends With",
                Contains: "Contains",
                Equal: "Equal",
                NotEqual: "Not Equal",
                LessThan: "Less Than",
                LessThanOrEqual: "Less Than Or Equal",
                GreaterThan: "Greater Than",
                GreaterThanOrEqual: "Greater Than Or Equal",
                ChooseDate: "Choose a Date",
                EnterValue: "Enter the value",
                Copy: "Copy",
                Group: "Group by this column",
                Ungroup: "Ungroup by this column",
                autoFitAll: "Auto Fit all columns",
                autoFit: "Auto Fit this column",
                Export: "Export",
                FirstPage: "First Page",
                LastPage: "Last Page",
                PreviousPage: "Previous Page",
                NextPage: "Next Page",
                SortAscending: "Sort Ascending",
                SortDescending: "Sort Descending",
                EditRecord: "Edit Record",
                DeleteRecord: "Delete Record",
                FilterMenu: "Filter",
                OK: "OK",
                Filter: "Filter",
                Clear: "Clear",
                SelectAll: "Select All",
                Blanks: "Blanks",
                FilterTrue: "True",
                FilterFalse: "False",
                NoResult: "No Matches Found",
                ClearFilter: "Clear Filter",
                NumberFilter: "Number Filters",
                TextFilter: "Text Filters",
                DateFilter: "Date Filters",
                MatchCase: "Match Case",
                Between: "Between",
                CustomFilter: "Custom Filter",
                CustomFilterPlaceHolder: "Enter the value",
                CustomFilterDatePlaceHolder: "Choose a date",
                AND: "AND",
                OR: "OR",
                ShowRowsWhere: "Show rows where:"
            }, this.keyConfigs = {
                downArrow: "downarrow",
                upArrow: "uparrow",
                rightArrow: "rightarrow",
                leftArrow: "leftarrow",
                shiftDown: "shift+downarrow",
                shiftUp: "shift+uparrow",
                shiftRight: "shift+rightarrow",
                shiftLeft: "shift+leftarrow",
                home: "home",
                end: "end",
                escape: "escape",
                ctrlHome: "ctrl+home",
                ctrlEnd: "ctrl+end",
                pageUp: "pageup",
                pageDown: "pagedown",
                ctrlAltPageUp: "ctrl+alt+pageup",
                ctrlAltPageDown: "ctrl+alt+pagedown",
                altPageUp: "alt+pageup",
                altPageDown: "alt+pagedown",
                altDownArrow: "alt+downarrow",
                altUpArrow: "alt+uparrow",
                ctrlDownArrow: "ctrl+downarrow",
                ctrlUpArrow: "ctrl+uparrow",
                ctrlPlusA: "ctrl+A",
                ctrlPlusP: "ctrl+P",
                insert: "insert",
                delete: "delete",
                f2: "f2",
                enter: "enter",
                ctrlEnter: "ctrl+enter",
                shiftEnter: "shift+enter",
                tab: "tab",
                shiftTab: "shift+tab",
                space: "space",
                ctrlPlusC: "ctrl+C",
                ctrlShiftPlusH: "ctrl+shift+H"
            };
        }, Grid.prototype.render = function() {
            this.ariaService.setOptions(this.element, {
                role: "grid"
            }), createSpinner({
                target: this.element
            }), this.renderModule = new Render(this, this.serviceLocator), this.getMediaColumns(), 
            this.searchModule = new Search$2(this), this.scrollModule = new Scroll(this), this.notify(initialLoad, {}), 
            this.trigger("load"), prepareColumns(this.columns, this.enableColumnVirtualization), 
            this.getColumns(), this.processModel(), this.gridRender(), this.wireEvents(), this.addListener(), 
            this.updateDefaultCursor(), this.updateStackedFilter(), this.showSpinner(), this.notify(initialEnd, {});
        }, Grid.prototype.showSpinner = function() {
            showSpinner(this.element);
        }, Grid.prototype.hideSpinner = function() {
            hideSpinner(this.element);
        }, Grid.prototype.updateStackedFilter = function() {
            this.allowFiltering && "FilterBar" === this.filterSettings.type && this.getHeaderContent().querySelectorAll(".e-stackedheadercell").length ? this.getHeaderContent().classList.add("e-stackedfilter") : this.getHeaderContent().classList.remove("e-stackedfilter");
        }, Grid.prototype.getMediaColumns = function() {
            if (!this.enableColumnVirtualization) {
                var gcol = this.getColumns();
                if (this.getShowHideService = this.serviceLocator.getService("showHideService"), 
                !isNullOrUndefined(gcol)) for (var index = 0; index < gcol.length; index++) if (!isNullOrUndefined(gcol[index].hideAtMedia)) {
                    this.mediaCol.push(gcol[index]);
                    var media = window.matchMedia(gcol[index].hideAtMedia);
                    this.mediaQueryUpdate(index, media), media.addListener(this.mediaQueryUpdate.bind(this, index));
                }
            }
        }, Grid.prototype.mediaQueryUpdate = function(columnIndex, e) {
            this.isMediaQuery = !0;
            var col = this.getColumns()[columnIndex];
            col.visible = e.matches, this.isInitialLoad && (col.visible ? this.showHider.show(col.headerText, "headerText") : this.showHider.hide(col.headerText, "headerText"));
        }, Grid.prototype.refreshMediaCol = function() {
            this.isMediaQuery && (this.refresh(), this.isMediaQuery = !1), this.isInitialLoad = !0;
        }, Grid.prototype.eventInitializer = function() {}, Grid.prototype.destroy = function() {
            this.unwireEvents(), this.removeListener(), this.notify(destroy$1, {}), this.destroyDependentModules(), 
            _super.prototype.destroy.call(this), this.element.innerHTML = "", classList(this.element, [], [ "e-rtl", "e-gridhover", "e-responsive", "e-default", "e-device", "e-grid-min-height" ]);
        }, Grid.prototype.destroyDependentModules = function() {
            this.scrollModule.destroy(), this.keyboardModule.destroy(), this.focusModule.destroy();
        }, Grid.prototype.getModuleName = function() {
            return "grid";
        }, Grid.prototype.onPropertyChanged = function(newProp, oldProp) {
            var checkCursor, requireRefresh = !1, requireGridRefresh = !1;
            if (!this.isDestroyed) {
                for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                    var prop = _a[_i];
                    switch (prop) {
                      case "allowPaging":
                        this.notify(uiUpdate, {
                            module: "pager",
                            enable: this.allowPaging
                        }), requireRefresh = !0;
                        break;

                      case "pageSettings":
                        this.notify(inBoundModelChanged, {
                            module: "pager",
                            properties: newProp.pageSettings
                        }), isNullOrUndefined(newProp.pageSettings.currentPage) && isNullOrUndefined(newProp.pageSettings.totalRecordsCount) && (requireRefresh = !0);
                        break;

                      case "currencyCode":
                      case "locale":
                        _super.prototype.refresh.call(this);
                        break;

                      case "allowSorting":
                        this.notify(uiUpdate, {
                            module: "sort",
                            enable: this.allowSorting
                        }), requireRefresh = !0, checkCursor = !0;
                        break;

                      case "allowFiltering":
                        this.updateStackedFilter(), this.notify(uiUpdate, {
                            module: "filter",
                            enable: this.allowFiltering
                        }), requireRefresh = !0, "FilterBar" !== this.filterSettings.type && this.refreshHeader();
                        break;

                      case "height":
                      case "width":
                        this.notify(uiUpdate, {
                            module: "scroll",
                            properties: {
                                width: newProp.width,
                                height: newProp.height
                            }
                        });
                        break;

                      case "allowReordering":
                        this.headerModule.refreshUI(), checkCursor = !0;
                        break;

                      case "allowRowDragAndDrop":
                        this.notify(uiUpdate, {
                            module: "rowDragAndDrop",
                            enable: this.allowRowDragAndDrop
                        });
                        break;

                      case "rowTemplate":
                        this.rowTemplateFn = templateCompiler(this.rowTemplate), requireRefresh = !0;
                        break;

                      case "detailTemplate":
                        this.detailTemplateFn = templateCompiler(this.detailTemplate), requireRefresh = !0;
                        break;

                      case "allowGrouping":
                        this.notify(uiUpdate, {
                            module: "group",
                            enable: this.allowGrouping
                        }), this.headerModule.refreshUI(), requireRefresh = !0, checkCursor = !0;
                        break;

                      case "childGrid":
                        requireRefresh = !0;
                        break;

                      case "toolbar":
                        this.notify(uiUpdate, {
                            module: "toolbar"
                        });
                        break;

                      case "groupSettings":
                        isNullOrUndefined(newProp.groupSettings.showDropArea) || (this.headerModule.refreshUI(), 
                        requireRefresh = !0, checkCursor = !0), this.notify(inBoundModelChanged, {
                            module: "group",
                            properties: newProp.groupSettings,
                            oldProperties: oldProp.groupSettings
                        });
                        break;

                      case "aggregates":
                        this.notify(uiUpdate, {
                            module: "aggregate",
                            properties: newProp
                        });
                        break;

                      case "columns":
                        this.updateColumnObject(), requireGridRefresh = !0;
                        break;

                      case "frozenColumns":
                      case "frozenRows":
                        this.freezeRefresh();
                        break;

                      default:
                        this.extendedPropertyChange(prop, newProp);
                    }
                }
                checkCursor && this.updateDefaultCursor(), requireGridRefresh ? this.refresh() : requireRefresh && (this.notify(modelChanged, {
                    requestType: "refresh"
                }), requireRefresh = !1);
            }
        }, Grid.prototype.extendedPropertyChange = function(prop, newProp) {
            switch (prop) {
              case "enableRtl":
                this.updateRTL(), this.allowPaging && (this.element.querySelector(".e-gridpager").ej2_instances[0].enableRtl = newProp.enableRtl, 
                this.element.querySelector(".e-gridpager").ej2_instances[0].dataBind()), "auto" !== this.height && (this.scrollModule.removePadding(!newProp.enableRtl), 
                this.scrollModule.setPadding()), this.toolbar && (this.toolbarModule.getToolbar().ej2_instances[0].enableRtl = newProp.enableRtl, 
                this.toolbarModule.getToolbar().ej2_instances[0].dataBind()), this.contextMenuItems && (this.contextMenuModule.getContextMenu().ej2_instances[0].enableRtl = newProp.enableRtl, 
                this.contextMenuModule.getContextMenu().ej2_instances[0].dataBind()), this.showColumnMenu && (this.columnMenuModule.getColumnMenu().ej2_instances[0].enableRtl = newProp.enableRtl, 
                this.columnMenuModule.getColumnMenu().ej2_instances[0].dataBind()), this.notify("rtl-updated", {});
                break;

              case "enableAltRow":
                this.renderModule.refresh();
                break;

              case "allowResizing":
                this.headerModule.refreshUI(), this.updateResizeLines();
                break;

              case "rowHeight":
                this.rowHeight ? addClass([ this.element ], "e-grid-min-height") : removeClass([ this.element ], "e-grid-min-height"), 
                this.renderModule.refresh(), this.headerModule.refreshUI();
                break;

              case "gridLines":
                this.updateGridLines();
                break;

              case "showColumnMenu":
                this.headerModule.refreshUI(), this.notify(uiUpdate, {
                    module: "columnMenu",
                    enable: !0
                });
                break;

              case "columnMenuItems":
                this.notify(uiUpdate, {
                    module: "columnMenu",
                    enable: this.columnMenuItems
                });
                break;

              case "contextMenuItems":
                this.notify(uiUpdate, {
                    module: "contextMenu",
                    enable: this.contextMenuItems
                });
                break;

              case "showColumnChooser":
                this.notify(uiUpdate, {
                    module: "columnChooser",
                    enable: this.showColumnChooser
                });
                break;

              case "filterSettings":
                this.updateStackedFilter(), this.notify(inBoundModelChanged, {
                    module: "filter",
                    properties: newProp.filterSettings
                });
                break;

              case "searchSettings":
                this.notify(inBoundModelChanged, {
                    module: "search",
                    properties: newProp.searchSettings
                });
                break;

              case "sortSettings":
                this.notify(inBoundModelChanged, {
                    module: "sort"
                });
                break;

              case "selectionSettings":
                this.notify(inBoundModelChanged, {
                    module: "selection",
                    properties: newProp.selectionSettings
                });
                break;

              case "editSettings":
                this.notify(inBoundModelChanged, {
                    module: "edit",
                    properties: newProp.editSettings
                });
                break;

              case "allowTextWrap":
              case "textWrapSettings":
                this.allowTextWrap ? this.applyTextWrap() : this.removeTextWrap(), this.notify(freezeRender, {
                    case: "textwrap",
                    isModeChg: "textWrapSettings" === prop
                });
                break;

              case "dataSource":
                var pending_1 = this.getDataModule().getState();
                if (pending_1.isPending) {
                    var gResult_1 = isNullOrUndefined(this.dataSource) ? [] : this.dataSource.result;
                    (pending_1.group || []).forEach(function(name) {
                        gResult_1 = DataUtil.group(gResult_1, name);
                    }), this.dataSource = {
                        result: gResult_1,
                        count: this.dataSource.count
                    }, pending_1.resolver(this.dataSource);
                } else this.notify(dataSourceModified, {}), this.renderModule.refresh();
                break;

              case "enableHover":
                (newProp.enableHover ? addClass : removeClass)([ this.element ], "e-gridhover");
            }
        }, Grid.prototype.updateDefaultCursor = function() {
            for (var _i = 0, headerRows_1 = [].slice.call(this.element.querySelectorAll(".e-columnheader")); _i < headerRows_1.length; _i++) {
                var row = headerRows_1[_i];
                this.allowSorting || this.allowGrouping || this.allowReordering ? row.classList.remove("e-defaultcursor") : row.classList.add("e-defaultcursor");
            }
        }, Grid.prototype.updateColumnModel = function(columns) {
            for (var i = 0, len = columns.length; i < len; i++) columns[i].columns ? this.updateColumnModel(columns[i].columns) : this.columnModel.push(columns[i]);
            this.updateFrozenColumns();
        }, Grid.prototype.updateFrozenColumns = function() {
            for (var cols = this.columnModel, count = 0, i = 0, len = cols.length; i < len; i++) cols[i].isFrozen && (cols.splice(this.frozenColumns + count, 0, cols.splice(i, 1)[0]), 
            count++);
        }, Grid.prototype.getColumns = function(isRefresh) {
            var _this = this, inview = this.inViewIndexes.map(function(v) {
                return v - _this.groupSettings.columns.length;
            }).filter(function(v) {
                return v > -1;
            }), vLen = inview.length;
            (!this.enableColumnVirtualization || isNullOrUndefined(this.columnModel) || 0 === this.columnModel.length || isRefresh) && (this.columnModel = [], 
            this.updateColumnModel(this.columns));
            return 0 === vLen ? this.columnModel : this.columnModel.slice(inview[0], inview[vLen - 1] + 1);
        }, Grid.prototype.getColumnIndexesInView = function() {
            return this.inViewIndexes;
        }, Grid.prototype.getLocaleConstants = function() {
            return this.defaultLocale;
        }, Grid.prototype.setColumnIndexesInView = function(indexes) {
            this.inViewIndexes = indexes;
        }, Grid.prototype.getVisibleColumns = function() {
            for (var cols = [], _i = 0, _a = this.columnModel; _i < _a.length; _i++) {
                var col = _a[_i];
                col.visible && cols.push(col);
            }
            return cols;
        }, Grid.prototype.getHeaderContent = function() {
            return this.headerModule.getPanel();
        }, Grid.prototype.setGridHeaderContent = function(element) {
            this.headerModule.setPanel(element);
        }, Grid.prototype.getContentTable = function() {
            return this.contentModule.getTable();
        }, Grid.prototype.setGridContentTable = function(element) {
            this.contentModule.setTable(element);
        }, Grid.prototype.getContent = function() {
            return this.contentModule.getPanel();
        }, Grid.prototype.setGridContent = function(element) {
            this.contentModule.setPanel(element);
        }, Grid.prototype.getHeaderTable = function() {
            return this.headerModule.getTable();
        }, Grid.prototype.setGridHeaderTable = function(element) {
            this.headerModule.setTable(element);
        }, Grid.prototype.getFooterContent = function() {
            return isNullOrUndefined(this.footerElement) && (this.footerElement = this.element.getElementsByClassName("e-gridfooter")[0]), 
            this.footerElement;
        }, Grid.prototype.getFooterContentTable = function() {
            return isNullOrUndefined(this.footerElement) && (this.footerElement = this.element.getElementsByClassName("e-gridfooter")[0]), 
            this.footerElement.firstChild.firstChild;
        }, Grid.prototype.getPager = function() {
            return this.gridPager;
        }, Grid.prototype.setGridPager = function(element) {
            this.gridPager = element;
        }, Grid.prototype.getRowByIndex = function(index) {
            return this.contentModule.getRowByIndex(index);
        }, Grid.prototype.getMovableRowByIndex = function(index) {
            return this.contentModule.getMovableRowByIndex(index);
        }, Grid.prototype.getRows = function() {
            return this.contentModule.getRowElements();
        }, Grid.prototype.getRowInfo = function(target) {
            var ele = target, args = {
                target: target
            };
            if (!isNullOrUndefined(target) && isNullOrUndefined(parentsUntil(ele, "e-detailrowcollapse") && isNullOrUndefined(parentsUntil(ele, "e-recordplusexpand"))) && !this.isEdit) {
                var cell = closest(ele, ".e-rowcell");
                if (!cell) return args;
                var cellIndex = parseInt(cell.getAttribute("aria-colindex"), 10);
                if (!isNullOrUndefined(cell) && !isNaN(cellIndex)) {
                    var row_1 = closest(cell, ".e-row"), rowIndex = parseInt(row_1.getAttribute("aria-rowindex"), 10), frzCols = this.getFrozenColumns(), isMovable = !!frzCols && cellIndex >= frzCols, rowsObject = (isMovable ? this.contentModule.getMovableRows() : this.contentModule.getRows()).filter(function(r) {
                        return r.uid === row_1.getAttribute("data-uid");
                    }), rowData = rowsObject[0].data, column = rowsObject[0].cells[isMovable ? cellIndex - frzCols : cellIndex].column;
                    args = {
                        cell: cell,
                        cellIndex: cellIndex,
                        row: row_1,
                        rowIndex: rowIndex,
                        rowData: rowData,
                        column: column,
                        target: target
                    };
                }
            }
            return args;
        }, Grid.prototype.getMovableRows = function() {
            return this.contentModule.getMovableRowElements();
        }, Grid.prototype.getDataRows = function() {
            var rows = [].slice.call(this.getContentTable().querySelector("tbody").children);
            if (this.frozenRows) {
                var freezeRows = [].slice.call(this.getHeaderTable().querySelector("tbody").children);
                rows = this.addMovableRows(freezeRows, rows);
            }
            return this.generateDataRows(rows);
        }, Grid.prototype.addMovableRows = function(fRows, mrows) {
            for (var i = 0, len = mrows.length; i < len; i++) fRows.push(mrows[i]);
            return fRows;
        }, Grid.prototype.generateDataRows = function(rows) {
            for (var dRows = [], i = 0, len = rows.length; i < len; i++) rows[i].classList.contains("e-row") && !rows[i].classList.contains("e-hiddenrow") && dRows.push(rows[i]);
            return dRows;
        }, Grid.prototype.getMovableDataRows = function() {
            var rows = [].slice.call(this.getContent().querySelector(".e-movablecontent").querySelector("tbody").children);
            if (this.frozenRows) {
                var freezeRows = [].slice.call(this.getHeaderContent().querySelector(".e-movableheader").querySelector("tbody").children);
                rows = this.addMovableRows(freezeRows, rows);
            }
            return this.generateDataRows(rows);
        }, Grid.prototype.setCellValue = function(key, field, value) {
            var fieldIdx, col, tr, pkName = this.getPrimaryKeyFieldNames()[0], cell = new CellRenderer(this, this.serviceLocator), selectedRow = {}, rowObjects = this.contentModule.getRows();
            if (fieldIdx = this.getColumnIndexByField(field), col = this.getColumnByField(field), 
            selectedRow = rowObjects.filter(function(r) {
                return getValue(pkName, r.data) === key;
            })[0], tr = isNullOrUndefined(selectedRow) ? null : this.element.querySelector("[data-uid=" + selectedRow.uid + "]"), 
            !isNullOrUndefined(tr)) {
                setValue(field, value, selectedRow.data);
                var td = tr.childNodes[fieldIdx];
                isNullOrUndefined(td) || (cell.refreshTD(td, selectedRow.cells[fieldIdx], selectedRow.data), 
                this.trigger("queryCellInfo", {
                    cell: td,
                    column: col,
                    data: selectedRow.data
                }));
            }
        }, Grid.prototype.setRowData = function(key, rowData) {
            var selectedRow, rowObjects = this.contentModule.getRows(), pkName = this.getPrimaryKeyFieldNames()[0], rowRenderer = new RowRenderer(this.serviceLocator, null, this);
            !isNullOrUndefined(selectedRow = rowObjects.filter(function(r) {
                return getValue(pkName, r.data) === key;
            })[0]) && this.element.querySelectorAll("[data-uid=" + selectedRow.uid + "]").length && (selectedRow.changes = rowData, 
            refreshForeignData(selectedRow, this.getForeignKeyColumns(), selectedRow.changes), 
            rowRenderer.refresh(selectedRow, this.getColumns(), !0));
        }, Grid.prototype.getCellFromIndex = function(rowIndex, columnIndex) {
            return this.getDataRows()[rowIndex].querySelectorAll(".e-rowcell")[columnIndex];
        }, Grid.prototype.getMovableCellFromIndex = function(rowIndex, columnIndex) {
            return this.getMovableDataRows()[rowIndex].querySelectorAll(".e-rowcell")[columnIndex - this.getFrozenColumns()];
        }, Grid.prototype.getColumnHeaderByIndex = function(index) {
            return this.getHeaderTable().querySelectorAll(".e-headercell")[index];
        }, Grid.prototype.getRowObjectFromUID = function(uid) {
            var rows = this.contentModule.getRows(), row = this.rowObject(rows, uid);
            return this.getFrozenColumns() && !row ? row = this.rowObject(this.contentModule.getMovableRows(), uid) : row;
        }, Grid.prototype.rowObject = function(rows, uid) {
            for (var _i = 0, rows_1 = rows; _i < rows_1.length; _i++) {
                var row = rows_1[_i];
                if (row.uid === uid) return row;
            }
            return null;
        }, Grid.prototype.getRowsObject = function() {
            return this.contentModule.getRows();
        }, Grid.prototype.getMovableRowsObject = function() {
            return this.contentModule.getMovableRows();
        }, Grid.prototype.getColumnHeaderByField = function(field) {
            return this.getColumnHeaderByUid(this.getColumnByField(field).uid);
        }, Grid.prototype.getColumnHeaderByUid = function(uid) {
            return this.getHeaderContent().querySelector("[e-mappinguid=" + uid + "]").parentElement;
        }, Grid.prototype.getColumnByField = function(field) {
            return iterateArrayOrObject(this.getColumns(), function(item, index) {
                if (item.field === field) return item;
            })[0];
        }, Grid.prototype.getColumnIndexByField = function(field) {
            var index = iterateArrayOrObject(this.getColumns(), function(item, index) {
                if (item.field === field) return index;
            })[0];
            return isNullOrUndefined(index) ? -1 : index;
        }, Grid.prototype.getColumnByUid = function(uid) {
            return iterateArrayOrObject(this.getColumns(), function(item, index) {
                if (item.uid === uid) return item;
            })[0];
        }, Grid.prototype.getColumnIndexByUid = function(uid) {
            var index = iterateArrayOrObject(this.getColumns(), function(item, index) {
                if (item.uid === uid) return index;
            })[0];
            return isNullOrUndefined(index) ? -1 : index;
        }, Grid.prototype.getUidByColumnField = function(field) {
            return iterateArrayOrObject(this.getColumns(), function(item, index) {
                if (item.field === field) return item.uid;
            })[0];
        }, Grid.prototype.getNormalizedColumnIndex = function(uid) {
            var index = this.getColumnIndexByUid(uid);
            return this.allowGrouping && (index += this.groupSettings.columns.length), this.isDetail() && index++, 
            index;
        }, Grid.prototype.getColumnFieldNames = function() {
            for (var column, columnNames = [], i = 0, len = this.getColumns().length; i < len; i++) (column = this.getColumns()[i]).visible && columnNames.push(column.field);
            return columnNames;
        }, Grid.prototype.getRowTemplate = function() {
            return this.rowTemplateFn;
        }, Grid.prototype.getDetailTemplate = function() {
            return this.detailTemplateFn;
        }, Grid.prototype.getPrimaryKeyFieldNames = function() {
            for (var keys = [], key = 0, col = this.columns, cLen = col.length; key < cLen; key++) col[key].isPrimaryKey && keys.push(col[key].field);
            return keys;
        }, Grid.prototype.refresh = function() {
            this.headerModule.refreshUI(), this.updateStackedFilter(), this.updateDefaultCursor(), 
            this.renderModule.refresh();
        }, Grid.prototype.refreshHeader = function() {
            this.headerModule.refreshUI();
        }, Grid.prototype.getSelectedRows = function() {
            return this.selectionModule ? this.selectionModule.selectedRecords : [];
        }, Grid.prototype.getSelectedRowIndexes = function() {
            return this.selectionModule ? this.selectionModule.selectedRowIndexes : [];
        }, Grid.prototype.getSelectedRowCellIndexes = function() {
            return this.selectionModule.selectedRowCellIndexes;
        }, Grid.prototype.getSelectedRecords = function() {
            return this.selectionModule.getSelectedRecords();
        }, Grid.prototype.getDataModule = function() {
            return this.renderModule.data;
        }, Grid.prototype.showColumns = function(keys, showBy) {
            showBy = showBy || "headerText", this.showHider.show(keys, showBy);
        }, Grid.prototype.hideColumns = function(keys, hideBy) {
            hideBy = hideBy || "headerText", this.showHider.hide(keys, hideBy);
        }, Grid.prototype.getFrozenColumns = function() {
            return this.frozenColumns + this.getFrozenCount(this.columns, 0);
        }, Grid.prototype.getFrozenCount = function(cols, cnt) {
            for (var i = 0, len = cols.length; i < len; i++) cols[i].columns ? cnt = this.getFrozenCount(cols[i].columns, cnt) : cols[i].isFrozen && cnt++;
            return cnt;
        }, Grid.prototype.goToPage = function(pageNo) {
            this.pagerModule.goToPage(pageNo);
        }, Grid.prototype.updateExternalMessage = function(message) {
            this.pagerModule.updateExternalMessage(message);
        }, Grid.prototype.sortColumn = function(columnName, direction, isMultiSort) {
            this.sortModule.sortColumn(columnName, direction, isMultiSort);
        }, Grid.prototype.clearSorting = function() {
            this.sortModule.clearSorting();
        }, Grid.prototype.removeSortColumn = function(field) {
            this.sortModule.removeSortColumn(field);
        }, Grid.prototype.filterByColumn = function(fieldName, filterOperator, filterValue, predicate, matchCase, ignoreAccent, actualFilterValue, actualOperator) {
            this.filterModule.filterByColumn(fieldName, filterOperator, filterValue, predicate, matchCase, ignoreAccent, actualFilterValue, actualOperator);
        }, Grid.prototype.clearFiltering = function() {
            this.filterModule.clearFiltering();
        }, Grid.prototype.removeFilteredColsByField = function(field, isClearFilterBar) {
            this.filterModule.removeFilteredColsByField(field, isClearFilterBar);
        }, Grid.prototype.selectRow = function(index, isToggle) {
            this.selectionModule.selectRow(index, isToggle);
        }, Grid.prototype.selectRows = function(rowIndexes) {
            this.selectionModule.selectRows(rowIndexes);
        }, Grid.prototype.clearSelection = function() {
            this.selectionModule.clearSelection();
        }, Grid.prototype.selectCell = function(cellIndex, isToggle) {
            this.selectionModule.selectCell(cellIndex, isToggle);
        }, Grid.prototype.search = function(searchString) {
            this.searchModule.search(searchString);
        }, Grid.prototype.print = function() {
            this.printModule.print();
        }, Grid.prototype.deleteRecord = function(fieldname, data) {
            this.editModule.deleteRecord(fieldname, data);
        }, Grid.prototype.startEdit = function() {
            this.editModule.startEdit();
        }, Grid.prototype.endEdit = function() {
            this.editModule.endEdit();
        }, Grid.prototype.closeEdit = function() {
            this.editModule.closeEdit();
        }, Grid.prototype.addRecord = function(data, index) {
            this.editModule.addRecord(data, index);
        }, Grid.prototype.deleteRow = function(tr) {
            this.editModule.deleteRow(tr);
        }, Grid.prototype.copy = function(withHeader) {
            this.clipboardModule.copy(withHeader);
        }, Grid.prototype.recalcIndentWidth = function() {
            if (this.getHeaderTable().querySelector(".e-emptycell") && (this.groupSettings.columns.length || this.isDetail()) && !this.getHeaderTable().querySelector(".e-emptycell").getAttribute("indentRefreshed") && this.getContentTable()) {
                var indentWidth = this.getHeaderTable().querySelector(".e-emptycell").parentElement.offsetWidth, headerCol = [].slice.call(this.getHeaderTable().querySelector("colgroup").childNodes), contentCol = [].slice.call(this.getContentTable().querySelector("colgroup").childNodes), perPixel = indentWidth / 30, i = 0;
                for (perPixel >= 1 && (indentWidth = 30 / perPixel), this.enableColumnVirtualization && (indentWidth = 30); i < this.groupSettings.columns.length; ) headerCol[i].style.width = indentWidth + "px", 
                contentCol[i].style.width = indentWidth + "px", this.notify(columnWidthChanged, {
                    index: i,
                    width: indentWidth
                }), i++;
                this.isDetail() && (headerCol[i].style.width = indentWidth + "px", contentCol[i].style.width = indentWidth + "px", 
                this.notify(columnWidthChanged, {
                    index: i,
                    width: indentWidth
                })), this.getHeaderTable().querySelector(".e-emptycell").setAttribute("indentRefreshed", "true");
            }
        }, Grid.prototype.reorderColumns = function(fromFName, toFName) {
            this.reorderModule.reorderColumns(fromFName, toFName);
        }, Grid.prototype.autoFitColumns = function(fieldNames) {
            this.resizeModule.autoFitColumns(fieldNames);
        }, Grid.prototype.createColumnchooser = function(x, y, target) {
            this.columnChooserModule.renderColumnChooser(x, y, target);
        }, Grid.prototype.initializeServices = function() {
            this.serviceLocator.register("widthService", this.widthService = new ColumnWidthService(this)), 
            this.serviceLocator.register("cellRendererFactory", new CellRendererFactory()), 
            this.serviceLocator.register("rendererFactory", new RendererFactory()), this.serviceLocator.register("localization", this.localeObj = new L10n(this.getModuleName(), this.defaultLocale, this.locale)), 
            this.serviceLocator.register("valueFormatter", this.valueFormatterService = new ValueFormatter(this.locale)), 
            this.serviceLocator.register("showHideService", this.showHider = new ShowHide(this)), 
            this.serviceLocator.register("ariaService", this.ariaService = new AriaService()), 
            this.serviceLocator.register("focus", this.focusModule = new FocusStrategy(this));
        }, Grid.prototype.processModel = function() {
            var flag, j, _this = this, gCols = this.groupSettings.columns, sCols = this.sortSettings.columns;
            if (this.allowGrouping) for (var _loop_1 = function(i, len) {
                j = 0;
                for (var sLen = sCols.length; j < sLen; j++) if (sCols[j].field === gCols[i]) {
                    flag = !0;
                    break;
                }
                if (flag ? this_1.allowSorting ? this_1.sortedColumns.push(sCols[j].field) : sCols[j].direction = "Ascending" : sCols.push({
                    field: gCols[i],
                    direction: "Ascending"
                }), !this_1.groupSettings.showGroupedColumn) {
                    (this_1.enableColumnVirtualization ? this_1.columns.filter(function(c) {
                        return c.field === gCols[i];
                    })[0] : this_1.getColumnByField(gCols[i])).visible = !1;
                }
            }, this_1 = this, i = 0, len = gCols.length; i < len; i++) _loop_1(i);
            if (gCols.length || sCols.forEach(function(col) {
                _this.sortedColumns.push(col.field);
            }), this.rowTemplateFn = templateCompiler(this.rowTemplate), this.detailTemplateFn = templateCompiler(this.detailTemplate), 
            !isNullOrUndefined(this.parentDetails)) {
                var value = isNullOrUndefined(this.parentDetails.parentKeyFieldValue) ? "undefined" : this.parentDetails.parentKeyFieldValue;
                this.query.where(this.queryString, "equal", value, !0);
            }
            this.initForeignColumn();
        }, Grid.prototype.initForeignColumn = function() {
            this.isForeignKeyEnabled(this.getColumns()) && this.notify("initForeignKeyColumn", this.getForeignKeyColumns());
        }, Grid.prototype.gridRender = function() {
            this.updateRTL(), this.enableHover && this.element.classList.add("e-gridhover"), 
            Browser.isDevice && this.element.classList.add("e-device"), this.rowHeight && this.element.classList.add("e-grid-min-height"), 
            classList(this.element, [ "e-responsive", "e-default" ], []);
            var rendererFactory = this.serviceLocator.getService("rendererFactory");
            this.headerModule = rendererFactory.getRenderer(RenderType.Header), this.contentModule = rendererFactory.getRenderer(RenderType.Content), 
            this.printModule = new Print(this, this.scrollModule), this.clipboardModule = new Clipboard(this), 
            this.renderModule.render(), this.eventInitializer(), this.createGridPopUpElement(), 
            this.widthService.setWidthToColumns(), this.updateGridLines(), this.applyTextWrap();
        }, Grid.prototype.dataReady = function() {
            this.scrollModule.setWidth(), this.scrollModule.setHeight(), "auto" !== this.height && this.scrollModule.setPadding();
        }, Grid.prototype.updateRTL = function() {
            this.enableRtl ? this.element.classList.add("e-rtl") : this.element.classList.remove("e-rtl");
        }, Grid.prototype.createGridPopUpElement = function() {
            var popup = createElement("div", {
                className: "e-gridpopup",
                styles: "display:none;"
            }), content = createElement("div", {
                className: "e-content",
                attrs: {
                    tabIndex: "-1"
                }
            });
            append([ content, createElement("div", {
                className: "e-uptail e-tail"
            }) ], popup), content.appendChild(createElement("span")), append([ content, createElement("div", {
                className: "e-downtail e-tail"
            }) ], popup), this.element.appendChild(popup);
        }, Grid.prototype.updateGridLines = function() {
            switch (classList(this.element, [], [ "e-verticallines", "e-horizontallines", "e-hidelines", "e-bothlines" ]), 
            this.gridLines) {
              case "Horizontal":
                this.element.classList.add("e-horizontallines");
                break;

              case "Vertical":
                this.element.classList.add("e-verticallines");
                break;

              case "None":
                this.element.classList.add("e-hidelines");
                break;

              case "Both":
                this.element.classList.add("e-bothlines");
            }
            this.updateResizeLines();
        }, Grid.prototype.updateResizeLines = function() {
            this.allowResizing && "Vertical" !== this.gridLines && "Both" !== this.gridLines ? this.element.classList.add("e-resize-lines") : this.element.classList.remove("e-resize-lines");
        }, Grid.prototype.applyTextWrap = function() {
            if (this.allowTextWrap) {
                var headerRows = [].slice.call(this.element.querySelectorAll(".e-columnheader"));
                switch (this.textWrapSettings.wrapMode) {
                  case "Header":
                    wrap(this.element, !1), wrap(this.getContent(), !1), wrap(headerRows, !0);
                    break;

                  case "Content":
                    wrap(this.getContent(), !0), wrap(this.element, !1), wrap(headerRows, !1);
                    break;

                  default:
                    wrap(this.element, !0), wrap(this.getContent(), !1), wrap(headerRows, !1);
                }
            }
        }, Grid.prototype.removeTextWrap = function() {
            wrap(this.element, !1);
            wrap([].slice.call(this.element.querySelectorAll(".e-columnheader")), !1), wrap(this.getContent(), !1);
        }, Grid.prototype.refreshTooltip = function() {
            for (var width, headerTable = this.getHeaderTable(), htable = (this.getContentTable(), 
            this.createTable(headerTable, "e-gridheader", "header")), ctable = this.createTable(headerTable, "e-gridheader", "content"), all = this.element.querySelectorAll(".e-ellipsistooltip"), allele = [], i = 0; i < all.length; i++) allele[i] = all[i];
            allele.forEach(function(element) {
                var table = headerTable.contains(element) ? htable : ctable, ele = headerTable.contains(element) ? "th" : "tr";
                if (table.querySelector(ele).className = element.className, table.querySelector(ele).innerHTML = element.innerHTML, 
                (width = table.querySelector(ele).getBoundingClientRect().width) > element.getBoundingClientRect().width && !element.classList.contains("e-tooltip")) new Tooltip({
                    content: element.innerHTML
                }, element); else width < element.getBoundingClientRect().width && element.classList.contains("e-tooltip") && element.ej2_instances[0].destroy();
            }), document.body.removeChild(htable), document.body.removeChild(ctable);
        }, Grid.prototype.createTable = function(table, tag, type) {
            var myTableDiv = createElement("div");
            myTableDiv.className = this.element.className, myTableDiv.style.cssText = "display: inline-block;visibility:hidden;position:absolute";
            var mySubDiv = createElement("div");
            mySubDiv.className = tag;
            var myTable = createElement("table");
            myTable.className = table.className, myTable.style.cssText = "table-layout: auto;width: auto";
            var ele = "header" === type ? "th" : "td", myTr = createElement("tr"), mytd = createElement(ele);
            return myTr.appendChild(mytd), myTable.appendChild(myTr), mySubDiv.appendChild(myTable), 
            myTableDiv.appendChild(mySubDiv), document.body.appendChild(myTableDiv), myTableDiv;
        }, Grid.prototype.wireEvents = function() {
            EventHandler.add(this.element, "click", this.mouseClickHandler, this), EventHandler.add(this.element, "touchend", this.mouseClickHandler, this), 
            EventHandler.add(this.element, "focusout", this.focusOutHandler, this), EventHandler.add(this.getContent(), "dblclick", this.dblClickHandler, this), 
            this.allowKeyboard && (this.element.tabIndex = -1 === this.element.tabIndex ? 0 : this.element.tabIndex), 
            this.keyboardModule = new KeyboardEvents(this.element, {
                keyAction: this.keyActionHandler.bind(this),
                keyConfigs: this.keyConfigs,
                eventName: "keydown"
            });
        }, Grid.prototype.unwireEvents = function() {
            EventHandler.remove(this.element, "click", this.mouseClickHandler), EventHandler.remove(this.element, "touchend", this.mouseClickHandler), 
            EventHandler.remove(this.element, "focusout", this.focusOutHandler);
        }, Grid.prototype.addListener = function() {
            var _this = this;
            this.isDestroyed || (this.on(dataReady, this.dataReady, this), this.on(contentReady, this.recalcIndentWidth, this), 
            [ updateData, modelChanged, contentReady, columnWidthChanged ].forEach(function(event) {
                return _this.on(event, _this.refreshTooltip, _this);
            }), this.on(headerRefreshed, this.recalcIndentWidth, this), this.dataBoundFunction = this.refreshMediaCol.bind(this), 
            this.addEventListener(dataBound, this.dataBoundFunction));
        }, Grid.prototype.removeListener = function() {
            var _this = this;
            this.isDestroyed || (this.off(dataReady, this.dataReady), this.off(contentReady, this.recalcIndentWidth), 
            [ updateData, modelChanged, contentReady, columnWidthChanged ].forEach(function(event) {
                return _this.off(event, _this.refreshTooltip);
            }), this.off(headerRefreshed, this.recalcIndentWidth), this.removeEventListener(dataBound, this.dataBoundFunction));
        }, Grid.prototype.getCurrentViewRecords = function() {
            return this.allowGrouping && this.groupSettings.columns.length ? this.currentViewData.records : this.currentViewData;
        }, Grid.prototype.mouseClickHandler = function(e) {
            this.isChildGrid(e) || parentsUntil(e.target, "e-gridpopup") && e.touches || this.element.querySelectorAll(".e-cloneproperties").length || this.checkEdit(e) || (!this.allowRowDragAndDrop && (parentsUntil(e.target, "e-gridcontent") || "TD" === e.target.tagName) || !this.allowGrouping && !this.allowReordering && parentsUntil(e.target, "e-gridheader")) && e.touches || (parentsUntil(e.target, "e-gridheader") && this.allowRowDragAndDrop && e.preventDefault(), 
            this.notify(click, e));
        }, Grid.prototype.checkEdit = function(e) {
            var tr = parentsUntil(e.target, "e-row"), isEdit = "Batch" !== this.editSettings.mode && this.isEdit && tr && (tr.classList.contains("e-editedrow") || tr.classList.contains("e-addedrow"));
            return !parentsUntil(e.target, "e-unboundcelldiv") && (isEdit || parentsUntil(e.target, "e-rowcell") && parentsUntil(e.target, "e-rowcell").classList.contains("e-editedbatchcell"));
        }, Grid.prototype.dblClickHandler = function(e) {
            var grid = parentsUntil(e.target, "e-grid");
            if (!isNullOrUndefined(grid) && grid.id === this.element.id && !closest(e.target, ".e-unboundcelldiv")) {
                var args = this.getRowInfo(e.target);
                args.target = e.target, this.trigger("recordDoubleClick", args), this.notify("dblclick", e);
            }
        }, Grid.prototype.focusOutHandler = function(e) {
            if (!this.isChildGrid(e)) {
                parentsUntil(e.target, "e-grid") || (this.element.querySelector(".e-gridpopup").style.display = "None");
                var filterClear = this.element.querySelector(".e-cancel:not(.e-hide)");
                filterClear && filterClear.classList.add("e-hide"), e.relatedTarget && parentsUntil(e.relatedTarget, "e-grid") || this.keyPress || "Batch" !== this.editSettings.mode || !this.isEdit || this.editModule.saveCell(), 
                this.keyPress = !1;
            }
        }, Grid.prototype.isChildGrid = function(e) {
            var gridElement = parentsUntil(e.target, "e-grid");
            return !(!gridElement || gridElement.id === this.element.id);
        }, Grid.prototype.mergePersistGridData = function() {
            var data = window.localStorage.getItem(this.getModuleName() + this.element.id);
            if (!isNullOrUndefined(data) && "" !== data) {
                var dataObj = JSON.parse(data), keys = Object.keys(dataObj);
                this.isProtectedOnChange = !0;
                for (var _i = 0, keys_1 = keys; _i < keys_1.length; _i++) {
                    var key = keys_1[_i];
                    "object" != typeof this[key] || isNullOrUndefined(this[key]) ? this[key] = dataObj[key] : Array.isArray(this[key]) && "columns" === key ? (this.mergeColumns(dataObj[key], this[key]), 
                    this[key] = dataObj[key]) : extend(this[key], dataObj[key]);
                }
                this.isProtectedOnChange = !1;
            }
        }, Grid.prototype.mergeColumns = function(storedColumn, columns) {
            var _this = this;
            storedColumn.forEach(function(col, index, arr) {
                var ind, localCol = _this.getColumnByField(col.field) || columns.some(function(element, i) {
                    return ind = i, element.headerText === col.headerText;
                }) && columns[ind];
                isNullOrUndefined(localCol) || (localCol.columns && localCol.columns.length ? _this.mergeColumns(col.columns, localCol.columns) : arr[index] = extend({}, localCol, col, !0));
            });
        }, Grid.prototype.isDetail = function() {
            return !isNullOrUndefined(this.detailTemplate) || !isNullOrUndefined(this.childGrid);
        }, Grid.prototype.isCommandColumn = function(columns) {
            var _this = this;
            return columns.some(function(col) {
                return col.columns ? _this.isCommandColumn(col.columns) : !(!col.commands && !col.commandsTemplate);
            });
        }, Grid.prototype.isForeignKeyEnabled = function(columns) {
            var _this = this;
            return columns.some(function(col) {
                return col.columns ? _this.isForeignKeyEnabled(col.columns) : !(!col.dataSource || !col.foreignKeyValue);
            });
        }, Grid.prototype.keyActionHandler = function(e) {
            this.keyPress = !0, this.isChildGrid(e) || this.isEdit && "escape" !== e.action && "enter" !== e.action && "shiftEnter" !== e.action && "tab" !== e.action && "shiftTab" !== e.action || this.allowKeyboard && ("ctrlPlusP" === e.action && (e.preventDefault(), 
            this.print()), this.notify(keyPressed, e));
        }, Grid.prototype.setInjectedModules = function(modules) {
            this.injectedModules = modules;
        }, Grid.prototype.updateColumnObject = function() {
            prepareColumns(this.columns, this.enableColumnVirtualization), this.initForeignColumn(), 
            this.notify("auto-col", {});
        }, Grid.prototype.getForeignKeyColumns = function() {
            return this.getColumns().filter(function(col) {
                return col.isForeignColumn();
            });
        }, Grid.prototype.refreshColumns = function() {
            this.updateColumnObject(), this.refresh();
        }, Grid.prototype.excelExport = function(excelExportProperties, isMultipleExport, workbook, isBlob) {
            return this.excelExportModule.Map(this, excelExportProperties, isMultipleExport, workbook, !1, isBlob);
        }, Grid.prototype.csvExport = function(excelExportProperties, isMultipleExport, workbook, isBlob) {
            return this.excelExportModule.Map(this, excelExportProperties, isMultipleExport, workbook, !0, isBlob);
        }, Grid.prototype.pdfExport = function(pdfExportProperties, isMultipleExport, pdfDoc, isBlob) {
            return this.pdfExportModule.Map(this, pdfExportProperties, isMultipleExport, pdfDoc, isBlob);
        }, Grid.prototype.groupColumn = function(columnName) {
            this.groupModule.groupColumn(columnName);
        }, Grid.prototype.ungroupColumn = function(columnName) {
            this.groupModule.ungroupColumn(columnName);
        }, Grid.prototype.isContextMenuOpen = function() {
            return this.contextMenuModule && this.contextMenuModule.isOpen;
        }, Grid.prototype.ensureModuleInjected = function(module) {
            return this.getInjectedModules().indexOf(module) >= 0;
        }, Grid.prototype.destroyTemplate = function(propertyNames) {
            this.clearTemplate(propertyNames);
        }, __decorate$49([ Property([]) ], Grid.prototype, "columns", void 0), __decorate$49([ Property(!0) ], Grid.prototype, "enableAltRow", void 0), 
        __decorate$49([ Property(!0) ], Grid.prototype, "enableHover", void 0), __decorate$49([ Property(!0) ], Grid.prototype, "allowKeyboard", void 0), 
        __decorate$49([ Property(!1) ], Grid.prototype, "allowTextWrap", void 0), __decorate$49([ Complex({}, TextWrapSettings) ], Grid.prototype, "textWrapSettings", void 0), 
        __decorate$49([ Property(!1) ], Grid.prototype, "allowPaging", void 0), __decorate$49([ Complex({}, PageSettings) ], Grid.prototype, "pageSettings", void 0), 
        __decorate$49([ Property(!1) ], Grid.prototype, "enableVirtualization", void 0), 
        __decorate$49([ Property(!1) ], Grid.prototype, "enableColumnVirtualization", void 0), 
        __decorate$49([ Complex({}, SearchSettings) ], Grid.prototype, "searchSettings", void 0), 
        __decorate$49([ Property(!1) ], Grid.prototype, "allowSorting", void 0), __decorate$49([ Property(!0) ], Grid.prototype, "allowMultiSorting", void 0), 
        __decorate$49([ Property(!1) ], Grid.prototype, "allowExcelExport", void 0), __decorate$49([ Property(!1) ], Grid.prototype, "allowPdfExport", void 0), 
        __decorate$49([ Complex({}, SortSettings) ], Grid.prototype, "sortSettings", void 0), 
        __decorate$49([ Property(!0) ], Grid.prototype, "allowSelection", void 0), __decorate$49([ Property(-1) ], Grid.prototype, "selectedRowIndex", void 0), 
        __decorate$49([ Complex({}, SelectionSettings) ], Grid.prototype, "selectionSettings", void 0), 
        __decorate$49([ Property(!1) ], Grid.prototype, "allowFiltering", void 0), __decorate$49([ Property(!1) ], Grid.prototype, "allowReordering", void 0), 
        __decorate$49([ Property(!1) ], Grid.prototype, "allowResizing", void 0), __decorate$49([ Property(!1) ], Grid.prototype, "allowRowDragAndDrop", void 0), 
        __decorate$49([ Complex({}, RowDropSettings) ], Grid.prototype, "rowDropSettings", void 0), 
        __decorate$49([ Complex({}, FilterSettings) ], Grid.prototype, "filterSettings", void 0), 
        __decorate$49([ Property(!1) ], Grid.prototype, "allowGrouping", void 0), __decorate$49([ Property(!1) ], Grid.prototype, "showColumnMenu", void 0), 
        __decorate$49([ Complex({}, GroupSettings) ], Grid.prototype, "groupSettings", void 0), 
        __decorate$49([ Complex({}, EditSettings) ], Grid.prototype, "editSettings", void 0), 
        __decorate$49([ Collection([], AggregateRow) ], Grid.prototype, "aggregates", void 0), 
        __decorate$49([ Property(!1) ], Grid.prototype, "showColumnChooser", void 0), __decorate$49([ Property("auto") ], Grid.prototype, "height", void 0), 
        __decorate$49([ Property("auto") ], Grid.prototype, "width", void 0), __decorate$49([ Property("Default") ], Grid.prototype, "gridLines", void 0), 
        __decorate$49([ Property() ], Grid.prototype, "rowTemplate", void 0), __decorate$49([ Property() ], Grid.prototype, "detailTemplate", void 0), 
        __decorate$49([ Property() ], Grid.prototype, "childGrid", void 0), __decorate$49([ Property() ], Grid.prototype, "queryString", void 0), 
        __decorate$49([ Property("AllPages") ], Grid.prototype, "printMode", void 0), __decorate$49([ Property([]) ], Grid.prototype, "dataSource", void 0), 
        __decorate$49([ Property(null) ], Grid.prototype, "rowHeight", void 0), __decorate$49([ Property() ], Grid.prototype, "query", void 0), 
        __decorate$49([ Property("USD") ], Grid.prototype, "currencyCode", void 0), __decorate$49([ Property() ], Grid.prototype, "toolbar", void 0), 
        __decorate$49([ Property() ], Grid.prototype, "contextMenuItems", void 0), __decorate$49([ Property() ], Grid.prototype, "columnMenuItems", void 0), 
        __decorate$49([ Property() ], Grid.prototype, "toolbarTemplate", void 0), __decorate$49([ Property() ], Grid.prototype, "pagerTemplate", void 0), 
        __decorate$49([ Property(0) ], Grid.prototype, "frozenRows", void 0), __decorate$49([ Property(0) ], Grid.prototype, "frozenColumns", void 0), 
        __decorate$49([ Event() ], Grid.prototype, "created", void 0), __decorate$49([ Event() ], Grid.prototype, "destroyed", void 0), 
        __decorate$49([ Event() ], Grid.prototype, "load", void 0), __decorate$49([ Event() ], Grid.prototype, "rowDataBound", void 0), 
        __decorate$49([ Event() ], Grid.prototype, "queryCellInfo", void 0), __decorate$49([ Event() ], Grid.prototype, "actionBegin", void 0), 
        __decorate$49([ Event() ], Grid.prototype, "actionComplete", void 0), __decorate$49([ Event() ], Grid.prototype, "actionFailure", void 0), 
        __decorate$49([ Event() ], Grid.prototype, "dataBound", void 0), __decorate$49([ Event() ], Grid.prototype, "recordDoubleClick", void 0), 
        __decorate$49([ Event() ], Grid.prototype, "rowSelecting", void 0), __decorate$49([ Event() ], Grid.prototype, "rowSelected", void 0), 
        __decorate$49([ Event() ], Grid.prototype, "rowDeselecting", void 0), __decorate$49([ Event() ], Grid.prototype, "rowDeselected", void 0), 
        __decorate$49([ Event() ], Grid.prototype, "cellSelecting", void 0), __decorate$49([ Event() ], Grid.prototype, "cellSelected", void 0), 
        __decorate$49([ Event() ], Grid.prototype, "cellDeselecting", void 0), __decorate$49([ Event() ], Grid.prototype, "cellDeselected", void 0), 
        __decorate$49([ Event() ], Grid.prototype, "columnDragStart", void 0), __decorate$49([ Event() ], Grid.prototype, "columnDrag", void 0), 
        __decorate$49([ Event() ], Grid.prototype, "columnDrop", void 0), __decorate$49([ Event() ], Grid.prototype, "printComplete", void 0), 
        __decorate$49([ Event() ], Grid.prototype, "beforePrint", void 0), __decorate$49([ Event() ], Grid.prototype, "pdfQueryCellInfo", void 0), 
        __decorate$49([ Event() ], Grid.prototype, "excelQueryCellInfo", void 0), __decorate$49([ Event() ], Grid.prototype, "beforeExcelExport", void 0), 
        __decorate$49([ Event() ], Grid.prototype, "excelExportComplete", void 0), __decorate$49([ Event() ], Grid.prototype, "beforePdfExport", void 0), 
        __decorate$49([ Event() ], Grid.prototype, "pdfExportComplete", void 0), __decorate$49([ Event() ], Grid.prototype, "detailDataBound", void 0), 
        __decorate$49([ Event() ], Grid.prototype, "rowDragStart", void 0), __decorate$49([ Event() ], Grid.prototype, "rowDrag", void 0), 
        __decorate$49([ Event() ], Grid.prototype, "rowDrop", void 0), __decorate$49([ Event() ], Grid.prototype, "toolbarClick", void 0), 
        __decorate$49([ Event() ], Grid.prototype, "beforeOpenColumnChooser", void 0), __decorate$49([ Event() ], Grid.prototype, "batchAdd", void 0), 
        __decorate$49([ Event() ], Grid.prototype, "batchDelete", void 0), __decorate$49([ Event() ], Grid.prototype, "beforeBatchAdd", void 0), 
        __decorate$49([ Event() ], Grid.prototype, "beforeBatchDelete", void 0), __decorate$49([ Event() ], Grid.prototype, "beforeBatchSave", void 0), 
        __decorate$49([ Event() ], Grid.prototype, "beginEdit", void 0), __decorate$49([ Event() ], Grid.prototype, "cellEdit", void 0), 
        __decorate$49([ Event() ], Grid.prototype, "cellSave", void 0), __decorate$49([ Event() ], Grid.prototype, "resizeStart", void 0), 
        __decorate$49([ Event() ], Grid.prototype, "resizing", void 0), __decorate$49([ Event() ], Grid.prototype, "resizeStop", void 0), 
        __decorate$49([ Event() ], Grid.prototype, "beforeDataBound", void 0), __decorate$49([ Event() ], Grid.prototype, "contextMenuOpen", void 0), 
        __decorate$49([ Event() ], Grid.prototype, "contextMenuClick", void 0), __decorate$49([ Event() ], Grid.prototype, "columnMenuOpen", void 0), 
        __decorate$49([ Event() ], Grid.prototype, "columnMenuClick", void 0), __decorate$49([ Event() ], Grid.prototype, "checkBoxChange", void 0), 
        __decorate$49([ Event() ], Grid.prototype, "beforeCopy", void 0), __decorate$49([ Event() ], Grid.prototype, "dataStateChange", void 0), 
        __decorate$49([ Event() ], Grid.prototype, "dataSourceChanged", void 0), Grid = __decorate$49([ NotifyPropertyChanges ], Grid);
    }(Component);
    Grid.Inject(Selection$1);
    var Sort = function() {
        function Sort(parent, sortSettings, sortedColumns, locator) {
            this.contentRefresh = !0, this.isModelChanged = !0, this.aria = new AriaService(), 
            this.parent = parent, this.sortSettings = sortSettings, this.sortedColumns = sortedColumns, 
            this.focus = locator.getService("focus"), this.addEventListener();
        }
        return Sort.prototype.updateModel = function() {
            var index, sortedColumn = {
                field: this.columnName,
                direction: this.direction
            }, gCols = this.parent.groupSettings.columns, flag = !1;
            if (this.isMultiSort) (index = this.getSortedColsIndexByField(this.columnName)) > -1 && this.sortSettings.columns.splice(index, 1), 
            this.sortSettings.columns.push(sortedColumn), this.sortSettings.columns = this.sortSettings.columns; else if (gCols.length) {
                for (var sortedCols = [], i = 0, len = gCols.length; i < len; i++) if (index = this.getSortedColsIndexByField(gCols[i], sortedCols), 
                this.columnName === gCols[i]) flag = !0, sortedCols.push(sortedColumn); else {
                    var sCol = this.getSortColumnFromField(gCols[i]);
                    sortedCols.push({
                        field: sCol.field,
                        direction: sCol.direction
                    });
                }
                flag || sortedCols.push(sortedColumn), this.sortSettings.columns = sortedCols;
            } else this.sortSettings.columns = [ sortedColumn ];
            this.parent.dataBind(), this.lastSortedCol = this.columnName;
        }, Sort.prototype.onActionComplete = function(e) {
            var args = this.isRemove ? {
                requestType: "sorting",
                type: actionComplete
            } : {
                columnName: this.columnName,
                direction: this.direction,
                requestType: "sorting",
                type: actionComplete
            };
            this.isRemove = !1, this.parent.trigger(actionComplete, extend(e, args));
        }, Sort.prototype.sortColumn = function(columnName, direction, isMultiSort) {
            var gObj = this.parent;
            if (!1 !== this.parent.getColumnByField(columnName).allowSorting && !this.parent.isContextMenuOpen()) if (gObj.allowMultiSorting || (isMultiSort = gObj.allowMultiSorting), 
            this.isActionPrevent()) gObj.notify(preventBatch, {
                instance: this,
                handler: this.sortColumn,
                arg1: columnName,
                arg2: direction,
                arg3: isMultiSort
            }); else {
                this.columnName = columnName, this.direction = direction, this.isMultiSort = isMultiSort, 
                this.removeSortIcons();
                gObj.getColumnHeaderByField(columnName);
                this.updateSortedCols(columnName, isMultiSort), this.updateModel();
            }
        }, Sort.prototype.updateSortedCols = function(columnName, isMultiSort) {
            if (!isMultiSort) if (this.parent.allowGrouping) for (var i = 0, len = this.sortedColumns.length; i < len; i++) this.parent.groupSettings.columns.indexOf(this.sortedColumns[i]) < 0 && (this.sortedColumns.splice(i, 1), 
            len--, i--); else this.sortedColumns.splice(0, this.sortedColumns.length);
            this.sortedColumns.indexOf(columnName) < 0 && this.sortedColumns.push(columnName);
        }, Sort.prototype.onPropertyChanged = function(e) {
            if (e.module === this.getModuleName()) {
                if (this.contentRefresh) {
                    var args = this.sortSettings.columns.length ? {
                        columnName: this.columnName,
                        direction: this.direction,
                        requestType: "sorting",
                        type: actionBegin
                    } : {
                        requestType: "sorting",
                        type: actionBegin
                    };
                    this.parent.notify(modelChanged, args);
                }
                this.removeSortIcons(), this.addSortIcons();
            }
        }, Sort.prototype.clearSorting = function() {
            var cols = getActualPropFromColl(this.sortSettings.columns);
            if (this.isActionPrevent()) this.parent.notify(preventBatch, {
                instance: this,
                handler: this.clearSorting
            }); else for (var i = 0, len = cols.length; i < len; i++) this.removeSortColumn(cols[i].field);
        }, Sort.prototype.isActionPrevent = function() {
            return isActionPrevent(this.parent);
        }, Sort.prototype.removeSortColumn = function(field) {
            var gObj = this.parent, cols = this.sortSettings.columns;
            if (!(this.sortedColumns.indexOf(field) < 0)) if (this.isActionPrevent()) this.parent.notify(preventBatch, {
                instance: this,
                handler: this.removeSortColumn,
                arg1: field
            }); else {
                this.removeSortIcons();
                for (var i = 0, len = cols.length; i < len; i++) if (cols[i].field === field) {
                    if (gObj.allowGrouping && gObj.groupSettings.columns.indexOf(cols[i].field) > -1) continue;
                    this.sortedColumns.splice(this.sortedColumns.indexOf(cols[i].field), 1), cols.splice(i, 1), 
                    this.isRemove = !0, this.isModelChanged && this.parent.notify(modelChanged, {
                        requestType: "sorting",
                        type: actionBegin
                    });
                    break;
                }
                this.addSortIcons();
            }
        }, Sort.prototype.getSortedColsIndexByField = function(field, sortedColumns) {
            for (var cols = sortedColumns || this.sortSettings.columns, i = 0, len = cols.length; i < len; i++) if (cols[i].field === field) return i;
            return -1;
        }, Sort.prototype.getModuleName = function() {
            return "sort";
        }, Sort.prototype.initialEnd = function() {
            if (this.parent.off(contentReady, this.initialEnd), this.parent.getColumns().length && this.sortSettings.columns.length) {
                var gObj = this.parent;
                this.contentRefresh = !1, this.isMultiSort = this.sortSettings.columns.length > 1;
                for (var _i = 0, _a = gObj.sortSettings.columns; _i < _a.length; _i++) {
                    var col = _a[_i];
                    this.sortedColumns.indexOf(col.field) > -1 && this.sortColumn(col.field, col.direction, !0);
                }
                this.isMultiSort = !1, this.contentRefresh = !0;
            }
        }, Sort.prototype.addEventListener = function() {
            this.parent.isDestroyed || (this.parent.on(contentReady, this.initialEnd, this), 
            this.parent.on("sorting-complete", this.onActionComplete, this), this.parent.on(inBoundModelChanged, this.onPropertyChanged, this), 
            this.parent.on(click, this.clickHandler, this), this.parent.on(headerRefreshed, this.refreshSortIcons, this), 
            this.parent.on(keyPressed, this.keyPressed, this));
        }, Sort.prototype.removeEventListener = function() {
            this.parent.isDestroyed || (this.parent.off("sorting-complete", this.onActionComplete), 
            this.parent.off(inBoundModelChanged, this.onPropertyChanged), this.parent.off(click, this.clickHandler), 
            this.parent.off(headerRefreshed, this.refreshSortIcons), this.parent.off(keyPressed, this.keyPressed));
        }, Sort.prototype.destroy = function() {
            this.isModelChanged = !1, this.parent.element.querySelector(".e-gridpopup").querySelectorAll(".e-sortdirect").length && (this.parent.element.querySelector(".e-gridpopup").style.display = "none"), 
            this.clearSorting(), this.isModelChanged = !0, this.removeEventListener();
        }, Sort.prototype.clickHandler = function(e) {
            this.popUpClickHandler(e);
            var target = closest(e.target, ".e-headercell");
            if (target && !e.target.classList.contains("e-grptogglebtn") && !e.target.classList.contains("e-stackedheadercell") && !e.target.classList.contains("e-stackedheadercelldiv") && !target.classList.contains("e-resized") && !e.target.classList.contains("e-rhandler") && !e.target.classList.contains("e-columnmenu") && !e.target.classList.contains("e-filtermenudiv")) {
                var colObj = this.parent.getColumnByUid(target.querySelector(".e-headercelldiv").getAttribute("e-mappinguid"));
                target.querySelectorAll(".e-ascending").length;
                "checkbox" !== colObj.type && (this.initiateSort(target, e, colObj), Browser.isDevice && this.showPopUp(e));
            }
            target && target.classList.remove("e-resized");
        }, Sort.prototype.keyPressed = function(e) {
            var ele = e.target;
            if (!this.parent.isEdit && ("enter" === e.action || "ctrlEnter" === e.action || "shiftEnter" === e.action) && closest(ele, ".e-headercell")) {
                var target = this.focus.getFocusedElement();
                if (isNullOrUndefined(target) || !target.classList.contains("e-headercell") || !target.querySelector(".e-headercelldiv")) return;
                var col = this.parent.getColumnByUid(target.querySelector(".e-headercelldiv").getAttribute("e-mappinguid"));
                this.initiateSort(target, e, col);
            }
        }, Sort.prototype.initiateSort = function(target, e, column) {
            var gObj = this.parent, field = column.field, direction = target.querySelectorAll(".e-ascending").length ? "Descending" : "Ascending";
            e.shiftKey || this.sortSettings.allowUnsort && target.querySelectorAll(".e-descending").length && !(gObj.groupSettings.columns.indexOf(field) > -1) ? this.removeSortColumn(field) : this.sortColumn(field, direction, e.ctrlKey || this.enableSortMultiTouch);
        }, Sort.prototype.showPopUp = function(e) {
            isNullOrUndefined(closest(e.target, ".e-headercell")) && !this.parent.isContextMenuOpen() || setCssInGridPopUp(this.parent.element.querySelector(".e-gridpopup"), e, "e-sortdirect e-icons e-icon-sortdirect" + (this.sortedColumns.length > 1 ? " e-spanclicked" : ""));
        }, Sort.prototype.popUpClickHandler = function(e) {
            var target = e.target;
            closest(target, ".e-headercell") || e.target.classList.contains("e-rowcell") || closest(target, ".e-gridpopup") ? target.classList.contains("e-sortdirect") && (target.classList.contains("e-spanclicked") ? (target.classList.remove("e-spanclicked"), 
            this.enableSortMultiTouch = !1, this.parent.element.querySelector(".e-gridpopup").style.display = "none") : (target.classList.add("e-spanclicked"), 
            this.enableSortMultiTouch = !0)) : this.parent.element.querySelector(".e-gridpopup").style.display = "none";
        }, Sort.prototype.addSortIcons = function() {
            for (var header, filterElement, gObj = this.parent, cols = this.sortSettings.columns, fieldNames = this.parent.getColumns().map(function(c) {
                return c.field;
            }), i = 0, len = cols.length; i < len; i++) -1 !== fieldNames.indexOf(cols[i].field) && (header = gObj.getColumnHeaderByField(cols[i].field), 
            this.aria.setSort(header, cols[i].direction), this.isMultiSort && cols.length > 1 && header.querySelector(".e-headercelldiv").insertBefore(createElement("span", {
                className: "e-sortnumber",
                innerHTML: (i + 1).toString()
            }), header.querySelector(".e-headertext")), filterElement = header.querySelector(".e-sortfilterdiv"), 
            "Ascending" === cols[i].direction ? classList(filterElement, [ "e-ascending", "e-icon-ascending" ], []) : classList(filterElement, [ "e-descending", "e-icon-descending" ], []));
        }, Sort.prototype.removeSortIcons = function(position) {
            for (var header, gObj = this.parent, cols = this.sortSettings.columns, fieldNames = this.parent.getColumns().map(function(c) {
                return c.field;
            }), i = position || 0, len = isNullOrUndefined(position) ? cols.length : position + 1; i < len; i++) gObj.allowGrouping && gObj.groupSettings.columns.indexOf(cols[i].field) > -1 || -1 !== fieldNames.indexOf(cols[i].field) && (header = gObj.getColumnHeaderByField(cols[i].field), 
            this.aria.setSort(header, "none"), classList(header.querySelector(".e-sortfilterdiv"), [], [ "e-descending", "e-icon-descending", "e-ascending", "e-icon-ascending" ]), 
            header.querySelector(".e-sortnumber") && header.querySelector(".e-headercelldiv").removeChild(header.querySelector(".e-sortnumber")));
        }, Sort.prototype.getSortColumnFromField = function(field) {
            for (var i = 0, len = this.sortSettings.columns.length; i < len; i++) if (this.sortSettings.columns[i].field === field) return this.sortSettings.columns[i];
            return !1;
        }, Sort.prototype.updateAriaAttr = function() {
            for (var fieldNames = this.parent.getColumns().map(function(c) {
                return c.field;
            }), _i = 0, _a = this.sortedColumns; _i < _a.length; _i++) {
                var col = _a[_i];
                if (-1 !== fieldNames.indexOf(col)) {
                    var header = this.parent.getColumnHeaderByField(col);
                    this.aria.setSort(header, this.getSortColumnFromField(col).direction);
                }
            }
        }, Sort.prototype.refreshSortIcons = function() {
            this.removeSortIcons(), this.isMultiSort = !0, this.removeSortIcons(), this.addSortIcons(), 
            this.isMultiSort = !1, this.updateAriaAttr();
        }, Sort;
    }(), PagerDropDown = function() {
        function PagerDropDown(pagerModule) {
            this.pagerModule = pagerModule;
        }
        return PagerDropDown.prototype.getModuleName = function() {
            return "pagerdropdown";
        }, PagerDropDown.prototype.render = function() {
            var pagerObj = this.pagerModule;
            this.pagerDropDownDiv = createElement("div", {
                className: "e-pagesizes"
            });
            var dropDownDiv = createElement("div", {
                className: "e-pagerdropdown"
            }), defaultTextDiv = createElement("div", {
                className: "e-pagerconstant"
            }), input = createElement("input", {
                attrs: {
                    type: "text",
                    tabindex: "1"
                }
            });
            this.pagerCons = createElement("span", {
                className: "e-constant",
                innerHTML: this.pagerModule.getLocalizedLabel("pagerDropDown")
            }), dropDownDiv.appendChild(input), defaultTextDiv.appendChild(this.pagerCons), 
            this.pagerDropDownDiv.appendChild(dropDownDiv), this.pagerDropDownDiv.appendChild(defaultTextDiv), 
            this.pagerModule.element.appendChild(this.pagerDropDownDiv);
            var pageSizesModule = this.pagerModule.pageSizes, pageSizesArray = pageSizesModule.length ? pageSizesModule : [ 5, 10, 12, 20 ], defaultValue = pageSizesArray.indexOf(this.pagerModule.pageSize) > -1 ? this.pagerModule.pageSize : pageSizesArray[0];
            this.dropDownListObject = new DropDownList$1({
                dataSource: pageSizesArray,
                value: defaultValue,
                change: this.onChange.bind(this)
            }), this.dropDownListObject.appendTo(input), pagerObj.pageSize = defaultValue, pagerObj.dataBind(), 
            pagerObj.trigger("dropDownChanged", {
                pageSize: defaultValue
            });
        }, PagerDropDown.prototype.onChange = function(e) {
            this.pagerModule.pageSize = this.dropDownListObject.value, this.pagerModule.dataBind(), 
            this.pagerModule.trigger("dropDownChanged", {
                pageSize: this.dropDownListObject.value
            });
        }, PagerDropDown.prototype.destroy = function(args) {
            this.dropDownListObject && !this.dropDownListObject.isDestroyed && (this.dropDownListObject.destroy(), 
            remove(this.pagerDropDownDiv));
        }, PagerDropDown;
    }();
    Pager.Inject(ExternalMessage, PagerDropDown);
    var Global, Page = function() {
        function Page(parent, pageSettings) {
            this.parent = parent, this.pageSettings = pageSettings, this.addEventListener();
        }
        return Page.prototype.getModuleName = function() {
            return "pager";
        }, Page.prototype.render = function() {
            var pagerObj, gObj = this.parent;
            this.pagerDestroy(), isNullOrUndefined(this.parent.pagerTemplate) || (this.pageSettings.template = this.parent.pagerTemplate), 
            this.element = createElement("div", {
                className: "e-gridpager"
            }), pagerObj = function(copied, first, second, exclude) {
                var moved = extend(copied, first, second);
                return Object.keys(moved).forEach(function(value, index) {
                    -1 !== exclude.indexOf(value) && delete moved[value];
                }), moved;
            }({}, extend({}, getActualProperties(this.pageSettings)), {
                click: this.clickHandler.bind(this),
                dropDownChanged: this.onSelect.bind(this),
                enableRtl: gObj.enableRtl,
                locale: gObj.locale,
                created: this.addAriaAttr.bind(this)
            }, [ "parentObj", "propName" ]), this.pagerObj = new Pager(pagerObj);
        }, Page.prototype.onSelect = function(e) {
            this.pageSettings.pageSize = e.pageSize, this.pageSettings.currentPage = 1;
        }, Page.prototype.addAriaAttr = function() {
            var _this = this;
            if (!this.pageSettings.template) {
                for (var numericContainerNew = createElement("div", {
                    className: "e-numericcontainer"
                }), pagerContainer = this.element.querySelector(".e-pagercontainer"), frag = document.createDocumentFragment(), numericContainer = this.element.querySelector(".e-numericcontainer"), links = numericContainer.querySelectorAll("a"), i = 0; i < links.length; i++) if (this.parent.getContentTable()) {
                    links[i].setAttribute("aria-owns", this.parent.getContentTable().id);
                    var numericContainerDiv = createElement("div");
                    numericContainerDiv.appendChild(links[i]), frag.appendChild(numericContainerDiv);
                }
                numericContainerNew.appendChild(frag), pagerContainer.replaceChild(numericContainerNew, numericContainer);
                [ ".e-mfirst", ".e-mprev", ".e-first", ".e-prev", ".e-next", ".e-last", ".e-mnext", ".e-mlast" ].forEach(function(value) {
                    var element = _this.element.querySelector(value);
                    _this.parent.getContentTable() && element.setAttribute("aria-owns", _this.parent.getContentTable().id);
                });
            }
        }, Page.prototype.dataReady = function(e) {
            this.updateModel(e);
        }, Page.prototype.refresh = function() {
            this.pagerObj.refresh();
        }, Page.prototype.goToPage = function(pageNo) {
            this.pagerObj.goToPage(pageNo);
        }, Page.prototype.updateModel = function(e) {
            this.parent.pageSettings.totalRecordsCount = e.count, this.parent.dataBind();
        }, Page.prototype.onActionComplete = function(e) {
            this.parent.trigger(actionComplete, extend(e, {
                currentPage: this.parent.pageSettings.currentPage,
                requestType: "paging",
                type: actionComplete
            }));
        }, Page.prototype.onPropertyChanged = function(e) {
            if (e.module === this.getModuleName()) {
                for (var newProp = e.properties, _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                    var prop = _a[_i];
                    this.pagerObj[prop] = newProp[prop];
                }
                this.pagerObj.dataBind();
            }
        }, Page.prototype.clickHandler = function(e) {
            var gObj = this.parent;
            if (this.isForceCancel || isActionPrevent(gObj)) return this.isForceCancel ? this.isForceCancel = !1 : (gObj.notify(preventBatch, {
                instance: this,
                handler: this.goToPage,
                arg1: e.currentPage
            }), this.isForceCancel = !0, this.pagerObj.currentPage = gObj.pageSettings.currentPage, 
            this.pagerObj.dataBind()), void (e.cancel = !0);
            var prevPage = this.pageSettings.currentPage;
            this.pageSettings.currentPage = e.currentPage, this.parent.notify(modelChanged, {
                requestType: "paging",
                previousPage: prevPage,
                currentPage: e.currentPage,
                type: actionBegin
            });
        }, Page.prototype.keyPressHandler = function(e) {
            e.action in keyActions && (e.preventDefault(), this.element.querySelector(keyActions[e.action]).click());
        }, Page.prototype.updateExternalMessage = function(message) {
            this.pagerObj.enableExternalMessage || (this.pagerObj.enableExternalMessage = !0, 
            this.pagerObj.dataBind()), this.pagerObj.externalMessage = message, this.pagerObj.dataBind();
        }, Page.prototype.appendToElement = function(e) {
            this.parent.element.appendChild(this.element), this.parent.setGridPager(this.element), 
            this.pagerObj.appendTo(this.element);
        }, Page.prototype.enableAfterRender = function(e) {
            e.module === this.getModuleName() && e.enable && (this.render(), this.appendToElement());
        }, Page.prototype.addEventListener = function() {
            this.handlers = {
                load: this.render,
                end: this.appendToElement,
                ready: this.dataReady,
                complete: this.onActionComplete,
                updateLayout: this.enableAfterRender,
                inboundChange: this.onPropertyChanged,
                keyPress: this.keyPressHandler
            }, this.parent.isDestroyed || (this.parent.on(initialLoad, this.handlers.load, this), 
            this.parent.on(initialEnd, this.handlers.end, this), this.parent.on(dataReady, this.handlers.ready, this), 
            this.parent.on("paging-complete", this.handlers.complete, this), this.parent.on(uiUpdate, this.handlers.updateLayout, this), 
            this.parent.on(inBoundModelChanged, this.handlers.inboundChange, this), this.parent.on(keyPressed, this.handlers.keyPress, this));
        }, Page.prototype.removeEventListener = function() {
            this.parent.isDestroyed || (this.parent.off(initialLoad, this.handlers.load), this.parent.off(initialEnd, this.handlers.end), 
            this.parent.off(dataReady, this.handlers.ready), this.parent.off("paging-complete", this.handlers.complete), 
            this.parent.off(uiUpdate, this.handlers.updateLayout), this.parent.off(inBoundModelChanged, this.handlers.inboundChange), 
            this.parent.off(keyPressed, this.handlers.keyPress));
        }, Page.prototype.destroy = function() {
            this.removeEventListener(), this.pagerDestroy();
        }, Page.prototype.pagerDestroy = function() {
            this.pagerObj && !this.pagerObj.isDestroyed && (this.pagerObj.destroy(), remove(this.element));
        }, Page;
    }(), keyActions = {
        pageUp: ".e-prev",
        pageDown: ".e-next",
        ctrlAltPageDown: ".e-last",
        ctrlAltPageUp: ".e-first",
        altPageUp: ".e-pp",
        altPageDown: ".e-np"
    }, __extends$125 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), FilterCellRenderer = function(_super) {
        function FilterCellRenderer() {
            var _this = null !== _super && _super.apply(this, arguments) || this;
            return _this.element = createElement("TH", {
                className: "e-filterbarcell"
            }), _this;
        }
        return __extends$125(FilterCellRenderer, _super), FilterCellRenderer.prototype.getGui = function() {
            return createElement("div");
        }, FilterCellRenderer.prototype.render = function(cell, data) {
            var input, tr = this.parent.element.querySelector(".e-filterbar"), node = this.element.cloneNode(), innerDIV = this.getGui(), column = cell.column;
            if (tr.appendChild(node), "checkbox" !== column.type) {
                if (!isNullOrUndefined(column.allowFiltering) && !column.allowFiltering || isNullOrUndefined(column.filterBarTemplate)) attributes(innerDIV, {
                    class: "e-filterdiv e-fltrinputdiv"
                }), input = createElement("input", {
                    id: column.field + "_filterBarcell",
                    className: "e-filtertext",
                    attrs: {
                        type: "search",
                        title: column.headerText + cell.attributes.title,
                        value: data[cell.column.field] ? data[cell.column.field] : "",
                        role: "search"
                    }
                }), innerDIV.appendChild(input), Input.createInput({
                    element: input,
                    floatLabelType: "Never",
                    properties: {
                        enableRtl: this.parent.enableRtl,
                        showClearButton: !0
                    }
                }); else if (node.classList.add("e-fltrtemp"), attributes(innerDIV, {
                    class: "e-fltrtempdiv"
                }), isNullOrUndefined(column.filterBarTemplate.create)) input = createElement("input", {
                    id: column.field + "_filterBarcell",
                    className: "e-filterUi_input e-filtertext e-fltrTemp",
                    attrs: {
                        type: "search",
                        title: column.headerText
                    }
                }), innerDIV.appendChild(input); else {
                    var args = {
                        column: column,
                        node: Element
                    }, temp = column.filterBarTemplate.create;
                    if ("string" == typeof temp && (temp = getValue(temp, window)), "string" == typeof (input = temp(args))) {
                        var div = createElement("div");
                        div.innerHTML = input, input = div.firstChild;
                    }
                    attributes(innerDIV, {
                        class: "e-filterUi_input e-filtertext e-fltrTemp",
                        title: column.headerText,
                        id: column.field + "_filterBarcell"
                    }), innerDIV.appendChild(input);
                }
                if ((!1 === column.allowFiltering || "" === column.field || isNullOrUndefined(column.field)) && (input.setAttribute("disabled", "true"), 
                input.classList.add("e-disable")), column.visible || node.classList.add("e-hide"), 
                this.appendHtml(node, innerDIV), (isNullOrUndefined(column.allowFiltering) || column.allowFiltering) && !isNullOrUndefined(column.filterBarTemplate)) {
                    var templateWrite = column.filterBarTemplate.write;
                    args = {
                        element: input,
                        column: column
                    };
                    "string" == typeof templateWrite && (templateWrite = getValue(templateWrite, window)), 
                    templateWrite.call(this, args);
                }
            }
            return node;
        }, FilterCellRenderer.prototype.appendHtml = function(node, innerHtml) {
            return node.appendChild(innerHtml), node;
        }, FilterCellRenderer;
    }(CellRenderer), FlMenuOptrUI = function() {
        function FlMenuOptrUI(parent, customFltrOperators, serviceLocator, filterSettings) {
            this.parent = parent, this.serviceLocator = serviceLocator, this.filterSettings = filterSettings, 
            this.customFilterOperators = customFltrOperators;
        }
        return FlMenuOptrUI.prototype.renderOperatorUI = function(dlgConetntEle, target, column, dlgObj) {
            this.dialogObj = dlgObj;
            var optr = column.type + "Operator";
            this.optrData = this.customOptr = isNullOrUndefined(this.parent.filterSettings.operators) || isNullOrUndefined(this.parent.filterSettings.operators[optr]) ? this.customFilterOperators[optr] : this.parent.filterSettings.operators[optr];
            var dropDatasource = this.customOptr, selectedValue = this.dropSelectedVal(column, optr), optrDiv = createElement("div", {
                className: "e-flm_optrdiv"
            });
            dlgConetntEle.appendChild(optrDiv);
            var optrInput = createElement("input", {
                id: column.uid + "-floptr"
            });
            optrDiv.appendChild(optrInput), this.dropOptr = new DropDownList$1({
                dataSource: dropDatasource,
                fields: {
                    text: "text",
                    value: "value"
                },
                open: this.dropDownOpen.bind(this),
                text: selectedValue
            }), this.dropOptr.appendTo("#" + column.uid + "-floptr");
        }, FlMenuOptrUI.prototype.dropDownOpen = function(args) {
            args.popup.element.style.zIndex = (this.dialogObj.zIndex + 1).toString();
        }, FlMenuOptrUI.prototype.dropSelectedVal = function(col, optr) {
            for (var selValue = "", _i = 0, columns_1 = this.parent.filterSettings.columns; _i < columns_1.length; _i++) {
                var column = columns_1[_i];
                if (col.field === column.field) {
                    var selectedField = new DataManager(this.optrData).executeLocal(new Query().where("value", "equal", column.operator));
                    selValue = isNullOrUndefined(selectedField[0]) ? "" : selectedField[0].text;
                }
            }
            return "" === selValue && (selValue = this.optrData[0].text), selValue;
        }, FlMenuOptrUI.prototype.getFlOperator = function() {
            return this.dropOptr.value;
        }, FlMenuOptrUI;
    }(), StringFilterUI = function() {
        function StringFilterUI(parent, serviceLocator, filterSettings) {
            this.parent = parent, this.serLocator = serviceLocator, this.filterSettings = filterSettings;
        }
        return StringFilterUI.prototype.create = function(args) {
            this.instance = createElement("input", {
                className: "e-flmenu-input",
                id: "strui-" + args.column.uid
            }), args.target.appendChild(this.instance), this.dialogObj = args.dialogObj, this.actObj = new AutoComplete$1(this.getAutoCompleteOptions(args)), 
            this.actObj.appendTo(this.instance);
        }, StringFilterUI.prototype.getAutoCompleteOptions = function(args) {
            var _this = this, isForeignColumn = args.column.isForeignColumn(), dataSource = isForeignColumn ? args.column.dataSource : this.parent.dataSource, fields = {
                value: isForeignColumn ? args.column.foreignKeyValue : args.column.field
            };
            return {
                dataSource: dataSource instanceof DataManager ? dataSource : new DataManager(dataSource),
                fields: fields,
                locale: this.parent.locale,
                enableRtl: this.parent.enableRtl,
                sortOrder: "Ascending",
                open: this.openPopup.bind(this),
                cssClass: "e-popup-flmenu",
                focus: function() {
                    _this.actObj.filterType = args.getOptrInstance.getFlOperator();
                },
                autofill: !0,
                placeholder: args.localizeText.getConstant("EnterValue"),
                actionComplete: function(e) {
                    e.result = e.result.filter(function(obj, index, arr) {
                        return arr.map(function(mapObj) {
                            return mapObj[_this.actObj.fields.value];
                        }).indexOf(obj[_this.actObj.fields.value]) === index;
                    });
                }
            };
        }, StringFilterUI.prototype.write = function(args) {
            this.filterSettings.columns;
            if ("" !== args.filteredValue) {
                document.querySelector("#strui-" + args.column.uid).ej2_instances[0].value = args.filteredValue;
            }
        }, StringFilterUI.prototype.read = function(element, column, filterOptr, filterObj) {
            var actuiObj = document.querySelector("#strui-" + column.uid).ej2_instances[0];
            Browser.isDevice && (actuiObj.hidePopup(), actuiObj.focusOut());
            var filterValue = actuiObj.value;
            (isNullOrUndefined(filterValue) || "" === filterValue) && (filterValue = null), 
            filterObj.filterByColumn(column.field, filterOptr, filterValue, "and", !1);
        }, StringFilterUI.prototype.openPopup = function(args) {
            getZIndexCalcualtion(args, this.dialogObj);
        }, StringFilterUI;
    }(), NumberFilterUI = function() {
        function NumberFilterUI(parent, serviceLocator, filterSettings) {
            this.filterSettings = filterSettings, this.parent = parent, this.serviceLocator = serviceLocator;
        }
        return NumberFilterUI.prototype.create = function(args) {
            this.instance = createElement("input", {
                className: "e-flmenu-input",
                id: "numberui-" + args.column.uid
            }), args.target.appendChild(this.instance), this.numericTxtObj = new NumericTextBox({
                format: args.column.format,
                locale: this.parent.locale,
                cssClass: "e-popup-flmenu",
                placeholder: args.localizeText.getConstant("EnterValue"),
                enableRtl: this.parent.enableRtl
            }), this.numericTxtObj.appendTo(this.instance);
        }, NumberFilterUI.prototype.write = function(args) {
            document.querySelector("#numberui-" + args.column.uid).ej2_instances[0].value = args.filteredValue;
        }, NumberFilterUI.prototype.read = function(element, column, filterOptr, filterObj) {
            var filterValue = document.querySelector("#numberui-" + column.uid).ej2_instances[0].value;
            filterObj.filterByColumn(column.field, filterOptr, filterValue, "and", !0);
        }, NumberFilterUI;
    }(), BooleanFilterUI = function() {
        function BooleanFilterUI(parent, serviceLocator, filterSettings) {
            this.parent = parent, this.serviceLocator = serviceLocator, this.filterSettings = filterSettings;
        }
        return BooleanFilterUI.prototype.create = function(args) {
            var fields = args.column.field;
            this.elem = createElement("input", {
                className: "e-flmenu-input",
                id: "bool-ui-" + args.column.uid
            }), args.target.appendChild(this.elem), this.dialogObj = args.dialogObj, this.dropInstance = new DropDownList$1({
                dataSource: this.parent.dataSource instanceof DataManager ? this.parent.dataSource : new DataManager(this.parent.dataSource),
                query: new Query().select(args.column.field),
                fields: {
                    text: args.column.field,
                    value: args.column.field
                },
                placeholder: args.localizeText.getConstant("SelectValue"),
                cssClass: "e-popup-flmenu",
                locale: this.parent.locale,
                enableRtl: this.parent.enableRtl,
                open: this.openPopup.bind(this),
                actionComplete: function(e) {
                    e.result = DataUtil.distinct(e.result, fields, !0);
                }
            }), this.dropInstance.appendTo(this.elem);
        }, BooleanFilterUI.prototype.write = function(args) {
            document.querySelector("#bool-ui-" + args.column.uid).ej2_instances[0].text = isNullOrUndefined(args.filteredValue) ? "" : args.filteredValue;
        }, BooleanFilterUI.prototype.read = function(element, column, filterOptr, filterObj) {
            var filterValue = document.querySelector("#bool-ui-" + column.uid).ej2_instances[0].value;
            filterObj.filterByColumn(column.field, filterOptr, filterValue, "and", !1);
        }, BooleanFilterUI.prototype.openPopup = function(args) {
            getZIndexCalcualtion(args, this.dialogObj);
        }, BooleanFilterUI;
    }(), DateFilterUI = function() {
        function DateFilterUI(parent, serviceLocator, filterSettings) {
            this.parent = parent, this.locator = serviceLocator, this.fltrSettings = filterSettings;
        }
        return DateFilterUI.prototype.create = function(args) {
            var intl = new Internationalization(), colFormat = args.column.format, format = intl.getDatePattern({
                type: "date",
                skeleton: colFormat
            }, !1);
            this.dialogObj = args.dialogObj, this.inputElem = createElement("input", {
                className: "e-flmenu-input",
                id: "dateui-" + args.column.uid
            }), args.target.appendChild(this.inputElem), this.datePickerObj = new DatePicker$1({
                format: format,
                cssClass: "e-popup-flmenu",
                placeholder: args.localizeText.getConstant("ChooseDate"),
                width: "100%",
                locale: this.parent.locale,
                enableRtl: this.parent.enableRtl,
                open: this.openPopup.bind(this)
            }), this.datePickerObj.appendTo(this.inputElem);
        }, DateFilterUI.prototype.write = function(args) {
            this.fltrSettings.columns;
            document.querySelector("#dateui-" + args.column.uid).ej2_instances[0].value = isNullOrUndefined(args.filteredValue) ? null : new Date(args.filteredValue);
        }, DateFilterUI.prototype.read = function(element, column, filterOptr, filterObj) {
            var filterValue = document.querySelector("#dateui-" + column.uid).ej2_instances[0].value;
            filterValue = isNullOrUndefined(filterValue) ? null : filterValue, filterObj.filterByColumn(column.field, filterOptr, filterValue, "and", !0);
        }, DateFilterUI.prototype.openPopup = function(args) {
            args.popup.element.style.zIndex = (this.dialogObj.zIndex + 1).toString();
        }, DateFilterUI;
    }(), FilterMenuRenderer = function() {
        function FilterMenuRenderer(parent, filterSettings, serviceLocator, customFltrOperators, fltrObj) {
            this.isDialogOpen = !1, this.colTypes = {
                string: StringFilterUI,
                number: NumberFilterUI,
                date: DateFilterUI,
                boolean: BooleanFilterUI,
                datetime: DateFilterUI
            }, this.parent = parent, this.filterSettings = filterSettings, this.serviceLocator = serviceLocator, 
            this.customFilterOperators = customFltrOperators, this.filterObj = fltrObj, this.flMuiObj = new FlMenuOptrUI(this.parent, this.customFilterOperators, this.serviceLocator), 
            this.l10n = this.serviceLocator.getService("localization");
        }
        return FilterMenuRenderer.prototype.openDialog = function(args) {
            this.col = this.parent.getColumnByField(args.field), (isNullOrUndefined(this.col.filter) || isNullOrUndefined(this.col.filter.type) || "Menu" === this.col.filter.type) && this.renderDlgContent(args.target, this.col);
        }, FilterMenuRenderer.prototype.closeDialog = function() {
            var elem = document.getElementById(this.dlgObj.element.id);
            this.dlgObj && !this.dlgObj.isDestroyed && elem && (this.parent.notify("filter-menu-close", {
                field: this.col.field
            }), this.isDialogOpen = !1, this.dlgObj.destroy(), remove(elem));
        }, FilterMenuRenderer.prototype.renderDlgContent = function(target, column) {
            var args = {
                requestType: "filterbeforeopen",
                filterModel: this,
                columnName: column.field,
                columnType: column.type
            };
            this.parent.trigger(actionBegin, args);
            var mainDiv = createElement("div", {
                className: "e-flmenu-maindiv",
                id: column.uid + "-flmenu"
            });
            this.dlgDiv = createElement("div", {
                className: "e-flmenu",
                id: column.uid + "-flmdlg"
            }), this.parent.element.appendChild(this.dlgDiv), this.dlgObj = new Dialog({
                showCloseIcon: !1,
                closeOnEscape: !1,
                locale: this.parent.locale,
                visible: !1,
                enableRtl: this.parent.enableRtl,
                created: this.dialogCreated.bind(this, target, column),
                position: this.parent.element.classList.contains("e-device") ? {
                    X: "center",
                    Y: "center"
                } : {
                    X: "",
                    Y: ""
                },
                target: this.parent.element.classList.contains("e-device") ? document.body : this.parent.element,
                buttons: [ {
                    click: this.filterBtnClick.bind(this, column),
                    buttonModel: {
                        content: this.l10n.getConstant("FilterButton"),
                        isPrimary: !0,
                        cssClass: "e-flmenu-okbtn"
                    }
                }, {
                    click: this.clearBtnClick.bind(this, column),
                    buttonModel: {
                        content: this.l10n.getConstant("ClearButton"),
                        cssClass: "e-flmenu-cancelbtn"
                    }
                } ],
                content: mainDiv,
                width: !isNullOrUndefined(parentsUntil(target, "e-bigger")) || this.parent.element.classList.contains("e-device") ? 260 : 250,
                animationSettings: {
                    effect: "None"
                },
                cssClass: "e-filter-popup"
            }), this.dlgObj.appendTo(this.dlgDiv);
        }, FilterMenuRenderer.prototype.dialogCreated = function(target, column) {
            Browser.isDevice || getFilterMenuPostion(target, this.dlgObj, this.parent), this.renderFilterUI(target, column), 
            this.parent.notify("filterDialogCreated", {}), this.dlgObj.element.style.maxHeight = "350px", 
            this.dlgObj.show(), this.writeMethod(column, this.dlgObj.element.querySelector("#" + column.uid + "-flmenu"));
            var args = {
                requestType: "filterafteropen",
                filterModel: this,
                columnName: column.field,
                columnType: column.type
            };
            this.isDialogOpen = !0, this.parent.trigger(actionComplete, args);
        }, FilterMenuRenderer.prototype.renderFilterUI = function(target, col) {
            var dlgConetntEle = this.dlgObj.element.querySelector(".e-flmenu-maindiv");
            this.renderOperatorUI(dlgConetntEle, target, col), this.renderFlValueUI(dlgConetntEle, target, col);
        }, FilterMenuRenderer.prototype.renderOperatorUI = function(dlgConetntEle, target, column) {
            this.flMuiObj.renderOperatorUI(dlgConetntEle, target, column, this.dlgObj);
        }, FilterMenuRenderer.prototype.renderFlValueUI = function(dlgConetntEle, target, column) {
            var valueDiv = createElement("div", {
                className: "e-flmenu-valuediv"
            });
            dlgConetntEle.appendChild(valueDiv);
            this.flMuiObj, this.dlgObj;
            var instanceofFilterUI = new this.colTypes[column.type](this.parent, this.serviceLocator, this.parent.filterSettings);
            if (isNullOrUndefined(column.filter) || isNullOrUndefined(column.filter.ui) || isNullOrUndefined(column.filter.ui.create)) instanceofFilterUI.create({
                column: column,
                target: valueDiv,
                getOptrInstance: this.flMuiObj,
                localizeText: this.l10n,
                dialogObj: this.dlgObj
            }); else {
                var temp = column.filter.ui.create;
                "string" == typeof temp && (temp = getValue(temp, window)), column.filter.ui.create({
                    column: column,
                    target: valueDiv,
                    getOptrInstance: this.flMuiObj,
                    dialogObj: this.dlgObj
                });
            }
        }, FilterMenuRenderer.prototype.writeMethod = function(col, dlgContentEle) {
            for (var flValue, target = dlgContentEle.querySelector(".e-flmenu-valinput"), instanceofFilterUI = new this.colTypes[col.type](this.parent, this.serviceLocator, this.parent.filterSettings), _i = 0, columns_1 = this.filterSettings.columns; _i < columns_1.length; _i++) {
                var column = columns_1[_i];
                col.field !== column.field && col.foreignKeyValue !== column.field || (flValue = column.value);
            }
            if (isNullOrUndefined(col.filter) || isNullOrUndefined(col.filter.ui) || isNullOrUndefined(col.filter.ui.write)) instanceofFilterUI.write({
                column: col,
                target: target,
                parent: this.parent,
                filteredValue: flValue
            }); else {
                var temp = col.filter.ui.write;
                "string" == typeof temp && (temp = getValue(temp, window)), col.filter.ui.write({
                    column: col,
                    target: target,
                    parent: this.parent,
                    filteredValue: flValue
                });
            }
        }, FilterMenuRenderer.prototype.filterBtnClick = function(col) {
            var flOptrValue, targ = this.dlgObj.element.querySelector(".e-flmenu-valuediv input");
            flOptrValue = this.flMuiObj.getFlOperator();
            var instanceofFilterUI = new this.colTypes[col.type](this.parent, this.serviceLocator, this.parent.filterSettings);
            if (isNullOrUndefined(col.filter) || isNullOrUndefined(col.filter.ui) || isNullOrUndefined(col.filter.ui.read)) instanceofFilterUI.read(targ, col, flOptrValue, this.filterObj); else {
                var temp = col.filter.ui.read;
                "string" == typeof temp && (temp = getValue(temp, window)), col.filter.ui.read({
                    element: targ,
                    column: col,
                    operator: flOptrValue,
                    fltrObj: this.filterObj
                });
            }
            var iconClass = this.parent.showColumnMenu ? ".e-columnmenu" : ".e-icon-filter", flIcon = this.parent.element.querySelector('[e-mappinguid="' + col.uid + '"]').parentElement.querySelector(iconClass);
            flIcon && flIcon.classList.add("e-filtered"), this.closeDialog();
        }, FilterMenuRenderer.prototype.clearBtnClick = function(column) {
            this.filterObj.removeFilteredColsByField(column.field), this.closeDialog();
            var iconClass = this.parent.showColumnMenu ? ".e-columnmenu" : ".e-icon-filter", flIcon = this.parent.element.querySelector('[e-mappinguid="' + column.uid + '"]').parentElement.querySelector(iconClass);
            flIcon && flIcon.classList.remove("e-filtered");
        }, FilterMenuRenderer.prototype.destroy = function() {
            this.closeDialog();
        }, FilterMenuRenderer;
    }(), __extends$127 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$52 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, HScroll$1 = function(_super) {
        function HScroll(options, element) {
            return _super.call(this, options, element) || this;
        }
        return __extends$127(HScroll, _super), HScroll.prototype.preRender = function() {
            this.browser = Browser.info.name, this.browserCheck = "mozilla" === this.browser, 
            this.isDevice = Browser.isDevice;
            var element = this.element;
            this.ieCheck = "edge" === this.browser || "msie" === this.browser, this.initialize(), 
            "" === element.id && (element.id = getUniqueID("hscroll"), this.uniqueId = !0), 
            element.style.display = "block", this.enableRtl && element.classList.add("e-rtl");
        }, HScroll.prototype.render = function() {
            this.touchModule = new Touch(this.element, {
                scroll: this.touchHandler.bind(this)
            }), this.isDevice ? this.element.classList.add("e-scroll-device") : (this.createNavIcon(this.element), 
            EventHandler.add(this.scrollEle, "scroll", this.scrollHandler, this));
        }, HScroll.prototype.initialize = function() {
            var scrollEle = createElement("div", {
                className: "e-hscroll-content"
            }), scrollDiv = createElement("div", {
                className: "e-hscroll-bar"
            });
            scrollDiv.setAttribute("tabindex", "-1");
            for (var ele = this.element, _i = 0, innerEle_1 = [].slice.call(ele.children); _i < innerEle_1.length; _i++) {
                var ele_1 = innerEle_1[_i];
                scrollEle.appendChild(ele_1);
            }
            scrollDiv.appendChild(scrollEle), ele.appendChild(scrollDiv), scrollDiv.style.overflowX = "hidden", 
            this.scrollEle = scrollDiv, this.scrollItems = scrollEle;
        }, HScroll.prototype.getPersistData = function() {
            return this.addOnPersist([ "scrollStep" ]);
        }, HScroll.prototype.getModuleName = function() {
            return "hScroll";
        }, HScroll.prototype.destroy = function() {
            var ele = this.element;
            ele.style.display = "", ele.classList.remove("e-hscroll");
            for (var nav = selectAll(".e-" + ele.id + "_nav.e-scroll-nav", ele), _i = 0, _a = [].slice.call(this.scrollItems.children); _i < _a.length; _i++) {
                var elem = _a[_i];
                ele.appendChild(elem);
            }
            this.uniqueId && this.element.removeAttribute("id"), detach(this.scrollEle), nav.length > 0 && (detach(nav[0]), 
            detach(nav[1])), EventHandler.remove(this.scrollEle, "scroll", this.scrollHandler), 
            this.touchModule.destroy(), this.touchModule = null, _super.prototype.destroy.call(this);
        }, HScroll.prototype.createNavIcon = function(element) {
            var id = element.id.concat("_nav"), clsRight = "e-" + element.id.concat("_nav e-scroll-nav e-scroll-right-nav"), nav = createElement("div", {
                id: id.concat("_right"),
                className: clsRight
            });
            nav.setAttribute("aria-disabled", "false");
            var navItem = createElement("div", {
                className: "e-nav-right-arrow e-nav-arrow e-icons"
            }), clsLeft = "e-" + element.id.concat("_nav e-scroll-nav e-scroll-left-nav"), navEle = createElement("div", {
                id: id.concat("_left"),
                className: clsLeft + " e-overlay"
            });
            navEle.setAttribute("aria-disabled", "true");
            var navLeftItem = createElement("div", {
                className: "e-nav-left-arrow e-nav-arrow e-icons"
            });
            navEle.appendChild(navLeftItem), nav.appendChild(navItem), nav.setAttribute("tabindex", "0"), 
            element.appendChild(nav), element.insertBefore(navEle, element.firstChild), this.ieCheck && (nav.classList.add("e-ie-align"), 
            navEle.classList.add("e-ie-align")), this.eventBinding([ nav, navEle ]);
        }, HScroll.prototype.onKeyPress = function(e) {
            var _this = this;
            if ("Enter" === e.key) {
                this.keyTimer = window.setTimeout(function() {
                    _this.keyTimeout = !0, _this.eleScrolling(10, e.target);
                }, 100);
            }
        }, HScroll.prototype.onKeyUp = function(e) {
            "Enter" === e.key && (this.keyTimeout ? this.keyTimeout = !1 : e.target.click(), 
            clearTimeout(this.keyTimer));
        }, HScroll.prototype.eventBinding = function(ele) {
            var _this = this;
            ele.forEach(function(el) {
                new Touch(el, {
                    tapHold: _this.tabHoldHandler.bind(_this),
                    tapHoldThreshold: 500
                }), el.addEventListener("keydown", _this.onKeyPress.bind(_this)), el.addEventListener("keyup", _this.onKeyUp.bind(_this)), 
                el.addEventListener("mouseup", _this.repeatScroll.bind(_this)), el.addEventListener("touchend", _this.repeatScroll.bind(_this)), 
                el.addEventListener("contextmenu", function(e) {
                    e.preventDefault();
                }), EventHandler.add(el, "click", _this.clickEventHandler, _this);
            });
        }, HScroll.prototype.repeatScroll = function() {
            clearInterval(this.timeout);
        }, HScroll.prototype.tabHoldHandler = function(e) {
            var _this = this, trgt = e.originalEvent.target;
            trgt = this.contains(trgt, "e-scroll-nav") ? trgt.firstElementChild : trgt;
            this.timeout = window.setInterval(function() {
                _this.eleScrolling(10, trgt);
            }, 50);
        }, HScroll.prototype.contains = function(ele, className) {
            return ele.classList.contains(className);
        }, HScroll.prototype.eleScrolling = function(scrollDis, trgt) {
            var element = this.scrollEle, rootEle = this.element, classList$$1 = trgt.classList;
            classList$$1.contains("e-scroll-nav") && (classList$$1 = trgt.querySelector(".e-nav-arrow").classList), 
            this.contains(rootEle, "e-rtl") && this.browserCheck && (scrollDis = -scrollDis);
            var scrlLeft = element.scrollLeft;
            !this.contains(rootEle, "e-rtl") || this.browserCheck || this.ieCheck ? classList$$1.contains("e-nav-right-arrow") ? element.scrollLeft = scrlLeft + scrollDis : element.scrollLeft = scrlLeft - scrollDis : classList$$1.contains("e-nav-left-arrow") ? element.scrollLeft = scrlLeft + scrollDis : element.scrollLeft = scrlLeft - scrollDis;
        }, HScroll.prototype.clickEventHandler = function(e) {
            this.eleScrolling(this.scrollStep, e.target);
        }, HScroll.prototype.touchHandler = function(e) {
            var distance, ele = this.scrollEle;
            distance = e.distanceX, this.ieCheck && this.contains(this.element, "e-rtl") && (distance = -distance), 
            "Left" === e.scrollDirection ? ele.scrollLeft = ele.scrollLeft + distance : "Right" === e.scrollDirection && (ele.scrollLeft = ele.scrollLeft - distance);
        }, HScroll.prototype.arrowDisabling = function(addDisable, removeDisable) {
            addDisable.classList.add("e-overlay"), addDisable.setAttribute("aria-disabled", "true"), 
            addDisable.removeAttribute("tabindex"), clearInterval(this.timeout), removeDisable.classList.remove("e-overlay"), 
            removeDisable.setAttribute("aria-disabled", "false"), removeDisable.setAttribute("tabindex", "0"), 
            this.repeatScroll();
        }, HScroll.prototype.scrollHandler = function(e) {
            var target = e.target, width = target.offsetWidth, rootEle = this.element, navLeftEle = this.element.querySelector(".e-scroll-left-nav"), navRightEle = this.element.querySelector(".e-scroll-right-nav"), scrollLeft = target.scrollLeft;
            if (scrollLeft <= 0 && (scrollLeft = -scrollLeft), 0 === scrollLeft) !this.contains(rootEle, "e-rtl") || this.browserCheck || this.ieCheck ? this.arrowDisabling(navLeftEle, navRightEle) : this.arrowDisabling(navRightEle, navLeftEle); else if (Math.ceil(width + scrollLeft + .1) >= target.scrollWidth) !this.contains(rootEle, "e-rtl") || this.browserCheck || this.ieCheck ? this.arrowDisabling(navRightEle, navLeftEle) : this.arrowDisabling(navLeftEle, navRightEle); else {
                var disEle = this.element.querySelector(".e-scroll-nav.e-overlay");
                disEle && (disEle.classList.remove("e-overlay"), disEle.setAttribute("aria-disabled", "false"), 
                disEle.setAttribute("tabindex", "0"));
            }
        }, HScroll.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "scrollStep":
                    break;

                  case "enableRtl":
                    newProp.enableRtl ? this.element.classList.add("e-rtl") : this.element.classList.remove("e-rtl");
                }
            }
        }, __decorate$52([ Property(40) ], HScroll.prototype, "scrollStep", void 0), HScroll = __decorate$52([ NotifyPropertyChanges ], HScroll);
    }(Component), __extends$1$8 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$1$7 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, CLS_ITEMS$2 = "e-toolbar-items", CLS_ITEM$3 = "e-toolbar-item", CLS_POPUP$1 = "e-toolbar-popup", Item$2 = function(_super) {
        function Item() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$1$8(Item, _super), __decorate$1$7([ Property("") ], Item.prototype, "id", void 0), 
        __decorate$1$7([ Property("") ], Item.prototype, "text", void 0), __decorate$1$7([ Property("auto") ], Item.prototype, "width", void 0), 
        __decorate$1$7([ Property("") ], Item.prototype, "cssClass", void 0), __decorate$1$7([ Property(!1) ], Item.prototype, "showAlwaysInPopup", void 0), 
        __decorate$1$7([ Property("") ], Item.prototype, "prefixIcon", void 0), __decorate$1$7([ Property("") ], Item.prototype, "suffixIcon", void 0), 
        __decorate$1$7([ Property("None") ], Item.prototype, "overflow", void 0), __decorate$1$7([ Property("") ], Item.prototype, "template", void 0), 
        __decorate$1$7([ Property("Button") ], Item.prototype, "type", void 0), __decorate$1$7([ Property("Both") ], Item.prototype, "showTextOn", void 0), 
        __decorate$1$7([ Property(null) ], Item.prototype, "htmlAttributes", void 0), __decorate$1$7([ Property("") ], Item.prototype, "tooltipText", void 0), 
        __decorate$1$7([ Property("Left") ], Item.prototype, "align", void 0), Item;
    }(ChildProperty), Toolbar$1 = function(_super) {
        function Toolbar(options, element) {
            var _this = _super.call(this, options, element) || this;
            return _this.keyConfigs = {
                moveLeft: "leftarrow",
                moveRight: "rightarrow",
                moveUp: "uparrow",
                moveDown: "downarrow",
                popupOpen: "enter",
                popupClose: "escape",
                tab: "tab",
                home: "home",
                end: "end"
            }, _this;
        }
        return __extends$1$8(Toolbar, _super), Toolbar.prototype.destroy = function() {
            var _this = this, ele = this.element;
            for (_super.prototype.destroy.call(this), this.unwireEvents(); ele.firstChild; ) ele.removeChild(ele.firstChild);
            this.trgtEle && ele.appendChild(this.ctrlTem), this.clearProperty(), this.popObj = null, 
            this.tbarAlign = null, this.remove(this.element, "e-toolpop"), ele.removeAttribute("style"), 
            [ "aria-disabled", "aria-orientation", "aria-haspopup", "role" ].forEach(function(attrb) {
                _this.element.removeAttribute(attrb);
            });
        }, Toolbar.prototype.preRender = function() {
            this.trigger("beforeCreate"), this.scrollModule = null, this.popObj = null, this.tbarItemsCol = this.items, 
            this.popupPriCount = 0, this.enableRtl && this.add(this.element, "e-rtl");
        }, Toolbar.prototype.wireEvents = function() {
            EventHandler.add(this.element, "click", this.clickHandler, this), window.addEventListener("resize", this.resize.bind(this)), 
            this.keyModule = new KeyboardEvents(this.element, {
                keyAction: this.keyActionHandler.bind(this),
                keyConfigs: this.keyConfigs
            }), EventHandler.add(this.element, "keydown", this.docKeyDown, this), this.element.setAttribute("tabIndex", "0");
        }, Toolbar.prototype.docKeyDown = function(e) {
            if ("INPUT" !== e.target.tagName) {
                9 === e.keyCode && !0 === e.target.classList.contains("e-hor-nav") && isVisible(this.popObj.element) && this.popObj.hide({
                    name: "SlideUp",
                    duration: 100
                });
                (40 === e.keyCode || 38 === e.keyCode || 35 === e.keyCode || 36 === e.keyCode) && e.preventDefault();
            }
        }, Toolbar.prototype.unwireEvents = function() {
            EventHandler.remove(this.element, "click", this.clickHandler), this.destroyHScroll(), 
            this.keyModule.destroy(), EventHandler.remove(document, "scroll", this.docEvent), 
            EventHandler.remove(this.element, "keydown", this.docKeyDown), EventHandler.remove(document, "click", this.docEvent);
        }, Toolbar.prototype.clearProperty = function() {
            this.tbarEle = [], this.tbarAlgEle = {
                lefts: [],
                centers: [],
                rights: []
            };
        }, Toolbar.prototype.docEvent = function(e) {
            var popEle = closest(e.target, ".e-popup");
            this.popObj && isVisible(this.popObj.element) && !popEle && this.popObj.hide({
                name: "SlideUp",
                duration: 100
            });
        }, Toolbar.prototype.destroyHScroll = function() {
            this.scrollModule && (this.tbarAlign && this.add(this.scrollModule.element, "e-tbar-pos"), 
            this.scrollModule.destroy(), this.scrollModule = null);
        }, Toolbar.prototype.destroyItems = function() {
            [].slice.call(this.element.querySelectorAll("." + CLS_ITEM$3)).forEach(function(el) {
                detach(el);
            });
            var tbarItems = this.element.querySelector("." + CLS_ITEMS$2);
            this.tbarAlign && ([].slice.call(tbarItems.children).forEach(function(el) {
                detach(el);
            }), this.tbarAlign = !1, this.remove(tbarItems, "e-tbar-pos")), this.clearProperty();
        }, Toolbar.prototype.destroyMode = function() {
            this.scrollModule && (this.remove(this.scrollModule.element, "e-rtl"), this.destroyHScroll()), 
            this.popObj && this.popupRefresh(this.popObj.element, !0);
        }, Toolbar.prototype.add = function(ele, val) {
            ele.classList.add(val);
        }, Toolbar.prototype.remove = function(ele, val) {
            ele.classList.remove(val);
        }, Toolbar.prototype.elementFocus = function(ele) {
            var fChild = ele.firstElementChild;
            fChild ? (fChild.focus(), this.activeEleSwitch(ele)) : ele.focus();
        }, Toolbar.prototype.clstElement = function(tbrNavChk, trgt) {
            return tbrNavChk && this.popObj && isVisible(this.popObj.element) ? this.popObj.element.querySelector("." + CLS_ITEM$3) : this.element === trgt || tbrNavChk ? this.element.querySelector("." + CLS_ITEM$3) : closest(trgt, "." + CLS_ITEM$3);
        }, Toolbar.prototype.keyHandling = function(clst, e, trgt, navChk, scrollChk) {
            var popObj = this.popObj, rootEle = this.element, popAnimate = {
                name: "SlideUp",
                duration: 100
            };
            switch (e.action) {
              case "moveRight":
                rootEle === trgt ? this.elementFocus(clst) : navChk || this.eleFocus(clst, "next");
                break;

              case "moveLeft":
                navChk || this.eleFocus(clst, "previous");
                break;

              case "home":
              case "end":
                var ele = void 0, nodes = void 0;
                if (clst) {
                    var popupCheck = closest(clst, ".e-popup");
                    popupCheck ? isVisible(this.popObj.element) && (nodes = popupCheck.children, ele = "home" === e.action ? nodes[0] : nodes[nodes.length - 1]) : (nodes = this.element.querySelectorAll(".e-toolbar-items ." + CLS_ITEM$3), 
                    ele = "home" === e.action ? nodes[0] : nodes[nodes.length - 1]), ele && this.elementFocus(ele);
                }
                break;

              case "moveUp":
              case "moveDown":
                var value = "moveUp" === e.action ? "previous" : "next";
                if (popObj && closest(trgt, ".e-popup")) {
                    var popEle = popObj.element, popFrstEle = popEle.firstElementChild;
                    if ("previous" === value && popFrstEle === clst || "next" === value && popEle.lastElementChild === clst) return;
                    this.eleFocus(clst, value);
                } else "moveDown" === e.action && popObj && isVisible(popObj.element) && this.elementFocus(clst);
                break;

              case "tab":
                if (!scrollChk && !navChk) {
                    var ele_1 = clst.firstElementChild;
                    rootEle === trgt && (this.activeEle ? this.activeEle.focus() : (this.activeEleRemove(ele_1), 
                    ele_1.focus()), this.element.removeAttribute("tabindex"));
                }
                break;

              case "popupClose":
                popObj && popObj.hide(popAnimate);
                break;

              case "popupOpen":
                if (!navChk) return;
                popObj && !isVisible(popObj.element) ? (popObj.element.style.top = rootEle.offsetHeight + "px", 
                popObj.show({
                    name: "SlideDown",
                    duration: 100
                })) : popObj.hide(popAnimate);
            }
        }, Toolbar.prototype.keyActionHandler = function(e) {
            var trgt = e.target;
            if ("INPUT" !== trgt.tagName) {
                e.preventDefault();
                var clst, tbrNavChk = trgt.classList.contains("e-hor-nav"), tbarScrollChk = trgt.classList.contains("e-scroll-nav");
                ((clst = this.clstElement(tbrNavChk, trgt)) || tbarScrollChk) && this.keyHandling(clst, e, trgt, tbrNavChk, tbarScrollChk);
            }
        }, Toolbar.prototype.eleFocus = function(closest$$1, pos) {
            var sib = Object(closest$$1)[pos + "ElementSibling"], contains = function(el) {
                return el.classList.contains("e-separator") || el.classList.contains("e-overlay");
            };
            if (sib) {
                var skipEle = contains(sib);
                if (skipEle && Object(sib)[pos + "ElementSibling"] && (sib = Object(sib)[pos + "ElementSibling"], 
                skipEle = contains(sib))) return void this.eleFocus(sib, pos);
                this.elementFocus(sib);
            } else if (this.tbarAlign) {
                var elem = Object(closest$$1.parentElement)[pos + "ElementSibling"];
                if (isNullOrUndefined(elem) || 0 !== elem.children.length || (elem = Object(elem)[pos + "ElementSibling"]), 
                !isNullOrUndefined(elem) && elem.children.length > 0) if ("next" === pos) {
                    contains(el = elem.querySelector("." + CLS_ITEM$3)) ? this.eleFocus(el, pos) : (el.firstElementChild.focus(), 
                    this.activeEleSwitch(el));
                } else {
                    var el;
                    contains(el = elem.lastElementChild) ? this.eleFocus(el, pos) : this.elementFocus(el);
                }
            }
        }, Toolbar.prototype.clickHandler = function(e) {
            var trgt = e.target, clsList = trgt.classList, ele = this.element, isPopupElement = !isNullOrUndefined(closest(trgt, ".e-toolbar-pop")), popupNav = closest(trgt, ".e-hor-nav");
            popupNav || (popupNav = trgt), !ele.children[0].classList.contains("e-hscroll") && clsList.contains("e-hor-nav") && (clsList = trgt.querySelector(".e-icons").classList), 
            (clsList.contains("e-popup-up-icon") || clsList.contains("e-popup-down-icon")) && this.popupClickHandler(ele, popupNav, "e-rtl");
            var itemObj, clst = closest(e.target, "." + CLS_ITEM$3);
            if (!isNullOrUndefined(clst) && !clst.classList.contains("e-overlay") || popupNav.classList.contains("e-hor-nav")) {
                clst && (itemObj = this.items[this.tbarEle.indexOf(clst)]);
                var eventArgs = {
                    originalEvent: e,
                    item: itemObj
                };
                this.trigger("clicked", eventArgs), isPopupElement && !eventArgs.cancel && this.popObj.hide({
                    name: "SlideUp",
                    duration: 100
                });
            }
        }, Toolbar.prototype.popupClickHandler = function(ele, popupNav, CLS_RTL) {
            var popObj = this.popObj;
            isVisible(popObj.element) ? (popupNav.classList.remove("e-nav-active"), popObj.hide({
                name: "SlideUp",
                duration: 100
            })) : (ele.classList.contains(CLS_RTL) && (popObj.enableRtl = !0, popObj.position = {
                X: "left",
                Y: "top"
            }), 0 !== popObj.offsetX || ele.classList.contains(CLS_RTL) || (popObj.enableRtl = !1, 
            popObj.position = {
                X: "right",
                Y: "top"
            }), popObj.dataBind(), popObj.refreshPosition(), popObj.element.style.top = this.element.offsetHeight + "px", 
            popupNav.classList.add("e-nav-active"), popObj.show({
                name: "SlideDown",
                duration: 100
            }));
        }, Toolbar.prototype.render = function() {
            this.initialize(), this.renderControl(), this.wireEvents();
        }, Toolbar.prototype.initialize = function() {
            var width = formatUnit(this.width), height = formatUnit(this.height);
            "msie" === Browser.info.name && "auto" === this.height || setStyleAttribute(this.element, {
                height: height
            }), setStyleAttribute(this.element, {
                width: width
            });
            attributes(this.element, {
                role: "toolbar",
                "aria-disabled": "false",
                "aria-haspopup": "false",
                "aria-orientation": "horizontal"
            });
        }, Toolbar.prototype.renderControl = function() {
            this.trgtEle = this.element.children.length > 0 ? this.element.querySelector("div") : null, 
            this.tbarAlgEle = {
                lefts: [],
                centers: [],
                rights: []
            }, this.renderItems(), this.renderOverflowMode(), this.tbarAlign && this.itemPositioning(), 
            this.popObj && this.popObj.element.childElementCount > 1 && this.checkPopupRefresh(this.element, this.popObj.element) && this.popupRefresh(this.popObj.element, !1);
        }, Toolbar.prototype.initHScroll = function(element, innerItems) {
            !this.scrollModule && this.checkOverflow(element, innerItems[0]) && (this.tbarAlign && this.element.querySelector(".e-toolbar-items .e-toolbar-center").removeAttribute("style"), 
            this.scrollModule = new HScroll$1({
                scrollStep: 50,
                enableRtl: this.enableRtl
            }, innerItems[0]), this.remove(this.scrollModule.element, "e-tbar-pos"), setStyleAttribute(this.element, {
                overflow: "hidden"
            }));
        }, Toolbar.prototype.itemWidthCal = function(items) {
            var width = 0;
            return [].slice.call(selectAll("." + CLS_ITEM$3, items)).forEach(function(el) {
                isVisible(el) && (width += el.offsetWidth + parseFloat(window.getComputedStyle(el).marginRight));
            }), width;
        }, Toolbar.prototype.checkOverflow = function(element, innerItem) {
            if (isNullOrUndefined(element) || isNullOrUndefined(innerItem) || !isVisible(element)) return !1;
            var itemWidth, eleWidth = element.offsetWidth;
            itemWidth = this.tbarAlign || this.scrollModule ? this.itemWidthCal(this.scrollModule ? innerItem.querySelector(".e-hscroll-content") : innerItem) : innerItem.offsetWidth;
            var popNav = element.querySelector(".e-hor-nav"), scrollNav = element.querySelector(".e-scroll-nav");
            return itemWidth > eleWidth - (popNav ? popNav.offsetWidth : scrollNav ? 2 * scrollNav.offsetWidth : 0);
        }, Toolbar.prototype.refreshOverflow = function() {
            this.resize();
        }, Toolbar.prototype.renderOverflowMode = function() {
            var ele = this.element, innerItems = ele.querySelector("." + CLS_ITEMS$2), priorityCheck = this.popupPriCount > 0;
            if (ele && ele.children.length > 0) switch (this.offsetWid = ele.offsetWidth, this.remove(this.element, "e-toolpop"), 
            this.overflowMode) {
              case "Scrollable":
                this.destroyHScroll(), this.initHScroll(ele, ele.getElementsByClassName(CLS_ITEMS$2));
                break;

              case "Popup":
                this.add(this.element, "e-toolpop"), this.tbarAlign && this.removePositioning(), 
                (this.checkOverflow(ele, innerItems) || priorityCheck) && (this.createPopupEle(ele, [].slice.call(selectAll(".e-toolbar-items ." + CLS_ITEM$3, ele))), 
                this.element.querySelector(".e-hor-nav").setAttribute("tabIndex", "0")), this.tbarAlign && (this.add(innerItems, "e-tbar-pos"), 
                this.itemPositioning());
            }
        }, Toolbar.prototype.createPopupEle = function(ele, innerEle) {
            var innerNav = ele.querySelector(".e-hor-nav");
            innerNav || this.createPopupIcon(ele), innerNav = ele.querySelector(".e-hor-nav");
            var eleWidth = ele.offsetWidth - innerNav.offsetWidth;
            this.element.classList.remove("e-rtl"), setStyleAttribute(this.element, {
                direction: "initial"
            }), this.checkPriority(ele, innerEle, eleWidth, !0), this.enableRtl && this.element.classList.add("e-rtl"), 
            this.element.style.removeProperty("direction"), this.createPopup();
        }, Toolbar.prototype.pushingPoppedEle = function(tbarObj, popupPri, ele, eleHeight) {
            var element = tbarObj.element, nodes = selectAll(".e-overflow-show", ele), nodeIndex = 0, nodePri = 0;
            [].slice.call(selectAll("." + CLS_POPUP$1, element.querySelector("." + CLS_ITEMS$2))).forEach(function(el, index) {
                nodes = selectAll(".e-overflow-show", ele), el.classList.contains("e-overflow-show") && nodes.length > 0 ? tbarObj.tbResize && nodes.length > index ? (ele.insertBefore(el, nodes[index]), 
                ++nodePri) : (ele.insertBefore(el, ele.children[nodes.length]), ++nodePri) : el.classList.contains("e-overflow-show") ? (ele.insertBefore(el, ele.firstChild), 
                ++nodePri) : tbarObj.tbResize && el.classList.contains("e-overflow-hide") && ele.children.length > 0 && 0 === nodes.length ? (ele.insertBefore(el, ele.firstChild), 
                ++nodePri) : el.classList.contains("e-overflow-hide") ? popupPri.push(el) : tbarObj.tbResize ? (ele.insertBefore(el, ele.childNodes[nodeIndex + nodePri]), 
                ++nodeIndex) : ele.appendChild(el), setStyleAttribute(el, {
                    display: "",
                    height: eleHeight + "px"
                });
            }), popupPri.forEach(function(el) {
                ele.appendChild(el);
            });
            for (var tbarEle = selectAll("." + CLS_ITEM$3, element.querySelector("." + CLS_ITEMS$2)), i = tbarEle.length - 1; i >= 0; i--) {
                var tbarElement = tbarEle[i];
                if (!tbarElement.classList.contains("e-separator")) break;
                setStyleAttribute(tbarElement, {
                    display: "none"
                });
            }
        }, Toolbar.prototype.createPopup = function() {
            var eleHeight, eleItem, element = this.element;
            eleItem = element.querySelector(".e-toolbar-item:not(.e-separator ):not(.e-toolbar-popup )"), 
            eleHeight = "auto" === element.style.height || "" === element.style.height ? null : eleItem.offsetHeight;
            var ele;
            ele = element.querySelector("#" + element.id + "_popup.e-toolbar-pop") ? element.querySelector("#" + element.id + "_popup.e-toolbar-pop") : createElement("div", {
                id: element.id + "_popup",
                className: "e-toolbar-pop"
            }), this.pushingPoppedEle(this, [], ele, eleHeight), this.popupInit(element, ele);
        }, Toolbar.prototype.popupInit = function(element, ele) {
            if (this.popObj) {
                var popupEle = this.popObj.element;
                setStyleAttribute(popupEle, {
                    maxHeight: "",
                    display: "block"
                }), setStyleAttribute(popupEle, {
                    maxHeight: popupEle.offsetHeight + "px",
                    display: ""
                });
            } else {
                element.appendChild(ele), setStyleAttribute(this.element, {
                    overflow: ""
                });
                var popup = new Popup(null, {
                    relateTo: this.element,
                    offsetY: element.offsetHeight,
                    enableRtl: this.enableRtl,
                    open: this.popupOpen.bind(this),
                    close: this.popupClose,
                    position: this.enableRtl ? {
                        X: "left",
                        Y: "top"
                    } : {
                        X: "right",
                        Y: "top"
                    }
                });
                popup.appendTo(ele), EventHandler.add(document, "scroll", this.docEvent.bind(this)), 
                EventHandler.add(document, "click ", this.docEvent.bind(this)), popup.element.style.maxHeight = popup.element.offsetHeight + "px", 
                popup.hide(), this.popObj = popup, this.element.setAttribute("aria-haspopup", "true");
            }
        }, Toolbar.prototype.popupOpen = function(e) {
            var popObj = this.popObj, popupEle = this.popObj.element, toolEle = this.popObj.element.parentElement, popupNav = toolEle.querySelector(".e-hor-nav");
            setStyleAttribute(popObj.element, {
                height: "auto",
                maxHeight: ""
            }), popObj.element.style.maxHeight = popObj.element.offsetHeight + "px";
            var popupElePos = popupEle.offsetTop + popupEle.offsetHeight + calculatePosition(toolEle).top, popIcon = popupNav.firstElementChild;
            popupNav.classList.add("e-nav-active"), classList(popIcon, [ "e-popup-up-icon" ], [ "e-popup-down-icon" ]);
            var scrollVal = isNullOrUndefined(window.scrollY) ? 0 : window.scrollY;
            if (window.innerHeight + scrollVal < popupElePos) {
                var overflowHeight = popupEle.offsetHeight - (popupElePos - window.innerHeight - scrollVal + 5);
                popObj.height = overflowHeight + "px";
                for (var i = 0; i <= popupEle.childElementCount; i++) {
                    var ele = popupEle.children[i];
                    if (ele.offsetTop + ele.offsetHeight > overflowHeight) {
                        overflowHeight = ele.offsetTop;
                        break;
                    }
                }
                setStyleAttribute(popObj.element, {
                    maxHeight: overflowHeight + "px"
                });
            }
        }, Toolbar.prototype.popupClose = function(e) {
            var popupNav = this.element.parentElement.querySelector(".e-hor-nav"), popIcon = popupNav.firstElementChild;
            popupNav.classList.remove("e-nav-active"), classList(popIcon, [ "e-popup-down-icon" ], [ "e-popup-up-icon" ]);
        }, Toolbar.prototype.checkPriority = function(ele, inEle, eleWidth, pre) {
            for (var popPriority = this.popupPriCount > 0, eleWid = eleWidth, sepCheck = 0, itemCount = 0, itemPopCount = 0, checkClass = function(ele, val) {
                var rVal = !1;
                return val.forEach(function(cls) {
                    ele.classList.contains(cls) && (rVal = !0);
                }), rVal;
            }, i = inEle.length - 1; i >= 0; i--) {
                var mrgn = parseFloat(window.getComputedStyle(inEle[i]).marginRight);
                mrgn += parseFloat(window.getComputedStyle(inEle[i]).marginLeft);
                var fstEleCheck = inEle[i] === this.tbarEle[0];
                fstEleCheck && (this.tbarEleMrgn = mrgn);
                var eleWid_1 = fstEleCheck ? inEle[i].offsetWidth + mrgn : inEle[i].offsetWidth;
                if (checkClass(inEle[i], [ "e-popup-alone" ]) && popPriority && (inEle[i].classList.add(CLS_POPUP$1), 
                setStyleAttribute(inEle[i], {
                    display: "none",
                    minWidth: eleWid_1 + "px"
                }), itemPopCount++), inEle[i].offsetLeft + inEle[i].offsetWidth + mrgn > eleWidth) {
                    if (inEle[i].classList.contains("e-separator")) {
                        if (sepCheck > 0 && itemCount === itemPopCount) {
                            var sepEle = inEle[i + itemCount + (sepCheck - 1)];
                            checkClass(sepEle, [ "e-separator", "e-ignore" ]) && setStyleAttribute(sepEle, {
                                display: "none"
                            });
                        }
                        sepCheck++, itemCount = 0, itemPopCount = 0;
                    } else itemCount++;
                    inEle[i].classList.contains("e-overflow-show") && pre ? eleWidth -= inEle[i].offsetWidth + mrgn : checkClass(inEle[i], [ "e-separator", "e-ignore" ]) ? eleWidth -= inEle[i].offsetWidth + mrgn : (inEle[i].classList.add(CLS_POPUP$1), 
                    setStyleAttribute(inEle[i], {
                        display: "none",
                        minWidth: eleWid_1 + "px"
                    }), itemPopCount++);
                }
            }
            if (pre) {
                var popedEle = selectAll(".e-toolbar-item:not(.e-toolbar-popup)", this.element);
                this.checkPriority(ele, popedEle, eleWid, !1);
            }
        }, Toolbar.prototype.createPopupIcon = function(element) {
            var nav = createElement("div", {
                id: element.id.concat("_nav"),
                className: "e-" + element.id.concat("_nav e-hor-nav")
            });
            "msie" !== Browser.info.name && "edge" !== Browser.info.name || nav.classList.add("e-ie-align");
            var navItem = createElement("div", {
                className: "e-popup-down-icon e-icons"
            });
            nav.appendChild(navItem), nav.setAttribute("tabindex", "0"), element.appendChild(nav);
        }, Toolbar.prototype.tbarPriRef = function(inEle, indx, sepPri, el, des, elWid, wid, ig) {
            var ignoreCount = ig, priEleCnt = selectAll(".e-toolbar-popup:not(.e-overflow-show)", this.popObj.element).length, checkClass = function(ele, val) {
                return ele.classList.contains(val);
            };
            if (0 === selectAll(".e-toolbar-item:not(.e-separator):not(.e-overflow-show)", inEle).length) {
                var eleSep = inEle.children[indx - (indx - sepPri) - 1], ignoreCheck = !isNullOrUndefined(eleSep) && checkClass(eleSep, "e-ignore");
                if (!isNullOrUndefined(eleSep) && checkClass(eleSep, "e-separator") && !isVisible(eleSep) || ignoreCheck) {
                    eleSep.style.display = "inherit";
                    var eleSepWidth = eleSep.offsetWidth + 2 * parseFloat(window.getComputedStyle(eleSep).marginRight), prevSep = eleSep.previousElementSibling;
                    elWid + eleSepWidth < wid || des ? (inEle.insertBefore(el, inEle.children[indx + ignoreCount - (indx - sepPri)]), 
                    isNullOrUndefined(prevSep) || (prevSep.style.display = "")) : prevSep.classList.contains("e-separator") && (prevSep.style.display = "none"), 
                    eleSep.style.display = "";
                } else inEle.insertBefore(el, inEle.children[indx + ignoreCount - (indx - sepPri)]);
            } else inEle.insertBefore(el, inEle.children[indx + ignoreCount - priEleCnt]);
        }, Toolbar.prototype.popupRefresh = function(popupEle, destroy) {
            var ele = this.element, popNav = ele.querySelector(".e-hor-nav"), innerEle = ele.querySelector("." + CLS_ITEMS$2);
            if (!isNullOrUndefined(popNav)) {
                innerEle.removeAttribute("style"), popupEle.style.display = "block";
                var width = ele.offsetWidth - (popNav.offsetWidth + innerEle.offsetWidth);
                this.popupEleRefresh(width, popupEle, destroy), popupEle.style.display = "", 0 === popupEle.children.length && popNav && this.popObj && (detach(popNav), 
                popNav = null, this.popObj.destroy(), detach(this.popObj.element), this.popObj = null, 
                ele.setAttribute("aria-haspopup", "false"), ele.classList.remove("e-toolpop"));
            }
        }, Toolbar.prototype.ignoreEleFetch = function(index, innerEle) {
            var ignoreEle = [].slice.call(innerEle.querySelectorAll(".e-ignore")), ignoreInx = [], count = 0;
            return ignoreEle.length > 0 ? (ignoreEle.forEach(function(ele) {
                ignoreInx.push([].slice.call(innerEle.children).indexOf(ele));
            }), ignoreInx.forEach(function(val) {
                val <= index && count++;
            }), count) : 0;
        }, Toolbar.prototype.checkPopupRefresh = function(root, popEle) {
            popEle.style.display = "block";
            var elWid = this.popupEleWidth(popEle.firstElementChild);
            popEle.firstElementChild.style.removeProperty("Position");
            var tbarWidth = root.offsetWidth - root.querySelector(".e-hor-nav").offsetWidth, tbarItemsWid = root.querySelector("." + CLS_ITEMS$2).offsetWidth;
            return popEle.style.removeProperty("display"), tbarWidth > elWid + tbarItemsWid;
        }, Toolbar.prototype.popupEleWidth = function(el) {
            el.style.position = "absolute";
            var elWidth = el.offsetWidth, btnText = el.querySelector(".e-tbar-btn-text");
            if (el.classList.contains("e-tbtn-align") || el.classList.contains("e-popup-text")) {
                var btn = el.children[0];
                !isNullOrUndefined(btnText) && el.classList.contains("e-popup-text") ? btnText.style.display = "none" : !isNullOrUndefined(btnText) && el.classList.contains("e-toolbar-text") && (btnText.style.display = "block"), 
                btn.style.minWidth = "0%", elWidth = parseFloat(el.style.minWidth), btn.style.minWidth = "", 
                isNullOrUndefined(btnText) || (btnText.style.display = "");
            }
            return elWidth;
        }, Toolbar.prototype.popupEleRefresh = function(width, popupEle, destroy) {
            for (var priEleCnt, index, popPriority = this.popupPriCount > 0, eleSplice = this.tbarEle, innerEle = this.element.querySelector("." + CLS_ITEMS$2), ignoreCount = 0, _loop_1 = function(el) {
                if (el.classList.contains("e-popup-alone") && popPriority && !destroy) return "continue";
                var elWidth = this_1.popupEleWidth(el);
                if (el === this_1.tbarEle[0] && (elWidth += this_1.tbarEleMrgn), el.style.position = "", 
                !(elWidth < width || destroy)) return "break";
                if (el.style.minWidth = "", el.classList.contains("e-overflow-hide") || el.classList.remove(CLS_POPUP$1), 
                index = this_1.tbarEle.indexOf(el), this_1.tbarAlign) {
                    var pos = this_1.items[index].align;
                    index = this_1.tbarAlgEle[(pos + "s").toLowerCase()].indexOf(el), eleSplice = this_1.tbarAlgEle[(pos + "s").toLowerCase()], 
                    innerEle = this_1.element.querySelector(".e-toolbar-items .e-toolbar-" + pos.toLowerCase());
                }
                var sepBeforePri_1 = 0;
                eleSplice.slice(0, index).forEach(function(el) {
                    (el.classList.contains("e-overflow-show") || el.classList.contains("e-separator")) && (el.classList.contains("e-separator") && (el.style.display = "", 
                    width -= el.offsetWidth), sepBeforePri_1++);
                }), ignoreCount = this_1.ignoreEleFetch(index, innerEle), el.classList.contains("e-overflow-show") ? (this_1.tbarPriRef(innerEle, index, sepBeforePri_1, el, destroy, elWidth, width, ignoreCount), 
                width -= el.offsetWidth) : 0 === index ? (innerEle.insertBefore(el, innerEle.firstChild), 
                width -= el.offsetWidth) : (priEleCnt = selectAll(".e-overflow-show", this_1.popObj.element).length, 
                innerEle.insertBefore(el, innerEle.children[index + ignoreCount - priEleCnt]), width -= el.offsetWidth), 
                el.style.height = "";
            }, this_1 = this, _i = 0, _a = [].slice.call(popupEle.children); _i < _a.length; _i++) {
                if ("break" === _loop_1(_a[_i])) break;
            }
            this.checkOverflow(this.element, this.element.getElementsByClassName(CLS_ITEMS$2)[0]) && !destroy && this.renderOverflowMode();
        }, Toolbar.prototype.removePositioning = function() {
            var item = this.element.querySelector("." + CLS_ITEMS$2);
            if (!isNullOrUndefined(item) && item.classList.contains("e-tbar-pos")) {
                this.remove(item, "e-tbar-pos");
                var innerItem = [].slice.call(item.childNodes);
                innerItem[1].removeAttribute("style"), innerItem[2].removeAttribute("style");
            }
        }, Toolbar.prototype.refreshPositioning = function() {
            var item = this.element.querySelector("." + CLS_ITEMS$2);
            this.add(item, "e-tbar-pos"), this.itemPositioning();
        }, Toolbar.prototype.itemPositioning = function() {
            var item = this.element.querySelector("." + CLS_ITEMS$2);
            if (!isNullOrUndefined(item) && item.classList.contains("e-tbar-pos")) {
                var innerItem, popupNav = this.element.querySelector(".e-hor-nav"), margin = (innerItem = this.scrollModule ? [].slice.call(item.querySelector(".e-hscroll-content").children) : [].slice.call(item.childNodes))[0].offsetWidth + innerItem[2].offsetWidth, tbarWid = this.element.offsetWidth;
                if (popupNav) {
                    tbarWid -= popupNav.offsetWidth;
                    var popWid = popupNav.offsetWidth + "px";
                    innerItem[2].removeAttribute("style"), this.enableRtl ? innerItem[2].style.left = popWid : innerItem[2].style.right = popWid;
                }
                if (!(tbarWid <= margin)) {
                    var value = (tbarWid - margin - innerItem[1].offsetWidth) / 2;
                    innerItem[1].removeAttribute("style");
                    var mrgn = innerItem[0].offsetWidth + value + "px";
                    this.enableRtl ? innerItem[1].style.marginRight = mrgn : innerItem[1].style.marginLeft = mrgn;
                }
            }
        }, Toolbar.prototype.tbarItemAlign = function(item, itemEle, pos) {
            var _this = this;
            if (!item.showAlwaysInPopup || "Show" === item.overflow) {
                var alignDiv = [];
                if (alignDiv.push(createElement("div", {
                    className: "e-toolbar-left"
                })), alignDiv.push(createElement("div", {
                    className: "e-toolbar-center"
                })), alignDiv.push(createElement("div", {
                    className: "e-toolbar-right"
                })), 0 === pos && "Left" !== item.align) alignDiv.forEach(function(ele) {
                    itemEle.appendChild(ele);
                }), this.tbarAlign = !0, this.add(itemEle, "e-tbar-pos"); else if ("Left" !== item.align) {
                    var alignEle = itemEle.childNodes, leftAlign_1 = alignDiv[0];
                    [].slice.call(alignEle).forEach(function(el) {
                        _this.tbarAlgEle.lefts.push(el), leftAlign_1.appendChild(el);
                    }), itemEle.appendChild(leftAlign_1), itemEle.appendChild(alignDiv[1]), itemEle.appendChild(alignDiv[2]), 
                    this.tbarAlign = !0, this.add(itemEle, "e-tbar-pos");
                }
            }
        }, Toolbar.prototype.ctrlTemplate = function() {
            var _this = this;
            this.ctrlTem = this.trgtEle.cloneNode(!0), this.add(this.trgtEle, CLS_ITEMS$2), 
            this.tbarEle = [];
            [].slice.call(this.trgtEle.children).forEach(function(ele) {
                "DIV" === ele.tagName && (_this.tbarEle.push(ele), ele.setAttribute("aria-disabled", "false"), 
                _this.add(ele, CLS_ITEM$3));
            });
        }, Toolbar.prototype.renderItems = function() {
            var itemEleDom, innerItem, innerPos, ele = this.element, items = this.items;
            if (ele && ele.children.length > 0 && (itemEleDom = ele.querySelector("." + CLS_ITEMS$2)), 
            null != this.trgtEle) this.ctrlTemplate(); else if (ele && items.length > 0) {
                itemEleDom || (itemEleDom = createElement("div", {
                    className: CLS_ITEMS$2
                }));
                for (var i = 0; i < items.length; i++) innerItem = this.renderSubComponent(items[i]), 
                -1 === this.tbarEle.indexOf(innerItem) && this.tbarEle.push(innerItem), this.tbarAlign || this.tbarItemAlign(items[i], itemEleDom, i), 
                (innerPos = itemEleDom.querySelector(".e-toolbar-" + items[i].align.toLowerCase())) ? (items[i].showAlwaysInPopup && "Show" !== items[i].overflow || this.tbarAlgEle[(items[i].align + "s").toLowerCase()].push(innerItem), 
                innerPos.appendChild(innerItem)) : itemEleDom.appendChild(innerItem);
                ele.appendChild(itemEleDom);
            }
        }, Toolbar.prototype.setAttr = function(attr, element) {
            for (var keyVal, key = Object.keys(attr), i = 0; i < key.length; i++) "class" === (keyVal = key[i]) ? this.add(element, attr[keyVal]) : element.setAttribute(keyVal, attr[keyVal]);
        }, Toolbar.prototype.enableItems = function(items, isEnable) {
            var elements = items, len = elements.length;
            isNullOrUndefined(isEnable) && (isEnable = !0);
            var enable = function(isEnable, ele) {
                isEnable ? (ele.classList.remove("e-overlay"), ele.setAttribute("aria-disabled", "false")) : (ele.classList.add("e-overlay"), 
                ele.setAttribute("aria-disabled", "true"));
            };
            if (len && len > 1) {
                for (var _i = 0, _a = [].slice.call(elements); _i < _a.length; _i++) {
                    enable(isEnable, _a[_i]);
                }
                isEnable ? removeClass(elements, "e-overlay") : addClass(elements, "e-overlay");
            } else {
                enable(isEnable, len && 1 === len ? elements[0] : items);
            }
        }, Toolbar.prototype.addItems = function(items, index) {
            var innerItems, innerEle, itemsDiv = this.element.querySelector("." + CLS_ITEMS$2), itemAgn = "Left";
            isNullOrUndefined(index) && (index = 0), items.forEach(function(e) {
                isNullOrUndefined(e.align) || "Left" === e.align || "Left" !== itemAgn || (itemAgn = e.align);
            });
            for (var _i = 0, items_1 = items; _i < items_1.length; _i++) {
                var item = items_1[_i];
                if (isNullOrUndefined(item.type) && (item.type = "Button"), innerItems = selectAll("." + CLS_ITEM$3, this.element), 
                item.align = itemAgn, innerEle = this.renderSubComponent(item), this.tbarEle.length >= index && innerItems.length > 0) {
                    this.destroyMode();
                    var algIndex = "L" === item.align[0] ? 0 : "C" === item.align[0] ? 1 : 2, ele = void 0;
                    this.tbarAlign || "Left" === itemAgn ? this.tbarAlign ? ((ele = closest(innerItems[0], "." + CLS_ITEMS$2).children[algIndex]).insertBefore(innerEle, ele.children[index]), 
                    this.tbarAlgEle[(item.align + "s").toLowerCase()].splice(index, 0, innerEle), this.refreshPositioning()) : innerItems[0].parentNode.insertBefore(innerEle, innerItems[index]) : (this.tbarItemAlign(item, itemsDiv, 1), 
                    this.tbarAlign = !0, (ele = closest(innerItems[0], "." + CLS_ITEMS$2).children[algIndex]).appendChild(innerEle), 
                    this.tbarAlgEle[(item.align + "s").toLowerCase()].push(innerEle), this.refreshPositioning()), 
                    this.items.splice(index, 0, item), this.tbarEle.splice(index, 0, innerEle), index++, 
                    this.offsetWid = itemsDiv.offsetWidth;
                }
            }
            itemsDiv.style.width = "", this.renderOverflowMode();
        }, Toolbar.prototype.removeItems = function(args) {
            var index, elements = args, innerItems = [].slice.call(selectAll("." + CLS_ITEM$3, this.element));
            if ("number" == typeof elements) index = parseInt(args.toString(), 10), this.removeItemByIndex(index, innerItems); else if (elements && elements.length > 1) for (var _i = 0, _a = [].slice.call(elements); _i < _a.length; _i++) {
                var ele = _a[_i];
                index = this.tbarEle.indexOf(ele), this.removeItemByIndex(index, innerItems), innerItems = selectAll("." + CLS_ITEM$3, this.element);
            } else {
                ele = elements && elements.length && 1 === elements.length ? elements[0] : args;
                index = innerItems.indexOf(ele), this.removeItemByIndex(index, innerItems);
            }
            this.resize();
        }, Toolbar.prototype.removeItemByIndex = function(index, innerItems) {
            if (this.tbarEle[index] && innerItems[index]) {
                var eleIdx = this.tbarEle.indexOf(innerItems[index]);
                if (this.tbarAlign) {
                    var indexAgn = void 0;
                    indexAgn = this.tbarAlgEle[(this.items[eleIdx].align + "s").toLowerCase()].indexOf(this.tbarEle[eleIdx]), 
                    this.tbarAlgEle[(this.items[eleIdx].align + "s").toLowerCase()].splice(indexAgn, 1);
                }
                detach(innerItems[index]), this.items.splice(eleIdx, 1), this.tbarEle.splice(eleIdx, 1);
            }
        }, Toolbar.prototype.templateRender = function(templateProp, innerEle, item) {
            var isComponent, itemType = item.type, eleObj = templateProp;
            if ("object" == typeof templateProp && (isComponent = "function" == typeof eleObj.appendTo), 
            "string" != typeof templateProp && isComponent) {
                if ("Input" === itemType) {
                    ele = createElement("input");
                    item.id ? ele.id = item.id : ele.id = getUniqueID("tbr-ipt"), innerEle.appendChild(ele), 
                    eleObj.appendTo(ele);
                }
            } else {
                var templateFn = void 0, val = templateProp;
                val = "string" == typeof templateProp ? templateProp.trim() : templateProp;
                try {
                    if (document.querySelectorAll(val).length) {
                        var ele, tempStr = (ele = document.querySelector(val)).outerHTML.trim();
                        templateFn = compile$$1(tempStr), detach(ele), item.template = tempStr;
                    }
                } catch (e) {
                    templateFn = compile$$1(val);
                }
                var tempArray = void 0;
                isNullOrUndefined(templateFn) || (tempArray = templateFn({}, this, "template")), 
                !isNullOrUndefined(tempArray) && tempArray.length > 0 && [].slice.call(tempArray).forEach(function(ele) {
                    isNullOrUndefined(ele.tagName) || (ele.style.display = ""), innerEle.appendChild(ele);
                });
            }
            this.add(innerEle, "e-template"), this.tbarEle.push(innerEle);
        }, Toolbar.prototype.buttonRendering = function(item, innerEle) {
            var dom = createElement("button", {
                className: "e-tbar-btn"
            });
            dom.setAttribute("type", "button");
            var iconCss, iconPos, textStr = item.text;
            item.id ? dom.id = item.id : dom.id = getUniqueID("e-tbr-btn");
            var btnTxt = createElement("div", {
                className: "e-tbar-btn-text"
            });
            return textStr ? (btnTxt.innerHTML = textStr, dom.appendChild(btnTxt), dom.classList.add("e-tbtn-txt")) : this.add(innerEle, "e-tbtn-align"), 
            (item.prefixIcon || item.suffixIcon) && (item.prefixIcon && item.suffixIcon || item.prefixIcon ? (iconCss = item.prefixIcon + " e-icons", 
            iconPos = "Left") : (iconCss = item.suffixIcon + " e-icons", iconPos = "Right")), 
            new Button({
                iconCss: iconCss,
                iconPosition: iconPos
            }, dom), item.width && setStyleAttribute(dom, {
                width: formatUnit(item.width)
            }), dom;
        }, Toolbar.prototype.renderSubComponent = function(item) {
            var innerEle, dom;
            if ((innerEle = createElement("div", {
                className: CLS_ITEM$3
            })).setAttribute("aria-disabled", "false"), this.tbarEle || (this.tbarEle = []), 
            item.htmlAttributes && this.setAttr(item.htmlAttributes, innerEle), item.tooltipText && innerEle.setAttribute("title", item.tooltipText), 
            item.cssClass && (innerEle.className = innerEle.className + " " + item.cssClass), 
            item.template) this.templateRender(item.template, innerEle, item); else switch (item.type) {
              case "Button":
                (dom = this.buttonRendering(item, innerEle)).setAttribute("tabindex", "-1"), innerEle.appendChild(dom), 
                innerEle.addEventListener("click", this.itemClick.bind(this));
                break;

              case "Separator":
                this.add(innerEle, "e-separator");
            }
            if (item.showTextOn) {
                var sTxt = item.showTextOn;
                "Toolbar" === sTxt ? (this.add(innerEle, "e-toolbar-text"), this.add(innerEle, "e-tbtn-align")) : "Overflow" === sTxt && this.add(innerEle, "e-popup-text");
            }
            if (item.overflow) {
                var overflow = item.overflow;
                "Show" === overflow ? this.add(innerEle, "e-overflow-show") : "Hide" === overflow && (innerEle.classList.contains("e-separator") || this.add(innerEle, "e-overflow-hide"));
            }
            return "Show" !== item.overflow && item.showAlwaysInPopup && !innerEle.classList.contains("e-separator") && (this.add(innerEle, "e-popup-alone"), 
            this.popupPriCount++), innerEle;
        }, Toolbar.prototype.itemClick = function(e) {
            this.activeEleSwitch(e.currentTarget);
        }, Toolbar.prototype.activeEleSwitch = function(ele) {
            this.activeEleRemove(ele.firstElementChild), this.activeEle.focus();
        }, Toolbar.prototype.activeEleRemove = function(curEle) {
            isNullOrUndefined(this.activeEle) || this.activeEle.setAttribute("tabindex", "-1"), 
            this.activeEle = curEle, isNullOrUndefined(this.trgtEle) && !curEle.parentElement.classList.contains("e-template") ? curEle.removeAttribute("tabindex") : this.activeEle.setAttribute("tabindex", "0");
        }, Toolbar.prototype.getPersistData = function() {
            return this.addOnPersist([]);
        }, Toolbar.prototype.getModuleName = function() {
            return "toolbar";
        }, Toolbar.prototype.itemsRerender = function(newProp) {
            this.items = this.tbarItemsCol, this.destroyMode(), this.destroyItems(), this.items = newProp, 
            this.tbarItemsCol = this.items, this.renderItems(), this.renderOverflowMode();
        }, Toolbar.prototype.resize = function() {
            var ele = this.element;
            this.tbResize = !0, this.tbarAlign && this.itemPositioning(), this.popObj && this.popObj.hide();
            var checkOverflow = this.checkOverflow(ele, ele.getElementsByClassName(CLS_ITEMS$2)[0]);
            checkOverflow || this.destroyHScroll(), checkOverflow && this.scrollModule && this.offsetWid === ele.offsetWidth || ((this.offsetWid > ele.offsetWidth || checkOverflow) && this.renderOverflowMode(), 
            this.popObj && (this.tbarAlign && this.removePositioning(), this.popupRefresh(this.popObj.element, !1), 
            this.tbarAlign && this.refreshPositioning()), this.offsetWid = ele.offsetWidth, 
            this.tbResize = !1);
        }, Toolbar.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var tEle = this.element, _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "items":
                    if (newProp.items instanceof Array && oldProp.items instanceof Array) this.itemsRerender(newProp.items); else for (var changedProb = Object.keys(newProp.items), i = 0; i < changedProb.length; i++) {
                        var index = parseInt(Object.keys(newProp.items)[i], 10), property = Object.keys(newProp.items[index])[0], newProperty = (Object(oldProp.items[index])[property], 
                        Object(newProp.items[index])[property]);
                        if (this.tbarAlign || "align" === property) {
                            this.refresh();
                            break;
                        }
                        ("showAlwaysInPopup" === property && !newProperty || this.items[index].showAlwaysInPopup && "overflow" === property && 0 !== this.popupPriCount) && --this.popupPriCount, 
                        this.destroyMode();
                        detach([].slice.call(selectAll(".e-toolbar-items ." + CLS_ITEM$3, tEle))[index]), 
                        this.tbarEle.splice(index, 1), this.addItems([ this.items[index] ], index), this.items.splice(index, 1), 
                        this.items[index].template && this.tbarEle.splice(this.items.length, 1);
                    }
                    break;

                  case "width":
                    var wid = tEle.offsetWidth;
                    setStyleAttribute(tEle, {
                        width: formatUnit(newProp.width)
                    }), this.renderOverflowMode(), this.popObj && wid < tEle.offsetWidth && this.popupRefresh(this.popObj.element, !1);
                    break;

                  case "height":
                    setStyleAttribute(this.element, {
                        height: formatUnit(newProp.height)
                    });
                    break;

                  case "overflowMode":
                    this.destroyMode(), this.renderOverflowMode(), this.enableRtl && this.add(tEle, "e-rtl"), 
                    this.refreshOverflow();
                    break;

                  case "enableRtl":
                    newProp.enableRtl ? this.add(tEle, "e-rtl") : this.remove(tEle, "e-rtl"), isNullOrUndefined(this.scrollModule) || (newProp.enableRtl ? this.add(this.scrollModule.element, "e-rtl") : this.remove(this.scrollModule.element, "e-rtl")), 
                    isNullOrUndefined(this.popObj) || (newProp.enableRtl ? this.add(this.popObj.element, "e-rtl") : this.remove(this.popObj.element, "e-rtl")), 
                    this.tbarAlign && this.itemPositioning();
                }
            }
        }, Toolbar.prototype.hideItem = function(index, value) {
            if (this.tbarEle[index]) {
                var innerItems = [].slice.call(selectAll("." + CLS_ITEM$3, this.element));
                !0 === value ? innerItems[index].classList.add("e-hidden") : innerItems[index].classList.remove("e-hidden"), 
                this.refreshOverflow();
            }
        }, __decorate$1$7([ Collection([], Item$2) ], Toolbar.prototype, "items", void 0), 
        __decorate$1$7([ Property("auto") ], Toolbar.prototype, "width", void 0), __decorate$1$7([ Property("auto") ], Toolbar.prototype, "height", void 0), 
        __decorate$1$7([ Property("Scrollable") ], Toolbar.prototype, "overflowMode", void 0), 
        __decorate$1$7([ Property(!1) ], Toolbar.prototype, "enableRtl", void 0), __decorate$1$7([ Event() ], Toolbar.prototype, "clicked", void 0), 
        __decorate$1$7([ Event() ], Toolbar.prototype, "created", void 0), __decorate$1$7([ Event() ], Toolbar.prototype, "destroyed", void 0), 
        __decorate$1$7([ Event() ], Toolbar.prototype, "beforeCreate", void 0), Toolbar = __decorate$1$7([ NotifyPropertyChanges ], Toolbar);
    }(Component), __extends$3$6 = (function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
    }(), function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }()), __decorate$3$5 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, FOCUSED$1 = "e-focused", HEADER$6 = "e-menu-header", SELECTED$6 = "e-selected", WRAPPER$4 = "e-contextmenu-wrapper", HIDE$2 = "e-menu-hide", MenuItem$1 = function(_super) {
        function MenuItem() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$3$6(MenuItem, _super), __decorate$3$5([ Property("") ], MenuItem.prototype, "iconCss", void 0), 
        __decorate$3$5([ Property("") ], MenuItem.prototype, "id", void 0), __decorate$3$5([ Property(!1) ], MenuItem.prototype, "separator", void 0), 
        __decorate$3$5([ Collection([], MenuItem) ], MenuItem.prototype, "items", void 0), 
        __decorate$3$5([ Property("") ], MenuItem.prototype, "text", void 0), __decorate$3$5([ Property("") ], MenuItem.prototype, "url", void 0), 
        MenuItem;
    }(ChildProperty), ContextMenu$1 = function(_super) {
        function ContextMenu(options, element) {
            var _this = _super.call(this, options, element) || this;
            return _this.animation = new Animation({}), _this.navIdx = [], _this.isTapHold = !1, 
            _this;
        }
        return __extends$3$6(ContextMenu, _super), ContextMenu.prototype.preRender = function() {
            if ("EJS-CONTEXTMENU" === this.element.tagName) {
                this.element.style.display = "none", this.element.classList.remove("e-" + this.getModuleName()), 
                this.element.classList.remove("e-control");
                var ejInst = getValue("ej2_instances", this.element), ul = createElement("ul");
                this.ngElement = this.element, this.element = ul, this.element.classList.add("e-control"), 
                this.element.classList.add("e-" + this.getModuleName()), setValue("ej2_instances", ejInst, this.element), 
                this.element.id || (this.element.id = getUniqueID(this.getModuleName()));
            }
        }, ContextMenu.prototype.render = function() {
            this.initWrapper(), this.renderItems(), this.wireEvents();
        }, ContextMenu.prototype.initWrapper = function() {
            var wrapper = this.getWrapper();
            wrapper || (wrapper = createElement("div", {
                className: WRAPPER$4
            }), document.body.appendChild(wrapper)), this.cssClass && wrapper.classList.add(this.cssClass), 
            this.enableRtl && wrapper.classList.add("e-rtl"), attributes(this.element, {
                role: "menu",
                tabindex: "0"
            }), wrapper.appendChild(this.element), this.element.style.zIndex = this.getZIndex();
        }, ContextMenu.prototype.renderItems = function() {
            this.items.length || (this.items = ListBase.createJsonFromElement(this.element), 
            this.element.innerHTML = "");
            var ul = this.createItems(this.items);
            append(Array.prototype.slice.call(ul.children), this.element), this.element.classList.add("e-menu-parent");
        }, ContextMenu.prototype.wireEvents = function() {
            var wrapper = this.getWrapper();
            if (this.target) {
                for (var target = void 0, targetElems = selectAll(this.target), i = 0, len = targetElems.length; i < len; i++) target = targetElems[i], 
                Browser.isIos ? new Touch(target, {
                    tapHold: this.touchHandler.bind(this)
                }) : EventHandler.add(target, "contextmenu", this.cmenuHandler, this);
                this.targetElement = target;
                for (var _i = 0, _a = getScrollableParent(this.targetElement); _i < _a.length; _i++) {
                    var parent_1 = _a[_i];
                    EventHandler.add(parent_1, "scroll", this.scrollHandler, this);
                }
            }
            Browser.isDevice || (EventHandler.add(wrapper, "mouseover", this.moverHandler, this), 
            EventHandler.add(document, "mousedown", this.mouseDownHandler, this)), this.delegateClickHandler = this.clickHandler.bind(this), 
            EventHandler.add(document, "click", this.delegateClickHandler, this), new KeyboardEvents(wrapper, {
                keyAction: this.keyBoardHandler.bind(this),
                keyConfigs: {
                    downarrow: "downarrow",
                    uparrow: "uparrow",
                    enter: "enter",
                    leftarrow: "leftarrow",
                    rightarrow: "rightarrow",
                    escape: "escape"
                }
            }), rippleEffect(wrapper, {
                selector: ".e-menu-item"
            });
        }, ContextMenu.prototype.mouseDownHandler = function(e) {
            closest(e.target, "." + WRAPPER$4) !== this.getWrapper() && this.closeMenu(this.navIdx.length, e);
        }, ContextMenu.prototype.keyBoardHandler = function(e) {
            switch (e.preventDefault(), e.action) {
              case "downarrow":
              case "uparrow":
                this.upDownKeyHandler(e);
                break;

              case "rightarrow":
                this.rightEnterKeyHandler(e);
                break;

              case "leftarrow":
                this.leftEscKeyHandler(e);
                break;

              case "enter":
                this.rightEnterKeyHandler(e);
                break;

              case "escape":
                this.leftEscKeyHandler(e);
            }
        }, ContextMenu.prototype.upDownKeyHandler = function(e) {
            var cul = this.getWrapper().children[this.navIdx.length], defaultIdx = "downarrow" === e.action ? 0 : cul.childElementCount - 1, fliIdx = defaultIdx, fli = this.getLIByClass(cul, FOCUSED$1);
            fli && (fliIdx = this.getIdx(cul, fli), fli.classList.remove(FOCUSED$1), "downarrow" === e.action ? fliIdx++ : fliIdx--, 
            fliIdx === ("downarrow" === e.action ? cul.childElementCount : -1) && (fliIdx = defaultIdx));
            var cli = cul.children[fliIdx];
            fliIdx = this.isValidLI(cli, fliIdx, e.action), cul.children[fliIdx].classList.add(FOCUSED$1), 
            cul.children[fliIdx].focus();
        }, ContextMenu.prototype.isValidLI = function(cli, index, action) {
            var cul = this.getWrapper().children[this.navIdx.length];
            return (cli.classList.contains("e-separator") || cli.classList.contains("e-disabled") || cli.classList.contains(HIDE$2)) && ("downarrow" === action || "rightarrow" === action ? index++ : index--), 
            ((cli = cul.children[index]).classList.contains("e-separator") || cli.classList.contains("e-disabled") || cli.classList.contains(HIDE$2)) && (index = this.isValidLI(cli, index, action)), 
            index;
        }, ContextMenu.prototype.rightEnterKeyHandler = function(e) {
            var eventArgs, wrapper = this.getWrapper(), cul = wrapper.children[this.navIdx.length], fli = this.getLIByClass(cul, FOCUSED$1);
            if (fli) {
                var fliIdx = this.getIdx(cul, fli), navIdx = this.navIdx.concat(fliIdx), index = void 0, item = this.getItem(navIdx);
                item.items.length ? (this.navIdx.push(fliIdx), this.openMenu(fli, item, null, null, e), 
                fli.classList.remove(FOCUSED$1), fli.classList.add(SELECTED$6), "enter" === e.action && (eventArgs = {
                    element: fli,
                    item: item
                }, this.trigger("select", eventArgs)), fli.focus(), cul = wrapper.children[this.navIdx.length], 
                index = this.isValidLI(cul.children[0], 0, e.action), cul.children[index].classList.add(FOCUSED$1), 
                cul.children[index].focus()) : "enter" === e.action && (fli.classList.remove(FOCUSED$1), 
                fli.classList.add(SELECTED$6), eventArgs = {
                    element: fli,
                    item: item
                }, this.trigger("select", eventArgs), this.closeMenu(null, e));
            }
        }, ContextMenu.prototype.leftEscKeyHandler = function(e) {
            if (this.navIdx.length) {
                var wrapper = this.getWrapper();
                this.closeMenu(this.navIdx.length, e);
                var cul = wrapper.children[this.navIdx.length], sli = this.getLIByClass(cul, SELECTED$6);
                sli && (sli.setAttribute("aria-expanded", "false"), sli.classList.remove(SELECTED$6), 
                sli.classList.add(FOCUSED$1), sli.focus());
            } else "escape" === e.action && this.closeMenu(null, e);
        }, ContextMenu.prototype.scrollHandler = function(e) {
            this.closeMenu(null, e);
        }, ContextMenu.prototype.touchHandler = function(e) {
            this.isTapHold = !0, this.cmenuHandler(e.originalEvent);
        }, ContextMenu.prototype.cmenuHandler = function(e) {
            e.preventDefault(), this.closeMenu(null, e), this.canOpen(e.target) && (e.changedTouches ? this.openMenu(null, null, e.changedTouches[0].clientY + 1, e.changedTouches[0].clientX + 1, e) : this.openMenu(null, null, e.clientY + 1, e.clientX + 1, e));
        }, ContextMenu.prototype.close = function() {
            this.closeMenu();
        }, ContextMenu.prototype.closeMenu = function(ulIndex, e) {
            if (void 0 === ulIndex && (ulIndex = 0), void 0 === e && (e = null), this.isMenuVisible()) for (var ul = void 0, item = void 0, items = void 0, closeArgs = void 0, beforeCloseArgs = void 0, wrapper = this.getWrapper(), cnt = wrapper.childElementCount; cnt > ulIndex; cnt--) items = (item = this.navIdx.length ? this.getItem(this.navIdx) : null) ? item.items : this.items, 
            beforeCloseArgs = {
                element: ul = wrapper.children[cnt - 1],
                parentItem: item,
                items: items,
                event: e,
                cancel: !1
            }, this.trigger("beforeClose", beforeCloseArgs), beforeCloseArgs.cancel || (this.toggleAnimation(ul, !1), 
            this.navIdx.length = ulIndex ? ulIndex - 1 : ulIndex, closeArgs = {
                element: ul,
                parentItem: item,
                items: items
            }, this.trigger("onClose", closeArgs));
        }, ContextMenu.prototype.isMenuVisible = function() {
            return this.navIdx.length > 0 || this.element.classList.contains("e-contextmenu") && isVisible(this.element).valueOf();
        }, ContextMenu.prototype.canOpen = function(target) {
            var canOpen = !0;
            if (this.filter) {
                canOpen = !1;
                for (var filter = this.filter.split(" "), i = 0, len = target.classList.length; i < len; i++) if (filter.indexOf(target.classList[i]) > -1) {
                    canOpen = !0;
                    break;
                }
            }
            return canOpen;
        }, ContextMenu.prototype.open = function(top, left) {
            this.openMenu(null, null, top, left);
        }, ContextMenu.prototype.openMenu = function(li, item, top, left, e) {
            void 0 === top && (top = 0), void 0 === left && (left = 0), void 0 === e && (e = null);
            var ul, wrapper = this.getWrapper();
            if (li) {
                if (ul = this.createItems(item.items), Browser.isDevice) {
                    wrapper.lastChild.style.display = "none";
                    var data = {
                        text: item.text,
                        iconCss: "e-icons e-previous"
                    }, hdata = new MenuItem$1(this.items[0], null, data, !0), hli = this.createItems([ hdata ]).children[0];
                    hli.classList.add(HEADER$6), ul.insertBefore(hli, ul.children[0]);
                }
                ul.style.zIndex = this.element.style.zIndex, wrapper.appendChild(ul);
            } else ul = this.element;
            this.getIndex(li ? li.textContent : null);
            var eventArgs = {
                element: ul,
                items: li ? item.items : this.items,
                parentItem: item,
                event: e,
                cancel: !1
            };
            this.trigger("beforeOpen", eventArgs), eventArgs.cancel ? this.navIdx.pop() : (this.setPosition(li, ul, top, left), 
            this.toggleAnimation(ul));
        }, ContextMenu.prototype.setPosition = function(li, ul, top, left) {
            if (this.toggleVisiblity(ul), ul === this.element) {
                if ((collide = isCollide(ul, null, left, top)).indexOf("right") > -1 && (left -= ul.offsetWidth), 
                collide.indexOf("bottom") > -1) {
                    top = (offset = fit(ul, null, {
                        X: !1,
                        Y: !0
                    }, {
                        top: top,
                        left: left
                    })).top;
                }
                if ((collide = isCollide(ul, null, left, top)).indexOf("left") > -1) {
                    left = (offset = fit(ul, null, {
                        X: !0,
                        Y: !1
                    }, {
                        top: top,
                        left: left
                    })).left;
                }
            } else if (Browser.isDevice) top = Number(this.element.style.top.replace("px", "")), 
            left = Number(this.element.style.left.replace("px", "")); else {
                var offset;
                top = (offset = calculatePosition(li, this.enableRtl ? "left" : "right", "top")).top, 
                left = offset.left;
                var collide, xCollision = (collide = isCollide(ul, null, this.enableRtl ? left - ul.offsetWidth : left, top)).indexOf("left") > -1 || collide.indexOf("right") > -1;
                xCollision && (left = (offset = calculatePosition(li, this.enableRtl ? "right" : "left", "top")).left), 
                (this.enableRtl || xCollision) && (left = this.enableRtl && xCollision ? left : left - ul.offsetWidth), 
                collide.indexOf("bottom") > -1 && (top = (offset = fit(ul, null, {
                    X: !1,
                    Y: !0
                }, {
                    top: top,
                    left: left
                })).top);
            }
            this.toggleVisiblity(ul, !1), ul.style.top = top + "px", ul.style.left = left + "px";
        }, ContextMenu.prototype.toggleVisiblity = function(ul, isVisible$$1) {
            void 0 === isVisible$$1 && (isVisible$$1 = !0), ul.style.visibility = isVisible$$1 ? "hidden" : "", 
            ul.style.display = isVisible$$1 ? "block" : "none";
        }, ContextMenu.prototype.createItems = function(items) {
            var _this = this, showIcon = this.hasField(items, "iconCss"), listBaseOptions = {
                showIcon: showIcon,
                moduleName: "menu",
                itemCreating: function(args) {
                    args.curData.htmlAttributes = {
                        role: "menuitem",
                        tabindex: "-1"
                    };
                },
                itemCreated: function(args) {
                    if (args.curData.separator && (args.item.classList.add("e-separator"), args.item.removeAttribute("role")), 
                    !showIcon || args.curData.iconCss || args.curData.separator || args.item.classList.add("e-blankicon"), 
                    args.curData.items && args.curData.items.length) {
                        var span = createElement("span", {
                            className: "e-icons e-caret"
                        });
                        args.item.appendChild(span), args.item.setAttribute("aria-haspopup", "true"), args.item.setAttribute("aria-expanded", "false"), 
                        args.item.removeAttribute("role"), args.item.classList.add("e-menu-caret-icon");
                    }
                    var eventArgs = {
                        item: args.curData,
                        element: args.item
                    };
                    _this.trigger("beforeItemRender", eventArgs);
                }
            }, ul = ListBase.createList(this.toRawObject(items.slice()), listBaseOptions, !0);
            return ul.setAttribute("tabindex", "0"), ul;
        }, ContextMenu.prototype.toRawObject = function(items) {
            for (var item, menuItems = [], i = 0, len = items.length; i < len; i++) item = items[i].properties, 
            menuItems.push(item);
            return menuItems;
        }, ContextMenu.prototype.moverHandler = function(e) {
            var wrapper = this.getWrapper(), trgt = e.target, cli = this.getLI(trgt);
            if (cli && closest(cli, "." + WRAPPER$4)) {
                var fli = select(".e-focused", wrapper);
                fli && fli.classList.remove(FOCUSED$1), cli.classList.add(FOCUSED$1), this.showItemOnClick || this.clickHandler(e);
            }
        }, ContextMenu.prototype.hasField = function(items, field) {
            for (var i = 0, len = items.length; i < len; i++) if (items[i][field]) return !0;
            return !1;
        }, ContextMenu.prototype.getWrapper = function() {
            return closest(this.element, "." + WRAPPER$4);
        }, ContextMenu.prototype.clickHandler = function(e) {
            if (this.isTapHold) this.isTapHold = !1; else {
                var wrapper = this.getWrapper(), trgt = e.target, cli = this.getLI(trgt), cliWrapper = cli ? closest(cli, "." + WRAPPER$4) : null, isInstLI = cli && cliWrapper && wrapper.firstElementChild.id === cliWrapper.firstElementChild.id;
                if (isInstLI && "click" === e.type && !cli.classList.contains(HEADER$6)) {
                    this.setLISelected(cli);
                    var navIdx = this.getIndex(cli.textContent), eventArgs = {
                        element: cli,
                        item: item = this.getItem(navIdx)
                    };
                    this.trigger("select", eventArgs);
                }
                if (isInstLI && ("mouseover" === e.type || Browser.isDevice || this.showItemOnClick)) {
                    var ul = void 0;
                    if (cli.classList.contains(HEADER$6)) {
                        ul = wrapper.children[this.navIdx.length - 1], this.toggleAnimation(ul);
                        (sli = this.getLIByClass(ul, SELECTED$6)) && sli.classList.remove(SELECTED$6), detach(cli.parentNode), 
                        this.navIdx.pop();
                    } else if (!cli.classList.contains("e-separator")) {
                        var showSubMenu = !0, cul = cli.parentNode, cliIdx = this.getIdx(cul, cli);
                        if (!Browser.isDevice) {
                            var culIdx = this.getIdx(wrapper, cul);
                            if (this.navIdx[culIdx] === cliIdx && (showSubMenu = !1), culIdx !== this.navIdx.length && ("mouseover" !== e.type || showSubMenu)) {
                                var sli;
                                (sli = this.getLIByClass(cul, SELECTED$6)) && sli.classList.remove(SELECTED$6), 
                                this.closeMenu(culIdx + 1, e);
                            }
                        }
                        if (showSubMenu) {
                            var item, idx = this.navIdx.concat(cliIdx);
                            (item = this.getItem(idx)).items.length ? ("mouseover" === e.type && this.setLISelected(cli), 
                            cli.setAttribute("aria-expanded", "true"), this.navIdx.push(cliIdx), this.openMenu(cli, item, null, null, e)) : "mouseover" !== e.type && this.closeMenu(null, e);
                        }
                    }
                } else "UL" === trgt.tagName && trgt.parentElement === wrapper || cli && cli.querySelector(".e-caret") || this.closeMenu(null, e);
            }
        }, ContextMenu.prototype.setLISelected = function(li) {
            var sli = this.getLIByClass(li.parentElement, SELECTED$6);
            sli && sli.classList.remove(SELECTED$6), li.classList.remove(FOCUSED$1), li.classList.add(SELECTED$6);
        }, ContextMenu.prototype.getLIByClass = function(ul, classname) {
            for (var i = 0, len = ul.children.length; i < len; i++) if (ul.children[i].classList.contains(classname)) return ul.children[i];
            return null;
        }, ContextMenu.prototype.getItem = function(navIdx) {
            var idx = (navIdx = navIdx.slice()).pop();
            return this.getItems(navIdx)[idx];
        }, ContextMenu.prototype.getItems = function(navIdx) {
            for (var items = this.items, i = 0; i < navIdx.length; i++) items = items[navIdx[i]].items;
            return items;
        }, ContextMenu.prototype.getIdx = function(ul, li, skipHdr) {
            void 0 === skipHdr && (skipHdr = !0);
            var idx = Array.prototype.indexOf.call(ul.children, li);
            return skipHdr && ul.children[0].classList.contains(HEADER$6) && idx--, idx;
        }, ContextMenu.prototype.getLI = function(elem) {
            return "LI" === elem.tagName ? elem : closest(elem, "li");
        }, ContextMenu.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var wrapper = this.getWrapper(), _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "cssClass":
                    oldProp.cssClass && wrapper.classList.remove(oldProp.cssClass), newProp.cssClass && wrapper.classList.add(newProp.cssClass);
                    break;

                  case "enableRtl":
                    wrapper.classList.toggle("e-rtl");
                    break;

                  case "filter":
                    this.closeMenu(), this.filter = newProp.filter;
                    break;

                  case "showItemOnClick":
                    this.unWireEvents(), this.showItemOnClick = newProp.showItemOnClick, this.wireEvents();
                    break;

                  case "target":
                    this.unWireEvents(), this.target = newProp.target, this.wireEvents();
                    break;

                  case "items":
                    for (var idx = void 0, navIdx = void 0, item = void 0, keys = Object.keys(newProp.items), i = 0; i < keys.length; i++) (navIdx = this.getChangedItemIndex(newProp, [], Number(keys[i]))).length <= this.getWrapper().children.length && (idx = navIdx.pop(), 
                    item = this.getItems(navIdx), this.insertAfter([ item[idx] ], item[idx].text), this.removeItem(item, navIdx, idx)), 
                    navIdx.length = 0;
                }
            }
        }, ContextMenu.prototype.getChangedItemIndex = function(newProp, index, idx) {
            index.push(idx);
            var key = Object.keys(newProp.items[idx]).pop();
            if ("items" === key) {
                var item = newProp.items[idx];
                this.getChangedItemIndex(item, index, Number(Object.keys(item.items).pop()));
            } else "isParentArray" === key && index.length > 1 && index.pop();
            return index;
        }, ContextMenu.prototype.removeItem = function(item, navIdx, idx) {
            item.splice(idx, 1);
            var uls = this.getWrapper().children;
            navIdx.length < uls.length && detach(uls[navIdx.length].children[idx]);
        }, ContextMenu.prototype.unWireEvents = function() {
            var wrapper = this.getWrapper();
            if (this.target) {
                for (var target = void 0, touchModule = void 0, targetElems = selectAll(this.target), i = 0, len = targetElems.length; i < len; i++) target = targetElems[i], 
                Browser.isIos ? (touchModule = getInstance(target, Touch)) && touchModule.destroy() : EventHandler.remove(target, "contextmenu", this.cmenuHandler);
                for (var _i = 0, _a = getScrollableParent(this.targetElement); _i < _a.length; _i++) {
                    var parent_2 = _a[_i];
                    EventHandler.remove(parent_2, "scroll", this.scrollHandler);
                }
            }
            Browser.isDevice || (EventHandler.remove(wrapper, "mouseover", this.moverHandler), 
            EventHandler.remove(document, "mousedown", this.mouseDownHandler)), EventHandler.remove(document, "click", this.delegateClickHandler);
            var keyboardModule = getInstance(wrapper, KeyboardEvents);
            keyboardModule && keyboardModule.destroy();
        }, ContextMenu.prototype.toggleAnimation = function(ul, isMenuOpen) {
            var _this = this;
            void 0 === isMenuOpen && (isMenuOpen = !0), "None" !== this.animationSettings.effect && isMenuOpen ? this.animation.animate(ul, {
                name: this.animationSettings.effect,
                duration: this.animationSettings.duration,
                timingFunction: this.animationSettings.easing,
                begin: function(options) {
                    options.element.style.display = "block", options.element.style.maxHeight = options.element.getBoundingClientRect().height + "px";
                },
                end: function(options) {
                    _this.end(options.element, isMenuOpen);
                }
            }) : this.end(ul, isMenuOpen);
        }, ContextMenu.prototype.end = function(ul, isMenuOpen) {
            if (isMenuOpen) {
                ul.style.display = "block", ul.style.maxHeight = "";
                var item = this.navIdx.length ? this.getItem(this.navIdx) : null, eventArgs = {
                    element: ul,
                    parentItem: item,
                    items: item ? item.items : this.items
                };
                if (this.trigger("onOpen", eventArgs), ul.querySelector(".e-focused")) ul.querySelector(".e-focused").focus(); else {
                    var ele = void 0;
                    (ele = this.getWrapper().children[this.getIdx(this.getWrapper(), ul) - 1]) ? ele.querySelector(".e-selected").focus() : this.element.focus();
                }
            } else if (ul === this.element) {
                var fli = this.getLIByClass(this.element, FOCUSED$1);
                fli && fli.classList.remove(FOCUSED$1);
                var sli = this.getLIByClass(this.element, SELECTED$6);
                sli && sli.classList.remove(SELECTED$6), ul.style.display = "none";
            } else detach(ul);
        }, ContextMenu.prototype.getPersistData = function() {
            return "";
        }, ContextMenu.prototype.getModuleName = function() {
            return "contextmenu";
        }, ContextMenu.prototype.getIndex = function(data, items, navIdx, isCallBack) {
            void 0 === items && (items = this.items), void 0 === navIdx && (navIdx = []), void 0 === isCallBack && (isCallBack = !1);
            for (var item, i = 0, len = items.length; i < len; i++) {
                if ((item = items[i]).text === data) {
                    navIdx.push(i);
                    break;
                }
                if (item.items.length) {
                    if (-1 !== (navIdx = this.getIndex(data, item.items, navIdx, !0))[navIdx.length - 1]) {
                        navIdx.unshift(i);
                        break;
                    }
                    i !== len - 1 && navIdx.pop();
                } else i === len - 1 && navIdx.push(-1);
            }
            return isCallBack || -1 !== navIdx[0] ? navIdx : [];
        }, ContextMenu.prototype.enableItems = function(items, enable) {
            void 0 === enable && (enable = !0);
            for (var ul, idx, navIdx, wrapper = this.getWrapper(), i = 0; i < items.length; i++) idx = (navIdx = this.getIndex(items[i])).pop(), 
            (ul = wrapper.children[navIdx.length]) && (enable ? Browser.isDevice && !ul.classList.contains("e-contextmenu") ? ul.children[idx + 1].classList.remove("e-disabled") : ul.children[idx].classList.remove("e-disabled") : Browser.isDevice && !ul.classList.contains("e-contextmenu") ? ul.children[idx + 1].classList.add("e-disabled") : ul.children[idx].classList.add("e-disabled"));
        }, ContextMenu.prototype.showItems = function(items) {
            this.showHideItems(items, !1);
        }, ContextMenu.prototype.hideItems = function(items) {
            this.showHideItems(items, !0);
        }, ContextMenu.prototype.showHideItems = function(items, ishide) {
            for (var ul, idx, navIdx, wrapper = this.getWrapper(), i = 0; i < items.length; i++) idx = (navIdx = this.getIndex(items[i])).pop(), 
            (ul = wrapper.children[navIdx.length]) && (ishide ? Browser.isDevice && !ul.classList.contains("e-contextmenu") ? ul.children[idx + 1].classList.add(HIDE$2) : ul.children[idx].classList.add(HIDE$2) : Browser.isDevice && !ul.classList.contains("e-contextmenu") ? ul.children[idx + 1].classList.remove(HIDE$2) : ul.children[idx].classList.remove(HIDE$2));
        }, ContextMenu.prototype.removeItems = function(items) {
            for (var idx, navIdx, iitems, i = 0; i < items.length; i++) idx = (navIdx = this.getIndex(items[i])).pop(), 
            iitems = this.getItems(navIdx), this.removeItem(iitems, navIdx, idx);
        }, ContextMenu.prototype.insertAfter = function(items, text) {
            this.insertItems(items, text);
        }, ContextMenu.prototype.insertBefore = function(items, text) {
            this.insertItems(items, text, !1);
        }, ContextMenu.prototype.insertItems = function(items, text, isAfter) {
            void 0 === isAfter && (isAfter = !0);
            for (var li, idx, navIdx, iitems, menuitem, i = 0; i < items.length; i++) {
                idx = (navIdx = this.getIndex(text)).pop(), iitems = this.getItems(navIdx), menuitem = new MenuItem$1(iitems[0], null, items[i], !0), 
                iitems.splice(isAfter ? idx + 1 : idx, 0, menuitem);
                var uls = this.getWrapper().children;
                navIdx.length < uls.length && (idx = isAfter ? idx + 1 : idx, this.hasField(iitems, "iconCss"), 
                li = this.createItems(iitems).children[idx], uls[navIdx.length].insertBefore(li, uls[navIdx.length].children[idx]));
            }
        }, ContextMenu.prototype.getZIndex = function() {
            for (var index, position, props, zIndex = [ "999" ], i = 0, len = document.body.children.length; i < len; i++) index = (props = document.defaultView.getComputedStyle(document.body.children[i])).getPropertyValue("z-index"), 
            position = props.getPropertyValue("position"), "auto" !== index && "static" !== position && zIndex.push(index);
            return (Math.max.apply(Math, zIndex) + 1).toString();
        }, ContextMenu.prototype.destroy = function() {
            var _this = this, wrapper = this.getWrapper();
            wrapper && (_super.prototype.destroy.call(this), this.unWireEvents(), this.ngElement ? this.ngElement.style.display = "block" : (this.closeMenu(), 
            this.element.innerHTML = "", [ "top", "left", "display", "z-index" ].forEach(function(key) {
                _this.element.style.removeProperty(key);
            }), [ "role", "tabindex", "class", "style" ].forEach(function(key) {
                -1 !== [ "class", "style" ].indexOf(key) && _this.element.getAttribute(key) || _this.element.removeAttribute(key);
            }), wrapper.parentNode.insertBefore(this.element, wrapper)), detach(wrapper));
        }, __decorate$3$5([ Property("") ], ContextMenu.prototype, "cssClass", void 0), 
        __decorate$3$5([ Property("") ], ContextMenu.prototype, "filter", void 0), __decorate$3$5([ Property(!1) ], ContextMenu.prototype, "showItemOnClick", void 0), 
        __decorate$3$5([ Collection([], MenuItem$1) ], ContextMenu.prototype, "items", void 0), 
        __decorate$3$5([ Property("") ], ContextMenu.prototype, "target", void 0), __decorate$3$5([ Property({
            duration: 400,
            easing: "ease",
            effect: "SlideDown"
        }) ], ContextMenu.prototype, "animationSettings", void 0), __decorate$3$5([ Event() ], ContextMenu.prototype, "beforeItemRender", void 0), 
        __decorate$3$5([ Event() ], ContextMenu.prototype, "beforeOpen", void 0), __decorate$3$5([ Event() ], ContextMenu.prototype, "onOpen", void 0), 
        __decorate$3$5([ Event() ], ContextMenu.prototype, "beforeClose", void 0), __decorate$3$5([ Event() ], ContextMenu.prototype, "onClose", void 0), 
        __decorate$3$5([ Event() ], ContextMenu.prototype, "select", void 0), ContextMenu = __decorate$3$5([ NotifyPropertyChanges ], ContextMenu);
    }(Component), __extends$126 = (function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
    }(), function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
    }(), function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
    }(), function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }()), ExcelFilter = function(_super) {
        function ExcelFilter(parent, filterSettings, serviceLocator, customFltrOperators) {
            var _this = _super.call(this, parent, filterSettings, serviceLocator) || this;
            return _this.customFilterOperators = customFltrOperators, _this.isExcel = !0, _this;
        }
        return __extends$126(ExcelFilter, _super), ExcelFilter.prototype.getCMenuDS = function(type, operator) {
            var options = {
                number: [ "Equal", "NotEqual", "", "LessThan", "LessThanOrEqual", "GreaterThan", "GreaterThanOrEqual", "Between", "", "CustomFilter" ],
                string: [ "Equal", "NotEqual", "", "StartsWith", "EndsWith", "", "Contains", "", "CustomFilter" ]
            };
            options.date = options.number, options.datetime = options.number;
            for (var model = [], i = 0; i < options[type].length; i++) options[type][i].length ? operator ? model.push({
                text: this.getLocalizedLabel(options[type][i]) + "...",
                iconCss: "e-icons e-icon-check " + (operator === options[type][i] ? "" : "e-emptyicon")
            }) : model.push({
                text: this.getLocalizedLabel(options[type][i]) + "..."
            }) : model.push({
                separator: !0
            });
            return model;
        }, ExcelFilter.prototype.destroy = function() {
            this.dlg && (this.unwireExEvents(), _super.prototype.destroy.call(this)), this.cmenu.parentElement && remove(this.cmenu);
        }, ExcelFilter.prototype.createMenu = function(type, isFiltered, isCheckIcon) {
            this.menu = createElement("div", {
                className: "e-contextmenu-wrapper"
            }), this.parent.enableRtl ? this.menu.classList.add("e-rtl") : this.menu.classList.remove("e-rtl");
            var ul = createElement("ul"), icon = isFiltered ? "e-excl-filter-icon e-filtered" : "e-excl-filter-icon";
            ul.appendChild(this.createMenuElem(this.getLocalizedLabel("ClearFilter"), isFiltered ? "" : "e-disabled", icon)), 
            "boolean" !== type && ul.appendChild(this.createMenuElem(this.getLocalizedLabel({
                string: "TextFilter",
                date: "DateFilter",
                datetime: "DateFilter",
                number: "NumberFilter"
            }[type]), "e-submenu", isCheckIcon && this.ensureTextFilter() ? "e-icon-check" : icon + " e-emptyicon", !0)), 
            this.menu.appendChild(ul);
        }, ExcelFilter.prototype.createMenuElem = function(val, className, iconName, isSubMenu) {
            var li = createElement("li", {
                className: className + " e-menu-item"
            });
            return li.innerHTML = val, li.insertBefore(createElement("span", {
                className: "e-menu-icon e-icons " + iconName
            }), li.firstChild), isSubMenu && li.appendChild(createElement("span", {
                className: "e-icons e-caret"
            })), li;
        }, ExcelFilter.prototype.wireExEvents = function() {
            EventHandler.add(this.dlg, "mouseover", this.hoverHandler, this), EventHandler.add(this.dlg, "click", this.clickExHandler, this);
        }, ExcelFilter.prototype.unwireExEvents = function() {
            EventHandler.remove(this.dlg, "mouseover", this.hoverHandler), EventHandler.remove(this.dlg, "click", this.clickExHandler);
        }, ExcelFilter.prototype.clickExHandler = function(e) {
            var menuItem = parentsUntil(e.target, "e-menu-item");
            menuItem && this.getLocalizedLabel("ClearFilter") === menuItem.innerText.trim() && (this.clearFilter(), 
            this.closeDialog());
        }, ExcelFilter.prototype.destroyCMenu = function() {
            this.menuObj && !this.menuObj.isDestroyed && (this.menuObj.destroy(), remove(this.cmenu));
        }, ExcelFilter.prototype.hoverHandler = function(e) {
            var isSubMenu, target = e.target.querySelector(".e-contextmenu"), li = parentsUntil(e.target, "e-menu-item"), focused = this.menu.querySelector(".e-focused");
            if (focused && focused.classList.remove("e-focused"), li && (li.classList.add("e-focused"), 
            isSubMenu = li.classList.contains("e-submenu")), !target) {
                if (!isSubMenu) {
                    var submenu = this.menu.querySelector(".e-submenu");
                    isNullOrUndefined(submenu) || submenu.classList.remove("e-selected"), this.isCMenuOpen = !1, 
                    this.destroyCMenu();
                }
                var selectedMenu = this.ensureTextFilter();
                if (!this.isCMenuOpen && isSubMenu) {
                    li.classList.add("e-selected"), this.isCMenuOpen = !0;
                    var menuOptions = {
                        items: this.getCMenuDS(this.options.type, selectedMenu ? selectedMenu.replace(/\s/g, "") : void 0),
                        select: this.selectHandler.bind(this),
                        onClose: this.destroyCMenu.bind(this),
                        enableRtl: this.parent.enableRtl,
                        beforeClose: this.preventClose
                    };
                    this.parent.element.appendChild(this.cmenu), this.menuObj = new ContextMenu$1(menuOptions, this.cmenu);
                    var client = this.menu.querySelector(".e-submenu").getBoundingClientRect(), pos = {
                        top: 0,
                        left: 0
                    };
                    if (Browser.isDevice) {
                        var contextRect = this.getContextBounds(this.menuObj);
                        pos.top = (window.innerHeight - contextRect.height) / 2, pos.left = (window.innerWidth - contextRect.width) / 2, 
                        this.closeDialog();
                    } else pos.top = client.top, pos.left = this.getCMenuYPosition(this.dlg, this.menuObj);
                    this.menuObj.open(pos.top, pos.left);
                }
            }
        }, ExcelFilter.prototype.ensureTextFilter = function() {
            var selectedMenu, predicates = this.existingPredicate[this.options.field];
            return predicates && 2 === predicates.length ? selectedMenu = "greaterThanOrEqual" === predicates[0].operator && "lessThanOrEqual" === predicates[1].operator ? "Between" : "CustomFilter" : predicates && 1 === predicates.length && (this.optrData = this.customFilterOperators[this.options.type + "Operator"], 
            selectedMenu = this.getSelectedText(predicates[0].operator)), selectedMenu;
        }, ExcelFilter.prototype.preventClose = function(args) {
            args.event instanceof MouseEvent && args.event.target.classList.contains("e-submenu") && (args.cancel = !0);
        }, ExcelFilter.prototype.getContextBounds = function(context) {
            this.menuObj.element.style.display;
            return this.menuObj.element.style.display = "block", this.menuObj.element.getBoundingClientRect();
        }, ExcelFilter.prototype.getCMenuYPosition = function(target, context) {
            var contextWidth = this.getContextBounds(context).width, targetPosition = target.getBoundingClientRect();
            return targetPosition.right + contextWidth - this.parent.element.clientWidth < 1 ? targetPosition.right + 1 : targetPosition.left - contextWidth - 1;
        }, ExcelFilter.prototype.openDialog = function(options) {
            var _this = this;
            this.updateModel(options), this.getAndSetChkElem(options), this.showDialog(options), 
            this.dialogObj.dataBind();
            var filterLength = this.existingPredicate[options.field] && this.existingPredicate[options.field].length || this.options.filteredColumns.filter(function(col) {
                return _this.options.field === col.field;
            }).length;
            this.createMenu(options.type, filterLength > 0, 1 === filterLength || 2 === filterLength), 
            this.dlg.insertBefore(this.menu, this.dlg.firstChild), this.dlg.classList.add("e-excelfilter"), 
            this.dlg.classList.remove("e-checkboxfilter"), this.cmenu = createElement("ul", {
                className: "e-excel-menu"
            }), this.wireExEvents();
        }, ExcelFilter.prototype.closeDialog = function() {
            _super.prototype.closeDialog.call(this);
        }, ExcelFilter.prototype.selectHandler = function(e) {
            e.item && (this.menuItem = e.item, this.renderDialogue(e));
        }, ExcelFilter.prototype.renderDialogue = function(e) {
            var _this = this, target = e.element, column = this.options.field, mainDiv = createElement("div", {
                className: "e-xlfl-maindiv",
                id: column + "-xlflmenu"
            });
            this.dlgDiv = createElement("div", {
                className: "e-xlflmenu",
                id: column + "-xlfldlg"
            }), this.parent.element.appendChild(this.dlgDiv), this.dlgObj = new Dialog({
                header: "Custom Filter",
                isModal: !0,
                overlayClick: this.removeDialog.bind(this),
                showCloseIcon: !0,
                closeOnEscape: !1,
                target: document.body,
                visible: !1,
                enableRtl: this.parent.enableRtl,
                open: function() {
                    _this.dlgObj.element.querySelector("table.e-xlfl-table>tr").cells[1].querySelector("input:not([type=hidden])").focus();
                },
                close: this.removeDialog.bind(this),
                created: this.createdDialog.bind(this, target, column),
                buttons: [ {
                    click: this.filterBtnClick.bind(this, column),
                    buttonModel: {
                        content: this.getLocalizedLabel("OK"),
                        isPrimary: !0,
                        cssClass: "e-xlfl-okbtn"
                    }
                }, {
                    click: this.removeDialog.bind(this),
                    buttonModel: {
                        content: this.getLocalizedLabel("Cancel"),
                        cssClass: "e-xlfl-cancelbtn"
                    }
                } ],
                content: mainDiv,
                width: 430,
                animationSettings: {
                    effect: "None"
                }
            }), this.dlgObj.appendTo(this.dlgDiv);
        }, ExcelFilter.prototype.removeDialog = function() {
            this.removeObjects([ this.dropOptr, this.datePicker, this.actObj, this.numericTxtObj, this.dlgObj ]), 
            remove(this.dlgDiv);
        }, ExcelFilter.prototype.clearBtnClick = function(field) {
            this.clearFilter(), this.removeDialog();
        }, ExcelFilter.prototype.createdDialog = function(target, column) {
            this.renderCustomFilter(target, column), this.dlgObj.element.style.left = "0px", 
            this.dlgObj.element.style.top = "0px", Browser.isDevice && window.innerWidth < 440 && (this.dlgObj.element.style.width = "90%"), 
            this.dlgObj.show();
        }, ExcelFilter.prototype.renderCustomFilter = function(target, column) {
            var dlgConetntEle = this.dlgObj.element.querySelector(".e-xlfl-maindiv"), dlgFields = createElement("div", {
                innerHTML: this.getLocalizedLabel("ShowRowsWhere"),
                className: "e-xlfl-dlgfields"
            });
            dlgConetntEle.appendChild(dlgFields);
            var fieldSet = createElement("div", {
                innerHTML: this.options.displayName,
                className: "e-xlfl-fieldset"
            });
            dlgConetntEle.appendChild(fieldSet), this.renderFilterUI(column, dlgConetntEle);
        }, ExcelFilter.prototype.filterBtnClick = function(col) {
            var checkBoxValue, fValue = this.dlgDiv.querySelector("#" + col + "-xlfl-frstvalue").ej2_instances[0], fOperator = this.dlgDiv.querySelector("#" + col + "-xlfl-frstoptr").ej2_instances[0], sValue = this.dlgDiv.querySelector("#" + col + "-xlfl-secndvalue").ej2_instances[0], sOperator = this.dlgDiv.querySelector("#" + col + "-xlfl-secndoptr").ej2_instances[0];
            if ("string" === this.options.type) {
                checkBoxValue = this.dlgDiv.querySelector("#" + col + "-xlflmtcase").ej2_instances[0].checked;
            }
            var andRadio = this.dlgDiv.querySelector("#" + col + "e-xlfl-frstpredicate").ej2_instances[0], predicate = (this.dlgDiv.querySelector("#" + col + "e-xlfl-secndpredicate").ej2_instances[0], 
            andRadio.checked ? "and" : "or");
            null === sValue.value && (predicate = "or"), this.filterByColumn(this.options.field, fOperator.value, fValue.value, predicate, checkBoxValue, this.parent.filterSettings.ignoreAccent, sOperator.value, sValue.value), 
            this.removeDialog();
        }, ExcelFilter.prototype.filterByColumn = function(fieldName, firstOperator, firstValue, predicate, matchCase, ignoreAccent, secondOperator, secondValue) {
            var mPredicate, _this = this, col = this.parent.getColumnByField(fieldName), field = col.isForeignColumn() ? col.foreignKeyValue : fieldName, fColl = [];
            fColl.push({
                field: field,
                predicate: predicate,
                matchCase: matchCase,
                ignoreAccent: ignoreAccent,
                operator: firstOperator,
                value: firstValue,
                type: this.options.type
            }), mPredicate = new Predicate(field, firstOperator.toLowerCase(), firstValue, !matchCase, ignoreAccent), 
            secondValue && (secondOperator = isNullOrUndefined(secondOperator) ? "equal" : secondOperator, 
            fColl.push({
                field: field,
                predicate: predicate,
                matchCase: matchCase,
                ignoreAccent: ignoreAccent,
                operator: secondOperator,
                value: secondValue,
                type: this.options.type
            }), mPredicate = mPredicate[predicate](field, secondOperator.toLowerCase(), secondValue, !matchCase, ignoreAccent));
            var args = {
                action: "filtering",
                filterCollection: fColl,
                field: this.options.field,
                ejpredicate: mPredicate,
                actualPredicate: fColl
            }, fPredicate = {}, filterCollection = [];
            col.isForeignColumn() ? this.options.column.dataSource.executeQuery(new Query().where(mPredicate)).then(function(e) {
                _this.options.column.columnData = e.result, _this.parent.notify("generateQuery", {
                    predicate: fPredicate,
                    column: col
                }), args.ejpredicate = fPredicate.predicate.predicates, fPredicate.predicate.predicates.forEach(function(fpred) {
                    filterCollection.push({
                        field: fpred.field,
                        predicate: "or",
                        matchCase: fpred.ignoreCase,
                        ignoreAccent: fpred.ignoreAccent,
                        operator: fpred.operator,
                        value: fpred.value,
                        type: _this.options.type
                    });
                }), args.filterCollection = filterCollection.length ? filterCollection : fColl.filter(function(col) {
                    return col.field = _this.options.field;
                }), _this.options.handler(args);
            }) : this.options.handler(args);
        }, ExcelFilter.prototype.renderOperatorUI = function(column, table, elementID, predicates, isFirst) {
            var fieldElement = createElement("tr", {
                className: "e-xlfl-fields"
            });
            table.appendChild(fieldElement);
            var xlfloptr = createElement("td", {
                className: "e-xlfl-optr"
            });
            fieldElement.appendChild(xlfloptr);
            var optrDiv = createElement("div", {
                className: "e-xlfl-optrdiv"
            }), optrInput = createElement("input", {
                id: column + elementID
            });
            optrDiv.appendChild(optrInput), xlfloptr.appendChild(optrDiv);
            var optr = this.options.type + "Operator", dropDatasource = this.customFilterOperators[optr];
            this.optrData = dropDatasource;
            var selectedValue = this.dropSelectedVal(column, predicates, isFirst), menuText = "";
            this.menuItem && ((menuText = this.menuItem.text.slice(0, -3)) !== this.getLocalizedLabel("CustomFilter") && (selectedValue = isFirst ? menuText : void 0), 
            menuText === this.getLocalizedLabel("Between") && (selectedValue = this.getLocalizedLabel(isFirst ? "GreaterThanOrEqual" : "LessThanOrEqual"))), 
            this.dropOptr = new DropDownList$1({
                dataSource: dropDatasource,
                fields: {
                    text: "text",
                    value: "value"
                },
                text: selectedValue,
                open: this.dropDownOpen.bind(this),
                enableRtl: this.parent.enableRtl
            }), this.dropOptr.appendTo(optrInput);
            return {
                fieldElement: fieldElement,
                operator: this.getSelectedValue(selectedValue)
            };
        }, ExcelFilter.prototype.dropDownOpen = function(args) {
            args.popup.element.style.zIndex = (this.dialogObj.zIndex + 1).toString();
        }, ExcelFilter.prototype.getSelectedValue = function(text) {
            var selectedField = new DataManager(this.optrData).executeLocal(new Query().where("text", "equal", text));
            return isNullOrUndefined(selectedField[0]) ? "" : selectedField[0].value;
        }, ExcelFilter.prototype.dropSelectedVal = function(col, predicates, isFirst) {
            var operator;
            return operator = predicates && predicates.length > 0 ? 2 === predicates.length ? isFirst ? predicates[0].operator : predicates[1].operator : isFirst ? predicates[0].operator : void 0 : isFirst ? "equal" : void 0, 
            this.getSelectedText(operator);
        }, ExcelFilter.prototype.getSelectedText = function(operator) {
            var selectedField = new DataManager(this.optrData).executeLocal(new Query().where("value", "equal", operator));
            return isNullOrUndefined(selectedField[0]) ? "" : selectedField[0].text;
        }, ExcelFilter.prototype.renderFilterUI = function(column, dlgConetntEle) {
            var predicates = this.existingPredicate[column], table = createElement("table", {
                className: "e-xlfl-table"
            });
            dlgConetntEle.appendChild(table);
            var colGroup = createElement("colGroup");
            colGroup.innerHTML = '<col style="width: 50%"></col><col style="width: 50%"></col>', 
            table.appendChild(colGroup);
            var optr = this.renderOperatorUI(column, table, "-xlfl-frstoptr", predicates, !0);
            this.renderFlValueUI(column, optr, "-xlfl-frstvalue", predicates, !0);
            var predicate = createElement("tr", {
                className: "e-xlfl-predicate"
            });
            table.appendChild(predicate), this.renderRadioButton(column, predicate, predicates), 
            optr = this.renderOperatorUI(column, table, "-xlfl-secndoptr", predicates, !1), 
            this.renderFlValueUI(column, optr, "-xlfl-secndvalue", predicates, !1);
        }, ExcelFilter.prototype.renderRadioButton = function(column, tr, predicates) {
            var td = createElement("td", {
                className: "e-xlfl-radio",
                attrs: {
                    colSpan: "2"
                }
            });
            tr.appendChild(td);
            var radioDiv = createElement("div", {
                className: "e-xlfl-radiodiv",
                attrs: {
                    style: "display: inline-block"
                }
            }), frstpredicate = createElement("input", {
                id: column + "e-xlfl-frstpredicate",
                attrs: {
                    type: "radio"
                }
            }), secndpredicate = createElement("input", {
                id: column + "e-xlfl-secndpredicate",
                attrs: {
                    type: "radio"
                }
            });
            radioDiv.appendChild(frstpredicate), radioDiv.appendChild(secndpredicate), td.appendChild(radioDiv), 
            "string" === this.options.type && this.renderMatchCase(column, tr, td, "-xlflmtcase", predicates);
            var andRadio = new RadioButton({
                label: this.getLocalizedLabel("AND"),
                name: "default",
                cssClass: "e-xlfl-radio-and",
                checked: !0,
                enableRtl: this.parent.enableRtl
            }), orRadio = new RadioButton({
                label: this.getLocalizedLabel("OR"),
                name: "default",
                cssClass: "e-xlfl-radio-or",
                enableRtl: this.parent.enableRtl
            });
            "and" === (predicates && 2 === predicates.length ? predicates[1].predicate : "and") ? (andRadio.checked = !0, 
            orRadio.checked = !1) : (orRadio.checked = !0, andRadio.checked = !1), andRadio.appendTo(frstpredicate), 
            orRadio.appendTo(secndpredicate);
        }, ExcelFilter.prototype.removeObjects = function(elements) {
            for (var _i = 0, elements_1 = elements; _i < elements_1.length; _i++) {
                var obj = elements_1[_i];
                obj && !obj.isDestroyed && obj.destroy();
            }
        }, ExcelFilter.prototype.renderFlValueUI = function(column, optr, elementId, predicates, isFirst) {
            var value = createElement("td", {
                className: "e-xlfl-value"
            });
            optr.fieldElement.appendChild(value);
            var valueDiv = createElement("div", {
                className: "e-xlfl-valuediv"
            }), valueInput = createElement("input", {
                id: column + elementId
            });
            valueDiv.appendChild(valueInput), value.appendChild(valueDiv);
            var flValue, predicate;
            predicates && predicates.length > 0 && (flValue = (predicate = 2 === predicates.length ? isFirst ? predicates[0] : predicates[1] : isFirst ? predicates[0] : void 0) && predicate.operator === optr.operator ? predicate.value : void 0);
            ({
                string: this.renderAutoComplete.bind(this),
                number: this.renderNumericTextBox.bind(this),
                date: this.renderDate.bind(this),
                datetime: this.renderDate.bind(this)
            })[this.options.type](this.options, column, valueInput, flValue, this.parent.enableRtl);
        }, ExcelFilter.prototype.renderMatchCase = function(column, tr, matchCase, elementId, predicates) {
            var matchCaseDiv = createElement("div", {
                className: "e-xlfl-matchcasediv",
                attrs: {
                    style: "display: inline-block"
                }
            }), matchCaseInput = createElement("input", {
                id: column + elementId,
                attrs: {
                    type: "checkbox"
                }
            });
            matchCaseDiv.appendChild(matchCaseInput), matchCase.appendChild(matchCaseDiv);
            var flValue = !!(predicates && predicates.length > 0) && (predicates && 2 === predicates.length ? predicates[1].matchCase : predicates[0].matchCase);
            new CheckBox({
                label: "Match Case",
                enableRtl: this.parent.enableRtl,
                checked: flValue
            }).appendTo(matchCaseInput);
        }, ExcelFilter.prototype.renderDate = function(options, column, inputValue, fValue, isRtl) {
            var format = new Internationalization().getDatePattern({
                type: "date",
                skeleton: options.format
            }, !1);
            this.datePicker = new DatePicker$1({
                format: format,
                cssClass: "e-popup-flmenu",
                placeholder: this.getLocalizedLabel("CustomFilterDatePlaceHolder"),
                width: "100%",
                enableRtl: isRtl,
                value: new Date(fValue)
            }), this.datePicker.appendTo(inputValue);
        }, ExcelFilter.prototype.completeAction = function(e) {
            e.result = function(result) {
                for (var temp = {}, res = [], i = 0; i < result.length; i++) result[i] in temp || (res.push(result[i].toString()), 
                temp[result[i]] = 1);
                return res;
            }(e.result);
        }, ExcelFilter.prototype.renderNumericTextBox = function(options, column, inputValue, fValue, isRtl) {
            this.numericTxtObj = new NumericTextBox({
                format: options.format,
                placeholder: this.getLocalizedLabel("CustomFilterPlaceHolder"),
                enableRtl: isRtl,
                value: fValue
            }), this.numericTxtObj.appendTo(inputValue);
        }, ExcelFilter.prototype.renderAutoComplete = function(options, column, inputValue, fValue, isRtl) {
            var _this = this, colObj = this.parent.getColumnByField(column), isForeignColumn = colObj.isForeignColumn(), dataSource = isForeignColumn ? colObj.dataSource : options.dataSource, fields = {
                value: isForeignColumn ? colObj.foreignKeyValue : column
            }, actObj = new AutoComplete$1({
                dataSource: dataSource instanceof DataManager ? dataSource : new DataManager(dataSource),
                fields: fields,
                sortOrder: "Ascending",
                locale: this.parent.locale,
                autofill: !0,
                focus: function() {
                    actObj.filterType = _this.dlgDiv.querySelector("#" + column + (inputValue.id === column + "-xlfl-frstvalue" ? "-xlfl-frstoptr" : "-xlfl-secndoptr")).ej2_instances[0].value, 
                    actObj.ignoreCase = "string" !== options.type || !_this.dlgDiv.querySelector("#" + column + "-xlflmtcase").ej2_instances[0].checked, 
                    actObj.filterType = isNullOrUndefined(actObj.filterType) ? "equal" : actObj.filterType;
                },
                placeholder: this.getLocalizedLabel("CustomFilterPlaceHolder"),
                enableRtl: isRtl,
                actionComplete: function(e) {
                    e.result = e.result.filter(function(obj, index, arr) {
                        return arr.map(function(mapObject) {
                            return mapObject[actObj.fields.value];
                        }).indexOf(obj[_this.actObj.fields.value]) === index;
                    });
                },
                value: fValue
            });
            actObj.appendTo(inputValue), this.actObj = actObj;
        }, ExcelFilter.prototype.getModuleName = function() {
            return "excelFilter";
        }, ExcelFilter;
    }(CheckBoxFilter), Filter = function() {
        function Filter(parent, filterSettings, serviceLocator) {
            this.predicate = "and", this.contentRefresh = !0, this.values = {}, this.nextFlMenuOpen = "", 
            this.type = {
                Menu: FilterMenuRenderer,
                CheckBox: CheckBoxFilter,
                Excel: ExcelFilter
            }, this.filterOperators = {
                contains: "contains",
                endsWith: "endswith",
                equal: "equal",
                greaterThan: "greaterthan",
                greaterThanOrEqual: "greaterthanorequal",
                lessThan: "lessthan",
                lessThanOrEqual: "lessthanorequal",
                notEqual: "notequal",
                startsWith: "startswith"
            }, this.fltrDlgDetails = {
                field: "",
                isOpen: !1
            }, this.actualPredicate = {}, this.parent = parent, this.filterSettings = filterSettings, 
            this.serviceLocator = serviceLocator, this.addEventListener();
        }
        return Filter.prototype.render = function(e) {
            if (!DataUtil.getObject("args.isFrozen", e)) {
                var gObj = this.parent;
                if (this.l10n = this.serviceLocator.getService("localization"), this.getLocalizedCustomOperators(), 
                "FilterBar" === this.parent.filterSettings.type && gObj.columns.length) {
                    var fltrElem = this.parent.element.querySelector(".e-filterbar");
                    fltrElem && remove(fltrElem);
                    var rowRenderer = new RowRenderer(this.serviceLocator, CellType.Filter, gObj), row = void 0;
                    this.serviceLocator.getService("cellRendererFactory").addCellRenderer(CellType.Filter, new FilterCellRenderer(this.parent, this.serviceLocator)), 
                    this.valueFormatter = this.serviceLocator.getService("valueFormatter"), rowRenderer.element = createElement("tr", {
                        className: "e-filterbar"
                    }), (row = this.generateRow()).data = this.values, this.parent.getHeaderContent().querySelector("thead").appendChild(rowRenderer.element), 
                    this.element = rowRenderer.render(row, gObj.getColumns(), null, null, rowRenderer.element);
                    var detail = this.element.querySelector(".e-detailheadercell");
                    detail && (detail.className = "e-filterbarcell e-mastercell");
                    var gCells = [].slice.call(this.element.querySelectorAll(".e-grouptopleftcell"));
                    gCells.length && gCells[gCells.length - 1].classList.add("e-lastgrouptopleftcell"), 
                    this.wireEvents(), this.parent.notify(freezeRender, {
                        case: "filter"
                    });
                }
            }
        }, Filter.prototype.destroy = function() {
            this.filterModule && this.filterModule.destroy(), this.filterSettings.columns = [], 
            this.updateFilterMsg(), this.removeEventListener(), this.unWireEvents(), this.element && (remove(this.element), 
            this.parent.getFrozenColumns() && remove(this.parent.getHeaderContent().querySelector(".e-filterbar")));
        }, Filter.prototype.generateRow = function(index) {
            var row = new Row$1({});
            return row.cells = this.generateCells(), row;
        }, Filter.prototype.generateCells = function() {
            var cells = [];
            if (this.parent.allowGrouping) for (var c = 0, len = this.parent.groupSettings.columns.length; c < len; c++) cells.push(this.generateCell({}, CellType.HeaderIndent));
            (this.parent.detailTemplate || this.parent.childGrid) && cells.push(this.generateCell({}, CellType.DetailHeader));
            for (var _i = 0, _a = this.parent.getColumns(); _i < _a.length; _i++) {
                var dummy = _a[_i];
                cells.push(this.generateCell(dummy));
            }
            return cells;
        }, Filter.prototype.generateCell = function(column, cellType) {
            var opt = {
                visible: column.visible,
                isDataCell: !1,
                rowId: "",
                column: column,
                cellType: cellType || CellType.Filter,
                attributes: {
                    title: this.l10n.getConstant("FilterbarTitle")
                }
            };
            return new Cell(opt);
        }, Filter.prototype.updateModel = function() {
            var col = this.parent.getColumnByField(this.fieldName), field = col.isForeignColumn() ? col.foreignKeyValue : this.fieldName;
            this.currentFilterObject = {
                field: field,
                operator: this.operator,
                value: this.value,
                predicate: this.predicate,
                matchCase: this.matchCase,
                ignoreAccent: this.ignoreAccent,
                actualFilterValue: {},
                actualOperator: {}
            };
            var index = this.getFilteredColsIndexByField(col);
            index > -1 ? this.filterSettings.columns[index] = this.currentFilterObject : this.filterSettings.columns.push(this.currentFilterObject), 
            this.filterSettings.columns = this.filterSettings.columns, this.parent.dataBind();
        }, Filter.prototype.getFilteredColsIndexByField = function(col) {
            for (var cols = this.filterSettings.columns, i = 0, len = cols.length; i < len; i++) if (cols[i].field === col.field || col.isForeignColumn() && cols[i].field === col.foreignKeyValue) return i;
            return -1;
        }, Filter.prototype.onActionComplete = function(e) {
            var args = this.isRemove ? {
                requestType: "filtering",
                type: actionComplete
            } : {
                currentFilterObject: this.currentFilterObject,
                currentFilteringColumn: this.column.field,
                columns: this.filterSettings.columns,
                requestType: "filtering",
                type: actionComplete
            };
            this.parent.trigger(actionComplete, extend(e, args)), this.isRemove = !1;
        }, Filter.prototype.wireEvents = function() {
            EventHandler.add(this.parent.getHeaderContent(), "keyup", this.keyUpHandler, this);
        }, Filter.prototype.unWireEvents = function() {
            EventHandler.remove(this.parent.getHeaderContent(), "keyup", this.keyUpHandler);
        }, Filter.prototype.enableAfterRender = function(e) {
            e.module === this.getModuleName() && e.enable && this.render();
        }, Filter.prototype.initialEnd = function() {
            if (this.parent.off(contentReady, this.initialEnd), this.parent.getColumns().length && this.filterSettings.columns.length) {
                var gObj = this.parent;
                this.contentRefresh = !1;
                for (var _i = 0, _a = gObj.filterSettings.columns; _i < _a.length; _i++) {
                    var col = _a[_i];
                    this.filterByColumn(col.field, col.operator, col.value, col.predicate, col.matchCase, col.ignoreAccent, col.actualFilterValue, col.actualOperator);
                }
                this.updateFilterMsg(), this.contentRefresh = !0;
            }
        }, Filter.prototype.addEventListener = function() {
            this.parent.isDestroyed || (this.parent.on(uiUpdate, this.enableAfterRender, this), 
            this.parent.on("filtering-complete", this.onActionComplete, this), this.parent.on(inBoundModelChanged, this.onPropertyChanged, this), 
            this.parent.on(keyPressed, this.keyUpHandler, this), this.parent.on(columnPositionChanged, this.columnPositionChanged, this), 
            this.parent.on(headerRefreshed, this.render, this), this.parent.on(contentReady, this.initialEnd, this), 
            this.parent.on("filter-menu-close", this.filterMenuClose, this), EventHandler.add(document, "click", this.clickHandler, this), 
            this.parent.on("filterOpen", this.columnMenuFilter, this), this.parent.on(click, this.filterIconClickHandler, this));
        }, Filter.prototype.removeEventListener = function() {
            EventHandler.remove(document, "click", this.clickHandler), this.parent.isDestroyed || (this.parent.off(uiUpdate, this.enableAfterRender), 
            this.parent.off("filtering-complete", this.onActionComplete), this.parent.off(inBoundModelChanged, this.onPropertyChanged), 
            this.parent.off(keyPressed, this.keyUpHandler), this.parent.off(columnPositionChanged, this.columnPositionChanged), 
            this.parent.off(headerRefreshed, this.render), this.parent.off("filterOpen", this.columnMenuFilter), 
            this.parent.off("filter-menu-close", this.filterMenuClose), this.parent.off(click, this.filterIconClickHandler));
        }, Filter.prototype.filterMenuClose = function(args) {
            this.fltrDlgDetails.isOpen = !1;
        }, Filter.prototype.filterByColumn = function(fieldName, filterOperator, filterValue, predicate, matchCase, ignoreAccent, actualFilterValue, actualOperator) {
            var filterCell, gObj = this.parent;
            if (this.column = gObj.getColumnByField(fieldName), "FilterBar" === this.filterSettings.type && (filterCell = gObj.getHeaderContent().querySelector("[id='" + this.column.field + "_filterBarcell']")), 
            isNullOrUndefined(this.column.allowFiltering) || this.column.allowFiltering) if (isActionPrevent(gObj)) gObj.notify(preventBatch, {
                instance: this,
                handler: this.filterByColumn,
                arg1: fieldName,
                arg2: filterOperator,
                arg3: filterValue,
                arg4: predicate,
                arg5: matchCase,
                arg6: ignoreAccent,
                arg7: actualFilterValue,
                arg8: actualOperator
            }); else {
                if (this.value = filterValue, this.matchCase = matchCase || !1, this.ignoreAccent = this.ignoreAccent = isNullOrUndefined(ignoreAccent) ? this.parent.filterSettings.ignoreAccent : ignoreAccent, 
                this.fieldName = fieldName, this.predicate = predicate || "and", this.operator = filterOperator, 
                filterValue = !isNullOrUndefined(filterValue) && filterValue.toString(), "number" !== this.column.type && "date" !== this.column.type || (this.matchCase = !0), 
                gObj.getColumnHeaderByField(fieldName).setAttribute("aria-filtered", "true"), filterValue.length < 1 || this.checkForSkipInput(this.column, filterValue)) return this.filterStatusMsg = filterValue.length < 1 ? "" : this.l10n.getConstant("InvalidFilterMessage"), 
                void this.updateFilterMsg();
                "FilterBar" === this.filterSettings.type && filterCell.value !== filterValue && (filterCell.value = filterValue), 
                this.checkAlreadyColFiltered(this.column.field) || (isNullOrUndefined(this.column.format) ? this.values[this.column.field] = filterValue : this.applyColumnFormat(filterValue), 
                this.updateModel());
            }
        }, Filter.prototype.applyColumnFormat = function(filterValue) {
            var getFlvalue = "date" === this.column.type || "datetime" === this.column.type ? new Date(filterValue) : parseFloat(filterValue);
            this.values[this.column.field] = this.setFormatForFlColumn(getFlvalue, this.column);
        }, Filter.prototype.onPropertyChanged = function(e) {
            if (e.module === this.getModuleName()) for (var _i = 0, _a = Object.keys(e.properties); _i < _a.length; _i++) {
                var prop = _a[_i];
                switch (prop) {
                  case "columns":
                    this.contentRefresh && (this.parent.notify(modelChanged, {
                        currentFilterObject: this.currentFilterObject,
                        currentFilteringColumn: this.column ? this.column.field : void 0,
                        columns: this.filterSettings.columns,
                        requestType: "filtering",
                        type: actionBegin
                    }), this.refreshFilterSettings(), this.updateFilterMsg());
                    break;

                  case "showFilterBarStatus":
                    e.properties[prop] ? this.updateFilterMsg() : this.parent.allowPaging && this.parent.updateExternalMessage("");
                    break;

                  case "type":
                    this.parent.refreshHeader();
                }
            }
        }, Filter.prototype.refreshFilterSettings = function() {
            if ("FilterBar" === this.filterSettings.type) for (var i = 0; i < this.filterSettings.columns.length; i++) {
                var filterValue = this.filterSettings.columns[i].value;
                if (filterValue = !isNullOrUndefined(filterValue) && filterValue.toString(), isNullOrUndefined(this.column.format)) {
                    var key = this.filterSettings.columns[i].field;
                    this.values[key] = this.filterSettings.columns[i].value;
                } else this.applyColumnFormat(filterValue);
                var selector = "[id='" + this.filterSettings.columns[i].field + "_filterBarcell']", filterElement = this.element.querySelector(selector);
                filterElement && (filterElement.value = this.filterSettings.columns[i].value);
            }
        }, Filter.prototype.clearFiltering = function() {
            var cols = getActualPropFromColl(this.filterSettings.columns);
            if (isActionPrevent(this.parent)) this.parent.notify(preventBatch, {
                instance: this,
                handler: this.clearFiltering
            }); else {
                for (var i = 0, len = cols.length; i < len; i++) this.removeFilteredColsByField(cols[i].field, !1);
                if (0 === this.parent.filterSettings.columns.length && this.parent.element.querySelector(".e-filtered")) {
                    var fltrElement = [].slice.call(this.parent.element.querySelectorAll(".e-filtered"));
                    for (i = 0, len = fltrElement.length; i < len; i++) fltrElement[0].removeAttribute("aria-filtered"), 
                    fltrElement[0].classList.remove("e-filtered");
                }
                this.isRemove = !0, this.filterStatusMsg = "", this.updateFilterMsg();
            }
        }, Filter.prototype.checkAlreadyColFiltered = function(field) {
            for (var _i = 0, columns_1 = this.filterSettings.columns; _i < columns_1.length; _i++) {
                var col = columns_1[_i];
                if (col.field === field && col.value === this.value && col.operator === this.operator && col.predicate === this.predicate) return !0;
            }
            return !1;
        }, Filter.prototype.columnMenuFilter = function(args) {
            this.column = args.col;
            var ele = closest(args.target, "#" + args.id);
            args.isClose && !ele ? this.filterModule.closeDialog() : ele && this.filterDialogOpen(this.column, args.target);
        }, Filter.prototype.filterDialogOpen = function(col, target, left, top) {
            var gObj = this.parent;
            this.filterModule && this.filterModule.closeDialog(), this.filterModule = new this.type[col.filter.type || this.parent.filterSettings.type](this.parent, gObj.filterSettings, this.serviceLocator, this.customOperators, this);
            var dataSource = col.filter.dataSource || gObj.getDataModule().dataManager;
            this.filterModule.openDialog({
                type: col.type,
                field: col.field,
                displayName: col.headerText,
                dataSource: dataSource,
                format: col.format,
                filteredColumns: gObj.filterSettings.columns,
                target: target,
                sortedColumns: gObj.sortSettings.columns,
                formatFn: col.getFormatter(),
                parserFn: col.getParser(),
                query: gObj.query,
                template: col.getFilterItemTemplate(),
                hideSearchbox: !isNullOrUndefined(col.filter.hideSearchbox) && col.filter.hideSearchbox,
                handler: this.filterHandler.bind(this),
                localizedStrings: gObj.getLocaleConstants(),
                position: {
                    X: left,
                    Y: top
                },
                column: col,
                foreignKeyValue: col.foreignKeyValue,
                actualPredicate: this.actualPredicate,
                localeObj: this.parent.localeObj
            });
        }, Filter.prototype.removeFilteredColsByField = function(field, isClearFilterBar) {
            var cols = this.filterSettings.columns;
            if (isActionPrevent(this.parent)) {
                var args = {
                    instance: this,
                    handler: this.removeFilteredColsByField,
                    arg1: field,
                    arg2: isClearFilterBar
                };
                this.parent.notify(preventBatch, args);
            } else {
                for (var i = 0, len = cols.length; i < len; i++) {
                    var column = this.parent.getColumnByField(field) || getColumnByForeignKeyValue(field, this.parent.getForeignKeyColumns());
                    if (cols[i].field === field || cols[i].field === column.foreignKeyValue) {
                        if ("FilterBar" === this.filterSettings.type && !isClearFilterBar) {
                            var selector = "[id='" + cols[i].field + "_filterBarcell']";
                            this.parent.getHeaderContent().querySelector(selector), delete this.values[field];
                        }
                        cols.splice(i, 1);
                        var fltrElement = this.parent.getColumnHeaderByField(column.field);
                        if (fltrElement.removeAttribute("aria-filtered"), "FilterBar" !== this.filterSettings.type) {
                            var iconClass = this.parent.showColumnMenu ? ".e-columnmenu" : ".e-icon-filter";
                            fltrElement.querySelector(iconClass).classList.remove("e-filtered");
                        }
                        this.isRemove = !0, this.parent.notify(modelChanged, {
                            requestType: "filtering",
                            type: actionBegin
                        });
                        break;
                    }
                }
                this.updateFilterMsg();
            }
        }, Filter.prototype.getModuleName = function() {
            return "filter";
        }, Filter.prototype.keyUpHandler = function(e) {
            var gObj = this.parent, target = e.target;
            if (target && matches(target, ".e-filterbar input")) {
                if (this.column = gObj.getColumnByField(target.id.split("_filterBarcell")[0]), !this.column) return;
                "Immediate" !== this.filterSettings.mode && 13 !== e.keyCode || 9 === e.keyCode || (this.value = target.value.trim(), 
                this.processFilter(e));
            }
        }, Filter.prototype.updateCrossIcon = function(element) {
            element.value.length && element.nextElementSibling.classList.remove("e-hide");
        }, Filter.prototype.updateFilterMsg = function() {
            if ("FilterBar" === this.filterSettings.type) {
                var gObj = this.parent, columns = this.filterSettings.columns, column = (this.serviceLocator.getService("valueFormatter"), 
                void 0);
                if (!this.filterSettings.showFilterBarStatus) return;
                if (columns.length > 0 && this.filterStatusMsg !== this.l10n.getConstant("InvalidFilterMessage")) {
                    this.filterStatusMsg = "";
                    for (var index = 0; index < columns.length; index++) if (column = gObj.getColumnByField(columns[index].field) || getColumnByForeignKeyValue(columns[index].field, this.parent.getForeignKeyColumns()), 
                    index && (this.filterStatusMsg += " && "), isNullOrUndefined(column.format)) this.filterStatusMsg += column.headerText + ": " + this.values[column.field]; else {
                        var flValue = "date" === column.type || "datetime" === column.type ? new Date(this.values[column.field]) : this.values[column.field], getFormatFlValue = this.setFormatForFlColumn(flValue, column);
                        this.filterStatusMsg += column.headerText + ": " + getFormatFlValue;
                    }
                }
                gObj.allowPaging && gObj.updateExternalMessage(this.filterStatusMsg), this.filterStatusMsg = "";
            }
        }, Filter.prototype.setFormatForFlColumn = function(value, column) {
            return this.serviceLocator.getService("valueFormatter").toView(value, column.getFormatter()).toString();
        }, Filter.prototype.checkForSkipInput = function(column, value) {
            var isSkip, skipInput;
            if ("number" === column.type) skipInput = [ "=", " ", "!" ], (DataUtil.operatorSymbols[value] || skipInput.indexOf(value) > -1) && (isSkip = !0); else if ("string" === column.type) {
                skipInput = [ ">", "<", "=", "!" ];
                for (var _i = 0, value_1 = value; _i < value_1.length; _i++) {
                    var val = value_1[_i];
                    skipInput.indexOf(val) > -1 && (isSkip = !0);
                }
            }
            return isSkip;
        }, Filter.prototype.processFilter = function(e) {
            this.stopTimer(), this.startTimer(e);
        }, Filter.prototype.startTimer = function(e) {
            var _this = this;
            this.timer = window.setInterval(function() {
                _this.onTimerTick();
            }, 13 === e.keyCode ? 0 : this.filterSettings.immediateModeDelay);
        }, Filter.prototype.stopTimer = function() {
            window.clearInterval(this.timer);
        }, Filter.prototype.onTimerTick = function() {
            var selector = "[id='" + this.column.field + "_filterBarcell']", filterElement = this.element.querySelector(selector);
            !filterElement && this.parent.getFrozenColumns() && (filterElement = this.parent.getHeaderContent().querySelector(selector));
            var filterValue;
            if (this.stopTimer(), isNullOrUndefined(this.column.filterBarTemplate)) filterValue = JSON.parse(JSON.stringify(filterElement.value)); else {
                var templateRead = this.column.filterBarTemplate.read;
                "string" == typeof templateRead && (templateRead = getValue(templateRead, window)), 
                this.value = templateRead.call(this, filterElement);
            }
            "" !== this.value ? (this.validateFilterValue(this.value), this.filterByColumn(this.column.field, this.operator, this.value, this.predicate, this.matchCase, this.ignoreAccent), 
            filterElement.value = filterValue, this.updateFilterMsg()) : this.removeFilteredColsByField(this.column.field);
        }, Filter.prototype.validateFilterValue = function(value) {
            var skipInput, index;
            this.parent;
            switch (this.matchCase = !0, this.column.type) {
              case "number":
                this.operator = this.filterOperators.equal, skipInput = [ ">", "<", "=", "!" ];
                for (var i = 0; i < value.length; i++) if (skipInput.indexOf(value[i]) > -1) {
                    index = i;
                    break;
                }
                this.getOperator(value.substring(index)), 0 !== index && (this.value = value.substring(0, index)), 
                "" !== this.value && value.length >= 1 && (this.value = this.valueFormatter.fromView(this.value, this.column.getParser(), this.column.type)), 
                isNaN(this.value) && (this.filterStatusMsg = this.l10n.getConstant("InvalidFilterMessage"));
                break;

              case "date":
              case "datetime":
                this.operator = this.filterOperators.equal, "" === this.value || this.value instanceof Date || (this.getOperator(value), 
                this.value = this.valueFormatter.fromView(this.value, this.column.getParser(), this.column.type), 
                isNullOrUndefined(this.value) && (this.filterStatusMsg = this.l10n.getConstant("InvalidFilterMessage")));
                break;

              case "string":
                this.matchCase = !1, "*" === value.charAt(0) ? (this.value = this.value.slice(1), 
                this.operator = this.filterOperators.startsWith) : "%" === value.charAt(value.length - 1) ? (this.value = this.value.slice(0, -1), 
                this.operator = this.filterOperators.startsWith) : "%" === value.charAt(0) ? (this.value = this.value.slice(1), 
                this.operator = this.filterOperators.endsWith) : this.operator = this.filterOperators.startsWith;
                break;

              case "boolean":
                "true" === value.toLowerCase() || "1" === value ? this.value = !0 : "false" === value.toLowerCase() || "0" === value ? this.value = !1 : value.length && (this.filterStatusMsg = this.l10n.getConstant("InvalidFilterMessage")), 
                this.operator = this.filterOperators.equal;
                break;

              default:
                this.operator = this.filterOperators.equal;
            }
        }, Filter.prototype.getOperator = function(value) {
            var singleOp = value.charAt(0), multipleOp = value.slice(0, 2), operators = extend({
                "=": this.filterOperators.equal,
                "!": this.filterOperators.notEqual
            }, DataUtil.operatorSymbols);
            (operators.hasOwnProperty(singleOp) || operators.hasOwnProperty(multipleOp)) && (this.operator = operators[singleOp], 
            this.value = value.substring(1), this.operator || (this.operator = operators[multipleOp], 
            this.value = value.substring(2))), this.operator !== this.filterOperators.lessThan && this.operator !== this.filterOperators.greaterThan || "=" === this.value.charAt(0) && (this.operator = this.operator + "orequal", 
            this.value = this.value.substring(1));
        }, Filter.prototype.columnPositionChanged = function(e) {
            this.parent.filterSettings.type;
        }, Filter.prototype.getLocalizedCustomOperators = function() {
            var numOptr = [ {
                value: "equal",
                text: this.l10n.getConstant("Equal")
            }, {
                value: "greaterthan",
                text: this.l10n.getConstant("GreaterThan")
            }, {
                value: "greaterthanorequal",
                text: this.l10n.getConstant("GreaterThanOrEqual")
            }, {
                value: "lessthan",
                text: this.l10n.getConstant("LessThan")
            }, {
                value: "lessthanorequal",
                text: this.l10n.getConstant("LessThanOrEqual")
            }, {
                value: "notequal",
                text: this.l10n.getConstant("NotEqual")
            } ];
            this.customOperators = {
                stringOperator: [ {
                    value: "startswith",
                    text: this.l10n.getConstant("StartsWith")
                }, {
                    value: "endswith",
                    text: this.l10n.getConstant("EndsWith")
                }, {
                    value: "contains",
                    text: this.l10n.getConstant("Contains")
                }, {
                    value: "equal",
                    text: this.l10n.getConstant("Equal")
                }, {
                    value: "notequal",
                    text: this.l10n.getConstant("NotEqual")
                } ],
                numberOperator: numOptr,
                dateOperator: numOptr,
                datetimeOperator: numOptr,
                booleanOperator: [ {
                    value: "equal",
                    text: this.l10n.getConstant("Equal")
                }, {
                    value: "notequal",
                    text: this.l10n.getConstant("NotEqual")
                } ]
            };
        }, Filter.prototype.filterIconClickHandler = function(e) {
            var target = e.target;
            if (target.classList.contains("e-filtermenudiv") && ("Menu" === this.parent.filterSettings.type || "CheckBox" === this.parent.filterSettings.type || "Excel" === this.parent.filterSettings.type)) {
                var gObj = this.parent, col = gObj.getColumnByUid(parentsUntil(target, "e-headercell").firstElementChild.getAttribute("e-mappinguid")), gClient = gObj.element.getBoundingClientRect(), fClient = target.getBoundingClientRect();
                if (this.column = col, this.fltrDlgDetails.field === col.field && this.fltrDlgDetails.isOpen) return;
                this.filterModule && this.filterModule.closeDialog(), this.fltrDlgDetails = {
                    field: col.field,
                    isOpen: !0
                }, this.filterDialogOpen(this.column, target, fClient.right - gClient.left, fClient.bottom - gClient.top);
            }
        }, Filter.prototype.clickHandler = function(e) {
            if ("Immediate" === this.filterSettings.mode || "Menu" === this.parent.filterSettings.type || "CheckBox" === this.parent.filterSettings.type || "Excel" === this.parent.filterSettings.type) {
                this.parent;
                var target = e.target, datepickerEle = target.classList.contains("e-day");
                if (parentsUntil(target, "e-filter-popup") || target.classList.contains("e-filtermenudiv")) return;
                if (!this.filterModule || parentsUntil(target, "e-popup-wrapper") || closest(target, ".e-filter-item.e-menu-item") || parentsUntil(target, "e-popup") || datepickerEle || this.filterModule.closeDialog(target), 
                "Immediate" === this.filterSettings.mode && target.classList.contains("e-clear-icon")) {
                    var targetText = target.previousElementSibling;
                    this.removeFilteredColsByField(targetText.id.slice(0, -14));
                }
            }
        }, Filter.prototype.filterHandler = function(args) {
            var filterIconElement;
            this.actualPredicate[args.field] = args.actualPredicate;
            for (var dataManager = new DataManager(this.filterSettings.columns), query = new Query().where("field", this.filterOperators.equal, args.field), result = dataManager.executeLocal(query), i = 0; i < result.length; i++) {
                for (var index = -1, j = 0; j < this.filterSettings.columns.length; j++) if (result[i].field === this.filterSettings.columns[j].field) {
                    index = j;
                    break;
                }
                -1 !== index && this.filterSettings.columns.splice(index, 1);
            }
            var iconClass = this.parent.showColumnMenu ? ".e-columnmenu" : ".e-icon-filter";
            filterIconElement = this.parent.getColumnHeaderByField(args.field).querySelector(iconClass), 
            "filtering" === args.action ? (this.filterSettings.columns = this.filterSettings.columns.concat(args.filterCollection), 
            this.filterSettings.columns.length && filterIconElement && filterIconElement.classList.add("e-filtered")) : (filterIconElement && filterIconElement.classList.remove("e-filtered"), 
            this.parent.refresh()), this.parent.dataBind();
        }, Filter;
    }(), resizeClassList_root = "e-rhandler", resizeClassList_suppress = "e-rsuppress", resizeClassList_icon = "e-ricon", resizeClassList_helper = "e-rhelper", resizeClassList_header = "th.e-headercell", resizeClassList_cursor = "e-rcursor", Resize = function() {
        function Resize(parent) {
            this.tapped = !1, this.isDblClk = !0, this.parent = parent, this.parent.isDestroyed || (this.widthService = new ColumnWidthService(parent), 
            this.addEventListener());
        }
        return Resize.prototype.autoFitColumns = function(fName) {
            var columnName = void 0 === fName || null === fName || fName.length <= 0 ? this.parent.getColumns().map(function(x) {
                return x.field;
            }) : "string" == typeof fName ? [ fName ] : fName;
            this.findColumn(columnName);
        }, Resize.prototype.resizeColumn = function(fName, index, id) {
            var headerTable, contentTable, headerTextClone, contentTextClone, gObj = this.parent, tWidth = 0, indentWidth = 0, uid = id || this.parent.getUidByColumnField(fName), columnIndex = this.parent.getNormalizedColumnIndex(uid), frzCols = gObj.getFrozenColumns();
            frzCols ? index < frzCols ? (headerTable = gObj.getHeaderTable(), contentTable = gObj.getContentTable(), 
            headerTextClone = headerTable.querySelectorAll("th")[columnIndex].cloneNode(!0), 
            contentTextClone = contentTable.querySelectorAll("td:nth-child(" + (columnIndex + 1) + ")")) : (headerTable = gObj.getHeaderContent().querySelector(".e-movableheader").children[0], 
            contentTable = gObj.getContent().querySelector(".e-movablecontent").children[0], 
            headerTextClone = headerTable.querySelectorAll("th")[columnIndex - frzCols].cloneNode(!0), 
            contentTextClone = contentTable.querySelectorAll("td:nth-child(" + (columnIndex - frzCols + 1) + ")")) : (headerTable = gObj.getHeaderTable(), 
            contentTable = gObj.getContentTable(), headerTextClone = headerTable.querySelectorAll("th")[columnIndex].cloneNode(!0), 
            contentTextClone = contentTable.querySelectorAll("td:nth-child(" + (columnIndex + 1) + "):not(.e-groupcaption)"));
            var indentWidthClone = headerTable.querySelector("tr").querySelectorAll(".e-grouptopleftcell");
            if (indentWidthClone.length > 0) for (var i = 0; i < indentWidthClone.length; i++) indentWidth += indentWidthClone[i].offsetWidth;
            var headerText = [ headerTextClone ], contentText = [];
            for (i = 0; i < contentTextClone.length; i++) contentText[i] = contentTextClone[i].cloneNode(!0);
            var wHeader = this.createTable(headerTable, headerText, "e-gridheader"), wContent = this.createTable(contentTable, contentText, "e-gridcontent"), columnbyindex = gObj.getColumns()[index];
            columnbyindex.width = formatUnit(wHeader > wContent ? wHeader : wContent);
            this.widthService.setColumnWidth(gObj.getColumns()[index]), !1 === gObj.getColumns().some(function(x) {
                return null === x.width || void 0 === x.width || x.width.length <= 0;
            }) && gObj.getColumns().forEach(function(element) {
                element.visible && (tWidth += parseInt(element.width, 10));
            });
            var calcTableWidth = tWidth + indentWidth;
            tWidth > 0 && !gObj.getFrozenColumns() && (headerTable.style.width = formatUnit(calcTableWidth), 
            contentTable.style.width = formatUnit(calcTableWidth));
            var tableWidth = headerTable.offsetWidth;
            gObj.getContent().scrollWidth > tableWidth ? (headerTable.classList.add("e-tableborder"), 
            contentTable.classList.add("e-tableborder")) : (headerTable.classList.remove("e-tableborder"), 
            contentTable.classList.remove("e-tableborder"));
        }, Resize.prototype.destroy = function() {
            this.widthService = null, this.unwireEvents(), this.removeEventListener();
        }, Resize.prototype.getModuleName = function() {
            return "resize";
        }, Resize.prototype.findColumn = function(fName) {
            var _this = this;
            fName.forEach(function(element) {
                var fieldName = element, columnIndex = _this.parent.getColumnIndexByField(fieldName);
                !0 === _this.parent.getColumns()[columnIndex].visible && _this.resizeColumn(fieldName, columnIndex);
            });
        }, Resize.prototype.createTable = function(table, text, tag) {
            var myTableDiv = createElement("div");
            myTableDiv.className = this.parent.element.className, myTableDiv.style.cssText = "display: inline-block;visibility:hidden;position:absolute";
            var mySubDiv = createElement("div");
            mySubDiv.className = tag;
            var myTable = createElement("table");
            myTable.className = table.className, myTable.style.cssText = "table-layout: auto;width: auto";
            var myTr = createElement("tr");
            text.forEach(function(element) {
                var tr = myTr.cloneNode();
                tr.className = table.querySelector("tr").className, tr.appendChild(element), myTable.appendChild(tr);
            }), mySubDiv.appendChild(myTable), myTableDiv.appendChild(mySubDiv), document.body.appendChild(myTableDiv);
            var offsetWidthValue = myTable.getBoundingClientRect().width;
            return document.body.removeChild(myTableDiv), Math.ceil(offsetWidthValue);
        }, Resize.prototype.addEventListener = function() {
            this.parent.isDestroyed || this.parent.on(headerRefreshed, this.render, this);
        }, Resize.prototype.removeEventListener = function() {
            this.parent.isDestroyed || this.parent.off(headerRefreshed, this.render);
        }, Resize.prototype.render = function() {
            this.unwireEvents(), this.wireEvents(), this.setHandlerHeight();
        }, Resize.prototype.wireEvents = function() {
            var _this = this;
            this.getResizeHandlers().forEach(function(ele) {
                ele.style.height = ele.parentElement.offsetHeight + "px", EventHandler.add(ele, Browser.touchStartEvent, _this.resizeStart, _this), 
                EventHandler.add(ele, "dblclick", _this.callAutoFit, _this);
            });
        }, Resize.prototype.unwireEvents = function() {
            var _this = this;
            this.getResizeHandlers().forEach(function(ele) {
                EventHandler.remove(ele, Browser.touchStartEvent, _this.resizeStart), EventHandler.remove(ele, "dblclick", _this.callAutoFit);
            });
        }, Resize.prototype.getResizeHandlers = function() {
            return this.parent.getFrozenColumns() ? [].slice.call(this.parent.getHeaderContent().querySelectorAll("." + resizeClassList_root)) : [].slice.call(this.parent.getHeaderTable().querySelectorAll("." + resizeClassList_root));
        }, Resize.prototype.setHandlerHeight = function() {
            [].slice.call(this.parent.getHeaderTable().querySelectorAll("." + resizeClassList_suppress)).forEach(function(ele) {
                ele.style.height = ele.parentElement.offsetHeight + "px";
            });
        }, Resize.prototype.callAutoFit = function(e) {
            var col = this.getTargetColumn(e);
            this.resizeColumn(col.field, this.parent.getNormalizedColumnIndex(col.uid), col.uid);
            closest(e.target, resizeClassList_header).classList.add("e-resized");
        }, Resize.prototype.resizeStart = function(e) {
            if (!this.helper) {
                if (0 === this.getScrollBarWidth()) {
                    for (var _i = 0, _a = this.refreshColumnWidth(); _i < _a.length; _i++) {
                        var col = _a[_i];
                        this.widthService.setColumnWidth(col);
                    }
                    this.widthService.setWidthToTable();
                }
                this.element = e.target, this.parentElementWidth = this.parent.element.getBoundingClientRect().width, 
                this.appendHelper(), this.column = this.getTargetColumn(e), this.pageX = this.getPointX(e), 
                this.parent.enableRtl ? this.minMove = parseInt(this.column.width.toString(), 10) - (this.column.minWidth ? parseInt(this.column.minWidth.toString(), 10) : 0) : this.minMove = (this.column.minWidth ? parseInt(this.column.minWidth.toString(), 10) : 0) - parseInt(this.column.width.toString(), 10), 
                this.minMove += this.pageX;
            }
            if (Browser.isDevice && !this.helper.classList.contains(resizeClassList_icon)) this.helper.classList.add(resizeClassList_icon), 
            EventHandler.add(document, Browser.touchStartEvent, this.removeHelper, this), EventHandler.add(this.helper, Browser.touchStartEvent, this.resizeStart, this); else {
                var args = {
                    e: e,
                    column: this.column
                };
                if (this.parent.trigger("resizeStart", args), args.cancel) return void this.cancelResizeAction();
                EventHandler.add(document, Browser.touchEndEvent, this.resizeEnd, this), EventHandler.add(this.parent.element, Browser.touchMoveEvent, this.resizing, this), 
                this.updateCursor("add");
            }
        }, Resize.prototype.cancelResizeAction = function(removeEvents) {
            removeEvents && (EventHandler.remove(this.parent.element, Browser.touchMoveEvent, this.resizing), 
            EventHandler.remove(document, Browser.touchEndEvent, this.resizeEnd), this.updateCursor("remove")), 
            Browser.isDevice && (EventHandler.remove(document, Browser.touchStartEvent, this.removeHelper), 
            EventHandler.remove(this.helper, Browser.touchStartEvent, this.resizeStart)), detach(this.helper), 
            this.refresh();
        }, Resize.prototype.getWidth = function(width, minWidth, maxWidth) {
            return minWidth && width < minWidth ? minWidth : maxWidth && width > maxWidth ? maxWidth : width;
        }, Resize.prototype.resizing = function(e) {
            this.parent.allowTextWrap && (this.parent.getFrozenColumns() && this.parent.notify(freezeRender, {
                case: "textwrap"
            }), this.element.style.height = this.element.parentElement.offsetHeight + "px", 
            this.setHelperHeight());
            var pageX = this.getPointX(e), mousemove = this.parent.enableRtl ? -(pageX - this.pageX) : pageX - this.pageX, colData = {
                width: parseInt(this.widthService.getWidth(this.column).toString(), 10) + mousemove,
                minWidth: this.column.minWidth ? parseInt(this.column.minWidth.toString(), 10) : null,
                maxWidth: this.column.maxWidth ? parseInt(this.column.maxWidth.toString(), 10) : null
            }, width = this.getWidth(colData.width, colData.minWidth, colData.maxWidth);
            if ((!this.parent.enableRtl && this.minMove >= pageX || this.parent.enableRtl && this.minMove <= pageX) && (width = this.column.minWidth ? parseInt(this.column.minWidth.toString(), 10) : 0, 
            this.pageX = pageX = this.minMove), width !== parseInt(this.column.width.toString(), 10)) {
                this.pageX = pageX, this.column.width = formatUnit(width);
                var args = {
                    e: e,
                    column: this.column
                };
                if (this.parent.trigger("resizing", args), args.cancel) return void this.cancelResizeAction(!0);
                this.widthService.setColumnWidth(this.column, null, "resize"), this.updateHelper();
            }
            this.isDblClk = !1;
        }, Resize.prototype.resizeEnd = function(e) {
            if (this.helper && !this.parent.isDestroyed) {
                EventHandler.remove(this.parent.element, Browser.touchMoveEvent, this.resizing), 
                EventHandler.remove(document, Browser.touchEndEvent, this.resizeEnd), this.updateCursor("remove"), 
                detach(this.helper);
                var args = {
                    e: e,
                    column: this.column
                };
                this.parent.trigger("resizeStop", args), closest(this.element, ".e-headercell").classList.add("e-resized"), 
                this.refresh(), this.doubleTapEvent(e), this.isDblClk = !0;
            }
        }, Resize.prototype.getPointX = function(e) {
            return e.touches && e.touches.length ? e.touches[0].pageX : e.pageX;
        }, Resize.prototype.refreshColumnWidth = function() {
            for (var columns = this.parent.getColumns(), _i = 0, _a = [].slice.apply(this.parent.getHeaderTable().querySelectorAll("th.e-headercell")); _i < _a.length; _i++) for (var ele = _a[_i], _b = 0, columns_1 = columns; _b < columns_1.length; _b++) {
                var column = columns_1[_b];
                if (ele.querySelector("[e-mappinguid]") && ele.querySelector("[e-mappinguid]").getAttribute("e-mappinguid") === column.uid && column.visible) {
                    column.width = ele.getBoundingClientRect().width;
                    break;
                }
            }
            return columns;
        }, Resize.prototype.getTargetColumn = function(e) {
            var uid = closest(e.target, resizeClassList_header).querySelector(".e-headercelldiv").getAttribute("e-mappinguid");
            return this.parent.getColumnByUid(uid);
        }, Resize.prototype.updateCursor = function(action) {
            var headerRows = [].slice.call(this.parent.getHeaderContent().querySelectorAll("th"));
            headerRows.push(this.parent.element);
            for (var _i = 0, headerRows_1 = headerRows; _i < headerRows_1.length; _i++) {
                headerRows_1[_i].classList[action](resizeClassList_cursor);
            }
        }, Resize.prototype.refresh = function() {
            this.column = null, this.pageX = null, this.element = null, this.helper = null;
        }, Resize.prototype.appendHelper = function() {
            this.helper = createElement("div", {
                className: resizeClassList_helper
            }), this.parent.element.appendChild(this.helper), this.setHelperHeight();
        }, Resize.prototype.setHelperHeight = function() {
            var height = this.parent.getContent().offsetHeight - this.getScrollBarWidth(), rect = closest(this.element, resizeClassList_header), tr = [].slice.call(this.parent.getHeaderContent().querySelectorAll("tr")), frzCols = this.parent.getFrozenColumns();
            frzCols && (rect.parentElement.children.length !== frzCols ? tr.splice(0, tr.length / 2) : tr.splice(tr.length / 2, tr.length / 2));
            for (var i = tr.indexOf(rect.parentElement); i < tr.length; i++) height += tr[i].offsetHeight;
            var pos = this.calcPos(rect);
            pos.left += this.parent.enableRtl ? -1 : rect.offsetWidth - 2, this.helper.style.cssText = "height: " + height + "px; top: " + pos.top + "px; left:" + Math.floor(pos.left) + "px;";
        }, Resize.prototype.getScrollBarWidth = function(height) {
            var ele = this.parent.getFrozenColumns() ? this.parent.getContent().querySelector(".e-movablecontent") : this.parent.getContent().firstChild;
            return ele.scrollHeight > ele.clientHeight && height || ele.scrollWidth > ele.clientWidth ? getScrollBarWidth() : 0;
        }, Resize.prototype.removeHelper = function(e) {
            var cls = e.target.classList;
            cls.contains(resizeClassList_root) || cls.contains(resizeClassList_icon) || !this.helper || (EventHandler.remove(document, Browser.touchStartEvent, this.removeHelper), 
            EventHandler.remove(this.helper, Browser.touchStartEvent, this.resizeStart), detach(this.helper), 
            this.refresh());
        }, Resize.prototype.updateHelper = function() {
            var rect = closest(this.element, resizeClassList_header), left = Math.floor(this.calcPos(rect).left + (this.parent.enableRtl ? -1 : rect.offsetWidth - 2));
            if (left > this.parentElementWidth && (left = this.parentElementWidth - 2), this.parent.getFrozenColumns()) {
                var fLeft = closest(rect, ".e-table").offsetLeft;
                left < fLeft && (left = fLeft);
            }
            this.helper.style.left = left + "px";
        }, Resize.prototype.calcPos = function(elem) {
            for (var parentOffset = {
                top: 0,
                left: 0
            }, offset = elem.getBoundingClientRect(), doc = elem.ownerDocument, offsetParent = elem.offsetParent || doc.documentElement; offsetParent && (offsetParent === doc.body || offsetParent === doc.documentElement) && "static" === offsetParent.style.position; ) offsetParent = offsetParent.parentNode;
            return offsetParent && offsetParent !== elem && 1 === offsetParent.nodeType && (parentOffset = offsetParent.getBoundingClientRect()), 
            {
                top: offset.top - parentOffset.top,
                left: offset.left - parentOffset.left
            };
        }, Resize.prototype.doubleTapEvent = function(e) {
            this.getUserAgent() && this.isDblClk && (this.tapped ? (clearTimeout(this.tapped), 
            this.callAutoFit(e), this.tapped = null) : this.tapped = setTimeout(this.timeoutHandler(), 300));
        }, Resize.prototype.getUserAgent = function() {
            var userAgent = Browser.userAgent.toLowerCase();
            return /iphone|ipod|ipad/.test(userAgent);
        }, Resize.prototype.timeoutHandler = function() {
            this.tapped = null;
        }, Resize;
    }(), Reorder = function() {
        function Reorder(parent) {
            this.parent = parent, this.parent.isDestroyed || (this.parent.on(headerDrop, this.headerDrop, this), 
            this.parent.on(uiUpdate, this.enableAfterRender, this), this.parent.on(reorderComplete, this.onActionComplete, this), 
            this.parent.on(columnDrag, this.drag, this), this.parent.on(columnDragStart, this.dragStart, this), 
            this.parent.on(columnDragStop, this.dragStop, this), this.parent.on(headerDrop, this.headerDrop, this), 
            this.parent.on(headerRefreshed, this.createReorderElement, this));
        }
        return Reorder.prototype.chkDropPosition = function(srcElem, destElem) {
            return (srcElem.parentElement.isEqualNode(destElem.parentElement) || this.parent.getFrozenColumns() && Array.prototype.indexOf.call(closest(srcElem, "thead").children, srcElem.parentElement) === Array.prototype.indexOf.call(closest(destElem, "thead").children, destElem.parentElement)) && this.targetParentContainerIndex(srcElem, destElem) > -1;
        }, Reorder.prototype.chkDropAllCols = function(srcElem, destElem) {
            for (var isFound, headers = this.getHeaderCells(); !isFound && headers.length > 0; ) isFound = srcElem !== headers.pop() && this.targetParentContainerIndex(srcElem, destElem) > -1;
            return isFound;
        }, Reorder.prototype.findColParent = function(col, cols, parent) {
            parent = parent;
            for (var i = 0, len = cols.length; i < len; i++) {
                if (col === cols[i]) return !0;
                if (cols[i].columns) {
                    var cnt = parent.length;
                    if (parent.push(cols[i]), this.findColParent(col, cols[i].columns, parent)) return !0;
                    parent.splice(cnt, parent.length - cnt);
                }
            }
            return !1;
        }, Reorder.prototype.getColumnsModel = function(cols) {
            for (var columnModel = [], subCols = [], i = 0, len = cols.length; i < len; i++) columnModel.push(cols[i]), 
            cols[i].columns && (subCols = subCols.concat(cols[i].columns));
            return subCols.length && (columnModel = columnModel.concat(this.getColumnsModel(subCols))), 
            columnModel;
        }, Reorder.prototype.headerDrop = function(e) {
            this.parent;
            if (closest(e.target, "th")) {
                var destElem = closest(e.target, ".e-headercell");
                if (destElem && this.chkDropPosition(this.element, destElem) && this.chkDropAllCols(this.element, destElem)) if (this.parent.enableColumnVirtualization) {
                    var columns = this.parent.columns, sourceUid_1 = this.element.querySelector(".e-headercelldiv").getAttribute("e-mappinguid"), colMatchIndex_1 = null, column = this.parent.getColumns(!0).filter(function(col) {
                        return col.uid === sourceUid_1;
                    })[0], destUid_1 = destElem.querySelector(".e-headercelldiv").getAttribute("e-mappinguid");
                    columns.some(function(col, index) {
                        return col.uid === destUid_1 && (colMatchIndex_1 = index, col.uid === destUid_1);
                    });
                    isNullOrUndefined(colMatchIndex_1) || this.moveColumns(colMatchIndex_1, column);
                } else {
                    var headers = this.getHeaderCells(), oldIdx = getElementIndex(this.element, headers), newIndex = (column = (columns = this.getColumnsModel(this.parent.columns))[oldIdx], 
                    this.targetParentContainerIndex(this.element, destElem));
                    this.moveColumns(newIndex, column);
                }
            }
        }, Reorder.prototype.isActionPrevent = function(gObj) {
            return isActionPrevent(gObj);
        }, Reorder.prototype.moveColumns = function(destIndex, column) {
            var gObj = this.parent;
            if (this.isActionPrevent(gObj)) gObj.notify(preventBatch, {
                instance: this,
                handler: this.moveColumns,
                arg1: destIndex,
                arg2: column
            }); else {
                var parent = this.getColParent(column, this.parent.columns), cols = parent ? parent.columns : this.parent.columns, srcIdx = inArray(column, cols);
                gObj.allowReordering && srcIdx !== destIndex && -1 !== srcIdx && -1 !== destIndex && (cols.splice(destIndex, 0, cols.splice(srcIdx, 1)[0]), 
                gObj.getColumns(!0), gObj.notify(columnPositionChanged, {
                    fromIndex: destIndex,
                    toIndex: srcIdx
                }), gObj.notify(modelChanged, {
                    type: actionBegin,
                    requestType: "reorder"
                }));
            }
        }, Reorder.prototype.targetParentContainerIndex = function(srcElem, destElem) {
            var headers = this.getHeaderCells(), cols = this.parent.columns, flatColumns = this.getColumnsModel(cols), parent = this.getColParent(flatColumns[getElementIndex(srcElem, headers)], cols);
            return cols = parent ? parent.columns : cols, inArray(flatColumns[getElementIndex(destElem, headers)], cols);
        }, Reorder.prototype.getHeaderCells = function() {
            if (this.parent.getFrozenColumns()) {
                for (var fTh = void 0, mTh = void 0, fHeaders = [], fRows = [].slice.call(this.parent.getHeaderTable().querySelectorAll(".e-columnheader")), mRows = [].slice.call(this.parent.getHeaderContent().querySelector(".e-movableheader").querySelectorAll(".e-columnheader")), i = 0; i < fRows.length; i++) {
                    fTh = [].slice.call(fRows[i].getElementsByClassName("e-headercell")), mTh = [].slice.call(mRows[i].getElementsByClassName("e-headercell")), 
                    fHeaders = fHeaders.concat(fTh);
                    for (var j = 0; j < mTh.length; j++) fTh.length && 0 === j && fTh[fTh.length - 1].innerText === mTh[0].innerText || fHeaders.push(mTh[j]);
                }
                return fHeaders;
            }
            return [].slice.call(this.parent.element.getElementsByClassName("e-headercell"));
        }, Reorder.prototype.getColParent = function(column, columns) {
            var parents$$1 = [];
            return this.findColParent(column, columns, parents$$1), parents$$1[parents$$1.length - 1];
        }, Reorder.prototype.reorderColumns = function(fromFName, toFName) {
            var column = this.parent.getColumnByField(toFName), parent = this.getColParent(column, this.parent.columns), destIndex = inArray(column, parent ? parent.columns : this.parent.columns);
            destIndex > -1 && this.moveColumns(destIndex, this.parent.getColumnByField(fromFName));
        }, Reorder.prototype.enableAfterRender = function(e) {
            e.module === this.getModuleName() && e.enable && this.createReorderElement();
        }, Reorder.prototype.createReorderElement = function() {
            var header = this.parent.element.querySelector(".e-headercontent");
            this.upArrow = header.appendChild(createElement("div", {
                className: "e-icons e-icon-reorderuparrow e-reorderuparrow",
                attrs: {
                    style: "display:none"
                }
            })), this.downArrow = header.appendChild(createElement("div", {
                className: "e-icons e-icon-reorderdownarrow e-reorderdownarrow",
                attrs: {
                    style: "display:none"
                }
            }));
        }, Reorder.prototype.onActionComplete = function(e) {
            this.parent.trigger(actionComplete, extend(e, {
                type: actionComplete
            }));
        }, Reorder.prototype.destroy = function() {
            this.parent.isDestroyed || (remove(this.upArrow), remove(this.downArrow), this.parent.off(headerDrop, this.headerDrop), 
            this.parent.off(uiUpdate, this.enableAfterRender), this.parent.off(reorderComplete, this.onActionComplete), 
            this.parent.off(columnDrag, this.drag), this.parent.off(columnDragStart, this.dragStart), 
            this.parent.off(columnDragStop, this.dragStop), this.parent.off(headerRefreshed, this.createReorderElement));
        }, Reorder.prototype.drag = function(e) {
            var gObj = this.parent, target = e.target, closest$$1 = closest(target, ".e-headercell:not(.e-stackedHeaderCell)"), cloneElement = gObj.element.querySelector(".e-cloneproperties"), isLeft = this.x > getPosition(e.event).x + gObj.getContent().firstElementChild.scrollLeft;
            removeClass(gObj.getHeaderTable().querySelectorAll(".e-reorderindicate"), [ "e-reorderindicate" ]), 
            this.setDisplay("none"), this.stopTimer(), classList(cloneElement, [ "e-defaultcur" ], [ "e-notallowedcur" ]), 
            this.updateScrollPostion(e.event), closest$$1 && !closest$$1.isEqualNode(this.element) && (target = closest$$1, 
            this.chkDropPosition(this.element, target) && this.chkDropAllCols(this.element, target) ? (this.updateArrowPosition(target, isLeft), 
            classList(target, [ "e-allowDrop", "e-reorderindicate" ], [])) : gObj.allowGrouping && parentsUntil(e.target, "e-groupdroparea") || classList(cloneElement, [ "e-notallowedcur" ], [ "e-defaultcur" ])), 
            gObj.trigger(columnDrag, {
                target: target,
                draggableType: "headercell",
                column: e.column
            });
        }, Reorder.prototype.updateScrollPostion = function(e) {
            var _this = this, frzCols = this.parent.getFrozenColumns(), x = getPosition(e).x, cliRect = this.parent.element.getBoundingClientRect(), cliRectBaseLeft = frzCols ? this.parent.element.querySelector(".e-movableheader").getBoundingClientRect().left : cliRect.left, cliRectBaseRight = cliRect.right, scrollElem = frzCols ? this.parent.getContent().querySelector(".e-movablecontent") : this.parent.getContent().firstElementChild;
            x > cliRectBaseLeft && x < cliRectBaseLeft + 35 ? this.timer = window.setInterval(function() {
                _this.setScrollLeft(scrollElem, !0);
            }, 50) : x < cliRectBaseRight && x > cliRectBaseRight - 35 && (this.timer = window.setInterval(function() {
                _this.setScrollLeft(scrollElem, !1);
            }, 50));
        }, Reorder.prototype.setScrollLeft = function(scrollElem, isLeft) {
            var scrollLeft = scrollElem.scrollLeft;
            scrollElem.scrollLeft = scrollElem.scrollLeft + (isLeft ? -5 : 5), scrollLeft !== scrollElem.scrollLeft && this.setDisplay("none");
        }, Reorder.prototype.stopTimer = function() {
            window.clearInterval(this.timer);
        }, Reorder.prototype.updateArrowPosition = function(target, isLeft) {
            var cliRect = target.getBoundingClientRect(), cliRectBase = this.parent.element.getBoundingClientRect();
            isLeft && cliRect.left < cliRectBase.left || !isLeft && cliRect.right > cliRectBase.right || (this.upArrow.style.top = cliRect.top + cliRect.height - cliRectBase.top + "px", 
            this.downArrow.style.top = cliRect.top - cliRectBase.top - 4 + "px", this.upArrow.style.left = this.downArrow.style.left = (isLeft ? cliRect.left : cliRect.right) - cliRectBase.left - 4 + "px", 
            this.setDisplay(""));
        }, Reorder.prototype.dragStart = function(e) {
            var gObj = this.parent, target = e.target;
            this.element = target.classList.contains("e-headercell") ? target : parentsUntil(target, "e-headercell"), 
            this.x = getPosition(e.event).x + gObj.getContent().firstElementChild.scrollLeft, 
            gObj.trigger(columnDragStart, {
                target: target,
                draggableType: "headercell",
                column: e.column
            });
        }, Reorder.prototype.dragStop = function(e) {
            var gObj = this.parent;
            this.setDisplay("none"), this.stopTimer(), e.cancel || gObj.trigger(columnDrop, {
                target: e.target,
                draggableType: "headercell",
                column: e.column
            }), removeClass(gObj.getHeaderTable().querySelectorAll(".e-reorderindicate"), [ "e-reorderindicate" ]);
        }, Reorder.prototype.setDisplay = function(display) {
            this.upArrow.style.display = display, this.downArrow.style.display = display;
        }, Reorder.prototype.getModuleName = function() {
            return "reorder";
        }, Reorder;
    }(), RowDD = function() {
        function RowDD(parent) {
            var _this = this;
            this.selectedRows = [], this.helper = function(e) {
                var gObj = _this.parent;
                if (document.getElementsByClassName("e-griddragarea").length || !e.sender.target.classList.contains("e-selectionbackground") && "Single" !== gObj.selectionSettings.type) return !1;
                var visualElement = createElement("div", {
                    className: "e-cloneproperties e-draganddrop e-grid e-dragclone",
                    styles: 'height:"auto", z-index:2, width:' + gObj.element.offsetWidth
                }), table = createElement("table", {
                    styles: "width:" + gObj.element.offsetWidth
                }), tbody = createElement("tbody");
                if ("Row" === gObj.selectionSettings.mode && "Single" === gObj.selectionSettings.type) {
                    var index = parseInt(e.sender.target.parentElement.getAttribute("aria-rowindex"), 10);
                    gObj.selectRow(index);
                }
                for (var selectedRows = gObj.getSelectedRows(), i = 0, len = selectedRows.length; i < len; i++) {
                    var selectedRow = selectedRows[i].cloneNode(!0);
                    removeElement(selectedRow, ".e-indentcell"), removeElement(selectedRow, ".e-detailrowcollapse"), 
                    removeElement(selectedRow, ".e-detailrowexpand"), tbody.appendChild(selectedRow);
                }
                return table.appendChild(tbody), visualElement.appendChild(table), gObj.element.appendChild(visualElement), 
                visualElement;
            }, this.dragStart = function(e) {
                var gObj = _this.parent;
                if (!document.getElementsByClassName("e-griddragarea").length) {
                    gObj.trigger(rowDragStart, {
                        rows: gObj.getSelectedRows(),
                        target: e.target,
                        draggableType: "rows",
                        data: gObj.getSelectedRecords()
                    });
                    var dropElem = document.getElementById(gObj.rowDropSettings.targetID);
                    gObj.rowDropSettings.targetID && dropElem && dropElem.ej2_instances && dropElem.ej2_instances[0].getContent().classList.add("e-allowRowDrop"), 
                    _this.isDragStop = !1;
                }
            }, this.drag = function(e) {
                var gObj = _this.parent, cloneElement = _this.parent.element.querySelector(".e-cloneproperties"), target = _this.getElementFromPosition(cloneElement, e.event);
                classList(cloneElement, [ "e-defaultcur" ], [ "e-notallowedcur" ]), gObj.trigger(rowDrag, {
                    rows: gObj.getSelectedRows(),
                    target: target,
                    draggableType: "rows",
                    data: gObj.getSelectedRecords()
                }), gObj.element.classList.add("e-rowdrag"), parentsUntil(target, "e-gridcontent") && parentsUntil(cloneElement.parentElement, "e-grid").id !== parentsUntil(target, "e-grid").id || classList(cloneElement, [ "e-notallowedcur" ], [ "e-defaultcur" ]);
            }, this.dragStop = function(e) {
                var gObj = _this.parent;
                if (!_this.parent.isDestroyed) {
                    var target = _this.getElementFromPosition(e.helper, e.event);
                    gObj.element.classList.remove("e-rowdrag");
                    var dropElem = document.getElementById(gObj.rowDropSettings.targetID);
                    gObj.rowDropSettings.targetID && dropElem && dropElem.ej2_instances && dropElem.ej2_instances[0].getContent().classList.remove("e-allowRowDrop"), 
                    gObj.trigger(rowDrop, {
                        target: target,
                        draggableType: "rows",
                        rows: gObj.getSelectedRows(),
                        data: gObj.getSelectedRecords()
                    }), parentsUntil(target, "e-gridcontent") || remove(e.helper);
                }
            }, this.parent = parent, this.parent.isDestroyed || (this.parent.on(initialEnd, this.initializeDrag, this), 
            this.parent.on(columnDrop, this.columnDrop, this), this.parent.on(rowDragAndDropComplete, this.onActionComplete, this), 
            this.parent.on(uiUpdate, this.enableAfterRender, this));
        }
        return RowDD.prototype.initializeDrag = function() {
            var gObj = this.parent;
            new Draggable(gObj.getContent(), {
                dragTarget: ".e-rowcell",
                distance: 5,
                helper: this.helper,
                dragStart: this.dragStart,
                drag: this.drag,
                dragStop: this.dragStop
            });
        }, RowDD.prototype.getElementFromPosition = function(element, event) {
            var target, position = getPosition(event);
            return element.style.display = "none", target = document.elementFromPoint(position.x, position.y), 
            element.style.display = "", target;
        }, RowDD.prototype.onActionComplete = function(e) {
            this.parent.trigger(actionComplete, extend(e, {
                type: actionComplete
            }));
        }, RowDD.prototype.getTargetIdx = function(targetRow) {
            return targetRow ? parseInt(targetRow.getAttribute("aria-rowindex"), 10) : 0;
        }, RowDD.prototype.columnDrop = function(e) {
            var gObj = this.parent;
            if ("grouping" !== e.droppedElement.getAttribute("action")) {
                var targetRow = closest(e.target, "tr"), srcControl = void 0;
                if (e.droppedElement.parentElement.id === gObj.element.id) return;
                if ((srcControl = e.droppedElement.parentElement.ej2_instances[0]).element.id !== gObj.element.id && srcControl.rowDropSettings.targetID !== gObj.element.id) return;
                var records = srcControl.getSelectedRecords(), targetIndex = this.getTargetIdx(targetRow);
                isNaN(targetIndex) && (targetIndex = 0), gObj.allowPaging && (targetIndex = targetIndex + gObj.pageSettings.currentPage * gObj.pageSettings.pageSize - gObj.pageSettings.pageSize), 
                gObj.notify(rowsAdded, {
                    toIndex: targetIndex,
                    records: records
                }), gObj.notify(modelChanged, {
                    type: actionBegin,
                    requestType: "rowdraganddrop"
                });
                var selectedRows = srcControl.getSelectedRowIndexes(), skip = srcControl.allowPaging ? srcControl.pageSettings.currentPage * srcControl.pageSettings.pageSize - srcControl.pageSettings.pageSize : 0;
                this.selectedRows = [];
                for (var i = 0, len = records.length; i < len; i++) this.selectedRows.push(skip + selectedRows[i]);
                srcControl.notify(rowsRemoved, {
                    indexes: this.selectedRows,
                    records: records
                }), srcControl.notify(modelChanged, {
                    type: actionBegin,
                    requestType: "rowdraganddrop"
                });
            }
        }, RowDD.prototype.enableAfterRender = function(e) {
            e.module === this.getModuleName() && e.enable && this.initializeDrag();
        }, RowDD.prototype.destroy = function() {
            this.parent.isDestroyed || (this.parent.off(initialEnd, this.initializeDrag), this.parent.off(columnDrop, this.columnDrop), 
            this.parent.off(rowDragAndDropComplete, this.onActionComplete), this.parent.off(uiUpdate, this.enableAfterRender));
        }, RowDD.prototype.getModuleName = function() {
            return "rowDragAndDrop";
        }, RowDD;
    }(), Group = function() {
        function Group(parent, groupSettings, sortedColumns, serviceLocator) {
            var _this = this;
            this.isAppliedGroup = !1, this.isAppliedUnGroup = !1, this.visualElement = createElement("div", {
                className: "e-cloneproperties e-dragclone e-gdclone",
                styles: "line-height:23px",
                attrs: {
                    action: "grouping"
                }
            }), this.helper = function(e) {
                var gObj = _this.parent, target = e.sender.target, element = target.classList.contains("e-groupheadercell") ? target : parentsUntil(target, "e-groupheadercell");
                return !!element && (_this.column = gObj.getColumnByField(element.firstElementChild.getAttribute("ej-mappingname")), 
                _this.visualElement.textContent = element.textContent, _this.visualElement.style.width = element.offsetWidth + 2 + "px", 
                _this.visualElement.style.height = element.offsetHeight + 2 + "px", _this.visualElement.setAttribute("e-mappinguid", _this.column.uid), 
                gObj.element.appendChild(_this.visualElement), _this.visualElement);
            }, this.dragStart = function() {
                _this.parent.element.classList.add("e-ungroupdrag");
            }, this.drag = function(e) {
                var target = e.target, cloneElement = _this.parent.element.querySelector(".e-cloneproperties");
                _this.parent.trigger(columnDrag, {
                    target: target,
                    draggableType: "headercell",
                    column: _this.column
                }), classList(cloneElement, [ "e-defaultcur" ], [ "e-notallowedcur" ]), parentsUntil(target, "e-gridcontent") || parentsUntil(target, "e-headercell") || classList(cloneElement, [ "e-notallowedcur" ], [ "e-defaultcur" ]);
            }, this.dragStop = function(e) {
                _this.parent.element.classList.remove("e-ungroupdrag"), parentsUntil(e.target, "e-gridcontent") || parentsUntil(e.target, "e-gridheader") || remove(e.helper);
            }, this.drop = function(e) {
                var gObj = _this.parent, column = gObj.getColumnByUid(e.droppedElement.getAttribute("e-mappinguid"));
                _this.element.classList.remove("e-hover"), remove(e.droppedElement), _this.aria.setDropTarget(_this.parent.element.querySelector(".e-groupdroparea"), !1), 
                _this.aria.setGrabbed(_this.parent.getHeaderTable().querySelector("[aria-grabbed=true]"), !1), 
                isNullOrUndefined(column) || !1 === column.allowGrouping || parentsUntil(gObj.getColumnHeaderByUid(column.uid), "e-grid").getAttribute("id") !== gObj.element.getAttribute("id") || _this.groupColumn(column.field);
            }, this.contentRefresh = !0, this.aria = new AriaService(), this.parent = parent, 
            this.groupSettings = groupSettings, this.serviceLocator = serviceLocator, this.sortedColumns = sortedColumns, 
            this.focus = serviceLocator.getService("focus"), this.addEventListener();
        }
        return Group.prototype.columnDrag = function(e) {
            this.parent;
            var cloneElement = this.parent.element.querySelector(".e-cloneproperties");
            classList(cloneElement, [ "e-defaultcur" ], [ "e-notallowedcur" ]), parentsUntil(e.target, "e-groupdroparea") || this.parent.allowReordering && parentsUntil(e.target, "e-headercell") || classList(cloneElement, [ "e-notallowedcur" ], [ "e-defaultcur" ]), 
            e.target.classList.contains("e-groupdroparea") ? this.element.classList.add("e-hover") : this.element.classList.remove("e-hover");
        }, Group.prototype.columnDragStart = function(e) {
            if (!e.target.classList.contains("e-stackedheadercell")) {
                this.parent;
                var dropArea = this.parent.element.querySelector(".e-groupdroparea");
                this.aria.setDropTarget(dropArea, e.column.allowGrouping);
                var element = e.target.classList.contains("e-headercell") ? e.target : parentsUntil(e.target, "e-headercell");
                this.aria.setGrabbed(element, !0, !e.column.allowGrouping);
            }
        }, Group.prototype.columnDrop = function(e) {
            var gObj = this.parent;
            if ("grouping" === e.droppedElement.getAttribute("action")) {
                var column = gObj.getColumnByUid(e.droppedElement.getAttribute("e-mappinguid"));
                if (isNullOrUndefined(column) || !1 === column.allowGrouping || parentsUntil(gObj.getColumnHeaderByUid(column.uid), "e-grid").getAttribute("id") !== gObj.element.getAttribute("id")) return;
                this.ungroupColumn(column.field);
            }
        }, Group.prototype.addEventListener = function() {
            this.parent.isDestroyed || (this.parent.on(uiUpdate, this.enableAfterRender, this), 
            this.parent.on("grouping-complete", this.onActionComplete, this), this.parent.on("ungrouping-complete", this.onActionComplete, this), 
            this.parent.on(inBoundModelChanged, this.onPropertyChanged, this), this.parent.on(click, this.clickHandler, this), 
            this.parent.on(columnDrag, this.columnDrag, this), this.parent.on(columnDragStart, this.columnDragStart, this), 
            this.parent.on(columnDrop, this.columnDrop, this), this.parent.on(headerRefreshed, this.refreshSortIcons, this), 
            this.parent.on("sorting-complete", this.refreshSortIcons, this), this.parent.on(keyPressed, this.keyPressHandler, this), 
            this.parent.on(contentReady, this.initialEnd, this), this.parent.on(onEmpty, this.initialEnd, this), 
            this.parent.on(initialEnd, this.render, this));
        }, Group.prototype.removeEventListener = function() {
            this.parent.isDestroyed || (this.parent.off(initialEnd, this.render), this.parent.off(uiUpdate, this.enableAfterRender), 
            this.parent.off("grouping-complete", this.onActionComplete), this.parent.off("ungrouping-complete", this.onActionComplete), 
            this.parent.off(inBoundModelChanged, this.onPropertyChanged), this.parent.off(click, this.clickHandler), 
            this.parent.off(columnDrag, this.columnDrag), this.parent.off(columnDragStart, this.columnDragStart), 
            this.parent.off(columnDrop, this.columnDrop), this.parent.off(headerRefreshed, this.refreshSortIcons), 
            this.parent.off("sorting-complete", this.refreshSortIcons), this.parent.off(keyPressed, this.keyPressHandler));
        }, Group.prototype.initialEnd = function() {
            var gObj = this.parent;
            if (this.parent.off(contentReady, this.initialEnd), this.parent.off(onEmpty, this.initialEnd), 
            this.parent.getColumns().length && this.groupSettings.columns.length) {
                this.contentRefresh = !1;
                for (var _i = 0, _a = gObj.groupSettings.columns; _i < _a.length; _i++) {
                    var col = _a[_i];
                    this.groupColumn(col);
                }
                this.contentRefresh = !0;
            }
        }, Group.prototype.keyPressHandler = function(e) {
            var gObj = this.parent;
            if (this.groupSettings.columns.length && -1 !== [ "altDownArrow", "altUpArrow", "ctrlDownArrow", "ctrlUpArrow", "enter" ].indexOf(e.action)) switch (e.preventDefault(), 
            e.action) {
              case "altDownArrow":
              case "altUpArrow":
                var selected = gObj.allowSelection ? gObj.getSelectedRowIndexes() : [];
                if (selected.length) {
                    for (var rows = gObj.getContentTable().querySelector("tbody").children, grpRow = void 0, i = gObj.getDataRows()[selected[selected.length - 1]].rowIndex; i >= 0; i--) if (!rows[i].classList.contains("e-row") && !rows[i].classList.contains("e-detailrow")) {
                        grpRow = rows[i];
                        break;
                    }
                    this.expandCollapseRows(grpRow.querySelector("altUpArrow" === e.action ? ".e-recordplusexpand" : ".e-recordpluscollapse"));
                }
                break;

              case "ctrlDownArrow":
                this.expandAll();
                break;

              case "ctrlUpArrow":
                this.collapseAll();
                break;

              case "enter":
                if (this.parent.isEdit || null !== closest(e.target, "#" + this.parent.element.id + "_searchbar")) return;
                var element = this.focus.getFocusedElement(), row = element ? element.parentElement.querySelector('[class^="e-record"]') : null;
                if (!row) break;
                this.expandCollapseRows(row);
            }
        }, Group.prototype.clickHandler = function(e) {
            this.expandCollapseRows(e.target), this.applySortFromTarget(e.target), this.unGroupFromTarget(e.target), 
            this.toogleGroupFromHeader(e.target);
        }, Group.prototype.unGroupFromTarget = function(target) {
            target.classList.contains("e-ungroupbutton") && this.ungroupColumn(target.parentElement.getAttribute("ej-mappingname"));
        }, Group.prototype.toogleGroupFromHeader = function(target) {
            this.groupSettings.showToggleButton && (target.classList.contains("e-grptogglebtn") ? target.classList.contains("e-toggleungroup") ? this.ungroupColumn(this.parent.getColumnByUid(target.parentElement.getAttribute("e-mappinguid")).field) : this.groupColumn(this.parent.getColumnByUid(target.parentElement.getAttribute("e-mappinguid")).field) : target.classList.contains("e-toggleungroup") && this.ungroupColumn(target.parentElement.getAttribute("ej-mappingname")));
        }, Group.prototype.applySortFromTarget = function(target) {
            var gObj = this.parent, gHeader = closest(target, ".e-groupheadercell");
            if (gObj.allowSorting && gHeader && !target.classList.contains("e-ungroupbutton") && !target.classList.contains("e-toggleungroup")) {
                var field = gHeader.firstElementChild.getAttribute("ej-mappingname");
                gObj.getColumnHeaderByField(field).querySelectorAll(".e-ascending").length ? gObj.sortColumn(field, "Descending", !0) : gObj.sortColumn(field, "Ascending", !0);
            }
        }, Group.prototype.expandCollapseRows = function(target) {
            var trgt = parentsUntil(target, "e-recordplusexpand") || parentsUntil(target, "e-recordpluscollapse");
            if (trgt) {
                var cellIdx = trgt.cellIndex, rowIdx = trgt.parentElement.rowIndex, rowNodes = this.parent.getContentTable().querySelector("tbody").children, rows = [].slice.call(rowNodes).slice(rowIdx + 1, rowNodes.length), isHide = void 0, expandElem = void 0, toExpand = [], indent = trgt.parentElement.querySelectorAll(".e-indentcell").length, expand = !1;
                trgt.classList.contains("e-recordpluscollapse") ? (addClass([ trgt ], "e-recordplusexpand"), 
                removeClass([ trgt ], "e-recordpluscollapse"), trgt.firstElementChild.className = "e-icons e-gdiagonaldown e-icon-gdownarrow", 
                expand = !0) : (isHide = !0, removeClass([ trgt ], "e-recordplusexpand"), addClass([ trgt ], "e-recordpluscollapse"), 
                trgt.firstElementChild.className = "e-icons e-gnextforward e-icon-grightarrow"), 
                this.aria.setExpand(trgt, expand);
                for (var i = 0, len = rows.length; i < len && (rows[i].querySelectorAll("td")[cellIdx] && rows[i].querySelectorAll("td")[cellIdx].classList.contains("e-indentcell") && rows); i++) isHide ? rows[i].style.display = "none" : rows[i].querySelectorAll(".e-indentcell").length === indent + 1 && (rows[i].style.display = "", 
                (expandElem = rows[i].querySelector(".e-recordplusexpand")) && toExpand.push(expandElem), 
                rows[i].classList.contains("e-detailrow") && rows[i - 1].querySelectorAll(".e-detailrowcollapse").length && (rows[i].style.display = "none"));
                for (i = 0, len = toExpand.length; i < len; i++) removeClass([ toExpand[i] ], "e-recordplusexpand"), 
                addClass([ toExpand[i] ], "e-recordpluscollapse"), toExpand[i].firstElementChild.className = "e-icons e-gnextforward e-icon-grightarrow", 
                this.expandCollapseRows(toExpand[i]);
            }
        }, Group.prototype.expandCollapse = function(isExpand) {
            for (var row, rowNodes = this.parent.getContentTable().querySelector("tbody").children, i = 0, len = rowNodes.length; i < len; i++) rowNodes[i].querySelectorAll(".e-recordplusexpand, .e-recordpluscollapse").length ? ((row = rowNodes[i].querySelector(isExpand ? ".e-recordpluscollapse" : ".e-recordplusexpand")) && (row.className = isExpand ? "e-recordplusexpand" : "e-recordpluscollapse", 
            row.firstElementChild.className = isExpand ? "e-icons e-gdiagonaldown e-icon-gdownarrow" : "e-icons e-gnextforward e-icon-grightarrow"), 
            rowNodes[i].firstElementChild.classList.contains("e-recordplusexpand") || rowNodes[i].firstElementChild.classList.contains("e-recordpluscollapse") || (rowNodes[i].style.display = isExpand ? "" : "none")) : rowNodes[i].style.display = isExpand ? "" : "none";
        }, Group.prototype.expandAll = function() {
            this.expandCollapse(!0);
        }, Group.prototype.collapseAll = function() {
            this.expandCollapse(!1);
        }, Group.prototype.render = function() {
            this.l10n = this.serviceLocator.getService("localization"), this.renderGroupDropArea(), 
            this.initDragAndDrop(), this.refreshToggleBtn();
        }, Group.prototype.renderGroupDropArea = function() {
            var groupElem = this.parent.element.querySelector(".e-groupdroparea");
            groupElem && remove(groupElem), this.element = createElement("div", {
                className: "e-groupdroparea",
                attrs: {
                    tabindex: "-1"
                }
            }), this.updateGroupDropArea(), this.parent.element.insertBefore(this.element, this.parent.element.firstChild), 
            this.groupSettings.showDropArea || (this.element.style.display = "none");
        }, Group.prototype.updateGroupDropArea = function(clear) {
            if (this.groupSettings.showDropArea && !this.groupSettings.columns.length) {
                var dragLabel = this.l10n.getConstant("GroupDropArea");
                this.element.innerHTML = dragLabel, this.element.classList.remove("e-grouped");
            } else (this.element.innerHTML === this.l10n.getConstant("GroupDropArea") && (1 === this.groupSettings.columns.length || !this.isAppliedGroup && !this.isAppliedUnGroup) || clear) && (this.element.innerHTML = ""), 
            this.element.classList.add("e-grouped");
        }, Group.prototype.initDragAndDrop = function() {
            this.initializeGHeaderDrop(), this.initializeGHeaderDrag();
        }, Group.prototype.initializeGHeaderDrag = function() {
            new Draggable(this.element, {
                dragTarget: ".e-groupheadercell",
                distance: 5,
                helper: this.helper,
                dragStart: this.dragStart,
                drag: this.drag,
                dragStop: this.dragStop
            });
        }, Group.prototype.initializeGHeaderDrop = function() {
            this.parent, new Droppable(this.element, {
                accept: ".e-dragclone",
                drop: this.drop
            });
        }, Group.prototype.groupColumn = function(columnName) {
            var gObj = this.parent, column = gObj.getColumnByField(columnName);
            isNullOrUndefined(column) || !1 === column.allowGrouping || this.contentRefresh && this.groupSettings.columns.indexOf(columnName) > -1 || (isActionPrevent(gObj) ? gObj.notify(preventBatch, {
                instance: this,
                handler: this.groupColumn,
                arg1: columnName
            }) : (column.visible = gObj.groupSettings.showGroupedColumn, this.colName = columnName, 
            this.isAppliedGroup = !0, this.contentRefresh ? this.updateModel() : this.addColToGroupDrop(columnName), 
            this.updateGroupDropArea(), this.isAppliedGroup = !1));
        }, Group.prototype.ungroupColumn = function(columnName) {
            var gObj = this.parent, column = this.parent.enableColumnVirtualization ? this.parent.columns.filter(function(c) {
                return c.field === columnName;
            })[0] : gObj.getColumnByField(columnName);
            if (!(isNullOrUndefined(column) || !1 === column.allowGrouping || this.groupSettings.columns.indexOf(columnName) < 0)) if (isActionPrevent(gObj)) gObj.notify(preventBatch, {
                instance: this,
                handler: this.ungroupColumn,
                arg1: columnName
            }); else {
                column.visible = !0, this.colName = column.field;
                var columns = JSON.parse(JSON.stringify(this.groupSettings.columns));
                if (columns.splice(columns.indexOf(this.colName), 1), this.sortedColumns.indexOf(columnName) < 0) for (var i = 0, len = gObj.sortSettings.columns.length; i < len; i++) if (columnName === gObj.sortSettings.columns[i].field) {
                    gObj.sortSettings.columns.splice(i, 1);
                    break;
                }
                this.groupSettings.columns = columns, gObj.allowGrouping && (this.isAppliedUnGroup = !0, 
                this.parent.dataBind());
            }
        }, Group.prototype.updateModel = function() {
            this.parent;
            var columns = JSON.parse(JSON.stringify(this.groupSettings.columns));
            columns.push(this.colName), this.groupSettings.columns = columns, this.groupAddSortingQuery(this.colName), 
            this.parent.dataBind();
        }, Group.prototype.onActionComplete = function(e) {
            this.parent;
            "grouping" === e.requestType ? this.addColToGroupDrop(this.colName) : this.removeColFromGroupDrop(this.colName);
            var args = this.groupSettings.columns.indexOf(this.colName) > -1 ? {
                columnName: this.colName,
                requestType: "grouping",
                type: actionComplete
            } : {
                requestType: "ungrouping",
                type: actionComplete
            };
            this.parent.trigger(actionComplete, extend(e, args)), this.colName = null;
        }, Group.prototype.groupAddSortingQuery = function(colName) {
            for (var i = 0; i < this.parent.sortSettings.columns.length && this.parent.sortSettings.columns[i].field !== colName; ) i++;
            this.parent.sortSettings.columns.length === i ? this.parent.sortSettings.columns.push({
                field: colName,
                direction: "Ascending"
            }) : this.parent.allowSorting || (this.parent.sortSettings.columns[i].direction = "Ascending");
        }, Group.prototype.addColToGroupDrop = function(field) {
            var gObj = this.parent, direction = "Ascending", groupedColumn = createElement("div", {
                className: "e-grid-icon e-groupheadercell"
            }), childDiv = createElement("div", {
                attrs: {
                    "ej-mappingname": field
                }
            }), column = this.parent.getColumnByField(field);
            if (!isNullOrUndefined(column)) {
                var headerCell = gObj.getColumnHeaderByUid(column.uid);
                isNullOrUndefined(column.headerTemplate) ? childDiv.appendChild(createElement("span", {
                    className: "e-grouptext",
                    innerHTML: column.headerText,
                    attrs: {
                        tabindex: "-1",
                        "aria-label": "sort the grouped column"
                    }
                })) : (-1 !== column.headerTemplate.indexOf("#") ? childDiv.innerHTML = document.querySelector(column.headerTemplate).innerHTML.trim() : childDiv.innerHTML = column.headerTemplate, 
                childDiv.firstElementChild.classList.add("e-grouptext")), this.groupSettings.showToggleButton && childDiv.appendChild(createElement("span", {
                    className: "e-togglegroupbutton e-icons e-icon-ungroup e-toggleungroup",
                    innerHTML: "&nbsp;",
                    attrs: {
                        tabindex: "-1",
                        "aria-label": "ungroup button"
                    }
                })), headerCell.querySelectorAll(".e-ascending,.e-descending").length && (direction = headerCell.querySelector(".e-ascending") ? "Ascending" : "Descending"), 
                childDiv.appendChild(createElement("span", {
                    className: "e-groupsort e-icons e-" + direction.toLowerCase() + " e-icon-" + direction.toLowerCase(),
                    innerHTML: "&nbsp;",
                    attrs: {
                        tabindex: "-1",
                        "aria-label": "sort the grouped column"
                    }
                })), childDiv.appendChild(createElement("span", {
                    className: "e-ungroupbutton e-icons e-icon-hide",
                    innerHTML: "&nbsp;",
                    attrs: {
                        title: this.l10n.getConstant("UnGroup"),
                        tabindex: "-1",
                        "aria-label": "ungroup the grouped column"
                    },
                    styles: this.groupSettings.showUngroupButton ? "" : "display:none"
                })), groupedColumn.appendChild(childDiv), this.element.appendChild(groupedColumn);
            }
        }, Group.prototype.refreshToggleBtn = function(isRemove) {
            if (this.groupSettings.showToggleButton) for (var headers = [].slice.call(this.parent.element.getElementsByClassName("e-headercelldiv")), i = 0, len = headers.length; i < len; i++) if (!headers[i].classList.contains("e-emptycell") && !headers[i].classList.contains("e-headerchkcelldiv")) {
                var column = this.parent.getColumnByUid(headers[i].getAttribute("e-mappinguid"));
                (!this.parent.showColumnMenu || this.parent.showColumnMenu && !column.showColumnMenu) && (headers[i].querySelectorAll(".e-grptogglebtn").length && remove(headers[i].querySelectorAll(".e-grptogglebtn")[0]), 
                isRemove || headers[i].appendChild(createElement("span", {
                    className: "e-grptogglebtn e-icons " + (this.groupSettings.columns.indexOf(column.field) > -1 ? "e-toggleungroup e-icon-ungroup" : "e-togglegroup e-icon-group"),
                    attrs: {
                        tabindex: "-1",
                        "aria-label": "Group button"
                    }
                })));
            }
        }, Group.prototype.removeColFromGroupDrop = function(field) {
            isNullOrUndefined(this.getGHeaderCell(field)) || (remove(this.getGHeaderCell(field)), 
            this.updateGroupDropArea()), this.isAppliedUnGroup = !1;
        }, Group.prototype.onPropertyChanged = function(e) {
            var _this = this;
            if (e.module === this.getModuleName()) for (var _loop_1 = function(prop) {
                switch (prop) {
                  case "columns":
                    var args = void 0;
                    if (this_1.contentRefresh) {
                        if (this_1.isAppliedUnGroup) args = {
                            requestType: "ungrouping",
                            type: actionBegin
                        }; else {
                            if (!this_1.isAppliedGroup) {
                                this_1.updateGroupDropArea(!0);
                                for (var i = 0; i < this_1.groupSettings.columns.length; i++) {
                                    this_1.colName = this_1.groupSettings.columns[i];
                                    this_1.parent.getColumnByField(this_1.colName).visible = this_1.parent.groupSettings.showGroupedColumn, 
                                    this_1.groupAddSortingQuery(this_1.colName), i < this_1.groupSettings.columns.length - 1 && this_1.addColToGroupDrop(this_1.groupSettings.columns[i]);
                                }
                            }
                            args = {
                                columnName: this_1.colName,
                                requestType: e.properties[prop].length ? "grouping" : "ungrouping",
                                type: actionBegin
                            };
                        }
                        this_1.groupSettings.showGroupedColumn || e.oldProperties[prop].forEach(function(column) {
                            -1 === e.properties[prop].indexOf(column) && (_this.parent.getColumnByField(column).visible = !0);
                        }), this_1.parent.notify(modelChanged, args);
                    }
                    break;

                  case "showDropArea":
                    this_1.updateGroupDropArea(), this_1.groupSettings.showDropArea ? this_1.element.style.display = "" : this_1.element.style.display = "none";
                    break;

                  case "showGroupedColumn":
                    this_1.updateGroupedColumn(this_1.groupSettings.showGroupedColumn), this_1.parent.notify(modelChanged, {
                        requestType: "refresh"
                    });
                    break;

                  case "showUngroupButton":
                    this_1.updateButtonVisibility(this_1.groupSettings.showUngroupButton, "e-ungroupbutton");
                    break;

                  case "showToggleButton":
                    this_1.updateButtonVisibility(this_1.groupSettings.showToggleButton, "e-togglegroupbutton "), 
                    this_1.parent.refreshHeader();
                }
            }, this_1 = this, _i = 0, _a = Object.keys(e.properties); _i < _a.length; _i++) {
                _loop_1(_a[_i]);
            }
        }, Group.prototype.updateGroupedColumn = function(isVisible$$1) {
            for (var i = 0; i < this.groupSettings.columns.length; i++) this.parent.getColumnByField(this.groupSettings.columns[i]).visible = isVisible$$1;
        }, Group.prototype.updateButtonVisibility = function(isVisible$$1, className) {
            for (var gHeader = [].slice.call(this.element.querySelectorAll("." + className)), i = 0; i < gHeader.length; i++) gHeader[i].style.display = isVisible$$1 ? "" : "none";
        }, Group.prototype.enableAfterRender = function(e) {
            e.module === this.getModuleName() && e.enable && this.render();
        }, Group.prototype.destroy = function() {
            this.clearGrouping(), this.removeEventListener(), this.refreshToggleBtn(!0), remove(this.element);
        }, Group.prototype.clearGrouping = function() {
            var cols = JSON.parse(JSON.stringify(this.groupSettings.columns));
            this.contentRefresh = !1;
            for (var i = 0, len = cols.length; i < len; i++) this.ungroupColumn(cols[i]);
            this.contentRefresh = !0;
        }, Group.prototype.getModuleName = function() {
            return "group";
        }, Group.prototype.refreshSortIcons = function(e) {
            var header, gObj = this.parent, cols = gObj.sortSettings.columns, gCols = gObj.groupSettings.columns, fieldNames = this.parent.getColumns().map(function(c) {
                return c.field;
            });
            this.refreshToggleBtn();
            for (var i = 0, len = cols.length; i < len; i++) -1 !== fieldNames.indexOf(cols[i].field) && (header = gObj.getColumnHeaderByField(cols[i].field), 
            !gObj.allowSorting && (this.sortedColumns.indexOf(cols[i].field) > -1 || this.groupSettings.columns.indexOf(cols[i].field) > -1) ? (classList(header.querySelector(".e-sortfilterdiv"), [ "e-ascending", "e-icon-ascending" ], []), 
            cols.length > 1 && header.querySelector(".e-headercelldiv").appendChild(createElement("span", {
                className: "e-sortnumber",
                innerHTML: (i + 1).toString()
            }))) : this.getGHeaderCell(cols[i].field) && this.getGHeaderCell(cols[i].field).querySelectorAll(".e-groupsort").length && ("Ascending" === cols[i].direction ? classList(this.getGHeaderCell(cols[i].field).querySelector(".e-groupsort"), [ "e-ascending", "e-icon-ascending" ], [ "e-descending", "e-icon-descending" ]) : classList(this.getGHeaderCell(cols[i].field).querySelector(".e-groupsort"), [ "e-descending", "e-icon-descending" ], [ "e-ascending", "e-icon-ascending" ])));
            for (i = 0, len = gCols.length; i < len; i++) -1 !== fieldNames.indexOf(gCols[i]) && gObj.getColumnHeaderByField(gCols[i]).setAttribute("aria-grouped", "true");
        }, Group.prototype.getGHeaderCell = function(field) {
            return this.element && this.element.querySelector('[ej-mappingname="' + field + '"]') ? this.element.querySelector('[ej-mappingname="' + field + '"]').parentElement : null;
        }, Group;
    }(), DetailRow = function() {
        function DetailRow(parent, locator) {
            this.aria = new AriaService(), this.parent = parent, this.parent.isDestroyed || (this.focus = locator.getService("focus"), 
            this.parent.on(click, this.clickHandler, this), this.parent.on(destroy$1, this.destroy, this), 
            this.parent.on(keyPressed, this.keyPressHandler, this));
        }
        return DetailRow.prototype.clickHandler = function(e) {
            this.toogleExpandcollapse(closest(e.target, "td"));
        }, DetailRow.prototype.toogleExpandcollapse = function(target) {
            var gObj = this.parent;
            if (target && (target.classList.contains("e-detailrowcollapse") || target.classList.contains("e-detailrowexpand"))) {
                var tr = target.parentElement, uid_1 = tr.getAttribute("data-uid"), nextRow = this.parent.getContentTable().querySelector("tbody").children[tr.rowIndex + 1];
                if (target.classList.contains("e-detailrowcollapse")) {
                    var data = (gObj.allowGrouping && gObj.groupSettings.columns.length ? gObj.currentViewData.records : gObj.currentViewData)[tr.getAttribute("aria-rowindex")];
                    if (this.isDetailRow(nextRow)) nextRow.style.display = ""; else if (gObj.getDetailTemplate() || gObj.childGrid) {
                        var detailRow = createElement("tr", {
                            className: "e-detailrow"
                        }), detailCell = createElement("td", {
                            className: "e-detailcell"
                        });
                        detailCell.setAttribute("colspan", this.parent.getVisibleColumns().length.toString());
                        for (var row = new Row$1({
                            isDataRow: !0,
                            isExpand: !0,
                            cells: [ new Cell({
                                cellType: CellType.Indent
                            }), new Cell({
                                isDataCell: !0,
                                visible: !0
                            }) ]
                        }), i = 0, len = gObj.groupSettings.columns.length; i < len; i++) detailRow.appendChild(createElement("td", {
                            className: "e-indentcell"
                        })), row.cells.unshift(new Cell({
                            cellType: CellType.Indent
                        }));
                        if (detailRow.appendChild(createElement("td", {
                            className: "e-detailindentcell"
                        })), detailRow.appendChild(detailCell), tr.parentNode.insertBefore(detailRow, tr.nextSibling), 
                        gObj.detailTemplate) appendChildren(detailCell, gObj.getDetailTemplate()(data, gObj, "detailTemplate")); else {
                            gObj.childGrid.parentDetails = {
                                parentID: gObj.element.id,
                                parentPrimaryKeys: gObj.getPrimaryKeyFieldNames(),
                                parentKeyField: gObj.childGrid.queryString,
                                parentKeyFieldValue: data[gObj.childGrid.queryString],
                                parentRowData: data
                            };
                            var grid = new Grid(gObj.childGrid), modules = grid.getInjectedModules(), injectedModues = gObj.getInjectedModules();
                            modules && modules.length === injectedModues.length || grid.setInjectedModules(injectedModues);
                            var gridElem = createElement("div", {
                                id: "child" + function(elem, selector, isID) {
                                    for (var parent = elem, parents = []; parent; ) (isID ? parent.id === selector : parent.classList.contains(selector)) && parents.push(parent), 
                                    parent = parent.parentElement;
                                    return parents;
                                }(tr, "e-grid").length + "_grid" + tr.rowIndex + getUid("")
                            });
                            detailCell.appendChild(gridElem), grid.appendTo(gridElem);
                        }
                        detailRow.appendChild(detailCell), tr.parentNode.insertBefore(detailRow, tr.nextSibling);
                        var idx_1;
                        this.parent.getRowsObject().some(function(r, rIndex) {
                            return idx_1 = rIndex, r.uid === uid_1;
                        }), gObj.getRows().splice(tr.rowIndex + 1, 0, detailRow), this.parent.getRowsObject().splice(idx_1 + 1, 0, row), 
                        gObj.trigger("detailDataBound", {
                            detailElement: detailCell,
                            data: data
                        }), gObj.notify("detailDataBound", {
                            rows: this.parent.getRowsObject()
                        });
                    }
                    classList(target, [ "e-detailrowexpand" ], [ "e-detailrowcollapse" ]), classList(target.firstElementChild, [ "e-dtdiagonaldown", "e-icon-gdownarrow" ], [ "e-dtdiagonalright", "e-icon-grightarrow" ]), 
                    this.parent.getRowsObject()[tr.rowIndex].isExpand = !0, this.aria.setExpand(target, !0);
                } else this.isDetailRow(nextRow) && (nextRow.style.display = "none"), classList(target, [ "e-detailrowcollapse" ], [ "e-detailrowexpand" ]), 
                classList(target.firstElementChild, [ "e-dtdiagonalright", "e-icon-grightarrow" ], [ "e-dtdiagonaldown", "e-icon-gdownarrow" ]), 
                this.parent.getRowsObject()[tr.rowIndex].isExpand = !1, this.aria.setExpand(target, !1);
            }
        }, DetailRow.prototype.isDetailRow = function(row) {
            return row && row.classList.contains("e-detailrow");
        }, DetailRow.prototype.destroy = function() {
            this.parent.isDestroyed || (this.parent.off(click, this.clickHandler), this.parent.off(destroy$1, this.destroy), 
            this.parent.off(keyPressed, this.keyPressHandler));
        }, DetailRow.prototype.getTDfromIndex = function(index, className) {
            var tr = this.parent.getDataRows()[index];
            return tr && tr.querySelector(className) ? tr.querySelector(className) : null;
        }, DetailRow.prototype.expand = function(target) {
            isNaN(target) || (target = this.getTDfromIndex(target, ".e-detailrowcollapse")), 
            target && target.classList.contains("e-detailrowcollapse") && this.toogleExpandcollapse(target);
        }, DetailRow.prototype.collapse = function(target) {
            isNaN(target) || (target = this.getTDfromIndex(target, ".e-detailrowexpand")), target && target.classList.contains("e-detailrowexpand") && this.toogleExpandcollapse(target);
        }, DetailRow.prototype.expandAll = function() {
            this.expandCollapse(!0);
        }, DetailRow.prototype.collapseAll = function() {
            this.expandCollapse(!1);
        }, DetailRow.prototype.expandCollapse = function(isExpand) {
            for (var td, rows = this.parent.getDataRows(), i = 0, len = rows.length; i < len; i++) td = rows[i].querySelector(".e-detailrowcollapse, .e-detailrowexpand"), 
            isExpand ? this.expand(td) : this.collapse(td);
        }, DetailRow.prototype.keyPressHandler = function(e) {
            var gObj = this.parent;
            switch (e.action) {
              case "ctrlDownArrow":
                this.expandAll();
                break;

              case "ctrlUpArrow":
                this.collapseAll();
                break;

              case "altUpArrow":
              case "altDownArrow":
                var selected = gObj.allowSelection ? gObj.getSelectedRowIndexes() : [];
                if (selected.length) {
                    var td = gObj.getDataRows()[selected[selected.length - 1]].querySelector(".e-detailrowcollapse, .e-detailrowexpand");
                    "altDownArrow" === e.action ? this.expand(td) : this.collapse(td);
                }
                break;

              case "enter":
                if (this.parent.isEdit) return;
                var element = this.focus.getFocusedElement();
                if (!e.target.classList.contains("e-detailrowcollapse") && !e.target.classList.contains("e-detailrowexpand")) break;
                this.toogleExpandcollapse(element);
            }
        }, DetailRow.prototype.getModuleName = function() {
            return "detailRow";
        }, DetailRow;
    }(), Toolbar$2 = function() {
        function Toolbar$$1(parent, serviceLocator) {
            this.predefinedItems = {}, this.items = [ "Add", "Edit", "Update", "Delete", "Cancel", "Print", "Search", "ColumnChooser", "PdfExport", "ExcelExport", "CsvExport", "WordExport" ], 
            this.parent = parent, this.gridID = parent.element.id, this.serviceLocator = serviceLocator, 
            this.addEventListener();
        }
        return Toolbar$$1.prototype.render = function() {
            this.l10n = this.serviceLocator.getService("localization");
            for (var _i = 0, preItems_1 = [ "Add", "Edit", "Update", "Delete", "Cancel", "Print", "PdfExport", "ExcelExport", "WordExport", "CsvExport" ]; _i < preItems_1.length; _i++) {
                var item = preItems_1[_i], itemStr = item.toLowerCase(), localeName = itemStr[0].toUpperCase() + itemStr.slice(1);
                this.predefinedItems[item] = {
                    id: this.gridID + "_" + itemStr,
                    prefixIcon: "e-" + itemStr,
                    text: this.l10n.getConstant(localeName),
                    tooltipText: this.l10n.getConstant(localeName)
                };
            }
            this.predefinedItems.Search = {
                id: this.gridID + "_search",
                template: '<div class="e-input-group e-search" role="search">            <input id="' + this.gridID + '_searchbar" class="e-input" name="input" type="search"             placeholder= "' + this.l10n.getConstant("Search") + '"/>            <span id="' + this.gridID + '_searchbutton" class="e-input-group-icon e-search-icon e-icons"             tabindex="-1" title="Search In" aria-label= "search"></span>             </div>',
                tooltipText: this.l10n.getConstant("Search"),
                align: "right",
                cssClass: "e-search-wrapper"
            }, this.predefinedItems.ColumnChooser = {
                id: this.gridID + "_columnchooser",
                cssClass: "e-cc e-ccdiv e-cc-toolbar",
                suffixIcon: "e-columnchooser-btn",
                text: "Columns",
                tooltipText: "columns",
                align: "right"
            }, this.createToolbar();
        }, Toolbar$$1.prototype.getToolbar = function() {
            return this.toolbar.element;
        }, Toolbar$$1.prototype.destroy = function() {
            this.toolbar.isDestroyed || (this.toolbar.element ? this.toolbar.destroy() : this.parent.destroyTemplate([ "toolbarTemplate" ]), 
            this.unWireEvent(), this.removeEventListener(), remove(this.element));
        }, Toolbar$$1.prototype.createToolbar = function() {
            var items = this.getItems();
            this.toolbar = new Toolbar$1({
                items: items,
                clicked: this.toolbarClickHandler.bind(this),
                enablePersistence: this.parent.enablePersistence,
                enableRtl: this.parent.enableRtl
            });
            var viewStr = "viewContainerRef";
            this.parent[viewStr] && (this.toolbar.registeredTemplate = {}, this.toolbar[viewStr] = this.parent[viewStr]), 
            this.element = createElement("div", {
                id: this.gridID + "_toolbarItems"
            }), this.parent.toolbarTemplate ? "string" == typeof this.parent.toolbarTemplate ? (this.toolbar.appendTo(this.parent.toolbarTemplate), 
            this.element = this.toolbar.element) : appendChildren(this.element, templateCompiler(this.parent.toolbarTemplate)({}, this.parent, "toolbarTemplate")) : this.toolbar.appendTo(this.element), 
            this.parent.element.insertBefore(this.element, this.parent.getHeaderContent()), 
            this.searchElement = this.element.querySelector("#" + this.gridID + "_searchbar"), 
            this.wireEvent(), this.refreshToolbarItems(), this.parent.searchSettings && this.updateSearchBox();
        }, Toolbar$$1.prototype.refreshToolbarItems = function(args) {
            var gObj = this.parent, enableItems = [], disableItems = [], edit = gObj.editSettings, hasData = gObj.currentViewData && gObj.currentViewData.length;
            edit.allowAdding ? enableItems.push(this.gridID + "_add") : disableItems.push(this.gridID + "_add"), 
            edit.allowEditing && hasData ? enableItems.push(this.gridID + "_edit") : disableItems.push(this.gridID + "_edit"), 
            edit.allowDeleting && hasData ? enableItems.push(this.gridID + "_delete") : disableItems.push(this.gridID + "_delete"), 
            "Batch" === gObj.editSettings.mode ? gObj.element.querySelectorAll(".e-updatedtd").length && (edit.allowAdding || edit.allowEditing) ? (enableItems.push(this.gridID + "_update"), 
            enableItems.push(this.gridID + "_cancel")) : (disableItems.push(this.gridID + "_update"), 
            disableItems.push(this.gridID + "_cancel")) : gObj.isEdit && (edit.allowAdding || edit.allowEditing) ? (enableItems = [ this.gridID + "_update", this.gridID + "_cancel" ], 
            disableItems = [ this.gridID + "_add", this.gridID + "_edit", this.gridID + "_delete" ]) : (disableItems.push(this.gridID + "_update"), 
            disableItems.push(this.gridID + "_cancel")), this.enableItems(enableItems, !0), 
            this.enableItems(disableItems, !1);
        }, Toolbar$$1.prototype.getItems = function() {
            var items = [], toolbarItems = this.parent.toolbar || [];
            if ("string" == typeof this.parent.toolbar) return [];
            for (var _i = 0, toolbarItems_1 = toolbarItems; _i < toolbarItems_1.length; _i++) {
                var item = toolbarItems_1[_i];
                switch (typeof item) {
                  case "number":
                    items.push(this.getItemObject(this.items[item]));
                    break;

                  case "string":
                    items.push(this.getItemObject(item));
                    break;

                  default:
                    items.push(this.getItem(item));
                }
            }
            return items;
        }, Toolbar$$1.prototype.getItem = function(itemObject) {
            var item = this.predefinedItems[itemObject.text];
            return item ? extend(item, item, itemObject) : itemObject;
        }, Toolbar$$1.prototype.getItemObject = function(itemName) {
            return this.predefinedItems[itemName] || {
                text: itemName,
                id: this.gridID + "_" + itemName
            };
        }, Toolbar$$1.prototype.enableItems = function(items, isEnable) {
            for (var _i = 0, items_1 = items; _i < items_1.length; _i++) {
                var item = items_1[_i], element = this.element.querySelector("#" + item);
                element && this.toolbar.enableItems(element.parentElement, isEnable);
            }
        }, Toolbar$$1.prototype.toolbarClickHandler = function(args) {
            var gObj = this.parent, gID = this.gridID;
            if (extend(args, {
                cancel: !1
            }), gObj.trigger("toolbarClick", args), !args.cancel) switch (!isNullOrUndefined(args.item) && args.item.id) {
              case gID + "_print":
                gObj.print();
                break;

              case gID + "_edit":
                gObj.startEdit();
                break;

              case gID + "_update":
                gObj.endEdit();
                break;

              case gID + "_cancel":
                gObj.closeEdit();
                break;

              case gID + "_add":
                gObj.addRecord();
                break;

              case gID + "_delete":
                gObj.deleteRecord();
                break;

              case gID + "_search":
                args.originalEvent.target.id === gID + "_searchbutton" && this.search();
                break;

              case gID + "_columnchooser":
                var tarElement = this.parent.element.querySelector(".e-ccdiv"), y = tarElement.getBoundingClientRect().top, x = tarElement.getBoundingClientRect().left, targetEle = args.originalEvent.target;
                y = tarElement.getBoundingClientRect().top + tarElement.offsetTop, gObj.createColumnchooser(x, y, targetEle);
            }
        }, Toolbar$$1.prototype.modelChanged = function(e) {
            "edit" === e.module && this.refreshToolbarItems();
        }, Toolbar$$1.prototype.onPropertyChanged = function(e) {
            e.module === this.getModuleName() && this.parent.toolbar && (this.element && remove(this.element), 
            this.render());
        }, Toolbar$$1.prototype.keyUpHandler = function(e) {
            13 === e.keyCode && this.search();
        }, Toolbar$$1.prototype.search = function() {
            this.parent.search(this.searchElement.value);
        }, Toolbar$$1.prototype.updateSearchBox = function() {
            this.searchElement && (this.searchElement.value = this.parent.searchSettings.key);
        }, Toolbar$$1.prototype.wireEvent = function() {
            this.searchElement && (this.searchBoxObj = new SearchBox(this.searchElement), EventHandler.add(this.searchElement, "keyup", this.keyUpHandler, this), 
            this.searchBoxObj.wireEvent());
        }, Toolbar$$1.prototype.unWireEvent = function() {
            this.searchElement && (EventHandler.remove(this.searchElement, "keyup", this.keyUpHandler), 
            this.searchBoxObj.unWireEvent());
        }, Toolbar$$1.prototype.addEventListener = function() {
            this.parent.isDestroyed || (this.parent.on(initialEnd, this.render, this), this.parent.on(uiUpdate, this.onPropertyChanged, this), 
            this.parent.on(inBoundModelChanged, this.updateSearchBox.bind(this)), this.parent.on(modelChanged, this.refreshToolbarItems, this), 
            this.parent.on("toolbar-refresh", this.refreshToolbarItems, this), this.parent.on(inBoundModelChanged, this.modelChanged, this), 
            this.parent.on(dataBound, this.refreshToolbarItems, this));
        }, Toolbar$$1.prototype.removeEventListener = function() {
            this.parent.isDestroyed || (this.parent.off(initialEnd, this.render), this.parent.off(uiUpdate, this.onPropertyChanged), 
            this.parent.off(inBoundModelChanged, this.updateSearchBox), this.parent.off(modelChanged, this.refreshToolbarItems), 
            this.parent.off("toolbar-refresh", this.refreshToolbarItems), this.parent.off(inBoundModelChanged, this.modelChanged), 
            this.parent.off(dataBound, this.refreshToolbarItems));
        }, Toolbar$$1.prototype.getModuleName = function() {
            return "toolbar";
        }, Toolbar$$1;
    }(), __extends$128 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), FooterRenderer = function(_super) {
        function FooterRenderer(gridModule, serviceLocator) {
            var _this = _super.call(this, gridModule, serviceLocator) || this;
            return _this.aggregates = {}, _this.parent = gridModule, _this.locator = serviceLocator, 
            _this.modelGenerator = new SummaryModelGenerator(_this.parent), _this.addEventListener(), 
            _this;
        }
        return __extends$128(FooterRenderer, _super), FooterRenderer.prototype.renderPanel = function() {
            var div = createElement("div", {
                className: "e-gridfooter"
            }), innerDiv = createElement("div", {
                className: "e-summarycontent"
            }), movableContent = innerDiv;
            if (this.parent.getFrozenColumns()) {
                var fDiv = createElement("div", {
                    className: "e-frozenfootercontent"
                }), mDiv = createElement("div", {
                    className: "e-movablefootercontent"
                });
                innerDiv.appendChild(fDiv), innerDiv.appendChild(mDiv), this.frozenContent = fDiv, 
                this.movableContent = mDiv, movableContent = mDiv;
            }
            Browser.isDevice && (movableContent.style.overflowX = "scroll"), div.appendChild(innerDiv), 
            this.setPanel(div), null != this.parent.getPager() ? this.parent.element.insertBefore(div, this.parent.getPager()) : this.parent.element.appendChild(div);
        }, FooterRenderer.prototype.renderTable = function() {
            this.getPanel();
            var table = this.createContentTable("_footer_table").querySelector(".e-table"), tFoot = createElement("tfoot");
            if (table.appendChild(tFoot), this.parent.getFrozenColumns()) {
                var freezeTable = table.cloneNode(!0);
                this.frozenContent.appendChild(freezeTable), this.freezeTable = freezeTable, this.movableContent.appendChild(table), 
                remove(table.querySelector("colgroup"));
                var colGroup = this.parent.getHeaderContent().querySelector(".e-movableheader").querySelector("colgroup").cloneNode(!0);
                table.insertBefore(colGroup, table.querySelector("tbody")), this.setColGroup(colGroup);
            }
            this.setTable(table);
        }, FooterRenderer.prototype.renderSummaryContent = function(e, table, cStart, cEnd) {
            var input = this.parent.dataSource instanceof Array ? this.parent.dataSource : this.parent.currentViewData, summaries = this.modelGenerator.getData(), dummies = isNullOrUndefined(cStart) ? this.modelGenerator.getColumns() : this.modelGenerator.getColumns(cStart, cEnd), rows = isNullOrUndefined(cStart) ? this.modelGenerator.generateRows(input, e || this.aggregates) : this.modelGenerator.generateRows(input, e || this.aggregates, cStart, cEnd), fragment = document.createDocumentFragment(), rowrenderer = new RowRenderer(this.locator, null, this.parent);
            rowrenderer.element = createElement("TR", {
                className: "e-summaryrow"
            });
            for (var srow = 0, len = summaries.length; srow < len; srow++) {
                var row = rows[srow];
                if (row) {
                    var tr = rowrenderer.render(row, dummies);
                    fragment.appendChild(tr);
                }
            }
            table.tFoot.appendChild(fragment), this.aggregates = e;
        }, FooterRenderer.prototype.refresh = function(e) {
            if (this.parent.getFrozenColumns() && (remove(this.getPanel()), this.renderPanel(), 
            this.renderTable(), this.freezeTable.tFoot.innerHTML = "", this.renderSummaryContent(e, this.freezeTable, 0, this.parent.getFrozenColumns())), 
            this.getTable().tFoot.innerHTML = "", this.renderSummaryContent(e, this.getTable(), this.parent.getFrozenColumns()), 
            this.parent.getFrozenColumns()) {
                var frozenDiv = this.frozenContent;
                frozenDiv.offsetHeight || (frozenDiv.style.height = this.getTable().offsetHeight + "px");
            }
            this.onScroll();
        }, FooterRenderer.prototype.refreshCol = function() {
            var mheaderCol, fheaderCol = mheaderCol = this.parent.element.querySelector(".e-gridheader").querySelector("colgroup").cloneNode(!0);
            this.parent.getFrozenColumns() && (mheaderCol = renderMovable(fheaderCol, this.parent.getFrozenColumns()), 
            this.freezeTable.replaceChild(fheaderCol, this.freezeTable.querySelector("colGroup"))), 
            this.getTable().replaceChild(mheaderCol, this.getColGroup()), this.setColGroup(mheaderCol);
        }, FooterRenderer.prototype.onWidthChange = function(args) {
            this.getColFromIndex(args.index).style.width = formatUnit(args.width), this.parent.allowResizing && "resize" === args.module && this.updateFooterTableWidth(this.getTable());
        }, FooterRenderer.prototype.onScroll = function(e) {
            void 0 === e && (e = {
                left: this.parent.getContent().firstChild.scrollLeft
            }), this.getTable().parentElement.scrollLeft = e.left;
        }, FooterRenderer.prototype.getColFromIndex = function(index) {
            var fCol = this.parent.getFrozenColumns();
            return fCol && fCol > index ? this.freezeTable.querySelector("colGroup").children[index] : this.getColGroup().children[index - fCol];
        }, FooterRenderer.prototype.columnVisibilityChanged = function() {
            this.refresh();
        }, FooterRenderer.prototype.addEventListener = function() {
            this.parent.on(colGroupRefresh, this.refreshCol, this), this.parent.on(columnWidthChanged, this.onWidthChange, this), 
            this.parent.on("scroll", this.onScroll, this), this.parent.on(columnVisibilityChanged, this.columnVisibilityChanged, this);
        }, FooterRenderer.prototype.removeEventListener = function() {
            this.parent.off(colGroupRefresh, this.refreshCol), this.parent.off(columnWidthChanged, this.onWidthChange), 
            this.parent.off("scroll", this.onScroll), this.parent.off(columnVisibilityChanged, this.columnVisibilityChanged);
        }, FooterRenderer.prototype.updateFooterTableWidth = function(tFoot) {
            var tHead = this.parent.getHeaderTable();
            tHead && tFoot && (tFoot.style.width = tHead.style.width);
        }, FooterRenderer;
    }(ContentRender), __extends$129 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), SummaryCellRenderer = function(_super) {
        function SummaryCellRenderer() {
            var _this = null !== _super && _super.apply(this, arguments) || this;
            return _this.element = createElement("TD", {
                className: "e-summarycell",
                attrs: {
                    role: "gridcell",
                    tabindex: "-1"
                }
            }), _this;
        }
        return __extends$129(SummaryCellRenderer, _super), SummaryCellRenderer.prototype.getValue = function(field, data, column) {
            var key;
            return key = isNullOrUndefined(column.type) ? column.columnName : column.field + " - " + ("string" == typeof column.type ? column.type.toLowerCase() : ""), 
            data[column.columnName] ? data[column.columnName][key] : "";
        }, SummaryCellRenderer.prototype.evaluate = function(node, cell, data, attributes$$1) {
            var column = cell.column;
            if (!(column.footerTemplate || column.groupFooterTemplate || column.groupCaptionTemplate)) return !0;
            var tempObj = column.getTemplate(cell.cellType);
            return appendChildren(node, tempObj.fn(data[column.columnName], this.parent, tempObj.property)), 
            !1;
        }, SummaryCellRenderer;
    }(CellRenderer), Aggregate = function() {
        function Aggregate(parent, locator) {
            this.parent = parent, this.locator = locator, this.addEventListener();
        }
        return Aggregate.prototype.getModuleName = function() {
            return "aggregate";
        }, Aggregate.prototype.initiateRender = function() {
            var _this = this, cellFac = this.locator.getService("cellRendererFactory"), instance = new SummaryCellRenderer(this.parent, this.locator);
            [ CellType.Summary, CellType.CaptionSummary, CellType.GroupSummary ].forEach(function(type) {
                return cellFac.addCellRenderer(type, instance);
            }), this.footerRenderer = new FooterRenderer(this.parent, this.locator), this.footerRenderer.renderPanel(), 
            this.footerRenderer.renderTable(), this.locator.register("footerRenderer", this.footerRenderer);
            var fn = function() {
                _this.prepareSummaryInfo(), _this.parent.off(dataReady, fn);
            };
            this.parent.on(dataReady, fn, this), this.parent.on(dataReady, this.footerRenderer.refresh, this.footerRenderer);
        }, Aggregate.prototype.prepareSummaryInfo = function() {
            var _this = this;
            !function(aggregates, callback) {
                aggregates.forEach(function(row) {
                    row.columns.forEach(function(column) {
                        callback(column, row);
                    });
                });
            }(this.parent.aggregates, function(column) {
                var type = (_this.parent.getColumnByField(column.field) || {}).type;
                column.setPropertiesSilent({
                    format: _this.getFormatFromType(column.format, type)
                }), column.setFormatter(), column.setPropertiesSilent({
                    columnName: column.columnName || column.field
                });
            });
        }, Aggregate.prototype.getFormatFromType = function(format, type) {
            if (isNullOrUndefined(type) || "string" != typeof format) return format;
            var obj;
            switch (type) {
              case "number":
                obj = {
                    format: format
                };
                break;

              case "date":
                obj = {
                    type: type,
                    skeleton: format
                };
                break;

              case "datetime":
                obj = {
                    type: "dateTime",
                    skeleton: format
                };
            }
            return obj;
        }, Aggregate.prototype.onPropertyChanged = function(e) {
            if (e.module === this.getModuleName()) {
                isNullOrUndefined(this.footerRenderer) && this.initiateRender(), this.prepareSummaryInfo(), 
                this.footerRenderer.refresh();
                var cModel = new CaptionSummaryModelGenerator(this.parent);
                0 === new GroupSummaryModelGenerator(this.parent).getData().length && cModel.isEmpty() || this.parent.notify(modelChanged, {});
            }
        }, Aggregate.prototype.addEventListener = function() {
            this.parent.isDestroyed || (this.parent.on(initialEnd, this.initiateRender, this), 
            this.parent.on(uiUpdate, this.onPropertyChanged, this));
        }, Aggregate.prototype.removeEventListener = function() {
            this.parent.isDestroyed || (this.footerRenderer.removeEventListener(), this.parent.off(initialEnd, this.initiateRender), 
            this.parent.off(dataReady, this.footerRenderer.refresh), this.parent.off(uiUpdate, this.onPropertyChanged));
        }, Aggregate.prototype.destroy = function() {
            this.removeEventListener(), remove(this.parent.element.querySelector(".e-gridfooter"));
        }, Aggregate;
    }(), InterSectionObserver = function() {
        function InterSectionObserver(element, options) {
            var _this = this;
            this.fromWheel = !1, this.touchMove = !1, this.options = {}, this.sentinelInfo = {
                up: {
                    check: function(rect, info) {
                        var top = rect.top - _this.containerRect.top;
                        return info.entered = top >= 0, top + _this.options.pageHeight / 2 >= 0;
                    },
                    axis: "Y"
                },
                down: {
                    check: function(rect, info) {
                        _this.options.container.clientHeight;
                        var top = rect.bottom;
                        return info.entered = rect.bottom <= _this.containerRect.bottom, top - _this.options.pageHeight / 2 <= _this.options.pageHeight / 2;
                    },
                    axis: "Y"
                },
                right: {
                    check: function(rect, info) {
                        var right = rect.right;
                        return info.entered = right < _this.containerRect.right, right - _this.containerRect.width <= _this.containerRect.right;
                    },
                    axis: "X"
                },
                left: {
                    check: function(rect, info) {
                        var left = rect.left;
                        return info.entered = left > 0, left + _this.containerRect.width >= _this.containerRect.left;
                    },
                    axis: "X"
                }
            }, this.element = element, this.options = options;
        }
        return InterSectionObserver.prototype.observe = function(callback, onEnterCallback) {
            var _this = this;
            this.containerRect = this.options.container.getBoundingClientRect(), EventHandler.add(this.options.container, "wheel", function() {
                return _this.fromWheel = !0;
            }, this), EventHandler.add(this.options.container, "scroll", this.virtualScrollHandler(callback, onEnterCallback), this);
        }, InterSectionObserver.prototype.check = function(direction) {
            var info = this.sentinelInfo[direction];
            return info.check(this.element.getBoundingClientRect(), info);
        }, InterSectionObserver.prototype.virtualScrollHandler = function(callback, onEnterCallback) {
            var _this = this, prevTop = 0, prevLeft = 0, debounced100 = debounce(callback, 100), debounced50 = debounce(callback, 50);
            return function(e) {
                var top = e.target.scrollTop, left = e.target.scrollLeft, direction = prevTop < top ? "down" : "up";
                direction = prevLeft === left ? direction : prevLeft < left ? "right" : "left", 
                prevTop = top, prevLeft = left;
                var current = _this.sentinelInfo[direction];
                if (-1 !== _this.options.axes.indexOf(current.axis)) {
                    var check = _this.check(direction);
                    if (current.entered && onEnterCallback(_this.element, current, direction, {
                        top: top,
                        left: left
                    }), check) {
                        var fn = _this.fromWheel ? _this.options.debounceEvent ? debounced100 : callback : debounced100;
                        "X" === current.axis && (fn = debounced50), fn({
                            direction: direction,
                            sentinel: current,
                            offset: {
                                top: top,
                                left: left
                            }
                        });
                    }
                    _this.fromWheel = !1;
                }
            };
        }, InterSectionObserver.prototype.setPageHeight = function(value) {
            this.options.pageHeight = value;
        }, InterSectionObserver;
    }(), VirtualRowModelGenerator = function() {
        function VirtualRowModelGenerator(parent) {
            this.cOffsets = {}, this.cache = {}, this.data = {}, this.groups = {}, this.parent = parent, 
            this.model = this.parent.pageSettings, this.rowModelGenerator = this.parent.allowGrouping ? new GroupModelGenerator(this.parent) : new RowModelGenerator(this.parent);
        }
        return VirtualRowModelGenerator.prototype.generateRows = function(data, notifyArgs) {
            var _this = this, info = notifyArgs.virtualInfo = notifyArgs.virtualInfo || this.getData(), xAxis = info.sentinelInfo && "X" === info.sentinelInfo.axis, page = xAxis || !info.loadNext || info.loadSelf ? info.page : info.nextInfo.page, result = [], indexes = (this.model.pageSize, 
            this.getBlockIndexes(page)), loadedBlocks = [];
            this.checkAndResetCache(notifyArgs.requestType), this.parent.enableColumnVirtualization && info.blockIndexes.forEach(function(value) {
                _this.isBlockAvailable(value) && (_this.cache[value] = _this.rowModelGenerator.refreshRows(_this.cache[value]));
            }), info.blockIndexes.forEach(function(value) {
                if (!_this.isBlockAvailable(value)) {
                    var rows = _this.rowModelGenerator.generateRows(data, {
                        virtualInfo: info,
                        startIndex: _this.getStartIndex(value, data)
                    }), median = ~~Math.max(rows.length, _this.model.pageSize) / 2;
                    _this.isBlockAvailable(indexes[0]) || (_this.cache[indexes[0]] = rows.slice(0, median)), 
                    _this.isBlockAvailable(indexes[1]) || (_this.cache[indexes[1]] = rows.slice(median));
                }
                _this.parent.groupSettings.columns.length && !xAxis && _this.cache[value] && (_this.cache[value] = _this.updateGroupRow(_this.cache[value], value)), 
                result.push.apply(result, _this.cache[value]), _this.isBlockAvailable(value) && loadedBlocks.push(value);
            }), info.blockIndexes = loadedBlocks;
            return this.parent.allowGrouping ? this.parent.currentViewData.records = result.map(function(m) {
                return m.data;
            }) : this.parent.currentViewData = result.map(function(m) {
                return m.data;
            }), result;
        }, VirtualRowModelGenerator.prototype.getBlockIndexes = function(page) {
            return [ page + (page - 1), 2 * page ];
        }, VirtualRowModelGenerator.prototype.getPage = function(block) {
            return block % 2 == 0 ? block / 2 : (block + 1) / 2;
        }, VirtualRowModelGenerator.prototype.isBlockAvailable = function(value) {
            return value in this.cache;
        }, VirtualRowModelGenerator.prototype.getData = function() {
            return {
                page: this.model.currentPage,
                blockIndexes: this.getBlockIndexes(this.model.currentPage),
                direction: "down",
                columnIndexes: this.parent.getColumnIndexesInView()
            };
        }, VirtualRowModelGenerator.prototype.getStartIndex = function(blk, data, full) {
            void 0 === full && (full = !0);
            var even = blk % 2 == 0, index = (this.getPage(blk) - 1) * this.model.pageSize;
            return full || !even ? index : index + ~~(this.model.pageSize / 2);
        }, VirtualRowModelGenerator.prototype.getColumnIndexes = function(content) {
            var _this = this;
            void 0 === content && (content = this.parent.getHeaderContent().firstChild);
            var indexes = [], sLeft = 0 | content.scrollLeft, keys = Object.keys(this.cOffsets), cWidth = content.getBoundingClientRect().width;
            sLeft = Math.min(this.cOffsets[keys.length - 1] - cWidth, sLeft);
            var calWidth = Browser.isDevice ? 2 * cWidth : cWidth / 2, left = sLeft + cWidth + (0 === sLeft ? calWidth : 0);
            return keys.some(function(offset, indx, input) {
                var iOffset = Number(offset), offsetVal = _this.cOffsets[offset];
                return sLeft - calWidth <= offsetVal && left + calWidth >= offsetVal && indexes.push(iOffset), 
                left + calWidth < offsetVal;
            }), indexes;
        }, VirtualRowModelGenerator.prototype.checkAndResetCache = function(action) {
            var clear = [ "paging", "refresh", "sorting", "filtering", "searching", "grouping", "ungrouping", "reorder" ].some(function(value) {
                return action === value;
            });
            return clear && (this.cache = {}, this.data = {}, this.groups = {}), clear;
        }, VirtualRowModelGenerator.prototype.refreshColOffsets = function() {
            var _this = this, col = 0;
            this.cOffsets = {};
            var gLen = this.parent.groupSettings.columns.length, cols = this.parent.columns, cLen = cols.length;
            this.parent.groupSettings.columns.forEach(function(c, n) {
                return _this.cOffsets[n] = 30 + (0 | _this.cOffsets[n - 1]);
            }), Array.apply(null, Array(cLen)).map(function() {
                return col++;
            }).forEach(function(block, i) {
                block += gLen, _this.cOffsets[block] = (0 | _this.cOffsets[block - 1]) + (function(column) {
                    return column.visible && (_this.parent.groupSettings.showGroupedColumn ? column.visible : _this.parent.groupSettings.columns.indexOf(column.field) < 0);
                }(cols[i]) ? parseInt(cols[i].width, 10) : 0);
            });
        }, VirtualRowModelGenerator.prototype.updateGroupRow = function(current, block) {
            var _this = this, currentFirst = current[0], rows = [];
            return Object.keys(this.cache).forEach(function(key) {
                Number(key) < block && (rows = rows.concat(_this.cache[key]));
            }), currentFirst && currentFirst.isDataRow || block % 2 == 0 ? current : this.iterateGroup(current, rows);
        }, VirtualRowModelGenerator.prototype.iterateGroup = function(current, rows) {
            var currentFirst = current[0], offset = 0;
            if (currentFirst && currentFirst.isDataRow) return current;
            return current.some(function(row) {
                return rows.some(function(oRow, index) {
                    var res = oRow && void 0 !== oRow.data.field && oRow.data.field === row.data.field && oRow.data.key === row.data.key;
                    return res && (offset = index), res;
                });
            }) && (current.shift(), current = this.iterateGroup(current, rows.slice(offset))), 
            current;
        }, VirtualRowModelGenerator.prototype.getRows = function() {
            var _this = this, rows = [];
            return Object.keys(this.cache).forEach(function(key) {
                return rows = rows.concat(_this.cache[key]);
            }), rows;
        }, VirtualRowModelGenerator;
    }(), __extends$130 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), VirtualContentRenderer = function(_super) {
        function VirtualContentRenderer(parent, locator) {
            var _this = _super.call(this, parent, locator) || this;
            return _this.prevHeight = 0, _this.preventEvent = !1, _this.actions = [ "filtering", "searching", "grouping", "ungrouping" ], 
            _this.offsets = {}, _this.tmpOffsets = {}, _this.virtualEle = new VirtualElementHandler(), 
            _this.offsetKeys = [], _this.isFocused = !1, _this.locator = locator, _this.eventListener("on"), 
            _this.vgenerator = _this.generator, _this;
        }
        return __extends$130(VirtualContentRenderer, _super), VirtualContentRenderer.prototype.renderTable = function() {
            this.header = this.locator.getService("rendererFactory").getRenderer(RenderType.Header), 
            _super.prototype.renderTable.call(this), this.virtualEle.table = this.getTable(), 
            this.virtualEle.content = this.content = this.getPanel().firstChild, this.virtualEle.renderWrapper(), 
            this.virtualEle.renderPlaceHolder(), this.virtualEle.wrapper.style.position = "absolute";
            var debounceEvent = this.parent.dataSource instanceof DataManager && !this.parent.dataSource.dataSource.offline, opt = {
                container: this.content,
                pageHeight: 2 * this.getBlockHeight(),
                debounceEvent: debounceEvent,
                axes: this.parent.enableColumnVirtualization ? [ "X", "Y" ] : [ "Y" ]
            };
            this.observer = new InterSectionObserver(this.virtualEle.wrapper, opt);
        }, VirtualContentRenderer.prototype.renderEmpty = function(tbody) {
            this.getTable().appendChild(tbody), this.virtualEle.adjustTable(0, 0);
        }, VirtualContentRenderer.prototype.scrollListener = function(scrollArgs) {
            if (this.preventEvent || this.parent.isDestroyed) this.preventEvent = !1; else {
                this.isFocused = this.content === closest(document.activeElement, ".e-content") || this.content === document.activeElement;
                var info = scrollArgs.sentinel, viewInfo = this.getInfoFromView(scrollArgs.direction, info, scrollArgs.offset);
                this.prevInfo && ("Y" === info.axis && this.prevInfo.blockIndexes.toString() === viewInfo.blockIndexes.toString() || "X" === info.axis && this.prevInfo.columnIndexes.toString() === viewInfo.columnIndexes.toString()) || (this.parent.setColumnIndexesInView(this.parent.enableColumnVirtualization ? viewInfo.columnIndexes : []), 
                this.parent.pageSettings.currentPage = viewInfo.loadNext && !viewInfo.loadSelf ? viewInfo.nextInfo.page : viewInfo.page, 
                this.parent.notify(viewInfo.event, {
                    requestType: "virtualscroll",
                    virtualInfo: viewInfo
                }));
            }
        }, VirtualContentRenderer.prototype.block = function(blk) {
            return this.vgenerator.isBlockAvailable(blk);
        }, VirtualContentRenderer.prototype.getInfoFromView = function(direction, info, e) {
            var tempBlocks = [], infoType = {
                direction: direction,
                sentinelInfo: info,
                offsets: e
            };
            infoType.page = this.getPageFromTop(e.top, infoType), infoType.blockIndexes = tempBlocks = this.vgenerator.getBlockIndexes(infoType.page), 
            infoType.loadSelf = !this.vgenerator.isBlockAvailable(tempBlocks[infoType.block]);
            var blocks = this.ensureBlocks(infoType);
            return infoType.blockIndexes = blocks, infoType.loadNext = !blocks.filter(function(val) {
                return -1 === tempBlocks.indexOf(val);
            }).every(this.block.bind(this)), infoType.event = infoType.loadNext || infoType.loadSelf ? modelChanged : refreshVirtualBlock, 
            infoType.nextInfo = infoType.loadNext ? {
                page: Math.max(1, infoType.page + ("down" === direction ? 1 : -1))
            } : {}, infoType.columnIndexes = "X" === info.axis ? this.vgenerator.getColumnIndexes() : this.parent.getColumnIndexesInView(), 
            this.parent.enableColumnVirtualization && "X" === info.axis && (infoType.event = refreshVirtualBlock), 
            infoType;
        }, VirtualContentRenderer.prototype.ensureBlocks = function(info) {
            var mIdx, _this = this, index = info.blockIndexes[info.block], old = index, max = Math.max, indexes = "down" === info.direction ? [ max(index, 1), ++index, ++index ] : [ max(index - 1, 1), index, index + 1 ];
            return indexes = indexes.filter(function(val, ind) {
                return indexes.indexOf(val) === ind;
            }), this.prevInfo.blockIndexes.toString() === indexes.toString() ? indexes : ((info.loadSelf || "down" === info.direction && this.isEndBlock(old)) && (indexes = this.vgenerator.getBlockIndexes(info.page)), 
            indexes.some(function(val, ind) {
                var result = val === _this.getTotalBlocks();
                return result && (mIdx = ind), result;
            }), void 0 !== mIdx && (indexes = indexes.slice(0, mIdx + 1), 0 === info.block && 1 === indexes.length && this.vgenerator.isBlockAvailable(indexes[0] - 1) && (indexes = [ indexes[0] - 1, indexes[0] ])), 
            indexes);
        }, VirtualContentRenderer.prototype.appendContent = function(target, newChild, e) {
            var info = e.virtualInfo;
            this.prevInfo = this.prevInfo || e.virtualInfo;
            var width, cBlock = info.columnIndexes[0] - 1, cOffset = this.getColumnOffset(cBlock), blocks = info.blockIndexes;
            this.parent.groupSettings.columns.length && this.refreshOffsets();
            var translate = this.getTranslateY(this.content.scrollTop, this.content.getBoundingClientRect().height, info);
            if (this.virtualEle.adjustTable(cOffset, translate), this.parent.enableColumnVirtualization && this.header.virtualEle.adjustTable(cOffset, 0), 
            this.parent.enableColumnVirtualization) {
                var cIndex = info.columnIndexes;
                width = this.getColumnOffset(cIndex[cIndex.length - 1]) - this.getColumnOffset(cIndex[0] - 1) + "", 
                this.header.virtualEle.setWrapperWidth(width);
            }
            if (this.virtualEle.setWrapperWidth(width, this.parent.enableColumnVirtualization || Browser.isIE), 
            target.appendChild(newChild), this.getTable().appendChild(target), this.parent.groupSettings.columns.length) {
                if ("up" === info.direction) {
                    var blk = this.offsets[this.getTotalBlocks()] - this.prevHeight;
                    this.preventEvent = !0;
                    var sTop = this.content.scrollTop;
                    this.content.scrollTop = sTop + blk;
                }
                this.setVirtualHeight(), this.observer.setPageHeight(this.getOffset(blocks[blocks.length - 1]) - this.getOffset(blocks[0] - 1));
            }
            this.prevInfo = info, this.isFocused && this.content.focus();
        }, VirtualContentRenderer.prototype.onDataReady = function(e) {
            isNullOrUndefined(e.count) || (this.count = e.count, this.maxPage = Math.ceil(e.count / this.parent.pageSettings.pageSize)), 
            this.vgenerator.checkAndResetCache(e.requestType), this.refreshOffsets(), this.setVirtualHeight(), 
            this.resetScrollPosition(e.requestType);
        }, VirtualContentRenderer.prototype.setVirtualHeight = function() {
            var width = this.parent.enableColumnVirtualization ? this.getColumnOffset(this.parent.columns.length + this.parent.groupSettings.columns.length - 1) + "px" : "100%";
            this.virtualEle.setVirtualHeight(this.offsets[this.getTotalBlocks()], width), this.parent.enableColumnVirtualization && this.header.virtualEle.setVirtualHeight(1, width);
        }, VirtualContentRenderer.prototype.getPageFromTop = function(sTop, info) {
            var _this = this, total = this.getTotalBlocks(), page = 0;
            this.offsets[total], this.prevHeight;
            return this.offsetKeys.some(function(offset) {
                var iOffset = Number(offset), border = sTop < _this.offsets[offset] || iOffset === total && sTop > _this.offsets[offset];
                return border && (info.block = iOffset % 2 == 0 ? 1 : 0, page = Math.max(1, Math.min(_this.vgenerator.getPage(iOffset), _this.maxPage))), 
                border;
            }), page;
        }, VirtualContentRenderer.prototype.getTranslateY = function(sTop, cHeight, info) {
            void 0 === info && ((info = {
                page: this.getPageFromTop(sTop, {})
            }).blockIndexes = this.vgenerator.getBlockIndexes(info.page));
            var block = (info.blockIndexes[0] || 1) - 1, translate = this.getOffset(block), endTranslate = this.getOffset(info.blockIndexes[info.blockIndexes.length - 1]);
            return translate > sTop ? this.getOffset(block - 1) : endTranslate < sTop + cHeight ? this.getOffset(block + 1) : translate;
        }, VirtualContentRenderer.prototype.getOffset = function(block) {
            return Math.min(0 | this.offsets[block], this.offsets[this.maxBlock]);
        }, VirtualContentRenderer.prototype.onEntered = function() {
            var _this = this;
            return function(element, current, direction, e) {
                var xAxis = "X" === current.axis, top = _this.prevInfo.offsets ? _this.prevInfo.offsets.top : null, height = _this.content.getBoundingClientRect().height, x = _this.getColumnOffset(xAxis ? _this.vgenerator.getColumnIndexes()[0] - 1 : _this.prevInfo.columnIndexes[0] - 1), y = _this.getTranslateY(e.top, height, xAxis && top === e.top ? _this.prevInfo : void 0);
                _this.virtualEle.adjustTable(x, Math.min(y, _this.offsets[_this.maxBlock])), _this.parent.enableColumnVirtualization && _this.header.virtualEle.adjustTable(x, 0);
            };
        }, VirtualContentRenderer.prototype.eventListener = function(action) {
            var _this = this;
            this.parent[action](dataReady, this.onDataReady, this), this.parent[action](refreshVirtualBlock, this.refreshContentRows, this), 
            this.actions.forEach(function(event) {
                return _this.parent[action](event + "-begin", _this.onActionBegin, _this);
            });
            var fn = function() {
                _this.observer.observe(function(scrollArgs) {
                    return _this.scrollListener(scrollArgs);
                }, _this.onEntered()), _this.parent.off(contentReady, fn);
            };
            this.parent.on(contentReady, fn, this);
        }, VirtualContentRenderer.prototype.getBlockSize = function() {
            return this.parent.pageSettings.pageSize >> 1;
        }, VirtualContentRenderer.prototype.getBlockHeight = function() {
            return this.getBlockSize() * this.getRowHeight();
        }, VirtualContentRenderer.prototype.isEndBlock = function(index) {
            var totalBlocks = this.getTotalBlocks();
            return index >= totalBlocks || index === totalBlocks - 1;
        }, VirtualContentRenderer.prototype.getRowHeight = function() {
            return this.parent.rowHeight ? this.parent.rowHeight : getRowHeight();
        }, VirtualContentRenderer.prototype.getTotalBlocks = function() {
            return Math.ceil(this.count / this.getBlockSize());
        }, VirtualContentRenderer.prototype.getColumnOffset = function(block) {
            return 0 | this.vgenerator.cOffsets[block];
        }, VirtualContentRenderer.prototype.getModelGenerator = function() {
            return new VirtualRowModelGenerator(this.parent);
        }, VirtualContentRenderer.prototype.resetScrollPosition = function(action) {
            this.actions.some(function(value) {
                return value === action;
            }) && (this.preventEvent = 0 !== this.content.scrollTop, this.content.scrollTop = 0);
        }, VirtualContentRenderer.prototype.onActionBegin = function(e) {
            this.parent.setProperties({
                pageSettings: {
                    currentPage: 1
                }
            }, !0);
        }, VirtualContentRenderer.prototype.getRows = function() {
            return this.vgenerator.getRows();
        }, VirtualContentRenderer.prototype.getRowByIndex = function(index) {
            var startIdx = (this.prevInfo.blockIndexes[0] - 1) * this.getBlockSize();
            return this.parent.getDataRows()[index - startIdx];
        }, VirtualContentRenderer.prototype.getVirtualRowIndex = function(index) {
            return (this.prevInfo.blockIndexes[0] - 1) * this.getBlockSize() + index;
        }, VirtualContentRenderer.prototype.refreshOffsets = function() {
            var _this = this, row = 0, bSize = this.getBlockSize(), total = this.getTotalBlocks();
            this.prevHeight = this.offsets[total], this.maxBlock = total % 2 == 0 ? total - 2 : total - 1, 
            this.offsets = {}, Array.apply(null, Array(total)).map(function() {
                return ++row;
            }).forEach(function(block) {
                var tmp = (_this.vgenerator.cache[block] || []).length, rem = _this.count % bSize, size = block in _this.vgenerator.cache ? tmp * _this.getRowHeight() : rem && block === total ? rem * _this.getRowHeight() : _this.getBlockHeight();
                _this.offsets[block] = (0 | _this.offsets[block - 1]) + size, _this.tmpOffsets[block] = 0 | _this.offsets[block - 1];
            }), this.offsetKeys = Object.keys(this.offsets), this.parent.enableColumnVirtualization && this.vgenerator.refreshColOffsets();
        }, VirtualContentRenderer.prototype.refreshVirtualElement = function() {
            this.vgenerator.refreshColOffsets(), this.setVirtualHeight();
        }, VirtualContentRenderer;
    }(ContentRender), VirtualHeaderRenderer = function(_super) {
        function VirtualHeaderRenderer(parent, locator) {
            var _this = _super.call(this, parent, locator) || this;
            return _this.virtualEle = new VirtualElementHandler(), _this.gen = new VirtualRowModelGenerator(_this.parent), 
            _this.parent.on(refreshVirtualBlock, function(e) {
                return "X" === e.virtualInfo.sentinelInfo.axis ? _this.refreshUI() : null;
            }, _this), _this;
        }
        return __extends$130(VirtualHeaderRenderer, _super), VirtualHeaderRenderer.prototype.renderTable = function() {
            this.gen.refreshColOffsets(), this.parent.setColumnIndexesInView(this.gen.getColumnIndexes(this.getPanel().firstChild)), 
            _super.prototype.renderTable.call(this), this.virtualEle.table = this.getTable(), 
            this.virtualEle.content = this.getPanel().firstChild, this.virtualEle.content.style.position = "relative", 
            this.virtualEle.renderWrapper(), this.virtualEle.renderPlaceHolder("absolute");
        }, VirtualHeaderRenderer.prototype.appendContent = function(table) {
            this.virtualEle.wrapper.appendChild(table);
        }, VirtualHeaderRenderer.prototype.refreshUI = function() {
            this.gen.refreshColOffsets(), this.parent.setColumnIndexesInView(this.gen.getColumnIndexes(this.getPanel().firstChild)), 
            _super.prototype.refreshUI.call(this);
        }, VirtualHeaderRenderer;
    }(HeaderRender), VirtualElementHandler = function() {
        function VirtualElementHandler() {}
        return VirtualElementHandler.prototype.renderWrapper = function() {
            this.wrapper = createElement("div", {
                className: "e-virtualtable"
            }), this.wrapper.appendChild(this.table), this.content.appendChild(this.wrapper);
        }, VirtualElementHandler.prototype.renderPlaceHolder = function(position) {
            void 0 === position && (position = "relative"), this.placeholder = createElement("div", {
                className: "e-virtualtrack",
                styles: "position:" + position
            }), this.content.appendChild(this.placeholder);
        }, VirtualElementHandler.prototype.adjustTable = function(xValue, yValue) {
            this.wrapper.style.transform = "translate(" + xValue + "px, " + yValue + "px)";
        }, VirtualElementHandler.prototype.setWrapperWidth = function(width, full) {
            this.wrapper.style.width = width ? width + "px" : full ? "100%" : "";
        }, VirtualElementHandler.prototype.setVirtualHeight = function(height, width) {
            this.placeholder.style.height = height + "px", this.placeholder.style.width = width;
        }, VirtualElementHandler;
    }(), VirtualScroll = function() {
        function VirtualScroll(parent, locator) {
            this.parent = parent, this.locator = locator, this.addEventListener();
        }
        return VirtualScroll.prototype.getModuleName = function() {
            return "virtualscroll";
        }, VirtualScroll.prototype.instantiateRenderer = function() {
            var renderer = this.locator.getService("rendererFactory");
            this.parent.enableColumnVirtualization && renderer.addRenderer(RenderType.Header, new VirtualHeaderRenderer(this.parent, this.locator)), 
            renderer.addRenderer(RenderType.Content, new VirtualContentRenderer(this.parent, this.locator)), 
            this.ensurePageSize();
        }, VirtualScroll.prototype.ensurePageSize = function() {
            var rowHeight = getRowHeight(this.parent.element);
            this.blockSize = ~~(this.parent.height / rowHeight);
            var height = 2 * this.blockSize, size = this.parent.pageSettings.pageSize;
            this.parent.setProperties({
                pageSettings: {
                    pageSize: size < height ? height : size
                }
            }, !0);
        }, VirtualScroll.prototype.addEventListener = function() {
            this.parent.isDestroyed || (this.parent.on(initialLoad, this.instantiateRenderer, this), 
            this.parent.on(columnWidthChanged, this.refreshVirtualElement, this));
        }, VirtualScroll.prototype.removeEventListener = function() {
            this.parent.isDestroyed || (this.parent.off(initialLoad, this.instantiateRenderer), 
            this.parent.off(columnWidthChanged, this.refreshVirtualElement));
        }, VirtualScroll.prototype.refreshVirtualElement = function(args) {
            if (this.parent.enableColumnVirtualization && "resize" === args.module) {
                this.locator.getService("rendererFactory").getRenderer(RenderType.Content).refreshVirtualElement();
            }
        }, VirtualScroll.prototype.destroy = function() {
            this.removeEventListener();
        }, VirtualScroll;
    }(), InlineEditRender = function() {
        function InlineEditRender(parent) {
            this.parent = parent;
        }
        return InlineEditRender.prototype.addNew = function(elements, args) {
            var mTbody, tbody;
            if (tbody = this.parent.frozenRows ? this.parent.getHeaderContent().querySelector("tbody") : this.parent.getContentTable().querySelector("tbody"), 
            args.row = createElement("tr", {
                className: "e-row e-addedrow"
            }), tbody.querySelector(".e-emptyrow") && tbody.querySelector(".e-emptyrow").classList.add("e-hide"), 
            tbody.insertBefore(args.row, tbody.firstChild), args.row.appendChild(this.getEditElement(elements, !1)), 
            this.parent.getFrozenColumns()) {
                var mEle = this.renderMovableform(args.row);
                (mTbody = this.parent.frozenRows ? this.parent.getHeaderContent().querySelector(".e-movableheader").querySelector("tbody") : this.parent.getContent().querySelector(".e-movablecontent").querySelector("tbody")).insertBefore(mEle, mTbody.firstChild), 
                args.row.querySelector(".e-normaledit").setAttribute("colspan", this.parent.getFrozenColumns() + ""), 
                mEle.setAttribute("colspan", "" + (this.parent.getColumns().length - this.parent.getFrozenColumns()));
            }
        }, InlineEditRender.prototype.renderMovableform = function(ele) {
            var mEle = ele.cloneNode(!0);
            return this.renderMovable(ele, mEle), mEle.querySelector("colgroup").innerHTML = this.parent.getHeaderContent().querySelector(".e-movableheader").querySelector("colgroup").innerHTML, 
            mEle;
        }, InlineEditRender.prototype.updateFreezeEdit = function(row, td) {
            if (this.parent.getFrozenColumns()) {
                var idx = parseInt(row.getAttribute("aria-rowindex"), 10), fCont = this.parent.getContent().querySelector(".e-frozencontent").querySelector("tbody"), mCont = this.parent.getContent().querySelector(".e-movablecontent").querySelector("tbody"), fHdr = this.parent.getHeaderContent().querySelector(".e-frozenheader").querySelector("tbody"), mHdr = this.parent.getHeaderContent().querySelector(".e-movableheader").querySelector("tbody");
                this.parent.frozenRows && idx >= this.parent.frozenRows && (idx -= this.parent.frozenRows), 
                fCont.contains(row) ? td = td.concat([].slice.call(mCont.children[idx].querySelectorAll("td.e-rowcell"))) : mCont.contains(row) ? td = td.concat([].slice.call(fCont.children[idx].querySelectorAll("td.e-rowcell"))) : fHdr.contains(row) ? td = td.concat([].slice.call(mHdr.children[idx].querySelectorAll("td.e-rowcell"))) : mHdr.contains(row) && (td = td.concat([].slice.call(fHdr.children[idx].querySelectorAll("td.e-rowcell"))));
            }
            return td;
        }, InlineEditRender.prototype.update = function(elements, args) {
            var tdElement = [].slice.call(args.row.querySelectorAll("td.e-rowcell"));
            args.row.innerHTML = "", tdElement = this.updateFreezeEdit(args.row, tdElement), 
            args.row.appendChild(this.getEditElement(elements, !0, tdElement)), args.row.classList.add("e-editedrow"), 
            this.refreshFreezeEdit(args.row);
        }, InlineEditRender.prototype.refreshFreezeEdit = function(row) {
            var fCls, cont, td = row.firstChild, idx = parseInt(row.getAttribute("aria-rowindex"), 10);
            if (this.parent.getFrozenColumns()) {
                idx < this.parent.frozenRows ? (cont = this.parent.getHeaderContent(), fCls = ".e-frozenheader") : (cont = this.parent.getContent(), 
                fCls = ".e-frozencontent");
                var mTd = td.cloneNode(!0), fRows = void 0;
                cont.querySelector(fCls).contains(row) ? (fRows = this.parent.getMovableRowByIndex(idx), 
                this.updateFrozenCont(fRows, td, mTd)) : (fRows = this.parent.getRowByIndex(idx), 
                this.updateFrozenCont(fRows, mTd, td)), fRows.appendChild(mTd), fRows.classList.add("e-editedrow");
            }
        }, InlineEditRender.prototype.updateFrozenCont = function(row, ele, mEle) {
            row.innerHTML = "", this.renderMovable(ele, mEle), mEle.querySelector("colgroup").innerHTML = this.parent.getHeaderContent().querySelector(".e-movableheader").querySelector("colgroup").innerHTML, 
            ele.setAttribute("colspan", this.parent.getFrozenColumns() + ""), mEle.setAttribute("colspan", this.parent.getColumns().length - this.parent.getFrozenColumns() + "");
        }, InlineEditRender.prototype.renderMovable = function(ele, mEle) {
            for (var frzCols = this.parent.getFrozenColumns(), i = 0; i < frzCols; i++) mEle.querySelector("tr").removeChild(mEle.querySelector("tr").children[0]);
            i = frzCols;
            for (var len = ele.querySelector("tr").childElementCount; i < len; i++) ele.querySelector("tr").removeChild(ele.querySelector("tr").children[ele.querySelector("tr").childElementCount - 1]);
        }, InlineEditRender.prototype.getEditElement = function(elements, isEdit, tdElement) {
            var gObj = this.parent, gLen = 0, isDetail = isNullOrUndefined(gObj.detailTemplate) && isNullOrUndefined(gObj.childGrid) ? 0 : 1;
            gObj.allowGrouping && (gLen = gObj.groupSettings.columns.length);
            var td = createElement("td", {
                className: "e-editcell e-normaledit",
                attrs: {
                    colspan: (gObj.getVisibleColumns().length + gLen + isDetail).toString()
                }
            }), form = createElement("form", {
                id: gObj.element.id + "EditForm",
                className: "e-gridform"
            }), table = createElement("table", {
                className: "e-table e-inline-edit",
                attrs: {
                    cellspacing: "0.25"
                }
            });
            table.appendChild(gObj.getContentTable().querySelector("colgroup").cloneNode(!0));
            var tbody = createElement("tbody"), tr = createElement("tr"), i = 0;
            for (isDetail && tr.insertBefore(createElement("td", {
                className: "e-detailrowcollapse"
            }), tr.firstChild); i < gLen; ) tr.appendChild(createElement("td", {
                className: "e-indentcell"
            })), i++;
            var m = 0;
            for (i = 0; isEdit && m < tdElement.length && i < gObj.getColumns().length || i < gObj.getColumns().length; ) {
                var span = isEdit ? tdElement[m].getAttribute("colspan") : null, col = gObj.getColumns()[i], td_1 = createElement("td", {
                    className: "e-rowcell",
                    attrs: {
                        style: "text-align:" + (col.textAlign ? col.textAlign : ""),
                        colspan: span || ""
                    }
                });
                col.visible ? (td_1.appendChild(elements[col.uid]), "booleanedit" === col.editType ? td_1.classList.add("e-boolcell") : (col.commands || col.commandsTemplate) && addClass([ td_1 ], "e-unboundcell")) : td_1.classList.add("e-hide"), 
                tr.appendChild(td_1), i = span ? i + parseInt(span, 10) : i + 1, m++;
            }
            return tbody.appendChild(tr), table.appendChild(tbody), form.appendChild(table), 
            td.appendChild(form), td;
        }, InlineEditRender.prototype.removeEventListener = function() {}, InlineEditRender;
    }(), BatchEditRender = function() {
        function BatchEditRender(parent) {
            this.parent = parent;
        }
        return BatchEditRender.prototype.update = function(elements, args) {
            args.cell.innerHTML = "", args.cell.appendChild(this.getEditElement(elements, args)), 
            args.cell.classList.add("e-editedbatchcell"), classList(args.row, [ "e-editedrow", "e-batchrow" ], []);
        }, BatchEditRender.prototype.getEditElement = function(elements, args) {
            var form = createElement("form", {
                id: this.parent.element.id + "EditForm",
                className: "e-gridform"
            });
            return form.appendChild(elements[args.columnObject.uid]), "booleanedit" === args.columnObject.editType && args.cell.classList.add("e-boolcell"), 
            args.columnObject.editType || args.cell.classList.add("e-inputbox"), form;
        }, BatchEditRender.prototype.removeEventListener = function() {}, BatchEditRender;
    }(), DialogEditRender = function() {
        function DialogEditRender(parent, serviceLocator) {
            this.parent = parent, this.serviceLocator = serviceLocator, this.parent.isDestroyed || (this.parent.on(dialogDestroy, this.destroy, this), 
            this.parent.on(destroy$1, this.destroy, this));
        }
        return DialogEditRender.prototype.setLocaleObj = function() {
            this.l10n = this.serviceLocator.getService("localization");
        }, DialogEditRender.prototype.addNew = function(elements, args) {
            this.isEdit = !1, this.createDialog(elements, args);
        }, DialogEditRender.prototype.update = function(elements, args) {
            this.isEdit = !0, this.createDialog(elements, args);
        }, DialogEditRender.prototype.createDialog = function(elements, args) {
            var gObj = this.parent;
            this.dialog = createElement("div", {
                id: gObj.element.id + "_dialogEdit_wrapper"
            }), gObj.element.appendChild(this.dialog), this.setLocaleObj();
            var position = this.parent.element.getBoundingClientRect().height < 400 ? {
                X: "center",
                Y: "top"
            } : {
                X: "center",
                Y: "center"
            };
            this.dialogObj = new Dialog({
                header: this.isEdit ? this.l10n.getConstant("EditFormTitle") + "  " + args.primaryKeyValue[0] : this.l10n.getConstant("AddFormTitle"),
                isModal: !0,
                visible: !0,
                cssClass: "e-edit-dialog",
                content: this.getEditElement(elements),
                showCloseIcon: !0,
                allowDragging: !0,
                position: position,
                close: this.dialogClose.bind(this),
                closeOnEscape: !0,
                width: "330px",
                target: gObj.element,
                animationSettings: {
                    effect: "None"
                },
                buttons: [ {
                    click: this.btnClick.bind(this),
                    buttonModel: {
                        content: this.l10n.getConstant("SaveButton"),
                        cssClass: "e-primary",
                        isPrimary: !0
                    }
                }, {
                    click: this.btnClick.bind(this),
                    buttonModel: {
                        cssClass: "e-flat",
                        content: this.l10n.getConstant("CancelButton")
                    }
                } ]
            }), this.dialogObj.appendTo(this.dialog), changeButtonType(this.dialogObj.element);
        }, DialogEditRender.prototype.btnClick = function(e) {
            this.l10n.getConstant("CancelButton").toLowerCase() === e.target.innerText.toLowerCase() ? this.dialogClose() : this.parent.endEdit();
        }, DialogEditRender.prototype.dialogClose = function() {
            this.parent.closeEdit(), this.destroy();
        }, DialogEditRender.prototype.destroy = function(args) {
            this.parent.notify("destroy-form", {}), this.parent.isEdit = !1, this.parent.notify("toolbar-refresh", {}), 
            this.dialog && !this.dialogObj.isDestroyed && (this.dialogObj.destroy(), remove(this.dialog));
        }, DialogEditRender.prototype.getEditElement = function(elements) {
            for (var gObj = this.parent, div = createElement("div", {
                className: this.isEdit ? "e-editedrow" : "e-insertedrow"
            }), form = createElement("form", {
                id: gObj.element.id + "EditForm",
                className: "e-gridform"
            }), table = createElement("table", {
                className: "e-table",
                attrs: {
                    cellspacing: "6px"
                }
            }), tbody = createElement("tbody"), cols = gObj.getColumns(), i = 0; i < cols.length; i++) if (cols[i].visible && !cols[i].commands && !cols[i].commandsTemplate) {
                var tr = createElement("tr"), dataCell = createElement("td", {
                    className: "e-rowcell",
                    attrs: {
                        style: "text-align:" + (this.parent.enableRtl ? "right" : "left") + ";width:190px"
                    }
                });
                createElement("label", {
                    innerHTML: cols[i].field
                });
                elements[cols[i].uid].classList.remove("e-input"), dataCell.appendChild(elements[cols[i].uid]), 
                tr.appendChild(dataCell), tbody.appendChild(tr);
            }
            return table.appendChild(tbody), form.appendChild(table), div.appendChild(form), 
            div;
        }, DialogEditRender.prototype.removeEventListener = function() {
            this.parent.isDestroyed || (this.parent.off(dialogDestroy, this.destroy), this.parent.off(destroy$1, this.destroy));
        }, DialogEditRender;
    }(), EditRender = function() {
        function EditRender(parent, serviceLocator) {
            this.editType = {
                Inline: InlineEditRender,
                Normal: InlineEditRender,
                Batch: BatchEditRender,
                Dialog: DialogEditRender
            }, this.parent = parent, this.serviceLocator = serviceLocator, this.renderer = new this.editType[this.parent.editSettings.mode](parent, serviceLocator), 
            this.focus = serviceLocator.getService("focus");
        }
        return EditRender.prototype.addNew = function(args) {
            this.renderer.addNew(this.getEditElements(args), args), this.convertWidget(args);
        }, EditRender.prototype.update = function(args) {
            this.renderer.update(this.getEditElements(args), args), this.convertWidget(args);
        }, EditRender.prototype.convertWidget = function(args) {
            var isFocused, cell, fForm, gObj = this.parent, frzCols = gObj.getFrozenColumns(), form = gObj.element.querySelector(".e-gridform");
            if (frzCols && "Normal" === gObj.editSettings.mode) {
                var rowIndex = parseInt(args.row.getAttribute("aria-rowindex"), 10);
                fForm = gObj.frozenRows && ("add" === args.requestType || rowIndex < gObj.frozenRows) ? gObj.element.querySelector(".e-movableheader").querySelector(".e-gridform") : gObj.element.querySelector(".e-movablecontent").querySelector(".e-gridform");
            }
            for (var cols = "Batch" !== gObj.editSettings.mode ? gObj.getColumns() : [ gObj.getColumnByField(args.columnName) ], _i = 0, cols_1 = cols; _i < cols_1.length; _i++) {
                var col = cols_1[_i];
                if (col.visible && !col.commands) {
                    col.valueAccessor(col.field, args.rowData, col), cell = frzCols && cols.indexOf(col) >= frzCols && "Normal" === gObj.editSettings.mode ? fForm.querySelector("[e-mappinguid=" + col.uid + "]") : form.querySelector("[e-mappinguid=" + col.uid + "]");
                    col.edit.write;
                    isNullOrUndefined(cell) || (col.edit.write({
                        rowData: args.rowData,
                        element: cell,
                        column: col,
                        requestType: args.requestType,
                        row: args.row,
                        foreignKeyData: col.isForeignColumn() && getValue(col.field, args.foreignKeyData)
                    }), isFocused || cell.getAttribute("disabled") || (this.focusElement(cell, args.type), 
                    isFocused = !0));
                }
            }
        }, EditRender.prototype.focusElement = function(elem, type) {
            var chkBox = this.parent.element.querySelector(".e-edit-checkselect");
            isNullOrUndefined(chkBox) || chkBox.nextElementSibling.classList.add("e-focus"), 
            "Batch" === this.parent.editSettings.mode ? this.focus.onClick({
                target: closest(elem, "td")
            }, !0) : elem.focus(), elem.classList.contains("e-defaultcell") && elem.setSelectionRange(elem.value.length, elem.value.length);
        }, EditRender.prototype.getEditElements = function(args) {
            for (var gObj = this.parent, elements = {}, cols = "Batch" !== gObj.editSettings.mode ? gObj.getColumns() : [ gObj.getColumnByField(args.columnName) ], i = 0, len = cols.length; i < len; i++) {
                var col = cols[i];
                if (col.visible) if (col.commands || col.commandsTemplate) {
                    var cellRendererFact = this.serviceLocator.getService("cellRendererFactory"), model = new RowModelGenerator(this.parent), cellRenderer = cellRendererFact.getCellRenderer(CellType.CommandColumn), cells = model.generateRows(args.rowData)[0].cells, td = cellRenderer.render(cells[i], args.rowData, {
                        index: args.row ? args.row.getAttribute("aria-rowindex") : 0
                    });
                    (div = td.firstElementChild).setAttribute("textAlign", td.getAttribute("textAlign")), 
                    elements[col.uid] = div;
                } else {
                    var tArgs = {
                        column: col,
                        value: col.valueAccessor(col.field, args.rowData, col),
                        type: args.requestType,
                        data: args.rowData
                    }, input = (col.edit.create, void 0);
                    if ("string" == typeof (input = col.edit.create(tArgs))) {
                        var div;
                        (div = createElement("div")).innerHTML = input, input = div.firstChild;
                    }
                    attributes("input" !== input.tagName && input.querySelectorAll("input").length ? input.querySelector("input") : input, {
                        name: col.field,
                        "e-mappinguid": col.uid,
                        id: gObj.element.id + col.field
                    }), classList(input, [ "e-input", "e-field" ], []), "Right" === col.textAlign && input.classList.add("e-ralign"), 
                    ((col.isPrimaryKey || col.isIdentity) && "beginEdit" === args.requestType || col.isIdentity && "add" === args.requestType) && input.setAttribute("disabled", "true"), 
                    elements[col.uid] = input;
                }
            }
            return elements;
        }, EditRender.prototype.destroy = function() {
            this.renderer.removeEventListener();
        }, EditRender;
    }(), BooleanEditCell = function() {
        function BooleanEditCell(parent) {
            this.activeClasses = [ "e-selectionbackground", "e-active" ], this.parent = parent;
        }
        return BooleanEditCell.prototype.create = function(args) {
            var col = args.column, classNames = "e-field e-boolcell";
            return "checkbox" === col.type && (classNames = "e-field e-boolcell e-edit-checkselect"), 
            createElement("input", {
                className: classNames,
                attrs: {
                    type: "checkbox",
                    value: args.value,
                    "e-mappinguid": col.uid,
                    id: this.parent.element.id + col.field,
                    name: col.field
                }
            });
        }, BooleanEditCell.prototype.read = function(element) {
            return element.checked;
        }, BooleanEditCell.prototype.write = function(args) {
            var selectChkBox, chkState;
            if (isNullOrUndefined(args.row) || (selectChkBox = args.row.querySelector(".e-edit-checkselect")), 
            args.rowData[args.column.field] && (chkState = JSON.parse(args.rowData[args.column.field].toString().toLowerCase())), 
            !isNullOrUndefined(selectChkBox)) {
                if (this.editType = this.parent.editSettings.mode, this.editRow = args.row, "add" !== args.requestType) {
                    var row = this.parent.getRowObjectFromUID(args.row.getAttribute("data-uid"));
                    chkState = !!row && row.isSelected;
                }
                addRemoveActiveClasses.apply(void 0, [ [].slice.call(args.row.querySelectorAll(".e-rowcell")), chkState ].concat(this.activeClasses));
            }
            this.obj = new CheckBox(extend({
                label: "Dialog" !== this.parent.editSettings.mode ? "" : args.column.headerText,
                checked: chkState,
                disabled: !isEditable(args.column, args.requestType, args.element),
                enableRtl: this.parent.enableRtl,
                change: this.checkBoxChange.bind(this)
            }, args.column.edit.params)), this.obj.appendTo(args.element);
        }, BooleanEditCell.prototype.checkBoxChange = function(args) {
            if (this.editRow && "Dialog" !== this.editType) {
                var add = !1;
                args.checked ? (add = !0, this.editRow.setAttribute("aria-selected", add.toString())) : this.editRow.removeAttribute("aria-selected"), 
                addRemoveActiveClasses.apply(void 0, [ [].slice.call(this.editRow.querySelectorAll(".e-rowcell")), add ].concat(this.activeClasses));
            }
        }, BooleanEditCell.prototype.destroy = function() {
            this.obj && this.obj.destroy();
        }, BooleanEditCell;
    }(), DropDownEditCell = function() {
        function DropDownEditCell(parent) {
            this.parent = parent;
        }
        return DropDownEditCell.prototype.create = function(args) {
            return createElement("input", {
                className: "e-field",
                attrs: {
                    id: this.parent.element.id + args.column.field,
                    name: args.column.field,
                    type: "text",
                    "e-mappinguid": args.column.uid
                }
            });
        }, DropDownEditCell.prototype.write = function(args) {
            this.column = args.column;
            var isInline = "Dialog" !== this.parent.editSettings.mode;
            this.obj = new DropDownList$1(extend({
                dataSource: this.parent.dataSource instanceof DataManager ? this.parent.dataSource : new DataManager(this.parent.dataSource),
                query: new Query().select(args.column.field),
                enabled: isEditable(args.column, args.requestType, args.element),
                fields: {
                    value: args.column.field
                },
                value: args.rowData[args.column.field],
                enableRtl: this.parent.enableRtl,
                actionComplete: this.ddActionComplete.bind(this),
                placeholder: isInline ? "" : args.column.headerText,
                popupHeight: "200px",
                floatLabelType: isInline ? "Never" : "Always",
                open: this.dropDownOpen.bind(this),
                sortOrder: "Ascending"
            }, args.column.edit.params)), this.obj.appendTo(args.element), args.element.setAttribute("name", args.column.field);
        }, DropDownEditCell.prototype.read = function(element) {
            return element.ej2_instances[0].value;
        }, DropDownEditCell.prototype.ddActionComplete = function(e) {
            e.result = DataUtil.distinct(e.result, this.column.isForeignColumn() ? this.column.foreignKeyField : this.column.field, !0), 
            this.column.dataSource && (this.column.dataSource.dataSource.json = e.result);
        }, DropDownEditCell.prototype.dropDownOpen = function(args) {
            var dlgElement = parentsUntil(this.obj.element, "e-dialog");
            if (!isNullOrUndefined(dlgElement)) {
                var dlgObj = this.parent.element.querySelector("#" + dlgElement.id).ej2_instances[0];
                args.popup.element.style.zIndex = (dlgObj.zIndex + 1).toString();
            }
        }, DropDownEditCell.prototype.destroy = function() {
            this.obj && this.obj.destroy();
        }, DropDownEditCell;
    }(), NumericEditCell = function() {
        function NumericEditCell(parent) {
            this.parent = parent;
        }
        return NumericEditCell.prototype.create = function(args) {
            return createElement("input", {
                className: "e-field",
                attrs: {
                    id: this.parent.element.id + args.column.field,
                    name: args.column.field,
                    "e-mappinguid": args.column.uid
                }
            });
        }, NumericEditCell.prototype.read = function(element) {
            return element.blur(), element.ej2_instances[0].value;
        }, NumericEditCell.prototype.write = function(args) {
            var col = args.column, isInline = "Dialog" !== this.parent.editSettings.mode;
            this.obj = new NumericTextBox(extend({
                value: parseFloat(args.rowData[col.field]),
                enableRtl: this.parent.enableRtl,
                placeholder: isInline ? "" : args.column.headerText,
                enabled: isEditable(args.column, args.requestType, args.element),
                floatLabelType: "Dialog" !== this.parent.editSettings.mode ? "Never" : "Always"
            }, col.edit.params)), this.obj.appendTo(args.element), args.element.setAttribute("name", col.field);
        }, NumericEditCell.prototype.destroy = function() {
            this.obj && !this.obj.isDestroyed && this.obj.destroy();
        }, NumericEditCell;
    }(), DefaultEditCell = function() {
        function DefaultEditCell(parent) {
            this.parent = parent;
        }
        return DefaultEditCell.prototype.create = function(args) {
            var col = args.column;
            return createElement("input", {
                className: "e-field e-input e-defaultcell",
                attrs: {
                    type: "text",
                    value: isNullOrUndefined(args.value) ? "" : args.value,
                    "e-mappinguid": col.uid,
                    id: this.parent.element.id + col.field,
                    name: col.field,
                    style: "text-align:" + col.textAlign
                }
            });
        }, DefaultEditCell.prototype.read = function(element) {
            return element.value;
        }, DefaultEditCell.prototype.write = function(args) {
            args.column;
            var isInline = "Dialog" !== this.parent.editSettings.mode;
            Input.createInput({
                element: args.element,
                floatLabelType: "Dialog" !== this.parent.editSettings.mode ? "Never" : "Always",
                properties: {
                    enableRtl: this.parent.enableRtl,
                    enabled: isEditable(args.column, args.requestType, args.element),
                    placeholder: isInline ? "" : args.column.headerText
                }
            });
        }, DefaultEditCell;
    }(), NormalEdit = function() {
        function NormalEdit(parent, serviceLocator, renderer) {
            this.parent = parent, this.renderer = renderer, this.serviceLocator = serviceLocator, 
            this.addEventListener();
        }
        return NormalEdit.prototype.clickHandler = function(e) {
            var target = e.target, gObj = this.parent;
            (parentsUntil(target, "e-gridcontent") && parentsUntil(parentsUntil(target, "e-gridcontent"), "e-grid").id === gObj.element.id || gObj.frozenRows && parentsUntil(target, "e-headercontent")) && !parentsUntil(target, "e-unboundcelldiv") && (this.rowIndex = parentsUntil(target, "e-rowcell") ? parseInt(target.parentElement.getAttribute("aria-rowindex"), 10) : -1, 
            gObj.isEdit && gObj.editModule.endEdit());
        }, NormalEdit.prototype.dblClickHandler = function(e) {
            parentsUntil(e.target, "e-rowcell") && this.parent.editSettings.allowEditOnDblClick && this.parent.editModule.startEdit(parentsUntil(e.target, "e-row"));
        }, NormalEdit.prototype.editComplete = function(e) {
            switch (this.parent.isEdit = !1, e.requestType) {
              case "save":
                (this.parent.isCheckBoxSelection || "Multiple" === this.parent.selectionSettings.type) && this.parent.isPersistSelection || this.parent.selectRow(0), 
                this.parent.trigger(actionComplete, extend(e, {
                    requestType: "save",
                    type: actionComplete
                }));
                break;

              case "delete":
                this.parent.selectRow(this.editRowIndex), this.parent.trigger(actionComplete, extend(e, {
                    requestType: "delete",
                    type: actionComplete
                }));
            }
        }, NormalEdit.prototype.startEdit = function(tr) {
            var gObj = this.parent, primaryKeys = gObj.getPrimaryKeyFieldNames(), primaryKeyValues = [];
            this.rowIndex = this.editRowIndex = parseInt(tr.getAttribute("aria-rowindex"), 10), 
            this.previousData = gObj.getCurrentViewRecords()[this.rowIndex];
            for (var i = 0; i < primaryKeys.length; i++) primaryKeyValues.push(this.previousData[primaryKeys[i]]);
            this.uid = tr.getAttribute("data-uid");
            var rowObj = gObj.getRowObjectFromUID(this.uid), args = {
                row: tr,
                primaryKey: primaryKeys,
                primaryKeyValue: primaryKeyValues,
                requestType: "beginEdit",
                rowData: this.previousData,
                rowIndex: this.rowIndex,
                type: "edit",
                cancel: !1,
                foreignKeyData: rowObj && rowObj.foreignKeyData
            };
            gObj.trigger("beginEdit", args), args.type = "actionBegin", gObj.trigger(actionBegin, args), 
            args.cancel || (gObj.isEdit = !0, gObj.clearSelection(), "Dialog" === gObj.editSettings.mode && args.row.classList.add("e-dlgeditrow"), 
            this.renderer.update(args), this.uid = tr.getAttribute("data-uid"), gObj.editModule.applyFormValidation(), 
            args.type = "actionComplete", gObj.trigger(actionComplete, args), this.parent.allowTextWrap && this.parent.notify(freezeRender, {
                case: "textwrap"
            }));
        }, NormalEdit.prototype.endEdit = function() {
            var gObj = this.parent;
            if (this.parent.isEdit && gObj.editModule.formObj.validate() && (!gObj.editModule.mFormObj || gObj.editModule.mFormObj.validate())) {
                var editedData = extend({}, this.previousData), args = {
                    requestType: "save",
                    type: actionBegin,
                    data: editedData,
                    cancel: !1,
                    previousData: this.previousData,
                    selectedRow: gObj.selectedRowIndex,
                    foreignKeyData: {}
                };
                if (editedData = gObj.editModule.getCurrentEditedData(gObj.element.querySelector(".e-gridform"), editedData), 
                gObj.getFrozenColumns() && "Normal" === gObj.editSettings.mode) {
                    var mForm = gObj.element.querySelector(".e-movableheader").querySelector(".e-gridform");
                    editedData = gObj.frozenRows && mForm ? gObj.editModule.getCurrentEditedData(mForm, editedData) : gObj.editModule.getCurrentEditedData(gObj.element.querySelector(".e-movablecontent").querySelector(".e-gridform"), editedData);
                }
                if (gObj.element.querySelectorAll(".e-editedrow").length) {
                    if (args.action = "edit", gObj.trigger(actionBegin, args), args.cancel) return;
                    gObj.showSpinner(), this.destroyElements(), gObj.notify(updateData, args);
                } else {
                    if (args.action = "add", args.selectedRow = 0, args.index = this.addedRowIndex, 
                    gObj.notify(modelChanged, args), this.addedRowIndex = null, args.cancel) return;
                    this.destroyElements();
                }
                this.stopEditStatus(), "Dialog" === gObj.editSettings.mode && "add" !== args.action && gObj.element.querySelector(".e-dlgeditrow").classList.remove("e-dlgeditrow");
            }
        }, NormalEdit.prototype.destroyElements = function() {
            var gObj = this.parent;
            gObj.editModule.destroyWidgets(), gObj.editModule.destroyForm(), gObj.notify(dialogDestroy, {});
        }, NormalEdit.prototype.editHandler = function(args) {
            var _this = this;
            args.promise ? args.promise.then(function(e) {
                return _this.edSucc(e, args);
            }).catch(function(e) {
                return _this.edFail(e);
            }) : this.editSuccess(args.data, args);
        }, NormalEdit.prototype.edSucc = function(e, args) {
            this.editSuccess(e, args);
        }, NormalEdit.prototype.edFail = function(e) {
            this.editFailure(e);
        }, NormalEdit.prototype.updateCurrentViewData = function(data) {
            this.parent.getCurrentViewRecords()[this.editRowIndex] = data;
        }, NormalEdit.prototype.editSuccess = function(e, args) {
            isNullOrUndefined(e) || (args.data = e), this.parent.trigger("beforeDataBound", args), 
            args.type = actionComplete, this.parent.isEdit = !1, this.refreshRow(args.data), 
            this.updateCurrentViewData(args.data), this.parent.trigger(actionComplete, args), 
            (this.parent.isCheckBoxSelection || "Multiple" === this.parent.selectionSettings.type) && this.parent.isPersistSelection || this.parent.selectRow(this.rowIndex > -1 ? this.rowIndex : this.editRowIndex), 
            this.parent.hideSpinner();
        }, NormalEdit.prototype.editFailure = function(e) {
            this.parent.trigger("actionFailure", e);
        }, NormalEdit.prototype.refreshRow = function(data) {
            var frzCols = this.parent.getFrozenColumns(), row = new RowRenderer(this.serviceLocator, null, this.parent), rowObj = this.parent.getRowObjectFromUID(this.uid);
            if (rowObj && (rowObj.changes = data, refreshForeignData(rowObj, this.parent.getForeignKeyColumns(), rowObj.changes), 
            row.refresh(rowObj, this.parent.getColumns(), !0), frzCols)) {
                var uid = void 0;
                uid = rowObj.cells.length === frzCols ? this.parent.getMovableRows()[rowObj.index].getAttribute("data-uid") : this.parent.getRows()[rowObj.index].getAttribute("data-uid"), 
                (rowObj = this.parent.getRowObjectFromUID(uid)).changes = data, row.refresh(rowObj, this.parent.columns, !0);
            }
        }, NormalEdit.prototype.closeEdit = function() {
            if (this.parent.isEdit) {
                var gObj = this.parent, args = {
                    requestType: "cancel",
                    type: actionBegin,
                    data: this.previousData,
                    selectedRow: gObj.selectedRowIndex
                };
                gObj.trigger(actionBegin, args), "Dialog" === this.parent.editSettings.mode && this.parent.notify(dialogDestroy, {}), 
                gObj.isEdit = !1, this.stopEditStatus(), args.type = actionComplete, "Dialog" !== gObj.editSettings.mode && this.refreshRow(args.data), 
                gObj.getContentTable().querySelector("tr.e-emptyrow") && !gObj.getContentTable().querySelector("tr.e-row") && gObj.getContentTable().querySelector("tr.e-emptyrow").classList.remove("e-hide"), 
                gObj.selectRow(this.rowIndex), gObj.trigger(actionComplete, args);
            }
        }, NormalEdit.prototype.addRecord = function(data, index) {
            var gObj = this.parent;
            if (this.addedRowIndex = isNullOrUndefined(index) ? 0 : index, data) gObj.notify(modelChanged, {
                requestType: "save",
                type: actionBegin,
                data: data,
                selectedRow: 0,
                action: "add",
                index: index
            }); else if (!gObj.isEdit) {
                this.previousData = {}, this.uid = "";
                for (var _i = 0, _a = gObj.getColumns(); _i < _a.length; _i++) {
                    var col = _a[_i];
                    this.previousData[col.field] = data && data[col.field] ? data[col.field] : col.defaultValue;
                }
                var args = {
                    cancel: !1,
                    foreignKeyData: {},
                    requestType: "add",
                    data: this.previousData,
                    type: actionBegin,
                    index: index
                };
                gObj.trigger(actionBegin, args), args.cancel || (gObj.isEdit = !0, gObj.clearSelection(), 
                this.renderer.addNew({
                    rowData: args.data,
                    requestType: "add"
                }), gObj.editModule.applyFormValidation(), args.type = actionComplete, args.row = gObj.element.querySelector(".e-addedrow"), 
                gObj.trigger(actionComplete, args));
            }
        }, NormalEdit.prototype.deleteRecord = function(fieldname, data) {
            this.editRowIndex = this.parent.selectedRowIndex, this.parent.notify(modelChanged, {
                requestType: "delete",
                type: actionBegin,
                foreignKeyData: {},
                data: data ? [ data ] : this.parent.getSelectedRecords(),
                tr: this.parent.getSelectedRows(),
                cancel: !1
            });
        }, NormalEdit.prototype.stopEditStatus = function() {
            var mElem, editMElem, gObj = this.parent, elem = gObj.element.querySelector(".e-addedrow");
            gObj.getFrozenColumns() && (mElem = gObj.element.querySelectorAll(".e-addedrow")[1], 
            editMElem = gObj.element.querySelectorAll(".e-editedrow")[1], mElem && remove(mElem), 
            editMElem && editMElem.classList.remove("e-editedrow")), elem && remove(elem), (elem = gObj.element.querySelector(".e-editedrow")) && elem.classList.remove("e-editedrow");
        }, NormalEdit.prototype.addEventListener = function() {
            this.parent.isDestroyed || (this.parent.on("crud-Action", this.editHandler, this), 
            this.parent.on("double-tap", this.dblClickHandler, this), this.parent.on(click, this.clickHandler, this), 
            this.parent.on("dblclick", this.dblClickHandler, this), this.parent.on("delete-complete", this.editComplete, this), 
            this.parent.on("save-complete", this.editComplete, this));
        }, NormalEdit.prototype.removeEventListener = function() {
            this.parent.isDestroyed || (this.parent.off("crud-Action", this.editHandler), this.parent.off("double-tap", this.dblClickHandler), 
            this.parent.off(click, this.clickHandler), this.parent.off("dblclick", this.dblClickHandler), 
            this.parent.off("delete-complete", this.editComplete), this.parent.off("save-complete", this.editComplete));
        }, NormalEdit.prototype.destroy = function() {
            this.removeEventListener(), this.renderer.destroy();
        }, NormalEdit;
    }(), __extends$131 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), InlineEdit = function(_super) {
        function InlineEdit(parent, serviceLocator, renderer) {
            var _this = _super.call(this, parent, serviceLocator) || this;
            return _this.parent = parent, _this.serviceLocator = serviceLocator, _this.renderer = renderer, 
            _this;
        }
        return __extends$131(InlineEdit, _super), InlineEdit.prototype.closeEdit = function() {
            _super.prototype.closeEdit.call(this);
        }, InlineEdit.prototype.addRecord = function(data, index) {
            _super.prototype.addRecord.call(this, data, index);
        }, InlineEdit.prototype.endEdit = function() {
            _super.prototype.endEdit.call(this);
        }, InlineEdit.prototype.deleteRecord = function(fieldname, data) {
            _super.prototype.deleteRecord.call(this, fieldname, data);
        }, InlineEdit.prototype.startEdit = function(tr) {
            _super.prototype.startEdit.call(this, tr);
        }, InlineEdit;
    }(NormalEdit), BatchEdit = function() {
        function BatchEdit(parent, serviceLocator, renderer) {
            this.cellDetails = {}, this.parent = parent, this.serviceLocator = serviceLocator, 
            this.renderer = renderer, this.focus = serviceLocator.getService("focus"), this.addEventListener();
        }
        return BatchEdit.prototype.addEventListener = function() {
            this.parent.isDestroyed || (this.parent.on(click, this.clickHandler, this), this.parent.on("dblclick", this.dblClickHandler, this), 
            this.parent.on("beforecellfocused", this.onBeforeCellFocused, this), this.parent.on("cellfocused", this.onCellFocused, this), 
            this.dataBoundFunction = this.dataBound.bind(this), this.parent.addEventListener(dataBound, this.dataBoundFunction), 
            this.parent.on("double-tap", this.dblClickHandler, this), this.parent.on(keyPressed, this.keyDownHandler, this));
        }, BatchEdit.prototype.removeEventListener = function() {
            this.parent.isDestroyed || (this.parent.off(click, this.clickHandler), this.parent.off("dblclick", this.dblClickHandler), 
            this.parent.off("beforecellfocused", this.onBeforeCellFocused), this.parent.off("cellfocused", this.onCellFocused), 
            this.parent.removeEventListener(dataBound, this.dataBoundFunction), this.parent.off("double-tap", this.dblClickHandler), 
            this.parent.off(keyPressed, this.keyDownHandler));
        }, BatchEdit.prototype.dataBound = function() {
            this.parent.notify("toolbar-refresh", {});
        }, BatchEdit.prototype.destroy = function() {
            this.removeEventListener();
        }, BatchEdit.prototype.clickHandler = function(e) {
            parentsUntil(e.target, this.parent.element.id + "_add", !0) || (this.saveCell(), 
            parentsUntil(e.target, "e-rowcell") && !this.parent.isEdit && this.setCellIdx(e.target));
        }, BatchEdit.prototype.dblClickHandler = function(e) {
            var target = parentsUntil(e.target, "e-rowcell"), tr = parentsUntil(e.target, "e-row");
            target && tr && !isNaN(parseInt(target.getAttribute("aria-colindex"), 10)) && this.editCell(parseInt(tr.getAttribute("aria-rowindex"), 10), this.parent.getColumns()[parseInt(target.getAttribute("aria-colindex"), 10)].field);
        }, BatchEdit.prototype.onBeforeCellFocused = function(e) {
            this.parent.isEdit && this.validateFormObj() && (e.byClick || [ "tab", "shiftTab", "enter", "shiftEnter" ].indexOf(e.keyArgs.action) > -1) && (e.cancel = !0, 
            e.byClick ? e.clickArgs.preventDefault() : e.keyArgs.preventDefault());
        }, BatchEdit.prototype.onCellFocused = function(e) {
            var frzCols = this.parent.getFrozenColumns(), mCont = this.parent.getContent().querySelector(".e-movablecontent"), mHdr = this.parent.getHeaderContent().querySelector(".e-movableheader"), clear = !(e.container.isContent && e.container.isDataCell || this.parent.frozenRows && e.container.isHeader);
            if (e.byKey && !clear) {
                var _a = e.container.indexes, rowIndex = _a[0], cellIndex = _a[1];
                frzCols && (mCont.contains(e.element) || this.parent.frozenRows && mHdr.contains(e.element)) && (cellIndex += frzCols), 
                this.parent.frozenRows && e.container.isContent && (rowIndex += this.parent.frozenRows);
                var isEdit = this.parent.isEdit;
                if (!document.querySelectorAll(".e-popup-open").length) switch (isEdit = isEdit && !this.validateFormObj(), 
                e.keyArgs.action) {
                  case "tab":
                  case "shiftTab":
                    isEdit && this.editCellFromIndex(rowIndex, cellIndex);
                    break;

                  case "enter":
                  case "shiftEnter":
                    e.keyArgs.preventDefault(), isEdit && this.editCell(rowIndex, this.cellDetails.column.field);
                    break;

                  case "f2":
                    this.editCellFromIndex(rowIndex, cellIndex), this.focus.focus();
                }
            }
        }, BatchEdit.prototype.isAddRow = function(index) {
            return this.parent.getDataRows()[index].classList.contains("e-insertedrow");
        }, BatchEdit.prototype.editCellFromIndex = function(rowIdx, cellIdx) {
            this.cellDetails.rowIndex = rowIdx, this.cellDetails.cellIndex = cellIdx, this.editCell(rowIdx, this.parent.getColumns()[cellIdx].field);
        }, BatchEdit.prototype.closeEdit = function() {
            var tr, mTr, gObj = this.parent, rows = this.parent.getRowsObject(), rowRenderer = new RowRenderer(this.serviceLocator, null, this.parent);
            gObj.isEdit && this.saveCell(!0), gObj.clearSelection();
            for (var i = 0; i < rows.length; i++) rows[i].isDirty && (tr = gObj.getContentTable().querySelector("[data-uid=" + rows[i].uid + "]"), 
            gObj.frozenRows && (tr = gObj.getHeaderContent().querySelector("[data-uid=" + rows[i].uid + "]")), 
            gObj.frozenColumns && (mTr = gObj.frozenRows ? gObj.getHeaderContent().querySelector(".e-movableheader").querySelector("[data-uid=" + rows[i].uid + "]") : gObj.getContent().querySelector(".e-movablecontent").querySelector("[data-uid=" + rows[i].uid + "]")), 
            tr && (tr.classList.contains("e-insertedrow") ? (remove(tr), gObj.frozenRows && mTr && remove(mTr), 
            this.removeRowObjectFromUID(rows[i].uid), i--) : (delete rows[i].changes, rows[i].isDirty = !1, 
            classList(tr, [], [ "e-hiddenrow", "e-updatedtd" ]), rowRenderer.refresh(rows[i], gObj.getColumns(), !1))));
            gObj.getContentTable().querySelector("tr.e-emptyrow") && !gObj.getContentTable().querySelector("tr.e-row") && gObj.getContentTable().querySelector("tr.e-emptyrow").classList.remove("e-hide"), 
            gObj.notify("batchCancel", {
                rows: this.parent.getRowsObject()
            }), gObj.selectRow(this.cellDetails.rowIndex), this.refreshRowIdx(), gObj.notify("toolbar-refresh", {}), 
            this.parent.notify("tooltip-destroy", {});
        }, BatchEdit.prototype.deleteRecord = function(fieldname, data) {
            this.saveCell(), this.validateFormObj() && this.saveCell(!0), this.bulkDelete(fieldname, data);
        }, BatchEdit.prototype.addRecord = function(data) {
            this.bulkAddRow(data);
        }, BatchEdit.prototype.endEdit = function(data) {
            this.parent.isEdit && this.validateFormObj() || this.batchSave();
        }, BatchEdit.prototype.validateFormObj = function() {
            return this.parent.editModule.formObj && !this.parent.editModule.formObj.validate();
        }, BatchEdit.prototype.batchSave = function() {
            var gObj = this.parent;
            if (this.saveCell(), !gObj.isEdit) {
                var changes = this.getBatchChanges(), args = {
                    batchChanges: changes,
                    cancel: !1
                };
                gObj.trigger("beforeBatchSave", args), args.cancel || (gObj.showSpinner(), gObj.notify("bulk-save", {
                    changes: changes
                }));
            }
        }, BatchEdit.prototype.getBatchChanges = function() {
            for (var changes = {
                addedRecords: [],
                deletedRecords: [],
                changedRecords: []
            }, rows = this.parent.getRowsObject(), mRows = this.parent.getMovableRowsObject(), frzCols = this.parent.getFrozenColumns(), _i = 0, rows_1 = rows; _i < rows_1.length; _i++) {
                var row = rows_1[_i];
                if (frzCols && this.mergeBatchChanges(row, mRows[row.index], frzCols), row.isDirty) switch (row.edit) {
                  case "add":
                    changes.addedRecords.push(row.changes);
                    break;

                  case "delete":
                    changes.deletedRecords.push(row.data);
                    break;

                  default:
                    changes.changedRecords.push(row.changes);
                }
            }
            return changes;
        }, BatchEdit.prototype.mergeBatchChanges = function(row, mRow, frzCols) {
            if (row.isDirty) {
                if (mRow.isDirty) {
                    var i_1 = 0;
                    Object.keys(mRow.changes).forEach(function(key) {
                        i_1 < frzCols && delete mRow.changes[key], i_1++;
                    }), extend(row.changes, mRow.changes);
                }
            } else mRow.isDirty && extend(row, mRow);
        }, BatchEdit.prototype.removeRowObjectFromUID = function(uid) {
            for (var rows = this.parent.getRowsObject(), i = 0, len = rows.length; i < len && rows[i].uid !== uid; i++) ;
            rows.splice(i, 1);
        }, BatchEdit.prototype.addRowObject = function(row) {
            this.parent.getRowsObject().unshift(row);
        }, BatchEdit.prototype.bulkDelete = function(fieldname, data) {
            var gObj = this.parent, index = data ? this.getIndexFromData(data) : gObj.selectedRowIndex, selectedRows = gObj.getSelectedRows(), args = {
                primaryKey: this.parent.getPrimaryKeyFieldNames(),
                rowIndex: index,
                rowData: data || gObj.getSelectedRecords()[0],
                row: data ? gObj.getRows()[index] : selectedRows[0],
                cancel: !1
            };
            if (args.row && (gObj.trigger("beforeBatchDelete", args), !args.cancel)) {
                gObj.clearSelection();
                var uid = args.row.getAttribute("data-uid");
                if (args.row.classList.contains("e-insertedrow")) this.removeRowObjectFromUID(uid), 
                remove(args.row); else {
                    var rowObj = gObj.getRowObjectFromUID(uid);
                    rowObj.isDirty = !0, rowObj.edit = "delete", classList(args.row, [ "e-hiddenrow", "e-updatedtd" ], []), 
                    gObj.getFrozenColumns() ? (classList(data ? gObj.getMovableRows()[index] : selectedRows[1], [ "e-hiddenrow", "e-updatedtd" ], []), 
                    gObj.frozenRows && index < gObj.frozenRows && (gObj.getHeaderContent().querySelector(".e-movableheader").querySelector("tbody").appendChild(gObj.getMovableRowByIndex(gObj.frozenRows - 1)), 
                    gObj.getHeaderContent().querySelector(".e-frozenheader").querySelector("tbody").appendChild(gObj.getRowByIndex(gObj.frozenRows - 1)))) : gObj.frozenRows && index < gObj.frozenRows && gObj.getHeaderContent().querySelector("tbody").appendChild(gObj.getRowByIndex(gObj.frozenRows - 1));
                }
                this.refreshRowIdx(), gObj.selectRow(index), delete args.row, gObj.trigger("batchDelete", args), 
                gObj.notify("batchDelete", {
                    rows: this.parent.getRowsObject()
                }), gObj.notify("toolbar-refresh", {});
            }
        }, BatchEdit.prototype.refreshRowIdx = function() {
            var rows = [], mRows = [], nonMovableRows = [], frzCols = this.parent.getFrozenColumns();
            if (this.parent.frozenRows && (rows = [].slice.call(this.parent.getHeaderTable().querySelector("tbody").children), 
            frzCols)) {
                mRows = [].slice.call(this.parent.getHeaderContent().querySelector(".e-movableheader").querySelector("tbody").children);
                for (var i = 0; i < mRows.length; i++) nonMovableRows[i] = createElement("tr", {
                    className: "emptynonmv"
                });
            }
            frzCols && (mRows = mRows.concat([].slice.call(this.parent.getContentTable().querySelector("tbody").children)), 
            nonMovableRows = nonMovableRows.concat([].slice.call(this.parent.element.querySelector(".e-movablecontent").querySelector("tbody").children)));
            i = 0;
            for (var j = 0, len = (rows = rows.concat([].slice.call(this.parent.getContentTable().querySelector("tbody").children))).length; i < len; i++) rows[i].classList.contains("e-row") && !rows[i].classList.contains("e-hiddenrow") ? (rows[i].setAttribute("aria-rowindex", j.toString()), 
            frzCols && (mRows[i].setAttribute("aria-rowindex", j.toString()), nonMovableRows[i].classList.contains("e-row") && nonMovableRows[i].setAttribute("aria-rowindex", j.toString())), 
            j++) : (rows[i].removeAttribute("aria-rowindex"), frzCols && mRows[i].removeAttribute("aria-rowindex"));
        }, BatchEdit.prototype.getIndexFromData = function(data) {
            return inArray(data, this.parent.getCurrentViewRecords());
        }, BatchEdit.prototype.bulkAddRow = function(data) {
            var gObj = this.parent;
            if (gObj.editSettings.allowAdding && (gObj.isEdit && this.saveCell(), !gObj.isEdit)) {
                var args = {
                    defaultData: data || this.getDefaultData(),
                    primaryKey: gObj.getPrimaryKeyFieldNames(),
                    cancel: !1
                };
                if (gObj.trigger("beforeBatchAdd", args), !args.cancel) {
                    gObj.clearSelection();
                    for (var mTr, mTbody, col, index, row = new RowRenderer(this.serviceLocator, null, this.parent), modelData = new RowModelGenerator(this.parent).generateRows([ args.defaultData ]), tr = row.render(modelData[0], gObj.getColumns()), i = 0; i < this.parent.groupSettings.columns.length; i++) tr.insertBefore(createElement("td", {
                        className: "e-indentcell"
                    }), tr.firstChild), modelData[0].cells.unshift(new Cell({
                        cellType: CellType.Indent
                    }));
                    var tbody = gObj.getContentTable().querySelector("tbody");
                    tr.classList.add("e-insertedrow"), tbody.querySelector(".e-emptyrow") && tbody.querySelector(".e-emptyrow").classList.add("e-hide"), 
                    gObj.getFrozenColumns() && (mTr = this.renderMovable(tr), (mTbody = gObj.frozenRows ? gObj.getHeaderContent().querySelector(".e-movableheader").querySelector("tbody") : gObj.getContent().querySelector(".e-movablecontent").querySelector("tbody")).insertBefore(mTr, mTbody.firstChild), 
                    addClass(mTr.querySelectorAll(".e-rowcell"), [ "e-updatedtd" ])), gObj.frozenRows && (tbody = gObj.getHeaderContent().querySelector("tbody")), 
                    tbody.insertBefore(tr, tbody.firstChild), addClass(tr.querySelectorAll(".e-rowcell"), [ "e-updatedtd" ]), 
                    modelData[0].isDirty = !0, modelData[0].changes = extend({}, modelData[0].data), 
                    modelData[0].edit = "add", this.addRowObject(modelData[0]), this.refreshRowIdx(), 
                    this.focus.forgetPrevious(), gObj.notify("batchAdd", {
                        rows: this.parent.getRowsObject()
                    }), gObj.selectRow(0), data || (index = this.findNextEditableCell(0, !0), col = gObj.getColumns()[index], 
                    this.editCell(0, col.field, !0));
                    var args1 = {
                        defaultData: args.defaultData,
                        row: tr,
                        columnObject: col,
                        columnIndex: index,
                        primaryKey: args.primaryKey,
                        cell: tr.cells[index]
                    };
                    gObj.trigger("batchAdd", args1);
                }
            }
        }, BatchEdit.prototype.renderMovable = function(ele) {
            for (var mEle = ele.cloneNode(!0), i = 0; i < this.parent.frozenColumns; i++) mEle.removeChild(mEle.children[0]);
            i = this.parent.frozenColumns;
            for (var len = ele.childElementCount; i < len; i++) ele.removeChild(ele.children[ele.childElementCount - 1]);
            return mEle;
        }, BatchEdit.prototype.findNextEditableCell = function(columnIndex, isAdd) {
            for (var cols = this.parent.getColumns(), endIndex = cols.length, i = columnIndex; i < endIndex; i++) {
                if (!isAdd && this.checkNPCell(cols[i])) return i;
                if (isAdd && !cols[i].template && cols[i].visible && cols[i].allowEditing && (!cols[i].isIdentity || !cols[i].isPrimaryKey)) return i;
            }
            return -1;
        }, BatchEdit.prototype.checkNPCell = function(col) {
            return !col.template && col.visible && !col.isPrimaryKey && !col.isIdentity && col.allowEditing;
        }, BatchEdit.prototype.getDefaultData = function() {
            for (var data = {}, dValues = {
                number: 0,
                string: null,
                boolean: !1,
                date: null,
                datetime: null
            }, _i = 0, _a = this.parent.getColumns(); _i < _a.length; _i++) {
                var col = _a[_i];
                data[col.field] = col.defaultValue ? col.defaultValue : dValues[col.type];
            }
            return data;
        }, BatchEdit.prototype.setCellIdx = function(target) {
            var gLen = 0;
            this.parent.allowGrouping && (gLen = this.parent.groupSettings.columns.length), 
            this.cellDetails.cellIndex = target.cellIndex - gLen, this.cellDetails.rowIndex = parseInt(target.parentElement.getAttribute("aria-rowindex"), 10);
        }, BatchEdit.prototype.editCell = function(index, field, isAdd) {
            var gObj = this.parent, col = gObj.getColumnByField(field), keys = gObj.getPrimaryKeyFieldNames();
            if (gObj.editSettings.allowEditing && col.allowEditing) {
                if (gObj.isEdit && (this.cellDetails.column.field !== field || this.cellDetails.rowIndex !== index || this.parent.getDataRows().length - 1 === index) && (this.saveCell(), 
                this.cellDetails.rowIndex === index && this.cellDetails.column.field === field)) return;
                if (gObj.isEdit) return;
                var row = void 0, colIdx = gObj.getColumnIndexByField(field), frzCols = gObj.getFrozenColumns();
                if (row = frzCols && colIdx >= frzCols ? gObj.getMovableDataRows()[index] : gObj.getDataRows()[index], 
                keys[0] === col.field && !row.classList.contains("e-insertedrow") || col.template || col.columns || col.isPrimaryKey && col.isIdentity) return;
                var rowObj = gObj.getRowObjectFromUID(row.getAttribute("data-uid")), rowData = extend({}, this.getDataByIndex(index)), cells = [].slice.apply(row.cells), args = {
                    cell: cells[this.getColIndex(cells, this.getCellIdx(col.uid))],
                    row: row,
                    columnName: col.field,
                    columnObject: col,
                    isForeignKey: !isNullOrUndefined(col.foreignKeyValue),
                    primaryKey: keys,
                    rowData: rowData,
                    validationRules: extend({}, col.validationRules ? col.validationRules : {}),
                    value: rowData[col.field],
                    type: isAdd ? "add" : "edit",
                    cancel: !1,
                    foreignKeyData: rowObj && rowObj.foreignKeyData
                };
                if (!args.cell) return;
                if (gObj.trigger("cellEdit", args), args.cancel) return;
                this.cellDetails = {
                    rowData: rowData,
                    column: col,
                    value: args.value,
                    isForeignKey: args.isForeignKey,
                    rowIndex: index,
                    cellIndex: parseInt(args.cell.getAttribute("aria-colindex"), 10),
                    foreignKeyData: args.foreignKeyData
                }, args.cell.classList.contains("e-updatedtd") && (this.isColored = !0, args.cell.classList.remove("e-updatedtd")), 
                gObj.isEdit = !0, gObj.clearSelection(), gObj.isCheckBoxSelection && gObj.isPersistSelection || gObj.selectRow(this.cellDetails.rowIndex, !0), 
                this.renderer.update(args), this.form = gObj.element.querySelector("#" + gObj.element.id + "EditForm"), 
                gObj.editModule.applyFormValidation([ col ]), this.parent.element.querySelector(".e-gridpopup").style.display = "none";
            }
        }, BatchEdit.prototype.updateCell = function(rowIndex, field, value) {
            var col = this.parent.getColumnByField(field);
            if (col && !col.isPrimaryKey) {
                var td = this.parent.getDataRows()[rowIndex].cells[this.parent.getColumnIndexByField(field)], rowObj = this.parent.getRowObjectFromUID(td.parentElement.getAttribute("data-uid"));
                this.refreshTD(td, col, rowObj, value), this.parent.trigger("queryCellInfo", {
                    cell: td,
                    column: col,
                    data: rowObj.changes
                });
            }
        }, BatchEdit.prototype.setChanges = function(rowObj, field, value) {
            rowObj.changes || (rowObj.changes = extend({}, rowObj.data)), rowObj.changes[field] = value, 
            rowObj.data[field] !== value && (rowObj.isDirty = !0);
        }, BatchEdit.prototype.updateRow = function(index, data) {
            for (var _i = 0, keys_1 = Object.keys(data); _i < keys_1.length; _i++) {
                var col = keys_1[_i];
                this.updateCell(index, col, data[col]);
            }
        }, BatchEdit.prototype.getCellIdx = function(uid) {
            var cIdx = this.parent.getColumnIndexByUid(uid) + this.parent.groupSettings.columns.length;
            return isNullOrUndefined(this.parent.detailTemplate) && isNullOrUndefined(this.parent.childGrid) || cIdx++, 
            cIdx;
        }, BatchEdit.prototype.refreshTD = function(td, column, rowObj, value) {
            var cell = new CellRenderer(this.parent, this.serviceLocator);
            this.setChanges(rowObj, column.field, value);
            var frzCols = this.parent.getFrozenColumns();
            refreshForeignData(rowObj, this.parent.getForeignKeyColumns(), rowObj.changes), 
            cell.refreshTD(td, rowObj.cells[this.getCellIdx(column.uid) - (this.getCellIdx(column.uid) >= frzCols ? frzCols : 0)], rowObj.changes), 
            td.classList.add("e-updatedtd"), this.parent.notify("toolbar-refresh", {});
        }, BatchEdit.prototype.getColIndex = function(cells, index) {
            var cIdx = 0;
            this.parent.allowGrouping && this.parent.groupSettings.columns && (cIdx = this.parent.groupSettings.columns.length), 
            isNullOrUndefined(this.parent.detailTemplate) && isNullOrUndefined(this.parent.childGrid) || cIdx++;
            for (var m = 0; m < cells.length; m++) {
                if (parseInt(cells[m].getAttribute("aria-colindex"), 10) === index - cIdx) return m;
            }
            return -1;
        }, BatchEdit.prototype.saveCell = function(isForceSave) {
            var gObj = this.parent;
            if (isForceSave || gObj.isEdit && !this.validateFormObj()) {
                var tr = parentsUntil(this.form, "e-row"), column = this.cellDetails.column, editedData = gObj.editModule.getCurrentEditedData(this.form, {});
                editedData = extend(this.cellDetails.rowData, editedData);
                var args = {
                    columnName: column.field,
                    value: editedData[column.field],
                    rowData: this.cellDetails.rowData,
                    previousValue: this.cellDetails.value,
                    columnObject: column,
                    cell: this.form.parentElement,
                    isForeignKey: this.cellDetails.isForeignKey,
                    cancel: !1
                };
                isForceSave || gObj.trigger("cellSave", args), args.cancel || (gObj.editModule.destroyForm(), 
                gObj.isEdit = !1, gObj.editModule.destroyWidgets([ column ]), this.parent.notify("tooltip-destroy", {}), 
                this.refreshTD(args.cell, column, gObj.getRowObjectFromUID(tr.getAttribute("data-uid")), args.value), 
                removeClass([ tr ], [ "e-editedrow", "e-batchrow" ]), removeClass([ args.cell ], [ "e-editedbatchcell", "e-boolcell" ]), 
                isNullOrUndefined(args.value) || args.value.toString() !== (isNullOrUndefined(this.cellDetails.value) ? "" : this.cellDetails.value).toString() || this.isColored || args.cell.classList.remove("e-updatedtd"), 
                gObj.notify("toolbar-refresh", {}), this.isColored = !1);
            }
        }, BatchEdit.prototype.getDataByIndex = function(index) {
            var row = this.parent.getRowObjectFromUID(this.parent.getDataRows()[index].getAttribute("data-uid"));
            return row.changes ? row.changes : row.data;
        }, BatchEdit.prototype.keyDownHandler = function(e) {
            if ("tab" === e.action && this.parent.isEdit) {
                var rowcell = parentsUntil(e.target, "e-rowcell");
                if (rowcell) {
                    var cell = rowcell.querySelector(".e-field");
                    if (cell) {
                        var visibleColumns = this.parent.getVisibleColumns();
                        visibleColumns[visibleColumns.length - 1].field === cell.getAttribute("name") && this.saveCell();
                    }
                }
            }
        }, BatchEdit;
    }(), __extends$132 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), DialogEdit = function(_super) {
        function DialogEdit(parent, serviceLocator, renderer) {
            var _this = _super.call(this, parent, serviceLocator) || this;
            return _this.parent = parent, _this.serviceLocator = serviceLocator, _this.renderer = renderer, 
            _this;
        }
        return __extends$132(DialogEdit, _super), DialogEdit.prototype.closeEdit = function() {
            _super.prototype.closeEdit.call(this);
        }, DialogEdit.prototype.addRecord = function(data, index) {
            _super.prototype.addRecord.call(this, data, index);
        }, DialogEdit.prototype.endEdit = function() {
            _super.prototype.endEdit.call(this);
        }, DialogEdit.prototype.deleteRecord = function(fieldname, data) {
            _super.prototype.deleteRecord.call(this, fieldname, data);
        }, DialogEdit.prototype.startEdit = function(tr) {
            _super.prototype.startEdit.call(this, tr);
        }, DialogEdit;
    }(NormalEdit), DatePickerEditCell = function() {
        function DatePickerEditCell(parent) {
            this.parent = parent;
        }
        return DatePickerEditCell.prototype.create = function(args) {
            return createElement("input", {
                className: "e-field",
                attrs: {
                    id: this.parent.element.id + args.column.field,
                    name: args.column.field,
                    type: "text",
                    "e-mappinguid": args.column.uid
                }
            });
        }, DatePickerEditCell.prototype.read = function(element) {
            return element.ej2_instances[0].value;
        }, DatePickerEditCell.prototype.write = function(args) {
            var isInline = "Dialog" !== this.parent.editSettings.mode;
            this.obj = new DatePicker$1(extend({
                floatLabelType: isInline ? "Never" : "Always",
                value: new Date(args.rowData[args.column.field]),
                placeholder: isInline ? "" : args.column.headerText,
                enableRtl: this.parent.enableRtl,
                enabled: isEditable(args.column, args.type, args.element)
            }, args.column.edit.params)), this.obj.appendTo(args.element);
        }, DatePickerEditCell.prototype.destroy = function() {
            this.obj && this.obj.destroy();
        }, DatePickerEditCell;
    }(), Edit = function() {
        function Edit(parent, serviceLocator) {
            this.editCellType = {
                dropdownedit: DropDownEditCell,
                numericedit: NumericEditCell,
                datepickeredit: DatePickerEditCell,
                booleanedit: BooleanEditCell,
                defaultedit: DefaultEditCell
            }, this.editType = {
                Inline: InlineEdit,
                Normal: InlineEdit,
                Batch: BatchEdit,
                Dialog: DialogEdit
            }, this.parent = parent, this.serviceLocator = serviceLocator, this.l10n = this.serviceLocator.getService("localization"), 
            this.addEventListener(), this.updateEditObj(), this.createAlertDlg(), this.createConfirmDlg();
        }
        return Edit.prototype.updateColTypeObj = function() {
            for (var _i = 0, _a = this.parent.getColumns(); _i < _a.length; _i++) {
                var col = _a[_i];
                col.edit = extend(new this.editCellType[col.editType && this.editCellType[col.editType] ? col.editType : "defaultedit"](this.parent, this.serviceLocator), col.edit || {});
            }
        }, Edit.prototype.getModuleName = function() {
            return "edit";
        }, Edit.prototype.onPropertyChanged = function(e) {
            if (e.module === this.getModuleName()) for (var gObj = this.parent, _i = (e.properties, 
            0), _a = Object.keys(e.properties); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "allowAdding":
                  case "allowDeleting":
                  case "allowEditing":
                    (gObj.editSettings.allowAdding || gObj.editSettings.allowEditing || gObj.editSettings.allowDeleting) && this.initialEnd();
                    break;

                  case "mode":
                    this.updateEditObj(), gObj.isEdit = !1, gObj.refresh();
                }
            }
        }, Edit.prototype.updateEditObj = function() {
            this.editModule && this.editModule.destroy(), this.renderer = new EditRender(this.parent, this.serviceLocator), 
            this.editModule = new this.editType[this.parent.editSettings.mode](this.parent, this.serviceLocator, this.renderer);
        }, Edit.prototype.initialEnd = function() {
            this.updateColTypeObj();
        }, Edit.prototype.wireEvents = function() {
            EventHandler.add(this.parent.getContent(), "touchstart", this.tapEvent, this);
        }, Edit.prototype.unwireEvents = function() {
            EventHandler.remove(this.parent.getContent(), "touchstart", this.tapEvent);
        }, Edit.prototype.tapEvent = function(e) {
            this.getUserAgent() && (Global.timer ? (clearTimeout(Global.timer), Global.timer = null, 
            this.parent.notify("double-tap", e)) : Global.timer = setTimeout(function() {
                Global.timer = null;
            }, 300));
        }, Edit.prototype.getUserAgent = function() {
            var userAgent = window.navigator.userAgent.toLowerCase();
            return /iphone|ipod|ipad/.test(userAgent);
        }, Edit.prototype.startEdit = function(tr) {
            var gObj = this.parent;
            if (gObj.editSettings.allowEditing && !gObj.isEdit && "Batch" !== gObj.editSettings.mode) {
                if (gObj.getSelectedRows().length) tr || (tr = gObj.getSelectedRows()[0]); else if (!tr) return void this.showDialog("EditOperationAlert", this.alertDObj);
                "none" !== tr.style.display && (this.editModule.startEdit(tr), this.refreshToolbar(), 
                gObj.element.querySelector(".e-gridpopup").style.display = "none", this.parent.notify("start-edit", {}));
            }
        }, Edit.prototype.closeEdit = function() {
            "Batch" === this.parent.editSettings.mode && this.parent.editSettings.showConfirmDialog && this.parent.element.querySelectorAll(".e-updatedtd").length ? this.showDialog("CancelEdit", this.dialogObj) : (this.editModule.closeEdit(), 
            this.refreshToolbar(), this.parent.notify("close-edit", {}));
        }, Edit.prototype.refreshToolbar = function() {
            this.parent.notify("toolbar-refresh", {});
        }, Edit.prototype.addRecord = function(data, index) {
            this.parent.editSettings.allowAdding && (this.editModule.addRecord(data, index), 
            this.refreshToolbar(), this.parent.notify("start-add", {}));
        }, Edit.prototype.deleteRecord = function(fieldname, data) {
            var gObj = this.parent;
            gObj.editSettings.allowDeleting && (data || !isNullOrUndefined(gObj.selectedRowIndex) && -1 !== gObj.selectedRowIndex ? gObj.editSettings.showDeleteConfirmDialog ? this.showDialog("ConfirmDelete", this.dialogObj) : this.editModule.deleteRecord(fieldname, data) : this.showDialog("DeleteOperationAlert", this.alertDObj));
        }, Edit.prototype.deleteRow = function(tr) {
            this.deleteRecord(null, this.parent.getCurrentViewRecords()[parseInt(tr.getAttribute("aria-rowindex"), 10)]);
        }, Edit.prototype.endEdit = function() {
            "Batch" === this.parent.editSettings.mode && this.parent.editSettings.showConfirmDialog && (isNullOrUndefined(this.formObj) || this.formObj.validate()) ? this.showDialog("BatchSaveConfirm", this.dialogObj) : this.endEditing();
        }, Edit.prototype.updateCell = function(rowIndex, field, value) {
            this.editModule.updateCell(rowIndex, field, value);
        }, Edit.prototype.updateRow = function(index, data) {
            this.editModule.updateRow(index, data);
        }, Edit.prototype.batchCancel = function() {
            this.closeEdit();
        }, Edit.prototype.batchSave = function() {
            this.endEdit();
        }, Edit.prototype.editCell = function(index, field) {
            this.editModule.editCell(index, field);
        }, Edit.prototype.editFormValidate = function() {
            return !!this.formObj && this.formObj.validate();
        }, Edit.prototype.getBatchChanges = function() {
            return this.editModule.getBatchChanges ? this.editModule.getBatchChanges() : {};
        }, Edit.prototype.getCurrentEditCellData = function() {
            var obj = this.getCurrentEditedData(this.formObj.element, {});
            return obj[Object.keys(obj)[0]];
        }, Edit.prototype.saveCell = function() {
            this.editModule.saveCell();
        }, Edit.prototype.endEditing = function() {
            this.editModule.endEdit(), this.refreshToolbar();
        }, Edit.prototype.showDialog = function(content, obj) {
            obj.content = "<div>" + this.l10n.getConstant(content) + "</div>", obj.dataBind(), 
            obj.show();
        }, Edit.prototype.getValueFromType = function(col, value) {
            var val = value;
            switch (col.type) {
              case "number":
                val = isNaN(parseFloat(value)) ? null : parseFloat(value);
                break;

              case "boolean":
                "booleanedit" !== col.editType && (val = value === this.l10n.getConstant("True"));
                break;

              case "date":
              case "datetime":
                "datepicker" !== col.editType && value && value.length && (val = new Date(value));
            }
            return val;
        }, Edit.prototype.destroyToolTip = function() {
            for (var _i = 0, elements_1 = [].slice.call(this.parent.element.querySelectorAll(".e-griderror")); _i < elements_1.length; _i++) {
                remove(elements_1[_i]);
            }
            this.parent.getContent().firstElementChild.style.position = "relative";
        }, Edit.prototype.createConfirmDlg = function() {
            this.dialogObj = this.dlgWidget([ {
                click: this.dlgOk.bind(this),
                buttonModel: {
                    content: this.l10n.getConstant("OKButton"),
                    cssClass: "e-primary",
                    isPrimary: !0
                }
            }, {
                click: this.dlgCancel.bind(this),
                buttonModel: {
                    cssClass: "e-flat",
                    content: this.l10n.getConstant("CancelButton")
                }
            } ], "EditConfirm");
        }, Edit.prototype.createAlertDlg = function() {
            this.alertDObj = this.dlgWidget([ {
                click: this.alertClick.bind(this),
                buttonModel: {
                    content: this.l10n.getConstant("OKButton"),
                    cssClass: "e-flat",
                    isPrimary: !0
                }
            } ], "EditAlert");
        }, Edit.prototype.alertClick = function() {
            this.alertDObj.hide();
        }, Edit.prototype.dlgWidget = function(btnOptions, name) {
            var div = createElement("div", {
                id: this.parent.element.id + name
            });
            this.parent.element.appendChild(div);
            var options = {
                showCloseIcon: !1,
                isModal: !0,
                visible: !1,
                closeOnEscape: !0,
                target: this.parent.element,
                width: "320px",
                animationSettings: {
                    effect: "None"
                }
            };
            options.buttons = btnOptions;
            var obj = new Dialog(options);
            return obj.appendTo(div), changeButtonType(obj.element), obj;
        }, Edit.prototype.dlgCancel = function() {
            this.dialogObj.hide();
        }, Edit.prototype.dlgOk = function(e) {
            switch (this.dialogObj.element.querySelector(".e-dlg-content").firstElementChild.innerText) {
              case this.l10n.getConstant("ConfirmDelete"):
                this.editModule.deleteRecord();
                break;

              case this.l10n.getConstant("CancelEdit"):
                this.editModule.closeEdit();
                break;

              case this.l10n.getConstant("BatchSaveConfirm"):
                this.endEditing();
                break;

              case this.l10n.getConstant("BatchSaveLostChanges"):
                this.executeAction();
            }
            this.dlgCancel();
        }, Edit.prototype.addEventListener = function() {
            this.parent.isDestroyed || (this.parent.on(inBoundModelChanged, this.onPropertyChanged, this), 
            this.parent.on(initialEnd, this.initialEnd, this), this.parent.on(keyPressed, this.keyPressHandler, this), 
            this.parent.on("auto-col", this.updateColTypeObj, this), this.parent.on("tooltip-destroy", this.destroyToolTip, this), 
            this.parent.on(preventBatch, this.preventBatch, this), this.parent.on("destroy-form", this.destroyForm, this), 
            this.actionBeginFunction = this.onActionBegin.bind(this), this.actionCompleteFunction = this.actionComplete.bind(this), 
            this.parent.addEventListener(actionBegin, this.actionBeginFunction), this.parent.addEventListener(actionComplete, this.actionCompleteFunction), 
            this.parent.on(initialEnd, this.wireEvents, this));
        }, Edit.prototype.removeEventListener = function() {
            this.parent.isDestroyed || (this.parent.off(inBoundModelChanged, this.onPropertyChanged), 
            this.parent.off(initialEnd, this.initialEnd), this.parent.off(keyPressed, this.keyPressHandler), 
            this.parent.off("auto-col", this.updateColTypeObj), this.parent.off("tooltip-destroy", this.destroyToolTip), 
            this.parent.off(preventBatch, this.preventBatch), this.parent.off("destroy-form", this.destroyForm), 
            this.parent.removeEventListener(actionComplete, this.actionCompleteFunction), this.parent.removeEventListener(actionBegin, this.actionBeginFunction), 
            this.parent.off(initialEnd, this.unwireEvents));
        }, Edit.prototype.actionComplete = function(e) {
            [ "add", "beginEdit", "save", "delete", "cancel" ].indexOf(e.requestType) < 0 && (this.parent.isEdit = !1), 
            this.refreshToolbar();
        }, Edit.prototype.getCurrentEditedData = function(form, editedData) {
            for (var gObj = this.parent, inputs = [].slice.call(form.querySelectorAll(".e-field")), i = 0, len = inputs.length; i < len; i++) {
                var col = gObj.getColumnByUid(inputs[i].getAttribute("e-mappinguid")), value = void 0;
                if (col && col.field) {
                    var temp = col.edit.read;
                    "string" == typeof temp && (temp = getValue(temp, window)), value = "checkbox" !== col.type ? gObj.editModule.getValueFromType(col, col.edit.read(inputs[i])) : inputs[i].checked, 
                    setValue(col.field, value, editedData);
                }
            }
            return editedData;
        }, Edit.prototype.onActionBegin = function(e) {
            "Batch" !== this.parent.editSettings.mode && this.formObj && !this.formObj.isDestroyed && -1 === [ "filterafteropen", "filterbeforeopen", "filterchoicerequest", "save" ].indexOf(e.requestType) && (this.destroyForm(), 
            this.destroyWidgets());
        }, Edit.prototype.destroyWidgets = function(cols) {
            for (var _i = 0, cols_1 = cols = cols || this.parent.getColumns(); _i < cols_1.length; _i++) {
                var col = cols_1[_i];
                col.edit.destroy && col.edit.destroy();
            }
        }, Edit.prototype.destroyForm = function() {
            this.destroyToolTip(), this.formObj && !this.formObj.isDestroyed && this.formObj.destroy(), 
            this.destroyToolTip();
        }, Edit.prototype.destroy = function() {
            this.destroyForm(), this.removeEventListener();
            var elem = this.dialogObj.element;
            this.dialogObj.destroy(), remove(elem), elem = this.alertDObj.element, this.alertDObj.destroy(), 
            remove(elem), this.unwireEvents();
        }, Edit.prototype.keyPressHandler = function(e) {
            switch (e.action) {
              case "insert":
                this.addRecord();
                break;

              case "delete":
                "INPUT" === e.target.tagName || document.querySelector(".e-popup-open") || this.deleteRecord();
                break;

              case "f2":
                this.startEdit();
                break;

              case "enter":
                parentsUntil(e.target, ".e-unboundcelldiv") || "Batch" === this.parent.editSettings.mode || !(parentsUntil(e.target, "e-gridcontent") || this.parent.frozenRows && parentsUntil(e.target, "e-headercontent")) || document.querySelectorAll(".e-popup-open").length || (e.preventDefault(), 
                this.endEdit());
                break;

              case "escape":
                this.closeEdit();
            }
        }, Edit.prototype.preventBatch = function(args) {
            this.preventObj = args, this.showDialog("BatchSaveLostChanges", this.dialogObj);
        }, Edit.prototype.executeAction = function() {
            this.preventObj.handler.call(this.preventObj.instance, this.preventObj.arg1, this.preventObj.arg2, this.preventObj.arg3, this.preventObj.arg4, this.preventObj.arg5, this.preventObj.arg6, this.preventObj.arg7);
        }, Edit.prototype.applyFormValidation = function(cols) {
            for (var gObj = this.parent, frzCols = gObj.getFrozenColumns(), form = gObj.element.querySelector(".e-gridform"), mForm = gObj.element.querySelectorAll(".e-gridform")[1], rules = {}, mRules = {}, _i = 0, cols_2 = cols = cols || gObj.columns; _i < cols_2.length; _i++) {
                var col = cols_2[_i];
                col.validationRules && form.querySelectorAll("#" + gObj.element.id + col.field).length ? rules[col.field] = col.validationRules : frzCols && col.validationRules && mForm.querySelectorAll("#" + gObj.element.id + col.field).length && (mRules[col.field] = col.validationRules);
            }
            this.parent.editModule.formObj = this.createFormObj(form, rules), frzCols && "Dialog" !== this.parent.editSettings.mode && (this.parent.editModule.mFormObj = this.createFormObj(mForm, mRules));
        }, Edit.prototype.createFormObj = function(form, rules) {
            var _this = this;
            return new FormValidator(form, {
                rules: rules,
                validationComplete: function(args) {
                    _this.validationComplete(args);
                },
                customPlacement: function(inputElement, error) {
                    _this.valErrorPlacement(inputElement, error);
                }
            });
        }, Edit.prototype.valErrorPlacement = function(inputElement, error) {
            if (this.parent.isEdit) {
                var id = error.getAttribute("for"), elem = this.getElemTable(inputElement).querySelector("#" + id + "_Error");
                elem ? elem.querySelector(".e-tip-content").innerHTML = error.innerHTML : this.createTooltip(inputElement, error, id, "");
            }
        }, Edit.prototype.getElemTable = function(inputElement) {
            var isFHdr;
            return "Dialog" !== this.parent.editSettings.mode && (isFHdr = this.parent.frozenRows && this.parent.frozenRows > (parseInt(closest(inputElement, ".e-row").getAttribute("aria-rowindex"), 10) || 0)), 
            "Dialog" !== this.parent.editSettings.mode ? isFHdr ? this.parent.getHeaderTable() : this.parent.getContentTable() : this.parent.element.querySelector("#" + this.parent.element.id + "_dialogEdit_wrapper");
        }, Edit.prototype.validationComplete = function(args) {
            if (this.parent.isEdit) {
                var elem = this.getElemTable(args.element).querySelector("#" + args.inputName + "_Error");
                elem && ("failure" === args.status ? elem.style.display = "" : elem.style.display = "none");
            }
        }, Edit.prototype.createTooltip = function(element, error, name, display) {
            var isFHdr, gcontent = this.parent.getContent().firstElementChild, isScroll = gcontent.scrollHeight > gcontent.clientHeight, isInline = "Dialog" !== this.parent.editSettings.mode;
            isInline && (isFHdr = this.parent.frozenRows && this.parent.frozenRows > (parseInt(closest(element, ".e-row").getAttribute("aria-rowindex"), 10) || 0));
            var fCont = this.parent.getContent().querySelector(".e-frozencontent"), table = isInline ? isFHdr ? this.parent.getHeaderTable() : this.parent.getContentTable() : this.parent.element.querySelector("#" + this.parent.element.id + "_dialogEdit_wrapper").querySelector(".e-dlg-content"), client = table.getBoundingClientRect(), left = isInline ? this.parent.element.getBoundingClientRect().left : client.left, input = parentsUntil(element, "e-rowcell"), inputClient = input.getBoundingClientRect(), td = closest(element, "td").getBoundingClientRect(), div = createElement("div", {
                className: "e-tooltip-wrap e-control e-popup e-griderror",
                id: name + "_Error",
                styles: "display:" + display + ";top:" + ((isFHdr ? inputClient.top + inputClient.height : inputClient.bottom - client.top - (this.parent.getFrozenColumns() ? fCont.scrollTop : 0)) + table.scrollTop + 9) + "px;left:" + (inputClient.left - left + table.scrollLeft + inputClient.width / 2) + "px;max-width:" + td.width + "px;text-align:center;"
            }), content = createElement("div", {
                className: "e-tip-content"
            });
            content.appendChild(error);
            var arrow = createElement("div", {
                className: "e-arrow-tip e-tip-top"
            });
            arrow.appendChild(createElement("div", {
                className: "e-arrow-tip-outer e-tip-top"
            })), arrow.appendChild(createElement("div", {
                className: "e-arrow-tip-inner e-tip-top"
            })), div.appendChild(content), div.appendChild(arrow), table.appendChild(div);
            var lineHeight = parseInt(document.defaultView.getComputedStyle(div, null).getPropertyValue("font-size"), 10);
            if (div.getBoundingClientRect().width < td.width && div.querySelector("label").getBoundingClientRect().height / (1.2 * lineHeight) >= 2 && (div.style.width = div.style.maxWidth), 
            div.style.left = parseInt(div.style.left, 10) - div.offsetWidth / 2 + "px", !isScroll && isInline && !this.parent.allowPaging) {
                gcontent.style.position = "static";
                var pos = calculateRelativeBasedPosition(input, div);
                div.style.top = pos.top + inputClient.height + 9 + "px";
            }
        }, Edit;
    }();
    !function(Global) {
        Global.timer = null;
    }(Global || (Global = {}));
    var Theme$2, ColumnChooser = function() {
        function ColumnChooser(parent, serviceLocator) {
            this.showColumn = [], this.hideColumn = [], this.isDlgOpen = !1, this.dlghide = !1, 
            this.initialOpenDlg = !0, this.stateChangeColumns = [], this.isInitialOpen = !1, 
            this.isCustomizeOpenCC = !1, this.cBoxTrue = createCheckBox(!0, {
                checked: !0,
                label: " "
            }), this.cBoxFalse = createCheckBox(!0, {
                checked: !1,
                label: " "
            }), this.parent = parent, this.serviceLocator = serviceLocator, this.addEventListener(), 
            this.cBoxTrue.insertBefore(createElement("input", {
                className: "e-chk-hidden e-cc e-cc-chbox",
                attrs: {
                    type: "checkbox"
                }
            }), this.cBoxTrue.firstChild), this.cBoxFalse.insertBefore(createElement("input", {
                className: "e-chk-hidden e-cc e-cc-chbox",
                attrs: {
                    type: "checkbox"
                }
            }), this.cBoxFalse.firstChild), this.cBoxFalse.querySelector(".e-frame").classList.add("e-uncheck"), 
            this.parent.enableRtl && addClass([ this.cBoxTrue, this.cBoxFalse ], [ "e-rtl" ]);
        }
        return ColumnChooser.prototype.destroy = function() {
            this.removeEventListener(), this.unWireEvents(), isNullOrUndefined(this.dlgObj) || !this.dlgObj.element || this.dlgObj.isDestroyed || this.dlgObj.destroy();
        }, ColumnChooser.prototype.rtlUpdate = function() {
            this.parent.enableRtl ? addClass(this.innerDiv.querySelectorAll(".e-checkbox-wrapper"), [ "e-rtl" ]) : removeClass(this.innerDiv.querySelectorAll(".e-checkbox-wrapper"), [ "e-rtl" ]);
        }, ColumnChooser.prototype.addEventListener = function() {
            this.parent.isDestroyed || (this.parent.on(click, this.clickHandler, this), this.parent.on(uiUpdate, this.enableAfterRenderEle, this), 
            this.parent.on(initialEnd, this.render, this), this.parent.addEventListener(dataBound, this.hideDialog.bind(this)), 
            this.parent.on(destroy$1, this.destroy, this), this.parent.on("rtl-updated", this.rtlUpdate, this));
        }, ColumnChooser.prototype.removeEventListener = function() {
            this.parent.isDestroyed || (this.parent.off(click, this.clickHandler), this.parent.off(initialEnd, this.render), 
            this.parent.off(destroy$1, this.destroy), this.parent.off(uiUpdate, this.enableAfterRenderEle), 
            this.parent.off("rtl-updated", this.rtlUpdate));
        }, ColumnChooser.prototype.render = function() {
            this.l10n = this.serviceLocator.getService("localization"), this.renderDlgContent(), 
            this.getShowHideService = this.serviceLocator.getService("showHideService");
        }, ColumnChooser.prototype.clickHandler = function(e) {
            var targetElement = e.target;
            if (!this.isCustomizeOpenCC) if (isNullOrUndefined(closest(targetElement, ".e-cc")) && isNullOrUndefined(closest(targetElement, ".e-cc-toolbar"))) isNullOrUndefined(this.dlgObj) || !this.dlgObj.visible || targetElement.classList.contains("e-toolbar-items") || (this.dlgObj.hide(), 
            this.refreshCheckboxState(), this.isDlgOpen = !1); else if (targetElement.classList.contains("e-columnchooser-btn") || targetElement.classList.contains("e-cc-toolbar")) {
                if (this.initialOpenDlg && this.dlgObj.visible || !this.isDlgOpen) return void (this.isDlgOpen = !0);
            } else targetElement.classList.contains("e-cc-cancel") && (targetElement.parentElement.querySelector(".e-ccsearch").value = "", 
            this.columnChooserSearch(""), this.removeCancelIcon());
            this.rtlUpdate();
        }, ColumnChooser.prototype.hideDialog = function() {
            !isNullOrUndefined(this.dlgObj) && this.dlgObj.visible && (this.dlgObj.hide(), this.isDlgOpen = !1);
        }, ColumnChooser.prototype.renderColumnChooser = function(x, y, target) {
            if (this.dlgObj.visible) this.hideDialog(), this.addcancelIcon(); else {
                var args1 = {
                    requestType: "beforeOpenColumnChooser",
                    element: this.parent.element,
                    columns: this.getColumns(),
                    cancel: !1
                };
                if (this.parent.trigger("beforeOpenColumnChooser", args1), args1.cancel) return;
                this.refreshCheckboxState(), this.dlgObj.dataBind(), this.dlgObj.element.style.maxHeight = "430px";
                var elementVisible = this.dlgObj.element.style.display;
                this.dlgObj.element.style.display = "block";
                var newpos = calculateRelativeBasedPosition(closest(target, ".e-toolbar-item"), this.dlgObj.element);
                this.dlgObj.element.style.display = elementVisible, this.dlgObj.element.style.top = newpos.top + closest(target, ".e-cc-toolbar").getBoundingClientRect().height + "px";
                isNullOrUndefined(closest(target, ".e-bigger")) || (this.dlgObj.width = 258), Browser.isDevice ? (this.dlgObj.target = document.body, 
                this.dlgObj.position = {
                    X: "center",
                    Y: "center"
                }, this.dlgObj.refreshPosition(), this.dlgObj.open = this.mOpenDlg.bind(this)) : this.parent.enableRtl ? this.dlgObj.element.style.left = target.offsetLeft + "px" : this.dlgObj.element.style.left = newpos.left - 250 + closest(target, ".e-cc-toolbar").clientWidth + 2 + "px", 
                this.removeCancelIcon(), this.dlgObj.show();
            }
            this.rtlUpdate();
        }, ColumnChooser.prototype.openColumnChooser = function(X, Y) {
            this.isCustomizeOpenCC = !0, this.dlgObj.visible ? this.hideDialog() : (this.isInitialOpen ? this.refreshCheckboxState() : this.dlgObj.content = this.renderChooserList(), 
            this.dlgObj.dataBind(), this.dlgObj.position = {
                X: "center",
                Y: "center"
            }, isNullOrUndefined(X) ? (this.dlgObj.position = {
                X: "center",
                Y: "center"
            }, this.dlgObj.refreshPosition()) : (this.dlgObj.element.style.top = "", this.dlgObj.element.style.left = "", 
            this.dlgObj.element.style.top = Y + "px", this.dlgObj.element.style.left = X + "px"), 
            this.dlgObj.beforeOpen = this.customDialogOpen.bind(this), this.dlgObj.show(), this.isInitialOpen = !0, 
            this.dlgObj.beforeClose = this.customDialogClose.bind(this));
        }, ColumnChooser.prototype.enableAfterRenderEle = function(e) {
            e.module === this.getModuleName() && e.enable && this.render();
        }, ColumnChooser.prototype.customDialogOpen = function() {
            var searchElement = this.dlgObj.content.querySelector("input.e-ccsearch");
            EventHandler.add(searchElement, "keyup", this.columnChooserManualSearch, this);
        }, ColumnChooser.prototype.customDialogClose = function() {
            var searchElement = this.dlgObj.content.querySelector("input.e-ccsearch");
            EventHandler.remove(searchElement, "keyup", this.columnChooserManualSearch);
        }, ColumnChooser.prototype.getColumns = function() {
            return this.parent.getColumns().filter(function(column) {
                return "checkbox" !== column.type && !0 === column.showInColumnChooser || "checkbox" === column.type && void 0 !== column.field;
            });
        }, ColumnChooser.prototype.renderDlgContent = function() {
            this.dlgDiv = createElement("div", {
                className: "e-ccdlg e-cc",
                id: this.parent.element.id + "_ccdlg"
            }), this.parent.element.appendChild(this.dlgDiv);
            this.parent.element.getBoundingClientRect().width, this.parent.enableRtl;
            var tarElement = this.parent.element.querySelector(".e-ccdiv");
            isNullOrUndefined(tarElement) || tarElement.getBoundingClientRect().top, this.dlgObj = new Dialog({
                header: this.l10n.getConstant("ChooseColumns"),
                showCloseIcon: !1,
                closeOnEscape: !1,
                locale: this.parent.locale,
                visible: !1,
                enableRtl: this.parent.enableRtl,
                target: document.getElementById(this.parent.element.id),
                buttons: [ {
                    click: this.confirmDlgBtnClick.bind(this),
                    buttonModel: {
                        content: this.l10n.getConstant("OKButton"),
                        isPrimary: !0,
                        cssClass: "e-cc e-cc_okbtn"
                    }
                }, {
                    click: this.clearActions.bind(this),
                    buttonModel: {
                        cssClass: "e-flat e-cc e-cc-cnbtn",
                        content: this.l10n.getConstant("CancelButton")
                    }
                } ],
                content: this.renderChooserList(),
                width: 250,
                cssClass: "e-cc",
                animationSettings: {
                    effect: "None"
                }
            }), this.dlgObj.appendTo(this.dlgDiv), changeButtonType(this.dlgObj.element), this.wireEvents();
        }, ColumnChooser.prototype.renderChooserList = function() {
            this.mainDiv = createElement("div", {
                className: "e-main-div e-cc"
            });
            var searchDiv = createElement("div", {
                className: "e-cc-searchdiv e-cc e-input-group"
            }), ccsearchele = createElement("input", {
                className: "e-ccsearch e-cc e-input",
                attrs: {
                    placeholder: this.l10n.getConstant("Search")
                }
            }), ccsearchicon = createElement("span", {
                className: "e-ccsearch-icon e-icons e-cc e-input-group-icon"
            }), conDiv = createElement("div", {
                className: "e-cc-contentdiv"
            });
            this.innerDiv = createElement("div", {
                className: "e-innerdiv e-cc"
            }), searchDiv.appendChild(ccsearchele), searchDiv.appendChild(ccsearchicon), this.searchBoxObj = new SearchBox(ccsearchele);
            var innerDivContent = this.refreshCheckboxList(this.parent.getColumns());
            return this.innerDiv.appendChild(innerDivContent), conDiv.appendChild(this.innerDiv), 
            this.mainDiv.appendChild(searchDiv), this.mainDiv.appendChild(conDiv), this.mainDiv;
        }, ColumnChooser.prototype.confirmDlgBtnClick = function(args) {
            if (this.stateChangeColumns = [], !isNullOrUndefined(args)) {
                this.hideColumn.length && this.columnStateChange(this.hideColumn, !1), this.showColumn.length && this.columnStateChange(this.showColumn, !0);
                var params = {
                    requestType: "columnstate",
                    element: this.parent.element,
                    columns: this.stateChangeColumns,
                    dialogInstance: this.dlgObj
                };
                this.parent.trigger(actionComplete, params), this.getShowHideService.setVisible(this.stateChangeColumns), 
                this.clearActions(), this.parent.notify("tooltip-destroy", {
                    module: "edit"
                });
            }
        }, ColumnChooser.prototype.columnStateChange = function(stateColumns, state) {
            for (var index = 0; index < stateColumns.length; index++) {
                var colUid = stateColumns[index], currentCol = this.parent.getColumnByUid(colUid);
                currentCol.visible = state, this.stateChangeColumns.push(currentCol);
            }
        }, ColumnChooser.prototype.clearActions = function() {
            this.hideColumn = [], this.showColumn = [], this.hideDialog(), this.addcancelIcon();
        }, ColumnChooser.prototype.checkstatecolumn = function(isChecked, coluid) {
            isChecked ? (-1 !== this.hideColumn.indexOf(coluid) && this.hideColumn.splice(this.hideColumn.indexOf(coluid), 1), 
            -1 === this.showColumn.indexOf(coluid) && this.showColumn.push(coluid)) : (-1 !== this.showColumn.indexOf(coluid) && this.showColumn.splice(this.showColumn.indexOf(coluid), 1), 
            -1 === this.hideColumn.indexOf(coluid) && this.hideColumn.push(coluid));
        }, ColumnChooser.prototype.columnChooserSearch = function(searchVal) {
            var fltrCol, clearSearch = !1;
            if ("" === searchVal ? (this.removeCancelIcon(), fltrCol = this.getColumns(), clearSearch = !0) : fltrCol = new DataManager(this.getColumns()).executeLocal(new Query().where("headerText", "startswith", searchVal, !0)), 
            fltrCol.length) this.innerDiv.innerHTML = " ", this.innerDiv.classList.remove("e-ccnmdiv"), 
            this.innerDiv.appendChild(this.refreshCheckboxList(fltrCol, searchVal)), clearSearch || this.addcancelIcon(); else {
                var nMatchele = createElement("span", {
                    className: "e-cc e-nmatch"
                });
                nMatchele.innerHTML = this.l10n.getConstant("Matchs"), this.innerDiv.innerHTML = " ", 
                this.innerDiv.appendChild(nMatchele), this.innerDiv.classList.add("e-ccnmdiv");
            }
            this.flag = !0, this.stopTimer();
        }, ColumnChooser.prototype.wireEvents = function() {
            EventHandler.add(this.dlgObj.element, "click", this.checkBoxClickHandler, this), 
            EventHandler.add(this.searchBoxObj.searchBox, "keyup", this.columnChooserManualSearch, this), 
            this.searchBoxObj.wireEvent();
        }, ColumnChooser.prototype.unWireEvents = function() {
            this.parent.isDestroyed || (this.dlgObj.element && EventHandler.remove(this.dlgObj.element, "click", this.checkBoxClickHandler), 
            EventHandler.remove(this.searchBoxObj.searchBox, "keyup", this.columnChooserManualSearch), 
            this.searchBoxObj.unWireEvent());
        }, ColumnChooser.prototype.checkBoxClickHandler = function(e) {
            var checkstate, elem = parentsUntil(e.target, "e-checkbox-wrapper");
            if (elem) {
                if (toogleCheckbox(elem.parentElement), elem.querySelector(".e-chk-hidden").focus(), 
                elem.querySelector(".e-check")) checkstate = !0; else {
                    if (!elem.querySelector(".e-uncheck")) return;
                    checkstate = !1;
                }
                var columnUid = parentsUntil(elem, "e-ccheck").getAttribute("uid");
                this.checkstatecolumn(checkstate, columnUid);
            }
        }, ColumnChooser.prototype.refreshCheckboxList = function(gdCol, searchVal) {
            this.ulElement = createElement("ul", {
                className: "e-ccul-ele e-cc"
            });
            for (var i = 0; i < gdCol.length; i++) {
                var columns = gdCol[i];
                this.renderCheckbox(columns);
            }
            return this.ulElement;
        }, ColumnChooser.prototype.refreshCheckboxState = function() {
            this.dlgObj.element.querySelector(".e-cc.e-input").value = "", this.columnChooserSearch("");
            for (var i = 0; i < this.parent.element.querySelectorAll(".e-cc-chbox").length; i++) {
                var element = this.parent.element.querySelectorAll(".e-cc-chbox")[i], columnUID = parentsUntil(element, "e-ccheck").getAttribute("uid");
                this.parent.getColumnByUid(columnUID).visible ? (element.checked = !0, this.checkState(element.parentElement.querySelector(".e-icons"), !0)) : (element.checked = !1, 
                this.checkState(element.parentElement.querySelector(".e-icons"), !1));
            }
        }, ColumnChooser.prototype.checkState = function(element, state) {
            state ? classList(element, [ "e-check" ], [ "e-uncheck" ]) : classList(element, [ "e-uncheck" ], [ "e-check" ]);
        }, ColumnChooser.prototype.createCheckBox = function(label, checked, uid) {
            var cbox = checked ? this.cBoxTrue.cloneNode(!0) : this.cBoxFalse.cloneNode(!0);
            return cbox.querySelector(".e-label").innerHTML = label, createCboxWithWrap(uid, cbox, "e-ccheck");
        }, ColumnChooser.prototype.renderCheckbox = function(column) {
            var cclist, hideColState, showColState;
            if (column.showInColumnChooser) {
                cclist = createElement("li", {
                    className: "e-cclist e-cc",
                    styles: "list-style:None",
                    id: "e-ccli_" + column.uid
                }), hideColState = -1 !== this.hideColumn.indexOf(column.uid), showColState = -1 !== this.showColumn.indexOf(column.uid);
                var cccheckboxlist = this.createCheckBox(column.headerText, column.visible && !hideColState || showColState, column.uid);
                cclist.appendChild(cccheckboxlist), this.ulElement.appendChild(cclist);
            }
        }, ColumnChooser.prototype.columnChooserManualSearch = function(e) {
            this.addcancelIcon(), this.searchValue = e.target.value, this.stopTimer(), this.startTimer(e);
        }, ColumnChooser.prototype.startTimer = function(e) {
            var proxy = this, interval = proxy.flag || 13 === e.keyCode ? 0 : 500;
            this.timer = window.setInterval(function() {
                proxy.columnChooserSearch(proxy.searchValue);
            }, interval);
        }, ColumnChooser.prototype.stopTimer = function() {
            window.clearInterval(this.timer);
        }, ColumnChooser.prototype.addcancelIcon = function() {
            this.dlgDiv.querySelector(".e-cc.e-ccsearch-icon").classList.add("e-cc-cancel");
        }, ColumnChooser.prototype.removeCancelIcon = function() {
            this.dlgDiv.querySelector(".e-cc.e-ccsearch-icon").classList.remove("e-cc-cancel");
        }, ColumnChooser.prototype.mOpenDlg = function() {
            Browser.isDevice && (this.dlgObj.element.querySelector(".e-cc-searchdiv").classList.remove("e-input-focus"), 
            this.dlgObj.element.querySelectorAll(".e-cc-chbox")[0].focus());
        }, ColumnChooser.prototype.getModuleName = function() {
            return "columnChooser";
        }, ColumnChooser;
    }(), CellStyle = function() {
        return function() {
            this.numFmtId = 0, this.backColor = "none", this.fontName = "Calibri", this.fontSize = 14, 
            this.fontColor = "#000000", this.italic = !1, this.bold = !1, this.underline = !1, 
            this.wrapText = !1, this.hAlign = "general", this.vAlign = "bottom", this.numberFormat = "GENERAL", 
            this.type = "datetime", this.borders = new Borders(), this.isGlobalStyle = !1;
        };
    }(), Font$2 = function() {
        return function() {
            this.sz = 14, this.name = "Calibri", this.u = !1, this.b = !1, this.i = !1, this.color = "FF000000";
        };
    }(), CellXfs = function() {
        return function() {};
    }(), Alignment = function() {
        return function() {};
    }(), CellStyleXfs = function() {
        return function() {};
    }(), CellStyles = function() {
        return function() {
            this.name = "Normal", this.xfId = 0;
        };
    }(), NumFmt = function() {
        return function(id, code) {
            this.numFmtId = id, this.formatCode = code;
        };
    }(), Border$2 = function() {
        return function(mLine, mColor) {
            this.lineStyle = mLine, this.color = mColor;
        };
    }(), Borders = function() {
        return function() {
            this.left = new Border$2("none", "#FFFFFF"), this.right = new Border$2("none", "#FFFFFF"), 
            this.top = new Border$2("none", "#FFFFFF"), this.bottom = new Border$2("none", "#FFFFFF"), 
            this.all = new Border$2("none", "#FFFFFF");
        };
    }(), __extends$133 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), Cell$1 = function() {
        return function() {};
    }(), Cells = function(_super) {
        function Cells() {
            var _this = null !== _super && _super.apply(this, arguments) || this;
            return _this.add = function(cell) {
                for (var inserted = !1, count = 0, _i = 0, _a = _this; _i < _a.length; _i++) {
                    _a[_i].index === cell.index && (_this[count] = cell, inserted = !0), count++;
                }
                inserted || _this.push(cell);
            }, _this;
        }
        return __extends$133(Cells, _super), Cells;
    }(Array), Column$2 = function() {
        return function() {};
    }(), __extends$1$9 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), Row$2 = function() {
        return function() {};
    }(), Rows = function(_super) {
        function Rows() {
            var _this = null !== _super && _super.apply(this, arguments) || this;
            return _this.add = function(row) {
                for (var inserted = !1, count = 0, _i = 0, _a = _this; _i < _a.length; _i++) {
                    _a[_i].index === row.index && (_this[count] = row, inserted = !0), count++;
                }
                inserted || _this.push(row);
            }, _this;
        }
        return __extends$1$9(Rows, _super), Rows;
    }(Array), __extends$2$9 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), Worksheets = function(_super) {
        function Worksheets() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$2$9(Worksheets, _super), Worksheets;
    }(Array), __extends$3$7 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), Worksheet = function() {
        return function() {
            this.isSummaryRowBelow = !0;
        };
    }(), HyperLink = function() {
        return function() {};
    }(), Grouping = function() {
        return function() {};
    }(), FreezePane = function() {
        return function() {};
    }(), MergeCell = function() {
        return function() {};
    }(), MergeCells = function(_super) {
        function MergeCells() {
            var _this = null !== _super && _super.apply(this, arguments) || this;
            return _this.add = function(mergeCell) {
                for (var inserted = !1, count = 0, _i = 0, _a = _this; _i < _a.length; _i++) {
                    var mCell = _a[_i];
                    if (MergeCells.isIntersecting(mCell, mergeCell)) {
                        var intersectingCell = new MergeCell();
                        intersectingCell.x = Math.min(mCell.x, mergeCell.x), intersectingCell.y = Math.min(mCell.Y, mergeCell.y), 
                        intersectingCell.width = Math.max(mCell.Width + mCell.X, mergeCell.width + mergeCell.x), 
                        intersectingCell.height = Math.max(mCell.Height + mCell.Y, mergeCell.height + mergeCell.y), 
                        intersectingCell.ref = _this[count].ref.split(":")[0] + ":" + mergeCell.ref.split(":")[1], 
                        _this[count] = intersectingCell, inserted = !0;
                    }
                    count++;
                }
                inserted || _this.push(mergeCell);
            }, _this;
        }
        return __extends$3$7(MergeCells, _super), MergeCells.isIntersecting = function(base, compare) {
            return base.x <= compare.x + compare.width && compare.x <= base.x + base.width && base.y <= compare.y + compare.height && compare.y <= base.y + base.height;
        }, MergeCells;
    }(Array), ValueFormatter$1 = function() {
        function ValueFormatter(cultureName) {
            this.intl = new Internationalization();
        }
        return ValueFormatter.prototype.getFormatFunction = function(format) {
            return format.type ? this.intl.getDateFormat(format) : this.intl.getNumberFormat(format);
        }, ValueFormatter.prototype.toView = function(value, format) {
            var result = value;
            return isNullOrUndefined(format) || isNullOrUndefined(value) || (result = format(value)), 
            result;
        }, ValueFormatter.prototype.displayText = function(value, format) {
            return this.toView(value, this.getFormatFunction(format));
        }, ValueFormatter;
    }(), CsvHelper = function() {
        function CsvHelper(json) {
            if (this.csvStr = "", this.formatter = new ValueFormatter$1(), this.isMicrosoftBrowser = !!navigator.msSaveBlob, 
            null !== json.styles && void 0 !== json.styles) {
                this.globalStyles = new Map();
                for (var i = 0; i < json.styles.length; i++) void 0 !== json.styles[i].name && void 0 !== json.styles[i].numberFormat && this.globalStyles.set(json.styles[i].name, json.styles[i].numberFormat);
            }
            null !== json.worksheets && void 0 !== json.worksheets && this.parseWorksheet(json.worksheets[0]);
        }
        return CsvHelper.prototype.parseWorksheet = function(json) {
            null !== json.rows && void 0 !== json.rows && this.parseRows(json.rows);
        }, CsvHelper.prototype.parseRows = function(rows) {
            for (var count = 1, _i = 0, rows_1 = rows; _i < rows_1.length; _i++) {
                var row = rows_1[_i];
                if (null === row.index || void 0 === row.index) throw Error("Row index is missing.");
                for (;count < row.index; ) this.csvStr += "\n", count++;
                this.parseRow(row);
            }
        }, CsvHelper.prototype.parseRow = function(row) {
            if (null !== row.cells && void 0 !== row.cells) for (var count = 1, _i = 0, _a = row.cells; _i < _a.length; _i++) {
                var cell = _a[_i];
                if (null === cell.index || void 0 === cell.index) throw Error("Cell index is missing.");
                for (;count < cell.index; ) this.csvStr += ",", count++;
                this.parseCell(cell);
            }
        }, CsvHelper.prototype.parseCell = function(cell) {
            var csv = this.csvStr;
            void 0 !== cell.value && (cell.value instanceof Date ? void 0 !== cell.style && void 0 !== cell.style.numberFormat ? csv += this.parseCellValue(this.formatter.displayText(cell.value, {
                type: "dateTime",
                skeleton: cell.style.numberFormat
            })) : void 0 !== cell.style && void 0 !== cell.style.name && this.globalStyles.has(cell.style.name) ? csv += this.parseCellValue(this.formatter.displayText(cell.value, {
                type: "dateTime",
                skeleton: this.globalStyles.get(cell.style.name)
            })) : csv += cell.value : "boolean" == typeof cell.value ? csv += cell.value ? "TRUE" : "FALSE" : "number" == typeof cell.value ? void 0 !== cell.style && void 0 !== cell.style.numberFormat ? csv += this.parseCellValue(this.formatter.displayText(cell.value, {
                format: cell.style.numberFormat
            })) : void 0 !== cell.style && void 0 !== cell.style.name && this.globalStyles.has(cell.style.name) ? csv += this.parseCellValue(this.formatter.displayText(cell.value, {
                format: this.globalStyles.get(cell.style.name)
            })) : csv += cell.value : csv += this.parseCellValue(cell.value)), this.csvStr = csv;
        }, CsvHelper.prototype.parseCellValue = function(value) {
            return -1 !== value.indexOf(",") ? value = '"' + value + '"' : value;
        }, CsvHelper.prototype.save = function(fileName) {
            if (this.buffer = new Blob([ this.csvStr ], {
                type: "text/plain"
            }), this.isMicrosoftBrowser) navigator.msSaveBlob(this.buffer, fileName); else {
                var dataUrl_1 = window.URL.createObjectURL(this.buffer), dwlLink = document.createElementNS("http://www.w3.org/1999/xhtml", "a");
                dwlLink.download = fileName, dwlLink.href = dataUrl_1;
                var event_1 = document.createEvent("MouseEvent");
                event_1.initEvent("click", !0, !0), dwlLink.dispatchEvent(event_1), setTimeout(function() {
                    window.URL.revokeObjectURL(dataUrl_1);
                });
            }
        }, CsvHelper.prototype.saveAsBlob = function() {
            return new Blob([ this.csvStr ], {
                type: "text/csv"
            });
        }, CsvHelper;
    }(), BlobHelper = function() {
        function BlobHelper() {
            this.parts = [];
        }
        return BlobHelper.prototype.append = function(part) {
            this.parts.push(part), this.blob = void 0;
        }, BlobHelper.prototype.getBlob = function() {
            return new Blob(this.parts, {
                type: "text/plain"
            });
        }, BlobHelper;
    }(), Workbook = function() {
        function Workbook(json, saveType, culture) {
            if (this.sharedStringCount = 0, this.unitsProportions = [ 1.28, .32, 96, 96 / 25.4, 96 / 2.54, 1, 96 / 72, 96 / 72 / 12700 ], 
            this.hyperlinkStyle = {
                fontColor: "#0000FF",
                underline: !0
            }, this.culture = void 0 !== culture ? culture : "en-US", this.intl = new Internationalization(this.culture), 
            this.mSaveType = saveType, "xlsx" === saveType) {
                if (this.mArchive = new ZipArchive(), this.sharedString = [], this.mFonts = [], 
                this.mBorders = [], this.mStyles = [], this.printTitles = new Map(), this.cellStyles = new Map(), 
                this.mNumFmt = new Map(), this.mFills = new Map(), this.mStyles.push(new CellStyle()), 
                this.mFonts.push(new Font$2()), this.cellStyles.set("Normal", new CellStyles()), 
                this.mCellXfs = [], this.mCellStyleXfs = [], null !== json.styles && void 0 !== json.styles) {
                    this.globalStyles = new Map();
                    for (var i = 0; i < json.styles.length; i++) if (void 0 !== json.styles[i].name) {
                        if (this.cellStyles.has(json.styles[i].name)) throw Error("Style name " + json.styles[i].name + " is already existed");
                        var cellStyle = new CellStyle();
                        cellStyle.isGlobalStyle = !0, this.parserCellStyle(json.styles[i], cellStyle, "none");
                        var cellStyles = new CellStyles();
                        cellStyles.name = cellStyle.name, cellStyles.xfId = cellStyle.index, this.cellStyles.set(cellStyles.name, cellStyles);
                        var tFormat = {};
                        void 0 !== json.styles[i].numberFormat && (tFormat.format = json.styles[i].numberFormat), 
                        void 0 !== json.styles[i].type ? tFormat.type = json.styles[i].type : tFormat.type = "datetime", 
                        void 0 !== tFormat.format && this.globalStyles.set(json.styles[i].name, tFormat);
                    }
                }
                if (null === json.worksheets || void 0 === json.worksheets) throw Error("Worksheet is expected.");
                this.parserWorksheets(json.worksheets), null !== json.builtInProperties && void 0 !== json.builtInProperties && (this.builtInProperties = new BuiltInProperties(), 
                this.parserBuiltInProperties(json.builtInProperties, this.builtInProperties));
            } else this.csvHelper = new CsvHelper(json);
        }
        return Workbook.prototype.parserBuiltInProperties = function(jsonBuiltInProperties, builtInProperties) {
            null !== jsonBuiltInProperties.author && void 0 !== jsonBuiltInProperties.author && (builtInProperties.author = jsonBuiltInProperties.author), 
            null !== jsonBuiltInProperties.comments && void 0 !== jsonBuiltInProperties.comments && (builtInProperties.comments = jsonBuiltInProperties.comments), 
            null !== jsonBuiltInProperties.category && void 0 !== jsonBuiltInProperties.category && (builtInProperties.category = jsonBuiltInProperties.category), 
            null !== jsonBuiltInProperties.company && void 0 !== jsonBuiltInProperties.company && (builtInProperties.company = jsonBuiltInProperties.company), 
            null !== jsonBuiltInProperties.manager && void 0 !== jsonBuiltInProperties.manager && (builtInProperties.manager = jsonBuiltInProperties.manager), 
            null !== jsonBuiltInProperties.subject && void 0 !== jsonBuiltInProperties.subject && (builtInProperties.subject = jsonBuiltInProperties.subject), 
            null !== jsonBuiltInProperties.title && void 0 !== jsonBuiltInProperties.title && (builtInProperties.title = jsonBuiltInProperties.title), 
            null !== jsonBuiltInProperties.createdDate && void 0 !== jsonBuiltInProperties.createdDate && (builtInProperties.createdDate = jsonBuiltInProperties.createdDate), 
            null !== jsonBuiltInProperties.modifiedDate && void 0 !== jsonBuiltInProperties.modifiedDate && (builtInProperties.modifiedDate = jsonBuiltInProperties.modifiedDate), 
            null !== jsonBuiltInProperties.tags && void 0 !== jsonBuiltInProperties.tags && (builtInProperties.tags = jsonBuiltInProperties.tags), 
            null !== jsonBuiltInProperties.status && void 0 !== jsonBuiltInProperties.status && (builtInProperties.status = jsonBuiltInProperties.status);
        }, Workbook.prototype.parserWorksheets = function(json) {
            this.worksheets = new Worksheets();
            for (var length = json.length, i = 0; i < length; i++) {
                var jsonSheet = json[i], sheet = new Worksheet();
                this.mergeCells = new MergeCells(), this.mHyperLinks = [], null !== jsonSheet.name && void 0 !== jsonSheet.name ? sheet.name = jsonSheet.name : sheet.name = "Sheet" + (i + 1).toString(), 
                sheet.index = i + 1, null !== jsonSheet.columns && void 0 !== jsonSheet.columns && this.parserColumns(jsonSheet.columns, sheet), 
                null !== jsonSheet.rows && void 0 !== jsonSheet.rows && this.parserRows(jsonSheet.rows, sheet), 
                null !== jsonSheet.freeze && void 0 !== jsonSheet.freeze && this.parserFreezePanes(jsonSheet.freeze, sheet), 
                null !== jsonSheet.printTitle && void 0 !== jsonSheet.printTitle && this.parserPrintTitle(jsonSheet.printTitle, sheet), 
                void 0 !== jsonSheet.pageSetup && void 0 !== jsonSheet.pageSetup.isSummaryRowBelow && (sheet.isSummaryRowBelow = jsonSheet.pageSetup.isSummaryRowBelow), 
                sheet.index = i + 1, sheet.mergeCells = this.mergeCells, sheet.hyperLinks = this.mHyperLinks, 
                this.worksheets.push(sheet);
            }
        }, Workbook.prototype.mergeOptions = function(fromJson, toJson) {
            var result = {};
            return this.applyProperties(fromJson, result), this.applyProperties(toJson, result), 
            result;
        }, Workbook.prototype.applyProperties = function(sourceJson, destJson) {
            for (var keys = Object.keys(sourceJson), index = 0; index < keys.length; index++) "name" !== keys[index] && (destJson[keys[index]] = sourceJson[keys[index]]);
        }, Workbook.prototype.getCellName = function(row, column) {
            return this.getColumnName(column) + row.toString();
        }, Workbook.prototype.getColumnName = function(col) {
            col--;
            var strColumnName = "";
            do {
                var iCurrentDigit = col % 26;
                col = col / 26 - 1, strColumnName = String.fromCharCode(65 + iCurrentDigit) + strColumnName;
            } while (col >= 0);
            return strColumnName;
        }, Workbook.prototype.parserPrintTitle = function(json, sheet) {
            var titleRowName, printTitleName = "";
            if (null !== json.fromRow && void 0 !== json.fromRow) {
                titleRowName = "$" + json.fromRow + ":$" + (null !== json.toRow && void 0 !== json.toRow ? json.toRow : json.fromRow);
            }
            var titleColName;
            if (null !== json.fromColumn && void 0 !== json.fromColumn) {
                var fromColumn = json.fromColumn, toColumn = void 0;
                toColumn = null !== json.toColumn && void 0 !== json.toColumn ? json.toColumn : json.fromColumn, 
                titleColName = "$" + this.getColumnName(fromColumn) + ":$" + this.getColumnName(toColumn);
            }
            void 0 !== titleRowName && (printTitleName += sheet.name + "!" + titleRowName), 
            void 0 !== titleColName && void 0 !== titleRowName ? printTitleName += "," + sheet.name + "!" + titleColName : void 0 !== titleColName && (printTitleName += sheet.name + "!" + titleColName), 
            "" !== printTitleName && this.printTitles.set(sheet.index - 1, printTitleName);
        }, Workbook.prototype.parserFreezePanes = function(json, sheet) {
            sheet.freezePanes = new FreezePane(), null !== json.row && void 0 !== json.row ? sheet.freezePanes.row = json.row : sheet.freezePanes.row = 0, 
            null !== json.column && void 0 !== json.column ? sheet.freezePanes.column = json.column : sheet.freezePanes.column = 0, 
            sheet.freezePanes.leftCell = this.getCellName(sheet.freezePanes.row + 1, sheet.freezePanes.column + 1);
        }, Workbook.prototype.parserColumns = function(json, sheet) {
            var columnsLength = json.length;
            sheet.columns = [];
            for (var column = 0; column < columnsLength; column++) {
                var col = new Column$2();
                if (null === json[column].index || void 0 === json[column].index) throw Error("Column index is missing.");
                col.index = json[column].index, null !== json[column].width && void 0 !== json[column].width && (col.width = json[column].width), 
                sheet.columns.push(col);
            }
        }, Workbook.prototype.parserRows = function(json, sheet) {
            var rowsLength = json.length;
            sheet.rows = new Rows();
            for (var rowId = 0, r = 0; r < rowsLength; r++) {
                var row = this.parserRow(json[r], rowId);
                rowId = row.index, sheet.rows.add(row);
            }
        }, Workbook.prototype.parserRow = function(json, rowIndex) {
            var row = new Row$2();
            if (null !== json.height && void 0 !== json.height && (row.height = json.height), 
            null === json.index || void 0 === json.index) throw Error("Row index is missing.");
            return row.index = json.index, null !== json.grouping && void 0 !== json.grouping && this.parseGrouping(json.grouping, row), 
            this.parseCells(json.cells, row), row;
        }, Workbook.prototype.parseGrouping = function(json, row) {
            row.grouping = new Grouping(), void 0 !== json.outlineLevel && (row.grouping.outlineLevel = json.outlineLevel), 
            void 0 !== json.isCollapsed && (row.grouping.isCollapsed = json.isCollapsed), void 0 !== json.isHidden && (row.grouping.isHidden = json.isHidden);
        }, Workbook.prototype.parseCells = function(json, row) {
            row.cells = new Cells();
            for (var cellsLength = void 0 !== json ? json.length : 0, spanMin = 1, spanMax = 1, cellId = 0; cellId < cellsLength; cellId++) {
                var jsonCell = json[cellId], cell = new Cell$1();
                if (null === jsonCell.index || void 0 === jsonCell.index) throw Error("Cell index is missing.");
                if (cell.index = jsonCell.index, cell.index < spanMin ? spanMin = cell.index : cell.index > spanMax && (spanMax = cell.index), 
                cell.refName = this.getCellName(row.index, cell.index), null !== jsonCell.rowSpan && void 0 !== jsonCell.rowSpan ? cell.rowSpan = jsonCell.rowSpan - 1 : cell.rowSpan = 0, 
                null !== jsonCell.colSpan && void 0 !== jsonCell.colSpan ? cell.colSpan = jsonCell.colSpan - 1 : cell.colSpan = 0, 
                this.mergeCells = this.processMergeCells(cell, row.index, this.mergeCells), null !== jsonCell.hyperlink && void 0 !== jsonCell.hyperlink) {
                    var hyperLink = new HyperLink();
                    void 0 !== jsonCell.hyperlink.target && (hyperLink.target = jsonCell.hyperlink.target, 
                    void 0 !== jsonCell.hyperlink.displayText ? cell.value = jsonCell.hyperlink.displayText : cell.value = jsonCell.hyperlink.target, 
                    cell.type = this.getCellValueType(cell.value), hyperLink.ref = cell.refName, hyperLink.rId = this.mHyperLinks.length + 1, 
                    this.mHyperLinks.push(hyperLink), cell.cellStyle = new CellStyle(), this.parserCellStyle(void 0 !== jsonCell.style ? this.mergeOptions(jsonCell.style, this.hyperlinkStyle) : this.hyperlinkStyle, cell.cellStyle, "string"), 
                    cell.styleIndex = cell.cellStyle.index);
                }
                null !== jsonCell.value && void 0 !== jsonCell.value && (cell.value = jsonCell.value, 
                cell.type = this.getCellValueType(cell.value)), null !== jsonCell.style && void 0 !== jsonCell.style && void 0 === cell.styleIndex ? (cell.cellStyle = new CellStyle(), 
                cell.value instanceof Date ? this.parserCellStyle(jsonCell.style, cell.cellStyle, cell.type, 14) : this.parserCellStyle(jsonCell.style, cell.cellStyle, cell.type), 
                cell.styleIndex = cell.cellStyle.index) : cell.value instanceof Date && (cell.cellStyle = new CellStyle(), 
                this.parserCellStyle({}, cell.cellStyle, cell.type, 14), cell.styleIndex = cell.cellStyle.index), 
                this.parseCellType(cell), row.cells.add(cell);
            }
            row.spans = spanMin + ":" + spanMax;
        }, Workbook.prototype.applyGlobalStyle = function(json, cellStyle) {
            var index = 0;
            if (this.cellStyles.has(json.name)) {
                index = this.cellStyles.get(json.name).xfId;
                var cellStyleXfs = this.mCellStyleXfs[index - 1];
                cellStyle.name = json.name;
                var compareResult = this.compareStyleXfs(cellStyleXfs);
                if (compareResult.result) cellStyle.index = compareResult.index; else {
                    var cellXfs = new CellXfs();
                    cellXfs.alignment = cellStyleXfs.alignment, cellXfs.applyAlignment = cellStyleXfs.applyAlignment, 
                    cellXfs.borderId = cellStyleXfs.borderId, cellXfs.fillId = cellStyleXfs.fillId, 
                    cellXfs.fontId = cellStyleXfs.fontId, cellXfs.numFmtId = cellStyleXfs.numFmtId, 
                    cellXfs.xfId = index, this.mCellXfs.push(cellXfs), this.mStyles.push(cellStyle), 
                    cellStyle.index = this.mCellXfs.length;
                }
            }
        }, Workbook.prototype.compareStyleXfs = function(toCompareStyle) {
            for (var result = !1, index = 1, _i = 0, _a = this.mCellXfs; _i < _a.length; _i++) {
                var baseStyle = _a[_i];
                if (result = baseStyle.alignment === toCompareStyle.alignment && baseStyle.borderId === toCompareStyle.borderId && baseStyle.numFmtId === toCompareStyle.numFmtId && baseStyle.fillId === toCompareStyle.fillId && baseStyle.fontId === toCompareStyle.fontId) break;
                index++;
            }
            return {
                index: index,
                result: result
            };
        }, Workbook.prototype.parserCellStyle = function(json, cellStyle, cellType, defStyleIndex) {
            if (null !== json.name && void 0 !== json.name) {
                if (!cellStyle.isGlobalStyle) return void this.applyGlobalStyle(json, cellStyle);
                cellStyle.name = json.name;
            }
            null !== json.backColor && void 0 !== json.backColor && (cellStyle.backColor = json.backColor), 
            cellStyle.borders = new Borders(), null !== json.borders && void 0 !== json.borders && this.parserBorder(json.borders, cellStyle.borders.all), 
            null !== json.leftBorder && void 0 !== json.leftBorder && this.parserBorder(json.leftBorder, cellStyle.borders.left), 
            null !== json.rightBorder && void 0 !== json.rightBorder && this.parserBorder(json.rightBorder, cellStyle.borders.right), 
            null !== json.topBorder && void 0 !== json.topBorder && this.parserBorder(json.topBorder, cellStyle.borders.top), 
            null !== json.bottomBorder && void 0 !== json.bottomBorder && this.parserBorder(json.bottomBorder, cellStyle.borders.bottom), 
            null !== json.fontName && void 0 !== json.fontName && (cellStyle.fontName = json.fontName), 
            null !== json.fontSize && void 0 !== json.fontSize && (cellStyle.fontSize = json.fontSize), 
            null !== json.fontColor && void 0 !== json.fontColor && (cellStyle.fontColor = json.fontColor), 
            null !== json.italic && void 0 !== json.italic && (cellStyle.italic = json.italic), 
            null !== json.bold && void 0 !== json.bold && (cellStyle.bold = json.bold), null !== json.hAlign && void 0 !== json.hAlign && (cellStyle.hAlign = json.hAlign), 
            null !== json.vAlign && void 0 !== json.vAlign && (cellStyle.vAlign = json.vAlign), 
            null !== json.underline && void 0 !== json.underline && (cellStyle.underline = json.underline), 
            null !== json.wrapText && void 0 !== json.wrapText && (cellStyle.wrapText = json.wrapText), 
            null !== json.numberFormat && void 0 !== json.numberFormat ? null !== json.type && void 0 !== json.type ? cellStyle.numberFormat = this.getNumberFormat(json.numberFormat, json.type) : cellStyle.numberFormat = this.getNumberFormat(json.numberFormat, cellType) : void 0 !== defStyleIndex ? (cellStyle.numFmtId = 14, 
            cellStyle.numberFormat = "GENERAL") : cellStyle.numberFormat = "GENERAL", cellStyle.index = this.processCellStyle(cellStyle);
        }, Workbook.prototype.switchNumberFormat = function(numberFormat, type) {
            var format = this.getNumberFormat(numberFormat, type);
            if (format !== numberFormat) {
                var numFmt = this.mNumFmt.get(numberFormat);
                if (void 0 !== numFmt && (numFmt.formatCode = format, this.mNumFmt.has(format))) {
                    for (var _i = 0, _a = this.mCellStyleXfs; _i < _a.length; _i++) {
                        var cellStyleXfs = _a[_i];
                        cellStyleXfs.numFmtId === numFmt.numFmtId && (cellStyleXfs.numFmtId = this.mNumFmt.get(format).numFmtId);
                    }
                    for (var _b = 0, _c = this.mCellXfs; _b < _c.length; _b++) {
                        var cellXfs = _c[_b];
                        cellXfs.numFmtId === numFmt.numFmtId && (cellXfs.numFmtId = this.mNumFmt.get(format).numFmtId);
                    }
                }
            }
        }, Workbook.prototype.getNumberFormat = function(numberFormat, type) {
            var returnFormat;
            switch (type) {
              case "number":
                try {
                    returnFormat = this.intl.getNumberPattern({
                        format: numberFormat
                    });
                } catch (error) {
                    returnFormat = numberFormat;
                }
                break;

              case "datetime":
                try {
                    returnFormat = this.intl.getDatePattern({
                        skeleton: numberFormat,
                        type: "dateTime"
                    }, !0);
                } catch (error) {
                    returnFormat = numberFormat;
                }
                break;

              case "date":
                try {
                    returnFormat = this.intl.getDatePattern({
                        skeleton: numberFormat,
                        type: "date"
                    }, !0);
                } catch (error) {
                    returnFormat = numberFormat;
                }
                break;

              case "time":
                try {
                    returnFormat = this.intl.getDatePattern({
                        skeleton: numberFormat,
                        type: "time"
                    }, !0);
                } catch (error) {
                    returnFormat = numberFormat;
                }
                break;

              default:
                returnFormat = numberFormat;
            }
            return returnFormat;
        }, Workbook.prototype.parserBorder = function(json, border) {
            null !== json.color && void 0 !== json.color ? border.color = json.color : border.color = "#000000", 
            null !== json.lineStyle && void 0 !== json.lineStyle ? border.lineStyle = json.lineStyle : border.lineStyle = "thin";
        }, Workbook.prototype.processCellStyle = function(style) {
            var compareResult = this.compareStyle(style);
            if (compareResult.result) return compareResult.index;
            this.mStyles.push(style);
            var cellXfs = void 0;
            cellXfs = style.isGlobalStyle ? new CellStyleXfs() : new CellXfs();
            var compareFontResult = this.isNewFont(style);
            if (compareFontResult.result) cellXfs.fontId = compareFontResult.index; else {
                var font = new Font$2();
                font.b = style.bold, font.i = style.italic, font.name = style.fontName, font.sz = style.fontSize, 
                font.u = style.underline, font.color = "FF" + style.fontColor.replace("#", ""), 
                this.mFonts.push(font), cellXfs.fontId = this.mFonts.length - 1;
            }
            if ("none" !== style.backColor) {
                var backColor = "FF" + style.backColor.replace("#", "");
                if (this.mFills.has(backColor)) {
                    var fillId = this.mFills.get(backColor);
                    cellXfs.fillId = fillId;
                } else {
                    fillId = this.mFills.size + 2;
                    this.mFills.set(backColor, fillId), cellXfs.fillId = fillId;
                }
            } else cellXfs.fillId = 0;
            if (this.isNewBorder(style) ? cellXfs.borderId = 0 : (this.mBorders.push(style.borders), 
            cellXfs.borderId = this.mBorders.length), cellXfs.xfId = 0, "GENERAL" !== style.numberFormat) if (this.mNumFmt.has(style.numberFormat)) {
                var numFmt = this.mNumFmt.get(style.numberFormat);
                cellXfs.numFmtId = numFmt.numFmtId;
            } else {
                var id = this.mNumFmt.size + 164;
                this.mNumFmt.set(style.numberFormat, new NumFmt(id, style.numberFormat)), cellXfs.numFmtId = id;
            } else "GENERAL" === style.numberFormat && 14 === style.numFmtId ? cellXfs.numFmtId = 14 : cellXfs.numFmtId = 0;
            return ("left" !== style.hAlign || "bottom" !== style.vAlign || style.wrapText) && (cellXfs.applyAlignment = 1, 
            cellXfs.alignment = new Alignment(), cellXfs.alignment.horizontal = style.hAlign, 
            cellXfs.alignment.vertical = style.vAlign, cellXfs.alignment.wrapText = style.wrapText ? 1 : 0), 
            style.isGlobalStyle ? (this.mCellStyleXfs.push(cellXfs), this.mCellStyleXfs.length) : (this.mCellXfs.push(cellXfs), 
            this.mCellXfs.length);
        }, Workbook.prototype.isNewFont = function(toCompareStyle) {
            for (var result = !1, index = 0, _i = 0, _a = this.mFonts; _i < _a.length; _i++) {
                var font = _a[_i];
                index++;
                var fontColor = void 0;
                if (void 0 !== toCompareStyle.fontColor && (fontColor = "FF" + toCompareStyle.fontColor.replace("#", "")), 
                result = font.color === fontColor && font.b === toCompareStyle.bold && font.i === toCompareStyle.italic && font.u === toCompareStyle.underline && font.name === toCompareStyle.fontName && font.sz === toCompareStyle.fontSize) break;
            }
            return index -= 1, {
                index: index,
                result: result
            };
        }, Workbook.prototype.isNewBorder = function(toCompareStyle) {
            var bStyle = new CellStyle();
            return this.isAllBorder(toCompareStyle.borders) ? bStyle.borders.all.color === toCompareStyle.borders.all.color && bStyle.borders.all.lineStyle === toCompareStyle.borders.all.lineStyle : bStyle.borders.left.color === toCompareStyle.borders.left.color && bStyle.borders.left.lineStyle === toCompareStyle.borders.left.lineStyle && bStyle.borders.right.color === toCompareStyle.borders.right.color && bStyle.borders.right.lineStyle === toCompareStyle.borders.right.lineStyle && bStyle.borders.top.color === toCompareStyle.borders.top.color && bStyle.borders.top.lineStyle === toCompareStyle.borders.top.lineStyle && bStyle.borders.bottom.color === toCompareStyle.borders.bottom.color && bStyle.borders.bottom.lineStyle === toCompareStyle.borders.bottom.lineStyle;
        }, Workbook.prototype.isAllBorder = function(toCompareBorder) {
            var allBorderStyle = new CellStyle();
            return allBorderStyle.borders.all.color !== toCompareBorder.all.color && allBorderStyle.borders.all.lineStyle !== toCompareBorder.all.lineStyle;
        }, Workbook.prototype.compareStyle = function(toCompareStyle) {
            for (var result = !0, index = 0, globalStyleIndex = 0, _i = 0, _a = this.mStyles; _i < _a.length; _i++) {
                var baseStyle = _a[_i];
                if (result = baseStyle.backColor === toCompareStyle.backColor && baseStyle.bold === toCompareStyle.bold && baseStyle.numFmtId === toCompareStyle.numFmtId && baseStyle.numberFormat === toCompareStyle.numberFormat && baseStyle.type === toCompareStyle.type && baseStyle.fontColor === toCompareStyle.fontColor && baseStyle.fontName === toCompareStyle.fontName && baseStyle.fontSize === toCompareStyle.fontSize && baseStyle.hAlign === toCompareStyle.hAlign && baseStyle.italic === toCompareStyle.italic && baseStyle.underline === toCompareStyle.underline && baseStyle.vAlign === toCompareStyle.vAlign && baseStyle.wrapText === toCompareStyle.wrapText && baseStyle.borders.all.color === toCompareStyle.borders.all.color && baseStyle.borders.all.lineStyle === toCompareStyle.borders.all.lineStyle && baseStyle.borders.left.color === toCompareStyle.borders.left.color && baseStyle.borders.left.lineStyle === toCompareStyle.borders.left.lineStyle && baseStyle.borders.right.color === toCompareStyle.borders.right.color && baseStyle.borders.right.lineStyle === toCompareStyle.borders.right.lineStyle && baseStyle.borders.top.color === toCompareStyle.borders.top.color && baseStyle.borders.top.lineStyle === toCompareStyle.borders.top.lineStyle && baseStyle.borders.bottom.color === toCompareStyle.borders.bottom.color && baseStyle.borders.bottom.lineStyle === toCompareStyle.borders.bottom.lineStyle) break;
                baseStyle.isGlobalStyle ? globalStyleIndex++ : index++;
            }
            return toCompareStyle.isGlobalStyle && (index = globalStyleIndex + 1), {
                index: index,
                result: result
            };
        }, Workbook.prototype.contains = function(array, item) {
            var index = array.indexOf(item);
            return index > -1 && index < array.length;
        }, Workbook.prototype.getCellValueType = function(value) {
            return value instanceof Date ? "datetime" : "boolean" == typeof value ? "boolean" : "number" == typeof value ? "number" : "string";
        }, Workbook.prototype.parseCellType = function(cell) {
            var saveType, type = cell.type, value = cell.value;
            switch (type) {
              case "datetime":
                if (value = this.toOADate(value), void 0 !== cell.cellStyle && void 0 !== cell.cellStyle.name && this.globalStyles.has(cell.cellStyle.name)) {
                    var value_1 = this.globalStyles.get(cell.cellStyle.name);
                    this.switchNumberFormat(value_1.format, value_1.type);
                }
                saveType = "n";
                break;

              case "boolean":
                value = value ? 1 : 0, saveType = "b";
                break;

              case "number":
                saveType = "n", void 0 !== cell.cellStyle && void 0 !== cell.cellStyle.name && this.globalStyles.has(cell.cellStyle.name) && this.switchNumberFormat(this.globalStyles.get(cell.cellStyle.name).format, "number");
                break;

              case "string":
                this.sharedStringCount++, saveType = "s", this.contains(this.sharedString, value) || this.sharedString.push(value), 
                value = this.sharedString.indexOf(value);
            }
            cell.saveType = saveType, cell.value = value;
        }, Workbook.prototype.saveAsBlob = function(blobSaveType) {
            var _this = this;
            switch (blobSaveType) {
              case "text/csv":
                return new Promise(function(resolve, reject) {
                    var obj = {};
                    obj.blobData = _this.csvHelper.saveAsBlob(), resolve(obj);
                });

              default:
                return new Promise(function(resolve, reject) {
                    _this.saveInternal(), _this.mArchive.saveAsBlob().then(function(blob) {
                        var obj = {};
                        obj.blobData = new Blob([ blob ], {
                            type: "application/vnd.openxmlformats-officedocument.spreadsheetml.sheet"
                        }), resolve(obj);
                    });
                });
            }
        }, Workbook.prototype.save = function(fileName, proxyUrl) {
            var _this = this;
            if (null === fileName || void 0 === fileName || "" === fileName) throw new Error("Argument Null Exception: fileName cannot be null or empty");
            var xlsxMatch = fileName.match(".xlsx$"), csvMatch = fileName.match(".csv$");
            if (null !== xlsxMatch && xlsxMatch[0] === "." + this.mSaveType) this.saveInternal(), 
            this.mArchive.save(fileName).then(function() {
                _this.mArchive.destroy();
            }); else {
                if (null === csvMatch || csvMatch[0] !== "." + this.mSaveType) throw Error("Save type and file extension is different.");
                this.csvHelper.save(fileName);
            }
        }, Workbook.prototype.saveInternal = function() {
            this.saveWorkbook(), this.saveWorksheets(), this.saveSharedString(), this.saveStyles(), 
            this.saveApp(this.builtInProperties), this.saveCore(this.builtInProperties), this.saveContentType(), 
            this.saveTopLevelRelation(), this.saveWorkbookRelation();
        }, Workbook.prototype.saveWorkbook = function() {
            for (var workbookTemp = '<?xml version="1.0" encoding="utf-8"?><workbook xmlns:r = "http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns= "http://schemas.openxmlformats.org/spreadsheetml/2006/main"><workbookPr codeName="ThisWorkbook" defaultThemeVersion= "153222"/><bookViews><workbookView activeTab="0"/></bookViews>', sheets = "<sheets>", length = this.worksheets.length, i = 0; i < length; i++) sheets += '<sheet name="' + this.worksheets[i].name + '" sheetId="' + (i + 1).toString() + '" r:id ="rId' + (i + 1).toString() + '" />';
            if (sheets += "</sheets>", workbookTemp += sheets, this.printTitles.size > 0) {
                var printTitle_1 = "<definedNames>";
                this.printTitles.forEach(function(value, key) {
                    printTitle_1 += '<definedName name="_xlnm.Print_Titles" localSheetId="' + key + '">' + value + "</definedName>";
                }), workbookTemp += printTitle_1 += "</definedNames>";
            }
            this.addToArchive(workbookTemp + "</workbook>", "xl/workbook.xml");
        }, Workbook.prototype.saveWorksheets = function() {
            for (var length = this.worksheets.length, i = 0; i < length; i++) this.saveWorksheet(this.worksheets[i], i);
        }, Workbook.prototype.saveWorksheet = function(sheet, index) {
            var sheetBlob = new BlobHelper(), sheetString = '<?xml version="1.0" encoding="utf-8" standalone="yes"?><worksheet xmlns:r="http://schemas.openxmlformats.org/officeDocument/2006/relationships" xmlns:x14="http://schemas.microsoft.com/office/spreadsheetml/2009/9/main" xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">';
            if (sheet.isSummaryRowBelow ? sheetString += "<sheetPr />" : sheetString += '<sheetPr><outlinePr summaryBelow="0" ></outlinePr></sheetPr>', 
            void 0 !== sheet.freezePanes && (sheetString += this.saveFreezePanes(sheet)), void 0 !== sheet.columns) {
                for (var colString = "<cols>", _i = 0, _a = sheet.columns; _i < _a.length; _i++) {
                    var column = _a[_i];
                    void 0 !== column.width ? colString += '<col min="' + column.index + '" max="' + column.index + '" width="' + this.pixelsToColumnWidth(column.width) + '" customWidth="1" />' : colString += '<col min="' + column.index + '" max="' + column.index + '" width="8.43" customWidth="1" />';
                }
                sheetString += colString + "</cols>";
            }
            if (sheetString += "<sheetData>", sheetBlob.append(sheetString), sheetString = "", 
            void 0 !== sheet.rows) for (var _b = 0, _c = sheet.rows; _b < _c.length; _b++) {
                var row = _c[_b], rowString = '<row r="' + row.index + '" spans="' + row.spans + '" ';
                void 0 !== row.height && (rowString += 'ht="' + this.pixelsToRowHeight(row.height) + '" customHeight="1" '), 
                void 0 !== row.grouping && (row.grouping.isHidden && (rowString += 'hidden="1" '), 
                void 0 !== row.grouping.outlineLevel && (rowString += 'outlineLevel="' + row.grouping.outlineLevel + '" '), 
                row.grouping.isCollapsed && (rowString += 'collapsed="1" ')), rowString += ">";
                for (var _d = 0, _e = row.cells; _d < _e.length; _d++) {
                    var cell = _e[_d];
                    void 0 === cell || void 0 === cell.value && void 0 === cell.cellStyle || (rowString += '<c r="' + cell.refName + '" ', 
                    void 0 !== cell.saveType && (rowString += 't="' + cell.saveType + '" '), void 0 !== cell.styleIndex && (rowString += 's="' + cell.styleIndex + '" '), 
                    rowString += " >", void 0 !== cell.value ? rowString += "<v>" + cell.value + "</v></c>" : rowString += "</c>");
                }
                rowString += "</row>", sheetBlob.append(rowString);
            }
            if (sheetString += "</sheetData>", sheet.mergeCells.length > 0) {
                sheetString += '<mergeCells count="' + sheet.mergeCells.length + '">';
                for (var _f = 0, _g = sheet.mergeCells; _f < _g.length; _f++) {
                    sheetString += '<mergeCell ref="' + _g[_f].ref + '" />';
                }
                sheetString += "</mergeCells>";
            }
            if (sheet.hyperLinks.length > 0) {
                sheetString += "<hyperlinks>";
                for (var _h = 0, _j = sheet.hyperLinks; _h < _j.length; _h++) {
                    var hLink = _j[_h];
                    sheetString += '<hyperlink ref="' + hLink.ref + '" r:id="rId' + hLink.rId + '" />';
                }
                sheetString += "</hyperlinks>", this.addToArchive(this.saveSheetRelations(sheet), "xl/worksheets/_rels/sheet" + sheet.index + ".xml.rels");
            }
            sheetString += '<pageMargins left="0.75" right="0.75" top="1" bottom="1" header="0.5" footer="0.5" /><headerFooter scaleWithDoc="1" alignWithMargins="0" differentFirst="0" differentOddEven="0" /></worksheet>', 
            sheetBlob.append(sheetString), this.addToArchive(sheetBlob.getBlob(), "xl/worksheets/sheet" + (index + 1) + ".xml");
        }, Workbook.prototype.pixelsToColumnWidth = function(pixels) {
            var val = pixels > 12 ? this.trunc((pixels - 5) / 7 * 100 + .5) / 100 : pixels / 12;
            return val > 1 ? (7 * val + 5) / 7 * 256 / 256 : 12 * val / 7 * 256 / 256;
        }, Workbook.prototype.trunc = function(x) {
            var n = x - x % 1;
            return 0 === n && (x < 0 || 0 === x && 1 / x != 1 / 0) ? -0 : n;
        }, Workbook.prototype.pixelsToRowHeight = function(pixels) {
            return pixels * this.unitsProportions[5] / this.unitsProportions[6];
        }, Workbook.prototype.saveSheetRelations = function(sheet) {
            for (var relStr = '<?xml version="1.0" encoding="UTF-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">', _i = 0, _a = sheet.hyperLinks; _i < _a.length; _i++) {
                var hLink = _a[_i];
                relStr += '<Relationship Id="rId' + hLink.rId + '" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/hyperlink" Target="' + hLink.target + '" TargetMode="External" />';
            }
            return relStr += "</Relationships>";
        }, Workbook.prototype.saveFreezePanes = function(sheet) {
            var paneString = '<sheetViews><sheetView workbookViewId="0" ><pane state="frozen" topLeftCell="' + sheet.freezePanes.leftCell + '" ';
            return 0 !== sheet.freezePanes.row && (paneString += 'ySplit="' + sheet.freezePanes.row + '" '), 
            0 !== sheet.freezePanes.column && (paneString += 'xSplit="' + sheet.freezePanes.column + '" '), 
            paneString += "/></sheetView></sheetViews>";
        }, Workbook.prototype.saveSharedString = function() {
            var length = this.sharedString.length;
            if (length > 0) {
                for (var sstStart = '<?xml version="1.0" encoding="utf-8"?><sst uniqueCount="' + length + '" count="' + this.sharedStringCount + '" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">', si = "", i = 0; i < length; i++) si += "<si><t>", 
                si += this.processString(this.sharedString[i]), si += "</t></si>";
                si += "</sst>", this.addToArchive(sstStart + si, "xl/sharedStrings.xml");
            }
        }, Workbook.prototype.processString = function(value) {
            return -1 !== value.indexOf("&") && (value = value.replace(/&/g, "&amp;")), -1 !== value.indexOf("<") && (value = value.replace(/</g, "&lt;")), 
            -1 !== value.indexOf(">") && (value = value.replace(/>/g, "&gt;")), value;
        }, Workbook.prototype.saveStyles = function() {
            var styleTemp = '<?xml version="1.0" encoding="utf-8"?><styleSheet xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006" mc:Ignorable="x14ac" xmlns:x14ac="http://schemas.microsoft.com/office/spreadsheetml/2009/9/ac" xmlns="http://schemas.openxmlformats.org/spreadsheetml/2006/main">';
            styleTemp += this.saveNumberFormats(), styleTemp += this.saveFonts(), styleTemp += this.saveFills(), 
            styleTemp += this.saveBorders(), styleTemp += this.saveCellStyleXfs(), styleTemp += this.saveCellXfs(), 
            styleTemp += this.saveCellStyles(), this.addToArchive(styleTemp + "</styleSheet>", "xl/styles.xml");
        }, Workbook.prototype.saveNumberFormats = function() {
            if (this.mNumFmt.size >= 1) {
                var numFmtStyle_1 = '<numFmts count="' + this.mNumFmt.size + '">';
                return this.mNumFmt.forEach(function(value, key) {
                    numFmtStyle_1 += '<numFmt numFmtId="' + value.numFmtId + '" formatCode="' + value.formatCode.replace(/"/g, "&quot;") + '" />';
                }), numFmtStyle_1 += "</numFmts>";
            }
            return "";
        }, Workbook.prototype.saveFonts = function() {
            var fontStyle = '<fonts count="' + this.mFonts.length + '">';
            if (this.mFonts.length >= 1) for (var _i = 0, _a = this.mFonts; _i < _a.length; _i++) {
                var font = _a[_i];
                fontStyle += "<font>", font.b && (fontStyle += "<b />"), font.i && (fontStyle += "<i />"), 
                font.u && (fontStyle += "<u />"), fontStyle += '<sz val="' + this.pixelsToRowHeight(font.sz) + '" />', 
                fontStyle += '<color rgb="' + font.color + '" />', fontStyle += '<name val="' + font.name + '" /></font>';
            }
            return fontStyle + "</fonts>";
        }, Workbook.prototype.saveFills = function() {
            var fillsStyle = '<fills count="' + (this.mFills.size + 2) + '"><fill><patternFill patternType="none"></patternFill></fill><fill><patternFill patternType="gray125"></patternFill></fill>';
            return this.mFills.size >= 1 && this.mFills.forEach(function(value, key) {
                fillsStyle += '<fill><patternFill patternType="solid"><fgColor rgb="' + key + '" /><bgColor rgb="FFFFFFFF" /></patternFill></fill>';
            }), fillsStyle + "</fills>";
        }, Workbook.prototype.saveBorders = function() {
            var bordersStyle = '<borders count="' + (this.mBorders.length + 1) + '"><border><left /><right /><top /><bottom /><diagonal /></border>';
            if (this.mBorders.length >= 1) for (var _i = 0, _a = this.mBorders; _i < _a.length; _i++) {
                var borders = _a[_i];
                if (this.isAllBorder(borders)) {
                    var color = borders.all.color.replace("#", ""), lineStyle = borders.all.lineStyle;
                    bordersStyle += '<border><left style="' + lineStyle + '"><color rgb="FF' + color + '" /></left><right style="' + lineStyle + '"><color rgb="FF' + color + '" /></right><top style="' + lineStyle + '"><color rgb="FF' + color + '" /></top><bottom style="' + lineStyle + '"><color rgb="FF' + color + '" /></bottom></border>';
                } else bordersStyle += '<border><left style="' + borders.left.lineStyle + '"><color rgb="FF' + borders.left.color.replace("#", "") + '" /></left><right style="' + borders.right.lineStyle + '"><color rgb="FF' + borders.right.color.replace("#", "") + '" /></right><top style="' + borders.top.lineStyle + '"><color rgb="FF' + borders.top.color.replace("#", "") + '" /></top><bottom style="' + borders.bottom.lineStyle + '"><color rgb="FF' + borders.bottom.color.replace("#", "") + '" /></bottom></border>';
            }
            return bordersStyle + "</borders>";
        }, Workbook.prototype.saveCellStyles = function() {
            var _this = this, cellStyleString = '<cellStyles  count="' + this.cellStyles.size + '">';
            return this.cellStyles.forEach(function(value, key) {
                cellStyleString += '<cellStyle name="' + key + '" xfId="' + _this.cellStyles.get(key).xfId + '"', 
                "Normal" === key && (cellStyleString += ' builtinId="0"'), cellStyleString += " />";
            }), cellStyleString += "</cellStyles>";
        }, Workbook.prototype.saveCellStyleXfs = function() {
            var cellXfsStyle = '<cellStyleXfs count="' + (this.mCellStyleXfs.length + 1) + '"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" />';
            if (this.mCellStyleXfs.length >= 1) for (var _i = 0, _a = this.mCellStyleXfs; _i < _a.length; _i++) {
                var cellStyleXf = _a[_i];
                cellXfsStyle += '<xf numFmtId="' + cellStyleXf.numFmtId + '" fontId="' + cellStyleXf.fontId + '" fillId="' + cellStyleXf.fillId + '" borderId="' + cellStyleXf.borderId + '" ', 
                1 === cellStyleXf.applyAlignment ? (cellXfsStyle += 'applyAlignment="1"><alignment ', 
                void 0 !== cellStyleXf.alignment.horizontal && (cellXfsStyle += 'horizontal="' + cellStyleXf.alignment.horizontal + '" '), 
                void 0 !== cellStyleXf.alignment.vertical && (cellXfsStyle += 'vertical="' + cellStyleXf.alignment.vertical + '" '), 
                cellXfsStyle += 'wrapText="' + cellStyleXf.alignment.wrapText + '" /></xf>') : cellXfsStyle += " />";
            }
            return cellXfsStyle + "</cellStyleXfs>";
        }, Workbook.prototype.saveCellXfs = function() {
            var cellXfsStyle = '<cellXfs count="' + (this.mCellXfs.length + 1) + '"><xf numFmtId="0" fontId="0" fillId="0" borderId="0" xfId="0" />';
            if (this.mCellXfs.length >= 1) for (var _i = 0, _a = this.mCellXfs; _i < _a.length; _i++) {
                var cellXf = _a[_i];
                cellXfsStyle += '<xf numFmtId="' + cellXf.numFmtId + '" fontId="' + cellXf.fontId + '" fillId="' + cellXf.fillId + '" borderId="' + cellXf.borderId + '" xfId="' + cellXf.xfId + '" ', 
                1 === cellXf.applyAlignment ? (cellXfsStyle += 'applyAlignment="1"><alignment ', 
                void 0 !== cellXf.alignment.horizontal && (cellXfsStyle += 'horizontal="' + cellXf.alignment.horizontal + '" '), 
                void 0 !== cellXf.alignment.vertical && (cellXfsStyle += 'vertical="' + cellXf.alignment.vertical + '" '), 
                cellXfsStyle += 'wrapText="' + cellXf.alignment.wrapText + '" /></xf>') : cellXfsStyle += " />";
            }
            return cellXfsStyle + "</cellXfs>";
        }, Workbook.prototype.saveApp = function(builtInProperties) {
            var appString = '<?xml version="1.0" encoding="utf-8" standalone="yes"?><Properties xmlns="http://schemas.openxmlformats.org/officeDocument/2006/extended-properties"><Application>Essential XlsIO</Application>';
            void 0 !== builtInProperties && (void 0 !== builtInProperties.manager && (appString += "<Manager>" + builtInProperties.manager + "</Manager>"), 
            void 0 !== builtInProperties.company && (appString += "<Company>" + builtInProperties.company + "</Company>")), 
            this.addToArchive(appString + "</Properties>", "docProps/app.xml");
        }, Workbook.prototype.saveCore = function(builtInProperties) {
            var createdDate = new Date(), coreString = '<?xml version="1.0" encoding="utf-8" standalone="yes"?><cp:coreProperties xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:dcterms="http://purl.org/dc/terms/" xmlns:dcmitype="http://purl.org/dc/dcmitype/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:cp="http://schemas.openxmlformats.org/package/2006/metadata/core-properties">';
            void 0 !== this.builtInProperties ? (void 0 !== builtInProperties.author && (coreString += "<dc:creator>" + builtInProperties.author + "</dc:creator>"), 
            void 0 !== builtInProperties.subject && (coreString += "<dc:subject>" + builtInProperties.subject + "</dc:subject>"), 
            void 0 !== builtInProperties.category && (coreString += "<cp:category>" + builtInProperties.category + "</cp:category>"), 
            void 0 !== builtInProperties.comments && (coreString += "<dc:description>" + builtInProperties.comments + "</dc:description>"), 
            void 0 !== builtInProperties.title && (coreString += "<dc:title>" + builtInProperties.title + "</dc:title>"), 
            void 0 !== builtInProperties.tags && (coreString += "<cp:keywords>" + builtInProperties.tags + "</cp:keywords>"), 
            void 0 !== builtInProperties.status && (coreString += "<cp:contentStatus>" + builtInProperties.status + "</cp:contentStatus>"), 
            void 0 !== builtInProperties.createdDate ? coreString += '<dcterms:created xsi:type="dcterms:W3CDTF">' + builtInProperties.createdDate.toISOString() + "</dcterms:created>" : coreString += '<dcterms:created xsi:type="dcterms:W3CDTF">' + createdDate.toISOString() + "</dcterms:created>", 
            void 0 !== builtInProperties.modifiedDate ? coreString += '<dcterms:modified xsi:type="dcterms:W3CDTF">' + builtInProperties.modifiedDate.toISOString() + "</dcterms:modified>" : coreString += '<dcterms:modified xsi:type="dcterms:W3CDTF">' + createdDate.toISOString() + "</dcterms:modified>") : (coreString += '<dcterms:created xsi:type="dcterms:W3CDTF">' + createdDate.toISOString() + "</dcterms:created>", 
            coreString += '<dcterms:modified xsi:type="dcterms:W3CDTF">' + createdDate.toISOString() + "</dcterms:modified>"), 
            coreString += "</cp:coreProperties>", this.addToArchive(coreString, "docProps/core.xml");
        }, Workbook.prototype.saveTopLevelRelation = function() {
            this.addToArchive('<?xml version="1.0" encoding="utf-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships"><Relationship Id="rId1" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/officeDocument" Target="xl/workbook.xml" /><Relationship Id="rId2" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/extended-properties" Target="docProps/app.xml" /><Relationship Id="rId3" Type="http://schemas.openxmlformats.org/package/2006/relationships/metadata/core-properties" Target="docProps/core.xml" /></Relationships>', "_rels/.rels");
        }, Workbook.prototype.saveWorkbookRelation = function() {
            for (var wbRelation = '<?xml version="1.0" encoding="utf-8" standalone="yes"?><Relationships xmlns="http://schemas.openxmlformats.org/package/2006/relationships">', length = this.worksheets.length, count = 0, i = 0; i < length; i++, 
            count++) wbRelation += '<Relationship Id="rId' + (i + 1).toString() + '" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/worksheet" Target="worksheets/sheet' + (i + 1).toString() + '.xml" />';
            wbRelation += '<Relationship Id="rId' + (++count).toString() + '" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/styles" Target="styles.xml" />', 
            this.sharedStringCount > 0 && (wbRelation += '<Relationship Id="rId' + (++count).toString() + '" Type="http://schemas.openxmlformats.org/officeDocument/2006/relationships/sharedStrings" Target="sharedStrings.xml" />'), 
            this.addToArchive(wbRelation + "</Relationships>", "xl/_rels/workbook.xml.rels");
        }, Workbook.prototype.saveContentType = function() {
            for (var contentTypeString = '<?xml version="1.0" encoding="utf-8" standalone="yes"?><Types xmlns="http://schemas.openxmlformats.org/package/2006/content-types"><Default Extension="xml" ContentType="application/xml" /><Default Extension="rels" ContentType="application/vnd.openxmlformats-package.relationships+xml" /><Override PartName="/xl/styles.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.styles+xml" /><Override PartName="/xl/workbook.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sheet.main+xml" /><Override PartName="/docProps/app.xml" ContentType="application/vnd.openxmlformats-officedocument.extended-properties+xml" /><Override PartName="/docProps/core.xml" ContentType="application/vnd.openxmlformats-package.core-properties+xml" />', sheetsOverride = "", length = this.worksheets.length, i = 0; i < length; i++) sheetsOverride += '<Override PartName="/xl/worksheets/sheet' + (i + 1).toString() + '.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.worksheet+xml" />';
            this.sharedStringCount > 0 && (contentTypeString += '<Override PartName="/xl/sharedStrings.xml" ContentType="application/vnd.openxmlformats-officedocument.spreadsheetml.sharedStrings+xml" />'), 
            this.addToArchive(contentTypeString + sheetsOverride + "</Types>", "[Content_Types].xml");
        }, Workbook.prototype.addToArchive = function(xmlString, itemName) {
            if ("string" == typeof xmlString) {
                var blob = new Blob([ xmlString ], {
                    type: "text/plain"
                }), archiveItem = new ZipArchiveItem(blob, itemName);
                this.mArchive.addItem(archiveItem);
            } else {
                archiveItem = new ZipArchiveItem(xmlString, itemName);
                this.mArchive.addItem(archiveItem);
            }
        }, Workbook.prototype.processMergeCells = function(cell, rowIndex, mergeCells) {
            if (0 !== cell.rowSpan || 0 !== cell.colSpan) {
                var mCell = new MergeCell();
                mCell.x = cell.index, mCell.width = cell.colSpan, mCell.y = rowIndex, mCell.height = cell.rowSpan;
                var startCell = this.getCellName(mCell.y, mCell.x), endCell = this.getCellName(rowIndex + mCell.height, cell.index + mCell.width);
                mCell.ref = startCell + ":" + endCell, mergeCells.add(mCell);
            }
            return mergeCells;
        }, Workbook.prototype.dateToTicks = function(year, month, day) {
            if (year >= 1 && year <= 9999 && month >= 1 && month <= 12) {
                var y = year - 1;
                return 864e9 * (365 * y + (y / 4 | 0) - (y / 100 | 0) + (y / 400 | 0) + (this.isLeapYear(year) ? [ 0, 31, 60, 91, 121, 152, 182, 213, 244, 274, 305, 335, 366 ] : [ 0, 31, 59, 90, 120, 151, 181, 212, 243, 273, 304, 334, 365 ])[month - 1] + day - 1);
            }
            throw new Error("Not a valid date");
        }, Workbook.prototype.timeToTicks = function(hour, minute, second) {
            if (hour >= 0 && hour < 24 && minute >= 0 && minute < 60 && second >= 0 && second < 60) {
                return 1e4 * (3600 * hour + 60 * minute + second) * 1e3;
            }
            throw new Error("Not valid time");
        }, Workbook.prototype.isLeapYear = function(year) {
            return year % 4 == 0 && (year % 100 != 0 || year % 400 == 0);
        }, Workbook.prototype.toOADate = function(date) {
            var ticks = 0;
            if (0 === (ticks = this.dateToTicks(date.getFullYear(), date.getMonth() + 1, date.getDate()) + this.timeToTicks(date.getHours(), date.getMinutes(), date.getSeconds()))) return 0;
            if (ticks < 31241376e9) throw new Error("Arg_OleAutDateInvalid");
            return (ticks - 599264352e9) / 1e4 / 864e5;
        }, Workbook;
    }(), BuiltInProperties = function() {
        return function() {};
    }(), _excelexport = Object.freeze({
        CellStyle: CellStyle,
        Font: Font$2,
        CellXfs: CellXfs,
        Alignment: Alignment,
        CellStyleXfs: CellStyleXfs,
        CellStyles: CellStyles,
        NumFmt: NumFmt,
        Border: Border$2,
        Borders: Borders,
        Cell: Cell$1,
        Cells: Cells,
        Column: Column$2,
        Row: Row$2,
        Rows: Rows,
        Workbook: Workbook,
        BuiltInProperties: BuiltInProperties,
        Worksheet: Worksheet,
        HyperLink: HyperLink,
        Grouping: Grouping,
        FreezePane: FreezePane,
        MergeCell: MergeCell,
        MergeCells: MergeCells,
        Worksheets: Worksheets,
        CsvHelper: CsvHelper,
        ValueFormatter: ValueFormatter$1,
        BlobHelper: BlobHelper
    }), ExportHelper = function() {
        function ExportHelper(parent) {
            this.hideColumnInclude = !1, this.foreignKeyData = {}, this.parent = parent;
        }
        return ExportHelper.getQuery = function(parent, data) {
            return data.isRemote() ? data.generateQuery(!0).requiresCount().take(parent.pageSettings.totalRecordsCount) : data.generateQuery(!0).requiresCount();
        }, ExportHelper.prototype.getFData = function(value, column) {
            return getForeignData(column, {}, value, this.foreignKeyData[column.field])[0];
        }, ExportHelper.prototype.getColumnData = function(gridObj) {
            var promise, _this = this, columnPromise = [], fColumns = gridObj.getForeignKeyColumns();
            return fColumns.length && (fColumns.forEach(function(col) {
                columnPromise.push(col.dataSource.executeQuery(new Query()));
            }), promise = Promise.all(columnPromise).then(function(e) {
                fColumns.forEach(function(col, index) {
                    _this.foreignKeyData[col.field] = e[index].result;
                });
            })), promise;
        }, ExportHelper.prototype.getHeaders = function(column, isHideColumnInclude) {
            this.hideColumnInclude = !!isHideColumnInclude;
            var cols = column;
            this.colDepth = this.measureColumnDepth(cols);
            for (var rows = [], actualColumns = [], i = 0; i < this.colDepth; i++) rows[i] = new Row$1({}), 
            rows[i].cells = [];
            rows = this.processColumns(rows);
            for (var _i = 0, rows_1 = rows = this.processHeaderCells(rows); _i < rows_1.length; _i++) {
                var row = rows_1[_i];
                for (i = 0; i < row.cells.length; i++) {
                    var cell = row.cells[i];
                    void 0 === cell.visible && cell.cellType !== CellType.StackedHeader && (row.cells = this.removeCellFromRow(row.cells, i), 
                    i -= 1), isHideColumnInclude || void 0 === cell.visible || cell.visible || (row.cells = this.removeCellFromRow(row.cells, i), 
                    i -= 1);
                }
            }
            for (i = 0; i < cols.length; i++) this.generateActualColumns(cols[i], actualColumns);
            return {
                rows: rows,
                columns: actualColumns
            };
        }, ExportHelper.prototype.getConvertedWidth = function(input) {
            var value = parseFloat(input);
            return -1 !== input.indexOf("%") ? this.parent.element.getBoundingClientRect().width * value / 100 : value;
        }, ExportHelper.prototype.generateActualColumns = function(column, actualColumns) {
            if (column.columns) {
                if (column.visible || this.hideColumnInclude) {
                    if (0 !== this.getCellCount(column, 0)) for (var i = 0; i < column.columns.length; i++) this.generateActualColumns(column.columns[i], actualColumns);
                }
            } else (column.visible || this.hideColumnInclude) && actualColumns.push(column);
        }, ExportHelper.prototype.removeCellFromRow = function(cells, cellIndex) {
            for (var resultCells = [], i = 0; i < cellIndex; i++) resultCells.push(cells[i]);
            for (i = cellIndex + 1; i < cells.length; i++) resultCells.push(cells[i]);
            return resultCells;
        }, ExportHelper.prototype.processHeaderCells = function(rows) {
            for (var columns = this.parent.enableColumnVirtualization ? this.parent.getColumns() : this.parent.columns, i = 0; i < columns.length; i++) rows = this.appendGridCells(columns[i], rows, 0, 0 === i, !1, i === columns.length - 1);
            return rows;
        }, ExportHelper.prototype.appendGridCells = function(cols, gridRows, index, isFirstObj, isFirstColumn, isLastColumn) {
            var lastCol = isLastColumn ? "e-lastcell" : "";
            if (cols.columns) {
                var colSpan = this.getCellCount(cols, 0);
                colSpan && gridRows[index].cells.push(new Cell({
                    cellType: CellType.StackedHeader,
                    column: cols,
                    colSpan: colSpan
                }));
                for (var isIgnoreFirstCell = void 0, i = 0, len = cols.columns.length; i < len; i++) cols.columns[i].visible && !isIgnoreFirstCell && (isIgnoreFirstCell = !0), 
                gridRows = this.appendGridCells(cols.columns[i], gridRows, index + 1, isFirstObj, 0 === i, i === len - 1 && isLastColumn);
            } else gridRows[index].cells.push(this.generateCell(cols, CellType.Header, this.colDepth - index, (isFirstObj ? "" : isFirstColumn ? "e-firstcell" : "") + lastCol, index, this.parent.getColumnIndexByUid(cols.uid)));
            return gridRows;
        }, ExportHelper.prototype.generateCell = function(gridColumn, cellType, rowSpan, className, rowIndex, columnIndex) {
            var option = {
                visible: gridColumn.visible,
                isDataCell: !1,
                isTemplate: !isNullOrUndefined(gridColumn.headerTemplate),
                rowID: "",
                column: gridColumn,
                cellType: cellType,
                rowSpan: rowSpan,
                className: className,
                index: rowIndex,
                colIndex: columnIndex
            };
            return (!option.rowSpan || option.rowSpan < 2) && delete option.rowSpan, new Cell(option);
        }, ExportHelper.prototype.processColumns = function(rows) {
            for (var gridObj = this.parent, columnIndexes = this.parent.getColumnIndexesInView(), i = 0, len = rows.length; i < len; i++) {
                if (gridObj.allowGrouping) for (var j = 0, len_1 = gridObj.groupSettings.columns.length; j < len_1; j++) this.parent.enableColumnVirtualization && -1 === columnIndexes.indexOf(j) || rows[i].cells.push(this.generateCell({}, CellType.HeaderIndent));
                (gridObj.detailTemplate || gridObj.childGrid) && rows[i].cells.push(this.generateCell({}, CellType.DetailHeader));
            }
            return rows;
        }, ExportHelper.prototype.getCellCount = function(column, count) {
            if (column.columns) for (var i = 0; i < column.columns.length; i++) count = this.getCellCount(column.columns[i], count); else (column.visible || this.hideColumnInclude) && count++;
            return count;
        }, ExportHelper.prototype.measureColumnDepth = function(column) {
            for (var max = 0, i = 0; i < column.length; i++) {
                var depth = this.checkDepth(column[i], 0);
                max < depth && (max = depth);
            }
            return max + 1;
        }, ExportHelper.prototype.checkDepth = function(col, index) {
            if (col.columns) {
                index++;
                for (var i = 0; i < col.columns.length; i++) index = this.checkDepth(col.columns[i], index);
            }
            return index;
        }, ExportHelper;
    }(), ExportValueFormatter = function() {
        function ExportValueFormatter() {
            this.valueFormatter = new ValueFormatter(), this.internationalization = new Internationalization();
        }
        return ExportValueFormatter.prototype.returnFormattedValue = function(args, customFormat) {
            return !isNullOrUndefined(args.value) && args.value ? this.valueFormatter.getFormatFunction(customFormat)(args.value) : "";
        }, ExportValueFormatter.prototype.formatCellValue = function(args) {
            if (args.isForeignKey && (args.value = getValue(args.column.foreignKeyValue, getForeignData(args.column, {}, args.value)[0])), 
            "number" === args.column.type && void 0 !== args.column.format && "" !== args.column.format) return args.value ? this.internationalization.getNumberFormat({
                format: args.column.format
            })(args.value) : "";
            if ("boolean" === args.column.type) return args.value ? "true" : "false";
            if ("date" !== args.column.type && "datetime" !== args.column.type && "time" !== args.column.type || void 0 === args.column.format) return void 0 === args.column.type || null === args.column.type ? "" : args.value.toString();
            if ("string" == typeof args.column.format) {
                var format = void 0;
                return format = "date" === args.column.type ? {
                    type: "date",
                    skeleton: args.column.format
                } : "time" === args.column.type ? {
                    type: "time",
                    skeleton: args.column.format
                } : {
                    type: "dateTime",
                    skeleton: args.column.format
                }, this.returnFormattedValue(args, format);
            }
            if (args.column.format instanceof Object && void 0 === args.column.format.type) return args.value.toString();
            var customFormat = void 0;
            return customFormat = "date" === args.column.type ? {
                type: args.column.format.type,
                format: args.column.format.format,
                skeleton: args.column.format.skeleton
            } : "time" === args.column.type ? {
                type: "time",
                format: args.column.format.format,
                skeleton: args.column.format.skeleton
            } : {
                type: "dateTime",
                format: args.column.format.format,
                skeleton: args.column.format.skeleton
            }, this.returnFormattedValue(args, customFormat);
        }, ExportValueFormatter;
    }(), ExcelExport = function() {
        function ExcelExport(parent) {
            this.book = {}, this.workSheet = [], this.rows = [], this.columns = [], this.styles = [], 
            this.rowLength = 1, this.expType = "AppendToSheet", this.includeHiddenColumn = !1, 
            this.isCsvExport = !1, this.isElementIdChanged = !1, this.foreignKeyData = {}, this.parent = parent, 
            this.helper = new ExportHelper(parent);
        }
        return ExcelExport.prototype.getModuleName = function() {
            return "ExcelExport";
        }, ExcelExport.prototype.init = function(gObj) {
            null !== gObj.element && "" === gObj.element.id && (gObj.element.id = new Date().toISOString(), 
            this.isElementIdChanged = !0), this.parent = gObj, this.parent.isDestroyed || (this.isExporting = void 0, 
            this.book = {}, this.workSheet = [], this.rows = [], this.columns = [], this.styles = [], 
            this.rowLength = 1, this.footer = void 0, this.expType = "AppendToSheet", this.includeHiddenColumn = !1, 
            this.exportValueFormatter = new ExportValueFormatter());
        }, ExcelExport.prototype.Map = function(grid, exportProperties, isMultipleExport, workbook, isCsv, isBlob) {
            var gObj = grid;
            return gObj.trigger("beforeExcelExport"), this.data = new Data$1(gObj), this.isExporting = !0, 
            this.isBlob = isBlob, this.isCsvExport = isCsv || !1, this.processRecords(gObj, exportProperties, isMultipleExport, workbook);
        }, ExcelExport.prototype.processRecords = function(gObj, exportProperties, isMultipleExport, workbook) {
            var _this = this;
            if (!isNullOrUndefined(exportProperties) && !isNullOrUndefined(exportProperties.dataSource) && exportProperties.dataSource instanceof DataManager) {
                return new Promise(function(resolve, reject) {
                    exportProperties.dataSource.executeQuery(new Query()).then(function(r) {
                        _this.init(gObj), _this.processInnerRecords(gObj, exportProperties, isMultipleExport, workbook, r), 
                        resolve(_this.book);
                    });
                });
            }
            var allPromise = [];
            allPromise.push(this.data.getData({}, ExportHelper.getQuery(gObj, this.data))), 
            allPromise.push(this.helper.getColumnData(gObj));
            var bool_1 = !0;
            return Promise.all(allPromise).then(function(e) {
                bool_1 && (_this.init(gObj), _this.processInnerRecords(gObj, exportProperties, isMultipleExport, workbook, e[0]), 
                bool_1 = !1);
            }).catch(function(e) {
                _this.parent.trigger("actionFailure", e);
            });
        }, ExcelExport.prototype.processInnerRecords = function(gObj, exportProperties, isMultipleExport, workbook, r) {
            var blankRows = 5;
            isNullOrUndefined(exportProperties) || isNullOrUndefined(exportProperties.multipleExport) || (this.expType = isNullOrUndefined(exportProperties.multipleExport.type) ? "AppendToSheet" : exportProperties.multipleExport.type, 
            isNullOrUndefined(exportProperties.multipleExport.blankRows) || (blankRows = exportProperties.multipleExport.blankRows)), 
            isNullOrUndefined(workbook) ? (this.workSheet = [], this.rows = [], this.columns = [], 
            this.styles = []) : "NewSheet" === this.expType ? (this.workSheet = workbook.worksheets, 
            this.rows = [], this.columns = [], this.styles = workbook.styles) : (this.workSheet = [], 
            this.rows = workbook.worksheets[0].rows, this.columns = workbook.worksheets[0].columns, 
            this.styles = workbook.styles, this.rowLength = this.rows[this.rows.length - 1].index + blankRows, 
            this.rowLength++), isNullOrUndefined(exportProperties) || (isNullOrUndefined(isMultipleExport) ? (isNullOrUndefined(exportProperties.header) || this.processExcelHeader(JSON.parse(JSON.stringify(exportProperties.header))), 
            isNullOrUndefined(exportProperties.footer) || (this.footer = JSON.parse(JSON.stringify(exportProperties.footer)))) : (isNullOrUndefined(exportProperties.header) || !isMultipleExport && "NewSheet" !== this.expType || this.processExcelHeader(JSON.parse(JSON.stringify(exportProperties.header))), 
            isNullOrUndefined(exportProperties.footer) || ("AppendToSheet" === this.expType ? isMultipleExport || (this.footer = JSON.parse(JSON.stringify(exportProperties.footer))) : this.footer = JSON.parse(JSON.stringify(exportProperties.footer))))), 
            this.includeHiddenColumn = !isNullOrUndefined(exportProperties) && exportProperties.includeHiddenColumn;
            var headerRow = this.helper.getHeaders(gObj.columns, this.includeHiddenColumn), groupIndent = 0;
            isNullOrUndefined(r.result.level) || (groupIndent += r.result.level, groupIndent += r.result.childLevels), 
            this.processHeaderContent(gObj, headerRow, exportProperties, groupIndent), isNullOrUndefined(exportProperties) || isNullOrUndefined(exportProperties.dataSource) || exportProperties.dataSource instanceof DataManager ? isNullOrUndefined(exportProperties) || "CurrentPage" !== exportProperties.exportType ? this.processRecordContent(gObj, r, headerRow, isMultipleExport) : this.processRecordContent(gObj, r, headerRow, isMultipleExport, gObj.getCurrentViewRecords()) : this.processRecordContent(gObj, r, headerRow, isMultipleExport, exportProperties.dataSource), 
            this.isExporting = !1, gObj.trigger("excelExportComplete", this.isBlob ? {
                promise: this.blobPromise
            } : {});
        }, ExcelExport.prototype.processRecordContent = function(gObj, returnType, headerRow, isMultipleExport, currentViewRecords) {
            gObj.columns;
            var record = void 0;
            isNullOrUndefined((record = isNullOrUndefined(currentViewRecords) ? returnType.result : currentViewRecords).level) ? this.processRecordRows(gObj, record, headerRow, 0) : this.processGroupedRows(gObj, record, headerRow, record.level), 
            isNullOrUndefined(returnType.aggregates) || (isNullOrUndefined(currentViewRecords) ? this.processAggregates(gObj, returnType.result) : this.processAggregates(gObj, returnType.result, currentViewRecords)), 
            isNullOrUndefined(this.footer) || ("AppendToSheet" === this.expType && !isMultipleExport || "NewSheet" === this.expType) && this.processExcelFooter(this.footer);
            var sheet = {};
            if (this.columns.length > 0 && (sheet.columns = this.columns), sheet.rows = this.rows, 
            this.workSheet.push(sheet), this.book.worksheets = this.workSheet, this.book.styles = this.styles, 
            !isMultipleExport) {
                if (this.isCsvExport) {
                    var book = new Workbook(this.book, "csv");
                    this.isBlob ? this.blobPromise = book.saveAsBlob("text/csv") : book.save("Export.csv");
                } else {
                    book = new Workbook(this.book, "xlsx");
                    this.isBlob ? this.blobPromise = book.saveAsBlob("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet") : book.save("Export.xlsx");
                }
                this.isElementIdChanged && (gObj.element.id = "");
            }
        }, ExcelExport.prototype.processGroupedRows = function(gObj, dataSource, headerRow, level) {
            for (var _i = 0, dataSource_1 = dataSource; _i < dataSource_1.length; _i++) {
                var item = dataSource_1[_i], cells = [], cell = {};
                cell.index = 1 + level;
                var col = gObj.getColumnByField(item.field), args = {
                    value: item.key,
                    column: col,
                    style: void 0,
                    isForeignKey: col.isForeignColumn()
                };
                cell.value = item.field + ": " + this.exportValueFormatter.formatCellValue(args) + " - ", 
                item.count > 1 ? cell.value += item.count + " items" : cell.value += item.count + " item", 
                cell.style = this.getCaptionThemeStyle(this.theme);
                var groupCaptionSummaryRows = new CaptionSummaryModelGenerator(gObj).generateRows(item);
                if (this.fillAggregates(gObj, groupCaptionSummaryRows, dataSource.level + dataSource.childLevels, this.rowLength), 
                cells.push(cell), this.rows[this.rows.length - 1].cells.length > 0) {
                    for (var lIndex = dataSource.level + dataSource.childLevels + groupCaptionSummaryRows[0].cells.length, hIndex = 0, _a = 0, _b = this.rows[this.rows.length - 1].cells; _a < _b.length; _a++) {
                        var tCell = _b[_a];
                        tCell.index < lIndex && (lIndex = tCell.index), tCell.index > hIndex && (hIndex = tCell.index), 
                        tCell.style = this.getCaptionThemeStyle(this.theme), cells[cells.length - 1].index !== tCell.index && cells.push(tCell);
                    }
                    for (lIndex - cell.index > 1 && (cell.colSpan = lIndex - cell.index); hIndex < headerRow.columns.length + level; ) {
                        var sCell = {};
                        0 === dataSource.childLevels ? sCell.index = hIndex : sCell.index = hIndex + 1, 
                        sCell.style = this.getCaptionThemeStyle(this.theme), cells.push(sCell), hIndex++;
                    }
                } else {
                    for (var span = 0, _c = 0, _d = headerRow.columns; _c < _d.length; _c++) {
                        _d[_c].visible && span++;
                    }
                    cell.colSpan = dataSource.childLevels + span;
                }
                this.rows[this.rows.length - 1].cells = cells, this.rowLength++, !isNullOrUndefined(dataSource.childLevels) && dataSource.childLevels > 0 ? this.processGroupedRows(gObj, item.items, headerRow, item.items.level) : (this.processRecordRows(gObj, item.items, headerRow, level), 
                this.processAggregates(gObj, item, void 0, level, !0));
            }
        }, ExcelExport.prototype.processRecordRows = function(gObj, record, headerRow, level) {
            for (var rLen = Object.keys(record).length, index = 1, cells = [], r = 0; r < rLen; r++) {
                cells = [], index = 1;
                for (var c = 0, len = headerRow.columns.length; c < len; c++) {
                    var value = isNullOrUndefined(headerRow.columns[c].field) ? "" : getValue(headerRow.columns[c].field, record[r]), column = headerRow.columns[c], foreignKeyData$$1 = void 0;
                    if (column.isForeignColumn && column.isForeignColumn() && (foreignKeyData$$1 = this.helper.getFData(value, column), 
                    value = getValue(column.foreignKeyValue, foreignKeyData$$1)), !isNullOrUndefined(value)) {
                        var excelCellArgs = {
                            data: record[r],
                            column: headerRow.columns[c],
                            foreignKeyData: foreignKeyData$$1
                        };
                        gObj.trigger("excelQueryCellInfo", extend(excelCellArgs, {
                            column: headerRow.columns[c],
                            data: record[r],
                            value: value,
                            style: void 0,
                            colSpan: 1
                        }));
                        var cell = {};
                        if (cell.index = index + level, cell.value = excelCellArgs.value, excelCellArgs.colSpan > 1 && (cell.colSpan = excelCellArgs.colSpan), 
                        isNullOrUndefined(excelCellArgs.style)) cell.style = {
                            name: gObj.element.id + "column" + (index + level)
                        }; else {
                            var styleIndex = this.getColumnStyle(gObj, index + level);
                            cell.style = this.mergeOptions(this.styles[styleIndex], excelCellArgs.style);
                        }
                        cells.push(cell);
                    }
                    index++;
                }
                this.rows.push({
                    index: this.rowLength++,
                    cells: cells
                });
            }
        }, ExcelExport.prototype.processAggregates = function(gObj, rec, currentViewRecords, indent, byGroup) {
            var summaryModel = new SummaryModelGenerator(gObj), data = void 0;
            if (data = isNullOrUndefined(currentViewRecords) ? rec : currentViewRecords, void 0 === indent && (indent = 0), 
            gObj.groupSettings.columns.length > 0 && byGroup) {
                var groupSummaryRows = new GroupSummaryModelGenerator(gObj).generateRows(data, {
                    level: data.level
                });
                groupSummaryRows.length > 0 && this.fillAggregates(gObj, groupSummaryRows, indent);
            } else {
                indent = gObj.groupSettings.columns.length > 0 && !byGroup ? gObj.groupSettings.columns.length : indent;
                var sRows = summaryModel.generateRows(data, rec.aggregates);
                sRows.length > 0 && !byGroup && this.fillAggregates(gObj, sRows, indent);
            }
        }, ExcelExport.prototype.fillAggregates = function(gObj, cells, indent, customIndex) {
            for (var _i = 0, cells_1 = cells; _i < cells_1.length; _i++) {
                for (var row = cells_1[_i], cells_2 = [], index = 0, _a = 0, _b = row.cells; _a < _b.length; _a++) {
                    var cell = _b[_a], eCell = {};
                    if (cell.visible || this.includeHiddenColumn) if (index++, cell.isDataCell) {
                        if (eCell.index = index + indent, isNullOrUndefined(cell.column.footerTemplate)) if (isNullOrUndefined(cell.column.groupFooterTemplate)) if (isNullOrUndefined(cell.column.groupCaptionTemplate)) for (var _c = 0, _d = Object.keys(row.data[cell.column.field]); _c < _d.length; _c++) {
                            _d[_c] === cell.column.type && (isNullOrUndefined(row.data[cell.column.field].Sum) ? isNullOrUndefined(row.data[cell.column.field].Average) ? isNullOrUndefined(row.data[cell.column.field].Max) ? isNullOrUndefined(row.data[cell.column.field].Min) ? isNullOrUndefined(row.data[cell.column.field].Count) ? isNullOrUndefined(row.data[cell.column.field].TrueCount) ? isNullOrUndefined(row.data[cell.column.field].FalseCount) ? isNullOrUndefined(row.data[cell.column.field].Custom) || (eCell.value = row.data[cell.column.field].Custom) : eCell.value = row.data[cell.column.field].FalseCount : eCell.value = row.data[cell.column.field].TrueCount : eCell.value = row.data[cell.column.field].Count : eCell.value = row.data[cell.column.field].Min : eCell.value = row.data[cell.column.field].Max : eCell.value = row.data[cell.column.field].Average : eCell.value = row.data[cell.column.field].Sum);
                        } else eCell.value = this.getAggreateValue(CellType.CaptionSummary, cell.column.groupCaptionTemplate, cell, row); else eCell.value = this.getAggreateValue(CellType.GroupSummary, cell.column.groupFooterTemplate, cell, row); else eCell.value = this.getAggreateValue(CellType.Summary, cell.column.footerTemplate, cell, row);
                        eCell.style = this.getCaptionThemeStyle(this.theme), cell.attributes.style.textAlign && (eCell.style.hAlign = cell.attributes.style.textAlign), 
                        cells_2.push(eCell);
                    } else void 0 === customIndex && (eCell.index = index + indent, eCell.style = this.getCaptionThemeStyle(this.theme), 
                    cells_2.push(eCell));
                }
                isNullOrUndefined(customIndex) ? this.rows.push({
                    index: this.rowLength++,
                    cells: cells_2
                }) : this.rows.push({
                    index: customIndex,
                    cells: cells_2
                });
            }
        }, ExcelExport.prototype.getAggreateValue = function(cellType, template, cell, row) {
            var templateFn = {};
            templateFn[getEnumValue(CellType, cell.cellType)] = compile$$1(template);
            return templateFn[getEnumValue(CellType, cell.cellType)](row.data[cell.column.field ? cell.column.field : cell.column.columnName])[0].wholeText;
        }, ExcelExport.prototype.mergeOptions = function(JSON1, JSON2) {
            for (var result = {}, attrname = Object.keys(JSON1), index = 0; index < attrname.length; index++) "name" !== attrname[index] && (result[attrname[index]] = JSON1[attrname[index]]);
            attrname = Object.keys(JSON2);
            for (index = 0; index < attrname.length; index++) "name" !== attrname[index] && (result[attrname[index]] = JSON2[attrname[index]]);
            return result;
        }, ExcelExport.prototype.getColumnStyle = function(gObj, columnIndex) {
            for (var index = 0, _i = 0, _a = this.styles; _i < _a.length; _i++) {
                if (_a[_i].name === gObj.element.id + "column" + columnIndex) return index;
                index++;
            }
        }, ExcelExport.prototype.processHeaderContent = function(gObj, headerRow, exportProperties, indent) {
            gObj.columns;
            var returnValue = headerRow, gridRows = returnValue.rows, gridColumns = returnValue.columns, spannedCells = [];
            if (indent > 0) for (var index = 0; index !== indent; ) this.columns.push({
                index: index + 1,
                width: 30
            }), index++;
            for (var row = 0; row < gridRows.length; row++) {
                for (var currentCellIndex = 1 + indent, cells = [], column_1 = 0; column_1 < gridRows[row].cells.length; column_1++) {
                    for (var style = {}, cell = {}, gridCell = gridRows[row].cells[column_1], result = {
                        contains: !0,
                        index: 1
                    }; result.contains; ) if (result = this.getIndex(spannedCells, 1, currentCellIndex), 
                    currentCellIndex = result.index, !result.contains) {
                        cell.index = result.index;
                        break;
                    }
                    if (!isNullOrUndefined(gridCell.rowSpan) && 1 !== gridCell.rowSpan) {
                        cell.rowSpan = gridCell.rowSpan;
                        for (var i = 1; i < gridCell.rowSpan + 1; i++) {
                            var spannedCell = {
                                rowIndex: 0,
                                columnIndex: 0
                            };
                            spannedCell.rowIndex = i, spannedCell.columnIndex = currentCellIndex, spannedCells.push(spannedCell);
                        }
                    }
                    isNullOrUndefined(gridCell.colSpan) || 1 === gridCell.colSpan || (cell.colSpan = gridCell.colSpan, 
                    currentCellIndex = currentCellIndex + cell.colSpan - 1), cell.value = gridCell.column.headerText, 
                    isNullOrUndefined(exportProperties) || isNullOrUndefined(exportProperties.theme) || (this.theme = exportProperties.theme), 
                    style = this.getHeaderThemeStyle(this.theme), isNullOrUndefined(gridCell.column.textAlign) || (style.hAlign = gridCell.column.textAlign), 
                    isNullOrUndefined(gridCell.column.headerTextAlign) || (style.hAlign = gridCell.column.headerTextAlign), 
                    cell.style = style, cells.push(cell), currentCellIndex++;
                }
                this.rows.push({
                    index: this.rowLength++,
                    cells: cells
                });
            }
            for (var col = 0; col < gridColumns.length; col++) this.parseStyles(gObj, gridColumns[col], this.getRecordThemeStyle(this.theme), indent + col + 1);
        }, ExcelExport.prototype.getHeaderThemeStyle = function(theme) {
            var style = {};
            return style.fontSize = 12, style.borders = {
                color: "#E0E0E0"
            }, isNullOrUndefined(theme) || isNullOrUndefined(theme.header) || (style = this.updateThemeStyle(theme.header, style)), 
            style;
        }, ExcelExport.prototype.updateThemeStyle = function(themestyle, style) {
            return isNullOrUndefined(themestyle.fontColor) || (style.fontColor = themestyle.fontColor), 
            isNullOrUndefined(themestyle.fontName) || (style.fontName = themestyle.fontName), 
            isNullOrUndefined(themestyle.fontSize) || (style.fontSize = themestyle.fontSize), 
            isNullOrUndefined(themestyle.borders) || (isNullOrUndefined(themestyle.borders.color) || (style.borders.color = themestyle.borders.color), 
            isNullOrUndefined(themestyle.borders.lineStyle) || (style.borders.lineStyle = themestyle.borders.lineStyle)), 
            !1 !== themestyle.bold && (style.bold = themestyle.bold), style;
        }, ExcelExport.prototype.getCaptionThemeStyle = function(theme) {
            var style = {};
            return style.fontSize = 13, style.backColor = "#F6F6F6", isNullOrUndefined(theme) || isNullOrUndefined(theme.caption) || (style = this.updateThemeStyle(theme.caption, style)), 
            style;
        }, ExcelExport.prototype.getRecordThemeStyle = function(theme) {
            var style = {};
            return style.fontSize = 13, style.borders = {
                color: "#E0E0E0"
            }, isNullOrUndefined(theme) || isNullOrUndefined(theme.record) || (style = this.updateThemeStyle(theme.record, style)), 
            style;
        }, ExcelExport.prototype.processExcelHeader = function(header) {
            if (!isNullOrUndefined(header.rows) && ("NewSheet" === this.expType || 1 === this.rowLength)) {
                var noRows = void 0;
                void 0 === header.headerRows ? this.rowLength = header.rows.length : this.rowLength = header.headerRows, 
                noRows = this.rowLength < header.rows.length ? this.rowLength : header.rows.length, 
                this.rowLength++;
                for (var row = 0; row < noRows; row++) {
                    var json = header.rows[row];
                    (null === json.index || isNullOrUndefined(json.index)) && (json.index = row + 1), 
                    this.updatedCellIndex(json);
                }
            }
        }, ExcelExport.prototype.updatedCellIndex = function(json) {
            for (var cellsLength = json.cells.length, cellId = 0; cellId < cellsLength; cellId++) {
                var jsonCell = json.cells[cellId];
                (null === jsonCell.index || isNullOrUndefined(jsonCell.index)) && (jsonCell.index = cellId + 1);
            }
            this.rows.push(json);
        }, ExcelExport.prototype.processExcelFooter = function(footer) {
            if (!isNullOrUndefined(footer.rows)) {
                var noRows = void 0;
                void 0 === footer.footerRows ? this.rowLength += footer.rows.length : footer.footerRows > footer.rows.length ? (this.rowLength += footer.footerRows - footer.rows.length, 
                noRows = footer.rows.length) : noRows = footer.footerRows;
                for (var row = 0; row < noRows; row++) {
                    var json = footer.rows[row];
                    null === json.index || void 0 === json.index ? json.index = this.rowLength++ : json.index += this.rowLength, 
                    this.updatedCellIndex(json);
                }
            }
        }, ExcelExport.prototype.getIndex = function(spannedCells, rowIndex, columnIndex) {
            for (var _i = 0, spannedCells_1 = spannedCells; _i < spannedCells_1.length; _i++) {
                var spannedCell = spannedCells_1[_i];
                if (spannedCell.rowIndex === rowIndex && spannedCell.columnIndex === columnIndex) return columnIndex += 1, 
                {
                    contains: !0,
                    index: columnIndex
                };
            }
            return {
                contains: !1,
                index: columnIndex
            };
        }, ExcelExport.prototype.parseStyles = function(gObj, col, style, index) {
            isNullOrUndefined(col.format) || (isNullOrUndefined(col.format.skeleton) ? (style.numberFormat = col.format, 
            style.type = col.type) : (style.numberFormat = col.format.skeleton, isNullOrUndefined(col.format.type) || (style.type = col.format.type))), 
            isNullOrUndefined(col.textAlign) || (style.hAlign = col.textAlign), Object.keys(style).length > 0 && (style.name = gObj.element.id + "column" + index, 
            this.styles.push(style)), isNullOrUndefined(col.width) || this.columns.push({
                index: index,
                width: "number" == typeof col.width ? col.width : this.helper.getConvertedWidth(col.width)
            });
        }, ExcelExport.prototype.destroy = function() {}, ExcelExport;
    }(), PdfExport = function() {
        function PdfExport(parent) {
            this.hideColumnInclude = !1, this.currentViewData = !1, this.customDataSource = !1, 
            this.isGrouping = !1, this.parent = parent, this.helper = new ExportHelper(parent);
        }
        return PdfExport.prototype.getModuleName = function() {
            return "PdfExport";
        }, PdfExport.prototype.init = function(parent) {
            this.exportValueFormatter = new ExportValueFormatter(), this.pdfDocument = void 0, 
            this.hideColumnInclude = !1, this.currentViewData = !1, this.parent = parent;
            var gObj = parent;
            this.isGrouping = !1, this.isExporting = !0, gObj.trigger("beforePdfExport");
        }, PdfExport.prototype.Map = function(parent, pdfExportProperties, isMultipleExport, pdfDoc, isBlob) {
            var _this = this;
            if (this.data = new Data$1(this.parent), this.isBlob = isBlob, !isNullOrUndefined(pdfExportProperties) && !isNullOrUndefined(pdfExportProperties.dataSource) && pdfExportProperties.dataSource instanceof DataManager) {
                return new Promise(function(resolve, reject) {
                    new DataManager({
                        url: pdfExportProperties.dataSource.dataSource.url,
                        adaptor: pdfExportProperties.dataSource.adaptor
                    }).executeQuery(new Query()).then(function(returnType) {
                        _this.init(parent), isNullOrUndefined(pdfDoc) ? _this.pdfDocument = new PdfDocument() : _this.pdfDocument = pdfDoc, 
                        _this.processExport(parent, returnType, pdfExportProperties, isMultipleExport), 
                        _this.isExporting = !1, parent.trigger("pdfExportComplete", _this.isBlob ? {
                            promise: _this.blobPromise
                        } : {}), resolve(_this.pdfDocument);
                    });
                });
            }
            var allPromise = [];
            allPromise.push(this.data.getData({}, ExportHelper.getQuery(parent, this.data))), 
            allPromise.push(this.helper.getColumnData(parent));
            var bool_1 = !0;
            return Promise.all(allPromise).then(function(e) {
                bool_1 && (_this.init(parent), isNullOrUndefined(pdfDoc) ? _this.pdfDocument = new PdfDocument() : _this.pdfDocument = pdfDoc, 
                _this.processExport(parent, e[0], pdfExportProperties, isMultipleExport), _this.isExporting = !1, 
                parent.trigger("pdfExportComplete", _this.isBlob ? {
                    promise: _this.blobPromise
                } : {}), bool_1 = !1);
            });
        }, PdfExport.prototype.processExport = function(gObj, returnType, pdfExportProperties, isMultipleExport) {
            isNullOrUndefined(pdfExportProperties) || (this.gridTheme = pdfExportProperties.theme);
            var columns = gObj.columns, dataSource = returnType.result, section = this.pdfDocument.sections.add(), result = this.processExportProperties(pdfExportProperties, dataSource, section);
            isNullOrUndefined((dataSource = result.dataSource).GroupGuid) || (this.isGrouping = !0);
            var pdfPage = (section = result.section).pages.add(), pdfGrid = new PdfGrid(), headerThemeStyle = this.getHeaderThemeStyle(), border = headerThemeStyle.border, headerFont = headerThemeStyle.font, headerBrush = headerThemeStyle.brush, returnValue = this.helper.getHeaders(columns, this.hideColumnInclude), rows = returnValue.rows, gridColumns = returnValue.columns;
            pdfGrid = this.processGridHeaders(dataSource.childLevels, pdfGrid, rows, gridColumns, border, headerFont, headerBrush), 
            this.setColumnProperties(gridColumns, pdfGrid);
            var captionThemeStyle = this.getSummaryCaptionThemeStyle();
            if (!isNullOrUndefined(dataSource) && dataSource.length > 0) {
                if (this.isGrouping ? this.processGroupedRecords(pdfGrid, dataSource, gridColumns, gObj, border, 0, captionThemeStyle.font, captionThemeStyle.brush, captionThemeStyle.backgroundBrush, returnType) : this.processRecord(border, gridColumns, gObj, dataSource, pdfGrid), 
                !isNullOrUndefined(returnType.aggregates)) {
                    var summaryModel = new SummaryModelGenerator(gObj), sRows = void 0;
                    sRows = this.customDataSource ? summaryModel.generateRows(dataSource, returnType.aggregates) : this.currentViewData ? summaryModel.generateRows(this.parent.getCurrentViewRecords(), returnType.aggregates) : this.isGrouping ? summaryModel.generateRows(dataSource.records, returnType.aggregates) : summaryModel.generateRows(returnType.result, returnType.aggregates), 
                    this.processAggregates(sRows, pdfGrid, border, captionThemeStyle.font, captionThemeStyle.brush, captionThemeStyle.backgroundBrush, !1);
                }
            } else {
                pdfGrid.rows.addRow().style.setBorder(border);
            }
            pdfGrid.draw(pdfPage, 20, 20), isMultipleExport || (this.isBlob ? this.blobPromise = this.pdfDocument.save() : this.pdfDocument.save("Export.pdf"), 
            this.pdfDocument.destroy());
        }, PdfExport.prototype.getSummaryCaptionThemeStyle = function() {
            if (isNullOrUndefined(this.gridTheme) || isNullOrUndefined(this.gridTheme.caption) || null === this.gridTheme.caption) return {
                font: new PdfStandardFont(PdfFontFamily.Helvetica, 9.75),
                brush: new PdfSolidBrush(new PdfColor(0, 0, 0)),
                backgroundBrush: new PdfSolidBrush(new PdfColor(246, 246, 246))
            };
            isNullOrUndefined(this.gridTheme.caption.fontSize) || this.gridTheme.caption.fontSize;
            var pdfColor = new PdfColor();
            if (!isNullOrUndefined(this.gridTheme.caption.fontColor)) {
                var penBrushColor = this.hexToRgb(this.gridTheme.caption.fontColor);
                pdfColor = new PdfColor(penBrushColor.r, penBrushColor.g, penBrushColor.b);
            }
            return {
                font: new PdfStandardFont(PdfFontFamily.Helvetica, 10.5),
                brush: new PdfSolidBrush(new PdfColor(pdfColor)),
                backgroundBrush: new PdfSolidBrush(new PdfColor(246, 246, 246))
            };
        }, PdfExport.prototype.getHeaderThemeStyle = function() {
            var border = new PdfBorders();
            if (isNullOrUndefined(this.gridTheme) || isNullOrUndefined(this.gridTheme.header)) return border.all = new PdfPen(new PdfColor(234, 234, 234)), 
            {
                border: border,
                font: new PdfStandardFont(PdfFontFamily.Helvetica, 10.5),
                brush: new PdfSolidBrush(new PdfColor(102, 102, 102))
            };
            if (!isNullOrUndefined(this.gridTheme.header.borders) && !isNullOrUndefined(this.gridTheme.header.borders.color)) {
                var borderColor = this.hexToRgb(this.gridTheme.header.borders.color);
                border.all = new PdfPen(new PdfColor(borderColor.r, borderColor.g, borderColor.b));
            }
            var fontSize = isNullOrUndefined(this.gridTheme.header.fontSize) ? 10.5 : this.gridTheme.header.fontSize, pdfColor = new PdfColor();
            if (!isNullOrUndefined(this.gridTheme.header.fontColor)) {
                var penBrushColor = this.hexToRgb(this.gridTheme.header.fontColor);
                pdfColor = new PdfColor(penBrushColor.r, penBrushColor.g, penBrushColor.b);
            }
            return {
                border: border,
                font: new PdfStandardFont(PdfFontFamily.Helvetica, fontSize),
                brush: new PdfSolidBrush(pdfColor)
            };
        }, PdfExport.prototype.processGroupedRecords = function(pdfGrid, dataSource, gridColumns, gObj, border, level, font, brush, backgroundBrush, returnType) {
            for (var groupIndex = level, _i = 0, dataSource_1 = dataSource; _i < dataSource_1.length; _i++) {
                var dataSourceItems = dataSource_1[_i], row = pdfGrid.rows.addRow(), col = gObj.getColumnByField(dataSourceItems.field), args = {
                    value: dataSourceItems.key,
                    column: col,
                    style: void 0,
                    isForeignKey: col.isForeignColumn()
                }, value = dataSourceItems.field + ": " + this.exportValueFormatter.formatCellValue(args) + " - " + dataSourceItems.count + (dataSource.count > 1 ? " items" : " item");
                row.cells.getCell(groupIndex).value = value, row.cells.getCell(groupIndex + 1).style.stringFormat = new PdfStringFormat(PdfTextAlignment.Left), 
                row.style.setBorder(border), row.style.setFont(font), row.style.setTextBrush(brush), 
                row.style.setBackgroundBrush(backgroundBrush);
                var sRows = void 0, captionSummaryModel = new CaptionSummaryModelGenerator(gObj);
                if (sRows = isNullOrUndefined(dataSourceItems.items.records) ? captionSummaryModel.generateRows(dataSourceItems.items, returnType.aggregates) : captionSummaryModel.generateRows(dataSourceItems.items.records, returnType.aggregates), 
                isNullOrUndefined(sRows) || 0 !== sRows.length || (row.cells.getCell(groupIndex + 1).columnSpan = pdfGrid.columns.count - (groupIndex + 1)), 
                !isNullOrUndefined(dataSource.childLevels) && dataSource.childLevels > 0) {
                    this.processAggregates(sRows, pdfGrid, border, font, brush, backgroundBrush, !0, row, groupIndex), 
                    this.processGroupedRecords(pdfGrid, dataSourceItems.items, gridColumns, gObj, border, groupIndex + 1, font, brush, backgroundBrush, returnType);
                    sRows = new GroupSummaryModelGenerator(gObj).generateRows(dataSourceItems.items.records, returnType.aggregates), 
                    this.processAggregates(sRows, pdfGrid, border, font, brush, backgroundBrush, !1);
                } else {
                    this.processAggregates(sRows, pdfGrid, border, font, brush, backgroundBrush, !0, row, groupIndex), 
                    this.processRecord(border, gridColumns, gObj, dataSourceItems.items, pdfGrid, groupIndex + 1);
                    sRows = new GroupSummaryModelGenerator(gObj).generateRows(dataSourceItems.items, returnType.aggregates), 
                    this.processAggregates(sRows, pdfGrid, border, font, brush, backgroundBrush, !1);
                }
            }
        }, PdfExport.prototype.processGridHeaders = function(childLevels, pdfGrid, rows, gridColumns, border, headerFont, headerBrush) {
            var columnCount = gridColumns.length;
            if (this.isGrouping && (columnCount += childLevels + 1), pdfGrid.columns.add(columnCount), 
            this.isGrouping) for (var i = 0; i < childLevels + 1; i++) pdfGrid.columns.getColumn(i).width = 20;
            pdfGrid.headers.add(rows.length);
            for (i = 0; i < rows.length; i++) {
                var gridHeader = pdfGrid.headers.getHeader(i);
                gridHeader.style.setBorder(border), gridHeader.style.setFont(headerFont), gridHeader.style.setTextBrush(headerBrush);
                var cellIndex = this.isGrouping ? childLevels + 1 : 0;
                if (0 === rows[i].cells.length) for (var j = 0; j < gridHeader.cells.count; j++) {
                    (cell = gridHeader.cells.getCell(j)).value = "";
                } else {
                    for (j = 0; j < cellIndex; j++) {
                        (cell = gridHeader.cells.getCell(j)).value = "";
                    }
                    for (j = 0; j < rows[i].cells.length; j++) {
                        var cell;
                        if (null !== (cell = gridHeader.cells.getCell(cellIndex)).value) {
                            if (cell.value = rows[i].cells[j].column.headerText, isNullOrUndefined(rows[i].cells[j].column.headerTextAlign) || (cell.style.stringFormat = this.getHorizontalAlignment(rows[i].cells[j].column.headerTextAlign)), 
                            !isNullOrUndefined(rows[i].cells[j].rowSpan)) {
                                cell.rowSpan = rows[i].cells[j].rowSpan, cell.style.stringFormat = this.getVerticalAlignment("Bottom", cell.style.stringFormat, rows[i].cells[j].column.textAlign);
                                for (var k = 1; k < rows[i].cells[j].rowSpan; k++) pdfGrid.headers.getHeader(i + k).cells.getCell(cellIndex).value = null;
                            }
                            isNullOrUndefined(rows[i].cells[j].colSpan) || (cell.columnSpan = rows[i].cells[j].colSpan), 
                            cellIndex += cell.columnSpan;
                        } else cell.value = "", cellIndex += cell.columnSpan, j -= 1;
                    }
                }
            }
            return pdfGrid.columns.count >= 6 && (pdfGrid.style.allowHorizontalOverflow = !0), 
            pdfGrid;
        }, PdfExport.prototype.processExportProperties = function(pdfExportProperties, dataSource, section) {
            if (isNullOrUndefined(pdfExportProperties)) this.currentViewData = !1, this.customDataSource = !1; else {
                if (isNullOrUndefined(pdfExportProperties.theme) || (this.gridTheme = pdfExportProperties.theme), 
                !isNullOrUndefined(pdfExportProperties.pageOrientation) || !isNullOrUndefined(pdfExportProperties.pageSize)) {
                    var pdfPageSettings = new PdfPageSettings();
                    pdfPageSettings.orientation = "Landscape" === pdfExportProperties.pageOrientation ? PdfPageOrientation.Landscape : PdfPageOrientation.Portrait, 
                    pdfPageSettings.size = this.getPageSize(pdfExportProperties.pageSize), section.setPageSettings(pdfPageSettings);
                }
                var clientSize = this.pdfDocument.pageSettings.size;
                if (!isNullOrUndefined(pdfExportProperties.header)) {
                    var header = pdfExportProperties.header, position = new PointF(0, header.fromTop), size = new SizeF(clientSize.width - 80, .75 * header.height), bounds = new RectangleF(position, size);
                    this.pdfDocument.template.top = this.drawPageTemplate(new PdfPageTemplateElement(bounds), header);
                }
                if (!isNullOrUndefined(pdfExportProperties.footer)) {
                    var footer = pdfExportProperties.footer;
                    position = new PointF(0, clientSize.width - 80 - .75 * footer.fromBottom), size = new SizeF(clientSize.width - 80, .75 * footer.height), 
                    bounds = new RectangleF(position, size);
                    this.pdfDocument.template.bottom = this.drawPageTemplate(new PdfPageTemplateElement(bounds), footer);
                }
                isNullOrUndefined(pdfExportProperties.includeHiddenColumn) || this.isGrouping || (this.hideColumnInclude = pdfExportProperties.includeHiddenColumn), 
                isNullOrUndefined(pdfExportProperties.dataSource) ? isNullOrUndefined(pdfExportProperties.exportType) ? (this.currentViewData = !1, 
                this.customDataSource = !1) : "CurrentPage" === pdfExportProperties.exportType ? (dataSource = this.parent.getCurrentViewRecords(), 
                this.currentViewData = !0, this.customDataSource = !1) : (this.currentViewData = !1, 
                this.customDataSource = !1) : (pdfExportProperties.dataSource instanceof DataManager || (dataSource = pdfExportProperties.dataSource), 
                this.customDataSource = !0, this.currentViewData = !1);
            }
            return {
                dataSource: dataSource,
                section: section
            };
        }, PdfExport.prototype.drawPageTemplate = function(template, element) {
            for (var _i = 0, _a = element.contents; _i < _a.length; _i++) {
                var content = _a[_i];
                switch (this.processContentValidation(content), content.type) {
                  case "Text":
                    if ("" === content.value || void 0 === content.value || null === content.value || "string" != typeof content.value) throw new Error("please enter the valid input value in text content...");
                    this.drawText(template, content);
                    break;

                  case "PageNumber":
                    this.drawPageNumber(template, content);
                    break;

                  case "Image":
                    if (void 0 === content.src || null === content.src || "" === content.src) throw new Error("please enter the valid base64 string in image content...");
                    this.drawImage(template, content);
                    break;

                  case "Line":
                    this.drawLine(template, content);
                    break;

                  default:
                    throw new Error("Please set valid content type...");
                }
            }
            return template;
        }, PdfExport.prototype.processContentValidation = function(content) {
            if (void 0 === content.type || null === content.type) throw new Error("please set valid content type...");
            if ("Line" === content.type) {
                if (void 0 === content.points || null === content.points) throw new Error("please enter valid points in " + content.type + " content...");
                if (void 0 === content.points.x1 || null === content.points.x1 || "number" != typeof content.points.x1) throw new Error("please enter valid x1 co-ordinate in " + content.type + " points...");
                if (void 0 === content.points.y1 || null === content.points.y1 || "number" != typeof content.points.y1) throw new Error("please enter valid y1 co-ordinate in " + content.type + " points...");
                if (void 0 === content.points.x2 || null === content.points.x2 || "number" != typeof content.points.x2) throw new Error("please enter valid x2 co-ordinate in " + content.type + " points...");
                if (void 0 === content.points.y2 || null === content.points.y2 || "number" != typeof content.points.y2) throw new Error("please enter valid y2 co-ordinate in " + content.type + " points...");
            } else {
                if (void 0 === content.position || null === content.position) throw new Error("please enter valid position in " + content.type + " content...");
                if (void 0 === content.position.x || null === content.position.x || "number" != typeof content.position.x) throw new Error("please enter valid x co-ordinate in " + content.type + " position...");
                if (void 0 === content.position.y || null === content.position.y || "number" != typeof content.position.y) throw new Error("please enter valid y co-ordinate in " + content.type + " position...");
            }
        }, PdfExport.prototype.drawText = function(pageTemplate, content) {
            var font = this.getFont(content), brush = this.getBrushFromContent(content), pen = null;
            if (!isNullOrUndefined(content.style.textPenColor)) {
                var penColor = this.hexToRgb(content.style.textPenColor);
                pen = new PdfPen(new PdfColor(penColor.r, penColor.g, penColor.b));
            }
            null == brush && null == pen && (brush = new PdfSolidBrush(new PdfColor(0, 0, 0)));
            var value = content.value.toString(), x = .75 * content.position.x, y = .75 * content.position.y, result = this.setContentFormat(content, void 0);
            null === result || isNullOrUndefined(result.format) || isNullOrUndefined(result.size) ? pageTemplate.graphics.drawString(value, font, pen, brush, x, y, void 0) : pageTemplate.graphics.drawString(value, font, pen, brush, x, y, result.size.width, result.size.height, result.format);
        }, PdfExport.prototype.drawPageNumber = function(documentHeader, content) {
            var font = this.getFont(content), brush = null;
            if (isNullOrUndefined(content.style.textBrushColor)) brush = new PdfSolidBrush(new PdfColor(0, 0, 0)); else {
                var brushColor = this.hexToRgb(content.style.textBrushColor);
                brush = new PdfSolidBrush(new PdfColor(brushColor.r, brushColor.g, brushColor.b));
            }
            var pageNumber = new PdfPageNumberField(font, brush);
            pageNumber.numberStyle = this.getPageNumberStyle(content.pageNumberType);
            var compositeField, format;
            if (isNullOrUndefined(content.format)) compositeField = new PdfCompositeField(font, brush, format = "{0}", pageNumber); else if (-1 !== content.format.indexOf("$total") && -1 !== content.format.indexOf("$current")) {
                var pageCount = new PdfPageCountField(font);
                format = content.format.indexOf("$total") > content.format.indexOf("$current") ? (format = content.format.replace("$current", "0")).replace("$total", "1") : (format = content.format.replace("$current", "1")).replace("$total", "0"), 
                compositeField = new PdfCompositeField(font, brush, format, pageNumber, pageCount);
            } else if (-1 !== content.format.indexOf("$current") && -1 === content.format.indexOf("$total")) format = content.format.replace("$current", "0"), 
            compositeField = new PdfCompositeField(font, brush, format, pageNumber); else {
                pageCount = new PdfPageCountField(font);
                format = content.format.replace("$total", "0"), compositeField = new PdfCompositeField(font, brush, format, pageCount);
            }
            var x = .75 * content.position.x, y = .75 * content.position.y, result = this.setContentFormat(content, compositeField.stringFormat);
            null === result || isNullOrUndefined(result.format) || isNullOrUndefined(result.size) || (compositeField.stringFormat = result.format, 
            compositeField.bounds = new RectangleF(x, y, result.size.width, result.size.height)), 
            compositeField.draw(documentHeader.graphics, x, y);
        }, PdfExport.prototype.drawImage = function(documentHeader, content) {
            var x = .75 * content.position.x, y = .75 * content.position.y, width = isNullOrUndefined(content.size) ? void 0 : .75 * content.size.width, height = isNullOrUndefined(content.size) ? void 0 : .75 * content.size.height, image = new PdfBitmap(content.src);
            isNullOrUndefined(width) ? documentHeader.graphics.drawImage(image, x, y) : documentHeader.graphics.drawImage(image, x, y, width, height);
        }, PdfExport.prototype.drawLine = function(documentHeader, content) {
            var x1 = .75 * content.points.x1, y1 = .75 * content.points.y1, x2 = .75 * content.points.x2, y2 = .75 * content.points.y2, pen = this.getPenFromContent(content);
            isNullOrUndefined(content.style) || null === content.style || (isNullOrUndefined(content.style.penSize) || null === content.style.penSize || "number" != typeof content.style.penSize || (pen.width = .75 * content.style.penSize), 
            pen.dashStyle = this.getDashStyle(content.style.dashStyle)), documentHeader.graphics.drawLine(pen, x1, y1, x2, y2);
        }, PdfExport.prototype.processAggregates = function(sRows, pdfGrid, border, font, brush, backgroundBrush, isCaption, captionRow, groupIndex) {
            for (var _i = 0, sRows_1 = sRows; _i < sRows_1.length; _i++) {
                for (var row = sRows_1[_i], leastCaptionSummaryIndex = -1, index = 0, isEmpty = !0, value = [], i = 0; i < pdfGrid.columns.count; i++) {
                    var cell = row.cells[index];
                    if (!this.hideColumnInclude) {
                        for (;void 0 === cell.visible; ) isNullOrUndefined(captionRow) ? value.push("") : isNullOrUndefined(captionRow.cells.getCell(i).value) ? value.push("") : (value.push(""), 
                        value.push(captionRow.cells.getCell(i).value), isEmpty = !1, i += 1), i += 1, index += 1, 
                        cell = row.cells[index];
                        for (;!isNullOrUndefined(cell.visible) && !cell.visible; ) index += 1, cell = row.cells[index];
                    }
                    if (cell.isDataCell) {
                        var templateFn = {};
                        if (isNullOrUndefined(cell.column.footerTemplate) && isNullOrUndefined(cell.column.groupCaptionTemplate) && isNullOrUndefined(cell.column.groupFooterTemplate)) {
                            isNullOrUndefined(result = this.getSummaryWithoutTemplate(row.data[cell.column.field])) || value.push(result);
                        } else {
                            var result;
                            templateFn = (result = this.getTemplateFunction(templateFn, i, leastCaptionSummaryIndex, cell.column)).templateFunction, 
                            leastCaptionSummaryIndex = result.leastCaptionSummaryIndex;
                            var txt = templateFn[getEnumValue(CellType, cell.cellType)](row.data[cell.column.field ? cell.column.field : cell.column.columnName]);
                            value.push(txt[0].wholeText), isEmpty = !1;
                        }
                    } else value.push("");
                    isEmpty && "" !== value[i] && !isNullOrUndefined(value[i]) && null !== value[i] && (isEmpty = !1), 
                    index += 1;
                }
                if (!isEmpty) if (isCaption) for (i = 0; i < pdfGrid.columns.count; i++) captionRow.cells.getCell(i).value = value[i].toString(), 
                i === groupIndex + 1 && -1 !== leastCaptionSummaryIndex ? captionRow.cells.getCell(i).columnSpan = leastCaptionSummaryIndex - (groupIndex + 1) : i === groupIndex + 1 && -1 === leastCaptionSummaryIndex && (captionRow.cells.getCell(i).columnSpan = pdfGrid.columns.count - (groupIndex + 1)); else {
                    var gridRow = pdfGrid.rows.addRow();
                    gridRow.style.setBorder(border), gridRow.style.setFont(font), gridRow.style.setTextBrush(brush), 
                    gridRow.style.setBackgroundBrush(backgroundBrush);
                    for (var i = 0; i < pdfGrid.columns.count; i++) gridRow.cells.getCell(i).value = value[i].toString();
                }
            }
        }, PdfExport.prototype.getTemplateFunction = function(templateFn, index, leastCaptionSummaryIndex, column) {
            return isNullOrUndefined(column.footerTemplate) ? isNullOrUndefined(column.groupCaptionTemplate) ? templateFn[getEnumValue(CellType, CellType.GroupSummary)] = compile$$1(column.groupFooterTemplate) : (-1 === leastCaptionSummaryIndex && (leastCaptionSummaryIndex = index), 
            templateFn[getEnumValue(CellType, CellType.CaptionSummary)] = compile$$1(column.groupCaptionTemplate)) : templateFn[getEnumValue(CellType, CellType.Summary)] = compile$$1(column.footerTemplate), 
            {
                templateFunction: templateFn,
                leastCaptionSummaryIndex: leastCaptionSummaryIndex
            };
        }, PdfExport.prototype.getSummaryWithoutTemplate = function(data) {
            return isNullOrUndefined(data.Sum) ? isNullOrUndefined(data.Average) ? isNullOrUndefined(data.Max) ? isNullOrUndefined(data.Min) ? isNullOrUndefined(data.Count) ? isNullOrUndefined(data.TrueCount) ? isNullOrUndefined(data.FalseCount) ? isNullOrUndefined(data.Custom) ? void 0 : data.Custom : data.FalseCount : data.TrueCount : data.Count : data.Min : data.Max : data.Average : data.Sum;
        }, PdfExport.prototype.setColumnProperties = function(gridColumns, pdfGrid) {
            for (var startIndex = this.isGrouping ? pdfGrid.columns.count - gridColumns.length : 0, i = 0; i < gridColumns.length; i++) isNullOrUndefined(gridColumns[i].textAlign) || (pdfGrid.columns.getColumn(i + startIndex).format = this.getHorizontalAlignment(gridColumns[i].textAlign)), 
            pdfGrid.style.allowHorizontalOverflow && !isNullOrUndefined(gridColumns[i].width) && (pdfGrid.columns.getColumn(i + startIndex).width = "number" == typeof gridColumns[i].width ? .75 * gridColumns[i].width : .75 * this.helper.getConvertedWidth(gridColumns[i].width));
        }, PdfExport.prototype.setRecordThemeStyle = function(row, border) {
            if (isNullOrUndefined(this.gridTheme) || isNullOrUndefined(this.gridTheme.record) || null === this.gridTheme.record) row.style.setTextBrush(new PdfSolidBrush(new PdfColor(0, 0, 0))); else {
                var pdfColor = new PdfColor();
                if (!isNullOrUndefined(this.gridTheme.record.fontColor)) {
                    var penBrushColor = this.hexToRgb(this.gridTheme.record.fontColor);
                    pdfColor = new PdfColor(penBrushColor.r, penBrushColor.g, penBrushColor.b);
                }
                row.style.setTextBrush(new PdfSolidBrush(pdfColor));
            }
            return row.style.setBorder(border), row;
        }, PdfExport.prototype.processRecord = function(border, columns, gObj, dataSource, pdfGrid, groupIndex) {
            for (var startIndex = this.isGrouping ? groupIndex : 0, _i = 0, _a = dataSource; _i < _a.length; _i++) for (var items = _a[_i], gridRow = this.setRecordThemeStyle(pdfGrid.rows.addRow(), border), j = 0; j < columns.length; j++) {
                var value = !isNullOrUndefined(columns[j].field) && getValue(columns[j].field, items) || "", column = columns[j], foreignKeyData$$1 = void 0;
                column.isForeignColumn && column.isForeignColumn() && (foreignKeyData$$1 = this.helper.getFData(value, column), 
                value = getValue(column.foreignKeyValue, foreignKeyData$$1));
                var args = {
                    data: items,
                    value: value,
                    column: column,
                    style: void 0,
                    colSpan: 1
                };
                gObj.trigger("pdfQueryCellInfo", args);
                var cell = gridRow.cells.getCell(j + startIndex);
                if (cell.value = this.exportValueFormatter.formatCellValue(args), isNullOrUndefined(args.style) || this.processCellStyle(cell, args), 
                args.colSpan > 1) {
                    j + startIndex + 1 + args.colSpan > gridRow.cells.count && (args.colSpan = gridRow.cells.count - (j + startIndex + 1)), 
                    cell.columnSpan = args.colSpan;
                    for (var i = 1; i < cell.columnSpan; i++) {
                        gridRow.cells.getCell(j + startIndex + i).value = "";
                    }
                    j += args.colSpan - 1;
                }
            }
        }, PdfExport.prototype.processCellStyle = function(cell, args) {
            if (!isNullOrUndefined(args.style.backgroundColor)) {
                var backColor = this.hexToRgb(args.style.backgroundColor);
                cell.style.backgroundBrush = new PdfSolidBrush(new PdfColor(backColor.r, backColor.g, backColor.b));
            }
            if (isNullOrUndefined(args.style.textAlignment) || (cell.style.stringFormat = this.getHorizontalAlignment(args.style.textAlignment)), 
            isNullOrUndefined(args.style.verticalAlignment) || (cell.style.stringFormat = this.getVerticalAlignment(args.style.verticalAlignment, cell.style.stringFormat)), 
            !isNullOrUndefined(args.style.textBrushColor)) {
                var textBrushColor = this.hexToRgb(args.style.textBrushColor);
                cell.style.textBrush = new PdfSolidBrush(new PdfColor(textBrushColor.r, textBrushColor.g, textBrushColor.b));
            }
            if (!isNullOrUndefined(args.style.textPenColor)) {
                var textPenColor = this.hexToRgb(args.style.textPenColor);
                cell.style.textPen = new PdfPen(new PdfColor(textPenColor.r, textPenColor.g, textPenColor.b));
            }
            if (isNullOrUndefined(args.style.fontFamily) && isNullOrUndefined(args.style.fontSize) && isNullOrUndefined(args.style.bold) && isNullOrUndefined(args.style.italic) && isNullOrUndefined(args.style.underline) && isNullOrUndefined(args.style.strikeout) || (cell.style.font = this.getFont(args)), 
            !isNullOrUndefined(args.style.border)) {
                var border = new PdfBorders(), borderWidth = args.style.border.width, width = isNullOrUndefined(borderWidth) || "number" != typeof borderWidth ? void 0 : .75 * borderWidth, color = new PdfColor(196, 196, 196);
                if (!isNullOrUndefined(args.style.border.color)) {
                    var borderColor = this.hexToRgb(args.style.border.color);
                    color = new PdfColor(borderColor.r, borderColor.g, borderColor.b);
                }
                var pen = new PdfPen(color, width);
                isNullOrUndefined(args.style.border.dashStyle) || (pen.dashStyle = this.getDashStyle(args.style.border.dashStyle)), 
                border.all = pen, cell.style.borders = border;
            }
        }, PdfExport.prototype.getHorizontalAlignment = function(textAlign, format) {
            switch (void 0 === format && (format = new PdfStringFormat()), textAlign) {
              case "Right":
                format.alignment = PdfTextAlignment.Right;
                break;

              case "Center":
                format.alignment = PdfTextAlignment.Center;
                break;

              case "Justify":
                format.alignment = PdfTextAlignment.Justify;
                break;

              case "Left":
                format.alignment = PdfTextAlignment.Left;
            }
            return format;
        }, PdfExport.prototype.getVerticalAlignment = function(verticalAlign, format, textAlign) {
            switch (void 0 === format && (format = new PdfStringFormat(), format = this.getHorizontalAlignment(textAlign, format)), 
            verticalAlign) {
              case "Bottom":
                format.lineAlignment = PdfVerticalAlignment.Bottom;
                break;

              case "Middle":
                format.lineAlignment = PdfVerticalAlignment.Middle;
                break;

              case "Top":
                format.lineAlignment = PdfVerticalAlignment.Top;
            }
            return format;
        }, PdfExport.prototype.getFontFamily = function(fontFamily) {
            switch (fontFamily) {
              case "TimesRoman":
                return 2;

              case "Courier":
                return 1;

              case "Symbol":
                return 3;

              case "ZapfDingbats":
                return 4;

              default:
                return 0;
            }
        }, PdfExport.prototype.getFont = function(content) {
            var fontSize = isNullOrUndefined(content.style.fontSize) ? 9.75 : .75 * content.style.fontSize, fontFamily = isNullOrUndefined(content.style.fontFamily) ? PdfFontFamily.Helvetica : this.getFontFamily(content.style.fontFamily), fontStyle = PdfFontStyle.Regular;
            return !isNullOrUndefined(content.style.bold) && content.style.bold && (fontStyle |= PdfFontStyle.Bold), 
            !isNullOrUndefined(content.style.italic) && content.style.italic && (fontStyle |= PdfFontStyle.Italic), 
            !isNullOrUndefined(content.style.underline) && content.style.underline && (fontStyle |= PdfFontStyle.Underline), 
            !isNullOrUndefined(content.style.strikeout) && content.style.strikeout && (fontStyle |= PdfFontStyle.Strikeout), 
            new PdfStandardFont(fontFamily, fontSize, fontStyle);
        }, PdfExport.prototype.getPageNumberStyle = function(pageNumberType) {
            switch (pageNumberType) {
              case "LowerLatin":
                return 2;

              case "LowerRoman":
                return 3;

              case "UpperLatin":
                return 4;

              case "UpperRoman":
                return 5;

              default:
                return 1;
            }
        }, PdfExport.prototype.setContentFormat = function(content, format) {
            if (!isNullOrUndefined(content.size)) {
                var width = .75 * content.size.width, height = .75 * content.size.height;
                if (format = new PdfStringFormat(PdfTextAlignment.Left, PdfVerticalAlignment.Middle), 
                !isNullOrUndefined(content.style.hAlign)) switch (content.style.hAlign) {
                  case "Right":
                    format.alignment = PdfTextAlignment.Right;
                    break;

                  case "Center":
                    format.alignment = PdfTextAlignment.Center;
                    break;

                  case "Justify":
                    format.alignment = PdfTextAlignment.Justify;
                    break;

                  default:
                    format.alignment = PdfTextAlignment.Left;
                }
                return isNullOrUndefined(content.style.vAlign) || (format = this.getVerticalAlignment(content.style.vAlign, format)), 
                {
                    format: format,
                    size: new SizeF(width, height)
                };
            }
            return null;
        }, PdfExport.prototype.getPageSize = function(pageSize) {
            switch (pageSize) {
              case "Letter":
                return new SizeF(612, 792);

              case "Note":
                return new SizeF(540, 720);

              case "Legal":
                return new SizeF(612, 1008);

              case "A0":
                return new SizeF(2380, 3368);

              case "A1":
                return new SizeF(1684, 2380);

              case "A2":
                return new SizeF(1190, 1684);

              case "A3":
                return new SizeF(842, 1190);

              case "A5":
                return new SizeF(421, 595);

              case "A6":
                return new SizeF(297, 421);

              case "A7":
                return new SizeF(210, 297);

              case "A8":
                return new SizeF(148, 210);

              case "A9":
                return new SizeF(105, 148);

              case "B0":
                return new SizeF(2836, 4008);

              case "B1":
                return new SizeF(2004, 2836);

              case "B2":
                return new SizeF(1418, 2004);

              case "B3":
                return new SizeF(1002, 1418);

              case "B4":
                return new SizeF(709, 1002);

              case "B5":
                return new SizeF(501, 709);

              case "Archa":
                return new SizeF(648, 864);

              case "Archb":
                return new SizeF(864, 1296);

              case "Archc":
                return new SizeF(1296, 1728);

              case "Archd":
                return new SizeF(1728, 2592);

              case "Arche":
                return new SizeF(2592, 3456);

              case "Flsa":
                return new SizeF(612, 936);

              case "HalfLetter":
                return new SizeF(396, 612);

              case "Letter11x17":
                return new SizeF(792, 1224);

              case "Ledger":
                return new SizeF(1224, 792);

              default:
                return new SizeF(595, 842);
            }
        }, PdfExport.prototype.getDashStyle = function(dashStyle) {
            switch (dashStyle) {
              case "Dash":
                return 1;

              case "Dot":
                return 2;

              case "DashDot":
                return 3;

              case "DashDotDot":
                return 4;

              default:
                return 0;
            }
        }, PdfExport.prototype.getPenFromContent = function(content) {
            var pen = new PdfPen(new PdfColor(0, 0, 0));
            if (!isNullOrUndefined(content.style) && null !== content.style && !isNullOrUndefined(content.style.penColor)) {
                var penColor = this.hexToRgb(content.style.penColor);
                pen = new PdfPen(new PdfColor(penColor.r, penColor.g, penColor.b));
            }
            return pen;
        }, PdfExport.prototype.getBrushFromContent = function(content) {
            var brush = null;
            if (!isNullOrUndefined(content.style.textBrushColor)) {
                var brushColor = this.hexToRgb(content.style.textBrushColor);
                brush = new PdfSolidBrush(new PdfColor(brushColor.r, brushColor.g, brushColor.b));
            }
            return brush;
        }, PdfExport.prototype.hexToRgb = function(hex) {
            if (null === hex || "" === hex || 7 !== hex.length) throw new Error("please set valid hex value for color...");
            hex = hex.substring(1);
            var bigint = parseInt(hex, 16);
            return {
                r: bigint >> 16 & 255,
                g: bigint >> 8 & 255,
                b: 255 & bigint
            };
        }, PdfExport.prototype.destroy = function() {}, PdfExport;
    }(), __extends$134 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), CommandColumnRenderer = function(_super) {
        function CommandColumnRenderer(parent, locator) {
            var _this = _super.call(this, parent, locator) || this;
            return _this.buttonElement = createElement("button", {}), _this.unbounDiv = createElement("div", {
                className: "e-unboundcelldiv",
                styles: "display: inline-block"
            }), _this.element = createElement("TD", {
                className: "e-rowcell e-unboundcell",
                attrs: {
                    role: "gridcell",
                    tabindex: "-1"
                }
            }), _this;
        }
        return __extends$134(CommandColumnRenderer, _super), CommandColumnRenderer.prototype.render = function(cell, data, attributes$$1) {
            var node = this.element.cloneNode();
            if (node.appendChild(this.unbounDiv.cloneNode()), node.setAttribute("aria-label", "is Command column column header " + cell.column.headerText), 
            cell.column.commandsTemplate) appendChildren(node.firstElementChild, cell.column.getColumnTemplate()(data)); else for (var _i = 0, _a = cell.commands; _i < _a.length; _i++) {
                var command = _a[_i];
                node = this.renderButton(node, command, attributes$$1.index);
            }
            return this.setAttributes(node, cell, attributes$$1), this.parent.isEdit ? (addClass(node.querySelectorAll(".e-edit-delete"), "e-hide"), 
            removeClass(node.querySelectorAll(".e-save-cancel"), "e-hide")) : (addClass(node.querySelectorAll(".e-save-cancel"), "e-hide"), 
            removeClass(node.querySelectorAll(".e-edit-delete"), "e-hide")), node;
        }, CommandColumnRenderer.prototype.renderButton = function(node, buttonOption, index) {
            var button = this.buttonElement.cloneNode();
            attributes(button, {
                id: this.parent.element.id + (buttonOption.type || "") + "_" + index,
                type: "button",
                title: buttonOption.buttonOption.content || buttonOption.type
            }), button.onclick = buttonOption.buttonOption.click;
            var buttonObj = new Button(buttonOption.buttonOption, button);
            switch (buttonObj.commandType = buttonOption.type, node.firstElementChild.appendChild(buttonObj.element), 
            buttonOption.type) {
              case "Edit":
              case "Delete":
                addClass([ button ], [ "e-edit-delete", "e-" + buttonOption.type.toLowerCase() + "button" ]);
                break;

              case "Cancel":
              case "Save":
                addClass([ button ], [ "e-save-cancel", "e-" + buttonOption.type.toLowerCase() + "button" ]);
            }
            return node;
        }, CommandColumnRenderer;
    }(CellRenderer), CommandColumn = function() {
        function CommandColumn(parent, locator) {
            this.parent = parent, this.locator = locator, this.addEventListener();
        }
        return CommandColumn.prototype.initiateRender = function() {
            this.locator.getService("cellRendererFactory").addCellRenderer(CellType.CommandColumn, new CommandColumnRenderer(this.parent, this.locator));
        }, CommandColumn.prototype.commandClickHandler = function(e) {
            var gObj = this.parent, target = (gObj.element.id, closest(e.target, "button"));
            if (target && gObj.editModule && closest(e.target, ".e-unboundcell")) {
                var buttonObj = target.ej2_instances[0], type = buttonObj.commandType;
                if (!buttonObj.disabled) switch (type) {
                  case "Edit":
                    gObj.editModule.endEdit(), gObj.editModule.startEdit(closest(target, "tr"));
                    break;

                  case "Cancel":
                    gObj.editModule.closeEdit();
                    break;

                  case "Save":
                    gObj.editModule.endEdit();
                    break;

                  case "Delete":
                    gObj.editModule.endEdit(), gObj.clearSelection(), gObj.selectRow(parseInt(closest(target, "tr").getAttribute("aria-rowindex"), 10), !1), 
                    gObj.editModule.deleteRecord();
                }
            }
        }, CommandColumn.prototype.getModuleName = function() {
            return "commandColumn";
        }, CommandColumn.prototype.destroy = function() {
            this.parent.isDestroyed || this.removeEventListener();
        }, CommandColumn.prototype.removeEventListener = function() {
            this.parent.isDestroyed || (this.parent.off(click, this.commandClickHandler), this.parent.off(initialEnd, this.initiateRender), 
            this.parent.off(keyPressed, this.keyPressHandler));
        }, CommandColumn.prototype.addEventListener = function() {
            this.parent.isDestroyed || (this.parent.on(click, this.commandClickHandler, this), 
            this.parent.on(initialEnd, this.initiateRender, this), this.parent.on(keyPressed, this.keyPressHandler, this));
        }, CommandColumn.prototype.keyPressHandler = function(e) {
            "enter" === e.action && closest(e.target, ".e-unboundcelldiv") && (this.commandClickHandler(e), 
            e.preventDefault());
        }, CommandColumn;
    }(), menuClass_header = ".e-gridheader", menuClass_content = ".e-gridcontent", menuClass_edit = ".e-inline-edit", menuClass_batchEdit = ".e-editedbatchcell", menuClass_editIcon = "e-edit", menuClass_pager = ".e-gridpager", menuClass_delete = "e-delete", menuClass_save = "e-save", menuClass_cancel = "e-cancel", menuClass_copy = "e-copy", menuClass_pdf = "e-pdfexport", menuClass_group = "e-icon-group", menuClass_ungroup = "e-icon-ungroup", menuClass_csv = "e-csvexport", menuClass_excel = "e-excelexport", menuClass_fPage = "e-icon-first", menuClass_nPage = "e-icon-next", menuClass_lPage = "e-icon-last", menuClass_pPage = "e-icon-prev", menuClass_ascending = "e-icon-ascending", menuClass_descending = "e-icon-descending", menuClass_groupHeader = "e-groupdroparea", menuClass_touchPop = "e-gridpopup", ContextMenu$2 = function() {
        function ContextMenu$$1(parent, serviceLocator) {
            this.defaultItems = {}, this.disableItems = [], this.hiddenItems = [], this.localeText = this.setLocaleKey(), 
            this.parent = parent, this.gridID = parent.element.id, this.serviceLocator = serviceLocator, 
            this.addEventListener();
        }
        return ContextMenu$$1.prototype.addEventListener = function() {
            this.parent.isDestroyed || (this.parent.on(uiUpdate, this.enableAfterRenderMenu, this), 
            this.parent.on(initialLoad, this.render, this));
        }, ContextMenu$$1.prototype.removeEventListener = function() {
            this.parent.isDestroyed || (this.parent.off(initialLoad, this.render), this.parent.off(uiUpdate, this.enableAfterRenderMenu), 
            EventHandler.remove(this.element, "keydown", this.keyDownHandler.bind(this)));
        }, ContextMenu$$1.prototype.keyDownHandler = function(e) {
            "Tab" !== e.code && 9 !== e.which || this.contextMenu.close();
        }, ContextMenu$$1.prototype.render = function() {
            this.parent.element.classList.add("e-noselect"), this.l10n = this.serviceLocator.getService("localization"), 
            this.element = createElement("ul", {
                id: this.gridID + "_cmenu"
            }), EventHandler.add(this.element, "keydown", this.keyDownHandler.bind(this)), this.parent.element.appendChild(this.element);
            var target = "#" + this.gridID;
            this.contextMenu = new ContextMenu$1({
                items: this.getMenuItems(),
                enableRtl: this.parent.enableRtl,
                enablePersistence: this.parent.enablePersistence,
                locale: this.parent.locale,
                target: target,
                select: this.contextMenuItemClick.bind(this),
                beforeOpen: this.contextMenuBeforeOpen.bind(this),
                onOpen: this.contextMenuOpen.bind(this),
                onClose: this.contextMenuOnClose.bind(this),
                cssClass: "e-grid-menu"
            }), this.contextMenu.appendTo(this.element);
        }, ContextMenu$$1.prototype.enableAfterRenderMenu = function(e) {
            e.module === this.getModuleName() && e.enable && (this.contextMenu && (this.contextMenu.destroy(), 
            remove(this.element), this.parent.element.classList.remove("e-noselect")), this.render());
        }, ContextMenu$$1.prototype.getMenuItems = function() {
            for (var menuItems = [], exportItems = [], _i = 0, _a = this.parent.contextMenuItems; _i < _a.length; _i++) {
                var item = _a[_i];
                "string" == typeof item && -1 !== this.getDefaultItems().indexOf(item) ? -1 !== item.toLocaleLowerCase().indexOf("export") ? exportItems.push(this.buildDefaultItems(item)) : menuItems.push(this.buildDefaultItems(item)) : "string" != typeof item && menuItems.push(item);
            }
            if (exportItems.length > 0) {
                var exportGroup = this.buildDefaultItems("export");
                exportGroup.items = exportItems, menuItems.push(exportGroup);
            }
            return menuItems;
        }, ContextMenu$$1.prototype.getLastPage = function() {
            var totalpage = Math.floor(this.parent.pageSettings.totalRecordsCount / this.parent.pageSettings.pageSize);
            return this.parent.pageSettings.totalRecordsCount % this.parent.pageSettings.pageSize && (totalpage += 1), 
            totalpage;
        }, ContextMenu$$1.prototype.contextMenuOpen = function() {
            this.isOpen = !0;
        }, ContextMenu$$1.prototype.contextMenuItemClick = function(args) {
            switch (this.getKeyFromId(args.item.id)) {
              case "AutoFitAll":
                this.parent.autoFitColumns([]);
                break;

              case "AutoFit":
                this.parent.autoFitColumns(this.targetColumn.field);
                break;

              case "Group":
                this.parent.groupColumn(this.targetColumn.field);
                break;

              case "Ungroup":
                this.parent.ungroupColumn(this.targetColumn.field);
                break;

              case "Edit":
                "Batch" === this.parent.editSettings.mode ? this.row && this.cell && !isNaN(parseInt(this.cell.getAttribute("aria-colindex"), 10)) && this.parent.editModule.editCell(parseInt(this.row.getAttribute("aria-rowindex"), 10), this.parent.getColumns()[parseInt(this.cell.getAttribute("aria-colindex"), 10)].field) : (this.parent.editModule.endEdit(), 
                this.parent.editModule.startEdit(this.row));
                break;

              case "Delete":
                "Batch" !== this.parent.editSettings.mode && this.parent.editModule.endEdit(), this.parent.editModule.deleteRow(this.row);
                break;

              case "Save":
                this.parent.editModule.endEdit();
                break;

              case "Cancel":
                this.parent.editModule.closeEdit();
                break;

              case "Copy":
                this.parent.copy();
                break;

              case "PdfExport":
                this.parent.pdfExport();
                break;

              case "ExcelExport":
                this.parent.excelExport();
                break;

              case "CsvExport":
                this.parent.csvExport();
                break;

              case "SortAscending":
                this.isOpen = !1, this.parent.sortColumn(this.targetColumn.field, "Ascending");
                break;

              case "SortDescending":
                this.isOpen = !1, this.parent.sortColumn(this.targetColumn.field, "Descending");
                break;

              case "FirstPage":
                this.parent.goToPage(1);
                break;

              case "PrevPage":
                this.parent.goToPage(this.parent.pageSettings.currentPage - 1);
                break;

              case "LastPage":
                this.parent.goToPage(this.getLastPage());
                break;

              case "NextPage":
                this.parent.goToPage(this.parent.pageSettings.currentPage + 1);
            }
            args.column = this.targetColumn, this.parent.trigger("contextMenuClick", args);
        }, ContextMenu$$1.prototype.contextMenuOnClose = function(args) {
            args.items.length > 0 && args.items[0].parentObj instanceof ContextMenu$1 && this.updateItemStatus();
        }, ContextMenu$$1.prototype.getLocaleText = function(item) {
            return this.l10n.getConstant(this.localeText[item]);
        }, ContextMenu$$1.prototype.updateItemStatus = function() {
            this.contextMenu.showItems(this.hiddenItems), this.contextMenu.enableItems(this.disableItems), 
            this.hiddenItems = [], this.disableItems = [], this.isOpen = !1;
        }, ContextMenu$$1.prototype.contextMenuBeforeOpen = function(args) {
            var closestGrid = closest(args.event.target, ".e-grid");
            if (args.event && closestGrid && closestGrid !== this.parent.element) args.cancel = !0; else if (args.event && (closest(args.event.target, "." + menuClass_groupHeader) || closest(args.event.target, "." + menuClass_touchPop) || closest(args.event.target, ".e-summarycell") || closest(args.event.target, ".e-groupcaption") || closest(args.event.target, ".e-filterbarcell"))) args.cancel = !0; else {
                this.targetColumn = this.getColumn(args.event), this.selectRow(args.event, "Multiple" !== this.parent.selectionSettings.type);
                for (var _i = 0, _a = args.items; _i < _a.length; _i++) {
                    var item = _a[_i], key = this.getKeyFromId(item.id), dItem = this.defaultItems[key];
                    if (-1 !== this.getDefaultItems().indexOf(key)) if (this.ensureDisabledStatus(key) && this.disableItems.push(item.text), 
                    args.event && (this.ensureTarget(args.event.target, menuClass_edit) || this.ensureTarget(args.event.target, menuClass_batchEdit))) "Save" !== key && "Cancel" !== key && this.hiddenItems.push(item.text); else {
                        if ("Batch" === this.parent.editSettings.mode && (closest(args.event.target, ".e-gridform") || this.parent.editModule.getBatchChanges().changedRecords.length || this.parent.editModule.getBatchChanges().addedRecords.length || this.parent.editModule.getBatchChanges().deletedRecords.length) && ("Save" === key || "Cancel" === key)) continue;
                        isNullOrUndefined(args.parentItem) && args.event && !this.ensureTarget(args.event.target, dItem.target) && this.hiddenItems.push(item.text);
                    } else item.target && args.event && !this.ensureTarget(args.event.target, item.target) && this.hiddenItems.push(item.text);
                }
                this.contextMenu.enableItems(this.disableItems, !1), this.contextMenu.hideItems(this.hiddenItems), 
                this.eventArgs = args.event, args.column = this.targetColumn, this.parent.trigger("contextMenuOpen", args), 
                this.hiddenItems.length === args.items.length && (this.updateItemStatus(), args.cancel = !0);
            }
        }, ContextMenu$$1.prototype.ensureTarget = function(targetElement, selector) {
            var target = targetElement;
            return (target = !this.ensureFrozenHeader(targetElement) || selector !== menuClass_header && selector !== menuClass_content ? selector === menuClass_content || selector === menuClass_header ? parentsUntil(closest(targetElement, ".e-table"), selector.substr(1, selector.length)) : closest(targetElement, selector) : closest(targetElement, selector === menuClass_header ? "thead" : "tbody")) && parentsUntil(target, "e-grid") === this.parent.element;
        }, ContextMenu$$1.prototype.ensureFrozenHeader = function(targetElement) {
            return !(!this.parent.getFrozenColumns() && !this.parent.frozenRows || !closest(targetElement, menuClass_header));
        }, ContextMenu$$1.prototype.ensureDisabledStatus = function(item) {
            var _this = this, status = !1;
            switch (item) {
              case "AutoFitAll":
              case "AutoFit":
                status = !(this.parent.ensureModuleInjected(Resize) && !this.parent.isEdit);
                break;

              case "Group":
                (!this.parent.allowGrouping || this.parent.ensureModuleInjected(Group) && this.targetColumn && this.parent.groupSettings.columns.indexOf(this.targetColumn.field) >= 0) && (status = !0);
                break;

              case "Ungroup":
                (!this.parent.allowGrouping || !this.parent.ensureModuleInjected(Group) || this.parent.ensureModuleInjected(Group) && this.targetColumn && this.parent.groupSettings.columns.indexOf(this.targetColumn.field) < 0) && (status = !0);
                break;

              case "Edit":
              case "Delete":
              case "Save":
              case "Cancel":
                this.parent.editModule && 0 !== this.parent.getDataRows().length || (status = !0);
                break;

              case "Copy":
                0 !== this.parent.getSelectedRowIndexes().length && 0 !== this.parent.getCurrentViewRecords().length || (status = !0);
                break;

              case "export":
                this.parent.allowExcelExport && this.parent.excelExport && (this.parent.ensureModuleInjected(PdfExport) || this.parent.ensureModuleInjected(ExcelExport)) || (status = !0);
                break;

              case "PdfExport":
                this.parent.allowPdfExport && this.parent.ensureModuleInjected(PdfExport) || (status = !0);
                break;

              case "ExcelExport":
              case "CsvExport":
                this.parent.allowExcelExport && this.parent.ensureModuleInjected(ExcelExport) || (status = !0);
                break;

              case "SortAscending":
              case "SortDescending":
                this.parent.allowSorting && this.parent.ensureModuleInjected(Sort) ? this.parent.ensureModuleInjected(Sort) && this.parent.sortSettings.columns.length > 0 && this.targetColumn && this.parent.sortSettings.columns.forEach(function(element) {
                    element.field === _this.targetColumn.field && element.direction.toLowerCase() === item.toLowerCase().replace("sort", "").toLocaleLowerCase() && (status = !0);
                }) : status = !0;
                break;

              case "FirstPage":
              case "PrevPage":
                (!this.parent.allowPaging || !this.parent.ensureModuleInjected(Page) || 0 === this.parent.getCurrentViewRecords().length || this.parent.ensureModuleInjected(Page) && 1 === this.parent.pageSettings.currentPage) && (status = !0);
                break;

              case "LastPage":
              case "NextPage":
                (!this.parent.allowPaging || !this.parent.ensureModuleInjected(Page) || 0 === this.parent.getCurrentViewRecords().length || this.parent.ensureModuleInjected(Page) && this.parent.pageSettings.currentPage === this.getLastPage()) && (status = !0);
            }
            return status;
        }, ContextMenu$$1.prototype.getContextMenu = function() {
            return this.element;
        }, ContextMenu$$1.prototype.destroy = function() {
            this.contextMenu.destroy(), remove(this.element), this.removeEventListener(), this.parent.element.classList.remove("e-noselect");
        }, ContextMenu$$1.prototype.getModuleName = function() {
            return "contextMenu";
        }, ContextMenu$$1.prototype.generateID = function(item) {
            return this.gridID + "_cmenu_" + item;
        }, ContextMenu$$1.prototype.getKeyFromId = function(id) {
            return id.replace(this.gridID + "_cmenu_", "");
        }, ContextMenu$$1.prototype.buildDefaultItems = function(item) {
            var menuItem;
            switch (item) {
              case "AutoFitAll":
              case "AutoFit":
                menuItem = {
                    target: menuClass_header
                };
                break;

              case "Group":
                menuItem = {
                    target: menuClass_header,
                    iconCss: menuClass_group
                };
                break;

              case "Ungroup":
                menuItem = {
                    target: menuClass_header,
                    iconCss: menuClass_ungroup
                };
                break;

              case "Edit":
                menuItem = {
                    target: menuClass_content,
                    iconCss: menuClass_editIcon
                };
                break;

              case "Delete":
                menuItem = {
                    target: menuClass_content,
                    iconCss: menuClass_delete
                };
                break;

              case "Save":
                menuItem = {
                    target: menuClass_edit,
                    iconCss: menuClass_save
                };
                break;

              case "Cancel":
                menuItem = {
                    target: menuClass_edit,
                    iconCss: menuClass_cancel
                };
                break;

              case "Copy":
                menuItem = {
                    target: menuClass_content,
                    iconCss: menuClass_copy
                };
                break;

              case "export":
                menuItem = {
                    target: menuClass_content
                };
                break;

              case "PdfExport":
                menuItem = {
                    target: menuClass_content,
                    iconCss: menuClass_pdf
                };
                break;

              case "ExcelExport":
                menuItem = {
                    target: menuClass_content,
                    iconCss: menuClass_excel
                };
                break;

              case "CsvExport":
                menuItem = {
                    target: menuClass_content,
                    iconCss: menuClass_csv
                };
                break;

              case "SortAscending":
                menuItem = {
                    target: menuClass_header,
                    iconCss: menuClass_ascending
                };
                break;

              case "SortDescending":
                menuItem = {
                    target: menuClass_header,
                    iconCss: menuClass_descending
                };
                break;

              case "FirstPage":
                menuItem = {
                    target: menuClass_pager,
                    iconCss: menuClass_fPage
                };
                break;

              case "PrevPage":
                menuItem = {
                    target: menuClass_pager,
                    iconCss: menuClass_pPage
                };
                break;

              case "LastPage":
                menuItem = {
                    target: menuClass_pager,
                    iconCss: menuClass_lPage
                };
                break;

              case "NextPage":
                menuItem = {
                    target: menuClass_pager,
                    iconCss: menuClass_nPage
                };
            }
            return this.defaultItems[item] = {
                text: this.getLocaleText(item),
                id: this.generateID(item),
                target: menuItem.target,
                iconCss: menuItem.iconCss ? "e-icons " + menuItem.iconCss : ""
            }, this.defaultItems[item];
        }, ContextMenu$$1.prototype.getDefaultItems = function() {
            return [ "AutoFitAll", "AutoFit", "Group", "Ungroup", "Edit", "Delete", "Save", "Cancel", "Copy", "export", "PdfExport", "ExcelExport", "CsvExport", "SortAscending", "SortDescending", "FirstPage", "PrevPage", "LastPage", "NextPage" ];
        }, ContextMenu$$1.prototype.setLocaleKey = function() {
            return {
                AutoFitAll: "autoFitAll",
                AutoFit: "autoFit",
                Copy: "Copy",
                Group: "Group",
                Ungroup: "Ungroup",
                Edit: "EditRecord",
                Delete: "DeleteRecord",
                Save: "Save",
                Cancel: "CancelButton",
                PdfExport: "Pdfexport",
                ExcelExport: "Excelexport",
                CsvExport: "Csvexport",
                export: "Export",
                SortAscending: "SortAscending",
                SortDescending: "SortDescending",
                FirstPage: "FirstPage",
                LastPage: "LastPage",
                PrevPage: "PreviousPage",
                NextPage: "NextPage"
            };
        }, ContextMenu$$1.prototype.getColumn = function(e) {
            var cell = closest(e.target, "th.e-headercell");
            if (cell) {
                cell.classList.add("e-resized");
                var uid = cell.querySelector(".e-headercelldiv").getAttribute("e-mappinguid");
                return this.parent.getColumnByUid(uid);
            }
            return null;
        }, ContextMenu$$1.prototype.selectRow = function(e, isSelectable) {
            this.cell = e.target, this.row = closest(e.target, "tr.e-row") || this.row, this.row && isSelectable && this.parent.selectRow(parseInt(this.row.getAttribute("aria-rowindex"), 10));
        }, ContextMenu$$1;
    }(), FreezeRowModelGenerator = function() {
        function FreezeRowModelGenerator(parent) {
            this.isFrzLoad = 1, this.parent = parent, this.rowModelGenerator = new RowModelGenerator(this.parent);
        }
        return FreezeRowModelGenerator.prototype.generateRows = function(data, notifyArgs) {
            for (var frzCols = this.parent.getFrozenColumns(), row = this.rowModelGenerator.generateRows(data, notifyArgs), i = 0, len = row.length; i < len; i++) this.isFrzLoad % 2 == 0 ? row[i].cells = row[i].cells.slice(frzCols, row[i].cells.length) : row[i].cells = row[i].cells.slice(0, frzCols);
            return this.isFrzLoad++, row;
        }, FreezeRowModelGenerator;
    }(), __extends$135 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), FreezeContentRender = function(_super) {
        function FreezeContentRender(parent, locator) {
            return _super.call(this, parent, locator) || this;
        }
        return __extends$135(FreezeContentRender, _super), FreezeContentRender.prototype.renderPanel = function() {
            _super.prototype.renderPanel.call(this);
            var fDiv = createElement("div", {
                className: "e-frozencontent"
            }), mDiv = createElement("div", {
                className: "e-movablecontent"
            });
            this.getPanel().firstChild.appendChild(fDiv), this.getPanel().firstChild.appendChild(mDiv), 
            this.setFrozenContent(fDiv), this.setMovableContent(mDiv);
        }, FreezeContentRender.prototype.renderEmpty = function(tbody) {
            _super.prototype.renderEmpty.call(this, tbody), this.getMovableContent().querySelector("tbody").innerHTML = "<tr><td></td></tr>", 
            this.getFrozenContent().querySelector(".e-emptyrow").querySelector("td").colSpan = this.parent.getFrozenColumns(), 
            this.getFrozenContent().style.borderRightWidth = "0px", this.parent.frozenRows && (this.parent.getHeaderContent().querySelector(".e-frozenheader").querySelector("tbody").innerHTML = "", 
            this.parent.getHeaderContent().querySelector(".e-movableheader").querySelector("tbody").innerHTML = "");
        }, FreezeContentRender.prototype.setFrozenContent = function(ele) {
            this.frozenContent = ele;
        }, FreezeContentRender.prototype.setMovableContent = function(ele) {
            this.movableContent = ele;
        }, FreezeContentRender.prototype.getFrozenContent = function() {
            return this.frozenContent;
        }, FreezeContentRender.prototype.getMovableContent = function() {
            return this.movableContent;
        }, FreezeContentRender.prototype.getModelGenerator = function() {
            return new FreezeRowModelGenerator(this.parent);
        }, FreezeContentRender.prototype.renderTable = function() {
            _super.prototype.renderTable.call(this), this.getFrozenContent().appendChild(this.getTable());
            var mTbl = this.getTable().cloneNode(!0);
            this.getMovableContent().appendChild(mTbl), remove(this.getMovableContent().querySelector("colgroup"));
            var colGroup = this.parent.getHeaderContent().querySelector(".e-movableheader").querySelector("colgroup").cloneNode(!0);
            mTbl.insertBefore(colGroup, mTbl.querySelector("tbody"));
        }, FreezeContentRender;
    }(ContentRender), FreezeRender = function(_super) {
        function FreezeRender(parent, locator) {
            var _this = _super.call(this, parent, locator) || this;
            return _this.addEventListener(), _this;
        }
        return __extends$135(FreezeRender, _super), FreezeRender.prototype.addEventListener = function() {
            this.parent.on(freezeRender, this.refreshFreeze, this);
        }, FreezeRender.prototype.renderTable = function() {
            _super.prototype.renderTable.call(this), this.rfshMovable(), this.updateColgroup(), 
            this.initializeHeaderDrag(), this.initializeHeaderDrop(), this.parent.notify(headerRefreshed, {
                rows: this.rows,
                args: {
                    isFrozen: !1
                }
            });
        }, FreezeRender.prototype.renderPanel = function() {
            _super.prototype.renderPanel.call(this);
            var fDiv = createElement("div", {
                className: "e-frozenheader"
            }), mDiv = createElement("div", {
                className: "e-movableheader"
            });
            this.getPanel().firstChild.appendChild(fDiv), this.getPanel().firstChild.appendChild(mDiv), 
            this.setFrozenHeader(fDiv), this.setMovableHeader(mDiv);
        }, FreezeRender.prototype.refreshUI = function() {
            var tbody = this.getMovableHeader().querySelector("tbody");
            remove(this.getMovableHeader().querySelector("table")), _super.prototype.refreshUI.call(this), 
            this.rfshMovable(), this.getMovableHeader().querySelector("tbody").innerHTML = tbody.innerHTML, 
            this.updateColgroup(), renderMovable(this.parent.getContentTable().querySelector("colgroup"), this.parent.getFrozenColumns()), 
            this.initializeHeaderDrag(), this.parent.notify(headerRefreshed, {
                rows: this.rows,
                args: {
                    isFrozen: !1
                }
            });
        }, FreezeRender.prototype.rfshMovable = function() {
            this.getFrozenHeader().appendChild(this.getTable()), this.getMovableHeader().appendChild(this.createTable()), 
            this.refreshStackedHdrHgt();
        }, FreezeRender.prototype.refreshFreeze = function(obj) {
            if ("filter" === obj.case) {
                var filterRow = this.getTable().querySelector(".e-filterbar");
                this.parent.allowFiltering && filterRow && this.getMovableHeader().querySelector("thead") && this.getMovableHeader().querySelector("thead").appendChild(renderMovable(filterRow, this.parent.getFrozenColumns()));
            } else if ("textwrap" === obj.case) {
                var fRows = void 0, mRows = void 0, fHdr = this.getFrozenHeader(), mHdr = this.getMovableHeader(), cont = this.parent.getContent(), wrapMode = this.parent.textWrapSettings.wrapMode, hdrClassList = this.parent.getHeaderContent().firstChild.classList;
                ("Header" !== wrapMode || obj.isModeChg) && (fRows = cont.querySelector(".e-frozencontent").querySelectorAll("tr"), 
                mRows = cont.querySelector(".e-movablecontent").querySelectorAll("tr"), this.setWrapHeight(fRows, mRows, obj.isModeChg, !0)), 
                "Content" === wrapMode && this.parent.allowTextWrap ? hdrClassList.add("e-wrap") : hdrClassList.remove("e-wrap"), 
                "Both" === wrapMode || obj.isModeChg ? (fRows = fHdr.querySelectorAll("tr"), mRows = mHdr.querySelectorAll("tr")) : (fRows = fHdr.querySelector("Content" === wrapMode ? "tbody" : "thead").querySelectorAll("tr"), 
                mRows = mHdr.querySelector("Content" === wrapMode ? "tbody" : "thead").querySelectorAll("tr")), 
                this.setWrapHeight(fRows, mRows, obj.isModeChg, !1, this.colDepth > 1), this.refreshStackedHdrHgt();
            }
        }, FreezeRender.prototype.updateResizeHandler = function() {
            [].slice.call(this.parent.getHeaderContent().querySelectorAll(".e-rhandler")).forEach(function(ele) {
                ele.style.height = ele.parentElement.offsetHeight + "px";
            });
        }, FreezeRender.prototype.setWrapHeight = function(fRows, mRows, isModeChg, isContReset, isStackedHdr) {
            for (var fRowHgt, mRowHgt, isWrap = this.parent.allowTextWrap, wrapMode = this.parent.textWrapSettings.wrapMode, tHead = this.parent.getHeaderContent().querySelector("thead"), tBody = this.parent.getHeaderContent().querySelector("tbody"), i = 0, len = fRows.length; i < len; i++) (isModeChg && ("Header" === wrapMode && isContReset || "Content" === wrapMode && tHead.contains(fRows[i]) || "Header" === wrapMode && tBody.contains(fRows[i])) || isStackedHdr) && (fRows[i].style.height = null, 
            mRows[i].style.height = null), fRowHgt = fRows[i].offsetHeight, mRowHgt = mRows[i].offsetHeight, 
            fRows[i].childElementCount && (isWrap && fRowHgt < mRowHgt || !isWrap && fRowHgt > mRowHgt) ? fRows[i].style.height = mRowHgt + "px" : mRows[i].childElementCount && (isWrap && fRowHgt > mRowHgt || !isWrap && fRowHgt < mRowHgt) && (mRows[i].style.height = fRowHgt + "px");
        }, FreezeRender.prototype.refreshStackedHdrHgt = function() {
            for (var fRowSpan, mRowSpan, fTr = this.getFrozenHeader().querySelectorAll(".e-columnheader"), mTr = this.getMovableHeader().querySelectorAll(".e-columnheader"), i = 0, len = fTr.length; i < len; i++) fRowSpan = this.getRowSpan(fTr[i]), 
            mRowSpan = this.getRowSpan(mTr[i]), fRowSpan.min > 1 ? this.updateStackedHdrRowHgt(i, fRowSpan.max, fTr[i], mTr) : mRowSpan.min > 1 && this.updateStackedHdrRowHgt(i, mRowSpan.max, mTr[i], fTr);
            this.parent.allowResizing && this.updateResizeHandler();
        }, FreezeRender.prototype.getRowSpan = function(row) {
            for (var rSpan, minRowSpan, maxRowSpan, i = 0, len = row.childElementCount; i < len; i++) 0 === i && (minRowSpan = row.children[0].rowSpan), 
            rSpan = row.children[i].rowSpan, minRowSpan = Math.min(rSpan, minRowSpan), maxRowSpan = Math.max(rSpan, minRowSpan);
            return {
                min: minRowSpan,
                max: maxRowSpan
            };
        }, FreezeRender.prototype.updateStackedHdrRowHgt = function(idx, maxRowSpan, row, rows) {
            for (var height = 0, i = 0; i < maxRowSpan; i++) height += rows[idx + i].offsetHeight;
            row.style.height = height + "px";
        }, FreezeRender.prototype.setFrozenHeader = function(ele) {
            this.frozenHeader = ele;
        }, FreezeRender.prototype.setMovableHeader = function(ele) {
            this.movableHeader = ele;
        }, FreezeRender.prototype.getFrozenHeader = function() {
            return this.frozenHeader;
        }, FreezeRender.prototype.getMovableHeader = function() {
            return this.movableHeader;
        }, FreezeRender.prototype.updateColgroup = function() {
            var mTable = this.getMovableHeader().querySelector("table");
            remove(this.getMovableHeader().querySelector("colgroup")), mTable.insertBefore(renderMovable(this.getFrozenHeader().querySelector("colgroup"), this.parent.getFrozenColumns()), mTable.querySelector("thead"));
        }, FreezeRender;
    }(HeaderRender), Freeze = function() {
        function Freeze(parent, locator) {
            this.parent = parent, this.locator = locator, this.addEventListener();
        }
        return Freeze.prototype.getModuleName = function() {
            return "freeze";
        }, Freeze.prototype.addEventListener = function() {
            this.parent.isDestroyed || (this.parent.on(initialLoad, this.instantiateRenderer, this), 
            this.parent.on(initialEnd, this.wireEvents, this));
        }, Freeze.prototype.wireEvents = function() {
            this.parent.frozenRows && EventHandler.add(this.parent.getHeaderContent(), "dblclick", this.dblClickHandler, this);
        }, Freeze.prototype.dblClickHandler = function(e) {
            parentsUntil(e.target, "e-grid").id === this.parent.element.id && this.parent.notify("dblclick", e);
        }, Freeze.prototype.instantiateRenderer = function() {
            var renderer = this.locator.getService("rendererFactory");
            this.parent.getFrozenColumns() && (renderer.addRenderer(RenderType.Header, new FreezeRender(this.parent, this.locator)), 
            renderer.addRenderer(RenderType.Content, new FreezeContentRender(this.parent, this.locator)));
        }, Freeze.prototype.removeEventListener = function() {
            this.parent.isDestroyed || this.parent.off(initialLoad, this.instantiateRenderer);
        }, Freeze.prototype.destroy = function() {
            this.removeEventListener();
        }, Freeze;
    }(), ColumnMenu = function() {
        function ColumnMenu(parent, serviceLocator) {
            this.defaultItems = {}, this.localeText = this.setLocaleKey(), this.disableItems = [], 
            this.hiddenItems = [], this.isOpen = !1, this.GROUP = "e-icon-group", this.UNGROUP = "e-icon-ungroup", 
            this.ASCENDING = "e-icon-ascending", this.DESCENDING = "e-icon-descending", this.ROOT = "e-columnmenu", 
            this.FILTER = "e-icon-filter", this.POP = "e-filter-popup", this.WRAP = "e-col-menu", 
            this.CHOOSER = "_chooser_", this.parent = parent, this.gridID = parent.element.id, 
            this.serviceLocator = serviceLocator, this.addEventListener();
        }
        return ColumnMenu.prototype.wireEvents = function() {
            var _this = this;
            this.getColumnMenuHandlers().forEach(function(ele) {
                EventHandler.add(ele, "mousedown", _this.columnMenuHandlerDown, _this);
            });
        }, ColumnMenu.prototype.unwireEvents = function() {
            var _this = this;
            this.getColumnMenuHandlers().forEach(function(ele) {
                EventHandler.remove(ele, "mousedown", _this.columnMenuHandlerDown);
            });
        }, ColumnMenu.prototype.destroy = function() {
            this.columnMenu.destroy(), this.removeEventListener(), this.unwireFilterEvents(), 
            this.unwireEvents(), remove(this.element);
        }, ColumnMenu.prototype.columnMenuHandlerClick = function(e) {
            e.target.classList.contains("e-columnmenu") && (this.isOpen && this.headerCell !== this.getHeaderCell(e) || document.querySelector(".e-grid-menu .e-menu-parent.e-ul") ? (this.columnMenu.close(), 
            this.openColumnMenu(e)) : this.isOpen ? this.columnMenu.close() : this.openColumnMenu(e));
        }, ColumnMenu.prototype.openColumnMenu = function(e) {
            var pos = {
                top: 0,
                left: 0
            };
            this.element.style.cssText = "display:block;visibility:hidden";
            var elePos = this.element.getBoundingClientRect();
            this.element.style.cssText = "display:none;visibility:visible", this.headerCell = this.getHeaderCell(e), 
            Browser.isDevice ? (pos.top = window.innerHeight / 2 - elePos.height / 2, pos.left = window.innerWidth / 2 - elePos.width / 2) : this.parent.enableRtl ? pos = calculatePosition(this.headerCell, "left", "bottom") : (pos = calculatePosition(this.headerCell, "right", "bottom")).left -= elePos.width, 
            this.columnMenu.open(pos.top, pos.left), e.preventDefault();
        }, ColumnMenu.prototype.columnMenuHandlerDown = function(e) {
            this.isOpen = !("none" === this.element.style.display || "" === this.element.style.display);
        }, ColumnMenu.prototype.getColumnMenuHandlers = function() {
            return [].slice.call(this.parent.getHeaderTable().querySelectorAll("." + this.ROOT));
        }, ColumnMenu.prototype.addEventListener = function() {
            this.parent.isDestroyed || (this.parent.on(headerRefreshed, this.wireEvents, this), 
            this.parent.on(uiUpdate, this.enableAfterRenderMenu, this), this.parent.on(initialEnd, this.render, this), 
            this.isFilterItemAdded() && this.parent.on("filterDialogCreated", this.filterPosition, this), 
            this.parent.on(click, this.columnMenuHandlerClick, this));
        }, ColumnMenu.prototype.removeEventListener = function() {
            this.parent.isDestroyed || (this.parent.off(headerRefreshed, this.unwireEvents), 
            this.parent.off(uiUpdate, this.enableAfterRenderMenu), this.parent.off(initialEnd, this.render), 
            this.isFilterItemAdded() && this.parent.off("filterDialogCreated", this.filterPosition), 
            this.parent.off(click, this.columnMenuHandlerClick));
        }, ColumnMenu.prototype.enableAfterRenderMenu = function(e) {
            e.module === this.getModuleName() && e.enable && (this.columnMenu && (this.columnMenu.destroy(), 
            remove(this.element)), this.render());
        }, ColumnMenu.prototype.render = function() {
            this.l10n = this.serviceLocator.getService("localization"), this.element = createElement("ul", {
                id: this.gridID + "_columnmenu",
                className: "e-colmenu"
            }), this.parent.element.appendChild(this.element), this.columnMenu = new ContextMenu$1({
                cssClass: "e-grid-menu",
                enableRtl: this.parent.enableRtl,
                enablePersistence: this.parent.enablePersistence,
                locale: this.parent.locale,
                items: this.getItems(),
                select: this.columnMenuItemClick.bind(this),
                beforeOpen: this.columnMenuBeforeOpen.bind(this),
                onClose: this.columnMenuOnClose.bind(this),
                beforeItemRender: this.beforeMenuItemRender.bind(this),
                beforeClose: this.columnMenuBeforeClose.bind(this)
            }), this.columnMenu.appendTo(this.element), this.wireFilterEvents();
        }, ColumnMenu.prototype.wireFilterEvents = function() {
            !Browser.isDevice && this.isFilterItemAdded() && EventHandler.add(this.element, "mouseover", this.appendFilter, this);
        }, ColumnMenu.prototype.unwireFilterEvents = function() {
            !Browser.isDevice && this.isFilterItemAdded() && EventHandler.remove(this.element, "mouseover", this.appendFilter);
        }, ColumnMenu.prototype.beforeMenuItemRender = function(args) {
            if (this.isChooserItem(args.item)) {
                var field = this.getKeyFromId(args.item.id, this.CHOOSER), column = this.parent.getColumnByField(field), check = createCheckBox(!1, {
                    label: args.item.text,
                    checked: column.visible
                });
                this.parent.enableRtl && check.classList.add("e-rtl"), args.element.innerHTML = "", 
                args.element.appendChild(check);
            } else args.item.id && "Filter" === this.getKeyFromId(args.item.id) && (args.element.appendChild(createElement("span", {
                className: "e-icons e-caret"
            })), args.element.className += "e-filter-item e-menu-caret-icon");
        }, ColumnMenu.prototype.columnMenuBeforeClose = function(args) {
            var colChooser = args.event ? closest(args.event.target, ".e-menu-item") : null;
            !isNullOrUndefined(args.parentItem) && "ColumnChooser" === this.getKeyFromId(args.parentItem.id) && colChooser && this.isChooserItem(colChooser) ? args.cancel = !0 : args.event && (closest(args.event.target, "." + this.POP) || parentsUntil(args.event.target, "e-popup") || parentsUntil(args.event.target, "e-popup-wrapper")) && (args.cancel = !0);
        }, ColumnMenu.prototype.isChooserItem = function(item) {
            return item.id && item.id.indexOf("_colmenu_") >= 0 && -1 === this.getKeyFromId(item.id, this.CHOOSER).indexOf("_colmenu_");
        }, ColumnMenu.prototype.columnMenuBeforeOpen = function(args) {
            args.column = this.targetColumn = this.getColumn(), this.parent.trigger("columnMenuOpen", args);
            for (var _i = 0, _a = args.items; _i < _a.length; _i++) {
                var item = _a[_i], key = this.getKeyFromId(item.id), dItem = this.defaultItems[key];
                -1 !== this.getDefaultItems().indexOf(key) && (this.ensureDisabledStatus(key) && !dItem.hide ? this.disableItems.push(item.text) : item.hide && this.hiddenItems.push(item.text));
            }
            this.columnMenu.enableItems(this.disableItems, !1), this.columnMenu.hideItems(this.hiddenItems);
        }, ColumnMenu.prototype.ensureDisabledStatus = function(item) {
            var _this = this, status = !1;
            switch (item) {
              case "Group":
                (!this.parent.allowGrouping || this.parent.ensureModuleInjected(Group) && this.targetColumn && this.parent.groupSettings.columns.indexOf(this.targetColumn.field) >= 0) && (status = !0);
                break;

              case "AutoFitAll":
              case "AutoFit":
                status = !this.parent.ensureModuleInjected(Resize);
                break;

              case "Ungroup":
                (!this.parent.ensureModuleInjected(Group) || this.parent.ensureModuleInjected(Group) && this.targetColumn && this.parent.groupSettings.columns.indexOf(this.targetColumn.field) < 0) && (status = !0);
                break;

              case "SortDescending":
              case "SortAscending":
                this.parent.allowSorting && this.parent.ensureModuleInjected(Sort) && this.parent.sortSettings.columns.length > 0 && this.targetColumn ? this.parent.sortSettings.columns.forEach(function(ele) {
                    ele.field === _this.targetColumn.field && ele.direction.toLocaleLowerCase() === item.toLocaleLowerCase().replace("sort", "") && (status = !0);
                }) : this.parent.allowSorting && this.parent.ensureModuleInjected(Sort) || (status = !0);
                break;

              case "Filter":
                status = !(this.parent.allowFiltering && "FilterBar" !== this.parent.filterSettings.type && this.parent.ensureModuleInjected(Filter));
            }
            return status;
        }, ColumnMenu.prototype.columnMenuItemClick = function(args) {
            switch (this.isChooserItem(args.item) ? "ColumnChooser" : this.getKeyFromId(args.item.id)) {
              case "AutoFit":
                this.parent.autoFitColumns(this.targetColumn.field);
                break;

              case "AutoFitAll":
                this.parent.autoFitColumns([]);
                break;

              case "Ungroup":
                this.parent.ungroupColumn(this.targetColumn.field);
                break;

              case "Group":
                this.parent.groupColumn(this.targetColumn.field);
                break;

              case "SortAscending":
                this.parent.sortColumn(this.targetColumn.field, "Ascending");
                break;

              case "SortDescending":
                this.parent.sortColumn(this.targetColumn.field, "Descending");
                break;

              case "ColumnChooser":
                var key = this.getKeyFromId(args.item.id, this.CHOOSER), checkbox = args.element.querySelector(".e-checkbox-wrapper .e-frame");
                checkbox && checkbox.classList.contains("e-check") ? (checkbox.classList.remove("e-check"), 
                this.parent.hideColumns(key, "field")) : checkbox && (this.parent.showColumns(key, "field"), 
                checkbox.classList.add("e-check"));
                break;

              case "Filter":
                this.getFilter(args.element, args.item.id);
            }
            args.column = this.targetColumn, this.parent.trigger("columnMenuClick", args);
        }, ColumnMenu.prototype.columnMenuOnClose = function(args) {
            args.items.length > 0 && args.items[0].parentObj instanceof ContextMenu$1 && (this.columnMenu.enableItems(this.disableItems), 
            this.disableItems = [], this.columnMenu.showItems(this.hiddenItems), this.hiddenItems = [], 
            this.isFilterPopupOpen() && this.getFilter(args.element, args.element.id, !0));
        }, ColumnMenu.prototype.getDefaultItems = function() {
            return [ "AutoFitAll", "AutoFit", "SortAscending", "SortDescending", "Group", "Ungroup", "ColumnChooser", "Filter" ];
        }, ColumnMenu.prototype.getItems = function() {
            for (var items = [], _i = 0, defultItems_1 = this.parent.columnMenuItems ? this.parent.columnMenuItems : this.getDefault(); _i < defultItems_1.length; _i++) {
                var item = defultItems_1[_i];
                if ("string" == typeof item) if ("ColumnChooser" === item) {
                    var col = this.getDefaultItem(item);
                    col.items = this.createChooserItems(), items.push(col);
                } else items.push(this.getDefaultItem(item)); else items.push(item);
            }
            return items;
        }, ColumnMenu.prototype.getDefaultItem = function(item) {
            var menuItem = {};
            switch (item) {
              case "SortAscending":
                menuItem = {
                    iconCss: this.ASCENDING
                };
                break;

              case "SortDescending":
                menuItem = {
                    iconCss: this.DESCENDING
                };
                break;

              case "Group":
                menuItem = {
                    iconCss: this.GROUP
                };
                break;

              case "Ungroup":
                menuItem = {
                    iconCss: this.UNGROUP
                };
                break;

              case "Filter":
                menuItem = {
                    iconCss: this.FILTER
                };
            }
            return this.defaultItems[item] = {
                text: this.getLocaleText(item),
                id: this.generateID(item),
                iconCss: menuItem.iconCss ? "e-icons " + menuItem.iconCss : null
            }, this.defaultItems[item];
        }, ColumnMenu.prototype.getLocaleText = function(item) {
            return this.l10n.getConstant(this.localeText[item]);
        }, ColumnMenu.prototype.generateID = function(item, append$$1) {
            return this.gridID + "_colmenu_" + (append$$1 ? append$$1 + item : item);
        }, ColumnMenu.prototype.getKeyFromId = function(id, append$$1) {
            return id.indexOf("_colmenu_") > 0 && id.replace(this.gridID + "_colmenu_" + (append$$1 || ""), "");
        }, ColumnMenu.prototype.getColumnMenu = function() {
            return this.element;
        }, ColumnMenu.prototype.getModuleName = function() {
            return "columnMenu";
        }, ColumnMenu.prototype.setLocaleKey = function() {
            return {
                AutoFitAll: "autoFitAll",
                AutoFit: "autoFit",
                Group: "Group",
                Ungroup: "Ungroup",
                SortAscending: "SortAscending",
                SortDescending: "SortDescending",
                ColumnChooser: "Columnchooser",
                Filter: "FilterMenu"
            };
        }, ColumnMenu.prototype.getHeaderCell = function(e) {
            return closest(e.target, "th.e-headercell");
        }, ColumnMenu.prototype.getColumn = function() {
            if (this.headerCell) {
                var uid = this.headerCell.querySelector(".e-headercelldiv").getAttribute("e-mappinguid");
                return this.parent.getColumnByUid(uid);
            }
            return null;
        }, ColumnMenu.prototype.createChooserItems = function() {
            for (var items = [], _i = 0, _a = this.parent.getColumns(); _i < _a.length; _i++) {
                var col = _a[_i];
                col.showInColumnChooser && col.field && items.push({
                    id: this.generateID(col.field, this.CHOOSER),
                    text: col.headerText ? col.headerText : col.field
                });
            }
            return items;
        }, ColumnMenu.prototype.appendFilter = function(e) {
            if (this.defaultItems.Filter) {
                var key = this.defaultItems.Filter.id;
                closest(e.target, "#" + key) && !this.isFilterPopupOpen() ? this.getFilter(e.target, key) : !closest(e.target, "#" + key) && this.isFilterPopupOpen() && this.getFilter(e.target, key, !0);
            }
        }, ColumnMenu.prototype.getFilter = function(target, id, isClose) {
            var filterPopup = this.getFilterPop();
            filterPopup ? filterPopup.style.display = !Browser.isDevice && isClose ? "none" : "block" : this.parent.notify("filterOpen", {
                col: this.targetColumn,
                target: target,
                isClose: isClose,
                id: id
            });
        }, ColumnMenu.prototype.setPosition = function(li, ul) {
            var gridPos = this.parent.element.getBoundingClientRect(), liPos = li.getBoundingClientRect(), left = liPos.left - gridPos.left, top = liPos.top - gridPos.top;
            gridPos.height < top ? top = top - ul.offsetHeight + liPos.height : gridPos.height < top + ul.offsetHeight && (top = gridPos.height - ul.offsetHeight), 
            window.innerHeight < ul.offsetHeight + top + gridPos.top && (top = window.innerHeight - ul.offsetHeight - gridPos.top), 
            left += this.parent.enableRtl ? -ul.offsetWidth : liPos.width, gridPos.width <= left + ul.offsetWidth ? left -= liPos.width + ul.offsetWidth : left < 0 && (left += ul.offsetWidth + liPos.width), 
            ul.style.top = top + "px", ul.style.left = left + "px";
        }, ColumnMenu.prototype.filterPosition = function(e) {
            var filterPopup = this.getFilterPop();
            if (filterPopup.classList.add(this.WRAP), !Browser.isDevice) {
                var disp = filterPopup.style.display;
                filterPopup.style.cssText += "display:block;visibility:hidden";
                var li = this.element.querySelector("." + this.FILTER);
                li && (this.setPosition(li.parentElement, filterPopup), filterPopup.style.cssText += "display:" + disp + ";visibility:visible");
            }
        }, ColumnMenu.prototype.getDefault = function() {
            var items = [];
            return this.parent.ensureModuleInjected(Resize) && (items.push("AutoFitAll"), items.push("AutoFit")), 
            this.parent.allowGrouping && this.parent.ensureModuleInjected(Group) && (items.push("Group"), 
            items.push("Ungroup")), this.parent.allowSorting && this.parent.ensureModuleInjected(Sort) && (items.push("SortAscending"), 
            items.push("SortDescending")), items.push("ColumnChooser"), this.parent.allowFiltering && "FilterBar" !== this.parent.filterSettings.type && this.parent.ensureModuleInjected(Filter) && items.push("Filter"), 
            items;
        }, ColumnMenu.prototype.isFilterPopupOpen = function() {
            var filterPopup = this.getFilterPop();
            return filterPopup && "none" !== filterPopup.style.display;
        }, ColumnMenu.prototype.getFilterPop = function() {
            return this.parent.element.querySelector("." + this.POP);
        }, ColumnMenu.prototype.isFilterItemAdded = function() {
            return this.parent.columnMenuItems && this.parent.columnMenuItems.indexOf("Filter") >= 0 || !this.parent.columnMenuItems;
        }, ColumnMenu;
    }(), __extends$136 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), ForeignKey = function(_super) {
        function ForeignKey(parent, serviceLocator) {
            var _this = _super.call(this, parent, serviceLocator) || this;
            return _this.parent = parent, _this.serviceLocator = serviceLocator, _this.initEvent(), 
            _this;
        }
        return __extends$136(ForeignKey, _super), ForeignKey.prototype.initEvent = function() {
            this.parent.isDestroyed || (this.parent.on("initForeignKeyColumn", this.initForeignKeyColumns, this), 
            this.parent.on("getForeignKeyData", this.getForeignKeyData, this), this.parent.on("generateQuery", this.generateQueryFormData, this));
        }, ForeignKey.prototype.initForeignKeyColumns = function(columns) {
            columns.forEach(function(column) {
                column.dataSource = column.dataSource instanceof DataManager ? column.dataSource : isNullOrUndefined(column.dataSource) ? new DataManager() : new DataManager(column.dataSource);
            });
        }, ForeignKey.prototype.getForeignKeyData = function(args) {
            var _this = this, foreignColumns = args.column ? [ args.column ] : this.parent.getForeignKeyColumns(), allPromise = [];
            foreignColumns.forEach(function(col) {
                var promise, query = args.isComplex ? _this.genarateColumnQuery(col) : _this.genarateQuery(col, args.result.result, !1, !0), dataSource = col.dataSource;
                promise = !dataSource.ready || dataSource.dataSource.offline ? dataSource.executeQuery(query) : dataSource.ready.then(function() {
                    return dataSource.executeQuery(query);
                }), allPromise.push(promise);
            }), Promise.all(allPromise).then(function(responses) {
                responses.forEach(function(data, index) {
                    foreignColumns[index].columnData = data.result;
                }), args.promise.resolve(args.result);
            }).catch(function(e) {
                return args.promise && args.promise.reject && args.promise.reject(e), e;
            });
        }, ForeignKey.prototype.generateQueryFormData = function(args) {
            args.predicate.predicate = this.genarateQuery(args.column, args.column.columnData, !0);
        }, ForeignKey.prototype.genarateQuery = function(column, e, fromData, needQuery) {
            var gObj = this.parent, predicates = [], query = new Query();
            if (gObj.allowPaging || gObj.enableVirtualization || fromData) {
                e = new DataManager(gObj.allowGrouping && gObj.groupSettings.columns.length ? e.records : e).executeLocal(new Query().select(column.field));
                DataUtil.distinct(e, column.field, !1).forEach(function(obj) {
                    obj.getDay ? predicates.push(getDatePredicate({
                        field: column.field,
                        operator: "equal",
                        value: obj,
                        matchCase: !1
                    })) : predicates.push(new Predicate(column.field, "equal", obj, !1));
                });
            }
            return needQuery ? predicates.length ? query.where(Predicate.or(predicates)) : query : predicates.length ? Predicate.or(predicates) : {
                predicates: []
            };
        }, ForeignKey.prototype.genarateColumnQuery = function(column) {
            var gObj = this.parent, query = gObj.query.clone(), queryColumn = this.isFiltered(column);
            if (queryColumn.isTrue && (query = this.filterQuery(query, queryColumn.column, !0)), 
            gObj.searchSettings.key.length) {
                var sSettings = gObj.searchSettings;
                query.search(sSettings.key, column.foreignKeyValue, sSettings.operator, sSettings.ignoreCase);
            }
            return query;
        }, ForeignKey.prototype.isFiltered = function(column) {
            var filterColumn = this.parent.filterSettings.columns.filter(function(fColumn) {
                return fColumn.field === column.foreignKeyValue;
            });
            return {
                column: filterColumn,
                isTrue: !!filterColumn.length
            };
        }, ForeignKey.prototype.getModuleName = function() {
            return "foreignKey";
        }, ForeignKey.prototype.destroy = function() {
            _super.prototype.destroy.call(this), this.destroyEvent();
        }, ForeignKey.prototype.destroyEvent = function() {
            this.parent.isDestroyed || (this.parent.off("initForeignKeyColumn", this.initForeignKeyColumns), 
            this.parent.off("getForeignKeyData", this.getForeignKeyData), this.parent.off("generateQuery", this.generateQueryFormData));
        }, ForeignKey;
    }(Data$1), __extends$138 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$54 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, Font$3 = function(_super) {
        function Font() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$138(Font, _super), __decorate$54([ Property("16px") ], Font.prototype, "size", void 0), 
        __decorate$54([ Property("") ], Font.prototype, "color", void 0), __decorate$54([ Property("Segoe UI") ], Font.prototype, "fontFamily", void 0), 
        __decorate$54([ Property("Regular") ], Font.prototype, "fontWeight", void 0), __decorate$54([ Property("Normal") ], Font.prototype, "fontStyle", void 0), 
        __decorate$54([ Property(1) ], Font.prototype, "opacity", void 0), Font;
    }(ChildProperty), Margin$2 = function(_super) {
        function Margin() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$138(Margin, _super), __decorate$54([ Property(10) ], Margin.prototype, "left", void 0), 
        __decorate$54([ Property(10) ], Margin.prototype, "right", void 0), __decorate$54([ Property(10) ], Margin.prototype, "top", void 0), 
        __decorate$54([ Property(10) ], Margin.prototype, "bottom", void 0), Margin;
    }(ChildProperty), Border$3 = function(_super) {
        function Border() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$138(Border, _super), __decorate$54([ Property(null) ], Border.prototype, "color", void 0), 
        __decorate$54([ Property(0) ], Border.prototype, "width", void 0), Border;
    }(ChildProperty), Annotation$1 = function(_super) {
        function Annotation() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$138(Annotation, _super), __decorate$54([ Property("") ], Annotation.prototype, "content", void 0), 
        __decorate$54([ Property(0) ], Annotation.prototype, "x", void 0), __decorate$54([ Property(0) ], Annotation.prototype, "y", void 0), 
        __decorate$54([ Property("None") ], Annotation.prototype, "verticalAlignment", void 0), 
        __decorate$54([ Property("None") ], Annotation.prototype, "horizontalAlignment", void 0), 
        __decorate$54([ Property("-1") ], Annotation.prototype, "zIndex", void 0), __decorate$54([ Complex({
            size: "12px",
            color: null
        }, Font$3) ], Annotation.prototype, "font", void 0), __decorate$54([ Property(null) ], Annotation.prototype, "axisIndex", void 0), 
        __decorate$54([ Property(null) ], Annotation.prototype, "axisValue", void 0), Annotation;
    }(ChildProperty), Container = function(_super) {
        function Container() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$138(Container, _super), __decorate$54([ Property("Normal") ], Container.prototype, "type", void 0), 
        __decorate$54([ Property(0) ], Container.prototype, "height", void 0), __decorate$54([ Property(0) ], Container.prototype, "width", void 0), 
        __decorate$54([ Property(10) ], Container.prototype, "roundedCornerRadius", void 0), 
        __decorate$54([ Property("transparent") ], Container.prototype, "backgroundColor", void 0), 
        __decorate$54([ Complex({
            width: 1,
            color: "#bfbfbf"
        }, Border$3) ], Container.prototype, "border", void 0), __decorate$54([ Property(0) ], Container.prototype, "offset", void 0), 
        Container;
    }(ChildProperty), TooltipSettings$2 = function(_super) {
        function TooltipSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$138(TooltipSettings, _super), __decorate$54([ Property(!1) ], TooltipSettings.prototype, "enable", void 0), 
        __decorate$54([ Property("#FFFFFF") ], TooltipSettings.prototype, "fill", void 0), 
        __decorate$54([ Complex({
            color: "#686868",
            size: "13px"
        }, Font$3) ], TooltipSettings.prototype, "textStyle", void 0), __decorate$54([ Property(null) ], TooltipSettings.prototype, "format", void 0), 
        __decorate$54([ Property(null) ], TooltipSettings.prototype, "template", void 0), 
        __decorate$54([ Property(!0) ], TooltipSettings.prototype, "enableAnimation", void 0), 
        __decorate$54([ Complex({
            color: "black",
            width: 2
        }, Border$3) ], TooltipSettings.prototype, "border", void 0), TooltipSettings;
    }(ChildProperty), __extends$139 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$55 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, Line$1 = function(_super) {
        function Line() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$139(Line, _super), __decorate$55([ Property("") ], Line.prototype, "dashArray", void 0), 
        __decorate$55([ Property(null) ], Line.prototype, "height", void 0), __decorate$55([ Property(2) ], Line.prototype, "width", void 0), 
        __decorate$55([ Property(null) ], Line.prototype, "color", void 0), __decorate$55([ Property(0) ], Line.prototype, "offset", void 0), 
        Line;
    }(ChildProperty), Label$1 = function(_super) {
        function Label() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$139(Label, _super), __decorate$55([ Complex({
            size: "12px",
            color: null
        }, Font$3) ], Label.prototype, "font", void 0), __decorate$55([ Property(!1) ], Label.prototype, "useRangeColor", void 0), 
        __decorate$55([ Property("") ], Label.prototype, "format", void 0), __decorate$55([ Property(0) ], Label.prototype, "offset", void 0), 
        Label;
    }(ChildProperty), Range$1 = function(_super) {
        function Range() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$139(Range, _super), __decorate$55([ Property(null) ], Range.prototype, "start", void 0), 
        __decorate$55([ Property(null) ], Range.prototype, "end", void 0), __decorate$55([ Property("Outside") ], Range.prototype, "position", void 0), 
        __decorate$55([ Property("") ], Range.prototype, "color", void 0), __decorate$55([ Property(10) ], Range.prototype, "startWidth", void 0), 
        __decorate$55([ Property(10) ], Range.prototype, "endWidth", void 0), __decorate$55([ Property(0) ], Range.prototype, "offset", void 0), 
        __decorate$55([ Complex({
            color: "#000000",
            width: 0
        }, Border$3) ], Range.prototype, "border", void 0), Range;
    }(ChildProperty), Tick$1 = function(_super) {
        function Tick() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$139(Tick, _super), __decorate$55([ Property(20) ], Tick.prototype, "height", void 0), 
        __decorate$55([ Property(2) ], Tick.prototype, "width", void 0), __decorate$55([ Property(null) ], Tick.prototype, "interval", void 0), 
        __decorate$55([ Property(null) ], Tick.prototype, "color", void 0), __decorate$55([ Property(null) ], Tick.prototype, "offset", void 0), 
        Tick;
    }(ChildProperty), Pointer$1 = function(_super) {
        function Pointer() {
            var _this = null !== _super && _super.apply(this, arguments) || this;
            return _this.animationComplete = !0, _this.currentValue = null, _this;
        }
        return __extends$139(Pointer, _super), __decorate$55([ Property("Marker") ], Pointer.prototype, "type", void 0), 
        __decorate$55([ Property(null) ], Pointer.prototype, "value", void 0), __decorate$55([ Property("InvertedTriangle") ], Pointer.prototype, "markerType", void 0), 
        __decorate$55([ Property(null) ], Pointer.prototype, "imageUrl", void 0), __decorate$55([ Complex({
            color: "#808080"
        }, Border$3) ], Pointer.prototype, "border", void 0), __decorate$55([ Property(10) ], Pointer.prototype, "roundedCornerRadius", void 0), 
        __decorate$55([ Property("Far") ], Pointer.prototype, "placement", void 0), __decorate$55([ Property(20) ], Pointer.prototype, "height", void 0), 
        __decorate$55([ Property(20) ], Pointer.prototype, "width", void 0), __decorate$55([ Property(null) ], Pointer.prototype, "color", void 0), 
        __decorate$55([ Property(1) ], Pointer.prototype, "opacity", void 0), __decorate$55([ Property(0) ], Pointer.prototype, "animationDuration", void 0), 
        __decorate$55([ Property(!1) ], Pointer.prototype, "enableDrag", void 0), __decorate$55([ Property(0) ], Pointer.prototype, "offset", void 0), 
        __decorate$55([ Property(null) ], Pointer.prototype, "description", void 0), Pointer;
    }(ChildProperty), Axis$2 = function(_super) {
        function Axis() {
            var _this = null !== _super && _super.apply(this, arguments) || this;
            return _this.visibleLabels = [], _this;
        }
        return __extends$139(Axis, _super), __decorate$55([ Property(0) ], Axis.prototype, "minimum", void 0), 
        __decorate$55([ Property(100) ], Axis.prototype, "maximum", void 0), __decorate$55([ Property(!1) ], Axis.prototype, "isInversed", void 0), 
        __decorate$55([ Property(!1) ], Axis.prototype, "opposedPosition", void 0), __decorate$55([ Complex({}, Line$1) ], Axis.prototype, "line", void 0), 
        __decorate$55([ Collection([ {} ], Range$1) ], Axis.prototype, "ranges", void 0), 
        __decorate$55([ Collection([ {} ], Pointer$1) ], Axis.prototype, "pointers", void 0), 
        __decorate$55([ Complex({
            width: 2,
            height: 20
        }, Tick$1) ], Axis.prototype, "majorTicks", void 0), __decorate$55([ Complex({
            width: 1,
            height: 10
        }, Tick$1) ], Axis.prototype, "minorTicks", void 0), __decorate$55([ Complex({}, Label$1) ], Axis.prototype, "labelStyle", void 0), 
        Axis;
    }(ChildProperty), __extends$140 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), VisibleRange = function() {
        return function(min, max, interval, delta) {
            this.min = min, this.max = max, this.interval = interval, this.delta = delta;
        };
    }(), GaugeLocation$1 = function() {
        return function(x, y) {
            this.x = x, this.y = y;
        };
    }(), Size$2 = function() {
        return function(width, height) {
            this.width = width, this.height = height;
        };
    }(), Rect$2 = function() {
        return function(x, y, width, height) {
            this.x = x, this.y = y, this.width = width, this.height = height;
        };
    }(), CustomizeOption$2 = function() {
        return function(id) {
            this.id = id;
        };
    }(), PathOption$2 = function(_super) {
        function PathOption(id, fill, width, color, opacity, dashArray, d, transform) {
            void 0 === transform && (transform = "");
            var _this = _super.call(this, id) || this;
            return _this.opacity = opacity, _this.fill = fill, _this.stroke = color, _this["stroke-width"] = width, 
            _this["stroke-dasharray"] = dashArray, _this.d = d, _this.transform = transform, 
            _this;
        }
        return __extends$140(PathOption, _super), PathOption;
    }(CustomizeOption$2), RectOption$2 = function() {
        return function(id, fill, border, opacity, rect, transform, dashArray) {
            this.opacity = opacity, this.id = id, this.y = rect.y, this.x = rect.x, this.fill = fill, 
            this.stroke = border.color, this["stroke-width"] = border.width, this.height = rect.height, 
            this.width = rect.width;
        };
    }(), TextOption$2 = function(_super) {
        function TextOption(id, x, y, anchor, text, transform, baseLine) {
            void 0 === transform && (transform = "");
            var _this = _super.call(this, id) || this;
            return _this.transform = "", _this.baseLine = "auto", _this.x = x, _this.y = y, 
            _this.anchor = anchor, _this.text = text, _this.transform = transform, _this.baseLine = baseLine, 
            _this;
        }
        return __extends$140(TextOption, _super), TextOption;
    }(CustomizeOption$2), VisibleLabels$2 = function() {
        return function(text, value, size) {
            this.text = text, this.value = value, this.size = size;
        };
    }(), Align = function() {
        return function(axisIndex, align) {
            this.align = align, this.axisIndex = axisIndex;
        };
    }(), AxisLayoutPanel$1 = function() {
        function AxisLayoutPanel(gauge) {
            this.gauge = gauge;
        }
        return AxisLayoutPanel.prototype.calculateAxesBounds = function() {
            var axis, bounds;
            this.gauge.nearSizes = [], this.gauge.farSizes = [];
            var x, y, width, height;
            this.gauge.containerBounds;
            this.checkThermometer();
            for (var i = 0; i < this.gauge.axes.length; i++) (axis = this.gauge.axes[i]).checkAlign = new Align(i, axis.opposedPosition ? "Far" : "Near"), 
            axis.opposedPosition ? this.gauge.farSizes.push(1) : this.gauge.nearSizes.push(1), 
            this.calculateLineBounds(axis, i), this.calculateTickBounds(axis, i), this.calculateLabelBounds(axis, i), 
            axis.pointers.length > 0 && this.calculatePointerBounds(axis, i), axis.ranges.length > 0 && this.calculateRangesBounds(axis, i), 
            bounds = axis.labelBounds, "Vertical" === this.gauge.orientation ? (x = axis.opposedPosition ? axis.lineBounds.x : bounds.x - 8, 
            y = axis.lineBounds.y, height = axis.lineBounds.height, width = Math.abs(axis.opposedPosition ? bounds.x + bounds.width + 8 - x : axis.lineBounds.x - x)) : (y = axis.opposedPosition ? axis.lineBounds.y : bounds.y - bounds.height - 8, 
            x = axis.lineBounds.x, width = axis.lineBounds.width, height = Math.abs(axis.opposedPosition ? bounds.y + 8 - y : Math.abs(axis.lineBounds.y - y))), 
            axis.bounds = new Rect$2(x, y, width, height);
        }, AxisLayoutPanel.prototype.calculateLineBounds = function(axis, axisIndex) {
            var x, y, width, height, index, prevAxis, lineHeight = axis.line.height, orientation = this.gauge.orientation, containerRect = this.gauge.containerBounds;
            lineHeight = axis.line.width > 0 ? lineHeight : null, "Vertical" === orientation ? (y = isNullOrUndefined(lineHeight) ? containerRect.y : containerRect.y + (containerRect.height / 2 - lineHeight / 2), 
            width = axis.line.width, height = isNullOrUndefined(lineHeight) ? containerRect.height : lineHeight) : (x = isNullOrUndefined(lineHeight) ? containerRect.x : containerRect.x + (containerRect.width / 2 - lineHeight / 2), 
            height = axis.line.width, width = isNullOrUndefined(lineHeight) ? containerRect.width : lineHeight), 
            isNullOrUndefined(index = this.checkPreviousAxes(axis, axisIndex)) ? "Vertical" === orientation ? x = (axis.opposedPosition ? containerRect.x + containerRect.width : containerRect.x) + axis.line.offset : y = (axis.opposedPosition ? containerRect.y + containerRect.height : containerRect.y) + axis.line.offset : (prevAxis = this.gauge.axes[index], 
            "Vertical" === orientation ? x = (axis.opposedPosition ? prevAxis.bounds.x + prevAxis.bounds.width : prevAxis.bounds.x) + axis.line.offset : y = (axis.opposedPosition ? prevAxis.bounds.y + prevAxis.bounds.height : prevAxis.bounds.y) + axis.line.offset), 
            axis.lineBounds = new Rect$2(x, y, width, height);
        }, AxisLayoutPanel.prototype.calculateTickBounds = function(axis, axisIndex) {
            var x, y, major, minor, min = Math.min(axis.minimum, axis.maximum), max = Math.max(axis.minimum, axis.maximum);
            min = min === max ? max - 1 : min;
            axis.majorTicks.interval;
            var bounds = axis.lineBounds;
            major = axis.majorTicks, minor = axis.minorTicks, axis.majorInterval = major.interval, 
            axis.minorInterval = minor.interval;
            var size = "Vertical" === this.gauge.orientation ? bounds.height : bounds.width, lineSize = ("Vertical" === this.gauge.orientation ? bounds.width : bounds.height) / 2;
            axis.majorInterval = isNullOrUndefined(axis.majorInterval) ? calculateNiceInterval(min, max, size, this.gauge.orientation) : major.interval, 
            axis.visibleRange = new VisibleRange(min, max, axis.majorInterval, max - min), axis.minorInterval = isNullOrUndefined(axis.minorInterval) ? axis.majorInterval / 2 : axis.minorInterval, 
            "Vertical" === this.gauge.orientation ? (x = (axis.opposedPosition ? bounds.x + lineSize : bounds.x - lineSize - major.height) + major.offset, 
            axis.majorTickBounds = new Rect$2(x, bounds.y, major.height, bounds.height), x = (axis.opposedPosition ? bounds.x + lineSize : bounds.x - lineSize - minor.height) + minor.offset, 
            axis.minorTickBounds = new Rect$2(x, bounds.y, minor.height, bounds.height)) : (y = (axis.opposedPosition ? bounds.y + lineSize : bounds.y - lineSize - major.height) + major.offset, 
            axis.majorTickBounds = new Rect$2(bounds.x, y, bounds.width, major.height), y = (axis.opposedPosition ? bounds.y + lineSize : bounds.y - lineSize - minor.height) + minor.offset, 
            axis.minorTickBounds = new Rect$2(bounds.x, y, bounds.width, minor.height));
        }, AxisLayoutPanel.prototype.calculateLabelBounds = function(axis, axisIndex) {
            var x, y, width, height, bounds = axis.majorTickBounds, offset = axis.labelStyle.offset;
            this.calculateVisibleLabels(axis), width = axis.maxLabelSize.width, height = axis.maxLabelSize.height / 2, 
            "Vertical" === this.gauge.orientation ? (x = (axis.opposedPosition ? bounds.x + bounds.width + 5 : bounds.x - width - 5) + offset, 
            y = axis.lineBounds.y) : (y = (axis.opposedPosition ? bounds.y + bounds.height + 5 + height : bounds.y - 5) + offset, 
            x = axis.lineBounds.x), axis.labelBounds = new Rect$2(x, y, width, height);
        }, AxisLayoutPanel.prototype.calculatePointerBounds = function(axis, axisIndex) {
            for (var pointer, range = axis.visibleRange, minimumValue = (this.gauge.orientation, 
            axis.lineBounds, axis.labelBounds, Math.min(range.min, range.max)), maximumValue = Math.max(range.min, range.max), i = 0; i < axis.pointers.length; i++) (pointer = axis.pointers[i]).currentValue = null !== pointer.value ? pointer.value < minimumValue ? minimumValue : pointer.value > maximumValue ? maximumValue : pointer.value : minimumValue, 
            pointer.width > 0 && withInRange$1(pointer.currentValue, null, null, range.max, range.min, "pointer") && this["calculate" + pointer.type + "Bounds"](axisIndex, axis, i, pointer);
        }, AxisLayoutPanel.prototype.calculateMarkerBounds = function(axisIndex, axis, pointerIndex, pointer) {
            var x, y, line = axis.lineBounds, offset = pointer.offset, range = axis.visibleRange, placement = pointer.placement, tick = axis.majorTickBounds, label = axis.labelBounds, border = pointer.border.width;
            "Vertical" === this.gauge.orientation ? (x = axis.opposedPosition ? "Far" === placement ? label.x + label.width : "Center" === placement ? tick.x + tick.width : line.x : "Near" === placement ? label.x : "Center" === placement ? tick.x : line.x, 
            x = axis.opposedPosition ? ("Near" === pointer.placement ? x - border : x + border) + offset : ("Far" === pointer.placement ? x + border : x - border) + offset, 
            y = valueToCoefficient$1(pointer.currentValue, axis, this.gauge.orientation, range) * line.height + line.y) : (y = axis.opposedPosition ? "Far" === placement ? label.y : "Center" === placement ? tick.y + tick.height : line.y : "Near" === placement ? label.y - label.height : "Center" === placement ? tick.y : line.y, 
            y = axis.opposedPosition ? ("Near" === pointer.placement ? y - border : y + border) + offset : ("Far" === pointer.placement ? y + border : y - border) + offset, 
            x = valueToCoefficient$1(pointer.currentValue, axis, this.gauge.orientation, range) * line.width + line.x), 
            pointer.bounds = new Rect$2(x, y, pointer.width, pointer.height);
        }, AxisLayoutPanel.prototype.calculateBarBounds = function(axisIndex, axis, pointerIndex, pointer) {
            var x1, x2, y1, y2, height, width, line = axis.lineBounds, range = axis.visibleRange, orientation = this.gauge.orientation, offset = pointer.offset, container = this.gauge.containerBounds;
            "Vertical" === orientation ? (x1 = container.width > 0 ? container.x + (container.width / 2 - pointer.width / 2) : axis.opposedPosition ? line.x - pointer.width - 10 : line.x + 10, 
            x1 += offset, y1 = valueToCoefficient$1(pointer.currentValue, axis, orientation, range) * line.height + line.y, 
            y2 = valueToCoefficient$1(range.min, axis, orientation, range) * line.height + line.y, 
            height = Math.abs(y2 - y1), y1 = axis.isInversed ? y2 : y1, width = pointer.width) : (x1 = valueToCoefficient$1(range.min, axis, orientation, range) * line.width + line.x, 
            y1 = container.height > 0 ? container.y + container.height / 2 - pointer.height / 2 : axis.opposedPosition ? line.y - pointer.height - 10 : line.y + 10, 
            y1 += offset, height = pointer.height, x2 = valueToCoefficient$1(pointer.currentValue, axis, orientation, range) * line.width + line.x, 
            width = Math.abs(x2 - x1), x1 = axis.isInversed ? x2 : x1), pointer.bounds = new Rect$2(x1, y1, width, height);
        }, AxisLayoutPanel.prototype.calculateRangesBounds = function(axis, axisIndex) {
            for (var range, start, end, startVal, endVal, pointX, pointY, width, height, position, startWidth, endWidth, colors, line = axis.lineBounds, visibleRange = axis.visibleRange, orientation = this.gauge.orientation, i = 0; i < axis.ranges.length; i++) withInRange$1(null, (range = axis.ranges[i]).start, range.end, visibleRange.max, visibleRange.min, "range") && (start = Math.min(range.start, range.end), 
            end = Math.max(range.start, range.end), position = range.position, startWidth = range.startWidth, 
            endWidth = range.endWidth, colors = this.gauge.rangePalettes.length ? this.gauge.rangePalettes : [ "#ff5985", "#ffb133", "#fcde0b", "#27d5ff", "#50c917" ], 
            range.interior = range.color ? range.color : colors[i % colors.length], "Vertical" === this.gauge.orientation ? (pointX = line.x + range.offset, 
            pointY = valueToCoefficient$1(end, axis, orientation, visibleRange) * line.height + line.y, 
            height = valueToCoefficient$1(start, axis, orientation, visibleRange) * line.height + line.y, 
            height -= pointY, startVal = axis.opposedPosition ? "Inside" === position ? pointX - startWidth : pointX + startWidth : "Inside" === position ? pointX + startWidth : pointX - startWidth, 
            endVal = axis.opposedPosition ? "Inside" === position ? pointX - endWidth : pointX + endWidth : "Inside" === position ? pointX + endWidth : pointX - endWidth, 
            range.path = "M" + pointX + " " + pointY + " L " + pointX + " " + (pointY + height) + " L " + startVal + " " + (pointY + height) + " L " + endVal + " " + pointY + " L " + pointX + " " + pointY + " z ") : (pointX = valueToCoefficient$1(end, axis, orientation, visibleRange) * line.width + line.x, 
            pointY = axis.lineBounds.y + range.offset, width = pointX - (width = valueToCoefficient$1(start, axis, orientation, visibleRange) * line.width + line.x), 
            startVal = axis.opposedPosition ? "Inside" === position ? pointY - startWidth : pointY + startWidth : "Inside" === position ? pointY + startWidth : pointY - startWidth, 
            endVal = axis.opposedPosition ? "Inside" === position ? pointY - endWidth : pointY + endWidth : "Inside" === position ? pointY + endWidth : pointY - endWidth, 
            range.path = "M" + pointX + " " + pointY + " L " + (pointX - width) + " " + pointY + " L " + (pointX - width) + " " + startVal + " L " + pointX + " " + endVal + " L " + pointX + " " + pointY + " z "));
        }, AxisLayoutPanel.prototype.checkPreviousAxes = function(currentAxis, axisIndex) {
            var index = axisIndex - 1;
            return index = index >= 0 ? this.gauge.axes[index].checkAlign.align === currentAxis.checkAlign.align ? index : this.checkPreviousAxes(currentAxis, index) : null;
        }, AxisLayoutPanel.prototype.calculateVisibleLabels = function(axis) {
            axis.visibleLabels = [];
            var format, argsData, labelSize, min = axis.visibleRange.min, max = axis.visibleRange.max, interval = axis.visibleRange.interval, style = axis.labelStyle, customLabelFormat = style.format && null !== style.format.match("{value}");
            format = this.gauge.intl.getNumberFormat({
                format: getLabelFormat$1(style.format),
                useGrouping: this.gauge.useGroupingSeparator
            });
            for (var i = min; i <= max && interval > 0; i += interval) argsData = {
                cancel: !1,
                name: "axisLabelRender",
                axis: axis,
                text: customLabelFormat ? style.format.replace(new RegExp("{value}", "g"), format(i)) : format(i),
                value: i
            }, this.gauge.trigger("axisLabelRender", argsData), labelSize = measureText$2(argsData.text, axis.labelStyle.font), 
            argsData.cancel || axis.visibleLabels.push(new VisibleLabels$2(argsData.text, i, labelSize));
            this.getMaxLabelWidth(this.gauge, axis);
        }, AxisLayoutPanel.prototype.getMaxLabelWidth = function(gauge, axis) {
            axis.maxLabelSize = new Size$2(0, 0);
            for (var label, i = 0; i < axis.visibleLabels.length; i++) (label = axis.visibleLabels[i]).size = measureText$2(label.text, axis.labelStyle.font), 
            label.size.width > axis.maxLabelSize.width && (axis.maxLabelSize.width = label.size.width), 
            label.size.height > axis.maxLabelSize.height && (axis.maxLabelSize.height = label.size.height);
        }, AxisLayoutPanel.prototype.checkThermometer = function() {
            "Thermometer" === this.gauge.container.type && this.gauge.axes.map(function(axis, index) {
                axis.isInversed && axis.pointers.map(function(pointer, index) {
                    "Bar" === pointer.type && (axis.isInversed = !1);
                });
            });
        }, AxisLayoutPanel;
    }(), Animations = function() {
        function Animations(gauge) {
            this.gauge = gauge;
        }
        return Animations.prototype.performMarkerAnimation = function(element, axis, pointer) {
            var options, timeStamp, _this = this, markerElement = element, range = axis.visibleRange, rectHeight = "Vertical" === this.gauge.orientation ? axis.lineBounds.height : axis.lineBounds.width, rectY = "Vertical" === this.gauge.orientation ? axis.lineBounds.y : axis.lineBounds.x;
            "Vertical" === this.gauge.orientation ? pointer.bounds.y = valueToCoefficient$1(pointer.currentValue, axis, this.gauge.orientation, range) * rectHeight + rectY : pointer.bounds.x = valueToCoefficient$1(pointer.currentValue, axis, this.gauge.orientation, range) * rectHeight + rectY, 
            options = new PathOption$2(markerElement.id, null, null, null), options = calculateShapes$2(pointer.bounds, pointer.markerType, new Size$2(pointer.width, pointer.height), pointer.imageUrl, options, this.gauge.orientation, axis, pointer);
            var currentValue, start = pointer.startValue, end = pointer.currentValue;
            start = start === end ? range.min : start;
            var val = Math.abs(start - end), currentPath = options.d;
            new Animation({}).animate(markerElement, {
                duration: pointer.animationDuration,
                progress: function(args) {
                    args.timeStamp >= args.delay && (timeStamp = (args.timeStamp - args.delay) / args.duration, 
                    currentValue = start < end ? start + timeStamp * val : start - timeStamp * val, 
                    "Vertical" === _this.gauge.orientation ? pointer.bounds.y = valueToCoefficient$1(currentValue, axis, _this.gauge.orientation, range) * rectHeight + rectY : pointer.bounds.x = valueToCoefficient$1(currentValue, axis, _this.gauge.orientation, range) * rectHeight + rectY, 
                    options = calculateShapes$2(pointer.bounds, pointer.markerType, new Size$2(pointer.width, pointer.height), pointer.imageUrl, options, _this.gauge.orientation, axis, pointer), 
                    markerElement.setAttribute("d", options.d));
                },
                end: function(model) {
                    markerElement.setAttribute("d", currentPath), pointer.startValue = pointer.currentValue, 
                    pointer.animationComplete = !0, _this.gauge.trigger("animationComplete", {
                        axis: axis,
                        pointer: pointer
                    });
                }
            });
        }, Animations.prototype.performBarAnimation = function(element, axis, pointer) {
            var val, timeStamp, value2, value1, clipHeight, clipY, clipX, clipVal, rectHeight, rectY, clipWidth, currentHeight, clipElement, _this = this, range = axis.visibleRange, pointerElement = element, lineHeight = "Vertical" === this.gauge.orientation ? axis.lineBounds.height : axis.lineBounds.width, lineY = "Vertical" === this.gauge.orientation ? axis.lineBounds.y : axis.lineBounds.x, start = (new Size$2(this.gauge.availableSize.width, this.gauge.availableSize.height), 
            pointer.startValue), end = pointer.currentValue;
            start = start === end ? range.min : start;
            var path = "", currentPath = "", tagName = pointerElement.tagName;
            val = Math.abs(start - end);
            var pointerValue = valueToCoefficient$1(end, axis, this.gauge.orientation, range) * lineHeight + lineY, startPointerVal = valueToCoefficient$1(range.min, axis, this.gauge.orientation, range) * lineHeight + lineY;
            rectY = "Vertical" === this.gauge.orientation ? axis.isInversed ? startPointerVal : pointerValue : axis.isInversed ? pointerValue : startPointerVal, 
            rectHeight = Math.abs(startPointerVal - pointerValue), "Thermometer" === this.gauge.container.type && 0 === start && (clipElement = pointerElement.parentElement.childNodes[1].childNodes[0].childNodes[0], 
            "Vertical" === this.gauge.orientation ? (clipY = clipElement.getAttribute("y"), 
            clipHeight = clipElement.getAttribute("height"), clipVal = parseInt(clipY, 10) + parseInt(clipHeight, 10), 
            clipElement.setAttribute("y", clipVal.toString())) : (clipX = clipElement.getAttribute("x"), 
            clipWidth = clipElement.getAttribute("width"), clipVal = parseInt(clipX, 10) + parseInt(clipWidth, 10), 
            clipElement.setAttribute("width", "0"))), path = getBox(pointer.bounds, this.gauge.container.type, this.gauge.orientation, new Size$2(pointer.bounds.width, pointer.bounds.height), "bar", this.gauge.container.width, axis, pointer.roundedCornerRadius), 
            new Animation({}).animate(pointerElement, {
                duration: pointer.animationDuration,
                progress: function(animate) {
                    animate.timeStamp >= animate.delay && (timeStamp = (animate.timeStamp - animate.delay) / animate.duration, 
                    value2 = valueToCoefficient$1(start < end ? start + timeStamp * val : start - timeStamp * val, axis, _this.gauge.orientation, range) * lineHeight + lineY, 
                    value1 = valueToCoefficient$1(range.min, axis, _this.gauge.orientation, range) * lineHeight + lineY, 
                    currentHeight = Math.abs(value2 - value1), "Vertical" === _this.gauge.orientation ? (pointer.bounds.y = axis.isInversed ? value1 : value2, 
                    pointer.bounds.height = currentHeight) : (pointer.bounds.x = axis.isInversed ? value2 : value1, 
                    pointer.bounds.width = currentHeight), "path" === tagName ? (0 === start && "Thermometer" === _this.gauge.container.type && ("Vertical" === _this.gauge.orientation ? clipElement.setAttribute("y", (clipVal - timeStamp * parseInt(clipHeight, 10)).toString()) : clipElement.setAttribute("width", (timeStamp * parseInt(clipWidth, 10)).toString())), 
                    currentPath = getBox(pointer.bounds, _this.gauge.container.type, _this.gauge.orientation, new Size$2(pointer.bounds.width, pointer.bounds.height), "bar", _this.gauge.container.width, axis, pointer.roundedCornerRadius), 
                    pointerElement.setAttribute("d", currentPath)) : "Vertical" === _this.gauge.orientation ? (pointerElement.setAttribute("y", pointer.bounds.y.toString()), 
                    pointerElement.setAttribute("height", pointer.bounds.height.toString())) : (pointerElement.setAttribute("x", pointer.bounds.x.toString()), 
                    pointerElement.setAttribute("width", pointer.bounds.width.toString())));
                },
                end: function(model) {
                    "path" === tagName ? 0 === start && "Thermometer" === _this.gauge.container.type ? pointerElement.parentElement.children[1].remove() : pointerElement.setAttribute("d", path) : "Vertical" === _this.gauge.orientation ? (pointerElement.setAttribute("y", rectY.toString()), 
                    pointerElement.setAttribute("height", rectHeight.toString())) : (pointerElement.setAttribute("x", rectY.toString()), 
                    pointerElement.setAttribute("width", rectHeight.toString())), pointer.startValue = pointer.currentValue, 
                    _this.gauge.trigger("animationComplete", {
                        axis: axis,
                        pointer: pointer
                    });
                }
            });
        }, Animations;
    }(), __extends$141 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), AxisRenderer$1 = function(_super) {
        function AxisRenderer(gauge) {
            return _super.call(this, gauge) || this;
        }
        return __extends$141(AxisRenderer, _super), AxisRenderer.prototype.renderAxes = function() {
            var axis, major, minor, _this = this;
            this.axisElements = [], this.axisObject = this.gauge.renderer.createGroup({
                id: this.gauge.element.id + "_Axis_Collections",
                transform: "translate( 0, 0 )"
            });
            for (var i = 0; i < this.gauge.axes.length; i++) major = (axis = this.gauge.axes[i]).majorTicks, 
            minor = axis.minorTicks, this.htmlObject = this.gauge.renderer.createGroup({
                id: this.gauge.element.id + "_Axis_Group_" + i
            }), this.drawAxisLine(axis, this.htmlObject, i), this.drawRanges(axis, this.htmlObject, i), 
            this.drawTicks(axis, major, this.htmlObject, "MajorTicks", axis.majorTickBounds), 
            this.drawTicks(axis, minor, this.htmlObject, "MinorTicks", axis.minorTickBounds), 
            this.drawAxisLabels(axis, this.htmlObject), this.drawPointers(axis, this.htmlObject, i), 
            this.axisElements.push(this.htmlObject);
            this.axisElements.forEach(function(axisElement) {
                _this.axisObject.appendChild(axisElement);
            }), this.gauge.svgObject.appendChild(this.axisObject), this.gauge.nearSizes.length !== this.gauge.farSizes.length && this.gauge.axes.length > 1 && this.axisAlign(this.gauge.axes);
        }, AxisRenderer.prototype.axisAlign = function(axes) {
            var tranX, transY, nearAxisWidth = 0, farAxisWidth = 0;
            "Vertical" === this.gauge.orientation ? (axes.forEach(function(axis, axisIndex) {
                axis.opposedPosition ? farAxisWidth += axis.bounds.width : nearAxisWidth += axis.bounds.width;
            }), nearAxisWidth += this.gauge.containerBounds.width / 2, farAxisWidth += this.gauge.containerBounds.width / 2, 
            tranX = nearAxisWidth / 2 - farAxisWidth / 2, this.axisObject.setAttribute("transform", "translate(" + tranX + ",0)"), 
            isNullOrUndefined(this.gauge.containerObject) || this.gauge.containerObject.setAttribute("transform", "translate(" + tranX + ",0)")) : (axes.forEach(function(axis, axisIndex) {
                axis.opposedPosition ? farAxisWidth += axis.bounds.height : nearAxisWidth += axis.bounds.height;
            }), nearAxisWidth += this.gauge.containerBounds.height / 2, farAxisWidth += this.gauge.containerBounds.height / 2, 
            transY = nearAxisWidth / 2 - farAxisWidth / 2, this.axisObject.setAttribute("transform", "translate(0," + transY + ")"), 
            isNullOrUndefined(this.gauge.containerObject) || this.gauge.containerObject.setAttribute("transform", "translate(0," + transY + ")"));
        }, AxisRenderer.prototype.drawAxisLine = function(axis, axisObject, axisIndex) {
            var options, rect = axis.lineBounds, path = "";
            axis.line.width > 0 && (path = "M" + rect.x + " " + rect.y + " L " + ("Vertical" === this.gauge.orientation ? rect.x : rect.x + rect.width) + " " + ("Vertical" === this.gauge.orientation ? rect.y + rect.height : rect.y) + "z", 
            options = new PathOption$2(this.gauge.element.id + "_AxisLine_" + axisIndex, axis.line.color, axis.line.width, axis.line.color, 1, axis.line.dashArray, path), 
            axisObject.appendChild(this.gauge.renderer.drawPath(options)));
        }, AxisRenderer.prototype.drawTicks = function(axis, ticks, axisObject, tickID, tickBounds) {
            for (var pointY, pointX, options, tickPath = "", range = axis.visibleRange, line = axis.lineBounds, interval = "MajorTicks" === tickID ? axis.majorInterval : axis.minorInterval, i = range.min; i <= range.max && interval > 0; i += interval) ("MajorTicks" === tickID || "MinorTicks" === tickID && i !== range.min && i !== range.max && i % axis.majorInterval != 0) && ("Vertical" === this.gauge.orientation ? (pointX = tickBounds.x, 
            pointY = valueToCoefficient$1(i, axis, this.gauge.orientation, range) * line.height + line.y, 
            tickPath = tickPath.concat("M" + pointX + " " + pointY + " L" + (pointX + ticks.height) + " " + pointY + " ")) : (pointX = valueToCoefficient$1(i, axis, this.gauge.orientation, range) * line.width + line.x, 
            pointY = tickBounds.y, tickPath = tickPath.concat("M" + pointX + " " + pointY + " L" + pointX + " " + (pointY + ticks.height) + " ")));
            options = new PathOption$2(this.gauge.element.id + "_" + tickID + "Line_0", ticks.color, ticks.width, ticks.color, 1, null, tickPath), 
            axisObject.appendChild(this.gauge.renderer.drawPath(options));
        }, AxisRenderer.prototype.drawAxisLabels = function(axis, axisObject) {
            for (var pointX, pointY, labelSize, anchor, baseline, labelColor, rect = axis.lineBounds, bounds = axis.labelBounds, tick = axis.majorTickBounds, range = axis.visibleRange, offset = axis.labelStyle.offset, labelElement = this.gauge.renderer.createGroup({
                id: this.gauge.element.id + "_AxisLabelsGroup"
            }), i = 0; i < axis.visibleLabels.length; i++) labelSize = axis.visibleLabels[i].size, 
            labelColor = isNullOrUndefined(labelColor = axis.labelStyle.useRangeColor ? getRangeColor$1(axis.visibleLabels[i].value, axis.ranges) : null) ? axis.labelStyle.font.color : labelColor, 
            "Vertical" === this.gauge.orientation ? (pointY = valueToCoefficient$1(axis.visibleLabels[i].value, axis, this.gauge.orientation, range) * rect.height + rect.y, 
            pointX = axis.opposedPosition ? bounds.x : tick.x - labelSize.width - 5 + offset, 
            pointY += labelSize.height / 4) : (pointX = valueToCoefficient$1(axis.visibleLabels[i].value, axis, this.gauge.orientation, range) * rect.width + rect.x, 
            pointY = bounds.y, anchor = "middle", baseline = ""), textElement$2(new TextOption$2(this.gauge.element.id + "_AxisLabel_" + i, pointX, pointY, anchor, axis.visibleLabels[i].text, null, baseline), axis.labelStyle.font, labelColor, labelElement);
            axisObject.appendChild(labelElement);
        }, AxisRenderer.prototype.drawPointers = function(axis, axisObject, axisIndex) {
            var pointer, clipId, pointesGroup, pointerClipRectGroup;
            pointesGroup = this.gauge.renderer.createGroup({
                id: this.gauge.element.id + "_PointersGroup"
            });
            for (var i = 0; i < axis.pointers.length; i++) pointer = axis.pointers[i], clipId = "url(#" + this.gauge.element.id + "_AxisIndex_" + axisIndex + "__" + pointer.type + "ClipRect_" + i + ")", 
            isNullOrUndefined(pointer.bounds) || (pointerClipRectGroup = this.gauge.renderer.createGroup({
                id: this.gauge.element.id + "_AxisIndex_" + axisIndex + "_" + pointer.type + "Pointer_" + i,
                "clip-path": clipId
            }), isNullOrUndefined(pointer.startValue) && (pointer.startValue = axis.visibleRange.min), 
            this["draw" + pointer.type + "Pointer"](axis, axisIndex, pointer, i, pointerClipRectGroup), 
            pointesGroup.appendChild(pointerClipRectGroup));
            axisObject.appendChild(pointesGroup);
        }, AxisRenderer.prototype.drawMarkerPointer = function(axis, axisIndex, pointer, pointerIndex, parentElement) {
            var options, pointerElement, pointerID = this.gauge.element.id + "_AxisIndex_" + axisIndex + "_" + pointer.type + "Pointer_" + pointerIndex;
            getElement$2(pointerID) && getElement$2(pointerID).childElementCount > 0 && remove(getElement$2(pointerID)), 
            options = new PathOption$2(pointerID, pointer.color, pointer.border.width, pointer.border.color, pointer.opacity, null, null, "translate( 0, 0 )"), 
            options = calculateShapes$2(pointer.bounds, pointer.markerType, new Size$2(pointer.width, pointer.height), pointer.imageUrl, options, this.gauge.orientation, axis, pointer), 
            pointerElement = "Circle" === pointer.markerType ? this.gauge.renderer.drawCircle(options) : "Image" === pointer.markerType ? this.gauge.renderer.drawImage(options) : this.gauge.renderer.drawPath(options), 
            parentElement.appendChild(pointerElement), pointer.animationDuration > 0 && !this.gauge.gaugeResized && (pointer.animationComplete = !1, 
            this.performMarkerAnimation(pointerElement, axis, pointer)), pointerElement.setAttribute("aria-label", pointer.description || "Pointer:" + Number(pointer.currentValue).toString());
        }, AxisRenderer.prototype.drawBarPointer = function(axis, axisIndex, pointer, pointerIndex, parentElement) {
            var rectOptions, clipRectElement, pointerElement, options, box, path = "", size = new Size$2(this.gauge.availableSize.width, this.gauge.availableSize.height), pointerID = this.gauge.element.id + "_AxisIndex_" + axisIndex + "_" + pointer.type + "Pointer_" + pointerIndex;
            if (getElement$2(pointerID) && getElement$2(pointerID).childElementCount > 0 && remove(getElement$2(pointerID)), 
            "Normal" === this.gauge.container.type ? (rectOptions = new RectOption$2(pointerID, pointer.color, pointer.border, pointer.opacity, pointer.bounds, null, null), 
            box = pointer.bounds, pointerElement = this.gauge.renderer.drawRectangle(rectOptions)) : (path = getBox(pointer.bounds, this.gauge.container.type, this.gauge.orientation, new Size$2(pointer.bounds.width, pointer.bounds.height), "bar", this.gauge.container.width, axis, pointer.roundedCornerRadius), 
            options = new PathOption$2(pointerID, pointer.color, pointer.border.width, pointer.border.color, pointer.opacity, null, path), 
            box = function(path, size, parentElement) {
                var tempDiv = document.getElementById("gauge_path");
                null === tempDiv && ((tempDiv = createElement("text", {
                    id: "gauge_path"
                })).style.position = "absolute", tempDiv.style.top = "0px", tempDiv.style.left = "0px", 
                parentElement.appendChild(tempDiv));
                var svg = new SvgRenderer("id").createSvg({
                    id: "box_path",
                    width: size.width,
                    height: size.height
                });
                svg.appendChild(path), tempDiv.appendChild(svg);
                var svgRect = path.getBBox();
                return remove(tempDiv), svgRect;
            }((pointerElement = this.gauge.renderer.drawPath(options)).cloneNode(!0), size, this.gauge.element)), 
            getElement$2(pointerID) && getElement$2(pointerID).childElementCount > 0) {
                var element = getElement$2(pointerID).firstElementChild;
                "Normal" === this.gauge.container.type ? (element.setAttribute("x", rectOptions.x + ""), 
                element.setAttribute("y", rectOptions.y + ""), element.setAttribute("width", rectOptions.width + ""), 
                element.setAttribute("height", rectOptions.height + "")) : element.setAttribute("d", options.d);
            } else parentElement.appendChild(pointerElement);
            pointerElement.setAttribute("aria-label", pointer.description || "Pointer:" + Number(pointer.currentValue).toString()), 
            pointer.animationDuration > 0 && !this.gauge.gaugeResized && ("Thermometer" === this.gauge.container.type && 0 === pointer.startValue && (clipRectElement = this.gauge.renderer.drawClipPath(new RectOption$2(this.gauge.element.id + "_AxisIndex_" + axisIndex + "__" + pointer.type + "ClipRect_" + pointerIndex, "transparent", {
                width: 1,
                color: "Gray"
            }, 1, box)), parentElement.appendChild(clipRectElement)), this.performBarAnimation(pointerElement, axis, pointer));
        }, AxisRenderer.prototype.drawRanges = function(axis, axisObject, axisIndex) {
            for (var range, options, rangeElement = this.gauge.renderer.createGroup({
                id: this.gauge.element.id + "_RangesGroup"
            }), j = 0; j < axis.ranges.length; j++) isNullOrUndefined((range = axis.ranges[j]).path) || (options = new PathOption$2(this.gauge.element.id + "_AxisIndex_" + axisIndex + "_Range_" + j, range.interior, range.border.width, range.border.color, 1, null, range.path), 
            rangeElement.appendChild(this.gauge.renderer.drawPath(options)));
            axisObject.appendChild(rangeElement);
        }, AxisRenderer;
    }(Animations), Annotations$1 = function() {
        function Annotations(gauge) {
            this.gauge = gauge;
        }
        return Annotations.prototype.renderAnnotationElements = function() {
            var _this = this, secondaryID = this.gauge.element.id + "_Secondary_Element", annotationGroup = createElement("div", {
                id: this.gauge.element.id + "_AnnotationsGroup"
            });
            annotationGroup.style.position = "absolute", annotationGroup.style.top = "0px", 
            annotationGroup.style.left = "0px", this.gauge.annotations.map(function(annotation, index) {
                null !== annotation.content && _this.createAnnotationTemplate(annotationGroup, index);
            }), annotationGroup.childElementCount > 0 && !isNullOrUndefined(getElement$2(secondaryID)) && getElement$2(secondaryID).appendChild(annotationGroup);
        }, Annotations.prototype.createAnnotationTemplate = function(element, annotationIndex) {
            var left, top, templateFn, templateElement, axis, axisIndex, childElement, renderAnnotation = !1, annotation = (this.gauge.element.id, 
            this.gauge.annotations[annotationIndex]);
            childElement = createElement("div", {
                id: this.gauge.element.id + "_Annotation_" + annotationIndex,
                styles: "position: absolute; z-index:" + annotation.zIndex + ";"
            });
            var argsData = {
                cancel: !1,
                name: "annotationRender",
                content: annotation.content,
                annotation: annotation,
                textStyle: annotation.font
            };
            if (this.gauge.trigger("annotationRender", argsData), !argsData.cancel) {
                if ((templateFn = getTemplateFunction$2(argsData.content)) && templateFn(this.gauge).length) for (templateElement = templateFn(this.gauge); templateElement.length > 0; ) childElement.appendChild(templateElement[0]); else childElement.appendChild(createElement("div", {
                    innerHTML: argsData.content,
                    styles: function(font) {
                        return "font-size:" + font.size + "; font-style:" + font.fontStyle + "; font-weight:" + font.fontWeight + "; font-family:" + font.fontFamily + ";opacity:" + font.opacity + "; color:" + font.color + ";";
                    }(argsData.textStyle)
                }));
                var offset = function(childElement, parentElement) {
                    var width, height;
                    return parentElement.appendChild(childElement), width = childElement.offsetWidth, 
                    height = childElement.offsetHeight, parentElement.removeChild(childElement), new Size$2(width, height);
                }(childElement.cloneNode(!0), this.gauge.element);
                if (isNullOrUndefined(annotation.axisValue)) {
                    var elementRect = this.gauge.element.getBoundingClientRect(), bounds = this.gauge.svgObject.getBoundingClientRect();
                    switch (renderAnnotation = !0, left = Math.abs(bounds.left - elementRect.left), 
                    top = Math.abs(bounds.top - elementRect.top), left = "None" === annotation.horizontalAlignment ? left + annotation.x : left, 
                    top = "None" === annotation.verticalAlignment ? top + annotation.y : top, annotation.verticalAlignment) {
                      case "Near":
                        top += annotation.y;
                        break;

                      case "Center":
                        top = top + annotation.y + (bounds.height / 2 - offset.height / 2);
                        break;

                      case "Far":
                        top = top + bounds.height + annotation.y - offset.height;
                    }
                    switch (annotation.horizontalAlignment) {
                      case "Near":
                        left += annotation.x;
                        break;

                      case "Center":
                        left = left + annotation.x + (bounds.width / 2 - offset.width / 2);
                        break;

                      case "Far":
                        left = left + bounds.width + annotation.x - offset.width;
                    }
                } else {
                    axisIndex = isNullOrUndefined(annotation.axisIndex) ? 0 : annotation.axisIndex;
                    var range = (axis = this.gauge.axes[axisIndex]).visibleRange;
                    renderAnnotation = annotation.axisValue >= range.min && annotation.axisValue <= range.max;
                    var line = axis.lineBounds;
                    "Vertical" === this.gauge.orientation ? (left = line.x + annotation.x, top = valueToCoefficient$1(annotation.axisValue, axis, this.gauge.orientation, range) * line.height + line.y, 
                    top += annotation.y) : (left = valueToCoefficient$1(annotation.axisValue, axis, this.gauge.orientation, range) * line.width + line.x, 
                    left += annotation.x, top = line.y + annotation.y), left -= offset.width / 2, top -= offset.height / 2;
                }
                childElement.style.left = left + "px", childElement.style.top = top + "px", renderAnnotation && element.appendChild(childElement);
            }
        }, Annotations.prototype.getModuleName = function() {
            return "Annotations";
        }, Annotations.prototype.destroy = function(gauge) {}, Annotations;
    }(), GaugeTooltip$1 = function() {
        function GaugeTooltip(gauge) {
            this.gauge = gauge, this.element = gauge.element, this.tooltip = gauge.tooltip, 
            this.textStyle = this.tooltip.textStyle, this.borderStyle = this.tooltip.border, 
            this.ejTooltip = new Tooltip({
                opensOn: "custom",
                beforeRender: this.onBeforeRender.bind(this),
                beforeOpen: this.tooltipCustomization.bind(this),
                openDelay: 0,
                closeDelay: 1e3
            }), this.ejTooltip.appendTo(this.element);
        }
        return GaugeTooltip.prototype.renderTooltip = function(pointerElement) {
            this.pointerElement = pointerElement;
            this.gauge.element.getBoundingClientRect();
            var current = getPointer$1(pointerElement, this.gauge);
            this.currentAxis = current.axis, this.axisIndex = current.axisIndex, this.currentPointer = current.pointer;
            var ele = this.appendTargetElement();
            null === pointerElement.getAttribute("data-tooltip-id") && null === ele.getAttribute("aria-describedby") && this.ejTooltip.open(ele);
        }, GaugeTooltip.prototype.appendTargetElement = function() {
            var location = this.getTooltipLocation(), element = getElement$2(this.element.id + "_EJTooltip_");
            return element ? (element.style.left = location.x - 1 + "px", element.style.top = location.y - 1 + "px") : ((element = createElement("div", {
                id: this.element.id + "_EJTooltip_",
                styles: "position:absolute; left:" + location.x + "px;top:" + location.y + "px;"
            })).appendChild(createElement("div", {
                id: this.element.id + "_GaugeTooltip",
                styles: "position:absolute;width:2px;height:2px;background:transparent"
            })), getElement$2(this.element.id + "_Secondary_Element").appendChild(element)), 
            element;
        }, GaugeTooltip.prototype.getTooltipPosition = function() {
            return "Vertical" === this.gauge.orientation ? this.currentAxis.opposedPosition ? "RightCenter" : "LeftCenter" : this.currentAxis.opposedPosition ? "TopCenter" : "BottomCenter";
        }, GaugeTooltip.prototype.getTooltipLocation = function() {
            new Size$2(this.gauge.availableSize.width, this.gauge.availableSize.height);
            var bounds, lineX, lineY, x, y, height, width, lineBounds, lineId = this.gauge.element.id + "_AxisLine_" + this.axisIndex, tickID = this.gauge.element.id + "_MajorTicksLine_" + this.axisIndex;
            getElement$2(lineId) ? (lineX = (lineBounds = getElement$2(lineId).getBoundingClientRect()).left, 
            lineY = lineBounds.top) : (lineBounds = getElement$2(tickID).getBoundingClientRect(), 
            lineX = this.currentAxis.opposedPosition ? lineBounds.left : lineBounds.left + lineBounds.width, 
            lineY = this.currentAxis.opposedPosition ? lineBounds.top : lineBounds.top + lineBounds.height), 
            bounds = this.pointerElement.getBoundingClientRect();
            var elementRect = this.gauge.element.getBoundingClientRect();
            return x = bounds.left - elementRect.left, y = bounds.top - elementRect.top, height = bounds.height, 
            width = bounds.width, "Vertical" === this.gauge.orientation ? (x = lineX - elementRect.left, 
            y = "Marker" === this.currentPointer.type ? y + height / 2 : this.currentAxis.isInversed ? y + height : y) : (y = lineY - elementRect.top, 
            x = "Marker" === this.currentPointer.type ? x + width / 2 : this.currentAxis.isInversed ? x : x + width), 
            new GaugeLocation$1(x, y);
        }, GaugeTooltip.prototype.onBeforeRender = function(args) {
            var pointerValue = convertPixelToValue(this.element, this.pointerElement, this.gauge.orientation, this.currentAxis, "tooltip", null), tooltipFormat = this.gauge.tooltip.format || this.currentAxis.labelStyle.format, customLabelFormat = tooltipFormat && null !== tooltipFormat.match("{value}"), format = this.gauge.intl.getNumberFormat({
                format: getLabelFormat$1(tooltipFormat),
                useGrouping: this.gauge.useGroupingSeparator
            }), content = customLabelFormat ? tooltipFormat.replace(new RegExp("{value}", "g"), format(pointerValue)) : format(pointerValue), argsData = {
                cancel: !1,
                name: "tooltipRender",
                content: content = this.tooltip.template ? getTemplateFunction$2(this.tooltip.template)({
                    value: content
                })[0] : content,
                border: this.borderStyle,
                axis: this.currentAxis,
                pointer: this.currentPointer,
                textStyle: this.textStyle
            };
            this.gauge.trigger("tooltipRender", argsData), this.ejTooltip.content = argsData.content, 
            this.textStyle = argsData.textStyle, this.borderStyle = argsData.border, this.ejTooltip.position = this.getTooltipPosition(), 
            this.ejTooltip.dataBind();
        }, GaugeTooltip.prototype.tooltipCustomization = function(args) {
            var outerWidth, innerWidth, font = this.textStyle, borderColor = this.borderStyle.color, border = this.borderStyle.width, pointerSize = 8;
            args.element.classList.remove("e-popup-close"), args.element.classList.add("e-popup-open");
            var arrowEle = args.element.querySelector(".e-arrow-tip");
            setStyleAttribute(args.element, {
                backgroundColor: this.tooltip.fill,
                borderColor: borderColor || "#212121",
                borderWidth: border + "px"
            }), setStyleAttribute(args.element.querySelector(".e-tip-content"), {
                color: font.color,
                fontFamily: font.fontFamily,
                fontSize: font.size,
                fontWeight: font.fontWeight,
                opacity: font.opacity.toString(),
                fontStyle: font.fontStyle
            }), setStyleAttribute(args.element.querySelector(".e-arrow-tip"), {
                width: 2 * (pointerSize + border) + "px",
                height: pointerSize + border + "px"
            }), arrowEle.classList.contains("e-tip-top") ? (outerWidth = (pointerSize = args.element.querySelector(".e-arrow-tip").offsetHeight) + "px", 
            setStyleAttribute(args.element.querySelector(".e-arrow-tip-outer"), {
                borderRightColor: "transparent",
                borderLeftColor: "transparent",
                borderBottomColor: borderColor,
                borderLeftWidth: outerWidth,
                borderRightWidth: outerWidth,
                borderBottomWidth: outerWidth
            }), innerWidth = pointerSize - border + "px", setStyleAttribute(args.element.querySelector(".e-arrow-tip-inner"), {
                borderRightColor: "transparent",
                borderLeftColor: "transparent",
                borderBottomColor: this.tooltip.fill,
                borderLeftWidth: innerWidth,
                borderRightWidth: innerWidth,
                borderBottomWidth: innerWidth,
                left: border + "px",
                top: border + "px"
            })) : arrowEle.classList.contains("e-tip-bottom") ? (outerWidth = (pointerSize = args.element.querySelector(".e-arrow-tip").offsetHeight) + "px", 
            setStyleAttribute(args.element.querySelector(".e-arrow-tip-outer"), {
                borderRightColor: "transparent",
                borderLeftColor: "transparent",
                borderTopColor: borderColor,
                borderLeftWidth: outerWidth,
                borderRightWidth: outerWidth,
                borderTopWidth: outerWidth
            }), innerWidth = pointerSize - border + "px", setStyleAttribute(args.element.querySelector(".e-arrow-tip-inner"), {
                borderRightColor: "transparent",
                borderLeftColor: "transparent",
                borderTopColor: this.tooltip.fill,
                borderLeftWidth: innerWidth,
                borderRightWidth: innerWidth,
                borderTopWidth: innerWidth,
                left: border + "px",
                top: "0"
            })) : arrowEle.classList.contains("e-tip-left") ? (setStyleAttribute(args.element.querySelector(".e-arrow-tip"), {
                width: pointerSize + border + "px",
                height: 2 * (pointerSize + border) + "px"
            }), outerWidth = (pointerSize = args.element.querySelector(".e-arrow-tip").offsetWidth) + "px", 
            setStyleAttribute(args.element.querySelector(".e-arrow-tip-outer"), {
                borderTopColor: "transparent",
                borderBottomColor: "transparent",
                borderRightColor: borderColor,
                borderTopWidth: outerWidth,
                borderBottomWidth: outerWidth,
                borderRightWidth: outerWidth
            }), innerWidth = pointerSize - border + "px", setStyleAttribute(args.element.querySelector(".e-arrow-tip-inner"), {
                borderTopColor: "transparent",
                borderBottomColor: "transparent",
                borderRightColor: this.tooltip.fill,
                borderTopWidth: innerWidth,
                borderBottomWidth: innerWidth,
                borderRightWidth: innerWidth,
                left: border + "px",
                top: border + "px"
            })) : (setStyleAttribute(args.element.querySelector(".e-arrow-tip"), {
                width: pointerSize + border + "px",
                height: 2 * (pointerSize + border) + "px"
            }), outerWidth = (pointerSize = args.element.querySelector(".e-arrow-tip").offsetWidth) + "px", 
            setStyleAttribute(args.element.querySelector(".e-arrow-tip-outer"), {
                borderTopColor: "transparent",
                borderBottomColor: "transparent",
                borderLeftColor: borderColor,
                borderTopWidth: outerWidth,
                borderBottomWidth: outerWidth,
                borderLeftWidth: outerWidth
            }), innerWidth = pointerSize - border + "px", setStyleAttribute(args.element.querySelector(".e-arrow-tip-inner"), {
                borderTopColor: "transparent",
                borderBottomColor: "transparent",
                borderLeftColor: this.tooltip.fill,
                borderTopWidth: innerWidth,
                borderBottomWidth: innerWidth,
                borderLeftWidth: innerWidth,
                left: (border <= 1 ? 0 : -1) + "px",
                top: border + "px"
            })), this.ejTooltip.refresh(args.target), setStyleAttribute(args.element, {
                display: "block",
                transitionProperty: "left,top",
                transitionDuration: this.tooltip.enableAnimation ? "1000ms" : "0ms"
            });
        }, GaugeTooltip.prototype.getModuleName = function() {
            return "Tooltip";
        }, GaugeTooltip.prototype.destroy = function(gauge) {}, GaugeTooltip;
    }(), __extends$137 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$53 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, LinearGauge = function(_super) {
        function LinearGauge(options, element) {
            var _this = _super.call(this, options, element) || this;
            return _this.pointerDrag = !1, _this.mouseX = 0, _this.mouseY = 0, _this.gaugeResized = !1, 
            _this;
        }
        return __extends$137(LinearGauge, _super), LinearGauge.prototype.preRender = function() {
            this.unWireEvents(), this.trigger("load", {
                gauge: this
            }), this.themeEffect(), this.initPrivateVariable(), this.setCulture(), this.createSvg(), 
            this.wireEvents();
        }, LinearGauge.prototype.themeEffect = function() {
            "Highcontrast" === this.theme ? (this.titleStyle.color = this.titleStyle.color || "#FFFFFF", 
            this.setThemeColors("#FFFFFF", "#FFFFFF")) : (this.titleStyle.color = this.titleStyle.color || "#424242", 
            this.setThemeColors("#686868", "#a6a6a6"));
        }, LinearGauge.prototype.setThemeColors = function(labelcolor, others) {
            for (var _i = 0, _a = this.axes; _i < _a.length; _i++) {
                var axis = _a[_i];
                axis.line.color = axis.line.color || others, axis.labelStyle.font.color = axis.labelStyle.font.color || labelcolor, 
                axis.majorTicks.color = axis.majorTicks.color || others, axis.minorTicks.color = axis.minorTicks.color || others;
                for (var _b = 0, _c = axis.pointers; _b < _c.length; _b++) {
                    var pointer = _c[_b];
                    pointer.color = pointer.color || others;
                }
            }
            for (var _d = 0, _e = this.annotations; _d < _e.length; _d++) {
                var annotation = _e[_d];
                annotation.font.color = annotation.font.color || labelcolor;
            }
        }, LinearGauge.prototype.initPrivateVariable = function() {
            this.renderer = new SvgRenderer(this.element.id), this.gaugeAxisLayoutPanel = new AxisLayoutPanel$1(this), 
            this.axisRenderer = new AxisRenderer$1(this);
        }, LinearGauge.prototype.setCulture = function() {
            this.intl = new Internationalization();
        }, LinearGauge.prototype.createSvg = function() {
            this.removeSvg(), this.calculateSize(), this.svgObject = this.renderer.createSvg({
                id: this.element.id + "_svg",
                width: this.availableSize.width,
                height: this.availableSize.height
            });
        }, LinearGauge.prototype.removeSvg = function() {
            !function(id) {
                var element = getElement$2(id);
                element && remove(element);
            }(this.element.id + "_Secondary_Element"), isNullOrUndefined(this.svgObject) || isNullOrUndefined(this.svgObject.parentNode) || remove(this.svgObject);
        }, LinearGauge.prototype.calculateSize = function() {
            var width = stringToNumber$2(this.width, this.element.offsetWidth) || this.element.offsetWidth || 600, height = stringToNumber$2(this.height, this.element.offsetHeight) || this.element.offsetHeight || 450;
            this.availableSize = new Size$2(width, height);
        }, LinearGauge.prototype.render = function() {
            this.renderGaugeElements(), this.calculateBounds(), this.renderAxisElements(), this.trigger("loaded", {
                gauge: this
            });
        }, LinearGauge.prototype.renderGaugeElements = function() {
            this.appendSecondaryElement(), this.renderBorder(), this.renderTitle(), this.renderContainer();
        }, LinearGauge.prototype.appendSecondaryElement = function() {
            if (isNullOrUndefined(getElement$2(this.element.id + "_Secondary_Element"))) {
                var secondaryElement = createElement("div");
                secondaryElement.id = this.element.id + "_Secondary_Element", secondaryElement.setAttribute("style", "position: relative"), 
                this.element.appendChild(secondaryElement);
            }
        }, LinearGauge.prototype.calculateBounds = function() {
            this.gaugeAxisLayoutPanel.calculateAxesBounds();
        }, LinearGauge.prototype.renderAxisElements = function() {
            this.axisRenderer.renderAxes(), this.element.appendChild(this.svgObject), this.annotationsModule && this.annotationsModule.renderAnnotationElements();
        }, LinearGauge.prototype.renderBorder = function() {
            var width = this.border.width;
            if (width > 0) {
                var rect = new RectOption$2(this.element.id + "_LinearGaugeBorder", this.background, this.border, 1, new Rect$2(width / 2, width / 2, this.availableSize.width - width, this.availableSize.height - width), null, null);
                this.svgObject.appendChild(this.renderer.drawRectangle(rect));
            }
        }, LinearGauge.prototype.renderTitle = function() {
            var x, y, height, width, titleBounds;
            if (this.title) {
                var size = measureText$2(this.title, this.titleStyle), options = new TextOption$2(this.element.id + "_LinearGaugeTitle", this.availableSize.width / 2, this.margin.top + size.height / 2, "middle", this.title);
                titleBounds = {
                    x: options.x - size.width / 2,
                    y: options.y,
                    width: size.width,
                    height: size.height
                };
                var element = textElement$2(options, this.titleStyle, this.titleStyle.color, this.svgObject);
                element.setAttribute("aria-label", this.description || this.title), element.setAttribute("tabindex", this.tabIndex.toString());
            }
            x = this.margin.left, y = isNullOrUndefined(titleBounds) ? this.margin.top : titleBounds.y, 
            height = this.availableSize.height - y - this.margin.bottom, width = this.availableSize.width - this.margin.left - this.margin.right, 
            this.actualRect = {
                x: x,
                y: y,
                width: width,
                height: height
            };
        }, LinearGauge.prototype.unWireEvents = function() {
            EventHandler.remove(this.element, Browser.touchStartEvent, this.gaugeOnMouseDown), 
            EventHandler.remove(this.element, Browser.touchMoveEvent, this.mouseMove), EventHandler.remove(this.element, Browser.touchEndEvent, this.mouseEnd), 
            EventHandler.remove(this.element, "contextmenu", this.gaugeRightClick), EventHandler.remove(this.element, Browser.isPointer ? "pointerleave" : "mouseleave", this.mouseLeave), 
            EventHandler.remove(window, Browser.isTouch && "orientation" in window && "onorientationchange" in window ? "orientationchange" : "resize", this.gaugeResize.bind(this));
        }, LinearGauge.prototype.wireEvents = function() {
            EventHandler.add(this.element, Browser.touchStartEvent, this.gaugeOnMouseDown, this), 
            EventHandler.add(this.element, Browser.touchMoveEvent, this.mouseMove, this), EventHandler.add(this.element, Browser.touchEndEvent, this.mouseEnd, this), 
            EventHandler.add(this.element, "contextmenu", this.gaugeRightClick, this), EventHandler.add(this.element, Browser.isPointer ? "pointerleave" : "mouseleave", this.mouseLeave, this), 
            EventHandler.add(window, Browser.isTouch && "orientation" in window && "onorientationchange" in window ? "orientationchange" : "resize", this.gaugeResize, this), 
            this.setStyle(this.element);
        }, LinearGauge.prototype.setStyle = function(element) {
            element.style.touchAction = isPointerDrag(this.axes) ? "none" : "element", element.style.msTouchAction = isPointerDrag(this.axes) ? "none" : "element", 
            element.style.msContentZooming = "none", element.style.msUserSelect = "none", element.style.webkitUserSelect = "none", 
            element.style.position = "relative";
        }, LinearGauge.prototype.gaugeResize = function(e) {
            var _this = this, args = {
                gauge: this,
                previousSize: new Size$2(this.availableSize.width, this.availableSize.height),
                name: "resized",
                currentSize: new Size$2(0, 0)
            };
            return this.resizeTo && clearTimeout(this.resizeTo), this.element.classList.contains("e-lineargauge") && (this.resizeTo = setTimeout(function() {
                _this.gaugeResized = !0, _this.createSvg(), _this.refreshing = !0, args.currentSize = new Size$2(_this.availableSize.width, _this.availableSize.height), 
                _this.trigger("resized", args), _this.render();
            }, 500)), !1;
        }, LinearGauge.prototype.destroy = function() {
            this.unWireEvents(), this.removeSvg(), _super.prototype.destroy.call(this);
        }, LinearGauge.prototype.renderContainer = function() {
            var width, height, x, y, options, topRadius, bottomRadius, rect, path = "", fill = this.container.backgroundColor, radius = this.container.width;
            bottomRadius = radius + radius / 2 / Math.PI, topRadius = radius / 2, "Vertical" === this.orientation ? (height = this.actualRect.height, 
            height = this.container.height > 0 ? this.container.height : 2 * (height / 2 - height / 2 / 4), 
            width = this.container.width, height = "Thermometer" === this.container.type ? height - 2 * bottomRadius - topRadius : height, 
            x = this.actualRect.x + (this.actualRect.width / 2 - this.container.width / 2) + this.container.offset, 
            y = this.actualRect.y + (this.actualRect.height / 2 - ("Thermometer" === this.container.type ? (height + 2 * bottomRadius - topRadius) / 2 : height / 2)), 
            height = height) : (width = this.container.height > 0 ? this.container.height : 2 * (this.actualRect.width / 2 - this.actualRect.width / 2 / 4), 
            width = "Thermometer" === this.container.type ? width - 2 * bottomRadius - topRadius : width, 
            x = this.actualRect.x + (this.actualRect.width / 2 - ("Thermometer" === this.container.type ? (width - 2 * bottomRadius + topRadius) / 2 : width / 2)), 
            y = this.actualRect.y + (this.actualRect.height / 2 - this.container.width / 2) + this.container.offset, 
            height = this.container.width), this.containerBounds = {
                x: x,
                y: y,
                width: width,
                height: height
            }, this.containerBounds.width > 0 && (this.containerObject = this.renderer.createGroup({
                id: this.element.id + "_Container_Group",
                transform: "translate( 0, 0)"
            }), "Normal" === this.container.type ? (rect = new RectOption$2(this.element.id + "_" + this.container.type + "_Layout", fill, this.container.border, 1, new Rect$2(x, y, width, height)), 
            this.containerObject.appendChild(this.renderer.drawRectangle(rect))) : (path = getBox(this.containerBounds, this.container.type, this.orientation, new Size$2(this.container.height, this.container.width), "container", null, null, this.container.roundedCornerRadius), 
            options = new PathOption$2(this.element.id + "_" + this.container.type + "_Layout", fill, this.container.border.width, this.container.border.color, 1, "", path), 
            this.containerObject.appendChild(this.renderer.drawPath(options))), this.svgObject.appendChild(this.containerObject));
        }, LinearGauge.prototype.gaugeOnMouseDown = function(e) {
            e.target, this.element.getBoundingClientRect();
            var current, args = this.getMouseArgs(e, "touchstart", "gaugeMouseDown");
            return this.trigger("gaugeMouseDown", args), this.mouseX = args.x, this.mouseY = args.y, 
            args.target && !args.cancel && (args.target.id.indexOf("MarkerPointer") > -1 || args.target.id.indexOf("BarPointer") > -1) && !isNullOrUndefined(current = this.moveOnPointer(args.target)) && current.pointer && (this.pointerDrag = !0, 
            this.mouseElement = args.target), !0;
        }, LinearGauge.prototype.mouseMove = function(e) {
            var current, args = this.getMouseArgs(e, "touchmove", "gaugeMouseMove");
            return this.trigger("gaugeMouseMove", args), this.mouseX = args.x, this.mouseY = args.y, 
            args.target && !args.cancel && (args.target.id.indexOf("MarkerPointer") > -1 || args.target.id.indexOf("BarPointer") > -1 ? (this.tooltipModule && this.tooltip.enable && this.tooltipModule.renderTooltip(args.target), 
            !isNullOrUndefined(current = this.moveOnPointer(args.target)) && current.pointer && (this.element.style.cursor = current.style)) : (this.tooltipModule && this.tooltip.enable && this.tooltipModule.ejTooltip.close(), 
            this.element.style.cursor = this.pointerDrag ? this.element.style.cursor : "auto"), 
            this.gaugeOnMouseMove(e)), !1;
        }, LinearGauge.prototype.moveOnPointer = function(element) {
            var current, axis, pointer, top, left, cursorStyle, process, clientRect = this.element.getBoundingClientRect(), isPointer = !1, pointerElement = getElement$2(element.id), svgPath = pointerElement;
            return current = getPointer$1(element, this), axis = current.axis, (pointer = current.pointer).enableDrag && ("Bar" === pointer.type ? "Vertical" === this.orientation ? (top = pointerElement.getBoundingClientRect().top - clientRect.top, 
            top = axis.isInversed ? top + svgPath.getBBox().height : top, isPointer = axis.isInversed ? this.mouseY <= top && this.mouseY > top - 10 : this.mouseY < top + 10 && this.mouseY >= top, 
            cursorStyle = "n-resize") : (left = pointerElement.getBoundingClientRect().left - clientRect.left, 
            left = axis.isInversed ? left : left + svgPath.getBBox().width, isPointer = axis.isInversed ? this.mouseX >= left && this.mouseX < left + 10 : this.mouseX > left - 10 && this.mouseX <= left, 
            cursorStyle = "e-resize") : (isPointer = !0, cursorStyle = "pointer")), isPointer && (process = {
                pointer: isPointer,
                style: cursorStyle
            }), process;
        }, LinearGauge.prototype.gaugeRightClick = function(event) {
            return 2 !== event.buttons && "touch" !== event.pointerType || (event.preventDefault(), 
            event.stopPropagation(), !1);
        }, LinearGauge.prototype.mouseLeave = function(e) {
            this.getMouseArgs(e, "touchmove", "gaugeMouseLeave");
            return isNullOrUndefined(this.mouseElement) || (this.element.style.cursor = "", 
            this.mouseElement = null, this.pointerDrag = !1), this.tooltip.enable && this.tooltipModule && this.tooltipModule.ejTooltip.close(), 
            !1;
        }, LinearGauge.prototype.gaugeOnMouseMove = function(e) {
            var current;
            return this.pointerDrag && (current = getPointer$1(this.mouseElement, this)).pointer.enableDrag && current.pointer.animationComplete && this[current.pointer.type.toLowerCase() + "Drag"](current.axis, current.pointer), 
            !0;
        }, LinearGauge.prototype.mouseEnd = function(e) {
            var _this = this, isTouch = "touch" === e.pointerType || "2" === e.pointerType || "touchend" === e.type, args = this.getMouseArgs(e, "touchend", "gaugeMouseUp");
            return this.trigger("gaugeMouseUp", args), isNullOrUndefined(this.mouseElement) || (this.element.style.cursor = "", 
            this.mouseElement = null, this.pointerDrag = !1), !args.cancel && isTouch && this.tooltip.enable && this.tooltipModule && args.target.id.indexOf("Pointer") >= 0 && (this.tooltipModule.renderTooltip(args.target), 
            setTimeout(function() {
                _this.tooltipModule.ejTooltip.close();
            }, 2e3)), !0;
        }, LinearGauge.prototype.getMouseArgs = function(e, type, name) {
            var rect = this.element.getBoundingClientRect(), location = new GaugeLocation$1(-rect.left, -rect.top), isTouch = e.type === type;
            return location.x += isTouch ? e.changedTouches[0].clientX : e.clientX, location.y += isTouch ? e.changedTouches[0].clientY : e.clientY, 
            {
                cancel: !1,
                name: name,
                model: this,
                x: location.x,
                y: location.y,
                target: e.target
            };
        }, LinearGauge.prototype.markerDrag = function(axis, pointer) {
            var options, value = convertPixelToValue(this.element, this.mouseElement, this.orientation, axis, "drag", new GaugeLocation$1(this.mouseX, this.mouseY));
            withInRange$1(value, null, null, axis.visibleRange.max, axis.visibleRange.min, "pointer");
            withInRange$1(value, null, null, axis.visibleRange.max, axis.visibleRange.min, "pointer") && (this.triggerDragEvent(this.mouseElement), 
            options = new PathOption$2("pointerID", pointer.color, pointer.border.width, pointer.border.color, pointer.opacity, null, null, ""), 
            "Vertical" === this.orientation ? pointer.bounds.y = this.mouseY : pointer.bounds.x = this.mouseX, 
            pointer.currentValue = value, options = calculateShapes$2(pointer.bounds, pointer.markerType, new Size$2(pointer.width, pointer.height), pointer.imageUrl, options, this.orientation, axis, pointer), 
            "Image" === pointer.markerType ? (this.mouseElement.setAttribute("x", (pointer.bounds.x - pointer.bounds.width / 2).toString()), 
            this.mouseElement.setAttribute("y", (pointer.bounds.y - pointer.bounds.height / 2).toString())) : this.mouseElement.setAttribute("d", options.d));
        }, LinearGauge.prototype.barDrag = function(axis, pointer) {
            var value1, value2, isDrag, path, line = axis.lineBounds, range = axis.visibleRange, lineHeight = "Vertical" === this.orientation ? line.height : line.width, lineY = "Vertical" === this.orientation ? line.y : line.x;
            value1 = valueToCoefficient$1(range.min, axis, this.orientation, range) * lineHeight + lineY, 
            value2 = valueToCoefficient$1(range.max, axis, this.orientation, range) * lineHeight + lineY, 
            "Vertical" === this.orientation ? (isDrag = axis.isInversed ? this.mouseY > value1 && this.mouseY < value2 : this.mouseY > value2 && this.mouseY < value1) && ("Normal" === this.container.type ? (axis.isInversed || this.mouseElement.setAttribute("y", this.mouseY.toString()), 
            this.mouseElement.setAttribute("height", Math.abs(value1 - this.mouseY).toString())) : (axis.isInversed || (pointer.bounds.y = this.mouseY), 
            pointer.bounds.height = Math.abs(value1 - this.mouseY))) : (isDrag = axis.isInversed ? this.mouseX > value2 && this.mouseX < value1 : this.mouseX > value1 && this.mouseX < value2) && ("Normal" === this.container.type ? (axis.isInversed && this.mouseElement.setAttribute("x", this.mouseX.toString()), 
            this.mouseElement.setAttribute("width", Math.abs(value1 - this.mouseX).toString())) : (axis.isInversed && (pointer.bounds.x = this.mouseX), 
            pointer.bounds.width = Math.abs(value1 - this.mouseX))), isDrag && "path" === this.mouseElement.tagName && (this.triggerDragEvent(this.mouseElement), 
            path = getBox(pointer.bounds, this.container.type, this.orientation, new Size$2(pointer.bounds.width, pointer.bounds.height), "bar", this.container.width, axis, pointer.roundedCornerRadius), 
            this.mouseElement.setAttribute("d", path));
        }, LinearGauge.prototype.triggerDragEvent = function(activeElement) {
            var active = getPointer$1(this.mouseElement, this), value = convertPixelToValue(this.element, this.mouseElement, this.orientation, active.axis, "tooltip", null), dragArgs = {
                name: "valueChange",
                gauge: this,
                element: this.mouseElement,
                axisIndex: active.axisIndex,
                axis: active.axis,
                pointerIndex: active.pointerIndex,
                pointer: active.pointer,
                value: value
            };
            this.trigger("valueChange", dragArgs);
        }, LinearGauge.prototype.setPointerValue = function(axisIndex, pointerIndex, value) {
            var axis = this.axes[axisIndex], pointer = axis.pointers[pointerIndex], pointerElement = getElement$2(this.element.id + "_AxisIndex_" + axisIndex + "_" + pointer.type + "Pointer_" + pointerIndex);
            pointer.currentValue = value, null !== pointerElement && withInRange$1(pointer.currentValue, null, null, axis.visibleRange.max, axis.visibleRange.min, "pointer") && (this.gaugeAxisLayoutPanel["calculate" + pointer.type + "Bounds"](axisIndex, axis, pointerIndex, pointer), 
            this.axisRenderer["draw" + pointer.type + "Pointer"](axis, axisIndex, pointer, pointerIndex, pointerElement.parentElement));
        }, LinearGauge.prototype.setAnnotationValue = function(annotationIndex, content) {
            var elementExist = null === getElement$2(this.element.id + "_Annotation_" + annotationIndex), element = getElement$2(this.element.id + "_AnnotationsGroup") || createElement("div", {
                id: this.element.id + "_AnnotationsGroup"
            }), annotation = this.annotations[annotationIndex];
            null !== content && (getElement$2(this.element.id + "_Annotation_" + annotationIndex) && getElement$2(this.element.id + "_Annotation_" + annotationIndex).remove(), 
            annotation.content = content, this.annotationsModule.createAnnotationTemplate(element, annotationIndex), 
            elementExist || element.appendChild(getElement$2(this.element.id + "_Annotation_" + annotationIndex)));
        }, LinearGauge.prototype.requiredModules = function() {
            var modules = [], annotationEnable = !1;
            return this.annotations.map(function(annotation, index) {
                annotationEnable = null != annotation.content;
            }), annotationEnable && modules.push({
                member: "Annotations",
                args: [ this, Annotations$1 ]
            }), this.tooltip.enable && modules.push({
                member: "Tooltip",
                args: [ this, GaugeTooltip$1 ]
            }), modules;
        }, LinearGauge.prototype.getPersistData = function() {
            return this.addOnPersist([ "loaded" ]);
        }, LinearGauge.prototype.getModuleName = function() {
            return "lineargauge";
        }, LinearGauge.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var renderer = !1, refreshBounds = !1, _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "height":
                  case "width":
                  case "margin":
                    this.createSvg(), refreshBounds = !0;
                    break;

                  case "title":
                    refreshBounds = "" === newProp.title || "" === oldProp.title, renderer = !("" === newProp.title || "" === oldProp.title);
                    break;

                  case "titleStyle":
                    newProp.titleStyle && newProp.titleStyle.size ? refreshBounds = !0 : renderer = !0;
                    break;

                  case "border":
                  case "background":
                    renderer = !0;
                    break;

                  case "container":
                    refreshBounds = !0;
                }
            }
            !refreshBounds && renderer && (this.removeSvg(), this.renderGaugeElements(), this.renderAxisElements()), 
            refreshBounds && (this.createSvg(), this.renderGaugeElements(), this.calculateBounds(), 
            this.renderAxisElements());
        }, __decorate$53([ Property(null) ], LinearGauge.prototype, "width", void 0), __decorate$53([ Property(null) ], LinearGauge.prototype, "height", void 0), 
        __decorate$53([ Property("Vertical") ], LinearGauge.prototype, "orientation", void 0), 
        __decorate$53([ Complex({}, Margin$2) ], LinearGauge.prototype, "margin", void 0), 
        __decorate$53([ Complex({
            color: "",
            width: 0
        }, Border$3) ], LinearGauge.prototype, "border", void 0), __decorate$53([ Property("transparent") ], LinearGauge.prototype, "background", void 0), 
        __decorate$53([ Property("") ], LinearGauge.prototype, "title", void 0), __decorate$53([ Complex({
            size: "15px",
            color: null
        }, Font$3) ], LinearGauge.prototype, "titleStyle", void 0), __decorate$53([ Complex({}, Container) ], LinearGauge.prototype, "container", void 0), 
        __decorate$53([ Collection([ {} ], Axis$2) ], LinearGauge.prototype, "axes", void 0), 
        __decorate$53([ Complex({}, TooltipSettings$2) ], LinearGauge.prototype, "tooltip", void 0), 
        __decorate$53([ Collection([ {} ], Annotation$1) ], LinearGauge.prototype, "annotations", void 0), 
        __decorate$53([ Property([]) ], LinearGauge.prototype, "rangePalettes", void 0), 
        __decorate$53([ Property(!1) ], LinearGauge.prototype, "useGroupingSeparator", void 0), 
        __decorate$53([ Property(null) ], LinearGauge.prototype, "description", void 0), 
        __decorate$53([ Property(1) ], LinearGauge.prototype, "tabIndex", void 0), __decorate$53([ Property("Material") ], LinearGauge.prototype, "theme", void 0), 
        __decorate$53([ Event() ], LinearGauge.prototype, "loaded", void 0), __decorate$53([ Event() ], LinearGauge.prototype, "load", void 0), 
        __decorate$53([ Event() ], LinearGauge.prototype, "animationComplete", void 0), 
        __decorate$53([ Event() ], LinearGauge.prototype, "axisLabelRender", void 0), __decorate$53([ Event() ], LinearGauge.prototype, "annotationRender", void 0), 
        __decorate$53([ Event() ], LinearGauge.prototype, "tooltipRender", void 0), __decorate$53([ Event() ], LinearGauge.prototype, "gaugeMouseMove", void 0), 
        __decorate$53([ Event() ], LinearGauge.prototype, "gaugeMouseLeave", void 0), __decorate$53([ Event() ], LinearGauge.prototype, "gaugeMouseDown", void 0), 
        __decorate$53([ Event() ], LinearGauge.prototype, "gaugeMouseUp", void 0), __decorate$53([ Event() ], LinearGauge.prototype, "valueChange", void 0), 
        __decorate$53([ Event() ], LinearGauge.prototype, "resized", void 0), LinearGauge = __decorate$53([ NotifyPropertyChanges ], LinearGauge);
    }(Component), __extends$143 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), Size$3 = function() {
        return function(width, height) {
            this.width = width, this.height = height;
        };
    }(), Point = function() {
        return function(x, y) {
            this.x = x, this.y = y;
        };
    }(), MinMax = function() {
        return function(min, max) {
            this.min = min, this.max = max;
        };
    }(), GeoLocation = function() {
        return function(latitude, longitude) {
            this.latitude = new MinMax(latitude.min, latitude.max), this.longitude = new MinMax(longitude.min, longitude.max);
        };
    }(), TextOption$3 = function() {
        return function(id, x, y, anchor, text, transform, baseLine) {
            void 0 === transform && (transform = ""), this.transform = "", this.baseLine = "auto", 
            this.id = id, this.x = x, this.y = y, this.anchor = anchor, this.text = text, this.transform = transform, 
            this.baseLine = baseLine;
        };
    }(), PathOption$3 = function() {
        return function(id, fill, width, color, opacity, dashArray, d) {
            this.id = id, this.opacity = opacity, this.fill = fill, this.stroke = color, this["stroke-width"] = width, 
            this["stroke-dasharray"] = dashArray, this.d = d;
        };
    }(), RectOption$3 = function(_super) {
        function RectOption(id, fill, border, opacity, rect, rx, ry, transform, dashArray) {
            var _this = _super.call(this, id, fill, border.width, border.color, opacity, dashArray) || this;
            return _this.y = rect.y, _this.x = rect.x, _this.height = rect.height, _this.width = rect.width, 
            _this.rx = rx || 0, _this.ry = ry || 0, _this.transform = transform || "", _this["stroke-dasharray"] = dashArray, 
            _this;
        }
        return __extends$143(RectOption, _super), RectOption;
    }(PathOption$3), CircleOption$1 = function(_super) {
        function CircleOption(id, fill, border, opacity, cx, cy, r, dashArray) {
            var _this = _super.call(this, id, fill, border.width, border.color, opacity) || this;
            return _this.cy = cy, _this.cx = cx, _this.r = r, _this["stroke-dasharray"] = dashArray, 
            _this;
        }
        return __extends$143(CircleOption, _super), CircleOption;
    }(PathOption$3), PolylineOption = function(_super) {
        function PolylineOption(id, points, fill, width, color, opacity, dashArray) {
            return void 0 === opacity && (opacity = 1), void 0 === dashArray && (dashArray = ""), 
            _super.call(this, id, points, fill, width, color, opacity, dashArray) || this;
        }
        return __extends$143(PolylineOption, _super), PolylineOption;
    }(function(_super) {
        function PolygonOption(id, points, fill, width, color, opacity, dashArray) {
            void 0 === opacity && (opacity = 1), void 0 === dashArray && (dashArray = "");
            var _this = _super.call(this, id, fill, width, color, opacity, dashArray) || this;
            return _this.points = points, _this;
        }
        return __extends$143(PolygonOption, _super), PolygonOption;
    }(PathOption$3)), MapLocation = (function(_super) {
        function LineOption(id, line, fill, width, color, opacity, dashArray) {
            void 0 === opacity && (opacity = 1), void 0 === dashArray && (dashArray = "");
            var _this = _super.call(this, id, fill, width, color, opacity, dashArray) || this;
            return _this.x1 = line.x1, _this.y1 = line.y1, _this.x2 = line.x2, _this.y2 = line.y2, 
            _this;
        }
        __extends$143(LineOption, _super);
    }(PathOption$3), function() {
        return function(x, y) {
            this.x = x, this.y = y;
        };
    }()), Rect$3 = function() {
        return function(x, y, width, height) {
            this.x = x, this.y = y, this.width = width, this.height = height;
        };
    }(), MapAjax = function() {
        return function(url, sendData) {
            this.url = null, this.sendData = null, this.url = url, this.sendData = sendData;
        };
    }();
    !function(Theme) {
        Theme.mapsTitleFont = {
            size: "14px",
            fontWeight: "Medium",
            color: "#424242",
            fontStyle: "Medium",
            fontFamily: "Roboto, Noto, Sans-serif"
        }, Theme.mapsSubTitleFont = {
            size: "13px",
            fontWeight: "Medium",
            color: "#424242",
            fontStyle: "Medium",
            fontFamily: "Roboto, Noto, Sans-serif"
        }, Theme.tooltipLabelFont = {
            size: "12px",
            fontWeight: "Regular",
            color: "#FFFFFF",
            fontStyle: "Regular",
            fontFamily: "Roboto"
        }, Theme.legendTitleFont = {
            size: "14px",
            fontWeight: "Regular",
            color: "#757575",
            fontStyle: "Regular",
            fontFamily: "Roboto, Noto, Sans-serif"
        }, Theme.legendLabelFont = {
            size: "13px",
            fontWeight: "Medium",
            color: "#757575",
            fontStyle: "Medium",
            fontFamily: "Roboto, Noto, Sans-serif"
        }, Theme.dataLabelFont = {
            size: "12px",
            fontWeight: "Medium",
            color: "#000000",
            fontStyle: "Medium",
            fontFamily: "Roboto, Noto, Sans-serif"
        };
    }(Theme$2 || (Theme$2 = {}));
    var FabricTheme;
    !function(FabricTheme) {
        FabricTheme.mapsTitleFont = {
            size: "14px",
            fontWeight: "Semibold",
            color: "#424242",
            fontStyle: "Semibold",
            fontFamily: "SegoeUI, Helvetica Neue, Helvetica, Arial, sans-serif"
        }, FabricTheme.mapsSubTitleFont = {
            size: "13px",
            fontWeight: "Regular",
            color: "#424242",
            fontStyle: "Regular",
            fontFamily: "SegoeUI, Helvetica Neue, Helvetica, Arial, sans-serif"
        }, FabricTheme.tooltipLabelFont = {
            size: "12px",
            fontWeight: "Regular",
            color: "#FFFFFF",
            fontStyle: "Regular",
            fontFamily: "Roboto"
        }, FabricTheme.legendTitleFont = {
            size: "14px",
            fontWeight: "Regular",
            color: "#757575",
            fontStyle: "Regular",
            fontFamily: "SegoeUI, Helvetica Neue, Helvetica, Arial, sans-serif"
        }, FabricTheme.legendLabelFont = {
            size: "13px",
            fontWeight: "Medium",
            color: "#757575",
            fontStyle: "Medium",
            fontFamily: "SegoeUI, Helvetica Neue, Helvetica, Arial, sans-serif"
        }, FabricTheme.dataLabelFont = {
            size: "12px",
            fontWeight: "Medium",
            color: "#000000",
            fontStyle: "Medium",
            fontFamily: "SegoeUI, Helvetica Neue, Helvetica, Arial, sans-serif"
        };
    }(FabricTheme || (FabricTheme = {}));
    var BootstrapTheme;
    !function(BootstrapTheme) {
        BootstrapTheme.mapsTitleFont = {
            size: "14px",
            fontWeight: "Semibold",
            color: "#424242",
            fontStyle: "Semibold",
            fontFamily: "Helvetica Neue, Helvetica, Arial, sans-serif"
        }, BootstrapTheme.mapsSubTitleFont = {
            size: "13px",
            fontWeight: "Regular",
            color: "#424242",
            fontStyle: "Regular",
            fontFamily: "Helvetica Neue, Helvetica, Arial, sans-serif"
        }, BootstrapTheme.tooltipLabelFont = {
            size: "12px",
            fontWeight: "Regular",
            color: "#FFFFFF",
            fontStyle: "Regular",
            fontFamily: "Roboto"
        }, BootstrapTheme.legendTitleFont = {
            size: "14px",
            fontWeight: "Regular",
            color: "#757575",
            fontStyle: "Regular",
            fontFamily: "Helvetica Neue, Helvetica, Arial, sans-serif"
        }, BootstrapTheme.legendLabelFont = {
            size: "13px",
            fontWeight: "Medium",
            color: "#757575",
            fontStyle: "Medium",
            fontFamily: "Helvetica Neue, Helvetica, Arial, sans-serif"
        }, BootstrapTheme.dataLabelFont = {
            size: "12px",
            fontWeight: "Medium",
            color: "#000000",
            fontStyle: "Medium",
            fontFamily: "Helvetica Neue, Helvetica, Arial, sans-serif"
        };
    }(BootstrapTheme || (BootstrapTheme = {}));
    var HighContrastTheme;
    !function(HighContrastTheme) {
        HighContrastTheme.mapsTitleFont = {
            size: "14px",
            fontWeight: "Medium",
            color: "#FFFFFF",
            fontStyle: "Medium",
            fontFamily: "Roboto, Noto, Sans-serif"
        }, HighContrastTheme.mapsSubTitleFont = {
            size: "13px",
            fontWeight: "Medium",
            color: "#FFFFFF",
            fontStyle: "Medium",
            fontFamily: "Roboto, Noto, Sans-serif"
        }, HighContrastTheme.tooltipLabelFont = {
            size: "12px",
            fontWeight: "Regular",
            color: "#FFFFFF",
            fontStyle: "Regular",
            fontFamily: "Roboto"
        }, HighContrastTheme.legendTitleFont = {
            size: "14px",
            fontWeight: "Regular",
            color: "#FFFFFF",
            fontStyle: "Regular",
            fontFamily: "Roboto, Noto, Sans-serif"
        }, HighContrastTheme.legendLabelFont = {
            size: "13px",
            fontWeight: "Medium",
            color: "#FFFFFF",
            fontStyle: "Medium",
            fontFamily: "Roboto, Noto, Sans-serif"
        }, HighContrastTheme.dataLabelFont = {
            size: "12px",
            fontWeight: "Medium",
            color: "#000000",
            fontStyle: "Medium",
            fontFamily: "Roboto, Noto, Sans-serif"
        };
    }(HighContrastTheme || (HighContrastTheme = {}));
    var __extends$144 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$57 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, Annotation$2 = function(_super) {
        function Annotation() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$144(Annotation, _super), __decorate$57([ Property("") ], Annotation.prototype, "content", void 0), 
        __decorate$57([ Property("0px") ], Annotation.prototype, "x", void 0), __decorate$57([ Property("0px") ], Annotation.prototype, "y", void 0), 
        __decorate$57([ Property("None") ], Annotation.prototype, "verticalAlignment", void 0), 
        __decorate$57([ Property("None") ], Annotation.prototype, "horizontalAlignment", void 0), 
        __decorate$57([ Property("-1") ], Annotation.prototype, "zIndex", void 0), Annotation;
    }(ChildProperty), Arrow = function(_super) {
        function Arrow() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$144(Arrow, _super), __decorate$57([ Property("Start") ], Arrow.prototype, "position", void 0), 
        __decorate$57([ Property("false") ], Arrow.prototype, "showArrow", void 0), __decorate$57([ Property(2) ], Arrow.prototype, "size", void 0), 
        __decorate$57([ Property("black") ], Arrow.prototype, "color", void 0), __decorate$57([ Property(0) ], Arrow.prototype, "offSet", void 0), 
        Arrow;
    }(ChildProperty), Font$4 = function(_super) {
        function Font() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$144(Font, _super), __decorate$57([ Property(null) ], Font.prototype, "size", void 0), 
        __decorate$57([ Property(null) ], Font.prototype, "color", void 0), __decorate$57([ Property(null) ], Font.prototype, "fontFamily", void 0), 
        __decorate$57([ Property(null) ], Font.prototype, "fontWeight", void 0), __decorate$57([ Property(null) ], Font.prototype, "fontStyle", void 0), 
        __decorate$57([ Property(1) ], Font.prototype, "opacity", void 0), Font;
    }(ChildProperty), Border$4 = function(_super) {
        function Border() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$144(Border, _super), __decorate$57([ Property("") ], Border.prototype, "color", void 0), 
        __decorate$57([ Property(0) ], Border.prototype, "width", void 0), Border;
    }(ChildProperty), TooltipSettings$3 = function(_super) {
        function TooltipSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$144(TooltipSettings, _super), __decorate$57([ Property(!1) ], TooltipSettings.prototype, "visible", void 0), 
        __decorate$57([ Property("") ], TooltipSettings.prototype, "template", void 0), 
        __decorate$57([ Property("#363F4C") ], TooltipSettings.prototype, "fill", void 0), 
        __decorate$57([ Complex({
            color: "transparent",
            width: 1
        }, Border$4) ], TooltipSettings.prototype, "border", void 0), __decorate$57([ Complex(Theme$2.tooltipLabelFont, Font$4) ], TooltipSettings.prototype, "textStyle", void 0), 
        __decorate$57([ Property(null) ], TooltipSettings.prototype, "format", void 0), 
        __decorate$57([ Property(null) ], TooltipSettings.prototype, "valuePath", void 0), 
        TooltipSettings;
    }(ChildProperty), Margin$3 = function(_super) {
        function Margin() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$144(Margin, _super), __decorate$57([ Property(10) ], Margin.prototype, "left", void 0), 
        __decorate$57([ Property(10) ], Margin.prototype, "right", void 0), __decorate$57([ Property(10) ], Margin.prototype, "top", void 0), 
        __decorate$57([ Property(10) ], Margin.prototype, "bottom", void 0), Margin;
    }(ChildProperty), ColorMappingSettings = function(_super) {
        function ColorMappingSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$144(ColorMappingSettings, _super), __decorate$57([ Property(null) ], ColorMappingSettings.prototype, "from", void 0), 
        __decorate$57([ Property(null) ], ColorMappingSettings.prototype, "to", void 0), 
        __decorate$57([ Property(null) ], ColorMappingSettings.prototype, "value", void 0), 
        __decorate$57([ Property(null) ], ColorMappingSettings.prototype, "color", void 0), 
        __decorate$57([ Property(null) ], ColorMappingSettings.prototype, "label", void 0), 
        ColorMappingSettings;
    }(ChildProperty), SelectionSettings$1 = function(_super) {
        function SelectionSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$144(SelectionSettings, _super), __decorate$57([ Property(!1) ], SelectionSettings.prototype, "enable", void 0), 
        __decorate$57([ Property("#D2691E") ], SelectionSettings.prototype, "fill", void 0), 
        __decorate$57([ Property(1) ], SelectionSettings.prototype, "opacity", void 0), 
        __decorate$57([ Property(!1) ], SelectionSettings.prototype, "enableMultiSelect", void 0), 
        __decorate$57([ Complex({
            color: "transparent",
            width: 0
        }, Border$4) ], SelectionSettings.prototype, "border", void 0), SelectionSettings;
    }(ChildProperty), HighlightSettings = function(_super) {
        function HighlightSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$144(HighlightSettings, _super), __decorate$57([ Property("#6B8E23") ], HighlightSettings.prototype, "fill", void 0), 
        __decorate$57([ Property(!1) ], HighlightSettings.prototype, "enable", void 0), 
        __decorate$57([ Property(1) ], HighlightSettings.prototype, "opacity", void 0), 
        __decorate$57([ Complex({
            color: "transparent",
            width: 0
        }, Border$4) ], HighlightSettings.prototype, "border", void 0), HighlightSettings;
    }(ChildProperty), NavigationLineSettings = function(_super) {
        function NavigationLineSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$144(NavigationLineSettings, _super), __decorate$57([ Property(!1) ], NavigationLineSettings.prototype, "visible", void 0), 
        __decorate$57([ Property(1) ], NavigationLineSettings.prototype, "width", void 0), 
        __decorate$57([ Property(null) ], NavigationLineSettings.prototype, "longitude", void 0), 
        __decorate$57([ Property(null) ], NavigationLineSettings.prototype, "latitude", void 0), 
        __decorate$57([ Property("") ], NavigationLineSettings.prototype, "dashArray", void 0), 
        __decorate$57([ Property("black") ], NavigationLineSettings.prototype, "color", void 0), 
        __decorate$57([ Property(0) ], NavigationLineSettings.prototype, "angle", void 0), 
        __decorate$57([ Complex({
            showArrow: !1,
            position: "Start",
            size: 5,
            color: "black"
        }, Arrow) ], NavigationLineSettings.prototype, "arrowSettings", void 0), __decorate$57([ Complex({}, SelectionSettings$1) ], NavigationLineSettings.prototype, "selectionSettings", void 0), 
        __decorate$57([ Complex({}, HighlightSettings) ], NavigationLineSettings.prototype, "highlightSettings", void 0), 
        NavigationLineSettings;
    }(ChildProperty), BubbleSettings = function(_super) {
        function BubbleSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$144(BubbleSettings, _super), __decorate$57([ Complex({}, Border$4) ], BubbleSettings.prototype, "border", void 0), 
        __decorate$57([ Property(!1) ], BubbleSettings.prototype, "visible", void 0), __decorate$57([ Property([]) ], BubbleSettings.prototype, "dataSource", void 0), 
        __decorate$57([ Property(1e3) ], BubbleSettings.prototype, "animationDuration", void 0), 
        __decorate$57([ Property(0) ], BubbleSettings.prototype, "animationDelay", void 0), 
        __decorate$57([ Property("") ], BubbleSettings.prototype, "fill", void 0), __decorate$57([ Property(10) ], BubbleSettings.prototype, "minRadius", void 0), 
        __decorate$57([ Property(20) ], BubbleSettings.prototype, "maxRadius", void 0), 
        __decorate$57([ Property(1) ], BubbleSettings.prototype, "opacity", void 0), __decorate$57([ Property(null) ], BubbleSettings.prototype, "valuePath", void 0), 
        __decorate$57([ Property("Circle") ], BubbleSettings.prototype, "bubbleType", void 0), 
        __decorate$57([ Property(null) ], BubbleSettings.prototype, "colorValuePath", void 0), 
        __decorate$57([ Collection([], ColorMappingSettings) ], BubbleSettings.prototype, "colorMapping", void 0), 
        __decorate$57([ Complex({}, TooltipSettings$3) ], BubbleSettings.prototype, "tooltipSettings", void 0), 
        __decorate$57([ Complex({}, SelectionSettings$1) ], BubbleSettings.prototype, "selectionSettings", void 0), 
        __decorate$57([ Complex({}, HighlightSettings) ], BubbleSettings.prototype, "highlightSettings", void 0), 
        BubbleSettings;
    }(ChildProperty), CommonTitleSettings = function(_super) {
        function CommonTitleSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$144(CommonTitleSettings, _super), __decorate$57([ Property("") ], CommonTitleSettings.prototype, "text", void 0), 
        __decorate$57([ Property("") ], CommonTitleSettings.prototype, "description", void 0), 
        CommonTitleSettings;
    }(ChildProperty), SubTitleSettings = function(_super) {
        function SubTitleSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$144(SubTitleSettings, _super), __decorate$57([ Complex({}, Font$4) ], SubTitleSettings.prototype, "textStyle", void 0), 
        __decorate$57([ Property("Center") ], SubTitleSettings.prototype, "alignment", void 0), 
        SubTitleSettings;
    }(CommonTitleSettings), TitleSettings = function(_super) {
        function TitleSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$144(TitleSettings, _super), __decorate$57([ Complex({}, Font$4) ], TitleSettings.prototype, "textStyle", void 0), 
        __decorate$57([ Property("Center") ], TitleSettings.prototype, "alignment", void 0), 
        __decorate$57([ Complex({}, SubTitleSettings) ], TitleSettings.prototype, "subtitleSettings", void 0), 
        TitleSettings;
    }(CommonTitleSettings), ZoomSettings$1 = function(_super) {
        function ZoomSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$144(ZoomSettings, _super), __decorate$57([ Property(!1) ], ZoomSettings.prototype, "enable", void 0), 
        __decorate$57([ Property("Horizontal") ], ZoomSettings.prototype, "toolBarOrientation", void 0), 
        __decorate$57([ Property("#737373") ], ZoomSettings.prototype, "color", void 0), 
        __decorate$57([ Property("#e61576") ], ZoomSettings.prototype, "highlightColor", void 0), 
        __decorate$57([ Property("#e61576") ], ZoomSettings.prototype, "selectionColor", void 0), 
        __decorate$57([ Property("Far") ], ZoomSettings.prototype, "horizontalAlignment", void 0), 
        __decorate$57([ Property("Near") ], ZoomSettings.prototype, "verticalAlignment", void 0), 
        __decorate$57([ Property([ "ZoomIn", "ZoomOut", "Reset" ]) ], ZoomSettings.prototype, "toolbars", void 0), 
        __decorate$57([ Property(!0) ], ZoomSettings.prototype, "mouseWheelZoom", void 0), 
        __decorate$57([ Property(!1) ], ZoomSettings.prototype, "doubleClickZoom", void 0), 
        __decorate$57([ Property(!1) ], ZoomSettings.prototype, "pinchZooming", void 0), 
        __decorate$57([ Property(!1) ], ZoomSettings.prototype, "zoomOnClick", void 0), 
        __decorate$57([ Property(1) ], ZoomSettings.prototype, "zoomFactor", void 0), __decorate$57([ Property(10) ], ZoomSettings.prototype, "maxZoom", void 0), 
        __decorate$57([ Property(1) ], ZoomSettings.prototype, "minZoom", void 0), ZoomSettings;
    }(ChildProperty), LegendSettings$1 = function(_super) {
        function LegendSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$144(LegendSettings, _super), __decorate$57([ Property(!1) ], LegendSettings.prototype, "toggleVisibility", void 0), 
        __decorate$57([ Property(!1) ], LegendSettings.prototype, "visible", void 0), __decorate$57([ Property("transparent") ], LegendSettings.prototype, "background", void 0), 
        __decorate$57([ Property("Layers") ], LegendSettings.prototype, "type", void 0), 
        __decorate$57([ Property(!1) ], LegendSettings.prototype, "invertedPointer", void 0), 
        __decorate$57([ Property("After") ], LegendSettings.prototype, "labelPosition", void 0), 
        __decorate$57([ Property("None") ], LegendSettings.prototype, "labelDisplayMode", void 0), 
        __decorate$57([ Property("Circle") ], LegendSettings.prototype, "shape", void 0), 
        __decorate$57([ Property("") ], LegendSettings.prototype, "width", void 0), __decorate$57([ Property("") ], LegendSettings.prototype, "height", void 0), 
        __decorate$57([ Complex({}, Font$4) ], LegendSettings.prototype, "textStyle", void 0), 
        __decorate$57([ Property(15) ], LegendSettings.prototype, "shapeWidth", void 0), 
        __decorate$57([ Property(15) ], LegendSettings.prototype, "shapeHeight", void 0), 
        __decorate$57([ Property(10) ], LegendSettings.prototype, "shapePadding", void 0), 
        __decorate$57([ Complex({
            color: "#000000",
            width: 0
        }, Border$4) ], LegendSettings.prototype, "border", void 0), __decorate$57([ Complex({
            color: "#000000",
            width: 0
        }, Border$4) ], LegendSettings.prototype, "shapeBorder", void 0), __decorate$57([ Complex({}, CommonTitleSettings) ], LegendSettings.prototype, "title", void 0), 
        __decorate$57([ Complex({}, Font$4) ], LegendSettings.prototype, "titleStyle", void 0), 
        __decorate$57([ Property("Bottom") ], LegendSettings.prototype, "position", void 0), 
        __decorate$57([ Property("Center") ], LegendSettings.prototype, "alignment", void 0), 
        __decorate$57([ Property("None") ], LegendSettings.prototype, "orientation", void 0), 
        __decorate$57([ Property({
            x: 0,
            y: 0
        }) ], LegendSettings.prototype, "location", void 0), __decorate$57([ Property(null) ], LegendSettings.prototype, "fill", void 0), 
        __decorate$57([ Property("Default") ], LegendSettings.prototype, "mode", void 0), 
        LegendSettings;
    }(ChildProperty), DataLabelSettings$1 = function(_super) {
        function DataLabelSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$144(DataLabelSettings, _super), __decorate$57([ Property(!1) ], DataLabelSettings.prototype, "visible", void 0), 
        __decorate$57([ Complex({
            width: 0,
            color: "transparent"
        }, Border$4) ], DataLabelSettings.prototype, "border", void 0), __decorate$57([ Property("black") ], DataLabelSettings.prototype, "fill", void 0), 
        __decorate$57([ Property(1) ], DataLabelSettings.prototype, "opacity", void 0), 
        __decorate$57([ Property(5) ], DataLabelSettings.prototype, "rx", void 0), __decorate$57([ Property(5) ], DataLabelSettings.prototype, "ry", void 0), 
        __decorate$57([ Complex({}, Font$4) ], DataLabelSettings.prototype, "textStyle", void 0), 
        __decorate$57([ Property("") ], DataLabelSettings.prototype, "labelPath", void 0), 
        __decorate$57([ Property("None") ], DataLabelSettings.prototype, "smartLabelMode", void 0), 
        __decorate$57([ Property("None") ], DataLabelSettings.prototype, "intersectionAction", void 0), 
        __decorate$57([ Property("") ], DataLabelSettings.prototype, "template", void 0), 
        DataLabelSettings;
    }(ChildProperty), ShapeSettings = function(_super) {
        function ShapeSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$144(ShapeSettings, _super), __decorate$57([ Property("#A6A6A6") ], ShapeSettings.prototype, "fill", void 0), 
        __decorate$57([ Property([]) ], ShapeSettings.prototype, "palette", void 0), __decorate$57([ Property(5) ], ShapeSettings.prototype, "circleRadius", void 0), 
        __decorate$57([ Complex({
            width: 0,
            color: "#000000"
        }, Border$4) ], ShapeSettings.prototype, "border", void 0), __decorate$57([ Property("") ], ShapeSettings.prototype, "dashArray", void 0), 
        __decorate$57([ Property(1) ], ShapeSettings.prototype, "opacity", void 0), __decorate$57([ Property(null) ], ShapeSettings.prototype, "colorValuePath", void 0), 
        __decorate$57([ Property(null) ], ShapeSettings.prototype, "valuePath", void 0), 
        __decorate$57([ Collection([], ColorMappingSettings) ], ShapeSettings.prototype, "colorMapping", void 0), 
        __decorate$57([ Property(!1) ], ShapeSettings.prototype, "autofill", void 0), ShapeSettings;
    }(ChildProperty), MarkerSettings$1 = function(_super) {
        function MarkerSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$144(MarkerSettings, _super), __decorate$57([ Complex({
            color: "transparent",
            width: 1
        }, Border$4) ], MarkerSettings.prototype, "border", void 0), __decorate$57([ Property(null) ], MarkerSettings.prototype, "dashArray", void 0), 
        __decorate$57([ Property(!1) ], MarkerSettings.prototype, "visible", void 0), __decorate$57([ Property("#FF471A") ], MarkerSettings.prototype, "fill", void 0), 
        __decorate$57([ Property(10) ], MarkerSettings.prototype, "height", void 0), __decorate$57([ Property(10) ], MarkerSettings.prototype, "width", void 0), 
        __decorate$57([ Property(1) ], MarkerSettings.prototype, "opacity", void 0), __decorate$57([ Property("Balloon") ], MarkerSettings.prototype, "shape", void 0), 
        __decorate$57([ Property("") ], MarkerSettings.prototype, "legendText", void 0), 
        __decorate$57([ Property(new Point(0, 0)) ], MarkerSettings.prototype, "offset", void 0), 
        __decorate$57([ Property("") ], MarkerSettings.prototype, "imageUrl", void 0), __decorate$57([ Property(null) ], MarkerSettings.prototype, "template", void 0), 
        __decorate$57([ Property([]) ], MarkerSettings.prototype, "dataSource", void 0), 
        __decorate$57([ Complex({}, TooltipSettings$3) ], MarkerSettings.prototype, "tooltipSettings", void 0), 
        __decorate$57([ Property(1e3) ], MarkerSettings.prototype, "animationDuration", void 0), 
        __decorate$57([ Property(0) ], MarkerSettings.prototype, "animationDelay", void 0), 
        __decorate$57([ Complex({}, SelectionSettings$1) ], MarkerSettings.prototype, "selectionSettings", void 0), 
        __decorate$57([ Complex({}, HighlightSettings) ], MarkerSettings.prototype, "highlightSettings", void 0), 
        MarkerSettings;
    }(ChildProperty), LayerSettings = function(_super) {
        function LayerSettings() {
            var _this = null !== _super && _super.apply(this, arguments) || this;
            return _this.isBaseLayer = !1, _this;
        }
        return __extends$144(LayerSettings, _super), __decorate$57([ Property(null) ], LayerSettings.prototype, "shapeData", void 0), 
        __decorate$57([ Property() ], LayerSettings.prototype, "query", void 0), __decorate$57([ Complex({}, ShapeSettings) ], LayerSettings.prototype, "shapeSettings", void 0), 
        __decorate$57([ Property([]) ], LayerSettings.prototype, "dataSource", void 0), 
        __decorate$57([ Property("Layer") ], LayerSettings.prototype, "type", void 0), __decorate$57([ Property("Geographic") ], LayerSettings.prototype, "geometryType", void 0), 
        __decorate$57([ Property("Aerial") ], LayerSettings.prototype, "bingMapType", void 0), 
        __decorate$57([ Property("") ], LayerSettings.prototype, "key", void 0), __decorate$57([ Property("Geometry") ], LayerSettings.prototype, "layerType", void 0), 
        __decorate$57([ Property("http://a.tile.openstreetmap.org/level/tileX/tileY.png") ], LayerSettings.prototype, "urlTemplate", void 0), 
        __decorate$57([ Property(!0) ], LayerSettings.prototype, "visible", void 0), __decorate$57([ Property("name") ], LayerSettings.prototype, "shapeDataPath", void 0), 
        __decorate$57([ Property("name") ], LayerSettings.prototype, "shapePropertyPath", void 0), 
        __decorate$57([ Property(0) ], LayerSettings.prototype, "animationDuration", void 0), 
        __decorate$57([ Collection([], MarkerSettings$1) ], LayerSettings.prototype, "markerSettings", void 0), 
        __decorate$57([ Complex({}, DataLabelSettings$1) ], LayerSettings.prototype, "dataLabelSettings", void 0), 
        __decorate$57([ Collection([], BubbleSettings) ], LayerSettings.prototype, "bubbleSettings", void 0), 
        __decorate$57([ Collection([], NavigationLineSettings) ], LayerSettings.prototype, "navigationLineSettings", void 0), 
        __decorate$57([ Complex({}, TooltipSettings$3) ], LayerSettings.prototype, "tooltipSettings", void 0), 
        __decorate$57([ Complex({}, SelectionSettings$1) ], LayerSettings.prototype, "selectionSettings", void 0), 
        __decorate$57([ Complex({}, HighlightSettings) ], LayerSettings.prototype, "highlightSettings", void 0), 
        LayerSettings;
    }(ChildProperty), Tile = function() {
        return function(x, y, height, width, top, left, src) {
            void 0 === height && (height = 256), void 0 === width && (width = 256), void 0 === top && (top = 0), 
            void 0 === left && (left = 0), void 0 === src && (src = null), this.x = x, this.y = y, 
            this.top = top, this.left = left, this.height = height, this.width = width, this.src = src;
        };
    }(), MapsAreaSettings = function(_super) {
        function MapsAreaSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$144(MapsAreaSettings, _super), __decorate$57([ Property("transparent") ], MapsAreaSettings.prototype, "background", void 0), 
        __decorate$57([ Complex({
            color: "transparent",
            width: 1
        }, Border$4) ], MapsAreaSettings.prototype, "border", void 0), MapsAreaSettings;
    }(ChildProperty), animationComplete$3 = "animationComplete", BingMap = function() {
        function BingMap(maps) {
            this.maps = maps;
        }
        return BingMap.prototype.getBingMap = function(tile, key, type, language) {
            for (var quadKey = "", i = this.maps.tileZoomLevel; i > 0; i--) {
                var digit = 0, mask = 1 << i - 1;
                0 != (tile.x & mask) && digit++, 0 != (tile.y & mask) && (digit += 2), quadKey = quadKey + "" + digit;
            }
            var layerType = "";
            return layerType = "Aerial" === type ? "A,G" : "AerialWithLabel" === type ? "A,G,L" : "G,VE,BX,L,LA", 
            "http://ak.dynamic.t2.tiles.virtualearth.net/comp/ch/" + quadKey + "?mkt=" + language + "&ur=IN&it=" + layerType + "&shading=hill&og=45&n=z&Key=" + key;
        }, BingMap;
    }(), ColorMapping = function() {
        function ColorMapping(maps) {
            this.maps = maps;
        }
        return ColorMapping.prototype.getShapeColorMapping = function(shapeSettings, layerData, color) {
            var equalValue = layerData[shapeSettings.colorValuePath ? shapeSettings.colorValuePath : shapeSettings.valuePath], colorValue = Number(equalValue), shapeColor = this.getColorByValue(shapeSettings.colorMapping, colorValue, equalValue);
            return shapeColor || color;
        }, ColorMapping.prototype.getColorByValue = function(colorMapping, colorValue, equalValue) {
            if (isNaN(colorValue) && isNullOrUndefined(equalValue)) return null;
            for (var fill = "", _i = 0, colorMapping_1 = colorMapping; _i < colorMapping_1.length; _i++) {
                var colorMap = colorMapping_1[_i];
                (colorMap.from && colorMap.to && colorValue >= colorMap.from && colorValue <= colorMap.to || colorMap.value === equalValue) && (fill = colorMap.color);
            }
            return fill || (colorMapping.length ? null : equalValue);
        }, ColorMapping;
    }(), LayerPanel = function() {
        function LayerPanel(map) {
            this.tileTranslatePoint = new MapLocation(0, 0), this.isMapCoordinates = !0, this.ajaxProcessCount = 0, 
            this.mapObject = map, this.ajaxModule = new Ajax(), this.ajaxResponse = [];
        }
        return LayerPanel.prototype.measureLayerPanel = function() {
            var _this = this, layerCollection = this.mapObject.layersCollection, areaRect = this.mapObject.mapAreaRect, secondaryEle = getElementByID(this.mapObject.element.id + "_Secondary_Element");
            this.mapObject.isTileMap && secondaryEle && (this.tileSvgObject = this.mapObject.renderer.createSvg({
                id: this.mapObject.element.id + "_Tile_SVG",
                width: areaRect.width,
                height: areaRect.height,
                style: "pointer-events:none"
            }), secondaryEle.appendChild(this.tileSvgObject)), this.layerGroup = this.mapObject.renderer.createGroup({
                id: this.mapObject.element.id + "_Layer_Collections",
                "clip-path": "url(#" + this.mapObject.element.id + "_MapArea_ClipRect)"
            }), this.clipRectElement = this.mapObject.renderer.drawClipPath(new RectOption$3(this.mapObject.element.id + "_MapArea_ClipRect", "transparent", {
                width: 1,
                color: "Gray"
            }, 1, {
                x: this.mapObject.isTileMap ? 0 : areaRect.x,
                y: this.mapObject.isTileMap ? 0 : areaRect.y,
                width: areaRect.width,
                height: areaRect.height
            })), this.layerGroup.appendChild(this.clipRectElement), this.mapObject.baseMapBounds = null, 
            this.mapObject.baseMapRectBounds = null, this.mapObject.baseSize = null;
            layerCollection.length;
            layerCollection.forEach(function(layer, index) {
                _this.currentLayer = layer, _this.processLayers(layer, index);
            });
        }, LayerPanel.prototype.processLayers = function(layer, layerIndex) {
            this.layerObject = this.mapObject.renderer.createGroup({
                id: this.mapObject.element.id + "_LayerIndex_" + layerIndex
            });
            var eventArgs = {
                cancel: !1,
                name: "layerRendering",
                index: layerIndex,
                layer: layer,
                maps: this.mapObject
            };
            if (this.mapObject.trigger("layerRendering", eventArgs), !eventArgs.cancel) if ("Geometry" !== layer.layerType) {
                var center = new Point(this.mapObject.centerPosition.longitude, this.mapObject.centerPosition.latitude);
                this.currentFactor = this.calculateFactor(layer), isNullOrUndefined(this.mapObject.tileZoomLevel) && (this.mapObject.tileZoomLevel = this.mapObject.zoomSettings.zoomFactor), 
                this.mapObject.tileTranslatePoint = this.panTileMap(this.mapObject.availableSize.width, this.mapObject.availableSize.height, center), 
                this.generateTiles(this.mapObject.tileZoomLevel, this.mapObject.tileTranslatePoint), 
                this.mapObject.markerModule && this.mapObject.markerModule.markerRender(this.layerObject, layerIndex, this.mapObject.tileZoomLevel), 
                this.mapObject.navigationLineModule && this.layerObject.appendChild(this.mapObject.navigationLineModule.renderNavigation(this.currentLayer, this.mapObject.tileZoomLevel, layerIndex)), 
                this.translateLayerElements(this.layerObject, layerIndex), this.layerGroup.appendChild(this.layerObject);
            } else if (!(isNullOrUndefined(layer.shapeData) || isNullOrUndefined(layer.shapeData.geometries) && isNullOrUndefined(layer.shapeData.features))) {
                var featureData = !isNullOrUndefined(layer.shapeData.geometries) && layer.shapeData.geometries.length > 0 ? layer.shapeData.geometries : layer.shapeData.features;
                layer.layerData = [];
                var bbox = layer.shapeData.bbox;
                !isNullOrUndefined(bbox) && layer.isBaseLayer ? this.mapObject.baseMapBounds = new GeoLocation({
                    min: bbox[0][1],
                    max: bbox[1][1]
                }, {
                    min: bbox[0][0],
                    max: bbox[1][0]
                }) : isNullOrUndefined(this.mapObject.baseMapBounds) && !isCustomPath(featureData) && this.calculateRectBounds(featureData), 
                this.calculatePathCollection(layerIndex, featureData);
            }
            this.mapObject.isTileMap ? this.tileSvgObject && this.tileSvgObject.appendChild(this.layerGroup) : this.mapObject.svgObject.appendChild(this.layerGroup);
        }, LayerPanel.prototype.bubbleCalculation = function(bubbleSettings, range) {
            if (null != bubbleSettings.dataSource && null != bubbleSettings) {
                if (null == bubbleSettings.colorValuePath) return;
                for (var i = 0; i < bubbleSettings.dataSource.length; i++) {
                    var bubbledata = parseFloat(bubbleSettings.dataSource[i][bubbleSettings.valuePath]);
                    0 !== i ? bubbledata > range.max ? range.max = bubbledata : bubbledata < range.min && (range.min = bubbledata) : range.max = range.min = bubbledata;
                }
            }
        }, LayerPanel.prototype.calculatePathCollection = function(layerIndex, renderData) {
            var _this = this;
            this.groupElements = [], isCustomPath(renderData) || (this.currentFactor = this.calculateFactor(this.currentLayer)), 
            this.rectBounds = null;
            var shapeSettings = this.currentLayer.shapeSettings;
            renderData.forEach(function(geometryData, index) {
                if (!isNullOrUndefined(geometryData.geometry) || !isNullOrUndefined(geometryData.coordinates)) {
                    var type = isNullOrUndefined(geometryData.geometry) ? geometryData.type : geometryData.geometry.type, coords = isNullOrUndefined(geometryData.geometry) ? geometryData.coordinates : geometryData.geometry.coordinates, data = geometryData.geometry, properties = geometryData.properties;
                    _this.generatePoints(type, coords, data, properties);
                }
            }), this.currentLayer.rectBounds = this.rectBounds, isNullOrUndefined(this.mapObject.baseMapRectBounds) && this.currentLayer.isBaseLayer && (this.mapObject.baseMapRectBounds = this.rectBounds);
            for (var colors = shapeSettings.palette.length > 1 ? shapeSettings.palette : (this.mapObject.theme, 
            [ "#B5E485", "#7BC1E8", "#DF819C", "#EC9B79", "#78D0D3", "#D6D572", "#9178E3", "#A1E5B4", "#87A4B4", "#E4C16C" ]), labelTemplateEle = createElement("div", {
                id: this.mapObject.element.id + "_LayerIndex_" + layerIndex + "_Label_Template_Group",
                className: "template",
                styles: "pointer-events: none; overflow: hidden; position: absolute;top:" + this.mapObject.mapAreaRect.y + "px;left:" + this.mapObject.mapAreaRect.x + "px;height:" + this.mapObject.mapAreaRect.height + "px;width:" + this.mapObject.mapAreaRect.width + "px;"
            }), _loop_1 = function(i) {
                var k = void 0, currentShapeData = this_1.currentLayer.layerData[i], pathOptions = void 0, polyLineOptions = void 0, circleOptions = void 0, groupElement = void 0, path = "", points = "", fill = shapeSettings.autofill ? colors[i % colors.length] : shapeSettings.fill;
                null === shapeSettings.colorValuePath || isNullOrUndefined(currentShapeData.property) || (null !== (k = checkShapeDataFields(this_1.currentLayer.dataSource, currentShapeData.property, this_1.currentLayer.shapeDataPath, this_1.currentLayer.shapePropertyPath)) && 0 === shapeSettings.colorMapping.length ? fill = this_1.currentLayer.dataSource[k][shapeSettings.colorValuePath] : currentShapeData.property[shapeSettings.colorValuePath] && 0 === this_1.currentLayer.dataSource.length && 0 === shapeSettings.colorMapping.length && (fill = currentShapeData.property[shapeSettings.colorValuePath]));
                var shapeID = this_1.mapObject.element.id + "_LayerIndex_" + layerIndex + "_ShapeIndex_" + i + "_dataIndex_" + k;
                fill = this_1.getShapeColorMapping(this_1.currentLayer, currentShapeData.property, fill);
                var eventArgs = {
                    cancel: !1,
                    name: "shapeRendering",
                    index: i,
                    data: this_1.currentLayer.dataSource ? this_1.currentLayer.dataSource[k] : null,
                    maps: this_1.mapObject,
                    shape: shapeSettings,
                    fill: fill,
                    border: {
                        width: shapeSettings.border.width,
                        color: shapeSettings.border.color
                    }
                };
                this_1.mapObject.trigger("shapeRendering", eventArgs);
                var drawingType = isNullOrUndefined(currentShapeData._isMultiPolygon) ? isNullOrUndefined(currentShapeData.type) ? currentShapeData[0].type : currentShapeData.type : "MultiPolygon";
                if (drawingType = "Polygon" === drawingType || "MultiPolygon" === drawingType ? "Polygon" : drawingType, 
                this_1.groupElements.length < 1) groupElement = this_1.mapObject.renderer.createGroup({
                    id: this_1.mapObject.element.id + "_LayerIndex_" + layerIndex + "_" + drawingType + "_Group",
                    transform: ""
                }), this_1.groupElements.push(groupElement); else for (var i_1 = 0; i_1 < this_1.groupElements.length; i_1++) {
                    var ele = this_1.groupElements[i_1];
                    if (ele.id.indexOf(drawingType) > -1) {
                        groupElement = ele;
                        break;
                    }
                    if (i_1 >= this_1.groupElements.length - 1) {
                        groupElement = this_1.mapObject.renderer.createGroup({
                            id: this_1.mapObject.element.id + "_LayerIndex_" + layerIndex + "_" + drawingType + "_Group"
                        }), this_1.groupElements.push(groupElement);
                        break;
                    }
                }
                var pathEle = void 0;
                switch (drawingType) {
                  case "Polygon":
                    currentShapeData._isMultiPolygon ? path = this_1.generateMultiPolygonPath(currentShapeData) : (path += "M" + currentShapeData[0].point.x + " " + currentShapeData[0].point.y, 
                    currentShapeData.map(function(shapeData) {
                        path += " L " + shapeData.point.x + " " + shapeData.point.y;
                    })), (path += " z ").length > 3 && (pathOptions = new PathOption$3(shapeID, eventArgs.fill, eventArgs.border.width, eventArgs.border.color, shapeSettings.opacity, shapeSettings.dashArray, path), 
                    pathEle = this_1.mapObject.renderer.drawPath(pathOptions));
                    break;

                  case "LineString":
                    currentShapeData.map(function(lineData) {
                        points += lineData.point.x + " , " + lineData.point.y + " ";
                    }), polyLineOptions = new PolylineOption(shapeID, points, eventArgs.fill, eventArgs.border.width, eventArgs.border.color, shapeSettings.opacity, shapeSettings.dashArray), 
                    pathEle = this_1.mapObject.renderer.drawPolyline(polyLineOptions);
                    break;

                  case "Point":
                    var pointData = currentShapeData.point;
                    circleOptions = new CircleOption$1(shapeID, eventArgs.fill, eventArgs.border, shapeSettings.opacity, pointData.x, pointData.y, shapeSettings.circleRadius, null), 
                    pathEle = this_1.mapObject.renderer.drawCircle(circleOptions);
                    break;

                  case "Path":
                    path = currentShapeData.point, pathOptions = new PathOption$3(shapeID, eventArgs.fill, eventArgs.border.width, eventArgs.border.color, shapeSettings.opacity, shapeSettings.dashArray, path), 
                    pathEle = this_1.mapObject.renderer.drawPath(pathOptions);
                }
                isNullOrUndefined(pathEle) || (pathEle.setAttribute("aria-label", isNullOrUndefined(currentShapeData.property) ? "" : currentShapeData.property[this_1.currentLayer.shapePropertyPath]), 
                pathEle.setAttribute("tabindex", (this_1.mapObject.tabIndex + i + 2).toString()), 
                groupElement.appendChild(pathEle));
            }, this_1 = this, i = 0; i < this.currentLayer.layerData.length; i++) _loop_1(i);
            var bubbleG;
            if (this.currentLayer.bubbleSettings.length && this.mapObject.bubbleModule) for (var bubble_1, length_1 = this.currentLayer.bubbleSettings.length, _loop_2 = function(j) {
                bubble_1 = this_2.currentLayer.bubbleSettings[j], bubbleG = this_2.mapObject.renderer.createGroup({
                    id: this_2.mapObject.element.id + "_LayerIndex_" + layerIndex + "_bubble_Group_" + j
                });
                var range = {
                    min: 0,
                    max: 0
                };
                this_2.bubbleCalculation(bubble_1, range), bubble_1.dataSource.map(function(bubbleData, i) {
                    _this.renderBubble(_this.currentLayer, bubbleData, colors[i % colors.length], range, j, i, bubbleG, layerIndex, bubble_1);
                }), this_2.groupElements.push(bubbleG);
            }, this_2 = this, j = 0; j < length_1; j++) _loop_2(j);
            var group = this.mapObject.renderer.createGroup({
                id: this.mapObject.element.id + "_layerIndex_" + layerIndex + "_dataLableIndex_Group",
                style: "pointer-events: none;"
            });
            this.mapObject.dataLabelModule && this.currentLayer.dataLabelSettings.visible && (renderData.map(function(currentShapeData, i) {
                _this.renderLabel(_this.currentLayer, layerIndex, currentShapeData, group, i, labelTemplateEle);
            }), this.groupElements.push(group)), this.mapObject.navigationLineModule && this.groupElements.push(this.mapObject.navigationLineModule.renderNavigation(this.currentLayer, this.currentFactor, layerIndex)), 
            this.groupElements.map(function(element) {
                _this.layerObject.appendChild(element);
            }), this.mapObject.markerModule && this.mapObject.markerModule.markerRender(this.layerObject, layerIndex, this.currentFactor), 
            this.translateLayerElements(this.layerObject, layerIndex), this.layerGroup.appendChild(this.layerObject);
        }, LayerPanel.prototype.renderLabel = function(layer, layerIndex, shape, group, shapeIndex, labelTemplateEle) {
            this.mapObject.dataLabelModule.renderLabel(layer, layerIndex, shape, layer.layerData, group, labelTemplateEle, shapeIndex);
        }, LayerPanel.prototype.generateMultiPolygonPath = function(currentShapeData) {
            for (var path = "", j = 0; j < currentShapeData.length; j++) path += "M" + currentShapeData[j][0].point.x + " " + currentShapeData[j][0].point.y, 
            currentShapeData[j].map(function(shapeData) {
                path += " L " + shapeData.point.x + " " + shapeData.point.y;
            });
            return path;
        }, LayerPanel.prototype.renderBubble = function(layer, bubbleData, color, range, bubbleIndex, dataIndex, group, layerIndex, bubbleSettings) {
            if (isNullOrUndefined(this.mapObject.bubbleModule) || !bubbleSettings.visible) return null;
            color = bubbleSettings.fill ? bubbleSettings.fill : color, this.mapObject.bubbleModule.id = this.mapObject.element.id + "_LayerIndex_" + layerIndex + "_BubbleIndex_" + bubbleIndex + "_dataIndex_" + dataIndex, 
            this.mapObject.bubbleModule.renderBubble(bubbleSettings, bubbleData, color, range, bubbleIndex, dataIndex, layerIndex, layer, group);
        }, LayerPanel.prototype.getShapeColorMapping = function(layer, shape, color) {
            if (color = color || layer.shapeSettings.fill, 0 === layer.shapeSettings.colorMapping.length && isNullOrUndefined(layer.dataSource)) return color;
            var index = checkShapeDataFields(layer.dataSource, shape, layer.shapeDataPath, layer.shapePropertyPath), colorMapping = new ColorMapping(this.mapObject);
            return isNullOrUndefined(layer.dataSource[index]) ? color : colorMapping.getShapeColorMapping(layer.shapeSettings, layer.dataSource[index], color);
        }, LayerPanel.prototype.generatePoints = function(type, coordinates, data, properties) {
            var latitude, longitude, _this = this, newData = [];
            switch (type.toLowerCase()) {
              case "polygon":
                (newData = this.calculatePolygonBox(coordinates[0], data, properties)).length > 0 && (newData.property = properties, 
                newData.type = type, newData._isMultiPolygon = !1, this.currentLayer.layerData.push(newData));
                break;

              case "multipolygon":
                for (var multiPolygonDatas = [], i = 0; i < coordinates.length; i++) (newData = this.calculatePolygonBox(coordinates[i][0], data, properties)).length > 0 && multiPolygonDatas.push(newData);
                multiPolygonDatas.property = properties, multiPolygonDatas.type = type, multiPolygonDatas._isMultiPolygon = !0, 
                this.currentLayer.layerData.push(multiPolygonDatas);
                break;

              case "linestring":
                coordinates.map(function(points, index) {
                    latitude = points[1], longitude = points[0];
                    var point = convertGeoToPoint(latitude, longitude, _this.currentFactor, _this.currentLayer, _this.mapObject);
                    newData.push({
                        point: point,
                        lat: latitude,
                        lng: longitude
                    });
                }), newData.property = properties, newData.type = type, this.currentLayer.layerData.push(newData);
                break;

              case "point":
                latitude = coordinates[1], longitude = coordinates[0];
                var point = convertGeoToPoint(latitude, longitude, this.currentFactor, this.currentLayer, this.mapObject);
                this.currentLayer.layerData.push({
                    point: point,
                    type: type,
                    lat: latitude,
                    lng: longitude,
                    property: properties
                });
                break;

              case "path":
                this.currentLayer.layerData.push({
                    point: data.d,
                    type: type,
                    property: properties
                });
            }
        }, LayerPanel.prototype.calculateFactor = function(layer) {
            var horFactor, mapHeight, mapWidth, verFactor = 1, bounds = this.mapObject.baseMapBounds, mapSize = new Size$3(this.mapObject.mapAreaRect.width, this.mapObject.mapAreaRect.height - 5);
            if (bounds) {
                var start = convertGeoToPoint(bounds.latitude.min, bounds.longitude.min, null, layer, this.mapObject), end = convertGeoToPoint(bounds.latitude.max, bounds.longitude.max, null, layer, this.mapObject);
                mapHeight = end.y - start.y, mapWidth = end.x - start.x;
            } else mapHeight = mapWidth = 500;
            return horFactor = mapHeight < mapSize.height ? parseFloat(Math.abs(100 * Number(mapSize.height / Number(mapHeight.toString() + "e+1"))).toString().split(".")[0]) / 10 : mapSize.height / mapHeight, 
            verFactor = mapWidth < mapSize.width ? parseFloat(Math.abs(100 * Number(mapSize.width / Number(mapWidth.toString() + "e+1"))).toString().split(".")[0]) / 10 : mapSize.width / mapWidth, 
            Math.min(verFactor, horFactor);
        }, LayerPanel.prototype.translateLayerElements = function(layerElement, index) {
            var childNode;
            if (isNullOrUndefined(this.mapObject.baseMapRectBounds)) {
                if (this.mapObject.isTileMap) for (i = 0; i < layerElement.childElementCount; i++) if (!((childNode = layerElement.childNodes[i]).id.indexOf("_Markers_Group") > -1 || childNode.id.indexOf("_bubble_Group") > -1 || childNode.id.indexOf("_dataLableIndex_Group") > -1 || childNode.id.indexOf("_line_Group") > -1)) {
                    transform = "scale( " + this.mapObject.scale + " ) translate( " + this.mapObject.translatePoint.x + " " + this.mapObject.translatePoint.y + " ) ";
                    childNode.setAttribute("transform", transform);
                }
            } else {
                var duration = this.currentLayer.animationDuration, animate$$1 = 0 !== duration || isNullOrUndefined(this.mapObject.zoomModule), translate = getTranslate(this.mapObject, this.currentLayer, animate$$1), scale = this.mapObject.previousScale = translate.scale, location_1 = this.mapObject.previousPoint = translate.location;
                this.mapObject.baseTranslatePoint = this.mapObject.translatePoint = location_1, 
                this.mapObject.baseScale = this.mapObject.scale = scale;
                for (var i = 0; i < layerElement.childElementCount; i++) if (!((childNode = layerElement.childNodes[i]).id.indexOf("_Markers_Group") > -1 || childNode.id.indexOf("_bubble_Group") > -1 || childNode.id.indexOf("_dataLableIndex_Group") > -1)) {
                    var transform = "scale( " + scale + " ) translate( " + location_1.x + " " + location_1.y + " ) ";
                    childNode.setAttribute("transform", transform), duration > 0 && !isNullOrUndefined(this.mapObject.zoomModule) && (translate = getTranslate(this.mapObject, this.currentLayer), 
                    this.mapObject.scale = translate.scale, this.mapObject.translatePoint = translate.location);
                }
            }
        }, LayerPanel.prototype.calculateRectBounds = function(layerData) {
            var _this = this;
            layerData.forEach(function(obj, index) {
                if (!isNullOrUndefined(obj.geometry) || !isNullOrUndefined(obj.coordinates)) {
                    var type = isNullOrUndefined(obj.geometry) ? obj.type : obj.geometry.type, coordinates = isNullOrUndefined(obj.geometry) ? obj.coordinates : obj.geometry.coordinates;
                    switch (type.toLowerCase()) {
                      case "polygon":
                        _this.calculateRectBox(coordinates[0]);
                        break;

                      case "multipolygon":
                        coordinates.map(function(point, index) {
                            _this.calculateRectBox(point[0]);
                        });
                    }
                }
            });
        }, LayerPanel.prototype.calculatePolygonBox = function(coordinates, data, properties) {
            var _this = this, newData = [], bounds = this.mapObject.baseMapBounds;
            return coordinates.map(function(currentPoint, index) {
                var latitude = currentPoint[1], longitude = currentPoint[0];
                if (longitude >= bounds.longitude.min && longitude <= bounds.longitude.max && latitude >= bounds.latitude.min && latitude <= bounds.latitude.max) {
                    var point = convertGeoToPoint(latitude, longitude, _this.currentFactor, _this.currentLayer, _this.mapObject);
                    isNullOrUndefined(_this.rectBounds) ? _this.rectBounds = {
                        min: {
                            x: point.x,
                            y: point.y
                        },
                        max: {
                            x: point.x,
                            y: point.y
                        }
                    } : (_this.rectBounds.min.x = Math.min(_this.rectBounds.min.x, point.x), _this.rectBounds.min.y = Math.min(_this.rectBounds.min.y, point.y), 
                    _this.rectBounds.max.x = Math.max(_this.rectBounds.max.x, point.x), _this.rectBounds.max.y = Math.max(_this.rectBounds.max.y, point.y)), 
                    newData.push({
                        point: point,
                        lat: latitude,
                        lng: longitude
                    });
                }
            }), newData;
        }, LayerPanel.prototype.calculateRectBox = function(coordinates) {
            var _this = this;
            coordinates.forEach(function(currentCoords) {
                isNullOrUndefined(_this.mapObject.baseMapBounds) ? _this.mapObject.baseMapBounds = new GeoLocation({
                    min: currentCoords[1],
                    max: currentCoords[1]
                }, {
                    min: currentCoords[0],
                    max: currentCoords[0]
                }) : (_this.mapObject.baseMapBounds.latitude.min = Math.min(_this.mapObject.baseMapBounds.latitude.min, currentCoords[1]), 
                _this.mapObject.baseMapBounds.latitude.max = Math.max(_this.mapObject.baseMapBounds.latitude.max, currentCoords[1]), 
                _this.mapObject.baseMapBounds.longitude.min = Math.min(_this.mapObject.baseMapBounds.longitude.min, currentCoords[0]), 
                _this.mapObject.baseMapBounds.longitude.max = Math.max(_this.mapObject.baseMapBounds.longitude.max, currentCoords[0]));
            });
        }, LayerPanel.prototype.generateTiles = function(zoomLevel, tileTranslatePoint) {
            var userLang = this.mapObject.locale, size = this.mapObject.availableSize;
            this.tiles = [];
            var xcount, ycount;
            xcount = ycount = Math.pow(2, zoomLevel);
            size.width, size.height;
            var baseLayer = this.mapObject.layers[this.mapObject.baseLayerIndex];
            this.urlTemplate = baseLayer.urlTemplate;
            for (var endY = Math.min(ycount, (-tileTranslatePoint.y + size.height) / 256 + 1), endX = Math.min(xcount, (-tileTranslatePoint.x + size.width) / 256 + 1), startX = -(tileTranslatePoint.x + 256) / 256, startY = -(tileTranslatePoint.y + 256) / 256, bing = new BingMap(this.mapObject), i = Math.round(startX); i < Math.round(endX); i++) for (var j = Math.round(startY); j < Math.round(endY); j++) {
                var x = 256 * i + tileTranslatePoint.x, y = 256 * j + tileTranslatePoint.y;
                if (x > -256 && x <= size.width && y > -256 && y < size.height && i >= 0 && j >= 0) {
                    var tile = new Tile(i, j);
                    tile.left = x, tile.top = y, "Bing" === baseLayer.layerType ? tile.src = bing.getBingMap(tile, baseLayer.key, baseLayer.bingMapType, userLang) : tile.src = this.urlTemplate.replace("level", zoomLevel.toString()).replace("tileX", tile.x.toString()).replace("tileY", tile.y.toString()), 
                    this.tiles.push(tile);
                }
            }
            for (var proxTiles = extend([], this.tiles, [], !0), _i = 0, _a = this.mapObject.layers; _i < _a.length; _i++) {
                var layer = _a[_i];
                if ("SubLayer" === layer.type && layer.visible && ("OSM" === layer.layerType || "Bing" === layer.layerType)) for (var _b = 0, proxTiles_1 = proxTiles; _b < proxTiles_1.length; _b++) {
                    var baseTile = proxTiles_1[_b], subtile = extend(baseTile, {}, {}, !0);
                    "Bing" === layer.layerType ? subtile.src = bing.getBingMap(subtile, layer.key, layer.bingMapType, userLang) : subtile.src = layer.urlTemplate.replace("level", zoomLevel.toString()).replace("tileX", baseTile.x.toString()).replace("tileY", baseTile.y.toString()), 
                    this.tiles.push(subtile);
                }
            }
            this.arrangeTiles();
        }, LayerPanel.prototype.arrangeTiles = function() {
            var htmlString = this.templateCompiler(this.tiles);
            getElementByID(this.mapObject.element.id + "_tile_parent") && (document.getElementById(this.mapObject.element.id + "_tile_parent").innerHTML = htmlString);
        }, LayerPanel.prototype.templateCompiler = function(tiles) {
            for (var tileElment = "", _i = 0, tiles_1 = tiles; _i < tiles_1.length; _i++) {
                var tile = tiles_1[_i];
                tileElment += '<div><div style="position:absolute;left: ' + tile.left + "px;top: " + tile.top + "px;height: " + tile.height + "px;width: " + tile.width + 'px;"><img src="' + tile.src + '"></img></div></div>';
            }
            return tileElment;
        }, LayerPanel.prototype.panTileMap = function(factorX, factorY, centerPosition) {
            var x, y, level = this.mapObject.tileZoomLevel, totalSize = 256 * Math.pow(2, level), position = convertTileLatLongToPoint(centerPosition, level, {
                x: x = factorX / 2 - totalSize / 2,
                y: y = factorY / 2 - totalSize / 2
            }, this.isMapCoordinates);
            return x -= position.x - factorX / 2, y = y - (position.y - factorY / 2) + 20, this.mapObject.scale = Math.pow(2, level - 1), 
            this.mapObject.translatePoint = new Point((x - .5 * this.mapObject.scale) / this.mapObject.scale, (y - .5 * this.mapObject.scale) / this.mapObject.scale), 
            new Point(x, y);
        }, LayerPanel;
    }(), Annotations$2 = function() {
        function Annotations(map) {
            this.map = map;
        }
        return Annotations.prototype.renderAnnotationElements = function() {
            var _this = this, secondaryID = this.map.element.id + "_Secondary_Element", annotationGroup = createElement("div", {
                id: this.map.element.id + "_Annotations_Group"
            });
            annotationGroup.style.position = "absolute", annotationGroup.style.top = "0px", 
            annotationGroup.style.left = "0px", this.map.annotations.map(function(annotation, index) {
                null !== annotation.content && _this.createAnnotationTemplate(annotationGroup, annotation, index);
            }), annotationGroup.childElementCount > 0 && !isNullOrUndefined(getElementByID(secondaryID)) && getElementByID(secondaryID).appendChild(annotationGroup);
        }, Annotations.prototype.createAnnotationTemplate = function(parentElement, annotation, annotationIndex) {
            var left, top, templateFn, templateElement, map = this.map, availSize = map.availableSize, childElement = (map.element.id, 
            createElement("div", {
                id: map.element.id + "_Annotation_" + annotationIndex,
                styles: "position: absolute; z-index:" + annotation.zIndex + ";"
            })), argsData = {
                cancel: !1,
                name: "annotationRendering",
                content: annotation.content,
                annotation: annotation
            };
            if (this.map.trigger("annotationRendering", argsData), (templateFn = getTemplateFunction$3(argsData.content)) && templateFn(this.map).length) for (templateElement = templateFn(this.map); templateElement.length > 0; ) childElement.appendChild(templateElement[0]); else childElement.appendChild(createElement("div", {
                innerHTML: argsData.content
            }));
            var offset = function(childElement, parentElement) {
                var width, height;
                return parentElement.appendChild(childElement), width = childElement.offsetWidth, 
                height = childElement.offsetHeight, parentElement.removeChild(childElement), new Size$3(width, height);
            }(childElement.cloneNode(!0), map.element), elementRect = map.element.getBoundingClientRect(), bounds = map.svgObject.getBoundingClientRect();
            left = Math.abs(bounds.left - elementRect.left), top = Math.abs(bounds.top - elementRect.top);
            var annotationXValue = annotation.x.indexOf("%") > -1 ? availSize.width / 100 * parseFloat(annotation.x) : parseFloat(annotation.x), annotationYValue = annotation.y.indexOf("%") > -1 ? availSize.height / 100 * parseFloat(annotation.y) : parseFloat(annotation.y);
            switch (left = "None" === annotation.horizontalAlignment ? left + annotationXValue : left, 
            top = "None" === annotation.verticalAlignment ? top + annotationYValue : top, annotation.verticalAlignment) {
              case "Near":
                top += annotationYValue;
                break;

              case "Center":
                top = top + annotationYValue + (bounds.height / 2 - offset.height / 2);
                break;

              case "Far":
                top = top + bounds.height + annotationYValue - offset.height;
            }
            switch (annotation.horizontalAlignment) {
              case "Near":
                left += annotationXValue;
                break;

              case "Center":
                left = left + annotationXValue + (bounds.width / 2 - offset.width / 2);
                break;

              case "Far":
                left = left + bounds.width + annotationXValue - offset.width;
            }
            childElement.style.left = left + "px", childElement.style.top = top + "px", parentElement.appendChild(childElement);
        }, Annotations.prototype.getModuleName = function() {
            return "Annotations";
        }, Annotations.prototype.destroy = function(map) {}, Annotations;
    }(), ExportUtils$1 = function() {
        function ExportUtils(control) {
            this.control = control;
        }
        return ExportUtils.prototype.print = function(elements) {
            this.printWindow = window.open("", "print", "height=" + window.outerHeight + ",width=" + window.outerWidth + ",tabbar=no"), 
            this.printWindow.moveTo(0, 0), this.printWindow.resizeTo(screen.availWidth, screen.availHeight);
            var argsData = {
                cancel: !1,
                htmlContent: this.getHTMLContent(elements),
                name: "beforePrint"
            };
            this.control.trigger("beforePrint", argsData), argsData.cancel || print(argsData.htmlContent, this.printWindow);
        }, ExportUtils.prototype.getHTMLContent = function(elements) {
            var div = createElement("div");
            return elements ? elements instanceof Array ? elements.forEach(function(value) {
                div.appendChild(getElement$3(value).cloneNode(!0));
            }) : elements instanceof Element ? div.appendChild(elements.cloneNode(!0)) : div.appendChild(getElement$3(elements).cloneNode(!0)) : div.appendChild(this.control.element.cloneNode(!0)), 
            div;
        }, ExportUtils.prototype.export = function(type, fileName, orientation) {
            var _this = this, element = createElement("canvas", {
                id: "ej2-canvas",
                attrs: {
                    width: this.control.availableSize.width.toString(),
                    height: this.control.availableSize.height.toString()
                }
            }), isDownload = !(Browser.userAgent.toString().indexOf("HeadlessChrome") > -1);
            orientation = isNullOrUndefined(orientation) ? PdfPageOrientation.Landscape : orientation;
            var svgData = '<svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">' + this.control.svgObject.outerHTML + "</svg>", url = window.URL.createObjectURL(new Blob("SVG" === type ? [ svgData ] : [ new XMLSerializer().serializeToString(this.control.svgObject) ], {
                type: "image/svg+xml"
            }));
            if ("SVG" === type) this.triggerDownload(fileName, type, url, isDownload); else {
                var image_1 = new Image(), ctx_1 = element.getContext("2d");
                image_1.onload = function() {
                    if (ctx_1.drawImage(image_1, 0, 0), window.URL.revokeObjectURL(url), "PDF" === type) {
                        var document_1 = new PdfDocument(), imageString = element.toDataURL("image/jpeg").replace("image/jpeg", "image/octet-stream");
                        document_1.pageSettings.orientation = orientation, imageString = imageString.slice(imageString.indexOf(",") + 1), 
                        document_1.pages.add().graphics.drawImage(new PdfBitmap(imageString), 0, 0, _this.control.availableSize.width - 60, _this.control.availableSize.height), 
                        isDownload && (document_1.save(fileName + ".pdf"), document_1.destroy());
                    } else _this.triggerDownload(fileName, type, element.toDataURL("image/png").replace("image/png", "image/octet-stream"), isDownload);
                }, image_1.src = url;
            }
        }, ExportUtils.prototype.triggerDownload = function(fileName, type, url, isDownload) {
            createElement("a", {
                attrs: {
                    download: fileName + "." + type.toLocaleLowerCase(),
                    href: url
                }
            }).dispatchEvent(new MouseEvent(isDownload ? "click" : "move", {
                view: window,
                bubbles: !1,
                cancelable: !0
            }));
        }, ExportUtils;
    }(), __extends$142 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$56 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, Maps = function(_super) {
        function Maps(options, element) {
            var _this = _super.call(this, options, element) || this;
            return _this.isTileMap = !1, _this.baseSize = new Size$3(0, 0), _this.translatePoint = new Point(0, 0), 
            _this.baseTranslatePoint = new Point(0, 0), _this.tileTranslatePoint = new Point(0, 0), 
            _this.baseTileTranslatePoint = new Point(0, 0), _this.isDevice = Browser.isDevice, 
            _this;
        }
        return __extends$142(Maps, _super), Maps.prototype.getLocalizedLabel = function(key) {
            return this.localeObject.getConstant(key);
        }, Maps.prototype.preRender = function() {
            this.trigger("load", {
                maps: this
            }), this.themeEffect(), this.initPrivateVariable(), this.unWireEVents(), this.createSVG(), 
            this.wireEVents(), this.setCulture();
        }, Maps.prototype.setTextStyle = function(theme, font) {
            font.color = font.color || theme.color, font.size = font.size || theme.size, font.fontFamily = font.fontFamily || theme.fontFamily, 
            font.fontStyle = font.fontStyle || theme.fontStyle, font.fontWeight = font.fontWeight || theme.fontWeight;
        }, Maps.prototype.themeEffect = function() {
            switch (this.theme) {
              case "Material":
                this.setTextStyle(Theme$2.mapsTitleFont, this.titleSettings.textStyle), this.setTextStyle(Theme$2.mapsSubTitleFont, this.titleSettings.subtitleSettings.textStyle), 
                this.setTextStyle(Theme$2.legendLabelFont, this.legendSettings.textStyle), this.setTextStyle(Theme$2.legendTitleFont, this.legendSettings.textStyle), 
                this.setLabelFont(this.layers, Theme$2.dataLabelFont);
                break;

              case "Bootstrap":
                this.setTextStyle(BootstrapTheme.mapsTitleFont, this.titleSettings.textStyle), this.setTextStyle(BootstrapTheme.mapsSubTitleFont, this.titleSettings.subtitleSettings.textStyle), 
                this.setTextStyle(BootstrapTheme.legendLabelFont, this.legendSettings.textStyle), 
                this.setTextStyle(BootstrapTheme.legendTitleFont, this.legendSettings.textStyle), 
                this.setLabelFont(this.layers, BootstrapTheme.dataLabelFont);
                break;

              case "Fabric":
                this.setTextStyle(FabricTheme.mapsTitleFont, this.titleSettings.textStyle), this.setTextStyle(FabricTheme.mapsSubTitleFont, this.titleSettings.subtitleSettings.textStyle), 
                this.setTextStyle(FabricTheme.legendLabelFont, this.legendSettings.textStyle), this.setTextStyle(FabricTheme.legendTitleFont, this.legendSettings.textStyle), 
                this.setLabelFont(this.layers, FabricTheme.dataLabelFont);
                break;

              case "Highcontrast":
                this.setTextStyle(HighContrastTheme.mapsTitleFont, this.titleSettings.textStyle), 
                this.setTextStyle(HighContrastTheme.mapsSubTitleFont, this.titleSettings.subtitleSettings.textStyle), 
                this.setTextStyle(HighContrastTheme.legendLabelFont, this.legendSettings.textStyle), 
                this.setTextStyle(HighContrastTheme.legendTitleFont, this.legendSettings.textStyle), 
                this.setLabelFont(this.layers, HighContrastTheme.dataLabelFont);
            }
        }, Maps.prototype.setLabelFont = function(layers, style) {
            for (var _i = 0, layers_1 = layers; _i < layers_1.length; _i++) {
                var layer = layers_1[_i];
                this.setTextStyle(style, layer.dataLabelSettings.textStyle);
            }
        }, Maps.prototype.render = function() {
            this.findBaseAndSubLayers(), this.createSecondaryElement(), this.addTabIndex(), 
            this.renderBorder(), this.renderTitle(this.titleSettings, "title", null, null), 
            this.renderArea(), this.processRequestJsonData();
        }, Maps.prototype.processRequestJsonData = function() {
            var _this = this, length = this.layersCollection.length - 1;
            this.serverProcess = {
                request: 0,
                response: 0
            }, this.layersCollection.forEach(function(layer, layerIndex) {
                if (layer.shapeData instanceof DataManager) {
                    _this.serverProcess.request++;
                    var dataModule = layer.shapeData, queryModule = layer.query instanceof Query ? layer.query : new Query();
                    dataModule.executeQuery(queryModule).then(function(e) {
                        _this.processResponseJsonData("DataManager", e, layer);
                    });
                } else if (layer.shapeData instanceof MapAjax) {
                    _this.serverProcess.request++;
                    var mapAjax = layer.shapeData, xhr_1 = new XMLHttpRequest();
                    xhr_1.open("GET", mapAjax.url, !0), xhr_1.addEventListener("load", function() {
                        _this.processResponseJsonData("Ajax", xhr_1.responseText, layer);
                    }), xhr_1.send(mapAjax.sendData);
                }
                _this.serverProcess.request === _this.serverProcess.response && length === layerIndex && _this.processResponseJsonData(null);
            });
        }, Maps.prototype.processResponseJsonData = function(type, data, layer) {
            if (type && (this.serverProcess.response++, layer.shapeData = "DataManager" === type ? isNullOrUndefined(data.result) ? data.actual : data.result : JSON.parse(data)), 
            isNullOrUndefined(type) || this.serverProcess.request !== this.serverProcess.response) isNullOrUndefined(type) && this.renderMap(); else {
                var collection = this.layersCollection;
                this.layersCollection = [];
                for (var i = 0; i < collection.length; i++) collection[i].isBaseLayer && this.layersCollection.push(collection[i]);
                for (var j = 0; j < collection.length; j++) collection[j].isBaseLayer || this.layersCollection.push(collection[j]);
                this.renderMap();
            }
        }, Maps.prototype.renderMap = function() {
            this.legendModule && this.legendSettings.visible && this.legendModule.renderLegend(), 
            this.createTile(), this.zoomSettings.enable && this.zoomModule && this.zoomModule.createZoomingToolbars(), 
            this.mapLayerPanel.measureLayerPanel(), this.element.appendChild(this.svgObject), 
            this.arrangeTemplate(), this.annotationsModule && this.annotationsModule.renderAnnotationElements(), 
            this.zoomingChange(), this.trigger("loaded", {
                maps: this
            });
        }, Maps.prototype.renderArea = function() {
            var rect = new RectOption$3(this.element.id + "_MapAreaBorder", this.mapsArea.background, this.mapsArea.border, 1, this.mapAreaRect);
            this.svgObject.appendChild(this.renderer.drawRectangle(rect));
        }, Maps.prototype.addTabIndex = function() {
            this.element.setAttribute("aria-label", this.description || "Maps Element"), this.element.setAttribute("tabindex", this.tabIndex.toString());
        }, Maps.prototype.zoomingChange = function() {
            var left, top;
            if (getElementByID(this.element.id + "_Layer_Collections") && this.zoomModule && (this.zoomModule.layerCollectionEle = getElementByID(this.element.id + "_Layer_Collections")), 
            this.isTileMap && getElementByID(this.element.id + "_Tile_SVG") && getElementByID(this.element.id + "_tile_parent")) {
                var tileRect = getElementByID(this.element.id + "_tile_parent").getBoundingClientRect(), tileSvgRect = getElementByID(this.element.id + "_Tile_SVG").getBoundingClientRect();
                left = tileRect.left - tileSvgRect.left, top = tileRect.top - tileSvgRect.top, getElementByID(this.element.id + "_Tile_SVG").setAttribute("transform", "translate(" + left + " " + top + ")");
                var markerTemplateElements = document.getElementsByClassName("template");
                if (!isNullOrUndefined(markerTemplateElements) && markerTemplateElements.length > 0) for (var i = 0; i < markerTemplateElements.length; i++) {
                    var templateGroupEle = markerTemplateElements[i];
                    templateGroupEle.style.left = left + "px", templateGroupEle.style.top = top + "px";
                }
            }
            if (this.zoomSettings.zoomFactor >= 1) {
                this.zoomModule && this.zoomModule.toolBarGroup && this.zoomSettings.enable && this.zoomModule.alignToolBar();
                var elements = this.svgObject.querySelector("#" + this.element.id + "_Layer_Collections");
                if (!isNullOrUndefined(elements) && elements.childElementCount > 0) for (i = 0; i < elements.childNodes.length; i++) {
                    var childElement = elements.childNodes[i];
                    if ("g" === childElement.tagName) for (var layerIndex = parseFloat(childElement.id.split("_")[2]), j = 0; j < childElement.childNodes.length; j++) {
                        var childNode = childElement.childNodes[j];
                        childNode.id.indexOf("_Markers_Group") > -1 || childNode.id.indexOf("_bubble_Group") > -1 || childNode.id.indexOf("_dataLableIndex_Group") > -1 || changeBorderWidth(childNode, layerIndex, this.scale, this);
                    }
                }
                this.zoomModule && this.previousScale !== this.scale && this.zoomModule.applyTransform(!0);
            }
        }, Maps.prototype.createSecondaryElement = function() {
            if (isNullOrUndefined(document.getElementById(this.element.id + "_Secondary_Element"))) {
                var secondaryElement = createElement("div", {
                    id: this.element.id + "_Secondary_Element",
                    styles: "position: absolute;z-index:1;"
                });
                this.element.appendChild(secondaryElement);
            }
        }, Maps.prototype.arrangeTemplate = function() {
            getElementByID(this.element.id + "_Secondary_Element");
            document.getElementById(this.element.id + "_Legend_Border") && (document.getElementById(this.element.id + "_Legend_Border").style.pointerEvents = "none");
            var templateElements = document.getElementsByClassName("template");
            if (!isNullOrUndefined(templateElements) && templateElements.length > 0 && getElementByID(this.element.id + "_Layer_Collections")) for (var i = 0; i < templateElements.length; i++) {
                var templateGroupEle = templateElements[i];
                if (!isNullOrUndefined(templateGroupEle) && templateGroupEle.childElementCount > 0) for (var layerOffset = getElementByID(this.element.id + "_Layer_Collections").getBoundingClientRect(), elementOffset = getElementByID(templateGroupEle.id).getBoundingClientRect(), j = 0; j < templateGroupEle.childElementCount; j++) {
                    var currentTemplate = templateGroupEle.childNodes[j], templateOffset = currentTemplate.getBoundingClientRect();
                    currentTemplate.style.left = (this.isTileMap ? parseFloat(currentTemplate.style.left) : layerOffset.left < elementOffset.left ? parseFloat(currentTemplate.style.left) - Math.abs(elementOffset.left - layerOffset.left) : parseFloat(currentTemplate.style.left) + Math.abs(elementOffset.left - layerOffset.left)) - templateOffset.width / 2 + "px", 
                    currentTemplate.style.top = (this.isTileMap ? parseFloat(currentTemplate.style.top) : layerOffset.top < elementOffset.top ? parseFloat(currentTemplate.style.top) - Math.abs(elementOffset.top - layerOffset.top) : parseFloat(currentTemplate.style.top) + Math.abs(elementOffset.top - layerOffset.top)) - templateOffset.height / 2 + "px";
                }
            }
        }, Maps.prototype.createTile = function() {
            var mainLayer = this.layersCollection[0];
            if (mainLayer.isBaseLayer && ("OSM" === mainLayer.layerType || "Bing" === mainLayer.layerType)) {
                removeElement$4(this.element.id + "_tile_parent");
                var elementRect = this.element.getBoundingClientRect(), parentRect = this.element.parentElement.getBoundingClientRect(), left = Math.abs(elementRect.left - parentRect.left), top_1 = Math.abs(elementRect.top - parentRect.top), ele = createElement("div", {
                    id: this.element.id + "_tile_parent",
                    styles: "position: absolute; left: " + (this.mapAreaRect.x + left) + "px; top: " + (this.mapAreaRect.y + top_1 + 20) + "px; height: " + this.mapAreaRect.height + "px; width: " + this.mapAreaRect.width + "px; overflow: hidden;"
                });
                this.element.appendChild(ele);
            }
        }, Maps.prototype.initPrivateVariable = function() {
            this.renderer = new SvgRenderer(this.element.id), this.mapLayerPanel = new LayerPanel(this);
        }, Maps.prototype.findBaseAndSubLayers = function() {
            var _this = this, baseIndex = this.baseLayerIndex, mainLayers = [], subLayers = [];
            this.layersCollection = [], this.layers.forEach(function(layer) {
                "Layer" === layer.type ? mainLayers.push(layer) : subLayers.push(layer);
            });
            for (var i = 0; i < mainLayers.length; i++) {
                var baseLayer = mainLayers[i];
                if (baseLayer.visible && baseIndex === i) {
                    baseLayer.isBaseLayer = !0, this.isTileMap = "Geometry" !== baseLayer.layerType, 
                    this.layersCollection.push(baseLayer);
                    break;
                }
                if (i === mainLayers.length - 1) {
                    this.layersCollection.push(mainLayers[0]);
                    break;
                }
            }
            subLayers.map(function(subLayer, subLayerIndex) {
                subLayer.visible && _this.layersCollection.push(subLayer);
            });
        }, Maps.prototype.renderBorder = function() {
            var width = this.border.width;
            if (width > 0 || this.background) {
                var borderRect = new RectOption$3(this.element.id + "_MapBorder", this.background, this.border, 1, new Rect$3(width / 2, width / 2, this.availableSize.width - width, this.availableSize.height - width));
                this.svgObject.appendChild(this.renderer.drawRectangle(borderRect));
            }
        }, Maps.prototype.renderTitle = function(title, type, bounds, groupEle) {
            var height, style = title.textStyle, width = Math.abs(this.margin.left + this.margin.right - this.availableSize.width);
            if (title.text) {
                isNullOrUndefined(groupEle) && (groupEle = this.renderer.createGroup({
                    id: this.element.id + "_Title_Group"
                }));
                var trimmedTitle = textTrim$1(width, title.text, style), elementSize = measureText$3(trimmedTitle, style), location_1 = function(location, alignment, textSize, type) {
                    var x, y;
                    switch (alignment) {
                      case "Near":
                        x = location.x;
                        break;

                      case "Center":
                        x = "title" === type ? location.width / 2 - textSize.width / 2 : location.x + location.width / 2 - textSize.width / 2;
                        break;

                      case "Far":
                        x = "title" === type ? location.width - location.y - textSize.width : location.x + location.width - textSize.width;
                    }
                    return y = "title" === type ? location.y + textSize.height / 2 : location.y + location.height / 2 + textSize.height / 2, 
                    new Point(x, y);
                }(isNullOrUndefined(bounds) ? new Rect$3(this.margin.left, this.margin.top, this.availableSize.width, this.availableSize.height) : bounds, title.alignment, elementSize, type), options = new TextOption$3(this.element.id + "_Map_" + type, location_1.x, location_1.y, "start", trimmedTitle), titleBounds = new Rect$3(location_1.x, location_1.y, elementSize.width, elementSize.height), element = renderTextElement(options, style, style.color, groupEle);
                element.setAttribute("aria-label", this.description || title.text), element.setAttribute("tabindex", (this.tabIndex + ("title" === type ? 1 : 2)).toString()), 
                ("title" === type && !title.subtitleSettings.text || "subtitle" === type) && (height = Math.abs(titleBounds.y + this.margin.bottom - this.availableSize.height), 
                this.mapAreaRect = new Rect$3(this.margin.left, titleBounds.y + 10, width, height - 10)), 
                "subtitle" !== type && title.subtitleSettings.text ? this.renderTitle(title.subtitleSettings, "subtitle", titleBounds, groupEle) : this.svgObject.appendChild(groupEle);
            } else height = Math.abs(this.margin.top + this.margin.bottom - this.availableSize.height), 
            this.mapAreaRect = new Rect$3(this.margin.left, this.margin.top, width, height);
        }, Maps.prototype.createSVG = function() {
            this.removeSvg(), createSvg$1(this);
        }, Maps.prototype.removeSvg = function() {
            if (removeElement$4(this.element.id + "_Secondary_Element"), removeElement$4(this.element.id + "_tile_parent"), 
            document.getElementsByClassName("e-tooltip-wrap")[0] && remove(document.getElementsByClassName("e-tooltip-wrap")[0]), 
            this.svgObject) {
                for (;this.svgObject.childNodes.length > 0; ) this.svgObject.removeChild(this.svgObject.firstChild);
                !this.svgObject.hasChildNodes() && this.svgObject.parentNode && remove(this.svgObject);
            }
        }, Maps.prototype.wireEVents = function() {
            EventHandler.add(this.element, "click", this.mapsOnClick, this), EventHandler.add(this.element, "dblclick", this.mapsOnDoubleClick, this), 
            EventHandler.add(this.element, Browser.touchStartEvent, this.mouseDownOnMap, this), 
            EventHandler.add(this.element, Browser.touchMoveEvent, this.mouseMoveOnMap, this), 
            EventHandler.add(this.element, Browser.touchEndEvent, this.mouseEndOnMap, this), 
            window.addEventListener(Browser.isTouch && "orientation" in window && "onorientationchange" in window ? "orientationchange" : "resize", this.mapsOnResize.bind(this));
        }, Maps.prototype.unWireEVents = function() {
            EventHandler.remove(this.element, "click", this.mapsOnClick), EventHandler.remove(this.element, "dblclick", this.mapsOnDoubleClick), 
            EventHandler.remove(this.element, Browser.touchStartEvent, this.mouseDownOnMap), 
            EventHandler.remove(this.element, Browser.touchMoveEvent, this.mouseMoveOnMap), 
            EventHandler.remove(this.element, Browser.touchEndEvent, this.mouseEndOnMap), window.removeEventListener(Browser.isTouch && "orientation" in window && "onorientationchange" in window ? "orientationchange" : "resize", this.mapsOnResize);
        }, Maps.prototype.mapsOnClick = function(e) {
            var targetEle = e.target, targetId = targetEle.id, eventArgs = {
                cancel: !1,
                name: "click",
                target: targetId,
                x: e.clientX,
                y: e.clientY
            };
            if (this.trigger("click", eventArgs), -1 !== targetEle.id.indexOf("ShapeIndex")) {
                var layerIndex = parseInt(targetEle.id.split("_LayerIndex_")[1].split("_")[0], 10);
                triggerShapeEvent(targetId, this.layers[layerIndex].selectionSettings, this, "shapeSelected");
            }
            this.markerModule && this.markerModule.markerClick(e), this.bubbleModule && this.bubbleModule.bubbleClick(e), 
            eventArgs.cancel || this.notify("click", targetEle);
        }, Maps.prototype.mouseEndOnMap = function(e) {
            var pageX, pageY, touchArg;
            this.element.getBoundingClientRect(), e.target;
            return -1 !== e.type.indexOf("touch") ? (this.isTouch = !0, pageX = (touchArg = e).changedTouches[0].clientX, 
            pageY = touchArg.changedTouches[0].clientY, touchArg.target) : (this.isTouch = "touch" === e.pointerType, 
            pageX = e.clientX, pageY = e.clientY, e.target), this.isTouch && this.titleTooltip(e, pageX, pageY, !0), 
            this.notify(Browser.touchEndEvent, e), e.preventDefault(), !1;
        }, Maps.prototype.mouseDownOnMap = function(e) {
            this.element.getBoundingClientRect(), e.target;
            this.notify(Browser.touchStartEvent, e);
        }, Maps.prototype.mapsOnDoubleClick = function(e) {
            this.notify("dblclick", e);
        }, Maps.prototype.mouseMoveOnMap = function(e) {
            var target;
            (target = "touchmove" === e.type ? e.target : target = e.target).id.indexOf("_MarkerIndex_") > -1 && this.markerModule && this.markerModule.markerExplode(target.id, target), 
            this.markerModule && this.markerModule.markerMove(e), this.bubbleModule && this.bubbleModule.bubbleMove(e), 
            this.onMouseMove(e), this.notify(Browser.touchMoveEvent, e);
        }, Maps.prototype.onMouseMove = function(e) {
            e.target;
            return this.isTouch || this.titleTooltip(e, e.pageX, e.pageY), !1;
        }, Maps.prototype.titleTooltip = function(event, x, y, isTouch) {
            event.target.id === this.element.id + "_Map_title" && event.target.textContent.indexOf("...") > -1 ? function(text, size, x, y, areaWidth, areaHeight, id, element, isTouch) {
                for (var tooltip = document.getElementById(id), width = measureText$3(text, {
                    fontFamily: "Segoe UI",
                    size: "8px",
                    fontStyle: "Normal",
                    fontWeight: "Regular"
                }).width, str = text.split(" "), demo = str[0].length, i = 1; i < str.length; i++) demo < str[i].length && (demo = str[i].length);
                tooltip || (tooltip = createElement("div", {
                    id: id,
                    styles: 'background-color: rgb(255, 255, 255) !important; color:black !important; position:absolute;border:1px solid rgb(0, 0, 0); padding-left:5px;font-size:12px; font-family: "Segoe UI"; text-align:center'
                })), x < areaWidth - width ? x = x : x > areaWidth - width && x < areaWidth - 8 * demo ? width = areaWidth - x : x >= areaWidth - 8 * demo && (x > width ? x -= width : (width = x, 
                x = 0));
                var size1 = size.split("px");
                wordWrap(tooltip, text, x, y, size1, width, areaWidth, element), tooltip.clientHeight + 2 * parseInt(size1[0], 10) > areaHeight && (width = x, 
                x = 0), wordWrap(tooltip, text, x, y, size1, width, areaWidth, element), isTouch && setTimeout(timeout, 5e3, id);
            }(this.titleSettings.text, this.titleSettings.textStyle.size, x, y, this.element.offsetWidth, this.element.offsetHeight, this.element.id + "_EJ2_Title_Tooltip", getElement$3(this.element.id + "_Secondary_Element"), isTouch) : removeElement$4(this.element.id + "_EJ2_Title_Tooltip");
        }, Maps.prototype.mapsOnResize = function(e) {
            var _this = this, args = {
                name: "resize",
                previousSize: this.availableSize,
                currentSize: new Size$3(0, 0),
                maps: this
            };
            return this.resizeTo && clearTimeout(this.resizeTo), this.element.classList.contains("e-maps") && (this.resizeTo = setTimeout(function() {
                _this.unWireEVents(), _this.createSVG(), _this.refreshing = !0, _this.wireEVents(), 
                args.currentSize = _this.availableSize, _this.trigger("resize", args), _this.render();
            }, 500)), !1;
        }, Maps.prototype.zoomByPosition = function(centerPosition, zoomFactor) {
            var position = convertGeoToPoint(centerPosition.latitude, centerPosition.longitude, this.mapLayerPanel.calculateFactor(this.layersCollection[0]), this.layersCollection[0], this);
            this.zoomModule && this.zoomModule.performZooming(position, zoomFactor, "ZoomIn");
        }, Maps.prototype.addLayer = function(layer) {
            this.layers.push(new LayerSettings(this.layers[0], "layers", layer)), this.refresh();
        }, Maps.prototype.removeLayer = function(index) {
            this.layers.splice(index, 1), this.refresh();
        }, Maps.prototype.addMarker = function(layerIndex, marker) {
            var currentMarker = this.layers[layerIndex].markerSettings;
            currentMarker.push(new MarkerSettings$1(currentMarker[0], "markerSettings", marker)), 
            this.refresh();
        }, Maps.prototype.setCulture = function() {
            this.intl = new Internationalization(), this.setLocaleConstants(), this.localeObject = new L10n(this.getModuleName(), this.defaultLocalConstants, this.locale);
        }, Maps.prototype.setLocaleConstants = function() {
            this.defaultLocalConstants = {
                ZoomIn: "ZoomIn",
                Zoom: "Zoom",
                ZoomOut: "ZoomOut",
                Pan: "Pan",
                Reset: "Reset"
            };
        }, Maps.prototype.destroy = function() {
            this.unWireEVents(), _super.prototype.destroy.call(this);
        }, Maps.prototype.getModuleName = function() {
            return "maps";
        }, Maps.prototype.getPersistData = function() {
            return "";
        }, Maps.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var render = !1, _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "background":
                    this.renderBorder();
                    break;

                  case "height":
                  case "width":
                    this.createSVG(), render = !0;
                }
            }
            render && this.render();
        }, Maps.prototype.requiredModules = function() {
            var modules = [], isVisible$$1 = this.findVisibleLayers(this.layers), annotationEnable = !1;
            return this.annotations.map(function(annotation, index) {
                annotationEnable = null != annotation.content;
            }), this.isBubbleVisible() && modules.push({
                member: "Bubble",
                args: [ this ]
            }), isVisible$$1.highlight && modules.push({
                member: "Highlight",
                args: [ this ]
            }), isVisible$$1.selection && modules.push({
                member: "Selection",
                args: [ this ]
            }), this.legendSettings.visible && modules.push({
                member: "Legend",
                args: [ this ]
            }), (this.zoomSettings.enable || this.zoomSettings.zoomFactor > this.zoomSettings.minZoom) && modules.push({
                member: "Zoom",
                args: [ this ]
            }), this.isMarkersVisible() && modules.push({
                member: "Marker",
                args: [ this ]
            }), this.isDataLabelVisible() && modules.push({
                member: "DataLabel",
                args: [ this ]
            }), this.isNavigationVisible() && modules.push({
                member: "NavigationLine",
                args: [ this ]
            }), isVisible$$1.tooltip && modules.push({
                member: "MapsTooltip",
                args: [ this ]
            }), annotationEnable && modules.push({
                member: "Annotations",
                args: [ this, Annotations$2 ]
            }), modules;
        }, Maps.prototype.isMarkersVisible = function() {
            var isVisible$$1 = !1;
            return this.layers.forEach(function(layer, layerIndex) {
                for (var i = 0; i < layer.markerSettings.length; i++) if (layer.markerSettings[i].visible) {
                    isVisible$$1 = !0;
                    break;
                }
            }), isVisible$$1;
        }, Maps.prototype.isDataLabelVisible = function() {
            for (var isVisible$$1 = !1, i = 0; i < this.layers.length; i++) if (this.layers[i].dataLabelSettings.visible) {
                isVisible$$1 = !0;
                break;
            }
            return isVisible$$1;
        }, Maps.prototype.isNavigationVisible = function() {
            var isVisible$$1 = !1;
            return this.layers.forEach(function(layer, layerIndex) {
                for (var i = 0; i < layer.navigationLineSettings.length; i++) if (layer.navigationLineSettings[i].visible) {
                    isVisible$$1 = !0;
                    break;
                }
            }), isVisible$$1;
        }, Maps.prototype.isBubbleVisible = function() {
            for (var isVisible$$1 = !1, _i = 0, _a = this.layers; _i < _a.length; _i++) {
                var layer = _a[_i];
                if (this.getBubbleVisible(layer)) {
                    isVisible$$1 = !0;
                    break;
                }
            }
            return isVisible$$1;
        }, Maps.prototype.getBubbleVisible = function(layer) {
            for (var isVisible$$1 = !1, _i = 0, _a = layer.bubbleSettings; _i < _a.length; _i++) {
                if (_a[_i].visible) {
                    isVisible$$1 = !0;
                    break;
                }
            }
            return isVisible$$1;
        }, Maps.prototype.print = function(id) {
            new ExportUtils$1(this).print(id);
        }, Maps.prototype.export = function(type, fileName, orientation) {
            new ExportUtils$1(this).export(type, fileName, orientation);
        }, Maps.prototype.findVisibleLayers = function(layers, isLayerVisible, isBubblevisible, istooltipVisible, isSelection, isHighlight) {
            void 0 === isLayerVisible && (isLayerVisible = !1), void 0 === isBubblevisible && (isBubblevisible = !1), 
            void 0 === istooltipVisible && (istooltipVisible = !1), void 0 === isSelection && (isSelection = !1), 
            void 0 === isHighlight && (isHighlight = !1);
            for (var bubbles, markers, _i = 0, layers_2 = layers; _i < layers_2.length; _i++) {
                var layer = layers_2[_i];
                if (isLayerVisible = layer.visible || isLayerVisible, layer.visible) {
                    bubbles = layer.bubbleSettings, markers = layer.markerSettings;
                    for (var _a = 0, navigationLine_1 = layer.navigationLineSettings; _a < navigationLine_1.length; _a++) {
                        var navigation = navigationLine_1[_a];
                        navigation.visible && (isSelection = navigation.highlightSettings.enable || isSelection, 
                        isHighlight = navigation.selectionSettings.enable || isHighlight);
                    }
                    for (var _b = 0, markers_1 = markers; _b < markers_1.length; _b++) {
                        var marker = markers_1[_b];
                        if (marker.visible && (istooltipVisible = marker.tooltipSettings.visible || istooltipVisible, 
                        isSelection = marker.selectionSettings.enable || isSelection, isHighlight = marker.highlightSettings.enable || isHighlight), 
                        istooltipVisible) break;
                    }
                    for (var _c = 0, bubbles_1 = bubbles; _c < bubbles_1.length; _c++) {
                        var bubble = bubbles_1[_c];
                        if (bubble.visible && (istooltipVisible = bubble.tooltipSettings.visible || istooltipVisible, 
                        isSelection = bubble.selectionSettings.enable || isSelection, isHighlight = bubble.highlightSettings.enable || isHighlight), 
                        istooltipVisible) break;
                    }
                    istooltipVisible = layer.tooltipSettings.visible || istooltipVisible, isSelection = layer.selectionSettings.enable || isSelection, 
                    isHighlight = layer.highlightSettings.enable || isHighlight;
                }
                if (isLayerVisible && isBubblevisible && istooltipVisible) break;
            }
            return {
                layer: isLayerVisible,
                bubble: isBubblevisible,
                tooltip: istooltipVisible,
                selection: isSelection,
                highlight: isHighlight
            };
        }, __decorate$56([ Property(null) ], Maps.prototype, "background", void 0), __decorate$56([ Property(!1) ], Maps.prototype, "useGroupingSeparator", void 0), 
        __decorate$56([ Property(null) ], Maps.prototype, "format", void 0), __decorate$56([ Property(null) ], Maps.prototype, "width", void 0), 
        __decorate$56([ Property(null) ], Maps.prototype, "height", void 0), __decorate$56([ Complex({}, TitleSettings) ], Maps.prototype, "titleSettings", void 0), 
        __decorate$56([ Complex({}, ZoomSettings$1) ], Maps.prototype, "zoomSettings", void 0), 
        __decorate$56([ Complex({}, LegendSettings$1) ], Maps.prototype, "legendSettings", void 0), 
        __decorate$56([ Collection([], LayerSettings) ], Maps.prototype, "layers", void 0), 
        __decorate$56([ Collection([], Annotation$2) ], Maps.prototype, "annotations", void 0), 
        __decorate$56([ Complex({}, Margin$3) ], Maps.prototype, "margin", void 0), __decorate$56([ Complex({
            color: "#DDDDDD",
            width: 0
        }, Border$4) ], Maps.prototype, "border", void 0), __decorate$56([ Property("Material") ], Maps.prototype, "theme", void 0), 
        __decorate$56([ Property("Mercator") ], Maps.prototype, "projectionType", void 0), 
        __decorate$56([ Property(0) ], Maps.prototype, "baseLayerIndex", void 0), __decorate$56([ Property(null) ], Maps.prototype, "description", void 0), 
        __decorate$56([ Property(1) ], Maps.prototype, "tabIndex", void 0), __decorate$56([ Property({
            latitude: null,
            longitude: null
        }) ], Maps.prototype, "centerPosition", void 0), __decorate$56([ Complex({}, MapsAreaSettings) ], Maps.prototype, "mapsArea", void 0), 
        __decorate$56([ Event() ], Maps.prototype, "load", void 0), __decorate$56([ Event() ], Maps.prototype, "beforePrint", void 0), 
        __decorate$56([ Event() ], Maps.prototype, "loaded", void 0), __decorate$56([ Event() ], Maps.prototype, "click", void 0), 
        __decorate$56([ Event() ], Maps.prototype, "doubleClick", void 0), __decorate$56([ Event() ], Maps.prototype, "rightClick", void 0), 
        __decorate$56([ Event() ], Maps.prototype, "resize", void 0), __decorate$56([ Event() ], Maps.prototype, "tooltipRender", void 0), 
        __decorate$56([ Event() ], Maps.prototype, "shapeSelected", void 0), __decorate$56([ Event() ], Maps.prototype, "itemSelection", void 0), 
        __decorate$56([ Event() ], Maps.prototype, "itemHighlight", void 0), __decorate$56([ Event() ], Maps.prototype, "shapeHighlight", void 0), 
        __decorate$56([ Event() ], Maps.prototype, "layerRendering", void 0), __decorate$56([ Event() ], Maps.prototype, "shapeRendering", void 0), 
        __decorate$56([ Event() ], Maps.prototype, "markerRendering", void 0), __decorate$56([ Event() ], Maps.prototype, "markerClick", void 0), 
        __decorate$56([ Event() ], Maps.prototype, "markerMouseMove", void 0), __decorate$56([ Event() ], Maps.prototype, "dataLabelRendering", void 0), 
        __decorate$56([ Event() ], Maps.prototype, "bubbleRendering", void 0), __decorate$56([ Event() ], Maps.prototype, "bubbleClick", void 0), 
        __decorate$56([ Event() ], Maps.prototype, "bubbleMouseMove", void 0), __decorate$56([ Event() ], Maps.prototype, "animationComplete", void 0), 
        __decorate$56([ Event() ], Maps.prototype, "annotationRendering", void 0), Maps = __decorate$56([ NotifyPropertyChanges ], Maps);
    }(Component), Bubble = function() {
        function Bubble(maps) {
            this.id = "", this.maps = maps, this.bubbleCollection = [];
        }
        return Bubble.prototype.renderBubble = function(bubbleSettings, shapeData, color, range, bubbleIndex, dataIndex, layerIndex, layer, group) {
            var layerData = layer.layerData, colorValuePath = bubbleSettings.colorValuePath, equalValue = shapeData[colorValuePath], colorValue = Number(shapeData[colorValuePath]), bubbleValue = Number(shapeData[bubbleSettings.valuePath]);
            if (isNaN(bubbleValue) && isNaN(colorValue) && isNullOrUndefined(equalValue)) return null;
            var radius = this.getRatioOfBubble(bubbleSettings.minRadius, bubbleSettings.maxRadius, bubbleValue, range.min, range.max), shapeColor = new ColorMapping(this.maps).getColorByValue(bubbleSettings.colorMapping, colorValue, equalValue);
            shapeColor = shapeColor || color;
            for (var shapePoints = [ [] ], midIndex = 0, pointsLength = 0, currentLength = 0, i = 0, len = layerData.length; i < len; i++) {
                var shape = layerData[i];
                if (shape = shape.property, shapeData[layer.shapeDataPath] === shape[layer.shapePropertyPath]) if (layerData[i]._isMultiPolygon) for (var layer_1 = layerData[i], j = 0; j < layer_1.length; j++) shapePoints.push(this.getPoints(layer_1[j], [])), 
                pointsLength < (currentLength = shapePoints[shapePoints.length - 1].length) && (pointsLength = currentLength, 
                midIndex = shapePoints.length - 1); else shapePoints.push(this.getPoints(layerData[i], [])), 
                pointsLength < (currentLength = shapePoints[shapePoints.length - 1].length) && (pointsLength = currentLength, 
                midIndex = shapePoints.length - 1);
            }
            var center = findMidPointOfPolygon(shapePoints[midIndex]);
            if (!isNullOrUndefined(center)) {
                var centerY = "Mercator" === this.maps.projectionType ? center.y : -center.y, eventArgs = {
                    cancel: !1,
                    name: "bubbleRendering",
                    border: bubbleSettings.border,
                    cx: center.x,
                    cy: centerY,
                    data: shapeData,
                    fill: shapeColor,
                    maps: this.maps,
                    radius: radius
                };
                if (this.maps.trigger("bubbleRendering", eventArgs), eventArgs.cancel) return;
                var bubbleElement = void 0;
                if ("Circle" === bubbleSettings.bubbleType) {
                    var circle = new CircleOption$1(this.id, eventArgs.fill, eventArgs.border, bubbleSettings.opacity, 0, 0, eventArgs.radius, null);
                    bubbleElement = function(maps, options, element) {
                        return appendShape(maps.renderer.drawCircle(options), element);
                    }(this.maps, circle, group);
                } else {
                    var y = "Mercator" === this.maps.projectionType ? eventArgs.cy - radius : eventArgs.cy + radius, rectangle = new RectOption$3(this.id, eventArgs.fill, eventArgs.border, bubbleSettings.opacity, new Rect$3(0, 0, 2 * radius, 2 * radius), 2, 2);
                    eventArgs.cx -= radius, eventArgs.cy = y, bubbleElement = function(maps, options, element) {
                        return appendShape(maps.renderer.drawRectangle(options), element);
                    }(this.maps, rectangle, group);
                }
                this.bubbleCollection.push({
                    LayerIndex: layerIndex,
                    BubbleIndex: bubbleIndex,
                    DataIndex: dataIndex,
                    element: bubbleElement,
                    center: {
                        x: eventArgs.cx,
                        y: eventArgs.cy
                    }
                });
                var animate$$1 = 0 !== layer.animationDuration || isNullOrUndefined(this.maps.zoomModule), translate = getTranslate(this.maps, layer, animate$$1), scale = translate.scale, transPoint = translate.location, position = new MapLocation(this.maps.isTileMap ? eventArgs.cx : (eventArgs.cx + transPoint.x) * scale, this.maps.isTileMap ? eventArgs.cy : (eventArgs.cy + transPoint.y) * scale);
                bubbleElement.setAttribute("transform", "translate( " + position.x + " " + position.y + " )");
                var bubble = bubbleSettings.dataSource.length - 1 === dataIndex ? "bubble" : null;
                "Square" === bubbleSettings.bubbleType ? (position.x += radius, position.y += radius * ("Mercator" === this.maps.projectionType ? 1 : -1)) : radius = 0, 
                bubbleSettings.animationDuration > 0 && elementAnimate(bubbleElement, bubbleSettings.animationDelay, bubbleSettings.animationDuration, position, this.maps, bubble, radius);
            }
        }, Bubble.prototype.getPoints = function(shape, points) {
            return shape.map(function(current, index) {
                points.push(new Point(current.point.x, current.point.y));
            }), points;
        }, Bubble.prototype.getRatioOfBubble = function(min, max, value, minValue, maxValue) {
            var bubbleRadius = (max - min) / 100 * (100 / (maxValue - minValue) * (value - minValue)) + min;
            return maxValue === minValue && (bubbleRadius = (max - min) / 100 + min), bubbleRadius;
        }, Bubble.prototype.bubbleClick = function(e) {
            var target = e.target.id;
            if (-1 !== target.indexOf("_LayerIndex_")) {
                var data = this.getbubble(target);
                if (!isNullOrUndefined(data)) {
                    var eventArgs = {
                        cancel: !1,
                        name: "bubbleClick",
                        data: data,
                        maps: this.maps,
                        target: target,
                        x: e.clientX,
                        y: e.clientY
                    };
                    this.maps.trigger("bubbleClick", eventArgs);
                }
            }
        }, Bubble.prototype.getbubble = function(target) {
            var id = target.split("_LayerIndex_"), index = parseInt(id[1].split("_")[0], 10), layer = this.maps.layers[index];
            if (target.indexOf("_BubbleIndex_") > -1) {
                var bubbleIndex = parseInt(id[1].split("_BubbleIndex_")[1], 10);
                if (!isNaN(bubbleIndex)) return layer.dataSource[bubbleIndex];
            }
            return null;
        }, Bubble.prototype.bubbleMove = function(e) {
            var target = e.target.id;
            if (-1 !== target.indexOf("_LayerIndex_")) {
                var data = this.getbubble(target);
                if (!isNullOrUndefined(data)) {
                    var eventArgs = {
                        cancel: !1,
                        name: "bubbleMouseMove",
                        data: data,
                        maps: this.maps,
                        target: target,
                        x: e.clientX,
                        y: e.clientY
                    };
                    this.maps.trigger("bubbleMouseMove", eventArgs);
                }
            }
        }, Bubble.prototype.getModuleName = function() {
            return "Bubble";
        }, Bubble.prototype.destroy = function(maps) {}, Bubble;
    }(), Marker$1 = function() {
        function Marker(maps) {
            this.maps = maps, this.trackElements = [];
        }
        return Marker.prototype.markerRender = function(layerElement, layerIndex, factor) {
            var templateFn, _this = this, currentLayer = this.maps.layersCollection[layerIndex];
            this.markerSVGObject = this.maps.renderer.createGroup({
                id: this.maps.element.id + "_Markers_Group"
            });
            var markerTemplateEle = createElement("div", {
                id: this.maps.element.id + "_LayerIndex_" + layerIndex + "_Markers_Template_Group",
                className: "template",
                styles: "overflow: hidden; position: absolute;pointer-events: none;top:" + (this.maps.isTileMap ? 0 : this.maps.mapAreaRect.y) + "px;left:" + (this.maps.isTileMap ? 0 : this.maps.mapAreaRect.x) + "px;height:" + this.maps.mapAreaRect.height + "px;width:" + this.maps.mapAreaRect.width + "px;"
            });
            currentLayer.markerSettings.map(function(markerSettings, markerIndex) {
                var markerData = markerSettings.dataSource;
                markerData.forEach(function(data, dataIndex) {
                    var eventArgs = {
                        cancel: !1,
                        name: "markerRendering",
                        fill: markerSettings.fill,
                        height: markerSettings.height,
                        width: markerSettings.width,
                        imageUrl: markerSettings.imageUrl,
                        shape: markerSettings.shape,
                        template: markerSettings.template,
                        data: data,
                        maps: _this.maps,
                        marker: markerSettings,
                        border: markerSettings.border
                    };
                    _this.maps.trigger("markerRendering", eventArgs);
                    var lng = data.longitude, lat = data.latitude, offset = markerSettings.offset;
                    if (!eventArgs.cancel && markerSettings.visible && !isNullOrUndefined(lng) && !isNullOrUndefined(lat)) {
                        var markerID = _this.maps.element.id + "_LayerIndex_" + layerIndex + "_MarkerIndex_" + markerIndex + "_DataIndex_" + dataIndex, location_1 = _this.maps.isTileMap ? convertTileLatLongToPoint(new MapLocation(lng, lat), factor, _this.maps.tileTranslatePoint, !0) : convertGeoToPoint(lat, lng, factor, currentLayer, _this.maps), animate$$1 = 0 !== currentLayer.animationDuration || isNullOrUndefined(_this.maps.zoomModule), translate = _this.maps.isTileMap ? new Object() : getTranslate(_this.maps, currentLayer, animate$$1), scale = translate.scale, transPoint = translate.location;
                        if (eventArgs.template) {
                            if ((templateFn = getTemplateFunction$3(eventArgs.template)) && templateFn(_this.maps).length) {
                                var markerElement = function(element, markerId, data, index, mapObj) {
                                    for (var childElement = createElement("div", {
                                        id: markerId,
                                        styles: "position: absolute;pointer-events: auto;"
                                    }); element.length > 0; ) childElement.appendChild(element[0]);
                                    for (var templateHtml = childElement.innerHTML, properties = Object.keys(data), i = 0; i < properties.length; i++) "latitude" !== properties[i].toLowerCase() && "longitude" !== properties[i].toLowerCase() && (templateHtml = templateHtml.replace(new RegExp("{{:" + properties[i] + "}}", "g"), data[properties[i].toString()]));
                                    return childElement.innerHTML = templateHtml, childElement;
                                }(templateFn(_this.maps), markerID, data, 0, _this.maps);
                                markerElement.style.left = (_this.maps.isTileMap ? location_1.x : Math.abs(_this.maps.baseMapRectBounds.min.x - location_1.x) * scale) + offset.x + "px", 
                                markerElement.style.top = (_this.maps.isTileMap ? location_1.y : Math.abs(_this.maps.baseMapRectBounds.min.y - location_1.y) * scale) + offset.y + "px", 
                                markerTemplateEle.appendChild(markerElement);
                            }
                        } else {
                            var shapeCustom = {
                                size: new Size$3(eventArgs.width, eventArgs.height),
                                fill: eventArgs.fill,
                                borderColor: eventArgs.border.color,
                                borderWidth: eventArgs.border.width,
                                opacity: markerSettings.opacity,
                                dashArray: markerSettings.dashArray
                            }, ele = _this.drawSymbol(eventArgs.shape, eventArgs.imageUrl, {
                                x: 0,
                                y: 0
                            }, markerID, shapeCustom), x = (_this.maps.isTileMap ? location_1.x : (location_1.x + transPoint.x) * scale) + offset.x, y = (_this.maps.isTileMap ? location_1.y : (location_1.y + transPoint.y) * scale) + offset.y;
                            ele.setAttribute("transform", "translate( " + x + " " + y + " )"), _this.markerSVGObject.appendChild(ele);
                            var element = markerData.length - 1 === dataIndex ? "marker" : null, markerPoint = new Point(x, y);
                            markerSettings.animationDuration > 0 && elementAnimate(ele, markerSettings.animationDelay, markerSettings.animationDuration, markerPoint, _this.maps, element);
                        }
                    }
                });
            }), this.markerSVGObject.childElementCount > 0 && layerElement.appendChild(this.markerSVGObject), 
            markerTemplateEle.childElementCount > 0 && getElementByID(this.maps.element.id + "_Secondary_Element") && getElementByID(this.maps.element.id + "_Secondary_Element").appendChild(markerTemplateEle);
        }, Marker.prototype.markerExplode = function(targetId, targetElement) {
            var layerIndex = parseFloat(targetId.split("_")[2]), markerIndex = parseFloat(targetId.split("_")[4]), dataIndex = parseFloat(targetId.split("_")[6]), marker = this.maps.layersCollection[layerIndex].markerSettings[markerIndex], element = "Balloon" === marker.shape ? targetElement.parentNode : targetElement, transform = (marker.dataSource[dataIndex].latitude, 
            marker.dataSource[dataIndex].longitude, element.getAttribute("transform") || ""), transX = parseFloat(transform.split(" ")[1]), transY = parseFloat(transform.split(" ")[2]), location = {
                x: transX,
                y: transY
            }, elements = document.getElementsByClassName("EJ2-Map_Trackball");
            if (elements.length > 0 && this.previousExplodeId !== targetId && this.removeTrackElements(), 
            0 === elements.length && "Image" !== marker.shape && isNullOrUndefined(marker.template)) {
                for (var i = 0; i < 2; i++) {
                    var markerID = this.maps.element.id + "_LayerIndex_" + layerIndex + "_MarkerIndex_" + markerIndex + "_Trackball_" + i, shape = {
                        size: new Size$3(marker.width + 5 + (i ? 20 : 0), marker.height + 5 + (i ? 10 : 0)),
                        fill: marker.fill,
                        borderColor: i ? "transparent" : marker.border.color,
                        borderWidth: i ? 0 : marker.border.width,
                        opacity: i ? .2 : marker.opacity,
                        dashArray: marker.dashArray
                    };
                    if ("Balloon" === marker.shape) {
                        var rect = element.getBoundingClientRect(), currentWidth = rect.width / 2 - shape.size.width / 2, currentHeight = rect.height / 2 - shape.size.height / 2;
                        location.y -= currentHeight, location.x += currentWidth / 4;
                    }
                    var trackEle = this.drawSymbol(marker.shape, marker.imageUrl, location, markerID, shape);
                    location.x = transX, location.y = transY, trackEle.setAttribute("style", "pointer-events:none"), 
                    trackEle.setAttribute("class", "EJ2-Map_Trackball"), this.trackElements.push(trackEle), 
                    element.parentNode.appendChild(trackEle);
                }
                this.previousExplodeId = targetId, this.removeMarkerExplode();
            }
        }, Marker.prototype.removeMarkerExplode = function() {
            this.isMarkerExplode = window.setTimeout(this.removeTrackElements, 2e3);
        }, Marker.prototype.removeTrackElements = function() {
            for (var elements = document.getElementsByClassName("EJ2-Map_Trackball"), i = 0, len = elements.length; i < len; i++) this.previousExplodeId = "", 
            remove(elements[0]);
        }, Marker.prototype.drawSymbol = function(shape, imageUrl, location, markerID, shapeCustom) {
            var markerEle, x, y, circleOptions, pathOptions, rectOptions, size = shapeCustom.size, borderColor = shapeCustom.borderColor, borderWidth = parseFloat(shapeCustom.borderWidth), fill = shapeCustom.fill, dashArray = shapeCustom.dashArray, border = {
                color: borderColor,
                width: borderWidth
            }, opacity = shapeCustom.opacity;
            if (pathOptions = new PathOption$3(markerID, fill, borderWidth, borderColor, opacity, dashArray, ""), 
            "Circle" === shape) {
                var radius = (size.width + size.height) / 4;
                circleOptions = new CircleOption$1(markerID, fill, border, opacity, location.x, location.y, radius, dashArray), 
                markerEle = this.maps.renderer.drawCircle(circleOptions);
            } else "Rectangle" === shape ? (x = location.x - size.width / 2, y = location.y - size.height / 2, 
            rectOptions = new RectOption$3(markerID, fill, border, opacity, new Rect$3(x, y, size.width, size.height), null, null, "", dashArray), 
            markerEle = this.maps.renderer.drawRectangle(rectOptions)) : "Image" === shape ? (x = location.x - size.width / 2, 
            y = location.y - size.height / 2, merge(pathOptions, {
                href: imageUrl,
                height: size.height,
                width: size.width,
                x: x,
                y: y
            }), markerEle = this.maps.renderer.drawImage(pathOptions)) : markerEle = calculateShapes$3(this.maps, shape, pathOptions, size, location, this.markerSVGObject);
            return markerEle;
        }, Marker.prototype.markerClick = function(e) {
            var target = e.target.id;
            if (-1 !== target.indexOf("_LayerIndex_")) {
                var options = this.getMarker(target);
                if (!isNullOrUndefined(options)) {
                    var eventArgs = {
                        cancel: !1,
                        name: "markerClick",
                        data: options.data,
                        maps: this.maps,
                        marker: options.marker,
                        target: target,
                        x: e.clientX,
                        y: e.clientY
                    };
                    this.maps.trigger("markerClick", eventArgs);
                }
            }
        }, Marker.prototype.getMarker = function(target) {
            var data, marker, id = target.split("_LayerIndex_"), index = parseInt(id[1].split("_")[0], 10), layer = this.maps.layers[index];
            if (target.indexOf("_MarkerIndex_") > -1) {
                var markerIndex = parseInt(id[1].split("_MarkerIndex_")[1].split("_")[0], 10), dataIndex = parseInt(id[1].split("_DataIndex_")[1].split("_")[0], 10);
                if (marker = layer.markerSettings[markerIndex], !isNaN(markerIndex)) return data = marker.dataSource[dataIndex], 
                {
                    marker: marker,
                    data: data
                };
            }
            return null;
        }, Marker.prototype.markerMove = function(e) {
            var targetId = e.target.id;
            if (-1 !== targetId.indexOf("_LayerIndex_")) {
                var options = this.getMarker(targetId);
                if (!isNullOrUndefined(options)) {
                    var eventArgs = {
                        cancel: !1,
                        name: "markerMouseMove",
                        data: options.data,
                        maps: this.maps,
                        target: targetId,
                        x: e.clientX,
                        y: e.clientY
                    };
                    this.maps.trigger("markerMouseMove", eventArgs);
                }
            }
        }, Marker.prototype.getModuleName = function() {
            return "Marker";
        }, Marker.prototype.destroy = function(maps) {}, Marker;
    }(), DataLabel$1 = function() {
        function DataLabel(maps) {
            this.intersect = [], this.value = {
                rightWidth: 0,
                leftWidth: 0,
                heightTop: 0,
                heightBottom: 0
            }, this.maps = maps, this.dataLabelCollections = [];
        }
        return DataLabel.prototype.getDataLabel = function(dataSource, labelPath, shapeName, shapeDataPath) {
            for (var text, i = 0; i < dataSource.length; i++) {
                var data = dataSource[i];
                if (data[shapeDataPath] === shapeName) {
                    text = data;
                    break;
                }
            }
            return text;
        }, DataLabel.prototype.renderLabel = function(layer, layerIndex, shape, layerData, group, labelTemplateElement, index) {
            for (var options, element, datasrcObj, location, dataLabel = layer.dataLabelSettings, style = layer.dataLabelSettings.textStyle, dataLabelSettings = layer.dataLabelSettings, labelpath = layer.dataLabelSettings.labelPath, shapePoint = [ [] ], midIndex = 0, pointsLength = 0, shapeData = shape, text = "", currentLength = 0, labelId = this.maps.element.id + "_LayerIndex_" + layerIndex + "_shapeIndex_" + index + "_LabelIndex_" + index, textLocation = new Point(0, 0), i = 0, len = layerData.length; i < len; i++) {
                var shapes = layerData[i];
                if (shape = shapes.property, !isNullOrUndefined(shapes.property) && shapeData.properties.name === shape.name) if (layerData[i]._isMultiPolygon) for (var layer_1 = layerData[i], j = 0; j < layer_1.length; j++) shapePoint.push(this.getPoint(layer_1[j], [])), 
                pointsLength < (currentLength = shapePoint[shapePoint.length - 1].length) && (pointsLength = currentLength, 
                midIndex = shapePoint.length - 1); else shapePoint.push(this.getPoint(layerData[i], [])), 
                pointsLength < (currentLength = shapePoint[shapePoint.length - 1].length) && (pointsLength = currentLength, 
                midIndex = shapePoint.length - 1);
            }
            if (!isNullOrUndefined(layer.dataSource) && layer.dataSource.length > 0) {
                var localData = extend([], layer.dataSource, null, !0);
                (datasrcObj = this.getDataLabel(localData, labelpath, shapeData.properties[layer.shapePropertyPath], layer.shapeDataPath))[labelpath] = datasrcObj[labelpath], 
                text = datasrcObj[labelpath];
            } else text = shapeData.properties[labelpath];
            if (location = findMidPointOfPolygon(shapePoint[midIndex]), !isNullOrUndefined(text) && !isNullOrUndefined(location)) {
                location.y = "Mercator" === this.maps.projectionType ? location.y : -location.y, 
                isNullOrUndefined(this.maps.format) || isNaN(parseFloat(text)) || (text = Internalize(this.maps, parseFloat(text)), 
                isNullOrUndefined(datasrcObj) || (datasrcObj[labelpath] = text));
                var eventargs = {
                    name: "labelRendering",
                    maps: this.maps,
                    cancel: !1,
                    border: dataLabel.border,
                    datalabel: dataLabel,
                    fill: dataLabel.fill,
                    template: dataLabel.template,
                    text: text
                };
                this.maps.trigger("labelRendering", eventargs);
                var position = [], width = location.rightMax.x - location.leftMax.x, textSize = measureText$3(text, style), trimmedLable = textTrim$1(width, text, style), elementSize = measureText$3(trimmedLable, style), startY = location.y - textSize.height / 4, endY = location.y + textSize.height / 4, start = location.y - textSize.height / 4, end = location.y + textSize.height / 4;
                if ((position = function(points, start, end) {
                    for (var pointObject = [], i = 0; i < points.length; i++) {
                        var point = points[i];
                        start <= point.y && end >= point.y && pointObject.push(point);
                    }
                    return pointObject;
                }(shapePoint[midIndex], startY, endY)).length > 5 && (isNullOrUndefined(shapeData.geometry) ? "MultiPolygon" !== shapeData.type : "MultiPolygon" !== shapeData.geometry.type)) {
                    var location1 = findMidPointOfPolygon(position);
                    location.x = location1.x, width = location1.rightMax.x - location1.leftMax.x;
                }
                var xpositionEnds = location.x + textSize.width / 2, xpositionStart = location.x - textSize.width / 2;
                elementSize = measureText$3(trimmedLable = textTrim$1(width, text, style), style), 
                this.value[index] = {
                    rightWidth: xpositionEnds,
                    leftWidth: xpositionStart,
                    heightTop: start,
                    heightBottom: end
                };
                var animate$$1 = 0 !== layer.animationDuration || isNullOrUndefined(this.maps.zoomModule), translate = getTranslate(this.maps, layer, animate$$1), scale = translate.scale, transPoint = translate.location, labelElement = void 0;
                if ("" !== eventargs.template) {
                    (labelElement = function(element, labelId, data, index, mapObj) {
                        for (var templateHtml = (isNullOrUndefined(element.childElementCount) ? element[0] : element).outerHTML, properties = Object.keys(data), i = 0; i < properties.length; i++) templateHtml = templateHtml.replace(new RegExp("{{:" + properties[i] + "}}", "g"), data[properties[i].toString()]);
                        return createElement("div", {
                            id: labelId,
                            innerHTML: templateHtml,
                            styles: "position: absolute"
                        });
                    }(getTemplateFunction$3(eventargs.template)(this.maps), labelId, isNullOrUndefined(datasrcObj) ? shapeData.properties : datasrcObj, 0, this.maps)).style.left = Math.abs(this.maps.baseMapRectBounds.min.x - location.x) * scale + "px", 
                    labelElement.style.top = Math.abs(this.maps.baseMapRectBounds.min.y - location.y) * scale + "px", 
                    labelTemplateElement.appendChild(labelElement);
                    labelElement.offsetWidth, labelElement.offsetHeight;
                } else {
                    if ("Trim" === dataLabelSettings.smartLabelMode && (options = new TextOption$3(labelId, textLocation.x, textLocation.y, "middle", trimmedLable, "", "")), 
                    "None" === dataLabelSettings.smartLabelMode && (options = new TextOption$3(labelId, textLocation.x, textLocation.y, "middle", text, "", "")), 
                    "Hide" === dataLabelSettings.smartLabelMode && (text = width >= textSize.width ? text : "", 
                    options = new TextOption$3(labelId, textLocation.x, textLocation.y, "middle", text, "", "")), 
                    text = options.text, "Hide" === dataLabelSettings.intersectionAction) {
                        for (i = 0; i < this.intersect.length; i++) if (!isNullOrUndefined(this.intersect[i])) {
                            if (!(this.value[index].leftWidth > this.intersect[i].rightWidth || this.value[index].rightWidth < this.intersect[i].leftWidth || this.value[index].heightTop > this.intersect[i].heightBottom || this.value[index].heightBottom < this.intersect[i].heightTop)) {
                                text = "";
                                break;
                            }
                            text = text;
                        }
                        this.intersect.push(this.value[index]), options = new TextOption$3(labelId, textLocation.x, textLocation.y, "middle", text, "", "");
                    }
                    if ("Trim" === dataLabelSettings.intersectionAction) {
                        for (j = 0; j < this.intersect.length; j++) if (!isNullOrUndefined(this.intersect[j])) if (this.intersect[j].rightWidth < this.value[index].leftWidth || this.intersect[j].leftWidth > this.value[index].rightWidth || this.intersect[j].heightBottom < this.value[index].heightTop || this.intersect[j].heightTop > this.value[index].heightBottom) trimmedLable = text, 
                        0; else {
                            if (this.value[index].leftWidth > this.intersect[j].leftWidth) {
                                trimmedLable = textTrim$1((width = this.intersect[j].rightWidth - this.value[index].leftWidth) - (this.value[index].rightWidth - this.value[index].leftWidth), text, style);
                                break;
                            }
                            if (this.value[index].leftWidth < this.intersect[j].leftWidth) {
                                width = this.value[index].rightWidth - this.intersect[j].leftWidth, trimmedLable = textTrim$1(Math.abs(width - (this.value[index].rightWidth - this.value[index].leftWidth)), text, style);
                                break;
                            }
                        }
                        this.intersect.push(this.value[index]), options = new TextOption$3(labelId, textLocation.x, textLocation.y, "middle", trimmedLable, "", "");
                    }
                    if ("None" === dataLabelSettings.intersectionAction && (options = new TextOption$3(labelId, textLocation.x, textLocation.y, "middle", text, "", "")), 
                    trimmedLable.length > 1) {
                        var border_1 = eventargs.border;
                        if (border_1.width > 1) {
                            var fill = eventargs.fill, opacity = dataLabelSettings.opacity, rx = dataLabelSettings.rx, ry = dataLabelSettings.ry, x = location.x - textSize.width / 2, y = location.y - textSize.height / 2, rectOptions = new RectOption$3(this.maps.element.id + "_LayerIndex_" + layerIndex + "_shapeIndex_" + index + "_rectIndex_" + index, fill, border_1, opacity, new Rect$3(x, y, textSize.width, textSize.height), rx, ry), rect = this.maps.renderer.drawRectangle(rectOptions);
                            group.appendChild(rect);
                        }
                    }
                    (element = renderTextElement(options, style, style.color, group)).setAttribute("transform", "translate( " + (location.x + transPoint.x) * scale + " " + ((location.y + transPoint.y) * scale + elementSize.height / 4) + " )"), 
                    group.appendChild(element);
                }
                this.dataLabelCollections.push({
                    location: {
                        x: location.x,
                        y: location.y + elementSize.height / 4
                    },
                    element: isNullOrUndefined(labelElement) ? element : labelElement,
                    layerIndex: layerIndex,
                    shapeIndex: index,
                    labelIndex: index
                }), labelTemplateElement.childElementCount > 0 && !this.maps.element.contains(labelTemplateElement) && document.getElementById(this.maps.element.id + "_Secondary_Element").appendChild(labelTemplateElement);
            }
        }, DataLabel.prototype.getPoint = function(shapes, points) {
            return shapes.map(function(current, index) {
                points.push(new Point(current.point.x, current.point.y));
            }), points;
        }, DataLabel.prototype.getModuleName = function() {
            return "DataLabel";
        }, DataLabel.prototype.destroy = function(maps) {}, DataLabel;
    }(), NavigationLine = function() {
        function NavigationLine(maps) {
            this.maps = maps;
        }
        return NavigationLine.prototype.renderNavigation = function(layer, factor, layerIndex) {
            var navigationEle, navigation;
            navigation = layer.navigationLineSettings;
            for (var longitude, latitude, visible, angle, width, color, dashArray, pathOption, direction, showArrow, arrowColor, arrowSize, arrowSettings, arrowPosition, startArrow, endArrow, offSet, offSetValue, navigationGroup, d, point = [], group = this.maps.renderer.createGroup({
                id: this.maps.element.id + "_layerIndex_" + layerIndex + "_line_Group"
            }), i = 0; i < navigation.length; i++) {
                if (latitude = navigation[i].properties.latitude, longitude = navigation[i].properties.longitude, 
                visible = navigation[i].properties.visible, angle = navigation[i].properties.angle, 
                width = navigation[i].width || 1, color = navigation[i].color, dashArray = navigation[i].properties.dashArray, 
                arrowSettings = navigation[i].properties.arrowSettings, showArrow = !isNullOrUndefined(arrowSettings) && arrowSettings.properties.showArrow, 
                longitude.length === latitude.length && visible) for (var i_1 = 0; i_1 < longitude.length; i_1++) {
                    var location_1 = this.maps.isTileMap ? convertTileLatLongToPoint(new Point(longitude[i_1], latitude[i_1]), factor, this.maps.tileTranslatePoint, !0) : convertGeoToPoint(latitude[i_1], longitude[i_1], factor, layer, this.maps);
                    point.push(location_1);
                }
                navigationGroup = this.maps.renderer.createGroup({
                    id: this.maps.element.id + "_layerIndex_" + layerIndex + "_NavigationGroup" + i
                });
                for (var j = 0; j < point.length - 1; j++) {
                    angle = 1 < (angle = -1 > angle ? -1 : angle) ? 1 : angle;
                    var arcId_1 = this.maps.element.id + "_LayerIndex_" + layerIndex + "_NavigationIndex_" + i + "_Line" + j, radius_1 = this.convertRadius(point[j], point[j + 1]);
                    if (angle <= 1 && angle > 0 && (direction = 0, point[j].x > point[j + 1].x && (direction = 1)), 
                    angle >= -1 && angle < 0 && (direction = 1, point[j].x > point[j + 1].x && (direction = 0)), 
                    point[j].x !== point[j + 1].x) {
                        if (showArrow) {
                            arrowColor = arrowSettings.properties.color, arrowSize = arrowSettings.properties.size, 
                            offSetValue = void 0 === arrowSettings.properties.offSet ? 0 : arrowSettings.properties.offSet;
                            var divide = Math.round(arrowSize / 2);
                            startArrow = "Start" === (arrowPosition = arrowSettings.properties.position) ? "url(#triangle" + i + ")" : null, 
                            endArrow = "End" === arrowPosition ? "url(#triangle" + i + ")" : null, 0 !== offSet && 0 === angle && (offSet = "Start" === arrowPosition ? offSetValue : -offSetValue), 
                            offSet = isNullOrUndefined(offSet) ? 0 : offSet;
                            var triId = this.maps.element.id + "_triangle", defElement = this.maps.renderer.createDefs();
                            defElement.innerHTML += '<marker id="triangle' + i + '"></marker>';
                            var markerEle = defElement.querySelector("#triangle" + i);
                            markerEle.setAttribute("markerWidth", arrowSize.toString()), markerEle.setAttribute("markerHeight", arrowSize.toString()), 
                            markerEle.setAttribute("refX", (divide - offSet).toString()), markerEle.setAttribute("refY", divide.toString()), 
                            markerEle.setAttribute("orient", "auto");
                            pathOption = new PathOption$3(triId, arrowColor, width, color, 1, dashArray, "M 0,0  L 0," + arrowSize + " L " + divide + ", " + divide + " Z"), 
                            navigationEle = this.maps.renderer.drawPath(pathOption), markerEle.appendChild(navigationEle), 
                            defElement.appendChild(markerEle), navigationGroup.appendChild(defElement);
                        }
                        d = 0 === angle ? "M " + point[j].x + "," + point[j].y + "L " + point[j + 1].x + "," + point[j + 1].y : "M " + point[j].x + "," + point[j].y + " A " + angle * radius_1 + " " + angle * radius_1 + " 0,0," + direction + " , " + point[j + 1].x + "," + point[j + 1].y + " ", 
                        pathOption = new PathOption$3(arcId_1, "none", 2, color, 1, dashArray, d), navigationEle = this.maps.renderer.drawPath(pathOption), 
                        isNullOrUndefined(arrowPosition) || ("Start" === arrowPosition ? navigationEle.setAttribute("marker-start", startArrow) : navigationEle.setAttribute("marker-end", endArrow)), 
                        navigationGroup.appendChild(navigationEle), group.appendChild(navigationGroup);
                    }
                }
                point = [];
            }
            return group;
        }, NavigationLine.prototype.convertRadius = function(point1, point2) {
            var value1 = point2.x - point1.x, value2 = point2.y - point1.y;
            return Math.sqrt(Math.pow(value1, 2) + Math.pow(value2, 2));
        }, NavigationLine.prototype.getModuleName = function() {
            return "NavigationLine";
        }, NavigationLine.prototype.destroy = function(maps) {}, NavigationLine;
    }(), Legend$1 = function() {
        function Legend(maps) {
            this.legendBorderRect = new Rect$3(0, 0, 0, 0), this.totalPages = [], this.page = 0, 
            this.currentPage = 0, this.interactiveLocation = new Point(0, 0), this.legendItemRect = new Rect$3(0, 0, 0, 0), 
            this.heightIncrement = 0, this.widthIncrement = 0, this.textMaxWidth = 0, this.areaRect = new Rect$3(0, 0, 0, 0), 
            this.maps = maps, this.addEventListener();
        }
        return Legend.prototype.renderLegend = function() {
            this.calculateLegendBounds(), this.drawLegend();
        }, Legend.prototype.calculateLegendBounds = function() {
            var _this = this, map = this.maps, legend = map.legendSettings;
            this.legendCollection = [];
            var topPadding = map.mapAreaRect.y;
            this.legendRenderingCollections = [], map.layersCollection.forEach(function(layer, layerIndex) {
                if (!isNullOrUndefined(layer.shapeData)) {
                    var layerData = layer.shapeData.features, dataPath = layer.shapeDataPath, propertyPath = layer.shapePropertyPath, dataSource = layer.dataSource, colorValuePath = void 0, colorMapping = void 0;
                    if ("Layers" === legend.type && layer.visible) colorValuePath = layer.shapeSettings.colorValuePath, 
                    colorMapping = layer.shapeSettings.colorMapping, _this.getLegends(layerIndex, layerData, colorMapping, dataSource, dataPath, colorValuePath, propertyPath); else if ("Bubbles" === legend.type) for (var _i = 0, _a = layer.bubbleSettings; _i < _a.length; _i++) {
                        var bubble = _a[_i];
                        bubble.visible && (colorValuePath = bubble.colorValuePath, colorMapping = bubble.colorMapping, 
                        dataSource = bubble.dataSource, _this.getLegends(layerIndex, layerData, colorMapping, dataSource, dataPath, colorValuePath, propertyPath));
                    } else _this.getMarkersLegendCollections(layerIndex, layer.markerSettings);
                }
            });
            var legendTitle = map.legendSettings.title.text, titleTextStyle = map.legendSettings.titleStyle;
            if (this.legendCollection.length > 0) {
                var legendItemStartX_1, legendItemStartY_1, legendMode = legend.mode, shapeX = 0, shapeY = 0, textX = 0, textY = 0, shapePadding = legend.shapePadding, shapeHeight = legend.shapeHeight, shapeWidth = legend.shapeWidth, shapeLocation = [], textLocation = [], position = legend.position, labelAction = legend.labelDisplayMode, arrangement = "None" === legend.orientation ? "Top" === position || "Bottom" === position ? "Horizontal" : "Vertical" : legend.orientation, legendWidth = legend.width.length > 1 ? legend.width.indexOf("%") > -1 ? map.availableSize.width / 100 * parseInt(legend.width, 10) : parseInt(legend.width, 10) : null, legendHeight = legend.height.length > 1 ? legend.height.indexOf("%") > -1 ? map.availableSize.height / 100 * parseInt(legend.height, 10) : parseInt(legend.height, 10) : null, startX = 0, startY = 0, legendtitleSize = measureText$3(legendTitle, titleTextStyle);
                if ("Interactive" === legendMode) {
                    var itemTextStyle = legend.textStyle, rectWidth = void 0, rectHeight = void 0, legendLength = this.legendCollection.length;
                    rectWidth = "Horizontal" === arrangement ? isNullOrUndefined(legendWidth) ? map.mapAreaRect.width / legendLength : legendWidth / legendLength : isNullOrUndefined(legendWidth) ? 25 : legendWidth, 
                    rectHeight = "Horizontal" === arrangement ? isNullOrUndefined(legendHeight) ? 25 : legendHeight : isNullOrUndefined(legendHeight) ? map.mapAreaRect.height / legendLength : legendHeight / legendLength, 
                    startX = 0, startY = legendtitleSize.height + 10;
                    for (var position_1 = legend.labelPosition, textX_1 = 0, textY_1 = 0, itemStartX = 0, itemStartY = 0, maxTextHeight = 0, maxTextWidth = 0, i = 0; i < this.legendCollection.length; i++) {
                        startX = "Horizontal" === arrangement ? startX + rectWidth : startX, startY = "Horizontal" === arrangement ? startY : startY + rectHeight;
                        var legendText = this.legendCollection[i].text, itemTextSize = new Size$3(0, 0);
                        "None" === labelAction ? itemTextSize = measureText$3(legendText, itemTextStyle) : "Trim" === labelAction ? itemTextSize = measureText$3(legendText = textTrim$1("Horizontal" === arrangement ? rectWidth : rectHeight, legendText, itemTextStyle), itemTextStyle) : legendText = "", 
                        maxTextHeight = Math.max(maxTextHeight, itemTextSize.height), maxTextWidth = Math.max(maxTextWidth, itemTextSize.width), 
                        itemTextSize.width > 0 && itemTextSize.height > 0 && ("Horizontal" === arrangement ? (textX_1 = startX + rectWidth / 2, 
                        textY_1 = "After" === position_1 ? startY + rectHeight + itemTextSize.height / 2 + 10 : startY - 10) : (textX_1 = "After" === position_1 ? startX - itemTextSize.width / 2 - 10 : startX + rectWidth + itemTextSize.width / 2 + 10, 
                        textY_1 = startY + rectHeight / 2 + itemTextSize.height / 4)), 0 === i ? (itemStartX = "Horizontal" === arrangement ? startX : "After" === position_1 ? textX_1 - itemTextSize.width / 2 : startX, 
                        itemStartY = "Horizontal" === arrangement ? "After" === position_1 ? startY : textY_1 - itemTextSize.height / 2 : startY) : i === this.legendCollection.length - 1 && (legendWidth = "Horizontal" === arrangement ? Math.abs(startX + rectWidth - itemStartX) : rectWidth + maxTextWidth + 10, 
                        legendHeight = "Horizontal" === arrangement ? rectHeight + maxTextHeight / 2 + 10 : Math.abs(startY + rectHeight - itemStartY)), 
                        this.legendRenderingCollections.push({
                            fill: this.legendCollection[i].fill,
                            x: startX,
                            y: startY,
                            width: rectWidth,
                            height: rectHeight,
                            text: legendText,
                            textX: textX_1,
                            textY: textY_1,
                            textWidth: itemTextSize.width,
                            textHeight: itemTextSize.height
                        });
                    }
                    this.legendItemRect = {
                        x: itemStartX,
                        y: itemStartY,
                        width: legendWidth,
                        height: legendHeight
                    };
                } else {
                    legendWidth = isNullOrUndefined(legendWidth) ? map.mapAreaRect.width : legendWidth, 
                    legendHeight = isNullOrUndefined(legendHeight) ? map.mapAreaRect.height : legendHeight;
                    var j = 0;
                    for (i = 0; i < this.legendCollection.length; i++) {
                        var legendItem = this.legendCollection[i];
                        isNullOrUndefined(this.totalPages[this.page]) && (this.totalPages[this.page] = {
                            Page: this.page + 1,
                            Collection: []
                        });
                        var legendTextSize = measureText$3(legendItem.text, legend.textStyle);
                        if (this.textMaxWidth = Math.max(this.textMaxWidth, legendTextSize.width), 0 === i) startX = shapeX = 10 + shapeWidth / 2, 
                        startY = shapeY = topPadding + legendtitleSize.height + (shapeHeight > legendTextSize.height ? shapeHeight / 2 : legendTextSize.height / 4); else {
                            var maxSize = legendTextSize.height > shapeHeight ? legendTextSize.height : shapeHeight;
                            if ("Horizontal" === arrangement) {
                                var prvePositionX = textLocation[j - 1].x + textLocation[j - 1].width + 10 + shapeWidth;
                                if (prvePositionX + shapePadding + legendTextSize.width > legendWidth) {
                                    var nextPositionY = (textLocation[j - 1].y > shapeLocation[j - 1].y + shapeHeight / 2 ? textLocation[j - 1].y : shapeLocation[j - 1].y + shapeHeight / 2) + topPadding;
                                    nextPositionY + maxSize > legendHeight ? (this.getPageChanged(), j = 0, shapeLocation = [], 
                                    textLocation = [], shapeX = startX, shapeY = startY) : (shapeX = shapeLocation[0].x, 
                                    shapeY = nextPositionY + maxSize / 2);
                                } else shapeX = prvePositionX - shapeWidth / 2, shapeY = shapeLocation[j - 1].y;
                            } else {
                                var prevPositionY = textLocation[j - 1].y > shapeLocation[j - 1].y + shapeHeight / 2 ? textLocation[j - 1].y : shapeLocation[j - 1].y + shapeHeight / 2;
                                if (prevPositionY + topPadding + maxSize > legendHeight) {
                                    var nextPositionX = textLocation[j - 1].x + this.textMaxWidth + 10;
                                    nextPositionX + shapePadding + legendTextSize.width > legendWidth ? (shapeX = startX, 
                                    shapeY = startY, textLocation = [], shapeLocation = [], this.getPageChanged(), j = 0) : (shapeX = nextPositionX + shapeWidth / 2, 
                                    shapeY = shapeLocation[0].y);
                                } else shapeX = shapeLocation[j - 1].x, shapeY = prevPositionY + topPadding + shapeHeight / 2;
                            }
                        }
                        textX = shapeX + shapeWidth / 2 + shapePadding, textY = shapeY + legendTextSize.height / 4, 
                        shapeLocation.push({
                            x: shapeX,
                            y: shapeY
                        }), textLocation.push({
                            x: textX,
                            y: textY,
                            width: legendTextSize.width,
                            height: legendTextSize.height / 2
                        }), this.totalPages[this.page].Collection.push({
                            DisplayText: legendItem.text,
                            ImageSrc: legendItem.imageSrc,
                            Shape: {
                                x: shapeX,
                                y: shapeY
                            },
                            Text: {
                                x: textX,
                                y: textY
                            },
                            Fill: legendItem.fill,
                            Rect: {
                                x: shapeLocation[j].x - shapeWidth / 2,
                                y: shapeLocation[j].y - shapeHeight / 2 < textY - legendTextSize.height ? shapeLocation[j].y - shapeHeight / 2 : textY - legendTextSize.height,
                                width: Math.abs(shapeLocation[j].x - shapeWidth / 2 - (textX + legendTextSize.width)),
                                height: shapeHeight > legendTextSize.height ? shapeHeight : legendTextSize.height
                            }
                        }), j++;
                    }
                    var collection = this.totalPages[0].Collection;
                    collection.forEach(function(legendObj, index) {
                        var legendRect = new Rect$3(legendObj.Rect.x, legendObj.Rect.y, legendObj.Rect.width, legendObj.Rect.height);
                        0 === index && (legendItemStartX_1 = legendRect.x, legendItemStartY_1 = legendRect.y), 
                        _this.widthIncrement = Math.max(_this.widthIncrement, Math.abs(legendItemStartX_1 - (legendRect.x + legendRect.width))), 
                        _this.heightIncrement = Math.max(_this.heightIncrement, Math.abs(legendItemStartY_1 - (legendRect.y + legendRect.height)));
                    }), legendWidth = this.widthIncrement < legendWidth ? this.widthIncrement : legendWidth, 
                    legendHeight = this.heightIncrement < legendHeight ? this.heightIncrement : legendHeight, 
                    this.legendItemRect = {
                        x: collection[0].Rect.x,
                        y: collection[0].Rect.y,
                        width: legendWidth,
                        height: legendHeight
                    };
                }
            }
        }, Legend.prototype.getLegends = function(layerIndex, layerData, colorMapping, dataSource, dataPath, colorValuePath, propertyPath) {
            this.getRangeLegendCollection(layerIndex, layerData, colorMapping, dataSource, dataPath, colorValuePath, propertyPath), 
            this.getEqualLegendCollection(layerIndex, layerData, colorMapping, dataSource, dataPath, colorValuePath, propertyPath), 
            this.getDataLegendCollection(layerIndex, layerData, colorMapping, dataSource, dataPath, colorValuePath, propertyPath);
        }, Legend.prototype.getPageChanged = function() {
            this.page++, isNullOrUndefined(this.totalPages[this.page]) && (this.totalPages[this.page] = {
                Page: this.page + 1,
                Collection: []
            });
        }, Legend.prototype.drawLegend = function() {
            var map = this.maps, legend = map.legendSettings, render = map.renderer, textFont = legend.textStyle;
            this.legendGroup = render.createGroup({
                id: map.element.id + "_Legend_Group"
            });
            var eventArgs = {
                name: "legendRendering",
                cancel: !1,
                fill: "",
                shape: legend.shape,
                shapeBorder: legend.shapeBorder
            };
            if ("Interactive" === legend.mode) {
                for (var i = 0; i < this.legendRenderingCollections.length; i++) {
                    var itemId = map.element.id + "_Legend_Index_" + i, textId = map.element.id + "_Legend_Index_" + i + "_Text", item = this.legendRenderingCollections[i], bounds = new Rect$3(item.x, item.y, item.width, item.height), textLocation = new Point(item.textX, item.textY);
                    eventArgs.fill = item.fill, map.trigger("legendRendering", eventArgs);
                    var rectOptions = new RectOption$3(itemId, eventArgs.fill, eventArgs.shapeBorder, 1, bounds);
                    renderTextElement(new TextOption$3(textId, textLocation.x, textLocation.y, "middle", item.text, "", ""), textFont, textFont.color, this.legendGroup), 
                    this.legendGroup.appendChild(render.drawRectangle(rectOptions));
                }
                this.renderLegendBorder();
            } else this.drawLegendItem(this.currentPage);
        }, Legend.prototype.drawLegendItem = function(page) {
            var map = this.maps, legend = map.legendSettings, shapeSize = new Size$3(legend.shapeWidth, legend.shapeHeight), render = map.renderer, shapeBorder = legend.shapeBorder, eventArgs = {
                name: "legendRendering",
                cancel: !1,
                fill: "",
                shape: legend.shape
            };
            if (page >= 0 && page < this.totalPages.length) {
                querySelector(this.legendGroup.id, this.maps.element.id) && remove(querySelector(this.legendGroup.id, this.maps.element.id));
                var strokeColor = "HorizontalLine" === legend.shape || "VerticalLine" === legend.shape || "Cross" === legend.shape ? isNullOrUndefined(legend.fill) ? "#000000" : legend.fill : shapeBorder.color, strokeWidth = ("HorizontalLine" === legend.shape || "VerticalLine" === legend.shape || "Cross" === legend.shape) && 0 === shapeBorder.width ? 1 : shapeBorder.width;
                eventArgs.shapeBorder = {
                    width: strokeWidth,
                    color: strokeColor
                };
                for (var i = 0; i < this.totalPages[page].Collection.length; i++) {
                    var collection = this.totalPages[page].Collection[i], legendElement = render.createGroup({
                        id: map.element.id + "_Legend_Index_" + i
                    }), legendText = collection.DisplayText;
                    eventArgs.fill = collection.Fill, eventArgs.shape = "Markers" === legend.type ? isNullOrUndefined(collection.ImageSrc) ? legend.shape : "Image" : legend.shape, 
                    map.trigger("legendRendering", eventArgs);
                    var shapeId = map.element.id + "_Legend_Shape_Index_" + i, textId = map.element.id + "_Legend_Text_Index_" + i, shapeLocation = collection.Shape, textLocation = collection.Text, renderOptions_1 = (isNullOrUndefined(collection.ImageSrc) ? legend.shape : collection.ImageSrc, 
                    new PathOption$3(shapeId, eventArgs.fill, eventArgs.shapeBorder.width, eventArgs.shapeBorder.color, 1, ""));
                    legendElement.appendChild(drawSymbol$1(shapeLocation, eventArgs.shape, shapeSize, collection.ImageSrc, renderOptions_1)), 
                    renderTextElement(new TextOption$3(textId, textLocation.x, textLocation.y, "start", legendText, "", ""), legend.textStyle, legend.textStyle.color, legendElement), 
                    this.legendGroup.appendChild(legendElement);
                }
                var pagingGroup = void 0;
                if (0 !== this.page) {
                    var pagingText = page + 1 + "/" + this.totalPages.length, pagingFont = legend.textStyle, pagingTextSize = measureText$3(pagingText, pagingFont), leftPageX = this.legendItemRect.x + this.legendItemRect.width - pagingTextSize.width - 20 - 10, rightPageX = this.legendItemRect.x + this.legendItemRect.width, locY = this.legendItemRect.y + this.legendItemRect.height + 2.5 + 10, pageTextX = rightPageX - 10 - pagingTextSize.width / 2 - 5;
                    pagingGroup = render.createGroup({
                        id: map.element.id + "_Legend_Paging_Group"
                    });
                    var leftPageElement = render.createGroup({
                        id: map.element.id + "_Legend_Left_Paging_Group"
                    }), rightPageElement = render.createGroup({
                        id: map.element.id + "_Legend_Right_Paging_Group"
                    }), rightPath = " M " + rightPageX + " " + locY + " L " + (rightPageX - 10) + " " + (locY - 5) + " L " + (rightPageX - 10) + " " + (locY + 5) + " z ", leftPath = " M " + leftPageX + " " + locY + " L " + (leftPageX + 10) + " " + (locY - 5) + " L " + (leftPageX + 10) + " " + (locY + 5) + " z ", leftPageOptions = new PathOption$3(map.element.id + "_Left_Page", "#a6a6a6", 0, "#a6a6a6", 1, "", leftPath);
                    leftPageElement.appendChild(render.drawPath(leftPageOptions));
                    var leftRectPageOptions = new RectOption$3(map.element.id + "_Left_Page_Rect", "transparent", {}, 1, new Rect$3(leftPageX - 5, locY - 10, 20, 20), null, null, "", "");
                    leftPageElement.appendChild(render.drawRectangle(leftRectPageOptions)), this.wireEvents(leftPageElement);
                    var rightPageOptions = new PathOption$3(map.element.id + "_Right_Page", "#a6a6a6", 0, "#a6a6a6", 1, "", rightPath);
                    rightPageElement.appendChild(render.drawPath(rightPageOptions));
                    var rightRectPageOptions = new RectOption$3(map.element.id + "_Right_Page_Rect", "transparent", {}, 1, new Rect$3(rightPageX - 10, locY - 5, 10, 10), null, null, "", "");
                    rightPageElement.appendChild(render.drawRectangle(rightRectPageOptions)), this.wireEvents(rightPageElement), 
                    pagingGroup.appendChild(leftPageElement), pagingGroup.appendChild(rightPageElement);
                    var pageTextOptions = {
                        id: map.element.id + "_Paging_Text",
                        x: pageTextX,
                        y: locY + pagingTextSize.height / 4,
                        fill: "#a6a6a6",
                        "font-size": "14px",
                        "font-style": pagingFont.fontStyle,
                        "font-family": pagingFont.fontFamily,
                        "font-weight": pagingFont.fontWeight,
                        "text-anchor": "middle",
                        transform: "",
                        opacity: 1,
                        "dominant-baseline": ""
                    };
                    pagingGroup.appendChild(render.createText(pageTextOptions, pagingText)), this.legendGroup.appendChild(pagingGroup);
                }
                this.renderLegendBorder();
            }
        }, Legend.prototype.renderLegendBorder = function() {
            var map = this.maps, legend = map.legendSettings, legendTitle = legend.title.text, textStyle = legend.titleStyle, trimTitle = textTrim$1(this.legendItemRect.width + 20, legendTitle, textStyle), textSize = measureText$3(trimTitle, textStyle);
            this.legendBorderRect = new Rect$3(this.legendItemRect.x - 10, this.legendItemRect.y - 10 - textSize.height, this.legendItemRect.width + 20, this.legendItemRect.height + 20 + textSize.height + ("Interactive" === legend.mode ? 0 : 0 !== this.page ? 10 : 0)), 
            legendTitle && renderTextElement(new TextOption$3(map.element.id + "_LegendTitle", this.legendItemRect.x + this.legendItemRect.width / 2, this.legendItemRect.y - textSize.height / 2, "middle", trimTitle, ""), textStyle, textStyle.color, this.legendGroup);
            var renderOptions = new RectOption$3(map.element.id + "_Legend_Border", legend.background, legend.border, 1, this.legendBorderRect, null, null, "", "");
            this.legendGroup.appendChild(map.renderer.drawRectangle(renderOptions)), this.translate = "Float" !== legend.position ? this.getLegendAlignment(map, this.legendBorderRect.width, this.legendBorderRect.height, legend) : legend.location, 
            this.legendGroup.setAttribute("transform", "translate( " + (this.translate.x + -this.legendBorderRect.x) + " " + (this.translate.y + -this.legendBorderRect.y) + " )"), 
            map.svgObject.appendChild(this.legendGroup);
        }, Legend.prototype.changeNextPage = function(e) {
            this.currentPage = e.target.id.indexOf("_Left_Page_") > -1 ? this.currentPage - 1 : this.currentPage + 1, 
            this.legendGroup = this.maps.renderer.createGroup({
                id: this.maps.element.id + "_Legend_Group"
            }), this.drawLegendItem(this.currentPage), querySelector(this.maps.element.id + "_Legend_Border", this.maps.element.id) && (querySelector(this.maps.element.id + "_Legend_Border", this.maps.element.id).style.pointerEvents = "none");
        }, Legend.prototype.getLegendAlignment = function(map, width, height, legend) {
            var x, y, totalWidth = map.availableSize.width, totalHeight = map.availableSize.height;
            switch (legend.position) {
              case "Top":
              case "Bottom":
                map.mapAreaRect.height = map.mapAreaRect.height - height, x = totalWidth / 2 - width / 2, 
                y = "Top" === legend.position ? map.mapAreaRect.y : map.mapAreaRect.y + map.mapAreaRect.height, 
                map.mapAreaRect.y = "Top" === legend.position ? map.mapAreaRect.y + height + 10 : map.mapAreaRect.y;
                break;

              case "Left":
              case "Right":
                map.mapAreaRect.width = map.mapAreaRect.width - width, x = "Left" === legend.position ? map.mapAreaRect.x : map.mapAreaRect.x + map.mapAreaRect.width, 
                y = totalHeight / 2 - height / 2, map.mapAreaRect.x = "Left" === legend.position ? map.mapAreaRect.x + width : map.mapAreaRect.x;
            }
            switch (legend.alignment) {
              case "Near":
                "Top" === legend.position || "Bottom" === legend.position ? x = map.mapAreaRect.x : y = map.mapAreaRect.y;
                break;

              case "Far":
                "Top" === legend.position || "Bottom" === legend.position ? x = totalWidth - width : y = totalHeight - height;
            }
            return new Point(x, y);
        }, Legend.prototype.getMarkersLegendCollections = function(layerIndex, markers) {
            var _this = this;
            markers.forEach(function(marker, markerIndex) {
                var dataSource = marker.dataSource, field = marker.legendText;
                dataSource.forEach(function(data, dataIndex) {
                    var imageSrc = null;
                    if (marker.visible && !isNullOrUndefined(data.latitude) && !isNullOrUndefined(data.longitude)) {
                        if (marker.template) {
                            var templateElement = getTemplateFunction$3(marker.template)(_this.maps);
                            imageSrc = (isNullOrUndefined(templateElement.childElementCount) ? templateElement[0] : templateElement).querySelector("img").src;
                        }
                        var text = isNullOrUndefined(data[field]) ? "" : data[field];
                        _this.legendCollection.push({
                            layerIndex: layerIndex,
                            markerIndex: markerIndex,
                            dataIndex: dataIndex,
                            fill: marker.fill,
                            text: text,
                            imageSrc: imageSrc
                        });
                    }
                });
            });
        }, Legend.prototype.getRangeLegendCollection = function(layerIndex, layerData, colorMapping, dataSource, dataPath, colorValuePath, propertyPath) {
            for (var legendText, _this = this, fill = this.maps.legendSettings.fill, _loop_1 = function(colorMap) {
                if (!isNullOrUndefined(colorMap.from) && !isNullOrUndefined(colorMap.to)) {
                    legendText = isNullOrUndefined(colorMap.label) ? colorMap.from + " - " + colorMap.to : colorMap.label;
                    var rangeData_1 = [], colorMapProcess_1 = !1;
                    dataSource.forEach(function(data, dataIndex) {
                        var colorValue = parseFloat(data[colorValuePath]);
                        colorValue >= colorMap.from && colorValue <= colorMap.to && (colorMapProcess_1 = !0, 
                        rangeData_1.push(_this.getLegendData(layerIndex, dataIndex, data, dataPath, layerData, propertyPath, colorValue)));
                    }), colorMapProcess_1 || rangeData_1.push({
                        layerIndex: layerIndex,
                        shapeIndex: null,
                        dataIndex: null,
                        name: null,
                        value: null
                    });
                    var legendFill = isNullOrUndefined(fill) ? colorMap.color : fill;
                    this_1.getOverallLegendItemsCollection(legendText, legendFill, rangeData_1);
                }
            }, this_1 = this, _i = 0, colorMapping_1 = colorMapping; _i < colorMapping_1.length; _i++) {
                _loop_1(colorMapping_1[_i]);
            }
        }, Legend.prototype.getOverallLegendItemsCollection = function(legendText, legendFill, legendData) {
            var newColllection = [];
            if (legendData.length > 0) {
                for (var i = 0; i < legendData.length; i++) {
                    var collection = legendData[i];
                    if (collection.length > 0) for (var j = 0; j < collection.length; j++) newColllection.push(collection[j]); else newColllection.push(legendData[i]);
                    newColllection._isVisible = !0;
                }
                this.legendCollection.push({
                    text: legendText,
                    fill: legendFill,
                    data: newColllection
                });
            }
        }, Legend.prototype.getEqualLegendCollection = function(layerIndex, layerData, colorMapping, dataSource, dataPath, colorValuePath, propertyPath) {
            for (var legendText, _this = this, fill = this.maps.legendSettings.fill, _loop_2 = function(colorMap) {
                if (!isNullOrUndefined(colorMap.value)) {
                    legendText = isNullOrUndefined(colorMap.label) ? colorMap.value : colorMap.label;
                    var equalData_1 = [], eqaulColorProcess_1 = !1;
                    dataSource.forEach(function(data, dataIndex) {
                        var equalValue = data[colorValuePath];
                        equalValue === colorMap.value && (eqaulColorProcess_1 = !0, equalData_1.push(_this.getLegendData(layerIndex, dataIndex, data, dataPath, layerData, propertyPath, equalValue)));
                    }), eqaulColorProcess_1 || equalData_1.push({
                        layerIndex: layerIndex,
                        shapeIndex: null,
                        dataIndex: null,
                        name: null,
                        value: null
                    });
                    var legendFill = isNullOrUndefined(fill) ? colorMap.color : fill;
                    this_2.getOverallLegendItemsCollection(legendText, legendFill, equalData_1);
                }
            }, this_2 = this, _i = 0, colorMapping_2 = colorMapping; _i < colorMapping_2.length; _i++) {
                _loop_2(colorMapping_2[_i]);
            }
        }, Legend.prototype.getDataLegendCollection = function(layerIndex, layerData, colorMapping, dataSource, dataPath, colorValuePath, propertyPath) {
            var legendText, _this = this, fill = this.maps.legendSettings.fill;
            isNullOrUndefined(colorValuePath) || dataSource.forEach(function(data, dataIndex) {
                var dataValue = data[colorValuePath], newData = [], legendFill = isNullOrUndefined(fill) ? dataValue : fill;
                isNullOrUndefined(dataValue) || 0 !== colorMapping.length || (legendText = data[dataPath], 
                newData.push(_this.getLegendData(layerIndex, dataIndex, data, dataPath, layerData, propertyPath, dataValue))), 
                _this.getOverallLegendItemsCollection(legendText, legendFill, newData);
            });
        }, Legend.prototype.interactiveHandler = function(e) {
            var target = e.target, legend = this.maps.legendSettings, id = this.maps.element.id + "_Interactive_Legend", hoverId = "Layers" === legend.type ? "_ShapeIndex_" : "Markers" === legend.type ? "_MarkerIndex_" : "_BubbleIndex_";
            if (target.id.indexOf(hoverId) > 1) {
                var layerIndex = parseFloat(target.id.split("_")[2]), dataIndex = parseFloat(target.id.split("_")[6]), fill = void 0, stroke = void 0, strokeWidth = void 0;
                isNullOrUndefined(querySelector(id, this.maps.element.id)) || remove(querySelector(id, this.maps.element.id));
                var layer = this.maps.layersCollection[layerIndex];
                if (legend.visible && this.legendRenderingCollections.length > 0 && "Interactive" === legend.mode && ("Layers" === legend.type ? layer.visible : "Markers" === legend.type ? layer.markerSettings[parseFloat(target.id.split("_")[4])].visible : this.maps.getBubbleVisible(this.maps.layersCollection[layerIndex]))) for (var svgRect = this.maps.svgObject.getBoundingClientRect(), i = 0; i < this.legendCollection.length; i++) {
                    var currentData = this.legendCollection[i], legendElement = querySelector(this.maps.element.id + "_Legend_Index_" + i, this.maps.element.id), legendRect = legendElement.getBoundingClientRect(), rect = new Rect$3(Math.abs(legendRect.left - svgRect.left), Math.abs(legendRect.top - svgRect.top), legendRect.width, legendRect.height);
                    if (fill = legendElement.getAttribute("fill"), stroke = legend.shapeBorder.color, 
                    strokeWidth = legend.shapeBorder.width, !isNullOrUndefined(currentData.data)) for (var data = currentData.data, j = 0; j < data.length; j++) if (dataIndex === data[j].dataIndex && layerIndex === data[j].layerIndex) {
                        this.renderInteractivePointer(legend, fill, stroke, id, strokeWidth, rect);
                        break;
                    }
                }
            } else isNullOrUndefined(querySelector(id, this.maps.element.id)) || remove(querySelector(id, this.maps.element.id));
        }, Legend.prototype.renderInteractivePointer = function(legend, fill, stroke, id, strokeWidth, rect) {
            var path, pathOptions, locX, locY;
            path = "Horizontal" === ("None" === legend.orientation ? "Top" === legend.position || "Bottom" === legend.position ? "Horizontal" : "Vertical" : legend.orientation) ? legend.invertedPointer ? " M " + (locX = rect.x + rect.width / 2) + " " + (locY = rect.y + rect.height) + " L " + (locX - 10) + " " + (locY + 10) + " L " + (locX + 10) + " " + (locY + 10) + " Z " : " M " + (locX = rect.x + rect.width / 2) + " " + (locY = rect.y) + " L " + (locX - 10) + " " + (locY - 10) + " L " + (locX + 10) + " " + (locY - 10) + " Z " : legend.invertedPointer ? " M " + (locX = rect.x) + " " + (locY = rect.y + rect.height / 2) + " L " + (locX - 10) + " " + (locY - 10) + " L " + (locX - 10) + " " + (locY + 10) + " z " : " M " + (locX = rect.x + rect.width) + " " + (locY = rect.y + rect.height / 2) + " L " + (locX + 10) + " " + (locY - 10) + " L " + (locX + 10) + " " + (locY + 10) + " z ", 
            pathOptions = new PathOption$3(id, fill, strokeWidth, stroke, 1, "", path), this.maps.svgObject.appendChild(this.maps.renderer.drawPath(pathOptions));
        }, Legend.prototype.wireEvents = function(element) {
            EventHandler.add(element, Browser.touchStartEvent, this.changeNextPage, this);
        }, Legend.prototype.addEventListener = function() {
            this.maps.isDestroyed || (this.maps.on(Browser.touchMoveEvent, this.interactiveHandler, this), 
            this.maps.on(Browser.touchEndEvent, this.interactiveHandler, this));
        }, Legend.prototype.removeEventListener = function() {
            this.maps.isDestroyed || (this.maps.off(Browser.touchMoveEvent, this.interactiveHandler), 
            this.maps.off(Browser.touchEndEvent, this.interactiveHandler));
        }, Legend.prototype.getLegendData = function(layerIndex, dataIndex, data, dataPath, layerData, shapePropertyPath, value) {
            var legendData = [];
            if ("[object Array]" === Object.prototype.toString.call(layerData)) for (var i = 0; i < layerData.length; i++) {
                layerData[i].properties[shapePropertyPath] === data[dataPath] && legendData.push({
                    layerIndex: layerIndex,
                    shapeIndex: i,
                    dataIndex: dataIndex,
                    name: data[dataPath],
                    value: value
                });
            }
            return legendData;
        }, Legend.prototype.getModuleName = function() {
            return "Legend";
        }, Legend.prototype.destroy = function(maps) {
            this.removeEventListener();
        }, Legend;
    }(), Highlight = function() {
        function Highlight(maps) {
            this.maps = maps, this.addEventListener();
        }
        return Highlight.prototype.addEventListener = function() {
            this.maps.isDestroyed || (this.maps.on(Browser.touchMoveEvent, this.mouseMove, this), 
            this.maps.on(Browser.touchStartEvent, this.mouseMove, this));
        }, Highlight.prototype.removeEventListener = function() {
            this.maps.isDestroyed || (this.maps.off(Browser.touchMoveEvent, this.mouseMove), 
            this.maps.off(Browser.touchStartEvent, this.mouseMove));
        }, Highlight.prototype.addHighlight = function(layerIndex, name, enable) {
            var targetEle = getTargetElement(layerIndex, name, 0, this.maps);
            enable ? this.mapHighlight(targetEle, null, null) : removeClass$1(targetEle);
        }, Highlight.prototype.mouseMove = function(e) {
            var layerIndex, targetEle = e.target, isTouch = "touch" === e.pointerType || "2" === e.pointerType || e.type.indexOf("touch") > -1;
            if ((-1 !== targetEle.id.indexOf("LayerIndex") || targetEle.id.indexOf("NavigationIndex") > -1) && "ShapeselectionMapStyle" !== targetEle.getAttribute("class") && !isTouch) {
                layerIndex = parseInt(targetEle.id.split("_LayerIndex_")[1].split("_")[0], 10);
                var shapeData = void 0, data = void 0, shapeIn = void 0, dataIndex = void 0;
                if (targetEle.id.indexOf("ShapeIndex") > -1) shapeIn = parseInt(targetEle.id.split("_ShapeIndex_")[1].split("_")[0], 10), 
                shapeData = this.maps.layers[layerIndex].shapeData.features ? this.maps.layers[layerIndex].shapeData.features[shapeIn].properties : null, 
                data = isNullOrUndefined(dataIndex = parseInt(targetEle.id.split("_dataIndex_")[1].split("_")[0], 10)) ? null : this.maps.layers[layerIndex].dataSource[dataIndex], 
                this.highlightSettings = this.maps.layers[layerIndex].highlightSettings; else if (targetEle.id.indexOf("BubbleIndex") > -1) {
                    var bubble = parseInt(targetEle.id.split("_BubbleIndex_")[1].split("_")[0], 10);
                    dataIndex = parseInt(targetEle.id.split("_dataIndex_")[1].split("_")[0], 10), data = this.maps.layers[layerIndex].bubbleSettings[bubble].dataSource[dataIndex], 
                    this.highlightSettings = this.maps.layers[layerIndex].bubbleSettings[bubble].highlightSettings;
                } else if (targetEle.id.indexOf("MarkerIndex") > -1) {
                    var marker = parseInt(targetEle.id.split("_MarkerIndex_")[1].split("_")[0], 10);
                    dataIndex = parseInt(targetEle.id.split("_DataIndex_")[1].split("_")[0], 10), data = this.maps.layers[layerIndex].markerSettings[marker].dataSource[dataIndex], 
                    this.highlightSettings = this.maps.layers[layerIndex].markerSettings[marker].highlightSettings;
                } else {
                    var index = parseInt(targetEle.id.split("_NavigationIndex_")[1].split("_")[0], 10);
                    layerIndex = parseInt(targetEle.id.split("_LayerIndex_")[1].split("_")[0], 10), 
                    shapeData = null, data = {
                        latitude: this.maps.layers[layerIndex].navigationLineSettings[index].latitude,
                        longitude: this.maps.layers[layerIndex].navigationLineSettings[index].longitude
                    }, this.highlightSettings = this.maps.layers[layerIndex].navigationLineSettings[index].highlightSettings;
                }
                if (this.highlightSettings.enable) this.mapHighlight(targetEle, shapeData, data); else {
                    var element = document.getElementsByClassName("highlightMapStyle")[0];
                    if (!isNullOrUndefined(element) && (removeClass$1(element), element.id.indexOf("NavigationIndex") > -1)) {
                        index = parseInt(element.id.split("_NavigationIndex_")[1].split("_")[0], 10);
                        var layerIndex_1 = parseInt(element.parentElement.id.split("_layerIndex_")[1].split("_")[0], 10);
                        element.setAttribute("stroke-width", this.maps.layers[layerIndex_1].navigationLineSettings[index].width.toString()), 
                        element.setAttribute("stroke", this.maps.layers[layerIndex_1].navigationLineSettings[index].color);
                    }
                }
            } else if (getElementsByClassName("highlightMapStyle").length > 0) {
                if ((targetEle = getElementsByClassName("highlightMapStyle")[0]).id.indexOf("NavigationIndex") > -1) {
                    index = parseInt(targetEle.id.split("_NavigationIndex_")[1].split("_")[0], 10);
                    layerIndex = parseInt(targetEle.parentElement.id.split("_layerIndex_")[1].split("_")[0], 10), 
                    targetEle.setAttribute("stroke-width", this.maps.layers[layerIndex].navigationLineSettings[index].width.toString()), 
                    targetEle.setAttribute("stroke", this.maps.layers[layerIndex].navigationLineSettings[index].color);
                }
                removeClass$1(targetEle);
            }
        }, Highlight.prototype.mapHighlight = function(targetEle, shapeData, data) {
            var eventArgs = {
                opacity: this.highlightSettings.opacity,
                fill: -1 === targetEle.id.indexOf("NavigationIndex") ? this.highlightSettings.fill : "none",
                border: {
                    color: this.highlightSettings.border.color,
                    width: this.highlightSettings.border.width
                },
                name: "itemHighlight",
                target: targetEle.id,
                cancel: !1,
                shapeData: shapeData,
                data: data
            };
            this.maps.trigger("itemHighlight", eventArgs), this.highlightMap(targetEle, eventArgs);
        }, Highlight.prototype.highlightMap = function(targetEle, eventArgs) {
            if ("highlightMapStyle" !== targetEle.getAttribute("class")) {
                if (getElementsByClassName("highlightMapStyle").length > 0) {
                    var elem = getElementsByClassName("highlightMapStyle")[0];
                    if (removeClass$1(elem), elem.id.indexOf("NavigationIndex") > -1) {
                        var index = parseInt(elem.id.split("_NavigationIndex_")[1].split("_")[0], 10), layerIndex = parseInt(elem.parentElement.id.split("_layerIndex_")[1].split("_")[0], 10);
                        elem.setAttribute("stroke-width", this.maps.layers[layerIndex].navigationLineSettings[index].width.toString()), 
                        elem.setAttribute("stroke", this.maps.layers[layerIndex].navigationLineSettings[index].color);
                    }
                }
                getElement$3("highlightMap") ? customizeStyle("highlightMap", "highlightMapStyle", eventArgs) : document.body.appendChild(createStyle("highlightMap", "highlightMapStyle", eventArgs)), 
                targetEle.setAttribute("stroke-width", eventArgs.border.width.toString()), targetEle.setAttribute("stroke", eventArgs.border.color), 
                targetEle.setAttribute("class", "highlightMapStyle");
            }
        }, Highlight.prototype.getModuleName = function() {
            return "Highlight";
        }, Highlight.prototype.destroy = function(maps) {
            this.removeEventListener();
        }, Highlight;
    }(), Selection$2 = function() {
        function Selection(maps) {
            this.maps = maps, this.addEventListener();
        }
        return Selection.prototype.addEventListener = function() {
            this.maps.isDestroyed || this.maps.on("click", this.mouseClick, this);
        }, Selection.prototype.removeEventListener = function() {
            this.maps.isDestroyed || this.maps.off("click", this.mouseClick);
        }, Selection.prototype.mouseClick = function(targetEle) {
            if (targetEle.id.indexOf("LayerIndex") > -1 || targetEle.id.indexOf("NavigationIndex") > -1) {
                var layerIndex = void 0, shapeData = void 0, data = void 0, shapeIndex = void 0, dataIndex = void 0;
                if (layerIndex = parseInt(targetEle.id.split("_LayerIndex_")[1].split("_")[0], 10), 
                targetEle.id.indexOf("ShapeIndex") > -1) shapeIndex = parseInt(targetEle.id.split("_ShapeIndex_")[1].split("_")[0], 10), 
                shapeData = this.maps.layers[layerIndex].shapeData.features ? this.maps.layers[layerIndex].shapeData.features[shapeIndex].properties : null, 
                data = isNullOrUndefined(dataIndex = parseInt(targetEle.id.split("_dataIndex_")[1].split("_")[0], 10)) ? null : this.maps.layers[layerIndex].dataSource[dataIndex], 
                this.selectionsettings = this.maps.layers[layerIndex].selectionSettings, this.selectionType = "Shape"; else if (targetEle.id.indexOf("BubbleIndex") > -1) {
                    var bubbleIndex = parseInt(targetEle.id.split("_BubbleIndex_")[1].split("_")[0], 10);
                    dataIndex = parseInt(targetEle.id.split("_dataIndex_")[1].split("_")[0], 10), data = this.maps.layers[layerIndex].bubbleSettings[bubbleIndex].dataSource[dataIndex], 
                    this.selectionsettings = this.maps.layers[layerIndex].bubbleSettings[bubbleIndex].selectionSettings, 
                    this.selectionType = "Bubble";
                } else if (targetEle.id.indexOf("MarkerIndex") > -1) {
                    var markerIndex = parseInt(targetEle.id.split("_MarkerIndex_")[1].split("_")[0], 10);
                    dataIndex = parseInt(targetEle.id.split("_DataIndex_")[1].split("_")[0], 10), data = this.maps.layers[layerIndex].markerSettings[markerIndex].dataSource[dataIndex], 
                    this.selectionsettings = this.maps.layers[layerIndex].markerSettings[markerIndex].selectionSettings, 
                    this.selectionType = "Marker";
                } else {
                    var index = parseInt(targetEle.id.split("_NavigationIndex_")[1].split("_")[0], 10);
                    shapeData = null, data = {
                        latitude: this.maps.layers[layerIndex].navigationLineSettings[index].latitude,
                        longitude: this.maps.layers[layerIndex].navigationLineSettings[index].longitude
                    }, this.selectionsettings = this.maps.layers[layerIndex].navigationLineSettings[index].selectionSettings, 
                    this.selectionType = "navigationline";
                }
                this.selectionsettings.enable && this.selectMap(targetEle, shapeData, data);
            }
        }, Selection.prototype.addSelection = function(layerIndex, name, enable) {
            var targetEle = getTargetElement(layerIndex, name, 0, this.maps);
            enable ? this.selectMap(targetEle, null, null) : removeClass$1(targetEle);
        }, Selection.prototype.selectMap = function(targetEle, shapeData, data) {
            this.selectionsettings;
            var eventArgs = {
                opacity: this.selectionsettings.opacity,
                fill: "navigationline" !== this.selectionType ? this.selectionsettings.fill : "none",
                border: {
                    color: this.selectionsettings.border.color,
                    width: this.selectionsettings.border.width
                },
                name: "itemSelection",
                target: targetEle.id,
                cancel: !1,
                shapeData: shapeData,
                data: data
            };
            if (this.maps.trigger("itemSelection", eventArgs), targetEle.getAttribute("class") === this.selectionType + "selectionMapStyle") {
                if (removeClass$1(targetEle), targetEle.id.indexOf("NavigationIndex") > -1) {
                    var index = parseInt(targetEle.id.split("_NavigationIndex_")[1].split("_")[0], 10), layerIndex = parseInt(targetEle.parentElement.id.split("_layerIndex_")[1].split("_")[0], 10);
                    targetEle.setAttribute("stroke-width", this.maps.layers[layerIndex].navigationLineSettings[index].width.toString()), 
                    targetEle.setAttribute("stroke", this.maps.layers[layerIndex].navigationLineSettings[index].color);
                }
            } else {
                if (!this.selectionsettings.enableMultiSelect && getElementsByClassName(this.selectionType + "selectionMapStyle").length > 0) {
                    var ele = getElementsByClassName(this.selectionType + "selectionMapStyle")[0];
                    if (removeClass$1(ele), ele.id.indexOf("NavigationIndex") > -1) {
                        index = parseInt(targetEle.id.split("_NavigationIndex_")[1].split("_")[0], 10), 
                        layerIndex = parseInt(targetEle.parentElement.id.split("_layerIndex_")[1].split("_")[0], 10);
                        ele.setAttribute("stroke-width", this.maps.layers[layerIndex].navigationLineSettings[index].width.toString()), 
                        ele.setAttribute("stroke", this.maps.layers[layerIndex].navigationLineSettings[index].color);
                    }
                }
                getElement$3(this.selectionType + "selectionMap") ? customizeStyle(this.selectionType + "selectionMap", this.selectionType + "selectionMapStyle", eventArgs) : document.body.appendChild(createStyle(this.selectionType + "selectionMap", this.selectionType + "selectionMapStyle", eventArgs)), 
                targetEle.setAttribute("stroke-width", eventArgs.border.width.toString()), targetEle.setAttribute("stroke", eventArgs.border.color), 
                targetEle.setAttribute("class", this.selectionType + "selectionMapStyle");
            }
        }, Selection.prototype.getModuleName = function() {
            return "Selection";
        }, Selection.prototype.destroy = function(maps) {
            this.removeEventListener();
        }, Selection;
    }(), MapsTooltip = function() {
        function MapsTooltip(maps) {
            this.isTouch = !1, this.touchDelay = 0, this.maps = maps, this.element = maps.element, 
            this.addEventListener(), this.ejTooltip = new Tooltip({
                opensOn: "custom",
                position: "TopCenter",
                beforeRender: this.onBeforeRender.bind(this),
                beforeOpen: this.tooltipCustomization.bind(this),
                openDelay: 0,
                closeDelay: 1
            }), this.ejTooltip.appendTo(this.element);
        }
        return MapsTooltip.prototype.addEventListener = function() {
            this.maps.isDestroyed || (this.maps.on(Browser.touchMoveEvent, this.mouseMove, this), 
            this.maps.on(Browser.touchEndEvent, this.mouseMove, this));
        }, MapsTooltip.prototype.removeEventListener = function() {
            this.maps.isDestroyed || (this.maps.off(Browser.touchMoveEvent, this.mouseMove), 
            this.maps.off(Browser.touchEndEvent, this.mouseMove));
        }, MapsTooltip.prototype.mouseMove = function(e) {
            this.isTouch && new Date().getTime() < this.touchDelay || (this.setMouseXY(e), this.renderTooltip(e));
        }, MapsTooltip.prototype.setMouseXY = function(e) {
            var pageX, pageY;
            if (e.type.indexOf("touch") > -1) {
                this.isTouch = !0;
                var touchArg = e;
                pageY = touchArg.changedTouches[0].clientY, pageX = touchArg.changedTouches[0].clientX;
            } else this.isTouch = "touch" === e.pointerType || "2" === e.pointerType, pageX = e.clientX, 
            pageY = e.clientY;
            this.mouse = new MapLocation(pageX, pageY), this.touchDelay = new Date().getTime() + 100;
        }, MapsTooltip.prototype.renderTooltip = function(e) {
            if (this.previousId === e.target.id) this.ejTooltip.refresh(this.appendTargetElement(this.mouse, 0)); else if (this.manipulateTarget(e.target)) {
                if (this.shapeColor = e.target.getAttribute("fill"), document.querySelector(".e-tip-content") && !this.setTooltipContent(this.options) && !this.isTouch) {
                    var args = {
                        type: null,
                        cancel: !1,
                        element: this.customTooltip,
                        event: e,
                        name: "custom",
                        target: this.tooltipEle
                    };
                    return void this.tooltipCustomization(args);
                }
                this.closeTooltip(1), this.ejTooltip.open(this.appendTargetElement(this.mouse));
            } else this.closeTooltip(1);
        }, MapsTooltip.prototype.getTargetElement = function(element) {
            var hoverElements = [ "_ShapeIndex_", "_MarkerIndex_", "_BubbleIndex_" ];
            if (!isNullOrUndefined(element.id) && element.id.length > 0 && element.id !== this.maps.element.id) for (var i = 0; i < hoverElements.length; i++) {
                if (element.id.indexOf(hoverElements[i]) > -1) {
                    this.tooltipEle = element;
                    break;
                }
                i === hoverElements.length - 1 && this.getTargetElement(element.parentNode);
            } else element.id !== this.maps.element.id && this.getTargetElement(element.parentNode);
        }, MapsTooltip.prototype.closeTooltip = function(delay, duration, effect) {
            void 0 === duration && (duration = 0), void 0 === effect && (effect = "None"), this.ejTooltip.closeDelay = duration, 
            this.ejTooltip.close({
                delay: delay,
                duration: duration,
                effect: effect
            }), this.previousId = null;
        }, MapsTooltip.prototype.manipulateTarget = function(currentTarget) {
            if (this.tooltipEle = null, this.getTargetElement(currentTarget), isNullOrUndefined(this.tooltipEle)) return !1;
            var target = this.tooltipEle.id;
            this.previousId = target;
            var index = parseFloat(target.split("_")[2]), layer = this.maps.layersCollection[index];
            if (target.indexOf("_ShapeIndex_") > -1) {
                this.options = layer.tooltipSettings;
                var shape = parseInt(target.split("_")[4], 10);
                if (isNullOrUndefined(layer.shapeData.features)) return !1;
                var value = layer.shapeData.features[shape].properties;
                if (index = checkShapeDataFields(layer.dataSource, value, layer.shapeDataPath, layer.shapePropertyPath), 
                this.options.visible && (!isNullOrUndefined(index) && !isNaN(index) || !isNullOrUndefined(value))) return this.currentData = layer.dataSource[index] || value, 
                !0;
            } else if (target.indexOf("_MarkerIndex_") > -1) {
                var markerIndex = parseInt(target.split("_")[4], 10), dataIndex = parseInt(target.split("_")[6], 10), marker = layer.markerSettings[markerIndex];
                if (this.options = marker.tooltipSettings, !isNaN(markerIndex) && this.options.visible) return this.currentData = marker.dataSource[dataIndex], 
                !0;
            } else if (target.indexOf("_BubbleIndex_") > -1) {
                var bubbleIndex = parseInt(target.split("_")[4], 10);
                dataIndex = parseInt(target.split("_")[6], 10);
                if (this.options = layer.bubbleSettings[bubbleIndex].tooltipSettings, !isNaN(bubbleIndex) && this.options.visible) return this.currentData = layer.bubbleSettings[bubbleIndex].dataSource[dataIndex], 
                !0;
            }
            return !1;
        }, MapsTooltip.prototype.appendTargetElement = function(location, padding) {
            void 0 === padding && (padding = 10);
            var element = getElement$3(this.element.id + "_MapsTooltip"), svgRect = getElement$3(this.element.id + "_svg").getBoundingClientRect();
            return location.x -= svgRect.left, location.y -= padding + svgRect.top, this.position = location, 
            element ? (element.style.left = location.x + "px", element.style.top = location.y + "px") : (element = createElement("div", {
                id: this.element.id + "_MapsTooltip",
                styles: "position: absolute;left:" + location.x + "px;top:" + location.y + "px;width:2px;height:2px;background:transparent;pointer-events:none;"
            }), getElement$3(this.element.id + "_Secondary_Element").appendChild(element)), 
            element;
        }, MapsTooltip.prototype.formatter = function(format, data) {
            if (isNullOrUndefined(format)) return null;
            for (var _i = 0, keys_1 = Object.keys(data); _i < keys_1.length; _i++) {
                var key = keys_1[_i];
                format = format.split("${" + key + "}").join(data[key]);
            }
            return format;
        }, MapsTooltip.prototype.onBeforeRender = function(args) {
            args.cancel = this.setTooltipContent(this.options), this.ejTooltip.dataBind();
        }, MapsTooltip.prototype.setTooltipContent = function(options) {
            void 0 === options && (options = this.options);
            var localData = extend({}, this.currentData, null, !0);
            this.maps.format && !isNaN(parseFloat(localData[options.valuePath])) && (localData[options.valuePath] = Internalize(this.maps, parseFloat(localData[options.valuePath])));
            var content = this.formatter(options.format, localData) || localData[options.valuePath];
            content = options.template ? this.joinElements(getTemplateFunction$3(options.template)(localData)) : content, 
            this.textStyle = extend(options.textStyle, options.textStyle, null, !0), this.textStyle.color = this.textStyle.color || this.shapeColor;
            var argsData = {
                cancel: !1,
                name: "tooltipRender",
                content: content,
                border: options.border,
                textStyle: this.textStyle,
                fill: options.fill
            };
            return this.maps.trigger("tooltipRender", argsData), this.border = argsData.border, 
            this.shapeColor = argsData.fill, this.ejTooltip.content = argsData.content, argsData.cancel || isNullOrUndefined(argsData.content) || "" === argsData.content;
        }, MapsTooltip.prototype.joinElements = function(elements) {
            var elementString = "";
            return [].forEach.call(elements, function(ele) {
                elementString += ele.outerHTML;
            }), elementString;
        }, MapsTooltip.prototype.tooltipCustomization = function(args, options) {
            if (void 0 === options && (options = this.options), this.customTooltip = args.element, 
            options.template) return setStyleAttribute(args.element, {
                backgroundColor: "transparent",
                borderColor: "transparent",
                borderWidth: "1px",
                "pointer-events": "none"
            }), setStyleAttribute(args.element.querySelector(".e-arrow-tip"), {
                width: "0px",
                height: "0px"
            }), this.isTouch && this.closeTooltip(1, 1500, "FadeOut"), null;
            var outerWidth, font = this.textStyle, borderColor = this.border.color, border = this.border.width, arrowEle = args.element.querySelector(".e-arrow-tip");
            setStyleAttribute(args.element, {
                backgroundColor: this.shapeColor,
                borderColor: borderColor || "#212121",
                borderWidth: border + "px",
                "pointer-events": "none",
                borderRadius: "5px",
                "padding-left": "5px",
                "padding-right": "5px",
                "padding-top": "3px",
                "padding-bottom": "3px"
            }), setStyleAttribute(args.element.querySelector(".e-tip-content"), {
                color: font.color,
                fontFamily: font.fontFamily,
                fontSize: font.size,
                fontWeight: font.fontWeight,
                fontStyle: font.fontStyle,
                "padding-left": "5px",
                "padding-right": "5px",
                "padding-top": "3px",
                "padding-bottom": "3px"
            }), setStyleAttribute(args.element.querySelector(".e-arrow-tip"), {
                width: 2 * (8 + border) + "px",
                height: 8 + border + "px"
            }), arrowEle.classList.contains("e-tip-top") ? (outerWidth = "8px", setStyleAttribute(args.element.querySelector(".e-arrow-tip-outer"), {
                borderRightColor: "transparent",
                borderLeftColor: "transparent",
                borderBottomColor: borderColor,
                borderLeftWidth: outerWidth,
                borderRightWidth: outerWidth,
                borderBottomWidth: outerWidth
            }), setStyleAttribute(args.element.querySelector(".e-arrow-tip-inner"), {
                color: this.shapeColor,
                top: "0px"
            })) : arrowEle.classList.contains("e-tip-bottom") && (outerWidth = "8px", setStyleAttribute(args.element.querySelector(".e-arrow-tip-outer"), {
                borderRightColor: "transparent",
                borderLeftColor: "transparent",
                borderTopColor: borderColor,
                borderLeftWidth: outerWidth,
                borderRightWidth: outerWidth,
                borderTopWidth: outerWidth
            }), setStyleAttribute(args.element.querySelector(".e-arrow-tip-inner"), {
                color: this.shapeColor
            })), setStyleAttribute(args.element, {
                display: "block",
                transitionProperty: "left,top",
                transitionDuration: "1ms"
            }), this.isTouch && this.closeTooltip(1e3, 1500, "FadeOut");
        }, MapsTooltip.prototype.getModuleName = function() {
            return "MapsTooltip";
        }, MapsTooltip.prototype.destroy = function(maps) {
            this.removeEventListener(), this.ejTooltip.destroy();
        }, MapsTooltip;
    }(), Zoom$1 = function() {
        function Zoom(maps) {
            this.isPanning = !1, this.mouseEnter = !1, this.isTouch = !1, this.rectZoomingStart = !1, 
            this.pinchRect = new Rect$3(0, 0, 0, 0), this.browserName = Browser.info.name, this.isPointer = Browser.isPointer, 
            this.handled = !1, this.pinchFactor = 1, this.startTouches = [], this.maps = maps, 
            this.wheelEvent = "mozilla" === this.browserName ? this.isPointer ? "mousewheel" : "DOMMouseScroll" : "mousewheel", 
            this.cancelEvent = this.isPointer ? "pointerleave" : "mouseleave", this.selectionColor = this.maps.zoomSettings.selectionColor, 
            this.fillColor = this.maps.zoomSettings.color, this.addEventListener(), this.groupElements = [];
        }
        return Zoom.prototype.performZooming = function(position, newZoomFactor, type) {
            var map = this.maps, prevLevel = map.tileZoomLevel, prevScale = map.scale, maxZoom = map.zoomSettings.maxZoom, minZoom = map.zoomSettings.minZoom;
            if (!map.isTileMap && ("ZoomIn" === type ? newZoomFactor >= minZoom && newZoomFactor <= maxZoom : newZoomFactor >= minZoom)) {
                var availSize = map.mapAreaRect, minBounds = map.baseMapRectBounds.min, maxBounds = map.baseMapRectBounds.max, mapTotalWidth = Math.abs(minBounds.x - maxBounds.x), mapTotalHeight = Math.abs(minBounds.y - maxBounds.y), point = map.translatePoint, translatePointX = point.x - (availSize.width / prevScale - availSize.width / newZoomFactor) / (availSize.width / position.x), translatePointY = point.y - (availSize.height / prevScale - availSize.height / newZoomFactor) / (availSize.height / position.y), currentHeight = Math.abs(map.baseMapRectBounds.max.y - map.baseMapRectBounds.min.y) * newZoomFactor;
                translatePointX = currentHeight < map.mapAreaRect.height ? availSize.x + (-minBounds.x + (availSize.width / 2 - mapTotalWidth / 2)) : translatePointX, 
                translatePointY = currentHeight < map.mapAreaRect.height ? availSize.y + (-minBounds.y + (availSize.height / 2 - mapTotalHeight / 2)) : translatePointY, 
                map.translatePoint = new Point(translatePointX, translatePointY), map.scale = newZoomFactor;
            } else map.isTileMap && newZoomFactor >= minZoom && newZoomFactor <= maxZoom && (this.getTileTranslatePosition(prevLevel, newZoomFactor, position), 
            map.tileZoomLevel = newZoomFactor, map.scale = Math.pow(2, newZoomFactor - 1), map.mapLayerPanel.generateTiles(newZoomFactor, map.tileTranslatePoint), 
            map.translatePoint.x = (map.tileTranslatePoint.x - .5 * map.scale) / map.scale, 
            map.translatePoint.y = (map.tileTranslatePoint.y - .5 * map.scale) / map.scale);
            this.applyTransform(), map.trigger("doubleClick", this);
        }, Zoom.prototype.getTileTranslatePosition = function(prevLevel, currentLevel, position) {
            var map = this.maps, bounds = getElementByID(this.maps.element.id).getBoundingClientRect(), prevSize = 256 * Math.pow(2, prevLevel), totalSize = 256 * Math.pow(2, currentLevel), x = (position.x - map.tileTranslatePoint.x) / prevSize * 100, y = (position.y - map.tileTranslatePoint.y) / prevSize * 100;
            map.tileTranslatePoint.x = 1 === currentLevel ? bounds.width / 2 - 256 : position.x - x * totalSize / 100, 
            map.tileTranslatePoint.y = 1 === currentLevel ? bounds.height / 2 - 256 : position.y - y * totalSize / 100;
        }, Zoom.prototype.performRectZooming = function() {
            var map = this.maps, size = map.availableSize, prevLevel = map.tileZoomLevel, zoomRect = this.zoomingRect;
            if (zoomRect.height > 0 && zoomRect.width > 0) {
                var x = this.zoomingRect.x + this.zoomingRect.width / 2, y = this.zoomingRect.y + this.zoomingRect.height / 2, zoomCalculationFactor = void 0;
                if (map.isTileMap) zoomCalculationFactor = prevLevel + Math.round(prevLevel + (size.width / zoomRect.width + size.height / zoomRect.height) / 2), 
                this.getTileTranslatePosition(prevLevel, zoomCalculationFactor, {
                    x: x,
                    y: y
                }), map.tileZoomLevel = zoomCalculationFactor, map.mapLayerPanel.generateTiles(zoomCalculationFactor, map.tileTranslatePoint), 
                map.translatePoint.x = (map.tileTranslatePoint.x - .5 * Math.pow(2, zoomCalculationFactor)) / Math.pow(2, zoomCalculationFactor), 
                map.translatePoint.y = (map.tileTranslatePoint.y - .5 * Math.pow(2, zoomCalculationFactor)) / Math.pow(2, zoomCalculationFactor), 
                map.scale = Math.pow(2, zoomCalculationFactor); else {
                    var scale = map.previousScale = map.scale;
                    zoomCalculationFactor = scale + Math.round((size.width / zoomRect.width + size.height / zoomRect.height) / 2);
                    var translatePoint = map.previousPoint = map.translatePoint, translatePointX = translatePoint.x - (size.width / scale - size.width / zoomCalculationFactor) / (size.width / x), translatePointY = translatePoint.y - (size.height / scale - size.height / zoomCalculationFactor) / (size.height / y);
                    map.translatePoint = new Point(translatePointX, translatePointY), map.scale = zoomCalculationFactor;
                }
                this.applyTransform(!0), this.zoomingRect = null;
            }
        }, Zoom.prototype.setInteraction = function(newInteraction) {
            this.lastScale = 1, this.interaction = newInteraction;
        }, Zoom.prototype.updateInteraction = function() {
            2 === this.fingers ? this.setInteraction("zoom") : this.setInteraction(null);
        }, Zoom.prototype.performPinchZooming = function(e) {
            var map = this.maps, prevLevel = map.tileZoomLevel, availSize = map.mapAreaRect, scale = function(startTouches, endTouches) {
                var startDistance = getDistance(startTouches[0], startTouches[1]);
                return getDistance(endTouches[0], endTouches[1]) / startDistance;
            }(this.touchStartList, this.touchMoveList), touchCenter = function(touches) {
                return {
                    x: touches.map(function(e) {
                        return e.x;
                    }).reduce(sum$1) / touches.length,
                    y: touches.map(function(e) {
                        return e.y;
                    }).reduce(sum$1) / touches.length
                };
            }(function(touches, maps) {
                var rect = maps.element.getBoundingClientRect(), posTop = rect.top + document.defaultView.pageXOffset, posLeft = rect.left + document.defaultView.pageYOffset;
                return Array.prototype.slice.call(touches).map(function(touch) {
                    return {
                        x: touch.pageX - posLeft,
                        y: touch.pageY - posTop
                    };
                });
            }(this.touchMoveList, this.maps)), newScale = scale / this.lastScale;
            this.lastScale = scale, this.pinchFactor *= newScale, this.pinchFactor = Math.min(this.maps.zoomSettings.maxZoom, Math.max(this.pinchFactor, this.maps.zoomSettings.minZoom));
            var zoomCalculationFactor = this.pinchFactor;
            if (map.isTileMap) {
                var newTileFactor = zoomCalculationFactor;
                this.getTileTranslatePosition(prevLevel, newTileFactor, {
                    x: touchCenter.x,
                    y: touchCenter.y
                }), map.tileZoomLevel = newTileFactor, map.mapLayerPanel.generateTiles(newTileFactor, map.tileTranslatePoint), 
                map.translatePoint.x = (map.tileTranslatePoint.x - .5 * Math.pow(2, newTileFactor)) / Math.pow(2, newTileFactor), 
                map.translatePoint.y = (map.tileTranslatePoint.y - .5 * Math.pow(2, newTileFactor)) / Math.pow(2, newTileFactor), 
                map.scale = Math.pow(2, newTileFactor);
            } else {
                var minBounds = map.baseMapRectBounds.min, maxBounds = map.baseMapRectBounds.max, translatePoint = (Math.abs(minBounds.x - maxBounds.x), 
                Math.abs(minBounds.y - maxBounds.y), map.translatePoint), translatePointX_1 = (Math.abs(map.baseMapRectBounds.max.y - map.baseMapRectBounds.min.y), 
                translatePoint.x - (availSize.width / map.scale - availSize.width / zoomCalculationFactor) / (availSize.width / touchCenter.x)), translatePointY_1 = translatePoint.y - (availSize.height / map.scale - availSize.height / zoomCalculationFactor) / (availSize.height / touchCenter.y);
                map.translatePoint = new Point(translatePointX_1, translatePointY_1), map.scale = zoomCalculationFactor;
            }
            this.applyTransform();
        }, Zoom.prototype.drawZoomRectangle = function() {
            var x, y, width, height, map = this.maps, down = this.mouseDownPoints, move = this.mouseMovePoints;
            width = Math.abs(move.x - down.x), height = Math.abs(move.y - down.y), x = move.x > down.x ? down.x : down.x - width, 
            y = move.y > down.y ? down.y : down.y - height;
            getElementByID(map.element.id).getBoundingClientRect();
            if (x > map.mapAreaRect.x && x < map.mapAreaRect.x + map.mapAreaRect.width && y > map.mapAreaRect.y && y < map.mapAreaRect.y + map.mapAreaRect.height) {
                this.zoomingRect = new Rect$3(x, y, width, height);
                var rectSVGObject = map.renderer.createSvg({
                    id: map.element.id + "_Selection_Rect_Zooming",
                    width: map.availableSize.width,
                    height: map.availableSize.height
                }), rectOption = new RectOption$3(map.element.id + "_ZoomRect", "#d3d3d3", {
                    width: 1,
                    color: "#009900"
                }, .5, this.zoomingRect, 0, 0, "", "3");
                rectSVGObject.appendChild(map.renderer.drawRectangle(rectOption)), getElementByID(map.element.id + "_Secondary_Element").appendChild(rectSVGObject);
            }
        }, Zoom.prototype.animateTransform = function(element, animate$$1, x, y, scale) {
            var duration = this.currentLayer.animationDuration;
            animate$$1 && 0 !== duration ? function(element, delay, duration, point, scale, size, maps) {
                var delta = 0, previousLocation = maps.previousPoint, preScale = maps.previousScale, diffScale = scale - preScale, currentLocation = new MapLocation(0, 0), currentScale = 1;
                if (scale !== preScale) {
                    var slopeFactor = function(previousLocation, point) {
                        return previousLocation.x === point.x ? null : (point.y - previousLocation.y) / (point.x - previousLocation.x);
                    }(previousLocation, point), slopeIntersection = function(point, slopeValue) {
                        return null === slopeValue ? point.x : point.y - slopeValue * point.x;
                    }(previousLocation, slopeFactor), horizontalDifference = point.x - previousLocation.x, verticalDifference = point.y - previousLocation.y;
                    animate(element, 0, duration, function(args) {
                        args.timeStamp > args.delay && (delta = (args.timeStamp - args.delay) / args.duration, 
                        currentScale = preScale + delta * diffScale, currentLocation.x = previousLocation.x + delta * horizontalDifference / (currentScale / scale), 
                        currentLocation.y = null == slopeFactor ? previousLocation.y + delta * verticalDifference : slopeFactor * currentLocation.x + slopeIntersection, 
                        args.element.setAttribute("transform", "scale( " + currentScale + " ) translate( " + currentLocation.x + " " + currentLocation.y + " )"), 
                        maps.translatePoint = currentLocation, maps.scale = currentScale, maps.zoomModule.processTemplate(point.x, point.y, currentScale, maps));
                    }, function() {
                        maps.translatePoint = point, maps.scale = scale, element.setAttribute("transform", "scale( " + scale + " ) translate( " + point.x + " " + point.y + " )"), 
                        maps.zoomModule.processTemplate(point.x, point.y, scale, maps);
                    });
                } else element.setAttribute("transform", "scale( " + scale + " ) translate( " + point.x + " " + point.y + " )");
            }(element, 0, duration, new MapLocation(x, y), scale, this.maps.mapAreaRect, this.maps) : element.setAttribute("transform", "scale(" + scale + ") translate( " + x + " " + y + " )");
        }, Zoom.prototype.applyTransform = function(animate$$1) {
            var layerIndex;
            this.templateCount = 0;
            var scale = this.maps.scale, x = this.maps.translatePoint.x, y = this.maps.translatePoint.y;
            if (this.layerCollectionEle) {
                for (var i = 0; i < this.layerCollectionEle.childElementCount; i++) {
                    var layerElement = this.layerCollectionEle.childNodes[i];
                    if ("g" === layerElement.tagName) {
                        this.templateCount++;
                        var index = parseFloat(layerElement.id.split("_")[2]);
                        this.currentLayer = this.maps.layersCollection[index];
                        for (var factor = this.maps.mapLayerPanel.calculateFactor(this.currentLayer), j = 0; j < layerElement.childElementCount; j++) {
                            var currentEle = layerElement.childNodes[j];
                            if (currentEle.id.indexOf("_Markers_Group") > -1 || currentEle.id.indexOf("_bubble_Group") > -1 || currentEle.id.indexOf("_dataLableIndex_Group") > -1) {
                                if (currentEle.id.indexOf("_Markers_Group") > -1) for (var k = 0; k < currentEle.childElementCount; k++) this.markerTranslate(currentEle.childNodes[k], factor, x, y, scale, "Marker", animate$$1); else if (currentEle.id.indexOf("_bubble_Group") > -1) {
                                    var childElement = void 0;
                                    for (k = 0; k < currentEle.childElementCount; k++) {
                                        (childElement = currentEle.childNodes[k]).getAttribute("transform");
                                        layerIndex = parseFloat(childElement.id.split("_")[2]);
                                        for (var bubleIndex = parseFloat(childElement.id.split("_")[4]), dataIndex = parseFloat(childElement.id.split("_")[6]), l = 0; l < this.maps.bubbleModule.bubbleCollection.length; l++) {
                                            var bubbleCollection = this.maps.bubbleModule.bubbleCollection[l];
                                            if (bubbleCollection.LayerIndex === layerIndex && bubbleCollection.BubbleIndex === bubleIndex && bubbleCollection.DataIndex === dataIndex) {
                                                var currentX = (bubbleCollection.center.x + x) * scale, currentY = (bubbleCollection.center.y + y) * scale, duration = this.currentLayer.animationDuration;
                                                animate$$1 && 0 !== duration ? smoothTranslate(childElement, 0, duration, new MapLocation(currentX, currentY)) : childElement.setAttribute("transform", "translate( " + currentX + " " + currentY + " )");
                                                break;
                                            }
                                        }
                                    }
                                } else if (currentEle.id.indexOf("_dataLableIndex_Group") > -1) for (k = 0; k < currentEle.childElementCount; k++) this.dataLabelTranslate(currentEle.childNodes[k], factor, x, y, scale, "DataLabel", animate$$1);
                            } else this.maps.isTileMap && currentEle.id.indexOf("_line_Group") > -1 ? (currentEle.remove(), 
                            layerElement.appendChild(this.maps.navigationLineModule.renderNavigation(this.currentLayer, this.maps.tileZoomLevel, index))) : (changeBorderWidth(currentEle, index, scale, this.maps), 
                            this.animateTransform(currentEle, animate$$1, x, y, scale));
                        }
                    }
                }
                animate$$1 && 0 !== this.currentLayer.animationDuration || this.processTemplate(x, y, scale, this.maps);
            }
        }, Zoom.prototype.processTemplate = function(x, y, scale, maps) {
            for (var i = 0; i < this.templateCount; i++) {
                this.currentLayer = maps.layersCollection[i];
                var factor = maps.mapLayerPanel.calculateFactor(this.currentLayer), markerTemplateElement = getElementByID(maps.element.id + "_LayerIndex_" + i + "_Markers_Template_Group"), datalabelTemplateElemement = getElementByID(maps.element.id + "_LayerIndex_" + i + "_Label_Template_Group");
                if (!isNullOrUndefined(markerTemplateElement) && markerTemplateElement.childElementCount > 0) for (var k = 0; k < markerTemplateElement.childElementCount; k++) this.markerTranslate(markerTemplateElement.childNodes[k], factor, x, y, scale, "Template");
                if (!isNullOrUndefined(datalabelTemplateElemement) && datalabelTemplateElemement.childElementCount > 0) for (k = 0; k < datalabelTemplateElemement.childElementCount; k++) this.dataLabelTranslate(datalabelTemplateElemement.childNodes[k], factor, x, y, scale, "Template");
            }
        }, Zoom.prototype.dataLabelTranslate = function(element, factor, x, y, scale, type, animate$$1) {
            void 0 === animate$$1 && (animate$$1 = !1);
            for (var labelCollection = this.maps.dataLabelModule.dataLabelCollections, layerIndex = parseFloat(element.id.split("_")[2]), shapeIndex = parseFloat(element.id.split("_")[4]), labelIndex = parseFloat(element.id.split("_")[6]), duration = this.currentLayer.animationDuration, l = 0; l < labelCollection.length; l++) {
                var label = labelCollection[l];
                if (label.layerIndex === layerIndex && label.shapeIndex === shapeIndex && label.labelIndex === labelIndex) {
                    var labelX = label.location.x, labelY = label.location.y;
                    if ("Template" === type) {
                        var layerEle = getElementByID(this.maps.element.id + "_Layer_Collections");
                        labelX = Math.abs(this.maps.baseMapRectBounds.min.x - labelX) * scale, labelY = Math.abs(this.maps.baseMapRectBounds.min.y - labelY) * scale;
                        var templateOffset = element.getBoundingClientRect(), layerOffset = layerEle.getBoundingClientRect(), elementOffset = element.parentElement.getBoundingClientRect(), x_1 = labelX + (layerOffset.left - elementOffset.left) - templateOffset.width / 2, y_1 = labelY + (layerOffset.top - elementOffset.top) - templateOffset.height / 2;
                        element.style.left = x_1 + "px", element.style.top = y_1 + "px";
                    } else labelX = (labelX + x) * scale, labelY = (labelY + y) * scale, animate$$1 && 0 !== duration ? smoothTranslate(element, 0, duration, new MapLocation(labelX, labelY)) : element.setAttribute("transform", "translate( " + labelX + " " + labelY + " )");
                }
            }
        }, Zoom.prototype.markerTranslate = function(element, factor, x, y, scale, type, animate$$1) {
            void 0 === animate$$1 && (animate$$1 = !1);
            var layerIndex = parseInt(element.id.split("_")[2], 10), markerIndex = parseInt(element.id.split("_")[4], 10), dataIndex = parseInt(element.id.split("_")[6], 10), layer = this.maps.layersCollection[layerIndex], marker = layer.markerSettings[markerIndex];
            if (!isNullOrUndefined(marker) && !isNullOrUndefined(marker.dataSource) && !isNullOrUndefined(marker.dataSource[dataIndex])) {
                var lng = marker.dataSource[dataIndex].longitude, lat = marker.dataSource[dataIndex].latitude, duration = this.currentLayer.animationDuration, location_1 = this.maps.isTileMap ? convertTileLatLongToPoint(new Point(lng, lat), this.maps.tileZoomLevel, this.maps.tileTranslatePoint, !0) : convertGeoToPoint(lat, lng, factor, layer, this.maps);
                if (this.maps.isTileMap) if ("Template" === type) {
                    var templateOffset = element.getBoundingClientRect();
                    element.style.left = location_1.x - templateOffset.width / 2 + "px", element.style.top = location_1.y - templateOffset.height / 2 + "px";
                } else element.setAttribute("transform", "translate( " + location_1.x + " " + location_1.y + " )"); else if ("Template" === type) {
                    location_1.x = Math.abs(this.maps.baseMapRectBounds.min.x - location_1.x) * scale, 
                    location_1.y = Math.abs(this.maps.baseMapRectBounds.min.y - location_1.y) * scale;
                    templateOffset = element.getBoundingClientRect();
                    var layerOffset = getElementByID(this.maps.element.id + "_Layer_Collections").getBoundingClientRect(), elementOffset = element.parentElement.getBoundingClientRect();
                    element.style.left = location_1.x + (layerOffset.left - elementOffset.left) - templateOffset.width / 2 + marker.offset.x + "px", 
                    element.style.top = location_1.y + (layerOffset.top - elementOffset.top) - templateOffset.height / 2 + marker.offset.y + "px";
                } else location_1.x = (location_1.x + x) * scale + marker.offset.x, location_1.y = (location_1.y + y) * scale + marker.offset.y, 
                animate$$1 && 0 !== duration ? smoothTranslate(element, 0, duration, location_1) : element.setAttribute("transform", "translate( " + location_1.x + " " + location_1.y + " )");
            }
        }, Zoom.prototype.panning = function() {
            var x, y, map = this.maps, down = (map.mapAreaRect, this.mouseDownPoints), move = this.mouseMovePoints, scale = map.scale, translatePoint = map.translatePoint;
            if (map.isTileMap) this.maps.tileZoomLevel > 1 && (x = map.tileTranslatePoint.x - (down.x - move.x), 
            y = map.tileTranslatePoint.y - (down.y - move.y), map.tileTranslatePoint.x = x, 
            map.tileTranslatePoint.y = y, map.mapLayerPanel.generateTiles(map.tileZoomLevel, map.tileTranslatePoint), 
            map.translatePoint.x = (map.tileTranslatePoint.x - (down.x - move.x)) / map.scale, 
            map.translatePoint.y = (map.tileTranslatePoint.y - (down.y - move.y)) / map.scale, 
            this.applyTransform()); else {
                var x_2 = translatePoint.x - (down.x - move.x) / scale, y_2 = translatePoint.y - (down.y - move.y) / scale, layerRect = getElementByID(map.element.id + "_Layer_Collections").getBoundingClientRect(), elementRect = getElementByID(map.element.id + "_svg").getBoundingClientRect(), panningXDirection = down.x - move.x < 0 ? layerRect.left <= elementRect.left + map.mapAreaRect.x : layerRect.left + layerRect.width >= elementRect.left + elementRect.width + map.mapAreaRect.x + map.margin.left, panningYDirection = down.y - move.y < 0 ? layerRect.top <= elementRect.top + map.mapAreaRect.y : layerRect.top + layerRect.height >= elementRect.top + elementRect.height + map.mapAreaRect.y + map.margin.top;
                panningXDirection && panningYDirection && (map.translatePoint = new Point(x_2, y_2), 
                this.applyTransform());
            }
            this.mouseDownPoints = this.mouseMovePoints;
        }, Zoom.prototype.toolBarZooming = function(zoomFactor, type) {
            var map = this.maps, prevLevel = map.tileZoomLevel, scale = map.previousScale = map.scale, maxZoom = map.zoomSettings.maxZoom, minZoom = map.zoomSettings.minZoom, size = map.mapAreaRect;
            if (zoomFactor = "ZoomOut" === type && 1 === Math.round(zoomFactor) ? 1 : zoomFactor, 
            !map.isTileMap && ("ZoomIn" === type ? zoomFactor >= minZoom && zoomFactor <= maxZoom : zoomFactor >= minZoom)) {
                var translatePoint = map.previousPoint = map.translatePoint, min = map.baseMapRectBounds.min, max = map.baseMapRectBounds.max, mapWidth = Math.abs(max.x - min.x), mapHeight = Math.abs(min.y - max.y), translatePointX = translatePoint.x - (size.width / scale - size.width / zoomFactor) / 2, translatePointY = translatePoint.y - (size.height / scale - size.height / zoomFactor) / 2, currentHeight = Math.abs(map.baseMapRectBounds.max.y - map.baseMapRectBounds.min.y) * zoomFactor;
                translatePointX = currentHeight < map.mapAreaRect.height ? size.x + (-min.x + (size.width / 2 - mapWidth / 2)) : translatePointX, 
                translatePointY = currentHeight < map.mapAreaRect.height ? size.y + (-min.y + (size.height / 2 - mapHeight / 2)) : translatePointY, 
                map.translatePoint = new Point(translatePointX, translatePointY), map.scale = zoomFactor;
            } else if (map.isTileMap && zoomFactor >= minZoom && zoomFactor <= maxZoom) {
                var tileZoomFactor = zoomFactor;
                map.scale = Math.pow(2, tileZoomFactor - 1), map.tileZoomLevel = tileZoomFactor;
                var position = {
                    x: map.availableSize.width / 2,
                    y: map.availableSize.height / 2
                };
                this.getTileTranslatePosition(prevLevel, tileZoomFactor, position), map.mapLayerPanel.generateTiles(tileZoomFactor, map.tileTranslatePoint), 
                map.translatePoint.x = (map.tileTranslatePoint.x - .5 * map.scale) / map.scale, 
                map.translatePoint.y = (map.tileTranslatePoint.y - .5 * map.scale) / map.scale;
            }
            this.applyTransform(!0);
        }, Zoom.prototype.createZoomingToolbars = function() {
            var map = this.maps;
            this.toolBarGroup = map.renderer.createGroup({
                id: map.element.id + "_Zooming_KitCollection",
                opacity: .3
            });
            var xSpacing = 15, ySpacing = 15, orientation = map.zoomSettings.toolBarOrientation, toolbarsCollection = map.zoomSettings.toolbars, shadowElement = '<filter id="chart_shadow" height="130%"><feGaussianBlur in="SourceAlpha" stdDeviation="5"/>';
            shadowElement += '<feOffset dx="-3" dy="4" result="offsetblur"/><feComponentTransfer><feFuncA type="linear" slope="1"/>', 
            shadowElement += '</feComponentTransfer><feMerge><feMergeNode/><feMergeNode in="SourceGraphic"/></feMerge></filter>';
            var toolBarLength = map.zoomSettings.toolbars.length, toolWidth = "Horizontal" === map.zoomSettings.toolBarOrientation ? 16 * toolBarLength + 20 * toolBarLength : 32, toolHeight = "Horizontal" === map.zoomSettings.toolBarOrientation ? 32 : 16 * toolBarLength + 20 * toolBarLength;
            this.toolBarGroup.appendChild(map.renderer.drawRectangle(new RectOption$3(map.element.id + "_Zooming_Rect", "transparent", {
                color: "transparent",
                width: 1
            }, 1, new Rect$3(0, 0, toolWidth, toolHeight), 0, 0)));
            var defElement = map.renderer.createDefs();
            defElement.innerHTML = shadowElement, this.toolBarGroup.appendChild(defElement);
            var outerElement = map.renderer.drawRectangle(new RectOption$3(map.element.id + "_Zooming_Rect", "transparent", {
                color: "transparent",
                width: 1
            }, .1, new Rect$3(0, 0, toolWidth, toolHeight), 0, 0));
            outerElement.setAttribute("filter", "url(#chart_shadow)"), this.toolBarGroup.appendChild(outerElement);
            for (var i = 0; i < toolbarsCollection.length; i++) {
                var toolbar_1 = toolbarsCollection[i];
                this.currentToolbarEle = map.renderer.createGroup({
                    id: map.element.id + "_Zooming_ToolBar_" + toolbar_1 + "_Group",
                    transform: "translate( " + xSpacing + " " + ySpacing + " ) "
                }), this.currentToolbarEle.setAttribute("class", "e-maps-toolbar");
                var direction = "";
                switch (toolbar_1.toLowerCase()) {
                  case "zoom":
                    direction = "M0.001,14.629L1.372,16l4.571-4.571v-0.685l0.228-0.274c1.051,0.868,2.423,1.417,3.885,1.417c3.291,0,", 
                    direction += "5.943-2.651,5.943-5.943S13.395,0,10.103,0S4.16,2.651,4.16,5.943c0,1.508,0.503,2.834,1.417,3.885l-0.274,0.228H4.571", 
                    direction += "L0.001,14.629L0.001,14.629z M5.943,5.943c0-2.285,1.828-4.114,4.114-4.114s4.114,1.828,4.114,", 
                    this.currentToolbarEle.appendChild(map.renderer.drawPath(new PathOption$3(map.element.id + "_Zooming_ToolBar_" + toolbar_1, this.fillColor, 1, this.fillColor, 1, null, direction + "4.114s-1.828,4.114-4.114,4.114S5.943,8.229,5.943,5.943z"))), 
                    this.zoomElements = this.currentToolbarEle, this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
                    break;

                  case "zoomin":
                    direction = "M 8, 0 L 8, 16 M 0, 8 L 16, 8", this.currentToolbarEle.appendChild(map.renderer.drawPath(new PathOption$3(map.element.id + "_Zooming_ToolBar_" + toolbar_1 + "_Path", this.fillColor, 3, this.fillColor, 1, null, direction))), 
                    this.zoomInElements = this.currentToolbarEle, this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
                    break;

                  case "zoomout":
                    direction = "M 0, 8 L 16, 8", this.currentToolbarEle.appendChild(map.renderer.drawPath(new PathOption$3(map.element.id + "_Zooming_ToolBar_" + toolbar_1, this.fillColor, 3, this.fillColor, 1, null, direction))), 
                    this.zoomOutElements = this.currentToolbarEle, this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
                    break;

                  case "pan":
                    direction = "M5,3h2.3L7.275,5.875h1.4L8.65,3H11L8,0L5,3z M3,11V8.7l2.875,0.025v-1.4L3,7.35V5L0,8L3,", 
                    direction += "11z M11,13H8.7l0.025-2.875h-1.4L7.35,13H5l3,3L11,13z M13,5v2.3l-2.875-0.025v1.4L13,8.65V11l3-3L13,5z", 
                    this.currentToolbarEle.appendChild(map.renderer.drawPath(new PathOption$3(map.element.id + "_Zooming_ToolBar_" + toolbar_1, this.selectionColor, 1, this.selectionColor, 1, null, direction))), 
                    this.panColor = this.selectionColor, this.panElements = this.currentToolbarEle, 
                    this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
                    break;

                  case "reset":
                    direction = "M12.364,8h-2.182l2.909,3.25L16,8h-2.182c0-3.575-2.618-6.5-5.818-6.5c-1.128,0-2.218,0.366-3.091,", 
                    direction += "1.016l1.055,1.178C6.581,3.328,7.272,3.125,8,3.125C10.4,3.125,12.363,5.319,12.364,8L12.364,8z M11.091,", 
                    direction += "13.484l-1.055-1.178C9.419,12.672,8.728,12.875,8,12.875c-2.4,0-4.364-2.194-4.364-4.875h2.182L2.909,4.75L0,8h2.182c0,", 
                    this.currentToolbarEle.appendChild(map.renderer.drawPath(new PathOption$3(map.element.id + "_Zooming_ToolBar_" + toolbar_1, this.fillColor, null, null, 1, null, direction + "3.575,2.618,6.5,5.818,6.5C9.128,14.5,10.219,14.134,11.091,13.484L11.091,13.484z"))), 
                    this.wireEvents(this.currentToolbarEle, this.performToolBarAction);
                }
                this.currentToolbarEle.appendChild(map.renderer.drawCircle(new CircleOption$1(map.element.id + "_Zooming_ToolBar_" + toolbar_1 + "_Rect", "transparent", {
                    color: this.fillColor,
                    width: 1
                }, 1, 8, 8, 16, ""))), xSpacing = "Horizontal" === orientation ? xSpacing + 36 : xSpacing, 
                ySpacing = "Horizontal" === orientation ? ySpacing : ySpacing + 36, this.toolBarGroup.appendChild(this.currentToolbarEle);
            }
        }, Zoom.prototype.performToolBarAction = function(e) {
            var target = e.target;
            e.stopImmediatePropagation();
            var isTouch = "touch" === e.pointerType || "2" === e.pointerType || e.type.indexOf("touch") > -1, toolbar = target.id.split("_")[3];
            isTouch ? (this.handled = !0, this.performZoomingByToolBar(toolbar)) : "mousedown" !== e.type && "pointerdown" !== e.type || this.handled ? this.handled = !1 : (this.handled = !1, 
            this.performZoomingByToolBar(toolbar));
        }, Zoom.prototype.performZoomingByToolBar = function(type) {
            var map = this.maps;
            switch (type.toLowerCase()) {
              case "zoom":
                this.panColor = this.fillColor, this.zoomColor = this.selectionColor, this.applySelection(this.zoomElements, this.selectionColor), 
                this.applySelection(this.panElements, this.fillColor);
                break;

              case "pan":
                this.panColor = this.selectionColor, this.zoomColor = this.fillColor, this.applySelection(this.zoomElements, this.fillColor), 
                this.applySelection(this.panElements, this.selectionColor);
                break;

              case "zoomin":
                this.toolBarZooming((map.isTileMap ? map.tileZoomLevel : map.scale) + 1, "ZoomIn");
                break;

              case "zoomout":
                this.toolBarZooming((map.isTileMap ? map.tileZoomLevel : map.scale) - 1, "ZoomOut");
                break;

              case "reset":
                this.toolBarZooming(1, "ZoomOut"), this.applySelection(this.zoomElements, this.fillColor), 
                this.applySelection(this.panElements, this.selectionColor);
            }
            this.panningStyle(type.toLowerCase());
        }, Zoom.prototype.panningStyle = function(toolbar) {
            var svg = getElementByID(this.maps.element.id + "_svg");
            "pan" === toolbar || this.isPanning ? svg.setAttribute("class", "e-maps-panning") : svg.setAttribute("class", "");
        }, Zoom.prototype.applySelection = function(elements, color) {
            if (elements) for (var childElement, i = 0; i < elements.childElementCount; i++) "circle" !== (childElement = elements.childNodes[i]).tagName && (childElement.setAttribute("fill", color), 
            childElement.setAttribute("stroke", color));
        }, Zoom.prototype.showTooltip = function(e) {
            var text = e.target.id.split("_")[3];
            this.isTouch || function(id, text, top, left, fontSize) {
                var tooltip = getElement$3(id), style = "top:" + top.toString() + "px;left:" + left.toString() + "px;background:#FFFFFF;position:absolute;border:1px solid #707070;font-size:" + fontSize + ";border-radius:2px;";
                tooltip ? (tooltip.setAttribute("innerHTML", "&nbsp;" + text + "&nbsp;"), tooltip.setAttribute("styles", style)) : (tooltip = createElement("div", {
                    id: id,
                    innerHTML: "&nbsp;" + text + "&nbsp;",
                    styles: style
                }), document.body.appendChild(tooltip));
            }("EJ2_Map_Toolbar_Tip", this.maps.getLocalizedLabel(text), e.pageY + 10, e.pageX + 10, "10px");
        }, Zoom.prototype.removeTooltip = function() {
            getElementByID("EJ2_Map_Toolbar_Tip") && remove(getElementByID("EJ2_Map_Toolbar_Tip"));
        }, Zoom.prototype.alignToolBar = function() {
            var map = this.maps, element = createElement("div", {
                id: map.element.id + "_ToolBar",
                styles: "position:absolute;z-index:2"
            }), rectSVGObject = map.renderer.createSvg({
                id: map.element.id + "_Zooming_ToolBar",
                width: 10,
                height: 10
            });
            rectSVGObject.appendChild(this.toolBarGroup), element.appendChild(rectSVGObject), 
            getElementByID(map.element.id + "_Secondary_Element") && getElementByID(map.element.id + "_Secondary_Element").appendChild(element);
            var toolBarSize = this.toolBarGroup.getBoundingClientRect();
            rectSVGObject.setAttribute("height", (toolBarSize.height + 5).toString()), rectSVGObject.setAttribute("width", (toolBarSize.width + 5).toString());
            var size = map.mapAreaRect, x = 0, y = 0;
            switch (map.zoomSettings.verticalAlignment) {
              case "Near":
                y = size.y;
                break;

              case "Center":
                y = size.height / 2 - toolBarSize.height / 2;
                break;

              case "Far":
                y = size.height - toolBarSize.height - 10;
            }
            switch (map.zoomSettings.horizontalAlignment) {
              case "Near":
                x = size.x;
                break;

              case "Center":
                x = size.width / 2 - toolBarSize.width / 2;
                break;

              case "Far":
                x = size.width - toolBarSize.width - 10;
            }
            element.style.left = x + "px", element.style.top = y + "px";
            var color = this.maps.zoomSettings.highlightColor, css = " .e-maps-toolbar:hover > circle { stroke:" + color + "; } .e-maps-toolbar:hover > path { fill: " + color + " ;  stroke: " + color + "; }", style = document.createElement("style");
            style.appendChild(document.createTextNode(css)), element.appendChild(style);
        }, Zoom.prototype.wireEvents = function(element, process) {
            EventHandler.add(element, Browser.touchStartEvent, process, this), EventHandler.add(element, "mouseover", this.showTooltip, this), 
            EventHandler.add(element, "mouseout", this.removeTooltip, this);
        }, Zoom.prototype.mapMouseWheel = function(e) {
            if (this.maps.zoomSettings.enable && this.maps.zoomSettings.mouseWheelZoom) {
                var position = this.getMousePosition(e.pageX, e.pageY), map = this.maps, prevLevel = (map.availableSize, 
                map.tileZoomLevel), prevScale = map.scale, value = map.isTileMap ? prevLevel : prevScale;
                if (position.x > map.mapAreaRect.x && position.x < map.mapAreaRect.x + map.mapAreaRect.width && position.y > map.mapAreaRect.y && position.y < map.mapAreaRect.y + map.mapAreaRect.height) {
                    e.preventDefault();
                    var direction = "mozilla" !== this.browserName || this.isPointer ? e.wheelDelta / 120 > 0 ? "ZoomIn" : "ZoomOut" : -e.detail / 3 > 0 ? "ZoomIn" : "ZoomOut";
                    "ZoomIn" === direction ? this.performZooming(position, value + 1, direction) : this.performZooming(position, value - 1, direction);
                }
            }
        }, Zoom.prototype.doubleClick = function(e) {
            var pageX = e.pageX, pageY = e.pageY;
            e.target;
            if (this.maps.zoomSettings.enable && this.maps.zoomSettings.doubleClickZoom) {
                var position = this.getMousePosition(pageX, pageY), map = this.maps, prevLevel = (map.availableSize, 
                map.tileZoomLevel), prevScale = map.scale, value = map.isTileMap ? prevLevel : prevScale;
                position.x > map.mapAreaRect.x && position.x < map.mapAreaRect.x + map.mapAreaRect.width && position.y > map.mapAreaRect.y && position.y < map.mapAreaRect.y + map.mapAreaRect.height && this.performZooming(position, value + 1, "ZoomIn");
            }
        }, Zoom.prototype.mouseDownHandler = function(e) {
            var pageX, pageY, touches = null;
            e.target;
            "touchstart" === e.type ? (this.isTouch = !0, touches = e.touches, e.target, pageX = touches[0].clientX, 
            pageY = touches[0].clientY) : (pageX = e.pageX, pageY = e.pageY, e.target), this.isPanning = this.panColor === this.selectionColor || this.zoomColor !== this.selectionColor, 
            this.rectZoomingStart = !this.isPanning && this.maps.zoomSettings.enable, this.mouseDownPoints = this.getMousePosition(pageX, pageY), 
            this.isTouch && (this.firstMove = !0, this.pinchFactor = this.maps.scale, this.fingers = touches.length);
        }, Zoom.prototype.mouseMoveHandler = function(e) {
            var pageX, pageY, target, map = this.maps, touches = null, zoom = this.maps.zoomSettings;
            "touchmove" === e.type ? (this.isTouch = !0, target = e.target, pageX = (touches = e.touches)[0].clientX, 
            pageY = touches[0].clientY) : (pageX = e.pageX, pageY = e.pageY, target = e.target), 
            getElementByID(map.element.id + "_Zooming_KitCollection") && (target.id.indexOf("_Zooming_") > -1 ? getElementByID(map.element.id + "_Zooming_KitCollection").setAttribute("opacity", "1") : getElementByID(map.element.id + "_Zooming_KitCollection").setAttribute("opacity", "0.3")), 
            this.isTouch && this.maps.zoomSettings.pinchZooming && (this.firstMove && 2 === touches.length ? (this.rectZoomingStart = !1, 
            this.updateInteraction(), this.touchStartList = targetTouches(e)) : 2 === this.touchStartList.length && 2 === touches.length && (this.touchMoveList = targetTouches(e), 
            e.preventDefault(), this.rectZoomingStart = !1, this.performPinchZooming(e)), this.firstMove = !1), 
            this.mouseMovePoints = this.getMousePosition(pageX, pageY);
            e.target.id, e.target;
            zoom.enable && this.isPanning && (e.preventDefault(), this.maps.element.style.cursor = "pointer", 
            this.panning()), (this.isTouch ? 1 === touches.length && this.rectZoomingStart : this.rectZoomingStart) && (e.preventDefault(), 
            this.drawZoomRectangle());
        }, Zoom.prototype.mouseUpHandler = function(e) {
            this.maps;
            this.rectZoomingStart = !1, this.isPanning = !1, this.isTouch = !1, this.touchStartList = [], 
            this.touchMoveList = [], this.lastScale = 1, this.maps.element.style.cursor = "auto";
            var zoomRectElement = getElementByID(this.maps.element.id + "_Selection_Rect_Zooming");
            zoomRectElement && this.maps.zoomSettings.enable && (remove(zoomRectElement), this.performRectZooming());
        }, Zoom.prototype.mouseCancelHandler = function(e) {
            this.isPanning = !1, this.isTouch = !1, this.rectZoomingStart = !1;
            var zoomRectElement = getElementByID(this.maps.element.id + "_Selection_Rect_Zooming");
            zoomRectElement && this.maps.zoomSettings.enable && (remove(zoomRectElement), this.performRectZooming());
        }, Zoom.prototype.click = function(e) {
            var map = this.maps;
            if (map.zoomSettings.zoomOnClick && e.target.id.indexOf("_ShapeIndex_") > -1 && !map.zoomSettings.doubleClickZoom && this.zoomColor === this.selectionColor && this.zoomElements) {
                var bounds = e.target.getBBox(), boundwidth = bounds.width, boundHeight = bounds.height, layerScale = void 0, availWidth = map.availableSize.width, availHeight = map.availableSize.height;
                layerScale = (availWidth - 100) / (availHeight - 100) > boundwidth / boundHeight ? (availHeight - 100) / boundHeight : (availWidth - 100) / boundwidth;
                var leftPos = (availWidth / 2 - boundwidth * map.scale / 2) / layerScale, topPos = (availHeight / 2 - boundHeight * map.scale / 2) / layerScale, translatePointX = -bounds.x + leftPos, translatePointY = -bounds.y + topPos;
                map.previousScale = map.scale, map.previousPoint = map.translatePoint, map.scale = layerScale, 
                map.translatePoint = {
                    x: translatePointX,
                    y: translatePointY
                }, this.applyTransform(!0);
            }
        }, Zoom.prototype.getMousePosition = function(pageX, pageY) {
            var map = this.maps, elementRect = map.element.getBoundingClientRect(), pageXOffset = map.element.ownerDocument.defaultView.pageXOffset, pageYOffset = map.element.ownerDocument.defaultView.pageYOffset, clientTop = map.element.ownerDocument.documentElement.clientTop, clientLeft = map.element.ownerDocument.documentElement.clientLeft, positionX = elementRect.left + pageXOffset - clientLeft, positionY = elementRect.top + pageYOffset - clientTop;
            return new Point(pageX - positionX, pageY - positionY);
        }, Zoom.prototype.addEventListener = function() {
            this.maps.isDestroyed || (EventHandler.add(this.maps.element, this.wheelEvent, this.mapMouseWheel, this), 
            EventHandler.add(this.maps.element, "click", this.click, this), EventHandler.add(this.maps.element, "dblclick", this.doubleClick, this), 
            this.maps.on(Browser.touchMoveEvent, this.mouseMoveHandler, this), this.maps.on(Browser.touchStartEvent, this.mouseDownHandler, this), 
            this.maps.on(Browser.touchEndEvent, this.mouseUpHandler, this), EventHandler.add(this.maps.element, this.cancelEvent, this.mouseCancelHandler, this));
        }, Zoom.prototype.removeEventListener = function() {
            this.maps.isDestroyed || (EventHandler.remove(this.maps.element, this.wheelEvent, this.mapMouseWheel), 
            EventHandler.remove(this.maps.element, "click", this.click), EventHandler.remove(this.maps.element, "dblclick", this.doubleClick), 
            this.maps.off(Browser.touchMoveEvent, this.mouseMoveHandler), this.maps.off(Browser.touchStartEvent, this.mouseDownHandler), 
            this.maps.off(Browser.touchEndEvent, this.mouseUpHandler), this.maps.off(this.cancelEvent, this.mouseCancelHandler));
        }, Zoom.prototype.getModuleName = function() {
            return "Zoom";
        }, Zoom.prototype.destroy = function(maps) {
            this.removeEventListener();
        }, Zoom;
    }(), __extends$145 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$58 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, FOCUS$5 = "e-input-focus", HIDE_LIST$1 = "e-hide-listitem", CHIP$1 = "e-chips", MultiSelect$1 = function(_super) {
        function MultiSelect(option, element) {
            var _this = _super.call(this, option, element) || this;
            return _this.isValidKey = !1, _this.scrollFocusStatus = !1, _this.keyDownStatus = !1, 
            _this;
        }
        return __extends$145(MultiSelect, _super), MultiSelect.prototype.enableRTL = function(state) {
            state ? this.overAllWrapper.classList.add("e-rtl") : this.overAllWrapper.classList.remove("e-rtl"), 
            this.popupObj && (this.popupObj.enableRtl = state, this.popupObj.dataBind());
        }, MultiSelect.prototype.requiredModules = function() {
            var modules = [];
            return "CheckBox" === this.mode && (this.allowCustomValue = !1, this.hideSelectedItem = !1, 
            this.closePopupOnSelect = !1, this.allowFiltering = !0, modules.push({
                member: "CheckBoxSelection",
                args: [ this ]
            })), modules;
        }, MultiSelect.prototype.updateHTMLAttribute = function() {
            if (Object.keys(this.htmlAttributes).length) for (var _i = 0, _a = Object.keys(this.htmlAttributes); _i < _a.length; _i++) {
                var htmlAttr = _a[_i];
                switch (htmlAttr) {
                  case "class":
                    this.overAllWrapper.classList.add(this.htmlAttributes[htmlAttr]), this.popupWrapper.classList.add(this.htmlAttributes[htmlAttr]);
                    break;

                  case "disabled":
                    this.enable(!1);
                    break;

                  case "placeholder":
                    this.inputElement.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
                    break;

                  default:
                    [ "id" ].indexOf(htmlAttr) > -1 ? this.element.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]) : [ "name", "required", "aria-required", "form" ].indexOf(htmlAttr) > -1 ? this.hiddenElement.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]) : [ "title", "role", "style", "class" ].indexOf(htmlAttr) > -1 ? this.overAllWrapper.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]) : this.inputElement.setAttribute(htmlAttr, this.htmlAttributes[htmlAttr]);
                }
            }
        }, MultiSelect.prototype.updateReadonly = function(state) {
            state || "CheckBox" === this.mode ? this.inputElement.setAttribute("readonly", "true") : this.inputElement.removeAttribute("readonly");
        }, MultiSelect.prototype.updateClearButton = function(state) {
            state ? (this.overAllClear.parentNode ? this.overAllClear.style.display = "" : this.componentWrapper.appendChild(this.overAllClear), 
            this.componentWrapper.classList.remove("e-close-icon-hide")) : (this.overAllClear.style.display = "none", 
            this.componentWrapper.classList.add("e-close-icon-hide"));
        }, MultiSelect.prototype.updateCssClass = function() {
            this.cssClass && (this.popupWrapper.classList.add(this.cssClass), this.overAllWrapper.classList.add(this.cssClass));
        }, MultiSelect.prototype.onPopupShown = function() {
            if (Browser.isDevice && "CheckBox" === this.mode && this.allowFiltering) {
                var proxy_1 = this;
                window.onpopstate = function() {
                    proxy_1.hidePopup();
                }, history.pushState({}, "");
            }
            var eventArgs = {
                popup: this.popupObj,
                cancel: !1
            };
            if (this.trigger("open", eventArgs), !eventArgs.cancel) {
                if (this.focusAtFirstListItem(), document.body.appendChild(this.popupObj.element), 
                this.refreshPopup(), "CheckBox" === this.mode && addClass([ this.overAllWrapper ], [ "e-icon-anim" ]), 
                this.popupObj.show({
                    name: "FadeIn",
                    duration: 100
                }), attributes(this.inputElement, {
                    "aria-expanded": "true"
                }), !this.isFirstClick) {
                    var ulElement = this.list.querySelector("ul");
                    ulElement && (this.mainList = ulElement.cloneNode ? ulElement.cloneNode(!0) : ulElement), 
                    this.isFirstClick = !0;
                }
                this.refreshListItems(null), this.notify("reOrder", {
                    module: "CheckBoxSelection",
                    enable: "CheckBox" === this.mode,
                    e: this
                });
            }
        }, MultiSelect.prototype.focusAtFirstListItem = function() {
            if (this.ulElement && this.ulElement.querySelector("li." + dropDownBaseClasses.li)) {
                var element = void 0;
                null !== (element = "CheckBox" === this.mode ? this.list.querySelector("li." + dropDownBaseClasses.li + ":not(." + HIDE_LIST$1 + ")") : this.ulElement.querySelector("li." + dropDownBaseClasses.li + ":not(." + HIDE_LIST$1 + ")")) && (this.removeFocus(), 
                this.addListFocus(element));
            }
        }, MultiSelect.prototype.focusAtLastListItem = function(data) {
            var activeElement;
            data ? activeElement = Search(data, this.liCollections, "StartsWith", this.ignoreCase) : this.value && this.value.length ? Search(this.value[this.value.length - 1], this.liCollections, "StartsWith", this.ignoreCase) : activeElement = null, 
            activeElement && null !== activeElement.item && (this.addListFocus(activeElement.item), 
            this.scrollBottom(activeElement.item, activeElement.index));
        }, MultiSelect.prototype.getAriaAttributes = function() {
            return {
                "aria-disabled": "false",
                "aria-owns": this.element.id + "_options",
                role: "listbox",
                "aria-multiselectable": "true",
                "aria-activedescendant": "null",
                "aria-haspopup": "true",
                "aria-expanded": "false"
            };
        }, MultiSelect.prototype.updateListARIA = function() {
            attributes(this.ulElement, {
                id: this.element.id + "_options",
                role: "listbox",
                "aria-hidden": "false"
            }), attributes(this.inputElement, this.getAriaAttributes());
            var li, temp = (li = this.list.querySelectorAll("li." + dropDownBaseClasses.li)).length;
            if (li && li.length) for (;temp > 0; ) "true" !== li[temp - 1].getAttribute("aria-selected") && li[temp - 1].setAttribute("aria-selected", "false"), 
            temp--;
        }, MultiSelect.prototype.removelastSelection = function(e) {
            var elements, value = (elements = this.chipCollectionWrapper.querySelectorAll("span.e-chips"))[elements.length - 1].getAttribute("data-value");
            if (isNullOrUndefined(this.value) || (this.tempValues = this.value.slice()), this.removeValue(value, e), 
            this.removeChipSelection(), this.updateDelimeter(this.delimiterChar), this.makeTextBoxEmpty(), 
            this.allowFiltering && this.mainList && this.listData) {
                var list = this.mainList.cloneNode ? this.mainList.cloneNode(!0) : this.mainList;
                this.onActionComplete(list, this.mainData), this.refreshSelection();
            }
        }, MultiSelect.prototype.onActionFailure = function(e) {
            _super.prototype.onActionFailure.call(this, e), this.renderPopup(), this.onPopupShown();
        }, MultiSelect.prototype.targetElement = function() {
            return this.targetInputElement = this.inputElement, "CheckBox" === this.mode && this.notify("targetElement", {
                module: "CheckBoxSelection",
                enable: "CheckBox" === this.mode
            }), this.targetInputElement.value;
        }, MultiSelect.prototype.onActionComplete = function(ulElement, list, e, isUpdated) {
            _super.prototype.onActionComplete.call(this, ulElement, list, e), "CheckBox" === this.mode && this.showSelectAll && this.notify("selectAll", {
                module: "CheckBoxSelection",
                enable: "CheckBox" === this.mode
            }), this.mainList || this.mainData ? isNullOrUndefined(this.mainData) || 0 !== this.mainData.length || (this.mainData = list) : (this.mainList = ulElement.cloneNode ? ulElement.cloneNode(!0) : ulElement, 
            this.mainData = list, this.mainListCollection = this.liCollections), this.remoteCustomValue && this.allowCustomValue && this.inputFocus && !this.allowFiltering ? this.checkForCustomValue(this.tempQuery, this.fields) : (this.value && this.value.length && this.refreshSelection(), 
            this.updateListARIA(), this.unwireListEvents(), this.wireListEvents(), isNullOrUndefined(this.setInitialValue) || this.setInitialValue(), 
            isNullOrUndefined(this.selectAllAction) || this.selectAllAction(), this.setDynValue && (this.initialValueUpdate(), 
            this.initialUpdate(), this.refreshPlaceHolder(), this.updateValueState(null, this.value, null)), 
            this.renderPopup(), this.refreshPopup(), this.beforePopupOpen && (this.beforePopupOpen = !1, 
            this.onPopupShown()));
        }, MultiSelect.prototype.refreshSelection = function() {
            var value, element, className = this.hideSelectedItem ? HIDE_LIST$1 : dropDownBaseClasses.selected;
            if (!isNullOrUndefined(this.value)) for (var index = 0; this.value[index]; index++) if (value = this.value[index], 
            element = this.ulElement.querySelector('li[data-value="' + value + '"]')) {
                if (addClass([ element ], className), this.hideSelectedItem && element.previousSibling && element.previousElementSibling.classList.contains(dropDownBaseClasses.group) && (!element.nextElementSibling || element.nextElementSibling.classList.contains(dropDownBaseClasses.group)) && addClass([ element.previousElementSibling ], className), 
                this.hideSelectedItem && this.fields.groupBy && !element.previousElementSibling.classList.contains(HIDE_LIST$1) && this.hideGroupItem(value), 
                this.hideSelectedItem && element.classList.contains(dropDownBaseClasses.focus)) {
                    removeClass([ element ], dropDownBaseClasses.focus);
                    var listEle = element.parentElement.querySelectorAll("." + dropDownBaseClasses.li + ":not(." + HIDE_LIST$1 + ")");
                    listEle.length > 0 ? addClass([ listEle[0] ], dropDownBaseClasses.focus) : (this.l10nUpdate(), 
                    addClass([ this.list ], dropDownBaseClasses.noData));
                }
                if (element.setAttribute("aria-selected", "true"), "CheckBox" === this.mode && element.classList.contains("e-active")) {
                    var ariaValue = element.firstElementChild.getAttribute("aria-checked");
                    if (isNullOrUndefined(ariaValue) || "false" === ariaValue) {
                        var args = {
                            module: "CheckBoxSelection",
                            enable: "CheckBox" === this.mode,
                            li: element,
                            e: null
                        };
                        this.notify("updatelist", args);
                    }
                }
            }
            this.checkSelectAll(), this.checkMaxSelection();
        }, MultiSelect.prototype.hideGroupItem = function(value) {
            var element, element1, className = this.hideSelectedItem ? HIDE_LIST$1 : dropDownBaseClasses.selected;
            element1 = element = this.ulElement.querySelector('li[data-value="' + value + '"]');
            var i = 0, j = 0, temp = !0, temp1 = !0;
            do {
                element && element.previousElementSibling && !element.previousElementSibling.classList.contains(HIDE_LIST$1) && element.previousElementSibling.classList.contains(dropDownBaseClasses.li) && (temp = !1), 
                !temp || !element || element.previousElementSibling && element.previousElementSibling.classList.contains(dropDownBaseClasses.group) ? i = 10 : element = element.previousElementSibling, 
                element1 && element1.nextElementSibling && !element1.nextElementSibling.classList.contains(HIDE_LIST$1) && element1.nextElementSibling.classList.contains(dropDownBaseClasses.li) && (temp1 = !1), 
                !temp1 || !element1 || element1.nextElementSibling && element1.nextElementSibling.classList.contains(dropDownBaseClasses.group) ? j = 10 : element1 = element1.nextElementSibling;
            } while (i < 10 || j < 10);
            temp && temp1 && !element.previousElementSibling.classList.contains(HIDE_LIST$1) ? addClass([ element.previousElementSibling ], className) : temp && temp1 && element.previousElementSibling.classList.contains(HIDE_LIST$1) && removeClass([ element.previousElementSibling ], className);
        }, MultiSelect.prototype.checkSelectAll = function() {
            var searchCount = this.list.querySelectorAll("li." + dropDownBaseClasses.li).length, searchActiveCount = this.list.querySelectorAll("li." + dropDownBaseClasses.selected).length;
            searchCount === searchActiveCount && "CheckBox" === this.mode && this.showSelectAll && this.notify("checkSelectAll", {
                module: "CheckBoxSelection",
                enable: "CheckBox" === this.mode,
                value: "check"
            }), searchCount !== searchActiveCount && "CheckBox" === this.mode && this.showSelectAll && this.notify("checkSelectAll", {
                module: "CheckBoxSelection",
                enable: "CheckBox" === this.mode,
                value: "uncheck"
            });
        }, MultiSelect.prototype.openClick = function(e) {
            this.openOnClick || "CheckBox" === this.mode ? this.openOnClick || "CheckBox" !== this.mode || this.isPopupOpen() || this.showPopup() : "" !== this.targetElement() ? this.showPopup() : this.hidePopup();
        }, MultiSelect.prototype.KeyUp = function(e) {
            var _this = this;
            if ("CheckBox" === this.mode && !this.openOnClick) {
                isNullOrUndefined(String.fromCharCode(e.keyCode).match(/\w/)) || (this.isValidKey = !0);
            }
            if (this.isValidKey = this.isPopupOpen() && 8 === e.keyCode || this.isValidKey, 
            this.isValidKey) switch (this.isValidKey = !1, this.expandTextbox(), this.showOverAllClear(), 
            e.keyCode) {
              default:
                if (!this.isPopupOpen() && this.openOnClick && this.showPopup(), this.openClick(e), 
                this.liCollections) if (this.checkTextLength() && !this.allowFiltering && 8 !== e.keyCode) this.focusAtFirstListItem(); else {
                    var text = this.targetElement();
                    if (this.keyCode = e.keyCode, this.allowFiltering) {
                        var eventArgs_1 = {
                            preventDefaultAction: !1,
                            text: this.targetElement(),
                            updateData: function(dataSource, query, fields) {
                                eventArgs_1.cancel || (_this.isFiltered = !0, _this.dataUpdater(dataSource, query, fields));
                            },
                            event: e,
                            cancel: !1
                        };
                        if (this.trigger("filtering", eventArgs_1), eventArgs_1.cancel) return;
                        this.isFiltered || eventArgs_1.preventDefaultAction || (this.filterAction = !0, 
                        this.dataUpdater(this.dataSource, null, this.fields));
                    } else {
                        if (this.allowCustomValue) {
                            var query = new Query();
                            query = "" !== text ? query.where(this.fields.text, "startswith", text, this.ignoreCase, this.ignoreAccent) : query, 
                            this.dataUpdater(this.mainData, query, this.fields);
                            break;
                        }
                        var liCollections = void 0;
                        liCollections = this.list.querySelectorAll("li." + dropDownBaseClasses.li + ":not(.e-hide-listitem)");
                        var activeElement = Search(this.targetElement(), liCollections, "StartsWith", this.ignoreCase);
                        activeElement && null !== activeElement.item ? (this.addListFocus(activeElement.item), 
                        this.list.scrollTop = activeElement.item.getBoundingClientRect().height * activeElement.index) : "" !== this.targetElement() ? this.removeFocus() : this.focusAtFirstListItem();
                    }
                }
            }
        }, MultiSelect.prototype.getQuery = function(query) {
            var filterQuery = query ? query.clone() : this.query ? this.query.clone() : new Query();
            if (this.filterAction) {
                if (null !== this.targetElement()) {
                    var dataType = this.typeOfData(this.dataSource).typeof;
                    if ((this.dataSource instanceof DataManager || "string" !== dataType) && "number" !== dataType) {
                        var fields = this.fields;
                        filterQuery.where(isNullOrUndefined(fields.text) ? "" : fields.text, "startswith", this.targetElement(), this.ignoreCase, this.ignoreAccent);
                    } else filterQuery.where("", "startswith", this.targetElement(), this.ignoreCase, this.ignoreAccent);
                }
                return filterQuery;
            }
            return query || (this.query ? this.query : new Query());
        }, MultiSelect.prototype.dataUpdater = function(dataSource, query, fields) {
            if ("" === this.targetElement().trim()) {
                var list = this.mainList.cloneNode ? this.mainList.cloneNode(!0) : this.mainList;
                this.backCommand && (this.onActionComplete(list, this.mainData), this.value && this.value.length && this.refreshSelection(), 
                8 !== this.keyCode && this.focusAtFirstListItem(), this.notify("reOrder", {
                    module: "CheckBoxSelection",
                    enable: "CheckBox" === this.mode,
                    e: this
                }));
            } else this.resetList(dataSource, fields, query), this.allowCustomValue && (dataSource instanceof DataManager ? (this.remoteCustomValue = !0, 
            this.tempQuery = query) : this.checkForCustomValue(query, fields));
            this.refreshPopup();
        }, MultiSelect.prototype.checkForCustomValue = function(query, fields) {
            var dataChecks = !this.getValueByText(this.inputElement.value, this.ignoreCase);
            if (this.allowCustomValue && dataChecks) {
                var value = this.inputElement.value;
                if ("string" != typeof (!isNullOrUndefined(this.mainData) && this.mainData.length > 0 ? this.mainData[0] : this.mainData)) {
                    var dataItem = {};
                    setValue(fields.text, value, dataItem), setValue(fields.value, value, dataItem);
                    (tempData = JSON.parse(JSON.stringify(this.listData))).splice(0, 0, dataItem), this.resetList(tempData, fields || this.fields, query);
                } else {
                    var tempData = [ this.inputElement.value ];
                    this.resetList(tempData, fields || this.fields);
                }
            }
            this.value && this.value.length && this.refreshSelection();
        }, MultiSelect.prototype.getNgDirective = function() {
            return "EJS-MULTISELECT";
        }, MultiSelect.prototype.wrapperClick = function(e) {
            !this.readonly && this.enabled && (e.target !== this.overAllClear ? (this.inputFocus || "CheckBox" === this.mode || this.inputElement.focus(), 
            "CheckBox" === this.mode && this.focusIn(), e.target && -1 !== e.target.classList.toString().indexOf("e-chips-close") ? this.isPopupOpen() && this.refreshPopup() : (!this.isPopupOpen() && this.openOnClick ? this.showPopup() : (this.hidePopup(), 
            "CheckBox" === this.mode && this.focusIn()), e.preventDefault())) : e.preventDefault());
        }, MultiSelect.prototype.enable = function(state) {
            state ? (this.overAllWrapper.classList.remove("e-disabled"), this.inputElement.removeAttribute("disabled"), 
            attributes(this.inputElement, {
                "aria-disabled": "false"
            })) : (this.overAllWrapper.classList.add("e-disabled"), this.inputElement.setAttribute("disabled", "true"), 
            attributes(this.inputElement, {
                "aria-disabled": "true"
            })), this.enabled !== state && (this.enabled = state), this.hidePopup();
        }, MultiSelect.prototype.onBlur = function(eve) {
            var target = !isNullOrUndefined(eve) && eve.relatedTarget;
            if (document.body.contains(this.popupObj.element) && this.popupObj.element.contains(target)) "CheckBox" !== this.mode && this.inputElement.focus(); else {
                if (this.scrollFocusStatus) return eve.preventDefault(), this.inputElement.focus(), 
                void (this.scrollFocusStatus = !1);
                this.inputFocus = !1, this.overAllWrapper.classList.remove(FOCUS$5), "Box" !== this.mode && "CheckBox" !== this.mode && (this.refreshListItems(null), 
                this.updateDelimView()), this.updateValueState(eve, this.value, this.tempValues), 
                this.dispatchEvent(this.hiddenElement, "change"), this.overAllClear.style.display = "none", 
                this.isPopupOpen() && this.hidePopup(), this.makeTextBoxEmpty(), this.trigger("blur"), 
                this.focused = !0, Browser.isDevice && "Delimiter" !== this.mode && "CheckBox" !== this.mode && this.removeChipFocus(), 
                this.removeChipSelection(), this.refreshInputHight(), this.refreshPlaceHolder();
            }
        }, MultiSelect.prototype.refreshInputHight = function() {
            this.value && this.value.length ? this.searchWrapper.classList.add("e-zero-size") : this.searchWrapper.classList.remove("e-zero-size");
        }, MultiSelect.prototype.validateValues = function(newValue, oldValue) {
            return JSON.stringify(newValue.slice().sort()) !== JSON.stringify(oldValue.slice().sort());
        }, MultiSelect.prototype.updateValueState = function(event, newVal, oldVal) {
            var newValue = newVal || [], oldValue = oldVal || [];
            if (this.initStatus && this.validateValues(newValue, oldValue)) {
                var eventArgs = {
                    e: event,
                    oldValue: oldVal,
                    value: newVal,
                    isInteracted: !!event
                };
                this.trigger("change", eventArgs);
            }
        }, MultiSelect.prototype.getPagingCount = function() {
            var height = this.list.classList.contains(dropDownBaseClasses.noData) ? null : getComputedStyle(this.getItems()[0], null).getPropertyValue("height");
            return Math.round(this.list.getBoundingClientRect().height / parseInt(height, 10));
        }, MultiSelect.prototype.pageUpSelection = function(steps) {
            var previousItem, collection = this.list.querySelectorAll("li." + dropDownBaseClasses.li + ":not(." + HIDE_LIST$1 + "):not(.e-reorder-hide)");
            previousItem = steps >= 0 ? collection[steps + 1] : collection[0], this.addListFocus(previousItem), 
            this.scrollBottom(previousItem, this.getIndexByValue(previousItem.getAttribute("data-value")));
        }, MultiSelect.prototype.pageDownSelection = function(steps) {
            this.getItems();
            var previousItem, collection = this.list.querySelectorAll("li." + dropDownBaseClasses.li + ":not(." + HIDE_LIST$1 + "):not(.e-reorder-hide)");
            previousItem = steps <= collection.length ? collection[steps - 1] : collection[collection.length - 1], 
            this.addListFocus(previousItem), this.scrollBottom(previousItem, this.getIndexByValue(previousItem.getAttribute("data-value")));
        }, MultiSelect.prototype.getItems = function() {
            return this.ulElement.querySelectorAll("." + dropDownBaseClasses.li + ":not(." + HIDE_LIST$1 + ")");
        }, MultiSelect.prototype.focusIn = function() {
            return !(!this.enabled || this.readonly) && (this.showOverAllClear(), this.inputFocus = !0, 
            this.value ? this.tempValues = this.value.slice() : this.tempValues = this.value, 
            this.value && this.value.length && ("Delimiter" !== this.mode && "CheckBox" !== this.mode ? this.chipCollectionWrapper.style.display = "" : this.showDelimWrapper(), 
            "CheckBox" !== this.mode && (this.viewWrapper.style.display = "none")), "CheckBox" !== this.mode && this.searchWrapper.classList.remove("e-zero-size"), 
            this.focused && (this.trigger("focus"), this.focused = !1), this.overAllWrapper.classList.contains(FOCUS$5) || this.overAllWrapper.classList.add(FOCUS$5), 
            this.isPopupOpen() && this.refreshPopup(), !0);
        }, MultiSelect.prototype.showDelimWrapper = function() {
            "CheckBox" === this.mode ? this.viewWrapper.style.display = "" : this.delimiterWrapper.style.display = "", 
            this.componentWrapper.classList.add("e-delimiter");
        }, MultiSelect.prototype.hideDelimWrapper = function() {
            this.delimiterWrapper.style.display = "none", this.componentWrapper.classList.remove("e-delimiter");
        }, MultiSelect.prototype.expandTextbox = function() {
            var size = 5;
            this.placeholder && (size = size > this.inputElement.placeholder.length ? size : this.inputElement.placeholder.length), 
            this.inputElement.value.length > size ? this.inputElement.size = this.inputElement.value.length : this.inputElement.size = size;
        }, MultiSelect.prototype.isPopupOpen = function() {
            return null !== this.popupWrapper && null !== this.popupWrapper.parentElement;
        }, MultiSelect.prototype.refreshPopup = function() {
            this.popupObj && this.mobFilter && (this.popupObj.setProperties({
                width: this.calcPopupWidth()
            }), this.popupObj.refreshPosition(this.overAllWrapper));
        }, MultiSelect.prototype.checkTextLength = function() {
            return this.targetElement().length < 1;
        }, MultiSelect.prototype.popupKeyActions = function(keyCode) {
            switch (keyCode) {
              case 38:
                this.hidePopup(), "CheckBox" === this.mode && this.inputElement.focus();
                break;

              case 40:
                this.isPopupOpen() || this.showPopup();
            }
        }, MultiSelect.prototype.updateAriaAttribute = function() {
            var focusedItem = this.list.querySelector("." + dropDownBaseClasses.focus);
            isNullOrUndefined(focusedItem) || this.inputElement.setAttribute("aria-activedescendant", focusedItem.id);
        }, MultiSelect.prototype.onKeyDown = function(e) {
            if (!this.readonly && (this.enabled || "CheckBox" === this.mode) && (this.keyDownStatus = !0, 
            !(e.keyCode > 111 && e.keyCode < 124))) {
                if (e.altKey) return this.popupKeyActions(e.keyCode), void e.preventDefault();
                if (this.isPopupOpen()) {
                    var focusedItem = this.list.querySelector("." + dropDownBaseClasses.focus);
                    switch (e.keyCode) {
                      case 36:
                      case 35:
                        break;

                      case 33:
                        return e.preventDefault(), void (focusedItem && (this.getIndexByValue(focusedItem.getAttribute("data-value")), 
                        this.pageUpSelection(void 0 - this.getPagingCount()), this.updateAriaAttribute()));

                      case 34:
                        return e.preventDefault(), void (focusedItem && (this.getIndexByValue(focusedItem.getAttribute("data-value")), 
                        this.pageDownSelection(void 0 + this.getPagingCount()), this.updateAriaAttribute()));

                      case 38:
                        e.preventDefault(), this.moveByList(-1), this.updateAriaAttribute();
                        break;

                      case 40:
                        e.preventDefault(), this.moveByList(1), this.updateAriaAttribute();
                        break;

                      case 27:
                        return e.preventDefault(), this.hidePopup(), void ("CheckBox" === this.mode && this.inputElement.focus());

                      case 13:
                        return e.preventDefault(), void ("CheckBox" !== this.mode && this.selectByKey(e));

                      case 32:
                        return void ("CheckBox" === this.mode && (e.preventDefault(), this.selectByKey(e)));

                      case 9:
                        e.preventDefault(), this.hidePopup(), this.inputElement.focus(), this.overAllWrapper.classList.add(FOCUS$5);
                    }
                } else switch (e.keyCode) {
                  case 13:
                  case 9:
                  case 16:
                  case 17:
                  case 20:
                    return;

                  case 40:
                    this.openOnClick && this.showPopup();
                    break;

                  case 27:
                    return e.preventDefault(), void this.escapeAction();
                }
                this.checkTextLength() && this.keyNavigation(e), "CheckBox" === this.mode && this.enableSelectionOrder && this.checkBackCommand(e), 
                this.expandTextbox(), this.refreshPopup();
            }
        }, MultiSelect.prototype.checkBackCommand = function(e) {
            8 === e.keyCode && "" === this.targetElement() ? this.backCommand = !1 : this.backCommand = !0;
        }, MultiSelect.prototype.keyNavigation = function(e) {
            if ("Delimiter" !== this.mode && "CheckBox" !== this.mode && this.value && this.value.length) switch (e.keyCode) {
              case 37:
                e.preventDefault(), this.moveBy(-1, e);
                break;

              case 39:
                e.preventDefault(), this.moveBy(1, e);
                break;

              case 8:
                this.removelastSelection(e);
                break;

              case 46:
                this.removeSelectedChip(e);
            } else if (8 === e.keyCode && "Delimiter" === this.mode && this.value && this.value.length) {
                e.preventDefault();
                var temp = this.value[this.value.length - 1];
                this.removeValue(temp, e), this.updateDelimeter(this.delimiterChar), this.focusAtLastListItem(temp);
            }
        }, MultiSelect.prototype.selectByKey = function(e) {
            this.removeChipSelection(), this.selectListByKey(e), this.hideSelectedItem && this.focusAtFirstListItem();
        }, MultiSelect.prototype.escapeAction = function() {
            var temp = this.tempValues ? this.tempValues.slice() : [];
            this.value && this.validateValues(this.value, temp) && (this.value = temp, this.initialValueUpdate(), 
            "Delimiter" !== this.mode && "CheckBox" !== this.mode ? this.chipCollectionWrapper.style.display = "" : this.showDelimWrapper(), 
            this.refreshPlaceHolder(), this.value.length ? this.showOverAllClear() : this.hideOverAllClear()), 
            this.makeTextBoxEmpty();
        }, MultiSelect.prototype.scrollBottom = function(selectedLI, activeIndex) {
            var currentOffset = this.list.getBoundingClientRect().height, nextBottom = selectedLI.offsetTop + selectedLI.getBoundingClientRect().height - this.list.scrollTop, nextOffset = this.list.scrollTop + nextBottom - currentOffset, boxRange = selectedLI.offsetTop + selectedLI.getBoundingClientRect().height - this.list.scrollTop;
            boxRange = this.fields.groupBy && !isUndefined(this.fixedHeaderElement) ? boxRange - this.fixedHeaderElement.getBoundingClientRect().height : boxRange, 
            0 === activeIndex ? this.list.scrollTop = 0 : nextBottom > currentOffset ? this.list.scrollTop = nextOffset : boxRange > 0 && this.list.getBoundingClientRect().height > boxRange || (this.list.scrollTop = nextOffset);
        }, MultiSelect.prototype.scrollTop = function(selectedLI, activeIndex) {
            var nextOffset = selectedLI.offsetTop - this.list.scrollTop;
            selectedLI.offsetTop, selectedLI.getBoundingClientRect().height, this.list.scrollTop;
            nextOffset = this.fields.groupBy && !isUndefined(this.fixedHeaderElement) ? nextOffset - this.fixedHeaderElement.getBoundingClientRect().height : nextOffset;
            var boxRange = selectedLI.offsetTop + selectedLI.getBoundingClientRect().height - this.list.scrollTop;
            0 === activeIndex ? this.list.scrollTop = 0 : nextOffset < 0 ? this.list.scrollTop = this.list.scrollTop + nextOffset : boxRange > 0 && this.list.getBoundingClientRect().height > boxRange || (this.list.scrollTop = selectedLI.offsetTop - (this.fields.groupBy && !isUndefined(this.fixedHeaderElement) ? this.fixedHeaderElement.getBoundingClientRect().height : 0));
        }, MultiSelect.prototype.selectListByKey = function(e) {
            var li = this.list.querySelector("li." + dropDownBaseClasses.focus), limit = this.value && this.value.length ? this.value.length : 0;
            null !== li && (li.classList.contains("e-active") && (limit -= 1), this.isValidLI(li) && limit < this.maximumSelectionLength && (this.updateListSelection(li, e), 
            this.addListFocus(li), "CheckBox" === this.mode ? (this.updateDelimView(), this.refreshInputHight(), 
            this.updateDelimeter(this.delimiterChar)) : this.updateDelimeter(this.delimiterChar), 
            this.makeTextBoxEmpty(), "CheckBox" !== this.mode && this.refreshListItems(li.textContent), 
            this.refreshPopup(), this.value && this.value.length && (this.removeListSelection(), 
            this.refreshSelection())), this.closePopupOnSelect && this.hidePopup()), this.refreshPlaceHolder();
        }, MultiSelect.prototype.refreshListItems = function(data) {
            if ((this.allowFiltering || this.allowCustomValue) && this.mainList && this.listData) {
                var list = void 0;
                list = "Descending" === this.sortOrder || "Ascending" === this.sortOrder ? this.ulElement.cloneNode ? this.ulElement.cloneNode(!0) : this.ulElement : this.mainList.cloneNode ? this.mainList.cloneNode(!0) : this.mainList, 
                this.onActionComplete(list, this.mainData), this.focusAtLastListItem(data), this.value && this.value.length && this.refreshSelection();
            }
        }, MultiSelect.prototype.removeSelectedChip = function(e) {
            var temp, selectedElem = this.chipCollectionWrapper.querySelector("span.e-chip-selected");
            null !== selectedElem && (isNullOrUndefined(this.value) || (this.tempValues = this.value.slice()), 
            null !== (temp = selectedElem.nextElementSibling) && (this.removeChipSelection(), 
            this.addChipSelection(temp, e)), this.removeValue(selectedElem.getAttribute("data-value"), e), 
            this.makeTextBoxEmpty()), this.closePopupOnSelect && this.hidePopup();
        }, MultiSelect.prototype.moveByTop = function(state) {
            var index, elements = this.list.querySelectorAll("li." + dropDownBaseClasses.li);
            elements.length > 1 && (this.removeFocus(), index = state ? 0 : elements.length - 1, 
            this.addListFocus(elements[index]), this.scrollBottom(elements[index], index)), 
            this.updateAriaAttribute();
        }, MultiSelect.prototype.moveByList = function(position) {
            if (this.list) {
                var elements = this.list.querySelectorAll("li." + dropDownBaseClasses.li + ":not(." + HIDE_LIST$1 + "):not(.e-reorder-hide)"), selectedElem = this.list.querySelector("li." + dropDownBaseClasses.focus), temp = -1;
                if (elements.length) {
                    for (var index = 0; index < elements.length; index++) if (elements[index] === selectedElem) {
                        temp = index;
                        break;
                    }
                    position > 0 ? temp < elements.length - 1 && (this.removeFocus(), this.addListFocus(elements[++temp]), 
                    this.scrollBottom(elements[temp], temp)) : temp > 0 && (this.removeFocus(), this.addListFocus(elements[--temp]), 
                    this.scrollTop(elements[temp], temp));
                }
            }
        }, MultiSelect.prototype.moveBy = function(position, e) {
            var elements, selectedElem, temp;
            elements = this.chipCollectionWrapper.querySelectorAll("span.e-chips"), null === (selectedElem = this.chipCollectionWrapper.querySelector("span.e-chip-selected")) ? position < 0 && this.addChipSelection(elements[elements.length - 1], e) : position < 0 ? null !== (temp = selectedElem.previousElementSibling) && (this.removeChipSelection(), 
            this.addChipSelection(temp, e)) : (temp = selectedElem.nextElementSibling, this.removeChipSelection(), 
            null !== temp && this.addChipSelection(temp, e));
        }, MultiSelect.prototype.chipClick = function(e) {
            if (this.enabled) {
                var elem = closest(e.target, ".e-chips");
                this.removeChipSelection(), this.addChipSelection(elem, e);
            }
        }, MultiSelect.prototype.removeChipSelection = function() {
            this.chipCollectionWrapper && this.removeChipFocus();
        }, MultiSelect.prototype.addChipSelection = function(element, e) {
            addClass([ element ], "e-chip-selected"), this.trigger("chipSelection", e);
        }, MultiSelect.prototype.onChipRemove = function(e) {
            if (3 !== e.which && 2 !== e.button && this.enabled && !this.readonly) {
                var element = e.target.parentElement, value = this.getFormattedValue(element.getAttribute("data-value"));
                this.isPopupOpen() && "CheckBox" !== this.mode && this.hidePopup(), this.inputFocus || this.inputElement.focus(), 
                this.removeValue(value, e), this.updateDelimeter(this.delimiterChar), this.makeTextBoxEmpty(), 
                e.preventDefault();
            }
        }, MultiSelect.prototype.makeTextBoxEmpty = function() {
            this.inputElement.value = "", this.refreshPlaceHolder();
        }, MultiSelect.prototype.refreshPlaceHolder = function() {
            this.placeholder && (this.value && this.value.length ? this.inputElement.placeholder = "" : this.inputElement.placeholder = this.placeholder), 
            this.expandTextbox();
        }, MultiSelect.prototype.removeValue = function(value, eve) {
            var index = this.value.indexOf(this.getFormattedValue(value)), className = this.hideSelectedItem ? HIDE_LIST$1 : dropDownBaseClasses.selected;
            if (-1 !== index) {
                var element = this.list.querySelector('li[data-value="' + value + '"]'), eventArgs = {
                    e: eve,
                    item: element,
                    itemData: this.getDataByValue(value),
                    isInteracted: !!eve,
                    cancel: !1
                };
                if (this.trigger("removing", eventArgs), eventArgs.cancel) return;
                this.value.splice(index, 1), this.setProperties({
                    value: [].concat([], this.value)
                }, !0), null !== element && (element.setAttribute("aria-selected", "false"), removeClass([ element ], className), 
                this.notify("activeList", {
                    module: "CheckBoxSelection",
                    enable: "CheckBox" === this.mode,
                    li: element,
                    e: this,
                    index: index
                }), this.notify("updatelist", {
                    module: "CheckBoxSelection",
                    enable: "CheckBox" === this.mode,
                    li: element,
                    e: eve
                }), attributes(this.inputElement, {
                    "aria-activedescendant": element.id
                }), this.value.length !== this.mainData.length && "CheckBox" === this.mode && this.showSelectAll && this.notify("checkSelectAll", {
                    module: "CheckBoxSelection",
                    enable: "CheckBox" === this.mode,
                    value: "uncheck"
                })), this.hideSelectedItem && this.fields.groupBy && this.hideGroupItem(value), 
                this.updateMainList(!0, value), this.removeChip(value), this.updateChipStatus();
                if ((this.value && this.value.length ? this.value.length : 0) < this.maximumSelectionLength) {
                    removeClass(this.list.querySelectorAll("li." + dropDownBaseClasses.li + ":not(.e-active)"), "e-disable");
                }
                this.trigger("removed", eventArgs);
            }
        }, MultiSelect.prototype.updateMainList = function(state, value) {
            if (this.allowFiltering) {
                var element2 = this.mainList.querySelector('li[data-value="' + value + '"]');
                element2 && (state ? (element2.setAttribute("aria-selected", "false"), removeClass([ element2 ], this.hideSelectedItem ? HIDE_LIST$1 : dropDownBaseClasses.selected), 
                "CheckBox" === this.mode && (element2.firstElementChild.setAttribute("aria-checked", "false"), 
                removeClass([ element2.firstElementChild.lastElementChild ], "e-check"))) : (element2.setAttribute("aria-selected", "true"), 
                addClass([ element2 ], this.hideSelectedItem ? HIDE_LIST$1 : dropDownBaseClasses.selected), 
                "CheckBox" === this.mode && (element2.firstElementChild.setAttribute("aria-checked", "true"), 
                addClass([ element2.firstElementChild.lastElementChild ], "e-check"))));
            }
        }, MultiSelect.prototype.removeChip = function(value) {
            if (this.chipCollectionWrapper) {
                var element = this.chipCollectionWrapper.querySelector('span[data-value="' + value + '"]');
                element && remove(element);
            }
        }, MultiSelect.prototype.updateChipStatus = function() {
            this.value.length ? (isNullOrUndefined(this.chipCollectionWrapper) || (this.chipCollectionWrapper.style.display = ""), 
            "Delimiter" !== this.mode && "CheckBox" !== this.mode || this.showDelimWrapper(), 
            this.showOverAllClear()) : (isNullOrUndefined(this.chipCollectionWrapper) || (this.chipCollectionWrapper.style.display = "none"), 
            isNullOrUndefined(this.delimiterWrapper) || (this.delimiterWrapper.style.display = "none"), 
            this.hideOverAllClear());
        }, MultiSelect.prototype.addValue = function(value, text, eve) {
            this.value || (this.value = []), this.setProperties({
                value: [].concat([], this.value, [ value ])
            }, !0);
            var element = this.list.querySelector('li[data-value="' + value + '"]');
            this.removeFocus(), element && (this.addListFocus(element), this.addListSelection(element)), 
            "Delimiter" !== this.mode && "CheckBox" !== this.mode && this.addChip(text, value, eve), 
            this.hideSelectedItem && this.fields.groupBy && this.hideGroupItem(value), this.updateChipStatus(), 
            this.checkMaxSelection();
        }, MultiSelect.prototype.checkMaxSelection = function() {
            if ((this.value && this.value.length ? this.value.length : 0) === this.maximumSelectionLength) {
                addClass(this.list.querySelectorAll("li." + dropDownBaseClasses.li + ":not(.e-active)"), "e-disable");
            }
        }, MultiSelect.prototype.dispatchSelect = function(value, eve, element, isNotTrigger) {
            if (this.initStatus && !isNotTrigger) {
                var eventArgs = {
                    e: eve,
                    item: element,
                    itemData: this.getDataByValue(value),
                    isInteracted: !!eve,
                    cancel: !1
                };
                if (this.trigger("select", eventArgs), eventArgs.cancel) return !0;
            }
            return !1;
        }, MultiSelect.prototype.addChip = function(text, value, e) {
            if (this.chipCollectionWrapper) {
                var item = this.getChip(text, value, e);
                if (item.cancel) return;
                this.chipCollectionWrapper.appendChild(item.element);
            }
        }, MultiSelect.prototype.removeChipFocus = function() {
            var elements, closeElements;
            if (elements = this.chipCollectionWrapper.querySelectorAll("span.e-chips"), closeElements = this.chipCollectionWrapper.querySelectorAll("span." + "e-chips-close".split(" ")[0]), 
            removeClass(elements, "e-chip-selected"), Browser.isDevice) for (var index = 0; index < closeElements.length; index++) closeElements[index].style.display = "none";
        }, MultiSelect.prototype.onMobileChipInteraction = function(e) {
            var chipElem = closest(e.target, ".e-chips"), chipClose = chipElem.querySelector("span." + "e-chips-close".split(" ")[0]);
            this.enabled && !this.readonly && (chipElem.classList.contains("e-chip-selected") || (this.removeChipFocus(), 
            chipClose.style.display = "", chipElem.classList.add("e-chip-selected")), this.refreshPopup(), 
            e.preventDefault());
        }, MultiSelect.prototype.getChip = function(data, value, e) {
            var itemData = {
                text: value,
                value: value
            }, chip = createElement("span", {
                className: CHIP$1,
                attrs: {
                    "data-value": value,
                    title: data
                }
            }), chipContent = createElement("span", {
                className: "e-chipcontent"
            }), chipClose = createElement("span", {
                className: "e-chips-close"
            });
            if (this.mainData && (itemData = this.getDataByValue(value)), this.valueTemplate && itemData) for (var _i = 0, _a = compile$$1(this.valueTemplate)(itemData); _i < _a.length; _i++) {
                var item = _a[_i];
                chipContent.appendChild(item);
            } else chipContent.innerHTML = data;
            chip.appendChild(chipContent);
            var eventArgs = {
                isInteracted: !!e,
                itemData: itemData,
                e: e,
                setClass: function(classes) {
                    addClass([ chip ], classes);
                },
                cancel: !1
            };
            return this.trigger("tagging", eventArgs), eventArgs.cancel ? {
                cancel: !0,
                element: chip
            } : (Browser.isDevice ? (chip.classList.add("e-mob-chip"), append([ chipClose ], chip), 
            chipClose.style.display = "none", EventHandler.add(chip, "click", this.onMobileChipInteraction, this)) : (EventHandler.add(chip, "mousedown", this.chipClick, this), 
            this.showClearButton && chip.appendChild(chipClose)), EventHandler.add(chipClose, "mousedown", this.onChipRemove, this), 
            {
                cancel: !1,
                element: chip
            });
        }, MultiSelect.prototype.calcPopupWidth = function() {
            var width = formatUnit(this.popupWidth);
            if (width.indexOf("%") > -1) {
                width = (this.componentWrapper.getBoundingClientRect().width * parseFloat(width) / 100).toString() + "px";
            }
            return width;
        }, MultiSelect.prototype.mouseIn = function() {
            this.enabled && !this.readonly && this.showOverAllClear();
        }, MultiSelect.prototype.mouseOut = function() {
            this.inputFocus || (this.overAllClear.style.display = "none");
        }, MultiSelect.prototype.listOption = function(dataSource, fields) {
            var iconCss = !isNullOrUndefined(fields.iconCss), fieldProperty = fields.properties;
            return this.listCurrentOptions = null !== fields.text || null !== fields.value ? {
                fields: fieldProperty,
                showIcon: iconCss,
                ariaAttributes: {
                    groupItemRole: "presentation"
                }
            } : {
                fields: {
                    value: "text"
                }
            }, extend(this.listCurrentOptions, this.listCurrentOptions, fields, !0), "CheckBox" === this.mode && this.notify("listoption", {
                module: "CheckBoxSelection",
                enable: "CheckBox" === this.mode,
                dataSource: dataSource,
                fieldProperty: fieldProperty
            }), this.listCurrentOptions;
        }, MultiSelect.prototype.renderPopup = function() {
            var _this = this;
            if (this.list || _super.prototype.render.call(this), !this.popupObj) {
                document.body.appendChild(this.popupWrapper);
                var overAllHeight = parseInt(this.popupHeight, 10);
                if (this.popupWrapper.style.visibility = "hidden", this.headerTemplate) {
                    this.header = document.createElement("div"), addClass([ this.header ], "e-ddl-header");
                    for (var elements = compile$$1(this.headerTemplate)({}), temp = 0; temp < elements.length; temp++) this.header.appendChild(elements[temp]);
                    "CheckBox" === this.mode && this.showSelectAll ? prepend([ this.header ], this.popupWrapper) : append([ this.header ], this.popupWrapper), 
                    EventHandler.add(this.header, "mousedown", this.onListMouseDown, this), overAllHeight -= this.header.getBoundingClientRect().height;
                }
                if (append([ this.list ], this.popupWrapper), this.footerTemplate) {
                    this.footer = document.createElement("div"), addClass([ this.footer ], "e-ddl-footer");
                    for (elements = compile$$1(this.footerTemplate)({}), temp = 0; temp < elements.length; temp++) this.footer.appendChild(elements[temp]);
                    append([ this.footer ], this.popupWrapper), EventHandler.add(this.footer, "mousedown", this.onListMouseDown, this), 
                    overAllHeight -= this.footer.getBoundingClientRect().height;
                }
                if ("CheckBox" === this.mode && this.showSelectAll ? (this.notify("selectAll", {
                    module: "CheckBoxSelection",
                    enable: "CheckBox" === this.mode
                }), overAllHeight -= this.selectAllHeight) : "CheckBox" !== this.mode || this.showSelectAll || this.headerTemplate && this.footerTemplate || (this.notify("selectAll", {
                    module: "CheckBoxSelection",
                    enable: "CheckBox" === this.mode
                }), overAllHeight = parseInt(this.popupHeight, 10)), "CheckBox" === this.mode) {
                    var args = {
                        module: "CheckBoxSelection",
                        enable: "CheckBox" === this.mode,
                        popupElement: this.popupWrapper
                    };
                    this.notify("searchBox", args), overAllHeight -= this.searchBoxHeight, addClass([ this.popupWrapper ], "e-checkbox");
                }
                "auto" !== this.popupHeight ? (this.list.style.maxHeight = formatUnit(overAllHeight), 
                this.popupWrapper.style.maxHeight = formatUnit(this.popupHeight)) : this.list.style.maxHeight = formatUnit(this.popupHeight), 
                this.popupObj = new Popup(this.popupWrapper, {
                    width: this.calcPopupWidth(),
                    targetType: "relative",
                    position: {
                        X: "left",
                        Y: "bottom"
                    },
                    relateTo: this.overAllWrapper,
                    collision: {
                        X: "flip",
                        Y: "flip"
                    },
                    offsetY: 1,
                    enableRtl: this.enableRtl,
                    zIndex: this.zIndex,
                    close: function() {
                        _this.popupObj.element.parentElement && detach(_this.popupObj.element);
                    },
                    open: function() {
                        _this.notify("inputFocus", {
                            module: "CheckBoxSelection",
                            enable: "CheckBox" === _this.mode,
                            value: "focus"
                        });
                    }
                }), this.popupObj.close(), this.popupWrapper.style.visibility = "", "CheckBox" === this.mode && Browser.isDevice && this.notify("deviceSearchBox", {
                    module: "CheckBoxSelection",
                    enable: "CheckBox" === this.mode
                });
            }
        }, MultiSelect.prototype.ClearAll = function(e) {
            if (this.enabled && !this.readonly) {
                var temp = void 0, tempValues = this.value ? this.value.slice() : [];
                for (temp = this.value[0]; 0 !== this.value.length; temp = this.value[0]) this.removeValue(temp, e);
                if (this.allowFiltering && this.mainList && this.listData) {
                    var list = this.mainList.cloneNode ? this.mainList.cloneNode(!0) : this.mainList;
                    this.onActionComplete(list, this.mainData);
                }
                this.focusAtFirstListItem(), this.updateDelimeter(this.delimiterChar), "Box" !== this.mode && this.updateDelimView(), 
                this.makeTextBoxEmpty(), this.isPopupOpen() && this.refreshPopup(), this.inputFocus || (this.updateValueState(e, this.value, tempValues), 
                "CheckBox" !== this.mode && this.inputElement.focus()), "CheckBox" === this.mode && (this.refreshPlaceHolder(), 
                this.refreshInputHight()), e.preventDefault();
            }
        }, MultiSelect.prototype.windowResize = function() {
            this.refreshPopup(), !this.inputFocus && this.viewWrapper && this.viewWrapper.parentElement && this.updateDelimView();
        }, MultiSelect.prototype.wireEvent = function() {
            EventHandler.add(this.componentWrapper, "mousedown", this.wrapperClick, this), EventHandler.add(window, "resize", this.windowResize, this), 
            EventHandler.add(this.inputElement, "focus", this.focusIn, this), EventHandler.add(this.inputElement, "keydown", this.onKeyDown, this), 
            EventHandler.add(this.inputElement, "keyup", this.KeyUp, this), "CheckBox" !== this.mode && EventHandler.add(this.inputElement, "input", this.onInput, this), 
            EventHandler.add(this.inputElement, "blur", this.onBlur, this), EventHandler.add(this.componentWrapper, "mousemove", this.mouseIn, this), 
            EventHandler.add(this.componentWrapper, "mouseout", this.mouseOut, this), EventHandler.add(this.overAllClear, "mouseup", this.ClearAll, this);
        }, MultiSelect.prototype.onInput = function() {
            this.keyDownStatus ? this.isValidKey = !0 : this.isValidKey = !1, this.keyDownStatus = !1;
        }, MultiSelect.prototype.preRender = function() {
            this.initializeData(), _super.prototype.preRender.call(this);
        }, MultiSelect.prototype.initializeData = function() {
            this.mainListCollection = [], this.beforePopupOpen = !1, this.filterAction = !1, 
            this.isFirstClick = !1, this.mobFilter = !0, this.isFiltered = !1, this.focused = !0, 
            this.initial = !0, this.backCommand = !0;
        }, MultiSelect.prototype.updateData = function(delimiterChar) {
            var temp, data = "", delim = "Delimiter" === this.mode || "CheckBox" === this.mode, text = [], tempData = this.listData;
            if (this.listData = this.mainData, this.hiddenElement.innerHTML = "", !isNullOrUndefined(this.value)) for (var index = 0; this.value[index]; index++) data += (temp = this.listData ? this.getTextByValue(this.value[index]) : this.value[index]) + delimiterChar + " ", 
            text.push(temp), this.hiddenElement.innerHTML += '<option selected value ="' + this.value[index] + '">' + index + "</option>";
            this.text = text.toString(), delim && (this.delimiterWrapper.innerHTML = data), 
            this.listData = tempData;
        }, MultiSelect.prototype.initialValueUpdate = function() {
            if (this.list) {
                var text = void 0, element = void 0, value = void 0;
                if (this.chipCollectionWrapper && (this.chipCollectionWrapper.innerHTML = ""), this.removeListSelection(), 
                !isNullOrUndefined(this.value)) for (var index = 0; this.value[index]; index++) if (value = this.value[index], 
                element = this.list.querySelector('li[data-value="' + value + '"]'), text = this.getTextByValue(value), 
                element && "true" !== element.getAttribute("aria-selected")) text = this.getTextByValue(value), 
                this.addChip(text, value), this.addListSelection(element); else if (value && isNullOrUndefined(text) && this.allowCustomValue) {
                    var indexItem = this.listData.length, newValue = {};
                    setValue(this.fields.text, value, newValue), setValue(this.fields.value, value, newValue), 
                    this.addItem(newValue, indexItem), text = this.getTextByValue(value), this.addChip(text, value), 
                    this.addListSelection(element);
                }
                "CheckBox" === this.mode ? (this.updateDelimView(), this.updateValueState(null, this.value, this.tempValues), 
                this.refreshInputHight(), this.updateDelimeter(this.delimiterChar)) : this.updateDelimeter(this.delimiterChar), 
                "CheckBox" === this.mode && this.showSelectAll && isNullOrUndefined(this.value) && this.notify("checkSelectAll", {
                    module: "CheckBoxSelection",
                    enable: "CheckBox" === this.mode,
                    value: "uncheck"
                }), this.inputFocus || ("Box" === this.mode ? this.chipCollectionWrapper.style.display = "" : "Delimiter" !== this.mode && "CheckBox" !== this.mode || this.showDelimWrapper());
            }
        }, MultiSelect.prototype.isValidLI = function(li) {
            return li && !li.classList.contains(dropDownBaseClasses.disabled) && !li.classList.contains(dropDownBaseClasses.group) && li.classList.contains(dropDownBaseClasses.li);
        }, MultiSelect.prototype.updateListSelection = function(li, e) {
            var value = this.getFormattedValue(li.getAttribute("data-value")), text = this.getTextByValue(value);
            if (this.removeHover(), this.value && -1 !== this.value.indexOf(value)) this.removeValue(value, e); else {
                if (this.dispatchSelect(value, e, li, "true" === li.getAttribute("aria-selected"))) return;
                if ((this.allowCustomValue || this.allowFiltering) && !this.mainList.querySelector('li[data-value="' + value + '"]')) {
                    var temp = li.cloneNode(!0), data = this.getDataByValue(value);
                    append([ temp ], this.mainList), this.mainData.push(this.getDataByValue(value));
                    var eventArgs = {
                        newData: data,
                        cancel: !1
                    };
                    if (this.trigger("customValueSelection", eventArgs), eventArgs.cancel) return;
                }
                this.remoteCustomValue = !1, this.addValue(value, text, e);
            }
        }, MultiSelect.prototype.removeListSelection = function() {
            var className = this.hideSelectedItem ? HIDE_LIST$1 : dropDownBaseClasses.selected, selectedItems = this.list.querySelectorAll("." + className), temp = selectedItems.length;
            if (selectedItems && selectedItems.length) for (removeClass(selectedItems, className); temp > 0; ) selectedItems[temp - 1].setAttribute("aria-selected", "false"), 
            temp--;
            if (!isNullOrUndefined(this.mainList)) {
                var selectItems = this.mainList.querySelectorAll("." + className), temp1 = selectItems.length;
                if (selectItems && selectItems.length) for (removeClass(selectItems, className); temp1 > 0; ) selectItems[temp1 - 1].setAttribute("aria-selected", "false"), 
                "CheckBox" === this.mode && (selectItems[temp1 - 1].firstElementChild.setAttribute("aria-checked", "false"), 
                removeClass([ selectItems[temp1 - 1].firstElementChild.lastElementChild ], "e-check")), 
                temp1--;
            }
        }, MultiSelect.prototype.removeHover = function() {
            var hoveredItem = this.list.querySelectorAll("." + dropDownBaseClasses.hover);
            hoveredItem && hoveredItem.length && removeClass(hoveredItem, dropDownBaseClasses.hover);
        }, MultiSelect.prototype.removeFocus = function() {
            var hoveredItem = this.list.querySelectorAll("." + dropDownBaseClasses.focus), mainlist = this.mainList.querySelectorAll("." + dropDownBaseClasses.focus);
            hoveredItem && hoveredItem.length && (removeClass(hoveredItem, dropDownBaseClasses.focus), 
            removeClass(mainlist, dropDownBaseClasses.focus));
        }, MultiSelect.prototype.addListHover = function(li) {
            this.enabled && this.isValidLI(li) && (this.removeHover(), addClass([ li ], dropDownBaseClasses.hover));
        }, MultiSelect.prototype.addListFocus = function(element) {
            this.enabled && this.isValidLI(element) && (this.removeFocus(), addClass([ element ], dropDownBaseClasses.focus));
        }, MultiSelect.prototype.addListSelection = function(element) {
            var className = this.hideSelectedItem ? HIDE_LIST$1 : dropDownBaseClasses.selected;
            if (this.isValidLI(element) && !element.classList.contains(dropDownBaseClasses.hover)) {
                if (addClass([ element ], className), this.updateMainList(!1, element.getAttribute("data-value")), 
                element.setAttribute("aria-selected", "true"), "CheckBox" === this.mode) {
                    var ariaCheck = element.firstElementChild.getAttribute("aria-checked");
                    ("false" === ariaCheck || isNullOrUndefined(ariaCheck)) && this.notify("updatelist", {
                        module: "CheckBoxSelection",
                        enable: "CheckBox" === this.mode,
                        li: element,
                        e: this
                    });
                }
                this.notify("activeList", {
                    module: "CheckBoxSelection",
                    enable: "CheckBox" === this.mode,
                    li: element,
                    e: this
                }), null !== this.chipCollectionWrapper && this.removeChipSelection(), attributes(this.inputElement, {
                    "aria-activedescendant": element.id
                });
            }
        }, MultiSelect.prototype.updateDelimeter = function(delimChar) {
            this.updateData(delimChar);
        }, MultiSelect.prototype.onMouseClick = function(e) {
            this.scrollFocusStatus = !1;
            var li = closest(e.target, "." + dropDownBaseClasses.li);
            if (this.isValidLI(li)) {
                var limit = this.value && this.value.length ? this.value.length : 0;
                li.classList.contains("e-active") && (limit -= 1), limit < this.maximumSelectionLength && (this.updateListSelection(li, e), 
                this.addListFocus(li), (this.allowCustomValue || this.allowFiltering) && this.mainList && this.listData ? ("CheckBox" !== this.mode && this.focusAtLastListItem(li.getAttribute("data-value")), 
                this.refreshSelection()) : this.makeTextBoxEmpty()), "CheckBox" === this.mode ? (this.updateDelimView(), 
                this.refreshInputHight(), this.updateDelimeter(this.delimiterChar)) : this.updateDelimeter(this.delimiterChar), 
                this.checkSelectAll(), this.refreshPopup(), this.hideSelectedItem && this.focusAtFirstListItem(), 
                this.closePopupOnSelect ? this.hidePopup() : e.preventDefault(), this.makeTextBoxEmpty();
            } else e.preventDefault();
            this.refreshPlaceHolder();
        }, MultiSelect.prototype.onMouseOver = function(e) {
            var currentLi = closest(e.target, "." + dropDownBaseClasses.li);
            this.addListHover(currentLi);
        }, MultiSelect.prototype.onMouseLeave = function(e) {
            this.removeHover();
        }, MultiSelect.prototype.onListMouseDown = function(e) {
            e.preventDefault(), this.scrollFocusStatus = !0;
        }, MultiSelect.prototype.onDocumentClick = function(e) {
            if ("CheckBox" !== this.mode) {
                var target = e.target;
                !isNullOrUndefined(this.popupObj) && closest(target, "#" + this.popupObj.element.id) || this.overAllWrapper.contains(e.target) ? this.scrollFocusStatus = (Browser.isIE || "edge" === Browser.info.name) && document.activeElement === this.inputElement : this.scrollFocusStatus = !1;
            }
        }, MultiSelect.prototype.wireListEvents = function() {
            EventHandler.add(document, "mousedown", this.onDocumentClick, this), EventHandler.add(this.list, "mousedown", this.onListMouseDown, this), 
            EventHandler.add(this.list, "mouseup", this.onMouseClick, this), EventHandler.add(this.list, "mouseover", this.onMouseOver, this), 
            EventHandler.add(this.list, "mouseout", this.onMouseLeave, this);
        }, MultiSelect.prototype.unwireListEvents = function() {
            EventHandler.remove(document, "mousedown", this.onDocumentClick), this.list && (EventHandler.remove(this.list, "mousedown", this.onListMouseDown), 
            EventHandler.remove(this.list, "mouseup", this.onMouseClick), EventHandler.remove(this.list, "mouseover", this.onMouseOver), 
            EventHandler.remove(this.list, "mouseout", this.onMouseLeave));
        }, MultiSelect.prototype.hideOverAllClear = function() {
            this.value && this.value.length && "" !== this.inputElement.value || (this.overAllClear.style.display = "none");
        }, MultiSelect.prototype.showOverAllClear = function() {
            this.value && this.value.length || "" !== this.inputElement.value ? this.overAllClear.style.display = "" : this.overAllClear.style.display = "none";
        }, MultiSelect.prototype.showSpinner = function() {
            isNullOrUndefined(this.spinnerElement) && ("none" !== this.overAllClear.style.display ? this.spinnerElement = this.overAllClear : (this.spinnerElement = createElement("span", {
                className: "e-chips-close e-close-hooker e-ms-spinner-icon"
            }), this.componentWrapper.appendChild(this.spinnerElement)), addClass([ this.spinnerElement ], "e-ddl-disable-icon"), 
            createSpinner({
                target: this.spinnerElement,
                width: Browser.isDevice ? "16px" : "14px"
            }), showSpinner(this.spinnerElement));
        }, MultiSelect.prototype.hideSpinner = function() {
            isNullOrUndefined(this.spinnerElement) || (hideSpinner(this.spinnerElement), removeClass([ this.spinnerElement ], "e-ddl-disable-icon"), 
            this.spinnerElement.classList.contains("e-ms-spinner-icon") ? detach(this.spinnerElement) : this.spinnerElement.innerHTML = "", 
            this.spinnerElement = null);
        }, MultiSelect.prototype.updateDelimView = function() {
            if (this.delimiterWrapper && this.hideDelimWrapper(), this.chipCollectionWrapper && (this.chipCollectionWrapper.style.display = "none"), 
            this.viewWrapper.style.display = "", this.value && this.value.length) {
                var data = "", temp = void 0, tempData = void 0, tempIndex = 1, wrapperleng = void 0, remaining = void 0;
                this.viewWrapper.innerHTML = "";
                var remainContent = new L10n("dropdowns", {
                    noRecordsTemplate: "No Records Found",
                    actionFailureTemplate: "The Request Failed",
                    overflowCountTemplate: "+${count} more.."
                }, this.locale).getConstant("overflowCountTemplate"), raminElement = createElement("span", {
                    className: "e-remain"
                }), compiledString = compile$$1(remainContent);
                raminElement.appendChild(compiledString({
                    count: this.value.length
                })[0]), this.viewWrapper.appendChild(raminElement);
                var remainSize = raminElement.getBoundingClientRect().width;
                remove(raminElement), this.viewWrapper.innerHTML = "";
                this.searchWrapper.getBoundingClientRect().width;
                var overAllContainer = parseInt(window.getComputedStyle(this.componentWrapper).width, 10) - parseInt(window.getComputedStyle(this.componentWrapper).paddingLeft, 10) - parseInt(window.getComputedStyle(this.componentWrapper).paddingRight, 10), remainValue = void 0;
                if (!isNullOrUndefined(this.value)) for (var index = 0; this.value[index]; index++) {
                    if (data += 0 === index ? "" : this.delimiterChar + " ", this.mainData && this.mainData.length) if ("CheckBox" === this.mode) {
                        remainValue = 110;
                        var newTemp = this.listData;
                        this.listData = this.mainData, temp = this.getTextByValue(this.value[index]), this.listData = newTemp;
                    } else remainValue = 0, temp = this.getTextByValue(this.value[index]); else temp = this.value[index];
                    if (data += temp, temp = this.viewWrapper.innerHTML, this.viewWrapper.innerHTML = data, 
                    (wrapperleng = this.viewWrapper.getBoundingClientRect().width) > overAllContainer - remainValue) {
                        void 0 !== tempData && (temp = tempData, index = tempIndex + 1), this.viewWrapper.innerHTML = temp, 
                        remaining = this.value.length - index;
                        break;
                    }
                    wrapperleng + remainSize <= overAllContainer ? (tempData = data, tempIndex = index) : 0 === index && (tempData = "", 
                    tempIndex = -1);
                }
                remaining > 0 && (raminElement.innerHTML = "", raminElement.appendChild(compiledString({
                    count: remaining
                })[0]), this.viewWrapper.appendChild(raminElement));
            } else this.viewWrapper.innerHTML = "", this.viewWrapper.style.display = "none";
        }, MultiSelect.prototype.unWireEvent = function() {
            EventHandler.remove(this.componentWrapper, "mousedown", this.wrapperClick), EventHandler.remove(window, "resize", this.windowResize), 
            EventHandler.remove(this.inputElement, "focus", this.focusIn), EventHandler.remove(this.inputElement, "keydown", this.onKeyDown), 
            "CheckBox" !== this.mode && EventHandler.remove(this.inputElement, "input", this.onInput), 
            EventHandler.remove(this.inputElement, "keyup", this.KeyUp), EventHandler.remove(this.inputElement, "blur", this.onBlur), 
            EventHandler.remove(this.componentWrapper, "mousemove", this.mouseIn), EventHandler.remove(this.componentWrapper, "mouseout", this.mouseOut), 
            EventHandler.remove(this.overAllClear, "mousedown", this.ClearAll);
        }, MultiSelect.prototype.selectAllItem = function(state) {
            var li, length = (li = this.list.querySelectorAll(state ? 'li[aria-selected="false"]:not(.e-reorder-hide)' : 'li[aria-selected="true"]:not(.e-reorder-hide)')).length;
            if (li && li.length) for (;length > 0; ) this.updateListSelection(li[length - 1], null), 
            length--;
            "Box" === this.mode || this.isPopupOpen() ? this.searchWrapper.classList.remove("e-zero-size") : this.updateDelimView(), 
            "CheckBox" === this.mode ? (this.updateDelimView(), this.refreshInputHight(), this.updateDelimeter(this.delimiterChar)) : this.updateDelimeter(this.delimiterChar), 
            this.refreshPlaceHolder();
        }, MultiSelect.prototype.setZIndex = function() {
            this.popupObj && this.popupObj.setProperties({
                zIndex: this.zIndex
            });
        }, MultiSelect.prototype.updateDataSource = function(prop) {
            this.resetList(this.dataSource), this.value && this.value.length && this.refreshSelection();
        }, MultiSelect.prototype.onLoadSelect = function() {
            this.setDynValue = !0, this.renderPopup();
        }, MultiSelect.prototype.getPersistData = function() {
            return this.addOnPersist([ "value" ]);
        }, MultiSelect.prototype.onPropertyChanged = function(newProp, oldProp) {
            newProp.dataSource && !isNullOrUndefined(Object.keys(newProp.dataSource)) && (this.mainList = null, 
            this.mainData = null), this.setUpdateInitial([ "query", "dataSource" ], newProp);
            for (var _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                var prop = _a[_i];
                switch (prop) {
                  case "query":
                  case "dataSource":
                    "CheckBox" === this.mode && this.showSelectAll && (this.popupObj.destroy(), this.popupObj = null, 
                    this.renderPopup());
                    break;

                  case "htmlAttributes":
                    this.updateHTMLAttribute();
                    break;

                  case "showClearButton":
                    this.updateClearButton(newProp.showClearButton);
                    break;

                  case "value":
                    this.list ? this.inputFocus || (this.initialValueUpdate(), "Box" !== this.mode && this.updateDelimView(), 
                    this.refreshInputHight(), this.refreshPlaceHolder(), this.updateValueState(null, this.value, oldProp.value)) : this.dataSource instanceof DataManager && this.onLoadSelect();
                    break;

                  case "width":
                    setStyleAttribute(this.overAllWrapper, {
                        width: formatUnit(newProp.width)
                    }), this.popupObj.setProperties({
                        width: this.calcPopupWidth()
                    });
                    break;

                  case "placeholder":
                    this.refreshPlaceHolder();
                    break;

                  case "filterBarPlaceholder":
                    this.notify("filterBarPlaceholder", {
                        filterBarPlaceholder: newProp.filterBarPlaceholder
                    });
                    break;

                  case "delimiterChar":
                    "Box" !== this.mode && this.updateDelimView(), this.updateData(newProp.delimiterChar);
                    break;

                  case "cssClass":
                    this.popupWrapper.classList.remove(oldProp.cssClass), this.overAllWrapper.classList.remove(oldProp.cssClass), 
                    this.updateCssClass();
                    break;

                  case "enableRtl":
                    this.enableRTL(newProp.enableRtl), _super.prototype.onPropertyChanged.call(this, newProp, oldProp);
                    break;

                  case "readonly":
                    this.updateReadonly(newProp.readonly), this.hidePopup();
                    break;

                  case "enabled":
                    this.hidePopup(), this.enable(newProp.enabled);
                    break;

                  case "showSelectAll":
                    this.popupObj.destroy(), this.popupObj = null, this.renderPopup();
                    break;

                  case "showDropDownIcon":
                    this.dropDownIcon();
                    break;

                  case "enableSelectionOrder":
                    break;

                  case "selectAllText":
                    this.notify("selectAllText", !1);
                    break;

                  case "popupHeight":
                  case "headerTemplate":
                  case "footerTemplate":
                    this.popupObj.destroy(), this.popupObj = null, this.popupWrapper.lastElementChild.classList.contains("e-ddl-footer") && this.popupWrapper.lastElementChild.remove(), 
                    this.popupWrapper.firstElementChild.classList.contains("e-ddl-header") && this.popupWrapper.firstElementChild.remove(), 
                    this.renderPopup();
                    break;

                  default:
                    var msProps = void 0;
                    msProps = this.getPropObject(prop, newProp, oldProp), _super.prototype.onPropertyChanged.call(this, msProps.newProperty, msProps.oldProperty);
                }
            }
        }, MultiSelect.prototype.hidePopup = function() {
            if (this.isPopupOpen()) {
                var eventArgs = {
                    popup: this.popupObj,
                    cancel: !1
                };
                if (this.trigger("close", eventArgs), eventArgs.cancel) return;
                var animModel = {
                    name: "FadeOut",
                    duration: 100,
                    delay: 100
                };
                this.beforePopupOpen = !1, this.overAllWrapper.classList.remove("e-icon-anim"), 
                this.popupObj.hide(new Animation(animModel)), attributes(this.inputElement, {
                    "aria-expanded": "false"
                }), this.notify("inputFocus", {
                    module: "CheckBoxSelection",
                    enable: "CheckBox" === this.mode,
                    value: "clear"
                }), this.popupObj.hide(), removeClass([ document.body, this.popupObj.element ], "e-popup-full-page");
            }
        }, MultiSelect.prototype.showPopup = function() {
            if (!this.ulElement) return this.beforePopupOpen = !0, void _super.prototype.render.call(this);
            var mainLiLength = this.ulElement.querySelectorAll("li.e-list-item").length, liLength = this.ulElement.querySelectorAll("li." + dropDownBaseClasses.li + "." + HIDE_LIST$1).length;
            mainLiLength > 0 && mainLiLength === liLength ? this.beforePopupOpen = !1 : this.onPopupShown();
        }, MultiSelect.prototype.selectAll = function(state) {
            var _this = this;
            if (isNullOrUndefined(this.list)) this.selectAllAction = function() {
                if ("CheckBox" === _this.mode && _this.showSelectAll) {
                    var args = {
                        module: "CheckBoxSelection",
                        enable: "CheckBox" === _this.mode,
                        value: state ? "check" : "uncheck"
                    };
                    _this.notify("checkSelectAll", args);
                }
                _this.selectAllItem(state), _this.selectAllAction = null;
            }, _super.prototype.render.call(this); else {
                if (this.selectAllAction = null, "CheckBox" === this.mode && this.showSelectAll) {
                    var args = {
                        module: "CheckBoxSelection",
                        enable: "CheckBox" === this.mode,
                        value: state ? "check" : "uncheck"
                    };
                    this.notify("checkSelectAll", args);
                }
                this.selectAllItem(state);
            }
        }, MultiSelect.prototype.getModuleName = function() {
            return "multiselect";
        }, MultiSelect.prototype.render = function() {
            var _this = this;
            this.initStatus = !1, this.setDynValue = !1, this.searchWrapper = createElement("span", {
                className: "e-searcher"
            }), this.viewWrapper = createElement("span", {
                className: "e-delim-view e-delim-values",
                styles: "display:none;"
            }), this.overAllClear = createElement("span", {
                className: "e-chips-close e-close-hooker",
                styles: "display:none;"
            }), this.componentWrapper = createElement("div", {
                className: "e-multi-select-wrapper"
            }), this.overAllWrapper = createElement("div", {
                className: "e-multiselect e-input-group"
            }), "CheckBox" === this.mode && addClass([ this.overAllWrapper ], "e-checkbox"), 
            Browser.isDevice && this.componentWrapper.classList.add("e-mob-wrapper"), this.overAllWrapper.style.width = formatUnit(this.width), 
            this.overAllWrapper.appendChild(this.componentWrapper), this.popupWrapper = createElement("div", {
                id: this.element.id + "_popup",
                className: "e-ddl e-popup e-multi-select-list-wrapper"
            }), "Delimiter" === this.mode || "CheckBox" === this.mode ? (this.delimiterWrapper = createElement("span", {
                className: "e-delim-values",
                styles: "display:none"
            }), this.componentWrapper.appendChild(this.delimiterWrapper)) : (this.chipCollectionWrapper = createElement("span", {
                className: "e-chips-collection",
                styles: "display:none"
            }), this.componentWrapper.appendChild(this.chipCollectionWrapper)), "Box" !== this.mode && this.componentWrapper.appendChild(this.viewWrapper), 
            this.componentWrapper.appendChild(this.searchWrapper), this.showClearButton && !Browser.isDevice ? this.componentWrapper.appendChild(this.overAllClear) : this.componentWrapper.classList.add("e-close-icon-hide"), 
            this.dropDownIcon(), this.inputElement = createElement("input", {
                className: "e-dropdownbase",
                attrs: {
                    spellcheck: "false",
                    type: "text",
                    autocomplete: "off",
                    tabindex: "0"
                }
            }), this.refreshPlaceHolder(), this.element.tagName !== this.getNgDirective() && (this.element.style.display = "none"), 
            this.element.tagName === this.getNgDirective() ? (this.element.appendChild(this.overAllWrapper), 
            this.searchWrapper.appendChild(this.inputElement)) : (this.element.parentElement.insertBefore(this.overAllWrapper, this.element), 
            this.searchWrapper.appendChild(this.inputElement), this.searchWrapper.appendChild(this.element), 
            this.element.removeAttribute("tabindex")), this.element.style.opacity = "";
            var id = this.element.getAttribute("id") ? this.element.getAttribute("id") : getUniqueID("ej2_dropdownlist");
            this.element.id = id, this.hiddenElement = createElement("select", {
                attrs: {
                    "aria-hidden": "true",
                    class: "e-multi-hidden",
                    tabindex: "-1",
                    multiple: "true"
                }
            }), this.componentWrapper.appendChild(this.hiddenElement), this.validationAttribute(this.element, this.hiddenElement), 
            "CheckBox" !== this.mode && this.hideOverAllClear(), this.wireEvent(), this.enable(this.enabled), 
            this.enableRTL(this.enableRtl), this.dataSource instanceof DataManager || this.renderPopup(), 
            this.value && this.value.length ? this.dataSource instanceof DataManager ? (this.setInitialValue = function() {
                _this.initStatus = !1, _this.initialValueUpdate(), _this.initialUpdate(), _this.setInitialValue = null, 
                _this.initStatus = !0;
            }, _super.prototype.render.call(this)) : (this.initialValueUpdate(), this.initialUpdate()) : this.initialUpdate(), 
            this.initStatus = !0;
        }, MultiSelect.prototype.dropDownIcon = function() {
            "CheckBox" === this.mode && this.showDropDownIcon ? (this.dropIcon = createElement("span", {
                className: "e-input-group-icon e-ddl-icon"
            }), this.componentWrapper.appendChild(this.dropIcon), addClass([ this.componentWrapper ], [ "e-down-icon" ])) : isNullOrUndefined(this.dropIcon) || (this.dropIcon.parentElement.removeChild(this.dropIcon), 
            removeClass([ this.componentWrapper ], [ "e-down-icon" ]));
        }, MultiSelect.prototype.initialUpdate = function() {
            "Box" !== this.mode && this.updateDelimView(), this.updateCssClass(), this.updateHTMLAttribute(), 
            this.updateReadonly(this.readonly), this.refreshInputHight();
        }, MultiSelect.prototype.destroy = function() {
            this.popupObj && this.popupObj.hide(), this.notify("destroy", {}), this.unwireListEvents(), 
            this.unWireEvent(), this.list = null, this.popupObj = null, this.mainList = null, 
            this.mainData = null, _super.prototype.destroy.call(this);
            for (var temp = [ "readonly", "aria-disabled", "aria-placeholder", "placeholder" ], length = temp.length; length > 0; ) this.inputElement.removeAttribute(temp[length - 1]), 
            length--;
            this.element.style.display = "block", this.overAllWrapper.parentElement && (this.overAllWrapper.parentElement.tagName === this.getNgDirective() ? remove(this.overAllWrapper) : (this.overAllWrapper.parentElement.insertBefore(this.element, this.overAllWrapper), 
            remove(this.overAllWrapper)));
        }, __decorate$58([ Property(null) ], MultiSelect.prototype, "cssClass", void 0), 
        __decorate$58([ Property("100%") ], MultiSelect.prototype, "width", void 0), __decorate$58([ Property("300px") ], MultiSelect.prototype, "popupHeight", void 0), 
        __decorate$58([ Property("100%") ], MultiSelect.prototype, "popupWidth", void 0), 
        __decorate$58([ Property(null) ], MultiSelect.prototype, "placeholder", void 0), 
        __decorate$58([ Property(null) ], MultiSelect.prototype, "filterBarPlaceholder", void 0), 
        __decorate$58([ Property({}) ], MultiSelect.prototype, "htmlAttributes", void 0), 
        __decorate$58([ Property(null) ], MultiSelect.prototype, "valueTemplate", void 0), 
        __decorate$58([ Property(null) ], MultiSelect.prototype, "headerTemplate", void 0), 
        __decorate$58([ Property(null) ], MultiSelect.prototype, "footerTemplate", void 0), 
        __decorate$58([ Property(null) ], MultiSelect.prototype, "itemTemplate", void 0), 
        __decorate$58([ Property(!1) ], MultiSelect.prototype, "allowFiltering", void 0), 
        __decorate$58([ Property(!1) ], MultiSelect.prototype, "allowCustomValue", void 0), 
        __decorate$58([ Property(!0) ], MultiSelect.prototype, "showClearButton", void 0), 
        __decorate$58([ Property(1e3) ], MultiSelect.prototype, "maximumSelectionLength", void 0), 
        __decorate$58([ Property(!1) ], MultiSelect.prototype, "readonly", void 0), __decorate$58([ Property(null) ], MultiSelect.prototype, "text", void 0), 
        __decorate$58([ Property(null) ], MultiSelect.prototype, "value", void 0), __decorate$58([ Property(!0) ], MultiSelect.prototype, "hideSelectedItem", void 0), 
        __decorate$58([ Property(!0) ], MultiSelect.prototype, "closePopupOnSelect", void 0), 
        __decorate$58([ Property("Default") ], MultiSelect.prototype, "mode", void 0), __decorate$58([ Property(",") ], MultiSelect.prototype, "delimiterChar", void 0), 
        __decorate$58([ Property(!0) ], MultiSelect.prototype, "ignoreCase", void 0), __decorate$58([ Property(!1) ], MultiSelect.prototype, "showDropDownIcon", void 0), 
        __decorate$58([ Property(!1) ], MultiSelect.prototype, "showSelectAll", void 0), 
        __decorate$58([ Property("Select All") ], MultiSelect.prototype, "selectAllText", void 0), 
        __decorate$58([ Property("Unselect All") ], MultiSelect.prototype, "unSelectAllText", void 0), 
        __decorate$58([ Property(!0) ], MultiSelect.prototype, "enableSelectionOrder", void 0), 
        __decorate$58([ Property(!0) ], MultiSelect.prototype, "openOnClick", void 0), __decorate$58([ Event() ], MultiSelect.prototype, "change", void 0), 
        __decorate$58([ Event() ], MultiSelect.prototype, "removing", void 0), __decorate$58([ Event() ], MultiSelect.prototype, "removed", void 0), 
        __decorate$58([ Event() ], MultiSelect.prototype, "open", void 0), __decorate$58([ Event() ], MultiSelect.prototype, "close", void 0), 
        __decorate$58([ Event() ], MultiSelect.prototype, "blur", void 0), __decorate$58([ Event() ], MultiSelect.prototype, "focus", void 0), 
        __decorate$58([ Event() ], MultiSelect.prototype, "chipSelection", void 0), __decorate$58([ Event() ], MultiSelect.prototype, "filtering", void 0), 
        __decorate$58([ Event() ], MultiSelect.prototype, "tagging", void 0), __decorate$58([ Event() ], MultiSelect.prototype, "customValueSelection", void 0), 
        MultiSelect = __decorate$58([ NotifyPropertyChanges ], MultiSelect);
    }(DropDownBase), CheckBoxSelection$1 = function() {
        function CheckBoxSelection(parent) {
            this.activeLi = [], this.activeEle = [], this.parent = parent, this.addEventListener();
        }
        return CheckBoxSelection.prototype.getModuleName = function() {
            return "CheckBoxSelection";
        }, CheckBoxSelection.prototype.addEventListener = function() {
            this.parent.isDestroyed || (this.parent.on("updatelist", this.listSelection, this), 
            this.parent.on("listoption", this.listOption, this), this.parent.on("selectAll", this.setSelectAll, this), 
            this.parent.on("checkSelectAll", this.checkSelectAll, this), this.parent.on("searchBox", this.setSearchBox, this), 
            this.parent.on("blur", this.onBlur, this), this.parent.on("targetElement", this.targetElement, this), 
            this.parent.on("deviceSearchBox", this.setDeviceSearchBox, this), this.parent.on("inputFocus", this.getFocus, this), 
            this.parent.on("reOrder", this.setReorder, this), this.parent.on("activeList", this.getActiveList, this), 
            this.parent.on("selectAllText", this.setLocale, this), this.parent.on("filterBarPlaceholder", this.setPlaceholder, this), 
            EventHandler.add(document, "mousedown", this.onDocumentClick, this));
        }, CheckBoxSelection.prototype.removeEventListener = function() {
            this.parent.isDestroyed || (this.parent.off("updatelist", this.listSelection), this.parent.off("listoption", this.listOption), 
            this.parent.off("selectAll", this.setSelectAll), this.parent.off("checkSelectAll", this.checkSelectAll), 
            this.parent.off("searchBox", this.setSearchBox), this.parent.off("blur", this.onBlur), 
            this.parent.off("targetElement", this.targetElement), this.parent.off("deviceSearchBox", this.setDeviceSearchBox), 
            this.parent.off("inputFocus", this.getFocus), this.parent.off("reOrder", this.setReorder), 
            this.parent.off("activeList", this.getActiveList), this.parent.off("selectAllText", this.setLocale), 
            this.parent.off("filterBarPlaceholder", this.setPlaceholder), EventHandler.remove(document, "mousedown", this.onDocumentClick));
        }, CheckBoxSelection.prototype.listOption = function(args) {
            var _this = this;
            if (isNullOrUndefined(this.parent.listCurrentOptions.itemCreated)) this.parent.listCurrentOptions.itemCreated = function(e) {
                _this.checboxCreate(e);
            }; else {
                var itemCreated_1 = this.parent.listCurrentOptions.itemCreated;
                this.parent.listCurrentOptions.itemCreated = function(e) {
                    _this.checboxCreate(e), itemCreated_1.apply(_this, [ e ]);
                };
            }
        }, CheckBoxSelection.prototype.setPlaceholder = function(props) {
            Input.setPlaceholder(props.filterBarPlaceholder, this.filterInput);
        }, CheckBoxSelection.prototype.checboxCreate = function(e) {
            var item;
            if ("e-list-group-item " !== (item = isNullOrUndefined(e.item) ? e : e.item).className && "e-list-group-item" !== item.className) {
                var checkboxEle = createCheckBox(!0), icon = select("div.e-icons", item);
                item.getAttribute("data-uid");
                item.insertBefore(checkboxEle, item.childNodes[isNullOrUndefined(icon) ? 0 : 1]), 
                select(".e-frame", checkboxEle);
                select(".e-frame", checkboxEle);
                return item;
            }
            return item;
        }, CheckBoxSelection.prototype.setSelectAll = function() {
            this.parent.showSelectAll ? (isNullOrUndefined(this.checkAllParent) && (this.checkAllParent = createElement("div", {
                className: "e-selectall-parent"
            }), this.selectAllSpan = createElement("span", {
                className: "e-all-text"
            }), this.selectAllSpan.textContent = "", this.checkAllParent.appendChild(this.selectAllSpan), 
            this.setLocale(), this.checboxCreate(this.checkAllParent), this.parent.headerTemplate && (isNullOrUndefined(this.filterParent) ? append([ this.checkAllParent ], this.parent.popupWrapper) : append([ this.checkAllParent ], this.filterParent)), 
            this.parent.headerTemplate || (isNullOrUndefined(this.filterParent) ? prepend([ this.checkAllParent ], this.parent.popupWrapper) : append([ this.checkAllParent ], this.filterParent)), 
            EventHandler.add(this.checkAllParent, "mousedown", this.clickHandler, this)), this.parent.list.classList.contains("e-nodata") ? this.checkAllParent.style.display = "none" : this.checkAllParent.style.display = "block", 
            this.parent.selectAllHeight = this.checkAllParent.getBoundingClientRect().height) : isNullOrUndefined(this.checkAllParent) || (this.checkAllParent.parentElement.removeChild(this.checkAllParent), 
            this.checkAllParent = null);
        }, CheckBoxSelection.prototype.destroy = function() {
            this.removeEventListener();
        }, CheckBoxSelection.prototype.listSelection = function(args) {
            var target;
            if (target = isNullOrUndefined(args.e) ? args.li.lastElementChild.childNodes[1] : isNullOrUndefined(args.e.target) ? args.li.querySelector(".e-checkbox-wrapper").childNodes[1] : args.e.target.classList.contains("e-frame") ? args.e.target : args.li.querySelector(".e-checkbox-wrapper").childNodes[1], 
            this.parent.itemTemplate && (target = args.li.firstElementChild.childNodes[1]), 
            this.checkWrapper = closest(target, ".e-checkbox-wrapper"), !isNullOrUndefined(this.checkWrapper)) {
                var checkElement = select(".e-frame", this.checkWrapper);
                this.validateCheckNode(this.checkWrapper, checkElement.classList.contains("e-check"), args.li, args.e, !1);
            }
        }, CheckBoxSelection.prototype.validateCheckNode = function(checkWrap, isCheck, li, e, selectAll$$1) {
            this.changeState(checkWrap, isCheck ? "uncheck" : "check", e, !0, selectAll$$1);
        }, CheckBoxSelection.prototype.clickHandler = function(e) {
            var target;
            target = e.currentTarget.classList.contains(this.checkAllParent.className) ? e.currentTarget.firstElementChild.lastElementChild : e.currentTarget, 
            this.checkWrapper = closest(target, ".e-checkbox-wrapper");
            if (!isNullOrUndefined(this.checkWrapper)) {
                var checkElement = select(".e-frame", this.checkWrapper);
                this.validateCheckNode(this.checkWrapper, checkElement.classList.contains("e-check"), null, e, !0);
            }
            e.preventDefault();
        }, CheckBoxSelection.prototype.changeState = function(wrapper, state, e, isPrevent, selectAll$$1) {
            var ariaState, frameSpan = wrapper.getElementsByClassName("e-frame")[0];
            "check" !== state || frameSpan.classList.contains("e-check") ? "uncheck" === state && (frameSpan.classList.contains("e-check") || frameSpan.classList.contains("e-stop")) && (removeClass([ frameSpan ], [ "e-check", "e-stop" ]), 
            ariaState = "false", selectAll$$1 && (this.parent.selectAll(!1), this.setLocale())) : (frameSpan.classList.remove("e-stop"), 
            frameSpan.classList.add("e-check"), ariaState = "true", selectAll$$1 && (this.parent.selectAll(!0), 
            this.setLocale(!0))), isNullOrUndefined(ariaState = "check" === state ? "true" : "uncheck" === state ? "false" : ariaState) || wrapper.setAttribute("aria-checked", ariaState);
        }, CheckBoxSelection.prototype.setSearchBox = function(args) {
            if (isNullOrUndefined(this.filterParent)) {
                this.filterParent = createElement("span", {
                    className: "e-filter-parent"
                }), this.filterInput = createElement("input", {
                    attrs: {
                        type: "text"
                    },
                    className: "e-input-filter"
                }), this.parent.element.parentNode.insertBefore(this.filterInput, this.parent.element);
                var backIcon = !1;
                return Browser.isDevice && (backIcon = !0, this.parent.mobFilter = !1), this.filterInputObj = Input.createInput({
                    element: this.filterInput,
                    buttons: backIcon ? [ "e-input-group-icon e-back-icon e-icons", "e-input-group-icon e-clear-icon e-icons" ] : [ "e-input-group-icon e-clear-icon e-icons" ],
                    properties: {
                        placeholder: this.parent.filterBarPlaceholder
                    }
                }), append([ this.filterInputObj.container ], this.filterParent), prepend([ this.filterParent ], args.popupElement), 
                attributes(this.filterInput, {
                    "aria-disabled": "false",
                    "aria-owns": this.parent.element.id + "_options",
                    role: "listbox",
                    "aria-activedescendant": null,
                    autocomplete: "off",
                    autocorrect: "off",
                    autocapitalize: "off",
                    spellcheck: "false"
                }), this.clearIconElement = this.filterInput.parentElement.querySelector(".e-clear-icon"), 
                !Browser.isDevice && this.clearIconElement && (EventHandler.add(this.clearIconElement, "mousedown", this.clearText, this), 
                this.clearIconElement.style.visibility = "hidden"), EventHandler.add(this.filterInput, "input", this.parent.onInput, this.parent), 
                EventHandler.add(this.filterInput, "keyup", this.parent.KeyUp, this.parent), EventHandler.add(this.filterInput, "keydown", this.parent.onKeyDown, this.parent), 
                EventHandler.add(this.filterInput, "blur", this.onBlur, this), this.parent.searchBoxHeight = this.filterInputObj.container.parentElement.getBoundingClientRect().height, 
                this.filterInputObj;
            }
        }, CheckBoxSelection.prototype.clickOnBackIcon = function(e) {
            this.parent.hidePopup(), removeClass([ document.body, this.parent.popupObj.element ], "e-popup-full-page");
        }, CheckBoxSelection.prototype.clearText = function(e) {
            this.parent.targetInputElement.value = "", this.parent.refreshPopup(), this.parent.refreshListItems(null), 
            this.clearIconElement.style.visibility = "hidden", this.filterInput.focus(), this.setReorder(e), 
            e.preventDefault();
        }, CheckBoxSelection.prototype.setDeviceSearchBox = function() {
            this.parent.popupObj.element.classList.add("e-ddl-device"), this.parent.popupObj.element.classList.add("e-ddl-device-filter"), 
            this.parent.popupObj.position = {
                X: 0,
                Y: 0
            }, this.parent.popupObj.dataBind(), attributes(this.parent.popupObj.element, {
                style: "left:0px;right:0px;top:0px;bottom:0px;"
            }), addClass([ document.body, this.parent.popupObj.element ], "e-popup-full-page"), 
            this.setSearchBoxPosition(), this.backIconElement = this.filterInputObj.container.querySelector(".e-back-icon"), 
            this.clearIconElement = this.filterInputObj.container.querySelector(".e-clear-icon"), 
            this.clearIconElement.style.visibility = "hidden", EventHandler.add(this.backIconElement, "click", this.clickOnBackIcon, this), 
            EventHandler.add(this.clearIconElement, "click", this.clearText, this);
        }, CheckBoxSelection.prototype.setSearchBoxPosition = function() {
            var searchBoxHeight = this.filterInput.parentElement.getBoundingClientRect().height;
            this.parent.popupObj.element.style.maxHeight = "100%", this.parent.popupObj.element.style.width = "100%", 
            this.parent.list.style.maxHeight = window.innerHeight - searchBoxHeight + "px", 
            this.parent.list.style.height = window.innerHeight - searchBoxHeight + "px";
            var clearElement = this.filterInput.parentElement.querySelector(".e-clear-icon");
            detach(this.filterInput), clearElement.parentElement.insertBefore(this.filterInput, clearElement);
        }, CheckBoxSelection.prototype.targetElement = function() {
            return this.parent.targetInputElement = this.filterInput, this.clearIconElement.style.visibility = "" === this.parent.targetInputElement.value ? "hidden" : "visible", 
            this.parent.targetInputElement.value;
        }, CheckBoxSelection.prototype.onBlur = function(e) {
            var target;
            if (Browser.isIE && (target = !isNullOrUndefined(e) && e.target), Browser.isIE || (target = !isNullOrUndefined(e) && e.relatedTarget), 
            document.body.contains(this.parent.popupObj.element) && this.parent.popupObj.element.contains(target) && !Browser.isIE) this.filterInput.focus(); else {
                if (this.parent.scrollFocusStatus) return e.preventDefault(), this.filterInput.focus(), 
                void (this.parent.scrollFocusStatus = !1);
                document.body.contains(this.parent.popupObj.element) && !this.parent.popupObj.element.classList.contains("e-popup-close") && (this.parent.inputFocus = !1, 
                this.parent.updateValueState(e, this.parent.value, this.parent.tempValues), this.parent.dispatchEvent(this.parent.hiddenElement, "change")), 
                document.body.contains(this.parent.popupObj.element) && !this.parent.popupObj.element.classList.contains("e-popup-close") && (this.parent.inputFocus = !1, 
                this.parent.overAllWrapper.classList.remove("e-input-focus"), this.parent.trigger("blur"), 
                this.parent.focused = !0), !document.body.contains(this.parent.popupObj.element) || this.parent.popupObj.element.classList.contains("e-popup-close") || Browser.isDevice || this.parent.hidePopup();
            }
        }, CheckBoxSelection.prototype.onDocumentClick = function(e) {
            var target = e.target;
            closest(target, "#" + this.parent.popupObj.element.id) && e.preventDefault(), !isNullOrUndefined(this.parent.popupObj) && closest(target, "#" + this.parent.popupObj.element.id) || this.parent.overAllWrapper.contains(e.target) ? this.parent.scrollFocusStatus = (Browser.isIE || "edge" === Browser.info.name) && document.activeElement === this.filterInput : (this.parent.overAllWrapper.classList.contains(dropDownBaseClasses.focus) || this.parent.isPopupOpen()) && (this.parent.inputFocus = !1, 
            this.parent.hidePopup(), this.parent.onBlur(), this.parent.focused = !0), this.parent.overAllWrapper.contains(e.target) || !this.parent.overAllWrapper.classList.contains("e-input-focus") || this.parent.isPopupOpen() || this.parent.onBlur(e);
        }, CheckBoxSelection.prototype.getFocus = function(e) {
            this.parent.overAllWrapper.classList.remove("e-input-focus"), "focus" === e.value && this.filterInput.focus(), 
            "clear" === e.value && (this.filterInput.value = "", this.clearIconElement.style.visibility = "hidden");
        }, CheckBoxSelection.prototype.checkSelectAll = function(e) {
            "check" === e.value && "true" !== this.checkAllParent.getAttribute("aria-checked") && (this.changeState(this.checkAllParent, e.value, null, null, !1), 
            this.setLocale(!0)), "uncheck" === e.value && (this.changeState(this.checkAllParent, e.value, null, null, !1), 
            this.setLocale());
        }, CheckBoxSelection.prototype.setLocale = function(unSelect) {
            if ("Select All" !== this.parent.selectAllText || "Unselect All" !== this.parent.unSelectAllText) {
                var template = unSelect ? this.parent.unSelectAllText : this.parent.selectAllText;
                this.selectAllSpan.textContent = "";
                for (var _i = 0, _a = compile$$1(template)({}); _i < _a.length; _i++) {
                    var item = _a[_i];
                    this.selectAllSpan.textContent = item.textContent;
                }
            } else {
                var l10n = new L10n("dropdowns", {
                    selectAllText: "Select All",
                    unSelectAllText: "Unselect All"
                }, this.parent.locale);
                this.selectAllSpan.textContent = unSelect ? l10n.getConstant("unSelectAllText") : l10n.getConstant("selectAllText");
            }
        }, CheckBoxSelection.prototype.getActiveList = function(args) {
            args.li.classList.contains("e-active") ? this.activeLi.push(args.li.cloneNode(!0)) : this.activeLi.splice(args.index, 1);
        }, CheckBoxSelection.prototype.setReorder = function(args) {
            if (this.parent.enableSelectionOrder && !isNullOrUndefined(this.parent.value)) {
                var activeLiCount = this.parent.ulElement.querySelectorAll("li.e-active").length, ulEle = createElement("ul", {
                    className: "e-list-parent e-ul e-reorder"
                });
                createElement("div");
                activeLiCount > 0 && (append(this.parent.ulElement.querySelectorAll("li.e-active"), ulEle), 
                addClass(this.parent.ulElement.querySelectorAll("li.e-active"), "e-reorder-hide"), 
                prepend([ ulEle ], this.parent.list)), this.parent.focusAtFirstListItem();
            }
        }, CheckBoxSelection;
    }(), ICON$8 = "e-icons", TABLE_CONTAINER_CLASS = "e-table-container", APPOINTMENT_CLASS = "e-appointment", EVENT_TOOLTIP_ROOT_CLASS = "e-schedule-event-tooltip", HeaderRenderer = function() {
        function HeaderRenderer(parent) {
            this.parent = parent, this.l10n = this.parent.localeObj, this.renderHeader(), this.addEventListener();
        }
        return HeaderRenderer.prototype.addEventListener = function() {
            this.parent.on("document-click", this.closeHeaderPopup, this);
        }, HeaderRenderer.prototype.removeEventListener = function() {
            this.parent.off("document-click", this.closeHeaderPopup);
        }, HeaderRenderer.prototype.closeHeaderPopup = function(e) {
            isNullOrUndefined(closest(e.event.target, ".e-date-range,.e-header-popup,.e-day,.e-selected")) && this.hideHeaderPopup();
        }, HeaderRenderer.prototype.hideHeaderPopup = function() {
            this.headerPopup && this.headerPopup.hide();
        }, HeaderRenderer.prototype.renderHeader = function() {
            this.element = createElement("div", {
                className: "e-schedule-toolbar-container"
            });
            var toolbarEle = createElement("div", {
                className: "e-schedule-toolbar"
            });
            this.element.appendChild(toolbarEle), this.parent.element.insertBefore(this.element, this.parent.element.firstElementChild), 
            this.renderToolbar();
        }, HeaderRenderer.prototype.renderToolbar = function() {
            var items = this.getItems(), args = extend({}, {
                requestType: "toolbarItemRendering",
                items: items
            });
            this.parent.trigger("actionBegin", args), this.toolbarObj = new Toolbar$1({
                items: items,
                overflowMode: "Popup",
                clicked: this.toolbarClickHandler.bind(this),
                enableRtl: this.parent.enableRtl,
                locale: this.parent.locale
            }), this.toolbarObj.appendTo(this.parent.element.querySelector(".e-schedule-toolbar")), 
            this.updateActiveView(), this.parent.trigger("actionComplete", {
                requestType: "toolBarItemRendered",
                items: items
            });
        }, HeaderRenderer.prototype.updateItems = function() {
            if (this.toolbarObj) {
                var items = this.getItems();
                this.parent.trigger("actionBegin", {
                    requestType: "toolbarItemRendering",
                    items: items
                }), this.toolbarObj.items = items, this.toolbarObj.dataBind(), this.parent.trigger("actionComplete", {
                    requestType: "toolBarItemRendered",
                    items: items
                });
            }
        }, HeaderRenderer.prototype.getPopUpRelativeElement = function() {
            return this.parent.isAdaptive ? this.toolbarObj.element : this.element.querySelector(".e-date-range");
        }, HeaderRenderer.prototype.setDayOfWeek = function(index) {
            this.headerCalendar && (this.headerCalendar.firstDayOfWeek = index, this.headerCalendar.dataBind());
        }, HeaderRenderer.prototype.setCalendarDate = function(date) {
            this.headerCalendar && (this.headerCalendar.value = date, this.headerCalendar.dataBind());
        }, HeaderRenderer.prototype.getCalendarView = function() {
            return "Month" === this.parent.currentView || "MonthAgenda" === this.parent.currentView ? "Year" : "Month";
        }, HeaderRenderer.prototype.setCalendarView = function() {
            if (this.headerCalendar) {
                var calendarView = this.getCalendarView();
                this.headerCalendar.depth = calendarView, this.headerCalendar.start = calendarView, 
                this.headerCalendar.refresh();
            }
        }, HeaderRenderer.prototype.setRtl = function(isRtl) {
            this.headerPopup && (this.headerPopup.enableRtl = isRtl, this.headerPopup.dataBind()), 
            this.headerCalendar && (this.headerCalendar.enableRtl = isRtl, this.headerCalendar.dataBind()), 
            this.toolbarObj.enableRtl = isRtl, this.toolbarObj.dataBind();
        }, HeaderRenderer.prototype.updateActiveView = function() {
            var currentViewCls = ".e-" + this.parent.currentView.replace(/([a-z])([A-Z])/g, "$1-$2").toLowerCase();
            removeClass(this.toolbarObj.element.querySelectorAll(".e-active-view"), [ "e-active-view" ]), 
            addClass(this.toolbarObj.element.querySelectorAll(currentViewCls), [ "e-active-view" ]);
        }, HeaderRenderer.prototype.updateDateRange = function(text) {
            void 0 === text && (text = this.getDateRangeText());
            var selEle = this.toolbarObj.element.querySelector(".e-date-range");
            selEle.setAttribute("aria-label", text), selEle.querySelector(".e-tbar-btn-text").innerHTML = text;
        }, HeaderRenderer.prototype.getDateRangeText = function() {
            return this.parent.globalize.formatDate(this.parent.selectedDate, {
                format: "MMMM y"
            });
        }, HeaderRenderer.prototype.getItems = function() {
            var items = [], showInPopup = this.parent.isAdaptive;
            if (items.push({
                align: "Left",
                prefixIcon: "e-icon-prev",
                tooltipText: "Previous",
                overflow: "Show",
                cssClass: "e-prev",
                htmlAttributes: {
                    "aria-label": "previous period"
                }
            }), items.push({
                align: "Left",
                prefixIcon: "e-icon-next",
                tooltipText: "Next",
                overflow: "Show",
                cssClass: "e-next",
                htmlAttributes: {
                    "aria-label": "next period"
                }
            }), items.push({
                align: "Left",
                text: this.getDateRangeText(),
                suffixIcon: "e-icon-down-arrow",
                cssClass: "e-date-range",
                overflow: "Show",
                htmlAttributes: {
                    "aria-atomic": "true",
                    "aria-live": "assertive",
                    "aria-label": "title"
                }
            }), this.parent.isAdaptive ? (items.push({
                align: "Right",
                showAlwaysInPopup: showInPopup,
                prefixIcon: "e-icon-add",
                text: this.l10n.getConstant("newEvent"),
                cssClass: "e-add",
                overflow: "Show"
            }), items.push({
                align: "Right",
                showAlwaysInPopup: showInPopup,
                prefixIcon: "e-icon-today",
                text: this.l10n.getConstant("today"),
                cssClass: "e-today",
                overflow: "Show"
            })) : (items.push({
                align: "Right",
                showAlwaysInPopup: showInPopup,
                prefixIcon: "e-icon-day",
                text: this.l10n.getConstant("today"),
                cssClass: "e-today",
                overflow: "Show"
            }), this.parent.views.length > 1 && items.push({
                align: "Right",
                type: "Separator",
                cssClass: "e-schedule-seperator"
            })), this.parent.views.length > 1) for (var _i = 0, _a = this.parent.views; _i < _a.length; _i++) {
                var item = _a[_i];
                "string" == typeof item ? items.push(this.getItemObject(item.toLowerCase())) : items.push(this.getItemObject(item.option.toLowerCase()));
            }
            return items;
        }, HeaderRenderer.prototype.getItemObject = function(viewName) {
            var view, showInPopup = this.parent.isAdaptive;
            switch (viewName) {
              case "day":
                view = {
                    align: "Right",
                    showAlwaysInPopup: showInPopup,
                    prefixIcon: "e-icon-day",
                    text: this.l10n.getConstant("day"),
                    cssClass: "e-day"
                };
                break;

              case "week":
                view = {
                    align: "Right",
                    showAlwaysInPopup: showInPopup,
                    prefixIcon: "e-icon-week",
                    text: this.l10n.getConstant("week"),
                    cssClass: "e-week"
                };
                break;

              case "workweek":
                view = {
                    align: "Right",
                    showAlwaysInPopup: showInPopup,
                    prefixIcon: "e-icon-workweek",
                    text: this.l10n.getConstant("workWeek"),
                    cssClass: "e-work-week"
                };
                break;

              case "month":
                view = {
                    align: "Right",
                    showAlwaysInPopup: showInPopup,
                    prefixIcon: "e-icon-month",
                    text: this.l10n.getConstant("month"),
                    cssClass: "e-month"
                };
                break;

              case "agenda":
                view = {
                    align: "Right",
                    showAlwaysInPopup: showInPopup,
                    prefixIcon: "e-icon-agenda",
                    text: this.l10n.getConstant("agenda"),
                    cssClass: "e-agenda"
                };
                break;

              case "monthagenda":
                view = {
                    align: "Right",
                    showAlwaysInPopup: showInPopup,
                    prefixIcon: "e-icon-month-agenda",
                    text: this.l10n.getConstant("monthAgenda"),
                    cssClass: "e-month-agenda"
                };
            }
            return view;
        }, HeaderRenderer.prototype.renderHeaderPopup = function() {
            var headerPopupEle = createElement("div", {
                className: "e-header-popup"
            }), headerCalendarEle = createElement("div", {
                className: "e-header-calendar"
            });
            headerPopupEle.appendChild(headerCalendarEle), this.element.appendChild(headerPopupEle), 
            this.headerPopup = new Popup(headerPopupEle, {
                actionOnScroll: "hide",
                targetType: "relative",
                relateTo: this.getPopUpRelativeElement(),
                position: {
                    X: "left",
                    Y: "bottom"
                },
                enableRtl: this.parent.enableRtl
            });
            var calendarView = this.getCalendarView();
            this.headerCalendar = new Calendar$1({
                value: this.parent.selectedDate,
                firstDayOfWeek: this.parent.firstDayOfWeek,
                enableRtl: this.parent.enableRtl,
                locale: this.parent.locale,
                depth: calendarView,
                start: calendarView,
                change: this.calendarChange.bind(this)
            }), this.headerCalendar.appendTo(headerCalendarEle), this.headerPopup.hide();
        }, HeaderRenderer.prototype.calendarChange = function(args) {
            args.value.getTime() !== this.parent.selectedDate.getTime() && this.parent.changeDate(args.value), 
            this.headerPopup.hide();
        }, HeaderRenderer.prototype.toolbarClickHandler = function(args) {
            if (args.item) {
                switch (args.item.cssClass) {
                  case "e-date-range":
                    this.headerPopup || this.renderHeaderPopup(), this.headerPopup.element.classList.contains("e-popup-open") ? this.headerPopup.hide() : this.headerPopup.show();
                    break;

                  case "e-day":
                    this.parent.changeView("Day", args.originalEvent);
                    break;

                  case "e-week":
                    this.parent.changeView("Week", args.originalEvent);
                    break;

                  case "e-work-week":
                    this.parent.changeView("WorkWeek", args.originalEvent);
                    break;

                  case "e-month":
                    this.parent.changeView("Month", args.originalEvent);
                    break;

                  case "e-agenda":
                    this.parent.changeView("Agenda", args.originalEvent);
                    break;

                  case "e-month-agenda":
                    this.parent.changeView("MonthAgenda", args.originalEvent);
                    break;

                  case "e-today":
                    this.parent.isSelectedDate(resetTime(new Date())) || this.parent.changeDate(resetTime(new Date()), args.originalEvent);
                    break;

                  case "e-prev":
                    this.parent.changeDate(this.parent.activeView.getNextPreviousDate("previous"), args.originalEvent);
                    break;

                  case "e-next":
                    this.parent.changeDate(this.parent.activeView.getNextPreviousDate("next"), args.originalEvent);
                    break;

                  case "e-add":
                    var data = void 0;
                    if (this.parent.activeCellsData) data = this.parent.activeCellsData; else {
                        var today = new Date(), startTime = new Date(this.parent.selectedDate.getTime());
                        startTime.setHours(today.getHours(), 18e5 * Math.round(startTime.getMinutes() / 18e5), 0);
                        data = extend({
                            startTime: startTime,
                            endTime: new Date(new Date(startTime.getTime()).setMilliseconds(startTime.getMilliseconds() + 18e5)),
                            isAllDay: !1
                        }, {
                            cancel: !1,
                            event: args.originalEvent
                        });
                    }
                    this.parent.eventWindow.openEditor(data, "Add");
                }
                var toolbarPopUp = this.toolbarObj.element.querySelector(".e-toolbar-pop");
                toolbarPopUp && toolbarPopUp.ej2_instances[0].hide({
                    name: "SlideUp",
                    duration: 100
                });
            }
        }, HeaderRenderer.prototype.getHeaderElement = function() {
            return this.element;
        }, HeaderRenderer.prototype.getModuleName = function() {
            return "headerbar";
        }, HeaderRenderer.prototype.destroy = function() {
            this.toolbarObj.isDestroyed || (this.toolbarObj.destroy(), this.removeEventListener(), 
            remove(this.element));
        }, HeaderRenderer;
    }(), Scroll$1 = function() {
        function Scroll(parent) {
            this.parent = parent, this.addEventListener();
        }
        return Scroll.prototype.getModuleName = function() {
            return "scroll";
        }, Scroll.prototype.setWidth = function() {
            this.parent.element.style.width = formatUnit(this.parent.width);
        }, Scroll.prototype.setHeight = function() {
            this.parent.element.style.height = formatUnit(this.parent.height);
        }, Scroll.prototype.addEventListener = function() {
            this.parent.on("content-ready", this.setDimensions, this), this.parent.on("ui-update", this.onPropertyChanged, this);
        }, Scroll.prototype.removeEventListener = function() {
            this.parent.off("content-ready", this.setDimensions), this.parent.off("ui-update", this.onPropertyChanged);
        }, Scroll.prototype.setDimensions = function() {
            this.setWidth(), this.setHeight();
            var data = {
                cssProperties: this.getCssProperties(this.parent.enableRtl),
                module: this.getModuleName()
            };
            this.parent.notify("scroll-ui-update", data);
        }, Scroll.prototype.getCssProperties = function(enableRtl$$1) {
            var css = {};
            return css.border = enableRtl$$1 ? "borderLeftWidth" : "borderRightWidth", css.padding = enableRtl$$1 ? "paddingLeft" : "paddingRight", 
            css;
        }, Scroll.prototype.onPropertyChanged = function(e) {
            this.setDimensions();
        }, Scroll.prototype.destroy = function() {
            this.removeEventListener();
        }, Scroll;
    }(), ScheduleTouch = function() {
        function ScheduleTouch(parent) {
            this.parent = parent, this.element = this.parent.element.querySelector("." + TABLE_CONTAINER_CLASS), 
            this.touchObj = new Touch(this.element, {
                scroll: this.scrollHandler.bind(this),
                swipe: this.swipeHandler.bind(this),
                tapHold: this.tapHoldHandler.bind(this),
                swipeSettings: {
                    swipeThresholdDistance: 1
                }
            }), EventHandler.add(this.element, "transitionend", this.onTransitionEnd, this), 
            this.touchLeftDirection = this.parent.enableRtl ? "Right" : "Left", this.touchRightDirection = this.parent.enableRtl ? "Left" : "Right";
        }
        return ScheduleTouch.prototype.scrollHandler = function(e) {
            if ("Agenda" !== this.parent.currentView && (!e.originalEvent || isNullOrUndefined(closest(e.originalEvent.target, ".e-appointment-wrap")))) {
                if (this.timeStampStart || (this.timeStampStart = Date.now()), this.element.classList.contains("e-translate") && this.onTransitionEnd(), 
                "Left" === e.scrollDirection || "Right" === e.scrollDirection) {
                    var args = {
                        requestType: "dateNavigate",
                        cancel: !1,
                        event: e.originalEvent
                    };
                    if (this.parent.trigger("actionBegin", args), args.cancel) return;
                    var scrollDiv = this.element.querySelector(".e-content-wrap");
                    if (scrollDiv && scrollDiv.scrollWidth > scrollDiv.clientWidth) return;
                    this.isScrollTriggered = !0, e.originalEvent.preventDefault(), e.originalEvent.stopPropagation();
                }
                if (e.scrollDirection === this.touchLeftDirection) {
                    this.nextPanel || (this.renderPanel("e-next-panel", "next"), this.nextPanel = {
                        element: this.parent.activeView.getPanel(),
                        selectedDate: new Date(this.parent.selectedDate.getTime())
                    }, this.setDimensions(this.nextPanel.element));
                    var x = this.parent.enableRtl ? e.distanceX : -e.distanceX;
                    this.element.style.transform = "translatex(" + (this.getTranslateX(this.element) + x) + "px)";
                } else if (e.scrollDirection === this.touchRightDirection) {
                    var prevWidth = 0;
                    this.previousPanel || (this.renderPanel("e-previous-panel", "previous"), this.previousPanel = {
                        element: this.parent.activeView.getPanel(),
                        selectedDate: new Date(this.parent.selectedDate.getTime())
                    }, this.setDimensions(this.previousPanel.element), prevWidth = this.previousPanel.element.offsetWidth);
                    x = this.parent.enableRtl ? prevWidth - e.distanceX : -prevWidth + e.distanceX;
                    this.element.style.transform = "translatex(" + (this.getTranslateX(this.element) + x) + "px)";
                }
            }
        }, ScheduleTouch.prototype.swipeHandler = function(e) {
            if (this.isScrollTriggered) {
                if (this.isScrollTriggered = !1, "Left" === e.swipeDirection || "Right" === e.swipeDirection) {
                    var time = Date.now() - this.timeStampStart, offsetDist = 1.66 * e.distanceX;
                    offsetDist > time || e.distanceX > this.parent.element.offsetWidth / 2 ? (this.swapPanels(e.swipeDirection), 
                    offsetDist > time && e.distanceX > this.parent.element.offsetWidth / 2 && (this.element.style.transitionDuration = offsetDist / time / 10 + "s"), 
                    this.confirmSwipe(e.swipeDirection)) : this.cancelSwipe();
                    var args = {
                        requestType: "dateNavigate",
                        cancel: !1,
                        event: e.originalEvent
                    };
                    this.parent.trigger("actionComplete", args);
                } else this.cancelSwipe();
                this.timeStampStart = null;
            }
        }, ScheduleTouch.prototype.tapHoldHandler = function(e) {
            var target = closest(e.originalEvent.target, "." + APPOINTMENT_CLASS);
            {
                if (isNullOrUndefined(target)) return target = closest(e.originalEvent.target, ".e-work-cells") || closest(e.originalEvent.target, ".e-all-day-cells") || closest(e.originalEvent.target, ".e-header-cells"), 
                isNullOrUndefined(target) ? void 0 : (this.parent.activeCellsData = this.parent.getCellDetails(target), 
                void this.parent.eventWindow.openEditor(this.parent.activeCellsData, "Add"));
                this.parent.quickPopup.eventHold(e.originalEvent);
            }
        }, ScheduleTouch.prototype.renderPanel = function(clsName, nextPrevType) {
            this.currentPanel ? this.parent.setProperties({
                selectedDate: this.currentPanel.selectedDate
            }, !0) : (this.currentPanel = {
                element: this.parent.activeView.getPanel(),
                selectedDate: new Date(this.parent.selectedDate.getTime())
            }, this.setDimensions(this.currentPanel.element)), this.parent.setProperties({
                selectedDate: this.parent.activeView.getNextPreviousDate(nextPrevType)
            }, !0), this.parent.activeView.getRenderDates(), this.parent.activeView.renderLayout(clsName);
        }, ScheduleTouch.prototype.swapPanels = function(direction) {
            if (direction === this.touchLeftDirection) {
                var temp = this.nextPanel;
                this.nextPanel = this.currentPanel, this.currentPanel = temp;
            } else {
                temp = this.previousPanel;
                this.previousPanel = this.currentPanel, this.currentPanel = temp;
            }
        }, ScheduleTouch.prototype.confirmSwipe = function(swipeDirection) {
            var navArgs = {
                action: "date",
                cancel: !1,
                previousDate: swipeDirection === this.touchLeftDirection ? this.nextPanel.selectedDate : this.previousPanel.selectedDate,
                currentDate: this.currentPanel.selectedDate
            };
            if (this.parent.trigger("navigating", navArgs), navArgs.cancel) return this.swapPanels(swipeDirection), 
            void this.cancelSwipe();
            this.parent.activeView.setPanel(this.currentPanel.element), this.parent.setProperties({
                selectedDate: this.currentPanel.selectedDate
            }, !0);
            var translateX;
            translateX = this.parent.enableRtl ? swipeDirection === this.touchLeftDirection ? this.previousPanel ? this.previousPanel.element.offsetLeft : this.currentPanel.element.offsetWidth : 0 : swipeDirection === this.touchLeftDirection ? -this.currentPanel.element.offsetLeft : 0, 
            addClass([ this.element ], "e-translate"), this.element.style.transform = "translatex(" + translateX + "px)", 
            this.parent.headerModule && this.parent.headerModule.updateDateRange(this.parent.activeView.getDateRangeText()), 
            this.parent.renderModule.refreshDataManager();
        }, ScheduleTouch.prototype.cancelSwipe = function() {
            this.parent.activeView.setPanel(this.currentPanel.element), this.parent.setProperties({
                selectedDate: this.currentPanel.selectedDate
            }, !0), this.parent.activeView.getRenderDates(), addClass([ this.element ], "e-translate");
            var prevWidth = this.previousPanel ? this.previousPanel.element.offsetWidth : 0;
            this.element.style.transform = "translatex(" + (this.parent.enableRtl ? prevWidth : -this.currentPanel.element.offsetLeft) + "px)";
        }, ScheduleTouch.prototype.onTransitionEnd = function() {
            removeClass([ this.element ], "e-translate"), this.element.style.transitionDuration = "", 
            this.element.style.transform = "", this.previousPanel && (remove(this.previousPanel.element), 
            this.previousPanel = null, removeClass([ this.currentPanel.element ], "e-previous-panel"), 
            addClass([ this.currentPanel.element ], "e-current-panel")), this.nextPanel && (remove(this.nextPanel.element), 
            this.nextPanel = null, removeClass([ this.currentPanel.element ], "e-next-panel"), 
            addClass([ this.currentPanel.element ], "e-current-panel")), this.currentPanel = null, 
            this.parent.activeView.getPanel().style.width = "";
        }, ScheduleTouch.prototype.getTranslateX = function(element) {
            var style = window.getComputedStyle(element);
            return new WebKitCSSMatrix(style.webkitTransform).m41;
        }, ScheduleTouch.prototype.setDimensions = function(element) {
            element.style.width = this.parent.element.clientWidth + "px";
        }, ScheduleTouch.prototype.resetValues = function() {
            this.currentPanel = null, this.previousPanel = null, this.nextPanel = null, this.timeStampStart = null, 
            this.element.style.transform = "", this.element.innerHTML = "", removeClass([ this.element ], "e-translate");
        }, ScheduleTouch.prototype.destroy = function() {
            this.touchObj.destroy(), EventHandler.remove(this.element, "transitionend", this.onTransitionEnd), 
            this.resetValues();
        }, ScheduleTouch;
    }(), KeyboardInteraction = function() {
        function KeyboardInteraction(parent) {
            this.selectedCells = [], this.keyConfigs = {
                downArrow: "downarrow",
                upArrow: "uparrow",
                rightArrow: "rightarrow",
                leftArrow: "leftarrow",
                shiftDownArrow: "shift+downarrow",
                shiftUpArrow: "shift+uparrow",
                shiftRightArrow: "shift+rightarrow",
                shiftLeftArrow: "shift+leftarrow",
                ctrlLeftArrow: "ctrl+leftarrow",
                ctrlRightArrow: "ctrl+rightarrow",
                altOne: "alt+1",
                altTwo: "alt+2",
                altThree: "alt+3",
                altFour: "alt+4",
                altFive: "alt+5",
                altSix: "alt+6",
                enter: "enter",
                escape: "escape",
                delete: "delete",
                home: "home",
                pageUp: "pageup",
                pageDown: "pagedown",
                tab: "tab",
                shiftTab: "shift+tab"
            }, this.parent = parent, this.parent.element.tabIndex = -1 === this.parent.element.tabIndex ? 0 : this.parent.element.tabIndex, 
            this.keyboardModule = new KeyboardEvents(this.parent.element, {
                keyAction: this.keyActionHandler.bind(this),
                keyConfigs: this.keyConfigs,
                eventName: "keydown"
            }), this.addEventListener();
        }
        return KeyboardInteraction.prototype.keyActionHandler = function(e) {
            switch (e.action) {
              case "downArrow":
              case "shiftDownArrow":
                this.processDown(e, e.shiftKey);
                break;

              case "upArrow":
              case "shiftUpArrow":
                this.processUp(e, e.shiftKey);
                break;

              case "leftArrow":
              case "shiftLeftArrow":
                this.processLeft(e, e.shiftKey);
                break;

              case "rightArrow":
              case "shiftRightArrow":
                this.processRight(e, e.shiftKey);
                break;

              case "ctrlLeftArrow":
                this.parent.changeDate(this.parent.activeView.getNextPreviousDate("previous"), e), 
                this.parent.headerModule && this.parent.headerModule.element.querySelector(".e-prev button").focus();
                break;

              case "ctrlRightArrow":
                this.parent.changeDate(this.parent.activeView.getNextPreviousDate("next"), e), this.parent.headerModule && this.parent.headerModule.element.querySelector(".e-next button").focus();
                break;

              case "altOne":
              case "altTwo":
              case "altThree":
              case "altFour":
              case "altFive":
              case "altSix":
                this.processViewNavigation(e);
                break;

              case "enter":
                this.processEnter(e);
                break;

              case "home":
                this.focusFirstCell();
                break;

              case "tab":
              case "shiftTab":
                this.processTab(e, e.shiftKey);
                break;

              case "delete":
                this.processDelete(e);
                break;

              case "escape":
                this.processEscape();
            }
        }, KeyboardInteraction.prototype.addEventListener = function() {
            this.parent.on("cell-mouse-down", this.onCellMouseDown, this);
        }, KeyboardInteraction.prototype.removeEventListener = function() {
            this.parent.off("cell-mouse-down", this.onCellMouseDown);
        }, KeyboardInteraction.prototype.onCellMouseDown = function(e) {
            if (!e.event.shiftKey && (this.initialTarget = e.event.target, !this.parent.activeViewOptions.readonly && "MonthAgenda" !== this.parent.currentView && (e.event.target.classList.contains("e-work-cells") && (EventHandler.add(this.parent.getContentTable(), "mousemove", this.onMouseSelection, this), 
            EventHandler.add(this.parent.getContentTable(), "mouseup", this.onMoveup, this)), 
            e.event.target.classList.contains("e-all-day-cells")))) {
                var allDayRow = this.parent.getAllDayRow();
                allDayRow && (EventHandler.add(allDayRow, "mousemove", this.onMouseSelection, this), 
                EventHandler.add(allDayRow, "mouseup", this.onMoveup, this));
            }
        }, KeyboardInteraction.prototype.onMouseSelection = function(e) {
            var target = closest(e.target, ".e-work-cells,.e-all-day-cells");
            target && this.selectCells(!0, target);
        }, KeyboardInteraction.prototype.onAppointmentSelection = function(e) {
            var target = closest(e.target, "." + APPOINTMENT_CLASS);
            this.parent.eventBase.getSelectedEventElements(target);
        }, KeyboardInteraction.prototype.onMoveup = function(e) {
            if (e.target.classList.contains("e-work-cells") && (EventHandler.remove(this.parent.getContentTable(), "mousemove", this.onMouseSelection), 
            EventHandler.remove(this.parent.getContentTable(), "mouseup", this.onMoveup)), e.target.classList.contains("e-all-day-cells")) {
                var allDayRow = this.parent.getAllDayRow();
                allDayRow && (EventHandler.remove(allDayRow, "mousemove", this.onMouseSelection), 
                EventHandler.remove(allDayRow, "mouseup", this.onMoveup));
            }
        }, KeyboardInteraction.prototype.processEnter = function(e) {
            var target = e.target;
            if (target.classList.contains("e-work-cells") || target.classList.contains("e-all-day-cells")) {
                if (this.selectedCells.length > 1) {
                    var start = this.parent.getCellDetails(this.selectedCells[0]), end = this.parent.getCellDetails(this.selectedCells[this.selectedCells.length - 1]);
                    start.endTime = end.endTime, start.element = target, this.parent.activeCellsData = start;
                } else this.parent.activeCellsData = this.parent.getCellDetails(target);
                var args = extend(this.parent.activeCellsData, {
                    cancel: !1,
                    event: e
                });
                this.parent.notify("cellClick", args);
            } else {
                if (!(target.classList.contains(APPOINTMENT_CLASS) || target.classList.contains("e-more-event-close") || target.classList.contains("e-all-day-appointment-section") || target.classList.contains("e-more-indicator"))) return target.classList.contains("e-header-date") ? (this.parent.setProperties({
                    selectedDate: new Date(parseInt(target.getAttribute("data-date"), 10))
                }, !0), this.parent.changeView("Day"), void this.processEscape()) : void 0;
                target.click();
            }
        }, KeyboardInteraction.prototype.getCells = function(isInverseTable, start, end) {
            var tableEle = this.parent.getContentTable(), cells = [].slice.call(tableEle.querySelectorAll("td")), maxRow = tableEle.rows.length, maxColumn = tableEle.rows[0].cells.length;
            if (start.classList.contains("e-all-day-cells")) {
                var allDayRow = this.parent.getAllDayRow();
                cells = [].slice.call(allDayRow.cells), maxRow = 1, maxColumn = allDayRow.cells.length;
            }
            var startIndex = cells.indexOf(start), endIndex = cells.indexOf(end), inverseCells = [];
            if (isInverseTable) {
                for (var i = 0; i < maxColumn; i++) for (var j = 0; j < maxRow; j++) inverseCells.push(cells[maxColumn * j + i]);
                startIndex = inverseCells.indexOf(start), endIndex = inverseCells.indexOf(end);
            }
            if (startIndex > endIndex) {
                var temp = startIndex;
                startIndex = endIndex, endIndex = temp;
            }
            return (isInverseTable ? inverseCells : cells).slice(startIndex, endIndex + 1);
        }, KeyboardInteraction.prototype.focusFirstCell = function() {
            if ("Agenda" === this.parent.currentView) {
                var focusCell = this.parent.getContentTable().querySelector(".e-agenda-cells");
                return focusCell.setAttribute("tabindex", "0"), void focusCell.focus();
            }
            this.parent.eventBase.removeSelectedAppointmentClass(), this.selectCells(!1, this.parent.getWorkCellElements()[0]);
        }, KeyboardInteraction.prototype.isInverseTableSelect = function() {
            return this.parent.activeView.isInverseTableSelect;
        }, KeyboardInteraction.prototype.selectCells = function(isMultiple, target) {
            if (this.parent.removeSelectedClass(), isMultiple) {
                var selectedCells = this.getCells(this.isInverseTableSelect(), this.initialTarget, target);
                this.selectedCells = selectedCells, selectedCells.length > 2 && !target.classList.contains("e-all-day-cells") && (selectedCells = selectedCells.concat(this.getAllDayCells(selectedCells))), 
                this.parent.addSelectedClass(selectedCells, target);
            } else this.initialTarget = target, this.selectedCells = [ target ], this.parent.addSelectedClass([ target ], target);
        }, KeyboardInteraction.prototype.selectAppointment = function(isReverse, target, isMoreEvent) {
            void 0 === isMoreEvent && (isMoreEvent = !1);
            var appointments;
            if (isMoreEvent) {
                var moreEventWrapper = this.parent.element.querySelector(".e-more-appointment-wrapper");
                appointments = [].slice.call(moreEventWrapper.children);
            } else appointments = this.getAppointmentElements();
            if (!(appointments.length < 0)) {
                this.parent.eventBase.removeSelectedAppointmentClass();
                var nextAppEle;
                if (target.classList.contains(APPOINTMENT_CLASS)) {
                    var targetIndex = appointments.indexOf(target);
                    nextAppEle = appointments[isReverse ? targetIndex - 1 : targetIndex + 1];
                } else nextAppEle = isReverse ? appointments[appointments.length - 1] : appointments[0];
                nextAppEle && (this.parent.eventBase.addSelectedAppointments([ nextAppEle ], nextAppEle), 
                nextAppEle.focus());
            }
        }, KeyboardInteraction.prototype.selectAppointmentElementFromWorkCell = function(isReverse, target) {
            var _this = this;
            if (this.parent.eventBase.removeSelectedAppointmentClass(), this.parent.removeSelectedClass(), 
            target.classList.contains("e-work-cells") || target.classList.contains("e-all-day-cells")) {
                var appointmentElements_1 = this.getUniqueAppointmentElements(), filteredElements_1 = [], selectedDate_1 = parseInt(target.getAttribute("data-date"), 10);
                if (this.parent.eventsProcessed.filter(function(eventObject) {
                    return isReverse ? eventObject[_this.parent.eventFields.startTime].getTime() <= selectedDate_1 : eventObject[_this.parent.eventFields.startTime].getTime() >= selectedDate_1;
                }).filter(function(event) {
                    appointmentElements_1.filter(function(element) {
                        JSON.stringify(event.Guid) === JSON.stringify(element.getAttribute("data-guid")) && filteredElements_1.push(element);
                    });
                }), filteredElements_1.length > 0) {
                    var selectedElement = isReverse ? filteredElements_1[filteredElements_1.length - 1] : filteredElements_1[0], focusElements = this.getAppointmentElementsByGuid(selectedElement.getAttribute("data-guid"));
                    this.parent.eventBase.addSelectedAppointments(focusElements, focusElements[focusElements.length - 1]), 
                    focusElements[focusElements.length - 1].focus();
                }
            }
        }, KeyboardInteraction.prototype.getAllDayCells = function(cells) {
            var allDayRow = this.parent.getAllDayRow();
            if (!allDayRow) return [];
            var startCell = cells[0], endCell = cells[cells.length - 1], start = this.parent.getCellDetails(startCell);
            if (this.parent.getCellDetails(endCell).endTime.getTime() - start.startTime.getTime() >= MS_PER_DAY) {
                return [].slice.call(allDayRow.cells).slice(startCell.cellIndex, endCell.cellIndex + 1);
            }
            return [];
        }, KeyboardInteraction.prototype.getAppointmentElements = function() {
            return [].slice.call(this.parent.element.querySelectorAll("." + APPOINTMENT_CLASS));
        }, KeyboardInteraction.prototype.getAppointmentElementsByGuid = function(guid) {
            return [].slice.call(this.parent.element.querySelectorAll('div[data-guid="' + guid + '"]'));
        }, KeyboardInteraction.prototype.getUniqueAppointmentElements = function() {
            var appointments = this.getAppointmentElements(), appointmentElements = [];
            return appointments.map(function(value) {
                return value.getAttribute("data-guid");
            }).filter(function(value, index, self) {
                self.indexOf(value) === index && appointmentElements.push(appointments[index]);
            }), appointmentElements;
        }, KeyboardInteraction.prototype.getWorkCellFromAppointmentElement = function(target) {
            var selectedObject = this.parent.eventBase.getEventByGuid(target.getAttribute("data-guid"));
            return this.parent.eventBase.selectWorkCellByTime([ selectedObject ]);
        }, KeyboardInteraction.prototype.processViewNavigation = function(e) {
            var index = parseInt(e.key, 10) - 1;
            if (index < this.parent.views.length) {
                var view = this.parent.viewOptions[Object.keys(this.parent.viewOptions)[index]].option;
                this.parent.changeView(view, e), this.parent.headerModule && this.parent.headerModule.element.querySelector(".e-active-view button").focus();
            }
        }, KeyboardInteraction.prototype.processUp = function(e, isMultiple) {
            if (!isMultiple || "MonthAgenda" !== this.parent.currentView) {
                var target = e.target, selectedElements = this.parent.getSelectedElements(), selectedEventElements = this.parent.eventBase.getSelectedAppointments(), moreEventWrapper = this.parent.element.querySelector(".e-more-event-popup-wrapper");
                if (selectedElements.length > 0 && !e.target.classList.contains("e-work-cells") && (target = selectedElements[selectedElements.length - 1]), 
                selectedEventElements.length > 0 && !moreEventWrapper.classList.contains("e-popup-open") && -1 !== [ "Day", "Week", "WorkWeek", "Month" ].indexOf(this.parent.currentView) && (target = this.getWorkCellFromAppointmentElement(selectedEventElements[selectedEventElements.length - 1]), 
                this.parent.eventBase.removeSelectedAppointmentClass()), target.classList.contains("e-work-cells") && !this.parent.element.querySelector(".e-popup-open")) {
                    var tableEle = this.parent.getContentTable(), curRowIndex = target.parentNode.rowIndex;
                    curRowIndex > 0 && curRowIndex < tableEle.rows.length && this.selectCells(isMultiple, tableEle.rows[curRowIndex - 1].cells[target.cellIndex]);
                } else "Agenda" !== this.parent.currentView && "MonthAgenda" !== this.parent.currentView || this.selectAppointment(!0, target);
            }
        }, KeyboardInteraction.prototype.processDown = function(e, isMultiple) {
            if (!isMultiple || "MonthAgenda" !== this.parent.currentView) {
                var target = e.target, selectedCells = this.parent.getSelectedElements(), selectedElements = this.parent.eventBase.getSelectedAppointments(), moreEventWrapper = this.parent.element.querySelector(".e-more-event-popup-wrapper");
                selectedCells.length > 0 && !e.target.classList.contains("e-work-cells") && (target = selectedCells[selectedCells.length - 1]), 
                selectedElements.length > 0 && !moreEventWrapper.classList.contains("e-popup-open") && -1 !== [ "Day", "Week", "WorkWeek", "Month" ].indexOf(this.parent.currentView) && (target = this.getWorkCellFromAppointmentElement(selectedElements[selectedElements.length - 1]), 
                this.parent.eventBase.removeSelectedAppointmentClass());
                var tableEle = this.parent.getContentTable();
                if (target.classList.contains("e-work-cells") && !this.parent.element.querySelector(".e-popup-open")) {
                    var curRowIndex = target.parentNode.rowIndex;
                    curRowIndex >= 0 && curRowIndex < tableEle.rows.length - 1 && this.selectCells(isMultiple, tableEle.rows[curRowIndex + 1].cells[target.cellIndex]);
                } else "Agenda" !== this.parent.currentView && "MonthAgenda" !== this.parent.currentView || this.selectAppointment(!1, target);
            }
        }, KeyboardInteraction.prototype.processLeftRight = function(target, isMultiple) {
            var tableEle = this.parent.getContentTable(), curRowIndex = target.parentNode.rowIndex;
            return {
                element: tableEle,
                rowIndex: curRowIndex,
                columnIndex: target.cellIndex,
                maxIndex: tableEle.rows[curRowIndex].cells.length
            };
        }, KeyboardInteraction.prototype.isCancelLeftRightAction = function(isMultiple) {
            if ("Agenda" === this.parent.currentView || isMultiple && "MonthAgenda" === this.parent.currentView) return !0;
            return !!this.parent.element.querySelector(".e-more-event-popup-wrapper").classList.contains("e-popup-open");
        }, KeyboardInteraction.prototype.processRight = function(e, isMultiple) {
            if (!this.isCancelLeftRightAction(isMultiple)) {
                var selectedCells = this.parent.getSelectedElements(), selectedAppointments = this.parent.eventBase.getSelectedAppointments(), target = e.target;
                if (selectedCells.length > 0 && !target.classList.contains("e-work-cells") && !target.classList.contains("e-all-day-cells") && (target = selectedCells[selectedCells.length - 1]), 
                selectedAppointments.length > 0 && (target = this.getWorkCellFromAppointmentElement(selectedAppointments[selectedAppointments.length - 1]), 
                this.parent.eventBase.removeSelectedAppointmentClass()), target.classList.contains("e-work-cells")) {
                    var key = this.processLeftRight(target, isMultiple);
                    if (key.columnIndex >= 0 && key.columnIndex < key.maxIndex - 1) this.selectCells(isMultiple, key.element.rows[key.rowIndex].cells[target.cellIndex + 1]); else if (key.columnIndex === key.maxIndex - 1) if (!this.isInverseTableSelect() && key.rowIndex < key.element.rows.length - 1) this.selectCells(isMultiple, key.element.rows[key.rowIndex + 1].cells[0]); else if (!isMultiple) {
                        var rowIndex = this.isInverseTableSelect() ? key.rowIndex : 0;
                        this.parent.changeDate(this.parent.activeView.getNextPreviousDate("next"), e);
                        var tableEle = this.parent.getContentTable();
                        this.selectCells(!1, tableEle.rows[rowIndex].cells[0]);
                    }
                } else if (target.classList.contains("e-all-day-cells")) {
                    var curColIndex = target.cellIndex, allDayRow = this.parent.getAllDayRow(), maxColIndex = allDayRow.cells.length;
                    if (curColIndex >= 0 && curColIndex < maxColIndex - 1) this.selectCells(isMultiple, allDayRow.cells[curColIndex + 1]); else if (curColIndex === maxColIndex - 1 && !isMultiple) {
                        this.parent.changeDate(this.parent.activeView.getNextPreviousDate("next"), e);
                        var allDayRow_1 = this.parent.getAllDayRow();
                        this.selectCells(!1, allDayRow_1.cells[0]);
                    }
                }
            }
        }, KeyboardInteraction.prototype.processLeft = function(e, isMultiple) {
            if (!this.isCancelLeftRightAction(isMultiple)) {
                var target = e.target, selectedCells = this.parent.getSelectedElements();
                selectedCells.length > 0 && !target.classList.contains("e-work-cells") && !target.classList.contains("e-all-day-cells") && (target = selectedCells[selectedCells.length - 1]);
                var selectedElements = this.parent.eventBase.getSelectedAppointments();
                if (selectedElements.length > 0 && (target = this.getWorkCellFromAppointmentElement(selectedElements[selectedElements.length - 1]), 
                this.parent.eventBase.removeSelectedAppointmentClass()), target.classList.contains("e-work-cells")) {
                    var key = this.processLeftRight(target, isMultiple);
                    if (key.columnIndex > 0 && key.columnIndex < key.maxIndex) this.selectCells(isMultiple, key.element.rows[key.rowIndex].cells[target.cellIndex - 1]); else if (0 === key.columnIndex) if (!this.isInverseTableSelect() && key.rowIndex > 0) this.selectCells(isMultiple, key.element.rows[key.rowIndex - 1].cells[key.maxIndex - 1]); else if (!isMultiple) {
                        this.parent.changeDate(this.parent.activeView.getNextPreviousDate("previous"), e);
                        var tableEle = this.parent.getContentTable(), rowIndex = this.isInverseTableSelect() ? key.rowIndex : tableEle.rows.length - 1;
                        this.selectCells(!1, tableEle.rows[rowIndex].cells[key.maxIndex - 1]);
                    }
                } else if (target.classList.contains("e-all-day-cells")) {
                    var curColIndex = target.cellIndex, allDayRow = this.parent.getAllDayRow(), maxColIndex = allDayRow.cells.length;
                    if (curColIndex > 0 && curColIndex < maxColIndex) this.selectCells(isMultiple, allDayRow.cells[curColIndex - 1]); else if (0 === curColIndex && !isMultiple) {
                        this.parent.changeDate(this.parent.activeView.getNextPreviousDate("previous"), e);
                        var allDayRow_2 = this.parent.getAllDayRow();
                        this.selectCells(!1, allDayRow_2.cells[maxColIndex - 1]);
                    }
                }
            }
        }, KeyboardInteraction.prototype.processTab = function(e, isReverse) {
            var target = e.target, selectedAppointments = this.parent.eventBase.getSelectedAppointments(), moreEventWrapper = this.parent.element.querySelector(".e-more-event-popup-wrapper");
            if (closest(target, ".e-more-event-popup-wrapper")) {
                if (isNullOrUndefined(moreEventWrapper) || !moreEventWrapper.classList.contains("e-popup-open")) return;
                var moreEventList = [].slice.call(moreEventWrapper.querySelector(".e-more-appointment-wrapper").children), focusElement = moreEventList[moreEventList.length - 1];
                return selectedAppointments.length > 0 && (target = selectedAppointments[selectedAppointments.length - 1]), 
                target.classList.contains("e-more-event-close") && !isReverse ? moreEventWrapper.querySelector(".e-header-date").focus() : target.classList.contains("e-header-date") && !isReverse ? this.selectAppointment(isReverse, target, !0) : target.classList.contains("e-header-date") && isReverse ? moreEventWrapper.querySelector(".e-more-event-close").focus() : target.classList.contains("e-more-event-close") && isReverse ? (this.parent.eventBase.removeSelectedAppointmentClass(), 
                this.parent.eventBase.addSelectedAppointments([ focusElement ], focusElement), focusElement.focus()) : target.classList.contains(APPOINTMENT_CLASS) && (isReverse && target.getAttribute("data-guid") === moreEventList[0].getAttribute("data-guid") ? (this.parent.eventBase.removeSelectedAppointmentClass(), 
                moreEventWrapper.querySelector(".e-header-date").focus()) : isReverse || target.getAttribute("data-guid") !== focusElement.getAttribute("data-guid") ? this.selectAppointment(isReverse, target, !0) : (this.parent.eventBase.removeSelectedAppointmentClass(), 
                moreEventWrapper.querySelector(".e-more-event-close").focus())), void e.preventDefault();
            }
            var appointments = [].slice.call(this.parent.element.querySelectorAll("." + APPOINTMENT_CLASS));
            if (target.classList.contains("e-schedule")) this.parent.eventBase.removeSelectedAppointmentClass(); else {
                if (!target.classList.contains(APPOINTMENT_CLASS)) {
                    var selectedCells = this.parent.getSelectedElements();
                    return selectedCells.length > 0 && !target.classList.contains(APPOINTMENT_CLASS) ? (target = selectedCells[selectedCells.length - 1], 
                    this.selectAppointmentElementFromWorkCell(isReverse, target), void e.preventDefault()) : void 0;
                }
                if (selectedAppointments.length > 0 && (target = selectedAppointments[selectedAppointments.length - 1]), 
                this.parent.eventBase.removeSelectedAppointmentClass(), !isReverse && target.getAttribute("data-guid") === appointments[appointments.length - 1].getAttribute("data-guid") || isReverse && target.getAttribute("data-guid") === appointments[0].getAttribute("data-guid")) return;
                "Agenda" !== this.parent.currentView && "MonthAgenda" !== this.parent.currentView || (this.selectAppointment(isReverse, target), 
                e.preventDefault());
            }
        }, KeyboardInteraction.prototype.processDelete = function(e) {
            document.activeElement.classList.contains(APPOINTMENT_CLASS) && (addClass([ document.activeElement ], "e-appointment-border"), 
            this.parent.activeEventData = this.parent.eventBase.getSelectedEvents(), this.parent.quickPopup.deleteClick()), 
            this.parent.quickPopup.morePopup.hide();
        }, KeyboardInteraction.prototype.processEscape = function() {
            this.parent.quickPopup.onClosePopup(), this.parent.quickPopup.morePopup.hide(), 
            this.parent.headerModule && this.parent.headerModule.hideHeaderPopup();
        }, KeyboardInteraction.prototype.getModuleName = function() {
            return "keyboard";
        }, KeyboardInteraction.prototype.destroy = function() {
            this.removeEventListener(), this.keyboardModule.destroy();
        }, KeyboardInteraction;
    }(), Data$2 = function() {
        function Data(dataSource, query) {
            this.initDataManager(dataSource, query);
        }
        return Data.prototype.initDataManager = function(dataSource, query) {
            this.dataManager = dataSource instanceof DataManager ? dataSource : new DataManager(dataSource), 
            this.query = query instanceof Query ? query : new Query();
        }, Data.prototype.generateQuery = function(startDate, endDate) {
            var query = this.query.clone();
            return startDate && query.addParams("StartDate", startDate.toISOString()), endDate && query.addParams("EndDate", endDate.toISOString()), 
            query;
        }, Data.prototype.getData = function(query) {
            return this.dataManager.executeQuery(query);
        }, Data;
    }(), Timezone = function() {
        function Timezone() {}
        return Timezone.prototype.offset = function(date, timezone) {
            var localOffset = date.getTimezoneOffset();
            try {
                var convertedDate = new Date(date.toLocaleString("en-US", {
                    timeZone: timezone
                }));
                return isNaN(convertedDate.getTime()) ? 0 : (date.getTime() - convertedDate.getTime()) / 6e4 + localOffset;
            } catch (error) {
                return 0;
            }
        }, Timezone.prototype.convert = function(date, fromOffset, toOffset) {
            "string" == typeof fromOffset && (fromOffset = this.offset(date, fromOffset)), "string" == typeof toOffset && (toOffset = this.offset(date, toOffset));
            var fromLocalOffset = date.getTimezoneOffset(), toLocalOffset = (date = new Date(date.getTime() + 6e4 * (fromOffset - toOffset))).getTimezoneOffset();
            return new Date(date.getTime() + 6e4 * (toLocalOffset - fromLocalOffset));
        }, Timezone.prototype.add = function(date, timezone) {
            return this.convert(date, date.getTimezoneOffset(), timezone);
        }, Timezone.prototype.remove = function(date, timezone) {
            return this.convert(date, timezone, date.getTimezoneOffset());
        }, Timezone.prototype.removeLocalOffset = function(date) {
            return new Date(+date - 6e4 * date.getTimezoneOffset());
        }, Timezone;
    }(), localTimezoneName = Intl.DateTimeFormat().resolvedOptions().timeZone || "UTC", timezoneData = [ {
        Value: "Pacific/Niue",
        Text: "(UTC-11:00) Niue"
    }, {
        Value: "Pacific/Pago_Pago",
        Text: "(UTC-11:00) Pago Pago"
    }, {
        Value: "Pacific/Honolulu",
        Text: "(UTC-10:00) Hawaii Time"
    }, {
        Value: "Pacific/Rarotonga",
        Text: "(UTC-10:00) Rarotonga"
    }, {
        Value: "Pacific/Tahiti",
        Text: "(UTC-10:00) Tahiti"
    }, {
        Value: "Pacific/Marquesas",
        Text: "(UTC-09:30) Marquesas"
    }, {
        Value: "America/Anchorage",
        Text: "(UTC-09:00) Alaska Time"
    }, {
        Value: "Pacific/Gambier",
        Text: "(UTC-09:00) Gambier"
    }, {
        Value: "America/Los_Angeles",
        Text: "(UTC-08:00) Pacific Time"
    }, {
        Value: "America/Tijuana",
        Text: "(UTC-08:00) Pacific Time - Tijuana"
    }, {
        Value: "America/Vancouver",
        Text: "(UTC-08:00) Pacific Time - Vancouver"
    }, {
        Value: "America/Whitehorse",
        Text: "(UTC-08:00) Pacific Time - Whitehorse"
    }, {
        Value: "Pacific/Pitcairn",
        Text: "(UTC-08:00) Pitcairn"
    }, {
        Value: "America/Denver",
        Text: "(UTC-07:00) Mountain Time"
    }, {
        Value: "America/Phoenix",
        Text: "(UTC-07:00) Mountain Time - Arizona"
    }, {
        Value: "America/Mazatlan",
        Text: "(UTC-07:00) Mountain Time - Chihuahua, Mazatlan"
    }, {
        Value: "America/Dawson_Creek",
        Text: "(UTC-07:00) Mountain Time - Dawson Creek"
    }, {
        Value: "America/Edmonton",
        Text: "(UTC-07:00) Mountain Time - Edmonton"
    }, {
        Value: "America/Hermosillo",
        Text: "(UTC-07:00) Mountain Time - Hermosillo"
    }, {
        Value: "America/Yellowknife",
        Text: "(UTC-07:00) Mountain Time - Yellowknife"
    }, {
        Value: "America/Belize",
        Text: "(UTC-06:00) Belize"
    }, {
        Value: "America/Chicago",
        Text: "(UTC-06:00) Central Time"
    }, {
        Value: "America/Mexico_City",
        Text: "(UTC-06:00) Central Time - Mexico City"
    }, {
        Value: "America/Regina",
        Text: "(UTC-06:00) Central Time - Regina"
    }, {
        Value: "America/Tegucigalpa",
        Text: "(UTC-06:00) Central Time - Tegucigalpa"
    }, {
        Value: "America/Winnipeg",
        Text: "(UTC-06:00) Central Time - Winnipeg"
    }, {
        Value: "America/Costa_Rica",
        Text: "(UTC-06:00) Costa Rica"
    }, {
        Value: "America/El_Salvador",
        Text: "(UTC-06:00) El Salvador"
    }, {
        Value: "Pacific/Galapagos",
        Text: "(UTC-06:00) Galapagos"
    }, {
        Value: "America/Guatemala",
        Text: "(UTC-06:00) Guatemala"
    }, {
        Value: "America/Managua",
        Text: "(UTC-06:00) Managua"
    }, {
        Value: "America/Cancun",
        Text: "(UTC-05:00) America Cancun"
    }, {
        Value: "America/Bogota",
        Text: "(UTC-05:00) Bogota"
    }, {
        Value: "Pacific/Easter",
        Text: "(UTC-05:00) Easter Island"
    }, {
        Value: "America/New_York",
        Text: "(UTC-05:00) Eastern Time"
    }, {
        Value: "America/Iqaluit",
        Text: "(UTC-05:00) Eastern Time - Iqaluit"
    }, {
        Value: "America/Toronto",
        Text: "(UTC-05:00) Eastern Time - Toronto"
    }, {
        Value: "America/Guayaquil",
        Text: "(UTC-05:00) Guayaquil"
    }, {
        Value: "America/Havana",
        Text: "(UTC-05:00) Havana"
    }, {
        Value: "America/Jamaica",
        Text: "(UTC-05:00) Jamaica"
    }, {
        Value: "America/Lima",
        Text: "(UTC-05:00) Lima"
    }, {
        Value: "America/Nassau",
        Text: "(UTC-05:00) Nassau"
    }, {
        Value: "America/Panama",
        Text: "(UTC-05:00) Panama"
    }, {
        Value: "America/Port-au-Prince",
        Text: "(UTC-05:00) Port-au-Prince"
    }, {
        Value: "America/Rio_Branco",
        Text: "(UTC-05:00) Rio Branco"
    }, {
        Value: "America/Halifax",
        Text: "(UTC-04:00) Atlantic Time - Halifax"
    }, {
        Value: "America/Barbados",
        Text: "(UTC-04:00) Barbados"
    }, {
        Value: "Atlantic/Bermuda",
        Text: "(UTC-04:00) Bermuda"
    }, {
        Value: "America/Boa_Vista",
        Text: "(UTC-04:00) Boa Vista"
    }, {
        Value: "America/Caracas",
        Text: "(UTC-04:00) Caracas"
    }, {
        Value: "America/Curacao",
        Text: "(UTC-04:00) Curacao"
    }, {
        Value: "America/Grand_Turk",
        Text: "(UTC-04:00) Grand Turk"
    }, {
        Value: "America/Guyana",
        Text: "(UTC-04:00) Guyana"
    }, {
        Value: "America/La_Paz",
        Text: "(UTC-04:00) La Paz"
    }, {
        Value: "America/Manaus",
        Text: "(UTC-04:00) Manaus"
    }, {
        Value: "America/Martinique",
        Text: "(UTC-04:00) Martinique"
    }, {
        Value: "America/Port_of_Spain",
        Text: "(UTC-04:00) Port of Spain"
    }, {
        Value: "America/Porto_Velho",
        Text: "(UTC-04:00) Porto Velho"
    }, {
        Value: "America/Puerto_Rico",
        Text: "(UTC-04:00) Puerto Rico"
    }, {
        Value: "America/Santo_Domingo",
        Text: "(UTC-04:00) Santo Domingo"
    }, {
        Value: "America/Thule",
        Text: "(UTC-04:00) Thule"
    }, {
        Value: "America/St_Johns",
        Text: "(UTC-03:30) Newfoundland Time - St. Johns"
    }, {
        Value: "America/Araguaina",
        Text: "(UTC-03:00) Araguaina"
    }, {
        Value: "America/Asuncion",
        Text: "(UTC-03:00) Asuncion"
    }, {
        Value: "America/Belem",
        Text: "(UTC-03:00) Belem"
    }, {
        Value: "America/Argentina/Buenos_Aires",
        Text: "(UTC-03:00) Buenos Aires"
    }, {
        Value: "America/Campo_Grande",
        Text: "(UTC-03:00) Campo Grande"
    }, {
        Value: "America/Cayenne",
        Text: "(UTC-03:00) Cayenne"
    }, {
        Value: "America/Cuiaba",
        Text: "(UTC-03:00) Cuiaba"
    }, {
        Value: "America/Fortaleza",
        Text: "(UTC-03:00) Fortaleza"
    }, {
        Value: "America/Godthab",
        Text: "(UTC-03:00) Godthab"
    }, {
        Value: "America/Maceio",
        Text: "(UTC-03:00) Maceio"
    }, {
        Value: "America/Miquelon",
        Text: "(UTC-03:00) Miquelon"
    }, {
        Value: "America/Montevideo",
        Text: "(UTC-03:00) Montevideo"
    }, {
        Value: "Antarctica/Palmer",
        Text: "(UTC-03:00) Palmer"
    }, {
        Value: "America/Paramaribo",
        Text: "(UTC-03:00) Paramaribo"
    }, {
        Value: "America/Punta_Arenas",
        Text: "(UTC-03:00) Punta Arenas"
    }, {
        Value: "America/Recife",
        Text: "(UTC-03:00) Recife"
    }, {
        Value: "Antarctica/Rothera",
        Text: "(UTC-03:00) Rothera"
    }, {
        Value: "America/Bahia",
        Text: "(UTC-03:00) Salvador"
    }, {
        Value: "America/Santiago",
        Text: "(UTC-03:00) Santiago"
    }, {
        Value: "Atlantic/Stanley",
        Text: "(UTC-03:00) Stanley"
    }, {
        Value: "America/Noronha",
        Text: "(UTC-02:00) Noronha"
    }, {
        Value: "America/Sao_Paulo",
        Text: "(UTC-02:00) Sao Paulo"
    }, {
        Value: "Atlantic/South_Georgia",
        Text: "(UTC-02:00) South Georgia"
    }, {
        Value: "Atlantic/Azores",
        Text: "(UTC-01:00) Azores"
    }, {
        Value: "Atlantic/Cape_Verde",
        Text: "(UTC-01:00) Cape Verde"
    }, {
        Value: "America/Scoresbysund",
        Text: "(UTC-01:00) Scoresbysund"
    }, {
        Value: "Africa/Abidjan",
        Text: "(UTC+00:00) Abidjan"
    }, {
        Value: "Africa/Accra",
        Text: "(UTC+00:00) Accra"
    }, {
        Value: "Africa/Bissau",
        Text: "(UTC+00:00) Bissau"
    }, {
        Value: "Atlantic/Canary",
        Text: "(UTC+00:00) Canary Islands"
    }, {
        Value: "Africa/Casablanca",
        Text: "(UTC+00:00) Casablanca"
    }, {
        Value: "America/Danmarkshavn",
        Text: "(UTC+00:00) Danmarkshavn"
    }, {
        Value: "Europe/Dublin",
        Text: "(UTC+00:00) Dublin"
    }, {
        Value: "Africa/El_Aaiun",
        Text: "(UTC+00:00) El Aaiun"
    }, {
        Value: "Atlantic/Faroe",
        Text: "(UTC+00:00) Faeroe"
    }, {
        Value: "Etc/UTC",
        Text: "(UTC+00:00) UTC (no daylight saving)"
    }, {
        Value: "Europe/Lisbon",
        Text: "(UTC+00:00) Lisbon"
    }, {
        Value: "Europe/London",
        Text: "(UTC+00:00) London"
    }, {
        Value: "Africa/Monrovia",
        Text: "(UTC+00:00) Monrovia"
    }, {
        Value: "Atlantic/Reykjavik",
        Text: "(UTC+00:00) Reykjavik"
    }, {
        Value: "UTC",
        Text: "UTC"
    }, {
        Value: "Africa/Algiers",
        Text: "(UTC+01:00) Algiers"
    }, {
        Value: "Europe/Amsterdam",
        Text: "(UTC+01:00) Amsterdam"
    }, {
        Value: "Europe/Andorra",
        Text: "(UTC+01:00) Andorra"
    }, {
        Value: "Europe/Berlin",
        Text: "(UTC+01:00) Berlin"
    }, {
        Value: "Europe/Brussels",
        Text: "(UTC+01:00) Brussels"
    }, {
        Value: "Europe/Budapest",
        Text: "(UTC+01:00) Budapest"
    }, {
        Value: "Europe/Belgrade",
        Text: "(UTC+01:00) Central European Time - Belgrade"
    }, {
        Value: "Europe/Prague",
        Text: "(UTC+01:00) Central European Time - Prague"
    }, {
        Value: "Africa/Ceuta",
        Text: "(UTC+01:00) Ceuta"
    }, {
        Value: "Europe/Copenhagen",
        Text: "(UTC+01:00) Copenhagen"
    }, {
        Value: "Europe/Gibraltar",
        Text: "(UTC+01:00) Gibraltar"
    }, {
        Value: "Africa/Lagos",
        Text: "(UTC+01:00) Lagos"
    }, {
        Value: "Europe/Luxembourg",
        Text: "(UTC+01:00) Luxembourg"
    }, {
        Value: "Europe/Madrid",
        Text: "(UTC+01:00) Madrid"
    }, {
        Value: "Europe/Malta",
        Text: "(UTC+01:00) Malta"
    }, {
        Value: "Europe/Monaco",
        Text: "(UTC+01:00) Monaco"
    }, {
        Value: "Africa/Ndjamena",
        Text: "(UTC+01:00) Ndjamena"
    }, {
        Value: "Europe/Oslo",
        Text: "(UTC+01:00) Oslo"
    }, {
        Value: "Europe/Paris",
        Text: "(UTC+01:00) Paris"
    }, {
        Value: "Europe/Rome",
        Text: "(UTC+01:00) Rome"
    }, {
        Value: "Europe/Stockholm",
        Text: "(UTC+01:00) Stockholm"
    }, {
        Value: "Europe/Tirane",
        Text: "(UTC+01:00) Tirane"
    }, {
        Value: "Africa/Tunis",
        Text: "(UTC+01:00) Tunis"
    }, {
        Value: "Europe/Vienna",
        Text: "(UTC+01:00) Vienna"
    }, {
        Value: "Europe/Warsaw",
        Text: "(UTC+01:00) Warsaw"
    }, {
        Value: "Europe/Zurich",
        Text: "(UTC+01:00) Zurich"
    }, {
        Value: "Asia/Amman",
        Text: "(UTC+02:00) Amman"
    }, {
        Value: "Europe/Athens",
        Text: "(UTC+02:00) Athens"
    }, {
        Value: "Asia/Beirut",
        Text: "(UTC+02:00) Beirut"
    }, {
        Value: "Europe/Bucharest",
        Text: "(UTC+02:00) Bucharest"
    }, {
        Value: "Africa/Cairo",
        Text: "(UTC+02:00) Cairo"
    }, {
        Value: "Europe/Chisinau",
        Text: "(UTC+02:00) Chisinau"
    }, {
        Value: "Asia/Damascus",
        Text: "(UTC+02:00) Damascus"
    }, {
        Value: "Asia/Gaza",
        Text: "(UTC+02:00) Gaza"
    }, {
        Value: "Europe/Helsinki",
        Text: "(UTC+02:00) Helsinki"
    }, {
        Value: "Asia/Jerusalem",
        Text: "(UTC+02:00) Jerusalem"
    }, {
        Value: "Africa/Johannesburg",
        Text: "(UTC+02:00) Johannesburg"
    }, {
        Value: "Africa/Khartoum",
        Text: "(UTC+02:00) Khartoum"
    }, {
        Value: "Europe/Kiev",
        Text: "(UTC+02:00) Kiev"
    }, {
        Value: "Africa/Maputo",
        Text: "(UTC+02:00) Maputo"
    }, {
        Value: "Europe/Kaliningrad",
        Text: "(UTC+02:00) Moscow-01 - Kaliningrad"
    }, {
        Value: "Asia/Nicosia",
        Text: "(UTC+02:00) Nicosia"
    }, {
        Value: "Europe/Riga",
        Text: "(UTC+02:00) Riga"
    }, {
        Value: "Europe/Sofia",
        Text: "(UTC+02:00) Sofia"
    }, {
        Value: "Europe/Tallinn",
        Text: "(UTC+02:00) Tallinn"
    }, {
        Value: "Africa/Tripoli",
        Text: "(UTC+02:00) Tripoli"
    }, {
        Value: "Europe/Vilnius",
        Text: "(UTC+02:00) Vilnius"
    }, {
        Value: "Africa/Windhoek",
        Text: "(UTC+02:00) Windhoek"
    }, {
        Value: "Asia/Baghdad",
        Text: "(UTC+03:00) Baghdad"
    }, {
        Value: "Europe/Istanbul",
        Text: "(UTC+03:00) Istanbul"
    }, {
        Value: "Europe/Minsk",
        Text: "(UTC+03:00) Minsk"
    }, {
        Value: "Europe/Moscow",
        Text: "(UTC+03:00) Moscow+00 - Moscow"
    }, {
        Value: "Africa/Nairobi",
        Text: "(UTC+03:00) Nairobi"
    }, {
        Value: "Asia/Qatar",
        Text: "(UTC+03:00) Qatar"
    }, {
        Value: "Asia/Riyadh",
        Text: "(UTC+03:00) Riyadh"
    }, {
        Value: "Antarctica/Syowa",
        Text: "(UTC+03:00) Syowa"
    }, {
        Value: "Asia/Tehran",
        Text: "(UTC+03:30) Tehran"
    }, {
        Value: "Asia/Baku",
        Text: "(UTC+04:00) Baku"
    }, {
        Value: "Asia/Dubai",
        Text: "(UTC+04:00) Dubai"
    }, {
        Value: "Indian/Mahe",
        Text: "(UTC+04:00) Mahe"
    }, {
        Value: "Indian/Mauritius",
        Text: "(UTC+04:00) Mauritius"
    }, {
        Value: "Europe/Samara",
        Text: "(UTC+04:00) Moscow+01 - Samara"
    }, {
        Value: "Indian/Reunion",
        Text: "(UTC+04:00) Reunion"
    }, {
        Value: "Asia/Tbilisi",
        Text: "(UTC+04:00) Tbilisi"
    }, {
        Value: "Asia/Yerevan",
        Text: "(UTC+04:00) Yerevan"
    }, {
        Value: "Asia/Kabul",
        Text: "(UTC+04:30) Kabul"
    }, {
        Value: "Asia/Aqtau",
        Text: "(UTC+05:00) Aqtau"
    }, {
        Value: "Asia/Aqtobe",
        Text: "(UTC+05:00) Aqtobe"
    }, {
        Value: "Asia/Ashgabat",
        Text: "(UTC+05:00) Ashgabat"
    }, {
        Value: "Asia/Dushanbe",
        Text: "(UTC+05:00) Dushanbe"
    }, {
        Value: "Asia/Karachi",
        Text: "(UTC+05:00) Karachi"
    }, {
        Value: "Indian/Kerguelen",
        Text: "(UTC+05:00) Kerguelen"
    }, {
        Value: "Indian/Maldives",
        Text: "(UTC+05:00) Maldives"
    }, {
        Value: "Antarctica/Mawson",
        Text: "(UTC+05:00) Mawson"
    }, {
        Value: "Asia/Yekaterinburg",
        Text: "(UTC+05:00) Moscow+02 - Yekaterinburg"
    }, {
        Value: "Asia/Tashkent",
        Text: "(UTC+05:00) Tashkent"
    }, {
        Value: "Asia/Colombo",
        Text: "(UTC+05:30) Colombo"
    }, {
        Value: "Asia/Kolkata",
        Text: "(UTC+05:30) India Standard Time"
    }, {
        Value: "Asia/Katmandu",
        Text: "(UTC+05:45) Katmandu"
    }, {
        Value: "Asia/Almaty",
        Text: "(UTC+06:00) Almaty"
    }, {
        Value: "Asia/Bishkek",
        Text: "(UTC+06:00) Bishkek"
    }, {
        Value: "Indian/Chagos",
        Text: "(UTC+06:00) Chagos"
    }, {
        Value: "Asia/Dhaka",
        Text: "(UTC+06:00) Dhaka"
    }, {
        Value: "Asia/Omsk",
        Text: "(UTC+06:00) Moscow+03 - Omsk"
    }, {
        Value: "Asia/Thimphu",
        Text: "(UTC+06:00) Thimphu"
    }, {
        Value: "Antarctica/Vostok",
        Text: "(UTC+06:00) Vostok"
    }, {
        Value: "Indian/Cocos",
        Text: "(UTC+06:30) Cocos"
    }, {
        Value: "Asia/Yangon",
        Text: "(UTC+06:30) Rangoon"
    }, {
        Value: "Asia/Bangkok",
        Text: "(UTC+07:00) Bangkok"
    }, {
        Value: "Indian/Christmas",
        Text: "(UTC+07:00) Christmas"
    }, {
        Value: "Antarctica/Davis",
        Text: "(UTC+07:00) Davis"
    }, {
        Value: "Asia/Saigon",
        Text: "(UTC+07:00) Hanoi"
    }, {
        Value: "Asia/Hovd",
        Text: "(UTC+07:00) Hovd"
    }, {
        Value: "Asia/Jakarta",
        Text: "(UTC+07:00) Jakarta"
    }, {
        Value: "Asia/Krasnoyarsk",
        Text: "(UTC+07:00) Moscow+04 - Krasnoyarsk"
    }, {
        Value: "Asia/Brunei",
        Text: "(UTC+08:00) Brunei"
    }, {
        Value: "Asia/Shanghai",
        Text: "(UTC+08:00) China Time - Beijing"
    }, {
        Value: "Asia/Choibalsan",
        Text: "(UTC+08:00) Choibalsan"
    }, {
        Value: "Asia/Hong_Kong",
        Text: "(UTC+08:00) Hong Kong"
    }, {
        Value: "Asia/Kuala_Lumpur",
        Text: "(UTC+08:00) Kuala Lumpur"
    }, {
        Value: "Asia/Macau",
        Text: "(UTC+08:00) Macau"
    }, {
        Value: "Asia/Makassar",
        Text: "(UTC+08:00) Makassar"
    }, {
        Value: "Asia/Manila",
        Text: "(UTC+08:00) Manila"
    }, {
        Value: "Asia/Irkutsk",
        Text: "(UTC+08:00) Moscow+05 - Irkutsk"
    }, {
        Value: "Asia/Singapore",
        Text: "(UTC+08:00) Singapore"
    }, {
        Value: "Asia/Taipei",
        Text: "(UTC+08:00) Taipei"
    }, {
        Value: "Asia/Ulaanbaatar",
        Text: "(UTC+08:00) Ulaanbaatar"
    }, {
        Value: "Australia/Perth",
        Text: "(UTC+08:00) Western Time - Perth"
    }, {
        Value: "Asia/Pyongyang",
        Text: "(UTC+08:30) Pyongyang"
    }, {
        Value: "Asia/Dili",
        Text: "(UTC+09:00) Dili"
    }, {
        Value: "Asia/Jayapura",
        Text: "(UTC+09:00) Jayapura"
    }, {
        Value: "Asia/Yakutsk",
        Text: "(UTC+09:00) Moscow+06 - Yakutsk"
    }, {
        Value: "Pacific/Palau",
        Text: "(UTC+09:00) Palau"
    }, {
        Value: "Asia/Seoul",
        Text: "(UTC+09:00) Seoul"
    }, {
        Value: "Asia/Tokyo",
        Text: "(UTC+09:00) Tokyo"
    }, {
        Value: "Australia/Darwin",
        Text: "(UTC+09:30) Central Time - Darwin"
    }, {
        Value: "Antarctica/DumontDUrville",
        Text: '(UTC+10:00) Dumont D"Urville'
    }, {
        Value: "Australia/Brisbane",
        Text: "(UTC+10:00) Eastern Time - Brisbane"
    }, {
        Value: "Pacific/Guam",
        Text: "(UTC+10:00) Guam"
    }, {
        Value: "Asia/Vladivostok",
        Text: "(UTC+10:00) Moscow+07 - Vladivostok"
    }, {
        Value: "Pacific/Port_Moresby",
        Text: "(UTC+10:00) Port Moresby"
    }, {
        Value: "Pacific / Chuuk",
        Text: "(UTC+10:00) Truk"
    }, {
        Value: "Australia/Adelaide",
        Text: "(UTC+10:30) Central Time - Adelaide"
    }, {
        Value: "Antarctica/Casey",
        Text: "(UTC+11:00) Casey"
    }, {
        Value: "Australia/Hobart",
        Text: "(UTC+11:00) Eastern Time - Hobart"
    }, {
        Value: "Australia/Sydney",
        Text: "(UTC+11:00) Eastern Time - Melbourne, Sydney"
    }, {
        Value: "Pacific/Efate",
        Text: "(UTC+11:00) Efate"
    }, {
        Value: "Pacific/Guadalcanal",
        Text: "(UTC+11:00) Guadalcanal"
    }, {
        Value: "Pacific/Kosrae",
        Text: "(UTC+11:00) Kosrae"
    }, {
        Value: "Asia/Magadan",
        Text: "(UTC+11:00) Moscow+08 - Magadan"
    }, {
        Value: "Pacific / Norfolk",
        Text: "(UTC+11:00) Norfolk"
    }, {
        Value: "Pacific/Noumea",
        Text: "(UTC+11:00) Noumea"
    }, {
        Value: "Pacific/Pohnpei",
        Text: "(UTC+11:00) Ponape"
    }, {
        Value: "Pacific/Funafuti",
        Text: "(UTC+12:00) Funafuti"
    }, {
        Value: "Pacific/Kwajalein",
        Text: "(UTC+12:00) Kwajalein"
    }, {
        Value: "Pacific/Majuro",
        Text: "(UTC+12:00) Majuro"
    }, {
        Value: "Asia/Kamchatka",
        Text: "(UTC+12:00) Moscow+09 - Petropavlovsk - Kamchatskiy"
    }, {
        Value: "Pacific / Nauru",
        Text: "(UTC+12:00) Nauru"
    }, {
        Value: "Pacific/Tarawa",
        Text: "(UTC+12:00) Tarawa"
    }, {
        Value: "Pacific/Wake",
        Text: "(UTC+12:00) Wake"
    }, {
        Value: "Pacific/Wallis",
        Text: "(UTC+12:00) Wallis"
    }, {
        Value: "Pacific/Auckland",
        Text: "(UTC+13:00) Auckland"
    }, {
        Value: "Pacific/Enderbury",
        Text: "(UTC+13:00) Enderbury"
    }, {
        Value: "Pacific/Fakaofo",
        Text: "(UTC+13:00) Fakaofo"
    }, {
        Value: "Pacific/Fiji",
        Text: "(UTC+13:00) Fiji"
    }, {
        Value: "Pacific/Tongatapu",
        Text: "(UTC+13:00) Tongatapu"
    }, {
        Value: "Pacific/Apia",
        Text: "(UTC+14:00) Apia"
    }, {
        Value: "Pacific/Kiritimati",
        Text: "(UTC+14:00) Kiritimati"
    } ], EventBase = function() {
        function EventBase(parent) {
            this.slots = [], this.parent = parent, this.timezone = new Timezone();
        }
        return EventBase.prototype.processData = function(events, timeZonePropChanged, oldTimezone) {
            var start = this.parent.activeView.startDate(), end = this.parent.activeView.endDate(), fields = this.parent.eventFields;
            this.parent.eventsProcessed = [];
            var processed = [], temp = 1, generateID = !1;
            events.length > 0 && isNullOrUndefined(events[0][fields.id]) && (generateID = !0);
            for (var _i = 0, events_1 = events; _i < events_1.length; _i++) {
                var event_1 = events_1[_i];
                generateID && (event_1[fields.id] = temp++), timeZonePropChanged ? this.processTimezoneChange(event_1, oldTimezone) : this.processTimezone(event_1), 
                !isNullOrUndefined(event_1[fields.recurrenceRule]) && isNullOrUndefined(event_1[fields.recurrenceID]) ? processed = processed.concat(this.generateOccurrence(event_1)) : (event_1.Guid = this.generateGuid(), 
                processed.push(event_1));
            }
            return this.parent.eventsProcessed = this.filterEvents(start, end, processed), processed;
        }, EventBase.prototype.timezonePropertyChange = function(oldTimezone) {
            var processed = this.processData(this.parent.eventsData, !0, oldTimezone);
            this.parent.notify("data-ready", {
                processedData: processed
            });
        }, EventBase.prototype.processTimezoneChange = function(event, oldTimezone) {
            var fields = this.parent.eventFields;
            oldTimezone && this.parent.timezone ? (event[fields.startTime] = this.timezone.convert(event[fields.startTime], oldTimezone, this.parent.timezone), 
            event[fields.endTime] = this.timezone.convert(event[fields.endTime], oldTimezone, this.parent.timezone)) : !oldTimezone && this.parent.timezone ? (event[fields.startTime] = this.timezone.add(event[fields.startTime], this.parent.timezone), 
            event[fields.endTime] = this.timezone.add(event[fields.endTime], this.parent.timezone)) : oldTimezone && !this.parent.timezone && (event[fields.startTime] = this.timezone.remove(event[fields.startTime], oldTimezone), 
            event[fields.endTime] = this.timezone.remove(event[fields.endTime], oldTimezone));
        }, EventBase.prototype.processTimezone = function(event) {
            var fields = this.parent.eventFields;
            if (event[fields.startTimezone] || event[fields.endTimezone]) {
                var startTimezone = event[fields.startTimezone] || event[fields.endTimezone], endTimezone = event[fields.endTimezone] || event[fields.startTimezone];
                if (event[fields.startTime] = this.timezone.add(event[fields.startTime], startTimezone), 
                event[fields.endTime] = this.timezone.add(event[fields.endTime], endTimezone), this.parent.timezone) {
                    var zone = this.parent.timezone;
                    event[fields.startTime] = this.timezone.convert(event[fields.startTime], startTimezone, zone), 
                    event[fields.endTime] = this.timezone.convert(event[fields.endTime], endTimezone, zone);
                }
            } else this.parent.timezone && (event[fields.startTime] = this.timezone.add(event[fields.startTime], this.parent.timezone), 
            event[fields.endTime] = this.timezone.add(event[fields.endTime], this.parent.timezone));
        }, EventBase.prototype.filterEvents = function(startDate, endDate, collection) {
            var appointments = isNullOrUndefined(collection) ? this.parent.eventsProcessed : collection, fieldMapping = this.parent.eventFields, predicate = new Predicate(fieldMapping.startTime, "greaterthanorequal", startDate).and(new Predicate(fieldMapping.endTime, "greaterthanorequal", startDate)).and(new Predicate(fieldMapping.startTime, "lessthan", endDate)).or(new Predicate(fieldMapping.startTime, "lessthanorequal", startDate).and(new Predicate(fieldMapping.endTime, "greaterthan", startDate))), filter = new DataManager({
                json: appointments
            }).executeLocal(new Query().where(predicate));
            return this.sortByTime(filter);
        }, EventBase.prototype.sortByTime = function(appointments) {
            var fieldMapping = this.parent.eventFields;
            return appointments.sort(function(a, b) {
                var d1 = a[fieldMapping.startTime], d2 = b[fieldMapping.startTime];
                return d1.getTime() - d2.getTime();
            }), appointments;
        }, EventBase.prototype.sortByDateTime = function(appointments) {
            var fieldMapping = this.parent.eventFields;
            return appointments.sort(function(object1, object2) {
                var d3 = object1[fieldMapping.startTime], d4 = object2[fieldMapping.startTime], d5 = object1[fieldMapping.endTime], d6 = object2[fieldMapping.endTime], d1 = d5.getTime() - d3.getTime(), d2 = d6.getTime() - d4.getTime();
                return d3.getTime() - d4.getTime() || d2 - d1;
            }), appointments;
        }, EventBase.prototype.getSmallestMissingNumber = function(array) {
            for (var large = Math.max.apply(Math, array), i = 0; i < large; i++) if (-1 === array.indexOf(i)) return i;
            return large + 1;
        }, EventBase.prototype.splitEventByDay = function(event) {
            var eventFields = this.parent.eventFields, data = [], eventStartTime = event[eventFields.startTime], eventEndTime = event[eventFields.endTime];
            if (resetTime(new Date(eventStartTime.getTime())) < resetTime(new Date(eventEndTime.getTime()))) for (var start = new Date(eventStartTime.getTime()), end = addDays(resetTime(new Date(eventStartTime.getTime())), 1), endDate = 0 === eventEndTime.getHours() && 0 === eventEndTime.getMinutes() ? eventEndTime : addDays(eventEndTime, 1), index = 1, eventLength = getDaysCount(eventStartTime.getTime(), endDate.getTime()); end <= eventEndTime; ) {
                var app = extend({}, event);
                app[eventFields.startTime] = start, app[eventFields.endTime] = end, app.data = {
                    index: index,
                    count: eventLength
                }, app.Guid = this.generateGuid(), app.isSpanned = !0, data.push(app), start = end, 
                end = new Date(start.getTime()).setHours(0, 0, 0, 0) === new Date(eventEndTime.getTime()).setHours(0, 0, 0, 0) && end.getTime() !== eventEndTime.getTime() ? new Date(new Date(start.getTime()).setHours(eventEndTime.getHours(), eventEndTime.getMinutes())) : addDays(resetTime(new Date(start.getTime())), 1), 
                index++;
            } else data.push(event);
            return data;
        }, EventBase.prototype.splitEvent = function(event, dateRender) {
            var fields = this.parent.eventFields, start = resetTime(new Date(event[fields.startTime] + "")).getTime(), end = resetTime(new Date(event[fields.endTime] + "")).getTime();
            if (getDateInMs(event[fields.endTime]) <= 0) {
                var temp = addDays(resetTime(new Date(event[fields.endTime] + "")), -1).getTime();
                end = start > temp ? start : temp;
            }
            var orgStart = start, orgEnd = end, ranges = [];
            if (start !== end) {
                start < dateRender[0].getTime() && (start = dateRender[0].getTime()), end > dateRender[dateRender.length - 1].getTime() && (end = dateRender[dateRender.length - 1].getTime());
                for (var cStart = start, level = 0; level < this.slots.length; level++) {
                    var slot = this.slots[level], firstSlot = slot[0];
                    if ((cStart = cStart <= firstSlot && end >= firstSlot ? firstSlot : cStart) > end || firstSlot > end) break;
                    if (this.parent.activeViewOptions.showWeekend && "WorkWeek" !== this.parent.currentView) {
                        var startIndex = slot.indexOf(cStart);
                        if (-1 !== startIndex) {
                            var endIndex = slot.indexOf(end), hasBreak = -1 !== endIndex, count = (endIndex = hasBreak ? endIndex : slot.length - 1) - startIndex + 1, isLeft = slot[startIndex] !== orgStart, isRight = slot[endIndex] !== orgEnd;
                            if (ranges.push(this.cloneEventObject(event, slot[startIndex], slot[endIndex], count, isLeft, isRight)), 
                            hasBreak) break;
                        }
                    } else if (this.dateInRange(cStart, slot[0], slot[slot.length - 1])) {
                        for (var availSlot = [], i = 0; i < slot.length; i++) this.dateInRange(slot[i], orgStart, orgEnd) && availSlot.push(slot[i]);
                        if (availSlot.length > 0) {
                            var cnt = availSlot.length;
                            isLeft = availSlot[0] !== orgStart, isRight = availSlot[availSlot.length - 1] !== orgEnd;
                            ranges.push(this.cloneEventObject(event, availSlot[0], availSlot[availSlot.length - 1], cnt, isLeft, isRight));
                        }
                    }
                }
            } else ranges.push(this.cloneEventObject(event, start, end, 1, !1, !1));
            return ranges;
        }, EventBase.prototype.cloneEventObject = function(event, start, end, count, isLeft, isRight) {
            var fields = this.parent.eventFields, e = extend({}, event, null, !0), data = {
                count: count,
                isLeft: isLeft,
                isRight: isRight
            };
            return data[fields.startTime] = event[fields.startTime], data[fields.endTime] = event[fields.endTime], 
            e.data = data, e[fields.startTime] = new Date(start), e[fields.endTime] = new Date(end), 
            e;
        }, EventBase.prototype.dateInRange = function(date, start, end) {
            return start <= date && date <= end;
        }, EventBase.prototype.getSelectedEventElements = function(target) {
            if (this.removeSelectedAppointmentClass(), this.parent.selectedElements.length <= 0) this.parent.selectedElements.push(target); else {
                if (this.parent.selectedElements.filter(function(element) {
                    return element.getAttribute("data-guid") === target.getAttribute("data-guid");
                }).length <= 0) for (var _i = 0, focusElements_1 = [].slice.call(this.parent.element.querySelectorAll('div[data-guid="' + target.getAttribute("data-guid") + '"]')); _i < focusElements_1.length; _i++) {
                    var element = focusElements_1[_i];
                    this.parent.selectedElements.push(element);
                } else {
                    var selectedElements = this.parent.selectedElements.filter(function(element) {
                        return element.getAttribute("data-guid") !== target.getAttribute("data-guid");
                    });
                    this.parent.selectedElements = selectedElements;
                }
            }
            return target && this.parent.selectedElements.length > 0 && this.addSelectedAppointments(this.parent.selectedElements, this.parent.selectedElements[0]), 
            this.parent.selectedElements;
        }, EventBase.prototype.getSelectedEvents = function() {
            var _this = this, eventSelect = [], elementSelect = [];
            return [].slice.call(this.parent.element.querySelectorAll(".e-appointment-border")).filter(function(element, index, selectAppointments) {
                eventSelect.push(_this.getEventByGuid(element.getAttribute("data-guid"))), elementSelect.push(element);
            }), {
                event: eventSelect.length > 1 ? eventSelect : eventSelect[0],
                element: elementSelect.length > 1 ? elementSelect : elementSelect[0]
            };
        }, EventBase.prototype.removeSelectedAppointmentClass = function() {
            for (var selectedAppointments = this.getSelectedAppointments(), _i = 0, selectedAppointments_1 = selectedAppointments; _i < selectedAppointments_1.length; _i++) {
                selectedAppointments_1[_i].setAttribute("aria-selected", "false");
            }
            removeClass(selectedAppointments, "e-appointment-border");
        }, EventBase.prototype.addSelectedAppointments = function(cells, focusCell) {
            for (var _i = 0, cells_1 = cells; _i < cells_1.length; _i++) {
                cells_1[_i].setAttribute("aria-selected", "true");
            }
            addClass(cells, "e-appointment-border");
        }, EventBase.prototype.getSelectedAppointments = function() {
            return [].slice.call(this.parent.element.querySelectorAll(".e-appointment-border,." + APPOINTMENT_CLASS + ":focus"));
        }, EventBase.prototype.focusElement = function() {
            var selectedCell = this.parent.getSelectedElements();
            if (selectedCell.length > 0) {
                if (this.parent.keyboardInteractionModule) {
                    var target = this.parent.activeCellsData.element || selectedCell[selectedCell.length - 1];
                    this.parent.keyboardInteractionModule.selectCells(!1, target);
                }
            } else {
                var selectedAppointments = this.getSelectedAppointments();
                selectedAppointments.length > 0 && selectedAppointments[selectedAppointments.length - 1].focus();
            }
        }, EventBase.prototype.selectWorkCellByTime = function(eventsData) {
            var target;
            if ("Agenda" === this.parent.currentView || "MonthAgenda" === this.parent.currentView) return target;
            if (eventsData.length > 0) {
                var selectedObject = eventsData[eventsData.length - 1], eventStartTime = selectedObject[this.parent.eventFields.startTime], nearestTime = new Date(+eventStartTime).setMinutes(0, 0, 0), isAllDay = this.isAllDayAppointment(selectedObject);
                ("Month" === this.parent.currentView || isAllDay) && (nearestTime = new Date(+eventStartTime).setHours(0, 0, 0, 0));
                var targetArea = void 0;
                if (targetArea = isAllDay && -1 !== [ "Day", "Week", "WorkWeek" ].indexOf(this.parent.currentView) ? this.parent.getAllDayRow() : this.parent.getContentTable(), 
                target = targetArea.querySelector('[data-date="' + nearestTime + '"]')) return this.parent.activeCellsData = this.parent.getCellDetails(target), 
                this.parent.keyboardInteractionModule && this.parent.keyboardInteractionModule.selectCells(!1, target), 
                target;
            }
            return target;
        }, EventBase.prototype.isAllDayAppointment = function(event) {
            var fieldMapping = this.parent.eventFields, isAllDay = event[fieldMapping.isAllDay], isFullDay = (event[fieldMapping.endTime].getTime() - event[fieldMapping.startTime].getTime()) / MS_PER_DAY >= 1;
            return !(!isAllDay && !isFullDay);
        }, EventBase.prototype.addEventListener = function() {
            this.parent.on("document-click", this.appointmentBorderRemove, this);
        }, EventBase.prototype.appointmentBorderRemove = function(event) {
            [].slice.call(this.parent.element.querySelectorAll("." + APPOINTMENT_CLASS));
            var element = event.event.target;
            closest(element, "." + APPOINTMENT_CLASS) ? this.parent.removeSelectedClass() : closest(element, ".e-popup-open") || this.removeSelectedAppointmentClass();
        }, EventBase.prototype.wireAppointmentEvents = function(element) {
            EventHandler.add(element, "click", this.eventClick, this), EventHandler.add(element, "dblclick", this.eventDoubleClick, this);
        }, EventBase.prototype.eventClick = function(eventData) {
            if (eventData.ctrlKey && 1 === eventData.which && this.parent.keyboardInteractionModule) return this.parent.selectedElements = [].slice.call(this.parent.element.querySelectorAll(".e-appointment-border")), 
            void this.parent.keyboardInteractionModule.onAppointmentSelection(eventData);
            this.removeSelectedAppointmentClass(), this.activeEventData(eventData);
            var args = extend(this.parent.activeEventData, {
                cancel: !1
            });
            this.parent.trigger("eventClick", args), args.cancel ? this.removeSelectedAppointmentClass() : this.parent.notify("eventClick", this.parent.activeEventData);
        }, EventBase.prototype.eventDoubleClick = function(e) {
            this.parent.quickPopup.quickPopup.animation = {
                close: {
                    effect: "None"
                }
            }, this.parent.quickPopup.quickPopup.close(), "touchstart" === e.type && this.activeEventData(e), 
            this.removeSelectedAppointmentClass();
            var fieldMapping = this.parent.eventFields;
            !isNullOrUndefined(this.parent.activeEventData.event) && isNullOrUndefined(this.parent.activeEventData.event[fieldMapping.recurrenceID]) ? (this.parent.currentAction = "Save", 
            this.parent.eventWindow.openEditor(this.parent.activeEventData.event, "Save")) : (this.parent.currentAction = "EditOccurrence", 
            this.parent.quickPopup.openRecurrenceAlert());
        }, EventBase.prototype.getEventByGuid = function(guid) {
            return new DataManager({
                json: this.parent.eventsProcessed
            }).executeLocal(new Query().where("Guid", "equal", guid))[0];
        }, EventBase.prototype.generateGuid = function() {
            return "xyxxxxyx-xxxy-yxxx-xyxx-xxyxxxxyyxxx".replace(/[xy]/g, function(c) {
                var r = 16 * Math.random() | 0;
                return ("x" === c ? r : 3 & r | 8).toString(16);
            });
        }, EventBase.prototype.getEventMaxId = function() {
            var fields = this.parent.eventFields;
            return this.parent.eventsData.length < 1 ? 0 : Math.max.apply(Math, this.parent.eventsData.map(function(event) {
                return event[fields.id];
            }));
        }, EventBase.prototype.activeEventData = function(eventData) {
            var target = closest(eventData.target, "." + APPOINTMENT_CLASS), guid = target.getAttribute("data-guid");
            this.addSelectedAppointments([].slice.call(this.parent.element.querySelectorAll('div[data-guid="' + guid + '"]')));
            var eventObject = this.getEventByGuid(guid);
            if (eventObject.isSpanned) {
                var fields_1 = this.parent.eventFields;
                eventObject = this.parent.eventsData.filter(function(obj) {
                    return obj[fields_1.id] === eventObject[fields_1.id];
                })[0];
            }
            this.parent.activeEventData = {
                event: eventObject,
                element: target
            };
        }, EventBase.prototype.generateOccurrence = function(event, viewDate) {
            for (var fields = this.parent.eventFields, startDate = event[fields.startTime], endDate = event[fields.endTime], occurrenceCollection = [], currentViewDate = isNullOrUndefined(viewDate) ? this.parent.activeView.startDate() : viewDate, dates = generate(startDate, event[fields.recurrenceRule], event[fields.recurrenceException], this.parent.firstDayOfWeek, void 0, currentViewDate), date = dates.shift(), duration = endDate.getTime() - startDate.getTime(); date; ) {
                var clonedObject = extend({}, event, null, !0);
                clonedObject[fields.startTime] = new Date(date), clonedObject[fields.endTime] = new Date(new Date(date).setMilliseconds(duration)), 
                clonedObject[fields.recurrenceID] = clonedObject[fields.id], clonedObject.Guid = this.generateGuid(), 
                occurrenceCollection.push(clonedObject), date = dates.shift();
            }
            return occurrenceCollection;
        }, EventBase.prototype.getRecurrenceEvent = function(eventData) {
            var eventFields = this.parent.eventFields;
            return new DataManager(this.parent.eventsData).executeLocal(new Query().where(eventFields.id, "equal", eventData[eventFields.recurrenceID]))[0];
        }, EventBase.prototype.getOccurrencesByID = function(id) {
            for (var fields = this.parent.eventFields, occurrenceCollection = [], _i = 0, _a = this.parent.eventsData.filter(function(obj) {
                return obj[fields.id] === id;
            }); _i < _a.length; _i++) {
                var event_2 = _a[_i];
                isNullOrUndefined(event_2[fields.recurrenceRule]) || (occurrenceCollection = occurrenceCollection.concat(this.generateOccurrence(event_2)));
            }
            return occurrenceCollection;
        }, EventBase.prototype.getOccurrencesByRange = function(startTime, endTime) {
            for (var fields = this.parent.eventFields, occurrenceCollection = [], _i = 0, _a = this.parent.eventsData; _i < _a.length; _i++) {
                var event_3 = _a[_i];
                isNullOrUndefined(event_3[fields.recurrenceRule]) || (occurrenceCollection = occurrenceCollection.concat(this.generateOccurrence(event_3)));
            }
            return occurrenceCollection.filter(function(obj) {
                return obj[fields.startTime] >= startTime && obj[fields.endTime] <= endTime && !isNullOrUndefined(obj[fields.recurrenceID]);
            });
        }, EventBase;
    }(), Crud = function() {
        function Crud(parent) {
            this.parent = parent, this.timezone = new Timezone();
        }
        return Crud.prototype.getQuery = function() {
            var start = this.parent.activeView.startDate(), end = this.parent.activeView.endDate();
            return this.parent.dataModule.generateQuery(start, end);
        }, Crud.prototype.refreshData = function(args) {
            var _this = this, actionArgs = {
                requestType: args.requestType,
                cancel: !1,
                data: args.data
            };
            if (this.parent.dataModule.dataManager.dataSource.offline) return this.parent.trigger("actionComplete", actionArgs), 
            void this.parent.renderModule.refreshDataManager();
            args.promise.then(function(e) {
                _this.parent.isDestroyed || (_this.parent.trigger("actionComplete", actionArgs), 
                actionArgs.cancel || _this.parent.renderModule.refreshDataManager());
            }).catch(function(e) {
                _this.parent.isDestroyed || _this.parent.trigger("actionFailure", {
                    error: e
                });
            });
        }, Crud.prototype.addEvent = function(eventData) {
            var fields = this.parent.eventFields, promise = null, editParms = {
                addedRecords: [],
                changedRecords: [],
                deletedRecords: []
            }, args = {
                requestType: "eventCreate",
                cancel: !1,
                data: eventData
            };
            if (this.parent.trigger("actionBegin", args), !args.cancel) {
                if (eventData instanceof Array) {
                    for (var _i = 0, _a = eventData; _i < _a.length; _i++) {
                        var event_1 = _a[_i];
                        this.processCrudTimezone(event_1), editParms.addedRecords.push(event_1);
                    }
                    promise = this.parent.dataModule.dataManager.saveChanges(editParms, fields.id, null, this.getQuery());
                } else this.processCrudTimezone(eventData), promise = this.parent.dataModule.dataManager.insert(eventData, null, this.getQuery());
                var crudArgs = {
                    requestType: "eventCreated",
                    cancel: !1,
                    data: eventData,
                    promise: promise
                };
                this.refreshData(crudArgs);
            }
        }, Crud.prototype.saveEvent = function(event, action) {
            var fields = this.parent.eventFields, promise = null, editParms = {
                addedRecords: [],
                changedRecords: [],
                deletedRecords: []
            }, args = {
                requestType: "eventChange",
                cancel: !1
            }, dataObj = [];
            event instanceof Array ? dataObj = event : dataObj.push(event);
            var data = event;
            if (isNullOrUndefined(action)) {
                if (args.data = data, this.parent.trigger("actionBegin", args), args.cancel) return;
                this.processCrudTimezone(data), promise = this.parent.dataModule.dataManager.update(fields.id, event, null, this.getQuery());
            } else {
                var parentEvent = this.parent.eventBase.getRecurrenceEvent(data);
                switch (action) {
                  case "EditOccurrence":
                    if (args.data = {
                        occurrence: event,
                        parent: parentEvent
                    }, this.parent.trigger("actionBegin", args), args.cancel) return;
                    var exDate = this.excludeDateCheck(data[fields.startTime], parentEvent[fields.recurrenceException]);
                    exDate !== parentEvent[fields.recurrenceException] ? (parentEvent[fields.recurrenceException] = exDate, 
                    data[fields.recurrenceID] = parentEvent[fields.id], this.processCrudTimezone(parentEvent), 
                    editParms.changedRecords.push(parentEvent), this.processCrudTimezone(data), editParms.addedRecords.push(data)) : (this.processCrudTimezone(data), 
                    editParms.changedRecords.push(data));
                    break;

                  case "EditSeries":
                    if (args.data = data, this.parent.trigger("actionBegin", args), args.cancel) return;
                    var delApp = new DataManager(this.parent.eventsData).executeLocal(new Query().where(fields.recurrenceID, "equal", parentEvent[fields.id]));
                    data[fields.id] = parentEvent[fields.id], data[fields.recurrenceException] = null, 
                    data[fields.recurrenceID] = null, this.processCrudTimezone(data), editParms.changedRecords.push(data);
                    for (var _i = 0, delApp_1 = delApp; _i < delApp_1.length; _i++) {
                        var event_2 = delApp_1[_i];
                        editParms.deletedRecords.push(event_2);
                    }
                }
                promise = this.parent.dataModule.dataManager.saveChanges(editParms, fields.id, null, this.getQuery());
            }
            this.parent.eventBase.selectWorkCellByTime(dataObj);
            var crudArgs = {
                requestType: "eventChanged",
                cancel: !1,
                data: args.data,
                promise: promise
            };
            this.refreshData(crudArgs);
        }, Crud.prototype.deleteEvent = function(id, action) {
            var fields = this.parent.eventFields, editParms = {
                addedRecords: [],
                changedRecords: [],
                deletedRecords: []
            }, dataObj = [], normalEvent = [], recEvent = [];
            switch (typeof id) {
              case "string":
              case "number":
                dataObj = new DataManager(this.parent.eventsData).executeLocal(new Query().where(fields.id, "equal", id));
                break;

              case "object":
                id instanceof Array ? dataObj = id : dataObj.push(id);
            }
            for (var _i = 0, dataObj_1 = dataObj; _i < dataObj_1.length; _i++) {
                var event_3 = dataObj_1[_i];
                isNullOrUndefined(event_3[fields.recurrenceRule]) ? normalEvent.push(event_3) : recEvent.push(event_3);
            }
            var args = {
                requestType: "eventRemove",
                cancel: !1
            };
            if ("DeleteOccurrence" === action || (args.data = dataObj, this.parent.trigger("actionBegin", args), 
            !args.cancel)) {
                if (isNullOrUndefined(action) || normalEvent.length > 0) for (var _a = 0, normalEvent_1 = normalEvent; _a < normalEvent_1.length; _a++) {
                    var event_4 = normalEvent_1[_a];
                    editParms.deletedRecords.push(event_4);
                }
                if (recEvent.length > 0) switch (action) {
                  case "Delete":
                  case "DeleteOccurrence":
                    for (var i = 0; i < recEvent.length; i++) {
                        var parentEvent = this.parent.eventBase.getRecurrenceEvent(recEvent[i]);
                        if (args.data = {
                            occurrence: recEvent[i],
                            parent: parentEvent
                        }, this.parent.trigger("actionBegin", args), args.cancel) return;
                        parentEvent[fields.recurrenceException] = this.excludeDateCheck(recEvent[i][fields.startTime], parentEvent[fields.recurrenceException]), 
                        this.processCrudTimezone(parentEvent), editParms.changedRecords.push(parentEvent), 
                        recEvent[i][fields.id] !== parentEvent[fields.id] && editParms.deletedRecords.push(recEvent[i]);
                    }
                    break;

                  case "DeleteSeries":
                    for (var _b = 0, recEvent_1 = recEvent; _b < recEvent_1.length; _b++) {
                        for (var app = recEvent_1[_b], predicate = new Predicate(fields.id, "equal", app[fields.recurrenceID]).or(new Predicate(fields.recurrenceID, "equal", app[fields.recurrenceID])), _c = 0, delApp_2 = new DataManager(this.parent.eventsData).executeLocal(new Query().where(predicate)); _c < delApp_2.length; _c++) {
                            var event_5 = delApp_2[_c];
                            editParms.deletedRecords.push(event_5);
                        }
                        editParms.deletedRecords.push(app);
                    }
                }
                var promise;
                promise = this.parent.dataModule.dataManager.saveChanges(editParms, fields.id, null, this.getQuery()), 
                this.parent.eventBase.selectWorkCellByTime(dataObj);
                var crudArgs = {
                    requestType: "eventRemoved",
                    cancel: !1,
                    data: args.data,
                    promise: promise
                };
                this.refreshData(crudArgs);
            }
        }, Crud.prototype.processCrudTimezone = function(events) {
            var fields = this.parent.eventFields;
            if (events[fields.startTimezone] || events[fields.endTimezone]) {
                var startTimezone = events[fields.startTimezone] || events[fields.endTimezone], endTimezone = events[fields.endTimezone] || events[fields.startTimezone];
                if (this.parent.timezone) {
                    var zone = this.parent.timezone;
                    events[fields.startTime] = this.timezone.convert(events[fields.startTime], startTimezone, zone), 
                    events[fields.endTime] = this.timezone.convert(events[fields.endTime], endTimezone, zone), 
                    events[fields.startTime] = this.timezone.remove(events[fields.startTime], zone), 
                    events[fields.endTime] = this.timezone.remove(events[fields.endTime], zone);
                } else events[fields.startTime] = this.timezone.remove(events[fields.startTime], startTimezone), 
                events[fields.endTime] = this.timezone.remove(events[fields.endTime], endTimezone);
            } else this.parent.timezone && (events[fields.startTime] = this.timezone.remove(events[fields.startTime], this.parent.timezone), 
            events[fields.endTime] = this.timezone.remove(events[fields.endTime], this.parent.timezone));
        }, Crud.prototype.excludeDateCheck = function(eventStartTime, exceptionDateList) {
            var exDate = getRecurrenceStringFromDate(eventStartTime);
            return isNullOrUndefined(exceptionDateList) ? exceptionDateList = exDate : -1 === exceptionDateList.indexOf(exDate) && (exceptionDateList = isNullOrUndefined(exceptionDateList) ? exDate : exceptionDateList + "," + exDate), 
            exceptionDateList;
        }, Crud;
    }(), FieldValidator = function() {
        function FieldValidator(parent) {
            this.parent = parent;
        }
        return FieldValidator.prototype.renderFormValidator = function(form, rules) {
            var _this = this;
            this.formObj = new FormValidator(form, {
                customPlacement: function(inputElement, error) {
                    _this.errorPlacement(inputElement, error);
                },
                rules: rules,
                validationComplete: function(args) {
                    _this.validationComplete(args);
                }
            });
        }, FieldValidator.prototype.validationComplete = function(args) {
            var elem = document.querySelector("#" + args.inputName + "_Error");
            elem && ("failure" === args.status ? elem.style.display = "" : elem.style.display = "none");
        }, FieldValidator.prototype.errorPlacement = function(inputElement, error) {
            var id = error.getAttribute("for");
            document.querySelector("#" + id + "_Error") || this.createTooltip(inputElement, error, id, "");
        }, FieldValidator.prototype.createTooltip = function(element, error, name, display) {
            var dlgContent, client, inputClient = element.getBoundingClientRect(), quickPopupElement = document.querySelector(".e-schedule-quick-popup");
            client = quickPopupElement ? (dlgContent = quickPopupElement.querySelector(".e-quick-popup")).getBoundingClientRect() : (dlgContent = document.querySelector(".e-schedule-dialog .e-dlg-content")).getBoundingClientRect();
            var div = createElement("div", {
                className: "e-tooltip-wrap e-popup e-schedule-error",
                id: name + "_Error",
                styles: "display:" + display + ";top:" + (inputClient.bottom - client.top + dlgContent.scrollTop + 9) + "px;left:" + (inputClient.left - client.left + dlgContent.scrollLeft + inputClient.width / 2) + "px;"
            }), content = createElement("div", {
                className: "e-tip-content"
            });
            content.appendChild(error);
            var arrow = createElement("div", {
                className: "e-arrow-tip e-tip-top"
            });
            arrow.appendChild(createElement("div", {
                className: "e-arrow-tip-outer e-tip-top"
            })), arrow.appendChild(createElement("div", {
                className: "e-arrow-tip-inner e-tip-top"
            })), div.appendChild(content), div.appendChild(arrow), dlgContent.appendChild(div), 
            div.style.left = parseInt(div.style.left, 10) - div.offsetWidth / 2 + "px";
        }, FieldValidator.prototype.destroyToolTip = function() {
            for (var _i = 0, elements_1 = [].slice.call(document.querySelectorAll(".e-schedule-error")); _i < elements_1.length; _i++) {
                remove(elements_1[_i]);
            }
            this.formObj.reset();
        }, FieldValidator.prototype.destroyForm = function() {
            this.formObj && !this.formObj.isDestroyed && this.formObj.destroy();
        }, FieldValidator;
    }(), QuickPopups = function() {
        function QuickPopups(parent) {
            this.isMultipleEventSelect = !1, this.parent = parent, this.l10n = this.parent.localeObj, 
            this.crudAction = new Crud(parent), this.fieldValidator = new FieldValidator(this.parent), 
            this.render(), this.addEventListener();
        }
        return QuickPopups.prototype.render = function() {
            this.renderQuickPopup(), this.renderQuickDialog(), this.renderMoreEventPopup(), 
            this.renderEventPopup();
        }, QuickPopups.prototype.renderQuickPopup = function() {
            this.quickPopup = new Tooltip({
                animation: {
                    open: {
                        effect: "FadeIn"
                    },
                    close: {
                        effect: "FadeOut"
                    }
                },
                afterOpen: this.afterQuickPopupOpen.bind(this),
                beforeOpen: this.beforeQuickPopupOpen.bind(this),
                beforeClose: this.beforeQuickPopupClose.bind(this),
                afterClose: this.afterQuickPopupClose.bind(this),
                cssClass: "e-schedule-quick-popup",
                enableRtl: this.parent.enableRtl,
                isSticky: !0,
                opensOn: "Custom",
                showTipPointer: !1
            }), this.quickPopup.appendTo(this.parent.element), this.primaryButton = new Button({
                cssClass: "e-primary",
                disabled: this.parent.activeViewOptions.readonly,
                enableRtl: this.parent.enableRtl
            }), this.flatButton = new Button({
                cssClass: "e-flat",
                disabled: this.parent.activeViewOptions.readonly,
                enableRtl: this.parent.enableRtl
            });
        }, QuickPopups.prototype.renderQuickDialog = function() {
            this.quickDialog = new Dialog({
                animationSettings: {
                    effect: "Zoom"
                },
                buttons: [ {
                    buttonModel: {
                        isPrimary: !0
                    },
                    click: this.dialogButtonClick.bind(this)
                }, {
                    buttonModel: {
                        isPrimary: !1
                    },
                    click: this.dialogButtonClick.bind(this)
                } ],
                cssClass: "e-quick-dialog",
                closeOnEscape: !0,
                enableRtl: this.parent.enableRtl,
                beforeClose: this.beforeQuickDialogClose.bind(this),
                isModal: !0,
                position: {
                    X: "center",
                    Y: "center"
                },
                showCloseIcon: !0,
                target: document.body,
                visible: !1,
                width: "auto"
            });
            var dialogElement = createElement("div", {
                id: this.parent.element.id + "QuickDialog"
            });
            this.parent.element.appendChild(dialogElement), this.quickDialog.appendTo(dialogElement);
        }, QuickPopups.prototype.renderMoreEventPopup = function() {
            var moreEventWrapper = createElement("div", {
                className: "e-more-event-popup-wrapper e-popup-close"
            });
            this.parent.element.appendChild(moreEventWrapper);
            var moreEventArgs = {
                classList: [ "e-more-event-popup", "e-more-event-header", "e-more-event-date-header", "e-header-day", "e-header-date e-navigate", "e-more-event-close" ],
                l10n: {
                    close: this.l10n.getConstant("close"),
                    noTitle: this.l10n.getConstant("noTitle")
                }
            }, moreEventContent = compile$$1('<div class="${classList[0]}"><div class="${classList[1]}"><div class="${classList[2]}" tabindex="0"><div class="${classList[3]}"></div><div class="${classList[4]}" tabindex="0"></div></div><div class="${classList[5]}" title="${l10n.close}" tabindex="0"></div></div></div>')(moreEventArgs)[0];
            this.morePopup = new Popup(moreEventWrapper, {
                targetType: "relative",
                content: moreEventContent,
                enableRtl: this.parent.enableRtl,
                hideAnimation: {
                    name: "ZoomOut",
                    duration: 300
                },
                showAnimation: {
                    name: "ZoomIn",
                    duration: 300
                },
                open: this.afterMorePopupOpen.bind(this),
                close: this.afterMorePopupClose.bind(this),
                collision: {
                    X: "flip",
                    Y: "flip"
                },
                viewPortElement: this.parent.element.querySelector("." + TABLE_CONTAINER_CLASS),
                zIndex: 10
            });
            new Button({
                iconCss: "e-icons e-close-icon",
                cssClass: "e-round",
                isPrimary: !1
            }).appendTo(moreEventContent.querySelector(".e-more-event-close")), EventHandler.add(moreEventContent.querySelector(".e-more-event-close"), "click", this.closeClick, this), 
            EventHandler.add(moreEventContent.querySelector(".e-header-date"), "click", this.dayNavigationClick, this);
        }, QuickPopups.prototype.dayNavigationClick = function(e) {
            if (!isNullOrUndefined(closest(e.target, ".e-navigate"))) {
                var date = this.parent.getDateFromElement(e.currentTarget);
                isNullOrUndefined(date) || this.parent.isAdaptive || (this.closeClick(), this.parent.setProperties({
                    selectedDate: date
                }, !0), this.parent.changeView("Day"));
            }
        }, QuickPopups.prototype.renderEventPopup = function() {
            var viewHeight = document.body.offsetHeight, eventWrapper = (this.parent.element.querySelector(".e-schedule-toolbar-container"), 
            createElement("div", {
                className: "e-select-event-popup-wrapper e-popup-close"
            }));
            this.parent.element.appendChild(eventWrapper);
            var eventArgs = {
                classList: [ "e-quick-popup", "e-quick-popup-table", "e-event-close", "e-edit-icon", "e-delete-icon", ICON$8, "e-event-title", "e-text-ellipsis", "e-quick-date-time-details", "e-quick-content", "e-date-time-icon", "e-time", "e-dialog-title", "e-event-container", "e-location", "e-calendar-icon", "e-quick-location-details", "e-time-zone", "e-event-zone-icon", "e-event-zone-details", "e-event-details", "e-event-note-icon", "e-event-note-details", "e-quick-popup-icon-container", "e-close-icon-container", "e-edit-icon-container", "e-device-date-time-details", "e-device-recurrence-summary" ],
                id: this.parent.element.id,
                l10n: {
                    close: this.l10n.getConstant("closeButton"),
                    delete: this.l10n.getConstant("delete"),
                    editSeries: this.l10n.getConstant("editSeries"),
                    editEvent: this.l10n.getConstant("editEvent")
                }
            };
            this.selectedEventPopup = compile$$1('<div id="${id}EventDetailsWindow" class="${classList[0]}"><div class="${classList[1]}"><div class="${classList[23]}"><div class="${classList[24]}"><div class="${classList[2]} ${classList[5]}" title="${l10n.close}" tabindex="0"></div></div><div class="${classList[25]}"><div class="${classList[3]} ${classList[5]}" title="${l10n.editEvent}" tabindex="0"></div><div class="${classList[4]} ${classList[5]}" title="${l10n.delete}" tabindex="0"></div></div></div><div class="${classList[6]} ${classList[7]}"></div></div><div class="${classList[9]}"><div class="${classList[11]}"><div class="${classList[10]} ${classList[5]}"></div><div class="${classList[8]} ${classList[7]}"><div class="${classList[26]} ${classList[7]}"></div><div class="${classList[27]} ${classList[7]}"></div></div></div><div class="${classList[14]}"><div class="${classList[15]} ${classList[5]}"></div><div class="${classList[16]} ${classList[7]}"></div></div><div class="${classList[17]}"><div class="${classList[18]} ${classList[5]}"></div><div class="${classList[19]} ${classList[7]}"></div></div><div class="${classList[20]}"><div class="${classList[21]} ${classList[5]}"></div><div class="${classList[22]} ${classList[7]}"></div></div></div>')(eventArgs)[0], 
            this.multipleEventPopup = compile$$1('<div id="${id}EventDetailsWindow" class="${classList[0]} ${classList[13]}"><div class="${classList[1]}"><tbody><div class="${classList[2]} ${classList[5]}" title="${l10n.close}" tabindex="0"></div><div class="${classList[12]}"></div><div class="${classList[3]} ${classList[5]}" title="${l10n.editEvent}" tabindex="0"></div><div class="${classList[4]} ${classList[5]}" title="${l10n.delete}" tabindex="0"></div></div>')(eventArgs)[0], 
            this.eventPopup = new Popup(eventWrapper, {
                targetType: "relative",
                content: this.selectedEventPopup,
                collision: {
                    X: "fit",
                    Y: "fit"
                },
                enableRtl: this.parent.enableRtl,
                hideAnimation: {
                    name: "ZoomOut"
                },
                showAnimation: {
                    name: "ZoomIn"
                },
                relateTo: document.body
            }), eventWrapper.querySelector(".e-quick-popup-table").style.height = formatUnit(25 * viewHeight / 100), 
            eventWrapper.querySelector(".e-quick-content").style.height = formatUnit(75 * viewHeight / 100), 
            EventHandler.add(this.selectedEventPopup.querySelector(".e-event-close"), "click", this.closeClick, this), 
            EventHandler.add(this.selectedEventPopup.querySelector(".e-edit-icon"), "click", this.editClick, this), 
            EventHandler.add(this.selectedEventPopup.querySelector(".e-delete-icon"), "click", this.deleteClick, this), 
            EventHandler.add(this.multipleEventPopup.querySelector(".e-event-close"), "click", this.closeClick, this), 
            EventHandler.add(this.multipleEventPopup.querySelector(".e-edit-icon"), "click", this.editClick, this), 
            EventHandler.add(this.multipleEventPopup.querySelector(".e-delete-icon"), "click", this.deleteClick, this);
        }, QuickPopups.prototype.openRecurrenceAlert = function() {
            var dialogFooter = this.quickDialog.element.querySelector(".e-footer-content").children;
            dialogFooter[0].innerHTML = "Delete" === this.parent.currentAction ? this.l10n.getConstant("deleteEvent") : this.l10n.getConstant("editEvent"), 
            dialogFooter[1].innerHTML = "Delete" === this.parent.currentAction ? this.l10n.getConstant("deleteSeries") : this.l10n.getConstant("editSeries"), 
            this.quickDialog.content = "Delete" === this.parent.currentAction ? this.l10n.getConstant("deleteRecurrenceContent") : this.l10n.getConstant("editContent"), 
            this.quickDialog.header = "Delete" === this.parent.currentAction ? this.l10n.getConstant("deleteEvent") : this.l10n.getConstant("editEvent"), 
            this.quickDialogClass("Recurrence"), this.showQuickDialog("RecurrenceAlert");
        }, QuickPopups.prototype.openDeleteAlert = function() {
            var dialogFooter = this.quickDialog.element.querySelector(".e-footer-content").children;
            dialogFooter[0].innerHTML = this.l10n.getConstant("delete"), dialogFooter[1].innerHTML = this.l10n.getConstant("cancel"), 
            this.quickDialog.content = this.l10n.getConstant("deleteContent"), this.quickDialog.header = this.l10n.getConstant("deleteEvent"), 
            this.quickDialogClass("Delete"), this.showQuickDialog("DeleteAlert");
        }, QuickPopups.prototype.openValidationError = function(type) {
            this.quickDialog.header = this.l10n.getConstant("alert"), this.quickDialog.content = this.l10n.getConstant(type);
            var dialogFooter = this.quickDialog.element.querySelector(".e-footer-content").children;
            dialogFooter[0].innerHTML = this.l10n.getConstant("ok"), dialogFooter[1].innerHTML = this.l10n.getConstant("cancel"), 
            this.quickDialogClass("Alert"), this.showQuickDialog("ValidationAlert");
        }, QuickPopups.prototype.showQuickDialog = function(popupType) {
            this.quickDialog.dataBind();
            var eventProp = {
                type: popupType,
                cancel: !1,
                data: this.parent.activeEventData,
                element: this.quickDialog.element
            };
            this.parent.trigger("popupOpen", eventProp), eventProp.cancel || this.quickDialog.show();
        }, QuickPopups.prototype.createMoreEventList = function(events) {
            for (var fields = this.parent.eventFields, moreEventContentEle = createElement("div", {
                className: "e-more-event-content"
            }), moreEventWrapperEle = createElement("div", {
                className: "e-more-appointment-wrapper"
            }), _i = 0, events_1 = events; _i < events_1.length; _i++) {
                var event_1 = events_1[_i], appointmentEle = createElement("div", {
                    id: "" + event_1[fields.id],
                    className: APPOINTMENT_CLASS,
                    attrs: {
                        "data-guid": event_1.Guid,
                        role: "button",
                        tabindex: "0",
                        "aria-readonly": "false",
                        "aria-selected": "false",
                        "aria-grabbed": "true",
                        "aria-label": isNullOrUndefined(event_1[fields.subject]) ? this.parent.eventSettings.fields.subject.default : event_1[fields.subject]
                    }
                });
                if (appointmentEle.appendChild(createElement("div", {
                    className: "e-subject",
                    innerHTML: event_1[fields.subject] || this.parent.eventSettings.fields.subject.default
                })), !isNullOrUndefined(event_1[fields.recurrenceRule])) {
                    var iconClass = event_1[fields.id] === event_1[fields.recurrenceID] ? "e-recurrence-icon" : "e-recurrence-edit-icon";
                    appointmentEle.appendChild(createElement("div", {
                        className: "e-icons " + iconClass
                    }));
                }
                this.parent.eventBase.wireAppointmentEvents(appointmentEle), moreEventWrapperEle.appendChild(appointmentEle);
            }
            return moreEventContentEle.appendChild(moreEventWrapperEle), moreEventContentEle;
        }, QuickPopups.prototype.eventHold = function(args) {
            var target = args.target;
            if (this.isMultipleEventSelect = !1, !isNullOrUndefined(closest(target, "." + APPOINTMENT_CLASS)) && this.parent.isAdaptive) return target = closest(target, "." + APPOINTMENT_CLASS), 
            this.parent.selectedElements = [], this.isMultipleEventSelect = !0, void this.selectedEventDialog(target);
        }, QuickPopups.prototype.cellClick = function(args) {
            if (this.parent.showQuickInfo && "MonthAgenda" !== this.parent.currentView) {
                var target = closest(args.event.target, ".e-work-cells,.e-all-day-cells,.e-header-cells");
                if (!isNullOrUndefined(target) && !args.event.target.classList.contains("e-more-indicator")) {
                    this.parent.activeCellsData.isAllDay ? this.l10n.getConstant("allDay") : (this.getDateFormat(this.parent.activeCellsData.startTime, "hm"), 
                    this.getDateFormat(this.parent.activeCellsData.endTime, "hm"));
                    var temp = {};
                    temp[this.parent.eventFields.startTime] = this.parent.activeCellsData.startTime, 
                    temp[this.parent.eventFields.endTime] = this.parent.activeCellsData.endTime, temp[this.parent.eventFields.isAllDay] = this.parent.activeCellsData.isAllDay;
                    var cellTemplate = '<div id="${id}EventCreateWindow" class="${classList[0]}"><table class="${classList[1]}"><tbody><tr><td><form class="${classList[2]}" onsubmit="return false;"><input class="${classList[3]}" type="text" name="Subject" /></form></td></tr><tr><td><div class="${classList[4]} ${classList[8]}">' + this.getFormattedString(temp, "cell").details + '</div></td></tr></tbody></table><div class="${classList[5]}"><div class="${classList[6]} ${classList[8]}" title="${l10n.moreDetails}" tabindex="0">${l10n.moreDetails}</div><div class="${classList[7]} ${classList[8]}" title="${l10n.save}" tabindex="0">${l10n.save}</div></div></div>', cellArgs = {
                        classList: [ "e-quick-popup", "e-quick-popup-table", "e-schedule-form", "e-quick-subject", "e-quick-date-time-details", "e-quick-footer", "e-event-details", "e-event-create", "e-text-ellipsis" ],
                        id: this.parent.element.id,
                        l10n: {
                            moreDetails: this.l10n.getConstant("moreDetails"),
                            save: this.l10n.getConstant("save")
                        }
                    }, quickCellPopup = compile$$1(cellTemplate)(cellArgs)[0];
                    Input.createInput({
                        element: quickCellPopup.querySelector(".e-quick-subject"),
                        properties: {
                            placeholder: this.l10n.getConstant("addTitle")
                        }
                    }), this.flatButton.appendTo(quickCellPopup.querySelector(".e-event-details")), 
                    this.primaryButton.appendTo(quickCellPopup.querySelector(".e-event-create")), EventHandler.add(quickCellPopup.querySelector(".e-event-create"), "click", this.saveClick, this), 
                    EventHandler.add(quickCellPopup.querySelector(".e-event-details"), "click", this.detailsClick, this), 
                    this.quickPopup.content = quickCellPopup, this.quickPopup.target = ".e-work-cells", 
                    this.quickPopup.dataBind(), this.applyFormValidation(), this.morePopup && this.morePopup.hide(), 
                    this.parent.isAdaptive || null !== target.getAttribute("data-tooltip-id") ? quickCellPopup.querySelector(".e-quick-subject").focus() : (this.quickPopup.close(), 
                    this.quickPopup.open(target));
                }
            }
        }, QuickPopups.prototype.applyFormValidation = function() {
            var form = this.quickPopup.content.querySelector(".e-schedule-form"), rules = {};
            rules[this.parent.eventSettings.fields.subject.name] = this.parent.eventSettings.fields.subject.validation, 
            this.fieldValidator.renderFormValidator(form, rules);
        }, QuickPopups.prototype.eventClick = function(events) {
            if (this.parent.eventTooltip && this.parent.eventTooltip.close(), this.parent.showQuickInfo) if (this.parent.isAdaptive) this.isMultipleEventSelect ? this.selectedEventDialog(closest(events.element, "." + APPOINTMENT_CLASS)) : this.deviceEventClick(events); else {
                var eventData = events.event, args = this.getFormattedString(eventData, "event"), eventTemplate = '<div id="${id}EventDetailsWindow" class="${classList[0]}"><table class="${classList[1]}"><tbody><tr><td><div class="${classList[2]} ${classList[7]}">' + args.eventSubject + '</div></td></tr><tr><td><div class="${classList[3]} ${classList[7]}">' + args.details + '</div></td></tr></tbody></table><div class="${classList[4]}"><div class="${classList[5]} ${classList[7]}" title="${l10n.delete}" tabindex="0">${l10n.delete}</div><div class="${classList[6]} ${classList[7]}" title="${l10n.edit}" tabindex="0">${l10n.edit}</div></div></div>', eventArgs = {
                    classList: [ "e-quick-popup", "e-quick-popup-table", "e-event-title", "e-quick-date-time-details", "e-quick-footer", "e-event-delete", "e-event-edit", "e-text-ellipsis" ],
                    id: this.parent.element.id,
                    l10n: {
                        delete: this.l10n.getConstant("delete"),
                        edit: this.l10n.getConstant("edit")
                    }
                }, quickEventPopup = compile$$1(eventTemplate)(eventArgs)[0];
                this.flatButton.appendTo(quickEventPopup.querySelector(".e-event-delete")), this.primaryButton.appendTo(quickEventPopup.querySelector(".e-event-edit")), 
                EventHandler.add(quickEventPopup.querySelector(".e-event-delete"), "click", this.deleteClick, this), 
                EventHandler.add(quickEventPopup.querySelector(".e-event-edit"), "click", this.editClick, this), 
                this.quickPopup.content = quickEventPopup, this.quickPopup.target = "." + APPOINTMENT_CLASS, 
                this.quickPopup.dataBind(), this.morePopup && !closest(events.element, ".e-more-appointment-wrapper") && this.morePopup.hide(), 
                this.parent.isAdaptive || null !== events.element.getAttribute("data-tooltip-id") ? this.quickPopup.content.querySelector(".e-event-edit").focus() : (this.quickPopup.close(), 
                this.quickPopup.open(events.element));
            }
        }, QuickPopups.prototype.deviceEventClick = function(events) {
            var fields = this.parent.eventFields, eventData = events.event, eventSelectSubject = isNullOrUndefined(eventData[fields.subject]) ? this.l10n.getConstant("noTitle") : eventData[fields.subject], eventTimeDetails = eventData[fields.isAllDay] ? this.l10n.getConstant("allDay") : this.getDateFormat(eventData[fields.startTime], "hm") + " - " + this.getDateFormat(eventData[fields.endTime], "hm"), eventSelectDetails = this.getTimeDetails(eventData) + " (" + eventTimeDetails + ")";
            if (this.selectedEventPopup.querySelector(".e-event-title").innerHTML = eventSelectSubject, 
            this.selectedEventPopup.querySelector(".e-device-date-time-details").innerHTML = eventSelectDetails, 
            this.selectedEventPopup.querySelector(".e-quick-location-details").innerHTML = isNullOrUndefined(eventData[fields.location]) ? "" : eventData[fields.location], 
            this.selectedEventPopup.querySelector(".e-event-zone-details").innerHTML = this.getTimezone(eventData), 
            this.selectedEventPopup.querySelector(".e-event-note-details").innerHTML = isNullOrUndefined(eventData[fields.description]) ? "" : eventData[fields.description], 
            isNullOrUndefined(eventData[fields.recurrenceRule])) this.selectedEventPopup.querySelector(".e-device-recurrence-summary").innerHTML = ""; else {
                var ruleSummary = this.parent.eventWindow.getRecurrenceEditorInstance().getRuleSummary(eventData[fields.recurrenceRule]);
                this.selectedEventPopup.querySelector(".e-device-recurrence-summary").innerHTML = ruleSummary.charAt(0).toUpperCase() + ruleSummary.slice(1);
            }
            isNullOrUndefined(eventData[fields.location]) || "" === eventData[fields.location] ? addClass([ this.selectedEventPopup.querySelector(".e-location") ], "e-disable") : removeClass([ this.selectedEventPopup.querySelector(".e-location") ], "e-disable"), 
            isNullOrUndefined(eventData[fields.startTimezone]) && isNullOrUndefined(eventData[fields.endTimezone]) ? addClass([ this.selectedEventPopup.querySelector(".e-time-zone") ], "e-disable") : removeClass([ this.selectedEventPopup.querySelector(".e-time-zone") ], "e-disable"), 
            isNullOrUndefined(eventData[fields.description]) || "" === eventData[fields.description] ? addClass([ this.selectedEventPopup.querySelector(".e-event-details") ], "e-disable") : removeClass([ this.selectedEventPopup.querySelector(".e-event-details") ], "e-disable"), 
            this.eventPopup.content = this.selectedEventPopup, this.eventPopup && !closest(events.element, ".e-more-appointment-wrapper") && this.showEventPopup("ViewEventInfo");
        }, QuickPopups.prototype.showEventPopup = function(popupType) {
            var eventProp = {
                type: popupType,
                cancel: !1,
                data: this.parent.activeEventData.event,
                target: this.parent.activeEventData.element,
                element: this.eventPopup.element
            };
            this.parent.trigger("popupOpen", eventProp), eventProp.cancel || this.eventPopup.show();
        }, QuickPopups.prototype.getFormattedString = function(eventData, type) {
            var details, fields = this.parent.eventFields, eventSubject = isNullOrUndefined(eventData[fields.subject]) ? this.l10n.getConstant("noTitle") : eventData[fields.subject], startDate = eventData[fields.startTime], endDate = eventData[fields.endTime], startDateDetails = this.getDateFormat(startDate, "long"), endDateDetails = eventData[fields.isAllDay] && 0 === endDate.getHours() && 0 === endDate.getMinutes() ? this.getDateFormat(addDays(new Date(endDate.getTime()), -1), "long") : this.getDateFormat(endDate, "long"), startTimeDetail = this.getDateFormat(startDate, "hm"), endTimeDetail = this.getDateFormat(endDate, "hm"), allDayLength = (endDate.getTime() - startDate.getTime()) / MS_PER_DAY, spanLength = endDate.getDate() !== startDate.getDate() && (endDate.getTime() - startDate.getTime()) / 36e5 < 24 ? 1 : 0;
            return eventData[fields.isAllDay] || allDayLength >= 1 || spanLength > 0 ? (details = startDateDetails + " (" + (eventData[fields.isAllDay] ? this.l10n.getConstant("allDay") : startTimeDetail) + ")", 
            (allDayLength > 1 || spanLength > 0) && (details += "&nbsp;-&nbsp;" + endDateDetails + " (" + (eventData[fields.isAllDay] ? this.l10n.getConstant("allDay") : endTimeDetail) + ")")) : details = startDateDetails + " (" + startTimeDetail + "&nbsp;-&nbsp;" + endTimeDetail + ")", 
            {
                eventSubject: eventSubject,
                details: details
            };
        }, QuickPopups.prototype.moreEventClick = function(data) {
            if (this.parent.showQuickInfo) {
                this.morePopup.element.querySelector(".e-more-event-content") && this.morePopup.element.querySelector(".e-more-event-content").remove(), 
                this.morePopup.element.children[0].appendChild(this.createMoreEventList(data.event));
                var selectedDate = data.date.getTime().toString(), target = closest(data.element, ".e-more-indicator");
                this.morePopup.element.querySelector(".e-header-day").innerHTML = this.getDateFormat(data.date, "E"), 
                this.morePopup.element.querySelector(".e-header-date").innerHTML = this.getDateFormat(data.date, "d"), 
                this.morePopup.element.querySelector(".e-header-date").setAttribute("data-date", selectedDate), 
                this.morePopup.relateTo = closest(target, ".e-work-cells");
                var eventProp = {
                    type: "EventContainer",
                    data: data,
                    cancel: !1,
                    element: this.morePopup.element
                };
                this.parent.trigger("popupOpen", eventProp), eventProp.cancel || this.morePopup.show();
            }
        }, QuickPopups.prototype.saveClick = function() {
            if (this.quickPopup.content.querySelector(".e-schedule-form").ej2_instances[0].validate()) {
                this.quickPopup.close();
                var fields = this.parent.eventFields, saveObj = {};
                saveObj[fields.id] = this.parent.eventBase.getEventMaxId() + 1, saveObj[fields.subject] = this.quickPopup.content.querySelector(".e-quick-subject").value || this.parent.eventSettings.fields.subject.default, 
                saveObj[fields.startTime] = this.parent.activeCellsData.startTime, saveObj[fields.endTime] = this.parent.activeCellsData.endTime, 
                saveObj[fields.isAllDay] = this.parent.activeCellsData.isAllDay, this.crudAction.addEvent(saveObj);
            }
        }, QuickPopups.prototype.detailsClick = function() {
            var subject = this.quickPopup.content.querySelector(".e-quick-subject").value;
            if ("" !== subject) extend(this.parent.activeCellsData, {
                subject: subject
            });
            this.fieldValidator.destroyToolTip(), this.quickPopup.close(), this.parent.eventWindow.openEditor(this.parent.activeCellsData, "Add");
        }, QuickPopups.prototype.editClick = function(event) {
            this.quickPopup.close({
                effect: "None"
            }), this.morePopup.hide();
            var data = this.parent.activeEventData.event;
            if (this.parent.currentAction = "EditSeries", this.parent.isAdaptive && (this.eventPopup.hide(), 
            this.isMultipleEventSelect = !1, !isNullOrUndefined(data[this.parent.eventFields.recurrenceRule]))) return this.parent.currentAction = "EditOccurrence", 
            void this.openRecurrenceAlert();
            isNullOrUndefined(data[this.parent.eventFields.recurrenceRule]) ? this.parent.eventWindow.openEditor(data, this.parent.currentAction) : (this.parent.currentAction = "EditOccurrence", 
            this.openRecurrenceAlert());
        }, QuickPopups.prototype.deleteClick = function() {
            this.quickPopup.close({
                effect: "None"
            }), this.morePopup.hide(), this.parent.isAdaptive && (this.eventPopup.hide(), this.isMultipleEventSelect = !1), 
            this.parent.currentAction = "Delete", this.parent.activeEventData.event[this.parent.eventFields.recurrenceRule] ? this.openRecurrenceAlert() : this.openDeleteAlert();
        }, QuickPopups.prototype.closeClick = function() {
            this.morePopup.hide(), this.eventPopup.hide(), this.isMultipleEventSelect = !1;
        }, QuickPopups.prototype.dialogButtonClick = function(event) {
            if (this.quickDialog.hide(), event.target.classList.contains("e-quick-dialog-edit-event")) switch (this.parent.currentAction = "Delete" === this.parent.currentAction ? "DeleteOccurrence" : "EditOccurrence", 
            this.parent.currentAction) {
              case "EditOccurrence":
                this.parent.eventWindow.openEditor(this.parent.activeEventData.event, this.parent.currentAction);
                break;

              case "DeleteOccurrence":
                this.crudAction.deleteEvent(this.parent.activeEventData.event, this.parent.currentAction);
            } else if (event.target.classList.contains("e-quick-dialog-edit-series")) switch (this.parent.currentAction = "Delete" === this.parent.currentAction ? "DeleteSeries" : "EditSeries", 
            this.parent.currentAction) {
              case "EditSeries":
                var parentEvent = this.parent.eventBase.getRecurrenceEvent(this.parent.activeEventData.event);
                this.parent.eventWindow.openEditor(parentEvent, this.parent.currentAction);
                break;

              case "DeleteSeries":
                this.crudAction.deleteEvent(this.parent.activeEventData.event, this.parent.currentAction);
            } else event.target.classList.contains("e-quick-dialog-delete") && this.crudAction.deleteEvent(this.parent.activeEventData.event, this.parent.currentAction);
        }, QuickPopups.prototype.selectedEventDialog = function(target) {
            var selectedElements = this.parent.eventBase.getSelectedEventElements(target);
            this.parent.activeEventData = this.parent.eventBase.getSelectedEvents(), 1 === selectedElements.length ? (this.multipleEventPopup.querySelector(".e-dialog-title").innerHTML = selectedElements[0].querySelector(".e-subject").textContent, 
            removeClass([ this.multipleEventPopup.querySelector(".e-edit-icon") ], "e-event-edit-disable"), 
            this.eventPopup.content = this.multipleEventPopup, this.eventPopup && !closest(target, ".e-more-appointment-wrapper") && this.showEventPopup("EditEventInfo")) : selectedElements.length <= 0 ? (this.parent.selectedElements = [], 
            this.isMultipleEventSelect = !1, this.eventPopup.hide()) : selectedElements.length > 1 && (this.multipleEventPopup.querySelector(".e-dialog-title").innerHTML = "(" + selectedElements.length.toString() + ")&nbsp;" + this.l10n.getConstant("selectedItems"), 
            addClass([ this.multipleEventPopup.querySelector(".e-edit-icon") ], "e-event-edit-disable"));
        }, QuickPopups.prototype.getTimezone = function(event) {
            var fields = this.parent.eventFields, zoneDetails = "";
            return timezoneData.filter(function(zoneData) {
                isNullOrUndefined(event[fields.startTimezone]) || zoneData.Value !== event[fields.startTimezone] || (zoneDetails = zoneData.Text.split(") ")[0] + ")" + zoneDetails), 
                isNullOrUndefined(event[fields.endTimezone]) || zoneData.Value !== event[fields.endTimezone] || (zoneDetails = zoneDetails + "&nbsp;" + zoneData.Text.split(") ")[0] + ")");
            }), zoneDetails;
        }, QuickPopups.prototype.getTimeDetails = function(event) {
            var fields = this.parent.eventFields, startDate = event[fields.startTime], endDate = event[fields.endTime], allDayLength = (endDate.getTime() - startDate.getTime()) / MS_PER_DAY;
            return this.getDateFormat(startDate, "yMd") === this.getDateFormat(endDate, "yMd") || event[fields.isAllDay] && 1 === allDayLength ? this.parent.globalize.formatDate(startDate, {
                format: "MMMM d, yyyy"
            }) : this.parent.globalize.formatDate(startDate, {
                format: "MMM dd"
            }) + " - " + this.parent.globalize.formatDate(endDate, {
                format: "MMM dd, yyyy"
            });
        }, QuickPopups.prototype.getDateFormat = function(date, formatString) {
            return this.parent.globalize.formatDate(date, {
                skeleton: formatString
            });
        }, QuickPopups.prototype.afterQuickPopupOpen = function(args) {
            this.quickPopup.content.querySelector(".e-quick-subject") && this.quickPopup.content.querySelector(".e-quick-subject").focus(), 
            this.quickPopup.content.querySelector(".e-event-edit") && this.quickPopup.content.querySelector(".e-event-edit").focus();
        }, QuickPopups.prototype.beforeQuickPopupOpen = function(args) {
            args.element.querySelector(".e-tooltip-close").setAttribute("title", this.l10n.getConstant("close")), 
            EventHandler.add(args.element, "keydown", this.keyPress, this);
            var eventProp = {
                type: "QuickInfo",
                cancel: !1,
                data: this.getDataFromTarget(args.target),
                target: args.target,
                element: args.element
            };
            this.parent.trigger("popupOpen", eventProp), eventProp.cancel && (args.cancel = !0);
        }, QuickPopups.prototype.getDataFromTarget = function(target) {
            return target.classList.contains(APPOINTMENT_CLASS) ? this.parent.activeEventData.event : this.parent.activeCellsData;
        }, QuickPopups.prototype.beforeQuickPopupClose = function(args) {
            EventHandler.remove(args.element, "keydown", this.keyPress);
        }, QuickPopups.prototype.beforeQuickDialogClose = function(args) {
            this.parent.eventBase.focusElement();
        }, QuickPopups.prototype.keyPress = function(event) {
            var popupElement = this.quickPopup.content;
            9 === event.keyCode && (event.target !== popupElement.querySelector(".e-event-create") || event.shiftKey || (event.preventDefault(), 
            popupElement.querySelector(".e-quick-subject").focus()), event.target !== popupElement.querySelector(".e-event-edit") || event.shiftKey || (event.preventDefault(), 
            popupElement.querySelector(".e-event-delete").focus()), event.target === popupElement.querySelector(".e-quick-subject") && event.shiftKey && (event.preventDefault(), 
            popupElement.querySelector(".e-event-create").focus()), event.target === popupElement.querySelector(".e-event-delete") && event.shiftKey && (event.preventDefault(), 
            popupElement.querySelector(".e-event-edit").focus())), 13 === event.keyCode && (event.target === popupElement.querySelector(".e-event-details") ? event.target.click() : event.target === popupElement.querySelector(".e-event-create") || event.target === popupElement.querySelector(".e-event-edit") || event.target === popupElement.querySelector(".e-event-delete") ? event.target.click() : event.target === popupElement.querySelector(".e-quick-subject") && (popupElement.querySelector(".e-event-create").click(), 
            event.preventDefault())), 27 === event.keyCode && this.parent.quickPopup.onClosePopup();
        }, QuickPopups.prototype.afterMorePopupOpen = function(event) {
            this.parent.element.querySelector(".e-more-event-popup-wrapper").querySelector(".e-header-date").focus(), 
            this.morePopup.refreshPosition();
        }, QuickPopups.prototype.afterMorePopupClose = function(event) {
            isNullOrUndefined(this.parent.element.querySelector(".e-more-appointment-wrapper")) || this.parent.element.querySelector(".e-more-appointment-wrapper").remove();
        }, QuickPopups.prototype.afterQuickPopupClose = function(args) {
            this.parent.eventBase.focusElement();
        }, QuickPopups.prototype.quickDialogClass = function(action) {
            var buttonElement = this.quickDialog.element.querySelector(".e-footer-content").children;
            switch (removeClass(buttonElement, [ "e-quick-dialog-edit-event", "e-quick-dialog-edit-series", "e-quick-dialog-delete", "e-quick-dialog-cancel", "e-quick-dialog-alert-btn", "e-quick-dialog-hide-btn" ]), 
            action) {
              case "Recurrence":
                addClass([ buttonElement[0] ], "e-quick-dialog-edit-event"), addClass([ buttonElement[1] ], "e-quick-dialog-edit-series"), 
                addClass([ buttonElement[1] ], "e-flat");
                break;

              case "Delete":
                addClass([ buttonElement[0] ], "e-quick-dialog-delete"), addClass([ buttonElement[1] ], "e-quick-dialog-cancel"), 
                removeClass([ buttonElement[1] ], "e-flat");
                break;

              case "Alert":
                addClass([ buttonElement[0] ], "e-quick-dialog-alert-btn"), addClass([ buttonElement[1] ], "e-quick-dialog-hide-btn");
            }
        }, QuickPopups.prototype.documentClick = function(e) {
            var target = e.event.target;
            closest(target, ".e-schedule-quick-popup") || null !== target.getAttribute("data-tooltip-id") || this.quickPopup.close(), 
            closest(target, ".e-more-event-popup-wrapper") || target.classList.contains("e-more-indicator") || this.morePopup.hide();
        }, QuickPopups.prototype.onClosePopup = function() {
            this.quickPopup.close(), this.eventPopup.hide(), this.isMultipleEventSelect = !1, 
            this.parent.eventBase.focusElement();
        }, QuickPopups.prototype.addEventListener = function() {
            this.parent.on("cellClick", this.cellClick, this), this.parent.on("eventClick", this.eventClick, this), 
            this.parent.on("document-click", this.documentClick, this);
        }, QuickPopups.prototype.destroy = function() {
            this.quickPopup.destroy(), this.morePopup.destroy(), this.eventPopup.destroy(), 
            this.quickDialog.destroy(), remove(this.quickDialog.element), this.quickDialog.element = null, 
            this.fieldValidator.destroyForm();
        }, QuickPopups;
    }(), EventTooltip = function() {
        function EventTooltip(parent) {
            this.parent = parent, this.l10n = this.parent.localeObj, this.tooltipObj = new Tooltip({
                content: "No title",
                position: "BottomRight",
                offsetY: 10,
                mouseTrail: !this.parent.isAdaptive,
                showTipPointer: !1,
                cssClass: EVENT_TOOLTIP_ROOT_CLASS,
                target: "." + APPOINTMENT_CLASS,
                beforeRender: this.onBeforeRender.bind(this),
                enableRtl: this.parent.enableRtl
            }), this.tooltipObj.appendTo(this.parent.element);
        }
        return EventTooltip.prototype.onBeforeRender = function(args) {
            if (isNullOrUndefined(args.target.getAttribute("data-tooltip-id"))) {
                var record = this.parent.eventBase.getEventByGuid(args.target.getAttribute("data-guid")), content = "";
                if (isNullOrUndefined(this.parent.eventSettings.tooltipTemplate)) {
                    var globalize = this.parent.globalize, fields = this.parent.eventFields, eventStart = new Date("" + record[fields.startTime]), eventEnd = new Date("" + record[fields.endTime]);
                    eventEnd = 0 === eventEnd.getHours() && 0 === eventEnd.getMinutes() ? new Date(eventEnd.setMilliseconds(-1e3)) : eventEnd;
                    var startDate = resetTime(new Date("" + eventStart)), endDate = resetTime(new Date("" + eventEnd)), tooltipSubject = isNullOrUndefined(record[fields.subject]) ? this.parent.eventSettings.fields.subject.default : record[fields.subject], tooltipLocation = isNullOrUndefined(record[fields.location]) ? "" : record[fields.location], startMonthDate = globalize.formatDate(eventStart, {
                        type: "date",
                        skeleton: "MMMd"
                    }), startMonthYearDate = (globalize.formatDate(eventEnd, {
                        type: "date",
                        skeleton: "MMMd"
                    }), globalize.formatDate(eventStart, {
                        type: "date",
                        skeleton: "yMMMd"
                    })), endMonthYearDate = globalize.formatDate(eventEnd, {
                        type: "date",
                        skeleton: "yMMMd"
                    }), startTime = globalize.formatDate(eventStart, {
                        type: "time",
                        skeleton: "short"
                    }), endTime = globalize.formatDate(eventEnd, {
                        type: "time",
                        skeleton: "short"
                    });
                    content = '<div class="e-subject">' + tooltipSubject + '</div><div class="e-location">' + tooltipLocation + '</div><div class="e-details">' + (startDate.getTime() === endDate.getTime() ? globalize.formatDate(eventStart, {
                        type: "date",
                        skeleton: "long"
                    }) : startDate.getFullYear() === endDate.getFullYear() ? startMonthDate + " - " + endMonthYearDate : startMonthYearDate + " - " + endMonthYearDate) + '</div><div class="e-all-day">' + (record[fields.isAllDay] ? this.l10n.getConstant("allDay") : startTime + " - " + endTime) + "</div>";
                } else content = this.parent.getEventTooltipTemplate()(record)[0];
                this.tooltipObj.content = content;
            }
        }, EventTooltip.prototype.close = function() {
            this.tooltipObj.close();
        }, EventTooltip.prototype.destroy = function() {
            this.tooltipObj.destroy(), this.tooltipObj = null;
        }, EventTooltip;
    }(), EventWindow = function() {
        function EventWindow(parent) {
            this.parent = parent, this.l10n = this.parent.localeObj, this.fields = this.parent.eventFields, 
            this.fieldValidator = new FieldValidator(this.parent), this.timezone = new Timezone(), 
            this.renderEventWindow();
        }
        return EventWindow.prototype.renderEventWindow = function() {
            var dialogContent = this.getEventWindowContent();
            this.element = createElement("div", {
                id: this.parent.element.id + "_dialog_wrapper"
            }), this.parent.element.appendChild(this.element), this.parent.isAdaptive ? this.dialogObject = new Dialog({
                animationSettings: {
                    effect: "Zoom"
                },
                content: dialogContent,
                cssClass: "e-schedule-dialog e-device",
                enableRtl: this.parent.enableRtl,
                header: '<div class="e-title-header"><div class="e-back-icon e-icons"></div><div class="e-title-text">' + this.l10n.getConstant("newEvent") + '</div><div class="e-save-icon e-icons"></div></div>',
                height: "100%",
                isModal: !0,
                showCloseIcon: !1,
                target: document.body,
                visible: !1,
                beforeOpen: this.onBeforeOpen.bind(this),
                beforeClose: this.onBeforeClose.bind(this)
            }) : this.dialogObject = new Dialog({
                animationSettings: {
                    effect: "Zoom"
                },
                buttons: [ {
                    buttonModel: {
                        content: this.l10n.getConstant("deleteButton"),
                        cssClass: "e-event-delete"
                    },
                    click: this.eventDelete.bind(this)
                }, {
                    buttonModel: {
                        content: this.l10n.getConstant("saveButton"),
                        cssClass: "e-primary e-event-save",
                        isPrimary: !0
                    },
                    click: this.eventSave.bind(this)
                }, {
                    buttonModel: {
                        cssClass: "e-event-cancel",
                        content: this.l10n.getConstant("cancelButton")
                    },
                    click: this.dialogClose.bind(this)
                } ],
                content: dialogContent,
                cssClass: "e-schedule-dialog",
                enableRtl: this.parent.enableRtl,
                header: '<div class="e-title-text">' + this.l10n.getConstant("newEvent") + "</div>",
                isModal: !0,
                showCloseIcon: !0,
                target: document.body,
                visible: !1,
                width: "500px",
                beforeOpen: this.onBeforeOpen.bind(this),
                beforeClose: this.onBeforeClose.bind(this)
            }), this.dialogObject.appendTo(this.element), addClass([ this.element.parentElement ], "e-schedule-dialog-container"), 
            this.parent.isAdaptive && (EventHandler.add(this.element.querySelector(".e-back-icon"), "click", this.dialogClose, this), 
            EventHandler.add(this.element.querySelector(".e-save-icon"), "click", this.eventSave, this)), 
            this.applyFormValidation();
        }, EventWindow.prototype.openEditor = function(data, type) {
            switch (this.parent.quickPopup.quickPopup.close({
                effect: "None"
            }), !this.parent.isAdaptive && isNullOrUndefined(this.parent.editorTemplate) && removeClass([ this.dialogObject.element.querySelector(".e-recurrenceeditor") ], "e-disable"), 
            type) {
              case "Add":
                this.cellClickAction = !0, this.onCellDetailsUpdate(data);
                break;

              case "Save":
              case "EditOccurrence":
              case "EditSeries":
                "EditOccurrence" === type && !this.parent.isAdaptive && isNullOrUndefined(this.parent.editorTemplate) && addClass([ this.dialogObject.element.querySelector(".e-recurrenceeditor") ], "e-disable"), 
                this.cellClickAction = !1, this.onEventDetailsUpdate(data);
            }
        }, EventWindow.prototype.setDialogContent = function() {
            this.dialogObject.content = this.getEventWindowContent(), this.dialogObject.dataBind();
        }, EventWindow.prototype.onBeforeOpen = function(args) {
            var eventProp = {
                type: "Editor",
                data: this.eventData,
                cancel: !1,
                element: this.element
            };
            this.parent.trigger("popupOpen", eventProp), args.cancel = eventProp.cancel;
        }, EventWindow.prototype.onBeforeClose = function(args) {
            this.parent.eventBase.focusElement();
        }, EventWindow.prototype.getEventWindowContent = function() {
            var container = createElement("div", {
                className: "e-schedule-form-container"
            }), form = createElement("form", {
                id: this.parent.element.id + "EditForm",
                className: "e-schedule-form"
            });
            if (isNullOrUndefined(this.parent.editorTemplate)) {
                var content = this.getDefaultEventWindowContent();
                form.appendChild(content);
            } else {
                var templeteEle = this.parent.getEditorTemplate()();
                append([].slice.call(templeteEle), form);
            }
            return container.appendChild(form), container;
        }, EventWindow.prototype.getDefaultEventWindowContent = function() {
            var parentDiv = this.createDivElement("e-dialog-parent"), titleLocationDiv = this.createDivElement("e-title-location-row"), titleDiv = this.renderTextBox("e-subject"), locationDiv = this.renderTextBox("e-location");
            titleLocationDiv.appendChild(titleDiv), titleLocationDiv.appendChild(locationDiv);
            var startEndDateTimeDiv = this.createDivElement("e-start-end-row"), startDateTimeDiv = this.renderDateTimePicker("e-start", this.onTimeChange.bind(this)), endDateTimeDiv = this.renderDateTimePicker("e-end");
            startEndDateTimeDiv.appendChild(startDateTimeDiv), startEndDateTimeDiv.appendChild(endDateTimeDiv);
            var timezoneParentDiv = this.createDivElement("e-time-zone-row"), startTimezoneDiv = this.renderDropDown("e-start-time-zone"), endTimezoneDiv = this.renderDropDown("e-end-time-zone");
            timezoneParentDiv.appendChild(startTimezoneDiv), timezoneParentDiv.appendChild(endTimezoneDiv);
            var allDayTimezoneDiv = this.createDivElement("e-all-day-time-zone-row"), allDayDiv = this.renderCheckBox("e-all-day"), timezoneDiv = this.renderCheckBox("e-time-zone");
            allDayTimezoneDiv.appendChild(allDayDiv), allDayTimezoneDiv.appendChild(timezoneDiv);
            var repeatParentDiv = this.createDivElement("e-repeat-parent-row"), repeatDiv = this.renderCheckBox("e-repeat"), repeatEditConainer = createElement("span", {
                className: "e-recurrence-container"
            }), button = createElement("button", {
                className: "e-recurrence-edit-button",
                attrs: {
                    type: "button",
                    title: this.l10n.getConstant("editRecurrence")
                }
            }), buttonObj = new Button({
                iconCss: "e-recurrence-edit e-icons",
                cssClass: "e-medium"
            });
            repeatEditConainer.appendChild(button), buttonObj.appendTo(button), repeatDiv.appendChild(repeatEditConainer), 
            repeatParentDiv.appendChild(repeatDiv);
            var description = this.createDivElement("e-description-row"), descriptionDiv = this.renderTextBox("e-description");
            return description.appendChild(descriptionDiv), parentDiv.appendChild(titleLocationDiv), 
            parentDiv.appendChild(startEndDateTimeDiv), parentDiv.appendChild(allDayTimezoneDiv), 
            parentDiv.appendChild(timezoneParentDiv), parentDiv.appendChild(repeatParentDiv), 
            this.parent.isAdaptive ? EventHandler.add(button, "click", this.loadRecurrenceEditor, this) : this.createRecurrenceEditor(parentDiv), 
            parentDiv.appendChild(description), parentDiv;
        }, EventWindow.prototype.createRecurrenceEditor = function(parentDiv) {
            var rec = createElement("div");
            parentDiv.appendChild(rec), this.recurrenceEditor = this.renderRecurrenceEditor(), 
            this.recurrenceEditor.appendTo(rec);
        }, EventWindow.prototype.createDivElement = function(className) {
            return createElement("div", {
                className: className
            });
        }, EventWindow.prototype.createInputElement = function(className, fieldName, type) {
            return createElement(type || "input", {
                className: className,
                attrs: {
                    type: "text",
                    name: fieldName,
                    value: ""
                }
            });
        }, EventWindow.prototype.renderDateTimePicker = function(value, changeEvent) {
            var dateTimeDiv = this.createDivElement(value + "-container"), fieldName = this.getFieldName(value), dateTimeInput = this.createInputElement(value + " e-field", fieldName);
            dateTimeDiv.appendChild(dateTimeInput);
            return new DateTimePicker$1({
                change: changeEvent,
                enableRtl: this.parent.enableRtl,
                floatLabelType: "Always",
                format: (isNullOrUndefined(this.parent.dateFormat) ? this.getFormat("dateFormats") : this.parent.dateFormat) + " " + this.getFormat("timeFormats"),
                placeholder: this.l10n.getConstant(value.substr(2)),
                value: new Date(),
                width: "100%"
            }).appendTo(dateTimeInput), dateTimeDiv;
        }, EventWindow.prototype.onTimeChange = function(args) {
            var startObj = this.getInstance("e-start");
            if (startObj.element.parentElement.classList.contains("e-input-focus")) {
                var endObj = this.getInstance("e-end"), duration = 0;
                if (this.cellClickAction) duration = 18e5; else {
                    var eventData = this.parent.activeEventData.event;
                    duration = eventData[this.fields.endTime].getTime() - eventData[this.fields.startTime].getTime();
                }
                endObj.value = new Date(startObj.value.getTime() + duration), endObj.dataBind();
            }
        }, EventWindow.prototype.renderDropDown = function(value) {
            var labelValue, fieldName = this.getFieldName(value);
            labelValue = "e-start-time-zone" === value ? "startTimezone" : "endTimezone";
            var timezoneDiv = this.createDivElement(value + "-container"), timezoneInput = this.createInputElement(value + " e-field", fieldName);
            timezoneDiv.appendChild(timezoneInput);
            return new DropDownList$1({
                allowFiltering: !0,
                change: this.onTimezoneChange,
                dataSource: timezoneData,
                enableRtl: this.parent.enableRtl,
                fields: {
                    text: "Text",
                    value: "Value"
                },
                filterBarPlaceholder: "Search Timezone",
                filtering: function(e) {
                    var query = new Query();
                    query = "" !== e.text ? query.where("Text", "contains", e.text, !0) : query, e.updateData(timezoneData, query);
                },
                floatLabelType: "Always",
                placeholder: this.l10n.getConstant(labelValue),
                popupHeight: "230px"
            }).appendTo(timezoneInput), timezoneInput.setAttribute("name", fieldName), timezoneDiv;
        }, EventWindow.prototype.onTimezoneChange = function() {
            if ("StartTimezone" === this.element.getAttribute("name")) {
                var startTimezoneObj = document.querySelector(".e-start-time-zone").ej2_instances[0], endTimezoneObj = document.querySelector(".e-end-time-zone").ej2_instances[0];
                endTimezoneObj.value = startTimezoneObj.value, endTimezoneObj.dataBind();
            }
        }, EventWindow.prototype.renderCheckBox = function(value) {
            var checkBoxDiv = this.createDivElement(value + "-container"), fieldName = this.getFieldName(value), checkBoxInput = this.createInputElement(value + " e-field", fieldName);
            checkBoxDiv.appendChild(checkBoxInput);
            var labelText;
            labelText = "e-all-day" === value ? "e-allDay" : "e-time-zone" === value ? "e-timezone" : value;
            var checkBox = new CheckBox({
                change: this.onChange.bind(this),
                cssClass: value,
                enableRtl: this.parent.enableRtl,
                label: this.l10n.getConstant(labelText.substr(2))
            });
            return checkBox.appendTo(checkBoxInput), checkBoxInput.setAttribute("name", fieldName), 
            "Repeat" === fieldName && (this.repeatStatus = checkBox), checkBoxDiv;
        }, EventWindow.prototype.renderTextBox = function(value) {
            var textBoxDiv = this.createDivElement(value + "-container"), fieldName = this.getFieldName(value), labelText = "e-subject" === value ? "e-title" : value, textBoxInput = this.createInputElement(value + " e-field", fieldName, "e-description" === value ? "textarea" : "input");
            return textBoxDiv.appendChild(textBoxInput), Input.createInput({
                element: textBoxInput,
                floatLabelType: "Always",
                properties: {
                    enableRtl: this.parent.enableRtl,
                    placeholder: this.l10n.getConstant(labelText.substr(2))
                }
            }), textBoxDiv;
        }, EventWindow.prototype.getFieldName = function(name) {
            var fieldName;
            return "e-subject" === name ? fieldName = this.fields.subject : "e-location" === name ? fieldName = this.fields.location : "e-start" === name ? fieldName = this.fields.startTime : "e-end" === name ? fieldName = this.fields.endTime : "e-description" === name ? fieldName = this.fields.description : "e-all-day" === name ? fieldName = this.fields.isAllDay : "e-start-time-zone" === name ? fieldName = this.fields.startTimezone : "e-end-time-zone" === name ? fieldName = this.fields.endTimezone : "e-time-zone" === name ? fieldName = "Timezone" : "e-repeat" === name && (fieldName = "Repeat"), 
            fieldName;
        }, EventWindow.prototype.onChange = function(args) {
            var target = args.event.target;
            target.classList.contains("e-all-day") ? this.onAllDayChange(args.checked) : target.classList.contains("e-time-zone") ? this.timezoneChangeStyle(args.checked) : target.classList.contains("e-repeat") && this.onRepeatChange(args.checked);
        }, EventWindow.prototype.renderRepeatDialog = function() {
            var element = createElement("div");
            this.repeatDialogObject = new Dialog({
                header: this.l10n.getConstant("recurrence"),
                visible: !1,
                content: '<div class="e-rec-editor"></div>',
                closeOnEscape: !0,
                width: "90%",
                buttons: [ {
                    click: this.repeatSaveDialog.bind(this),
                    buttonModel: {
                        content: this.l10n.getConstant("save"),
                        cssClass: "e-save",
                        isPrimary: !0
                    }
                }, {
                    click: this.repeatCancelDialog.bind(this),
                    buttonModel: {
                        cssClass: "e-cancel",
                        content: this.l10n.getConstant("cancel")
                    }
                } ],
                target: this.element,
                animationSettings: {
                    effect: "Zoom"
                },
                enableRtl: this.parent.enableRtl,
                isModal: !0,
                cssClass: "e-recurrence-dialog",
                open: this.repeatOpenDialog.bind(this)
            }), this.element.appendChild(element), this.repeatDialogObject.appendTo(element), 
            this.createRecurrenceEditor(this.repeatDialogObject.element.querySelector(".e-dlg-content"));
        }, EventWindow.prototype.loadRecurrenceEditor = function() {
            this.repeatDialogObject.setProperties({
                visible: !0
            }), this.recurrenceEditor && this.repeatRule && this.recurrenceEditor.setRecurrenceRule(this.repeatRule);
        }, EventWindow.prototype.onRepeatChange = function(state) {
            if (state) this.repeatDialogObject || this.renderRepeatDialog(), this.recurrenceEditor.setProperties({
                startDate: this.repeatStartDate,
                selectedType: 0
            }), this.loadRecurrenceEditor(); else {
                this.repeatDialogObject && this.repeatDialogObject.setProperties({
                    visible: !1
                }), this.repeatRule = "", this.recurrenceEditor && (this.recurrenceEditor.setRecurrenceRule(this.repeatRule), 
                this.updateRepeatLabel(this.repeatRule));
                this.element.querySelector(".e-recurrence-container").classList.add("e-hide");
            }
        }, EventWindow.prototype.repeatSaveDialog = function() {
            this.repeatRule = this.recurrenceEditor.getRecurrenceRule();
            var element = this.element.querySelector(".e-recurrence-container");
            this.recurrenceEditor.getRecurrenceRule() ? element.classList.remove("e-hide") : (element.classList.add("e-hide"), 
            this.repeatStatus.setProperties({
                checked: !1
            })), this.updateRepeatLabel(this.repeatRule), this.closeRepeatDialog();
        }, EventWindow.prototype.closeRepeatDialog = function() {
            this.repeatDialogObject.setProperties({
                visible: !1
            });
        }, EventWindow.prototype.repeatCancelDialog = function() {
            this.closeRepeatDialog(), this.recurrenceEditor && this.recurrenceEditor.setRecurrenceRule(this.repeatTempRule), 
            this.repeatTempRule || this.repeatStatus.setProperties({
                checked: !1
            });
        }, EventWindow.prototype.repeatOpenDialog = function() {
            this.repeatTempRule = this.recurrenceEditor.getRecurrenceRule();
        }, EventWindow.prototype.onCellDetailsUpdate = function(args) {
            this.element.querySelector(".e-schedule-form").removeAttribute("data-id");
            var event = args;
            this.element.querySelector(".e-title-text").innerHTML = this.l10n.getConstant("newEvent");
            var eventObj = {};
            if (event.subject && (eventObj[this.fields.subject] = event.subject), eventObj[this.fields.startTime] = event.startTime, 
            eventObj[this.fields.endTime] = event.endTime, eventObj[this.fields.isAllDay] = event.isAllDay, 
            eventObj.Timezone = !1, this.repeatStartDate = eventObj[this.fields.startTime], 
            this.repeatRule = "", this.showDetails(eventObj), this.element.querySelector(".e-event-delete") && this.element.querySelector(".e-event-delete").setAttribute("style", "display:none"), 
            this.recurrenceEditor && this.recurrenceEditor.setProperties({
                startDate: event.startTime,
                selectedType: 0
            }), this.parent.isAdaptive && isNullOrUndefined(this.parent.editorTemplate)) {
                this.element.querySelector(".e-recurrence-container").classList.add("e-hide"), this.updateRepeatLabel(this.repeatRule);
            }
            this.dialogObject.show();
        }, EventWindow.prototype.applyFormValidation = function() {
            var form = this.element.querySelector(".e-schedule-form"), rules = {};
            rules[this.parent.eventSettings.fields.subject.name] = this.parent.eventSettings.fields.subject.validation, 
            rules[this.parent.eventSettings.fields.location.name] = this.parent.eventSettings.fields.location.validation, 
            rules[this.parent.eventSettings.fields.startTime.name] = this.parent.eventSettings.fields.startTime.validation, 
            rules[this.parent.eventSettings.fields.endTime.name] = this.parent.eventSettings.fields.endTime.validation, 
            rules[this.parent.eventSettings.fields.description.name] = this.parent.eventSettings.fields.description.validation, 
            this.fieldValidator.renderFormValidator(form, rules);
        }, EventWindow.prototype.showDetails = function(eventData) {
            var eventObj = extend({}, eventData, null, !0);
            if (eventObj[this.fields.isAllDay]) {
                var temp = addDays(new Date(+eventObj[this.fields.endTime]), -1).getTime();
                eventObj[this.fields.endTime] = +eventObj[this.fields.startTime] > temp ? eventObj[this.fields.endTime] : new Date(temp);
            }
            this.eventData = eventObj;
            for (var formelement = this.getFormElements(), keyNames = Object.keys(eventObj), index = 0, len = formelement.length; index < len; index++) {
                var columnName = formelement[index].name;
                isNullOrUndefined(columnName) || (-1 !== keyNames.indexOf(columnName) ? this.setValueToElement(formelement[index], eventObj[columnName]) : this.setDefaultValueToElement(formelement[index]));
            }
            if (isNullOrUndefined(this.parent.editorTemplate)) {
                this.onAllDayChange(eventObj[this.fields.isAllDay]);
                var timezoneObj = this.getInstance("e-time-zone.e-field");
                isNullOrUndefined(eventObj[this.fields.startTimezone]) && isNullOrUndefined(eventObj[this.fields.endTimezone]) || (timezoneObj.checked = !0, 
                timezoneObj.dataBind()), this.timezoneChangeStyle(timezoneObj.checked), delete eventObj.Timezone;
            }
        }, EventWindow.prototype.onAllDayChange = function(allDayStatus) {
            var format, startObj = this.getInstance("e-start"), endObj = this.getInstance("e-end");
            allDayStatus ? (format = isNullOrUndefined(this.parent.dateFormat) ? this.getFormat("dateFormats") : this.parent.dateFormat, 
            addClass(this.element.querySelectorAll(".e-time-icon"), "e-icon-disable"), startObj.format = endObj.format = format) : (format = isNullOrUndefined(this.parent.dateFormat) ? this.getFormat("dateFormats") + " " + this.getFormat("timeFormats") : this.parent.dateFormat + " " + this.getFormat("timeFormats"), 
            removeClass(this.element.querySelectorAll(".e-time-icon"), "e-icon-disable"), startObj.format = endObj.format = format), 
            this.cellClickAction && this.updateDateTime(allDayStatus, startObj, endObj), startObj.dataBind(), 
            endObj.dataBind();
        }, EventWindow.prototype.updateDateTime = function(allDayStatus, startObj, endObj) {
            var startDate, endDate;
            if (allDayStatus) startDate = resetTime(new Date(this.parent.activeCellsData.startTime.getTime())), 
            endDate = this.parent.activeCellsData.isAllDay ? addDays(new Date(this.parent.activeCellsData.endTime.getTime()), -1) : resetTime(new Date(this.parent.activeCellsData.startTime.getTime())); else if (startDate = new Date(this.parent.activeCellsData.startTime.getTime()), 
            "Month" === this.parent.currentView || "MonthAgenda" === this.parent.currentView || this.parent.activeCellsData.isAllDay) {
                var startHour = this.parent.globalize.parseDate(this.parent.workHours.start, {
                    skeleton: "Hm"
                });
                startDate.setHours(startHour.getHours(), startHour.getMinutes(), startHour.getSeconds()), 
                (endDate = new Date(startDate.getTime())).setMilliseconds(18e5);
            } else endDate = new Date(this.parent.activeCellsData.endTime.getTime());
            startObj.value = startDate, endObj.value = endDate, startObj.dataBind(), endObj.dataBind();
        }, EventWindow.prototype.getFormat = function(formatType) {
            return "en" === this.parent.locale || "en-US" === this.parent.locale ? getValue(formatType + ".short", getDefaultDateObject()) : getValue("main." + this.parent.locale + ".dates.calendars.gregorian." + formatType + ".short", cldrData);
        }, EventWindow.prototype.onEventDetailsUpdate = function(eventObj) {
            if (this.parent.isAdaptive || this.element.querySelector(".e-event-delete").setAttribute("style", "display:inline"), 
            this.element.querySelector(".e-title-text").innerHTML = this.l10n.getConstant("editEvent"), 
            this.element.querySelector(".e-schedule-form").setAttribute("data-id", eventObj[this.fields.id].toString()), 
            isNullOrUndefined(this.parent.editorTemplate)) {
                eventObj = extend({}, eventObj, null, !0);
                var timezoneObj = this.getInstance("e-time-zone.e-field"), timezoneValue = void 0;
                if (eventObj[this.fields.startTimezone] || eventObj[this.fields.endTimezone]) {
                    if (timezoneValue = !0, eventObj[this.fields.startTimezone] = eventObj[this.fields.startTimezone] || eventObj[this.fields.endTimezone], 
                    eventObj[this.fields.endTimezone] = eventObj[this.fields.endTimezone] || eventObj[this.fields.startTimezone], 
                    this.parent.timezone) {
                        var startTz = eventObj[this.fields.startTimezone], endTz = eventObj[this.fields.endTimezone];
                        eventObj[this.fields.startTime] = this.timezone.convert(eventObj[this.fields.startTime], this.parent.timezone, startTz), 
                        eventObj[this.fields.endTime] = this.timezone.convert(eventObj[this.fields.endTime], this.parent.timezone, endTz);
                    }
                } else timezoneValue = !1;
                eventObj.Timezone = timezoneValue, timezoneObj.checked = timezoneValue, timezoneObj.dataBind();
            }
            if (this.showDetails(eventObj), eventObj[this.fields.recurrenceRule] && this.recurrenceEditor ? this.recurrenceEditor.setRecurrenceRule(eventObj[this.fields.recurrenceRule], eventObj[this.fields.startTime]) : !this.parent.isAdaptive && this.recurrenceEditor && this.recurrenceEditor.setRecurrenceRule(""), 
            this.repeatStartDate = eventObj[this.fields.startTime], this.repeatRule = "", eventObj[this.fields.recurrenceRule] && (this.recurrenceEditor && this.recurrenceEditor.setRecurrenceRule(eventObj[this.fields.recurrenceRule], eventObj[this.fields.startTime]), 
            this.repeatRule = eventObj[this.fields.recurrenceRule]), this.parent.isAdaptive && isNullOrUndefined(this.parent.editorTemplate)) {
                var element = this.element.querySelector(".e-recurrence-container");
                eventObj[this.fields.recurrenceRule] ? (element.classList.remove("e-hide"), this.repeatStatus.setProperties({
                    checked: !0
                })) : (element.classList.add("e-hide"), this.repeatStatus.setProperties({
                    checked: !1
                })), this.updateRepeatLabel(this.repeatRule);
            }
            if (this.parent.readonly) {
                this.element.querySelector(".e-event-save").ej2_instances[0].disabled = !0;
                this.element.querySelector(".e-event-delete").ej2_instances[0].disabled = !0;
            }
            this.dialogObject.show();
        }, EventWindow.prototype.renderRecurrenceEditor = function() {
            return new RecurrenceEditor({
                cssClass: this.parent.cssClass,
                dateFormat: this.parent.dateFormat,
                enableRtl: this.parent.enableRtl,
                firstDayOfWeek: this.parent.firstDayOfWeek,
                locale: this.parent.locale
            });
        }, EventWindow.prototype.updateRepeatLabel = function(repeatRule) {
            this.parent.isAdaptive && !this.repeatDialogObject && this.renderRepeatDialog();
            var data = repeatRule ? this.l10n.getConstant("repeats") + " " + this.recurrenceEditor.getRuleSummary(repeatRule) : this.l10n.getConstant("repeat");
            this.repeatStatus.setProperties({
                label: data
            });
        }, EventWindow.prototype.dialogClose = function(args) {
            this.dialogObject.hide(), this.fieldValidator.destroyToolTip(), this.resetFormFields(), 
            !this.parent.isAdaptive && this.recurrenceEditor && this.recurrenceEditor.resetFields();
        }, EventWindow.prototype.timezoneChangeStyle = function(value) {
            var timezoneDiv = this.element.querySelector(".e-time-zone-row");
            if (value) {
                addClass([ timezoneDiv ], "e-enable");
                var startTimezoneObj = this.getInstance("e-start-time-zone"), endTimezoneObj = this.getInstance("e-end-time-zone"), timezone = startTimezoneObj.dataSource;
                if (!startTimezoneObj.value || !this.parent.timezone) {
                    if (!timezone.some(function(tz) {
                        return tz.Value === localTimezoneName;
                    })) {
                        var obj = {};
                        obj = {
                            Value: localTimezoneName,
                            Text: localTimezoneName
                        }, timezone.push(obj), startTimezoneObj.dataSource = timezone, endTimezoneObj.dataSource = timezone, 
                        startTimezoneObj.dataBind(), endTimezoneObj.dataBind();
                    }
                }
                startTimezoneObj.value = startTimezoneObj.value || this.parent.timezone || localTimezoneName, 
                endTimezoneObj.value = endTimezoneObj.value || this.parent.timezone || localTimezoneName, 
                startTimezoneObj.dataBind(), endTimezoneObj.dataBind();
            } else removeClass([ timezoneDiv ], "e-enable");
        }, EventWindow.prototype.resetFormFields = function() {
            for (var formelement = this.getFormElements(), index = 0, len = formelement.length; index < len; index++) {
                var columnName = formelement[index].name;
                isNullOrUndefined(columnName) || "" === columnName || this.setDefaultValueToElement(formelement[index]);
            }
        }, EventWindow.prototype.eventSave = function() {
            if (this.element.querySelector(".e-schedule-form").ej2_instances[0].validate()) {
                for (var eventObj = {}, formelement = this.getFormElements(), index = 0, len = formelement.length; index < len; index++) {
                    var columnName = formelement[index].name;
                    !isNullOrUndefined(columnName) && "" !== columnName && isNullOrUndefined(eventObj[columnName]) && (eventObj[columnName] = this.getValueFromElement(formelement[index]));
                }
                if (eventObj.Timezone || (eventObj[this.fields.startTimezone] = null, eventObj[this.fields.endTimezone] = null), 
                isNullOrUndefined(this.parent.editorTemplate)) {
                    if (delete eventObj.Timezone, delete eventObj.Repeat, !eventObj[this.fields.startTime] || !eventObj[this.fields.endTime]) return void this.parent.quickPopup.openValidationError("invalidDateError");
                    if (eventObj[this.fields.startTime] > eventObj[this.fields.endTime]) return void this.parent.quickPopup.openValidationError("startEndError");
                }
                var eventId = this.getEventIdFromForm();
                isNullOrUndefined(eventObj[this.fields.subject]) || (eventObj[this.fields.subject] = "" !== eventObj[this.fields.subject] ? eventObj[this.fields.subject] : this.parent.eventSettings.fields.subject.default), 
                eventObj[this.fields.isAllDay] && (eventObj[this.fields.startTime] = resetTime(eventObj[this.fields.startTime]), 
                eventObj[this.fields.endTime] = addDays(resetTime(eventObj[this.fields.endTime]), 1));
                var ruleData = this.recurrenceEditor ? this.recurrenceEditor.getRecurrenceRule() : null;
                if (eventObj[this.fields.recurrenceRule] = ruleData || void 0, isNullOrUndefined(eventId)) eventObj[this.fields.id] = this.parent.eventBase.getEventMaxId() + 1, 
                this.parent.addEvent(eventObj); else {
                    var editedData = new DataManager({
                        json: this.parent.eventsData
                    }).executeLocal(new Query().where(this.fields.id, "equal", parseInt(eventId, 10)))[0];
                    eventObj = extend({}, editedData, eventObj), isNullOrUndefined(editedData[this.fields.recurrenceRule]) ? this.parent.saveEvent(eventObj) : ("EditOccurrence" !== this.parent.currentAction || eventObj[this.fields.recurrenceID] || (eventObj[this.fields.id] = this.parent.eventBase.getEventMaxId() + 1), 
                    "EditSeries" !== this.parent.currentAction && eventObj[this.fields.id] === editedData[this.fields.id] || (eventObj[this.fields.recurrenceID] = editedData[this.fields.id]), 
                    this.parent.saveEvent(eventObj, this.parent.currentAction));
                }
                this.dialogObject.hide();
            }
        }, EventWindow.prototype.getEventIdFromForm = function() {
            return this.element.querySelector(".e-schedule-form").getAttribute("data-id");
        }, EventWindow.prototype.getFormElements = function() {
            return [].slice.call(this.element.querySelectorAll(".e-field"));
        }, EventWindow.prototype.getValueFromElement = function(element) {
            return element.classList.contains("e-datepicker") ? element.ej2_instances[0].value : element.classList.contains("e-datetimepicker") ? element.ej2_instances[0].value : element.classList.contains("e-dropdownlist") ? element.ej2_instances[0].value : element.classList.contains("e-checkbox") ? element.ej2_instances[0].checked : "checkbox" === element.type ? element.checked : element.value;
        }, EventWindow.prototype.setValueToElement = function(element, value) {
            if (element.classList.contains("e-datepicker")) {
                (instance = element.ej2_instances[0]).value = value, instance.dataBind();
            } else if (element.classList.contains("e-datetimepicker")) {
                (instance = element.ej2_instances[0]).value = value, instance.dataBind();
            } else if (element.classList.contains("e-dropdownlist")) {
                (instance = element.ej2_instances[0]).value = value, instance.dataBind();
            } else if (element.classList.contains("e-checkbox")) {
                var instance;
                (instance = element.ej2_instances[0]).checked = value, instance.dataBind();
            } else "checkbox" !== element.type ? element.value = value : element.checked = value;
        }, EventWindow.prototype.setDefaultValueToElement = function(element) {
            if (element.classList.contains("e-datepicker")) {
                (instance = element.ej2_instances[0]).value = new Date(), instance.dataBind();
            } else if (element.classList.contains("e-datetimepicker")) {
                (instance = element.ej2_instances[0]).value = new Date(), instance.dataBind();
            } else if (element.classList.contains("e-dropdownlist")) {
                (instance = element.ej2_instances[0]).value = null, instance.dataBind();
            } else if (element.classList.contains("e-checkbox")) {
                var instance;
                (instance = element.ej2_instances[0]).checked = !1, instance.dataBind();
            } else "checkbox" === element.type ? element.checked = !1 : element.value = "";
        }, EventWindow.prototype.getInstance = function(className) {
            return this.element.querySelector("." + className).ej2_instances[0];
        }, EventWindow.prototype.eventDelete = function(args) {
            switch (this.parent.currentAction) {
              case "EditOccurrence":
                var fields = this.parent.eventFields;
                isNullOrUndefined(this.parent.activeEventData.event[fields.recurrenceRule]) ? this.parent.currentAction = "Delete" : this.parent.currentAction = "DeleteOccurrence";
                break;

              case "EditSeries":
                this.parent.currentAction = "DeleteSeries";
            }
            this.dialogObject.hide(), this.parent.quickPopup.openDeleteAlert();
        }, EventWindow.prototype.getRecurrenceEditorInstance = function() {
            return this.parent.isAdaptive && !this.repeatDialogObject && this.renderRepeatDialog(), 
            this.recurrenceEditor;
        }, EventWindow.prototype.destroy = function() {
            this.recurrenceEditor && this.recurrenceEditor.destroy(), this.repeatDialogObject && (this.repeatDialogObject.destroy(), 
            remove(this.repeatDialogObject.element)), this.dialogObject && (this.dialogObject.destroy(), 
            this.dialogObject = null), this.element && (remove(this.element), this.element = null), 
            this.fieldValidator.destroyForm();
        }, EventWindow;
    }(), Render$1 = function() {
        function Render(parent) {
            this.parent = parent;
        }
        return Render.prototype.render = function(viewName) {
            this.initializeLayout(viewName), this.refreshDataManager();
        }, Render.prototype.initializeLayout = function(viewName) {
            switch (this.parent.activeView && (this.parent.activeView.removeEventListener(), 
            this.parent.activeView.destroy()), viewName) {
              case "Day":
                this.parent.activeView = this.parent.dayModule;
                break;

              case "Week":
                this.parent.activeView = this.parent.weekModule;
                break;

              case "WorkWeek":
                this.parent.activeView = this.parent.workWeekModule;
                break;

              case "Month":
                this.parent.activeView = this.parent.monthModule;
                break;

              case "Agenda":
                this.parent.activeView = this.parent.agendaModule;
                break;

              case "MonthAgenda":
                this.parent.activeView = this.parent.monthAgendaModule;
            }
            if (isNullOrUndefined(this.parent.activeView)) {
                var firstView = this.parent.viewOptions[Object.keys(this.parent.viewOptions)[0]].option;
                if (firstView) return this.parent.setProperties({
                    currentView: firstView
                }, !0), this.parent.headerModule && (this.parent.headerModule.updateActiveView(), 
                this.parent.headerModule.setCalendarView()), this.initializeLayout(firstView);
                throw Error("Inject required modules");
            }
            this.updateLabelText(viewName), this.parent.activeView.addEventListener(), this.parent.activeView.getRenderDates(), 
            this.parent.activeView.renderLayout("e-current-panel"), this.parent.headerModule && this.parent.headerModule.updateDateRange(this.parent.activeView.getDateRangeText());
        }, Render.prototype.updateLabelText = function(view) {
            var content = this.parent.activeView.getLabelText(view);
            this.parent.element.setAttribute("role", "presentation"), this.parent.element.setAttribute("aria-label", content);
        }, Render.prototype.refreshDataManager = function() {
            var _this = this, start = this.parent.activeView.startDate(), end = this.parent.activeView.endDate();
            this.parent.dataModule.getData(this.parent.dataModule.generateQuery(start, end)).then(function(e) {
                return _this.dataManagerSuccess(e);
            }).catch(function(e) {
                return _this.dataManagerFailure(e);
            });
        }, Render.prototype.dataManagerSuccess = function(e) {
            if (!this.parent.isDestroyed) {
                this.parent.trigger("dataBinding", e), this.parent.eventsData = extend([], e.result, null, !0);
                var processed = this.parent.eventBase.processData(this.parent.eventsData);
                this.parent.notify("data-ready", {
                    processedData: processed
                }), this.parent.trigger("dataBound");
            }
        }, Render.prototype.dataManagerFailure = function(e) {
            this.parent.isDestroyed || this.parent.trigger("actionFailure", {
                error: e
            });
        }, Render;
    }(), __extends$147 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$60 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, WorkHours = function(_super) {
        function WorkHours() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$147(WorkHours, _super), __decorate$60([ Property(!0) ], WorkHours.prototype, "highlight", void 0), 
        __decorate$60([ Property("09:00") ], WorkHours.prototype, "start", void 0), __decorate$60([ Property("18:00") ], WorkHours.prototype, "end", void 0), 
        WorkHours;
    }(ChildProperty), __extends$149 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$62 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, Field = function(_super) {
        function Field() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$149(Field, _super), __decorate$62([ Property({
            name: "Id"
        }) ], Field.prototype, "id", void 0), __decorate$62([ Property({
            name: "Subject",
            default: "Add title"
        }) ], Field.prototype, "subject", void 0), __decorate$62([ Property({
            name: "StartTime"
        }) ], Field.prototype, "startTime", void 0), __decorate$62([ Property({
            name: "EndTime"
        }) ], Field.prototype, "endTime", void 0), __decorate$62([ Property({
            name: "StartTimezone"
        }) ], Field.prototype, "startTimezone", void 0), __decorate$62([ Property({
            name: "EndTimezone"
        }) ], Field.prototype, "endTimezone", void 0), __decorate$62([ Property({
            name: "Location"
        }) ], Field.prototype, "location", void 0), __decorate$62([ Property({
            name: "Description"
        }) ], Field.prototype, "description", void 0), __decorate$62([ Property({
            name: "IsAllDay"
        }) ], Field.prototype, "isAllDay", void 0), __decorate$62([ Property({
            name: "RecurrenceID"
        }) ], Field.prototype, "recurrenceID", void 0), __decorate$62([ Property({
            name: "RecurrenceRule"
        }) ], Field.prototype, "recurrenceRule", void 0), __decorate$62([ Property({
            name: "RecurrenceException"
        }) ], Field.prototype, "recurrenceException", void 0), Field;
    }(ChildProperty), __extends$148 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$61 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, EventSettings = function(_super) {
        function EventSettings() {
            return null !== _super && _super.apply(this, arguments) || this;
        }
        return __extends$148(EventSettings, _super), __decorate$61([ Property() ], EventSettings.prototype, "template", void 0), 
        __decorate$61([ Property([]) ], EventSettings.prototype, "dataSource", void 0), 
        __decorate$61([ Property() ], EventSettings.prototype, "query", void 0), __decorate$61([ Complex({}, Field) ], EventSettings.prototype, "fields", void 0), 
        __decorate$61([ Property(!1) ], EventSettings.prototype, "enableTooltip", void 0), 
        __decorate$61([ Property() ], EventSettings.prototype, "tooltipTemplate", void 0), 
        EventSettings;
    }(ChildProperty), __extends$146 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), __decorate$59 = function(decorators, target, key, desc) {
        var d, c = arguments.length, r = c < 3 ? target : null === desc ? desc = Object.getOwnPropertyDescriptor(target, key) : desc;
        if ("object" == typeof Reflect && "function" == typeof Reflect.decorate) r = Reflect.decorate(decorators, target, key, desc); else for (var i = decorators.length - 1; i >= 0; i--) (d = decorators[i]) && (r = (c < 3 ? d(r) : c > 3 ? d(target, key, r) : d(target, key)) || r);
        return c > 3 && r && Object.defineProperty(target, key, r), r;
    }, Schedule = function(_super) {
        function Schedule(options, element) {
            return _super.call(this, options, element) || this;
        }
        return __extends$146(Schedule, _super), Schedule.prototype.render = function() {
            addClass([ this.element ], "e-schedule"), this.enableRtl ? addClass([ this.element ], "e-rtl") : removeClass([ this.element ], "e-rtl"), 
            this.isAdaptive ? addClass([ this.element ], "e-device") : removeClass([ this.element ], "e-device"), 
            this.cssClass && addClass([ this.element ], this.cssClass), this.validateDate(), 
            this.eventTooltipTemplateFn = this.templateParser(this.eventSettings.tooltipTemplate), 
            this.editorTemplateFn = this.templateParser(this.editorTemplate), this.scrollModule = new Scroll$1(this), 
            this.scrollModule.setWidth(), this.scrollModule.setHeight(), this.showHeaderBar && (this.headerModule = new HeaderRenderer(this)), 
            this.element.appendChild(createElement("div", {
                className: TABLE_CONTAINER_CLASS
            })), (Browser.isDevice || Browser.isTouch) && (this.scheduleTouchModule = new ScheduleTouch(this)), 
            this.renderModule = new Render$1(this), this.eventBase = new EventBase(this), this.initializeDataModule(), 
            this.initializeView(this.currentView), this.initializePopups(), this.wireEvents();
        }, Schedule.prototype.validateDate = function() {
            this.setProperties({
                selectedDate: new Date("" + this.selectedDate)
            }, !0);
        }, Schedule.prototype.setViewOptions = function(isModuleLoad) {
            void 0 === isModuleLoad && (isModuleLoad = !1), this.viewOptions = {};
            for (var viewName, selectedView, _i = 0, _a = this.views; _i < _a.length; _i++) {
                var view = _a[_i], isOptions = "string" != typeof view;
                "string" == typeof view ? viewName = view : (viewName = view.option, view.isSelected && (selectedView = viewName));
                var obj = extend({
                    option: viewName
                }, isOptions ? view : {}), fieldViewName = viewName.charAt(0).toLowerCase() + viewName.slice(1);
                this.viewOptions[fieldViewName] = obj;
            }
            !isModuleLoad && selectedView && this.setProperties({
                currentView: selectedView
            }, !0);
        }, Schedule.prototype.getActiveViewOptions = function(viewName) {
            return extend({
                dateFormat: this.dateFormat,
                endHour: this.endHour,
                isSelected: !1,
                option: null,
                readonly: this.readonly,
                startHour: this.startHour,
                allowVirtualScrolling: !0,
                cellTemplate: this.cellTemplate,
                eventTemplate: this.eventSettings.template,
                dateHeaderTemplate: this.dateHeaderTemplate,
                workDays: this.workDays,
                showWeekend: this.showWeekend
            }, this.viewOptions[viewName.charAt(0).toLowerCase() + viewName.slice(1)]);
        }, Schedule.prototype.initializeDataModule = function() {
            this.eventFields = {
                id: this.eventSettings.fields.id.name,
                subject: this.eventSettings.fields.subject.name,
                startTime: this.eventSettings.fields.startTime.name,
                endTime: this.eventSettings.fields.endTime.name,
                startTimezone: this.eventSettings.fields.startTimezone.name,
                endTimezone: this.eventSettings.fields.endTimezone.name,
                location: this.eventSettings.fields.location.name,
                description: this.eventSettings.fields.description.name,
                isAllDay: this.eventSettings.fields.isAllDay.name,
                recurrenceID: this.eventSettings.fields.recurrenceID.name,
                recurrenceRule: this.eventSettings.fields.recurrenceRule.name,
                recurrenceException: this.eventSettings.fields.recurrenceException.name
            }, this.dataModule = new Data$2(this.eventSettings.dataSource, this.eventSettings.query), 
            this.crudModule = new Crud(this);
        }, Schedule.prototype.initializeView = function(viewName) {
            this.activeViewOptions = this.getActiveViewOptions(viewName), this.initializeTemplates(), 
            this.renderModule.render(viewName);
        }, Schedule.prototype.initializeTemplates = function() {
            this.cellTemplateFn = this.templateParser(this.activeViewOptions.cellTemplate), 
            this.dateHeaderTemplateFn = this.templateParser(this.activeViewOptions.dateHeaderTemplate), 
            this.appointmentTemplateFn = this.templateParser(this.activeViewOptions.eventTemplate);
        }, Schedule.prototype.initializePopups = function() {
            this.eventSettings.enableTooltip && (this.eventTooltip = new EventTooltip(this)), 
            this.eventWindow = new EventWindow(this), this.quickPopup = new QuickPopups(this);
        }, Schedule.prototype.getDayNames = function(type) {
            var cldrObj, culShortNames = [];
            cldrObj = "en" === this.locale || "en-US" === this.locale ? getValue("days.stand-alone." + type, getDefaultDateObject()) : getValue("main." + this.locale + ".dates.calendars.gregorian.days.format." + type, cldrData);
            for (var _i = 0, _a = Object.keys(cldrObj); _i < _a.length; _i++) {
                var obj = _a[_i];
                culShortNames.push(getValue(obj, cldrObj));
            }
            return culShortNames;
        }, Schedule.prototype.changeView = function(view, event, muteOnChange) {
            if (muteOnChange || view !== this.currentView) {
                var args = {
                    requestType: "viewNavigate",
                    cancel: !1,
                    event: event
                };
                if (this.trigger("actionBegin", args), !args.cancel) {
                    var navArgs = {
                        action: "view",
                        cancel: !1,
                        previousView: this.currentView,
                        currentView: view
                    };
                    this.trigger("navigating", navArgs), navArgs.cancel || (this.setProperties({
                        currentView: view
                    }, !0), this.headerModule && (this.headerModule.updateActiveView(), this.headerModule.setCalendarView()), 
                    this.initializeView(this.currentView), this.animateLayout(), args = {
                        requestType: "viewNavigate",
                        cancel: !1,
                        event: event
                    }, this.trigger("actionComplete", args));
                }
            }
        }, Schedule.prototype.changeDate = function(selectedDate, event) {
            var args = {
                requestType: "dateNavigate",
                cancel: !1,
                event: event
            };
            if (this.trigger("actionBegin", args), !args.cancel) {
                var navArgs = {
                    action: "date",
                    cancel: !1,
                    previousDate: this.selectedDate,
                    currentDate: selectedDate
                };
                this.trigger("navigating", navArgs), navArgs.cancel || (this.setProperties({
                    selectedDate: selectedDate
                }, !0), this.headerModule && this.headerModule.setCalendarDate(selectedDate), this.initializeView(this.currentView), 
                this.animateLayout(), args = {
                    requestType: "dateNavigate",
                    cancel: !1,
                    event: event
                }, this.trigger("actionComplete", args));
            }
        }, Schedule.prototype.isSelectedDate = function(date) {
            return date.setHours(0, 0, 0, 0) === new Date("" + this.selectedDate).setHours(0, 0, 0, 0);
        }, Schedule.prototype.animateLayout = function() {
            new Animation({
                duration: 600,
                name: "FadeIn",
                timingFunction: "easeIn"
            }).animate(this.activeView.element);
        }, Schedule.prototype.requiredModules = function() {
            var modules = [];
            this.setViewOptions(!0);
            for (var _i = 0, _a = Object.keys(this.viewOptions); _i < _a.length; _i++) {
                var view = _a[_i];
                modules.push({
                    member: view,
                    args: [ this ]
                });
            }
            return modules;
        }, Schedule.prototype.preRender = function() {
            this.isAdaptive = Browser.isDevice, this.globalize = new Internationalization(this.locale), 
            this.uiStateValues = {
                expand: !1,
                isInitial: !0,
                left: 0,
                top: 0
            }, this.activeCellsData = {
                startTime: new Date(),
                endTime: new Date(),
                isAllDay: !1
            }, this.defaultLocale = {
                day: "Day",
                week: "Week",
                workWeek: "Work Week",
                month: "Month",
                agenda: "Agenda",
                weekAgenda: "Week Agenda",
                workWeekAgenda: "Work Week Agenda",
                monthAgenda: "Month Agenda",
                today: "Today",
                noEvents: "No events",
                allDay: "All day",
                start: "Start",
                end: "End",
                more: "more",
                close: "Close",
                cancel: "Cancel",
                noTitle: "(No Title)",
                delete: "Delete",
                deleteEvent: "Delete Event",
                selectedItems: "Items selected",
                deleteSeries: "Delete Series",
                edit: "Edit",
                editSeries: "Edit Series",
                editEvent: "Edit Event",
                createEvent: "Create",
                subject: "Subject",
                addTitle: "Add title",
                moreDetails: "More Details",
                save: "Save",
                editContent: "Do you want to edit only this event or entire series?",
                deleteRecurrenceContent: "Do you want to delete only this event or entire series?",
                deleteContent: "Are you sure you want to delete this event?",
                newEvent: "New Event",
                title: "Title",
                location: "Location",
                description: "Description",
                timezone: "Timezone",
                startTimezone: "Start Timezone",
                endTimezone: "End Timezone",
                repeat: "Repeat",
                saveButton: "Save",
                cancelButton: "Cancel",
                deleteButton: "Delete",
                recurrence: "Recurrence",
                editRecurrence: "Edit Recurrence",
                repeats: "Repeats",
                alert: "Alert",
                startEndError: "The selected end date occurs before the start date.",
                invalidDateError: "The entered date value is invalid.",
                ok: "Ok"
            }, this.localeObj = new L10n(this.getModuleName(), this.defaultLocale, this.locale), 
            this.eventsData = [], this.eventsProcessed = [], this.currentAction = null, this.selectedElements = [], 
            this.setViewOptions();
        }, Schedule.prototype.wireEvents = function() {
            var resize = "onorientationchange" in window ? "orientationchange" : "resize";
            EventHandler.add(window, resize, this.onScheduleResize, this), EventHandler.add(document, Browser.touchStartEvent, this.onDocumentClick, this), 
            this.allowKeyboardInteraction && (this.keyboardInteractionModule = new KeyboardInteraction(this));
        }, Schedule.prototype.removeSelectedClass = function() {
            for (var selectedCells = this.getSelectedElements(), _i = 0, selectedCells_1 = selectedCells; _i < selectedCells_1.length; _i++) {
                var cell = selectedCells_1[_i];
                cell.setAttribute("aria-selected", "false"), cell.removeAttribute("tabindex");
            }
            removeClass(selectedCells, "e-selected-cell");
        }, Schedule.prototype.addSelectedClass = function(cells, focusCell) {
            for (var _i = 0, cells_1 = cells; _i < cells_1.length; _i++) {
                cells_1[_i].setAttribute("aria-selected", "true");
            }
            addClass(cells, "e-selected-cell"), focusCell.setAttribute("tabindex", "0"), focusCell.focus();
        }, Schedule.prototype.selectCell = function(element) {
            this.removeSelectedClass(), this.addSelectedClass([ element ], element);
        }, Schedule.prototype.getSelectedElements = function() {
            return [].slice.call(this.element.querySelectorAll(".e-selected-cell"));
        }, Schedule.prototype.getAllDayRow = function() {
            return this.element.querySelector(".e-all-day-row");
        }, Schedule.prototype.getContentTable = function() {
            return this.element.querySelector(".e-content-table");
        }, Schedule.prototype.getWorkCellElements = function() {
            return [].slice.call(this.element.querySelectorAll(".e-work-cells"));
        }, Schedule.prototype.getIndexOfDate = function(collection, date) {
            return collection.map(Number).indexOf(+date);
        }, Schedule.prototype.isAllDayCell = function(td) {
            return !("Month" !== this.currentView && !td.classList.contains("e-all-day-cells") && !td.classList.contains("e-header-cells"));
        }, Schedule.prototype.getDateFromElement = function(td) {
            if (!isNullOrUndefined(td.getAttribute("data-date"))) {
                var dateInMS = parseInt(td.getAttribute("data-date"), 10);
                return new Date(dateInMS);
            }
        }, Schedule.prototype.getCellTemplate = function() {
            return this.cellTemplateFn;
        }, Schedule.prototype.getDateHeaderTemplate = function() {
            return this.dateHeaderTemplateFn;
        }, Schedule.prototype.getAppointmentTemplate = function() {
            return this.appointmentTemplateFn;
        }, Schedule.prototype.getEventTooltipTemplate = function() {
            return this.eventTooltipTemplateFn;
        }, Schedule.prototype.getEditorTemplate = function() {
            return this.editorTemplateFn;
        }, Schedule.prototype.onDocumentClick = function(args) {
            this.notify("document-click", {
                event: args
            });
        }, Schedule.prototype.onScheduleResize = function(args) {
            "Month" === this.currentView && this.notify("data-ready", {});
        }, Schedule.prototype.templateParser = function(template) {
            if (template) try {
                if (document.querySelectorAll(template).length) return compile$$1(document.querySelector(template).innerHTML.trim());
            } catch (error) {
                return compile$$1(template);
            }
        }, Schedule.prototype.unwireEvents = function() {
            var resize = "onorientationchange" in window ? "orientationchange" : "resize";
            EventHandler.remove(window, resize, this.onScheduleResize), EventHandler.remove(document, "click", this.onDocumentClick), 
            this.keyboardInteractionModule && this.keyboardInteractionModule.destroy();
        }, Schedule.prototype.getModuleName = function() {
            return "schedule";
        }, Schedule.prototype.getPersistData = function() {
            return this.addOnPersist([ "currentView", "selectedDate" ]);
        }, Schedule.prototype.onPropertyChanged = function(newProp, oldProp) {
            for (var requireRefresh = !1, _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                var prop = _a[_i];
                switch (prop) {
                  case "width":
                  case "height":
                    this.notify("ui-update", {
                        module: "scroll",
                        properties: {
                            width: newProp.width,
                            height: newProp.height
                        }
                    });
                    break;

                  case "views":
                    this.setViewOptions(), this.headerModule && this.headerModule.updateItems(), this.changeView(this.currentView, null, !0);
                    break;

                  case "currentView":
                    this.changeView(newProp.currentView, null, !0);
                    break;

                  case "selectedDate":
                    this.changeDate(newProp.selectedDate);
                    break;

                  case "dateFormat":
                    this.activeViewOptions = this.getActiveViewOptions(this.currentView), this.headerModule && this.headerModule.updateDateRange(this.activeView.getDateRangeText());
                    break;

                  case "showHeaderBar":
                    this.headerModule && (this.headerModule.destroy(), this.headerModule = null), newProp.showHeaderBar && (this.headerModule = new HeaderRenderer(this));
                    var uiArgs = {
                        cssProperties: this.enableRtl ? {
                            border: "borderLeftWidth",
                            padding: "paddingLeft"
                        } : {
                            border: "borderRightWidth",
                            padding: "paddingRight"
                        }
                    };
                    this.notify("scroll-ui-update", uiArgs);
                    break;

                  case "showWeekend":
                  case "workDays":
                  case "startHour":
                  case "endHour":
                  case "workHours":
                  case "readonly":
                    requireRefresh = !0;
                    break;

                  case "locale":
                    this.refresh();
                    break;

                  case "firstDayOfWeek":
                    this.headerModule && this.headerModule.setDayOfWeek(newProp.firstDayOfWeek), requireRefresh = !0;
                    break;

                  case "showTimeIndicator":
                    this.activeView.highlightCurrentTime();
                    break;

                  case "cellTemplate":
                    this.activeViewOptions.cellTemplate = newProp.cellTemplate, this.cellTemplateFn = this.templateParser(this.activeViewOptions.cellTemplate), 
                    requireRefresh = !0;
                    break;

                  case "dateHeaderTemplate":
                    this.activeViewOptions.dateHeaderTemplate = newProp.dateHeaderTemplate, this.dateHeaderTemplateFn = this.templateParser(this.activeViewOptions.dateHeaderTemplate), 
                    requireRefresh = !0;
                    break;

                  case "eventSettings":
                    this.onEventSettingsPropertyChanged(newProp.eventSettings, oldProp.eventSettings);
                    break;

                  case "timezone":
                    this.eventBase.timezonePropertyChange(oldProp.timezone);
                    break;

                  case "enableRtl":
                    this.headerModule && this.headerModule.setRtl(this.enableRtl), this.enableRtl ? addClass([ this.element ], "e-rtl") : removeClass([ this.element ], "e-rtl"), 
                    requireRefresh = !0;
                    break;

                  default:
                    this.extendedPropertyChange(prop, newProp, oldProp);
                }
            }
            requireRefresh && this.initializeView(this.currentView);
        }, Schedule.prototype.extendedPropertyChange = function(prop, newProp, oldProp) {
            switch (prop) {
              case "cssClass":
                oldProp.cssClass && removeClass([ this.element ], oldProp.cssClass), newProp.cssClass && addClass([ this.element ], newProp.cssClass);
                break;

              case "hideEmptyAgendaDays":
              case "agendaDaysCount":
                this.activeViewOptions = this.getActiveViewOptions(this.currentView), this.changeView(this.currentView, null, !0);
                break;

              case "allowKeyboardInteraction":
                this.keyboardInteractionModule && (this.keyboardInteractionModule.destroy(), this.keyboardInteractionModule = null), 
                newProp.allowKeyboardInteraction && (this.keyboardInteractionModule = new KeyboardInteraction(this));
                break;

              case "editorTemplate":
                isNullOrUndefined(this.editorTemplate) || (this.editorTemplateFn = this.templateParser(this.editorTemplate)), 
                this.eventWindow.setDialogContent();
            }
        }, Schedule.prototype.onEventSettingsPropertyChanged = function(newProp, oldProp) {
            for (var requireRefresh = !1, _i = 0, _a = Object.keys(newProp); _i < _a.length; _i++) {
                switch (_a[_i]) {
                  case "dataSource":
                  case "query":
                  case "fields":
                    this.initializeDataModule(), requireRefresh = !0;
                    break;

                  case "template":
                    this.activeViewOptions.eventTemplate = newProp.template, this.appointmentTemplateFn = this.templateParser(this.activeViewOptions.eventTemplate), 
                    requireRefresh = !0;
                    break;

                  case "enableTooltip":
                    this.eventTooltip && (this.eventTooltip.destroy(), this.eventTooltip = null), newProp.enableTooltip && (this.eventTooltip = new EventTooltip(this));
                    break;

                  case "tooltipTemplate":
                    this.eventTooltipTemplateFn = this.templateParser(this.eventSettings.tooltipTemplate);
                }
            }
            requireRefresh && this.renderModule.refreshDataManager();
        }, Schedule.prototype.setWorkHours = function(dates, start, end) {
            var startHour = this.globalize.parseDate(start, {
                skeleton: "Hm"
            }), endHour = this.globalize.parseDate(end, {
                skeleton: "Hm"
            }), tableEle = this.getContentTable();
            if (!isNullOrUndefined(startHour) && !isNullOrUndefined(endHour) && tableEle) {
                startHour.setMilliseconds(0), endHour.setMilliseconds(0);
                var viewStartHour = this.activeView.getStartHour();
                startHour < viewStartHour && (startHour = viewStartHour), endHour > this.activeView.getEndHour() && (endHour = this.activeView.getEndHour());
                for (var startIndex = Math.round((getDateInMs(startHour) - getDateInMs(viewStartHour)) / 18e5), endIndex = Math.ceil((getDateInMs(endHour) - getDateInMs(viewStartHour)) / 18e5), cells = [], _i = 0, dates_1 = dates; _i < dates_1.length; _i++) {
                    var date = dates_1[_i];
                    resetTime(date);
                    var colIndex = this.getIndexOfDate(this.activeView.renderDates, date);
                    if (colIndex >= 0) for (var i = startIndex; i < endIndex; i++) cells.push(tableEle.rows[i].cells[colIndex]);
                }
                addClass(cells, "e-work-hours");
            }
        }, Schedule.prototype.getCellDetails = function(td) {
            var startTime = this.getDateFromElement(td);
            return {
                startTime: startTime,
                endTime: td.classList.contains("e-all-day-cells") || td.classList.contains("e-header-cells") ? addDays(new Date(startTime.getTime()), 1) : this.activeView.getEndDateFromStartDate(startTime),
                isAllDay: this.isAllDayCell(td),
                element: td
            };
        }, Schedule.prototype.scrollTo = function(hour) {
            this.activeView.scrollToHour && this.activeView.scrollToHour(hour);
        }, Schedule.prototype.addEvent = function(data) {
            this.crudModule.addEvent(data);
        }, Schedule.prototype.saveEvent = function(data, currentAction) {
            this.crudModule.saveEvent(data, currentAction);
        }, Schedule.prototype.deleteEvent = function(id, currentAction) {
            this.crudModule.deleteEvent(id, currentAction);
        }, Schedule.prototype.getEvents = function() {
            return this.eventsData;
        }, Schedule.prototype.getOccurrencesByID = function(eventID) {
            return this.eventBase.getOccurrencesByID(eventID);
        }, Schedule.prototype.getOccurrencesByRange = function(startTime, endTime) {
            return this.eventBase.getOccurrencesByRange(startTime, endTime);
        }, Schedule.prototype.getCurrentViewEvents = function() {
            return this.eventsProcessed;
        }, Schedule.prototype.refreshEvents = function() {
            this.renderModule.refreshDataManager();
        }, Schedule.prototype.getEventDetails = function(element) {
            var guid = element.getAttribute("data-guid");
            return guid ? this.eventBase.getEventByGuid(guid) : {};
        }, Schedule.prototype.isSlotAvailable = function(startTime, endTime) {
            return !this.eventBase.filterEvents(startTime, endTime).length;
        }, Schedule.prototype.openEditor = function(data, action) {
            this.eventWindow.openEditor(data, action);
        }, Schedule.prototype.adjustEventWrapper = function() {
            this.activeView.adjustEventWrapper();
        }, Schedule.prototype.destroy = function() {
            this.quickPopup && this.quickPopup.destroy(), this.eventWindow && this.eventWindow.destroy(), 
            this.unwireEvents(), this.headerModule && (this.headerModule.destroy(), this.headerModule = null), 
            this.scrollModule && this.scrollModule.destroy(), this.activeView && (this.activeView.removeEventListener(), 
            this.activeView.destroy(), this.activeView = null), this.scheduleTouchModule && this.scheduleTouchModule.destroy(), 
            _super.prototype.destroy.call(this), this.element.innerHTML = "", removeClass([ this.element ], "e-schedule");
        }, __decorate$59([ Property("auto") ], Schedule.prototype, "width", void 0), __decorate$59([ Property("auto") ], Schedule.prototype, "height", void 0), 
        __decorate$59([ Property(!0) ], Schedule.prototype, "showHeaderBar", void 0), __decorate$59([ Property(!0) ], Schedule.prototype, "showTimeIndicator", void 0), 
        __decorate$59([ Property("Week") ], Schedule.prototype, "currentView", void 0), 
        __decorate$59([ Property([ "Day", "Week", "WorkWeek", "Month", "Agenda" ]) ], Schedule.prototype, "views", void 0), 
        __decorate$59([ Property(new Date()) ], Schedule.prototype, "selectedDate", void 0), 
        __decorate$59([ Property() ], Schedule.prototype, "dateFormat", void 0), __decorate$59([ Property(!0) ], Schedule.prototype, "showWeekend", void 0), 
        __decorate$59([ Property(0) ], Schedule.prototype, "firstDayOfWeek", void 0), __decorate$59([ Property([ 1, 2, 3, 4, 5 ]) ], Schedule.prototype, "workDays", void 0), 
        __decorate$59([ Property("00:00") ], Schedule.prototype, "startHour", void 0), __decorate$59([ Property("24:00") ], Schedule.prototype, "endHour", void 0), 
        __decorate$59([ Complex({}, WorkHours) ], Schedule.prototype, "workHours", void 0), 
        __decorate$59([ Property(!0) ], Schedule.prototype, "allowKeyboardInteraction", void 0), 
        __decorate$59([ Property() ], Schedule.prototype, "dateHeaderTemplate", void 0), 
        __decorate$59([ Property() ], Schedule.prototype, "cellTemplate", void 0), __decorate$59([ Property(!1) ], Schedule.prototype, "readonly", void 0), 
        __decorate$59([ Property(!0) ], Schedule.prototype, "showQuickInfo", void 0), __decorate$59([ Property() ], Schedule.prototype, "editorTemplate", void 0), 
        __decorate$59([ Property(7) ], Schedule.prototype, "agendaDaysCount", void 0), __decorate$59([ Property(!0) ], Schedule.prototype, "hideEmptyAgendaDays", void 0), 
        __decorate$59([ Property() ], Schedule.prototype, "timezone", void 0), __decorate$59([ Complex({}, EventSettings) ], Schedule.prototype, "eventSettings", void 0), 
        __decorate$59([ Property() ], Schedule.prototype, "cssClass", void 0), __decorate$59([ Property(!1) ], Schedule.prototype, "enableRtl", void 0), 
        __decorate$59([ Event() ], Schedule.prototype, "created", void 0), __decorate$59([ Event() ], Schedule.prototype, "destroyed", void 0), 
        __decorate$59([ Event() ], Schedule.prototype, "cellClick", void 0), __decorate$59([ Event() ], Schedule.prototype, "cellDoubleClick", void 0), 
        __decorate$59([ Event() ], Schedule.prototype, "actionBegin", void 0), __decorate$59([ Event() ], Schedule.prototype, "actionComplete", void 0), 
        __decorate$59([ Event() ], Schedule.prototype, "actionFailure", void 0), __decorate$59([ Event() ], Schedule.prototype, "navigating", void 0), 
        __decorate$59([ Event() ], Schedule.prototype, "renderCell", void 0), __decorate$59([ Event() ], Schedule.prototype, "eventClick", void 0), 
        __decorate$59([ Event() ], Schedule.prototype, "eventRendered", void 0), __decorate$59([ Event() ], Schedule.prototype, "dataBinding", void 0), 
        __decorate$59([ Event() ], Schedule.prototype, "popupOpen", void 0), __decorate$59([ Event() ], Schedule.prototype, "dataBound", void 0), 
        Schedule = __decorate$59([ NotifyPropertyChanges ], Schedule);
    }(Component), ViewBase = function() {
        function ViewBase(parent) {
            var _this = this;
            this.customHelper = {
                getDayName: function(dt) {
                    return _this.parent.getDayNames("abbreviated")[dt.getDay()];
                },
                getDate: function(dt) {
                    return _this.parent.globalize.formatDate(dt, {
                        format: "d"
                    });
                },
                getTime: function(dt) {
                    return _this.parent.isAdaptive ? _this.parent.globalize.formatDate(dt, {
                        skeleton: "h"
                    }) : _this.parent.globalize.formatDate(dt, {
                        skeleton: "hm"
                    });
                }
            }, this.parent = parent, this.l10n = this.parent.localeObj;
        }
        return ViewBase.prototype.createTableLayout = function(className) {
            var table = createElement("table", {
                className: "e-schedule-table " + (className || "")
            }), tbody = createElement("tbody");
            return table.appendChild(tbody), table;
        }, ViewBase.prototype.renderPanel = function(type) {
            "e-previous-panel" === type ? prepend([ this.element ], this.parent.element.querySelector("." + TABLE_CONTAINER_CLASS)) : this.parent.element.querySelector("." + TABLE_CONTAINER_CLASS).appendChild(this.element);
        }, ViewBase.prototype.setPanel = function(panel) {
            this.element = panel;
        }, ViewBase.prototype.getPanel = function() {
            return this.element;
        }, ViewBase.prototype.adjustEventWrapper = function() {}, ViewBase.prototype.startDate = function() {
            return this.renderDates[0];
        }, ViewBase.prototype.endDate = function() {
            return addDays(this.renderDates[this.renderDates.length - 1], 1);
        }, ViewBase.prototype.getStartHour = function() {
            var startHour = this.parent.globalize.parseDate(this.parent.activeViewOptions.startHour, {
                skeleton: "Hm"
            });
            return isNullOrUndefined(startHour) && (startHour = new Date(2e3, 0, 0, 0)), startHour;
        }, ViewBase.prototype.getEndHour = function() {
            var endHour = this.parent.globalize.parseDate(this.parent.activeViewOptions.endHour, {
                skeleton: "Hm"
            });
            return isNullOrUndefined(endHour) && (endHour = new Date(2e3, 0, 0, 0)), endHour;
        }, ViewBase.prototype.isCurrentDate = function(date) {
            return date.setHours(0, 0, 0, 0) === new Date().setHours(0, 0, 0, 0);
        }, ViewBase.prototype.isCurrentMonth = function(date) {
            return date.getFullYear() === new Date().getFullYear() && date.getMonth() === new Date().getMonth();
        }, ViewBase.prototype.isWorkDay = function(date) {
            return this.parent.activeViewOptions.workDays.indexOf(date.getDay()) >= 0;
        }, ViewBase.prototype.isWorkHour = function(date) {
            var startHour = this.parent.globalize.parseDate(this.parent.workHours.start, {
                skeleton: "Hm"
            }), endHour = this.parent.globalize.parseDate(this.parent.workHours.end, {
                skeleton: "Hm"
            });
            return !isNullOrUndefined(startHour) && !isNullOrUndefined(endHour) && (startHour.setMilliseconds(0), 
            endHour.setMilliseconds(0), !(getDateInMs(date) < getDateInMs(startHour) || getDateInMs(date) >= getDateInMs(endHour) || !this.isWorkDay(date)));
        }, ViewBase.prototype.getRenderDates = function() {
            this.renderDates = [], this.renderDates.push(resetTime(this.parent.selectedDate));
        }, ViewBase.prototype.getNextPreviousDate = function(type) {
            return addDays(this.parent.selectedDate, "next" === type ? 7 : -7);
        }, ViewBase.prototype.getLabelText = function(view) {
            return this.parent.localeObj.getConstant(view) + " of " + this.parent.globalize.formatDate(this.parent.selectedDate, {
                skeleton: "long"
            });
        }, ViewBase.prototype.getDateRangeText = function() {
            return this.parent.isAdaptive ? this.parent.globalize.formatDate(this.parent.selectedDate, {
                format: "MMMM y"
            }) : this.formatDateRange(this.renderDates[0], this.renderDates[this.renderDates.length - 1]);
        }, ViewBase.prototype.formatDateRange = function(startDate, endDate) {
            var globalize = this.parent.globalize;
            if (!isNullOrUndefined(this.parent.activeViewOptions.dateFormat)) return endDate ? globalize.formatDate(startDate, {
                format: this.parent.activeViewOptions.dateFormat
            }) + " - " + globalize.formatDate(endDate, {
                format: this.parent.activeViewOptions.dateFormat
            }) : globalize.formatDate(startDate, {
                format: this.parent.activeViewOptions.dateFormat
            });
            var longDateFormat;
            if (longDateFormat = "en" === this.parent.locale || "en-US" === this.parent.locale ? getValue("dateFormats.long", getDefaultDateObject()) : getValue("main." + this.parent.locale + ".dates.calendars.gregorian.dateFormats.long", cldrData), 
            !endDate) return globalize.formatDate(startDate, {
                format: longDateFormat
            });
            var dateFormat = longDateFormat.trim().toLocaleLowerCase();
            return "d" === dateFormat.substr(0, 1) ? startDate.getFullYear() === endDate.getFullYear() ? startDate.getMonth() === endDate.getMonth() ? globalize.formatDate(startDate, {
                format: "dd"
            }) + " - " + globalize.formatDate(endDate, {
                format: "dd MMMM yyyy"
            }) : globalize.formatDate(startDate, {
                format: "dd MMM"
            }) + " - " + globalize.formatDate(endDate, {
                format: "dd MMM yyyy"
            }) : globalize.formatDate(startDate, {
                format: "dd MMM yyyy"
            }) + " - " + globalize.formatDate(endDate, {
                format: "dd MMM yyyy"
            }) : "m" === dateFormat.substr(0, 1) ? startDate.getFullYear() === endDate.getFullYear() ? startDate.getMonth() === endDate.getMonth() ? globalize.formatDate(startDate, {
                format: "MMMM dd"
            }) + " - " + globalize.formatDate(endDate, {
                format: "dd, yyyy"
            }) : globalize.formatDate(startDate, {
                format: "MMM dd"
            }) + " - " + globalize.formatDate(endDate, {
                format: "MMM dd, yyyy"
            }) : globalize.formatDate(startDate, {
                format: "MMM dd, yyyy"
            }) + " - " + globalize.formatDate(endDate, {
                format: "MMM dd, yyyy"
            }) : globalize.formatDate(startDate, {
                format: longDateFormat
            }) + " - " + globalize.formatDate(endDate, {
                format: longDateFormat
            });
        }, ViewBase.prototype.getMobileDateElement = function(date, className) {
            var wrap = createElement("div", {
                className: className
            }), dateEle = createElement("div", {
                className: "e-m-date"
            });
            dateEle.innerHTML = this.parent.globalize.formatDate(date, {
                format: "d"
            });
            var dayEle = createElement("div", {
                className: "e-m-day"
            });
            return dayEle.innerHTML = this.parent.globalize.formatDate(date, {
                format: "E"
            }), wrap.appendChild(dateEle), wrap.appendChild(dayEle), wrap;
        }, ViewBase;
    }(), WorkCellInteraction = function() {
        function WorkCellInteraction(parent) {
            this.parent = parent;
        }
        return WorkCellInteraction.prototype.cellMouseDown = function(e) {
            this.parent.notify("cell-mouse-down", {
                event: e
            });
        }, WorkCellInteraction.prototype.cellClick = function(e) {
            if (!closest(e.target, "." + APPOINTMENT_CLASS)) {
                if (isNullOrUndefined(closest(e.target, ".e-navigate")) || isNullOrUndefined(this.parent.viewOptions.day) || "Day" === this.parent.currentView) {
                    if (this.parent.activeViewOptions.readonly) return;
                    var target = e.currentTarget, isWorkCell = target.classList.contains("e-work-cells") || target.classList.contains("e-all-day-cells");
                    if (isWorkCell && e.shiftKey && 1 === e.which && this.parent.keyboardInteractionModule) return void this.parent.keyboardInteractionModule.onMouseSelection(e);
                    this.parent.activeCellsData = this.parent.getCellDetails(target);
                    var args = extend(this.parent.activeCellsData, {
                        cancel: !1,
                        event: e,
                        name: "cellClick"
                    });
                    if (this.parent.trigger("cellClick", args), args.cancel) return;
                    isWorkCell && this.parent.selectCell(target), this.parent.notify("cellClick", args);
                } else {
                    var date = this.parent.getDateFromElement(e.currentTarget);
                    isNullOrUndefined(date) || this.parent.isAdaptive || (this.parent.setProperties({
                        selectedDate: date
                    }, !0), this.parent.changeView("Day"));
                }
            }
        }, WorkCellInteraction.prototype.cellDblClick = function(e) {
            if (isNullOrUndefined(closest(e.target, "." + APPOINTMENT_CLASS)) && !this.parent.activeViewOptions.readonly) {
                var args = extend(this.parent.activeCellsData, {
                    cancel: !1,
                    event: e,
                    name: "cellDoubleClick"
                });
                this.parent.trigger("cellDoubleClick", args), args.cancel || this.parent.eventWindow.openEditor(this.parent.activeCellsData, "Add");
            }
        }, WorkCellInteraction;
    }(), __extends$152 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), AppointmentRendering = function(_super) {
        function AppointmentRendering(parent) {
            var _this = _super.call(this, parent) || this;
            return _this.renderedEvents = [], _this.renderedAllDayEvents = [], _this.overlapEvents = [], 
            _this.moreEvents = [], _this.minorSlotCount = 2, _this.majorSlot = 60, _this.allDayLevel = 0, 
            _this.startHour = _this.parent.activeView.getStartHour(), _this.endHour = _this.parent.activeView.getEndHour(), 
            _this.element = _this.parent.activeView.getPanel(), _this.fields = _this.parent.eventFields, 
            _this.animation = new Animation({
                progress: _this.animationUiUpdate.bind(_this)
            }), _this.addEventListener(), _this;
        }
        return __extends$152(AppointmentRendering, _super), AppointmentRendering.prototype.renderAppointments = function() {
            var expandCollapse = this.element.querySelector(".e-all-day-appointment-section");
            EventHandler.remove(expandCollapse, "click", this.rowExpandCollapse), EventHandler.add(expandCollapse, "click", this.rowExpandCollapse, this);
            for (var _i = 0, appointmentWrapper_1 = [].slice.call(this.element.querySelectorAll("." + APPOINTMENT_CLASS)); _i < appointmentWrapper_1.length; _i++) {
                remove(appointmentWrapper_1[_i]);
            }
            for (var _a = 0, alldayCountWrapper_1 = [].slice.call(this.element.querySelectorAll(".e-row-count-wrapper")); _a < alldayCountWrapper_1.length; _a++) {
                remove(alldayCountWrapper_1[_a]);
            }
            this.allDayElement = [].slice.call(this.element.querySelectorAll(".e-all-day-cells:first-child")), 
            this.setAllDayRowHeight(0), this.renderedEvents = [], this.renderedAllDayEvents = [];
            var allDayEvents = [];
            this.dateRender = this.parent.activeView.renderDates, this.cellHeight = this.element.querySelector(".e-work-cells").offsetHeight;
            if (this.parent.eventsProcessed.length > 0) {
                for (var day = 0, length_1 = this.dateRender.length; day < length_1; day++) {
                    this.renderedEvents = [];
                    for (var startDateTime = new Date(this.dateRender[day].getTime()), endDateTime = addDays(this.dateRender[day], 1), filterEvents = this.filterEvents(startDateTime, endDateTime), count = 0, length1 = filterEvents.length; count < length1; count++) {
                        var event_1 = filterEvents[count];
                        this.isAllDayAppointment(event_1) ? allDayEvents.push(extend({}, event_1, null, !0)) : this.renderVerticalEvents(event_1, day);
                    }
                }
                allDayEvents.length > 0 && (allDayEvents = allDayEvents.filter(function(item, index, arr) {
                    return index === arr.map(function(item) {
                        return item.Guid;
                    }).indexOf(item.Guid);
                }), removeClass(this.allDayElement, "e-animate"), this.renderAllDayEvents(this.sortByDateTime(allDayEvents))), 
                this.parent.notify("content-ready", {}), addClass(this.allDayElement, "e-animate");
            }
        }, AppointmentRendering.prototype.createAppointmentElement = function(record, isAllDay, data) {
            var fieldMapping = this.parent.eventFields, appointmentWrapper = createElement("div", {
                id: "Appointment_" + record[fieldMapping.id],
                className: APPOINTMENT_CLASS,
                attrs: {
                    "data-guid": record.Guid,
                    role: "button",
                    tabindex: "0",
                    "aria-readonly": "false",
                    "aria-selected": "false",
                    "aria-grabbed": "true",
                    "aria-label": isNullOrUndefined(record[fieldMapping.subject]) ? this.parent.eventSettings.fields.subject.default : record[fieldMapping.subject]
                }
            }), appointmentDetails = createElement("div", {
                className: "e-appointment-details"
            });
            appointmentWrapper.appendChild(appointmentDetails);
            var templateElement, eventData = data;
            if (isNullOrUndefined(this.parent.activeViewOptions.eventTemplate)) {
                var appointmentSubject = createElement("div", {
                    className: "e-subject",
                    innerHTML: isNullOrUndefined(record[fieldMapping.subject]) ? this.parent.eventSettings.fields.subject.default : record[fieldMapping.subject]
                });
                if (isAllDay) if (record[fieldMapping.isAllDay]) templateElement = [ appointmentSubject ]; else {
                    templateElement = [];
                    var appointmentStartTime = createElement("div", {
                        className: "e-time" + (this.parent.isAdaptive ? " e-disable" : ""),
                        innerHTML: this.parent.globalize.formatDate(record[fieldMapping.startTime], {
                            skeleton: "hm"
                        })
                    }), appointmentEndTime = createElement("div", {
                        className: "e-time" + (this.parent.isAdaptive ? " e-disable" : ""),
                        innerHTML: this.parent.globalize.formatDate(record[fieldMapping.endTime], {
                            skeleton: "hm"
                        })
                    });
                    addClass([ appointmentSubject ], "e-text-center"), eventData.isLeft || templateElement.push(appointmentStartTime), 
                    templateElement.push(appointmentSubject), eventData.isRight || templateElement.push(appointmentEndTime);
                } else {
                    var timeStr = this.parent.globalize.formatDate(record[fieldMapping.startTime], {
                        skeleton: "hm"
                    }) + " - " + this.parent.globalize.formatDate(record[fieldMapping.endTime], {
                        skeleton: "hm"
                    });
                    templateElement = [ appointmentSubject, createElement("div", {
                        className: "e-time" + (this.parent.isAdaptive ? " e-disable" : ""),
                        innerHTML: timeStr
                    }), createElement("div", {
                        className: "e-location",
                        innerHTML: record[fieldMapping.location]
                    }) ];
                }
            } else templateElement = this.parent.getAppointmentTemplate()(record);
            if (append([].slice.call(templateElement), appointmentDetails), !isNullOrUndefined(record[fieldMapping.recurrenceRule])) {
                var recurrenceIcon = createElement("div", {
                    className: "e-icons " + (record[fieldMapping.id] === record[fieldMapping.recurrenceID] ? "e-recurrence-icon" : "e-recurrence-edit-icon") + (this.parent.isAdaptive ? " e-disable" : "")
                });
                isAllDay ? appointmentDetails.appendChild(recurrenceIcon) : appointmentWrapper.appendChild(recurrenceIcon);
            }
            return isAllDay ? this.renderSpannedIcon(appointmentDetails, eventData, isAllDay) : this.renderSpannedIcon(appointmentWrapper, eventData, isAllDay), 
            appointmentWrapper;
        }, AppointmentRendering.prototype.createMoreIndicator = function(allDayRow, count, currentDay) {
            var countWrapper = allDayRow[currentDay + count];
            if (countWrapper.childElementCount <= 0) {
                var innerCountWrap = createElement("div", {
                    className: "e-row-count-wrapper",
                    id: "e-row-count-wrapper-" + (currentDay + count).toString()
                }), moreIndicatorElement = createElement("div", {
                    className: "e-more-indicator",
                    attrs: {
                        tabindex: "0",
                        "data-index": (currentDay + count).toString(),
                        "data-count": "1"
                    },
                    innerHTML: "+1&nbsp;" + (this.parent.isAdaptive ? "" : this.parent.localeObj.getConstant("more"))
                });
                innerCountWrap.appendChild(moreIndicatorElement), countWrapper.appendChild(innerCountWrap), 
                EventHandler.add(moreIndicatorElement, "click", this.rowExpandCollapse, this);
            } else {
                var countCell = countWrapper.firstChild;
                countCell.firstChild.setAttribute("data-count", (parseInt(countCell.firstChild.getAttribute("data-count"), 10) + 1).toString()), 
                countCell.firstChild.innerHTML = "+" + parseInt(countCell.firstChild.getAttribute("data-count"), 10).toString() + "&nbsp;" + (this.parent.isAdaptive ? "" : this.parent.localeObj.getConstant("more"));
            }
        }, AppointmentRendering.prototype.renderSpannedIcon = function(element, spanEvent, isAllDay) {
            if (isAllDay) {
                if (spanEvent.isLeft) {
                    prepend([ createElement("div", {
                        className: "e-indicator e-icons e-left-icon"
                    }) ], element);
                }
                if (spanEvent.isRight) {
                    append([ createElement("div", {
                        className: "e-indicator e-icons e-right-icon"
                    }) ], element);
                }
            } else {
                if (spanEvent.isTop) {
                    prepend([ createElement("div", {
                        className: "e-indicator e-icons e-up-icon"
                    }) ], element);
                }
                if (spanEvent.isBottom) {
                    append([ createElement("div", {
                        className: "e-indicator e-icons e-down-icon"
                    }) ], element);
                }
            }
        }, AppointmentRendering.prototype.isSpannedEvent = function(record, day) {
            var currentDate = resetTime(this.dateRender[day]), fieldMapping = this.parent.eventFields, startEndHours = getStartEndHours(currentDate, this.startHour, this.endHour), event = extend({}, record, null, !0);
            return event.isSpanned = {
                isBottom: !1,
                isTop: !1
            }, record[fieldMapping.startTime].getTime() < startEndHours.startHour.getTime() && (event[fieldMapping.startTime] = startEndHours.startHour, 
            event.isSpanned.isTop = !0), record[fieldMapping.endTime].getTime() > startEndHours.endHour.getTime() && (event[fieldMapping.endTime] = startEndHours.endHour, 
            event.isSpanned.isBottom = !0), event;
        }, AppointmentRendering.prototype.renderAllDayEvents = function(event) {
            this.moreEvents = [], this.overlapList = [], this.allDayLevel = 0, this.slots = [], 
            this.slots.push(this.dateRender.map(function(date) {
                return +date;
            }));
            for (var day = 0, length_2 = this.dateRender.length; day < length_2; day++) for (var fieldMapping = this.parent.eventFields, filterEvents = this.filterEvents(new Date(this.dateRender[day].getTime()), addDays(this.dateRender[day], 1), event), allDayRowCell = this.element.querySelector(".e-all-day-cells:first-child"), eventWrapper = this.element.querySelector(".e-all-day-wrapper:nth-child(" + (day + 1) + ")"), _loop_1 = function(count, length1) {
                var eventObj = filterEvents[count], record = this_1.splitEvent(eventObj, this_1.dateRender)[0], cellTop = allDayRowCell.offsetTop, eStart = new Date(record[fieldMapping.startTime].getTime()), eEnd = new Date(record[fieldMapping.endTime].getTime()), dates = this_1.dateRender, appWidth = 0, topValue = 1, isDateRange = dates[0].getTime() <= eStart.getTime() && addDays(dates[dates.length - 1], 1).getTime() >= eStart.getTime();
                if (eStart <= eEnd && isDateRange) {
                    if (0 === this_1.renderedAllDayEvents.filter(function(event) {
                        return event.Guid === eventObj.Guid;
                    }).length) {
                        var allDayDifference = record.data.count, allDayIndex = this_1.getOverlapIndex(record, day, !0);
                        record.Index = allDayIndex, this_1.allDayLevel = this_1.allDayLevel < allDayIndex ? allDayIndex : this_1.allDayLevel;
                        var widthAdjustment = record.data.isRight ? 0 : "Day" === this_1.parent.currentView ? 4 : 7;
                        allDayDifference >= 0 && (appWidth = 100 * allDayDifference - widthAdjustment), 
                        this_1.renderedAllDayEvents.push(extend({}, record, null, !0));
                        var allDayRow = [].slice.call(this_1.element.querySelector(".e-all-day-row").children), appointmentElement = this_1.createAppointmentElement(eventObj, !0, record.data);
                        addClass([ appointmentElement ], "e-all-day-appointment"), eventWrapper.appendChild(appointmentElement);
                        var appHeight = appointmentElement.offsetHeight;
                        setStyleAttribute(appointmentElement, {
                            width: appWidth + "%",
                            top: (topValue += (0 === allDayIndex ? cellTop : cellTop + allDayIndex * appHeight) + 1) + "px"
                        });
                        var args = {
                            data: eventObj,
                            element: appointmentElement
                        };
                        if (this_1.parent.trigger("eventRendered", args), allDayIndex > 1) {
                            this_1.moreEvents.push(appointmentElement);
                            for (var count_1 = 0, length_3 = allDayDifference; count_1 < length_3; count_1++) this_1.createMoreIndicator(allDayRow, count_1, day);
                        }
                        allDayRowCell.setAttribute("data-count", this_1.allDayLevel.toString());
                        var allDayRowHeight = 4 + (!this_1.parent.uiStateValues.expand && this_1.allDayLevel > 2 ? 3 * appHeight : (this_1.allDayLevel + 1) * appHeight);
                        this_1.setAllDayRowHeight(allDayRowHeight), this_1.addOrRemoveClass(), this_1.wireAppointmentEvents(appointmentElement);
                    }
                }
            }, this_1 = this, count = 0, length1 = filterEvents.length; count < length1; count++) _loop_1(count);
        }, AppointmentRendering.prototype.renderVerticalEvents = function(eventObj, day) {
            var record = this.isSpannedEvent(eventObj, day), eStart = record[this.fields.startTime], eEnd = record[this.fields.endTime], topValue = 0, isDateRange = this.dateRender[0].getTime() <= eStart.getTime() && addDays(this.dateRender[this.dateRender.length - 1], 1).getTime() >= eStart.getTime();
            if (eStart < eEnd && isDateRange) {
                var appHeight = 0, startEndHours = getStartEndHours(resetTime(this.dateRender[day]), this.startHour, this.endHour);
                appHeight = (appHeight = startEndHours.endHour.getTime() <= eEnd.getTime() && startEndHours.startHour.getTime() >= eStart.getTime() ? this.getAppointmentHeight(this.cellHeight, startEndHours.startHour, startEndHours.endHour) : startEndHours.endHour.getTime() <= eEnd.getTime() ? this.getAppointmentHeight(this.cellHeight, eStart, startEndHours.endHour) : startEndHours.startHour.getTime() >= eStart.getTime() ? this.getAppointmentHeight(this.cellHeight, startEndHours.startHour, eEnd) : (eEnd.getTime() - eStart.getTime()) / 6e4 * (this.cellHeight * this.minorSlotCount) / this.majorSlot) < this.cellHeight ? this.cellHeight : appHeight, 
                eStart.getTime() > startEndHours.startHour.getTime() && (topValue = this.getTopValue(eStart, day));
                var appIndex = this.getOverlapIndex(record, day, !1);
                record.Index = appIndex, this.overlapList.push(record), this.overlapList.length > 1 ? isNullOrUndefined(this.overlapEvents[appIndex]) ? this.overlapEvents[appIndex] = [ record ] : this.overlapEvents[appIndex].push(record) : (this.overlapEvents = [], 
                this.overlapEvents.push([ record ]));
                var argsData = {
                    index: appIndex,
                    left: "0%",
                    width: (("Day" === this.parent.currentView ? 97 : 94) - this.overlapEvents.length) / this.overlapEvents.length + "%",
                    day: day,
                    record: record
                }, tempData = this.adjustOverlapElements(argsData);
                tempData.appWidth, this.renderedEvents.push(extend({}, record, null, !0));
                var appointmentWrap = [].slice.call(this.element.querySelector(".e-appointment-wrapper").children), appointmentElement = this.createAppointmentElement(eventObj, !1, record.isSpanned);
                setStyleAttribute(appointmentElement, {
                    width: tempData.appWidth,
                    height: appHeight + "px",
                    top: topValue + "px"
                });
                var maxHeight = appHeight - 40 - 15 * appointmentElement.querySelectorAll(".e-indicator").length;
                !this.parent.isAdaptive && appointmentElement.querySelector(".e-subject") && (appointmentElement.querySelector(".e-subject").style.maxHeight = maxHeight + "px"), 
                this.parent.enableRtl ? setStyleAttribute(appointmentElement, {
                    right: tempData.appLeft
                }) : setStyleAttribute(appointmentElement, {
                    left: tempData.appLeft
                }), appointmentWrap[argsData.day].appendChild(appointmentElement);
                var args = {
                    data: eventObj,
                    element: appointmentElement
                };
                this.parent.trigger("eventRendered", args), this.wireAppointmentEvents(appointmentElement);
            }
        }, AppointmentRendering.prototype.getTopValue = function(date, day) {
            var startHour = getStartEndHours(resetTime(this.dateRender[day]), this.startHour, this.endHour).startHour;
            return (60 * (date.getHours() - startHour.getHours()) + (date.getMinutes() - startHour.getMinutes())) * this.cellHeight * this.minorSlotCount / this.majorSlot;
        }, AppointmentRendering.prototype.getAppointmentHeight = function(cellHeight, startDate, endDate) {
            return (endDate.getTime() - startDate.getTime()) / 6e4 / (this.majorSlot / this.minorSlotCount) * cellHeight;
        }, AppointmentRendering.prototype.getOverlapIndex = function(record, day, isAllDay) {
            var eventsList, _this = this, fieldMapping = this.parent.eventFields;
            if (this.overlapEvents = [], isAllDay) {
                var date_1 = new Date(this.dateRender[day].getTime());
                eventsList = this.renderedAllDayEvents.filter(function(app) {
                    return resetTime(app[fieldMapping.startTime]).getTime() <= resetTime(date_1).getTime() && resetTime(app[fieldMapping.endTime]).getTime() >= resetTime(date_1).getTime();
                });
            } else {
                var appointmentList_1 = this.renderedEvents, appointment_1 = [];
                this.overlapList = appointmentList_1.filter(function(obj) {
                    return obj[fieldMapping.endTime] > record[fieldMapping.startTime] && obj[fieldMapping.startTime] < record[fieldMapping.endTime];
                }), this.overlapList.forEach(function(obj) {
                    var filterList = appointmentList_1.filter(function(list) {
                        return list[fieldMapping.endTime] >= obj[fieldMapping.startTime] && list[fieldMapping.startTime] <= obj[fieldMapping.endTime];
                    }), collection = _this.overlapList.filter(function(val) {
                        return -1 === filterList.indexOf(val);
                    });
                    return appointment_1.concat(collection);
                }), this.overlapList = this.overlapList.concat(appointment_1);
                for (var _i = 0, eventsList_1 = eventsList = this.overlapList.filter(function(obj) {
                    return obj[fieldMapping.endTime] > record[fieldMapping.startTime] && obj[fieldMapping.startTime] < record[fieldMapping.endTime];
                }); _i < eventsList_1.length; _i++) {
                    var event_2 = eventsList_1[_i], index = event_2.Index;
                    isNullOrUndefined(this.overlapEvents[index]) ? this.overlapEvents[index] = [ event_2 ] : this.overlapEvents[index].push(event_2);
                }
            }
            var appIndex;
            if (eventsList.length > 0) {
                var appLevel = eventsList.map(function(obj) {
                    return obj.Index;
                });
                appIndex = appLevel.length > 0 ? this.getSmallestMissingNumber(appLevel) : 0;
            } else appIndex = -1;
            return -1 === appIndex ? 0 : appIndex;
        }, AppointmentRendering.prototype.adjustOverlapElements = function(args) {
            for (var data = {
                appWidth: args.width,
                appLeft: args.left
            }, i = 0, length1 = this.overlapEvents.length; i < length1; i++) if (!isNullOrUndefined(this.overlapEvents[i])) for (var j = 0, length2 = this.overlapEvents[i].length; j < length2; j++) {
                var element = this.element.querySelector("#e-appointment-wrapper-" + args.day);
                if (element.childElementCount > 0) {
                    var eleGuid = this.overlapEvents[i][j].Guid;
                    if (element.querySelectorAll('div[data-guid="' + eleGuid + '"]').length > 0 && eleGuid !== args.record.Guid) {
                        var apps = element.querySelector('div[data-guid="' + eleGuid + '"]');
                        parseFloat(args.width) <= parseFloat(apps.style.width) && (this.parent.enableRtl ? apps.style.right = (parseFloat(args.width) + 1) * i + "%" : apps.style.left = (parseFloat(args.width) + 1) * i + "%", 
                        apps.style.width = parseFloat(args.width) + "%", data.appWidth = apps.style.width);
                    } else {
                        var appWidth = args.width;
                        if (isNullOrUndefined(this.overlapEvents[i - 1])) {
                            appWidth = (("Day" === this.parent.currentView ? 97 : 94) - this.overlapEvents.length) / this.overlapEvents.length + "%";
                        }
                        var leftPosition = (parseInt(appWidth, 0) + 1) * args.index + "%";
                        data.appWidth = appWidth, data.appLeft = leftPosition;
                    }
                }
            }
            return data;
        }, AppointmentRendering.prototype.setAllDayRowHeight = function(height) {
            for (var _i = 0, _a = this.allDayElement; _i < _a.length; _i++) {
                _a[_i].style.height = height / 12 + "em";
            }
            this.animation.animate(this.allDayElement[0]);
        }, AppointmentRendering.prototype.addOrRemoveClass = function() {
            var _this = this;
            this.moreEvents.filter(function(element) {
                !_this.parent.uiStateValues.expand && _this.allDayLevel > 2 ? (addClass([ element ], "e-appointment-hide"), 
                element.setAttribute("tabindex", "-1")) : (removeClass([ element ], "e-appointment-hide"), 
                element.setAttribute("tabindex", "0"));
            });
            var moreEventCount = this.element.querySelector(".e-all-day-appointment-section");
            this.parent.uiStateValues.expand ? (removeClass([ moreEventCount ], "e-appointment-expand"), 
            addClass([ moreEventCount ], "e-appointment-collapse")) : (removeClass([ moreEventCount ], "e-appointment-collapse"), 
            addClass([ moreEventCount ], "e-appointment-expand")), this.allDayLevel > 2 ? removeClass([ moreEventCount ], "e-disable") : addClass([ moreEventCount ], "e-disable");
            [].slice.call(this.element.querySelectorAll(".e-row-count-wrapper")).filter(function(element) {
                !_this.parent.uiStateValues.expand && _this.allDayLevel > 2 ? removeClass([ element ], "e-disable") : addClass([ element ], "e-disable");
            });
        }, AppointmentRendering.prototype.getEventHeight = function() {
            var eventElement = createElement("div", {
                className: APPOINTMENT_CLASS,
                styles: "visibility:hidden"
            });
            this.element.querySelector(".e-all-day-wrapper:first-child").appendChild(eventElement);
            var height = eventElement.offsetHeight;
            return eventElement.remove(), height;
        }, AppointmentRendering.prototype.rowExpandCollapse = function(event) {
            var target = this.element.querySelector(".e-all-day-appointment-section");
            this.parent.uiStateValues.expand = target.classList.contains("e-appointment-expand");
            var rowHeight;
            this.parent.uiStateValues.expand ? (target.setAttribute("title", "Collapse-all-day-section"), 
            target.setAttribute("aria-label", "Collapse section"), rowHeight = (this.allDayLevel + 1) * this.getEventHeight() + 4) : (target.setAttribute("title", "Expand-all-day-section"), 
            target.setAttribute("aria-label", "Expand section"), rowHeight = 3 * this.getEventHeight() + 4), 
            this.setAllDayRowHeight(rowHeight), this.addOrRemoveClass(), this.animation.animate(target);
        }, AppointmentRendering.prototype.animationUiUpdate = function() {
            this.parent.notify("content-ready", {});
        }, AppointmentRendering;
    }(EventBase), __extends$151 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), VerticalView = function(_super) {
        function VerticalView(parent) {
            var _this = _super.call(this, parent) || this;
            return _this.currentDateIndex = 0, _this.minorSlotCount = 2, _this.majorSlot = 60, 
            _this.viewClass = "e-day-view", _this.isInverseTableSelect = !0, _this.workCellAction = new WorkCellInteraction(parent), 
            _this;
        }
        return __extends$151(VerticalView, _super), VerticalView.prototype.addEventListener = function() {
            this.parent.on("scroll-ui-update", this.scrollUiUpdate, this), this.parent.on("data-ready", this.renderEvents, this);
        }, VerticalView.prototype.removeEventListener = function() {
            this.parent.off("scroll-ui-update", this.scrollUiUpdate), this.parent.off("data-ready", this.renderEvents);
        }, VerticalView.prototype.renderEvents = function() {
            new AppointmentRendering(this.parent).renderAppointments();
        }, VerticalView.prototype.onContentScroll = function(e) {
            var target = e.target;
            this.getTimeCellsElement().scrollTop = target.scrollTop, this.getDatesHeaderElement().firstChild.scrollLeft = target.scrollLeft, 
            this.parent.uiStateValues.top = target.scrollTop, this.parent.uiStateValues.left = target.scrollLeft, 
            this.parent.quickPopup.quickPopup.close();
        }, VerticalView.prototype.scrollUiUpdate = function(args) {
            var headerHeight = 0;
            this.parent.headerModule && (headerHeight += this.parent.headerModule.getHeaderElement().offsetHeight);
            var timecells = this.getTimeCellsElement(), content = this.getScrollableElement(), header = this.getDatesHeaderElement(), scrollerHeight = formatUnit(this.parent.element.offsetHeight - headerHeight - header.offsetHeight - 2);
            this.parent.isAdaptive ? content.style.height = scrollerHeight : timecells.style.height = content.style.height = scrollerHeight;
            var scrollBarWidth = getScrollBarWidth$1();
            content.offsetWidth - content.clientWidth > 0 ? (header.firstChild.style[args.cssProperties.border] = scrollBarWidth > 0 ? "1px" : "0px", 
            header.style[args.cssProperties.padding] = scrollBarWidth > 0 ? scrollBarWidth - 1 + "px" : "0px") : (header.firstChild.style[args.cssProperties.border] = "", 
            header.style[args.cssProperties.padding] = ""), timecells.style.paddingBottom = content.offsetHeight - content.clientHeight > 0 ? formatUnit(scrollBarWidth) : "", 
            this.parent.uiStateValues.isInitial ? (this.scrollToWorkHour(), this.parent.uiStateValues.isInitial = !1) : this.getScrollableElement().scrollTop = this.parent.uiStateValues.top;
        }, VerticalView.prototype.scrollToWorkHour = function() {
            if (this.parent.workHours.highlight) {
                var firstWorkHourCell = this.element.querySelector(".e-work-hours");
                firstWorkHourCell && (this.getScrollableElement().scrollTop = firstWorkHourCell.offsetTop, 
                this.parent.uiStateValues.top = firstWorkHourCell.offsetTop, this.parent.uiStateValues.left = 0);
            }
        }, VerticalView.prototype.scrollToHour = function(hour) {
            var date = this.parent.globalize.parseDate(hour, {
                skeleton: "Hm"
            });
            isNullOrUndefined(date) || (this.getScrollableElement().scrollTop = this.getTopFromDateTime(date));
        }, VerticalView.prototype.generateColLevels = function() {
            for (var colLevels = [], level = [], _i = 0, columns_1 = this.renderDates; _i < columns_1.length; _i++) {
                var col = columns_1[_i], classList$$1 = [ "e-header-cells" ];
                this.isCurrentDate(col) && classList$$1.push("e-current-day"), level.push({
                    date: col,
                    type: "dateHeader",
                    className: classList$$1
                });
            }
            return colLevels.push(level), colLevels;
        }, VerticalView.prototype.isWorkHourRange = function(date) {
            return this.getStartHour().getTime() <= date.getTime() && this.getEndHour().getTime() >= date.getTime();
        }, VerticalView.prototype.highlightCurrentTime = function() {
            var _this = this;
            if (this.parent.showTimeIndicator && this.isWorkHourRange(new Date())) {
                for (var flag = !1, i = 0; i < this.renderDates.length; i++) if (this.isCurrentDate(this.renderDates[i])) {
                    flag = !0, this.currentDateIndex = i;
                    break;
                }
                flag ? (this.changeCurrentTimePosition(), isNullOrUndefined(this.currentTimeIndicatorTimer) && (this.currentTimeIndicatorTimer = window.setInterval(function() {
                    _this.changeCurrentTimePosition();
                }, 6e4))) : this.clearCurrentTimeIndicatorTimer();
            } else this.clearCurrentTimeIndicatorTimer();
        }, VerticalView.prototype.clearCurrentTimeIndicatorTimer = function() {
            isNullOrUndefined(this.currentTimeIndicatorTimer) || (window.clearInterval(this.currentTimeIndicatorTimer), 
            this.currentTimeIndicatorTimer = null, this.removeCurrentTimeIndicatorElements());
        }, VerticalView.prototype.removeCurrentTimeIndicatorElements = function() {
            var currentTimeEle = this.element.querySelector(".e-current-time"), timelineEle = this.element.querySelector(".e-timeline-wrapper");
            currentTimeEle && remove(currentTimeEle), timelineEle && remove(timelineEle);
        }, VerticalView.prototype.changeCurrentTimePosition = function() {
            if (!this.parent.isDestroyed) {
                this.removeCurrentTimeIndicatorElements();
                var firstRow = this.parent.getContentTable().rows[0], firstCell = firstRow.cells[0], currentCell = firstRow.cells[this.currentDateIndex], cellWidth = 100 / firstRow.cells.length, prevLineWidth = cellWidth * (currentCell.cellIndex - firstCell.cellIndex) + "%", currentLineWidth = cellWidth + "%", top = this.getTopFromDateTime(new Date()), topInPx = formatUnit(top), timeCellsWrap = this.getTimeCellsElement(), rowIndex = Math.floor(top / firstCell.offsetHeight);
                if (!isNullOrUndefined(rowIndex)) {
                    removeClass(timeCellsWrap.querySelectorAll(".e-hide-childs"), "e-hide-childs"), 
                    addClass([ timeCellsWrap.querySelectorAll("tr")[rowIndex].lastChild ], "e-hide-childs");
                    var timelineWrap = createElement("div", {
                        className: "e-timeline-wrapper"
                    }), previousDateTimelineEle = createElement("div", {
                        className: "e-previous-timeline",
                        styles: "width:" + formatUnit(prevLineWidth) + "; left: 0; right: 0; top:" + topInPx
                    }), currentDateTimelineEle = createElement("div", {
                        className: "e-current-timeline",
                        styles: "width:" + currentLineWidth + "; " + (this.parent.enableRtl ? "right:" : "left:") + prevLineWidth + ";top:" + topInPx
                    }), currentTimeEle = createElement("div", {
                        innerHTML: this.parent.globalize.formatDate(new Date(), {
                            skeleton: "hm"
                        }),
                        className: "e-current-time",
                        styles: "width: 100%; position: absolute; left: 0; right: 0; top:" + topInPx
                    });
                    prepend([ currentTimeEle ], timeCellsWrap), currentTimeEle.style.top = formatUnit(currentTimeEle.offsetTop - currentTimeEle.offsetHeight / 2), 
                    prepend([ previousDateTimelineEle, currentDateTimelineEle ], timelineWrap), prepend([ timelineWrap ], this.getContentAreaElement().querySelector(".e-wrapper"));
                }
            }
        }, VerticalView.prototype.getTopFromDateTime = function(date) {
            var startHour = this.getStartHour();
            return (60 * (date.getHours() - startHour.getHours()) + (date.getMinutes() - startHour.getMinutes())) * this.getWorkCellHeight() * this.minorSlotCount / this.majorSlot;
        }, VerticalView.prototype.getWorkCellHeight = function() {
            return this.element.querySelector(".e-work-cells").offsetHeight;
        }, VerticalView.prototype.getTdContent = function(date, type) {
            var cntEle;
            switch (type) {
              case "dateHeader":
                if (this.parent.activeViewOptions.dateHeaderTemplate) {
                    var args = {
                        date: date,
                        type: type
                    };
                    cntEle = this.parent.getDateHeaderTemplate()(args);
                } else cntEle = compile$$1('<div class="e-header-day">${getDayName(date)}</div><div class="e-header-date e-navigate" role="link">${getDate(date)}</div>', this.customHelper)({
                    date: date
                });
                break;

              case "majorSlot":
                cntEle = compile$$1("<span>${getTime(date)}</span>", this.customHelper)({
                    date: date
                });
                break;

              case "minorSlot":
                cntEle = compile$$1("&nbsp;", this.customHelper)({
                    date: date
                });
                break;

              case "alldayCells":
                if (this.parent.cellTemplate) {
                    args = {
                        date: date,
                        type: type
                    };
                    cntEle = this.parent.getCellTemplate()(args);
                }
            }
            return cntEle;
        }, VerticalView.prototype.renderLayout = function(type) {
            this.setPanel(createElement("div", {
                className: "e-table-wrap"
            }));
            var clsList = [ "e-vertical-view", this.viewClass ];
            clsList.push(type), this.renderPanel(type), addClass([ this.element ], clsList), 
            this.element.appendChild(this.createTableLayout("e-outer-table")), this.colLevels = this.generateColLevels(), 
            this.renderHeader(), this.renderContent(), this.highlightCurrentTime(), this.parent.notify("content-ready", {});
        }, VerticalView.prototype.renderHeader = function() {
            var tr = createElement("tr"), indentTd = createElement("td", {
                className: "e-left-indent"
            }), dateTd = createElement("td");
            indentTd.appendChild(this.renderLeftIndent()), dateTd.appendChild(this.renderDatesHeader()), 
            tr.appendChild(indentTd), tr.appendChild(dateTd), prepend([ tr ], this.element.querySelector("tbody"));
        }, VerticalView.prototype.renderContent = function() {
            var tr = createElement("tr"), workTd = createElement("td");
            if (this.parent.isAdaptive) {
                workTd.setAttribute("colspan", "2");
                var scrollContainer = createElement("div", {
                    className: "e-scroll-container"
                });
                scrollContainer.appendChild(this.renderTimeCells()), scrollContainer.appendChild(this.renderContentArea()), 
                workTd.appendChild(scrollContainer), tr.appendChild(workTd);
            } else {
                var timesTd = createElement("td");
                timesTd.appendChild(this.renderTimeCells()), workTd.appendChild(this.renderContentArea()), 
                tr.appendChild(timesTd), tr.appendChild(workTd);
            }
            this.element.querySelector("tbody").appendChild(tr);
        }, VerticalView.prototype.renderLeftIndent = function() {
            for (var wrap = createElement("div", {
                className: "e-left-indent-wrap"
            }), tbl = this.createTableLayout(), trEle = createElement("tr"), rowCount = this.colLevels.length, i = 0; i < rowCount; i++) {
                var ntr_1 = trEle.cloneNode(), data_1 = {
                    className: [ this.colLevels[i][0].className[0] ],
                    type: "emptyCells"
                };
                ntr_1.appendChild(this.createTd(data_1)), tbl.querySelector("tbody").appendChild(ntr_1);
            }
            var ntr = trEle.cloneNode(), appointmentExpandCollapse = createElement("div", {
                attrs: {
                    tabindex: "0",
                    title: "Expand-all-day-section",
                    "aria-disabled": "false",
                    "aria-label": "Expand section"
                },
                className: "e-all-day-appointment-section e-appointment-expand e-icons e-disable"
            }), data = {
                className: [ "e-all-day-cells" ],
                type: "emptyCells"
            }, nth = this.createTd(data);
            return nth.appendChild(appointmentExpandCollapse), ntr.appendChild(nth), tbl.querySelector("tbody").appendChild(ntr), 
            wrap.appendChild(tbl), wrap;
        }, VerticalView.prototype.renderDatesHeader = function() {
            var container = createElement("div", {
                className: "e-date-header-container"
            }), wrap = createElement("div", {
                className: "e-date-header-wrap"
            }), innerWrap = createElement("div", {
                className: "e-all-day-appointment-wrapper"
            });
            container.appendChild(wrap);
            for (var tbl = this.createTableLayout(), trEle = createElement("tr"), rowCount = this.colLevels.length, lastLevel = this.colLevels[rowCount - 1], i = 0; i < rowCount; i++) {
                var ntr_2 = trEle.cloneNode();
                addClass([ ntr_2 ], "e-header-row");
                for (var level = this.colLevels[i], colspan = lastLevel.length / level.length, j = 0; j < level.length; j++) {
                    (td = level[j]).colSpan = colspan, ntr_2.appendChild(this.createTd(td));
                }
                tbl.querySelector("tbody").appendChild(ntr_2);
            }
            var ntr = trEle.cloneNode();
            addClass([ ntr ], "e-all-day-row");
            for (j = 0; j < lastLevel.length; j++) {
                var td;
                (td = extend({}, lastLevel[j])).className = [ "e-all-day-cells" ], td.type = "alldayCells";
                var ntd = this.createTd(td);
                ntd.setAttribute("data-date", td.date.getTime().toString()), ntd.setAttribute("data-index", j.toString());
                var appointmentWrap = createElement("div", {
                    id: "e-all-day-appointment-wrapper-" + j.toString(),
                    className: "e-all-day-wrapper",
                    attrs: {
                        "data-index": j.toString()
                    },
                    styles: "width:calc(" + 100 / this.renderDates.length + "%)"
                });
                innerWrap.appendChild(appointmentWrap), this.wireCellEvents(ntd), ntr.appendChild(ntd);
            }
            return tbl.querySelector("tbody").appendChild(ntr), wrap.appendChild(innerWrap), 
            wrap.appendChild(tbl), container;
        }, VerticalView.prototype.createTd = function(td) {
            var tdEle = createElement("th");
            if (td.className && addClass([ tdEle ], td.className), td.date && td.type) {
                var ele = this.getTdContent(td.date, td.type);
                ele && ele.length && append([].slice.call(ele), tdEle);
            }
            "dateHeader" === td.type && td.className.indexOf("e-header-cells") >= 0 && (tdEle.setAttribute("data-date", td.date.getTime().toString()), 
            EventHandler.add(tdEle, "click", this.workCellAction.cellClick, this), EventHandler.add(tdEle, "dblclick", this.workCellAction.cellDblClick, this));
            var args = {
                elementType: td.type,
                element: tdEle,
                date: td.date
            };
            return this.parent.trigger("renderCell", args), tdEle;
        }, VerticalView.prototype.wireCellEvents = function(element) {
            EventHandler.add(element, "mousedown", this.workCellAction.cellMouseDown, this), 
            EventHandler.add(element, "click", this.workCellAction.cellClick, this), EventHandler.add(element, "dblclick", this.workCellAction.cellDblClick, this);
        }, VerticalView.prototype.renderTimeCells = function() {
            var _this = this, wrap = createElement("div", {
                className: "e-time-cells-wrap"
            }), tbl = this.createTableLayout(), trEle = createElement("tr");
            return this.getTimeSlotRows(function(r) {
                r.type = r.first ? "majorSlot" : "minorSlot", r.className = r.last ? [ "e-time-cells" ] : [];
                var ntr = trEle.cloneNode(), data = {
                    date: r.date,
                    type: r.type,
                    className: r.className
                };
                return ntr.appendChild(_this.createTd(data)), tbl.querySelector("tbody").appendChild(ntr), 
                r;
            }), wrap.appendChild(tbl), wrap;
        }, VerticalView.prototype.renderContentArea = function() {
            var _this = this, wrap = createElement("div", {
                className: "e-content-wrap"
            }), innerWrap = createElement("div", {
                className: "e-wrapper"
            });
            wrap.appendChild(innerWrap);
            var tbl = this.createTableLayout("e-content-table"), tr = createElement("tr", {
                attrs: {
                    role: "row"
                }
            }), td = createElement("td", {
                attrs: {
                    role: "gridcell",
                    "aria-selected": "false"
                }
            }), tbody = tbl.querySelector("tbody"), columns = this.renderDates;
            this.getTimeSlotRows(function(r) {
                for (var ntr = tr.cloneNode(), _i = 0, columns_2 = columns; _i < columns_2.length; _i++) {
                    var col = columns_2[_i], ntd = td.cloneNode(), clsName = r.last ? [ "e-work-cells" ] : [ "e-work-cells", "e-alternate-cells" ], cellDate = resetTime(new Date("" + col));
                    if (setTime(cellDate, getDateInMs(r.date)), _this.parent.workHours.highlight && _this.isWorkHour(cellDate) && clsName.push("e-work-hours"), 
                    addClass([ ntd ], clsName), _this.parent.cellTemplate) {
                        var args_1 = {
                            date: cellDate,
                            type: "workCells"
                        };
                        append([].slice.call(_this.parent.getCellTemplate()(args_1)), ntd);
                    }
                    ntd.setAttribute("data-date", cellDate.getTime().toString()), _this.wireCellEvents(ntd);
                    var args = {
                        elementType: "workCells",
                        element: ntd,
                        date: cellDate
                    };
                    _this.parent.trigger("renderCell", args), ntr.appendChild(ntd);
                }
                return tbody.appendChild(ntr), r;
            });
            for (var innerAppointmentWrap = createElement("div", {
                className: "e-appointment-wrapper"
            }), day = 0, length_1 = this.renderDates.length; day < length_1; day++) {
                var appointmentWrap = createElement("div", {
                    id: "e-appointment-wrapper-" + day.toString(),
                    className: "e-day-wrapper",
                    attrs: {
                        "data-dayindex": day.toString()
                    },
                    styles: "width:calc(" + 100 / this.renderDates.length + "%)"
                });
                innerAppointmentWrap.appendChild(appointmentWrap);
            }
            return innerWrap.appendChild(innerAppointmentWrap), wrap.appendChild(tbl), EventHandler.add(wrap, "scroll", this.onContentScroll, this), 
            wrap;
        }, VerticalView.prototype.getScrollableElement = function() {
            return this.parent.isAdaptive ? this.element.querySelector(".e-scroll-container") : this.getContentAreaElement();
        }, VerticalView.prototype.getDatesHeaderElement = function() {
            return this.element.querySelector(".e-date-header-container");
        }, VerticalView.prototype.getTimeCellsElement = function() {
            return this.element.querySelector(".e-time-cells-wrap");
        }, VerticalView.prototype.getContentAreaElement = function() {
            return this.element.querySelector(".e-content-wrap");
        }, VerticalView.prototype.getEndDateFromStartDate = function(start) {
            var msInterval = 6e4 * this.majorSlot / this.minorSlotCount, end = new Date(start.getTime());
            return end.setMilliseconds(end.getMilliseconds() + msInterval), end;
        }, VerticalView.prototype.adjustEventWrapper = function() {
            var tblWidth = this.element.querySelector(".e-content-table").offsetWidth;
            this.element.querySelector(".e-wrapper").style.width = tblWidth + "px", this.element.querySelector(".e-all-day-appointment-wrapper").style.width = tblWidth + "px";
        }, VerticalView.prototype.getTimeSlotRows = function(handler) {
            var rows = [], startHour = this.getStartHour(), endHour = this.getEndHour(), msMajorInterval = 6e4 * this.majorSlot, msInterval = msMajorInterval / this.minorSlotCount, length = Math.round(MS_PER_DAY / msInterval), msStartHour = startHour.getTime(), msEndHour = endHour.getTime();
            msStartHour !== msEndHour && (length = Math.round((msEndHour - msStartHour) / msInterval));
            for (var dt = new Date(msStartHour), i = 0; i < length; i++) {
                var majorTickDivider = i % (msMajorInterval / msInterval), row = {
                    date: new Date("" + dt),
                    first: 0 === majorTickDivider,
                    middle: majorTickDivider < this.minorSlotCount - 1,
                    last: majorTickDivider === this.minorSlotCount - 1,
                    type: ""
                };
                handler && handler(row), rows.push(row), dt.setMilliseconds(msInterval);
            }
            return rows;
        }, VerticalView.prototype.getModuleName = function() {
            return "verticalView";
        }, VerticalView.prototype.destroy = function() {
            this.parent.isDestroyed || (this.clearCurrentTimeIndicatorTimer(), this.element && (EventHandler.remove(this.getContentAreaElement(), "scroll", this.onContentScroll), 
            remove(this.element), this.element = null, this.parent.scheduleTouchModule && this.parent.scheduleTouchModule.resetValues()));
        }, VerticalView;
    }(ViewBase), __extends$150 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), Day = function(_super) {
        function Day(parent) {
            var _this = _super.call(this, parent) || this;
            return _this.viewClass = "e-day-view", _this;
        }
        return __extends$150(Day, _super), Day.prototype.getNextPreviousDate = function(type) {
            var daysCount = "next" === type ? 1 : -1;
            if (this.parent.activeViewOptions.showWeekend) return addDays(this.parent.selectedDate, daysCount);
            for (var date = addDays(this.parent.selectedDate, daysCount); !this.isWorkDay(date); ) date = addDays(date, daysCount);
            return date;
        }, Day.prototype.getDateRangeText = function() {
            return this.parent.isAdaptive ? this.parent.globalize.formatDate(this.parent.selectedDate, {
                format: "MMMM y"
            }) : this.formatDateRange(this.parent.selectedDate);
        }, Day.prototype.getModuleName = function() {
            return "day";
        }, Day;
    }(VerticalView), __extends$153 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), Week = function(_super) {
        function Week(parent) {
            var _this = _super.call(this, parent) || this;
            return _this.viewClass = "e-week-view", _this;
        }
        return __extends$153(Week, _super), Week.prototype.getRenderDates = function() {
            this.renderDates = [];
            for (var start = getWeekFirstDate(resetTime(this.parent.selectedDate), this.parent.firstDayOfWeek), i = 0; i < 7; i++) this.parent.activeViewOptions.showWeekend ? this.renderDates.push(start) : this.isWorkDay(start) && this.renderDates.push(start), 
            start = addDays(start, 1);
        }, Week.prototype.getModuleName = function() {
            return "week";
        }, Week;
    }(VerticalView), __extends$154 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), WorkWeek = function(_super) {
        function WorkWeek(par) {
            var _this = _super.call(this, par) || this;
            return _this.viewClass = "e-work-week-view", _this;
        }
        return __extends$154(WorkWeek, _super), WorkWeek.prototype.getRenderDates = function() {
            this.renderDates = [];
            for (var start = getWeekFirstDate(resetTime(this.parent.selectedDate), this.parent.firstDayOfWeek), i = 0; i < 7; i++) this.isWorkDay(start) && this.renderDates.push(start), 
            start = addDays(start, 1);
        }, WorkWeek.prototype.getModuleName = function() {
            return "workWeek";
        }, WorkWeek;
    }(VerticalView), __extends$156 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), MonthEvent = function(_super) {
        function MonthEvent(parent) {
            var _this = _super.call(this, parent) || this;
            return _this.renderedEvents = [], _this.element = _this.parent.activeView.getPanel(), 
            _this.fields = _this.parent.eventFields, _this.addEventListener(), _this;
        }
        return __extends$156(MonthEvent, _super), MonthEvent.prototype.renderAppointments = function() {
            for (var _i = 0, appointmentWrapper_1 = [].slice.call(this.element.querySelectorAll(".e-appointment-wrapper")); _i < appointmentWrapper_1.length; _i++) {
                remove(appointmentWrapper_1[_i]);
            }
            this.renderedEvents = [], this.dateRender = this.parent.activeView.renderDates, 
            this.workCells = [].slice.call(this.element.querySelectorAll(".e-work-cells")), 
            this.cellWidth = this.workCells[0].offsetWidth, this.cellHeight = this.workCells[0].offsetHeight, 
            this.eventHeight = this.getElementHeightFromClass(this.element, APPOINTMENT_CLASS), 
            this.monthHeaderHeight = this.getOuterHeight(this.workCells[0].querySelector(".e-date-header"));
            var eventsList = this.parent.eventsProcessed;
            this.sortByDateTime(eventsList);
            var dates = this.dateRender.map(function(date) {
                return +date;
            });
            this.slots = [];
            for (var noOfDays = this.parent.activeViewOptions.showWeekend ? 7 : this.parent.activeViewOptions.workDays.length; dates.length > 0; ) this.slots.push(dates.splice(0, noOfDays));
            for (var _a = 0, eventsList_1 = eventsList; _a < eventsList_1.length; _a++) for (var event_1 = eventsList_1[_a], _b = 0, splittedEvents_1 = this.splitEvent(event_1, this.dateRender); _b < splittedEvents_1.length; _b++) {
                var event_2 = splittedEvents_1[_b];
                this.renderAppointmentMonth(event_2);
            }
        }, MonthEvent.prototype.getElementHeightFromClass = function(container, elementClass) {
            var height = 0, el = createElement("div", {
                className: elementClass
            }).cloneNode();
            return el.style.visibility = "hidden", el.style.position = "absolute", container.appendChild(el), 
            height = this.getOuterHeight(el), remove(el), height;
        }, MonthEvent.prototype.getOuterHeight = function(element) {
            var style = getComputedStyle(element);
            return element.offsetHeight + (parseInt(style.marginTop, 10) || 0) + (parseInt(style.marginBottom, 10) || 0);
        }, MonthEvent.prototype.createAppointmentElement = function(record) {
            var appointmentWrapper = createElement("div", {
                id: "Appointment_" + record[this.fields.id],
                className: APPOINTMENT_CLASS,
                attrs: {
                    "data-guid": record.Guid,
                    role: "button",
                    tabindex: "0",
                    "aria-readonly": "false",
                    "aria-selected": "false",
                    "aria-grabbed": "true",
                    "aria-label": isNullOrUndefined(record[this.fields.subject]) ? this.parent.eventSettings.fields.subject.default : record[this.fields.subject]
                }
            }), appointmentDetails = createElement("div", {
                className: "e-appointment-details"
            });
            appointmentWrapper.appendChild(appointmentDetails);
            var templateElement, eventData = record.data;
            if (isNullOrUndefined(this.parent.activeViewOptions.eventTemplate)) {
                var eventSubject = isNullOrUndefined(record[this.fields.subject]) ? this.parent.eventSettings.fields.subject.default : record[this.fields.subject], eventLocation = isNullOrUndefined(record[this.fields.location]) ? this.parent.eventSettings.fields.location.default : record[this.fields.location], appointmentSubject = createElement("div", {
                    className: "e-subject",
                    innerHTML: eventSubject + (eventLocation ? ";&nbsp" + eventLocation : "")
                }), appointmentStartTime = createElement("div", {
                    className: "e-time",
                    innerHTML: this.parent.globalize.formatDate(eventData[this.fields.startTime], {
                        skeleton: "hm"
                    }),
                    styles: "display:" + (this.parent.isAdaptive ? "none" : "block")
                }), appointmentEndTime = createElement("div", {
                    className: "e-time",
                    innerHTML: this.parent.globalize.formatDate(eventData[this.fields.endTime], {
                        skeleton: "hm"
                    }),
                    styles: "display:" + (this.parent.isAdaptive ? "none" : "block")
                });
                record[this.fields.isAllDay] ? (templateElement = [ appointmentSubject ], addClass([ appointmentSubject ], "e-text-center")) : eventData.count <= 1 && !eventData.isLeft && !eventData.isRight ? templateElement = [ appointmentStartTime, appointmentSubject ] : (templateElement = [], 
                addClass([ appointmentSubject ], "e-text-center"), eventData.isLeft || templateElement.push(appointmentStartTime), 
                templateElement.push(appointmentSubject), eventData.isRight || templateElement.push(appointmentEndTime));
            } else templateElement = this.parent.getAppointmentTemplate()(record);
            if (append([].slice.call(templateElement), appointmentDetails), !isNullOrUndefined(record[this.fields.recurrenceRule])) {
                var iconClass = record[this.fields.id] === record[this.fields.recurrenceID] ? "e-recurrence-icon" : "e-recurrence-edit-icon";
                appointmentDetails.appendChild(createElement("div", {
                    className: "e-icons " + iconClass,
                    styles: "display:" + (this.parent.isAdaptive ? "none" : "block")
                }));
            }
            if (eventData.isLeft) {
                prepend([ createElement("div", {
                    className: "e-indicator e-icons e-left-icon"
                }) ], appointmentDetails);
            }
            if (eventData.isRight) {
                append([ createElement("div", {
                    className: "e-indicator e-icons e-right-icon"
                }) ], appointmentDetails);
            }
            return appointmentWrapper;
        }, MonthEvent.prototype.renderAppointmentMonth = function(event) {
            var startTime = event[this.fields.startTime], endTime = event[this.fields.endTime], day = this.parent.getIndexOfDate(this.dateRender, resetTime(startTime));
            if (!(day < 0)) {
                var overlapCount = this.getIndex(event, startTime);
                event.Index = overlapCount;
                var appTop = 0, appHeight = this.eventHeight;
                this.renderedEvents.push(extend({}, event, null, !0));
                var diffInDays = event.data.count;
                if (startTime.getTime() <= endTime.getTime()) {
                    var appWidth_1 = diffInDays * this.cellWidth - 1, cellTd = this.workCells[day];
                    if (appTop = overlapCount * (appHeight + 0), this.cellHeight > this.monthHeaderHeight + (overlapCount + 1) * (appHeight + 0) + 19) {
                        var appointmentElement = this.createAppointmentElement(event);
                        if (this.wireAppointmentEvents(appointmentElement), setStyleAttribute(appointmentElement, {
                            width: appWidth_1 + "px",
                            height: appHeight + "px",
                            top: appTop + "px"
                        }), cellTd.querySelector(".e-appointment-wrapper")) cellTd.querySelector(".e-appointment-wrapper").appendChild(appointmentElement); else {
                            (wrapper = createElement("div", {
                                className: "e-appointment-wrapper"
                            })).appendChild(appointmentElement), cellTd.appendChild(wrapper);
                        }
                        var args = {
                            data: event,
                            element: appointmentElement
                        };
                        this.parent.trigger("eventRendered", args);
                    } else for (var i = 0; i < diffInDays; i++) {
                        var cellTd_1 = this.workCells[day + i];
                        if (cellTd_1 && isNullOrUndefined(cellTd_1.querySelector(".e-more-indicator"))) {
                            var startDateTime = new Date(this.dateRender[day + i].getTime()), endDateTime = addDays(this.dateRender[day + i], 1), filterEvents = this.filterEvents(startDateTime, endDateTime, this.parent.eventsProcessed), appArea = this.cellHeight - this.monthHeaderHeight - 19, renderedAppCount = Math.floor(appArea / (appHeight + 0)), moreIndicatorElement = createElement("div", {
                                className: "e-more-indicator",
                                innerHTML: "+" + (filterEvents.length - renderedAppCount <= 0 ? 1 : filterEvents.length - renderedAppCount) + "&nbsp;" + (this.parent.isAdaptive ? "" : this.parent.localeObj.getConstant("more")),
                                attrs: {
                                    tabindex: "0",
                                    "data-start-date": startDateTime.getTime().toString(),
                                    "data-end-date": endDateTime.getTime().toString()
                                }
                            });
                            if (moreIndicatorElement.style.top = appArea + "px", cellTd_1.querySelector(".e-appointment-wrapper")) cellTd_1.querySelector(".e-appointment-wrapper").appendChild(moreIndicatorElement); else {
                                var wrapper;
                                (wrapper = createElement("div", {
                                    className: "e-appointment-wrapper"
                                })).appendChild(moreIndicatorElement), cellTd_1.appendChild(wrapper);
                            }
                            EventHandler.add(moreIndicatorElement, "click", this.moreIndicatorClick, this);
                        }
                    }
                }
            }
        }, MonthEvent.prototype.getIndex = function(record, date) {
            var appIndex = -1, appointments = this.renderedEvents;
            if (appointments.length > 0) {
                for (var appointmentsList = [], _i = 0, appointments_1 = appointments; _i < appointments_1.length; _i++) {
                    var app = appointments_1[_i];
                    resetTime(app[this.fields.startTime]).getTime() <= resetTime(date).getTime() && resetTime(app[this.fields.endTime]).getTime() >= resetTime(date).getTime() && appointmentsList.push(app);
                }
                var appLevel = appointmentsList.map(function(obj) {
                    return obj.Index;
                });
                appIndex = appLevel.length > 0 ? this.getSmallestMissingNumber(appLevel) : 0;
            }
            return -1 === appIndex ? 0 : appIndex;
        }, MonthEvent.prototype.moreIndicatorClick = function(event) {
            var target = closest(event.target, ".e-more-indicator"), startDate = new Date(parseInt(target.getAttribute("data-start-date"), 10)), endDate = new Date(parseInt(target.getAttribute("data-end-date"), 10)), moreEventArgs = {
                date: startDate,
                event: this.filterEvents(startDate, endDate, this.parent.eventsProcessed),
                element: event.target
            };
            !isNullOrUndefined(startDate) && this.parent.isAdaptive ? (this.parent.setProperties({
                selectedDate: startDate
            }, !0), this.parent.changeView("Day")) : this.parent.quickPopup.moreEventClick(moreEventArgs);
        }, MonthEvent;
    }(EventBase), __extends$155 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), Month = function(_super) {
        function Month(parent) {
            var _this = _super.call(this, parent) || this;
            return _this.dayNameFormat = "wide", _this.viewClass = "e-month-view", _this.isInverseTableSelect = !1, 
            _this.workCellAction = new WorkCellInteraction(parent), _this;
        }
        return __extends$155(Month, _super), Month.prototype.addEventListener = function() {
            this.parent.on("scroll-ui-update", this.onScrollUiUpdate, this), this.parent.on("data-ready", this.onDataReady, this), 
            this.parent.on("cellClick", this.onCellClick, this);
        }, Month.prototype.removeEventListener = function() {
            this.parent.off("scroll-ui-update", this.onScrollUiUpdate), this.parent.off("data-ready", this.onDataReady), 
            this.parent.off("cellClick", this.onCellClick);
        }, Month.prototype.onDataReady = function(args) {
            new MonthEvent(this.parent).renderAppointments();
        }, Month.prototype.onCellClick = function(event) {}, Month.prototype.onContentScroll = function(e) {
            this.getDatesHeaderElement().firstChild.scrollLeft = e.target.scrollLeft;
        }, Month.prototype.onScrollUiUpdate = function(args) {
            var headerHeight = 0;
            this.parent.headerModule && (headerHeight += this.parent.headerModule.getHeaderElement().offsetHeight);
            var header = this.getDatesHeaderElement(), content = this.getContentAreaElement();
            if (content.style.height = "auto", content.style.height = formatUnit(this.parent.element.offsetHeight - headerHeight - header.offsetHeight - 2), 
            content.offsetWidth - content.clientWidth > 0) {
                var scrollBarWidth = getScrollBarWidth$1();
                header.firstChild.style[args.cssProperties.border] = scrollBarWidth > 0 ? "1px" : "0px", 
                header.style[args.cssProperties.padding] = scrollBarWidth > 0 ? scrollBarWidth - 1 + "px" : "0px";
            } else header.firstChild.style[args.cssProperties.border] = "", header.style[args.cssProperties.padding] = "";
        }, Month.prototype.generateColLevels = function() {
            for (var count = this.parent.activeViewOptions.showWeekend ? 7 : this.parent.activeViewOptions.workDays.length, colLevels = [], level = [], col = 0; col < count; col++) {
                var classList$$1 = [ "e-header-cells" ];
                this.isCurrentMonth(this.parent.selectedDate) && new Date().getDay() === col && classList$$1.push("e-current-day"), 
                level.push({
                    date: this.renderDates[col],
                    type: "monthHeader",
                    className: classList$$1
                });
            }
            return colLevels.push(level), colLevels;
        }, Month.prototype.getDayNameFormat = function() {
            return this.parent.isAdaptive ? "abbreviated" : "wide";
        }, Month.prototype.renderLayout = function(type) {
            this.dayNameFormat = this.getDayNameFormat(), this.setPanel(createElement("div", {
                className: "e-table-wrap"
            }));
            var clsList = [ this.viewClass ];
            clsList.push(type), addClass([ this.element ], clsList), this.renderPanel(type), 
            this.element.appendChild(this.createTableLayout("e-outer-table")), this.colLevels = this.generateColLevels(), 
            this.renderHeader(), this.renderContent(), this.parent.notify("content-ready", {});
        }, Month.prototype.wireCellEvents = function(element) {
            EventHandler.add(element, "mousedown", this.workCellAction.cellMouseDown, this), 
            EventHandler.add(element, "click", this.workCellAction.cellClick, this), EventHandler.add(element, "dblclick", this.workCellAction.cellDblClick, this);
        }, Month.prototype.renderHeader = function() {
            var tr = createElement("tr"), dateTd = createElement("td");
            dateTd.appendChild(this.renderDatesHeader()), tr.appendChild(dateTd), prepend([ tr ], this.element.querySelector("tbody"));
        }, Month.prototype.renderContent = function() {
            var tr = createElement("tr"), workTd = createElement("td");
            workTd.appendChild(this.renderContentArea()), tr.appendChild(workTd), this.element.querySelector("tbody").appendChild(tr), 
            this.renderAppointmentContainer();
        }, Month.prototype.renderAppointmentContainer = function() {}, Month.prototype.renderDatesHeader = function() {
            var container = createElement("div", {
                className: "e-date-header-container"
            }), wrap = createElement("div", {
                className: "e-date-header-wrap"
            });
            container.appendChild(wrap);
            for (var table = this.createTableLayout(), trEle = createElement("tr"), rowsCount = this.colLevels.length, lastLevel = this.colLevels[rowsCount - 1], i = 0; i < rowsCount; i++) {
                for (var level = this.colLevels[i], ntr = trEle.cloneNode(), colspan = lastLevel.length / level.length, j = 0; j < level.length; j++) {
                    var td = level[j];
                    td.colSpan = colspan, ntr.appendChild(this.createHeaderCell(td));
                }
                table.querySelector("tbody").appendChild(ntr);
            }
            return wrap.appendChild(table), container;
        }, Month.prototype.createHeaderCell = function(td) {
            var tdEle = createElement("th");
            if (td.className && addClass([ tdEle ], td.className), "monthHeader" === td.type) {
                var ele = createElement("span", {
                    innerHTML: this.parent.getDayNames(this.dayNameFormat)[td.date.getDay()]
                });
                tdEle.appendChild(ele);
            }
            var args = {
                elementType: td.type,
                element: tdEle,
                date: td.date
            };
            return this.parent.trigger("renderCell", args), tdEle;
        }, Month.prototype.isOtherMonth = function(date) {
            return this.parent.selectedDate.getMonth() !== date.getMonth();
        }, Month.prototype.renderContentArea = function() {
            for (var wrap = createElement("div", {
                className: "e-content-wrap"
            }), tbl = this.createTableLayout("e-content-table"), tbody = tbl.querySelector("tbody"), tr = createElement("tr", {
                attrs: {
                    role: "row"
                }
            }), td = createElement("td", {
                attrs: {
                    role: "gridcell",
                    "aria-selected": "false"
                }
            }), count = this.parent.activeViewOptions.showWeekend ? 7 : this.parent.activeViewOptions.workDays.length, noOfRows = this.renderDates.length / count, startCol = 0, endCol = count, row = 0; row < noOfRows; row++) {
                var ntr = tr.cloneNode();
                for (startCol = 0 + startCol; startCol < endCol; startCol++) {
                    var data = {
                        date: this.renderDates[startCol],
                        type: "monthCells",
                        className: [ "e-work-cells" ]
                    }, ntd = td.cloneNode();
                    if (this.isOtherMonth(data.date) && data.className.push("e-other-month"), this.parent.workHours.highlight && this.isWorkDay(data.date) && data.className.push("e-work-days"), 
                    this.isCurrentDate(data.date) && data.className.push("e-current-date"), "MonthAgenda" === this.parent.currentView && this.parent.isSelectedDate(data.date) && data.className.push("e-selected-cell"), 
                    addClass([ ntd ], data.className), ntd.setAttribute("data-date", data.date.getTime().toString()), 
                    this.renderDateHeaderElement(data, ntd), this.parent.cellTemplate) {
                        var args_1 = {
                            date: data.date,
                            type: data.type
                        };
                        append([].slice.call(this.parent.getCellTemplate()(args_1)), ntd);
                    }
                    this.wireCellEvents(ntd);
                    var args = {
                        elementType: data.type,
                        element: ntd,
                        date: data.date
                    };
                    this.parent.trigger("renderCell", args), ntr.appendChild(ntd);
                }
                endCol += count, startCol += 0, tbody.appendChild(ntr);
            }
            return wrap.appendChild(tbl), EventHandler.add(wrap, "scroll", this.onContentScroll, this), 
            wrap;
        }, Month.prototype.getDatesHeaderElement = function() {
            return this.element.querySelector(".e-date-header-container");
        }, Month.prototype.getContentAreaElement = function() {
            return this.element.querySelector(".e-content-wrap");
        }, Month.prototype.renderDateHeaderElement = function(data, ntd) {
            var dateHeader = createElement("div", {
                className: "e-date-header"
            });
            dateHeader.innerHTML = 1 !== data.date.getDate() || this.isCurrentDate(data.date) || this.parent.isAdaptive ? this.parent.globalize.formatDate(data.date, {
                skeleton: "d"
            }) : this.parent.globalize.formatDate(data.date, {
                format: "MMM d"
            }), ntd.appendChild(dateHeader), "month" === this.getModuleName() && addClass([ dateHeader ], "e-navigate");
        }, Month.prototype.getRenderDates = function() {
            this.renderDates = [];
            var currentDate = resetTime(this.parent.selectedDate), monthStart = getWeekFirstDate(function(date) {
                return new Date(date.getFullYear(), date.getMonth());
            }(currentDate), this.parent.firstDayOfWeek), monthEnd = addDays(getWeekFirstDate(function(dt) {
                return new Date(dt.getFullYear(), dt.getMonth() + 1, 0);
            }(currentDate), this.parent.firstDayOfWeek), 6), start = new Date(monthStart.getFullYear(), monthStart.getMonth(), monthStart.getDate());
            do {
                this.parent.activeViewOptions.showWeekend ? this.renderDates.push(start) : this.isWorkDay(start) && this.renderDates.push(start), 
                start = addDays(start, 1);
            } while (start.getTime() <= monthEnd.getTime());
        }, Month.prototype.getNextPreviousDate = function(type) {
            return addMonths(this.parent.selectedDate, "next" === type ? 1 : -1);
        }, Month.prototype.getEndDateFromStartDate = function(start) {
            return addDays(new Date(start.getTime()), 1);
        }, Month.prototype.getDateRangeText = function() {
            return this.parent.isAdaptive || isNullOrUndefined(this.parent.activeViewOptions.dateFormat) ? this.parent.globalize.formatDate(this.parent.selectedDate, {
                format: "MMMM y"
            }) : this.formatDateRange(this.parent.selectedDate);
        }, Month.prototype.getLabelText = function(view) {
            return this.parent.localeObj.getConstant(view) + " of " + this.parent.globalize.formatDate(this.parent.selectedDate, {
                format: "MMMM y"
            });
        }, Month.prototype.getModuleName = function() {
            return "month";
        }, Month.prototype.destroy = function() {
            this.parent.isDestroyed || this.element && (remove(this.element), this.element = null, 
            this.parent.scheduleTouchModule && this.parent.scheduleTouchModule.resetValues());
        }, Month;
    }(ViewBase), AgendaBase = function() {
        function AgendaBase(parent) {
            this.parent = parent, this.l10n = this.parent.localeObj;
        }
        return AgendaBase.prototype.createAgendaContentElement = function(type, listData, aTd) {
            var listElement;
            if ("noEvents" === type) {
                var noEvents = [ {
                    subject: this.l10n.getConstant("noEvents")
                } ];
                listElement = ListBase.createList(noEvents, {
                    moduleName: "agenda",
                    listClass: this.parent.activeView.viewClass,
                    itemClass: this.parent.activeView.viewClass,
                    template: "<div class=e-no-event>${subject}</div>"
                });
            } else {
                listElement = ListBase.createList(listData, {
                    moduleName: "agenda",
                    listClass: this.parent.activeView.viewClass,
                    itemClass: this.parent.activeView.viewClass
                });
                for (var li = 0, length_1 = listData.length; li < length_1; li++) {
                    var appWrapper = createElement("div", {
                        id: "Appointment_" + listData[li][this.parent.eventFields.id],
                        className: APPOINTMENT_CLASS,
                        attrs: {
                            "data-guid": listData[li].Guid,
                            role: "button",
                            tabindex: "0",
                            "aria-readonly": "false",
                            "aria-selected": "false",
                            "aria-grabbed": "true",
                            "aria-label": isNullOrUndefined(listData[li][this.parent.eventFields.subject]) ? this.parent.eventSettings.fields.subject.default : listData[li][this.parent.eventFields.subject]
                        }
                    }), templateEle = void 0;
                    templateEle = isNullOrUndefined(this.parent.activeViewOptions.eventTemplate) ? this.createAppointment(listData[li]) : this.parent.getAppointmentTemplate()(listData[li]), 
                    append([].slice.call(templateEle), appWrapper), listElement.children[li].innerHTML = appWrapper.outerHTML;
                    var args = {
                        data: listData[li],
                        element: listElement.children[li]
                    };
                    this.parent.trigger("eventRendered", args);
                }
            }
            return aTd.appendChild(listElement), addClass([ aTd ], "e-day-border"), aTd;
        }, AgendaBase.prototype.createAppointment = function(event) {
            var fieldMapping = this.parent.eventFields, recordSubject = isNullOrUndefined(event[fieldMapping.subject]) ? this.parent.eventSettings.fields.subject.default : event[fieldMapping.subject], appSubjectWrap = createElement("div", {
                className: "e-subject-wrap"
            });
            if (isNullOrUndefined(event[fieldMapping.location]) || "" === event[fieldMapping.location] || (recordSubject += ","), 
            appSubjectWrap.appendChild(createElement("div", {
                className: "e-subject",
                innerHTML: recordSubject
            })), isNullOrUndefined(event[fieldMapping.location]) || appSubjectWrap.appendChild(createElement("div", {
                className: "e-location",
                innerHTML: event[fieldMapping.location]
            })), !isNullOrUndefined(event[fieldMapping.recurrenceRule])) {
                var iconClass = event[fieldMapping.id] === event[fieldMapping.recurrenceID] ? "e-recurrence-icon" : "e-recurrence-edit-icon";
                appSubjectWrap.appendChild(createElement("div", {
                    className: "e-icons " + iconClass
                }));
            }
            var strDate = event[fieldMapping.startTime], endDate = event[fieldMapping.endTime], isAllDay = event[fieldMapping.isAllDay], allDayStr = this.l10n.getConstant("allDay"), timeStr = this.parent.globalize.formatDate(strDate, {
                skeleton: "hm"
            }) + " - " + this.parent.globalize.formatDate(endDate, {
                skeleton: "hm"
            });
            if (!isNullOrUndefined(event.data)) {
                allDayStr = ((endDate.getTime() - strDate.getTime()) / MS_PER_DAY >= 1 ? allDayStr : timeStr) + " (" + this.l10n.getConstant("day") + " " + event.data.index + "/" + event.data.count + ")";
            }
            return [ appSubjectWrap, createElement("div", {
                className: "e-date-time",
                innerHTML: !isNullOrUndefined(event.data) || isAllDay ? allDayStr : timeStr
            }) ];
        }, AgendaBase.prototype.processAgendaEvents = function(events) {
            for (var eventsProcessed = [], _i = 0, events_1 = events; _i < events_1.length; _i++) {
                var event_1 = events_1[_i], splited = this.parent.eventBase.splitEventByDay(event_1);
                eventsProcessed = eventsProcessed.concat(splited.length > 1 ? splited : event_1);
            }
            return eventsProcessed;
        }, AgendaBase.prototype.wireEventActions = function() {
            for (var _i = 0, eventElement_1 = [].slice.call(this.parent.element.querySelectorAll("." + APPOINTMENT_CLASS)); _i < eventElement_1.length; _i++) {
                var element = eventElement_1[_i];
                this.parent.eventBase.wireAppointmentEvents(element);
            }
            for (var _a = 0, dateHeaderElement_1 = [].slice.call(this.parent.element.querySelectorAll(".e-m-date")); _a < dateHeaderElement_1.length; _a++) {
                element = dateHeaderElement_1[_a];
                EventHandler.add(element, "click", this.parent.agendaModule.dayNavigationClick, this);
            }
        }, AgendaBase;
    }(), __extends$157 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), Agenda = function(_super) {
        function Agenda(parent) {
            var _this = _super.call(this, parent) || this;
            return _this.viewClass = "e-agenda-view", _this.isInverseTableSelect = !1, _this.agendaDates = {}, 
            _this.virtualScrollTop = 1, _this.minDate = new Date(1900, 0, 1), _this.maxDate = new Date(2099, 11, 31), 
            _this.agendaBase = new AgendaBase(parent), _this;
        }
        return __extends$157(Agenda, _super), Agenda.prototype.getModuleName = function() {
            return "agenda";
        }, Agenda.prototype.renderLayout = function() {
            this.agendaDates = {}, this.element = createElement("div", {
                className: "e-table-wrap"
            }), addClass([ this.element ], this.viewClass), this.element.appendChild(this.createTableLayout("e-outer-table")), 
            this.parent.element.querySelector("." + TABLE_CONTAINER_CLASS).appendChild(this.element);
            var eTr = createElement("tr");
            this.element.querySelector("tbody").appendChild(eTr);
            var workTd = createElement("td");
            eTr.appendChild(workTd);
            var wrap = createElement("div", {
                className: "e-content-wrap"
            });
            workTd.appendChild(wrap);
            var tbl = this.createTableLayout("e-content-table");
            wrap.appendChild(tbl);
            var tBody = tbl.querySelector("tbody"), agendaDate = resetTime(this.parent.selectedDate);
            this.renderEmptyContent(tBody, agendaDate), this.wireEvents(), this.parent.notify("content-ready", {});
        }, Agenda.prototype.eventLoad = function(args) {
            this.parent.eventsProcessed = this.agendaBase.processAgendaEvents(args.processedData);
            var agendaDate = resetTime(this.parent.selectedDate), tBody = this.element.querySelector(".e-content-wrap tbody");
            tBody.innerHTML = "", this.renderContent(tBody, agendaDate), this.agendaBase.wireEventActions();
            closest(tBody, ".e-content-wrap").scrollTop = 1;
        }, Agenda.prototype.renderContent = function(tBody, agendaDate) {
            var fieldMapping = this.parent.eventFields, firstDate = new Date(agendaDate.getTime()), lastDate = this.getEndDateFromStartDate(firstDate), isObject$$1 = this.appointmentFiltering(firstDate, lastDate);
            if (0 === isObject$$1.length && (lastDate = firstDate, firstDate = new Date(this.minDate.getTime()), 
            0 === (isObject$$1 = this.appointmentFiltering(firstDate, lastDate)).length && (firstDate = lastDate, 
            lastDate = new Date(this.maxDate.getTime()), isObject$$1 = this.appointmentFiltering(firstDate, lastDate))), 
            isObject$$1.length > 0) {
                var appoint = isObject$$1;
                agendaDate = appoint[0][fieldMapping.startTime], this.updateHeaderText(appoint[0][fieldMapping.startTime]);
            }
            var endDate;
            if (!this.parent.hideEmptyAgendaDays || this.parent.agendaDaysCount > 0 && isObject$$1.length > 0) {
                for (var noOfDays = !this.parent.hideEmptyAgendaDays || !this.parent.activeViewOptions.allowVirtualScrolling || this.parent.agendaDaysCount < isObject$$1.length ? this.parent.agendaDaysCount : isObject$$1.length, day = 0; day < noOfDays; day++) {
                    var filterData = [];
                    filterData = this.appointmentFiltering(agendaDate);
                    var nTr = this.createTableRowElement(agendaDate, "data");
                    if (!this.element.querySelector('tr[aria-rowindex="' + parseInt(nTr.getAttribute("aria-rowindex"), 10) + '"]')) {
                        var dTd = nTr.children[0], aTd = nTr.children[1];
                        if (filterData.length > 0 || !this.parent.hideEmptyAgendaDays && 0 === filterData.length) {
                            var elementType = this.parent.hideEmptyAgendaDays || 0 !== filterData.length ? "data" : "noEvents";
                            dTd.appendChild(this.createDateHeaderElement(agendaDate)), nTr.appendChild(dTd), 
                            nTr.appendChild(this.agendaBase.createAgendaContentElement(elementType, filterData, aTd)), 
                            tBody.appendChild(nTr);
                        } else this.parent.activeViewOptions.allowVirtualScrolling && day--;
                        if (this.isCurrentDate(new Date(agendaDate.getTime())) && addClass(dTd.children, "e-current-day"), 
                        (agendaDate = addDays(agendaDate, 1)).getTime() > lastDate.getTime()) break;
                    }
                }
                endDate = new Date(agendaDate.getTime() - MS_PER_DAY);
            } else this.renderEmptyContent(tBody, agendaDate), endDate = addDays(agendaDate, this.parent.agendaDaysCount - 1);
            this.agendaDates = {
                start: firstDate,
                end: endDate
            };
        }, Agenda.prototype.renderEmptyContent = function(tBody, agendaDate) {
            var eTr = this.createTableRowElement(agendaDate, "noEvents"), eTd = eTr.children[0], noEvents = createElement("div", {
                className: "e-empty-event",
                innerHTML: this.l10n.getConstant("noEvents")
            });
            eTd.appendChild(noEvents), tBody.appendChild(eTr);
        }, Agenda.prototype.createTableRowElement = function(date, type) {
            var daysCount = getDaysCount(this.parent.selectedDate.getTime(), date.getTime()), tr = createElement("tr", {
                attrs: {
                    role: "row",
                    "aria-rowindex": daysCount.toString()
                }
            }), td = createElement("td", {
                attrs: {
                    class: "e-agenda-cells",
                    role: "gridcell",
                    "aria-selected": "false",
                    "aria-colindex": daysCount.toString(),
                    "data-date": date.getTime().toString()
                }
            }), dTd = td.cloneNode(), aTd = td.cloneNode();
            return tr.appendChild(dTd), "noEvents" !== type && tr.appendChild(aTd), tr;
        }, Agenda.prototype.createDateHeaderElement = function(date) {
            var dateHeader;
            if (this.parent.activeViewOptions.dateHeaderTemplate) {
                dateHeader = createElement("div", {
                    className: "e-day-date-header"
                });
                var templateArgs = {
                    date: date,
                    type: "dateHeader"
                }, template = this.parent.getDateHeaderTemplate()(templateArgs);
                append([].slice.call(template), dateHeader);
            } else dateHeader = this.getMobileDateElement(date, "e-day-date-header");
            return dateHeader;
        }, Agenda.prototype.agendaScrolling = function(event) {
            this.parent.quickPopup.quickPopup.close(), this.parent.activeViewOptions.allowVirtualScrolling && this.virtualScrolling(event);
        }, Agenda.prototype.virtualScrolling = function(event) {
            var filterDate, target = event.target, scrollTop = target.scrollTop, scrollHeight = target.scrollHeight, totalHeight = scrollTop + target.clientHeight, direction = this.virtualScrollTop < scrollTop ? "next" : "previous", tBody = target.querySelector("tbody"), emptyTBody = createElement("tbody"), topElement = this.getElementFromScrollerPosition(event, direction), scrollDate = new Date(parseInt(topElement.getAttribute("data-date"), 0));
            if (0 === scrollTop) {
                if (filterDate = this.getPreviousNextDate(addDays(scrollDate, -1), direction), this.appointmentFiltering(filterDate.start, filterDate.end).length > 0 || !this.parent.hideEmptyAgendaDays) {
                    this.renderContent(emptyTBody, filterDate.start), tBody.innerHTML = emptyTBody.innerHTML + tBody.innerHTML, 
                    this.agendaBase.wireEventActions();
                    for (var s = 0, element = tBody.children; s < element.length; s++) if (element[s].getAttribute("aria-rowindex") === topElement.getAttribute("aria-colindex")) {
                        var scrollToValue = element[s].offsetTop - this.element.querySelector(".e-agenda-item").offsetHeight;
                        target.scrollTop = scrollToValue;
                        break;
                    }
                    this.updateHeaderText(scrollDate);
                }
            } else totalHeight === scrollHeight ? (filterDate = this.getPreviousNextDate(addDays(scrollDate, 1), direction), 
            (this.appointmentFiltering(filterDate.start, filterDate.end).length > 0 || !this.parent.hideEmptyAgendaDays) && (this.renderContent(emptyTBody, filterDate.start), 
            tBody.innerHTML += emptyTBody.innerHTML, this.agendaBase.wireEventActions(), this.updateHeaderText(scrollDate))) : this.updateHeaderText(scrollDate);
            this.virtualScrollTop = scrollTop;
            var selectedElements = this.parent.eventBase.getSelectedAppointments();
            selectedElements.length > 0 && selectedElements[selectedElements.length - 1].focus();
        }, Agenda.prototype.getElementFromScrollerPosition = function(event, direction) {
            var filterElement, li, target = event.target, scrollTop = target.scrollTop, scrollHeight = target.scrollHeight, totalHeight = scrollTop + target.clientHeight, liCollection = [].slice.call(target.querySelectorAll(".e-agenda-item"));
            if (liCollection.length > 0) if (0 === scrollTop) filterElement = closest(li = liCollection[0], ".e-agenda-cells"); else if (totalHeight === scrollHeight) filterElement = closest(li = liCollection[liCollection.length - 1], ".e-agenda-cells"); else for (var a = 0, length_1 = liCollection.length; a < length_1; a++) if (li = liCollection[a], 
            li.getBoundingClientRect().top >= 0) {
                filterElement = closest(li, ".e-agenda-cells");
                break;
            }
            return filterElement;
        }, Agenda.prototype.updateHeaderText = function(date) {
            if (this.parent.showHeaderBar) {
                var dateRangeText = this.getDateRangeText(date), headerElement = this.parent.headerModule.element.querySelector(".e-date-range");
                headerElement.setAttribute("aria-label", dateRangeText), headerElement.querySelector(".e-tbar-btn-text").innerHTML = dateRangeText;
            }
        }, Agenda.prototype.getPreviousNextDate = function(date, type) {
            var currentDate = new Date(date.getTime()), firstDate = this.getStartDateFromEndDate(date), lastDate = this.getEndDateFromStartDate(date), daysCount = 0;
            do {
                if ((this.appointmentFiltering(currentDate).length > 0 || !this.parent.hideEmptyAgendaDays) && daysCount++, 
                (currentDate = addDays(currentDate, "next" === type ? 1 : -1)) < firstDate || currentDate > lastDate) break;
            } while (daysCount !== this.parent.agendaDaysCount);
            var endDate = addDays(currentDate, "next" === type ? -1 : 1);
            return "next" === type ? {
                start: date,
                end: addDays(endDate, 1)
            } : {
                start: endDate,
                end: addDays(date, 1)
            };
        }, Agenda.prototype.appointmentFiltering = function(startDate, endDate) {
            var dateStart, dateEnd;
            !isNullOrUndefined(startDate) && isNullOrUndefined(endDate) ? (dateStart = resetTime(new Date(startDate.getTime())), 
            dateEnd = setTime(new Date(dateStart.getTime()), MS_PER_DAY)) : (dateStart = new Date(startDate.getTime()), 
            dateEnd = new Date(endDate.getTime()));
            return this.parent.eventBase.filterEvents(dateStart, dateEnd);
        }, Agenda.prototype.getStartDateFromEndDate = function(endDate) {
            var filterDate, fieldMapping = this.parent.eventFields;
            if (this.parent.eventsProcessed.length > 0) {
                var firstDate = Math.min.apply(Math, this.parent.eventsProcessed.map(function(a) {
                    return a[fieldMapping.startTime].getTime();
                }));
                filterDate = this.parent.hideEmptyAgendaDays ? new Date(firstDate) : this.minDate;
            } else filterDate = this.parent.hideEmptyAgendaDays ? addMonths(endDate, -1) : this.minDate;
            return resetTime(filterDate);
        }, Agenda.prototype.getEndDateFromStartDate = function(startDate) {
            var filterDate, fieldMapping = this.parent.eventFields;
            if (this.parent.eventsProcessed.length > 0) {
                var lastDate = Math.max.apply(Math, this.parent.eventsProcessed.map(function(a) {
                    return a[fieldMapping.endTime].getTime();
                }));
                filterDate = this.parent.hideEmptyAgendaDays ? new Date(lastDate) : this.maxDate;
            } else filterDate = this.parent.hideEmptyAgendaDays ? addMonths(startDate, 1) : this.maxDate;
            return resetTime(addDays(filterDate, 1));
        }, Agenda.prototype.getNextPreviousDate = function(type) {
            var noOfDays = "next" === type ? 1 : -1;
            return addDays(this.parent.selectedDate, noOfDays);
        }, Agenda.prototype.startDate = function() {
            return resetTime(this.parent.selectedDate);
        }, Agenda.prototype.endDate = function() {
            return this.parent.activeViewOptions.allowVirtualScrolling ? this.getEndDateFromStartDate(this.startDate()) : addDays(this.startDate(), this.parent.agendaDaysCount);
        }, Agenda.prototype.getDateRangeText = function(date) {
            var formatDate = this.parent.activeViewOptions.dateFormat ? this.parent.activeViewOptions.dateFormat : "MMMM y";
            if (this.parent.activeViewOptions.allowVirtualScrolling || this.parent.isAdaptive) {
                var currentDate = isNullOrUndefined(date) ? this.parent.selectedDate : date;
                return this.parent.globalize.formatDate(currentDate, {
                    format: formatDate
                });
            }
            var startDate = this.parent.selectedDate, endDate = addDays(startDate, this.parent.agendaDaysCount - 1);
            return this.formatDateRange(startDate, endDate);
        }, Agenda.prototype.dayNavigationClick = function(e) {
            var date = this.parent.getDateFromElement(closest(e.currentTarget, ".e-agenda-cells"));
            isNullOrUndefined(date) || this.parent.isAdaptive || (this.parent.setProperties({
                selectedDate: date
            }, !0), this.parent.changeView("Day"));
        }, Agenda.prototype.wireEvents = function() {
            EventHandler.add(this.element.querySelector(".e-content-wrap"), "scroll", this.agendaScrolling, this);
        }, Agenda.prototype.unWireEvents = function() {
            EventHandler.remove(this.element.querySelector(".e-content-wrap"), "scroll", this.agendaScrolling);
            for (var _i = 0, dateHeaderElement_1 = [].slice.call(this.element.querySelectorAll(".e-m-date")); _i < dateHeaderElement_1.length; _i++) {
                var element = dateHeaderElement_1[_i];
                EventHandler.remove(element, "click", this.dayNavigationClick);
            }
        }, Agenda.prototype.addEventListener = function() {
            this.parent.on("scroll-ui-update", this.onAgendaScrollUiUpdate, this), this.parent.on("data-ready", this.eventLoad, this);
        }, Agenda.prototype.removeEventListener = function() {
            this.parent.off("scroll-ui-update", this.onAgendaScrollUiUpdate), this.parent.off("data-ready", this.eventLoad);
        }, Agenda.prototype.onAgendaScrollUiUpdate = function(args) {
            var headerHeight = 2;
            this.parent.headerModule && (headerHeight += this.parent.headerModule.getHeaderElement().offsetHeight, 
            this.parent.activeViewOptions.allowVirtualScrolling ? (addClass(this.parent.headerModule.element.querySelectorAll(".e-prev,.e-next"), "e-item-hide"), 
            addClass([ this.parent.headerModule.element.querySelector(".e-date-range") ], "e-item-align")) : (removeClass(this.parent.headerModule.element.querySelectorAll(".e-prev,.e-next"), "e-item-hide"), 
            removeClass([ this.parent.headerModule.element.querySelector(".e-date-range") ], "e-item-align")));
            this.element.querySelector(".e-content-wrap").style.height = formatUnit(this.parent.element.offsetHeight - headerHeight);
        }, Agenda.prototype.destroy = function() {
            this.parent.isDestroyed || this.element && (this.unWireEvents(), remove(this.element), 
            this.element = null, this.parent.headerModule && this.parent.activeViewOptions.allowVirtualScrolling && (removeClass(this.parent.headerModule.element.querySelectorAll(".e-prev,.e-next"), "e-item-hide"), 
            removeClass([ this.parent.headerModule.element.querySelector(".e-date-range") ], "e-item-align")));
        }, Agenda;
    }(ViewBase), __extends$158 = function() {
        var extendStatics = Object.setPrototypeOf || {
            __proto__: []
        } instanceof Array && function(d, b) {
            d.__proto__ = b;
        } || function(d, b) {
            for (var p in b) b.hasOwnProperty(p) && (d[p] = b[p]);
        };
        return function(d, b) {
            function __() {
                this.constructor = d;
            }
            extendStatics(d, b), d.prototype = null === b ? Object.create(b) : (__.prototype = b.prototype, 
            new __());
        };
    }(), MonthAgenda = function(_super) {
        function MonthAgenda(parent) {
            var _this = _super.call(this, parent) || this;
            return _this.dayNameFormat = "narrow", _this.viewClass = "e-month-agenda-view", 
            _this.agendaDates = {}, _this.agendaBase = new AgendaBase(parent), _this;
        }
        return __extends$158(MonthAgenda, _super), MonthAgenda.prototype.renderAppointmentContainer = function() {
            var contentArea = this.getContentAreaElement(), appWrap = createElement("div", {
                className: "e-appointment-wrap"
            });
            contentArea.appendChild(appWrap), this.appendAppContainer(appWrap), this.setEventWrapperHeight();
        }, MonthAgenda.prototype.getDayNameFormat = function() {
            return this.parent.isAdaptive ? "narrow" : "abbreviated";
        }, MonthAgenda.prototype.setEventWrapperHeight = function() {
            var headerHeight = (this.parent.headerModule ? this.parent.headerModule.getHeaderElement().offsetHeight : 0) + 2, contentArea = this.getContentAreaElement().firstChild, dateHeader = this.element.querySelector(".e-date-header-wrap"), availableHeight = this.parent.element.offsetHeight - headerHeight - dateHeader.offsetHeight - contentArea.offsetHeight;
            this.element.querySelector(".e-appointment-wrap").style.height = formatUnit(availableHeight);
        }, MonthAgenda.prototype.onDataReady = function(args) {
            this.setEventWrapperHeight(), this.clearElements(), this.parent.eventsProcessed = this.agendaBase.processAgendaEvents(args.processedData);
            for (var count = 0, _i = 0, _a = this.renderDates; _i < _a.length; _i++) {
                var date = _a[_i], filterData = this.appointmentFiltering(date), workCell = this.element.querySelectorAll(".e-work-cells")[count];
                filterData.length > 0 && (workCell.querySelector(".e-appointment-indicator") || workCell.appendChild(createElement("div", {
                    className: "e-appointment-indicator"
                })), date.getTime() === resetTime(new Date(this.parent.selectedDate.getTime())).getTime() && this.onEventRender(filterData)), 
                count++;
            }
        }, MonthAgenda.prototype.onCellClick = function(event) {
            var filterData = this.appointmentFiltering(event.startTime);
            this.onEventRender(filterData), this.parent.setProperties({
                selectedDate: new Date("" + event.startTime)
            }, !0);
        }, MonthAgenda.prototype.onEventRender = function(events) {
            var appWrap = this.element.querySelector(".e-appointment-wrap");
            if (appWrap.innerHTML = "", events.length > 0) {
                var appContainer = createElement("div", {
                    className: "e-appointment-container"
                });
                appWrap.appendChild(this.agendaBase.createAgendaContentElement("data", events, appContainer));
            } else this.appendAppContainer(appWrap);
            this.agendaBase.wireEventActions();
        }, MonthAgenda.prototype.appointmentFiltering = function(date) {
            var dateStart = resetTime(new Date(date.getTime())), dateEnd = setTime(new Date(dateStart.getTime()), MS_PER_DAY);
            return this.parent.eventBase.filterEvents(dateStart, dateEnd);
        }, MonthAgenda.prototype.clearElements = function() {
            for (var _i = 0, appointmentIndicators_1 = [].slice.call(this.element.querySelectorAll(".e-appointment-indicator")); _i < appointmentIndicators_1.length; _i++) {
                remove(appointmentIndicators_1[_i]);
            }
            this.appendAppContainer(this.element.querySelector(".e-appointment-wrap"));
        }, MonthAgenda.prototype.appendAppContainer = function(appWrap) {
            var app = createElement("div", {
                className: "e-appointment-container"
            });
            addClass([ app ], "e-no-event"), app.innerHTML = this.l10n.getConstant("noEvents"), 
            appWrap.innerHTML = "", appWrap.appendChild(app);
        }, MonthAgenda.prototype.getModuleName = function() {
            return "monthAgenda";
        }, MonthAgenda;
    }(Month), navigations = {};
    navigations.Accordion = Accordion;
    var dropdowns = {};
    dropdowns.AutoComplete = AutoComplete, exports.buttons = {}, exports.buttons.Button = Button$1, 
    exports.popups = {}, dropdowns.DropDownList = DropDownList, dropdowns.ComboBox = ComboBox;
    var calendars = {};
    calendars.Calendar = Calendar, exports.buttons.CheckBox = CheckBox$1, navigations.ContextMenu = ContextMenu, 
    calendars.DatePicker = DatePicker, calendars.DateRangePicker = DateRangePicker, 
    calendars.DateTimePicker = DateTimePicker, calendars.TimePicker = TimePicker, exports.popups.Dialog = Dialog$1;
    var splitbuttons = {};
    splitbuttons.DropDownButton = DropDownButton, exports.inputs = {}, exports.inputs.MaskedTextBox = MaskedTextBox$1, 
    exports.inputs.NumericTextBox = NumericTextBox$1;
    var grids = {};
    grids.Pager = Pager, exports.buttons.RadioButton = RadioButton$1;
    var schedule = {};
    schedule.RecurrenceEditor = RecurrenceEditor, navigations.Sidebar = Sidebar, exports.inputs.Slider = Slider$1, 
    splitbuttons.SplitButton = SplitButton, navigations.Tab = Tab, navigations.Toolbar = Toolbar, 
    navigations.TreeView = TreeView, exports.inputs.Uploader = Uploader$1, AccumulationChart.Inject(PieSeries, FunnelSeries, PyramidSeries, AccumulationTooltip, AccumulationLegend, AccumulationSelection, AccumulationDataLabel, AccumulationAnnotation);
    var charts = {};
    charts.AccumulationChart = AccumulationChart, Chart.Inject(LineSeries, ScatterSeries, ColumnSeries, SplineSeries, SplineAreaSeries, StripLine, AreaSeries, StepLineSeries, StepAreaSeries, StackingColumnSeries, StackingAreaSeries, BarSeries, StackingBarSeries, RangeColumnSeries, BubbleSeries, Tooltip$1, Crosshair, Category, DateTime, Logarithmic, Legend, Zoom, DataLabel, Selection, ChartAnnotation, HiloSeries, HiloOpenCloseSeries, WaterfallSeries, RangeAreaSeries, CandleSeries, PolarSeries, RadarSeries, SmaIndicator, TmaIndicator, EmaIndicator, AccumulationDistributionIndicator, MacdIndicator, AtrIndicator, RsiIndicator, MomentumIndicator, StochasticIndicator, BollingerBands, BoxAndWhiskerSeries, ErrorBar, Trendlines, DateTimeCategory, MultiColoredLineSeries, MultiColoredAreaSeries, MultiLevelLabel), 
    charts.Chart = Chart, CircularGauge.Inject(GaugeTooltip, Annotations);
    var circulargauge = {};
    circulargauge.CircularGauge = CircularGauge, Grid.Inject(Filter, Page, Selection$1, Sort, Group, Reorder, RowDD, DetailRow, Toolbar$2, Aggregate, Search$2, VirtualScroll, Edit, Resize, ExcelExport, PdfExport, CommandColumn, ContextMenu$2, Freeze, ColumnMenu, ColumnChooser, ForeignKey), 
    grids.Grid = Grid, LinearGauge.Inject(GaugeTooltip$1, Annotations$1);
    var lineargauge = {};
    lineargauge.LinearGauge = LinearGauge, Maps.Inject(Bubble, Legend$1, Marker$1, Highlight, Selection$2, MapsTooltip, Zoom$1, DataLabel$1, NavigationLine, Annotations$2);
    var maps = {};
    maps.Maps = Maps, MultiSelect$1.Inject(CheckBoxSelection$1), dropdowns.MultiSelect = MultiSelect$1, 
    Schedule.Inject(Day, Week, WorkWeek, Month, Agenda, MonthAgenda), schedule.Schedule = Schedule;
    var base = _base, data = _data, lists = _lists;
    exports.inputs = _inputs, exports.popups = _popups, exports.buttons = _buttons;
    var pdfexport = _pdfexport, fileutils = _fileutils, compression = _compression, excelexport = _excelexport;
    return exports.navigations = navigations, exports.base = base, exports.dropdowns = dropdowns, 
    exports.data = data, exports.lists = lists, exports.calendars = calendars, exports.splitbuttons = splitbuttons, 
    exports.grids = grids, exports.schedule = schedule, exports.charts = charts, exports.pdfexport = pdfexport, 
    exports.fileutils = fileutils, exports.compression = compression, exports.circulargauge = circulargauge, 
    exports.excelexport = excelexport, exports.lineargauge = lineargauge, exports.maps = maps, 
    exports;
}({});
