"use strict";function _typeof(t){return(_typeof="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t})(t)}!function(o,t,e,r){function c(t,e){this.element=t,this.settings=o.extend({},i,e),this._defaults=i,this._name=a,this.init()}var a="doubleTapToGo",i={automatic:!0,selectorClass:"doubletap",selectorChain:"li:has(ul)"};o.extend(c.prototype,{preventClick:!1,currentTap:o(),init:function(){o(this.element).on("touchstart","."+this.settings.selectorClass,this._tap.bind(this)).on("click","."+this.settings.selectorClass,this._click.bind(this)).on("remove",this._destroy.bind(this)),this._addSelectors()},_addSelectors:function(){!0===this.settings.automatic&&o(this.element).find(this.settings.selectorChain).addClass(this.settings.selectorClass)},_click:function(t){this.preventClick?t.preventDefault():this.currentTap=o()},_tap:function(t){var e=o(t.target).closest("li");return e.hasClass(this.settings.selectorClass)?e.get(0)===this.currentTap.get(0)?void(this.preventClick=!1):(this.preventClick=!0,this.currentTap=e,void t.stopPropagation()):void(this.preventClick=!1)},_destroy:function(){o(this.element).off()},reset:function(){this.currentTap=o()}}),o.fn[a]=function(i){var s,n=arguments;return i===r||"object"==_typeof(i)?this.each(function(){o.data(this,a)||o.data(this,a,new c(this,i))}):"string"==typeof i&&"_"!==i[0]&&"init"!==i?(this.each(function(){var t=o.data(this,a),e="destroy"===i?"_destroy":i;t instanceof c&&"function"==typeof t[e]&&(s=t[e].apply(t,Array.prototype.slice.call(n,1))),"destroy"===i&&o.data(this,a,null)}),s!==r?s:this):void 0}}(jQuery,window,document);