1!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Hunt=e()}(this,(function(){"use strict";var t=function(){},e=function(t,e){var n,i,s;return function(){var o=arguments;!0===n?(clearTimeout(i),i=setTimeout((function(){Date.now()-s>=e&&(t.apply(this,o),s=Date.now())}),e-(Date.now()-s))):(t.apply(this,o),s=Date.now(),n=!0)}},n=function(t){this._throttledHuntElements=e(this._huntElements.bind(this),t),this._throttledUpdateMetrics=e(this._updateMetrics.bind(this),t),window.addEventListener("scroll",this._throttledHuntElements),window.addEventListener("resize",this._throttledUpdateMetrics),this._huntElements()},i=function(t,e){for(var n in this.element=t,this.visible=!1,e)Object.hasOwnProperty.call(e,n)&&(this[n]=e[n]);if(void 0!==t.dataset){if(void 0!==t.dataset.huntPersist)try{this.persist=JSON.parse(t.dataset.huntPersist)}catch(t){console.log("hunt: invalid data-hunt-persist value",t)}if(void 0!==t.dataset.huntOffset)try{this.offset=JSON.parse(t.dataset.huntOffset)}catch(t){console.log("hunt: invalid data-hunt-offset value",t)}}};i.prototype.offset=0,i.prototype.persist=!1,i.prototype.enter=t,i.prototype.leave=t;var s=function(t,e){if(t instanceof Node==!1&&"number"!=typeof t.length)throw new TypeError("hunt: observer first argument should be a node or a list of nodes");if("object"!=typeof e)throw new TypeError("hunt: observer second argument should be an object");t instanceof Node==!0&&(t=[t]),this._viewportHeight=window.innerHeight,this._huntedElements=[];for(var s=0,o=t.length;s<o;s++)this._huntedElements.push(new i(t[s],e));var r=e.throttleInterval||100;return n.call(this,r),s=o=null,this};return s.prototype._huntElements=function(){for(var e,n,i,s=this._huntedElements.length;s;)--s,i=(n=(e=this._huntedElements[s]).element.getBoundingClientRect()).top-e.offset<this._viewportHeight&&n.top>=-(n.height+e.offset),!1===e.visible&&!0===i&&(e.enter.call(null,e.element),e.visible=!0,e.leave===t&&!0!==e.persist&&(this._huntedElements.splice(s,1),0===this._huntedElements.length&&this.disconnect())),!0===e.visible&&!1===i&&(e.leave.call(null,e.element),e.visible=!1,!0!==e.persist&&(this._huntedElements.splice(s,1),0===this._huntedElements.length&&this.disconnect()));s=e=n=i=null},s.prototype.trigger=s.prototype._huntElements,s.prototype._updateMetrics=function(){this._viewportHeight=window.innerHeight,this._huntElements()},s.prototype.disconnect=function(){window.removeEventListener("scroll",this._throttledHuntElements),window.removeEventListener("resize",this._throttledUpdateMetrics)},s})); 2//# sourceMappingURL=hunt.min.js.map
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.