1/*! 2 * jQuery Cookie Plugin v1.4.1 3 * https://github.com/carhartl/jquery-cookie 4 * 5 * Copyright 2013 Klaus Hartl 6 * Released under the MIT license 7 */ 8(function (factory) { 9 if (typeof define === 'function' && define.amd) { 10 // AMD 11 define(['jquery'], factory); 12 } else if (typeof exports === 'object') { 13 // CommonJS 14 factory(require('jquery')); 15 } else { 16 // Browser globals 17 factory(jQuery); 18 } 19}(function ($) { 20 21 var pluses = /\+/g; 22 23 function encode(s) { 24 return config.raw ? s : encodeURIComponent(s); 25 } 26 27 function decode(s) { 28 return config.raw ? s : decodeURIComponent(s); 29 } 30 31 function stringifyCookieValue(value) { 32 return encode(config.json ? JSON.stringify(value) : String(value)); 33 } 34 35 function parseCookieValue(s) { 36 if (s.indexOf('"') === 0) { 37 // This is a quoted cookie as according to RFC2068, unescape... 38 s = s.slice(1, -1).replace(/\\"/g, '"').replace(/\\\\/g, '\\'); 39 } 40 41 try { 42 // Replace server-side written pluses with spaces. 43 // If we can't decode the cookie, ignore it, it's unusable. 44 // If we can't parse the cookie, ignore it, it's unusable. 45 s = decodeURIComponent(s.replace(pluses, ' ')); 46 return config.json ? JSON.parse(s) : s; 47 } catch(e) {} 48 } 49 50 function read(s, converter) { 51 var value = config.raw ? s : parseCookieValue(s); 52 return $.isFunction(converter) ? converter(value) : value; 53 } 54 55 var config = $.cookie = function (key, value, options) { 56 57 // Write 58 59 if (value !== undefined && !$.isFunction(value)) { 60 options = $.extend({}, config.defaults, options); 61 62 if (typeof options.expires === 'number') { 63 var days = options.expires, t = options.expires = new Date(); 64 t.setTime(+t + days * 864e+5); 65 } 66 67 return (document.cookie = [ 68 encode(key), '=', stringifyCookieValue(value), 69 options.expires ? '; expires=' + options.expires.toUTCString() : '', // use expires attribute, max-age is not supported by IE 70 options.path ? '; path=' + options.path : '', 71 options.domain ? '; domain=' + options.domain : '', 72 options.secure ? '; secure' : '' 73 ].join('')); 74 } 75 76 // Read 77 78 var result = key ? undefined : {}; 79 80 // To prevent the for loop in the first place assign an empty array 81 // in case there are no cookies at all. Also prevents odd result when 82 // calling $.cookie(). 83 var cookies = document.cookie ? document.cookie.split('; ') : []; 84 85 for (var i = 0, l = cookies.length; i < l; i++) { 86 var parts = cookies[i].split('='); 87 var name = decode(parts.shift()); 88 var cookie = parts.join('='); 89 90 if (key && key === name) { 91 // If second argument (value) is a function it's a converter... 92 result = read(cookie, value); 93 break; 94 } 95 96 // Prevent storing a cookie that we couldn't decode. 97 if (!key && (cookie = read(cookie)) !== undefined) { 98 result[name] = cookie; 99 } 100 } 101 102 return result; 103 }; 104 105 config.defaults = {}; 106 107 $.removeCookie = function (key, options) { 108 if ($.cookie(key) === undefined) { 109 return false; 110 } 111 112 // Must not alter options, thus extending a fresh object... 113 $.cookie(key, '', $.extend({}, options, { expires: -1 })); 114 return !$.cookie(key); 115 }; 116 117})); 118;/*! @license ScrollReveal v4.0.9 119 120 Copyright 2021 Fisssion LLC. 121 122 Licensed under the GNU General Public License 3.0 for 123 compatible open source projects and non-commercial use. 124 125 For commercial sites, themes, projects, and applications, 126 keep your source code private/proprietary by purchasing 127 a commercial license from https://scrollrevealjs.org/ 128*/ 129(function (global, factory) { 130 typeof exports === 'object' && typeof module !== 'undefined' ? module.exports = factory() : 131 typeof define === 'function' && define.amd ? define(factory) : 132 (global = global || self, global.ScrollReveal = factory()); 133}(this, function () { 'use strict'; 134 135 var defaults = { 136 delay: 0, 137 distance: '0', 138 duration: 600, 139 easing: 'cubic-bezier(0.5, 0, 0, 1)', 140 interval: 0, 141 opacity: 0, 142 origin: 'bottom', 143 rotate: { 144 x: 0, 145 y: 0, 146 z: 0 147 }, 148 scale: 1, 149 cleanup: false, 150 container: document.documentElement, 151 desktop: true, 152 mobile: true, 153 reset: false, 154 useDelay: 'always', 155 viewFactor: 0.0, 156 viewOffset: { 157 top: 0, 158 right: 0, 159 bottom: 0, 160 left: 0 161 }, 162 afterReset: function afterReset() {}, 163 afterReveal: function afterReveal() {}, 164 beforeReset: function beforeReset() {}, 165 beforeReveal: function beforeReveal() {} 166 }; 167 168 function failure() { 169 document.documentElement.classList.remove('sr'); 170 171 return { 172 clean: function clean() {}, 173 destroy: function destroy() {}, 174 reveal: function reveal() {}, 175 sync: function sync() {}, 176 get noop() { 177 return true 178 } 179 } 180 } 181 182 function success() { 183 document.documentElement.classList.add('sr'); 184 185 if (document.body) { 186 document.body.style.height = '100%'; 187 } else { 188 document.addEventListener('DOMContentLoaded', function () { 189 document.body.style.height = '100%'; 190 }); 191 } 192 } 193 194 var mount = { success: success, failure: failure }; 195 196 /*! @license is-dom-node v1.0.4 197 198 Copyright 2018 Fisssion LLC. 199 200 Permission is hereby granted, free of charge, to any person obtaining a copy 201 of this software and associated documentation files (the "Software"), to deal 202 in the Software without restriction, including without limitation the rights 203 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 204 copies of the Software, and to permit persons to whom the Software is 205 furnished to do so, subject to the following conditions: 206 207 The above copyright notice and this permission notice shall be included in all 208 copies or substantial portions of the Software. 209 210 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 211 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 212 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 213 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 214 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 215 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 216 SOFTWARE. 217 218 */ 219 function isDomNode(x) { 220 return typeof window.Node === 'object' 221 ? x instanceof window.Node 222 : x !== null && 223 typeof x === 'object' && 224 typeof x.nodeType === 'number' && 225 typeof x.nodeName === 'string' 226 } 227
vendor: 15,562 bytes, lines 228-740
228 /*! @license is-dom-node-list v1.2.1 229 230 Copyright 2018 Fisssion LLC. 231 232 Permission is hereby granted, free of charge, to any person obtaining a copy 233 of this software and associated documentation files (the "Software"), to deal 234 in the Software without restriction, including without limitation the rights 235 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 236 copies of the Software, and to permit persons to whom the Software is 237 furnished to do so, subject to the following conditions: 238 239 The above copyright notice and this permission notice shall be included in all 240 copies or substantial portions of the Software. 241 242 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 243 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 244 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 245 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 246 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 247 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 248 SOFTWARE. 249 250 */ 251 252 function isDomNodeList(x) { 253 var prototypeToString = Object.prototype.toString.call(x); 254 var regex = /^\[object (HTMLCollection|NodeList|Object)\]$/; 255 256 return typeof window.NodeList === 'object' 257 ? x instanceof window.NodeList 258 : x !== null && 259 typeof x === 'object' && 260 typeof x.length === 'number' && 261 regex.test(prototypeToString) && 262 (x.length === 0 || isDomNode(x[0])) 263 } 264 265 /*! @license Tealight v0.3.6 266 267 Copyright 2018 Fisssion LLC. 268 269 Permission is hereby granted, free of charge, to any person obtaining a copy 270 of this software and associated documentation files (the "Software"), to deal 271 in the Software without restriction, including without limitation the rights 272 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 273 copies of the Software, and to permit persons to whom the Software is 274 furnished to do so, subject to the following conditions: 275 276 The above copyright notice and this permission notice shall be included in all 277 copies or substantial portions of the Software. 278 279 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 280 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 281 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 282 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 283 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 284 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 285 SOFTWARE. 286 287 */ 288 289 function tealight(target, context) { 290 if ( context === void 0 ) { context = document; } 291 292 if (target instanceof Array) { return target.filter(isDomNode); } 293 if (isDomNode(target)) { return [target]; } 294 if (isDomNodeList(target)) { return Array.prototype.slice.call(target); } 295 if (typeof target === "string") { 296 try { 297 var query = context.querySelectorAll(target); 298 return Array.prototype.slice.call(query); 299 } catch (err) { 300 return []; 301 } 302 } 303 return []; 304 } 305 306 function isObject(x) { 307 return ( 308 x !== null && 309 x instanceof Object && 310 (x.constructor === Object || 311 Object.prototype.toString.call(x) === '[object Object]') 312 ) 313 } 314 315 function each(collection, callback) { 316 if (isObject(collection)) { 317 var keys = Object.keys(collection); 318 return keys.forEach(function (key) { return callback(collection[key], key, collection); }) 319 } 320 if (collection instanceof Array) { 321 return collection.forEach(function (item, i) { return callback(item, i, collection); }) 322 } 323 throw new TypeError('Expected either an array or object literal.') 324 } 325 326 function logger(message) { 327 var details = [], len = arguments.length - 1; 328 while ( len-- > 0 ) details[ len ] = arguments[ len + 1 ]; 329 330 if (this.constructor.debug && console) { 331 var report = "%cScrollReveal: " + message; 332 details.forEach(function (detail) { return (report += "\n â " + detail); }); 333 console.log(report, 'color: #ea654b;'); // eslint-disable-line no-console 334 } 335 } 336 337 function rinse() { 338 var this$1 = this; 339 340 var struct = function () { return ({ 341 active: [], 342 stale: [] 343 }); }; 344 345 var elementIds = struct(); 346 var sequenceIds = struct(); 347 var containerIds = struct(); 348 349 /** 350 * Take stock of active element IDs. 351 */ 352 try { 353 each(tealight('[data-sr-id]'), function (node) { 354 var id = parseInt(node.getAttribute('data-sr-id')); 355 elementIds.active.push(id); 356 }); 357 } catch (e) { 358 throw e 359 } 360 /** 361 * Destroy stale elements. 362 */ 363 each(this.store.elements, function (element) { 364 if (elementIds.active.indexOf(element.id) === -1) { 365 elementIds.stale.push(element.id); 366 } 367 }); 368 369 each(elementIds.stale, function (staleId) { return delete this$1.store.elements[staleId]; }); 370 371 /** 372 * Take stock of active container and sequence IDs. 373 */ 374 each(this.store.elements, function (element) { 375 if (containerIds.active.indexOf(element.containerId) === -1) { 376 containerIds.active.push(element.containerId); 377 } 378 if (element.hasOwnProperty('sequence')) { 379 if (sequenceIds.active.indexOf(element.sequence.id) === -1) { 380 sequenceIds.active.push(element.sequence.id); 381 } 382 } 383 }); 384 385 /** 386 * Destroy stale containers. 387 */ 388 each(this.store.containers, function (container) { 389 if (containerIds.active.indexOf(container.id) === -1) { 390 containerIds.stale.push(container.id); 391 } 392 }); 393 394 each(containerIds.stale, function (staleId) { 395 var stale = this$1.store.containers[staleId].node; 396 stale.removeEventListener('scroll', this$1.delegate); 397 stale.removeEventListener('resize', this$1.delegate); 398 delete this$1.store.containers[staleId]; 399 }); 400 401 /** 402 * Destroy stale sequences. 403 */ 404 each(this.store.sequences, function (sequence) { 405 if (sequenceIds.active.indexOf(sequence.id) === -1) { 406 sequenceIds.stale.push(sequence.id); 407 } 408 }); 409 410 each(sequenceIds.stale, function (staleId) { return delete this$1.store.sequences[staleId]; }); 411 } 412 413 /*! @license Rematrix v0.3.0 414 415 Copyright 2018 Julian Lloyd. 416 417 Permission is hereby granted, free of charge, to any person obtaining a copy 418 of this software and associated documentation files (the "Software"), to deal 419 in the Software without restriction, including without limitation the rights 420 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 421 copies of the Software, and to permit persons to whom the Software is 422 furnished to do so, subject to the following conditions: 423 424 The above copyright notice and this permission notice shall be included in 425 all copies or substantial portions of the Software. 426 427 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 428 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 429 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 430 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 431 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 432 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN 433 THE SOFTWARE. 434 */ 435 /** 436 * @module Rematrix 437 */ 438 439 /** 440 * Transformation matrices in the browser come in two flavors: 441 * 442 * - `matrix` using 6 values (short) 443 * - `matrix3d` using 16 values (long) 444 * 445 * This utility follows this [conversion guide](https://goo.gl/EJlUQ1) 446 * to expand short form matrices to their equivalent long form. 447 * 448 * @param {array} source - Accepts both short and long form matrices. 449 * @return {array} 450 */ 451 function format(source) { 452 if (source.constructor !== Array) { 453 throw new TypeError('Expected array.') 454 } 455 if (source.length === 16) { 456 return source 457 } 458 if (source.length === 6) { 459 var matrix = identity(); 460 matrix[0] = source[0]; 461 matrix[1] = source[1]; 462 matrix[4] = source[2]; 463 matrix[5] = source[3]; 464 matrix[12] = source[4]; 465 matrix[13] = source[5]; 466 return matrix 467 } 468 throw new RangeError('Expected array with either 6 or 16 values.') 469 } 470 471 /** 472 * Returns a matrix representing no transformation. The product of any matrix 473 * multiplied by the identity matrix will be the original matrix. 474 * 475 * > **Tip:** Similar to how `5 * 1 === 5`, where `1` is the identity. 476 * 477 * @return {array} 478 */ 479 function identity() { 480 var matrix = []; 481 for (var i = 0; i < 16; i++) { 482 i % 5 == 0 ? matrix.push(1) : matrix.push(0); 483 } 484 return matrix 485 } 486 487 /** 488 * Returns a 4x4 matrix describing the combined transformations 489 * of both arguments. 490 * 491 * > **Note:** Order is very important. For example, rotating 45° 492 * along the Z-axis, followed by translating 500 pixels along the 493 * Y-axis... is not the same as translating 500 pixels along the 494 * Y-axis, followed by rotating 45° along on the Z-axis. 495 * 496 * @param {array} m - Accepts both short and long form matrices. 497 * @param {array} x - Accepts both short and long form matrices. 498 * @return {array} 499 */ 500 function multiply(m, x) { 501 var fm = format(m); 502 var fx = format(x); 503 var product = []; 504 505 for (var i = 0; i < 4; i++) { 506 var row = [fm[i], fm[i + 4], fm[i + 8], fm[i + 12]]; 507 for (var j = 0; j < 4; j++) { 508 var k = j * 4; 509 var col = [fx[k], fx[k + 1], fx[k + 2], fx[k + 3]]; 510 var result = 511 row[0] * col[0] + row[1] * col[1] + row[2] * col[2] + row[3] * col[3]; 512 513 product[i + k] = result; 514 } 515 } 516 517 return product 518 } 519 520 /** 521 * Attempts to return a 4x4 matrix describing the CSS transform 522 * matrix passed in, but will return the identity matrix as a 523 * fallback. 524 * 525 * > **Tip:** This method is used to convert a CSS matrix (retrieved as a 526 * `string` from computed styles) to its equivalent array format. 527 * 528 * @param {string} source - `matrix` or `matrix3d` CSS Transform value. 529 * @return {array} 530 */ 531 function parse(source) { 532 if (typeof source === 'string') { 533 var match = source.match(/matrix(3d)?\(([^)]+)\)/); 534 if (match) { 535 var raw = match[2].split(', ').map(parseFloat); 536 return format(raw) 537 } 538 } 539 return identity() 540 } 541 542 /** 543 * Returns a 4x4 matrix describing X-axis rotation. 544 * 545 * @param {number} angle - Measured in degrees. 546 * @return {array} 547 */ 548 function rotateX(angle) { 549 var theta = Math.PI / 180 * angle; 550 var matrix = identity(); 551 552 matrix[5] = matrix[10] = Math.cos(theta); 553 matrix[6] = matrix[9] = Math.sin(theta); 554 matrix[9] *= -1; 555 556 return matrix 557 } 558 559 /** 560 * Returns a 4x4 matrix describing Y-axis rotation. 561 * 562 * @param {number} angle - Measured in degrees. 563 * @return {array} 564 */ 565 function rotateY(angle) { 566 var theta = Math.PI / 180 * angle; 567 var matrix = identity(); 568 569 matrix[0] = matrix[10] = Math.cos(theta); 570 matrix[2] = matrix[8] = Math.sin(theta); 571 matrix[2] *= -1; 572 573 return matrix 574 } 575 576 /** 577 * Returns a 4x4 matrix describing Z-axis rotation. 578 * 579 * @param {number} angle - Measured in degrees. 580 * @return {array} 581 */ 582 function rotateZ(angle) { 583 var theta = Math.PI / 180 * angle; 584 var matrix = identity(); 585 586 matrix[0] = matrix[5] = Math.cos(theta); 587 matrix[1] = matrix[4] = Math.sin(theta); 588 matrix[4] *= -1; 589 590 return matrix 591 } 592 593 /** 594 * Returns a 4x4 matrix describing 2D scaling. The first argument 595 * is used for both X and Y-axis scaling, unless an optional 596 * second argument is provided to explicitly define Y-axis scaling. 597 * 598 * @param {number} scalar - Decimal multiplier. 599 * @param {number} [scalarY] - Decimal multiplier. 600 * @return {array} 601 */ 602 function scale(scalar, scalarY) { 603 var matrix = identity(); 604 605 matrix[0] = scalar; 606 matrix[5] = typeof scalarY === 'number' ? scalarY : scalar; 607 608 return matrix 609 } 610 611 /** 612 * Returns a 4x4 matrix describing X-axis translation. 613 * 614 * @param {number} distance - Measured in pixels. 615 * @return {array} 616 */ 617 function translateX(distance) { 618 var matrix = identity(); 619 matrix[12] = distance; 620 return matrix 621 } 622 623 /** 624 * Returns a 4x4 matrix describing Y-axis translation. 625 * 626 * @param {number} distance - Measured in pixels. 627 * @return {array} 628 */ 629 function translateY(distance) { 630 var matrix = identity(); 631 matrix[13] = distance; 632 return matrix 633 } 634 635 var getPrefixedCssProp = (function () { 636 var properties = {}; 637 var style = document.documentElement.style; 638 639 function getPrefixedCssProperty(name, source) { 640 if ( source === void 0 ) source = style; 641 642 if (name && typeof name === 'string') { 643 if (properties[name]) { 644 return properties[name] 645 } 646 if (typeof source[name] === 'string') { 647 return (properties[name] = name) 648 } 649 if (typeof source[("-webkit-" + name)] === 'string') { 650 return (properties[name] = "-webkit-" + name) 651 } 652 throw new RangeError(("Unable to find \"" + name + "\" style property.")) 653 } 654 throw new TypeError('Expected a string.') 655 } 656 657 getPrefixedCssProperty.clearCache = function () { return (properties = {}); }; 658 659 return getPrefixedCssProperty 660 })(); 661 662 function style(element) { 663 var computed = window.getComputedStyle(element.node); 664 var position = computed.position; 665 var config = element.config; 666 667 /** 668 * Generate inline styles 669 */ 670 var inline = {}; 671 var inlineStyle = element.node.getAttribute('style') || ''; 672 var inlineMatch = inlineStyle.match(/[\w-]+\s*:\s*[^;]+\s*/gi) || []; 673 674 inline.computed = inlineMatch ? inlineMatch.map(function (m) { return m.trim(); }).join('; ') + ';' : ''; 675 676 inline.generated = inlineMatch.some(function (m) { return m.match(/visibility\s?:\s?visible/i); }) 677 ? inline.computed 678 : inlineMatch.concat( ['visibility: visible']).map(function (m) { return m.trim(); }).join('; ') + ';'; 679 680 /** 681 * Generate opacity styles 682 */ 683 var computedOpacity = parseFloat(computed.opacity); 684 var configOpacity = !isNaN(parseFloat(config.opacity)) 685 ? parseFloat(config.opacity) 686 : parseFloat(computed.opacity); 687 688 var opacity = { 689 computed: computedOpacity !== configOpacity ? ("opacity: " + computedOpacity + ";") : '', 690 generated: computedOpacity !== configOpacity ? ("opacity: " + configOpacity + ";") : '' 691 }; 692 693 /** 694 * Generate transformation styles 695 */ 696 var transformations = []; 697 698 if (parseFloat(config.distance)) { 699 var axis = config.origin === 'top' || config.origin === 'bottom' ? 'Y' : 'X'; 700 701 /** 702 * Letâs make sure our our pixel distances are negative for top and left. 703 * e.g. { origin: 'top', distance: '25px' } starts at `top: -25px` in CSS. 704 */ 705 var distance = config.distance; 706 if (config.origin === 'top' || config.origin === 'left') { 707 distance = /^-/.test(distance) ? distance.substr(1) : ("-" + distance); 708 } 709 710 var ref = distance.match(/(^-?\d+\.?\d?)|(em$|px$|%$)/g); 711 var value = ref[0]; 712 var unit = ref[1]; 713 714 switch (unit) { 715 case 'em': 716 distance = parseInt(computed.fontSize) * value; 717 break 718 case 'px': 719 distance = value; 720 break 721 case '%': 722 /** 723 * Here we use `getBoundingClientRect` instead of 724 * the existing data attached to `element.geometry` 725 * because only the former includes any transformations 726 * current applied to the element. 727 * 728 * If that behavior ends up being unintuitive, this 729 * logic could instead utilize `element.geometry.height` 730 * and `element.geoemetry.width` for the distance calculation 731 */ 732 distance = 733 axis === 'Y' 734 ? (element.node.getBoundingClientRect().height * value) / 100 735 : (element.node.getBoundingClientRect().width * value) / 100; 736 break 737 default: 738 throw new RangeError('Unrecognized or missing distance unit.') 739 } 740
vendor: 14,637 bytes, lines 741-1282
741 if (axis === 'Y') { 742 transformations.push(translateY(distance)); 743 } else { 744 transformations.push(translateX(distance)); 745 } 746 } 747 748 if (config.rotate.x) { transformations.push(rotateX(config.rotate.x)); } 749 if (config.rotate.y) { transformations.push(rotateY(config.rotate.y)); } 750 if (config.rotate.z) { transformations.push(rotateZ(config.rotate.z)); } 751 if (config.scale !== 1) { 752 if (config.scale === 0) { 753 /** 754 * The CSS Transforms matrix interpolation specification 755 * basically disallows transitions of non-invertible 756 * matrixes, which means browsers won't transition 757 * elements with zero scale. 758 * 759 * Thatâs inconvenient for the API and developer 760 * experience, so we simply nudge their value 761 * slightly above zero; this allows browsers 762 * to transition our element as expected. 763 * 764 * `0.0002` was the smallest number 765 * that performed across browsers. 766 */ 767 transformations.push(scale(0.0002)); 768 } else { 769 transformations.push(scale(config.scale)); 770 } 771 } 772 773 var transform = {}; 774 if (transformations.length) { 775 transform.property = getPrefixedCssProp('transform'); 776 /** 777 * The default computed transform value should be one of: 778 * undefined || 'none' || 'matrix()' || 'matrix3d()' 779 */ 780 transform.computed = { 781 raw: computed[transform.property], 782 matrix: parse(computed[transform.property]) 783 }; 784 785 transformations.unshift(transform.computed.matrix); 786 var product = transformations.reduce(multiply); 787 788 transform.generated = { 789 initial: ((transform.property) + ": matrix3d(" + (product.join(', ')) + ");"), 790 final: ((transform.property) + ": matrix3d(" + (transform.computed.matrix.join(', ')) + ");") 791 }; 792 } else { 793 transform.generated = { 794 initial: '', 795 final: '' 796 }; 797 } 798 799 /** 800 * Generate transition styles 801 */ 802 var transition = {}; 803 if (opacity.generated || transform.generated.initial) { 804 transition.property = getPrefixedCssProp('transition'); 805 transition.computed = computed[transition.property]; 806 transition.fragments = []; 807 808 var delay = config.delay; 809 var duration = config.duration; 810 var easing = config.easing; 811 812 if (opacity.generated) { 813 transition.fragments.push({ 814 delayed: ("opacity " + (duration / 1000) + "s " + easing + " " + (delay / 1000) + "s"), 815 instant: ("opacity " + (duration / 1000) + "s " + easing + " 0s") 816 }); 817 } 818 819 if (transform.generated.initial) { 820 transition.fragments.push({ 821 delayed: ((transform.property) + " " + (duration / 1000) + "s " + easing + " " + (delay / 1000) + "s"), 822 instant: ((transform.property) + " " + (duration / 1000) + "s " + easing + " 0s") 823 }); 824 } 825 826 /** 827 * The default computed transition property should be undefined, or one of: 828 * '' || 'none 0s ease 0s' || 'all 0s ease 0s' || 'all 0s 0s cubic-bezier()' 829 */ 830 var hasCustomTransition = 831 transition.computed && !transition.computed.match(/all 0s|none 0s/); 832 833 if (hasCustomTransition) { 834 transition.fragments.unshift({ 835 delayed: transition.computed, 836 instant: transition.computed 837 }); 838 } 839 840 var composed = transition.fragments.reduce( 841 function (composition, fragment, i) { 842 composition.delayed += i === 0 ? fragment.delayed : (", " + (fragment.delayed)); 843 composition.instant += i === 0 ? fragment.instant : (", " + (fragment.instant)); 844 return composition 845 }, 846 { 847 delayed: '', 848 instant: '' 849 } 850 ); 851 852 transition.generated = { 853 delayed: ((transition.property) + ": " + (composed.delayed) + ";"), 854 instant: ((transition.property) + ": " + (composed.instant) + ";") 855 }; 856 } else { 857 transition.generated = { 858 delayed: '', 859 instant: '' 860 }; 861 } 862 863 return { 864 inline: inline, 865 opacity: opacity, 866 position: position, 867 transform: transform, 868 transition: transition 869 } 870 } 871 872 /** 873 * apply a CSS string to an element using the CSSOM (element.style) rather 874 * than setAttribute, which may violate the content security policy. 875 * 876 * @param {Node} [el] Element to receive styles. 877 * @param {string} [declaration] Styles to apply. 878 */ 879 function applyStyle (el, declaration) { 880 declaration.split(';').forEach(function (pair) { 881 var ref = pair.split(':'); 882 var property = ref[0]; 883 var value = ref.slice(1); 884 if (property && value) { 885 el.style[property.trim()] = value.join(':'); 886 } 887 }); 888 } 889 890 function clean(target) { 891 var this$1 = this; 892 893 var dirty; 894 try { 895 each(tealight(target), function (node) { 896 var id = node.getAttribute('data-sr-id'); 897 if (id !== null) { 898 dirty = true; 899 var element = this$1.store.elements[id]; 900 if (element.callbackTimer) { 901 window.clearTimeout(element.callbackTimer.clock); 902 } 903 applyStyle(element.node, element.styles.inline.generated); 904 node.removeAttribute('data-sr-id'); 905 delete this$1.store.elements[id]; 906 } 907 }); 908 } catch (e) { 909 return logger.call(this, 'Clean failed.', e.message) 910 } 911 912 if (dirty) { 913 try { 914 rinse.call(this); 915 } catch (e) { 916 return logger.call(this, 'Clean failed.', e.message) 917 } 918 } 919 } 920 921 function destroy() { 922 var this$1 = this; 923 924 /** 925 * Remove all generated styles and element ids 926 */ 927 each(this.store.elements, function (element) { 928 applyStyle(element.node, element.styles.inline.generated); 929 element.node.removeAttribute('data-sr-id'); 930 }); 931 932 /** 933 * Remove all event listeners. 934 */ 935 each(this.store.containers, function (container) { 936 var target = 937 container.node === document.documentElement ? window : container.node; 938 target.removeEventListener('scroll', this$1.delegate); 939 target.removeEventListener('resize', this$1.delegate); 940 }); 941 942 /** 943 * Clear all data from the store 944 */ 945 this.store = { 946 containers: {}, 947 elements: {}, 948 history: [], 949 sequences: {} 950 }; 951 } 952 953 function deepAssign(target) { 954 var sources = [], len = arguments.length - 1; 955 while ( len-- > 0 ) sources[ len ] = arguments[ len + 1 ]; 956 957 if (isObject(target)) { 958 each(sources, function (source) { 959 each(source, function (data, key) { 960 if (isObject(data)) { 961 if (!target[key] || !isObject(target[key])) { 962 target[key] = {}; 963 } 964 deepAssign(target[key], data); 965 } else { 966 target[key] = data; 967 } 968 }); 969 }); 970 return target 971 } else { 972 throw new TypeError('Target must be an object literal.') 973 } 974 } 975 976 function isMobile(agent) { 977 if ( agent === void 0 ) agent = navigator.userAgent; 978 979 return /Android|iPhone|iPad|iPod/i.test(agent) 980 } 981 982 var nextUniqueId = (function () { 983 var uid = 0; 984 return function () { return uid++; } 985 })(); 986 987 function initialize() { 988 var this$1 = this; 989 990 rinse.call(this); 991 992 each(this.store.elements, function (element) { 993 var styles = [element.styles.inline.generated]; 994 995 if (element.visible) { 996 styles.push(element.styles.opacity.computed); 997 styles.push(element.styles.transform.generated.final); 998 element.revealed = true; 999 } else { 1000 styles.push(element.styles.opacity.generated); 1001 styles.push(element.styles.transform.generated.initial); 1002 element.revealed = false; 1003 } 1004 1005 applyStyle(element.node, styles.filter(function (s) { return s !== ''; }).join(' ')); 1006 }); 1007 1008 each(this.store.containers, function (container) { 1009 var target = 1010 container.node === document.documentElement ? window : container.node; 1011 target.addEventListener('scroll', this$1.delegate); 1012 target.addEventListener('resize', this$1.delegate); 1013 }); 1014 1015 /** 1016 * Manually invoke delegate once to capture 1017 * element and container dimensions, container 1018 * scroll position, and trigger any valid reveals 1019 */ 1020 this.delegate(); 1021 1022 /** 1023 * Wipe any existing `setTimeout` now 1024 * that initialization has completed. 1025 */ 1026 this.initTimeout = null; 1027 } 1028 1029 function animate(element, force) { 1030 if ( force === void 0 ) force = {}; 1031 1032 var pristine = force.pristine || this.pristine; 1033 var delayed = 1034 element.config.useDelay === 'always' || 1035 (element.config.useDelay === 'onload' && pristine) || 1036 (element.config.useDelay === 'once' && !element.seen); 1037 1038 var shouldReveal = element.visible && !element.revealed; 1039 var shouldReset = !element.visible && element.revealed && element.config.reset; 1040 1041 if (force.reveal || shouldReveal) { 1042 return triggerReveal.call(this, element, delayed) 1043 } 1044 1045 if (force.reset || shouldReset) { 1046 return triggerReset.call(this, element) 1047 } 1048 } 1049 1050 function triggerReveal(element, delayed) { 1051 var styles = [ 1052 element.styles.inline.generated, 1053 element.styles.opacity.computed, 1054 element.styles.transform.generated.final 1055 ]; 1056 if (delayed) { 1057 styles.push(element.styles.transition.generated.delayed); 1058 } else { 1059 styles.push(element.styles.transition.generated.instant); 1060 } 1061 element.revealed = element.seen = true; 1062 applyStyle(element.node, styles.filter(function (s) { return s !== ''; }).join(' ')); 1063 registerCallbacks.call(this, element, delayed); 1064 } 1065 1066 function triggerReset(element) { 1067 var styles = [ 1068 element.styles.inline.generated, 1069 element.styles.opacity.generated, 1070 element.styles.transform.generated.initial, 1071 element.styles.transition.generated.instant 1072 ]; 1073 element.revealed = false; 1074 applyStyle(element.node, styles.filter(function (s) { return s !== ''; }).join(' ')); 1075 registerCallbacks.call(this, element); 1076 } 1077 1078 function registerCallbacks(element, isDelayed) { 1079 var this$1 = this; 1080 1081 var duration = isDelayed 1082 ? element.config.duration + element.config.delay 1083 : element.config.duration; 1084 1085 var beforeCallback = element.revealed 1086 ? element.config.beforeReveal 1087 : element.config.beforeReset; 1088 1089 var afterCallback = element.revealed 1090 ? element.config.afterReveal 1091 : element.config.afterReset; 1092 1093 var elapsed = 0; 1094 if (element.callbackTimer) { 1095 elapsed = Date.now() - element.callbackTimer.start; 1096 window.clearTimeout(element.callbackTimer.clock); 1097 } 1098 1099 beforeCallback(element.node); 1100 1101 element.callbackTimer = { 1102 start: Date.now(), 1103 clock: window.setTimeout(function () { 1104 afterCallback(element.node); 1105 element.callbackTimer = null; 1106 if (element.revealed && !element.config.reset && element.config.cleanup) { 1107 clean.call(this$1, element.node); 1108 } 1109 }, duration - elapsed) 1110 }; 1111 } 1112 1113 function sequence(element, pristine) { 1114 if ( pristine === void 0 ) pristine = this.pristine; 1115 1116 /** 1117 * We first check if the element should reset. 1118 */ 1119 if (!element.visible && element.revealed && element.config.reset) { 1120 return animate.call(this, element, { reset: true }) 1121 } 1122 1123 var seq = this.store.sequences[element.sequence.id]; 1124 var i = element.sequence.index; 1125 1126 if (seq) { 1127 var visible = new SequenceModel(seq, 'visible', this.store); 1128 var revealed = new SequenceModel(seq, 'revealed', this.store); 1129 1130 seq.models = { visible: visible, revealed: revealed }; 1131 1132 /** 1133 * If the sequence has no revealed members, 1134 * then we reveal the first visible element 1135 * within that sequence. 1136 * 1137 * The sequence then cues a recursive call 1138 * in both directions. 1139 */ 1140 if (!revealed.body.length) { 1141 var nextId = seq.members[visible.body[0]]; 1142 var nextElement = this.store.elements[nextId]; 1143 1144 if (nextElement) { 1145 cue.call(this, seq, visible.body[0], -1, pristine); 1146 cue.call(this, seq, visible.body[0], +1, pristine); 1147 return animate.call(this, nextElement, { reveal: true, pristine: pristine }) 1148 } 1149 } 1150 1151 /** 1152 * If our element isnât resetting, we check the 1153 * element sequence index against the head, and 1154 * then the foot of the sequence. 1155 */ 1156 if ( 1157 !seq.blocked.head && 1158 i === [].concat( revealed.head ).pop() && 1159 i >= [].concat( visible.body ).shift() 1160 ) { 1161 cue.call(this, seq, i, -1, pristine); 1162 return animate.call(this, element, { reveal: true, pristine: pristine }) 1163 } 1164 1165 if ( 1166 !seq.blocked.foot && 1167 i === [].concat( revealed.foot ).shift() && 1168 i <= [].concat( visible.body ).pop() 1169 ) { 1170 cue.call(this, seq, i, +1, pristine); 1171 return animate.call(this, element, { reveal: true, pristine: pristine }) 1172 } 1173 } 1174 } 1175 1176 function Sequence(interval) { 1177 var i = Math.abs(interval); 1178 if (!isNaN(i)) { 1179 this.id = nextUniqueId(); 1180 this.interval = Math.max(i, 16); 1181 this.members = []; 1182 this.models = {}; 1183 this.blocked = { 1184 head: false, 1185 foot: false 1186 }; 1187 } else { 1188 throw new RangeError('Invalid sequence interval.') 1189 } 1190 } 1191 1192 function SequenceModel(seq, prop, store) { 1193 var this$1 = this; 1194 1195 this.head = []; 1196 this.body = []; 1197 this.foot = []; 1198 1199 each(seq.members, function (id, index) { 1200 var element = store.elements[id]; 1201 if (element && element[prop]) { 1202 this$1.body.push(index); 1203 } 1204 }); 1205 1206 if (this.body.length) { 1207 each(seq.members, function (id, index) { 1208 var element = store.elements[id]; 1209 if (element && !element[prop]) { 1210 if (index < this$1.body[0]) { 1211 this$1.head.push(index); 1212 } else { 1213 this$1.foot.push(index); 1214 } 1215 } 1216 }); 1217 } 1218 } 1219 1220 function cue(seq, i, direction, pristine) { 1221 var this$1 = this; 1222 1223 var blocked = ['head', null, 'foot'][1 + direction]; 1224 var nextId = seq.members[i + direction]; 1225 var nextElement = this.store.elements[nextId]; 1226 1227 seq.blocked[blocked] = true; 1228 1229 setTimeout(function () { 1230 seq.blocked[blocked] = false; 1231 if (nextElement) { 1232 sequence.call(this$1, nextElement, pristine); 1233 } 1234 }, seq.interval); 1235 } 1236 1237 function reveal(target, options, syncing) { 1238 var this$1 = this; 1239 if ( options === void 0 ) options = {}; 1240 if ( syncing === void 0 ) syncing = false; 1241 1242 var containerBuffer = []; 1243 var sequence$$1; 1244 var interval = options.interval || defaults.interval; 1245 1246 try { 1247 if (interval) { 1248 sequence$$1 = new Sequence(interval); 1249 } 1250 1251 var nodes = tealight(target); 1252 if (!nodes.length) { 1253 throw new Error('Invalid reveal target.') 1254 } 1255 1256 var elements = nodes.reduce(function (elementBuffer, elementNode) { 1257 var element = {}; 1258 var existingId = elementNode.getAttribute('data-sr-id'); 1259 1260 if (existingId) { 1261 deepAssign(element, this$1.store.elements[existingId]); 1262 1263 /** 1264 * In order to prevent previously generated styles 1265 * from throwing off the new styles, the style tag 1266 * has to be reverted to its pre-reveal state. 1267 */ 1268 applyStyle(element.node, element.styles.inline.computed); 1269 } else { 1270 element.id = nextUniqueId(); 1271 element.node = elementNode; 1272 element.seen = false; 1273 element.revealed = false; 1274 element.visible = false; 1275 } 1276 1277 var config = deepAssign({}, element.config || this$1.defaults, options); 1278 1279 if ((!config.mobile && isMobile()) || (!config.desktop && !isMobile())) { 1280 if (existingId) { 1281 clean.call(this$1, element); 1282 }
vendor: 8,250 bytes, lines 1283-1567
1283 return elementBuffer // skip elements that are disabled 1284 } 1285 1286 var containerNode = tealight(config.container)[0]; 1287 if (!containerNode) { 1288 throw new Error('Invalid container.') 1289 } 1290 if (!containerNode.contains(elementNode)) { 1291 return elementBuffer // skip elements found outside the container 1292 } 1293 1294 var containerId; 1295 { 1296 containerId = getContainerId( 1297 containerNode, 1298 containerBuffer, 1299 this$1.store.containers 1300 ); 1301 if (containerId === null) { 1302 containerId = nextUniqueId(); 1303 containerBuffer.push({ id: containerId, node: containerNode }); 1304 } 1305 } 1306 1307 element.config = config; 1308 element.containerId = containerId; 1309 element.styles = style(element); 1310 1311 if (sequence$$1) { 1312 element.sequence = { 1313 id: sequence$$1.id, 1314 index: sequence$$1.members.length 1315 }; 1316 sequence$$1.members.push(element.id); 1317 } 1318 1319 elementBuffer.push(element); 1320 return elementBuffer 1321 }, []); 1322 1323 /** 1324 * Modifying the DOM via setAttribute needs to be handled 1325 * separately from reading computed styles in the map above 1326 * for the browser to batch DOM changes (limiting reflows) 1327 */ 1328 each(elements, function (element) { 1329 this$1.store.elements[element.id] = element; 1330 element.node.setAttribute('data-sr-id', element.id); 1331 }); 1332 } catch (e) { 1333 return logger.call(this, 'Reveal failed.', e.message) 1334 } 1335 1336 /** 1337 * Now that element set-up is complete... 1338 * Letâs commit any container and sequence data we have to the store. 1339 */ 1340 each(containerBuffer, function (container) { 1341 this$1.store.containers[container.id] = { 1342 id: container.id, 1343 node: container.node 1344 }; 1345 }); 1346 if (sequence$$1) { 1347 this.store.sequences[sequence$$1.id] = sequence$$1; 1348 } 1349 1350 /** 1351 * If reveal wasn't invoked by sync, we want to 1352 * make sure to add this call to the history. 1353 */ 1354 if (syncing !== true) { 1355 this.store.history.push({ target: target, options: options }); 1356 1357 /** 1358 * Push initialization to the event queue, giving 1359 * multiple reveal calls time to be interpreted. 1360 */ 1361 if (this.initTimeout) { 1362 window.clearTimeout(this.initTimeout); 1363 } 1364 this.initTimeout = window.setTimeout(initialize.bind(this), 0); 1365 } 1366 } 1367 1368 function getContainerId(node) { 1369 var collections = [], len = arguments.length - 1; 1370 while ( len-- > 0 ) collections[ len ] = arguments[ len + 1 ]; 1371 1372 var id = null; 1373 each(collections, function (collection) { 1374 each(collection, function (container) { 1375 if (id === null && container.node === node) { 1376 id = container.id; 1377 } 1378 }); 1379 }); 1380 return id 1381 } 1382 1383 /** 1384 * Re-runs the reveal method for each record stored in history, 1385 * for capturing new content asynchronously loaded into the DOM. 1386 */ 1387 function sync() { 1388 var this$1 = this; 1389 1390 each(this.store.history, function (record) { 1391 reveal.call(this$1, record.target, record.options, true); 1392 }); 1393 1394 initialize.call(this); 1395 } 1396 1397 var polyfill = function (x) { return (x > 0) - (x < 0) || +x; }; 1398 var mathSign = Math.sign || polyfill; 1399 1400 /*! @license miniraf v1.0.1 1401 1402 Copyright 2018 Fisssion LLC. 1403 1404 Permission is hereby granted, free of charge, to any person obtaining a copy 1405 of this software and associated documentation files (the "Software"), to deal 1406 in the Software without restriction, including without limitation the rights 1407 to use, copy, modify, merge, publish, distribute, sublicense, and/or sell 1408 copies of the Software, and to permit persons to whom the Software is 1409 furnished to do so, subject to the following conditions: 1410 1411 The above copyright notice and this permission notice shall be included in all 1412 copies or substantial portions of the Software. 1413 1414 THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 1415 IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 1416 FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE 1417 AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER 1418 LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 1419 OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE 1420 SOFTWARE. 1421 1422 */ 1423 var polyfill$1 = (function () { 1424 var clock = Date.now(); 1425 1426 return function (callback) { 1427 var currentTime = Date.now(); 1428 if (currentTime - clock > 16) { 1429 clock = currentTime; 1430 callback(currentTime); 1431 } else { 1432 setTimeout(function () { return polyfill$1(callback); }, 0); 1433 } 1434 } 1435 })(); 1436 1437 var miniraf = window.requestAnimationFrame || 1438 window.webkitRequestAnimationFrame || 1439 window.mozRequestAnimationFrame || 1440 polyfill$1; 1441 1442 function getGeometry(target, isContainer) { 1443 /** 1444 * We want to ignore padding and scrollbars for container elements. 1445 * More information here: https://goo.gl/vOZpbz 1446 */ 1447 var height = isContainer ? target.node.clientHeight : target.node.offsetHeight; 1448 var width = isContainer ? target.node.clientWidth : target.node.offsetWidth; 1449 1450 var offsetTop = 0; 1451 var offsetLeft = 0; 1452 var node = target.node; 1453 1454 do { 1455 if (!isNaN(node.offsetTop)) { 1456 offsetTop += node.offsetTop; 1457 } 1458 if (!isNaN(node.offsetLeft)) { 1459 offsetLeft += node.offsetLeft; 1460 } 1461 node = node.offsetParent; 1462 } while (node) 1463 1464 return { 1465 bounds: { 1466 top: offsetTop, 1467 right: offsetLeft + width, 1468 bottom: offsetTop + height, 1469 left: offsetLeft 1470 }, 1471 height: height, 1472 width: width 1473 } 1474 } 1475 1476 function getScrolled(container) { 1477 var top, left; 1478 if (container.node === document.documentElement) { 1479 top = window.pageYOffset; 1480 left = window.pageXOffset; 1481 } else { 1482 top = container.node.scrollTop; 1483 left = container.node.scrollLeft; 1484 } 1485 return { top: top, left: left } 1486 } 1487 1488 function isElementVisible(element) { 1489 if ( element === void 0 ) element = {}; 1490 1491 var container = this.store.containers[element.containerId]; 1492 if (!container) { return } 1493 1494 var viewFactor = Math.max(0, Math.min(1, element.config.viewFactor)); 1495 var viewOffset = element.config.viewOffset; 1496 1497 var elementBounds = { 1498 top: element.geometry.bounds.top + element.geometry.height * viewFactor, 1499 right: element.geometry.bounds.right - element.geometry.width * viewFactor, 1500 bottom: element.geometry.bounds.bottom - element.geometry.height * viewFactor, 1501 left: element.geometry.bounds.left + element.geometry.width * viewFactor 1502 }; 1503 1504 var containerBounds = { 1505 top: container.geometry.bounds.top + container.scroll.top + viewOffset.top, 1506 right: container.geometry.bounds.right + container.scroll.left - viewOffset.right, 1507 bottom: 1508 container.geometry.bounds.bottom + container.scroll.top - viewOffset.bottom, 1509 left: container.geometry.bounds.left + container.scroll.left + viewOffset.left 1510 }; 1511 1512 return ( 1513 (elementBounds.top < containerBounds.bottom && 1514 elementBounds.right > containerBounds.left && 1515 elementBounds.bottom > containerBounds.top && 1516 elementBounds.left < containerBounds.right) || 1517 element.styles.position === 'fixed' 1518 ) 1519 } 1520 1521 function delegate( 1522 event, 1523 elements 1524 ) { 1525 var this$1 = this; 1526 if ( event === void 0 ) event = { type: 'init' }; 1527 if ( elements === void 0 ) elements = this.store.elements; 1528 1529 miniraf(function () { 1530 var stale = event.type === 'init' || event.type === 'resize'; 1531 1532 each(this$1.store.containers, function (container) { 1533 if (stale) { 1534 container.geometry = getGeometry.call(this$1, container, true); 1535 } 1536 var scroll = getScrolled.call(this$1, container); 1537 if (container.scroll) { 1538 container.direction = { 1539 x: mathSign(scroll.left - container.scroll.left), 1540 y: mathSign(scroll.top - container.scroll.top) 1541 }; 1542 } 1543 container.scroll = scroll; 1544 }); 1545 1546 /** 1547 * Due to how the sequencer is implemented, itâs 1548 * important that we update the state of all 1549 * elements, before any animation logic is 1550 * evaluated (in the second loop below). 1551 */ 1552 each(elements, function (element) { 1553 if (stale || element.geometry === undefined) { 1554 element.geometry = getGeometry.call(this$1, element); 1555 } 1556 element.visible = isElementVisible.call(this$1, element); 1557 }); 1558 1559 each(elements, function (element) { 1560 if (element.sequence) { 1561 sequence.call(this$1, element); 1562 } else { 1563 animate.call(this$1, element); 1564 } 1565 }); 1566 1567 this$1.pristine = false;
1568 }); 1569 } 1570 1571 function isTransformSupported() { 1572 var style = document.documentElement.style; 1573 return 'transform' in style || 'WebkitTransform' in style 1574 } 1575 1576 function isTransitionSupported() { 1577 var style = document.documentElement.style; 1578 return 'transition' in style || 'WebkitTransition' in style 1579 } 1580 1581 var version = "4.0.9"; 1582 1583 var boundDelegate; 1584 var boundDestroy; 1585 var boundReveal; 1586 var boundClean; 1587 var boundSync; 1588 var config; 1589 var debug; 1590 var instance; 1591 1592 function ScrollReveal(options) { 1593 if ( options === void 0 ) options = {}; 1594 1595 var invokedWithoutNew = 1596 typeof this === 'undefined' || 1597 Object.getPrototypeOf(this) !== ScrollReveal.prototype; 1598 1599 if (invokedWithoutNew) { 1600 return new ScrollReveal(options) 1601 } 1602 1603 if (!ScrollReveal.isSupported()) { 1604 logger.call(this, 'Instantiation failed.', 'This browser is not supported.'); 1605 return mount.failure() 1606 } 1607 1608 var buffer; 1609 try { 1610 buffer = config 1611 ? deepAssign({}, config, options) 1612 : deepAssign({}, defaults, options); 1613 } catch (e) { 1614 logger.call(this, 'Invalid configuration.', e.message); 1615 return mount.failure() 1616 } 1617 1618 try { 1619 var container = tealight(buffer.container)[0]; 1620 if (!container) { 1621 throw new Error('Invalid container.') 1622 } 1623 } catch (e) { 1624 logger.call(this, e.message); 1625 return mount.failure() 1626 } 1627 1628 config = buffer; 1629 1630 if ((!config.mobile && isMobile()) || (!config.desktop && !isMobile())) { 1631 logger.call( 1632 this, 1633 'This device is disabled.', 1634 ("desktop: " + (config.desktop)), 1635 ("mobile: " + (config.mobile)) 1636 ); 1637 return mount.failure() 1638 } 1639 1640 mount.success(); 1641 1642 this.store = { 1643 containers: {}, 1644 elements: {}, 1645 history: [], 1646 sequences: {} 1647 }; 1648 1649 this.pristine = true; 1650 1651 boundDelegate = boundDelegate || delegate.bind(this); 1652 boundDestroy = boundDestroy || destroy.bind(this); 1653 boundReveal = boundReveal || reveal.bind(this); 1654 boundClean = boundClean || clean.bind(this); 1655 boundSync = boundSync || sync.bind(this); 1656 1657 Object.defineProperty(this, 'delegate', { get: function () { return boundDelegate; } }); 1658 Object.defineProperty(this, 'destroy', { get: function () { return boundDestroy; } }); 1659 Object.defineProperty(this, 'reveal', { get: function () { return boundReveal; } }); 1660 Object.defineProperty(this, 'clean', { get: function () { return boundClean; } }); 1661 Object.defineProperty(this, 'sync', { get: function () { return boundSync; } }); 1662 1663 Object.defineProperty(this, 'defaults', { get: function () { return config; } }); 1664 Object.defineProperty(this, 'version', { get: function () { return version; } }); 1665 Object.defineProperty(this, 'noop', { get: function () { return false; } }); 1666 1667 return instance ? instance : (instance = this) 1668 } 1669 1670 ScrollReveal.isSupported = function () { return isTransformSupported() && isTransitionSupported(); }; 1671 1672 Object.defineProperty(ScrollReveal, 'debug', { 1673 get: function () { return debug || false; }, 1674 set: function (value) { return (debug = typeof value === 'boolean' ? value : debug); } 1675 }); 1676 1677 ScrollReveal(); 1678 1679 return ScrollReveal; 1680 1681})); 1682;!function(i){"use strict";"function"==typeof define&&define.amd?define(["jquery"],i):"undefined"!=typeof exports?module.exports=i(require("jquery")):i(jQuery)}(function(i){"use strict";var e=window.Slick||{};(e=function(){var e=0;return function(t,o){var s,n=this;n.defaults={accessibility:!0,adaptiveHeight:!1,appendArrows:i(t),appendDots:i(t),arrows:!0,asNavFor:null,prevArrow:'<button class="slick-prev" aria-label="Previous" type="button">Previous</button>',nextArrow:'<button class="slick-next" aria-label="Next" type="button">Next</button>',autoplay:!1,autoplaySpeed:3e3,centerMode:!1,centerPadding:"50px",cssEase:"ease",customPaging:function(e,t){return i('<button type="button" />').text(t+1)},dots:!1,dotsClass:"slick-dots",draggable:!0,easing:"linear",edgeFriction:.35,fade:!1,focusOnSelect:!1,focusOnChange:!1,infinite:!0,initialSlide:0,lazyLoad:"ondemand",mobileFirst:!1,pauseOnHover:!0,pauseOnFocus:!0,pauseOnDotsHover:!1,respondTo:"window",responsive:null,rows:1,rtl:!1,slide:"",slidesPerRow:1,slidesToShow:1,slidesToScroll:1,speed:500,swipe:!0,swipeToSlide:!1,touchMove:!0,touchThreshold:5,useCSS:!0,useTransform:!0,variableWidth:!1,vertical:!1,verticalSwiping:!1,waitForAnimate:!0,zIndex:1e3},n.initials={animating:!1,dragging:!1,autoPlayTimer:null,currentDirection:0,currentLeft:null,currentSlide:0,direction:1,$dots:null,listWidth:null,listHeight:null,loadIndex:0,$nextArrow:null,$prevArrow:null,scrolling:!1,slideCount:null,slideWidth:null,$slideTrack:null,$slides:null,
vendor: 6,594 bytes, line 1682
1682sliding:!1,slideOffset:0,swipeLeft:null,swiping:!1,$list:null,touchObject:{},transformsEnabled:!1,unslicked:!1},i.extend(n,n.initials),n.activeBreakpoint=null,n.animType=null,n.animProp=null,n.breakpoints=[],n.breakpointSettings=[],n.cssTransitions=!1,n.focussed=!1,n.interrupted=!1,n.hidden="hidden",n.paused=!0,n.positionProp=null,n.respondTo=null,n.rowCount=1,n.shouldClick=!0,n.$slider=i(t),n.$slidesCache=null,n.transformType=null,n.transitionType=null,n.visibilityChange="visibilitychange",n.windowWidth=0,n.windowTimer=null,s=i(t).data("slick")||{},n.options=i.extend({},n.defaults,o,s),n.currentSlide=n.options.initialSlide,n.originalSettings=n.options,void 0!==document.mozHidden?(n.hidden="mozHidden",n.visibilityChange="mozvisibilitychange"):void 0!==document.webkitHidden&&(n.hidden="webkitHidden",n.visibilityChange="webkitvisibilitychange"),n.autoPlay=i.proxy(n.autoPlay,n),n.autoPlayClear=i.proxy(n.autoPlayClear,n),n.autoPlayIterator=i.proxy(n.autoPlayIterator,n),n.changeSlide=i.proxy(n.changeSlide,n),n.clickHandler=i.proxy(n.clickHandler,n),n.selectHandler=i.proxy(n.selectHandler,n),n.setPosition=i.proxy(n.setPosition,n),n.swipeHandler=i.proxy(n.swipeHandler,n),n.dragHandler=i.proxy(n.dragHandler,n),n.keyHandler=i.proxy(n.keyHandler,n),n.instanceUid=e++,n.htmlExpr=/^(?:\s*(<[\w\W]+>)[^>]*)$/,n.registerBreakpoints(),n.init(!0)}}()).prototype.activateADA=function(){this.$slideTrack.find(".slick-active").attr({"aria-hidden":"false"}).find("a, input, button, select").attr({tabindex:"0"})},e.prototype.addSlide=e.prototype.slickAdd=function(e,t,o){var s=this;if("boolean"==typeof t)o=t,t=null;else if(t<0||t>=s.slideCount)return!1;s.unload(),"number"==typeof t?0===t&&0===s.$slides.length?i(e).appendTo(s.$slideTrack):o?i(e).insertBefore(s.$slides.eq(t)):i(e).insertAfter(s.$slides.eq(t)):!0===o?i(e).prependTo(s.$slideTrack):i(e).appendTo(s.$slideTrack),s.$slides=s.$slideTrack.children(this.options.slide),s.$slideTrack.children(this.options.slide).detach(),s.$slideTrack.append(s.$slides),s.$slides.each(function(e,t){i(t).attr("data-slick-index",e)}),s.$slidesCache=s.$slides,s.reinit()},e.prototype.animateHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.animate({height:e},i.options.speed)}},e.prototype.animateSlide=function(e,t){var o={},s=this;s.animateHeight(),!0===s.options.rtl&&!1===s.options.vertical&&(e=-e),!1===s.transformsEnabled?!1===s.options.vertical?s.$slideTrack.animate({left:e},s.options.speed,s.options.easing,t):s.$slideTrack.animate({top:e},s.options.speed,s.options.easing,t):!1===s.cssTransitions?(!0===s.options.rtl&&(s.currentLeft=-s.currentLeft),i({animStart:s.currentLeft}).animate({animStart:e},{duration:s.options.speed,easing:s.options.easing,step:function(i){i=Math.ceil(i),!1===s.options.vertical?(o[s.animType]="translate("+i+"px, 0px)",s.$slideTrack.css(o)):(o[s.animType]="translate(0px,"+i+"px)",s.$slideTrack.css(o))},complete:function(){t&&t.call()}})):(s.applyTransition(),e=Math.ceil(e),!1===s.options.vertical?o[s.animType]="translate3d("+e+"px, 0px, 0px)":o[s.animType]="translate3d(0px,"+e+"px, 0px)",s.$slideTrack.css(o),t&&setTimeout(function(){s.disableTransition(),t.call()},s.options.speed))},e.prototype.getNavTarget=function(){var e=this,t=e.options.asNavFor;return t&&null!==t&&(t=i(t).not(e.$slider)),t},e.prototype.asNavFor=function(e){var t=this.getNavTarget();null!==t&&"object"==typeof t&&t.each(function(){var t=i(this).slick("getSlick");t.unslicked||t.slideHandler(e,!0)})},e.prototype.applyTransition=function(i){var e=this,t={};!1===e.options.fade?t[e.transitionType]=e.transformType+" "+e.options.speed+"ms "+e.options.cssEase:t[e.transitionType]="opacity "+e.options.speed+"ms "+e.options.cssEase,!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.autoPlay=function(){var i=this;i.autoPlayClear(),i.slideCount>i.options.slidesToShow&&(i.autoPlayTimer=setInterval(i.autoPlayIterator,i.options.autoplaySpeed))},e.prototype.autoPlayClear=function(){var i=this;i.autoPlayTimer&&clearInterval(i.autoPlayTimer)},e.prototype.autoPlayIterator=function(){var i=this,e=i.currentSlide+i.options.slidesToScroll;i.paused||i.interrupted||i.focussed||(!1===i.options.infinite&&(1===i.direction&&i.currentSlide+1===i.slideCount-1?i.direction=0:0===i.direction&&(e=i.currentSlide-i.options.slidesToScroll,i.currentSlide-1==0&&(i.direction=1))),i.slideHandler(e))},e.prototype.buildArrows=function(){var e=this;!0===e.options.arrows&&(e.$prevArrow=i(e.options.prevArrow).addClass("slick-arrow"),e.$nextArrow=i(e.options.nextArrow).addClass("slick-arrow"),e.slideCount>e.options.slidesToShow?(e.$prevArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.$nextArrow.removeClass("slick-hidden").removeAttr("aria-hidden tabindex"),e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.prependTo(e.options.appendArrows),e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.appendTo(e.options.appendArrows),!0!==e.options.infinite&&e.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true")):e.$prevArrow.add(e.$nextArrow).addClass("slick-hidden").attr({"aria-disabled":"true",tabindex:"-1"}))},e.prototype.buildDots=function(){var e,t,o=this;if(!0===o.options.dots){for(o.$slider.addClass("slick-dotted"),t=i("<ul />").addClass(o.options.dotsClass),e=0;e<=o.getDotCount();e+=1)t.append(i("<li />").append(o.options.customPaging.call(this,o,e)));o.$dots=t.appendTo(o.options.appendDots),o.$dots.find("li").first().addClass("slick-active")}},e.prototype.buildOut=function(){var e=this;e.$slides=e.$slider.children(e.options.slide+":not(.slick-cloned)").addClass("slick-slide"),e.slideCount=e.$slides.length,e.$slides.each(function(e,t){i(t).attr("data-slick-index",e).data("originalStyling",i(t).attr("style")||"")}),e.$slider.addClass("slick-slider"),e.$slideTrack=0===e.slideCount?i('<div class="slick-track"/>').appendTo(e.$slider):e.$slides.wrapAll('<div class="slick-track"/>').parent(),e.$list=e.$slideTrack.wrap('<div class="slick-list"/>').parent(),e.$slideTrack.css("opacity",0),!0!==e.options.centerMode&&!0!==e.options.swipeToSlide||(e.options.slidesToScroll=1),i("img[data-lazy]",e.$slider).not("[src]").addClass("slick-loading"),e.setupInfinite(),e.buildArrows(),e.buildDots(),e.updateDots(),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),!0===e.options.draggable&&e.$list.addClass("draggable")},e.prototype.buildRows=function(){var i,e,t,o,s,n,r,l=this;if(o=document.createDocumentFragment(),n=l.$slider.children(),l.o
vendor: 3,442 bytes, line 1682
1682ptions.rows>1){for(r=l.options.slidesPerRow*l.options.rows,s=Math.ceil(n.length/r),i=0;i<s;i++){var d=document.createElement("div");for(e=0;e<l.options.rows;e++){var a=document.createElement("div");for(t=0;t<l.options.slidesPerRow;t++){var c=i*r+(e*l.options.slidesPerRow+t);n.get(c)&&a.appendChild(n.get(c))}d.appendChild(a)}o.appendChild(d)}l.$slider.empty().append(o),l.$slider.children().children().children().css({width:100/l.options.slidesPerRow+"%",display:"inline-block"})}},e.prototype.checkResponsive=function(e,t){var o,s,n,r=this,l=!1,d=r.$slider.width(),a=window.innerWidth||i(window).width();if("window"===r.respondTo?n=a:"slider"===r.respondTo?n=d:"min"===r.respondTo&&(n=Math.min(a,d)),r.options.responsive&&r.options.responsive.length&&null!==r.options.responsive){s=null;for(o in r.breakpoints)r.breakpoints.hasOwnProperty(o)&&(!1===r.originalSettings.mobileFirst?n<r.breakpoints[o]&&(s=r.breakpoints[o]):n>r.breakpoints[o]&&(s=r.breakpoints[o]));null!==s?null!==r.activeBreakpoint?(s!==r.activeBreakpoint||t)&&(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):(r.activeBreakpoint=s,"unslick"===r.breakpointSettings[s]?r.unslick(s):(r.options=i.extend({},r.originalSettings,r.breakpointSettings[s]),!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e)),l=s):null!==r.activeBreakpoint&&(r.activeBreakpoint=null,r.options=r.originalSettings,!0===e&&(r.currentSlide=r.options.initialSlide),r.refresh(e),l=s),e||!1===l||r.$slider.trigger("breakpoint",[r,l])}},e.prototype.changeSlide=function(e,t){var o,s,n,r=this,l=i(e.currentTarget);switch(l.is("a")&&e.preventDefault(),l.is("li")||(l=l.closest("li")),n=r.slideCount%r.options.slidesToScroll!=0,o=n?0:(r.slideCount-r.currentSlide)%r.options.slidesToScroll,e.data.message){case"previous":s=0===o?r.options.slidesToScroll:r.options.slidesToShow-o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide-s,!1,t);break;case"next":s=0===o?r.options.slidesToScroll:o,r.slideCount>r.options.slidesToShow&&r.slideHandler(r.currentSlide+s,!1,t);break;case"index":var d=0===e.data.index?0:e.data.index||l.index()*r.options.slidesToScroll;r.slideHandler(r.checkNavigable(d),!1,t),l.children().trigger("focus");break;default:return}},e.prototype.checkNavigable=function(i){var e,t;if(e=this.getNavigableIndexes(),t=0,i>e[e.length-1])i=e[e.length-1];else for(var o in e){if(i<e[o]){i=t;break}t=e[o]}return i},e.prototype.cleanUpEvents=function(){var e=this;e.options.dots&&null!==e.$dots&&(i("li",e.$dots).off("click.slick",e.changeSlide).off("mouseenter.slick",i.proxy(e.interrupt,e,!0)).off("mouseleave.slick",i.proxy(e.interrupt,e,!1)),!0===e.options.accessibility&&e.$dots.off("keydown.slick",e.keyHandler)),e.$slider.off("focus.slick blur.slick"),!0===e.options.arrows&&e.slideCount>e.options.slidesToShow&&(e.$prevArrow&&e.$prevArrow.off("click.slick",e.changeSlide),e.$nextArrow&&e.$nextArrow.off("click.slick",e.changeSlide),!0===e.options.accessibility&&(e.$prevArrow&&e.$prevArrow.off("keydown.slick",e.keyHandler),e.$nextArrow&&e.$nextArrow.off("keydown.slick",e.keyHandler))),e.$list.off("touchstart.slick mousedown.slick",e.swipeHandler),e.$list.off("touchmove.slick mousemove.slick",e.swipeHandler),e.$list.off("touchend.slick mouseup.slick",e.swipeHandler),e.$list.off("touchcancel.slick mouseleave.
1682slick",e.swipeHandler),e.$list.off("click.slick",e.clickHandler),i(document).off(e.visibilityChange,e.visibility),e.cleanUpSlideEvents(),!0===e.options.accessibility&&e.$list.off("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().off("click.slick",e.selectHandler),i(window).off("orientationchange.slick.slick-"+e.instanceUid,e.orientationChange),i(window).off("resize.slick.slick-"+e.instanceUid,e.resize),i("[draggable!=true]",e.$slideTrack).off("dragstart",e.preventDefault),i(window).off("load.slick.slick-"+e.instanceUid,e.setPosition)},e.prototype.cleanUpSlideEvents=function(){var e=this;e.$list.off("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.off("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.cleanUpRows=function(){var i,e=this;e.options.rows>1&&((i=e.$slides.children().children()).removeAttr("style"),e.$slider.empty().append(i))},e.prototype.clickHandler=function(i){!1===this.shouldClick&&(i.stopImmediatePropagation(),i.stopPropagation(),i.preventDefault())},e.prototype.destroy=function(e){var t=this;t.autoPlayClear(),t.touchObject={},t.cleanUpEvents(),i(".slick-cloned",t.$slider).detach(),t.$dots&&t.$dots.remove(),t.$prevArrow&&t.$prevArrow.length&&(t.$prevArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.prevArrow)&&t.$prevArrow.remove()),t.$nextArrow&&t.$nextArrow.length&&(t.$nextArrow.removeClass("slick-disabled slick-arrow slick-hidden").removeAttr("aria-hidden aria-disabled tabindex").css("display",""),t.htmlExpr.test(t.options.nextArrow)&&t.$nextArrow.remove()),t.$slides&&(t.$slides.removeClass("slick-slide slick-active slick-center slick-visible slick-current").removeAttr("aria-hidden").removeAttr("data-slick-index").each(function(){i(this).attr("style",i(this).data("originalStyling"))}),t.$slideTrack.children(this.options.slide).detach(),t.$slideTrack.detach(),t.$list.detach(),t.$slider.append(t.$slides)),t.cleanUpRows(),t.$slider.removeClass("slick-slider"),t.$slider.removeClass("slick-initialized"),t.$slider.removeClass("slick-dotted"),t.unslicked=!0,e||t.$slider.trigger("destroy",[t])},e.prototype.disableTransition=function(i){var e=this,t={};t[e.transitionType]="",!1===e.options.fade?e.$slideTrack.css(t):e.$slides.eq(i).css(t)},e.prototype.fadeSlide=function(i,e){var t=this;!1===t.cssTransitions?(t.$slides.eq(i).css({zIndex:t.options.zIndex}),t.$slides.eq(i).animate({opacity:1},t.options.speed,t.options.easing,e)):(t.applyTransition(i),t.$slides.eq(i).css({opacity:1,zIndex:t.options.zIndex}),e&&setTimeout(function(){t.disableTransition(i),e.call()},t.options.speed))},e.prototype.fadeSlideOut=function(i){var e=this;!1===e.cssTransitions?e.$slides.eq(i).animate({opacity:0,zIndex:e.options.zIndex-2},e.options.speed,e.options.easing):(e.applyTransition(i),e.$slides.eq(i).css({opacity:0,zIndex:e.options.zIndex-2}))},e.prototype.filterSlides=e.prototype.slickFilter=function(i){var e=this;null!==i&&(e.$slidesCache=e.$slides,e.unload(),e.$slideTrack.children(this.options.slide).detach(),e.$slidesCache.filter(i).appendTo(e.$slideTrack),e.reinit())},e.prototype.focusHandler=function(){var e=this;e.$slider.off("focus.slick blur.slick").on("focus.slick blur.slick","*",function(t){t.stopImmediatePropagation();var o=i(this);setTimeout(function(){e.options.pauseOnFocus&&(e.focussed=o.is(":focus"),e.autoPlay())},0)})},e.prototype.getCurrent=e.prototype.slickCurrentSlide=function(){return this.currentSlide},e.prototype.getDotCount=function(){var i=this,e=0,t=0,o=0;if(!0===i.options.infinite)if(i.slideCount<=i.options.slidesToShow)++o;else for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else if(!0===i.options.centerMode)o=i.slideCount;else if(i.options.asNavFor)for(;e<i.slideCount;)++o,e=t+i.options.slidesToScroll,t+=i.options.slidesToScroll<=i.options.slidesToShow?i.options.slidesToScroll:i.options.slidesToShow;else o=1+Math.ceil((i.slideCount-i.options.slidesToShow)/i.options.slidesToScroll);return o-1},e.prototype.getLeft=function(i){var e,t,o,s,n=this,r=0;return n.slideOffset=0,t=n.$slides.first().outerHeight(!0),!0===n.options.infinite?(n.slideCount>n.options.slidesToShow&&(n.slideOffset=n.slideWidth*n.options.slidesToShow*-1,s=-1,!0===n.options.vertical&&!0===n.options.centerMode&&(2===n.options.slidesToShow?s=-1.5:1===n.options.slidesToShow&&(s=-2)),r=t*n.options.slidesToShow*s),n.slideCount%n.options.slidesToScroll!=0&&i+n.options.slidesToScroll>n.slideCount&&n.slideCount>n.options.slidesToShow&&(i>n.slideCount?(n.slideOffset=(n.options.slidesToShow-(i-n.slideCount))*n.slideWidth*-1,r=(n.options.slidesToShow-(i-n.slideCount))*t*-1):(n.slideOffset=n.slideCount%n.options.slidesToScroll*n.slideWidth*-1,r=n.slideCount%n.options.slidesToScroll*t*-1))):i+n.options.slidesToShow>n.slideCount&&(n.slideOffset=(i+n.options.slidesToShow-n.slideCount)*n.slideWidth,r=(i+n.options.slidesToShow-n.slideCount)*t),n.slideCount<=n.options.slidesToShow&&(n.slideOffset=0,r=0),!0===n.options.centerMode&&n.slideCount<=n.options.slidesToShow?n.slideOffset=n.slideWidth*Math.floor(n.options.slidesToShow)/2-n.slideWidth*n.slideCount/2:!0===n.options.centerMode&&!0===n.options.infinite?n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)-n.slideWidth:!0===n.options.centerMode&&(n.slideOffset=0,n.slideOffset+=n.slideWidth*Math.floor(n.options.slidesToShow/2)),e=!1===n.options.vertical?i*n.slideWidth*-1+n.slideOffset:i*t*-1+r,!0===n.options.variableWidth&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,!0===n.options.centerMode&&(o=n.slideCount<=n.options.slidesToShow||!1===n.options.infinite?n.$slideTrack.children(".slick-slide").eq(i):n.$slideTrack.children(".slick-slide").eq(i+n.options.slidesToShow+1),e=!0===n.options.rtl?o[0]?-1*(n.$slideTrack.width()-o[0].offsetLeft-o.width()):0:o[0]?-1*o[0].offsetLeft:0,e+=(n.$list.width()-o.outerWidth())/2)),e},e.prototype.getOption=e.prototype.slickGetOption=function(i){return this.options[i]},e.prototype.getNavigableIndexes=function(){var i,e=this,t=0,o=0,s=[];for(!1===e.options.infinite?i=e.slideCount:(t=-1*e.options.slidesToScroll,o=-1*e.options.slidesToScroll,i=2*e.slideCount);t<i;)s.push(t),t=o+e.options.slidesToScroll,o+=e.options.slidesToScroll<=e.options.slidesToShow?e.options.slidesToScroll:e.options.slidesToShow;return s},e.prototype.getSlick=function(){return this},e.prototype.getSlideCount=function(){var e,t,o=this;return t=!0===o.options.centerMode?o.slideWidth*Math.floor(o.options.slidesToShow/2):0,!0===o.options.swipeToSlide?(o.$slideTrack.find(".slick-slide").each(function(s,n){if(n.offsetLeft-t+i(n).outerWidth()/2>-1*o.swipeLeft)return e=n,!1}),Math.abs(i(e).attr("data-slick-index")-o.currentSlide)||1):o.options.slidesToScroll},e.prototype.goTo=e.prototype.slickGoTo=function(i,e){this.changeSlide({data:{message:"index",index:
1682parseInt(i)}},e)},e.prototype.init=function(e){var t=this;i(t.$slider).hasClass("slick-initialized")||(i(t.$slider).addClass("slick-initialized"),t.buildRows(),t.buildOut(),t.setProps(),t.startLoad(),t.loadSlider(),t.initializeEvents(),t.updateArrows(),t.updateDots(),t.checkResponsive(!0),t.focusHandler()),e&&t.$slider.trigger("init",[t]),!0===t.options.accessibility&&t.initADA(),t.options.autoplay&&(t.paused=!1,t.autoPlay())},e.prototype.initADA=function(){var e=this,t=Math.ceil(e.slideCount/e.options.slidesToShow),o=e.getNavigableIndexes().filter(function(i){return i>=0&&i<e.slideCount});e.$slides.add(e.$slideTrack.find(".slick-cloned")).attr({"aria-hidden":"true",tabindex:"-1"}).find("a, input, button, select").attr({tabindex:"-1"}),null!==e.$dots&&(e.$slides.not(e.$slideTrack.find(".slick-cloned")).each(function(t){var s=o.indexOf(t);i(this).attr({role:"tabpanel",id:"slick-slide"+e.instanceUid+t,tabindex:-1}),-1!==s&&i(this).attr({"aria-describedby":"slick-slide-control"+e.instanceUid+s})}),e.$dots.attr("role","tablist").find("li").each(function(s){var n=o[s];i(this).attr({role:"presentation"}),i(this).find("button").first().attr({role:"tab",id:"slick-slide-control"+e.instanceUid+s,"aria-controls":"slick-slide"+e.instanceUid+n,"aria-label":s+1+" of "+t,"aria-selected":null,tabindex:"-1"})}).eq(e.currentSlide).find("button").attr({"aria-selected":"true",tabindex:"0"}).end());for(var s=e.currentSlide,n=s+e.options.slidesToShow;s<n;s++)e.$slides.eq(s).attr("tabindex",0);e.activateADA()},e.prototype.initArrowEvents=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.off("click.slick").on("click.slick",{message:"previous"},i.changeSlide),i.$nextArrow.off("click.slick").on("click.slick",{message:"next"},i.changeSlide),!0===i.options.accessibility&&(i.$prevArrow.on("keydown.slick",i.keyHandler),i.$nextArrow.on("keydown.slick",i.keyHandler)))},e.prototype.initDotEvents=function(){var e=this;!0===e.options.dots&&(i("li",e.$dots).on("click.slick",{message:"index"},e.changeSlide),!0===e.options.accessibility&&e.$dots.on("keydown.slick",e.keyHandler)),!0===e.options.dots&&!0===e.options.pauseOnDotsHover&&i("li",e.$dots).on("mouseenter.slick",i.proxy(e.interrupt,e,!0)).on("mouseleave.slick",i.proxy(e.interrupt,e,!1))},e.prototype.initSlideEvents=function(){var e=this;e.options.pauseOnHover&&(e.$list.on("mouseenter.slick",i.proxy(e.interrupt,e,!0)),e.$list.on("mouseleave.slick",i.proxy(e.interrupt,e,!1)))},e.prototype.initializeEvents=function(){var e=this;e.initArrowEvents(),e.initDotEvents(),e.initSlideEvents(),e.$list.on("touchstart.slick mousedown.slick",{action:"start"},e.swipeHandler),e.$list.on("touchmove.slick mousemove.slick",{action:"move"},e.swipeHandler),e.$list.on("touchend.slick mouseup.slick",{action:"end"}
1682,e.swipeHandler),e.$list.on("touchcancel.slick mouseleave.slick",{action:"end"},e.swipeHandler),e.$list.on("click.slick",e.clickHandler),i(document).on(e.visibilityChange,i.proxy(e.visibility,e)),!0===e.options.accessibility&&e.$list.on("keydown.slick",e.keyHandler),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),i(window).on("orientationchange.slick.slick-"+e.instanceUid,i.proxy(e.orientationChange,e)),i(window).on("resize.slick.slick-"+e.instanceUid,i.proxy(e.resize,e)),i("[draggable!=true]",e.$slideTrack).on("dragstart",e.preventDefault),i(window).on("load.slick.slick-"+e.instanceUid,e.setPosition),i(e.setPosition)},e.prototype.initUI=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.show(),i.$nextArrow.show()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.show()},e.prototype.keyHandler=function(i){var e=this;i.target.tagName.match("TEXTAREA|INPUT|SELECT")||(37===i.keyCode&&!0===e.options.accessibility?e.changeSlide({data:{message:!0===e.options.rtl?"next":"previous"}}):39===i.keyCode&&!0===e.options.accessibility&&e.changeSlide({data:{message:!0===e.options.rtl?"previous":"next"}}))},e.prototype.lazyLoad=function(){function e(e){i("img[data-lazy]",e).each(function(){var e=i(this),t=i(this).attr("data-lazy"),o=i(this).attr("data-srcset"),s=i(this).attr("data-sizes")||n.$slider.attr("data-sizes"),r=document.createElement("img");r.onload=function(){e.animate({opacity:0}
vendor: 7,112 bytes, line 1682
1682,100,function(){o&&(e.attr("srcset",o),s&&e.attr("sizes",s)),e.attr("src",t).animate({opacity:1},200,function(){e.removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading")}),n.$slider.trigger("lazyLoaded",[n,e,t])})},r.onerror=function(){e.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),n.$slider.trigger("lazyLoadError",[n,e,t])},r.src=t})}var t,o,s,n=this;if(!0===n.options.centerMode?!0===n.options.infinite?s=(o=n.currentSlide+(n.options.slidesToShow/2+1))+n.options.slidesToShow+2:(o=Math.max(0,n.currentSlide-(n.options.slidesToShow/2+1)),s=n.options.slidesToShow/2+1+2+n.currentSlide):(o=n.options.infinite?n.options.slidesToShow+n.currentSlide:n.currentSlide,s=Math.ceil(o+n.options.slidesToShow),!0===n.options.fade&&(o>0&&o--,s<=n.slideCount&&s++)),t=n.$slider.find(".slick-slide").slice(o,s),"anticipated"===n.options.lazyLoad)for(var r=o-1,l=s,d=n.$slider.find(".slick-slide"),a=0;a<n.options.slidesToScroll;a++)r<0&&(r=n.slideCount-1),t=(t=t.add(d.eq(r))).add(d.eq(l)),r--,l++;e(t),n.slideCount<=n.options.slidesToShow?e(n.$slider.find(".slick-slide")):n.currentSlide>=n.slideCount-n.options.slidesToShow?e(n.$slider.find(".slick-cloned").slice(0,n.options.slidesToShow)):0===n.currentSlide&&e(n.$slider.find(".slick-cloned").slice(-1*n.options.slidesToShow))},e.prototype.loadSlider=function(){var i=this;i.setPosition(),i.$slideTrack.css({opacity:1}),i.$slider.removeClass("slick-loading"),i.initUI(),"progressive"===i.options.lazyLoad&&i.progressiveLazyLoad()},e.prototype.next=e.prototype.slickNext=function(){this.changeSlide({data:{message:"next"}})},e.prototype.orientationChange=function(){var i=this;i.checkResponsive(),i.setPosition()},e.prototype.pause=e.prototype.slickPause=function(){var i=this;i.autoPlayClear(),i.paused=!0},e.prototype.play=e.prototype.slickPlay=function(){var i=this;i.autoPlay(),i.options.autoplay=!0,i.paused=!1,i.focussed=!1,i.interrupted=!1},e.prototype.postSlide=function(e){var t=this;t.unslicked||(t.$slider.trigger("afterChange",[t,e]),t.animating=!1,t.slideCount>t.options.slidesToShow&&t.setPosition(),t.swipeLeft=null,t.options.autoplay&&t.autoPlay(),!0===t.options.accessibility&&(t.initADA(),t.options.focusOnChange&&i(t.$slides.get(t.currentSlide)).attr("tabindex",0).focus()))},e.prototype.prev=e.prototype.slickPrev=function(){this.changeSlide({data:{message:"previous"}})},e.prototype.preventDefault=function(i){i.preventDefault()},e.prototype.progressiveLazyLoad=function(e){e=e||1;var t,o,s,n,r,l=this,d=i("img[data-lazy]",l.$slider);d.length?(t=d.first(),o=t.attr("data-lazy"),s=t.attr("data-srcset"),n=t.attr("data-sizes")||l.$slider.attr("data-sizes"),(r=document.createElement("img")).onload=function(){s&&(t.attr("srcset",s),n&&t.attr("sizes",n)),t.attr("src",o).removeAttr("data-lazy data-srcset data-sizes").removeClass("slick-loading"),!0===l.options.adaptiveHeight&&l.setPosition(),l.$slider.trigger("lazyLoaded",[l,t,o]),l.progressiveLazyLoad()},r.onerror=function(){e<3?setTimeout(function(){l.progressiveLazyLoad(e+1)},500):(t.removeAttr("data-lazy").removeClass("slick-loading").addClass("slick-lazyload-error"),l.$slider.trigger("lazyLoadError",[l,t,o]),l.progressiveLazyLoad())},r.src=o):l.$slider.trigger("allImagesLoaded",[l])},e.prototype.refresh=function(e){var t,o,s=this;o=s.slideCount-s.options.slidesToShow,!s.options.infinite&&s.currentSlide>o&&(s.currentSlide=o),s.slideCount<=s.options.slidesToShow&&(s.currentSlide=0),t=s.currentSlide,s.destroy(!0),i.extend(s,s.initials,{currentSlide:t}),s.init(),e||s.changeSlide({data:{message:"index",index:t}},!1)},e.prototype.registerBreakpoints=function(){var e,t,o,s=this,n=s.options.responsive||null;if("array"===i.type(n)&&n.length){s.respondTo=s.options.respondTo||"window";for(e in n)if(o=s.breakpoints.length-1,n.hasOwnProperty(e)){for(t=n[e].breakpoint;o>=0;)s.breakpoints[o]&&s.breakpoints[o]===t&&s.breakpoints.splice(o,1),o--;s.breakpoints.push(t),s.breakpointSettings[t]=n[e].settings}s.breakpoints.sort(function(i,e){return s.options.mobileFirst?i-e:e-i})}},e.prototype.reinit=function(){var e=this;e.$slides=e.$slideTrack.children(e.options.slide).addClass("slick-slide"),e.slideCount=e.$slides.length,e.currentSlide>=e.slideCount&&0!==e.currentSlide&&(e.currentSlide=e.currentSlide-e.options.slidesToScroll),e.slideCount<=e.options.slidesToShow&&(e.currentSlide=0),e.registerBreakpoints(),e.setProps(),e.setupInfinite(),e.buildArrows(),e.updateArrows(),e.initArrowEvents(),e.buildDots(),e.updateDots(),e.initDotEvents(),e.cleanUpSlideEvents(),e.initSlideEvents(),e.checkResponsive(!1,!0),!0===e.options.focusOnSelect&&i(e.$slideTrack).children().on("click.slick",e.selectHandler),e.setSlideClasses("number"==typeof e.currentSlide?e.currentSlide:0),e.setPosition(),e.focusHandler(),e.paused=!e.options.autoplay,e.autoPlay(),e.$slider.trigger("reInit",[e])},e.prototype.resize=function(){var e=this;i(window).width()!==e.windowWidth&&(clearTimeout(e.windowDelay),e.windowDelay=window.setTimeout(function(){e.windowWidth=i(window).width(),e.checkResponsive(),e.unslicked||e.setPosition()},50))},e.prototype.removeSlide=e.prototype.slickRemove=function(i,e,t){var o=this;if(i="boolean"==typeof i?!0===(e=i)?0:o.slideCount-1:!0===e?--i:i,o.slideCount<1||i<0||i>o.slideCount-1)return!1;o.unload(),!0===t?o.$slideTrack.children().remove():o.$slideTrack.children(this.options.slide).eq(i).remove(),o.$slides=o.$slideTrack.children(this.options.slide),o.$slideTrack.children(this.options.slide).detach(),o.$slideTrack.append(o.$slides),o.$slidesCache=o.$slides,o.reinit()},e.prototype.setCSS=function(i){var e,t,o=this,s={};!0===o.options.rtl&&(i=-i),e="left"==o.positionProp?Math.ceil(i)+"px":"0px",t="top"==o.positionProp?Math.ceil(i)+"px":"0px",s[o.positionProp]=i,!1===o.transformsEnabled?o.$slideTrack.css(s):(s={},!1===o.cssTransitions?(s[o.animType]="translate("+e+", "+t+")",o.$slideTrack.css(s)):(s[o.animType]="translate3d("+e+", "+t+", 0px)",o.$slideTrack.css(s)))},e.prototype.setDimensions=function(){var i=this;!1===i.options.vertical?!0===i.options.centerMode&&i.$list.css({padding:"0px "+i.options.centerPadding}):(i.$list.height(i.$slides.first().outerHeight(!0)*i.options.slidesToShow),!0===i.options.centerMode&&i.$list.css({padding:i.options.centerPadding+" 0px"})),i.listWidth=i.$list.width(),i.listHeight=i.$list.height(),!1===i.options.vertical&&!1===i.options.variableWidth?(i.slideWidth=Math.ceil(i.listWidth/i.options.slidesToShow),i.$slideTrack.width(Math.ceil(i.slideWidth*i.$slideTrack.children(".slick-slide").length))):!0===i.options.variableWidth?i.$slideTrack.width(5e3*i.slideCount):(i.slideWidth=Math.ceil(i.listWidth),i.$slideTrack.height(Math.ceil(i.$slides.first().outerHeight(!0)*i.$slideTrack.children(".slick-slide").length)));var e=i.$slides.first().outerWidth(!0)-i.$slides.first().width();!1===i.options.variableWidth&&i.$slideTrack.children(".slick-slide").width(i.slideWidth-e)},e.prototype.setFade=function(){var e,t=this;t.$slides.each(function(o,s){e=t.slideWidth*o*-1,!0===t.options.rtl?i(s).css({position:"relative",right:e,top:0,zIndex:t.options.zIndex-2,opacity:0}
1682):i(s).css({position:"relative",left:e,top:0,zIndex:t.options.zIndex-2,opacity:0})}),t.$slides.eq(t.currentSlide).css({zIndex:t.options.zIndex-1,opacity:1})},e.prototype.setHeight=function(){var i=this;if(1===i.options.slidesToShow&&!0===i.options.adaptiveHeight&&!1===i.options.vertical){var e=i.$slides.eq(i.currentSlide).outerHeight(!0);i.$list.css("height",e)}},e.prototype.setOption=e.prototype.slickSetOption=function(){var e,t,o,s,n,r=this,l=!1;if("object"===i.type(arguments[0])?(o=arguments[0],l=arguments[1],n="multiple"):"string"===i.type(arguments[0])&&(o=arguments[0],s=arguments[1],l=arguments[2],"responsive"===arguments[0]&&"array"===i.type(arguments[1])?n="responsive":void 0!==arguments[1]&&(n="single")),"single"===n)r.options[o]=s;else if("multiple"===n)i.each(o,function(i,e){r.options[i]=e});else if("responsive"===n)for(t in s)if("array"!==i.type(r.options.responsive))r.options.responsive=[s[t]];else{for(e=r.options.responsive.length-1;e>=0;)r.options.responsive[e].breakpoint===s[t].breakpoint&&r.options.responsive.splice(e,1),e--;r.options.responsive.push(s[t])}l&&(r.unload(),r.reinit())},e.prototype.setPosition=function(){var i=this;i.setDimensions(),i.setHeight(),!1===i.options.fade?i.setCSS(i.getLeft(i.currentSlide)):i.setFade(),i.$slider.trigger("setPosition",[i])},e.prototype.setProps=function(){var i=this,e=document.body.style;i.positionProp=!0===i.options.vertical?"top":"left","top"===i.positionProp?i.$slider.addClass("slick-vertical"):i.$slider.removeClass("slick-vertical"),void 0===e.WebkitTransition&&void 0===e.MozTransition&&void 0===e.msTransition||!0===i.options.useCSS&&(i.cssTransitions=!0),i.options.fade&&("number"==typeof i.options.zIndex?i.options.zIndex<3&&(i.options.zIndex=3):i.options.zIndex=i.defaults.zIndex),void 0!==e.OTransform&&(i.animType="OTransform",i.transformType="-o-transform",i.transitionType="OTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.MozTransform&&(i.animType="MozTransform",i.transformType="-moz-transform",i.transitionType="MozTransition",void 0===e.perspectiveProperty&&void 0===e.MozPerspective&&(i.animType=!1)),void 0!==e.webkitTransform&&(i.animType="webkitTransform",i.transformType="-webkit-transform",i.transitionType="webkitTransition",void 0===e.perspectiveProperty&&void 0===e.webkitPerspective&&(i.animType=!1)),void 0!==e.msTransform&&(i.animType="msTransform",i.transformType="-ms-transform",i.transitionType="msTransition",void 0===e.msTransform&&(i.animType=!1)),void 0!==e.transform&&!1!==i.animType&&(i.animType="transform",i.transformType="transform",i.transitionType="transition"),i.transformsEnabled=i.options.useTransform&&null!==i.animType&&!1!==i.animType},e.prototype.setSlideClasses=function(i){var e,t,o,s,n=this;if(t=n.$slider.find(".slick-slide").removeClass("slick-active slick-center slick-current").attr("aria-hidden","true"),n.$slides.eq(i).addClass("slick-current"),!0===n.options.centerMode){var r=n.options.slidesToShow%2==0?1:0;e=Math.floor(n.options.slidesToShow/2),!0===n.options.infinite&&(i>=e&&i<=n.slideCount-1-e?n.$slides.slice(i-e+r,i+e+1).addClass("slick-active").attr("aria-hidden","false"):(o=n.options.slidesToShow+i,t.slice(o-e+1+r,o+e+2).addClass("slick-active").attr("aria-hidden","false")),0===i?t.eq(t.length-1-n.options.slidesToShow).addClass("slick-center"):i===n.slideCount-1&&t.eq(n.options.slidesToShow).addClass("slick-center")),n.$slides.eq(i).addClass("slick-center")}else i>=0&&i<=n.slideCount-n.options.slidesToShow?n.$slides.slice(i,i+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"):t.length<=n.options.slidesToShow?t.addClass("slick-active").attr("aria-hidden","false"):(s=n.slideCount%n.options.slidesToShow,o=!0===n.options.infinite?n.options.slidesToShow+i:i,n.options.slidesToShow==n.options.slidesToScroll&&n.slideCount-i<n.options.slidesToShow?t.slice(o-(n.options.slidesToShow-s),o+s).addClass("slick-active").attr("aria-hidden","false"):t.slice(o,o+n.options.slidesToShow).addClass("slick-active").attr("aria-hidden","false"));"ondemand"!==n.options.lazyLoad&&"anticipated"!==n.options.lazyLoad||n.lazyLoad()},e.prototype.setupInfinite=function(){var e,t,o,s=this;if(!0===s.options.fade&&(s.options.centerMode=!1),!0===s.options.infinite&&!1===s.options.fade&&(t=null,s.slideCount>s.options.slidesToShow)){for(o=!0===s.options.centerMode?s.options.slidesToShow+1:s.options.slidesToShow,e=s.slideCount;e>s.slideCount-o;e-=1)t=e-1,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t-s.slideCount).prependTo(s.$slideTrack).addClass("slick-cloned");for(e=0;e<o+s.slideCount;e+=1)t=e,i(s.$slides[t]).clone(!0).attr("id","").attr("data-slick-index",t+s.slideCount).appendTo(s.$slideTrack).addClass("slick-cloned");s.$slideTrack.find(".slick-cloned").find("[id]").each(function(){i(this).attr("id","")})}},e.prototype.interrupt=function(i){var e=this;i||e.autoPlay(),e.interrupted=i},e.prototype.selectHandler=function(e){var t=this,o=i(e.target).is(".slick-slide")?i(e.target):i(e.target).parents(".slick-slide"),s=parseInt(o.attr("data-slick-index"));s||(s=0),t.slideCount<=t.options.slidesToShow?t.slideHandler(s,!1,!0):t.slideHandler(s)},e.prototype.slideHandler=function(i,e,t){var o,s,n,r,l,d=null,a=this;if(e=e||!1,!(!0===a.animating&&!0===a.options.waitForAnimate||!0===a.options.fade&&a.currentSlide===i))if(!1===e&&a.asNavFor(i),o=i,d=a.getLeft(o),r=a.getLeft(a.currentSlide),a.currentLeft=null===a.swipeLeft?r:a.swipeLeft,!1===a.options.infinite&&!1===a.options.centerMode&&(i<0||i>a.getDotCount()*a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else if(!1===a.options.infinite&&!0===a.options.centerMode&&(i<0||i>a.slideCount-a.options.slidesToScroll))!1===a.options.fade&&(o=a.currentSlide,!0!==t?a.animateSlide(r,function(){a.postSlide(o)}):a.postSlide(o));else{if(a.options.autoplay&&clearInterval(a.autoPlayTimer),s=o<0?a.slideCount%a.options.slidesToScroll!=0?a.slideCount-a.slideCount%a.options.slidesToScroll:a.slideCount+
vendor: 5,058 bytes, line 1682
1682o:o>=a.slideCount?a.slideCount%a.options.slidesToScroll!=0?0:o-a.slideCount:o,a.animating=!0,a.$slider.trigger("beforeChange",[a,a.currentSlide,s]),n=a.currentSlide,a.currentSlide=s,a.setSlideClasses(a.currentSlide),a.options.asNavFor&&(l=(l=a.getNavTarget()).slick("getSlick")).slideCount<=l.options.slidesToShow&&l.setSlideClasses(a.currentSlide),a.updateDots(),a.updateArrows(),!0===a.options.fade)return!0!==t?(a.fadeSlideOut(n),a.fadeSlide(s,function(){a.postSlide(s)})):a.postSlide(s),void a.animateHeight();!0!==t?a.animateSlide(d,function(){a.postSlide(s)}):a.postSlide(s)}},e.prototype.startLoad=function(){var i=this;!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&(i.$prevArrow.hide(),i.$nextArrow.hide()),!0===i.options.dots&&i.slideCount>i.options.slidesToShow&&i.$dots.hide(),i.$slider.addClass("slick-loading")},e.prototype.swipeDirection=function(){var i,e,t,o,s=this;return i=s.touchObject.startX-s.touchObject.curX,e=s.touchObject.startY-s.touchObject.curY,t=Math.atan2(e,i),(o=Math.round(180*t/Math.PI))<0&&(o=360-Math.abs(o)),o<=45&&o>=0?!1===s.options.rtl?"left":"right":o<=360&&o>=315?!1===s.options.rtl?"left":"right":o>=135&&o<=225?!1===s.options.rtl?"right":"left":!0===s.options.verticalSwiping?o>=35&&o<=135?"down":"up":"vertical"},e.prototype.swipeEnd=function(i){var e,t,o=this;if(o.dragging=!1,o.swiping=!1,o.scrolling)return o.scrolling=!1,!1;if(o.interrupted=!1,o.shouldClick=!(o.touchObject.swipeLength>10),void 0===o.touchObject.curX)return!1;if(!0===o.touchObject.edgeHit&&o.$slider.trigger("edge",[o,o.swipeDirection()]),o.touchObject.swipeLength>=o.touchObject.minSwipe){switch(t=o.swipeDirection()){case"left":case"down":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide+o.getSlideCount()):o.currentSlide+o.getSlideCount(),o.currentDirection=0;break;case"right":case"up":e=o.options.swipeToSlide?o.checkNavigable(o.currentSlide-o.getSlideCount()):o.currentSlide-o.getSlideCount(),o.currentDirection=1}"vertical"!=t&&(o.slideHandler(e),o.touchObject={},o.$slider.trigger("swipe",[o,t]))}else o.touchObject.startX!==o.touchObject.curX&&(o.slideHandler(o.currentSlide),o.touchObject={})},e.prototype.swipeHandler=function(i){var e=this;if(!(!1===e.options.swipe||"ontouchend"in document&&!1===e.options.swipe||!1===e.options.draggable&&-1!==i.type.indexOf("mouse")))switch(e.touchObject.fingerCount=i.originalEvent&&void 0!==i.originalEvent.touches?i.originalEvent.touches.length:1,e.touchObject.minSwipe=e.listWidth/e.options.touchThreshold,!0===e.options.verticalSwiping&&(e.touchObject.minSwipe=e.listHeight/e.options.touchThreshold),i.data.action){case"start":e.swipeStart(i);break;case"move":e.swipeMove(i);break;case"end":e.swipeEnd(i)}},e.prototype.swipeMove=function(i){var e,t,o,s,n,r,l=this;return n=void 0!==i.originalEvent?i.originalEvent.touches:null,!(!l.dragging||l.scrolling||n&&1!==n.length)&&(e=l.getLeft(l.currentSlide),l.touchObject.curX=void 0!==n?n[0].pageX:i.clientX,l.touchObject.curY=void 0!==n?n[0].pageY:i.clientY,l.touchObject.swipeLength=Math.round(Math.sqrt(Math.pow(l.touchObject.curX-l.touchObject.startX,2))),r=Math.round(Math.sqrt(Math.pow(l.touchObject.curY-l.touchObject.startY,2))),!l.options.verticalSwiping&&!l.swiping&&r>4?(l.scrolling=!0,!1):(!0===l.options.verticalSwiping&&(l.touchObject.swipeLength=r),t=l.swipeDirection(),void 0!==i.originalEvent&&l.touchObject.swipeLength>4&&(l.swiping=!0,i.preventDefault()),s=(!1===l.options.rtl?1:-1)*(l.touchObject.curX>l.touchObject.startX?1:-1),!0===l.options.verticalSwiping&&(s=l.touchObject.curY>l.touchObject.startY?1:-1),o=l.touchObject.swipeLength,l.touchObject.edgeHit=!1,!1===l.options.infinite&&(0===l.currentSlide&&"right"===t||l.currentSlide>=l.getDotCount()&&"left"===t)&&(o=l.touchObject.swipeLength*l.options.edgeFriction,l.touchObject.edgeHit=!0),!1===l.options.vertical?l.swipeLeft=e+o*s:l.swipeLeft=e+o*(l.$list.height()/l.listWidth)*s,!0===l.options.verticalSwiping&&(l.swipeLeft=e+o*s),!0!==l.options.fade&&!1!==l.options.touchMove&&(!0===l.animating?(l.swipeLeft=null,!1):void l.setCSS(l.swipeLeft))))},e.prototype.swipeStart=function(i){var e,t=this;if(t.interrupted=!0,1!==t.touchObject.fingerCount||t.slideCount<=t.options.slidesToShow)return t.touchObject={},!1;void 0!==i.originalEvent&&void 0!==i.originalEvent.touches&&(e=i.originalEvent.touches[0]),t.touchObject.startX=t.touchObject.curX=void 0!==e?e.pageX:i.clientX,t.touchObject.startY=t.touchObject.curY=void 0!==e?e.pageY:i.clientY,t.dragging=!0},e.prototype.unfilterSlides=e.prototype.slickUnfilter=function(){var i=this;null!==i.$slidesCache&&(i.unload(),i.$slideTrack.children(this.options.slide).detach(),i.$slidesCache.appendTo(i.$slideTrack),i.reinit())},e.prototype.unload=function(){var e=this;i(".slick-cloned",e.$slider).remove(),e.$dots&&e.$dots.remove(),e.$prevArrow&&e.htmlExpr.test(e.options.prevArrow)&&e.$prevArrow.remove(),e.$nextArrow&&e.htmlExpr.test(e.options.nextArrow)&&e.$nextArrow.remove(),e.$slides.removeClass("slick-slide slick-active slick-visible slick-current").attr("aria-hidden","true").css("width","")}
1682,e.prototype.unslick=function(i){var e=this;e.$slider.trigger("unslick",[e,i]),e.destroy()},e.prototype.updateArrows=function(){var i=this;Math.floor(i.options.slidesToShow/2),!0===i.options.arrows&&i.slideCount>i.options.slidesToShow&&!i.options.infinite&&(i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false"),0===i.currentSlide?(i.$prevArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$nextArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-i.options.slidesToShow&&!1===i.options.centerMode?(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")):i.currentSlide>=i.slideCount-1&&!0===i.options.centerMode&&(i.$nextArrow.addClass("slick-disabled").attr("aria-disabled","true"),i.$prevArrow.removeClass("slick-disabled").attr("aria-disabled","false")))},e.prototype.updateDots=function(){var i=this;null!==i.$dots&&(i.$dots.find("li").removeClass("slick-active").end(),i.$dots.find("li").eq(Math.floor(i.currentSlide/i.options.slidesToScroll)).addClass("slick-active"))},e.prototype.visibility=function(){var i=this;i.options.autoplay&&(document[i.hidden]?i.interrupted=!0:i.interrupted=!1)},i.fn.slick=function(){var i,t,o=this,s=arguments[0],n=Array.prototype.slice.call(arguments,1),r=o.length;for(i=0;i<r;i++)if("object"==typeof s||void 0===s?o[i].slick=new e(o[i],s):t=o[i].slick[s].apply(o[i].slick,n),void 0!==t)return t;return o}}); 1683;/** 1684 * Sticky Header 1685 * Adds a class to header on scroll 1686 */ 1687 1688jQuery(document).on("scroll", function () { 1689 1690 if (jQuery(document).scrollTop() > 0) { 1691 jQuery("header, body").addClass("shrink"); 1692 } else { 1693 jQuery("header, body").removeClass("shrink"); 1694 } 1695 1696}); 1697 1698/** 1699 * Document Ready Function 1700 * Triggered when document get's ready 1701 */ 1702jQuery(document).ready(function (jQuery) { 1703 1704// var mylist = jQuery('ul.pt-body'); 1705// var listitems = mylist.children('li').get(); 1706// listitems.sort(function(a, b) { 1707// var compA = jQuery(a).text().toUpperCase(); 1708// var compB = jQuery(b).text().toUpperCase(); 1709// return (compA < compB) ? -1 : (compA > compB) ? 1 : 0; 1710// }) 1711// jQuery.each(listitems, function(idx, itm) { mylist.append(itm); }); 1712 1713 /** 1714 * Start Search Toggle 1715 */ 1716 jQuery(".top-search img").click(function () { 1717 jQuery(".search-area").toggleClass("open"); 1718 }); 1719 jQuery.noConflict(); 1720 1721 setInterval(() => { 1722 jQuery('.pt-ctn').each(function () { 1723 let items = []; 1724 let shuffledArray = []; 1725 let html = ''; 1726 jQuery(this).find('.pt-cta-template').find('.s-partner-template').each(function () { 1727 items.push(jQuery(this).html()); 1728 }) 1729 shuffledArray = randomArrayShuffle(items); 1730 jQuery(shuffledArray).each(function (i, image_url) { 1731 image_url = image_url.replace(/\s/g, ''); 1732 1733 if (image_url != "") { 1734 html += '<div class="s-partner"><img src="' + image_url + '" alt="Logo"></div>' 1735 } else { 1736 html += '<div class="s-partner"></div>' 1737 } 1738 }) 1739 1740 jQuery(this).find('#append-new-random').html(html); 1741 jQuery('.s-partner').find('img').hide().fadeOut(1000).fadeIn(1000); 1742 }) 1743 }, 5000); 1744 1745 1746 function randomArrayShuffle(array) { 1747 var currentIndex = array.length, temporaryValue, randomIndex; 1748 while (0 !== currentIndex) { 1749 randomIndex = Math.floor(Math.random() * currentIndex); 1750 currentIndex -= 1; 1751 temporaryValue = array[currentIndex]; 1752 array[currentIndex] = array[randomIndex]; 1753 array[randomIndex] = temporaryValue; 1754 } 1755 return array; 1756 } 1757 1758 /** 1759 * Toggle menu for mobile 1760 */ 1761 jQuery(".menu-btn").click(function () { 1762 jQuery(this).toggleClass("active"); 1763 jQuery(".nav-overlay").toggleClass("open"); 1764 jQuery("html, body").toggleClass("no-overflow"); 1765 jQuery(".header-nav ul li.active").removeClass("active"); 1766 jQuery(".header-nav ul.sub-menu").slideUp(); 1767 }); 1768 1769 /** 1770 * Add span tag to multi-level accordion menu for mobile menus 1771 */ 1772 jQuery("li").each(function () { 1773 if (jQuery(this).hasClass("menu-item-has-children")) { 1774 jQuery(this).prepend('<span class="submenu-icon"></span>'); 1775 } 1776 }); 1777 1778 /** 1779 * Slide Up/Down internal sub-menu when mobile menu arrow clicked 1780 */ 1781 jQuery(".header-nav .submenu-icon").click(function () { 1782 const link = jQuery(this); 1783 const closestUl = link.closest("ul");
1784 const parallelActiveLinks = closestUl.find(".active"); 1785 const closestLi = link.closest("li"); 1786 const linkStatus = closestLi.hasClass("active"); 1787 let count = 0; 1788 1789 closestUl.find("ul").slideUp(function () { 1790 if (++count === closestUl.find("ul").length) { 1791 parallelActiveLinks.removeClass("active"); 1792 } 1793 }); 1794 1795 if (!linkStatus) { 1796 closestLi.children("ul").slideDown(); 1797 closestLi.addClass("active"); 1798 } 1799 }); 1800 1801 1802 // Mega menu script 1803 1804 /** 1805 * Add span tag to multi-level accordion menu for mobile menus 1806 */ 1807 1808 1809 jQuery.noConflict(); 1810 //mega menu 1811 jQuery(".has-mega-menu").click(function () { 1812 if (jQuery(this).hasClass("active")) { 1813 1814 jQuery(this).removeClass("active"); 1815 jQuery(this).parents().find('section.page-content').removeClass('bg-overlay'); 1816 jQuery(this) 1817 .children(".mega-menu") 1818 .fadeOut(250); 1819 } else { 1820 jQuery('.has-mega-menu').each(function () { 1821 jQuery(this).removeClass('active'); 1822 jQuery(this).find('.mega-menu').hide(); 1823 }) 1824 jQuery(this).addClass("active"); 1825 jQuery(this).parents().find('section.page-content').addClass('bg-overlay'); 1826 jQuery(this) 1827 .children(".mega-menu") 1828 .fadeIn(250); 1829 } 1830 1831 }); 1832 // jQuery(".has-mega-menu").click(function() { 1833 // jQuery(this).removeClass("active"); 1834 // jQuery(this).parents().find('section.page-content').removeClass('bg-overlay'); 1835 // jQuery(this) 1836 // .children(".mega-menu") 1837 // .fadeOut(250); 1838 // }); 1839 1840 var index = 0; 1841 var total = jQuery("li").length; 1842 1843 jQuery.noConflict(); 1844 1845 // FAQ script 1846 1847 jQuery(".faq > span").on("click", function () { 1848 if (jQuery(this).hasClass("active")) { 1849 jQuery(this).removeClass("active"); 1850 jQuery(this) 1851 .siblings(".faq-content") 1852 .slideUp(); 1853 } else { 1854 jQuery(".faq > span").removeClass("active"); 1855 jQuery(this).addClass("active"); 1856 jQuery(".faq-content").slideUp(); 1857 jQuery(this) 1858 .siblings(".faq-content") 1859 .slideDown(); 1860 } 1861 }); 1862 jQuery.noConflict(); 1863 // Slick Slider 1864 1865 jQuery('.iat-content-slider').slick({ 1866 slidesToShow: 1, 1867 slidesToScroll: 1, 1868 dots: true, 1869 arrows: false, 1870 fade: true, 1871 asNavFor: '.iat-images-slider' 1872 }); 1873 jQuery('.iat-images-slider').slick({ 1874 slidesToShow: 1, 1875 slidesToScroll: 1, 1876 asNavFor: '.iat-content-slider', 1877 arrows: false, 1878 focusOnSelect: true 1879 }); 1880 1881 jQuery(document).on('click','.search-open',function(){ 1882 jQuery('.search-area').addClass('open'); 1883 }); 1884 1885 1886 // On Simple Sorting 1887 // function Sorting() { 1888 // //Sorting Values 1889 // var mylist = jQuery('ul.pt-body'); 1890 // var listitems = mylist.children('li').get(); 1891 // listitems.sort(function(a, b) { 1892 // var compA = jQuery(a).text().toUpperCase(); 1893 // var compB = jQuery(b).text().toUpperCase(); 1894 // return (compA < compB) ? -1 : (compA > compB) ? 1 : 0; 1895 // }) 1896 1897 // jQuery.each(listitems, function(idx, itm) { mylist.append(itm); }); 1898 // } 1899 function SortingV2(parent,li,item,depth=0) { 1900 var mylist = jQuery(parent); 1901 if(mylist.length>0){ 1902 var classes=[]; 1903 var buffer=[]; 1904 if(li==-1){ 1905 var listitems = mylist; 1906 listitems.sort(function(a, b) { 1907 var compA = jQuery(a).find(item).find('a').text(); 1908 var compB = jQuery(b).find(item).find('a').text(); 1909 return (compA < compB) ? -1 : 1 ; 1910 }); 1911 }else{ 1912 var listitems = mylist.children(li); 1913 1914 listitems.sort(function(a, b) { 1915 var compA = jQuery(a).find(item).text(); 1916 var compB = jQuery(b).find(item).text(); 1917 return (compA < compB) ? -1 : 1 ; 1918 }); 1919 } 1920 1921 jQuery.each(listitems, function(idx, itm) { 1922 var TopicLetter=jQuery(itm).find(item).text().trim().split('')[0]; 1923 if(li==-1){ 1924 jQuery(itm).addClass('TitleLetter-'+TopicLetter); 1925 mylist.parent('.pt-body').append(itm); 1926 }else{ 1927 jQuery(itm).addClass('TopicLetter-'+TopicLetter); 1928 mylist.append(itm); 1929 if(jQuery.inArray('TopicLetter-'+TopicLetter,buffer)==-1){ 1930 classes.push('TopicLetter-'+TopicLetter); 1931 } 1932 buffer.push('TopicLetter-'+TopicLetter); 1933 } 1934 }); 1935 for (const key in classes) { 1936 const element = classes[key]; 1937 if(depth==0){ 1938 SortingV2('.'+element,-1,'.col-1',depth+1); 1939 } 1940 } 1941 1942 } 1943 } 1944 jQuery(document).ready(function () { 1945 // Sorting(); 1946 // SortingV2('#pt-lib','li','.col-4'); 1947 // SortingV2('#pt-pro','li','.col-2'); 1948 // SortingV2('#resource-container-ajax','li','.col-3'); 1949 }) 1950 1951 1952 // Resource Ajax Function -> Start 1953 jQuery(document).on('click keyup', '.resource-ajaxfilter-element', function () { 1954 var topic = ''; 1955 var audience = ''; 1956 var grade_level = ''; 1957 var search = ''; 1958 1959 var type = jQuery(this).attr('data-ajax-type'); 1960 1961 jQuery('.resource-ajaxfilter-element').each(function () { 1962 if (jQuery(this).attr('data-ajax-type') == type) { 1963 jQuery(this).removeClass('active'); 1964 } 1965 }) 1966 1967 if (jQuery(this).attr('active') == 'active') { 1968 jQuery(this).removeClass('active'); 1969 jQuery(this).parents('.has-mega-menu').removeClass('active-line'); 1970 jQuery(this).attr('active', ''); 1971 } else { 1972 jQuery(this).addClass('active'); 1973 jQuery(this).parents('.has-mega-menu').addClass('active-line'); 1974 jQuery(this).attr('active', 'active'); 1975 } 1976 1977 jQuery('.resource-ajaxfilter-element').each(function () { 1978 if (jQuery(this).attr('data-ajax-type') == 'topic') { 1979 if (jQuery(this).attr('data-ajax-value') != '') { 1980 if (jQuery(this).hasClass('active')) { 1981 topic = jQuery(this).attr('data-ajax-value'); 1982 } 1983 } 1984 } else if (jQuery(this).attr('data-ajax-type') == 'audience') { 1985 if (jQuery(this).attr('data-ajax-value') != '') { 1986 if (jQuery(this).hasClass('active')) { 1987 audience = jQuery(this).attr('data-ajax-value'); 1988 } 1989 } 1990 } else if (jQuery(this).attr('data-ajax-type') == 'grade-level') { 1991 if (jQuery(this).attr('data-ajax-value') != '') { 1992 if (jQuery(this).hasClass('active')) { 1993 grade_level = jQuery(this).attr('data-ajax-value'); 1994 } 1995 } 1996 } else if (jQuery(this).attr('data-ajax-type') == 'search') { 1997 if (jQuery(this).attr('data-ajax-value') != '') { 1998 search = jQuery(this).val(); 1999 } 2000 } 2001 }) 2002 if (history.pushState) { 2003 var oldurl= window.location.protocol + "//" + window.location.host + window.location.pathname ; 2004 var url=oldurl+'?'; 2005 if(topic){ 2006 url+='&topic='+topic; 2007 } 2008 if(audience){ 2009 url+='&audience='+audience; 2010 } 2011 if(grade_level){ 2012 url+='&grade_level='+grade_level; 2013 } 2014 if(search){ 2015 url+='&search='+search; 2016 } 2017 window.history.pushState({path:url},'',url); 2018 } 2019 jQuery('#resource-basecontainer-ajax').html(""); 2020 jQuery('.lds-roller').show(); 2021 jQuery.ajax({ 2022 url: localVars.ajax_url, 2023 type: 'post', 2024 dataType: "json", 2025 data: { 2026 action: 'resource_ajax_filter', 2027 items: [topic, audience, grade_level, search], 2028 }, 2029 success(response) { 2030 2031 jQuery('#resource-basecontainer-ajax').html(response.html); 2032 jQuery('#filter-tag-ajax').html(response.tags); 2033 if (response.if_all === true) { 2034 jQuery('#count-ajax').html(jQuery('#count-ajax').attr('data-backup')); 2035 } else { 2036 if (response.full_count > 0) { 2037 jQuery('#count-ajax').html('Browse <span> ' + response.full_count + ' results</span> '); 2038 } else { 2039 jQuery('#count-ajax').html('<span> ' + response.count + ' results</span> '); 2040 } 2041 } 2042 jQuery('.resource-ajaxfilter-element').attr('active', ''); 2043 //Sorting Values 2044 // SortingV2('#resource-container-ajax','li','.col-3'); 2045 jQuery('.lds-roller').hide(); 2046 }, 2047 }); 2048 2049 }); 2050 jQuery(document).on('click', '.cross-resource-ajax', function () { 2051 var topic = ''; 2052 var audience = ''; 2053 var grade_level = ''; 2054 var search = ''; 2055 var slug = jQuery(this).parents('.filter-title').attr('data-selected-filter'); 2056 var type = jQuery(this).parents('.filter-title').attr('data-type');
2057 if (type == 'topic') { 2058 jQuery('.resource-ajaxfilter-element[data-ajax-type="topic"][data-ajax-value="' + slug + '"]').removeClass('active'); 2059 jQuery('.resource-ajaxfilter-element[data-ajax-type="topic"][data-ajax-value="' + slug + '"]').parents('.has-mega-menu').removeClass('active-line'); 2060 2061 } 2062 if (type == 'audience') { 2063 jQuery('.resource-ajaxfilter-element[data-ajax-type="audience"][data-ajax-value="' + slug + '"]').removeClass('active'); 2064 jQuery('.resource-ajaxfilter-element[data-ajax-type="audience"][data-ajax-value="' + slug + '"]').parents('.has-mega-menu').removeClass('active-line'); 2065 } 2066 if (type == 'grade-level') { 2067 jQuery('.resource-ajaxfilter-element[data-ajax-type="grade-level"][data-ajax-value="' + slug + '"]').removeClass('active'); 2068 jQuery('.resource-ajaxfilter-element[data-ajax-type="grade-level"][data-ajax-value="' + slug + '"]').parents('.has-mega-menu').removeClass('active-line'); 2069 } 2070 if (type == 'search') { 2071 jQuery('.search-area').removeClass('open'); 2072 jQuery('.search-area').find('.resource-ajaxfilter-element').val(''); 2073 } 2074 2075 jQuery('.resource-ajaxfilter-element').each(function () { 2076 if (jQuery(this).attr('data-ajax-type') == 'topic') { 2077 if (jQuery(this).attr('data-ajax-value') != '') { 2078 if (jQuery(this).hasClass('active')) { 2079 topic = jQuery(this).attr('data-ajax-value'); 2080 } 2081 } 2082 } else if (jQuery(this).attr('data-ajax-type') == 'audience') { 2083 if (jQuery(this).attr('data-ajax-value') != '') { 2084 if (jQuery(this).hasClass('active')) { 2085 audience = jQuery(this).attr('data-ajax-value'); 2086 } 2087 } 2088 } else if (jQuery(this).attr('data-ajax-type') == 'grade-level') { 2089 if (jQuery(this).attr('data-ajax-value') != '') { 2090 if (jQuery(this).hasClass('active')) { 2091 grade_level = jQuery(this).attr('data-ajax-value'); 2092 } 2093 } 2094 } else if (jQuery(this).attr('data-ajax-type') == 'search') { 2095 if (jQuery(this).attr('data-ajax-value') != '') { 2096 search = jQuery(this).val(); 2097 } 2098 } 2099 }) 2100 if (history.pushState) { 2101 var oldurl= window.location.protocol + "//" + window.location.host + window.location.pathname ; 2102 var url=oldurl+'?'; 2103 if(topic){ 2104 url+='&topic='+topic; 2105 } 2106 if(audience){ 2107 url+='&audience='+audience; 2108 } 2109 if(grade_level){ 2110 url+='&grade_level='+grade_level; 2111 } 2112 if(search){ 2113 url+='&search='+search; 2114 } 2115 window.history.pushState({path:url},'',url); 2116 } 2117 jQuery('#resource-basecontainer-ajax').html(""); 2118 jQuery('.lds-roller').show(); 2119 jQuery.ajax({ 2120 url: localVars.ajax_url, 2121 type: 'post', 2122 dataType: "json", 2123 data: { 2124 action: 'resource_ajax_filter', 2125 items: [topic, audience, grade_level, search], 2126 }, 2127 success(response) { 2128 2129 jQuery('#resource-basecontainer-ajax').html(response.html); 2130 jQuery('#filter-tag-ajax').html(response.tags); 2131 if (response.if_all === true) { 2132 jQuery('#count-ajax').html(jQuery('#count-ajax').attr('data-backup')); 2133 } else { 2134 if (response.full_count > 0) { 2135 if (response.full_count > 0) { 2136 jQuery('#count-ajax').html('Browse <span> ' + response.full_count + ' results</span> '); 2137 } else { 2138 jQuery('#count-ajax').html('<span> ' + response.count + ' results</span> '); 2139 } 2140 } else { 2141 jQuery('#count-ajax').html('<span> ' + response.count + ' results</span> '); 2142 } 2143 } 2144 //Sorting Values 2145 // SortingV2('#resource-container-ajax','li','.col-3'); 2146 jQuery('.lds-roller').hide(); 2147 }, 2148 }); 2149 2150 jQuery(this).parents('.filter-title').remove(); 2151 2152 }); 2153 jQuery(document).on('click', '.ajax-resources-pagination', function () { 2154 var page = jQuery(this).attr('data-page'); 2155 var audience = jQuery(this).attr('data-audience'); 2156 var topic = jQuery(this).attr('data-topic'); 2157 var grade_level = jQuery(this).attr('data-grade-level'); 2158 var search = jQuery(this).attr('data-search'); 2159 if (history.pushState) { 2160 var oldurl= window.location.protocol + "//" + window.location.host + window.location.pathname ; 2161 var url=oldurl+'?'; 2162 if(topic){ 2163 url+='&topic='+topic; 2164 } 2165 if(audience){ 2166 url+='&audience='+audience; 2167 } 2168 if(grade_level){ 2169 url+='&grade_level='+grade_level; 2170 } 2171 if(search){ 2172 url+='&search='+search; 2173 } 2174 if(page){ 2175 url+='¤t_page='+page; 2176 } 2177 window.history.pushState({path:url},'',url); 2178 } 2179 jQuery('#resource-basecontainer-ajax').html(""); 2180 jQuery('.lds-roller').show(); 2181 jQuery.ajax({ 2182 url: localVars.ajax_url, 2183 type: "post", 2184 dataType: "json", 2185 data: { 2186 action: "resource_ajax_filter", 2187 items: [topic, audience, grade_level, search], 2188 page: page 2189 }, 2190 success(response) { 2191 jQuery('#resource-basecontainer-ajax').html(response.html); 2192 jQuery('#filter-tag-ajax').html(response.tags); 2193 if (response.if_all === true) { 2194 jQuery('#count-ajax').html(jQuery('#count-ajax').attr('data-backup')); 2195 } else { 2196 if (response.full_count > 0) { 2197 jQuery('#count-ajax').html('Browse <span> ' + response.full_count + ' results</span> '); 2198 } else { 2199 jQuery('#count-ajax').html('<span> ' + response.count + ' results</span> '); 2200 } 2201 } 2202 //Sorting Values 2203 // SortingV2('#resource-container-ajax','li','.col-3'); 2204 jQuery('.lds-roller').hide(); 2205 }, 2206 }); 2207 }); 2208 // Resource Ajax Function -> End 2209 2210 // Project Ajax Function -> Start 2211 jQuery(document).on('click keyup', '.project-ajaxfilter-element', function () { 2212 var type = jQuery(this).attr('data-ajax-type'); 2213 var topic = ''; 2214 var status = ''; 2215 var search = ''; 2216 2217 jQuery('.project-ajaxfilter-element').each(function () { 2218 if (jQuery(this).attr('data-ajax-type') == type) { 2219 jQuery(this).removeClass('active'); 2220 } 2221 }); 2222 2223 if (jQuery(this).attr('active') == 'active') { 2224 jQuery(this).removeClass('active'); 2225 jQuery(this).parents('.has-mega-menu').removeClass('active-line'); 2226 jQuery(this).attr('active', ''); 2227 } else { 2228 jQuery(this).addClass('active'); 2229 jQuery(this).parents('.has-mega-menu').addClass('active-line'); 2230 jQuery(this).attr('active', 'active'); 2231 } 2232 2233 jQuery('.project-ajaxfilter-element').each(function () { 2234 if (jQuery(this).attr('data-ajax-type') == 'topic') { 2235 if (jQuery(this).attr('data-ajax-value') != '') { 2236 if (jQuery(this).hasClass('active')) { 2237 topic = jQuery(this).attr('data-ajax-value'); 2238 } 2239 } 2240 } else if (jQuery(this).attr('data-ajax-type') == 'status') { 2241 if (jQuery(this).attr('data-ajax-value') != '') { 2242 if (jQuery(this).hasClass('active')) { 2243 status = jQuery(this).attr('data-ajax-value'); 2244 } 2245 } 2246 } else if (jQuery(this).attr('data-ajax-type') == 'search') { 2247 if (jQuery(this).attr('data-ajax-value') != '') { 2248 search = jQuery(this).val(); 2249 } 2250 } 2251 }) 2252 if (history.pushState) { 2253 var oldurl= window.location.protocol + "//" + window.location.host + window.location.pathname ; 2254 var url=oldurl+'?'; 2255 if(topic){ 2256 url+='&topic='+topic; 2257 } 2258 if(status){ 2259 url+='&status='+status; 2260 } 2261 if(search){ 2262 url+='&search='+search; 2263 } 2264 window.history.pushState({path:url},'',url); 2265 } 2266 jQuery('#project-basecontainer-ajax').html("");
2267 jQuery('#glide-pagination').html(""); 2268 jQuery('.lds-roller').show(); 2269 jQuery.ajax({ 2270 url: localVars.ajax_url, 2271 type: 'post', 2272 dataType: "json", 2273 data: { 2274 action: 'project_ajax_filter', 2275 items: [topic, status, search], 2276 }, 2277 success(response) { 2278 jQuery('#project-basecontainer-ajax').html(response.html); 2279 jQuery('#glide-pagination').html(response.pag); 2280 jQuery('#filter-tag-ajax').html(response.tags); 2281 if (response.if_all === true) { 2282 jQuery('#count-ajax').html(jQuery('#count-ajax').attr('data-backup')); 2283 } else { 2284 if (response.full_count > 0) { 2285 jQuery('#count-ajax').html('Browse <span> ' + response.full_count + ' results</span> '); 2286 } else { 2287 jQuery('#count-ajax').html('<span> ' + response.count + ' results</span> '); 2288 } 2289 } 2290 jQuery('.project-ajaxfilter-element').attr('active', ''); 2291 // SortingV2('#pt-pro','li','.col-2'); 2292 jQuery('.lds-roller').hide(); 2293 }, 2294 }); 2295 2296 2297 }); 2298 jQuery(document).on('click', '.ajax-project-pagination', function () { 2299 var page = jQuery(this).attr('data-page'); 2300 var topic = jQuery(this).attr('data-topic'); 2301 var status = jQuery(this).attr('data-status'); 2302 var search = jQuery(this).attr('data-search'); 2303 if (history.pushState) { 2304 var oldurl= window.location.protocol + "//" + window.location.host + window.location.pathname ; 2305 var url=oldurl+'?'; 2306 if(topic){ 2307 url+='&topic='+topic; 2308 } 2309 if(status){ 2310 url+='&status='+status; 2311 } 2312 if(search){ 2313 url+='&search='+search; 2314 } 2315 if(page){ 2316 url+='¤t_page='+page; 2317 } 2318 window.history.pushState({path:url},'',url); 2319 } 2320 jQuery('#project-basecontainer-ajax').html(""); 2321 jQuery('#glide-pagination').html(""); 2322 jQuery('.lds-roller').show(); 2323 jQuery.ajax({ 2324 url: localVars.ajax_url, 2325 type: "post", 2326 dataType: "json", 2327 data: { 2328 action: "project_ajax_filter", 2329 items: [topic, status, search], 2330 page: page 2331 }, 2332 success(response) { 2333 jQuery('#project-basecontainer-ajax').html(response.html); 2334 jQuery('#glide-pagination').html(response.pag); 2335 jQuery('#filter-tag-ajax').html(response.tags); 2336 if (response.if_all === true) { 2337 jQuery('#count-ajax').html(jQuery('#count-ajax').attr('data-backup')); 2338 } else { 2339 if (response.full_count > 0) { 2340 jQuery('#count-ajax').html('Browse <span> ' + response.full_count + ' results</span> '); 2341 } else { 2342 jQuery('#count-ajax').html('<span> ' + response.count + ' results</span> '); 2343 } 2344 } 2345 // SortingV2('#pt-pro','li','.col-2'); 2346 jQuery('.lds-roller').hide(); 2347 }, 2348 }); 2349 }); 2350 jQuery(document).on('click', '.cross-project-ajax', function () { 2351 var topic = ''; 2352 var status = ''; 2353 var search = ''; 2354 var slug = jQuery(this).parents('.filter-title').attr('data-selected-filter'); 2355 var type = jQuery(this).parents('.filter-title').attr('data-type'); 2356 if (type == 'topic') { 2357 jQuery('.project-ajaxfilter-element[data-ajax-type="topic"][data-ajax-value="' + slug + '"]').removeClass('active'); 2358 jQuery('.project-ajaxfilter-element[data-ajax-type="topic"][data-ajax-value="' + slug + '"]').parents('.has-mega-menu').removeClass('active-line'); 2359 } 2360 if (type == 'status') { 2361 jQuery('.project-ajaxfilter-element[data-ajax-type="status"][data-ajax-value="' + slug + '"]').removeClass('active'); 2362 jQuery('.project-ajaxfilter-element[data-ajax-type="status"][data-ajax-value="' + slug + '"]').parents('.has-mega-menu').removeClass('active-line'); 2363 } 2364 if (type == 'search') { 2365 jQuery('.search-area').removeClass('open'); 2366 jQuery('.search-area').find('.project-ajaxfilter-element').val(''); 2367 } 2368 2369 jQuery('.project-ajaxfilter-element').each(function () { 2370 if (jQuery(this).attr('data-ajax-type') == 'topic') { 2371 if (jQuery(this).attr('data-ajax-value') != '') { 2372 if (jQuery(this).hasClass('active')) { 2373 topic = jQuery(this).attr('data-ajax-value'); 2374 } 2375 } 2376 } else if (jQuery(this).attr('data-ajax-type') == 'status') { 2377 if (jQuery(this).attr('data-ajax-value') != '') { 2378 if (jQuery(this).hasClass('active')) { 2379 status = jQuery(this).attr('data-ajax-value'); 2380 } 2381 } 2382 } else if (jQuery(this).attr('data-ajax-type') == 'search') { 2383 if (jQuery(this).attr('data-ajax-value') != '') { 2384 search = jQuery(this).val(); 2385 } 2386 } 2387 }); 2388 if (history.pushState) { 2389 var oldurl= window.location.protocol + "//" + window.location.host + window.location.pathname ; 2390 var url=oldurl+'?'; 2391 if(topic){ 2392 url+='&topic='+topic; 2393 } 2394 if(status){ 2395 url+='&status='+status; 2396 } 2397 if(search){ 2398 url+='&search='+search; 2399 } 2400 window.history.pushState({path:url},'',url); 2401 } 2402 jQuery('#project-basecontainer-ajax').html("");
2403 jQuery('#glide-pagination').html(""); 2404 jQuery('.lds-roller').show(); 2405 jQuery.ajax({ 2406 url: localVars.ajax_url, 2407 type: 'post', 2408 dataType: "json", 2409 data: { 2410 action: 'project_ajax_filter', 2411 items: [topic, status, search], 2412 }, 2413 success(response) { 2414 jQuery('#project-basecontainer-ajax').html(response.html); 2415 jQuery('#glide-pagination').html(response.pag); 2416 jQuery('#filter-tag-ajax').html(response.tags); 2417 if (response.if_all === true) { 2418 jQuery('#count-ajax').html(jQuery('#count-ajax').attr('data-backup')); 2419 } else { 2420 if (response.full_count > 0) { 2421 // jQuery('#count-ajax').html('Browse <span> ' + response.full_count + ' results</span> '); 2422 jQuery('#count-ajax').html('Browse <span> ' + response.full_count + ' results</span> '); 2423 } else { 2424 jQuery('#count-ajax').html('<span> ' + response.count + ' results</span> '); 2425 } 2426 } 2427 // SortingV2('#pt-pro','li','.col-2'); 2428 jQuery('.lds-roller').hide(); 2429 }, 2430 }); 2431 2432 jQuery(this).parents('.filter-title').remove(); 2433 2434 }); 2435 // Project Ajax Function -> End 2436 2437 2438 // Library Ajax Function -> Start 2439 jQuery(document).on('click keyup', '.library-ajaxfilter-element', function () { 2440 var topic = ''; 2441 var audience = ''; 2442 var grade_level = ''; 2443 var search = ''; 2444 var type = jQuery(this).attr('data-ajax-type'); 2445 2446 jQuery('.library-ajaxfilter-element').each(function () { 2447 if (jQuery(this).attr('data-ajax-type') == type) { 2448 jQuery(this).removeClass('active'); 2449 } 2450 }) 2451 2452 if (jQuery(this).attr('active') == 'active') { 2453 jQuery(this).removeClass('active'); 2454 jQuery(this).parents('.has-mega-menu').removeClass('active-line'); 2455 jQuery(this).attr('active', ''); 2456 } else { 2457 jQuery(this).addClass('active'); 2458 jQuery(this).parents('.has-mega-menu').addClass('active-line'); 2459 jQuery(this).attr('active', 'active'); 2460 } 2461 2462 jQuery('.library-ajaxfilter-element').each(function () { 2463 if (jQuery(this).attr('data-ajax-type') == 'topic') { 2464 if (jQuery(this).attr('data-ajax-value') != '') { 2465 if (jQuery(this).hasClass('active')) { 2466 topic = jQuery(this).attr('data-ajax-value'); 2467 } 2468 } 2469 } else if (jQuery(this).attr('data-ajax-type') == 'audience') { 2470 if (jQuery(this).attr('data-ajax-value') != '') { 2471 if (jQuery(this).hasClass('active')) { 2472 audience = jQuery(this).attr('data-ajax-value'); 2473 } 2474 } 2475 } else if (jQuery(this).attr('data-ajax-type') == 'grade-level') { 2476 if (jQuery(this).attr('data-ajax-value') != '') { 2477 if (jQuery(this).hasClass('active')) { 2478 grade_level = jQuery(this).attr('data-ajax-value'); 2479 } 2480 } 2481 } else if (jQuery(this).attr('data-ajax-type') == 'search') { 2482 if (jQuery(this).attr('data-ajax-value') != '') { 2483 search = jQuery(this).val(); 2484 } 2485 } 2486 }) 2487 if (history.pushState) { 2488 var oldurl= window.location.protocol + "//" + window.location.host + window.location.pathname ; 2489 var url=oldurl+'?'; 2490 if(topic){ 2491 url+='&topic='+topic; 2492 } 2493 if(audience){ 2494 url+='&audience='+audience; 2495 } 2496 if(grade_level){ 2497 url+='&grade_level='+grade_level; 2498 } 2499 if(search){ 2500 url+='&search='+search; 2501 } 2502 window.history.pushState({path:url},'',url); 2503 } 2504 jQuery('#library-basecontainer-ajax').html(""); 2505 jQuery('.lds-roller').show(); 2506 jQuery.ajax({ 2507 url: localVars.ajax_url, 2508 type: 'post', 2509 dataType: "json", 2510 data: { 2511 action: 'library_ajax_filter', 2512 items: [topic, audience, grade_level, search], 2513 }, 2514 success(response) { 2515 2516 jQuery('#library-basecontainer-ajax').html(response.html); 2517 jQuery('#filter-tag-ajax').html(response.tags); 2518 if (response.if_all === true) { 2519 jQuery('#count-ajax').html(jQuery('#count-ajax').attr('data-backup')); 2520 } else { 2521 if (response.full_count > 0) { 2522 jQuery('#count-ajax').html('Browse <span> ' + response.full_count + ' results</span> '); 2523 } else { 2524 jQuery('#count-ajax').html('<span> ' + response.count + ' results</span> '); 2525 } 2526 } 2527 jQuery('.library-ajaxfilter-element').attr('active', ''); 2528 2529 //Sorting Values 2530 // SortingV2('#pt-lib','li','.col-4'); 2531 jQuery('.lds-roller').hide(); 2532 }, 2533 }); 2534 2535 }); 2536 jQuery(document).on('click', '.cross-library-ajax', function () { 2537 var topic = ''; 2538 var audience = ''; 2539 var grade_level = ''; 2540 var search = ''; 2541 var slug = jQuery(this).parents('.filter-title').attr('data-selected-filter'); 2542 var type = jQuery(this).parents('.filter-title').attr('data-type');
2543 if (type == 'topic') { 2544 jQuery('.library-ajaxfilter-element[data-ajax-type="topic"][data-ajax-value="' + slug + '"]').removeClass('active'); 2545 jQuery('.library-ajaxfilter-element[data-ajax-type="topic"][data-ajax-value="' + slug + '"]').parents('.has-mega-menu').removeClass('active-line'); 2546 } 2547 if (type == 'audience') { 2548 jQuery('.library-ajaxfilter-element[data-ajax-type="audience"][data-ajax-value="' + slug + '"]').removeClass('active'); 2549 jQuery('.library-ajaxfilter-element[data-ajax-type="audience"][data-ajax-value="' + slug + '"]').parents('.has-mega-menu').removeClass('active-line'); 2550 } 2551 if (type == 'grade-level') { 2552 jQuery('.library-ajaxfilter-element[data-ajax-type="grade-level"][data-ajax-value="' + slug + '"]').removeClass('active'); 2553 jQuery('.library-ajaxfilter-element[data-ajax-type="grade-level"][data-ajax-value="' + slug + '"]').parents('.has-mega-menu').removeClass('active-line'); 2554 } 2555 if (type == 'search') { 2556 jQuery('.search-area').removeClass('open'); 2557 jQuery('.search-area').find('.library-ajaxfilter-element').val(''); 2558 } 2559 2560 jQuery('.library-ajaxfilter-element').each(function () { 2561 if (jQuery(this).attr('data-ajax-type') == 'topic') { 2562 if (jQuery(this).attr('data-ajax-value') != '') { 2563 if (jQuery(this).hasClass('active')) { 2564 topic = jQuery(this).attr('data-ajax-value'); 2565 } 2566 } 2567 } else if (jQuery(this).attr('data-ajax-type') == 'audience') { 2568 if (jQuery(this).attr('data-ajax-value') != '') { 2569 if (jQuery(this).hasClass('active')) { 2570 audience = jQuery(this).attr('data-ajax-value'); 2571 } 2572 } 2573 } else if (jQuery(this).attr('data-ajax-type') == 'grade-level') { 2574 if (jQuery(this).attr('data-ajax-value') != '') { 2575 if (jQuery(this).hasClass('active')) { 2576 grade_level = jQuery(this).attr('data-ajax-value'); 2577 } 2578 } 2579 } else if (jQuery(this).attr('data-ajax-type') == 'search') { 2580 if (jQuery(this).attr('data-ajax-value') != '') { 2581 search = jQuery(this).val(); 2582 } 2583 } 2584 }) 2585 if (history.pushState) { 2586 var oldurl= window.location.protocol + "//" + window.location.host + window.location.pathname ; 2587 var url=oldurl+'?'; 2588 if(topic){ 2589 url+='&topic='+topic; 2590 } 2591 if(audience){ 2592 url+='&audience='+audience; 2593 } 2594 if(grade_level){ 2595 url+='&grade_level='+grade_level; 2596 } 2597 if(search){ 2598 url+='&search='+search; 2599 } 2600 window.history.pushState({path:url},'',url); 2601 } 2602 jQuery('#library-basecontainer-ajax').html(""); 2603 jQuery('.lds-roller').show(); 2604 jQuery.ajax({ 2605 url: localVars.ajax_url, 2606 type: 'post', 2607 dataType: "json", 2608 data: { 2609 action: 'library_ajax_filter', 2610 items: [topic, audience, grade_level, search], 2611 }, 2612 success(response) { 2613 2614 jQuery('#library-basecontainer-ajax').html(response.html); 2615 jQuery('#filter-tag-ajax').html(response.tags); 2616 if (response.if_all === true) { 2617 jQuery('#count-ajax').html(jQuery('#count-ajax').attr('data-backup')); 2618 } else { 2619 if (response.full_count > 0) { 2620 jQuery('#count-ajax').html('Browse <span> ' + response.full_count + ' results</span> '); 2621 } else { 2622 jQuery('#count-ajax').html('<span> ' + response.count + ' results</span> '); 2623 } 2624 } 2625 2626 //Sorting Values 2627 // SortingV2('#pt-lib','li','.col-4'); 2628 jQuery('.lds-roller').hide(); 2629 }, 2630 }); 2631 2632 jQuery(this).parents('.filter-title').remove(); 2633 2634 }); 2635 jQuery(document).on('click', '.ajax-library-pagination', function () { 2636 var page = jQuery(this).attr('data-page'); 2637 var audience = jQuery(this).attr('data-audience'); 2638 var topic = jQuery(this).attr('data-topic'); 2639 var grade_level = jQuery(this).attr('data-grade-level'); 2640 var search = jQuery(this).attr('data-search'); 2641 if (history.pushState) { 2642 var oldurl= window.location.protocol + "//" + window.location.host + window.location.pathname ; 2643 var url=oldurl+'?'; 2644 if(topic){ 2645 url+='&topic='+topic; 2646 } 2647 if(audience){ 2648 url+='&audience='+audience; 2649 } 2650 if(grade_level){ 2651 url+='&grade_level='+grade_level; 2652 } 2653 if(search){ 2654 url+='&search='+search; 2655 } 2656 if(page){ 2657 url+='¤t_page='+page; 2658 } 2659 window.history.pushState({path:url},'',url); 2660 } 2661 jQuery('#library-basecontainer-ajax').html(""); 2662 jQuery('.lds-roller').show(); 2663 jQuery.ajax({ 2664 url: localVars.ajax_url, 2665 type: "post", 2666 dataType: "json", 2667 data: { 2668 action: "library_ajax_filter", 2669 items: [topic, audience, grade_level, search], 2670 page: page 2671 }, 2672 success(response) { 2673 console.log(response.html); 2674 jQuery('#library-basecontainer-ajax').html(response.html); 2675 jQuery('#filter-tag-ajax').html(response.tags); 2676 if (response.if_all === true) { 2677 jQuery('#count-ajax').html(jQuery('#count-ajax').attr('data-backup')); 2678 } else { 2679 if (response.full_count > 0) { 2680 jQuery('#count-ajax').html('Browse <span> ' + response.full_count + ' results</span> '); 2681 } else { 2682 jQuery('#count-ajax').html('<span> ' + response.count + ' results</span> '); 2683 } 2684 } 2685 2686 //Sorting Values 2687 // SortingV2('#pt-lib','li','.col-4'); 2688 jQuery('.lds-roller').hide(); 2689 }, 2690 }); 2691 }); 2692 // Library Ajax Function -> End 2693 // News Ajax Function -> Start 2694 jQuery(document).on('click', '.ajax-news-pagination', function () { 2695 var page = jQuery(this).attr('data-page'); 2696 var year = jQuery(this).attr('data-year'); 2697 var search = jQuery(this).attr('data-search'); 2698 jQuery('#news-basecontainer-ajax').html(""); 2699 jQuery('.lds-roller').show(); 2700 if (history.pushState) { 2701 var oldurl= window.location.protocol + "//" + window.location.host + window.location.pathname ; 2702 var url=oldurl+'?'; 2703 if(page){ 2704 url+='¤t_page='+page; 2705 } 2706 if(search){ 2707 url+='&search='+search; 2708 } 2709 if(year){ 2710 url+='&news-year='+year; 2711 } 2712 window.history.pushState({path:url},'',url); 2713 } 2714 jQuery.ajax({ 2715 url: localVars.ajax_url, 2716 type: "post", 2717 dataType: "json", 2718 data: { 2719 action: "news_ajax_filter", 2720 items: [year, search], 2721 page: page 2722 }, 2723 success(response) { 2724 jQuery('.lds-roller').hide(); 2725 jQuery('#news-basecontainer-ajax').html(response.html); 2726 jQuery('#filter-tag-ajax').html(response.tags); 2727 if (response.if_all === true) { 2728 jQuery('#count-ajax').html(jQuery('#count-ajax').attr('data-backup')); 2729 } else { 2730 if (response.full_count > 0) { 2731 jQuery('#count-ajax').html('Browse <span> ' + response.full_count + ' results</span> '); 2732 } else { 2733 jQuery('#count-ajax').html('<span> ' + response.count + ' results</span> '); 2734 } 2735 } 2736 }, 2737 }); 2738 }); 2739 jQuery(document).on('click', '.cross-news-ajax', function () { 2740 var year = ''; 2741 var search = ''; 2742 var slug = jQuery(this).parents('.filter-title').attr('data-selected-filter'); 2743 var type = jQuery(this).parents('.filter-title').attr('data-type'); 2744 if (type == 'year') { 2745 jQuery('.news-ajaxfilter-element[data-ajax-type="year"][data-ajax-value="' + slug + '"]').removeClass('active'); 2746 jQuery('.news-ajaxfilter-element[data-ajax-type="year"][data-ajax-value="' + slug + '"]').parents('.has-mega-menu').removeClass('active-line'); 2747 } 2748 if (type == 'search') { 2749 jQuery('.search-area').removeClass('open'); 2750 jQuery('.search-area').find('.news-ajaxfilter-element').val(''); 2751 } 2752 jQuery('.news-ajaxfilter-element').each(function () { 2753 if (jQuery(this).attr('data-ajax-type') == 'year') { 2754 if (jQuery(this).attr('data-ajax-value') != '') { 2755 if (jQuery(this).hasClass('active')) { 2756 year = jQuery(this).attr('data-ajax-value'); 2757 } 2758 } 2759 } else if (jQuery(this).attr('data-ajax-type') == 'status') { 2760 if (jQuery(this).attr('data-ajax-value') != '') { 2761 if (jQuery(this).hasClass('active')) { 2762 status = jQuery(this).attr('data-ajax-value'); 2763 } 2764 } 2765 } else if (jQuery(this).attr('data-ajax-type') == 'search') { 2766 if (jQuery(this).attr('data-ajax-value') != '') { 2767 search = jQuery(this).val(); 2768 } 2769 } 2770 }) 2771 if (history.pushState) { 2772 var oldurl= window.location.protocol + "//" + window.location.host + window.location.pathname ; 2773 var url=oldurl+'?'; 2774 if(search){ 2775 url+='&search='+search; 2776 } 2777 if(year){ 2778 url+='&news-year='+year; 2779 } 2780 window.history.pushState({path:url},'',url); 2781 } 2782 jQuery('#news-basecontainer-ajax').html(""); 2783 jQuery('.lds-roller').show(); 2784 jQuery.ajax({ 2785 url: localVars.ajax_url, 2786 type: 'post', 2787 dataType: "json", 2788 data: { 2789 action: 'news_ajax_filter', 2790 items: [year, search], 2791 }, 2792 success(response) { 2793 jQuery('.lds-roller').hide(); 2794 jQuery('#news-basecontainer-ajax').html(response.html); 2795 jQuery('#filter-tag-ajax').html(response.tags); 2796 if (response.if_all === true) { 2797 jQuery('#count-ajax').html(jQuery('#count-ajax').attr('data-backup')); 2798 } else { 2799 if (response.full_count > 0) { 2800 jQuery('#count-ajax').html('Browse <span> ' + response.full_count + ' results</span> '); 2801 } else { 2802 jQuery('#count-ajax').html('<span> ' + response.count + ' results</span> '); 2803 } 2804 } 2805 jQuery('.news-ajaxfilter-element').attr('active', ''); 2806 }, 2807 }); 2808 2809 jQuery(this).parents('.filter-title').remove(); 2810 2811 }); 2812 jQuery(document).on('click keyup', '.news-ajaxfilter-element', function () { 2813 var type = jQuery(this).attr('data-ajax-type'); 2814 let year = ''; 2815 let search = ''; 2816 2817 // jQuery(".mega-menu").css("display", "none"); 2818 2819 jQuery('.news-ajaxfilter-element').each(function () { 2820 if (jQuery(this).attr('data-ajax-type') == type) { 2821 jQuery(this).removeClass('active'); 2822 } 2823 }) 2824 2825 if (jQuery(this).attr('active') == 'active') { 2826 jQuery(this).removeClass('active'); 2827 jQuery(this).parents('.has-mega-menu').removeClass('active-line'); 2828 jQuery(this).attr('active', ''); 2829 } else { 2830 jQuery(this).addClass('active'); 2831 jQuery(this).parents('.has-mega-menu').addClass('active-line'); 2832 jQuery(this).attr('active', 'active'); 2833 } 2834 2835 jQuery('.news-ajaxfilter-element').each(function () { 2836 if (jQuery(this).attr('data-ajax-type') == 'year') { 2837 if (jQuery(this).attr('data-ajax-value') != '') { 2838 if (jQuery(this).hasClass('active')) { 2839 year = jQuery(this).attr('data-ajax-value'); 2840 } 2841 } 2842 } else if (jQuery(this).attr('data-ajax-type') == 'search') { 2843 if (jQuery(this).attr('data-ajax-value') != '') { 2844 search = jQuery(this).val(); 2845 } 2846 } 2847 }) 2848 if (history.pushState) { 2849 var oldurl= window.location.protocol + "//" + window.location.host + window.location.pathname ; 2850 var url=oldurl+'?'; 2851 if(search){ 2852 url+='&search='+search; 2853 } 2854 if(year){ 2855 url+='&news-year='+year; 2856 } 2857 window.history.pushState({path:url},'',url); 2858 } 2859 // jQuery('input[type=search]').on('search', function () { 2860 // // search logic here 2861 // // this function will be executed on click of X (clear button) 2862 // search= ''; 2863 // }); 2864 jQuery('#news-basecontainer-ajax').html(""); 2865 jQuery('.lds-roller').show(); 2866 2867 jQuery.ajax({ 2868 url: localVars.ajax_url, 2869 dataType: "json", 2870 type: 'post', 2871 data: { 2872 action: 'news_ajax_filter', 2873 items: [year, search], 2874 }, 2875 success(response) { 2876 jQuery('.lds-roller').hide(); 2877 jQuery('#news-basecontainer-ajax').html(response.html); 2878 jQuery('#filter-tag-ajax').html(response.tags); 2879 if (response.if_all === true) { 2880 jQuery('#count-ajax').html(jQuery('#count-ajax').attr('data-backup')); 2881 } else { 2882 if (response.full_count > 0) { 2883 jQuery('#count-ajax').html('Browse <span> ' + response.full_count + ' results</span> '); 2884 } else { 2885 jQuery('#count-ajax').html('<span> ' + response.count + ' results</span> '); 2886 } 2887 } 2888 2889 }, 2890 }); 2891 }); 2892 // News Ajax Function -> End 2893 jQuery(window).on('popstate', function(event) { 2894 location.reload(); 2895 }); 2896 jQuery('.key-cross').click(function (e) { 2897 jQuery(this).parent().addClass('hide-popup'); 2898 }); 2899 2900 jQuery.noConflict(); 2901 2902 /*** Scroll Reveal Function ***/ 2903 2904 (function scrollReveal() { 2905 window.sr = ScrollReveal(); 2906 2907 sr.reveal( 2908 "", 2909 { 2910 duration: 600,
2911 distance: "50px", 2912 easing: "ease-out", 2913 origin: "top", 2914 reset: false, 2915 scale: 1, 2916 viewFactor: 0, 2917 }, 2918 150, 2919 ); 2920 })(); 2921 2922 ScrollReveal().watch = function (target, onEnter, onExit, reset = false) { 2923 onExit = onExit || function () { }; 2924 2925 if (typeof onEnter === "function" && typeof onExit === "function") { 2926 const noEffect = { 2927 delay: 0, 2928 distance: 0, 2929 duration: 0, 2930 scale: 1, 2931 opacity: null, 2932 rotate: { 2933 x: 0, 2934 y: 0, 2935 z: 0, 2936 }, 2937 2938 reset: reset, 2939 beforeReset: onExit, 2940 beforeReveal: onEnter, 2941 }; 2942 this.reveal(target, noEffect); 2943 } else { 2944 throw new Error("Watch received invalid arguments."); 2945 } 2946 }; 2947 2948 ScrollReveal().watch( 2949 "h1 span, h2 span", 2950 function onEnter(el) { 2951 el.classList.add("draw-image"); 2952 }, 2953 function onExit(el) { 2954 el.classList.remove("draw-image"); 2955 }, 2956 2957 ); 2958 2959 ScrollReveal().watch( 2960 ".hh-img, .is-style-rounded, .ah-bg-imgs, .psh-bg-imgs, .rh-bg-imgs, .page-template-template-programs .th-rightbg-imgs, .th-bg-imgs, .ph-bg-imgs", 2961 function onEnter(el) { 2962 el.classList.add("active"); 2963 }, 2964 function onExit(el) { 2965 el.classList.remove("active"); 2966 }, 2967 2968 2969 ); 2970 2971 ScrollReveal().watch( 2972 "#site-footer", 2973 function onEnter(el) { 2974 jQuery('.keys-block').addClass("hide-block"); 2975 }, 2976 function onExit(el) { 2977 jQuery('.keys-block').removeClass("hide-block"); 2978 }, 2979 true 2980 ); 2981 2982 jQuery("#cross-icon-span").click(function (e) { 2983 jQuery('body').removeClass('have-topbar'); 2984 jQuery.cookie('cross-icon-status', 'hidden', { expires: 10, path: '/' }); 2985 }); 2986 let Cookie_value = jQuery.cookie('cross-icon-status'); 2987 if (Cookie_value == 'hidden') { 2988 jQuery('body').removeClass('have-topbar'); 2989 } else { 2990 jQuery('body').addClass('have-topbar'); 2991 } 2992 2993}); 2994 2995if (jQuery(window).width() < 1003) { 2996 2997 jQuery(document).ready(function () { 2998 jQuery('.pt-body').find('li').each(function (i, v) { 2999 var items = []; 3000 var html = ''; 3001 jQuery(v).find('.pt-col').each(function (ii, vv) { 3002 items.push( 3003 '<div class="' + jQuery(vv).attr('class') + '" data-column="' + jQuery(vv).attr('data-column') + '" >' + jQuery(vv).html() + '</div>' 3004 ) 3005 }) 3006 jQuery(items).each(function (ii, vv) { 3007 if (ii <= 2) { 3008 html += vv 3009 } 3010 }); 3011 if (items.length > 3) { 3012 html += ' <div class="pt-faq"><div class="pt-faq-content" style="">'; 3013 jQuery(items).each(function (ii, vv) { 3014 if (ii > 2) { 3015 html += vv 3016 } 3017 }); 3018 html += '</div><span class="">Show Details <span></span> </span></div>'; 3019 } 3020 jQuery(v).html(html); 3021 3022 }); 3023 3024 jQuery.noConflict(); 3025 3026 jQuery(".pt-faq > span").on("click", function () { 3027 if (jQuery(this).hasClass("active")) { 3028 jQuery(this).removeClass("active"); 3029 jQuery(this).html('Show Details <span></span>'); 3030 jQuery(this) 3031 .siblings(".pt-faq-content") 3032 .slideUp(); 3033 } else { 3034 jQuery(".pt-faq > span").removeClass("active"); 3035 jQuery(this).addClass("active"); 3036 jQuery(this).html('Hide Detapils <span></span>'); 3037 jQuery(".pt-faq-content").slideUp(); 3038 jQuery(this) 3039 .siblings(".pt-faq-content") 3040 .slideDown(); 3041 } 3042 }); 3043 }); 3044} 3045 3046jQuery(document).mouseup(function (e) { 3047 var container = jQuery(".search-area"); 3048 3049 // if the target of the click isn't the container nor a descendant of the container 3050 if (!container.is(e.target) && container.has(e.target).length === 0) { 3051 container.removeClass('open'); 3052 } 3053}); 3054 3055jQuery(document).on("click", '#searchsubmit', function (e) { 3056 e.preventDefault(); 3057 jQuery(".search-area").removeClass('open'); 3058});
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.