1/* 2The MIT License (MIT) 3 4Copyright (c) 2014 Phil Hughes 5 6Permission is hereby granted, free of charge, to any person obtaining a copy 7of this software and associated documentation files (the "Software"), to deal 8in the Software without restriction, including without limitation the rights 9to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 10copies of the Software, and to permit persons to whom the Software is 11furnished to do so, subject to the following conditions: 12 13The above copyright notice and this permission notice shall be included in all 14copies or substantial portions of the Software. 15 16THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 17IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 18FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 19AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 20LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 21OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 22SOFTWARE. 23*/ 24(function(){var a,b,c,d,e=function(a,b){return function(){return a.apply(b,arguments)}};b=function(){function a(a){this.element=a,this._clickEvent=e(this._clickEvent,this),this.element=$(this.element),this.dropdown=this.element.parent().find(".dropdown-menu"),this.element.on("click",this._clickEvent)}return a.prototype._clickEvent=function(a){return this.dropdown.hasClass("shown")||a.preventDefault(),this.dropdown.toggleClass("shown"),this.element.parent().toggleClass("active")},a}(),c=function(){function a(a,b,c){this.element=a,this.location=b,this.offcanvas=c,this._clearCss=e(this._clearCss,this),this._getFade=e(this._getFade,this),this._getCss=e(this._getCss,this),this._touchEnd=e(this._touchEnd,this),this._touchMove=e(this._touchMove,this),this._touchStart=e(this._touchStart,this),this.endThreshold=130,this.startThreshold=this.element.hasClass("navbar-offcanvas-right")?$("body").outerWidth()-60:20,this.maxStartThreshold=this.element.hasClass("navbar-offcanvas-right")?$("body").outerWidth()-20:60,this.currentX=0,this.fade=this.element.hasClass("navbar-offcanvas-fade")?!0:!1,$(document).on("touchstart",this._touchStart),$(document).on("touchmove",this._touchMove),$(document).on("touchend",this._touchEnd)}return a.prototype._touchStart=function(a){return this.startX=a.originalEvent.touches[0].pageX},a.prototype._touchMove=function(a){var b;if($(a.target).parents(".navbar-offcanvas").length>0)return!0;if(this.startX>this.startThreshold&&this.startX<this.maxStartThreshold){if(a.preventDefault(),b=a.originalEvent.touches[0].pageX-this.startX,b=this.element.hasClass("navbar-offcanvas-right")?-b:b,Math.abs(b)<this.element.outerWidth())return this.element.css(this._getCss(b)),this.element.css(this._getFade(b))}else if(this.element.hasClass("in")&&(a.preventDefault(),b=a.originalEvent.touches[0].pageX+(this.currentX-this.startX),b=this.element.hasClass("navbar-offcanvas-right")?-b:b,Math.abs(b)<this.element.outerWidth()))return this.element.css(this._getCss(b)),this.element.css(this._getFade(b))},a.prototype._touchEnd=function(a){var b,c;return $(a.target).parents(".navbar-offcanvas").length>0?!0:(c=a.originalEvent.changedTouches[0].pageX,b=this.element.hasClass("navbar-offcanvas-right")?Math.abs(c)>this.endThreshold+50:c<this.endThreshold+50,this.element.hasClass("in")&&b?(this.currentX=0,this.element.removeClass("in").css(this._clearCss())):Math.abs(c-this.startX)>this.endThreshold&&this.startX>this.startThreshold&&this.startX<this.maxStartThreshold?(this.currentX=this.element.hasClass("navbar-offcanvas-right")?-this.element.outerWidth():this.element.outerWidth(),this.element.toggleClass("in").css(this._clearCss())):this.element.css(this._clearCss()),this.offcanvas.bodyOverflow())},a.prototype._getCss=function(a){return a=this.element.hasClass("navbar-offcanvas-right")?-a:a,{"-webkit-transform":"translate3d("+a+"px, 0px, 0px)","-webkit-transition-duration":"0s","-moz-transform":"translate3d("+a+"px, 0px, 0px)","-moz-transition":"0s","-o-transform":"translate3d("+a+"px, 0px, 0px)","-o-transition":"0s",transform:"translate3d("+a+"px, 0px, 0px)",transition:"0s"}},a.prototype._getFade=function(a){return this.fade?{opacity:a/this.element.outerWidth()}:{}},a.prototype._clearCss=function(){return{"-webkit-transform":"","-webkit-transition-duration":"","-moz-transform":"","-moz-transition":"","-o-transform":"","-o-transition":"",transform:"",transition:"",opacity:""}},a}(),a=function(){function a(a){var d,f;this.element=a,this.bodyOverflow=e(this.bodyOverflow,this),this._sendEventsAfter=e(this._sendEventsAfter,this),this._sendEventsBefore=e(this._sendEventsBefore,this),this._documentClicked=e(this._documentClicked,this),this._clicked=e(this._clicked,this),f=this.element.attr("data-target")?this.element.attr("data-target"):!1,f?(this.target=$(f),this.target.length&&!this.target.hasClass("js-offcanas-done")&&(this.element.addClass("js-offcanvas-has-events"),this.location=this.target.hasClass("navbar-offcanvas-right")?"right":"left",this.target.addClass(transform?"offcanvas-transform js-offcanas-done":"offcanvas-position js-offcanas-done"),this.target.data("offcanvas",this),this.element.on("click",this._clicked),$(document).on("click",this._documentClicked),this.target.hasClass("navbar-offcanvas-touch")&&(d=new c(this.target,this.location,this)),this.target.find(".dropdown-toggle").each(function(){var a;return a=new b(this)}))):console.warn("Offcanvas: `data-target` attribute must be present.")}return a.prototype._clicked=function(a){return a.preventDefault(),this._sendEventsBefore(),$(".navbar-offcanvas").removeClass("in"),this.target.toggleClass("in"),this.bodyOverflow()},a.prototype._documentClicked=function(a){var b;return b=$(a.target),b.hasClass("offcanvas-toggle")||0!==b.parents(".offcanvas-toggle").length||0!==b.parents(".navbar-offcanvas").length||b.hasClass("navbar-offcanvas")||!this.target.hasClass("in")?void 0:(a.preventDefault(),this._sendEventsBefore(),this.target.removeClass("in"),this.bodyOverflow())},a.prototype._sendEventsBefore=function(){return this.target.trigger(this.target.hasClass("in")?"show.bs.offcanvas":"hide.bs.offcanvas")},a.prototype._sendEventsAfter=function(){return this.target.trigger(this.target.hasClass("in")?"shown.bs.offcanvas":"hidden.bs.offcanvas")},a.prototype.bodyOverflow=function(){return this._sendEventsAfter(),$("body").css({overflow:this.target.hasClass("in")?"hidden":"",position:this.target.hasClass("in")?"fixed":""})},a}(),d=function(a){return function(){var b,c,d,e;return c=document.createElement("div"),e="translate3d(0px, 0px, 0px)",d=/translate3d\(0px, 0px, 0px\)/g,c.style.cssText="-webkit-transform: "+e+"; -moz-transform: "+e+"; -o-transform: "+e+"; transform: "+e,b=c.style.cssText.match(d),a.transform=null!=b.length}}(this),$(function(){return d(),$('[data-toggle="offcanvas"]').each(function(){var b;return b=new a($(this))}),$(".offcanvas-toggle").each(function(){return $(this).on("click",function(){var a,b;return!$(this).hasClass("js-offcanvas-has-events")&&(b=$(this).attr("data-target"),a=$(b))?(a.removeClass("in"),$("body").css({overflow:"",position:""})):void 0})})})}).call(this);
Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.