!function(){"use strict";var t={response:null,getEndpointURL:function(t){var e,s="undefined"!=typeof wp&&wp.customize&&wp.customize.settings&&wp.customize.settings.url&&wp.customize.settings.url.self;s?(e=document.createElement("a")).href=wp.customize.settings.url.self:e=document.location,"string"==typeof t&&t.match(/^https?:\/\//)&&((e=document.createElement("a")).href=t);var a="relatedposts=1",o=document.querySelector("#jp-relatedposts");if(!o)return!1;o.hasAttribute("data-exclude")&&(a+="&relatedposts_exclude="+o.getAttribute("data-exclude")),s&&(a+="&jetpackrpcustomize=1");var r=e.pathname;return"/"!==r[0]&&(r="/"+r),""===e.search?r+"?"+a:r+e.search+"&"+a},getAnchor:function(t,e){var s=t.title,a=document.createElement("a");a.setAttribute("class",e),a.setAttribute("href",t.url),a.setAttribute("title",s),a.setAttribute("data-origin",t.url_meta.origin),a.setAttribute("data-position",t.url_meta.position),""!==t.rel&&a.setAttribute("rel",t.rel);var o=document.createElement("div");o.appendChild(a);var r=o.innerHTML;return[r.substring(0,r.length-4),""]},generateMinimalHtml:function(t,e){var s=this,a="";return t.forEach((function(t,o){var r=s.getAnchor(t,"jp-relatedposts-post-a"),p="jp-relatedposts-post jp-relatedposts-post"+o;t.classes.length>0&&(p+=" "+t.classes.join(" ")),a+='

',a+=''+r[0]+t.title+r[1]+"",e.showDate&&(a+='"),e.showContext&&(a+=''+t.context+""),a+="

"})),'"},generateVisualHtml:function(t,e){var s=this,a="";return t.forEach((function(t,o){var r=s.getAnchor(t,"jp-relatedposts-post-a"),p="jp-relatedposts-post jp-relatedposts-post"+o;t.classes.length>0&&(p+=" "+t.classes.join(" ")),t.img.src?p+=" jp-relatedposts-post-thumbs":p+=" jp-relatedposts-post-nothumbs";var i=document.createElement("p");i.innerHTML=t.excerpt;var n=i.textContent;if(a+='
',t.img.src)a+=r[0]+''+t.img.alt_text+''+r[1];else{var l=s.getAnchor(t,"jp-relatedposts-post-a jp-relatedposts-post-aoverlay");a+=l[0]+l[1]}a+="<"+related_posts_js_options.post_heading+' class="jp-relatedposts-post-title">'+r[0]+t.title+r[1]+"",a+='

'+n+"

",e.showDate&&(a+='"),e.showContext&&(a+='

'+t.context+"

"),a+="
"})),'"},setVisualExcerptHeights:function(){var t=document.querySelectorAll("#jp-relatedposts .jp-relatedposts-post-nothumbs .jp-relatedposts-post-excerpt");if(t.length)for(var e=getComputedStyle(t[0]),s=parseInt(e.fontSize,10),a=parseInt(e.lineHeight,10),o=0;o-1){continue};l[i]=e[i]};return l};function b(e,t,n){if(!monsterinsights_frontend.v4_id||e!=='event'){return};var i=n.event_category||'',a=['event_name','event_category','event_label','value',],l=p(n,null,a);l.action=t;l.send_to=monsterinsights_frontend.v4_id;let hitType=i.replace('-','_');if(i.indexOf('outbound-link')!==-1){hitType='click'} else if(i==='download'){hitType='file_download'};__gtagTracker(e,hitType,l)};function l(t,i,l,a){t=typeof t!=='undefined'?t:'event';i=typeof i!=='undefined'?i:'';a=typeof a!=='undefined'?a:[];l=typeof l!=='undefined'?l:{};b(t,i,l);e.valuesArray=a;e.fieldsArray=l;e.fieldsArray.event_action=i;e.tracked=!0;n('Tracked: '+a.type);n(e)};function y(t,i,l,a){t=typeof t!=='undefined'?t:'event';i=typeof i!=='undefined'?i:'';a=typeof a!=='undefined'?a:[];l=typeof l!=='undefined'?l:{};__gtagTracker(t,i,l);e.valuesArray=a;e.fieldsArray=l;e.fieldsArray.event_action=i;e.tracked=!0;n('Tracked: '+a.type);n(e)};function t(t){t=typeof t!=='undefined'?t:[];e.valuesArray=t;e.fieldsArray=[];e.tracked=!1;n('Not Tracked: '+t.exit);n(e)};function n(e){if(d()){console.dir(e)}};function o(e){return e.replace(/^\s+|\s+$/gm,'')};function c(){var n=0,e=document.domain,i=e.split('.'),t='_gd'+(new Date()).getTime();while(n<(i.length-1)&&document.cookie.indexOf(t+'='+t)==-1){e=i.slice(-1-(++n)).join('.');document.cookie=t+'='+t+';domain='+e+';'};document.cookie=t+'=;expires=Thu, 01 Jan 1970 00:00:01 GMT;domain='+e+';';return e};function u(e){e=e.toString();e=e.substring(0,(e.indexOf('#')==-1)?e.length:e.indexOf('#'));e=e.substring(0,(e.indexOf('?')==-1)?e.length:e.indexOf('?'));e=e.substring(e.lastIndexOf('/')+1,e.length);if(e.length>0&&e.indexOf('.')!==-1){e=e.substring(e.lastIndexOf('.')+1);return e} else{return''}};function x(e){return e.which==1||e.which==2||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey};function h(){var e=[];if(typeof monsterinsights_frontend.download_extensions=='string'){e=monsterinsights_frontend.download_extensions.split(',')};return e};function g(){var e=[];if(typeof monsterinsights_frontend.inbound_paths=='string'){e=JSON.parse(monsterinsights_frontend.inbound_paths)};return e};function w(e){if(e.which==1){return'event.which=1'} else if(e.which==2){return'event.which=2'} else if(e.metaKey){return'metaKey'} else if(e.ctrlKey){return'ctrlKey'} else if(e.shiftKey){return'shiftKey'} else if(e.altKey){return'altKey'} else{return''}};function A(e){var f=h(),l=g(),t='unknown',d=e.href,v=u(e.href),m=c(),r=e.hostname,a=e.protocol,k=e.pathname;d=d.toString();var s,p,b=e.getAttribute('data-vars-ga-category');if(b){return b};if(d.match(/^javascript\:/i)){t='internal'} else if(a&&a.length>0&&(o(a)=='tel'||o(a)=='tel:')){t='tel'} else if(a&&a.length>0&&(o(a)=='mailto'||o(a)=='mailto:')){t='mailto'} else if(r&&m&&r.length>0&&m.length>0&&!r.endsWith('.'+m)&&r!==m){t='external'} else if(k&&JSON.stringify(l)!='{}'&&k.length>0){var y=l.length;for(var n=0;n0&&l[n].label.length>0&&k.startsWith(l[n].path)){t='internal-as-outbound';i='outbound-link-'+l[n].label;break}}} else if(r&&window.monsterinsights_experimental_mode&&r.length>0&&document.domain.length>0&&r!==document.domain){t='cross-hostname'};if(v&&(t==='unknown'||'external'===t)&&f.length>0&&v.length>0){for(s=0,p=f.length;s0&&(d.endsWith(f[s])||f[s]==v)){t='download';break}}};if(t==='unknown'){t='internal'};return t};function T(e,t){var n=(e.target&&!e.target.match(/^_(self|parent|top)$/i))?e.target:!1;if(t.ctrlKey||t.shiftKey||t.metaKey||t.which==2){n='_blank'};return n};function m(e){if(e.getAttribute('data-vars-ga-label')&&e.getAttribute('data-vars-ga-label').replace(/\n/ig,'')){return e.getAttribute('data-vars-ga-label').replace(/\n/ig,'')} else if(e.title&&e.title.replace(/\n/ig,'')){return e.title.replace(/\n/ig,'')} else if(e.innerText&&e.innerText.replace(/\n/ig,'')){return e.innerText.replace(/\n/ig,'')} else if(e.getAttribute('aria-label')&&e.getAttribute('aria-label').replace(/\n/ig,'')){return e.getAttribute('aria-label').replace(/\n/ig,'')} else if(e.alt&&e.alt.replace(/\n/ig,'')){return e.alt.replace(/\n/ig,'')} else if(e.textContent&&e.textContent.replace(/\n/ig,'')){return e.textContent.replace(/\n/ig,'')} else if(e.firstChild&&e.firstChild.tagName=='IMG'){return e.firstChild.src} else{return undefined}};function O(e){var i=e.children,l=0,a,n;for(var t=0;t>>0;if(i===0){return-1};t=i-1;if(arguments.length>1){t=Number(arguments[1]);if(t!=t){t=0} else if(t!=0&&t!=(1/0)&&t!=-(1/0)){t=(t>0||-1)*Math.floor(Math.abs(t))}};for(n=t>=0?Math.min(t,i-1):i-Math.abs(t);n>=0;n--){if(n in l&&l[n]===e){return n}};return-1}}},MonsterInsightsObject=new MonsterInsights();;