text: !function(e){if("object"==typeof exports&&"undefined"!=typeof module)module.exports=e();else if("function"==typeof define&&define.amd)define([],e);else{var t;"undefined"!=typeof window?t=window:"undefined"!=typeof global?t=global:"undefined"!=typeof self&&(t=self),t.Slideout=e()}}(function(){var e,t,n;return function i(e,t,n){function o(r,a){if(!t[r]){if(!e[r]){var u=typeof require=="function"&&require;if(!a&&u)return u(r,!0);if(s)return s(r,!0);var f=new Error("Cannot find module '"+r+"'");throw f.code="MODULE_NOT_FOUND",f}var l=t[r]={exports:{}};e[r][0].call(l.exports,function(t){var n=e[r][1][t];return o(n?n:t)},l,l.exports,i,e,t,n)}return t[r].exports}var s=typeof require=="function"&&require;for(var r=0;r<n.length;r++)o(n[r]);return o}({1:[function(e,t,n){"use strict";var i=e("decouple");var o;var s=false;var r=window.document;var a=r.documentElement;var u=window.navigator.msPointerEnabled;var f={start:u?"MSPointerDown":"touchstart",move:u?"MSPointerMove":"touchmove",end:u?"MSPointerUp":"touchend"};var l=function d(){var e=/^(Webkit|Khtml|Moz|ms|O)(?=[A-Z])/;var t=r.getElementsByTagName("script")[0].style;for(var n in t){if(e.test(n)){return"-"+n.match(e)[0].toLowerCase()+"-"}}if("WebkitOpacity"in t){return"-webkit-"}if("KhtmlOpacity"in t){return"-khtml-"}return""}();function p(e){e=e||{};this._startOffsetX=0;this._currentOffsetX=0;this._opening=false;this._moved=false;this._opened=false;this._preventOpen=false;this._touch=e.touch==undefined?true:e.touch&&true;this.panel=e.panel;this.menu=e.menu;this.panel.className+=" slideout-panel";this.menu.className+=" slideout-menu";this._fx=e.fx||"ease";this._duration=parseInt(e.duration,10)||300;this._tolerance=parseInt(e.tolerance,10)||70;this._padding=parseInt(e.padding,10)||256;if(this._touch){this._initTouchEvents()}}p.prototype.open=function(){var e=this;if(a.className.search("slideout-open")===-1){a.className+=" slideout-open"}this._setTransition();this._translateXTo(this._padding);this._opened=true;setTimeout(function(){e.panel.style.transition=e.panel.style["-webkit-transition"]=""},this._duration+50);return this};p.prototype.close=function(){var e=this;if(!this.isOpen()&&!this._opening){return this}this._setTransition();this._translateXTo(0);this._opened=false;setTimeout(function(){a.className=a.className.replace(/ slideout-open/,"");e.panel.style.transition=e.panel.style["-webkit-transition"]=""},this._duration+50);return this};p.prototype.toggle=function(){return this.isOpen()?this.close():this.open()};p.prototype.isOpen=function(){return this._opened};p.prototype._translateXTo=function(e){this._currentOffsetX=e;this.panel.style[l+"transform"]=this.panel.style.transform="translate3d("+e+"px, 0, 0)"};p.prototype._setTransition=function(){this.panel.style[l+"transition"]=this.panel.style.transition=l+"transform "+this._duration+"ms "+this._fx};p.prototype._initTouchEvents=function(){var e=this;i(r,"scroll",function(){if(!e._moved){clearTimeout(o);s=true;o=setTimeout(function(){s=false},250)}});r.addEventListener(f.move,function(t){if(e._moved){t.preventDefault()}});this.panel.addEventListener(f.start,function(t){if(typeof t.touches==="undefined"){return}e._moved=false;e._opening=false;e._startOffsetX=t.touches[0].pageX;e._preventOpen=!e.isOpen()&&e.menu.clientWidth!==0});this.panel.addEventListener("touchcancel",function(){e._moved=false;e._opening=false});this.panel.addEventListener(f.end,function(){if(e._moved){e._opening&&Math.abs(e._currentOffsetX)>e._tolerance?e.open():e.close()}e._moved=false});this.panel.addEventListener(f.move,function(t){if(s||e._preventOpen||typeof t.touches==="undefined"){return}var n=t.touches[0].clientX-e._startOffsetX;var i=e._currentOffsetX=n;if(Math.abs(i)>e._padding){return}if(Math.abs(n)>20){e._opening=true;if(e._opened&&n>0||!e._opened&&n<0){return}if(!e._moved&&a.className.search("slideout-open")===-1){a.className+=" slideout-open"}if(n<=0){i=n+e._padding;e._opening=false}e.panel.style[l+"transform"]=e.panel.style.transform="translate3d("+i+"px, 0, 0)";e._moved=true}})};t.exports=p},{decouple:2}],2:[function(e,t,n){"use strict";var i=function(){return window.requestAnimationFrame||window.webkitRequestAnimationFrame||function(e){window.setTimeout(e,1e3/60)}}();function o(e,t,n){var o,s=false;function r(e){o=e;a()}function a(){if(!s){i(u);s=true}}function u(){n.call(e,o);s=false}e.addEventListener(t,r,false)}t.exports=o},{}]},{},[1])(1)});