(()=>{"use strict";var e,o={20607:(e,o,t)=>{var n=t(21057);window.wpmlPostHog&&(0,n.initPostHog)(window.wpmlPostHog).catch(console.error)},21057:(e,o,t)=>{t.r(o),t.d(o,{initPostHog:()=>d});var n=t(4869),r=t(34324),i=t(33319);const s=(e,o)=>{const t={site_key:o.siteKey,site_url:o.siteUrl,wpmlActivePlugins:o.wpmlActivePlugins,currentTranslationEditor:o.currentTranslationEditor};o.wpUserEmail&&(t.wp_email=o.wpUserEmail),e.setPersonProperties(t)},a=e=>{const o=e.get_distinct_id();(0,n.setCookie)(r.WPML_PH_DISTINCT_ID,o,{maxAgeMinutes:30})},l=e=>{const o=e.get_session_id();(0,n.setCookie)(r.WPML_PH_SESSION_ID,o,{maxAgeMinutes:30})},p=e=>{const o=e.isFeatureEnabled("wpml_autocapture");e.set_config({autocapture:o})},c=e=>{const o=e.isFeatureEnabled("wpml_capture_pageview");e.set_config({capture_pageview:o})},u=e=>{const o=e.isFeatureEnabled("wpml_capture_pageleave");e.set_config({capture_pageleave:o})};async function d(e){if(!e)return;const{default:o}=await t.e(843).then(t.bind(t,55476));o.init(e.apiKey,{api_host:e.host,defaults:"2025-05-24",person_profiles:e.personProfiles,disable_surveys:e.disableSurveys,autocapture:e.autoCapture,capture_pageview:e.capturePageView,capture_pageleave:e.capturePageLeave,disable_session_recording:e.disableSessionRecording,session_recording:{maskAllInputs:!0,maskInputFn:(e,o)=>"true"===o?.dataset?.wpmlPhMaskInput?"*".repeat(e.trim().length):e},loaded:o=>{p(o),c(o),u(o),s(o,e),a(o),l(o),window.wpmlPostHog&&(window.wpmlPostHog.isLoaded=!0,window.wpmlPostHog.captureEvent=(e,o)=>function(e,o){if("string"!=typeof window.wpmlEndpoints?.route?.proxycaptureevent.url)return Promise.resolve();if(!window.wpmlPostHog?.isLoaded)return Promise.resolve();const t={headers:{"X-WP-Nonce":window.wpmlEndpoints?.nonce||window.wpmlUpdates?.nonce||window.wpmlContentStats?.nonce||window.checkPostHogShouldRecord?.nonce||""}};return i.A.post(window.wpmlEndpoints.route.proxycaptureevent.url,{distinctId:(0,n.getCookie)(r.WPML_PH_DISTINCT_ID)||"",eventName:e,eventData:{$current_url:window.location.href,$host:window.location.host,$referrer:document.referrer||null,$lib:"wpml-js",$session_id:(0,n.getCookie)(r.WPML_PH_SESSION_ID)||null,...o}},t).then((e=>e.data)).catch((e=>{throw console.error(e),new Error("string"==typeof e?.response?.data?e.response.data:"Something went wrong")}))}(e,o))}}),o.onFeatureFlags((()=>{p(o),c(o),u(o)}))}},34324:(e,o,t)=>{t.d(o,{WPML_PH_DISTINCT_ID:()=>n,WPML_PH_SESSION_ID:()=>r});const n="wpml_ph_distinct_id",r="wpml_ph_session_id"},4869:(e,o,t)=>{t.d(o,{getCookie:()=>i,setCookie:()=>r});const n="https:"===window.location.protocol;function r(e,o,t={}){const{maxAgeDays:r,maxAgeMinutes:i,domain:s,secure:a=n,sameSite:l="Strict"}=t,p=[`${encodeURIComponent(e)}=${encodeURIComponent(o)}`,"path=/",`SameSite=${l}`];if(a&&p.push("Secure"),s&&p.push(`Domain=${s}`),r||i){const e=864e5*(r??0)+6e4*(i??0);p.push(`Expires=${new Date(Date.now()+e).toUTCString()}`)}document.cookie=p.join("; ")}function i(e){const o=`(?:^|; )${encodeURIComponent(e)}=([^;]*)`,t=document.cookie.match(new RegExp(o));return t?decodeURIComponent(t[1]):null}}},t={};function n(e){var r=t[e];if(void 0!==r)return r.exports;var i=t[e]={exports:{}};return o[e](i,i.exports,n),i.exports}n.m=o,e=[],n.O=(o,t,r,i)=>{if(!t){var s=1/0;for(c=0;c<e.length;c++){for(var[t,r,i]=e[c],a=!0,l=0;l<t.length;l++)(!1&i||s>=i)&&Object.keys(n.O).every((e=>n.O[e](t[l])))?t.splice(l--,1):(a=!1,i<s&&(s=i));if(a){e.splice(c--,1);var p=r();void 0!==p&&(o=p)}}return o}i=i||0;for(var c=e.length;c>0&&e[c-1][2]>i;c--)e[c]=e[c-1];e[c]=[t,r,i]},n.n=e=>{var o=e&&e.__esModule?()=>e.default:()=>e;return n.d(o,{a:o}),o},n.d=(e,o)=>{for(var t in o)n.o(o,t)&&!n.o(e,t)&&Object.defineProperty(e,t,{enumerable:!0,get:o[t]})},n.e=()=>Promise.resolve(),n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,o)=>Object.prototype.hasOwnProperty.call(e,o),n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},n.j=894,(()=>{var e={894:0};n.O.j=o=>0===e[o];var o=(o,t)=>{var r,i,[s,a,l]=t,p=0;if(s.some((o=>0!==e[o]))){for(r in a)n.o(a,r)&&(n.m[r]=a[r]);if(l)var c=l(n)}for(o&&o(t);p<s.length;p++)i=s[p],n.o(e,i)&&e[i]&&e[i][0](),e[i]=0;return n.O(c)},t=globalThis.webpackChunkwpml=globalThis.webpackChunkwpml||[];t.forEach(o.bind(null,0)),t.push=o.bind(null,t.push.bind(t))})();var r=n.O(void 0,[843],(()=>n(20607)));r=n.O(r)})();