1/*! This file is auto-generated */ 2window.addComment=function(v){var I,C,h,E=v.document,b={commentReplyClass:"comment-reply-link",commentReplyTitleId:"reply-title",cancelReplyId:"cancel-comment-reply-link",commentFormId:"commentform",temporaryFormId:"wp-temp-form-div",parentIdFieldId:"comment_parent",postIdFieldId:"comment_post_ID"},e=v.MutationObserver||v.WebKitMutationObserver||v.MozMutationObserver,i="querySelector"in E&&"addEventListener"in v,n=!!E.documentElement.dataset;function t(){o(),e&&new e(d).observe(E.body,{childList:!0,subtree:!0})}function o(e){if(i&&(I=g(b.cancelReplyId),C=g(b.commentFormId),I)){I.addEventListener("click",l);function t(e){if((e.metaKey||e.ctrlKey)&&13===e.keyCode&&"a"!==E.activeElement.tagName.toLowerCase())return C.removeEventListener("keydown",t),e.preventDefault(),C.submit.click(),!1}C&&C.addEventListener("keydown",t);for(var n=function(e){var t=b.commentReplyClass;e&&e.childNodes||(e=E);e=E.getElementsByClassName?e.getElementsByClassName(t):e.querySelectorAll("."+t);return e}(e),o=0,d=n.length;o<d;o++)n[o].addEventListener("click",r)}}function l(e){var t,n,o=g(b.temporaryFormId);o&&h&&(g(b.parentIdFieldId).value="0",t=o.textContent,o.parentNode.replaceChild(h,o),this.style.display="none",n=(o=(o=g(b.commentReplyTitleId))&&o.firstChild)&&o.nextSibling,o&&o.nodeType===Node.TEXT_NODE&&t&&(n&&"A"===n.nodeName&&n.id!==b.cancelReplyId&&(n.style.display=""),o.textContent=t),e.preventDefault())}function r(e){var t=g(b.commentReplyTitleId),t=t&&t.firstChild.textContent,n=this,o=a(n,"belowelement"),d=a(n,"commentid"),i=a(n,"respondelement"),l=a(n,"postid"),n=a(n,"replyto")||t;o&&d&&i&&l&&!1===v.addComment.moveForm(o,d,i,l,n)&&e.preventDefault()}function d(e){for(var t=e.length;t--;)if(e[t].addedNodes.length)return void o()}function a(e,t){return n?e.dataset[t]:e.getAttribute("data-"+t)}function g(e){return E.getElementById(e)}return i&&"loading"!==E.readyState?t():i&&v.addEventListener("DOMContentLoaded",t,!1),{init:o,moveForm:function(e,t,n,o,d){var i,l,r,a,m,c,s,e=g(e),n=(h=g(n),g(b.parentIdFieldId)),y=g(b.postIdFieldId),p=g(b.commentReplyTitleId),u=(p=p&&p.firstChild)&&p.nextSibling;if(e&&h&&n){void 0===d&&(d=p&&p.textContent),a=h,m=b.temporaryFormId,c=g(m),s=(s=g(b.commentReplyTitleId))?s.firstChild.textContent:"",c||((c=E.createElement("div")).id=m,c.style.display="none",c.textContent=s,a.parentNode.insertBefore(c,a)),o&&y&&(y.value=o),n.value=t,I.style.display="",e.parentNode.insertBefore(h,e.nextSibling),p&&p.nodeType===Node.TEXT_NODE&&(u&&"A"===u.nodeName&&u.id!==b.cancelReplyId&&(u.style.display="none"),p.textContent=d),I.onclick=function(){return!1};try{for(var f=0;f<C.elements.length;f++)if(i=C.elements[f],l=!1,"getComputedStyle"in v?r=v.getComputedStyle(i):E.documentElement.currentStyle&&(r=i.currentStyle),(i.offsetWidth<=0&&i.offsetHeight<=0||"hidden"===r.visibility)&&(l=!0),"hidden"!==i.type&&!i.disabled&&!l){i.focus();break}}catch(e){}return!1}}}}(window);; 3/** 4 * Theme functions file. 5 * 6 * Contains handlers for navigation, accessibility, header sizing 7 * footer widgets and Featured Content slider 8 * 9 */ 10( function( $ ) { 11 var body = $( 'body' ), 12 _window = $( window ), 13 nav, button, menu; 14 15 nav = $( '#primary-navigation' ); 16 button = nav.find( '.menu-toggle' ); 17 menu = nav.find( '.nav-menu' ); 18 19 // Enable menu toggle for small screens. 20 ( function() { 21 if ( ! nav.length || ! button.length ) { 22 return; 23 } 24 25 // Hide button if menu is missing or empty. 26 if ( ! menu.length || ! menu.children().length ) { 27 button.hide(); 28 return; 29 } 30 31 button.on( 'click.twentyfourteen', function() { 32 nav.toggleClass( 'toggled-on' ); 33 if ( nav.hasClass( 'toggled-on' ) ) { 34 $( this ).attr( 'aria-expanded', 'true' ); 35 menu.attr( 'aria-expanded', 'true' ); 36 } else { 37 $( this ).attr( 'aria-expanded', 'false' ); 38 menu.attr( 'aria-expanded', 'false' ); 39 } 40 } ); 41 } )(); 42 43 /* 44 * Makes "skip to content" link work correctly in IE9 and Chrome for better 45 * accessibility. 46 * 47 * @link http://www.nczonline.net/blog/2013/01/15/fixing-skip-to-content-links/ 48 */
49 _window.on( 'hashchange.twentyfourteen', function() { 50 var hash = location.hash.substring( 1 ), element; 51 52 if ( ! hash ) { 53 return; 54 } 55 56 element = document.getElementById( hash ); 57 58 if ( element ) { 59 if ( ! /^(?:a|select|input|button|textarea)$/i.test( element.tagName ) ) { 60 element.tabIndex = -1; 61 } 62 63 element.focus(); 64 65 // Repositions the window on jump-to-anchor to account for header height. 66 window.scrollBy( 0, -80 ); 67 } 68 } ); 69 70 $( function() { 71 // Search toggle. 72 $( '.search-toggle' ).on( 'click.twentyfourteen', function( event ) { 73 var that = $( this ), 74 wrapper = $( '#search-container' ), 75 container = that.find( 'a' ); 76 77 that.toggleClass( 'active' ); 78 wrapper.toggleClass( 'hide' ); 79 80 if ( that.hasClass( 'active' ) ) { 81 container.attr( 'aria-expanded', 'true' ); 82 } else { 83 container.attr( 'aria-expanded', 'false' ); 84 } 85 86 if ( that.is( '.active' ) || $( '.search-toggle .screen-reader-text' )[0] === event.target ) { 87 wrapper.find( '.search-field' ).focus(); 88 } 89 } ); 90 91 /* 92 * Fixed header for large screen. 93 * If the header becomes more than 48px tall, unfix the header. 94 * 95 * The callback on the scroll event is only added if there is a header 96 * image and we are not on mobile. 97 */ 98 if ( _window.width() > 781 ) { 99 var mastheadHeight = $( '#masthead' ).height(), 100 toolbarOffset, mastheadOffset; 101 102 if ( mastheadHeight > 48 ) { 103 body.removeClass( 'masthead-fixed' ); 104 } 105 106 if ( body.is( '.header-image' ) ) { 107 toolbarOffset = body.is( '.admin-bar' ) ? $( '#wpadminbar' ).height() : 0; 108 mastheadOffset = $( '#masthead' ).offset().top - toolbarOffset; 109 110 _window.on( 'scroll.twentyfourteen', function() { 111 if ( _window.scrollTop() > mastheadOffset && mastheadHeight < 49 ) { 112 body.addClass( 'masthead-fixed' ); 113 } else { 114 body.removeClass( 'masthead-fixed' ); 115 } 116 } ); 117 } 118 } 119 120 // Focus styles for menus. 121 $( '.primary-navigation, .secondary-navigation' ).find( 'a' ).on( 'focus.twentyfourteen blur.twentyfourteen', function() { 122 $( this ).parents().toggleClass( 'focus' ); 123 } ); 124 } ); 125 126 /** 127 * Add or remove ARIA attributes. 128 * 129 * Uses jQuery's width() function to determine the size of the window and add 130 * the default ARIA attributes for the menu toggle if it's visible. 131 * 132 * @since Twenty Fourteen 1.4 133 */ 134 function onResizeARIA() { 135 if ( 781 > _window.width() ) { 136 button.attr( 'aria-expanded', 'false' ); 137 menu.attr( 'aria-expanded', 'false' ); 138 button.attr( 'aria-controls', 'primary-menu' ); 139 } else { 140 button.removeAttr( 'aria-expanded' ); 141 menu.removeAttr( 'aria-expanded' ); 142 button.removeAttr( 'aria-controls' ); 143 } 144 } 145 146 _window 147 .on( 'load.twentyfourteen', onResizeARIA ) 148 .on( 'resize.twentyfourteen', function() { 149 onResizeARIA(); 150 } ); 151 152 _window.on( 'load', function() { 153 var footerSidebar, 154 isCustomizeSelectiveRefresh = ( 'undefined' !== typeof wp && wp.customize && wp.customize.selectiveRefresh ); 155 156 // Arrange footer widgets vertically. 157 if ( typeof $.fn.masonry === 'function' ) { 158 footerSidebar = $( '#footer-sidebar' ); 159 footerSidebar.masonry( { 160 itemSelector: '.widget', 161 columnWidth: function( containerWidth ) { 162 return containerWidth / 4; 163 }, 164 gutterWidth: 0, 165 isResizable: true, 166 isRTL: $( 'body' ).is( '.rtl' ) 167 } ); 168 169 if ( isCustomizeSelectiveRefresh ) { 170 171 // Retain previous masonry-brick initial position. 172 wp.customize.selectiveRefresh.bind( 'partial-content-rendered', function( placement ) { 173 var copyPosition = ( 174 placement.partial.extended( wp.customize.widgetsPreview.WidgetPartial ) && 175 placement.removedNodes instanceof jQuery && 176 placement.removedNodes.is( '.masonry-brick' ) && 177 placement.container instanceof jQuery 178 ); 179 if ( copyPosition ) { 180 placement.container.css( { 181 position: placement.removedNodes.css( 'position' ), 182 top: placement.removedNodes.css( 'top' ),
183 left: placement.removedNodes.css( 'left' ) 184 } ); 185 } 186 } ); 187 188 // Re-arrange footer widgets after selective refresh event. 189 wp.customize.selectiveRefresh.bind( 'sidebar-updated', function( sidebarPartial ) { 190 if ( 'sidebar-3' === sidebarPartial.sidebarId ) { 191 footerSidebar.masonry( 'reloadItems' ); 192 footerSidebar.masonry( 'layout' ); 193 } 194 } ); 195 } 196 } 197 198 // Initialize audio and video players in Twenty_Fourteen_Ephemera_Widget widget when selectively refreshed in Customizer. 199 if ( isCustomizeSelectiveRefresh && wp.mediaelement ) { 200 wp.customize.selectiveRefresh.bind( 'partial-content-rendered', function() { 201 wp.mediaelement.initialize(); 202 } ); 203 } 204 205 // Initialize Featured Content slider. 206 if ( body.is( '.slider' ) ) { 207 $( '.featured-content' ).featuredslider( { 208 selector: '.featured-content-inner > article', 209 controlsContainer: '.featured-content' 210 } ); 211 } 212 } ); 213} )( jQuery ); 214; 215!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define([],t):"object"==typeof exports?exports.JetpackScriptDataModule=t():e.JetpackScriptDataModule=t()}(globalThis,()=>(()=>{"use strict";var e={729(e,t,r){r.d(t,{$8:()=>n.$8,IT:()=>n.IT,KS:()=>n.KS,L2:()=>n.L2,Sy:()=>n.Sy,au:()=>n.au,d_:()=>n.d_,e5:()=>n.e5,hT:()=>n.hT,lI:()=>n.lI,mH:()=>n.mH,oQ:()=>n.oQ,sV:()=>n.sV});var n=r(336)},336(e,t,r){function n(){return window.JetpackScriptData}function o(){return n()?.site}function i(e=""){return`${n()?.site.admin_url}${e}`}function u(e=""){return i(`admin.php?page=jetpack${e}`)}function a(e=""){return i(`admin.php?page=my-jetpack${e}`)}function c(){return n()?.site.plan?.features?.active??[]}function s(e){return-1!==c().indexOf(e)}function p(){return"wpcom"===n()?.site?.host}function f(){return"woa"===n()?.site?.host}function d(){return n()?.site?.is_wpcom_platform}function l(){return"unknown"===n()?.site?.host}function m(){return p()?"simple":f()?"woa":"jetpack"}function S(e){return n()?.user.current_user.capabilities[e]}r.d(t,{$8:()=>d,IT:()=>s,KS:()=>m,L2:()=>l,Sy:()=>p,au:()=>n,d_:()=>S,e5:()=>a,hT:()=>i,lI:()=>f,mH:()=>c,oQ:()=>u,sV:()=>o})}};const t={};function r(n){const o=t[n];if(void 0!==o)return o.exports;const i=t[n]={exports:{}};return e[n](i,i.exports,r),i.exports}r.d=(e,t)=>{for(var n in t)r.o(t,n)&&!r.o(e,n)&&Object.defineProperty(e,n,{enumerable:!0,get:t[n]})},r.o=(e,t)=>Object.hasOwn(e,t),r.r=e=>{Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})};let n={};r.r(n),r.d(n,{currentUserCan:()=>o.d_,getActiveFeatures:()=>o.mH,getAdminUrl:()=>o.hT,getJetpackAdminPageUrl:()=>o.oQ,getMyJetpackUrl:()=>o.e5,getScriptData:()=>o.au,getSiteData:()=>o.sV,getSiteType:()=>o.KS,isJetpackSelfHostedSite:()=>o.L2,isSimpleSite:()=>o.Sy,isWoASite:()=>o.lI,isWpcomPlatformSite:()=>o.$8,siteHasFeature:()=>o.IT});var o=r(729);return n})());; 216/** 217 * Observe how the user enters content into the comment form in order to determine whether it's a bot or not. 218 * 219 * Note that no actual input is being saved here, only counts and timings between events. 220 */ 221 222( function() { 223 // Passive event listeners are guaranteed to never call e.preventDefault(), 224 // but they're not supported in all browsers. Use this feature detection 225 // to determine whether they're available for use. 226 var supportsPassive = false; 227 228 try { 229 var opts = Object.defineProperty( {}, 'passive', { 230 get : function() { 231 supportsPassive = true; 232 } 233 } ); 234 235 window.addEventListener( 'testPassive', null, opts ); 236 window.removeEventListener( 'testPassive', null, opts ); 237 } catch ( e ) {} 238 239 function init() { 240 var input_begin = ''; 241 242 var keydowns = {}; 243 var lastKeyup = null; 244 var lastKeydown = null; 245 var keypresses = []; 246 247 var modifierKeys = []; 248 var correctionKeys = []; 249 250 var lastMouseup = null; 251 var lastMousedown = null; 252 var mouseclicks = []; 253 var mouseclickCoordinates = []; 254 255 var mousemoveTimer = null; 256 var lastMousemoveX = null; 257 var lastMousemoveY = null; 258 var lastMousemoveTime = null; 259 var mousemoveStart = null; 260 var mousemoves = []; 261 var intervalsBetweenMousemovesAndClicks = []; 262 263 var touchmoveCountTimer = null; 264 var touchmoveCount = 0; 265 266 var lastTouchEnd = null; 267 var lastTouchStart = null; 268 var touchEvents = []; 269 270 var scrollCountTimer = null; 271 var scrollCount = 0; 272 273 var correctionKeyCodes = [ 'Backspace', 'Delete', 'ArrowUp', 'ArrowDown', 'ArrowLeft', 'ArrowRight', 'Home', 'End', 'PageUp', 'PageDown' ]; 274 var modifierKeyCodes = [ 'Shift', 'CapsLock' ]; 275 276 var forms = document.querySelectorAll( 'form[method=post]' ); 277 278 for ( var i = 0; i < forms.length; i++ ) { 279 var form = forms[i]; 280 281 var formAction = form.getAttribute( 'action' ); 282 283 // Ignore forms that POST directly to other domains; these could be things like payment forms. 284 if ( formAction ) { 285 // Check that the form is posting to an external URL, not a path. 286 if ( formAction.indexOf( 'http://' ) == 0 || formAction.indexOf( 'https://' ) == 0 ) { 287 if ( formAction.indexOf( 'http://' + window.location.hostname + '/' ) != 0 && formAction.indexOf( 'https://' + window.location.hostname + '/' ) != 0 ) { 288 continue; 289 } 290 } 291 } 292 293 form.addEventListener( 'submit', function () { 294 var ak_bkp = prepare_array_for_request( keypresses ); 295 var ak_bmc = prepare_array_for_request( mouseclicks ); 296 var ak_bte = prepare_array_for_request( touchEvents ); 297 var ak_bmm = prepare_array_for_request( mousemoves ); 298 var ak_bcc = prepare_array_for_request( mouseclickCoordinates ); 299 var ak_bibmac = intervalsBetweenMousemovesAndClicks.slice( 0, 100 ).join( ';' ); 300 301 var input_fields = { 302 // When did the user begin entering any input? 303 'bib': input_begin, 304 305 // When was the form submitted? 306 'bfs': Date.now(), 307 308 // How many keypresses did they make? 309 'bkpc': keypresses.length, 310
311 // How quickly did they press a sample of keys, and how long between them? 312 'bkp': ak_bkp, 313 314 // How quickly did they click the mouse, and how long between clicks? 315 'bmc': ak_bmc, 316 317 // How many mouseclicks did they make? 318 'bmcc': mouseclicks.length, 319 320 // When did they press modifier keys (like Shift or Capslock)? 321 'bmk': modifierKeys.join( ';' ), 322 323 // When did they correct themselves? e.g., press Backspace, or use the arrow keys to move the cursor back 324 'bck': correctionKeys.join( ';' ), 325 326 // How many times did they move the mouse? 327 'bmmc': mousemoves.length, 328 329 // How many times did they move around using a touchscreen? 330 'btmc': touchmoveCount, 331 332 // How many times did they scroll? 333 'bsc': scrollCount, 334 335 // How quickly did they perform touch events, and how long between them? 336 'bte': ak_bte, 337 338 // How many touch events were there? 339 'btec' : touchEvents.length, 340 341 // How quickly did they move the mouse, and how long between moves? 342 'bmm' : ak_bmm, 343 344 // Click coordinates 345 'bcc' : ak_bcc, 346 347 // Milliseconds between last mouse movement and each click 348 'bibmac' : ak_bibmac 349 }; 350 351 var akismet_field_prefix = 'ak_'; 352 353 if ( this.getElementsByClassName ) { 354 // Check to see if we've used an alternate field name prefix. We store this as an attribute of the container around some of the Akismet fields. 355 var possible_akismet_containers = this.getElementsByClassName( 'akismet-fields-container' ); 356 357 for ( var containerIndex = 0; containerIndex < possible_akismet_containers.length; containerIndex++ ) { 358 var container = possible_akismet_containers.item( containerIndex ); 359 360 if ( container.getAttribute( 'data-prefix' ) ) { 361 akismet_field_prefix = container.getAttribute( 'data-prefix' ); 362 break; 363 } 364 } 365 } 366 367 for ( var field_name in input_fields ) { 368 var field = document.createElement( 'input' ); 369 field.setAttribute( 'type', 'hidden' ); 370 field.setAttribute( 'name', akismet_field_prefix + field_name ); 371 field.setAttribute( 'value', input_fields[ field_name ] ); 372 this.appendChild( field ); 373 } 374 }, supportsPassive ? { passive: true } : false ); 375 376 form.addEventListener( 'keydown', function ( e ) { 377 // If you hold a key down, some browsers send multiple keydown events in a row. 378 // Ignore any keydown events for a key that hasn't come back up yet. 379 if ( e.key in keydowns ) { 380 return; 381 } 382 383 var keydownTime = ( new Date() ).getTime(); 384 keydowns[ e.key ] = [ keydownTime ]; 385 386 if ( ! input_begin ) { 387 input_begin = keydownTime; 388 } 389 390 // In some situations, we don't want to record an interval since the last keypress -- for example, 391 // on the first keypress, or on a keypress after focus has changed to another element. Normally, 392 // we want to record the time between the last keyup and this keydown. But if they press a 393 // key while already pressing a key, we want to record the time between the two keydowns. 394 395 var lastKeyEvent = Math.max( lastKeydown, lastKeyup ); 396 397 if ( lastKeyEvent ) { 398 keydowns[ e.key ].push( keydownTime - lastKeyEvent ); 399 } 400 401 lastKeydown = keydownTime; 402 }, supportsPassive ? { passive: true } : false ); 403 404 form.addEventListener( 'keyup', function ( e ) { 405 if ( ! ( e.key in keydowns ) ) { 406 // This key was pressed before this script was loaded, or a mouseclick happened during the keypress, or... 407 return; 408 } 409 410 var keyupTime = ( new Date() ).getTime(); 411 412 if ( 'TEXTAREA' === e.target.nodeName || 'INPUT' === e.target.nodeName ) { 413 if ( -1 !== modifierKeyCodes.indexOf( e.key ) ) { 414 modifierKeys.push( keypresses.length - 1 ); 415 } else if ( -1 !== correctionKeyCodes.indexOf( e.key ) ) { 416 correctionKeys.push( keypresses.length - 1 ); 417 } else { 418 // ^ Don't record timings for keys like Shift or backspace, since they 419 // typically get held down for longer than regular typing. 420 421 var keydownTime = keydowns[ e.key ][0]; 422 423 var keypress = []; 424 425 // Keypress duration. 426 keypress.push( keyupTime - keydownTime ); 427 428 // Amount of time between this keypress and the previous keypress. 429 if ( keydowns[ e.key ].length > 1 ) { 430 keypress.push( keydowns[ e.key ][1] ); 431 } 432 433 keypresses.push( keypress ); 434 } 435 } 436
437 delete keydowns[ e.key ]; 438 439 lastKeyup = keyupTime; 440 }, supportsPassive ? { passive: true } : false ); 441 442 form.addEventListener( "focusin", function ( e ) { 443 lastKeydown = null; 444 lastKeyup = null; 445 keydowns = {}; 446 }, supportsPassive ? { passive: true } : false ); 447 448 form.addEventListener( "focusout", function ( e ) { 449 lastKeydown = null; 450 lastKeyup = null; 451 keydowns = {}; 452 }, supportsPassive ? { passive: true } : false ); 453 } 454 455 document.addEventListener( 'mousedown', function ( e ) { 456 lastMousedown = ( new Date() ).getTime(); 457 458 if ( lastMousemoveTime ) { 459 intervalsBetweenMousemovesAndClicks.push( lastMousedown - lastMousemoveTime ); 460 } 461 462 var mouseclickCoordinate = []; 463 464 var rect = e.target.getBoundingClientRect(); 465 var relativeX = e.clientX - rect.left; 466 var relativeY = e.clientY - rect.top; 467 468 // Pixel offset of the click within the target element. 469 mouseclickCoordinate.push( Math.round( relativeX ) ); 470 mouseclickCoordinate.push( Math.round( relativeY ) ); 471 472 // Percentage offset of the click within the target element. 473 mouseclickCoordinate.push( rect.width > 0 ? Math.round( relativeX / rect.width * 100 ) : 0 ); 474 mouseclickCoordinate.push( rect.height > 0 ? Math.round( relativeY / rect.height * 100 ) : 0 ); 475 476 mouseclickCoordinates.push( mouseclickCoordinate ); 477 }, supportsPassive ? { passive: true } : false ); 478 479 document.addEventListener( 'mouseup', function ( e ) { 480 if ( ! lastMousedown ) { 481 // If the mousedown happened before this script was loaded, but the mouseup happened after... 482 return; 483 } 484 485 var now = ( new Date() ).getTime(); 486 487 var mouseclick = []; 488 mouseclick.push( now - lastMousedown ); 489 490 if ( lastMouseup ) { 491 mouseclick.push( lastMousedown - lastMouseup ); 492 } 493 494 mouseclicks.push( mouseclick ); 495 496 lastMouseup = now; 497 498 // If the mouse has been clicked, don't record this time as an interval between keypresses. 499 lastKeydown = null; 500 lastKeyup = null; 501 keydowns = {}; 502 }, supportsPassive ? { passive: true } : false ); 503 504 document.addEventListener( 'mousemove', function ( e ) { 505 lastMousemoveTime = ( new Date() ).getTime(); 506 507 if ( mousemoveTimer ) { 508 clearTimeout( mousemoveTimer ); 509 mousemoveTimer = null; 510 } 511 else { 512 mousemoveStart = lastMousemoveTime; 513 lastMousemoveX = e.offsetX; 514 lastMousemoveY = e.offsetY; 515 } 516 517 mousemoveTimer = setTimeout( function ( theEvent, originalMousemoveStart ) { 518 var now = ( new Date() ).getTime() - 500; // To account for the timer delay. 519 520 var mousemove = []; 521 mousemove.push( now - originalMousemoveStart ); 522 mousemove.push( 523 Math.round( 524 Math.sqrt( 525 Math.pow( theEvent.offsetX - lastMousemoveX, 2 ) + 526 Math.pow( theEvent.offsetY - lastMousemoveY, 2 ) 527 ) 528 ) 529 ); 530 531 if ( mousemove[1] > 0 ) { 532 // If there was no measurable distance, then it wasn't really a move. 533 mousemoves.push( mousemove ); 534 } 535 536 mousemoveStart = null; 537 mousemoveTimer = null; 538 }, 500, e, mousemoveStart ); 539 }, supportsPassive ? { passive: true } : false ); 540 541 document.addEventListener( 'touchmove', function ( e ) { 542 if ( touchmoveCountTimer ) { 543 clearTimeout( touchmoveCountTimer ); 544 } 545 546 touchmoveCountTimer = setTimeout( function () { 547 touchmoveCount++; 548 }, 500 ); 549 }, supportsPassive ? { passive: true } : false ); 550 551 document.addEventListener( 'touchstart', function ( e ) { 552 lastTouchStart = ( new Date() ).getTime(); 553 }, supportsPassive ? { passive: true } : false ); 554 555 document.addEventListener( 'touchend', function ( e ) { 556 if ( ! lastTouchStart ) { 557 // If the touchstart happened before this script was loaded, but the touchend happened after... 558 return; 559 } 560 561 var now = ( new Date() ).getTime(); 562 563 var touchEvent = []; 564 touchEvent.push( now - lastTouchStart ); 565 566 if ( lastTouchEnd ) { 567 touchEvent.push( lastTouchStart - lastTouchEnd ); 568 } 569 570 touchEvents.push( touchEvent ); 571 572 lastTouchEnd = now; 573 574 // Don't record this time as an interval between keypresses. 575 lastKeydown = null; 576 lastKeyup = null; 577 keydowns = {}; 578 }, supportsPassive ? { passive: true } : false ); 579 580 document.addEventListener( 'scroll', function ( e ) {
581 if ( scrollCountTimer ) { 582 clearTimeout( scrollCountTimer ); 583 } 584 585 scrollCountTimer = setTimeout( function () { 586 scrollCount++; 587 }, 500 ); 588 }, supportsPassive ? { passive: true } : false ); 589 } 590 591 /** 592 * For the timing/coordinate data that is collected, don't send more than `limit` data points in the request. 593 * Choose a random slice and send those, with each batch separated by semicolons and the items in each batch 594 * separated by commas. 595 */ 596 function prepare_array_for_request( a, limit ) { 597 if ( ! limit ) { 598 limit = 100; 599 } 600 601 var rv = ''; 602 603 if ( a.length > 0 ) { 604 var random_starting_point = Math.max( 0, Math.floor( Math.random() * a.length - limit ) ); 605 606 for ( var i = 0; i < limit && i < a.length; i++ ) { 607 var entry = a[ random_starting_point + i ]; 608 rv += entry.join( ',' ) + ';'; 609 } 610 } 611 612 return rv; 613 } 614 615 if ( document.readyState !== 'loading' ) { 616 init(); 617 } else { 618 document.addEventListener( 'DOMContentLoaded', init ); 619 } 620})();; 621void ( function ( d, s, id ) { 622 var js, 623 fjs = d.getElementsByTagName( s )[ 0 ], 624 p = /^http:/.test( d.location ) ? 'http' : 'https'; 625 if ( ! d.getElementById( id ) ) { 626 js = d.createElement( s ); 627 js.id = id; 628 js.src = p + '://platform.twitter.com/widgets.js'; 629 fjs.parentNode.insertBefore( js, fjs ); 630 } 631} )( document, 'script', 'twitter-wjs' ); 632;
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.