{"version":3,"sources":["mobile-swipe-menu.js"],"names":[],"mappings":";;;;;;;;EAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA","file":"mobile-swipe-menu.js","sourcesContent":["/******/ (function(modules) { // webpackBootstrap\n/******/ \t// The module cache\n/******/ \tvar installedModules = {};\n/******/\n/******/ \t// The require function\n/******/ \tfunction __webpack_require__(moduleId) {\n/******/\n/******/ \t\t// Check if module is in cache\n/******/ \t\tif(installedModules[moduleId]) {\n/******/ \t\t\treturn installedModules[moduleId].exports;\n/******/ \t\t}\n/******/ \t\t// Create a new module (and put it into the cache)\n/******/ \t\tvar module = installedModules[moduleId] = {\n/******/ \t\t\ti: moduleId,\n/******/ \t\t\tl: false,\n/******/ \t\t\texports: {}\n/******/ \t\t};\n/******/\n/******/ \t\t// Execute the module function\n/******/ \t\tmodules[moduleId].call(module.exports, module, module.exports, __webpack_require__);\n/******/\n/******/ \t\t// Flag the module as loaded\n/******/ \t\tmodule.l = true;\n/******/\n/******/ \t\t// Return the exports of the module\n/******/ \t\treturn module.exports;\n/******/ \t}\n/******/\n/******/\n/******/ \t// expose the modules object (__webpack_modules__)\n/******/ \t__webpack_require__.m = modules;\n/******/\n/******/ \t// expose the module cache\n/******/ \t__webpack_require__.c = installedModules;\n/******/\n/******/ \t// define getter function for harmony exports\n/******/ \t__webpack_require__.d = function(exports, name, getter) {\n/******/ \t\tif(!__webpack_require__.o(exports, name)) {\n/******/ \t\t\tObject.defineProperty(exports, name, { enumerable: true, get: getter });\n/******/ \t\t}\n/******/ \t};\n/******/\n/******/ \t// define __esModule on exports\n/******/ \t__webpack_require__.r = function(exports) {\n/******/ \t\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n/******/ \t\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n/******/ \t\t}\n/******/ \t\tObject.defineProperty(exports, '__esModule', { value: true });\n/******/ \t};\n/******/\n/******/ \t// create a fake namespace object\n/******/ \t// mode & 1: value is a module id, require it\n/******/ \t// mode & 2: merge all properties of value into the ns\n/******/ \t// mode & 4: return value when already ns object\n/******/ \t// mode & 8|1: behave like require\n/******/ \t__webpack_require__.t = function(value, mode) {\n/******/ \t\tif(mode & 1) value = __webpack_require__(value);\n/******/ \t\tif(mode & 8) return value;\n/******/ \t\tif((mode & 4) && typeof value === 'object' && value && value.__esModule) return value;\n/******/ \t\tvar ns = Object.create(null);\n/******/ \t\t__webpack_require__.r(ns);\n/******/ \t\tObject.defineProperty(ns, 'default', { enumerable: true, value: value });\n/******/ \t\tif(mode & 2 && typeof value != 'string') for(var key in value) __webpack_require__.d(ns, key, function(key) { return value[key]; }.bind(null, key));\n/******/ \t\treturn ns;\n/******/ \t};\n/******/\n/******/ \t// getDefaultExport function for compatibility with non-harmony modules\n/******/ \t__webpack_require__.n = function(module) {\n/******/ \t\tvar getter = module && module.__esModule ?\n/******/ \t\t\tfunction getDefault() { return module['default']; } :\n/******/ \t\t\tfunction getModuleExports() { return module; };\n/******/ \t\t__webpack_require__.d(getter, 'a', getter);\n/******/ \t\treturn getter;\n/******/ \t};\n/******/\n/******/ \t// Object.prototype.hasOwnProperty.call\n/******/ \t__webpack_require__.o = function(object, property) { return Object.prototype.hasOwnProperty.call(object, property); };\n/******/\n/******/ \t// __webpack_public_path__\n/******/ \t__webpack_require__.p = \"\";\n/******/\n/******/\n/******/ \t// Load entry module and return exports\n/******/ \treturn __webpack_require__(__webpack_require__.s = \"./src/js/app.js\");\n/******/ })\n/************************************************************************/\n/******/ ({\n\n/***/ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\":\n/*!***************************************************************!*\\\n !*** ./node_modules/@babel/runtime/helpers/classCallCheck.js ***!\n \\***************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\n\nmodule.exports = _classCallCheck;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n\n/***/ }),\n\n/***/ \"./node_modules/@babel/runtime/helpers/createClass.js\":\n/*!************************************************************!*\\\n !*** ./node_modules/@babel/runtime/helpers/createClass.js ***!\n \\************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nfunction _defineProperties(target, props) {\n for (var i = 0; i < props.length; i++) {\n var descriptor = props[i];\n descriptor.enumerable = descriptor.enumerable || false;\n descriptor.configurable = true;\n if (\"value\" in descriptor) descriptor.writable = true;\n Object.defineProperty(target, descriptor.key, descriptor);\n }\n}\n\nfunction _createClass(Constructor, protoProps, staticProps) {\n if (protoProps) _defineProperties(Constructor.prototype, protoProps);\n if (staticProps) _defineProperties(Constructor, staticProps);\n return Constructor;\n}\n\nmodule.exports = _createClass;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n\n/***/ }),\n\n/***/ \"./node_modules/@babel/runtime/helpers/defineProperty.js\":\n/*!***************************************************************!*\\\n !*** ./node_modules/@babel/runtime/helpers/defineProperty.js ***!\n \\***************************************************************/\n/*! no static exports found */\n/***/ (function(module, exports) {\n\nfunction _defineProperty(obj, key, value) {\n if (key in obj) {\n Object.defineProperty(obj, key, {\n value: value,\n enumerable: true,\n configurable: true,\n writable: true\n });\n } else {\n obj[key] = value;\n }\n\n return obj;\n}\n\nmodule.exports = _defineProperty;\nmodule.exports[\"default\"] = module.exports, module.exports.__esModule = true;\n\n/***/ }),\n\n/***/ \"./src/js/app.js\":\n/*!***********************!*\\\n !*** ./src/js/app.js ***!\n \\***********************/\n/*! no exports provided */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony import */ var _menu__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! ./menu */ \"./src/js/menu.js\");\n\nwindow.MobileSwipeMenu = _menu__WEBPACK_IMPORTED_MODULE_0__[\"default\"];\n\n/***/ }),\n\n/***/ \"./src/js/menu.js\":\n/*!************************!*\\\n !*** ./src/js/menu.js ***!\n \\************************/\n/*! exports provided: default */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"default\", function() { return _default; });\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__);\n/* harmony import */ var _swipe__WEBPACK_IMPORTED_MODULE_3__ = __webpack_require__(/*! ./swipe */ \"./src/js/swipe.js\");\n\n\n\n\n\nvar _default = /*#__PURE__*/function () {\n /**\r\n * @description Operating mode. Possible values: `right`, `left`\r\n * @type string\r\n */\n\n /**\r\n * @deprecated Will be deleted in version 3.0. Use `disableSwipe` or `enableSwipe` methods instead.\r\n * @description The status of whether the swipe will run.\r\n * @type boolean\r\n */\n\n /**\r\n * @description Menu width.\r\n * @type number\r\n * */\n\n /**\r\n * @description Side grip width. Does not work if `enableBodyHook` is enabled.\r\n * @type number\r\n * */\n\n /**\r\n * @description Use percentage of your window as hookWidth.\r\n * @type boolean\r\n * */\n\n /**\r\n * @description Capture mode. If enabled, the entire screen is taken into account.\r\n * @type boolean\r\n * */\n\n /**\r\n * @description Scrolling bar width.\r\n * @types number, boolean\r\n * */\n\n /**\r\n * @description Menu open status.\r\n * @type boolean\r\n * */\n\n /**\r\n * @description Event set.\r\n * @type object\r\n * */\n\n /**\r\n * @description Menu element in document.\r\n * @type object\r\n * */\n\n /**\r\n * @description Window width.\r\n * @type number\r\n * */\n\n /**\r\n * @constructor\r\n * @param {string, object} selector - Menu element or selector in document.\r\n * @param {object} options - Customization options.\r\n * @param {string} options.mode - Operating mode. Possible values: right, left\r\n * @param {number} options.width - Menu width.\r\n * @param {number} options.hookWidth - Side grip width. Does not work if `enableBodyHook` is enabled.\r\n * @param {boolean} options.useHookWidthPercentage - Use percentage of your window as hookWidth.\r\n * @param {boolean} options.enableBodyHook - Capture mode. If enabled, the entire screen is taken into account.\r\n * @param {object} options.events - Event set.\r\n * @param {function} options.events.start - Event starting swiping menu.\r\n * @param {function} options.events.stop - Event stopping swiping menu.\r\n * @param {function} options.events.opened - Event menu is opened.\r\n * @param {function} options.events.closed - Event menu is closed.\r\n * @param {function} options.events.drag - Event menu is swiping.\r\n * */\n function _default(selector) {\n var options = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : {};\n\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, _default);\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2___default()(this, \"_mode\", void 0);\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2___default()(this, \"lock\", false);\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2___default()(this, \"_width\", void 0);\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2___default()(this, \"_hookWidth\", void 0);\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2___default()(this, \"_useHookWidthPercentage\", void 0);\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2___default()(this, \"_enableBodyHook\", void 0);\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2___default()(this, \"_scrollWidth\", false);\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2___default()(this, \"_isOpened\", false);\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2___default()(this, \"_events\", void 0);\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2___default()(this, \"_element\", void 0);\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2___default()(this, \"_windowWidth\", void 0);\n\n var _options$mode = options.mode,\n mode = _options$mode === void 0 ? 'right' : _options$mode,\n _options$width = options.width,\n width = _options$width === void 0 ? 0 : _options$width,\n _options$hookWidth = options.hookWidth,\n hookWidth = _options$hookWidth === void 0 ? 30 : _options$hookWidth,\n _options$useHookWidth = options.useHookWidthPercentage,\n useHookWidthPercentage = _options$useHookWidth === void 0 ? false : _options$useHookWidth,\n _options$enableBodyHo = options.enableBodyHook,\n enableBodyHook = _options$enableBodyHo === void 0 ? false : _options$enableBodyHo,\n _options$events = options.events,\n events = _options$events === void 0 ? {} : _options$events;\n this._mode = mode;\n this._width = width;\n this._hookWidth = hookWidth;\n this._useHookWidthPercentage = useHookWidthPercentage;\n this._enableBodyHook = enableBodyHook;\n this._events = Object.assign({\n start: function start() {},\n stop: function stop() {},\n opened: function opened() {},\n closed: function closed() {},\n drag: function drag() {}\n }, events);\n\n this._connectElement(selector);\n\n if (!enableBodyHook) {\n this._createHook();\n }\n\n this._init();\n }\n /**\r\n * @description Creating a menu element in a document.\r\n * @param {string, object} selector - Menu element or selector in document.\r\n * */\n\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(_default, [{\n key: \"_connectElement\",\n value: function _connectElement(selector) {\n this._element = typeof selector === 'string' ? document.querySelector(selector) : selector;\n this._element.style.height = '100%';\n this._element.style.top = '0';\n this._element.style.zIndex = '1000';\n this._element.style.position = 'fixed';\n this._element.style.willChange = 'transform';\n this._windowWidth = window.innerWidth - this._getScrollWidth();\n this.setWidth(this._width || this._windowWidth);\n }\n /**\r\n * @description Side grip creation.\r\n * */\n\n }, {\n key: \"_createHook\",\n value: function _createHook() {\n var hook = document.createElement('div');\n var hookWidthValue = this._useHookWidthPercentage ? this._windowWidth * this._hookWidth / 100 : this._hookWidth;\n hook.style.width = hookWidthValue + 'px';\n hook.style.height = '100%';\n hook.style.top = '0';\n hook.style.position = 'absolute';\n hook.style.cursor = 'pointer';\n\n if (this._mode === 'right') {\n hook.style.left = \"-\".concat(hookWidthValue, \"px\");\n } else {\n hook.style.right = \"-\".concat(hookWidthValue, \"px\");\n }\n\n this._element.append(hook);\n }\n /**\r\n * @description Opening the menu with mode `right`.\r\n * */\n\n }, {\n key: \"_openRightMenu\",\n value: function _openRightMenu() {\n this._transition();\n\n this._element.style.transform = \"translateX(-\".concat(this._width, \"px)\");\n this._isOpened = true;\n\n this._events.opened.bind(this)();\n }\n /**\r\n * @description Closing the menu with mode `right`.\r\n * */\n\n }, {\n key: \"_closeRightMenu\",\n value: function _closeRightMenu() {\n this._transition();\n\n this._element.style.transform = 'translateX(0px)';\n this._isOpened = false;\n\n this._events.closed.bind(this)();\n }\n /**\r\n * @description Opening the menu with mode `left`.\r\n * */\n\n }, {\n key: \"_openLeftMenu\",\n value: function _openLeftMenu() {\n this._transition();\n\n this._element.style.transform = \"translateX(\".concat(this._width, \"px)\");\n this._isOpened = true;\n\n this._events.opened.bind(this)();\n }\n /**\r\n * @description Closing the menu with mode `left`.\r\n * */\n\n }, {\n key: \"_closeLeftMenu\",\n value: function _closeLeftMenu() {\n this._transition();\n\n this._element.style.transform = 'translateX(0px)';\n this._isOpened = false;\n\n this._events.closed.bind(this)();\n }\n /**\r\n * @description Smooth movement.\r\n * */\n\n }, {\n key: \"_transition\",\n value: function _transition() {\n var _this = this;\n\n this._element.style.transitionDuration = '300ms';\n setTimeout(function () {\n _this._element.style.transitionDuration = '0ms';\n }, 200);\n }\n /**\r\n * @description Initialization.\r\n * */\n\n }, {\n key: \"_init\",\n value: function _init() {\n var self = this;\n var target = this._element;\n var hookTarget = this._enableBodyHook ? document.body : this._element;\n hookTarget.style['cursor'] = 'auto';\n hookTarget.style['touch-action'] = 'pan-y';\n hookTarget.style['-ms-touch-action'] = 'pan-y';\n var swipe = new _swipe__WEBPACK_IMPORTED_MODULE_3__[\"Swipe\"](hookTarget);\n\n swipe.start = function (e) {\n if (self.lock && !self._isOpened) {\n return false;\n }\n\n var matrix = new WebKitCSSMatrix(getComputedStyle(target).transform).m41;\n var toucheX = this.getTouches(e).offsetX;\n\n if (matrix) {\n this.set('xStart', toucheX - matrix);\n }\n\n self._events.start.bind(self)(this);\n };\n\n swipe.drag = function (e) {\n if (self.lock && !self._isOpened) {\n return false;\n }\n\n if (['left', 'right'].indexOf(this.currentDirection) >= 0 && e.type === 'touchmove') {\n e.stopImmediatePropagation();\n e.stopPropagation();\n\n if (e.cancelable) {\n e.preventDefault();\n }\n }\n\n self._events.drag.bind(self)(this);\n\n var xCurrent = this.get('xCurrent');\n\n var boxLeft = Math.floor(target.getBoundingClientRect().left) - (self._windowWidth - self._width);\n\n if (self._mode === 'right') {\n switch (this.currentDirection) {\n case 'left':\n {\n if (self._width >= boxLeft) {\n if (-xCurrent > self._width) {\n xCurrent = -self._width;\n } else if (xCurrent > 0) {\n xCurrent = 0;\n }\n\n target.style.transform = \"translateX(\".concat(xCurrent, \"px)\");\n }\n\n break;\n }\n\n case 'right':\n {\n if (self._windowWidth > boxLeft) {\n if (-xCurrent < 0) {\n xCurrent = 0;\n } else if (-xCurrent > self._width) {\n xCurrent = -self._width;\n }\n\n target.style.transform = \"translateX(\".concat(xCurrent, \"px)\");\n }\n\n break;\n }\n }\n } else if (self._mode === 'left') {\n switch (this.currentDirection) {\n case 'right':\n {\n if (boxLeft < 0) {\n if (xCurrent > self._width) {\n xCurrent = self._width;\n } else if (xCurrent <= 0) {\n xCurrent = 0;\n }\n\n target.style.transform = \"translateX(\".concat(xCurrent, \"px)\");\n }\n\n break;\n }\n\n case 'left':\n {\n if (xCurrent >= self._width) {\n xCurrent = self._width;\n } else if (xCurrent < 0) {\n xCurrent = 0;\n }\n\n target.style.transform = \"translateX(\".concat(xCurrent, \"px)\");\n break;\n }\n }\n }\n };\n\n swipe.stop = function () {\n if (self.lock && !self._isOpened) {\n return false;\n }\n\n var boxLeft = Math.floor(target.getBoundingClientRect().left);\n\n if (self._mode === 'right') {\n boxLeft = boxLeft - (self._windowWidth - self._width);\n\n switch (this.currentDirection) {\n case 'left':\n {\n if (boxLeft < self._width) {\n if (boxLeft < self._width - 30) {\n self._openRightMenu();\n } else {\n self._closeRightMenu();\n }\n } else {\n target.style.transform = 'translateX(0px)';\n }\n\n break;\n }\n\n case 'right':\n {\n if (boxLeft > 0) {\n if (boxLeft > 30) {\n self._closeRightMenu();\n } else {\n self._openRightMenu();\n }\n } else {\n target.style.transform = \"translateX(-\".concat(self._width, \"px)\");\n }\n\n break;\n }\n }\n } else if (self._mode === 'left') {\n switch (this.currentDirection) {\n case 'right':\n {\n if (-boxLeft < self._width) {\n if (-boxLeft < self._width - 30) {\n self._openLeftMenu();\n } else {\n self._closeLeftMenu();\n }\n } else {\n target.style.transform = 'translateX(0px)';\n }\n\n break;\n }\n\n case 'left':\n {\n if (boxLeft < 0) {\n if (boxLeft < -30) {\n self._closeLeftMenu();\n } else {\n self._openLeftMenu();\n }\n } else {\n target.style.transform = \"translateX(\".concat(self._width, \"px)\");\n }\n\n break;\n }\n }\n }\n\n self._events.stop.bind(self)(this);\n };\n }\n /**\r\n * @description Getting the width of the scrollbar.\r\n * */\n\n }, {\n key: \"_getScrollWidth\",\n value: function _getScrollWidth() {\n var result = this._scrollWidth;\n\n if (result === false) {\n var div = document.createElement('div');\n div.style.overflowY = 'scroll';\n div.style.width = '50px';\n div.style.height = '50px';\n document.body.append(div);\n this._scrollWidth = div.offsetWidth - div.clientWidth;\n div.remove();\n }\n\n return result;\n }\n /**\r\n * @deprecated Since version 2.1 Will be deleted in version 3.0. Use openMenu instead.\r\n */\n\n }, {\n key: \"open\",\n value: function open() {\n this.openMenu();\n }\n /**\r\n * @description Opens the menu.\r\n * */\n\n }, {\n key: \"openMenu\",\n value: function openMenu() {\n if (this._mode === 'right') {\n this._openRightMenu();\n } else {\n this._openLeftMenu();\n }\n }\n /**\r\n * @deprecated Since version 2.1 Will be deleted in version 3.0. Use closeMenu instead.\r\n */\n\n }, {\n key: \"close\",\n value: function close() {\n this.closeMenu();\n }\n /**\r\n * @description Closes the menu.\r\n * */\n\n }, {\n key: \"closeMenu\",\n value: function closeMenu() {\n if (this._mode === 'right') {\n this._closeRightMenu();\n } else {\n this._closeLeftMenu();\n }\n }\n /**\r\n * @deprecated Since version 2.1 Will be deleted in version 3.0. Use toggleMenu instead.\r\n */\n\n }, {\n key: \"toggle\",\n value: function toggle() {\n this.toggleMenu();\n }\n /**\r\n * @description Opens or closes the menu.\r\n * */\n\n }, {\n key: \"toggleMenu\",\n value: function toggleMenu() {\n if (this._isOpened) {\n this.closeMenu();\n } else {\n this.openMenu();\n }\n }\n /**\r\n * @description Disables menu swiping.\r\n * */\n\n }, {\n key: \"disableSwipe\",\n value: function disableSwipe() {\n this.lock = true;\n }\n /**\r\n * @description Enables menu swiping.\r\n * */\n\n }, {\n key: \"enableSwipe\",\n value: function enableSwipe() {\n this.lock = false;\n }\n /**\r\n * @description Set width menu\r\n * @param width float Numeric floating point value\r\n * */\n\n }, {\n key: \"setWidth\",\n value: function setWidth() {\n var width = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : 0;\n this._width = width;\n this._element.style.width = this._width + 'px';\n this._element.style[this._mode] = -this._width + 'px';\n }\n }]);\n\n return _default;\n}();\n\n\n\n/***/ }),\n\n/***/ \"./src/js/swipe.js\":\n/*!*************************!*\\\n !*** ./src/js/swipe.js ***!\n \\*************************/\n/*! exports provided: Swipe */\n/***/ (function(module, __webpack_exports__, __webpack_require__) {\n\n\"use strict\";\n__webpack_require__.r(__webpack_exports__);\n/* harmony export (binding) */ __webpack_require__.d(__webpack_exports__, \"Swipe\", function() { return Swipe; });\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__ = __webpack_require__(/*! @babel/runtime/helpers/classCallCheck */ \"./node_modules/@babel/runtime/helpers/classCallCheck.js\");\n/* harmony import */ var _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0__);\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__ = __webpack_require__(/*! @babel/runtime/helpers/createClass */ \"./node_modules/@babel/runtime/helpers/createClass.js\");\n/* harmony import */ var _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1__);\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__ = __webpack_require__(/*! @babel/runtime/helpers/defineProperty */ \"./node_modules/@babel/runtime/helpers/defineProperty.js\");\n/* harmony import */ var _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2___default = /*#__PURE__*/__webpack_require__.n(_babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2__);\n\n\n\nvar Swipe = /*#__PURE__*/function () {\n /**\r\n * @description Whether the movement is initiated\r\n * @type boolean\r\n */\n\n /**\r\n * @type float\r\n */\n\n /**\r\n * @type float\r\n */\n\n /**\r\n * @type float\r\n */\n\n /**\r\n * @type float\r\n */\n\n /**\r\n * @type float\r\n */\n\n /**\r\n * @type float\r\n */\n\n /**\r\n * @type string|null\r\n * @description Current swiping side\r\n */\n\n /**\r\n * @constructor\r\n * @param selector {string, object}\r\n * */\n function Swipe(selector) {\n _babel_runtime_helpers_classCallCheck__WEBPACK_IMPORTED_MODULE_0___default()(this, Swipe);\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2___default()(this, \"inWork\", void 0);\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2___default()(this, \"xDown\", void 0);\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2___default()(this, \"yDown\", void 0);\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2___default()(this, \"xStart\", void 0);\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2___default()(this, \"yStart\", void 0);\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2___default()(this, \"xCurrent\", void 0);\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2___default()(this, \"yCurrent\", void 0);\n\n _babel_runtime_helpers_defineProperty__WEBPACK_IMPORTED_MODULE_2___default()(this, \"currentDirection\", void 0);\n\n this.inWork = false;\n this.xDown = null;\n this.yDown = null;\n this.xStart = null;\n this.yStart = null;\n this.xCurrent = null;\n this.yCurrent = null;\n this.currentDirection = null;\n\n if (typeof selector === 'string') {\n document.querySelectorAll(selector).forEach(this.eventListener.bind(this));\n } else {\n this.eventListener(selector);\n }\n }\n /**\r\n * @description Setter this context\r\n * @param field string\r\n * @param value\r\n * */\n\n\n _babel_runtime_helpers_createClass__WEBPACK_IMPORTED_MODULE_1___default()(Swipe, [{\n key: \"set\",\n value: function set(field, value) {\n this[field] = value;\n }\n /**\r\n * @description Getter this context\r\n * @param field string\r\n * */\n\n }, {\n key: \"get\",\n value: function get(field) {\n return this[field];\n }\n /**\r\n * @description Add listener\r\n * @param element object\r\n * */\n\n }, {\n key: \"eventListener\",\n value: function eventListener(element) {\n element.addEventListener('mousedown', this.handleTouchStart.bind(this));\n element.addEventListener('touchstart', this.handleTouchStart.bind(this));\n element.addEventListener('mousemove', this.handleTouchMove.bind(this));\n element.addEventListener('touchmove', this.handleTouchMove.bind(this), {\n passive: false\n });\n element.addEventListener('mouseup', this.handleTouchEnd.bind(this));\n element.addEventListener('touchend', this.handleTouchEnd.bind(this));\n }\n /**\r\n * @description Get coordinates\r\n * @param event object\r\n * */\n\n }, {\n key: \"getTouches\",\n value: function getTouches(event) {\n var result = {\n offsetX: 0,\n offsetY: 0\n };\n var touch = event.touches ? event.touches[0] : event.originalEvent ? event.originalEvent.touches[0] : false;\n\n if (touch) {\n result.offsetX = Math.round(touch.clientX);\n result.offsetY = Math.round(touch.clientY);\n } else {\n result.offsetX = Math.round(e.clientX);\n result.offsetY = Math.round(e.clientY);\n }\n\n return result;\n }\n /**\r\n * @description Set init coordinates\r\n * @param event object\r\n * */\n\n }, {\n key: \"handleTouchStart\",\n value: function handleTouchStart(event) {\n var touche = this.getTouches(event);\n this.set('inWork', true);\n this.set('xDown', touche.offsetX);\n this.set('yDown', touche.offsetY);\n this.set('xStart', touche.offsetX);\n this.set('yStart', touche.offsetY);\n this.start(event);\n }\n /**\r\n * @description Method for move event\r\n * @param event object\r\n * */\n\n }, {\n key: \"handleTouchMove\",\n value: function handleTouchMove(event) {\n if (!this.get('inWork')) {\n return false;\n }\n\n var touche = this.getTouches(event);\n this.set('xCurrent', touche.offsetX - this.get('xStart'));\n this.set('yCurrent', touche.offsetY - this.get('yStart'));\n var xDiff = this.get('xDown') - touche.offsetX;\n var yDiff = this.get('yDown') - touche.offsetY;\n\n if (!this.get('currentDirection')) {\n this.setDirection(event, xDiff, yDiff);\n }\n\n this.drag(event);\n\n if (!this.get('xDown') || !this.get('yDown')) {\n return false;\n }\n\n this.setDirection(event, xDiff, yDiff);\n this.set('xDown', null);\n this.set('yDown', null);\n }\n /**\r\n * @description Set current direction\r\n * @param event object\r\n * @param xDiff float\r\n * @param yDiff float\r\n * */\n\n }, {\n key: \"setDirection\",\n value: function setDirection(event, xDiff, yDiff) {\n if (Math.abs(xDiff) >= Math.abs(yDiff)) {\n if (xDiff > 0) {\n this.set('currentDirection', 'left');\n this.left(event);\n } else {\n this.set('currentDirection', 'right');\n this.right(event);\n }\n } else {\n if (yDiff > 0) {\n this.set('currentDirection', 'up');\n this.up(event);\n } else {\n this.set('currentDirection', 'down');\n this.down(event);\n }\n }\n }\n /**\r\n * @description Method for touch end\r\n * @param event object\r\n * */\n\n }, {\n key: \"handleTouchEnd\",\n value: function handleTouchEnd(event) {\n this.set('inWork', false);\n this.stop(event);\n }\n /**\r\n * @description Method for drag event\r\n * @param event object\r\n * */\n\n }, {\n key: \"drag\",\n value: function drag(event) {\n event.target.style.transition = 'none';\n event.target.style.transform = \"translate(\".concat(this.get('xCurrent'), \"px, \").concat(this.get('yCurrent'), \"px)\");\n }\n }, {\n key: \"left\",\n value: function left(event) {}\n }, {\n key: \"right\",\n value: function right(event) {}\n }, {\n key: \"up\",\n value: function up(event) {}\n }, {\n key: \"down\",\n value: function down(event) {}\n }, {\n key: \"start\",\n value: function start(event) {}\n }, {\n key: \"stop\",\n value: function stop(event) {}\n }]);\n\n return Swipe;\n}();\n\n/***/ })\n\n/******/ });\n"]}