!function(u){var t={};function n(e){if(t[e])return t[e].exports;var r=t[e]={i:e,l:!1,exports:{}};return u[e].call(r.exports,r,r.exports,n),r.l=!0,r.exports}n.m=u,n.c=t,n.d=function(u,t,e){n.o(u,t)||Object.defineProperty(u,t,{enumerable:!0,get:e})},n.r=function(u){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(u,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(u,"__esModule",{value:!0})},n.t=function(u,t){if(1&t&&(u=n(u)),8&t)return u;if(4&t&&"object"==typeof u&&u&&u.__esModule)return u;var e=Object.create(null);if(n.r(e),Object.defineProperty(e,"default",{enumerable:!0,value:u}),2&t&&"string"!=typeof u)for(var r in u)n.d(e,r,function(t){return u[t]}.bind(null,r));return e},n.n=function(u){var t=u&&u.__esModule?function(){return u.default}:function(){return u};return n.d(t,"a",t),t},n.o=function(u,t){return Object.prototype.hasOwnProperty.call(u,t)},n.p="/build/text_links/",n(n.s="NYPB")}({NYPB:function(u,t,n){"use strict";n.r(t);var e="{ORIGIN}/delivery/textlink/{PLACEMENT_ID}?spi={SALESFORCE_PARTNER_ID}",r=["script","style","link","img","a","video","audio","canvas","svg","map","object","input","textarea","select","optgroup","button","br","hr"],o=["__cpIabParent","__cpIabCat"],i=function(u,t){var n,e={default:{textDecorationColor:"#f39100"},"focus-online":{textDecorationColor:"#EE001C"},tvt:{textDecorationColor:"#cc0033"},fff:{textDecorationColor:"#ff2700"},chip:{textDecorationColor:"#EB443F"},bunte:{textDecorationColor:"#E30604"}};return(null===(n=e[t])||void 0===n?void 0:n[u])||e.default[u]};function a(u){for(var t=[],n=Object.keys(u),e=0;e<n.length;e++)t.push([n[e],u[n[e]]]);return t}function D(u,t){return function(u){if(Array.isArray(u))return u}(u)||function(u,t){var n=null==u?null:"undefined"!=typeof Symbol&&u[Symbol.iterator]||u["@@iterator"];if(null==n)return;var e,r,o=[],i=!0,a=!1;try{for(n=n.call(u);!(i=(e=n.next()).done)&&(o.push(e.value),!t||o.length!==t);i=!0);}catch(u){a=!0,r=u}finally{try{i||null==n.return||n.return()}finally{if(a)throw r}}return o}(u,t)||function(u,t){if(!u)return;if("string"==typeof u)return c(u,t);var n=Object.prototype.toString.call(u).slice(8,-1);"Object"===n&&u.constructor&&(n=u.constructor.name);if("Map"===n||"Set"===n)return Array.from(u);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return c(u,t)}(u,t)||function(){throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function c(u,t){(null==t||t>u.length)&&(t=u.length);for(var n=0,e=new Array(t);n<t;n++)e[n]=u[n];return e}function l(u,t){var n=Object.keys(u);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(u);t&&(e=e.filter((function(t){return Object.getOwnPropertyDescriptor(u,t).enumerable}))),n.push.apply(n,e)}return n}function s(u){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?l(Object(n),!0).forEach((function(t){d(u,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(n)):l(Object(n)).forEach((function(t){Object.defineProperty(u,t,Object.getOwnPropertyDescriptor(n,t))}))}return u}function d(u,t,n){return t in u?Object.defineProperty(u,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):u[t]=n,u}var f,F="".concat(window.screen.width,"x").concat(window.screen.height),A=window.parent.document.title,C=window.parent.location.href;window.__tcfapi("getTCData",2,(function(u){f=u.tcString}));var E={"{resolution}":F,"{document.title}":A,"{document.url}":C,"{rand}":function(){return Math.floor(Math.random()*+new Date)},"${GDPR}":1,"${GDPR_CONSENT}":function(){return f}};function p(u){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=s(s({},E),t);return Object.keys(n).reduce((function(u,t){return u.replace(t,n[t])}),decodeURI(u))}function h(u,t){var n=p(u,{"{linkcount}":t});document.createElement("img").src=n}var m=function(u,t){var n,e={default:{buttonBackgroundColor:"#f39100",buttonTextColor:"#ffffff"},"focus-online":{buttonBackgroundColor:"#D70D12",buttonTextColor:"#ffffff"},tvt:{buttonBackgroundColor:"#0b3257",buttonTextColor:"#ffffff"},fff:{buttonBackgroundColor:"#009fe3",buttonTextColor:"#ffffff"},bunte:{buttonBackgroundColor:"#e30604",buttonTextColor:"#ffffff"}};return(null===(n=e[t])||void 0===n?void 0:n[u])||e.default[u]},g=function(u){var t,n;return'\n<!doctype html>\n<html>\n<head>\n    <meta charset="utf-8">\n    <style>'.concat(function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return'\nbody {\n  font-family: "Helvetica Neue", Helvetica, Arial, sans-serif;\n  overflow: hidden;\n  background: transparent;\n}\n\nbody.layer {\n  padding: 8px;\n}\n\nbody.accordion {\n  padding: 8px 0 16px;\n}\n\n* {\n    margin: 0;\n    padding: 0;\n    box-sizing: border-box;\n}\n\narticle {\n  background-color: #fff;\n  width: 100%;\n  margin: 0 auto;\n}\n\nbody.layer article {\n  box-shadow: 0 0 5px 2px rgba(0,0,0,0.21);\n  border-radius: 4px;\n}\n\nbody.accordion article {\n  border: 1px solid #b4b4b4;\n}\n\nheader {\n  display: flex;\n  justify-content: space-between;\n  align-items: center;\n  padding-left: 8px;\n}\n\nheader span {\n  font-size: 10px;\n  color: #9b9b9b;\n  text-transform: uppercase;\n}\n\nheader img {\n  display: block;\n  height: 20px;\n  width: auto;\n  margin-left: 12px;\n  margin-right: auto;\n}\n\nheader button {\n  appearance: none;\n  display: flex;\n  justify-content: center;\n  align-items: center;\n  cursor: pointer;\n  width: 30px;\n  aspect-ratio: 1 / 1;\n  background: #e5e5e5;\n  color: #000;\n  font-size: 24px;\n  border: none;\n  border-bottom-left-radius: 4px;\n  transition: background-color 0.2s ease-in-out;\n}\n\nheader button::before {\n  content: "+";\n  transform: rotate(45deg);\n}\n\nheader button:hover {\n  background-color: #d5d5d5;\n}\n\nmain {\n  padding: 0 8px 8px;\n}\n\nh1 {\n  font-size: 16px;\n  font-weight: bold;\n}\n\n.image-wrapper {\n  margin: 16px 16px 0;\n}\n\nmain img {\n  display: block;\n  aspect-ratio: 16 / 9;\n  width: 100%;\n  height: 100%;\n  object-fit: contain;\n  object-position: left;\n}\n\naside {\n  margin-top: 16px;\n}\n\na {\n  margin-top: auto;\n  padding: 6px 16px;\n  border-radius: 4px;\n  min-height: 36px;\n  background-color: '.concat(m("buttonBackgroundColor",u),";\n  color: ").concat(m("buttonTextColor",u),";\n  border: 1px solid ").concat(m("buttonBackgroundColor",u),";\n  font-size: 14px;\n  font-weight: 600;\n  display: flex;\n  width: 100%;\n  justify-content: center;\n  align-items: center;\n  text-decoration: none;\n  transition: background-color 0.2s ease-in-out, color 0.2s ease-in-out, border-color 0.2s ease-in-out;\n}\n\na svg {\n  flex: 0 0 auto;\n  display: block;\n  width: 1.4em;\n  fill: currentColor;\n  margin-right: 8px;\n  margin-left: -24px;\n}\n\na:hover {\n  background-color: ").concat(m("buttonTextColor",u),";\n  color: ").concat(m("buttonBackgroundColor",u),";\n  border-color: ").concat(m("buttonBackgroundColor",u),";\n}\n\nimg.impression {\n  position: absolute;\n  opacity: 0;\n  pointer-events: none;\n}\n\n")}(u.colorScheme),'</style>\n</head>\n<body class="').concat(u.layoutType,'">\n    <article>\n        <header>\n            <span>').concat(u.la,"</span>\n            ").concat(u.lo?'\n                <img \n                    src="'.concat(u.lo.path,'" \n                    alt="').concat(u.la,'"\n                    width="').concat(u.lo.width,'"\n                    height="').concat(u.lo.height,'"\n                >\n            '):"",'\n            <button class="js-close-button"></button>\n        </header>\n        <main>\n            <h1>').concat(u.he,'</h1>\n            <div class="image-wrapper">\n                <img \n                    src="').concat(u.im.path,'" \n                    alt="').concat(u.he,'"\n                    width="16"\n                    height="9"\n                    loading="eager"\n                >\n            </div>\n            <aside>\n                <a href="').concat(u.url,'" target="_blank">\n                    ').concat(u.sc?'\n                        <svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 80 76.12"><path d="M70 55.85 80 23.4H23.72L21.89 5.61 1.84-.04 0 6.69l15.53 4.27 5 49.49a8.38 8.38 0 1 0 11.82 10.71h17.47a8.41 8.41 0 1 0 0-6.9H32.24a8.59 8.59 0 0 0-5-4.53l-.43-4H70v.11zm.65-25.55-5.74 18.54H26.2L24.37 30.3zM24.69 70.84a3 3 0 1 1 3-3 3.08 3.08 0 0 1-3 3zm32.78-6.15a3 3 0 1 1-3 3 2.94 2.94 0 0 1 3-3z"/></svg>\n                    ':"","\n                    ").concat("Mehr erfahren","\n                </a>\n            </aside>\n        </main>\n    </article>\n    <script>").concat('\n\ndocument.querySelector(".js-close-button").addEventListener("click", () => {\n    window.top.postMessage("BFAMTLCONTROLLER:CLOSEIFRAME", "*")\n})\n',"<\/script>\n    ").concat(((null===(t=u.it)||void 0===t?void 0:t.i)||[]).map((function(u){return'\n        <img src="'.concat(p(u),'" class="impression">\n    ')})),"    \n    ").concat(((null===(n=u.it)||void 0===n?void 0:n.j)||[]).map((function(u){return'\n        <script src="'.concat(p(u),'"><\/script>\n    ')})),"\n</body>\n</html>\n")};function v(u){return(v="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(u){return typeof u}:function(u){return u&&"function"==typeof Symbol&&u.constructor===Symbol&&u!==Symbol.prototype?"symbol":typeof u})(u)}function B(u,t){var n=Object.keys(u);if(Object.getOwnPropertySymbols){var e=Object.getOwnPropertySymbols(u);t&&(e=e.filter((function(t){return Object.getOwnPropertyDescriptor(u,t).enumerable}))),n.push.apply(n,e)}return n}function y(u){for(var t=1;t<arguments.length;t++){var n=null!=arguments[t]?arguments[t]:{};t%2?B(Object(n),!0).forEach((function(t){b(u,t,n[t])})):Object.getOwnPropertyDescriptors?Object.defineProperties(u,Object.getOwnPropertyDescriptors(n)):B(Object(n)).forEach((function(t){Object.defineProperty(u,t,Object.getOwnPropertyDescriptor(n,t))}))}return u}function b(u,t,n){return t in u?Object.defineProperty(u,t,{value:n,enumerable:!0,configurable:!0,writable:!0}):u[t]=n,u}function w(){/*! regenerator-runtime -- Copyright (c) 2014-present, Facebook, Inc. -- license (MIT): https://github.com/facebook/regenerator/blob/main/LICENSE */w=function(){return u};var u={},t=Object.prototype,n=t.hasOwnProperty,e="function"==typeof Symbol?Symbol:{},r=e.iterator||"@@iterator",o=e.asyncIterator||"@@asyncIterator",i=e.toStringTag||"@@toStringTag";function a(u,t,n){return Object.defineProperty(u,t,{value:n,enumerable:!0,configurable:!0,writable:!0}),u[t]}try{a({},"")}catch(u){a=function(u,t,n){return u[t]=n}}function D(u,t,n,e){var r=t&&t.prototype instanceof s?t:s,o=Object.create(r.prototype),i=new y(e||[]);return o._invoke=function(u,t,n){var e="suspendedStart";return function(r,o){if("executing"===e)throw new Error("Generator is already running");if("completed"===e){if("throw"===r)throw o;return x()}for(n.method=r,n.arg=o;;){var i=n.delegate;if(i){var a=m(i,n);if(a){if(a===l)continue;return a}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if("suspendedStart"===e)throw e="completed",n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);e="executing";var D=c(u,t,n);if("normal"===D.type){if(e=n.done?"completed":"suspendedYield",D.arg===l)continue;return{value:D.arg,done:n.done}}"throw"===D.type&&(e="completed",n.method="throw",n.arg=D.arg)}}}(u,n,i),o}function c(u,t,n){try{return{type:"normal",arg:u.call(t,n)}}catch(u){return{type:"throw",arg:u}}}u.wrap=D;var l={};function s(){}function d(){}function f(){}var F={};a(F,r,(function(){return this}));var A=Object.getPrototypeOf,C=A&&A(A(b([])));C&&C!==t&&n.call(C,r)&&(F=C);var E=f.prototype=s.prototype=Object.create(F);function p(u){["next","throw","return"].forEach((function(t){a(u,t,(function(u){return this._invoke(t,u)}))}))}function h(u,t){var e;this._invoke=function(r,o){function i(){return new t((function(e,i){!function e(r,o,i,a){var D=c(u[r],u,o);if("throw"!==D.type){var l=D.arg,s=l.value;return s&&"object"==v(s)&&n.call(s,"__await")?t.resolve(s.__await).then((function(u){e("next",u,i,a)}),(function(u){e("throw",u,i,a)})):t.resolve(s).then((function(u){l.value=u,i(l)}),(function(u){return e("throw",u,i,a)}))}a(D.arg)}(r,o,e,i)}))}return e=e?e.then(i,i):i()}}function m(u,t){var n=u.iterator[t.method];if(void 0===n){if(t.delegate=null,"throw"===t.method){if(u.iterator.return&&(t.method="return",t.arg=void 0,m(u,t),"throw"===t.method))return l;t.method="throw",t.arg=new TypeError("The iterator does not provide a 'throw' method")}return l}var e=c(n,u.iterator,t.arg);if("throw"===e.type)return t.method="throw",t.arg=e.arg,t.delegate=null,l;var r=e.arg;return r?r.done?(t[u.resultName]=r.value,t.next=u.nextLoc,"return"!==t.method&&(t.method="next",t.arg=void 0),t.delegate=null,l):r:(t.method="throw",t.arg=new TypeError("iterator result is not an object"),t.delegate=null,l)}function g(u){var t={tryLoc:u[0]};1 in u&&(t.catchLoc=u[1]),2 in u&&(t.finallyLoc=u[2],t.afterLoc=u[3]),this.tryEntries.push(t)}function B(u){var t=u.completion||{};t.type="normal",delete t.arg,u.completion=t}function y(u){this.tryEntries=[{tryLoc:"root"}],u.forEach(g,this),this.reset(!0)}function b(u){if(u){var t=u[r];if(t)return t.call(u);if("function"==typeof u.next)return u;if(!isNaN(u.length)){var e=-1,o=function t(){for(;++e<u.length;)if(n.call(u,e))return t.value=u[e],t.done=!1,t;return t.value=void 0,t.done=!0,t};return o.next=o}}return{next:x}}function x(){return{value:void 0,done:!0}}return d.prototype=f,a(E,"constructor",f),a(f,"constructor",d),d.displayName=a(f,i,"GeneratorFunction"),u.isGeneratorFunction=function(u){var t="function"==typeof u&&u.constructor;return!!t&&(t===d||"GeneratorFunction"===(t.displayName||t.name))},u.mark=function(u){return Object.setPrototypeOf?Object.setPrototypeOf(u,f):(u.__proto__=f,a(u,i,"GeneratorFunction")),u.prototype=Object.create(E),u},u.awrap=function(u){return{__await:u}},p(h.prototype),a(h.prototype,o,(function(){return this})),u.AsyncIterator=h,u.async=function(t,n,e,r,o){void 0===o&&(o=Promise);var i=new h(D(t,n,e,r),o);return u.isGeneratorFunction(n)?i:i.next().then((function(u){return u.done?u.value:i.next()}))},p(E),a(E,i,"Generator"),a(E,r,(function(){return this})),a(E,"toString",(function(){return"[object Generator]"})),u.keys=function(u){var t=[];for(var n in u)t.push(n);return t.reverse(),function n(){for(;t.length;){var e=t.pop();if(e in u)return n.value=e,n.done=!1,n}return n.done=!0,n}},u.values=b,y.prototype={constructor:y,reset:function(u){if(this.prev=0,this.next=0,this.sent=this._sent=void 0,this.done=!1,this.delegate=null,this.method="next",this.arg=void 0,this.tryEntries.forEach(B),!u)for(var t in this)"t"===t.charAt(0)&&n.call(this,t)&&!isNaN(+t.slice(1))&&(this[t]=void 0)},stop:function(){this.done=!0;var u=this.tryEntries[0].completion;if("throw"===u.type)throw u.arg;return this.rval},dispatchException:function(u){if(this.done)throw u;var t=this;function e(n,e){return i.type="throw",i.arg=u,t.next=n,e&&(t.method="next",t.arg=void 0),!!e}for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r],i=o.completion;if("root"===o.tryLoc)return e("end");if(o.tryLoc<=this.prev){var a=n.call(o,"catchLoc"),D=n.call(o,"finallyLoc");if(a&&D){if(this.prev<o.catchLoc)return e(o.catchLoc,!0);if(this.prev<o.finallyLoc)return e(o.finallyLoc)}else if(a){if(this.prev<o.catchLoc)return e(o.catchLoc,!0)}else{if(!D)throw new Error("try statement without catch or finally");if(this.prev<o.finallyLoc)return e(o.finallyLoc)}}}},abrupt:function(u,t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc<=this.prev&&n.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===u||"continue"===u)&&o.tryLoc<=t&&t<=o.finallyLoc&&(o=null);var i=o?o.completion:{};return i.type=u,i.arg=t,o?(this.method="next",this.next=o.finallyLoc,l):this.complete(i)},complete:function(u,t){if("throw"===u.type)throw u.arg;return"break"===u.type||"continue"===u.type?this.next=u.arg:"return"===u.type?(this.rval=this.arg=u.arg,this.method="return",this.next="end"):"normal"===u.type&&t&&(this.next=t),l},finish:function(u){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.finallyLoc===u)return this.complete(n.completion,n.afterLoc),B(n),l}},catch:function(u){for(var t=this.tryEntries.length-1;t>=0;--t){var n=this.tryEntries[t];if(n.tryLoc===u){var e=n.completion;if("throw"===e.type){var r=e.arg;B(n)}return r}}throw new Error("illegal catch attempt")},delegateYield:function(u,t,n){return this.delegate={iterator:b(u),resultName:t,nextLoc:n},"next"===this.method&&(this.arg=void 0),l}},u}function x(u){return function(u){if(Array.isArray(u))return L(u)}(u)||function(u){if("undefined"!=typeof Symbol&&null!=u[Symbol.iterator]||null!=u["@@iterator"])return Array.from(u)}(u)||function(u,t){if(!u)return;if("string"==typeof u)return L(u,t);var n=Object.prototype.toString.call(u).slice(8,-1);"Object"===n&&u.constructor&&(n=u.constructor.name);if("Map"===n||"Set"===n)return Array.from(u);if("Arguments"===n||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n))return L(u,t)}(u)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function L(u,t){(null==t||t>u.length)&&(t=u.length);for(var n=0,e=new Array(t);n<t;n++)e[n]=u[n];return e}function k(u,t,n,e,r,o,i){try{var a=u[o](i),D=a.value}catch(u){return void n(u)}a.done?t(D):Promise.resolve(D).then(e,r)}function O(u){return function(){var t=this,n=arguments;return new Promise((function(e,r){var o=u.apply(t,n);function i(u){k(o,e,r,i,a,"next",u)}function a(u){k(o,e,r,i,a,"throw",u)}i(void 0)}))}}var _=new URL(document.currentScript.src);({init:function(){var u=this;return O(w().mark((function t(){var n,o,i,a,D,c,l,s,d,f;return w().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(u.targetElement=document.querySelector(null===(n=window.BFAAMTL)||void 0===n?void 0:n.element),u.targetElement){t.next=4;break}return console.warn("textLink targetElement ".concat(null===(s=window.BFAAMTL)||void 0===s?void 0:s.element," could not be found. Aborting further initialisation.")),t.abrupt("return");case 4:return u.usedAdCounter={},u.activeIframe=null,u.placementId=null===(o=window.BFAAMTL)||void 0===o?void 0:o.placement_id,u.adLayout="accordion"===(null===(i=window.BFAAMTL)||void 0===i?void 0:i.layout)?"accordion":"layer",u.salesforcePartnerId=null!==(a=null===(D=window.BFAAMTL)||void 0===D?void 0:D.salesforce_partner_id)&&void 0!==a?a:null===(c=window.utag_data)||void 0===c?void 0:c.salesforcePartnerId,t.next=11,u.getArticleCategories();case 11:return u.articleCategories=t.sent,d=[].concat(x(r),x(window.BFAAMTL.blacklist_selectors)),u.blacklistAsSingleSelector=d.join(", "),t.next=16,u.fetchData((null===(l=window.BFAAMTL)||void 0===l?void 0:l.endpoint_url)||e);case 16:u.textLinkData=t.sent,f=function(){var t=O(w().mark((function t(){var n,e,r,o,i,a,D,c,l,s,d;return w().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(e=u.getArticleWords(u.targetElement),r=[],u.textLinkData&&(u.setComputedData(),r=u.findMatchingWords(e),null!==(o=u.textLinkData)&&void 0!==o&&o.it&&h(u.textLinkData.it,null!==(i=null===(a=r)||void 0===a?void 0:a.length)&&void 0!==i?i:0)),D=function(){u.setLinkStyles(),u.replaceMatchingWords(r),u.bindEvents()},!r.length){t.next=8;break}D(),t.next=14;break;case 8:if(!window.BFAAMTL.bestckeck_backfill||null===(n=u.articleCategories)||void 0===n||!n.length){t.next=14;break}return t.next=11,u.fetchData((null===(c=window.BFAAMTL)||void 0===c?void 0:c.fallback_endpoint_url)||"{ORIGIN}/delivery/bc/{PLACEMENT_ID}?spi={SALESFORCE_PARTNER_ID}&keys={IAB_IDS}");case 11:u.textLinkData=t.sent,u.textLinkData&&(u.setComputedData(),r=u.findMatchingWords(e),null!==(l=u.textLinkData)&&void 0!==l&&l.it&&h(u.textLinkData.it,null!==(s=null===(d=r)||void 0===d?void 0:d.length)&&void 0!==s?s:0)),r.length&&D();case 14:case"end":return t.stop()}}),t)})));return function(){return t.apply(this,arguments)}}(),"loading"===document.readyState?window.addEventListener("DOMContentLoaded",f):f();case 19:case"end":return t.stop()}}),t)})))()},setComputedData:function(){var u;this.colorScheme=null===(u=this.textLinkData)||void 0===u?void 0:u.a,this.campaigns=this.getCampaignsFilteredByCategories().map((function(u){return y(y({},u),{},{ads:u.ads.sort((function(){return.5-Math.random()}))})})),this.campaigns.length&&(this.keywords=this.getKeywordList())},fetchData:function(){var u=arguments,t=this;return O(w().mark((function n(){var r,o,i,a,D;return w().wrap((function(n){for(;;)switch(n.prev=n.next){case 0:return r=u.length>0&&void 0!==u[0]?u[0]:e,o=y(y({"{ORIGIN}":_.origin,"{PLACEMENT_ID}":t.placementId},t.salesforcePartnerId&&{"{SALESFORCE_PARTNER_ID}":t.salesforcePartnerId}),{},{"{IAB_IDS}":t.articleCategories}),i=r.replace(/\{\w+\}/g,(function(u){return o[u]||u})),n.prev=3,n.next=6,fetch(i);case 6:return a=n.sent,n.next=9,a.json();case 9:if("ok"!==(D=n.sent).status){n.next=12;break}return n.abrupt("return",D.data);case 12:n.next=17;break;case 14:n.prev=14,n.t0=n.catch(3),console.warn("fetchData failed",n.t0);case 17:case"end":return n.stop()}}),n,null,[[3,14]])})))()},getArticleCategories:function(){return O(w().mark((function u(){var t,n,e,r,i,a,D,c,l,s,d,f,F,A;return w().wrap((function(u){for(;;)switch(u.prev=u.next){case 0:if(a=Array.isArray(window.BFAAMTL.iab_categories)?window.BFAAMTL.iab_categories:(null===(t=window.BFAAMTL)||void 0===t||null===(n=t.iab_categories)||void 0===n?void 0:n.split(",").filter(Boolean))||[],D=o.flatMap((function(u){var t;return null===(t=window[u])||void 0===t?void 0:t.split(",")})).filter(Boolean),c=[],l=null===(e=JSON.parse(localStorage.getItem("_psegs")||"[]").map(Number))||void 0===e||null===(r=e.filter((function(u){return u<1e6})))||void 0===r?void 0:r.map(String),s=null===(i=window.utag_data)||void 0===i?void 0:i.pageContentId,null!=a&&a.length||null!=D&&D.length||!s){u.next=21;break}return u.prev=6,d={"{PAGE-ID}":s,"{URL}":location.href},f=Object.keys(d).reduce((function(u,t){return u.replace(t,d[t])}),"https://mds.bf-tools.net/api/v1/getMetadata?id={PAGE-ID}&caller=bfa-web&url={URL}"),u.next=11,fetch(f);case 11:return F=u.sent,u.next=14,F.json();case 14:A=u.sent,c=A.catIAB.filter((function(u){return u.weight>20})).flatMap((function(u){return[u.v2,u["v2-parent"]]})),u.next=21;break;case 18:u.prev=18,u.t0=u.catch(6),console.warn("fallBackCategories fetch failed",u.t0);case 21:return console.debug({targeting:{page:a,adEngine:D,api:c,permutive:l}}),u.abrupt("return",x(new Set([].concat(x(a),x(D),x(c)))).sort());case 23:case"end":return u.stop()}}),u,null,[[6,18]])})))()},getCampaignsFilteredByCategories:function(){var u,t=this;return null!==(u=this.articleCategories)&&void 0!==u&&u.length?this.textLinkData.c.filter((function(u){return!u.iab||t.articleCategories.some((function(t){return u.iab.includes(t)}))})):this.textLinkData.c.filter((function(u){return!u.iab}))},getKeywordList:function(){return this.campaigns.flatMap((function(u){return u.kw.map((function(t){return{keyword:t,prio:u.p,campaignId:u.id}}))})).sort((function(){return.5-Math.random()})).sort((function(u,t){return t.prio-u.prio}))},getArticleWords:function(u){for(var t,n=this,e=document.createTreeWalker(u,NodeFilter.SHOW_TEXT,{acceptNode:function(u){var t;return!(null!==(t=u.parentNode)&&void 0!==t&&t.closest(n.blacklistAsSingleSelector))}},!1),r=[];t=e.nextNode();){var o=t.nodeValue.replace(/[\n\r]+|[\s]{2,}/g," ").replace(/(?:(?![\t-\r 0-9A-Za-z\xA0\xAA\xB2\xB3\xB5\xB9\xBA\xBC-\xBE\xC0-\xD6\xD8-\xF6\xF8-\u02C1\u02C6-\u02D1\u02E0-\u02E4\u02EC\u02EE\u0370-\u0374\u0376\u0377\u037A-\u037D\u037F\u0386\u0388-\u038A\u038C\u038E-\u03A1\u03A3-\u03F5\u03F7-\u0481\u048A-\u052F\u0531-\u0556\u0559\u0560-\u0588\u05D0-\u05EA\u05EF-\u05F2\u0620-\u064A\u0660-\u0669\u066E\u066F\u0671-\u06D3\u06D5\u06E5\u06E6\u06EE-\u06FC\u06FF\u0710\u0712-\u072F\u074D-\u07A5\u07B1\u07C0-\u07EA\u07F4\u07F5\u07FA\u0800-\u0815\u081A\u0824\u0828\u0840-\u0858\u0860-\u086A\u0870-\u0887\u0889-\u088E\u08A0-\u08C9\u0904-\u0939\u093D\u0950\u0958-\u0961\u0966-\u096F\u0971-\u0980\u0985-\u098C\u098F\u0990\u0993-\u09A8\u09AA-\u09B0\u09B2\u09B6-\u09B9\u09BD\u09CE\u09DC\u09DD\u09DF-\u09E1\u09E6-\u09F1\u09F4-\u09F9\u09FC\u0A05-\u0A0A\u0A0F\u0A10\u0A13-\u0A28\u0A2A-\u0A30\u0A32\u0A33\u0A35\u0A36\u0A38\u0A39\u0A59-\u0A5C\u0A5E\u0A66-\u0A6F\u0A72-\u0A74\u0A85-\u0A8D\u0A8F-\u0A91\u0A93-\u0AA8\u0AAA-\u0AB0\u0AB2\u0AB3\u0AB5-\u0AB9\u0ABD\u0AD0\u0AE0\u0AE1\u0AE6-\u0AEF\u0AF9\u0B05-\u0B0C\u0B0F\u0B10\u0B13-\u0B28\u0B2A-\u0B30\u0B32\u0B33\u0B35-\u0B39\u0B3D\u0B5C\u0B5D\u0B5F-\u0B61\u0B66-\u0B6F\u0B71-\u0B77\u0B83\u0B85-\u0B8A\u0B8E-\u0B90\u0B92-\u0B95\u0B99\u0B9A\u0B9C\u0B9E\u0B9F\u0BA3\u0BA4\u0BA8-\u0BAA\u0BAE-\u0BB9\u0BD0\u0BE6-\u0BF2\u0C05-\u0C0C\u0C0E-\u0C10\u0C12-\u0C28\u0C2A-\u0C39\u0C3D\u0C58-\u0C5A\u0C5D\u0C60\u0C61\u0C66-\u0C6F\u0C78-\u0C7E\u0C80\u0C85-\u0C8C\u0C8E-\u0C90\u0C92-\u0CA8\u0CAA-\u0CB3\u0CB5-\u0CB9\u0CBD\u0CDD\u0CDE\u0CE0\u0CE1\u0CE6-\u0CEF\u0CF1\u0CF2\u0D04-\u0D0C\u0D0E-\u0D10\u0D12-\u0D3A\u0D3D\u0D4E\u0D54-\u0D56\u0D58-\u0D61\u0D66-\u0D78\u0D7A-\u0D7F\u0D85-\u0D96\u0D9A-\u0DB1\u0DB3-\u0DBB\u0DBD\u0DC0-\u0DC6\u0DE6-\u0DEF\u0E01-\u0E30\u0E32\u0E33\u0E40-\u0E46\u0E50-\u0E59\u0E81\u0E82\u0E84\u0E86-\u0E8A\u0E8C-\u0EA3\u0EA5\u0EA7-\u0EB0\u0EB2\u0EB3\u0EBD\u0EC0-\u0EC4\u0EC6\u0ED0-\u0ED9\u0EDC-\u0EDF\u0F00\u0F20-\u0F33\u0F40-\u0F47\u0F49-\u0F6C\u0F88-\u0F8C\u1000-\u102A\u103F-\u1049\u1050-\u1055\u105A-\u105D\u1061\u1065\u1066\u106E-\u1070\u1075-\u1081\u108E\u1090-\u1099\u10A0-\u10C5\u10C7\u10CD\u10D0-\u10FA\u10FC-\u1248\u124A-\u124D\u1250-\u1256\u1258\u125A-\u125D\u1260-\u1288\u128A-\u128D\u1290-\u12B0\u12B2-\u12B5\u12B8-\u12BE\u12C0\u12C2-\u12C5\u12C8-\u12D6\u12D8-\u1310\u1312-\u1315\u1318-\u135A\u1369-\u137C\u1380-\u138F\u13A0-\u13F5\u13F8-\u13FD\u1401-\u166C\u166F-\u169A\u16A0-\u16EA\u16EE-\u16F8\u1700-\u1711\u171F-\u1731\u1740-\u1751\u1760-\u176C\u176E-\u1770\u1780-\u17B3\u17D7\u17DC\u17E0-\u17E9\u17F0-\u17F9\u1810-\u1819\u1820-\u1878\u1880-\u1884\u1887-\u18A8\u18AA\u18B0-\u18F5\u1900-\u191E\u1946-\u196D\u1970-\u1974\u1980-\u19AB\u19B0-\u19C9\u19D0-\u19DA\u1A00-\u1A16\u1A20-\u1A54\u1A80-\u1A89\u1A90-\u1A99\u1AA7\u1B05-\u1B33\u1B45-\u1B4C\u1B50-\u1B59\u1B83-\u1BA0\u1BAE-\u1BE5\u1C00-\u1C23\u1C40-\u1C49\u1C4D-\u1C7D\u1C80-\u1C88\u1C90-\u1CBA\u1CBD-\u1CBF\u1CE9-\u1CEC\u1CEE-\u1CF3\u1CF5\u1CF6\u1CFA\u1D00-\u1DBF\u1E00-\u1F15\u1F18-\u1F1D\u1F20-\u1F45\u1F48-\u1F4D\u1F50-\u1F57\u1F59\u1F5B\u1F5D\u1F5F-\u1F7D\u1F80-\u1FB4\u1FB6-\u1FBC\u1FBE\u1FC2-\u1FC4\u1FC6-\u1FCC\u1FD0-\u1FD3\u1FD6-\u1FDB\u1FE0-\u1FEC\u1FF2-\u1FF4\u1FF6-\u1FFC\u2000-\u200A\u2028\u2029\u202F\u205F\u2070\u2071\u2074-\u2079\u207F-\u2089\u2090-\u209C\u2102\u2107\u210A-\u2113\u2115\u2119-\u211D\u2124\u2126\u2128\u212A-\u212D\u212F-\u2139\u213C-\u213F\u2145-\u2149\u214E\u2150-\u2189\u2460-\u249B\u24EA-\u24FF\u2776-\u2793\u2C00-\u2CE4\u2CEB-\u2CEE\u2CF2\u2CF3\u2CFD\u2D00-\u2D25\u2D27\u2D2D\u2D30-\u2D67\u2D6F\u2D80-\u2D96\u2DA0-\u2DA6\u2DA8-\u2DAE\u2DB0-\u2DB6\u2DB8-\u2DBE\u2DC0-\u2DC6\u2DC8-\u2DCE\u2DD0-\u2DD6\u2DD8-\u2DDE\u2E2F\u3000\u3005-\u3007\u3021-\u3029\u3031-\u3035\u3038-\u303C\u3041-\u3096\u309D-\u309F\u30A1-\u30FA\u30FC-\u30FF\u3105-\u312F\u3131-\u318E\u3192-\u3195\u31A0-\u31BF\u31F0-\u31FF\u3220-\u3229\u3248-\u324F\u3251-\u325F\u3280-\u3289\u32B1-\u32BF\u3400-\u4DBF\u4E00-\uA48C\uA4D0-\uA4FD\uA500-\uA60C\uA610-\uA62B\uA640-\uA66E\uA67F-\uA69D\uA6A0-\uA6EF\uA717-\uA71F\uA722-\uA788\uA78B-\uA7CA\uA7D0\uA7D1\uA7D3\uA7D5-\uA7D9\uA7F2-\uA801\uA803-\uA805\uA807-\uA80A\uA80C-\uA822\uA830-\uA835\uA840-\uA873\uA882-\uA8B3\uA8D0-\uA8D9\uA8F2-\uA8F7\uA8FB\uA8FD\uA8FE\uA900-\uA925\uA930-\uA946\uA960-\uA97C\uA984-\uA9B2\uA9CF-\uA9D9\uA9E0-\uA9E4\uA9E6-\uA9FE\uAA00-\uAA28\uAA40-\uAA42\uAA44-\uAA4B\uAA50-\uAA59\uAA60-\uAA76\uAA7A\uAA7E-\uAAAF\uAAB1\uAAB5\uAAB6\uAAB9-\uAABD\uAAC0\uAAC2\uAADB-\uAADD\uAAE0-\uAAEA\uAAF2-\uAAF4\uAB01-\uAB06\uAB09-\uAB0E\uAB11-\uAB16\uAB20-\uAB26\uAB28-\uAB2E\uAB30-\uAB5A\uAB5C-\uAB69\uAB70-\uABE2\uABF0-\uABF9\uAC00-\uD7A3\uD7B0-\uD7C6\uD7CB-\uD7FB\uF900-\uFA6D\uFA70-\uFAD9\uFB00-\uFB06\uFB13-\uFB17\uFB1D\uFB1F-\uFB28\uFB2A-\uFB36\uFB38-\uFB3C\uFB3E\uFB40\uFB41\uFB43\uFB44\uFB46-\uFBB1\uFBD3-\uFD3D\uFD50-\uFD8F\uFD92-\uFDC7\uFDF0-\uFDFB\uFE70-\uFE74\uFE76-\uFEFC\uFEFF\uFF10-\uFF19\uFF21-\uFF3A\uFF41-\uFF5A\uFF66-\uFFBE\uFFC2-\uFFC7\uFFCA-\uFFCF\uFFD2-\uFFD7\uFFDA-\uFFDC]|\uD800[\uDC00-\uDC0B\uDC0D-\uDC26\uDC28-\uDC3A\uDC3C\uDC3D\uDC3F-\uDC4D\uDC50-\uDC5D\uDC80-\uDCFA\uDD07-\uDD33\uDD40-\uDD78\uDD8A\uDD8B\uDE80-\uDE9C\uDEA0-\uDED0\uDEE1-\uDEFB\uDF00-\uDF23\uDF2D-\uDF4A\uDF50-\uDF75\uDF80-\uDF9D\uDFA0-\uDFC3\uDFC8-\uDFCF\uDFD1-\uDFD5]|\uD801[\uDC00-\uDC9D\uDCA0-\uDCA9\uDCB0-\uDCD3\uDCD8-\uDCFB\uDD00-\uDD27\uDD30-\uDD63\uDD70-\uDD7A\uDD7C-\uDD8A\uDD8C-\uDD92\uDD94\uDD95\uDD97-\uDDA1\uDDA3-\uDDB1\uDDB3-\uDDB9\uDDBB\uDDBC\uDE00-\uDF36\uDF40-\uDF55\uDF60-\uDF67\uDF80-\uDF85\uDF87-\uDFB0\uDFB2-\uDFBA]|\uD802[\uDC00-\uDC05\uDC08\uDC0A-\uDC35\uDC37\uDC38\uDC3C\uDC3F-\uDC55\uDC58-\uDC76\uDC79-\uDC9E\uDCA7-\uDCAF\uDCE0-\uDCF2\uDCF4\uDCF5\uDCFB-\uDD1B\uDD20-\uDD39\uDD80-\uDDB7\uDDBC-\uDDCF\uDDD2-\uDE00\uDE10-\uDE13\uDE15-\uDE17\uDE19-\uDE35\uDE40-\uDE48\uDE60-\uDE7E\uDE80-\uDE9F\uDEC0-\uDEC7\uDEC9-\uDEE4\uDEEB-\uDEEF\uDF00-\uDF35\uDF40-\uDF55\uDF58-\uDF72\uDF78-\uDF91\uDFA9-\uDFAF]|\uD803[\uDC00-\uDC48\uDC80-\uDCB2\uDCC0-\uDCF2\uDCFA-\uDD23\uDD30-\uDD39\uDE60-\uDE7E\uDE80-\uDEA9\uDEB0\uDEB1\uDF00-\uDF27\uDF30-\uDF45\uDF51-\uDF54\uDF70-\uDF81\uDFB0-\uDFCB\uDFE0-\uDFF6]|\uD804[\uDC03-\uDC37\uDC52-\uDC6F\uDC71\uDC72\uDC75\uDC83-\uDCAF\uDCD0-\uDCE8\uDCF0-\uDCF9\uDD03-\uDD26\uDD36-\uDD3F\uDD44\uDD47\uDD50-\uDD72\uDD76\uDD83-\uDDB2\uDDC1-\uDDC4\uDDD0-\uDDDA\uDDDC\uDDE1-\uDDF4\uDE00-\uDE11\uDE13-\uDE2B\uDE80-\uDE86\uDE88\uDE8A-\uDE8D\uDE8F-\uDE9D\uDE9F-\uDEA8\uDEB0-\uDEDE\uDEF0-\uDEF9\uDF05-\uDF0C\uDF0F\uDF10\uDF13-\uDF28\uDF2A-\uDF30\uDF32\uDF33\uDF35-\uDF39\uDF3D\uDF50\uDF5D-\uDF61]|\uD805[\uDC00-\uDC34\uDC47-\uDC4A\uDC50-\uDC59\uDC5F-\uDC61\uDC80-\uDCAF\uDCC4\uDCC5\uDCC7\uDCD0-\uDCD9\uDD80-\uDDAE\uDDD8-\uDDDB\uDE00-\uDE2F\uDE44\uDE50-\uDE59\uDE80-\uDEAA\uDEB8\uDEC0-\uDEC9\uDF00-\uDF1A\uDF30-\uDF3B\uDF40-\uDF46]|\uD806[\uDC00-\uDC2B\uDCA0-\uDCF2\uDCFF-\uDD06\uDD09\uDD0C-\uDD13\uDD15\uDD16\uDD18-\uDD2F\uDD3F\uDD41\uDD50-\uDD59\uDDA0-\uDDA7\uDDAA-\uDDD0\uDDE1\uDDE3\uDE00\uDE0B-\uDE32\uDE3A\uDE50\uDE5C-\uDE89\uDE9D\uDEB0-\uDEF8]|\uD807[\uDC00-\uDC08\uDC0A-\uDC2E\uDC40\uDC50-\uDC6C\uDC72-\uDC8F\uDD00-\uDD06\uDD08\uDD09\uDD0B-\uDD30\uDD46\uDD50-\uDD59\uDD60-\uDD65\uDD67\uDD68\uDD6A-\uDD89\uDD98\uDDA0-\uDDA9\uDEE0-\uDEF2\uDFB0\uDFC0-\uDFD4]|\uD808[\uDC00-\uDF99]|\uD809[\uDC00-\uDC6E\uDC80-\uDD43]|\uD80B[\uDF90-\uDFF0]|[\uD80C\uD81C-\uD820\uD822\uD840-\uD868\uD86A-\uD86C\uD86F-\uD872\uD874-\uD879\uD880-\uD883][\uDC00-\uDFFF]|\uD80D[\uDC00-\uDC2E]|\uD811[\uDC00-\uDE46]|\uD81A[\uDC00-\uDE38\uDE40-\uDE5E\uDE60-\uDE69\uDE70-\uDEBE\uDEC0-\uDEC9\uDED0-\uDEED\uDF00-\uDF2F\uDF40-\uDF43\uDF50-\uDF59\uDF5B-\uDF61\uDF63-\uDF77\uDF7D-\uDF8F]|\uD81B[\uDE40-\uDE96\uDF00-\uDF4A\uDF50\uDF93-\uDF9F\uDFE0\uDFE1\uDFE3]|\uD821[\uDC00-\uDFF7]|\uD823[\uDC00-\uDCD5\uDD00-\uDD08]|\uD82B[\uDFF0-\uDFF3\uDFF5-\uDFFB\uDFFD\uDFFE]|\uD82C[\uDC00-\uDD22\uDD50-\uDD52\uDD64-\uDD67\uDD70-\uDEFB]|\uD82F[\uDC00-\uDC6A\uDC70-\uDC7C\uDC80-\uDC88\uDC90-\uDC99]|\uD834[\uDEE0-\uDEF3\uDF60-\uDF78]|\uD835[\uDC00-\uDC54\uDC56-\uDC9C\uDC9E\uDC9F\uDCA2\uDCA5\uDCA6\uDCA9-\uDCAC\uDCAE-\uDCB9\uDCBB\uDCBD-\uDCC3\uDCC5-\uDD05\uDD07-\uDD0A\uDD0D-\uDD14\uDD16-\uDD1C\uDD1E-\uDD39\uDD3B-\uDD3E\uDD40-\uDD44\uDD46\uDD4A-\uDD50\uDD52-\uDEA5\uDEA8-\uDEC0\uDEC2-\uDEDA\uDEDC-\uDEFA\uDEFC-\uDF14\uDF16-\uDF34\uDF36-\uDF4E\uDF50-\uDF6E\uDF70-\uDF88\uDF8A-\uDFA8\uDFAA-\uDFC2\uDFC4-\uDFCB\uDFCE-\uDFFF]|\uD837[\uDF00-\uDF1E]|\uD838[\uDD00-\uDD2C\uDD37-\uDD3D\uDD40-\uDD49\uDD4E\uDE90-\uDEAD\uDEC0-\uDEEB\uDEF0-\uDEF9]|\uD839[\uDFE0-\uDFE6\uDFE8-\uDFEB\uDFED\uDFEE\uDFF0-\uDFFE]|\uD83A[\uDC00-\uDCC4\uDCC7-\uDCCF\uDD00-\uDD43\uDD4B\uDD50-\uDD59]|\uD83B[\uDC71-\uDCAB\uDCAD-\uDCAF\uDCB1-\uDCB4\uDD01-\uDD2D\uDD2F-\uDD3D\uDE00-\uDE03\uDE05-\uDE1F\uDE21\uDE22\uDE24\uDE27\uDE29-\uDE32\uDE34-\uDE37\uDE39\uDE3B\uDE42\uDE47\uDE49\uDE4B\uDE4D-\uDE4F\uDE51\uDE52\uDE54\uDE57\uDE59\uDE5B\uDE5D\uDE5F\uDE61\uDE62\uDE64\uDE67-\uDE6A\uDE6C-\uDE72\uDE74-\uDE77\uDE79-\uDE7C\uDE7E\uDE80-\uDE89\uDE8B-\uDE9B\uDEA1-\uDEA3\uDEA5-\uDEA9\uDEAB-\uDEBB]|\uD83C[\uDD00-\uDD0C]|\uD83E[\uDFF0-\uDFF9]|\uD869[\uDC00-\uDEDF\uDF00-\uDFFF]|\uD86D[\uDC00-\uDF38\uDF40-\uDFFF]|\uD86E[\uDC00-\uDC1D\uDC20-\uDFFF]|\uD873[\uDC00-\uDEA1\uDEB0-\uDFFF]|\uD87A[\uDC00-\uDFE0]|\uD87E[\uDC00-\uDE1D]|\uD884[\uDC00-\uDF4A])[\s\S])/g,"").trim();o&&r.push({text:o,parentNode:t.parentNode,node:t})}var i=0;return r.flatMap((function(u){return u.text.split(" ").map((function(t){var n=i;return i++,{word:t,parentNode:u.parentNode,node:u.node,wordIndex:n}}))}))},findMatchingWords:function(u){var t,n,e=this,r=Math.min(this.textLinkData.mab,u.length/100*this.textLinkData.mde),o=1;return this.keywords.reduce((function(i,a){var D=u.filter((function(u){return u.word.toLowerCase()===a.keyword.toLowerCase()}));return D.length&&D.forEach((function(u){a.keyword===n&&u.parentNode===t?o++:o=1,n=a.keyword,t=u.parentNode;var D,c=i.length<r,l=!i.some((function(u){return u.keyword===a.keyword})),s=(D=u,i.every((function(u){return Math.abs(u.wordIndex-D.wordIndex)>e.textLinkData.mdi})));c&&l&&s&&i.push(y(y(y({},a),u),{},{occurenceIndex:o}))})),i}),[])},replaceMatchingWords:function(u){var t=this;u.forEach((function(u){var n=u.parentNode,e=new RegExp("\\b"+u.keyword+"\\b","gi"),r=0,o=x(n.childNodes).map((function(n){return n.nodeType===Node.TEXT_NODE?function(u,t,n,e){return u.replace(t,(function(u){return n()?e(u):u}))}(n.nodeValue,e,(function(){return++r===u.occurenceIndex}),(function(n){return t.getReplacementMarkup(n,t.getAdIdForMatch(u))})):n.outerHTML}));n.innerHTML=o.join("")}))},getAdIdForMatch:function(u){var t,n=null===(t=this.campaigns.find((function(t){return t.id===u.campaignId})))||void 0===t?void 0:t.ads,e=isNaN(this.usedAdCounter[u.campaignId])?0:this.usedAdCounter[u.campaignId]+1;return this.usedAdCounter[u.campaignId]=e,n[e%n.length].id},getReplacementMarkup:function(u,t){return'<em class="'.concat("bfammtl"," ").concat("bfammtl","--").concat(this.adLayout,'" data-bfamid="').concat(t,'">').concat(u,"</em>")},setLinkStyles:function(){var u=document.createElement("style");u.innerHTML=function(){var u=arguments.length>0&&void 0!==arguments[0]?arguments[0]:"default";return"\nem.bfammtl {\n    text-decoration: underline;\n    text-decoration-color: ".concat(i("textDecorationColor",u),";\n    text-decoration-thickness: 2px;\n    position: relative;\n    cursor: pointer;\n    white-space: nowrap;\n    font-style: normal;\n}\n\nem.bfammtl--accordion {\n    display: inline-block;\n    transition: margin-bottom 1s ease-in-out;\n}\n\niframe.bfamtlframe--layer {\n  border: 0;\n  z-index: 9999999999;\n  position: absolute;\n  top: 100%;\n  left: 50%;\n  transform: translateX(-50%);\n  width: min(460px, 90vw);\n  opacity: 0;\n  transition: opacity 0.1s ease-in-out;\n}\n\niframe.bfamtlframe.-initialized {\n  opacity: 1;\n}\n\nem.bfammtl--accordion .bfamtlframe__wrapper {\n  z-index: 10;\n  position: absolute;\n  overflow: hidden;\n  top: 100%;\n  left: 0;\n  width: 100%;\n  transition: opacity 0.1s ease-in-out, max-height 1s ease-in-out;\n  max-height: 0;\n}\n\niframe.bfamtlframe--accordion {\n  border: 0;\n  opacity: 0;\n  width: 100%;\n  transition: opacity 0.1s ease-in-out, max-height 1s ease-in-out;\n}\n\niframe.bfamtlframe:not([height]) {\n  height: 240px;\n}\n\n")}(this.colorScheme),document.head.appendChild(u)},bindEvents:function(){var u=this;this.targetElement.addEventListener("click",(function(t){var n=t.target.closest(".".concat("bfammtl"));n&&!n.classList.contains("".concat("bfammtl","--active"))&&u.handleKeywordClick(n)})),window.addEventListener("message",(function(t){"BFAMTLCONTROLLER:CLOSEIFRAME"===t.data&&u.activeIframe&&u.removeIframe()}))},handleKeywordClick:function(u){var t,n=u.dataset.bfamid,e=this.campaigns.flatMap((function(u){return u.ads})).find((function(u){return u.id===n}));e.sc=null===(t=this.campaigns.find((function(u){return u.ads.some((function(u){return u.id===n}))})))||void 0===t?void 0:t.sc,this.buildIframe(u,e)},buildIframe:function(u,t){var n=this,e=document.createElement("span");e.classList.add("".concat("bfamtlframe","__wrapper"));var r=document.createElement("iframe");r.classList.add("bfamtlframe","".concat("bfamtlframe","--").concat(this.adLayout)),r.srcdoc=g(y(y({},t),{},{colorScheme:this.colorScheme,layoutType:this.adLayout})),this.removeIframe(),e.appendChild(r),u.appendChild(e);var o=r.getBoundingClientRect(),i=u.getBoundingClientRect();if("layer"===this.adLayout)o.x<16?(r.style.left="0px",r.style.transform="translateX(".concat(-1*i.x,"px)")):window.innerWidth-o.right<16&&(r.style.left="auto",r.style.right="0px",r.style.transform="translateX(".concat(-1*(i.right-window.innerWidth),"px)"));else{for(var c=null,l=u;!c&&l.parentNode;){l=l.parentNode;var s=window.getComputedStyle(l).display;"block"!==s&&"flex"!==s&&"grid"!==s||(c=l)}var d,f=c.getBoundingClientRect(),F=Math.min(f.width,360),A=i.width/2-F/2,C="auto";f.left>i.left+A?d="".concat(f.left-i.left,"px"):f.right<i.right-A?(d="auto",C="".concat(-1*(f.right-i.right),"px")):d="".concat(A,"px"),e.style.width="".concat(F,"px"),e.style.left=d,e.style.right=C}this.activeIframe=r,u.classList.add("".concat("bfammtl","--active")),setTimeout((function(){var o=r.contentWindow.document.body.scrollHeight;r.height=o,r.classList.add("-initialized"),"accordion"===n.adLayout&&(u.style.marginBottom="".concat(o,"px"),e.style.maxHeight="".concat(o,"px")),function(u){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:document,n=!(arguments.length>2&&void 0!==arguments[2])||arguments[2],e=a(u).flatMap((function(u){var t=D(u,2),n=t[0];return t[1].map((function(u){return{clickUrl:u,type:"i"===n?"image":"javascript"}}))}));t.addEventListener("click",(function(t){var r=t.target.closest("a");if(r){var o=r.getAttribute("href"),i=r.getAttribute("target"),a={},D=r.getAttribute("data-label")||"NO_LABEL_SET";D&&(a["{LINKLABEL}"]=D);var c=!1;o&&(n&&window._adm_link_event&&window._adm_link_event(D),e.forEach((function(n){var e=document.createElement("image"===n.type?"img":"script");if(!i||"_self"===i){t.preventDefault();var r=function u(){c=!0,location.href=o,window.clearTimeout(D),e.removeEventListener("load",u)},D=window.setTimeout(r,2e3);e.addEventListener("load",(function(){u.shift(),u.length||c||r()}))}e.src=p(n.clickUrl,a),"javascript"===n.type&&document.head.appendChild(e)})))}}))}(t.ct,r.contentWindow.document)}),50)},removeIframe:function(){if(this.activeIframe){var u=this.activeIframe.parentNode,t=u.closest(".".concat("bfammtl"));this.activeIframe=null;var n=function(){u.remove(),t.classList.remove("".concat("bfammtl","--active"))};"accordion"===this.adLayout?(u.addEventListener("transitionend",n),t.style.marginBottom="0px",u.style.maxHeight="0px"):n()}}}).init()}});