PageSourceSearch

https://solace.com/wp-content/themes/orbit-media/resources/js/min/carousel-swipe.js?ver=1790707779

js solace.com collected 2026-10-01 09:23:40 UTC 3,394 bytes, 1 lines download raw bytes

1!function(n){"use strict";if(!n.fn.carousel)throw new Error("carousel-swipe required bootstrap carousel");var s=function(t){this.$element=n(t),this.carousel=this.$element.data("bs.carousel"),this.options=n.extend({},s.DEFAULTS,this.carousel.options),this.startX=this.startY=this.startTime=this.cycling=this.$active=this.$items=this.$next=this.$prev=this.dx=null,this.sliding=!1,this.$element.on("touchstart",n.proxy(this.touchstart,this)).on("touchmove",n.proxy(this.touchmove,this)).on("touchend",n.proxy(this.touchend,this)).on("slide.bs.carousel",n.proxy(this.startSliding,this)).on("slid.bs.carousel",n.proxy(this.stopSliding,this))};s.DEFAULTS={swipe:50},s.prototype.startSliding=function(){this.sliding=!0},s.prototype.stopSliding=function(){this.sliding=!1},s.prototype.touchstart=function(t){if(!this.sliding&&this.options.swipe){var s=t.originalEvent.touches?t.originalEvent.touches[0]:t;this.dx=0,this.startX=s.pageX,this.startY=s.pageY,this.cycling=null,this.width=this.$element.width(),this.startTime=t.timeStamp}},s.prototype.touchmove=function(t){if(!this.sliding&&this.options.swipe&&this.startTime){var s=t.originalEvent.touches?t.originalEvent.touches[0]:t,i=s.pageX-this.startX,e=s.pageY-this.startY;Math.abs(i)<Math.abs(e)||(null===this.cycling&&(this.cycling=!!this.carousel.interval,this.cycling&&this.carousel.pause()),t.preventDefault(),this.dx=i/(this.width||1)*100,this.swipe(this.dx))}},s.prototype.touchend=function(t){if(!this.sliding&&this.options.swipe&&this.startTime&&this.$active){var s=n().add(this.$active).add(this.$prev).add(this.$next).carousel_transition(!0),i=(t.timeStamp-this.startTime)/1e3,e=Math.abs(this.dx/i);40<this.dx||0<this.dx&&e>this.options.swipe?this.carousel.prev():this.dx<-40||this.dx<0&&e>this.options.swipe?this.carousel.next():this.$active.one(n.support.transition.end,function(){s.removeClass("prev next")}).emulateTransitionEnd(1e3*this.$active.css("transition-duration").slice(0,-1)),s.css("transform",""),this.cycling&&this.carousel.cycle(),this.$active=null,this.startTime=null}},s.prototype.swipe=function(t){var s=this.$active||this.getActive();if(t<0){if(this.$prev.css("transform","translate3d(0,0,0)").removeClass("prev").carousel_transition(!0),!this.$next.length||this.$next.hasClass("active"))return;this.$next.carousel_transition(!1).addClass("next").css("transform","translate3d("+(t+100)+"%,0,0)")}else{if(this.$next.css("transform","").removeClass("next").carousel_transition(!0),!this.$prev.length||this.$prev.hasClass("active"))return;this.$prev.carousel_transition(!1).addClass("prev").css("transform","translate3d("+(t-100)+"%,0,0)")}s.carousel_transition(!1).css("transform","translate3d("+t+"%, 0, 0)")},s.prototype.getActive=function(){return this.$active=this.$element.find(".item.active"),this.$items=this.$active.parent().children(),this.$next=this.$active.next(),!this.$next.length&&this.options.wrap&&(this.$next=this.$items.first()),this.$prev=this.$active.prev(),!this.$prev.length&&this.options.wrap&&(this.$prev=this.$items.last()),this.$active};var t=n.fn.carousel;n.fn.carousel=function(){return t.apply(this,arguments),this.each(function(){var t=n(this);t.data("bs.carousel.swipe")||t.data("bs.carousel.swipe",new s(this))})},n.extend(n.fn.carousel,t),n.fn.carousel_transition=function(t){return t=t?"":"none",this.each(function(){n(this).css("-webkit-transition",t).css("transition",t)})}}(jQuery);

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.