1/** 2 * File skip-link-focus-fix.js. 3 * 4 * Helps with accessibility for keyboard only users. 5 * 6 * Learn more: https://git.io/vWdr2 7 */ 8(function() { 9 var isIe = /(trident|msie)/i.test( navigator.userAgent ); 10 11 if ( isIe && document.getElementById && window.addEventListener ) { 12 window.addEventListener( 'hashchange', function() { 13 var id = location.hash.substring( 1 ), 14 element; 15 16 if ( ! ( /^[A-z0-9_-]+$/.test( id ) ) ) { 17 return; 18 } 19 20 element = document.getElementById( id ); 21 22 if ( element ) { 23 if ( ! ( /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) ) { 24 element.tabIndex = -1; 25 } 26 27 element.focus(); 28 } 29 }, false ); 30 } 31})(); 32; 33/* global twentyseventeenScreenReaderText */ 34/** 35 * Theme functions file. 36 * 37 * Contains handlers for navigation and widget area. 38 */ 39 40(function( $ ) { 41 var masthead, menuToggle, siteNavContain, siteNavigation; 42 43 function initMainNavigation( container ) { 44 45 // Add dropdown toggle that displays child menu items. 46 var dropdownToggle = $( '<button />', { 'class': 'dropdown-toggle', 'aria-expanded': false }) 47 .append( twentyseventeenScreenReaderText.icon ) 48 .append( $( '<span />', { 'class': 'screen-reader-text', text: twentyseventeenScreenReaderText.expand }) ); 49 50 container.find( '.menu-item-has-children > a, .page_item_has_children > a' ).after( dropdownToggle ); 51 52 // Set the active submenu dropdown toggle button initial state. 53 container.find( '.current-menu-ancestor > button' ) 54 .addClass( 'toggled-on' ) 55 .attr( 'aria-expanded', 'true' ) 56 .find( '.screen-reader-text' ) 57 .text( twentyseventeenScreenReaderText.collapse ); 58 // Set the active submenu initial state. 59 container.find( '.current-menu-ancestor > .sub-menu' ).addClass( 'toggled-on' ); 60 61 container.find( '.dropdown-toggle' ).on( 'click', function( e ) { 62 var _this = $( this ), 63 screenReaderSpan = _this.find( '.screen-reader-text' ); 64 65 e.preventDefault(); 66 _this.toggleClass( 'toggled-on' ); 67 _this.next( '.children, .sub-menu' ).toggleClass( 'toggled-on' ); 68 69 _this.attr( 'aria-expanded', _this.attr( 'aria-expanded' ) === 'false' ? 'true' : 'false' ); 70 71 screenReaderSpan.text( screenReaderSpan.text() === twentyseventeenScreenReaderText.expand ? twentyseventeenScreenReaderText.collapse : twentyseventeenScreenReaderText.expand ); 72 }); 73 } 74 75 initMainNavigation( $( '.main-navigation' ) ); 76 77 masthead = $( '#masthead' ); 78 menuToggle = masthead.find( '.menu-toggle' ); 79 siteNavContain = masthead.find( '.main-navigation' ); 80 siteNavigation = masthead.find( '.main-navigation > div > ul' ); 81 82 // Enable menuToggle. 83 (function() { 84 85 // Return early if menuToggle is missing. 86 if ( ! menuToggle.length ) { 87 return; 88 } 89 90 // Add an initial value for the attribute. 91 menuToggle.attr( 'aria-expanded', 'false' ); 92 93 menuToggle.on( 'click.twentyseventeen', function() { 94 siteNavContain.toggleClass( 'toggled-on' ); 95 96 $( this ).attr( 'aria-expanded', siteNavContain.hasClass( 'toggled-on' ) ); 97 }); 98 })(); 99 100 // Fix sub-menus for touch devices and better focus for hidden submenu items for accessibility. 101 (function() { 102 if ( ! siteNavigation.length || ! siteNavigation.children().length ) { 103 return; 104 } 105 106 // Toggle `focus` class to allow submenu access on tablets. 107 function toggleFocusClassTouchScreen() { 108 if ( 'none' === $( '.menu-toggle' ).css( 'display' ) ) { 109 110 $( document.body ).on( 'touchstart.twentyseventeen', function( e ) { 111 if ( ! $( e.target ).closest( '.main-navigation li' ).length ) { 112 $( '.main-navigation li' ).removeClass( 'focus' ); 113 } 114 }); 115 116 siteNavigation.find( '.menu-item-has-children > a, .page_item_has_children > a' ) 117 .on( 'touchstart.twentyseventeen', function( e ) { 118 var el = $( this ).parent( 'li' ); 119 120 if ( ! el.hasClass( 'focus' ) ) { 121 e.preventDefault(); 122 el.toggleClass( 'focus' ); 123 el.siblings( '.focus' ).removeClass( 'focus' ); 124 } 125 }); 126 127 } else { 128 siteNavigation.find( '.menu-item-has-children > a, .page_item_has_children > a' ).unbind( 'touchstart.twentyseventeen' ); 129 } 130 } 131 132 if ( 'ontouchstart' in window ) { 133 $( window ).on( 'resize.twentyseventeen', toggleFocusClassTouchScreen ); 134 toggleFocusClassTouchScreen(); 135 } 136 137 siteNavigation.find( 'a' ).on( 'focus.twentyseventeen blur.twentyseventeen', function() { 138 $( this ).parents( '.menu-item, .page_item' ).toggleClass( 'focus' ); 139 }); 140 })(); 141})( jQuery ); 142; 143/* global twentyseventeenScreenReaderText */ 144(function( $ ) { 145 146 // Variables and DOM Caching. 147 var $body = $( 'body' ), 148 $customHeader = $body.find( '.custom-header' ), 149 $branding = $customHeader.find( '.site-branding' ), 150 $navigation = $body.find( '.navigation-top' ), 151 $navWrap = $navigation.find( '.wrap' ), 152 $navMenuItem = $navigation.find( '.menu-item' ), 153 $menuToggle = $navigation.find( '.menu-toggle' ), 154 $menuScrollDown = $body.find( '.menu-scroll-down' ), 155 $sidebar = $body.find( '#secondary' ), 156 $entryContent = $body.find( '.entry-content' ), 157 $formatQuote = $body.find( '.format-quote blockquote' ), 158 isFrontPage = $body.hasClass( 'twentyseventeen-front-page' ) || $body.hasClass( 'home blog' ), 159 navigationFixedClass = 'site-navigation-fixed', 160 navigationHeight, 161 navigationOuterHeight, 162 navPadding, 163 navMenuItemHeight, 164 idealNavHeight, 165 navIsNotTooTall, 166 headerOffset, 167 menuTop = 0, 168 resizeTimer; 169 170 // Ensure the sticky navigation doesn't cover current focused links.
171 $( 'a[href], area[href], input:not([disabled]), select:not([disabled]), textarea:not([disabled]), button:not([disabled]), iframe, object, embed, [tabindex], [contenteditable]', '.site-content-contain' ).filter( ':visible' ).on( 'focus', function() { 172 if ( $navigation.hasClass( 'site-navigation-fixed' ) ) { 173 var windowScrollTop = $( window ).scrollTop(), 174 fixedNavHeight = $navigation.height(), 175 itemScrollTop = $( this ).offset().top, 176 offsetDiff = itemScrollTop - windowScrollTop; 177 178 // Account for Admin bar. 179 if ( $( '#wpadminbar' ).length ) { 180 offsetDiff -= $( '#wpadminbar' ).height(); 181 } 182 183 if ( offsetDiff < fixedNavHeight ) { 184 $( window ).scrollTo( itemScrollTop - ( fixedNavHeight + 50 ), 0 ); 185 } 186 } 187 }); 188 189 // Set properties of navigation. 190 function setNavProps() { 191 navigationHeight = $navigation.height(); 192 navigationOuterHeight = $navigation.outerHeight(); 193 navPadding = parseFloat( $navWrap.css( 'padding-top' ) ) * 2; 194 navMenuItemHeight = $navMenuItem.outerHeight() * 2; 195 idealNavHeight = navPadding + navMenuItemHeight; 196 navIsNotTooTall = navigationHeight <= idealNavHeight; 197 } 198 199 // Make navigation 'stick'. 200 function adjustScrollClass() { 201 202 // Make sure we're not on a mobile screen. 203 if ( 'none' === $menuToggle.css( 'display' ) ) { 204 205 // Make sure the nav isn't taller than two rows. 206 if ( navIsNotTooTall ) { 207 208 // When there's a custom header image or video, the header offset includes the height of the navigation. 209 if ( isFrontPage && ( $body.hasClass( 'has-header-image' ) || $body.hasClass( 'has-header-video' ) ) ) { 210 headerOffset = $customHeader.innerHeight() - navigationOuterHeight; 211 } else { 212 headerOffset = $customHeader.innerHeight(); 213 } 214 215 // If the scroll is more than the custom header, set the fixed class. 216 if ( $( window ).scrollTop() >= headerOffset ) { 217 $navigation.addClass( navigationFixedClass ); 218 } else { 219 $navigation.removeClass( navigationFixedClass ); 220 } 221 222 } else { 223 224 // Remove 'fixed' class if nav is taller than two rows. 225 $navigation.removeClass( navigationFixedClass ); 226 } 227 } 228 } 229 230 // Set margins of branding in header. 231 function adjustHeaderHeight() { 232 if ( 'none' === $menuToggle.css( 'display' ) ) { 233 234 // The margin should be applied to different elements on front-page or home vs interior pages. 235 if ( isFrontPage ) { 236 $branding.css( 'margin-bottom', navigationOuterHeight ); 237 } else { 238 $customHeader.css( 'margin-bottom', navigationOuterHeight ); 239 } 240 241 } else { 242 $customHeader.css( 'margin-bottom', '0' ); 243 $branding.css( 'margin-bottom', '0' ); 244 } 245 } 246 247 // Set icon for quotes. 248 function setQuotesIcon() { 249 $( twentyseventeenScreenReaderText.quote ).prependTo( $formatQuote ); 250 } 251 252 // Add 'below-entry-meta' class to elements. 253 function belowEntryMetaClass( param ) { 254 var sidebarPos, sidebarPosBottom; 255 256 if ( ! $body.hasClass( 'has-sidebar' ) || 257 typeof $sidebar === 'undefined' || 258 $sidebar.length < 1 || ( 259 $body.hasClass( 'search' ) || 260 $body.hasClass( 'single-attachment' ) || 261 $body.hasClass( 'error404' ) || 262 $body.hasClass( 'twentyseventeen-front-page' ) 263 ) ) { 264 return; 265 } 266 267 sidebarPos = $sidebar.offset(); 268 sidebarPosBottom = sidebarPos.top + ( $sidebar.height() + 28 ); 269 270 $entryContent.find( param ).each( function() { 271 var $element = $( this ), 272 elementPos = $element.offset(), 273 elementPosTop = elementPos.top; 274 275 // Add 'below-entry-meta' to elements below the entry meta. 276 if ( elementPosTop > sidebarPosBottom ) { 277 $element.addClass( 'below-entry-meta' ); 278 } else { 279 $element.removeClass( 'below-entry-meta' ); 280 } 281 }); 282 } 283 284 /* 285 * Test if inline SVGs are supported. 286 * @link https://github.com/Modernizr/Modernizr/ 287 */ 288 function supportsInlineSVG() { 289 var div = document.createElement( 'div' ); 290 div.innerHTML = '<svg/>'; 291 return 'http://www.w3.org/2000/svg' === ( 'undefined' !== typeof SVGRect && div.firstChild && div.firstChild.namespaceURI ); 292 } 293 294 /** 295 * Test if an iOS device. 296 */ 297 function checkiOS() { 298 return /iPad|iPhone|iPod/.test(navigator.userAgent) && ! window.MSStream; 299 } 300 301 /* 302 * Test if background-attachment: fixed is supported. 303 * @link http://stackoverflow.com/questions/14115080/detect-support-for-background-attachment-fixed 304 */
305 function supportsFixedBackground() { 306 var el = document.createElement('div'), 307 isSupported; 308 309 try { 310 if ( ! ( 'backgroundAttachment' in el.style ) || checkiOS() ) { 311 return false; 312 } 313 el.style.backgroundAttachment = 'fixed'; 314 isSupported = ( 'fixed' === el.style.backgroundAttachment ); 315 return isSupported; 316 } 317 catch (e) { 318 return false; 319 } 320 } 321 322 // Fire on document ready. 323 $( function() { 324 325 // If navigation menu is present on page, setNavProps and adjustScrollClass. 326 if ( $navigation.length ) { 327 setNavProps(); 328 adjustScrollClass(); 329 } 330 331 // If 'Scroll Down' arrow in present on page, calculate scroll offset and bind an event handler to the click event. 332 if ( $menuScrollDown.length ) { 333 334 if ( $( 'body' ).hasClass( 'admin-bar' ) ) { 335 menuTop -= 32; 336 } 337 if ( $( 'body' ).hasClass( 'blog' ) ) { 338 menuTop -= 30; // The div for latest posts has no space above content, add some to account for this. 339 } 340 if ( ! $navigation.length ) { 341 navigationOuterHeight = 0; 342 } 343 344 $menuScrollDown.on( 'click', function( e ) { 345 e.preventDefault(); 346 $( window ).scrollTo( '#primary', { 347 duration: 600, 348 offset: { top: menuTop - navigationOuterHeight } 349 }); 350 }); 351 } 352 353 adjustHeaderHeight(); 354 setQuotesIcon(); 355 belowEntryMetaClass( 'blockquote.alignleft, blockquote.alignright' ); 356 if ( true === supportsInlineSVG() ) { 357 document.documentElement.className = document.documentElement.className.replace( /(\s*)no-svg(\s*)/, '$1svg$2' ); 358 } 359 360 if ( true === supportsFixedBackground() ) { 361 document.documentElement.className += ' background-fixed'; 362 } 363 } ); 364 365 // If navigation menu is present on page, adjust it on scroll and screen resize. 366 if ( $navigation.length ) { 367 368 // On scroll, we want to stick/unstick the navigation. 369 $( window ).on( 'scroll', function() { 370 adjustScrollClass(); 371 adjustHeaderHeight(); 372 }); 373 374 // Also want to make sure the navigation is where it should be on resize. 375 $( window ).on( 'resize', function() { 376 setNavProps(); 377 setTimeout( adjustScrollClass, 500 ); 378 }); 379 } 380 381 $( window ).on( 'resize', function() { 382 clearTimeout( resizeTimer ); 383 resizeTimer = setTimeout( function() { 384 belowEntryMetaClass( 'blockquote.alignleft, blockquote.alignright' ); 385 }, 300 ); 386 setTimeout( adjustHeaderHeight, 1000 ); 387 }); 388 389 // Add header video class after the video is loaded. 390 $( document ).on( 'wp-custom-header-video-loaded', function() { 391 $body.addClass( 'has-header-video' ); 392 }); 393 394})( jQuery ); 395; 396/*! 397 * jQuery.scrollTo 398 * Copyright (c) 2007 Ariel Flesler - aflesler â gmail ⢠com | https://github.com/flesler 399 * Licensed under MIT 400 * https://github.com/flesler/jquery.scrollTo 401 * @projectDescription Lightweight, cross-browser and highly customizable animated scrolling with jQuery 402 * @author Ariel Flesler 403 * @version 2.1.3 404 */ 405;(function(factory) { 406 'use strict'; 407 if (typeof define === 'function' && define.amd) { 408 // AMD 409 define(['jquery'], factory); 410 } else if (typeof module !== 'undefined' && module.exports) { 411 // CommonJS 412 module.exports = factory(require('jquery')); 413 } else { 414 // Global 415 factory(jQuery); 416 } 417})(function($) { 418 'use strict'; 419 420 var $scrollTo = $.scrollTo = function(target, duration, settings) { 421 return $(window).scrollTo(target, duration, settings); 422 }; 423 424 $scrollTo.defaults = { 425 axis:'xy', 426 duration: 0, 427 limit:true 428 }; 429 430 function isWin(elem) { 431 return !elem.nodeName || 432 $.inArray(elem.nodeName.toLowerCase(), ['iframe','#document','html','body']) !== -1; 433 } 434 435 function isFunction(obj) { 436 // Brought from jQuery since it's deprecated 437 return typeof obj === 'function' 438 } 439 440 $.fn.scrollTo = function(target, duration, settings) { 441 if (typeof duration === 'object') { 442 settings = duration; 443 duration = 0; 444 } 445 if (typeof settings === 'function') { 446 settings = { onAfter:settings }; 447 } 448 if (target === 'max') { 449 target = 9e9; 450 } 451 452 settings = $.extend({}, $scrollTo.defaults, settings); 453 // Speed is still recognized for backwards compatibility 454 duration = duration || settings.duration; 455 // Make sure the settings are given right 456 var queue = settings.queue && settings.axis.length > 1; 457 if (queue) { 458 // Let's keep the overall duration 459 duration /= 2; 460 } 461 settings.offset = both(settings.offset); 462 settings.over = both(settings.over); 463 464 return this.each(function() { 465 // Null target yields nothing, just like jQuery does 466 if (target === null) return; 467 468 var win = isWin(this), 469 elem = win ? this.contentWindow || window : this, 470 $elem = $(elem), 471 targ = target, 472 attr = {}, 473 toff; 474 475 switch (typeof targ) { 476 // A number will pass the regex 477 case 'number': 478 case 'string': 479 if (/^([+-]=?)?\d+(\.\d+)?(px|%)?$/.test(targ)) { 480 targ = both(targ); 481 // We are done 482 break; 483 } 484 // Relative/Absolute selector 485 targ = win ? $(targ) : $(targ, elem); 486 /* falls through */
487 case 'object': 488 if (targ.length === 0) return; 489 // DOMElement / jQuery 490 if (targ.is || targ.style) { 491 // Get the real position of the target 492 toff = (targ = $(targ)).offset(); 493 } 494 } 495 496 var offset = isFunction(settings.offset) && settings.offset(elem, targ) || settings.offset; 497 498 $.each(settings.axis.split(''), function(i, axis) { 499 var Pos = axis === 'x' ? 'Left' : 'Top', 500 pos = Pos.toLowerCase(), 501 key = 'scroll' + Pos, 502 prev = $elem[key](), 503 max = $scrollTo.max(elem, axis); 504 505 if (toff) {// jQuery / DOMElement 506 attr[key] = toff[pos] + (win ? 0 : prev - $elem.offset()[pos]); 507 508 // If it's a dom element, reduce the margin 509 if (settings.margin) { 510 attr[key] -= parseInt(targ.css('margin'+Pos), 10) || 0; 511 attr[key] -= parseInt(targ.css('border'+Pos+'Width'), 10) || 0; 512 } 513 514 attr[key] += offset[pos] || 0; 515 516 if (settings.over[pos]) { 517 // Scroll to a fraction of its width/height 518 attr[key] += targ[axis === 'x'?'width':'height']() * settings.over[pos]; 519 } 520 } else { 521 var val = targ[pos]; 522 // Handle percentage values 523 attr[key] = val.slice && val.slice(-1) === '%' ? 524 parseFloat(val) / 100 * max 525 : val; 526 } 527 528 // Number or 'number' 529 if (settings.limit && /^\d+$/.test(attr[key])) { 530 // Check the limits 531 attr[key] = attr[key] <= 0 ? 0 : Math.min(attr[key], max); 532 } 533 534 // Don't waste time animating, if there's no need. 535 if (!i && settings.axis.length > 1) { 536 if (prev === attr[key]) { 537 // No animation needed 538 attr = {}; 539 } else if (queue) { 540 // Intermediate animation 541 animate(settings.onAfterFirst); 542 // Don't animate this axis again in the next iteration. 543 attr = {}; 544 } 545 } 546 }); 547 548 animate(settings.onAfter); 549 550 function animate(callback) { 551 var opts = $.extend({}, settings, { 552 // The queue setting conflicts with animate() 553 // Force it to always be true 554 queue: true, 555 duration: duration, 556 complete: callback && function() { 557 callback.call(elem, targ, settings); 558 } 559 }); 560 $elem.animate(attr, opts); 561 } 562 }); 563 }; 564 565 // Max scrolling position, works on quirks mode 566 // It only fails (not too badly) on IE, quirks mode. 567 $scrollTo.max = function(elem, axis) { 568 var Dim = axis === 'x' ? 'Width' : 'Height', 569 scroll = 'scroll'+Dim; 570 571 if (!isWin(elem)) 572 return elem[scroll] - $(elem)[Dim.toLowerCase()](); 573 574 var size = 'client' + Dim, 575 doc = elem.ownerDocument || elem.document, 576 html = doc.documentElement, 577 body = doc.body; 578 579 return Math.max(html[scroll], body[scroll]) - Math.min(html[size], body[size]); 580 }; 581 582 function both(val) { 583 return isFunction(val) || $.isPlainObject(val) ? val : { top:val, left:val }; 584 } 585 586 // Add special hooks so that window scroll properties can be animated 587 $.Tween.propHooks.scrollLeft = 588 $.Tween.propHooks.scrollTop = { 589 get: function(t) { 590 return $(t.elem)[t.prop](); 591 }, 592 set: function(t) { 593 var curr = this.get(t); 594 // If interrupt is true and user scrolled, stop animating 595 if (t.options.interrupt && t._last && t._last !== curr) { 596 return $(t.elem).stop(); 597 } 598 var next = Math.round(t.now); 599 // Don't waste CPU 600 // Browsers don't render floating point scroll 601 if (curr !== next) { 602 $(t.elem)[t.prop](next); 603 t._last = this.get(t); 604 } 605 } 606 }; 607 608 // AMD requirement 609 return $scrollTo; 610}); 611; 612(()=>{var e=[],t=!1,n=2e3,i=[],o=new Promise(e=>{"loading"!==document.readyState?e():window.addEventListener("DOMContentLoaded",()=>e())});function s(e,t){if("string"==typeof e)try{e=JSON.parse(e)}catch{return}if(t&&"function"==typeof t.postMessage)try{t.postMessage(JSON.stringify({type:"likesMessage",data:e}),"*")}catch{}}function r(){const t=[];document.querySelectorAll("div.jetpack-likes-widget-unloaded").forEach(n=>{if(!(e.indexOf(n.id)>-1)&&d(n)){e.push(n.id);var i,o=/like-(post|comment)-wrapper-(\d+)-(\d+)-(\w+)/.exec(n.id);o&&5===o.length&&(i={blog_id:o[2],width:n.width},"post"===o[1]?i.post_id=o[3]:"comment"===o[1]&&(i.comment_id=o[3]),i.obj_id=o[4],t.push(i))}}),t.length>0&&s({event:"initialBatch",requests:t},window.frames["likes-master"])}function a(){const e=document.querySelector("#likes-other-gravatars");if(e){e.style.display="none",e.setAttribute("aria-hidden","true");const t=e.__resizeHandler;t&&(window.removeEventListener("resize",t),delete e.__resizeHandler)}}function l(){var e;if(!t)return s({event:"queryMasterReady"},window.frames["likes-master"]),void setTimeout(l,500);!function(){for(let e=i.length-1;e>=0;e--){const t=i[e];if(!d(t)){const n=t&&t.parentElement&&t.parentElement.parentElement;n.classList.remove("jetpack-likes-widget-loaded"),n.classList.remove("jetpack-likes-widget-loading"),n.classList.add("jetpack-likes-widget-unloaded");const o=n.querySelector(".likes-widget-placeholder");o&&(o.style.display=""),i.splice(e,1),t.remove()}}}(),function(){if(!g)return;document.querySelectorAll("div.jetpack-likes-widget-unloaded").forEach(e
612=>g.observe(e))}();var n=[...document.querySelectorAll("div.jetpack-likes-widget-unloaded")].filter(e=>d(e));n.length>0&&r();for(var o=0,a=n.length;o<=a-1;o++)(e=n[o].id)&&c(e)}function c(e){if(void 0===e)return;const t=document.querySelector("#"+e);t.querySelectorAll("iframe").forEach(e=>e.remove());const n=t.querySelector(".likes-widget-placeholder");if(n&&n.classList.contains("post-likes-widget-placeholder")){const e=document.createElement("iframe");e.classList.add("post-likes-widget","jetpack-likes-widget"),e.name=t.dataset.name,e.src=t.dataset.src,e.height="55px",e.width="100%",e.frameBorder="0",e.scrolling="no",e.title=t.dataset.title,n.after(e)}if(n.classList.contains("comment-likes-widget-placeholder")){const e=document.createElement("iframe");e.class="comment-likes-widget-frame jetpack-likes-widget-frame",e.name=t.dataset.name,e.src=t.dataset.src,e.height="18px",e.width="100%",e.frameBorder="0",e.scrolling="no",t.querySelector(".comment-like-feedback").after(e),i.push(e)}t.classList.remove("jetpack-likes-widget-unloaded"),t.classList.add("jetpack-likes-widget-loading"),t.querySelector("iframe").addEventListener("load",e=>{t.contains(e.target)&&(s({event:"loadLikeWidget",name:e.target.name,width:e.target.width},window.frames["likes-master"]),n&&(n.style.display="none"),t.classList.remove("jetpack-likes-widget-loading"),t.classList.add("jetpack-likes-widget-loaded"))})}function d(e){const t=e.getBoundingClientRect().top,i=e.getBoundingClientRect().bottom;return t+n>=0&&i<=window.innerHeight+n}window.addEventListener("message",function(e){let n=e&&e.data;if("string"==typeof n)try{n=JSON.parse(n)}catch{return}const i=n&&n.type,l=n&&n.data;if("likesMessage"!==i||void 0===l.event)return;if("https://widgets.wp.com"===e.origin)switch(l.event){case"masterReady":o.then(()=>{t=!0;const e={event:"injectStyles"},n=document.querySelector(".sd-text-color"),i=document.querySelector(".sd-link-color"),o=n&&getComputedStyle(n)||{},a=i&&getComputedStyle(i)||{};document.body.classList.contains("single")&&s({event:"reblogsEnabled"},window.frames["likes-master"]),e.textStyles={color:o.color,fontFamily:o["font-family"],fontSize:o["font-size"],direction:o.direction,fontWeight:o["font-weight"],fontStyle:o["font-style"],textDecoration:o["text-decoration"]},e.linkStyles={color:a.color,fontFamily:a["font-family"],fontSize:a["font-size"],textDecoration:a["text-decoration"],fontWeight:a["font-weight"],fontStyle:a["font-style"]},s(e,window.frames["likes-master"]),r()});break;case"showLikeWidget":case"showCommentLikeWidget":break;case"killCommentLikes":document.querySelectorAll(".jetpack-comment-likes-widget-wrapper").forEach(e=>e.remove());break;case"clickReblogFlair":wpcom_reblog&&"function"==typeof wpcom_reblog.toggle_reblog_box_flair&&wpcom_reblog.toggle_reblog_box_flair(l.obj_id);break;case"hideOtherGravatars":a();break;case"showOtherGravatars":{const e=document.querySelector("#likes-other-gravatars");if(!e)break;const t=e.querySelector("ul");e.style.display="none",t.innerHTML="",e.querySelectorAll(".likes-text span").forEach(e=>e.textContent=l.totalLikesLabel),(l.likers||[]).forEach(async(e,n)=>{if("http"!==e.profile_URL.substr(0,4))return;const i=document.createElement("li");t.append(i);const o=encodeURI(e.profile_URL),r=encodeURI(e.avatar_URL);i.innerHTML=`<a href="${o}" rel="nofollow" target="_parent" class="wpl-liker">\n\t\t\t\t\t\t<img src="${r}"\n\t\t\t\t\t\t\talt=""\n\t\t\t\t\t\t\tstyle="width: 28px; height: 28px;" />\n\t\t\t\t\t\t<span></span>\n\t\t\t\t\t</a>`,i.classList.add(e.css_class),i.querySelector("img").alt=l.avatarAltTitle.replace("%s",e.name),i.querySelector("span").innerText=e.name,n===l.likers.length-1&&i.addEventListener("keydown",e=>{"Tab"!==e.key||e.shiftKey||(e.preventDefault(),a(),s({event:"focusLikesCount",parent:l.parent},window.frames["likes-master"]))})});const n=function(){const t="rtl"===getComputedStyle(e).direction,n=document.querySelector(`*[name='${l.parent}']`),i=n.getBoundingClientRect(),o=n.ownerDocument.defaultView,s=i.top+o.pageYOffset,r=i.left+o.pageXOffset;let a;if(e.style.top=s+l.position.top-1+"px",t){const t=l&&l.likers?Math.min(l.likers.length,5):0;a=r+l.position.left+24*t+4,e.style.transform="translateX(-100%)"}else a=r+l.position.left;e.style.left=a+"px",e.style.left="-9999px",e.style.display="block";const c=e.offsetWidth;a+c>o.innerWidth&&(a=i.right-c),e.style.left=a+"px",e.setAttribute("aria-hidden","false")};n(),e.focus();const i=function(e,t){var n;return function(){var i=this,o=arguments;clearTimeout(n),n=setTimeout(function(){e.apply(i,o)},t)}},o=i(n,100);e.__resizeHandler=o,window.addEventListener("resize",o),e.focus()}}}),document.addEventListener("click",a);var f,m,u,p=(f=250,m=l,function(){clearTimeout(u),u=setTimeout(m,f)}),g="function"==typeof IntersectionObserver?new IntersectionObserver(p,{rootMargin:"2000px",threshold:[0,1]}):null;l(),window.addEventListener("scroll",p,!0)})();;
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.