File: /home/dh_hwg2wc/fnaluxury.com/wp-content/themes/houzez/js/vendors/slideout.min-min.js
!function(t){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=t();else if("function"==typeof define&&define.amd)define([],t);else{var e;"undefined"!=typeof window?e=window:"undefined"!=typeof global?e=global:"undefined"!=typeof self&&(e=self),e.Slideout=t()}}(function(){return function t(e,n,i){function o(r,a){if(!n[r]){if(!e[r]){var u="function"==typeof require&&require;if(!a&&u)return u(r,!0);if(s)return s(r,!0);var l=new Error("Cannot find module '"+r+"'");throw l.code="MODULE_NOT_FOUND",l}var h=n[r]={exports:{}};e[r][0].call(h.exports,function(t){var n=e[r][1][t];return o(n||t)},h,h.exports,t,e,n,i)}return n[r].exports}for(var s="function"==typeof require&&require,r=0;r<i.length;r++)o(i[r]);return o}({1:[function(t,e,n){"use strict";var i,o=t("decouple"),s=t("emitter"),r=!1,a=window.document,u=a.documentElement,l=window.navigator.msPointerEnabled,h={start:l?"MSPointerDown":"touchstart",move:l?"MSPointerMove":"touchmove",end:l?"MSPointerUp":"touchend"},c=function(){var t=/^(Webkit|Khtml|Moz|ms|O)(?=[A-Z])/,e=a.getElementsByTagName("script")[0].style;for(var n in e)if(t.test(n))return"-"+n.match(t)[0].toLowerCase()+"-";return"WebkitOpacity"in e?"-webkit-":"KhtmlOpacity"in e?"-khtml-":""}();function p(t){t=t||{},this._startOffsetX=0,this._currentOffsetX=0,this._opening=!1,this._moved=!1,this._opened=!1,this._preventOpen=!1,this._touch=void 0===t.touch||t.touch&&!0,this._side=t.side||"left",this.panel=t.panel,this.menu=t.menu,this.panel.classList.contains("slideout-panel")||this.panel.classList.add("slideout-panel"),this.panel.classList.contains("slideout-panel-"+this._side)||this.panel.classList.add("slideout-panel-"+this._side),this.menu.classList.contains("slideout-menu")||this.menu.classList.add("slideout-menu"),this.menu.classList.contains("slideout-menu-"+this._side)||this.menu.classList.add("slideout-menu-"+this._side),this._fx=t.fx||"ease",this._duration=parseInt(t.duration,10)||300,this._tolerance=parseInt(t.tolerance,10)||70,this._padding=this._translateTo=parseInt(t.padding,10)||256,this._orientation="right"===this._side?-1:1,this._translateTo*=this._orientation,this._touch&&this._initTouchEvents()}!function(t,e){t.prototype=function(t,e){for(var n in e)e[n]&&(t[n]=e[n]);return t}(t.prototype||{},e.prototype)}(p,s),p.prototype.open=function(){var t=this;return this.emit("beforeopen"),u.classList.contains("slideout-open")||u.classList.add("slideout-open"),this._setTransition(),this._translateXTo(this._translateTo),this._opened=!0,setTimeout(function(){t.panel.style.transition=t.panel.style["-webkit-transition"]="",t.emit("open")},this._duration+50),this},p.prototype.close=function(){var t=this;return this.isOpen()||this._opening?(this.emit("beforeclose"),this._setTransition(),this._translateXTo(0),this._opened=!1,setTimeout(function(){u.classList.remove("slideout-open"),t.panel.style.transition=t.panel.style["-webkit-transition"]=t.panel.style[c+"transform"]=t.panel.style.transform="",t.emit("close")},this._duration+50),this):this},p.prototype.toggle=function(){return this.isOpen()?this.close():this.open()},p.prototype.isOpen=function(){return this._opened},p.prototype._translateXTo=function(t){return this._currentOffsetX=t,this.panel.style[c+"transform"]=this.panel.style.transform="translateX("+t+"px)",this},p.prototype._setTransition=function(){return this.panel.style[c+"transition"]=this.panel.style.transition=c+"transform "+this._duration+"ms "+this._fx,this},p.prototype._initTouchEvents=function(){var t=this;return this._onScrollFn=o(a,"scroll",function(){t._moved||(clearTimeout(i),r=!0,i=setTimeout(function(){r=!1},250))}),this._preventMove=function(e){t._moved&&e.preventDefault()},a.addEventListener(h.move,this._preventMove),this._resetTouchFn=function(e){void 0!==e.touches&&(t._moved=!1,t._opening=!1,t._startOffsetX=e.touches[0].pageX,t._preventOpen=!t._touch||!t.isOpen()&&0!==t.menu.clientWidth)},this.panel.addEventListener(h.start,this._resetTouchFn),this._onTouchCancelFn=function(){t._moved=!1,t._opening=!1},this.panel.addEventListener("touchcancel",this._onTouchCancelFn),this._onTouchEndFn=function(){t._moved&&(t.emit("translateend"),t._opening&&Math.abs(t._currentOffsetX)>t._tolerance?t.open():t.close()),t._moved=!1},this.panel.addEventListener(h.end,this._onTouchEndFn),this._onTouchMoveFn=function(e){if(!(r||t._preventOpen||void 0===e.touches||function(t){for(;t.parentNode;){if(null!==t.getAttribute("data-slideout-ignore"))return t;t=t.parentNode}return null}(e.target))){var n=e.touches[0].clientX-t._startOffsetX,i=t._currentOffsetX=n;if(!(Math.abs(i)>t._padding)&&Math.abs(n)>20){t._opening=!0;var o=n*t._orientation;if(t._opened&&o>0||!t._opened&&o<0)return;t._moved||t.emit("translatestart"),o<=0&&(i=n+t._padding*t._orientation,t._opening=!1),t._moved&&u.classList.contains("slideout-open")||u.classList.add("slideout-open"),t.panel.style[c+"transform"]=t.panel.style.transform="translateX("+i+"px)",t.emit("translate",i),t._moved=!0}}},this.panel.addEventListener(h.move,this._onTouchMoveFn),this},p.prototype.enableTouch=function(){return this._touch=!0,this},p.prototype.disableTouch=function(){return this._touch=!1,this},p.prototype.destroy=function(){return this.close(),a.removeEventListener(h.move,this._preventMove),this.panel.removeEventListener(h.start,this._resetTouchFn),this.panel.removeEventListener("touchcancel",this._onTouchCancelFn),this.panel.removeEventListener(h.end,this._onTouchEndFn),this.panel.removeEventListener(h.move,this._onTouchMoveFn),a.removeEventListener("scroll",this._onScrollFn),this.open=this.close=function(){},this},e.exports=p},{decouple:2,emitter:3}],2:[function(t,e,n){"use strict";var i=window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(t){window.setTimeout(t,1e3/60)};e.exports=function(t,e,n){var o,s=!1;function r(t){o=t,s||(i(a),s=!0)}function a(){n.call(t,o),s=!1}return t.addEventListener(e,r,!1),r}},{}],3:[function(t,e,n){"use strict";var i=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")};n.__esModule=!0;var o=function(){function t(){i(this,t)}return t.prototype.on=function(t,e){return this._eventCollection=this._eventCollection||{},this._eventCollection[t]=this._eventCollection[t]||[],this._eventCollection[t].push(e),this},t.prototype.once=function(t,e){var n=this;function i(){n.off(t,i),e.apply(this,arguments)}return i.listener=e,this.on(t,i),this},t.prototype.off=function(t,e){var n=void 0;return this._eventCollection&&(n=this._eventCollection[t])?(n.forEach(function(t,i){t!==e&&t.listener!==e||n.splice(i,1)}),0===n.length&&delete this._eventCollection[t],this):this},t.prototype.emit=function(t){for(var e=this,n=arguments.length,i=Array(n>1?n-1:0),o=1;o<n;o++)i[o-1]=arguments[o];var s=void 0;return this._eventCollection&&(s=this._eventCollection[t])?(s=s.slice(0),s.forEach(function(t){return t.apply(e,i)}),this):this},t}();n.default=o,e.exports=n.default},{}]},{},[1])(1)});