PageSourceSearch

https://handluggageonly.co.uk/wp-content/themes/applique/assets/js/waypoint.js?ver=4.0.0

js handluggageonly.co.uk collected 2026-10-01 08:51:06 UTC 8,852 bytes, 7 lines download raw bytes

vendor: 8,852 bytes, lines 1-7
1/**
2 * Waypoints - 4.0.0
3 * Copyright © 2011-2015 Caleb Troughton
4 * Licensed under the MIT license.
5 * https://github.com/imakewebthings/waypoints/blog/master/licenses.txt
6 */
7!function(){"use strict";function c(d){if(!d)throw new Error("No options passed to Waypoint constructor");if(!d.element)throw new Error("No element option passed to Waypoint constructor");if(!d.handler)throw new Error("No handler option passed to Waypoint constructor");this.key="waypoint-"+a,this.options=c.Adapter.extend({},c.defaults,d),this.element=this.options.element,this.adapter=new c.Adapter(this.element),this.callback=d.handler,this.axis=this.options.horizontal?"horizontal":"vertical",this.enabled=this.options.enabled,this.triggerPoint=null,this.group=c.Group.findOrCreate({name:this.options.group,axis:this.axis}),this.context=c.Context.findOrCreateByElement(this.options.context),c.offsetAliases[this.options.offset]&&(this.options.offset=c.offsetAliases[this.options.offset]),this.group.add(this),this.context.add(this),b[this.key]=this,a+=1}var a=0,b={};c.prototype.queueTrigger=function(a){this.group.queueTrigger(this,a)},c.prototype.trigger=function(a){this.enabled&&this.callback&&this.callback.apply(this,a)},c.prototype.destroy=function(){this.context.remove(this),this.group.remove(this),delete b[this.key]},c.prototype.disable=function(){return this.enabled=!1,this},c.prototype.enable=function(){return this.context.refresh(),this.enabled=!0,this},c.prototype.next=function(){return this.group.next(this)},c.prototype.previous=function(){return this.group.previous(this)},c.invokeAll=function(a){var c=[];for(var d in b)c.push(b[d]);for(var e=0,f=c.length;f>e;e++)c[e][a]()},c.destroyAll=function(){c.invokeAll("destroy")},c.disableAll=function(){c.invokeAll("disable")},c.enableAll=function(){c.invokeAll("enable")},c.refreshAll=function(){c.Context.refreshAll()},c.viewportHeight=function(){return window.innerHeight||document.documentElement.clientHeight},c.viewportWidth=function(){return document.documentElement.clientWidth},c.adapters=[],c.defaults={context:window,continuous:!0,enabled:!0,group:"default",horizontal:!1,offset:0},c.offsetAliases={"bottom-in-view":function(){return this.context.innerHeight()-this.adapter.outerHeight()},"right-in-view":function(){return this.context.innerWidth()-this.adapter.outerWidth()}},window.Waypoint=c}(),function(){"use strict";function a(a){window.setTimeout(a,1e3/60)}function f(a){this.element=a,this.Adapter=d.Adapter,this.adapter=new this.Adapter(a),this.key="waypoint-context-"+b,this.didScroll=!1,this.didResize=!1,this.oldScroll={x:this.adapter.scrollLeft(),y:this.adapter.scrollTop()},this.waypoints={vertical:{},horizontal:{}},a.waypointContextKey=this.key,c[a.waypointContextKey]=this,b+=1,this.createThrottledScrollHandler(),this.createThrottledResizeHandler()}var b=0,c={},d=window.Waypoint,e=window.onload;f.prototype.add=function(a){var b=a.options.horizontal?"horizontal":"vertical";this.waypoints[b][a.key]=a,this.refresh()},f.prototype.checkEmpty=function(){var a=this.Adapter.isEmptyObject(this.waypoints.horizontal),b=this.Adapter.isEmptyObject(this.waypoints.vertical);a&&b&&(this.adapter.off(".waypoints"),delete c[this.key])},f.prototype.createThrottledResizeHandler=function(){function b(){a.handleResize(),a.didResize=!1}var a=this;this.adapter.on("resize.waypoints",function(){a.didResize||(a.didResize=!0,d.requestAnimationFrame(b))})},f.prototype.createThrottledScrollHandler=function(){function b(){a.handleScroll(),a.didScroll=!1}var a=this;this.adapter.on("scroll.waypoints",function(){(!a.didScroll||d.isTouch)&&(a.didScroll=!0,d.requestAnimationFrame(b))})},f.prototype.handleResize=function(){d.Context.refreshAll()},f.prototype.handleScroll=function(){var a={},b={horizontal:{newScroll:this.adapter.scrollLeft(),oldScroll:this.oldScroll.x,forward:"right",backward:"left"},vertical:{newScroll:this.adapter.scrollTop(),oldScroll:this.oldScroll.y,forward:"down",backward:"up"}};for(var c in b){var d=b[c],e=d.newScroll>d.oldScroll,f=e?d.forward:d.backward;for(var g in this.waypoints[c]){var h=this.waypoints[c][g],i=d.oldScroll<h.triggerPoint,j=d.newScroll>=h.triggerPoint,k=i&&j,l=!i&&!j;(k||l)&&(h.queueTrigger(f),a[h.group.id]=h.group)}}for(var m in a)a[m].flushTriggers();this.oldScroll={x:b.horizontal.newScroll,y:b.vertical.newScroll}},f.prototype.innerHeight=function(){return this.element==this.element.window?d.viewportHeight():this.adapter.innerHeight()},f.prototype.remove=function(a){delete this.waypoints[a.axis][a.key],this.checkEmpty()},f.prototype.innerWidth=function(){return this.element==this.element.window?d.viewportWidth():this.adapter.innerWidth()},f.prototype.destroy=function(){var a=[];for(var b in this.waypoints)for(var c in this.waypoints[b])a.push(this.waypoints[b][c]);for(var d=0,e=a.length;e>d;d++)a[d].destroy()},f.prototype.refresh=function(){var e,a=this.element==this.element.window,b=a?void 0:this.adapter.offset(),c={};this.handleScroll(),e={horizontal:{contextOffset:a?0:b.left,contextScroll:a?0:this.oldScroll.x,contextDimension:this.innerWidth(),oldScroll:this.oldScroll.x,forward:"right",backward:"left",offsetProp:"left"},vertical:{contextOffset:a?0:b.top,contextScroll:a?0:this.oldScroll.y,contextDimension:this.innerHeight(),oldScroll:this.oldScroll.y,forward:"down",backward:"up",offsetProp:"top"}};for(var f in e){var g=e[f];for(var h in this.waypoints[f]){var n,o,p,q,r,i=this.waypoints[f][h],j=i.options.offset,k=i.triggerPoint,l=0,m=null==k;i.element!==i.element.window&&(l=i.adapter.offset()[g.offsetProp]),"function"==typeof j?j=j.apply(i):"string"==typeof j&&(j=parseFloat(j),i.options.offset.indexOf("%")>-1&&(j=Math.ceil(g.contextDimension*j/100))),n=g.contextScroll-g.contextOffset,i.triggerPoint=l+n-j,o=k<g.oldScroll,p=i.triggerPoint>=g.oldScroll,q=o&&p,r=!o&&!p,!m&&q?(i.queueTrigger(g.backward),c[i.group.id]=i.group):!m&&r?(i.queueTrigger(g.forward),c[i.group.id]=i.group):m&&g.oldScroll>=i.triggerPoint&&(i.queueTrigger(g.forward),c[i.group.id]=i.group)}}return d.requestAnimationFrame(function(){for(var a in c)c[a].flushTriggers()}),this},f.findOrCreateByElement=function(a){return f.findByElement(a)||new f(a)},f.refreshAll=function(){for(var a in c)c[a].refresh()},f.findByElement=function(a){return c[a.waypointContextKey]},window.onload=function(){e&&e(),f.refreshAll()},d.requestAnimationFrame=function(b){var c=window.requestAnimationFrame||window.mozRequestAnimationFrame||window.webkitRequestAnimationFrame||a;c.call(window,b)},d.Context=f}(),function(){"use strict";function a(a,b){return a.triggerPoint-b.triggerPoint}function b(a,b){return b.triggerPoint-a.triggerPoint}function e(a){this.name=a.name,this.axis=a.axis,this.id=this.name+"-"+this.axis,this.waypoints=[],this.clearTriggerQueues(),c[this.axis][this.name]=this}var c={vertical:{},horizontal:{}},d=window.Waypoint;e.prototype.add=function(a){this.waypoints.push(a)},e.prototype.clearTriggerQueues=function(){this.triggerQueues={up:[],down:[],left:[],right:[]}},e.prototype.flushTriggers=function(){for(var c in this.triggerQueues){var d=this.triggerQueues[c],e="up"===c||"left"===c;d.sort(e?b:a);for(var f=0,g=d.length;g>f;f+=1){var h=d[f];(h.options.continuous||f===d.length-1)&&h.trigger([c])}}this.clearTriggerQueues()},e.prototype.next=function(b){this.waypoints.sort(a);var c=d.Adapter.inArray(b,this.waypoints),e=c===this.waypoints.length-1;return e?null:this.waypoints[c+1]},e.prototype.previous=function(b){this.waypoints.sort(a);var c=d.Adapter.inArray(b,this.waypoints);return c?this.waypoints[c-1]:null},e.prototype.queueTrigger=function(a,b){this.triggerQueues[b].push(a)},e.prototype.remove=function(a){var b=d.Adapter.inArray(a,this.waypoints);b>-1&&this.waypoints.splice(b,1)},e.prototype.first=function(){return this.waypoints[0]},e.prototype.last=function(){return this.waypoints[this.waypoints.length-1]},e.findOrCreate=function(a){return c[a.axis][a.name]||new e(a)},d.Group=e}(),function(){"use strict";function c(b){this.$element=a(b)}var a=window.jQuery,b=window.Waypoint;a.each(["innerHeight","innerWidth","off","offset","on","outerHeight","outerWidth","scrollLeft","scrollTop"],function(a,b){c.prototype[b]=function(){var a=Array.prototype.slice.call(arguments);return this.$element[b].apply(this.$element,a)}}),a.each(["extend","inArray","isEmptyObject"],function(b,d){c[d]=a[d]}),b.adapters.push({name:"jquery",Adapter:c}),b.Adapter=c}(),function(){"use strict";function b(b){return function(){var c=[],d=arguments[0];return b.isFunction(arguments[0])&&(d=b.extend({},arguments[1]),d.handler=arguments[0]),this.each(function(){var e=b.extend({},d,{element:this});"string"==typeof e.context&&(e.context=b(this).closest(e.context)[0]),c.push(new a(e))}),c}}var a=window.Waypoint;window.jQuery&&(window.jQuery.fn.waypoint=b(window.jQuery)),window.Zepto&&(window.Zepto.fn.waypoint=b(window.Zepto))}();

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.