?>window.WpStatisticsUserTracker||(window.WpStatisticsUserTracker={lastUrl:window.location.href,originalPushState:history.pushState,originalReplaceState:history.replaceState,isDndActive:parseInt(navigator.msDoNotTrack||window.doNotTrack||navigator.doNotTrack,10),hasTrackerInitializedOnce:!1,hasUrlChangeTrackerInitialized:!1,hitRequestSuccessful:!0,init:function(){this.hasTrackerInitializedOnce||(this.hasTrackerInitializedOnce=!0,WP_Statistics_Tracker_Object.option.isPreview)||(void 0===WP_Statistics_Tracker_Object?console.error("WP Statistics: Variable WP_Statistics_Tracker_Object not found. Ensure /wp-content/plugins/wp-statistics/assets/js/tracker.js is either excluded from cache settings or not dequeued by any plugin. Clear your cache if necessary."):this.checkHitRequestConditions(),this.trackUrlChange())},base64Encode:function(t){t=(new TextEncoder).encode(t);return btoa(String.fromCharCode.apply(null,t))},getPathAndQueryString:function(){var t=window.location.pathname,e=window.location.search;return this.base64Encode(t+e)},getReferred:function(){return this.base64Encode(document.referrer)},checkHitRequestConditions:function(){!WP_Statistics_Tracker_Object.option.dntEnabled||1!==this.isDndActive?this.sendHitRequest():console.log("WP Statistics: Do Not Track (DNT) is enabled. Hit request not sent.")},sendHitRequest:async function(){try{var t=this.getRequestUrl(),s=new URLSearchParams({...WP_Statistics_Tracker_Object.hitParams,referred:this.getReferred(),page_uri:this.getPathAndQueryString()}).toString();let e=new XMLHttpRequest;e.open("POST",t,!0),e.setRequestHeader("Content-Type","application/x-www-form-urlencoded"),e.send(s),e.onreadystatechange=function(){var t;4===e.readyState&&(200===e.status?(t=this.parseHitResponse(e.responseText),this.hitRequestSuccessful=null!==t&&"object"==typeof t&&!Array.isArray(t)&&!0===t.status,this.hitRequestSuccessful||(t=t&&("string"==typeof t.data?t.data:t.message),console.warn("WP Statistics: Hit request failed with status "+e.status+(t?": "+t:"")))):(this.hitRequestSuccessful=!1,t="string"==typeof(t=this.parseHitResponse(e.responseText,!0)||{}).data?t.data:t.message,console.warn("WP Statistics: Hit request failed with status "+e.status+(t?": "+t:""))))}.bind(this)}catch(t){this.hitRequestSuccessful=!1,console.error("WP Statistics: Error sending hit request:",t)}},parseHitResponse:function(e,s){try{return JSON.parse(e)}catch(t){var i=e.indexOf('{"');if(-1{!e.selector||null!=e.scope&&e.scope!=WP_Statistics_Tracker_Object.hitParams.source_id||document.querySelectorAll(""+e.selector).forEach(t=>{t.addEventListener("click",t=>{t={text:t.target.textContent,id:t.currentTarget.id,class:t.currentTarget.className,target:t.currentTarget.href};this.handleCustomEvent(e.name,t)})})})},captureEvent:function(){document.querySelectorAll("a").forEach(t=>{t.addEventListener("click",async t=>this.handleEvent(t)),t.addEventListener("mouseup",async t=>this.handleEvent(t))})},handleEvent:async function(t){var e;"mouseup"==t.type&&1!=t.button||(t=this.prepareEventData(t))&&(e=WP_Statistics_DataPlus_Event_Object.eventAjaxUrl,await this.sendEventData(t,e))},prepareEventData:function(t){let e={en:t.type,et:Date.now(),eid:t.currentTarget.id,ec:t.currentTarget.className,ev:"",mb:t.button,fn:"",fx:"",m:"",tu:"",pid:""};return"A"===t.currentTarget.tagName&&(e=this.extractLinkData(t,e)),"undefined"!=typeof WP_Statistics_Tracker_Object&&(e.pid=WP_Statistics_Tracker_Object.hitParams.source_id),e},extractLinkData(t,e){var n=t.target.textContent,a=t.currentTarget.href,i=WP_Statistics_DataPlus_Event_Object.fileExtensions,i=new RegExp("\\.("+i.join("|")+")$","i"),n=(n&&(e.ev=n),a&&(e.tu=a),t.currentTarget.classList.contains("woocommerce-MyAccount-downloads-file")||a.includes("download_file="));if(e.wcdl=n,(i.test(a)||n)&&(t=new URL(a).pathname,e.df=n?a.substring(a.lastIndexOf("download_file=")+14).split("&").shift():"",e.dk=n?a.substring(a.lastIndexOf("key=")+4).split("&").shift():"",e.en="file_download",e.fn=n?e.df:t.substring(t.lastIndexOf("/")+1).split(".").shift(),e.fx=n?e.df:t.split(".").pop()),"click"===e.en){if(!this.linkTracker)return!1;try{if(new URL(a).host===window.location.host)return!1}catch(t){}}return!("file_download"===e.en&&!this.downloadTracker)&&e},sendEventData:async function(t,e){var n,a=new URLSearchParams;for(n in t)a.append(n,t[n]);if(!e)throw new Error("AJAX URL is not defined.");try{(await fetch(e,{method:"POST",keepalive:!0,body:a})).ok}catch(t){console.error("Error:",t)}}}); function handleWpConsentApiIntegration(){(wp_has_consent("statistics")||wp_has_consent("statistics-anonymous"))&&(WpStatisticsUserTracker.init(),WpStatisticsEventTracker.init()),document.addEventListener("wp_listen_for_consent_change",function(t){var e,n=t.detail;for(e in n)!n.hasOwnProperty(e)||"statistics"!==e&&"statistics-anonymous"!==e||"allow"!==n[e]||(WpStatisticsUserTracker.init(),WpStatisticsEventTracker.init())})}function handleRealCookieBannerIntegration(){(window.consentApi?.consent("wp-statistics")||Promise.resolve()).then(()=>{WpStatisticsUserTracker.init(),WpStatisticsEventTracker.init()}).catch(()=>{var t=window.consentApi?.consentSync("wp-statistics-with-data-processing");null!=t.cookie&&t.cookieOptIn?(WpStatisticsUserTracker.init(),WpStatisticsEventTracker.init()):console.log("WP Statistics: Real Cookie Banner consent is not given to track visitor information.")})}function handleCookieYesIntegration(){let e=!1,n=()=>{e||(e=!0,WpStatisticsUserTracker.init(),WpStatisticsEventTracker.init())},i=()=>{var t;return"function"==typeof window.getCkyConsent?!(!(t=window.getCkyConsent())||!t.categories||!0!==t.categories.analytics):(t=document.cookie.match(/(?:^|;\s*)cookieyes-consent=([^;]*)/))?-1!==decodeURIComponent(t[1]).split(",").indexOf("analytics:yes"):(()=>{if(!o||s("viewed_cookie_policy")!=="yes")return false;const t=s("cookielawinfo-checkbox-analytics");return t===null||t==="yes"})()};let o=!0===((WP_Statistics_Tracker_Object.option.consentIntegration||{}).status||{}).legacy||void 0!==window.Cli_Data,s=t=>{t=document.cookie.match(new RegExp("(?:^|;\\s*)"+t+"=([^;]*)"));return t?decodeURIComponent(t[1]):null};i()&&n(),document.addEventListener("cookieyes_consent_update",function(t){-1===(t.detail&&t.detail.accepted||[]).indexOf("analytics")&&!i()||n()}),document.addEventListener("click",function(t){e||!o||window.CLI&&window.CLI.settings&&!0===Boolean(window.CLI.settings.accept_close_reload)||!t.target||"function"!=typeof t.target.closest||t.target.closest("#cookie-law-info-bar, #cliSettingsPopup, .cli-modal, .cli-bar-container")&&setTimeout(function(){i()&&n()},300)})}document.addEventListener("DOMContentLoaded",function t(){var e;document.prerendering?document.addEventListener("prerenderingchange",t,{once:!0}):((e=WP_Statistics_Tracker_Object.option.consentIntegration.name)&&"borlabs_cookie"!==e||(WpStatisticsUserTracker.init(),WpStatisticsEventTracker.init()),"wp_consent_api"===e&&handleWpConsentApiIntegration(),"real_cookie_banner"===e&&handleRealCookieBannerIntegration(),"cookieyes"===e&&handleCookieYesIntegration())});