(()=>{var t={14:(t,e,i)=>{"use strict";i.d(e,{Z:()=>p});var n=i(191),o=i.n(n),s=i(261),r=i.n(s),a=i(160),d=i.n(a),l=new URL(i(240),i.b),c=r()(o()),u=d()(l);c.push([t.id,`.wordads-ad-wrapper {\n    position: absolute;\n    visibility: hidden;\n    font: 11px Arial, sans-serif;\n    letter-spacing: 1px;\n    text-decoration: none;\n    max-width: 100%;\n    margin: 25px auto;\n    padding: 0;\n    display: flex;\n    justify-content: center;\n}\n\n.wordads-ad-wrapper--sidebar,\n.wordads-ad-wrapper--gutenberg_skyscraper,\n.wordads-ad-wrapper--gutenberg_mobile_leaderboard {\n    font-size: 8px;\n}\n\n.wordads-ad-title {\n    margin: 0 auto 5px\n}\n\n.wordads-ad-controls {\n    margin: 5px auto 0;\n    text-align: right\n}\n\n.wordads-ad-controls span {\n    cursor: pointer\n}\n\n.wordads-ad {\n    margin: 0 auto;\n    width: fit-content;\n    max-width: 100%;\n    overflow: hidden;\n}\n\n.wordads-ad iframe {\n    margin: 0;\n    padding: 0\n}\n\n.wordads-ad.wordads-ad-responsive {\n    width: 100%;\n    max-width: unset\n}\n\n.wordads-ad-sticky-wrapper {\n    display: flex;\n    align-items: center;\n    justify-content: center;\n    margin: auto;\n    position: fixed;\n    transition: transform .2s ease-in-out;\n    user-select: none;\n    padding: 5px 0;\n    z-index: 49999\n}\n.wordads-ad-wrapper--bottom_sticky.wordads-ad-sticky-wrapper {\n    right: 0;\n    left: 0;\n    bottom: 0;\n    background: #f1f1f1;\n    transform: translate(0, 0);\n}\n.wordads-ad-wrapper--sidebar_sticky_right.wordads-ad-sticky-wrapper {\n    width: fit-content;\n    min-width: 120px;\n    top: max(calc(var(--wp-admin--admin-bar--height, 0px) + 24px), 10%);\n    right: 20px;\n}\n\n.wordads-ad-wrapper--sidebar_sticky_right .wordads-ad-content {\n    border: 1px solid #f1f1f1;\n}\n\n.wordads-ad-sticky-close-btn {\n    width: 28px;\n    height: 28px;\n    position: absolute;\n    box-sizing: content-box;\n    cursor: pointer;\n    overflow: hidden;\n    background-size: 28px;\n    background-repeat: no-repeat;\n    background-position: center;\n    background-image: url(${u})\n}\n\n.wordads-ad-wrapper--bottom_sticky .wordads-ad-sticky-close-btn {\n    top: -14px;\n    left: .75rem;\n}\n\n.wordads-ad-wrapper--sidebar_sticky_right .wordads-ad-sticky-close-btn {\n    top: -14px;\n    right: 0;\n}\n\n.wordads-ad-sticky {\n    width: auto;\n    max-width: initial;\n    max-height: inherit;\n}\n\n.wordads-ad-sticky .wordads-ad-title,\n.wordads-ad-sticky .wordads-ad-controls {\n    color: #333\n}\n\n.wordads-ad-hidden {\n    visibility: hidden;\n}\n\n.wordads-ad-wrapper--bottom_sticky.wordads-ad-hidden {\n    transform: translate(0, 1000px);\n}`,""]);const p=c},261:t=>{"use strict";t.exports=function(t){var e=[];return e.toString=function(){return this.map((function(e){var i="",n=void 0!==e[5];return e[4]&&(i+="@supports (".concat(e[4],") {")),e[2]&&(i+="@media ".concat(e[2]," {")),n&&(i+="@layer".concat(e[5].length>0?" ".concat(e[5]):""," {")),i+=t(e),n&&(i+="}"),e[2]&&(i+="}"),e[4]&&(i+="}"),i})).join("")},e.i=function(t,i,n,o,s){"string"==typeof t&&(t=[[null,t,void 0]]);var r={};if(n)for(var a=0;a<this.length;a++){var d=this[a][0];null!=d&&(r[d]=!0)}for(var l=0;l<t.length;l++){var c=[].concat(t[l]);n&&r[c[0]]||(void 0!==s&&(void 0===c[5]||(c[1]="@layer".concat(c[5].length>0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=s),i&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=i):c[2]=i),o&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=o):c[4]="".concat(o)),e.push(c))}},e}},160:t=>{"use strict";t.exports=function(t,e){return e||(e={}),t?(t=String(t.__esModule?t.default:t),/^['"].*['"]$/.test(t)&&(t=t.slice(1,-1)),e.hash&&(t+=e.hash),/["'() \t\n]|(%20)/.test(t)||e.needQuotes?'"'.concat(t.replace(/"/g,'\\"').replace(/\n/g,"\\n"),'"'):t):t}},191:t=>{"use strict";t.exports=function(t){return t[1]}},546:function(t){t.exports=function(){"use strict";function t(t){for(var e=1;e<arguments.length;e++){var i=arguments[e];for(var n in i)t[n]=i[n]}return t}return function e(i,n){function o(e,o,s){if("undefined"!=typeof document){"number"==typeof(s=t({},n,s)).expires&&(s.expires=new Date(Date.now()+864e5*s.expires)),s.expires&&(s.expires=s.expires.toUTCString()),e=encodeURIComponent(e).replace(/%(2[346B]|5E|60|7C)/g,decodeURIComponent).replace(/[()]/g,escape);var r="";for(var a in s)s[a]&&(r+="; "+a,!0!==s[a]&&(r+="="+s[a].split(";")[0]));return document.cookie=e+"="+i.write(o,e)+r}}return Object.create({set:o,get:function(t){if("undefined"!=typeof document&&(!arguments.length||t)){for(var e=document.cookie?document.cookie.split("; "):[],n={},o=0;o<e.length;o++){var s=e[o].split("="),r=s.slice(1).join("=");try{var a=decodeURIComponent(s[0]);if(n[a]=i.read(r,a),t===a)break}catch(t){}}return t?n[t]:n}},remove:function(e,i){o(e,"",t({},i,{expires:-1}))},withAttributes:function(i){return e(this.converter,t({},this.attributes,i))},withConverter:function(i){return e(t({},this.converter,i),this.attributes)}},{attributes:{value:Object.freeze(n)},converter:{value:Object.freeze(i)}})}({read:function(t){return'"'===t[0]&&(t=t.slice(1,-1)),t.replace(/(%[\dA-F]{2})+/gi,decodeURIComponent)},write:function(t){return encodeURIComponent(t).replace(/%(2[346BF]|3[AC-F]|40|5[BDE]|60|7[BCD])/g,decodeURIComponent)}},{path:"/"})}()},462:(t,e,i)=>{"use strict";i.r(e),i.d(e,{default:()=>w});var n=i(157),o=i.n(n),s=i(869),r=i.n(s),a=i(318),d=i.n(a),l=i(825),c=i.n(l),u=i(597),p=i.n(u),h=i(770),g=i.n(h),m=i(14),f={};f.styleTagTransform=g(),f.setAttributes=c(),f.insert=d().bind(null,"head"),f.domAPI=r(),f.insertStyleElement=p(),o()(m.Z,f);const w=m.Z&&m.Z.locals?m.Z.locals:void 0},157:t=>{"use strict";var e=[];function i(t){for(var i=-1,n=0;n<e.length;n++)if(e[n].identifier===t){i=n;break}return i}function n(t,n){for(var s={},r=[],a=0;a<t.length;a++){var d=t[a],l=n.base?d[0]+n.base:d[0],c=s[l]||0,u="".concat(l," ").concat(c);s[l]=c+1;var p=i(u),h={css:d[1],media:d[2],sourceMap:d[3],supports:d[4],layer:d[5]};if(-1!==p)e[p].references++,e[p].updater(h);else{var g=o(h,n);n.byIndex=a,e.splice(a,0,{identifier:u,updater:g,references:1})}r.push(u)}return r}function o(t,e){var i=e.domAPI(e);return i.update(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap&&e.supports===t.supports&&e.layer===t.layer)return;i.update(t=e)}else i.remove()}}t.exports=function(t,o){var s=n(t=t||[],o=o||{});return function(t){t=t||[];for(var r=0;r<s.length;r++){var a=i(s[r]);e[a].references--}for(var d=n(t,o),l=0;l<s.length;l++){var c=i(s[l]);0===e[c].references&&(e[c].updater(),e.splice(c,1))}s=d}}},318:t=>{"use strict";var e={};t.exports=function(t,i){var n=function(t){if(void 0===e[t]){var i=document.querySelector(t);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(t){i=null}e[t]=i}return e[t]}(t);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");n.appendChild(i)}},597:t=>{"use strict";t.exports=function(t){var e=document.createElement("style");return t.setAttributes(e,t.attributes),t.insert(e,t.options),e}},825:(t,e,i)=>{"use strict";t.exports=function(t){var e=i.nc;e&&t.setAttribute("nonce",e)}},869:t=>{"use strict";t.exports=function(t){if("undefined"==typeof document)return{update:function(){},remove:function(){}};var e=t.insertStyleElement(t);return{update:function(i){!function(t,e,i){var n="";i.supports&&(n+="@supports (".concat(i.supports,") {")),i.media&&(n+="@media ".concat(i.media," {"));var o=void 0!==i.layer;o&&(n+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),n+=i.css,o&&(n+="}"),i.media&&(n+="}"),i.supports&&(n+="}");var s=i.sourceMap;s&&"undefined"!=typeof btoa&&(n+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(s))))," */")),e.styleTagTransform(n,t,e.options)}(e,t,i)},remove:function(){!function(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t)}(e)}}}},770:t=>{"use strict";t.exports=function(t,e){if(e.styleSheet)e.styleSheet.cssText=t;else{for(;e.firstChild;)e.removeChild(e.firstChild);e.appendChild(document.createTextNode(t))}}},501:(t,e,i)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.getSortedSlotSizes=e.getFilteredSlotSizesByWidthAndHeight=e.getFilteredSlotSizesByWidth=e.MAX_INLINE_BLAZE_SLOTS=e.MAX_INLINE_SLOTS=void 0;const n=i(639);e.MAX_INLINE_SLOTS=20,e.MAX_INLINE_BLAZE_SLOTS=20,e.getFilteredSlotSizesByWidth=(t,e)=>(s[t]||[]).filter((([t])=>t<=e)),e.getFilteredSlotSizesByWidthAndHeight=(t,e,i)=>(s[t]||[]).filter((([t,n])=>t<=e&&n<=i));const o=document.documentElement.clientWidth<800,s=Object.freeze({[n.SlotType.TOP]:o?[[320,50]]:[[970,250],[970,90],[728,90]],[n.SlotType.INLINE]:o?[[300,250],[320,50]]:[[970,250],[728,90],[300,250]],[n.SlotType.BELOW_POST]:o?[[300,250]]:[[300,250],[728,90]],[n.SlotType.BOTTOM_STICKY]:o?[[320,50],[468,60]]:[[728,90],[970,90]],[n.SlotType.SIDEBAR]:o?[[120,600],[160,600],[300,250],[300,400],[300,600]]:[[120,600],[160,600],[300,600]],[n.SlotType.SIDEBAR_STICKY_RIGHT]:o?[]:[[120,600],[160,600],[300,250],[300,600],[400,600]],[n.SlotType.GUTENBERG_RECTANGLE]:[[300,250]],[n.SlotType.GUTENBERG_LEADERBOARD]:[[728,90]],[n.SlotType.GUTENBERG_MOBILE_LEADERBOARD]:[[320,50]],[n.SlotType.GUTENBERG_SKYSCRAPER]:[[160,600]],[n.SlotType.SIDEBAR_WIDGET_MEDIUMRECTANGLE]:[[300,250]],[n.SlotType.SIDEBAR_WIDGET_LEADERBOARD]:[[728,90]],[n.SlotType.SIDEBAR_WIDGET_WIDESKYSCRAPER]:[[160,600]],[n.SlotType.SHORTCODE]:[[300,250]]});e.getSortedSlotSizes=t=>s[t].sort(((t,e)=>{const i=e[0]-t[0];return 0!==i?i:e[1]-t[1]}))},586:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.SMART_NETWORK_ID=void 0,e.SMART_NETWORK_ID=3905},342:function(t,e,i){"use strict";var n=this&&this.__importDefault||function(t){return t&&t.__esModule?t:{default:t}};Object.defineProperty(e,"__esModule",{value:!0});const o=n(i(546)),s=i(501),r=i(639),a=i(49),d=i(313),l=i(586);i(462);const c=i(444),u=new class{constructor(){this.tcData=null,this.usPrivacy=null,this.logging="function"==typeof URLSearchParams&&"true"===new URLSearchParams(window.location.search).get("wordads-logging"),this.slots=[],this.initialized=!1,this.uid=null,this.config={},this.scroll={lastDirection:d.ScrollDirection.DOWN,lastY:window.scrollY}}log(t){this.logging&&console.log(t)}logSlot(t,e){if(!this.logging)return;const i=t.sizes.map((([t,e])=>t+"x"+e)).join(","),n=[t.type,t.tagId,i].join("|");this.log(`[${n}] ${e}`)}trackStat(t){window._stq=window._stq||[],window._stq.push(["extra",{x_wordads_smart:t}])}recordTracksEvent(t,e){e=e||{},window._tkq=window._tkq||[],window._tkq.push(["recordEvent",t,e])}createAdSnippet(t,e){let i=document.createElement("div"),n=document.createElement("div"),o=document.createElement("div"),s=document.createElement("div");if(i.classList.add("wordads-ad"),n.classList.add("wordads-ad-title"),o.classList.add("wordads-ad-content"),s.classList.add("wordads-ad-controls"),n.innerText=this.config._.title,o.id=t,e){const{maxHeight:t,maxWidth:i}=(0,c.getMaxSlotDimension)(e);o.setAttribute("data-ad-height",t.toString()),o.setAttribute("data-ad-width",i.toString())}return s.innerHTML=this.tcData?`<span onclick="__tcfapi( 'showUi' )">${this.config._.privacy_settings}</span>`:"",i.appendChild(n),i.appendChild(o),i.appendChild(s),i}createBottomStickyAdSnippet(t){const e=(0,s.getSortedSlotSizes)(r.SlotType.BOTTOM_STICKY),i=this.createAdSnippet(t,e);i.classList.add("wordads-ad-sticky");const n=this.wrapSnippet(i,r.SlotType.BOTTOM_STICKY);n.classList.add("wordads-ad-sticky-wrapper");const o=()=>{this.toggleVisibility(n,d.ScrollDirection.DOWN)},a=document.createElement("div");return a.classList.add("wordads-ad-sticky-close-btn"),a.onclick=function(){n.remove(),document.removeEventListener("scroll",o)},n.insertBefore(a,i),{event:o,snippet:n}}createSidebarStickyAdSnippet(t,e){const i=this.createAdSnippet(t);i.classList.add("wordads-ad-sticky");const n=this.wrapSnippet(i,e);n.classList.add("wordads-ad-sticky-wrapper");const o=this.throttle((()=>{this.updateSidebarStickyVisibility(n)}),150),s=document.createElement("div");return s.classList.add("wordads-ad-sticky-close-btn"),s.onclick=function(){n.remove(),window.removeEventListener("resize",o),document.removeEventListener("scroll",o)},n.insertBefore(s,i),{event:o,snippet:n,adContent:i.querySelector(".wordads-ad-content")}}toggleVisibility(t,e){const i=window.scrollY>this.scroll.lastY?d.ScrollDirection.DOWN:d.ScrollDirection.UP,n=this.scroll.lastDirection===i;if(this.scroll.lastDirection=i,this.scroll.lastY=window.scrollY,n)return;const o="wordads-ad-hidden";e===i?t.classList.remove(o):t.classList.add(o)}wrapSnippet(t,e){const i=document.createElement("div");return i.classList.add("wordads-ad-wrapper"),i.classList.add(`wordads-ad-wrapper--${e}`),i.appendChild(t),i}insertAdBefore(t,e,i){const n=this.getRandomTagId(),o=this.createAdSnippet(n,i),s=this.wrapSnippet(o,e);t.insertAdjacentElement("beforebegin",s),this.slots.push({tagId:n,type:e,sizes:i,element:s,isLazy:!0})}callAdFlow(t){this.logSlot(t,"calling AdFlow");const e=new XMLHttpRequest;e.onreadystatechange=()=>{if(XMLHttpRequest.DONE===e.readyState){if(performance.mark(`${t.tagId}-end`),200!==e.status)return void this.handleNotOkayResponse(e.status,t);const i=JSON.parse(e.response),n=!!(null==i?void 0:i.content),o=!!(null==i?void 0:i.pixel);if(n){const t=document.createElement("script");t.type="application/javascript",t.innerHTML=i.content,document.body.appendChild(t)}if(o){const t=new XMLHttpRequest;t.open("GET",i.pixel),t.send()}this.trackAdFlowRequestLatency({slot:t,isBrandSafe:!0})}};const{maxHeight:i,maxWidth:n}=(0,c.getMaxSlotDimension)(t.sizes),o={site:{id:String(this.config.blog_id),is_wordads:this.config.is_wordads,page:window.location.href,language:this.config.blog_language},ad:{tag:t.tagId,format:t.type,max_width:n,max_height:i},user:{uid:this.getOrCreateUID(),gdpr:!1}};this.usPrivacy&&(o.user.us_privacy=this.usPrivacy),this.tcData&&(o.user.gdpr=!0,o.user.gdpr_consent=this.tcData.tcString),e.open("POST","https://af.pubmine.com?api_version=2"),e.setRequestHeader("Accept","application/json"),e.withCredentials=!0,performance.mark(`${t.tagId}-start`),e.send(JSON.stringify(o))}trackAdFlowRequestLatency(t){let e=performance.measure(`${t.slot.tagId}-duration`,`${t.slot.tagId}-start`,`${t.slot.tagId}-end`),i=Math.round(e.duration),n={ad_type:t.slot.type,request_time:i,theme:this.config.theme,is_brand_safe:t.isBrandSafe};navigator.connection&&(n.connection_effective_type=navigator.connection.effectiveType,n.connection_downlink=navigator.connection.downlink),this.recordTracksEvent("wpcom_wordads_adflow",n)}getOrCreateUID(){if(null!==this.uid)return this.uid;if(!this.hasUserConsent())return this.uid="",this.uid;const t="wordads_uid",e=o.default.get(t);if(e)return this.log(`Reused UID value ${e}`),this.uid=e,this.uid;const i=this.getCookiesSharedDomain(t,window.location.hostname);return window.localStorage&&!i||(this.uid=this.createUIDFromCookies(t,30,i)),this.uid=this.uid||this.getOrCreateUIDFromLocalStorage(t,30),this.log(`UID value: ${this.uid}`),this.uid}hasUserConsent(){return!this.tcData||!0===this.tcData.vendor.consents[496]&&!0===this.tcData.purpose.consents[1]}getCookiesSharedDomain(t,e){const i=e.split(".");if(i.length<=2)return null;let n=null,s=0;for(const r of i){if(s+=r.length,n=e.substring(s),s>=e.length)return null;const i=o.default.withAttributes({domain:n});if(i.set(t,"1")&&i.get(t))return i.remove(t),n;s++}return null}createUIDFromCookies(t,e,i){const n={expires:e,domain:i||window.location.hostname};this.log(`Created UID from Cookies on ${n.domain}`);const s=o.default.withAttributes(n),r=this.generateUIDValue();return s.set(t,r),r}getOrCreateUIDFromLocalStorage(t,e){this.log("UID from localStorage");const i=(localStorage.getItem(t)||"").split(":");let n=i[0];const o=(new Date).getTime();let s=parseInt(i[1]);return(!n||o>s)&&(n=this.generateUIDValue(),s=o+24*e*60*60*1e3,localStorage.setItem(t,n+":"+s)),n}generateUIDValue(){return Math.random().toString(36).substring(2,10)+(new Date).getTime().toString()}insertFallbackAd(t,e){let i=(window.sas_fallback||[]).filter((function(t){return t.type===e}));if(0===i.length)return t.remove(),void this.log(`No fallback found for ${e}, snippet removed`);let n=i[0].tag.replaceAll("{{unique_id}}",Math.trunc(1e6*Math.random())),o=document.createElement("div");o.innerHTML=n,n=o.childNodes[0].nodeValue;let s=document.createElement("div");s.innerHTML=n,t.style.position="relative",t.style.visibility="visible",t.innerHTML=s.innerHTML,s.querySelectorAll("script").forEach((function(t){t.parentNode&&t.parentNode.removeChild(t);let e=document.createElement("script");t.src?e.src=t.src:t.textContent?e.textContent=t.textContent:t.innerText&&(e.innerText=t.innerText),document.body.appendChild(e)})),this.trackStat("fallback_"+e)}getChildrenByTag(t,e){let i=[];for(let n=0;n<t.children.length;n++){let o=t.children[n];o.nodeName===e.toUpperCase()&&i.push(o)}return i}getFloatingElements(t){let e=[],i=t.getElementsByTagName("*");for(let t=0;t<i.length;t++){let n=i[t],o=getComputedStyle(n),s=o.getPropertyValue("position"),r=o.getPropertyValue("float");"relative"!==s&&"absolute"!==s&&"none"===r||e.push(n)}return e}getElementGlobalPosition(t){let e=t.getBoundingClientRect();return{top:e.top+window.scrollY,left:e.left+window.scrollX,bottom:e.top+window.scrollY+e.height,right:e.left+window.scrollX+e.width}}collidesWithElements(t,e){let i=this.getElementGlobalPosition(t),n=!1;return e.forEach((t=>{let e=this.getElementGlobalPosition(t);i.bottom<e.top||i.top>e.bottom||i.right<e.left||i.left>e.left||(n=!0)})),n}initInlineAds(){var t;if(!(null===(t=this.config.enabled_formats)||void 0===t?void 0:t.inline))return;this.log(`Initializing ${r.SlotType.INLINE}`);let e=document.getElementById("wordads-inline-marker");if(!e)return void this.trackStat("inline_no_marker");let i=e.parentElement;if(!i)return;const n=this.getAvailableWidth(i),o=(0,s.getFilteredSlotSizesByWidth)(r.SlotType.INLINE,n);e.remove();let a=0;const d=window.innerHeight,l=Math.ceil(1.35*d),c=Math.ceil(2.5*d);let u=i.getBoundingClientRect().top+window.scrollY+l;const p=this.getChildrenByTag(i,"p"),h=this.getFloatingElements(i);p.forEach((t=>{var e;const i=t.getBoundingClientRect().top+window.scrollY,n=t.previousElementSibling;if(i>u&&a<s.MAX_INLINE_SLOTS&&n&&"P"===n.nodeName&&n.textContent&&n.textContent.length>=140&&!this.collidesWithElements(t,h)){if(s.MAX_INLINE_BLAZE_SLOTS>a){if(!(null===(e=this.config.enabled_formats)||void 0===e?void 0:e.inline))return;this.insertAdBefore(t,r.SlotType.INLINE,o),this.trackStat("render_inline")}else{let e=document.createElement("div");e.className="wordads-ad-wrapper",t.insertAdjacentElement("beforebegin",e),this.insertFallbackAd(e,r.SlotType.INLINE),this.trackStat("render_inline_fallback")}u=i+c,a++}})),0===a&&this.trackStat("inline_no_insert")}initBottomSticky(){var t;if(!(null===(t=this.config.enabled_formats)||void 0===t?void 0:t.bottom_sticky))return;this.log(`Initializing ${r.SlotType.BOTTOM_STICKY}`);const e=this.getRandomTagId(),{event:i,snippet:n}=this.createBottomStickyAdSnippet(e);document.body.append(n);const o=document.documentElement.clientWidth,a=(0,s.getFilteredSlotSizesByWidth)(r.SlotType.BOTTOM_STICKY,o);this.slots.push({tagId:e,type:r.SlotType.BOTTOM_STICKY,sizes:a,element:n,isLazy:!1,onAd:function(){document.addEventListener("scroll",i,{passive:!0})}})}initSidebarStickyRight(){var t;if(!(null===(t=this.config.enabled_formats)||void 0===t?void 0:t.sidebar_sticky_right))return;this.log(`Initializing ${r.SlotType.SIDEBAR_STICKY_RIGHT}`);const e=this.getRandomTagId(),{event:i,snippet:n,adContent:o}=this.createSidebarStickyAdSnippet(e,r.SlotType.SIDEBAR_STICKY_RIGHT);document.body.append(n);const{maxWidth:a,maxHeight:d}=this.getMaxAvailableSidebarStickySize(n);null==o||o.setAttribute("data-ad-height",d.toString()),null==o||o.setAttribute("data-ad-width",a.toString());const l=(0,s.getFilteredSlotSizesByWidthAndHeight)(r.SlotType.SIDEBAR_STICKY_RIGHT,a,d);l.length&&this.slots.push({tagId:e,type:r.SlotType.SIDEBAR_STICKY_RIGHT,sizes:l,element:n,isLazy:!1,onAd:()=>{this.updateSidebarStickyVisibility(n),window.addEventListener("resize",i,{passive:!0}),document.addEventListener("scroll",i,{passive:!0})}})}initTop(){var t;if(!(null===(t=this.config.enabled_formats)||void 0===t?void 0:t.top))return;this.log(`Initializing ${r.SlotType.TOP}`);const e=Array.from(document.getElementsByClassName("wordads-tag"));let[i]=e.filter((t=>t.dataset.slotType===r.SlotType.TOP));if(!i)return void this.log(`${r.SlotType.TOP} tag not found`);if(i.style.display="",screen.availHeight>=i.getBoundingClientRect().y)return;this.log(`${r.SlotType.TOP} tag relocated to the top`);const n=document.getElementById("wpcom-gifting-banner");n?n.insertAdjacentElement("afterend",i):document.body.prepend(i)}updateSidebarStickyVisibility(t){const e=t.offsetHeight;this.isWithinViewportHeight(e)&&!this.checkIfAdIsOverlappingContent(t)?(this.log("sidebar_sticky_right: ad slot can fit"),t.style.visibility="visible"):(this.log("sidebar_sticky_right: ad slot CANNOT fit"),t.style.visibility="hidden")}isWithinViewportHeight(t){return t<=.8*window.innerHeight}isElemOverlappingAtPoint(t,e,i){return document.elementsFromPoint(t,e).filter((t=>{return!((e=t)===document.body||e===document.documentElement||i.contains(e));var e})).length>0}checkIfAdIsOverlappingContent(t){const e=t.getBoundingClientRect();return this.isElemOverlappingAtPoint(e.left,e.top,t)||this.isElemOverlappingAtPoint(e.left,e.bottom,t)}getMaxAvailableSidebarStickySize(t){const e=(0,s.getSortedSlotSizes)(r.SlotType.SIDEBAR_STICKY_RIGHT);for(const[i,n]of e){t.style.width=`${i}px`,t.style.height=`${n}px`;const e=this.checkIfAdIsOverlappingContent(t);if(t.style.width="",t.style.height="",!e&&this.isWithinViewportHeight(n))return this.log(`sidebar_sticky_right: max available size without overlap, [${i}, ${n}]`),{maxWidth:i,maxHeight:n}}return this.log("sidebar_sticky_right: no slot size fits available space"),{maxWidth:0,maxHeight:0}}initAdTags(){var t,e,i;this.log("Initializing ad tags");const n=Array.from(document.getElementsByClassName("wordads-tag"));for(let o=0;o<n.length;o++){const r=n[o],a=null!==(t=r.dataset.slotType)&&void 0!==t?t:"",d=this.getAvailableWidth(r.parentElement),l=(0,s.getFilteredSlotSizesByWidth)(a,d);this.log(`Initializing ad tag ${o+1}: ${a}, format name: ${a}`),a?(null===(i=null===(e=this.config)||void 0===e?void 0:e.enabled_formats)||void 0===i?void 0:i[a])?l.length?(this.insertAdBefore(r,a,l),r.remove()):(this.log(`No available sizes for slot type: ${a}`),r.remove()):(this.log(`Slot format not enabled: ${a}`),r.remove()):(this.log(`Slot type not provided: ${a}`),r.remove())}}getAvailableWidth(t){if(!t)return 0;const e=window.getComputedStyle(t),i=parseFloat(e.paddingLeft),n=parseFloat(e.paddingRight);return t.getBoundingClientRect().width-(i+n)}handleNoAd(t){let e=this.getSlotByTagId(t.tagId);e?(this.logSlot(e,`got NoAd from ${t.adNetwork}`),this.logSlot(e,"requesting fallback"),this.insertFallbackAd(e.element,e.type),this.trackStat("noad_"+e.type)):this.log(`NoAd: no slot found for tag id: ${t.tagId}`)}handleAd(t){const e=this.getSlotByTagId(t.tagId);e?(this.logSlot(e,`got Ad from ${t.adNetwork}`),r.StickySlotTypes.indexOf(e.type)>-1?e.element.style.position="fixed":e.element.style.position="relative",e.element.style.visibility="visible",e.onAd&&e.onAd(),this.trackStat("ad_"+e.type)):this.log(`Ad: no slot found for tag id: ${t.tagId}`)}handleNotOkayResponse(t,e){this.logSlot(e,"Unable to show ads"),204===t&&(p.abort(),this.trackAdFlowRequestLatency({slot:e,isBrandSafe:!1}))}handlePostMessage(t){if("object"!=typeof t.data)return;if("wa-inline-frame"!==t.data.type)return;const e=t;let i=document.getElementsByTagName("iframe");for(let t=0;t<i.length;t++)if(i[t].contentWindow===e.source){i[t].style.height=Math.ceil(e.data.height)+"px";let n=i[t].closest(".wordads-ad");n&&(n.classList.contains("wordads-ad-responsive")||n.classList.add("wordads-ad-responsive"),e.data.maxWidth&&n.querySelectorAll(".wordads-ad-title, .wordads-ad-controls").forEach((t=>{t.style.maxWidth=e.data.maxWidth})));break}}getSlotByTagId(t){return this.slots.find((e=>e.tagId===t))}getRandomTagId(){return"wordads-ad-"+Math.trunc(1e6*Math.random())}initConsent(){this.log("Initializing consent..."),window.__uspapi?(this.log("Querying USP API..."),window.__uspapi("getUSPData",1,((t,e)=>{e&&t.uspString&&(this.usPrivacy=t.uspString,this.log("USP API data found. Setting consent: "+this.usPrivacy))}))):this.log("USP API not found"),window.__tcfapi?(this.log("Querying TCF API..."),window.__tcfapi("addEventListener",2,((t,e)=>{var i;e&&t.gdprApplies?(this.tcData=t,this.log("TCF API data found. Setting consent: "+(null===(i=this.tcData)||void 0===i?void 0:i.tcString)),this.initCookieSync()):this.log("TCF API data found. GDPR does not apply")}))):this.log("TCF API not found")}initAditude(){this.log("Initializing Aditude"),window.tude=window.tude||{cmd:[]},window.Raven=window.Raven||{cmd:[]},window.Raven.cmd.push((({config:t})=>{const e={param1:String(this.config.blog_id),param2:String(this.config.is_wordads),param3:String(this.config.hosting_type),param4:this.config.theme};t.setCustom(e)})),window.tude.cmd.push((()=>{window.tude.events.addEventListener("tude_ad_filled",(t=>{this.log(`aditude debug event: tude_ad_filled ${t.detail.id}`),this.handleAd({adNetwork:a.AdNetwork.ADITUDE,tagId:t.detail.id})})),window.tude.events.addEventListener("tude_ad_unfilled",(t=>{this.log(`aditude debug event: tude_ad_unfilled ${t.detail.id}`),this.handleNoAd({adNetwork:a.AdNetwork.ADITUDE,tagId:t.detail.id})})),window.tude.events.addEventListener("tude_no_ad_sizes",(t=>{this.log(`aditude debug event: tude_no_ad_sizes ${t.detail.id}`),this.handleNoAd({adNetwork:a.AdNetwork.ADITUDE,tagId:t.detail.id})}))}))}initSmart(){this.log("Initializing Smart"),window.sas.cmd.push((function(){window.sas.setup({networkid:l.SMART_NETWORK_ID,domain:"https://www15.smartadserver.com",async:!0})})),window.sas.cmd.push((()=>{window.sas.events.on("ad",(t=>{this.handleAd(Object.assign(Object.assign({},t),{adNetwork:a.AdNetwork.SMART}))}))}))}initCookieSync(){this.log("Initializing Cookie Sync");let t=`https://sync.smartadserver.com/getuid?nwid=${l.SMART_NETWORK_ID}&url=https://af.pubmine.com/user-sync?pid=[sas_uid]`;this.tcData&&(t+=`&gdpr=1&gdpr_consent=${this.tcData.tcString}`),document.createElement("img").src=t}throttle(t,e){let i=!1;return(...n)=>{i||(t(...n),i=!0,setTimeout((()=>{i=!1}),e))}}isElementInLazyViewport(t){let e=window.innerHeight,i=window.scrollY,n=i-e,o=i+2*e,s=this.getElementGlobalPosition(t);return!(s.bottom<=n||s.top>=o)}processAds(){0!==this.slots.length&&this.slots.forEach((t=>{t.isLoaded||(!t.isLazy||this.isElementInLazyViewport(t.element))&&(this.logSlot(t,"in view"),t.isLoaded=!0,this.callAdFlow(t))}))}preInit(){this.log("Running Pre Init");let t=void 0!==window.sas,e=void 0!==window.tude;const i=()=>{t&&e&&(this.log("Both scripts loaded, initializing..."),"loading"!==document.readyState?this.init():document.addEventListener("DOMContentLoaded",(()=>{this.init()})))};if(!t){this.log("Fetching Smart script"),window.sas={cmd:[]};const e=document.createElement("script");e.src="https://ced.sascdn.com/tag/3905/smart.js",e.addEventListener("load",(()=>{this.log("Smart JS loaded"),t=!0,i()})),document.head.appendChild(e)}if(!e){this.log("Fetching Prebid script");const t=document.createElement("script");t.src="https://dn0qt3r0xannq.cloudfront.net/wordpress-2Pvwql52OT/wordpress-longform/prebid-load.js",t.addEventListener("load",(()=>{this.log("Prebid JS loaded"),e=!0,i()})),document.head.appendChild(t)}}init(){this.log("Init..."),this.mergeConfig(),this.initConsent(),this.initAditude(),this.initSmart(),this.initCookieSync(),this.initAds()}initAds(){this.initialized||(this.initialized=!0,this.initInlineAds(),this.initTop(),this.initBottomSticky(),this.initSidebarStickyRight(),this.initAdTags(),this.processAds())}deepMerge(t,e){for(let i in e)e.hasOwnProperty(i)&&(e[i]instanceof Object&&t[i]instanceof Object?t[i]=this.deepMerge(t[i],e[i]):t[i]=e[i]);return t}mergeConfig(){var t;this.config=null===(t=window.wa_client)||void 0===t?void 0:t.config;const e=this.getServerConfig();e&&(this.config=this.deepMerge(e,this.config)),this.config.enabled_formats=(0,c.convertFormatsToObject)(this.config.formats),this.log("Merged config:"),this.log(this.config)}getServerConfig(){const t=document.getElementById("adflow-configuration");if(!t)return null;const e=JSON.parse(t.innerText);if(void 0!==window.wa_smart){let[,t]=window.wa_smart.target.split(";");t=t.replace("language=","").split("_")[0];const i=[];for(const t of Object.values(r.SlotType)){const e=window.wa_smart[t];(null==e?void 0:e.enabled)&&i.push(t)}return Object.assign(Object.assign({},e),{blog_language:t,hosting_type:1,theme:window.wa_smart.theme,formats:i})}return e}};u.preInit();const p=new AbortController,{signal:h}=p;h.onabort=()=>u.log("Event listeners removed"),document.addEventListener("scroll",u.throttle((()=>{u.processAds()}),250),{signal:h}),document.addEventListener("resize",u.throttle((()=>{u.processAds()}),250),{signal:h}),window.addEventListener("message",(t=>{u.handlePostMessage(t)}),{signal:h})},49:(t,e)=>{"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.AdNetwork=void 0,function(t){t.ADITUDE="Aditude",t.SMART="Smart"}(i||(e.AdNetwork=i={}))},313:(t,e)=>{"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.ScrollDirection=void 0,function(t){t.UP="up",t.DOWN="down"}(i||(e.ScrollDirection=i={}))},639:(t,e)=>{"use strict";var i;Object.defineProperty(e,"__esModule",{value:!0}),e.StickySlotTypes=e.SlotType=void 0,function(t){t.TOP="top",t.INLINE="inline",t.BELOW_POST="belowpost",t.BOTTOM_STICKY="bottom_sticky",t.SIDEBAR="sidebar",t.SIDEBAR_STICKY_RIGHT="sidebar_sticky_right",t.GUTENBERG_RECTANGLE="gutenberg_rectangle",t.GUTENBERG_LEADERBOARD="gutenberg_leaderboard",t.GUTENBERG_MOBILE_LEADERBOARD="gutenberg_mobile_leaderboard",t.GUTENBERG_SKYSCRAPER="gutenberg_skyscraper",t.SIDEBAR_WIDGET_MEDIUMRECTANGLE="sidebar_widget_mediumrectangle",t.SIDEBAR_WIDGET_LEADERBOARD="sidebar_widget_leaderboard",t.SIDEBAR_WIDGET_WIDESKYSCRAPER="sidebar_widget_wideskyscraper",t.SHORTCODE="shortcode"}(i||(e.SlotType=i={})),e.StickySlotTypes=[i.BOTTOM_STICKY,i.SIDEBAR_STICKY_RIGHT]},444:(t,e)=>{"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.convertFormatsToObject=e.getMaxSlotDimension=void 0,e.getMaxSlotDimension=t=>{let e=0,i=0;return t.forEach((([t,n])=>{t>e&&(e=t),n>i&&(i=n)})),{maxWidth:e,maxHeight:i}},e.convertFormatsToObject=t=>t.reduce(((t,e)=>(t[e]=!0,t)),{})},240:t=>{"use strict";t.exports="data:image/svg+xml,%3Csvg width=%2730%27 height=%2730%27 viewBox=%270 0 30 30%27 fill=%27none%27 xmlns=%27http://www.w3.org/2000/svg%27%3E%3Crect x=%270.5%27 y=%270.5%27 width=%2729%27 height=%2729%27 rx=%2714.5%27 fill=%27white%27/%3E%3Crect x=%270.5%27 y=%270.5%27 width=%2729%27 height=%2729%27 rx=%2714.5%27 stroke=%27%23DDDDDF%27/%3E%3Cpath d=%27M19 11L15 15L19 19%27 stroke=%27%237C7F83%27 stroke-width=%271.5%27/%3E%3Cpath d=%27M11 19L15 15L11 11%27 stroke=%27%237C7F83%27 stroke-width=%271.5%27/%3E%3C/svg%3E"}},e={};function i(n){var o=e[n];if(void 0!==o)return o.exports;var s=e[n]={id:n,exports:{}};return t[n].call(s.exports,s,s.exports,i),s.exports}i.m=t,i.n=t=>{var e=t&&t.__esModule?()=>t.default:()=>t;return i.d(e,{a:e}),e},i.d=(t,e)=>{for(var n in e)i.o(e,n)&&!i.o(t,n)&&Object.defineProperty(t,n,{enumerable:!0,get:e[n]})},i.o=(t,e)=>Object.prototype.hasOwnProperty.call(t,e),i.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},i.b=document.baseURI||self.location.href,i.nc=void 0,i(342)})();;
( function() {
	var cookieValue = document.cookie.replace( /(?:(?:^|.*;\s*)eucookielaw\s*\=\s*([^;]*).*$)|^.*$/, '$1' );
	var overlay = document.querySelector( '#eu-cookie-law' );
	var container = document.querySelector( '.widget_eu_cookie_law_widget' );
	var initialScrollPosition, scrollFunction;

	function remove( el ) {
		return el && el.parentElement && el.parentElement.removeChild( el );
	}

	function triggerDismissEvent() {
		try {
			const dismissEvent = new Event( 'eucookielaw-dismissed' );
			document.dispatchEvent( dismissEvent );
		} catch ( err ) { }
	}

	function removeOverlay() {
		remove( overlay );
		triggerDismissEvent();
	}

	function fade( el, type, fn ) {
		var duration = 400;

		el.style.display = 'block';
		el.style.transitionProperty = 'opacity';
		el.style.transitionDuration = duration + 'ms';
		el.style.opacity = type === 'in' ? 0 : 1;

		// Double rAF to ensure styles are applied cross-browser.
		requestAnimationFrame( function () {
			requestAnimationFrame( function() {
				el.style.opacity = type === 'in' ? 1 : 0;
				// Wait for animation.
				setTimeout( function () {
					// Clean up.
					el.style.removeProperty( 'opacity' );
					el.style.removeProperty( 'transition-property' );
					el.style.removeProperty( 'transition-duration' );

					if ( type === 'out' ) {
						el.style.display = 'none';
					}

					if ( typeof fn === 'function' ) {
						fn();
					}
				}, duration + 50 );
			} );
		} );
	}

	function appendWidget() {
		document.body.appendChild( container );
		overlay.style.display = 'block';
		fade( container, 'in' );
	}

	if ( typeof wp !== 'undefined' && !! wp.customize ) {
		appendWidget();
		return;
	}

	if ( ! overlay || ! container ) {
		return;
	}

	if ( overlay.classList.contains( 'ads-active' ) ) {
		var adsCookieValue = document.cookie.replace( /(?:(?:^|.*;\s*)personalized-ads-consent\s*\=\s*([^;]*).*$)|^.*$/, '$1' );
		if ( cookieValue !== '' && adsCookieValue !== '' ) {
			removeOverlay();
		}
	} else if ( cookieValue !== '' ) {
		removeOverlay();
	}

	appendWidget();

	overlay.querySelector( 'form' ).addEventListener( 'submit', accept );

	if ( overlay.classList.contains( 'hide-on-scroll' ) ) {
		initialScrollPosition = window.pageYOffset;

		scrollFunction = function() {
			if ( Math.abs( window.pageYOffset - initialScrollPosition ) > 50 ) {
				accept();
			}
		};

		window.addEventListener( 'scroll', scrollFunction );
	} else if ( overlay.classList.contains( 'hide-on-time' ) ) {
		var timeout = parseInt( overlay.getAttribute( 'data-hide-timeout' ), 10 ) || 0;
		setTimeout( accept, timeout * 1000 );
	}

	var accepted = false;
	function accept( event ) {
		if ( accepted ) {
			return;
		}
		accepted = true;

		if ( event && event.preventDefault ) {
			event.preventDefault();
		}

		if ( overlay.classList.contains( 'hide-on-scroll' ) ) {
			window.removeEventListener( 'scroll', scrollFunction );
		}

		var expireTime = new Date();
		var consentExpiration = parseInt( overlay.getAttribute( 'data-consent-expiration' ), 10 ) || 0;
		expireTime.setTime( expireTime.getTime() + ( consentExpiration * 24 * 60 * 60 * 1000 ) );

		document.cookie = 'eucookielaw=' + expireTime.getTime() + ';path=/;expires=' + expireTime.toGMTString();
		if ( overlay.classList.contains( 'ads-active' ) && overlay.classList.contains( 'hide-on-button' ) ) {
			document.cookie = 'personalized-ads-consent=' + expireTime.getTime() + ';path=/;expires=' + expireTime.toGMTString();
		}

		fade( overlay, 'out', function() {
			removeOverlay();
			remove( container );
		} );
	}
} )();
;
/* global screenReaderText */
/**
 * Theme functions file.
 *
 * Contains handlers for navigation and widget area.
 */

( function( $ ) {
	var $body, $window, $sidebar, resizeTimer,
		secondary, button;

	function initMainNavigation( container ) {
		// Add dropdown toggle that display child menu items.
		container.find( '.menu-item-has-children > a' ).after( '<button class="dropdown-toggle" aria-expanded="false">' + screenReaderText.expand + '</button>' );

		// Toggle buttons and submenu items with active children menu items.
		container.find( '.current-menu-ancestor > button' ).addClass( 'toggle-on' );
		container.find( '.current-menu-ancestor > .sub-menu' ).addClass( 'toggled-on' );

		container.find( '.dropdown-toggle' ).click( function( e ) {
			var _this = $( this );
			e.preventDefault();
			_this.toggleClass( 'toggle-on' );
			_this.next( '.children, .sub-menu' ).toggleClass( 'toggled-on' );
			_this.attr( 'aria-expanded', _this.attr( 'aria-expanded' ) === 'false' ? 'true' : 'false' );
			_this.html( _this.html() === screenReaderText.expand ? screenReaderText.collapse : screenReaderText.expand );
		} );
	}
	initMainNavigation( $( '.main-navigation' ) );

	// Re-initialize the main navigation when it is updated, persisting any existing submenu expanded states.
	$( document ).on( 'customize-preview-menu-refreshed', function( e, params ) {
		if ( 'primary' === params.wpNavMenuArgs.theme_location ) {
			initMainNavigation( params.newContainer );

			// Re-sync expanded states from oldContainer.
			params.oldContainer.find( '.dropdown-toggle.toggle-on' ).each(function() {
				var containerId = $( this ).parent().prop( 'id' );
				$( params.newContainer ).find( '#' + containerId + ' > .dropdown-toggle' ).triggerHandler( 'click' );
			});
		}
	});

	secondary = $( '#secondary' );
	button = $( '.site-branding' ).find( '.secondary-toggle' );

	// Enable menu toggle for small screens.
	( function() {
		var menu, widgets, social;
		if ( ! secondary.length || ! button.length ) {
			return;
		}

		// Hide button if there are no widgets and the menus are missing or empty.
		menu    = secondary.find( '.nav-menu' );
		widgets = secondary.find( '#widget-area' );
		social  = secondary.find( '#social-navigation' );
		if ( ! widgets.length && ! social.length && ( ! menu.length || ! menu.children().length ) ) {
			button.hide();
			return;
		}

		button.on( 'click.twentyfifteen', function() {
			secondary.toggleClass( 'toggled-on' );
			secondary.trigger( 'resize' );
			$( this ).toggleClass( 'toggled-on' );
			if ( $( this, secondary ).hasClass( 'toggled-on' ) ) {
				$( this ).attr( 'aria-expanded', 'true' );
				secondary.attr( 'aria-expanded', 'true' );
			} else {
				$( this ).attr( 'aria-expanded', 'false' );
				secondary.attr( 'aria-expanded', 'false' );
			}
		} );
	} )();

	/**
	 * Add or remove ARIA attributes.
	 *
	 * Uses jQuery's width() function to determine the size of the window and add
	 * the default ARIA attributes for the menu toggle if it's visible.
	 *
	 * @since Twenty Fifteen 1.1
	 */
	function onResizeARIA() {
		if ( 955 > $window.width() ) {
			button.attr( 'aria-expanded', 'false' );
			secondary.attr( 'aria-expanded', 'false' );
			button.attr( 'aria-controls', 'secondary' );
		} else {
			button.removeAttr( 'aria-expanded' );
			secondary.removeAttr( 'aria-expanded' );
			button.removeAttr( 'aria-controls' );
		}
	}

	// Sidebar scrolling.
	function resizeAndScroll() {
		var windowPos = $window.scrollTop(),
			windowHeight = $window.height(),
			sidebarHeight = $sidebar.height(),
			pageHeight = $( '#page' ).height();

		if ( 955 < $window.width() && pageHeight > sidebarHeight && ( windowPos + windowHeight ) >= sidebarHeight ) {
			$sidebar.css({
				position: 'fixed',
				bottom: sidebarHeight > windowHeight ? 0 : 'auto'
			});
		} else {
			$sidebar.css('position', 'relative');
		}
	}

	$( function() {
		$body          = $( document.body );
		$window        = $( window );
		$sidebar       = $( '#sidebar' ).first();

		$window
			.on( 'scroll.twentyfifteen', resizeAndScroll )
			.on( 'load.twentyfifteen', onResizeARIA )
			.on( 'resize.twentyfifteen', function() {
				clearTimeout( resizeTimer );
				resizeTimer = setTimeout( resizeAndScroll, 500 );
				onResizeARIA();
			} );
		$sidebar.on( 'click.twentyfifteen keydown.twentyfifteen', 'button', resizeAndScroll );

		for ( var i = 0; i < 6; i++ ) {
			setTimeout( resizeAndScroll, 100 * i );
		}
	} );

} )( jQuery );
;
( function( $ ) {
	var $body   = $( 'body' ),
	    $window = $( window );

	/**
	 * Add a body class for less than 955 viewport, IE8, and below.
	 * This is only for Custom Colors that doesn't handle media queries.
	 */
	function bodyClass() {
		if ( ( document.all && ! document.addEventListener ) || ( $window.width() <= 954 ) ) {
			$body.addClass( 'small-screen' );
		} else {
			$body.removeClass( 'small-screen' );
		}
	}

	function debouncedBodyClass() {
		var timeout;
		return function() {
			clearTimeout( timeout );
			timeout = setTimeout( function() {
				timeout = null;
				bodyClass();
			}, 150 );
		};
	}

	$( document ).ready( function() {
		$window
			.on( 'load.twentyfifteen', bodyClass() )
			.on( 'resize.twentyfifteen', debouncedBodyClass() );
	} );

} )( jQuery );
;
