var _____WB$wombat$assign$function_____ = function(name) {return (self._wb_wombat && self._wb_wombat.local_init && self._wb_wombat.local_init(name)) || self[name]; }; if (!self.__WB_pmw) { self.__WB_pmw = function(obj) { this.__WB_source = obj; return this; } } { let window = _____WB$wombat$assign$function_____("window"); let self = _____WB$wombat$assign$function_____("self"); let document = _____WB$wombat$assign$function_____("document"); let location = _____WB$wombat$assign$function_____("location"); let top = _____WB$wombat$assign$function_____("top"); let parent = _____WB$wombat$assign$function_____("parent"); let frames = _____WB$wombat$assign$function_____("frames"); let opener = _____WB$wombat$assign$function_____("opener"); ; (function (root, factory) { if (typeof define === "function" && define.amd) { define(factory); } else if (typeof exports === "object") { module.exports = factory(); } else { root.ResizeSensor = factory(); } }(this, function () { // Make sure it does not throw in a SSR (Server Side Rendering) situation if (typeof window === "undefined") { return null; } // Only used for the dirty checking, so the event callback count is limited to max 1 call per fps per sensor. // In combination with the event based resize sensor this saves cpu time, because the sensor is too fast and // would generate too many unnecessary events. var requestAnimationFrame = window.requestAnimationFrame || window.mozRequestAnimationFrame || window.webkitRequestAnimationFrame || function (fn) { return window.setTimeout(fn, 20); }; /** * Iterate over each of the provided element(s). * * @param {HTMLElement|HTMLElement[]} elements * @param {Function} callback */ function forEachElement(elements, callback){ var elementsType = Object.prototype.toString.call(elements); var isCollectionTyped = ('[object Array]' === elementsType || ('[object NodeList]' === elementsType) || ('[object HTMLCollection]' === elementsType) || ('[object Object]' === elementsType) || ('undefined' !== typeof jQuery && elements instanceof jQuery) //jquery || ('undefined' !== typeof Elements && elements instanceof Elements) //mootools ); var i = 0, j = elements.length; if (isCollectionTyped) { for (; i < j; i++) { callback(elements[i]); } } else { callback(elements); } } /** * Class for dimension change detection. * * @param {Element|Element[]|Elements|jQuery} element * @param {Function} callback * * @constructor */ var ResizeSensor = function(element, callback) { /** * * @constructor */ function EventQueue() { var q = []; this.add = function(ev) { q.push(ev); }; var i, j; this.call = function() { for (i = 0, j = q.length; i < j; i++) { q[i].call(); } }; this.remove = function(ev) { var newQueue = []; for(i = 0, j = q.length; i < j; i++) { if(q[i] !== ev) newQueue.push(q[i]); } q = newQueue; } this.length = function() { return q.length; } } /** * @param {HTMLElement} element * @param {String} prop * @returns {String|Number} */ function getComputedStyle(element, prop) { if (element.currentStyle) { return element.currentStyle[prop]; } if (window.getComputedStyle) { return window.getComputedStyle(element, null).getPropertyValue(prop); } return element.style[prop]; } /** * * @param {HTMLElement} element * @param {Function} resized */ function attachResizeEvent(element, resized) { if (!element) return; if (element.resizedAttached) { element.resizedAttached.add(resized); return; } element.resizedAttached = new EventQueue(); element.resizedAttached.add(resized); element.resizeSensor = document.createElement('div'); element.resizeSensor.className = 'resize-sensor'; var style = 'position: absolute; left: 0; top: 0; right: 0; bottom: 0; overflow: hidden; z-index: -1; visibility: hidden;'; var styleChild = 'position: absolute; left: 0; top: 0; transition: 0s;'; element.resizeSensor.style.cssText = style; element.resizeSensor.innerHTML = '
' + '
' + '
' + '
' + '
' + '
'; element.appendChild(element.resizeSensor); if (getComputedStyle(element, 'position') == 'static') { element.style.position = 'relative'; } var expand = element.resizeSensor.childNodes[0]; var expandChild = expand.childNodes[0]; var shrink = element.resizeSensor.childNodes[1]; var dirty, rafId, newWidth, newHeight; var lastWidth = element.offsetWidth; var lastHeight = element.offsetHeight; var reset = function() { expandChild.style.width = '100000px'; expandChild.style.height = '100000px'; expand.scrollLeft = 100000; expand.scrollTop = 100000; shrink.scrollLeft = 100000; shrink.scrollTop = 100000; }; reset(); var onResized = function() { rafId = 0; if (!dirty) return; lastWidth = newWidth; lastHeight = newHeight; if (element.resizedAttached) { element.resizedAttached.call(); } }; var onScroll = function() { newWidth = element.offsetWidth; newHeight = element.offsetHeight; dirty = newWidth != lastWidth || newHeight != lastHeight; if (dirty && !rafId) { rafId = requestAnimationFrame(onResized); } reset(); }; var addEvent = function(el, name, cb) { if (el.attachEvent) { el.attachEvent('on' + name, cb); } else { el.addEventListener(name, cb); } }; addEvent(expand, 'scroll', onScroll); addEvent(shrink, 'scroll', onScroll); } forEachElement(element, function(elem){ attachResizeEvent(elem, callback); }); this.detach = function(ev) { ResizeSensor.detach(element, ev); }; }; ResizeSensor.detach = function(element, ev) { forEachElement(element, function(elem){ if (!elem) return if(elem.resizedAttached && typeof ev == "function"){ elem.resizedAttached.remove(ev); if(elem.resizedAttached.length()) return; } if (elem.resizeSensor) { if (elem.contains(elem.resizeSensor)) { elem.removeChild(elem.resizeSensor); } delete elem.resizeSensor; delete elem.resizedAttached; } }); }; return ResizeSensor; })); (function ($) { var defaults = { callback: function () { }, runOnLoad: true, frequency: 2000, previousVisibility : null }; var methods = {}; methods.checkVisibility = function (element, options) { if (jQuery.contains(document, element[0])) { var previousVisibility = options.previousVisibility; var isVisible = element.is(':visible'); options.previousVisibility = isVisible; if (previousVisibility == null) { if (options.runOnLoad) { options.callback(element, isVisible); } } else if (previousVisibility !== isVisible) { options.callback(element, isVisible); } setTimeout(function() { methods.checkVisibility(element, options); }, options.frequency); } }; $.fn.visibilityChanged = function (options) { var settings = $.extend({}, defaults, options); return this.each(function () { methods.checkVisibility($(this), settings); }); }; })(jQuery); } /* FILE ARCHIVED ON 22:16:19 Oct 16, 2020 AND RETRIEVED FROM THE INTERNET ARCHIVE ON 07:44:16 Feb 07, 2023. JAVASCRIPT APPENDED BY WAYBACK MACHINE, COPYRIGHT INTERNET ARCHIVE. ALL OTHER CONTENT MAY ALSO BE PROTECTED BY COPYRIGHT (17 U.S.C. SECTION 108(a)(3)). */ /* playback timings (ms): captures_list: 86.929 exclusion.robots: 0.069 exclusion.robots.policy: 0.061 RedisCDXSource: 0.779 esindex: 0.009 LoadShardBlock: 68.953 (3) PetaboxLoader3.datanode: 80.803 (5) CDXLines.iter: 14.537 (3) load_resource: 233.538 (2) PetaboxLoader3.resolve: 167.789 (2) */