function e(e,n,t,r,i,o,a){try{var u=e[o](a),c=u.value}catch(e){return void t(e)}u.done?n(c):Promise.resolve(c).then(r,i)}function n(n){return function(){var t=this,r=arguments;return new Promise((function(i,o){var a=n.apply(t,r);function u(n){e(a,i,o,u,c,"next",n)}function c(n){e(a,i,o,u,c,"throw",n)}u(void 0)}))}}function t(e,n,t){return(n=function(e){var n=function(e,n){if("object"!=typeof e||!e)return e;var t=e[Symbol.toPrimitive];if(void 0!==t){var r=t.call(e,n||"default");if("object"!=typeof r)return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===n?String:Number)(e)}(e,"string");return"symbol"==typeof n?n:n+""}(n))in e?Object.defineProperty(e,n,{value:t,enumerable:!0,configurable:!0,writable:!0}):e[n]=t,e}function r(e,n){var t=Object.keys(e);if(Object.getOwnPropertySymbols){var r=Object.getOwnPropertySymbols(e);n&&(r=r.filter((function(n){return Object.getOwnPropertyDescriptor(e,n).enumerable}))),t.push.apply(t,r)}return t}function i(e){for(var n=1;n<arguments.length;n++){var i=null!=arguments[n]?arguments[n]:{};n%2?r(Object(i),!0).forEach((function(n){t(e,n,i[n])})):Object.getOwnPropertyDescriptors?Object.defineProperties(e,Object.getOwnPropertyDescriptors(i)):r(Object(i)).forEach((function(n){Object.defineProperty(e,n,Object.getOwnPropertyDescriptor(i,n))}))}return e}var o;function a(e){return function(e){return document.querySelector('script[data-mrf-script="'.concat(e,'"]'))}(e)||function(e){var n=document.createElement("script");return n.setAttribute("type","application/json"),n.dataset.mrfScript=e,document.head.appendChild(n)}(e)}function u(e){return e&&"object"==typeof e}function c(e,n){return u(e)&&u(n)?(Object.keys(n).forEach((t=>{var r=e[t],i=n[t];Array.isArray(r)&&Array.isArray(i)?e[t]=r.concat(i):u(r)&&u(i)?e[t]=c(Object.assign({},r),i):e[t]=i})),e):n}function f(){for(var e=arguments.length,n=new Array(e),t=0;t<e;t++)n[t]=arguments[t];return n.reduce(((e,n)=>c(e,n)),{})}function l(e,n,t,r,i,o,a){try{var u=e[o](a),c=u.value}catch(e){return void t(e)}u.done?n(c):Promise.resolve(c).then(r,i)}function s(e){return function(){var n=this,t=arguments;return new Promise((function(r,i){var o=e.apply(n,t);function a(e){l(o,r,i,a,u,"next",e)}function u(e){l(o,r,i,a,u,"throw",e)}a(void 0)}))}}function p(){var e,n;return window.marfeel=null!==(e=window.marfeel)&&void 0!==e?e:{},window.marfeel.cmd=null!==(n=window.marfeel.cmd)&&void 0!==n?n:[],window.marfeel.cmd}!function(e){e.HEADLINE_AB="HeadlineAB"}(o||(o={}));var d="marfeel-sdk-store";function y(e){return e.update=Date.now(),n=d,t=btoa(JSON.stringify(e)),new Promise((e=>{p().push(["consent",r=>{try{if(r.getConsent("cookies"))return window.localStorage.setItem(n,t),e(!0)}catch(e){}return e(!1)}])}));var n,t}function v(){return h.apply(this,arguments)}function h(){return(h=s((function*(){var e,n,t=yield(e=d,new Promise((n=>{p().push(["consent",t=>{try{if(t.getConsent("cookies"))return n(window.localStorage.getItem(e))}catch(e){}return n(null)}])})));return t?JSON.parse(atob(t)):(y(n={creation:Date.now(),update:Date.now(),entries:{}}),n)}))).apply(this,arguments)}function m(e){return w.apply(this,arguments)}function w(){return(w=s((function*(e){return(yield v()).entries[e]}))).apply(this,arguments)}function g(){return(g=s((function*(e,n){var t=yield v();return t.entries[e]=n,y(t)}))).apply(this,arguments)}var b="croupier-experimentation-entry",O={percent:function(){var e=n((function*(e){var n=Math.random();for(var t of e)if((n-=t.strategy.value)<=0)return t;return e[e.length-1]}));return function(n){return e.apply(this,arguments)}}()},P=function(){var e=n((function*(e,n){if(Array.isArray(n)&&0!==n.length){var t=(yield m(b))||{};if(t[e])return n.find((n=>n.id===t[e]));if(!n.some((e=>!e.strategy))){var r=n[0].strategy,o=O[r.type],a=yield o(n);return yield function(e,n){return g.apply(this,arguments)}(b,i(i({},(yield m(b))||{}),{},{[e]:a.id})),a}}}));return function(n,t){return e.apply(this,arguments)}}(),j=(e,n)=>{window.marfeel=window.marfeel||{},window.marfeel.cmd=window.marfeel.cmd||[],window.marfeel.cmd.push(["synchronizer",t=>{t.resolve(e,n)}])},E="mrfhud",S=e=>window.location.search.includes(e),A=function(){var e=n((function*(){return!!(S("activate-overlay")||S(E)||(e=E,window.location.hash.includes(e)))||(n="".concat("mrfHudStorage","-").concat(parseInt(5546,10)),!!window.localStorage.getItem(n));var e,n}));return function(){return e.apply(this,arguments)}}(),D=function(){var e=n((function*(e){return"FINISHED"===e.status&&e.winner?e.variants.find((n=>n.id===e.winner)):P(e.id||"",e.variants)}));return function(n){return e.apply(this,arguments)}}(),I=function(){var e=n((function*(e){var t,r=yield Promise.all(e.map(function(){var e=n((function*(e){var n=yield D(e);return n?f({id:n.id,status:e.status,applyChangesOnFinish:!!e.applyChangesOnFinish},e.detail,n.detail||{}):{}}));return function(n){return e.apply(this,arguments)}}())),i=new Set,o={headlines:r.reduce(((e,n)=>{if(r=n,0!==Object.keys(r).length){var t=n.recirculationModule.editorialId;i.has(t)||e.push(n),i.add(t)}var r;return e}),[])};0===o.headlines.length||(yield A())?j("headline",!1):(t=o,a("experimentation-headlineab").innerHTML=JSON.stringify(t))}));return function(n){return e.apply(this,arguments)}}(),x={[o.HEADLINE_AB]:I},H=function(){var e=n((function*(e){var n,t=e.reduce(((e,n)=>i(i({},e),{},{[n.experimentType]:[...e[n.experimentType]||[],n]})),{});n=e.length>0,j("experimentation",n),yield Promise.all(Object.values(o).map((e=>(e=>x[e])(e)(t[e]||[]))))}));return function(n){return e.apply(this,arguments)}}();!function(){try{H([])}catch(e){j("experimentationFailed")}}();