setCookie = function (name, value, expirationInDays = 0) { const date = new Date(); date.setDate(date.getDate() + expirationInDays); const expires = date.toUTCString(); document.cookie = `${name}=${value};expires=${expires};path=/`; }; function getParameterValue(parameterKey, isCaseSensitive = true) { let urlParams = location.search.substring(1); urlParams = urlParams.split("&"); const parameterRegexPattern = new RegExp( parameterKey + "=", isCaseSensitive ? "" : "i" ); let parameterValue = urlParams.filter(param => param.match(parameterRegexPattern) ); if (parameterValue.length) { parameterValue = parameterValue[parameterValue.length - 1].replace( parameterRegexPattern, "" ); return parseInt(parameterValue); } return null; } customerSourceCookie = function () { const cValue = getParameterValue("c", false); const storedCValue = sessionStorage.getItem("o_c"); if (cValue && typeof cValue === "number") { const isValidValue = 1 <= cValue && cValue <= 999; if (isValidValue && cValue != storedCValue) { setCookie("o_c", cValue, 360); sessionStorage.setItem("o_c", cValue); return cValue; } return storedCValue; } return storedCValue; }; window.addEventListener("load", customerSourceCookie); window.customerSourceCookie = customerSourceCookie; window.setCookie = setCookie; ; function personalization_marketingcampaigns_paid() { const isMarketingCampaignPaid = sessionStorage.getItem( "_mwb_marketing_campaign_paid" ); const hasOCParam = sessionStorage.getItem("o_c"); if (!isMarketingCampaignPaid && hasOCParam) { sessionStorage.setItem("_mwb_marketing_campaign_paid", true); return true; } return isMarketingCampaignPaid; } ; (()=>{"use strict";document.addEventListener("DOMContentLoaded",(function(){const e=document.querySelectorAll(".mb-free-download-btn");e.forEach((e=>{e.setAttribute("href",function(){const e=window.global_variables?.user?.device;return e.isMac?window.global_variables?.site?.downloadLinks?.free.mac:e.isiPad||e.isiPhone?window.global_variables?.site?.downloadLinks?.free.ios:e.isChromeOS||e.isAndroid?window.global_variables?.site?.downloadLinks?.free.android:window.global_variables?.site?.downloadLinks?.free.windows}())})),document.getElementById("redirect-trigger-link")&&e[0]&&e[0]?.click()}))})();; (()=>{"use strict";const e=".mwb-seo-article__post-navigation";function t(){const t=document.querySelector(e);if(!t)return;const n=document.getElementById("wpadminbar");let r=75;n&&"none"!==window.getComputedStyle(n).display&&n.offsetHeight>0&&(r=116),t.style.setProperty("--mwb-seo-article-postnav-top",`${r}px`)}let n=null,r=null;function o(){t();const o=document.querySelector(".mwb-seo-article__navbar-heading"),i=document.querySelector(".mwb-seo-article__options");if(window.innerWidth<992){var c;!n&&i&&o&&(n=null!==(c=(({trigger:e,target:t,closeButton:n})=>{if(!e||!t)return void console.error("Missing required elements for toggle functionality.");const r=()=>{const n="true"===e.getAttribute("aria-expanded");e.setAttribute("aria-expanded",String(!n)),t.hidden=n,n?e.focus():t.querySelector("input")?.focus()},o=n=>{t.contains(n.target)||e.contains(n.target)||(t.hidden=!0,e.setAttribute("aria-expanded","false"))},i=e=>{"Escape"!==e.key||t.hidden||r()};return e.addEventListener("click",r),n?.addEventListener("click",r),document.addEventListener("click",o),document.addEventListener("keydown",i),()=>{e.removeEventListener("click",r),n?.removeEventListener("click",r),document.removeEventListener("click",o),document.removeEventListener("keydown",i)}})({trigger:o,target:i}))&&void 0!==c?c:null);const t=()=>{const t=i?.querySelectorAll("ul.nav a");if(!t)return;const n=t=>{o.setAttribute("aria-expanded","false"),i.hidden=!0;const n=t.currentTarget.getAttribute("href");n&&n.startsWith("#")&&setTimeout((()=>{const t=document.querySelector(e),r=document.querySelector(n);if(t&&r){const e=t.offsetHeight,n=r.getBoundingClientRect(),o=100,i=window.scrollY+n.top-e-o;window.scrollTo({top:i,behavior:"smooth"})}}),10)};return t.forEach((e=>e.addEventListener("click",n))),()=>{t.forEach((e=>e.removeEventListener("click",n)))}};r&&r(),r=t()}else n&&(n(),n=null),r&&(r(),r=null),i&&o&&(i.hidden=!1,o.setAttribute("aria-expanded","true"))}document.addEventListener("DOMContentLoaded",(()=>{t(),o(),window.addEventListener("resize",(()=>{t(),o()}))}))})();;