(function(){var supportsPassive=!1;try{var opts=Object.defineProperty({},'passive',{get:function(){supportsPassive=!0}});window.addEventListener('testPassive',null,opts);window.removeEventListener('testPassive',null,opts)}catch(e){} function init(){var input_begin='';var keydowns={};var lastKeyup=null;var lastKeydown=null;var keypresses=[];var modifierKeys=[];var correctionKeys=[];var lastMouseup=null;var lastMousedown=null;var mouseclicks=[];var mousemoveTimer=null;var lastMousemoveX=null;var lastMousemoveY=null;var mousemoveStart=null;var mousemoves=[];var touchmoveCountTimer=null;var touchmoveCount=0;var lastTouchEnd=null;var lastTouchStart=null;var touchEvents=[];var scrollCountTimer=null;var scrollCount=0;var correctionKeyCodes=['Backspace','Delete','ArrowUp','ArrowDown','ArrowLeft','ArrowRight','Home','End','PageUp','PageDown'];var modifierKeyCodes=['Shift','CapsLock'];var forms=document.querySelectorAll('form[method=post]');for(var i=0;i1){keypress.push(keydowns[e.key][1])} keypresses.push(keypress)}} delete keydowns[e.key];lastKeyup=keyupTime},supportsPassive?{passive:!0}:!1);form.addEventListener("focusin",function(e){lastKeydown=null;lastKeyup=null;keydowns={}},supportsPassive?{passive:!0}:!1);form.addEventListener("focusout",function(e){lastKeydown=null;lastKeyup=null;keydowns={}},supportsPassive?{passive:!0}:!1)} document.addEventListener('mousedown',function(e){lastMousedown=(new Date()).getTime()},supportsPassive?{passive:!0}:!1);document.addEventListener('mouseup',function(e){if(!lastMousedown){return} var now=(new Date()).getTime();var mouseclick=[];mouseclick.push(now-lastMousedown);if(lastMouseup){mouseclick.push(lastMousedown-lastMouseup)} mouseclicks.push(mouseclick);lastMouseup=now;lastKeydown=null;lastKeyup=null;keydowns={}},supportsPassive?{passive:!0}:!1);document.addEventListener('mousemove',function(e){if(mousemoveTimer){clearTimeout(mousemoveTimer);mousemoveTimer=null}else{mousemoveStart=(new Date()).getTime();lastMousemoveX=e.offsetX;lastMousemoveY=e.offsetY} mousemoveTimer=setTimeout(function(theEvent,originalMousemoveStart){var now=(new Date()).getTime()-500;var mousemove=[];mousemove.push(now-originalMousemoveStart);mousemove.push(Math.round(Math.sqrt(Math.pow(theEvent.offsetX-lastMousemoveX,2)+Math.pow(theEvent.offsetY-lastMousemoveY,2))));if(mousemove[1]>0){mousemoves.push(mousemove)} mousemoveStart=null;mousemoveTimer=null},500,e,mousemoveStart)},supportsPassive?{passive:!0}:!1);document.addEventListener('touchmove',function(e){if(touchmoveCountTimer){clearTimeout(touchmoveCountTimer)} touchmoveCountTimer=setTimeout(function(){touchmoveCount++},500)},supportsPassive?{passive:!0}:!1);document.addEventListener('touchstart',function(e){lastTouchStart=(new Date()).getTime()},supportsPassive?{passive:!0}:!1);document.addEventListener('touchend',function(e){if(!lastTouchStart){return} var now=(new Date()).getTime();var touchEvent=[];touchEvent.push(now-lastTouchStart);if(lastTouchEnd){touchEvent.push(lastTouchStart-lastTouchEnd)} touchEvents.push(touchEvent);lastTouchEnd=now;lastKeydown=null;lastKeyup=null;keydowns={}},supportsPassive?{passive:!0}:!1);document.addEventListener('scroll',function(e){if(scrollCountTimer){clearTimeout(scrollCountTimer)} scrollCountTimer=setTimeout(function(){scrollCount++},500)},supportsPassive?{passive:!0}:!1)} function prepare_timestamp_array_for_request(a,limit){if(!limit){limit=100} var rv='';if(a.length>0){var random_starting_point=Math.max(0,Math.floor(Math.random()*a.length-limit));for(var i=0;i=2){rv+=","+a[random_starting_point+i][1]} rv+=";"}} return rv} if(document.readyState!=='loading'){init()}else{document.addEventListener('DOMContentLoaded',init)}})(); !function(){var e=document.currentScript;function t(t){var n=document.createElement("script"),o=e||document.getElementsByTagName("script")[0];n.setAttribute("async",!0),n.setAttribute("src",t),o.parentNode.insertBefore(n,o)}function n(e,t){return Element.prototype.matches?e.matches(t):Element.prototype.msMatchesSelector?e.msMatchesSelector(t):void 0}function o(e,t){if(e.closest)return e.closest(t);var o=e;do{if(n(o,t))return o;o=o.parentElement||o.parentNode}while(null!==o&&1===o.nodeType);return null}function i(e,t){for(var n=0;n0&&c.inject_share_count("sharing-pinterest-"+WPCOM_sharing_counts[e.url],e.count)},inject_share_count:function(e,t){i(document.querySelectorAll("a[data-shared="+e+"] > span"),(function(e){var n,o=e.querySelector(".share-count");(n=o)&&n.parentNode&&n.parentNode.removeChild(n);var i=document.createElement("span");i.className="share-count",i.textContent=c.format_count(t),e.appendChild(i)}))},format_count:function(e){return e<1e3?e:e>=1e3&&e<1e4?String(e).substring(0,1)+"K+":"10K+"},bump_sharing_count_stat:function(e){(new Image).src=document.location.protocol+"//pixel.wp.com/g.gif?v=wpcom-no-pv&x_sharing-count-request="+e+"&r="+Math.random()}};window.WPCOMSharing=c}function u(e,t){e.setAttribute("jetpack-share-click-count",t)}function d(e){var t=e.getAttribute("jetpack-share-click-count");return null===t?0:parseInt(t,10)}function l(e,t){var n,o=new XMLHttpRequest;o.open("POST",e,!0),o.setRequestHeader("Content-Type","application/x-www-form-urlencoded; charset=UTF-8"),o.setRequestHeader("x-requested-with","XMLHttpRequest"),o.send((n=t,(encodeURIComponent("email-share-nonce")+"="+encodeURIComponent(n)).replace(/%20/g,"+")))}function h(){p()}function p(){window.WPCOMSharing&&window.WPCOMSharing.get_counts(),i(document.querySelectorAll(".sharedaddy a"),(function(e){var t=e.getAttribute("href");t&&-1!==t.indexOf("share=")&&-1===t.indexOf("&nb=1")&&e.setAttribute("href",t+"&nb=1")})),i(document.querySelectorAll(".sharedaddy a.sharing-anchor"),(function(e){a.instantiateOrReuse(e)})),void 0!==document.ontouchstart&&document.body.classList.add("jp-sharing-input-touch"),i(document.querySelectorAll(".sharedaddy ul"),(function(e){"true"!==e.getAttribute("data-sharing-events-added")&&(e.setAttribute("data-sharing-events-added","true"),i(e.querySelectorAll("a.share-print"),(function(e){e.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();var n=e.getAttribute("href")||"",i=function(){if(-1===n.indexOf("#print")){var e=(new Date).getTime();t=e,o=n,(i=document.createElement("iframe")).setAttribute("style","position:fixed; top:100; left:100; height:1px; width:1px; border:none;"),i.setAttribute("id","printFrame-"+t),i.setAttribute("name",i.getAttribute("id")),i.setAttribute("src",o),i.setAttribute("onload",'frames["printFrame-'+t+'"].focus();frames["printFrame-'+t+'"].print();'),document.body.appendChild(i)}else window.print();var t,o,i},s=o(e,r);if(s){var c=a.getButtonInstanceFromPane(s);c&&(c.close(),i())}else i()}))})),i(e.querySelectorAll("a.share-press-this"),(function(e){e.addEventListener("click",(function(t){t.preventDefault(),t.stopPropagation();var n="";if(window.getSelection?n=window.getSelection():document.getSelection?n=document.getSelection():document.selection&&(n=document.selection.createRange().text),n){var o=e.getAttribute("href");e.setAttribute("href",o+"&sel="+encodeURI(n))}window.open(e.getAttribute("href"),"t","toolbar=0,resizable=1,scrollbars=1,status=1,width=720,height=570")||(document.location.href=e.getAttribute("href"))}))})),i(e.querySelectorAll("a.share-email"),(function(t){u(t,0);var n,o,r=t.getAttribute("data-email-share-nonce"),s=t.getAttribute("data-email-share-track-url");r&&s&&(n=s,o=window.location.protocol+"//"+window.location.hostname+"/",0===String(n).indexOf(o))&&t.addEventListener("click",(function(){var n;u(n=t,d(n)+1),d(t)>2&&function(e,t){var n=t.parentElement;if(n.classList.contains("sd-content")){i(n.querySelectorAll(".share-email-error"),(function(e){e.parentElement.removeChild(e)}));var o=document.createElement("div");o.className="share-email-error";var r=document.createElement("h6");r.className="share-email-error-title",r.innerText=e.getAttribute("data-email-share-error-title"),o.appendChild(r);var s=document.createElement("p");s.className="share-email-error-text",s.innerText=e.getAttribute("data-email-share-error-text"),o.appendChild(s),n.appendChild(o)}}(t,e),l(s,r)}))})))})),i(document.querySelectorAll("li.share-email, li.share-custom a.sharing-anchor"),(function(e){e.classList.add("share-service-visible")}))}"loading"!==document.readyState?h():document.addEventListener("DOMContentLoaded",h),document.body.addEventListener("is.post-load",p)}();;