(()=>{"use strict";var e={};e.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}();var t="cc_dm";const r={tagConfigUrl:"https://bid.mbidtg.com/tags",version:"3.145.0",devModeQueryStringParameter:t,adManagerWindowNamespace:"AdManager",helpersWindowNamespace:"_CAdM",overrideConfigWindowNamespace:"__adm_override",tagIdIdentifier:"data-admpid",clickIdIdentifier:"data-clickId",noAutostartIdentifier:"data-admman",customDomainIdentifier:"data-custom-domain",devMode:window.location.search.includes("".concat(t,"=1")),auctionUrl:"https://ssp.zog.link/get/",initTrackingUrl:"https://metricswpsh.com",subCookieName:"source",subQueryStringKey1:"promo",subQueryStringKey2:"source",vastProxyAuctionRoute:"/a/",vastProxyWrappedUrlPath:"/c/",adManagerTrackingProxyPath:"/api/track",sentryDSNUrl:"https://6e553de7affd4ffbbfbe183bbeed336c@sentry.infra.infrapu.sh/43",buildEnv:"production",buildUrl:"https://js.mbidadm.com/static/scripts",isMB:!!parseInt("1",10),isOnCl:!!parseInt("0",10),sharedStorageUrl:"https://storage.mbidstorage.com/log/count.html",keywordsServiceUrl:"https://mbdippex.com/keywords",cabsId:parseInt("3",10),utmSource:"data-utm-source",utmMedium:"data-utm-medium",utmContent:"data-utm-content",utmCampaign:"data-utm-campaign"};class n{constructor(e){var t=arguments.length>1&&void 0!==arguments[1]&&arguments[1];this.logPrefix=e,this.silentMode=t}info(){for(var e=arguments.length,t=new Array(e),r=0;r1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length-1;if(!e.length||t>r)return null;var n=e.slice(t,r+1);return n[Math.floor(Math.random()*n.length)]}function o(e){return new Promise((t=>{e||t({status:"error"});var r=new Image;r.crossOrigin="anonymous",r.src=e,r.onload=()=>t({status:"ok"}),r.onerror=()=>t({status:"error"})}))}function a(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:250,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:2e3;return new Promise((n=>{var i=0,o=setInterval((()=>{try{var a=document.querySelectorAll(e);a&&(clearInterval(o),n(a)),(i+=t)>=r&&(clearInterval(o),n(null))}catch(e){clearInterval(o),n(null)}}),t)}))}function s(e){return"[object Array]"===Object.prototype.toString.call(e)}function c(e){return null!==e&&"object"==typeof e}function u(e){if("[object Object]"!==Object.prototype.toString.call(e))return!1;var t=Object.getPrototypeOf(e);return null===t||t===Object.prototype}function l(e,t){if(null!=e)if("object"!=typeof e&&(e=[e]),s(e))for(var r=0,n=e.length;r0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1?arguments[1]:void 0;return Math.floor(Math.random()*(t-e)+e)}var f=function(){return f=Object.assign||function(e){for(var t,r=1,n=arguments.length;r0&&i[i.length-1])||6!==s[0]&&2!==s[0])){o=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]=i+r?(i=a,[4,w(0)]):[3,3]):[3,4];case 2:s.sent(),s.label=3;case 3:return++o,[3,1];case 4:return[2,n]}}))}))}function S(e){e.then(void 0,(function(){}))}function k(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var r=[0,0,0,0];return r[3]+=e[3]+t[3],r[2]+=r[3]>>>16,r[3]&=65535,r[2]+=e[2]+t[2],r[1]+=r[2]>>>16,r[2]&=65535,r[1]+=e[1]+t[1],r[0]+=r[1]>>>16,r[1]&=65535,r[0]+=e[0]+t[0],r[0]&=65535,[r[0]<<16|r[1],r[2]<<16|r[3]]}function _(e,t){e=[e[0]>>>16,65535&e[0],e[1]>>>16,65535&e[1]],t=[t[0]>>>16,65535&t[0],t[1]>>>16,65535&t[1]];var r=[0,0,0,0];return r[3]+=e[3]*t[3],r[2]+=r[3]>>>16,r[3]&=65535,r[2]+=e[2]*t[3],r[1]+=r[2]>>>16,r[2]&=65535,r[2]+=e[3]*t[2],r[1]+=r[2]>>>16,r[2]&=65535,r[1]+=e[1]*t[3],r[0]+=r[1]>>>16,r[1]&=65535,r[1]+=e[2]*t[2],r[0]+=r[1]>>>16,r[1]&=65535,r[1]+=e[3]*t[1],r[0]+=r[1]>>>16,r[1]&=65535,r[0]+=e[0]*t[3]+e[1]*t[2]+e[2]*t[1]+e[3]*t[0],r[0]&=65535,[r[0]<<16|r[1],r[2]<<16|r[3]]}function A(e,t){return 32===(t%=64)?[e[1],e[0]]:t<32?[e[0]<>>32-t,e[1]<>>32-t]:(t-=32,[e[1]<>>32-t,e[0]<>>32-t])}function C(e,t){return 0===(t%=64)?e:t<32?[e[0]<>>32-t,e[1]<>>1]),e=x(e=_(e,[4283543511,3981806797]),[0,e[0]>>>1]),e=x(e=_(e,[3301882366,444984403]),[0,e[0]>>>1])}function I(e){return parseInt(e)}function O(e){return parseFloat(e)}function P(e,t){return"number"==typeof e&&isNaN(e)?t:e}function E(e){return e.reduce((function(e,t){return e+(t?1:0)}),0)}function N(e){return e&&"object"==typeof e&&"message"in e?e:{message:e}}function D(e,t,r){var n=Object.keys(e).filter((function(e){return!function(e,t){for(var r=0,n=e.length;r=4}function L(){var e=window,t=navigator;return E(["webkitPersistentStorage"in t,"webkitTemporaryStorage"in t,0===t.vendor.indexOf("Google"),"webkitResolveLocalFileSystemURL"in e,"BatteryManager"in e,"webkitMediaStream"in e,"webkitSpeechGrammar"in e])>=5}function F(){var e=window,t=navigator;return E(["ApplePayError"in e,"CSSPrimitiveValue"in e,"Counter"in e,0===t.vendor.indexOf("Apple"),"getStorageUpdates"in t,"WebKitMediaKeys"in e])>=4}var H={default:[],apple:[{font:"-apple-system-body"}],serif:[{fontFamily:"serif"}],sans:[{fontFamily:"sans-serif"}],mono:[{fontFamily:"monospace"}],min:[{fontSize:"1px"}],system:[{fontFamily:"system-ui"}]};var B={fonts:function(){var e=this;return j((function(t,r){return m(e,[t,r],void 0,(function(e,t){var r,n,i,o,a,s,c,u,l,d,p,h=t.document;return v(this,(function(e){switch(e.label){case 0:return(r=h.body).style.fontSize="48px",(n=h.createElement("div")).style.setProperty("visibility","hidden","important"),i={},o={},a=function(e){var t=h.createElement("span"),r=t.style;return r.position="absolute",r.top="0",r.left="0",r.fontFamily=e,t.textContent="mmMwWLliI0O&1",n.appendChild(t),t},s=function(e,t){return a("'".concat(e,"',").concat(t))},c=function(){for(var e={},t=function(t){e[t]=M.map((function(e){return s(t,e)}))},r=0,n=R;r')}((function(e,t){for(var r={},n={},i=0,o=Object.keys(H);i=3||r.push(t.languages);else if("string"==typeof t.languages){var i=t.languages;i&&r.push(i.split(","))}return r},colorDepth:function(){return window.screen.colorDepth},deviceMemory:function(){return P(O(navigator.deviceMemory),void 0)},screenResolution:function(){var e=screen,t=function(e){return P(I(e),null)},r=[t(e.width),t(e.height)];return r.sort().reverse(),r},hardwareConcurrency:function(){return P(I(navigator.hardwareConcurrency),void 0)},timezone:function(){var e,t=null===(e=window.Intl)||void 0===e?void 0:e.DateTimeFormat;if(t){var r=(new t).resolvedOptions().timeZone;if(r)return r}var n,i=(n=(new Date).getFullYear(),-Math.max(O(new Date(n,0,1).getTimezoneOffset()),O(new Date(n,6,1).getTimezoneOffset())));return"UTC".concat(i>=0?"+":"").concat(Math.abs(i))},sessionStorage:function(){try{return!!window.sessionStorage}catch(e){return!0}},localStorage:function(){try{return!!window.localStorage}catch(e){return!0}},indexedDB:function(){var e,t;if(!(U()||(e=window,t=navigator,E(["msWriteProfilerMark"in e,"MSStream"in e,"msLaunchUri"in t,"msSaveBlob"in t])>=3&&!U())))try{return!!window.indexedDB}catch(e){return!0}},platform:function(){var e,t=navigator.platform;return"MacIntel"!==t||!F()||E(["safari"in(e=window),!("DeviceMotionEvent"in e),!("ongestureend"in e),!("standalone"in navigator)])>=3?t:function(){if("iPad"===navigator.platform)return!0;var e=screen,t=e.width/e.height;return E(["MediaSource"in window,!!Element.prototype.webkitRequestFullscreen,t>.65&&t<1.53])>=2}()?"iPad":"iPhone"},plugins:function(){var e=navigator.plugins;if(e){for(var t=[],r=0;r=4}()?null:r.getExtension("WEBGL_debug_renderer_info");return n?null===(t=r.getParameter(n.UNMASKED_RENDERER_WEBGL))||void 0===t?void 0:t.toString():""}};function q(e){return JSON.stringify(e,(function(e,t){return t instanceof Error?f({name:(r=t).name,message:r.message,stack:null===(n=r.stack)||void 0===n?void 0:n.split("\n")},r):t;var r,n}),2)}function z(e){return function(e,t){t=t||0;var r,n=(e=e||"").length%16,i=e.length-n,o=[0,t],a=[0,t],s=[0,0],c=[0,0],u=[2277735313,289559509],l=[1291169091,658871167];for(r=0;r>>0).toString(16)).slice(-8)+("00000000"+(o[1]>>>0).toString(16)).slice(-8)+("00000000"+(a[0]>>>0).toString(16)).slice(-8)+("00000000"+(a[1]>>>0).toString(16)).slice(-8)}(function(e){for(var t="",r=0,n=Object.keys(e).sort();r'
'))).join(""),t.setAttribute("style","width: 1px !important; height: 1px !important; position: absolute !important; left: -10000px !important; top: -1000px !important;"),document.body.appendChild(t),e))if(!document.querySelector("#".concat(r)))return!0;return!1}();return document.querySelectorAll("._adbchkr").forEach((e=>document.body.removeChild(e))),e}function Y(){return $.apply(this,arguments)}function $(){var e;return e=function*(){var{useScriptLoadCheck:e=!0}=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};if(window.self!==window.top)return!1;var t=K(),r=e&&(yield new Promise((e=>{var t=document.createElement("script");t.async=!0,t.src="https://js.capndr.com/advertising.js";var r=setTimeout((()=>{t.onerror=null,e(!1)}),4e3);t.onload=()=>{clearTimeout(r),e(!1)},t.onerror=()=>{clearTimeout(r),e(!0)},document.head.appendChild(t)})));return r||t},$=function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){J(o,n,i,a,s,"next",e)}function s(e){J(o,n,i,a,s,"throw",e)}a(void 0)}))},$.apply(this,arguments)}function Q(e){return"string"==typeof e}var X={write:function(e,t,r,n,i,o){var a=[];a.push("".concat(e,"=").concat(encodeURIComponent(t))),"number"==typeof r&&a.push("expires="+new Date(r).toUTCString()),Q(n)&&a.push("path="+n),Q(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}};function Z(e){var t,r="0123456789abcdef";function n(e){var t,n="";for(t=0;t<=3;t++)n+=r.charAt(e>>8*t+4&15)+r.charAt(e>>8*t&15);return n}function i(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function o(e,t,r,n,o,a){return i(function(e,t){return e<>>32-t}(i(i(t,e),i(n,a)),o),r)}function a(e,t,r,n,i,a,s){return o(t&r|~t&n,e,t,i,a,s)}function s(e,t,r,n,i,a,s){return o(t&n|r&~n,e,t,i,a,s)}function c(e,t,r,n,i,a,s){return o(t^r^n,e,t,i,a,s)}function u(e,t,r,n,i,a,s){return o(r^(t|~n),e,t,i,a,s)}var l,d,p,h,f=function(e){var t,r=1+(e.length+8>>6),n=new Array(16*r);for(t=0;t<16*r;t++)n[t]=0;for(t=0;t>2]|=e.charCodeAt(t)<>2]|=128<localStorage.setItem(e,t),get:e=>localStorage.getItem(e),remove:e=>localStorage.removeItem(e)};try{te.set("__try",1),te.get("__try"),te.remove("__try")}catch(e){te=ee}var re=te;class ne{constructor(){this.localStoreKey="_ytbaсс",this.betweenUpdateDelayMins=60,this.authStatus=!1,this.nextUpdate=null}lazyAccountCheck(){return!!this.authStatus||(this.detectYouTubeAuth().then((e=>{this.setYoutubeAuthMarker(e,e?null:Date.now())})).catch((()=>null)),!1)}setYoutubeAuthMarker(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null;this.authStatus=e,this.nextUpdate=t,re.set(this.localStoreKey,JSON.stringify({authStatus:e,nextUpdate:t}))}isUpdatePossible(){return!this.nextUpdate||function(e,t){if(!e||!t)return null;var r=60*t*1e3;return Date.now()-e>r}(this.nextUpdate,this.betweenUpdateDelayMins)}loadYoutubeAuthMarker(){var e=re.get(this.localStoreKey);if(e)try{var t=JSON.parse(e);this.authStatus=t.authStatus,this.nextUpdate=t.nextUpdate}catch(e){}}detectYouTubeAuth(){var e=document.createElement("img");return e.referrerPolicy="no-referrer",e.src="https://accounts.google.com/ServiceLogin?passive=true&continue=https%3A%2F%2Fm.youtube.com%2Ffavicon.ico&uilel=3&hl=en&service=youtube",new Promise((t=>{e.onload=()=>{t(!0)},e.onerror=()=>{t(!1)}}))}}function ie(e){var t,r="0123456789abcdef";function n(e){var t,n="";for(t=0;t<=3;t++)n+=r.charAt(e>>8*t+4&15)+r.charAt(e>>8*t&15);return n}function i(e,t){var r=(65535&e)+(65535&t);return(e>>16)+(t>>16)+(r>>16)<<16|65535&r}function o(e,t,r,n,o,a){return i(function(e,t){return e<>>32-t}(i(i(t,e),i(n,a)),o),r)}function a(e,t,r,n,i,a,s){return o(t&r|~t&n,e,t,i,a,s)}function s(e,t,r,n,i,a,s){return o(t&n|r&~n,e,t,i,a,s)}function c(e,t,r,n,i,a,s){return o(t^r^n,e,t,i,a,s)}function u(e,t,r,n,i,a,s){return o(r^(t|~n),e,t,i,a,s)}var l,d,p,h,f=function(e){var t,r=1+(e.length+8>>6),n=new Array(16*r);for(t=0;t<16*r;t++)n[t]=0;for(t=0;t>2]|=e.charCodeAt(t)<>2]|=128<localStorage.setItem(e,t),get:e=>localStorage.getItem(e),remove:e=>localStorage.removeItem(e)};try{ue.set("__try",1),ue.get("__try"),ue.remove("__try")}catch(e){ue=ce}var le=ue;class de{constructor(e){this.iframeUrl=e,this.iframe=null,this.iframeLoaded=!1,this.eventsQueue=[],this.messagesQueue={}}init(){this.iframe=document.createElement("iframe"),this.iframe.style.display="none",this.iframe.src=this.iframeUrl,document.body.appendChild(this.iframe),this.iframe.onload=()=>{this.iframeLoaded=!0,this.eventsQueue.forEach((e=>{this.iframe.contentWindow.postMessage(e,"*")})),this.eventsQueue=[]},window.addEventListener("message",(e=>this.handleIframeResponse(e.data)))}handleIframeResponse(e){var{messageId:t,value:r}=e;t&&this.messagesQueue[t]&&(this.messagesQueue[t].resolve(r),clearTimeout(this.messagesQueue[t].rejectTimeout),delete this.messagesQueue[t])}send(e,t,r){return new Promise(((n,i)=>{var o=(Math.random()+1).toString(36).substring(5);this.iframeLoaded?this.iframe.contentWindow.postMessage({action:e,messageId:o,key:t,value:r},"*"):this.eventsQueue.push({action:e,messageId:o,key:t,value:r}),this.messagesQueue[o]={resolve:e=>n(e),rejectTimeout:setTimeout((()=>i(new Error("iFrame did not respond"))),50)}}))}set(e,t){var r=this;return se((function*(){le.set(e,JSON.stringify(t)),yield r.send("SET",e,t)}))()}get(e){var t=this;return se((function*(){return yield t.synchronize(e)}))()}remove(e){var t=this;return se((function*(){le.remove(e),yield t.send("REMOVE",e),yield t.synchronize(e)}))()}clear(){return this.send("CLEAR")}synchronize(e){var t=this;return se((function*(){var r,n;try{r=yield t.send("GET",e);var i=le.get(e)||null;n=i?JSON.parse(i):null}catch(e){n=null}if(!r&&n){try{yield t.send("SET",e,n)}catch(e){}return n}return r?(le.set(e,JSON.stringify(r)),r):null}))()}}function pe(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,i)}function he(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){pe(o,n,i,a,s,"next",e)}function s(e){pe(o,n,i,a,s,"throw",e)}a(void 0)}))}}function fe(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function me(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 ve(e){for(var t=1;t{var o="".concat(e).concat(r,"=").concat(encodeURIComponent(t[r]));return n!==i.length-1&&(o+="&"),o}),"");return"".concat(e,"?").concat(r)}(c,e.params),!0),s.timeout=e.timeout,s.onreadystatechange=function(){if(s&&4===s.readyState&&(0!==s.status||s.responseURL&&0===s.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in s?s.getAllResponseHeaders().split("\r\n").reduce(((e,t)=>{var[r,n]=t.split(": ");return r?ve(ve({},e),{},{[null==r?void 0:r.toLowerCase()]:n}):e}),{}):null,i={data:e.responseType&&"text"!==e.responseType?s.response:s.responseText,status:s.status,statusText:s.statusText,headers:n,config:e,request:s};!function(e,t,r){!r.status||r.status>=200&&r.status<300?e(r):t(ge("Request failed with status code "+r.status,r.config,null,r.request,r))}(t,r,i),s=null}},s.onabort=function(){s&&(r(ge("Request aborted",e,"ECONNABORTED",s)),s=null)},s.onerror=function(){r(ge("Network Error",e,null,s)),s=null},s.ontimeout=function(){var t="timeout of ".concat(e.timeout,"ms exceeded");e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(ge(t,e,"ECONNABORTED",s)),s=null},"setRequestHeader"in s&&we(a,(function(e,t){void 0===o&&"content-type"===t.toLowerCase()?delete a[t]:s.setRequestHeader(t,e)})),void 0!==e.withCredentials&&(s.withCredentials=!!e.withCredentials),e.responseType)try{s.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}o||(o=null),s.send(o)}))}function ye(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}var Se=new class{constructor(e){this.defaults={timeout:0}}dispatchRequest(e){var t;return null!==(t=e.data)&&"object"==typeof t&&(e.headers||(e.headers={}),e.headers["Content-Type"]="application/json;charset=utf-8",e.data=JSON.stringify(e.data)),be(e).then((function(e){return e.data=ye(e.data),e}),(function(e){return e&&e.response&&(e.response.data=ye(e.response.data)),Promise.reject(e)}))}get(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.dispatchRequest(ve(ve({},t),{},{url:e,method:"get"}))}post(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.dispatchRequest(ve(ve({},r),{},{url:e,method:"post",data:r.data?r.data:t}))}},ke="_kwrds",_e={keywords:{},pages_count:0};class Ae{constructor(e){this.keywordsHistory=_e,this.sharedStorage=e}mapForAuction(e){var t={keywords:[],pages_count:e.pages_count};return t.keywords=Object.keys(e.keywords).map((t=>({keyword:t,counter:e.keywords[t].length||0}))),t}mapForManager(e){var t=Date.now();return{keywords:e.reduce(((e,r)=>(e[r]||(e[r]=[]),e[r].push(t),e)),{}),pages_count:1}}filterHistoryFromExpired(e){var t=new Set,{keywords:r}=e;return Object.keys(r).forEach((e=>{var n=r[e];r[e]=n.filter((e=>{var r=e+2592e5{var[t,n]=e;r[t]||(r[t]=[]),r[t].push(...n)})),r}getCurrentHistory(){var e=this;return he((function*(){if(!e.keywordsHistory.pages_count){var t=yield e.getFromStorage();e.keywordsHistory=t}return e.mapForAuction(e.keywordsHistory)}))()}asyncProcessKeywords(e,t,r){var n=this;return he((function*(){try{var i=yield n.getFromAuctionAndMap(e,t,r),o=yield n.getFromStorage(),a=n.mergeKeywords(o.keywords,i.keywords),s=o.pages_count+i.pages_count;n.keywordsHistory={keywords:a,pages_count:s},n.sharedStorage.set(ke,JSON.stringify(n.keywordsHistory)).catch((()=>null))}catch(e){return null}}))()}getFromStorage(){var e=this;return he((function*(){var t,r=yield e.sharedStorage.get(ke).catch((()=>null));try{t=JSON.parse(r)||_e,t=e.filterHistoryFromExpired(t)}catch(e){t=_e}return t}))()}getFromAuctionAndMap(e,t,r){var n=this;return he((function*(){var{data:i}=yield Se.post(e,{ad_tags:t,page:r}).catch((()=>({}))),o=_e;return i&&i.keywords&&i.keywords.length&&(o=n.mapForManager(i.keywords)),o}))()}}var Ce=new class{constructor(){this.state={}}set(e,t){this.state[e]=t}get(e){return this.state[e]||null}remove(e){delete this.state[e]}},xe={set:(e,t)=>localStorage.setItem(e,t),get:e=>localStorage.getItem(e),remove:e=>localStorage.removeItem(e)};try{xe.set("__try",1),xe.get("__try"),xe.remove("__try")}catch(e){xe=Ce}var Te=xe;const Ie="t_v_a";function Oe(){return function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:0,r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:e.length-1;if(!e.length||t>r)return null;var n=e.slice(t,r+1);return n[Math.floor(Math.random()*n.length)]}(["a","b","c","d"])}function Pe(){const e=function(e,t){var r;try{r=JSON.parse(e||"".concat(t))}catch(e){r=t}return r}(Te.get(Ie),null);if(e&&e.ttl+6048e5>Date.now())return e.version;const t=Oe();return Te.set(Ie,JSON.stringify({version:t,ttl:Date.now()})),t}function Ee(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,i)}function Ne(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function De(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 je(e){for(var t=1;tsessionStorage.setItem(e,t),get:e=>sessionStorage.getItem(e),remove:e=>sessionStorage.removeItem(e)};try{qe.set("__try",1),qe.get("__try"),qe.remove("__try")}catch(e){qe=Be}var ze=qe;var Ve="undefined"!=typeof globalThis?globalThis:"undefined"!=typeof window?window:void 0!==e.g?e.g:"undefined"!=typeof self?self:{};var Ge,We,Je=(Ge=function(e,t){!function(r,n){var i="function",o="undefined",a="object",s="string",c="major",u="model",l="name",d="type",p="vendor",h="version",f="architecture",m="console",v="mobile",g="tablet",w="smarttv",b="wearable",y="embedded",S="Amazon",k="Apple",_="ASUS",A="BlackBerry",C="Browser",x="Chrome",T="Firefox",I="Google",O="Huawei",P="LG",E="Microsoft",N="Motorola",D="Opera",j="Samsung",M="Sharp",R="Sony",U="Xiaomi",L="Zebra",F="Facebook",H="Chromium OS",B="Mac OS",q=" Browser",z=function(e){for(var t={},r=0;r0?2===c.length?typeof c[1]==i?this[c[0]]=c[1].call(this,l):this[c[0]]=c[1]:3===c.length?typeof c[1]!==i||c[1].exec&&c[1].test?this[c[0]]=l?l.replace(c[1],c[2]):n:this[c[0]]=l?c[1].call(this,l,c[2]):n:4===c.length&&(this[c[0]]=l?c[3].call(this,l.replace(c[1],c[2])):n):this[c]=l||n;d+=2}},K=function(e,t){for(var r in t)if(typeof t[r]===a&&t[r].length>0){for(var i=0;i2&&(e[u]="iPad",e[d]=g),e},this.getEngine=function(){var e={};return e[l]=n,e[h]=n,J.call(e,w,y.engine),e},this.getOS=function(){var e={};return e[l]=n,e[h]=n,J.call(e,w,y.os),S&&!e[l]&&b&&b.platform&&"Unknown"!=b.platform&&(e[l]=b.platform.replace(/chrome os/i,H).replace(/macos/i,B)),e},this.getResult=function(){return{ua:this.getUA(),browser:this.getBrowser(),engine:this.getEngine(),os:this.getOS(),device:this.getDevice(),cpu:this.getCPU()}},this.getUA=function(){return w},this.setUA=function(e){return w=typeof e===s&&e.length>500?W(e,500):e,this},this.setUA(w),this};Q.VERSION="1.0.39",Q.BROWSER=z([l,h,c]),Q.CPU=z([f]),Q.DEVICE=z([u,p,d,m,v,w,g,b,y]),Q.ENGINE=Q.OS=z([l,h]),e.exports&&(t=e.exports=Q),t.UAParser=Q;var X=typeof r!==o&&(r.jQuery||r.Zepto);if(X&&!X.ua){var Z=new Q;X.ua=Z.getResult(),X.ua.get=function(){return Z.getUA()},X.ua.set=function(e){Z.setUA(e);var t=Z.getResult();for(var r in t)X.ua[r]=t[r]}}}("object"==typeof window?window:Ve)},Ge(We={exports:{}},We.exports),We.exports);var Ke={write:function(e,t,r,n,i,o){var a=[];a.push("".concat(e,"=").concat(encodeURIComponent(t))),"number"==typeof r&&a.push("expires="+new Date(r).toUTCString()),Ue(n)&&a.push("path="+n),Ue(i)&&a.push("domain="+i),!0===o&&a.push("secure"),document.cookie=a.join("; ")},read:function(e){var t=document.cookie.match(new RegExp("(^|;\\s*)("+e+")=([^;]*)"));return t?decodeURIComponent(t[3]):null},remove:function(e){this.write(e,"",Date.now()-864e5)}},Ye="source",$e="promo",Qe="source",Xe="pubsource";var Ze="_adm_erd",et="_adm_erdso";function tt(e,t){var r;try{r=window.top!==window&&window.location.origin===window.top.location.origin&&3826===t}catch(e){r=!1}Ze=r?et:Ze;var{referrer:n}=document,i=e.getItem(Ze),o=n.split("/")[2]||"",a="";return a=""===i||i?i:o,e.setItem(Ze,a),a}var rt=new He,nt={set:(e,t)=>localStorage.setItem(e,t),get:e=>localStorage.getItem(e),remove:e=>localStorage.removeItem(e)};try{nt.set("__try",1),nt.get("__try"),nt.remove("__try")}catch(e){nt=rt}var it=nt;function ot(){var e="cb_gyro",t=it.get(e)||0;return t||window.addEventListener("deviceorientation",(t=>{null!==t.alpha&&it.set(e,1)})),Number(t)}function at(e){var t,r;return{plugins:(null===(t=e.components.plugins.value)||void 0===t?void 0:t.reduce(((e,t)=>(e.push(t.name),e)),[]))||[],languages:(null===(r=e.components.languages.value)||void 0===r?void 0:r.reduce(((e,t)=>(t.forEach((t=>{e.includes(t)||e.push(t)})),e)),[]))||[],fonts:e.components.fonts.value||[],fontPreferences:e.components.fontPreferences.value||{},platform:e.components.platform.value||"",colorDepth:e.components.colorDepth.value||0,deviceMemory:e.components.deviceMemory.value||0,hardwareConcurrency:e.components.hardwareConcurrency.value||0,indexedDB:e.components.indexedDB.value||!1,sessionStorage:e.components.sessionStorage.value||!1,localStorage:e.components.localStorage.value||!1,cookiesEnabled:e.components.cookiesEnabled.value||!1,colorGamut:e.components.colorGamut.value||""}}function st(e,t,r,n,i){var o=new Error(e);return o.config=t,r&&(o.code=r),o.request=n,o.response=i,o.isHttpError=!0,o.toJSON=function(){return{message:this.message,name:this.name,description:this.description,number:this.number,fileName:this.fileName,lineNumber:this.lineNumber,columnNumber:this.columnNumber,stack:this.stack,config:this.config,code:this.code}},o}function ct(e){return new Promise((function(t,r){var n,i,o=e.data,a=e.headers,s=new XMLHttpRequest,c=(n=e.baseURL,i=e.url,n&&!function(e){return/^([a-z][a-z\d\\+\-\\.]*:)?\/\//i.test(e)}(i)?function(e,t){return t?e.replace(/\/+$/,"")+"/"+t.replace(/^\/+/,""):e}(n,i):i);if(s.open(e.method.toUpperCase(),function(e,t){if(!t)return e;var r=Object.keys(t).reduce(((e,r,n,i)=>{var o="".concat(e).concat(r,"=").concat(encodeURIComponent(t[r]));return n!==i.length-1&&(o+="&"),o}),"");return"".concat(e,"?").concat(r)}(c,e.params),!0),s.timeout=e.timeout,s.onreadystatechange=function(){if(s&&4===s.readyState&&(0!==s.status||s.responseURL&&0===s.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in s?s.getAllResponseHeaders().split("\r\n").reduce(((e,t)=>{var[r,n]=t.split(": ");return r?je(je({},e),{},{[null==r?void 0:r.toLowerCase()]:n}):e}),{}):null,i={data:e.responseType&&"text"!==e.responseType?s.response:s.responseText,status:s.status,statusText:s.statusText,headers:n,config:e,request:s};!function(e,t,r){!r.status||r.status>=200&&r.status<300?e(r):t(st("Request failed with status code "+r.status,r.config,null,r.request,r))}(t,r,i),s=null}},s.onabort=function(){s&&(r(st("Request aborted",e,"ECONNABORTED",s)),s=null)},s.onerror=function(){r(st("Network Error",e,null,s)),s=null},s.ontimeout=function(){var t="timeout of ".concat(e.timeout,"ms exceeded");e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(st(t,e,"ECONNABORTED",s)),s=null},"setRequestHeader"in s&&Le(a,(function(e,t){void 0===o&&"content-type"===t.toLowerCase()?delete a[t]:s.setRequestHeader(t,e)})),void 0!==e.withCredentials&&(s.withCredentials=!!e.withCredentials),e.responseType)try{s.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}o||(o=null),s.send(o)}))}function ut(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}var lt=new class{constructor(e){this.defaults={timeout:0}}dispatchRequest(e){var t;return null!==(t=e.data)&&"object"==typeof t&&(e.headers||(e.headers={}),e.headers["Content-Type"]="application/json;charset=utf-8",e.data=JSON.stringify(e.data)),ct(e).then((function(e){return e.data=ut(e.data),e}),(function(e){return e&&e.response&&(e.response.data=ut(e.response.data)),Promise.reject(e)}))}get(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.dispatchRequest(je(je({},t),{},{url:e,method:"get"}))}post(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.dispatchRequest(je(je({},r),{},{url:e,method:"post",data:r.data?r.data:t}))}};function dt(e,t){if(!e||!t)return null;var r=60*t*1e3;return Date.now()-e>r}function pt(){return new Promise((function(e,t){var r,n,i="Unknown";function o(t){e({isPrivate:t,browserName:i})}function a(e){return e===eval.toString().length}function s(){void 0!==navigator.maxTouchPoints?function(){try{var e=window.indexedDB.open("test",1);e.onupgradeneeded&&(e.onupgradeneeded=function(e){var t=e.target.result;try{t.createObjectStore("test",{autoIncrement:!0}).put(new Blob),o(!1)}catch(e){/BlobURLs are not yet supported/.test(e.message)?o(!0):o(!1)}}),o(!1)}catch(e){o(!1)}}():function(){var e=window.openDatabase,t=window.localStorage;try{e(null,null,null,null)}catch(e){return o(!0)}try{t.setItem("test","1"),t.removeItem("test")}catch(e){return o(!0)}o(!1)}()}function c(){navigator.webkitTemporaryStorage.queryUsageAndQuota((function(e,t){var r;o(t<(void 0!==(r=window).performance&&void 0!==r.performance.memory&&void 0!==r.performance.memory.jsHeapSizeLimit?performance.memory.jsHeapSizeLimit:1073741824))}),(function(e){t(new Error("detectIncognito somehow failed to query storage quota: "+e.message))}))}function u(){void 0!==Promise&&void 0!==Promise.allSettled?c():(0,window.webkitRequestFileSystem)(0,1,(function(){o(!1)}),(function(){o(!0)}))}void 0!==(n=navigator.vendor)&&0===n.indexOf("Apple")&&a(37)?(i="Safari",s()):function(){var e=navigator.vendor;return void 0!==e&&0===e.indexOf("Google")&&a(33)}()?(r=navigator.userAgent,i=r.match(/Chrome/)?void 0!==navigator.brave?"Brave":r.match(/Edg/)?"Edge":r.match(/OPR/)?"Opera":"Chrome":"Chromium",u()):void 0!==document.documentElement&&void 0!==document.documentElement.style.MozAppearance&&a(37)?(i="Firefox",o(void 0===navigator.serviceWorker)):void 0!==navigator.msSaveBlob&&a(39)?(i="Internet Explorer",o(void 0===window.indexedDB)):t(new Error("detectIncognito cannot determine the browser"))}))}var ht="__adm-vid",ft="__adm-vid_new",mt=10080;function vt(){var e;return e=function*(e,t,r){var n=window.Intl&&Intl.DateTimeFormat().resolvedOptions().timeZone,i=yield pt();try{var o,{browserFamily:a,browserName:s}=function(e){var t=e.browser.name||"",r=(e.browser.version||"").split(".")[0];return{browserFamily:t,browserName:"".concat(t," ").concat(r).trim()}}(r),c=window.devicePixelRatio||-1,u=yield lt.post("https://fp.metricswpsh.com/fp?tag_id=".concat(e),je(je({timezoneOlson:n,incognito:i.isPrivate},t.components),{},{brand:r.device.vendor||"",device:r.device.model||"",os_type:r.device.type,os_family:r.os.name,front_browser_family:a,front_browser_name:s,pixel_ratio:c}),{withCredentials:!0});return{fp:u.data.fp,fp_str:(null==u||null===(o=u.data)||void 0===o?void 0:o.fp_str)||""}}catch(e){return console.warn(e),null}},vt=function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){Ee(o,n,i,a,s,"next",e)}function s(e){Ee(o,n,i,a,s,"throw",e)}a(void 0)}))},vt.apply(this,arguments)}function gt(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:0,t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n=function(){var e=JSON.parse(it.get(ht)),t=JSON.parse(it.get(ft));return t&&!dt(t.createdAt,mt)?{fp:t.fpValue,fp_str:t.fpValueStr||""}:e&&"object"==typeof e.fpValue&&null!==e.fpValue&&!dt(e.createdAt,mt)?{fp:e.fpValue.fp,fp_str:e.fpValue.fp_str||""}:e&&"number"==typeof e.fpValue&&!dt(e.createdAt,mt)?{fp:e.fpValue,fp_str:e.fpValueStr||""}:null}();return n||function(e,t,r){return vt.apply(this,arguments)}(e,t,r).then((e=>{return t=e,it.remove(ht),void it.set(ft,JSON.stringify({fpValue:t.fp,fpValueStr:t.fp_str,createdAt:Date.now()}));var t})),n}var wt={utm_source:"utm1",utm_medium:"utm2",utm_campaign:"utm3",utm_content:"utm4",campaign:"camp"};function bt(e){return function(e){try{return new URL(e),!0}catch(e){return!1}}(e)&&"t.co"===new URL(e).hostname.toLowerCase()}function yt(e){var{ua:t}=e,r=bt(document.referrer),n=/android-app/i.test(document.referrer),i=/MicroMessenger|WeChat|Weixin/i.test(t),o=/snapchat/i.test(t),a=/FBAN|FBIOS|FBAV|FB_IAB|FB4A/i.test(t),s=/instagram/i.test(t);return r||n||i||o||a||s}for(var St="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",kt=new Uint8Array(256),_t=0;_t<64;_t++)kt[St.charCodeAt(_t)]=_t;kt[45]=62,kt[95]=63;var At,Ct=[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="];At={},Ct.forEach(((e,t)=>At[e]=t)),String.fromCharCode.bind(String);function xt(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))}"function"==typeof SuppressedError&&SuppressedError;const Tt="__adcids",It="https://api.production.gstcpx.site/audience/f/",Ot={audiences:[],expiresAt:0},Pt=e=>Date.now()>e;function Et(e,t,r){Pt(r)&&function(e){return xt(this,void 0,void 0,(function*(){if(!e)return Ot;try{const t=yield fetch(`${It}${e}`),r=yield t.json();return r.errors&&console.error(r.errors.error),r.data?{audiences:r.data.audiences,expiresAt:Date.now()+r.data.expired_in}:Ot}catch(e){return Ot}}))}(e).then((e=>{t.set(Tt,JSON.stringify(e))}))}function Nt(e,t=it){const r=function(e){return Fe(e.get(Tt),Ot)}(t);return Et(e,t,r.expiresAt),r.audiences}var Dt;!function(e){e.twitter="twitter",e.telegram="telegram",e.facebook="facebook",e.instagram="instagram",e.snapchat="snapchat",e.wechat="wechat"}(Dt||(Dt={}));const jt={[Dt.twitter]:{referrers:["t.co","com.twitter.android"],uaParams:null},[Dt.telegram]:{referrers:["web.telegram.org"],uaParams:null},[Dt.facebook]:{referrers:["l.facebook.com","m.facebook.com"],uaParams:["FBAN","FBIOS","FBAV","FB_IAB","FB4A"]},[Dt.instagram]:{referrers:["l.instagram.com","m.instagram.com"],uaParams:["instagram"]},[Dt.snapchat]:{referrers:null,uaParams:["snapchat"]},[Dt.wechat]:{referrers:null,uaParams:["MicroMessenger","WeChat","Weixin"]}};function Mt(e){const t=window.location.href.includes("tgWebAppData");if(e===Dt.telegram&&t)return!0;const{uaParams:r,referrers:n}=jt[e]||{},i=function(e){try{return new URL(e)}catch(e){return!1}}(document.referrer),o=i?i.hostname.toLowerCase():"";if(n&&n.includes(o))return!0;if(!r)return!1;return new RegExp(r.join("|"),"i").test(navigator.userAgent)}var Rt="cc_dm",Ut={devModeQueryStringParameter:Rt,utm_mapping:!1,iabcat:25,iab_extended:"25-3",label:1,script_defer:!1,tagId:null,default_keywords:[]};function Lt(e){var t,r,{visitorId:n,isAdBlock:i,isTubeSite:o,fingerprint:a,userAgentData:s={},tagAbVersion:c="a",magmaClickResolverEnable:u,config:l=Ut,v2:d=0,siteId:p=null,isGoogleTopicsDisallowed:h=!1,sessionService:f,canCollectAudiences:m,extraFields:v={}}=e,g=(r=location.search.split("?"))[r.length-1].split("&").reduce(((e,t)=>{var[r,n]=t.split("=");return r&&(e[r]=n),e}),{}),w=Boolean(window.web3||window.ethereum),b=function(){var{title:e}=document,t=document.head.querySelector("meta[name=keywords]"),r=document.head.querySelector("meta[name=description]"),n=e;return[t,r].forEach((e=>{n+=e?" ".concat(e.content):""})),n.trim().replace(/\s?[,.:;!?/|&-]?\s/g,(e=>"&"===e||"|"===e?"":","))}(),y=function(e,t){var r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{},n="_tp_",i={};return e.forEach((e=>{var o=it.get(n+e),a=t[e]||t[wt[e]]||t[r[e]];i[e]=a||o||"",a&&it.set(n+e,a)})),i}(["utm_source","utm_medium","utm_campaign","utm_content","campaign"],g,l.utm_mapping),S=function(e){if(null!==Ke.read(Xe))return Number(Ke.read(Xe));var t=0;return null!==Ke.read(Ye)&&(t=Ke.read(Ye)),[$e,Qe].forEach((r=>{e[r]&&(Ke.write(Ye,e[r],Date.now()+31536e6),t=e[r])})),Number(t)}(g);u&&0===S&&y.campaign&&(y.utm_source="mck",y.utm_medium=y.campaign,y.utm_campaign=p,S=Number(p));var k,_,A,C,x,T=h?[]:(_="topsids","browsingTopics"in document&&null!==(k=document)&&void 0!==k&&null!==(k=k.featurePolicy)&&void 0!==k&&k.allowsFeature("browsing-topics")?(document.browsingTopics().then((e=>{var t=e.map((e=>e.topic));it.set(_,JSON.stringify(t))})).catch((()=>[])),Fe(it.get(_),[])):[]),I=((A=(new Je).getResult()).device.type=A.device.type||"desktop",A),O=gt(l.tagId,a,I),P=m?Nt((e=>{for(var t,r,n,i,o="",a=e.length%3,s=0;s255||(n=e.charCodeAt(s++))>255||(i=e.charCodeAt(s++))>255)throw new TypeError("invalid character found");o+=Ct[(t=r<<16|n<<8|i)>>18&63]+Ct[t>>12&63]+Ct[t>>6&63]+Ct[63&t]}return a?o.slice(0,a-3)+"===".substring(a):o})((null==O?void 0:O.fp_str)||"")):Ot.audiences;return je({userId:n,isAdBlock:i,isMetaMaskActive:w,isSslProtocol:"https:"===window.location.protocol,resolution:[+(screen&&screen.width||window.outerWidth),+(screen&&screen.height||window.outerHeight)],labels:ze.get("labels")||"",sub:S,title:window.document.title,tags:"",debugMode:"1"===g[Rt],holdableQSParams:y,qs:g,ua:I,timezone:Math.trunc((new Date).getTimezoneOffset()/-60),timezoneOlson:window.Intl&&Intl.DateTimeFormat().resolvedOptions().timeZone,entryReferrerDomain:tt(f,l.tagId),magmaSourceId:Ke.read("magma_source"),keywords:encodeURIComponent(b),isAccelerometer:(C="cb_acce",x=it.get(C)||0,x||window.addEventListener("devicemotion",(e=>{null!==e.accelerationIncludingGravity.x&&it.set(C,1)})),Number(x)),isGyroscope:ot(),isTubeSite:o,isApprovedMainStream:null!==(t=l.approved_mainstream)&&void 0!==t&&t,fingerprintParams:at(a),page:encodeURIComponent(window.location.href).replace(/%2F/g,"/"),userAgentData:s,visitorId:O?O.fp:null,visitorIdString:O?O.fp_str:"",v2:d,iabCategory:l.iabcat,iabCategoryExtended:l.iab_extended,mainCategory:l.label,scriptDefer:l.script_defer,tagAbVersion:c,defaultKeywords:l.default_keywords,topics:T,isWebView:Re(),isInApp:yt(I),audiencesIds:P,socialNetwork:Object.keys(Dt).find((e=>Mt(e)))||""},v)}for(var Ft="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",Ht=new Uint8Array(256),Bt=0;Bt<64;Bt++)Ht[Ft.charCodeAt(Bt)]=Bt;Ht[45]=62,Ht[95]=63;var qt=[..."ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/="],zt=((e=>{var t={};e.forEach(((e,r)=>t[e]=r))})(qt),String.fromCharCode.bind(String),e=>{for(var t,r,n,i,o="",a=e.length%3,s=0;s255||(n=e.charCodeAt(s++))>255||(i=e.charCodeAt(s++))>255)throw new TypeError("invalid character found");o+=qt[(t=r<<16|n<<8|i)>>18&63]+qt[t>>12&63]+qt[t>>6&63]+qt[63&t]}return a?o.slice(0,a-3)+"===".substring(a):o});class Vt{constructor(e){var{wrappedUrlPath:t}=e;this.wrappedUrlPath=t}extendedEncode(e){return p(zt(e),{sw:"gu1",Sw:"gu2",sW:"gu3",SW:"gu4"})}wrapVastUrl(e,t){var r=e.includes("http")?e:"https://".concat(e);return"".concat(r).concat(this.wrappedUrlPath).concat(this.extendedEncode(t))}}function Gt(e,t,r){return(t=function(e){var t=function(e,t){if("object"!=typeof e||!e)return e;var r=e[Symbol.toPrimitive];if(void 0!==r){var n=r.call(e,t||"default");if("object"!=typeof n)return n;throw new TypeError("@@toPrimitive must return a primitive value.")}return("string"===t?String:Number)(e)}(e,"string");return"symbol"==typeof t?t:t+""}(t))in e?Object.defineProperty(e,t,{value:r,enumerable:!0,configurable:!0,writable:!0}):e[t]=r,e}function Wt(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 Jt(e){for(var t=1;t{var o="".concat(e).concat(r,"=").concat(encodeURIComponent(t[r]));return n!==i.length-1&&(o+="&"),o}),"");return"".concat(e,"?").concat(r)}(c,e.params),!0),s.timeout=e.timeout,s.onreadystatechange=function(){if(s&&4===s.readyState&&(0!==s.status||s.responseURL&&0===s.responseURL.indexOf("file:"))){var n="getAllResponseHeaders"in s?s.getAllResponseHeaders().split("\r\n").reduce(((e,t)=>{var[r,n]=t.split(": ");return r?Jt(Jt({},e),{},{[null==r?void 0:r.toLowerCase()]:n}):e}),{}):null,i={data:e.responseType&&"text"!==e.responseType?s.response:s.responseText,status:s.status,statusText:s.statusText,headers:n,config:e,request:s};!function(e,t,r){!r.status||r.status>=200&&r.status<300?e(r):t(Kt("Request failed with status code "+r.status,r.config,null,r.request,r))}(t,r,i),s=null}},s.onabort=function(){s&&(r(Kt("Request aborted",e,"ECONNABORTED",s)),s=null)},s.onerror=function(){r(Kt("Network Error",e,null,s)),s=null},s.ontimeout=function(){var t="timeout of ".concat(e.timeout,"ms exceeded");e.timeoutErrorMessage&&(t=e.timeoutErrorMessage),r(Kt(t,e,"ECONNABORTED",s)),s=null},"setRequestHeader"in s&&Yt(a,(function(e,t){void 0===o&&"content-type"===t.toLowerCase()?delete a[t]:s.setRequestHeader(t,e)})),void 0!==e.withCredentials&&(s.withCredentials=!!e.withCredentials),e.responseType)try{s.responseType=e.responseType}catch(t){if("json"!==e.responseType)throw t}o||(o=null),s.send(o)}))}function Qt(e){if("string"==typeof e)try{e=JSON.parse(e)}catch(e){}return e}var Xt=new class{constructor(e){this.defaults={timeout:0}}dispatchRequest(e){var t;return null!==(t=e.data)&&"object"==typeof t&&(e.headers||(e.headers={}),e.headers["Content-Type"]="application/json;charset=utf-8",e.data=JSON.stringify(e.data)),$t(e).then((function(e){return e.data=Qt(e.data),e}),(function(e){return e&&e.response&&(e.response.data=Qt(e.response.data)),Promise.reject(e)}))}get(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return this.dispatchRequest(Jt(Jt({},t),{},{url:e,method:"get"}))}post(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},r=arguments.length>2&&void 0!==arguments[2]?arguments[2]:{};return this.dispatchRequest(Jt(Jt({},r),{},{url:e,method:"post",data:r.data?r.data:t}))}},Zt=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},er=function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]localStorage.setItem(e,t),get:e=>localStorage.getItem(e),remove:e=>localStorage.removeItem(e)};try{nr.set("__try",1),nr.get("__try"),nr.remove("__try")}catch(e){nr=rr}var ir=nr;var or=new class{constructor(){this.state={}}set(e,t){this.state[e]=t}get(e){return this.state[e]||null}remove(e){delete this.state[e]}},ar={set:(e,t)=>sessionStorage.setItem(e,t),get:e=>sessionStorage.getItem(e),remove:e=>sessionStorage.removeItem(e)};try{ar.set("__try",1),ar.get("__try"),ar.remove("__try")}catch(e){ar=or}var sr=ar;class cr{constructor(){this.SESSION_KEY="a_s_ts",this.SESSION_KEY_DATA="_ses_dt",this.INITIAL_SESSION_KEY="lastId",this.SESSION_END_TIME_KEY="_ses_tmend",this.initialSessionId=ir.get(this.INITIAL_SESSION_KEY)||"",this.localStorageExpiresMS=6e4,this.sessionState={id:null,startTs:null}}isSessionTheSame(){return this.initialSessionId===this.getSessionId()}replaceLastSessionData(){var e=this.getSessionId();ir.set(this.INITIAL_SESSION_KEY,e),this.initialSessionId=e}getItem(e){if(!this.isSessionTheSame())return this.replaceLastSessionData(),this.removeItem(this.SESSION_KEY_DATA),null;try{var t=ir.get(this.SESSION_KEY_DATA),r=JSON.parse(t);return"object"==typeof r?r[e]:null}catch(e){return null}}setItem(e,t){var r;this.isSessionTheSame()||(this.replaceLastSessionData(),this.removeItem(this.SESSION_KEY_DATA));try{var n,i=null!==(n=ir.get(this.SESSION_KEY_DATA))&&void 0!==n?n:"{}";r=JSON.parse(i)}catch(e){r={}}r[e]=t,ir.set(this.SESSION_KEY_DATA,JSON.stringify(r))}removeItem(e){ir.remove(e)}getFromStorage(e){try{var t=e.get(this.SESSION_KEY),r=JSON.parse(t);return"object"==typeof r?r:null}catch(e){return null}}setToStorage(e,t){e.set(this.SESSION_KEY,JSON.stringify(t))}startSession(){var e=Date.now(),t=this.getFromStorage(sr),r=this.getFromStorage(ir),n=ir.get(this.SESSION_END_TIME_KEY);!t&&r&&n&&n>e&&(this.setToStorage(sr,r),t=r),this.sessionState=t||{id:Math.random().toString(36).substring(2),startTs:e},t||(this.setToStorage(sr,this.sessionState),this.setToStorage(ir,this.sessionState)),setInterval((()=>{var e=Date.now()+this.localStorageExpiresMS;ir.set(this.SESSION_END_TIME_KEY,e)}),5e3)}getDurationTime(e){var t=Date.now()-this.sessionState.startTs;return"min"===e?Number((t/1e3/60).toFixed(2)):t}getSessionId(){return this.sessionState.id}}var ur=function(e,t,r){if(r||2===arguments.length)for(var n,i=0,o=t.length;ie?t.margin:e}),0);r.forEach((function(e,i){t.setWidgetPosition(e,r[i-1],n)}))},e}();class pr{constructor(){this.generalParameters={imp:[{secure:"https:"===window.location.protocol?1:0,ext:{v2:!1,tag_ab:"",mm:0,st:0,ad_tags:""},pext:{},banner:{w:0,h:0}}],site:{id:"",cat:[],page:""},device:{w:0,h:0},ext:{dt:Date.now()},user:{fp:0,id:""}}}fillGeneralParameters(e){var{iabCategoryExtended:t,visitorId:r,userId:n,isMetaMask:i,sessionTime:o,tagAbVersion:a,publisherKeywords:s,cloaking:c,width:u,height:l,userAgentData:d}=e,p=window.top!==window.self;this.generalParameters.site.cat[0]=t,this.generalParameters.site.page=p?document.referrer:document.URL,this.generalParameters.user.fp=r,this.generalParameters.user.id=n,this.generalParameters.imp[0].ext.v2=c,this.generalParameters.imp[0].ext.mm=i,this.generalParameters.imp[0].ext.tag_ab=a,this.generalParameters.imp[0].ext.st=o,this.generalParameters.imp[0].ext.ad_tags=s,this.generalParameters.device.w=u,this.generalParameters.device.h=l,this.generalParameters.user.ua_data=d}createRequestData(e){var t=this.generalParameters,r=d(t.imp[0].ext,e.imp[0].ext),n=d(t.imp[0].pext,e.imp[0].pext),i=e.imp[0].banner||null;return t.imp[0].ext=r,t.imp[0].pext=n,t.imp[0].banner=i,t.fp_params=e.fp_params||null,t.site.id=e.site.id,t}}function hr(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,i)}function fr(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){hr(o,n,i,a,s,"next",e)}function s(e){hr(o,n,i,a,s,"throw",e)}a(void 0)}))}}class mr{constructor(){this.storageKey="_shrdstrg"}init(){}setToStorage(e){ir.set(this.storageKey,JSON.stringify(e))}getFromStorage(){try{return JSON.parse(ir.get(this.storageKey)||"{}")}catch(e){return{}}}set(e,t){var r=this;return fr((function*(){var n=r.getFromStorage();n[e]=t,r.setToStorage(n)}))()}get(e){var t=this;return fr((function*(){return t.getFromStorage()[e]}))()}remove(e){var t=this;return fr((function*(){var r=t.getFromStorage();delete r[e],t.setToStorage(r)}))()}clear(){var e=this;return fr((function*(){e.setToStorage({})}))()}}var vr=function(){function e(){this.handlers=[]}return e.prototype.init=function(){var e=this;document.addEventListener("click",(function(t){return e.handleClick(t)}))},e.prototype.addHandler=function(e){this.handlers.push(e)},e.prototype.removeHandler=function(e){this.handlers=this.handlers.filter((function(t){return t!==e}))},e.prototype.handleClick=function(e){this.handlers.forEach((function(t){return t(e)}))},e}(),gr=function(){function e(e,t){var r,n,i=this;this.LSfield="usCC",this.handler=function(e){i.clickHandler(),i.emptyClicksHandler(e)},this.globalClickHandler=e,this.sessionService=t;var o=this.sessionService.getItem(this.LSfield);this.clickCount=null!==(r=null==o?void 0:o.cls)&&void 0!==r?r:0,this.emptyClicks=null!==(n=null==o?void 0:o.emt)&&void 0!==n?n:0,this.setHandler()}return e.prototype.setHandler=function(){this.globalClickHandler.addHandler(this.handler)},e.prototype.clickHandler=function(){this.firstActionTS||(this.firstActionTS=Date.now()),this.clickCount+=1,this.saveToLS()},e.prototype.emptyClicksHandler=function(e){var t=e.target,r=t.parentElement,n=["a","input","img","svg","path","label","button","video","textarea"],i=["button","textbox"],o=!1;[t,r,null==r?void 0:r.parentElement].forEach((function(e){e&&!o&&(n.includes(e.tagName.toLowerCase())||e.className.match(/btn|button|jw-|player-/gi)||e.hasAttribute("contenteditable")||i.includes(e.getAttribute("role")||""))&&(o=!0)})),o||(this.emptyClicks+=1,this.saveToLS())},e.prototype.saveToLS=function(){var e={cls:this.clickCount,emt:this.emptyClicks};this.sessionService.setItem(this.LSfield,e)},Object.defineProperty(e.prototype,"count",{get:function(){return this.clickCount||0},enumerable:!1,configurable:!0}),Object.defineProperty(e.prototype,"emptyCount",{get:function(){return this.emptyClicks||0},enumerable:!1,configurable:!0}),e}(),wr=function(){function e(e){var t=this;this.isTracking=!1,this.LSfield="maxScP",this.maxScrollPercentage=0,this.prevPixelScrolled=0,this.totalPixelScrolled=0,this.totalPercentScrolled=0,this.computeScrollPercentage=function(){var e=window.pageYOffset||document.documentElement.scrollTop,r=document.documentElement.scrollHeight-window.innerHeight;return e>t.prevPixelScrolled&&(t.totalPixelScrolled+=e-t.prevPixelScrolled,t.totalPercentScrolled=Math.round(t.totalPixelScrolled/r*100)),t.prevPixelScrolled=e,Math.round(Math.min(100,Math.max(0,e/r*100)))},this.sessionService=e;var r=this.sessionService.getItem(this.LSfield)||{};this.maxScrollPercentage=r.maxScrollPercentage||0,this.totalPercentScrolled=r.totalPercentScrolled||0,this.totalPixelScrolled=r.totalPixelScrolled||0,setTimeout((function(){return t.startTracking()}),100)}return e.prototype.throttle=function(e,t){var r,n;return function(){for(var i=[],o=0;o{var t=e.cloneNode(!0);if("SCRIPT"===e.nodeName){for(var r=document.createElement("script"),n=0;n0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]{this.sessionService.setItem(this.ClickCounterLSfield,this.clickCount+=1)}))}get count(){var e;return null!==(e=this.sessionService.getItem(this.ClickCounterLSfield))&&void 0!==e?e:0}}var zr="__adm_user_id";function Vr(){var e=ir.get(zr);if(e)return e;var t=h(1,0x10000000000000000);return ir.set(zr,t),String(t)}function Gr(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,i)}function Wr(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){Gr(o,n,i,a,s,"next",e)}function s(e){Gr(o,n,i,a,s,"throw",e)}a(void 0)}))}}var Jr=[1411,1410],Kr="pxlsStrSnt",Yr="pxlsSnt";function $r(e){return ir.get(e)}function Qr(e){ir.set(e,"1")}function Xr(e){var t=document.createElement("iframe");t.referrerPolicy="no-referrer",t.src=e,t.width="1px",t.height="1px",t.setAttribute("allowtransparency",!0),t.setAttribute("style","padding:0;margin:0;border:0;position:absolute;width:1px!important;height:1px!important;top:0!important;"),t.marginheight="0",t.marginwidth="0",document.body.appendChild(t)}function Zr(e){return en.apply(this,arguments)}function en(){return(en=Wr((function*(e){e&&(Jr.forEach((t=>Xr("https://s.uuidksinc.net/match/".concat(t,"/?remote_uid=").concat(e)))),Xr("https://lbs-eu1.ads.betweendigital.com/match?bidder_id=46084&external_user_id=".concat(e,"&external_matching=1&forward=1")))}))).apply(this,arguments)}function tn(){return(tn=Wr((function*(e){var t;if(e)return $r(Kr)||$r(Yr)?void($r(Yr)&&Math.random()<.5&&(Zr(e),Qr(Kr),t=Yr,ir.remove(t))):(Zr(e),void Qr(Kr))}))).apply(this,arguments)}function rn(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,i)}function nn(){return on.apply(this,arguments)}function on(){return on=function(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){rn(o,n,i,a,s,"next",e)}function s(e){rn(o,n,i,a,s,"throw",e)}a(void 0)}))}}((function*(){if(!navigator.userAgentData||!navigator.userAgentData.getHighEntropyValues)return null;try{return yield navigator.userAgentData.getHighEntropyValues(["uaFullVersion","architecture","bitness","brands","mobile","model","platform","platformVersion","fullVersionList","wow64"])}catch(e){return null}})),on.apply(this,arguments)}function an(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,i)}function sn(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"",r=document.createElement("div");return r.style="".concat(e),t&&(r.className=t),r}var cn="#qrrc";function un(){return un=function(e){return function(){var t=this,r=arguments;return new Promise((function(n,i){var o=e.apply(t,r);function a(e){an(o,n,i,a,s,"next",e)}function s(e){an(o,n,i,a,s,"throw",e)}a(void 0)}))}}((function*(e,t){if(e&&t){var r=yield a(cn);if(r.length){var n=t.slice(-6).split("").map((e=>Number(e))),i=sn("width: 60px; height: 10px; overflow: hidden;"),[o,s]=function(e){var t="width: 60px; height: 5px; overflow: hidden; display: flex; justify-content: space-between",r=sn(t),n=sn(t);return e.forEach((e=>{var t=e<=5;e%2==0?r.appendChild(sn("width: 8px; height: 4px; background-color: black; opacity: 0.6","_blackSquare")):r.appendChild(sn("width: 8px; height: 4px; background-color: white","_whiteSquare")),t?n.appendChild(sn("width: 8px; height: 4px; background-color: black; opacity: 0.6","_blackSquare")):n.appendChild(sn("width: 8px; height: 4px; background-color: white","_whiteSquare"))})),[r,n]}(n);i.appendChild(o),i.appendChild(s),r[0].appendChild(i)}}})),un.apply(this,arguments)}var ln=function(){return ln=Object.assign||function(e){for(var t,r=1,n=arguments.length;r{var{createHashPath:h}=a,f=hn?"modern":"legacy",m=e.assets["".concat(f,"_js")],v=null!=m?m:function(e,t,r){return!Tr.includes(e.type)||r?e.assets.js:e.assets.js.map((e=>e.includes(".m.js")||e.includes(".l.js")?e:Mr(e,t)))}(e,f,i),g=Lr.getUrl(Cr.CDN_ORIGIN,{source:v[0],isTubeSite:p,adFormatType:e.type}).main;e.assets.js=v.map((t=>{var r={src:t,type:f};return!i&&h&&dn.includes(e.type)&&(r.src=l.convertToHashedUrl(r.src,h)),r}));var w=u[e.type];return e.spots=e.spots.map(((a,u)=>{if(a.config.label=r,a.config.iabcat=n,a.config.adm_loader=!!h||i,"banner"===e.type&&"1x1"===a.config.options.size&&(a.delay_ms=3e3),pn.includes(a.config.spot_id)&&"in_stream_ad"===e.type&&(a.delay_ms=24e4),c&&"popunder"===e.type&&(a.config.options.bind_to=null,a.config.options.ignore_to=null),h&&"popunder"===e.type&&(a.config.scripts.interstitial=l.convertToHashedUrl(a.config.scripts.interstitial)),"inpage"===e.type&&(a.config.origin=g),Or.includes(Number(t))){if("in_stream_ad"===e.type)for(var p of Object.keys(a.config.scripts)){var f=new URL(a.config.scripts[p]);a.config.scripts[p]="".concat(Ir).concat(f.pathname)}if("inpage"===e.type&&(a.config.origin="".concat(Ir)),"popunder"===e.type||"interstitial"===o.type){var m=new URL(a.config.scripts.interstitial);a.config.scripts.interstitial="".concat(Ir).concat(m.pathname)}}return w?s(w)&&w[u]?d(a,w[u]):d(a,w):a})),e}))}window.__adFormats=window.__adFormats||{},window.__formatsGetters=window.__formatsGetters||{};var mn=window.__adFormats,vn=window.__formatsGetters;function gn(e,t){if(mn[e])return t(mn[e]);vn[e]||(vn[e]=[]),vn[e].push(t)}function wn(e,t){var r=arguments.length>2&&void 0!==arguments[2]&&arguments[2],n=Object.keys(e).filter((t=>{var r=e[t];return!(!s(r)||!r.length)||!!c(r)&&Object.keys(r).filter((e=>void 0!==r[e])).length}));return n.length?n.every((r=>t[r]&&t[r](e[r]))):r}function bn(e,t){var{env:r,Logger:n}=t,i=function(e){var{ua:t,qs:r,entryReferrerDomain:n}=e;return{platforms:e=>e.includes(t.device.type||"desktop"),browsers:e=>e.includes(t.browser.name),urls:e=>e.some((e=>{if(0===e.indexOf("[regExp]")){var t=e.replace(/^\[regExp]\s*/,"");return new RegExp(t).test(window.location.href)}return window.location.href.includes(e)})),ls:e=>Object.keys(e).every((t=>localStorage.getItem(t)===e[t])),ss:e=>Object.keys(e).every((t=>localStorage.getItem(t)===e[t])),qs:e=>Object.keys(e).every((t=>r[t]===e[t])),cookies:e=>(e=Array.isArray(e)?e:[e]).some((e=>Object.keys(e).every((t=>e[t]===X.read(t))))),vars:e=>Object.keys(e).every((t=>window[t]===e[t])),entry_referrer:e=>e.some((e=>(":direct:"===e||""===e)&&""===n||e&&n.includes(e)))}}(r);return e.filter((e=>e.ignore&&e.ignore.length&&e.ignore.some((e=>wn(e,i)))?(n.warn("spot was excluded by ignore rules",e),!1):!e.bind||!e.bind.length||e.bind.some((t=>{var r=wn(t,i,!0);return r||n.warn("spot was not bind by conditions",e),r}))))}var yn=(e,t,r)=>{var n="inpage"===r?"t_v":"".concat("t_v","_").concat(r);if(!t)return ir.remove(n),e;try{var i=JSON.parse(ir.get(n));if(i&&i.ttl+864e5>Date.now())return[e[i.version]]}catch(e){ir.remove(n)}var o=(e=>Math.floor(Math.random()*e.length))(e);return ir.set(n,JSON.stringify({version:o,ttl:Date.now()})),[e[o]]};function Sn(e,t,r,n,i,o,a){try{var s=e[o](a),c=s.value}catch(e){return void r(e)}s.done?t(c):Promise.resolve(c).then(n,i)}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 _n(e){for(var t=1;t{var r,n,i=_n(_n({},t),{},{autostart:null===(r=null!==(n=t.autostart)&&void 0!==n?n:e.autostart)||void 0===r||r});return i.config.primary_auction_url=Lr.getUrl(Cr.PRIMARY_AUCTION,e.type).main||null,i})).filter((e=>e.autostart));n.length&&(e.loadAssets(),e.provideSpotsToLibrary(n))}}))()}runSpot(){var e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},{spot_id:t}=e;if(t){var r=this.spots.find((e=>e.config.spot_id===t));r&&(e=_n(_n({},r),e)),this.filterSpots([r]).length&&(this.loadAssets(),gn(this.connectionName,(t=>{this.Logger.info("Run ".concat(this.type," spot"),e),this.provideSpotToLibrary(e,t)})))}}provideSpotsToLibrary(e){var t=t=>e.forEach((e=>this.provideSpotToLibrary(e,t)));gn(this.connectionName,(e=>t(e)));try{new Event("try"),window.addEventListener(this.connectionName,(e=>{"function"==typeof e._init&&t(e._init)}),!1)}catch(e){var r=window[this.connectionName];"function"!=typeof r&&(r=function(e,t,n){r._list.forEach((r=>{"function"==typeof r&&r(e,t,n)}))}),r._list||(r._list=[]),r._list.push((e=>{"function"==typeof e&&t(e)})),window[this.connectionName]=r}}applySpotConfigTests(e){var t,r,n=null==e||null===(t=e.options)||void 0===t?void 0:t.split_test;if(null==e||null===(r=e.options)||void 0===r||!r.has_split_tests||!n)return e;var o=h(1,100),a=i(e.test_options);return n.traffic_volumet(o,this.env,this.providedDependencies,i);r?setTimeout(a,r):a()}filterSpots(e){return bn(e,{env:this.env,Logger:this.Logger})}loadAssets(){if(!this.isAssetsLoaded){this.isAssetsLoaded=!0;var e=this.jsLinks;"inpage"!==this.type&&"popunder"!==this.type&&"banner"!==this.type||(e=yn(this.jsLinks,this.isSplitTestActive,this.type));var t=document.querySelector("head, body");e.forEach((e=>{var r,n,i,o,a=e.src;if(Or.includes(Number(this.tagId))){var s=new URL(e.src);a="".concat(Ir).concat(s.pathname)}r={node:t,urls:Lr.getUrl(Cr.JS_BUNDLE,{scriptSrc:a,scriptType:e.type,adFormatType:this.type}),scriptDefer:this.env.scriptDefer},n=r.node,i=r.urls,o=r.scriptDefer,function e(t){if(t&&!document.querySelector('[src="'.concat(t,'"]'))){var r=document.createElement("script");r.src=t,o?r.defer=!0:r.async=!0,r.onerror=function(){t===i.main&&i.fallback&&e(i.fallback)},n.append(r)}}(i.main)}))}}}var xn="in_stream_ad",Tn="popunder",In=function(e,t,r,n){return new(r||(r=Promise))((function(i,o){function a(e){try{c(n.next(e))}catch(e){o(e)}}function s(e){try{c(n.throw(e))}catch(e){o(e)}}function c(e){var t;e.done?i(e.value):(t=e.value,t instanceof r?t:new r((function(e){e(t)}))).then(a,s)}c((n=n.apply(e,t||[])).next())}))},On=function(e,t){var r,n,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(s){return function(c){return function(s){if(r)throw new TypeError("Generator is already executing.");for(;o&&(o=0,s[0]&&(a=0)),a;)try{if(r=1,n&&(i=2&s[0]?n.return:s[0]?n.throw||((i=n.return)&&i.call(n),0):n.next)&&!(i=i.call(n,s[1])).done)return i;switch(n=0,i&&(s=[2&s[0],i.value]),s[0]){case 0:case 1:i=s;break;case 4:return a.label++,{value:s[1],done:!1};case 5:a.label++,n=s[1],s=[0];continue;case 7:s=a.ops.pop(),a.trys.pop();continue;default:if(!(i=a.trys,(i=i.length>0&&i[i.length-1])||6!==s[0]&&2!==s[0])){a=0;continue}if(3===s[0]&&(!i||s[1]>i[0]&&s[1]e.get())).then((e=>e)),nn(),Y({useScriptLoadCheck:!t})])];case 1:if(n=l.sent(),i=n[0],o=n[1],a=n[2],u=n[3],!c(i)||!s(null==i?void 0:i.adformats))throw new Error("[Admanager] - tag config must be object type and its adformats field must be an array type");return[2,{originalConfig:i,fingerprint:o,userAgentData:a,isAdBlock:u}]}}))}))},e.prototype.loadCloakingConfig=function(e){var t;return In(this,void 0,void 0,(function(){var r,n;return On(this,(function(i){switch(i.label){case 0:return e.v2?(r=null===(t=window.Intl)||void 0===t?void 0:t.DateTimeFormat().resolvedOptions().timeZone,n=this,[4,Br.getCloakingConfig(e.tagId,r,this.tagAbVersion,this.SessionService)]):[2,e];case 1:return n.cloakingConfig=i.sent(),this.cloakingConfig&&!this.cloakingConfig.med_script_url&&e.med_script_url&&(this.cloakingConfig.med_script_url=e.med_script_url),[2,this.cloakingConfig||e]}}))}))},e.prototype.setupEnvironment=function(e,t,n,i){var o,a,s=this.hasAdFormats(e.adformats,["inpage"]),c="string"==typeof this.siteId||"number"==typeof this.siteId?Number(this.siteId):null;this.env=Lt({visitorId:t.fingerprint.visitorId,isAdBlock:t.isAdBlock,isTubeSite:n,fingerprint:t.fingerprint,userAgentData:t.userAgentData,tagAbVersion:(o=this.tagAbVersion,a=e.testId,a?`${o}_${a}`:`${o}`),magmaClickResolverEnable:this.magmaClickResolverEnable,config:e,v2:this.cloakingConfig?1:0,siteId:c,sessionService:this.SessionService,isGoogleTopicsDisallowed:this.tagIdsDisabledTopics.includes(this.tagId)||Boolean(this.customSettings.areTopicsDisabled),canCollectAudiences:s,extraFields:{isMB:r.isMB,cabsId:r.cabsId,clickId:this.clickId,pushUTMParams:this.pushUTMParams,isAdblockCode:this.hashHelpers&&Object.keys(this.hashHelpers).length>0,loadedAt:i}})},e.prototype.initializeServicesForInit=function(e,t){return In(this,void 0,void 0,(function(){var n;return On(this,(function(i){if(!this.env)throw new Error("[Admanager] - Client environment is not initialized");return this.formatMediationScript=e.o_script,this.initializeSharedStorageAndKeywordsManager(t),(n=this.tagIdsLiteVersion.includes(this.tagId)||this.customSettings.isLiteVersion)||t||this.KeywordsManager.asyncProcessKeywords(r.keywordsServiceUrl,this.env.keywords,this.env.page).catch(null),n||function(e){tn.apply(this,arguments)}(this.env.visitorIdString),function(e,t){un.apply(this,arguments)}(t,this.env.visitorIdString),[2]}))}))},e.prototype.setupAuctionService=function(e){if(!this.env)throw new Error("[Admanager] - Client environment is not initialized");this.PositionService.deviceType=this.env.ua.device.type,this.AuctionService.fillGeneralParameters({iabCategoryExtended:"IAB".concat(this.env.iabCategoryExtended),visitorId:this.env.visitorId,tagAbVersion:this.env.tagAbVersion,sessionTime:this.SessionService.getDurationTime("min"),publisherKeywords:this.env.keywords,cloaking:this.env.v2,width:this.env.resolution[0],height:this.env.resolution[1],userAgentData:e,userId:this.env.userId,isMetaMask:this.env.isMetaMaskActive})},e.prototype.setupAdFormats=function(e,t){if(!this.env)throw new Error("[Admanager] - Client environment is not initialized");var r=this.HashService.generateHashedProxyDomain();this.adFormats=fn({tagId:this.tagId,label:e.label,iabcat:e.iabcat,isPhpLoaderActive:!!e.adm_loader,adFormats:e.adformats,hashHelpers:this.hashHelpers,isAdBlock:this.env.isAdBlock,hashedProxyDomain:r,legacySpotsExtend:this._paramReconciler,hashService:this.HashService,tagAbVersion:this.tagAbVersion,isTubeSite:t});var n=this.getAdformatsUrls();this.adformatsUrls=En(En([],this.adformatsUrls,!0),n,!0)},e.prototype.handleTracking=function(e,t){if(!this.env)throw new Error("[Admanager] - Client environment is not initialized");var n=performance.now();this.tagIdsDisabledTracking.includes(this.tagId)||function(e,t){var n=t.label,i=t.subId,o=t.userId,a=t.timezone,s=t.adManagerVersion,c=t.tagId,u=t.screenResolution,l=t.isAdBlock,d=t.timezoneOlson,p=t.utmSource,h=t.utmMedium,f=t.utmCampaign,m=t.utmContent,v=t.isMetaMaskActive,g=t.initToStartLatency,w=t.isCloaking,b=t.isCloakingResponseEmpty,y={wl:n,subid:i,user_id:o,timezone:a,ver:s,tag_id:Number(c||0),screen_resolution:u.join("x"),adblock:Number(l),timezone_olson:d,utm_source:p,utm_medium:h,utm_campaign:f,utm_content:m,mm:Number(v),init_start_latency:Number(g),is_v2:Number(w||!1),is_v2_empty:Number(b||!1)},S="/in/track?data=".concat(zt(JSON.stringify(y))),k="".concat(e).concat(S),_="".concat(r.initTrackingUrl).concat(S);Xt.get(k).catch((function(){Xt.get(_)}))}((this.env.isTubeSite||r.isMB||r.isOnCl?null:this.HashService.generateMetricHashDomain())||r.initTrackingUrl,{label:e.label,subId:Number(this.env.sub),userId:Vr(),timezone:this.env.timezone,adManagerVersion:r.version,tagId:e.tagId,screenResolution:this.env.resolution,isAdBlock:this.env.isAdBlock,timezoneOlson:this.env.timezoneOlson,utmSource:this.env.holdableQSParams.utm_source,utmMedium:this.env.holdableQSParams.utm_medium,utmCampaign:this.env.holdableQSParams.utm_campaign,utmContent:this.env.holdableQSParams.utm_content,isMetaMaskActive:this.env.isMetaMaskActive,initToStartLatency:((n-t)/1e3).toFixed(2),isCloaking:Boolean(e.v2),isCloakingResponseEmpty:Boolean(this.cloakingConfig)})},e.prototype.getInitTimestamps=function(){return{loadedAt:Date.now(),startInitMarkTs:performance.now()}},e.prototype.init=function(e,t){return void 0===e&&(e=this.tagId),In(this,void 0,void 0,(function(){var r,n,i,o,a,s,c,u,l,d;return On(this,(function(p){switch(p.label){case 0:r=this.getInitTimestamps(),n=r.loadedAt,i=r.startInitMarkTs,p.label=1;case 1:return p.trys.push([1,5,,6]),Lr.init(this.customDomain),o=this.loadTagConfiguration(e),[4,this.collectClientDataForInit(o)];case 2:return a=p.sent(),s=a.originalConfig,c=Pn(a,["originalConfig"]),[4,this.loadCloakingConfig(s)];case 3:return u=p.sent(),this.customSettings=(h=u.custom_settings||{},ln({isLiteVersion:!1,areTopicsDisabled:!1,isInstreamFirst:!1,isPopunderFirst:!1,isPushDeactivated:!1},h)),l=Boolean(null==s?void 0:s.is_tnet),this.setupEnvironment(u,c,l,n),this.initializeServicesForInit(u,l),this.setupAuctionService(c.userAgentData),this.setupAdFormats(u,l),this.handleTracking(u,i),"function"==typeof t&&t(),[4,this.runMediationIfNeeded(u)];case 4:return p.sent(),this.runAdFormats(),[3,6];case 5:return d=p.sent(),this.Logger.error(d),[3,6];case 6:return[2]}var h}))}))},e}(),Dn=document.querySelector("script[".concat(r.tagIdIdentifier,"]")),jn=Array.isArray(window[r.adManagerWindowNamespace])?window[r.adManagerWindowNamespace]:[];if(window[r.adManagerWindowNamespace]=window[r.adManagerWindowNamespace]instanceof Nn||new Nn,window.a3klsam=window[r.adManagerWindowNamespace],window[r.adManagerWindowNamespace]._paramReconciler=window[r.overrideConfigWindowNamespace]||{},jn.forEach((e=>e())),Dn){var Mn=Dn.getAttribute(r.tagIdIdentifier);Dn.removeAttribute(r.tagIdIdentifier);var Rn=Dn.getAttribute(r.clickIdIdentifier);Dn.removeAttribute(r.clickIdIdentifier);var Un=Dn.hasAttribute(r.noAutostartIdentifier),Ln=Dn.hasAttribute(r.customDomainIdentifier);if(Mn&&(window[r.adManagerWindowNamespace].tagId=Mn),Rn&&(window[r.adManagerWindowNamespace].clickId=Rn),Ln){var Fn=new URL(Dn.getAttribute("src"));window[r.adManagerWindowNamespace].customDomain={host:Fn.host.replace("ajs.",""),protocol:Fn.protocol}}[r.utmSource,r.utmMedium,r.utmContent,r.utmCampaign].forEach((e=>{var t=Dn.getAttribute(e);if(t){var n=e.replace("data-","").replace("-","_");window[r.adManagerWindowNamespace].pushUTMParams[n]=t}})),Mn&&!Un&&window[r.adManagerWindowNamespace].init()}})();