!function(){"use strict";((e,i)=>{var n,c;null!==(n=(c=window.marfeel.config).experiences)&&void 0!==n||(c.experiences={}),window.marfeel.config=Object.assign(Object.assign({},e),window.marfeel.config),Object.assign(window.marfeel.config.experiences,{preflight:i})})({},{"active":true,"hasPreflight":true,"recommender":{"enabled":true,"personalizedContent":false,"curatedContent":true},"preflight":{"targeting":{},"inline":{},"compass":{"actions":{"Home Recirculation":{"id":"AC_EmlDO6B2RWaIYUQNPSWR9w","placement":"window","recirculationModules":[{"name":"Home","selector":".entry-content .wp-block-columns.container.site-main.is-layout-flex.wp-container-14"},{"name":"Post Patrocinado","selector":".post-patrocinado-multisite"},{"name":"Ideas","selector":".section-ideas"},{"name":"Home 2","selector":".wp-block-columns.container.site-main.is-layout-flex.wp-container-28"},{"name":"Home 3","selector":".wp-block-columns.container.is-layout-flex.wp-container-32"},{"name":"Patrocinado manual","selector":"#manual-zone-block_37cc8aea0c6f2504990e63713f477344"},{"name":"Home 4","selector":".wp-block-columns.container.mt-4.is-layout-flex.wp-container-36"},{"name":"Patrocinado manual 2","selector":"#manual-zone-block_506e29524e1fcdb90b0c49306f022747"},{"name":"Tendencias hoy","selector":"#external-articles-block_05d8417a2200ed889bce557010ec05ce"},{"name":"Patrocinado branded","selector":"#last-articles-block_87bd6db289424121064aae291b629f52"},{"name":"Consumo","selector":"#last-articles-block_b0b1dc34e6883fca93ba5acb29a4ba61"},{"name":"Inversión","selector":"#external-articles-block_a8e767695f478314bf48f83e4ca9e3c4"},{"name":"Social investor","selector":"#external-articles-block_ad8550bdc9751d99c475df2c8ac9e43c"},{"name":"ED portadillas","selector":".wp-block-columns.container.site-main.is-layout-flex.wp-container-9"},{"name":"ED portadillas 2","selector":".wp-block-columns.container.is-layout-flex.wp-container-11"},{"name":"ED portadillas 3","selector":".wp-block-columns.container.is-layout-flex.wp-container-15"},{"name":"ED portadillas Branded","selector":".post-patrocinado.branded-format"},{"name":"ED portadillas 4","selector":".wp-block-columns.container.is-layout-flex.wp-container-19"},{"name":"ED portadillas 5","selector":".wp-block-columns.container.is-layout-flex.wp-container-23"},{"name":"ED portadilla Branded manual","selector":"#manual-zone-block_8a565a54947793a1c340cda9150a7722"},{"name":"ED portadilla Branded manual 2","selector":"#manual-zone-block_cbe3591641c5a547bb0c6fa921bef129"}]}," Recirculation - Outbrain":{"id":"AC_mTecPoOMTLmjkK1KFDSAbQ","placement":"window","recirculationModules":[{"name":"Outbrain","selector":".OUTBRAIN"}]}}}}})}(); var e,t,r,n,i={539:(e,t,r)=>{r.d(t,{C1:()=>s});var n,i,o=r(749);(i=n||(n={}))[i.BACKGROUND=0]="BACKGROUND",i[i.FOREGROUND=1]="FOREGROUND",i[i.LEAVING=2]="LEAVING",i[i.BF_CACHE=3]="BF_CACHE",i[i.LOAD=4]="LOAD";const s=e=>{void 0!==document.addEventListener&&void 0!==document.hidden&&document.addEventListener("visibilitychange",(()=>{"hidden"===document.visibilityState&&e(n.BACKGROUND)})),window.addEventListener("pagehide",(()=>{e(n.LEAVING)}),{capture:!0}),window.addEventListener("blur",(()=>{"hidden"===document.visibilityState&&e(n.BACKGROUND)}),{capture:!0}),o.TK&&addEventListener("beforeunload",(()=>e(n.LEAVING)),!0)}},749:(e,t,r)=>{r.d(t,{hQ:()=>s,RX:()=>i,jn:()=>o,TK:()=>n});const n="undefined"!=typeof window&&/^((?!chrome|android).)*safari/i.test(window.navigator.userAgent)&&((e=window.navigator.userAgent)=>{const t=function(e,t){const r=(e||window.navigator.userAgent).match(/version\/(\d+(\.\d+)?)/i);return r&&r.length>1&&r[1]||""}(e),r=parseInt(t.split(".")[0],10);return!isNaN(r)&&r})()<13,i=(()=>{try{return"keepalive"in new Request("https://www.google.com/")}catch(e){return!1}})(),o="undefined"!=typeof window&&void 0!==window.navigator.sendBeacon,s="undefined"!=typeof window&&"fetch"in window},595:(e,t,r)=>{r.d(t,{N:()=>u});const n={childList:!0,subtree:!0};let i,o=[];const s=[],a=e=>{s.forEach((t=>{t(e)}))};function c(e){return new MutationObserver((t=>{t.forEach((t=>{"childList"===t.type&&e(t.target)}))}))}const u=(e,t=document.body)=>{const r=t===document.body;if(e){const l=((e,t)=>{let r;return function(...t){clearTimeout(r),r=setTimeout((()=>{e(...t)}),400)}})(e);if("undefined"!=typeof MutationObserver)if(r)u=()=>{l(document.body)},s.push(u),i||(i=c(a),i.observe(document.body,n));else{const e=c(l);o.push(e),e.observe(t,n)}}var u}},181:function(e,t){var r=this&&this.__assign||function(){return r=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0)&&!(n=o.next()).done;)s.push(n.value)}catch(e){i={error:e}}finally{try{n&&!n.done&&(r=o.return)&&r.call(o)}finally{if(i)throw i.error}}return s},i=this&&this.__spreadArray||function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;i{var n;r.d(t,{Z:()=>l});var i=new Uint8Array(16);function o(){if(!n&&!(n="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return n(i)}const s=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;for(var a=[],c=0;c<256;++c)a.push((c+256).toString(16).substr(1));const u=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(a[e[t+0]]+a[e[t+1]]+a[e[t+2]]+a[e[t+3]]+"-"+a[e[t+4]]+a[e[t+5]]+"-"+a[e[t+6]]+a[e[t+7]]+"-"+a[e[t+8]]+a[e[t+9]]+"-"+a[e[t+10]]+a[e[t+11]]+a[e[t+12]]+a[e[t+13]]+a[e[t+14]]+a[e[t+15]]).toLowerCase();if(!function(e){return"string"==typeof e&&s.test(e)}(r))throw TypeError("Stringified UUID is invalid");return r},l=function(e,t,r){var n=(e=e||{}).random||(e.rng||o)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var i=0;i<16;++i)t[r+i]=n[i];return t}return u(n)}}},o={};function s(e){var t=o[e];if(void 0!==t)return t.exports;var r=o[e]={id:e,loaded:!1,exports:{}};return i[e].call(r.exports,r,r.exports,s),r.loaded=!0,r.exports}s.m=i,s.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return s.d(t,{a:t}),t},t=Object.getPrototypeOf?e=>Object.getPrototypeOf(e):e=>e.__proto__,s.t=function(r,n){if(1&n&&(r=this(r)),8&n)return r;if("object"==typeof r&&r){if(4&n&&r.__esModule)return r;if(16&n&&"function"==typeof r.then)return r}var i=Object.create(null);s.r(i);var o={};e=e||[null,t({}),t([]),t(t)];for(var a=2&n&&r;"object"==typeof a&&!~e.indexOf(a);a=t(a))Object.getOwnPropertyNames(a).forEach((e=>o[e]=()=>r[e]));return o.default=()=>r,s.d(i,o),i},s.d=(e,t)=>{for(var r in t)s.o(t,r)&&!s.o(e,r)&&Object.defineProperty(e,r,{enumerable:!0,get:t[r]})},s.f={},s.e=e=>Promise.all(Object.keys(s.f).reduce(((t,r)=>(s.f[r](e,t),t)),[])),s.u=e=>({360:"d31ef6f2918eede5697b",374:"6802f5507c5ca4c78acc",376:"74d2269d24ec52e4971b",512:"544b6d39dadb4f09c7b3",688:"d8f4a9d61e9d74a0bb09"}[e]+".js"),s.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),s.hmd=e=>((e=Object.create(e)).children||(e.children=[]),Object.defineProperty(e,"exports",{enumerable:!0,set:()=>{throw new Error("ES Modules may not assign module.exports or exports.*, Use ESM export syntax, instead: "+e.id)}}),e),s.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),r={},n="@marfeel/marfeel-sdk:",s.l=(e,t,i,o)=>{if(r[e])r[e].push(t);else{var a,c;if(void 0!==i)for(var u=document.getElementsByTagName("script"),l=0;l{a.onerror=a.onload=null,clearTimeout(h);var i=r[e];if(delete r[e],a.parentNode&&a.parentNode.removeChild(a),i&&i.forEach((e=>e(n))),t)return t(n)},h=setTimeout(p.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=p.bind(null,a.onerror),a.onload=p.bind(null,a.onload),c&&document.head.appendChild(a)}},s.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},s.p="https://sdk.mrf.io/statics/",(()=>{s.b=document.baseURI||self.location.href;var e={179:0};s.f.j=(t,r)=>{var n=s.o(e,t)?e[t]:void 0;if(0!==n)if(n)r.push(n[2]);else{var i=new Promise(((r,i)=>n=e[t]=[r,i]));r.push(n[2]=i);var o=s.p+s.u(t),a=new Error;s.l(o,(r=>{if(s.o(e,t)&&(0!==(n=e[t])&&(e[t]=void 0),n)){var i=r&&("load"===r.type?"missing":r.type),o=r&&r.target&&r.target.src;a.message="Loading chunk "+t+" failed.\n("+i+": "+o+")",a.name="ChunkLoadError",a.type=i,a.request=o,n[1](a)}}),"chunk-"+t,t)}};var t=(t,r)=>{var n,i,[o,a,c]=r,u=0;if(o.some((t=>0!==e[t]))){for(n in a)s.o(a,n)&&(s.m[n]=a[n]);c&&c(s)}for(t&&t(r);u{var e=function(){try{var e;if(-1!==location.hash.indexOf("mrfdebug")||null!==(e=window.localStorage)&&void 0!==e&&e.getItem("mrfdebug")){for(var t=arguments.length,r=new Array(t),n=0;n{try{t(e)}catch(e){console.error(e)}}))}},a=class{constructor(){i(this,"dependencies",{})}get(e,t){var r="string"==typeof e?[e]:e,n=new Array(e.length),i=e.length;i?r.forEach(((e,r)=>{this.dependencies[e]||(this.dependencies[e]=new o),this.dependencies[e].get((e=>{n[r]=e,0==--i&&t(...n)}))})):t(...n)}register(e,t){this.dependencies[e]?this.dependencies[e].resolve(t):this.dependencies[e]=new o(t)}};var c=[];function u(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function l(e){for(var t=1;t{p&&performance.mark(e)},f=(e,t,r)=>{p&&(h(t),((e,t,r)=>{if(p){var n=performance.measure("".concat(e," to ").concat(t),e,t);!function(){try{if(p){for(var e=arguments.length,t=new Array(e),r=0;re.forEach((e=>this.getSDKs(...e)));r(e.cmd.splice(0)),e.cmd.push=function(){for(var e=arguments.length,t=new Array(e),n=0;n{if((!(s=t.origin)||"null"===s||s===window.location.origin||c.includes(s))&&(o=t.data)&&"__MRF_SDK__"===o.app){var{sdkName:r,methodName:n,args:i}=t.data;e.cmd.push([r,e=>{e[n].apply(e,i)}])}var o,s}))}(e)}registerSDK(e,t,n){var i=this;return r((function*(){i.dependenciesContainer.get(t,(function(){for(var t=arguments.length,r=new Array(t),o=0;o{i.dependenciesContainer.register(e,new t(i.config,...r))})).catch((()=>{}))}))}))()}addConfig(e){var t=this;return r((function*(){t.config=l(l({},t.config),e)}))()}getSDKs(){for(var e=arguments.length,t=new Array(e),r=0;r0&&void 0!==arguments[0])||arguments[0];i(this,"onChangeCallbacks",void 0),i(this,"onReadyCallbacks",void 0),i(this,"consent",void 0),i(this,"features",void 0),i(this,"state",void 0),i(this,"isEnabled",void 0),this.consent=e,this.features={},this.onReadyCallbacks=[],this.onChangeCallbacks=[],this.isEnabled=!0,e&&(this.state=y.ANSWERED)}isInitiated(){return arguments.length>0&&void 0!==arguments[0]&&!arguments[0]?!this.isEnabled||this.state===y.READY||this.state===y.ANSWERED:!this.isEnabled||this.state===y.ANSWERED}isRealCMP(){return!1}setCMPLoaded(){this.state||(this.state=y.READY);var e=this.onReadyCallbacks.slice();this.onReadyCallbacks=[],e.forEach((e=>e()))}setCMPNotApplies(){this.isEnabled=!1,this.consent=!0,this.setCMPLoaded()}isActive(){return this.isEnabled}onReady(e){this.isInitiated(!1)?e():this.onReadyCallbacks.push(e)}onChange(e){var t;null===(t=this.onChangeCallbacks)||void 0===t||t.push(e)}callOnChange(){this.onChangeCallbacks.forEach((e=>e()))}getConsent(e){return e&&this.features&&void 0!==this.features[e]?this.features[e]:this.consent}setConsentFeatures(e){e.forEach((e=>{var{feature:t,consent:r}=e;this.features[g(t)]=r})),this.state||this.setCMPLoaded(),this.callOnChange(),this.state=y.ANSWERED}setConsent(e,t){this.features[g(e)]=t,this.callOnChange()}hasToPromptForConsent(e){e(!1)}hasConsentForVendor(e){return this.getConsent()}hasConsentForPurpose(e){return this.getConsent()}}var w=["tcloaded","useractioncomplete"],O={cookies:{vendors:[943],purposes:[1,7,8,9,10]},personalization:{vendors:[943],purposes:[1,5,6,7,8,9,10]}};class E{constructor(){i(this,"tcData",void 0),i(this,"isReady",!1);var e=()=>{this.isReady=!0};this.onReady(e.bind(this)),this.onChange((t=>{this.tcData=t,null!=t&&t.gdprApplies||e()}).bind(this))}isInitiated(){return arguments.length>0&&void 0!==arguments[0]&&!arguments[0]?this.isReady:!!this.tcData}isRealCMP(){return!0}isActive(){var e;return!(null==this||null===(e=this.tcData)||void 0===e||!e.gdprApplies)}hasToPromptForConsent(e){this.addEventListener((t=>{var r,n,{cmpStatus:i}=t;"loaded"===i&&(null===(r=(n=window).__tcfapi)||void 0===r||r.call(n,"ping",2,(t=>{var{displayStatus:r}=t;return e("disabled"!==r)})))}))}hasConsentForVendor(e){var t,r;return!0===(null===(t=this.tcData)||void 0===t||null===(r=t.vendor)||void 0===r?void 0:r.consents[e])}hasConsentForPurpose(e){var t,r;return!0===(null===(t=this.tcData)||void 0===t||null===(r=t.purpose)||void 0===r?void 0:r.consents[e])}matchRequirements(e){return!!e&&!!this.tcData&&e.vendors.every(this.hasConsentForVendor.bind(this))&&e.purposes.every(this.hasConsentForPurpose.bind(this))}onChange(e){this.addEventListener(((t,r)=>{!r||!w.includes(t.eventStatus)&&t.gdprApplies||e(t)}))}onReady(e){this.isInitiated(!1)?e():this.addEventListener((t=>{var r,n,{cmpStatus:i,listenerId:o}=t;"loaded"===i&&(e(),null===(r=(n=window).__tcfapi)||void 0===r||r.call(n,"removeEventListener",2,(()=>{}),o))}))}getConsent(e){return!(!this.tcData||this.tcData.gdprApplies)||this.matchRequirements(O[e])}addEventListener(e){var t,r;window.__tcfapi?null===(t=(r=window).__tcfapi)||void 0===t||t.call(r,"addEventListener",2,e):setTimeout((()=>this.addEventListener(e)),100)}}var k=s(571),P="flagConsentReady",S=function(e){return e[e.CONSENT_ACCEPTED=0]="CONSENT_ACCEPTED",e[e.CONSENT_NON_REJECTED=1]="CONSENT_NON_REJECTED",e[e.CONSENT_PRESENT=2]="CONSENT_PRESENT",e}(S||{}),C=e=>e.blockOnNoConsent?S.CONSENT_ACCEPTED:e.blockOnReject?S.CONSENT_NON_REJECTED:S.CONSENT_PRESENT;function j(e,t,r,n){return T.apply(this,arguments)}function T(){return(T=r((function*(e,t,r,n){var i,o="".concat(P,"_").concat((0,k.Z)());return!e.blockOnNoConsent&&void 0===e.manualConsent&&n&&(i=window.setTimeout((()=>r.resolve(o)),n)),t.onReady((()=>{!function(e,t,r,n){var i=()=>!!t.getConsent("cookies")&&(r(),!0),o=()=>{i()||t.onChange(i)};switch(e){case S.CONSENT_ACCEPTED:o();break;case S.CONSENT_NON_REJECTED:o(),t.isInitiated()&&!t.getConsent("cookies")&&window.clearTimeout(n);break;default:r()}}(C(e),t,(()=>r.resolve(o)),i)})),r.wait(o)}))).apply(this,arguments)}class A{constructor(e){i(this,"handler",void 0),this.handler=function(e){return void 0!==e.gdpr&&!e.gdpr||!window.__tcfapi&&!window.gdprAppliesGlobally?new b(!e.manualConsent):new E}(e)}isInitiated(){var e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];return this.handler.isInitiated(e)}isRealCMP(){return this.handler.isRealCMP()}isActive(){return this.handler.isActive()}setCMPLoaded(){this.handler.setCMPLoaded()}setCMPNotApplies(){this.handler.setCMPNotApplies()}onChange(e){this.handler.onChange(e)}onReady(e){this.handler.onReady(e)}getConsent(e){return this.handler.getConsent(e)}setConsentFeatures(e,t){this.handler instanceof b||(this.handler=new b),this.handler.setConsentFeatures(e,t)}setConsent(e,t){this.handler instanceof b||(this.handler=new b),this.handler.setConsent(e,t)}hasToPromptForConsent(e){this.handler.hasToPromptForConsent(e)}hasConsentForVendor(e){return this.handler.hasConsentForVendor(e)}hasConsentForPurpose(e){return this.handler.hasConsentForPurpose(e)}}v("consent",[],(()=>Promise.resolve(A)));var I=e=>{"history"in window&&window.history.replaceState(history.state,"",e)};function D(){return D=r((function*(e){for(var t=arguments.length,r=new Array(t>1?t-1:0),n=1;ne(!0))),o=new Array(i.length),a=0,new Promise(((e,t)=>{i.forEach(((r,n)=>{r.then((t=>{t&&e(t)})).catch((e=>{o[n]=e,(a+=1)===i.length&&t(o)}))}))}))).then((t=>{var r=window.top===window.self;t&&r&&(e=>{s.e(374).then(s.bind(s,374)).then((t=>{var{default:r,saveActiveOverlay:n}=t;new r(e),n()}))})(e)})).catch((()=>{}));var i,o,a})),D.apply(this,arguments)}function N(e){return r((function*(){var t=arguments.length>0&&void 0!==arguments[0]&&arguments[0],r=new URL(window.location.href),n=!!r.searchParams.get(e);if(n&&t)try{I(function(e,t){var r,n=new URL(e.href);return null===(r=n.searchParams)||void 0===r||r.delete(t),n.toString()}(r,e))}catch(e){}return n}))}"function"==typeof SuppressedError&&SuppressedError;const _={"!":"%21","'":"%27","(":"%28",")":"%29","~":"%7E","%20":"+","%00":"\0"};function R(e){const t=[];return e.forEach(((e,r)=>{t.push(r+"="+function(e){return encodeURIComponent(e).replace(/[!'\(\)~]|%20|%00/g,(function(e){return _[e]}))}(e))})),t.join("&")}const L="undefined"!=typeof window&&/^((?!chrome|android).)*safari/i.test(window.navigator.userAgent)&&((e=window.navigator.userAgent)=>{const t=function(e,t){const r=(e||window.navigator.userAgent).match(/version\/(\d+(\.\d+)?)/i);return r&&r.length>1&&r[1]||""}(e),r=parseInt(t.split(".")[0],10);return!isNaN(r)&&r})()<13,x=(()=>{try{return"keepalive"in new Request("https://www.google.com/")}catch(e){return!1}})(),M="undefined"!=typeof window&&void 0!==window.navigator.sendBeacon,U="undefined"!=typeof window&&"fetch"in window;var V,F,q,B;function z(e,t,{contentType:r,sync:n=!1,onSuccessCallback:i,onErrorCallback:o,timeout:s,cancelOnTimeout:a}={}){const c=!!i||!!o,u=((e,t)=>L||!U&&!M||t?V.XHR:U&&(x||e)?V.FETCH:M&&!e?V.BEACON:V.XHR)(c,n),l=((e,t,r,n)=>t&&r&&e!==V.BEACON?n&&"AbortSignal"in window&&e===V.FETCH?F.ABORT:F.TIMER:F.NONE)(u,c,n?void 0:s,a),{onErrorCallback:d,onSuccessCallback:p}=((e,t,r,n)=>{if(e===F.TIMER){let e=!1;const i=window.setTimeout((()=>{e=!0,null==n||n(408)}),t),o=t=>r=>{e||(window.clearTimeout(i),null==t||t(r))};return{onSuccessCallback:o(r),onErrorCallback:o(n)}}return{onSuccessCallback:r,onErrorCallback:n}})(l,s,i,o),h=function(e,t){return"string"==typeof e?e:"application/x-www-form-urlencoded"===t?R(e):JSON.stringify(e)}(t,r);switch(u){case V.FETCH:return void((e,t,{contentType:r,keepalive:n=!1,timeout:i}={})=>{let o=t;const s=void 0!==i?{signal:window.AbortSignal.timeout(i)}:{};return r&&(o=new Blob([t],{type:r})),fetch(e,Object.assign({method:"POST",body:o,keepalive:n,credentials:"include"},s))})(e,h,{contentType:r,keepalive:!0,timeout:l===F.ABORT?s:void 0}).then((e=>(e.ok||null==d||d(e.status),e.text()))).then((e=>null==p?void 0:p(e))).catch((e=>{const t=(e=>e instanceof DOMException&&("TimeoutError"===e.name||e.code===DOMException.TIMEOUT_ERR))(e)?408:0;null==d||d(t)}));case V.BEACON:return void((e,t,{contentType:r}={})=>{let n=t;r&&(n=new Blob([t],{type:r})),window.navigator.sendBeacon(e,n)})(e,h,{contentType:r});default:return function(e,t,{onSuccessCallback:r,onErrorCallback:n,contentType:i,sync:o=!1}={}){const s=!o,a=new XMLHttpRequest;return a.open("POST",e,s),i&&a.setRequestHeader("Content-Type",i),a.withCredentials=!0,o||(a.onreadystatechange=()=>{4===a.readyState&&(200===a.status?null==r||r(a.responseText):null==n||n(a.status))}),a.send(t),o?a.responseText:void 0}(e,h,{onSuccessCallback:p,contentType:r,onErrorCallback:d,sync:n})}}(B=V||(V={}))[B.XHR=0]="XHR",B[B.FETCH=1]="FETCH",B[B.BEACON=2]="BEACON",function(e){e[e.ABORT=0]="ABORT",e[e.NONE=1]="NONE",e[e.TIMER=2]="TIMER"}(F||(F={})),function(e){e[e.ORIGIN=0]="ORIGIN",e[e.FALLBACK=1]="FALLBACK"}(q||(q={}));const G=e=>null==e?void 0:e.replace(/\/$/,"");class H{constructor(e,{fallback:t,fallbackWindow:r=5e3,onModeChange:n=(()=>{}),timeout:i,timeoutStrategy:o}={}){this.mode=q.ORIGIN,this.pendingRequests={},this.endpoint=G(e),this.fallback=G(t),this.fallbackWindow=r,this.onModeChange=n,this.timeout=i,this.timeoutStrategy=o instanceof String?{strategy:o}:o}setRequestStatus(e,t=!0){this.pendingRequests[e]=t}isRequestPending(e){return!!this.pendingRequests[e]}switchMode(e,t){this.mode=e,window.setTimeout((()=>this.onModeChange(e,t)),0)}getUri(e,t={},r=this.mode){const n=e.startsWith("/")?e:`/${e}`;return function(e,t){const r=new RegExp(`:(${Object.keys(t).join("|")})`,"g");return e.replace(r,((e,r)=>t[r]||e))}(`${r===q.ORIGIN?this.endpoint:this.fallback}${n}`,t)}post(e,t,r={}){var n;const{onErrorCallback:i,onSuccessCallback:o,skipResponse:s=!1,vars:a,timeout:c,leaving:u}=r,l=function(e,t){var r={};for(var n in e)Object.prototype.hasOwnProperty.call(e,n)&&t.indexOf(n)<0&&(r[n]=e[n]);if(null!=e&&"function"==typeof Object.getOwnPropertySymbols){var i=0;for(n=Object.getOwnPropertySymbols(e);i{var t;return 408===e&&(null===(t=this.timeoutStrategy)||void 0===t?void 0:t.processor)||(e=>e)},h=!!u||s,f=h?void 0:this.fallback&&(n=>{if(this.fallback&&d===q.ORIGIN){const i=p(n);this.switchMode(q.FALLBACK,n),this.post(e,i(t,e),r),window.setTimeout((()=>this.switchMode(q.ORIGIN)),this.fallbackWindow)}else null==i||i(n)})||i,m=h?void 0:t=>{null==o||o(t),this.setRequestStatus(e,!1)},v=this.isRequestPending(e)&&(null===(n=this.timeoutStrategy)||void 0===n?void 0:n.forceOnExit)&&this.mode===q.ORIGIN&&u,g=(t,r=this.mode)=>{var n;z(this.getUri(e,a,r),t,Object.assign(Object.assign({},l),{onSuccessCallback:m,onErrorCallback:f,timeout:null!=c?c:this.timeout,cancelOnTimeout:"abort"===(null===(n=this.timeoutStrategy)||void 0===n?void 0:n.strategy)}))};this.setRequestStatus(e,!h),g(t),v&&g(p(408)(t,e),q.FALLBACK)}}var K;!function(e){e[e.BACKGROUND=0]="BACKGROUND",e[e.FOREGROUND=1]="FOREGROUND",e[e.LEAVING=2]="LEAVING",e[e.BF_CACHE=3]="BF_CACHE",e[e.LOAD=4]="LOAD"}(K||(K={}));const W=e=>{void 0!==document.addEventListener&&void 0!==document.hidden&&document.addEventListener("visibilitychange",(()=>{"hidden"===document.visibilityState&&e(K.BACKGROUND)})),window.addEventListener("pagehide",(()=>{e(K.LEAVING)}),{capture:!0}),window.addEventListener("blur",(()=>{"hidden"===document.visibilityState&&e(K.BACKGROUND)}),{capture:!0}),L&&addEventListener("beforeunload",(()=>e(K.LEAVING)),!0)},J=e=>{void 0!==document.addEventListener&&void 0!==document.hidden&&document.addEventListener("visibilitychange",(()=>{"hidden"!==document.visibilityState&&e(K.FOREGROUND)})),window.addEventListener("pageshow",(t=>{e(t.persisted?K.BF_CACHE:K.LOAD)}),{capture:!0}),window.addEventListener("focus",(()=>{"hidden"!==document.visibilityState&&e(K.FOREGROUND)}),{capture:!0})},X=(e,t=!1)=>"replicas"in e?e:{api:e,replicas:1,primary:t};class ${constructor(...e){this.apis=[],this.apis=e.map(((e,t)=>X(e,0===t)))}registerApi(e){this.apis.push(X(e))}post(...e){const[t,r,n]=e;this.apis.flatMap((e=>new Array(e.replicas).fill(e).map(((e,t)=>Object.assign(Object.assign({},e),{replicaId:`${t}`}))))).forEach((({api:e,replicaId:i,preprocess:o=(e=>e),primary:s})=>{try{const a=s?null==n?void 0:n.onSuccessCallback:void 0,c=s?null==n?void 0:n.onErrorCallback:void 0;e.post(t,o(r,null==n?void 0:n.contentType),Object.assign(Object.assign({},n),{onSuccessCallback:a,onErrorCallback:c,vars:Object.assign(Object.assign({},null==n?void 0:n.vars),{replicaId:i})}))}catch(e){}}))}}const Q={childList:!0,subtree:!0};let Y;const Z=[],ee=e=>{Z.forEach((t=>{t(e)}))};function te(e){return new MutationObserver((t=>{t.forEach((t=>{"childList"===t.type&&e(t.target)}))}))}const re=(e,t=document.body)=>{const r=t===document.body;if(e){const i=((e,t)=>{let r;return function(...t){clearTimeout(r),r=setTimeout((()=>{e(...t)}),400)}})(e);"undefined"!=typeof MutationObserver&&(r?(n=()=>{i(document.body)},Z.push(n),Y||(Y=te(ee),Y.observe(document.body,Q))):te(i).observe(t,Q))}var n};let ne={};const ie=e=>{const t=document.createElement("a");return t.href=e,t.origin},oe=e=>"fbia"===e?window.ia_document.shareURL:window.location.href,se=e=>"fbia"===e?window.ia_document.referrer:document.referrer,ae=e=>{const t=se(e);if(t)try{if(new URL(t).pathname.endsWith(".js"))return null}catch(e){}return t},ce=RegExp("^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])");function ue(e,{cache:t=!0,readonly:r=!0}={}){try{if(!r)return new URL(e,document.baseURI);if(!ne[e]){const{host:r,hostname:n,pathname:i,port:o,protocol:s,search:a,hash:c,href:u,origin:l}=new URL(e,document.baseURI),d={host:r,hostname:n,pathname:i,port:o,protocol:s,search:a,hash:c,href:u,origin:l};if(!t)return d;ne[e]=d}return Object.assign({},ne[e])}catch(e){return{}}}const le="data-mrf-link";function de(e,t,r=!0){const n=e;(r||!n.mrfLink)&&(n.mrfLink=t),(r||!e.hasAttribute(le))&&e.setAttribute(le,t)}const pe=e=>ue(e).href,he=e=>{try{const t=new URL(e);return t.host.includes("mrf.io")&&t.searchParams.get("url")||e}catch(t){return e}};var fe,me=new Uint8Array(16);function ve(){if(!fe&&!(fe="undefined"!=typeof crypto&&crypto.getRandomValues&&crypto.getRandomValues.bind(crypto)||"undefined"!=typeof msCrypto&&"function"==typeof msCrypto.getRandomValues&&msCrypto.getRandomValues.bind(msCrypto)))throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");return fe(me)}var ge=/^(?:[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}|00000000-0000-0000-0000-000000000000)$/i;function ye(e){return"string"==typeof e&&ge.test(e)}for(var be=[],we=0;we<256;++we)be.push((we+256).toString(16).substr(1));function Oe(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=(be[e[t+0]]+be[e[t+1]]+be[e[t+2]]+be[e[t+3]]+"-"+be[e[t+4]]+be[e[t+5]]+"-"+be[e[t+6]]+be[e[t+7]]+"-"+be[e[t+8]]+be[e[t+9]]+"-"+be[e[t+10]]+be[e[t+11]]+be[e[t+12]]+be[e[t+13]]+be[e[t+14]]+be[e[t+15]]).toLowerCase();if(!ye(r))throw TypeError("Stringified UUID is invalid");return r}function Ee(e,t,r){var n=(e=e||{}).random||(e.rng||ve)();if(n[6]=15&n[6]|64,n[8]=63&n[8]|128,t){r=r||0;for(var i=0;i<16;++i)t[r+i]=n[i];return t}return Oe(n)}function ke(e,t,r,n){switch(e){case 0:return t&r^~t&n;case 1:case 3:return t^r^n;case 2:return t&r^t&n^r&n}}function Pe(e,t){return e<>>32-t}var Se=function(e,t,r){function n(e,t,r,n){if("string"==typeof e&&(e=function(e){e=unescape(encodeURIComponent(e));for(var t=[],r=0;r>>24,r[1]=t>>>16&255,r[2]=t>>>8&255,r[3]=255&t,r[4]=(t=parseInt(e.slice(9,13),16))>>>8,r[5]=255&t,r[6]=(t=parseInt(e.slice(14,18),16))>>>8,r[7]=255&t,r[8]=(t=parseInt(e.slice(19,23),16))>>>8,r[9]=255&t,r[10]=(t=parseInt(e.slice(24,36),16))/1099511627776&255,r[11]=t/4294967296&255,r[12]=t>>>24&255,r[13]=t>>>16&255,r[14]=t>>>8&255,r[15]=255&t,r}(t)),16!==t.length)throw TypeError("Namespace must be array-like (16 iterable integer values, 0-255)");var i=new Uint8Array(16+e.length);if(i.set(t),i.set(e,t.length),(i=function(e){var t=[1518500249,1859775393,2400959708,3395469782],r=[1732584193,4023233417,2562383102,271733878,3285377520];if("string"==typeof e){var n=unescape(encodeURIComponent(e));e=[];for(var i=0;i>>0;b=y,y=g,g=Pe(v,30)>>>0,v=m,m=E}r[0]=r[0]+m>>>0,r[1]=r[1]+v>>>0,r[2]=r[2]+g>>>0,r[3]=r[3]+y>>>0,r[4]=r[4]+b>>>0}return[r[0]>>24&255,r[0]>>16&255,r[0]>>8&255,255&r[0],r[1]>>24&255,r[1]>>16&255,r[1]>>8&255,255&r[1],r[2]>>24&255,r[2]>>16&255,r[2]>>8&255,255&r[2],r[3]>>24&255,r[3]>>16&255,r[3]>>8&255,255&r[3],r[4]>>24&255,r[4]>>16&255,r[4]>>8&255,255&r[4]]}(i))[6]=15&i[6]|80,i[8]=63&i[8]|128,r){n=n||0;for(var o=0;o<16;++o)r[n+o]=i[o];return r}return Oe(i)}try{n.name="v5"}catch(e){}return n.DNS="6ba7b810-9dad-11d1-80b4-00c04fd430c8",n.URL="6ba7b811-9dad-11d1-80b4-00c04fd430c8",n}();const Ce=e=>!!e&&ye(e),je=()=>{try{return Ee()}catch(e){return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(e){const t=16*Math.random()|0;return("x"===e?t:3&t|8).toString(16)}))}},Te=(e,t)=>((e=!0)=>{const t=document.querySelector('meta[property="mrf:canonical"][content]'),r=null==t?void 0:t.getAttribute("content");return e?!!r&&pe(r)||null:r||null})(t)||((e=!0)=>{const t=document.querySelector('link[rel="canonical"][href]'),r=null==t?void 0:t.getAttribute("href");return e?!!r&&pe(r)||null:r||null})(t)||(e=>{if("fbia"===e){const e=document.createElement("a");return e.href=window.ia_document.shareURL,e.origin+e.pathname}return window.location.origin+window.location.pathname})(e),Ae="scrollHeight",Ie=[{qs:".mrf-current .mrf-detailsBody",max:999},{qs:".mrf-current .mrf-sectionPart",max:999},{qs:".mrf-article-body",max:999},{qs:"article",max:1}];let De,Ne=0;const _e=(e,t=0,r=!0,n=!1)=>{let i;try{e&&(De=r||!De?Ie.reduce(((e,t)=>{if(e)return e;const r=document.querySelectorAll(t.qs);return r&&r.length<=t.max?(e=>{const t=[];return e.forEach((e=>(e=>{const t=e.getBoundingClientRect();if(!t.width&&!t.height)return!1;const r=window.innerHeight||document.documentElement.clientHeight,n=window.innerWidth||document.documentElement.clientWidth,i=t.top<=r&&t.top+t.height>=0,o=t.left<=n&&t.left+t.width>=0;return i&&o})(e)&&t.push(e))),t.length>0?t.sort(((e,t)=>t.offsetTop-e.offsetTop))[0]:null})(Array.from(r)):null}),null):De,Ne=0);const n=(e=>{const t=(()=>{const e=document.body;return document.documentElement.scrollTop||!!e&&e.scrollTop||0})();return e?t-e.offsetTop:t})(De),o=(e=>{const t=document.body;return e?e.offsetHeight:document.documentElement[Ae]||!!t&&t[Ae]||0})(De),s=document.documentElement.clientHeight;i=t?(n+t)/o*100:n/(o-s)*100,i>Ne?Ne=i:i=Ne}catch(e){i=50}return n?i:isNaN(i)?50:i>100?100:i<0?0:i},Re={},Le=(()=>{try{const e="__test_session_storage__";return window.sessionStorage.setItem(e,e),window.sessionStorage.removeItem(e),!0}catch(e){return!1}})(),xe=(e,t)=>{try{Le?window.sessionStorage.setItem(e,t):Re[e]=t}catch(e){}},Me=e=>{try{return Le?window.sessionStorage.getItem(e):Re[e]}catch(e){return null}},Ue=(e,t)=>{const r=JSON.stringify(t);xe(e,r)},Ve="https://events.newsroom.bi",Fe="https://compassingest-:replicaId.staging.cl15.k8s.mrf.io",qe="".concat(Ve).concat("/ingest.php");let Be,ze=!0;const Ge={getConsent:()=>ze,isInitiated:()=>!0,isRealCMP:()=>!0,setConsent:(e,t)=>{var r;ze=!0===(r=t)||"true"===r,xe("__nrCookieConsent",ze),Be&&Be()},onChange:e=>{Be=e}};function He(e){return e||!1===e}function Ke(e){var t;return e.isInitiated()?null!=e&&null!==(t=e.isActive)&&void 0!==t&&t.call(e)?e.getConsent("cookies")?1:0:3:2}class We{static wait(){return Promise.resolve(!0)}static resolve(){}}class Je{static emitRecirculation(){}}function Xe(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];return void 0!==e[t]||null===e[t]?e[t]:r}function $e(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new Date;return Math.floor(e.getTime()/1e3)}const Qe=e=>{const t=document.cookie.indexOf(e+"="),r=t+e.length+1;if(!t&&e!==document.cookie.substring(0,e.length))return null;if(-1===t)return null;let n=document.cookie.indexOf(";",r);return-1===n&&(n=document.cookie.length),unescape(document.cookie.substring(r,n))},Ye=(e,t,r,n,i)=>{const o=i?[i,".".concat(i)]:[""],s=new Date;s.setTime(s.getTime());const a="https:"===window.location.protocol;o.forEach((i=>{document.cookie=e+"="+escape(t)+(r?";expires="+r:"")+(n?";path="+n:"")+(i?";domain="+i:"")+(a?";secure":"")}))},Ze=(e,t,r)=>{document.cookie="".concat(e,"=; expires=Thu, 01 Jan 1970 00:00:00 GMT; path=").concat(t||"/","; domain=").concat(r||"",";")},et={score:"-1"},tt="".concat("https://compassdynamicpaywall.mrf.io","/score/"),rt="".concat("https://compassdynamicpaywall.mrf.io","/predict/"),nt=e=>{let{accountId:t,userId:r,siteUserId:n,totalPageviews:i,sessionDuration:o}=e;const s=new URLSearchParams(window.location.search),a=s.get("utm_medium"),c=s.get("utm_source"),u=["ac=".concat(t),"url=".concat(encodeURIComponent(window.location.href)),"u=".concat(r),"pp=".concat(document.referrer)];return n&&u.push("sui=".concat(n)),a&&u.push("utm_medium=".concat(a)),c&&u.push("utm_source=".concat(c)),i&&u.push("tp=".concat(i)),o&&u.push("sd=".concat(o)),u.join("&")};let it;const ot="https://events.newsroom.bi/data/rfv.php",st={rfv:"-1"},at=(e,t)=>{const r={rfv:e,ts:new Date};return xe("".concat("compass_rfv","_").concat(t),JSON.stringify(r)),e},ct=function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];const i=new FormData;return i.append("u",t),i.append("ac",e),i.append("sui",r||""),i.append("nu","".concat(+n)),i},ut=e=>{const{ts:t,rfv:r}=(e=>{const t=Me("".concat("compass_rfv","_").concat(e));let r={ts:null,rfv:null};if(t)try{r=JSON.parse(t)}catch(e){}return r})(e);return(e=>{if(!e)return!0;const t=new Date(e);return t.setMinutes(t.getMinutes()+30),t{try{const e="__test_local_storage__";return window.localStorage.setItem(e,e),window.localStorage.removeItem(e),!0}catch(e){return!1}})(),pt=(e,t)=>{try{dt?window.localStorage.setItem(e,t):lt[e]=t}catch(e){}},ht=["data-mrf-recirculation","data-dtm-region","dtm-region"],ft=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"";const t=e?" ".concat(e):e;return ht.map((e=>"[".concat(e,"]").concat(t))).join(",")};function mt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function vt(e){for(var t=1;te&&e.split("?")[0].split("#")[0],yt=()=>[...document.body.querySelectorAll(ft())].filter((e=>e.shadowRoot)),bt=e=>null!==e.getAttribute("data-mrf-layout")&&null===e.getAttribute("data-mrf-layout-anchor")?e.querySelector("[".concat("data-mrf-layout-anchor","]")):e,wt=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"";const r=bt(e);if(!r)return null;if(r!==e)return wt(r,t);const n=function(e,t){if(!e)return null;let r=null;if(r=t?e.getAttribute(t):"mrfLink"in e&&e.mrfLink||e.getAttribute(le)||e.getAttribute("href")||e.getAttribute("data-mrf-uri"),null===r)return null;const n=ue(r||"");return"null"===n.origin?null:n.href}(e,t);return n?(e=>!!e&&ue(e).host===window.location.host)(n)?n&>(n):n:null};function Ot(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}const Et=()=>(e=>{const t=(e=>{try{return dt?window.localStorage.getItem(e):lt[e]}catch(e){return null}})("___m_rec");if(t)try{return JSON.parse(t)}catch(e){}return null})(),kt=(e,t)=>{if(dt){const r=function(e){for(var t=1;t{let{el:t}=e;t.getAttribute(r)!==n&&t.setAttribute(r,n||"")}))}const St=e=>e.hasAttribute("cmp-ltrk"),Ct=e=>e.hasAttribute("data-mrf-recirculation-skip"),jt=e=>e.getAttribute("cmp-ltrk-idx"),Tt=(e,t,r)=>{e.setAttribute("cmp-ltrk",t),e.setAttribute("cmp-ltrk-idx","".concat(r))},At=e=>"[".concat("cmp-ltrk",'="').concat(e,'"]'),It=(e,t,r)=>{const n=e.map((e=>function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"all";const r=function(){for(var e=arguments.length,r=new Array(e),n=0;n!Boolean(e))))return;const s="missing"===t?":not([".concat(o,"])"):"",a=i.join(" ");return ft("".concat(a).concat(s))};return{element:r(e.element,"data-mrf-layout"),anchor:e.anchor?r(e.element,e.anchor,"data-mrf-layout-anchor"):r(e.element,"data-mrf-layout-anchor"),img:r(e.element,e.img,"data-mrf-layout-img"),title:r(e.element,e.title,"data-mrf-layout-title")}}(e,"missing")[t])).filter(Boolean).join(",");n&&Array.from(document.querySelectorAll(n)).forEach((e=>e.setAttribute(r,"")))},Dt=e=>{e.length&&(It(e,"element","data-mrf-layout"),It(e,"anchor","data-mrf-layout-anchor"),It(e,"img","data-mrf-layout-img"),It(e,"title","data-mrf-layout-title"))},Nt=e=>{const t={};return e.reduce(((e,r)=>{const{el:n}=r,i=(e=>{try{const t=jt(e);if(t)return parseInt(t,10)}catch(e){}})(n);return void 0!==i&&t[i]||(e.push(r),t[i]=!0),e}),[])},_t={"data-mrf-experiment":"tv","mrf-site-ext":"ac2","cmp-ltrk-ext":"n2","mrf-editorial-id":"".concat("meta:").concat("mrf-editorial-id")},Rt={"data-mrf-root-experiment":["tv","".concat("meta:","tv")]},Lt=(e,t,r,n)=>{if(n.startsWith("meta:")){var i;const[o,s]=n.split("meta:");null!==(i=e.meta)&&void 0!==i||(e.meta={}),e.meta[s]=t.getAttribute(r)}else e[n]=t.getAttribute(r)},xt=(e,t)=>{let{el:r,root:n}=e;const i={url:wt(r,t)},o=jt(r);if(o){if(parseInt(o,10)>=255)return;i.p=o}return n&&Object.entries(Rt).forEach((e=>{let[t,r]=e;n.getAttribute(t)&&r.forEach((e=>Lt(i,n,t,e)))})),Object.entries(_t).forEach((e=>{let[t,n]=e;r.getAttribute(t)&&Lt(i,r,t,n)})),i},Mt=(e,t)=>e.map(((e,r)=>{const n=xt(e,t);return n?(parseInt(n.p,10)===r&&delete n.p,Object.keys(n).length>1?n:n.url):null})).filter((e=>!!e)),Ut=(e,t)=>{var r;return!("object"!=typeof e||!t||"control"!==(null==e||null===(r=e.meta)||void 0===r?void 0:r.tv)||t.startsWith("IL_"))};let Vt;const Ft={};class qt{constructor(){this.timer=null}callOnTimer(e,t){this.timer=setTimeout((()=>{e()}),t)}cleanAndCallTimer(e,t){this.cleanTimer(),this.timer=setTimeout((()=>{e()}),t)}cleanTimer(){null!==this.timer&&(clearTimeout(this.timer),this.timer=null)}}class Bt{constructor(){this.store={}}push(e,t){this.store[e]?this.store[e].push(t):this.store[e]=[t]}clear(e){delete this.store[e]}contains(e,t){var r;return null===(r=this.store[e])||void 0===r?void 0:r.includes(t)}forEach(e){return Object.entries(this.store).forEach(e)}}const zt=new qt,Gt=new Bt,Ht=new Bt,Kt=e=>{const t=[];Gt.forEach((e=>{let[r,n]=e;const i=n.map((e=>xt(e.link,e.urlAttr))).filter((e=>!!e&&!Ut(e,r)));i.length&&t.push({module:r,links:i}),Gt.clear(r)})),Object.keys(t).length>0&&e("impression",t)},Wt=(e,t)=>{e.forEach((e=>{let{links:r,urlAttr:n,name:i}=e;i&&r.forEach((e=>{const r="element"===e.intersectionStrategy?e.el:Array.from(e.el.children).find((e=>e instanceof HTMLElement));r&&function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n="IntersectionObserver"in window&&"IntersectionObserverEntry"in window&&"intersectionRatio"in window.IntersectionObserverEntry.prototype&&"isIntersecting"in window.IntersectionObserverEntry.prototype?Promise.resolve():s.e(360).then(s.t.bind(s,360,23));e.setAttribute("mrfObservableId",je()),Ft[e.getAttribute("mrfObservableId")]=t,n.then((()=>{Vt=Vt||new IntersectionObserver((e=>{e.filter((e=>e.isIntersecting)).forEach((e=>{let{target:t}=e;const n=t.getAttribute("mrfObservableId");var i;n?(null===(i=Ft[n])||void 0===i||i.call(Ft,t),r||(Vt.unobserve(t),delete Ft[n])):Vt.unobserve(t)}))})),Vt.observe(e)}))}(r,(()=>{((e,t,r)=>{const n=jt(t.el);Ht.contains(e,n)||(Gt.push(e,{link:t,urlAttr:r}),Ht.push(e,n))})(i,e,n),zt.cleanAndCallTimer((()=>Kt(t)),1e3)}))}))})),Kt(t)};function Jt(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Xt(e){for(var t=1;t{const r=e.map((e=>{let{name:t,links:r,urlAttr:n}=e;const i=Mt(r,n);if(i.length)return{module:t,links:i}})).filter((e=>!!e));r.length&&t("elegible",r)},Qt=(e,t)=>{e.forEach((e=>{let{name:r,links:n,urlAttr:i}=e;n.forEach((e=>{e.el.addEventListener("click",(n=>{const o=e.el,s=wt(o,i);if(a=e.el,!n.__mrfTracked&&!0!==(null===(c=bt(a))||void 0===c?void 0:c.__mrfTracked)&&s){const o=Mt([e],i);if(o.length&&Ut(o[0],r))return;((e,t)=>{const r=bt(e);t.__mrfTracked=!0,r&&(r.__mrfTracked=!0)})(e.el,n),kt(r||"",s),o.length&&t("click",[{module:r,links:o}])}var a,c}))}))}))},Yt=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:()=>!0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document.body,r=arguments.length>2?arguments[2]:void 0;const n=r?"a":ht.map((e=>"[".concat(e,"] a[href], a[href][").concat(e,"], [").concat(e,"] article[data-mrf-uri], [").concat(e,"] [").concat("data-mrf-layout","]"))).join(","),i=Array.from(t.querySelectorAll(n)).reduce(((t,n)=>{const i=(e=>e&&e.closest(ft()))(n)||r,o=(e=>{var t;return null===(t=ht.reduce(((t,r)=>t||(null==e?void 0:e.getAttribute(r))),void 0))||void 0===t?void 0:t.replace(/"/g,'\\"')})(i),s=(null==i?void 0:i.getAttribute("data-mrf-recirculation-url-attribute"))||"",a=n,c=wt(a,s);if(c&&de(a,c,!1),!o||!c||!e(o,a))return t;const u=t[o]||{links:[]},l="contents"===window.getComputedStyle(a,null).display;return Xt(Xt({},t),{},{[o]:Xt(Xt({},u),{},{links:[...u.links,{el:a,root:i,intersectionStrategy:l?"child":"element"}],urlAttr:s})})}),{});return(e=>{const t=yt();Object.entries(e).forEach((e=>{let[r,{links:n,urlAttr:i}]=e;const o=(e=>Number(e.map((e=>e.getAttribute("cmp-ltrk-idx"))).filter(Boolean).map((e=>e?parseInt(e,10):0)).reduce(((e,t)=>isNaN(e)||e{const r=t.filter((t=>{return r=e,n=t,ht.some((e=>{var t;return(null===(t=n.getAttribute(e))||void 0===t?void 0:t.toLowerCase())===r.toLowerCase()}));var r,n})).reduce(((t,r)=>{var n;return[...t,...(null===(n=r.shadowRoot)||void 0===n?void 0:n.querySelectorAll(At(e)))||[]]}),[]);return[...document.querySelectorAll(At(e)),...r]})(r,t));let s=isNaN(o)?0:o+1;n.forEach((e=>{const{el:t,root:o}=e,a=wt(t,i);if(Ct(t)||St(t)||!a)return;const c=((e,t,r)=>{const n=r.closest("[".concat("data-mrf-layout","]")),i=null==n?void 0:n.getAttribute("cmp-ltrk-idx");return n&&n.mrfLink===t&&i&&!isNaN(i)?i:e})(s,a,t);Tt(t,r,c);const u=n.filter((e=>{let{el:r,root:n}=e;return r!==t&&n===o&&!Ct(r)&&!St(r)&&wt(r,i)===a}));if(u.length){var l;const t=((e,t)=>{const r=document.querySelectorAll(t);let n=e;for(let i=0;i<8&&n.parentElement;i++){const i=Array.from(n.querySelectorAll(t)).filter((e=>null!==e.offsetParent));if(i.length>=r.length&&i.some((t=>!t.isEqualNode(e))))return n;if(null!==n.getAttribute("data-mrf-layout"))return null;n=n.parentElement}return null})(u[0].el,'a[href="'.concat(a,'"]'));(null!==(l=null==t?void 0:t.querySelectorAll("a"))&&void 0!==l?l:[]).length<=u.length+5&&(u.forEach((e=>{let{el:t}=e;return Tt(t,r,c)})),(e=>{let t=!1;if(["data-mrf-experiment"].forEach((r=>{const n=e.find((e=>{let{el:t}=e;return t.hasAttribute("data-mrf-experiment")}));n&&(Pt(n.el,e,r),t=!0)})),!t){const t=new MutationObserver((r=>{r.forEach((r=>{"attributes"===r.type&&"data-mrf-experiment"===r.attributeName&&(Pt(r.target,e,"data-mrf-experiment"),t.disconnect())}))}));e.forEach((e=>{let{el:r}=e;t.observe(r,{attributes:!0,attributeFilter:["data-mrf-experiment"]})}))}})([...u,e]))}s++}))}))})(i),Object.entries(i).map((e=>{let[t,r]=e;return{name:t,links:r.links,urlAttr:r.urlAttr}}))},Zt=e=>e.map((e=>{let{links:t,name:r,urlAttr:n}=e;return{name:r,urlAttr:n,links:Nt(t)}}));function er(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:()=>{},t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};const{parentNode:n,layouts:i=[]}=r;Dt(i);const o=Yt(((e,t)=>!St(t)&&!Ct(t)),t,n),s=Zt(o);return $t(s,e),Wt(o,e),Qt(o,e),o.length}function tr(e,t,r,n){er(e,t,r)&&n(),re((t=>{er(e,t,r)&&n()}),t)}function rr(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function nr(e){for(var t=1;tnr(nr({},t),{},{[r.n]:"elegible"!==e})),{})),t.map((e=>{if(n.find((t=>t.n===e.n))){const t=function(){const e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).find((e=>function(e){var t;return"object"==typeof e&&null!==e&&!(null===(t=e.meta)||void 0===t||!t.tv)}(e)));return e?e.meta.tv:void 0}(e.e);return nr(nr({},e),{},{e:[...e.e,nr({url:" ",p:"255"},t?{tv:t}:{})]})}return e}))):t}process(e,t){return"elegible"===e?this.processModules(e,t,(e=>!Object.keys(this.modules).includes(e.n))):"impression"===e?this.processModules(e,t,(e=>void 0!==this.modules[e.n]&&!this.modules[e.n])):t}}const or=["meta"],sr=async()=>{document&&"loading"===document.readyState&&await new Promise((e=>{document.addEventListener("DOMContentLoaded",e)}))},ar=(e,t)=>{e&&t&&kt("fc:".concat(e),t)},cr=e=>{let{modules:t,blacklist:r,redirectionLinks:n}=e,i=!1;return r.forEach((e=>{let{selector:t}=e;const r=document.querySelectorAll(t);Array.from(r).forEach((e=>{e instanceof HTMLElement&&!e.hasAttribute("data-mrf-recirculation-skip")&&e.setAttribute("data-mrf-recirculation-skip","")}))})),null==n||n.forEach((e=>{let{selector:t,queryParam:r}=e;const n=document.querySelectorAll(t);Array.from(n).forEach((e=>{if(!e.hasAttribute("data-mrf-recirculation-skip"))try{const n=(t=new URL(decodeURIComponent(decodeURIComponent(e.href))).search).length?t.slice(1).split("&").map((e=>e.split("="))).reduce(((e,t)=>{let[r,n]=t;return vt(vt({},e),{},{[r]:n})}),{}):{};n[r]&&de(e,decodeURIComponent(n[r]))}catch(e){}var t}))})),t.forEach((e=>{const t="selector"in e?e.selector:"[".concat(e.attr,"]"),r="name"in e?()=>e.name:t=>t.getAttribute(e.attr),n=document.querySelectorAll(t),o=e.urlAttribute;Array.from(n).forEach((e=>{(e=>(e=>(null===window||void 0===window?void 0:window.HTMLElementOrig)?e instanceof window.HTMLElementOrig:e instanceof HTMLElement)(e)&&!e.hasAttribute("data-mrf-recirculation-skip")&&!e.hasAttribute("data-mrf-recirculation")&&!e.closest("[data-mrf-experience]"))(e)&&(e.setAttribute("data-mrf-recirculation",r(e)),o&&e.setAttribute("data-mrf-recirculation-url-attribute",o),i=!0)}))})),i},ur=e=>"object"==typeof e&&null!==e?function(e,t){if(null==e)return{};var r,n,i=function(e,t){if(null==e)return{};var r,n,i={},o=Object.keys(e);for(n=0;n=0||(i[r]=e[r]);return i}(e,t);if(Object.getOwnPropertySymbols){var o=Object.getOwnPropertySymbols(e);for(n=0;n=0||Object.prototype.propertyIsEnumerable.call(e,r)&&(i[r]=e[r])}return i}(e,or):e;class lr{t;o=0;i=[];u(e){if(e.hadRecentInput)return;const t=this.i[0],r=this.i.at(-1);this.o&&t&&r&&e.startTime-r.startTime<1e3&&e.startTime-t.startTime<5e3?(this.o+=e.value,this.i.push(e)):(this.o=e.value,this.i=[e]),this.t?.(e)}}const dr=()=>{const e=performance.getEntriesByType("navigation")[0];if(e&&e.responseStart>0&&e.responseStart{if("loading"===document.readyState)return"loading";{const t=dr();if(t){if(e{const t=e.nodeName;return 1===e.nodeType?t.toLowerCase():t.toUpperCase().replace(/^#/,"")},fr=e=>{let t="";try{for(;9!==e?.nodeType;){const r=e,n=r.id?"#"+r.id:[hr(r),...Array.from(r.classList).sort()].join(".");if(t.length+n.length>99)return t||n;if(t=t?n+">"+t:n,r.id)break;e=r.parentNode}}catch{}return t},mr=new WeakMap;function vr(e,t){return mr.get(e)||mr.set(e,new t),mr.get(e)}let gr=-1;const yr=()=>gr,br=e=>{addEventListener("pageshow",(t=>{t.persisted&&(gr=t.timeStamp,e(t))}),!0)},wr=(e,t,r,n)=>{let i,o;return s=>{t.value>=0&&(s||n)&&(o=t.value-(i??0),(o||void 0===i)&&(i=t.value,t.delta=o,t.rating=((e,t)=>e>t[1]?"poor":e>t[0]?"needs-improvement":"good")(t.value,r),e(t)))}},Or=e=>{requestAnimationFrame((()=>requestAnimationFrame((()=>e()))))},Er=()=>dr()?.activationStart??0,kr=(e,t=-1)=>{const r=dr();let n="navigate";return yr()>=0?n="back-forward-cache":r&&(document.prerendering||Er()>0?n="prerender":document.wasDiscarded?n="restore":r.type&&(n=r.type.replace(/_/g,"-"))),{name:e,value:t,rating:"good",delta:0,entries:[],id:`v5-${Date.now()}-${Math.floor(8999999999999*Math.random())+1e12}`,navigationType:n}},Pr=(e,t,r={})=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const n=new PerformanceObserver((e=>{Promise.resolve().then((()=>{t(e.getEntries())}))}));return n.observe({type:e,buffered:!0,...r}),n}}catch{}},Sr=e=>{let t=!1;return()=>{t||(e(),t=!0)}};let Cr=-1;const jr=()=>"hidden"!==document.visibilityState||document.prerendering?1/0:0,Tr=e=>{"hidden"===document.visibilityState&&Cr>-1&&(Cr="visibilitychange"===e.type?e.timeStamp:0,Ir())},Ar=()=>{addEventListener("visibilitychange",Tr,!0),addEventListener("prerenderingchange",Tr,!0)},Ir=()=>{removeEventListener("visibilitychange",Tr,!0),removeEventListener("prerenderingchange",Tr,!0)},Dr=()=>{if(Cr<0){const e=Er(),t=document.prerendering?void 0:globalThis.performance.getEntriesByType("visibility-state").filter((t=>"hidden"===t.name&&t.startTime>e))[0]?.startTime;Cr=t??jr(),Ar(),br((()=>{setTimeout((()=>{Cr=jr(),Ar()}))}))}return{get firstHiddenTime(){return Cr}}},Nr=e=>{document.prerendering?addEventListener("prerenderingchange",(()=>e()),!0):e()},_r=[1800,3e3],Rr=(e,t={})=>{Nr((()=>{const r=Dr();let n,i=kr("FCP");const o=Pr("paint",(e=>{for(const t of e)"first-contentful-paint"===t.name&&(o.disconnect(),t.startTime{i=kr("FCP"),n=wr(e,i,_r,t.reportAllChanges),Or((()=>{i.value=performance.now()-r.timeStamp,n(!0)}))})))}))},Lr=[.1,.25],xr=e=>e.find((e=>1===e.node?.nodeType))||e[0];let Mr=0,Ur=1/0,Vr=0;const Fr=e=>{for(const t of e)t.interactionId&&(Ur=Math.min(Ur,t.interactionId),Vr=Math.max(Vr,t.interactionId),Mr=Vr?(Vr-Ur)/7+1:0)};let qr;const Br=()=>qr?Mr:performance.interactionCount??0;let zr=0;class Gr{l=[];h=new Map;m;p;v(){zr=Br(),this.l.length=0,this.h.clear()}M(){const e=Math.min(this.l.length-1,Math.floor((Br()-zr)/50));return this.l[e]}u(e){if(this.m?.(e),!e.interactionId&&"first-input"!==e.entryType)return;const t=this.l.at(-1);let r=this.h.get(e.interactionId);if(r||this.l.length<10||e.duration>t.T){if(r?e.duration>r.T?(r.entries=[e],r.T=e.duration):e.duration===r.T&&e.startTime===r.entries[0].startTime&&r.entries.push(e):(r={id:e.interactionId,entries:[e],T:e.duration},this.h.set(r.id,r),this.l.push(r)),this.l.sort(((e,t)=>t.T-e.T)),this.l.length>10){const e=this.l.splice(10);for(const t of e)this.h.delete(t.id)}this.p?.(r)}}}const Hr=e=>{const t=globalThis.requestIdleCallback||setTimeout;"hidden"===document.visibilityState?e():(t(e=Sr(e)),document.addEventListener("visibilitychange",e,{once:!0}))},Kr=[200,500];class Wr{m;u(e){this.m?.(e)}}const Jr=[2500,4e3];class Xr{constructor(){this.cls=0,this.lcp=0,this.fcp=0,this.wv=0,this.tbt=0,this.inp=0,this.lcpOffender=null,this.clsOffender=null,this.inpOffender=null,Array.prototype.at&&(this.setTbt(),this.setINP(),this.setLCP(),this.setFCP(),this.setCLS())}hasWebVitals(){return this.lcp||this.fcp||this.cls||this.inp?1:0}setLCP(){((e,t={})=>{const r=vr(t=Object.assign({},t),Wr),n=new WeakMap;r.m=e=>{if(e.element){const r=(t.generateTarget??fr)(e.element);n.set(e,r)}},((e,t={})=>{Nr((()=>{const r=Dr();let n,i=kr("LCP");const o=vr(t,Wr),s=e=>{t.reportAllChanges||(e=e.slice(-1));for(const t of e)o.u(t),t.startTime{s(a.takeRecords()),a.disconnect(),n(!0)}));for(const e of["keydown","click","visibilitychange"])addEventListener(e,(()=>Hr(r)),{capture:!0,once:!0});br((r=>{i=kr("LCP"),n=wr(e,i,Jr,t.reportAllChanges),Or((()=>{i.value=performance.now()-r.timeStamp,n(!0)}))}))}}))})((t=>{const r=(e=>{let t={timeToFirstByte:0,resourceLoadDelay:0,resourceLoadDuration:0,elementRenderDelay:e.value};if(e.entries.length){const r=dr();if(r){const i=r.activationStart||0,o=e.entries.at(-1),s=o.url&&performance.getEntriesByType("resource").filter((e=>e.name===o.url))[0],a=Math.max(0,r.responseStart-i),c=Math.max(a,s?(s.requestStart||s.startTime)-i:0),u=Math.min(e.value,Math.max(c,s?s.responseEnd-i:0));t={target:n.get(o),timeToFirstByte:a,resourceLoadDelay:c-a,resourceLoadDuration:u-c,elementRenderDelay:e.value-u,navigationEntry:r,lcpEntry:o},o.url&&(t.url=o.url),s&&(t.lcpResourceEntry=s)}}return Object.assign(e,{attribution:t})})(t);e(r)}),t)})((e=>{var t;this.lcp=e.value,this.lcp>2500&&null!==(t=e.attribution)&&void 0!==t&&t.target&&(this.lcpOffender=e.attribution.target)}))}setFCP(){((e,t={})=>{Rr((t=>{const r=(e=>{let t={timeToFirstByte:0,firstByteToFCP:e.value,loadState:pr(yr())};if(e.entries.length){const r=dr(),n=e.entries.at(-1);if(r){const i=r.activationStart||0,o=Math.max(0,r.responseStart-i);t={timeToFirstByte:o,firstByteToFCP:e.value-o,loadState:pr(e.entries[0].startTime),navigationEntry:r,fcpEntry:n}}}return Object.assign(e,{attribution:t})})(t);e(r)}),t)})((e=>this.fcp=e.value))}setINP(){((e,t={})=>{const r=vr(t=Object.assign({},t),Gr);let n=[],i=[],o=0;const s=new WeakMap,a=new WeakMap;let c=!1;const u=()=>{c||(Hr(l),c=!0)},l=()=>{const e=r.l.map((e=>s.get(e.entries[0]))),t=i.length-50;i=i.filter(((r,n)=>n>=t||e.includes(r)));const a=new Set;for(const e of i){const t=d(e.startTime,e.processingEnd);for(const e of t)a.add(e)}const u=n.length-1-50;n=n.filter(((e,t)=>e.startTime>o&&t>u||a.has(e))),c=!1};r.m=e=>{const t=e.startTime+e.duration;let r;o=Math.max(o,e.processingEnd);for(let n=i.length-1;n>=0;n--){const o=i[n];if(Math.abs(t-o.renderTime)<=8){r=o,r.startTime=Math.min(e.startTime,r.startTime),r.processingStart=Math.min(e.processingStart,r.processingStart),r.processingEnd=Math.max(e.processingEnd,r.processingEnd),r.entries.push(e);break}}r||(r={startTime:e.startTime,processingStart:e.processingStart,processingEnd:e.processingEnd,renderTime:t,entries:[e]},i.push(r)),(e.interactionId||"first-input"===e.entryType)&&s.set(e,r),u()},r.p=e=>{if(!a.get(e)){const r=(t.generateTarget??fr)(e.entries[0].target);a.set(e,r)}};const d=(e,t)=>{const r=[];for(const i of n)if(!(i.startTime+i.durationt)break;r.push(i)}return r};Pr("long-animation-frame",(e=>{n=n.concat(e),u()})),((e,t={})=>{globalThis.PerformanceEventTiming&&"interactionId"in PerformanceEventTiming.prototype&&Nr((()=>{"interactionCount"in performance||qr||(qr=Pr("event",Fr,{type:"event",buffered:!0,durationThreshold:0}));let r,n=kr("INP");const i=vr(t,Gr),o=e=>{Hr((()=>{for(const t of e)i.u(t);const t=i.M();t&&t.T!==n.value&&(n.value=t.T,n.entries=t.entries,r())}))},s=Pr("event",o,{durationThreshold:t.durationThreshold??40});r=wr(e,n,Kr,t.reportAllChanges),s&&(s.observe({type:"first-input",buffered:!0}),document.addEventListener("visibilitychange",(()=>{"hidden"===document.visibilityState&&(o(s.takeRecords()),r(!0))})),br((()=>{i.v(),n=kr("INP"),r=wr(e,n,Kr,t.reportAllChanges)})))}))})((t=>{const n=(e=>{const t=e.entries[0],n=s.get(t),i=t.processingStart,o=Math.max(t.startTime+t.duration,i),c=Math.min(n.processingEnd,o),u=n.entries.sort(((e,t)=>e.processingStart-t.processingStart)),l=d(t.startTime,c),p=r.h.get(t.interactionId),h={interactionTarget:a.get(p),interactionType:t.name.startsWith("key")?"keyboard":"pointer",interactionTime:t.startTime,nextPaintTime:o,processedEventEntries:u,longAnimationFrameEntries:l,inputDelay:i-t.startTime,processingDuration:c-i,presentationDelay:o-c,loadState:pr(t.startTime),longestScript:void 0,totalScriptDuration:void 0,totalStyleAndLayoutDuration:void 0,totalPaintDuration:void 0,totalUnattributedDuration:void 0};return(e=>{if(!e.longAnimationFrameEntries?.length)return;const t=e.interactionTime,r=e.inputDelay,n=e.processingDuration;let i,o,s=0,a=0,c=0,u=0;for(const c of e.longAnimationFrameEntries){a=a+c.startTime+c.duration-c.styleAndLayoutStart;for(const e of c.scripts){const c=e.startTime+e.duration;if(cu&&(o=e.startTime=t+r+n?"presentation-delay":"processing-duration",i=e,u=l)}}const l=e.longAnimationFrameEntries.at(-1),d=l?l.startTime+l.duration:0;d>=t+r+n&&(c=e.nextPaintTime-d),i&&o&&(e.longestScript={entry:i,subpart:o,intersectingDuration:u}),e.totalScriptDuration=s,e.totalStyleAndLayoutDuration=a,e.totalPaintDuration=c,e.totalUnattributedDuration=e.nextPaintTime-t-s-a-c})(h),Object.assign(e,{attribution:h})})(t);e(n)}),t)})((e=>{var t;if(this.inp=e.value,this.inp>200&&null!==(t=e.attribution)&&void 0!==t&&t.interactionTarget){var r,n,i,o;const t=document.location.href;this.inpOffender="".concat(null===(r=e.attribution)||void 0===r?void 0:r.interactionType,"::").concat(e.attribution.interactionTarget),this.inpOffenderStatus=e.attribution.loadState,this.inpOffenderScript=null===(n=e.attribution.longestScript)||void 0===n||null===(n=n.entry)||void 0===n?void 0:n.sourceURL,this.inpOffenderScript===t&&(this.inpOffenderScript="inline"),this.inpOffenderScriptFn=null===(i=e.attribution.longestScript)||void 0===i||null===(i=i.entry)||void 0===i?void 0:i.sourceFunctionName,this.inpOffenderScriptInvoke=null===(o=e.attribution.longestScript)||void 0===o||null===(o=o.entry)||void 0===o?void 0:o.invoker,this.inpOffenderScriptInvoke===t&&(this.inpOffenderScriptInvoke="inline")}}))}setTbt(){return!!((e,t)=>{try{if(PerformanceObserver.supportedEntryTypes.includes(e)){const r=new PerformanceObserver((e=>{e.getEntries().map((e=>t(e)))}));return r.observe({type:e,buffered:!0}),r}}catch(e){}})("longtask",(e=>{this.tbt+=e.duration-50}))}setCLS(){((e,t={})=>{const r=vr(t=Object.assign({},t),lr),n=new WeakMap;r.t=e=>{if(e.sources.length){const r=xr(e.sources);if(r){const e=(t.generateTarget??fr)(r.node);n.set(r,e)}}},((e,t={})=>{Rr(Sr((()=>{let r,n=kr("CLS",0);const i=vr(t,lr),o=e=>{for(const t of e)i.u(t);i.o>n.value&&(n.value=i.o,n.entries=i.i,r())},s=Pr("layout-shift",o);s&&(r=wr(e,n,Lr,t.reportAllChanges),document.addEventListener("visibilitychange",(()=>{"hidden"===document.visibilityState&&(o(s.takeRecords()),r(!0))})),br((()=>{i.o=0,n=kr("CLS",0),r=wr(e,n,Lr,t.reportAllChanges),Or((()=>r()))})),setTimeout(r))})))})((t=>{const r=(e=>{let t={};if(e.entries.length){const r=e.entries.reduce(((e,t)=>e.value>t.value?e:t));if(r?.sources.length){const e=xr(r.sources);e&&(t={largestShiftTarget:n.get(e),largestShiftTime:r.startTime,largestShiftValue:r.value,largestShiftSource:e,largestShiftEntry:r,loadState:pr(r.startTime)})}}return Object.assign(e,{attribution:t})})(t);e(r)}),t)})((e=>{var t;this.cls=e.value,this.cls>.1&&null!==(t=e.attribution)&&void 0!==t&&t.largestShiftTarget&&(this.clsOffender=e.attribution.largestShiftTarget,this.clsOffenderStatus=e.attribution.loadState)}),{reportAllChanges:!0})}}function $r(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Qr(e){for(var t=1;t{Yr.cleanTimer()},tn=(e,t)=>{Yr.callOnTimer(t,e)},{userIdPromise:rn,resolveFinalUserId:nn}=(()=>{let e=()=>{};return{userIdPromise:new Promise((t=>{e=t})),resolveFinalUserId:e}})();class on{constructor(e){this.compassTracker=e}getUserId(){return{userIdPromise:rn,actualUserId:this.compassTracker.permanentCookie.userId}}processIdentity(e){e&&(Ce(e.uid)&&(this.compassTracker.permanentCookie.userId=e.uid,this.compassTracker.markAsModified("permanent")),Ce(e.sid)&&(this.compassTracker.temporalCookie.sessionId=e.sid,this.compassTracker.markAsModified("temporal")),this.compassTracker.saveCookies()),Ce(this.compassTracker.permanentCookie.userId)&&nn(this.compassTracker.permanentCookie.userId)}}const sn={web:0,fbia:2,iosapp:3,androidapp:4,flowcards:5,pressreader:6,app:7,applenews:8,pressreaderandroid:11,pressreaderios:12},an=e=>{if(isNaN(e)){const t=e.toLowerCase().replace(/ /g,"");return void 0!==sn[t]?sn[t]:null}return e};function cn(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0,r=arguments.length>2?arguments[2]:void 0;if(null==r||""===r){let r=0;for(;r{cn(un,e,t)};let dn=null;const pn=()=>dn=null,hn=e=>{const t=e.parentElement;t&&(t.addEventListener("mouseenter",(()=>(e=>{dn=e})(e))),t.addEventListener("mouseleave",pn))},fn=(e,t,r)=>{const n=Array.from(e).filter((e=>!e.hasAttribute("cmp-cnvtrk")));for(const e of n)e.addEventListener(t,(()=>{const t=e.dataset.mrfConversion;t&&r(t)})),e.setAttribute("cmp-cnvtrk","true")},mn=e=>{const t=document.querySelectorAll("iframe[data-mrf-conversion]"),r=document.querySelectorAll("form[data-mrf-conversion]"),n=document.querySelectorAll("button[data-mrf-conversion], a[data-mrf-conversion]");fn(r,"submit",e),fn(n,"click",e),(e=>{const t=Array.from(e).filter((e=>!e.hasAttribute("cmp-cnvtrk")));for(const e of t)hn(e),e.setAttribute("cmp-cnvtrk","true")})(t)},vn=e=>{re((()=>{mn(e)})),mn(e)};var gn;function yn(e){return e.update=Date.now(),function(e,t){try{return window.localStorage.setItem("marfeel-sdk-store",t),!0}catch(e){return!1}}(0,btoa(JSON.stringify(e)))}function bn(){return void 0===gn&&(gn=function(){var e=function(e){try{return window.localStorage.getItem("marfeel-sdk-store")}catch(e){return null}}();if(e)return JSON.parse(atob(e));var t={creation:Date.now(),update:Date.now(),entries:{}};return yn(t),t}()),gn}const wn="compass-conversions-counter-entry",On=e=>{let t=(null!=e?e:"").toString();return!t.startsWith("/")&&t.includes("/")&&(t="/".concat(t)),t.split("/").map((e=>e.split(",").shift())).join("/")};class En{constructor(){this.newAds=[],this.newAdUnitPaths=[],this.trackedAds={},this.refreshedAds={}}setInterstitialSlot(e){this.interstitialSlot=e}trackAdEvent(e,t){const r=t.getSlotElementId();let n=!1;if("slotRenderEnded"===e&&(this.trackedAds[r]&&(this.refreshedAds[r]=!0),this.trackedAds[r]=!1,n=t!==this.interstitialSlot&&!this.refreshedAds[r]),"slotVisibilityChanged"===e&&(n=(t===this.interstitialSlot||this.refreshedAds[r])&&!this.trackedAds[r]),n){const e=t.getAdUnitPath(),n=t.getResponseInformation()&&t.getResponseInformation().lineItemId;this.trackAdRenderedInternal(n||e,e),this.trackedAds[r]=!0}return n}trackAdEventLegacy(e,t,r){return"slotRenderEnded"===e&&(this.trackAdRenderedInternal(t||r,r),!0)}trackAdRenderedInternal(e,t){this.newAds.push(On(e)),t&&this.newAdUnitPaths.push(On(t))}getAds(){return this.newAds.splice(0)}getAdUnits(){return this.newAdUnitPaths.splice(0)}}function kn(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Pn(e){for(var t=1;t{((e,t)=>{const r={requests:{ads:e},triggers:{renderEnd:{on:"ad-render-end",request:"ads",selector:"body",extraUrlParams:Pn(Pn({},t),{},{l:"${totalEngagedTime}",sc:_e(!1),a:"-1",ps:"${navTiming(navigationStart)}",n:"${timestamp}",ads:"$IF(${adSlot}, ${adSlot}, -1)amp",ampFirst:"true"})}},transport:{beacon:!0,xhrpost:!0,image:!1}},n=()=>{document.body.appendChild((e=>{const t=document.createElement("amp-analytics"),r=document.createElement("script");return r.type="application/json",r.innerText=JSON.stringify(e),t.appendChild(r),t})(r))};"loading"===document.readyState?window.addEventListener("load",(()=>n())):n()})(e,t)};class Cn{constructor(){this.events={}}on(e,t){void 0===this.events[e]&&(this.events[e]={listeners:[]}),this.events[e].listeners.push(t)}remove(e,t){this.events[e].listeners=this.events[e].listeners.filter((e=>e.toString()!==t.toString()))}dispatch(e,t){this.events[e]&&this.events[e].listeners.forEach((e=>{e(t)}))}}function jn(e,t){try{const r=[...t],n=r.shift();let i;if(Array.isArray(e)){const r=e.map((e=>jn(e,t))).filter(Boolean);i=r.length&&r[0]}else i=e[n];return 0===r.length?i?null==i?void 0:i.toString():null:jn(i,r)}catch(e){return null}}function Tn(e){var t,r;return null!==(r=null!==(t=e["@type"])&&void 0!==t?t:e.type)&&void 0!==r?r:void 0}function An(e){var t,r,n,i;if(e)return"string"==typeof e?e:Object.assign(Object.assign({},e),{"@type":null!==(r=null!==(t=e["@type"])&&void 0!==t?t:e.type)&&void 0!==r?r:void 0,"@id":null!==(i=null!==(n=e["@id"])&&void 0!==n?n:e.id)&&void 0!==i?i:void 0})}function In(e){var t,r,n,i;return Object.assign(Object.assign({},e),{"@type":null!==(r=null!==(t=e["@type"])&&void 0!==t?t:e.type)&&void 0!==r?r:void 0,"@id":null!==(i=null!==(n=e["@id"])&&void 0!==n?n:e.id)&&void 0!==i?i:void 0,mainEntityOfPage:An(e.mainEntityOfPage)})}function Dn(e,t){const r=Tn(e);return!!r&&t.includes(r)}function Nn(e,t,r,n=new Set){if(!e||n.has(e))return!1;if(e===t)return!0;n.add(e);const i=((e,t)=>e.find((e=>((e,t)=>"@id"in e&&e["@id"]===t)(e,t))))(r,e);return!!(null==i?void 0:i.url)&&Nn(i.url,t,r,n)}function _n(e,t){return e.filter((e=>Dn(e,[t])))}function Rn(e,t,r){const n=e.mainEntityOfPage;return Nn(n&&"object"==typeof n&&"@id"in n?n["@id"]:n,t,r)}function Ln(e,t){return e.reduce(((e,t)=>(Object.keys(t).forEach((r=>{e[r]=t[r]})),e)),{"@type":t})}const xn=["ReportageNewsArticle","AnalysisNewsArticle","OpinionNewsArticle","ReviewNewsArticle","BackgroundNewsArticle","NewsArticle","ScholarlyArticle","Report","TechArticle","AskPublicNewsArticle","SatiricalArticle","AdvertiserContentArticle","BlogPosting","LiveBlogPosting","SocialMediaPosting","Recipe","Article"];var Mn=Object.freeze({__proto__:null,ARTICLE_ENTITY_TYPES_PRIORITIES:xn,extract:function({attributePath:e,entitiesConstraint:t},r){var n;try{const i=document.querySelectorAll('script[type="application/ld+json"]');return i&&e?jn(null!==(n=function(e,t,r){const n=(e=>Array.from(e).map((e=>{var t;try{const r=e.textContent?((null===(t=e.textContent)||void 0===t?void 0:t.trim())||"").replace(/[\n\t]/g,""):"{}";return JSON.parse(`${r}`)}catch(e){return null}})).filter(Boolean).map((e=>e instanceof Array?e:[e])).map((e=>e.map((e=>(e=>{if("@graph"in e){const t=e["@graph"];if(t instanceof Array)return[e,...t];if(t)return[e,t]}return[e]})(e))).flat().filter((e=>!!Tn(e))).map(In))).flat())(e),i=function(e,t){return e.filter((e=>e.mainEntityOfPage&&Dn(e,t)))}(n,t);let o;return o=1===i.length?i[0]:i.length>1&&r?function(e,t,r,n){for(const i of r){const r=_n(e,i).filter((e=>Rn(e,t,n)));if(r.length>0)return Ln(r,i)}return null}(i,r,t,n):function(e,t){for(const r of t){const t=_n(e,r);if(t.length>0)return Ln(t,r)}return null}(n,t),o}(i,null!=t?t:xn,r))&&void 0!==n?n:[],e):null}catch(e){return null}}});const Un=/^(\d{4})-(\d{2})-(\d{2})T(\d{2}):(\d{2}):(\d{2})(\.\d+)?(Z|[+-]\d{2}:\d{2})$/;function Vn(e){let t;return t=Un.test(e)?new Date(e):new Date(e+"Z"),t.getTime()}const Fn={jsonLD:Mn,querySelector:Object.freeze({__proto__:null,extract:function({queries:e}){if(!e)return null;const t=e.reduce(((e,{query:t,attribute:r})=>(document.querySelectorAll(t).forEach((t=>{r?e.push(t.getAttribute(r)||null):t.textContent&&e.push(t.textContent)})),e)),[]).filter((e=>null!==e));return 1===t.length||t.length>1&&t.every((e=>e===t[0]||Vn(e)===Vn(t[0])))?t[0]:null}})},qn=(e,t)=>{for(const r of e){const e=Fn[r.type].extract(r,t);if(e)return e}return null},Bn=[{type:"jsonLD",attributePath:["dateModified"],entitiesConstraint:xn},{type:"querySelector",queries:[{query:'meta[property="article:modified_time"]',attribute:"content"}]},{type:"querySelector",queries:[{query:'meta[itemprop="dateModified"]',attribute:"content"}]},{type:"querySelector",queries:[{query:'time[itemprop="dateModified"]',attribute:"datetime"}]},{type:"querySelector",queries:[{query:'time[itemprop="dateModified"]',attribute:"content"}]},{type:"querySelector",queries:[{query:'[itemprop="dateModified"]'}]}];var zn=Object.freeze({__proto__:null,extract:e=>qn(Bn,e)});const Gn=[{type:"jsonLD",attributePath:["datePublished"],entitiesConstraint:xn},{type:"querySelector",queries:[{query:'[itemtype="http://schema.org/NewsArticle"] time[itemprop="datePublished"]',attribute:"datetime"}]},{type:"querySelector",queries:[{query:'meta[property="article:published_time"]',attribute:"content"},{query:':not([itemprop="image"]) > meta[itemprop="datePublished"]',attribute:"content"},{query:'time[itemprop="datePublished"]',attribute:"datetime"},{query:'time[itemprop="datePublished"]',attribute:"content"},{query:'meta[name="cXenseParse:recs:publishtime"]',attribute:"content"}]},{type:"querySelector",queries:[{query:'[itemprop="datePublished"]'}]}];var Hn=Object.freeze({__proto__:null,extract:e=>qn(Gn,e)});const Kn=[{type:"jsonLD",attributePath:["offers","lowPrice"],entitiesConstraint:["Product"]},{type:"jsonLD",attributePath:["offers","price"],entitiesConstraint:["Product"]},{type:"querySelector",queries:[{query:'[itemprop="offers"] [itemprop="price"]',attribute:"content"}]},{type:"querySelector",queries:[{query:'meta[property="product:price:amount"]',attribute:"content"}]}];var Wn=Object.freeze({__proto__:null,extract:e=>qn(Kn,e)});const Jn=[{type:"jsonLD",attributePath:["offers","availability"],entitiesConstraint:["Product"]},{type:"querySelector",queries:[{query:'[itemprop="offers"] link[itemprop="availability"]',attribute:"href"},{query:'[itemprop="offers"] [itemprop="availability"]',attribute:"content"}]},{type:"querySelector",queries:[{query:'meta[property="product:availability"]',attribute:"content"}]}],Xn={updateTime:zn,publishTime:Hn,availability:Object.freeze({__proto__:null,extract:e=>qn(Jn,e)}),price:Wn},$n=(e,t)=>Xn[e].extract(t),Qn=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];try{if(t){const t=Qe(e);return JSON.parse(t)||{}}return(e=>{const t=Me(e);if(t)try{return JSON.parse(t)}catch(e){}return null})(e)||{}}catch(e){return{}}},Yn=function(e,t){let r=arguments.length>2&&void 0!==arguments[2]&&arguments[2];const n=t?Qn("".concat(e,"_").concat(t),r):null;return n&&0!==Object.keys(n).length?n:Qn(e,r)};function Zn(e,t){let r=0;return e.active&&(r=5),Math.min(t-e.time,r)}class ei{constructor(){this.totalEngagedTime=0,this.prevEvent=void 0}pushEvent(e){this.prevEvent&&this.prevEvent.time{document.addEventListener(e,(()=>this.eventTriggered(!0)))})),ri.forEach((e=>{document.addEventListener(e,(()=>this.eventTriggered(!1)))})),W((()=>this.eventTriggered(!1))),J((()=>this.eventTriggered(!0)))}getTimeSinceStart(){const e=Date.now()-this.startTime;return e>0?e:0}eventTriggered(e){e&&this.listeningActive||!e&&this.listeningInactive||(this.listeningActive=e,this.listeningInactive=!e,this.handleEvent(e))}handleEvent(e){const t=Math.floor(this.getTimeSinceStart()/1e3);setTimeout((()=>{this.listeningActive=!1,this.listeningInactive=!1}),1e3),this.acitvityHistory.pushEvent({active:e,time:t})}getTotalEngagedTime(){const e=Math.floor(this.getTimeSinceStart()/1e3);return this.acitvityHistory.getTotalEngagedTime(e)}}function ii(){let e=arguments.length>1?arguments[1]:void 0,t=!1;(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).forEach((e=>{let{selector:r,name:n}=e;document.querySelectorAll(r).forEach((e=>{e.getAttribute("data-mrf-conversion")||(t=!0,e.setAttribute("data-mrf-conversion",n))}))})),t&&mn(e)}function oi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}const si=function(e){const t=e=>e&&"object"==typeof e;for(var r=arguments.length,n=new Array(r>1?r-1:0),i=1;i(Object.keys(r).forEach((n=>{const i=e[n],o=r[n];Array.isArray(i)&&Array.isArray(o)?e[n]=[...i].concat(...o):t(i)&&t(o)?e[n]=si(i,o):e[n]=o})),e)),e)},ai=(e,t)=>{const r=(e=>{try{const t=new URL(e);return Array.from(t.searchParams.entries()).filter((e=>{let[t]=e;return t.startsWith("mrf_")})).reduce(((e,t)=>{let[r,n]=t;return e[r]=n,e}),{})}catch(e){return{}}})(e);if(r[t])return"string"==typeof r[t]&&Ce(r[t])?r[t]:void 0},ci=e=>ai(e,"mrf_s"),ui=e=>ai(e,"mrf_u"),li=e=>[...new Set(e)],di=(e,t)=>{let r=null;return function(){for(var n=arguments.length,i=new Array(n),o=0;o{e(...i)}),t)}},pi="".concat("https://experiences.mrf.io","/passexperience/dw-check.html?v=6");let hi=!1;const fi=new Set;function mi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function vi(e){for(var t=1;t{},yi=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:1;return{api:new H(Fe),replicas:e,preprocess:e=>e instanceof FormData?(e.append("fk",1),e):(null==e?void 0:e.constructor)===Object?vi(vi({},e),{},{fk:1}):e}};class bi{constructor(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Ge,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:We,n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:Je;var i;this.trackerName=window.__mrfCompass?"__mrfCompass":"__newsroom_js",window[this.trackerName].data=window[this.trackerName].data||[],this.handleImmediateCallsToDataArray(),this.tracker=window[this.trackerName],this.userIdManager=new on(this),this.accountId=this.tracker.accountId,this.cookieDomain=(e=>{if(null===e){const e=(e=>{const t=e.split(".").filter((e=>"www"!==e));if(t.length<2||ce.test(e))return null;if(2===t.length)return t.join(".");const r=t.slice(-2),n=t.length-1;return(e=>{const t=e.length-1;return 2===e[t].length&&!!["avz","co","com","df","gob","gov","org","rt"].includes(e[t-1])})(r)&&r.unshift(t[n-2]),r.join(".")})(window.location.hostname);return(e=>{const t="mrf_cookie";Ye(t,"ok",void 0,"/",e);const r=Qe(t);return Ze(t,"/",e),!!r})(e)?e:window.location.hostname}return e})(this.tracker.cookieDomain||null),this.initFlags(),this.adsTracker=new En,this.adsDelay=1e4,this.temporalCookieModified=!1,this.permanentCookieModified=!1,this.consentManager=t,this.setupConsent(this.tracker),this.synchronizer=r,this.events=n,this.dispatcher=new Cn,this.moduleTracker=new ir,this.endpointDomain=(e=>{let{endpoint:t}=e;return t&&ie(t)||Ve})(this.tracker),this.api=((...e)=>new $(...e))(...[new H(this.endpointDomain,{fallback:"https://icu.newsroom.bi",fallbackWindow:6e4,onModeChange:(e,t)=>{e===q.FALLBACK&&this.setPageVar("mrfNE",t)}}),this.tracker.stress&&yi(this.tracker.stressReplicas)].filter(Boolean)),this.initializeCookies(),this.tracker.lazy||this.initialize(),this.synchronizer.wait("pageInitialized").then((()=>{W((()=>{(e=>{this.synchronizer.resolve("experimentationDisabled",!1)})(),this.isLastEvent=!0,this.collectAndTrackPage()})),J(di((()=>{this.isLastEvent&&(en(),this.trackPage())}),500))})),i=()=>this.trackNewPage({rs:"back forward cache"}),window.addEventListener("pageshow",(e=>{e.persisted&&i()}),{capture:!0}),function(e,t,r){r?Sn(e,t):window.customElements.whenDefined("amp-ad").then((()=>Sn(e,t)))}("".concat(this.endpointDomain).concat("/ingest.php"),this.getBasicConfig(),this.tracker.isAmpFirst),this.tracker.setFCSource=ar,this.contextVariables={},this.initializeRFV(),this.listenForScrollDepth(),this.trackedConversions={}}initializeRFV(){this.consentManager.getConsent("personalization")||this.consentManager.onChange((()=>{this.getRFV(gi)}))}initFlags(){var e,t;const r=(e,t)=>Number.isFinite(e)?Math.min(e,365):t;this.tracker.lazy=this.tracker.lazy||!1,this.tracker.isAmpFirst=this.tracker.isAmpFirst||!1,this.tracker.isCookieSandboxed=this.tracker.isCookieSandboxed||[1464,3838].includes(this.accountId);const n=vi({lazy:!1,layouts:[],modules:[]},this.tracker.rm||{});this.tracker.rm=function(e){let t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];const r={},n=function(e){for(var t=1;tObject.assign(r,{set:t=>{const r=t instanceof Function?t(n):t;e(si(n,r))}}))),r);return t&&o.set({}),o}(n,!n.lazy),this.tracker.usePerformanceEndpoint=this.tracker.usePerformanceEndpoint||!1,this.tracker.adsTrackingFromClient&&(this.nrGoogleTrackingActive=!0),this.tracker.consentCookieLength=r(this.tracker.consentCookieLength,180),this.tracker.noConsentCookieEnabled=r(this.tracker.noConsentCookieEnabled,void 0),null!==(t=(e=this.tracker).blockOnReject)&&void 0!==t||(e.blockOnReject=!1)}setInterstitialSlot(e){this.adsTracker.setInterstitialSlot(e)}canWriteCookies(){return this.consentManager.getConsent("cookies")||Number.isFinite(this.tracker.noConsentCookieEnabled)}canTrack(){return this.getUserConsent(!1)||!this.tracker.blockOnNoConsent&&!this.tracker.blockOnReject||this.tracker.blockOnReject&&2===Ke(this.consentManager)}initializeCookies(){this.temporalCookie=function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=arguments.length>2?arguments[2]:void 0;const n=null===t?"":t,i=Xe(e,"currentVisitStarted"),o=Xe(e,"lastBeat",i),s=Xe(e,"referrer"),a=n.includes(r),c=""===t,u=!a&&!c,l=new Date;l.setMinutes(l.getMinutes()-30);const d=o<$e(l);return u&&!d?{sessionId:Xe(e,"sessionId",void 0),currentVisitStarted:Xe(e,"currentVisitStarted"),sessionVars:Xe(e,"sessionVars",[]),lastBeat:o}:u||!o||c&&d?{}:a&&d?{landingPage:Xe(e,"landingPage"),referrer:s,lpti:Xe(e,"lpti")}:e}(Yn("___nrbic",this.tracker.isCookieSandboxed?this.accountId:null,this.canWriteCookies()),se(this.tracker.pageType),this.cookieDomain),this.permanentCookie=Yn("___nrbi",this.tracker.isCookieSandboxed?this.accountId:null,this.canWriteCookies()),this.markAsModified("temporal"),this.markAsModified("permanent")}updateLastBeat(){let e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.temporalCookie.lastBeat=$e(),this.markAsModified("temporal"),e&&this.saveCookies()}async initialize(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.engagementCalculator=new ni,this.performanceStartTime=performance.now();const{url:t,rs:r,initialPageVars:n}=e,i=t?pe(t):t;en(),un=[],fi.clear(),n&&Object.keys(n).length>0&&await Promise.all(Object.entries(n).map((async e=>{let[t,r]=e;return await this.setPageVar(t,r)}))),window.googletag=window.googletag||{},window.googletag.cmd=window.googletag.cmd||[],void 0===this.nrGoogleTrackingActive&&(this.nrGoogleTrackingActive=!0,googletag.cmd.push((()=>{googletag.pubads().addEventListener("slotRenderEnded",(e=>{e.isEmpty||this.trackAdEvent("slotRenderEnded",e.slot)})),googletag.pubads().addEventListener("slotVisibilityChanged",(e=>{this.trackAdEvent("slotVisibilityChanged",e.slot)}))})));const o=!this.tick&&(e=>{var t,r;return"back forward cache"!==e&&"back_forward"===(null===(t=performance)||void 0===t||null===(r=t.getEntriesByType)||void 0===r||null===(r=r.call(t,"navigation"))||void 0===r||null===(r=r[0])||void 0===r?void 0:r.type)})(r)?"back forward":r;this.adsTracked=!1,this.pageId=null,this.isFirstPage=!0,this.recirculationSource=null,this.newAds=[],this.newAdUnitPaths=[],this.conversion=null,this.tick=0,this.isLastEvent=!1,this.endpoint=this.tracker.endpoint||qe,this.endpointDomain=ie(this.endpoint),this.currentPage=i||oe(this.tracker.pageType),this.startPageTime=$e(),this.cmsId=(()=>{const e=document.querySelectorAll('meta[property="mrf:cms_id"]');if(e.length)return e[0].getAttribute("content")})(),this.pageId=je(),this.url=i||oe(this.tracker.pageType),this.canonical=i||Te(this.tracker.pageType),this.updateTime=$n("updateTime",this.canonical),this.publishTime=$n("publishTime",this.canonical),this.setFirstVisit(),this.setPreviousVisit(),this.updateLastBeat(),this.setCurrentVisitStarted(),this.setTimesVisited(),this.setPagesViewed(),this.setLandingPage(i,this.publishTime),this.setRecirculationSource(o),this.saveCookies(),this.getRFV(gi),this.webVitals=new Xr;const s=this.trackPage();return this.setRecirculationTracking(),(e=>{const t=e.trackConversion.bind(e);(e=>{window.addEventListener("blur",(()=>(e=>{dn&&e(dn)})(e)))})((e=>{var r;return e&&t(null==e||null===(r=e.dataset)||void 0===r?void 0:r.mrfConversion)})),document.readyState&&"complete"===document.readyState?vn(t):document.addEventListener("DOMContentLoaded",(()=>{vn(t)}))})(this),this.dispatcher.dispatch("pageInitialized",{url:this.canonical}),this.synchronizer.resolve("pageInitialized"),s}stopTracking(){en(),this.isLastEvent=!0,this.collectAndTrackPage()}handleImmediateCallsToDataArray(){window[this.trackerName].data.oldPush=window[this.trackerName].data.push,window[this.trackerName].data.push=e=>{"getRFV"===e[0]?this.getRFV(e[1]):window[this.trackerName].data.oldPush(e)}}setIsNewUser(e){let t=!(arguments.length>1&&void 0!==arguments[1])||arguments[1];this.temporalCookie.isNewUser=e,this.markAsModified("temporal"),t&&this.saveCookies()}setFirstVisit(){let e=Xe(this.permanentCookie,"firstVisit");if(!1===e){e=$e(),this.permanentCookie.firstVisit=e;const t=Qe("compass_uid");t?this.permanentCookie.userId=Ce(t)?t:((e,t)=>{const r=Se(`${e}`,"c0a334de-7622-4bd6-8bff-0b2b750cf2c6");return Se(`${t}`,r)})(this.accountId,t):(this.permanentCookie.userId=je(),this.setIsNewUser(!0,!1)),this.permanentCookie.userVars=[],this.markAsModified("permanent")}else this.permanentCookie.userVars=this.permanentCookie.userVars||[]}setPreviousVisit(){const e=Xe(this.temporalCookie,"previousVisit"),t=Xe(this.permanentCookie,"futurePreviousVisit");if(!1===e&&!1!==t)this.temporalCookie.previousVisit=t,this.permanentCookie.futurePreviousVisit=$e(),this.markAsModified("temporal"),this.markAsModified("permanent");else if(!1===e&&!1===t){const e=$e();this.temporalCookie.previousVisit=e,this.permanentCookie.futurePreviousVisit=e,this.markAsModified("temporal"),this.markAsModified("permanent")}}setCurrentVisitStarted(){let e=Xe(this.temporalCookie,"currentVisitStarted");!1===e?(e=$e(),this.temporalCookie.currentVisitStarted=e,this.markAsModified("temporal"),this.temporalCookie.sessionId=je(),this.temporalCookie.sessionVars=[]):this.isFirstPage=!1}setTimesVisited(){let e=Xe(this.permanentCookie,"timesVisited");!1!==Xe(this.temporalCookie,"visitedInThisSession")&&!1!==e||(e=!1===e||isNaN(parseInt(e,10))?1:e+1,this.permanentCookie.timesVisited=e,this.temporalCookie.visitedInThisSession=!0,this.markAsModified("permanent"),this.markAsModified("temporal"))}setPagesViewed(){let e=Xe(this.temporalCookie,"pagesViewed");e=!1===e||isNaN(parseInt(e,10))?1:e+1,this.temporalCookie.pagesViewed=e,this.markAsModified("temporal")}setLandingPage(e,t){!1===Xe(this.temporalCookie,"landingPage")&&(this.temporalCookie.landingPage=e||oe(this.tracker.pageType),this.temporalCookie.referrer=ae(this.tracker.pageType),this.temporalCookie.lpti=t,this.markAsModified("temporal"))}getLandingPage(){var e;return null===(e=this.temporalCookie)||void 0===e?void 0:e.landingPage}getLandingPagePublishTime(){var e;return null===(e=this.temporalCookie)||void 0===e?void 0:e.lpti}trackExperience(e){(e=>{fi.add(e)})(e)}setRecirculationSource(e){if(e)this.recirculationSource=e;else{const e=(e=>{const t=((e,t)=>ue(e).search.substring(1).split("&").map((e=>e.split("="))).filter((e=>{let[t]=e;return"utm_cmp_rs"===t})).map((e=>{let[t,r]=e;return decodeURIComponent(r)})).shift())(e);return t||(e=>{const t=gt(e),r=Et(),n=Te();return r&&(r[t]||r[n])})(e)})(this.currentPage);e&&(this.recirculationSource=e,(e=>{const t=gt(e),r=Et();r&&(delete r[t],pt("___m_rec",JSON.stringify(r)))})(this.currentPage),(e=>"refresh"===e)(e)&&(this.previousPage=this.canonical))}}setCookieOnCookieDomain(e,t,r,n){Ye(e,t,r,n,this.cookieDomain)}getCookieExpiration(){var e;const t=this.consentManager.getConsent("cookies"),r=this.tracker.consentCookieLength,n=null!==(e=this.tracker.noConsentCookieEnabled)&&void 0!==e?e:0;if(!t&&0===n)return;const i=new Date(Date.now()),o=t?r:n;return i.setDate(i.getDate()+o),i.toGMTString()}saveTemporalCookie(){const e=this.tracker.isCookieSandboxed?"".concat("___nrbic","_").concat(this.accountId):"___nrbic";this.canWriteCookies()&&this.setCookieOnCookieDomain(e,JSON.stringify(this.temporalCookie),this.getCookieExpiration(),"/"),Ue(e,this.temporalCookie)}savePermanentCookie(){const e=this.tracker.isCookieSandboxed?"".concat("___nrbi","_").concat(this.accountId):"___nrbi";if(this.canWriteCookies()){const t=this.getCookieExpiration(),{actualUserId:r}=this.userIdManager.getUserId();this.setCookieOnCookieDomain(e,JSON.stringify(this.permanentCookie),t,"/"),this.saveAmpPermanentCookie(r)}Ue(e,this.permanentCookie)}saveAmpPermanentCookie(e){e&&this.setCookieOnCookieDomain("compass_uid",e,this.getCookieExpiration(),"/")}saveCookies(){let{force:e}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.temporalCookie&&(this.temporalCookieModified||e)&&this.saveTemporalCookie(),this.permanentCookie&&(this.permanentCookieModified||e)&&this.savePermanentCookie()}removeCookies(){const e=this.tracker.isCookieSandboxed?"_".concat(this.accountId):"";Ze("".concat("___nrbic").concat(e),"/",this.cookieDomain),Ze("".concat("___nrbi").concat(e),"/",this.cookieDomain)}markAsModified(e){this[e+"CookieModified"]=!0}getReferrer(){return this.previousPage?this.previousPage:ae(this.tracker.pageType)}hasTrackedAds(){return!this.nrGoogleTrackingActive||this.adsTracked}getEngagedTime(){var e;const t=$e()-this.startPageTime;return"fbia"===(null===(e=this.tracker)||void 0===e?void 0:e.pageType)?t:this.engagementCalculator.getTotalEngagedTime()}async track(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:new FormData;return new Promise((t=>{const r=0===this.tick;this.api.post("/ingest.php",e,{contentType:"application/x-www-form-urlencoded",onSuccessCallback:r?e=>{var r;let n={};try{n=JSON.parse(e)}catch(e){}if(Xe(this.temporalCookie,"isNewUser")){const{actualUserId:e,userIdPromise:t}=this.getUserId();t.then((t=>this.setIsNewUser(t===e)))}var i;this.userIdManager.processIdentity(vi(vi({},n),(e=>{return t={uid:ui(e),sid:ci(e)},Object.entries(t).filter((e=>{let[t,r]=e;return void 0!==r})).reduce(((e,t)=>{let[r,n]=t;return e[r]=n,e}),{});var t})(this.url))),n.strategy&&(i=n.strategy,Zr=i.reduce(((e,t)=>Qr(Qr({},e),{},{[t.tick]:t.delay})),{})),n.ads&&(this.adsDelay=n.ads),!this.tracker.stress&&null!==(r=n.mirror)&&void 0!==r&&r.active&&this.api.registerApi(yi(n.mirror.replicas)),t()}:void 0,skipResponse:this.isLastEvent,leaving:this.isLastEvent}),this.tick++,r||t()}))}setUserType(e){this.synchronizer.wait("pageInitialized"),this.permanentCookie.userType=e,this.markAsModified("permanent"),this.saveCookies()}getUserId(){return this.userIdManager.getUserId()}getSiteUserId(){return this.permanentCookie.siteUserId}getSessionReferrer(){return this.temporalCookie.referrer}getSessionId(){return this.temporalCookie.sessionId}getPageId(){return this.pageId}getRecirculationSource(){return this.recirculationSource}getFirstVisit(){return this.permanentCookie.firstVisit}getLastVisit(){return this.temporalCookie.previousVisit!==this.permanentCookie.futurePreviousVisit?this.temporalCookie.previousVisit:null}getPageType(){const e=this.tracker.pageType;return e&&an(e)?an(e):0}getUserType(){return function(e){if("number"==typeof e)return e;let t=parseInt(e||"",10);if(isNaN(t))switch(e){case"logged":t=2;break;case"paid":t=3;break;default:t=0}return t}(this.permanentCookie.userType)}getTotalPageviews(){return this.temporalCookie.pagesViewed}getSessionDuration(){return $e()-this.temporalCookie.currentVisitStarted}getEndpointDomain(){return this.endpointDomain}getFallbackEndpointDomain(){return"https://icu.newsroom.bi"}getStagingEndpointDomain(){return Fe}getUserVars(){return this.permanentCookie.userVars}getSessionVars(){return this.temporalCookie.sessionVars}getPageVars(){return un}getUrl(){return this.url}getPublishTime(){return this.publishTime}setEcommerceData(e){this.ecommerceData=e}getCanonical(){return this.canonical}setSiteUserId(e){this.permanentCookie.siteUserId=e,this.markAsModified("permanent"),this.saveCookies()}setCookies(e){this.consentManager.setConsent("cookies",e)}getUserConsent(){return arguments.length>0&&void 0!==arguments[0]&&!arguments[0]?this.consentManager.getConsent("cookies"):async function(e,t){return e.isInitiated()?e.getConsent(t):await Promise.race([new Promise((e=>setTimeout((()=>e(!0)),5e3))),new Promise((t=>e.onChange((()=>t(!0)))))]).then((async()=>e.getConsent(t)))}(this.consentManager,"cookies")}trackAdEvent(e,t){this.adsTracker.trackAdEvent(e,t)&&-1!==this.adsDelay&&(this.adsTracked=!0,en(),tn(this.adsDelay,(()=>this.trackPage())))}trackAdRendered(e,t){this.adsTracker.trackAdEventLegacy("slotRenderEnded",e,t)&&-1!==this.adsDelay&&(this.adsTracked=!0,en(),tn(this.adsDelay,(()=>this.trackPage())))}async setUserVar(e,t){await this.synchronizer.wait("pageInitialized"),cn(this.permanentCookie.userVars,e,t),this.markAsModified("permanent"),this.saveCookies()}async setSessionVar(e,t){await this.synchronizer.wait("pageInitialized"),cn(this.temporalCookie.sessionVars,e,t),this.markAsModified("temporal"),this.saveCookies()}async setPageVar(e,t){var r;ln(e,t),r=t,"closed"===e&&this.setUserVar("lastClosed",r)}async trackConversion(e,t){var r;const n=1e3*Math.round((new Date).getTime()/1e3);(null!==(r=this.trackedConversions[e])&&void 0!==r?r:0)!==n&&(await this.synchronizer.wait("pageInitialized"),this.trackedConversions[e]=n,this.conversion={conv:e,conv_i:t},(async e=>{const t=await(r=wn,Promise.resolve(bn().entries[r]))||{};var r;const n=t[e]||0;t[e]=n+1,await function(e,t){return bn().entries[e]=t,Promise.resolve(yn(bn()))}(wn,t)})(e),en(),await this.trackPage())}listenForScrollDepth(){const e="requestAnimationFrame"in window?window.requestAnimationFrame:e=>e(),t=di((()=>e((()=>_e()))),1e3);window.addEventListener("scroll",t,{passive:!0})}async _trackRecirculationEvent(e){var t,r;let n=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];if(!this.canTrack())return;const i=await this.getTrackingCommonData(),o=n.map((e=>e.e)).some((e=>e.some((e=>"string"!=typeof e&&!!e.ac2)))),s={t:e,m:n.map((e=>{var t,r;return vi(vi({},e),{},{e:(null===(t=(r=e.e).map)||void 0===t?void 0:t.call(r,he))||e.e})})),ac:i.ac,url:i.url,c:i.c,ut:i.ut,fv:i.fv,lv:i.lv,r:i.r,lp:i.lp,pageType:0,sui:i.sui,u:i.u,uc:i.uc,cc:i.cc,n:$e(),cms_id:i.cms_id};this.tracker.pageType&&"fbia"===this.tracker.pageType&&(s.pageType=2);const a=ut(this.accountId);if(a){const{rfv:e,v:t,f:r,r:n}=a;s.rfv=e,s.rfv_r=n,s.rfv_f=r,s.rfv_v=t}return this.api.post("".concat("/recirculation/recirculation.php").concat(o?"?c=1":""),(e=>vi(vi({},e),{},{m:e.m.map((e=>{var t,r;return vi(vi({},e),{},{e:(null===(t=(r=e.e).map)||void 0===t?void 0:t.call(r,ur))||e.e})}))}))(s)),null===(t=this.events)||void 0===t||null===(r=t.emitRecirculation)||void 0===r||r.call(t,s),s}async trackRecirculationEvent(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return await this._trackRecirculationEvent(e,this.moduleTracker.process(e,t))}getBasicConfig(){const{actualUserId:e}=this.getUserId();return vi({ac:this.accountId,co:this.cookieDomain,t:this.temporalCookie.currentVisitStarted,r:this.getSessionReferrer(),url:this.url,c:this.canonical,pp:this.getReferrer(),lp:this.getLandingPage(),p:this.pageId,u:e,s:this.getSessionId(),v:.2,cms_id:this.cmsId},this.getLandingPagePublishTime()?{lpti:this.getLandingPagePublishTime()}:{})}async getTrackingCommonData(){const{userIdPromise:e}=this.getUserId();return vi(vi({},this.getBasicConfig()),{},{u:await e,ua:window.navigator.userAgent,rs:this.getRecirculationSource(),sui:this.getSiteUserId()||"",ut:this.getUserType(),fv:this.getFirstVisit(),lv:this.getLastVisit(),uvar:this.getUserVars(),svar:this.getSessionVars(),pvar:this.getPageVars(),uc:await this.getUserConsent(),useg:this.getUserSegments(),cc:Ke(this.consentManager)})}async trackPageInternal(){this.tick>0&&(this.performanceStartTime=performance.now());const e=new FormData,{pageNav:t,jsTime:r}=(e=>{if(void 0!==window.performance&&"function"==typeof window.performance.getEntriesByType){const t=window.performance.getEntriesByType("navigation")[0];return it=it||window.performance.now()-e,it>0?{pageNav:t,jsTime:it}:{}}return{}})(this.performanceStartTime);null!=r&&(e.append("pt",r),void 0!==t&&void 0!==t.domainLookupEnd&&(e.append("pdns",t.domainLookupEnd-t.domainLookupStart),e.append("pcon",t.connectEnd-t.connectStart),e.append("pfet",t.responseEnd-t.fetchStart),e.append("pnet",t.responseEnd-t.requestStart),e.append("pttf",t.responseStart-t.requestStart),e.append("pint",t.domInteractive),e.append("pdcl",t.domContentLoadedEventEnd),e.append("pdclf",t.duration))),e.append("wv",this.webVitals.hasWebVitals()),e.append("lcp",this.webVitals.lcp),e.append("cls",this.webVitals.cls),e.append("fcp",this.webVitals.fcp),e.append("tbt",this.webVitals.tbt),e.append("inp",this.webVitals.inp),this.webVitals.lcpOffender&&e.append("lcp_o",this.webVitals.lcpOffender),this.webVitals.clsOffender&&(e.append("cls_o",this.webVitals.clsOffender),e.append("cls_o_s",this.webVitals.clsOffenderStatus)),this.webVitals.inpOffender&&(e.append("inp_o",this.webVitals.inpOffender),e.append("inp_o_s",this.webVitals.inpOffenderStatus),this.webVitals.inpOffenderScript&&e.append("inp_o_src",this.webVitals.inpOffenderScript),this.webVitals.inpOffenderScriptFn&&e.append("inp_o_fn",this.webVitals.inpOffenderScriptFn),this.webVitals.inpOffenderScriptInvoke&&e.append("inp_o_in",this.webVitals.inpOffenderScriptInvoke)),Object.entries(this.getBasicConfig()).forEach((t=>{let[r,n]=t;null!=n&&e.append(r,n)}));const n=this.getUserSegments();null!=n&&n.length&&e.append("useg",JSON.stringify(n)),e.append("n",$e());const i=$e()-this.startPageTime;e.append("et",this.getEngagedTime()),e.append("l",i),e.append("ps",this.startPageTime),e.append("ut",this.getUserType()),e.append("sui",this.getSiteUserId()||""),e.append("sc",_e(0===this.tick)),e.append("fv",this.getFirstVisit()),e.append("lv",this.getLastVisit()),e.append("uvar",JSON.stringify(this.getUserVars())),e.append("svar",JSON.stringify(this.getSessionVars())),e.append("pvar",JSON.stringify(this.getPageVars())),e.append("nu","".concat(+Xe(this.temporalCookie,"isNewUser"))),e.append("exp",(()=>{try{return JSON.stringify([...fi.values()])}catch(e){return"[]"}})()),this.isLastEvent&&e.append("le","1"),this.ecommerceData&&e.append("stock",this.ecommerceData.stock),(this.publishTime||this.updateTime)&&(e.append("uti",this.updateTime),e.append("pti",this.publishTime)),e.append("ads",this.adsTracker.getAds());const o=this.adsTracker.getAdUnits();o.length>0&&e.append("aups",o);const{conv:s,conv_i:a}=this.conversion||{};if(s&&(e.append("conv",s),a&&e.append("conv_i",a),this.conversion=null),this.recirculationSource&&e.append("rs",this.getRecirculationSource()),e.append("uc",this.isLastEvent?this.getUserConsent(!1):await this.getUserConsent()),e.append("cc",Ke(this.consentManager)),e.append("a",this.tick),this.consentManager.getConsent("personalization")){const t=ut(this.accountId);if(t){const{rfv:r,v:n,r:i,f:o}=t;e.append("rfv",r),e.append("rfv_v",n),e.append("rfv_r",i),e.append("rfv_f",o)}}return this.tracker.pageType&&e.append("pageType",an(this.tracker.pageType)),await this.track(e),e}async collectAndTrackPage(){for(;window[this.trackerName].data.length>0;){const e=window[this.trackerName].data.shift();"userType"===e[0]?this.setUserType(e[1]):"userId"===e[0]?this.setSiteUserId(e[1]):"setCookies"===e[0]?this.setCookies(e[1]):"adRendered"===e[0]?this.adsTracker.trackAdEventLegacy("slotRenderEnded",e[1],e[2]):"userVar"===e[0]?this.setUserVar(e[1],e[2]):"sessionVar"===e[0]?this.setSessionVar(e[1],e[2]):"pageVar"===e[0]?this.setPageVar(e[1],e[2]):"trackConversion"===e[0]?this.trackConversion(e[1],e[2]):"getRFV"===e[0]&&this.getRFV(e[1])}return await this.trackPageInternal()}async trackPage(){if(!this.canTrack())return;this.isLastEvent=!1;let e=null;return 0!==this.tick&&"hidden"===document.visibilityState||(e=await this.collectAndTrackPage()),((e,t)=>{const r=Object.keys(Zr).map((e=>parseInt(e,10))).sort(((e,t)=>e-t)).reduce(((t,r)=>null===t&&r>e?r:t),null);r&&Yr.callOnTimer(t,Zr[r])})(this.tick,(()=>this.trackPage())),e}getRFV(e){if(!this.consentManager.getConsent("personalization"))return e?e(st):st;const{userIdPromise:t,actualUserId:r}=this.getUserId(),n=Xe(this.temporalCookie,"isNewUser");return e?t.then((t=>async function(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];const o=ut(e);return o?(r(o),o):function(e,t,r,n){let i=arguments.length>4&&void 0!==arguments[4]&&arguments[4];return new Promise((o=>{const s=ct(e,t,n,i);z(ot,s,{onSuccessCallback:t=>{const n=at(JSON.parse(t),e);r(n),o(n)},contentType:"application/x-www-form-urlencoded"})}))}(e,t,r,n,i)}(this.accountId,t,e,this.getSiteUserId(),n))):(console.error("Deprecated: please pass a callback to the function getRFV"),function(e,t,r){let n=arguments.length>3&&void 0!==arguments[3]&&arguments[3];return ut(e)||function(e,t,r){const n=ct(e,t,r,arguments.length>3&&void 0!==arguments[3]&&arguments[3]),i=z(ot,n,{sync:!0,contentType:"application/x-www-form-urlencoded"});return at(JSON.parse(i),e)}(e,t,r,n)}(this.accountId,r,this.getSiteUserId(),n))}async trackNewPage(e){var t;if(null!==(t=history.state)&&void 0!==t&&t.mrfSkip)return;const r=((e,t)=>e?"string"==typeof e?{url:e}:e:{})(e);let{initialPageVars:n}=r;return this.tick>0?(this.isLastEvent=!0,await this.trackPageInternal(),this.previousPage=""+this.canonical):n=vi(vi({},Object.fromEntries(this.getPageVars())),n),ne={},await this.initialize(vi(vi({},r),{},{initialPageVars:n}))}on(e,t){this.dispatcher.on(e,t)}setupConsent(e){const t=()=>{this.saveAmpPermanentCookie(Qe("compass_uid"))};this.consentManager.onChange((()=>{!this.tracker.blockOnReject||this.consentManager.getConsent("cookies")?(this.canWriteCookies()?this.saveCookies({force:!0}):this.removeCookies(),t()):this.stopTracking()}).bind(this)),t();const r=function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};const{useCookies:t}=e;if(He(t))return t;const r=Me("__nrCookieConsent");return He(r)?r:null}(e);null!==r&&this.consentManager.setConsent("cookies",r)}async getPaywallScore(){const{actualUserId:e}=this.userIdManager.getUserId();return this.consentManager.getConsent("personalization")?(async e=>{const t="".concat(tt,"?").concat(nt(e)),r=await window.fetch(t);if(!r.ok)throw new Error(r.status);const{score:n}=await r.json();return n})({accountId:this.accountId,userId:e,siteUserId:this.getSiteUserId()}):et}async predict(){const{actualUserId:e}=this.userIdManager.getUserId(),t=await(async e=>{const t="".concat(rt,"?").concat(nt(e)),r=await fetch(t);if(!r.ok)throw new Error(r.status);return await r.json()})({accountId:this.accountId,userId:e,siteUserId:this.getSiteUserId(),totalPageviews:this.getTotalPageviews(),sessionDuration:this.getSessionDuration()});return t.probability&&ln("predict:probability",t.probability),t}async setRecirculationTracking(){return this.setRecirculationTrackingInternal(!0)}async setRecirculationTrackingInternal(){let e=!(arguments.length>0&&void 0!==arguments[0])||arguments[0];const t=Promise.race([this.synchronizer.wait("experimentation").then((e=>e?this.synchronizer.wait("headline"):Promise.resolve())),this.synchronizer.wait("experimentationFailed"),this.synchronizer.wait("experimentationDisabled").then((()=>Promise.resolve())),new Promise((e=>setTimeout(e,3e3)))]),[{layouts:r}]=await Promise.all([this.tracker.rm,t]);await async function(e,t){let r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=arguments.length>3&&void 0!==arguments[3]?arguments[3]:()=>{};(()=>{if(window.performance){if(window.performance.navigation&&1===window.performance.navigation.type)return!0;if("function"==typeof window.performance.getEntriesByType)return window.performance.getEntriesByType("navigation").map((e=>e.type)).includes("reload")}return!1})()&&kt("refresh",e),await sr(),function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:()=>{};const{observeDomChanges:n=!0,layouts:i=[]}=t,o=n?tr:er;yt().forEach((t=>t.shadowRoot&&o(e,t.shadowRoot,{parentNode:t,layouts:i},r))),o(e,document.body,{layouts:i},r)}(t,r,n)}(oe(this.tracker.pageType),((e,t)=>{(e=>{"hidden"!==document.visibilityState?e():document.addEventListener("visibilitychange",(()=>{"hidden"!==document.visibilityState&&e()}),{once:!0})})((()=>this.trackRecirculationEvent(e,t.map((e=>{let{module:t,links:r,position:n}=e;return{n:t,e:r,p:n}})))))}),{observeDomChanges:e,layouts:r},(()=>this.dispatcher.dispatch("recirculationChanged"))),this.synchronizer.resolve("recirculationTracking")}setRecirculationConfig(){let{modules:e=[],layouts:t=[],blacklist:r=[],redirectionLinks:n=[]}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.tracker.rm.set((i=>{let{modules:o=[],layouts:s=[],blacklist:a=[],redirectionLinks:c=[]}=i;const u={blacklist:li([...a,...r]),redirectionLinks:li([...c,...n]),modules:li([...o,...e]),layouts:li([...s,...t])};return this.dispatcher.dispatch("recirculationConfigChanged",vi({},u)),u})),async function(e){let t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:()=>{};e.modules.length&&(await sr(),cr(e),re((()=>{cr(e)&&t()})),t())}({modules:e,blacklist:r,redirectionLinks:n},(()=>{this.setRecirculationTrackingInternal(!1),this.dispatcher.dispatch("recirculationChanged")}))}getRecirculationConfig(){return this.tracker.rm}setRecirculationModules(e){this.setRecirculationConfig({modules:e})}setConversionButtons(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];e&&e.length&&function(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],t=arguments.length>1?arguments[1]:void 0;ii(e,t),re((()=>{ii(e,t)}))}(e,this.trackConversion.bind(this))}addUserSegment(e){const t=Xe(this.permanentCookie,"userSegments")||[];this.permanentCookie.userSegments=[...t,e],this.markAsModified("permanent"),this.saveCookies()}setUserSegments(e){this.permanentCookie.userSegments="string"==typeof e?e.split(","):e,this.markAsModified("permanent"),this.saveCookies()}removeUserSegment(e){this.permanentCookie.userSegments=this.permanentCookie.userSegments?this.permanentCookie.userSegments.filter((t=>t!==e)):[],this.markAsModified("permanent"),this.saveCookies()}clearUserSegments(){this.permanentCookie.userSegments=[],this.markAsModified("permanent"),this.saveCookies()}getUserSegments(){var e;return(null===(e=this.permanentCookie)||void 0===e?void 0:e.userSegments)||[]}getContext(e){var t;return e?null===(t=this.contextVariables)||void 0===t?void 0:t[e]:this.contextVariables}setContext(){let e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};this.contextVariables=e}trackPaymentMethod(){(e=>{try{const r=e.getSessionVars();if("hub.marfeel.com"===document.location.host)return;if(window.addEventListener("message",(t=>{if("https://experiences.mrf.io"===t.origin){var r,n,i;if(null!==(r=t.data)&&void 0!==r&&r.activePayment)e.setSessionVar("activePaymentMethod",t.data.activePayment);else if(null!==(n=t.data)&&void 0!==n&&n.retryData&&window.PaymentRequest){var o;const{paymentMethod:r,paymentDetails:n}=null===(o=t.data)||void 0===o?void 0:o.retryData;new PaymentRequest([r],n,{}).canMakePayment().then((t=>{t&&e.setSessionVar("activePaymentMethod","applePay")})).catch((()=>{}))}hi=!1;const s=null===(i=document.body)||void 0===i?void 0:i.querySelector("iframe#".concat("dw-mrf"));s&&document.body.removeChild(s)}})),!hi||!r.activePaymentMethod){var t;const e=document.createElement("iframe");e.id="dw-mrf",e.setAttribute("allow","payment"),e.setAttribute("style","display:none;"),e.src=pi,null===(t=document.body)||void 0===t||t.appendChild(e),hi=!0}}catch(e){}})(this)}}function wi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Oi(e){for(var t=1;t{var t,n;null===(t=window)||void 0===t||null===(n=t.top)||void 0===n||n.marfeel.cmd.push(["compass",function(){var t=r((function*(t){return e(yield t.getTrackingCommonData())}));return function(e){return t.apply(this,arguments)}}()])}))}))()}}function ki(){return(ki=r((function*(){return new Promise((e=>{try{document.prerendering?document.addEventListener("prerenderingchange",(()=>{window.marfeel.cmd.push(["compass",function(e){e.setPageVar("mrfprerendered_tracked","true")}]),e()})):e()}catch(t){e()}}))}))).apply(this,arguments)}function Pi(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Si(e){for(var t=1;t0&&void 0!==arguments[0]&&arguments[0],t=new URL(window.location.href),r=!!t.hash.includes(c);if(r&&e)try{I(function(e,t){var r=new URL(e.href),n=e.hash.split("#").filter((e=>""!==e&&e!==t&&!e.startsWith("".concat(t,"="))));return r.hash=n.length?"#".concat(n.join("#")):"",r.toString()}(t,c))}catch(e){}return r}))),N(Ci),N("activate-overlay"),(s="".concat("mrfHudStorage","-").concat(e.accountId),a="".concat("compass-overlay","_").concat(e.accountId),r((function*(){try{var e=window.localStorage.getItem(s);if(e)return JSON.parse(e).entries[a].active}catch(e){}return!1}))),(o=e.accountId,r((function*(){return new Promise((e=>{window.addEventListener("message",(t=>{var{data:r}=t;((e,t)=>{return!(998===(r=e)||"998"===r||window.self!==window.top||"compass_chrome_extension"!==(null==t?void 0:t.origin)||"extension:load_overlay"!==(null==t?void 0:t.type));var r})(o,r)&&e(!0)}))}))}))))}}v("compass",["consent","synchronizer","events"],function(){var e=r((function*(e,t){var[r,n]=t;yield function(){return ki.apply(this,arguments)}(),yield j(e,r,n,1e3);try{var i;if(window.top!==window.self&&(null===(i=window.top)||void 0===i?void 0:i.marfeel.config.accountId)===e.accountId)return Promise.resolve(Ei)}catch(e){}return Promise.resolve(ji)}));return function(t,r){return e.apply(this,arguments)}}());var Ti=s(181),Ai=s.n(Ti),Ii=function(e){return e.INLINE="inline",e.FLOWCARDS="flowcards",e.COMPASS="compass",e.RECIRCULATION="recirculation",e.CONVERSIONS="conversions",e.CONTENT="content",e.AD_MANAGER="adManager",e.EXPERIMENTS="experiments",e.EXPERIMENTATION="experimentation",e.GOOGLE_OPTIMIZE="googleOptimize",e.PIANO="piano",e.GOAL_TRACKING="goalTracking",e.LOADER="loader",e.ECOMMERCE="ecommerce",e.MULTIMEDIA="multimedia",e.GENERIC_GOAL_TRACKING="genericGoalTracking",e.SITE_CONTEXT_SYNCHRONIZER="siteContextSynchronizer",e.SOCIAL_ACQUISITION="socialAcquisition",e.CONTEXT_EXPOSITION="contextExposition",e.APP_BANNER="appBanner",e.MARFEEL_OPTIMIZER="marfeelOptimizer",e.AFFILIATION_ENHANCER="affiliationEnhancer",e}({}),Di=function(){var e=r((function*(e){var t,r=e.canonical||(null===(t=e.location)||void 0===t?void 0:t.href)||"";if(!r)return"";var n=encodeURIComponent(r);return"url=".concat(n)}));return function(t){return e.apply(this,arguments)}}(),Ni=function(){var e=r((function*(e){var t=e.userId;return t&&""!==t?"clid=".concat(t):""}));return function(t){return e.apply(this,arguments)}}();function _i(){return new Promise((e=>{var t,r;(window.marfeel=null!==(t=window.marfeel)&&void 0!==t?t:{},window.marfeel.cmd=null!==(r=window.marfeel.cmd)&&void 0!==r?r:[],window.marfeel.cmd).push(["consent",t=>{e(t)}])}))}function Ri(){return Li.apply(this,arguments)}function Li(){return(Li=r((function*(){return(yield _i()).getConsent("cookies")?localStorage:sessionStorage}))).apply(this,arguments)}function xi(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e=>e;try{var n=e.getItem(t);return n?JSON.parse(r(n)):null}catch(e){}return null}function Mi(e,t,r){var{isPatch:n=!1,encoder:i=(e=>e),decoder:o=(e=>e)}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};try{var s=n&&xi(e,t,o)||{};return e.setItem(t,i(JSON.stringify(Ai().withOptions({mergeArrays:!1},s,r)))),!0}catch(e){}return!1}function Ui(){return Ui=r((function*(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:e=>e;return xi(yield Ri(),e,t)})),Ui.apply(this,arguments)}function Vi(){return Vi=r((function*(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return Mi(yield Ri(),e,t,r)})),Vi.apply(this,arguments)}function Fi(){return Fi=r((function*(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=yield _i(),n=()=>r.getConsent("cookies");r.onReady((()=>{var i=n();r.onChange((()=>{if(i!==(i=n())){var r=i?sessionStorage:localStorage,o=i?localStorage:sessionStorage,s=xi(r,e,t.decoder);s&&Mi(o,e,s,t)}}))}))})),Fi.apply(this,arguments)}var qi="marfeel-sdk-store",Bi=btoa,zi=atob;function Gi(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];return e.update=Date.now(),function(e,t){return Vi.apply(this,arguments)}(qi,e,{encoder:Bi,decoder:zi,isPatch:t})}function Hi(){return Hi=r((function*(){var e,t=yield function(e){return Ui.apply(this,arguments)}(qi,zi);return t||(Gi(e={creation:Date.now(),update:Date.now(),entries:{}}),e)})),Hi.apply(this,arguments)}function Ki(e){return Wi.apply(this,arguments)}function Wi(){return Wi=r((function*(e){var t=yield function(){return Hi.apply(this,arguments)}();return t.entries[e]})),Wi.apply(this,arguments)}function Ji(e,t){return Xi.apply(this,arguments)}function Xi(){return(Xi=r((function*(e,t){return Gi({entries:{[e]:t}},!0)}))).apply(this,arguments)}var $i=function(e){return e["2G"]="2g",e["3G"]="3g",e["4G"]="4g",e}($i||{}),Qi={[$i["2G"]]:70,[$i["3G"]]:750,[$i["4G"]]:Number.MAX_VALUE},Yi="mrf-connection-speed",Zi=[1059,1659,2223,2224,2225,2335,2336,2337,2338,2339,2340],eo=function(){var e=r((function*(e){if(!window.performance||!Zi.includes(Number(e.siteId)||0))return"";var t=[...window.performance.getEntriesByType("navigation"),...window.performance.getEntriesByType("resource")].filter((e=>e.transferSize>1e4));if(!t.length){var{connection_kbps:r,connection_type:n}=yield Ki(Yi);return r&&n?"kbps=".concat(r,"&ctyp=").concat(n):""}var i=t.reduce(((e,t)=>t.encodedBodySize>e.encodedBodySize?t:e)),o=i.encodedBodySize/1e3,s=i.responseEnd-i.responseStart,a=Math.round(8*o/(s/1e3)),c=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0;return e"".concat(encodeURIComponent(t),",").concat(e[t])));return"".concat("cnv","=").concat(t.join(","))}));return function(){return e.apply(this,arguments)}}(),ro=function(){var e,t=arguments.length>1?arguments[1]:void 0;return null===(e=(arguments.length>0&&void 0!==arguments[0]?arguments[0]:"").replace(t,"").replace("true","").split("&").find((e=>e.startsWith("mrfexperiences=")||e.startsWith("mrfexp=")||e.startsWith("mrfdebug="))))||void 0===e?void 0:e.split("=")[1]},no=e=>{if(e){var t=ro(e.hash,"#")||ro(e.search,"?");if(t)return t}return null},io=function(){var e=r((function*(e){var t=e.experienceId;return t&&""!==t?"id=".concat(t):""}));return function(t){return e.apply(this,arguments)}}();function oo(e,t){if("provider"!==e)return t}var so=function(){var e=r((function*(e){var t,r;if(null===(t=e.externalExperiences)||void 0===t||null===(r=t[Ii.FLOWCARDS])||void 0===r||!r.length)return"";var n=e.externalExperiences[Ii.FLOWCARDS].map((e=>{var t=e;return"object"==typeof e.renderProps&&(t.renderProps=JSON.stringify(e.renderProps)),t})),i=encodeURIComponent(JSON.stringify(n,oo));return"dflwc=".concat(i)}));return function(t){return e.apply(this,arguments)}}(),ao=function(){var e=r((function*(e){return isNaN(e.firstVisit)?"":"fvst=".concat(e.firstVisit)}));return function(t){return e.apply(this,arguments)}}(),co="mrfgeo=",uo=function(){var e=r((function*(e){return"geo=".concat((e=>{if(e){var t=e.search.replace("?","").split("&").find((e=>e.startsWith(co)));if(t)return t.replace(co,"")}return null})(e.location)||"__INJECT_GEO__")}));return function(t){return e.apply(this,arguments)}}(),lo=function(){var e=r((function*(e){var t=/hubspotutk=(.+?)(?:;|$)/.exec(e.cookies||"");return t?"hutk=".concat(t[1]):""}));return function(t){return e.apply(this,arguments)}}(),po=function(){var e=r((function*(e){var t=e.pageTechnology?e.pageTechnology:0;return"ptch=".concat(t)}));return function(t){return e.apply(this,arguments)}}(),ho=function(){var e=r((function*(e){return isNaN(e.totalPageViews)?"":"pgv=".concat(e.totalPageViews)}));return function(t){return e.apply(this,arguments)}}(),fo=function(){var e=r((function*(e){if(!e.referrer)return"";var t=encodeURIComponent(e.referrer);return"ppg=".concat(t)}));return function(t){return e.apply(this,arguments)}}();function mo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function vo(e){for(var t=1;t{if(!e)return[];var t=Date.now(),r=t+6048e5;return e.map((e=>(e=>"object"==typeof e)(e)?e:{id:e,expires:r})).sort(((e,t)=>{var{expires:r}=e,{expires:n}=t;return r-n})).filter((e=>{var{expires:r}=e;return r>=t}))},bo=(e,t)=>{if(!t)return e;var r=Date.now()+2592e6,n=[...e.filter((e=>{var{id:r}=e;return r!==t})),{id:t,expires:r}];return n.length>100?n.slice(1):n};function wo(){return Oo.apply(this,arguments)}function Oo(){return(Oo=r((function*(){return(yield Ki(go))||{sites:{}}}))).apply(this,arguments)}function Eo(){return(Eo=r((function*(e){var t,r=yield wo();return yo(null===(t=r.sites[e])||void 0===t?void 0:t.readEditorialIds).map((e=>{var{id:t}=e;return t}))}))).apply(this,arguments)}function ko(e,t){return Po.apply(this,arguments)}function Po(){return(Po=r((function*(e,t){var r,n=yield wo(),i=vo(vo({},n),{},{sites:vo(vo({},n.sites),{},{[e]:vo(vo({},n.sites[e]),{},{readEditorialIds:bo(yo(null===(r=n.sites[e])||void 0===r?void 0:r.readEditorialIds),t.editorialId)})})});return Ji(go,i)}))).apply(this,arguments)}var So=function(){var e=r((function*(e,t){var r={handlerName:"content",handled:!1};return t.config.accountId&&e.content&&(r.handled=yield ko(t.config.accountId,e.content)),Promise.resolve(r)}));return function(t,r){return e.apply(this,arguments)}}(),Co=function(){var e=r((function*(e){var{siteId:t,personalizedContent:r}=e;if(void 0!==t&&r){var n=(e=>e.sort(((e,t)=>e-t)).map(((e,t,r)=>{var n=e;return t>0&&(n-=r[t-1]),n})))(yield function(e){return Eo.apply(this,arguments)}(t));if(n.length>0)return"red=".concat(encodeURIComponent(n.join(",")))}return""}));return function(t){return e.apply(this,arguments)}}(),jo=function(){var e=r((function*(e){if(!e.recirculationSource)return"";var t=encodeURIComponent(e.recirculationSource);return"rsrc=".concat(t)}));return function(t){return e.apply(this,arguments)}}(),To=function(){var e=r((function*(e){if(!e.sessionReferrer)return"";var t=new URL(e.sessionReferrer);t.hash="",t.search="";var r=encodeURIComponent(t.toString());return"ref=".concat(r)}));return function(t){return e.apply(this,arguments)}}(),Ao=function(){var e=r((function*(e){return isNaN(e.sessionDuration)?"":"sdu=".concat(e.sessionDuration)}));return function(t){return e.apply(this,arguments)}}(),Io=function(){var e=r((function*(e){return isNaN(e.siteId)?"":"sid=".concat(e.siteId)}));return function(t){return e.apply(this,arguments)}}();function Do(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function No(e){for(var t=1;te.reduce(((e,t)=>Lo(Lo({},e),{},{[t.origin]:t.goal})),{}),Mo="mrfExperiment_",Uo=e=>e.startsWith(Mo);var Vo=s(539);function Fo(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function qo(e){for(var t=1;t{var r;if("object"==typeof e){r=e;for(var n=t.split("."),i=0;i{if(void 0===t)return!0;if(void 0!==e&&"*"===t)return!0;if(e===t)return!0;if(Array.isArray(t)){var r=Array.from(e);if(r.length>=t.length)return t.map(((e,t)=>zo(r[t],e))).every(Boolean)}return"object"==typeof e&&"object"==typeof t&&Object.entries(t).map((t=>{var[r,n]=t;return zo(e[r],n)})).every(Boolean)},Go=(e,t)=>{switch(t.type){case"composite":return Array.isArray(t.value)?t.value.map((t=>Go(e,t))):Object.entries(t.value).reduce(((t,r)=>{var[n,i]=r;return qo(qo({},t),{},{[n]:Go(e,i)})}),{});case"lookup":return t.value?Bo(e,t.value):e;default:return t.value}},Ho=e=>{var t,r,n=e.hasTrackedAds();return e.getEngagedTime()>=5&&(n||null===(t=window.googletag)||void 0===t||null===(r=t.cmd)||void 0===r||r.push((()=>{e.setPageVar("mrf::optimized","true"),window.googletag.pubads().refresh()})),!0)};function Ko(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Wo(e){for(var t=1;t1?arguments[1]:void 0;return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:[]).reduce(((t,r)=>{var[n,i]=r;return Wo(Wo({},t),{},{["".concat(e,"::").concat(n)]:i})}),{})},Xo=function(){var e=r((function*(e){var t,r,n,i=Object.assign({},e.targeting,(r=null==(t=e.compassVars)?void 0:t.user.filter((e=>{var[t]=e;return!Uo(t)})),n=null==t?void 0:t.user.filter((e=>{var[t]=e;return Uo(t)})).map((e=>{var[t,r]=e;return[t.replace(Mo,""),r]})),Wo(Wo(Wo(Wo({},Jo(null==t?void 0:t.page,"pageVar")),Jo(null==t?void 0:t.session,"sessionVar")),Jo(r,"userVar")),Jo(n,"experiment"))));return 0===Object.keys(i).length?"":Object.keys(i).filter((e=>void 0!==i[e])).map((e=>[e,encodeURIComponent(i[e])].join("="))).join("&")}));return function(t){return e.apply(this,arguments)}}(),$o=0,Qo=1,Yo=7,Zo=4,es=7,ts=864e5;function rs(e){var t=new Date(Date.UTC(e.getFullYear(),e.getMonth(),e.getDate())),r=new Date(Date.UTC(t.getFullYear(),t.getMonth(),t.getDate()+Zo-(t.getUTCDay()||es))),n=new Date(Date.UTC(r.getFullYear(),$o,Qo));return{week:Math.ceil(((r.getTime()-n.getTime())/ts+1)/Yo),year:r.getUTCFullYear()}}var ns=function(e){return e.impression="impression",e.close="close",e}({});function is(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function os(e){for(var t=1;t{var r=os({total:{impression:0,close:0}},e||{}),n="w".concat(cs.week);return r[n]=r[n]||{impression:0,close:0},r[n][t]++,r},ds=(e,t)=>{var r=os({total:{impression:0,close:0}},e||{});return r.total[t]++,r[as.getMonth()]=((e,t)=>{var r=os({total:{impression:0,close:0}},e||{}),n=as.getDate();return r[n]=r[n]||{impression:0,close:0},r[n][t]++,r.total[t]++,r})(r[as.getMonth()],t),r};function ps(){return void 0===ss&&(as=new Date(Date.now()),cs=rs(as),ss=Ki(us).then((e=>e||{}))),ss}var hs=function(e){return e.lifetime="l",e.month="m",e.week="w",e.day="d",e}(hs||{}),fs=function(e){return e.last="ls",e}(fs||{}),ms=new Set([...Object.values(hs),fs.last]),vs=e=>{if(!e)return 0;var t=Date.now()-e;return Math.floor(t/1e3)},gs=(e,t,r,n)=>{var{impression:i,close:o}=n;i>0&&e.has(r)&&t.push(r,String(i)),o>0&&e.has("".concat("c").concat(r))&&t.push("".concat("c").concat(r),String(o))},ys=function(){var e=r((function*(e){return ps().then((t=>{var r=function(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},t=arguments.length>1?arguments[1]:void 0,r=new Map(Object.entries(e).map((e=>{var[t,r]=e;return[t,new Set(r)]})));return Object.entries(t).forEach((e=>{var t,[n,i]=e;!r.has(n)&&function(){return(arguments.length>0&&void 0!==arguments[0]?arguments[0]:0)>Date.now()-36e5}(null==i||null===(t=i.last)||void 0===t?void 0:t.impression)&&r.set(n,ms)})),r}(e.userExperiences,t),n=Object.entries(t).reduce(((e,t)=>{var[n,i]=t,o=[],s=r.get(n);if(!i||0===i.total.impression||!s)return e;!function(e,t,r){gs(e,t,hs.lifetime,r.total)}(s,o,i);var a=new Date(Date.now()),c=rs(a),u=i[a.getFullYear()],l=i[c.year],d=null==u?void 0:u[a.getMonth()],p=null==d?void 0:d[a.getDate()];!function(e,t,r){r&&gs(e,t,hs.month,r.total)}(s,o,d),function(e,t,r,n){if(r){var i=r["w".concat(n.week)];i&&gs(e,t,hs.week,i)}}(s,o,l,c),function(e,t,r){r&&gs(e,t,hs.day,r)}(s,o,p),((e,t,r)=>{r.last&&gs(e,t,fs.last,{impression:vs(r.last.impression),close:vs(r.last.close)})})(s,o,i);var h=o.join("|");return h.length>0?e.concat(n,h):e}),[]);return n.length>0?"uexp=".concat(n.join(",")):""}))}));return function(t){return e.apply(this,arguments)}}(),bs=function(){var e=r((function*(e){return Array.isArray(e.userSegments)?"useg=".concat(e.userSegments.join(",")):""}));return function(t){return e.apply(this,arguments)}}(),ws=function(){var e=r((function*(e){return isNaN(e.userType)?"":"utyp=".concat(e.userType)}));return function(t){return e.apply(this,arguments)}}(),Os=e=>{try{return decodeURIComponent(e),!0}catch(e){return!1}},Es=function(e){return e.USQP="usqp",e.CAMPAIGN="utm_campaign",e.CONTENT="utm_content",e.MEDIUM="utm_medium",e.SOURCE="utm_source",e}(Es||{}),ks={[Es.CAMPAIGN]:"u_cpg",[Es.CONTENT]:"u_cnt",[Es.MEDIUM]:"u_mdm",[Es.SOURCE]:"u_src"},Ps={canonical_url:"url",client_id:"clid",connection_speed:"cspd",conversions:"cnv",dynamic_flowcards:"dflwc",experience_id:"id",first_visit:"fvst",hubspot_utk:"hutk",page_technology:"ptch",pageviews:"pgv",previous_page:"ppg",recirculation_source:"rsrc",referrer:"ref",session_duration:"sdu",site_id:"sid",targeting:"trg",user_experiences:"uexp",user_type:"utyp",visitor_frequency:"vfrq"},Ss={url:Di,clid:Ni,cspd:eo,cnv:to,debug_experiences:e=>{var t=no(e.location);return Promise.resolve(t?"debug_experiences=".concat(t):"")},dflwc:so,fvst:ao,geo:uo,hutk:lo,id:io,ptch:po,pgv:ho,ppg:fo,pti:e=>{var t=e.publishTime;return Promise.resolve(t?"pti=".concat(t):"")},qpa:e=>{var t=e.location,r=[];if(t)for(var n of Array.from(t.searchParams.keys()).reverse())-1===r.indexOf(n)&&r.push(n);return Promise.resolve(r.length>0?"qpa=".concat(r.reverse().join(",")):"")},rsrc:jo,red:Co,ref:To,sdu:Ao,sid:Io,trg:Xo,uexp:ys,useg:bs,utyp:ws,utms:function(){var e=r((function*(e){var t=e.location;if(!t)return"";var r=Object.values(Es);return Array.from(t.searchParams.entries()).filter((e=>{var[t]=e;return r.includes(t)})).map((e=>{var t,[r,n]=e;return"".concat(null!==(t=ks[r])&&void 0!==t?t:r,"=").concat(n)})).filter(Os).join("&")}));return function(t){return e.apply(this,arguments)}}(),vfrq:function(){var e=r((function*(e){return e.hasConsent?"":"".concat("vfrq","=").concat("6")}));return function(t){return e.apply(this,arguments)}}()},Cs=function(){var e=r((function*(e,t,r){var n=yield Promise.all((e=>{var t=Object.entries(Ss);if(!e)return t;var r=new Set(Array.from(e.values()).map((e=>{var t;return null!==(t=Ps[e])&&void 0!==t?t:e})));return r.add("sid"),r.add("ptch"),t.filter((e=>{var[t]=e;return r.has(t)}))})(r).map((t=>{var[r,n]=t;return n(e)})));return"".concat(t,"?").concat(n.filter((e=>!!e)).join("&"))}));return function(t,r,n){return e.apply(this,arguments)}}();function js(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ts(e){for(var t=1;te.type===Is.AMP_DOCUMENT,_s=e=>e.type===Is.TEXT_HTML;function Rs(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ls(e){for(var t=1;t{if(e.has(xs)){var r={src:e.get(xs)};return e.has(Ms)&&(r.height=parseInt(e.get(Ms),10)),Ls(Ls({},t),{},{heroElement:r})}return t};function Vs(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Fs(e){for(var t=1;t{if(e.has(qs)){var r={url:e.get(qs)};return Fs(Fs({},t),{},{canonical:r})}return t},zs=e=>e.includes("marfeelrecommenderexperienceengine.mrf.io");function Gs(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Hs(e){for(var t=1;tr(t,e)),{})}catch(t){throw new Error("".concat(t,"::").concat(e.url))}}))).apply(this,arguments)}function Ws(e){return Js.apply(this,arguments)}function Js(){return Js=r((function*(e){return Object.entries(e).map(function(){var e=r((function*(e){var t,r,[n,i]=e;return r=i.content,(Ns(r)||_s(r))&&(t=yield function(e){return Ks.apply(this,arguments)}(i.content)),[n,i,t]}));return function(t){return e.apply(this,arguments)}}()).reduce(function(){var e=r((function*(e,t){var r,n=yield e,[i,o,s]=yield t;return s&&(r=function(e,t){return Hs(Hs({},e),{},{features:Hs(Hs({},e.features),t)})}(o,s)),n[i]=r||o,n}));return function(t,r){return e.apply(this,arguments)}}(),Promise.resolve({}))})),Js.apply(this,arguments)}function Xs(e,t){return r=>{var n=r.detail;(null==n?void 0:n.owner)===t&&e({uri:n.uri})}}var $s=()=>window.location.hash.includes("mrfdebug"),Qs=function(){var e=r((function*(e,t,r){var n,i,o,s,a,c,u,l=$s(),{userIdPromise:d,actualUserId:p}=t.getUserId(),h=l?p:yield d,f=!!l||(yield t.getUserConsent());return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],r=e.canonical?{headers:{"mrf-lb-hash":e.canonical}}:void 0;return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[];return Cs(e,"https://flowcards.mrf.io/json/experiences",t.length>0?new Set(t):void 0).then((e=>"".concat(e,"&v=2")))}(e,t).then((e=>fetch(e,r))).then((e=>e.json())).then(As)}({pageTechnology:t.getPageType(),canonical:(u=null===(a=document.querySelector('meta[property="mrf:canonical"]'))||void 0===a?void 0:a.getAttribute("content"),u||(null===(c=document.querySelector('link[rel="canonical"]'))||void 0===c?void 0:c.getAttribute("href"))||void 0),location:new URL(window.location.toString()),publishTime:t.getPublishTime(),siteId:e.accountId,externalExperiences:e.experiences,targeting:e.targeting,userId:h,userSegments:t.getUserSegments(),userType:t.getUserType(),userExperiences:null===(n=e.preflight)||void 0===n||null===(i=n.preflight)||void 0===i||null===(o=i.targeting)||void 0===o?void 0:o.frequencyCap,firstVisit:t.getFirstVisit(),recirculationSource:t.getRecirculationSource(),referrer:t.getReferrer(),sessionDuration:t.getSessionDuration(),sessionReferrer:t.getSessionReferrer(),totalPageViews:t.getTotalPageviews(),cookies:document.cookie,compassVars:{user:t.getUserVars(),session:t.getSessionVars(),page:t.getPageVars()},hasConsent:f,personalizedContent:!(null===(s=e.recommenderConfig)||void 0===s||!s.personalizedContent)},r)}));return function(t,r,n){return e.apply(this,arguments)}}();function Ys(e,t){var r=document.createElement("script");return r.setAttribute("type","application/javascript"),r.setAttribute("src",e),t&&(r.id=t),r}function Zs(e){return(t,r)=>{var n=Ys(t,r);n.setAttribute("type","module"),e.appendChild(n)}}function ea(e){return(t,r)=>{var n=Ys(t,r);n.noModule=!0,n.async=!0,n.defer=!0,e.appendChild(n)}}function ta(e){return(t,r)=>{var n=Ys(t,r);e.appendChild(n)}}function ra(e){return"marfeel-".concat(e)}function na(e){return function(e){return document.querySelector(ra(e))}(e)||function(e){return document.body.appendChild(document.createElement(ra(e)))}(e)}var ia=function(){var e=r((function*(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},{onInteraction:r=!0,strategy:n="async"}=t;return(e=>{var t="string"!=typeof e?e.module:e;return!!document.querySelector('script[src="'.concat(t,'"]'))})(e)?Promise.resolve():(r?function(){var e,t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:2e4,r=["touchstart","click","scroll"];return new Promise((n=>{var i=()=>{r.forEach((e=>((e,t)=>{document.removeEventListener(e,t)})(e,i))),window.clearTimeout(e),n()};r.forEach((e=>((e,t)=>{document.addEventListener(e,t,{passive:!0})})(e,i))),e=window.setTimeout(i,t)}))}():Promise.resolve()).then((()=>{"sync"===n?"string"!=typeof e?(function(){Zs(document.head)(...arguments)}(e.module),function(){ea(document.head)(...arguments)}(e.nomodule)):function(){ta(document.head)(...arguments)}(e):"string"!=typeof e?(function(){Zs(document.body)(...arguments)}(e.module),function(){ea(document.body)(...arguments)}(e.nomodule)):function(){ta(document.body)(...arguments)}(e)}))}));return function(t){return e.apply(this,arguments)}}(),oa=[],sa=[];function aa(e,t){var r=e instanceof Array?e:[e],n=function(e){switch(e){case ns.impression:return oa;case ns.close:return sa;default:return[]}}(t);r.forEach((e=>{var r,i;(function(e,t){return t.indexOf(e)>-1})(e,n)||(n.push(e),r=e,i=t,ps().then((e=>{e[r]=function(e,t){var r=os({total:{impression:0,close:0},last:{impression:0,close:0}},e||{});return r.total[t]++,r[as.getFullYear()]=ds(r[as.getFullYear()],t),r[cs.year]=ls(r[cs.year],t),r.last[t]=Number(Date.now()),r}(e[r],i),Ji(us,e)})))}))}function ca(e){aa(e,ns.impression)}function ua(e){aa(e,ns.close)}var la=(e,t,n)=>function(){var i=r((function*(r,i,o){var s,a=(null==n?void 0:n(r))||(null===(s=r[e])||void 0===s?void 0:s.actions),c={handlerName:e,handled:!1};if(a){var u=Object.values(a);if(u.length){var l=yield t(u,i,o);c.handled=null==l||l,ca(u.map((e=>{var{id:t}=e;return t})))}}return c}));return function(e,t,r){return i.apply(this,arguments)}}(),da=la(Ii.EXPERIMENTATION,function(){var e=r((function*(e){h(d.INIT_HANDLE_EXPERIMENTATION),yield Promise.all(e.map((e=>{var{url:t}=e,r=new URL(t),n=r.searchParams.get("experimentType");if(null!==n&&document.querySelector('[src*="experimentType='.concat(n,'"]')))return Promise.resolve();var i=new URL(t);return r.searchParams.append("version","esnext"),i.searchParams.append("version","legacy"),ia({module:r.toString(),nomodule:i.toString()},{onInteraction:!1,strategy:"sync"})}))),f(d.INIT_HANDLE_EXPERIMENTATION,d.END_HANDLE_EXPERIMENTATION)}));return function(t){return e.apply(this,arguments)}}()),pa="complete",ha="interactive",fa="loading",ma=()=>document.readyState===pa,va=()=>document.readyState===ha,ga=()=>{var e;return document.readyState===fa&&!(null===(e=document.head)||void 0===e||!e.appendChild)},ya=function(){var e=r((function*(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:pa;return new Promise((t=>{var r=(e=>{switch(e){case fa:return[ga,va,ma];case ha:return[va,ma];default:return[ma]}})(e),n=()=>r.some((e=>e()));n()?t():document.addEventListener("readystatechange",(()=>{n()&&t()}))}))}));return function(){return e.apply(this,arguments)}}();function ba(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function wa(e){for(var t=1;tPromise.resolve()),enrich:o=!1}=arguments.length>3&&void 0!==arguments[3]?arguments[3]:{};h(d.INIT_HANDLE_INLINE_EXPERIENCE);var s=t[e]||{actions:{}},a=s.actions||{},c={handlerName:e,handled:!1};if(Object.keys(a).length>0){yield i();var u=wa(wa({},s),{},{actions:o?yield Ws(s.actions):s.actions});yield ya(n),function(e,t){var r=document.createElement("script");r.setAttribute("type","application/json"),r.innerHTML=JSON.stringify(t);var n=na(e);n.appendChild(r),n.setAttribute("initialization","inline")}(e,u),yield r(u),c.handled=!0}return f(d.INIT_HANDLE_INLINE_EXPERIENCE,d.END_HANDLE_INLINE_EXPERIENCE,{type:e,jsonResponse:t}),c}));return function(t,r,n){return e.apply(this,arguments)}}();function Ea(e,t){return t.id||e}function ka(e,t){Object.entries(t.actions).forEach((t=>{var[r,n]=t,i=function(e){var t;return(null===(t=e.features.canonical)||void 0===t?void 0:t.url)||(Ns(e.content)||_s(e.content)?e.content.url:e.content.type===Is.WIDGET_PROVIDER||(e=>e.type===Is.AD_SERVER_PROVIDER)(e.content)?e.content.name:void 0)}(n);e.trackExperience(n.id),i&&e.trackRecirculationEvent("elegible",[{n:Ea(r,n),e:[i]}])}))}var Pa="//flowcards.mrf.io/statics/experience-web",Sa="".concat(Pa,"/index.es2015.standalone.js"),Ca="".concat(Pa,"/index.es5.standalone.js"),ja=function(){var e=r((function*(e,t){if(matchMedia("only screen and (min-width:800px)").matches)return{handlerName:Ii.FLOWCARDS,handled:!1};var{compassSDK:n}=t;return Oa(Ii.FLOWCARDS,e,function(){var e=r((function*(e){ka(n,e),yield ia({module:Sa,nomodule:Ca}),na(Ii.FLOWCARDS).addEventListener("snappointchange",(e=>{var{snapPoint:t,initiator:r,cardId:n}=e.detail;(function(e,t){return"hidden"===e&&"user:button"===t})(t,r)&&ua(n),function(e){return"initial"===e||"active"===e}(t)&&ca(n)}))}));return function(t){return e.apply(this,arguments)}}(),{enrich:!0})}));return function(t,r){return e.apply(this,arguments)}}(),Ta=la(Ii.GOOGLE_OPTIMIZE,function(){var e=r((function*(e,t){var r=e.map((e=>{var{experiments:t}=e;return t})).reduce(((e,t)=>(t.forEach((t=>e.add(t))),e)),new Set);return new Promise((e=>{!function(){window.dataLayer=window.dataLayer||[],window.dataLayer.push(arguments)}("event","optimize.callback",{callback:(n,i)=>{r.has(i)&&(t.compassSDK.setUserVar("optimize-".concat(i),n),r.delete(i)),0===r.size&&e()}})}))}));return function(t,r){return e.apply(this,arguments)}}()),Aa="https://experiences.mrf.io/statics/inline-experiences",Ia="".concat(Aa,"/esnext/standalone.js"),Da="".concat(Aa,"/legacy/standalone.js"),Na=function(){var e=r((function*(e,t){return Oa(Ii.INLINE,e,r((function*(){var e,r;null===(e=window.mrfInlineExperiences)||void 0===e||e.init(),r=t.compassSDK,document.addEventListener("mrfRenderInline",(e=>{var t,n=null===(t=e.detail)||void 0===t?void 0:t.id;ca(n),r.trackExperience(n)})),document.addEventListener("mrfCloseInline",(e=>{var t;ua(null===(t=e.detail)||void 0===t?void 0:t.id)}))})),{documentState:ha,prepare:(n=r((function*(){yield ya(fa),yield ia({module:Ia,nomodule:Da},{onInteraction:!1,strategy:"sync"})})),function(){return n.apply(this,arguments)})});var n}));return function(t,r){return e.apply(this,arguments)}}();function _a(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ra(e){for(var t=1;t{var{moduleName:t,config:r}=e;window.marfeel.cmd.push(["loader",function(e){e.load(t,r)}])}))}));return function(t){return e.apply(this,arguments)}}(),(e=>{var{loader:t={actions:{}},multimedia:r={actions:{}},ecommerce:n={actions:{}}}=e;return Ra(Ra(Ra({},t.actions),r.actions),n.actions)})),xa=la(Ii.CONTEXT_EXPOSITION,function(){var e=r((function*(e,t){e.forEach((e=>{var{contextVariables:r}=e;try{r&&t.compassSDK.setContext(JSON.parse(r))}catch(e){console.error("not valid JSON for the contextExposition experience")}}))}));return function(t,r){return e.apply(this,arguments)}}()),Ma="closed",Ua=function(){var e=r((function*(e,t){var r,n,i=yield t.wait("piano-offer");return!("purchase"!==i.offerType||("inline"===i.displayMode?(e.compassSDK.setPageVar(Ma,"hard-paywall"),0):"modal"!==i.displayMode||!i.activeMeters||"DefaultMeter"!==(r=i.activeMeters,n=JSON.parse(r),Array.isArray(n)?n[0]:n).meterName||(e.compassSDK.setPageVar(Ma,"dynamic-paywall"),0)))}));return function(t,r){return e.apply(this,arguments)}}(),Va="piano subscribe",Fa=function(){var e=r((function*(e,t,r){var n,i=yield r.wait("piano-subscription"),o=t.find((e=>e.rid===i.rid));return!!o&&(e.compassSDK.trackConversion(null!==(n=o.conversion)&&void 0!==n?n:Va),!0)}));return function(t,r,n){return e.apply(this,arguments)}}(),qa=function(){var e=r((function*(e,t,n){var i,o,s=yield Promise.all(t.map(function(){var t=r((function*(t){if(yield((e,t)=>new Promise((r=>{e.api.callApi("/access/check",{rid:t},(function(e){var t=e.access.granted;return r(t)}))})))(e,t.rid))return t}));return function(e){return t.apply(this,arguments)}}()));n.compassSDK.setUserType(null!==(i=null===(o=s.find(Boolean))||void 0===o?void 0:o.userType)&&void 0!==i?i:"logged")}));return function(t,r,n){return e.apply(this,arguments)}}(),Ba=function(){var e=r((function*(e,t){var r,n,i=null!==(r=null===(n=e.pianoId.getUser())||void 0===n?void 0:n.uid)&&void 0!==r?r:void 0;if(!i)try{var o,s;i=JSON.parse(atob(null===(o=e.pianoId.getToken())||void 0===o||null===(s=o.split("."))||void 0===s?void 0:s[1])).sub}catch(e){}i&&t.compassSDK.setSiteUserId(i)}));return function(t,r){return e.apply(this,arguments)}}(),za=function(){var e=r((function*(){if(window.tp&&!Array.isArray(window.tp)||(yield new Promise((e=>{!function(){window.tp=window.tp||[],Array.isArray(window.tp)&&window.tp.push(arguments)}("init",e)}))),window.tp&&!Array.isArray(window.tp))return window.tp}));return function(){return e.apply(this,arguments)}}(),Ga=e=>Array.isArray(e.resources)?e.resources:e.rid.split(";").map((e=>({rid:e,userType:3,conversion:Va}))),Ha=function(){var e=r((function*(e,t,r,n){return!(!e.pianoId.isUserValid()&&!e.user.isUserValid()||(yield qa(e,r,n),t&&e.pianoId.isUserValid()&&(yield Ba(e,n)),0))}));return function(t,r,n,i){return e.apply(this,arguments)}}(),Ka=la(Ii.PIANO,function(){var e=r((function*(e,t,n){var i=e.map(Ga).reduce(((e,t)=>[...e,...t]),[]),o=e.some((e=>null==e?void 0:e.deviceUnification));yield Promise.all([Ua(t,n),Fa(t,i,n),za().then(function(){var e=r((function*(e){return new Promise((n=>{if(!e)return n();var s=0,a=setInterval(r((function*(){if((yield Ha(e,o,i,t))||s>=3)return clearInterval(a),n();s+=1})),5e3)}))}));return function(t){return e.apply(this,arguments)}}())])}));return function(t,r,n){return e.apply(this,arguments)}}()),Wa=function(){var e=r((function*(){if(!document.querySelector(".js_smartbanner")){var[e]=yield Promise.all([s.e(512).then(s.bind(s,512)),s.e(376).then(s.bind(s,376))]);(new e.default).publish()}}));return function(){return e.apply(this,arguments)}}(),Ja=function(){var e=r((function*(e){[["smartbanner:title",e.title],["smartbanner:author",e.author],["smartbanner:price","GET"],["smartbanner:price-suffix-google"," - In Google Play"],["smartbanner:price-suffix-apple"," - On the App Store"],["smartbanner:icon-google",e.icon],["smartbanner:icon-apple",e.icon],["smartbanner:button-url-google","https://play.google.com/store/apps/details?id=".concat(e.androidId)],["smartbanner:button-url-apple","https://apps.apple.com/app/id".concat(e.iosId)],["smartbanner:enabled-platforms","android,ios"],["smartbanner:button","VIEW"],["smartbanner:custom-design-modifier","marfeel"],["smartbanner:api","true"]].forEach((e=>{var[t,r]=e;return((e,t)=>{var r=document.createElement("meta");r.name=e,r.content=t,document.head.appendChild(r)})(t,r)})),yield Wa()}));return function(t){return e.apply(this,arguments)}}(),Xa=la(Ii.APP_BANNER,function(){var e=r((function*(e){var t=e[0];yield Ja(t),window.addEventListener("smartbanner.exit",(()=>{ua(t.id)}))}));return function(t){return e.apply(this,arguments)}}()),$a=la(Ii.SOCIAL_ACQUISITION,function(){var e=r((function*(e){e.forEach((e=>{var{pixelId:t}=e;(e=>{var{pixelId:t}=e;!function(e,t,r,n,i,o,s){e.fbq||(i=e.fbq=function(){i.callMethod?i.callMethod.apply(i,arguments):i.queue.push(arguments)},e._fbq||(e._fbq=i),i.push=i,i.loaded=!0,i.version="2.0",i.queue=[],(o=t.createElement(r)).async=!0,o.src="https://connect.facebook.net/en_US/fbevents.js",(s=t.getElementsByTagName(r)[0]).parentNode.insertBefore(o,s))}(window,document,"script"),window.fbq("init",t),window.fbq("track","PageView")})({pixelId:t})}))}));return function(t){return e.apply(this,arguments)}}()),Qa=s(595),Ya=["www.amazon","/dp/"],Za="asc_refurl",ec="asc_source",tc="asc_campaign";const rc=new class{isAffiliateUrl(e){return Ya.every((t=>e.includes(t)))}getModifiedUrl(e,t){var r=new URL(e),n=r.searchParams.get(Za),i=r.searchParams.get(tc),o=r.searchParams.get(ec);return!n&&t.url&&r.searchParams.set(Za,t.url),!o&&t.source&&r.searchParams.set(ec,t.source),!i&&t.campaign&&r.searchParams.set(tc,t.campaign),{isCorrect:!!n&&!!o&&!!i,url:r.toString()}}};var nc=[rc],ic=(e,t)=>{[...document.querySelectorAll("a")].filter((e=>!!e.href)).forEach((r=>{try{var n,{url:i,isValid:o,build:s}=((e,t)=>{var r=new URL(e);if(t){var n=r.searchParams.get(t);return{isValid:!!n,build:e=>(r.searchParams.set(t,e),r.toString()),url:n?decodeURIComponent(decodeURIComponent(n)):""}}return{isValid:!0,build:e=>e,url:r.toString()}})(r.href,t);if(!o)return;var a=null===(n=nc.filter((e=>e.isAffiliateUrl(i))))||void 0===n?void 0:n[0];if(!a)return;var{isCorrect:c,url:u}=a.getModifiedUrl(i,e);c||(r.href=s(u))}catch(e){}}))},oc=la(Ii.AFFILIATION_ENHANCER,function(){var e=r((function*(e){e.forEach((e=>{var{context:t,queryParam:r}=e;((e,t)=>{ic(e,t),(0,Qa.N)((()=>{ic(e,t)}))})(JSON.parse(t),r)}))}));return function(t){return e.apply(this,arguments)}}()),sc=[[(e,t)=>{var r,n,i,o={handlerName:"experiments",handled:!1};if(e.experiments){var s=(r=e.experiments,n=t.compassSDK,i=n.getUserVars()||[],r.filter((e=>{var{name:t}=e;return!i.some((e=>{var[r]=e;return r==="".concat(Mo).concat(t)}))})));o.handled=function(e,t){return 0!==e.length&&(e.forEach((e=>{var{name:r,group:n,groups:i}=e;t.setUserVar("".concat(Mo).concat(r),function(e,t){return t?(Math.floor(Math.random()*t)+1).toString():e.toString()}(n,i))})),!0)}(s,t.compassSDK)}return Promise.resolve(o)}]],ac=[[Na],[(e,t)=>{var{compass:r={actions:{}},recirculation:n={actions:{}},conversions:i={actions:{}}}=e,o=Object.values(No(No(No({},null==r?void 0:r.actions),null==n?void 0:n.actions),null==i?void 0:i.actions)),s={handlerName:"compass",handled:!1};if(o.length){var a={layouts:[],modules:[],blacklist:[],redirectionLinks:[]};Object.values(o).forEach((e=>{var{recirculationModules:r=[],userType:n,userVars:i={},conversionButtons:o=[],layouts:s=[],blacklist:c=[],redirectionLinks:u=[]}=e;t.compassSDK.setConversionButtons(o),void 0!==n&&t.compassSDK.setUserType(n),Object.entries(i).forEach((e=>{var[r,n]=e;return t.compassSDK.setUserVar(r,n)})),a.modules.push(...r),a.layouts.push(...s),a.blacklist.push(...c),a.redirectionLinks.push(...u)})),t.compassSDK.setRecirculationConfig(a),s.handled=!0}return Promise.resolve(s)}],[e=>{var{adManager:t}=e,r={handlerName:"ad-manager",handled:!1};return null!=t&&t.actions&&(Object.values(t.actions).forEach((e=>{var t,{targeting:r}=e;(t=r)&&(window.googletag=window.googletag||{},window.googletag.cmd=window.googletag.cmd||[],t.forEach((e=>{var{key:t,value:r}=e;window.googletag.cmd.push((()=>{window.googletag.pubads().setTargeting(t,r)}))})))})),r.handled=!0),Promise.resolve(r)},So,da,ja,Ta,Ka,$a,(e,t)=>{var{goalTracking:r}=e,n={handlerName:"goalTracking",handled:!1};return null!=r&&r.actions&&(Object.values(r.actions).forEach((e=>{var{goals:r}=e;null==r||r.forEach((e=>t.compassSDK.trackConversion(e)))})),n.handled=!0),Promise.resolve(n)},(e,t)=>{var{genericGoalTracking:r}=e,n={handlerName:"genericGoalTracking",handled:!1},i=!1;if(null!=r&&r.actions){var o,s,a=Object.values(r.actions).reduce(((e,t)=>((e[t.source]=e[t.source]||[]).push(t),e)),{});if((null===(o=a[_o.POST_MESSAGE])||void 0===o?void 0:o.length)>0){var c=xo(a[_o.POST_MESSAGE]);window.addEventListener("message",(e=>{if(Object.keys(c).includes(e.origin)){var r,n;try{n=JSON.parse(e.data)}catch(e){return}"complete"!==n.event&&("close"!==n.event&&"purge"!==n.event||null===(r=n.params)||void 0===r||!r.completePayment)||i||(i=!0,t.compassSDK.trackConversion(c[e.origin]))}})),n.handled=!0}if((null===(s=a[_o.HTTP])||void 0===s?void 0:s.length)>0){var u=xo(a[_o.HTTP]),l=window.fetch,d=window.XMLHttpRequest.prototype.open;window.fetch=(e,r)=>{var n=l(e,r);return Object.keys(u).includes(e)&&n.then((r=>{r.ok&&t.compassSDK.trackConversion(u[e])})),n},window.XMLHttpRequest.prototype.open=function(){d.apply(this,arguments);try{var e=new URL(arguments[1]);Object.keys(u).includes(e.origin)&&t.compassSDK.setPageVar(u[e.origin],"true")}catch(e){}},n.handled=!0}}return Promise.resolve(n)},La,(e,t)=>{var{siteContextSynchronizer:r}=e,n={handlerName:"siteContextSynchronizer",handled:!1};return null!=r&&r.actions&&(Object.values(r.actions).forEach((e=>{e.definition.forEach((e=>{return r=e,n=t.compassSDK,i=0,o=(e,t)=>{var r=Go(e,t.params);switch(function(e){return void 0!==(null==e?void 0:e.name)}(t.action)?t.action.name:t.action){case"userType":"string"!=typeof r&&"number"!=typeof r||n.setUserType(r);break;case"conversion":"string"==typeof r&&n.trackConversion(r);break;case"marfeelCMD":var i=t.action;window.marfeel.cmd.push([i.config.module,e=>{var t;Array.isArray(r)&&(null==e||null===(t=e[i.config.method])||void 0===t||t.call(e,...r))}])}},s=e=>{for(var t of r.effects)if(zo(e,t.condition))return void o(e,t)},(a=function e(){var t,n=!(arguments.length>0&&void 0!==arguments[0])||arguments[0],o=r.path.startsWith("window.")?r.path.substring(7):r.path,a=Bo(window,o);if(a)if("array"===r.type){if(Array.isArray(a)){for(var c=i;c0&&setTimeout((()=>e()),u)})(),void(0,Vo.C1)((()=>{a(!1)}));var r,n,i,o,s,a}))})),n.handled=!0),Promise.resolve(n)},xa,Xa,(e,t)=>{var{marfeelOptimizer:r}=e,n={handlerName:"marfeelOptimizer",handled:!1};return null!=r&&r.actions&&Object.values(r.actions).length>0?new Promise((e=>{var r=Ho(t.compassSDK),n=0;if(r)return e();var i=setInterval((()=>{if(Ho(t.compassSDK)||n>=2)return clearInterval(i),e();n+=1}),5e3)})).then((()=>(n.handled=!0,Promise.resolve(n)))):Promise.resolve(n)},oc]],cc=function(){var e=r((function*(e,t,r,n){var i=[];for(var[o,s]of e.entries()){h(d.INIT_HANDLE_ACTION);var a=yield Promise.all(s.map((e=>e(t,r,n))));f(d.INIT_HANDLE_ACTION,d.END_HANDLE_ACTION,{index:o}),i.push(...a)}return i}));return function(t,r,n,i){return e.apply(this,arguments)}}(),uc=(e,t,r)=>cc(ac,e,t,r);class lc{constructor(){i(this,"promise",void 0),i(this,"promiseResolve",void 0),this.promise=new Promise((e=>{this.promiseResolve=e}))}resolve(){var e;null===(e=this.promiseResolve)||void 0===e||e.call(this)}}var dc=function(e){return e.NOT_EQUALS="NOT_EQUALS",e.EQUALS="EQUALS",e}({}),pc=e=>e.replace(/\/+$/,""),hc=(e,t)=>e.hostname===t.hostname&&pc(e.pathname)===pc(t.pathname),fc=function(){var e=r((function*(e){var t=window.location;switch(e.operator){case dc.NOT_EQUALS:return e.values.every((e=>!hc(t,new URL(e))));case dc.EQUALS:default:return e.values.some((e=>hc(t,new URL(e))))}}));return function(t){return e.apply(this,arguments)}}(),mc=function(){var e=r((function*(e,t){if($s()||e.operator!==dc.EQUALS)return!0;var n=function(){var e=r((function*(){return new Promise((e=>{if(window.didomiConfig)return window.didomiOnReady=window.didomiOnReady||[],void window.didomiOnReady.push((t=>{e(t.shouldConsentBeCollected())}));t.consentSDK.hasToPromptForConsent(e)}))}));return function(){return e.apply(this,arguments)}}();return!!(yield n())||t.consentSDK.isActive()&&!function(e){var t=new RegExp("(^|;) ?".concat("mrfpass","=([^;]*)(;|$)")).exec(document.cookie);return t?t[2]:null}()&&e.values.some((e=>!t.consentSDK.hasConsentForPurpose(+e)))}));return function(t,r){return e.apply(this,arguments)}}(),vc="pendingConsent",gc=function(){var e=r((function*(e){var t=window.location.hostname;switch(e.operator){case dc.NOT_EQUALS:return e.values.every((e=>e!==t));case dc.EQUALS:default:return e.values.some((e=>e===t))}}));return function(t){return e.apply(this,arguments)}}(),yc=function(){var e=r((function*(e){var t=document.documentElement.lang||"None";switch(e.operator){case dc.NOT_EQUALS:return e.values.every((e=>e!==t));case dc.EQUALS:default:return e.values.some((e=>e===t))}}));return function(t){return e.apply(this,arguments)}}(),bc=function(){var e=r((function*(e){var[t,r="/"]=window.location.pathname.split("/"),n="/"!==r?"/".concat(r,"/"):r;switch(e.operator){case dc.NOT_EQUALS:return e.values.every((e=>e!==n));case dc.EQUALS:default:return e.values.some((e=>e===n))}}));return function(t){return e.apply(this,arguments)}}(),wc=function(){var e=r((function*(e){var t,r=(null==(t=window.navigator.language||window.navigator.userLanguage)?void 0:t.split("-")[0].toLowerCase())||"en";switch(e.operator){case dc.NOT_EQUALS:return e.values.every((e=>e!==r));case dc.EQUALS:default:return e.values.some((e=>e===r))}}));return function(t){return e.apply(this,arguments)}}();function Oc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Ec(e){for(var t=1;tfunction(){var t=r((function*(t){switch(t.operator){case dc.NOT_EQUALS:return t.values.every((t=>t!==e));case dc.EQUALS:default:return t.values.some((t=>t===e))}}));return function(e){return t.apply(this,arguments)}}();function Pc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Sc(e){for(var t=1;t(e.compassSDK.getUserVars()||[]).map((e=>{var[t,r]=e,n=kc(r.toString());return Ec({[t]:n,["".concat("userVar::").concat(t)]:n},(e=>e.startsWith(Mo))(t)?{[t.replace(Mo,"")]:n}:{})})).reduce(((e,t)=>Ec(Ec({},e),t)),{})],Ac=function(){var e=r((function*(e,t){return Promise.all(e.map(t)).then((t=>e.filter(((e,r)=>t[r]))))}));return function(t,r){return e.apply(this,arguments)}}(),Ic=function(){var e=r((function*(e,t,r){return!Array.isArray(e.filters)||0===e.filters.length||(yield Promise.all(e.filters.map((e=>{var n=r[e.key];return!n||n(e,t)})))).every(Boolean)}));return function(t,r,n){return e.apply(this,arguments)}}(),Dc=function(){var e=r((function*(e,t){if(!e.actions)return e;var r=yield t((e=>Object.entries(e).reduce(((e,t)=>{var r,[n,i]=t;return r=i.id,document.querySelector('[data-mrf-experience="'.concat(r,'"]'))||(e[n]=i),e}),{}))(e.actions));return 0!==r.length?Sc(Sc({},e),{},{actions:r.reduce(((e,t)=>{var[r,n]=t;return Sc(Sc({},e),{},{[r]:n})}),{})}):void 0}));return function(t,r){return e.apply(this,arguments)}}(),Nc=function(){var e=r((function*(e,t){return Object.entries(e).reduce(function(){var e=r((function*(e,r){var[n,i]=r,o=yield((e,t)=>{var r=(e=>{var t=Tc.map((t=>t(e))).reduce(((e,t)=>Sc(Sc({},e),t)),{});return Sc(Sc({},jc),t)})(t);return Dc(e,(e=>Ac(Object.entries(e),(e=>{var[n,i]=e;return Ic(i,t,r)}))))})(i,t);return o?Sc(Sc({},yield e),{},{[n]:o}):e}));return function(t,r){return e.apply(this,arguments)}}(),Promise.resolve({}))}));return function(t,r){return e.apply(this,arguments)}}(),_c=function(){var e=r((function*(e,t){return Object.entries(e).reduce(function(){var e=r((function*(e,r){var[n,i]=r,o=yield((e,t)=>Dc(e,(e=>Ac(Object.entries(e),(e=>{var[r,n]=e;return((e,t)=>Promise.resolve(t.some((t=>e.id===t))))(n,t)})))))(i,t.split(","));return o?Sc(Sc({},yield e),{},{[n]:o}):e}));return function(t,r){return e.apply(this,arguments)}}(),Promise.resolve({}))}));return function(t,r){return e.apply(this,arguments)}}(),Rc=function(){var e=r((function*(e,t){var r,n=(r=no(new URL(window.location.href)))&&Cc.some((e=>r.startsWith(e)))?r:void 0;return n?_c(e,n):Nc(e,t)}));return function(t,r){return e.apply(this,arguments)}}();function Lc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function xc(e){for(var t=1;t(e=>"content"in e)(e)&&_s(e.content)&&e.content.url.includes("marfeelpassexperience");function Uc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Vc(e){for(var t=1;t1&&void 0!==arguments[1]?arguments[1]:{actions:{}};if(!("actions"in e))return e;var{actions:r}=e,{actions:n={}}=t;if(Object.values(n).some(Mc))return{actions:Object.entries(r).reduce(((e,t)=>{var[r,n]=t;return Mc(n)?xc({},e):xc(xc({},e),{},{[r]:n})}),{})};if(Object.values(r).filter(Mc).length>1){var i=Object.keys(r).filter((e=>Mc(r[e])))[0];return{actions:xc({[i]:r[i]},Object.entries(r).filter((e=>{var[t,r]=e;return!Mc(r)})).reduce(((e,t)=>{var[r,n]=t;return xc(xc({},e),{},{[r]:n})}),{}))}}return e},flowcards:e=>window.location.hash.includes("disabletriggers=true")&&"actions"in e&&"cards"in e?([...Object.values(e.actions),...Object.values(e.cards)].forEach((e=>{e.triggers={timeout:{on:"timeout",action:"setSnapPoint:initial",spec:{time:200}}},e.features=Vc(Vc({},e.features),{},{transition:"automaitc"})})),e):e};function zc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Gc(e){for(var t=1;t(e=>"content"in e)(e)&&_s(e.content)&&e.content.url.includes("marfeelpassexperienceengine.mrf.io")?Gc(Gc({},e),{},{features:Gc(Gc({},e.features),{},{removable:!1}),filters:[...e.filters||[],{operator:dc.EQUALS,values:["1","2","3","4","5","6","7","8","9","10","11"],key:vc}]}):e];function Kc(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Wc(e){for(var t=1;tHc.reduce(((e,t)=>t(e)),e)},Xc=e=>Object.entries(e).reduce(((e,t)=>{var[r,n]=t,i=Jc[r];return Wc(Wc({},e),{},i&&n&&"actions"in n?{[r]:Wc(Wc({},n),{},{actions:Object.entries(n.actions).reduce(((e,t)=>{var[r,n]=t;return Wc(Wc({},e),{},{[r]:i(n)})}),{})})}:{[r]:n})}),{});function $c(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function Qc(e){for(var t=1;t{var t=e(),r=new Promise((e=>{window.setTimeout((()=>{e(void 0)}),3e3)}));return Promise.race([t,r])},Zc=e=>!!e,eu=function(){var e=r((function*(e,t,r,n){return yield((e,t,r)=>Yc((()=>((e,t,r)=>cc(sc,e,t,r))(e,t,r))))(e,t,r),((e,t)=>Object.entries(e).reduce(((e,r)=>{var[n,i]=r,o=Bc[n];return qc(qc({},e),{},o&&i?{[n]:o(i,t[n])}:{[n]:i})}),{}))(yield Rc(e,t),n)}));return function(t,r,n,i){return e.apply(this,arguments)}}();class tu{constructor(e,t,r,n,o){i(this,"config",void 0),i(this,"compassSDK",void 0),i(this,"synchronizer",void 0),i(this,"consentSDK",void 0),i(this,"eventsSDK",void 0),i(this,"executionData",void 0),i(this,"deferred",void 0);var s=e.experiences||e.flowcards;this.compassSDK=t,this.synchronizer=r,this.consentSDK=n,this.eventsSDK=o,this.config={accountId:e.accountId,targeting:{}},s&&Object.assign(this.config,s),this.deferred=new lc,this.executionData=this.loadExperiences(),function(e){Fi.apply(this,arguments)}(qi,{encoder:Bi,decoder:zi,isPatch:!1}),this.listenForExperiencesRecirculation()}listenForExperiencesRecirculation(){this.eventsSDK.on("recirculation",(e=>{var t,r,n,{t:i,m:o}=e;if("click"===i){var s=null===(t=o[0])||void 0===t||null===(r=t.e[0])||void 0===r||null===(n=r.meta)||void 0===n?void 0:n["mrf-editorial-id"];s&&ko(this.config.accountId,{editorialId:s})}}))}loadExperiences(){var e=this;return r((function*(){h(d.LOADING_EXPERIENCES);var t,n,i,o,s,a,c,u={},l=[],p={config:e.config,compassSDK:e.compassSDK,consentSDK:e.consentSDK},{active:m,clientParameters:v,preflight:g,recommender:y}=yield(t=e.config,t.preflight?(t.preflight.active=t.preflight.active||!!no(new URL(window.location.href)),Promise.resolve(t.preflight)):function(e){return(e=>Cs(e,"https://flowcards.mrf.io/json/active",new Set(["sid","ptch","debug_experiences"])))(e).then(fetch).then((e=>e.json())).then((e=>e.preflight?Ts(Ts({},e),{},{preflight:As(e.preflight)}):e))}({location:new URL(window.location.toString()),siteId:t.accountId,pageTechnology:0})),b=Promise.resolve();if(e.config.recommenderConfig=y,g){var w=yield eu(Xc(g),p,e.synchronizer,u);u=Ai()(u,w),b=((e,t,r)=>Yc((()=>uc(e,t,r))))(w,p,e.synchronizer).then((e=>{Array.isArray(e)&&l.push(...e);var[t]=l.filter((e=>"compass"===(null==e?void 0:e.handlerName)));(null==t||!t.handled)&&p.compassSDK.setRecirculationConfig({})}))}if(m){yield(n=e.config,i=e.deferred,null!==(o=n.waitFor)&&void 0!==o&&o.promise?n.waitFor.promise:null!==(s=n.waitFor)&&void 0!==s&&s.timeout?(c=n.waitFor.timeout,new Promise((e=>{setTimeout(e,c)}))):null!==(a=n.waitFor)&&void 0!==a&&a.done?i.promise:Promise.resolve());var O=yield Qs(e.config,e.compassSDK,v).then(function(){var t=r((function*(t){var r=yield eu(Xc(t),p,e.synchronizer,u);return u=Ai()(u,r),((e,t,r)=>uc(e,t,r))(r,p,e.synchronizer)}));return function(e){return t.apply(this,arguments)}}());Array.isArray(O)&&l.push(...O)}yield b;var E=l.filter(Zc).reduce(((e,t)=>Qc(Qc({},e),{},{[t.handlerName]:e[t.handlerName]||t.handled})),{});return Object.values(Ii).forEach((t=>{e.synchronizer.resolve(t,!!E[t])})),f(d.LOADING_EXPERIENCES,d.END_LOADING_EXPERIENCES),{handled:E,experiences:u}}))()}done(){this.deferred.resolve()}addTargeting(e,t){this.config.targeting[e]=t}addExperience(e,t){var r,n,i,o;null!==(n=(r=this.config).experiences)&&void 0!==n||(r.experiences={}),null!==(o=(i=this.config.experiences)[e])&&void 0!==o||(i[e]=[]),this.config.experiences[e].push(t)}addEventListener(e,t,r){var n=function(e,t){return"navigationchange"===e?e=>{t(e)}:"navigationfromcard"===e?Xs(t,"host"):"navigationtocard"===e?Xs(t,"flowcards"):null}(t,r);n&&na(e).addEventListener("navigationchange",n)}hasExperiences(e){return this.executionData.then((t=>{var{handled:r}=t;return!!r[e]}))}triggerExperiences(){var e=this;return r((function*(){return e.loadExperiences()}))()}hasExperimentation(e){return this.executionData.then((t=>{var{experiences:r}=t;return((e,t)=>{var r,n=null===(r=e.experimentation)||void 0===r?void 0:r.actions;return!!n&&Object.values(n).some((e=>{var{url:r}=e;return-1!==r.indexOf("experimentType=".concat(t))}))})(r,e)}))}getRecommendations(e){var t=this;return r((function*(){var r;return yield function(e){return Ds.apply(this,arguments)}({experienceId:e,canonical:t.compassSDK.getCanonical(),userId:t.compassSDK.getUserId().actualUserId,personalizedContent:!(null===(r=t.config.recommenderConfig)||void 0===r||!r.personalizedContent),siteId:t.config.accountId})}))()}}v("experiences",["compass","synchronizer","consent","events"],(()=>Promise.resolve(tu)));class ru{constructor(e,t){i(this,"croupier",void 0),this.croupier=t}addTargeting(e,t){this.croupier.addTargeting(e,t)}addCard(e){this.croupier.addExperience(Ii.FLOWCARDS,e)}addEventListener(e,t){this.croupier.addEventListener(Ii.FLOWCARDS,e,t)}hasCards(){return this.croupier.hasExperiences(Ii.FLOWCARDS)}}function nu(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function iu(e){for(var t=1;tPromise.resolve(ru))),v("multimedia",["compass","consent","synchronizer"],function(){var e=r((function*(e,t){var r,n,i,[o,a,c]=t;return yield j(iu(iu({},e),{},{blockOnNoConsent:!(null===(r=e.multimedia)||void 0===r||!r.providers)&&-1!==(null===(n=e.multimedia)||void 0===n||null===(i=n.providers)||void 0===i?void 0:i.indexOf("youtube"))||e.blockOnNoConsent}),a,c),e.multimedia?s.e(688).then(s.bind(s,688)).then((e=>e.default)):Promise.reject()}));return function(t,r){return e.apply(this,arguments)}}());class ou{constructor(){i(this,"promises",void 0),this.promises={}}wait(e){var t,r;null!==(r=(t=this.promises)[e])&&void 0!==r||(t[e]={});var n=this.promises[e].promise;return void 0===n?(n=new Promise(((t,r)=>{this.promises[e].resolve=t,this.promises[e].reject=r})),this.promises[e].promise=n,n):n}resolve(e,t){var r,n;null!==(n=(r=this.promises)[e])&&void 0!==n||(r[e]={}),void 0===this.promises[e].resolve?this.promises[e].promise=Promise.resolve(t):(0,this.promises[e].resolve)(t)}reject(e,t){var r,n;null!==(n=(r=this.promises)[e])&&void 0!==n||(r[e]={}),void 0===this.promises[e].reject?this.promises[e].promise=Promise.reject(t):(0,this.promises[e].reject)(t)}}v("synchronizer",[],(()=>Promise.resolve(ou)));let su=()=>({emit(e,...t){for(let r=0,n=this.events[e]||[],i=n.length;r{this.events[e]=this.events[e]?.filter((e=>t!==e))}}});function au(e,t){var r=Object.keys(e);if(Object.getOwnPropertySymbols){var n=Object.getOwnPropertySymbols(e);t&&(n=n.filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable}))),r.push.apply(r,n)}return r}function cu(e){for(var t=1;t{"click"===e.t?null==t||t(e):setTimeout((()=>{null==t||t(e)}),0)}))}emitRecirculation(e){var t=function(e){return{t:uu[e.t],m:e.m}}(e),r=function(e){return e.m.reduce(((t,r)=>{var n=r.n;if(n.startsWith("FC_")||n.startsWith("IL_")){var i,o=n.startsWith("IL_")?"inline":"flowcards";return cu(cu({},t),{},{["recirculation:".concat(o)]:{t:e.t,m:[...(null===(i=t["recirculation:".concat(o)])||void 0===i?void 0:i.m)||[],r]},["recirculation:".concat(n)]:{t:e.t,m:[r]}})}return cu(cu({},t),{},{["recirculation:".concat(n)]:{t:e.t,m:[r]}})}),{})}(t);this.emitter.emit("recirculation",t),Object.keys(r).forEach((e=>{this.emitter.emit(e,r[e])}))}}v("events",[],(()=>Promise.resolve(lu)));var du=(e,t,r)=>{var n,i;n=((e,t,r)=>{var n=document.createElement("script");return n.src=e,n.id=r,t?n.type="module":(n.setAttribute("nomodule",""),n.setAttribute("defer","")),n})(e,r,t),i=document.head,new Promise(((e,t)=>{n.addEventListener("error",(e=>t(e.error))),i.append(n)}))},pu="https://sdk.mrf.io/statics",hu={ecommerce:{srcModule:"".concat(pu,"/compass-ecommerce-sdk.js"),srcNoModule:"".concat(pu,"/compass-ecommerce-sdk.es5.js"),dependencies:["compass"]},multimedia:{srcModule:"".concat(pu,"/compass-multimedia-sdk.js"),srcNoModule:"".concat(pu,"/compass-multimedia-sdk.es5.js"),dependencies:["compass"]}},fu=e=>"".concat(e,"?version=2071");class mu{load(e,t){var r=hu[e];t&&function(){m.addConfig(...arguments)}(t),du(fu(r.srcModule),e,!0),du(fu(r.srcNoModule),e,!1)}}v("loader",[],(()=>Promise.resolve(mu)))})();