vendor: 4,418 bytes, lines 1-161
1(function () { 2 'use strict'; 3 4 /*! js-cookie v3.0.5 | MIT */ 5 /* eslint-disable no-var */ 6 function assign (target) { 7 for (var i = 1; i < arguments.length; i++) { 8 var source = arguments[i]; 9 for (var key in source) { 10 target[key] = source[key]; 11 } 12 } 13 return target 14 } 15 /* eslint-enable no-var */ 16 17 /* eslint-disable no-var */ 18 var defaultConverter = { 19 read: function (value) { 20 if (value[0] === '"') { 21 value = value.slice(1, -1); 22 } 23 return value.replace(/(%[\dA-F]{2})+/gi, decodeURIComponent) 24 }, 25 write: function (value) { 26 return encodeURIComponent(value).replace( 27 /%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g, 28 decodeURIComponent 29 ) 30 } 31 }; 32 /* eslint-enable no-var */ 33 34 /* eslint-disable no-var */ 35 36 function init (converter, defaultAttributes) { 37 function set (name, value, attributes) { 38 if (typeof document === 'undefined') { 39 return 40 } 41 42 attributes = assign({}, defaultAttributes, attributes); 43 44 if (typeof attributes.expires === 'number') { 45 attributes.expires = new Date(Date.now() + attributes.expires * 864e5); 46 } 47 if (attributes.expires) { 48 attributes.expires = attributes.expires.toUTCString(); 49 } 50 51 name = encodeURIComponent(name) 52 .replace(/%(2[346B]|5E|60|7C)/g, decodeURIComponent) 53 .replace(/[()]/g, escape); 54 55 var stringifiedAttributes = ''; 56 for (var attributeName in attributes) { 57 if (!attributes[attributeName]) { 58 continue 59 } 60 61 stringifiedAttributes += '; ' + attributeName; 62 63 if (attributes[attributeName] === true) { 64 continue 65 } 66 67 // Considers RFC 6265 section 5.2: 68 // ... 69 // 3. If the remaining unparsed-attributes contains a %x3B (";") 70 // character: 71 // Consume the characters of the unparsed-attributes up to, 72 // not including, the first %x3B (";") character. 73 // ... 74 stringifiedAttributes += '=' + attributes[attributeName].split(';')[0]; 75 } 76 77 return (document.cookie = 78 name + '=' + converter.write(value, name) + stringifiedAttributes) 79 } 80 81 function get (name) { 82 if (typeof document === 'undefined' || (arguments.length && !name)) { 83 return 84 } 85 86 // To prevent the for loop in the first place assign an empty array 87 // in case there are no cookies at all. 88 var cookies = document.cookie ? document.cookie.split('; ') : []; 89 var jar = {}; 90 for (var i = 0; i < cookies.length; i++) { 91 var parts = cookies[i].split('='); 92 var value = parts.slice(1).join('='); 93 94 try { 95 var found = decodeURIComponent(parts[0]); 96 jar[found] = converter.read(value, found); 97 98 if (name === found) { 99 break 100 } 101 } catch (e) {} 102 } 103 104 return name ? jar[name] : jar 105 } 106 107 return Object.create( 108 { 109 set, 110 get, 111 remove: function (name, attributes) { 112 set( 113 name, 114 '', 115 assign({}, attributes, { 116 expires: -1 117 }) 118 ); 119 }, 120 withAttributes: function (attributes) { 121 return init(this.converter, assign({}, this.attributes, attributes)) 122 }, 123 withConverter: function (converter) { 124 return init(assign({}, this.converter, converter), this.attributes) 125 } 126 }, 127 { 128 attributes: { value: Object.freeze(defaultAttributes) }, 129 converter: { value: Object.freeze(converter) } 130 } 131 ) 132 } 133 134 var api = init(defaultConverter, { path: '/' }); 135 136 (function ($) { 137 138 $(function () { 139 140 /* Home Hero 141 ============*/ 142 $('.home-hero__background-text--top').css({ 143 animation: 'slide-in-left 6s ease-out forwards, fade-out 2s ease-out 6s forwards' 144 }); 145 146 $('.home-hero__background-text--bottom').css({ 147 animation: 'slide-in-right 6s ease-out forwards, fade-out 2s ease-out 6s forwards' 148 }); 149 150 setTimeout(function () { 151 $('.home-hero__main-heading').css({ 152 animation: 'fade-in-up 2s ease-out forwards' 153 }); 154 }, 6500); 155 156 /* Burger 157 =========*/ 158 $('.js-burger-open').click(function(e) { 159 $(this).fadeOut(); 160 $('.current_page_ancestor').click(); 161 $('.js-burger-close').fadeIn('500');
162 $('.js-header').addClass('header--menu'); 163 $('.js-header').removeClass('absolute'); 164 $('.header__logo-image--before-change').fadeOut(); 165 $('.header__logo-image--after-change').fadeIn(); 166 setTimeout(function() { 167 $('.js-main-menu').fadeIn('500'); 168 }, 100); 169 }); 170 171 $('.js-burger-close').click(function(e) { 172 $(this).fadeOut(); 173 $('.js-burger-open').fadeIn('500'); 174 $('.js-main-menu').fadeOut('500'); 175 $('.js-header').removeClass('header--menu'); 176 $('.js-header').addClass('absolute'); 177 $('.header__logo-image--before-change').fadeIn(); 178 $('.header__logo-image--after-change').fadeOut(); 179 }); 180 181 /* Portal Nav 182 =============*/ 183 $('.js-portal-button').click(function() { 184 $('.js-portal-nav').slideToggle(); 185 $('.js-header').toggleClass('!pt-[86px]'); 186 }); 187 188 /* Main Menu 189 ============*/ 190 $('.js-open-sub-menu').removeAttr('href'); 191 192 $('.js-open-sub-menu').click(function() { 193 194 $('.main-menu__primary-menu > li > a').toggleClass('main-menu__open-sub-menu'); 195 196 if($(this).hasClass('js-close-sub-menu') === true) { 197 198 $(this).removeClass('js-close-sub-menu'); 199 $(this).siblings('.js-sub-menu').stop().fadeOut(); 200 201 $(this).parent().siblings().children('.js-menu-item').removeClass('opacity-50'); 202 203 } else { 204 205 $('.js-sub-menu').fadeOut(); 206 $('.js-open-sub-menu').removeClass('js-close-sub-menu'); 207 $(this).addClass('js-close-sub-menu'); 208 $(this).siblings('.js-sub-menu').stop().fadeIn(); 209 210 $('.js-menu-item').removeClass('opacity-50'); 211 $(this).parent().siblings().children('.js-menu-item').addClass('opacity-50'); 212 213 } 214 215 }); 216 217 $('.js-menu-child').hover(function() { 218 $(this).parent().siblings().children('.js-menu-child').toggleClass('opacity-50'); 219 }); 220 221 $('.js-sub-menu-back').click(function() { 222 $('.js-close-sub-menu').click(); 223 }); 224 225 /* Split Hero Swiper 226 ====================*/ 227 function applyHoverEffect() { 228 if (window.innerWidth >= 640) { 229 $('.split-hero-swiper__parent').hover( 230 function () { 231 $(this).stop().animate({ width: '75%' }, 500); 232 $(this).find('.split-hero-swiper__content').stop().animate({ 233 zoom: '100%', 234 opacity: 1 235 }, 500); 236 $(this).find('.split-hero-swiper__play').stop().animate({ opacity: 1 }, 500); 237 $(this).siblings().stop().animate({ width: '25%' }, 500); 238 $(this).siblings().find('.split-hero-swiper__content').stop().animate({ 239 zoom: '50%', 240 opacity: 0.5 241 }, 500); 242 $(this).find('.split-hero-swiper__child').stop().animate({ opacity: 1 }, 500); 243 244 const video = $(this).find('video').get(0); 245 if (video) video.play(); 246 }, 247 function () { 248 $(this).stop().animate({ width: '50%' }, 500); 249 $(this).find('.split-hero-swiper__content').stop().animate({ 250 zoom: '100%', 251 opacity: 1 252 }, 500); 253 $(this).find('.split-hero-swiper__play').stop().animate({ opacity: 0 }, 500); 254 $(this).siblings().stop().animate({ width: '50%' }, 500); 255 $(this).siblings().find('.split-hero-swiper__content').stop().animate({ 256 zoom: '100%', 257 opacity: 1 258 }, 500); 259 $('.split-hero-swiper__child').stop().animate({ opacity: 0 }, 500); 260 $(this).find('.split-hero-swiper__close').stop().animate({ opacity: 0 }, 500); 261 262 const video = $(this).find('video').get(0); 263 if (video) video.pause(); 264 } 265 ); 266 } else { 267 $('.split-hero-swiper__parent').off('mouseenter mouseleave'); 268 } 269 } 270 271 applyHoverEffect(); 272 273 $(window).resize(function () { 274 applyHoverEffect(); 275 }); 276 277 $(document).on('click', '.split-hero-swiper__play', function (e) { 278 e.preventDefault(); 279 280 const $parent = $(this).closest('.split-hero-swiper__parent'); 281 const $siblings = $parent.siblings(); 282 const video = $parent.find('video').get(0); 283 const $content = $parent.find('.split-hero-swiper__content'); 284 const $close = $parent.find('.split-hero-swiper__close'); 285 286 $parent.stop().animate({ width: '100%' }, 500); 287 if (window.innerWidth >= 640) { 288 $siblings.stop().animate({ width: '0%' }, 500); 289 $siblings.find('.split-hero-swiper__content').stop().animate({ opacity: 0 }, 500); 290 } 291 $content.stop().animate({ opacity: 0 }, 500); 292 $close.stop().animate({ opacity: 1 }, 500); 293 294 if (video) { 295 video.muted = false;
296 video.play(); 297 } 298 }); 299 300 $(document).on('click', '.split-hero-swiper__close', function (e) { 301 e.preventDefault(); 302 303 const $parent = $(this).closest('.split-hero-swiper__parent'); 304 const $siblings = $parent.siblings(); 305 const video = $parent.find('video').get(0); 306 const $content = $parent.find('.split-hero-swiper__content'); 307 const $close = $(this); 308 309 if (window.innerWidth >= 640) { 310 $parent.stop().animate({ width: '50%' }, 500); 311 $siblings.stop().animate({ width: '50%' }, 500); 312 $siblings.find('.split-hero-swiper__content').stop().animate({ opacity: 1 }, 500); 313 } else { 314 $parent.stop().animate({ width: '100%' }, 500); 315 } 316 $content.stop().animate({ opacity: 1 }, 500); 317 $close.stop().animate({ opacity: 0 }, 500); 318 319 if (video) { 320 video.pause(); 321 video.muted = true; 322 } 323 }); 324 325 /* Modals 326 =========*/ 327 $('.js-modal-trigger').click(function() { 328 let modalID = $(this).data('modal-id'); 329 $('.js-content-modal[data-modal-id=' + modalID + ']').fadeIn(); 330 $('.js-content-modal-video[data-video-id=' + modalID + ']').trigger('play'); 331 }); 332 333 $('.js-close-modal').click(function() { 334 $('.js-content-modal').fadeOut(); 335 $('.js-content-modal-video').trigger('pause'); 336 }); 337 338 $('.js-modal-prev').click(function() { 339 let currentModal = $(this).closest('.js-content-modal'); 340 let prevModal = currentModal.prevAll('.js-content-modal').first(); 341 342 $('.content-modal video').trigger('pause'); 343 344 if (prevModal.length) { 345 currentModal.fadeOut(300, function() { 346 prevModal.fadeIn(300); 347 }); 348 } 349 }); 350 351 $('.js-modal-next').click(function() { 352 let currentModal = $(this).closest('.js-content-modal'); 353 let nextModal = currentModal.nextAll('.js-content-modal').first(); 354 355 $('.content-modal video').trigger('pause'); 356 357 if (nextModal.length) { 358 currentModal.fadeOut(300, function() { 359 nextModal.fadeIn(300); 360 }); 361 } 362 }); 363 364 $(document).on('keydown', function(event) { 365 if (event.key == "Escape") { 366 $('.js-close-modal').click(); 367 } 368 }); 369 370 /* Videos 371 =========*/ 372 $('.full-screen-video').each(function() { 373 $(this).find('.js-video-play').click(function() { 374 const container = $(this).closest('.full-screen-video'); 375 container.find('.full-screen-video__content, .full-screen-video__overlay').fadeOut(); 376 container.find('.js-video').attr('controls', true).delay(500).trigger('play'); 377 }); 378 }); 379 380 /* Accordion 381 ============*/ 382 $('.js-accordion-toggle').click(function() { 383 if ($(this).siblings('.js-accordion-content').is(':visible')) { 384 $(this).siblings('.js-accordion-content').slideUp(); 385 $(this).removeClass('accordion__item-heading--active'); 386 } else { 387 $('.js-accordion-content').slideUp(); 388 $('.js-accordion-toggle').removeClass('accordion__item-heading--active'); 389 $(this).siblings('.js-accordion-content').slideDown(); 390 $(this).addClass('accordion__item-heading--active'); 391 } 392 }); 393 394 $('.js-accordion-nav').click(function() { 395 let accordion_id = $(this).data('id'); 396 $('.js-accordion-toggle[data-id=' + accordion_id +']').click(); 397 }); 398 399 /* Event Category Filters 400 =========================*/ 401 $('.js-event-filter').change(function() { 402 let category_slug = $('.js-event-filter').val(); 403 if(category_slug === '/event') { 404 window.location.href = category_slug; 405 } else { 406 window.location.href = '/event-category/' + category_slug; 407 } 408 }); 409 410 /* FAQ Category Filters 411 =========================*/ 412 $('.js-faq-filter').change(function() { 413 let category_slug = $('.js-faq-filter').val(); 414 if(category_slug === '/faqs') { 415 window.location.href = category_slug; 416 } else { 417 window.location.href = '/faq-category/' + category_slug; 418 } 419 }); 420 421 /* Link Grid 422 ============*/ 423 $('.js-link-grid-select').change(function() { 424 let url = $(this).val(); 425 window.location.href = url; 426 }); 427 428 /* Statistics 429 =============*/ 430 if ($('.statistics__container').length) { 431 function animateCounter($element, targetNumber) { 432 const hasDecimals = targetNumber % 1 !== 0; 433 $({ count: 0 }).animate({ count: targetNumber }, { 434 duration: 2000,
435 easing: 'swing', 436 step: function() { 437 $element.text(hasDecimals ? this.count.toFixed(1) : Math.floor(this.count)); 438 }, 439 complete: function() { 440 $element.text(hasDecimals ? targetNumber.toFixed(1) : Math.floor(targetNumber)); 441 } 442 }); 443 } 444 445 const $section = $('.statistics__container'); 446 447 function checkScroll() { 448 const sectionTop = $section.offset().top; 449 const sectionHeight = $section.outerHeight(); 450 const scrollPosition = $(window).scrollTop() + $(window).height(); 451 452 if (scrollPosition >= sectionTop && scrollPosition <= sectionTop + sectionHeight) { 453 $('.js-statistic').each(function() { 454 const $this = $(this); 455 const targetNumber = parseFloat($this.data('count')); 456 animateCounter($this, targetNumber); 457 }); 458 459 $(window).off('scroll', checkScroll); 460 } 461 } 462 463 $(window).on('scroll', checkScroll); 464 checkScroll(); 465 } 466 467 /* Slick 468 ========*/ 469 // Image Gallery 470 $('.js-image-gallery').each(function() { 471 $(this).slick({ 472 infinite: false, 473 slidesToShow: 1, 474 slidesToScroll: 1, 475 rows: 0, 476 variableWidth: true, 477 draggable: true, 478 arrows: true, 479 prevArrow: '.js-image-gallery-prev', 480 nextArrow: '.js-image-gallery-next', 481 }); 482 }); 483 // News Image Gallery 484 $('.js-news-image-gallery').each(function() { 485 $(this).slick({ 486 infinite: true, 487 slidesToShow: 1, 488 slidesToScroll: 1, 489 rows: 0, 490 variableWidth: false, 491 draggable: true, 492 arrows: true, 493 prevArrow: '.js-news-image-gallery-prev', 494 nextArrow: '.js-news-image-gallery-next', 495 }); 496 }); 497 498 // News Slider 499 $('.js-news-slider').each(function() { 500 $(this).slick({ 501 infinite: false, 502 slidesToShow: 4, 503 slidesToScroll: 1, 504 rows: 0, 505 variableWidth: true, 506 draggable: true, 507 arrows: true, 508 dots: false, 509 prevArrow: '.js-news-slider-prev', 510 nextArrow: '.js-news-slider-next', 511 responsive: [ 512 { 513 breakpoint: 723, 514 settings: { 515 slidesToShow: 1, 516 } 517 }, 518 { 519 breakpoint: 1082, 520 settings: { 521 slidesToShow: 2, 522 } 523 }, 524 { 525 breakpoint: 1605, 526 settings: { 527 slidesToShow: 3, 528 } 529 }, 530 ] 531 }); 532 }); 533 534 // Link Slider 535 $('.js-link-slider').each(function() { 536 $(this).slick({ 537 infinite: false, 538 slidesToShow: 4, 539 slidesToScroll: 1, 540 rows: 0, 541 variableWidth: true, 542 draggable: true, 543 arrows: true, 544 dots: false, 545 prevArrow: '.js-link-slider-prev', 546 nextArrow: '.js-link-slider-next', 547 responsive: [ 548 { 549 breakpoint: 723, 550 settings: { 551 slidesToShow: 1, 552 } 553 }, 554 { 555 breakpoint: 1082, 556 settings: { 557 slidesToShow: 2, 558 } 559 }, 560 { 561 breakpoint: 1605, 562 settings: { 563 slidesToShow: 3, 564 } 565 }, 566 ] 567 }); 568 }); 569 570 // Main Hero Slider 571 $('.js-footer-logos').each(function() { 572 $(this).not('.slick-initialized').slick({ 573 slidesToShow: 7, 574 slidesToScroll: 7, 575 variableWidth: false, 576 infinite: true, 577 rows: 0, 578 draggable: false, 579 arrows: false, 580 dots: false, 581 adaptiveHeight: false, 582 autoplay: false, 583 autoplaySpeed: 6000, 584 pauseOnHover: false, 585 pauseOnFocus: false, 586 centerMode: false, 587 fade: false, 588 rtl: true, 589 responsive: [ 590 { 591 breakpoint: 639, 592 settings: { 593 slidesToShow: 1.8, 594 slidesToScroll: 1, 595 autoplay: true, 596 autoplaySpeed: 1, 597 speed: 7500, 598 cssEase: 'linear', 599 } 600 }, 601 { 602 breakpoint: 1023, 603 settings: { 604 slidesToShow: 3, 605 slidesToScroll: 1, 606 autoplay: true, 607 autoplaySpeed: 1, 608 speed: 4500, 609 cssEase: 'linear', 610 } 611 }, 612 ] 613 }); 614 }); 615 616 /* Site Notice 617 ==============*/ 618 if(!api.get('site-notice')) { 619 setTimeout(function() { 620 $('.js-site-notice').fadeIn(); 621 }, 1000); 622 } 623 624 $('.js-close-site-notice').click(function() { 625 let site_notice = $('.js-site-notice').data('modal'); 626 api.set(site_notice, true, {expires: 1}); 627 $('.js-site-notice').fadeOut(); 628 }); 629 630 $('.js-action-cookie-notice').click(function() { 631 let site_notice = $('.js-site-notice').data('modal'); 632 let notice_url = $('.js-action-cookie-notice').attr('data-url'); 633 api.set(site_notice, true, {expires: 1}); 634 window.location = notice_url; 635 }); 636 637 /* Sticky Banner 638 ================*/ 639 if(!api.get('sticky-banner')) { 640 setTimeout(function() { 641 $('.js-sticky-banner').fadeIn(function () { 642 $('body').addClass('has-sticky-banner'); 643 }); 644 }, 1000); 645 } 646 647 $('.js-close-sticky-banner').click(function() { 648 let sticky_banner = $('.js-sticky-banner').data('modal'); 649 api.set(sticky_banner, true, {expires: 1}); 650 $('.js-sticky-banner').fadeOut(function () { 651 $('body').removeClass('has-sticky-banner'); 652 }); 653 }); 654 655 $('.js-sticky-banner-action').click(function() { 656 let sticky_banner = $('.js-sticky-banner').data('modal'); 657 let notice_url = $('.js-sticky-banner-action').attr('data-url'); 658 api.set(sticky_banner, true, {expires: 1}); 659 window.location = notice_url; 660 }); 661 662 /* Sibling Links 663 ================*/ 664 let lastScroll = $(window).scrollTop(); 665 666 $(window).on('scroll', function () {
667 let current = $(this).scrollTop(); 668 669 if (current > lastScroll) { 670 $('.js-sibling-links').slideDown(); 671 } else if (current < lastScroll) { 672 $('.js-sibling-links').slideUp(); 673 } 674 675 lastScroll = current; 676 }); 677 678 function nudge() { 679 var amount = 40; 680 $('.js-sibling-links-inner').animate({ scrollLeft: "+=" + amount }, 400, function() { 681 $(this).animate({ scrollLeft: "-=" + amount }, 400, function() { 682 nudgeTimeout = setTimeout(nudge, 4000); 683 }); 684 }); 685 } 686 687 var nudgeTimeout = setTimeout(nudge, 4000); 688 689 $('.js-sibling-links-inner').on('scroll touchstart pointerdown', function() { 690 clearTimeout(nudgeTimeout); 691 }); 692 693 /* AOS 694 ======*/ 695 AOS.init({ 696 duration: 1500, 697 }); 698 699 }); 700 701 }(jQuery)); 702 703})();
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.