{"version":3,"file":"metisMenu.min.js","sources":["../rollupPluginBabelHelpers","../src/util.js","../src/index.js"],"sourcesContent":["export { _typeof as typeof, _jsx as jsx, _asyncIterator as asyncIterator, _AwaitValue as AwaitValue, _AsyncGenerator as AsyncGenerator, _wrapAsyncGenerator as wrapAsyncGenerator, _awaitAsyncGenerator as awaitAsyncGenerator, _asyncGeneratorDelegate as asyncGeneratorDelegate, _asyncToGenerator as asyncToGenerator, _classCallCheck as classCallCheck, _createClass as createClass, _defineEnumerableProperties as defineEnumerableProperties, _defaults as defaults, _defineProperty as defineProperty, _extends as extends, _objectSpread as objectSpread, _get as get, _inherits as inherits, _inheritsLoose as inheritsLoose, _wrapNativeSuper as wrapNativeSuper, _instanceof as instanceof, _interopRequireDefault as interopRequireDefault, _interopRequireWildcard as interopRequireWildcard, _newArrowCheck as newArrowCheck, _objectDestructuringEmpty as objectDestructuringEmpty, _objectWithoutProperties as objectWithoutProperties, _assertThisInitialized as assertThisInitialized, _possibleConstructorReturn as possibleConstructorReturn, _set as set, _taggedTemplateLiteral as taggedTemplateLiteral, _taggedTemplateLiteralLoose as taggedTemplateLiteralLoose, _temporalRef as temporalRef, _readOnlyError as readOnlyError, _classNameTDZError as classNameTDZError, _temporalUndefined as temporalUndefined, _slicedToArray as slicedToArray, _slicedToArrayLoose as slicedToArrayLoose, _toArray as toArray, _toConsumableArray as toConsumableArray, _arrayWithoutHoles as arrayWithoutHoles, _arrayWithHoles as arrayWithHoles, _iterableToArray as iterableToArray, _iterableToArrayLimit as iterableToArrayLimit, _iterableToArrayLimitLoose as iterableToArrayLimitLoose, _nonIterableSpread as nonIterableSpread, _nonIterableRest as nonIterableRest, _skipFirstGeneratorNext as skipFirstGeneratorNext, _toPropertyKey as toPropertyKey, _initializerWarningHelper as initializerWarningHelper, _initializerDefineProperty as initializerDefineProperty, _applyDecoratedDescriptor as applyDecoratedDescriptor };\n\nfunction _typeof(obj) {\n if (typeof Symbol === \"function\" && typeof Symbol.iterator === \"symbol\") {\n _typeof = function (obj) {\n return typeof obj;\n };\n } else {\n _typeof = function (obj) {\n return obj && typeof Symbol === \"function\" && obj.constructor === Symbol && obj !== Symbol.prototype ? \"symbol\" : typeof obj;\n };\n }\n\n return _typeof(obj);\n}\n\nvar REACT_ELEMENT_TYPE;\n\nfunction _jsx(type, props, key, children) {\n if (!REACT_ELEMENT_TYPE) {\n REACT_ELEMENT_TYPE = typeof Symbol === \"function\" && Symbol.for && Symbol.for(\"react.element\") || 0xeac7;\n }\n\n var defaultProps = type && type.defaultProps;\n var childrenLength = arguments.length - 3;\n\n if (!props && childrenLength !== 0) {\n props = {\n children: void 0\n };\n }\n\n if (props && defaultProps) {\n for (var propName in defaultProps) {\n if (props[propName] === void 0) {\n props[propName] = defaultProps[propName];\n }\n }\n } else if (!props) {\n props = defaultProps || {};\n }\n\n if (childrenLength === 1) {\n props.children = children;\n } else if (childrenLength > 1) {\n var childArray = new Array(childrenLength);\n\n for (var i = 0; i < childrenLength; i++) {\n childArray[i] = arguments[i + 3];\n }\n\n props.children = childArray;\n }\n\n return {\n $$typeof: REACT_ELEMENT_TYPE,\n type: type,\n key: key === undefined ? null : '' + key,\n ref: null,\n props: props,\n _owner: null\n };\n}\n\nfunction _asyncIterator(iterable) {\n if (typeof Symbol === \"function\") {\n if (Symbol.asyncIterator) {\n var method = iterable[Symbol.asyncIterator];\n if (method != null) return method.call(iterable);\n }\n\n if (Symbol.iterator) {\n return iterable[Symbol.iterator]();\n }\n }\n\n throw new TypeError(\"Object is not async iterable\");\n}\n\nfunction _AwaitValue(value) {\n this.wrapped = value;\n}\n\nfunction _AsyncGenerator(gen) {\n var front, back;\n\n function send(key, arg) {\n return new Promise(function (resolve, reject) {\n var request = {\n key: key,\n arg: arg,\n resolve: resolve,\n reject: reject,\n next: null\n };\n\n if (back) {\n back = back.next = request;\n } else {\n front = back = request;\n resume(key, arg);\n }\n });\n }\n\n function resume(key, arg) {\n try {\n var result = gen[key](arg);\n var value = result.value;\n var wrappedAwait = value instanceof _AwaitValue;\n Promise.resolve(wrappedAwait ? value.wrapped : value).then(function (arg) {\n if (wrappedAwait) {\n resume(\"next\", arg);\n return;\n }\n\n settle(result.done ? \"return\" : \"normal\", arg);\n }, function (err) {\n resume(\"throw\", err);\n });\n } catch (err) {\n settle(\"throw\", err);\n }\n }\n\n function settle(type, value) {\n switch (type) {\n case \"return\":\n front.resolve({\n value: value,\n done: true\n });\n break;\n\n case \"throw\":\n front.reject(value);\n break;\n\n default:\n front.resolve({\n value: value,\n done: false\n });\n break;\n }\n\n front = front.next;\n\n if (front) {\n resume(front.key, front.arg);\n } else {\n back = null;\n }\n }\n\n this._invoke = send;\n\n if (typeof gen.return !== \"function\") {\n this.return = undefined;\n }\n}\n\nif (typeof Symbol === \"function\" && Symbol.asyncIterator) {\n _AsyncGenerator.prototype[Symbol.asyncIterator] = function () {\n return this;\n };\n}\n\n_AsyncGenerator.prototype.next = function (arg) {\n return this._invoke(\"next\", arg);\n};\n\n_AsyncGenerator.prototype.throw = function (arg) {\n return this._invoke(\"throw\", arg);\n};\n\n_AsyncGenerator.prototype.return = function (arg) {\n return this._invoke(\"return\", arg);\n};\n\nfunction _wrapAsyncGenerator(fn) {\n return function () {\n return new _AsyncGenerator(fn.apply(this, arguments));\n };\n}\n\nfunction _awaitAsyncGenerator(value) {\n return new _AwaitValue(value);\n}\n\nfunction _asyncGeneratorDelegate(inner, awaitWrap) {\n var iter = {},\n waiting = false;\n\n function pump(key, value) {\n waiting = true;\n value = new Promise(function (resolve) {\n resolve(inner[key](value));\n });\n return {\n done: false,\n value: awaitWrap(value)\n };\n }\n\n ;\n\n if (typeof Symbol === \"function\" && Symbol.iterator) {\n iter[Symbol.iterator] = function () {\n return this;\n };\n }\n\n iter.next = function (value) {\n if (waiting) {\n waiting = false;\n return value;\n }\n\n return pump(\"next\", value);\n };\n\n if (typeof inner.throw === \"function\") {\n iter.throw = function (value) {\n if (waiting) {\n waiting = false;\n throw value;\n }\n\n return pump(\"throw\", value);\n };\n }\n\n if (typeof inner.return === \"function\") {\n iter.return = function (value) {\n return pump(\"return\", value);\n };\n }\n\n return iter;\n}\n\nfunction _asyncToGenerator(fn) {\n return function () {\n var self = this,\n args = arguments;\n return new Promise(function (resolve, reject) {\n var gen = fn.apply(self, args);\n\n function step(key, arg) {\n try {\n var info = gen[key](arg);\n var value = info.value;\n } catch (error) {\n reject(error);\n return;\n }\n\n if (info.done) {\n resolve(value);\n } else {\n Promise.resolve(value).then(_next, _throw);\n }\n }\n\n function _next(value) {\n step(\"next\", value);\n }\n\n function _throw(err) {\n step(\"throw\", err);\n }\n\n _next();\n });\n };\n}\n\nfunction _classCallCheck(instance, Constructor) {\n if (!(instance instanceof Constructor)) {\n throw new TypeError(\"Cannot call a class as a function\");\n }\n}\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\nfunction _defineEnumerableProperties(obj, descs) {\n for (var key in descs) {\n var desc = descs[key];\n desc.configurable = desc.enumerable = true;\n if (\"value\" in desc) desc.writable = true;\n Object.defineProperty(obj, key, desc);\n }\n\n if (Object.getOwnPropertySymbols) {\n var objectSymbols = Object.getOwnPropertySymbols(descs);\n\n for (var i = 0; i < objectSymbols.length; i++) {\n var sym = objectSymbols[i];\n var desc = descs[sym];\n desc.configurable = desc.enumerable = true;\n if (\"value\" in desc) desc.writable = true;\n Object.defineProperty(obj, sym, desc);\n }\n }\n\n return obj;\n}\n\nfunction _defaults(obj, defaults) {\n var keys = Object.getOwnPropertyNames(defaults);\n\n for (var i = 0; i < keys.length; i++) {\n var key = keys[i];\n var value = Object.getOwnPropertyDescriptor(defaults, key);\n\n if (value && value.configurable && obj[key] === undefined) {\n Object.defineProperty(obj, key, value);\n }\n }\n\n return obj;\n}\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\nfunction _extends() {\n _extends = Object.assign || function (target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i];\n\n for (var key in source) {\n if (Object.prototype.hasOwnProperty.call(source, key)) {\n target[key] = source[key];\n }\n }\n }\n\n return target;\n };\n\n return _extends.apply(this, arguments);\n}\n\nfunction _objectSpread(target) {\n for (var i = 1; i < arguments.length; i++) {\n var source = arguments[i] != null ? arguments[i] : {};\n var ownKeys = Object.keys(source);\n\n if (typeof Object.getOwnPropertySymbols === 'function') {\n ownKeys = ownKeys.concat(Object.getOwnPropertySymbols(source).filter(function (sym) {\n return Object.getOwnPropertyDescriptor(source, sym).enumerable;\n }));\n }\n\n ownKeys.forEach(function (key) {\n _defineProperty(target, key, source[key]);\n });\n }\n\n return target;\n}\n\nfunction _get(object, property, receiver) {\n if (object === null) object = Function.prototype;\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent === null) {\n return undefined;\n } else {\n return _get(parent, property, receiver);\n }\n } else if (\"value\" in desc) {\n return desc.value;\n } else {\n var getter = desc.get;\n\n if (getter === undefined) {\n return undefined;\n }\n\n return getter.call(receiver);\n }\n}\n\nfunction _inherits(subClass, superClass) {\n if (typeof superClass !== \"function\" && superClass !== null) {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n subClass.prototype = Object.create(superClass && superClass.prototype, {\n constructor: {\n value: subClass,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n if (superClass) Object.setPrototypeOf ? Object.setPrototypeOf(subClass, superClass) : subClass.__proto__ = superClass;\n}\n\nfunction _inheritsLoose(subClass, superClass) {\n subClass.prototype = Object.create(superClass.prototype);\n subClass.prototype.constructor = subClass;\n subClass.__proto__ = superClass;\n}\n\nfunction _gPO(o) {\n _gPO = Object.getPrototypeOf || function _gPO(o) {\n return o.__proto__;\n };\n\n return _gPO(o);\n}\n\nfunction _sPO(o, p) {\n _sPO = Object.setPrototypeOf || function _sPO(o, p) {\n o.__proto__ = p;\n return o;\n };\n\n return _sPO(o, p);\n}\n\nfunction _construct(Parent, args, Class) {\n _construct = typeof Reflect === \"object\" && Reflect.construct || function _construct(Parent, args, Class) {\n var Constructor,\n a = [null];\n a.push.apply(a, args);\n Constructor = Parent.bind.apply(Parent, a);\n return _sPO(new Constructor(), Class.prototype);\n };\n\n return _construct(Parent, args, Class);\n}\n\nfunction _wrapNativeSuper(Class) {\n var _cache = typeof Map === \"function\" ? new Map() : undefined;\n\n _wrapNativeSuper = function _wrapNativeSuper(Class) {\n if (typeof Class !== \"function\") {\n throw new TypeError(\"Super expression must either be null or a function\");\n }\n\n if (typeof _cache !== \"undefined\") {\n if (_cache.has(Class)) return _cache.get(Class);\n\n _cache.set(Class, Wrapper);\n }\n\n function Wrapper() {}\n\n Wrapper.prototype = Object.create(Class.prototype, {\n constructor: {\n value: Wrapper,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n return _sPO(Wrapper, _sPO(function Super() {\n return _construct(Class, arguments, _gPO(this).constructor);\n }, Class));\n };\n\n return _wrapNativeSuper(Class);\n}\n\nfunction _instanceof(left, right) {\n if (right != null && typeof Symbol !== \"undefined\" && right[Symbol.hasInstance]) {\n return right[Symbol.hasInstance](left);\n } else {\n return left instanceof right;\n }\n}\n\nfunction _interopRequireDefault(obj) {\n return obj && obj.__esModule ? obj : {\n default: obj\n };\n}\n\nfunction _interopRequireWildcard(obj) {\n if (obj && obj.__esModule) {\n return obj;\n } else {\n var newObj = {};\n\n if (obj != null) {\n for (var key in obj) {\n if (Object.prototype.hasOwnProperty.call(obj, key)) {\n var desc = Object.defineProperty && Object.getOwnPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : {};\n\n if (desc.get || desc.set) {\n Object.defineProperty(newObj, key, desc);\n } else {\n newObj[key] = obj[key];\n }\n }\n }\n }\n\n newObj.default = obj;\n return newObj;\n }\n}\n\nfunction _newArrowCheck(innerThis, boundThis) {\n if (innerThis !== boundThis) {\n throw new TypeError(\"Cannot instantiate an arrow function\");\n }\n}\n\nfunction _objectDestructuringEmpty(obj) {\n if (obj == null) throw new TypeError(\"Cannot destructure undefined\");\n}\n\nfunction _objectWithoutProperties(source, excluded) {\n if (source == null) return {};\n var target = {};\n var sourceKeys = Object.keys(source);\n var key, i;\n\n for (i = 0; i < sourceKeys.length; i++) {\n key = sourceKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n target[key] = source[key];\n }\n\n if (Object.getOwnPropertySymbols) {\n var sourceSymbolKeys = Object.getOwnPropertySymbols(source);\n\n for (i = 0; i < sourceSymbolKeys.length; i++) {\n key = sourceSymbolKeys[i];\n if (excluded.indexOf(key) >= 0) continue;\n if (!Object.prototype.propertyIsEnumerable.call(source, key)) continue;\n target[key] = source[key];\n }\n }\n\n return target;\n}\n\nfunction _assertThisInitialized(self) {\n if (self === void 0) {\n throw new ReferenceError(\"this hasn't been initialised - super() hasn't been called\");\n }\n\n return self;\n}\n\nfunction _possibleConstructorReturn(self, call) {\n if (call && (typeof call === \"object\" || typeof call === \"function\")) {\n return call;\n }\n\n return _assertThisInitialized(self);\n}\n\nfunction _set(object, property, value, receiver) {\n var desc = Object.getOwnPropertyDescriptor(object, property);\n\n if (desc === undefined) {\n var parent = Object.getPrototypeOf(object);\n\n if (parent !== null) {\n _set(parent, property, value, receiver);\n }\n } else if (\"value\" in desc && desc.writable) {\n desc.value = value;\n } else {\n var setter = desc.set;\n\n if (setter !== undefined) {\n setter.call(receiver, value);\n }\n }\n\n return value;\n}\n\nfunction _taggedTemplateLiteral(strings, raw) {\n if (!raw) {\n raw = strings.slice(0);\n }\n\n return Object.freeze(Object.defineProperties(strings, {\n raw: {\n value: Object.freeze(raw)\n }\n }));\n}\n\nfunction _taggedTemplateLiteralLoose(strings, raw) {\n if (!raw) {\n raw = strings.slice(0);\n }\n\n strings.raw = raw;\n return strings;\n}\n\nfunction _temporalRef(val, name) {\n if (val === _temporalUndefined) {\n throw new ReferenceError(name + \" is not defined - temporal dead zone\");\n } else {\n return val;\n }\n}\n\nfunction _readOnlyError(name) {\n throw new Error(\"\\\"\" + name + \"\\\" is read-only\");\n}\n\nfunction _classNameTDZError(name) {\n throw new Error(\"Class \\\"\" + name + \"\\\" cannot be referenced in computed property keys.\");\n}\n\nvar _temporalUndefined = {};\n\nfunction _slicedToArray(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _nonIterableRest();\n}\n\nfunction _slicedToArrayLoose(arr, i) {\n return _arrayWithHoles(arr) || _iterableToArrayLimitLoose(arr, i) || _nonIterableRest();\n}\n\nfunction _toArray(arr) {\n return _arrayWithHoles(arr) || _iterableToArray(arr) || _nonIterableRest();\n}\n\nfunction _toConsumableArray(arr) {\n return _arrayWithoutHoles(arr) || _iterableToArray(arr) || _nonIterableSpread();\n}\n\nfunction _arrayWithoutHoles(arr) {\n if (Array.isArray(arr)) {\n for (var i = 0, arr2 = new Array(arr.length); i < arr.length; i++) arr2[i] = arr[i];\n\n return arr2;\n }\n}\n\nfunction _arrayWithHoles(arr) {\n if (Array.isArray(arr)) return arr;\n}\n\nfunction _iterableToArray(iter) {\n if (Symbol.iterator in Object(iter) || Object.prototype.toString.call(iter) === \"[object Arguments]\") return Array.from(iter);\n}\n\nfunction _iterableToArrayLimit(arr, i) {\n var _arr = [];\n var _n = true;\n var _d = false;\n var _e = undefined;\n\n try {\n for (var _i = arr[Symbol.iterator](), _s; !(_n = (_s = _i.next()).done); _n = true) {\n _arr.push(_s.value);\n\n if (i && _arr.length === i) break;\n }\n } catch (err) {\n _d = true;\n _e = err;\n } finally {\n try {\n if (!_n && _i[\"return\"] != null) _i[\"return\"]();\n } finally {\n if (_d) throw _e;\n }\n }\n\n return _arr;\n}\n\nfunction _iterableToArrayLimitLoose(arr, i) {\n var _arr = [];\n\n for (var _iterator = arr[Symbol.iterator](), _step; !(_step = _iterator.next()).done;) {\n _arr.push(_step.value);\n\n if (i && _arr.length === i) break;\n }\n\n return _arr;\n}\n\nfunction _nonIterableSpread() {\n throw new TypeError(\"Invalid attempt to spread non-iterable instance\");\n}\n\nfunction _nonIterableRest() {\n throw new TypeError(\"Invalid attempt to destructure non-iterable instance\");\n}\n\nfunction _skipFirstGeneratorNext(fn) {\n return function () {\n var it = fn.apply(this, arguments);\n it.next();\n return it;\n };\n}\n\nfunction _toPropertyKey(key) {\n if (typeof key === \"symbol\") {\n return key;\n } else {\n return String(key);\n }\n}\n\nfunction _initializerWarningHelper(descriptor, context) {\n throw new Error('Decorating class property failed. Please ensure that ' + 'proposal-class-properties is enabled and set to use loose mode. ' + 'To use proposal-class-properties in spec mode with decorators, wait for ' + 'the next major version of decorators in stage 2.');\n}\n\nfunction _initializerDefineProperty(target, property, descriptor, context) {\n if (!descriptor) return;\n Object.defineProperty(target, property, {\n enumerable: descriptor.enumerable,\n configurable: descriptor.configurable,\n writable: descriptor.writable,\n value: descriptor.initializer ? descriptor.initializer.call(context) : void 0\n });\n}\n\nfunction _applyDecoratedDescriptor(target, property, decorators, descriptor, context) {\n var desc = {};\n Object['ke' + 'ys'](descriptor).forEach(function (key) {\n desc[key] = descriptor[key];\n });\n desc.enumerable = !!desc.enumerable;\n desc.configurable = !!desc.configurable;\n\n if ('value' in desc || desc.initializer) {\n desc.writable = true;\n }\n\n desc = decorators.slice().reverse().reduce(function (desc, decorator) {\n return decorator(target, property, desc) || desc;\n }, desc);\n\n if (context && desc.initializer !== void 0) {\n desc.value = desc.initializer ? desc.initializer.call(context) : void 0;\n desc.initializer = undefined;\n }\n\n if (desc.initializer === void 0) {\n Object['define' + 'Property'](target, property, desc);\n desc = null;\n }\n\n return desc;\n}","import $ from 'jquery';\n\nconst Util = (($) => { // eslint-disable-line no-shadow\n const TRANSITION_END = 'transitionend';\n\n const Util = { // eslint-disable-line no-shadow\n TRANSITION_END: 'mmTransitionEnd',\n\n triggerTransitionEnd(element) {\n $(element).trigger(TRANSITION_END);\n },\n\n supportsTransitionEnd() {\n return Boolean(TRANSITION_END);\n },\n };\n\n function getSpecialTransitionEndEvent() {\n return {\n bindType: TRANSITION_END,\n delegateType: TRANSITION_END,\n handle(event) {\n if ($(event.target).is(this)) {\n return event\n .handleObj\n .handler\n .apply(this, arguments); // eslint-disable-line prefer-rest-params\n }\n return undefined;\n },\n };\n }\n\n function transitionEndEmulator(duration) {\n let called = false;\n\n $(this).one(Util.TRANSITION_END, () => {\n called = true;\n });\n\n setTimeout(() => {\n if (!called) {\n Util.triggerTransitionEnd(this);\n }\n }, duration);\n\n return this;\n }\n\n function setTransitionEndSupport() {\n $.fn.mmEmulateTransitionEnd = transitionEndEmulator; // eslint-disable-line no-param-reassign\n // eslint-disable-next-line no-param-reassign\n $.event.special[Util.TRANSITION_END] = getSpecialTransitionEndEvent();\n }\n\n setTransitionEndSupport();\n\n return Util;\n})($);\n\nexport default Util;\n","import $ from 'jquery';\nimport Util from './util';\n\nconst MetisMenu = (($) => { // eslint-disable-line no-shadow\n const NAME = 'metisMenu';\n const DATA_KEY = 'metisMenu';\n const EVENT_KEY = `.${DATA_KEY}`;\n const DATA_API_KEY = '.data-api';\n const JQUERY_NO_CONFLICT = $.fn[NAME];\n const TRANSITION_DURATION = 350;\n\n const Default = {\n toggle: true,\n preventDefault: true,\n activeClass: 'active',\n collapseClass: 'collapse',\n collapseInClass: 'in',\n collapsingClass: 'collapsing',\n triggerElement: 'a',\n parentTrigger: 'li',\n subMenu: 'ul',\n };\n\n const Event = {\n SHOW: `show${EVENT_KEY}`,\n SHOWN: `shown${EVENT_KEY}`,\n HIDE: `hide${EVENT_KEY}`,\n HIDDEN: `hidden${EVENT_KEY}`,\n CLICK_DATA_API: `click${EVENT_KEY}${DATA_API_KEY}`,\n };\n\n class MetisMenu { // eslint-disable-line no-shadow\n constructor(element, config) {\n this.element = element;\n this.config = { ...Default, ...config };\n this.transitioning = null;\n\n this.init();\n }\n init() {\n const self = this;\n const conf = this.config;\n $(this.element)\n .find(`${conf.parentTrigger}.${conf.activeClass}`)\n .has(conf.subMenu)\n .children(conf.subMenu)\n .attr('aria-expanded', true)\n .addClass(`${conf.collapseClass} ${conf.collapseInClass}`);\n\n $(this.element)\n .find(conf.parentTrigger)\n .not(`.${conf.activeClass}`)\n .has(conf.subMenu)\n .children(conf.subMenu)\n .attr('aria-expanded', false)\n .addClass(conf.collapseClass);\n\n $(this.element)\n .find(conf.parentTrigger)\n .has(conf.subMenu)\n .children(conf.triggerElement)\n .on(Event.CLICK_DATA_API, function (e) { // eslint-disable-line func-names\n const eTar = $(this);\n const paRent = eTar.parent(conf.parentTrigger);\n const sibLings = paRent\n .siblings(conf.parentTrigger)\n .children(conf.triggerElement);\n const List = paRent.children(conf.subMenu);\n if (conf.preventDefault) {\n e.preventDefault();\n }\n if (eTar.attr('aria-disabled') === 'true') {\n return;\n }\n if (paRent.hasClass(conf.activeClass)) {\n eTar.attr('aria-expanded', false);\n self.hide(List);\n } else {\n self.show(List);\n eTar.attr('aria-expanded', true);\n if (conf.toggle) {\n sibLings.attr('aria-expanded', false);\n }\n }\n\n if (conf.onTransitionStart) {\n conf.onTransitionStart(e);\n }\n });\n }\n\n show(element) {\n if (this.transitioning ||\n $(element).hasClass(this.config.collapsingClass)) {\n return;\n }\n const elem = $(element);\n\n const startEvent = $.Event(Event.SHOW);\n elem.trigger(startEvent);\n\n if (startEvent.isDefaultPrevented()) {\n return;\n }\n\n elem\n .parent(this.config.parentTrigger)\n .addClass(this.config.activeClass);\n\n\n if (this.config.toggle) {\n this\n .hide(elem\n .parent(this.config.parentTrigger)\n .siblings()\n .children(`${this.config.subMenu}.${this.config.collapseInClass}`)\n .attr('aria-expanded', false));\n }\n\n elem\n .removeClass(this.config.collapseClass)\n .addClass(this.config.collapsingClass)\n .height(0);\n\n this.setTransitioning(true);\n\n const complete = () => {\n // check if disposed\n if (!this.config || !this.element) {\n return;\n }\n elem\n .removeClass(this.config.collapsingClass)\n .addClass(`${this.config.collapseClass} ${this.config.collapseInClass}`)\n .height('')\n .attr('aria-expanded', true);\n\n this.setTransitioning(false);\n\n elem.trigger(Event.SHOWN);\n };\n\n if (!Util.supportsTransitionEnd()) {\n complete();\n return;\n }\n\n elem\n .height(element[0].scrollHeight)\n .one(Util.TRANSITION_END, complete)\n .mmEmulateTransitionEnd(TRANSITION_DURATION);\n }\n\n hide(element) {\n if (this.transitioning || !$(element).hasClass(this.config.collapseInClass)) {\n return;\n }\n\n const elem = $(element);\n\n const startEvent = $.Event(Event.HIDE);\n elem.trigger(startEvent);\n\n if (startEvent.isDefaultPrevented()) {\n return;\n }\n\n elem.parent(this.config.parentTrigger).removeClass(this.config.activeClass);\n // eslint-disable-next-line no-unused-expressions\n elem.height(elem.height())[0].offsetHeight;\n\n elem\n .addClass(this.config.collapsingClass)\n .removeClass(this.config.collapseClass)\n .removeClass(this.config.collapseInClass);\n\n this.setTransitioning(true);\n\n const complete = () => {\n // check if disposed\n if (!this.config || !this.element) {\n return;\n }\n if (this.transitioning && this.config.onTransitionEnd) {\n this.config.onTransitionEnd();\n }\n\n this.setTransitioning(false);\n elem.trigger(Event.HIDDEN);\n\n elem\n .removeClass(this.config.collapsingClass)\n .addClass(this.config.collapseClass)\n .attr('aria-expanded', false);\n };\n\n if (!Util.supportsTransitionEnd()) {\n complete();\n return;\n }\n\n if (elem.height() === 0 || elem.css('display') === 'none') {\n complete();\n } else {\n elem\n .height(0)\n .one(Util.TRANSITION_END, complete)\n .mmEmulateTransitionEnd(TRANSITION_DURATION);\n }\n }\n\n setTransitioning(isTransitioning) {\n this.transitioning = isTransitioning;\n }\n\n dispose() {\n $.removeData(this.element, DATA_KEY);\n\n $(this.element)\n .find(this.config.parentTrigger)\n .has(this.config.subMenu)\n .children(this.config.triggerElement)\n .off('click');\n\n this.transitioning = null;\n this.config = null;\n this.element = null;\n }\n\n\n static jQueryInterface(config) {\n // eslint-disable-next-line func-names\n return this.each(function () {\n const $this = $(this);\n let data = $this.data(DATA_KEY);\n const conf = {\n ...Default,\n ...$this.data(),\n ...typeof config === 'object' && config ? config : {},\n };\n\n if (!data && /dispose/.test(config)) {\n this.dispose();\n }\n\n if (!data) {\n data = new MetisMenu(this, conf);\n $this.data(DATA_KEY, data);\n }\n\n if (typeof config === 'string') {\n if (data[config] === undefined) {\n throw new Error(`No method named \"${config}\"`);\n }\n data[config]();\n }\n });\n }\n }\n /**\n * ------------------------------------------------------------------------\n * jQuery\n * ------------------------------------------------------------------------\n */\n\n $.fn[NAME] = MetisMenu.jQueryInterface; // eslint-disable-line no-param-reassign\n $.fn[NAME].Constructor = MetisMenu; // eslint-disable-line no-param-reassign\n $.fn[NAME].noConflict = () => { // eslint-disable-line no-param-reassign\n $.fn[NAME] = JQUERY_NO_CONFLICT; // eslint-disable-line no-param-reassign\n return MetisMenu.jQueryInterface;\n };\n return MetisMenu;\n})($);\n\nexport default MetisMenu;\n"],"names":["_defineProperty","obj","key","value","Object","defineProperty","enumerable","configurable","writable","_objectSpread","target","i","arguments","length","source","ownKeys","keys","getOwnPropertySymbols","concat","filter","sym","getOwnPropertyDescriptor","forEach","Util","$","TRANSITION_END","element","trigger","Boolean","transitionEndEmulator","duration","called","this","one","triggerTransitionEnd","_this","fn","mmEmulateTransitionEnd","event","special","is","handleObj","handler","apply","NAME","JQUERY_NO_CONFLICT","Default","Event","MetisMenu","config","transitioning","init","self","conf","find","parentTrigger","activeClass","has","subMenu","children","attr","addClass","collapseClass","collapseInClass","not","triggerElement","on","CLICK_DATA_API","e","eTar","paRent","parent","sibLings","siblings","List","preventDefault","hasClass","hide","show","toggle","onTransitionStart","collapsingClass","elem","startEvent","SHOW","isDefaultPrevented","removeClass","height","setTransitioning","complete","SHOWN","supportsTransitionEnd","scrollHeight","HIDE","offsetHeight","_this2","onTransitionEnd","HIDDEN","css","isTransitioning","dispose","removeData","off","jQueryInterface","each","$this","data","test","undefined","Error","Constructor","noConflict"],"mappings":";;;;;;;;0NAkVA,SAASA,EAAgBC,EAAKC,EAAKC,GAYjC,OAXID,KAAOD,EACTG,OAAOC,eAAeJ,EAAKC,GACzBC,MAAOA,EACPG,YAAY,EACZC,cAAc,EACdC,UAAU,IAGZP,EAAIC,GAAOC,EAGNF,EAqBT,SAASQ,EAAcC,GACrB,IAAK,IAAIC,EAAI,EAAGA,EAAIC,UAAUC,OAAQF,IAAK,CACzC,IAAIG,EAAyB,MAAhBF,UAAUD,GAAaC,UAAUD,MAC1CI,EAAUX,OAAOY,KAAKF,GAEkB,mBAAjCV,OAAOa,wBAChBF,EAAUA,EAAQG,OAAOd,OAAOa,sBAAsBH,GAAQK,OAAO,SAAUC,GAC7E,OAAOhB,OAAOiB,yBAAyBP,EAAQM,GAAKd,eAIxDS,EAAQO,QAAQ,SAAUpB,GACxBF,EAAgBU,EAAQR,EAAKY,EAAOZ,MAIxC,OAAOQ,ECjYT,IAAMa,EAAQ,SAACC,OACPC,EAAiB,gBAEjBF,kBACY,gDAEKG,KACjBA,GAASC,QAAQF,4CAIZG,QAAQH,cAoBVI,EAAsBC,cACzBC,GAAS,WAEXC,MAAMC,IAAIV,EAAKE,eAAgB,cACtB,eAGA,WACJM,KACEG,qBAAqBC,IAE3BL,GAEIE,cAILI,GAAGC,uBAAyBR,IAE5BS,MAAMC,QAAQhB,EAAKE,0BAjCTA,eACIA,kBACPa,MACDd,EAAEc,EAAM5B,QAAQ8B,GAAGR,aACdM,EACJG,UACAC,QACAC,MAAMX,KAAMpB,aA+BhBW,EAvDK,sDCCK,SAACC,OACZoB,EAAO,YAIPC,EAAqBrB,EAAEY,GAAGQ,GAG1BE,WACI,kBACQ,cACH,uBACE,2BACE,qBACA,4BACD,kBACD,aACN,MAGLC,4IAQAC,wBACQtB,EAASuB,QACdvB,QAAUA,OACVuB,YAAcH,EAAYG,QAC1BC,c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