(window["webpackJsonp"] = window["webpackJsonp"] || []).push([[7],{

/***/ "./node_modules/overlayscrollbars-vue/dist/overlayscrollbars-vue.esm.js":
/*!******************************************************************************!*\
  !*** ./node_modules/overlayscrollbars-vue/dist/overlayscrollbars-vue.esm.js ***!
  \******************************************************************************/
/*! exports provided: OverlayScrollbarsComponent, OverlayScrollbarsPlugin */
/***/ (function(module, __webpack_exports__, __webpack_require__) {

"use strict";
eval("__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"OverlayScrollbarsComponent\", function() { return __vue_component__; });\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"OverlayScrollbarsPlugin\", function() { return OverlayScrollbarsPlugin; });\n/* harmony import */ var overlayscrollbars__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! overlayscrollbars */ \"./node_modules/overlayscrollbars/js/OverlayScrollbars.js\");\n/* harmony import */ var overlayscrollbars__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(overlayscrollbars__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! vue */ \"./node_modules/vue/dist/vue.js\");\n/* harmony import */ var vue__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(vue__WEBPACK_IMPORTED_MODULE_1__);\n\n\n\nclass OverlayScrollbarsComponent extends vue__WEBPACK_IMPORTED_MODULE_1___default.a.extend({\r\n    name: 'overlay-scrollbars',\r\n    props: {\r\n        options: {\r\n            type: Object\r\n        },\r\n        extensions: {\r\n            type: [String, Array, Object]\r\n        }\r\n    },\r\n    methods: {\r\n        osInstance() {\r\n            return this._osInstace;\r\n        },\r\n        osTarget() {\r\n            return this.$el || null;\r\n        }\r\n    },\r\n    watch: {\r\n        options(currOptions, oldOptions) {\r\n            let osInstance = this._osInstace;\r\n            if (overlayscrollbars__WEBPACK_IMPORTED_MODULE_0___default.a.valid(osInstance)) {\r\n                osInstance.options(currOptions);\r\n            }\r\n        }\r\n    },\r\n    data() {\r\n        return {};\r\n    },\r\n    mounted() {\r\n        this._osInstace = overlayscrollbars__WEBPACK_IMPORTED_MODULE_0___default()(this.osTarget(), this.options || {}, this.extensions);\r\n    },\r\n    beforeDestroy() {\r\n        const osInstance = this._osInstace;\r\n        if (overlayscrollbars__WEBPACK_IMPORTED_MODULE_0___default.a.valid(osInstance)) {\r\n            osInstance.destroy();\r\n            this._osInstace = null;\r\n        }\r\n    }\r\n}) {\r\n    constructor() {\r\n        super(...arguments);\r\n        this._osInstace = null;\r\n    }\r\n}\n\nfunction normalizeComponent(template, style, script, scopeId, isFunctionalTemplate, moduleIdentifier /* server only */, shadowMode, createInjector, createInjectorSSR, createInjectorShadow) {\r\n    if (typeof shadowMode !== 'boolean') {\r\n        createInjectorSSR = createInjector;\r\n        createInjector = shadowMode;\r\n        shadowMode = false;\r\n    }\r\n    // Vue.extend constructor export interop.\r\n    const options = typeof script === 'function' ? script.options : script;\r\n    // render functions\r\n    if (template && template.render) {\r\n        options.render = template.render;\r\n        options.staticRenderFns = template.staticRenderFns;\r\n        options._compiled = true;\r\n        // functional template\r\n        if (isFunctionalTemplate) {\r\n            options.functional = true;\r\n        }\r\n    }\r\n    // scopedId\r\n    if (scopeId) {\r\n        options._scopeId = scopeId;\r\n    }\r\n    let hook;\r\n    if (moduleIdentifier) {\r\n        // server build\r\n        hook = function (context) {\r\n            // 2.3 injection\r\n            context =\r\n                context || // cached call\r\n                    (this.$vnode && this.$vnode.ssrContext) || // stateful\r\n                    (this.parent && this.parent.$vnode && this.parent.$vnode.ssrContext); // functional\r\n            // 2.2 with runInNewContext: true\r\n            if (!context && typeof __VUE_SSR_CONTEXT__ !== 'undefined') {\r\n                context = __VUE_SSR_CONTEXT__;\r\n            }\r\n            // inject component styles\r\n            if (style) {\r\n                style.call(this, createInjectorSSR(context));\r\n            }\r\n            // register component module identifier for async chunk inference\r\n            if (context && context._registeredComponents) {\r\n                context._registeredComponents.add(moduleIdentifier);\r\n            }\r\n        };\r\n        // used by ssr in case component is cached and beforeCreate\r\n        // never gets called\r\n        options._ssrRegister = hook;\r\n    }\r\n    else if (style) {\r\n        hook = shadowMode\r\n            ? function (context) {\r\n                style.call(this, createInjectorShadow(context, this.$root.$options.shadowRoot));\r\n            }\r\n            : function (context) {\r\n                style.call(this, createInjector(context));\r\n            };\r\n    }\r\n    if (hook) {\r\n        if (options.functional) {\r\n            // register for functional component in vue file\r\n            const originalRender = options.render;\r\n            options.render = function renderWithStyleInjection(h, context) {\r\n                hook.call(context);\r\n                return originalRender(h, context);\r\n            };\r\n        }\r\n        else {\r\n            // inject component registration as beforeCreate hook\r\n            const existing = options.beforeCreate;\r\n            options.beforeCreate = existing ? [].concat(existing, hook) : [hook];\r\n        }\r\n    }\r\n    return script;\r\n}\n\n/* script */\nconst __vue_script__ = OverlayScrollbarsComponent;\n\n/* template */\nvar __vue_render__ = function() {\n  var _vm = this;\n  var _h = _vm.$createElement;\n  var _c = _vm._self._c || _h;\n  return _c(\"div\", { staticClass: \"os-host\" }, [\n    _c(\"div\", { staticClass: \"os-resize-observer-host\" }),\n    _vm._v(\" \"),\n    _c(\"div\", { staticClass: \"os-padding\" }, [\n      _c(\"div\", { staticClass: \"os-viewport\" }, [\n        _c(\"div\", { staticClass: \"os-content\" }, [_vm._t(\"default\")], 2)\n      ])\n    ]),\n    _vm._v(\" \"),\n    _vm._m(0),\n    _vm._v(\" \"),\n    _vm._m(1),\n    _vm._v(\" \"),\n    _c(\"div\", { staticClass: \"os-scrollbar-corner\" })\n  ])\n};\nvar __vue_staticRenderFns__ = [\n  function() {\n    var _vm = this;\n    var _h = _vm.$createElement;\n    var _c = _vm._self._c || _h;\n    return _c(\"div\", { staticClass: \"os-scrollbar os-scrollbar-horizontal \" }, [\n      _c(\"div\", { staticClass: \"os-scrollbar-track\" }, [\n        _c(\"div\", { staticClass: \"os-scrollbar-handle\" })\n      ])\n    ])\n  },\n  function() {\n    var _vm = this;\n    var _h = _vm.$createElement;\n    var _c = _vm._self._c || _h;\n    return _c(\"div\", { staticClass: \"os-scrollbar os-scrollbar-vertical\" }, [\n      _c(\"div\", { staticClass: \"os-scrollbar-track\" }, [\n        _c(\"div\", { staticClass: \"os-scrollbar-handle\" })\n      ])\n    ])\n  }\n];\n__vue_render__._withStripped = true;\n\n  /* style */\n  const __vue_inject_styles__ = undefined;\n  /* scoped */\n  const __vue_scope_id__ = undefined;\n  /* module identifier */\n  const __vue_module_identifier__ = undefined;\n  /* functional template */\n  const __vue_is_functional_template__ = false;\n  /* style inject */\n  \n  /* style inject SSR */\n  \n  /* style inject shadow dom */\n  \n\n  \n  const __vue_component__ = normalizeComponent(\n    { render: __vue_render__, staticRenderFns: __vue_staticRenderFns__ },\n    __vue_inject_styles__,\n    __vue_script__,\n    __vue_scope_id__,\n    __vue_is_functional_template__,\n    __vue_module_identifier__,\n    false,\n    undefined,\n    undefined,\n    undefined\n  );\n\nconst OverlayScrollbarsPlugin = {\r\n    install(vue, options) {\r\n        if (options) {\r\n            overlayscrollbars__WEBPACK_IMPORTED_MODULE_0___default.a.defaultOptions(options);\r\n        }\r\n        vue.component('overlay-scrollbars', __vue_component__);\r\n    }\r\n};\n\n\n//# sourceMappingURL=overlayscrollbars-vue.esm.js.map\n\n\n//# sourceURL=webpack:///./node_modules/overlayscrollbars-vue/dist/overlayscrollbars-vue.esm.js?");

/***/ }),

/***/ "./node_modules/overlayscrollbars/js/OverlayScrollbars.js":
/*!****************************************************************!*\
  !*** ./node_modules/overlayscrollbars/js/OverlayScrollbars.js ***!
  \****************************************************************/
/*! no static exports found */
/***/ (function(module, exports, __webpack_require__) {

eval("var __WEBPACK_AMD_DEFINE_RESULT__;/*!\r\n * OverlayScrollbars\r\n * https://github.com/KingSora/OverlayScrollbars\r\n *\r\n * Version: 1.13.0\r\n *\r\n * Copyright KingSora | Rene Haas.\r\n * https://github.com/KingSora\r\n *\r\n * Released under the MIT license.\r\n * Date: 02.08.2020\r\n */\r\n\r\n(function (global, factory) {\r\n    if (true)\r\n        !(__WEBPACK_AMD_DEFINE_RESULT__ = (function () { return factory(global, global.document, undefined); }).call(exports, __webpack_require__, exports, module),\n\t\t\t\t__WEBPACK_AMD_DEFINE_RESULT__ !== undefined && (module.exports = __WEBPACK_AMD_DEFINE_RESULT__));\r\n    else {}\r\n}(typeof window !== 'undefined' ? window : this,\r\n    function (window, document, undefined) {\r\n        'use strict';\r\n        var PLUGINNAME = 'OverlayScrollbars';\r\n        var TYPES = {\r\n            o: 'object',\r\n            f: 'function',\r\n            a: 'array',\r\n            s: 'string',\r\n            b: 'boolean',\r\n            n: 'number',\r\n            u: 'undefined',\r\n            z: 'null'\r\n            //d : 'date',\r\n            //e : 'error',\r\n            //r : 'regexp',\r\n            //y : 'symbol'\r\n        };\r\n        var LEXICON = {\r\n            c: 'class',\r\n            s: 'style',\r\n            i: 'id',\r\n            l: 'length',\r\n            p: 'prototype',\r\n            ti: 'tabindex',\r\n            oH: 'offsetHeight',\r\n            cH: 'clientHeight',\r\n            sH: 'scrollHeight',\r\n            oW: 'offsetWidth',\r\n            cW: 'clientWidth',\r\n            sW: 'scrollWidth',\r\n            hOP: 'hasOwnProperty',\r\n            bCR: 'getBoundingClientRect'\r\n        };\r\n        var VENDORS = (function () {\r\n            //https://developer.mozilla.org/en-US/docs/Glossary/Vendor_Prefix\r\n            var jsCache = {};\r\n            var cssCache = {};\r\n            var cssPrefixes = ['-webkit-', '-moz-', '-o-', '-ms-'];\r\n            var jsPrefixes = ['WebKit', 'Moz', 'O', 'MS'];\r\n            function firstLetterToUpper(str) {\r\n                return str.charAt(0).toUpperCase() + str.slice(1);\r\n            }\r\n\r\n            return {\r\n                _cssPrefixes: cssPrefixes,\r\n                _jsPrefixes: jsPrefixes,\r\n                _cssProperty: function (name) {\r\n                    var result = cssCache[name];\r\n\r\n                    if (cssCache[LEXICON.hOP](name))\r\n                        return result;\r\n\r\n                    var uppercasedName = firstLetterToUpper(name);\r\n                    var elmStyle = document.createElement('div')[LEXICON.s];\r\n                    var resultPossibilities;\r\n                    var i = 0;\r\n                    var v;\r\n                    var currVendorWithoutDashes;\r\n\r\n                    for (; i < cssPrefixes.length; i++) {\r\n                        currVendorWithoutDashes = cssPrefixes[i].replace(/-/g, '');\r\n                        resultPossibilities = [\r\n                            name, //transition\r\n                            cssPrefixes[i] + name, //-webkit-transition\r\n                            currVendorWithoutDashes + uppercasedName, //webkitTransition\r\n                            firstLetterToUpper(currVendorWithoutDashes) + uppercasedName //WebkitTransition\r\n                        ];\r\n                        for (v = 0; v < resultPossibilities[LEXICON.l]; v++) {\r\n                            if (elmStyle[resultPossibilities[v]] !== undefined) {\r\n                                result = resultPossibilities[v];\r\n                                break;\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    cssCache[name] = result;\r\n                    return result;\r\n                },\r\n                _cssPropertyValue: function (property, values, suffix) {\r\n                    var name = property + ' ' + values;\r\n                    var result = cssCache[name];\r\n\r\n                    if (cssCache[LEXICON.hOP](name))\r\n                        return result;\r\n\r\n                    var dummyStyle = document.createElement('div')[LEXICON.s];\r\n                    var possbleValues = values.split(' ');\r\n                    var preparedSuffix = suffix || '';\r\n                    var i = 0;\r\n                    var v = -1;\r\n                    var prop;\r\n\r\n                    for (; i < possbleValues[LEXICON.l]; i++) {\r\n                        for (; v < VENDORS._cssPrefixes[LEXICON.l]; v++) {\r\n                            prop = v < 0 ? possbleValues[i] : VENDORS._cssPrefixes[v] + possbleValues[i];\r\n                            dummyStyle.cssText = property + ':' + prop + preparedSuffix;\r\n                            if (dummyStyle[LEXICON.l]) {\r\n                                result = prop;\r\n                                break;\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    cssCache[name] = result;\r\n                    return result;\r\n                },\r\n                _jsAPI: function (name, isInterface, fallback) {\r\n                    var i = 0;\r\n                    var result = jsCache[name];\r\n\r\n                    if (!jsCache[LEXICON.hOP](name)) {\r\n                        result = window[name];\r\n                        for (; i < jsPrefixes[LEXICON.l]; i++)\r\n                            result = result || window[(isInterface ? jsPrefixes[i] : jsPrefixes[i].toLowerCase()) + firstLetterToUpper(name)];\r\n                        jsCache[name] = result;\r\n                    }\r\n                    return result || fallback;\r\n                }\r\n            }\r\n        })();\r\n        var COMPATIBILITY = (function () {\r\n            function windowSize(x) {\r\n                return x ? window.innerWidth || document.documentElement[LEXICON.cW] || document.body[LEXICON.cW] : window.innerHeight || document.documentElement[LEXICON.cH] || document.body[LEXICON.cH];\r\n            }\r\n            function bind(func, thisObj) {\r\n                if (typeof func != TYPES.f) {\r\n                    throw \"Can't bind function!\";\r\n                    // closest thing possible to the ECMAScript 5\r\n                    // internal IsCallable function\r\n                    //throw new TypeError('Function.prototype.bind - what is trying to be bound is not callable');\r\n                }\r\n                var proto = LEXICON.p;\r\n                var aArgs = Array[proto].slice.call(arguments, 2);\r\n                var fNOP = function () { };\r\n                var fBound = function () { return func.apply(this instanceof fNOP ? this : thisObj, aArgs.concat(Array[proto].slice.call(arguments))); };\r\n\r\n                if (func[proto])\r\n                    fNOP[proto] = func[proto]; // Function.prototype doesn't have a prototype property\r\n                fBound[proto] = new fNOP();\r\n\r\n                return fBound;\r\n            }\r\n\r\n            return {\r\n                /**\r\n                 * Gets the current window width.\r\n                 * @returns {Number|number} The current window width in pixel.\r\n                 */\r\n                wW: bind(windowSize, 0, true),\r\n\r\n                /**\r\n                 * Gets the current window height.\r\n                 * @returns {Number|number} The current window height in pixel.\r\n                 */\r\n                wH: bind(windowSize, 0),\r\n\r\n                /**\r\n                 * Gets the MutationObserver Object or undefined if not supported.\r\n                 * @returns {MutationObserver|*|undefined} The MutationsObserver Object or undefined.\r\n                 */\r\n                mO: bind(VENDORS._jsAPI, 0, 'MutationObserver', true),\r\n\r\n                /**\r\n                 * Gets the ResizeObserver Object or undefined if not supported.\r\n                 * @returns {MutationObserver|*|undefined} The ResizeObserver Object or undefined.\r\n                 */\r\n                rO: bind(VENDORS._jsAPI, 0, 'ResizeObserver', true),\r\n\r\n                /**\r\n                 * Gets the RequestAnimationFrame method or it's corresponding polyfill.\r\n                 * @returns {*|Function} The RequestAnimationFrame method or it's corresponding polyfill.\r\n                 */\r\n                rAF: bind(VENDORS._jsAPI, 0, 'requestAnimationFrame', false, function (func) { return window.setTimeout(func, 1000 / 60); }),\r\n\r\n                /**\r\n                 * Gets the CancelAnimationFrame method or it's corresponding polyfill.\r\n                 * @returns {*|Function} The CancelAnimationFrame method or it's corresponding polyfill.\r\n                 */\r\n                cAF: bind(VENDORS._jsAPI, 0, 'cancelAnimationFrame', false, function (id) { return window.clearTimeout(id); }),\r\n\r\n                /**\r\n                 * Gets the current time.\r\n                 * @returns {number} The current time.\r\n                 */\r\n                now: function () {\r\n                    return Date.now && Date.now() || new Date().getTime();\r\n                },\r\n\r\n                /**\r\n                 * Stops the propagation of the given event.\r\n                 * @param event The event of which the propagation shall be stoped.\r\n                 */\r\n                stpP: function (event) {\r\n                    if (event.stopPropagation)\r\n                        event.stopPropagation();\r\n                    else\r\n                        event.cancelBubble = true;\r\n                },\r\n\r\n                /**\r\n                 * Prevents the default action of the given event.\r\n                 * @param event The event of which the default action shall be prevented.\r\n                 */\r\n                prvD: function (event) {\r\n                    if (event.preventDefault && event.cancelable)\r\n                        event.preventDefault();\r\n                    else\r\n                        event.returnValue = false;\r\n                },\r\n\r\n                /**\r\n                 * Gets the pageX and pageY values of the given mouse event.\r\n                 * @param event The mouse event of which the pageX and pageX shall be got.\r\n                 * @returns {{x: number, y: number}} x = pageX value, y = pageY value.\r\n                 */\r\n                page: function (event) {\r\n                    event = event.originalEvent || event;\r\n\r\n                    var strPage = 'page';\r\n                    var strClient = 'client';\r\n                    var strX = 'X';\r\n                    var strY = 'Y';\r\n                    var target = event.target || event.srcElement || document;\r\n                    var eventDoc = target.ownerDocument || document;\r\n                    var doc = eventDoc.documentElement;\r\n                    var body = eventDoc.body;\r\n\r\n                    //if touch event return return pageX/Y of it\r\n                    if (event.touches !== undefined) {\r\n                        var touch = event.touches[0];\r\n                        return {\r\n                            x: touch[strPage + strX],\r\n                            y: touch[strPage + strY]\r\n                        }\r\n                    }\r\n\r\n                    // Calculate pageX/Y if not native supported\r\n                    if (!event[strPage + strX] && event[strClient + strX] && event[strClient + strX] != null) {\r\n\r\n                        return {\r\n                            x: event[strClient + strX] +\r\n                                (doc && doc.scrollLeft || body && body.scrollLeft || 0) -\r\n                                (doc && doc.clientLeft || body && body.clientLeft || 0),\r\n                            y: event[strClient + strY] +\r\n                                (doc && doc.scrollTop || body && body.scrollTop || 0) -\r\n                                (doc && doc.clientTop || body && body.clientTop || 0)\r\n                        }\r\n                    }\r\n                    return {\r\n                        x: event[strPage + strX],\r\n                        y: event[strPage + strY]\r\n                    };\r\n                },\r\n\r\n                /**\r\n                 * Gets the clicked mouse button of the given mouse event.\r\n                 * @param event The mouse event of which the clicked button shal be got.\r\n                 * @returns {number} The number of the clicked mouse button. (0 : none | 1 : leftButton | 2 : middleButton | 3 : rightButton)\r\n                 */\r\n                mBtn: function (event) {\r\n                    var button = event.button;\r\n                    if (!event.which && button !== undefined)\r\n                        return (button & 1 ? 1 : (button & 2 ? 3 : (button & 4 ? 2 : 0)));\r\n                    else\r\n                        return event.which;\r\n                },\r\n\r\n                /**\r\n                 * Checks whether a item is in the given array and returns its index.\r\n                 * @param item The item of which the position in the array shall be determined.\r\n                 * @param arr The array.\r\n                 * @returns {number} The zero based index of the item or -1 if the item isn't in the array.\r\n                 */\r\n                inA: function (item, arr) {\r\n                    for (var i = 0; i < arr[LEXICON.l]; i++)\r\n                        //Sometiems in IE a \"SCRIPT70\" Permission denied error occurs if HTML elements in a iFrame are compared\r\n                        try {\r\n                            if (arr[i] === item)\r\n                                return i;\r\n                        }\r\n                        catch (e) { }\r\n                    return -1;\r\n                },\r\n\r\n                /**\r\n                 * Returns true if the given value is a array.\r\n                 * @param arr The potential array.\r\n                 * @returns {boolean} True if the given value is a array, false otherwise.\r\n                 */\r\n                isA: function (arr) {\r\n                    var def = Array.isArray;\r\n                    return def ? def(arr) : this.type(arr) == TYPES.a;\r\n                },\r\n\r\n                /**\r\n                 * Determine the internal JavaScript [[Class]] of the given object.\r\n                 * @param obj The object of which the type shall be determined.\r\n                 * @returns {string} The type of the given object.\r\n                 */\r\n                type: function (obj) {\r\n                    if (obj === undefined)\r\n                        return obj + '';\r\n                    if (obj === null)\r\n                        return obj + '';\r\n                    return Object[LEXICON.p].toString.call(obj).replace(/^\\[object (.+)\\]$/, '$1').toLowerCase();\r\n                },\r\n\r\n\r\n                bind: bind\r\n\r\n                /**\r\n                 * Gets the vendor-prefixed CSS property by the given name.\r\n                 * For example the given name is \"transform\" and you're using a old Firefox browser then the returned value would be \"-moz-transform\".\r\n                 * If the browser doesn't need a vendor-prefix, then the returned string is the given name.\r\n                 * If the browser doesn't support the given property name at all (not even with a vendor-prefix) the returned value is null.\r\n                 * @param propName The unprefixed CSS property name.\r\n                 * @returns {string|null} The vendor-prefixed CSS property or null if the browser doesn't support the given CSS property.\r\n\r\n                cssProp: function(propName) {\r\n                    return VENDORS._cssProperty(propName);\r\n                }\r\n                */\r\n            }\r\n        })();\r\n\r\n\r\n        var MATH = Math;\r\n        var JQUERY = window.jQuery;\r\n        var EASING = (function () {\r\n            var _easingsMath = {\r\n                p: MATH.PI,\r\n                c: MATH.cos,\r\n                s: MATH.sin,\r\n                w: MATH.pow,\r\n                t: MATH.sqrt,\r\n                n: MATH.asin,\r\n                a: MATH.abs,\r\n                o: 1.70158\r\n            };\r\n\r\n            /*\r\n             x : current percent (0 - 1),\r\n             t : current time (duration * percent),\r\n             b : start value (from),\r\n             c : end value (to),\r\n             d : duration\r\n\r\n             easingName : function(x, t, b, c, d) { return easedValue; }\r\n             */\r\n\r\n            return {\r\n                swing: function (x, t, b, c, d) {\r\n                    return 0.5 - _easingsMath.c(x * _easingsMath.p) / 2;\r\n                },\r\n                linear: function (x, t, b, c, d) {\r\n                    return x;\r\n                },\r\n                easeInQuad: function (x, t, b, c, d) {\r\n                    return c * (t /= d) * t + b;\r\n                },\r\n                easeOutQuad: function (x, t, b, c, d) {\r\n                    return -c * (t /= d) * (t - 2) + b;\r\n                },\r\n                easeInOutQuad: function (x, t, b, c, d) {\r\n                    return ((t /= d / 2) < 1) ? c / 2 * t * t + b : -c / 2 * ((--t) * (t - 2) - 1) + b;\r\n                },\r\n                easeInCubic: function (x, t, b, c, d) {\r\n                    return c * (t /= d) * t * t + b;\r\n                },\r\n                easeOutCubic: function (x, t, b, c, d) {\r\n                    return c * ((t = t / d - 1) * t * t + 1) + b;\r\n                },\r\n                easeInOutCubic: function (x, t, b, c, d) {\r\n                    return ((t /= d / 2) < 1) ? c / 2 * t * t * t + b : c / 2 * ((t -= 2) * t * t + 2) + b;\r\n                },\r\n                easeInQuart: function (x, t, b, c, d) {\r\n                    return c * (t /= d) * t * t * t + b;\r\n                },\r\n                easeOutQuart: function (x, t, b, c, d) {\r\n                    return -c * ((t = t / d - 1) * t * t * t - 1) + b;\r\n                },\r\n                easeInOutQuart: function (x, t, b, c, d) {\r\n                    return ((t /= d / 2) < 1) ? c / 2 * t * t * t * t + b : -c / 2 * ((t -= 2) * t * t * t - 2) + b;\r\n                },\r\n                easeInQuint: function (x, t, b, c, d) {\r\n                    return c * (t /= d) * t * t * t * t + b;\r\n                },\r\n                easeOutQuint: function (x, t, b, c, d) {\r\n                    return c * ((t = t / d - 1) * t * t * t * t + 1) + b;\r\n                },\r\n                easeInOutQuint: function (x, t, b, c, d) {\r\n                    return ((t /= d / 2) < 1) ? c / 2 * t * t * t * t * t + b : c / 2 * ((t -= 2) * t * t * t * t + 2) + b;\r\n                },\r\n                easeInSine: function (x, t, b, c, d) {\r\n                    return -c * _easingsMath.c(t / d * (_easingsMath.p / 2)) + c + b;\r\n                },\r\n                easeOutSine: function (x, t, b, c, d) {\r\n                    return c * _easingsMath.s(t / d * (_easingsMath.p / 2)) + b;\r\n                },\r\n                easeInOutSine: function (x, t, b, c, d) {\r\n                    return -c / 2 * (_easingsMath.c(_easingsMath.p * t / d) - 1) + b;\r\n                },\r\n                easeInExpo: function (x, t, b, c, d) {\r\n                    return (t == 0) ? b : c * _easingsMath.w(2, 10 * (t / d - 1)) + b;\r\n                },\r\n                easeOutExpo: function (x, t, b, c, d) {\r\n                    return (t == d) ? b + c : c * (-_easingsMath.w(2, -10 * t / d) + 1) + b;\r\n                },\r\n                easeInOutExpo: function (x, t, b, c, d) {\r\n                    if (t == 0) return b;\r\n                    if (t == d) return b + c;\r\n                    if ((t /= d / 2) < 1) return c / 2 * _easingsMath.w(2, 10 * (t - 1)) + b;\r\n                    return c / 2 * (-_easingsMath.w(2, -10 * --t) + 2) + b;\r\n                },\r\n                easeInCirc: function (x, t, b, c, d) {\r\n                    return -c * (_easingsMath.t(1 - (t /= d) * t) - 1) + b;\r\n                },\r\n                easeOutCirc: function (x, t, b, c, d) {\r\n                    return c * _easingsMath.t(1 - (t = t / d - 1) * t) + b;\r\n                },\r\n                easeInOutCirc: function (x, t, b, c, d) {\r\n                    return ((t /= d / 2) < 1) ? -c / 2 * (_easingsMath.t(1 - t * t) - 1) + b : c / 2 * (_easingsMath.t(1 - (t -= 2) * t) + 1) + b;\r\n                },\r\n                easeInElastic: function (x, t, b, c, d) {\r\n                    var s = _easingsMath.o; var p = 0; var a = c;\r\n                    if (t == 0) return b; if ((t /= d) == 1) return b + c; if (!p) p = d * .3;\r\n                    if (a < _easingsMath.a(c)) { a = c; s = p / 4; }\r\n                    else s = p / (2 * _easingsMath.p) * _easingsMath.n(c / a);\r\n                    return -(a * _easingsMath.w(2, 10 * (t -= 1)) * _easingsMath.s((t * d - s) * (2 * _easingsMath.p) / p)) + b;\r\n                },\r\n                easeOutElastic: function (x, t, b, c, d) {\r\n                    var s = _easingsMath.o; var p = 0; var a = c;\r\n                    if (t == 0) return b;\r\n                    if ((t /= d) == 1) return b + c;\r\n                    if (!p) p = d * .3;\r\n                    if (a < _easingsMath.a(c)) { a = c; s = p / 4; }\r\n                    else s = p / (2 * _easingsMath.p) * _easingsMath.n(c / a);\r\n                    return a * _easingsMath.w(2, -10 * t) * _easingsMath.s((t * d - s) * (2 * _easingsMath.p) / p) + c + b;\r\n                },\r\n                easeInOutElastic: function (x, t, b, c, d) {\r\n                    var s = _easingsMath.o; var p = 0; var a = c;\r\n                    if (t == 0) return b;\r\n                    if ((t /= d / 2) == 2) return b + c;\r\n                    if (!p) p = d * (.3 * 1.5);\r\n                    if (a < _easingsMath.a(c)) { a = c; s = p / 4; }\r\n                    else s = p / (2 * _easingsMath.p) * _easingsMath.n(c / a);\r\n                    if (t < 1) return -.5 * (a * _easingsMath.w(2, 10 * (t -= 1)) * _easingsMath.s((t * d - s) * (2 * _easingsMath.p) / p)) + b;\r\n                    return a * _easingsMath.w(2, -10 * (t -= 1)) * _easingsMath.s((t * d - s) * (2 * _easingsMath.p) / p) * .5 + c + b;\r\n                },\r\n                easeInBack: function (x, t, b, c, d, s) {\r\n                    s = s || _easingsMath.o;\r\n                    return c * (t /= d) * t * ((s + 1) * t - s) + b;\r\n                },\r\n                easeOutBack: function (x, t, b, c, d, s) {\r\n                    s = s || _easingsMath.o;\r\n                    return c * ((t = t / d - 1) * t * ((s + 1) * t + s) + 1) + b;\r\n                },\r\n                easeInOutBack: function (x, t, b, c, d, s) {\r\n                    s = s || _easingsMath.o;\r\n                    return ((t /= d / 2) < 1) ? c / 2 * (t * t * (((s *= (1.525)) + 1) * t - s)) + b : c / 2 * ((t -= 2) * t * (((s *= (1.525)) + 1) * t + s) + 2) + b;\r\n                },\r\n                easeInBounce: function (x, t, b, c, d) {\r\n                    return c - this.easeOutBounce(x, d - t, 0, c, d) + b;\r\n                },\r\n                easeOutBounce: function (x, t, b, c, d) {\r\n                    var o = 7.5625;\r\n                    if ((t /= d) < (1 / 2.75)) {\r\n                        return c * (o * t * t) + b;\r\n                    } else if (t < (2 / 2.75)) {\r\n                        return c * (o * (t -= (1.5 / 2.75)) * t + .75) + b;\r\n                    } else if (t < (2.5 / 2.75)) {\r\n                        return c * (o * (t -= (2.25 / 2.75)) * t + .9375) + b;\r\n                    } else {\r\n                        return c * (o * (t -= (2.625 / 2.75)) * t + .984375) + b;\r\n                    }\r\n                },\r\n                easeInOutBounce: function (x, t, b, c, d) {\r\n                    return (t < d / 2) ? this.easeInBounce(x, t * 2, 0, c, d) * .5 + b : this.easeOutBounce(x, t * 2 - d, 0, c, d) * .5 + c * .5 + b;\r\n                }\r\n            };\r\n            /*\r\n             *\r\n             * TERMS OF USE - EASING EQUATIONS\r\n             * \r\n             * Open source under the BSD License. \r\n             * \r\n             * Copyright Â© 2001 Robert Penner\r\n             * All rights reserved.\r\n             * \r\n             * Redistribution and use in source and binary forms, with or without modification, \r\n             * are permitted provided that the following conditions are met:\r\n             * \r\n             * Redistributions of source code must retain the above copyright notice, this list of \r\n             * conditions and the following disclaimer.\r\n             * Redistributions in binary form must reproduce the above copyright notice, this list \r\n             * of conditions and the following disclaimer in the documentation and/or other materials \r\n             * provided with the distribution.\r\n             * \r\n             * Neither the name of the author nor the names of contributors may be used to endorse \r\n             * or promote products derived from this software without specific prior written permission.\r\n             * \r\n             * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS \"AS IS\" AND ANY \r\n             * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF\r\n             * MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE\r\n             *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,\r\n             *  EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE\r\n             *  GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED \r\n             * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING\r\n             *  NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED \r\n             * OF THE POSSIBILITY OF SUCH DAMAGE. \r\n             *\r\n             */\r\n        })();\r\n        var FRAMEWORK = (function () {\r\n            var _rnothtmlwhite = (/[^\\x20\\t\\r\\n\\f]+/g);\r\n            var _strSpace = ' ';\r\n            var _strEmpty = '';\r\n            var _strScrollLeft = 'scrollLeft';\r\n            var _strScrollTop = 'scrollTop';\r\n            var _animations = [];\r\n            var _type = COMPATIBILITY.type;\r\n            var _cssNumber = {\r\n                animationIterationCount: true,\r\n                columnCount: true,\r\n                fillOpacity: true,\r\n                flexGrow: true,\r\n                flexShrink: true,\r\n                fontWeight: true,\r\n                lineHeight: true,\r\n                opacity: true,\r\n                order: true,\r\n                orphans: true,\r\n                widows: true,\r\n                zIndex: true,\r\n                zoom: true\r\n            };\r\n\r\n            function extend() {\r\n                var src, copyIsArray, copy, name, options, clone, target = arguments[0] || {},\r\n                    i = 1,\r\n                    length = arguments[LEXICON.l],\r\n                    deep = false;\r\n\r\n                // Handle a deep copy situation\r\n                if (_type(target) == TYPES.b) {\r\n                    deep = target;\r\n                    target = arguments[1] || {};\r\n                    // skip the boolean and the target\r\n                    i = 2;\r\n                }\r\n\r\n                // Handle case when target is a string or something (possible in deep copy)\r\n                if (_type(target) != TYPES.o && !_type(target) == TYPES.f) {\r\n                    target = {};\r\n                }\r\n\r\n                // extend jQuery itself if only one argument is passed\r\n                if (length === i) {\r\n                    target = FakejQuery;\r\n                    --i;\r\n                }\r\n\r\n                for (; i < length; i++) {\r\n                    // Only deal with non-null/undefined values\r\n                    if ((options = arguments[i]) != null) {\r\n                        // Extend the base object\r\n                        for (name in options) {\r\n                            src = target[name];\r\n                            copy = options[name];\r\n\r\n                            // Prevent never-ending loop\r\n                            if (target === copy) {\r\n                                continue;\r\n                            }\r\n\r\n                            // Recurse if we're merging plain objects or arrays\r\n                            if (deep && copy && (isPlainObject(copy) || (copyIsArray = COMPATIBILITY.isA(copy)))) {\r\n                                if (copyIsArray) {\r\n                                    copyIsArray = false;\r\n                                    clone = src && COMPATIBILITY.isA(src) ? src : [];\r\n\r\n                                } else {\r\n                                    clone = src && isPlainObject(src) ? src : {};\r\n                                }\r\n\r\n                                // Never move original objects, clone them\r\n                                target[name] = extend(deep, clone, copy);\r\n\r\n                                // Don't bring in undefined values\r\n                            } else if (copy !== undefined) {\r\n                                target[name] = copy;\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                // Return the modified object\r\n                return target;\r\n            };\r\n\r\n            function inArray(item, arr, fromIndex) {\r\n                for (var i = fromIndex || 0; i < arr[LEXICON.l]; i++)\r\n                    if (arr[i] === item)\r\n                        return i;\r\n                return -1;\r\n            }\r\n\r\n            function isFunction(obj) {\r\n                return _type(obj) == TYPES.f;\r\n            };\r\n\r\n            function isEmptyObject(obj) {\r\n                for (var name in obj)\r\n                    return false;\r\n                return true;\r\n            };\r\n\r\n            function isPlainObject(obj) {\r\n                if (!obj || _type(obj) != TYPES.o)\r\n                    return false;\r\n\r\n                var key;\r\n                var proto = LEXICON.p;\r\n                var hasOwnProperty = Object[proto].hasOwnProperty;\r\n                var hasOwnConstructor = hasOwnProperty.call(obj, 'constructor');\r\n                var hasIsPrototypeOf = obj.constructor && obj.constructor[proto] && hasOwnProperty.call(obj.constructor[proto], 'isPrototypeOf');\r\n\r\n                if (obj.constructor && !hasOwnConstructor && !hasIsPrototypeOf) {\r\n                    return false;\r\n                }\r\n\r\n\r\n                for (key in obj) { /**/ }\r\n\r\n                return _type(key) == TYPES.u || hasOwnProperty.call(obj, key);\r\n            };\r\n\r\n            function each(obj, callback) {\r\n                var i = 0;\r\n\r\n                if (isArrayLike(obj)) {\r\n                    for (; i < obj[LEXICON.l]; i++) {\r\n                        if (callback.call(obj[i], i, obj[i]) === false)\r\n                            break;\r\n                    }\r\n                }\r\n                else {\r\n                    for (i in obj) {\r\n                        if (callback.call(obj[i], i, obj[i]) === false)\r\n                            break;\r\n                    }\r\n                }\r\n\r\n                return obj;\r\n            };\r\n\r\n            function isArrayLike(obj) {\r\n                var length = !!obj && [LEXICON.l] in obj && obj[LEXICON.l];\r\n                var t = _type(obj);\r\n                return isFunction(t) ? false : (t == TYPES.a || length === 0 || _type(length) == TYPES.n && length > 0 && (length - 1) in obj);\r\n            }\r\n\r\n            function stripAndCollapse(value) {\r\n                var tokens = value.match(_rnothtmlwhite) || [];\r\n                return tokens.join(_strSpace);\r\n            }\r\n\r\n            function matches(elem, selector) {\r\n                var nodeList = (elem.parentNode || document).querySelectorAll(selector) || [];\r\n                var i = nodeList[LEXICON.l];\r\n\r\n                while (i--)\r\n                    if (nodeList[i] == elem)\r\n                        return true;\r\n\r\n                return false;\r\n            }\r\n\r\n            function insertAdjacentElement(el, strategy, child) {\r\n                if (COMPATIBILITY.isA(child)) {\r\n                    for (var i = 0; i < child[LEXICON.l]; i++)\r\n                        insertAdjacentElement(el, strategy, child[i]);\r\n                }\r\n                else if (_type(child) == TYPES.s)\r\n                    el.insertAdjacentHTML(strategy, child);\r\n                else\r\n                    el.insertAdjacentElement(strategy, child.nodeType ? child : child[0]);\r\n            }\r\n\r\n            function setCSSVal(el, prop, val) {\r\n                try {\r\n                    if (el[LEXICON.s][prop] !== undefined)\r\n                        el[LEXICON.s][prop] = parseCSSVal(prop, val);\r\n                } catch (e) { }\r\n            }\r\n\r\n            function parseCSSVal(prop, val) {\r\n                if (!_cssNumber[prop.toLowerCase()] && _type(val) == TYPES.n)\r\n                    val += 'px';\r\n                return val;\r\n            }\r\n\r\n            function startNextAnimationInQ(animObj, removeFromQ) {\r\n                var index;\r\n                var nextAnim;\r\n                if (removeFromQ !== false)\r\n                    animObj.q.splice(0, 1);\r\n                if (animObj.q[LEXICON.l] > 0) {\r\n                    nextAnim = animObj.q[0];\r\n                    animate(animObj.el, nextAnim.props, nextAnim.duration, nextAnim.easing, nextAnim.complete, true);\r\n                }\r\n                else {\r\n                    index = inArray(animObj, _animations);\r\n                    if (index > -1)\r\n                        _animations.splice(index, 1);\r\n                }\r\n            }\r\n\r\n            function setAnimationValue(el, prop, value) {\r\n                if (prop === _strScrollLeft || prop === _strScrollTop)\r\n                    el[prop] = value;\r\n                else\r\n                    setCSSVal(el, prop, value);\r\n            }\r\n\r\n            function animate(el, props, options, easing, complete, guaranteedNext) {\r\n                var hasOptions = isPlainObject(options);\r\n                var from = {};\r\n                var to = {};\r\n                var i = 0;\r\n                var key;\r\n                var animObj;\r\n                var start;\r\n                var progress;\r\n                var step;\r\n                var specialEasing;\r\n                var duration;\r\n                if (hasOptions) {\r\n                    easing = options.easing;\r\n                    start = options.start;\r\n                    progress = options.progress;\r\n                    step = options.step;\r\n                    specialEasing = options.specialEasing;\r\n                    complete = options.complete;\r\n                    duration = options.duration;\r\n                }\r\n                else\r\n                    duration = options;\r\n                specialEasing = specialEasing || {};\r\n                duration = duration || 400;\r\n                easing = easing || 'swing';\r\n                guaranteedNext = guaranteedNext || false;\r\n\r\n                for (; i < _animations[LEXICON.l]; i++) {\r\n                    if (_animations[i].el === el) {\r\n                        animObj = _animations[i];\r\n                        break;\r\n                    }\r\n                }\r\n\r\n                if (!animObj) {\r\n                    animObj = {\r\n                        el: el,\r\n                        q: []\r\n                    };\r\n                    _animations.push(animObj);\r\n                }\r\n\r\n                for (key in props) {\r\n                    if (key === _strScrollLeft || key === _strScrollTop)\r\n                        from[key] = el[key];\r\n                    else\r\n                        from[key] = FakejQuery(el).css(key);\r\n                }\r\n\r\n                for (key in from) {\r\n                    if (from[key] !== props[key] && props[key] !== undefined)\r\n                        to[key] = props[key];\r\n                }\r\n\r\n                if (!isEmptyObject(to)) {\r\n                    var timeNow;\r\n                    var end;\r\n                    var percent;\r\n                    var fromVal;\r\n                    var toVal;\r\n                    var easedVal;\r\n                    var timeStart;\r\n                    var frame;\r\n                    var elapsed;\r\n                    var qPos = guaranteedNext ? 0 : inArray(qObj, animObj.q);\r\n                    var qObj = {\r\n                        props: to,\r\n                        duration: hasOptions ? options : duration,\r\n                        easing: easing,\r\n                        complete: complete\r\n                    };\r\n                    if (qPos === -1) {\r\n                        qPos = animObj.q[LEXICON.l];\r\n                        animObj.q.push(qObj);\r\n                    }\r\n\r\n                    if (qPos === 0) {\r\n                        if (duration > 0) {\r\n                            timeStart = COMPATIBILITY.now();\r\n                            frame = function () {\r\n                                timeNow = COMPATIBILITY.now();\r\n                                elapsed = (timeNow - timeStart);\r\n                                end = qObj.stop || elapsed >= duration;\r\n                                percent = 1 - ((MATH.max(0, timeStart + duration - timeNow) / duration) || 0);\r\n\r\n                                for (key in to) {\r\n                                    fromVal = parseFloat(from[key]);\r\n                                    toVal = parseFloat(to[key]);\r\n                                    easedVal = (toVal - fromVal) * EASING[specialEasing[key] || easing](percent, percent * duration, 0, 1, duration) + fromVal;\r\n                                    setAnimationValue(el, key, easedVal);\r\n                                    if (isFunction(step)) {\r\n                                        step(easedVal, {\r\n                                            elem: el,\r\n                                            prop: key,\r\n                                            start: fromVal,\r\n                                            now: easedVal,\r\n                                            end: toVal,\r\n                                            pos: percent,\r\n                                            options: {\r\n                                                easing: easing,\r\n                                                speacialEasing: specialEasing,\r\n                                                duration: duration,\r\n                                                complete: complete,\r\n                                                step: step\r\n                                            },\r\n                                            startTime: timeStart\r\n                                        });\r\n                                    }\r\n                                }\r\n\r\n                                if (isFunction(progress))\r\n                                    progress({}, percent, MATH.max(0, duration - elapsed));\r\n\r\n                                if (end) {\r\n                                    startNextAnimationInQ(animObj);\r\n                                    if (isFunction(complete))\r\n                                        complete();\r\n                                }\r\n                                else\r\n                                    qObj.frame = COMPATIBILITY.rAF()(frame);\r\n                            };\r\n                            qObj.frame = COMPATIBILITY.rAF()(frame);\r\n                        }\r\n                        else {\r\n                            for (key in to)\r\n                                setAnimationValue(el, key, to[key]);\r\n                            startNextAnimationInQ(animObj);\r\n                        }\r\n                    }\r\n                }\r\n                else if (guaranteedNext)\r\n                    startNextAnimationInQ(animObj);\r\n            }\r\n\r\n            function stop(el, clearQ, jumpToEnd) {\r\n                var animObj;\r\n                var qObj;\r\n                var key;\r\n                var i = 0;\r\n                for (; i < _animations[LEXICON.l]; i++) {\r\n                    animObj = _animations[i];\r\n                    if (animObj.el === el) {\r\n                        if (animObj.q[LEXICON.l] > 0) {\r\n                            qObj = animObj.q[0];\r\n                            qObj.stop = true;\r\n                            COMPATIBILITY.cAF()(qObj.frame);\r\n                            animObj.q.splice(0, 1);\r\n\r\n                            if (jumpToEnd)\r\n                                for (key in qObj.props)\r\n                                    setAnimationValue(el, key, qObj.props[key]);\r\n\r\n                            if (clearQ)\r\n                                animObj.q = [];\r\n                            else\r\n                                startNextAnimationInQ(animObj, false);\r\n                        }\r\n                        break;\r\n                    }\r\n                }\r\n            }\r\n\r\n            function elementIsVisible(el) {\r\n                return !!(el[LEXICON.oW] || el[LEXICON.oH] || el.getClientRects()[LEXICON.l]);\r\n            }\r\n\r\n            function FakejQuery(selector) {\r\n                if (arguments[LEXICON.l] === 0)\r\n                    return this;\r\n\r\n                var base = new FakejQuery();\r\n                var elements = selector;\r\n                var i = 0;\r\n                var elms;\r\n                var el;\r\n\r\n                if (_type(selector) == TYPES.s) {\r\n                    elements = [];\r\n                    if (selector.charAt(0) === '<') {\r\n                        el = document.createElement('div');\r\n                        el.innerHTML = selector;\r\n                        elms = el.children;\r\n                    }\r\n                    else {\r\n                        elms = document.querySelectorAll(selector);\r\n                    }\r\n\r\n                    for (; i < elms[LEXICON.l]; i++)\r\n                        elements.push(elms[i]);\r\n                }\r\n\r\n                if (elements) {\r\n                    if (_type(elements) != TYPES.s && (!isArrayLike(elements) || elements === window || elements === elements.self))\r\n                        elements = [elements];\r\n\r\n                    for (i = 0; i < elements[LEXICON.l]; i++)\r\n                        base[i] = elements[i];\r\n\r\n                    base[LEXICON.l] = elements[LEXICON.l];\r\n                }\r\n\r\n                return base;\r\n            };\r\n\r\n            FakejQuery[LEXICON.p] = {\r\n\r\n                //EVENTS:\r\n\r\n                on: function (eventName, handler) {\r\n                    eventName = (eventName || _strEmpty).match(_rnothtmlwhite) || [_strEmpty];\r\n\r\n                    var eventNameLength = eventName[LEXICON.l];\r\n                    var i = 0;\r\n                    var el;\r\n                    return this.each(function () {\r\n                        el = this;\r\n                        try {\r\n                            if (el.addEventListener) {\r\n                                for (; i < eventNameLength; i++)\r\n                                    el.addEventListener(eventName[i], handler);\r\n                            }\r\n                            else if (el.detachEvent) {\r\n                                for (; i < eventNameLength; i++)\r\n                                    el.attachEvent('on' + eventName[i], handler);\r\n                            }\r\n                        } catch (e) { }\r\n                    });\r\n                },\r\n\r\n                off: function (eventName, handler) {\r\n                    eventName = (eventName || _strEmpty).match(_rnothtmlwhite) || [_strEmpty];\r\n\r\n                    var eventNameLength = eventName[LEXICON.l];\r\n                    var i = 0;\r\n                    var el;\r\n                    return this.each(function () {\r\n                        el = this;\r\n                        try {\r\n                            if (el.removeEventListener) {\r\n                                for (; i < eventNameLength; i++)\r\n                                    el.removeEventListener(eventName[i], handler);\r\n                            }\r\n                            else if (el.detachEvent) {\r\n                                for (; i < eventNameLength; i++)\r\n                                    el.detachEvent('on' + eventName[i], handler);\r\n                            }\r\n                        } catch (e) { }\r\n                    });\r\n                },\r\n\r\n                one: function (eventName, handler) {\r\n                    eventName = (eventName || _strEmpty).match(_rnothtmlwhite) || [_strEmpty];\r\n                    return this.each(function () {\r\n                        var el = FakejQuery(this);\r\n                        FakejQuery.each(eventName, function (i, oneEventName) {\r\n                            var oneHandler = function (e) {\r\n                                handler.call(this, e);\r\n                                el.off(oneEventName, oneHandler);\r\n                            };\r\n                            el.on(oneEventName, oneHandler);\r\n                        });\r\n                    });\r\n                },\r\n\r\n                trigger: function (eventName) {\r\n                    var el;\r\n                    var event;\r\n                    return this.each(function () {\r\n                        el = this;\r\n                        if (document.createEvent) {\r\n                            event = document.createEvent('HTMLEvents');\r\n                            event.initEvent(eventName, true, false);\r\n                            el.dispatchEvent(event);\r\n                        }\r\n                        else {\r\n                            el.fireEvent('on' + eventName);\r\n                        }\r\n                    });\r\n                },\r\n\r\n                //DOM NODE INSERTING / REMOVING:\r\n\r\n                append: function (child) {\r\n                    return this.each(function () { insertAdjacentElement(this, 'beforeend', child); });\r\n                },\r\n\r\n                prepend: function (child) {\r\n                    return this.each(function () { insertAdjacentElement(this, 'afterbegin', child); });\r\n                },\r\n\r\n                before: function (child) {\r\n                    return this.each(function () { insertAdjacentElement(this, 'beforebegin', child); });\r\n                },\r\n\r\n                after: function (child) {\r\n                    return this.each(function () { insertAdjacentElement(this, 'afterend', child); });\r\n                },\r\n\r\n                remove: function () {\r\n                    return this.each(function () {\r\n                        var el = this;\r\n                        var parentNode = el.parentNode;\r\n                        if (parentNode != null)\r\n                            parentNode.removeChild(el);\r\n                    });\r\n                },\r\n\r\n                unwrap: function () {\r\n                    var parents = [];\r\n                    var i;\r\n                    var el;\r\n                    var parent;\r\n\r\n                    this.each(function () {\r\n                        parent = this.parentNode;\r\n                        if (inArray(parent, parents) === - 1)\r\n                            parents.push(parent);\r\n                    });\r\n\r\n                    for (i = 0; i < parents[LEXICON.l]; i++) {\r\n                        el = parents[i];\r\n                        parent = el.parentNode;\r\n                        while (el.firstChild)\r\n                            parent.insertBefore(el.firstChild, el);\r\n                        parent.removeChild(el);\r\n                    }\r\n\r\n                    return this;\r\n                },\r\n\r\n                wrapAll: function (wrapperHTML) {\r\n                    var i;\r\n                    var nodes = this;\r\n                    var wrapper = FakejQuery(wrapperHTML)[0];\r\n                    var deepest = wrapper;\r\n                    var parent = nodes[0].parentNode;\r\n                    var previousSibling = nodes[0].previousSibling;\r\n                    while (deepest.childNodes[LEXICON.l] > 0)\r\n                        deepest = deepest.childNodes[0];\r\n\r\n                    for (i = 0; nodes[LEXICON.l] - i; deepest.firstChild === nodes[0] && i++)\r\n                        deepest.appendChild(nodes[i]);\r\n\r\n                    var nextSibling = previousSibling ? previousSibling.nextSibling : parent.firstChild;\r\n                    parent.insertBefore(wrapper, nextSibling);\r\n\r\n                    return this;\r\n                },\r\n\r\n                wrapInner: function (wrapperHTML) {\r\n                    return this.each(function () {\r\n                        var el = FakejQuery(this);\r\n                        var contents = el.contents();\r\n\r\n                        if (contents[LEXICON.l])\r\n                            contents.wrapAll(wrapperHTML);\r\n                        else\r\n                            el.append(wrapperHTML);\r\n                    });\r\n                },\r\n\r\n                wrap: function (wrapperHTML) {\r\n                    return this.each(function () { FakejQuery(this).wrapAll(wrapperHTML); });\r\n                },\r\n\r\n\r\n                //DOM NODE MANIPULATION / INFORMATION:\r\n\r\n                css: function (styles, val) {\r\n                    var el;\r\n                    var key;\r\n                    var cptStyle;\r\n                    var getCptStyle = window.getComputedStyle;\r\n                    if (_type(styles) == TYPES.s) {\r\n                        if (val === undefined) {\r\n                            el = this[0];\r\n                            cptStyle = getCptStyle ? getCptStyle(el, null) : el.currentStyle[styles];\r\n\r\n                            //https://bugzilla.mozilla.org/show_bug.cgi?id=548397 can be null sometimes if iframe with display: none (firefox only!)\r\n                            return getCptStyle ? cptStyle != null ? cptStyle.getPropertyValue(styles) : el[LEXICON.s][styles] : cptStyle;\r\n                        }\r\n                        else {\r\n                            return this.each(function () {\r\n                                setCSSVal(this, styles, val);\r\n                            });\r\n                        }\r\n                    }\r\n                    else {\r\n                        return this.each(function () {\r\n                            for (key in styles)\r\n                                setCSSVal(this, key, styles[key]);\r\n                        });\r\n                    }\r\n                },\r\n\r\n                hasClass: function (className) {\r\n                    var elem, i = 0;\r\n                    var classNamePrepared = _strSpace + className + _strSpace;\r\n                    var classList;\r\n\r\n                    while ((elem = this[i++])) {\r\n                        classList = elem.classList;\r\n                        if (classList && classList.contains(className))\r\n                            return true;\r\n                        else if (elem.nodeType === 1 && (_strSpace + stripAndCollapse(elem.className + _strEmpty) + _strSpace).indexOf(classNamePrepared) > -1)\r\n                            return true;\r\n                    }\r\n\r\n                    return false;\r\n                },\r\n\r\n                addClass: function (className) {\r\n                    var classes;\r\n                    var elem;\r\n                    var cur;\r\n                    var curValue;\r\n                    var clazz;\r\n                    var finalValue;\r\n                    var supportClassList;\r\n                    var elmClassList;\r\n                    var i = 0;\r\n                    var v = 0;\r\n\r\n                    if (className) {\r\n                        classes = className.match(_rnothtmlwhite) || [];\r\n\r\n                        while ((elem = this[i++])) {\r\n                            elmClassList = elem.classList;\r\n                            if (supportClassList === undefined)\r\n                                supportClassList = elmClassList !== undefined;\r\n\r\n                            if (supportClassList) {\r\n                                while ((clazz = classes[v++]))\r\n                                    elmClassList.add(clazz);\r\n                            }\r\n                            else {\r\n                                curValue = elem.className + _strEmpty;\r\n                                cur = elem.nodeType === 1 && (_strSpace + stripAndCollapse(curValue) + _strSpace);\r\n\r\n                                if (cur) {\r\n                                    while ((clazz = classes[v++]))\r\n                                        if (cur.indexOf(_strSpace + clazz + _strSpace) < 0)\r\n                                            cur += clazz + _strSpace;\r\n\r\n                                    finalValue = stripAndCollapse(cur);\r\n                                    if (curValue !== finalValue)\r\n                                        elem.className = finalValue;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    return this;\r\n                },\r\n\r\n                removeClass: function (className) {\r\n                    var classes;\r\n                    var elem;\r\n                    var cur;\r\n                    var curValue;\r\n                    var clazz;\r\n                    var finalValue;\r\n                    var supportClassList;\r\n                    var elmClassList;\r\n                    var i = 0;\r\n                    var v = 0;\r\n\r\n                    if (className) {\r\n                        classes = className.match(_rnothtmlwhite) || [];\r\n\r\n                        while ((elem = this[i++])) {\r\n                            elmClassList = elem.classList;\r\n                            if (supportClassList === undefined)\r\n                                supportClassList = elmClassList !== undefined;\r\n\r\n                            if (supportClassList) {\r\n                                while ((clazz = classes[v++]))\r\n                                    elmClassList.remove(clazz);\r\n                            }\r\n                            else {\r\n                                curValue = elem.className + _strEmpty;\r\n                                cur = elem.nodeType === 1 && (_strSpace + stripAndCollapse(curValue) + _strSpace);\r\n\r\n                                if (cur) {\r\n                                    while ((clazz = classes[v++]))\r\n                                        while (cur.indexOf(_strSpace + clazz + _strSpace) > -1)\r\n                                            cur = cur.replace(_strSpace + clazz + _strSpace, _strSpace);\r\n\r\n                                    finalValue = stripAndCollapse(cur);\r\n                                    if (curValue !== finalValue)\r\n                                        elem.className = finalValue;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n\r\n                    return this;\r\n                },\r\n\r\n                hide: function () {\r\n                    return this.each(function () { this[LEXICON.s].display = 'none'; });\r\n                },\r\n\r\n                show: function () {\r\n                    return this.each(function () { this[LEXICON.s].display = 'block'; });\r\n                },\r\n\r\n                attr: function (attrName, value) {\r\n                    var i = 0;\r\n                    var el;\r\n                    while (el = this[i++]) {\r\n                        if (value === undefined)\r\n                            return el.getAttribute(attrName);\r\n                        el.setAttribute(attrName, value);\r\n                    }\r\n                    return this;\r\n                },\r\n\r\n                removeAttr: function (attrName) {\r\n                    return this.each(function () { this.removeAttribute(attrName); });\r\n                },\r\n\r\n                offset: function () {\r\n                    var el = this[0];\r\n                    var rect = el[LEXICON.bCR]();\r\n                    var scrollLeft = window.pageXOffset || document.documentElement[_strScrollLeft];\r\n                    var scrollTop = window.pageYOffset || document.documentElement[_strScrollTop];\r\n                    return {\r\n                        top: rect.top + scrollTop,\r\n                        left: rect.left + scrollLeft\r\n                    };\r\n                },\r\n\r\n                position: function () {\r\n                    var el = this[0];\r\n                    return {\r\n                        top: el.offsetTop,\r\n                        left: el.offsetLeft\r\n                    };\r\n                },\r\n\r\n                scrollLeft: function (value) {\r\n                    var i = 0;\r\n                    var el;\r\n                    while (el = this[i++]) {\r\n                        if (value === undefined)\r\n                            return el[_strScrollLeft];\r\n                        el[_strScrollLeft] = value;\r\n                    }\r\n                    return this;\r\n                },\r\n\r\n                scrollTop: function (value) {\r\n                    var i = 0;\r\n                    var el;\r\n                    while (el = this[i++]) {\r\n                        if (value === undefined)\r\n                            return el[_strScrollTop];\r\n                        el[_strScrollTop] = value;\r\n                    }\r\n                    return this;\r\n                },\r\n\r\n                val: function (value) {\r\n                    var el = this[0];\r\n                    if (!value)\r\n                        return el.value;\r\n                    el.value = value;\r\n                    return this;\r\n                },\r\n\r\n\r\n                //DOM TRAVERSAL / FILTERING:\r\n\r\n                first: function () {\r\n                    return this.eq(0);\r\n                },\r\n\r\n                last: function () {\r\n                    return this.eq(-1);\r\n                },\r\n\r\n                eq: function (index) {\r\n                    return FakejQuery(this[index >= 0 ? index : this[LEXICON.l] + index]);\r\n                },\r\n\r\n                find: function (selector) {\r\n                    var children = [];\r\n                    var i;\r\n                    this.each(function () {\r\n                        var el = this;\r\n                        var ch = el.querySelectorAll(selector);\r\n                        for (i = 0; i < ch[LEXICON.l]; i++)\r\n                            children.push(ch[i]);\r\n                    });\r\n                    return FakejQuery(children);\r\n                },\r\n\r\n                children: function (selector) {\r\n                    var children = [];\r\n                    var el;\r\n                    var ch;\r\n                    var i;\r\n\r\n                    this.each(function () {\r\n                        ch = this.children;\r\n                        for (i = 0; i < ch[LEXICON.l]; i++) {\r\n                            el = ch[i];\r\n                            if (selector) {\r\n                                if ((el.matches && el.matches(selector)) || matches(el, selector))\r\n                                    children.push(el);\r\n                            }\r\n                            else\r\n                                children.push(el);\r\n                        }\r\n                    });\r\n                    return FakejQuery(children);\r\n                },\r\n\r\n                parent: function (selector) {\r\n                    var parents = [];\r\n                    var parent;\r\n                    this.each(function () {\r\n                        parent = this.parentNode;\r\n                        if (selector ? FakejQuery(parent).is(selector) : true)\r\n                            parents.push(parent);\r\n                    });\r\n                    return FakejQuery(parents);\r\n                },\r\n\r\n                is: function (selector) {\r\n\r\n                    var el;\r\n                    var i;\r\n                    for (i = 0; i < this[LEXICON.l]; i++) {\r\n                        el = this[i];\r\n                        if (selector === ':visible')\r\n                            return elementIsVisible(el);\r\n                        if (selector === ':hidden')\r\n                            return !elementIsVisible(el);\r\n                        if ((el.matches && el.matches(selector)) || matches(el, selector))\r\n                            return true;\r\n                    }\r\n                    return false;\r\n                },\r\n\r\n                contents: function () {\r\n                    var contents = [];\r\n                    var childs;\r\n                    var i;\r\n\r\n                    this.each(function () {\r\n                        childs = this.childNodes;\r\n                        for (i = 0; i < childs[LEXICON.l]; i++)\r\n                            contents.push(childs[i]);\r\n                    });\r\n\r\n                    return FakejQuery(contents);\r\n                },\r\n\r\n                each: function (callback) {\r\n                    return each(this, callback);\r\n                },\r\n\r\n\r\n                //ANIMATION:\r\n\r\n                animate: function (props, duration, easing, complete) {\r\n                    return this.each(function () { animate(this, props, duration, easing, complete); });\r\n                },\r\n\r\n                stop: function (clearQ, jump) {\r\n                    return this.each(function () { stop(this, clearQ, jump); });\r\n                }\r\n            };\r\n\r\n            extend(FakejQuery, {\r\n                extend: extend,\r\n                inArray: inArray,\r\n                isEmptyObject: isEmptyObject,\r\n                isPlainObject: isPlainObject,\r\n                each: each\r\n            });\r\n\r\n            return FakejQuery;\r\n        })();\r\n        var INSTANCES = (function () {\r\n            var _targets = [];\r\n            var _instancePropertyString = '__overlayScrollbars__';\r\n\r\n            /**\r\n             * Register, unregister or get a certain (or all) instances.\r\n             * Register: Pass the target and the instance.\r\n             * Unregister: Pass the target and null.\r\n             * Get Instance: Pass the target from which the instance shall be got.\r\n             * Get Targets: Pass no arguments.\r\n             * @param target The target to which the instance shall be registered / from which the instance shall be unregistered / the instance shall be got\r\n             * @param instance The instance.\r\n             * @returns {*|void} Returns the instance from the given target.\r\n             */\r\n            return function (target, instance) {\r\n                var argLen = arguments[LEXICON.l];\r\n                if (argLen < 1) {\r\n                    //return all targets\r\n                    return _targets;\r\n                }\r\n                else {\r\n                    if (instance) {\r\n                        //register instance\r\n                        target[_instancePropertyString] = instance;\r\n                        _targets.push(target);\r\n                    }\r\n                    else {\r\n                        var index = COMPATIBILITY.inA(target, _targets);\r\n                        if (index > -1) {\r\n                            if (argLen > 1) {\r\n                                //unregister instance\r\n                                delete target[_instancePropertyString];\r\n                                _targets.splice(index, 1);\r\n                            }\r\n                            else {\r\n                                //get instance from target\r\n                                return _targets[index][_instancePropertyString];\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            }\r\n        })();\r\n        var PLUGIN = (function () {\r\n            var _plugin;\r\n            var _pluginsGlobals;\r\n            var _pluginsAutoUpdateLoop;\r\n            var _pluginsExtensions = [];\r\n            var _pluginsOptions = (function () {\r\n                var type = COMPATIBILITY.type;\r\n                var possibleTemplateTypes = [\r\n                    TYPES.b, //boolean\r\n                    TYPES.n, //number\r\n                    TYPES.s, //string\r\n                    TYPES.a, //array\r\n                    TYPES.o, //object\r\n                    TYPES.f, //function\r\n                    TYPES.z  //null\r\n                ];\r\n                var restrictedStringsSplit = ' ';\r\n                var restrictedStringsPossibilitiesSplit = ':';\r\n                var classNameAllowedValues = [TYPES.z, TYPES.s];\r\n                var numberAllowedValues = TYPES.n;\r\n                var booleanNullAllowedValues = [TYPES.z, TYPES.b];\r\n                var booleanTrueTemplate = [true, TYPES.b];\r\n                var booleanFalseTemplate = [false, TYPES.b];\r\n                var callbackTemplate = [null, [TYPES.z, TYPES.f]];\r\n                var updateOnLoadTemplate = [['img'], [TYPES.s, TYPES.a, TYPES.z]];\r\n                var inheritedAttrsTemplate = [['style', 'class'], [TYPES.s, TYPES.a, TYPES.z]];\r\n                var resizeAllowedValues = 'n:none b:both h:horizontal v:vertical';\r\n                var overflowBehaviorAllowedValues = 'v-h:visible-hidden v-s:visible-scroll s:scroll h:hidden';\r\n                var scrollbarsVisibilityAllowedValues = 'v:visible h:hidden a:auto';\r\n                var scrollbarsAutoHideAllowedValues = 'n:never s:scroll l:leave m:move';\r\n                var optionsDefaultsAndTemplate = {\r\n                    className: ['os-theme-dark', classNameAllowedValues],                //null || string\r\n                    resize: ['none', resizeAllowedValues],                               //none || both  || horizontal || vertical || n || b || h || v\r\n                    sizeAutoCapable: booleanTrueTemplate,                                //true || false\r\n                    clipAlways: booleanTrueTemplate,                                     //true || false\r\n                    normalizeRTL: booleanTrueTemplate,                                   //true || false\r\n                    paddingAbsolute: booleanFalseTemplate,                               //true || false\r\n                    autoUpdate: [null, booleanNullAllowedValues],                        //true || false || null\r\n                    autoUpdateInterval: [33, numberAllowedValues],                       //number\r\n                    updateOnLoad: updateOnLoadTemplate,                                  //string || array || null\r\n                    nativeScrollbarsOverlaid: {\r\n                        showNativeScrollbars: booleanFalseTemplate,                      //true || false\r\n                        initialize: booleanTrueTemplate                                  //true || false\r\n                    },\r\n                    overflowBehavior: {\r\n                        x: ['scroll', overflowBehaviorAllowedValues],                    //visible-hidden  || visible-scroll || hidden || scroll || v-h || v-s || h || s\r\n                        y: ['scroll', overflowBehaviorAllowedValues]                     //visible-hidden  || visible-scroll || hidden || scroll || v-h || v-s || h || s\r\n                    },\r\n                    scrollbars: {\r\n                        visibility: ['auto', scrollbarsVisibilityAllowedValues],         //visible || hidden || auto || v || h || a\r\n                        autoHide: ['never', scrollbarsAutoHideAllowedValues],            //never || scroll || leave || move || n || s || l || m\r\n                        autoHideDelay: [800, numberAllowedValues],                       //number\r\n                        dragScrolling: booleanTrueTemplate,                              //true || false\r\n                        clickScrolling: booleanFalseTemplate,                            //true || false\r\n                        touchSupport: booleanTrueTemplate,                               //true || false\r\n                        snapHandle: booleanFalseTemplate                                 //true || false\r\n                    },\r\n                    textarea: {\r\n                        dynWidth: booleanFalseTemplate,                                  //true || false\r\n                        dynHeight: booleanFalseTemplate,                                 //true || false\r\n                        inheritedAttrs: inheritedAttrsTemplate                           //string || array || null\r\n                    },\r\n                    callbacks: {\r\n                        onInitialized: callbackTemplate,                                 //null || function\r\n                        onInitializationWithdrawn: callbackTemplate,                     //null || function\r\n                        onDestroyed: callbackTemplate,                                   //null || function\r\n                        onScrollStart: callbackTemplate,                                 //null || function\r\n                        onScroll: callbackTemplate,                                      //null || function\r\n                        onScrollStop: callbackTemplate,                                  //null || function\r\n                        onOverflowChanged: callbackTemplate,                             //null || function\r\n                        onOverflowAmountChanged: callbackTemplate,                       //null || function\r\n                        onDirectionChanged: callbackTemplate,                            //null || function\r\n                        onContentSizeChanged: callbackTemplate,                          //null || function\r\n                        onHostSizeChanged: callbackTemplate,                             //null || function\r\n                        onUpdated: callbackTemplate                                      //null || function\r\n                    }\r\n                };\r\n                var convert = function (template) {\r\n                    var recursive = function (obj) {\r\n                        var key;\r\n                        var val;\r\n                        var valType;\r\n                        for (key in obj) {\r\n                            if (!obj[LEXICON.hOP](key))\r\n                                continue;\r\n                            val = obj[key];\r\n                            valType = type(val);\r\n                            if (valType == TYPES.a)\r\n                                obj[key] = val[template ? 1 : 0];\r\n                            else if (valType == TYPES.o)\r\n                                obj[key] = recursive(val);\r\n                        }\r\n                        return obj;\r\n                    };\r\n                    return recursive(FRAMEWORK.extend(true, {}, optionsDefaultsAndTemplate));\r\n                };\r\n\r\n                return {\r\n                    _defaults: convert(),\r\n\r\n                    _template: convert(true),\r\n\r\n                    /**\r\n                     * Validates the passed object by the passed template.\r\n                     * @param obj The object which shall be validated.\r\n                     * @param template The template which defines the allowed values and types.\r\n                     * @param writeErrors True if errors shall be logged to the console.\r\n                     * @param diffObj If a object is passed then only valid differences to this object will be returned.\r\n                     * @returns {{}} A object which contains two objects called \"default\" and \"prepared\" which contains only the valid properties of the passed original object and discards not different values compared to the passed diffObj.\r\n                     */\r\n                    _validate: function (obj, template, writeErrors, diffObj) {\r\n                        var validatedOptions = {};\r\n                        var validatedOptionsPrepared = {};\r\n                        var objectCopy = FRAMEWORK.extend(true, {}, obj);\r\n                        var inArray = FRAMEWORK.inArray;\r\n                        var isEmptyObj = FRAMEWORK.isEmptyObject;\r\n                        var checkObjectProps = function (data, template, diffData, validatedOptions, validatedOptionsPrepared, prevPropName) {\r\n                            for (var prop in template) {\r\n                                if (template[LEXICON.hOP](prop) && data[LEXICON.hOP](prop)) {\r\n                                    var isValid = false;\r\n                                    var isDiff = false;\r\n                                    var templateValue = template[prop];\r\n                                    var templateValueType = type(templateValue);\r\n                                    var templateIsComplex = templateValueType == TYPES.o;\r\n                                    var templateTypes = !COMPATIBILITY.isA(templateValue) ? [templateValue] : templateValue;\r\n                                    var dataDiffValue = diffData[prop];\r\n                                    var dataValue = data[prop];\r\n                                    var dataValueType = type(dataValue);\r\n                                    var propPrefix = prevPropName ? prevPropName + '.' : '';\r\n                                    var error = \"The option \\\"\" + propPrefix + prop + \"\\\" wasn't set, because\";\r\n                                    var errorPossibleTypes = [];\r\n                                    var errorRestrictedStrings = [];\r\n                                    var restrictedStringValuesSplit;\r\n                                    var restrictedStringValuesPossibilitiesSplit;\r\n                                    var isRestrictedValue;\r\n                                    var mainPossibility;\r\n                                    var currType;\r\n                                    var i;\r\n                                    var v;\r\n                                    var j;\r\n\r\n                                    dataDiffValue = dataDiffValue === undefined ? {} : dataDiffValue;\r\n\r\n                                    //if the template has a object as value, it means that the options are complex (verschachtelt)\r\n                                    if (templateIsComplex && dataValueType == TYPES.o) {\r\n                                        validatedOptions[prop] = {};\r\n                                        validatedOptionsPrepared[prop] = {};\r\n                                        checkObjectProps(dataValue, templateValue, dataDiffValue, validatedOptions[prop], validatedOptionsPrepared[prop], propPrefix + prop);\r\n                                        FRAMEWORK.each([data, validatedOptions, validatedOptionsPrepared], function (index, value) {\r\n                                            if (isEmptyObj(value[prop])) {\r\n                                                delete value[prop];\r\n                                            }\r\n                                        });\r\n                                    }\r\n                                    else if (!templateIsComplex) {\r\n                                        for (i = 0; i < templateTypes[LEXICON.l]; i++) {\r\n                                            currType = templateTypes[i];\r\n                                            templateValueType = type(currType);\r\n                                            //if currtype is string and starts with restrictedStringPrefix and end with restrictedStringSuffix\r\n                                            isRestrictedValue = templateValueType == TYPES.s && inArray(currType, possibleTemplateTypes) === -1;\r\n                                            if (isRestrictedValue) {\r\n                                                errorPossibleTypes.push(TYPES.s);\r\n\r\n                                                //split it into a array which contains all possible values for example: [\"y:yes\", \"n:no\", \"m:maybe\"]\r\n                                                restrictedStringValuesSplit = currType.split(restrictedStringsSplit);\r\n                                                errorRestrictedStrings = errorRestrictedStrings.concat(restrictedStringValuesSplit);\r\n                                                for (v = 0; v < restrictedStringValuesSplit[LEXICON.l]; v++) {\r\n                                                    //split the possible values into their possibiliteis for example: [\"y\", \"yes\"] -> the first is always the mainPossibility\r\n                                                    restrictedStringValuesPossibilitiesSplit = restrictedStringValuesSplit[v].split(restrictedStringsPossibilitiesSplit);\r\n                                                    mainPossibility = restrictedStringValuesPossibilitiesSplit[0];\r\n                                                    for (j = 0; j < restrictedStringValuesPossibilitiesSplit[LEXICON.l]; j++) {\r\n                                                        //if any possibility matches with the dataValue, its valid\r\n                                                        if (dataValue === restrictedStringValuesPossibilitiesSplit[j]) {\r\n                                                            isValid = true;\r\n                                                            break;\r\n                                                        }\r\n                                                    }\r\n                                                    if (isValid)\r\n                                                        break;\r\n                                                }\r\n                                            }\r\n                                            else {\r\n                                                errorPossibleTypes.push(currType);\r\n\r\n                                                if (dataValueType === currType) {\r\n                                                    isValid = true;\r\n                                                    break;\r\n                                                }\r\n                                            }\r\n                                        }\r\n\r\n                                        if (isValid) {\r\n                                            isDiff = dataValue !== dataDiffValue;\r\n\r\n                                            if (isDiff)\r\n                                                validatedOptions[prop] = dataValue;\r\n\r\n                                            if (isRestrictedValue ? inArray(dataDiffValue, restrictedStringValuesPossibilitiesSplit) < 0 : isDiff)\r\n                                                validatedOptionsPrepared[prop] = isRestrictedValue ? mainPossibility : dataValue;\r\n                                        }\r\n                                        else if (writeErrors) {\r\n                                            console.warn(error + \" it doesn't accept the type [ \" + dataValueType.toUpperCase() + \" ] with the value of \\\"\" + dataValue + \"\\\".\\r\\n\" +\r\n                                                \"Accepted types are: [ \" + errorPossibleTypes.join(', ').toUpperCase() + \" ].\" +\r\n                                                (errorRestrictedStrings[length] > 0 ? \"\\r\\nValid strings are: [ \" + errorRestrictedStrings.join(', ').split(restrictedStringsPossibilitiesSplit).join(', ') + \" ].\" : ''));\r\n                                        }\r\n                                        delete data[prop];\r\n                                    }\r\n                                }\r\n                            }\r\n                        };\r\n                        checkObjectProps(objectCopy, template, diffObj || {}, validatedOptions, validatedOptionsPrepared);\r\n\r\n                        //add values which aren't specified in the template to the finished validated object to prevent them from being discarded\r\n                        /*\r\n                        if(keepForeignProps) {\r\n                            FRAMEWORK.extend(true, validatedOptions, objectCopy);\r\n                            FRAMEWORK.extend(true, validatedOptionsPrepared, objectCopy);\r\n                        }\r\n                        */\r\n\r\n                        if (!isEmptyObj(objectCopy) && writeErrors)\r\n                            console.warn('The following options are discarded due to invalidity:\\r\\n' + window.JSON.stringify(objectCopy, null, 2));\r\n\r\n                        return {\r\n                            _default: validatedOptions,\r\n                            _prepared: validatedOptionsPrepared\r\n                        };\r\n                    }\r\n                }\r\n            }());\r\n\r\n            /**\r\n             * Initializes the object which contains global information about the plugin and each instance of it.\r\n             */\r\n            function initOverlayScrollbarsStatics() {\r\n                if (!_pluginsGlobals)\r\n                    _pluginsGlobals = new OverlayScrollbarsGlobals(_pluginsOptions._defaults);\r\n                if (!_pluginsAutoUpdateLoop)\r\n                    _pluginsAutoUpdateLoop = new OverlayScrollbarsAutoUpdateLoop(_pluginsGlobals);\r\n            }\r\n\r\n            /**\r\n             * The global object for the OverlayScrollbars objects. It contains resources which every OverlayScrollbars object needs. This object is initialized only once: if the first OverlayScrollbars object gets initialized.\r\n             * @param defaultOptions\r\n             * @constructor\r\n             */\r\n            function OverlayScrollbarsGlobals(defaultOptions) {\r\n                var _base = this;\r\n                var strOverflow = 'overflow';\r\n                var strHidden = 'hidden';\r\n                var strScroll = 'scroll';\r\n                var bodyElement = FRAMEWORK('body');\r\n                var scrollbarDummyElement = FRAMEWORK('<div id=\"os-dummy-scrollbar-size\"><div></div></div>');\r\n                var scrollbarDummyElement0 = scrollbarDummyElement[0];\r\n                var dummyContainerChild = FRAMEWORK(scrollbarDummyElement.children('div').eq(0));\r\n\r\n                bodyElement.append(scrollbarDummyElement);\r\n                scrollbarDummyElement.hide().show(); //fix IE8 bug (incorrect measuring)\r\n\r\n                var nativeScrollbarSize = calcNativeScrollbarSize(scrollbarDummyElement0);\r\n                var nativeScrollbarIsOverlaid = {\r\n                    x: nativeScrollbarSize.x === 0,\r\n                    y: nativeScrollbarSize.y === 0\r\n                };\r\n                var msie = (function () {\r\n                    var ua = window.navigator.userAgent;\r\n                    var strIndexOf = 'indexOf';\r\n                    var strSubString = 'substring';\r\n                    var msie = ua[strIndexOf]('MSIE ');\r\n                    var trident = ua[strIndexOf]('Trident/');\r\n                    var edge = ua[strIndexOf]('Edge/');\r\n                    var rv = ua[strIndexOf]('rv:');\r\n                    var result;\r\n                    var parseIntFunc = parseInt;\r\n\r\n                    // IE 10 or older => return version number\r\n                    if (msie > 0)\r\n                        result = parseIntFunc(ua[strSubString](msie + 5, ua[strIndexOf]('.', msie)), 10);\r\n\r\n                    // IE 11 => return version number\r\n                    else if (trident > 0)\r\n                        result = parseIntFunc(ua[strSubString](rv + 3, ua[strIndexOf]('.', rv)), 10);\r\n\r\n                    // Edge (IE 12+) => return version number\r\n                    else if (edge > 0)\r\n                        result = parseIntFunc(ua[strSubString](edge + 5, ua[strIndexOf]('.', edge)), 10);\r\n\r\n                    // other browser\r\n                    return result;\r\n                })();\r\n\r\n                FRAMEWORK.extend(_base, {\r\n                    defaultOptions: defaultOptions,\r\n                    msie: msie,\r\n                    autoUpdateLoop: false,\r\n                    autoUpdateRecommended: !COMPATIBILITY.mO(),\r\n                    nativeScrollbarSize: nativeScrollbarSize,\r\n                    nativeScrollbarIsOverlaid: nativeScrollbarIsOverlaid,\r\n                    nativeScrollbarStyling: (function () {\r\n                        var result = false;\r\n                        scrollbarDummyElement.addClass('os-viewport-native-scrollbars-invisible');\r\n                        try {\r\n                            result = (scrollbarDummyElement.css('scrollbar-width') === 'none' && (msie > 9 || !msie)) || window.getComputedStyle(scrollbarDummyElement0, '::-webkit-scrollbar').getPropertyValue('display') === 'none';\r\n                        } catch (ex) { }\r\n\r\n                        //fix opera bug: scrollbar styles will only appear if overflow value is scroll or auto during the activation of the style.\r\n                        //and set overflow to scroll\r\n                        //scrollbarDummyElement.css(strOverflow, strHidden).hide().css(strOverflow, strScroll).show();\r\n                        //return (scrollbarDummyElement0[LEXICON.oH] - scrollbarDummyElement0[LEXICON.cH]) === 0 && (scrollbarDummyElement0[LEXICON.oW] - scrollbarDummyElement0[LEXICON.cW]) === 0;\r\n\r\n                        return result;\r\n                    })(),\r\n                    overlayScrollbarDummySize: { x: 30, y: 30 },\r\n                    cssCalc: VENDORS._cssPropertyValue('width', 'calc', '(1px)') || null,\r\n                    restrictedMeasuring: (function () {\r\n                        //https://bugzilla.mozilla.org/show_bug.cgi?id=1439305\r\n                        //since 1.11.0 always false -> fixed via CSS (hopefully)\r\n                        scrollbarDummyElement.css(strOverflow, strHidden);\r\n                        var scrollSize = {\r\n                            w: scrollbarDummyElement0[LEXICON.sW],\r\n                            h: scrollbarDummyElement0[LEXICON.sH]\r\n                        };\r\n                        scrollbarDummyElement.css(strOverflow, 'visible');\r\n                        var scrollSize2 = {\r\n                            w: scrollbarDummyElement0[LEXICON.sW],\r\n                            h: scrollbarDummyElement0[LEXICON.sH]\r\n                        };\r\n                        return (scrollSize.w - scrollSize2.w) !== 0 || (scrollSize.h - scrollSize2.h) !== 0;\r\n                    })(),\r\n                    rtlScrollBehavior: (function () {\r\n                        scrollbarDummyElement.css({ 'overflow-y': strHidden, 'overflow-x': strScroll, 'direction': 'rtl' }).scrollLeft(0);\r\n                        var dummyContainerOffset = scrollbarDummyElement.offset();\r\n                        var dummyContainerChildOffset = dummyContainerChild.offset();\r\n                        //https://github.com/KingSora/OverlayScrollbars/issues/187\r\n                        scrollbarDummyElement.scrollLeft(-999);\r\n                        var dummyContainerChildOffsetAfterScroll = dummyContainerChild.offset();\r\n                        return {\r\n                            //origin direction = determines if the zero scroll position is on the left or right side\r\n                            //'i' means 'invert' (i === true means that the axis must be inverted to be correct)\r\n                            //true = on the left side\r\n                            //false = on the right side\r\n                            i: dummyContainerOffset.left === dummyContainerChildOffset.left,\r\n                            //negative = determines if the maximum scroll is positive or negative\r\n                            //'n' means 'negate' (n === true means that the axis must be negated to be correct)\r\n                            //true = negative\r\n                            //false = positive\r\n                            n: dummyContainerChildOffset.left !== dummyContainerChildOffsetAfterScroll.left\r\n                        };\r\n                    })(),\r\n                    supportTransform: !!VENDORS._cssProperty('transform'),\r\n                    supportTransition: !!VENDORS._cssProperty('transition'),\r\n                    supportPassiveEvents: (function () {\r\n                        var supportsPassive = false;\r\n                        try {\r\n                            window.addEventListener('test', null, Object.defineProperty({}, 'passive', {\r\n                                get: function () {\r\n                                    supportsPassive = true;\r\n                                }\r\n                            }));\r\n                        } catch (e) { }\r\n                        return supportsPassive;\r\n                    })(),\r\n                    supportResizeObserver: !!COMPATIBILITY.rO(),\r\n                    supportMutationObserver: !!COMPATIBILITY.mO()\r\n                });\r\n\r\n                scrollbarDummyElement.removeAttr(LEXICON.s).remove();\r\n\r\n                //Catch zoom event:\r\n                (function () {\r\n                    if (nativeScrollbarIsOverlaid.x && nativeScrollbarIsOverlaid.y)\r\n                        return;\r\n\r\n                    var abs = MATH.abs;\r\n                    var windowWidth = COMPATIBILITY.wW();\r\n                    var windowHeight = COMPATIBILITY.wH();\r\n                    var windowDpr = getWindowDPR();\r\n                    var onResize = function () {\r\n                        if (INSTANCES().length > 0) {\r\n                            var newW = COMPATIBILITY.wW();\r\n                            var newH = COMPATIBILITY.wH();\r\n                            var deltaW = newW - windowWidth;\r\n                            var deltaH = newH - windowHeight;\r\n\r\n                            if (deltaW === 0 && deltaH === 0)\r\n                                return;\r\n\r\n                            var deltaWRatio = MATH.round(newW / (windowWidth / 100.0));\r\n                            var deltaHRatio = MATH.round(newH / (windowHeight / 100.0));\r\n                            var absDeltaW = abs(deltaW);\r\n                            var absDeltaH = abs(deltaH);\r\n                            var absDeltaWRatio = abs(deltaWRatio);\r\n                            var absDeltaHRatio = abs(deltaHRatio);\r\n                            var newDPR = getWindowDPR();\r\n\r\n                            var deltaIsBigger = absDeltaW > 2 && absDeltaH > 2;\r\n                            var difference = !differenceIsBiggerThanOne(absDeltaWRatio, absDeltaHRatio);\r\n                            var dprChanged = newDPR !== windowDpr && windowDpr > 0;\r\n                            var isZoom = deltaIsBigger && difference && dprChanged;\r\n                            var oldScrollbarSize = _base.nativeScrollbarSize;\r\n                            var newScrollbarSize;\r\n\r\n                            if (isZoom) {\r\n                                bodyElement.append(scrollbarDummyElement);\r\n                                newScrollbarSize = _base.nativeScrollbarSize = calcNativeScrollbarSize(scrollbarDummyElement[0]);\r\n                                scrollbarDummyElement.remove();\r\n                                if (oldScrollbarSize.x !== newScrollbarSize.x || oldScrollbarSize.y !== newScrollbarSize.y) {\r\n                                    FRAMEWORK.each(INSTANCES(), function () {\r\n                                        if (INSTANCES(this))\r\n                                            INSTANCES(this).update('zoom');\r\n                                    });\r\n                                }\r\n                            }\r\n\r\n                            windowWidth = newW;\r\n                            windowHeight = newH;\r\n                            windowDpr = newDPR;\r\n                        }\r\n                    };\r\n\r\n                    function differenceIsBiggerThanOne(valOne, valTwo) {\r\n                        var absValOne = abs(valOne);\r\n                        var absValTwo = abs(valTwo);\r\n                        return !(absValOne === absValTwo || absValOne + 1 === absValTwo || absValOne - 1 === absValTwo);\r\n                    }\r\n\r\n                    function getWindowDPR() {\r\n                        var dDPI = window.screen.deviceXDPI || 0;\r\n                        var sDPI = window.screen.logicalXDPI || 1;\r\n                        return window.devicePixelRatio || (dDPI / sDPI);\r\n                    }\r\n\r\n                    FRAMEWORK(window).on('resize', onResize);\r\n                })();\r\n\r\n                function calcNativeScrollbarSize(measureElement) {\r\n                    return {\r\n                        x: measureElement[LEXICON.oH] - measureElement[LEXICON.cH],\r\n                        y: measureElement[LEXICON.oW] - measureElement[LEXICON.cW]\r\n                    };\r\n                }\r\n            }\r\n\r\n            /**\r\n             * The object which manages the auto update loop for all OverlayScrollbars objects. This object is initialized only once: if the first OverlayScrollbars object gets initialized.\r\n             * @constructor\r\n             */\r\n            function OverlayScrollbarsAutoUpdateLoop(globals) {\r\n                var _base = this;\r\n                var _inArray = FRAMEWORK.inArray;\r\n                var _getNow = COMPATIBILITY.now;\r\n                var _strAutoUpdate = 'autoUpdate';\r\n                var _strAutoUpdateInterval = _strAutoUpdate + 'Interval';\r\n                var _strLength = LEXICON.l;\r\n                var _loopingInstances = [];\r\n                var _loopingInstancesIntervalCache = [];\r\n                var _loopIsActive = false;\r\n                var _loopIntervalDefault = 33;\r\n                var _loopInterval = _loopIntervalDefault;\r\n                var _loopTimeOld = _getNow();\r\n                var _loopID;\r\n\r\n\r\n                /**\r\n                 * The auto update loop which will run every 50 milliseconds or less if the update interval of a instance is lower than 50 milliseconds.\r\n                 */\r\n                var loop = function () {\r\n                    if (_loopingInstances[_strLength] > 0 && _loopIsActive) {\r\n                        _loopID = COMPATIBILITY.rAF()(function () {\r\n                            loop();\r\n                        });\r\n                        var timeNew = _getNow();\r\n                        var timeDelta = timeNew - _loopTimeOld;\r\n                        var lowestInterval;\r\n                        var instance;\r\n                        var instanceOptions;\r\n                        var instanceAutoUpdateAllowed;\r\n                        var instanceAutoUpdateInterval;\r\n                        var now;\r\n\r\n                        if (timeDelta > _loopInterval) {\r\n                            _loopTimeOld = timeNew - (timeDelta % _loopInterval);\r\n                            lowestInterval = _loopIntervalDefault;\r\n                            for (var i = 0; i < _loopingInstances[_strLength]; i++) {\r\n                                instance = _loopingInstances[i];\r\n                                if (instance !== undefined) {\r\n                                    instanceOptions = instance.options();\r\n                                    instanceAutoUpdateAllowed = instanceOptions[_strAutoUpdate];\r\n                                    instanceAutoUpdateInterval = MATH.max(1, instanceOptions[_strAutoUpdateInterval]);\r\n                                    now = _getNow();\r\n\r\n                                    if ((instanceAutoUpdateAllowed === true || instanceAutoUpdateAllowed === null) && (now - _loopingInstancesIntervalCache[i]) > instanceAutoUpdateInterval) {\r\n                                        instance.update('auto');\r\n                                        _loopingInstancesIntervalCache[i] = new Date(now += instanceAutoUpdateInterval);\r\n                                    }\r\n\r\n                                    lowestInterval = MATH.max(1, MATH.min(lowestInterval, instanceAutoUpdateInterval));\r\n                                }\r\n                            }\r\n                            _loopInterval = lowestInterval;\r\n                        }\r\n                    } else {\r\n                        _loopInterval = _loopIntervalDefault;\r\n                    }\r\n                };\r\n\r\n                /**\r\n                 * Add OverlayScrollbars instance to the auto update loop. Only successful if the instance isn't already added.\r\n                 * @param instance The instance which shall be updated in a loop automatically.\r\n                 */\r\n                _base.add = function (instance) {\r\n                    if (_inArray(instance, _loopingInstances) === -1) {\r\n                        _loopingInstances.push(instance);\r\n                        _loopingInstancesIntervalCache.push(_getNow());\r\n                        if (_loopingInstances[_strLength] > 0 && !_loopIsActive) {\r\n                            _loopIsActive = true;\r\n                            globals.autoUpdateLoop = _loopIsActive;\r\n                            loop();\r\n                        }\r\n                    }\r\n                };\r\n\r\n                /**\r\n                 * Remove OverlayScrollbars instance from the auto update loop. Only successful if the instance was added before.\r\n                 * @param instance The instance which shall be updated in a loop automatically.\r\n                 */\r\n                _base.remove = function (instance) {\r\n                    var index = _inArray(instance, _loopingInstances);\r\n                    if (index > -1) {\r\n                        //remove from loopingInstances list\r\n                        _loopingInstancesIntervalCache.splice(index, 1);\r\n                        _loopingInstances.splice(index, 1);\r\n\r\n                        //correct update loop behavior\r\n                        if (_loopingInstances[_strLength] === 0 && _loopIsActive) {\r\n                            _loopIsActive = false;\r\n                            globals.autoUpdateLoop = _loopIsActive;\r\n                            if (_loopID !== undefined) {\r\n                                COMPATIBILITY.cAF()(_loopID);\r\n                                _loopID = -1;\r\n                            }\r\n                        }\r\n                    }\r\n                };\r\n            }\r\n\r\n            /**\r\n             * A object which manages the scrollbars visibility of the target element.\r\n             * @param pluginTargetElement The element from which the scrollbars shall be hidden.\r\n             * @param options The custom options.\r\n             * @param extensions The custom extensions.\r\n             * @param globals\r\n             * @param autoUpdateLoop\r\n             * @returns {*}\r\n             * @constructor\r\n             */\r\n            function OverlayScrollbarsInstance(pluginTargetElement, options, extensions, globals, autoUpdateLoop) {\r\n                //shortcuts\r\n                var type = COMPATIBILITY.type;\r\n                var inArray = FRAMEWORK.inArray;\r\n                var each = FRAMEWORK.each;\r\n\r\n                //make correct instanceof\r\n                var _base = new _plugin();\r\n                var _frameworkProto = FRAMEWORK[LEXICON.p];\r\n\r\n                //if passed element is no HTML element: skip and return\r\n                if (!isHTMLElement(pluginTargetElement))\r\n                    return;\r\n\r\n                //if passed element is already initialized: set passed options if there are any and return its instance\r\n                if (INSTANCES(pluginTargetElement)) {\r\n                    var inst = INSTANCES(pluginTargetElement);\r\n                    inst.options(options);\r\n                    return inst;\r\n                }\r\n\r\n                //globals:\r\n                var _nativeScrollbarIsOverlaid;\r\n                var _overlayScrollbarDummySize;\r\n                var _rtlScrollBehavior;\r\n                var _autoUpdateRecommended;\r\n                var _msieVersion;\r\n                var _nativeScrollbarStyling;\r\n                var _cssCalc;\r\n                var _nativeScrollbarSize;\r\n                var _supportTransition;\r\n                var _supportTransform;\r\n                var _supportPassiveEvents;\r\n                var _supportResizeObserver;\r\n                var _supportMutationObserver;\r\n                var _restrictedMeasuring;\r\n\r\n                //general readonly:\r\n                var _initialized;\r\n                var _destroyed;\r\n                var _isTextarea;\r\n                var _isBody;\r\n                var _documentMixed;\r\n                var _domExists;\r\n\r\n                //general:\r\n                var _isBorderBox;\r\n                var _sizeAutoObserverAdded;\r\n                var _paddingX;\r\n                var _paddingY;\r\n                var _borderX;\r\n                var _borderY;\r\n                var _marginX;\r\n                var _marginY;\r\n                var _isRTL;\r\n                var _sleeping;\r\n                var _contentBorderSize = {};\r\n                var _scrollHorizontalInfo = {};\r\n                var _scrollVerticalInfo = {};\r\n                var _viewportSize = {};\r\n                var _nativeScrollbarMinSize = {};\r\n\r\n                //naming:\t\r\n                var _strMinusHidden = '-hidden';\r\n                var _strMarginMinus = 'margin-';\r\n                var _strPaddingMinus = 'padding-';\r\n                var _strBorderMinus = 'border-';\r\n                var _strTop = 'top';\r\n                var _strRight = 'right';\r\n                var _strBottom = 'bottom';\r\n                var _strLeft = 'left';\r\n                var _strMinMinus = 'min-';\r\n                var _strMaxMinus = 'max-';\r\n                var _strWidth = 'width';\r\n                var _strHeight = 'height';\r\n                var _strFloat = 'float';\r\n                var _strEmpty = '';\r\n                var _strAuto = 'auto';\r\n                var _strSync = 'sync';\r\n                var _strScroll = 'scroll';\r\n                var _strHundredPercent = '100%';\r\n                var _strX = 'x';\r\n                var _strY = 'y';\r\n                var _strDot = '.';\r\n                var _strSpace = ' ';\r\n                var _strScrollbar = 'scrollbar';\r\n                var _strMinusHorizontal = '-horizontal';\r\n                var _strMinusVertical = '-vertical';\r\n                var _strScrollLeft = _strScroll + 'Left';\r\n                var _strScrollTop = _strScroll + 'Top';\r\n                var _strMouseTouchDownEvent = 'mousedown touchstart';\r\n                var _strMouseTouchUpEvent = 'mouseup touchend touchcancel';\r\n                var _strMouseTouchMoveEvent = 'mousemove touchmove';\r\n                var _strMouseEnter = 'mouseenter';\r\n                var _strMouseLeave = 'mouseleave';\r\n                var _strKeyDownEvent = 'keydown';\r\n                var _strKeyUpEvent = 'keyup';\r\n                var _strSelectStartEvent = 'selectstart';\r\n                var _strTransitionEndEvent = 'transitionend webkitTransitionEnd oTransitionEnd';\r\n                var _strResizeObserverProperty = '__overlayScrollbarsRO__';\r\n\r\n                //class names:\t\r\n                var _cassNamesPrefix = 'os-';\r\n                var _classNameHTMLElement = _cassNamesPrefix + 'html';\r\n                var _classNameHostElement = _cassNamesPrefix + 'host';\r\n                var _classNameHostElementForeign = _classNameHostElement + '-foreign';\r\n                var _classNameHostTextareaElement = _classNameHostElement + '-textarea';\r\n                var _classNameHostScrollbarHorizontalHidden = _classNameHostElement + '-' + _strScrollbar + _strMinusHorizontal + _strMinusHidden;\r\n                var _classNameHostScrollbarVerticalHidden = _classNameHostElement + '-' + _strScrollbar + _strMinusVertical + _strMinusHidden;\r\n                var _classNameHostTransition = _classNameHostElement + '-transition';\r\n                var _classNameHostRTL = _classNameHostElement + '-rtl';\r\n                var _classNameHostResizeDisabled = _classNameHostElement + '-resize-disabled';\r\n                var _classNameHostScrolling = _classNameHostElement + '-scrolling';\r\n                var _classNameHostOverflow = _classNameHostElement + '-overflow';\r\n                var _classNameHostOverflow = _classNameHostElement + '-overflow';\r\n                var _classNameHostOverflowX = _classNameHostOverflow + '-x';\r\n                var _classNameHostOverflowY = _classNameHostOverflow + '-y';\r\n                var _classNameTextareaElement = _cassNamesPrefix + 'textarea';\r\n                var _classNameTextareaCoverElement = _classNameTextareaElement + '-cover';\r\n                var _classNamePaddingElement = _cassNamesPrefix + 'padding';\r\n                var _classNameViewportElement = _cassNamesPrefix + 'viewport';\r\n                var _classNameViewportNativeScrollbarsInvisible = _classNameViewportElement + '-native-scrollbars-invisible';\r\n                var _classNameViewportNativeScrollbarsOverlaid = _classNameViewportElement + '-native-scrollbars-overlaid';\r\n                var _classNameContentElement = _cassNamesPrefix + 'content';\r\n                var _classNameContentArrangeElement = _cassNamesPrefix + 'content-arrange';\r\n                var _classNameContentGlueElement = _cassNamesPrefix + 'content-glue';\r\n                var _classNameSizeAutoObserverElement = _cassNamesPrefix + 'size-auto-observer';\r\n                var _classNameResizeObserverElement = _cassNamesPrefix + 'resize-observer';\r\n                var _classNameResizeObserverItemElement = _cassNamesPrefix + 'resize-observer-item';\r\n                var _classNameResizeObserverItemFinalElement = _classNameResizeObserverItemElement + '-final';\r\n                var _classNameTextInherit = _cassNamesPrefix + 'text-inherit';\r\n                var _classNameScrollbar = _cassNamesPrefix + _strScrollbar;\r\n                var _classNameScrollbarTrack = _classNameScrollbar + '-track';\r\n                var _classNameScrollbarTrackOff = _classNameScrollbarTrack + '-off';\r\n                var _classNameScrollbarHandle = _classNameScrollbar + '-handle';\r\n                var _classNameScrollbarHandleOff = _classNameScrollbarHandle + '-off';\r\n                var _classNameScrollbarUnusable = _classNameScrollbar + '-unusable';\r\n                var _classNameScrollbarAutoHidden = _classNameScrollbar + '-' + _strAuto + _strMinusHidden;\r\n                var _classNameScrollbarCorner = _classNameScrollbar + '-corner';\r\n                var _classNameScrollbarCornerResize = _classNameScrollbarCorner + '-resize';\r\n                var _classNameScrollbarCornerResizeB = _classNameScrollbarCornerResize + '-both';\r\n                var _classNameScrollbarCornerResizeH = _classNameScrollbarCornerResize + _strMinusHorizontal;\r\n                var _classNameScrollbarCornerResizeV = _classNameScrollbarCornerResize + _strMinusVertical;\r\n                var _classNameScrollbarHorizontal = _classNameScrollbar + _strMinusHorizontal;\r\n                var _classNameScrollbarVertical = _classNameScrollbar + _strMinusVertical;\r\n                var _classNameDragging = _cassNamesPrefix + 'dragging';\r\n                var _classNameThemeNone = _cassNamesPrefix + 'theme-none';\r\n                var _classNamesDynamicDestroy = [\r\n                    _classNameViewportNativeScrollbarsInvisible,\r\n                    _classNameViewportNativeScrollbarsOverlaid,\r\n                    _classNameScrollbarTrackOff,\r\n                    _classNameScrollbarHandleOff,\r\n                    _classNameScrollbarUnusable,\r\n                    _classNameScrollbarAutoHidden,\r\n                    _classNameScrollbarCornerResize,\r\n                    _classNameScrollbarCornerResizeB,\r\n                    _classNameScrollbarCornerResizeH,\r\n                    _classNameScrollbarCornerResizeV,\r\n                    _classNameDragging].join(_strSpace);\r\n\r\n                //callbacks:\t\r\n                var _callbacksInitQeueue = [];\r\n\r\n                //attrs viewport shall inherit from target\t\r\n                var _viewportAttrsFromTarget = [LEXICON.ti];\r\n\r\n                //options:\t\r\n                var _defaultOptions;\r\n                var _currentOptions;\r\n                var _currentPreparedOptions;\r\n\r\n                //extensions:\t\r\n                var _extensions = {};\r\n                var _extensionsPrivateMethods = 'added removed on contract';\r\n\r\n                //update\t\r\n                var _lastUpdateTime;\r\n                var _swallowedUpdateHints = {};\r\n                var _swallowedUpdateTimeout;\r\n                var _swallowUpdateLag = 42;\r\n                var _updateOnLoadEventName = 'load';\r\n                var _updateOnLoadElms = [];\r\n\r\n                //DOM elements:\t\r\n                var _windowElement;\r\n                var _documentElement;\r\n                var _htmlElement;\r\n                var _bodyElement;\r\n                var _targetElement;                     //the target element of this OverlayScrollbars object\t\r\n                var _hostElement;                       //the host element of this OverlayScrollbars object -> may be the same as targetElement\t\r\n                var _sizeAutoObserverElement;           //observes size auto changes\t\r\n                var _sizeObserverElement;               //observes size and padding changes\t\r\n                var _paddingElement;                    //manages the padding\t\r\n                var _viewportElement;                   //is the viewport of our scrollbar model\t\r\n                var _contentElement;                    //the element which holds the content\t\r\n                var _contentArrangeElement;             //is needed for correct sizing of the content element (only if native scrollbars are overlays)\t\r\n                var _contentGlueElement;                //has always the size of the content element\t\r\n                var _textareaCoverElement;              //only applied if target is a textarea element. Used for correct size calculation and for prevention of uncontrolled scrolling\t\r\n                var _scrollbarCornerElement;\r\n                var _scrollbarHorizontalElement;\r\n                var _scrollbarHorizontalTrackElement;\r\n                var _scrollbarHorizontalHandleElement;\r\n                var _scrollbarVerticalElement;\r\n                var _scrollbarVerticalTrackElement;\r\n                var _scrollbarVerticalHandleElement;\r\n                var _windowElementNative;\r\n                var _documentElementNative;\r\n                var _targetElementNative;\r\n                var _hostElementNative;\r\n                var _sizeAutoObserverElementNative;\r\n                var _sizeObserverElementNative;\r\n                var _paddingElementNative;\r\n                var _viewportElementNative;\r\n                var _contentElementNative;\r\n\r\n                //Cache:\t\r\n                var _hostSizeCache;\r\n                var _contentScrollSizeCache;\r\n                var _arrangeContentSizeCache;\r\n                var _hasOverflowCache;\r\n                var _hideOverflowCache;\r\n                var _widthAutoCache;\r\n                var _heightAutoCache;\r\n                var _cssBoxSizingCache;\r\n                var _cssPaddingCache;\r\n                var _cssBorderCache;\r\n                var _cssMarginCache;\r\n                var _cssDirectionCache;\r\n                var _cssDirectionDetectedCache;\r\n                var _paddingAbsoluteCache;\r\n                var _clipAlwaysCache;\r\n                var _contentGlueSizeCache;\r\n                var _overflowBehaviorCache;\r\n                var _overflowAmountCache;\r\n                var _ignoreOverlayScrollbarHidingCache;\r\n                var _autoUpdateCache;\r\n                var _sizeAutoCapableCache;\r\n                var _contentElementScrollSizeChangeDetectedCache;\r\n                var _hostElementSizeChangeDetectedCache;\r\n                var _scrollbarsVisibilityCache;\r\n                var _scrollbarsAutoHideCache;\r\n                var _scrollbarsClickScrollingCache;\r\n                var _scrollbarsDragScrollingCache;\r\n                var _resizeCache;\r\n                var _normalizeRTLCache;\r\n                var _classNameCache;\r\n                var _oldClassName;\r\n                var _textareaAutoWrappingCache;\r\n                var _textareaInfoCache;\r\n                var _textareaSizeCache;\r\n                var _textareaDynHeightCache;\r\n                var _textareaDynWidthCache;\r\n                var _bodyMinSizeCache;\r\n                var _updateAutoCache = {};\r\n\r\n                //MutationObserver:\t\r\n                var _mutationObserverHost;\r\n                var _mutationObserverContent;\r\n                var _mutationObserverHostCallback;\r\n                var _mutationObserverContentCallback;\r\n                var _mutationObserversConnected;\r\n                var _mutationObserverAttrsTextarea = ['wrap', 'cols', 'rows'];\r\n                var _mutationObserverAttrsHost = [LEXICON.i, LEXICON.c, LEXICON.s, 'open'].concat(_viewportAttrsFromTarget);\r\n\r\n                //events:\t\r\n                var _destroyEvents = [];\r\n\r\n                //textarea:\t\r\n                var _textareaHasFocus;\r\n\r\n                //scrollbars:\t\r\n                var _scrollbarsAutoHideTimeoutId;\r\n                var _scrollbarsAutoHideMoveTimeoutId;\r\n                var _scrollbarsAutoHideDelay;\r\n                var _scrollbarsAutoHideNever;\r\n                var _scrollbarsAutoHideScroll;\r\n                var _scrollbarsAutoHideMove;\r\n                var _scrollbarsAutoHideLeave;\r\n                var _scrollbarsHandleHovered;\r\n                var _scrollbarsHandlesDefineScrollPos;\r\n\r\n                //resize\t\r\n                var _resizeNone;\r\n                var _resizeBoth;\r\n                var _resizeHorizontal;\r\n                var _resizeVertical;\r\n\r\n\r\n                //==== Event Listener ====//\t\r\n\r\n                /**\t\r\n                 * Adds or removes a event listener from the given element. \t\r\n                 * @param element The element to which the event listener shall be applied or removed.\t\r\n                 * @param eventNames The name(s) of the events.\t\r\n                 * @param listener The method which shall be called.\t\r\n                 * @param remove True if the handler shall be removed, false or undefined if the handler shall be added.\t\r\n                 * @param passiveOrOptions The options for the event.\r\n                 */\r\n                function setupResponsiveEventListener(element, eventNames, listener, remove, passiveOrOptions) {\r\n                    var collected = COMPATIBILITY.isA(eventNames) && COMPATIBILITY.isA(listener);\r\n                    var method = remove ? 'removeEventListener' : 'addEventListener';\r\n                    var onOff = remove ? 'off' : 'on';\r\n                    var events = collected ? false : eventNames.split(_strSpace)\r\n                    var i = 0;\r\n\r\n                    var passiveOrOptionsIsObj = FRAMEWORK.isPlainObject(passiveOrOptions);\r\n                    var passive = (_supportPassiveEvents && (passiveOrOptionsIsObj ? (passiveOrOptions._passive) : passiveOrOptions)) || false;\r\n                    var capture = passiveOrOptionsIsObj && (passiveOrOptions._capture || false);\r\n                    var nativeParam = _supportPassiveEvents ? {\r\n                        passive: passive,\r\n                        capture: capture,\r\n                    } : capture;\r\n\r\n                    if (collected) {\r\n                        for (; i < eventNames[LEXICON.l]; i++)\r\n                            setupResponsiveEventListener(element, eventNames[i], listener[i], remove, passiveOrOptions);\r\n                    }\r\n                    else {\r\n                        for (; i < events[LEXICON.l]; i++) {\r\n                            if(_supportPassiveEvents) {\r\n                                element[0][method](events[i], listener, nativeParam);\r\n                            }\r\n                            else {\r\n                                element[onOff](events[i], listener);\r\n                            }     \r\n                        }\r\n                    }\r\n                }\r\n\r\n\r\n                function addDestroyEventListener(element, eventNames, listener, passive) {\r\n                    setupResponsiveEventListener(element, eventNames, listener, false, passive);\r\n                    _destroyEvents.push(COMPATIBILITY.bind(setupResponsiveEventListener, 0, element, eventNames, listener, true, passive));\r\n                }\r\n\r\n                //==== Resize Observer ====//\r\n\r\n                /**\r\n                 * Adds or removes a resize observer from the given element.\r\n                 * @param targetElement The element to which the resize observer shall be added or removed.\r\n                 * @param onElementResizedCallback The callback which is fired every time the resize observer registers a size change or false / undefined if the resizeObserver shall be removed.\r\n                 */\r\n                function setupResizeObserver(targetElement, onElementResizedCallback) {\r\n                    if (targetElement) {\r\n                        var resizeObserver = COMPATIBILITY.rO();\r\n                        var strAnimationStartEvent = 'animationstart mozAnimationStart webkitAnimationStart MSAnimationStart';\r\n                        var strChildNodes = 'childNodes';\r\n                        var constScroll = 3333333;\r\n                        var callback = function () {\r\n                            targetElement[_strScrollTop](constScroll)[_strScrollLeft](_isRTL ? _rtlScrollBehavior.n ? -constScroll : _rtlScrollBehavior.i ? 0 : constScroll : constScroll);\r\n                            onElementResizedCallback();\r\n                        };\r\n                        //add resize observer:\r\n                        if (onElementResizedCallback) {\r\n                            if (_supportResizeObserver) {\r\n                                var element = targetElement.addClass('observed').append(generateDiv(_classNameResizeObserverElement)).contents()[0];\r\n                                var observer = element[_strResizeObserverProperty] = new resizeObserver(callback);\r\n                                observer.observe(element);\r\n                            }\r\n                            else {\r\n                                if (_msieVersion > 9 || !_autoUpdateRecommended) {\r\n                                    targetElement.prepend(\r\n                                        generateDiv(_classNameResizeObserverElement,\r\n                                            generateDiv({ c: _classNameResizeObserverItemElement, dir: 'ltr' },\r\n                                                generateDiv(_classNameResizeObserverItemElement,\r\n                                                    generateDiv(_classNameResizeObserverItemFinalElement)\r\n                                                ) +\r\n                                                generateDiv(_classNameResizeObserverItemElement,\r\n                                                    generateDiv({ c: _classNameResizeObserverItemFinalElement, style: 'width: 200%; height: 200%' })\r\n                                                )\r\n                                            )\r\n                                        )\r\n                                    );\r\n\r\n                                    var observerElement = targetElement[0][strChildNodes][0][strChildNodes][0];\r\n                                    var shrinkElement = FRAMEWORK(observerElement[strChildNodes][1]);\r\n                                    var expandElement = FRAMEWORK(observerElement[strChildNodes][0]);\r\n                                    var expandElementChild = FRAMEWORK(expandElement[0][strChildNodes][0]);\r\n                                    var widthCache = observerElement[LEXICON.oW];\r\n                                    var heightCache = observerElement[LEXICON.oH];\r\n                                    var isDirty;\r\n                                    var rAFId;\r\n                                    var currWidth;\r\n                                    var currHeight;\r\n                                    var factor = 2;\r\n                                    var nativeScrollbarSize = globals.nativeScrollbarSize; //care don't make changes to this object!!!\r\n                                    var reset = function () {\r\n                                        /*\r\n                                         var sizeResetWidth = observerElement[LEXICON.oW] + nativeScrollbarSize.x * factor + nativeScrollbarSize.y * factor + _overlayScrollbarDummySize.x + _overlayScrollbarDummySize.y;\r\n                                         var sizeResetHeight = observerElement[LEXICON.oH] + nativeScrollbarSize.x * factor + nativeScrollbarSize.y * factor + _overlayScrollbarDummySize.x + _overlayScrollbarDummySize.y;\r\n                                         var expandChildCSS = {};\r\n                                         expandChildCSS[_strWidth] = sizeResetWidth;\r\n                                         expandChildCSS[_strHeight] = sizeResetHeight;\r\n                                         expandElementChild.css(expandChildCSS);\r\n\r\n\r\n                                         expandElement[_strScrollLeft](sizeResetWidth)[_strScrollTop](sizeResetHeight);\r\n                                         shrinkElement[_strScrollLeft](sizeResetWidth)[_strScrollTop](sizeResetHeight);\r\n                                         */\r\n                                        expandElement[_strScrollLeft](constScroll)[_strScrollTop](constScroll);\r\n                                        shrinkElement[_strScrollLeft](constScroll)[_strScrollTop](constScroll);\r\n                                    };\r\n                                    var onResized = function () {\r\n                                        rAFId = 0;\r\n                                        if (!isDirty)\r\n                                            return;\r\n\r\n                                        widthCache = currWidth;\r\n                                        heightCache = currHeight;\r\n                                        callback();\r\n                                    };\r\n                                    var onScroll = function (event) {\r\n                                        currWidth = observerElement[LEXICON.oW];\r\n                                        currHeight = observerElement[LEXICON.oH];\r\n                                        isDirty = currWidth != widthCache || currHeight != heightCache;\r\n\r\n                                        if (event && isDirty && !rAFId) {\r\n                                            COMPATIBILITY.cAF()(rAFId);\r\n                                            rAFId = COMPATIBILITY.rAF()(onResized);\r\n                                        }\r\n                                        else if (!event)\r\n                                            onResized();\r\n\r\n                                        reset();\r\n                                        if (event) {\r\n                                            COMPATIBILITY.prvD(event);\r\n                                            COMPATIBILITY.stpP(event);\r\n                                        }\r\n                                        return false;\r\n                                    };\r\n                                    var expandChildCSS = {};\r\n                                    var observerElementCSS = {};\r\n\r\n                                    setTopRightBottomLeft(observerElementCSS, _strEmpty, [\r\n                                        -((nativeScrollbarSize.y + 1) * factor),\r\n                                        nativeScrollbarSize.x * -factor,\r\n                                        nativeScrollbarSize.y * -factor,\r\n                                        -((nativeScrollbarSize.x + 1) * factor)\r\n                                    ]);\r\n\r\n                                    FRAMEWORK(observerElement).css(observerElementCSS);\r\n                                    expandElement.on(_strScroll, onScroll);\r\n                                    shrinkElement.on(_strScroll, onScroll);\r\n                                    targetElement.on(strAnimationStartEvent, function () {\r\n                                        onScroll(false);\r\n                                    });\r\n                                    //lets assume that the divs will never be that large and a constant value is enough\r\n                                    expandChildCSS[_strWidth] = constScroll;\r\n                                    expandChildCSS[_strHeight] = constScroll;\r\n                                    expandElementChild.css(expandChildCSS);\r\n\r\n                                    reset();\r\n                                }\r\n                                else {\r\n                                    var attachEvent = _documentElementNative.attachEvent;\r\n                                    var isIE = _msieVersion !== undefined;\r\n                                    if (attachEvent) {\r\n                                        targetElement.prepend(generateDiv(_classNameResizeObserverElement));\r\n                                        findFirst(targetElement, _strDot + _classNameResizeObserverElement)[0].attachEvent('onresize', callback);\r\n                                    }\r\n                                    else {\r\n                                        var obj = _documentElementNative.createElement(TYPES.o);\r\n                                        obj.setAttribute(LEXICON.ti, '-1');\r\n                                        obj.setAttribute(LEXICON.c, _classNameResizeObserverElement);\r\n                                        obj.onload = function () {\r\n                                            var wnd = this.contentDocument.defaultView;\r\n                                            wnd.addEventListener('resize', callback);\r\n                                            wnd.document.documentElement.style.display = 'none';\r\n                                        };\r\n                                        obj.type = 'text/html';\r\n                                        if (isIE)\r\n                                            targetElement.prepend(obj);\r\n                                        obj.data = 'about:blank';\r\n                                        if (!isIE)\r\n                                            targetElement.prepend(obj);\r\n                                        targetElement.on(strAnimationStartEvent, callback);\r\n                                    }\r\n                                }\r\n                            }\r\n\r\n                            if (targetElement[0] === _sizeObserverElementNative) {\r\n                                var directionChanged = function () {\r\n                                    var dir = _hostElement.css('direction');\r\n                                    var css = {};\r\n                                    var scrollLeftValue = 0;\r\n                                    var result = false;\r\n                                    if (dir !== _cssDirectionDetectedCache) {\r\n                                        if (dir === 'ltr') {\r\n                                            css[_strLeft] = 0;\r\n                                            css[_strRight] = _strAuto;\r\n                                            scrollLeftValue = constScroll;\r\n                                        }\r\n                                        else {\r\n                                            css[_strLeft] = _strAuto;\r\n                                            css[_strRight] = 0;\r\n                                            scrollLeftValue = _rtlScrollBehavior.n ? -constScroll : _rtlScrollBehavior.i ? 0 : constScroll;\r\n                                        }\r\n                                        //execution order is important for IE!!!\r\n                                        _sizeObserverElement.children().eq(0).css(css);\r\n                                        _sizeObserverElement[_strScrollLeft](scrollLeftValue)[_strScrollTop](constScroll);\r\n                                        _cssDirectionDetectedCache = dir;\r\n                                        result = true;\r\n                                    }\r\n                                    return result;\r\n                                };\r\n                                directionChanged();\r\n                                addDestroyEventListener(targetElement, _strScroll, function (event) {\r\n                                    if (directionChanged())\r\n                                        update();\r\n                                    COMPATIBILITY.prvD(event);\r\n                                    COMPATIBILITY.stpP(event);\r\n                                    return false;\r\n                                });\r\n                            }\r\n                        }\r\n                        //remove resize observer:\r\n                        else {\r\n                            if (_supportResizeObserver) {\r\n                                var element = targetElement.contents()[0];\r\n                                var resizeObserverObj = element[_strResizeObserverProperty];\r\n                                if (resizeObserverObj) {\r\n                                    resizeObserverObj.disconnect();\r\n                                    delete element[_strResizeObserverProperty];\r\n                                }\r\n                            }\r\n                            else {\r\n                                remove(targetElement.children(_strDot + _classNameResizeObserverElement).eq(0));\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n\r\n                /**\r\n                 * Freezes or unfreezes the given resize observer.\r\n                 * @param targetElement The element to which the target resize observer is applied.\r\n                 * @param freeze True if the resize observer shall be frozen, false otherwise.\r\n                 \r\n                function freezeResizeObserver(targetElement, freeze) {\r\n                    if (targetElement !== undefined) {\r\n                        if(freeze) {\r\n                            if (_supportResizeObserver) {\r\n                                var element = targetElement.contents()[0];\r\n                                element[_strResizeObserverProperty].unobserve(element);\r\n                            }\r\n                            else {\r\n                                targetElement = targetElement.children(_strDot + _classNameResizeObserverElement).eq(0);\r\n                                var w = targetElement.css(_strWidth);\r\n                                var h = targetElement.css(_strHeight);\r\n                                var css = {};\r\n                                css[_strWidth] = w;\r\n                                css[_strHeight] = h;\r\n                                targetElement.css(css);\r\n                            }\r\n                        }\r\n                        else {\r\n                            if (_supportResizeObserver) {\r\n                                var element = targetElement.contents()[0];\r\n                                element[_strResizeObserverProperty].observe(element);\r\n                            }\r\n                            else {\r\n                                var css = { };\r\n                                css[_strHeight] = _strEmpty;\r\n                                css[_strWidth] = _strEmpty;\r\n                                targetElement.children(_strDot + _classNameResizeObserverElement).eq(0).css(css);\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n                */\r\n\r\n\r\n                //==== Mutation Observers ====//\r\n\r\n                /**\r\n                 * Creates MutationObservers for the host and content Element if they are supported.\r\n                 */\r\n                function createMutationObservers() {\r\n                    if (_supportMutationObserver) {\r\n                        var mutationObserverContentLag = 11;\r\n                        var mutationObserver = COMPATIBILITY.mO();\r\n                        var contentLastUpdate = COMPATIBILITY.now();\r\n                        var mutationTarget;\r\n                        var mutationAttrName;\r\n                        var mutationIsClass;\r\n                        var oldMutationVal;\r\n                        var newClassVal;\r\n                        var hostClassNameRegex;\r\n                        var contentTimeout;\r\n                        var now;\r\n                        var sizeAuto;\r\n                        var action;\r\n\r\n                        _mutationObserverHostCallback = function (mutations) {\r\n\r\n                            var doUpdate = false;\r\n                            var doUpdateForce = false;\r\n                            var mutation;\r\n                            var mutatedAttrs = [];\r\n\r\n                            if (_initialized && !_sleeping) {\r\n                                each(mutations, function () {\r\n                                    mutation = this;\r\n                                    mutationTarget = mutation.target;\r\n                                    mutationAttrName = mutation.attributeName;\r\n                                    mutationIsClass = mutationAttrName === LEXICON.c;\r\n                                    oldMutationVal = mutation.oldValue;\r\n                                    newClassVal = mutationTarget.className;\r\n\r\n                                    if (_domExists && mutationIsClass && !doUpdateForce) {\r\n                                        // if old class value contains _classNameHostElementForeign and new class value doesn't\r\n                                        if (oldMutationVal.indexOf(_classNameHostElementForeign) > -1 && newClassVal.indexOf(_classNameHostElementForeign) < 0) {\r\n                                            hostClassNameRegex = createHostClassNameRegExp(true);\r\n                                            _hostElementNative.className = newClassVal.split(_strSpace).concat(oldMutationVal.split(_strSpace).filter(function (name) {\r\n                                                return name.match(hostClassNameRegex);\r\n                                            })).join(_strSpace);\r\n                                            doUpdate = doUpdateForce = true;\r\n                                        }\r\n                                    }\r\n\r\n                                    if (!doUpdate) {\r\n                                        doUpdate = mutationIsClass\r\n                                            ? hostClassNamesChanged(oldMutationVal, newClassVal)\r\n                                            : mutationAttrName === LEXICON.s\r\n                                                ? oldMutationVal !== mutationTarget[LEXICON.s].cssText\r\n                                                : true;\r\n                                    }\r\n\r\n                                    mutatedAttrs.push(mutationAttrName);\r\n                                });\r\n\r\n                                updateViewportAttrsFromTarget(mutatedAttrs);\r\n\r\n                                if (doUpdate)\r\n                                    _base.update(doUpdateForce || _strAuto);\r\n                            }\r\n                            return doUpdate;\r\n                        };\r\n                        _mutationObserverContentCallback = function (mutations) {\r\n                            var doUpdate = false;\r\n                            var mutation;\r\n\r\n                            if (_initialized && !_sleeping) {\r\n                                each(mutations, function () {\r\n                                    mutation = this;\r\n                                    doUpdate = isUnknownMutation(mutation);\r\n                                    return !doUpdate;\r\n                                });\r\n\r\n                                if (doUpdate) {\r\n                                    now = COMPATIBILITY.now();\r\n                                    sizeAuto = (_heightAutoCache || _widthAutoCache);\r\n                                    action = function () {\r\n                                        if (!_destroyed) {\r\n                                            contentLastUpdate = now;\r\n\r\n                                            //if cols, rows or wrap attr was changed\r\n                                            if (_isTextarea)\r\n                                                textareaUpdate();\r\n\r\n                                            if (sizeAuto)\r\n                                                update();\r\n                                            else\r\n                                                _base.update(_strAuto);\r\n                                        }\r\n                                    };\r\n                                    clearTimeout(contentTimeout);\r\n                                    if (mutationObserverContentLag <= 0 || now - contentLastUpdate > mutationObserverContentLag || !sizeAuto)\r\n                                        action();\r\n                                    else\r\n                                        contentTimeout = setTimeout(action, mutationObserverContentLag);\r\n                                }\r\n                            }\r\n                            return doUpdate;\r\n                        }\r\n\r\n                        _mutationObserverHost = new mutationObserver(_mutationObserverHostCallback);\r\n                        _mutationObserverContent = new mutationObserver(_mutationObserverContentCallback);\r\n                    }\r\n                }\r\n\r\n                /**\r\n                 * Connects the MutationObservers if they are supported.\r\n                 */\r\n                function connectMutationObservers() {\r\n                    if (_supportMutationObserver && !_mutationObserversConnected) {\r\n                        _mutationObserverHost.observe(_hostElementNative, {\r\n                            attributes: true,\r\n                            attributeOldValue: true,\r\n                            attributeFilter: _mutationObserverAttrsHost\r\n                        });\r\n\r\n                        _mutationObserverContent.observe(_isTextarea ? _targetElementNative : _contentElementNative, {\r\n                            attributes: true,\r\n                            attributeOldValue: true,\r\n                            subtree: !_isTextarea,\r\n                            childList: !_isTextarea,\r\n                            characterData: !_isTextarea,\r\n                            attributeFilter: _isTextarea ? _mutationObserverAttrsTextarea : _mutationObserverAttrsHost\r\n                        });\r\n\r\n                        _mutationObserversConnected = true;\r\n                    }\r\n                }\r\n\r\n                /**\r\n                 * Disconnects the MutationObservers if they are supported.\r\n                 */\r\n                function disconnectMutationObservers() {\r\n                    if (_supportMutationObserver && _mutationObserversConnected) {\r\n                        _mutationObserverHost.disconnect();\r\n                        _mutationObserverContent.disconnect();\r\n\r\n                        _mutationObserversConnected = false;\r\n                    }\r\n                }\r\n\r\n\r\n                //==== Events of elements ====//\r\n\r\n                /**\r\n                 * This method gets called every time the host element gets resized. IMPORTANT: Padding changes are detected too!!\r\n                 * It refreshes the hostResizedEventArgs and the hostSizeResizeCache.\r\n                 * If there are any size changes, the update method gets called.\r\n                 */\r\n                function hostOnResized() {\r\n                    if (!_sleeping) {\r\n                        var changed;\r\n                        var hostSize = {\r\n                            w: _sizeObserverElementNative[LEXICON.sW],\r\n                            h: _sizeObserverElementNative[LEXICON.sH]\r\n                        };\r\n\r\n                        changed = checkCache(hostSize, _hostElementSizeChangeDetectedCache);\r\n                        _hostElementSizeChangeDetectedCache = hostSize;\r\n                        if (changed)\r\n                            update({ _hostSizeChanged: true });\r\n                    }\r\n                }\r\n\r\n                /**\r\n                 * The mouse enter event of the host element. This event is only needed for the autoHide feature.\r\n                 */\r\n                function hostOnMouseEnter() {\r\n                    if (_scrollbarsAutoHideLeave)\r\n                        refreshScrollbarsAutoHide(true);\r\n                }\r\n\r\n                /**\r\n                 * The mouse leave event of the host element. This event is only needed for the autoHide feature.\r\n                 */\r\n                function hostOnMouseLeave() {\r\n                    if (_scrollbarsAutoHideLeave && !_bodyElement.hasClass(_classNameDragging))\r\n                        refreshScrollbarsAutoHide(false);\r\n                }\r\n\r\n                /**\r\n                 * The mouse move event of the host element. This event is only needed for the autoHide \"move\" feature.\r\n                 */\r\n                function hostOnMouseMove() {\r\n                    if (_scrollbarsAutoHideMove) {\r\n                        refreshScrollbarsAutoHide(true);\r\n                        clearTimeout(_scrollbarsAutoHideMoveTimeoutId);\r\n                        _scrollbarsAutoHideMoveTimeoutId = setTimeout(function () {\r\n                            if (_scrollbarsAutoHideMove && !_destroyed)\r\n                                refreshScrollbarsAutoHide(false);\r\n                        }, 100);\r\n                    }\r\n                }\r\n\r\n                /**\r\n                 * Prevents text from deselection if attached to the document element on the mousedown event of a DOM element.\r\n                 * @param event The select start event.\r\n                 */\r\n                function documentOnSelectStart(event) {\r\n                    COMPATIBILITY.prvD(event);\r\n                    return false;\r\n                }\r\n\r\n                /**\t\r\n                 * A callback which will be called after a element has loaded.\t\r\n                 */\r\n                function updateOnLoadCallback(event) {\r\n                    var elm = FRAMEWORK(event.target);\r\n\r\n                    eachUpdateOnLoad(function (i, updateOnLoadSelector) {\r\n                        if (elm.is(updateOnLoadSelector)) {\r\n                            update({ _contentSizeChanged: true });\r\n                        }\r\n                    });\r\n                }\r\n\r\n                /**\r\n                * Adds or removes mouse & touch events of the host element. (for handling auto-hiding of the scrollbars)\r\n                * @param destroy Indicates whether the events shall be added or removed.\r\n                */\r\n                function setupHostMouseTouchEvents(destroy) {\r\n                    if (!destroy)\r\n                        setupHostMouseTouchEvents(true);\r\n\r\n                    setupResponsiveEventListener(_hostElement,\r\n                        _strMouseTouchMoveEvent.split(_strSpace)[0],\r\n                        hostOnMouseMove,\r\n                        (!_scrollbarsAutoHideMove || destroy), true);\r\n                    setupResponsiveEventListener(_hostElement,\r\n                        [_strMouseEnter, _strMouseLeave],\r\n                        [hostOnMouseEnter, hostOnMouseLeave],\r\n                        (!_scrollbarsAutoHideLeave || destroy), true);\r\n\r\n                    //if the plugin is initialized and the mouse is over the host element, make the scrollbars visible\r\n                    if (!_initialized && !destroy)\r\n                        _hostElement.one('mouseover', hostOnMouseEnter);\r\n                }\r\n\r\n\r\n                //==== Update Detection ====//\r\n\r\n                /**\r\n                 * Measures the min width and min height of the body element and refreshes the related cache.\r\n                 * @returns {boolean} True if the min width or min height has changed, false otherwise.\r\n                 */\r\n                function bodyMinSizeChanged() {\r\n                    var bodyMinSize = {};\r\n                    if (_isBody && _contentArrangeElement) {\r\n                        bodyMinSize.w = parseToZeroOrNumber(_contentArrangeElement.css(_strMinMinus + _strWidth));\r\n                        bodyMinSize.h = parseToZeroOrNumber(_contentArrangeElement.css(_strMinMinus + _strHeight));\r\n                        bodyMinSize.c = checkCache(bodyMinSize, _bodyMinSizeCache);\r\n                        bodyMinSize.f = true; //flag for \"measured at least once\"\r\n                    }\r\n                    _bodyMinSizeCache = bodyMinSize;\r\n                    return !!bodyMinSize.c;\r\n                }\r\n\r\n                /**\r\n                 * Returns true if the class names really changed (new class without plugin host prefix)\r\n                 * @param oldClassNames The old ClassName string or array.\r\n                 * @param newClassNames The new ClassName string or array.\r\n                 * @returns {boolean} True if the class names has really changed, false otherwise.\r\n                 */\r\n                function hostClassNamesChanged(oldClassNames, newClassNames) {\r\n                    var currClasses = typeof newClassNames == TYPES.s ? newClassNames.split(_strSpace) : [];\r\n                    var oldClasses = typeof oldClassNames == TYPES.s ? oldClassNames.split(_strSpace) : [];\r\n                    var diff = getArrayDifferences(oldClasses, currClasses);\r\n\r\n                    // remove none theme from diff list to prevent update\r\n                    var idx = inArray(_classNameThemeNone, diff);\r\n                    var i;\r\n                    var regex;\r\n\r\n                    if (idx > -1)\r\n                        diff.splice(idx, 1);\r\n\r\n                    if (diff[LEXICON.l] > 0) {\r\n                        regex = createHostClassNameRegExp(true, true);\r\n                        for (i = 0; i < diff.length; i++) {\r\n                            if (!diff[i].match(regex)) {\r\n                                return true;\r\n                            }\r\n                        }\r\n                    }\r\n                    return false;\r\n                }\r\n\r\n                /**\r\n                 * Returns true if the given mutation is not from a from the plugin generated element. If the target element is a textarea the mutation is always unknown.\r\n                 * @param mutation The mutation which shall be checked.\r\n                 * @returns {boolean} True if the mutation is from a unknown element, false otherwise.\r\n                 */\r\n                function isUnknownMutation(mutation) {\r\n                    var attributeName = mutation.attributeName;\r\n                    var mutationTarget = mutation.target;\r\n                    var mutationType = mutation.type;\r\n                    var strClosest = 'closest';\r\n\r\n                    if (mutationTarget === _contentElementNative)\r\n                        return attributeName === null;\r\n                    if (mutationType === 'attributes' && (attributeName === LEXICON.c || attributeName === LEXICON.s) && !_isTextarea) {\r\n                        //ignore className changes by the plugin\t\r\n                        if (attributeName === LEXICON.c && FRAMEWORK(mutationTarget).hasClass(_classNameHostElement))\r\n                            return hostClassNamesChanged(mutation.oldValue, mutationTarget.className);\r\n\r\n                        //only do it of browser support it natively\t\r\n                        if (typeof mutationTarget[strClosest] != TYPES.f)\r\n                            return true;\r\n                        if (mutationTarget[strClosest](_strDot + _classNameResizeObserverElement) !== null ||\r\n                            mutationTarget[strClosest](_strDot + _classNameScrollbar) !== null ||\r\n                            mutationTarget[strClosest](_strDot + _classNameScrollbarCorner) !== null)\r\n                            return false;\r\n                    }\r\n                    return true;\r\n                }\r\n\r\n                /**\r\n                 * Returns true if the content size was changed since the last time this method was called.\r\n                 * @returns {boolean} True if the content size was changed, false otherwise.\r\n                 */\r\n                function updateAutoContentSizeChanged() {\r\n                    if (_sleeping)\r\n                        return false;\r\n\r\n                    var contentMeasureElement = getContentMeasureElement();\r\n                    var textareaValueLength = _isTextarea && _widthAutoCache && !_textareaAutoWrappingCache ? _targetElement.val().length : 0;\r\n                    var setCSS = !_mutationObserversConnected && _widthAutoCache && !_isTextarea;\r\n                    var css = {};\r\n                    var float;\r\n                    var bodyMinSizeC;\r\n                    var changed;\r\n                    var contentElementScrollSize;\r\n\r\n                    if (setCSS) {\r\n                        float = _contentElement.css(_strFloat);\r\n                        css[_strFloat] = _isRTL ? _strRight : _strLeft;\r\n                        css[_strWidth] = _strAuto;\r\n                        _contentElement.css(css);\r\n                    }\r\n                    contentElementScrollSize = {\r\n                        w: contentMeasureElement[LEXICON.sW] + textareaValueLength,\r\n                        h: contentMeasureElement[LEXICON.sH] + textareaValueLength\r\n                    };\r\n                    if (setCSS) {\r\n                        css[_strFloat] = float;\r\n                        css[_strWidth] = _strHundredPercent;\r\n                        _contentElement.css(css);\r\n                    }\r\n\r\n                    bodyMinSizeC = bodyMinSizeChanged();\r\n                    changed = checkCache(contentElementScrollSize, _contentElementScrollSizeChangeDetectedCache);\r\n\r\n                    _contentElementScrollSizeChangeDetectedCache = contentElementScrollSize;\r\n\r\n                    return changed || bodyMinSizeC;\r\n                }\r\n\r\n                /**\r\n                 * Returns true when a attribute which the MutationObserver would observe has changed.  \r\n                 * @returns {boolean} True if one of the attributes which a MutationObserver would observe has changed, false or undefined otherwise.\r\n                 */\r\n                function meaningfulAttrsChanged() {\r\n                    if (_sleeping || _mutationObserversConnected)\r\n                        return;\r\n\r\n                    var elem;\r\n                    var curr;\r\n                    var cache;\r\n                    var changedAttrs = [];\r\n                    var checks = [\r\n                        {\r\n                            _elem: _hostElement,\r\n                            _attrs: _mutationObserverAttrsHost.concat(':visible')\r\n                        },\r\n                        {\r\n                            _elem: _isTextarea ? _targetElement : undefined,\r\n                            _attrs: _mutationObserverAttrsTextarea\r\n                        }\r\n                    ];\r\n\r\n                    each(checks, function (index, check) {\r\n                        elem = check._elem;\r\n                        if (elem) {\r\n                            each(check._attrs, function (index, attr) {\r\n                                curr = attr.charAt(0) === ':' ? elem.is(attr) : elem.attr(attr);\r\n                                cache = _updateAutoCache[attr];\r\n\r\n                                if (checkCache(curr, cache)) {\r\n                                    changedAttrs.push(attr);\r\n                                }\r\n\r\n                                _updateAutoCache[attr] = curr;\r\n                            });\r\n                        }\r\n                    });\r\n\r\n                    updateViewportAttrsFromTarget(changedAttrs);\r\n\r\n                    return changedAttrs[LEXICON.l] > 0;\r\n                }\r\n\r\n                /**\r\n                 * Checks is a CSS Property of a child element is affecting the scroll size of the content.\r\n                 * @param propertyName The CSS property name.\r\n                 * @returns {boolean} True if the property is affecting the content scroll size, false otherwise.\r\n                 */\r\n                function isSizeAffectingCSSProperty(propertyName) {\r\n                    if (!_initialized)\r\n                        return true;\r\n                    var flexGrow = 'flex-grow';\r\n                    var flexShrink = 'flex-shrink';\r\n                    var flexBasis = 'flex-basis';\r\n                    var affectingPropsX = [\r\n                        _strWidth,\r\n                        _strMinMinus + _strWidth,\r\n                        _strMaxMinus + _strWidth,\r\n                        _strMarginMinus + _strLeft,\r\n                        _strMarginMinus + _strRight,\r\n                        _strLeft,\r\n                        _strRight,\r\n                        'font-weight',\r\n                        'word-spacing',\r\n                        flexGrow,\r\n                        flexShrink,\r\n                        flexBasis\r\n                    ];\r\n                    var affectingPropsXContentBox = [\r\n                        _strPaddingMinus + _strLeft,\r\n                        _strPaddingMinus + _strRight,\r\n                        _strBorderMinus + _strLeft + _strWidth,\r\n                        _strBorderMinus + _strRight + _strWidth\r\n                    ];\r\n                    var affectingPropsY = [\r\n                        _strHeight,\r\n                        _strMinMinus + _strHeight,\r\n                        _strMaxMinus + _strHeight,\r\n                        _strMarginMinus + _strTop,\r\n                        _strMarginMinus + _strBottom,\r\n                        _strTop,\r\n                        _strBottom,\r\n                        'line-height',\r\n                        flexGrow,\r\n                        flexShrink,\r\n                        flexBasis\r\n                    ];\r\n                    var affectingPropsYContentBox = [\r\n                        _strPaddingMinus + _strTop,\r\n                        _strPaddingMinus + _strBottom,\r\n                        _strBorderMinus + _strTop + _strWidth,\r\n                        _strBorderMinus + _strBottom + _strWidth\r\n                    ];\r\n                    var _strS = 's';\r\n                    var _strVS = 'v-s';\r\n                    var checkX = _overflowBehaviorCache.x === _strS || _overflowBehaviorCache.x === _strVS;\r\n                    var checkY = _overflowBehaviorCache.y === _strS || _overflowBehaviorCache.y === _strVS;\r\n                    var sizeIsAffected = false;\r\n                    var checkPropertyName = function (arr, name) {\r\n                        for (var i = 0; i < arr[LEXICON.l]; i++) {\r\n                            if (arr[i] === name)\r\n                                return true;\r\n                        }\r\n                        return false;\r\n                    };\r\n\r\n                    if (checkY) {\r\n                        sizeIsAffected = checkPropertyName(affectingPropsY, propertyName);\r\n                        if (!sizeIsAffected && !_isBorderBox)\r\n                            sizeIsAffected = checkPropertyName(affectingPropsYContentBox, propertyName);\r\n                    }\r\n                    if (checkX && !sizeIsAffected) {\r\n                        sizeIsAffected = checkPropertyName(affectingPropsX, propertyName);\r\n                        if (!sizeIsAffected && !_isBorderBox)\r\n                            sizeIsAffected = checkPropertyName(affectingPropsXContentBox, propertyName);\r\n                    }\r\n                    return sizeIsAffected;\r\n                }\r\n\r\n\r\n                //==== Update ====//\r\n\r\n                /**\r\n                 * Sets the attribute values of the viewport element to the values from the target element.\r\n                 * The value of a attribute is only set if the attribute is whitelisted.\r\n                 * @attrs attrs The array of attributes which shall be set or undefined if all whitelisted shall be set.\r\n                 */\r\n                function updateViewportAttrsFromTarget(attrs) {\r\n                    attrs = attrs || _viewportAttrsFromTarget;\r\n                    each(attrs, function (index, attr) {\r\n                        if (COMPATIBILITY.inA(attr, _viewportAttrsFromTarget) > -1) {\r\n                            var targetAttr = _targetElement.attr(attr);\r\n                            if (type(targetAttr) == TYPES.s) {\r\n                                _viewportElement.attr(attr, targetAttr);\r\n                            }\r\n                            else {\r\n                                _viewportElement.removeAttr(attr);\r\n                            }\r\n                        }\r\n                    });\r\n                }\r\n\r\n                /**\r\n                 * Updates the variables and size of the textarea element, and manages the scroll on new line or new character.\r\n                 */\r\n                function textareaUpdate() {\r\n                    if (!_sleeping) {\r\n                        var wrapAttrOff = !_textareaAutoWrappingCache;\r\n                        var minWidth = _viewportSize.w;\r\n                        var minHeight = _viewportSize.h;\r\n                        var css = {};\r\n                        var doMeasure = _widthAutoCache || wrapAttrOff;\r\n                        var origWidth;\r\n                        var width;\r\n                        var origHeight;\r\n                        var height;\r\n\r\n                        //reset min size\r\n                        css[_strMinMinus + _strWidth] = _strEmpty;\r\n                        css[_strMinMinus + _strHeight] = _strEmpty;\r\n\r\n                        //set width auto\r\n                        css[_strWidth] = _strAuto;\r\n                        _targetElement.css(css);\r\n\r\n                        //measure width\r\n                        origWidth = _targetElementNative[LEXICON.oW];\r\n                        width = doMeasure ? MATH.max(origWidth, _targetElementNative[LEXICON.sW] - 1) : 1;\r\n                        /*width += (_widthAutoCache ? _marginX + (!_isBorderBox ? wrapAttrOff ? 0 : _paddingX + _borderX : 0) : 0);*/\r\n\r\n                        //set measured width\r\n                        css[_strWidth] = _widthAutoCache ? _strAuto /*width*/ : _strHundredPercent;\r\n                        css[_strMinMinus + _strWidth] = _strHundredPercent;\r\n\r\n                        //set height auto\r\n                        css[_strHeight] = _strAuto;\r\n                        _targetElement.css(css);\r\n\r\n                        //measure height\r\n                        origHeight = _targetElementNative[LEXICON.oH];\r\n                        height = MATH.max(origHeight, _targetElementNative[LEXICON.sH] - 1);\r\n\r\n                        //append correct size values\r\n                        css[_strWidth] = width;\r\n                        css[_strHeight] = height;\r\n                        _textareaCoverElement.css(css);\r\n\r\n                        //apply min width / min height to prevent textarea collapsing\r\n                        css[_strMinMinus + _strWidth] = minWidth /*+ (!_isBorderBox && _widthAutoCache ? _paddingX + _borderX : 0)*/;\r\n                        css[_strMinMinus + _strHeight] = minHeight /*+ (!_isBorderBox && _heightAutoCache ? _paddingY + _borderY : 0)*/;\r\n                        _targetElement.css(css);\r\n\r\n                        return {\r\n                            _originalWidth: origWidth,\r\n                            _originalHeight: origHeight,\r\n                            _dynamicWidth: width,\r\n                            _dynamicHeight: height\r\n                        };\r\n                    }\r\n                }\r\n\r\n                /**\r\n                 * Updates the plugin and DOM to the current options.\r\n                 * This method should only be called if a update is 100% required.\r\n                 * @param updateHints A objects which contains hints for this update:\r\n                 * {\r\n                 *   _hostSizeChanged : boolean,\r\n                 *   _contentSizeChanged : boolean,\r\n                 *   _force : boolean,                             == preventSwallowing\r\n                 *   _changedOptions : { },                        == preventSwallowing && preventSleep\r\n                *  }\r\n                 */\r\n                function update(updateHints) {\r\n                    clearTimeout(_swallowedUpdateTimeout);\r\n                    updateHints = updateHints || {};\r\n                    _swallowedUpdateHints._hostSizeChanged |= updateHints._hostSizeChanged;\r\n                    _swallowedUpdateHints._contentSizeChanged |= updateHints._contentSizeChanged;\r\n                    _swallowedUpdateHints._force |= updateHints._force;\r\n\r\n                    var now = COMPATIBILITY.now();\r\n                    var hostSizeChanged = !!_swallowedUpdateHints._hostSizeChanged;\r\n                    var contentSizeChanged = !!_swallowedUpdateHints._contentSizeChanged;\r\n                    var force = !!_swallowedUpdateHints._force;\r\n                    var changedOptions = updateHints._changedOptions;\r\n                    var swallow = _swallowUpdateLag > 0 && _initialized && !_destroyed && !force && !changedOptions && (now - _lastUpdateTime) < _swallowUpdateLag && (!_heightAutoCache && !_widthAutoCache);\r\n                    var displayIsHidden;\r\n\r\n                    if (swallow)\r\n                        _swallowedUpdateTimeout = setTimeout(update, _swallowUpdateLag);\r\n\r\n                    //abort update due to:\r\n                    //destroyed\r\n                    //swallowing\r\n                    //sleeping\r\n                    //host is hidden or has false display\r\n                    if (_destroyed || swallow || (_sleeping && !changedOptions) || (_initialized && !force && (displayIsHidden = _hostElement.is(':hidden'))) || _hostElement.css('display') === 'inline')\r\n                        return;\r\n\r\n                    _lastUpdateTime = now;\r\n                    _swallowedUpdateHints = {};\r\n\r\n                    //if scrollbar styling is possible and native scrollbars aren't overlaid the scrollbar styling will be applied which hides the native scrollbars completely.\r\n                    if (_nativeScrollbarStyling && !(_nativeScrollbarIsOverlaid.x && _nativeScrollbarIsOverlaid.y)) {\r\n                        //native scrollbars are hidden, so change the values to zero\r\n                        _nativeScrollbarSize.x = 0;\r\n                        _nativeScrollbarSize.y = 0;\r\n                    }\r\n                    else {\r\n                        //refresh native scrollbar size (in case of zoom)\r\n                        _nativeScrollbarSize = extendDeep({}, globals.nativeScrollbarSize);\r\n                    }\r\n\r\n                    // Scrollbar padding is needed for firefox, because firefox hides scrollbar automatically if the size of the div is too small.\r\n                    // The calculation: [scrollbar size +3 *3]\r\n                    // (+3 because of possible decoration e.g. borders, margins etc., but only if native scrollbar is NOT a overlaid scrollbar)\r\n                    // (*3 because (1)increase / (2)decrease -button and (3)resize handle)\r\n                    _nativeScrollbarMinSize = {\r\n                        x: (_nativeScrollbarSize.x + (_nativeScrollbarIsOverlaid.x ? 0 : 3)) * 3,\r\n                        y: (_nativeScrollbarSize.y + (_nativeScrollbarIsOverlaid.y ? 0 : 3)) * 3\r\n                    };\r\n\r\n                    changedOptions = changedOptions || {};\r\n                    //freezeResizeObserver(_sizeObserverElement, true);\r\n                    //freezeResizeObserver(_sizeAutoObserverElement, true);\r\n\r\n                    var checkCacheAutoForce = function () {\r\n                        return checkCache.apply(this, [].slice.call(arguments).concat([force]));\r\n                    };\r\n\r\n                    //save current scroll offset\r\n                    var currScroll = {\r\n                        x: _viewportElement[_strScrollLeft](),\r\n                        y: _viewportElement[_strScrollTop]()\r\n                    };\r\n\r\n                    var currentPreparedOptionsScrollbars = _currentPreparedOptions.scrollbars;\r\n                    var currentPreparedOptionsTextarea = _currentPreparedOptions.textarea;\r\n\r\n                    //scrollbars visibility:\r\n                    var scrollbarsVisibility = currentPreparedOptionsScrollbars.visibility;\r\n                    var scrollbarsVisibilityChanged = checkCacheAutoForce(scrollbarsVisibility, _scrollbarsVisibilityCache);\r\n\r\n                    //scrollbars autoHide:\r\n                    var scrollbarsAutoHide = currentPreparedOptionsScrollbars.autoHide;\r\n                    var scrollbarsAutoHideChanged = checkCacheAutoForce(scrollbarsAutoHide, _scrollbarsAutoHideCache);\r\n\r\n                    //scrollbars click scrolling\r\n                    var scrollbarsClickScrolling = currentPreparedOptionsScrollbars.clickScrolling;\r\n                    var scrollbarsClickScrollingChanged = checkCacheAutoForce(scrollbarsClickScrolling, _scrollbarsClickScrollingCache);\r\n\r\n                    //scrollbars drag scrolling\r\n                    var scrollbarsDragScrolling = currentPreparedOptionsScrollbars.dragScrolling;\r\n                    var scrollbarsDragScrollingChanged = checkCacheAutoForce(scrollbarsDragScrolling, _scrollbarsDragScrollingCache);\r\n\r\n                    //className\r\n                    var className = _currentPreparedOptions.className;\r\n                    var classNameChanged = checkCacheAutoForce(className, _classNameCache);\r\n\r\n                    //resize\r\n                    var resize = _currentPreparedOptions.resize;\r\n                    var resizeChanged = checkCacheAutoForce(resize, _resizeCache) && !_isBody; //body can't be resized since the window itself acts as resize possibility.\r\n\r\n                    //paddingAbsolute\r\n                    var paddingAbsolute = _currentPreparedOptions.paddingAbsolute;\r\n                    var paddingAbsoluteChanged = checkCacheAutoForce(paddingAbsolute, _paddingAbsoluteCache);\r\n\r\n                    //clipAlways\r\n                    var clipAlways = _currentPreparedOptions.clipAlways;\r\n                    var clipAlwaysChanged = checkCacheAutoForce(clipAlways, _clipAlwaysCache);\r\n\r\n                    //sizeAutoCapable\r\n                    var sizeAutoCapable = _currentPreparedOptions.sizeAutoCapable && !_isBody; //body can never be size auto, because it shall be always as big as the viewport.\r\n                    var sizeAutoCapableChanged = checkCacheAutoForce(sizeAutoCapable, _sizeAutoCapableCache);\r\n\r\n                    //showNativeScrollbars\r\n                    var ignoreOverlayScrollbarHiding = _currentPreparedOptions.nativeScrollbarsOverlaid.showNativeScrollbars;\r\n                    var ignoreOverlayScrollbarHidingChanged = checkCacheAutoForce(ignoreOverlayScrollbarHiding, _ignoreOverlayScrollbarHidingCache);\r\n\r\n                    //autoUpdate\r\n                    var autoUpdate = _currentPreparedOptions.autoUpdate;\r\n                    var autoUpdateChanged = checkCacheAutoForce(autoUpdate, _autoUpdateCache);\r\n\r\n                    //overflowBehavior\r\n                    var overflowBehavior = _currentPreparedOptions.overflowBehavior;\r\n                    var overflowBehaviorChanged = checkCacheAutoForce(overflowBehavior, _overflowBehaviorCache, force);\r\n\r\n                    //dynWidth:\r\n                    var textareaDynWidth = currentPreparedOptionsTextarea.dynWidth;\r\n                    var textareaDynWidthChanged = checkCacheAutoForce(_textareaDynWidthCache, textareaDynWidth);\r\n\r\n                    //dynHeight:\r\n                    var textareaDynHeight = currentPreparedOptionsTextarea.dynHeight;\r\n                    var textareaDynHeightChanged = checkCacheAutoForce(_textareaDynHeightCache, textareaDynHeight);\r\n\r\n                    //scrollbars visibility\r\n                    _scrollbarsAutoHideNever = scrollbarsAutoHide === 'n';\r\n                    _scrollbarsAutoHideScroll = scrollbarsAutoHide === 's';\r\n                    _scrollbarsAutoHideMove = scrollbarsAutoHide === 'm';\r\n                    _scrollbarsAutoHideLeave = scrollbarsAutoHide === 'l';\r\n\r\n                    //scrollbars autoHideDelay\r\n                    _scrollbarsAutoHideDelay = currentPreparedOptionsScrollbars.autoHideDelay;\r\n\r\n                    //old className\r\n                    _oldClassName = _classNameCache;\r\n\r\n                    //resize\r\n                    _resizeNone = resize === 'n';\r\n                    _resizeBoth = resize === 'b';\r\n                    _resizeHorizontal = resize === 'h';\r\n                    _resizeVertical = resize === 'v';\r\n\r\n                    //normalizeRTL\r\n                    _normalizeRTLCache = _currentPreparedOptions.normalizeRTL;\r\n\r\n                    //ignore overlay scrollbar hiding\r\n                    ignoreOverlayScrollbarHiding = ignoreOverlayScrollbarHiding && (_nativeScrollbarIsOverlaid.x && _nativeScrollbarIsOverlaid.y);\r\n\r\n                    //refresh options cache\r\n                    _scrollbarsVisibilityCache = scrollbarsVisibility;\r\n                    _scrollbarsAutoHideCache = scrollbarsAutoHide;\r\n                    _scrollbarsClickScrollingCache = scrollbarsClickScrolling;\r\n                    _scrollbarsDragScrollingCache = scrollbarsDragScrolling;\r\n                    _classNameCache = className;\r\n                    _resizeCache = resize;\r\n                    _paddingAbsoluteCache = paddingAbsolute;\r\n                    _clipAlwaysCache = clipAlways;\r\n                    _sizeAutoCapableCache = sizeAutoCapable;\r\n                    _ignoreOverlayScrollbarHidingCache = ignoreOverlayScrollbarHiding;\r\n                    _autoUpdateCache = autoUpdate;\r\n                    _overflowBehaviorCache = extendDeep({}, overflowBehavior);\r\n                    _textareaDynWidthCache = textareaDynWidth;\r\n                    _textareaDynHeightCache = textareaDynHeight;\r\n                    _hasOverflowCache = _hasOverflowCache || { x: false, y: false };\r\n\r\n                    //set correct class name to the host element\r\n                    if (classNameChanged) {\r\n                        removeClass(_hostElement, _oldClassName + _strSpace + _classNameThemeNone);\r\n                        addClass(_hostElement, className !== undefined && className !== null && className.length > 0 ? className : _classNameThemeNone);\r\n                    }\r\n\r\n                    //set correct auto Update\r\n                    if (autoUpdateChanged) {\r\n                        if (autoUpdate === true || (autoUpdate === null && _autoUpdateRecommended)) {\r\n                            disconnectMutationObservers();\r\n                            autoUpdateLoop.add(_base);\r\n                        }\r\n                        else {\r\n                            autoUpdateLoop.remove(_base);\r\n                            connectMutationObservers();\r\n                        }\r\n                    }\r\n\r\n                    //activate or deactivate size auto capability\r\n                    if (sizeAutoCapableChanged) {\r\n                        if (sizeAutoCapable) {\r\n                            if (_contentGlueElement) {\r\n                                _contentGlueElement.show();\r\n                            }\r\n                            else {\r\n                                _contentGlueElement = FRAMEWORK(generateDiv(_classNameContentGlueElement));\r\n                                _paddingElement.before(_contentGlueElement);\r\n                            }\r\n                            if (_sizeAutoObserverAdded) {\r\n                                _sizeAutoObserverElement.show();\r\n                            }\r\n                            else {\r\n                                _sizeAutoObserverElement = FRAMEWORK(generateDiv(_classNameSizeAutoObserverElement));\r\n                                _sizeAutoObserverElementNative = _sizeAutoObserverElement[0];\r\n\r\n                                _contentGlueElement.before(_sizeAutoObserverElement);\r\n                                var oldSize = { w: -1, h: -1 };\r\n                                setupResizeObserver(_sizeAutoObserverElement, function () {\r\n                                    var newSize = {\r\n                                        w: _sizeAutoObserverElementNative[LEXICON.oW],\r\n                                        h: _sizeAutoObserverElementNative[LEXICON.oH]\r\n                                    };\r\n                                    if (checkCache(newSize, oldSize)) {\r\n                                        if (_initialized && (_heightAutoCache && newSize.h > 0) || (_widthAutoCache && newSize.w > 0)) {\r\n                                            update();\r\n                                        }\r\n                                        else if (_initialized && (!_heightAutoCache && newSize.h === 0) || (!_widthAutoCache && newSize.w === 0)) {\r\n                                            update();\r\n                                        }\r\n                                    }\r\n                                    oldSize = newSize;\r\n                                });\r\n                                _sizeAutoObserverAdded = true;\r\n                                //fix heightAuto detector bug if height is fixed but contentHeight is 0.\r\n                                //the probability this bug will ever happen is very very low, thats why its ok if we use calc which isn't supported in IE8.\r\n                                if (_cssCalc !== null)\r\n                                    _sizeAutoObserverElement.css(_strHeight, _cssCalc + '(100% + 1px)');\r\n                            }\r\n                        }\r\n                        else {\r\n                            if (_sizeAutoObserverAdded)\r\n                                _sizeAutoObserverElement.hide();\r\n                            if (_contentGlueElement)\r\n                                _contentGlueElement.hide();\r\n                        }\r\n                    }\r\n\r\n                    //if force, update all resizeObservers too\r\n                    if (force) {\r\n                        _sizeObserverElement.find('*').trigger(_strScroll);\r\n                        if (_sizeAutoObserverAdded)\r\n                            _sizeAutoObserverElement.find('*').trigger(_strScroll);\r\n                    }\r\n\r\n                    //display hidden:\r\n                    displayIsHidden = displayIsHidden === undefined ? _hostElement.is(':hidden') : displayIsHidden;\r\n\r\n                    //textarea AutoWrapping:\r\n                    var textareaAutoWrapping = _isTextarea ? _targetElement.attr('wrap') !== 'off' : false;\r\n                    var textareaAutoWrappingChanged = checkCacheAutoForce(textareaAutoWrapping, _textareaAutoWrappingCache);\r\n\r\n                    //detect direction:\r\n                    var cssDirection = _hostElement.css('direction');\r\n                    var cssDirectionChanged = checkCacheAutoForce(cssDirection, _cssDirectionCache);\r\n\r\n                    //detect box-sizing:\r\n                    var boxSizing = _hostElement.css('box-sizing');\r\n                    var boxSizingChanged = checkCacheAutoForce(boxSizing, _cssBoxSizingCache);\r\n\r\n                    //detect padding:\r\n                    var padding = getTopRightBottomLeftHost(_strPaddingMinus);\r\n\r\n                    //width + height auto detecting var:\r\n                    var sizeAutoObserverElementBCRect;\r\n                    //exception occurs in IE8 sometimes (unknown exception)\r\n                    try {\r\n                        sizeAutoObserverElementBCRect = _sizeAutoObserverAdded ? _sizeAutoObserverElementNative[LEXICON.bCR]() : null;\r\n                    } catch (ex) {\r\n                        return;\r\n                    }\r\n\r\n                    _isRTL = cssDirection === 'rtl';\r\n                    _isBorderBox = (boxSizing === 'border-box');\r\n                    var isRTLLeft = _isRTL ? _strLeft : _strRight;\r\n                    var isRTLRight = _isRTL ? _strRight : _strLeft;\r\n\r\n                    //detect width auto:\r\n                    var widthAutoResizeDetection = false;\r\n                    var widthAutoObserverDetection = (_sizeAutoObserverAdded && (_hostElement.css(_strFloat) !== 'none' /*|| _isTextarea */)) ? (MATH.round(sizeAutoObserverElementBCRect.right - sizeAutoObserverElementBCRect.left) === 0) && (!paddingAbsolute ? (_hostElementNative[LEXICON.cW] - _paddingX) > 0 : true) : false;\r\n                    if (sizeAutoCapable && !widthAutoObserverDetection) {\r\n                        var tmpCurrHostWidth = _hostElementNative[LEXICON.oW];\r\n                        var tmpCurrContentGlueWidth = _contentGlueElement.css(_strWidth);\r\n                        _contentGlueElement.css(_strWidth, _strAuto);\r\n\r\n                        var tmpNewHostWidth = _hostElementNative[LEXICON.oW];\r\n                        _contentGlueElement.css(_strWidth, tmpCurrContentGlueWidth);\r\n                        widthAutoResizeDetection = tmpCurrHostWidth !== tmpNewHostWidth;\r\n                        if (!widthAutoResizeDetection) {\r\n                            _contentGlueElement.css(_strWidth, tmpCurrHostWidth + 1);\r\n                            tmpNewHostWidth = _hostElementNative[LEXICON.oW];\r\n                            _contentGlueElement.css(_strWidth, tmpCurrContentGlueWidth);\r\n                            widthAutoResizeDetection = tmpCurrHostWidth !== tmpNewHostWidth;\r\n                        }\r\n                    }\r\n                    var widthAuto = (widthAutoObserverDetection || widthAutoResizeDetection) && sizeAutoCapable && !displayIsHidden;\r\n                    var widthAutoChanged = checkCacheAutoForce(widthAuto, _widthAutoCache);\r\n                    var wasWidthAuto = !widthAuto && _widthAutoCache;\r\n\r\n                    //detect height auto:\r\n                    var heightAuto = _sizeAutoObserverAdded && sizeAutoCapable && !displayIsHidden ? (MATH.round(sizeAutoObserverElementBCRect.bottom - sizeAutoObserverElementBCRect.top) === 0) /* && (!paddingAbsolute && (_msieVersion > 9 || !_msieVersion) ? true : true) */ : false;\r\n                    var heightAutoChanged = checkCacheAutoForce(heightAuto, _heightAutoCache);\r\n                    var wasHeightAuto = !heightAuto && _heightAutoCache;\r\n\r\n                    //detect border:\r\n                    //we need the border only if border box and auto size\r\n                    var updateBorderX = (widthAuto && _isBorderBox) || !_isBorderBox;\r\n                    var updateBorderY = (heightAuto && _isBorderBox) || !_isBorderBox;\r\n                    var border = getTopRightBottomLeftHost(_strBorderMinus, '-' + _strWidth, !updateBorderX, !updateBorderY)\r\n\r\n                    //detect margin:\r\n                    var margin = getTopRightBottomLeftHost(_strMarginMinus);\r\n\r\n                    //vars to apply correct css\r\n                    var contentElementCSS = {};\r\n                    var contentGlueElementCSS = {};\r\n\r\n                    //funcs\r\n                    var getHostSize = function () {\r\n                        //has to be clientSize because offsetSize respect borders\r\n                        return {\r\n                            w: _hostElementNative[LEXICON.cW],\r\n                            h: _hostElementNative[LEXICON.cH]\r\n                        };\r\n                    };\r\n                    var getViewportSize = function () {\r\n                        //viewport size is padding container because it never has padding, margin and a border\r\n                        //determine zoom rounding error -> sometimes scrollWidth/Height is smaller than clientWidth/Height\r\n                        //if this happens add the difference to the viewportSize to compensate the rounding error\r\n                        return {\r\n                            w: _paddingElementNative[LEXICON.oW] + MATH.max(0, _contentElementNative[LEXICON.cW] - _contentElementNative[LEXICON.sW]),\r\n                            h: _paddingElementNative[LEXICON.oH] + MATH.max(0, _contentElementNative[LEXICON.cH] - _contentElementNative[LEXICON.sH])\r\n                        };\r\n                    };\r\n\r\n                    //set info for padding\r\n                    var paddingAbsoluteX = _paddingX = padding.l + padding.r;\r\n                    var paddingAbsoluteY = _paddingY = padding.t + padding.b;\r\n                    paddingAbsoluteX *= paddingAbsolute ? 1 : 0;\r\n                    paddingAbsoluteY *= paddingAbsolute ? 1 : 0;\r\n                    padding.c = checkCacheAutoForce(padding, _cssPaddingCache);\r\n\r\n                    //set info for border\r\n                    _borderX = border.l + border.r;\r\n                    _borderY = border.t + border.b;\r\n                    border.c = checkCacheAutoForce(border, _cssBorderCache);\r\n\r\n                    //set info for margin\r\n                    _marginX = margin.l + margin.r;\r\n                    _marginY = margin.t + margin.b;\r\n                    margin.c = checkCacheAutoForce(margin, _cssMarginCache);\r\n\r\n                    //refresh cache\r\n                    _textareaAutoWrappingCache = textareaAutoWrapping;\r\n                    _cssDirectionCache = cssDirection;\r\n                    _cssBoxSizingCache = boxSizing;\r\n                    _widthAutoCache = widthAuto;\r\n                    _heightAutoCache = heightAuto;\r\n                    _cssPaddingCache = padding;\r\n                    _cssBorderCache = border;\r\n                    _cssMarginCache = margin;\r\n\r\n                    //IEFix direction changed\r\n                    if (cssDirectionChanged && _sizeAutoObserverAdded)\r\n                        _sizeAutoObserverElement.css(_strFloat, isRTLRight);\r\n\r\n                    //apply padding:\r\n                    if (padding.c || cssDirectionChanged || paddingAbsoluteChanged || widthAutoChanged || heightAutoChanged || boxSizingChanged || sizeAutoCapableChanged) {\r\n                        var paddingElementCSS = {};\r\n                        var textareaCSS = {};\r\n                        var paddingValues = [padding.t, padding.r, padding.b, padding.l];\r\n\r\n                        setTopRightBottomLeft(contentGlueElementCSS, _strMarginMinus, [-padding.t, -padding.r, -padding.b, -padding.l]);\r\n                        if (paddingAbsolute) {\r\n                            setTopRightBottomLeft(paddingElementCSS, _strEmpty, paddingValues);\r\n                            setTopRightBottomLeft(_isTextarea ? textareaCSS : contentElementCSS, _strPaddingMinus);\r\n                        }\r\n                        else {\r\n                            setTopRightBottomLeft(paddingElementCSS, _strEmpty);\r\n                            setTopRightBottomLeft(_isTextarea ? textareaCSS : contentElementCSS, _strPaddingMinus, paddingValues);\r\n                        }\r\n\r\n                        _paddingElement.css(paddingElementCSS);\r\n                        _targetElement.css(textareaCSS);\r\n                    }\r\n\r\n                    //viewport size is padding container because it never has padding, margin and a border.\r\n                    _viewportSize = getViewportSize();\r\n\r\n                    //update Textarea\r\n                    var textareaSize = _isTextarea ? textareaUpdate() : false;\r\n                    var textareaSizeChanged = _isTextarea && checkCacheAutoForce(textareaSize, _textareaSizeCache);\r\n                    var textareaDynOrigSize = _isTextarea && textareaSize ? {\r\n                        w: textareaDynWidth ? textareaSize._dynamicWidth : textareaSize._originalWidth,\r\n                        h: textareaDynHeight ? textareaSize._dynamicHeight : textareaSize._originalHeight\r\n                    } : {};\r\n                    _textareaSizeCache = textareaSize;\r\n\r\n                    //fix height auto / width auto in cooperation with current padding & boxSizing behavior:\r\n                    if (heightAuto && (heightAutoChanged || paddingAbsoluteChanged || boxSizingChanged || padding.c || border.c)) {\r\n                        contentElementCSS[_strHeight] = _strAuto;\r\n                    }\r\n                    else if (heightAutoChanged || paddingAbsoluteChanged) {\r\n                        contentElementCSS[_strHeight] = _strHundredPercent;\r\n                    }\r\n                    if (widthAuto && (widthAutoChanged || paddingAbsoluteChanged || boxSizingChanged || padding.c || border.c || cssDirectionChanged)) {\r\n                        contentElementCSS[_strWidth] = _strAuto;\r\n                        contentGlueElementCSS[_strMaxMinus + _strWidth] = _strHundredPercent; //IE Fix\r\n                    }\r\n                    else if (widthAutoChanged || paddingAbsoluteChanged) {\r\n                        contentElementCSS[_strWidth] = _strHundredPercent;\r\n                        contentElementCSS[_strFloat] = _strEmpty;\r\n                        contentGlueElementCSS[_strMaxMinus + _strWidth] = _strEmpty; //IE Fix\r\n                    }\r\n                    if (widthAuto) {\r\n                        //textareaDynOrigSize.w || _strAuto :: doesnt works because applied margin will shift width\r\n                        contentGlueElementCSS[_strWidth] = _strAuto;\r\n\r\n                        contentElementCSS[_strWidth] = VENDORS._cssPropertyValue(_strWidth, 'max-content intrinsic') || _strAuto;\r\n                        contentElementCSS[_strFloat] = isRTLRight;\r\n                    }\r\n                    else {\r\n                        contentGlueElementCSS[_strWidth] = _strEmpty;\r\n                    }\r\n                    if (heightAuto) {\r\n                        //textareaDynOrigSize.h || _contentElementNative[LEXICON.cH] :: use for anti scroll jumping\r\n                        contentGlueElementCSS[_strHeight] = textareaDynOrigSize.h || _contentElementNative[LEXICON.cH];\r\n                    }\r\n                    else {\r\n                        contentGlueElementCSS[_strHeight] = _strEmpty;\r\n                    }\r\n                    if (sizeAutoCapable)\r\n                        _contentGlueElement.css(contentGlueElementCSS);\r\n                    _contentElement.css(contentElementCSS);\r\n\r\n                    //CHECKPOINT HERE ~\r\n                    contentElementCSS = {};\r\n                    contentGlueElementCSS = {};\r\n\r\n                    //if [content(host) client / scroll size, or target element direction, or content(host) max-sizes] changed, or force is true\r\n                    if (hostSizeChanged || contentSizeChanged || textareaSizeChanged || cssDirectionChanged || boxSizingChanged || paddingAbsoluteChanged || widthAutoChanged || widthAuto || heightAutoChanged || heightAuto || ignoreOverlayScrollbarHidingChanged || overflowBehaviorChanged || clipAlwaysChanged || resizeChanged || scrollbarsVisibilityChanged || scrollbarsAutoHideChanged || scrollbarsDragScrollingChanged || scrollbarsClickScrollingChanged || textareaDynWidthChanged || textareaDynHeightChanged || textareaAutoWrappingChanged) {\r\n                        var strOverflow = 'overflow';\r\n                        var strOverflowX = strOverflow + '-x';\r\n                        var strOverflowY = strOverflow + '-y';\r\n                        var strHidden = 'hidden';\r\n                        var strVisible = 'visible';\r\n\r\n                        //Reset the viewport (very important for natively overlaid scrollbars and zoom change\r\n                        //don't change the overflow prop as it is very expensive and affects performance !A LOT!\r\n                        if (!_nativeScrollbarStyling) {\r\n                            var viewportElementResetCSS = {};\r\n                            var resetXTmp = _hasOverflowCache.y && _hideOverflowCache.ys && !ignoreOverlayScrollbarHiding ? (_nativeScrollbarIsOverlaid.y ? _viewportElement.css(isRTLLeft) : -_nativeScrollbarSize.y) : 0;\r\n                            var resetBottomTmp = _hasOverflowCache.x && _hideOverflowCache.xs && !ignoreOverlayScrollbarHiding ? (_nativeScrollbarIsOverlaid.x ? _viewportElement.css(_strBottom) : -_nativeScrollbarSize.x) : 0;\r\n                            setTopRightBottomLeft(viewportElementResetCSS, _strEmpty);\r\n                            _viewportElement.css(viewportElementResetCSS);\r\n                        }\r\n\r\n                        //measure several sizes:\r\n                        var contentMeasureElement = getContentMeasureElement();\r\n                        //in Firefox content element has to have overflow hidden, else element margins aren't calculated properly, this element prevents this bug, but only if scrollbars aren't overlaid\r\n                        var contentSize = {\r\n                            //use clientSize because natively overlaidScrollbars add borders\r\n                            w: textareaDynOrigSize.w || contentMeasureElement[LEXICON.cW],\r\n                            h: textareaDynOrigSize.h || contentMeasureElement[LEXICON.cH]\r\n                        };\r\n                        var scrollSize = {\r\n                            w: contentMeasureElement[LEXICON.sW],\r\n                            h: contentMeasureElement[LEXICON.sH]\r\n                        };\r\n\r\n                        //apply the correct viewport style and measure viewport size\r\n                        if (!_nativeScrollbarStyling) {\r\n                            viewportElementResetCSS[_strBottom] = wasHeightAuto ? _strEmpty : resetBottomTmp;\r\n                            viewportElementResetCSS[isRTLLeft] = wasWidthAuto ? _strEmpty : resetXTmp;\r\n                            _viewportElement.css(viewportElementResetCSS);\r\n                        }\r\n                        _viewportSize = getViewportSize();\r\n\r\n                        //measure and correct several sizes\r\n                        var hostSize = getHostSize();\r\n                        var hostAbsoluteRectSize = {\r\n                            w: hostSize.w - _marginX - _borderX - (_isBorderBox ? 0 : _paddingX),\r\n                            h: hostSize.h - _marginY - _borderY - (_isBorderBox ? 0 : _paddingY)\r\n                        };\r\n                        var contentGlueSize = {\r\n                            //client/scrollSize + AbsolutePadding -> because padding is only applied to the paddingElement if its absolute, so you have to add it manually\r\n                            //hostSize is clientSize -> so padding should be added manually, right? FALSE! Because content glue is inside hostElement, so we don't have to worry about padding\r\n                            w: MATH.max((widthAuto ? contentSize.w : scrollSize.w) + paddingAbsoluteX, hostAbsoluteRectSize.w),\r\n                            h: MATH.max((heightAuto ? contentSize.h : scrollSize.h) + paddingAbsoluteY, hostAbsoluteRectSize.h)\r\n                        };\r\n                        contentGlueSize.c = checkCacheAutoForce(contentGlueSize, _contentGlueSizeCache);\r\n                        _contentGlueSizeCache = contentGlueSize;\r\n\r\n                        //apply correct contentGlue size\r\n                        if (sizeAutoCapable) {\r\n                            //size contentGlue correctly to make sure the element has correct size if the sizing switches to auto\r\n                            if (contentGlueSize.c || (heightAuto || widthAuto)) {\r\n                                contentGlueElementCSS[_strWidth] = contentGlueSize.w;\r\n                                contentGlueElementCSS[_strHeight] = contentGlueSize.h;\r\n\r\n                                //textarea-sizes are already calculated correctly at this point\r\n                                if (!_isTextarea) {\r\n                                    contentSize = {\r\n                                        //use clientSize because natively overlaidScrollbars add borders\r\n                                        w: contentMeasureElement[LEXICON.cW],\r\n                                        h: contentMeasureElement[LEXICON.cH]\r\n                                    };\r\n                                }\r\n                            }\r\n                            var textareaCoverCSS = {};\r\n                            var setContentGlueElementCSSfunction = function (horizontal) {\r\n                                var scrollbarVars = getScrollbarVars(horizontal);\r\n                                var wh = scrollbarVars._w_h;\r\n                                var strWH = scrollbarVars._width_height;\r\n                                var autoSize = horizontal ? widthAuto : heightAuto;\r\n                                var borderSize = horizontal ? _borderX : _borderY;\r\n                                var paddingSize = horizontal ? _paddingX : _paddingY;\r\n                                var marginSize = horizontal ? _marginX : _marginY;\r\n                                var viewportSize = _viewportSize[wh] - borderSize - marginSize - (_isBorderBox ? 0 : paddingSize);\r\n\r\n                                //make contentGlue size -1 if element is not auto sized, to make sure that a resize event happens when the element shrinks\r\n                                if (!autoSize || (!autoSize && border.c))\r\n                                    contentGlueElementCSS[strWH] = hostAbsoluteRectSize[wh] - 1;\r\n\r\n                                //if size is auto and host is smaller than size as min size, make content glue size -1 to make sure size changes will be detected (this is only needed if padding is 0)\r\n                                if (autoSize && (contentSize[wh] < viewportSize) && (horizontal && _isTextarea ? !textareaAutoWrapping : true)) {\r\n                                    if (_isTextarea)\r\n                                        textareaCoverCSS[strWH] = parseToZeroOrNumber(_textareaCoverElement.css(strWH)) - 1;\r\n                                    contentGlueElementCSS[strWH] -= 1;\r\n                                }\r\n\r\n                                //make sure content glue size is at least 1\r\n                                if (contentSize[wh] > 0)\r\n                                    contentGlueElementCSS[strWH] = MATH.max(1, contentGlueElementCSS[strWH]);\r\n                            };\r\n                            setContentGlueElementCSSfunction(true);\r\n                            setContentGlueElementCSSfunction(false);\r\n\r\n                            if (_isTextarea)\r\n                                _textareaCoverElement.css(textareaCoverCSS);\r\n                            _contentGlueElement.css(contentGlueElementCSS);\r\n                        }\r\n                        if (widthAuto)\r\n                            contentElementCSS[_strWidth] = _strHundredPercent;\r\n                        if (widthAuto && !_isBorderBox && !_mutationObserversConnected)\r\n                            contentElementCSS[_strFloat] = 'none';\r\n\r\n                        //apply and reset content style\r\n                        _contentElement.css(contentElementCSS);\r\n                        contentElementCSS = {};\r\n\r\n                        //measure again, but this time all correct sizes:\r\n                        var contentScrollSize = {\r\n                            w: contentMeasureElement[LEXICON.sW],\r\n                            h: contentMeasureElement[LEXICON.sH],\r\n                        };\r\n                        contentScrollSize.c = contentSizeChanged = checkCacheAutoForce(contentScrollSize, _contentScrollSizeCache);\r\n                        _contentScrollSizeCache = contentScrollSize;\r\n\r\n                        //refresh viewport size after correct measuring\r\n                        _viewportSize = getViewportSize();\r\n\r\n                        hostSize = getHostSize();\r\n                        hostSizeChanged = checkCacheAutoForce(hostSize, _hostSizeCache);\r\n                        _hostSizeCache = hostSize;\r\n\r\n                        var hideOverflowForceTextarea = _isTextarea && (_viewportSize.w === 0 || _viewportSize.h === 0);\r\n                        var previousOverflowAmount = _overflowAmountCache;\r\n                        var overflowBehaviorIsVS = {};\r\n                        var overflowBehaviorIsVH = {};\r\n                        var overflowBehaviorIsS = {};\r\n                        var overflowAmount = {};\r\n                        var hasOverflow = {};\r\n                        var hideOverflow = {};\r\n                        var canScroll = {};\r\n                        var viewportRect = _paddingElementNative[LEXICON.bCR]();\r\n                        var setOverflowVariables = function (horizontal) {\r\n                            var scrollbarVars = getScrollbarVars(horizontal);\r\n                            var scrollbarVarsInverted = getScrollbarVars(!horizontal);\r\n                            var xyI = scrollbarVarsInverted._x_y;\r\n                            var xy = scrollbarVars._x_y;\r\n                            var wh = scrollbarVars._w_h;\r\n                            var widthHeight = scrollbarVars._width_height;\r\n                            var scrollMax = _strScroll + scrollbarVars._Left_Top + 'Max';\r\n                            var fractionalOverflowAmount = viewportRect[widthHeight] ? MATH.abs(viewportRect[widthHeight] - _viewportSize[wh]) : 0;\r\n                            var checkFractionalOverflowAmount = previousOverflowAmount && previousOverflowAmount[xy] > 0 && _viewportElementNative[scrollMax] === 0;\r\n                            overflowBehaviorIsVS[xy] = overflowBehavior[xy] === 'v-s';\r\n                            overflowBehaviorIsVH[xy] = overflowBehavior[xy] === 'v-h';\r\n                            overflowBehaviorIsS[xy] = overflowBehavior[xy] === 's';\r\n                            overflowAmount[xy] = MATH.max(0, MATH.round((contentScrollSize[wh] - _viewportSize[wh]) * 100) / 100);\r\n                            overflowAmount[xy] *= (hideOverflowForceTextarea || (checkFractionalOverflowAmount && fractionalOverflowAmount > 0 && fractionalOverflowAmount < 1)) ? 0 : 1;\r\n                            hasOverflow[xy] = overflowAmount[xy] > 0;\r\n\r\n                            //hideOverflow:\r\n                            //x || y : true === overflow is hidden by \"overflow: scroll\" OR \"overflow: hidden\"\r\n                            //xs || ys : true === overflow is hidden by \"overflow: scroll\"\r\n                            hideOverflow[xy] = overflowBehaviorIsVS[xy] || overflowBehaviorIsVH[xy] ? (hasOverflow[xyI] && !overflowBehaviorIsVS[xyI] && !overflowBehaviorIsVH[xyI]) : hasOverflow[xy];\r\n                            hideOverflow[xy + 's'] = hideOverflow[xy] ? (overflowBehaviorIsS[xy] || overflowBehaviorIsVS[xy]) : false;\r\n\r\n                            canScroll[xy] = hasOverflow[xy] && hideOverflow[xy + 's'];\r\n                        };\r\n                        setOverflowVariables(true);\r\n                        setOverflowVariables(false);\r\n\r\n                        overflowAmount.c = checkCacheAutoForce(overflowAmount, _overflowAmountCache);\r\n                        _overflowAmountCache = overflowAmount;\r\n                        hasOverflow.c = checkCacheAutoForce(hasOverflow, _hasOverflowCache);\r\n                        _hasOverflowCache = hasOverflow;\r\n                        hideOverflow.c = checkCacheAutoForce(hideOverflow, _hideOverflowCache);\r\n                        _hideOverflowCache = hideOverflow;\r\n\r\n                        //if native scrollbar is overlay at x OR y axis, prepare DOM\r\n                        if (_nativeScrollbarIsOverlaid.x || _nativeScrollbarIsOverlaid.y) {\r\n                            var borderDesign = 'px solid transparent';\r\n                            var contentArrangeElementCSS = {};\r\n                            var arrangeContent = {};\r\n                            var arrangeChanged = force;\r\n                            var setContentElementCSS;\r\n\r\n                            if (hasOverflow.x || hasOverflow.y) {\r\n                                arrangeContent.w = _nativeScrollbarIsOverlaid.y && hasOverflow.y ? contentScrollSize.w + _overlayScrollbarDummySize.y : _strEmpty;\r\n                                arrangeContent.h = _nativeScrollbarIsOverlaid.x && hasOverflow.x ? contentScrollSize.h + _overlayScrollbarDummySize.x : _strEmpty;\r\n                                arrangeChanged = checkCacheAutoForce(arrangeContent, _arrangeContentSizeCache);\r\n                                _arrangeContentSizeCache = arrangeContent;\r\n                            }\r\n\r\n                            if (hasOverflow.c || hideOverflow.c || contentScrollSize.c || cssDirectionChanged || widthAutoChanged || heightAutoChanged || widthAuto || heightAuto || ignoreOverlayScrollbarHidingChanged) {\r\n                                contentElementCSS[_strMarginMinus + isRTLRight] = contentElementCSS[_strBorderMinus + isRTLRight] = _strEmpty;\r\n                                setContentElementCSS = function (horizontal) {\r\n                                    var scrollbarVars = getScrollbarVars(horizontal);\r\n                                    var scrollbarVarsInverted = getScrollbarVars(!horizontal);\r\n                                    var xy = scrollbarVars._x_y;\r\n                                    var strDirection = horizontal ? _strBottom : isRTLLeft;\r\n                                    var invertedAutoSize = horizontal ? heightAuto : widthAuto;\r\n\r\n                                    if (_nativeScrollbarIsOverlaid[xy] && hasOverflow[xy] && hideOverflow[xy + 's']) {\r\n                                        contentElementCSS[_strMarginMinus + strDirection] = invertedAutoSize ? (ignoreOverlayScrollbarHiding ? _strEmpty : _overlayScrollbarDummySize[xy]) : _strEmpty;\r\n                                        contentElementCSS[_strBorderMinus + strDirection] = ((horizontal ? !invertedAutoSize : true) && !ignoreOverlayScrollbarHiding) ? (_overlayScrollbarDummySize[xy] + borderDesign) : _strEmpty;\r\n                                    }\r\n                                    else {\r\n                                        arrangeContent[scrollbarVarsInverted._w_h] =\r\n                                            contentElementCSS[_strMarginMinus + strDirection] =\r\n                                            contentElementCSS[_strBorderMinus + strDirection] = _strEmpty;\r\n                                        arrangeChanged = true;\r\n                                    }\r\n                                };\r\n\r\n                                if (_nativeScrollbarStyling) {\r\n                                    addRemoveClass(_viewportElement, _classNameViewportNativeScrollbarsInvisible, !ignoreOverlayScrollbarHiding)\r\n                                }\r\n                                else {\r\n                                    setContentElementCSS(true);\r\n                                    setContentElementCSS(false);\r\n                                }\r\n                            }\r\n                            if (ignoreOverlayScrollbarHiding) {\r\n                                arrangeContent.w = arrangeContent.h = _strEmpty;\r\n                                arrangeChanged = true;\r\n                            }\r\n                            if (arrangeChanged && !_nativeScrollbarStyling) {\r\n                                contentArrangeElementCSS[_strWidth] = hideOverflow.y ? arrangeContent.w : _strEmpty;\r\n                                contentArrangeElementCSS[_strHeight] = hideOverflow.x ? arrangeContent.h : _strEmpty;\r\n\r\n                                if (!_contentArrangeElement) {\r\n                                    _contentArrangeElement = FRAMEWORK(generateDiv(_classNameContentArrangeElement));\r\n                                    _viewportElement.prepend(_contentArrangeElement);\r\n                                }\r\n                                _contentArrangeElement.css(contentArrangeElementCSS);\r\n                            }\r\n                            _contentElement.css(contentElementCSS);\r\n                        }\r\n\r\n                        var viewportElementCSS = {};\r\n                        var paddingElementCSS = {};\r\n                        var setViewportCSS;\r\n                        if (hostSizeChanged || hasOverflow.c || hideOverflow.c || contentScrollSize.c || overflowBehaviorChanged || boxSizingChanged || ignoreOverlayScrollbarHidingChanged || cssDirectionChanged || clipAlwaysChanged || heightAutoChanged) {\r\n                            viewportElementCSS[isRTLRight] = _strEmpty;\r\n                            setViewportCSS = function (horizontal) {\r\n                                var scrollbarVars = getScrollbarVars(horizontal);\r\n                                var scrollbarVarsInverted = getScrollbarVars(!horizontal);\r\n                                var xy = scrollbarVars._x_y;\r\n                                var XY = scrollbarVars._X_Y;\r\n                                var strDirection = horizontal ? _strBottom : isRTLLeft;\r\n\r\n                                var reset = function () {\r\n                                    viewportElementCSS[strDirection] = _strEmpty;\r\n                                    _contentBorderSize[scrollbarVarsInverted._w_h] = 0;\r\n                                };\r\n                                if (hasOverflow[xy] && hideOverflow[xy + 's']) {\r\n                                    viewportElementCSS[strOverflow + XY] = _strScroll;\r\n                                    if (ignoreOverlayScrollbarHiding || _nativeScrollbarStyling) {\r\n                                        reset();\r\n                                    }\r\n                                    else {\r\n                                        viewportElementCSS[strDirection] = -(_nativeScrollbarIsOverlaid[xy] ? _overlayScrollbarDummySize[xy] : _nativeScrollbarSize[xy]);\r\n                                        _contentBorderSize[scrollbarVarsInverted._w_h] = _nativeScrollbarIsOverlaid[xy] ? _overlayScrollbarDummySize[scrollbarVarsInverted._x_y] : 0;\r\n                                    }\r\n                                } else {\r\n                                    viewportElementCSS[strOverflow + XY] = _strEmpty;\r\n                                    reset();\r\n                                }\r\n                            };\r\n                            setViewportCSS(true);\r\n                            setViewportCSS(false);\r\n\r\n                            // if the scroll container is too small and if there is any overflow with no overlay scrollbar (and scrollbar styling isn't possible), \r\n                            // make viewport element greater in size (Firefox hide Scrollbars fix)\r\n                            // because firefox starts hiding scrollbars on too small elements\r\n                            // with this behavior the overflow calculation may be incorrect or the scrollbars would appear suddenly\r\n                            // https://bugzilla.mozilla.org/show_bug.cgi?id=292284\r\n                            if (!_nativeScrollbarStyling\r\n                                && (_viewportSize.h < _nativeScrollbarMinSize.x || _viewportSize.w < _nativeScrollbarMinSize.y)\r\n                                && ((hasOverflow.x && hideOverflow.x && !_nativeScrollbarIsOverlaid.x) || (hasOverflow.y && hideOverflow.y && !_nativeScrollbarIsOverlaid.y))) {\r\n                                viewportElementCSS[_strPaddingMinus + _strTop] = _nativeScrollbarMinSize.x;\r\n                                viewportElementCSS[_strMarginMinus + _strTop] = -_nativeScrollbarMinSize.x;\r\n\r\n                                viewportElementCSS[_strPaddingMinus + isRTLRight] = _nativeScrollbarMinSize.y;\r\n                                viewportElementCSS[_strMarginMinus + isRTLRight] = -_nativeScrollbarMinSize.y;\r\n                            }\r\n                            else {\r\n                                viewportElementCSS[_strPaddingMinus + _strTop] =\r\n                                    viewportElementCSS[_strMarginMinus + _strTop] =\r\n                                    viewportElementCSS[_strPaddingMinus + isRTLRight] =\r\n                                    viewportElementCSS[_strMarginMinus + isRTLRight] = _strEmpty;\r\n                            }\r\n                            viewportElementCSS[_strPaddingMinus + isRTLLeft] =\r\n                                viewportElementCSS[_strMarginMinus + isRTLLeft] = _strEmpty;\r\n\r\n                            //if there is any overflow (x OR y axis) and this overflow shall be hidden, make overflow hidden, else overflow visible\r\n                            if ((hasOverflow.x && hideOverflow.x) || (hasOverflow.y && hideOverflow.y) || hideOverflowForceTextarea) {\r\n                                //only hide if is Textarea\r\n                                if (_isTextarea && hideOverflowForceTextarea) {\r\n                                    paddingElementCSS[strOverflowX] =\r\n                                        paddingElementCSS[strOverflowY] = strHidden;\r\n                                }\r\n                            }\r\n                            else {\r\n                                if (!clipAlways || (overflowBehaviorIsVH.x || overflowBehaviorIsVS.x || overflowBehaviorIsVH.y || overflowBehaviorIsVS.y)) {\r\n                                    //only un-hide if Textarea\r\n                                    if (_isTextarea) {\r\n                                        paddingElementCSS[strOverflowX] =\r\n                                            paddingElementCSS[strOverflowY] = _strEmpty;\r\n                                    }\r\n                                    viewportElementCSS[strOverflowX] =\r\n                                        viewportElementCSS[strOverflowY] = strVisible;\r\n                                }\r\n                            }\r\n\r\n                            _paddingElement.css(paddingElementCSS);\r\n                            _viewportElement.css(viewportElementCSS);\r\n                            viewportElementCSS = {};\r\n\r\n                            //force soft redraw in webkit because without the scrollbars will may appear because DOM wont be redrawn under special conditions\r\n                            if ((hasOverflow.c || boxSizingChanged || widthAutoChanged || heightAutoChanged) && !(_nativeScrollbarIsOverlaid.x && _nativeScrollbarIsOverlaid.y)) {\r\n                                var elementStyle = _contentElementNative[LEXICON.s];\r\n                                var dump;\r\n                                elementStyle.webkitTransform = 'scale(1)';\r\n                                elementStyle.display = 'run-in';\r\n                                dump = _contentElementNative[LEXICON.oH];\r\n                                elementStyle.display = _strEmpty; //|| dump; //use dump to prevent it from deletion if minify\r\n                                elementStyle.webkitTransform = _strEmpty;\r\n                            }\r\n                            /*\r\n                            //force hard redraw in webkit if native overlaid scrollbars shall appear\r\n                            if (ignoreOverlayScrollbarHidingChanged && ignoreOverlayScrollbarHiding) {\r\n                                _hostElement.hide();\r\n                                var dump = _hostElementNative[LEXICON.oH];\r\n                                _hostElement.show();\r\n                            }\r\n                            */\r\n                        }\r\n\r\n                        //change to direction RTL and width auto Bugfix in Webkit\r\n                        //without this fix, the DOM still thinks the scrollbar is LTR and thus the content is shifted to the left\r\n                        contentElementCSS = {};\r\n                        if (cssDirectionChanged || widthAutoChanged || heightAutoChanged) {\r\n                            if (_isRTL && widthAuto) {\r\n                                var floatTmp = _contentElement.css(_strFloat);\r\n                                var posLeftWithoutFloat = MATH.round(_contentElement.css(_strFloat, _strEmpty).css(_strLeft, _strEmpty).position().left);\r\n                                _contentElement.css(_strFloat, floatTmp);\r\n                                var posLeftWithFloat = MATH.round(_contentElement.position().left);\r\n\r\n                                if (posLeftWithoutFloat !== posLeftWithFloat)\r\n                                    contentElementCSS[_strLeft] = posLeftWithoutFloat;\r\n                            }\r\n                            else {\r\n                                contentElementCSS[_strLeft] = _strEmpty;\r\n                            }\r\n                        }\r\n                        _contentElement.css(contentElementCSS);\r\n\r\n                        //handle scroll position\r\n                        if (_isTextarea && contentSizeChanged) {\r\n                            var textareaInfo = getTextareaInfo();\r\n                            if (textareaInfo) {\r\n                                var textareaRowsChanged = _textareaInfoCache === undefined ? true : textareaInfo._rows !== _textareaInfoCache._rows;\r\n                                var cursorRow = textareaInfo._cursorRow;\r\n                                var cursorCol = textareaInfo._cursorColumn;\r\n                                var widestRow = textareaInfo._widestRow;\r\n                                var lastRow = textareaInfo._rows;\r\n                                var lastCol = textareaInfo._columns;\r\n                                var cursorPos = textareaInfo._cursorPosition;\r\n                                var cursorMax = textareaInfo._cursorMax;\r\n                                var cursorIsLastPosition = (cursorPos >= cursorMax && _textareaHasFocus);\r\n                                var textareaScrollAmount = {\r\n                                    x: (!textareaAutoWrapping && (cursorCol === lastCol && cursorRow === widestRow)) ? _overflowAmountCache.x : -1,\r\n                                    y: (textareaAutoWrapping ? cursorIsLastPosition || textareaRowsChanged && (previousOverflowAmount ? (currScroll.y === previousOverflowAmount.y) : false) : (cursorIsLastPosition || textareaRowsChanged) && cursorRow === lastRow) ? _overflowAmountCache.y : -1\r\n                                };\r\n                                currScroll.x = textareaScrollAmount.x > -1 ? (_isRTL && _normalizeRTLCache && _rtlScrollBehavior.i ? 0 : textareaScrollAmount.x) : currScroll.x; //if inverted, scroll to 0 -> normalized this means to max scroll offset.\r\n                                currScroll.y = textareaScrollAmount.y > -1 ? textareaScrollAmount.y : currScroll.y;\r\n                            }\r\n                            _textareaInfoCache = textareaInfo;\r\n                        }\r\n                        if (_isRTL && _rtlScrollBehavior.i && _nativeScrollbarIsOverlaid.y && hasOverflow.x && _normalizeRTLCache)\r\n                            currScroll.x += _contentBorderSize.w || 0;\r\n                        if (widthAuto)\r\n                            _hostElement[_strScrollLeft](0);\r\n                        if (heightAuto)\r\n                            _hostElement[_strScrollTop](0);\r\n                        _viewportElement[_strScrollLeft](currScroll.x)[_strScrollTop](currScroll.y);\r\n\r\n                        //scrollbars management:\r\n                        var scrollbarsVisibilityVisible = scrollbarsVisibility === 'v';\r\n                        var scrollbarsVisibilityHidden = scrollbarsVisibility === 'h';\r\n                        var scrollbarsVisibilityAuto = scrollbarsVisibility === 'a';\r\n                        var refreshScrollbarsVisibility = function (showX, showY) {\r\n                            showY = showY === undefined ? showX : showY;\r\n                            refreshScrollbarAppearance(true, showX, canScroll.x)\r\n                            refreshScrollbarAppearance(false, showY, canScroll.y)\r\n                        };\r\n\r\n                        //manage class name which indicates scrollable overflow\r\n                        addRemoveClass(_hostElement, _classNameHostOverflow, hideOverflow.x || hideOverflow.y);\r\n                        addRemoveClass(_hostElement, _classNameHostOverflowX, hideOverflow.x);\r\n                        addRemoveClass(_hostElement, _classNameHostOverflowY, hideOverflow.y);\r\n\r\n                        //add or remove rtl class name for styling purposes except when its body, then the scrollbar stays\r\n                        if (cssDirectionChanged && !_isBody) {\r\n                            addRemoveClass(_hostElement, _classNameHostRTL, _isRTL);\r\n                        }\r\n\r\n                        //manage the resize feature (CSS3 resize \"polyfill\" for this plugin)\r\n                        if (_isBody)\r\n                            addClass(_hostElement, _classNameHostResizeDisabled);\r\n                        if (resizeChanged) {\r\n                            addRemoveClass(_hostElement, _classNameHostResizeDisabled, _resizeNone);\r\n                            addRemoveClass(_scrollbarCornerElement, _classNameScrollbarCornerResize, !_resizeNone);\r\n                            addRemoveClass(_scrollbarCornerElement, _classNameScrollbarCornerResizeB, _resizeBoth);\r\n                            addRemoveClass(_scrollbarCornerElement, _classNameScrollbarCornerResizeH, _resizeHorizontal);\r\n                            addRemoveClass(_scrollbarCornerElement, _classNameScrollbarCornerResizeV, _resizeVertical);\r\n                        }\r\n\r\n                        //manage the scrollbars general visibility + the scrollbar interactivity (unusable class name)\r\n                        if (scrollbarsVisibilityChanged || overflowBehaviorChanged || hideOverflow.c || hasOverflow.c || ignoreOverlayScrollbarHidingChanged) {\r\n                            if (ignoreOverlayScrollbarHiding) {\r\n                                if (ignoreOverlayScrollbarHidingChanged) {\r\n                                    removeClass(_hostElement, _classNameHostScrolling);\r\n                                    if (ignoreOverlayScrollbarHiding) {\r\n                                        refreshScrollbarsVisibility(false);\r\n                                    }\r\n                                }\r\n                            }\r\n                            else if (scrollbarsVisibilityAuto) {\r\n                                refreshScrollbarsVisibility(canScroll.x, canScroll.y);\r\n                            }\r\n                            else if (scrollbarsVisibilityVisible) {\r\n                                refreshScrollbarsVisibility(true);\r\n                            }\r\n                            else if (scrollbarsVisibilityHidden) {\r\n                                refreshScrollbarsVisibility(false);\r\n                            }\r\n                        }\r\n\r\n                        //manage the scrollbars auto hide feature (auto hide them after specific actions)\r\n                        if (scrollbarsAutoHideChanged || ignoreOverlayScrollbarHidingChanged) {\r\n                            setupHostMouseTouchEvents(!_scrollbarsAutoHideLeave && !_scrollbarsAutoHideMove);\r\n                            refreshScrollbarsAutoHide(_scrollbarsAutoHideNever, !_scrollbarsAutoHideNever);\r\n                        }\r\n\r\n                        //manage scrollbars handle length & offset - don't remove!\r\n                        if (hostSizeChanged || overflowAmount.c || heightAutoChanged || widthAutoChanged || resizeChanged || boxSizingChanged || paddingAbsoluteChanged || ignoreOverlayScrollbarHidingChanged || cssDirectionChanged) {\r\n                            refreshScrollbarHandleLength(true);\r\n                            refreshScrollbarHandleOffset(true);\r\n                            refreshScrollbarHandleLength(false);\r\n                            refreshScrollbarHandleOffset(false);\r\n                        }\r\n\r\n                        //manage interactivity\r\n                        if (scrollbarsClickScrollingChanged)\r\n                            refreshScrollbarsInteractive(true, scrollbarsClickScrolling);\r\n                        if (scrollbarsDragScrollingChanged)\r\n                            refreshScrollbarsInteractive(false, scrollbarsDragScrolling);\r\n\r\n                        //callbacks:\r\n                        dispatchCallback('onDirectionChanged', {\r\n                            isRTL: _isRTL,\r\n                            dir: cssDirection\r\n                        }, cssDirectionChanged);\r\n                        dispatchCallback('onHostSizeChanged', {\r\n                            width: _hostSizeCache.w,\r\n                            height: _hostSizeCache.h\r\n                        }, hostSizeChanged);\r\n                        dispatchCallback('onContentSizeChanged', {\r\n                            width: _contentScrollSizeCache.w,\r\n                            height: _contentScrollSizeCache.h\r\n                        }, contentSizeChanged);\r\n                        dispatchCallback('onOverflowChanged', {\r\n                            x: hasOverflow.x,\r\n                            y: hasOverflow.y,\r\n                            xScrollable: hideOverflow.xs,\r\n                            yScrollable: hideOverflow.ys,\r\n                            clipped: hideOverflow.x || hideOverflow.y\r\n                        }, hasOverflow.c || hideOverflow.c);\r\n                        dispatchCallback('onOverflowAmountChanged', {\r\n                            x: overflowAmount.x,\r\n                            y: overflowAmount.y\r\n                        }, overflowAmount.c);\r\n                    }\r\n\r\n                    //fix body min size\r\n                    if (_isBody && _bodyMinSizeCache && (_hasOverflowCache.c || _bodyMinSizeCache.c)) {\r\n                        //its possible that no min size was measured until now, because the content arrange element was just added now, in this case, measure now the min size.\r\n                        if (!_bodyMinSizeCache.f)\r\n                            bodyMinSizeChanged();\r\n                        if (_nativeScrollbarIsOverlaid.y && _hasOverflowCache.x)\r\n                            _contentElement.css(_strMinMinus + _strWidth, _bodyMinSizeCache.w + _overlayScrollbarDummySize.y);\r\n                        if (_nativeScrollbarIsOverlaid.x && _hasOverflowCache.y)\r\n                            _contentElement.css(_strMinMinus + _strHeight, _bodyMinSizeCache.h + _overlayScrollbarDummySize.x);\r\n                        _bodyMinSizeCache.c = false;\r\n                    }\r\n\r\n                    if (_initialized && changedOptions.updateOnLoad) {\r\n                        updateElementsOnLoad();\r\n                    }\r\n\r\n                    //freezeResizeObserver(_sizeObserverElement, false);\r\n                    //freezeResizeObserver(_sizeAutoObserverElement, false);\r\n\r\n                    dispatchCallback('onUpdated', { forced: force });\r\n                }\r\n\r\n                /**\r\n                 * Updates the found elements of which the load event shall be handled.\r\n                 */\r\n                function updateElementsOnLoad() {\r\n                    if (!_isTextarea) {\r\n                        eachUpdateOnLoad(function (i, updateOnLoadSelector) {\r\n                            _contentElement.find(updateOnLoadSelector).each(function (i, el) {\r\n                                // if element doesn't have a updateOnLoadCallback applied\r\n                                if (COMPATIBILITY.inA(el, _updateOnLoadElms) < 0) {\r\n                                    _updateOnLoadElms.push(el);\r\n                                    FRAMEWORK(el)\r\n                                        .off(_updateOnLoadEventName, updateOnLoadCallback)\r\n                                        .on(_updateOnLoadEventName, updateOnLoadCallback);\r\n                                }\r\n                            });\r\n                        });\r\n                    }\r\n                }\r\n\r\n                //==== Options ====//\r\n\r\n                /**\r\n                 * Sets new options but doesn't call the update method.\r\n                 * @param newOptions The object which contains the new options.\r\n                 * @returns {*} A object which contains the changed options.\r\n                 */\r\n                function setOptions(newOptions) {\r\n                    var validatedOpts = _pluginsOptions._validate(newOptions, _pluginsOptions._template, true, _currentOptions)\r\n\r\n                    _currentOptions = extendDeep({}, _currentOptions, validatedOpts._default);\r\n                    _currentPreparedOptions = extendDeep({}, _currentPreparedOptions, validatedOpts._prepared);\r\n\r\n                    return validatedOpts._prepared;\r\n                }\r\n\r\n\r\n                //==== Structure ====//\r\n\r\n                /**\r\n                 * Builds or destroys the wrapper and helper DOM elements.\r\n                 * @param destroy Indicates whether the DOM shall be build or destroyed.\r\n                 */\r\n                /**\r\n                 * Builds or destroys the wrapper and helper DOM elements.\r\n                 * @param destroy Indicates whether the DOM shall be build or destroyed.\r\n                 */\r\n                function setupStructureDOM(destroy) {\r\n                    var strParent = 'parent';\r\n                    var classNameResizeObserverHost = 'os-resize-observer-host';\r\n                    var classNameTextareaElementFull = _classNameTextareaElement + _strSpace + _classNameTextInherit;\r\n                    var textareaClass = _isTextarea ? _strSpace + _classNameTextInherit : _strEmpty;\r\n                    var adoptAttrs = _currentPreparedOptions.textarea.inheritedAttrs;\r\n                    var adoptAttrsMap = {};\r\n                    var applyAdoptedAttrs = function () {\r\n                        var applyAdoptedAttrsElm = destroy ? _targetElement : _hostElement;\r\n                        each(adoptAttrsMap, function (key, value) {\r\n                            if (type(value) == TYPES.s) {\r\n                                if (key == LEXICON.c)\r\n                                    applyAdoptedAttrsElm.addClass(value);\r\n                                else\r\n                                    applyAdoptedAttrsElm.attr(key, value);\r\n                            }\r\n                        });\r\n                    };\r\n                    var hostElementClassNames = [\r\n                        _classNameHostElement,\r\n                        _classNameHostElementForeign,\r\n                        _classNameHostTextareaElement,\r\n                        _classNameHostResizeDisabled,\r\n                        _classNameHostRTL,\r\n                        _classNameHostScrollbarHorizontalHidden,\r\n                        _classNameHostScrollbarVerticalHidden,\r\n                        _classNameHostTransition,\r\n                        _classNameHostScrolling,\r\n                        _classNameHostOverflow,\r\n                        _classNameHostOverflowX,\r\n                        _classNameHostOverflowY,\r\n                        _classNameThemeNone,\r\n                        _classNameTextareaElement,\r\n                        _classNameTextInherit,\r\n                        _classNameCache].join(_strSpace);\r\n                    var hostElementCSS = {};\r\n\r\n                    //get host element as first element, because that's the most upper element and required for the other elements\r\n                    _hostElement = _hostElement || (_isTextarea ? (_domExists ? _targetElement[strParent]()[strParent]()[strParent]()[strParent]() : FRAMEWORK(generateDiv(_classNameHostTextareaElement))) : _targetElement);\r\n                    _contentElement = _contentElement || selectOrGenerateDivByClass(_classNameContentElement + textareaClass);\r\n                    _viewportElement = _viewportElement || selectOrGenerateDivByClass(_classNameViewportElement + textareaClass);\r\n                    _paddingElement = _paddingElement || selectOrGenerateDivByClass(_classNamePaddingElement + textareaClass);\r\n                    _sizeObserverElement = _sizeObserverElement || selectOrGenerateDivByClass(classNameResizeObserverHost);\r\n                    _textareaCoverElement = _textareaCoverElement || (_isTextarea ? selectOrGenerateDivByClass(_classNameTextareaCoverElement) : undefined);\r\n\r\n                    //add this class to workaround class changing issues with UI frameworks especially Vue\r\n                    if (_domExists)\r\n                        addClass(_hostElement, _classNameHostElementForeign);\r\n\r\n                    //on destroy, remove all generated class names from the host element before collecting the adopted attributes \r\n                    //to prevent adopting generated class names\r\n                    if (destroy)\r\n                        removeClass(_hostElement, hostElementClassNames);\r\n\r\n                    //collect all adopted attributes\r\n                    adoptAttrs = type(adoptAttrs) == TYPES.s ? adoptAttrs.split(_strSpace) : adoptAttrs;\r\n                    if (COMPATIBILITY.isA(adoptAttrs) && _isTextarea) {\r\n                        each(adoptAttrs, function (i, v) {\r\n                            if (type(v) == TYPES.s) {\r\n                                adoptAttrsMap[v] = destroy ? _hostElement.attr(v) : _targetElement.attr(v);\r\n                            }\r\n                        });\r\n                    }\r\n\r\n                    if (!destroy) {\r\n                        if (_isTextarea) {\r\n                            if (!_currentPreparedOptions.sizeAutoCapable) {\r\n                                hostElementCSS[_strWidth] = _targetElement.css(_strWidth);\r\n                                hostElementCSS[_strHeight] = _targetElement.css(_strHeight);\r\n                            }\r\n\r\n                            if (!_domExists)\r\n                                _targetElement.addClass(_classNameTextInherit).wrap(_hostElement);\r\n\r\n                            //jQuery clones elements in wrap functions, so we have to select them again\r\n                            _hostElement = _targetElement[strParent]().css(hostElementCSS);\r\n                        }\r\n\r\n                        if (!_domExists) {\r\n                            //add the correct class to the target element\r\n                            addClass(_targetElement, _isTextarea ? classNameTextareaElementFull : _classNameHostElement);\r\n\r\n                            //wrap the content into the generated elements to create the required DOM\r\n                            _hostElement.wrapInner(_contentElement)\r\n                                .wrapInner(_viewportElement)\r\n                                .wrapInner(_paddingElement)\r\n                                .prepend(_sizeObserverElement);\r\n\r\n                            //jQuery clones elements in wrap functions, so we have to select them again\r\n                            _contentElement = findFirst(_hostElement, _strDot + _classNameContentElement);\r\n                            _viewportElement = findFirst(_hostElement, _strDot + _classNameViewportElement);\r\n                            _paddingElement = findFirst(_hostElement, _strDot + _classNamePaddingElement);\r\n\r\n                            if (_isTextarea) {\r\n                                _contentElement.prepend(_textareaCoverElement);\r\n                                applyAdoptedAttrs();\r\n                            }\r\n                        }\r\n\r\n                        if (_nativeScrollbarStyling)\r\n                            addClass(_viewportElement, _classNameViewportNativeScrollbarsInvisible);\r\n                        if (_nativeScrollbarIsOverlaid.x && _nativeScrollbarIsOverlaid.y)\r\n                            addClass(_viewportElement, _classNameViewportNativeScrollbarsOverlaid);\r\n                        if (_isBody)\r\n                            addClass(_htmlElement, _classNameHTMLElement);\r\n\r\n                        _sizeObserverElementNative = _sizeObserverElement[0];\r\n                        _hostElementNative = _hostElement[0];\r\n                        _paddingElementNative = _paddingElement[0];\r\n                        _viewportElementNative = _viewportElement[0];\r\n                        _contentElementNative = _contentElement[0];\r\n\r\n                        updateViewportAttrsFromTarget();\r\n                    }\r\n                    else {\r\n                        if (_domExists && _initialized) {\r\n                            //clear size observer\r\n                            _sizeObserverElement.children().remove();\r\n\r\n                            //remove the style property and classes from already generated elements\r\n                            each([_paddingElement, _viewportElement, _contentElement, _textareaCoverElement], function (i, elm) {\r\n                                if (elm) {\r\n                                    removeClass(elm.removeAttr(LEXICON.s), _classNamesDynamicDestroy);\r\n                                }\r\n                            });\r\n\r\n                            //add classes to the host element which was removed previously to match the expected DOM\r\n                            addClass(_hostElement, _isTextarea ? _classNameHostTextareaElement : _classNameHostElement);\r\n                        }\r\n                        else {\r\n                            //remove size observer\r\n                            remove(_sizeObserverElement);\r\n\r\n                            //unwrap the content to restore DOM\r\n                            _contentElement.contents()\r\n                                .unwrap()\r\n                                .unwrap()\r\n                                .unwrap();\r\n\r\n                            if (_isTextarea) {\r\n                                _targetElement.unwrap();\r\n                                remove(_hostElement);\r\n                                remove(_textareaCoverElement);\r\n                                applyAdoptedAttrs();\r\n                            }\r\n                        }\r\n\r\n                        if (_isTextarea)\r\n                            _targetElement.removeAttr(LEXICON.s);\r\n\r\n                        if (_isBody)\r\n                            removeClass(_htmlElement, _classNameHTMLElement);\r\n                    }\r\n                }\r\n\r\n                /**\r\n                 * Adds or removes all wrapper elements interactivity events.\r\n                 * @param destroy Indicates whether the Events shall be added or removed.\r\n                 */\r\n                function setupStructureEvents() {\r\n                    var textareaKeyDownRestrictedKeyCodes = [\r\n                        112, 113, 114, 115, 116, 117, 118, 119, 120, 121, 123,    //F1 to F12\r\n                        33, 34,                                                   //page up, page down\r\n                        37, 38, 39, 40,                                           //left, up, right, down arrows\r\n                        16, 17, 18, 19, 20, 144                                   //Shift, Ctrl, Alt, Pause, CapsLock, NumLock\r\n                    ];\r\n                    var textareaKeyDownKeyCodesList = [];\r\n                    var textareaUpdateIntervalID;\r\n                    var scrollStopTimeoutId;\r\n                    var scrollStopDelay = 175;\r\n                    var strFocus = 'focus';\r\n\r\n                    function updateTextarea(doClearInterval) {\r\n                        textareaUpdate();\r\n                        _base.update(_strAuto);\r\n                        if (doClearInterval && _autoUpdateRecommended)\r\n                            clearInterval(textareaUpdateIntervalID);\r\n                    }\r\n                    function textareaOnScroll(event) {\r\n                        _targetElement[_strScrollLeft](_rtlScrollBehavior.i && _normalizeRTLCache ? 9999999 : 0);\r\n                        _targetElement[_strScrollTop](0);\r\n                        COMPATIBILITY.prvD(event);\r\n                        COMPATIBILITY.stpP(event);\r\n                        return false;\r\n                    }\r\n                    function textareaOnDrop(event) {\r\n                        setTimeout(function () {\r\n                            if (!_destroyed)\r\n                                updateTextarea();\r\n                        }, 50);\r\n                    }\r\n                    function textareaOnFocus() {\r\n                        _textareaHasFocus = true;\r\n                        addClass(_hostElement, strFocus);\r\n                    }\r\n                    function textareaOnFocusout() {\r\n                        _textareaHasFocus = false;\r\n                        textareaKeyDownKeyCodesList = [];\r\n                        removeClass(_hostElement, strFocus);\r\n                        updateTextarea(true);\r\n                    }\r\n                    function textareaOnKeyDown(event) {\r\n                        var keyCode = event.keyCode;\r\n\r\n                        if (inArray(keyCode, textareaKeyDownRestrictedKeyCodes) < 0) {\r\n                            if (!textareaKeyDownKeyCodesList[LEXICON.l]) {\r\n                                updateTextarea();\r\n                                textareaUpdateIntervalID = setInterval(updateTextarea, 1000 / 60);\r\n                            }\r\n                            if (inArray(keyCode, textareaKeyDownKeyCodesList) < 0)\r\n                                textareaKeyDownKeyCodesList.push(keyCode);\r\n                        }\r\n                    }\r\n                    function textareaOnKeyUp(event) {\r\n                        var keyCode = event.keyCode;\r\n                        var index = inArray(keyCode, textareaKeyDownKeyCodesList);\r\n\r\n                        if (inArray(keyCode, textareaKeyDownRestrictedKeyCodes) < 0) {\r\n                            if (index > -1)\r\n                                textareaKeyDownKeyCodesList.splice(index, 1);\r\n                            if (!textareaKeyDownKeyCodesList[LEXICON.l])\r\n                                updateTextarea(true);\r\n                        }\r\n                    }\r\n                    function contentOnTransitionEnd(event) {\r\n                        if (_autoUpdateCache === true)\r\n                            return;\r\n                        event = event.originalEvent || event;\r\n                        if (isSizeAffectingCSSProperty(event.propertyName))\r\n                            _base.update(_strAuto);\r\n                    }\r\n                    function viewportOnScroll(event) {\r\n                        if (!_sleeping) {\r\n                            if (scrollStopTimeoutId !== undefined)\r\n                                clearTimeout(scrollStopTimeoutId);\r\n                            else {\r\n                                if (_scrollbarsAutoHideScroll || _scrollbarsAutoHideMove)\r\n                                    refreshScrollbarsAutoHide(true);\r\n\r\n                                if (!nativeOverlayScrollbarsAreActive())\r\n                                    addClass(_hostElement, _classNameHostScrolling);\r\n\r\n                                dispatchCallback('onScrollStart', event);\r\n                            }\r\n\r\n                            //if a scrollbars handle gets dragged, the mousemove event is responsible for refreshing the handle offset\r\n                            //because if CSS scroll-snap is used, the handle offset gets only refreshed on every snap point\r\n                            //this looks laggy & clunky, it looks much better if the offset refreshes with the mousemove\r\n                            if (!_scrollbarsHandlesDefineScrollPos) {\r\n                                refreshScrollbarHandleOffset(true);\r\n                                refreshScrollbarHandleOffset(false);\r\n                            }\r\n                            dispatchCallback('onScroll', event);\r\n\r\n                            scrollStopTimeoutId = setTimeout(function () {\r\n                                if (!_destroyed) {\r\n                                    //OnScrollStop:\r\n                                    clearTimeout(scrollStopTimeoutId);\r\n                                    scrollStopTimeoutId = undefined;\r\n\r\n                                    if (_scrollbarsAutoHideScroll || _scrollbarsAutoHideMove)\r\n                                        refreshScrollbarsAutoHide(false);\r\n\r\n                                    if (!nativeOverlayScrollbarsAreActive())\r\n                                        removeClass(_hostElement, _classNameHostScrolling);\r\n\r\n                                    dispatchCallback('onScrollStop', event);\r\n                                }\r\n                            }, scrollStopDelay);\r\n                        }\r\n                    }\r\n\r\n\r\n                    if (_isTextarea) {\r\n                        if (_msieVersion > 9 || !_autoUpdateRecommended) {\r\n                            addDestroyEventListener(_targetElement, 'input', updateTextarea);\r\n                        }\r\n                        else {\r\n                            addDestroyEventListener(_targetElement,\r\n                                [_strKeyDownEvent, _strKeyUpEvent],\r\n                                [textareaOnKeyDown, textareaOnKeyUp]);\r\n                        }\r\n\r\n                        addDestroyEventListener(_targetElement,\r\n                            [_strScroll, 'drop', strFocus, strFocus + 'out'],\r\n                            [textareaOnScroll, textareaOnDrop, textareaOnFocus, textareaOnFocusout]);\r\n                    }\r\n                    else {\r\n                        addDestroyEventListener(_contentElement, _strTransitionEndEvent, contentOnTransitionEnd);\r\n                    }\r\n                    addDestroyEventListener(_viewportElement, _strScroll, viewportOnScroll, true);\r\n                }\r\n\r\n\r\n                //==== Scrollbars ====//\r\n\r\n                /**\r\n                 * Builds or destroys all scrollbar DOM elements (scrollbar, track, handle)\r\n                 * @param destroy Indicates whether the DOM shall be build or destroyed.\r\n                 */\r\n                function setupScrollbarsDOM(destroy) {\r\n                    var selectOrGenerateScrollbarDOM = function (isHorizontal) {\r\n                        var scrollbarClassName = isHorizontal ? _classNameScrollbarHorizontal : _classNameScrollbarVertical;\r\n                        var scrollbar = selectOrGenerateDivByClass(_classNameScrollbar + _strSpace + scrollbarClassName, true);\r\n                        var track = selectOrGenerateDivByClass(_classNameScrollbarTrack, scrollbar);\r\n                        var handle = selectOrGenerateDivByClass(_classNameScrollbarHandle, scrollbar);\r\n\r\n                        if (!_domExists && !destroy) {\r\n                            scrollbar.append(track);\r\n                            track.append(handle);\r\n                        }\r\n\r\n                        return {\r\n                            _scrollbar: scrollbar,\r\n                            _track: track,\r\n                            _handle: handle\r\n                        };\r\n                    };\r\n                    function resetScrollbarDOM(isHorizontal) {\r\n                        var scrollbarVars = getScrollbarVars(isHorizontal);\r\n                        var scrollbar = scrollbarVars._scrollbar;\r\n                        var track = scrollbarVars._track;\r\n                        var handle = scrollbarVars._handle;\r\n\r\n                        if (_domExists && _initialized) {\r\n                            each([scrollbar, track, handle], function (i, elm) {\r\n                                removeClass(elm.removeAttr(LEXICON.s), _classNamesDynamicDestroy);\r\n                            });\r\n                        }\r\n                        else {\r\n                            remove(scrollbar || selectOrGenerateScrollbarDOM(isHorizontal)._scrollbar);\r\n                        }\r\n                    }\r\n                    var horizontalElements;\r\n                    var verticalElements;\r\n\r\n                    if (!destroy) {\r\n                        horizontalElements = selectOrGenerateScrollbarDOM(true);\r\n                        verticalElements = selectOrGenerateScrollbarDOM();\r\n\r\n                        _scrollbarHorizontalElement = horizontalElements._scrollbar;\r\n                        _scrollbarHorizontalTrackElement = horizontalElements._track;\r\n                        _scrollbarHorizontalHandleElement = horizontalElements._handle;\r\n                        _scrollbarVerticalElement = verticalElements._scrollbar;\r\n                        _scrollbarVerticalTrackElement = verticalElements._track;\r\n                        _scrollbarVerticalHandleElement = verticalElements._handle;\r\n\r\n                        if (!_domExists) {\r\n                            _paddingElement.after(_scrollbarVerticalElement);\r\n                            _paddingElement.after(_scrollbarHorizontalElement);\r\n                        }\r\n                    }\r\n                    else {\r\n                        resetScrollbarDOM(true);\r\n                        resetScrollbarDOM();\r\n                    }\r\n                }\r\n\r\n                /**\r\n                 * Initializes all scrollbar interactivity events. (track and handle dragging, clicking, scrolling)\r\n                 * @param isHorizontal True if the target scrollbar is the horizontal scrollbar, false if the target scrollbar is the vertical scrollbar.\r\n                 */\r\n                function setupScrollbarEvents(isHorizontal) {\r\n                    var scrollbarVars = getScrollbarVars(isHorizontal);\r\n                    var scrollbarVarsInfo = scrollbarVars._info;\r\n                    var insideIFrame = _windowElementNative.top !== _windowElementNative;\r\n                    var xy = scrollbarVars._x_y;\r\n                    var XY = scrollbarVars._X_Y;\r\n                    var scroll = _strScroll + scrollbarVars._Left_Top;\r\n                    var strActive = 'active';\r\n                    var strSnapHandle = 'snapHandle';\r\n                    var strClickEvent = 'click';\r\n                    var scrollDurationFactor = 1;\r\n                    var increaseDecreaseScrollAmountKeyCodes = [16, 17]; //shift, ctrl\r\n                    var trackTimeout;\r\n                    var mouseDownScroll;\r\n                    var mouseDownOffset;\r\n                    var mouseDownInvertedScale;\r\n\r\n                    function getPointerPosition(event) {\r\n                        return _msieVersion && insideIFrame ? event['screen' + XY] : COMPATIBILITY.page(event)[xy]; //use screen coordinates in EDGE & IE because the page values are incorrect in frames.\r\n                    }\r\n                    function getPreparedScrollbarsOption(name) {\r\n                        return _currentPreparedOptions.scrollbars[name];\r\n                    }\r\n                    function increaseTrackScrollAmount() {\r\n                        scrollDurationFactor = 0.5;\r\n                    }\r\n                    function decreaseTrackScrollAmount() {\r\n                        scrollDurationFactor = 1;\r\n                    }\r\n                    function stopClickEventPropagation(event) {\r\n                        COMPATIBILITY.stpP(event);\r\n                    }\r\n                    function documentKeyDown(event) {\r\n                        if (inArray(event.keyCode, increaseDecreaseScrollAmountKeyCodes) > -1)\r\n                            increaseTrackScrollAmount();\r\n                    }\r\n                    function documentKeyUp(event) {\r\n                        if (inArray(event.keyCode, increaseDecreaseScrollAmountKeyCodes) > -1)\r\n                            decreaseTrackScrollAmount();\r\n                    }\r\n                    function onMouseTouchDownContinue(event) {\r\n                        var originalEvent = event.originalEvent || event;\r\n                        var isTouchEvent = originalEvent.touches !== undefined;\r\n                        return _sleeping || _destroyed || nativeOverlayScrollbarsAreActive() || !_scrollbarsDragScrollingCache || (isTouchEvent && !getPreparedScrollbarsOption('touchSupport')) ? false : COMPATIBILITY.mBtn(event) === 1 || isTouchEvent;\r\n                    }\r\n                    function documentDragMove(event) {\r\n                        if (onMouseTouchDownContinue(event)) {\r\n                            var trackLength = scrollbarVarsInfo._trackLength;\r\n                            var handleLength = scrollbarVarsInfo._handleLength;\r\n                            var scrollRange = scrollbarVarsInfo._maxScroll;\r\n                            var scrollRaw = (getPointerPosition(event) - mouseDownOffset) * mouseDownInvertedScale;\r\n                            var scrollDeltaPercent = scrollRaw / (trackLength - handleLength);\r\n                            var scrollDelta = (scrollRange * scrollDeltaPercent);\r\n                            scrollDelta = isFinite(scrollDelta) ? scrollDelta : 0;\r\n                            if (_isRTL && isHorizontal && !_rtlScrollBehavior.i)\r\n                                scrollDelta *= -1;\r\n\r\n                            _viewportElement[scroll](MATH.round(mouseDownScroll + scrollDelta));\r\n\r\n                            if (_scrollbarsHandlesDefineScrollPos)\r\n                                refreshScrollbarHandleOffset(isHorizontal, mouseDownScroll + scrollDelta);\r\n\r\n                            if (!_supportPassiveEvents)\r\n                                COMPATIBILITY.prvD(event);\r\n                        }\r\n                        else\r\n                            documentMouseTouchUp(event);\r\n                    }\r\n                    function documentMouseTouchUp(event) {\r\n                        event = event || event.originalEvent;\r\n\r\n                        setupResponsiveEventListener(_documentElement,\r\n                            [_strMouseTouchMoveEvent, _strMouseTouchUpEvent, _strKeyDownEvent, _strKeyUpEvent, _strSelectStartEvent],\r\n                            [documentDragMove, documentMouseTouchUp, documentKeyDown, documentKeyUp, documentOnSelectStart],\r\n                            true);\r\n                        COMPATIBILITY.rAF()(function() {\r\n                            setupResponsiveEventListener(_documentElement, strClickEvent, stopClickEventPropagation, true, { _capture: true });\r\n                        });\r\n                        \r\n                            \r\n                        if (_scrollbarsHandlesDefineScrollPos)\r\n                            refreshScrollbarHandleOffset(isHorizontal, true);\r\n\r\n                        _scrollbarsHandlesDefineScrollPos = false;\r\n                        removeClass(_bodyElement, _classNameDragging);\r\n                        removeClass(scrollbarVars._handle, strActive);\r\n                        removeClass(scrollbarVars._track, strActive);\r\n                        removeClass(scrollbarVars._scrollbar, strActive);\r\n\r\n                        mouseDownScroll = undefined;\r\n                        mouseDownOffset = undefined;\r\n                        mouseDownInvertedScale = 1;\r\n\r\n                        decreaseTrackScrollAmount();\r\n\r\n                        if (trackTimeout !== undefined) {\r\n                            _base.scrollStop();\r\n                            clearTimeout(trackTimeout);\r\n                            trackTimeout = undefined;\r\n                        }\r\n\r\n                        if (event) {\r\n                            var rect = _hostElementNative[LEXICON.bCR]();\r\n                            var mouseInsideHost = event.clientX >= rect.left && event.clientX <= rect.right && event.clientY >= rect.top && event.clientY <= rect.bottom;\r\n\r\n                            //if mouse is outside host element\r\n                            if (!mouseInsideHost)\r\n                                hostOnMouseLeave();\r\n\r\n                            if (_scrollbarsAutoHideScroll || _scrollbarsAutoHideMove)\r\n                                refreshScrollbarsAutoHide(false);\r\n                        }\r\n                    }\r\n                    function onHandleMouseTouchDown(event) {\r\n                        if (onMouseTouchDownContinue(event))\r\n                            onHandleMouseTouchDownAction(event);\r\n                    }\r\n                    function onHandleMouseTouchDownAction(event) {\r\n                        mouseDownScroll = _viewportElement[scroll]();\r\n                        mouseDownScroll = isNaN(mouseDownScroll) ? 0 : mouseDownScroll;\r\n                        if (_isRTL && isHorizontal && !_rtlScrollBehavior.n || !_isRTL)\r\n                            mouseDownScroll = mouseDownScroll < 0 ? 0 : mouseDownScroll;\r\n\r\n                        mouseDownInvertedScale = getHostElementInvertedScale()[xy];\r\n                        mouseDownOffset = getPointerPosition(event);\r\n\r\n                        _scrollbarsHandlesDefineScrollPos = !getPreparedScrollbarsOption(strSnapHandle);\r\n                        addClass(_bodyElement, _classNameDragging);\r\n                        addClass(scrollbarVars._handle, strActive);\r\n                        addClass(scrollbarVars._scrollbar, strActive);\r\n\r\n                        setupResponsiveEventListener(_documentElement,\r\n                            [_strMouseTouchMoveEvent, _strMouseTouchUpEvent, _strSelectStartEvent],\r\n                            [documentDragMove, documentMouseTouchUp, documentOnSelectStart]);\r\n                        COMPATIBILITY.rAF()(function() {\r\n                            setupResponsiveEventListener(_documentElement, strClickEvent, stopClickEventPropagation, false, { _capture: true });\r\n                        });\r\n                        \r\n\r\n                        if (_msieVersion || !_documentMixed)\r\n                            COMPATIBILITY.prvD(event);\r\n                        COMPATIBILITY.stpP(event);\r\n                    }\r\n                    function onTrackMouseTouchDown(event) {\r\n                        if (onMouseTouchDownContinue(event)) {\r\n                            var handleToViewportRatio = scrollbarVars._info._handleLength / Math.round(MATH.min(1, _viewportSize[scrollbarVars._w_h] / _contentScrollSizeCache[scrollbarVars._w_h]) * scrollbarVars._info._trackLength);\r\n                            var scrollDistance = MATH.round(_viewportSize[scrollbarVars._w_h] * handleToViewportRatio);\r\n                            var scrollBaseDuration = 270 * handleToViewportRatio;\r\n                            var scrollFirstIterationDelay = 400 * handleToViewportRatio;\r\n                            var trackOffset = scrollbarVars._track.offset()[scrollbarVars._left_top];\r\n                            var ctrlKey = event.ctrlKey;\r\n                            var instantScroll = event.shiftKey;\r\n                            var instantScrollTransition = instantScroll && ctrlKey;\r\n                            var isFirstIteration = true;\r\n                            var easing = 'linear';\r\n                            var decreaseScroll;\r\n                            var finishedCondition;\r\n                            var scrollActionFinsished = function (transition) {\r\n                                if (_scrollbarsHandlesDefineScrollPos)\r\n                                    refreshScrollbarHandleOffset(isHorizontal, transition);\r\n                            };\r\n                            var scrollActionInstantFinished = function () {\r\n                                scrollActionFinsished();\r\n                                onHandleMouseTouchDownAction(event);\r\n                            };\r\n                            var scrollAction = function () {\r\n                                if (!_destroyed) {\r\n                                    var mouseOffset = (mouseDownOffset - trackOffset) * mouseDownInvertedScale;\r\n                                    var handleOffset = scrollbarVarsInfo._handleOffset;\r\n                                    var trackLength = scrollbarVarsInfo._trackLength;\r\n                                    var handleLength = scrollbarVarsInfo._handleLength;\r\n                                    var scrollRange = scrollbarVarsInfo._maxScroll;\r\n                                    var currScroll = scrollbarVarsInfo._currentScroll;\r\n                                    var scrollDuration = scrollBaseDuration * scrollDurationFactor;\r\n                                    var timeoutDelay = isFirstIteration ? MATH.max(scrollFirstIterationDelay, scrollDuration) : scrollDuration;\r\n                                    var instantScrollPosition = scrollRange * ((mouseOffset - (handleLength / 2)) / (trackLength - handleLength)); // 100% * positionPercent\r\n                                    var rtlIsNormal = _isRTL && isHorizontal && ((!_rtlScrollBehavior.i && !_rtlScrollBehavior.n) || _normalizeRTLCache);\r\n                                    var decreaseScrollCondition = rtlIsNormal ? handleOffset < mouseOffset : handleOffset > mouseOffset;\r\n                                    var scrollObj = {};\r\n                                    var animationObj = {\r\n                                        easing: easing,\r\n                                        step: function (now) {\r\n                                            if (_scrollbarsHandlesDefineScrollPos) {\r\n                                                _viewportElement[scroll](now); //https://github.com/jquery/jquery/issues/4340\r\n                                                refreshScrollbarHandleOffset(isHorizontal, now);\r\n                                            }\r\n                                        }\r\n                                    };\r\n                                    instantScrollPosition = isFinite(instantScrollPosition) ? instantScrollPosition : 0;\r\n                                    instantScrollPosition = _isRTL && isHorizontal && !_rtlScrollBehavior.i ? (scrollRange - instantScrollPosition) : instantScrollPosition;\r\n\r\n                                    //_base.scrollStop();\r\n\r\n                                    if (instantScroll) {\r\n                                        _viewportElement[scroll](instantScrollPosition); //scroll instantly to new position\r\n                                        if (instantScrollTransition) {\r\n                                            //get the scroll position after instant scroll (in case CSS Snap Points are used) to get the correct snapped scroll position\r\n                                            //and the animation stops at the correct point\r\n                                            instantScrollPosition = _viewportElement[scroll]();\r\n                                            //scroll back to the position before instant scrolling so animation can be performed\r\n                                            _viewportElement[scroll](currScroll);\r\n\r\n                                            instantScrollPosition = rtlIsNormal && _rtlScrollBehavior.i ? (scrollRange - instantScrollPosition) : instantScrollPosition;\r\n                                            instantScrollPosition = rtlIsNormal && _rtlScrollBehavior.n ? -instantScrollPosition : instantScrollPosition;\r\n\r\n                                            scrollObj[xy] = instantScrollPosition;\r\n                                            _base.scroll(scrollObj, extendDeep(animationObj, {\r\n                                                duration: 130,\r\n                                                complete: scrollActionInstantFinished\r\n                                            }));\r\n                                        }\r\n                                        else\r\n                                            scrollActionInstantFinished();\r\n                                    }\r\n                                    else {\r\n                                        decreaseScroll = isFirstIteration ? decreaseScrollCondition : decreaseScroll;\r\n                                        finishedCondition = rtlIsNormal\r\n                                            ? (decreaseScroll ? handleOffset + handleLength >= mouseOffset : handleOffset <= mouseOffset)\r\n                                            : (decreaseScroll ? handleOffset <= mouseOffset : handleOffset + handleLength >= mouseOffset);\r\n\r\n                                        if (finishedCondition) {\r\n                                            clearTimeout(trackTimeout);\r\n                                            _base.scrollStop();\r\n                                            trackTimeout = undefined;\r\n                                            scrollActionFinsished(true);\r\n                                        }\r\n                                        else {\r\n                                            trackTimeout = setTimeout(scrollAction, timeoutDelay);\r\n\r\n                                            scrollObj[xy] = (decreaseScroll ? '-=' : '+=') + scrollDistance;\r\n                                            _base.scroll(scrollObj, extendDeep(animationObj, {\r\n                                                duration: scrollDuration\r\n                                            }));\r\n                                        }\r\n                                        isFirstIteration = false;\r\n                                    }\r\n                                }\r\n                            };\r\n                            if (ctrlKey)\r\n                                increaseTrackScrollAmount();\r\n\r\n                            mouseDownInvertedScale = getHostElementInvertedScale()[xy];\r\n                            mouseDownOffset = COMPATIBILITY.page(event)[xy];\r\n\r\n                            _scrollbarsHandlesDefineScrollPos = !getPreparedScrollbarsOption(strSnapHandle);\r\n                            addClass(_bodyElement, _classNameDragging);\r\n                            addClass(scrollbarVars._track, strActive);\r\n                            addClass(scrollbarVars._scrollbar, strActive);\r\n\r\n                            setupResponsiveEventListener(_documentElement,\r\n                                [_strMouseTouchUpEvent, _strKeyDownEvent, _strKeyUpEvent, _strSelectStartEvent],\r\n                                [documentMouseTouchUp, documentKeyDown, documentKeyUp, documentOnSelectStart]);\r\n\r\n                            scrollAction();\r\n                            COMPATIBILITY.prvD(event);\r\n                            COMPATIBILITY.stpP(event);\r\n                        }\r\n                    }\r\n                    function onTrackMouseTouchEnter(event) {\r\n                        //make sure both scrollbars will stay visible if one scrollbar is hovered if autoHide is \"scroll\" or \"move\".\r\n                        _scrollbarsHandleHovered = true;\r\n                        if (_scrollbarsAutoHideScroll || _scrollbarsAutoHideMove)\r\n                            refreshScrollbarsAutoHide(true);\r\n                    }\r\n                    function onTrackMouseTouchLeave(event) {\r\n                        _scrollbarsHandleHovered = false;\r\n                        if (_scrollbarsAutoHideScroll || _scrollbarsAutoHideMove)\r\n                            refreshScrollbarsAutoHide(false);\r\n                    }\r\n                    function onScrollbarMouseTouchDown(event) {\r\n                        COMPATIBILITY.stpP(event);\r\n                    }\r\n\r\n                    addDestroyEventListener(scrollbarVars._handle,\r\n                        _strMouseTouchDownEvent,\r\n                        onHandleMouseTouchDown);\r\n                    addDestroyEventListener(scrollbarVars._track,\r\n                        [_strMouseTouchDownEvent, _strMouseEnter, _strMouseLeave],\r\n                        [onTrackMouseTouchDown, onTrackMouseTouchEnter, onTrackMouseTouchLeave]);\r\n                    addDestroyEventListener(scrollbarVars._scrollbar,\r\n                        _strMouseTouchDownEvent,\r\n                        onScrollbarMouseTouchDown);\r\n\r\n                    if (_supportTransition) {\r\n                        addDestroyEventListener(scrollbarVars._scrollbar, _strTransitionEndEvent, function (event) {\r\n                            if (event.target !== scrollbarVars._scrollbar[0])\r\n                                return;\r\n                            refreshScrollbarHandleLength(isHorizontal);\r\n                            refreshScrollbarHandleOffset(isHorizontal);\r\n                        });\r\n                    }\r\n                }\r\n\r\n                /**\r\n                 * Shows or hides the given scrollbar and applied a class name which indicates if the scrollbar is scrollable or not.\r\n                 * @param isHorizontal True if the horizontal scrollbar is the target, false if the vertical scrollbar is the target.\r\n                 * @param shallBeVisible True if the scrollbar shall be shown, false if hidden.\r\n                 * @param canScroll True if the scrollbar is scrollable, false otherwise.\r\n                 */\r\n                function refreshScrollbarAppearance(isHorizontal, shallBeVisible, canScroll) {\r\n                    var scrollbarHiddenClassName = isHorizontal ? _classNameHostScrollbarHorizontalHidden : _classNameHostScrollbarVerticalHidden;\r\n                    var scrollbarElement = isHorizontal ? _scrollbarHorizontalElement : _scrollbarVerticalElement;\r\n\r\n                    addRemoveClass(_hostElement, scrollbarHiddenClassName, !shallBeVisible);\r\n                    addRemoveClass(scrollbarElement, _classNameScrollbarUnusable, !canScroll);\r\n                }\r\n\r\n                /**\r\n                 * Autoshows / autohides both scrollbars with.\r\n                 * @param shallBeVisible True if the scrollbars shall be autoshown (only the case if they are hidden by a autohide), false if the shall be auto hidden.\r\n                 * @param delayfree True if the scrollbars shall be hidden without a delay, false or undefined otherwise.\r\n                 */\r\n                function refreshScrollbarsAutoHide(shallBeVisible, delayfree) {\r\n                    clearTimeout(_scrollbarsAutoHideTimeoutId);\r\n                    if (shallBeVisible) {\r\n                        //if(_hasOverflowCache.x && _hideOverflowCache.xs)\r\n                        removeClass(_scrollbarHorizontalElement, _classNameScrollbarAutoHidden);\r\n                        //if(_hasOverflowCache.y && _hideOverflowCache.ys)\r\n                        removeClass(_scrollbarVerticalElement, _classNameScrollbarAutoHidden);\r\n                    }\r\n                    else {\r\n                        var anyActive;\r\n                        var strActive = 'active';\r\n                        var hide = function () {\r\n                            if (!_scrollbarsHandleHovered && !_destroyed) {\r\n                                anyActive = _scrollbarHorizontalHandleElement.hasClass(strActive) || _scrollbarVerticalHandleElement.hasClass(strActive);\r\n                                if (!anyActive && (_scrollbarsAutoHideScroll || _scrollbarsAutoHideMove || _scrollbarsAutoHideLeave))\r\n                                    addClass(_scrollbarHorizontalElement, _classNameScrollbarAutoHidden);\r\n                                if (!anyActive && (_scrollbarsAutoHideScroll || _scrollbarsAutoHideMove || _scrollbarsAutoHideLeave))\r\n                                    addClass(_scrollbarVerticalElement, _classNameScrollbarAutoHidden);\r\n                            }\r\n                        };\r\n                        if (_scrollbarsAutoHideDelay > 0 && delayfree !== true)\r\n                            _scrollbarsAutoHideTimeoutId = setTimeout(hide, _scrollbarsAutoHideDelay);\r\n                        else\r\n                            hide();\r\n                    }\r\n                }\r\n\r\n                /**\r\n                 * Refreshes the handle length of the given scrollbar.\r\n                 * @param isHorizontal True if the horizontal scrollbar handle shall be refreshed, false if the vertical one shall be refreshed.\r\n                 */\r\n                function refreshScrollbarHandleLength(isHorizontal) {\r\n                    var handleCSS = {};\r\n                    var scrollbarVars = getScrollbarVars(isHorizontal);\r\n                    var scrollbarVarsInfo = scrollbarVars._info;\r\n                    var digit = 1000000;\r\n                    //get and apply intended handle length\r\n                    var handleRatio = MATH.min(1, _viewportSize[scrollbarVars._w_h] / _contentScrollSizeCache[scrollbarVars._w_h]);\r\n                    handleCSS[scrollbarVars._width_height] = (MATH.floor(handleRatio * 100 * digit) / digit) + '%'; //the last * digit / digit is for flooring to the 4th digit\r\n\r\n                    if (!nativeOverlayScrollbarsAreActive())\r\n                        scrollbarVars._handle.css(handleCSS);\r\n\r\n                    //measure the handle length to respect min & max length\r\n                    scrollbarVarsInfo._handleLength = scrollbarVars._handle[0]['offset' + scrollbarVars._Width_Height];\r\n                    scrollbarVarsInfo._handleLengthRatio = handleRatio;\r\n                }\r\n\r\n                /**\r\n                 * Refreshes the handle offset of the given scrollbar.\r\n                 * @param isHorizontal True if the horizontal scrollbar handle shall be refreshed, false if the vertical one shall be refreshed.\r\n                 * @param scrollOrTransition The scroll position of the given scrollbar axis to which the handle shall be moved or a boolean which indicates whether a transition shall be applied. If undefined or boolean if the current scroll-offset is taken. (if isHorizontal ? scrollLeft : scrollTop)\r\n                 */\r\n                function refreshScrollbarHandleOffset(isHorizontal, scrollOrTransition) {\r\n                    var transition = type(scrollOrTransition) == TYPES.b;\r\n                    var transitionDuration = 250;\r\n                    var isRTLisHorizontal = _isRTL && isHorizontal;\r\n                    var scrollbarVars = getScrollbarVars(isHorizontal);\r\n                    var scrollbarVarsInfo = scrollbarVars._info;\r\n                    var strTranslateBrace = 'translate(';\r\n                    var strTransform = VENDORS._cssProperty('transform');\r\n                    var strTransition = VENDORS._cssProperty('transition');\r\n                    var nativeScroll = isHorizontal ? _viewportElement[_strScrollLeft]() : _viewportElement[_strScrollTop]();\r\n                    var currentScroll = scrollOrTransition === undefined || transition ? nativeScroll : scrollOrTransition;\r\n\r\n                    //measure the handle length to respect min & max length\r\n                    var handleLength = scrollbarVarsInfo._handleLength;\r\n                    var trackLength = scrollbarVars._track[0]['offset' + scrollbarVars._Width_Height];\r\n                    var handleTrackDiff = trackLength - handleLength;\r\n                    var handleCSS = {};\r\n                    var transformOffset;\r\n                    var translateValue;\r\n\r\n                    //DONT use the variable '_contentScrollSizeCache[scrollbarVars._w_h]' instead of '_viewportElement[0]['scroll' + scrollbarVars._Width_Height]'\r\n                    // because its a bit behind during the small delay when content size updates\r\n                    //(delay = mutationObserverContentLag, if its 0 then this var could be used)\r\n                    var maxScroll = (_viewportElementNative[_strScroll + scrollbarVars._Width_Height] - _viewportElementNative['client' + scrollbarVars._Width_Height]) * (_rtlScrollBehavior.n && isRTLisHorizontal ? -1 : 1); //* -1 if rtl scroll max is negative\r\n                    var getScrollRatio = function (base) {\r\n                        return isNaN(base / maxScroll) ? 0 : MATH.max(0, MATH.min(1, base / maxScroll));\r\n                    };\r\n                    var getHandleOffset = function (scrollRatio) {\r\n                        var offset = handleTrackDiff * scrollRatio;\r\n                        offset = isNaN(offset) ? 0 : offset;\r\n                        offset = (isRTLisHorizontal && !_rtlScrollBehavior.i) ? (trackLength - handleLength - offset) : offset;\r\n                        offset = MATH.max(0, offset);\r\n                        return offset;\r\n                    };\r\n                    var scrollRatio = getScrollRatio(nativeScroll);\r\n                    var unsnappedScrollRatio = getScrollRatio(currentScroll);\r\n                    var handleOffset = getHandleOffset(unsnappedScrollRatio);\r\n                    var snappedHandleOffset = getHandleOffset(scrollRatio);\r\n\r\n                    scrollbarVarsInfo._maxScroll = maxScroll;\r\n                    scrollbarVarsInfo._currentScroll = nativeScroll;\r\n                    scrollbarVarsInfo._currentScrollRatio = scrollRatio;\r\n\r\n                    if (_supportTransform) {\r\n                        transformOffset = isRTLisHorizontal ? -(trackLength - handleLength - handleOffset) : handleOffset; //in px\r\n                        //transformOffset = (transformOffset / trackLength * 100) * (trackLength / handleLength); //in %\r\n                        translateValue = isHorizontal ? strTranslateBrace + transformOffset + 'px, 0)' : strTranslateBrace + '0, ' + transformOffset + 'px)';\r\n\r\n                        handleCSS[strTransform] = translateValue;\r\n\r\n                        //apply or clear up transition\r\n                        if (_supportTransition)\r\n                            handleCSS[strTransition] = transition && MATH.abs(handleOffset - scrollbarVarsInfo._handleOffset) > 1 ? getCSSTransitionString(scrollbarVars._handle) + ', ' + (strTransform + _strSpace + transitionDuration + 'ms') : _strEmpty;\r\n                    }\r\n                    else\r\n                        handleCSS[scrollbarVars._left_top] = handleOffset;\r\n\r\n\r\n                    //only apply css if offset has changed and overflow exists.\r\n                    if (!nativeOverlayScrollbarsAreActive()) {\r\n                        scrollbarVars._handle.css(handleCSS);\r\n\r\n                        //clear up transition\r\n                        if (_supportTransform && _supportTransition && transition) {\r\n                            scrollbarVars._handle.one(_strTransitionEndEvent, function () {\r\n                                if (!_destroyed)\r\n                                    scrollbarVars._handle.css(strTransition, _strEmpty);\r\n                            });\r\n                        }\r\n                    }\r\n\r\n                    scrollbarVarsInfo._handleOffset = handleOffset;\r\n                    scrollbarVarsInfo._snappedHandleOffset = snappedHandleOffset;\r\n                    scrollbarVarsInfo._trackLength = trackLength;\r\n                }\r\n\r\n                /**\r\n                 * Refreshes the interactivity of the given scrollbar element.\r\n                 * @param isTrack True if the track element is the target, false if the handle element is the target.\r\n                 * @param value True for interactivity false for no interactivity.\r\n                 */\r\n                function refreshScrollbarsInteractive(isTrack, value) {\r\n                    var action = value ? 'removeClass' : 'addClass';\r\n                    var element1 = isTrack ? _scrollbarHorizontalTrackElement : _scrollbarHorizontalHandleElement;\r\n                    var element2 = isTrack ? _scrollbarVerticalTrackElement : _scrollbarVerticalHandleElement;\r\n                    var className = isTrack ? _classNameScrollbarTrackOff : _classNameScrollbarHandleOff;\r\n\r\n                    element1[action](className);\r\n                    element2[action](className);\r\n                }\r\n\r\n                /**\r\n                 * Returns a object which is used for fast access for specific variables.\r\n                 * @param isHorizontal True if the horizontal scrollbar vars shall be accessed, false if the vertical scrollbar vars shall be accessed.\r\n                 * @returns {{wh: string, WH: string, lt: string, _wh: string, _lt: string, t: *, h: *, c: {}, s: *}}\r\n                 */\r\n                function getScrollbarVars(isHorizontal) {\r\n                    return {\r\n                        _width_height: isHorizontal ? _strWidth : _strHeight,\r\n                        _Width_Height: isHorizontal ? 'Width' : 'Height',\r\n                        _left_top: isHorizontal ? _strLeft : _strTop,\r\n                        _Left_Top: isHorizontal ? 'Left' : 'Top',\r\n                        _x_y: isHorizontal ? _strX : _strY,\r\n                        _X_Y: isHorizontal ? 'X' : 'Y',\r\n                        _w_h: isHorizontal ? 'w' : 'h',\r\n                        _l_t: isHorizontal ? 'l' : 't',\r\n                        _track: isHorizontal ? _scrollbarHorizontalTrackElement : _scrollbarVerticalTrackElement,\r\n                        _handle: isHorizontal ? _scrollbarHorizontalHandleElement : _scrollbarVerticalHandleElement,\r\n                        _scrollbar: isHorizontal ? _scrollbarHorizontalElement : _scrollbarVerticalElement,\r\n                        _info: isHorizontal ? _scrollHorizontalInfo : _scrollVerticalInfo\r\n                    };\r\n                }\r\n\r\n\r\n                //==== Scrollbar Corner ====//\r\n\r\n                /**\r\n                 * Builds or destroys the scrollbar corner DOM element.\r\n                 * @param destroy Indicates whether the DOM shall be build or destroyed.\r\n                 */\r\n                function setupScrollbarCornerDOM(destroy) {\r\n                    _scrollbarCornerElement = _scrollbarCornerElement || selectOrGenerateDivByClass(_classNameScrollbarCorner, true);\r\n\r\n                    if (!destroy) {\r\n                        if (!_domExists) {\r\n                            _hostElement.append(_scrollbarCornerElement);\r\n                        }\r\n                    }\r\n                    else {\r\n                        if (_domExists && _initialized) {\r\n                            removeClass(_scrollbarCornerElement.removeAttr(LEXICON.s), _classNamesDynamicDestroy);\r\n                        }\r\n                        else {\r\n                            remove(_scrollbarCornerElement);\r\n                        }\r\n                    }\r\n                }\r\n\r\n                /**\r\n                 * Initializes all scrollbar corner interactivity events.\r\n                 */\r\n                function setupScrollbarCornerEvents() {\r\n                    var insideIFrame = _windowElementNative.top !== _windowElementNative;\r\n                    var mouseDownPosition = {};\r\n                    var mouseDownSize = {};\r\n                    var mouseDownInvertedScale = {};\r\n                    var reconnectMutationObserver;\r\n\r\n                    function documentDragMove(event) {\r\n                        if (onMouseTouchDownContinue(event)) {\r\n                            var pageOffset = getCoordinates(event);\r\n                            var hostElementCSS = {};\r\n                            if (_resizeHorizontal || _resizeBoth)\r\n                                hostElementCSS[_strWidth] = (mouseDownSize.w + (pageOffset.x - mouseDownPosition.x) * mouseDownInvertedScale.x);\r\n                            if (_resizeVertical || _resizeBoth)\r\n                                hostElementCSS[_strHeight] = (mouseDownSize.h + (pageOffset.y - mouseDownPosition.y) * mouseDownInvertedScale.y);\r\n                            _hostElement.css(hostElementCSS);\r\n                            COMPATIBILITY.stpP(event);\r\n                        }\r\n                        else {\r\n                            documentMouseTouchUp(event);\r\n                        }\r\n                    }\r\n                    function documentMouseTouchUp(event) {\r\n                        var eventIsTrusted = event !== undefined;\r\n\r\n                        setupResponsiveEventListener(_documentElement,\r\n                            [_strSelectStartEvent, _strMouseTouchMoveEvent, _strMouseTouchUpEvent],\r\n                            [documentOnSelectStart, documentDragMove, documentMouseTouchUp],\r\n                            true);\r\n\r\n                        removeClass(_bodyElement, _classNameDragging);\r\n                        if (_scrollbarCornerElement.releaseCapture)\r\n                            _scrollbarCornerElement.releaseCapture();\r\n\r\n                        if (eventIsTrusted) {\r\n                            if (reconnectMutationObserver)\r\n                                connectMutationObservers();\r\n                            _base.update(_strAuto);\r\n                        }\r\n                        reconnectMutationObserver = false;\r\n                    }\r\n                    function onMouseTouchDownContinue(event) {\r\n                        var originalEvent = event.originalEvent || event;\r\n                        var isTouchEvent = originalEvent.touches !== undefined;\r\n                        return _sleeping || _destroyed ? false : COMPATIBILITY.mBtn(event) === 1 || isTouchEvent;\r\n                    }\r\n                    function getCoordinates(event) {\r\n                        return _msieVersion && insideIFrame ? { x: event.screenX, y: event.screenY } : COMPATIBILITY.page(event);\r\n                    }\r\n\r\n                    addDestroyEventListener(_scrollbarCornerElement, _strMouseTouchDownEvent, function (event) {\r\n                        if (onMouseTouchDownContinue(event) && !_resizeNone) {\r\n                            if (_mutationObserversConnected) {\r\n                                reconnectMutationObserver = true;\r\n                                disconnectMutationObservers();\r\n                            }\r\n\r\n                            mouseDownPosition = getCoordinates(event);\r\n\r\n                            mouseDownSize.w = _hostElementNative[LEXICON.oW] - (!_isBorderBox ? _paddingX : 0);\r\n                            mouseDownSize.h = _hostElementNative[LEXICON.oH] - (!_isBorderBox ? _paddingY : 0);\r\n                            mouseDownInvertedScale = getHostElementInvertedScale();\r\n\r\n                            setupResponsiveEventListener(_documentElement,\r\n                                [_strSelectStartEvent, _strMouseTouchMoveEvent, _strMouseTouchUpEvent],\r\n                                [documentOnSelectStart, documentDragMove, documentMouseTouchUp]);\r\n\r\n                            addClass(_bodyElement, _classNameDragging);\r\n                            if (_scrollbarCornerElement.setCapture)\r\n                                _scrollbarCornerElement.setCapture();\r\n\r\n                            COMPATIBILITY.prvD(event);\r\n                            COMPATIBILITY.stpP(event);\r\n                        }\r\n                    });\r\n                }\r\n\r\n\r\n                //==== Utils ====//\r\n\r\n                /**\r\n                 * Calls the callback with the given name. The Context of this callback is always _base (this).\r\n                 * @param name The name of the target which shall be called.\r\n                 * @param args The args with which the callback shall be called.\r\n                 * @param dependent Boolean which decides whether the callback shall be fired, undefined is like a \"true\" value.\r\n                 */\r\n                function dispatchCallback(name, args, dependent) {\r\n                    if (dependent === false)\r\n                        return;\r\n                    if (_initialized) {\r\n                        var callback = _currentPreparedOptions.callbacks[name];\r\n                        var extensionOnName = name;\r\n                        var ext;\r\n\r\n                        if (extensionOnName.substr(0, 2) === 'on')\r\n                            extensionOnName = extensionOnName.substr(2, 1).toLowerCase() + extensionOnName.substr(3);\r\n\r\n                        if (type(callback) == TYPES.f)\r\n                            callback.call(_base, args);\r\n\r\n                        each(_extensions, function () {\r\n                            ext = this;\r\n                            if (type(ext.on) == TYPES.f)\r\n                                ext.on(extensionOnName, args);\r\n                        });\r\n                    }\r\n                    else if (!_destroyed)\r\n                        _callbacksInitQeueue.push({ n: name, a: args });\r\n                }\r\n\r\n                /**\r\n                 * Sets the \"top, right, bottom, left\" properties, with a given prefix, of the given css object.\r\n                 * @param targetCSSObject The css object to which the values shall be applied.\r\n                 * @param prefix The prefix of the \"top, right, bottom, left\" css properties. (example: 'padding-' is a valid prefix)\r\n                 * @param values A array of values which shall be applied to the \"top, right, bottom, left\" -properties. The array order is [top, right, bottom, left].\r\n                 * If this argument is undefined the value '' (empty string) will be applied to all properties.\r\n                 */\r\n                function setTopRightBottomLeft(targetCSSObject, prefix, values) {\r\n                    prefix = prefix || _strEmpty;\r\n                    values = values || [_strEmpty, _strEmpty, _strEmpty, _strEmpty];\r\n\r\n                    targetCSSObject[prefix + _strTop] = values[0];\r\n                    targetCSSObject[prefix + _strRight] = values[1];\r\n                    targetCSSObject[prefix + _strBottom] = values[2];\r\n                    targetCSSObject[prefix + _strLeft] = values[3];\r\n                }\r\n\r\n                /**\r\n                 * Gets the \"top, right, bottom, left\" CSS properties of the CSS property with the given prefix from the host element.\r\n                 * @param prefix The prefix of the \"top, right, bottom, left\" css properties. (example: 'padding-' is a valid prefix)\r\n                 * @param suffix The suffix of the \"top, right, bottom, left\" css properties. (example: 'border-' is a valid prefix with '-width' is a valid suffix)\r\n                 * @param zeroX True if the x axis shall be 0.\r\n                 * @param zeroY True if the y axis shall be 0.\r\n                 * @returns {{}} The object which contains the numbers of the read CSS properties.\r\n                 */\r\n                function getTopRightBottomLeftHost(prefix, suffix, zeroX, zeroY) {\r\n                    suffix = suffix || _strEmpty;\r\n                    prefix = prefix || _strEmpty;\r\n                    return {\r\n                        t: zeroY ? 0 : parseToZeroOrNumber(_hostElement.css(prefix + _strTop + suffix)),\r\n                        r: zeroX ? 0 : parseToZeroOrNumber(_hostElement.css(prefix + _strRight + suffix)),\r\n                        b: zeroY ? 0 : parseToZeroOrNumber(_hostElement.css(prefix + _strBottom + suffix)),\r\n                        l: zeroX ? 0 : parseToZeroOrNumber(_hostElement.css(prefix + _strLeft + suffix))\r\n                    };\r\n                }\r\n\r\n                /**\r\n                 * Returns the computed CSS transition string from the given element.\r\n                 * @param element The element from which the transition string shall be returned.\r\n                 * @returns {string} The CSS transition string from the given element.\r\n                 */\r\n                function getCSSTransitionString(element) {\r\n                    var transitionStr = VENDORS._cssProperty('transition');\r\n                    var assembledValue = element.css(transitionStr);\r\n                    if (assembledValue)\r\n                        return assembledValue;\r\n                    var regExpString = '\\\\s*(' + '([^,(]+(\\\\(.+?\\\\))?)+' + ')[\\\\s,]*';\r\n                    var regExpMain = new RegExp(regExpString);\r\n                    var regExpValidate = new RegExp('^(' + regExpString + ')+$');\r\n                    var properties = 'property duration timing-function delay'.split(' ');\r\n                    var result = [];\r\n                    var strResult;\r\n                    var valueArray;\r\n                    var i = 0;\r\n                    var j;\r\n                    var splitCssStyleByComma = function (str) {\r\n                        strResult = [];\r\n                        if (!str.match(regExpValidate))\r\n                            return str;\r\n                        while (str.match(regExpMain)) {\r\n                            strResult.push(RegExp.$1);\r\n                            str = str.replace(regExpMain, _strEmpty);\r\n                        }\r\n\r\n                        return strResult;\r\n                    };\r\n                    for (; i < properties[LEXICON.l]; i++) {\r\n                        valueArray = splitCssStyleByComma(element.css(transitionStr + '-' + properties[i]));\r\n                        for (j = 0; j < valueArray[LEXICON.l]; j++)\r\n                            result[j] = (result[j] ? result[j] + _strSpace : _strEmpty) + valueArray[j];\r\n                    }\r\n                    return result.join(', ');\r\n                }\r\n\r\n                /**\r\n                 * Generates a Regular Expression which matches with a string which starts with 'os-host'.\r\n                 * @param {boolean} withCurrClassNameOption The Regular Expression also matches if the string is the current ClassName option (multiple values splitted by space possible).\r\n                 * @param {boolean} withOldClassNameOption The Regular Expression also matches if the string is the old ClassName option (multiple values splitted by space possible).\r\n                 */\r\n                function createHostClassNameRegExp(withCurrClassNameOption, withOldClassNameOption) {\r\n                    var i;\r\n                    var split;\r\n                    var appendix;\r\n                    var appendClasses = function (classes, condition) {\r\n                        appendix = '';\r\n                        if (condition && typeof classes == TYPES.s) {\r\n                            split = classes.split(_strSpace);\r\n                            for (i = 0; i < split[LEXICON.l]; i++)\r\n                                appendix += '|' + split[i] + '$';\r\n                            // split[i].replace(/[.*+?^${}()|[\\]\\\\]/g, '\\\\$&') for escaping regex characters\r\n                        }\r\n                        return appendix;\r\n                    };\r\n\r\n                    return new RegExp(\r\n                        '(^' + _classNameHostElement + '([-_].+|)$)' +\r\n                        appendClasses(_classNameCache, withCurrClassNameOption) +\r\n                        appendClasses(_oldClassName, withOldClassNameOption), 'g');\r\n                }\r\n\r\n                /**\r\n                 * Calculates the host-elements inverted scale. (invertedScale = 1 / scale)\r\n                 * @returns {{x: number, y: number}} The scale of the host-element.\r\n                 */\r\n                function getHostElementInvertedScale() {\r\n                    var rect = _paddingElementNative[LEXICON.bCR]();\r\n                    return {\r\n                        x: _supportTransform ? 1 / (MATH.round(rect.width) / _paddingElementNative[LEXICON.oW]) || 1 : 1,\r\n                        y: _supportTransform ? 1 / (MATH.round(rect.height) / _paddingElementNative[LEXICON.oH]) || 1 : 1\r\n                    };\r\n                }\r\n\r\n                /**\r\n                 * Checks whether the given object is a HTMLElement.\r\n                 * @param o The object which shall be checked.\r\n                 * @returns {boolean} True the given object is a HTMLElement, false otherwise.\r\n                 */\r\n                function isHTMLElement(o) {\r\n                    var strOwnerDocument = 'ownerDocument';\r\n                    var strHTMLElement = 'HTMLElement';\r\n                    var wnd = o && o[strOwnerDocument] ? (o[strOwnerDocument].parentWindow || window) : window;\r\n                    return (\r\n                        typeof wnd[strHTMLElement] == TYPES.o ? o instanceof wnd[strHTMLElement] : //DOM2\r\n                            o && typeof o == TYPES.o && o !== null && o.nodeType === 1 && typeof o.nodeName == TYPES.s\r\n                    );\r\n                }\r\n\r\n                /**\r\n                 * Compares 2 arrays and returns the differences between them as a array.\r\n                 * @param a1 The first array which shall be compared.\r\n                 * @param a2 The second array which shall be compared.\r\n                 * @returns {Array} The differences between the two arrays.\r\n                 */\r\n                function getArrayDifferences(a1, a2) {\r\n                    var a = [];\r\n                    var diff = [];\r\n                    var i;\r\n                    var k;\r\n                    for (i = 0; i < a1.length; i++)\r\n                        a[a1[i]] = true;\r\n                    for (i = 0; i < a2.length; i++) {\r\n                        if (a[a2[i]])\r\n                            delete a[a2[i]];\r\n                        else\r\n                            a[a2[i]] = true;\r\n                    }\r\n                    for (k in a)\r\n                        diff.push(k);\r\n                    return diff;\r\n                }\r\n\r\n                /**\r\n                 * Returns Zero or the number to which the value can be parsed.\r\n                 * @param value The value which shall be parsed.\r\n                 * @param toFloat Indicates whether the number shall be parsed to a float.\r\n                 */\r\n                function parseToZeroOrNumber(value, toFloat) {\r\n                    var num = toFloat ? parseFloat(value) : parseInt(value, 10);\r\n                    return isNaN(num) ? 0 : num;\r\n                }\r\n\r\n                /**\r\n                 * Gets several information of the textarea and returns them as a object or undefined if the browser doesn't support it.\r\n                 * @returns {{cursorRow: Number, cursorCol, rows: Number, cols: number, wRow: number, pos: number, max : number}} or undefined if not supported.\r\n                 */\r\n                function getTextareaInfo() {\r\n                    //read needed values\r\n                    var textareaCursorPosition = _targetElementNative.selectionStart;\r\n                    if (textareaCursorPosition === undefined)\r\n                        return;\r\n\r\n                    var textareaValue = _targetElement.val();\r\n                    var textareaLength = textareaValue[LEXICON.l];\r\n                    var textareaRowSplit = textareaValue.split('\\n');\r\n                    var textareaLastRow = textareaRowSplit[LEXICON.l];\r\n                    var textareaCurrentCursorRowSplit = textareaValue.substr(0, textareaCursorPosition).split('\\n');\r\n                    var widestRow = 0;\r\n                    var textareaLastCol = 0;\r\n                    var cursorRow = textareaCurrentCursorRowSplit[LEXICON.l];\r\n                    var cursorCol = textareaCurrentCursorRowSplit[textareaCurrentCursorRowSplit[LEXICON.l] - 1][LEXICON.l];\r\n                    var rowCols;\r\n                    var i;\r\n\r\n                    //get widest Row and the last column of the textarea\r\n                    for (i = 0; i < textareaRowSplit[LEXICON.l]; i++) {\r\n                        rowCols = textareaRowSplit[i][LEXICON.l];\r\n                        if (rowCols > textareaLastCol) {\r\n                            widestRow = i + 1;\r\n                            textareaLastCol = rowCols;\r\n                        }\r\n                    }\r\n\r\n                    return {\r\n                        _cursorRow: cursorRow, //cursorRow\r\n                        _cursorColumn: cursorCol, //cursorCol\r\n                        _rows: textareaLastRow, //rows\r\n                        _columns: textareaLastCol, //cols\r\n                        _widestRow: widestRow, //wRow\r\n                        _cursorPosition: textareaCursorPosition, //pos\r\n                        _cursorMax: textareaLength //max\r\n                    };\r\n                }\r\n\r\n                /**\r\n                 * Determines whether native overlay scrollbars are active.\r\n                 * @returns {boolean} True if native overlay scrollbars are active, false otherwise.\r\n                 */\r\n                function nativeOverlayScrollbarsAreActive() {\r\n                    return (_ignoreOverlayScrollbarHidingCache && (_nativeScrollbarIsOverlaid.x && _nativeScrollbarIsOverlaid.y));\r\n                }\r\n\r\n                /**\r\n                 * Gets the element which is used to measure the content size.\r\n                 * @returns {*} TextareaCover if target element is textarea else the ContentElement.\r\n                 */\r\n                function getContentMeasureElement() {\r\n                    return _isTextarea ? _textareaCoverElement[0] : _contentElementNative;\r\n                }\r\n\r\n                /**\r\n                 * Generates a string which represents a HTML div with the given classes or attributes.\r\n                 * @param classesOrAttrs The class of the div as string or a object which represents the attributes of the div. (The class attribute can also be written as \"className\".)\r\n                 * @param content The content of the div as string.\r\n                 * @returns {string} The concated string which represents a HTML div and its content.\r\n                 */\r\n                function generateDiv(classesOrAttrs, content) {\r\n                    return '<div ' + (classesOrAttrs ? type(classesOrAttrs) == TYPES.s ?\r\n                        'class=\"' + classesOrAttrs + '\"' :\r\n                        (function () {\r\n                            var key;\r\n                            var attrs = _strEmpty;\r\n                            if (FRAMEWORK.isPlainObject(classesOrAttrs)) {\r\n                                for (key in classesOrAttrs)\r\n                                    attrs += (key === 'c' ? 'class' : key) + '=\"' + classesOrAttrs[key] + '\" ';\r\n                            }\r\n                            return attrs;\r\n                        })() :\r\n                        _strEmpty) +\r\n                        '>' +\r\n                        (content || _strEmpty) +\r\n                        '</div>';\r\n                }\r\n\r\n                /**\r\n                 * Selects or generates a div with the given class attribute.\r\n                 * @param className The class names (divided by spaces) of the div which shall be selected or generated.\r\n                 * @param selectParentOrOnlyChildren The parent element from which of the element shall be selected. (if undefined or boolean its hostElement)\r\n                 * If its a boolean it decides whether only the children of the host element shall be selected.\r\n                 * @returns {*} The generated or selected element.\r\n                 */\r\n                function selectOrGenerateDivByClass(className, selectParentOrOnlyChildren) {\r\n                    var onlyChildren = type(selectParentOrOnlyChildren) == TYPES.b;\r\n                    var selectParent = onlyChildren ? _hostElement : (selectParentOrOnlyChildren || _hostElement);\r\n\r\n                    return (_domExists && !selectParent[LEXICON.l])\r\n                        ? null\r\n                        : _domExists\r\n                            ? selectParent[onlyChildren ? 'children' : 'find'](_strDot + className.replace(/\\s/g, _strDot)).eq(0)\r\n                            : FRAMEWORK(generateDiv(className))\r\n                }\r\n\r\n                /**\r\n                 * Gets the value of the given property from the given object.\r\n                 * @param obj The object from which the property value shall be got.\r\n                 * @param path The property of which the value shall be got.\r\n                 * @returns {*} Returns the value of the searched property or undefined of the property wasn't found.\r\n                 */\r\n                function getObjectPropVal(obj, path) {\r\n                    var splits = path.split(_strDot);\r\n                    var i = 0;\r\n                    var val;\r\n                    for (; i < splits.length; i++) {\r\n                        if (!obj[LEXICON.hOP](splits[i]))\r\n                            return;\r\n                        val = obj[splits[i]];\r\n                        if (i < splits.length && type(val) == TYPES.o)\r\n                            obj = val;\r\n                    }\r\n                    return val;\r\n                }\r\n\r\n                /**\r\n                 * Sets the value of the given property from the given object.\r\n                 * @param obj The object from which the property value shall be set.\r\n                 * @param path The property of which the value shall be set.\r\n                 * @param val The value of the property which shall be set.\r\n                 */\r\n                function setObjectPropVal(obj, path, val) {\r\n                    var splits = path.split(_strDot);\r\n                    var splitsLength = splits.length;\r\n                    var i = 0;\r\n                    var extendObj = {};\r\n                    var extendObjRoot = extendObj;\r\n                    for (; i < splitsLength; i++)\r\n                        extendObj = extendObj[splits[i]] = i + 1 < splitsLength ? {} : val;\r\n                    FRAMEWORK.extend(obj, extendObjRoot, true);\r\n                }\r\n\r\n                /**\t\r\n                 * Runs a action for each selector inside the updateOnLoad option.\t\r\n                 * @param {Function} action The action for each updateOnLoad selector, the arguments the function takes is the index and the value (the selector).\t\r\n                 */\r\n                function eachUpdateOnLoad(action) {\r\n                    var updateOnLoad = _currentPreparedOptions.updateOnLoad;\r\n                    updateOnLoad = type(updateOnLoad) == TYPES.s ? updateOnLoad.split(_strSpace) : updateOnLoad;\r\n\r\n                    if (COMPATIBILITY.isA(updateOnLoad) && !_destroyed) {\r\n                        each(updateOnLoad, action);\r\n                    }\r\n                }\r\n\r\n\r\n                //==== Utils Cache ====//\r\n\r\n                /**\r\n                 * Compares two values or objects and returns true if they aren't equal.\r\n                 * @param current The first value or object which shall be compared.\r\n                 * @param cache The second value or object which shall be compared.\r\n                 * @param force If true the returned value is always true.\r\n                 * @returns {boolean} True if both values or objects aren't equal or force is true, false otherwise.\r\n                 */\r\n                function checkCache(current, cache, force) {\r\n                    if (force)\r\n                        return force;\r\n                    if (type(current) == TYPES.o && type(cache) == TYPES.o) {\r\n                        for (var prop in current) {\r\n                            if (prop !== 'c') {\r\n                                if (current[LEXICON.hOP](prop) && cache[LEXICON.hOP](prop)) {\r\n                                    if (checkCache(current[prop], cache[prop]))\r\n                                        return true;\r\n                                }\r\n                                else {\r\n                                    return true;\r\n                                }\r\n                            }\r\n                        }\r\n                    }\r\n                    else {\r\n                        return current !== cache;\r\n                    }\r\n                    return false;\r\n                }\r\n\r\n\r\n                //==== Shortcuts ====//\r\n\r\n                /**\r\n                 * jQuery extend method shortcut with a appended \"true\" as first argument.\r\n                 */\r\n                function extendDeep() {\r\n                    return FRAMEWORK.extend.apply(this, [true].concat([].slice.call(arguments)));\r\n                }\r\n\r\n                /**\r\n                 * jQuery addClass method shortcut.\r\n                 */\r\n                function addClass(el, classes) {\r\n                    return _frameworkProto.addClass.call(el, classes);\r\n                }\r\n\r\n                /**\r\n                 * jQuery removeClass method shortcut.\r\n                 */\r\n                function removeClass(el, classes) {\r\n                    return _frameworkProto.removeClass.call(el, classes);\r\n                }\r\n\r\n                /**\r\n                 * Adds or removes the given classes dependent on the boolean value. True for add, false for remove.\r\n                 */\r\n                function addRemoveClass(el, classes, doAdd) {\r\n                    return doAdd ? addClass(el, classes) : removeClass(el, classes);\r\n                }\r\n\r\n                /**\r\n                 * jQuery remove method shortcut.\r\n                 */\r\n                function remove(el) {\r\n                    return _frameworkProto.remove.call(el);\r\n                }\r\n\r\n                /**\r\n                 * Finds the first child element with the given selector of the given element.\r\n                 * @param el The root element from which the selector shall be valid.\r\n                 * @param selector The selector of the searched element.\r\n                 * @returns {*} The first element which is a child of the given element and matches the givens selector.\r\n                 */\r\n                function findFirst(el, selector) {\r\n                    return _frameworkProto.find.call(el, selector).eq(0);\r\n                }\r\n\r\n\r\n                //==== API ====//\r\n\r\n                /**\r\n                 * Puts the instance to sleep. It wont respond to any changes in the DOM and won't update. Scrollbar Interactivity is also disabled as well as the resize handle.\r\n                 * This behavior can be reset by calling the update method.\r\n                 */\r\n                _base.sleep = function () {\r\n                    _sleeping = true;\r\n                };\r\n\r\n                /**\r\n                 * Updates the plugin and DOM to the current options.\r\n                 * This method should only be called if a update is 100% required.\r\n                 * @param force True if every property shall be updated and the cache shall be ignored.\r\n                 * !INTERNAL USAGE! : force can be a string \"auto\", \"sync\" or \"zoom\" too\r\n                 * if \"auto\" then before a real update the content size and host element attributes gets checked, and if they changed only then the update method will be called.\r\n                 * if \"sync\" then the async update process (MutationObserver or UpdateLoop) gets synchronized and a corresponding update takes place if one was needed due to pending changes.\r\n                 * if \"zoom\" then a update takes place where it's assumed that content and host size changed\r\n                 * @returns {boolean|undefined} \r\n                 * If force is \"sync\" then a boolean is returned which indicates whether a update was needed due to pending changes.\r\n                 * If force is \"auto\" then a boolean is returned whether a update was needed due to attribute or size changes.\r\n                 * undefined otherwise.\r\n                 */\r\n                _base.update = function (force) {\r\n                    if (_destroyed)\r\n                        return;\r\n\r\n                    var attrsChanged;\r\n                    var contentSizeC;\r\n                    var isString = type(force) == TYPES.s;\r\n                    var doUpdateAuto;\r\n                    var mutHost;\r\n                    var mutContent;\r\n\r\n                    if (isString) {\r\n                        if (force === _strAuto) {\r\n                            attrsChanged = meaningfulAttrsChanged();\r\n                            contentSizeC = updateAutoContentSizeChanged();\r\n                            doUpdateAuto = attrsChanged || contentSizeC;\r\n                            if (doUpdateAuto) {\r\n                                update({\r\n                                    _contentSizeChanged: contentSizeC,\r\n                                    _changedOptions: _initialized ? undefined : _currentPreparedOptions\r\n                                });\r\n                            }\r\n                        }\r\n                        else if (force === _strSync) {\r\n                            if (_mutationObserversConnected) {\r\n                                mutHost = _mutationObserverHostCallback(_mutationObserverHost.takeRecords());\r\n                                mutContent = _mutationObserverContentCallback(_mutationObserverContent.takeRecords());\r\n                            }\r\n                            else {\r\n                                mutHost = _base.update(_strAuto);\r\n                            }\r\n                        }\r\n                        else if (force === 'zoom') {\r\n                            update({\r\n                                _hostSizeChanged: true,\r\n                                _contentSizeChanged: true\r\n                            });\r\n                        }\r\n                    }\r\n                    else {\r\n                        force = _sleeping || force;\r\n                        _sleeping = false;\r\n                        if (!_base.update(_strSync) || force)\r\n                            update({ _force: force });\r\n                    }\r\n\r\n                    updateElementsOnLoad();\r\n\r\n                    return doUpdateAuto || mutHost || mutContent;\r\n                };\r\n\r\n                /**\r\n                 Gets or sets the current options. The update method will be called automatically if new options were set.\r\n                 * @param newOptions If new options are given, then the new options will be set, if new options aren't given (undefined or a not a plain object) then the current options will be returned.\r\n                 * @param value If new options is a property path string, then this value will be used to set the option to which the property path string leads.\r\n                 * @returns {*}\r\n                 */\r\n                _base.options = function (newOptions, value) {\r\n                    var option = {};\r\n                    var changedOps;\r\n\r\n                    //return current options if newOptions are undefined or empty\r\n                    if (FRAMEWORK.isEmptyObject(newOptions) || !FRAMEWORK.isPlainObject(newOptions)) {\r\n                        if (type(newOptions) == TYPES.s) {\r\n                            if (arguments.length > 1) {\r\n                                setObjectPropVal(option, newOptions, value);\r\n                                changedOps = setOptions(option);\r\n                            }\r\n                            else\r\n                                return getObjectPropVal(_currentOptions, newOptions);\r\n                        }\r\n                        else\r\n                            return _currentOptions;\r\n                    }\r\n                    else {\r\n                        changedOps = setOptions(newOptions);\r\n                    }\r\n\r\n                    if (!FRAMEWORK.isEmptyObject(changedOps)) {\r\n                        update({ _changedOptions: changedOps });\r\n                    }\r\n                };\r\n\r\n                /**\r\n                 * Restore the DOM, disconnects all observers, remove all resize observers and put the instance to sleep.\r\n                 */\r\n                _base.destroy = function () {\r\n                    if (_destroyed)\r\n                        return;\r\n\r\n                    //remove this instance from auto update loop\r\n                    autoUpdateLoop.remove(_base);\r\n\r\n                    //disconnect all mutation observers\r\n                    disconnectMutationObservers();\r\n\r\n                    //remove all resize observers\r\n                    setupResizeObserver(_sizeObserverElement);\r\n                    setupResizeObserver(_sizeAutoObserverElement);\r\n\r\n                    //remove all extensions\r\n                    for (var extName in _extensions)\r\n                        _base.removeExt(extName);\r\n\r\n                    //remove all 'destroy' events\r\n                    while (_destroyEvents[LEXICON.l] > 0)\r\n                        _destroyEvents.pop()();\r\n\r\n                    //remove all events from host element\r\n                    setupHostMouseTouchEvents(true);\r\n\r\n                    //remove all helper / detection elements\r\n                    if (_contentGlueElement)\r\n                        remove(_contentGlueElement);\r\n                    if (_contentArrangeElement)\r\n                        remove(_contentArrangeElement);\r\n                    if (_sizeAutoObserverAdded)\r\n                        remove(_sizeAutoObserverElement);\r\n\r\n                    //remove all generated DOM\r\n                    setupScrollbarsDOM(true);\r\n                    setupScrollbarCornerDOM(true);\r\n                    setupStructureDOM(true);\r\n\r\n                    //remove all generated image load events\r\n                    for (var i = 0; i < _updateOnLoadElms[LEXICON.l]; i++)\r\n                        FRAMEWORK(_updateOnLoadElms[i]).off(_updateOnLoadEventName, updateOnLoadCallback);\r\n                    _updateOnLoadElms = undefined;\r\n\r\n                    _destroyed = true;\r\n                    _sleeping = true;\r\n\r\n                    //remove this instance from the instances list\r\n                    INSTANCES(pluginTargetElement, 0);\r\n                    dispatchCallback('onDestroyed');\r\n\r\n                    //remove all properties and methods\r\n                    //for (var property in _base)\r\n                    //    delete _base[property];\r\n                    //_base = undefined;\r\n                };\r\n\r\n                /**\r\n                 * Scrolls to a given position or element.\r\n                 * @param coordinates\r\n                 * 1. Can be \"coordinates\" which looks like:\r\n                 *    { x : ?, y : ? } OR          Object with x and y properties\r\n                 *    { left : ?, top : ? } OR     Object with left and top properties\r\n                 *    { l : ?, t : ? } OR          Object with l and t properties\r\n                 *    [ ?, ? ] OR                  Array where the first two element are the coordinates (first is x, second is y)\r\n                 *    ?                            A single value which stays for both axis\r\n                 *    A value can be a number, a string or a calculation.\r\n                 *\r\n                 *    Operators:\r\n                 *    [NONE]  The current scroll will be overwritten by the value.\r\n                 *    '+='    The value will be added to the current scroll offset\r\n                 *    '-='    The value will be subtracted from the current scroll offset\r\n                 *    '*='    The current scroll wil be multiplicated by the value.\r\n                 *    '/='    The current scroll wil be divided by the value.\r\n                 *\r\n                 *    Units:\r\n                 *    [NONE]  The value is the final scroll amount.                   final = (value * 1)\r\n                 *    'px'    Same as none\r\n                 *    '%'     The value is dependent on the current scroll value.     final = ((currentScrollValue / 100) * value)\r\n                 *    'vw'    The value is multiplicated by the viewport width.       final = (value * viewportWidth)\r\n                 *    'vh'    The value is multiplicated by the viewport height.      final = (value * viewportHeight)\r\n                 *\r\n                 *    example final values:\r\n                 *    200, '200px', '50%', '1vw', '1vh', '+=200', '/=1vw', '*=2px', '-=5vh', '+=33%', '+= 50% - 2px', '-= 1vw - 50%'\r\n                 *\r\n                 * 2. Can be a HTML or jQuery element:\r\n                 *    The final scroll offset is the offset (without margin) of the given HTML / jQuery element.\r\n                 *\r\n                 * 3. Can be a object with a HTML or jQuery element with additional settings:\r\n                 *    {\r\n                 *      el : [HTMLElement, jQuery element],             MUST be specified, else this object isn't valid.\r\n                 *      scroll : [string, array, object],               Default value is 'always'.\r\n                 *      block : [string, array, object],                Default value is 'begin'.\r\n                 *      margin : [number, boolean, array, object]       Default value is false.\r\n                 *    }\r\n                 *\r\n                 *    Possible scroll settings are:\r\n                 *    'always'      Scrolls always.\r\n                 *    'ifneeded'    Scrolls only if the element isnt fully in view.\r\n                 *    'never'       Scrolls never.\r\n                 *\r\n                 *    Possible block settings are:\r\n                 *    'begin'   Both axis shall be docked to the \"begin\" edge. - The element will be docked to the top and left edge of the viewport.\r\n                 *    'end'     Both axis shall be docked to the \"end\" edge. - The element will be docked to the bottom and right edge of the viewport. (If direction is RTL to the bottom and left edge.)\r\n                 *    'center'  Both axis shall be docked to \"center\". - The element will be centered in the viewport.\r\n                 *    'nearest' The element will be docked to the nearest edge(s).\r\n                 *\r\n                 *    Possible margin settings are: -- The actual margin of the element wont be affect, this option affects only the final scroll offset.\r\n                 *    [BOOLEAN]                                         If true the css margin of the element will be used, if false no margin will be used.\r\n                 *    [NUMBER]                                          The margin will be used for all edges.\r\n                 *\r\n                 * @param duration The duration of the scroll animation, OR a jQuery animation configuration object.\r\n                 * @param easing The animation easing.\r\n                 * @param complete The animation complete callback.\r\n                 * @returns {{\r\n                 *   position: {x: number, y: number},\r\n                 *   ratio: {x: number, y: number},\r\n                 *   max: {x: number, y: number},\r\n                 *   handleOffset: {x: number, y: number},\r\n                 *   handleLength: {x: number, y: number},\r\n                 *   handleLengthRatio: {x: number, y: number}, t\r\n                 *   rackLength: {x: number, y: number},\r\n                 *   isRTL: boolean,\r\n                 *   isRTLNormalized: boolean\r\n                 *  }}\r\n                 */\r\n                _base.scroll = function (coordinates, duration, easing, complete) {\r\n                    if (arguments.length === 0 || coordinates === undefined) {\r\n                        var infoX = _scrollHorizontalInfo;\r\n                        var infoY = _scrollVerticalInfo;\r\n                        var normalizeInvert = _normalizeRTLCache && _isRTL && _rtlScrollBehavior.i;\r\n                        var normalizeNegate = _normalizeRTLCache && _isRTL && _rtlScrollBehavior.n;\r\n                        var scrollX = infoX._currentScroll;\r\n                        var scrollXRatio = infoX._currentScrollRatio;\r\n                        var maxScrollX = infoX._maxScroll;\r\n                        scrollXRatio = normalizeInvert ? 1 - scrollXRatio : scrollXRatio;\r\n                        scrollX = normalizeInvert ? maxScrollX - scrollX : scrollX;\r\n                        scrollX *= normalizeNegate ? -1 : 1;\r\n                        maxScrollX *= normalizeNegate ? -1 : 1;\r\n\r\n                        return {\r\n                            position: {\r\n                                x: scrollX,\r\n                                y: infoY._currentScroll\r\n                            },\r\n                            ratio: {\r\n                                x: scrollXRatio,\r\n                                y: infoY._currentScrollRatio\r\n                            },\r\n                            max: {\r\n                                x: maxScrollX,\r\n                                y: infoY._maxScroll\r\n                            },\r\n                            handleOffset: {\r\n                                x: infoX._handleOffset,\r\n                                y: infoY._handleOffset\r\n                            },\r\n                            handleLength: {\r\n                                x: infoX._handleLength,\r\n                                y: infoY._handleLength\r\n                            },\r\n                            handleLengthRatio: {\r\n                                x: infoX._handleLengthRatio,\r\n                                y: infoY._handleLengthRatio\r\n                            },\r\n                            trackLength: {\r\n                                x: infoX._trackLength,\r\n                                y: infoY._trackLength\r\n                            },\r\n                            snappedHandleOffset: {\r\n                                x: infoX._snappedHandleOffset,\r\n                                y: infoY._snappedHandleOffset\r\n                            },\r\n                            isRTL: _isRTL,\r\n                            isRTLNormalized: _normalizeRTLCache\r\n                        };\r\n                    }\r\n\r\n                    _base.update(_strSync);\r\n\r\n                    var normalizeRTL = _normalizeRTLCache;\r\n                    var coordinatesXAxisProps = [_strX, _strLeft, 'l'];\r\n                    var coordinatesYAxisProps = [_strY, _strTop, 't'];\r\n                    var coordinatesOperators = ['+=', '-=', '*=', '/='];\r\n                    var durationIsObject = type(duration) == TYPES.o;\r\n                    var completeCallback = durationIsObject ? duration.complete : complete;\r\n                    var i;\r\n                    var finalScroll = {};\r\n                    var specialEasing = {};\r\n                    var doScrollLeft;\r\n                    var doScrollTop;\r\n                    var animationOptions;\r\n                    var strEnd = 'end';\r\n                    var strBegin = 'begin';\r\n                    var strCenter = 'center';\r\n                    var strNearest = 'nearest';\r\n                    var strAlways = 'always';\r\n                    var strNever = 'never';\r\n                    var strIfNeeded = 'ifneeded';\r\n                    var strLength = LEXICON.l;\r\n                    var settingsAxis;\r\n                    var settingsScroll;\r\n                    var settingsBlock;\r\n                    var settingsMargin;\r\n                    var finalElement;\r\n                    var elementObjSettingsAxisValues = [_strX, _strY, 'xy', 'yx'];\r\n                    var elementObjSettingsBlockValues = [strBegin, strEnd, strCenter, strNearest];\r\n                    var elementObjSettingsScrollValues = [strAlways, strNever, strIfNeeded];\r\n                    var coordinatesIsElementObj = coordinates[LEXICON.hOP]('el');\r\n                    var possibleElement = coordinatesIsElementObj ? coordinates.el : coordinates;\r\n                    var possibleElementIsJQuery = possibleElement instanceof FRAMEWORK || JQUERY ? possibleElement instanceof JQUERY : false;\r\n                    var possibleElementIsHTMLElement = possibleElementIsJQuery ? false : isHTMLElement(possibleElement);\r\n                    var updateScrollbarInfos = function () {\r\n                        if (doScrollLeft)\r\n                            refreshScrollbarHandleOffset(true);\r\n                        if (doScrollTop)\r\n                            refreshScrollbarHandleOffset(false);\r\n                    };\r\n                    var proxyCompleteCallback = type(completeCallback) != TYPES.f ? undefined : function () {\r\n                        updateScrollbarInfos();\r\n                        completeCallback();\r\n                    };\r\n                    function checkSettingsStringValue(currValue, allowedValues) {\r\n                        for (i = 0; i < allowedValues[strLength]; i++) {\r\n                            if (currValue === allowedValues[i])\r\n                                return true;\r\n                        }\r\n                        return false;\r\n                    }\r\n                    function getRawScroll(isX, coordinates) {\r\n                        var coordinateProps = isX ? coordinatesXAxisProps : coordinatesYAxisProps;\r\n                        coordinates = type(coordinates) == TYPES.s || type(coordinates) == TYPES.n ? [coordinates, coordinates] : coordinates;\r\n\r\n                        if (COMPATIBILITY.isA(coordinates))\r\n                            return isX ? coordinates[0] : coordinates[1];\r\n                        else if (type(coordinates) == TYPES.o) {\r\n                            //decides RTL normalization \"hack\" with .n\r\n                            //normalizeRTL = type(coordinates.n) == TYPES.b ? coordinates.n : normalizeRTL; \r\n                            for (i = 0; i < coordinateProps[strLength]; i++)\r\n                                if (coordinateProps[i] in coordinates)\r\n                                    return coordinates[coordinateProps[i]];\r\n                        }\r\n                    }\r\n                    function getFinalScroll(isX, rawScroll) {\r\n                        var isString = type(rawScroll) == TYPES.s;\r\n                        var operator;\r\n                        var amount;\r\n                        var scrollInfo = isX ? _scrollHorizontalInfo : _scrollVerticalInfo;\r\n                        var currScroll = scrollInfo._currentScroll;\r\n                        var maxScroll = scrollInfo._maxScroll;\r\n                        var mult = ' * ';\r\n                        var finalValue;\r\n                        var isRTLisX = _isRTL && isX;\r\n                        var normalizeShortcuts = isRTLisX && _rtlScrollBehavior.n && !normalizeRTL;\r\n                        var strReplace = 'replace';\r\n                        var evalFunc = eval;\r\n                        var possibleOperator;\r\n                        if (isString) {\r\n                            //check operator\r\n                            if (rawScroll[strLength] > 2) {\r\n                                possibleOperator = rawScroll.substr(0, 2);\r\n                                if (inArray(possibleOperator, coordinatesOperators) > -1)\r\n                                    operator = possibleOperator;\r\n                            }\r\n\r\n                            //calculate units and shortcuts\r\n                            rawScroll = operator ? rawScroll.substr(2) : rawScroll;\r\n                            rawScroll = rawScroll\r\n                            [strReplace](/min/g, 0) //'min' = 0%\r\n                            [strReplace](/</g, 0)   //'<'   = 0%\r\n                            [strReplace](/max/g, (normalizeShortcuts ? '-' : _strEmpty) + _strHundredPercent)    //'max' = 100%\r\n                            [strReplace](/>/g, (normalizeShortcuts ? '-' : _strEmpty) + _strHundredPercent)      //'>'   = 100%\r\n                            [strReplace](/px/g, _strEmpty)\r\n                            [strReplace](/%/g, mult + (maxScroll * (isRTLisX && _rtlScrollBehavior.n ? -1 : 1) / 100.0))\r\n                            [strReplace](/vw/g, mult + _viewportSize.w)\r\n                            [strReplace](/vh/g, mult + _viewportSize.h);\r\n                            amount = parseToZeroOrNumber(isNaN(rawScroll) ? parseToZeroOrNumber(evalFunc(rawScroll), true).toFixed() : rawScroll);\r\n                        }\r\n                        else {\r\n                            amount = rawScroll;\r\n                        }\r\n\r\n                        if (amount !== undefined && !isNaN(amount) && type(amount) == TYPES.n) {\r\n                            var normalizeIsRTLisX = normalizeRTL && isRTLisX;\r\n                            var operatorCurrScroll = currScroll * (normalizeIsRTLisX && _rtlScrollBehavior.n ? -1 : 1);\r\n                            var invert = normalizeIsRTLisX && _rtlScrollBehavior.i;\r\n                            var negate = normalizeIsRTLisX && _rtlScrollBehavior.n;\r\n                            operatorCurrScroll = invert ? (maxScroll - operatorCurrScroll) : operatorCurrScroll;\r\n                            switch (operator) {\r\n                                case '+=':\r\n                                    finalValue = operatorCurrScroll + amount;\r\n                                    break;\r\n                                case '-=':\r\n                                    finalValue = operatorCurrScroll - amount;\r\n                                    break;\r\n                                case '*=':\r\n                                    finalValue = operatorCurrScroll * amount;\r\n                                    break;\r\n                                case '/=':\r\n                                    finalValue = operatorCurrScroll / amount;\r\n                                    break;\r\n                                default:\r\n                                    finalValue = amount;\r\n                                    break;\r\n                            }\r\n                            finalValue = invert ? maxScroll - finalValue : finalValue;\r\n                            finalValue *= negate ? -1 : 1;\r\n                            finalValue = isRTLisX && _rtlScrollBehavior.n ? MATH.min(0, MATH.max(maxScroll, finalValue)) : MATH.max(0, MATH.min(maxScroll, finalValue));\r\n                        }\r\n                        return finalValue === currScroll ? undefined : finalValue;\r\n                    }\r\n                    function getPerAxisValue(value, valueInternalType, defaultValue, allowedValues) {\r\n                        var resultDefault = [defaultValue, defaultValue];\r\n                        var valueType = type(value);\r\n                        var valueArrLength;\r\n                        var valueArrItem;\r\n\r\n                        //value can be [ string, or array of two strings ]\r\n                        if (valueType == valueInternalType) {\r\n                            value = [value, value];\r\n                        }\r\n                        else if (valueType == TYPES.a) {\r\n                            valueArrLength = value[strLength];\r\n                            if (valueArrLength > 2 || valueArrLength < 1)\r\n                                value = resultDefault;\r\n                            else {\r\n                                if (valueArrLength === 1)\r\n                                    value[1] = defaultValue;\r\n                                for (i = 0; i < valueArrLength; i++) {\r\n                                    valueArrItem = value[i];\r\n                                    if (type(valueArrItem) != valueInternalType || !checkSettingsStringValue(valueArrItem, allowedValues)) {\r\n                                        value = resultDefault;\r\n                                        break;\r\n                                    }\r\n                                }\r\n                            }\r\n                        }\r\n                        else if (valueType == TYPES.o)\r\n                            value = [value[_strX] || defaultValue, value[_strY] || defaultValue];\r\n                        else\r\n                            value = resultDefault;\r\n                        return { x: value[0], y: value[1] };\r\n                    }\r\n                    function generateMargin(marginTopRightBottomLeftArray) {\r\n                        var result = [];\r\n                        var currValue;\r\n                        var currValueType;\r\n                        var valueDirections = [_strTop, _strRight, _strBottom, _strLeft];\r\n                        for (i = 0; i < marginTopRightBottomLeftArray[strLength]; i++) {\r\n                            if (i === valueDirections[strLength])\r\n                                break;\r\n                            currValue = marginTopRightBottomLeftArray[i];\r\n                            currValueType = type(currValue);\r\n                            if (currValueType == TYPES.b)\r\n                                result.push(currValue ? parseToZeroOrNumber(finalElement.css(_strMarginMinus + valueDirections[i])) : 0);\r\n                            else\r\n                                result.push(currValueType == TYPES.n ? currValue : 0);\r\n                        }\r\n                        return result;\r\n                    }\r\n\r\n                    if (possibleElementIsJQuery || possibleElementIsHTMLElement) {\r\n                        //get settings\r\n                        var margin = coordinatesIsElementObj ? coordinates.margin : 0;\r\n                        var axis = coordinatesIsElementObj ? coordinates.axis : 0;\r\n                        var scroll = coordinatesIsElementObj ? coordinates.scroll : 0;\r\n                        var block = coordinatesIsElementObj ? coordinates.block : 0;\r\n                        var marginDefault = [0, 0, 0, 0];\r\n                        var marginType = type(margin);\r\n                        var marginLength;\r\n                        finalElement = possibleElementIsJQuery ? possibleElement : FRAMEWORK(possibleElement);\r\n\r\n                        if (finalElement[strLength] > 0) {\r\n                            //margin can be [ boolean, number, array of 2, array of 4, object ]\r\n                            if (marginType == TYPES.n || marginType == TYPES.b)\r\n                                margin = generateMargin([margin, margin, margin, margin]);\r\n                            else if (marginType == TYPES.a) {\r\n                                marginLength = margin[strLength];\r\n                                if (marginLength === 2)\r\n                                    margin = generateMargin([margin[0], margin[1], margin[0], margin[1]]);\r\n                                else if (marginLength >= 4)\r\n                                    margin = generateMargin(margin);\r\n                                else\r\n                                    margin = marginDefault;\r\n                            }\r\n                            else if (marginType == TYPES.o)\r\n                                margin = generateMargin([margin[_strTop], margin[_strRight], margin[_strBottom], margin[_strLeft]]);\r\n                            else\r\n                                margin = marginDefault;\r\n\r\n                            //block = type(block) === TYPES.b ? block ? [ strNearest, strBegin ] : [ strNearest, strEnd ] : block;\r\n                            settingsAxis = checkSettingsStringValue(axis, elementObjSettingsAxisValues) ? axis : 'xy';\r\n                            settingsScroll = getPerAxisValue(scroll, TYPES.s, strAlways, elementObjSettingsScrollValues);\r\n                            settingsBlock = getPerAxisValue(block, TYPES.s, strBegin, elementObjSettingsBlockValues);\r\n                            settingsMargin = margin;\r\n\r\n                            var viewportScroll = {\r\n                                l: _scrollHorizontalInfo._currentScroll,\r\n                                t: _scrollVerticalInfo._currentScroll\r\n                            };\r\n                            // use padding element instead of viewport element because padding element has never padding, margin or position applied.\r\n                            var viewportOffset = _paddingElement.offset();\r\n\r\n                            //get coordinates\r\n                            var elementOffset = finalElement.offset();\r\n                            var doNotScroll = {\r\n                                x: settingsScroll.x == strNever || settingsAxis == _strY,\r\n                                y: settingsScroll.y == strNever || settingsAxis == _strX\r\n                            };\r\n                            elementOffset[_strTop] -= settingsMargin[0];\r\n                            elementOffset[_strLeft] -= settingsMargin[3];\r\n                            var elementScrollCoordinates = {\r\n                                x: MATH.round(elementOffset[_strLeft] - viewportOffset[_strLeft] + viewportScroll.l),\r\n                                y: MATH.round(elementOffset[_strTop] - viewportOffset[_strTop] + viewportScroll.t)\r\n                            };\r\n                            if (_isRTL) {\r\n                                if (!_rtlScrollBehavior.n && !_rtlScrollBehavior.i)\r\n                                    elementScrollCoordinates.x = MATH.round(viewportOffset[_strLeft] - elementOffset[_strLeft] + viewportScroll.l);\r\n                                if (_rtlScrollBehavior.n && normalizeRTL)\r\n                                    elementScrollCoordinates.x *= -1;\r\n                                if (_rtlScrollBehavior.i && normalizeRTL)\r\n                                    elementScrollCoordinates.x = MATH.round(viewportOffset[_strLeft] - elementOffset[_strLeft] + (_scrollHorizontalInfo._maxScroll - viewportScroll.l));\r\n                            }\r\n\r\n                            //measuring is required\r\n                            if (settingsBlock.x != strBegin || settingsBlock.y != strBegin || settingsScroll.x == strIfNeeded || settingsScroll.y == strIfNeeded || _isRTL) {\r\n                                var measuringElm = finalElement[0];\r\n                                var rawElementSize = _supportTransform ? measuringElm[LEXICON.bCR]() : {\r\n                                    width: measuringElm[LEXICON.oW],\r\n                                    height: measuringElm[LEXICON.oH]\r\n                                };\r\n                                var elementSize = {\r\n                                    w: rawElementSize[_strWidth] + settingsMargin[3] + settingsMargin[1],\r\n                                    h: rawElementSize[_strHeight] + settingsMargin[0] + settingsMargin[2]\r\n                                };\r\n                                var finalizeBlock = function (isX) {\r\n                                    var vars = getScrollbarVars(isX);\r\n                                    var wh = vars._w_h;\r\n                                    var lt = vars._left_top;\r\n                                    var xy = vars._x_y;\r\n                                    var blockIsEnd = settingsBlock[xy] == (isX ? _isRTL ? strBegin : strEnd : strEnd);\r\n                                    var blockIsCenter = settingsBlock[xy] == strCenter;\r\n                                    var blockIsNearest = settingsBlock[xy] == strNearest;\r\n                                    var scrollNever = settingsScroll[xy] == strNever;\r\n                                    var scrollIfNeeded = settingsScroll[xy] == strIfNeeded;\r\n                                    var vpSize = _viewportSize[wh];\r\n                                    var vpOffset = viewportOffset[lt];\r\n                                    var elSize = elementSize[wh];\r\n                                    var elOffset = elementOffset[lt];\r\n                                    var divide = blockIsCenter ? 2 : 1;\r\n                                    var elementCenterOffset = elOffset + (elSize / 2);\r\n                                    var viewportCenterOffset = vpOffset + (vpSize / 2);\r\n                                    var isInView =\r\n                                        elSize <= vpSize\r\n                                        && elOffset >= vpOffset\r\n                                        && elOffset + elSize <= vpOffset + vpSize;\r\n\r\n                                    if (scrollNever)\r\n                                        doNotScroll[xy] = true;\r\n                                    else if (!doNotScroll[xy]) {\r\n                                        if (blockIsNearest || scrollIfNeeded) {\r\n                                            doNotScroll[xy] = scrollIfNeeded ? isInView : false;\r\n                                            blockIsEnd = elSize < vpSize ? elementCenterOffset > viewportCenterOffset : elementCenterOffset < viewportCenterOffset;\r\n                                        }\r\n                                        elementScrollCoordinates[xy] -= blockIsEnd || blockIsCenter ? ((vpSize / divide) - (elSize / divide)) * (isX && _isRTL && normalizeRTL ? -1 : 1) : 0;\r\n                                    }\r\n                                };\r\n                                finalizeBlock(true);\r\n                                finalizeBlock(false);\r\n                            }\r\n\r\n                            if (doNotScroll.y)\r\n                                delete elementScrollCoordinates.y;\r\n                            if (doNotScroll.x)\r\n                                delete elementScrollCoordinates.x;\r\n\r\n                            coordinates = elementScrollCoordinates;\r\n                        }\r\n                    }\r\n\r\n                    finalScroll[_strScrollLeft] = getFinalScroll(true, getRawScroll(true, coordinates));\r\n                    finalScroll[_strScrollTop] = getFinalScroll(false, getRawScroll(false, coordinates));\r\n                    doScrollLeft = finalScroll[_strScrollLeft] !== undefined;\r\n                    doScrollTop = finalScroll[_strScrollTop] !== undefined;\r\n\r\n                    if ((doScrollLeft || doScrollTop) && (duration > 0 || durationIsObject)) {\r\n                        if (durationIsObject) {\r\n                            duration.complete = proxyCompleteCallback;\r\n                            _viewportElement.animate(finalScroll, duration);\r\n                        }\r\n                        else {\r\n                            animationOptions = {\r\n                                duration: duration,\r\n                                complete: proxyCompleteCallback\r\n                            };\r\n                            if (COMPATIBILITY.isA(easing) || FRAMEWORK.isPlainObject(easing)) {\r\n                                specialEasing[_strScrollLeft] = easing[0] || easing.x;\r\n                                specialEasing[_strScrollTop] = easing[1] || easing.y;\r\n                                animationOptions.specialEasing = specialEasing;\r\n                            }\r\n                            else {\r\n                                animationOptions.easing = easing;\r\n                            }\r\n                            _viewportElement.animate(finalScroll, animationOptions);\r\n                        }\r\n                    }\r\n                    else {\r\n                        if (doScrollLeft)\r\n                            _viewportElement[_strScrollLeft](finalScroll[_strScrollLeft]);\r\n                        if (doScrollTop)\r\n                            _viewportElement[_strScrollTop](finalScroll[_strScrollTop]);\r\n                        updateScrollbarInfos();\r\n                    }\r\n                };\r\n\r\n                /**\r\n                 * Stops all scroll animations.\r\n                 * @returns {*} The current OverlayScrollbars instance (for chaining).\r\n                 */\r\n                _base.scrollStop = function (param1, param2, param3) {\r\n                    _viewportElement.stop(param1, param2, param3);\r\n                    return _base;\r\n                };\r\n\r\n                /**\r\n                 * Returns all relevant elements.\r\n                 * @param elementName The name of the element which shall be returned.\r\n                 * @returns {{target: *, host: *, padding: *, viewport: *, content: *, scrollbarHorizontal: {scrollbar: *, track: *, handle: *}, scrollbarVertical: {scrollbar: *, track: *, handle: *}, scrollbarCorner: *} | *}\r\n                 */\r\n                _base.getElements = function (elementName) {\r\n                    var obj = {\r\n                        target: _targetElementNative,\r\n                        host: _hostElementNative,\r\n                        padding: _paddingElementNative,\r\n                        viewport: _viewportElementNative,\r\n                        content: _contentElementNative,\r\n                        scrollbarHorizontal: {\r\n                            scrollbar: _scrollbarHorizontalElement[0],\r\n                            track: _scrollbarHorizontalTrackElement[0],\r\n                            handle: _scrollbarHorizontalHandleElement[0]\r\n                        },\r\n                        scrollbarVertical: {\r\n                            scrollbar: _scrollbarVerticalElement[0],\r\n                            track: _scrollbarVerticalTrackElement[0],\r\n                            handle: _scrollbarVerticalHandleElement[0]\r\n                        },\r\n                        scrollbarCorner: _scrollbarCornerElement[0]\r\n                    };\r\n                    return type(elementName) == TYPES.s ? getObjectPropVal(obj, elementName) : obj;\r\n                };\r\n\r\n                /**\r\n                 * Returns a object which describes the current state of this instance.\r\n                 * @param stateProperty A specific property from the state object which shall be returned.\r\n                 * @returns {{widthAuto, heightAuto, overflowAmount, hideOverflow, hasOverflow, contentScrollSize, viewportSize, hostSize, autoUpdate} | *}\r\n                 */\r\n                _base.getState = function (stateProperty) {\r\n                    function prepare(obj) {\r\n                        if (!FRAMEWORK.isPlainObject(obj))\r\n                            return obj;\r\n                        var extended = extendDeep({}, obj);\r\n                        var changePropertyName = function (from, to) {\r\n                            if (extended[LEXICON.hOP](from)) {\r\n                                extended[to] = extended[from];\r\n                                delete extended[from];\r\n                            }\r\n                        };\r\n                        changePropertyName('w', _strWidth); //change w to width\r\n                        changePropertyName('h', _strHeight); //change h to height\r\n                        delete extended.c; //delete c (the 'changed' prop)\r\n                        return extended;\r\n                    };\r\n                    var obj = {\r\n                        destroyed: !!prepare(_destroyed),\r\n                        sleeping: !!prepare(_sleeping),\r\n                        autoUpdate: prepare(!_mutationObserversConnected),\r\n                        widthAuto: prepare(_widthAutoCache),\r\n                        heightAuto: prepare(_heightAutoCache),\r\n                        padding: prepare(_cssPaddingCache),\r\n                        overflowAmount: prepare(_overflowAmountCache),\r\n                        hideOverflow: prepare(_hideOverflowCache),\r\n                        hasOverflow: prepare(_hasOverflowCache),\r\n                        contentScrollSize: prepare(_contentScrollSizeCache),\r\n                        viewportSize: prepare(_viewportSize),\r\n                        hostSize: prepare(_hostSizeCache),\r\n                        documentMixed: prepare(_documentMixed)\r\n                    };\r\n                    return type(stateProperty) == TYPES.s ? getObjectPropVal(obj, stateProperty) : obj;\r\n                };\r\n\r\n                /**\r\n                 * Gets all or specific extension instance.\r\n                 * @param extName The name of the extension from which the instance shall be got.\r\n                 * @returns {{}} The instance of the extension with the given name or undefined if the instance couldn't be found.\r\n                 */\r\n                _base.ext = function (extName) {\r\n                    var result;\r\n                    var privateMethods = _extensionsPrivateMethods.split(' ');\r\n                    var i = 0;\r\n                    if (type(extName) == TYPES.s) {\r\n                        if (_extensions[LEXICON.hOP](extName)) {\r\n                            result = extendDeep({}, _extensions[extName]);\r\n                            for (; i < privateMethods.length; i++)\r\n                                delete result[privateMethods[i]];\r\n                        }\r\n                    }\r\n                    else {\r\n                        result = {};\r\n                        for (i in _extensions)\r\n                            result[i] = extendDeep({}, _base.ext(i));\r\n                    }\r\n                    return result;\r\n                };\r\n\r\n                /**\r\n                 * Adds a extension to this instance.\r\n                 * @param extName The name of the extension which shall be added.\r\n                 * @param extensionOptions The extension options which shall be used.\r\n                 * @returns {{}} The instance of the added extension or undefined if the extension couldn't be added properly.\r\n                 */\r\n                _base.addExt = function (extName, extensionOptions) {\r\n                    var registeredExtensionObj = _plugin.extension(extName);\r\n                    var instance;\r\n                    var instanceAdded;\r\n                    var instanceContract;\r\n                    var contractResult;\r\n                    var contractFulfilled = true;\r\n                    if (registeredExtensionObj) {\r\n                        if (!_extensions[LEXICON.hOP](extName)) {\r\n                            instance = registeredExtensionObj.extensionFactory.call(_base,\r\n                                extendDeep({}, registeredExtensionObj.defaultOptions),\r\n                                FRAMEWORK,\r\n                                COMPATIBILITY);\r\n\r\n                            if (instance) {\r\n                                instanceContract = instance.contract;\r\n                                if (type(instanceContract) == TYPES.f) {\r\n                                    contractResult = instanceContract(window);\r\n                                    contractFulfilled = type(contractResult) == TYPES.b ? contractResult : contractFulfilled;\r\n                                }\r\n                                if (contractFulfilled) {\r\n                                    _extensions[extName] = instance;\r\n                                    instanceAdded = instance.added;\r\n                                    if (type(instanceAdded) == TYPES.f)\r\n                                        instanceAdded(extensionOptions);\r\n\r\n                                    return _base.ext(extName);\r\n                                }\r\n                            }\r\n                        }\r\n                        else\r\n                            return _base.ext(extName);\r\n                    }\r\n                    else\r\n                        console.warn(\"A extension with the name \\\"\" + extName + \"\\\" isn't registered.\");\r\n                };\r\n\r\n                /**\r\n                 * Removes a extension from this instance.\r\n                 * @param extName The name of the extension which shall be removed.\r\n                 * @returns {boolean} True if the extension was removed, false otherwise e.g. if the extension wasn't added before.\r\n                 */\r\n                _base.removeExt = function (extName) {\r\n                    var instance = _extensions[extName];\r\n                    var instanceRemoved;\r\n                    if (instance) {\r\n                        delete _extensions[extName];\r\n\r\n                        instanceRemoved = instance.removed;\r\n                        if (type(instanceRemoved) == TYPES.f)\r\n                            instanceRemoved();\r\n\r\n                        return true;\r\n                    }\r\n                    return false;\r\n                };\r\n\r\n                /**\r\n                 * Constructs the plugin.\r\n                 * @param targetElement The element to which the plugin shall be applied.\r\n                 * @param options The initial options of the plugin.\r\n                 * @param extensions The extension(s) which shall be added right after the initialization.\r\n                 * @returns {boolean} True if the plugin was successfully initialized, false otherwise.\r\n                 */\r\n                function construct(targetElement, options, extensions) {\r\n                    _defaultOptions = globals.defaultOptions;\r\n                    _nativeScrollbarStyling = globals.nativeScrollbarStyling;\r\n                    _nativeScrollbarSize = extendDeep({}, globals.nativeScrollbarSize);\r\n                    _nativeScrollbarIsOverlaid = extendDeep({}, globals.nativeScrollbarIsOverlaid);\r\n                    _overlayScrollbarDummySize = extendDeep({}, globals.overlayScrollbarDummySize);\r\n                    _rtlScrollBehavior = extendDeep({}, globals.rtlScrollBehavior);\r\n\r\n                    //parse & set options but don't update\r\n                    setOptions(extendDeep({}, _defaultOptions, options));\r\n\r\n                    _cssCalc = globals.cssCalc;\r\n                    _msieVersion = globals.msie;\r\n                    _autoUpdateRecommended = globals.autoUpdateRecommended;\r\n                    _supportTransition = globals.supportTransition;\r\n                    _supportTransform = globals.supportTransform;\r\n                    _supportPassiveEvents = globals.supportPassiveEvents;\r\n                    _supportResizeObserver = globals.supportResizeObserver;\r\n                    _supportMutationObserver = globals.supportMutationObserver;\r\n                    _restrictedMeasuring = globals.restrictedMeasuring;\r\n                    _documentElement = FRAMEWORK(targetElement.ownerDocument);\r\n                    _documentElementNative = _documentElement[0];\r\n                    _windowElement = FRAMEWORK(_documentElementNative.defaultView || _documentElementNative.parentWindow);\r\n                    _windowElementNative = _windowElement[0];\r\n                    _htmlElement = findFirst(_documentElement, 'html');\r\n                    _bodyElement = findFirst(_htmlElement, 'body');\r\n                    _targetElement = FRAMEWORK(targetElement);\r\n                    _targetElementNative = _targetElement[0];\r\n                    _isTextarea = _targetElement.is('textarea');\r\n                    _isBody = _targetElement.is('body');\r\n                    _documentMixed = _documentElementNative !== document;\r\n\r\n                    /* On a div Element The if checks only whether:\r\n                     * - the targetElement has the class \"os-host\"\r\n                     * - the targetElement has a a child with the class \"os-padding\"\r\n                     * \r\n                     * If that's the case, its assumed the DOM has already the following structure:\r\n                     * (The \".os-host\" element is the targetElement)\r\n                     *\r\n                     *  <div class=\"os-host\">\r\n                     *      <div class=\"os-resize-observer-host\"></div>\r\n                     *      <div class=\"os-padding\">\r\n                     *          <div class=\"os-viewport\">\r\n                     *              <div class=\"os-content\"></div>\r\n                     *          </div>\r\n                     *      </div>\r\n                     *      <div class=\"os-scrollbar os-scrollbar-horizontal \">\r\n                     *          <div class=\"os-scrollbar-track\">\r\n                     *              <div class=\"os-scrollbar-handle\"></div>\r\n                     *          </div>\r\n                     *      </div>\r\n                     *      <div class=\"os-scrollbar os-scrollbar-vertical\">\r\n                     *          <div class=\"os-scrollbar-track\">\r\n                     *              <div class=\"os-scrollbar-handle\"></div>\r\n                     *          </div>\r\n                     *      </div>\r\n                     *      <div class=\"os-scrollbar-corner\"></div>\r\n                     *  </div>\r\n                     *\r\n                     * =====================================================================================\r\n                     * \r\n                     * On a Textarea Element The if checks only whether:\r\n                     * - the targetElement has the class \"os-textarea\" \r\n                     * - the targetElement is inside a element with the class \"os-content\" \r\n                     * \r\n                     * If that's the case, its assumed the DOM has already the following structure:\r\n                     * (The \".os-textarea\" (textarea) element is the targetElement)\r\n                     *\r\n                     *  <div class=\"os-host-textarea\">\r\n                     *      <div class=\"os-resize-observer-host\"></div>\r\n                     *      <div class=\"os-padding os-text-inherit\">\r\n                     *          <div class=\"os-viewport os-text-inherit\">\r\n                     *              <div class=\"os-content os-text-inherit\">\r\n                     *                  <div class=\"os-textarea-cover\"></div>\r\n                     *                  <textarea class=\"os-textarea os-text-inherit\"></textarea>\r\n                     *              </div>\r\n                     *          </div>\r\n                     *      </div>\r\n                     *      <div class=\"os-scrollbar os-scrollbar-horizontal \">\r\n                     *          <div class=\"os-scrollbar-track\">\r\n                     *              <div class=\"os-scrollbar-handle\"></div>\r\n                     *          </div>\r\n                     *      </div>\r\n                     *      <div class=\"os-scrollbar os-scrollbar-vertical\">\r\n                     *          <div class=\"os-scrollbar-track\">\r\n                     *              <div class=\"os-scrollbar-handle\"></div>\r\n                     *          </div>\r\n                     *      </div>\r\n                     *      <div class=\"os-scrollbar-corner\"></div>\r\n                     *  </div>\r\n                     */\r\n                    _domExists = _isTextarea\r\n                        ? _targetElement.hasClass(_classNameTextareaElement) && _targetElement.parent().hasClass(_classNameContentElement)\r\n                        : _targetElement.hasClass(_classNameHostElement) && _targetElement.children(_strDot + _classNamePaddingElement)[LEXICON.l];\r\n\r\n                    var initBodyScroll;\r\n                    var bodyMouseTouchDownListener;\r\n\r\n                    //check if the plugin hasn't to be initialized\r\n                    if (_nativeScrollbarIsOverlaid.x && _nativeScrollbarIsOverlaid.y && !_currentPreparedOptions.nativeScrollbarsOverlaid.initialize) {\r\n                        dispatchCallback('onInitializationWithdrawn');\r\n                        if (_domExists) {\r\n                            setupStructureDOM(true);\r\n                            setupScrollbarsDOM(true);\r\n                            setupScrollbarCornerDOM(true);\r\n                        }\r\n\r\n                        _destroyed = true;\r\n                        _sleeping = true;\r\n\r\n                        return _base;\r\n                    }\r\n\r\n                    if (_isBody) {\r\n                        initBodyScroll = {};\r\n                        initBodyScroll.l = MATH.max(_targetElement[_strScrollLeft](), _htmlElement[_strScrollLeft](), _windowElement[_strScrollLeft]());\r\n                        initBodyScroll.t = MATH.max(_targetElement[_strScrollTop](), _htmlElement[_strScrollTop](), _windowElement[_strScrollTop]());\r\n\r\n                        bodyMouseTouchDownListener = function () {\r\n                            _viewportElement.removeAttr(LEXICON.ti);\r\n                            setupResponsiveEventListener(_viewportElement, _strMouseTouchDownEvent, bodyMouseTouchDownListener, true, true);\r\n                        }\r\n                    }\r\n\r\n                    //build OverlayScrollbars DOM\r\n                    setupStructureDOM();\r\n                    setupScrollbarsDOM();\r\n                    setupScrollbarCornerDOM();\r\n\r\n                    //create OverlayScrollbars events\r\n                    setupStructureEvents();\r\n                    setupScrollbarEvents(true);\r\n                    setupScrollbarEvents(false);\r\n                    setupScrollbarCornerEvents();\r\n\r\n                    //create mutation observers\r\n                    createMutationObservers();\r\n\r\n                    //build resize observer for the host element\r\n                    setupResizeObserver(_sizeObserverElement, hostOnResized);\r\n\r\n                    if (_isBody) {\r\n                        //apply the body scroll to handle it right in the update method\r\n                        _viewportElement[_strScrollLeft](initBodyScroll.l)[_strScrollTop](initBodyScroll.t);\r\n\r\n                        //set the focus on the viewport element so you dont have to click on the page to use keyboard keys (up / down / space) for scrolling\r\n                        if (document.activeElement == targetElement && _viewportElementNative.focus) {\r\n                            //set a tabindex to make the viewportElement focusable\r\n                            _viewportElement.attr(LEXICON.ti, '-1');\r\n                            _viewportElementNative.focus();\r\n\r\n                            /* the tabindex has to be removed due to;\r\n                             * If you set the tabindex attribute on an <div>, then its child content cannot be scrolled with the arrow keys unless you set tabindex on the content, too\r\n                             * https://developer.mozilla.org/en-US/docs/Web/HTML/Global_attributes/tabindex\r\n                             */\r\n                            setupResponsiveEventListener(_viewportElement, _strMouseTouchDownEvent, bodyMouseTouchDownListener, false, true);\r\n                        }\r\n                    }\r\n\r\n                    //update for the first time & initialize cache\r\n                    _base.update(_strAuto);\r\n\r\n                    //the plugin is initialized now!\r\n                    _initialized = true;\r\n                    dispatchCallback('onInitialized');\r\n\r\n                    //call all callbacks which would fire before the initialized was complete\r\n                    each(_callbacksInitQeueue, function (index, value) { dispatchCallback(value.n, value.a); });\r\n                    _callbacksInitQeueue = [];\r\n\r\n                    //add extensions\r\n                    if (type(extensions) == TYPES.s)\r\n                        extensions = [extensions];\r\n                    if (COMPATIBILITY.isA(extensions))\r\n                        each(extensions, function (index, value) { _base.addExt(value); });\r\n                    else if (FRAMEWORK.isPlainObject(extensions))\r\n                        each(extensions, function (key, value) { _base.addExt(key, value); });\r\n\r\n                    //add the transition class for transitions AFTER the first update & AFTER the applied extensions (for preventing unwanted transitions)\r\n                    setTimeout(function () {\r\n                        if (_supportTransition && !_destroyed)\r\n                            addClass(_hostElement, _classNameHostTransition);\r\n                    }, 333);\r\n\r\n                    return _base;\r\n                }\r\n\r\n                if (_plugin.valid(construct(pluginTargetElement, options, extensions))) {\r\n                    INSTANCES(pluginTargetElement, _base);\r\n                }\r\n\r\n                return _base;\r\n            }\r\n\r\n            /**\r\n             * Initializes a new OverlayScrollbarsInstance object or changes options if already initialized or returns the current instance.\r\n             * @param pluginTargetElements The elements to which the Plugin shall be initialized.\r\n             * @param options The custom options with which the plugin shall be initialized.\r\n             * @param extensions The extension(s) which shall be added right after initialization.\r\n             * @returns {*}\r\n             */\r\n            _plugin = window[PLUGINNAME] = function (pluginTargetElements, options, extensions) {\r\n                if (arguments[LEXICON.l] === 0)\r\n                    return this;\r\n\r\n                var arr = [];\r\n                var optsIsPlainObj = FRAMEWORK.isPlainObject(options);\r\n                var inst;\r\n                var result;\r\n\r\n                //pluginTargetElements is null or undefined\r\n                if (!pluginTargetElements)\r\n                    return optsIsPlainObj || !options ? result : arr;\r\n\r\n                /*\r\n                   pluginTargetElements will be converted to:\r\n                   1. A jQueryElement Array\r\n                   2. A HTMLElement Array\r\n                   3. A Array with a single HTML Element\r\n                   so pluginTargetElements is always a array.\r\n                */\r\n                pluginTargetElements = pluginTargetElements[LEXICON.l] != undefined ? pluginTargetElements : [pluginTargetElements[0] || pluginTargetElements];\r\n                initOverlayScrollbarsStatics();\r\n\r\n                if (pluginTargetElements[LEXICON.l] > 0) {\r\n                    if (optsIsPlainObj) {\r\n                        FRAMEWORK.each(pluginTargetElements, function (i, v) {\r\n                            inst = v;\r\n                            if (inst !== undefined)\r\n                                arr.push(OverlayScrollbarsInstance(inst, options, extensions, _pluginsGlobals, _pluginsAutoUpdateLoop));\r\n                        });\r\n                    }\r\n                    else {\r\n                        FRAMEWORK.each(pluginTargetElements, function (i, v) {\r\n                            inst = INSTANCES(v);\r\n                            if ((options === '!' && _plugin.valid(inst)) || (COMPATIBILITY.type(options) == TYPES.f && options(v, inst)))\r\n                                arr.push(inst);\r\n                            else if (options === undefined)\r\n                                arr.push(inst);\r\n                        });\r\n                    }\r\n                    result = arr[LEXICON.l] === 1 ? arr[0] : arr;\r\n                }\r\n                return result;\r\n            };\r\n\r\n            /**\r\n             * Returns a object which contains global information about the plugin and each instance of it.\r\n             * The returned object is just a copy, that means that changes to the returned object won't have any effect to the original object.\r\n             */\r\n            _plugin.globals = function () {\r\n                initOverlayScrollbarsStatics();\r\n                var globals = FRAMEWORK.extend(true, {}, _pluginsGlobals);\r\n                delete globals['msie'];\r\n                return globals;\r\n            };\r\n\r\n            /**\r\n             * Gets or Sets the default options for each new plugin initialization.\r\n             * @param newDefaultOptions The object with which the default options shall be extended.\r\n             */\r\n            _plugin.defaultOptions = function (newDefaultOptions) {\r\n                initOverlayScrollbarsStatics();\r\n                var currDefaultOptions = _pluginsGlobals.defaultOptions;\r\n                if (newDefaultOptions === undefined)\r\n                    return FRAMEWORK.extend(true, {}, currDefaultOptions);\r\n\r\n                //set the new default options\r\n                _pluginsGlobals.defaultOptions = FRAMEWORK.extend(true, {}, currDefaultOptions, _pluginsOptions._validate(newDefaultOptions, _pluginsOptions._template, true, currDefaultOptions)._default);\r\n            };\r\n\r\n            /**\r\n             * Checks whether the passed instance is a non-destroyed OverlayScrollbars instance.\r\n             * @param osInstance The potential OverlayScrollbars instance which shall be checked.\r\n             * @returns {boolean} True if the passed value is a non-destroyed OverlayScrollbars instance, false otherwise.\r\n             */\r\n            _plugin.valid = function (osInstance) {\r\n                return osInstance instanceof _plugin && !osInstance.getState().destroyed;\r\n            };\r\n\r\n            /**\r\n             * Registers, Unregisters or returns a extension.\r\n             * Register: Pass the name and the extension. (defaultOptions is optional)\r\n             * Unregister: Pass the name and anything except a function as extension parameter.\r\n             * Get extension: Pass the name of the extension which shall be got.\r\n             * Get all extensions: Pass no arguments.\r\n             * @param extensionName The name of the extension which shall be registered, unregistered or returned.\r\n             * @param extension A function which generates the instance of the extension or anything other to remove a already registered extension.\r\n             * @param defaultOptions The default options which shall be used for the registered extension.\r\n             */\r\n            _plugin.extension = function (extensionName, extension, defaultOptions) {\r\n                var extNameTypeString = COMPATIBILITY.type(extensionName) == TYPES.s;\r\n                var argLen = arguments[LEXICON.l];\r\n                var i = 0;\r\n                if (argLen < 1 || !extNameTypeString) {\r\n                    //return a copy of all extension objects\r\n                    return FRAMEWORK.extend(true, { length: _pluginsExtensions[LEXICON.l] }, _pluginsExtensions);\r\n                }\r\n                else if (extNameTypeString) {\r\n                    if (COMPATIBILITY.type(extension) == TYPES.f) {\r\n                        //register extension\r\n                        _pluginsExtensions.push({\r\n                            name: extensionName,\r\n                            extensionFactory: extension,\r\n                            defaultOptions: defaultOptions\r\n                        });\r\n                    }\r\n                    else {\r\n                        for (; i < _pluginsExtensions[LEXICON.l]; i++) {\r\n                            if (_pluginsExtensions[i].name === extensionName) {\r\n                                if (argLen > 1)\r\n                                    _pluginsExtensions.splice(i, 1); //remove extension\r\n                                else\r\n                                    return FRAMEWORK.extend(true, {}, _pluginsExtensions[i]); //return extension with the given name\r\n                            }\r\n                        }\r\n                    }\r\n                }\r\n            };\r\n\r\n            return _plugin;\r\n        })();\r\n\r\n        if (JQUERY && JQUERY.fn) {\r\n            /**\r\n             * The jQuery initialization interface.\r\n             * @param options The initial options for the construction of the plugin. To initialize the plugin, this option has to be a object! If it isn't a object, the instance(s) are returned and the plugin wont be initialized.\r\n             * @param extensions The extension(s) which shall be added right after initialization.\r\n             * @returns {*} After initialization it returns the jQuery element array, else it returns the instance(s) of the elements which are selected.\r\n             */\r\n            JQUERY.fn.overlayScrollbars = function (options, extensions) {\r\n                var _elements = this;\r\n                if (JQUERY.isPlainObject(options)) {\r\n                    JQUERY.each(_elements, function () { PLUGIN(this, options, extensions); });\r\n                    return _elements;\r\n                }\r\n                else\r\n                    return PLUGIN(_elements, options);\r\n            };\r\n        }\r\n        return PLUGIN;\r\n    }\r\n));\n\n//# sourceURL=webpack:///./node_modules/overlayscrollbars/js/OverlayScrollbars.js?");

/***/ })

}]);
//# sourceMappingURL=7.js.map