vendor: 17,127 bytes, lines 1-547
1var _____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;}}{ 2let window = _____WB$wombat$assign$function_____("window"); 3let self = _____WB$wombat$assign$function_____("self"); 4let document = _____WB$wombat$assign$function_____("document"); 5let location = _____WB$wombat$assign$function_____("location"); 6let top = _____WB$wombat$assign$function_____("top"); 7let parent = _____WB$wombat$assign$function_____("parent"); 8let frames = _____WB$wombat$assign$function_____("frames"); 9let opens = _____WB$wombat$assign$function_____("opens"); 10(function (global, factory) { 11 if (typeof define === "function" && define.amd) { 12 define(['module', 'exports'], factory); 13 } else if (typeof exports !== "undefined") { 14 factory(module, exports); 15 } else { 16 var mod = { 17 exports: {} 18 }; 19 factory(mod, mod.exports); 20 global.WOW = mod.exports; 21 } 22})(this, function (module, exports) { 23 'use strict'; 24 25 Object.defineProperty(exports, "__esModule", { 26 value: true 27 }); 28 29 var _class, _temp; 30 31 function _classCallCheck(instance, Constructor) { 32 if (!(instance instanceof Constructor)) { 33 throw new TypeError("Cannot call a class as a function"); 34 } 35 } 36 37 var _createClass = function () { 38 function defineProperties(target, props) { 39 for (var i = 0; i < props.length; i++) { 40 var descriptor = props[i]; 41 descriptor.enumerable = descriptor.enumerable || false; 42 descriptor.configurable = true; 43 if ("value" in descriptor) descriptor.writable = true; 44 Object.defineProperty(target, descriptor.key, descriptor); 45 } 46 } 47 48 return function (Constructor, protoProps, staticProps) { 49 if (protoProps) defineProperties(Constructor.prototype, protoProps); 50 if (staticProps) defineProperties(Constructor, staticProps); 51 return Constructor; 52 }; 53 }(); 54 55 function isIn(needle, haystack) { 56 return haystack.indexOf(needle) >= 0; 57 } 58 59 function extend(custom, defaults) { 60 for (var key in defaults) { 61 if (custom[key] == null) { 62 var value = defaults[key]; 63 custom[key] = value; 64 } 65 } 66 return custom; 67 } 68 69 function isMobile(agent) { 70 return (/Android|webOS|iPhone|iPad|iPod|BlackBerry|IEMobile|Opera Mini/i.test(agent) 71 ); 72 } 73 74 function createEvent(event) { 75 var bubble = arguments.length <= 1 || arguments[1] === undefined ? false : arguments[1]; 76 var cancel = arguments.length <= 2 || arguments[2] === undefined ? false : arguments[2]; 77 var detail = arguments.length <= 3 || arguments[3] === undefined ? null : arguments[3]; 78 79 var customEvent = void 0; 80 if (document.createEvent != null) { 81 // W3C DOM 82 customEvent = document.createEvent('CustomEvent'); 83 customEvent.initCustomEvent(event, bubble, cancel, detail); 84 } else if (document.createEventObject != null) { 85 // IE DOM < 9 86 customEvent = document.createEventObject(); 87 customEvent.eventType = event; 88 } else { 89 customEvent.eventName = event; 90 } 91 92 return customEvent; 93 } 94 95 function emitEvent(elem, event) { 96 if (elem.dispatchEvent != null) { 97 // W3C DOM 98 elem.dispatchEvent(event); 99 } else if (event in (elem != null)) { 100 elem[event](); 101 } else if ('on' + event in (elem != null)) { 102 elem['on' + event](); 103 } 104 } 105 106 function addEvent(elem, event, fn) { 107 if (elem.addEventListener != null) { 108 // W3C DOM 109 elem.addEventListener(event, fn, false); 110 } else if (elem.attachEvent != null) { 111 // IE DOM 112 elem.attachEvent('on' + event, fn); 113 } else { 114 // fallback 115 elem[event] = fn; 116 } 117 } 118 119 function removeEvent(elem, event, fn) { 120 if (elem.removeEventListener != null) { 121 // W3C DOM 122 elem.removeEventListener(event, fn, false); 123 } else if (elem.detachEvent != null) { 124 // IE DOM 125 elem.detachEvent('on' + event, fn); 126 } else { 127 // fallback 128 delete elem[event]; 129 } 130 } 131 132 function getInnerHeight() { 133 if ('innerHeight' in window) { 134 return window.innerHeight; 135 } 136 137 return document.documentElement.clientHeight; 138 } 139 140 // Minimalistic WeakMap shim, just in case. 141 var WeakMap = window.WeakMap || window.MozWeakMap || function () { 142 function WeakMap() { 143 _classCallCheck(this, WeakMap); 144 145 this.keys = []; 146 this.values = []; 147 } 148 149 _createClass(WeakMap, [{ 150 key: 'get', 151 value: function get(key) { 152 for (var i = 0; i < this.keys.length; i++) { 153 var item = this.keys[i]; 154 if (item === key) { 155 return this.values[i]; 156 } 157 } 158 return undefined; 159 } 160 }, { 161 key: 'set', 162 value: function set(key, value) { 163 for (var i = 0; i < this.keys.length; i++) { 164 var item = this.keys[i]; 165 if (item === key) { 166 this.values[i] = value; 167 return this; 168 } 169 } 170 this.keys.push(key); 171 this.values.push(value); 172 return this; 173 } 174 }]); 175 176 return WeakMap; 177 }(); 178 179 // Dummy MutationObserver, to avoid raising exceptions. 180 var MutationObserver = window.MutationObserver || window.WebkitMutationObserver || window.MozMutationObserver || (_temp = _class = function () { 181 function MutationObserver() { 182 _classCallCheck(this, MutationObserver); 183 184 if (typeof console !== 'undefined' && console !== null) { 185 console.warn('MutationObserver is not supported by your browser.'); 186 console.warn('WOW.js cannot detect dom mutations, please call .sync() after loading new content.'); 187 } 188 } 189 190 _createClass(MutationObserver, [{ 191 key: 'observe', 192 value: function observe() {} 193 }]); 194 195 return MutationObserver; 196 }(), _class.notSupported = true, _temp); 197 198 // getComputedStyle shim, from http://stackoverflow.com/a/21797294 199 var getComputedStyle = window.getComputedStyle || function getComputedStyle(el) { 200 var getComputedStyleRX = /(\-([a-z]){1})/g; 201 return { 202 getPropertyValue: function getPropertyValue(prop) { 203 if (prop === 'float') { 204 prop = 'styleFloat'; 205 } 206 if (getComputedStyleRX.test(prop)) { 207 prop.replace(getComputedStyleRX, function (_, _char) { 208 return _char.toUpperCase(); 209 }); 210 } 211 var currentStyle = el.currentStyle; 212 213 return (currentStyle != null ? currentStyle[prop] : void 0) || null; 214 } 215 }; 216 }; 217 218 var WOW = function () { 219 function WOW() { 220 var options = arguments.length <= 0 || arguments[0] === undefined ? {} : arguments[0]; 221 222 _classCallCheck(this, WOW); 223 224 this.defaults = { 225 boxClass: 'wow', 226 animateClass: 'animated', 227 offset: 0, 228 mobile: true, 229 live: true, 230 callback: null, 231 scrollContainer: null, 232 resetAnimation: true 233 }; 234 235 this.animate = function animateFactory() { 236 if ('requestAnimationFrame' in window) { 237 return function (callback) { 238 return window.requestAnimationFrame(callback); 239 }; 240 } 241 return function (callback) { 242 return callback(); 243 }; 244 }(); 245 246 this.vendors = ['moz', 'webkit']; 247 248 this.start = this.start.bind(this); 249 this.resetAnimation = this.resetAnimation.bind(this); 250 this.scrollHandler = this.scrollHandler.bind(this); 251 this.scrollCallback = this.scrollCallback.bind(this); 252 this.scrolled = true; 253 this.config = extend(options, this.defaults); 254 if (options.scrollContainer != null) { 255 this.config.scrollContainer = document.querySelector(options.scrollContainer); 256 } 257 // Map of elements to animation names: 258 this.animationNameCache = new WeakMap(); 259 this.wowEvent = createEvent(this.config.boxClass); 260 } 261 262 _createClass(WOW, [{ 263 key: 'init', 264 value: function init() { 265 this.element = window.document.documentElement; 266 if (isIn(document.readyState, ['interactive', 'complete'])) { 267 this.start(); 268 } else { 269 addEvent(document, 'DOMContentLoaded', this.start); 270 } 271 this.finished = []; 272 } 273 }, { 274 key: 'start', 275 value: function start() { 276 var _this = this; 277 278 this.stopped = false; 279 this.boxes = [].slice.call(this.element.querySelectorAll('.' + this.config.boxClass)); 280 this.all = this.boxes.slice(0); 281 if (this.boxes.length) { 282 if (this.disabled()) { 283 this.resetStyle(); 284 } else { 285 for (var i = 0; i < this.boxes.length; i++) { 286 var box = this.boxes[i]; 287 this.applyStyle(box, true); 288 } 289 } 290 } 291 if (!this.disabled()) { 292 addEvent(this.config.scrollContainer || window, 'scroll', this.scrollHandler); 293 addEvent(window, 'resize', this.scrollHandler); 294 this.interval = setInterval(this.scrollCallback, 50); 295 } 296 if (this.config.live) { 297 var mut = new MutationObserver(function (records) { 298 for (var j = 0; j < records.length; j++) { 299 var record = records[j]; 300 for (var k = 0; k < record.addedNodes.length; k++) { 301 var node = record.addedNodes[k]; 302 _this.doSync(node); 303 } 304 } 305 return undefined; 306 }); 307 mut.observe(document.body, { 308 childList: true, 309 subtree: true 310 }); 311 } 312 } 313 }, { 314 key: 'stop', 315 value: function stop() { 316 this.stopped = true; 317 removeEvent(this.config.scrollContainer || window, 'scroll', this.scrollHandler); 318 removeEvent(window, 'resize', this.scrollHandler); 319 if (this.interval != null) { 320 clearInterval(this.interval); 321 } 322 } 323 }, { 324 key: 'sync', 325 value: function sync() { 326 if (MutationObserver.notSupported) { 327 this.doSync(this.element); 328 } 329 } 330 }, { 331 key: 'doSync', 332 value: function doSync(element) { 333 if (typeof element === 'undefined' || element === null) { 334 element = this.element; 335 } 336 if (element.nodeType !== 1) { 337 return; 338 } 339 element = element.parentNode || element; 340 var iterable = element.querySelectorAll('.' + this.config.boxClass); 341 for (var i = 0; i < iterable.length; i++) { 342 var box = iterable[i]; 343 if (!isIn(box, this.all)) { 344 this.boxes.push(box); 345 this.all.push(box); 346 if (this.stopped || this.disabled()) { 347 this.resetStyle(); 348 } else { 349 this.applyStyle(box, true); 350 } 351 this.scrolled = true; 352 } 353 } 354 } 355 }, { 356 key: 'show', 357 value: function show(box) { 358 this.applyStyle(box); 359 box.className = box.className + ' ' + this.config.animateClass; 360 if (this.config.callback != null) { 361 this.config.callback(box); 362 } 363 emitEvent(box, this.wowEvent); 364 365 if (this.config.resetAnimation) { 366 addEvent(box, 'animationend', this.resetAnimation); 367 addEvent(box, 'oanimationend', this.resetAnimation); 368 addEvent(box, 'webkitAnimationEnd', this.resetAnimation); 369 addEvent(box, 'MSAnimationEnd', this.resetAnimation); 370 } 371 372 return box; 373 } 374 }, { 375 key: 'applyStyle', 376 value: function applyStyle(box, hidden) { 377 var _this2 = this; 378 379 var duration = box.getAttribute('data-wow-duration'); 380 var delay = box.getAttribute('data-wow-delay'); 381 var iteration = box.getAttribute('data-wow-iteration'); 382 383 return this.animate(function () { 384 return _this2.customStyle(box, hidden, duration, delay, iteration); 385 }); 386 } 387 }, { 388 key: 'resetStyle', 389 value: function resetStyle() { 390 for (var i = 0; i < this.boxes.length; i++) { 391 var box = this.boxes[i]; 392 box.style.visibility = 'visible'; 393 } 394 return undefined; 395 } 396 }, { 397 key: 'resetAnimation', 398 value: function resetAnimation(event) { 399 if (event.type.toLowerCase().indexOf('animationend') >= 0) { 400 var target = event.target || event.srcElement; 401 target.className = target.className.replace(this.config.animateClass, '').trim(); 402 } 403 } 404 }, { 405 key: 'customStyle', 406 value: function customStyle(box, hidden, duration, delay, iteration) { 407 if (hidden) { 408 this.cacheAnimationName(box); 409 } 410 box.style.visibility = hidden ? 'hidden' : 'visible'; 411 412 if (duration) { 413 this.vendorSet(box.style, { animationDuration: duration }); 414 } 415 if (delay) { 416 this.vendorSet(box.style, { animationDelay: delay }); 417 } 418 if (iteration) { 419 this.vendorSet(box.style, { animationIterationCount: iteration }); 420 } 421 this.vendorSet(box.style, { animationName: hidden ? 'none' : this.cachedAnimationName(box) }); 422 423 return box; 424 } 425 }, { 426 key: 'vendorSet', 427 value: function vendorSet(elem, properties) { 428 for (var name in properties) { 429 if (properties.hasOwnProperty(name)) { 430 var value = properties[name]; 431 elem['' + name] = value; 432 for (var i = 0; i < this.vendors.length; i++) { 433 var vendor = this.vendors[i]; 434 elem['' + vendor + name.charAt(0).toUpperCase() + name.substr(1)] = value; 435 } 436 } 437 } 438 } 439 }, { 440 key: 'vendorCSS', 441 value: function vendorCSS(elem, property) { 442 var style = getComputedStyle(elem); 443 var result = style.getPropertyCSSValue(property); 444 for (var i = 0; i < this.vendors.length; i++) { 445 var vendor = this.vendors[i]; 446 result = result || style.getPropertyCSSValue('-' + vendor + '-' + property); 447 } 448 return result; 449 } 450 }, { 451 key: 'animationName', 452 value: function animationName(box) { 453 var aName = void 0; 454 try { 455 aName = this.vendorCSS(box, 'animation-name').cssText; 456 } catch (error) { 457 // Opera, fall back to plain property value 458 aName = getComputedStyle(box).getPropertyValue('animation-name'); 459 } 460 461 if (aName === 'none') { 462 return ''; // SVG/Firefox, unable to get animation name? 463 } 464 465 return aName; 466 } 467 }, { 468 key: 'cacheAnimationName', 469 value: function cacheAnimationName(box) { 470 // https://bugzilla.mozilla.org/show_bug.cgi?id=921834 471 // box.dataset is not supported for SVG elements in Firefox 472 return this.animationNameCache.set(box, this.animationName(box)); 473 } 474 }, { 475 key: 'cachedAnimationName', 476 value: function cachedAnimationName(box) { 477 return this.animationNameCache.get(box); 478 } 479 }, { 480 key: 'scrollHandler', 481 value: function scrollHandler() { 482 this.scrolled = true; 483 } 484 }, { 485 key: 'scrollCallback', 486 value: function scrollCallback() { 487 if (this.scrolled) { 488 this.scrolled = false; 489 var results = []; 490 for (var i = 0; i < this.boxes.length; i++) { 491 var box = this.boxes[i]; 492 if (box) { 493 if (this.isVisible(box)) { 494 this.show(box); 495 continue; 496 } 497 results.push(box); 498 } 499 } 500 this.boxes = results; 501 if (!this.boxes.length && !this.config.live) { 502 this.stop(); 503 } 504 } 505 } 506 }, { 507 key: 'offsetTop', 508 value: function offsetTop(element) { 509 // SVG elements don't have an offsetTop in Firefox. 510 // This will use their nearest parent that has an offsetTop. 511 // Also, using ('offsetTop' of element) causes an exception in Firefox. 512 while (element.offsetTop === undefined) { 513 element = element.parentNode; 514 } 515 var top = element.offsetTop; 516 while (element.offsetParent) { 517 element = element.offsetParent; 518 top += element.offsetTop; 519 } 520 return top; 521 } 522 }, { 523 key: 'isVisible', 524 value: function isVisible(box) { 525 var offset = box.getAttribute('data-wow-offset') || this.config.offset; 526 var viewTop = this.config.scrollContainer && this.config.scrollContainer.scrollTop || window.pageYOffset; 527 var viewBottom = viewTop + Math.min(this.element.clientHeight, getInnerHeight()) - offset; 528 var top = this.offsetTop(box); 529 var bottom = top + box.clientHeight; 530 531 return top <= viewBottom && bottom >= viewTop; 532 } 533 }, { 534 key: 'disabled', 535 value: function disabled() { 536 return !this.config.mobile && isMobile(navigator.userAgent); 537 } 538 }]); 539 540 return WOW; 541 }(); 542 543 exports.default = WOW; 544 module.exports = exports['default']; 545}); 546 547}
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.