cds.connatix.com Open in urlscan Pro
151.101.2.137  Public Scan

URL: http://cds.connatix.com/p/159142/connatix.player.js
Submission: On April 18 via api from US — Scanned from DE

Form analysis 0 forms found in the DOM

Text Content

(()=>{var t={5186:function(t,i){"use strict";var e=this&&this.T||function(t){var i="function"==typeof Symbol&&Symbol.iterator,e=i&&t[i],s=0;if(e)return e.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&s>=t.length&&(t=void 0),{value:t&&t[s++],done:!t}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(i,"B",{value:!0});var s=function(){function t(){}return t.prototype.clone=function(){var t=this,i=new this.constructor;return Object.keys(this).forEach((function(e){var s=t.deepClone(t[e]);void 0!==s&&(i[e]=s)})),i},t.prototype.deepClone=function(t){var i,s,n=typeof t;if("number"===n||"string"===n||"boolean"===n)return t;if(null!==t&&"object"===n){if("function"==typeof t.clone)return t.clone();if(t instanceof Date)return new Date(t.getTime());if(void 0!==t[Symbol.iterator]){var r=[];try{for(var h=e(t),o=h.next();!o.done;o=h.next()){var a=o.value;r.push(this.deepClone(a))}}catch(t){i={error:t}}finally{try{o&&!o.done&&(s=h.return)&&s.call(h)}finally{if(i)throw i.error}}return t instanceof Array?r:new t.constructor(r)}var c={};for(var l in t)t.hasOwnProperty(l)&&(c[l]=this.deepClone(t[l]));return c}},t}();i.Cloneable=s},7061:function(t,i,e){"use strict";var s,n=this&&this.R||(s=function(t,i){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)i.hasOwnProperty(e)&&(t[e]=i[e])})(t,i)},function(t,i){function e(){this.constructor=t}s(t,i),t.prototype=null===i?Object.create(i):(e.prototype=i.prototype,new e)}),r=this&&this.U||function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function h(t){try{a(s.next(t))}catch(t){r(t)}}function o(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(h,o)}a((s=s.apply(t,i||[])).next())}))},h=this&&this.W||function(t,i){var e,s,n,r,h={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return r={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function o(r){return function(o){return function(r){if(e)throw new TypeError("Generator is already executing.");for(;h;)try{if(e=1,s&&(n=2&r[0]?s.return:r[0]?s.throw||((n=s.return)&&n.call(s),0):s.next)&&!(n=n.call(s,r[1])).done)return n;switch(s=0,n&&(r=[2&r[0],n.value]),r[0]){case 0:case 1:n=r;break;case 4:return h.label++,{value:r[1],done:!1};case 5:h.label++,s=r[1],r=[0];continue;case 7:r=h.ops.pop(),h.trys.pop();continue;default:if(!(n=(n=h.trys).length>0&&n[n.length-1])&&(6===r[0]||2===r[0])){h=0;continue}if(3===r[0]&&(!n||r[1]>n[0]&&r[1]<n[3])){h.label=r[1];break}if(6===r[0]&&h.label<n[1]){h.label=n[1],n=r;break}if(n&&h.label<n[2]){h.label=n[2],h.ops.push(r);break}n[2]&&h.ops.pop(),h.trys.pop();continue}r=i.call(t,h)}catch(t){r=[6,t],s=0}finally{e=n=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,o])}}};Object.defineProperty(i,"B",{value:!0});var o=e(5186),a=e(5458),c=e(6056),l=e(250),u=function(t){function i(e){var s=t.call(this)||this;s.isReady_=!1,s.isLatest=!1;var n=i.baseUrl;if(s.lang_=i.DEFAULT_LANGUAGE,s.isVendorList(e))s.populate(e),s.readyPromise=Promise.resolve();else{if(!n)throw new a.GVLError("must specify GVL.baseUrl before loading GVL json");if(e>0){var r=e;i.CACHE.has(r)?(s.populate(i.CACHE.get(r)),s.readyPromise=Promise.resolve()):(n+=i.versionedFilename.replace("[VERSION]",r+""),s.readyPromise=s.fetchJson(n))}else i.CACHE.has(i.LATEST_CACHE_KEY)?(s.populate(i.CACHE.get(i.LATEST_CACHE_KEY)),s.readyPromise=Promise.resolve()):(s.isLatest=!0,s.readyPromise=s.fetchJson(n+i.latestFilename))}return s}return n(i,t),Object.defineProperty(i,"baseUrl",{get:function(){return this.baseUrl_},set:function(t){if(/^https?:\/\/vendorlist\.consensu\.org\//.test(t))throw new a.GVLError("Invalid baseUrl!  You may not pull directly from vendorlist.consensu.org and must provide your own cache");t.length>0&&"/"!==t[t.length-1]&&(t+="/"),this.baseUrl_=t},enumerable:!0,configurable:!0}),i.emptyLanguageCache=function(t){var e=!1;return void 0===t&&i.LANGUAGE_CACHE.size>0?(i.LANGUAGE_CACHE=new Map,e=!0):"string"==typeof t&&this.consentLanguages.has(t.toUpperCase())&&(i.LANGUAGE_CACHE.delete(t.toUpperCase()),e=!0),e},i.emptyCache=function(t){var e=!1;return Number.isInteger(t)&&t>=0?(i.CACHE.delete(t),e=!0):void 0===t&&(i.CACHE=new Map,e=!0),e},i.prototype.cacheLanguage=function(){i.LANGUAGE_CACHE.has(this.lang_)||i.LANGUAGE_CACHE.set(this.lang_,{purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks})},i.prototype.fetchJson=function(t){return r(this,void 0,void 0,(function(){var i,e;return h(this,(function(s){switch(s.label){case 0:return s.trys.push([0,2,,3]),i=this.populate,[4,c.Json.fetch(t)];case 1:return i.apply(this,[s.sent()]),[3,3];case 2:throw e=s.sent(),new a.GVLError(e.message);case 3:return[2]}}))}))},i.prototype.getJson=function(){return JSON.parse(JSON.stringify({gvlSpecificationVersion:this.gvlSpecificationVersion,vendorListVersion:this.vendorListVersion,tcfPolicyVersion:this.tcfPolicyVersion,lastUpdated:this.lastUpdated,purposes:this.purposes,specialPurposes:this.specialPurposes,features:this.features,specialFeatures:this.specialFeatures,stacks:this.stacks,vendors:this.fullVendorList}))},i.prototype.changeLanguage=function(t){return r(this,void 0,void 0,(function(){var e,s,n,r,o;return h(this,(function(h){switch(h.label){case 0:if(e=t.toUpperCase(),!i.consentLanguages.has(e))return[3,6];if(e===this.lang_)return[3,5];if(this.lang_=e,!i.LANGUAGE_CACHE.has(e))return[3,1];for(n in s=i.LANGUAGE_CACHE.get(e))s.hasOwnProperty(n)&&(this[n]=s[n]);return[3,5];case 1:r=i.baseUrl+i.languageFilename.replace("[LANG]",t),h.label=2;case 2:return h.trys.push([2,4,,5]),[4,this.fetchJson(r)];case 3:return h.sent(),this.cacheLanguage(),[3,5];case 4:throw o=h.sent(),new a.GVLError("unable to load language: "+o.message);case 5:return[3,7];case 6:throw new a.GVLError("unsupported language "+t);case 7:return[2]}}))}))},Object.defineProperty(i.prototype,"language",{get:function(){return this.lang_},enumerable:!0,configurable:!0}),i.prototype.isVendorList=function(t){return void 0!==t&&void 0!==t.vendors},i.prototype.populate=function(t){this.purposes=t.purposes,this.specialPurposes=t.specialPurposes,this.features=t.features,this.specialFeatures=t.specialFeatures,this.stacks=t.stacks,this.isVendorList(t)&&(this.gvlSpecificationVersion=t.gvlSpecificationVersion,this.tcfPolicyVersion=t.tcfPolicyVersion,this.vendorListVersion=t.vendorListVersion,this.lastUpdated=t.lastUpdated,"string"==typeof this.lastUpdated&&(this.lastUpdated=new Date(this.lastUpdated)),this.vendors_=t.vendors,this.fullVendorList=t.vendors,this.mapVendors(),this.isReady_=!0,this.isLatest&&i.CACHE.set(i.LATEST_CACHE_KEY,this.getJson()),i.CACHE.has(this.vendorListVersion)||i.CACHE.set(this.vendorListVersion,this.getJson())),this.cacheLanguage()},i.prototype.mapVendors=function(t){var i=this;this.byPurposeVendorMap={},this.bySpecialPurposeVendorMap={},this.byFeatureVendorMap={},this.bySpecialFeatureVendorMap={},Object.keys(this.purposes).forEach((function(t){i.byPurposeVendorMap[t]={legInt:new Set,consent:new Set,flexible:new Set}})),Object.keys(this.specialPurposes).forEach((function(t){i.bySpecialPurposeVendorMap[t]=new Set})),Object.keys(this.features).forEach((function(t){i.byFeatureVendorMap[t]=new Set})),Object.keys(this.specialFeatures).forEach((function(t){i.bySpecialFeatureVendorMap[t]=new Set})),Array.isArray(t)||(t=Object.keys(this.fullVendorList).map((function(t){return+t}))),this.vendorIds=new Set(t),this.vendors_=t.reduce((function(t,e){var s=i.vendors_[""+e];return s&&void 0===s.deletedDate&&(s.purposes.forEach((function(t){i.byPurposeVendorMap[t+""].consent.add(e)})),s.specialPurposes.forEach((function(t){i.bySpecialPurposeVendorMap[t+""].add(e)})),s.legIntPurposes.forEach((function(t){i.byPurposeVendorMap[t+""].legInt.add(e)})),s.flexiblePurposes&&s.flexiblePurposes.forEach((function(t){i.byPurposeVendorMap[t+""].flexible.add(e)})),s.features.forEach((function(t){i.byFeatureVendorMap[t+""].add(e)})),s.specialFeatures.forEach((function(t){i.bySpecialFeatureVendorMap[t+""].add(e)})),t[e]=s),t}),{})},i.prototype.getFilteredVendors=function(t,i,e,s){var n=this,r=t.charAt(0).toUpperCase()+t.slice(1),h={};return("purpose"===t&&e?this["by"+r+"VendorMap"][i+""][e]:this["by"+(s?"Special":"")+r+"VendorMap"][i+""]).forEach((function(t){h[t+""]=n.vendors[t+""]})),h},i.prototype.getVendorsWithConsentPurpose=function(t){return this.getFilteredVendors("purpose",t,"consent")},i.prototype.getVendorsWithLegIntPurpose=function(t){return this.getFilteredVendors("purpose",t,"legInt")},i.prototype.getVendorsWithFlexiblePurpose=function(t){return this.getFilteredVendors("purpose",t,"flexible")},i.prototype.getVendorsWithSpecialPurpose=function(t){return this.getFilteredVendors("purpose",t,void 0,!0)},i.prototype.getVendorsWithFeature=function(t){return this.getFilteredVendors("feature",t)},i.prototype.getVendorsWithSpecialFeature=function(t){return this.getFilteredVendors("feature",t,void 0,!0)},Object.defineProperty(i.prototype,"vendors",{get:function(){return this.vendors_},enumerable:!0,configurable:!0}),i.prototype.narrowVendorsTo=function(t){this.mapVendors(t)},Object.defineProperty(i.prototype,"isReady",{get:function(){return this.isReady_},enumerable:!0,configurable:!0}),i.prototype.clone=function(){var t=new i(this.getJson());return this.lang_!==i.DEFAULT_LANGUAGE&&t.changeLanguage(this.lang_),t},i.isInstanceOf=function(t){return"object"==typeof t&&"function"==typeof t.narrowVendorsTo},i.LANGUAGE_CACHE=new Map,i.CACHE=new Map,i.LATEST_CACHE_KEY=0,i.DEFAULT_LANGUAGE="EN",i.consentLanguages=new l.ConsentLanguages,i.latestFilename="vendor-list.json",i.versionedFilename="archives/vendor-list-v[VERSION].json",i.languageFilename="purposes-[LANG].json",i}(o.Cloneable);i.GVL=u},6056:(t,i)=>{"use strict";Object.defineProperty(i,"B",{value:!0});var e=function(){function t(){}return t.absCall=function(t,i,e,s){return new Promise((function(n,r){var h=new XMLHttpRequest;h.withCredentials=e,h.addEventListener("load",(function(){if(h.readyState==XMLHttpRequest.DONE)if(h.status>=200&&h.status<300){var t=h.response;if("string"==typeof t)try{t=JSON.parse(t)}catch(t){}n(t)}else r(new Error("HTTP Status: "+h.status+" response type: "+h.responseType))})),h.addEventListener("error",(function(){r(new Error("error"))})),h.addEventListener("abort",(function(){r(new Error("aborted"))})),null===i?h.open("GET",t,!0):h.open("POST",t,!0),h.responseType="json",h.timeout=s,h.ontimeout=function(){r(new Error("Timeout "+s+"ms "+t))},h.send(i)}))},t.post=function(t,i,e,s){return void 0===e&&(e=!1),void 0===s&&(s=0),this.absCall(t,JSON.stringify(i),e,s)},t.fetch=function(t,i,e){return void 0===i&&(i=!1),void 0===e&&(e=0),this.absCall(t,null,i,e)},t}();i.Json=e},6382:function(t,i,e){"use strict";var s,n=this&&this.R||(s=function(t,i){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)i.hasOwnProperty(e)&&(t[e]=i[e])})(t,i)},function(t,i){function e(){this.constructor=t}s(t,i),t.prototype=null===i?Object.create(i):(e.prototype=i.prototype,new e)});Object.defineProperty(i,"B",{value:!0});var r=e(5186),h=e(5458),o=e(7061),a=e(250),c=function(t){function i(i){var e=t.call(this)||this;return e.isServiceSpecific_=!1,e.supportOOB_=!0,e.useNonStandardStacks_=!1,e.purposeOneTreatment_=!1,e.publisherCountryCode_="AA",e.version_=2,e.consentScreen_=0,e.policyVersion_=2,e.consentLanguage_="EN",e.cmpId_=0,e.cmpVersion_=0,e.vendorListVersion_=0,e.numCustomPurposes_=0,e.specialFeatureOptins=new a.Vector,e.purposeConsents=new a.Vector,e.purposeLegitimateInterests=new a.Vector,e.publisherConsents=new a.Vector,e.publisherLegitimateInterests=new a.Vector,e.publisherCustomConsents=new a.Vector,e.publisherCustomLegitimateInterests=new a.Vector,e.vendorConsents=new a.Vector,e.vendorLegitimateInterests=new a.Vector,e.vendorsDisclosed=new a.Vector,e.vendorsAllowed=new a.Vector,e.publisherRestrictions=new a.PurposeRestrictionVector,i&&(e.gvl=i),e.created=new Date,e.updated(),e}return n(i,t),Object.defineProperty(i.prototype,"gvl",{get:function(){return this.gvl_},set:function(t){o.GVL.isInstanceOf(t)||(t=new o.GVL(t)),this.gvl_=t,this.publisherRestrictions.gvl=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"cmpId",{get:function(){return this.cmpId_},set:function(t){if(!(Number.isInteger(+t)&&t>1))throw new h.TCModelError("cmpId",t);this.cmpId_=+t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"cmpVersion",{get:function(){return this.cmpVersion_},set:function(t){if(!(Number.isInteger(+t)&&t>-1))throw new h.TCModelError("cmpVersion",t);this.cmpVersion_=+t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"consentScreen",{get:function(){return this.consentScreen_},set:function(t){if(!(Number.isInteger(+t)&&t>-1))throw new h.TCModelError("consentScreen",t);this.consentScreen_=+t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"consentLanguage",{get:function(){return this.consentLanguage_},set:function(t){this.consentLanguage_=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"publisherCountryCode",{get:function(){return this.publisherCountryCode_},set:function(t){if(!/^([A-z]){2}$/.test(t))throw new h.TCModelError("publisherCountryCode",t);this.publisherCountryCode_=t.toUpperCase()},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"vendorListVersion",{get:function(){return this.gvl?this.gvl.vendorListVersion:this.vendorListVersion_},set:function(t){if((t=+t>>0)<0)throw new h.TCModelError("vendorListVersion",t);this.vendorListVersion_=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"policyVersion",{get:function(){return this.gvl?this.gvl.tcfPolicyVersion:this.policyVersion_},set:function(t){if(this.policyVersion_=parseInt(t,10),this.policyVersion_<0)throw new h.TCModelError("policyVersion",t)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"version",{get:function(){return this.version_},set:function(t){this.version_=parseInt(t,10)},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"isServiceSpecific",{get:function(){return this.isServiceSpecific_},set:function(t){this.isServiceSpecific_=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"useNonStandardStacks",{get:function(){return this.useNonStandardStacks_},set:function(t){this.useNonStandardStacks_=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"supportOOB",{get:function(){return this.supportOOB_},set:function(t){this.supportOOB_=t},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"purposeOneTreatment",{get:function(){return this.purposeOneTreatment_},set:function(t){this.purposeOneTreatment_=t},enumerable:!0,configurable:!0}),i.prototype.setAllVendorConsents=function(){this.vendorConsents.set(this.gvl.vendors)},i.prototype.unsetAllVendorConsents=function(){this.vendorConsents.empty()},i.prototype.setAllVendorsDisclosed=function(){this.vendorsDisclosed.set(this.gvl.vendors)},i.prototype.unsetAllVendorsDisclosed=function(){this.vendorsDisclosed.empty()},i.prototype.setAllVendorsAllowed=function(){this.vendorsAllowed.set(this.gvl.vendors)},i.prototype.unsetAllVendorsAllowed=function(){this.vendorsAllowed.empty()},i.prototype.setAllVendorLegitimateInterests=function(){this.vendorLegitimateInterests.set(this.gvl.vendors)},i.prototype.unsetAllVendorLegitimateInterests=function(){this.vendorLegitimateInterests.empty()},i.prototype.setAllPurposeConsents=function(){this.purposeConsents.set(this.gvl.purposes)},i.prototype.unsetAllPurposeConsents=function(){this.purposeConsents.empty()},i.prototype.setAllPurposeLegitimateInterests=function(){this.purposeLegitimateInterests.set(this.gvl.purposes)},i.prototype.unsetAllPurposeLegitimateInterests=function(){this.purposeLegitimateInterests.empty()},i.prototype.setAllSpecialFeatureOptins=function(){this.specialFeatureOptins.set(this.gvl.specialFeatures)},i.prototype.unsetAllSpecialFeatureOptins=function(){this.specialFeatureOptins.empty()},i.prototype.setAll=function(){this.setAllVendorConsents(),this.setAllPurposeLegitimateInterests(),this.setAllSpecialFeatureOptins(),this.setAllPurposeConsents(),this.setAllVendorLegitimateInterests()},i.prototype.unsetAll=function(){this.unsetAllVendorConsents(),this.unsetAllPurposeLegitimateInterests(),this.unsetAllSpecialFeatureOptins(),this.unsetAllPurposeConsents(),this.unsetAllVendorLegitimateInterests()},Object.defineProperty(i.prototype,"numCustomPurposes",{get:function(){var t=this.numCustomPurposes_;if("object"==typeof this.customPurposes){var i=Object.keys(this.customPurposes).sort((function(t,i){return+t-+i}));t=parseInt(i.pop(),10)}return t},set:function(t){if(this.numCustomPurposes_=parseInt(t,10),this.numCustomPurposes_<0)throw new h.TCModelError("numCustomPurposes",t)},enumerable:!0,configurable:!0}),i.prototype.updated=function(){this.lastUpdated=new Date},i.consentLanguages=o.GVL.consentLanguages,i}(r.Cloneable);i.TCModel=c},2381:(t,i,e)=>{"use strict";var s=e(7170),n=e(250),r=e(2082),h=e(6382),o=function(){function t(){}return t.encode=function(t,i){var e,n,r="";return t=s.SemanticPreEncoder.process(t,i),(n=Array.isArray(null===(e=i)||void 0===e?void 0:e.segments)?i.segments:new s.SegmentSequence(t,i)[""+t.version]).forEach((function(i,e){var h="";e<n.length-1&&(h="."),r+=s.SegmentEncoder.encode(t,i)+h})),r},t.decode=function(t,i){var e=t.split("."),o=e.length;i||(i=new h.TCModel);for(var a=0;a<o;a++){var c=e[a],l=s.Base64Url.decode(c.charAt(0)).substr(0,s.BitLength.segmentType),u=n.SegmentIDs.ID_TO_KEY[r.IntEncoder.decode(l,s.BitLength.segmentType).toString()];s.SegmentEncoder.decode(c,i,u)}return i},t}();i.E=o},4479:(t,i,e)=>{"use strict";Object.defineProperty(i,"B",{value:!0});var s=e(5458),n=function(){function t(){}return t.encode=function(t){if(!/^[0-1]+$/.test(t))throw new s.EncodingError("Invalid bitField");var i=t.length%this.LCM;t+=i?"0".repeat(this.LCM-i):"";for(var e="",n=0;n<t.length;n+=this.BASIS)e+=this.DICT[parseInt(t.substr(n,this.BASIS),2)];return e},t.decode=function(t){if(!/^[A-Za-z0-9\-_]+$/.test(t))throw new s.DecodingError("Invalidly encoded Base64URL string");for(var i="",e=0;e<t.length;e++){var n=this.REVERSE_DICT.get(t[e]).toString(2);i+="0".repeat(this.BASIS-n.length)+n}return i},t.DICT="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789-_",t.REVERSE_DICT=new Map([["A",0],["B",1],["C",2],["D",3],["E",4],["F",5],["G",6],["H",7],["I",8],["J",9],["K",10],["L",11],["M",12],["N",13],["O",14],["P",15],["Q",16],["R",17],["S",18],["T",19],["U",20],["V",21],["W",22],["X",23],["Y",24],["Z",25],["a",26],["b",27],["c",28],["d",29],["e",30],["f",31],["g",32],["h",33],["i",34],["j",35],["k",36],["l",37],["m",38],["n",39],["o",40],["p",41],["q",42],["r",43],["s",44],["t",45],["u",46],["v",47],["w",48],["x",49],["y",50],["z",51],["0",52],["1",53],["2",54],["3",55],["4",56],["5",57],["6",58],["7",59],["8",60],["9",61],["-",62],["_",63]]),t.BASIS=6,t.LCM=24,t}();i.Base64Url=n},2219:(t,i,e)=>{"use strict";Object.defineProperty(i,"B",{value:!0});var s=e(250),n=function(){function t(){}var i,e,n,r,h,o,a,c,l,u,d,p,f,m,g,v,y,b;return i=s.Fields.cmpId,e=s.Fields.cmpVersion,n=s.Fields.consentLanguage,r=s.Fields.consentScreen,h=s.Fields.created,o=s.Fields.isServiceSpecific,a=s.Fields.lastUpdated,c=s.Fields.policyVersion,l=s.Fields.publisherCountryCode,u=s.Fields.publisherLegitimateInterests,d=s.Fields.publisherConsents,p=s.Fields.purposeConsents,f=s.Fields.purposeLegitimateInterests,m=s.Fields.purposeOneTreatment,g=s.Fields.specialFeatureOptins,v=s.Fields.useNonStandardStacks,y=s.Fields.vendorListVersion,b=s.Fields.version,t[i]=12,t[e]=12,t[n]=12,t[r]=6,t[h]=36,t[o]=1,t[a]=36,t[c]=6,t[l]=12,t[u]=24,t[d]=24,t[p]=24,t[f]=24,t[m]=1,t[g]=12,t[v]=1,t[y]=12,t[b]=6,t.anyBoolean=1,t.encodingType=1,t.maxId=16,t.numCustomPurposes=6,t.numEntries=12,t.numRestrictions=12,t.purposeId=6,t.restrictionType=2,t.segmentType=3,t.singleOrRange=1,t.vendorId=16,t}();i.BitLength=n},3858:(t,i,e)=>{"use strict";Object.defineProperty(i,"B",{value:!0});var s=e(4479),n=e(2219),r=e(9836),h=e(8780),o=e(5458),a=e(4731),c=e(250),l=function(){function t(){}return t.encode=function(t,i){var e,h=this;try{e=this.fieldSequence[""+t.version][i]}catch(e){throw new o.EncodingError("Unable to encode version: "+t.version+", segment: "+i)}var l="";return i!==c.Segment.CORE&&(l=r.IntEncoder.encode(c.SegmentIDs.KEY_TO_ID[i],n.BitLength.segmentType)),e.forEach((function(e){var s=t[e],c=r.FieldEncoderMap[e],u=n.BitLength[e];void 0===u&&h.isPublisherCustom(e)&&(u=+t[a.Fields.numCustomPurposes]);try{l+=c.encode(s,u)}catch(t){throw new o.EncodingError("Error encoding "+i+"->"+e+": "+t.message)}})),s.Base64Url.encode(l)},t.decode=function(t,i,e){var h=this,l=s.Base64Url.decode(t),u=0;return e===c.Segment.CORE&&(i.version=r.IntEncoder.decode(l.substr(u,n.BitLength[a.Fields.version]),n.BitLength[a.Fields.version])),e!==c.Segment.CORE&&(u+=n.BitLength.segmentType),this.fieldSequence[""+i.version][e].forEach((function(t){var e=r.FieldEncoderMap[t],s=n.BitLength[t];if(void 0===s&&h.isPublisherCustom(t)&&(s=+i[a.Fields.numCustomPurposes]),0!==s){var c=l.substr(u,s);if(e===r.VendorVectorEncoder?i[t]=e.decode(c,i.version):i[t]=e.decode(c,s),Number.isInteger(s))u+=s;else{if(!Number.isInteger(i[t].bitLength))throw new o.DecodingError(t);u+=i[t].bitLength}}})),i},t.isPublisherCustom=function(t){return 0===t.indexOf("publisherCustom")},t.fieldSequence=new h.FieldSequence,t}();i.SegmentEncoder=l},818:(t,i,e)=>{"use strict";Object.defineProperty(i,"B",{value:!0});var s=e(5458),n=e(250),r=function(){function t(){}return t.process=function(t,i){var e,n,r=t.gvl;if(!r)throw new s.EncodingError("Unable to encode TCModel without a GVL");if(!r.isReady)throw new s.EncodingError("Unable to encode TCModel tcModel.gvl.readyPromise is not resolved");(t=t.clone()).consentLanguage=r.language.toUpperCase(),(null===(e=i)||void 0===e?void 0:e.version)>0&&(null===(n=i)||void 0===n?void 0:n.version)<=this.processor.length?t.version=i.version:t.version=this.processor.length;var h=t.version-1;if(!this.processor[h])throw new s.EncodingError("Invalid version: "+t.version);return this.processor[h](t,r)},t.processor=[function(t){return t},function(t,i){t.publisherRestrictions.gvl=i,t.purposeLegitimateInterests.unset(1);var e=new Map;return e.set("legIntPurposes",t.vendorLegitimateInterests),e.set("purposes",t.vendorConsents),e.forEach((function(e,s){e.forEach((function(r,h){if(r){var o=i.vendors[h];if(!o||o.deletedDate)e.unset(h);else if(0===o[s].length)if("legIntPurposes"===s&&0===o.purposes.length&&0===o.legIntPurposes.length&&o.specialPurposes.length>0);else if(t.isServiceSpecific)if(0===o.flexiblePurposes.length)e.unset(h);else{for(var a=t.publisherRestrictions.getRestrictions(h),c=!1,l=0,u=a.length;l<u&&!c;l++)c=a[l].restrictionType===n.RestrictionType.REQUIRE_CONSENT&&"purposes"===s||a[l].restrictionType===n.RestrictionType.REQUIRE_LI&&"legIntPurposes"===s;c||e.unset(h)}else e.unset(h)}}))})),t.vendorsDisclosed.set(i.vendors),t}],t}();i.SemanticPreEncoder=r},632:(t,i)=>{"use strict";Object.defineProperty(i,"B",{value:!0});var e=function(){function t(){}return t.encode=function(t){return+t+""},t.decode=function(t){return"1"===t},t}();i.BooleanEncoder=e},3101:(t,i,e)=>{"use strict";Object.defineProperty(i,"B",{value:!0});var s=e(2082),n=e(5458),r=function(){function t(){}return t.encode=function(t,i){return s.IntEncoder.encode(Math.round(t.getTime()/100),i)},t.decode=function(t,i){if(i!==t.length)throw new n.DecodingError("invalid bit length");var e=new Date;return e.setTime(100*s.IntEncoder.decode(t,i)),e},t}();i.DateEncoder=r},286:(t,i,e)=>{"use strict";Object.defineProperty(i,"B",{value:!0});var s=e(250),n=e(632),r=e(3101),h=e(8937),o=e(2082),a=e(835),c=e(5889),l=e(3283),u=function(){function t(){}var i,e,u,d,p,f,m,g,v,y,b,x,w,_,S,A,P,I,k,C,T,M,E,B,O,L;return i=s.Fields.version,e=s.Fields.created,u=s.Fields.lastUpdated,d=s.Fields.cmpId,p=s.Fields.cmpVersion,f=s.Fields.consentScreen,m=s.Fields.consentLanguage,g=s.Fields.vendorListVersion,v=s.Fields.policyVersion,y=s.Fields.isServiceSpecific,b=s.Fields.useNonStandardStacks,x=s.Fields.specialFeatureOptins,w=s.Fields.purposeConsents,_=s.Fields.purposeLegitimateInterests,S=s.Fields.purposeOneTreatment,A=s.Fields.publisherCountryCode,P=s.Fields.vendorConsents,I=s.Fields.vendorLegitimateInterests,k=s.Fields.publisherRestrictions,C=s.Fields.vendorsDisclosed,T=s.Fields.vendorsAllowed,M=s.Fields.publisherConsents,E=s.Fields.publisherLegitimateInterests,B=s.Fields.numCustomPurposes,O=s.Fields.publisherCustomConsents,L=s.Fields.publisherCustomLegitimateInterests,t[i]=o.IntEncoder,t[e]=r.DateEncoder,t[u]=r.DateEncoder,t[d]=o.IntEncoder,t[p]=o.IntEncoder,t[f]=o.IntEncoder,t[m]=a.LangEncoder,t[g]=o.IntEncoder,t[v]=o.IntEncoder,t[y]=n.BooleanEncoder,t[b]=n.BooleanEncoder,t[x]=h.FixedVectorEncoder,t[w]=h.FixedVectorEncoder,t[_]=h.FixedVectorEncoder,t[S]=n.BooleanEncoder,t[A]=a.LangEncoder,t[P]=l.VendorVectorEncoder,t[I]=l.VendorVectorEncoder,t[k]=c.PurposeRestrictionVectorEncoder,t.segmentType=o.IntEncoder,t[C]=l.VendorVectorEncoder,t[T]=l.VendorVectorEncoder,t[M]=h.FixedVectorEncoder,t[E]=h.FixedVectorEncoder,t[B]=o.IntEncoder,t[O]=h.FixedVectorEncoder,t[L]=h.FixedVectorEncoder,t}();i.FieldEncoderMap=u},8937:(t,i,e)=>{"use strict";Object.defineProperty(i,"B",{value:!0});var s=e(632),n=e(5458),r=e(250),h=function(){function t(){}return t.encode=function(t,i){for(var e="",n=1;n<=i;n++)e+=s.BooleanEncoder.encode(t.has(n));return e},t.decode=function(t,i){if(t.length!==i)throw new n.DecodingError("bitfield encoding length mismatch");for(var e=new r.Vector,h=1;h<=i;h++)s.BooleanEncoder.decode(t[h-1])&&e.set(h);return e.bitLength=t.length,e},t}();i.FixedVectorEncoder=h},2082:(t,i,e)=>{"use strict";Object.defineProperty(i,"B",{value:!0});var s=e(5458),n=function(){function t(){}return t.encode=function(t,i){var e;if("string"==typeof t&&(t=parseInt(t,10)),(e=t.toString(2)).length>i||t<0)throw new s.EncodingError(t+" too large to encode into "+i);return e.length<i&&(e="0".repeat(i-e.length)+e),e},t.decode=function(t,i){if(i!==t.length)throw new s.DecodingError("invalid bit length");return parseInt(t,2)},t}();i.IntEncoder=n},835:(t,i,e)=>{"use strict";Object.defineProperty(i,"B",{value:!0});var s=e(2082),n=e(5458),r=function(){function t(){}return t.encode=function(t,i){var e=(t=t.toUpperCase()).charCodeAt(0)-65,r=t.charCodeAt(1)-65;if(e<0||e>25||r<0||r>25)throw new n.EncodingError("invalid language code: "+t);if(i%2==1)throw new n.EncodingError("numBits must be even, "+i+" is not valid");return i/=2,s.IntEncoder.encode(e,i)+s.IntEncoder.encode(r,i)},t.decode=function(t,i){if(i!==t.length||t.length%2)throw new n.DecodingError("invalid bit length for language");var e=t.length/2,r=s.IntEncoder.decode(t.slice(0,e),e)+65,h=s.IntEncoder.decode(t.slice(e),e)+65;return String.fromCharCode(r)+String.fromCharCode(h)},t}();i.LangEncoder=r},5889:(t,i,e)=>{"use strict";Object.defineProperty(i,"B",{value:!0});var s=e(2219),n=e(632),r=e(5458),h=e(2082),o=e(250),a=function(){function t(){}return t.encode=function(t){var i=h.IntEncoder.encode(t.numRestrictions,s.BitLength.numRestrictions);return t.isEmpty()||t.getRestrictions().forEach((function(e){i+=h.IntEncoder.encode(e.purposeId,s.BitLength.purposeId),i+=h.IntEncoder.encode(e.restrictionType,s.BitLength.restrictionType);for(var r=t.getVendors(e),o=r.length,a=0,c=0,l="",u=function(i){var e=r[i];0===c&&(a++,c=e);var u=r[o-1],d=t.gvl.vendorIds;if(i===o-1||r[i+1]>function(t){for(;++t<=u&&!d.has(t););return t}(e)){var p=!(e===c);l+=n.BooleanEncoder.encode(p),l+=h.IntEncoder.encode(c,s.BitLength.vendorId),p&&(l+=h.IntEncoder.encode(e,s.BitLength.vendorId)),c=0}},d=0;d<o;d++)u(d);i+=h.IntEncoder.encode(a,s.BitLength.numEntries),i+=l})),i},t.decode=function(t){var i=0,e=new o.PurposeRestrictionVector,a=h.IntEncoder.decode(t.substr(i,s.BitLength.numRestrictions),s.BitLength.numRestrictions);i+=s.BitLength.numRestrictions;for(var c=0;c<a;c++){var l=h.IntEncoder.decode(t.substr(i,s.BitLength.purposeId),s.BitLength.purposeId);i+=s.BitLength.purposeId;var u=h.IntEncoder.decode(t.substr(i,s.BitLength.restrictionType),s.BitLength.restrictionType);i+=s.BitLength.restrictionType;var d=new o.PurposeRestriction(l,u),p=h.IntEncoder.decode(t.substr(i,s.BitLength.numEntries),s.BitLength.numEntries);i+=s.BitLength.numEntries;for(var f=0;f<p;f++){var m=n.BooleanEncoder.decode(t.substr(i,s.BitLength.anyBoolean));i+=s.BitLength.anyBoolean;var g=h.IntEncoder.decode(t.substr(i,s.BitLength.vendorId),s.BitLength.vendorId);if(i+=s.BitLength.vendorId,m){var v=h.IntEncoder.decode(t.substr(i,s.BitLength.vendorId),s.BitLength.vendorId);if(i+=s.BitLength.vendorId,v<g)throw new r.DecodingError("Invalid RangeEntry: endVendorId "+v+" is less than "+g);for(var y=g;y<=v;y++)e.add(y,d)}else e.add(g,d)}}return e.bitLength=i,e},t}();i.PurposeRestrictionVectorEncoder=a},1938:(t,i)=>{"use strict";var e;Object.defineProperty(i,"B",{value:!0}),(e=i.VectorEncodingType||(i.VectorEncodingType={}))[e.FIELD=0]="FIELD",e[e.RANGE=1]="RANGE"},3283:(t,i,e)=>{"use strict";Object.defineProperty(i,"B",{value:!0});var s=e(250),n=e(7170),r=e(2082),h=e(632),o=e(8937),a=e(1938),c=e(5458),l=function(){function t(){}return t.encode=function(t){var i,e=[],s=[],o=r.IntEncoder.encode(t.maxId,n.BitLength.maxId),c="",l=n.BitLength.maxId+n.BitLength.encodingType,u=l+t.maxId,d=2*n.BitLength.vendorId+n.BitLength.singleOrRange+n.BitLength.numEntries,p=l+n.BitLength.numEntries;return t.forEach((function(r,o){c+=h.BooleanEncoder.encode(r),(i=t.maxId>d&&p<u)&&r&&(t.has(o+1)?0===s.length&&(s.push(o),p+=n.BitLength.singleOrRange,p+=n.BitLength.vendorId):(s.push(o),p+=n.BitLength.vendorId,e.push(s),s=[]))})),i?(o+=a.VectorEncodingType.RANGE+"",o+=this.buildRangeEncoding(e)):(o+=a.VectorEncodingType.FIELD+"",o+=c),o},t.decode=function(t,i){var e,l=0,u=r.IntEncoder.decode(t.substr(l,n.BitLength.maxId),n.BitLength.maxId);l+=n.BitLength.maxId;var d=r.IntEncoder.decode(t.charAt(l),n.BitLength.encodingType);if(l+=n.BitLength.encodingType,d===a.VectorEncodingType.RANGE){if(e=new s.Vector,1===i){if("1"===t.substr(l,1))throw new c.DecodingError("Unable to decode default consent=1");l++}var p=r.IntEncoder.decode(t.substr(l,n.BitLength.numEntries),n.BitLength.numEntries);l+=n.BitLength.numEntries;for(var f=0;f<p;f++){var m=h.BooleanEncoder.decode(t.charAt(l));l+=n.BitLength.singleOrRange;var g=r.IntEncoder.decode(t.substr(l,n.BitLength.vendorId),n.BitLength.vendorId);if(l+=n.BitLength.vendorId,m){var v=r.IntEncoder.decode(t.substr(l,n.BitLength.vendorId),n.BitLength.vendorId);l+=n.BitLength.vendorId;for(var y=g;y<=v;y++)e.set(y)}else e.set(g)}}else{var b=t.substr(l,u);l+=u,e=o.FixedVectorEncoder.decode(b,u)}return e.bitLength=l,e},t.buildRangeEncoding=function(t){var i=t.length,e=r.IntEncoder.encode(i,n.BitLength.numEntries);return t.forEach((function(t){var i=1===t.length;e+=h.BooleanEncoder.encode(!i),e+=r.IntEncoder.encode(t[0],n.BitLength.vendorId),i||(e+=r.IntEncoder.encode(t[1],n.BitLength.vendorId))})),e},t}();i.VendorVectorEncoder=l},9836:(t,i,e)=>{"use strict";function s(t){for(var e in t)i.hasOwnProperty(e)||(i[e]=t[e])}Object.defineProperty(i,"B",{value:!0}),s(e(632)),s(e(3101)),s(e(286)),s(e(8937)),s(e(2082)),s(e(835)),s(e(5889)),s(e(1938)),s(e(3283))},7170:(t,i,e)=>{"use strict";function s(t){for(var e in t)i.hasOwnProperty(e)||(i[e]=t[e])}Object.defineProperty(i,"B",{value:!0}),s(e(4479)),s(e(2219)),s(e(3858)),s(e(818)),s(e(9836)),s(e(8780))},4014:(t,i,e)=>{"use strict";Object.defineProperty(i,"B",{value:!0});var s=e(250);i.FieldSequence=function(){var t,i;this[1]=((t={})[s.Segment.CORE]=[s.Fields.version,s.Fields.created,s.Fields.lastUpdated,s.Fields.cmpId,s.Fields.cmpVersion,s.Fields.consentScreen,s.Fields.consentLanguage,s.Fields.vendorListVersion,s.Fields.purposeConsents,s.Fields.vendorConsents],t),this[2]=((i={})[s.Segment.CORE]=[s.Fields.version,s.Fields.created,s.Fields.lastUpdated,s.Fields.cmpId,s.Fields.cmpVersion,s.Fields.consentScreen,s.Fields.consentLanguage,s.Fields.vendorListVersion,s.Fields.policyVersion,s.Fields.isServiceSpecific,s.Fields.useNonStandardStacks,s.Fields.specialFeatureOptins,s.Fields.purposeConsents,s.Fields.purposeLegitimateInterests,s.Fields.purposeOneTreatment,s.Fields.publisherCountryCode,s.Fields.vendorConsents,s.Fields.vendorLegitimateInterests,s.Fields.publisherRestrictions],i[s.Segment.PUBLISHER_TC]=[s.Fields.publisherConsents,s.Fields.publisherLegitimateInterests,s.Fields.numCustomPurposes,s.Fields.publisherCustomConsents,s.Fields.publisherCustomLegitimateInterests],i[s.Segment.VENDORS_ALLOWED]=[s.Fields.vendorsAllowed],i[s.Segment.VENDORS_DISCLOSED]=[s.Fields.vendorsDisclosed],i)}},1333:(t,i,e)=>{"use strict";Object.defineProperty(i,"B",{value:!0});var s=e(250);i.SegmentSequence=function(t,i){if(this[1]=[s.Segment.CORE],this[2]=[s.Segment.CORE],2===t.version)if(t.isServiceSpecific)this[2].push(s.Segment.PUBLISHER_TC);else{var e=!(!i||!i.isForVendors);e&&!0!==t[s.Fields.supportOOB]||this[2].push(s.Segment.VENDORS_DISCLOSED),e&&(t[s.Fields.supportOOB]&&t[s.Fields.vendorsAllowed].size>0&&this[2].push(s.Segment.VENDORS_ALLOWED),this[2].push(s.Segment.PUBLISHER_TC))}}},8780:(t,i,e)=>{"use strict";function s(t){for(var e in t)i.hasOwnProperty(e)||(i[e]=t[e])}Object.defineProperty(i,"B",{value:!0}),s(e(4014)),s(e(1333))},1265:function(t,i){"use strict";var e,s=this&&this.R||(e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)i.hasOwnProperty(e)&&(t[e]=i[e])})(t,i)},function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)});Object.defineProperty(i,"B",{value:!0});var n=function(t){function i(i){var e=t.call(this,i)||this;return e.name="DecodingError",e}return s(i,t),i}(Error);i.DecodingError=n},5181:function(t,i){"use strict";var e,s=this&&this.R||(e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)i.hasOwnProperty(e)&&(t[e]=i[e])})(t,i)},function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)});Object.defineProperty(i,"B",{value:!0});var n=function(t){function i(i){var e=t.call(this,i)||this;return e.name="EncodingError",e}return s(i,t),i}(Error);i.EncodingError=n},9565:function(t,i){"use strict";var e,s=this&&this.R||(e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)i.hasOwnProperty(e)&&(t[e]=i[e])})(t,i)},function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)});Object.defineProperty(i,"B",{value:!0});var n=function(t){function i(i){var e=t.call(this,i)||this;return e.name="GVLError",e}return s(i,t),i}(Error);i.GVLError=n},9995:function(t,i){"use strict";var e,s=this&&this.R||(e=function(t,i){return(e=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)i.hasOwnProperty(e)&&(t[e]=i[e])})(t,i)},function(t,i){function s(){this.constructor=t}e(t,i),t.prototype=null===i?Object.create(i):(s.prototype=i.prototype,new s)});Object.defineProperty(i,"B",{value:!0});var n=function(t){function i(i,e,s){void 0===s&&(s="");var n=t.call(this,"invalid value "+e+" passed for "+i+" "+s)||this;return n.name="TCModelError",n}return s(i,t),i}(Error);i.TCModelError=n},5458:(t,i,e)=>{"use strict";function s(t){for(var e in t)i.hasOwnProperty(e)||(i[e]=t[e])}Object.defineProperty(i,"B",{value:!0}),s(e(1265)),s(e(5181)),s(e(9565)),s(e(9995))},5995:function(t,i,e){"use strict";var s,n=this&&this.R||(s=function(t,i){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)i.hasOwnProperty(e)&&(t[e]=i[e])})(t,i)},function(t,i){function e(){this.constructor=t}s(t,i),t.prototype=null===i?Object.create(i):(e.prototype=i.prototype,new e)});Object.defineProperty(i,"B",{value:!0});var r=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.root=null,i}return n(i,t),i.prototype.isEmpty=function(){return!this.root},i.prototype.add=function(t){var i,e={value:t,left:null,right:null};if(this.isEmpty())this.root=e;else for(i=this.root;;)if(t<i.value){if(null===i.left){i.left=e;break}i=i.left}else{if(!(t>i.value))break;if(null===i.right){i.right=e;break}i=i.right}},i.prototype.get=function(){for(var t=[],i=this.root;i;)if(i.left){for(var e=i.left;e.right&&e.right!=i;)e=e.right;e.right==i?(e.right=null,t.push(i.value),i=i.right):(e.right=i,i=i.left)}else t.push(i.value),i=i.right;return t},i.prototype.contains=function(t){for(var i=!1,e=this.root;e;){if(e.value===t){i=!0;break}t>e.value?e=e.right:t<e.value&&(e=e.left)}return i},i.prototype.min=function(t){var i;for(void 0===t&&(t=this.root);t;)t.left?t=t.left:(i=t.value,t=null);return i},i.prototype.max=function(t){var i;for(void 0===t&&(t=this.root);t;)t.right?t=t.right:(i=t.value,t=null);return i},i.prototype.remove=function(t,i){void 0===i&&(i=this.root);for(var e=null,s="left";i;)if(t<i.value)e=i,i=i.left,s="left";else if(t>i.value)e=i,i=i.right,s="right";else{if(i.left||i.right)if(i.left)if(i.right){var n=this.min(i.right);this.remove(n,i.right),i.value=n}else e?e[s]=i.left:this.root=i.left;else e?e[s]=i.right:this.root=i.right;else e?e[s]=null:this.root=null;i=null}},i}(e(5186).Cloneable);i.BinarySearchTree=r},5301:(t,i)=>{"use strict";Object.defineProperty(i,"B",{value:!0});var e=function(){function t(){}return t.prototype.has=function(i){return t.langSet.has(i)},t.prototype.forEach=function(i){t.langSet.forEach(i)},Object.defineProperty(t.prototype,"size",{get:function(){return t.langSet.size},enumerable:!0,configurable:!0}),t.langSet=new Set(["BG","CA","CS","DA","DE","EL","EN","ES","ET","FI","FR","HR","HU","IT","JA","LT","LV","MT","NL","NO","PL","PT","RO","RU","SK","SL","SV","TR","ZH"]),t}();i.ConsentLanguages=e},4243:(t,i)=>{"use strict";var e;Object.defineProperty(i,"B",{value:!0}),(e=i.DeviceDisclosureStorageAccessType||(i.DeviceDisclosureStorageAccessType={})).COOKIE="cookie",e.WEB="web",e.APP="app"},4731:(t,i)=>{"use strict";Object.defineProperty(i,"B",{value:!0});var e=function(){function t(){}return t.cmpId="cmpId",t.cmpVersion="cmpVersion",t.consentLanguage="consentLanguage",t.consentScreen="consentScreen",t.created="created",t.supportOOB="supportOOB",t.isServiceSpecific="isServiceSpecific",t.lastUpdated="lastUpdated",t.numCustomPurposes="numCustomPurposes",t.policyVersion="policyVersion",t.publisherCountryCode="publisherCountryCode",t.publisherCustomConsents="publisherCustomConsents",t.publisherCustomLegitimateInterests="publisherCustomLegitimateInterests",t.publisherLegitimateInterests="publisherLegitimateInterests",t.publisherConsents="publisherConsents",t.publisherRestrictions="publisherRestrictions",t.purposeConsents="purposeConsents",t.purposeLegitimateInterests="purposeLegitimateInterests",t.purposeOneTreatment="purposeOneTreatment",t.specialFeatureOptins="specialFeatureOptins",t.useNonStandardStacks="useNonStandardStacks",t.vendorConsents="vendorConsents",t.vendorLegitimateInterests="vendorLegitimateInterests",t.vendorListVersion="vendorListVersion",t.vendorsAllowed="vendorsAllowed",t.vendorsDisclosed="vendorsDisclosed",t.version="version",t}();i.Fields=e},4649:function(t,i,e){"use strict";var s,n=this&&this.R||(s=function(t,i){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)i.hasOwnProperty(e)&&(t[e]=i[e])})(t,i)},function(t,i){function e(){this.constructor=t}s(t,i),t.prototype=null===i?Object.create(i):(e.prototype=i.prototype,new e)});Object.defineProperty(i,"B",{value:!0});var r=e(5186),h=e(5458),o=e(2473),a=function(t){function i(i,e){var s=t.call(this)||this;return void 0!==i&&(s.purposeId=i),void 0!==e&&(s.restrictionType=e),s}return n(i,t),i.unHash=function(t){var e=t.split(this.hashSeparator),s=new i;if(2!==e.length)throw new h.TCModelError("hash",t);return s.purposeId=parseInt(e[0],10),s.restrictionType=parseInt(e[1],10),s},Object.defineProperty(i.prototype,"hash",{get:function(){if(!this.isValid())throw new Error("cannot hash invalid PurposeRestriction");return""+this.purposeId+i.hashSeparator+this.restrictionType},enumerable:!0,configurable:!0}),Object.defineProperty(i.prototype,"purposeId",{get:function(){return this.purposeId_},set:function(t){this.purposeId_=t},enumerable:!0,configurable:!0}),i.prototype.isValid=function(){return Number.isInteger(this.purposeId)&&this.purposeId>0&&(this.restrictionType===o.RestrictionType.NOT_ALLOWED||this.restrictionType===o.RestrictionType.REQUIRE_CONSENT||this.restrictionType===o.RestrictionType.REQUIRE_LI)},i.prototype.isSameAs=function(t){return this.purposeId===t.purposeId&&this.restrictionType===t.restrictionType},i.hashSeparator="-",i}(r.Cloneable);i.PurposeRestriction=a},7096:function(t,i,e){"use strict";var s,n=this&&this.R||(s=function(t,i){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)i.hasOwnProperty(e)&&(t[e]=i[e])})(t,i)},function(t,i){function e(){this.constructor=t}s(t,i),t.prototype=null===i?Object.create(i):(e.prototype=i.prototype,new e)}),r=this&&this.T||function(t){var i="function"==typeof Symbol&&Symbol.iterator,e=i&&t[i],s=0;if(e)return e.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&s>=t.length&&(t=void 0),{value:t&&t[s++],done:!t}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")};Object.defineProperty(i,"B",{value:!0});var h=e(4649),o=e(5995),a=e(2473),c=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.bitLength=0,i.map=new Map,i}return n(i,t),i.prototype.has=function(t){return this.map.has(t)},i.prototype.isOkToHave=function(t,i,e){var s,n=!0;if(null===(s=this.gvl)||void 0===s?void 0:s.vendors){var r=this.gvl.vendors[e];if(r)if(t===a.RestrictionType.NOT_ALLOWED)n=r.legIntPurposes.includes(i)||r.purposes.includes(i);else if(r.flexiblePurposes.length)switch(t){case a.RestrictionType.REQUIRE_CONSENT:n=r.flexiblePurposes.includes(i)&&r.legIntPurposes.includes(i);break;case a.RestrictionType.REQUIRE_LI:n=r.flexiblePurposes.includes(i)&&r.purposes.includes(i)}else n=!1;else n=!1}return n},i.prototype.add=function(t,i){if(this.isOkToHave(i.restrictionType,i.purposeId,t)){var e=i.hash;this.has(e)||(this.map.set(e,new o.BinarySearchTree),this.bitLength=0),this.map.get(e).add(t)}},i.prototype.restrictPurposeToLegalBasis=function(t){for(var i=this.gvl.vendorIds,e=t.hash,s=function(){var t,e,s;try{for(var n=r(i),h=n.next();!h.done;h=n.next())s=h.value}catch(i){t={error:i}}finally{try{h&&!h.done&&(e=n.return)&&e.call(n)}finally{if(t)throw t.error}}return s}(),n=1;n<=s;n++)this.has(e)||(this.map.set(e,new o.BinarySearchTree),this.bitLength=0),this.map.get(e).add(n)},i.prototype.getVendors=function(t){var i=[];if(t){var e=t.hash;this.has(e)&&(i=this.map.get(e).get())}else{var s=new Set;this.map.forEach((function(t){t.get().forEach((function(t){s.add(t)}))})),i=Array.from(s)}return i},i.prototype.getRestrictionType=function(t,i){var e;return this.getRestrictions(t).forEach((function(t){t.purposeId===i&&(void 0===e||e>t.restrictionType)&&(e=t.restrictionType)})),e},i.prototype.vendorHasRestriction=function(t,i){for(var e=!1,s=this.getRestrictions(t),n=0;n<s.length&&!e;n++)e=i.isSameAs(s[n]);return e},i.prototype.getMaxVendorId=function(){var t=0;return this.map.forEach((function(i){t=Math.max(i.max(),t)})),t},i.prototype.getRestrictions=function(t){var i=[];return this.map.forEach((function(e,s){t?e.contains(t)&&i.push(h.PurposeRestriction.unHash(s)):i.push(h.PurposeRestriction.unHash(s))})),i},i.prototype.getPurposes=function(){var t=new Set;return this.map.forEach((function(i,e){t.add(h.PurposeRestriction.unHash(e).purposeId)})),Array.from(t)},i.prototype.remove=function(t,i){var e=i.hash,s=this.map.get(e);s&&(s.remove(t),s.isEmpty()&&(this.map.delete(e),this.bitLength=0))},Object.defineProperty(i.prototype,"gvl",{get:function(){return this.gvl_},set:function(t){var i=this;this.gvl_||(this.gvl_=t,this.map.forEach((function(t,e){var s=h.PurposeRestriction.unHash(e);t.get().forEach((function(e){i.isOkToHave(s.restrictionType,s.purposeId,e)||t.remove(e)}))})))},enumerable:!0,configurable:!0}),i.prototype.isEmpty=function(){return 0===this.map.size},Object.defineProperty(i.prototype,"numRestrictions",{get:function(){return this.map.size},enumerable:!0,configurable:!0}),i}(e(5186).Cloneable);i.PurposeRestrictionVector=c},2473:(t,i)=>{"use strict";var e;Object.defineProperty(i,"B",{value:!0}),(e=i.RestrictionType||(i.RestrictionType={}))[e.NOT_ALLOWED=0]="NOT_ALLOWED",e[e.REQUIRE_CONSENT=1]="REQUIRE_CONSENT",e[e.REQUIRE_LI=2]="REQUIRE_LI"},4858:(t,i)=>{"use strict";var e;Object.defineProperty(i,"B",{value:!0}),(e=i.Segment||(i.Segment={})).CORE="core",e.VENDORS_DISCLOSED="vendorsDisclosed",e.VENDORS_ALLOWED="vendorsAllowed",e.PUBLISHER_TC="publisherTC"},6130:(t,i,e)=>{"use strict";var s;Object.defineProperty(i,"B",{value:!0});var n=e(4858),r=function(){function t(){}return t.ID_TO_KEY=[n.Segment.CORE,n.Segment.VENDORS_DISCLOSED,n.Segment.VENDORS_ALLOWED,n.Segment.PUBLISHER_TC],t.KEY_TO_ID=((s={})[n.Segment.CORE]=0,s[n.Segment.VENDORS_DISCLOSED]=1,s[n.Segment.VENDORS_ALLOWED]=2,s[n.Segment.PUBLISHER_TC]=3,s),t}();i.SegmentIDs=r},6315:function(t,i,e){"use strict";var s,n=this&&this.R||(s=function(t,i){return(s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)i.hasOwnProperty(e)&&(t[e]=i[e])})(t,i)},function(t,i){function e(){this.constructor=t}s(t,i),t.prototype=null===i?Object.create(i):(e.prototype=i.prototype,new e)}),r=this&&this.W||function(t,i){var e,s,n,r,h={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return r={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function o(r){return function(o){return function(r){if(e)throw new TypeError("Generator is already executing.");for(;h;)try{if(e=1,s&&(n=2&r[0]?s.return:r[0]?s.throw||((n=s.return)&&n.call(s),0):s.next)&&!(n=n.call(s,r[1])).done)return n;switch(s=0,n&&(r=[2&r[0],n.value]),r[0]){case 0:case 1:n=r;break;case 4:return h.label++,{value:r[1],done:!1};case 5:h.label++,s=r[1],r=[0];continue;case 7:r=h.ops.pop(),h.trys.pop();continue;default:if(!(n=(n=h.trys).length>0&&n[n.length-1])&&(6===r[0]||2===r[0])){h=0;continue}if(3===r[0]&&(!n||r[1]>n[0]&&r[1]<n[3])){h.label=r[1];break}if(6===r[0]&&h.label<n[1]){h.label=n[1],n=r;break}if(n&&h.label<n[2]){h.label=n[2],h.ops.push(r);break}n[2]&&h.ops.pop(),h.trys.pop();continue}r=i.call(t,h)}catch(t){r=[6,t],s=0}finally{e=n=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,o])}}};Object.defineProperty(i,"B",{value:!0});var h=e(5186),o=e(5458),a=function(t){function i(){var i=null!==t&&t.apply(this,arguments)||this;return i.bitLength=0,i.maxId_=0,i.set_=new Set,i}return n(i,t),i.prototype[Symbol.iterator]=function(){var t;return r(this,(function(i){switch(i.label){case 0:t=1,i.label=1;case 1:return t<=this.maxId?[4,[t,this.has(t)]]:[3,4];case 2:i.sent(),i.label=3;case 3:return t++,[3,1];case 4:return[2]}}))},i.prototype.values=function(){return this.set_.values()},Object.defineProperty(i.prototype,"maxId",{get:function(){return this.maxId_},enumerable:!0,configurable:!0}),i.prototype.has=function(t){return this.set_.has(t)},i.prototype.unset=function(t){var i=this;Array.isArray(t)?t.forEach((function(t){return i.unset(t)})):"object"==typeof t?this.unset(Object.keys(t).map((function(t){return+t}))):(this.set_.delete(t),this.bitLength=0,t===this.maxId&&(this.maxId_=0,this.set_.forEach((function(t){i.maxId_=Math.max(i.maxId,t)}))))},i.prototype.isIntMap=function(t){var i=this,e="object"==typeof t;return e&&Object.keys(t).every((function(e){var s=Number.isInteger(parseInt(e,10));return(s=s&&i.isValidNumber(t[e].id))&&void 0!==t[e].name}))},i.prototype.isValidNumber=function(t){return parseInt(t,10)>0},i.prototype.isSet=function(t){var i=!1;return t instanceof Set&&(i=Array.from(t).every(this.isValidNumber)),i},i.prototype.set=function(t){var i=this;if(Array.isArray(t))t.forEach((function(t){return i.set(t)}));else if(this.isSet(t))this.set(Array.from(t));else if(this.isIntMap(t))this.set(Object.keys(t).map((function(t){return+t})));else{if(!this.isValidNumber(t))throw new o.TCModelError("set()",t,"must be positive integer array, positive integer, Set<number>, or IntMap");this.set_.add(t),this.maxId_=Math.max(this.maxId,t),this.bitLength=0}},i.prototype.empty=function(){this.set_=new Set},i.prototype.forEach=function(t){for(var i=1;i<=this.maxId;i++)t(this.has(i),i)},Object.defineProperty(i.prototype,"size",{get:function(){return this.set_.size},enumerable:!0,configurable:!0}),i.prototype.setAll=function(t){this.set(t)},i}(h.Cloneable);i.Vector=a},250:(t,i,e)=>{"use strict";function s(t){for(var e in t)i.hasOwnProperty(e)||(i[e]=t[e])}Object.defineProperty(i,"B",{value:!0}),s(e(5995)),s(e(5301)),s(e(4731)),s(e(4649)),s(e(7096)),s(e(4243)),s(e(2473)),s(e(4858)),s(e(6130)),s(e(6315))},4537:t=>{"use strict";t.exports=function(t,i){var e=new Array(arguments.length-1),s=0,n=2,r=!0;for(;n<arguments.length;)e[s++]=arguments[n++];return new Promise((function(n,h){e[s]=function(t){if(r)if(r=!1,t)h(t);else{for(var i=new Array(arguments.length-1),e=0;e<i.length;)i[e++]=arguments[e];n.apply(null,i)}};try{t.apply(i||null,e)}catch(t){r&&(r=!1,h(t))}}))}},7419:(t,i)=>{"use strict";var e=i;e.length=function(t){var i=t.length;if(!i)return 0;for(var e=0;--i%4>1&&"="===t.charAt(i);)++e;return Math.ceil(3*t.length)/4-e};for(var s=new Array(64),n=new Array(123),r=0;r<64;)n[s[r]=r<26?r+65:r<52?r+71:r<62?r-4:r-59|43]=r++;e.encode=function(t,i,e){for(var n,r=null,h=[],o=0,a=0;i<e;){var c=t[i++];switch(a){case 0:h[o++]=s[c>>2],n=(3&c)<<4,a=1;break;case 1:h[o++]=s[n|c>>4],n=(15&c)<<2,a=2;break;case 2:h[o++]=s[n|c>>6],h[o++]=s[63&c],a=0}o>8191&&((r||(r=[])).push(String.fromCharCode.apply(String,h)),o=0)}return a&&(h[o++]=s[n],h[o++]=61,1===a&&(h[o++]=61)),r?(o&&r.push(String.fromCharCode.apply(String,h.slice(0,o))),r.join("")):String.fromCharCode.apply(String,h.slice(0,o))};var h="invalid encoding";e.decode=function(t,i,e){for(var s,r=e,o=0,a=0;a<t.length;){var c=t.charCodeAt(a++);if(61===c&&o>1)break;if(void 0===(c=n[c]))throw Error(h);switch(o){case 0:s=c,o=1;break;case 1:i[e++]=s<<2|(48&c)>>4,s=c,o=2;break;case 2:i[e++]=(15&s)<<4|(60&c)>>2,s=c,o=3;break;case 3:i[e++]=(3&s)<<6|c,o=0}}if(1===o)throw Error(h);return e-r},e.test=function(t){return/^(?:[A-Za-z0-9+/]{4})*(?:[A-Za-z0-9+/]{2}==|[A-Za-z0-9+/]{3}=)?$/.test(t)}},5124:t=>{"use strict";function i(t,e){"string"==typeof t&&(e=t,t=void 0);var s=[];function n(t){if("string"!=typeof t){var e=r();if(i.verbose&&console.log("codegen: "+e),e="return "+e,t){for(var h=Object.keys(t),o=new Array(h.length+1),a=new Array(h.length),c=0;c<h.length;)o[c]=h[c],a[c]=t[h[c++]];return o[c]=e,Function.apply(null,o).apply(null,a)}return Function(e)()}for(var l=new Array(arguments.length-1),u=0;u<l.length;)l[u]=arguments[++u];if(u=0,t=t.replace(/%([%dfijs])/g,(function(t,i){var e=l[u++];switch(i){case"d":case"f":return String(Number(e));case"i":return String(Math.floor(e));case"j":return JSON.stringify(e);case"s":return String(e)}return"%"})),u!==l.length)throw Error("parameter count mismatch");return s.push(t),n}function r(i){return"function "+(i||e||"")+"("+(t&&t.join(",")||"")+"){\n  "+s.join("\n  ")+"\n}"}return n.toString=r,n}t.exports=i,i.verbose=!1},9211:t=>{"use strict";function i(){this.J={}}t.exports=i,i.prototype.on=function(t,i,e){return(this.J[t]||(this.J[t]=[])).push({fn:i,ctx:e||this}),this},i.prototype.off=function(t,i){if(void 0===t)this.J={};else if(void 0===i)this.J[t]=[];else for(var e=this.J[t],s=0;s<e.length;)e[s].fn===i?e.splice(s,1):++s;return this},i.prototype.emit=function(t){var i=this.J[t];if(i){for(var e=[],s=1;s<arguments.length;)e.push(arguments[s++]);for(s=0;s<i.length;)i[s].fn.apply(i[s++].ctx,e)}return this}},9054:(t,i,e)=>{"use strict";t.exports=r;var s=e(4537),n=e(7199)("fs");function r(t,i,e){return"function"==typeof i?(e=i,i={}):i||(i={}),e?!i.xhr&&n&&n.readFile?n.readFile(t,(function(s,n){return s&&"undefined"!=typeof XMLHttpRequest?r.xhr(t,i,e):s?e(s):e(null,i.binary?n:n.toString("utf8"))})):r.xhr(t,i,e):s(r,this,t,i)}r.xhr=function(t,i,e){var s=new XMLHttpRequest;s.onreadystatechange=function(){if(4===s.readyState){if(0!==s.status&&200!==s.status)return e(Error("status "+s.status));if(i.binary){var t=s.response;if(!t){t=[];for(var n=0;n<s.responseText.length;++n)t.push(255&s.responseText.charCodeAt(n))}return e(null,"undefined"!=typeof Uint8Array?new Uint8Array(t):t)}return e(null,s.responseText)}},i.binary&&("overrideMimeType"in s&&s.overrideMimeType("text/plain; charset=x-user-defined"),s.responseType="arraybuffer"),s.open("GET",t),s.send()}},945:t=>{"use strict";function i(t){return"undefined"!=typeof Float32Array?function(){var i=new Float32Array([-0]),e=new Uint8Array(i.buffer),s=128===e[3];function n(t,s,n){i[0]=t,s[n]=e[0],s[n+1]=e[1],s[n+2]=e[2],s[n+3]=e[3]}function r(t,s,n){i[0]=t,s[n]=e[3],s[n+1]=e[2],s[n+2]=e[1],s[n+3]=e[0]}function h(t,s){return e[0]=t[s],e[1]=t[s+1],e[2]=t[s+2],e[3]=t[s+3],i[0]}function o(t,s){return e[3]=t[s],e[2]=t[s+1],e[1]=t[s+2],e[0]=t[s+3],i[0]}t.writeFloatLE=s?n:r,t.writeFloatBE=s?r:n,t.readFloatLE=s?h:o,t.readFloatBE=s?o:h}():function(){function i(t,i,e,s){var n=i<0?1:0;if(n&&(i=-i),0===i)t(1/i>0?0:2147483648,e,s);else if(isNaN(i))t(2143289344,e,s);else if(i>34028234663852886e22)t((n<<31|2139095040)>>>0,e,s);else if(i<11754943508222875e-54)t((n<<31|Math.round(i/1401298464324817e-60))>>>0,e,s);else{var r=Math.floor(Math.log(i)/Math.LN2);t((n<<31|r+127<<23|8388607&Math.round(i*Math.pow(2,-r)*8388608))>>>0,e,s)}}function h(t,i,e){var s=t(i,e),n=2*(s>>31)+1,r=s>>>23&255,h=8388607&s;return 255===r?h?NaN:n*(1/0):0===r?1401298464324817e-60*n*h:n*Math.pow(2,r-150)*(h+8388608)}t.writeFloatLE=i.bind(null,e),t.writeFloatBE=i.bind(null,s),t.readFloatLE=h.bind(null,n),t.readFloatBE=h.bind(null,r)}(),"undefined"!=typeof Float64Array?function(){var i=new Float64Array([-0]),e=new Uint8Array(i.buffer),s=128===e[7];function n(t,s,n){i[0]=t,s[n]=e[0],s[n+1]=e[1],s[n+2]=e[2],s[n+3]=e[3],s[n+4]=e[4],s[n+5]=e[5],s[n+6]=e[6],s[n+7]=e[7]}function r(t,s,n){i[0]=t,s[n]=e[7],s[n+1]=e[6],s[n+2]=e[5],s[n+3]=e[4],s[n+4]=e[3],s[n+5]=e[2],s[n+6]=e[1],s[n+7]=e[0]}function h(t,s){return e[0]=t[s],e[1]=t[s+1],e[2]=t[s+2],e[3]=t[s+3],e[4]=t[s+4],e[5]=t[s+5],e[6]=t[s+6],e[7]=t[s+7],i[0]}function o(t,s){return e[7]=t[s],e[6]=t[s+1],e[5]=t[s+2],e[4]=t[s+3],e[3]=t[s+4],e[2]=t[s+5],e[1]=t[s+6],e[0]=t[s+7],i[0]}t.writeDoubleLE=s?n:r,t.writeDoubleBE=s?r:n,t.readDoubleLE=s?h:o,t.readDoubleBE=s?o:h}():function(){function i(t,i,e,s,n,r){var h=s<0?1:0;if(h&&(s=-s),0===s)t(0,n,r+i),t(1/s>0?0:2147483648,n,r+e);else if(isNaN(s))t(0,n,r+i),t(2146959360,n,r+e);else if(s>17976931348623157e292)t(0,n,r+i),t((h<<31|2146435072)>>>0,n,r+e);else{var o;if(s<22250738585072014e-324)t((o=s/5e-324)>>>0,n,r+i),t((h<<31|o/4294967296)>>>0,n,r+e);else{var a=Math.floor(Math.log(s)/Math.LN2);1024===a&&(a=1023),t(4503599627370496*(o=s*Math.pow(2,-a))>>>0,n,r+i),t((h<<31|a+1023<<20|1048576*o&1048575)>>>0,n,r+e)}}}function h(t,i,e,s,n){var r=t(s,n+i),h=t(s,n+e),o=2*(h>>31)+1,a=h>>>20&2047,c=4294967296*(1048575&h)+r;return 2047===a?c?NaN:o*(1/0):0===a?5e-324*o*c:o*Math.pow(2,a-1075)*(c+4503599627370496)}t.writeDoubleLE=i.bind(null,e,0,4),t.writeDoubleBE=i.bind(null,s,4,0),t.readDoubleLE=h.bind(null,n,0,4),t.readDoubleBE=h.bind(null,r,4,0)}(),t}function e(t,i,e){i[e]=255&t,i[e+1]=t>>>8&255,i[e+2]=t>>>16&255,i[e+3]=t>>>24}function s(t,i,e){i[e]=t>>>24,i[e+1]=t>>>16&255,i[e+2]=t>>>8&255,i[e+3]=255&t}function n(t,i){return(t[i]|t[i+1]<<8|t[i+2]<<16|t[i+3]<<24)>>>0}function r(t,i){return(t[i]<<24|t[i+1]<<16|t[i+2]<<8|t[i+3])>>>0}t.exports=i(i)},7199:t=>{"use strict";function i(t){try{var i=eval("quire".replace(/^/,"re"))(t);if(i&&(i.length||Object.keys(i).length))return i}catch(t){}return null}t.exports=i},8626:(t,i)=>{"use strict";var e=i,s=e.isAbsolute=function(t){return/^(?:\/|\w+:)/.test(t)},n=e.normalize=function(t){var i=(t=t.replace(/\\/g,"/").replace(/\/{2,}/g,"/")).split("/"),e=s(t),n="";e&&(n=i.shift()+"/");for(var r=0;r<i.length;)".."===i[r]?r>0&&".."!==i[r-1]?i.splice(--r,2):e?i.splice(r,1):++r:"."===i[r]?i.splice(r,1):++r;return n+i.join("/")};e.resolve=function(t,i,e){return e||(i=n(i)),s(i)?i:(e||(t=n(t)),(t=t.replace(/(?:\/|^)[^/]+$/,"")).length?n(t+"/"+i):i)}},6662:t=>{"use strict";t.exports=function(t,i,e){var s=e||8192,n=s>>>1,r=null,h=s;return function(e){if(e<1||e>n)return t(e);h+e>s&&(r=t(s),h=0);var o=i.call(r,h,h+=e);return 7&h&&(h=1+(7|h)),o}}},4997:(t,i)=>{"use strict";var e=i;e.length=function(t){for(var i=0,e=0,s=0;s<t.length;++s)(e=t.charCodeAt(s))<128?i+=1:e<2048?i+=2:55296==(64512&e)&&56320==(64512&t.charCodeAt(s+1))?(++s,i+=4):i+=3;return i},e.read=function(t,i,e){if(e-i<1)return"";for(var s,n=null,r=[],h=0;i<e;)(s=t[i++])<128?r[h++]=s:s>191&&s<224?r[h++]=(31&s)<<6|63&t[i++]:s>239&&s<365?(s=((7&s)<<18|(63&t[i++])<<12|(63&t[i++])<<6|63&t[i++])-65536,r[h++]=55296+(s>>10),r[h++]=56320+(1023&s)):r[h++]=(15&s)<<12|(63&t[i++])<<6|63&t[i++],h>8191&&((n||(n=[])).push(String.fromCharCode.apply(String,r)),h=0);return n?(h&&n.push(String.fromCharCode.apply(String,r.slice(0,h))),n.join("")):String.fromCharCode.apply(String,r.slice(0,h))},e.write=function(t,i,e){for(var s,n,r=e,h=0;h<t.length;++h)(s=t.charCodeAt(h))<128?i[e++]=s:s<2048?(i[e++]=s>>6|192,i[e++]=63&s|128):55296==(64512&s)&&56320==(64512&(n=t.charCodeAt(h+1)))?(s=65536+((1023&s)<<10)+(1023&n),++h,i[e++]=s>>18|240,i[e++]=s>>12&63|128,i[e++]=s>>6&63|128,i[e++]=63&s|128):(i[e++]=s>>12|224,i[e++]=s>>6&63|128,i[e++]=63&s|128);return e-r}},7501:function(t,i,e){var s;t=e.nmd(t),function(n){var r=i,h=(t&&t.exports,"object"==typeof e.g&&e.g);h.global!==h&&h.window;var o=function(t){this.message=t};(o.prototype=new Error).name="InvalidCharacterError";var a=function(t){throw new o(t)},c="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/",l=/[\t\n\f\r ]/g,u={encode:function(t){t=String(t),/[^\0-\xFF]/.test(t)&&a("The string to be encoded contains characters outside of the Latin1 range.");for(var i,e,s,n,r=t.length%3,h="",o=-1,l=t.length-r;++o<l;)i=t.charCodeAt(o)<<16,e=t.charCodeAt(++o)<<8,s=t.charCodeAt(++o),h+=c.charAt((n=i+e+s)>>18&63)+c.charAt(n>>12&63)+c.charAt(n>>6&63)+c.charAt(63&n);return 2==r?(i=t.charCodeAt(o)<<8,e=t.charCodeAt(++o),h+=c.charAt((n=i+e)>>10)+c.charAt(n>>4&63)+c.charAt(n<<2&63)+"="):1==r&&(n=t.charCodeAt(o),h+=c.charAt(n>>2)+c.charAt(n<<4&63)+"=="),h},decode:function(t){var i=(t=String(t).replace(l,"")).length;i%4==0&&(i=(t=t.replace(/==?$/,"")).length),(i%4==1||/[^+a-zA-Z0-9/]/.test(t))&&a("Invalid character: the string to be decoded is not correctly encoded.");for(var e,s,n=0,r="",h=-1;++h<i;)s=c.indexOf(t.charAt(h)),e=n%4?64*e+s:s,n++%4&&(r+=String.fromCharCode(255&e>>(-2*n&6)));return r},version:"0.1.0"};void 0===(s=function(){return u}.call(i,e,i,t))||(t.exports=s)}()},6658:(t,i,e)=>{"use strict";var s=e(3090),n=s.decodeBitsToIds,r=s.decodeFromBase64;t.exports={decodeConsentString:function(t){var i=r(t),e=i.version,s=i.cmpId,h=i.vendorListVersion,o=i.purposeIdBitString,a=i.maxVendorId,c=i.created,l=i.lastUpdated,u=i.isRange,d=i.defaultConsent,p=i.vendorIdBitString,f=i.vendorRangeList,m=i.cmpVersion,g=i.consentScreen,v=i.consentLanguage,y={version:e,cmpId:s,vendorListVersion:h,allowedPurposeIds:n(o),maxVendorId:a,created:c,lastUpdated:l,cmpVersion:m,consentScreen:g,consentLanguage:v};if(u){var b=f.reduce((function(t,i){for(var e=i.isRange,s=i.startVendorId,n=i.endVendorId,r=e?n:s,h=s;h<=r;h+=1)t[h]=!0;return t}),{});y.allowedVendorIds=[];for(var x=1;x<=a;x+=1)(d&&!b[x]||!d&&b[x])&&-1===y.allowedVendorIds.indexOf(x)&&y.allowedVendorIds.push(x)}else y.allowedVendorIds=n(p);return y}}},8462:(t,i,e)=>{"use strict";var s=e(6658).decodeConsentString;t.exports={decodeConsentString:s}},3090:(t,i,e)=>{"use strict";var s=e(7501),n=e(3977),r=n.versionNumBits,h=n.vendorVersionMap;function o(t,i,e){return parseInt(t.substr(i,e),2)}function a(t,i,e){return new Date(100*o(t,i,e))}function c(t){var i=o(t);return String.fromCharCode(i+65).toLowerCase()}function l(t,i,e){var s=t.substr(i,e);return c(s.slice(0,e/2))+c(s.slice(e/2))}function u(t){var i=t.input,e=t.output,s=t.startPosition,n=t.field,r=n.type,h=n.numBits,c=n.decoder,u=n.validator,p=n.listCount;if("function"==typeof u&&!u(e))return{newPosition:s};if("function"==typeof c)return c(i,e,s);var f,m,g="function"==typeof h?h(e):h;switch(r){case"int":return{fieldValue:o(i,s,g)};case"bool":return{fieldValue:(f=i,m=s,1===parseInt(f.substr(m,1),2))};case"date":return{fieldValue:a(i,s,g)};case"bits":return{fieldValue:i.substr(s,g)};case"list":return function(t,i,e,s,n){var r=0;"function"==typeof n?r=n(i):"number"==typeof n&&(r=n);for(var h=e,o=[],a=0;a<r;a+=1){var c=d({input:t,fields:s.fields,startPosition:h});h=c.newPosition,o.push(c.decodedObject)}return{fieldValue:o,newPosition:h}}(i,e,s,n,p);case"language":return{fieldValue:l(i,s,g)};default:throw new Error("ConsentString - Unknown field type "+r+" for decoding")}}function d(t){var i=t.input,e=t.fields,s=t.startPosition,n=void 0===s?0:s;return{decodedObject:e.reduce((function(t,e){var s=e.name,r=e.numBits,h=u({input:i,output:t,startPosition:n,field:e}),o=h.fieldValue,a=h.newPosition;return void 0!==o&&(t[s]=o),void 0!==a?n=a:"number"==typeof r&&(n+=r),t}),{}),newPosition:n}}t.exports={decodeBitsToIds:function(t){return t.split("").reduce((function(t,i,e){return"1"===i&&-1===t.indexOf(e+1)&&t.push(e+1),t}),[])},decodeFromBase64:function(t,i){for(var e=t;e.length%4!=0;)e+="=";e=e.replace(/-/g,"+").replace(/_/g,"/");for(var n,a,c=s.decode(e),l="",u=0;u<c.length;u+=1){var p=c.charCodeAt(u).toString(2);l+=(n=p,a=8-p.length,function(t){for(var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:"0",e="",s=0;s<t;s+=1)e+=i;return e}(Math.max(0,a))+n)}return function(t){var i=arguments.length>1&&void 0!==arguments[1]?arguments[1]:h,e=o(t,0,r);if("number"!=typeof e)throw new Error("ConsentString - Unknown version number in the string to decode");if(!h[e])throw new Error("ConsentString - Unsupported version "+e+" in the string to decode");var s=i[e].fields;return d({input:t,fields:s}).decodedObject}(l,i)}}},3977:t=>{"use strict";t.exports={versionNumBits:6,vendorVersionMap:{1:{version:1,metadataFields:["version","created","lastUpdated","cmpId","cmpVersion","consentScreen","vendorListVersion"],fields:[{name:"version",type:"int",numBits:6},{name:"created",type:"date",numBits:36},{name:"lastUpdated",type:"date",numBits:36},{name:"cmpId",type:"int",numBits:12},{name:"cmpVersion",type:"int",numBits:12},{name:"consentScreen",type:"int",numBits:6},{name:"consentLanguage",type:"language",numBits:12},{name:"vendorListVersion",type:"int",numBits:12},{name:"purposeIdBitString",type:"bits",numBits:24},{name:"maxVendorId",type:"int",numBits:16},{name:"isRange",type:"bool",numBits:1},{name:"vendorIdBitString",type:"bits",numBits:function(t){return t.maxVendorId},validator:function(t){return!t.isRange}},{name:"defaultConsent",type:"bool",numBits:1,validator:function(t){return t.isRange}},{name:"numEntries",numBits:12,type:"int",validator:function(t){return t.isRange}},{name:"vendorRangeList",type:"list",listCount:function(t){return t.numEntries},validator:function(t){return t.isRange},fields:[{name:"isRange",type:"bool",numBits:1},{name:"startVendorId",type:"int",numBits:16},{name:"endVendorId",type:"int",numBits:16,validator:function(t){return t.isRange}}]}]}}}},4492:(t,i,e)=>{"use strict";t.exports=e(8836)},3996:(t,i,e)=>{"use strict";var s=i,n=e(7025),r=e(9935);function h(t,i,e,s){if(i.resolvedType)if(i.resolvedType instanceof n){t("switch(d%s){",s);for(var r=i.resolvedType.values,h=Object.keys(r),o=0;o<h.length;++o)i.repeated&&r[h[o]]===i.typeDefault&&t("default:"),t("case%j:",h[o])("case %i:",r[h[o]])("m%s=%j",s,r[h[o]])("break");t("}")}else t('if(typeof d%s!=="object")',s)("throw TypeError(%j)",i.fullName+": object expected")("m%s=types[%i].fromObject(d%s)",s,e,s);else{var a=!1;switch(i.type){case"double":case"float":t("m%s=Number(d%s)",s,s);break;case"uint32":case"fixed32":t("m%s=d%s>>>0",s,s);break;case"int32":case"sint32":case"sfixed32":t("m%s=d%s|0",s,s);break;case"uint64":a=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":t("if(util.Long)")("(m%s=util.Long.fromValue(d%s)).unsigned=%j",s,s,a)('else if(typeof d%s==="string")',s)("m%s=parseInt(d%s,10)",s,s)('else if(typeof d%s==="number")',s)("m%s=d%s",s,s)('else if(typeof d%s==="object")',s)("m%s=new util.LongBits(d%s.low>>>0,d%s.high>>>0).toNumber(%s)",s,s,s,a?"true":"");break;case"bytes":t('if(typeof d%s==="string")',s)("util.base64.decode(d%s,m%s=util.newBuffer(util.base64.length(d%s)),0)",s,s,s)("else if(d%s.length)",s)("m%s=d%s",s,s);break;case"string":t("m%s=String(d%s)",s,s);break;case"bool":t("m%s=Boolean(d%s)",s,s)}}return t}function o(t,i,e,s){if(i.resolvedType)i.resolvedType instanceof n?t("d%s=o.enums===String?types[%i].values[m%s]:m%s",s,e,s,s):t("d%s=types[%i].toObject(m%s,o)",s,e,s);else{var r=!1;switch(i.type){case"double":case"float":t("d%s=o.json&&!isFinite(m%s)?String(m%s):m%s",s,s,s,s);break;case"uint64":r=!0;case"int64":case"sint64":case"fixed64":case"sfixed64":t('if(typeof m%s==="number")',s)("d%s=o.longs===String?String(m%s):m%s",s,s,s)("else")("d%s=o.longs===String?util.Long.prototype.toString.call(m%s):o.longs===Number?new util.LongBits(m%s.low>>>0,m%s.high>>>0).toNumber(%s):m%s",s,s,s,s,r?"true":"",s);break;case"bytes":t("d%s=o.bytes===String?util.base64.encode(m%s,0,m%s.length):o.bytes===Array?Array.prototype.slice.call(m%s):m%s",s,s,s,s,s);break;default:t("d%s=m%s",s,s)}}return t}s.fromObject=function(t){var i=t.fieldsArray,e=r.codegen(["d"],t.name+"$fromObject")("if(d instanceof this.ctor)")("return d");if(!i.length)return e("return new this.ctor");e("var m=new this.ctor");for(var s=0;s<i.length;++s){var o=i[s].resolve(),a=r.safeProp(o.name);o.map?(e("if(d%s){",a)('if(typeof d%s!=="object")',a)("throw TypeError(%j)",o.fullName+": object expected")("m%s={}",a)("for(var ks=Object.keys(d%s),i=0;i<ks.length;++i){",a),h(e,o,s,a+"[ks[i]]")("}")("}")):o.repeated?(e("if(d%s){",a)("if(!Array.isArray(d%s))",a)("throw TypeError(%j)",o.fullName+": array expected")("m%s=[]",a)("for(var i=0;i<d%s.length;++i){",a),h(e,o,s,a+"[i]")("}")("}")):(o.resolvedType instanceof n||e("if(d%s!=null){",a),h(e,o,s,a),o.resolvedType instanceof n||e("}"))}return e("return m")},s.toObject=function(t){var i=t.fieldsArray.slice().sort(r.compareFieldsById);if(!i.length)return r.codegen()("return {}");for(var e=r.codegen(["m","o"],t.name+"$toObject")("if(!o)")("o={}")("var d={}"),s=[],h=[],a=[],c=0;c<i.length;++c)i[c].partOf||(i[c].resolve().repeated?s:i[c].map?h:a).push(i[c]);if(s.length){for(e("if(o.arrays||o.defaults){"),c=0;c<s.length;++c)e("d%s=[]",r.safeProp(s[c].name));e("}")}if(h.length){for(e("if(o.objects||o.defaults){"),c=0;c<h.length;++c)e("d%s={}",r.safeProp(h[c].name));e("}")}if(a.length){for(e("if(o.defaults){"),c=0;c<a.length;++c){var l=a[c],u=r.safeProp(l.name);if(l.resolvedType instanceof n)e("d%s=o.enums===String?%j:%j",u,l.resolvedType.valuesById[l.typeDefault],l.typeDefault);else if(l.long)e("if(util.Long){")("var n=new util.Long(%i,%i,%j)",l.typeDefault.low,l.typeDefault.high,l.typeDefault.unsigned)("d%s=o.longs===String?n.toString():o.longs===Number?n.toNumber():n",u)("}else")("d%s=o.longs===String?%j:%i",u,l.typeDefault.toString(),l.typeDefault.toNumber());else if(l.bytes){var d="["+Array.prototype.slice.call(l.typeDefault).join(",")+"]";e("if(o.bytes===String)d%s=%j",u,String.fromCharCode.apply(String,l.typeDefault))("else{")("d%s=%s",u,d)("if(o.bytes!==Array)d%s=util.newBuffer(d%s)",u,u)("}")}else e("d%s=%j",u,l.typeDefault)}e("}")}var p=!1;for(c=0;c<i.length;++c){l=i[c];var f=t.K.indexOf(l);u=r.safeProp(l.name);l.map?(p||(p=!0,e("var ks2")),e("if(m%s&&(ks2=Object.keys(m%s)).length){",u,u)("d%s={}",u)("for(var j=0;j<ks2.length;++j){"),o(e,l,f,u+"[ks2[j]]")("}")):l.repeated?(e("if(m%s&&m%s.length){",u,u)("d%s=[]",u)("for(var j=0;j<m%s.length;++j){",u),o(e,l,f,u+"[j]")("}")):(e("if(m%s!=null&&m.hasOwnProperty(%j)){",u,l.name),o(e,l,f,u),l.partOf&&e("if(o.oneofs)")("d%s=%j",r.safeProp(l.partOf.name),l.name)),e("}")}return e("return d")}},5305:(t,i,e)=>{"use strict";t.exports=function(t){var i=r.codegen(["r","l"],t.name+"$decode")("if(!(r instanceof Reader))")("r=Reader.create(r)")("var c=l===undefined?r.len:r.pos+l,m=new this.ctor"+(t.fieldsArray.filter((function(t){return t.map})).length?",k,value":""))("while(r.pos<c){")("var t=r.uint32()");t.group&&i("if((t&7)===4)")("break");i("switch(t>>>3){");for(var e=0;e<t.fieldsArray.length;++e){var o=t.K[e].resolve(),a=o.resolvedType instanceof s?"int32":o.type,c="m"+r.safeProp(o.name);i("case %i:",o.id),o.map?(i("if(%s===util.emptyObject)",c)("%s={}",c)("var c2 = r.uint32()+r.pos"),void 0!==n.defaults[o.keyType]?i("k=%j",n.defaults[o.keyType]):i("k=null"),void 0!==n.defaults[a]?i("value=%j",n.defaults[a]):i("value=null"),i("while(r.pos<c2){")("var tag2=r.uint32()")("switch(tag2>>>3){")("case 1: k=r.%s(); break",o.keyType)("case 2:"),void 0===n.basic[a]?i("value=types[%i].decode(r,r.uint32())",e):i("value=r.%s()",a),i("break")("default:")("r.skipType(tag2&7)")("break")("}")("}"),void 0!==n.long[o.keyType]?i('%s[typeof k==="object"?util.longToHash(k):k]=value',c):i("%s[k]=value",c)):o.repeated?(i("if(!(%s&&%s.length))",c,c)("%s=[]",c),void 0!==n.packed[a]&&i("if((t&7)===2){")("var c2=r.uint32()+r.pos")("while(r.pos<c2)")("%s.push(r.%s())",c,a)("}else"),void 0===n.basic[a]?i(o.resolvedType.group?"%s.push(types[%i].decode(r))":"%s.push(types[%i].decode(r,r.uint32()))",c,e):i("%s.push(r.%s())",c,a)):void 0===n.basic[a]?i(o.resolvedType.group?"%s=types[%i].decode(r)":"%s=types[%i].decode(r,r.uint32())",c,e):i("%s=r.%s()",c,a),i("break")}for(i("default:")("r.skipType(t&7)")("break")("}")("}"),e=0;e<t.K.length;++e){var l=t.K[e];l.required&&i("if(!m.hasOwnProperty(%j))",l.name)("throw util.ProtocolError(%j,{instance:m})",h(l))}return i("return m")};var s=e(7025),n=e(7063),r=e(9935);function h(t){return"missing required '"+t.name+"'"}},4928:(t,i,e)=>{"use strict";t.exports=function(t){for(var i,e=r.codegen(["m","w"],t.name+"$encode")("if(!w)")("w=Writer.create()"),o=t.fieldsArray.slice().sort(r.compareFieldsById),a=0;a<o.length;++a){var c=o[a].resolve(),l=t.K.indexOf(c),u=c.resolvedType instanceof s?"int32":c.type,d=n.basic[u];i="m"+r.safeProp(c.name),c.map?(e("if(%s!=null&&Object.hasOwnProperty.call(m,%j)){",i,c.name)("for(var ks=Object.keys(%s),i=0;i<ks.length;++i){",i)("w.uint32(%i).fork().uint32(%i).%s(ks[i])",(c.id<<3|2)>>>0,8|n.mapKey[c.keyType],c.keyType),void 0===d?e("types[%i].encode(%s[ks[i]],w.uint32(18).fork()).ldelim().ldelim()",l,i):e(".uint32(%i).%s(%s[ks[i]]).ldelim()",16|d,u,i),e("}")("}")):c.repeated?(e("if(%s!=null&&%s.length){",i,i),c.packed&&void 0!==n.packed[u]?e("w.uint32(%i).fork()",(c.id<<3|2)>>>0)("for(var i=0;i<%s.length;++i)",i)("w.%s(%s[i])",u,i)("w.ldelim()"):(e("for(var i=0;i<%s.length;++i)",i),void 0===d?h(e,c,l,i+"[i]"):e("w.uint32(%i).%s(%s[i])",(c.id<<3|d)>>>0,u,i)),e("}")):(c.optional&&e("if(%s!=null&&Object.hasOwnProperty.call(m,%j))",i,c.name),void 0===d?h(e,c,l,i):e("w.uint32(%i).%s(%s)",(c.id<<3|d)>>>0,u,i))}return e("return w")};var s=e(7025),n=e(7063),r=e(9935);function h(t,i,e,s){return i.resolvedType.group?t("types[%i].encode(%s,w.uint32(%i)).uint32(%i)",e,s,(i.id<<3|3)>>>0,(i.id<<3|4)>>>0):t("types[%i].encode(%s,w.uint32(%i).fork()).ldelim()",e,s,(i.id<<3|2)>>>0)}},7025:(t,i,e)=>{"use strict";t.exports=h;var s=e(3243);((h.prototype=Object.create(s.prototype)).constructor=h).className="Enum";var n=e(9313),r=e(9935);function h(t,i,e,n,r){if(s.call(this,t,e),i&&"object"!=typeof i)throw TypeError("values must be an object");if(this.valuesById={},this.values=Object.create(this.valuesById),this.comment=n,this.comments=r||{},this.reserved=void 0,i)for(var h=Object.keys(i),o=0;o<h.length;++o)"number"==typeof i[h[o]]&&(this.valuesById[this.values[h[o]]=i[h[o]]]=h[o])}h.fromJSON=function(t,i){var e=new h(t,i.values,i.options,i.comment,i.comments);return e.reserved=i.reserved,e},h.prototype.toJSON=function(t){var i=!!t&&Boolean(t.keepComments);return r.toObject(["options",this.options,"values",this.values,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"comment",i?this.comment:void 0,"comments",i?this.comments:void 0])},h.prototype.add=function(t,i,e){if(!r.isString(t))throw TypeError("name must be a string");if(!r.isInteger(i))throw TypeError("id must be an integer");if(void 0!==this.values[t])throw Error("duplicate name '"+t+"' in "+this);if(this.isReservedId(i))throw Error("id "+i+" is reserved in "+this);if(this.isReservedName(t))throw Error("name '"+t+"' is reserved in "+this);if(void 0!==this.valuesById[i]){if(!this.options||!this.options.allow_alias)throw Error("duplicate id "+i+" in "+this);this.values[t]=i}else this.valuesById[this.values[t]=i]=t;return this.comments[t]=e||null,this},h.prototype.remove=function(t){if(!r.isString(t))throw TypeError("name must be a string");var i=this.values[t];if(null==i)throw Error("name '"+t+"' does not exist in "+this);return delete this.valuesById[i],delete this.values[t],delete this.comments[t],this},h.prototype.isReservedId=function(t){return n.isReservedId(this.reserved,t)},h.prototype.isReservedName=function(t){return n.isReservedName(this.reserved,t)}},3548:(t,i,e)=>{"use strict";t.exports=c;var s=e(3243);((c.prototype=Object.create(s.prototype)).constructor=c).className="Field";var n,r=e(7025),h=e(7063),o=e(9935),a=/^required|optional|repeated$/;function c(t,i,e,n,r,c,l){if(o.isObject(n)?(l=r,c=n,n=r=void 0):o.isObject(r)&&(l=c,c=r,r=void 0),s.call(this,t,c),!o.isInteger(i)||i<0)throw TypeError("id must be a non-negative integer");if(!o.isString(e))throw TypeError("type must be a string");if(void 0!==n&&!a.test(n=n.toString().toLowerCase()))throw TypeError("rule must be a string rule");if(void 0!==r&&!o.isString(r))throw TypeError("extend must be a string");"proto3_optional"===n&&(n="optional"),this.rule=n&&"optional"!==n?n:void 0,this.type=e,this.id=i,this.extend=r||void 0,this.required="required"===n,this.optional=!this.required,this.repeated="repeated"===n,this.map=!1,this.message=null,this.partOf=null,this.typeDefault=null,this.defaultValue=null,this.long=!!o.Long&&void 0!==h.long[e],this.bytes="bytes"===e,this.resolvedType=null,this.extensionField=null,this.declaringField=null,this.tt=null,this.comment=l}c.fromJSON=function(t,i){return new c(t,i.id,i.type,i.rule,i.extend,i.options,i.comment)},Object.defineProperty(c.prototype,"packed",{get:function(){return null===this.tt&&(this.tt=!1!==this.getOption("packed")),this.tt}}),c.prototype.setOption=function(t,i,e){return"packed"===t&&(this.tt=null),s.prototype.setOption.call(this,t,i,e)},c.prototype.toJSON=function(t){var i=!!t&&Boolean(t.keepComments);return o.toObject(["rule","optional"!==this.rule&&this.rule||void 0,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",i?this.comment:void 0])},c.prototype.resolve=function(){if(this.resolved)return this;if(void 0===(this.typeDefault=h.defaults[this.type])&&(this.resolvedType=(this.declaringField?this.declaringField.parent:this.parent).lookupTypeOrEnum(this.type),this.resolvedType instanceof n?this.typeDefault=null:this.typeDefault=this.resolvedType.values[Object.keys(this.resolvedType.values)[0]]),this.options&&null!=this.options.default&&(this.typeDefault=this.options.default,this.resolvedType instanceof r&&"string"==typeof this.typeDefault&&(this.typeDefault=this.resolvedType.values[this.typeDefault])),this.options&&(!0!==this.options.packed&&(void 0===this.options.packed||!this.resolvedType||this.resolvedType instanceof r)||delete this.options.packed,Object.keys(this.options).length||(this.options=void 0)),this.long)this.typeDefault=o.Long.fromNumber(this.typeDefault,"u"===this.type.charAt(0)),Object.freeze&&Object.freeze(this.typeDefault);else if(this.bytes&&"string"==typeof this.typeDefault){var t;o.base64.test(this.typeDefault)?o.base64.decode(this.typeDefault,t=o.newBuffer(o.base64.length(this.typeDefault)),0):o.utf8.write(this.typeDefault,t=o.newBuffer(o.utf8.length(this.typeDefault)),0),this.typeDefault=t}return this.map?this.defaultValue=o.emptyObject:this.repeated?this.defaultValue=o.emptyArray:this.defaultValue=this.typeDefault,this.parent instanceof n&&(this.parent.ctor.prototype[this.name]=this.defaultValue),s.prototype.resolve.call(this)},c.d=function(t,i,e,s){return"function"==typeof i?i=o.decorateType(i).name:i&&"object"==typeof i&&(i=o.decorateEnum(i).name),function(n,r){o.decorateType(n.constructor).add(new c(r,t,i,e,{default:s}))}},c.it=function(t){n=t}},8836:(t,i,e)=>{"use strict";var s=t.exports=e(9482);s.build="light",s.load=function(t,i,e){return"function"==typeof i?(e=i,i=new s.Root):i||(i=new s.Root),i.load(t,e)},s.loadSync=function(t,i){return i||(i=new s.Root),i.loadSync(t)},s.encoder=e(4928),s.decoder=e(5305),s.verifier=e(4497),s.converter=e(3996),s.ReflectionObject=e(3243),s.Namespace=e(9313),s.Root=e(9424),s.Enum=e(7025),s.Type=e(7645),s.Field=e(3548),s.OneOf=e(7598),s.MapField=e(6039),s.Service=e(7513),s.Method=e(4429),s.Message=e(8368),s.wrappers=e(1667),s.types=e(7063),s.util=e(9935),s.ReflectionObject.it(s.Root),s.Namespace.it(s.Type,s.Service,s.Enum),s.Root.it(s.Type),s.Field.it(s.Type)},9482:(t,i,e)=>{"use strict";var s=i;function n(){s.util.it(),s.Writer.it(s.BufferWriter),s.Reader.it(s.BufferReader)}s.build="minimal",s.Writer=e(1173),s.BufferWriter=e(3155),s.Reader=e(1408),s.BufferReader=e(593),s.util=e(9693),s.rpc=e(5994),s.roots=e(5054),s.configure=n,n()},6039:(t,i,e)=>{"use strict";t.exports=h;var s=e(3548);((h.prototype=Object.create(s.prototype)).constructor=h).className="MapField";var n=e(7063),r=e(9935);function h(t,i,e,n,h,o){if(s.call(this,t,i,n,void 0,void 0,h,o),!r.isString(e))throw TypeError("keyType must be a string");this.keyType=e,this.resolvedKeyType=null,this.map=!0}h.fromJSON=function(t,i){return new h(t,i.id,i.keyType,i.type,i.options,i.comment)},h.prototype.toJSON=function(t){var i=!!t&&Boolean(t.keepComments);return r.toObject(["keyType",this.keyType,"type",this.type,"id",this.id,"extend",this.extend,"options",this.options,"comment",i?this.comment:void 0])},h.prototype.resolve=function(){if(this.resolved)return this;if(void 0===n.mapKey[this.keyType])throw Error("invalid key type: "+this.keyType);return s.prototype.resolve.call(this)},h.d=function(t,i,e){return"function"==typeof e?e=r.decorateType(e).name:e&&"object"==typeof e&&(e=r.decorateEnum(e).name),function(s,n){r.decorateType(s.constructor).add(new h(n,t,i,e))}}},8368:(t,i,e)=>{"use strict";t.exports=n;var s=e(9693);function n(t){if(t)for(var i=Object.keys(t),e=0;e<i.length;++e)this[i[e]]=t[i[e]]}n.create=function(t){return this.$type.create(t)},n.encode=function(t,i){return this.$type.encode(t,i)},n.encodeDelimited=function(t,i){return this.$type.encodeDelimited(t,i)},n.decode=function(t){return this.$type.decode(t)},n.decodeDelimited=function(t){return this.$type.decodeDelimited(t)},n.verify=function(t){return this.$type.verify(t)},n.fromObject=function(t){return this.$type.fromObject(t)},n.toObject=function(t,i){return this.$type.toObject(t,i)},n.prototype.toJSON=function(){return this.$type.toObject(this,s.toJSONOptions)}},4429:(t,i,e)=>{"use strict";t.exports=r;var s=e(3243);((r.prototype=Object.create(s.prototype)).constructor=r).className="Method";var n=e(9935);function r(t,i,e,r,h,o,a,c,l){if(n.isObject(h)?(a=h,h=o=void 0):n.isObject(o)&&(a=o,o=void 0),void 0!==i&&!n.isString(i))throw TypeError("type must be a string");if(!n.isString(e))throw TypeError("requestType must be a string");if(!n.isString(r))throw TypeError("responseType must be a string");s.call(this,t,a),this.type=i||"rpc",this.requestType=e,this.requestStream=!!h||void 0,this.responseType=r,this.responseStream=!!o||void 0,this.resolvedRequestType=null,this.resolvedResponseType=null,this.comment=c,this.parsedOptions=l}r.fromJSON=function(t,i){return new r(t,i.type,i.requestType,i.responseType,i.requestStream,i.responseStream,i.options,i.comment,i.parsedOptions)},r.prototype.toJSON=function(t){var i=!!t&&Boolean(t.keepComments);return n.toObject(["type","rpc"!==this.type&&this.type||void 0,"requestType",this.requestType,"requestStream",this.requestStream,"responseType",this.responseType,"responseStream",this.responseStream,"options",this.options,"comment",i?this.comment:void 0,"parsedOptions",this.parsedOptions])},r.prototype.resolve=function(){return this.resolved?this:(this.resolvedRequestType=this.parent.lookupType(this.requestType),this.resolvedResponseType=this.parent.lookupType(this.responseType),s.prototype.resolve.call(this))}},9313:(t,i,e)=>{"use strict";t.exports=u;var s=e(3243);((u.prototype=Object.create(s.prototype)).constructor=u).className="Namespace";var n,r,h,o=e(3548),a=e(7598),c=e(9935);function l(t,i){if(t&&t.length){for(var e={},s=0;s<t.length;++s)e[t[s].name]=t[s].toJSON(i);return e}}function u(t,i){s.call(this,t,i),this.nested=void 0,this.et=null}function d(t){return t.et=null,t}u.fromJSON=function(t,i){return new u(t,i.options).addJSON(i.nested)},u.arrayToJSON=l,u.isReservedId=function(t,i){if(t)for(var e=0;e<t.length;++e)if("string"!=typeof t[e]&&t[e][0]<=i&&t[e][1]>i)return!0;return!1},u.isReservedName=function(t,i){if(t)for(var e=0;e<t.length;++e)if(t[e]===i)return!0;return!1},Object.defineProperty(u.prototype,"nestedArray",{get:function(){return this.et||(this.et=c.toArray(this.nested))}}),u.prototype.toJSON=function(t){return c.toObject(["options",this.options,"nested",l(this.nestedArray,t)])},u.prototype.addJSON=function(t){if(t)for(var i,e=Object.keys(t),s=0;s<e.length;++s)i=t[e[s]],this.add((void 0!==i.fields?n.fromJSON:void 0!==i.values?h.fromJSON:void 0!==i.methods?r.fromJSON:void 0!==i.id?o.fromJSON:u.fromJSON)(e[s],i));return this},u.prototype.get=function(t){return this.nested&&this.nested[t]||null},u.prototype.getEnum=function(t){if(this.nested&&this.nested[t]instanceof h)return this.nested[t].values;throw Error("no such enum: "+t)},u.prototype.add=function(t){if(!(t instanceof o&&void 0!==t.extend||t instanceof n||t instanceof h||t instanceof r||t instanceof u||t instanceof a))throw TypeError("object must be a valid nested object");if(this.nested){var i=this.get(t.name);if(i){if(!(i instanceof u&&t instanceof u)||i instanceof n||i instanceof r)throw Error("duplicate name '"+t.name+"' in "+this);for(var e=i.nestedArray,s=0;s<e.length;++s)t.add(e[s]);this.remove(i),this.nested||(this.nested={}),t.setOptions(i.options,!0)}}else this.nested={};return this.nested[t.name]=t,t.onAdd(this),d(this)},u.prototype.remove=function(t){if(!(t instanceof s))throw TypeError("object must be a ReflectionObject");if(t.parent!==this)throw Error(t+" is not a member of "+this);return delete this.nested[t.name],Object.keys(this.nested).length||(this.nested=void 0),t.onRemove(this),d(this)},u.prototype.define=function(t,i){if(c.isString(t))t=t.split(".");else if(!Array.isArray(t))throw TypeError("illegal path");if(t&&t.length&&""===t[0])throw Error("path must be relative");for(var e=this;t.length>0;){var s=t.shift();if(e.nested&&e.nested[s]){if(!((e=e.nested[s])instanceof u))throw Error("path conflicts with non-namespace objects")}else e.add(e=new u(s))}return i&&e.addJSON(i),e},u.prototype.resolveAll=function(){for(var t=this.nestedArray,i=0;i<t.length;)t[i]instanceof u?t[i++].resolveAll():t[i++].resolve();return this.resolve()},u.prototype.lookup=function(t,i,e){if("boolean"==typeof i?(e=i,i=void 0):i&&!Array.isArray(i)&&(i=[i]),c.isString(t)&&t.length){if("."===t)return this.root;t=t.split(".")}else if(!t.length)return this;if(""===t[0])return this.root.lookup(t.slice(1),i);var s=this.get(t[0]);if(s){if(1===t.length){if(!i||i.indexOf(s.constructor)>-1)return s}else if(s instanceof u&&(s=s.lookup(t.slice(1),i,!0)))return s}else for(var n=0;n<this.nestedArray.length;++n)if(this.et[n]instanceof u&&(s=this.et[n].lookup(t,i,!0)))return s;return null===this.parent||e?null:this.parent.lookup(t,i)},u.prototype.lookupType=function(t){var i=this.lookup(t,[n]);if(!i)throw Error("no such type: "+t);return i},u.prototype.lookupEnum=function(t){var i=this.lookup(t,[h]);if(!i)throw Error("no such Enum '"+t+"' in "+this);return i},u.prototype.lookupTypeOrEnum=function(t){var i=this.lookup(t,[n,h]);if(!i)throw Error("no such Type or Enum '"+t+"' in "+this);return i},u.prototype.lookupService=function(t){var i=this.lookup(t,[r]);if(!i)throw Error("no such Service '"+t+"' in "+this);return i},u.it=function(t,i,e){n=t,r=i,h=e}},3243:(t,i,e)=>{"use strict";t.exports=r,r.className="ReflectionObject";var s,n=e(9935);function r(t,i){if(!n.isString(t))throw TypeError("name must be a string");if(i&&!n.isObject(i))throw TypeError("options must be an object");this.options=i,this.parsedOptions=null,this.name=t,this.parent=null,this.resolved=!1,this.comment=null,this.filename=null}Object.defineProperties(r.prototype,{root:{get:function(){for(var t=this;null!==t.parent;)t=t.parent;return t}},fullName:{get:function(){for(var t=[this.name],i=this.parent;i;)t.unshift(i.name),i=i.parent;return t.join(".")}}}),r.prototype.toJSON=function(){throw Error()},r.prototype.onAdd=function(t){this.parent&&this.parent!==t&&this.parent.remove(this),this.parent=t,this.resolved=!1;var i=t.root;i instanceof s&&i.st(this)},r.prototype.onRemove=function(t){var i=t.root;i instanceof s&&i.nt(this),this.parent=null,this.resolved=!1},r.prototype.resolve=function(){return this.resolved||this.root instanceof s&&(this.resolved=!0),this},r.prototype.getOption=function(t){if(this.options)return this.options[t]},r.prototype.setOption=function(t,i,e){return e&&this.options&&void 0!==this.options[t]||((this.options||(this.options={}))[t]=i),this},r.prototype.setParsedOption=function(t,i,e){this.parsedOptions||(this.parsedOptions=[]);var s=this.parsedOptions;if(e){var r=s.find((function(i){return Object.prototype.hasOwnProperty.call(i,t)}));if(r){var h=r[t];n.setProperty(h,e,i)}else(r={})[t]=n.setProperty({},e,i),s.push(r)}else{var o={};o[t]=i,s.push(o)}return this},r.prototype.setOptions=function(t,i){if(t)for(var e=Object.keys(t),s=0;s<e.length;++s)this.setOption(e[s],t[e[s]],i);return this},r.prototype.toString=function(){var t=this.constructor.className,i=this.fullName;return i.length?t+" "+i:t},r.it=function(t){s=t}},7598:(t,i,e)=>{"use strict";t.exports=h;var s=e(3243);((h.prototype=Object.create(s.prototype)).constructor=h).className="OneOf";var n=e(3548),r=e(9935);function h(t,i,e,n){if(Array.isArray(i)||(e=i,i=void 0),s.call(this,t,e),void 0!==i&&!Array.isArray(i))throw TypeError("fieldNames must be an Array");this.oneof=i||[],this.fieldsArray=[],this.comment=n}function o(t){if(t.parent)for(var i=0;i<t.fieldsArray.length;++i)t.fieldsArray[i].parent||t.parent.add(t.fieldsArray[i])}h.fromJSON=function(t,i){return new h(t,i.oneof,i.options,i.comment)},h.prototype.toJSON=function(t){var i=!!t&&Boolean(t.keepComments);return r.toObject(["options",this.options,"oneof",this.oneof,"comment",i?this.comment:void 0])},h.prototype.add=function(t){if(!(t instanceof n))throw TypeError("field must be a Field");return t.parent&&t.parent!==this.parent&&t.parent.remove(t),this.oneof.push(t.name),this.fieldsArray.push(t),t.partOf=this,o(this),this},h.prototype.remove=function(t){if(!(t instanceof n))throw TypeError("field must be a Field");var i=this.fieldsArray.indexOf(t);if(i<0)throw Error(t+" is not a member of "+this);return this.fieldsArray.splice(i,1),(i=this.oneof.indexOf(t.name))>-1&&this.oneof.splice(i,1),t.partOf=null,this},h.prototype.onAdd=function(t){s.prototype.onAdd.call(this,t);for(var i=0;i<this.oneof.length;++i){var e=t.get(this.oneof[i]);e&&!e.partOf&&(e.partOf=this,this.fieldsArray.push(e))}o(this)},h.prototype.onRemove=function(t){for(var i,e=0;e<this.fieldsArray.length;++e)(i=this.fieldsArray[e]).parent&&i.parent.remove(i);s.prototype.onRemove.call(this,t)},h.d=function(){for(var t=new Array(arguments.length),i=0;i<arguments.length;)t[i]=arguments[i++];return function(i,e){r.decorateType(i.constructor).add(new h(e,t)),Object.defineProperty(i,e,{get:r.oneOfGetter(t),set:r.oneOfSetter(t)})}}},1408:(t,i,e)=>{"use strict";t.exports=a;var s,n=e(9693),r=n.LongBits,h=n.utf8;function o(t,i){return RangeError("index out of range: "+t.pos+" + "+(i||1)+" > "+t.len)}function a(t){this.buf=t,this.pos=0,this.len=t.length}var c,l="undefined"!=typeof Uint8Array?function(t){if(t instanceof Uint8Array||Array.isArray(t))return new a(t);throw Error("illegal buffer")}:function(t){if(Array.isArray(t))return new a(t);throw Error("illegal buffer")},u=function(){return n.Buffer?function(t){return(a.create=function(t){return n.Buffer.isBuffer(t)?new s(t):l(t)})(t)}:l};function d(){var t=new r(0,0),i=0;if(!(this.len-this.pos>4)){for(;i<3;++i){if(this.pos>=this.len)throw o(this);if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*i)>>>0,this.buf[this.pos++]<128)return t}return t.lo=(t.lo|(127&this.buf[this.pos++])<<7*i)>>>0,t}for(;i<4;++i)if(t.lo=(t.lo|(127&this.buf[this.pos])<<7*i)>>>0,this.buf[this.pos++]<128)return t;if(t.lo=(t.lo|(127&this.buf[this.pos])<<28)>>>0,t.hi=(t.hi|(127&this.buf[this.pos])>>4)>>>0,this.buf[this.pos++]<128)return t;if(i=0,this.len-this.pos>4){for(;i<5;++i)if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*i+3)>>>0,this.buf[this.pos++]<128)return t}else for(;i<5;++i){if(this.pos>=this.len)throw o(this);if(t.hi=(t.hi|(127&this.buf[this.pos])<<7*i+3)>>>0,this.buf[this.pos++]<128)return t}throw Error("invalid varint encoding")}function p(t,i){return(t[i-4]|t[i-3]<<8|t[i-2]<<16|t[i-1]<<24)>>>0}function f(){if(this.pos+8>this.len)throw o(this,8);return new r(p(this.buf,this.pos+=4),p(this.buf,this.pos+=4))}a.create=u(),a.prototype.rt=n.Array.prototype.subarray||n.Array.prototype.slice,a.prototype.uint32=(c=4294967295,function(){if(c=(127&this.buf[this.pos])>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<7)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<14)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(127&this.buf[this.pos])<<21)>>>0,this.buf[this.pos++]<128)return c;if(c=(c|(15&this.buf[this.pos])<<28)>>>0,this.buf[this.pos++]<128)return c;if((this.pos+=5)>this.len)throw this.pos=this.len,o(this,10);return c}),a.prototype.int32=function(){return 0|this.uint32()},a.prototype.sint32=function(){var t=this.uint32();return t>>>1^-(1&t)|0},a.prototype.bool=function(){return 0!==this.uint32()},a.prototype.fixed32=function(){if(this.pos+4>this.len)throw o(this,4);return p(this.buf,this.pos+=4)},a.prototype.sfixed32=function(){if(this.pos+4>this.len)throw o(this,4);return 0|p(this.buf,this.pos+=4)},a.prototype.float=function(){if(this.pos+4>this.len)throw o(this,4);var t=n.float.readFloatLE(this.buf,this.pos);return this.pos+=4,t},a.prototype.double=function(){if(this.pos+8>this.len)throw o(this,4);var t=n.float.readDoubleLE(this.buf,this.pos);return this.pos+=8,t},a.prototype.bytes=function(){var t=this.uint32(),i=this.pos,e=this.pos+t;if(e>this.len)throw o(this,t);return this.pos+=t,Array.isArray(this.buf)?this.buf.slice(i,e):i===e?new this.buf.constructor(0):this.rt.call(this.buf,i,e)},a.prototype.string=function(){var t=this.bytes();return h.read(t,0,t.length)},a.prototype.skip=function(t){if("number"==typeof t){if(this.pos+t>this.len)throw o(this,t);this.pos+=t}else do{if(this.pos>=this.len)throw o(this)}while(128&this.buf[this.pos++]);return this},a.prototype.skipType=function(t){switch(t){case 0:this.skip();break;case 1:this.skip(8);break;case 2:this.skip(this.uint32());break;case 3:for(;4!=(t=7&this.uint32());)this.skipType(t);break;case 5:this.skip(4);break;default:throw Error("invalid wire type "+t+" at offset "+this.pos)}return this},a.it=function(t){s=t,a.create=u(),s.it();var i=n.Long?"toLong":"toNumber";n.merge(a.prototype,{int64:function(){return d.call(this)[i](!1)},uint64:function(){return d.call(this)[i](!0)},sint64:function(){return d.call(this).zzDecode()[i](!1)},fixed64:function(){return f.call(this)[i](!0)},sfixed64:function(){return f.call(this)[i](!1)}})}},593:(t,i,e)=>{"use strict";t.exports=r;var s=e(1408);(r.prototype=Object.create(s.prototype)).constructor=r;var n=e(9693);function r(t){s.call(this,t)}r.it=function(){n.Buffer&&(r.prototype.rt=n.Buffer.prototype.slice)},r.prototype.string=function(){var t=this.uint32();return this.buf.utf8Slice?this.buf.utf8Slice(this.pos,this.pos=Math.min(this.pos+t,this.len)):this.buf.toString("utf-8",this.pos,this.pos=Math.min(this.pos+t,this.len))},r.it()},9424:(t,i,e)=>{"use strict";t.exports=u;var s=e(9313);((u.prototype=Object.create(s.prototype)).constructor=u).className="Root";var n,r,h,o=e(3548),a=e(7025),c=e(7598),l=e(9935);function u(t){s.call(this,"",t),this.deferred=[],this.files=[]}function d(){}u.fromJSON=function(t,i){return i||(i=new u),t.options&&i.setOptions(t.options),i.addJSON(t.nested)},u.prototype.resolvePath=l.path.resolve,u.prototype.fetch=l.fetch,u.prototype.load=function t(i,e,s){"function"==typeof e&&(s=e,e=void 0);var n=this;if(!s)return l.asPromise(t,n,i,e);var o=s===d;function a(t,i){if(s){var e=s;if(s=null,o)throw t;e(t,i)}}function c(t){var i=t.lastIndexOf("google/protobuf/");if(i>-1){var e=t.substring(i);if(e in h)return e}return null}function u(t,i){try{if(l.isString(i)&&"{"===i.charAt(0)&&(i=JSON.parse(i)),l.isString(i)){r.filename=t;var s,h=r(i,n,e),u=0;if(h.imports)for(;u<h.imports.length;++u)(s=c(h.imports[u])||n.resolvePath(t,h.imports[u]))&&p(s);if(h.weakImports)for(u=0;u<h.weakImports.length;++u)(s=c(h.weakImports[u])||n.resolvePath(t,h.weakImports[u]))&&p(s,!0)}else n.setOptions(i.options).addJSON(i.nested)}catch(t){a(t)}o||f||a(null,n)}function p(t,i){if(!(n.files.indexOf(t)>-1))if(n.files.push(t),t in h)o?u(t,h[t]):(++f,setTimeout((function(){--f,u(t,h[t])})));else if(o){var e;try{e=l.fs.readFileSync(t).toString("utf8")}catch(t){return void(i||a(t))}u(t,e)}else++f,n.fetch(t,(function(e,r){--f,s&&(e?i?f||a(null,n):a(e):u(t,r))}))}var f=0;l.isString(i)&&(i=[i]);for(var m,g=0;g<i.length;++g)(m=n.resolvePath("",i[g]))&&p(m);if(o)return n;f||a(null,n)},u.prototype.loadSync=function(t,i){if(!l.isNode)throw Error("not supported");return this.load(t,i,d)},u.prototype.resolveAll=function(){if(this.deferred.length)throw Error("unresolvable extensions: "+this.deferred.map((function(t){return"'extend "+t.extend+"' in "+t.parent.fullName})).join(", "));return s.prototype.resolveAll.call(this)};var p=/^[A-Z]/;function f(t,i){var e=i.parent.lookup(i.extend);if(e){var s=new o(i.fullName,i.id,i.type,i.rule,void 0,i.options);return s.declaringField=i,i.extensionField=s,e.add(s),!0}return!1}u.prototype.st=function(t){if(t instanceof o)void 0===t.extend||t.extensionField||f(0,t)||this.deferred.push(t);else if(t instanceof a)p.test(t.name)&&(t.parent[t.name]=t.values);else if(!(t instanceof c)){if(t instanceof n)for(var i=0;i<this.deferred.length;)f(0,this.deferred[i])?this.deferred.splice(i,1):++i;for(var e=0;e<t.nestedArray.length;++e)this.st(t.et[e]);p.test(t.name)&&(t.parent[t.name]=t)}},u.prototype.nt=function(t){if(t instanceof o){if(void 0!==t.extend)if(t.extensionField)t.extensionField.parent.remove(t.extensionField),t.extensionField=null;else{var i=this.deferred.indexOf(t);i>-1&&this.deferred.splice(i,1)}}else if(t instanceof a)p.test(t.name)&&delete t.parent[t.name];else if(t instanceof s){for(var e=0;e<t.nestedArray.length;++e)this.nt(t.et[e]);p.test(t.name)&&delete t.parent[t.name]}},u.it=function(t,i,e){n=t,r=i,h=e}},5054:t=>{"use strict";t.exports={}},5994:(t,i,e)=>{"use strict";i.Service=e(7948)},7948:(t,i,e)=>{"use strict";t.exports=n;var s=e(9693);function n(t,i,e){if("function"!=typeof t)throw TypeError("rpcImpl must be a function");s.EventEmitter.call(this),this.rpcImpl=t,this.requestDelimited=Boolean(i),this.responseDelimited=Boolean(e)}(n.prototype=Object.create(s.EventEmitter.prototype)).constructor=n,n.prototype.rpcCall=function t(i,e,n,r,h){if(!r)throw TypeError("request must be specified");var o=this;if(!h)return s.asPromise(t,o,i,e,n,r);if(o.rpcImpl)try{return o.rpcImpl(i,e[o.requestDelimited?"encodeDelimited":"encode"](r).finish(),(function(t,e){if(t)return o.emit("error",t,i),h(t);if(null!==e){if(!(e instanceof n))try{e=n[o.responseDelimited?"decodeDelimited":"decode"](e)}catch(t){return o.emit("error",t,i),h(t)}return o.emit("data",e,i),h(null,e)}o.end(!0)}))}catch(t){return o.emit("error",t,i),void setTimeout((function(){h(t)}),0)}else setTimeout((function(){h(Error("already ended"))}),0)},n.prototype.end=function(t){return this.rpcImpl&&(t||this.rpcImpl(null,null,null),this.rpcImpl=null,this.emit("end").off()),this}},7513:(t,i,e)=>{"use strict";t.exports=o;var s=e(9313);((o.prototype=Object.create(s.prototype)).constructor=o).className="Service";var n=e(4429),r=e(9935),h=e(5994);function o(t,i){s.call(this,t,i),this.methods={},this.ht=null}function a(t){return t.ht=null,t}o.fromJSON=function(t,i){var e=new o(t,i.options);if(i.methods)for(var s=Object.keys(i.methods),r=0;r<s.length;++r)e.add(n.fromJSON(s[r],i.methods[s[r]]));return i.nested&&e.addJSON(i.nested),e.comment=i.comment,e},o.prototype.toJSON=function(t){var i=s.prototype.toJSON.call(this,t),e=!!t&&Boolean(t.keepComments);return r.toObject(["options",i&&i.options||void 0,"methods",s.arrayToJSON(this.methodsArray,t)||{},"nested",i&&i.nested||void 0,"comment",e?this.comment:void 0])},Object.defineProperty(o.prototype,"methodsArray",{get:function(){return this.ht||(this.ht=r.toArray(this.methods))}}),o.prototype.get=function(t){return this.methods[t]||s.prototype.get.call(this,t)},o.prototype.resolveAll=function(){for(var t=this.methodsArray,i=0;i<t.length;++i)t[i].resolve();return s.prototype.resolve.call(this)},o.prototype.add=function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);return t instanceof n?(this.methods[t.name]=t,t.parent=this,a(this)):s.prototype.add.call(this,t)},o.prototype.remove=function(t){if(t instanceof n){if(this.methods[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.methods[t.name],t.parent=null,a(this)}return s.prototype.remove.call(this,t)},o.prototype.create=function(t,i,e){for(var s,n=new h.Service(t,i,e),o=0;o<this.methodsArray.length;++o){var a=r.lcFirst((s=this.ht[o]).resolve().name).replace(/[^$\w_]/g,"");n[a]=r.codegen(["r","c"],r.isReserved(a)?a+"_":a)("return this.rpcCall(m,q,s,r,c)")({m:s,q:s.resolvedRequestType.ctor,s:s.resolvedResponseType.ctor})}return n}},7645:(t,i,e)=>{"use strict";t.exports=y;var s=e(9313);((y.prototype=Object.create(s.prototype)).constructor=y).className="Type";var n=e(7025),r=e(7598),h=e(3548),o=e(6039),a=e(7513),c=e(8368),l=e(1408),u=e(1173),d=e(9935),p=e(4928),f=e(5305),m=e(4497),g=e(3996),v=e(1667);function y(t,i){s.call(this,t,i),this.fields={},this.oneofs=void 0,this.extensions=void 0,this.reserved=void 0,this.group=void 0,this.ot=null,this.K=null,this.ct=null,this.lt=null}function b(t){return t.ot=t.K=t.ct=null,delete t.encode,delete t.decode,delete t.verify,t}Object.defineProperties(y.prototype,{fieldsById:{get:function(){if(this.ot)return this.ot;this.ot={};for(var t=Object.keys(this.fields),i=0;i<t.length;++i){var e=this.fields[t[i]],s=e.id;if(this.ot[s])throw Error("duplicate id "+s+" in "+this);this.ot[s]=e}return this.ot}},fieldsArray:{get:function(){return this.K||(this.K=d.toArray(this.fields))}},oneofsArray:{get:function(){return this.ct||(this.ct=d.toArray(this.oneofs))}},ctor:{get:function(){return this.lt||(this.ctor=y.generateConstructor(this)())},set:function(t){var i=t.prototype;i instanceof c||((t.prototype=new c).constructor=t,d.merge(t.prototype,i)),t.$type=t.prototype.$type=this,d.merge(t,c,!0),this.lt=t;for(var e=0;e<this.fieldsArray.length;++e)this.K[e].resolve();var s={};for(e=0;e<this.oneofsArray.length;++e)s[this.ct[e].resolve().name]={get:d.oneOfGetter(this.ct[e].oneof),set:d.oneOfSetter(this.ct[e].oneof)};e&&Object.defineProperties(t.prototype,s)}}}),y.generateConstructor=function(t){for(var i,e=d.codegen(["p"],t.name),s=0;s<t.fieldsArray.length;++s)(i=t.K[s]).map?e("this%s={}",d.safeProp(i.name)):i.repeated&&e("this%s=[]",d.safeProp(i.name));return e("if(p)for(var ks=Object.keys(p),i=0;i<ks.length;++i)if(p[ks[i]]!=null)")("this[ks[i]]=p[ks[i]]")},y.fromJSON=function(t,i){var e=new y(t,i.options);e.extensions=i.extensions,e.reserved=i.reserved;for(var c=Object.keys(i.fields),l=0;l<c.length;++l)e.add((void 0!==i.fields[c[l]].keyType?o.fromJSON:h.fromJSON)(c[l],i.fields[c[l]]));if(i.oneofs)for(c=Object.keys(i.oneofs),l=0;l<c.length;++l)e.add(r.fromJSON(c[l],i.oneofs[c[l]]));if(i.nested)for(c=Object.keys(i.nested),l=0;l<c.length;++l){var u=i.nested[c[l]];e.add((void 0!==u.id?h.fromJSON:void 0!==u.fields?y.fromJSON:void 0!==u.values?n.fromJSON:void 0!==u.methods?a.fromJSON:s.fromJSON)(c[l],u))}return i.extensions&&i.extensions.length&&(e.extensions=i.extensions),i.reserved&&i.reserved.length&&(e.reserved=i.reserved),i.group&&(e.group=!0),i.comment&&(e.comment=i.comment),e},y.prototype.toJSON=function(t){var i=s.prototype.toJSON.call(this,t),e=!!t&&Boolean(t.keepComments);return d.toObject(["options",i&&i.options||void 0,"oneofs",s.arrayToJSON(this.oneofsArray,t),"fields",s.arrayToJSON(this.fieldsArray.filter((function(t){return!t.declaringField})),t)||{},"extensions",this.extensions&&this.extensions.length?this.extensions:void 0,"reserved",this.reserved&&this.reserved.length?this.reserved:void 0,"group",this.group||void 0,"nested",i&&i.nested||void 0,"comment",e?this.comment:void 0])},y.prototype.resolveAll=function(){for(var t=this.fieldsArray,i=0;i<t.length;)t[i++].resolve();var e=this.oneofsArray;for(i=0;i<e.length;)e[i++].resolve();return s.prototype.resolveAll.call(this)},y.prototype.get=function(t){return this.fields[t]||this.oneofs&&this.oneofs[t]||this.nested&&this.nested[t]||null},y.prototype.add=function(t){if(this.get(t.name))throw Error("duplicate name '"+t.name+"' in "+this);if(t instanceof h&&void 0===t.extend){if(this.ot?this.ot[t.id]:this.fieldsById[t.id])throw Error("duplicate id "+t.id+" in "+this);if(this.isReservedId(t.id))throw Error("id "+t.id+" is reserved in "+this);if(this.isReservedName(t.name))throw Error("name '"+t.name+"' is reserved in "+this);return t.parent&&t.parent.remove(t),this.fields[t.name]=t,t.message=this,t.onAdd(this),b(this)}return t instanceof r?(this.oneofs||(this.oneofs={}),this.oneofs[t.name]=t,t.onAdd(this),b(this)):s.prototype.add.call(this,t)},y.prototype.remove=function(t){if(t instanceof h&&void 0===t.extend){if(!this.fields||this.fields[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.fields[t.name],t.parent=null,t.onRemove(this),b(this)}if(t instanceof r){if(!this.oneofs||this.oneofs[t.name]!==t)throw Error(t+" is not a member of "+this);return delete this.oneofs[t.name],t.parent=null,t.onRemove(this),b(this)}return s.prototype.remove.call(this,t)},y.prototype.isReservedId=function(t){return s.isReservedId(this.reserved,t)},y.prototype.isReservedName=function(t){return s.isReservedName(this.reserved,t)},y.prototype.create=function(t){return new this.ctor(t)},y.prototype.setup=function(){for(var t=this.fullName,i=[],e=0;e<this.fieldsArray.length;++e)i.push(this.K[e].resolve().resolvedType);this.encode=p(this)({Writer:u,types:i,util:d}),this.decode=f(this)({Reader:l,types:i,util:d}),this.verify=m(this)({types:i,util:d}),this.fromObject=g.fromObject(this)({types:i,util:d}),this.toObject=g.toObject(this)({types:i,util:d});var s=v[t];if(s){var n=Object.create(this);n.fromObject=this.fromObject,this.fromObject=s.fromObject.bind(n),n.toObject=this.toObject,this.toObject=s.toObject.bind(n)}return this},y.prototype.encode=function(t,i){return this.setup().encode(t,i)},y.prototype.encodeDelimited=function(t,i){return this.encode(t,i&&i.len?i.fork():i).ldelim()},y.prototype.decode=function(t,i){return this.setup().decode(t,i)},y.prototype.decodeDelimited=function(t){return t instanceof l||(t=l.create(t)),this.decode(t,t.uint32())},y.prototype.verify=function(t){return this.setup().verify(t)},y.prototype.fromObject=function(t){return this.setup().fromObject(t)},y.prototype.toObject=function(t,i){return this.setup().toObject(t,i)},y.d=function(t){return function(i){d.decorateType(i,t)}}},7063:(t,i,e)=>{"use strict";var s=i,n=e(9935),r=["double","float","int32","uint32","sint32","fixed32","sfixed32","int64","uint64","sint64","fixed64","sfixed64","bool","string","bytes"];function h(t,i){var e=0,s={};for(i|=0;e<t.length;)s[r[e+i]]=t[e++];return s}s.basic=h([1,5,0,0,0,5,5,0,0,0,1,1,0,2,2]),s.defaults=h([0,0,0,0,0,0,0,0,0,0,0,0,!1,"",n.emptyArray,null]),s.long=h([0,0,0,1,1],7),s.mapKey=h([0,0,0,5,5,0,0,0,1,1,0,2],2),s.packed=h([1,5,0,0,0,5,5,0,0,0,1,1,0])},9935:(t,i,e)=>{"use strict";var s,n,r=t.exports=e(9693),h=e(5054);r.codegen=e(5124),r.fetch=e(9054),r.path=e(8626),r.fs=r.inquire("fs"),r.toArray=function(t){if(t){for(var i=Object.keys(t),e=new Array(i.length),s=0;s<i.length;)e[s]=t[i[s++]];return e}return[]},r.toObject=function(t){for(var i={},e=0;e<t.length;){var s=t[e++],n=t[e++];void 0!==n&&(i[s]=n)}return i};var o=/\\/g,a=/"/g;r.isReserved=function(t){return/^(?:do|if|in|for|let|new|try|var|case|else|enum|eval|false|null|this|true|void|with|break|catch|class|const|super|throw|while|yield|delete|export|import|public|return|static|switch|typeof|default|extends|finally|package|private|continue|debugger|function|arguments|interface|protected|implements|instanceof)$/.test(t)},r.safeProp=function(t){return!/^[$\w_]+$/.test(t)||r.isReserved(t)?'["'+t.replace(o,"\\\\").replace(a,'\\"')+'"]':"."+t},r.ucFirst=function(t){return t.charAt(0).toUpperCase()+t.substring(1)};var c=/_([a-z])/g;r.camelCase=function(t){return t.substring(0,1)+t.substring(1).replace(c,(function(t,i){return i.toUpperCase()}))},r.compareFieldsById=function(t,i){return t.id-i.id},r.decorateType=function(t,i){if(t.$type)return i&&t.$type.name!==i&&(r.decorateRoot.remove(t.$type),t.$type.name=i,r.decorateRoot.add(t.$type)),t.$type;s||(s=e(7645));var n=new s(i||t.name);return r.decorateRoot.add(n),n.ctor=t,Object.defineProperty(t,"$type",{value:n,enumerable:!1}),Object.defineProperty(t.prototype,"$type",{value:n,enumerable:!1}),n};var l=0;r.decorateEnum=function(t){if(t.$type)return t.$type;n||(n=e(7025));var i=new n("Enum"+l++,t);return r.decorateRoot.add(i),Object.defineProperty(t,"$type",{value:i,enumerable:!1}),i},r.setProperty=function(t,i,e){if("object"!=typeof t)throw TypeError("dst must be an object");if(!i)throw TypeError("path must be specified");return function t(i,e,s){var n=e.shift();if(e.length>0)i[n]=t(i[n]||{},e,s);else{var r=i[n];r&&(s=[].concat(r).concat(s)),i[n]=s}return i}(t,i=i.split("."),e)},Object.defineProperty(r,"decorateRoot",{get:function(){return h.decorated||(h.decorated=new(e(9424)))}})},1945:(t,i,e)=>{"use strict";t.exports=n;var s=e(9693);function n(t,i){this.lo=t>>>0,this.hi=i>>>0}var r=n.zero=new n(0,0);r.toNumber=function(){return 0},r.zzEncode=r.zzDecode=function(){return this},r.length=function(){return 1};var h=n.zeroHash="\0\0\0\0\0\0\0\0";n.fromNumber=function(t){if(0===t)return r;var i=t<0;i&&(t=-t);var e=t>>>0,s=(t-e)/4294967296>>>0;return i&&(s=~s>>>0,e=~e>>>0,++e>4294967295&&(e=0,++s>4294967295&&(s=0))),new n(e,s)},n.from=function(t){if("number"==typeof t)return n.fromNumber(t);if(s.isString(t)){if(!s.Long)return n.fromNumber(parseInt(t,10));t=s.Long.fromString(t)}return t.low||t.high?new n(t.low>>>0,t.high>>>0):r},n.prototype.toNumber=function(t){if(!t&&this.hi>>>31){var i=1+~this.lo>>>0,e=~this.hi>>>0;return i||(e=e+1>>>0),-(i+4294967296*e)}return this.lo+4294967296*this.hi},n.prototype.toLong=function(t){return s.Long?new s.Long(0|this.lo,0|this.hi,Boolean(t)):{low:0|this.lo,high:0|this.hi,unsigned:Boolean(t)}};var o=String.prototype.charCodeAt;n.fromHash=function(t){return t===h?r:new n((o.call(t,0)|o.call(t,1)<<8|o.call(t,2)<<16|o.call(t,3)<<24)>>>0,(o.call(t,4)|o.call(t,5)<<8|o.call(t,6)<<16|o.call(t,7)<<24)>>>0)},n.prototype.toHash=function(){return String.fromCharCode(255&this.lo,this.lo>>>8&255,this.lo>>>16&255,this.lo>>>24,255&this.hi,this.hi>>>8&255,this.hi>>>16&255,this.hi>>>24)},n.prototype.zzEncode=function(){var t=this.hi>>31;return this.hi=((this.hi<<1|this.lo>>>31)^t)>>>0,this.lo=(this.lo<<1^t)>>>0,this},n.prototype.zzDecode=function(){var t=-(1&this.lo);return this.lo=((this.lo>>>1|this.hi<<31)^t)>>>0,this.hi=(this.hi>>>1^t)>>>0,this},n.prototype.length=function(){var t=this.lo,i=(this.lo>>>28|this.hi<<4)>>>0,e=this.hi>>>24;return 0===e?0===i?t<16384?t<128?1:2:t<2097152?3:4:i<16384?i<128?5:6:i<2097152?7:8:e<128?9:10}},9693:function(t,i,e){"use strict";var s=i;function n(t,i,e){for(var s=Object.keys(i),n=0;n<s.length;++n)void 0!==t[s[n]]&&e||(t[s[n]]=i[s[n]]);return t}function r(t){function i(t,e){if(!(this instanceof i))return new i(t,e);Object.defineProperty(this,"message",{get:function(){return t}}),Error.captureStackTrace?Error.captureStackTrace(this,i):Object.defineProperty(this,"stack",{value:(new Error).stack||""}),e&&n(this,e)}return(i.prototype=Object.create(Error.prototype)).constructor=i,Object.defineProperty(i.prototype,"name",{get:function(){return t}}),i.prototype.toString=function(){return this.name+": "+this.message},i}s.asPromise=e(4537),s.base64=e(7419),s.EventEmitter=e(9211),s.float=e(945),s.inquire=e(7199),s.utf8=e(4997),s.pool=e(6662),s.LongBits=e(1945),s.isNode=Boolean(void 0!==e.g&&e.g&&e.g.process&&e.g.process.versions&&e.g.process.versions.node),s.global=s.isNode&&e.g||"undefined"!=typeof window&&window||"undefined"!=typeof self&&self||this,s.emptyArray=Object.freeze?Object.freeze([]):[],s.emptyObject=Object.freeze?Object.freeze({}):{},s.isInteger=Number.isInteger||function(t){return"number"==typeof t&&isFinite(t)&&Math.floor(t)===t},s.isString=function(t){return"string"==typeof t||t instanceof String},s.isObject=function(t){return t&&"object"==typeof t},s.isset=s.isSet=function(t,i){var e=t[i];return!(null==e||!t.hasOwnProperty(i))&&("object"!=typeof e||(Array.isArray(e)?e.length:Object.keys(e).length)>0)},s.Buffer=function(){try{var t=s.inquire("buffer").Buffer;return t.prototype.utf8Write?t:null}catch(t){return null}}(),s.ut=null,s.dt=null,s.newBuffer=function(t){return"number"==typeof t?s.Buffer?s.dt(t):new s.Array(t):s.Buffer?s.ut(t):"undefined"==typeof Uint8Array?t:new Uint8Array(t)},s.Array="undefined"!=typeof Uint8Array?Uint8Array:Array,s.Long=s.global.dcodeIO&&s.global.dcodeIO.Long||s.global.Long||s.inquire("long"),s.key2Re=/^true|false|0|1$/,s.key32Re=/^-?(?:0|[1-9][0-9]*)$/,s.key64Re=/^(?:[\\x00-\\xff]{8}|-?(?:0|[1-9][0-9]*))$/,s.longToHash=function(t){return t?s.LongBits.from(t).toHash():s.LongBits.zeroHash},s.longFromHash=function(t,i){var e=s.LongBits.fromHash(t);return s.Long?s.Long.fromBits(e.lo,e.hi,i):e.toNumber(Boolean(i))},s.merge=n,s.lcFirst=function(t){return t.charAt(0).toLowerCase()+t.substring(1)},s.newError=r,s.ProtocolError=r("ProtocolError"),s.oneOfGetter=function(t){for(var i={},e=0;e<t.length;++e)i[t[e]]=1;return function(){for(var t=Object.keys(this),e=t.length-1;e>-1;--e)if(1===i[t[e]]&&void 0!==this[t[e]]&&null!==this[t[e]])return t[e]}},s.oneOfSetter=function(t){return function(i){for(var e=0;e<t.length;++e)t[e]!==i&&delete this[t[e]]}},s.toJSONOptions={longs:String,enums:String,bytes:String,json:!0},s.it=function(){var t=s.Buffer;t?(s.ut=t.from!==Uint8Array.from&&t.from||function(i,e){return new t(i,e)},s.dt=t.allocUnsafe||function(i){return new t(i)}):s.ut=s.dt=null}},4497:(t,i,e)=>{"use strict";t.exports=function(t){var i=n.codegen(["m"],t.name+"$verify")('if(typeof m!=="object"||m===null)')("return%j","object expected"),e=t.oneofsArray,s={};e.length&&i("var p={}");for(var a=0;a<t.fieldsArray.length;++a){var c=t.K[a].resolve(),l="m"+n.safeProp(c.name);if(c.optional&&i("if(%s!=null&&m.hasOwnProperty(%j)){",l,c.name),c.map)i("if(!util.isObject(%s))",l)("return%j",r(c,"object"))("var k=Object.keys(%s)",l)("for(var i=0;i<k.length;++i){"),o(i,c,"k[i]"),h(i,c,a,l+"[k[i]]")("}");else if(c.repeated)i("if(!Array.isArray(%s))",l)("return%j",r(c,"array"))("for(var i=0;i<%s.length;++i){",l),h(i,c,a,l+"[i]")("}");else{if(c.partOf){var u=n.safeProp(c.partOf.name);1===s[c.partOf.name]&&i("if(p%s===1)",u)("return%j",c.partOf.name+": multiple values"),s[c.partOf.name]=1,i("p%s=1",u)}h(i,c,a,l)}c.optional&&i("}")}return i("return null")};var s=e(7025),n=e(9935);function r(t,i){return t.name+": "+i+(t.repeated&&"array"!==i?"[]":t.map&&"object"!==i?"{k:"+t.keyType+"}":"")+" expected"}function h(t,i,e,n){if(i.resolvedType)if(i.resolvedType instanceof s){t("switch(%s){",n)("default:")("return%j",r(i,"enum value"));for(var h=Object.keys(i.resolvedType.values),o=0;o<h.length;++o)t("case %i:",i.resolvedType.values[h[o]]);t("break")("}")}else t("{")("var e=types[%i].verify(%s);",e,n)("if(e)")("return%j+e",i.name+".")("}");else switch(i.type){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":t("if(!util.isInteger(%s))",n)("return%j",r(i,"integer"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":t("if(!util.isInteger(%s)&&!(%s&&util.isInteger(%s.low)&&util.isInteger(%s.high)))",n,n,n,n)("return%j",r(i,"integer|Long"));break;case"float":case"double":t('if(typeof %s!=="number")',n)("return%j",r(i,"number"));break;case"bool":t('if(typeof %s!=="boolean")',n)("return%j",r(i,"boolean"));break;case"string":t("if(!util.isString(%s))",n)("return%j",r(i,"string"));break;case"bytes":t('if(!(%s&&typeof %s.length==="number"||util.isString(%s)))',n,n,n)("return%j",r(i,"buffer"))}return t}function o(t,i,e){switch(i.keyType){case"int32":case"uint32":case"sint32":case"fixed32":case"sfixed32":t("if(!util.key32Re.test(%s))",e)("return%j",r(i,"integer key"));break;case"int64":case"uint64":case"sint64":case"fixed64":case"sfixed64":t("if(!util.key64Re.test(%s))",e)("return%j",r(i,"integer|Long key"));break;case"bool":t("if(!util.key2Re.test(%s))",e)("return%j",r(i,"boolean key"))}return t}},1667:(t,i,e)=>{"use strict";var s=i,n=e(8368);s[".google.protobuf.Any"]={fromObject:function(t){if(t&&t["@type"]){var i=t["@type"].substring(t["@type"].lastIndexOf("/")+1),e=this.lookup(i);if(e){var s="."===t["@type"].charAt(0)?t["@type"].substr(1):t["@type"];return-1===s.indexOf("/")&&(s="/"+s),this.create({type_url:s,value:e.encode(e.fromObject(t)).finish()})}}return this.fromObject(t)},toObject:function(t,i){var e="",s="";if(i&&i.json&&t.type_url&&t.value){s=t.type_url.substring(t.type_url.lastIndexOf("/")+1),e=t.type_url.substring(0,t.type_url.lastIndexOf("/")+1);var r=this.lookup(s);r&&(t=r.decode(t.value))}if(!(t instanceof this.ctor)&&t instanceof n){var h=t.$type.toObject(t,i);return""===e&&(e="type.googleapis.com/"),s=e+("."===t.$type.fullName[0]?t.$type.fullName.substr(1):t.$type.fullName),h["@type"]=s,h}return this.toObject(t,i)}}},1173:(t,i,e)=>{"use strict";t.exports=u;var s,n=e(9693),r=n.LongBits,h=n.base64,o=n.utf8;function a(t,i,e){this.fn=t,this.len=i,this.next=void 0,this.val=e}function c(){}function l(t){this.head=t.head,this.tail=t.tail,this.len=t.len,this.next=t.states}function u(){this.len=0,this.head=new a(c,0,0),this.tail=this.head,this.states=null}var d=function(){return n.Buffer?function(){return(u.create=function(){return new s})()}:function(){return new u}};function p(t,i,e){i[e]=255&t}function f(t,i){this.len=t,this.next=void 0,this.val=i}function m(t,i,e){for(;t.hi;)i[e++]=127&t.lo|128,t.lo=(t.lo>>>7|t.hi<<25)>>>0,t.hi>>>=7;for(;t.lo>127;)i[e++]=127&t.lo|128,t.lo=t.lo>>>7;i[e++]=t.lo}function g(t,i,e){i[e]=255&t,i[e+1]=t>>>8&255,i[e+2]=t>>>16&255,i[e+3]=t>>>24}u.create=d(),u.alloc=function(t){return new n.Array(t)},n.Array!==Array&&(u.alloc=n.pool(u.alloc,n.Array.prototype.subarray)),u.prototype.ft=function(t,i,e){return this.tail=this.tail.next=new a(t,i,e),this.len+=i,this},f.prototype=Object.create(a.prototype),f.prototype.fn=function(t,i,e){for(;t>127;)i[e++]=127&t|128,t>>>=7;i[e]=t},u.prototype.uint32=function(t){return this.len+=(this.tail=this.tail.next=new f((t>>>=0)<128?1:t<16384?2:t<2097152?3:t<268435456?4:5,t)).len,this},u.prototype.int32=function(t){return t<0?this.ft(m,10,r.fromNumber(t)):this.uint32(t)},u.prototype.sint32=function(t){return this.uint32((t<<1^t>>31)>>>0)},u.prototype.uint64=function(t){var i=r.from(t);return this.ft(m,i.length(),i)},u.prototype.int64=u.prototype.uint64,u.prototype.sint64=function(t){var i=r.from(t).zzEncode();return this.ft(m,i.length(),i)},u.prototype.bool=function(t){return this.ft(p,1,t?1:0)},u.prototype.fixed32=function(t){return this.ft(g,4,t>>>0)},u.prototype.sfixed32=u.prototype.fixed32,u.prototype.fixed64=function(t){var i=r.from(t);return this.ft(g,4,i.lo).ft(g,4,i.hi)},u.prototype.sfixed64=u.prototype.fixed64,u.prototype.float=function(t){return this.ft(n.float.writeFloatLE,4,t)},u.prototype.double=function(t){return this.ft(n.float.writeDoubleLE,8,t)};var v=n.Array.prototype.set?function(t,i,e){i.set(t,e)}:function(t,i,e){for(var s=0;s<t.length;++s)i[e+s]=t[s]};u.prototype.bytes=function(t){var i=t.length>>>0;if(!i)return this.ft(p,1,0);if(n.isString(t)){var e=u.alloc(i=h.length(t));h.decode(t,e,0),t=e}return this.uint32(i).ft(v,i,t)},u.prototype.string=function(t){var i=o.length(t);return i?this.uint32(i).ft(o.write,i,t):this.ft(p,1,0)},u.prototype.fork=function(){return this.states=new l(this),this.head=this.tail=new a(c,0,0),this.len=0,this},u.prototype.reset=function(){return this.states?(this.head=this.states.head,this.tail=this.states.tail,this.len=this.states.len,this.states=this.states.next):(this.head=this.tail=new a(c,0,0),this.len=0),this},u.prototype.ldelim=function(){var t=this.head,i=this.tail,e=this.len;return this.reset().uint32(e),e&&(this.tail.next=t.next,this.tail=i,this.len+=e),this},u.prototype.finish=function(){for(var t=this.head.next,i=this.constructor.alloc(this.len),e=0;t;)t.fn(t.val,i,e),e+=t.len,t=t.next;return i},u.it=function(t){s=t,u.create=d(),s.it()}},3155:(t,i,e)=>{"use strict";t.exports=r;var s=e(1173);(r.prototype=Object.create(s.prototype)).constructor=r;var n=e(9693);function r(){s.call(this)}function h(t,i,e){t.length<40?n.utf8.write(t,i,e):i.utf8Write?i.utf8Write(t,e):i.write(t,e)}r.it=function(){r.alloc=n.dt,r.writeBytesBuffer=n.Buffer&&n.Buffer.prototype instanceof Uint8Array&&"set"===n.Buffer.prototype.set.name?function(t,i,e){i.set(t,e)}:function(t,i,e){if(t.copy)t.copy(i,e,0,t.length);else for(var s=0;s<t.length;)i[e++]=t[s++]}},r.prototype.bytes=function(t){n.isString(t)&&(t=n.ut(t,"base64"));var i=t.length>>>0;return this.uint32(i),i&&this.ft(r.writeBytesBuffer,i,t),this},r.prototype.string=function(t){var i=n.Buffer.byteLength(t);return this.uint32(i),i&&this.ft(h,i,t),this},r.it()},8660:(t,i,e)=>{var s;!function(t){!function(i){var s="object"==typeof e.g?e.g:"object"==typeof self?self:"object"==typeof this?this:Function("return this;")(),n=r(t);function r(t,i){return function(e,s){"function"!=typeof t[e]&&Object.defineProperty(t,e,{configurable:!0,writable:!0,value:s}),i&&i(e,s)}}void 0===s.Reflect?s.Reflect=t:n=r(s.Reflect,n),function(t){var i=Object.prototype.hasOwnProperty,e="function"==typeof Symbol,s=e&&void 0!==Symbol.toPrimitive?Symbol.toPrimitive:"@@toPrimitive",n=e&&void 0!==Symbol.iterator?Symbol.iterator:"@@iterator",r="function"==typeof Object.create,h={__proto__:[]}instanceof Array,o=!r&&!h,a={create:r?function(){return st(Object.create(null))}:h?function(){return st({__proto__:null})}:function(){return st({})},has:o?function(t,e){return i.call(t,e)}:function(t,i){return i in t},get:o?function(t,e){return i.call(t,e)?t[e]:void 0}:function(t,i){return t[i]}},c=Object.getPrototypeOf(Function),l="object"==typeof process&&{DEBUG_MODE:!1}&&"true"==={DEBUG_MODE:!1}.REFLECT_METADATA_USE_MAP_POLYFILL,u=l||"function"!=typeof Map||"function"!=typeof Map.prototype.entries?tt():Map,d=l||"function"!=typeof Set||"function"!=typeof Set.prototype.entries?it():Set,p=new(l||"function"!=typeof WeakMap?et():WeakMap);function f(t,i,e,s){if(R(e)){if(!q(t))throw new TypeError;if(!W(i))throw new TypeError;return A(t,i)}if(!q(t))throw new TypeError;if(!V(i))throw new TypeError;if(!V(s)&&!R(s)&&!D(s))throw new TypeError;return D(s)&&(s=void 0),P(t,i,e=H(e),s)}function m(t,i){function e(e,s){if(!V(e))throw new TypeError;if(!R(s)&&!G(s))throw new TypeError;E(t,i,e,s)}return e}function g(t,i,e,s){if(!V(e))throw new TypeError;return R(s)||(s=H(s)),E(t,i,e,s)}function v(t,i,e){if(!V(i))throw new TypeError;return R(e)||(e=H(e)),k(t,i,e)}function y(t,i,e){if(!V(i))throw new TypeError;return R(e)||(e=H(e)),C(t,i,e)}function b(t,i,e){if(!V(i))throw new TypeError;return R(e)||(e=H(e)),T(t,i,e)}function x(t,i,e){if(!V(i))throw new TypeError;return R(e)||(e=H(e)),M(t,i,e)}function w(t,i){if(!V(t))throw new TypeError;return R(i)||(i=H(i)),B(t,i)}function _(t,i){if(!V(t))throw new TypeError;return R(i)||(i=H(i)),O(t,i)}function S(t,i,e){if(!V(i))throw new TypeError;R(e)||(e=H(e));var s=I(i,e,!1);if(R(s))return!1;if(!s.delete(t))return!1;if(s.size>0)return!0;var n=p.get(i);return n.delete(e),n.size>0||p.delete(i),!0}function A(t,i){for(var e=t.length-1;e>=0;--e){var s=(0,t[e])(i);if(!R(s)&&!D(s)){if(!W(s))throw new TypeError;i=s}}return i}function P(t,i,e,s){for(var n=t.length-1;n>=0;--n){var r=(0,t[n])(i,e,s);if(!R(r)&&!D(r)){if(!V(r))throw new TypeError;s=r}}return s}function I(t,i,e){var s=p.get(t);if(R(s)){if(!e)return;s=new u,p.set(t,s)}var n=s.get(i);if(R(n)){if(!e)return;n=new u,s.set(i,n)}return n}function k(t,i,e){if(C(t,i,e))return!0;var s=K(i);return!D(s)&&k(t,s,e)}function C(t,i,e){var s=I(i,e,!1);return!R(s)&&N(s.has(t))}function T(t,i,e){if(C(t,i,e))return M(t,i,e);var s=K(i);return D(s)?void 0:T(t,s,e)}function M(t,i,e){var s=I(i,e,!1);if(!R(s))return s.get(t)}function E(t,i,e,s){I(e,s,!0).set(t,i)}function B(t,i){var e=O(t,i),s=K(t);if(null===s)return e;var n=B(s,i);if(n.length<=0)return e;if(e.length<=0)return n;for(var r=new d,h=[],o=0,a=e;o<a.length;o++){var c=a[o];r.has(c)||(r.add(c),h.push(c))}for(var l=0,u=n;l<u.length;l++){c=u[l];r.has(c)||(r.add(c),h.push(c))}return h}function O(t,i){var e=[],s=I(t,i,!1);if(R(s))return e;for(var n=Q(s.keys()),r=0;;){var h=X(n);if(!h)return e.length=r,e;var o=Y(h);try{e[r]=o}catch(t){try{Z(n)}finally{throw t}}r++}}function L(t){if(null===t)return 1;switch(typeof t){case"undefined":return 0;case"boolean":return 2;case"string":return 3;case"symbol":return 4;case"number":return 5;case"object":return null===t?1:6;default:return 6}}function R(t){return void 0===t}function D(t){return null===t}function j(t){return"symbol"==typeof t}function V(t){return"object"==typeof t?null!==t:"function"==typeof t}function F(t,i){switch(L(t)){case 0:case 1:case 2:case 3:case 4:case 5:return t}var e=3===i?"string":5===i?"number":"default",n=J(t,s);if(void 0!==n){var r=n.call(t,e);if(V(r))throw new TypeError;return r}return $(t,"default"===e?"number":e)}function $(t,i){if("string"===i){var e=t.toString;if(z(e))if(!V(n=e.call(t)))return n;if(z(s=t.valueOf))if(!V(n=s.call(t)))return n}else{var s;if(z(s=t.valueOf))if(!V(n=s.call(t)))return n;var n,r=t.toString;if(z(r))if(!V(n=r.call(t)))return n}throw new TypeError}function N(t){return!!t}function U(t){return""+t}function H(t){var i=F(t,3);return j(i)?i:U(i)}function q(t){return Array.isArray?Array.isArray(t):t instanceof Object?t instanceof Array:"[object Array]"===Object.prototype.toString.call(t)}function z(t){return"function"==typeof t}function W(t){return"function"==typeof t}function G(t){switch(L(t)){case 3:case 4:return!0;default:return!1}}function J(t,i){var e=t[i];if(null!=e){if(!z(e))throw new TypeError;return e}}function Q(t){var i=J(t,n);if(!z(i))throw new TypeError;var e=i.call(t);if(!V(e))throw new TypeError;return e}function Y(t){return t.value}function X(t){var i=t.next();return!i.done&&i}function Z(t){var i=t.return;i&&i.call(t)}function K(t){var i=Object.getPrototypeOf(t);if("function"!=typeof t||t===c)return i;if(i!==c)return i;var e=t.prototype,s=e&&Object.getPrototypeOf(e);if(null==s||s===Object.prototype)return i;var n=s.constructor;return"function"!=typeof n||n===t?i:n}function tt(){var t={},i=[],e=function(){function t(t,i,e){this.gt=0,this.vt=t,this.yt=i,this.bt=e}return t.prototype["@@iterator"]=function(){return this},t.prototype[n]=function(){return this},t.prototype.next=function(){var t=this.gt;if(t>=0&&t<this.vt.length){var e=this.bt(this.vt[t],this.yt[t]);return t+1>=this.vt.length?(this.gt=-1,this.vt=i,this.yt=i):this.gt++,{value:e,done:!1}}return{value:void 0,done:!0}},t.prototype.throw=function(t){throw this.gt>=0&&(this.gt=-1,this.vt=i,this.yt=i),t},t.prototype.return=function(t){return this.gt>=0&&(this.gt=-1,this.vt=i,this.yt=i),{value:t,done:!0}},t}();return function(){function i(){this.vt=[],this.yt=[],this.xt=t,this.wt=-2}return Object.defineProperty(i.prototype,"size",{get:function(){return this.vt.length},enumerable:!0,configurable:!0}),i.prototype.has=function(t){return this._t(t,!1)>=0},i.prototype.get=function(t){var i=this._t(t,!1);return i>=0?this.yt[i]:void 0},i.prototype.set=function(t,i){var e=this._t(t,!0);return this.yt[e]=i,this},i.prototype.delete=function(i){var e=this._t(i,!1);if(e>=0){for(var s=this.vt.length,n=e+1;n<s;n++)this.vt[n-1]=this.vt[n],this.yt[n-1]=this.yt[n];return this.vt.length--,this.yt.length--,i===this.xt&&(this.xt=t,this.wt=-2),!0}return!1},i.prototype.clear=function(){this.vt.length=0,this.yt.length=0,this.xt=t,this.wt=-2},i.prototype.keys=function(){return new e(this.vt,this.yt,s)},i.prototype.values=function(){return new e(this.vt,this.yt,r)},i.prototype.entries=function(){return new e(this.vt,this.yt,h)},i.prototype["@@iterator"]=function(){return this.entries()},i.prototype[n]=function(){return this.entries()},i.prototype._t=function(t,i){return this.xt!==t&&(this.wt=this.vt.indexOf(this.xt=t)),this.wt<0&&i&&(this.wt=this.vt.length,this.vt.push(t),this.yt.push(void 0)),this.wt},i}();function s(t,i){return t}function r(t,i){return i}function h(t,i){return[t,i]}}function it(){return function(){function t(){this.St=new u}return Object.defineProperty(t.prototype,"size",{get:function(){return this.St.size},enumerable:!0,configurable:!0}),t.prototype.has=function(t){return this.St.has(t)},t.prototype.add=function(t){return this.St.set(t,t),this},t.prototype.delete=function(t){return this.St.delete(t)},t.prototype.clear=function(){this.St.clear()},t.prototype.keys=function(){return this.St.keys()},t.prototype.values=function(){return this.St.values()},t.prototype.entries=function(){return this.St.entries()},t.prototype["@@iterator"]=function(){return this.keys()},t.prototype[n]=function(){return this.keys()},t}()}function et(){var t=16,e=a.create(),s=n();return function(){function t(){this.At=n()}return t.prototype.has=function(t){var i=r(t,!1);return void 0!==i&&a.has(i,this.At)},t.prototype.get=function(t){var i=r(t,!1);return void 0!==i?a.get(i,this.At):void 0},t.prototype.set=function(t,i){return r(t,!0)[this.At]=i,this},t.prototype.delete=function(t){var i=r(t,!1);return void 0!==i&&delete i[this.At]},t.prototype.clear=function(){this.At=n()},t}();function n(){var t;do{t="@@WeakMap@@"+c()}while(a.has(e,t));return e[t]=!0,t}function r(t,e){if(!i.call(t,s)){if(!e)return;Object.defineProperty(t,s,{value:a.create()})}return t[s]}function h(t,i){for(var e=0;e<i;++e)t[e]=255*Math.random()|0;return t}function o(t){return"function"==typeof Uint8Array?"undefined"!=typeof crypto?crypto.getRandomValues(new Uint8Array(t)):"undefined"!=typeof msCrypto?msCrypto.getRandomValues(new Uint8Array(t)):h(new Uint8Array(t),t):h(new Array(t),t)}function c(){var i=o(t);i[6]=79&i[6]|64,i[8]=191&i[8]|128;for(var e="",s=0;s<t;++s){var n=i[s];4!==s&&6!==s&&8!==s||(e+="-"),n<16&&(e+="0"),e+=n.toString(16).toLowerCase()}return e}}function st(t){return t.Pt=void 0,delete t.Pt,t}t("decorate",f),t("metadata",m),t("defineMetadata",g),t("hasMetadata",v),t("hasOwnMetadata",y),t("getMetadata",b),t("getOwnMetadata",x),t("getMetadataKeys",w),t("getOwnMetadataKeys",_),t("deleteMetadata",S)}(n)}()}(s||(s={}))},6515:(t,i,e)=>{"use strict";e.d(i,{X:()=>n});var s=e(655),n=function(t){function i(i){var e=t.call(this)||this;return e.It=i,e}return(0,s.ZT)(i,t),Object.defineProperty(i.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),i.prototype.kt=function(i){var e=t.prototype.kt.call(this,i);return!e.closed&&i.next(this.It),e},i.prototype.getValue=function(){var t=this,i=t.hasError,e=t.thrownError,s=t.It;if(i)throw e;return this.Ct(),s},i.prototype.next=function(i){t.prototype.next.call(this,this.It=i)},i}(e(6716).x)},1480:(t,i,e)=>{"use strict";e.d(i,{y:()=>u});var s=e(5642),n=e(5720),r=e(6766),h=e(278);function o(t){return 0===t.length?h.y:1===t.length?t[0]:function(i){return t.reduce((function(t,i){return i(t)}),i)}}var a=e(3912),c=e(8474),l=e(8846),u=function(){function t(t){t&&(this.kt=t)}return t.prototype.lift=function(i){var e=new t;return e.source=this,e.operator=i,e},t.prototype.subscribe=function(t,i,e){var r,h=this,o=(r=t)&&r instanceof s.Lv||function(t){return t&&(0,c.m)(t.next)&&(0,c.m)(t.error)&&(0,c.m)(t.complete)}(r)&&(0,n.Nn)(r)?t:new s.Hp(t,i,e);return(0,l.x)((function(){var t=h,i=t.operator,e=t.source;o.add(i?i.call(o,e):e?h.kt(o):h.Tt(o))})),o},t.prototype.Tt=function(t){try{return this.kt(t)}catch(i){t.error(i)}},t.prototype.forEach=function(t,i){var e=this;return new(i=d(i))((function(i,n){var r=new s.Hp({next:function(i){try{t(i)}catch(t){n(t),r.unsubscribe()}},error:n,complete:i});e.subscribe(r)}))},t.prototype.kt=function(t){var i;return null===(i=this.source)||void 0===i?void 0:i.subscribe(t)},t.prototype[r.L]=function(){return this},t.prototype.pipe=function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];return o(t)(this)},t.prototype.toPromise=function(t){var i=this;return new(t=d(t))((function(t,e){var s;i.subscribe((function(t){return s=t}),(function(t){return e(t)}),(function(){return t(s)}))}))},t.create=function(i){return new t(i)},t}();function d(t){var i;return null!==(i=null!=t?t:a.v.Promise)&&void 0!==i?i:Promise}},6716:(t,i,e)=>{"use strict";e.d(i,{x:()=>c});var s=e(655),n=e(1480),r=e(5720),h=(0,e(1819).d)((function(t){return function(){t(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),o=e(3699),a=e(8846),c=function(t){function i(){var i=t.call(this)||this;return i.closed=!1,i.observers=[],i.isStopped=!1,i.hasError=!1,i.thrownError=null,i}return(0,s.ZT)(i,t),i.prototype.lift=function(t){var i=new l(this,this);return i.operator=t,i},i.prototype.Ct=function(){if(this.closed)throw new h},i.prototype.next=function(t){var i=this;(0,a.x)((function(){var e,n;if(i.Ct(),!i.isStopped){var r=i.observers.slice();try{for(var h=(0,s.XA)(r),o=h.next();!o.done;o=h.next()){o.value.next(t)}}catch(t){e={error:t}}finally{try{o&&!o.done&&(n=h.return)&&n.call(h)}finally{if(e)throw e.error}}}}))},i.prototype.error=function(t){var i=this;(0,a.x)((function(){if(i.Ct(),!i.isStopped){i.hasError=i.isStopped=!0,i.thrownError=t;for(var e=i.observers;e.length;)e.shift().error(t)}}))},i.prototype.complete=function(){var t=this;(0,a.x)((function(){if(t.Ct(),!t.isStopped){t.isStopped=!0;for(var i=t.observers;i.length;)i.shift().complete()}}))},i.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=null},Object.defineProperty(i.prototype,"observed",{get:function(){var t;return(null===(t=this.observers)||void 0===t?void 0:t.length)>0},enumerable:!1,configurable:!0}),i.prototype.Tt=function(i){return this.Ct(),t.prototype.Tt.call(this,i)},i.prototype.kt=function(t){return this.Ct(),this.Mt(t),this.Et(t)},i.prototype.Et=function(t){var i=this,e=i.hasError,s=i.isStopped,n=i.observers;return e||s?r.Lc:(n.push(t),new r.w0((function(){return(0,o.P)(n,t)})))},i.prototype.Mt=function(t){var i=this,e=i.hasError,s=i.thrownError,n=i.isStopped;e?t.error(s):n&&t.complete()},i.prototype.asObservable=function(){var t=new n.y;return t.source=this,t},i.create=function(t,i){return new l(t,i)},i}(n.y),l=function(t){function i(i,e){var s=t.call(this)||this;return s.destination=i,s.source=e,s}return(0,s.ZT)(i,t),i.prototype.next=function(t){var i,e;null===(e=null===(i=this.destination)||void 0===i?void 0:i.next)||void 0===e||e.call(i,t)},i.prototype.error=function(t){var i,e;null===(e=null===(i=this.destination)||void 0===i?void 0:i.error)||void 0===e||e.call(i,t)},i.prototype.complete=function(){var t,i;null===(i=null===(t=this.destination)||void 0===t?void 0:t.complete)||void 0===i||i.call(t)},i.prototype.kt=function(t){var i,e;return null!==(e=null===(i=this.source)||void 0===i?void 0:i.subscribe(t))&&void 0!==e?e:r.Lc},i}(c)},5642:(t,i,e)=>{"use strict";e.d(i,{Hp:()=>v,Lv:()=>p});var s=e(655),n=e(8474),r=e(5720),h=e(3912),o=e(5);function a(){}var c=l("C",void 0,void 0);function l(t,i,e){return{kind:t,value:i,error:e}}var u=e(8380),d=e(8846),p=function(t){function i(i){var e=t.call(this)||this;return e.isStopped=!1,i?(e.destination=i,(0,r.Nn)(i)&&i.add(e)):e.destination=x,e}return(0,s.ZT)(i,t),i.create=function(t,i,e){return new v(t,i,e)},i.prototype.next=function(t){this.isStopped?b(function(t){return l("N",t,void 0)}(t),this):this.Bt(t)},i.prototype.error=function(t){this.isStopped?b(l("E",void 0,t),this):(this.isStopped=!0,this.Ot(t))},i.prototype.complete=function(){this.isStopped?b(c,this):(this.isStopped=!0,this.Lt())},i.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},i.prototype.Bt=function(t){this.destination.next(t)},i.prototype.Ot=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},i.prototype.Lt=function(){try{this.destination.complete()}finally{this.unsubscribe()}},i}(r.w0),f=Function.prototype.bind;function m(t,i){return f.call(t,i)}var g=function(){function t(t){this.partialObserver=t}return t.prototype.next=function(t){var i=this.partialObserver;if(i.next)try{i.next(t)}catch(t){y(t)}},t.prototype.error=function(t){var i=this.partialObserver;if(i.error)try{i.error(t)}catch(t){y(t)}else y(t)},t.prototype.complete=function(){var t=this.partialObserver;if(t.complete)try{t.complete()}catch(t){y(t)}},t}(),v=function(t){function i(i,e,s){var r,o,a=t.call(this)||this;(0,n.m)(i)||!i?r={next:null!=i?i:void 0,error:null!=e?e:void 0,complete:null!=s?s:void 0}:a&&h.v.useDeprecatedNextContext?((o=Object.create(i)).unsubscribe=function(){return a.unsubscribe()},r={next:i.next&&m(i.next,o),error:i.error&&m(i.error,o),complete:i.complete&&m(i.complete,o)}):r=i;return a.destination=new g(r),a}return(0,s.ZT)(i,t),i}(p);function y(t){h.v.useDeprecatedSynchronousErrorHandling?(0,d.O)(t):(0,o.h)(t)}function b(t,i){var e=h.v.onStoppedNotification;e&&u.z.setTimeout((function(){return e(t,i)}))}var x={closed:!0,next:a,error:function(t){throw t},complete:a}},5720:(t,i,e)=>{"use strict";e.d(i,{Lc:()=>a,w0:()=>o,Nn:()=>c});var s=e(655),n=e(8474),r=(0,e(1819).d)((function(t){return function(i){t(this),this.message=i?i.length+" errors occurred during unsubscription:\n"+i.map((function(t,i){return i+1+") "+t.toString()})).join("\n  "):"",this.name="UnsubscriptionError",this.errors=i}})),h=e(3699),o=function(){function t(t){this.initialTeardown=t,this.closed=!1,this.Rt=null,this.Dt=null}var i;return t.prototype.unsubscribe=function(){var t,i,e,h,o;if(!this.closed){this.closed=!0;var a=this.Rt;if(a)if(this.Rt=null,Array.isArray(a))try{for(var c=(0,s.XA)(a),u=c.next();!u.done;u=c.next()){u.value.remove(this)}}catch(i){t={error:i}}finally{try{u&&!u.done&&(i=c.return)&&i.call(c)}finally{if(t)throw t.error}}else a.remove(this);var d=this.initialTeardown;if((0,n.m)(d))try{d()}catch(t){o=t instanceof r?t.errors:[t]}var p=this.Dt;if(p){this.Dt=null;try{for(var f=(0,s.XA)(p),m=f.next();!m.done;m=f.next()){var g=m.value;try{l(g)}catch(t){o=null!=o?o:[],t instanceof r?o=(0,s.ev)((0,s.ev)([],(0,s.CR)(o)),(0,s.CR)(t.errors)):o.push(t)}}}catch(t){e={error:t}}finally{try{m&&!m.done&&(h=f.return)&&h.call(f)}finally{if(e)throw e.error}}}if(o)throw new r(o)}},t.prototype.add=function(i){var e;if(i&&i!==this)if(this.closed)l(i);else{if(i instanceof t){if(i.closed||i.jt(this))return;i.Vt(this)}(this.Dt=null!==(e=this.Dt)&&void 0!==e?e:[]).push(i)}},t.prototype.jt=function(t){var i=this.Rt;return i===t||Array.isArray(i)&&i.includes(t)},t.prototype.Vt=function(t){var i=this.Rt;this.Rt=Array.isArray(i)?(i.push(t),i):i?[i,t]:t},t.prototype.Ft=function(t){var i=this.Rt;i===t?this.Rt=null:Array.isArray(i)&&(0,h.P)(i,t)},t.prototype.remove=function(i){var e=this.Dt;e&&(0,h.P)(e,i),i instanceof t&&i.Ft(this)},t.EMPTY=((i=new t).closed=!0,i),t}(),a=o.EMPTY;function c(t){return t instanceof o||t&&"closed"in t&&(0,n.m)(t.remove)&&(0,n.m)(t.add)&&(0,n.m)(t.unsubscribe)}function l(t){(0,n.m)(t)?t():t.unsubscribe()}},3912:(t,i,e)=>{"use strict";e.d(i,{v:()=>s});var s={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},2566:(t,i,e)=>{"use strict";e.d(i,{x:()=>n});var s=e(655);function n(t,i,e,s,n){return new r(t,i,e,s,n)}var r=function(t){function i(i,e,s,n,r,h){var o=t.call(this,i)||this;return o.onFinalize=r,o.shouldUnsubscribe=h,o.Bt=e?function(t){try{e(t)}catch(t){i.error(t)}}:t.prototype.Bt,o.Ot=n?function(t){try{n(t)}catch(t){i.error(t)}finally{this.unsubscribe()}}:t.prototype.Ot,o.Lt=s?function(){try{s()}catch(t){i.error(t)}finally{this.unsubscribe()}}:t.prototype.Lt,o}return(0,s.ZT)(i,t),i.prototype.unsubscribe=function(){var i;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var e=this.closed;t.prototype.unsubscribe.call(this),!e&&(null===(i=this.onFinalize)||void 0===i||i.call(this))}},i}(e(5642).Lv)},4975:(t,i,e)=>{"use strict";e.d(i,{h:()=>r});var s=e(6798),n=e(2566);function r(t,i){return(0,s.e)((function(e,s){var r=0;e.subscribe((0,n.x)(s,(function(e){return t.call(i,e,r++)&&s.next(e)})))}))}},8380:(t,i,e)=>{"use strict";e.d(i,{z:()=>n});var s=e(655),n={setTimeout:function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var e=n.delegate;return((null==e?void 0:e.setTimeout)||setTimeout).apply(void 0,(0,s.ev)([],(0,s.CR)(t)))},clearTimeout:function(t){var i=n.delegate;return((null==i?void 0:i.clearTimeout)||clearTimeout)(t)},delegate:void 0}},6766:(t,i,e)=>{"use strict";e.d(i,{L:()=>s});var s="function"==typeof Symbol&&Symbol.observable||"@@observable"},3699:(t,i,e)=>{"use strict";function s(t,i){if(t){var e=t.indexOf(i);0<=e&&t.splice(e,1)}}e.d(i,{P:()=>s})},1819:(t,i,e)=>{"use strict";function s(t){var i=t((function(t){Error.call(t),t.stack=(new Error).stack}));return i.prototype=Object.create(Error.prototype),i.prototype.constructor=i,i}e.d(i,{d:()=>s})},8846:(t,i,e)=>{"use strict";e.d(i,{O:()=>h,x:()=>r});var s=e(3912),n=null;function r(t){if(s.v.useDeprecatedSynchronousErrorHandling){var i=!n;if(i&&(n={errorThrown:!1,error:null}),t(),i){var e=n,r=e.errorThrown,h=e.error;if(n=null,r)throw h}}else t()}function h(t){s.v.useDeprecatedSynchronousErrorHandling&&n&&(n.errorThrown=!0,n.error=t)}},278:(t,i,e)=>{"use strict";function s(t){return t}e.d(i,{y:()=>s})},8474:(t,i,e)=>{"use strict";function s(t){return"function"==typeof t}e.d(i,{m:()=>s})},6798:(t,i,e)=>{"use strict";e.d(i,{e:()=>n});var s=e(8474);function n(t){return function(i){if(function(t){return(0,s.m)(null==t?void 0:t.lift)}(i))return i.lift((function(i){try{return t(i,this)}catch(t){this.error(t)}}));throw new TypeError("Unable to lift unknown Observable type")}}},5:(t,i,e)=>{"use strict";e.d(i,{h:()=>r});var s=e(3912),n=e(8380);function r(t){n.z.setTimeout((function(){var i=s.v.onUnhandledError;if(!i)throw t;i(t)}))}},5055:(t,i,e)=>{"use strict";e.d(i,{Km:()=>h,Zr:()=>n,n9:()=>o,q0:()=>s,rl:()=>r});const s={Play:"play",Pause:"pause",QualityChanged:"qualityChanged",PlayError:"playError",VolumeChanged:"volumeChanged"},n={FullscreenChanged:"fullscreenChanged",PlayerFloatChanged:"playerFloatChanged",FloatingEnterStart:"floatingEnterStart",FloatingEnterStop:"floatingEnterStop",FloatingExitStart:"floatingExitStart",FloatingExitStop:"floatingExitStop"},r={OmidViewabilityThreshold:"OmidViewabilityThreshold"},h=Object.assign(Object.assign(Object.assign(Object.assign({Ready:"ready",Removed:"removed",SetupError:"setupError",IsViewable:"isViewable",SizeChanged:"sizeChanged",BrandingClicked:"brandingClicked",ImpressionPrice:"impressionPrice",ImpressionRevenue:"impressionRevenue"},s),n),r),{AdClick:"adClick",AdPlay:"adPlay",AdPause:"adPause",AdImpression:"adImpression",AdCompleted25:"adCompleted25",AdCompleted50:"adCompleted50",AdCompleted75:"adCompleted75",AdCompleted100:"adCompleted100",AdSkipped:"adSkipped",AdError:"adError",AdStopped:"adStopped",AdCompanion:"adCompanion"});var o;!function(t){t.SetupError="SetupError",t.NoPlayer="NoPlayer",t.RenderError="RenderError",t.InvalidGUID="InvalidGUID"}(o||(o={}))},2817:(t,i,e)=>{"use strict";var s,n;e.d(i,{Ht:()=>r,bS:()=>h,do:()=>n,lI:()=>s}),function(t){t.Chrome="chrome",t.Firefox="firefox",t.Edge="edge",t.Safari="safari",t.Opera="opera",t.Samsung="samsung",t.Facebook="facebook",t.InternetExplorer="ie"}(s||(s={})),function(t){t.Standard="standard",t.Webkit="webkit",t.Moz="moz",t.Ms="ms",t.O="o"}(n||(n={}));const r=[{name:n.Standard,keys:{fullscreenEnabled:"fullscreenEnabled",fullscreenElement:"fullscreenElement",requestFullscreen:"requestFullscreen",exitFullscreen:"exitFullscreen",fullscreenchange:"fullscreenchange",fullscreenerror:"fullscreenerror"}},{name:n.Webkit,keys:{fullscreenEnabled:"webkitFullscreenEnabled",fullscreenElement:"webkitFullscreenElement",requestFullscreen:"webkitRequestFullscreen",exitFullscreen:"webkitExitFullscreen",fullscreenchange:"webkitfullscreenchange",fullscreenerror:"webkitfullscreenerror"}},{name:n.Webkit,keys:{fullscreenEnabled:"webkitSupportsFullscreen",fullscreenElement:"webkitFullscreenElement",requestFullscreen:"webkitEnterFullscreen",exitFullscreen:"webkitExitFullscreen",fullscreenchange:"webkitfullscreenchange",fullscreenerror:"webkitfullscreenerror"}},{name:n.Moz,keys:{fullscreenEnabled:"mozFullScreenEnabled",fullscreenElement:"mozFullScreenElement",requestFullscreen:"mozRequestFullScreen",exitFullscreen:"mozCancelFullScreen",fullscreenchange:"mozfullscreenchange",fullscreenerror:"mozfullscreenerror"}},{name:n.Ms,keys:{fullscreenEnabled:"msFullscreenEnabled",fullscreenElement:"msFullscreenElement",requestFullscreen:"msRequestFullscreen",exitFullscreen:"msExitFullscreen",fullscreenchange:"MSFullscreenChange",fullscreenerror:"MSFullscreenError"}}];var h;!function(t){t.Self="_self",t.Blank="_blank",t.Parent="_parent",t.Top="_top"}(h||(h={}))},2820:(t,i,e)=>{"use strict";var s,n,r;e.d(i,{Gj:()=>s,Hs:()=>w,Ig:()=>o,Ih:()=>v,Ng:()=>a,QO:()=>u,Rq:()=>h,Yk:()=>d,_7:()=>p,hQ:()=>g,iu:()=>c,jG:()=>f,mr:()=>_,oV:()=>b,pT:()=>x,s6:()=>n,sN:()=>y,s_:()=>r}),function(t){t.Invisible="cnx-mod-invisible",t.HoverStart="cnx-mod-hover-s",t.HoverEnd="cnx-mod-hover",t.HoverBoom="cnx-mod-boom",t.DisplayNone="cnx-mod-display-none",t.Active="cnx-mod-active",t.HideOnVolumeHover="cnx-hide-on-volume-hover",t.HideOnSingleVideo="cnx-hide-on-single-video",t.NoTransition="cnx-mod-no-transition",t.Collapsable="cnx-mod-collapsable",t.HasCustomScrollbar="cnx-mod-scrollbar",t.Show="cnx-mod-show",t.Hide="cnx-mod-hide",t.NoHeight="cnx-mod-no-height",t.OnHold="cnx-mod-onhold",t.ForceLineBreak="cnx-mod-force-line-break",t.HideOnAdOverlay="cnx-mod-ad-overlay-none",t.HideOnPodLoadingScreen="cnx-mod-pod-loading-none"}(s||(s={})),function(t){t.Fullscreen="cnx-in-fullscreen",t.Ad="cnx-in-ad",t.AdNonLinear="cnx-in-ad-non-linear",t.AdOverlayType="cnx-in-ad-overlay",t.AdFullSize="cnx-in-ad-full",t.AdShowCard="cnx-ad-show-card",t.ShowControls="cnx-in-show-controls",t.Mobile="cnx-in-mobile",t.Desktop="cnx-in-desktop",t.Muted="cnx-in-mute",t.Collapsed="cnx-in-collapse",t.GalleryPortrait="cnx-in-g-portrait",t.GalleryLandscape="cnx-in-g-landscape",t.ContextController="cnx-context-controller",t.HideUI="cnx-in-hide-ui",t.PodLoadingScreen="cnx-in-pod-loading",t.AdShowCountdown="cnx-ad-show-countdown",t.CloseOn="cnx-close-on",t.CloseOff="cnx-close-off",t.CloseHover="cnx-close-hover",t.CloseFloatOn="cnx-close-float-on",t.CloseFloatOff="cnx-close-float-off",t.CloseFloatHover="cnx-close-float-hover",t.UiInView="cnx-ui-in-view"}(n||(n={})),function(t){t.Playing="cnx-is-playing",t.Paused="cnx-is-paused",t.Stopped="cnx-is-stopped",t.Preroll="cnx-is-preroll",t.Postroll="cnx-is-postroll",t.Loading="cnx-is-loading",t.LiveEnded="cnx-live-ended"}(r||(r={}));const h={Xxl:"cnx-bp-xxl-v",Xl:"cnx-bp-xl-v",Lg:"cnx-bp-lg-v",Md:"cnx-bp-md-v",Sm:"cnx-bp-sm-v",Xs:"cnx-bp-xs-v",Xxs:"cnx-bp-xxs-v"};var o,a,c,l,u,d,p;!function(t){t.Responsive="cnx-size-responsive",t.Fixed="cnx-size-fixed"}(o||(o={})),function(t){t.ClickOption="cnx-cm-item--click",t.ToggleOption="cnx-cm-item--toggle",t.SubmenuOption="cnx-cm-item--submenu",t.ItemIcon="cnx-cm-item__icon",t.ItemTitle="cnx-cm-item__title",t.ItemExtra="cnx-cm-item__extra",t.Items="cnx-cm-items",t.Container="cnx-cm-container"}(a||(a={})),function(t){t.Icons="cnx-color-icon",t.TooltipText="cnx-color-tt-text",t.TooltipBackground="cnx-color-tt-bg",t.AccentColor="cnx-color-accent",t.PrimaryColor="cnx-color-primary",t.SecondaryColor="cnx-color-secondary",t.TitleComponent="cnx-title-component",t.TitleLink="cnx-color-title-link",t.SlideProgressBar="cnx-slides-progress-bar",t.ProgressFill="cnx-progress-fill"}(c||(c={})),function(t){t.InheritTitleFontFamily="cnx-inherit-title-font-family",t.InheritBodyFontFamily="cnx-inherit-body-font-family"}(l||(l={})),function(t){t.Connatix="#0099FF",t.Icons="#FFFFFF",t.PrimaryBackground="#F1F1F1",t.PrimaryForeground="#000000",t.SecondaryBackground="#000000",t.SecondaryForeground="#F1F1F1",t.AccentForeground="#FFFFFF"}(u||(u={})),function(t){t.CaptionContainer="cnx-captions-text-holder"}(d||(d={})),function(t){t.MainClass="cnx-float",t.TransitionClass="cnx-float-transition",t.AlwaysFloating="cnx-always-floating"}(p||(p={}));const f={FadeOutBase:"cnx-fade-out-base",FadeOut:"cnx-fade-out",FadeInBase:"cnx-fade-in-base",FadeIn:"cnx-fade-in"};var m,g,v;!function(t){t.CurrentSlide="cnx-slide-current",t.NextSlide="cnx-slide-next",t.SlideLeft="cnx-slide-left",t.SlideRight="cnx-slide-right"}(m||(m={})),function(t){t.OpacityInTransition="cnx-tooltip-animation-in"}(g||(g={})),function(t){t.Card="cnx-g-card",t.CardSlot="cnx-g-card-slot",t.CardImage="cnx-g-card-image",t.CardText="cnx-g-card-text",t.CardTextContainer="cnx-g-card-text-container",t.CardPlaceholder="cnx-g-card-placeholder",t.CardRail="cnx-g-rail",t.StyleDetailed="cnx-g-style-detailed",t.StyleVisual="cnx-g-style-visual",t.ExploreMore="cnx-g-explore-more",t.FadeOut="cnx-g-fade-out"}(v||(v={}));const y={MainContainer:"cnx-main-container",MainContainerFlex:"cnx-main-container-flex",PlayerWrapper:"cnx-player-wrapper",ImagePlaceholder:"cnx-image-placeholder"},b="cnx-ratio",x="cnx-hide-video",w={Text:"cnx-skip-ad-text",Timer:"cnx-timer-loader",Icon:"cnx-skip-ad-icon",SkipAdButton:"cnx-skip-ad-button",InTimer:"cnx-skip-ad-in-timer"},_={Icon:"cnx-pod-open-new-icon",Button:"cnx-pod-read-more-btn",ButtonContainer:"cnx-pod-read-more-container",Wrapper:"cnx-pod-read-more-wrapper",BackgroundImg:"cnx-pod-loading-background",InfoContainer:"cnx-pod-loading-info",FallbackContainer:"cnx-pod-loading-fallback",SlotCountText:"cnx-pod-slot-count-text"}},45:(t,i,e)=>{"use strict";e.d(i,{g:()=>r,x:()=>n});let s=null;try{s=JSON.parse('{"version":159142,"domainPrefix":"","logToConsole":false,"logToServer":true,"env":"production"}')}catch(t){}const n=!0,r=s},782:(t,i,e)=>{"use strict";var s,n;e.d(i,{Uh:()=>n,Xh:()=>s,dP:()=>r}),function(t){t.SessionRendered="rendered",t.SessionView="enter_view"}(s||(s={})),function(t){t.UserInteraction="userInteraction",t.GeneralUserInteraction="generalUserInteraction",t.CanStart="canStart",t.Destroy="destroy"}(n||(n={}));const r={StateChanged:"stateChanged"}},5049:(t,i,e)=>{"use strict";e.d(i,{x:()=>s});const s="//securepubads.g.doubleclick.net/tag/js/gpt.js"},2157:(t,i,e)=>{"use strict";e.d(i,{XY:()=>n,f3:()=>r,fJ:()=>o,kd:()=>a,xs:()=>h});var s=e(289);const n=200,r=31,h={[s.ProtoAdType.Video]:2e3,[s.ProtoAdType.Overlay]:1e3,[s.ProtoAdType.Nonlinear]:1e3},o=.5,a="connatix.com"},308:(t,i,e)=>{"use strict";e.d(i,{M:()=>r,a:()=>n});var s=e(289);const n=[s.ProtoDeviceType.Smartphone,s.ProtoDeviceType.Tablet];var r;!function(t){t.Ios="ios",t.Android="android",t.Mac="macos",t.Windows="windows",t.Linux="linux",t.IPadOS="ipados"}(r||(r={}))},7577:(t,i,e)=>{"use strict";e.d(i,{Fk:()=>n,Kp:()=>r,a8:()=>h,br:()=>s,ym:()=>o});const s="https://connatix.com/privacy-policy/",n="v",r="pid",h="sid",o="cid"},9115:(t,i,e)=>{"use strict";e.d(i,{T9:()=>s,Y0:()=>o,oG:()=>c,p7:()=>n,s_:()=>h,ti:()=>a,uD:()=>r});const s=/(\d\d):(\d\d):(\d\d)(\.(\d\d\d))?/,n=36e5,r=6e4,h=1e3,o=60,a=864e5,c=60},9078:(t,i,e)=>{"use strict";var s,n;e.d(i,{fI:()=>n,r5:()=>r,zc:()=>s}),function(t){t.Fullscreen="fullscreen",t.Normal="normal",t.Thumbnail="thumbnail"}(s||(s={})),function(t){t.AdLoaded="AdLoaded",t.AdStarted="AdStarted",t.AdStopped="AdStopped",t.AdSkipped="AdSkipped",t.AdSkippableStateChange="AdSkippableStateChange",t.AdSizeChange="AdSizeChange",t.AdLinearChange="AdLinearChange",t.AdDurationChange="AdDurationChange",t.AdExpandedChange="AdExpandedChange",t.AdRemainingTimeChange="AdRemainingTimeChange",t.AdVolumeChange="AdVolumeChange",t.AdImpression="AdImpression",t.AdVideoStart="AdVideoStart",t.AdVideoFirstQuartile="AdVideoFirstQuartile",t.AdVideoMidpoint="AdVideoMidpoint",t.AdVideoThirdQuartile="AdVideoThirdQuartile",t.AdVideoComplete="AdVideoComplete",t.AdClickThru="AdClickThru",t.AdInteraction="AdInteraction",t.AdUserAcceptInvitation="AdUserAcceptInvitation",t.AdUserMinimize="AdUserMinimize",t.AdUserClose="AdUserClose",t.AdPaused="AdPaused",t.AdPlaying="AdPlaying",t.AdLog="AdLog",t.AdError="AdError"}(n||(n={}));const r="nonLinearCloseClick"},1730:(t,i,e)=>{"use strict";e.d(i,{e:()=>o,j:()=>s});var s,n=e(8423);class r{}r.clientAb0=(0,n.Vm)([50,50]),r.clientAb1=(0,n.Vm)([50,50]);class h{}h.clientAb0=(0,n.Vm)([50,50]),h.clientAb1=(0,n.Vm)([50,50]),function(t){t[t.ElementsABService=0]="ElementsABService",t[t.PlayspaceABService=1]="PlayspaceABService"}(s||(s={}));class o{static get clientAb0(){return this.getABValueForKey("clientAb0")}static get clientAb1(){return this.getABValueForKey("clientAb1")}static getABValueForKey(t){return this.abServiceType===s.PlayspaceABService?h[t]:r[t]}}},5348:(t,i,e)=>{"use strict";e.d(i,{$:()=>h});const s="ats-liveramp-envelope-request";var n=e(289),r=e(8423);class h{static getEnvelopeFromParentAts(t){var i;return(null===(i=h.envelope)||void 0===i?void 0:i.envelope)?Promise.resolve():new Promise((i=>{if(!t.ats)return h.communicateViaPostMessage(t),void i();t.ats.retrieveEnvelope().then((e=>{e?(h.envelope=JSON.parse(e),i()):(h.communicateViaPostMessage(t),i())}))}))}static communicateViaPostMessage(t){h.dispatchEnvelopeRequestEvent(t),h.addEnvelopeListener()}static dispatchEnvelopeRequestEvent(t){try{t.postMessage(s,"*")}catch(i){void 0!==t.contentWindow&&t.contentWindow.postMessage(s,"*")}}static receiveEnvelopeListener(t){t&&t.data&&"ats-liveramp-envelope-result"===t.data.message&&t.data.result&&(h.envelope=JSON.parse(t.data.result),window.removeEventListener("message",h.receiveEnvelopeListener))}static addEnvelopeListener(){window.addEventListener("message",h.receiveEnvelopeListener,!1)}static getEnvelopeWithConsent(t,i){return new Promise(((e,s)=>{i.isConsentConnatix()?h.getEnvelopeFromParentAts(t).then((()=>{var t;(null===(t=h.envelope)||void 0===t?void 0:t.envelope)?e(h.envelope.envelope):setTimeout((()=>s()),500)})):setTimeout((()=>s()),500)}))}static getEnvelope(t,i){(0,r.Up)((()=>h.getEnvelopeWithConsent(t,i))).catch((()=>{}))}static setEnvelopeStatus(t){h.envelopeStatus=t}static getValidEnvelope(){var t;return(null===(t=h.envelope)||void 0===t?void 0:t.envelope)&&h.envelopeStatus===n.LiveRampEnvelopeStatusEnum.Ok?h.envelope.envelope:null}static wasRequestEnhanced(t){var i;return(null===(i=h.envelope)||void 0===i?void 0:i.envelope)&&t===n.LiveRampEnvelopeStatusEnum.Ok}}h.envelope=null,h.envelopeStatus=n.LiveRampEnvelopeStatusEnum.Ok},4280:(t,i,e)=>{"use strict";e.d(i,{_:()=>d});var s=e(5049);const n=["adBanner","banner-search","abc_banner","Banner_Top","ad_container","pub_300x250","pub_300x250m","pub_728x90","text-ad","text_ad","textAd","text-ad-links","text_ads","text-ads","text-ad-links"],r="cnxtestadblock";var h=e(1561),o=e(8423),a=e(7726),c=e(7427),l=e(6515),u=e(4975);class d{static get isBannerBlocked(){return this.$t}static onAdBlockerDetected(){return this.Nt.asObservable().pipe((0,u.h)((t=>null!==t)))}static detectUsingCSS(t){try{let i=!1;t.document.body.insertAdjacentHTML("beforeend",this.Ut());const e=t.document.getElementById(r);return 0!==e.getBoundingClientRect().height&&0!==e.getBoundingClientRect().width||(i=!0),t.document.body.removeChild(e),this.qt(i),i}catch(t){return this.qt(!1),!1}}static detectUsingScript(){return new Promise((t=>{const i=(0,o.pE)(window).topFrame,e=i=>{this.Nt.next(i),this.Nt.complete(),t(i)};i.googletag&&e(!1),(0,h.dZ)({src:s.x},i.document.head,i,(()=>i.googletag&&(0,c.QM)(i.googletag.getVersion())?e(!1):e(!0)),(()=>e(!0)))}))}static qt(t){null!==this.$t&&this.$t!==t&&(0,a.n)({message:"AdBlockerDetection_changed_after_new_global",level:a.D.INFO,exception:`${this.$t}`},{throttle:2,sendMaxLog:!1}),this.$t=t,this.$t&&(this.Nt.next(!0),this.Nt.complete())}static Ut(){return`<style>.adBanner{background-color: transparent; height: 1px !important; width: 1px !important; position: absolute !important; left: -10000px !important; top: -1000px !important; display:block !important; }</style><div id="cnxtestadblock" class="${n.join(" ")}"></div>`}}d.$t=null,d.Nt=new l.X(null)},7417:(t,i,e)=>{"use strict";var s;!function(t){t.prebid="prebid",t.bid="bid",t.win="win",t.impression="impression",t.viewableImpression="viewableImpression",t.postbid="postbid",t.initAd="initAd",t.request="request",t.startAd="startAd"}(s||(s={}))},497:(t,i,e)=>{"use strict";e.d(i,{S:()=>s});class s{}s.MaxLogOverflow=1e3,s.maxLogOverflowCount={},s.logCount={},s.maxLogSent={},s.sessionId="",s.pageFocus=!1,s.playerDestroyed=!1,s.incrementLogCount=t=>{s.logCount[t]?(++s.maxLogOverflowCount[t],++s.logCount[t]):(s.logCount[t]=1,s.maxLogOverflowCount[t]=1)},s.isMaxLog=(t,i)=>!!(s.logCount[t]&&s.logCount[t]>i),s.isMaxLogOverflow=t=>s.maxLogOverflowCount[t]>s.MaxLogOverflow&&(s.maxLogOverflowCount[t]=1,!0),s.setMaxLogSent=t=>{s.maxLogSent[t]=!0},s.isMaxLogSent=t=>!!s.maxLogSent[t]},1886:(t,i,e)=>{"use strict";e.d(i,{f:()=>n});var s=e(7577);class n{static getCidKeyValueObject(){return!!this.customerId&&{[s.ym]:this.customerId}}}n.customerId=null},7910:(t,i,e)=>{"use strict";e.d(i,{X:()=>a});var s=e(308),n=e(8423),r=e(2817),h=e(6615),o=e(7427);class a{constructor(t){this.zt=t,this.Wt=100,this.Gt=(0,n.pE)(window).topFrame,this.Jt=s.a.indexOf(this.zt.browser.device)>-1,this.Qt=(0,n.dz)(),this.Yt={browserType:this.Xt(),browserVersion:this.zt.browser.browserVersion},this.Zt=this.Kt(),this.ii=this.pageUrl.substr(0,this.Wt),this.ei=(0,h._Y)(this.ii)}Xt(){let t;return Object.keys(r.lI).forEach((i=>{this.zt.browser.browserType.toLowerCase().includes(r.lI[i])&&(t=r.lI[i])})),t}Kt(){let t,i=0;const e=this.zt.browser.osCode.split("_"),n=e[0].toLowerCase();return Object.keys(s.M).forEach((i=>{n.includes(s.M[i])&&(t=s.M[i])})),t===s.M.IPadOS&&(t=s.M.Ios),e.length>1&&(i=parseFloat(`${e[1]||0}.${e[2]||0}`)),{os:t,osVersion:i}}get device(){return this.zt.browser.device}get browser(){return this.Yt}get os(){return this.Zt}get geoLocation(){return this.zt.geoLocation}get pageUrl(){return this.zt.pageUrl||""}get pageUrlTrunc(){return this.ii}get pageDomain(){return this.ei}get isMobile(){return this.Jt}get isInApp(){return(0,o.QM)(this.zt.bundleID)}get isInAppAndroid(){return this.isInApp&&this.os.os===s.M.Android}get playerId(){return this.zt.playerId}get appId(){return this.Qt}get bundleID(){return(0,o.QM)(this.zt.iOSAppID)?this.zt.iOSAppID:this.zt.bundleID}get domainURL(){return this.zt.domainURL}get storeURL(){return this.zt.storeURL}get explorationMode(){return this.zt.explorationMode}get appName(){return this.zt.appName}get appCategories(){return this.zt.appCategories}get appVersion(){return this.zt.appVersion}get sdkVersion(){return this.zt.sdkVersion}get appPrivacyPolicy(){return this.zt.appPrivacyPolicy}get appIsPaid(){return this.zt.appIsPaid}get deviceId(){return this.zt.deviceId}get topWindow(){return this.Gt}get appPageURL(){return this.zt.appPageURL}get isOVPDomain(){return this.zt.isOVPDomain}}},1995:(t,i,e)=>{"use strict";e.d(i,{C:()=>s});class s{constructor(){this.si=!1,this.promise=new Promise(((t,i)=>{this.ni=t,this.ri=i}))}oi(){this.si||(this.si=!0)}resolve(t){this.oi(),this.ni(t)}reject(t){this.oi(),this.ri(t)}get isPending(){return!this.si}}},7754:(t,i,e)=>{"use strict";e.d(i,{P:()=>a});var s,n=e(7427),r=e(289);!function(t){t[t.Desktop=2]="Desktop",t[t.SmartTV=3]="SmartTV",t[t.Smartphone=4]="Smartphone",t[t.Tablet=5]="Tablet",t[t.GameConsole=6]="GameConsole",t[t.Unrecognized=7]="Unrecognized"}(s||(s={}));const h={[r.ProtoDeviceType.Desktop]:s.Desktop,[r.ProtoDeviceType.Smartphone]:s.Smartphone,[r.ProtoDeviceType.Tablet]:s.Tablet,[r.ProtoDeviceType.GameConsole]:s.GameConsole,[r.ProtoDeviceType.SmartTV]:s.SmartTV,[r.ProtoDeviceType.WearableComputer]:s.Unrecognized,[r.ProtoDeviceType.PDA]:s.Unrecognized,[r.ProtoDeviceType.Unrecognized]:s.Unrecognized},o="cnx_fraud_sensor";class a{constructor(t,i,e,s){this.ai=t,this.ci=i,this.ui=e,this.di(s)}addFraudSensorScript(){if(this.ci.getElementById(o))return;const t={id:o,src:this.ai.setupMacros("https://s.srvsynd.com/2/234175/analytics.js?dt=2341751597675869250012&di=[DOMAIN]&ui=[FS_USER_ID]&md=[FS_MEDIA_TYPE]&ap=[FS_DEVICE_IDENT]&sr=[CNX_SUPPLIER_ID]&pp=[PUBLISHER_ID]&ti=[SESSION_ID]&de=[FS_DEVICE_TYPE]&to=[MGTO]&pv=[MGID]")};this.ci.insertScript(t,null,"FraudSensor_script_error")}di(t){t=(0,n.QM)(t)?t:"00000000-0000-0000-0000-000000000000";const{lookupId:i,lookupResponseCode:e,publisherAdsTxt:s,deviceIdentifier:r}=this.ui,o=h[this.ui.deviceType];this.ai.setPublisherId(s),this.ai.setUserId(t),this.ai.setFraudSensorMacros({lookupId:i,lookupResponseCode:e,deviceType:o,mediaType:2,deviceIdentifier:r})}}},8804:(t,i,e)=>{"use strict";e.d(i,{a:()=>q});var s=e(289),n=e.n(s),r=e(7726),h=e(8423),o=e(1561),a=e(9446),c=e(7398),l=e(6438),u=e(7910),d=e(6615),p=e(45),f=e(497),m=e(7427),g=e(3030),v=e(5055),y=e(2356),b=e(1730),x=e(7272),w=e(3352),_=e(1580),S=e(3217),A=e(3810),P=e(5880),I=e(782),k=e(2820),C=e(649),T=e(7754),M=e(6284),E=e(3640),B=e(4280),O=e(9207),L=e(6243),R=e(7382),D=e(5732),j=e(4974),V=e(525),F=e(8852),$=e(7577),N=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function h(t){try{a(s.next(t))}catch(t){r(t)}}function o(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(h,o)}a((s=s.apply(t,i||[])).next())}))};const U="player_instance",H=",";class q extends P._{constructor(t,i,e,s,n,r,h){super(),this.services=t,this.GLOBAL=i,this.pi=e,this.mi=s,this.gi=n,this.vi=r,this.readyCallback=h,this.yi={},this.bi="<cnx-placeholder></cnx-placeholder>",this.xi=100,this.wi=1e3,this.isServerlessMode=!1,this._i=!1,this.Si=[],this.Ai="{{omidVerificationClient}}",this.Pi=[],this.pi&&this.Ii(),B._.detectUsingCSS(this.GLOBAL),this.ki=(0,o.sw)(this.GLOBAL)}initUrlSuffixer(t){const i=new O.f;if(t.bandwidthLoggingState===s.ProtoBandwidthLoggingEnum.Disabled)return i;const e=this.Ci(t);return i.setUrlParams({domain:V.n.bundleDomain,urlParams:[(0,F.IS)(e,t.playerId)]}),i}Ti(){const t={playerId:this.externalAttributes.playerId,_appSettings:this.externalAttributes._appSettings,settings:{_connatixInternals:this.externalAttributes.settings._connatixInternals,advertising:{},customization:{},rendering:{},plugins:{}}};this.externalAttributes.customParam1&&(t.customParam1=this.externalAttributes.customParam1),this.externalAttributes.customParam2&&(t.customParam2=this.externalAttributes.customParam2),this.externalAttributes.customParam3&&(t.customParam3=this.externalAttributes.customParam3),this.externalAttributes.customParam4&&(t.customParam4=this.externalAttributes.customParam4),this.externalAttributes.customParam5&&(t.customParam5=this.externalAttributes.customParam5),this.externalAttributes.settings.useExternalViewabilityService&&(t.settings.useExternalViewabilityService=this.externalAttributes.settings.useExternalViewabilityService),this.externalAttributes=t}Mi(t){const i=this.GLOBAL.frameElement;if(!(0,o.GF)(i))return;let e=!0;i&&t&&(e=!1),e?(0,o.MV)(i):(0,o.Ho)(i)}Ei(t,i){try{return this.Bi(t,i)}catch(t){return null}}Oi(t){let i;try{i=eval(t)}catch(e){i=t.replace(/\[(\d+)]/g,":nth-child($1)")}return i}Li(t,i){const e=this.Ei(t,i);return null===e?new Promise((e=>{setTimeout((()=>{e(this.Li(t,i))}),this.xi)})):Promise.resolve(e)}Ri(t,i){const e=this.Oi(t);return Promise.resolve(this.Li(e,i))}Bi(t,i){let e;return t.split(/(\.cnxEq\(\d+\))/).filter((t=>t)).forEach((t=>{e=t.includes("cnxEq")?this.Di(e,t):e?e.querySelectorAll(t):(0,o.Wb)(t,i)})),e?(e.hasOwnProperty("length")&&(e=e.length>0?e[0]:null),e):null}Di(t,i){const e=/\d+/g.exec(i),s=parseInt(e[0],10);return s>t.length?(0,g.Sz)(t)[t.length-1]:(0,g.Sz)(t)[s]}ji(){return this.mi?s.ProtoImplementationType.Amp:s.ProtoImplementationType.Web}Vi(t,i){const e=(0,h.pE)(this.GLOBAL);let s;return s=(0,m.$K)(this.externalAttributes.settings.rendering.forceInsertPath)?this.externalAttributes.settings.rendering.forceInsertPath:i.forceInsertPath,new Promise(((n,r)=>{let h=(0,o.G$)(this.bi,this.GLOBAL);if(s||t.tag.parentNode===this.GLOBAL.document.head&&(!e.topChildFrame||i.renderInFrame)){let t,s,r;e.topChildFrame&&(0,o.IV)(e.topChildFrame.frameElement,k.Gj.DisplayNone),t=(0,m.QM)(this.externalAttributes.settings.rendering.containerSelector)?this.externalAttributes.settings.rendering.containerSelector:i.containerSelector,s=(0,m.$K)(this.externalAttributes.settings.rendering.insertPosition)?this.externalAttributes.settings.rendering.insertPosition:i.insertPosition,r=(0,m.$K)(this.externalAttributes.settings.rendering.position)?this.externalAttributes.settings.rendering.position:i.position,this.Ri(t,e.topFrame).then((t=>{this.Fi(t,h,s,r),n({insertContainer:h,insertWindow:e.topFrame})}))}else e.topChildFrame&&!i.renderInFrame?(h=(0,o.G$)(this.bi,e.topFrame),e.topChildFrame.frameElement.parentNode.insertBefore(h,e.topChildFrame.frameElement),(0,o.cn)(e.topChildFrame.frameElement,k.Gj.DisplayNone),n({insertContainer:h,insertWindow:e.topFrame})):(t.tag.parentNode.insertBefore(h,t.tag),n({insertContainer:h}))}))}$i(t,i,e){(0,o.IS)(i,t,e)}Ni(t,i,e){switch(e){case s.ProtoPlayerInsertMode.BeforeContainer:t.parentElement.insertBefore(i,t);break;case s.ProtoPlayerInsertMode.ReplaceContainer:t.parentElement.insertBefore(i,t),(0,o.bX)(t);break;case s.ProtoPlayerInsertMode.HideContainer:t.parentElement.insertBefore(i,t),(0,o.MV)(t);break;case s.ProtoPlayerInsertMode.AfterContainer:t.nextElementSibling?t.parentElement.insertBefore(i,t.nextElementSibling):t.parentElement.appendChild(i)}}Fi(t,i,e,n){e===s.ProtoPlayerInsertMode.WithinContainer?this.$i(t,i,n):this.Ni(t,i,e)}Ui(t,i=[]){t.lineItems=[...t.lineItems,...i];const e=t.lineItems.length;t.lineItems=(0,g.qy)("advertiserLineItemId",t.lineItems),e!==t.lineItems.length&&(0,r.n)({level:r.D.WARN,message:"Loader_duplicated_adsources",callStack:"_"})}Hi(t,i){const e=t.players[i],{playerModel:n,globalDomUtilsService:r,urlSuffixerService:h}=this.yi[i];if(this.qi(t.cookieSyncUrls),this.services.UserManagerService.setGeoLocation(t.geoLocation),f.S.sessionId=e.sessionId,this.zi.addPlayerSession(e.playerId,e.sessionId),!n)return void this.registerApiError(v.n9.SetupError,"No playlist was provided!");const o=new u.X({iOSAppID:this.pi&&!this.gi?t.iOSAppID:null,browser:t.browser,geoLocation:t.geoLocation,pageUrl:this.pageUrl,playerId:n.playerId,explorationMode:t.explorationMode,bundleID:this.externalAttributes._appSettings.bundleID,domainURL:this.externalAttributes._appSettings.domainURL,storeURL:this.externalAttributes._appSettings.storeURL,appCategories:this.externalAttributes._appSettings.appCategories,appIsPaid:this.externalAttributes._appSettings.appIsPaid,appName:this.externalAttributes._appSettings.appName,appPrivacyPolicy:this.externalAttributes._appSettings.appPrivacyPolicy,appVersion:this.externalAttributes._appSettings.appVersion,sdkVersion:this.externalAttributes._appSettings.sdkVersion,deviceId:this.externalAttributes._appSettings.deviceID,appPageURL:this.externalAttributes._appSettings.appPageURL,isOVPDomain:this.vi}),a=new y.v(r),d=this.getViewabilityService(n,a);B._.detectUsingCSS(n.global);const p=new l.c(n,t.geoLocation,o.pageUrl,o.pageDomain,this.externalAttributes._appSettings,this.ki,t.publisherNetworkCode),g={services:{GlobalDomUtilsService:r,ViewabilityService:d,TrackingService:this.Wi(n,t,i),ResizeObserver:new c.a(n.global),UserManagerService:this.services.UserManagerService,MacrosService:p,EventsStorageService:this.services.EventsStorageService,PageFocusService:a,InteractionService:new M.k(n.global,o.isMobile),UrlSuffixerService:h},config:o};B._.isBannerBlocked&&g.services.TrackingService.trackSessionAdBlocker(s.ProtoAdBlockDetectionTypeEnum.Banner),g.services.UserManagerService.setPageUrl(g.config.pageUrl);const b=this.ji();g.services.TrackingService.setImplementationTypeOnMeta(b),n.externalMacros&&g.services.MacrosService.addExtraMacros(n.externalMacros),g.services.UserManagerService.onEvent([x.k.CCPA_INFO_RECEIVED]).then((()=>{g.services.MacrosService.setUsPrivacyString(g.services.UserManagerService.getUsPrivacyString())})),g.services.UserManagerService.onEvent([x.k.CONSENT_DATA_UPDATE]).then((()=>{g.services.TrackingService.updateMetadataModel({userId:g.services.UserManagerService.getTrackableUser()});const t=g.services.UserManagerService.getConsentPayload();if(g.services.TrackingService.hasGdprConsentPayload=(0,m.QM)(t),this.services.UserManagerService.gdprConsentMode===s.ProtoGdprConsentModeEnum.NoConsent||this.pi){const t=n.lineItemSettings.lineItems.filter((t=>(0,m.QM)(t.vendorId))).every((t=>this.services.UserManagerService.isConsent(t.vendorId)));this.services.UserManagerService.gdprConsentMode=t?s.ProtoGdprConsentModeEnum.AllGood:s.ProtoGdprConsentModeEnum.NotAllDemandConsent}}));const w={wasPlayerReloaded:this.zi.wasPlayerReloaded(e.playerId),wasPlayerInView:this.zi.getSessionInView(e.playerId)};this.renderer=this.getRendererInstance(n,g,w,this.externalAttributes._appSettings),this.subscribe(I.Xh.SessionView,this.renderer,(()=>{this.zi.addSessionInView(e.playerId)})),this.subscribe(I.Xh.SessionRendered,this.renderer,(()=>{this.Gi(p,r,g.config)}));const _=Object.assign({configEnums:this.getApiConfigEnums(),configEvents:this.getApiConfigEvents()},this.renderer.getApiMethods());let S=e.customJsCode;if(S){const t=`${U}_${g.config.appId}`;this.GLOBAL[t]=_,S=S.cnx_replaceAll(`"{{${U}}}"`,`window.${t}`)}this.renderer.init((()=>{this.Qi(S)}))?this.registerApiSuccess(_):this.registerApiError(v.n9.RenderError,"Player size under supported value")}Wi(t,i,e){return t.disableTracking?new w.G:new a.e({userManagerService:this.services.UserManagerService,browser:i.browser,geoLocation:i.geoLocation,playerId:t.playerId,userId:this.services.UserManagerService.getTrackableUser(),sessionId:i.players[e].sessionId,pageUrl:this.pageUrl,bundleId:this.externalAttributes._appSettings.bundleID,customParam1:this.externalAttributes.customParam1,customParam2:this.externalAttributes.customParam2,customParam3:this.externalAttributes.customParam3,customParam4:this.externalAttributes.customParam4,customParam5:this.externalAttributes.customParam5,abTestId:i.players[e].abTestId,explorationMode:i.explorationMode,bundleAbId:i.bundleAbId,bundlePart:i.bundlePart})}Qi(t,i={useSafeMode:!0}){if(!t)return;const{global:e,useSafeMode:s}=i,n=e||this.GLOBAL;let r;r=s?`\n        (function() {\n            "use strict";\n            try {\n                ${t}\n            }catch(e){\n                console.warn('---CnxCustomApiError---');\n                console.warn(e.message);\n            }\n          })()\n        `:t,(0,o.ML)(n.document.head,n,r.trim())}Ii(){if(this.Ai.includes("{{omidVerificationClient"))return;const t={useSafeMode:!1,global:window};this.Qi(decodeURI(this.Ai),t)}Yi(){const{playerId:t,parseDomain:i}=this.Xi;return this.Zi(t,i).catch((t=>{const i=new Error(t);throw(0,r.n)({callStack:i.stack,level:r.D.CRITICAL,exception:i.message,message:"Prerender_Loader_player_id_call_get_pls"},{throttle:1e3}),this.registerApiError(v.n9.SetupError,"player data call error"),this.Ki(),i}))}te(t){return N(this,void 0,void 0,(function*(){const{browser:i,userInformation:e}=t;if(this.services.UserManagerService.setUserInformation(e),this.services.UserManagerService.setBrowserInfo(i),t.hashedPageUrl&&(yield j.k.loadPageInsights({insightsInputType:D.i.Page,id:t.hashedPageUrl})),e&&e.callFraudSensor){const{lookupId:t,lookupResponseCode:s,publisherAdsTxt:n}=e;this.ui={lookupId:t,lookupResponseCode:s,publisherAdsTxt:n,deviceType:i.device}}b.e.serverAb0=t.serverAb0,b.e.serverAb1=t.serverAb1,(0,g.BZ)(t.players)?(t.players.length>1&&(this.Ti(),this._i=!0),Object.keys(t.players).forEach((i=>{this.ie(t,this.Xi,i)}))):this.registerApiError(v.n9.NoPlayer,`No player available for given player id:${this.Xi.playerId}`),this.Ki()}))}Ki(){this.se(),this.ne()}ne(){setTimeout((()=>{if(!this._i){const t=this.Si[0];this.readyCallback&&this.readyCallback(t.apiErrorObj,t.apiConfigObj)}this.re()}))}re(){this.Si.filter((t=>t.apiErrorObj)).forEach((()=>{this.services.EventsStorageService.emitRenderError()}))}ie(t,i,e){const s=t.players[e],{playerModel:n}=this.yi[e];this.Mi(s.renderInFrame),this.Hi(t,e),this.he(n,this.renderer.playerContainer)}Zi(t,i=!1){let e={parseDomain:i,referrer:this.ki,pageUrl:this.pageUrl,tokens:[t]};e.bundleId=this.externalAttributes._appSettings.bundleID,this.queryParams.cnxLineItemId&&(e.forceLineItemIds=this.queryParams.cnxLineItemId.split(H).filter((t=>(0,m.QM)(t)))),this.queryParams.cnxPlayerId?e.forcePlayerId=this.queryParams.cnxPlayerId:this.externalAttributes.settings._connatixInternals.skipServingRules&&(e.forcePlayerId=t),this.queryParams.cnxExplorationMode&&(e.forceExploration=!0);const{queryJsTargeting:s}=this.externalAttributes.settings;return(0,m.as)(s)&&Object.keys(s).length>0&&(e.queryJsTargeting=(0,h.rM)(s)),e.customParam1=this.externalAttributes.customParam1,e.customParam2=this.externalAttributes.customParam2,e.customParam3=this.externalAttributes.customParam3,e.customParam4=this.externalAttributes.customParam4,e.customParam5=this.externalAttributes.customParam5,e.disableTracking=this.externalAttributes.settings._connatixInternals.disableTracking,e.version=p.g.version,e.es6=p.x,e.userId=this.services.UserManagerService.getForcedTrackableUser(),e.isConsentConnatix=this.services.UserManagerService.isConsentConnatix(),e.clientAb0=b.e.clientAb0,e.clientAb1=b.e.clientAb1,e.implementationType=this.ji(),e.reloadedPlayers=this.zi.getCookiePlayersSession(),e=Object.assign(Object.assign({},e),this.getSpecificRequestData()),this.Xi.playerId?this.getPlayerResponse(e,this.Xi.playerId||"serverless"):new Promise(((t,i)=>{this.isServerlessMode=!0,t(this.defaultInitFromProto())}))}oe(){const t=(0,d.Ph)("cnxVideoPosition",this.pageUrl),i=parseInt((0,d.Ph)("cnxStoryPosition",this.pageUrl),10);return{cnxStoryId:(0,d.Ph)("cnxStoryId",this.pageUrl),cnxLineItemId:(0,d.Ph)("cnxLineItemId",this.pageUrl),cnxPlayerId:(0,d.Ph)("cnxPlayerId",this.pageUrl),cnxMediaId:(0,d.Ph)("cnxMediaId",this.pageUrl),cnxPlaylistId:(0,d.Ph)("cnxPlaylistId",this.pageUrl),cnxVideoPosition:t?parseInt(t,10):null,cnxExplorationMode:"true"===(0,d.Ph)("cnxExplorationMode",this.pageUrl),cnxStoryPosition:(0,m.r)(i)?i:null,cnxSkipAdsFlag:"true"===(0,d.Ph)("cnxSkipAdsFlag",this.pageUrl),cnxReloadTime:parseInt((0,d.Ph)("cnxReloadTime",this.pageUrl),10),cnxOverrideLineitems:"true"===(0,d.Ph)("cnxOverrideLineitems",this.pageUrl),cnxIsSeoTraffic:"true"===(0,d.Ph)("cnxIsSeoTraffic",this.pageUrl)}}he(t,i){const e=this.getDelegateHandler(),s=new _.N(this.GLOBAL,this.services.EventsStorageService,e,t,i);this.vi?B._.isBannerBlocked||this.Pi.push(B._.onAdBlockerDetected().subscribe((t=>{t||s.start()}))):s.start()}Gi(t,i,e){if(!this.ui)return;const s=this.services.UserManagerService.getTrackableUser();this.ui.deviceIdentifier=e.bundleID;const n=new T.P(t,i,this.ui,s);this.vi?this.Pi.push(B._.onAdBlockerDetected().subscribe((t=>{t||n.addFraudSensorScript()}))):n.addFraudSensorScript()}qi(t){B._.isBannerBlocked||(this.vi?this.Pi.push(B._.onAdBlockerDetected().subscribe((i=>{i||this.services.UserManagerService.setThirdPartySyncUrls(t)}))):this.services.UserManagerService.setThirdPartySyncUrls(t))}ae(){const t=R.$.getSessionClient(this.GLOBAL);t?this.ce=new S.Z(t,this.services.EventsStorageService,this.externalAttributes._appSettings.sdkVersion):(0,r.n)({message:"OmidSessionClient not found.",level:r.D.CRITICAL})}le(t){const i=()=>new Promise(((i,e)=>{const s=this.ue();t.addCssStylesheetToHead(s,(()=>i()),(t=>e(t)))}));return(0,h.Up)((()=>i())).catch((t=>{throw(0,r.n)({message:"Loader_add_css_link",exception:t,level:r.D.INFO}),new Error(t)}))}Ci(t){return t.bandwidthLoggingState===s.ProtoBandwidthLoggingEnum.Enabled?$.Kp:t.bandwidthLoggingState===s.ProtoBandwidthLoggingEnum.SaaS?$.a8:void 0}setApiHostUrl(t){V.n.apiHostUrl=t}setInappPageUrl(t){(0,m.QM)(t)&&(this.pageUrl=t)}updateQueryParams(){this.queryParams=this.oe()}loadScriptTag(t,i){if(this.externalAttributes=t,!(0,h.er)(t.playerId))return(0,r.n)({level:r.D.WARN,message:"Invalid_Player_GUID",exception:t.playerId}),this.registerApiError(v.n9.InvalidGUID,"Invalid PlayerID was provided"),!1;let e;if(i&&(e=this.GLOBAL.document.getElementById(i)),!e)return(0,r.n)({message:"Loader_no_script_id",exception:`${t.playerId}`,level:r.D.WARN}),this.registerApiError(v.n9.SetupError,"Could not locate any script tag ids in the page"),!1;const s=(0,m.as)(t.settings.plugins.adobeAnalyticsSettings);return this.gi&&this.ae(),this.Xi={parseDomain:s,playerId:t.playerId,tag:e},!0}insertRenderer(){try{this.zi=new A.e(this.queryParams.cnxReloadTime),this.Mi();const t=()=>{try{this.Yi().then((t=>{const i=[];t.players.forEach(((e,s)=>{t.players[s].limitClientSideApiUse&&this.Ti();const n=this.Vi(this.Xi,e).then((i=>{this.Ui(e,t.lineItems);const n=this.initUrlSuffixer(e),r=this.getPlayerModel(i,t,n,s.toString()),h=new C.m(r.global);return(0,E.u)(r.lineItemSettings.lineItems),this.yi[s]={playerModel:r,globalDomUtilsService:h,urlSuffixerService:n},this.le(h)})).catch((t=>{this.registerApiError(v.n9.SetupError,"rendering error"),(0,r.n)({message:"Loader_send_data_to_renderer",exception:t.message,callStack:t.stack,level:r.D.CRITICAL})}));i.push(n)})),Promise.all(i).then((()=>this.te(t)))}))}catch(t){(0,r.n)({message:"Prerender_Loader_do_player_call",callStack:t.stack,exception:t.message,level:r.D.WARN},{throttle:1e3})}};this.se=this.services.UserManagerService.registerPlsCall(t)}catch(t){(0,r.n)({message:"Prerender_Loader_insert_renderer",exception:t.message,callStack:t.stack,level:r.D.CRITICAL})}}findPageUrl(t,i,e=!1){if(t.cnx_page_url)this.pageUrl=t.cnx_page_url;else try{t["cnxAmpAd)"]?this.pageUrl=t.context.sourceUrl||t.context.location.href:this.pageUrl=i||(0,h.lU)((0,h.pE)(this.GLOBAL),this.GLOBAL)}catch(t){}if(!this.pageUrl||0===this.pageUrl.length)return e||(0,r.n)({message:"Prerender_Loader_find_page_url",level:r.D.INFO},{throttle:1e3}),new Promise((e=>{setTimeout((()=>{this.findPageUrl(t,i,!0).then((()=>e()))}),this.wi)}));try{return this.pageUrl=(0,d.sH)(this.pageUrl),Promise.resolve()}catch(t){return(0,r.n)({message:"Loader_find_page_url",exception:t.message,callStack:t.stack,level:r.D.CRITICAL}),Promise.reject()}}registerApiError(t=v.n9.SetupError,i=""){this.Si.push({apiErrorObj:{type:t,message:i}})}registerApiSuccess(t){this.Si.push({apiConfigObj:t})}destroy(){this.renderer&&this.renderer.destroy(),(0,L.i)(this.Pi)}}},3810:(t,i,e)=>{"use strict";e.d(i,{e:()=>h});var s=e(8423),n=e(7726),r=e(9115);class h{constructor(t){this.RELOAD_TIME=r.ti,this.RELOAD_COOKIES="cnx_player_reload",this.SESSION_IN_VIEW_FLAG="_sessionWasViewed",this.de={},this.pe={},this.fe={},this.Gt=(0,s.pE)(window).topFrame,this.me(t);try{this.ge()}catch(t){(0,n.n)({message:"PlayerReloader_cookie_fetch_failed",level:n.D.WARN,exception:t})}}wasPlayerReloaded(t){return!!this.de[t]}addPlayerSession(t,i){this.pe[t]=i}getCookiePlayersSession(){return this.de}addSessionInView(t){this.pe[t]+=this.SESSION_IN_VIEW_FLAG}getSessionInView(t){return this.fe[t]}me(t){setTimeout((()=>{this.ve(),this.Gt.location.reload()}),t||this.RELOAD_TIME)}ge(){decodeURIComponent(this.Gt.document.cookie).split(";").forEach((t=>{const i=t.split("=");i[0].includes(this.RELOAD_COOKIES)&&(this.de=JSON.parse(i[1]))})),this.ye(),this.be()}ye(){Object.keys(this.de).forEach((t=>{const i=this.de[t].indexOf(this.SESSION_IN_VIEW_FLAG);i>-1&&(this.de[t]=this.de[t].substr(0,i),this.fe[t]=!0)}))}be(){this.Gt.document.cookie=`${this.RELOAD_COOKIES}=; expires = Thu, 01 Jan 1970 00:00:00 GMT; path=/`}ve(){Object.keys(this.fe).forEach((t=>{this.pe[t].includes(this.SESSION_IN_VIEW_FLAG)||this.addSessionInView(t)}));const t=new Date;let i=t.getTime();i+=r.Y0*r.s_,t.setTime(i),this.Gt.document.cookie=`${this.RELOAD_COOKIES}=${JSON.stringify(this.pe)}; expires=${t.toUTCString()}; path=/`}}},7593:(t,i,e)=>{"use strict";e.d(i,{t:()=>o});var s=e(8423),n=e(7726),r=e(7427),h=e(158);class o{constructor(t,i){this.xe=t,this._e=i,this.Se=(t,i)=>new Promise(((e,s)=>{h.n.sendProtoRequest({ProtoResponse:this.xe,endpoint:t,requestType:"GET",logError:!0,timeout:i}).then((t=>{e(t)})).catch((t=>{s(t)}))}))}fetchMetadata(t,i=5,e=!0,n){const h=t=>403===this.Ae(t);return new Promise(((o,a)=>{(0,s.Up)((()=>this.Se(t,n)),i,h).then((i=>{if((0,r.as)(i))return o(i);const e=new Error("invalid metadata");return this.Pe({url:t,metadata:i,e}),a(e)})).catch((i=>{e&&this.Pe({url:t,e:i}),a(i)}))}))}Pe(t){var i;const e=(0,r.QM)(null===(i=t.e)||void 0===i?void 0:i.message)?t.e.message:"";e.includes("XhrUtils_XMLHttpRequest_error")||(0,n.n)({message:"MediaMetadataHandler_fetchMetadata",exception:`${this._e}_${e}:${JSON.stringify(t)}`,callStack:t.e&&t.e.stack,level:n.D.CRITICAL})}Ae(t){if(t&&t.message){const i=t.message.split("status:")[1];return i?parseInt(i.slice(0,3),10):null}return null}}},5880:(t,i,e)=>{"use strict";e.d(i,{_:()=>n});var s=e(3030);class n{constructor(){this.Ie={}}subscribe(t,i,e){this.Ie[t]||(this.Ie[t]=[]),this.Ie[t].push({context:i,func:e})}unsubscribe(t,i,e){this.Ie[t]&&(this.Ie[t]=this.Ie[t].filter((t=>!(t.context===i&&(t.func===e||!e)))))}unsubscribeAll(t){Object.keys(this.Ie).forEach((i=>{this.Ie[i]=this.Ie[i].filter((i=>i.context!==t))}))}publish(t,i,e={payload:void 0}){Object.prototype.hasOwnProperty.call(this.Ie,i)&&this.Ie[i].forEach((i=>{i.context===t&&i.func(e)}))}relay(t,i,e,n){(0,s.qo)(t).forEach((t=>{this.subscribe(t,i,(i=>{n.publish(e,t,i)}))}))}relayBulk(t,i,e){t.forEach((t=>{this.relay(t.channel,t.source,i,e)}))}}},1580:(t,i,e)=>{"use strict";e.d(i,{N:()=>p});var s,n=e(1561);class r{constructor(t){this.ke=[],this.Ce=t=>{this.ke.push(t)},this.Te=t.subscribe(this.Ce)}get cachedEvents(){return this.ke}destroy(){this.ke=null,this.Te()}}!function(t){t.AdobeAnalytics="AdobeAnalytics",t.MoatAnalytics="MoatAnalytics"}(s||(s={}));var h=e(7427),o=e(7726),a=e(3030),c=e(8423),l=e(6615),u=e(45),d=e(525);class p{constructor(t,i,e,s,n){this.Me=i,this.Ee=e,this.Be=s,this.Oe=n,this.Le=[],this.Re=t=>{try{this.De(t);const i=this.Le.find((i=>i.name===t.type));let e;if(i&&!i.started){i.started=!0;const t=i.eventsCacheHandler;e=t.cachedEvents,t.destroy()}const{adobeAnalyticsSettings:s,moatAnalyticsSettings:n,_debugLogging:r}=this.Be.apiConfig.settings.plugins,{secondLevelDomain:h,playerId:o}=this.Be,a={cachedEvents:e,adobeAnalyticsSettings:s,moatAnalyticsSettings:n,_debugLogging:r,secondLevelDomain:h,playerId:o,pageName:this.je,pageUrl:this.Fe,version:u.g.version,delegateHandlers:this.Ee,playerContainer:this.Oe,playerWindow:window};t.getInstance().start(this.Me,a)}catch(t){(0,o.n)({callStack:t.stack,exception:t.message,level:o.D.CRITICAL,message:"PluginsHandler_initPlugin"})}};const r=(0,c.pE)(t);this.$e=r.topFrame,this.Fe=(0,c.lU)(r,this.$e),this.Fe=(0,l.sH)(this.Fe),this.je=(0,l._Y)(this.Fe)}start(){this.Ne(),this.Ue(),this.$e.cnxPlugins.pluginsHandlers.push(this.Re)}Ne(){let t=[];Array.isArray(this.$e.cnxPlugins)&&this.$e.cnxPlugins.length>0&&(t=this.$e.cnxPlugins,t.forEach((t=>this.Re(t)))),(0,h.as)(this.$e.cnxPlugins)||this.He(t)}Ue(){const t=this.ze();(0,a.BZ)(t)&&this.We(t)}Ge(t){const i=this.$e.cnxPlugins.cachedPlugins;if((0,a.BZ)(i))return i.find((i=>i.type===t))}De(t){this.Ge(t.type)||this.$e.cnxPlugins.cachedPlugins.push(t)}He(t){this.$e.cnxPlugins={cachedPlugins:t,pluginsHandlers:[],push:function(t){this.pluginsHandlers.forEach((i=>{i(t)}))}}}We(t){t.forEach((t=>{this.Ge(t)||this.Le.push({name:t,started:!1,eventsCacheHandler:new r(this.Me)})})),this.Le.forEach((({name:t})=>this.Je(t)))}Qe(t){return Object.values(t).every((t=>(0,h.QM)(t)))}ze(){const t=[];return this.Be.apiConfig.settings.plugins.adobeAnalyticsSettings&&this.Qe(this.Be.apiConfig.settings.plugins.adobeAnalyticsSettings)&&t.push(s.AdobeAnalytics),this.Be.moatTrackingEnabled&&t.push(s.MoatAnalytics),t}Je(t){const i={id:`cnx-${t}`,src:""};switch(t){case s.AdobeAnalytics:i.src=d.n.endPoints.assets.plugins.adobeAnalytics;break;case s.MoatAnalytics:i.src=d.n.endPoints.assets.plugins.moatAnalytics}this.$e.document.getElementById(i.id)||(0,n.dZ)(i,this.$e.document.head,this.$e,null,null,!0,"PluginsHandler_unable_to_insert_plugin_script")}}},5874:(t,i,e)=>{"use strict";var s;e.d(i,{Z:()=>n}),function(t){t[t.HoldStart=0]="HoldStart",t[t.HoldEnd=1]="HoldEnd",t[t.TapLeft=2]="TapLeft",t[t.TapRight=3]="TapRight",t[t.SwipeEnd=4]="SwipeEnd",t[t.SwipeMove=5]="SwipeMove",t[t.Scroll=6]="Scroll",t[t.Click=7]="Click"}(s||(s={}));const n=s},3344:(t,i,e)=>{"use strict";e.d(i,{Ve:()=>o,_f:()=>l,cv:()=>s,fi:()=>r,jI:()=>n,li:()=>u,qZ:()=>c,sm:()=>a,yA:()=>h});const s="Connatix";var n,r,h,o,a,c,l,u;!function(t){t.Generic="generic",t.Video="video"}(n||(n={})),function(t){t.Click="click",t.InvitationAccept="invitationAccept"}(r||(r={})),function(t){t.PreRoll="preroll",t.MidRoll="midroll",t.PostRoll="postroll",t.Standalone="standalone"}(h||(h={})),function(t){t.SessionStart="sessionStart",t.SessionError="sessionError",t.SessionFinish="sessionFinish"}(o||(o={})),function(t){t.DefinedByJavascript="definedByJavaScript",t.BeginToRender="beginToRender"}(a||(a={})),function(t){t.DefinedByJavascript="definedByJavaScript",t.Video="video"}(c||(c={})),function(t){t.sessionError="sessionError",t.geometryChange="geometryChange"}(l||(l={})),function(t){t.backgrounded="backgrounded",t.notFound="notFound"}(u||(u={}))},3217:(t,i,e)=>{"use strict";e.d(i,{Z:()=>u});var s,n,r=e(3344),h=e(3121),o=e(4959);!function(t){t.Minimized="minimized",t.Collapsed="collapsed",t.Normal="normal",t.Expanded="expanded",t.Fullscreen="fullscreen"}(s||(s={})),function(t){t.StateChanged="stateChanged"}(n||(n={}));class a{constructor(t){this.mediator=t}computeState(t){const i=this.Ye(t);this.Xe&&this.Xe.name===i||this.mediator.publish(this,n.StateChanged,{payload:{state:i}}),this.Xe={dimensions:t,name:i},this.Ze||i!==s.Normal||(this.Ze=Object.assign({},this.Xe))}setPlayerState(t){this.Xe&&this.Xe.name===t||this.mediator.publish(this,n.StateChanged,{payload:{state:t}}),this.Xe={name:t},this.Ze||t!==s.Normal||(this.Ze=Object.assign({},this.Xe))}get currentState(){return this.Xe&&this.Xe.name}Ye(t){if(!this.Ze)return s.Normal;const{width:i,height:e}=this.Ze.dimensions,n=i*e,r=t.width*t.height;switch(!0){case n<r:return s.Expanded;case n>r:return s.Collapsed;default:return s.Normal}}}var c=e(5880),l=e(7726);class u extends c._{constructor(t,i,e){super(),this.Ke=t,this.Me=i,this.ts=new a(this),this.es=!1,this.ss={[h.Z.AdError]:()=>this.ns(),[h.Z.PlayError]:()=>this.rs(),[h.Z.RenderError]:()=>this.hs(),[h.Z.AdImpression]:()=>this.cs(),[h.Z.AdComplete]:()=>this.ls(),[h.Z.AdVideoStart]:({adVideoStartMetadata:t})=>this.us(t),[h.Z.AdVideoFirstQuartile]:()=>this.ds(),[h.Z.AdVideoMidpoint]:()=>this.ps(),[h.Z.AdVideoThirdQuartile]:()=>this.gs(),[h.Z.AdVideoComplete]:()=>this.vs(),[h.Z.VolumeChange]:({volume:t})=>this.ys(t),[h.Z.AdPause]:()=>this.bs(),[h.Z.AdPlay]:()=>this.ws(),[h.Z.AdSkipped]:()=>this._s(),[h.Z.AdClickThru]:()=>this.Ss(),[h.Z.AdInteraction]:()=>this.As(),[h.Z.AdLoaded]:({adLoadedMetadata:t})=>this.Ps(t),[h.Z.AdStateChange]:({adStateChangedMetadata:t})=>this.Is(t),[h.Z.PlayerResized]:({playerDimensionsMetadata:t})=>this.ks(t),[h.Z.OnEnterFullscreen]:()=>this.Cs(),[h.Z.PlayerCollapsed]:()=>this.Ts(),[h.Z.PlayerExpanded]:()=>this.Es(),[h.Z.Destroy]:()=>this.unsubscribeAll(this.ts)},this.Bs=t=>{try{const i=this.ss[t.name];if(!i)return;i(t.metadata)}catch(t){(0,l.n)({message:"SessionClientWrapper_omsdk__onEventStorageEvent",exception:t.message,callStack:t.callStack,level:l.D.WARN})}};try{const{AdSession:t,AdEvents:i,MediaEvents:s}=this.Ke,r=this.Os(e);this.Ls=new t(r),this.Rs=new i(this.Ls),this.Ds=new s(this.Ls),this.Me.subscribe(this.Bs),this.subscribe(n.StateChanged,this.ts,(({payload:{state:t}})=>{this.js(t)})),this.Vs()}catch(t){(0,l.n)({message:"SessionClientWrapper_omsdk_classes_init_err",exception:t.message,callStack:t.callStack,level:l.D.WARN})}}ns(){this.Ls.error(r.jI.Video,h.Z.AdError)}rs(){this.Ls.error(r.jI.Video,h.Z.PlayError)}hs(){this.Ls.error(r.jI.Generic,h.Z.RenderError)}Os(t){const{Partner:i,Context:e}=this.Ke;return new e(new i(r.cv,t))}cs(){this.es=!0,this.Rs.impressionOccurred();const t=this.ts.currentState;t!==s.Normal&&this.js(t)}ls(){this.es=!1}us(t){const{duration:i,mediaPlayerVolume:e}=t;this.Ds.start(i,e)}ds(){this.Ds.firstQuartile()}ps(){this.Ds.midpoint()}gs(){this.Ds.thirdQuartile()}vs(){this.Ds.complete()}ys(t){this.es&&this.Ds.volumeChange(t)}bs(){this.Ds.pause()}ws(){this.Ds.resume()}_s(){this.Ds.skipped()}Ss(){this.Ds.adUserInteraction(r.fi.Click)}As(){this.Ds.adUserInteraction(r.fi.InvitationAccept)}Ps(t){const{isSkippable:i,skipOffset:e,isAutoPlay:s}=t,{VastProperties:n}=this.Ke,r=new n(i,e,s,this.$s);this.Rs.loaded(r)}Is({state:t}){this.$s=r.yA[o.I[t]]}js(t){t&&this.Ds.playerStateChange(t)}Ns(t){this.ts.computeState(t)}Us(t){this.ts.setPlayerState(t)}ks(t){this.Ns(t)}Cs(){this.Us(s.Fullscreen)}Ts(){this.Us(s.Minimized)}Es(){this.Us(s.Normal)}Vs(){this.Ls.registerSessionObserver((t=>{t.type===r.Ve.SessionStart?this.zs(t):t.type===r.Ve.SessionError&&(0,l.n)({message:"SessionClientWrapper_omsdk_session_error",exception:t.type,callStack:JSON.stringify(t),level:l.D.WARN},{throttle:1,sendMaxLog:!1})}))}zs(t){t.data.creativeType===r.qZ.DefinedByJavascript&&this.Ls.setCreativeType(r.qZ.Video),t.data.impressionType===r.sm.DefinedByJavascript&&this.Ls.setImpressionType(r.sm.BeginToRender)}}},7382:(t,i,e)=>{"use strict";var s;e.d(i,{$:()=>s}),function(t){const i=["1.3.25-iab3167","1.3.13-iab2343"],e=["1.3.25-iab3167","1.3.13-iab2343"];function s(t,i){if(!t)return null;let e=null;for(let s=0;s<i.length&&(e=t[i[s]],!e);s++);return e}t.getSessionClient=function(t){return s(t.OmidSessionClient,i)},t.getVerificationClient=function(t){return s(t.OmidVerificationClient,e)}}(s||(s={}))},6450:()=>{String.prototype.cnx_replaceAll=function(t,i){return this.split(t).join(i)}},3640:(t,i,e)=>{"use strict";e.d(i,{A:()=>d,u:()=>u});var s=e(7593),n=e(289),r=e(525),h=e(7427),o=e(7726);const a=new s.t(n.ProtoAdDomainBlockingResponse,"AdDomainBlockingService");let c;const l=new Map;function u(t){c||(c=new Promise((i=>{const e=t.find((t=>t.blockedDomainsRevisionNumber));if(!e)return void i();const{publisherLineItemId:s,blockedDomainsRevisionNumber:n}=e,h=`${r.n.endPoints.base.lineItems}${s}/blockedDomains_${n}.bin`;a.fetchMetadata(h,2).then((t=>{l.set(s,t.domains),i()})).catch((()=>{(0,o.n)({message:"AdDomainBlockingService_fetchBlockedDomains_endpoint_unavailable",level:o.D.CRITICAL},{throttle:2,sendMaxLog:!1}),i()}))})))}function d(t,i){return new Promise((e=>{(0,h.QM)(i)?c.then((()=>{l.has(t)&&l.get(t).some((t=>i.includes(t)))?e(!0):e(!1)})):e(!1)}))}},525:(t,i,e)=>{"use strict";e.d(i,{n:()=>a});var s=e(6615),n=e(45),r=e(8423),h=e(7427);class o{constructor(t){this.base=t,this.api={pls:t.core+"core/pls",story:t.core+"core/story",rtb:t.core+"rtb/g",syncUrls:t.core+"core/us",fallbackstory:t.core+"core/fallbackstory",cookie:t.core+"core/ck",tam:t.core+"core/atam"},this.tracking={session_rendered:t.tracking+"sr",session_view:t.tracking+"sv",session_time:t.tracking+"st",session_client_error:t.tracking+"e",media_quartile:t.tracking+"mq",media_click:t.tracking+"mc",ad_impression:t.tracking+"ai",bids:t.tracking+"abt",ad_impression_viewable:t.tracking+"av",ad_quartile:t.tracking+"aq",ad_click:t.tracking+"ac",logging:t.tracking+"e",playerStart:t.tracking+"ps",adOpportunity:t.tracking+"ao",sessionAdBlocker:t.tracking+"sab",heavy_ad_intervention:t.tracking+"ha",auctionInformation:t.tracking+"aucinfo"},this.assets={css:{elements:`${this.Ws(t.assets)}player.css`,playspace:`${this.Ws(t.assets)}connatix.playspace.css`},plugins:{adobeAnalytics:`${t.plugins}p/plugins/adobe.plugin.js`,moatAnalytics:`${t.plugins}p/plugins/moat.plugin.js`,prebidScript:`${t.plugins}p/plugins/prebid6.7.0-1.js`}}}Ws(t){return`${t}p/${n.g.version}/`}}class a{static set bundleDomain(t){this.Gs=t}static get bundleDomain(){if(!(0,h.QM)(this.Gs))throw new Error("bundleDomain missing");return this.Gs}static set apiHostUrl(t){this.Js=t,a.Qs=a.Ys()}static Zs(t){let i=`capi{{env}}.${t}`;return this.Js&&(i=this.Js),{video:`//vid.${t}/`,image:`//img.${t}/`,core:`https://${i}/`,tracking:`https://${i}/tr/`,metadata:`//vid.${t}/`,insights:`//ins.${t}/`,assets:`//cds{{env}}.${t}/`,plugins:`//cds.${t}/`,lineItems:`//lit.${t}/`}}static Ys(){const t=(0,s.Ph)("cnxEnv",(0,r.pE)(window).topFrame.location.href);t&&(n.g.domainPrefix=`-${t}`);const i=this.Zs(this.bundleDomain);return Object.keys(i).forEach((t=>{i[t]=i[t].replace("{{env}}",n.g.domainPrefix)})),new o(i)}static get endPoints(){return null===a.Qs&&(a.Qs=a.Ys()),a.Qs}}a.Qs=null},4959:(t,i,e)=>{"use strict";e.d(i,{I:()=>s,V:()=>r});var s,n=e(289);!function(t){t[t.PreRoll=0]="PreRoll",t[t.MidRoll=1]="MidRoll",t[t.PostRoll=2]="PostRoll",t[t.Standalone=3]="Standalone"}(s||(s={}));const r={[n.ProtoAdSlotsEnum.PreRoll]:s.PreRoll,[n.ProtoAdSlotsEnum.MidRoll]:s.MidRoll,[n.ProtoAdSlotsEnum.PostRoll]:s.PostRoll}},3121:(t,i,e)=>{"use strict";e.d(i,{Z:()=>n});const s=e(9078).fI,n=Object.assign(Object.assign({},s),{AdBreakStart:"adBreakStart",AdComplete:"adComplete",AdBreakComplete:"adBreakComplete",Pause:"pause",AdPause:"adPause",Play:"play",AdPlay:"adPlay",ContentComplete:"contentComplete",SessionStart:"sessionStart",SessionEnd:"sessionEnd",PlayerResized:"playerStateResize",OnEnterFullscreen:"onEnterFullscreen",OnExitFullscreen:"onExitFullscreen",PlayerCollapsed:"playerCollapsed",PlayerExpanded:"playerExpanded",PlayError:"playError",RenderError:"renderError",AdStateChange:"adStateChange",VolumeChange:"volumeChange",Destroy:"destroy"})},649:(t,i,e)=>{"use strict";e.d(i,{m:()=>l});var s=e(8423),n=e(1561),r=e(525),h=e(3030),o=e(7726),a=e(7427),c=e(308);class l{constructor(t){this.createElement=(t,i=this.$e)=>i.document.createElement(t),this.$e=t,this.addPreconnect()}get global(){return this.$e}addCssString(t,i=""){return(0,n.uc)(t,i,this.$e)}addPreconnect(){(0,n.tp)(r.n.endPoints.base.video,this.$e),(0,n.tp)(r.n.endPoints.base.core,this.$e),(0,n.tp)(r.n.endPoints.base.image,this.$e)}getLineHeightPropertyValue(t){return(0,n.Dx)(t,this.$e).getPropertyValue("line-height")}getFontSizePropertyValue(t){return(0,n.Dx)(t,this.$e).getPropertyValue("font-size")}getFontWeightPropertyValue(t){return(0,n.Dx)(t,this.$e).getPropertyValue("font-weight")}getTransformPropertyValue(t){return(0,n.Dx)(t,this.$e).getPropertyValue("transform")}getPaddingTopPropertyValue(t){return(0,n.Dx)(t,this.$e).getPropertyValue("padding-top")}getPaddingBottomPropertyValue(t){return(0,n.Dx)(t,this.$e).getPropertyValue("padding-bottom")}getMarginTopPropertyValue(t){return(0,n.Dx)(t,this.$e).getPropertyValue("margin-top")}getMarginBottomPropertyValue(t){return(0,n.Dx)(t,this.$e).getPropertyValue("margin-bottom")}getMarginLeftPropertyValue(t){return(0,n.Dx)(t,this.$e).getPropertyValue("margin-left")}getMarginRightPropertyValue(t){return(0,n.Dx)(t,this.$e).getPropertyValue("margin-right")}createElementByString(t,i=this.$e){return(0,n.G$)(t,i)}createDocumentFragment(t=this.$e){return t.document.createDocumentFragment()}isHttpsProtocolUsed(){return(0,n.eA)(this.$e)}isURLSameDomainToTop(t){return(0,n.uh)(t,this.$e)}isDetachedFromDOM(t){let i=t;for(;i.parentNode;)if(i=i.parentNode,i===this.$e.document.body)return!1;return!0}hasIosFullscreenBehaviour(t){return t&&t===c.M.Ios||!this.getFullscreenKeys()}querySelector(t,i=this.$e){let e;try{e=i.document.querySelector(t)}catch(t){}return e}addCssStylesheetToHead(t,i,e){const s=this.$e.document;s.getElementById(t.id)?(0,a.mf)(i)&&i():(0,n.NS)(t,s.head,this.$e,i,e)}getFullscreenKeys(t){return(0,n.S0)(t||this.$e.document)}exitFullscreen(t,i){(i||this.$e.document)[t]()}getDocumentProperty(t){return this.$e.document[t]}addEventListenerOnGlobal(t,i,e,s=!1){(e?this.$e.document:this.$e).addEventListener(t,i,s)}removeEventListenerOnGlobal(t,i,e,s=!1){(e?this.$e.document:this.$e).removeEventListener(t,i,s)}trackWithImages(t,i){(0,s.Hh)(t,this.$e,i)}getElementCoordinates(t){let{top:i,left:e}=t.getBoundingClientRect();const{width:s,height:n}=t.getBoundingClientRect();return i+=this.$e.pageYOffset,e+=this.$e.pageXOffset,{clientX:e,clientY:i,width:s,height:n}}requestAnimationFrameHelper(t){return(0,n.PM)(this.$e,t)}cancelRequestAnimationFrame(t){return(0,n.h_)(this.$e,t)}getGlobalLocationProperties(){const t=this.$e.location;return{hostname:t.hostname,pathname:t.pathname,href:t.href,protocol:t.protocol,host:t.host,port:t.port,search:t.search,hash:t.hash}}open(t,i){this.$e.open(t,i)}getComputedTranslateX(t){let i=0;const e=(0,n.Dx)(t,this.$e).getPropertyValue("transform").match(/^matrix\((.+)\)$/);return(0,h.BZ)(e)&&(i=parseFloat(e[1].split(", ")[4])),i}getBodyDimensions(){try{const t=(0,s.pE)(this.$e).topFrame.document.body;let{offsetWidth:i,offsetHeight:e}=t;const r=(0,n.Dx)(t,this.$e);return i+=parseInt(r.marginLeft,10)+parseInt(r.marginRight,10),e+=parseInt(r.marginTop,10)+parseInt(r.marginBottom,10),{width:i,height:e}}catch(t){return(0,o.n)({message:"DomUtils_error_getting_body_dimensions",exception:t.message,callStack:t.stack,level:o.D.CRITICAL}),{width:0,height:0}}}getViewportWidth(){return(0,s.pE)(this.$e).topFrame.document.documentElement.clientWidth}getViewportHeight(){return(0,s.pE)(this.$e).topFrame.innerHeight}getGlobalClosestTop(){return(0,s.pE)(this.$e)}stripHtmlTags(t){return(0,n.ju)(t,this.$e)}getComputedStyle(t,i){return(0,n.Dx)(t,this.$e,i)}getElementById(t){return(0,n.rI)(t,this.$e)}getElementsByClassName(t){return(0,n.Fs)(t,this.$e)}insertScript(t,i,e){this.$e.document.getElementById(t.id)?(0,a.mf)(i)&&i():(0,n.dZ)(t,this.$e.document.head,this.$e,i,null,!0,e)}destroy(){}}},4974:(t,i,e)=>{"use strict";e.d(i,{k:()=>d});var s=e(7593),n=e(289),r=e(525),h=e(7726),o=e(5732),a=e(8423),c=e(7427),l=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function h(t){try{a(s.next(t))}catch(t){r(t)}}function o(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(h,o)}a((s=s.apply(t,i||[])).next())}))};const u={insights:[],sentimentAnalysis:void 0};class d{static loadInsights(t){const{id:i}=t;let e=d.insightsPromiseStore.get(i);return e||(e=new Promise((i=>{const e=d.requestUrlBuilder(t);d.mediaMetadataHandler.fetchMetadata(e,2,false,1e4).then((t=>{const e=t.insights.map((t=>t.key));i({insights:e,sentimentAnalysis:t.sentimentAnalysis})})).catch((t=>{(0,a.Vm)([95,5])&&(0,h.n)({message:"LoadInsightIndexesService_endpoint_unavailable",exception:e,callStack:`${t}`,level:h.D.WARN},{sendMaxLog:!1}),i(u)}))})),d.insightsPromiseStore.set(i,e)),e}static loadPageInsights(t){return l(this,void 0,void 0,(function*(){const i=yield d.loadInsights(t);return d.pageInsights={insights:i.insights},d.pageInsights}))}static requestUrlBuilder({insightsInputType:t,id:i,versionId:e}){return t===o.i.Page||(0,c.$K)(e)||(0,h.n)({message:"LoadInsightIndexesService_requestUrlBuilder_noVersionIdProvided",exception:`Type: ${t}, id: ${i}`,level:h.D.CRITICAL}),t===o.i.Page?`${r.n.endPoints.base.insights}${i}/insights.bin`:`${r.n.endPoints.base.insights}${i}/${e}/insights.bin`}static markAsUnavailable(t){d.insightsPromiseStore.get(t)||d.insightsPromiseStore.set(t,Promise.resolve(u))}}d.mediaMetadataHandler=new s.t(n.ProtoInsightsResponse,"InsightsLoaderService"),d.insightsPromiseStore=new Map},5732:(t,i,e)=>{"use strict";var s;e.d(i,{i:()=>s}),function(t){t[t.Video=0]="Video",t[t.Story=1]="Story",t[t.Page=2]="Page"}(s||(s={}))},5256:(t,i,e)=>{"use strict";var s,n,r,h;e.d(i,{Av:()=>h,HT:()=>n,WR:()=>r,qs:()=>s}),function(t){t[t.X=0]="X",t[t.Y=1]="Y"}(s||(s={})),function(t){t.Click="click",t.InteractionStart="interactionstart",t.Interaction="interaction",t.InteractionEnd="interactionend"}(n||(n={})),function(t){t[t.Swipe=0]="Swipe",t[t.Hold=1]="Hold"}(r||(r={})),function(t){t[t.Left=0]="Left",t[t.Right=1]="Right"}(h||(h={}))},6284:(t,i,e)=>{"use strict";e.d(i,{k:()=>d});var s=e(2820),n=e(5874),r=e(5256),h=e(3030),o=e(1561);const a=0;function c(t){return t.button===a}var l=e(2231),u=e(7427);class d{constructor(t,i,e){this.Ks=t,this.Jt=i,this.mediator=null,this.tn=30,this.en=250,this.sn=25,this.nn=[],this.rn={},this.hn=0,this.an=0,this.ln=!0,this.un=null,this.dn=!1,this.pn=!1,this.mn=!1,this.gn=!1,this.vn=0,this.yn=0,this.bn=null,this.xn=null,this.wn=null,this._n=!0,this.Sn=!1,this.An=t=>{this.Jt?(t.element.addEventListener("touchstart",this.Pn,{passive:!0}),t.element.addEventListener("touchmove",this.In,{passive:!0}),t.element.addEventListener("touchend",this.kn),t.element.addEventListener("touchcancel",this.Cn),t.element.addEventListener("mouseup",this.Tn)):(t.element.addEventListener("mousedown",this.Mn),t.element.addEventListener("mouseup",this.Tn))},this.En=t=>{this.Jt?(t.element.removeEventListener("touchstart",this.Pn),t.element.removeEventListener("touchmove",this.In),t.element.removeEventListener("touchend",this.kn),t.element.removeEventListener("touchcancel",this.Cn),t.element.removeEventListener("mouseup",this.Tn)):(t.element.removeEventListener("mousedown",this.Mn),t.element.removeEventListener("mouseup",this.Tn))},this.Pn=t=>{t.stopPropagation();const i=this.Bn(t);this.wn=i,this.pn=!1,this.Ln(i,r.WR.Hold)&&this.Rn(t);const e=this.Dn(t);this.an=e.eventX,this.hn=e.eventY,this.jn(t,i,r.HT.InteractionStart),this.ln=!0},this.In=t=>{t.stopPropagation();const i=this.Bn(t),e=this.Dn(t);if(this.ln&&(Math.abs(e.deltaXFromStart)>this.sn||Math.abs(e.deltaYFromStart)>this.sn)&&(this.ln=!1),this.dn||this.Ln(i,r.WR.Swipe)){if(null===this.bn&&this.Vn(i,e),this.bn===r.qs.Y)return;null===this.xn&&(this.xn=(0,o.PM)(this.Ks,(()=>{this.xn=null,this.Fn(e.deltaXFromStart),i.mediator.publish(i.context,n.Z[n.Z.SwipeMove],{payload:e.deltaXFromStart})})))}},this.kn=t=>{const i=this.Bn(t);if(this.Sn=!1,this.wn===i){const e=this.Dn(t);t.cancelable&&this.Ln(i,r.WR.Hold)&&Math.abs(e.deltaXFromStart)<this.sn&&Math.abs(e.deltaYFromStart)<this.sn&&t.preventDefault(),this.$n(t,i,e);this.Un(e)===r.qs.Y&&Math.abs(e.deltaYFromStart)>=this.sn?this._n&&i.mediator.publish(i.context,n.Z[n.Z.Scroll]):!this.ln||this.mn||this.pn||(this.Sn=!0)}this.wn=null},this.Cn=t=>{const i=this.Bn(t);this.$n(t,i),this.wn=null},this.Mn=t=>{if(!c(t))return void this.Hn(r.HT.InteractionStart,t);const i=this.Bn(t);this.wn=i,t.stopPropagation(),t.preventDefault(),this.Ln(i,r.WR.Hold)&&this.Rn(t),this.jn(t,i,r.HT.InteractionStart)},this.Tn=t=>{const i=this.Bn(t);return this.Sn?(i.mediator.publish(i.context,n.Z[n.Z.Click]),void(this.Sn=!1)):c(t)&&this.wn?(t.stopPropagation(),t.preventDefault(),this.jn(t,this.wn,r.HT.Interaction),this.jn(t,this.wn,r.HT.InteractionEnd),(this.dn||this.Ln(i,r.WR.Hold))&&this.qn(t),this.wn===i&&(this.jn(t,i,r.HT.Click),i.mediator.publish(i.context,n.Z[n.Z.Click])),void(this.wn=null)):(this.Hn(r.HT.Interaction,t),void this.Hn(r.HT.InteractionEnd,t))},this.zn=t=>{if(!c(t))return this.Hn(r.HT.Interaction,t),void this.Hn(r.HT.InteractionEnd,t);this.wn=null},this.Wn=t=>{if(!c(t)||!this.wn)return this.Hn(r.HT.Interaction,t),void this.Hn(r.HT.InteractionEnd,t);this.jn(t,this.wn,r.HT.Interaction),this.jn(t,this.wn,r.HT.InteractionEnd),(this.dn||this.Ln(this.wn,r.WR.Hold))&&this.qn(t),this.wn=null};const{leftTapSizeThreshold:s,holdTriggerDuration:h,scrollThreshold:a}=Object.assign({},e);this.tn=s||this.tn,this.en=h||this.en,this.sn=a||this.sn,this.Ks.document.addEventListener("mousedown",this.zn),this.Ks.document.addEventListener("mouseup",this.Wn)}register(t,i,e,s={},n=[]){const r={element:t,mediator:i,context:e,callbacks:s||{},allowedSpecialInteractions:n,disabledSpecialInteractions:[]};this.nn.push(r),this.An(r)}unregister(t){const i=this.nn.find((i=>i.element===t));i&&(this.nn=this.nn.filter((i=>i.element!==t)),this.En(i))}unregisterAll(t){const i=this.nn.filter((i=>i.mediator===t));i.forEach(this.En),this.nn=(0,h.V7)(this.nn,i)}addGlobalActions(t,i){Object.keys(Object.assign({},i)).forEach((e=>{this.rn[e]=this.rn[e]||[],this.rn[e].push({initiator:t,action:i[e]})}))}removeGlobalActions(t){Object.keys(this.rn).forEach((i=>{this.rn[i].some((i=>i.initiator===t))&&(this.rn[i]=this.rn[i].filter((i=>i.initiator!==t)))}))}disableSpecialInteractions(t){const i=this.Gn(t);i&&(i.disabledSpecialInteractions=(0,h.gX)(i.allowedSpecialInteractions))}enableSpecialInteractions(t){const i=this.Gn(t);i&&(i.disabledSpecialInteractions=[])}getNonInterruptibleInteractions(){return[n.Z.HoldStart,n.Z.HoldEnd,n.Z.SwipeMove,n.Z.SwipeEnd,n.Z.Scroll]}disableScrollEvent(){this._n=!1}enableScrollEvent(){this._n=!0}destroy(){clearTimeout(this.un),this.nn.forEach(this.En),this.Ks.document.removeEventListener("mousedown",this.zn),this.Ks.document.removeEventListener("mouseup",this.Wn)}Jn(t){const i=this.Bn(t),e=i.element.getBoundingClientRect(),s=this.Qn(t),n=e.width,r=(0,l.dQ)(0,n,0,100,s);this.Yn(i,this.tn,r)}Yn(t,i,e){e<i?t.mediator.publish(t.context,n.Z[n.Z.TapLeft]):t.mediator.publish(t.context,n.Z[n.Z.TapRight])}Rn(t){clearTimeout(this.un),this.dn=!1,this.mn=!1;const i=this.Bn(t);(0,o.cn)(i.element,s.Gj.OnHold),this.un=setTimeout((()=>{this.dn=!0,this.ln&&(this.mn=!0,i.mediator.publish(i.context,n.Z[n.Z.HoldStart]))}),this.en)}qn(t){clearTimeout(this.un);const i=this.Bn(t);(0,o.IV)(i.element,s.Gj.OnHold),this.dn?(this.dn=!1,this.mn&&(this.mn=!1,i.mediator.publish(i.context,n.Z[n.Z.HoldEnd]))):(this.pn=!0,this.Jn(t))}$n(t,i,e){e=e||this.Dn(t),t.stopPropagation(),this.jn(t,i,r.HT.Interaction),this.jn(t,i,r.HT.InteractionEnd),(this.dn||this.gn||this.ln&&this.Ln(i,r.WR.Hold))&&this.qn(t),(this.gn||this.Ln(i,r.WR.Swipe))&&this.Xn(i,e)}Vn(t,i){this.bn=this.Un(i),this.bn===r.qs.X&&(this.gn=!0,this.dn||(clearTimeout(this.un),this.un=null,this.dn=!0,t.mediator.publish(t.context,n.Z[n.Z.HoldStart])))}Xn(t,i){if(this.gn){const e=this.Zn(i);t.mediator.publish(t.context,n.Z[n.Z.SwipeEnd],{payload:e})}(0,o.h_)(this.Ks,this.xn),this.xn=null,this.gn=!1,this.an=null,this.hn=null,this.bn=null,this.vn=0,this.yn=0}Fn(t){this.yn<this.sn?this.yn++:(this.vn=t,this.yn=0)}Un(t){return Math.abs(t.deltaXFromStart)>=Math.abs(t.deltaYFromStart)?r.qs.X:r.qs.Y}Zn(t){return t.deltaXFromStart-this.vn<0?r.Av.Left:r.Av.Right}Dn(t){const i=t.changedTouches[0];return{deltaXFromStart:i.clientX-this.an,deltaYFromStart:i.clientY-this.hn,eventX:i.clientX,eventY:i.clientY}}Bn(t){return this.wn||this.Gn(t.currentTarget)}Gn(t){return this.nn.find((i=>i.element===t))}Qn(t){const i=this.Bn(t);if(this.Jt){return t.changedTouches[0].clientX-i.element.getBoundingClientRect().left}return t.offsetX}Ln(t,i){return t.allowedSpecialInteractions.includes(i)&&!t.disabledSpecialInteractions.includes(i)}jn(t,i,e){const s=i.callbacks[e];(0,u.mf)(s)&&s(t),this.Hn(e,t)}Hn(t,i){var e;null===(e=this.rn[t])||void 0===e||e.forEach((t=>{t.action(i)}))}}},6438:(t,i,e)=>{"use strict";e.d(i,{c:()=>u});var s,n,r=e(289),h=e(8423),o=e(1561),a=e(2157),c=e(7427),l=e(7726);!function(t){function i(t,i,n,r){const h=t[i];if(!(0,c.QM)(h))return;if(!e(h,r))return;const o=s(h,r);n.has(o)?t[i]=n.get(o):delete t[i]}function e(t,i){return 0===t.indexOf(i[0])&&t.indexOf(i[1],i[1].length)===t.length-i[0].length}function s(t,i){return t.substring(t.indexOf(i[0])+1,t.lastIndexOf(i[1]))}t.searchAndReplaceMacrosInJson=function t(e,s,n){const r=Object.keys(e),h=r.filter((t=>!(0,c.as)(e[t]))),o=r.filter((t=>(0,c.as)(e[t])));return h.forEach((t=>{i(e,t,s,n)})),o.forEach((i=>{t(e[i],s,n)})),e},t.replaceMacrosOnCurrentLevelIfNeeded=i,t.isMacroString=e,t.extractMacroPlaceholder=s}(s||(s={})),function(t){t.AppUrl="APP_URL",t.AppBundle="APP_BUNDLE",t.AppName="APP_NAME",t.Uuid="UUID",t.PageUrl="PAGE_URL",t.AdPosition="AD_POSITION",t.VideoTitle="VIDEO_TITLE",t.MediaTitle="MEDIA_TITLE",t.VideoDuration="VIDEO_DURATION",t.ContentLength="CONTENT_LENGTH",t.VideoDescription="VIDEO_DESCRIPTION",t.VideoUrl="VIDEO_URL",t.VideoId="VIDEO_ID",t.VideoTime="VIDEO_TIME",t.DescriptionUrl="DESCRIPTION_URL",t.VideoKeywords="VIDEO_KEYWORDS",t.Autoplay="AUTOPLAY",t.UserAgent="UA",t.Ip="IP",t.CashBuster="CB",t.Width="WIDTH",t.Height="HEIGHT",t.Domain="DOMAIN",t.SourceReferrer="SOURCE_REFERRER",t.Gdpr="GDPR",t.GdprConsent="GDPR_CONSENT",t.Consent="CONSENT",t.Ctd="CTD",t.Publisher="PUBLISHER",t.Random="RAND",t.Site="SITE",t.SubId="SUB_ID",t.Url="URL",t.UserLat="USER_LAT",t.UserLong="USER_LONG",t.UsPrivacyString="US_PRIVACY",t.Npa="NPA",t.DoNotTrack="DNT",t.FraudSensorUserId="FS_USER_ID",t.PublisherId="PUBLISHER_ID",t.SessionId="SESSION_ID",t.FraudSensorDeviceType="FS_DEVICE_TYPE",t.FraudSensorLookupId="MGID",t.FraudSensorLookupResponseCode="MGTO",t.FraudSensorMediaType="FS_MEDIA_TYPE",t.FraudSensorDeviceIdentifier="FS_DEVICE_IDENT",t.CnxSupplierId="CNX_SUPPLIER_ID",t.AdxPublisherNetworkCode="ADX_CPNC"}(n||(n={}));class u{constructor(t,i,e,s,h,o,l){this.Kn=new Map,this.tr="[",this.ir="]",this.Kn.set(n.Autoplay,t.playbackMode===r.ProtoPlayerPlaybackModeEnum.Autoplay),this.Kn.set(n.UserAgent,navigator.userAgent),this.Kn.set(n.UserLong,i.lon),this.Kn.set(n.UserLat,i.lat),this.Kn.set(n.Ip,i.ip),this.sr(h),this.nr(o),this.rr(e),this.hr(),this.Kn.set(n.Domain,s),this.Kn.set(n.CnxSupplierId,a.kd),this.Kn.set(n.SessionId,t.sessionId),(0,c.QM)(l)&&this.Kn.set(n.AdxPublisherNetworkCode,`,${l}`)}sr(t){this.Kn.set(n.AppBundle,t.bundleID),this.Kn.set(n.AppName,t.appName),this.Kn.set(n.AppUrl,t.storeURL)}nr(t){this.Kn.set(n.SourceReferrer,t)}hr(){const t=(0,o.w6)()?1:0;this.Kn.set(n.DoNotTrack,t)}rr(t){this.Kn.set(n.PageUrl,t),this.Kn.set(n.Url,t),this.Kn.set(n.Publisher,t),this.Kn.set(n.Site,t),this.Kn.set(n.DescriptionUrl,t)}ar(){const t=(0,h.qs)();this.Kn.set(n.CashBuster,t),this.Kn.set(n.Random,t),this.Kn.set(n.Ctd,t)}cr(t){return t.split("?")[0]}lr(t){return t.split("?").slice(1).join("?")}ur(t,i){const e=this.cr(t),s=this.dr(this.lr(t),i);return`${e}${s?`?${s}`:""}`}dr(t,i,e=!1){let n=t;const r=n.split("&"),h=[this.tr,this.ir];try{r.forEach((t=>{const r=t.split("=");if(r[1])if(s.isMacroString(r[1],h))n=n.replace(r[1],this.pr(r[1].toLowerCase(),i,e));else if(decodeURIComponent(r[1]).split("=").length>1){const t=this.dr(decodeURIComponent(r[1]),i,!0);n=n.replace(r[1],encodeURIComponent(t))}}))}catch(i){throw(0,l.n)({message:"MacrosService_handleMacros",exception:i.message,callStack:t,level:l.D.CRITICAL},{throttle:1}),i}return n=this.gr(n,i),this.vr(n)}vr(t){return t.includes(this.tr)&&(t=t.cnx_replaceAll(this.tr,encodeURIComponent(this.tr))),t.includes(this.ir)&&(t=t.cnx_replaceAll(this.ir,encodeURIComponent(this.ir))),t}pr(t,i,e){let s,n=t;return i.forEach(((t,i)=>{for(;n.includes(this.tr+i.toLowerCase()+this.ir);)s=e?t:encodeURIComponent(t),n=n.replace(this.tr+i.toLowerCase()+this.ir,s)})),n}gr(t,i){const e=`${this.tr}${n.AdxPublisherNetworkCode}${this.ir}`;return t.includes(e)?i.has(n.AdxPublisherNetworkCode)?t.cnx_replaceAll(e,i.get(n.AdxPublisherNetworkCode)):t.cnx_replaceAll(e,""):t}setAdWidth(t){this.Kn.set(n.Width,Math.floor(t))}setAdHeight(t){this.Kn.set(n.Height,Math.floor(t))}setSubId(t){this.Kn.set(n.SubId,t)}setGDPR(t){this.Kn.set(n.Gdpr,t)}setUUID(t){this.Kn.set(n.Uuid,t)}setGDPRConsent(t){this.Kn.set(n.GdprConsent,t)}setConsent(t){this.Kn.set(n.Consent,t)}setVideoId(t){this.Kn.set(n.VideoId,t)}setNPA(t){this.Kn.set(n.Npa,t)}setVideoTime(t){this.Kn.set(n.VideoTime,Math.floor(t))}setVideoUrl(t){this.Kn.set(n.VideoUrl,t)}setVideoDescription(t){this.Kn.set(n.VideoDescription,t)}setVideoDuration(t){this.Kn.set(n.VideoDuration,t),this.Kn.set(n.ContentLength,t)}setVideoTitle(t){let i;this.Kn.set(n.VideoTitle,t),this.Kn.set(n.MediaTitle,t),t&&(i=t.split(" ").join(",")),this.Kn.set(n.VideoKeywords,i)}setAdPosition(t="midRoll"){this.Kn.set(n.AdPosition,t)}setupMacros(t){return this.ar(),this.ur(t,this.Kn)}replaceMacrosInJsonString(t){const i=[this.tr,this.ir],e=JSON.parse(t),n=s.searchAndReplaceMacrosInJson(e,this.Kn,i);return JSON.stringify(n)}addExtraMacros(t){const i=Object.values(n);Object.keys(t).filter((t=>!i.includes(t.toUpperCase()))).forEach((i=>{this.Kn.set(i,t[i])}))}getExtraMacros(){const t=Object.values(n),i={};return this.Kn.forEach(((e,s)=>{t.includes(s)||null==e||(i[s]=(0,c.QM)(e)?e:JSON.stringify(e))})),i}setUsPrivacyString(t){const i=t||"";this.Kn.set(n.UsPrivacyString,i)}setUserId(t){this.Kn.set(n.FraudSensorUserId,t)}setPublisherId(t){this.Kn.set(n.PublisherId,t)}setFraudSensorMacros(t){this.Kn.set(n.FraudSensorDeviceType,t.deviceType),this.Kn.set(n.FraudSensorLookupId,t.lookupId),this.Kn.set(n.FraudSensorLookupResponseCode,t.lookupResponseCode),this.Kn.set(n.FraudSensorMediaType,t.mediaType),this.Kn.set(n.FraudSensorDeviceIdentifier,t.deviceIdentifier)}destroy(){}}},2356:(t,i,e)=>{"use strict";var s,n;e.d(i,{v:()=>r}),function(t){t.hidden="hidden",t.msHidden="msHidden",t.webkitHidden="webkitHidden"}(s||(s={})),function(t){t.visibilitychange="visibilitychange",t.msvisibilitychange="msvisibilitychange",t.webkitvisibilitychange="webkitvisibilitychange"}(n||(n={}));class r{constructor(t){this.yr=t,this.wr=[],this._r(),this.Sr()}on(t){this.wr.push(t),t(this.isDocumentVisible())}off(t){this.wr=this.wr.filter((i=>i!==t))}_r(){void 0!==this.yr.getDocumentProperty(s.hidden)?(this.Ar=s.hidden,this.Pr=n.visibilitychange):void 0!==this.yr.getDocumentProperty(s.msHidden)?(this.Ar=s.msHidden,this.Pr=n.msvisibilitychange):void 0!==this.yr.getDocumentProperty(s.webkitHidden)&&(this.Ar=s.webkitHidden,this.Pr=n.webkitvisibilitychange)}Sr(){this.yr.addEventListenerOnGlobal(this.Pr,(()=>{this.wr.forEach((t=>{t(this.isDocumentVisible())}))}),!0,!1)}isDocumentVisible(){return!this.yr.getDocumentProperty(this.Ar)}}},7398:(t,i,e)=>{"use strict";e.d(i,{a:()=>z});var s,n=e(7726),r=e(1561),h=[],o="ResizeObserver loop completed with undelivered notifications.";!function(t){t.BORDER_BOX="border-box",t.CONTENT_BOX="content-box",t.DEVICE_PIXEL_CONTENT_BOX="device-pixel-content-box"}(s||(s={}));var a,c=function(t){return Object.freeze(t)},l=function(t,i){this.inlineSize=t,this.blockSize=i,c(this)},u=function(){function t(t,i,e,s){return this.x=t,this.y=i,this.width=e,this.height=s,this.top=this.y,this.left=this.x,this.bottom=this.top+this.height,this.right=this.left+this.width,c(this)}return t.prototype.toJSON=function(){var t=this;return{x:t.x,y:t.y,top:t.top,right:t.right,bottom:t.bottom,left:t.left,width:t.width,height:t.height}},t.fromRect=function(i){return new t(i.x,i.y,i.width,i.height)},t}(),d=function(t){return t instanceof SVGElement&&"getBBox"in t},p=function(t){if(d(t)){var i=t.getBBox(),e=i.width,s=i.height;return!e&&!s}var n=t,r=n.offsetWidth,h=n.offsetHeight;return!(r||h||t.getClientRects().length)},f=function(t){var i,e;if(t instanceof Element)return!0;var s=null===(e=null===(i=t)||void 0===i?void 0:i.ownerDocument)||void 0===e?void 0:e.defaultView;return!!(s&&t instanceof s.Element)},m="undefined"!=typeof window?window:{},g=new WeakMap,v=/auto|scroll/,y=/^tb|vertical/,b=/msie|trident/i.test(m.navigator&&m.navigator.userAgent),x=function(t){return parseFloat(t||"0")},w=function(t,i,e){return void 0===t&&(t=0),void 0===i&&(i=0),void 0===e&&(e=!1),new l((e?i:t)||0,(e?t:i)||0)},_=c({devicePixelContentBoxSize:w(),borderBoxSize:w(),contentBoxSize:w(),contentRect:new u(0,0,0,0)}),S=function(t,i){if(void 0===i&&(i=!1),g.has(t)&&!i)return g.get(t);if(p(t))return g.set(t,_),_;var e=getComputedStyle(t),s=d(t)&&t.ownerSVGElement&&t.getBBox(),n=!b&&"border-box"===e.boxSizing,r=y.test(e.writingMode||""),h=!s&&v.test(e.overflowY||""),o=!s&&v.test(e.overflowX||""),a=s?0:x(e.paddingTop),l=s?0:x(e.paddingRight),f=s?0:x(e.paddingBottom),m=s?0:x(e.paddingLeft),S=s?0:x(e.borderTopWidth),A=s?0:x(e.borderRightWidth),P=s?0:x(e.borderBottomWidth),I=m+l,k=a+f,C=(s?0:x(e.borderLeftWidth))+A,T=S+P,M=o?t.offsetHeight-T-t.clientHeight:0,E=h?t.offsetWidth-C-t.clientWidth:0,B=n?I+C:0,O=n?k+T:0,L=s?s.width:x(e.width)-B-E,R=s?s.height:x(e.height)-O-M,D=L+I+E+C,j=R+k+M+T,V=c({devicePixelContentBoxSize:w(Math.round(L*devicePixelRatio),Math.round(R*devicePixelRatio),r),borderBoxSize:w(D,j,r),contentBoxSize:w(L,R,r),contentRect:new u(m,a,L,R)});return g.set(t,V),V},A=function(t,i,e){var n=S(t,e),r=n.borderBoxSize,h=n.contentBoxSize,o=n.devicePixelContentBoxSize;switch(i){case s.DEVICE_PIXEL_CONTENT_BOX:return o;case s.BORDER_BOX:return r;default:return h}},P=function(t){var i=S(t);this.target=t,this.contentRect=i.contentRect,this.borderBoxSize=c([i.borderBoxSize]),this.contentBoxSize=c([i.contentBoxSize]),this.devicePixelContentBoxSize=c([i.devicePixelContentBoxSize])},I=function(t){if(p(t))return 1/0;for(var i=0,e=t.parentNode;e;)i+=1,e=e.parentNode;return i},k=function(){var t=1/0,i=[];h.forEach((function(e){if(0!==e.activeTargets.length){var s=[];e.activeTargets.forEach((function(i){var e=new P(i.target),n=I(i.target);s.push(e),i.lastReportedSize=A(i.target,i.observedBox),n<t&&(t=n)})),i.push((function(){e.callback.call(e.observer,s,e.observer)})),e.activeTargets.splice(0,e.activeTargets.length)}}));for(var e=0,s=i;e<s.length;e++){(0,s[e])()}return t},C=function(t){h.forEach((function(i){i.activeTargets.splice(0,i.activeTargets.length),i.skippedTargets.splice(0,i.skippedTargets.length),i.observationTargets.forEach((function(e){e.isActive()&&(I(e.target)>t?i.activeTargets.push(e):i.skippedTargets.push(e))}))}))},T=function(){var t,i=0;for(C(i);h.some((function(t){return t.activeTargets.length>0}));)i=k(),C(i);return h.some((function(t){return t.skippedTargets.length>0}))&&("function"==typeof ErrorEvent?t=new ErrorEvent("error",{message:o}):((t=document.createEvent("Event")).initEvent("error",!1,!1),t.message=o),window.dispatchEvent(t)),i>0},M=[],E=function(t){if(!a){var i=0,e=document.createTextNode("");new MutationObserver((function(){return M.splice(0).forEach((function(t){return t()}))})).observe(e,{characterData:!0}),a=function(){e.textContent=""+(i?i--:i++)}}M.push(t),a()},B=0,O={attributes:!0,characterData:!0,childList:!0,subtree:!0},L=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],R=function(t){return void 0===t&&(t=0),Date.now()+t},D=!1,j=new(function(){function t(){var t=this;this.stopped=!0,this.listener=function(){return t.schedule()}}return t.prototype.run=function(t){var i=this;if(void 0===t&&(t=250),!D){D=!0;var e,s=R(t);e=function(){var e=!1;try{e=T()}finally{if(D=!1,t=s-R(),!B)return;e?i.run(1e3):t>0?i.run(t):i.start()}},E((function(){requestAnimationFrame(e)}))}},t.prototype.schedule=function(){this.stop(),this.run()},t.prototype.observe=function(){var t=this,i=function(){return t.observer&&t.observer.observe(document.body,O)};document.body?i():m.addEventListener("DOMContentLoaded",i)},t.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),L.forEach((function(i){return m.addEventListener(i,t.listener,!0)})))},t.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),L.forEach((function(i){return m.removeEventListener(i,t.listener,!0)})),this.stopped=!0)},t}()),V=function(t){!B&&t>0&&j.start(),!(B+=t)&&j.stop()},F=function(){function t(t,i){this.target=t,this.observedBox=i||s.CONTENT_BOX,this.lastReportedSize={inlineSize:0,blockSize:0}}return t.prototype.isActive=function(){var t,i=A(this.target,this.observedBox,!0);return t=this.target,d(t)||function(t){switch(t.tagName){case"INPUT":if("image"!==t.type)break;case"VIDEO":case"AUDIO":case"EMBED":case"OBJECT":case"CANVAS":case"IFRAME":case"IMG":return!0}return!1}(t)||"inline"!==getComputedStyle(t).display||(this.lastReportedSize=i),this.lastReportedSize.inlineSize!==i.inlineSize||this.lastReportedSize.blockSize!==i.blockSize},t}(),$=function(t,i){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=i},N=new WeakMap,U=function(t,i){for(var e=0;e<t.length;e+=1)if(t[e].target===i)return e;return-1},H=function(){function t(){}return t.connect=function(t,i){var e=new $(t,i);N.set(t,e)},t.observe=function(t,i,e){var s=N.get(t),n=0===s.observationTargets.length;U(s.observationTargets,i)<0&&(n&&h.push(s),s.observationTargets.push(new F(i,e&&e.box)),V(1),j.schedule())},t.unobserve=function(t,i){var e=N.get(t),s=U(e.observationTargets,i),n=1===e.observationTargets.length;s>=0&&(n&&h.splice(h.indexOf(e),1),e.observationTargets.splice(s,1),V(-1))},t.disconnect=function(t){var i=this,e=N.get(t);e.observationTargets.slice().forEach((function(e){return i.unobserve(t,e.target)})),e.activeTargets.splice(0,e.activeTargets.length)},t}(),q=function(){function t(t){if(0===arguments.length)throw new TypeError("Failed to construct 'ResizeObserver': 1 argument required, but only 0 present.");if("function"!=typeof t)throw new TypeError("Failed to construct 'ResizeObserver': The callback provided as parameter 1 is not a function.");H.connect(this,t)}return t.prototype.observe=function(t,i){if(0===arguments.length)throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!f(t))throw new TypeError("Failed to execute 'observe' on 'ResizeObserver': parameter 1 is not of type 'Element");H.observe(this,t,i)},t.prototype.unobserve=function(t){if(0===arguments.length)throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': 1 argument required, but only 0 present.");if(!f(t))throw new TypeError("Failed to execute 'unobserve' on 'ResizeObserver': parameter 1 is not of type 'Element");H.unobserve(this,t)},t.prototype.disconnect=function(){H.disconnect(this)},t.toString=function(){return"function ResizeObserver () { [polyfill code] }"},t}();class z{constructor(t){this.Ir=[],this.kr=(t,i)=>{t.forEach((t=>{this.Cr(t.target).forEach((t=>{t&&((0,r.Tp)(t.element),t.callback(t.element))}))}))};try{const i=t.ResizeObserver||q;this.Tr=new i(this.kr)}catch(t){(0,n.n)({message:"ResizeObserver_constructor",callStack:t.stack,exception:t.message,level:n.D.CRITICAL})}}on(t,i){this.Mr(t,i)||(this.Ir.push({element:t,callback:i}),this.Tr.observe(t))}off(t,i){const e=this.Mr(t,i);if(!e)return;this.Tr.unobserve(e.element);const s=this.Ir.indexOf(e);s>=0&&this.Ir.splice(s,1)}destroy(){if(this.Ir)for(;this.Ir.length>0;)this.Ir.pop();this.Tr.disconnect()}Cr(t){return this.Ir.filter((i=>i.element===t))}Mr(t,i){return this.Ir.find((e=>e.element===t&&e.callback===i))}}},3352:(t,i,e)=>{"use strict";e.d(i,{G:()=>s});class s{setNewMedia(){}updateMediaMetadata(){}setMediaStart(){}setContentStart(){}setSessionPlayback(){}setSessionViewability(){}trackSessionRendered(){}trackSessionViewability(){}trackMediaQuartile(){}trackMediaClick(){}setAdStart(){}startBidTrackingInterval(){}addPrebid(){}addPostBid(){}addBid(){}trackAuctionInfoForBid(){}trackVideoAdImpression(){}trackVideoAdImpressionViewable(){}trackVideoAdQuartile(){}trackAdClick(){}trackAdOpportunity(){}trackSessionAdBlocker(){}getMetadataModel(){}getPlayerSize(){return{playerWidth:0,playerHeight:0}}updateMetadataModel(){}updatePlayerDimensions(t,i){}setIsConsentPayload(){}destroy(){}publish(){}setImplementationTypeOnMeta(){}trackHeavyAdIntervention(){}}},9446:(t,i,e)=>{"use strict";e.d(i,{e:()=>b});var s=e(158),n=e(289),r=e(45),h=e(525),o=e(5880),a=e(7427),c=e(1730),l=e(7577),u=e(8423),d=e(3030),p=e(497),f=(e(7417),e(6716)),m=e(4974),g=e(1886),v=e(9115);class y{constructor(){this.Er=null,this.Br=0}Or(){if(null===this.Er)return;const t=(new Date).getTime();this.Br=t-this.Er}startCountingTime(){this.Er=(new Date).getTime()}stopCountingTime(){this.Or(),this.Er=null}fetchTime(t){this.Or();const i=Math.round(this.Br/v.s_);return this.Br=0,null!==this.Er&&this.startCountingTime(),i>t?t:i}}class b extends o._{constructor({userId:t,playerId:i,geoLocation:e,browser:s,sessionId:n,pageUrl:h,bundleId:o,Lr:a,userManagerService:l,customParam1:p,customParam2:m,customParam3:g,customParam4:v,customParam5:b,abTestId:x,explorationMode:w,bundleAbId:_,bundlePart:S}){super(),this.hasGdprConsentPayload=!1,this.Rr={},this.Dr={},this.jr=!1,this.Vr=!1,this.Fr=!1,this.$r=!1,this.Nr=[],this.Ur=[],this.Hr=[],this.qr=5e3,this.zr=!1,this.Wr=[{delay:7,timesRepeatDelay:1},{delay:8,timesRepeatDelay:1},{delay:15,timesRepeatDelay:3},{delay:30,timesRepeatDelay:2},{delay:60,timesRepeatDelay:1},{delay:120,timesRepeatDelay:1},{delay:300,timesRepeatDelay:8},{delay:600,timesRepeatDelay:13},{delay:1800}],this.Gr=0,this.Jr=0,this.Qr=0,this.Yr=new f.x,this.Xr=new f.x,this.Kr=new f.x;(0,d.d3)(i,[])?this.Rr.trackAllRequests=!0:this.Rr.trackAllRequests=1===(0,u.Vm)([99,1]),this.th=l,this.Rr.userId=t,this.Rr.playerId=i,this.Rr.geo=e,this.Rr.browser=s,this.Rr.version=r.g.version,this.Rr.sessionId=n,this.Rr.clientAb0=c.e.clientAb0,this.Rr.clientAb1=c.e.clientAb1,this.Rr.serverAb0=c.e.serverAb0,this.Rr.serverAb1=c.e.serverAb1,this.Rr.pageUrl=h,this.Rr.bundleId=o,this.Rr.customParam1=p,this.Rr.customParam2=m,this.Rr.customParam3=g,this.Rr.customParam4=v,this.Rr.customParam5=b,this.Rr.bundleAbId=_,this.Rr.bundlePart=S,this.Rr.abTestId=x,this.ih=new y,this.eh=new y,this.sh=w}nh(t,i=n.ProtoTrackingRequest,e,r=!0){return this.Rr.pageInFocus=p.S.pageFocus,s.n.sendProtoBeaconRequest({endpoint:t,ProtoRequest:i,requestData:Object.assign({trackingRequestMeta:r?this.Rr:void 0},e),logError:!1})}rh(t,i=n.ProtoTrackingRequest,e){this.Rr.pageInFocus=p.S.pageFocus;const h=s.n.sendProtoRequest({endpoint:t,ProtoRequest:i,ProtoResponse:n.ProtoTrackingResponse,requestData:Object.assign({trackingRequestMeta:this.Rr},e),queryParams:Object.assign({[l.Fk]:r.g.version},g.f.getCidKeyValueObject()),withCredentials:!0,logError:!0});return h.then((t=>{var i;const s=t.platformCappedLineItemIdList;(0,d.BZ)(s)&&this.Yr.next(s);const{impressionRevenue:n,adServerLineItemName:r}=t;if((0,a.r)(n)&&(0,a.QM)(r)&&this.Xr.next({impressionRevenue:n,adServerLineItemName:r}),(0,a.$K)(t.viewability)){const s=null===(i=e)||void 0===i?void 0:i.advertiserLineItemId;this.Kr.next([s,t.viewability])}})).catch((t=>{})),h}hh(t,i,e=n.ProtoMediaTrackingRequest){const s=Object.assign({},i);(0,a.QM)(this.Dr.mediaId)&&(s.mediaGuid=this.Dr.mediaId),this.rh(t,e,s)}oh(){var t;this.zr||(this.zr=!0,this.rh(h.n.endPoints.tracking.playerStart,n.ProtoPlayerStartRequest,{pageInsightIndexes:null===(t=m.k.pageInsights)||void 0===t?void 0:t.insights}))}ah(t,i,e=n.ProtoMediaTrackingRequest){var s;return this.rh(t,e,Object.assign({mediaGuid:this.Dr.mediaId,insightIndexes:this.Dr.insights,sentimentAnalysis:this.Dr.sentimentAnalysis,pageInsightIndexes:null===(s=m.k.pageInsights)||void 0===s?void 0:s.insights},i))}lh(t){this.hh(h.n.endPoints.tracking.media_quartile,{baseMeta:this.Dr,mediaId:this.Dr.mediaId,insightIndexes:this.Dr.insights,sentimentAnalysis:this.Dr.sentimentAnalysis,quartile:t})}dh(){this.ph(this.Ur,this.Nr,this.Hr),this.Ur=[],this.Nr=[],this.Hr=[]}ph(t,i,e){if(0===t.length&&0===i.length&&0===e.length)return;e.forEach((t=>{t.error&&t.error.length>0&&(t.error=t.error.substring(0,500))}));const s={mediaGuid:this.Dr.mediaId,prebids:t,bids:i,postBids:e,logEveryting:this.Rr.trackAllRequests,hasGdprConsentPayload:this.hasGdprConsentPayload,gdprConsentMode:this.th.gdprConsentMode,useExploration:this.sh};this.rh(h.n.endPoints.tracking.bids,n.ProtoBidTrackingsRequest,s)}fh(t){var i;this.rh(h.n.endPoints.tracking.ad_click,n.ProtoAdClickTrackingRequest,Object.assign({mediaGuid:this.Dr.mediaId,insightIndexes:this.Dr.insights,sentimentAnalysis:this.Dr.sentimentAnalysis,pageInsightIndexes:null===(i=m.k.pageInsights)||void 0===i?void 0:i.insights},t))}mh(t){this.nh(h.n.endPoints.tracking.heavy_ad_intervention,n.ProtoHeavyAdTrackingRequest,t)}gh(){const t=this.Wr[this.Gr];clearTimeout(this.yh),this.yh=setTimeout((()=>{this.bh(t.delay),(0,a.r)(t.timesRepeatDelay)&&t.timesRepeatDelay--,0===t.timesRepeatDelay&&this.Gr++,this.gh()}),1e3*t.delay)}bh(t){var i;this.rh(h.n.endPoints.tracking.session_time,n.ProtoSessionTimeTrackingRequest,{trackingRequestMeta:this.Rr,sessionTime:t,timePlayed:this.ih.fetchTime(t),timePlayedInView:this.eh.fetchTime(t),pageInsightIndexes:null===(i=m.k.pageInsights)||void 0===i?void 0:i.insights})}xh(t){return t.playerWidth=this.Jr,t.playerHeight=this.Qr,t}get onLineItemPlatformCapped(){return this.Yr.asObservable()}get onLineItemViewabilityChange(){return this.Kr.asObservable()}get onImpressionRevenue(){return this.Xr.asObservable()}setNewMedia(t){this.Dr=t}updateMediaMetadata(t){this.Dr=t}setImplementationTypeOnMeta(t){this.Rr.implementationType=t}setMediaStart(){this.lh(n.ProtoQuartilesEnum.Start)}setContentStart(){this.oh()}setSessionPlayback(t){this.Fr!==t&&(this.Fr=t,this.$r&&this.Fr&&this.eh.startCountingTime(),this.Fr?this.ih.startCountingTime():(this.ih.stopCountingTime(),this.eh.stopCountingTime()))}setSessionViewability(t){this.$r!==t&&(this.$r=t,this.$r&&this.Fr?this.eh.startCountingTime():this.$r||this.eh.stopCountingTime())}trackSessionRendered(t){var i;if(this.jr)return;this.rh(h.n.endPoints.tracking.session_rendered,n.ProtoTrackingRequest,{playerHeight:this.Qr,playerWidth:this.Jr,hasAdBlocker:t,bundleName:"connatix.player.js",pageInsightIndexes:null===(i=m.k.pageInsights)||void 0===i?void 0:i.insights}),this.jr=!0,this.gh()}trackSessionViewability(){var t;!this.Vr&&this.zr&&(this.rh(h.n.endPoints.tracking.session_view,n.ProtoSessionViewRequest,{pageInsightIndexes:null===(t=m.k.pageInsights)||void 0===t?void 0:t.insights}),this.Vr=!0)}trackMediaQuartile(t){this.lh(t)}trackMediaClick(t=n.ProtoMediaClickTypeEnum.Click){const i={type:t,clickUrl:t===n.ProtoMediaClickTypeEnum.UrlClick?this.Dr.clickUrl:void 0,insightIndexes:this.Dr.insights,sentimentAnalysis:this.Dr.sentimentAnalysis,slideTitle:this.Dr.slideTitle,slideNumber:this.Dr.slideNumber,slideMediaType:this.Dr.slideMediaType};this.hh(h.n.endPoints.tracking.media_click,i,n.ProtoMediaClickTrackingRequest)}setAdStart(){this.oh()}startBidTrackingInterval(){this.wh=setInterval((()=>{this.dh()}),this.qr)}addPrebid(t){t=this.xh(t),this.Ur.push(t)}addPostBid(t){t=this.xh(t),(0,a.HD)(t.error)||(t.error=JSON.stringify(t.error)),this.Hr.push(t)}addBid(t){t=this.xh(t),this.Nr.push(t)}trackAuctionInfoForBid(t){this.rh(h.n.endPoints.tracking.auctionInformation,n.ProtoAuctionInfoRequest,t)}trackVideoAdImpression(t){return t=this.xh(t),this.ah(h.n.endPoints.tracking.ad_impression,t,n.ProtoVideoAdImpressionRequest)}trackVideoAdImpressionViewable(t){return this.ah(h.n.endPoints.tracking.ad_impression_viewable,t,n.ProtoVideoAdImpressionViewableRequest)}trackVideoAdQuartile(t){var i;t=Object.assign(Object.assign({},t),{insightIndexes:this.Dr.insights,sentimentAnalysis:this.Dr.sentimentAnalysis,pageInsightIndexes:null===(i=m.k.pageInsights)||void 0===i?void 0:i.insights}),this.hh(h.n.endPoints.tracking.ad_quartile,t,n.ProtoVideoAdQuartilesRequest)}trackAdClick(t){this.fh(t)}trackAdOpportunity(t){var i;const{sessionId:e}=this.Rr;t.sessionId=e,t.pageInsightIndexes=null===(i=m.k.pageInsights)||void 0===i?void 0:i.insights,this.rh(h.n.endPoints.tracking.adOpportunity,n.ProtoAdOpportunityRequest,t)}trackSessionAdBlocker(t){this.rh(h.n.endPoints.tracking.sessionAdBlocker,n.ProtoSessionAdBlockerRequest,{trackingRequestMeta:this.Rr,adBlockDetectionType:t})}getMetadataModel(){return this.Rr}getPlayerSize(){return{playerWidth:this.Jr,playerHeight:this.Qr}}updateMetadataModel(t){this.Rr=Object.assign(Object.assign({},this.Rr),t)}updatePlayerDimensions(t,i){this.Jr=t,this.Qr=i}trackHeavyAdIntervention(t){this.mh(t)}destroy(){clearInterval(this.yh),clearInterval(this.wh)}}},9207:(t,i,e)=>{"use strict";e.d(i,{f:()=>h});var s=e(3030),n=e(6615),r=e(7427);class h{constructor(){this._h={},this.Sh={domain:"",urlParams:[]},this.ignoredDomains=[]}setQueryParams(t){this._h=t}setUrlParams(t){this.Sh=t}appendParamsToUrl(t){return this.isIgnoredDomain(t)?t:this.Ah(t)}appendQueryParamsToUrl(t){return this.isIgnoredDomain(t)?t:this.kh(t,Object.keys(this._h).map((t=>({paramName:t,paramValue:this._h[t]}))))}Ah(t){if(!(0,s.BZ)(Object.keys(this.Sh))||!(0,s.BZ)(this.Sh.urlParams)||!t.includes(this.Sh.domain))return t;const i=this.Sh.urlParams.reduce(((t,i)=>`${t}${i}`),"");return t.replace(this.Sh.domain,this.Sh.domain+"/"+i)}kh(t,i){if(!(0,s.BZ)(i))return t;t+=(0,n.CK)(t);let e="";return i.forEach((t=>{(0,r.QM)(t.paramName)&&(0,r.QM)(t.paramValue)&&(e+=`${e.length>0?"&":""}${t.paramName}=${t.paramValue}`)})),t+e}isIgnoredDomain(t){return this.ignoredDomains.some((i=>t.indexOf(i)>-1))}}},7432:(t,i,e)=>{"use strict";var s;e.d(i,{Z:()=>n}),function(t){t[t.P1=1]="P1",t[t.P2=2]="P2",t[t.P3=3]="P3",t[t.P4=4]="P4",t[t.P5=5]="P5",t[t.P6=6]="P6",t[t.P7=7]="P7",t[t.P8=8]="P8",t[t.P9=9]="P9",t[t.P10=10]="P10"}(s||(s={}));const n=[s.P1,s.P2,s.P4,s.P7,s.P8]},7272:(t,i,e)=>{"use strict";e.d(i,{k:()=>X,x:()=>tt});var s,n=e(8423);!function(t){t.Connatix="143",t.AppNexus="32",t.DistrictM="144",t.IndexExchange="10",t.Lkqd="237",t.OneVideo="25",t.Openx="69",t.Pubmatic="76",t.RhythmOne="36",t.Rubicon="52",t.Spotx="165",t.Telaria="202",t.MediaNet="142",t.AdMan="149",t.IronSource="",t.Undertone="677",t.SynacorMedia="",t.AmxRTB="737",t.Smaato="82",t.TheMediaGrid="686",t.Rise="1043"}(s||(s={}));const r=["1YNY"];var h=e(158),o=e(289),a=e(525),c=e(7427),l=e(7577),u=e(45);class d{constructor(t){this.Ch=t,this.Th=!0,this.Mh="",this.Eh=!1,this.Bh=[]}static getInstance(t){const i=(0,n.pE)(t).topFrame;return i.cnx_usr_storage||(i.cnx_usr_storage=new d(i)),i.cnx_usr_storage}get userId(){if((0,c.QM)(this.Oh))return this.Oh.split("_")[0]}set userId(t){this.Oh=t}get isCcpaApplicable(){return this.Th}set isCcpaApplicable(t){this.Th=t}get usPrivacyString(){return this.Mh}set usPrivacyString(t){this.Mh=t}get consentPayload(){return this.Lh}set consentPayload(t){this.Lh||(this.Lh=t)}getScope(){return this.Ch}syncDemandPartner(t){if(this.userId){const i={userId:this.userId,demandPartner:parseInt(t.demandPartner,10),demandPartnerUserId:t.demandPartnerUserId};h.n.sendProtoRequest({ProtoRequest:o.ProtoUserSyncRequest,endpoint:a.n.endPoints.api.syncUrls,requestData:i,queryParams:{[l.Fk]:u.g.version},logError:!0}).then((t=>{})).catch((t=>{}))}}registerPlsCall(t){return this.Eh?(this.Bh.push(t),()=>{}):this.userId?(t(),()=>{}):(this.Eh=!0,t(),()=>{this.Eh=!1,this.Bh.forEach((t=>t())),this.Bh=[]})}}var p,f,m=e(2324),g=e(7726),v=e(3030);!function(t){t.USER_ID="cnx_userId"}(p||(p={}));class y{constructor(t,i){this.Rh=t,this.$e=i,this.Dh={[p.USER_ID]:30},this.jh=["Facebook App","Google App","Flipboard App","Instagram App","Pinterest App"],this.Vh=!1}Fh({name:t,value:i}){t===p.USER_ID&&(this.Rh.userId=this.$h(i))}Nh(t){let i="";const e=this.Dh[t.name];if(e){i=`; expires=${new Date((0,m.XF)(e)).toUTCString()}`}this.$e.document.cookie=`${t.name}=${t.value}${i}; path=/`}qh(t,i){if(!(0,v.BZ)(t))return;const e={cookieList:t,secureMode:i?o.ProtoCookieSecureModeEnum.Unsecure:o.ProtoCookieSecureModeEnum.Auto,browserInfo:this.zh};return h.n.sendProtoRequest({requestData:e,ProtoRequest:o.ProtoCookieSyncRequest,endpoint:a.n.endPoints.api.cookie,withCredentials:!0,queryParams:{[l.Fk]:u.g.version},logError:!1}).catch((t=>(0,g.n)({message:"UserCookieManager_setThirdPartyCookie",exception:t.message,callStack:t.callStack,level:g.D.CRITICAL})))}$h(t){return t.split("_")[0]}Wh(t){try{const i=t+"=",e=decodeURIComponent(this.$e.document.cookie).split(";");for(let t of e){for(;" "===t.charAt(0);)t=t.substring(1);if(t.includes(i))return this.$h(t.substring(i.length,t.length))}}catch(t){}return""}getUserId(){return this.Rh.userId}syncFirstPartyCookie(t){const i={name:t,value:"",timestamp:(0,m.XF)(this.Dh[t])};t===p.USER_ID&&(i.value=this.Rh.userId),(0,c.QM)(i.value)&&this.Nh(i)}syncThirdPartyCookieList(t){const i=[p.USER_ID],e=[];i.forEach((t=>{t===p.USER_ID&&(0,c.QM)(this.Rh.userId)&&e.push({name:p.USER_ID,value:this.Rh.userId,timestamp:(0,m.XF)(this.Dh[p.USER_ID])})})),this.qh(e,t)}setBrowserInfo(t,i){this.zh=t,this.Vh=this.jh.includes(t.browserType),this.Vh&&i&&this.syncThirdPartyCookieList(this.Vh)}setUserInformation(t){t&&this.Fh({name:p.USER_ID,value:t.userId})}fetchCookies(){[p.USER_ID].map((t=>({name:t,value:this.Wh(t)}))).filter((({value:t})=>(0,c.QM)(t))).forEach((t=>this.Fh(t)))}get unsecuredCookieSync(){return this.Vh}}!function(t){t[t.CmpApi=0]="CmpApi",t[t.TcfApi=1]="TcfApi"}(f||(f={}));const b={[f.CmpApi]:{windowPropertyName:"__cmp",framePropertyName:"__cmpLocator",getVendorConsentDataMethodName:"getVendorConsents",getConsentDataMethodName:"getConsentData"},[f.TcfApi]:{windowPropertyName:"__tcfapi",framePropertyName:"__tcfapiLocator",getVendorConsentDataMethodName:"getTCData",consentUpdateMethodName:"addEventListener",removeUpdateListenerMethodName:"removeEventListener"}};class x{constructor(t,i){this.Gh=t,this.Qh=i,this.apiType=f.CmpApi,this.Yh={},this.Lh=null,this.Zh=t=>new Promise(((i,e)=>{try{const e="string"==typeof t.data?JSON.parse(t.data):t.data;if("object"==typeof e&&e.Kh)if(e.Kh.callId===this.io){const t=e.Kh.returnValue&&e.Kh.returnValue.vendorConsents;this.eo(t).then((()=>i(this.io)))}else if(e.Kh.callId===this.so){const t=e.Kh.returnValue&&e.Kh.returnValue.consentData;this.no(t).then((()=>i(this.so)))}}catch(t){e()}}))}isApiOnPage(){return null!==this.Gh||null!==this.Qh}bindToApi(){return null!==this.Gh?new Promise(((t,i)=>{this.ro(this.Gh).then((()=>t())).catch((t=>i(t)))})):null!==this.Qh?this.ho(this.Qh):Promise.reject()}isConsentForVendor(t){return!!this.Yh[t]}getConsentPayload(){return this.Lh}setInAppConsentData(t){this.eo(t),this.no(t.consentString)}hasIvtConsent(){return this.isConsentForVendor(s.Connatix)}isConsentForPurposes(t){return!0}ho(t){this.so=(0,n.qs)(),this.io=(0,n.qs)();const i={};return new Promise((e=>{const s=t=>{this.Zh(t).then((t=>{i[t]=!0,i[this.so]&&i[this.io]&&(window.removeEventListener("message",s,!1),e())})).catch((t=>{}))};window.addEventListener("message",s,!1);const n=b[f.CmpApi].getVendorConsentDataMethodName,r=b[f.CmpApi].getConsentDataMethodName;t.postMessage({oo:{command:n,parameter:null,callId:this.io}},"*"),t.postMessage({oo:{command:r,parameter:null,callId:this.so}},"*")}))}ro(t){const i=b[f.CmpApi].windowPropertyName,e=b[f.CmpApi].getVendorConsentDataMethodName,s=b[f.CmpApi].getConsentDataMethodName;if(t&&t[i]){const n=new Promise((s=>{t[i](e,null,((t,i)=>{if(i){const{vendorConsents:i}=t;this.eo(i).then((()=>s()))}}))})),r=new Promise((e=>{t[i](s,null,((t,i)=>{if(i){const{consentData:i}=t;this.no(i).then((()=>e()))}}))}));return Promise.all([n,r])}return Promise.reject()}eo(t){return(0,c.as)(t)?(this.Yh=t,Promise.resolve()):Promise.reject()}no(t){return(0,c.HD)(t)?(this.Lh=t,Promise.resolve()):Promise.reject()}}var w=e(1561),_=e(8462),S=e(2381);const A=(t,i)=>{const e=b[i].windowPropertyName;return(0,w.uq)(t,e)},P=(t,i)=>{const e=b[i].framePropertyName;return(0,w.wl)(t,e)},I=(t,i)=>null!==A(t,i)||null!==P(t,i),k=t=>{const i=S.E.decode(t),e={},s={};return i.vendorConsents.forEach(((t,i)=>e[i]=t)),i.purposeConsents.forEach(((t,i)=>s[i]=t)),{vendorConsents:e,purposeConsents:s,tcString:t}},C=t=>{const i=_.decodeConsentString(t);let e="";const s=i.maxVendorId;for(let t=1;t<=s;t++)e+="0";const n=e.split("");i.allowedVendorIds.forEach((t=>{n[t-1]="1"}));return(t=>{const i={consentString:t};for(let e=0;e<t.length;e++)i[e+1]="1"===t[e];return i})(n.join(""))},T=(t,i,e)=>{let s;try{s=i(t)}catch(t){}if((0,c.as)(s))return s;try{s=e(t)}catch(t){}return s},M=t=>{var i;return(0,c.QM)(null===(i=t)||void 0===i?void 0:i.tcString)},E=t=>{var i;return(0,c.QM)(null===(i=t)||void 0===i?void 0:i.consentString)},B=({cmpEncodedString:t,tcfEncodedString:i})=>{if(!(0,c.QM)(t)&&!(0,c.QM)(i))return null;let e=null;return(0,c.QM)(i)&&(e=T(i,k,C)),(0,c.as)(e)?e:(0,c.QM)(t)?(e=T(t,C,k),(0,c.as)(e)?e:((0,g.n)({message:"UserManagerService_getDecodedConsentData",exception:"cmpEncodedString failed to decode",callStack:JSON.stringify({cmpEncodedString:t,tcfEncodedString:i}),level:g.D.CRITICAL}),null)):((0,g.n)({message:"UserManagerService_getDecodedConsentData",exception:"tcfEncodedString failed to decode",callStack:JSON.stringify({tcfEncodedString:i}),level:g.D.CRITICAL}),null)};class O{constructor(t,i){this.ao=t,this.co=i,this.apiType=f.TcfApi,this.uo=t=>new Promise(((i,e)=>{try{let s=t.data;if("string"==typeof t.data)try{s=JSON.parse(t.data)}catch(t){s=void 0}if("object"==typeof s&&s.po&&s.po.callId===this.fo){const t=s.po.returnValue.tcString;this.eo(t).then((()=>i(this.fo))).catch((t=>e()))}}catch(t){e()}}))}isApiOnPage(){return null!==this.ao||null!==this.co}bindToApi(){return null!==this.ao?new Promise(((t,i)=>{this.ro(this.ao).then((()=>t())).catch((t=>i(t)))})):null!==this.co?this.ho(this.co):Promise.reject()}isConsentForVendor(t){var i,e;return!!(null===(i=this.mo)||void 0===i?void 0:i.vendorConsents)&&!!(null===(e=this.mo)||void 0===e?void 0:e.vendorConsents[t])}getConsentPayload(){var t;return null===(t=this.mo)||void 0===t?void 0:t.tcString}setInAppConsentData(t){this.mo=Object.assign(Object.assign({},this.mo),t)}hasIvtConsent(){return!0}isConsentForPurposes(t){var i;return!!(null===(i=this.mo)||void 0===i?void 0:i.purposeConsents)&&t.every((t=>!!this.mo.purposeConsents[t]))}ho(t){this.fo=(0,n.qs)();const i={};return new Promise((e=>{const s=t=>{this.uo(t).then((t=>{i[t]=!0,i[this.fo]&&(window.removeEventListener("message",s,!1),e())})).catch((t=>{}))};window.addEventListener("message",s,!1);const n=b[f.TcfApi].getVendorConsentDataMethodName;t.postMessage({vo:{command:n,parameter:null,callId:this.fo}},"*")}))}ro(t){const i=b[f.TcfApi].windowPropertyName,e=b[f.TcfApi].consentUpdateMethodName,s=b[f.TcfApi].removeUpdateListenerMethodName;return t&&t[i]?new Promise((t=>{this.ao[i](e,2,((e,n)=>{if(n&&("useractioncomplete"===e.eventStatus||"tcloaded"===e.eventStatus)){const n=e.tcString;this.eo(n).then((()=>t())),this.ao[i](s,2,(()=>{}),e.listenerId)}}))})):Promise.reject()}eo(t){const i=B({tcfEncodedString:t});return M(i)?(this.mo=i,Promise.resolve()):Promise.reject()}}var L=e(7432);class R{constructor(t,i,e={}){var s,n;this.yo=t,this.$e=i;const r=B({cmpEncodedString:null===(s=e.cmp)||void 0===s?void 0:s.consentString,tcfEncodedString:null===(n=e.tcf)||void 0===n?void 0:n.tcString}),h=this.bo(r);null!==h?(this.xo(h),(M(r)||E(r))&&this.wo.setInAppConsentData(r)):(0,g.n)({message:"UserManagerService_UserConsentApiManager",exception:"failed to find the right api, no consent string and no framework on page was found",callStack:JSON.stringify({_appSettings:e}),level:g.D.CRITICAL})}setPageUrl(t){this.Fe=t}setAmpUserConsent(t){var i,e;if(!this.isConsentRequired())return;const s=t.consentStringTypeEnum.US_PRIVACY_STRING,n=null===(i=t.consentMetadata)||void 0===i?void 0:i.consentStringType,r=t.encodeConsentString||(null===(e=t.consentMetadata)||void 0===e?void 0:e.additionalConsent);let h;if(!(0,c.QM)(r))return void(0,g.n)({level:g.D.INFO,message:"AMP_no_consent_string_provided",callStack:JSON.stringify(t),exception:this.Fe});if(n===s)return void(0,g.n)({message:"UserConsentApiManager_CCPA_encoded_string_from_amp_not_used",level:g.D.WARN,callStack:r,exception:`${JSON.stringify(t)}__pageURL_${this.Fe}`},{throttle:2,sendMaxLog:!1});const o=B({tcfEncodedString:r,cmpEncodedString:r});M(o)?h=new O(null,null):E(o)&&(h=new x(null,null)),h?h?(this.wo=h,this.wo.setInAppConsentData(o)):(0,g.n)({message:"UserConsentApiManager_amp_userConsentApi_not_found",level:g.D.WARN,callStack:r,exception:`${JSON.stringify(t)}__pageURL__${this.Fe}`},{sendMaxLog:!1,throttle:2}):(0,g.n)({message:"UserConsentApiManager_encoded_string_not_tcf_and_not_cmp",level:g.D.WARN,callStack:r,exception:`${JSON.stringify(t)}__pageURL__${this.Fe}`},{throttle:2,sendMaxLog:!1})}isConsentRequired(){return this.yo}isConsent(t,i=[]){if(this.isConsentRequired()){return this.wo.isConsentForVendor(t)&&this.wo.isConsentForPurposes(i)}return!0}isConsentConnatix(){return this.isConsent(s.Connatix,L.Z)}isConsentForPersonalisedAds(){return this.getConsentApiType()!==f.CmpApi&&this.wo.isConsentForPurposes(L.Z)}getConsentDataPayload(){return this.wo.getConsentPayload()}bindToConsentApi(){return this.wo.bindToApi()}isConsentApiOnPage(){return this.wo.isApiOnPage()}hasIVTConsent(){return this.wo.hasIvtConsent()}getConsentApiType(){return this.wo.apiType}xo(t){const i=A(this.$e,t),e=P(this.$e,t);t===f.TcfApi?this.wo=new O(i,e):this.wo=new x(i,e)}bo(t){if(M(t))return f.TcfApi;if(E(t))return f.CmpApi;if(I(this.$e,f.TcfApi))return f.TcfApi;return I(this.$e,f.CmpApi)?f.CmpApi:f.TcfApi}}var D=e(6615);const j="PUBMATIC",V="predirect",F="UserThirdPartySyncManager_Pubmatic",$="CookieSync_syncScript_not_properly_loaded",N="CookieSync_param_not_parsed_properly",U=(t,i)=>{if(!window.PubMaticSync)return q($,j),!1;const e=Number.parseInt(t,10);return(0,c.kE)(e)?!!(0,c.QM)(i)||(q(N,j,V),!1):(q(N,j,"p"),!1)},H=(t,i,e,s)=>{const n={pubId:Number.parseInt(t,10),url:i};e&&(n.delay=1e3,n.gdpr=1,n.gdprConsent=s),window.PubMaticSync.sync(n)},q=(t,i,e="")=>{(0,g.n)({message:t,callStack:i,exception:e,level:g.D.CRITICAL},{throttle:1,sendMaxLog:!1})};class z{constructor(t,i){this._o=t,this.yo=i,this.So=[]}replaceuserIdMacros(t,i){let e=t;return e=e.replace("%5BuserId%5D",i),e=e.replace("[userId]",i),e=e.replace("%7bUSER_ID%7d",i),e}Ao(t,i){try{if(this.Po(t)){const e=i.document.createElement("iframe");e.setAttribute("style","width:1px;height:1px;border:0px;margin:0px;padding:0px"),e.src=t.url,i.document.body.appendChild(e)}else(0,w.dZ)({src:t.url},i.document.head,i,null,null,1===(0,n.Vm)([95,5]),"UserManager_unable_to_insert_sync_url_script");return!0}catch(t){return!1}}Po(t){switch(t.vendorId){case s.Rubicon:case s.Pubmatic:return!0;default:return!!t.url.includes("yellowblue.io")}}syncUrls(t,i){this.So.forEach((e=>{if(this._o.isConsent(e.vendorId)&&!e.synced){if(e.vendorId===s.Pubmatic)return void((t,i,e)=>new Promise(((s,n)=>{const r=(0,D.Ph)("p",t),h=(0,D.Ph)(V,t);if(window.PubMaticSync){if(!U(r,h))return void n();H(r,h,i,e),s(!0)}else(0,w.dZ)({src:"//ads.pubmatic.com/AdServer/js/userSync.js"},window.document.head,window,(()=>{U(r,h)?(H(r,h,i,e),s(!0)):n()}),(()=>{n()}),!0,F)})))(e.url,this._o.isConsentRequired(),this._o.getConsentDataPayload()).then((()=>{e.synced=!0}));if(e.url.includes("openx.net"))return e.url=`${e.url.split("r=")[0]}&r=\n                        ${encodeURIComponent(`${a.n.endPoints.api.syncUrls}?DemandPartner=8&UserId=${t}&DemandPartnerUserId=`)}`,e.url=this.replaceuserIdMacros(e.url,t),h.n.trackPixel(e.url),void(e.synced=!0);if(e.url.includes("sync.technoratimedia.com/services"))return h.n.trackPixel(e.url),void(e.synced=!0);if(e.url.includes("pixel.advertising.com")&&(e.url=e.url.replace("gdpr=","gdpr="+(this._o.isConsentRequired()?1:0)),e.url=e.url.replace("gdpr_consent=","gdpr_consent=0")),e.url=this.replaceuserIdMacros(e.url,t),this.yo){e.url=(0,D.Bp)(e.url,"gdpr","1");const t=this._o.getConsentDataPayload();e.url=(0,D.Bp)(e.url,"gdpr_consent",t)}this.Ao(e,i)&&(e.synced=!0)}}))}setSyncUrls(t={}){return!(this.So.length>0)&&(this.So=[],Object.keys(t).forEach((i=>{this.So.push({vendorId:i,url:t[i],synced:!1})})),!0)}}var W=e(1995);const G={California:5332921},J={US:6252001};var Q;!function(t){t.CCPA_Error="CCPA Error",t.CCPA_Pending="CCPA Pending",t.CCPA_Success="CCPA Success",t.CCPA_Delayed_Success="CCPA Delayed Success",t.CCPA_Delayed_Failure="CCPA Delayed Failure"}(Q||(Q={}));class Y{constructor(t,i){this.Rh=t,this.Io=1,this.ko="__uspapi",this.Co="getUSPData",this.To={isPending:!0,isRejected:!1,isDelayed:!1,promise:new Promise((()=>{}))},this.Mo(i)}getUsPrivacyString(){if(this.Rh.usPrivacyString||this.Rh.isCcpaApplicable)return this.Rh.usPrivacyString}isCcpaApplicable(){return this.Rh.isCcpaApplicable}isSellUserAllowed(){return!this.Rh.isCcpaApplicable||this.Eo()}setGeoLocation(t){this.Bo=t,t.subdivisionId!==G.California&&(this.Rh.isCcpaApplicable=!1)}fetchUsPrivacyString(){return this.Oo()&&this.Lo(),this.isCcpaApplicable()?new Promise((t=>{this.getUsPrivacyString()?t():t(this.Ro())})):Promise.resolve()}Ro(){return this.To.promise=new Promise(((t,i)=>{const e=this.Rh.getScope()[this.ko];e?(this.Do=!0,e(this.Co,this.Io,((e,s)=>{s?(this.Mo(e.uspString),t()):i()}))):i()})),this.makeQuerablePromise(this.To),this.To.promise}Eo(){return!this.Rh.usPrivacyString||(0,v.d3)(this.Rh.usPrivacyString,r)}Mo(t){this.Rh.usPrivacyString=t}Oo(){if(!(0,n.Vm)([95,5]))return!1;const t=new Date(2020,10,16,12,0,0).getTime(),i=new Date(2020,10,17,12,0,0).getTime();return(0,m.k$)(t,i)}Lo(){const{countryGeoId:t,subdivisionId:i}=this.Bo;t===J.US&&(0,g.n)({message:"UserCcpaManager_logCCPA",level:g.D.INFO,callStack:JSON.stringify(i),exception:this.Rh.usPrivacyString})}ccpaInfoLogging(t){this.isCcpaApplicable()&&this.Do&&(this.To.isPending?((0,g.n)({message:Q.CCPA_Pending,exception:"CCPA_Pending_At_Start_AdRequest",level:g.D.INFO,callStack:t}),this.To.isDelayed=!0,this.jo=t):this.To.isRejected&&(0,g.n)({message:Q.CCPA_Error,exception:"CCPA_Error_At_Start_AdRequest",level:g.D.INFO,callStack:t}))}makeQuerablePromise(t){t.promise.then((()=>{t.isPending=!1,t.isDelayed&&(0,g.n)({message:Q.CCPA_Delayed_Success,exception:"CCPA_Success_After_Delay",level:g.D.INFO,callStack:this.jo})})).catch((i=>{throw t.isRejected=!0,t.isPending=!1,t.isDelayed&&(0,g.n)({message:Q.CCPA_Delayed_Failure,exception:"CCPA_Failed_After_Delay",level:g.D.INFO,callStack:this.jo}),i}))}}var X,Z,K=e(5348);!function(t){t.CCPA_INFO_RECEIVED="ccpaInfoReceived",t.CONSENT_DATA_UPDATE="consentDataUpdate"}(X||(X={})),function(t){t.SYNC_URLS_RECEIVED="thirdPartySyncUrlsReceived",t.USER_INFO_RECEIVED="userInfoReceived"}(Z||(Z={}));class tt{constructor(t,i,e,s={}){this.pi=i,this.mi=e,this._appSettings=s,this.gdprConsentMode=o.ProtoGdprConsentModeEnum.Unknown,this.Vo={},this.Fo="",this.$o=!1,this.Uo=()=>{!this._o.isConsentRequired()||this.pi?this.resolveEvent(X.CONSENT_DATA_UPDATE):(this.gdprConsentMode=this._o.isConsentApiOnPage()||this.mi?o.ProtoGdprConsentModeEnum.NoConsent:o.ProtoGdprConsentModeEnum.NoCmp,this._o.bindToConsentApi().then((()=>{this.isConsentConnatix()||(this.gdprConsentMode=o.ProtoGdprConsentModeEnum.NoConnatixConsent),this.resolveEvent(X.CONSENT_DATA_UPDATE)})).catch((t=>{})))},this.zo=()=>{K.$.getEnvelope(this.Gt,this._o)},this.Wo=()=>{this.isConsentConnatix()&&(this.onEvent([Z.USER_INFO_RECEIVED]).then((()=>{this.$o&&(this.Go.syncThirdPartyCookieList(),this.Go.unsecuredCookieSync&&this.Go.syncThirdPartyCookieList(this.Go.unsecuredCookieSync),this.Go.syncFirstPartyCookie(p.USER_ID))})),this.onEvent([Z.SYNC_URLS_RECEIVED,X.CONSENT_DATA_UPDATE,X.CCPA_INFO_RECEIVED]).then((()=>{if(this.isConsentConnatix()&&this.Jo.isSellUserAllowed())try{this.Qo.syncUrls(this.Rh.userId,this.Rh.getScope())}catch(t){(0,g.n)({level:g.D.WARN,message:"UserManager_syncUrls",exception:t.message,callStack:t.stack})}})))};try{this.Gt=t,this.Rh=d.getInstance(t),this.pi||(this.Go=new y(this.Rh,t));const{cmp:i,tcf:e}=this._appSettings;this._o=new R(!!this.Fo,t,{cmp:i,tcf:e}),this.Qo=new z(this._o,this.isGDPR()),this.Jo=new Y(this.Rh,this._appSettings.usPrivacyString),this.Yo()}catch(t){(0,g.n)({callStack:t.stack,exception:t.message,message:"UserManager_constructor",level:g.D.CRITICAL})}}get identityEnvelope(){return K.$.getValidEnvelope()}Yo(){this.Go&&this.Go.fetchCookies(),this.Uo(),this.onEvent([X.CONSENT_DATA_UPDATE]).then((()=>{this.zo(),setTimeout((()=>{try{if(this.pi)return;this.Wo()}catch(t){(0,g.n)({callStack:t.stack,exception:t.message,message:"UserManager_consent_data_received",level:g.D.CRITICAL})}}),0)}))}Xo(t){return void 0===this.Vo[t]&&(this.Vo[t]=new W.C,this.Vo[t].promise.catch((()=>this.Vo[t].reject()))),this.Vo[t]}resolveEvent(t,i){this.Xo(t).resolve(i)}setAmpUserConsent(t){this._o.setAmpUserConsent(t),this.resolveEvent(X.CONSENT_DATA_UPDATE)}setPageUrl(t){this._o&&this._o.setPageUrl(t)}onEvent(t){const i=t.map((t=>this.Xo(t).promise));return Promise.all(i)}isConsent(t,i){return this._o.isConsent(t,i)}isConsentConnatix(){return this._o.isConsentConnatix()}ccpaInfoLogging(t){this.Jo.ccpaInfoLogging(t)}getConsentPayload(){return this._o.getConsentDataPayload()}isConsentRequired(){return this._o.isConsentRequired()}isPersonalisedAdsAllowed(){return this.isConsentRequired()?this._o.isConsentForPersonalisedAds():!this.isCcpaApplicable()||this.Jo.isSellUserAllowed()}setThirdPartySyncUrls(t){this.pi||this.Qo.setSyncUrls(t)&&this.resolveEvent(Z.SYNC_URLS_RECEIVED)}setGeoLocation(t){this.Jo.setGeoLocation(t),this.Jo.fetchUsPrivacyString().then((()=>{this.resolveEvent(X.CCPA_INFO_RECEIVED)})).catch((()=>{this.resolveEvent(X.CCPA_INFO_RECEIVED)}))}getUserId(){if(this.isConsentConnatix()&&this.Go)return this.Go.getUserId()}Zo(){return this.Go&&this.Go.getUserId()}setUserInformation(t){this.Go&&(this.Go.setUserInformation(t),this.resolveEvent(Z.USER_INFO_RECEIVED),!this.pi&&this.isConsentConnatix()&&this.Go.syncFirstPartyCookie(p.USER_ID))}isGDPR(){return!!this.Fo}getUsPrivacyString(){return this.Jo.getUsPrivacyString()}isCcpaApplicable(){return this.Jo.isCcpaApplicable()}isSellUserAllowed(){return this.pi||this.Jo.isSellUserAllowed()}getDeviceId(){if(this.isConsentConnatix())return this._appSettings.deviceID}Ko(){return this._appSettings.deviceID}getTrackableUser(){return this.pi?this.getDeviceId():this.getUserId()}getForcedTrackableUser(){return this.pi?this.Ko():this.Zo()}registerPlsCall(t){return this.isConsentConnatix()||(this.$o=!0),this.Rh.registerPlsCall(t)}setBrowserInfo(t){this.Go&&this.Go.setBrowserInfo(t,this.isConsentConnatix())}getGdprConsentApiType(){return this._o.getConsentApiType()}}},3030:(t,i,e)=>{"use strict";e.d(i,{BZ:()=>u,Gg:()=>p,Sz:()=>c,V7:()=>f,d3:()=>h,ee:()=>y,fn:()=>d,gX:()=>g,qo:()=>o,qy:()=>a,sj:()=>v,tN:()=>m,ti:()=>l});var s=e(7427),n=e(7726),r=e(9065);e(8423);function h(t,i){return i.indexOf(t)>-1}function o(t){return Array.isArray(t)?t:[t]}function a(t,i){const e=[],s=new Map;return i.forEach((i=>{s.has(i[t])||(s.set(i[t],!0),e.push(i))})),e}function c(t){return[].slice.call(t)}function l(t){const i=[];for(const e in t)e&&parseInt(e,10)>=0&&i.push(t[e]);return i}function u(t){return t&&t.length>0}function d(t){return t.every((t=>(0,s.kE)(t)))}function p(t){let i="[";for(let e=0;e<t.length;e++)i+=(0,r.H)(t[e])+(e===t.length-1?"":",");return i+="]",i}function f(t,i){return t.filter((t=>!i.includes(t)))}function m(t,i){return t.filter((t=>i.includes(t)))}function g(t){return t.filter(((i,e)=>t.indexOf(i)===e))}function v(t,i){const e=t.indexOf(i);-1!==e?t.splice(e,1):(0,n.n)({message:"removeItemFromArray_error_item_not_found",exception:JSON.stringify(i),level:n.D.WARN})}function y(t){const i=[];return t.forEach((t=>i.push(t))),i}},1561:(t,i,e)=>{"use strict";e.d(i,{AX:()=>et,Dx:()=>I,Fs:()=>k,G$:()=>M,GF:()=>W,Ho:()=>p,IS:()=>N,IV:()=>w,Ji:()=>z,LT:()=>F,L_:()=>A,ML:()=>b,MV:()=>d,NN:()=>ht,NS:()=>v,Nb:()=>K,PM:()=>L,Q1:()=>E,S0:()=>B,T7:()=>f,Tp:()=>O,U6:()=>q,UR:()=>st,Wb:()=>X,_w:()=>nt,aQ:()=>m,bX:()=>g,bZ:()=>rt,cn:()=>x,dZ:()=>y,eA:()=>Z,fj:()=>V,h_:()=>R,jG:()=>$,ju:()=>G,nw:()=>j,og:()=>S,pv:()=>_,rI:()=>P,sw:()=>tt,tp:()=>T,uc:()=>C,uh:()=>it,uq:()=>Q,w6:()=>J,wl:()=>Y});var s=e(2817),n=e(7427),r=e(3030),h=e(2820),o=e(8423),a=e(6615),c=e(7577),l=e(7726);function u(t,i){t&&(t.style.display=i?"":"none")}function d(t){u(t,!1)}function p(t){u(t,!0)}function f(t,i){for(const e in i)i.hasOwnProperty(e)&&(t.style[e]=i[e])}function m(t,...i){i.forEach((i=>{t.style[i]=""}))}function g(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function v(t,i,e,s,r){if(i)try{const h=e.document.createElement("link");return h.id=t.id,h.type="text/css",h.rel="stylesheet",h.href=t.src,(0,n.mf)(s)&&(h.onload=()=>{s()}),(0,n.mf)(r)&&(h.onerror=t=>{i.removeChild(h),(0,n.HD)(t)?r(`link_stylesheet_load_error_${t}`):r(`link_stylesheet_load_error_${function(t,i){const e=t.document.createElement("div");return e.appendChild(i),e.innerHTML}(e,h)}`)}),i.appendChild(h),h}catch(t){return null}}function y(t,i,e,s,r,h=!0,o){try{const a=e.document.createElement("script");return a.src=t.src,a.async=!0,a.type="text/javascript",t.id&&(a.id=t.id),(0,n.mf)(s)&&(a.onload=()=>{s()}),a.onerror=e=>{i.removeChild(a),h&&(0,l.n)({message:o,exception:"script_load_error",callStack:t.src,level:l.D.INFO},{throttle:2,sendMaxLog:!1}),(0,n.mf)(r)&&r()},i.appendChild(a),a}catch(i){return h&&(0,l.n)({message:o,exception:`script_insert_error_${i.message}_${i.stack}`,callStack:t.src,level:l.D.CRITICAL},{throttle:2,sendMaxLog:!1}),(0,n.mf)(r)&&r(),null}}function b(t,i,e){if(t)try{const s=i.document.createElement("script"),n=i.document.createTextNode(e);return s.appendChild(n),t.appendChild(s),s}catch(t){return null}}function x(t,...i){t&&t.classList.add(...i)}function w(t,...i){t&&t.classList.remove(...i)}function _(t,i){return t&&t.classList.contains(i)}function S(t,i,e){return!!t&&t.classList.toggle(i,e)}function A(t,i,e,s=!1){t&&(t.classList.remove(i),t.classList.add(e),s&&O(t))}const P=(t,i)=>i.document.getElementById(t),I=(t,i,e)=>i.getComputedStyle(t,e),k=(t,i)=>i.document.getElementsByClassName(t);function C(t,i="",e){const s=e.document.getElementsByTagName("head")[0],n=e.document.createElement("style");n.setAttribute("type","text/css"),n.id=i,n.appendChild(e.document.createTextNode(t)),s.appendChild(n)}function T(t,i){const e=i.document.getElementsByTagName("head")[0],s=i.document.createElement("link");s.setAttribute("rel","preconnect"),s.setAttribute("link",t),e.appendChild(s)}function M(t,i){const e=i.document.createElement("div");return e.innerHTML=t,e.firstElementChild}function E(t,i){i>0?(t.removeAttribute("muted"),t.muted=!1):(t.setAttribute("muted",""),t.muted=!0)}function B(t){return s.Ht.find((i=>{if(i.keys.fullscreenEnabled in t)return!0}))}function O(t){t.getBoundingClientRect()}function L(t,i){return(t.requestAnimationFrame||t.webkitRequestAnimationFrame||function(t){return setTimeout(t,20)})(i)}function R(t,i){return(t.cancelAnimationFrame||t.webkitCancelAnimationFrame||function(t){return clearTimeout(t)})(i)}function D(t,i,e){const s=function(t,i){const e=function(t,i){let e=i;for(;e;){const i=e.parentNode;if(i){const e=t.reduce(((t,e)=>t||i.querySelector(e)),null);if(e)return e}e=i}return null}(t,i);return e?I(e,F(e)):null}(t,i);return s?function(t,i){return t.getPropertyValue(i)}(s,e):null}function j(t){const i=D(["h1","h2"],t,"font-family");return i||"inherit"}function V(t){const i=D(["p"],t,"font-family");return i||"inherit"}function F(t){try{return t.ownerDocument.defaultView}catch(t){return null}}function $(t,i){t&&i&&(Array.isArray(t)?t.forEach((t=>i.appendChild(t))):i.appendChild(t))}function N(t,i,e){let s=!1;const n=(0,r.Sz)(i.children);for(let i=0;i<n.length;i++)if(e-1===i||0===e){s=!0,Array.isArray(t)?U(n[i],...t):U(n[i],t);break}s||$(t,i)}function U(t,...i){if(t&&t.parentElement)for(let e=i.length;e--;)t.parentElement.insertBefore(i[e],t)}function H(t){const i=F(t);if(!i)return;const{display:e}=I(t,i);"none"===e&&(t.style.display="block")}function q(t,i=(()=>{})){const e=function(s){"opacity"===s.propertyName&&(w(t,h.jG.FadeOutBase,h.jG.FadeOut),i(),t.removeEventListener("transitionend",e))};x(t,h.jG.FadeOutBase),H(t),O(t),t.addEventListener("transitionend",e),x(t,h.jG.FadeOut)}function z(t,i=(()=>{})){const e=function(s){"opacity"===s.propertyName&&(w(t,h.jG.FadeInBase,h.jG.FadeIn),i(),t.removeEventListener("transitionend",e))};x(t,h.jG.FadeInBase),H(t),O(t),t.addEventListener("transitionend",e),x(t,h.jG.FadeIn)}function W(t){const i=F(t);if(!i)return!0;const{display:e,opacity:s}=I(t,i);return"none"===e||"0"===s}function G(t,i){const e=i.document.createElement("div");return e.innerHTML=t||"",e.innerText}function J(){const t=window.navigator&&window.navigator.doNotTrack||window.doNotTrack;return"1"===t||"yes"===t}function Q(t,i){const e=(0,o.pE)(t).topFrame;return e[i]?e:null}function Y(t,i){let e=t,s=null;try{for(;!s;){try{e.frames[i]&&(s=e)}catch(t){}if(!t.top||t.top===e)break;e=e.parent}}catch(t){}return s}function X(t,i){let e=[];try{e=e.slice.call(i.document.querySelectorAll(t),0)}catch(t){}return e}function Z(t){return(0,o.pE)(t).topFrame.location.protocol.includes("https")}function K(t){if(!Z(t))return;[window,t].forEach((t=>{if(null===t.document.querySelector("meta[content=upgrade-insecure-requests]")){const i=t.document.createElement("meta");i.setAttribute("http-equiv","Content-Security-Policy"),i.content="upgrade-insecure-requests",t.document.head.appendChild(i)}}))}function tt(t){return(0,o.pE)(t).topFrame.document.referrer}function it(t,i){const e=(0,o.pE)(i).topFrame.location.hostname,s=(0,o.bx)(t);return s&&s.hostname===e}function et(t,i){try{t.onclick=t=>{const{tagName:e,className:s}=t.target;(0,l.n)({message:`${i} - click on tag:${e} class:${s}`,level:l.D.INFO})}}catch(t){(0,l.n)({message:`${i}_Error - iframe click`,level:l.D.WARN,callStack:t.stack})}}function st(t){setTimeout((()=>{let i=t.currentTime+.01;i>t.duration&&(i=.01),t.currentTime=i}),0)}function nt(t,i){!function(t,i,e){const s=t.document.createElement("link");s.rel="preload",s.href=i,s.as=e,t.document.head.appendChild(s)}(i,t,"script")}function rt(t,i){if(!i||!ht(i))return(0,l.n)({message:"Prerender_Elements_getgetCustomerId_no_currentScript",level:l.D.CRITICAL}),null;const e=i.src;return(0,a.Ph)(c.ym,e)}function ht(t){return"SCRIPT"===t.tagName}},8423:(t,i,e)=>{"use strict";e.d(i,{Hh:()=>p,Of:()=>v,Up:()=>y,Vm:()=>f,bx:()=>u,dz:()=>a,er:()=>c,lU:()=>l,ld:()=>g,oC:()=>b,pE:()=>d,qs:()=>o,rM:()=>x,we:()=>m});var s=e(6615),n=e(7427),r=e(9065),h=e(3030);function o(){let t=Date.now();return"xxxxxxxx-xxxx-4xxx-yxxx-xxxxxxxxxxxx".replace(/[xy]/g,(function(i){const e=(t+16*Math.random())%16|0;return t=Math.floor(t/16),("x"===i?e:3&e|8).toString(16)}))}function a(){return o().replace(/-/g,"")}function c(t){return/^[0-9a-f]{8}-[0-9a-f]{4}-[1-5][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i.test(t.trim())}function l(t,i){let e="";if(!t.err)try{e=t.topFrame.location.href}catch(t){}if(!e||0===e.length)try{e=i.top.location.href}catch(t){}if(!e||0===e.length)try{e=t.topFrame.document.referrer}catch(t){}return e}function u(t){try{const i=t.match(/^(https?:)\/\/(([^:\/?#]*)(?::([0-9]+))?)([\/]{0,1}[^?#]*)(\?[^#]*|)(#.*|)$/);return{href:t,protocol:i[1],host:i[2],hostname:i[3],port:i[4],pathname:i[5],search:i[6],hash:i[7]}}catch(t){return null}}function d(t){let i=t,e=null,s=!1;try{for(;i.parent.document!==i.document;){if(!i.parent.document){s=!0;break}e=i,i=i.parent}}catch(t){s=!0}return{topFrame:i,topChildFrame:e,err:s}}function p(t=[],i,e={}){t.forEach((t=>{(0,n.HD)(t)&&((new i.Image).src=`${t}${(0,s.CK)(t)}${function(t,i){const e=[];return Object.keys(t).forEach((s=>{const o=i?`${i}[${s}]`:s,a=t[s];if((0,n.as)(a))e.push(`${encodeURIComponent(o)}=${(0,r.H)(a)}`);else if(Array.isArray(a))e.push(`${encodeURIComponent(o)}=${(0,h.Gg)(a)}`);else if(null!=a){const t=encodeURIComponent(a),i=encodeURIComponent(o);t&&i&&e.push(`${i}=${t}`)}})),e.join("&")}(e)}`)}))}function f(t){const i=Math.floor(100*Math.random());let e=0,s=0;for(let n=0;n<t.length;n++)if(s+=t[n],i<s){e=n;break}return e}function m(){let t=!1;try{const i=document.createElement("audio");i.volume=1,i.muted=!1;const e=i.play();void 0!==e&&e.catch((()=>{})),t=!i.paused,i.pause()}catch(t){}return t}function g(t,i=0,...e){return setTimeout((()=>{t.apply(this,e)}),i)}function v(t,i,e){let s=0,n=t;for(;s<=e;){if(s++,n.classList.contains(i))return!0;if(n=n.parentElement,!n)return!1}return!1}function y(t,i=5,e){return new Promise(((s,r)=>{t().then(s).catch((h=>{1===i||(0,n.mf)(e)&&e(h)?r(h):y(t,i-1,e).then(s,r)}))}))}function b(){const t=!!window.MSInputMethodContext&&!!document.documentMode,i=navigator.userAgent.toLowerCase().includes("msie");return t||i}function x(t){return Object.keys(t).reduce(((i,e)=>Object.assign(Object.assign({},i),{[e]:`${t[e]}`})),{})}},6615:(t,i,e)=>{"use strict";e.d(i,{Bp:()=>h,CK:()=>o,Ph:()=>r,_Y:()=>a,sH:()=>l});var s=e(7427);const n=".cdn.ampproject.org";function r(t,i){i||(i=location.search),t=t.replace(/\[/,"\\[").replace(/]/,"\\]");const e=new RegExp(`[\\?&]${t}=([^&#]*)`,"i").exec(i);return null===e?null:decodeURIComponent(e[1])}function h(t,i,e){const s=new RegExp(`([?&])${i}=.*?(&|$)`,"i"),n=o(t);return t.match(s)?e?t.replace(s,`$1${i}=${e}$2`):t.replace(s,"$1"):`${t}${n}${i}=${e}`}function o(t){return t.includes("?")?"&":"?"}function a(t){if((0,s.QM)(t))return t.includes("://")?t.split("/")[2]:t.split("/")[0]}function c(t,i){return`${"http"+(/(\/s\/)+/.test(t.replace(i,""))?"s":"")}://${i}`}function l(t,i=!0){return t=function(t){if(!t.includes(n))return t;const i="www.",e="amp.";if((t=(t=(t=(t=(t=(t=(t=t.replace(n,"")).replace("www-",i)).replace("amp-",e)).cnx_replaceAll("--","=")).cnx_replaceAll("-",".")).cnx_replaceAll("=","-")).replace(i,e)).includes(e))return t;const s="http://",r="https://";return(t=t.replace(s,"http://amp.")).replace(r,"https://amp.")}(t=function(t){const i=/^https:\/\/www.google\..*?\/amp\/s*\/*/.exec(t);if(null!==i){const e=t.replace(i[0],"");return c(t,e)}return t}(t=function(t){if(t.includes(n)){t=t.replace("https://","");const i=/^[^\/]+(\/[a-z]+\/)+s*\/*/,e=i.test(t)?t.replace(i.exec(t)[0],""):t;return c(t,e)}return t}(t))),i&&(t=function(t){if(!t.includes("#origin-")&&!t.includes("viewerUrl-"))return t;const i=t.split("#origin-")[1].split("viewerUrl-");return l(t=decodeURIComponent(i[1]),!1)}(t)),t}},7726:(t,i,e)=>{"use strict";e.d(i,{D:()=>c,n:()=>u});var s=e(45),n=e(497);var r=e(8423),h=e(158),o=e(525);let a=window.location&&window.location.href;try{a=window.top.location.href}catch(t){}var c;!function(t){t.EMERGENCY="Emergency",t.ALERT="Alert",t.CRITICAL="Critical",t.ERROR="Error",t.WARN="Warn",t.INFO="Info"}(c||(c={}));const l={throttle:30,sendMaxLog:!0,pacing:0};function u(t,i={}){if(!((i=Object.assign(Object.assign({},l),i)).pacing>0)||function(t){const i=Math.min(Math.max(t,0),100);return!!(0,r.Vm)([100-i,i])}(i.pacing))if(t.sessionId=n.S.sessionId,n.S.incrementLogCount(t.message),n.S.isMaxLogOverflow(t.message)&&u({message:"Logging_max_log_overflow_1000",exception:t.message,callStack:t.callStack,level:c.CRITICAL,sessionId:n.S.sessionId},{sendMaxLog:!1,throttle:100}),n.S.isMaxLog(t.message,i.throttle))i.sendMaxLog&&!n.S.isMaxLogSent(t.message)&&(n.S.setMaxLogSent(t.message),u({message:"Logging_max_log_sent",exception:t.message,callStack:t.callStack,level:c.CRITICAL,sessionId:n.S.sessionId}));else{if(void 0===t.callStack){const i=new Error(t.message);t.callStack=i.stack}if(t.callStack=t.callStack.substring(0,500),s.g.logToServer){t.pageUrl=t.pageUrl||a,t.version=s.g.version;let e="connatix.com";try{e=o.n.bundleDomain}catch(t){}const n="https://pl."+e;t.ddsource="browser",t.service="player",i.sendBeacon?h.n.sendJsonBeaconRequest(t,n):h.n.fetchXhttpRequest({requestUrl:n,requestType:"POST",withCredentials:!1},JSON.stringify(t))}s.g.logToConsole&&function(t){let i;switch(t.level){case c.CRITICAL:i="#8B0000";break;case c.WARN:i="#FF8C00";break;case c.INFO:i="#000000"}console.log(`%cConnatix Logging:\n   message: ${t.message}\n   exception: ${t.exception}\n   level: ${t.level}\n   version: ${t.version}\n   sessionId: ${t.sessionId}\n   callStack: ${t.callStack}`,`color:${i}`)}(t)}}},2231:(t,i,e)=>{"use strict";e.d(i,{DE:()=>r,ON:()=>a,Tc:()=>h,dO:()=>c,dQ:()=>n,oK:()=>o});var s=e(7427);function n(t,i,e,s,n){return e+(s-e)*function(t,i,e){return(e-t)/(i-t)}(t,i,n)}function r(t,i){return i.reduce(((i,e)=>Math.abs(e-t)<=Math.abs(i-t)?e:i))}function h(t,i){return i/100*t}function o(t,i){const e=Math.pow(10,i);return Math.round(t*e)/e}function a(t){return!(0,s.r)(t.width)||!(0,s.r)(t.height)}function c(t,i){for(let e=i;e>1;e--)t%e==0&&i%e==0&&(t/=e,i/=e);return{widthRatio:t,heightRatio:i}}},9065:(t,i,e)=>{"use strict";e.d(i,{H:()=>s});e(8423);function s(t){for(const i in t)t.hasOwnProperty(i)&&"string"==typeof t[i]&&(t[i]=`%22${encodeURIComponent(t[i])}%22`);return JSON.stringify(t).cnx_replaceAll('"',"")}},6243:(t,i,e)=>{"use strict";function s(t=[]){t.forEach((t=>t.unsubscribe()))}e.d(i,{i:()=>s})},8852:(t,i,e)=>{"use strict";e.d(i,{EQ:()=>h,IS:()=>o,f5:()=>r});var s=e(7726),n=e(7427);function r(t,i){return t.replace(/(?:\r\n|\r|\n)/g,i)}function h(t){try{return Object.keys(t).reduce(((i,e)=>Object.assign(Object.assign({},i),{[e]:(0,n.QM)(t[e])&&t[e].includes("%%")?void 0:t[e]})),{})}catch(i){return(0,s.n)({message:"sanitizeDfpMacros_error",exception:i.message,callStack:i.stack,level:s.D.WARN}),Object.keys(t).reduce(((i,e)=>Object.assign(Object.assign({},i),{[e]:(0,n.QM)(t[e])&&t[e].includes("%%")?void 0:t[e]})),{})}}function o(t,i){return`${t}-${i}`}},2324:(t,i,e)=>{"use strict";e.d(i,{H8:()=>u,QI:()=>h,XF:()=>o,k$:()=>c,pP:()=>r,qe:()=>d,to:()=>a,w4:()=>p,x8:()=>l});var s=e(9115),n=e(7427);function r(t){let i,e;return(0,n.HD)(t)&&(i=t.match(s.T9),i&&(e=parseInt(i[1],10)*s.p7+parseInt(i[2],10)*s.uD+parseInt(i[3],10)*s.s_+parseInt(i[5]||0,10))),isNaN(e)?null:e}function h(t,i){return/^\d+(\.\d+)?%$/g.test(t)?i?i*parseFloat(t.replace("%",""))/100:null:r(t)}function o(t){return Date.now()+t*s.ti}function a(t,i=":"){const e=t=>t>=10?t:`0${t}`;return`${e(Math.floor(t/60))}${i}${e(Math.floor(t%60))}`}function c(t,i){const e=Date.now();return!(e<t||e>i)}function l(){const t=new Date;return t.getTime()-1e3*t.getTimezoneOffset()*60}function u(t){return Math.floor((Date.now()-t)/s.s_)}function d(t,i){return t>=i?t/s.s_:t}function p(t){return(0,n.kE)(t)?t*s.s_:null}},7427:(t,i,e)=>{"use strict";function s(t){return"string"==typeof t}function n(t){return!isNaN(parseFloat(t))&&isFinite(t)}function r(t){return n(t)&&t>0}function h(t){return s(t)&&t.length>0}function o(t){return void 0!==t}function a(t){return"function"==typeof t}function c(t){return"object"==typeof t&&null!==t&&!Array.isArray(t)}function l(t){try{if(t.contentWindow||t.contentDocument)return!0}catch(t){}return!1}function u(t,i){var e;return h(t)?!(!(null===(e=Object.values(i))||void 0===e?void 0:e.includes(t))||Object.keys(i).includes(t)):!!n(t)&&t in i}e.d(i,{$K:()=>o,Cz:()=>u,HD:()=>s,QM:()=>h,as:()=>c,cL:()=>l,kE:()=>n,mf:()=>a,r:()=>r})},158:(t,i,e)=>{"use strict";e.d(i,{n:()=>s});var s,n=e(8423),r=e(7427),h=e(6615),o=e(7726);!function(t){let i;!function(t){t.DumpJson="Dump Json"}(i||(i={}));function e(t,i){return(0,r.as)(i)?(Object.keys(i).forEach((e=>t=(0,h.Bp)(t,e,i[e]))),t):t}function s(t,i){const e=function({requestUrl:t,requestType:i="POST",contentType:e="",responseType:s="",withCredentials:n=!1,timeout:r=3e4}){const h=new XMLHttpRequest;return h.open(i,t,!0),e.length>0&&h.setRequestHeader("Content-Type",e),s.length>0&&(h.responseType=s),h.timeout=r,h.withCredentials=n,h}(t),s=new Date;return new Promise(((t,n)=>{e.onreadystatechange=()=>{if(e.readyState===XMLHttpRequest.DONE)if(200===e.status)t(e.response);else{let t="";try{t=e.responseText}catch(t){}const i=(new Date).getTime()-s.getTime();n(new Error(`Request fail. status:${e.status}, readyState:${e.readyState}, response:${t}, time:${i}`))}},e.ontimeout=()=>{const t=(new Date).getTime()-s.getTime();n(new Error(`Request timeout status:${e.status}. time:${t}`))},e.send(i)}))}function a(t,i,e){try{const s=(0,n.Vm)([95,5]);!s||i&&0!==Object.keys(i).length||(0,o.n)({message:"empty_proto_request",callStack:"empty_function_argument",exception:e,level:o.D.INFO},{sendMaxLog:!1});const r=t.fromObject(i);!s||r&&0!==Object.keys(r).length||(0,o.n)({message:"empty_proto_request",callStack:"empty_fromObject_result",exception:e,level:o.D.INFO},{sendMaxLog:!1});const h=t.encode(r).finish();return!s||h&&0!==Object.keys(h).length||(0,o.n)({message:"empty_proto_request",callStack:"empty_encode_result",exception:e,level:o.D.INFO},{sendMaxLog:!1}),h}catch(t){throw(0,o.n)({exception:e,level:o.D.CRITICAL,callStack:JSON.stringify(i),message:"Protobuf_encode"},{throttle:10}),Error()}}function c(t,e,n="POST",r,h,a,c){return function(t,e,s,n){return new Promise(((r,h)=>{e.then((e=>{if(t){let a=null;try{const i=e?new Uint8Array(e):new Uint8Array;a=t.toObject(t.decode(i),{defaults:!0,arrays:!0,objects:!0})}catch(t){(0,o.n)({exception:`${s}__${t.message}`,message:"Protobuf_decode",callStack:t.stack,level:o.D.WARN},{throttle:10})}a.errorMessage===i.DumpJson&&(0,o.n)({message:i.DumpJson,exception:JSON.stringify(n),callStack:s,level:o.D.INFO}),a&&a.errorMessage&&"500"===a.errorMessage&&h(a.errorMessage),r(a)}})).catch((t=>{h(t)}))}))}(t,s({requestUrl:e,requestType:n,withCredentials:h,contentType:"POST"===n?"multipart/form-data":"",responseType:"arraybuffer",timeout:a},r),e,c)}t.fetchXhttpRequest=s,t.fetchXMLRequest=function(t,i=!0){const e=s({requestUrl:t,requestType:"GET",withCredentials:i});return new Promise(((t,i)=>{e.then((i=>{t(i)})).catch((t=>{i(t)}))}))},t.sendProtoRequest=function({ProtoResponse:t,ProtoRequest:i,requestData:s,endpoint:r,requestType:h,withCredentials:l,queryParams:u,logError:d,timeout:p}){const f=s?a(i,s,r):null;return c(t,r=e(r,u),h,f,l,p,s).catch((t=>{throw d&&(0,n.Vm)([95,5])&&(0,o.n)({message:"Xhr_error",exception:r,callStack:`${t}, requestData: ${JSON.stringify(s)}`,level:o.D.INFO}),new Error(t)}))},t.sendProtoBeaconRequest=function({ProtoRequest:t,requestData:i,endpoint:s,queryParams:n=null}){s=e(s,n);const r=i?a(t,i,s):null;return navigator.sendBeacon(s,r)},t.sendJsonBeaconRequest=function(t,i){const e=new Blob([JSON.stringify(t)],{type:"application/json"});return navigator.sendBeacon(i,e)},t.trackPixel=function(t){try{(new Image).src=t}catch(t){(0,o.n)({message:"Xhr_trackPixel",exception:t.message,callStack:t.stack,level:o.D.CRITICAL})}}}(s||(s={}))},655:(t,i,e)=>{"use strict";e.d(i,{CR:()=>a,FC:()=>u,Jh:()=>h,KL:()=>d,XA:()=>o,ZT:()=>n,ev:()=>c,mG:()=>r,qq:()=>l});var s=function(t,i){return s=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)Object.prototype.hasOwnProperty.call(i,e)&&(t[e]=i[e])},s(t,i)};function n(t,i){if("function"!=typeof i&&null!==i)throw new TypeError("Class extends value "+String(i)+" is not a constructor or null");function e(){this.constructor=t}s(t,i),t.prototype=null===i?Object.create(i):(e.prototype=i.prototype,new e)}function r(t,i,e,s){return new(e||(e=Promise))((function(n,r){function h(t){try{a(s.next(t))}catch(t){r(t)}}function o(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(h,o)}a((s=s.apply(t,i||[])).next())}))}function h(t,i){var e,s,n,r,h={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return r={next:o(0),throw:o(1),return:o(2)},"function"==typeof Symbol&&(r[Symbol.iterator]=function(){return this}),r;function o(r){return function(o){return function(r){if(e)throw new TypeError("Generator is already executing.");for(;h;)try{if(e=1,s&&(n=2&r[0]?s.return:r[0]?s.throw||((n=s.return)&&n.call(s),0):s.next)&&!(n=n.call(s,r[1])).done)return n;switch(s=0,n&&(r=[2&r[0],n.value]),r[0]){case 0:case 1:n=r;break;case 4:return h.label++,{value:r[1],done:!1};case 5:h.label++,s=r[1],r=[0];continue;case 7:r=h.ops.pop(),h.trys.pop();continue;default:if(!(n=h.trys,(n=n.length>0&&n[n.length-1])||6!==r[0]&&2!==r[0])){h=0;continue}if(3===r[0]&&(!n||r[1]>n[0]&&r[1]<n[3])){h.label=r[1];break}if(6===r[0]&&h.label<n[1]){h.label=n[1],n=r;break}if(n&&h.label<n[2]){h.label=n[2],h.ops.push(r);break}n[2]&&h.ops.pop(),h.trys.pop();continue}r=i.call(t,h)}catch(t){r=[6,t],s=0}finally{e=n=0}if(5&r[0])throw r[1];return{value:r[0]?r[1]:void 0,done:!0}}([r,o])}}}Object.create;function o(t){var i="function"==typeof Symbol&&Symbol.iterator,e=i&&t[i],s=0;if(e)return e.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&s>=t.length&&(t=void 0),{value:t&&t[s++],done:!t}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")}function a(t,i){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var s,n,r=e.call(t),h=[];try{for(;(void 0===i||i-- >0)&&!(s=r.next()).done;)h.push(s.value)}catch(t){n={error:t}}finally{try{s&&!s.done&&(e=r.return)&&e.call(r)}finally{if(n)throw n.error}}return h}function c(t,i,e){if(e||2===arguments.length)for(var s,n=0,r=i.length;n<r;n++)!s&&n in i||(s||(s=Array.prototype.slice.call(i,0,n)),s[n]=i[n]);return t.concat(s||Array.prototype.slice.call(i))}function l(t){return this instanceof l?(this.v=t,this):new l(t)}function u(t,i,e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var s,n=e.apply(t,i||[]),r=[];return s={},h("next"),h("throw"),h("return"),s[Symbol.asyncIterator]=function(){return this},s;function h(t){n[t]&&(s[t]=function(i){return new Promise((function(e,s){r.push([t,i,e,s])>1||o(t,i)}))})}function o(t,i){try{(e=n[t](i)).value instanceof l?Promise.resolve(e.value.v).then(a,c):u(r[0][2],e)}catch(t){u(r[0][3],t)}var e}function a(t){o("next",t)}function c(t){o("throw",t)}function u(t,i){t(i),r.shift(),r.length&&o(r[0][0],r[0][1])}}function d(t){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var i,e=t[Symbol.asyncIterator];return e?e.call(t):(t=o(t),i={},s("next"),s("throw"),s("return"),i[Symbol.asyncIterator]=function(){return this},i);function s(e){i[e]=t[e]&&function(i){return new Promise((function(s,n){(function(t,i,e,s){Promise.resolve(s).then((function(i){t({value:i,done:e})}),i)})(s,n,(i=t[e](i)).done,i.value)}))}}}Object.create},289:function(t,i,e){var s,n,r;n=[e(4492)],void 0===(r="function"==typeof(s=function(t){"use strict";return(t.roots.common||(t.roots.common=new t.Root)).addJSON({ProtoAdBreak:{fields:{types:{rule:"repeated",type:"ProtoAdBreakTypeEnum",id:1,options:{packed:!1}},maxAdPodDuration:{type:"int32",id:2},maxAdSlotDuration:{type:"int32",id:3,options:{default:180}},numberOfAdSlots:{type:"int32",id:4,options:{default:1}}}},ProtoAdDomainBlockingResponse:{fields:{domains:{rule:"repeated",type:"string",id:1}}},ProtoCoreTamBidRequest:{fields:{lineItemId:{type:"string",id:1},code:{type:"string",id:2},metadata:{type:"MetadataModel",id:3},exploration:{type:"bool",id:4}}},MetadataModel:{fields:{version:{type:"int32",id:1},sessionId:{type:"string",id:2},playerId:{type:"string",id:3},userId:{type:"string",id:4},browser:{type:"Browser",id:5},geo:{type:"GeoLocation",id:6},clientAb0:{type:"int32",id:7},clientAb1:{type:"int32",id:8},serverAb0:{type:"int32",id:9},serverAb1:{type:"int32",id:10},pageUrl:{type:"string",id:15},bundleId:{type:"string",id:17},implementationType:{type:"ProtoImplementationType",id:18},trackAllRequests:{type:"bool",id:19},customParam1:{type:"string",id:20},customParam2:{type:"string",id:21},customParam3:{type:"string",id:22},abTestId:{type:"string",id:24},pageInFocus:{type:"bool",id:25},customParam4:{type:"string",id:26},customParam5:{type:"string",id:27},bundleAbId:{type:"string",id:28},bundlePart:{type:"string",id:29}}},Browser:{fields:{browserVersion:{type:"string",id:1},browserType:{type:"string",id:2},osCode:{type:"string",id:3},device:{type:"ProtoDeviceType",id:4}}},GeoLocation:{fields:{countryGeoId:{type:"int32",id:1},cityId:{type:"int32",id:2},subdivisionId:{type:"int32",id:3},dmaId:{type:"int32",id:4},ip:{type:"string",id:5},lat:{type:"double",id:6},lon:{type:"double",id:7},zipcode:{type:"string",id:8}}},ProtoCoreTamBidResponse:{fields:{errorMessage:{type:"string",id:1},encryptedBidPrice:{type:"string",id:10},ofskp:{type:"double",id:12},impressionTimeSpent:{type:"int32",id:13},bidRate:{type:"double",id:14},successRate:{type:"double",id:15}}},ProtoCookieSettings:{fields:{name:{type:"string",id:1},value:{type:"string",id:2},timestamp:{type:"int64",id:3}}},ProtoCookieSyncRequest:{fields:{cookieList:{rule:"repeated",type:"ProtoCookieSettings",id:1},secureMode:{type:"ProtoCookieSecureModeEnum",id:2},browserInfo:{type:"Browser",id:3}}},ProtoUserInformation:{fields:{userId:{type:"string",id:1},lookupId:{type:"string",id:3},lookupResponseCode:{type:"int32",id:4},callFraudSensor:{type:"bool",id:5},publisherAdsTxt:{type:"string",id:6}}},CreativeTrackerViewModel:{fields:{type:{type:"ProtoTrackerType",id:1},trigger:{type:"ProtoTrackerTriggerType",id:2},url:{type:"string",id:3}}},Insights:{fields:{key:{type:"string",id:1}}},ProtoSentimentAnalysis:{fields:{positive:{type:"double",id:1},neutral:{type:"double",id:2},negative:{type:"double",id:3}}},ProtoInsightsResponse:{fields:{insights:{rule:"repeated",type:"Insights",id:1},sentimentAnalysis:{type:"ProtoSentimentAnalysis",id:2}}},ProtoLineItemAdBreakTargeting:{fields:{adRollType:{type:"ProtoAdBreakTypeEnum",id:1},adBreakTypeEnum:{type:"ProtoLineItemAdBreakTypeEnum",id:2}}},ProtoLineItemAdPodTargeting:{fields:{targetingType:{type:"ProtoLineItemTargetingTypeEnum",id:1},adSlotTargetingType:{type:"ProtoLineItemAdSlotTargetingTypeEnum",id:2},adSlotPositions:{rule:"repeated",type:"int32",id:3,options:{packed:!1}}}},ProtoLineItemAdBreakSettings:{fields:{adBreakTargeting:{rule:"repeated",type:"ProtoLineItemAdBreakTargeting",id:1},adPodTargeting:{type:"ProtoLineItemAdPodTargeting",id:2}}},ProtoLineItem:{oneofs:{ta:{oneof:["predictedFloorPrice"]}},fields:{predictedFloorPrice:{type:"double",id:49,options:{proto3_optional:!0}},publisherLineItemId:{type:"string",id:1},advertiserLineItemId:{type:"string",id:2},adTag:{type:"string",id:3},creativeType:{type:"ProtoCreativeTypeEnum",id:4},sound:{type:"bool",id:6},viewability:{type:"bool",id:7},impressionTimeSpent:{type:"int32",id:9},vendorId:{type:"string",id:10},trackers:{rule:"repeated",type:"CreativeTrackerViewModel",id:12},duration:{type:"int32",id:13},renditions:{rule:"repeated",type:"ProtoRendition",id:14},mediaCreativeId:{type:"string",id:15},ignoreFilledRequests:{type:"bool",id:16},requestCap:{type:"int32",id:17,options:{default:3}},impressionCap:{type:"int32",id:18},successRate:{type:"double",id:19},lineItemPriority:{type:"ProtoLineItemPriority",id:20},headerBidderBids:{type:"string",id:21},headerBidderTimeout:{type:"int32",id:22},mediaCreativeClickUrl:{type:"string",id:23},resetRequestsCapTime:{type:"int32",id:24,options:{default:60}},resetImpressionsCapTime:{type:"int32",id:25,options:{default:60}},resetCapType:{type:"ProtoResetCapTypeEnum",id:26},creativeHlsFileName:{type:"string",id:27},timeBetweenRequests:{type:"int32",id:28},skipMode:{type:"ProtoAdSkipMode",id:29},mediaIdTargeting:{type:"ProtoTargetingChoiceModel",id:30},mediaKeywordsTargeting:{type:"ProtoTargetingChoiceModel",id:31},mediaLanguageTargeting:{type:"ProtoTargetingChoiceModel",id:32},adType:{type:"ProtoAdType",id:33},overlayTime:{type:"int32",id:34,options:{default:30}},floorPrice:{type:"double",id:35},adBreakSettings:{type:"ProtoLineItemAdBreakSettings",id:36},floorPrices:{rule:"repeated",type:"double",id:38,options:{packed:!1}},bidRate:{type:"double",id:39},pauseAdOutOfView:{type:"ProtoLineItemPauseAdOutOfViewEnum",id:40},moatTrackingEnabled:{type:"bool",id:41},cnxCreativeId:{type:"string",id:42},blockedDomainsRevisionNumber:{type:"int32",id:44},advertiserContextualTargeting:{rule:"repeated",type:"ProtoContextualTargetingCaseModel",id:45},publisherContextualTargeting:{rule:"repeated",type:"ProtoContextualTargetingCaseModel",id:46},playerSizeTargetings:{type:"ProtoPlayerSizeTargetings",id:47},amazonDealId:{type:"string",id:48},playerOrientationTargeting:{type:"ProtoPlayerOrientationTargetingEnum",id:50},skipMin:{type:"int32",id:51,options:{default:6}},skippability:{type:"ProtoLineItemSkippabilityType",id:52},forceCallingInEveryAO:{type:"bool",id:53},networkExpiryTimeSeconds:{type:"int32",id:54,options:{default:21600}},nonlinearLineItemSettings:{type:"ProtoNonlinearLineItemSettings",id:55},floorPriceData:{rule:"repeated",type:"FloorPriceModel",id:56},playerSize:{type:"string",id:101}}},ProtoTargetingChoiceModel:{fields:{choiceCriteria:{type:"ProtoChoiceCriteriaEnum",id:1},items:{rule:"repeated",type:"string",id:2}}},ProtoContextualTargetingCaseModel:{fields:{filters:{rule:"repeated",type:"ProtoContextualTargetingFilterModel",id:1}}},ProtoContextualTargetingFilterModel:{fields:{type:{type:"ProtoLineItemContextualTargetingEnum",id:1},items:{rule:"repeated",type:"string",id:2},level:{type:"ProtoContextualTargetingLevelEnum",id:3},hashedItemsIds:{rule:"repeated",type:"string",id:4}}},ProtoPlayerSizeTargetings:{fields:{sizeChoiceCriteria:{type:"ProtoSizeChoiceCriteriaEnum",id:1},minWidth:{type:"int32",id:2},maxWidth:{type:"int32",id:3}}},FloorPriceModel:{fields:{price:{type:"double",id:1},factor:{type:"double",id:2}}},ProtoRendition:{fields:{height:{type:"int32",id:1},codec:{type:"string",id:2},file:{type:"string",id:3}}},ProtoNonlinearLineItemSettings:{fields:{nonLinearRequestType:{type:"ProtoNonlinearRequestType",id:1},nonLinearAdTimeSeconds:{type:"int32",id:2,options:{default:15}}}},ProtoLiveMediaMetadataResponse:{fields:{startDate:{type:"string",id:1},outputUrl:{type:"string",id:2},thumbnailUrl:{type:"string",id:3},altText:{type:"string",id:4},name:{type:"string",id:5}}},ProtoSpriteSheet:{fields:{file:{type:"string",id:1},height:{type:"int32",id:2},count:{type:"int32",id:3}}},ProtoTrack:{fields:{file:{type:"string",id:1},type:{type:"ProtoTrackType",id:2},code:{type:"string",id:3},title:{type:"string",id:4}}},ProtoCustomField:{fields:{name:{type:"string",id:1},value:{type:"string",id:2}}},ProtoMediaMetadataResponse:{fields:{title:{type:"string",id:1},description:{type:"string",id:2},duration:{type:"int32",id:3},clickUrl:{type:"string",id:4},keywordList:{rule:"repeated",type:"string",id:5},trackList:{rule:"repeated",type:"ProtoTrack",id:6},spriteSheet:{type:"ProtoSpriteSheet",id:7},thumbnail:{type:"string",id:8},renditionList:{rule:"repeated",type:"ProtoRendition",id:9},customFields:{rule:"repeated",type:"ProtoCustomField",id:10},hlsFilePath:{type:"string",id:11},languageId:{type:"string",id:12},sourceItemId:{type:"string",id:13},altText:{type:"string",id:14},videoIndexes:{rule:"repeated",type:"string",id:15}}},ProtoNonlinearPlayerSettings:{fields:{numberOfNonlinearAds:{type:"int32",id:1},timeSecondsBetweenNonlinear:{type:"int32",id:2,options:{default:5}},timeSecondsBetweenLinearAndNonlinear:{type:"int32",id:3}}},ProtoRtbRequest:{fields:{metadata:{type:"MetadataModel",id:1},coppa:{type:"bool",id:4},refererUrl:{type:"string",id:5},testMode:{type:"bool",id:6},videoWidth:{type:"int32",id:7},videoHeight:{type:"int32",id:8},gdprCompliant:{type:"bool",id:9},soundOn:{type:"bool",id:10},gdprConsentData:{type:"string",id:11},explorationMode:{type:"bool",id:12},viewability:{type:"bool",id:13},outstream:{type:"bool",id:14},domainURL:{type:"string",id:16},isClickToPlay:{type:"bool",id:18},appVersion:{type:"string",id:21},deviceID:{type:"string",id:24},lineItems:{keyType:"string",type:"ProtoRtbRequestLineItemEntry",id:25},isCcpaBlockingUserInfo:{type:"bool",id:26},usPrivacyString:{type:"string",id:27},gdprConsentMode:{type:"ProtoGdprConsentModeEnum",id:36},maxAdDuration:{type:"int32",id:37,options:{default:180}},customMacros:{keyType:"string",type:"string",id:38},maxBidPrice:{type:"double",id:39},playerWidth:{type:"int32",id:43},playerHeight:{type:"int32",id:44},useNewSkippability:{type:"bool",id:42},liveRampAtsEnvelope:{type:"string",id:45}}},ProtoRtbRequestLineItemEntry:{oneofs:{ia:{oneof:["cachedFloorPrice"]},ta:{oneof:["predictedFloorPrice"]}},fields:{cachedFloorPrice:{type:"double",id:2,options:{proto3_optional:!0}},predictedFloorPrice:{type:"double",id:9,options:{proto3_optional:!0}},availableRequests:{type:"int32",id:1},gdprConsent:{type:"bool",id:4},publisherLineItemId:{type:"string",id:5},slotWidth:{type:"int32",id:6},slotHeight:{type:"int32",id:7},requestNumber:{type:"int32",id:8},skip:{type:"ProtoSkipEnabledEnum",id:12},skipmin:{type:"int32",id:13},skipafter:{type:"int32",id:14},minDuration:{type:"int32",id:15}}},ProtoRtbResponse:{fields:{lineItemResponses:{rule:"repeated",type:"ProtoRtbLineItem",id:3},liveRampEnvelopeStatus:{type:"LiveRampEnvelopeStatusEnum",id:4}}},ProtoRtbBid:{oneofs:{ea:{oneof:["floorPriceFactor"]},sa:{oneof:["floorPriceBypassReason"]}},fields:{floorPriceFactor:{type:"double",id:28,options:{proto3_optional:!0}},floorPriceBypassReason:{type:"FloorPriceBypassReasonEnum",id:29,options:{proto3_optional:!0}},winNoticeUrl:{type:"string",id:2},adQualityCheckUrl:{type:"string",id:3},vastTag:{type:"string",id:4},encryptedPrice:{type:"string",id:6},creativeId:{type:"string",id:7},seatId:{type:"string",id:8},adomain:{type:"string",id:9},syncedUser:{type:"bool",id:10},requestedFloorPrice:{type:"double",id:11},floorPriceFactorIndex:{type:"int32",id:12},campaignId:{type:"string",id:13},width:{type:"int32",id:14},height:{type:"int32",id:15},billingNoticeUrlList:{rule:"repeated",type:"string",id:16},mime:{type:"string",id:17,options:{default:"text/html"}},gtkpbp:{type:"double",id:18},successRate:{type:"double",id:19},impressionTimeSpent:{type:"int32",id:20},bidRate:{type:"double",id:21},dspId:{type:"string",id:22},cnxBidId:{type:"string",id:23},logAuctionInformation:{type:"bool",id:24},auctionBidId:{type:"string",id:25},rtbRequestId:{type:"string",id:26},liveRampAts:{type:"bool",id:27}}},ProtoRtbNoBid:{fields:{connatixReason:{type:"ConnatixNoBidReasonEnum",id:1},partnerReason:{type:"PartnerNoBidReasonEnum",id:2},syncedUser:{type:"bool",id:3},requestedFloorPrice:{type:"double",id:4},floorPriceFactorIndex:{type:"int32",id:5},partnerCustomHeaders:{type:"string",id:6}}},ProtoRtbLineItem:{oneofs:{ta:{oneof:["predictedFloorPrice"]}},fields:{predictedFloorPrice:{type:"double",id:5,options:{proto3_optional:!0}},id:{type:"string",id:1},cachedFloorPrice:{type:"double",id:2},bids:{rule:"repeated",type:"ProtoRtbBid",id:3},noBids:{rule:"repeated",type:"ProtoRtbNoBid",id:4}}},ProtoSupplyChain:{fields:{businessDomain:{type:"string",id:1},supplyChainId:{type:"string",id:3}}},ProtoAdClickTrackingRequest:{fields:{trackingRequestMeta:{type:"MetadataModel",id:1},mediaGuid:{type:"string",id:2},publisherLineItemId:{type:"string",id:3},advertiserLineItemId:{type:"string",id:4},type:{type:"ProtoAdClickTypeEnum",id:5},insightIndexes:{rule:"repeated",type:"string",id:10},adBreakType:{type:"ProtoAdBreakTypeEnum",id:11},sentimentAnalysis:{type:"ProtoSentimentAnalysis",id:12},pageInsightIndexes:{rule:"repeated",type:"string",id:13}}},ProtoAdOpportunityRequest:{fields:{sessionId:{type:"string",id:1},trackingRequestMeta:{type:"MetadataModel",id:2},adBreak:{type:"ProtoAdBreakTypeEnum",id:3},playerWidth:{type:"int32",id:4},pageInsightIndexes:{rule:"repeated",type:"string",id:5}}},ProtoAuctionInfoRequest:{fields:{cnxBidId:{type:"string",id:1},auctionInformation:{type:"ProtoAuctionInformation",id:2},auctionLossReason:{type:"ProtoAuctionLossReasonEnum",id:3}}},ProtoAuctionInformation:{fields:{highestObfuscatedBidPrice:{type:"double",id:1},secondHighestObfuscatedBidPrice:{type:"double",id:2},bidDensity:{type:"int32",id:3}}},ProtoPrebid:{fields:{publisherLineItemId:{type:"string",id:1},advertiserLineItemId:{type:"string",id:2},syncedUser:{type:"bool",id:3},timeSpent:{type:"int32",id:4},reason:{type:"ConnatixNoBidReasonEnum",id:5},requestNumber:{type:"int32",id:6},partnerReason:{type:"PartnerNoBidReasonEnum",id:7},requestedFloorPrice:{type:"double",id:8},partnerCustomHeaders:{type:"string",id:9},prebidJsBidderName:{type:"string",id:12},predictedFloorPrice:{type:"double",id:13},playerWidth:{type:"int32",id:14},playerHeight:{type:"int32",id:15}}},ProtoBid:{fields:{publisherLineItemId:{type:"string",id:1},advertiserLineItemId:{type:"string",id:2},syncedUser:{type:"bool",id:3},timeSpent:{type:"int32",id:4},requestNumber:{type:"int32",id:5},creativeId:{type:"string",id:6},rtbSeatId:{type:"string",id:7},rtbAdomain:{type:"string",id:8},encryptedPrice:{type:"string",id:9},requestedFloorPrice:{type:"double",id:10},prebidJsBidderName:{type:"string",id:13},customClientPrice:{type:"double",id:14},dspId:{type:"string",id:15},cnxBidId:{type:"string",id:16},predictedFloorPrice:{type:"double",id:17},playerWidth:{type:"int32",id:18},playerHeight:{type:"int32",id:19},floorPriceFactor:{type:"double",id:20},floorPriceFactorBypassReason:{type:"int32",id:21}}},ProtoPostBid:{fields:{publisherLineItemId:{type:"string",id:1},advertiserLineItemId:{type:"string",id:2},syncedUser:{type:"bool",id:3},timeSpent:{type:"int32",id:4},error:{type:"string",id:5},loaded:{type:"bool",id:6},creativeId:{type:"string",id:7},rtbSeatId:{type:"string",id:8},rtbAdomain:{type:"string",id:9},adsourceType:{type:"ProtoAdsourceTypeEnum",id:10},vastMediaType:{type:"string",id:11},adPodSlotPosition:{type:"int32",id:12},prebidJsBidderName:{type:"string",id:13},dspId:{type:"string",id:14},cnxBidId:{type:"string",id:15},winToAdLoadedTime:{type:"int32",id:16},auctionInformation:{type:"ProtoAuctionInformation",id:18},auctionPostbidReason:{type:"ProtoAuctionPostbidReasonEnum",id:19},requestNumber:{type:"int32",id:20},predictedFloorPrice:{type:"double",id:21},floorPrice:{type:"double",id:22},playerWidth:{type:"int32",id:23},playerHeight:{type:"int32",id:24},bidElapsedTimeSeconds:{type:"int32",id:25},adBreakType:{type:"ProtoAdBreakTypeEnum",id:26},liveRampAts:{type:"bool",id:27},dynamicElkFieldsValues:{keyType:"string",type:"string",id:100}}},ProtoBidTrackingsRequest:{fields:{trackingRequestMeta:{type:"MetadataModel",id:1},mediaGuid:{type:"string",id:2},prebids:{rule:"repeated",type:"ProtoPrebid",id:4},bids:{rule:"repeated",type:"ProtoBid",id:5},postBids:{rule:"repeated",type:"ProtoPostBid",id:6},logEveryting:{type:"bool",id:7},hasGdprConsentPayload:{type:"bool",id:10},gdprConsentMode:{type:"ProtoGdprConsentModeEnum",id:11},useExploration:{type:"bool",id:12}}},ProtoHeavyAdTrackingRequest:{fields:{trackingRequestMeta:{type:"MetadataModel",id:1},advertiserLineItemId:{type:"string",id:2},heavyAdBlockTypeEnum:{type:"ProtoHeavyAdBlockTypeEnum",id:3}}},ProtoMediaClickTrackingRequest:{fields:{trackingRequestMeta:{type:"MetadataModel",id:1},mediaGuid:{type:"string",id:2},type:{type:"ProtoMediaClickTypeEnum",id:3},clickUrl:{type:"string",id:4},slideTitle:{type:"string",id:5},slideNumber:{type:"int32",id:6},slideMediaType:{type:"ProtoMediaTypeEnum",id:7},insightIndexes:{rule:"repeated",type:"string",id:12},sentimentAnalysis:{type:"ProtoSentimentAnalysis",id:13}}},ProtoMediaTrackingRequest:{fields:{trackingRequestMeta:{type:"MetadataModel",id:1},mediaGuid:{type:"string",id:2},quartile:{type:"ProtoQuartilesEnum",id:4},insightIndexes:{rule:"repeated",type:"string",id:9},sentimentAnalysis:{type:"ProtoSentimentAnalysis",id:10}}},ProtoPlayerStartRequest:{fields:{trackingRequestMeta:{type:"MetadataModel",id:1},pageInsightIndexes:{rule:"repeated",type:"string",id:2},dynamicElkFieldsValues:{keyType:"string",type:"string",id:100}}},ProtoSessionAdBlockerRequest:{fields:{trackingRequestMeta:{type:"MetadataModel",id:1},adBlockDetectionType:{type:"ProtoAdBlockDetectionTypeEnum",id:2},dynamicElkFieldsValues:{keyType:"string",type:"string",id:100}}},ProtoSessionTimeTrackingRequest:{fields:{trackingRequestMeta:{type:"MetadataModel",id:1},timePlayed:{type:"int32",id:2},timePlayedInView:{type:"int32",id:3},sessionTime:{type:"int32",id:4},pageInsightIndexes:{rule:"repeated",type:"string",id:5}}},ProtoSessionViewRequest:{fields:{trackingRequestMeta:{type:"MetadataModel",id:1},pageInsightIndexes:{rule:"repeated",type:"string",id:2},dynamicElkFieldsValues:{keyType:"string",type:"string",id:100}}},ProtoTrackingRequest:{fields:{trackingRequestMeta:{type:"MetadataModel",id:1},hasAdBlocker:{type:"bool",id:4},bundleName:{type:"string",id:5},playerWidth:{type:"int32",id:6},playerHeight:{type:"int32",id:7},pageInsightIndexes:{rule:"repeated",type:"string",id:8},dynamicElkFieldsValues:{keyType:"string",type:"string",id:100}}},ProtoTrackingResponse:{oneofs:{na:{oneof:["viewability"]}},fields:{viewability:{type:"bool",id:5,options:{proto3_optional:!0}},errorMessage:{type:"string",id:1},platformCappedLineItemIdList:{rule:"repeated",type:"string",id:2},impressionRevenue:{type:"double",id:3},adServerLineItemName:{type:"string",id:4}}},ProtoVideoAdImpressionRequest:{fields:{trackingRequestMeta:{type:"MetadataModel",id:1},mediaGuid:{type:"string",id:3},publisherLineItemId:{type:"string",id:5},advertiserLineItemId:{type:"string",id:6},syncedUser:{type:"bool",id:7},timeSpent:{type:"int32",id:8},encryptedPrice:{type:"string",id:9},creativeId:{type:"string",id:10},rtbSeatId:{type:"string",id:11},rtbAdomain:{type:"string",id:12},customClientPrice:{type:"double",id:13},adsourceType:{type:"ProtoAdsourceTypeEnum",id:14},vastMediaType:{type:"string",id:15},adPodSlotPosition:{type:"int32",id:18},prebidJsBidderName:{type:"string",id:19},dspId:{type:"string",id:20},cnxBidId:{type:"string",id:21},winToAdLoadedTime:{type:"int32",id:22},startAdToImpressionTime:{type:"int32",id:23},declaredDuration:{type:"double",id:24},impressionDuration:{type:"double",id:25},useExploration:{type:"bool",id:26},auctionInformation:{type:"ProtoAuctionInformation",id:27},playerWidth:{type:"int32",id:28},requestNumber:{type:"int32",id:29},predictedFloorPrice:{type:"double",id:30},floorPrice:{type:"double",id:31},floorPriceFactor:{type:"double",id:44},floorPriceBypassReason:{type:"FloorPriceBypassReasonEnum",id:45},playerHeight:{type:"int32",id:36},bidElapsedTimeSeconds:{type:"int32",id:37},insightIndexes:{rule:"repeated",type:"string",id:38},adBreakType:{type:"ProtoAdBreakTypeEnum",id:40},sentimentAnalysis:{type:"ProtoSentimentAnalysis",id:41},hasAdSkip:{type:"bool",id:39},pageInsightIndexes:{rule:"repeated",type:"string",id:42},liveRampAts:{type:"bool",id:43},dynamicElkFieldsValues:{keyType:"string",type:"string",id:100}}},ProtoVideoAdImpressionViewableRequest:{fields:{trackingRequestMeta:{type:"MetadataModel",id:1},mediaGuid:{type:"string",id:3},publisherLineItemId:{type:"string",id:5},advertiserLineItemId:{type:"string",id:6},rtbSeatId:{type:"string",id:7},dspId:{type:"string",id:8},insightIndexes:{rule:"repeated",type:"string",id:13},hasAdSkip:{type:"bool",id:14},adBreakType:{type:"ProtoAdBreakTypeEnum",id:15},sentimentAnalysis:{type:"ProtoSentimentAnalysis",id:16},pageInsightIndexes:{rule:"repeated",type:"string",id:17},rtbAdomain:{type:"string",id:18}}},ProtoVideoAdQuartilesRequest:{fields:{trackingRequestMeta:{type:"MetadataModel",id:1},mediaGuid:{type:"string",id:3},publisherLineItemId:{type:"string",id:5},advertiserLineItemId:{type:"string",id:6},quartile:{type:"ProtoQuartilesEnum",id:7},rtbSeatId:{type:"string",id:8},dspId:{type:"string",id:9},insightIndexes:{rule:"repeated",type:"string",id:14},hasAdSkip:{type:"bool",id:15},adBreakType:{type:"ProtoAdBreakTypeEnum",id:16},sentimentAnalysis:{type:"ProtoSentimentAnalysis",id:17},pageInsightIndexes:{rule:"repeated",type:"string",id:18},rtbAdomain:{type:"string",id:19}}},ProtoUserSyncRequest:{fields:{userId:{type:"string",id:1},demandPartner:{type:"int32",id:2},demandPartnerUserId:{type:"string",id:3}}},ProtoPlayerPlaybackModeEnum:{values:{Autoplay:0,ScrollToPlay:1,ClickToPlay:2}},ProtoPlayerCloseButtonMode:{values:{Off:0,OnHover:1,OnHoverAfterFirstAd:2,AlwaysOn:3}},ProtoPlayerFloatingMode:{values:{Off:0,OnPageLoad:1,AfterInView:2,Always:3}},ProtoPlayerSoundMode:{values:{Mute:0,On:1,Hover:2}},ProtoPlayerInsertMode:{values:{WithinContainer:0,BeforeContainer:1,AfterContainer:2,ReplaceContainer:3,HideContainer:4}},ProtoAdViewabilityPolicy:{values:{Default:0,Strict:1}},ProtoSharingDestination:{values:{Facebook:0,Twitter:1,LinkedIn:2}},ProtoFloatingFixedPositionMode:{values:{Page:0,Element:1}},ProtoPositionMode:{values:{BottomRight:0,BottomLeft:1,TopRight:2,TopLeft:3}},ProtoAdPlaybackMode:{values:{Autoplay:0,ScrollToPlay:1}},ProtoFloatingAppendLocationEnum:{values:{Above:0,Below:1,Within:2}},ProtoPlayerAdSkippability:{values:{IfLongerThan:0,Always:1,NoRestrictions:2}},ProtoVideoQuality:{values:{Auto:0,High1080p:1,High720p:2,Medium360p:3}},ProtoImplementationType:{values:{Web:0,Amp:1}},ProtoAdBreakTypeEnum:{values:{None:0,PreRoll:1,MidRoll:2,PostRoll:3}},ProtoAdSlotAdTypeEnum:{values:{SingleAd:0,AdPod:1}},ProtoPlayerSkippabilityType:{values:{AllowNonSkipAdsIfTheyAreShorterThan:0,RequireAdsToBeSkippable:1}},ProtoBandwidthLoggingEnum:{values:{Disabled:0,Enabled:1,SaaS:2}},ProtoDeviceType:{values:{Desktop:0,Smartphone:1,Tablet:2,GameConsole:3,SmartTV:4,WearableComputer:5,PDA:6,Unrecognized:7}},ProtoCookieSecureModeEnum:{values:{Secure:0,Unsecure:1,Auto:2}},ProtoTrackerType:{values:{Image:0,Javascript:1}},ProtoTrackerTriggerType:{values:{Impression:0,Complete25Pc:1,Complete50Pc:2,Complete75Pc:3,ViewCompletion:4,VideoClick:5,Pause:6,Resume:7,Mute:8,Unmute:9}},ProtoCreativeTypeEnum:{values:{ThirdParty:0,MediaFile:1,Rtb:2,External:3,HeaderBidder:4,Tam:7,TamDeal:8,TamPrivateAuction:9}},ProtoResetCapTypeEnum:{values:{TimeCapping:0,ContentCapping:1,OpportunityCapping:2}},ProtoAdSlotsEnum:{values:{PreRoll:0,MidRoll:1,PostRoll:2}},ProtoLineItemPriority:{values:{House:0,Default:1,Preferred:2,Top:3}},ProtoAdSkipMode:{values:{IfLongerThan31Sec:0,Always:1,Never:2,NotAplicable:3}},ProtoAdType:{values:{Video:0,Overlay:1,Nonlinear:2}},ProtoChoiceCriteriaEnum:{values:{Only:0,Except:1}},ProtoLineItemAdBreakTypeEnum:{values:{All:1,SingleAd:2,AdPod:3}},ProtoLineItemTargetingTypeEnum:{values:{Only:0,Except:1}},ProtoLineItemAdSlotTargetingTypeEnum:{values:{SpecificSlots:1,Interval:2}},ProtoLineItemPauseAdOutOfViewEnum:{values:{Default:0,Strict:1}},ProtoLineItemContextualTargetingEnum:{values:{IncludeAny:0,IncludeAll:1,ExcludeAny:2,ExcludeAll:3}},ProtoSizeChoiceCriteriaEnum:{values:{GreaterThan:0,SmallerThan:1,Between:2}},ProtoPlayerOrientationTargetingEnum:{values:{Both:0,Portrait:1,Landscape:2}},ProtoLineItemSkippabilityType:{values:{AllowPublisherToDetermineSkippability:0,RequirePublisherToAllowNonSkipAdsShorterThan:1,NotApplicable:2}},ProtoContextualTargetingLevelEnum:{values:{Media:0,Page:1,Both:2}},ProtoNonlinearRequestType:{values:{Banner:0,Video:1}},ProtoTrackType:{values:{ManualSubtitle:0,AutoGeneratedSubtitle:1,ClosedCaptions:2}},ProtoMediaTypeEnum:{values:{Image:0,Video:1}},ProtoSkipEnabledEnum:{values:{No:0,Yes:1}},LiveRampEnvelopeStatusEnum:{values:{Ok:0,EnvelopeExpired:1,Unauthorized:2}},FloorPriceBypassReasonEnum:{values:{MinCpm:0,FixedCpm:1,VideoOrBannerMin:2,PubMinFloor:3,AdvMinFloor:4,BidInHand:5}},ConnatixNoBidReasonEnum:{values:{RequestException:0,Timeout:1,EmptyResponse:2,InvalidResponse:3,NoBid:4,BidBelowFloor:5,DealIdMismatch:6,CsInvalidResponse:7,CsRequestException:8,CsEmptyResponse:9,NoLibInPage:11,BidIsNotTargetingAllowedEver:12}},PartnerNoBidReasonEnum:{values:{Unknown:0,TechnicalError:1,InvalidRequest:2,KnownWebSpider:3,SuspectedNonHumanTraffic:4,CloudIP:5,UnsupportedDevice:6,BlockedPublisher:7,UnmatchedUser:8,DailyReaderCapMet:9,DailyDomainCapMet:10}},ProtoAdBlockDetectionTypeEnum:{values:{Banner:0,Network:1}},ProtoAdClickTypeEnum:{values:{AdClick:1,AdClickThrough:2,AdSkipClick:3,VolumeClick:4,PauseClick:5,PlayClick:6,FullScreenClick:7,MuteClick:8,UnmuteClick:9,ExitFullScreenClick:10,AdUserClose:11}},ProtoAdsourceTypeEnum:{values:{Unknown:0,Vpaid:1,VastMedia:2,CnxMedia:3,Jw:4,Ima:5,AOL:6}},ProtoAuctionLossReasonEnum:{values:{TargetingMismatch:0,CompetitorPriority:1,AdOpportunityEnd:2}},ProtoGdprConsentModeEnum:{values:{Unknown:0,NoCmp:1,NoConsent:2,NoConnatixConsent:3,NotAllDemandConsent:4,AllGood:5}},ProtoAuctionPostbidReasonEnum:{values:{CreativeError:0,SDKFailure:1,UnsupportedMedia:2,TargetingMismatch:3,PlayerError:4}},ProtoHeavyAdBlockTypeEnum:{values:{Global:0,Script:1,VpaidIframe:2,OverlayIframe:3}},ProtoMediaClickTypeEnum:{values:{Click:0,UrlClick:1,VolumeClick:2,PlayClick:3,PauseClick:4,NextClick:5,PreviousClick:6,MuteClick:7,UnmuteClick:8,CloseClick:9,ScrollClick:10,GalleryClick:11,SubtitleClick:12,FullScreenClick:13,ExitFullScreenClick:14}},ProtoQuartilesEnum:{values:{Start:0,First:1,Second:2,Third:3,Fourth:4}}})})?s.apply(i,n):s)||(t.exports=r)},7953:function(t,i,e){var s,n,r;n=[e(4492)],void 0===(r="function"==typeof(s=function(t){"use strict";return(t.roots.elements||(t.roots.elements=new t.Root)).addJSON({ProtoElementsRequest:{fields:{tokens:{rule:"repeated",type:"string",id:1},pageUrl:{type:"string",id:3},userId:{type:"string",id:5},forcePlayerId:{type:"string",id:7},forcePlaylistId:{type:"string",id:9},version:{type:"int32",id:10},forceLineItemIds:{rule:"repeated",type:"string",id:11},clientAb0:{type:"int32",id:12},clientAb1:{type:"int32",id:13},customParam1:{type:"string",id:16},customParam2:{type:"string",id:17},customParam3:{type:"string",id:18},forceExploration:{type:"bool",id:20},es6:{type:"bool",id:21},bundleId:{type:"string",id:22},forceSourceItemId:{type:"string",id:23},parseDomain:{type:"bool",id:24},implementationType:{type:"ProtoImplementationType",id:25},queryJsTargeting:{keyType:"string",type:"string",id:26},isConsentConnatix:{type:"bool",id:27,options:{default:!0}},reloadedPlayers:{keyType:"string",type:"string",id:29},disableTracking:{type:"bool",id:31},referrer:{type:"string",id:32},localTimestamp:{type:"int64",id:33},customParam4:{type:"string",id:34},customParam5:{type:"string",id:35},forceMediaIdList:{rule:"repeated",type:"string",id:36}}},ProtoPlaylistItem:{oneofs:{ra:{oneof:["insightsRevisionNumber"]}},fields:{insightsRevisionNumber:{type:"int32",id:4,options:{proto3_optional:!0}},mediaId:{type:"string",id:1},revisionNumber:{type:"int32",id:2},mediaContentVersionId:{type:"string",id:3}}},ProtoElements:{fields:{playerId:{type:"string",id:1},playbackMode:{type:"ProtoPlayerPlaybackModeEnum",id:2},soundMode:{type:"ProtoPlayerSoundMode",id:3},upNextMode:{type:"ProtoPlayerUpNextMode",id:4,options:{default:1}},containerSelector:{type:"string",id:5},position:{type:"int32",id:6},insertPosition:{type:"ProtoPlayerInsertMode",id:7},forceInsertPath:{type:"bool",id:8},renderInFrame:{type:"bool",id:9},scrollHijackingProtection:{type:"bool",id:10},preRollBreak:{type:"int32",id:11},postRollBreak:{type:"int32",id:12},midRollNumber:{type:"int32",id:13,options:{default:-1}},timeBetweenAds:{type:"int32",id:14},minTimeBeforeFirstAd:{type:"int32",id:15},adViewabilityPolicy:{type:"ProtoAdViewabilityPolicy",id:16},responsive:{type:"bool",id:18},ratioWidth:{type:"int32",id:19},ratioHeight:{type:"int32",id:20},fixedWidth:{type:"int32",id:21},fixedHeight:{type:"int32",id:22},casting:{type:"bool",id:23},sharingDestinations:{rule:"repeated",type:"ProtoSharingDestination",id:24,options:{packed:!1}},closedCaption:{type:"bool",id:25},muteWatermark:{type:"bool",id:26},expandButton:{type:"bool",id:27},closeButtonMode:{type:"ProtoPlayerCloseButtonMode",id:28},floatingMode:{type:"ProtoPlayerFloatingMode",id:29},floatingDeviceMode:{rule:"repeated",type:"ProtoDeviceType",id:30,options:{packed:!1}},floatingCloseButtonMode:{type:"ProtoPlayerCloseButtonMode",id:31},floatingFixedPosition:{type:"ProtoFloatingFixedPositionMode",id:32},floatingPageElement:{type:"string",id:33},floatingUseElementWidth:{type:"bool",id:34},floatingScrollPosition:{type:"ProtoPositionMode",id:35},floatingGutterX:{type:"int32",id:36},floatingGutterY:{type:"int32",id:37},floatingWidth:{type:"int32",id:38},iconsColor:{type:"string",id:39},accentColor:{type:"string",id:40},tooltipTextColor:{type:"string",id:41},tooltipBackgroundColor:{type:"string",id:42},html:{type:"string",id:43},galleryStyle:{type:"ProtoGalleryStyleMode",id:45},logoPosition:{type:"ProtoLogoPositionMode",id:46},lineItems:{rule:"repeated",type:"ProtoLineItem",id:49},adPlaybackMode:{type:"ProtoAdPlaybackMode",id:50},css:{type:"string",id:51},sessionId:{type:"string",id:52},playlistId:{type:"string",id:53},playerType:{type:"ProtoElementsTypeEnum",id:54},outstreamInitialRendering:{type:"ProtoOutstreamInitialRenderingEnum",id:55},outstreamHouseBackgroundColor:{type:"string",id:56},outstreamTotalAdBreakLength:{type:"int32",id:57},outstreamEndAdBreakPolicy:{type:"ProtoOutstreamEndAdBreakPolicyEnum",id:58},galleryOrientation:{type:"ProtoGalleryOrientationEnum",id:59},playlist:{rule:"repeated",type:"ProtoPlaylistItem",id:60},floatingAppendLocation:{type:"ProtoFloatingAppendLocationEnum",id:61},floatingYAxisPadding:{type:"int32",id:62},customJsCode:{type:"string",id:63},videoQuality:{type:"ProtoVideoQuality",id:64},initializationSettingsJson:{type:"string",id:65},skipAdAfter:{type:"int32",id:67,options:{default:5}},adBreaks:{rule:"repeated",type:"ProtoAdBreak",id:68},amazonTamSlotId:{type:"string",id:69},midRollOnlyOnLongContent:{type:"bool",id:70,options:{default:!0}},limitClientSideApiUse:{type:"bool",id:71},abTestId:{type:"string",id:72},skipMin:{type:"int32",id:73,options:{default:31}},skippability:{type:"ProtoPlayerSkippabilityType",id:74},logoResource:{type:"string",id:76},nonlinearPlayerSettings:{type:"ProtoNonlinearPlayerSettings",id:77},displayAdCountdown:{type:"bool",id:78},bandwidthLoggingState:{type:"ProtoBandwidthLoggingEnum",id:79}}},ProtoElementsResponse:{fields:{errorMessage:{type:"string",id:1},players:{rule:"repeated",type:"ProtoElements",id:10},browser:{type:"Browser",id:11},geoLocation:{type:"GeoLocation",id:12},lineItems:{rule:"repeated",type:"ProtoLineItem",id:13},cookieSyncUrls:{keyType:"int32",type:"string",id:14},explorationMode:{type:"bool",id:15},supplyChain:{type:"ProtoSupplyChain",id:17},secondLevelDomain:{type:"string",id:18},userInformation:{type:"ProtoUserInformation",id:20},serverAb0:{type:"int32",id:21},serverAb1:{type:"int32",id:22},isSeoTraffic:{type:"bool",id:23},apiHostUrl:{type:"string",id:24},publisherNetworkCode:{type:"string",id:26},iOSAppID:{type:"string",id:27},hashedPageUrl:{type:"string",id:28},bundleAbId:{type:"string",id:29},bundlePart:{type:"string",id:30}}},ProtoLineItemAdBreakTargeting:{fields:{adRollType:{type:"ProtoAdBreakTypeEnum",id:1},adBreakTypeEnum:{type:"ProtoLineItemAdBreakTypeEnum",id:2}}},ProtoLineItemAdPodTargeting:{fields:{targetingType:{type:"ProtoLineItemTargetingTypeEnum",id:1},adSlotTargetingType:{type:"ProtoLineItemAdSlotTargetingTypeEnum",id:2},adSlotPositions:{rule:"repeated",type:"int32",id:3,options:{packed:!1}}}},ProtoLineItemAdBreakSettings:{fields:{adBreakTargeting:{rule:"repeated",type:"ProtoLineItemAdBreakTargeting",id:1},adPodTargeting:{type:"ProtoLineItemAdPodTargeting",id:2}}},ProtoLineItem:{oneofs:{ta:{oneof:["predictedFloorPrice"]}},fields:{predictedFloorPrice:{type:"double",id:49,options:{proto3_optional:!0}},publisherLineItemId:{type:"string",id:1},advertiserLineItemId:{type:"string",id:2},adTag:{type:"string",id:3},creativeType:{type:"ProtoCreativeTypeEnum",id:4},sound:{type:"bool",id:6},viewability:{type:"bool",id:7},impressionTimeSpent:{type:"int32",id:9},vendorId:{type:"string",id:10},trackers:{rule:"repeated",type:"CreativeTrackerViewModel",id:12},duration:{type:"int32",id:13},renditions:{rule:"repeated",type:"ProtoRendition",id:14},mediaCreativeId:{type:"string",id:15},ignoreFilledRequests:{type:"bool",id:16},requestCap:{type:"int32",id:17,options:{default:3}},impressionCap:{type:"int32",id:18},successRate:{type:"double",id:19},lineItemPriority:{type:"ProtoLineItemPriority",id:20},headerBidderBids:{type:"string",id:21},headerBidderTimeout:{type:"int32",id:22},mediaCreativeClickUrl:{type:"string",id:23},resetRequestsCapTime:{type:"int32",id:24,options:{default:60}},resetImpressionsCapTime:{type:"int32",id:25,options:{default:60}},resetCapType:{type:"ProtoResetCapTypeEnum",id:26},creativeHlsFileName:{type:"string",id:27},timeBetweenRequests:{type:"int32",id:28},skipMode:{type:"ProtoAdSkipMode",id:29},mediaIdTargeting:{type:"ProtoTargetingChoiceModel",id:30},mediaKeywordsTargeting:{type:"ProtoTargetingChoiceModel",id:31},mediaLanguageTargeting:{type:"ProtoTargetingChoiceModel",id:32},adType:{type:"ProtoAdType",id:33},overlayTime:{type:"int32",id:34,options:{default:30}},floorPrice:{type:"double",id:35},adBreakSettings:{type:"ProtoLineItemAdBreakSettings",id:36},floorPrices:{rule:"repeated",type:"double",id:38,options:{packed:!1}},bidRate:{type:"double",id:39},pauseAdOutOfView:{type:"ProtoLineItemPauseAdOutOfViewEnum",id:40},moatTrackingEnabled:{type:"bool",id:41},cnxCreativeId:{type:"string",id:42},blockedDomainsRevisionNumber:{type:"int32",id:44},advertiserContextualTargeting:{rule:"repeated",type:"ProtoContextualTargetingCaseModel",id:45},publisherContextualTargeting:{rule:"repeated",type:"ProtoContextualTargetingCaseModel",id:46},playerSizeTargetings:{type:"ProtoPlayerSizeTargetings",id:47},amazonDealId:{type:"string",id:48},playerOrientationTargeting:{type:"ProtoPlayerOrientationTargetingEnum",id:50},skipMin:{type:"int32",id:51,options:{default:6}},skippability:{type:"ProtoLineItemSkippabilityType",id:52},forceCallingInEveryAO:{type:"bool",id:53},networkExpiryTimeSeconds:{type:"int32",id:54,options:{default:21600}},nonlinearLineItemSettings:{type:"ProtoNonlinearLineItemSettings",id:55},floorPriceData:{rule:"repeated",type:"FloorPriceModel",id:56},playerSize:{type:"string",id:101}}},ProtoTargetingChoiceModel:{fields:{choiceCriteria:{type:"ProtoChoiceCriteriaEnum",id:1},items:{rule:"repeated",type:"string",id:2}}},ProtoContextualTargetingCaseModel:{fields:{filters:{rule:"repeated",type:"ProtoContextualTargetingFilterModel",id:1}}},ProtoContextualTargetingFilterModel:{fields:{type:{type:"ProtoLineItemContextualTargetingEnum",id:1},items:{rule:"repeated",type:"string",id:2},level:{type:"ProtoContextualTargetingLevelEnum",id:3},hashedItemsIds:{rule:"repeated",type:"string",id:4}}},ProtoPlayerSizeTargetings:{fields:{sizeChoiceCriteria:{type:"ProtoSizeChoiceCriteriaEnum",id:1},minWidth:{type:"int32",id:2},maxWidth:{type:"int32",id:3}}},FloorPriceModel:{fields:{price:{type:"double",id:1},factor:{type:"double",id:2}}},CreativeTrackerViewModel:{fields:{type:{type:"ProtoTrackerType",id:1},trigger:{type:"ProtoTrackerTriggerType",id:2},url:{type:"string",id:3}}},ProtoRendition:{fields:{height:{type:"int32",id:1},codec:{type:"string",id:2},file:{type:"string",id:3}}},ProtoNonlinearLineItemSettings:{fields:{nonLinearRequestType:{type:"ProtoNonlinearRequestType",id:1},nonLinearAdTimeSeconds:{type:"int32",id:2,options:{default:15}}}},Browser:{fields:{browserVersion:{type:"string",id:1},browserType:{type:"string",id:2},osCode:{type:"string",id:3},device:{type:"ProtoDeviceType",id:4}}},GeoLocation:{fields:{countryGeoId:{type:"int32",id:1},cityId:{type:"int32",id:2},subdivisionId:{type:"int32",id:3},dmaId:{type:"int32",id:4},ip:{type:"string",id:5},lat:{type:"double",id:6},lon:{type:"double",id:7},zipcode:{type:"string",id:8}}},ProtoSupplyChain:{fields:{businessDomain:{type:"string",id:1},supplyChainId:{type:"string",id:3}}},ProtoUserInformation:{fields:{userId:{type:"string",id:1},lookupId:{type:"string",id:3},lookupResponseCode:{type:"int32",id:4},callFraudSensor:{type:"bool",id:5},publisherAdsTxt:{type:"string",id:6}}},ProtoAdBreak:{fields:{types:{rule:"repeated",type:"ProtoAdBreakTypeEnum",id:1,options:{packed:!1}},maxAdPodDuration:{type:"int32",id:2},maxAdSlotDuration:{type:"int32",id:3,options:{default:180}},numberOfAdSlots:{type:"int32",id:4,options:{default:1}}}},ProtoNonlinearPlayerSettings:{fields:{numberOfNonlinearAds:{type:"int32",id:1},timeSecondsBetweenNonlinear:{type:"int32",id:2,options:{default:5}},timeSecondsBetweenLinearAndNonlinear:{type:"int32",id:3}}},ProtoOutstreamInitialRenderingEnum:{values:{ExpandWithAd:0,FullyRendered:1}},ProtoOutstreamEndAdBreakPolicyEnum:{values:{Hide:0,HouseScreen:1,Loop:2}},ProtoGalleryStyleMode:{values:{None:0,Detailed:1,Visual:2}},ProtoLogoPositionMode:{values:{None:0,ControlBar:1,BottomRight:2,BottomLeft:3,TopRight:4,TopLeft:5,Center:6}},ProtoGalleryOrientationEnum:{values:{Landscape:0,Portrait:1}},ProtoElementsTypeEnum:{values:{InStream:0,OutStream:1,InStreamInApp:2,Live:3}},ProtoPlayerUpNextMode:{values:{Loop:0,Next:1,Stop:2}},ProtoCreativeTypeEnum:{values:{ThirdParty:0,MediaFile:1,Rtb:2,External:3,HeaderBidder:4,Tam:7,TamDeal:8,TamPrivateAuction:9}},ProtoResetCapTypeEnum:{values:{TimeCapping:0,ContentCapping:1,OpportunityCapping:2}},ProtoAdSlotsEnum:{values:{PreRoll:0,MidRoll:1,PostRoll:2}},ProtoLineItemPriority:{values:{House:0,Default:1,Preferred:2,Top:3}},ProtoAdSkipMode:{values:{IfLongerThan31Sec:0,Always:1,Never:2,NotAplicable:3}},ProtoAdType:{values:{Video:0,Overlay:1,Nonlinear:2}},ProtoChoiceCriteriaEnum:{values:{Only:0,Except:1}},ProtoLineItemAdBreakTypeEnum:{values:{All:1,SingleAd:2,AdPod:3}},ProtoLineItemTargetingTypeEnum:{values:{Only:0,Except:1}},ProtoLineItemAdSlotTargetingTypeEnum:{values:{SpecificSlots:1,Interval:2}},ProtoLineItemPauseAdOutOfViewEnum:{values:{Default:0,Strict:1}},ProtoLineItemContextualTargetingEnum:{values:{IncludeAny:0,IncludeAll:1,ExcludeAny:2,ExcludeAll:3}},ProtoSizeChoiceCriteriaEnum:{values:{GreaterThan:0,SmallerThan:1,Between:2}},ProtoPlayerOrientationTargetingEnum:{values:{Both:0,Portrait:1,Landscape:2}},ProtoLineItemSkippabilityType:{values:{AllowPublisherToDetermineSkippability:0,RequirePublisherToAllowNonSkipAdsShorterThan:1,NotApplicable:2}},ProtoContextualTargetingLevelEnum:{values:{Media:0,Page:1,Both:2}},ProtoTrackerType:{values:{Image:0,Javascript:1}},ProtoTrackerTriggerType:{values:{Impression:0,Complete25Pc:1,Complete50Pc:2,Complete75Pc:3,ViewCompletion:4,VideoClick:5,Pause:6,Resume:7,Mute:8,Unmute:9}},ProtoPlayerPlaybackModeEnum:{values:{Autoplay:0,ScrollToPlay:1,ClickToPlay:2}},ProtoPlayerCloseButtonMode:{values:{Off:0,OnHover:1,OnHoverAfterFirstAd:2,AlwaysOn:3}},ProtoPlayerFloatingMode:{values:{Off:0,OnPageLoad:1,AfterInView:2,Always:3}},ProtoPlayerSoundMode:{values:{Mute:0,On:1,Hover:2}},ProtoPlayerInsertMode:{values:{WithinContainer:0,BeforeContainer:1,AfterContainer:2,ReplaceContainer:3,HideContainer:4}},ProtoAdViewabilityPolicy:{values:{Default:0,Strict:1}},ProtoSharingDestination:{values:{Facebook:0,Twitter:1,LinkedIn:2}},ProtoFloatingFixedPositionMode:{values:{Page:0,Element:1}},ProtoPositionMode:{values:{BottomRight:0,BottomLeft:1,TopRight:2,TopLeft:3}},ProtoAdPlaybackMode:{values:{Autoplay:0,ScrollToPlay:1}},ProtoFloatingAppendLocationEnum:{values:{Above:0,Below:1,Within:2}},ProtoPlayerAdSkippability:{values:{IfLongerThan:0,Always:1,NoRestrictions:2}},ProtoVideoQuality:{values:{Auto:0,High1080p:1,High720p:2,Medium360p:3}},ProtoImplementationType:{values:{Web:0,Amp:1}},ProtoAdBreakTypeEnum:{values:{None:0,PreRoll:1,MidRoll:2,PostRoll:3}},ProtoAdSlotAdTypeEnum:{values:{SingleAd:0,AdPod:1}},ProtoPlayerSkippabilityType:{values:{AllowNonSkipAdsIfTheyAreShorterThan:0,RequireAdsToBeSkippable:1}},ProtoBandwidthLoggingEnum:{values:{Disabled:0,Enabled:1,SaaS:2}},ProtoNonlinearRequestType:{values:{Banner:0,Video:1}},ProtoDeviceType:{values:{Desktop:0,Smartphone:1,Tablet:2,GameConsole:3,SmartTV:4,WearableComputer:5,PDA:6,Unrecognized:7}}})})?s.apply(i,n):s)||(t.exports=r)},3204:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 32 22"><path d="M26,22H0V0H31.93L32,16A6,6,0,0,1,26,22Z" style="fill:#ffc800;fill-rule:evenodd"/><path d="M12,5.29h0L16.45,16.7H14.83l-1.06-2.85H8.86l-1,2.85H6.21L10.6,5.31h0Zm5.89,11.42V5.29h3.63A5.52,5.52,0,0,1,26.65,11a5.33,5.33,0,0,1-4.93,5.7H17.89Zm1.46-1.36h2.17c1.77,0,3.7-1.49,3.7-4.35s-1.93-4.28-3.7-4.28H19.35Zm-8-8.16-2,5.24h3.86Z" style="fill-rule:evenodd"/></svg>\n'},3653:t=>{"use strict";t.exports='<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><g fill="#FFF" fill-rule="evenodd"><rect class="cnx-live-icon-svg-rectangle" transform="rotate(90 22.06 21.43)" x="20.059" y="15.929"/><path d="M37.598 7.541c7.955 7.972 8.036 20.846.243 28.918l-.243.248-1.77-1.765c6.985-7 7.062-18.302.233-25.397l-.233-.238 1.77-1.766zm-4.722 5.225c4.34 4.926 4.415 12.803.224 17.831l-.224.262L31 29.206c3.515-3.989 3.583-10.465.203-14.55L31 14.42l1.876-1.653z" fill-rule="nonzero" opacity=".5"/><path d="M6.598 7.541c7.955 7.972 8.036 20.846.243 28.918l-.243.248-1.77-1.765c6.985-7 7.062-18.302.233-25.397l-.233-.238 1.77-1.766zm-4.722 5.225c4.34 4.926 4.415 12.803.224 17.831l-.224.262L0 29.206c3.515-3.989 3.583-10.465.203-14.55L0 14.42l1.876-1.653z" fill-rule="nonzero" opacity=".5" transform="matrix(-1 0 0 1 12.626 0)"/></g></svg>'},1505:t=>{"use strict";t.exports='<svg viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><g fill="none" fill-rule="nonzero"><path d="M22 15.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13z" fill="#FFF"/><path d="M22 18a4 4 0 110 8 4 4 0 010-8z" fill="#FF4047"/><path d="M37.598 7.541c7.955 7.972 8.036 20.846.243 28.918l-.243.248-1.77-1.765c6.985-7 7.062-18.302.233-25.397l-.233-.238 1.77-1.766zm-4.722 5.225c4.34 4.926 4.415 12.803.224 17.831l-.224.262L31 29.206c3.515-3.989 3.583-10.465.203-14.55L31 14.42l1.876-1.653z" fill="#FFF"/><path d="M6.598 7.541c7.955 7.972 8.036 20.846.243 28.918l-.243.248-1.77-1.765c6.985-7 7.062-18.302.233-25.397l-.233-.238 1.77-1.766zm-4.722 5.225c4.34 4.926 4.415 12.803.224 17.831l-.224.262L0 29.206c3.515-3.989 3.583-10.465.203-14.55L0 14.42l1.876-1.653z" fill="#FFF" transform="matrix(-1 0 0 1 12.626 0)"/></g></svg>'},2040:t=>{"use strict";t.exports='<svg class="cnx-color-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M21 3H3c-1.1 0-2 .9-2 2v3h2V5h18v14h-7v2h7c1.1 0 2-.9 2-2V5c0-1.1-.9-2-2-2zM1 18v3h3c0-1.66-1.34-3-3-3zm0-4v2c2.76 0 5 2.24 5 5h2c0-3.87-3.13-7-7-7zm0-4v2c4.97 0 9 4.03 9 9h2c0-6.08-4.93-11-11-11z" fill-rule="evenodd"/></svg>\n'},1215:t=>{"use strict";t.exports='<svg viewBox = "0 0 22 22" class="cnx-color-icon" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" ><path d="M18 5.4L16.6 4 11 9.6 5.4 4 4 5.4 9.6 11 4 16.6 5.4 18l5.6-5.6 5.6 5.6 1.4-1.4-5.6-5.6z"/></svg>\n'},5522:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 73 18"><path d="M32.266 8.293c-.105.902-.439 1.6-1.002 2.092s-1.303.732-2.233.732c-1.008 0-1.816-.361-2.426-1.084s-.908-1.689-.908-2.9v-.82c0-.793.141-1.49.422-2.092s.688-1.062 1.207-1.383 1.121-.486 1.805-.486c.906 0 1.633.254 2.18.762s.865 1.203.955 2.098h-1.131c-.098-.68-.311-1.172-.639-1.477s-.779-.457-1.365-.457c-.719 0-1.283.266-1.693.797s-.609 1.287-.609 2.268v.826c0 .926.193 1.662.58 2.209s.928.82 1.623.82c.625 0 1.104-.141 1.436-.422s.559-.779.668-1.482h1.131zM34.815 11h-1.084V2h1.084v9zm1.453-3.229c0-.621.121-1.18.363-1.676s.586-.879 1.02-1.148a2.79 2.79 0 0 1 1.494-.404c.863 0 1.561.299 2.092.897s.803 1.393.803 2.385V7.9c0 .617-.119 1.172-.357 1.664a2.67 2.67 0 0 1-1.014 1.143c-.437.273-.941.41-1.512.41-.859 0-1.557-.299-2.092-.896s-.797-1.389-.797-2.373v-.076zm1.09.129c0 .703.162 1.268.486 1.693a1.57 1.57 0 0 0 1.312.639c.551 0 .988-.215 1.313-.645s.486-1.039.486-1.816c0-.695-.166-1.258-.498-1.687a1.56 1.56 0 0 0-1.312-.65c-.535 0-.967.213-1.295.639s-.492 1.035-.492 1.828zm9.732 1.418c0-.293-.111-.52-.334-.68s-.604-.305-1.154-.422-.982-.258-1.307-.422-.559-.359-.715-.586-.229-.496-.229-.809c0-.52.219-.959.656-1.318s1.004-.539 1.688-.539c.719 0 1.301.186 1.746.557s.674.846.674 1.424h-1.09c0-.297-.127-.553-.381-.768s-.566-.322-.949-.322c-.395 0-.703.086-.926.258a.81.81 0 0 0-.334.674c0 .262.104.459.311.592s.58.26 1.119.381.983.266 1.318.434.584.371.744.609a1.5 1.5 0 0 1 .246.861 1.63 1.63 0 0 1-.68 1.365c-.453.34-1.041.51-1.764.51-.508 0-.957-.09-1.348-.27s-.697-.43-.92-.75a1.84 1.84 0 0 1-.328-1.049h1.084c.02.363.164.652.433.867s.633.316 1.078.316c.41 0 .738-.082.984-.246a.77.77 0 0 0 .375-.668zm5.127 1.799c-.859 0-1.559-.281-2.098-.844s-.809-1.322-.809-2.267v-.199c0-.629.119-1.189.358-1.682s.578-.883 1.008-1.16a2.56 2.56 0 0 1 1.406-.422c.824 0 1.465.271 1.922.814s.686 1.32.686 2.332v.451h-4.295c.016.625.197 1.131.545 1.518s.797.574 1.336.574c.383 0 .707-.078.973-.234a2.44 2.44 0 0 0 .697-.621l.662.516c-.531.816-1.328 1.225-2.391 1.225zm-.135-5.684a1.44 1.44 0 0 0-1.102.481c-.297.316-.48.762-.551 1.336h3.176v-.082c-.031-.551-.18-.977-.445-1.277s-.625-.457-1.078-.457zM62.84 11c-.062-.125-.113-.348-.152-.668-.504.523-1.105.785-1.805.785-.625 0-1.139-.176-1.541-.527a1.71 1.71 0 0 1-.598-1.348c0-.66.25-1.172.75-1.535s1.211-.551 2.121-.551h1.055v-.498c0-.379-.113-.68-.34-.902s-.561-.34-1.002-.34c-.387 0-.711.098-.973.293s-.393.432-.393.709h-1.09c0-.316.111-.621.334-.914s.531-.531.914-.703.811-.258 1.272-.258c.73 0 1.303.184 1.717.551s.629.865.645 1.506v2.918c0 .582.074 1.045.223 1.389V11H62.84zm-1.799-.826c.34 0 .662-.088.967-.264s.525-.404.662-.686v-1.3h-.85c-1.328 0-1.992.389-1.992 1.166 0 .34.113.605.34.797s.517.287.873.287zm4.148-2.396c0-.973.23-1.754.691-2.344a2.18 2.18 0 0 1 1.811-.891c.742 0 1.33.254 1.764.762V2h1.084v9h-.996l-.053-.68c-.434.531-1.037.797-1.811.797a2.17 2.17 0 0 1-1.799-.902c-.461-.601-.691-1.387-.691-2.355v-.082zm1.084.123c0 .719.148 1.281.445 1.687s.707.609 1.23.609c.688 0 1.189-.309 1.506-.926V6.359a1.59 1.59 0 0 0-1.494-.896c-.531 0-.945.205-1.242.615s-.445 1.018-.445 1.822zM16 1.41L14.59 0 9 5.59 3.41 0 2 1.41 7.59 7 2 12.59 3.41 14 9 8.41 14.59 14 16 12.59 10.41 7 16 1.41z"/></svg>'},7089:t=>{"use strict";t.exports='<svg viewBox="0 0 25 25" xmlns="http://www.w3.org/2000/svg" fill-rule="evenodd"><path d="M5 21.453c2.022 1.627 4.6 2.602 7.387 2.602 3.973 0 7.485-1.967 9.622-4.977l-4.596-3.34a3.87 3.87 0 0 0-4.548 0L5 21.453zM22 4.977A11.75 11.75 0 0 0 12.387 0 11.74 11.74 0 0 0 5 2.602l7.9 5.74a3.81 3.81 0 0 0 4.479 0l4.63-3.364zm1.563 11.395c.494-1.3.767-2.712.767-4.186S24.057 9.3 23.563 8l-3.858 2.803a1.71 1.71 0 0 0 0 2.766l3.858 2.803z" fill="#fff"/><path d="M2.378 5c-.024-.017-.057-.012-.074.01A11.74 11.74 0 0 0 0 12.025a11.74 11.74 0 0 0 2.304 7.004c.017.023.05.028.074.01l8.013-5.822c.81-.59.81-1.797 0-2.386L2.378 5z" fill="#09f"/></svg>\n'},89:t=>{"use strict";t.exports='<svg class="cnx-color-icon" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" viewBox="0 0 22 22"><path d="M11 7c1.1 0 2-.9 2-2s-.9-2-2-2-2 .9-2 2 .9 2 2 2zm0 2c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2zm0 6c-1.1 0-2 .9-2 2s.9 2 2 2 2-.9 2-2-.9-2-2-2z" /></svg>\n'},4670:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="2 2 20 20"><path d="M14 3v2h3.59l-9.83 9.83 1.41 1.41L19 6.41V10h2V3m-2 16H5V5h7V3H5a2 2 0 00-2 2v14a2 2 0 002 2h14a2 2 0 002-2v-7h-2v7z"/></svg>'},1639:t=>{"use strict";t.exports='<svg class="cnx-color-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M9 21H3V3h6v18zm12 0h-6V3h6v18z" fill-rule="evenodd"/></svg>\n'},834:t=>{"use strict";t.exports='<svg class="cnx-color-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5 4v16l16-8z" fill-rule="evenodd"/></svg>\n'},9335:t=>{"use strict";t.exports='<svg class="cnx-color-icon" xmlns="http://www.w3.org/2000/svg"><path d="M8.6 16.6l4.58-4.6L8.6 7.4 10 6l6 6-6 6-1.4-1.4z"/></svg>\n'},8808:t=>{"use strict";t.exports='<svg class="cnx-color-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18 16.08c-.76 0-1.44.3-1.96.77L8.9 12.7c.05-.23.1-.46.1-.7s-.04-.47-.1-.7l7.05-4.1c.54.5 1.25.8 2.04.8 1.66 0 3-1.34 3-3s-1.34-3-3-3-3 1.34-3 3c0 .24.04.47.1.7L8.04 9.8C7.5 9.3 6.8 9 6 9c-1.66 0-3 1.34-3 3s1.34 3 3 3c.8 0 1.5-.3 2.04-.8l7.12 4.16a2.82 2.82 0 0 0-.08.65c0 1.6 1.3 2.92 2.92 2.92s2.92-1.3 2.92-2.92-1.3-2.92-2.92-2.92z" fill-rule="evenodd"/></svg>\n'},9040:t=>{"use strict";t.exports='<svg class="cnx-color-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18 21h3V3h-3v18zM3 21l14-9L3 3v18z" fill-rule="evenodd"/></svg>'}},i={},e,s,n,r,h;function o(e){var s=i[e];if(void 0!==s)return s.exports;var n=i[e]={id:e,loaded:!1,exports:{}};return t[e].call(n.exports,n,n.exports,o),n.loaded=!0,n.exports}o.m=t,e=[],o.O=(t,i,s,n)=>{if(!i){var r=1/0;for(l=0;l<e.length;l++){for(var[i,s,n]=e[l],h=!0,a=0;a<i.length;a++)(!1&n||r>=n)&&Object.keys(o.O).every((t=>o.O[t](i[a])))?i.splice(a--,1):(h=!1,n<r&&(r=n));if(h){e.splice(l--,1);var c=s();void 0!==c&&(t=c)}}return t}n=n||0;for(var l=e.length;l>0&&e[l-1][2]>n;l--)e[l]=e[l-1];e[l]=[i,s,n]},o.F={},o.E=t=>{Object.keys(o.F).map((i=>{o.F[i](t)}))},o.n=t=>{var i=t&&t.B?()=>t.default:()=>t;return o.d(i,{a:i}),i},n=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,o.t=function(t,i){if(1&i&&(t=this(t)),8&i)return t;if("object"==typeof t&&t){if(4&i&&t.B)return t;if(16&i&&"function"==typeof t.then)return t}var e=Object.create(null);o.r(e);var r={};s=s||[null,n({}),n([]),n(n)];for(var h=2&i&&t;"object"==typeof h&&!~s.indexOf(h);h=n(h))Object.getOwnPropertyNames(h).forEach((i=>r[i]=()=>t[i]));return r.default=()=>t,o.d(e,r),e},o.d=(t,i)=>{for(var e in i)o.o(i,e)&&!o.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:i[e]})},o.f={},o.e=t=>Promise.all(Object.keys(o.f).reduce(((i,e)=>(o.f[e](t,i),i)),[])),o.u=t=>{if("hls"===t)return"hls.5b3b785f487abbe00eee.js"},o.miniCssF=t=>{},o.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),o.o=(t,i)=>Object.prototype.hasOwnProperty.call(t,i),r={},h="Connatix.Player:",o.l=(t,i,e,s)=>{if(r[t])r[t].push(i);else{var n,a;if(void 0!==e)for(var c=document.getElementsByTagName("script"),l=0;l<c.length;l++){var u=c[l];if(u.getAttribute("src")==t||u.getAttribute("data-webpack")==h+e){n=u;break}}n||(a=!0,(n=document.createElement("script")).charset="utf-8",n.timeout=120,o.nc&&n.setAttribute("nonce",o.nc),n.setAttribute("data-webpack",h+e),n.src=t),r[t]=[i];var d=(i,e)=>{n.onerror=n.onload=null,clearTimeout(p);var s=r[t];if(delete r[t],n.parentNode&&n.parentNode.removeChild(n),s&&s.forEach((t=>t(e))),i)return i(e)},p=setTimeout(d.bind(null,void 0,{type:"timeout",target:n}),12e4);n.onerror=d.bind(null,n.onerror),n.onload=d.bind(null,n.onload),a&&document.head.appendChild(n)}},o.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"B",{value:!0})},o.nmd=t=>(t.paths=[],t.children||(t.children=[]),t),(()=>{var t;o.g.importScripts&&(t=o.g.location+"");var i=o.g.document;if(!t&&i&&(i.currentScript&&(t=i.currentScript.src),!t)){var e=i.getElementsByTagName("script");e.length&&(t=e[e.length-1].src)}if(!t)throw new Error("Automatic publicPath is not supported in this browser");t=t.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),o.p=t})(),(()=>{var t={"connatix.player":0,player:0};o.f.j=(i,e)=>{var s=o.o(t,i)?t[i]:void 0;if(0!==s)if(s)e.push(s[2]);else{var n=new Promise(((e,n)=>s=t[i]=[e,n]));e.push(s[2]=n);var r=o.p+o.u(i),h=new Error;o.l(r,(e=>{if(o.o(t,i)&&(0!==(s=t[i])&&(t[i]=void 0),s)){var n=e&&("load"===e.type?"missing":e.type),r=e&&e.target&&e.target.src;h.message="Loading chunk "+i+" failed.\n("+n+": "+r+")",h.name="ChunkLoadError",h.type=n,h.request=r,s[1](h)}}),"chunk-"+i,i)}},o.F.j=i=>{if(!o.o(t,i)||void 0===t[i]){t[i]=null;var e=document.createElement("link");o.nc&&e.setAttribute("nonce",o.nc),e.rel="prefetch",e.as="script",e.href=o.p+o.u(i),document.head.appendChild(e)}},o.O.j=i=>0===t[i];var i=(i,e)=>{var s,n,[r,h,a]=e,c=0;if(r.some((i=>0!==t[i]))){for(s in h)o.o(h,s)&&(o.m[s]=h[s]);if(a)var l=a(o)}for(i&&i(e);c<r.length;c++)n=r[c],o.o(t,n)&&t[n]&&t[n][0](),t[n]=0;return o.O(l)},e=self.webpackChunkConnatix_Player=self.webpackChunkConnatix_Player||[];e.forEach(i.bind(null,0)),e.push=i.bind(null,e.push.bind(e))})(),o.O(0,["connatix.player"],(()=>{o.E("hls")}),5);var a={};(()=>{"use strict";o(8660);var t,i=o(45),e=o(1561),s=o(7726);!function(t){t.connatix="connatix.com",t.elements="elements.video"}(t||(t={}));const n={[t.connatix]:"cnx",[t.elements]:"cnxel"};const r=function(i){if(!i||!(0,e.NN)(i))return(0,s.n)({message:"Prerender_Elements_getBundleDomain_no_currentScript",level:s.D.CRITICAL}),null;const n=i.src;return n.includes(t.elements)?t.elements:n.includes(t.connatix)?t.connatix:((0,s.n)({message:"Prerender_Elements_getBundleDomain_unkown_src",level:s.D.CRITICAL}),null)}(window.document.currentScript);let h=`//cds.${r}/p/${i.g.version}/`;o.p=h;var a,c=o(7272),l=(o(6450),o(289)),u=o(8804),d=o(5880),p=o(782),f=o(3030),m=o(2820);!function(t){t.Deprecation="deprecation",t.Intervention="intervention",t.Crash="crash"}(a||(a={}));class g{constructor(t,i,e){this.$e=t,this.ha=i,this.oa=e,this.aa=!1,this.ca=!1,this.la=()=>{"hidden"===this.$e.document.visibilityState&&this.ua()},this.ua=()=>{if(this.aa||!this.da)return;const t=this.da.takeRecords();this.pa(t),this.aa=!0},this.pa=t=>{t.filter((({body:t})=>"HeavyAdIntervention"===(null==t?void 0:t.id))).forEach((()=>{this.ha.trackHeavyAdIntervention(this.oa)}))},this.Yo()}destroy(){this.ca&&(this.$e.removeEventListener("pagehide",this.ua),this.$e.removeEventListener("visibilitychange",this.la))}fa(){return!!this.$e.ReportingObserver}Yo(){this.fa()&&(this.ca=!0,this.da=new this.$e.ReportingObserver((t=>{this.pa(t)}),{buffered:!0,types:[a.Intervention]}),this.da.observe(),this.$e.addEventListener("pagehide",this.ua),this.$e.addEventListener("visibilitychange",this.la))}}var v,y,b,x,w=o(4280),_=o(497);class S extends d._{constructor(t,i,e,s,n){super(),this.mediator=t,this.playerModel=i,this.app=e,this.ma=s,this._appSettings=n,this.macroElements={player:[]},this.ga=!1,this.va={description:"{{description}}",title:"{{title}}",player:"{{player}}"},this.ya=null,this.ba=500,this.createExperience(i,n),this.xa=new g(i.global,this.app.services.TrackingService,{heavyAdBlockTypeEnum:l.ProtoHeavyAdBlockTypeEnum.Global}),this.wa=new g(window,this.app.services.TrackingService,{heavyAdBlockTypeEnum:l.ProtoHeavyAdBlockTypeEnum.Script})}subscribeToEvents(){this.subscribe(p.Uh.Destroy,this.experience,(()=>{this.destroy()})),this.subscribe(p.Uh.CanStart,this.experience,(()=>{this.experience.start()})),this.subscribe(p.Xh.SessionRendered,this.experience,(()=>{this.ma.wasPlayerReloaded||this.app.services.TrackingService.trackSessionRendered(w._.isBannerBlocked),this.mediator.publish(this,p.Xh.SessionRendered)})),this.subscribe(p.Xh.SessionView,this.experience,(()=>{this.ma.wasPlayerInView||(this.app.services.TrackingService.trackSessionViewability(),this.mediator.publish(this,p.Xh.SessionView))})),Object.values(this.experience.events).forEach((t=>{this.subscribe(t,this.experience,(i=>{this.experienceApi.trigger(t,i.payload)}))}))}updateMacroContent(t,i){t&&t.forEach((t=>{t.textContent=i}))}le(){this.playerModel.css&&this.app.services.GlobalDomUtilsService.addCssString(this.playerModel.css,`cnx-custom-css-${this.app.config.appId}`)}_a(t){return`<cnx>${t}</cnx>`.replace(/{\{([^}]+)}}/g,"<cnx-span>$&</cnx-span>")}Sa(){if(this.experienceContainer=this.Aa(),this.playerModel.html){const t=this.app.services.GlobalDomUtilsService.createElementByString(this._a(this.playerModel.html));this.Pa(t);const i=this.macroElements.player[0];if(!i)throw Error("player macro was not found");i.innerHTML="",i.parentNode.insertBefore(this.experienceContainer,i),i.parentNode.removeChild(i);(0,f.Sz)(t.children).forEach((t=>{this.playerModel.targetContainer.parentNode.insertBefore(t,this.playerModel.targetContainer)}))}else this.playerModel.targetContainer.parentNode.insertBefore(this.experienceContainer,this.playerModel.targetContainer);this.playerModel.targetContainer.parentElement.removeChild(this.playerModel.targetContainer)}Aa(){const t=this.app.config.isMobile?m.s6.Mobile:m.s6.Desktop;return this.app.services.GlobalDomUtilsService.createElementByString(`<cnx class="${m.sN.MainContainer} ${t} ${this.Ia}"></cnx>`)}Pa(t){(0,f.Sz)(t.children).forEach((t=>{t.children.length>0&&this.Pa(t),Object.keys(this.va).forEach((i=>{const e=this.va[i];t.textContent.includes(e)&&this.ka(i,t)}))}))}ka(t,i){this.macroElements[t]||(this.macroElements[t]=[]),this.macroElements[t].push(i),i.textContent=""}Ca(){null!==this.ya&&(clearInterval(this.ya),this.ya=null)}init(t){this.le(),this.Sa();const i=this.app.config.device;return this.isSupportedBreakpoint(i)?(this.subscribeToEvents(),this.experience.Ta(this.playerModel,this.app,this.experienceContainer,t),this.ya=setInterval((()=>{this.ga?this.Ca():this.app.services.GlobalDomUtilsService.isDetachedFromDOM(this.experienceContainer)&&(this.destroy(),(0,s.n)({message:"player_removed_from_DOM",level:s.D.INFO}))}),this.ba),!0):(this.destroy(),!1)}getApiMethods(){return this.experienceApi.getApiMethods()}get playerContainer(){return this.experienceContainer}destroy(){try{_.S.playerDestroyed=!0,this.ga=!0,this.Ca(),this.app.services.TrackingService.destroy(),this.app.services.ResizeObserver.destroy(),this.app.services.ViewabilityService.destroy(),this.app.services.InteractionService.destroy(),this.experienceApi.setDestroyed(),this.unsubscribeAll(this.experience),this.experience&&(this.experience.destroy(),this.experience=null),this.experienceContainer.parentNode&&this.experienceContainer.parentNode.removeChild(this.experienceContainer),this.xa.destroy(),this.wa.destroy()}catch(t){(0,s.n)({callStack:t.stack,level:s.D.WARN,message:"Renderer_destroy",exception:t.message})}}}!function(t){t.Play="play",t.Playing="playing",t.Pause="pause",t.Mute="mute",t.Unmute="unmute",t.Canplay="canplay",t.Ended="ended",t.Timeupdate="timeupdate",t.Seeking="seeking",t.Seeked="seeked",t.Volumechange="volumechange",t.Durationchange="durationchange",t.Fullscreen="fullscreen",t.LoadedData="loadeddata",t.LoadedMetadata="loadedmetadata",t.Error="error"}(v||(v={})),function(t){t[t.Auto=0]="Auto",t[t.Strict=1]="Strict"}(y||(y={})),function(t){t[t.PlayingState=0]="PlayingState",t[t.PausedState=1]="PausedState",t[t.PrerollState=2]="PrerollState",t[t.PostrollState=3]="PostrollState",t[t.StoppedState=4]="StoppedState",t[t.ReplayState=5]="ReplayState",t[t.HiddenState=6]="HiddenState",t[t.BufferingState=7]="BufferingState",t[t.LiveStreamStarting=8]="LiveStreamStarting",t[t.LiveStreamEnded=9]="LiveStreamEnded",t[t.LiveStreamStopped=10]="LiveStreamStopped",t[t.LiveStreamNotSupported=11]="LiveStreamNotSupported"}(b||(b={})),function(t){t.H264="h264",t.Hevc="hevc"}(x||(x={}));const A="playError",P="newVideo",I="buffering",k="buffered",C="levelSwitching",T="endOfStream",M="liveNotPlayable",E="VideoQualityChanged",B="CurrentQuality",O="QualityListLoaded";var L;!function(t){t[t.Low144p=144]="Low144p",t[t.Low240p=240]="Low240p",t[t.Medium360p=360]="Medium360p",t[t.Medium480p=480]="Medium480p",t[t.High720p=720]="High720p",t[t.High1080p=1080]="High1080p"}(L||(L={}));const R="NewThumbnail",D=Object.assign(Object.assign({},p.dP),{FirstFramePlayed:"firstFramePlayed",ContentQuartiles:"contentQuartiles",MediaMetaUpdate:"mediaMetaUpdate",ChangeVideo:"changeVideo",VideoQueued:"videoQueued"}),j=Object.assign(Object.assign(Object.assign(Object.assign({},{VideoStarted:"videoStarted",VideoCompleted25:"videoCompleted25",VideoCompleted50:"videoCompleted50",VideoCompleted75:"videoCompleted75",VideoCompleted100:"videoCompleted100",NewVideo:"newVideo"}),{SubtitlesVisibilityChanged:"subtitlesVisibilityChanged"}),{PlayerClicked:"playerClicked"}),{GalleryCardClicked:"galleryCardClicked"}),V={Collapsed:"collapsed",AdCycleComplete:"adCycleComplete"};class F{constructor(t,i,e,s){this.Ma=t,this.Ea=s,this.Ba=this.Oa(e,i)}Oa(t,i){return Object.assign({},t[i]||t[l.ProtoDeviceType.Smartphone])}updateWidth(t){const i=this.La(t);i!==this.currentBreakpointClass&&((0,e.IV)(this.Ma,this.currentBreakpointClass),(0,e.cn)(this.Ma,i),this.currentBreakpointClass=i)}La(t){switch(!0){case t>=this.Ba.xxl:return this.Ea.Xxl;case t>=this.Ba.xl:return this.Ea.Xl;case t>=this.Ba.lg:return this.Ea.Lg;case t>=this.Ba.md:return this.Ea.Md;case t>=this.Ba.sm:return this.Ea.Sm;case t>=this.Ba.xs:return this.Ea.Xs;default:return this.Ea.Xxs}}}var $=o(7953);const N={xl:720,lg:320,md:204,sm:142,xs:0},U={[l.ProtoDeviceType.Desktop]:{xl:468,lg:388,md:248,sm:142,xs:0},[l.ProtoDeviceType.Tablet]:Object.assign({},N),[l.ProtoDeviceType.Smartphone]:Object.assign({},N)},H={xl:720,lg:320,md:204,sm:142,xs:0},q={[l.ProtoDeviceType.Desktop]:{xl:468,lg:388,md:248,sm:142,xs:0},[l.ProtoDeviceType.Tablet]:Object.assign({},H),[l.ProtoDeviceType.Smartphone]:Object.assign({},H)},z=176,W=160,G=144,J=112,Q={xl:H.xl+z,lg:H.lg+W,md:H.md+G,sm:H.sm+J},Y={[l.ProtoDeviceType.Desktop]:{xl:468+z,lg:388+W,md:248+G,sm:142+J,xs:0},[l.ProtoDeviceType.Tablet]:Object.assign({},Q),[l.ProtoDeviceType.Smartphone]:Object.assign({},Q)},X={lg:320,md:204,sm:0},Z={[l.ProtoDeviceType.Desktop]:{xl:468,lg:388,md:248,sm:0},[l.ProtoDeviceType.Tablet]:Object.assign({},X),[l.ProtoDeviceType.Smartphone]:Object.assign({},X)},K={xxl:1080,xl:0},tt={[l.ProtoDeviceType.Desktop]:{xxl:720,xl:0},[l.ProtoDeviceType.Tablet]:Object.assign({},K),[l.ProtoDeviceType.Smartphone]:Object.assign({},K)},it={[$.ProtoGalleryOrientationEnum.Landscape]:{[$.ProtoGalleryStyleMode.Detailed]:tt,[$.ProtoGalleryStyleMode.Visual]:Y},[$.ProtoGalleryOrientationEnum.Portrait]:{[$.ProtoGalleryStyleMode.Detailed]:Z,[$.ProtoGalleryStyleMode.Visual]:q}};var et;!function(t){t.MainContainer="cnx-scrollbar",t.Wrapper="cnx-scrollbar-wrapper",t.Content="cnx-scrollbar-content",t.Horizontal="cnx-scrollbar-horizontal",t.Handle="cnx-scrollbar-handle",t.PreventSelect="cnx-scrollbar-prevent-select",t.ShowOnHover="cnx-scrollbar-show-on-hover"}(et||(et={}));class st{constructor(t,i={}){if(this.Ra=t,this.zt=i,this.Da=0,this.ja=t=>{t.preventDefault(),this.Va=t.pageY,this.Fa=t.pageX,(0,e.cn)(this.$a,et.PreventSelect),(0,e.cn)(this.$e.document.body,et.PreventSelect),this.$e.document.addEventListener("mousemove",this.Na),this.$e.document.addEventListener("mouseup",this.Ua)},this.Na=t=>{const i=this.zt.horizontal?t.pageX-this.Fa:t.pageY-this.Va;this.Va=t.pageY,this.Fa=t.pageX,(0,e.PM)(this.$e,(()=>{this.zt.horizontal?this.Ha.scrollLeft+=i/this.qa:this.Ha.scrollTop+=i/this.qa}))},this.Ua=t=>{(0,e.IV)(this.$a,et.PreventSelect),(0,e.IV)(this.$e.document.body,et.PreventSelect),this.$e.document.removeEventListener("mousemove",this.Na),this.$e.document.removeEventListener("mouseup",this.Ua)},this.za=t=>{if(!this.zt.horizontal)return;const i=t.deltaMode?100*(t.deltaY<0?-1:1):t.deltaY,s=Math.floor(i)/33*20,n=this.Da+s;n>=-1*this.$a.clientWidth&&n<=this.Ha.scrollWidth-this.$a.clientWidth&&(this.Da=n),(0,e.PM)(this.$e,(()=>this.Ha.scrollLeft=this.Da))},this.Wa=()=>{clearTimeout(this.Ga),this.Ga=setTimeout((()=>{this.Ja()}),50)},this.Ja=()=>{const t=this.zt.horizontal?this.Ha.scrollWidth:this.Ha.scrollHeight,i=this.zt.horizontal?this.Ra.clientWidth:this.Ra.clientHeight;this.qa=i/t;const s=-1*(this.Ra.clientWidth-(this.$a.clientWidth||4)-4),n=this.Ra.clientHeight-this.$a.clientHeight-4;(0,e.PM)(this.$e,(()=>{if(this.qa>=1)(0,e.MV)(this.$a);else{if((0,e.Ho)(this.$a),this.zt.horizontal)return void(0,e.T7)(this.$a,{width:`${Math.max(100*this.qa,10)}%`,height:"",top:`${n}px`,right:"",left:this.Ha.scrollLeft/t*100+"%"});(0,e.T7)(this.$a,{width:"",height:`${Math.max(100*this.qa,10)}%`,top:this.Ha.scrollTop/t*100+"%",right:`${s}px`,left:""})}}))},this.$e=(0,e.LT)(t),!this.$e)throw new Error("window was not found");this.Qa(),this.$a.addEventListener("mousedown",this.ja),this.zt.overrideNativeHorizontalScroll&&this.Ha.addEventListener("wheel",this.za,{passive:!0}),this.$e.addEventListener("resize",this.Wa),this.Ha.addEventListener("scroll",this.Ja),this.Ha.addEventListener("mouseenter",this.Ja),(0,e.cn)(this.Ra,et.MainContainer,this.zt.horizontal?et.Horizontal:void 0,this.zt.showOnHover?et.ShowOnHover:void 0),this.Ja();const s=(0,e.Dx)(this.Ra,this.$e);"0px"===s.height&&"0px"!==s.maxHeight&&(0,e.T7)(this.Ra,{height:s.maxHeight})}Qa(){for(this.$a=(0,e.G$)(`<cnx class="${et.Handle}">`,this.$e),this.Ya=(0,e.G$)(`<cnx class="${et.Wrapper}">`,this.$e),this.Ha=(0,e.G$)(`<cnx class="${et.Content}">`,this.$e),this.Ya.appendChild(this.Ha);this.Ra.firstChild;)this.Ha.appendChild(this.Ra.firstChild);this.Ra.appendChild(this.Ya),this.Ra.insertAdjacentElement("beforeend",this.$a)}destroy(){for(this.removeListeners(),(0,e.bX)(this.$a);this.Ha.firstChild;)this.Ra.appendChild(this.Ha.firstChild);(0,e.bX)(this.Ya),(0,e.IV)(this.Ra,et.MainContainer,et.Horizontal,et.ShowOnHover)}removeListeners(){this.$e.document.removeEventListener("mousemove",this.Na),this.$e.document.removeEventListener("mouseup",this.Ua),this.$a.removeEventListener("mousedown",this.ja),this.Ha.removeEventListener("wheel",this.za),this.$e.removeEventListener("resize",this.Wa),this.Ha.removeEventListener("scroll",this.Ja),this.Ha.removeEventListener("mouseenter",this.Ja)}}const nt=t=>t.clientHeight||t.getBoundingClientRect().height||0,rt=t=>t.clientWidth||t.getBoundingClientRect().width||0,ht=(t,i,e=!1)=>{const s=t.offsetTop,n=((t,i)=>(parseInt(i.getMarginTopPropertyValue(t),10)||0)+(parseInt(i.getMarginBottomPropertyValue(t),10)||0))(t,i),r=nt(t),h=nt(t.parentElement);let o=s;if(e){const t=Math.floor(h/(r+n)),i=Math.floor(t/2);o=Math.max(s-i*(r+n),0)}t.parentElement.scrollTop=o},ot=(t,i,e=!1)=>{const s=t.offsetLeft,n=((t,i)=>(parseInt(i.getMarginLeftPropertyValue(t),10)||0)+(parseInt(i.getMarginRightPropertyValue(t),10)||0))(t,i),r=rt(t),h=rt(t.parentElement);let o=s;if(e){const t=Math.floor(h/(r+n)),i=Math.floor(t/2);o=Math.max(s-i*(r+n),0)}t.parentElement.scrollLeft=o};var at=o(5874);class ct{constructor(t,i,e={}){this.Xa=t,this.yr=i,this.Za=1.2,this.Ka=16,this.tc="normal",this.ic={lines:0,useNativeClamping:!0},this.ec=!1,this.ic=Object.assign(Object.assign({},this.ic),e),this.ec=this.sc()}setLines(t){this.ic.lines=t}getClampedText(t){this.rc=t.trim(),this.hc=this.yr.createElementByString(`<cnx-span style="display:inline-block;width:100%;line-height:inherit;font-family:inherit;font-size:inherit;">${this.rc}</cnx-span>`),this.Xa.appendChild(this.hc);let i=0;try{i=this.oc()}catch(t){(0,s.n)({message:"LineClamp_getMaxLines",exception:t.message,callStack:t.stack,level:s.D.CRITICAL})}const n=this.ac(this.ic.lines,i),r=this.cc(n);return Math.ceil(this.hc.getBoundingClientRect().height)-1<=r?(this.lc(),this.rc):this.ec?void(0,e.T7)(this.Xa,{overflow:"hidden",textOverflow:"ellipsis",webkitBoxOrient:"vertical",display:"-webkit-box",webkitLineClamp:n}):this.dc(this.hc.firstChild,r)}sc(){return!!this.ic.useNativeClamping&&void 0!==this.Xa.style.webkitLineClamp}cc(t){return this.fc(this.Xa)*t+(this.mc(this.hc)+this.mc(this.Xa))+(this.gc(this.hc)+this.gc(this.Xa))}vc(t){if(t.getBoundingClientRect){const{height:i}=t.getBoundingClientRect();if(i>0)return Math.ceil(i)}const i=t.clientHeight;return i&&i>0?Math.ceil(i):t.parentNode?this.vc(t.parentNode):0}oc(){const t=this.vc(this.Xa),i=this.fc(this.Xa),e=this.mc(this.hc)+this.mc(this.Xa),s=this.gc(this.hc)+this.gc(this.Xa),n=Math.floor((t-e-s)/i+.05);return Math.max(n,0)}yc(t){const i=this.yr.getFontSizePropertyValue(t);return i?parseInt(i,10):this.Ka}fc(t){let i=this.yr.getLineHeightPropertyValue(t);return i&&i!==this.tc||(i=""+this.Za*this.yc(t)),parseInt(i,10)}mc(t){if(!t)return 0;const i=this.yr.getPaddingTopPropertyValue(t);return parseInt(i,10)||0}gc(t){if(!t)return 0;const i=this.yr.getPaddingBottomPropertyValue(t);return parseInt(i,10)||0}ac(t,i){return t>0?0===i?t:Math.min(this.ic.lines,i):i}dc(t,i,e){if(!i)return;void 0===e&&(e=t.nodeValue.split(" "));const s=[...e];if(s.length>1){s.pop(),this.bc(t,`${s.join(" ")}...`);return t.parentNode.offsetHeight>i?this.dc(t,i,s):(this.lc(),`${s.join(" ")}...`)}}bc(t,i){t.nodeValue=i}lc(){this.Xa.innerHTML="",this.hc=null}}var lt,ut=o(2324),dt=o(7427);!function(t){t[t.CardClicked=0]="CardClicked"}(lt||(lt={}));const pt={width:160,height:90},ft={width:80,height:80};const mt='<cnx class="cnx-g-card"><cnx class="cnx-g-card-image-container"><cnx class="cnx-g-triangle"></cnx><cnx class="cnx-g-card-image"><cnx class="cnx-g-card-icon"><cnx class="cnx-ui-btn"><cnx class="cnx-icon-button cnx-ui-btn-hoverable cnx-mod-hover"><cnx class="cnx-btn-container"><cnx class="cnx-play-icon"><svg markup-inline class="cnx-color-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5 4v16l16-8z" fill-rule="evenodd"/></svg></cnx></cnx></cnx></cnx></cnx></cnx></cnx><cnx class="cnx-g-card-text-container"><cnx class="cnx-g-card-text"><cnx-span></cnx-span></cnx></cnx></cnx>';class gt extends d._{constructor(t,i,s,n,r){super(),this.mediator=t,this.Tr=i,this.xc=s,this.wc=n,this.zt=r,this.kr=()=>{this.zt.metadata.title&&this._c()},this.Sc=()=>{this.mediator.publish(this,lt[lt.CardClicked],{payload:this.zt.id})},this.Ac=this.xc.createElementByString(this.Pc()),this.Ic=this.Ac.getElementsByClassName(m.Ih.CardImage)[0],this.kc=this.Ac.getElementsByClassName(m.Ih.CardText)[0],this.Cc=this.Ac.getElementsByClassName(m.Ih.CardTextContainer)[0],this.zt.titleFont&&(0,e.T7)(this.Cc,{"font-family":this.zt.titleFont});const h=this.xc.createElement("img");h.onload=()=>{this.Ic.appendChild(h)};const o=this.zt.metadata.getThumbnailUrl(this.Mc().width,this.Mc().height);if((0,dt.QM)(o)&&(h.src=o),h.alt=(0,dt.$K)(this.zt.metadata.altText)?this.zt.metadata.altText:"",this.zt.style===$.ProtoGalleryStyleMode.Detailed&&this.zt.metadata.duration){const t=this.xc.createElementByString(`<cnx class="cnx-g-card-text-info">${(0,ut.to)(this.zt.metadata.duration)}</cnx>`);this.zt.bodyFont&&(0,e.T7)(t,{"font-family":this.zt.bodyFont}),this.Cc.appendChild(t)}this.wc.register(this.Ac,this,this.wc),this.subscribe(at.Z[at.Z.Click],this.wc,(()=>{this.Sc()})),this.relay(at.Z[at.Z.Scroll],this.wc,this,this.mediator),this.Ec=new ct(this.kc,this.xc,{lines:3,useNativeClamping:!1}),this.Tr.on(this.Ac,this.kr)}Pc(){return this.zt.style===$.ProtoGalleryStyleMode.Visual?'<cnx class="cnx-g-card"><cnx class="cnx-g-triangle"></cnx><cnx class="cnx-g-card-image"></cnx><cnx class="cnx-g-card-text-container"><cnx class="cnx-g-card-text"></cnx></cnx><cnx class="cnx-g-card-icon"><cnx class="cnx-ui-btn"><cnx class="cnx-icon-button cnx-ui-btn-hoverable cnx-mod-hover"><cnx class="cnx-btn-container"><cnx class="cnx-play-icon"><svg markup-inline class="cnx-color-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5 4v16l16-8z" fill-rule="evenodd"/></svg></cnx></cnx></cnx></cnx></cnx></cnx>':mt}Mc(){return this.zt.style===$.ProtoGalleryStyleMode.Visual?pt:ft}_c(){const t=this.Ec.getClampedText(this.zt.metadata.title),i=this.xc.createElementByString(`<cnx-span>${t}</cnx-span>`);(0,e.jG)(i,this.kc)}get $element(){return this.Ac}setActiveState(t){t?(0,e.cn)(this.Ac,m.Gj.Active):(0,e.IV)(this.Ac,m.Gj.Active)}destroy(){this.Ac.removeEventListener("click",this.Sc),this.Tr.off(this.Ac,this.kr)}clampLines(){this._c()}}const vt=gt;class yt extends d._{constructor(t,i,e,s,n){if(super(),this.mediator=t,this.Tr=i,this.xc=e,this.wc=s,this.zt=n,this.Bc=!1,this.zt.$slot.innerHTML=`<cnx class="${m.Ih.CardPlaceholder}"></cnx>`,this.zt.style===$.ProtoGalleryStyleMode.Detailed){const t=e.createElementByString(this.Oc(mt));this.zt.$slot.firstChild.appendChild(t)}this.wc.register(this.zt.$slot,this.mediator,this),this.relay(at.Z[at.Z.Scroll],this.wc,this,this.mediator)}Oc(t){const i=[...Array(12)].map((()=>`<cnx-span style='width: ${10+Math.floor(40*Math.random())}%'></cnx-span> `)).reduce(((t,i)=>t+i),"");return t.replace("<cnx-span></cnx-span>",i)}setCardData(t){this.Rc=new vt(this,this.Tr,this.xc,this.wc,{id:this.zt.id,style:this.zt.style,metadata:t,titleFont:this.zt.titleFont,bodyFont:this.zt.bodyFont}),this.subscribe(lt[lt.CardClicked],this.Rc,(({payload:t})=>{this.mediator.publish(this,lt[lt.CardClicked],{payload:t})})),this.unsubscribeAll(this.wc),this.relay(at.Z[at.Z.Scroll],this.Rc,this,this.mediator),this.Rc.setActiveState(this.Bc),this.zt.$slot.innerHTML="",this.zt.$slot.appendChild(this.Rc.$element)}setActiveState(t){this.Bc=t,this.Rc&&this.Rc.setActiveState(this.Bc)}getContainer(){return this.zt.$slot}clampLines(){this.Rc.clampLines()}}const bt=yt;class xt extends d._{constructor(t,i,s,n,r,h,o,a,c){super(),this.mediator=t,this.Tr=i,this.xc=s,this.wc=n,this.Dc=r,this.jc=h,this.Vc=o,this.Fc=a,this.$c=[],this.Nc=[],this.Uc=null,this.Hc=0,this.qc=(0,e.nw)(this.Dc),this.Wc=(0,e.fj)(this.Dc);const l=this.Vc===$.ProtoGalleryStyleMode.Detailed?m.Ih.StyleDetailed:m.Ih.StyleVisual;if((0,e.cn)(this.Dc,l),this.Vc===$.ProtoGalleryStyleMode.Detailed&&(this.Dc.innerHTML=`<cnx class="${m.Ih.ExploreMore}">EXPLORE MORE</cnx>`),this.Gc=s.createElementByString(`<cnx class="${m.Ih.CardRail}"></cnx>`),this.Dc.appendChild(this.Gc),this.Vc===$.ProtoGalleryStyleMode.Detailed){const t=s.createElementByString(`<cnx class="${m.Ih.FadeOut}"></cnx>`);this.Dc.appendChild(t)}this.Jc(c)}start(){this.Qc(),this.Yc()}onResize(t){this.Xc&&(this.Xc.updateWidth(t),this.Zc(),this.Kc())}setCurrentIndex(t){this.Hc=t,this.$c.forEach(((i,e)=>i.card.setActiveState(t===e))),this.Kc()}Jc(t){t.forEach(((t,i)=>{const e=this.tl(i);this.Gc.appendChild(e.getContainer()),this.$c.push({card:e,videoSource:t}),this.subscribe(lt[lt.CardClicked],e,(({payload:t})=>this.il(t))),this.relay(at.Z[at.Z.Scroll],e,this,this.mediator)}))}Kc(){if((0,f.BZ)(this.Nc))return;const t=this.$c[this.Hc].card.getContainer();this.Fc===$.ProtoGalleryOrientationEnum.Landscape?ht(t,this.xc,true):ot(t,this.xc,true)}tl(t){const i=this.xc.createElementByString(`<cnx class="${m.Ih.CardSlot}"></cnx>`);return new bt(this,this.Tr,this.xc,this.wc,{id:t,style:this.Vc,$slot:i,titleFont:this.qc,bodyFont:this.Wc})}il(t){this.mediator.publish(this,D.ChangeVideo,{payload:{videoIndex:t}})}Qc(){this.$c.forEach((t=>{t.videoSource.getMetadata((i=>{t.card.setCardData(i),t.card.clampLines()}))}))}el(){this.Nc.forEach((t=>{this.unsubscribeAll(t),this.Gc.removeChild(t.getContainer())})),this.Nc=[]}sl(){const t=this.Fc===$.ProtoGalleryOrientationEnum.Portrait?this.Gc.clientWidth:this.Gc.clientHeight,i=this.$c[0].card.getContainer(),e=this.Fc===$.ProtoGalleryOrientationEnum.Portrait?i.clientWidth:i.clientHeight,s=Math.ceil(t/e)+1-(this.$c.length-1);if(s>this.Nc.length-1)for(let t=0;t<=s;t++){const i=this.tl(t);this.Nc.push(i),this.relay(at.Z[at.Z.Scroll],i,this,this.mediator),this.Gc.appendChild(i.getContainer())}}Zc(){this.nl()?(this.el(),this.hl()):(this.ol(),this.sl())}hl(){null===this.Uc&&(this.Uc=new st(this.Gc,{horizontal:this.Fc===$.ProtoGalleryOrientationEnum.Portrait}),(0,e.cn)(this.Gc,m.Gj.HasCustomScrollbar))}ol(){null!==this.Uc&&(this.Uc.destroy(),this.Uc=null,(0,e.IV)(this.Gc,m.Gj.HasCustomScrollbar))}nl(){const t=this.$c[this.$c.length-1].card.getContainer();return this.Fc===$.ProtoGalleryOrientationEnum.Landscape?t.offsetTop+t.clientHeight>this.Gc.clientHeight:t.offsetLeft+t.clientWidth>this.Gc.clientWidth}Yc(){const t=this.al();this.Xc=new F(this.Dc,this.jc,t,m.Rq)}al(){return it[this.Fc][this.Vc]}}var wt,_t,St=o(308),At=o(1995),Pt=o(2817),It=o(6716);!function(t){t.enter="enterFullscreen",t.exit="exitFullscreen"}(wt||(wt={}));class kt{constructor(t,i,e){if(this.xc=t,this.Zt=e,this.cl=!1,this.ll=1e3,this.ul=!0,this.dl=new It.x,this.pl=new It.x,this.fl=!1,this.ml=()=>{this.cl&&this.gl()},this.vl=t=>{this.cl?null!==this.fullscreenElement?this.gl():this.yl():this.dl.next(wt.exit)},this.yl=()=>{this.fl=!1,this.bl.reject(),this.cl=!1,clearTimeout(this._l)},this.Sl=this.xc.hasIosFullscreenBehaviour(e)?i.getElementsByTagName("video")[0]:i,!this.Sl)throw new Error("element is missing");try{const t=this.Al();if(null==t)return void(this.ul=!1);this.Pl=t.keys,this.Il=t.name,this.kl()}catch(t){this.ul=!1,(0,s.n)({message:"Fullscreen init failed",exception:t.message,callStack:t.stack,level:s.D.CRITICAL})}}Al(){let t;return t=this.xc.hasIosFullscreenBehaviour(this.Zt)?this.xc.getFullscreenKeys(this.Sl):this.xc.getFullscreenKeys(),t}get fullscreenElement(){return this.xc.getDocumentProperty(this.Pl.fullscreenElement)}get fullscreenEnabled(){return this.xc.getDocumentProperty(this.Pl.fullscreenEnabled)}enterFullScreen(){if(this.ul){this.bl=new At.C,this.cl=!0,clearTimeout(this._l),this._l=setTimeout(this.yl,this.ll);try{this.Sl[this.Pl.requestFullscreen]()}catch(t){this.yl()}return this.bl.promise}}exitFullScreen(){try{this.xc.exitFullscreen(this.Pl.exitFullscreen,this.Zt===St.M.Ios?this.Sl:void 0)}catch(t){(0,s.n)({message:"fullscreen_exit",exception:t.message,callStack:t.stack,level:s.D.WARN})}this.fl=!1}kl(){this.Il===Pt.do.Moz||this.Il===Pt.do.Ms?(this.xc.addEventListenerOnGlobal(this.Pl.fullscreenchange,this.vl),this.xc.addEventListenerOnGlobal(this.Pl.fullscreenerror,this.yl)):(this.Sl.addEventListener(this.Pl.fullscreenchange,this.vl),this.Sl.addEventListener(this.Pl.fullscreenerror,this.yl)),this.xc.hasIosFullscreenBehaviour(this.Zt)&&(this.Sl.addEventListener("webkitbeginfullscreen",this.ml),this.Sl.addEventListener("webkitendfullscreen",this.vl))}Cl(){this.Il===Pt.do.Moz||this.Il===Pt.do.Ms?(this.xc.removeEventListenerOnGlobal(this.Pl.fullscreenchange,this.vl),this.xc.removeEventListenerOnGlobal(this.Pl.fullscreenerror,this.yl)):(this.Sl.removeEventListener(this.Pl.fullscreenchange,this.vl),this.Sl.removeEventListener(this.Pl.fullscreenerror,this.yl)),this.Zt===St.M.Ios&&(this.Sl.removeEventListener("webkitbeginfullscreen",this.ml),this.Sl.removeEventListener("webkitendfullscreen",this.vl))}gl(){this.fl=!0,this.pl.next(wt.enter),this.bl.resolve(),this.cl=!1,clearTimeout(this._l)}get isFullscreen(){return this.fl}get onFullScreenExit(){return this.dl.asObservable()}get onFullScreenEnter(){return this.pl.asObservable()}destroy(){this.isFullscreen&&this.exitFullScreen(),this.Cl(),this.bl&&this.bl.isPending&&this.bl.reject()}}!function(t){t[t.Play=0]="Play",t[t.Pause=1]="Pause",t[t.Replay=2]="Replay",t[t.Volume=3]="Volume",t[t.Mute=4]="Mute",t[t.Unmute=5]="Unmute",t[t.Seek=6]="Seek",t[t.DraggingStart=7]="DraggingStart",t[t.DraggingStopped=8]="DraggingStopped",t[t.SeekingStart=9]="SeekingStart",t[t.SeekingStopped=10]="SeekingStopped",t[t.Expand=11]="Expand",t[t.Collapse=12]="Collapse",t[t.Quality=13]="Quality",t[t.Close=14]="Close",t[t.Next=15]="Next",t[t.Prev=16]="Prev",t[t.Settings=17]="Settings",t[t.CaptionOn=18]="CaptionOn",t[t.CaptionOff=19]="CaptionOff",t[t.CaptionUpdate=20]="CaptionUpdate",t[t.VolumeHoverStart=21]="VolumeHoverStart",t[t.VolumeHoverStopped=22]="VolumeHoverStopped",t[t.OverlayClick=23]="OverlayClick",t[t.UIHideStart=24]="UIHideStart",t[t.UIShowStart=25]="UIShowStart",t[t.UIEndShowHide=26]="UIEndShowHide",t[t.AboutClick=27]="AboutClick",t[t.ContextClick=28]="ContextClick",t[t.SettingsMenu=29]="SettingsMenu",t[t.HoverStart=30]="HoverStart",t[t.HoverEnd=31]="HoverEnd",t[t.StateChanged=32]="StateChanged",t[t.RebindComponent=33]="RebindComponent",t[t.SkipAd=34]="SkipAd",t[t.LogoClicked=35]="LogoClicked",t[t.ContextMenuOpen=36]="ContextMenuOpen",t[t.ContextMenuClose=37]="ContextMenuClose",t[t.CaptionMenu=38]="CaptionMenu",t[t.NonLinearClose=39]="NonLinearClose"}(_t||(_t={}));var Ct,Tt=o(5055);!function(t){t.PreRoll="pre-roll",t.MidRoll="mid-roll",t.PostRoll="post-roll"}(Ct||(Ct={}));const Mt=Ct,Et={imageMaxHeight:160,ratioWidth:16,ratioHeight:9};var Bt;!function(t){t[t.Play=0]="Play",t[t.Pause=1]="Pause"}(Bt||(Bt={}));class Ot{constructor(t,i){switch(this.mediator=t,this.inView=!1,this.Tl=!1,this.Ml=!1,this.El=!1,this.Bl=()=>{},i){case l.ProtoPlayerPlaybackModeEnum.Autoplay:this.Ol(this.Ll);break;case l.ProtoPlayerPlaybackModeEnum.ClickToPlay:this.Ol(this.Rl);break;case l.ProtoPlayerPlaybackModeEnum.ScrollToPlay:this.Ol(this.Dl)}}Ol(t){this.Bl=()=>{this.Tl||t.call(this)}}Ll(){this.El&&!this.Ml&&this.inView&&(this.Ml=!0,this.mediator.publish(this,Bt[Bt.Play]))}Dl(){this.El&&(this.jl&&(this.Vl=this.volume),this.inView||this.fl&&!this.inView?(this.mediator.publish(this,Bt[Bt.Play],{payload:{volume:this.Vl}}),this.Vl=null):(this.Vl=this.volume,this.mediator.publish(this,Bt[Bt.Pause],{payload:{volume:0}})))}Rl(){}setViewability(t){this.inView=t,this.Bl()}setIsAppBackgrounded(t){this.jl=t}setSoundVolume(t){this.volume=t}setUserPlayback(t){!this.Ml&&t&&(this.Ml=t),this.Tl=!t}setCanPlay(t){this.El=t,this.Tl||!this.inView&&!this.Ml||this.Bl()}setIsFullscreen(t){this.fl=t}}var Lt,Rt,Dt=o(6515),jt=o(6243),Vt=o(9078);!function(t){t[t.DirectionIn=0]="DirectionIn",t[t.DirectionOut=1]="DirectionOut",t[t.FadeIn=2]="FadeIn"}(Lt||(Lt={})),function(t){t.Float="float",t.Embed="embed"}(Rt||(Rt={}));const Ft=.5;class $t{constructor(t,i,e,s,n,r=0){this.Fl=t,this.zt=i,this.Ma=e,this.jc=s,this.yr=n,this.$l=r,this.Nl=void 0,this.Ul=null,this.Hl=!1,this.ql=()=>{if(!this.Nl||!this.zl)return;const t=this.Wl(),i=!!this.zl;this.Gl(t,i)},this.Jl=()=>{var t;if(this.Ql()&&(this.zt.width=null===(t=this.zl)||void 0===t?void 0:t.clientWidth),this.Yl(),this.Nl){const t=!1,i=this.Wl();this.Gl(i,t)}},this.Yl=()=>{this.Zl()?!this.Kl||this.Nl||this.Hl?this.tu():this.eu():this.Nl&&this.su()},this.nu=t=>{if(this.ru(t.propertyName))switch(this.transitionState){case Lt.DirectionIn:this.transitionState=void 0,this.hu();break;case Lt.DirectionOut:this.transitionState=void 0,this.ou();break;case Lt.FadeIn:this.transitionState=void 0,this.au()}}}get transitionState(){return this.cu}set transitionState(t){this.cu===Lt.FadeIn&&this.lu(m.jG.FadeInBase,m.jG.FadeIn),this.cu=t}uu(...t){(0,e.cn)(this.Ma,...t)}lu(...t){(0,e.IV)(this.Ma,...t)}tu(){this.jc!==l.ProtoDeviceType.Smartphone&&(this.Ma.style.width=`${this.zt.width}px`);const t=this.Ma.getBoundingClientRect().width;this.Ma.style.height=this.zt.getHeight(t)}du(){return(0,f.d3)(this.jc,this.zt.floatingDeviceMode)}pu(){this.yr.addEventListenerOnGlobal("scroll",this.ql)}fu(){this.yr.removeEventListenerOnGlobal("scroll",this.ql)}mu(){this.zl=this.yr.querySelector(this.zt.pageElement),this.zl&&(clearInterval(this.Ul),this.zt.width=this.zl.clientWidth,this.Yl(),this.Fl.on(this.zl,this.Jl))}gu(){var t,i;const e=null===(t=this.zl)||void 0===t?void 0:t.getBoundingClientRect().top;return this.zt.appendLocation===l.ProtoFloatingAppendLocationEnum.Above?e-this.Ma.offsetHeight-this.zt.floatingYAxisPadding:this.zt.appendLocation===l.ProtoFloatingAppendLocationEnum.Below?e+(null===(i=this.zl)||void 0===i?void 0:i.offsetHeight)+this.zt.floatingYAxisPadding:e}vu(){this.Ul=setInterval((()=>{this.mu()}),500),this.mu()}Ql(){return this.zt.floatingPosition===l.ProtoFloatingFixedPositionMode.Element}ru(t){switch(this.transitionState){case Lt.DirectionIn:case Lt.DirectionOut:if("transform"===t)return!0;break;case Lt.FadeIn:if("opacity"===t)return!0}return!1}yu(){this.Ma.style.top="",this.Ma.style.bottom="",this.Ma.style.left="",this.Ma.style.right="",this.Ma.style.width="",this.Ma.style.height="",this.Ma.style.transform=""}ou(){this.Nl=!1,this.lu(m._7.MainClass,m._7.TransitionClass),this.yu(),this.bu()}Gl({x:t,y:i},e){this.xu(e);const s=()=>this.Ma.style.transform=`translate(${t}px, ${i}px)`;e?(this.yr.cancelRequestAnimationFrame(this.wu),this.wu=null,this.wu=this.yr.requestAnimationFrameHelper((()=>{s()}))):s()}xu(t){t?this.uu(m._7.TransitionClass):this.lu(m._7.TransitionClass)}Wl(){let t,i;if(this.Ql()&&this.zl){this._u();const e=this.zt.isPositionedLeft?this.zt.floatingGutterX:-this.zt.floatingGutterX;t=this.yr.getElementCoordinates(this.zl).clientX+e;const s=this.gu();return i=s<this.zt.floatingGutterY?this.zt.floatingGutterY:s,{x:t,y:i}}if(this.zt.isPositionedLeft)t=this.zt.floatingGutterX;else{t=this.yr.getViewportWidth()-this.Ma.offsetWidth-this.zt.floatingGutterX}if(this.zt.isPositionedTop)i=this.zt.floatingGutterY;else{i=this.yr.getViewportHeight()-this.Ma.offsetHeight-this.zt.floatingGutterY}return{x:t,y:i}}Su(){const t=(this.zt.floatingWidth||1e3)+20,i=this.yr.getViewportWidth();return this.zt.isPositionedLeft?-t:i+t}Zl(){return(0,e.LT)(this.Ma).document.body.getBoundingClientRect().width>=this.$l}eu(){if(!this.Au())return;this.Ql()&&this.pu(),this.Nl=!0,this.transitionState=Lt.DirectionIn,this.uu(m._7.MainClass),this.tu();const t=this.Wl(),i=this.Su();this.Pu(),this.Gl({x:i,y:t.y},!1),(0,e.Tp)(this.Ma);this.Gl(t,!0)}Au(){return!!this.Zl()&&!(this.Ql()&&(!this.zl||this.zl&&0===this.zl.clientWidth))}_u(){this.zl&&(this.yr.getElementCoordinates(this.zl).clientX<this.yr.getBodyDimensions().width/2?(this.zt.isPositionedLeft=!0,this.zt.isPositionedRight=!1):(this.zt.isPositionedLeft=!1,this.zt.isPositionedRight=!0))}su(t=!0){t&&(this.transitionState=Lt.DirectionOut),this.Ql()&&this.fu(),this.Iu();const{y:i}=this.Wl(),e=this.Su();this.Gl({y:i,x:e},t),t||this.ou()}ku(){this.Ma.addEventListener("transitionend",this.nu),this.Fl.on(this.Ma,this.Yl),this.Fl.on(this.yr.getGlobalClosestTop().topFrame.document.body,this.Jl),this.Ql()&&this.vu()}Cu(){this.Fl.off(this.Ma,this.Yl),this.Ma.removeEventListener("transitionend",this.nu),this.Fl.off(this.yr.getGlobalClosestTop().topFrame.document.body,this.Jl),this.zl&&(this.Fl.off(this.zl,this.Jl),this.fu(),clearInterval(this.Ul))}Tu(t){void 0!==t.scrollPosition&&this.zt.setScrollPosition(t.scrollPosition),(null==t?void 0:t.floatingWidth)&&(this.zt.width=t.floatingWidth),(null==t?void 0:t.floatingGutterX)&&(this.zt.gutterX=t.floatingGutterX),(null==t?void 0:t.floatingGutterY)&&(this.zt.gutterY=t.floatingGutterY)}get isInFloating(){return this.Nl}}class Nt extends $t{constructor(t,i,e,s,n,r,h=0){super(i,s,e,n,r,h),this.Mu=t,this.Eu=!0,this.Bu=!0,this.Ou=!1,this.Kl=!1,this.Lu=new It.x,this.Ru=new It.x,this.Du=new It.x,this.Vu=new It.x,this.Fu=t=>{const i=this.Mu.getIsTabInFocus();t&&this.isInFloating&&(this.Kl=!1,this.su()),this.Eu&&this.zt.floatingMode===l.ProtoPlayerFloatingMode.AfterInView&&t&&(this.Eu=!1),!t&&!this.Eu&&this.Bu&&i&&(this.Kl=!0,super.eu())},this.tu=()=>{this.isInFloating&&super.tu()}}get onFloatingEnterStart(){return this.Lu.asObservable()}get onFloatingEnterStop(){return this.Ru.asObservable()}get onFloatingExitStart(){return this.Du.asObservable()}get onFloatingExitStop(){return this.Vu.asObservable()}isFloatingModeEnabled(){return this.Eu&&(this.enabled=!1),this.enabled}enableFloatingMode(){this.Eu=!1,this.Bu=!0,this.start()}disableFloatingMode(){this.Bu=!1,this.destroy()}setFloatingSettings(t){this.Tu(t),this.start()}su(){const t=!this.Ou;super.su(t)}Iu(){this.Du.next()}bu(){this.$u()}Pu(){this.Lu.next()}$u(){this.transitionState=Lt.FadeIn,this.lu(m.jG.FadeIn),this.uu(m.jG.FadeInBase),(0,e.Tp)(this.Ma),this.uu(m.jG.FadeIn)}hu(){this.Ru.next()}au(){this.lu(m.jG.FadeInBase,m.jG.FadeIn),this.Vu.next(),this.Hl&&super.Cu()}Nu(){this.Mu.on(this.Ma.parentElement,this.Fu,{threshold:Ft})}Uu(){this.Mu.off(this.Ma.parentElement,this.Fu)}start(){this.du()&&(super.ku(),this.zt.floatingMode===l.ProtoPlayerFloatingMode.OnPageLoad&&(this.Eu=!1),this.Nu(),this.Fu(this.Mu.check({element:this.Ma.parentElement,threshold:Ft})))}canFloat(){return this.du()&&this.zt.floatingMode!==l.ProtoPlayerFloatingMode.Off}destroy(){this.isInFloating?(this.ou(),this.Hl=!0):super.Cu(),this.Uu()}get enabled(){return this.Bu}set enabled(t){this.Bu=t}fullscreenStateChange(t){this.Ou=t,t?this.Uu():this.Nu(),this.Fu(t)}}class Ut extends $t{constructor(t,i,e,s,n,r=0){super(t,e,i,s,n,r),this.Kl=!0,this.Ru=new It.x}get onFloatingEnterStop(){return this.Ru.asObservable()}Pu(){}hu(){this.Ru.next()}Iu(){}bu(){}au(){}start(){this.du()&&(this.uu(m._7.AlwaysFloating),super.ku(),super.eu())}setFloatingSettings(t){this.Tu(t),this.start()}}var Ht,qt;!function(t){t.ShowLinearEvent="showLinearEvent",t.HideLinearEvent="hideLinearEvent",t.PauseLinearEvent="pauseLinearEvent",t.ResumeLinearEvent="resumeLinearEvent",t.SkipLinearEvent="skipLinearEvent"}(Ht||(Ht={})),function(t){t.ShowNonLinearEvent="showNonLinearEvent",t.HideNonLinearEvent="hideNonLinearEvent"}(qt||(qt={}));const zt="midRollCapped",Wt="totalAdBreakDurationExpired",Gt="enableLinearAds",Jt="disableLinearAds",Qt="ForceStopAdSlot",Yt="ForceStopAdPod",Xt="linearAdOpportunity",Zt="AdPodRemainingTime",Kt="disableNonLinearAds",ti="enableNonLinearAds";var ii;!function(t){t[t.Portrait=0]="Portrait",t[t.Landscape=1]="Landscape"}(ii||(ii={}));const ei=ii;class si{constructor(t){this.urlSuffixerService=t,this.Hu={},this.qu=[]}getImage(t,i,e,s,n="",r=!1){return this.zu=t,this.Wu=(0,dt.QM)(i)?i:"",this.Gu=e,this.Ju=s,this.Qu=n,this.Yu=r,this.Xu()}Xu(){const t=this.Zu();if(t)return t;const i=this.zu+this.Qu,e=new Image;return e.src=this.urlSuffixerService.appendParamsToUrl(i),e.alt=this.Wu,this.Hu[this.zu]=this.Hu[this.zu]||{},this.Hu[this.zu][this.Gu]=this.Hu[this.zu][this.Gu]||{},this.Hu[this.zu][this.Gu][this.Ju]=this.Hu[this.zu][this.Gu][this.Ju]||{},this.Hu[this.zu][this.Gu][this.Ju][this.Qu]=e,e}Zu(){const t=this.Ku();if(t)return t;if(!this.Yu)return;this.td();const i=this.ed();if(i)return i;const e=this.sd();return e||void 0}td(){const t=[];if(!this.Hu[this.zu])return void(this.qu=[]);const i=this.Hu[this.zu],e=this.Gu>this.Ju?ei.Landscape:ei.Portrait;Object.keys(i).forEach((s=>{const n=parseInt(s,10);Object.keys(i[s]).filter((t=>!!i[s][t])).forEach((i=>{const s=parseInt(i,10);if((n>s?ei.Landscape:ei.Portrait)!==e)return;const r={area:n*s,img:this.nd(this.zu,n,s)};t.push(r)}))})),this.qu=[...t]}nd(t,i,e){if(this.Hu[t]&&this.Hu[t][i]&&this.Hu[t][i][e])return this.Hu[t][i][e][Object.keys(this.Hu[t][i][e])[0]]}Ku(){return this.Hu[this.zu]&&this.Hu[this.zu][this.Gu]&&this.Hu[this.zu][this.Gu][this.Ju]&&this.Hu[this.zu][this.Gu][this.Ju][this.Qu]}ed(){if(0===this.qu.length)return;const t=this.Gu*this.Ju,i=this.qu.filter((({area:i})=>i>t)).sort(((t,i)=>t.area-i.area));return 0!==i.length?i[0].img:void 0}sd(){if(0===this.qu.length)return;const t=this.Gu*this.Ju,i=this.qu.filter((({area:i})=>i<t&&t/i<=1.3)).sort(((t,i)=>i.area-t.area));return 0!==i.length?i[0].img:void 0}}var ni=o(4959);function ri(t,i){return!(i.skippability===l.ProtoPlayerSkippabilityType.AllowNonSkipAdsIfTheyAreShorterThan&&t<i.skipMin)}var hi,oi=o(9115);!function(t){t.PARALLEL_CALLS_DEFAULT=5,t.PARALLEL_WINS_DEFAULT=10,t.MAX_WINS_DEFAULT=-1,t.DEFAULT_DESIRED_BITRATE=1,t.REMOVE_BIDS_DEFAULT=!1,t.MID_SESSION_PREFETCH_MINIMUM_TIME=1e4,t.NON_LINEAR_MAX_HEIGHT_PERCENT=20,t.NON_LINEAR_MAX_WIDTH_PERCENT=80,t.DEFAULT_MAX_AD_DURATION=180}(hi||(hi={}));class ai{constructor(t){this.rd=t,this.hd={breakType:l.ProtoAdBreakTypeEnum.None,currentPodNumber:0,maxAdSlotDuration:0,maxAdPodDuration:0,totalNumberOfAdSlots:0},this.od=null}get adBreaks(){return this.rd}setNewBreak(t){this.rd.forEach((i=>{i.types.forEach((e=>{(function(t,i){let e=!1;switch(t){case l.ProtoAdBreakTypeEnum.PreRoll:e=i===l.ProtoAdSlotsEnum.PreRoll;break;case l.ProtoAdBreakTypeEnum.MidRoll:e=i===l.ProtoAdSlotsEnum.MidRoll;break;case l.ProtoAdBreakTypeEnum.PostRoll:e=i===l.ProtoAdSlotsEnum.PostRoll}return e})(e,t)&&(this.hd.currentPodNumber=i.numberOfAdSlots,this.hd.maxAdSlotDuration=i.maxAdSlotDuration,this.hd.maxAdPodDuration=i.maxAdPodDuration,this.hd.totalNumberOfAdSlots=i.numberOfAdSlots)}))}))}adStarted(){this.ud(),0===this.hd.currentPodNumber&&(this.hd.currentPodNumber=this.hd.totalNumberOfAdSlots),this.hd.currentPodNumber--}endPod(){this.ud(),this.hd.currentPodNumber=0}enterPodTimeout(t){this.ud(),this.od=setTimeout((()=>{this.ud(),t()}),5e3)}isInAdPod(){return this.hd.currentPodNumber>0}isCurrentBreakInPod(){return this.hd.totalNumberOfAdSlots>1}getMaxAdSlotDuration(){return this.hd.maxAdSlotDuration}getMaxAdPodDuration(){return this.hd.maxAdPodDuration}getMaxAdSlotPossibleDuration(){let t=0;for(let i=0;i<this.rd.length;i++){if(0===this.rd[i].maxAdSlotDuration)return 0;t=Math.max(t,this.rd[i].maxAdSlotDuration)}return t}getCurrentSlotIndex(){return this.hd.totalNumberOfAdSlots-this.hd.currentPodNumber}getNextSlotIndex(){const t=this.getCurrentSlotIndex();return this.hd.totalNumberOfAdSlots>t?t+1:1}getTotalNumberOfSlots(){return this.hd.totalNumberOfAdSlots}isInPodTimeout(){return!!this.od}getAdBreakState(t){if(!(0,dt.$K)(t))return this.dd();const{adSlotDuration:i,adBreakType:e}=t;return{isAdPodBreak:this.isCurrentBreakInPod(),adPodSlotIndex:this.isCurrentBreakInPod()?this.getNextSlotIndex():0,maxAdDuration:Math.round(this.getMaxAdSlotDuration()/oi.s_||hi.DEFAULT_MAX_AD_DURATION),remainingAdDuration:Math.round(i/oi.s_),sessionMaxAdDuration:Math.round(this.getMaxAdSlotPossibleDuration()/oi.s_),adBreakType:e}}dd(){let t=l.ProtoAdBreakTypeEnum.MidRoll;this.adBreaks.forEach((i=>{i.types.some((t=>t===l.ProtoAdBreakTypeEnum.PreRoll))&&(t=l.ProtoAdBreakTypeEnum.PreRoll)}));const i=this.getMaxAdSlotDuration();return this.getAdBreakState({adSlotDuration:i,adBreakType:t})}ud(){clearTimeout(this.od),this.od=null}}var ci,li,ui,di=o(2231),pi=o(8423);!function(t){t[t.None=0]="None",t[t.Portrait=1]="Portrait",t[t.Landscape=2]="Landscape"}(ci||(ci={})),function(t){t.LINEAR="LINEAR",t.NONLINEAR="NONLINEAR"}(li||(li={})),function(t){t[t.Rtb=1]="Rtb",t[t.HeaderBidder=2]="HeaderBidder",t[t.Tam=3]="Tam"}(ui||(ui={}));const fi={[l.ProtoCreativeTypeEnum.Rtb]:ui.Rtb,[l.ProtoCreativeTypeEnum.HeaderBidder]:ui.HeaderBidder,[l.ProtoCreativeTypeEnum.Tam]:ui.Tam,[l.ProtoCreativeTypeEnum.TamDeal]:ui.Tam,[l.ProtoCreativeTypeEnum.TamPrivateAuction]:ui.Tam},mi={[li.LINEAR]:[l.ProtoAdType.Video,l.ProtoAdType.Overlay],[li.NONLINEAR]:[l.ProtoAdType.Nonlinear]};function gi(t,i){return t.filter((t=>mi[i].includes(t.adType)))}function vi(t){return(0,dt.$K)(fi[t])}function yi(t,i){return t.find((t=>t.adManagerLineItem.protoLineItem.advertiserLineItemId===i)).adManagerLineItem}const bi=({playerSkippability:t,playerSkipMin:i,playerSkipAfter:e,lineItemSkippability:s,lineItemSkipMin:n})=>{let r={skippable:!0,skipafter:e};switch(t){case l.ProtoPlayerSkippabilityType.AllowNonSkipAdsIfTheyAreShorterThan:r=function({skippabitySettings:t,playerSkipMin:i,lineItemSkippability:e,lineItemSkipMin:s}){if(e===l.ProtoLineItemSkippabilityType.RequirePublisherToAllowNonSkipAdsShorterThan)s<i?t.skipmin=i:(t.skipmin=s,t.minDuration=s);else t.skipmin=i;return t}({skippabitySettings:r,playerSkipMin:i,lineItemSkippability:s,lineItemSkipMin:n});break;case l.ProtoPlayerSkippabilityType.RequireAdsToBeSkippable:s===l.ProtoLineItemSkippabilityType.RequirePublisherToAllowNonSkipAdsShorterThan&&(r.skipmin=n,r.minDuration=n)}return r};function xi(t,i){return t===l.ProtoAdType.Nonlinear&&i===l.ProtoNonlinearRequestType.Banner}var wi=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function h(t){try{a(s.next(t))}catch(t){r(t)}}function o(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(h,o)}a((s=s.apply(t,i||[])).next())}))};const _i=["com.accuweather.android"],Si=.05*oi.s_;class Ai extends d._{constructor(t,i,s){super(),this.mediator=t,this._appSettings=i,this.pd=s,this.fd=.01,this.gd=.5,this.vd=2e3,this.yd=0,this.bd=!1,this.xd=!1,this.wd=!1,this._d=!1,this.Sd=!1,this.Pd=!1,this.Id=!1,this.$s=l.ProtoAdSlotsEnum.PreRoll,this.fl=!1,this.Cd=!1,this.Td=!1,this.Ed=!1,this.Bd=[],this.Pi=[],this.Od=[],this.Ld=0,this.Rd=t=>{this.Cd=t,t&&(this.app.services.ViewabilityService.off(this.$playerContainer,this.Rd),this.Dd())},this.jd=t=>{t&&this.adHandler&&!this.Ed&&setTimeout((()=>{this.adHandler.resumeWithoutUserInteraction(this.$s)}),Si)},this.Vd=()=>{this.isBelowSmBreakpoint(this.$experienceContainer.clientWidth)||(0,e.IV)(this.$experienceContainer,m.Gj.NoHeight),!this.xd&&this.Fd()&&(this.mediator.publish(this,p.Uh.CanStart),this.app.services.ResizeObserver.off(this.$experienceContainer,this.Vd))},this.$d=t=>{const{playback:i,isFullscreenClose:e}=t;this.floatingModule&&(0,dt.$K)(i)&&!e&&(this.floatingModule.enabled=i)},this.Nd=()=>{this.Ud(1)},this.Hd=()=>{this.Ud(0)},this.qd=t=>{this.$d(t);const{playback:i}=t;(0,dt.$K)(i)&&(i?(this.app.services.EventsStorageService.emitAdPlay(),this.Ed=!1):(this.app.services.EventsStorageService.emitAdPause(),this.Ed=!0))},this.zd=new si(s)}Wd(){}Gd(t,i,e){this.app.services.EventsStorageService.emitAdImpression(t,i,e)}Jd(t){this.app.services.EventsStorageService.emitAdComplete(t)}Qd(){}Yd(){}Xd(){}Zd(){}Kd(){}ep(){}sp(){}np(t){const i={state:t};this.app.services.EventsStorageService.emitAdStateChange(i)}rp(){const{clientWidth:t,clientHeight:i}=this.$playerContainer,e={width:t,height:i};this.app.services.EventsStorageService.emitPlayerResized(e)}op(){this.app.services.EventsStorageService.emitOnEnterFullscreen()}ap(){this.app.services.EventsStorageService.emitOnExitFullscreen()}cp(){this.app.services.EventsStorageService.emitOnPlayerCollapsed()}lp(){this.app.services.EventsStorageService.emitOnPlayerExpanded()}up(t){this.dp(t),this.pp(t),this.fp(t),this.$s=t,this.mp(t)}pp(t){this.adHandler&&this.adHandler.adStateChange(t,this.gp.getMaxAdSlotDuration())}fp(t){this.vp.onAdStateChange(t,{maxAdPodDuration:this.gp.getMaxAdPodDuration(),maxAdSlotDuration:this.gp.getMaxAdSlotDuration()})}dp(t){this.gp.setNewBreak(t)}mp(t){this.np(ni.V[t])}yp(){var t;null===(t=this.adHandler)||void 0===t||t.contentChanged(),this.vp.contentChanged()}bp(){var t;null===(t=this.adHandler)||void 0===t||t.contentEnded()}xp(){var t,i,e,s,n,r;this.adHandler=this.wp(),this._p(),null===(t=this.adHandler)||void 0===t||t.onLinearImpressionPrice.subscribe((t=>{this.mediator.publish(this,Tt.Km.ImpressionPrice,{payload:t})})),null===(i=this.adHandler)||void 0===i||i.onNonLinearImpressionPrice.subscribe((t=>{this.mediator.publish(this,Tt.Km.ImpressionPrice,{payload:t})})),null===(e=this.adHandler)||void 0===e||e.onLinearImpressionRevenue.subscribe((t=>{this.mediator.publish(this,Tt.Km.ImpressionRevenue,{payload:t})})),null===(s=this.adHandler)||void 0===s||s.onNonLinearImpressionRevenue.subscribe((t=>{this.mediator.publish(this,Tt.Km.ImpressionRevenue,{payload:t})})),null===(n=this.adHandler)||void 0===n||n.onLinearExperienceEvent.subscribe((t=>{p.Uh.UserInteraction===t.type&&this.qd(t.payload)}));const h=()=>{this.app.services.TrackingService.setAdStart(),this.Td=!0,this.Ed=!1,this.Dd(),this.Sp.unsubscribe()};this.Sp=null===(r=this.adHandler)||void 0===r?void 0:r.onAdsEnable.subscribe((()=>{h()}))}_p(){this.Ap(),this.Pp(),this.kp()}Ap(){this.Od.push(this.adHandler.onVpaidEvent.subscribe((t=>{switch(t.type){case Vt.fI.AdImpression:{this.mediator.publish(this,Tt.Km.AdImpression,t.payload);const{adSourceData:i,customAdData:e,adType:s}=t.payload.payload;this.Gd(i,e,s);break}case Vt.fI.AdStopped:{if(this.mediator.publish(this,Tt.Km.AdStopped,t.payload),this.Id&&this.Yd(),!t.payload)return;const{adType:i}=t.payload.payload;this.Jd(i),this.app.services.EventsStorageService.emitAdStopped(i);break}case Vt.fI.AdError:{const{adType:i}=t.payload;this.mediator.publish(this,Tt.Km.AdError,t),this.app.services.EventsStorageService.emitAdError(i);break}case Vt.fI.AdSkipped:{const{adType:i}=t.payload.payload;this.mediator.publish(this,Tt.Km.AdSkipped,t.payload),this.app.services.EventsStorageService.emitAdSkipped(i),this.Jd(i),this.Id&&this.Yd();break}case Vt.fI.AdPaused:{const{adType:i}=t.payload.payload;this.app.services.TrackingService.setSessionPlayback(!1),this.app.services.EventsStorageService.emitAdPaused(i),this.mediator.publish(this,Tt.Km.AdPause,t.payload);break}case Vt.fI.AdPlaying:{const{adType:i}=t.payload.payload;this.app.services.TrackingService.setSessionPlayback(!0),this.app.services.EventsStorageService.emitAdPlaying(i),this.mediator.publish(this,Tt.Km.AdPlay,t.payload);break}case Vt.fI.AdVideoFirstQuartile:{const{adType:i}=t.payload.payload;this.mediator.publish(this,Tt.Km.AdCompleted25,t.payload),this.app.services.EventsStorageService.emitAdVideoFirstQuartile(i);break}case Vt.fI.AdVideoMidpoint:{const{adType:i}=t.payload.payload;this.mediator.publish(this,Tt.Km.AdCompleted50,t.payload),this.app.services.EventsStorageService.emitAdVideoMidpoint(i);break}case Vt.fI.AdVideoThirdQuartile:{const{adType:i}=t.payload.payload;this.mediator.publish(this,Tt.Km.AdCompleted75,t.payload),this.app.services.EventsStorageService.emitAdVideoThirdQuartile(i);break}case Vt.fI.AdVideoComplete:{const{adType:i}=t.payload.payload;this.mediator.publish(this,Tt.Km.AdCompleted100,t.payload),this.app.services.EventsStorageService.emitAdVideoComplete(i);break}case Vt.fI.AdClickThru:{const{adType:i}=t.payload.payload;this.mediator.publish(this,Tt.Km.AdClick,t.payload),this.app.services.EventsStorageService.emitAdClickThru(i);break}case Vt.fI.AdInteraction:{const{adType:i}=t.payload.payload;this.app.services.EventsStorageService.emitAdInteraction(i);break}case Vt.fI.AdUserAcceptInvitation:{const{adType:i}=t.payload.payload;this.app.services.EventsStorageService.emitAdInteraction(i);break}case Vt.fI.AdUserClose:{const{adType:i}=t.payload.payload;this.app.services.EventsStorageService.emitAdInteraction(i);break}case Vt.fI.AdUserMinimize:{const{adType:i}=t.payload.payload;this.app.services.EventsStorageService.emitAdInteraction(i);break}case Vt.fI.AdVideoStart:{const{adSourceData:i,adType:e}=t.payload,s={duration:i&&i.length,mediaPlayerVolume:this.getVolume()};this.app.services.EventsStorageService.emitAdVideoStart(s,e);break}case Vt.fI.AdLoaded:{const{payload:i}=t.payload,{adType:e}=i,{adLoadedData:s}=i;(null==s?void 0:s.skipOffset)<0&&(s.skipOffset=void 0);const n=this.Cp(s);this.app.services.EventsStorageService.emitAdLoaded(n,e);break}case Vt.fI.AdVolumeChange:{const{adType:i}=t.payload.payload;this.app.services.EventsStorageService.emitAdVolumeChange(i);break}case Vt.fI.AdLog:}})))}Pp(){this.Od.push(this.adHandler.onLinearEvent.subscribe((t=>{switch(t.type){case Ht.ShowLinearEvent:this.vp.onAdImpression(t.payload,li.LINEAR),this.Mp();break;case Ht.HideLinearEvent:this.Ep();break;case Ht.PauseLinearEvent:this.vp.onLinearAdPause();break;case Ht.ResumeLinearEvent:this.vp.onLinearAdPlay();break;case Ht.SkipLinearEvent:const i=!0;this.floatingModule&&(this.floatingModule.enabled=!0),this.Ep(i)}})))}kp(){this.Od.push(this.adHandler.onNonLinearEvent.subscribe((t=>{switch(t.type){case qt.ShowNonLinearEvent:this.vp.onAdImpression(t.payload,li.NONLINEAR);break;case qt.HideNonLinearEvent:const i=!1;this.vp.onAdFinished(this.adHandler.nonLinearInImpression,li.NONLINEAR,i)}})))}Mp(){this.gp.adStarted(),this.adHandler.showLinear()}Op(){this.adHandler.hideLinear()}Ep(t=!1){let i=this.gp.isInAdPod();t&&(i=!1,this.gp.endPod()),this.vp.onAdFinished(this.adHandler.linearInImpression,li.LINEAR,i),this.Op(),this.Lp.isCloseButton&&this.adHandler&&this.adHandler.firstLinearAdShown&&(this.Lp.closeButtonMode!==l.ProtoPlayerCloseButtonMode.OnHoverAfterFirstAd||(0,e.pv)(this.$playerContainer,m.s6.CloseHover)||(0,e.cn)(this.$playerContainer,m.s6.CloseHover),this.Lp.floatingSettings.floatingCloseButtonMode!==l.ProtoPlayerCloseButtonMode.OnHoverAfterFirstAd||(0,e.pv)(this.$playerContainer,m.s6.CloseFloatHover)||(0,e.cn)(this.$playerContainer,m.s6.CloseFloatHover))}Rp(t){this.adHandler.enterAdPodLoadingState(),this.gp.enterPodTimeout((()=>{this.gp.endPod(),t()}))}Dp(){(0,e.Tp)(this.$playerContainer),this.vp=this.jp(),(0,f.BZ)(gi(this.Lp.lineItemSettings.lineItems,li.LINEAR))||this.vp.onLinearNoDemand(),this.subscribe(ti,this.vp,(()=>{var t;null===(t=this.adHandler)||void 0===t||t.enableAds(li.NONLINEAR)})),this.subscribe(Kt,this.vp,(t=>{var i;const e=t.payload;null===(i=this.adHandler)||void 0===i||i.disableAds(li.NONLINEAR,e)})),this.subscribe(Gt,this.vp,(()=>{var t;null===(t=this.adHandler)||void 0===t||t.enableAds(li.LINEAR)})),this.subscribe(Jt,this.vp,(t=>{var i;const e=t.payload;null===(i=this.adHandler)||void 0===i||i.disableAds(li.LINEAR,e)})),this.subscribe(Qt,this.vp,(()=>{var t;null===(t=this.adHandler)||void 0===t||t.stopAd("forceStopAdSlot")})),this.subscribe(Yt,this.vp,(()=>{if(this.adHandler)if(this.adHandler.linearInImpression)this.gp.endPod(),this.adHandler.stopAd("forceStopAdPod");else{const t=!0;this.Ep(t)}})),this.subscribe(Zt,this.vp,(t=>{var i;null===(i=this.adHandler)||void 0===i||i.updateLinearPodRemainingTime(t.payload.remainingTime)})),this.subscribe(Xt,this.vp,(t=>{var i,e;const s=t.payload.adBreakType,n=null===(i=this.adHandler)||void 0===i?void 0:i.getLinearAdContainerWidth(),r={adBreak:s,playerWidth:(0,dt.$K)(n)?n:this.$playerContainer.clientWidth};this.app.services.TrackingService.trackAdOpportunity(r),null===(e=this.adHandler)||void 0===e||e.newLinearAdOpportunity()}))}Vp(){this.app.services.ViewabilityService.on(this.$playerContainer,this.Rd,{threshold:this.gd,callbackDelay:this.vd}),this.app.services.ViewabilityService.on(this.$playerContainer,((t,i)=>this.Fu(t,i)),{threshold:this.fd}),this.app.services.ViewabilityService.subscribe(Tt.rl.OmidViewabilityThreshold,(t=>{this.mediator.publish(this,Tt.rl.OmidViewabilityThreshold,{payload:{threshold:t}})})),this.app.config.os.os===St.M.Ios&&this.app.services.PageFocusService.on(this.jd)}Dd(){this.Cd&&this.Td&&this.mediator.publish(this,p.Xh.SessionView)}Fu(t,i=!1){this.vp.setToggleAdsReason({isAppBackgrounded:i}),this.app.config.isInApp&&(i?(this.Vl=this.getVolume(),this.setVolume(0)):this.Vl&&(this.setVolume(this.Vl),this.Vl=null)),this.Id=t,this.mediator.publish(this,Tt.Km.IsViewable,{payload:t}),this.vp.viewabilityStateChanged(this.checkFloatingViewability(t),this.gp.isInAdPod(),this.gp.isInPodTimeout()),this.app.services.TrackingService.setSessionViewability(t)}checkFloatingViewability(t){const i=this.app.services.ViewabilityService.getIsTabInFocus();return!(t||!this.floatingModule||!this.floatingModule.isInFloating||!i)||t}ks(){var t,i,e;const n=this.$playerContainer.clientWidth,r=this.$playerContainer.clientHeight,h=this.fl?Vt.zc.Fullscreen:Vt.zc.Normal;null===(t=this.adHandler)||void 0===t||t.resizeAd(n,r,h,this.$s);try{null===(i=this.vp)||void 0===i||i.onResize(n,r)}catch(t){(0,s.n)({message:"BaseExperience_onResize_player",callStack:t.stack,exception:t.message,level:s.D.WARN})}null===(e=this.adHandler)||void 0===e||e.setPlayerOrientation(this.Fp(n,r)),this.breakPointsHandler.updateWidth(n),this.app.services.TrackingService.updatePlayerDimensions(n,r),setTimeout((()=>{this.mediator.publish(this,Tt.Km.SizeChanged,{payload:{width:n,height:r}}),this.$p()}))}isBelowSmBreakpoint(t){return t<this.Ld}Fp(t,i){return t<i?ci.Portrait:t>i?ci.Landscape:ci.None}$p(){this.fl||this.rp()}Np(){this.app.services.ResizeObserver.on(this.$playerContainer,(()=>{this.ks()}))}qp(){var t;this.fl=!0,this.app.services.InteractionService.disableScrollEvent(),this.op(),null===(t=this.adHandler)||void 0===t||t.setVastViewMode(Vt.zc.Fullscreen)}zp(){var t;this.fl=!1,this.app.services.InteractionService.enableScrollEvent(),this.ap(),null===(t=this.adHandler)||void 0===t||t.setVastViewMode(Vt.zc.Normal)}Wp(){const t=`<cnx class='${m.oV}'></cnx>`,i=this.app.services.GlobalDomUtilsService.createElementByString(t);return this.Gp(i),i}Gp(t){(0,e.T7)(t,{"padding-bottom":`${this.Jp()}%`})}Jp(){return this.Lp.playerSize.ratioHeight/this.Lp.playerSize.ratioWidth*100}Qp(){this.Bd.push(this.floatingModule.onFloatingEnterStart.subscribe((()=>{this.mediator.publish(this,Tt.Zr.PlayerFloatChanged,{payload:Rt.Float}),this.mediator.publish(this,Tt.Zr.FloatingEnterStart,{payload:!0})})),this.floatingModule.onFloatingExitStart.subscribe((()=>{this.mediator.publish(this,Tt.Zr.FloatingExitStart,{payload:!0})})),this.floatingModule.onFloatingExitStop.subscribe((()=>{this.mediator.publish(this,Tt.Zr.PlayerFloatChanged,{payload:Rt.Embed}),this.mediator.publish(this,Tt.Zr.FloatingExitStop,{payload:!0})})),this.floatingModule.onFloatingEnterStop.subscribe((()=>{this.mediator.publish(this,Tt.Zr.FloatingEnterStop,{payload:!0}),this.Fu(!0)})))}Yp(){this.floatingModule=new Nt(this.app.services.ViewabilityService,this.app.services.ResizeObserver,this.$playerContainer,this.Lp.floatingSettings,this.app.config.device,this.app.services.GlobalDomUtilsService,this.Xp),this.Qp(),this.floatingModule.start()}Zp(){this.alwaysFloatingModule=new Ut(this.app.services.ResizeObserver,this.$experienceContainer,this.Lp.floatingSettings,this.app.config.device,this.app.services.GlobalDomUtilsService),this.Bd.push(this.alwaysFloatingModule.onFloatingEnterStop.subscribe((()=>{this.app.services.ViewabilityService.triggerRecheck(this.$playerContainer)}))),this.alwaysFloatingModule.start()}setNewVolume(t){var i;null===(i=this.adHandler)||void 0===i||i.setLinearVolume(t)}tf(){var t;this.if(),null===(t=this.adHandler)||void 0===t||t.onLinearExperienceEvent.subscribe((t=>{var i;t.type===p.Uh.UserInteraction&&(null===(i=t.payload)||void 0===i?void 0:i.volume)&&this.ef()}))}sf(t){this.subscribe(p.Uh.UserInteraction,t,(({payload:{volume:t}})=>{t&&this.ef()}))}ys(t){this.mediator.publish(this,Tt.Km.VolumeChanged,{payload:t}),this.app.services.EventsStorageService.emitVolumeChange(t)}Ud(t){this.getVolume()!==t&&this.setNewVolume(t)}if(){this.bd=!0,this.$playerContainer.addEventListener("mouseover",this.Nd),this.$playerContainer.addEventListener("mouseout",this.Hd)}ef(){this.bd&&(this.bd=!1,this.$playerContainer.removeEventListener("mouseover",this.Nd),this.$playerContainer.removeEventListener("mouseout",this.Hd))}nf(){this.breakPointsHandler=new F(this.$playerContainer,this.app.config.device,this.rf,this.hf),this.breakPointsHandler.updateWidth(this.$playerContainer.clientWidth)}af(){if(this.Lp.isCloseButton){switch(this.adHandler&&this.Pi.push(this.adHandler.onLinearUiComponentEvent.subscribe((t=>{t.type===_t.Close&&this.handleClose()}))),this.Lp.closeButtonMode){case l.ProtoPlayerCloseButtonMode.AlwaysOn:(0,e.cn)(this.$playerContainer,m.s6.CloseOn);break;case l.ProtoPlayerCloseButtonMode.Off:(0,e.cn)(this.$playerContainer,m.s6.CloseOff);break;case l.ProtoPlayerCloseButtonMode.OnHover:(0,e.cn)(this.$playerContainer,m.s6.CloseHover)}switch(this.Lp.floatingSettings.floatingCloseButtonMode){case l.ProtoPlayerCloseButtonMode.AlwaysOn:(0,e.cn)(this.$playerContainer,m.s6.CloseFloatOn);break;case l.ProtoPlayerCloseButtonMode.Off:(0,e.cn)(this.$playerContainer,m.s6.CloseFloatOff);break;case l.ProtoPlayerCloseButtonMode.OnHover:(0,e.cn)(this.$playerContainer,m.s6.CloseFloatHover)}}}Cp(t){const{skipOffset:i}=t;return{isAutoPlay:this.Lp.playbackMode===l.ProtoPlayerPlaybackModeEnum.Autoplay,skipOffset:i,isSkippable:(0,dt.kE)(i)}}cf(){this.Td=!0,this.app.services.TrackingService.setContentStart(),this.Dd()}Fd(){const{clientWidth:t,clientHeight:i}=this.$experienceContainer;return!(0,di.ON)({width:t,height:i})&&!this.isBelowSmBreakpoint(t)||((0,e.cn)(this.$experienceContainer,m.Gj.NoHeight),this.lf())}lf(){return _i.includes(this.app.config.bundleID)}uf(t){try{const{display:i,width:e,height:s,flex:n,maxWidth:r,minWidth:h}=this.app.services.GlobalDomUtilsService.getComputedStyle(t),{width:o,height:a}=t.getBoundingClientRect(),c={display:i,compWidth:e,boundWidth:o,compHeight:s,boundHeight:a,flex:n,maxWidth:r,minWidth:h};return{type:t.nodeName,styles:JSON.stringify(c)}}catch(t){return{err:"BaseExperience_getElementInfo_error"}}}df(){if(!(0,pi.Vm)([95,5]))return;const t={parent:this.uf(this.$experienceContainer.parentElement),main:this.uf(this.$experienceContainer)};(0,s.n)({message:"BaseExperience_invalid_dimensions",level:s.D.INFO,exception:JSON.stringify(t)})}pf(){this.gp=new ai(this.Lp.adBreaks)}Ta(t,i,e,s){this.Lp=t,this.app=i,this.$experienceContainer=e,s&&s(),this.Wd(),this.app.services.ViewabilityService.setViewableThreshold(this.yd),this.generateHTML(),this.pf(),this.app.services.ResizeObserver.on(this.$experienceContainer,this.Vd),this.Fd()?this.mediator.publish(this,p.Uh.CanStart):this.df()}start(){return wi(this,void 0,void 0,(function*(){this.xd=!0,this.app.services.TrackingService.updatePlayerDimensions(this.$playerContainer.clientWidth,this.$playerContainer.clientHeight),(0,e.cn)(this.$experienceContainer,m.sN.MainContainerFlex),this.mediator.publish(this,p.Xh.SessionRendered),this.nf(),this.Np(),this.Lp.floatingSettings.floatingMode===l.ProtoPlayerFloatingMode.Always?this.Zp():(this.rp(),this.Yp()),this.Lp.lineItemSettings.lineItems.length>0&&!this.Lp.disableAdvertising&&!w._.isBannerBlocked&&(this.app.config.isOVPDomain?this.Pi.push(w._.onAdBlockerDetected().subscribe((t=>{t||this.xp()}))):this.xp()),this.app.config.isMobile||this.Lp.soundMode!==l.ProtoPlayerSoundMode.Hover||this.tf(),this.Lp.isCloseButton&&this.af(),this.Lp.displayAdCountdown&&(0,e.cn)(this.$playerContainer,m.s6.AdShowCountdown);try{this.Dp()}catch(t){(0,s.n)({message:"BaseExperience_initAdsController",exception:t.message,callStack:t.stack,level:s.D.INFO})}w._.isBannerBlocked||w._.detectUsingScript().then((t=>{t&&(this.app.services.TrackingService.trackSessionAdBlocker(l.ProtoAdBlockDetectionTypeEnum.Network),this.vp.disableAdvertising())}))}))}play(){var t;null===(t=this.adHandler)||void 0===t||t.play()}pause(){var t;null===(t=this.adHandler)||void 0===t||t.pause()}setVolume(t){this.setNewVolume(t),this.ef()}getSize(){return{width:this.$experienceContainer.clientWidth,height:this.$experienceContainer.clientHeight}}setSize(t,i){(0,di.ON)({width:t,height:i})||(0,e.T7)(this.$experienceContainer,{width:`${t}px`,height:`${i}px`})}setCustomMacros(t){this.app.services.MacrosService.addExtraMacros(t)}isViewable(){return this.app.services.ViewabilityService.check({element:this.$playerContainer,threshold:this.fd})}setViewableThreshold(t){this.app?this.app.services.ViewabilityService.setViewableThreshold(t):this.yd=t}setAmpUserConsent(t){this.app.services.UserManagerService.setAmpUserConsent(t)}triggerDestroy(){this.app.services.EventsStorageService.destroy(),this.mediator.publish(this,p.Uh.Destroy)}disableAdvertising(){this.vp.disableAdvertising()}enableAdvertising(){this.vp.enableAdvertising()}enableFloatingMode(){var t;null===(t=this.floatingModule)||void 0===t||t.enableFloatingMode()}disableFloatingMode(){var t;null===(t=this.floatingModule)||void 0===t||t.disableFloatingMode()}isFloatingModeEnabled(){return this.floatingModule?this.floatingModule.isFloatingModeEnabled():!!this.alwaysFloatingModule}setFloatingSettings(t){this.floatingModule?this.floatingModule.setFloatingSettings(t):this.alwaysFloatingModule.setFloatingSettings(t)}destroy(){(0,jt.i)(this.Pi),this.adHandler&&((0,jt.i)(this.Od),this.Sp.unsubscribe(),this.adHandler.destroy()),this.vp&&this.vp.destroy(),this.floatingModule&&(this.floatingModule.destroy(),this.floatingModule=null,(0,jt.i)(this.Bd))}}var Pi,Ii,ki;!function(t){t[t.Unknown=0]="Unknown",t[t.TimeoutBetweenAds=1]="TimeoutBetweenAds",t[t.InImpression=2]="InImpression",t[t.LinearDemandMissing=3]="LinearDemandMissing"}(Pi||(Pi={}));class Ci extends d._{constructor(t,i,e,s,n,r,h,o){super(),this.mediator=t,this.Be=i,this.ff=e,this.gf=s,this.vf=n,this.yf=r,this.pd=h,this.bf=o,this.xf=Vt.zc.Normal,this.wf=[],this.Sf=new It.x,this.Af=new It.x,this.Pf=new It.x,this.If=new It.x,this.kf=new It.x,this.Cf=new It.x,this.Tf=new It.x,this.Mf=new It.x,this.Ef=new It.x,this.Bf=new It.x,this.Lf=new It.x,this.Rf=new It.x,this.Df=this.jf(),this.Vf(),this.Ff=this.$f(),this.Nf(),this.Uf=this.Hf(),this.Uf&&this.qf()}zf(t,i){const e=[{container:this.Wf,width:t,height:i,type:l.ProtoAdType.Overlay},{container:this.Wf,width:t,height:i,type:l.ProtoAdType.Video},{container:this.Gf,width:t,height:i,type:l.ProtoAdType.Nonlinear}];return this.Gf||e.pop(),e}Vf(){this.wf.push(this.Df.onAdsEnable.subscribe((t=>{this.Sf.next(t)})))}qf(){var t,i,e;this.wf.push(null===(t=this.Uf)||void 0===t?void 0:t.onVpaidEvent.subscribe((t=>{this.Af.next(t)})),null===(i=this.Uf)||void 0===i?void 0:i.onNonLinearEvent.subscribe((t=>{t.type===qt.ShowNonLinearEvent&&this.linearInImpression&&this.Uf.pause(),this.Ef.next(t)})),null===(e=this.Uf)||void 0===e?void 0:e.onExperienceEvent.subscribe((t=>{this.Bf.next({type:t.type,payload:t.payload})})),this.Df.onNonlinearImpressionPrice.subscribe((t=>{this.Lf.next(t)})),this.Df.onNonlinearImpressionRevenue.subscribe((t=>{this.Rf.next(t)})))}Nf(){this.wf.push(this.Ff.onVpaidEvent.subscribe((t=>{this.Af.next(t)})),this.Ff.onUiComponentEvent.subscribe((t=>{this.If.next(t)})),this.Ff.onExperienceEvent.subscribe((t=>{this.kf.next({type:t.type,payload:t.payload})})),this.Ff.onLinearEvent.subscribe((t=>{var i;t.type===Ht.ShowLinearEvent&&(null===(i=this.Uf)||void 0===i||i.pause()),this.Pf.next(t)})),this.Df.onLinearImpressionPrice.subscribe((t=>{this.Cf.next(t)})),this.Df.onLinearImpressionRevenue.subscribe((t=>{this.Tf.next(t)})),this.Df.onLinearNoFill.subscribe((()=>{this.Mf.next()})))}Jf(t,i,e){this.Df.initAd(t,i,this.xf,1,e,this.zf(t,i),this.yf)}adStateChange(t,i){var e;this.Ff.adStateChange(t,i),null===(e=this.Uf)||void 0===e||e.adStateChange(t,i)}contentPlaybackStateChanged(t){var i;null===(i=this.Uf)||void 0===i||i.contentPlaybackStateChanged(t)}disableAds(t,i){this.Df.disableAds(t,i)}enableAds(t){this.Df.enableAds(t)}start(t,i,e,s=!1,n=!1){n&&this.startNonLinear(),this.startLinear(e,s),this.Jf(t,i,e)}stopAd(t){var i;this.Ff.stopAd(t),null===(i=this.Uf)||void 0===i||i.stopAd(t)}play(){this.Ff.play()}pause(){var t;this.Ff.pause(),null===(t=this.Uf)||void 0===t||t.pause()}resumeWithoutUserInteraction(t){var i;this.Ff.resumeWithoutUserInteraction(),null===(i=this.Uf)||void 0===i||i.resumeWithoutUserInteraction(t)}resizeAd(t,i,e,s){var n;this.setVastViewMode(e),this.Ff.resizeAd(t,i),null===(n=this.Uf)||void 0===n||n.resizeAd(t,i,s)}setPlayerOrientation(t){this.Df.setPlayerOrientation(t)}setVastViewMode(t){this.xf=t,this.Df.setVastViewMode(t)}contentChanged(){this.Df.onContentChange()}newLinearAdOpportunity(){this.Df.newLinearAdOpportunity()}destroy(){var t,i,e;(0,jt.i)(this.wf),this.Ff.destroy(),null===(t=this.Uf)||void 0===t||t.destroy(),null===(i=this.Df)||void 0===i||i.disableAds(li.LINEAR,{disableReason:Pi.Unknown}),null===(e=this.Df)||void 0===e||e.disableAds(li.NONLINEAR,{disableReason:Pi.Unknown}),this.Df.destroy()}get onAdsEnable(){return this.Sf.asObservable()}get onVpaidEvent(){return this.Af.asObservable()}startNonLinear(){var t;null===(t=this.Uf)||void 0===t||t.start()}contentEnded(){var t;null===(t=this.Uf)||void 0===t||t.pause()}get onNonLinearEvent(){return this.Ef.asObservable()}get onNonLinearExperienceEvent(){return this.Bf.asObservable()}get onNonLinearImpressionPrice(){return this.Lf.asObservable()}get onNonLinearImpressionRevenue(){return this.Rf.asObservable()}get nonLinearInImpression(){return!!this.Uf&&this.Uf.inImpression}get Gf(){var t;return null===(t=this.Uf)||void 0===t?void 0:t.adContainer}startLinear(t,i=!1){this.Ff.start(t,i)}setMediaRestrictions(t){this.Df.setMediaRestrictions(t)}getLinearVolume(){return this.Ff.getVolume()}setLinearVolume(t){this.Ff.setVolume(t)}hideLinear(){this.Ff.hide()}showLinear(){this.Ff.show()}updateContinueReadingCard(){this.Ff.updateContinueReadingCard()}setContinueReadingCard(t){this.Ff.setContinueReadingCard(t)}hideContinueReadingCard(){this.Ff.hideContinueReadingCard()}setAdMarkerTitle(t){this.Ff.setAdMarkerTitle(t)}hideAdMarkerTitle(){this.Ff.hideAdMarkerTitle()}enterAdPodLoadingState(){this.Ff.enterAdPodLoadingState()}setAdLoadingBackgroundUrl(t){this.Ff.setAdLoadingBackgroundUrl(t)}updateLinearPodRemainingTime(t){this.Df.updateLinearPodRemainingTime(t)}get onLinearEvent(){return this.Pf.asObservable()}get onLinearUiComponentEvent(){return this.If.asObservable()}get onLinearExperienceEvent(){return this.kf.asObservable()}get onLinearImpressionPrice(){return this.Cf.asObservable()}get onLinearImpressionRevenue(){return this.Tf.asObservable()}get onLinearNoFill(){return this.Mf.asObservable()}get linearInImpression(){return this.Ff.inImpression}get Wf(){return this.Ff.adContainer}get Qf(){return this.Ff.secondaryAdContainer}get linearAdUserInterface(){return this.Ff.adUserInterface}get onFullcreenChange(){return this.Ff.onFullcreenChange}get linearAdInWin(){return this.Ff.adInWin}get firstLinearAdShown(){return this.Ff.firstAdShown}get inAdPodLoadingState(){return this.Ff.inAdPodLoadingState}getLinearAdContainerWidth(){return this.Ff.getMainAdContainerWidth()}userInteraction(t){this.Df.userInteraction(t)}}class Ti{constructor(){this.Yf=(0,pi.qs)()}get id(){return this.Yf}}!function(t){t[t.NoPrefetch=0]="NoPrefetch",t[t.StartSessionPrefetch=1]="StartSessionPrefetch",t[t.MidSessionPrefetch=2]="MidSessionPrefetch"}(Ii||(Ii={})),function(t){t[t.ON_BID=0]="ON_BID",t[t.ON_BID_LOADING=1]="ON_BID_LOADING",t[t.ON_BID_READY=2]="ON_BID_READY",t[t.ON_BID_STARTED=3]="ON_BID_STARTED",t[t.ON_BID_LOADING_CONSUMED=4]="ON_BID_LOADING_CONSUMED",t[t.ON_BID_READY_CONSUMED=5]="ON_BID_READY_CONSUMED"}(ki||(ki={}));function Mi(t){return 2*(t+41)}function Ei(t){return t/2-41}class Bi{constructor(){this.Xf=Date.now(),this.Zf={advertiser:{}}}addPrebid(t){(0,dt.$K)(this.Zf.advertiser[t])||this.Kf(t),this.Zf.advertiser[t].prebidData.push({timestamp:Date.now()})}addBid(t,i){(0,dt.$K)(this.Zf.advertiser[t])||this.Kf(t),this.Zf.advertiser[t].bidsFloorPriceList.push({timestamp:Date.now(),floorPrice:i})}addImpression(t,i){(0,dt.$K)(this.Zf.advertiser[t])||this.Kf(t),this.Zf.advertiser[t].impressionRevenueList.push({timestamp:Date.now(),obfuscatedPrice:i})}shouldRequestLineItem(t){const i=Date.now();return!(this.tm(i,3)&&this.im(t,i,5)<-.5&&this.nm(t,i,3)>=11.5&&this.rm(t,i,10,.1)<.35)}tm(t,i){return t-this.Xf>=i*oi.uD}im(t,i,e){const s=this.Zf.advertiser[t];if(!(0,dt.$K)(s))return-1;const n=this.hm(s.impressionRevenueList,i,e).map((t=>t.obfuscatedPrice));let r=0;return(0,f.BZ)(n)&&(r=n.reduce(((t,i)=>t+Mi(i)))),this.om(r)}nm(t,i,e){const s=this.Zf.advertiser[t];if(!(0,dt.$K)(s))return-1;const n=this.hm(s.prebidData,i,e).length;return this.om(n)}rm(t,i,e,s){const n=this.Zf.advertiser[t];if(!(0,dt.$K)(n))return-1;const r=this.hm(n.impressionRevenueList,i,e).map((t=>t.floorPrice)),h=this.am(r,s);return this.om(h)}hm(t,i,e){const s=i-oi.s_,n=i-e*oi.uD,r=[];for(let i=t.length-1;i>=0&&t[i].timestamp>=n;i--)t[i].timestamp<=s&&r.push(t[i]);return r}om(t){return 0===t?-1:t}Kf(t){this.Zf.advertiser[t]={prebidData:[],bidsFloorPriceList:[],impressionRevenueList:[]}}am(t,i){if(0===t.length)return 0;if(i<=0)return t[0];if(i>=1)return t[t.length-1];const e=((t=t.sort(((t,i)=>t-i))).length-1)*i,s=Math.floor(e),n=s+1,r=e%1;return n>=t.length?t[s]:t[s]*(1-r)+t[n]*r}}class Oi{constructor(){this.creativeView=[],this.start=[],this.firstQuartile=[],this.midpoint=[],this.thirdQuartile=[],this.impression=[],this.viewable_impression=[],this.complete=[],this.mute=[],this.unmute=[],this.pause=[],this.rewind=[],this.resume=[],this.fullscreen=[],this.exitFullscreen=[],this.expand=[],this.collapse=[],this.close=[],this.closeLinear=[],this.acceptInvitationLinear=[],this.acceptInvitation=[],this.skip=[],this.progress=[],this.playerExpand=[],this.playerCollapse=[],this.adExpand=[],this.adCollapse=[],this.fullScreen=[],this.canPlayThrough=[],this.stalled=[],this.waiting=[],this.otherAdInteraction=[]}}class Li{constructor(t){this.clickTrackings=[],this.customClicks=[],this.errorUrls=[],this.impressions=[],this.trackingEvents=new Oi,t.inLine?this.lm(t.inLine):this.um(t.wrapper)}lm(t){this.dm(t.errors),this.pm(t.impressions),this.fm(t.creatives)}um(t){this.dm(t.errors),this.pm(t.impressions),this.fm(t.creatives)}gm(t){this.vm(t.trackingEvents),this.bm(t.videoClicks)}bm(t){t&&(this.xm(t.clickTrackings),this.wm(t.customClicks))}xm(t){this.clickTrackings.push(...t)}wm(t){this.customClicks.push(...t)}vm(t){t.forEach((t=>{try{this.trackingEvents[t.name].push(t.uri)}catch(i){(0,s.n)({message:"AdManager_VastResponse_tracker",exception:`${t.name}`,callStack:i.stack,level:s.D.INFO})}}))}fm(t){t.forEach((t=>{t.linear?this.gm(t.linear):t.nonLinear&&this.vm(t.nonLinear.trackingEvents)}))}dm(t){this.errorUrls.push(...t)}pm(t){this.impressions.push(...t)}}const Ri={[l.ProtoTrackerTriggerType.Impression]:"adImpression",[l.ProtoTrackerTriggerType.Complete25Pc]:"adQuartileFirst",[l.ProtoTrackerTriggerType.Complete50Pc]:"adQuartileSecond",[l.ProtoTrackerTriggerType.Complete75Pc]:"adQuartileThird",[l.ProtoTrackerTriggerType.ViewCompletion]:"adQuartileFourth",[l.ProtoTrackerTriggerType.VideoClick]:"adClick",[l.ProtoTrackerTriggerType.Pause]:"adPause",[l.ProtoTrackerTriggerType.Resume]:"adResume",[l.ProtoTrackerTriggerType.Mute]:"adMute",[l.ProtoTrackerTriggerType.Unmute]:"adUnmute"};class Di{constructor(){this.adError=[],this.adWin=[],this.adImpression=[],this.adViewableImpression=[],this.adStarted=[],this.adVideoStart=[],this.adQuartileFirst=[],this.adQuartileSecond=[],this.adQuartileThird=[],this.adQuartileFourth=[],this.adClick=[],this.adPause=[],this.adResume=[],this.adSkip=[],this.adMute=[],this.adUnmute=[],this.adUserClose=[],this.adUserAcceptInvitation=[],this.adUserMinimize=[]}static track(t,i,s,n){if(!Array.isArray(t))return;const{width:r,height:h}=n.adContainerState.get(s.adType),{adBreakType:o}=n.adBreakState,{mediaDescription:a,mediaDuration:c,mediaId:u,mediaUrl:d,mediaTitle:p}=n.media;t.forEach((t=>{if(t.url)try{const n=i.replace(t.url,s.vendorId,{adMacros:{adWidth:r,adHeight:h,adPostion:o},mediaMacros:{mediaDescription:a,mediaDuration:c,mediaId:u,mediaUrl:d,mediaTitle:p}});switch(t.type){case l.ProtoTrackerType.Image:(0,pi.Hh)([n],window);break;case l.ProtoTrackerType.Javascript:(0,e.dZ)({src:n},window.document.head,window)}}catch(t){}}))}}function ji(t,i){t.forEach((t=>function(t,i){(function(t,i){return i[Ri[t]]})(t.trigger,i).push({type:t.type,url:t.url})}(t,i)))}function Vi(t){return{type:l.ProtoTrackerType.Image,url:t}}function Fi(t){return t.map((t=>Vi(t)))}var $i;!function(t){t[t.HandlingSdkUrl=0]="HandlingSdkUrl",t[t.NetworkRequestUrl=1]="NetworkRequestUrl",t[t.XmlInvalidString=2]="XmlInvalidString",t[t.XmlParseGeneral=3]="XmlParseGeneral",t[t.XmlInvalidTree=4]="XmlInvalidTree",t[t.XmlInvalidAd=5]="XmlInvalidAd",t[t.XmlAdaptorWrapperLimit=6]="XmlAdaptorWrapperLimit",t[t.HTMLUnknownMimeType=7]="HTMLUnknownMimeType",t[t.ImaAdsManagerInit=8]="ImaAdsManagerInit",t[t.ImaVastEmptyResponse=9]="ImaVastEmptyResponse",t[t.ImaRequestException=10]="ImaRequestException",t[t.ImaTimeout=11]="ImaTimeout",t[t.ImaInvalidResponse=12]="ImaInvalidResponse",t[t.InvalidCreativeUrl=13]="InvalidCreativeUrl",t[t.BidIsNotTargetingAllowedEver=14]="BidIsNotTargetingAllowedEver"}($i||($i={}));const Ni={[$i.HandlingSdkUrl]:l.ConnatixNoBidReasonEnum.CsRequestException,[$i.NetworkRequestUrl]:l.ConnatixNoBidReasonEnum.CsRequestException,[$i.XmlInvalidString]:l.ConnatixNoBidReasonEnum.CsEmptyResponse,[$i.XmlParseGeneral]:l.ConnatixNoBidReasonEnum.CsInvalidResponse,[$i.XmlInvalidTree]:l.ConnatixNoBidReasonEnum.CsInvalidResponse,[$i.XmlInvalidAd]:l.ConnatixNoBidReasonEnum.CsInvalidResponse,[$i.XmlAdaptorWrapperLimit]:l.ConnatixNoBidReasonEnum.CsInvalidResponse,[$i.HTMLUnknownMimeType]:l.ConnatixNoBidReasonEnum.CsInvalidResponse,[$i.ImaAdsManagerInit]:l.ConnatixNoBidReasonEnum.CsRequestException,[$i.ImaVastEmptyResponse]:l.ConnatixNoBidReasonEnum.CsInvalidResponse,[$i.ImaRequestException]:l.ConnatixNoBidReasonEnum.CsRequestException,[$i.ImaTimeout]:l.ConnatixNoBidReasonEnum.Timeout,[$i.ImaInvalidResponse]:l.ConnatixNoBidReasonEnum.CsInvalidResponse,[$i.InvalidCreativeUrl]:l.ConnatixNoBidReasonEnum.CsRequestException,[$i.BidIsNotTargetingAllowedEver]:l.ConnatixNoBidReasonEnum.BidIsNotTargetingAllowedEver};var Ui,Hi;!function(t){t.VOLUME_DETECTED="volume_detected",t.MALWARE_DETECTED="malware_detected",t.BADURI_DETECTED="baduri_detected"}(Ui||(Ui={})),function(t){t[t.None=0]="None",t[t.Mute=1]="Mute",t[t.ScrollHijack=2]="ScrollHijack",t[t.MemoryLeak=4]="MemoryLeak",t[t.Malware=8]="Malware",t[t.All=15]="All"}(Hi||(Hi={}));class qi{constructor(){this.Af=new It.x}get onVpaidEvent(){return this.Af.asObservable()}handshakeVersion(t="2.0"){return"2.0"}}var zi,Wi,Gi=o(2157);o(7417);!function(t){t.Timeout="timeout",t.TimeoutLoaded="timeout_loaded",t.ImaError="imaError",t.ImaScriptFailure="imaScriptFailure",t.ImaObjectNotFound="imaObjectNotFound",t.ImaManagerInit="imaManagerInit",t.ImaInitSdkError="initImasdkError",t.VastVideoTagEventError="vastVideoTagEventError",t.VastUnsupportedMedia="vastUnsupportedMedia",t.VastPlayPromiseReject="playPromiseReject",t.VastNonLinearImageLoadFailure="nonLinearVastImageLoadFailure",t.AdStopped="adStopped",t.MuteEnforce="muteEnforce",t.VpaidOnLoad="vpaidOnLoad",t.VpaidInvalid="vpaidInvalid",t.VpaidGetVpaidAdError="vpaidGetVpaidAdError",t.CnxMediaNoRenditions="noRenditions",t.CnxMediaSrcNotSupported="srcNotSupported",t.InvalidVpaidEvent="invalidVpaidEvent",t.AdxOverlayNoFill="adxOverlayNoFill",t.AdxOverlayGptScriptLoad="adxOverlayGptScriptLoad",t.DisplayIntegratorIframeLoad="displayIntegratorIframeLoad",t.EnforcementMalware="malwareDetected",t.EnforcementVolume="volumeDetected",t.Cancelled="adManagerRemoved",t.DomainBlocked="domainBlocked",t.AdaptorStartAdError="adaptorStartAdError",t.AdaptorInitAdError="adaptorInitAdError",t.WrapperStartAdError="wrapperStartAdError",t.WrapperInitAdError="wrapperInitAdError",t.NonLinearZeroDimensions="nonLinearzeroDimensions",t.NonLinearImageToLarge="nonLinearImageToLarge",t.NonLinearUnsupportedMedia="nonLinearUnsupportedMedia"}(zi||(zi={})),function(t){t[t.Win=0]="Win",t[t.AdLoaded=1]="AdLoaded",t[t.AdStarted=2]="AdStarted",t[t.AdImpression=3]="AdImpression"}(Wi||(Wi={}));class Ji{constructor(t){this._m=t,this.Am=new Map,(0,dt.$K)(this._m.settings.bidLifecycle)||(this._m.settings.bidLifecycle={})}onTrackingLifecycleEvent(t){switch(this.Am.set(t,Date.now()),t){case Wi.AdLoaded:this.Pm();break;case Wi.AdImpression:this.Im()}}Pm(){this._m.settings.bidLifecycle.winToAdLoadedTime=this.km}Im(){this._m.settings.bidLifecycle.startAdToImpressionTime=this.Cm}get Cm(){return this.Am.get(Wi.AdImpression)&&this.Am.get(Wi.AdStarted)?this.Am.get(Wi.AdImpression)-this.Am.get(Wi.AdStarted):0}get km(){return this.Am.get(Wi.AdLoaded)&&this.Am.get(Wi.Win)?this.Am.get(Wi.AdLoaded)-this.Am.get(Wi.Win):0}}const Qi={[l.ProtoCreativeTypeEnum.External]:t=>t.floorPrice||t.customCpm,[l.ProtoCreativeTypeEnum.ThirdParty]:t=>t.floorPrice||t.customCpm,[l.ProtoCreativeTypeEnum.MediaFile]:t=>t.floorPrice||t.customCpm,[l.ProtoCreativeTypeEnum.HeaderBidder]:t=>t.cpm,[l.ProtoCreativeTypeEnum.Rtb]:t=>Mi(t.obfuscatedPrice),[l.ProtoCreativeTypeEnum.Tam]:t=>Mi(t.obfuscatedPrice),[l.ProtoCreativeTypeEnum.TamDeal]:t=>Mi(t.obfuscatedPrice),[l.ProtoCreativeTypeEnum.TamPrivateAuction]:t=>Mi(t.obfuscatedPrice)};function Yi(t){return(0,Qi[t.creativeType])(t)}var Xi;!function(t){t.IMPRESSION_TIMEOUT="IMPRESSION_TIMEOUT",t.VIEWABLE_IMPRESSION_TIMEOUT="VIEWABLE_IMPRESSION_TIMEOUT",t.SKIP_AD_TIMEOUT="SKIP_AD_TIMEOUT",t.STOP_AD_TIMEOUT="STOP_AD_TIMEOUT",t.AD_LOADED_TIMEOUT="AD_LOADED_TIMEOUT"}(Xi||(Xi={}));const Zi="cnx-ad-bid-slot-selected",Ki="Connatix Ad";class te extends qi{constructor(t,i){super(),this.Tm=t,this.settings=i,this.Mm=null,this.Em=null,this.Bm=null,this.Om=null,this.Lm=void 0,this.Rm=!1,this.Hl=!1,this.Dm=!1,this.jm=!1,this.Fm=null,this.wf=[],this.$m=new It.x,this.Nm=()=>{this.Um({type:Vt.fI.AdError,payload:{errorMessage:zi.Timeout}}),this.Hm()},this.qm=()=>{this.zm(),this.Wm(Xi.VIEWABLE_IMPRESSION_TIMEOUT).clearTimeout(),this.settings.viewabilityService.off(this.Mm,this.Gm)},this.Gm=t=>{const i=this.Wm(Xi.VIEWABLE_IMPRESSION_TIMEOUT);t?i.timeoutHandle.timeoutId||i.setTimeout():i.clearTimeout()},this.Jm=()=>{this.Um({type:Vt.fI.AdSkipped}),this.Hm()},this.Qm=()=>{this.Um({type:Vt.fI.AdStopped,payload:{shouldTrackPostBid:!0}}),this.Hm()},this.Ym=()=>{this.Um({type:Vt.fI.AdError,payload:{errorMessage:zi.TimeoutLoaded}}),this.Hm()},this.Wm=t=>{const i=this.Xm[t];return{timeoutHandle:i,setTimeout:()=>{i.timeoutId=this.Tm.setTimeout((()=>{i.callback()}),i.timeout)},clearTimeout:()=>{null!==i.timeoutId&&(this.Tm.clearTimeout(i.timeoutId),i.timeoutId=null)}}},this.Zm=Date.now(),this.creativeId=this.settings.externalCreativeId,this.tg=`cnx-ad-bid-slot-id-${this.settings.requestMetadata.data.cnxBidId}`,this.ig=`cnx-ad-slot-${this.settings.id}`;const{adType:e}=this.settings.adManagerLineItem.protoLineItem;this.Xm={[Xi.IMPRESSION_TIMEOUT]:{callback:this.Nm,timeout:25e3,timeoutId:null},[Xi.VIEWABLE_IMPRESSION_TIMEOUT]:{callback:this.qm,timeout:Gi.xs[e],timeoutId:null},[Xi.SKIP_AD_TIMEOUT]:{callback:this.Jm,timeout:500,timeoutId:null},[Xi.STOP_AD_TIMEOUT]:{callback:this.Qm,timeout:500,timeoutId:null},[Xi.AD_LOADED_TIMEOUT]:{callback:this.Ym,timeout:25e3,timeoutId:null}},this.pd=i.urlSuffixerService}get createdTimestamp(){return this.Zm}getPrice(){const{advertiserLineItemId:t,creativeType:i,floorPrice:e,lineItemPriority:s,customCpm:n,successRate:r}=this.settings.adManagerLineItem.protoLineItem;return Yi({lineItemId:t,bidId:this.settings.id,creativeType:i,floorPrice:e,obfuscatedPrice:this.settings.obfuscatedPrice,successRate:this.settings.successRate||r,priority:s,cpm:this.settings.cpm,customCpm:n})}skipAd(){this.Wm(Xi.SKIP_AD_TIMEOUT).setTimeout()}stopAd(t){this.Wm(Xi.STOP_AD_TIMEOUT).setTimeout()}startAd(){this.jm&&(0,s.n)({message:"AdManager_ABaseBidAdaptor_samebid",exception:"startAd",callStack:`adv:${this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId} bidid: ${this.ig}`,level:s.D.CRITICAL}),this.jm=!0,this.Wm(Xi.IMPRESSION_TIMEOUT).setTimeout()}initAd(t,i,e,n,r,h,o){this.Dm&&(0,s.n)({message:"AdManager_ABaseBidAdaptor_samebid",exception:"initAd",callStack:`adv:${this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId} bidid: ${this.ig}`,level:s.D.CRITICAL}),this.Dm=!0,this.Wm(Xi.AD_LOADED_TIMEOUT).setTimeout(),this.eg(o),this.sg=new Ji(this),this.sg.onTrackingLifecycleEvent(Wi.Win)}setAdVolume(t){this.Em.volume=t,(0,e.Q1)(this.Em,t),t<=0?this.settings.adEnforcer.start(Hi.Mute):this.settings.adEnforcer.stop(Hi.Mute)}get impressionStarted(){return this.Rm}get creativeId(){return this.Lm}set creativeId(t){(0,dt.QM)(this.creativeId)||(this.Lm=t)}get onAdViewableImpression(){return this.$m.asObservable()}ng(t){let i;(0,dt.kE)(t.payload.skipOffset)&&(i=t.payload.skipOffset);const e={type:Vt.fI.AdLoaded,payload:{adType:this.settings.adManagerLineItem.protoLineItem.adType,adLoadedData:{skipOffset:i},adSkipMode:this.settings.adManagerLineItem.protoLineItem.skipMode}};return this.settings.adLoadedPayload=e,e}rg(t){return{type:Vt.fI.AdImpression,payload:{adType:this.settings.adManagerLineItem.protoLineItem.adType,adSkipMode:this.settings.adManagerLineItem.protoLineItem.skipMode,adSourceData:{moatTrackingEnabled:this.settings.adManagerLineItem.protoLineItem.moatTrackingEnabled,creativeId:this.settings.adManagerLineItem.protoLineItem.cnxCreativeId,adId:this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,length:this.getAdDuration(),adVideoUrl:this.adVideoUrl,name:Ki,skipOffset:this.settings.adLoadedPayload.payload.adLoadedData.skipOffset},customAdData:{ADVERTISER:this.settings.requestMetadata.data.rtbAdomain,CREATIVE_ID:this.creativeId,CAMPAIGN_ID:this.settings.requestMetadata.data.rtbCampainId}}}}hg(t){return{type:Vt.fI.AdVideoStart,payload:{adType:this.settings.adManagerLineItem.protoLineItem.adType,adSkipMode:this.settings.adManagerLineItem.protoLineItem.skipMode,adSourceData:{moatTrackingEnabled:this.settings.adManagerLineItem.protoLineItem.moatTrackingEnabled,creativeId:this.settings.adManagerLineItem.protoLineItem.cnxCreativeId,adId:this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,length:this.getAdDuration(),name:Ki},customAdData:{ADVERTISER:this.settings.requestMetadata.data.rtbAdomain,CREATIVE_ID:this.creativeId,CAMPAIGN_ID:this.settings.requestMetadata.data.rtbCampainId}}}}Um(t){if(t.payload||(t.payload={}),t.payload.adType=this.settings.adManagerLineItem.protoLineItem.adType,this.ag(t))switch(t.type){case Vt.fI.AdLoaded:0,this.sg.onTrackingLifecycleEvent(Wi.AdLoaded),this.Wm(Xi.AD_LOADED_TIMEOUT).clearTimeout(),this.Af.next(this.ng(t));break;case Vt.fI.AdImpression:this.sg.onTrackingLifecycleEvent(Wi.AdImpression),this.Wm(Xi.IMPRESSION_TIMEOUT).clearTimeout(),this.cg(),(0,e.cn)(this.Bm,Zi),this.Af.next(this.rg(t)),this.Rm=!0;break;case Vt.fI.AdVideoStart:this.sg.onTrackingLifecycleEvent(Wi.AdStarted),this.Af.next(this.hg(t));break;case Vt.fI.AdStopped:case Vt.fI.AdSkipped:case Vt.fI.AdError:this.Hl&&(0,s.n)({message:"AdManager_ABaseBidAdaptor_double_destroy",exception:this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,level:s.D.WARN}),this.Cu(),this.Af.next(t);break;default:this.Af.next(t)}else this.Um({type:Vt.fI.AdError,payload:{errorMessage:zi.InvalidVpaidEvent}})}eg(t){this.Om=this.ug(),this.Bm=this.Om.slotsContainer,(0,e.cn)(this.Bm,this.tg),this.Mm=this.Om.adSlot,this.Mm.id=this.ig,this.Bm.id=this.settings.bidSlotId,this.Em=this.Om.videoSlot,this.Em.volume=t,(0,e.Q1)(this.Em,t),this.settings.adEnforcer.registerContainer(this.Bm,this.ig),this.wf.push(this.settings.adEnforcer.onEnforcerEvent.subscribe((t=>{this.dg(t)}))),this.settings.adEnforcer.start(Hi.All)}ug(){return this.settings.adSlotContainerRecycler.requestAdSlot(this.settings.adContainer)}Cu(){this.Hl=!0,(0,e.IV)(this.Bm,Zi),(0,e.IV)(this.Bm,this.tg),this.Mm.removeAttribute("id"),this.Bm.removeAttribute("id"),(0,jt.i)(this.wf),this.Hm(),this.settings.adEnforcer.deregisterContainer(this.Bm),this.settings.viewabilityService.off(this.Mm,this.Gm),null!==this.Fm&&this.Tm.clearTimeout(this.Fm),this.pg()}pg(){this.Fm=this.Tm.setTimeout((()=>{this.settings.adSlotContainerRecycler.destroyAdSlot(this.Om)}),500)}zm(){const{advertiserLineItemId:t,publisherLineItemId:i}=this.settings.adManagerLineItem.protoLineItem;this.$m.next({advertiserLineItemId:t,publisherLineItemId:i,rtbSeatId:this.settings.requestMetadata.data.rtbSeatId,dspId:this.settings.requestMetadata.data.dspId,rtbAdomain:this.settings.requestMetadata.data.rtbAdomain})}cg(){const t=Gi.fJ,i=this.Mm;this.settings.viewabilityService.on(i,this.Gm,{threshold:t}),this.Gm(this.settings.viewabilityService.check({threshold:t,element:i}))}Hm(){Object.keys(this.Xm).forEach((t=>{this.Wm(t).clearTimeout()}))}ag(t){return!(!this.Rm&&(t.type===Vt.fI.AdStopped||t.type===Vt.fI.AdSkipped))}dg(t){if(t.detectedContainer!==this.Bm)return;let i;switch(t.type){case Ui.BADURI_DETECTED:i="AdManager_enforcer_BadUri";break;case Ui.MALWARE_DETECTED:i="AdManager_enforcer_malware",this.Um({type:Vt.fI.AdError,payload:{errorMessage:zi.EnforcementMalware}});break;case Ui.VOLUME_DETECTED:i="AdManager_enforcer_soundBlock",this.Um({type:Vt.fI.AdError,payload:{errorMessage:zi.EnforcementVolume}})}(0,s.n)({message:i,exception:t.message,level:s.D.WARN})}fg(t,i,e){const n=this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,r=this.creativeId;(0,s.n)({message:`AdManager_${t}_${i}`,exception:`advertiserLineItemId:${n}_creativeId:${r}_errorMessage:${null==e?void 0:e.message}`,callStack:null==e?void 0:e.stack,level:s.D.WARN},{throttle:5})}}var ie;!function(t){t.BANNED_IMA_ADS_ID=["9026814","9053547"],t.KEYWORDS_FOR_BANNED_VAST=["nrb-v.ybp.yahoo.comvasterror","pr.ybp.yahoo.com/vasterror","//s.yimg.com/ff/vista.js"]}(ie||(ie={}));var ee=o(3640);class se extends qi{constructor(t,i,e,s,n,r,h){super(),this.mg=t,this.Zt=i,this.gg=e,this.vg=s,this.yg=n,this.bg=r,this.xg=h,this.wg=new It.x,this._g=t=>{if(!this.Sg(t))return;let i="";try{i=t.getError().getMessage()+"_"+t.getError().getErrorCode()+"_"+t.getError().getVastErrorCode()}catch(t){}this.Af.next({type:Vt.fI.AdError,payload:{errorMessage:zi.ImaError+"_"+i}})},this.Ag=t=>{const i=this.mg.AdEvent.Type;switch(t.type){case i.CLICK:this.Af.next({type:Vt.fI.AdClickThru,payload:{}});break;case i.LOADED:this.Ps(t);break;case i.IMPRESSION:const e={adsManager:this.yg,adContainer:this.Pg,viewMode:this.kg(this.Cg),adTag:this.vg};this.Af.next({type:Vt.fI.AdVideoStart}),this.Af.next({type:Vt.fI.AdImpression,payload:{imaMetadata:e}});break;case i.STARTED:this.Af.next({type:Vt.fI.AdStarted});break;case i.FIRST_QUARTILE:this.Af.next({type:Vt.fI.AdVideoFirstQuartile});break;case i.MIDPOINT:this.Af.next({type:Vt.fI.AdVideoMidpoint});break;case i.THIRD_QUARTILE:this.Af.next({type:Vt.fI.AdVideoThirdQuartile});break;case i.COMPLETE:this.Af.next({type:Vt.fI.AdVideoComplete}),this.Af.next({type:Vt.fI.AdStopped,payload:{shouldTrackPostBid:!0}});break;case i.ALL_ADS_COMPLETED:break;case i.DURATION_CHANGE:this.Af.next({type:Vt.fI.AdDurationChange});break;case i.PAUSED:this.Af.next({type:Vt.fI.AdPaused});break;case i.RESUMED:this.Af.next({type:Vt.fI.AdPlaying});break;case i.LINEAR_CHANGED:this.Af.next({type:Vt.fI.AdLinearChange});break;case i.SKIPPABLE_STATE_CHANGED:this.Af.next({type:Vt.fI.AdSkippableStateChange});break;case i.SKIPPED:this.Af.next({type:Vt.fI.AdSkipped});break;case i.VOLUME_CHANGED:this.Af.next({type:Vt.fI.AdVolumeChange});break;case i.USER_CLOSE:this.Af.next({type:Vt.fI.AdUserClose});break;case i.LOG:this.Af.next({type:Vt.fI.AdLog})}},this.Tg()}get onCreativeReceived(){return this.wg.asObservable()}initAd(t,i,e,s,n,r){this.Pg=r.slot,this.Mg=r.videoSlot,this.Cg=e||Vt.zc.Normal;try{this.yg.setVolume(0),this.yg.init(t,i,this.kg(this.Cg))}catch(t){this.Af.next({type:Vt.fI.AdError,payload:{errorMessage:zi.ImaManagerInit}})}}startAd(){try{this.yg.start()}catch(t){this.Af.next({type:Vt.fI.AdError,payload:{errorMessage:zi.WrapperStartAdError+`_${t.message}`}})}}stopAd(t){this.yg.stop(),this.Af.next({type:Vt.fI.AdStopped,payload:{shouldTrackPostBid:!0}})}resizeAd(t,i,e){this.yg.resize(t,i,this.kg(e))}pauseAd(){this.yg.pause()}resumeAd(){this.yg.resume(),this.Zt===St.M.Ios&&(0,e.UR)(this.Mg)}expandAd(){this.yg.expand()}collapseAd(){this.yg.collapse()}skipAd(){this.yg.skip()}getAdRemainingTime(){return this.yg.getRemainingTime()||0}getAdDuration(){return this.Eg?this.Eg.getDuration():0}getAdVolume(){return this.yg.getVolume()}getAdMediaWidth(){return this.Eg?this.Eg.getVastMediaWidth():0}getAdMediaHeight(){return this.Eg?this.Eg.getVastMediaHeight():0}setAdVolume(t){this.yg.setVolume(t)}getMediaFile(){return this.Eg?this.Eg.getMediaUrl():void 0}Tg(){this.gg.addEventListener(this.mg.AdErrorEvent.Type.AD_ERROR,this._g),this.yg.addEventListener(this.mg.AdErrorEvent.Type.AD_ERROR,this._g),Object.keys(this.mg.AdEvent.Type).forEach((t=>{this.yg.addEventListener(this.mg.AdEvent.Type[t],this.Ag,!1)}))}Bg(){this.gg.removeEventListener(this.mg.AdErrorEvent.Type.AD_ERROR,this._g),this.yg.removeEventListener(this.mg.AdErrorEvent.Type.AD_ERROR,this._g),Object.keys(this.mg.AdEvent.Type).forEach((t=>{this.yg.removeEventListener(this.mg.AdEvent.Type[t],this.Ag,!1)}))}kg(t){return t===Vt.zc.Fullscreen?this.mg.ViewMode.FULLSCREEN:this.mg.ViewMode.NORMAL}Og(t){return ie.BANNED_IMA_ADS_ID.some((i=>i===t))}Sg(t){const i=t.getUserRequestContext();return!i||i.id===this.bg.id}Ps(t){if(this.Eg=t.getAd(),this.Og(this.Eg.getAdId()))return void this.Af.next({type:Vt.fI.AdError,payload:{errorMessage:zi.VpaidInvalid}});this.wg.next(this.Eg.getCreativeId());let i=-1,e="";try{i=this.Eg.getSkipTimeOffset();const s=t.getAdData().clickThroughUrl;e=(0,dt.QM)(s)?s:void 0}catch(t){}(0,ee.A)(this.xg,e).then((t=>{t?this.Af.next({type:Vt.fI.AdError,payload:{errorMessage:zi.DomainBlocked}}):this.Af.next({type:Vt.fI.AdLoaded,payload:{skipOffset:i}})}))}destroy(){try{this.Bg(),setTimeout((()=>{this.yg.destroy()}))}catch(t){}}}const ne={ImaObjectNotFound:zi.ImaObjectNotFound,ImaScriptFailure:zi.ImaScriptFailure},re="//imasdk.googleapis.com/js/sdkloader/ima3.js";class he{static preloadImaSdk(t){(0,e._w)(re,t)}static fetchImaSdk(t,i){return new Promise(((n,r)=>{const h=he.Rg(t);if(h)return void n(h);const o=i&&1===(0,pi.Vm)([95,5]);(0,e.dZ)({src:re},t.document.head,t,(()=>{const i=he.Rg(t);i?n(i):(o&&(0,s.n)({message:"AdManager_ImaIntegrator_no_image_object_found_after_loading_script",level:s.D.CRITICAL},{throttle:2,sendMaxLog:!1}),r(ne.ImaObjectNotFound))}),(()=>{r(ne.ImaScriptFailure)}),o,"AdManager_ImaIntegrator_unable_to_insert_ima_sdk_script")}))}static Rg(t){return t.google&&t.google.ima}}class oe extends te{constructor(t,i){super(t,i),this.Tm=t,this.settings=i,this.Om=null,this.adMediaType="ima",this.adSourceType=l.ProtoAdsourceTypeEnum.Ima,this.Dg=[],this.Om=this.settings.imaAdSlotContainer,this.jg=new se(this.settings.imaSdk,this.settings.os,this.settings.imaAdsLoader,this.settings.url,this.settings.imaAdsManager,this.settings.requestAdsContext,this.settings.adManagerLineItem.protoLineItem.publisherLineItemId)}initAd(t,i,e,s,n,r,h){try{super.initAd(t,i,e,s,n,r,h),this.settings.adManagerLineItem.protoLineItem.moatTrackingEnabled&&this.Vg(),this.Dg.push(this.jg.onVpaidEvent.subscribe((t=>{this.Um(t)})),this.jg.onCreativeReceived.subscribe((t=>{this.creativeId=t}))),this.jg.initAd(t,i,e,s,n,{slot:this.Mm,videoSlot:this.Em})}catch(t){this.Af.next({type:Vt.fI.AdError,payload:{errorMessage:zi.AdaptorInitAdError+`_${t.message}`}})}}startAd(){try{super.startAd(),this.jg.startAd()}catch(t){this.Af.next({type:Vt.fI.AdError,payload:{errorMessage:zi.AdaptorStartAdError+`_${t.message}`}})}}stopAd(t){try{super.stopAd(t),this.jg.stopAd(t)}catch(t){this.fg("ImaBidAdaptor","stopAd",t)}}resizeAd(t,i,e){try{this.jg.resizeAd(t,i,e)}catch(t){this.fg("ImaBidAdaptor","resizeAd",t)}}pauseAd(){try{this.jg.pauseAd()}catch(t){this.fg("ImaBidAdaptor","pauseAd",t)}}resumeAd(){try{this.jg.resumeAd()}catch(t){this.fg("ImaBidAdaptor","resumeAd",t)}}expandAd(){try{this.jg.expandAd()}catch(t){this.fg("ImaBidAdaptor","expandAd",t)}}collapseAd(){try{this.jg.collapseAd()}catch(t){this.fg("ImaBidAdaptor","collapseAd",t)}}skipAd(){try{super.skipAd(),this.jg.skipAd()}catch(t){this.fg("ImaBidAdaptor","skipAd",t)}}getAdRemainingTime(){try{return this.jg.getAdRemainingTime()}catch(t){return this.fg("ImaBidAdaptor","getAdRemainingTime",t),0}}getAdDuration(){try{return this.jg&&this.jg.getAdDuration()||this.settings.adManagerLineItem.protoLineItem.duration}catch(t){return this.fg("ImaBidAdaptor","getAdDuration",t),0}}getAdVolume(){try{return this.jg.getAdVolume()}catch(t){return this.fg("ImaBidAdaptor","getAdVolume",t),0}}getAdMediaSize(){return{width:this.jg.getAdMediaWidth(),height:this.jg.getAdMediaHeight()}}setAdVolume(t){try{super.setAdVolume(t),this.jg.setAdVolume(t)}catch(t){this.fg("ImaBidAdaptor","setAdVolume",t)}}get adVideoUrl(){return this.jg.getMediaFile()}get declaredDurationInSeconds(){return this.jg.getAdDuration()}rg(t){const i=super.rg(t);return i.payload.adSourceData.imaMetadata=t.payload.imaMetadata,i}ug(){return this.Om}pg(){this.settings.adSlotContainerRecycler.recycleAdSlot(this.Om)}Vg(){he.fetchImaSdk(this.settings.globalDomUtilsService.getGlobalClosestTop().topFrame,!1)}Cu(){try{super.Cu(),(0,jt.i)(this.Dg),this.jg.destroy()}catch(t){this.fg("ImaBidAdaptor","_destroy",t)}}}class ae{constructor(t,i,e,s,n,r,h){this.mg=t,this.gg=i,this.Gu=e,this.Ju=s,this.vg=n,this.Mg=r,this.Fe=h,this.Fg=new It.x,this.$g=new It.x,this.Ug={id:(0,pi.qs)()},this.yg=null,this._g=t=>{if(!this.Sg(t))return;switch(t.getError().getErrorCode()){case this.mg.AdError.ErrorCode.VAST_EMPTY_RESPONSE:this.Hg($i.ImaVastEmptyResponse);break;case this.mg.AdError.ErrorCode.VAST_WRAPPER_ERROR:case this.mg.AdError.ErrorCode.VAST_MALFORMED_RESPONSE:this.Hg($i.ImaInvalidResponse);break;default:this.Hg($i.ImaRequestException)}},this.qg=t=>{this.Sg(t)&&(this.yg=t.getAdsManager(this.Mg,{loadVideoTimeout:25*oi.s_}),this.zg(),this.Fg.next({imaAdsManager:this.yg,requestAdsContext:this.Ug}))},this.gg.addEventListener(this.mg.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.qg),this.gg.addEventListener(this.mg.AdErrorEvent.Type.AD_ERROR,this._g)}get onSuccess(){return this.Fg.asObservable()}get onError(){return this.$g.asObservable()}loadAd(){const t=new this.mg.AdsRequest;t.adTagUrl=this.vg,t.linearAdSlotWidth=t.nonLinearAdSlotWidth=this.Gu,t.linearAdSlotHeight=t.nonLinearAdSlotHeight=this.Ju,t.pageUrl=this.Fe,this.gg.requestAds(t,this.Ug)}Hg(t){this.$g.next(t)}zg(){this.gg.removeEventListener(this.mg.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.qg),this.gg.removeEventListener(this.mg.AdErrorEvent.Type.AD_ERROR,this._g)}Sg(t){const i=t.getUserRequestContext();return!i||i.id===this.Ug.id}destroy(){var t;try{this.zg(),null===(t=this.yg)||void 0===t||t.destroy()}catch(t){}}}var ce;!function(t){t[t.Transient=0]="Transient",t[t.Singleton=1]="Singleton",t[t.ResolutionScoped=2]="ResolutionScoped",t[t.ContainerScoped=3]="ContainerScoped"}(ce||(ce={}));const le=ce;var ue=function(t,i){return ue=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,i){t.__proto__=i}||function(t,i){for(var e in i)i.hasOwnProperty(e)&&(t[e]=i[e])},ue(t,i)};function de(t,i){function e(){this.constructor=t}ue(t,i),t.prototype=null===i?Object.create(i):(e.prototype=i.prototype,new e)}function pe(t){var i="function"==typeof Symbol&&Symbol.iterator,e=i&&t[i],s=0;if(e)return e.call(t);if(t&&"number"==typeof t.length)return{next:function(){return t&&s>=t.length&&(t=void 0),{value:t&&t[s++],done:!t}}};throw new TypeError(i?"Object is not iterable.":"Symbol.iterator is not defined.")}function fe(t,i){var e="function"==typeof Symbol&&t[Symbol.iterator];if(!e)return t;var s,n,r=e.call(t),h=[];try{for(;(void 0===i||i-- >0)&&!(s=r.next()).done;)h.push(s.value)}catch(t){n={error:t}}finally{try{s&&!s.done&&(e=r.return)&&e.call(r)}finally{if(n)throw n.error}}return h}function me(){for(var t=[],i=0;i<arguments.length;i++)t=t.concat(fe(arguments[i]));return t}function ge(t){return!!t.useClass}function ve(t){return!!t.useFactory}var ye=function(){function t(t){this.wrap=t,this.reflectMethods=["get","getPrototypeOf","setPrototypeOf","getOwnPropertyDescriptor","defineProperty","has","set","deleteProperty","apply","construct","ownKeys"]}return t.prototype.createProxy=function(t){var i,e=this,s=!1;return new Proxy({},this.createHandler((function(){return s||(i=t(e.wrap()),s=!0),i})))},t.prototype.createHandler=function(t){var i={};return this.reflectMethods.forEach((function(e){i[e]=function(){for(var i=[],s=0;s<arguments.length;s++)i[s]=arguments[s];i[0]=t();var n=Reflect[e];return n.apply(void 0,me(i))}})),i},t}();function be(t){return"string"==typeof t||"symbol"==typeof t}function xe(t){return"object"==typeof t&&"token"in t&&"transform"in t}function we(t){return!!t.useToken}function _e(t){return null!=t.useValue}const Se=function(){function t(){this.Wg=new Map}return t.prototype.entries=function(){return this.Wg.entries()},t.prototype.getAll=function(t){return this.ensure(t),this.Wg.get(t)},t.prototype.get=function(t){this.ensure(t);var i=this.Wg.get(t);return i[i.length-1]||null},t.prototype.set=function(t,i){this.ensure(t),this.Wg.get(t).push(i)},t.prototype.setAll=function(t,i){this.Wg.set(t,i)},t.prototype.has=function(t){return this.ensure(t),this.Wg.get(t).length>0},t.prototype.clear=function(){this.Wg.clear()},t.prototype.ensure=function(t){this.Wg.has(t)||this.Wg.set(t,[])},t}();const Ae=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return de(i,t),i}(Se);const Pe=function(){this.scopedResolutions=new Map};function Ie(t,i,e){var s,n,r=fe(t.toString().match(/constructor\(([\w, ]+)\)/)||[],2)[1],h=function(t,i){return null===t?"at position #"+i:'"'+t.split(",")[i].trim()+'" at position #'+i}(void 0===r?null:r,i);return s="Cannot inject the dependency "+h+' of "'+t.name+'" constructor. Reason:',void 0===n&&(n="    "),me([s],e.message.split("\n").map((function(t){return n+t}))).join("\n")}var ke=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return de(i,t),i}(Se),Ce=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return de(i,t),i}(Se);const Te=function(){this.preResolution=new ke,this.postResolution=new Ce};var Me=new Map,Ee=function(){function t(t){this.parent=t,this.Jg=new Ae,this.interceptors=new Te}return t.prototype.register=function(t,i,e){var s;if(void 0===e&&(e={lifecycle:le.Transient}),s=function(t){return ge(t)||_e(t)||we(t)||ve(t)}(i)?i:{useClass:i},we(s))for(var n=[t],r=s;null!=r;){var h=r.useToken;if(n.includes(h))throw new Error("Token registration cycle detected! "+me(n,[h]).join(" -> "));n.push(h);var o=this.Jg.get(h);r=o&&we(o.provider)?o.provider:null}if((e.lifecycle===le.Singleton||e.lifecycle==le.ContainerScoped||e.lifecycle==le.ResolutionScoped)&&(_e(s)||ve(s)))throw new Error('Cannot use lifecycle "'+le[e.lifecycle]+'" with ValueProviders or FactoryProviders');return this.Jg.set(t,{provider:s,options:e}),this},t.prototype.registerType=function(t,i){return be(i)?this.register(t,{useToken:i}):this.register(t,{useClass:i})},t.prototype.registerInstance=function(t,i){return this.register(t,{useValue:i})},t.prototype.registerSingleton=function(t,i){if(be(t)){if(be(i))return this.register(t,{useToken:i},{lifecycle:le.Singleton});if(i)return this.register(t,{useClass:i},{lifecycle:le.Singleton});throw new Error('Cannot register a type name as a singleton without a "to" token')}var e=t;return i&&!be(i)&&(e=i),this.register(t,{useClass:e},{lifecycle:le.Singleton})},t.prototype.resolve=function(t,i){void 0===i&&(i=new Pe);var e=this.getRegistration(t);if(!e&&be(t))throw new Error('Attempted to resolve unregistered dependency token: "'+t.toString()+'"');if(this.executePreResolutionInterceptor(t,"Single"),e){var s=this.resolveRegistration(e,i);return this.executePostResolutionInterceptor(t,s,"Single"),s}if(function(t){return"function"==typeof t||t instanceof ye}(t)){s=this.construct(t,i);return this.executePostResolutionInterceptor(t,s,"Single"),s}throw new Error("Attempted to construct an undefined constructor. Could mean a circular dependency problem. Try using `delay` function.")},t.prototype.executePreResolutionInterceptor=function(t,i){var e,s;if(this.interceptors.preResolution.has(t)){var n=[];try{for(var r=pe(this.interceptors.preResolution.getAll(t)),h=r.next();!h.done;h=r.next()){var o=h.value;"Once"!=o.options.frequency&&n.push(o),o.callback(t,i)}}catch(t){e={error:t}}finally{try{h&&!h.done&&(s=r.return)&&s.call(r)}finally{if(e)throw e.error}}this.interceptors.preResolution.setAll(t,n)}},t.prototype.executePostResolutionInterceptor=function(t,i,e){var s,n;if(this.interceptors.postResolution.has(t)){var r=[];try{for(var h=pe(this.interceptors.postResolution.getAll(t)),o=h.next();!o.done;o=h.next()){var a=o.value;"Once"!=a.options.frequency&&r.push(a),a.callback(t,i,e)}}catch(t){s={error:t}}finally{try{o&&!o.done&&(n=h.return)&&n.call(h)}finally{if(s)throw s.error}}this.interceptors.postResolution.setAll(t,r)}},t.prototype.resolveRegistration=function(t,i){if(t.options.lifecycle===le.ResolutionScoped&&i.scopedResolutions.has(t))return i.scopedResolutions.get(t);var e,s=t.options.lifecycle===le.Singleton,n=t.options.lifecycle===le.ContainerScoped,r=s||n;return e=_e(t.provider)?t.provider.useValue:we(t.provider)?r?t.instance||(t.instance=this.resolve(t.provider.useToken,i)):this.resolve(t.provider.useToken,i):ge(t.provider)?r?t.instance||(t.instance=this.construct(t.provider.useClass,i)):this.construct(t.provider.useClass,i):ve(t.provider)?t.provider.useFactory(this):this.construct(t.provider,i),t.options.lifecycle===le.ResolutionScoped&&i.scopedResolutions.set(t,e),e},t.prototype.resolveAll=function(t,i){var e=this;void 0===i&&(i=new Pe);var s=this.getAllRegistrations(t);if(!s&&be(t))throw new Error('Attempted to resolve unregistered dependency token: "'+t.toString()+'"');if(this.executePreResolutionInterceptor(t,"All"),s){var n=s.map((function(t){return e.resolveRegistration(t,i)}));return this.executePostResolutionInterceptor(t,n,"All"),n}var r=[this.construct(t,i)];return this.executePostResolutionInterceptor(t,r,"All"),r},t.prototype.isRegistered=function(t,i){return void 0===i&&(i=!1),this.Jg.has(t)||i&&(this.parent||!1)&&this.parent.isRegistered(t,!0)},t.prototype.reset=function(){this.Jg.clear(),this.interceptors.preResolution.clear(),this.interceptors.postResolution.clear()},t.prototype.clearInstances=function(){var t,i;try{for(var e=pe(this.Jg.entries()),s=e.next();!s.done;s=e.next()){var n=fe(s.value,2),r=n[0],h=n[1];this.Jg.setAll(r,h.filter((function(t){return!_e(t.provider)})).map((function(t){return t.instance=void 0,t})))}}catch(i){t={error:i}}finally{try{s&&!s.done&&(i=e.return)&&i.call(e)}finally{if(t)throw t.error}}},t.prototype.createChildContainer=function(){var i,e,s=new t(this);try{for(var n=pe(this.Jg.entries()),r=n.next();!r.done;r=n.next()){var h=fe(r.value,2),o=h[0],a=h[1];a.some((function(t){return t.options.lifecycle===le.ContainerScoped}))&&s.Jg.setAll(o,a.map((function(t){return t.options.lifecycle===le.ContainerScoped?{provider:t.provider,options:t.options}:t})))}}catch(t){i={error:t}}finally{try{r&&!r.done&&(e=n.return)&&e.call(n)}finally{if(i)throw i.error}}return s},t.prototype.beforeResolution=function(t,i,e){void 0===e&&(e={frequency:"Always"}),this.interceptors.preResolution.set(t,{callback:i,options:e})},t.prototype.afterResolution=function(t,i,e){void 0===e&&(e={frequency:"Always"}),this.interceptors.postResolution.set(t,{callback:i,options:e})},t.prototype.getRegistration=function(t){return this.isRegistered(t)?this.Jg.get(t):this.parent?this.parent.getRegistration(t):null},t.prototype.getAllRegistrations=function(t){return this.isRegistered(t)?this.Jg.getAll(t):this.parent?this.parent.getAllRegistrations(t):null},t.prototype.construct=function(t,i){var e=this;if(t instanceof ye)return t.createProxy((function(t){return e.resolve(t,i)}));var s=Me.get(t);if(!s||0===s.length){if(0===t.length)return new t;throw new Error('TypeInfo not known for "'+t.name+'"')}var n=s.map(this.resolveParams(i,t));return new(t.bind.apply(t,me([void 0],n)))},t.prototype.resolveParams=function(t,i){var e=this;return function(s,n){var r,h,o,a;try{return"object"==typeof(a=s)&&"token"in a&&"multiple"in a?xe(s)?s.multiple?(r=e.resolve(s.transform)).transform.apply(r,me([e.resolveAll(s.token)],s.transformArgs)):(h=e.resolve(s.transform)).transform.apply(h,me([e.resolve(s.token,t)],s.transformArgs)):s.multiple?e.resolveAll(s.token):e.resolve(s.token,t):xe(s)?(o=e.resolve(s.transform,t)).transform.apply(o,me([e.resolve(s.token,t)],s.transformArgs)):e.resolve(s,t)}catch(t){throw new Error(Ie(i,n,t))}}},t}(),Be=new Ee;var Oe="injectionTokens";const Le=function(){return function(t){Me.set(t,function(t){var i=Reflect.getMetadata("design:paramtypes",t)||[],e=Reflect.getOwnMetadata(Oe,t)||{};return Object.keys(e).forEach((function(t){i[+t]=e[t]})),i}(t))}};const Re=function(){return function(t){Le()(t),Be.registerSingleton(t)}};if("undefined"==typeof Reflect||!Reflect.getMetadata)throw new Error("tsyringe requires a reflect polyfill. Please add 'import \"reflect-metadata\"' to the top of your entry point.");class De{constructor(t=Be){this.Qg=t}static getInstance(){return this.Yg||(this.Yg=new De),this.Yg}static getGlobalContainer(){return this.getInstance().globalContainer}get globalContainer(){return this.Qg}}var je=o(655),Ve=o(5720),Fe=function(t){function i(i,e){return t.call(this)||this}return(0,je.ZT)(i,t),i.prototype.schedule=function(t,i){return void 0===i&&(i=0),this},i}(Ve.w0),$e={setInterval:function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var e=$e.delegate;return((null==e?void 0:e.setInterval)||setInterval).apply(void 0,(0,je.ev)([],(0,je.CR)(t)))},clearInterval:function(t){var i=$e.delegate;return((null==i?void 0:i.clearInterval)||clearInterval)(t)},delegate:void 0},Ne=o(3699),Ue=function(t){function i(i,e){var s=t.call(this,i,e)||this;return s.scheduler=i,s.work=e,s.pending=!1,s}return(0,je.ZT)(i,t),i.prototype.schedule=function(t,i){if(void 0===i&&(i=0),this.closed)return this;this.state=t;var e=this.id,s=this.scheduler;return null!=e&&(this.id=this.recycleAsyncId(s,e,i)),this.pending=!0,this.delay=i,this.id=this.id||this.requestAsyncId(s,this.id,i),this},i.prototype.requestAsyncId=function(t,i,e){return void 0===e&&(e=0),$e.setInterval(t.flush.bind(t,this),e)},i.prototype.recycleAsyncId=function(t,i,e){if(void 0===e&&(e=0),null!=e&&this.delay===e&&!1===this.pending)return i;$e.clearInterval(i)},i.prototype.execute=function(t,i){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var e=this.Xg(t,i);if(e)return e;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},i.prototype.Xg=function(t,i){var e,s=!1;try{this.work(t)}catch(t){s=!0,e=t||new Error("Scheduled action threw falsy error")}if(s)return this.unsubscribe(),e},i.prototype.unsubscribe=function(){if(!this.closed){var i=this.id,e=this.scheduler,s=e.actions;this.work=this.state=this.scheduler=null,this.pending=!1,(0,Ne.P)(s,this),null!=i&&(this.id=this.recycleAsyncId(e,i,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},i}(Fe),He={now:function(){return(He.delegate||Date).now()},delegate:void 0},qe=function(){function t(i,e){void 0===e&&(e=t.now),this.schedulerActionCtor=i,this.now=e}return t.prototype.schedule=function(t,i,e){return void 0===i&&(i=0),new this.schedulerActionCtor(this,t).schedule(e,i)},t.now=He.now,t}(),ze=new(function(t){function i(i,e){void 0===e&&(e=qe.now);var s=t.call(this,i,e)||this;return s.actions=[],s.Zg=!1,s.Kg=void 0,s}return(0,je.ZT)(i,t),i.prototype.flush=function(t){var i=this.actions;if(this.Zg)i.push(t);else{var e;this.Zg=!0;do{if(e=t.execute(t.state,t.delay))break}while(t=i.shift());if(this.Zg=!1,e){for(;t=i.shift();)t.unsubscribe();throw e}}},i}(qe))(Ue),We=ze,Ge=o(1480),Je=o(8474);function Qe(t){return t&&(0,Je.m)(t.schedule)}function Ye(t,i,e){void 0===t&&(t=0),void 0===e&&(e=We);var s=-1;return null!=i&&(Qe(i)?e=i:s=i),new Ge.y((function(i){var n,r=(n=t)instanceof Date&&!isNaN(n)?+t-e.now():t;r<0&&(r=0);var h=0;return e.schedule((function(){i.closed||(i.next(h++),0<=s?this.schedule(void 0,s):i.complete())}),r)}))}var Xe,Ze=function(t,i,e,s){var n,r=arguments.length,h=r<3?i:null===s?s=Object.getOwnPropertyDescriptor(i,e):s;if("object"==typeof Reflect&&"function"==typeof Reflect.decorate)h=Reflect.decorate(t,i,e,s);else for(var o=t.length-1;o>=0;o--)(n=t[o])&&(h=(r<3?n(h):r>3?n(i,e,h):n(i,e))||h);return r>3&&h&&Object.defineProperty(i,e,h),h},Ke=function(t,i){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,i)};let ts=Xe=class{constructor(){var t,i;this.tv=new Map,this.iv=0,this.sv=(void 0===(t=Xe.TIME_BETWEEN_TICKS)&&(t=0),void 0===i&&(i=ze),t<0&&(t=0),Ye(t,t,i)),this.sv.subscribe((()=>this.nv()))}setTimeout(t,i=0){return this.rv(t,i,!0)}clearTimeout(t){this.tv.delete(t)}setInterval(t,i=0){return this.rv(t,i,!1)}clearInterval(t){this.tv.delete(t)}hv(t){try{t.callback()}catch(t){(0,s.n)({message:"TimerService_error",callStack:t.stack,exception:t.message,level:s.D.INFO},{throttle:1})}}nv(){const t=(new Date).getTime(),i=[];for(const[e,s]of this.tv)t-s.startTime<s.duration*(s.intervalTimesCalled+1)||(this.hv(s),s.isTimeout?i.push(e):s.intervalTimesCalled++);for(const t of i)this.tv.delete(t)}rv(t,i,e){const s=++this.iv;return this.tv.set(s,{startTime:(new Date).getTime(),isTimeout:e,callback:t,duration:i,intervalTimesCalled:0}),s}};ts.TIME_BETWEEN_TICKS=100,ts=Xe=Ze([Re(),Ke("design:paramtypes",[])],ts);class is{constructor(t){this.settings=t,this.ov=!1,this.av=[],this.metrics={created:(new Date).getTime()}}fetchBid(){this.metrics.fetchStart=(new Date).getTime(),this.lv=this.settings.adSlotContainerRecycler.requestAdSlotIma(this.settings.adContainer);const t=new Promise(((t,i)=>{setTimeout((()=>{i($i.ImaTimeout)}),25e3)})),i=this.uv(this.lv);return Promise.race([i,t]).then((t=>(this.metrics.fetchEnd=(new Date).getTime(),this.ov=!0,this.dv&&(0,jt.i)(this.av),t))).catch((t=>{throw this.metrics.fetchEnd=(new Date).getTime(),this.ov=!0,this.dv&&((0,jt.i)(this.av),this.dv.destroy(),this.settings.adSlotContainerRecycler.recycleAdSlot(this.lv)),t}))}uv(t){return t.fetchImaDependencies().then((t=>(this.fv=t,this.mv(t)))).then((t=>this.gv(t))).catch((t=>{throw(0,dt.$K)(t)?t:$i.ImaRequestException}))}mv(t){return this.ov?Promise.reject():new Promise(((i,e)=>{const s=this.vv();this.dv=new ae(t.imaSdk,t.imaAdsLoader,s.width,s.height,this.settings.url,this.lv.videoSlot,this.settings.pageUrl),this.av.push(this.dv.onSuccess.subscribe((t=>{i(t)})),this.dv.onError.subscribe((t=>{e(t)}))),this.dv.loadAd()}))}vv(){return this.settings.callingState.adContainerState.get(this.settings.adManagerLineItem.protoLineItem.adType)}gv(t){const i=De.getGlobalContainer().resolve(ts);return new oe(i,{id:this.settings.id,adManagerLineItem:this.settings.adManagerLineItem,trackers:this.settings.trackersInformation,url:this.settings.url,requestMetadata:this.settings.requestMetadata,callingState:this.settings.callingState,adContainer:this.settings.adContainer,globalDomUtilsService:this.settings.globalDomUtilsService,viewabilityService:this.settings.viewabilityService,cpm:this.settings.cpm,obfuscatedPrice:this.settings.obfuscatedPrice,adEnforcer:this.settings.adEnforcer,successRate:this.settings.successRate,os:this.settings.os,adSlotContainerRecycler:this.settings.adSlotContainerRecycler,externalCreativeId:this.settings.creativeId,imaSdk:this.fv.imaSdk,imaAdsLoader:this.fv.imaAdsLoader,imaAdsManager:t.imaAdsManager,requestAdsContext:t.requestAdsContext,imaAdSlotContainer:this.lv,bidSlotId:this.settings.bidSlotId,pageUrl:this.settings.pageUrl,urlSuffixerService:this.settings.urlSuffixerService})}}var es,ss,ns,rs;!function(t){t[t.Javascript=0]="Javascript",t[t.Video=1]="Video"}(es||(es={})),function(t){function i(t){return/^\s*$/.test(t)?null:/^(?:true|false)$/i.test(t)?"true"===t.toLowerCase():isFinite(t)?parseFloat(t):isFinite(Date.parse(t))?new Date(t):"string"==typeof t?t.trim():t}t.JXONTree=function t(e){let s=0,n="";if(this.keyAttributes||(this.keyAttributes={}),e.hasChildNodes()){for(let i,s,r,h=0;h<e.childNodes.length;h++)i=e.childNodes.item(h),(i.nodeType-1|1)===Node.TEXT_NODE?n+=i.nodeType===Node.TEXT_NODE?i.nodeValue.trim():i.nodeValue:1!==i.nodeType||i.prefix||(s=i.nodeName.toLowerCase(),r=new t(i),this.hasOwnProperty(s)?(this[s].constructor!==Array&&(this[s]=[this[s]]),this[s].push(r)):this[s]=r);this.keyValue=n?i(n):null}if(void 0===e.hasAttributes?e.attributes.length>0:e.hasAttributes()){let t;for(;s<e.attributes.length;s++)t=e.attributes.item(s),this.keyAttributes[t.name.toLowerCase()]=i(t.value.trim())}},t.getKeyValue=function(t){if(t&&t.keyValue)return t.keyValue},t.decodeXMLText=function(t){if("string"==typeof t)return t.replace(/&apos;/g,"'").replace(/&quot;/g,'"').replace(/&gt;/g,">").replace(/&lt;/g,"<").replace(/&amp;/g,"&")}}(ss||(ss={}));class hs{constructor(t){this.yv=["text/javascript","text/javascript1.0","text/javascript1.2","text/javascript1.4","text/jscript","application/javascript","application/x-javascript","text/ecmascript","text/ecmascript1.0","text/ecmascript1.2","text/ecmascript1.4","text/livescript","application/ecmascript","application/x-ecmascript"],this.bv="VPAID",this.delivery=void 0,this.type=void 0,this.width=0,this.height=0,this.codec=void 0,this.id=void 0,this.bitrate=void 0,this.minBitrate=void 0,this.maxBitrate=void 0,this.scalable=void 0,this.maintainAspectRatio=void 0,this.apiFramework=void 0,this.src=void 0,this.delivery=t.keyAttributes.delivery,this.type=t.keyAttributes.type,this.width=t.keyAttributes.width,this.height=t.keyAttributes.height,this.codec=t.keyAttributes.codec,this.id=t.keyAttributes.id,this.bitrate=t.keyAttributes.bitrate,this.minBitrate=t.keyAttributes.minbitrate,this.maxBitrate=t.keyAttributes.maxbitrate,this.scalable=t.keyAttributes.scalable,this.maintainAspectRatio=t.keyAttributes.maintainaspectratio,this.apiFramework=t.keyAttributes.apiframework,this.src=ss.getKeyValue(t)}isSupported(){return!("application/x-shockwave-flash"===this.type||"video/x-flv"===this.type)}getMediaFileType(){return this.apiFramework===this.bv||(0,f.d3)(this.type,this.yv)?es.Javascript:es.Video}}class os{constructor(t){this.clickThrough=void 0,this.clickTrackings=[],this.customClicks=[],this.clickThrough=ss.getKeyValue(t.clickthrough),this.clickTrackings=this.xv((0,f.qo)(t.clicktracking)),this.customClicks=this.xv((0,f.qo)(t.customclick))}xv(t){const i=[];return void 0!==t[0]&&t.forEach((t=>{i.push(ss.getKeyValue(t))})),i}}class as{constructor(t){this.duration=void 0,this.mediaFiles=[],this.trackingEvents=[],this.skipoffset=void 0,this.videoClicks=void 0,this.duration=(0,ut.pP)(ss.getKeyValue(t.duration)),this.skipoffset=(0,ut.QI)(t.keyAttributes.skipoffset,this.duration),t.mediafiles&&(this.mediaFiles=this.wv((0,f.qo)(t.mediafiles.mediafile))),t.trackingevents&&(this.trackingEvents=ns.parseTrackingEvents((0,f.qo)(t.trackingevents.tracking),this.duration)),t.videoclicks&&(this.videoClicks=new os(t.videoclicks)),t.adparameters&&(this.adParameters=ss.getKeyValue(t.adparameters),t.adparameters["@xmlEncoded"]&&(this.adParameters=ss.decodeXMLText(this.adParameters)))}wv(t){const i=[];return void 0!==t[0]&&t.forEach((t=>{const e=new hs(t);e.isSupported()&&i.push(e)})),i}isSupported(){return!0}}class cs{constructor(t){var i;this.minSuggestedDuration=void 0,this.staticResource={},this.htmlResource={},this.iframeResource={},this.nonLinearClickTracking={},this.id=t.keyAttributes.id,this.width=t.keyAttributes.width,this.height=t.keyAttributes.height,this.expandedWidth=t.keyAttributes.expandedheight,this.expandedHeight=t.keyAttributes.expandedwidth,this.scalable=t.keyAttributes.scalable,this.maintainAspectRatio=t.keyAttributes.maintainaspectratio,this.apiFramework=t.keyAttributes.apiframework,this.minSuggestedDuration=(0,ut.pP)(t.keyAttributes.minsuggestedduration),this.nonLinearClickThrough=null===(i=t.nonlinearclickthrough)||void 0===i?void 0:i.keyValue,t.nonlinearclicktracking&&(this.nonLinearClickTracking.id=t.nonlinearclicktracking.keyAttributes.id,this.nonLinearClickTracking.uri=t.nonlinearclicktracking.keyValue),t.staticresource&&(this.staticResource.creativeType=t.staticresource.keyAttributes.creativetype,this.staticResource.uri=t.staticresource.keyValue),t.iframeresource&&(this.iframeResource.uri=t.iframeresource.keyValue),t.htmlresource&&(this.htmlResource.uri=t.htmlresource.keyValue)}isSupported(){return"VPAID"===this.apiFramework?((0,s.n)({message:"AdManager_NonLinearAd_VPAID_found",level:s.D.INFO}),!1):this.width&&this.height?!(!this.staticResource.creativeType||!this.staticResource.uri)||(this.htmlResource.uri&&(0,s.n)({message:"AdManager_NonLinearAd_htmlResource_found",level:s.D.INFO}),this.iframeResource.uri&&(0,s.n)({message:"AdManager_NonLinearAd_iframeResource_found",level:s.D.INFO}),!1):((0,s.n)({message:"AdManager_NonLinearAd_no_dimensions",level:s.D.INFO}),!1)}}class ls{constructor(t){this.nonLinearAdList=[],this.trackingEvents=[],t.nonlinear&&(this.nonLinearAdList=this._v((0,f.qo)(t.nonlinear))),t.trackingevents&&(this.trackingEvents=ns.parseTrackingEvents((0,f.qo)(t.trackingevents.tracking))),t.adparameters&&(this.adParameters=ss.getKeyValue(t.adparameters),t.adparameters["@xmlEncoded"]&&(this.adParameters=ss.decodeXMLText(this.adParameters)))}isSupported(){return!0}_v(t){const i=[];return t.forEach((t=>{const e=new cs(t);e.isSupported()&&i.push(e)})),i}}class us{constructor(t){if(this.id=void 0,this.sequence=void 0,this.adId=void 0,this.linear=void 0,this.nonLinear=void 0,this.id=t.keyAttributes.id,this.sequence=t.keyAttributes.sequence,this.adId=t.keyAttributes.adid,t.linear)try{this.linear=new as(t.linear)}catch(t){(0,s.n)({callStack:t.stack,level:s.D.WARN,exception:t.message,message:"Creative_Linear"})}if(t.nonlinearads)try{this.nonLinear=new ls(t.nonlinearads)}catch(t){(0,s.n)({callStack:t.stack,level:s.D.WARN,exception:t.message,message:"Creative_NonLinear"})}}isSupported(){return!0}}class ds{constructor(t,i){this.name=t.keyAttributes.event,this.uri=ss.getKeyValue(t),"progress"===this.name&&(this.offset=(0,ut.QI)(t.keyAttributes.offset,i))}}!function(t){function i(t){const i=[];return void 0!==t[0]&&t.forEach((t=>{i.push(ss.getKeyValue(t))})),i}t.parseImpressions=function(t){return i(t)},t.parseCretives=function(t){const i=[];return t.forEach((t=>{i.push(new us(t))})),i},t.parseErrors=function(t){return i(t)},t.parseTrackingEvents=function(t,i){const e=[];return void 0!==t[0]&&t.forEach((t=>{e.push(new ds(t,i))})),e}}(ns||(ns={}));class ps{constructor(t){var i;this.description=void 0,this.advertiser=void 0,this.surveys=void 0,this.errors=void 0,this.pricing=void 0,this.extensions=void 0,this.adTitle=ss.getKeyValue(t.adtitle),this.adSystem=ss.getKeyValue(t.adsystem),this.impressions=ns.parseImpressions((0,f.qo)(t.impression)),this.creatives=(null===(i=t.creatives)||void 0===i?void 0:i.creative)?ns.parseCretives((0,f.qo)(t.creatives.creative)):[],this.description=ss.getKeyValue(t.description),this.advertiser=ss.getKeyValue(t.advertiser),this.surveys=ss.getKeyValue(t.survey),this.errors=ns.parseErrors((0,f.qo)(t.error)),this.pricing=ss.getKeyValue(t.pricing),this.extensions=ss.getKeyValue(t.extensions)}isSupported(){return!0}}class fs{constructor(t){var i;this.adSystem=void 0,this.impressions=[],this.VASTAdTagURI=void 0,this.creatives=[],this.errors=void 0,this.extensions=void 0,this.fallowAdditionalWrappers=void 0,this.allowMultipleAds=void 0,this.fallbackOnNoAd=void 0,this.adSystem=ss.getKeyValue(t.adsystem),this.impressions=ns.parseImpressions((0,f.qo)(t.impression)),this.VASTAdTagURI=ss.getKeyValue(t.vastadtaguri),this.creatives=(null===(i=t.creatives)||void 0===i?void 0:i.creative)?ns.parseCretives((0,f.qo)(t.creatives.creative)):[],this.errors=ns.parseErrors((0,f.qo)(t.error)),this.extensions=t.extensions,this.fallowAdditionalWrappers=!t.keyAttributes.followadditionalwrappers||t.keyAttributes.followadditionalwrappers,this.allowMultipleAds=t.keyAttributes.allowmultipleads,this.fallbackOnNoAd=t.keyAttributes.fallbackonnoad}}class ms{constructor(t){Array.isArray(t)?this.Sv(t):this.Pv(t)}isSupported(){return!0}Pv(t){this.id=t.keyAttributes.id,this.sequence=t.keyAttributes.sequence,t.inline?this.inLine=new ps(t.inline):t.wrapper&&(this.wrapper=new fs(t.wrapper))}Sv(t){const i=t.filter((t=>{const i=this.Iv(t).filter((t=>t.linear));return!!(0,f.BZ)(i)}));(0,f.BZ)(i)&&this.Pv(i[0])}Iv(t){return t.inline?(0,f.qo)(t.inline.creatives.creative):t.wrapper?(0,f.qo)(t.wrapper.creatives.creative):[]}}class gs{constructor(t=2){this.kv=t}parseVastXml(t){try{if(!this.Cv(t))return{error:!0,errorReason:$i.XmlInvalidString};if(this.Tv(t))return{error:!0,errorReason:$i.XmlInvalidAd};const i=(new DOMParser).parseFromString(t,"application/xml"),e=new ss.JXONTree(i.documentElement);if(!this.Mv(e,this.kv))return{error:!0,errorReason:$i.XmlInvalidTree};const s=new ms(e.ad);return this.Ev(s)?{error:!1,result:s}:{error:!0,errorReason:$i.XmlInvalidAd}}catch(t){return{error:!0,errorReason:$i.XmlParseGeneral}}}Cv(t){return(0,dt.QM)(t)}Tv(t){return ie.KEYWORDS_FOR_BANNED_VAST.some((i=>t.includes(i)))}Mv(t,i){if(!t.ad)return!1;const e=parseInt(t.keyAttributes.version,10);return!(e&&e<i)}Ev(t){const i=t.wrapper,e=t.inLine;if(!e&&!i)return!1;if(i&&!i.VASTAdTagURI)return!1;if(!i){const t=[...e.creatives].filter((t=>{var i;return null===(i=null==t?void 0:t.linear)||void 0===i?void 0:i.mediaFiles.length})),i=[...e.creatives].filter((t=>{var i;return null===(i=null==t?void 0:t.nonLinear)||void 0===i?void 0:i.nonLinearAdList.length}));if(!(0,f.BZ)(t)&&!(0,f.BZ)(i))return!1}return!0}}class vs{constructor(t){this.mediaFiles=[],this.nonLinearFiles=[],this.adTitle=void 0,this.adParameters=void 0,this.linearClickThrough=void 0,this.creativeId=void 0,t.forEach((t=>{t.inLine?(this.adTitle=t.inLine.adTitle,this.fm(t.inLine.creatives)):t.wrapper&&this.fm(t.wrapper.creatives)}))}gm(t){this.duration=t.duration,this.Bv(t.mediaFiles),this.Ov(t.skipoffset),this.Rv(t.adParameters),t.videoClicks&&t.videoClicks.clickThrough&&this.Dv(t.videoClicks.clickThrough)}jv(t){this.Vv(t.nonLinearAdList),this.Rv(t.adParameters)}Vv(t){this.nonLinearFiles=[...this.nonLinearFiles,...t]}Rv(t){this.adParameters=t}Ov(t){this.skipoffset=t}Bv(t){this.mediaFiles=[...this.mediaFiles,...t]}Dv(t){this.linearClickThrough=t}fm(t){t.forEach((t=>{this.creativeId=t.id,t.linear&&this.gm(t.linear),t.nonLinear&&this.jv(t.nonLinear)}))}}!function(t){t[t.FirstQuartile=0]="FirstQuartile",t[t.SecondQuartile=1]="SecondQuartile",t[t.ThirdQuartile=2]="ThirdQuartile",t[t.FourthQuartile=3]="FourthQuartile"}(rs||(rs={}));var ys,bs,xs,ws;!function(t){t.absolute="absolute",t.relative="relative"}(ys||(ys={})),function(t){t.auto="auto",t.all="all"}(bs||(bs={})),function(t){t.errorIframe="Error creating iframe"}(xs||(xs={}));class _s{constructor(t,i,e){this.yr=t,this.ha=i,this.Ks=e}Fv(t,i,e){let s=!1;return n=>{n.contentWindow&&!s&&(s=!0,this.$v(n,this.Nv(t,i),e))}}Uv(t,i,e,s,n,r,h,o,a,c=!0){return this.Hv(t,this.Fv(i,e,s),n,r,h,o,a,c)}Hv(t,i,e=ys.absolute,s=bs.auto,n,r,h,o=!0){const a=this.yr.createElement("iframe",r);let c="100%",l="100%";return(null==h?void 0:h.scalable)?(c=h.scalable.maxHeightPercent+"%",l=h.scalable.maxWidthPercent+"%"):(null==h?void 0:h.width)&&(null==h?void 0:h.height)&&(c=h.height+"px",l=h.width+"px"),a.allow="autoplay",a.src="javascript:false",a.srcdoc="",a.width=l,a.height=c,a.style.position=e,a.style.left="0",a.style.top="0",a.style.margin="0px",a.style.padding="0px",a.style.border="0px",a.style.width=l,a.style.height=c,a.style.pointerEvents=s,o||(a.style.display="none"),a.setAttribute("SCROLLING","NO"),null==n||n.forEach((t=>{a.setAttribute(t.key,t.value)})),a.onload=()=>{i(a)},t.appendChild(a),i(a),a}$v(t,i,s){const n=(0,e.LT)(t);(class{static executeAsync(t,i){this.qv(t)(i)}static zv(t){return!!t.cnxProxyTask}static qv(t){return this.zv(t)||this.Wv(t),t.cnxProxyTask}static Wv(t){const i=t.document.head;(0,e.ML)(i,t,"\n    window.cnxProxyTask = function(task) {\n        setTimeout(function(){\n            task();\n        }, 0);\n    }\n")}}).executeAsync(n,(()=>{try{const e=t.contentWindow&&t.contentWindow.document;e.open(),e.write(i)}catch(i){this.Gv(t,i),t=null}s(t)}))}Nv(t,i){return Object.keys(i).forEach((function(e){const s="object"==typeof i[e]?JSON.stringify(i[e]):i[e];t=t.replace(new RegExp(`{{${e}}}`,"g"),s)})),t}loadIframe(t){const i='<!DOCTYPE html><html lang="en"><head>'+(t.customHead?t.customHead:"")+'<meta charset="UTF-8"></head><body style="margin:0;padding:0">'+(t.customHtml?t.customHtml:"")+'<script type="text/javascript">window.postMessage(\'{"event": "ready", "id": "{{iframeID}}"}\', \'*\');<\/script></body></html>',e="cnx-iframe_"+(0,pi.qs)();return new Promise(((n,r)=>{const h=i=>{if(null===i)return void r(xs.errorIframe);const s=t=>{let h;try{h=JSON.parse(t.data)}catch(t){return}h.id===e&&(i.contentWindow?(i.contentWindow.document.close(),i.contentWindow.removeEventListener("message",s),n({iframe:i})):r("The Iframe is no longer in the DOM"))};try{if(i.contentWindow.addEventListener("message",s),!t.customReportingLog||!this.ha)return;const{advertiserLineItemId:e,heavyAdBlockTypeEnum:n}=t.customReportingLog;this.Jv=new g(this.Qv.contentWindow,this.ha,{advertiserLineItemId:e,heavyAdBlockTypeEnum:n})}catch(t){this.Gv(i,t),r("Iframe callback error")}};try{this.Qv=this.Uv(t.container,i,{iframeID:e},h,t.iframePosition,t.iframePointerEvents,t.customIframeAttributes,this.Ks,t.iframeCustomDimensions,t.visible)}catch(t){(0,s.n)({message:"IframeLoader_error_creating_iframe",level:s.D.WARN,exception:t.message,callStack:t.stack})}}))}get iframe(){return this.Qv}destroy(){var t;null===(t=this.Jv)||void 0===t||t.destroy(),this.Qv=null}Gv(t,i){this.yr.isDetachedFromDOM(t)?(0,s.n)({message:"iframeLoader_(inDom_false)",exception:i.message,callStack:i.stack,level:s.D.WARN},{sendMaxLog:!1,throttle:1}):(0,s.n)({message:"iframeLoader_(inDom_true)",exception:i.message,callStack:i.stack,level:s.D.WARN},{sendMaxLog:!1,throttle:1}),(0,e.bX)(t)}}!function(t){t.Html="text/html",t.Javascript="application/javascript"}(ws||(ws={}));const Ss=`\n            <div id=cnx-htmlBidAdaptor-id class=cnx-ad-close-non-linear-button>\n                ${o(5522)}\n            </div>`.trim();class As{constructor(t,i,e,s,n,r,h,o){this.Yv=t,this.Xv=i,this.Zv=e,this.Mm=s,this.yr=n,this.ha=r,this.Kv=h,this.ty=o,this.iy="div-cnx-display",this.ey=new It.x,this.sy=new It.x,this.$g=new It.x,this.ny=new It.x,this.hy=t=>{this.sy.next()},this.oy=t=>{this.ny.next()}}get onDisplayAd(){return this.ey.asObservable()}get onError(){return this.$g.asObservable()}get onClickClose(){return this.sy.asObservable()}get onClickAd(){return this.ny.asObservable()}createBanner(t){this.ly=new _s(this.yr,this.ha),this.uy=t?this.py(this.Mm,t):this.Mm;let i="";this.Zv===ws.Html&&(i=this.Xv);let s="",n="";switch(this.Yv){case l.ProtoAdType.Overlay:s=`#${this.iy}{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}`,n=`#${this.iy}{border:3px solid white}`;break;case l.ProtoAdType.Nonlinear:s=`#${this.iy}{width: 100%; height: 100%}`}const r="<style>html, body {position:relative;width:100%;height:100%}"+s+n+"#"+this.iy+" iframe{display:block}</style>";this.ly.loadIframe({customHead:r,customHtml:'<div id="'+this.iy+'">'+i+"</div>",container:this.uy,customReportingLog:{heavyAdBlockTypeEnum:l.ProtoHeavyAdBlockTypeEnum.OverlayIframe,advertiserLineItemId:this.Kv},iframePosition:this.Yv===l.ProtoAdType.Nonlinear?ys.relative:ys.absolute,iframeCustomDimensions:this.ty?this.ty:void 0,iframePointerEvents:bs.all}).then((t=>{this.my=t.iframe;const i=this.my.contentWindow;if(this.gy=i.document.getElementById(this.iy),this.Zv===ws.Javascript&&(0,e.ML)(this.gy,i,this.Xv),""===this.my.contentWindow.document.head.innerHTML){const t=r;this.vy(t)}(0,e.AX)(this.my.contentWindow,"AdHtmlWrapper"),this.Yv===l.ProtoAdType.Nonlinear&&this.yy(),this.ey.next()})).catch((t=>{this.$g.next()}))}getAdMediaDimensions(){return{width:this.gy.clientWidth||this.my.contentWindow.document.body.clientWidth,height:this.gy.clientHeight||this.my.contentWindow.document.body.clientHeight}}destroy(){var t;null===(t=this.gy)||void 0===t||t.removeEventListener("click",this.oy),this.by&&(this.by.removeEventListener("click",this.hy),this.uy.removeChild(this.by)),this.my&&this.Mm&&(0,e.bX)(this.my),this.ly&&(this.ly.destroy(),this.ly=null)}yy(){var t;this.by=this.yr.createElementByString(Ss),this.uy.appendChild(this.by),this.by.addEventListener("click",this.hy),null===(t=this.gy)||void 0===t||t.addEventListener("click",this.oy)}vy(t){const i=this.my.contentWindow.document.createElement("style"),e=this.my.contentWindow.document.createTextNode(t);i.appendChild(e),this.my.contentWindow.document.head.appendChild(i)}py(t,i){if(!i.width||!i.height)return t;let e,s;if(this.Yv===l.ProtoAdType.Nonlinear)e=s="100%";else e=i.width+"px",s=i.height+"px";const n=this.yr.createElementByString(`<div class="cnx-iframe-container" style="width: ${e}; height: ${s}"></div>`);return t.appendChild(n),n}}class Ps extends d._{constructor(t,i,e,s){super(),this.imageUrl=t,this.xc=i,this.ha=e,this.Kv=s,this.ey=new It.x,this.$g=new It.x,this.ny=new It.x,this.sy=new It.x,this.wf=[]}get onDisplayAd(){return this.ey.asObservable()}get onError(){return this.$g.asObservable()}get onClickAd(){return this.ny.asObservable()}get onClickClose(){return this.sy.asObservable()}destroy(){var t;null===(t=this.xy)||void 0===t||t.destroy()}initializeAd(t,i,e,s){this.wy=t,this._y(s,i,e)}getAdMediaDimensions(){var t;return null===(t=this.xy)||void 0===t?void 0:t.getAdMediaDimensions()}_y(t,i,e){this.Sy=this.xc.createElement("img"),this.Sy.onload=()=>{this.Ay(t,i,e)},this.Sy.onerror=()=>{this.$g.next(zi.VastNonLinearImageLoadFailure)},this.Sy.src=this.imageUrl}Ay(t,i,e){const s=this.Py(t,i,e);this.Iy(s,t,i)}Py(t,i,e){let s;return s=t?this.ky(i,e):`height:${i.height}px; width: ${i.width}px;`,`<img src="${this.imageUrl}" style="${s} display: block; pointer-events: all; cursor: pointer">`}Iy(t,i,e){this.xy=new As(l.ProtoAdType.Nonlinear,t,ws.Html,this.wy,this.xc,this.ha,this.Kv,{height:e.height,width:e.width,scalable:i?{maxHeightPercent:hi.NON_LINEAR_MAX_HEIGHT_PERCENT,maxWidthPercent:hi.NON_LINEAR_MAX_WIDTH_PERCENT}:null}),this.wf.push(this.xy.onDisplayAd.subscribe((()=>{this.ey.next()})),this.xy.onClickClose.subscribe((()=>{this.sy.next()})),this.xy.onClickAd.subscribe((()=>{this.ny.next()})),this.xy.onError.subscribe((()=>{this.$g.next(zi.DisplayIntegratorIframeLoad)}))),this.xy.createBanner(e)}ky(t,i){const e=(0,di.Tc)(i.height,hi.NON_LINEAR_MAX_HEIGHT_PERCENT),s=(0,di.Tc)(i.width,hi.NON_LINEAR_MAX_WIDTH_PERCENT),n=t.height/e;return t.width/s>n?"width: 100%;":"height: 100%;"}}class Is{constructor(t,i=0,e=1e3){this.Tm=t,this.timerDuration=i,this.Cy=e,this.Ty=0,this.My=null,this.Ey=!1,this.By=!1,this.Oy=new It.x,this.Ly=new It.x,this.Ry=new It.x,this.Dy=[{event:rs.FirstQuartile,quartile:1},{event:rs.SecondQuartile,quartile:2},{event:rs.ThirdQuartile,quartile:3},{event:rs.FourthQuartile,quartile:4}],this.jy=null,this.Vy=()=>{this.Fy(),this.Oy.next(),this.$y(this.Ty,this.timerDuration),this.Ny(),this.Uy=(new Date).getTime()},i||this.disable()}start(){this.By=!0,null===this.My&&this.Hy()}stop(){this.By=!1,null!==this.My&&(this.Fy(),this.zy())}reset(t){t&&(this.timerDuration=t),this.Ty=0,this.Ey=!1,this.jy=null,(null!==this.My||this.By)&&(this.zy(),this.Hy())}get timeElapsed(){return this.Ty}get timeRemaining(){return this.timerDuration-this.Ty}disable(){this.Ey=!0,this.zy()}get onTimeUpdate(){return this.Oy.asObservable()}get onTimeElapsed(){return this.Ly.asObservable()}get onQuartile(){return this.Ry.asObservable()}Fy(){this.Ty+=(new Date).getTime()-this.Uy}Hy(){this.Ey||(this.Ny(),this.Uy=(new Date).getTime(),this.My=this.Tm.setInterval(this.Vy,this.Cy))}zy(){this.Tm.clearInterval(this.My),this.My=null}Wy(){this.disable(),this.Ly.next(),this.Ty=0}Ny(){this.Ty/oi.s_>=this.timerDuration/oi.s_&&this.Wy()}$y(t,i){const e=Math.floor((0,di.dQ)(0,i,1,4,t));this.jy<=e&&this.Dy.forEach((({event:t,quartile:i})=>{i===e&&i!==this.jy&&(this.Ry.next(t),this.jy=i)}))}}const ks={[rs.FirstQuartile]:Vt.fI.AdVideoFirstQuartile,[rs.SecondQuartile]:Vt.fI.AdVideoMidpoint,[rs.ThirdQuartile]:Vt.fI.AdVideoThirdQuartile,[rs.FourthQuartile]:Vt.fI.AdVideoComplete};class Cs extends te{constructor(t,i){super(t,i),this.Tm=t,this.settings=i,this.adMediaType="nonLinearVast",this.adSourceType=l.ProtoAdsourceTypeEnum.VastMedia,this.Gy=[],this.Cy=500,this.Jy=0,this.nonLinearOnClick=()=>{this.Qy.nonLinearClickTracking.uri&&this.settings.globalDomUtilsService.trackWithImages([this.Qy.nonLinearClickTracking.uri]),this.Qy.nonLinearClickThrough&&this.settings.globalDomUtilsService.open(this.Qy.nonLinearClickThrough,Pt.bS.Blank),this.Um({type:Vt.fI.AdClickThru,payload:{}})}}initAd(t,i,e,s,n,r,h){try{if(super.initAd(t,i,e,s,n,r,h),this.Qy=this.Yy(),!this.Qy)return void this.Um({type:Vt.fI.AdError,payload:{errorMessage:zi.NonLinearUnsupportedMedia}});this.Xy(),this.Zy(),this.Um({type:Vt.fI.AdLoaded,payload:{}})}catch(t){this.Um({type:Vt.fI.AdError,payload:{errorMessage:zi.AdaptorInitAdError+`_${t.message}`}})}}startAd(){super.startAd(),this.Ky.start(),this.Gy.push(this.tb.onDisplayAd.subscribe((()=>{this.Um({type:Vt.fI.AdStarted}),this.Um({type:Vt.fI.AdVideoStart}),this.Um({type:Vt.fI.AdImpression,payload:{}})})),this.tb.onError.subscribe((t=>{this.Um({type:Vt.fI.AdError,payload:{errorMessage:t}})})),this.tb.onClickAd.subscribe((()=>this.nonLinearOnClick())),this.tb.onClickClose.subscribe((()=>{this.Um({type:Vt.fI.AdUserClose,payload:{}}),this.stopAd(Vt.r5)})));const t={height:this.Qy.height,width:this.Qy.width},i={height:this.Em.clientHeight,width:this.Em.clientWidth};this.tb.initializeAd(this.Mm,t,i,this.Qy.scalable)}get adVideoUrl(){return this.ib}get declaredDurationInSeconds(){return this.Jy/oi.s_}getAdMediaSize(){var t;return null===(t=this.tb)||void 0===t?void 0:t.getAdMediaDimensions()}resizeAd(t,i,e){}pauseAd(){this.Ky.stop()}resumeAd(){this.Ky.start()}expandAd(){}collapseAd(){}getAdRemainingTime(){return this.Ky.timeRemaining}getAdDuration(){return this.Jy/oi.s_}getAdVolume(){return 0}Xy(){this.Qy.staticResource&&(this.tb=new Ps(this.Qy.staticResource.uri,this.settings.globalDomUtilsService,this.settings.trackingService,this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId),this.ib=this.Qy.staticResource.creativeType,this.eb())}eb(){this.Em.style.visibility="hidden"}Zy(){var t;this.Jy=(null===(t=this.settings.adManagerLineItem.protoLineItem.nonlinearLineItemSettings)||void 0===t?void 0:t.nonLinearAdTimeSeconds)*oi.s_,this.Ky=new Is(this.Tm,this.Jy,this.Cy),this.Gy.push(this.Ky.onTimeUpdate.subscribe((()=>{this.Um({type:Vt.fI.AdRemainingTimeChange})})),this.Ky.onTimeElapsed.subscribe((()=>{this.stopAd("nonLinearTimerElapsed")})),this.Ky.onQuartile.subscribe((t=>{this.Um({type:ks[t],payload:{}})})))}Cu(){var t,i;try{super.Cu(),null===(t=this.Ky)||void 0===t||t.stop(),(0,jt.i)(this.Gy),null===(i=this.tb)||void 0===i||i.destroy()}catch(t){this.fg("NonLinearBidAdaptor","_destroy",t)}}Yy(){let t;if(t=this.settings.vastResponse.nonLinearFiles.find((t=>!0===t.scalable)),!t){const i=(0,di.Tc)(this.Em.clientHeight,hi.NON_LINEAR_MAX_HEIGHT_PERCENT);t=this.settings.vastResponse.nonLinearFiles.find((t=>t.height<=i&&t.width<=this.Em.clientWidth))}return t}}function Ts(t,i){t.sort(((t,i)=>t.width===i.width?t.bitrate-i.bitrate:t.width-i.width));for(let e=0;e<t.length;e++)if(t[e].width>=i)return t[e-1]||t[e];return t[t.length-1]}const Ms=()=>`cnx_bid_slot_${(0,pi.qs)()}`,Es={enableWorker:!1,capLevelToPlayerSize:!0,cnxRenderWindow:window,maxBufferSize:5e6,maxBufferLength:5,maxMaxBufferLength:10,liveBackBufferLength:0};class Bs{constructor(t,i,e,s,n){this.sb=t,this.nb=i,this.rb=e,this.xc=s,this.hb=n,this.ob=[],this.ab=(t,i)=>{if(i.fatal)switch(i.type){case this.sb.ErrorTypes.NETWORK_ERROR:if(i.details===this.sb.ErrorDetails.MANIFEST_PARSING_ERROR||i.details===this.sb.ErrorDetails.MANIFEST_LOAD_ERROR)return void this.cb();this.lb.startLoad();break;case this.sb.ErrorTypes.MEDIA_ERROR:this.lb.recoverMediaError();break;default:this.cb()}},this.ub=()=>{this.lb.off(this.sb.Events.MEDIA_ATTACHED,this.ub),this.lb.loadSource(this.nb),this.lb.once(this.sb.Events.MANIFEST_PARSED,this.pb)},this.pb=()=>{this.lb.off(this.sb.Events.MANIFEST_PARSED,this.pb),this.fb(),this.hb.forceMaxLevel&&this.mb(),this.hb.forceResolutionHeight&&this.gb(this.hb.forceResolutionHeight),this.vb()},(this.hb.forceMaxLevel||this.hb.forceResolutionHeight)&&(Es.capLevelToPlayerSize=!1)}start(t,i){this.vb=t,this.cb=i,this.sb&&this.sb.isSupported()?(this.lb=new this.sb(Object.assign(Object.assign({},Es),{cnxRenderWindow:this.xc.global})),this.yb()):this.cb()}destroy(){this.lb&&(this.lb.destroy(),this.lb=null)}yb(){this.lb.on(this.sb.Events.ERROR,this.ab),this.lb.attachMedia(this.rb),this.lb.once(this.sb.Events.MEDIA_ATTACHED,this.ub)}mb(){const t=this.lb.levels.length-1;this.bb(t)}gb(t){const i=this.ob.find((i=>i.height===t));i&&this.bb(i.level)}bb(t){this.lb.currentLevel=t,this.lb.startLevel=t,this.lb.nextLevel=t}fb(){this.lb.levels.forEach(((t,i)=>{this.ob.find((({height:i})=>i===t.height))||this.ob.push({level:i,height:t.height})}))}}var Os=o(2356);const Ls="huffpost",Rs=540;class Ds extends qi{constructor(t,i,e,n,r,h,o,a,c,l=!1,u){super(),this.yr=t,this.xb=i,this.Mg=e,this.Zt=n,this.wb=r,this._b=h,this.Sb=o,this.Ab=a,this.sb=c,this.Pb=l,this.ei=u,this.Ib=!1,this.pageFocus=new Os.v(this.yr),this.kb=Object.values(v),this.Cb=!1,this.Tb=!0,this.Mb=!1,this.Eb=[{event:Vt.fI.AdVideoStart,position:0},{event:Vt.fI.AdVideoFirstQuartile,position:25},{event:Vt.fI.AdVideoMidpoint,position:50},{event:Vt.fI.AdVideoThirdQuartile,position:75},{event:Vt.fI.AdVideoComplete,position:100}],this.Bb=this.Eb[0],this.Ob=t=>{try{switch(t.type){case v.Pause:if(this._b&&!this.Tb)return this.Tb=!0,void this.Lb("pause_event_loopAd");this.Cb=!1;break;case v.Play:if(!this.Cb&&this.Pb)return void this.Mg.pause();break;case v.Canplay:case v.Durationchange:this.Rb();break;case v.Timeupdate:this.Db();break;case v.Error:this.Af.next({type:Vt.fI.AdError,payload:{errorMessage:zi.VastVideoTagEventError}});break;case"click":this.Af.next({type:Vt.fI.AdClickThru,payload:{}})}}catch(t){(0,s.n)({level:s.D.CRITICAL,callStack:t.stack,message:"AdManager_VastIntegrator_onVideoEvent",exception:t.message},{throttle:10,sendMaxLog:!1})}}}initAd(t,i,e,s,n,r){try{this.Mg=r.videoSlot,this.width=t,this.height=i,this.Dv(this.wb,this.Mg.parentElement),this.resizeAd(t,i,e),this.addVideoEvents(this.Mg),this.Ab&&this.sb&&this.sb.isSupported()?this.jb(this.sb):(this.Mg.setAttribute("src",this.xb),this.Mg.setAttribute("preload","metadata"),this.Mg.load()),this.pageFocus.isDocumentVisible()||this.Rb()}catch(t){this.Af.next({type:Vt.fI.AdError,payload:{errorMessage:zi.WrapperInitAdError+`_${t.message}`}})}}startAd(){try{(0,e.cn)(this.Mg,"cnx-ad-video-slot"),this.Cb=!0,this.pageFocus.isDocumentVisible()?this.Mg.play().then((()=>{this.Af.next({type:Vt.fI.AdStarted}),this.Af.next({type:Vt.fI.AdImpression,payload:{}})})).catch((t=>{this.Af.next({type:Vt.fI.AdError,payload:{errorMessage:zi.VastPlayPromiseReject}})})):(this.Af.next({type:Vt.fI.AdStarted}),this.Af.next({type:Vt.fI.AdImpression,payload:{}}),this.Mg.play())}catch(t){this.Af.next({type:Vt.fI.AdError,payload:{errorMessage:zi.WrapperStartAdError+`_${t.message}`}})}}stopAd(t){this.Pb&&this.Mg.pause(),"videoComplete"===t&&this._b?this.Af.next({type:Vt.fI.AdStopped,payload:{shouldTrackPostBid:!1}}):this.Af.next({type:Vt.fI.AdStopped,payload:{shouldTrackPostBid:!0}})}resizeAd(t,i,s){(0,e.T7)(this.Mg,{width:`${t}px`,height:`${i}px`}),this.Af.next({type:Vt.fI.AdSizeChange})}pauseAd(){this.Cb=!1,this.Sb&&void 0===this.Bb&&(this.Bb=this.Eb[0]),this.Mg.pause(),this.Af.next({type:Vt.fI.AdPaused})}resumeAd(){this._b&&void 0===this.Bb&&(this.Bb=this.Eb[0]),this.Cb=!0,this.Lb("resumeAd"),this.Zt===St.M.Ios&&(0,e.UR)(this.Mg),this.Af.next({type:Vt.fI.AdPlaying})}expandAd(){}collapseAd(){}skipAd(){this.Af.next({type:Vt.fI.AdSkipped})}getAdRemainingTime(){return this.Mg.duration-this.Mg.currentTime}getAdDuration(){return this.Mg.duration?this.Mg.duration:0}getAdVolume(){return this.Mg.volume}setAdVolume(t){this.Mg.volume=t}getAdMediaWidth(){return this.Mg.videoWidth}getAdMediaHeight(){return this.Mg.videoHeight}destroy(){if(!this.Sb&&!this._b)try{(0,e.IV)(this.Mg,"cnx-ad-video-slot"),this.Vb(this.Mg),this.Mg.removeAttribute("src"),this.Fb&&(this.Fb.destroy(),this.Fb=null)}catch(t){(0,s.n)({level:s.D.WARN,message:"AdManager_VastIntegrator_destroyAd",exception:t.message,callStack:t.stack})}}jb(t){let i={forceMaxLevel:!0};this.ei&&this.ei.includes(Ls)&&(i={forceMaxLevel:!1,forceResolutionHeight:Rs}),this.Fb=new Bs(t,this.xb,this.Mg,this.yr,i),this.Fb.start((()=>{this.Rb()}),(()=>{this.Af.next({type:Vt.fI.AdError,payload:{errorMessage:zi.CnxMediaSrcNotSupported}})}))}Dv(t,i){this.$b=this.yr.createElement("a"),t&&(this.$b.href=t,this.$b.target="_blank"),(0,e.cn)(this.$b,"cnx-ad-slot"),i.appendChild(this.$b),this.$b.addEventListener("click",this.Ob)}addVideoEvents(t){this.kb.forEach((i=>{t.addEventListener(i,this.Ob)})),this.$b&&this.$b.addEventListener("click",this.Ob)}Vb(t){this.kb.forEach((i=>{t.removeEventListener(i,this.Ob)})),this.$b&&this.$b.removeEventListener("click",this.Ob)}Rb(){this.Ib||(this.Ib=!0,this.Af.next({type:Vt.fI.AdLoaded,payload:{}}))}Db(){this.Af.next({type:Vt.fI.AdRemainingTimeChange});const t=(0,di.dQ)(0,this.Mg.duration,0,100,this.Mg.currentTime);if(this.Bb&&t>=this.Bb.position){this.Mb||this.Af.next({type:this.Bb.event});const t=this.Bb;this.Bb=this.Eb[this.Eb.indexOf(this.Bb)+1],t.event===Vt.fI.AdVideoComplete&&(this._b&&(this.Mg.currentTime=.01),this.Tb=!1,this.stopAd("videoComplete"),this.Mb=!0)}}Lb(t){try{this.Mg.play().catch((i=>(0,s.n)({level:s.D.WARN,message:`AdManager_VastIntegrator_play_${t}`,exception:`playError: ${i.message}`,callStack:i.stack})))}catch(i){(0,s.n)({level:s.D.WARN,message:`AdManager_VastIntegrator__play_${t}`,exception:`promiseError: ${i.message}`,callStack:i.stack})}}}class js{constructor(t,i,e,s,n){this.Ub=t,this.yr=i,this.ha=e,this.Qt=s,this.Kv=n,this.Hb={bodyTamplate:`<div class="ad-element" id="cnx-ad-element"></div><script type="text/javascript" src="${this.Ub}"><\/script>'\n        <script type="text/javascript">\n            window.Object.defineProperty(Object.prototype, 'cnxInnerTag', { enumerable: !1, writable: !0, value: '${this.Qt}' });\n            window.Object.defineProperty(Function.prototype, 'cnxInnerTag',\n            { enumerable: !1, writable: !0, value: '${this.Qt}' });\n            cnxtimeouts = [];\n            cnxintervals = [];\n            oldSetTimeout = setTimeout;\n            setTimeout = function (e, t) { var n = oldSetTimeout.apply(null, arguments); return cnxtimeouts.push(n), n };\n            oldSetInterval = setInterval;\n            setInterval = function (e, t) { var n = oldSetInterval.apply(null, arguments); return cnxintervals.push(n), n };\n            clearAll = function () {\n                setTimeout = function () { };\n                setInterval = function () { };\n                for (var e = 0; e < cnxtimeouts.length; e++) {\n                    clearTimeout(cnxtimeouts[e]);\n                }\n                for (e = 0; e < cnxintervals.length; e++) {\n                    clearInterval(cnxintervals[e]);\n                }\n            };\n        <\/script>`,headTamplate:" <style>\n            html,\n            body,\n            .ad-element {\n                width: 100%;\n                height: 100%;\n            }\n            </style>"},this.ly=new _s(this.yr,this.ha)}qb(t){return this.ly.loadIframe({customHead:this.Hb.headTamplate,customHtml:this.Hb.bodyTamplate,container:t,customReportingLog:{heavyAdBlockTypeEnum:l.ProtoHeavyAdBlockTypeEnum.VpaidIframe,advertiserLineItemId:this.Kv}})}loadAdUnitIframe(t){return new Promise(((i,e)=>{this.qb(t).then((t=>{t.adContainer=t.iframe.contentWindow.document.querySelector(".ad-element"),i(t)})).catch((t=>{e(t)}))}))}destroyAdUnit(){try{const t=this.ly.iframe.contentWindow.clearAll;t&&t()}catch(t){(0,s.n)({message:"AdManager_VPAIClient_destroyAdUnit",exception:null==t?void 0:t.message,callStack:null==t?void 0:t.stack,level:s.D.WARN},{throttle:2,sendMaxLog:!0})}this.ly.destroy(),this.ly=null}}var Vs;!function(t){t[t.handshakeVersion=0]="handshakeVersion",t[t.initAd=1]="initAd",t[t.startAd=2]="startAd",t[t.stopAd=3]="stopAd",t[t.skipAd=4]="skipAd",t[t.resizeAd=5]="resizeAd",t[t.pauseAd=6]="pauseAd",t[t.resumeAd=7]="resumeAd",t[t.expandAd=8]="expandAd",t[t.collapseAd=9]="collapseAd",t[t.subscribe=10]="subscribe",t[t.unsubscribe=11]="unsubscribe"}(Vs||(Vs={}));class Fs extends qi{constructor(t,i,e,n,r,h,o){super(),this.xb=t,this.yr=i,this.ha=e,this.zb=n,this.Kv=r,this.Lm=h,this.Zt=o,this.Gb=[],this.Jb=new Set,this.Qb=new Set,this.Yb=(t,i,e)=>{const s={url:t,playerHandles:e};this.Xb(Vt.fI.AdClickThru,s)},this.Xb=(t,i)=>{if(this.Qb.add(t),!this.Jb.has(t))return t!==Vt.fI.AdImpression||this.Qb.has(Vt.fI.AdLoaded)?void this.Zb(t,i):((0,s.n)({message:"AdManager_AdVpaidWrapper_ImpressionBeforeAdLoaded",exception:`advertiserLineItemId:${this.Kv}_creativeId:${this.Lm}_vpaidSrc:${this.xb}`,callStack:JSON.stringify((0,f.ee)(this.Qb)),level:s.D.WARN},{throttle:1e3}),this.Jb.add(Vt.fI.AdLoaded),void this.Zb(Vt.fI.AdLoaded,i))},this.Zb=(t,i)=>{switch(t){case Vt.fI.AdError:this.Af.next({type:Vt.fI.AdError,payload:{errorMessage:(0,dt.HD)(i)?i:JSON.stringify(i)}});break;case Vt.fI.AdLoaded:this.Af.next({type:Vt.fI.AdLoaded,payload:{skipOffset:(0,dt.as)(i)?i.skipOffset:void 0}});break;case Vt.fI.AdImpression:this.Af.next({type:Vt.fI.AdImpression,payload:{}});break;case Vt.fI.AdClickThru:this.Af.next({type:Vt.fI.AdClickThru,payload:(0,dt.as)(i)?i:{}});break;default:this.Af.next({type:Vt.fI[t]})}}}initAd(t,i,e,s,n,r){try{this.Gu=t,this.Ju=i,this.Cg=e,this.Kb=s,this.tx=n,this.sx=r,this.nx=new js(this.xb,this.yr,this.ha,this.zb,this.Kv),this.hx=this.nx.loadAdUnitIframe(r.slot).then((t=>{this.ox(t)})).catch((t=>{this.Af.next({type:Vt.fI.AdError,payload:{errorMessage:zi.VpaidOnLoad}})}))}catch(t){this.Af.next({type:Vt.fI.AdError,payload:{errorMessage:zi.VpaidOnLoad}})}}startAd(){try{this.Qb.has(Vt.fI.AdImpression)&&!this.Jb.has(Vt.fI.AdImpression)&&((0,s.n)({message:"AdManager_AdVpaidWrapper_brokenImpressionHandle",exception:`advertiserLineItemId:${this.Kv}_creativeId:${this.Lm}_vpaidSrc:${this.xb}`,callStack:JSON.stringify((0,f.ee)(this.Qb)),level:s.D.WARN},{throttle:1e3}),this.Jb.add(Vt.fI.AdImpression),this.Af.next({type:Vt.fI.AdImpression,payload:{}})),this.lx.startAd()}catch(t){this.Af.next({type:Vt.fI.AdError,payload:{errorMessage:zi.WrapperStartAdError}})}}stopAd(t){var i;null===(i=this.hx)||void 0===i||i.then((()=>{this.lx?this.lx.stopAd(t):(0,s.n)({message:"stopAd",exception:t,level:s.D.WARN})}))}resizeAd(t,i,e){this.lx.resizeAd(t,i,e)}pauseAd(){this.lx.pauseAd()}resumeAd(){this.lx.resumeAd(),this.Zt===St.M.Ios&&(0,e.UR)(this.sx.videoSlot)}expandAd(){this.lx.expandAd()}collapseAd(){this.lx.collapseAd()}skipAd(){this.lx.skipAd()}getAdRemainingTime(){return this.lx.getAdRemainingTime()}getAdDuration(){var t;return null===(t=this.lx)||void 0===t?void 0:t.getAdDuration()}getAdVolume(){return this.lx.getAdVolume()}setAdVolume(t){this.lx.setAdVolume(t)}destroy(){var t;this.ux(),this.Gb.length=0,this.lx=null,null===(t=this.nx)||void 0===t||t.destroyAdUnit()}ox(t){const i=t.iframe.contentWindow.getVPAIDAd;if("function"==typeof i){const e=i();this.lx=e,this.mx(),this.gx(e)?e.initAd(this.Gu,this.Ju,this.Cg,this.Kb,this.tx,{slot:t.adContainer,videoSlot:this.sx.videoSlot}):this.Af.next({type:Vt.fI.AdError,payload:{errorMessage:zi.VpaidInvalid}})}else this.Af.next({type:Vt.fI.AdError,payload:{errorMessage:zi.VpaidGetVpaidAdError}})}mx(){Object.keys(Vt.fI).forEach((t=>{let i=this.Xb.bind(this,Vt.fI[t]);Vt.fI[t]===Vt.fI.AdClickThru&&(i=this.Yb),this.Gb.push({handler:i,event:t}),this.lx.subscribe(i,t)}))}ux(){this.Gb.forEach((t=>{this.lx.unsubscribe(t.handler,t.event)}))}gx(t){return Object.keys((0,f.ti)(Vs)).every((i=>(0,dt.mf)(t[Vs[i]])))}}var $s=o(525);class Ns extends te{constructor(t,i){super(t,i),this.Tm=t,this.settings=i,this.adSourceType=l.ProtoAdsourceTypeEnum.Unknown,this.vx=[],this.creativeId=i.vastResponse.creativeId}initAd(t,i,e,s,n,r,h){try{super.initAd(t,i,e,s,n,r,h),(0,ee.A)(this.settings.adManagerLineItem.protoLineItem.publisherLineItemId,this.settings.vastResponse.linearClickThrough).then((n=>{var r;if(n)return void this.Um({type:Vt.fI.AdError,payload:{errorMessage:zi.DomainBlocked}});if(this.yx=this.xx(t,this.Em),null===this.yx)return void this.Um({type:Vt.fI.AdError,payload:{errorMessage:zi.VastUnsupportedMedia}});(null===(r=this.yx.src)||void 0===r?void 0:r.includes($s.n.endPoints.base.video))&&(this.yx.src=this.pd.appendParamsToUrl(this.yx.src)),this.adMediaType=this.yx.type,this.yx.getMediaFileType()===es.Video?(this.wx=new Ds(this.settings.globalDomUtilsService,this.yx.src,this.Em,this.settings.os,this.settings.vastResponse.linearClickThrough,this.settings.loopAdWhenFinished),this.adSourceType=l.ProtoAdsourceTypeEnum.VastMedia):(this.wx=new Fs(this.yx.src,this.settings.globalDomUtilsService,this.settings.trackingService,this.ig,this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,this.creativeId,this.settings.os),this.adSourceType=l.ProtoAdsourceTypeEnum.Vpaid),this.vx.push(this.wx.onVpaidEvent.subscribe((t=>{if(t.type===Vt.fI.AdLoaded&&(t.payload.skipOffset=this.settings.vastResponse.skipoffset),t.type===Vt.fI.AdClickThru){this._x=t.payload.url;const i=t.payload.url||this.settings.vastResponse.linearClickThrough;i&&t.payload.playerHandles&&this.settings.globalDomUtilsService.open(i,Pt.bS.Blank)}this.Um(t)})));const h={AdParameters:this.settings.vastResponse.adParameters,adParameters:this.settings.vastResponse.adParameters};this.wx.initAd(t,i,e,s,h,{slot:this.Mm,videoSlot:this.Em})})).catch((t=>this.Sx(t)))}catch(t){this.Sx(t)}}startAd(){try{super.startAd(),this.wx.startAd()}catch(t){this.Af.next({type:Vt.fI.AdError,payload:{errorMessage:zi.AdaptorStartAdError+`_${t.message}`}})}}stopAd(t){super.stopAd(t),this.wx?this.wx.stopAd(t):(0,s.n)({message:"stopAd",exception:t,level:s.D.WARN})}resizeAd(t,i,e){try{this.wx.resizeAd(t,i,e)}catch(t){this.fg("VastBidAdaptor","resizeAd",t)}}pauseAd(){try{this.wx.pauseAd()}catch(t){this.fg("VastBidAdaptor","pauseAd",t)}}resumeAd(){try{this.wx.resumeAd()}catch(t){this.fg("VastBidAdaptor","resumeAd",t)}}expandAd(){try{this.wx.expandAd()}catch(t){this.fg("VastBidAdaptor","expandAd",t)}}collapseAd(){try{this.wx.collapseAd()}catch(t){this.fg("VastBidAdaptor","collapseAd",t)}}skipAd(){try{super.skipAd(),this.wx.skipAd()}catch(t){this.fg("VastBidAdaptor","skipAd",t)}}getAdRemainingTime(){try{return this.wx.getAdRemainingTime()}catch(t){return this.fg("VastBidAdaptor","getAdRemainingTime",t),0}}getAdDuration(){try{return this.wx&&this.wx.getAdDuration()||Math.round(this.settings.vastResponse.duration/oi.s_)}catch(t){return this.fg("VastBidAdaptor","getAdDuration",t),0}}getAdVolume(){try{return this.wx.getAdVolume()}catch(t){return this.fg("VastBidAdaptor","getAdVolume",t),0}}getAdMediaSize(){let t=0,i=0;return this.wx instanceof Ds?(t=this.wx.getAdMediaWidth(),i=this.wx.getAdMediaHeight()):(t=this.yx.width,i=this.yx.height),{width:t,height:i}}setAdVolume(t){try{super.setAdVolume(t),this.wx.setAdVolume(t)}catch(t){this.fg("VastBidAdaptor","setAdVolume",t)}}get adVideoUrl(){var t;return null===(t=this.yx)||void 0===t?void 0:t.src}get declaredDurationInSeconds(){return this.settings.vastResponse.duration/oi.s_}hg(t){const i=super.hg(t);return this.Ax(i)}rg(t){const i=super.rg(t);return this.Ax(i)}Cu(){var t;if(!this.settings.loopAdWhenFinished)try{super.Cu(),(0,jt.i)(this.vx),null===(t=this.wx)||void 0===t||t.destroy()}catch(t){this.fg("VastBidAdaptor","_destroy",t)}}Ax(t){var i;return t.payload.adSourceData.name=null===(i=this.settings.vastResponse)||void 0===i?void 0:i.adTitle,t.payload.clickThroughUrl=this._x||this.settings.vastResponse.linearClickThrough,t}Px(t,i){return t.filter((t=>t.getMediaFileType()===es.Video&&i.canPlayType(t.type)))}xx(t,i){const e=this.Px(this.settings.vastResponse.mediaFiles,i),s=e.filter((t=>"video/mp4"===t.type));if(s.length)return Ts(s,t);if(e.length)return Ts(e,t);const n=this.settings.vastResponse.mediaFiles.filter((t=>t.getMediaFileType()===es.Javascript));return n.length?Ts(n,t):null}Sx(t){this.Af.next({type:Vt.fI.AdError,payload:{errorMessage:zi.AdaptorInitAdError+`_${t.message}`}})}}class Us{constructor(t){this.settings=t,this.metrics={created:(new Date).getTime()},this.settings.vastAdsChain||(this.settings.vastAdsChain=[]),void 0===this.settings.maxWrapperLimit&&(this.settings.maxWrapperLimit=10)}fetchBid(){return this.metrics.fetchStart=(new Date).getTime(),this.Ix(this.settings.xml).then((t=>(this.metrics.fetchEnd=(new Date).getTime(),t))).catch((t=>{throw this.metrics.fetchEnd=(new Date).getTime(),t}))}Ix(t){return new Promise(((i,e)=>{const s=new gs(2).parseVastXml(t);!0!==s.error?(this.kx(s.result),i(this.Cx(s.result))):e(s.errorReason)}))}Cx(t){return new Promise(((i,e)=>{if(t.wrapper){this.settings.maxWrapperLimit<=0&&e($i.XmlAdaptorWrapperLimit);const s=this.settings.maxWrapperLimit-1;i(new Ws({id:this.settings.id,adManagerLineItem:this.settings.adManagerLineItem,trackersInformation:this.settings.trackersInformation,maxWrapperLimit:s,url:t.wrapper.VASTAdTagURI,replaceTrackingMacros:!1,requestMetadata:this.settings.requestMetadata,callingState:this.settings.callingState,adMacroReplacer:this.settings.adMacroReplacer,adContainer:this.settings.adContainer,globalDomUtilsService:this.settings.globalDomUtilsService,viewabilityService:this.settings.viewabilityService,trackingService:this.settings.trackingService,cpm:this.settings.cpm,obfuscatedPrice:this.settings.obfuscatedPrice,adEnforcer:this.settings.adEnforcer,requestWithCredentials:this.settings.requestWithCredentials,successRate:this.settings.successRate,os:this.settings.os,adSlotContainerRecycler:this.settings.adSlotContainerRecycler,creativeId:this.settings.creativeId,bidSlotId:this.settings.bidSlotId,loopAdWhenFinished:this.settings.loopAdWhenFinished,pageUrl:this.settings.pageUrl,urlSuffixerService:this.settings.urlSuffixerService}).fetchBid())}else{let t;const e={id:this.settings.id,adManagerLineItem:this.settings.adManagerLineItem,trackers:this.settings.trackersInformation,requestMetadata:this.settings.requestMetadata,callingState:this.settings.callingState,adContainer:this.settings.adContainer,globalDomUtilsService:this.settings.globalDomUtilsService,viewabilityService:this.settings.viewabilityService,cpm:this.settings.cpm,obfuscatedPrice:this.settings.obfuscatedPrice,adEnforcer:this.settings.adEnforcer,successRate:this.settings.successRate,os:this.settings.os,adSlotContainerRecycler:this.settings.adSlotContainerRecycler,externalCreativeId:this.settings.creativeId,bidSlotId:this.settings.bidSlotId,urlSuffixerService:this.settings.urlSuffixerService},s=De.getGlobalContainer().resolve(ts);if(this.settings.adManagerLineItem.protoLineItem.adType===l.ProtoAdType.Nonlinear){const i=Object.assign(Object.assign({},e),{trackingService:this.settings.trackingService,vastResponse:new vs(this.settings.vastAdsChain)});t=new Cs(s,i)}else{const i=Object.assign(Object.assign({},e),{vastResponse:new vs(this.settings.vastAdsChain),trackingService:this.settings.trackingService,loopAdWhenFinished:this.settings.loopAdWhenFinished});t=new Ns(s,i)}i(t)}}))}kx(t){!function(t,i){const e=new Li(t);i.adError.push(...Fi(e.errorUrls)),i.adImpression.push(...Fi(e.impressions)),i.adViewableImpression.push(...Fi(e.trackingEvents.viewable_impression)),i.adClick.push(...Fi(e.clickTrackings)),i.adMute.push(...Fi(e.trackingEvents.mute)),i.adPause.push(...Fi(e.trackingEvents.pause)),i.adQuartileFirst.push(...Fi(e.trackingEvents.firstQuartile)),i.adQuartileSecond.push(...Fi(e.trackingEvents.midpoint)),i.adQuartileThird.push(...Fi(e.trackingEvents.thirdQuartile)),i.adQuartileFourth.push(...Fi(e.trackingEvents.complete)),i.adResume.push(...Fi(e.trackingEvents.resume)),i.adSkip.push(...Fi(e.trackingEvents.skip)),i.adStarted.push(...Fi(e.trackingEvents.creativeView)),i.adVideoStart.push(...Fi([...e.trackingEvents.start])),i.adUnmute.push(...i.adUnmute,...Fi(e.trackingEvents.unmute)),i.adUserAcceptInvitation.push(...Fi([...e.trackingEvents.acceptInvitation,...e.trackingEvents.acceptInvitationLinear])),i.adUserClose.push(...Fi(e.trackingEvents.close)),i.adUserMinimize.push(...i.adUserMinimize,...Fi([...e.trackingEvents.collapse,...e.trackingEvents.playerCollapse,...e.trackingEvents.adCollapse]))}(t,this.settings.trackersInformation),this.settings.vastAdsChain.push(t)}}var Hs,qs=o(158);!function(t){t[t.None=0]="None",t[t.Ima=1]="Ima"}(Hs||(Hs={}));const zs={[Hs.Ima]:".g.doubleclick.net"};class Ws{constructor(t){this.settings=t,void 0===this.settings.requestWithCredentials&&(this.settings.requestWithCredentials=true),this.metrics={created:(new Date).getTime()}}fetchBid(){return this.metrics.fetchStart=(new Date).getTime(),this.Tx(this.settings.url).then((t=>t.fetchBid())).then((t=>(this.metrics.fetchEnd=(new Date).getTime(),t))).catch((t=>{throw this.metrics.fetchEnd=(new Date).getTime(),t}))}Mx(t){let i=Hs.None;return Object.keys(zs).forEach((e=>{t.includes(zs[e])&&(i=parseInt(e,10))})),i}Tx(t){let i;try{i=this.Ex(t)}catch(t){return Promise.reject($i.InvalidCreativeUrl)}let e=this.Mx(t);switch(this.settings.adManagerLineItem.protoLineItem.adType===l.ProtoAdType.Nonlinear&&(e===Hs.Ima&&(0,s.n)({message:"AdManager_VastUrlCallAdaptor_found_ima_in_nonLinear",level:s.D.INFO}),e=Hs.None),e){case Hs.None:return this.Bx(i);case Hs.Ima:return this.Ox(i);default:return Promise.reject($i.HandlingSdkUrl)}}Ox(t){return Promise.resolve(new is({url:t,id:this.settings.id,adManagerLineItem:this.settings.adManagerLineItem,trackersInformation:this.settings.trackersInformation,replaceTrackingMacros:!1,requestMetadata:this.settings.requestMetadata,callingState:this.settings.callingState,adContainer:this.settings.adContainer,globalDomUtilsService:this.settings.globalDomUtilsService,viewabilityService:this.settings.viewabilityService,cpm:this.settings.cpm,obfuscatedPrice:this.settings.obfuscatedPrice,adEnforcer:this.settings.adEnforcer,successRate:this.settings.successRate,os:this.settings.os,adSlotContainerRecycler:this.settings.adSlotContainerRecycler,creativeId:this.settings.creativeId,bidSlotId:this.settings.bidSlotId,pageUrl:this.settings.pageUrl,urlSuffixerService:this.settings.urlSuffixerService}))}Bx(t){return qs.n.fetchXMLRequest(t,this.settings.requestWithCredentials).catch((()=>!1===this.settings.requestWithCredentials?Promise.reject($i.NetworkRequestUrl):qs.n.fetchXMLRequest(t,!1))).catch((()=>Promise.reject($i.NetworkRequestUrl))).then((t=>new Us({id:this.settings.id,adManagerLineItem:this.settings.adManagerLineItem,trackersInformation:this.settings.trackersInformation,vastAdsChain:this.settings.vastAdsChain,xml:t,replaceTrackingMacros:!1,requestMetadata:this.settings.requestMetadata,callingState:this.settings.callingState,adMacroReplacer:this.settings.adMacroReplacer,adContainer:this.settings.adContainer,globalDomUtilsService:this.settings.globalDomUtilsService,viewabilityService:this.settings.viewabilityService,trackingService:this.settings.trackingService,cpm:this.settings.cpm,obfuscatedPrice:this.settings.obfuscatedPrice,adEnforcer:this.settings.adEnforcer,requestWithCredentials:this.settings.requestWithCredentials,successRate:this.settings.successRate,os:this.settings.os,adSlotContainerRecycler:this.settings.adSlotContainerRecycler,creativeId:this.settings.creativeId,bidSlotId:this.settings.bidSlotId,loopAdWhenFinished:this.settings.loopAdWhenFinished,pageUrl:this.settings.pageUrl,urlSuffixerService:this.settings.urlSuffixerService,interactionService:this.settings.interactionService})))}Ex(t){const{width:i,height:e}=this.settings.callingState.adContainerState.get(this.settings.adManagerLineItem.protoLineItem.adType),s={adHeight:e,adWidth:i,adPostion:this.settings.callingState.adBreakState.adBreakType},n={mediaDescription:this.settings.callingState.media.mediaDescription,mediaDuration:this.settings.callingState.media.mediaDuration,mediaId:this.settings.callingState.media.mediaId,mediaTitle:this.settings.callingState.media.mediaTitle,mediaUrl:this.settings.callingState.media.mediaUrl};return this.settings.adMacroReplacer.replace(t,this.settings.adManagerLineItem.protoLineItem.vendorId,{adMacros:s,mediaMacros:n})}}class Gs{constructor(t){this.data=t,(0,dt.QM)(this.data.cnxBidId)||(this.data.cnxBidId=(0,pi.qs)())}}var Js=o(7577);class Qs{constructor(t,i,e,s,n,r,h){this.Lx=t,this.Rx=i,this.Kv=e,this.yr=s,this.ha=n,this.Yv=r,this.jx=h,this.ey=new It.x,this.sy=new It.x,this.$g=new It.x,this.wf=[]}get onDisplayAd(){return this.ey.asObservable()}get onError(){return this.$g.asObservable()}get onClickClose(){return this.sy.asObservable()}initializeAd(t,i){try{let e;if(this.Yv===l.ProtoAdType.Nonlinear){const{width:t,height:i}=this.jx;e={width:t,height:i}}this.xy=new As(this.Yv,this.Rx,this.Lx,t,this.yr,this.ha,this.Kv,e),this.wf.push(this.xy.onDisplayAd.subscribe((()=>{this.ey.next()})),this.xy.onError.subscribe((()=>{this.$g.next(zi.DisplayIntegratorIframeLoad)})),this.xy.onClickClose.subscribe((()=>{this.sy.next()}))),this.xy.createBanner(i)}catch(t){this.$g.next(zi.WrapperInitAdError)}}getAdMediaDimensions(){var t;return null===(t=this.xy)||void 0===t?void 0:t.getAdMediaDimensions()}destroy(){var t;(0,jt.i)(this.wf),null===(t=this.xy)||void 0===t||t.destroy()}}const Ys={[rs.FirstQuartile]:Vt.fI.AdVideoFirstQuartile,[rs.SecondQuartile]:Vt.fI.AdVideoMidpoint,[rs.ThirdQuartile]:Vt.fI.AdVideoThirdQuartile,[rs.FourthQuartile]:Vt.fI.AdVideoComplete};class Xs extends te{constructor(t,i){var e;let s;super(t,i),this.Tm=t,this.settings=i,this.adSourceType=l.ProtoAdsourceTypeEnum.Unknown,this.Cy=500,this.Vx=[],this.settings.adManagerLineItem.protoLineItem.adType===l.ProtoAdType.Nonlinear?(this.adMediaType="displayHtmlNonLinear",this.ib="htmlNonLinear",s=null===(e=this.settings.adManagerLineItem.protoLineItem.nonlinearLineItemSettings)||void 0===e?void 0:e.nonLinearAdTimeSeconds):(this.adMediaType="displayHtml",this.ib="html",s=this.settings.adManagerLineItem.protoLineItem.overlayTime);const n=s*oi.s_;this.Ky=new Is(this.Tm,n,this.Cy),this.Vx.push(this.Ky.onTimeUpdate.subscribe((()=>{this.Um({type:Vt.fI.AdRemainingTimeChange})})),this.Ky.onTimeElapsed.subscribe((()=>{this.stopAd("htmlTimerElapsed")})),this.Ky.onQuartile.subscribe((t=>{this.Um({type:Ys[t],payload:{}})})))}get adVideoUrl(){return this.ib}get declaredDurationInSeconds(){return this.settings.adManagerLineItem.protoLineItem.overlayTime}initAd(t,i,e,s,n,r,h){try{super.initAd(t,i,e,s,n,r,h),this.Gu=t,this.Ju=i,this.Um({type:Vt.fI.AdLoaded,payload:{}})}catch(t){this.Um({type:Vt.fI.AdError,payload:{errorMessage:zi.AdaptorInitAdError+`_${t.message}`}})}}startAd(){try{super.startAd(),this.Ky.start(),this.Fx=new Qs(this.settings.mime,this.settings.html,this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,this.settings.globalDomUtilsService,this.settings.trackingService,this.settings.adManagerLineItem.protoLineItem.adType,this.settings.dimensions),this.Vx.push(this.Fx.onDisplayAd.subscribe((()=>{this.Um({type:Vt.fI.AdStarted}),this.Um({type:Vt.fI.AdVideoStart}),this.Um({type:Vt.fI.AdImpression,payload:{}})})),this.Fx.onError.subscribe((t=>{this.Um({type:Vt.fI.AdError,payload:{errorMessage:t}}),this.Ky.stop()})),this.Fx.onClickClose.subscribe((()=>{this.Um({type:Vt.fI.AdUserClose,payload:{}}),this.stopAd(Vt.r5)}))),this.Fx.initializeAd(this.Mm,{width:this.Gu,height:this.Ju})}catch(t){this.Um({type:Vt.fI.AdError,payload:{errorMessage:zi.AdaptorStartAdError+`_${t.message}`}})}}stopAd(t){try{super.stopAd(t),this.Ky.stop(),this.Um({type:Vt.fI.AdStopped,payload:{shouldTrackPostBid:!0}})}catch(t){this.fg("HtmlBidAdaptor","stopAd",t)}}skipAd(){try{super.skipAd(),this.Um({type:Vt.fI.AdSkipped})}catch(t){this.fg("HtmlBidAdaptor","skipAd",t)}}pauseAd(){try{this.Ky.stop(),this.Um({type:Vt.fI.AdPaused})}catch(t){this.fg("HtmlBidAdaptor","pauseAd",t)}}resumeAd(){try{this.Ky.start(),this.Um({type:Vt.fI.AdPlaying})}catch(t){this.fg("HtmlBidAdaptor","resumeAd",t)}}collapseAd(){}expandAd(){}getAdDuration(){return this.Ky.timerDuration/oi.s_}getAdRemainingTime(){return this.Ky.timeRemaining/oi.s_}getAdVolume(){return 0}getAdMediaSize(){var t;return null===(t=this.Fx)||void 0===t?void 0:t.getAdMediaDimensions()}setAdVolume(t){}resizeAd(t,i,e){this.Gu=t,this.Ju=i}Cu(){var t;try{super.Cu(),this.Ky.stop(),(0,jt.i)(this.Vx),null===(t=this.Fx)||void 0===t||t.destroy()}catch(t){this.fg("HtmlBidAdaptor","_destroy",t)}}}class Zs{constructor(t){this.settings=t,this.metrics={created:(new Date).getTime()}}fetchBid(){if(this.metrics.fetchStart=(new Date).getTime(),!this.$x(this.settings.mime))return Promise.reject($i.HTMLUnknownMimeType);const t=De.getGlobalContainer().resolve(ts),i=new Xs(t,{id:this.settings.id,adManagerLineItem:this.settings.adManagerLineItem,trackers:this.settings.trackersInformation,html:this.settings.html,mime:this.settings.mime,minDimensions:this.settings.dimensions,requestMetadata:this.settings.requestMetadata,callingState:this.settings.callingState,globalDomUtilsService:this.settings.globalDomUtilsService,trackingService:this.settings.trackingService,viewabilityService:this.settings.viewabilityService,adContainer:this.settings.adContainer,cpm:this.settings.cpm,obfuscatedPrice:this.settings.obfuscatedPrice,adEnforcer:this.settings.adEnforcer,successRate:this.settings.successRate,os:this.settings.os,adSlotContainerRecycler:this.settings.adSlotContainerRecycler,externalCreativeId:this.settings.creativeId,bidSlotId:this.settings.bidSlotId,urlSuffixerService:this.settings.urlSuffixerService,dimensions:this.settings.dimensions});return this.metrics.fetchEnd=(new Date).getTime(),Promise.resolve(i)}$x(t){return Object.keys(ws).some((i=>ws[i]===t))}}var Ks=o(6615),tn=o(1886),en=o(5348);class sn{constructor(t,i,e,s,n,r,h,o){this.Nx=t,this.Ux=i,this.yf=e,this.Hx=s,this.qx=n,this.zx=r,this.Wx=h,this.Gx=o,this.Jx=new Map}request(t){const{width:i,height:e}=t.callingState,n=this.Qx(i,e),r=this.Yx(t);return!n||Object.keys(r.lineItems).length<=0?Promise.resolve({bids:[],noBids:[]}):this.Xx(r).then((i=>(r.liveRampAtsEnvelope&&en.$.setEnvelopeStatus(i.liveRampEnvelopeStatus),this.Zx(i,t)))).catch((t=>((0,s.n)({message:"RtbCallAggregator",exception:t.message,level:s.D.CRITICAL}),{bids:[],noBids:[]})))}destroy(){}Zx(t,i){const e={bids:[],noBids:[]};return t.lineItemResponses.forEach((n=>{const r=yi(i.lineItemRequestDataList,n.id),h={cachedFloorPrice:(0,dt.r)(n.cachedFloorPrice)?n.cachedFloorPrice:void 0,predictedFloorPrice:n.predictedFloorPrice};this.Jx.set(n.id,h),n.bids.forEach((n=>{const h=r.protoLineItem;if(n=Object.assign(Object.assign({},n),this.Kx(h)),this.tw(h,n))return(0,s.n)({level:s.D.WARN,message:"RtbCallAggregator_nonLinear_banner_0_dimensions",exception:`lineItemId:${r.protoLineItem.advertiserLineItemId}`},{throttle:5}),void e.noBids.push(this.iw({connatixReason:l.ConnatixNoBidReasonEnum.InvalidResponse,floorPriceFactorIndex:n.floorPriceFactorIndex,partnerCustomHeaders:"",partnerReason:l.PartnerNoBidReasonEnum.Unknown,requestedFloorPrice:n.requestedFloorPrice,syncedUser:n.syncedUser},r,t));const o=this.ew(n,r,t,i.callingState);o&&e.bids.push(o)})),n.noBids.forEach((i=>{e.noBids.push(this.iw(i,r,t))}))})),e}Kx(t){return{}}tw(t,i){var e;return xi(t.adType,null===(e=t.nonlinearLineItemSettings)||void 0===e?void 0:e.nonLinearRequestType)&&(!i.height||!i.width)}iw(t,i,e){var s;const n=null===(s=this.Jx.get(i.protoLineItem.advertiserLineItemId))||void 0===s?void 0:s.predictedFloorPrice;return{lineItem:i,requestMetadata:new Gs({requestedFloorPrice:t.requestedFloorPrice,requestedFloorPriceIndex:t.floorPriceFactorIndex,requestNumber:i.historicalMetrics.requestNumber,syncedUser:t.syncedUser,partnerCustomHeaders:t.partnerCustomHeaders,partnerReason:t.partnerReason,requestTrackingHandledByServer:!0,predictedFloorPrice:n}),reason:t.connatixReason}}ew(t,i,e,s){var n;const r=t,h=this.rw(r,i),o=null===(n=this.Jx.get(i.protoLineItem.advertiserLineItemId))||void 0===n?void 0:n.predictedFloorPrice,a=new Gs({requestedFloorPrice:r.requestedFloorPrice,requestedFloorPriceIndex:r.floorPriceFactorIndex,syncedUser:r.syncedUser,requestNumber:i.historicalMetrics.requestNumber,encryptedPrice:r.encryptedPrice,dspId:r.dspId,rtbAdomain:r.adomain,rtbSeatId:r.seatId,rtbCampainId:r.campaignId,cnxBidId:r.cnxBidId,requestTrackingHandledByServer:!0,logAuctionInformation:r.logAuctionInformation,predictedFloorPrice:o,auctionBidId:r.auctionBidId,rtbRequestId:r.rtbRequestId,liveRampAts:r.liveRampAts,floorPriceFactor:r.floorPriceFactor,floorPriceBypassReason:r.floorPriceBypassReason}),c=Ms(),l={id:(0,pi.qs)(),adContainer:this.qx.get(i.protoLineItem.adType),adEnforcer:this.Wx,adManagerLineItem:i,adSlotContainerRecycler:this.Gx,bidSlotId:c,callingState:s,globalDomUtilsService:this.yf.services.GlobalDomUtilsService,os:this.yf.config.os.os,replaceTrackingMacros:!0,requestMetadata:a,trackersInformation:h,urlSuffixerService:this.yf.services.UrlSuffixerService,viewabilityService:this.yf.services.ViewabilityService,creativeId:r.creativeId,interactionService:this.yf.services.InteractionService,obfuscatedPrice:r.gtkpbp,successRate:r.successRate,trackingService:this.yf.services.TrackingService};return this.hw(i.protoLineItem)?new Us(Object.assign(Object.assign({},l),{xml:r.vastTag,adMacroReplacer:this.Hx,pageUrl:this.yf.config.pageUrl})):new Zs(Object.assign(Object.assign({},l),{dimensions:{width:r.width,height:r.height},html:r.vastTag,mime:r.mime}))}hw(t){var i;return t.adType===l.ProtoAdType.Nonlinear&&(null===(i=t.nonlinearLineItemSettings)||void 0===i?void 0:i.nonLinearRequestType)===l.ProtoNonlinearRequestType.Video||t.adType===l.ProtoAdType.Video}rw(t,i){const e=new Di;ji(i.protoLineItem.trackers,e);const s=[...t.billingNoticeUrlList,t.adQualityCheckUrl].filter((t=>(0,dt.QM)(t))).map((t=>Vi(t)));return e.adImpression.push(...s),(0,dt.QM)(t.winNoticeUrl)&&e.adWin.push(Vi(t.winNoticeUrl)),e}ow(t,i){if(t.protoLineItem.adType!==l.ProtoAdType.Overlay)return null;const e=i.adContainerState.get(l.ProtoAdType.Video),s=i.adContainerState.get(l.ProtoAdType.Overlay);return e.height!==s.height||e.width!==s.width?{width:s.width,height:s.height}:void 0}aw(t,i){const e={};return t.filter((t=>this.cw(t))).forEach((t=>{const s=t.adManagerLineItem,n=this.ow(s,i);let r;this.Jx.has(s.protoLineItem.advertiserLineItemId)&&(r=this.Jx.get(s.protoLineItem.advertiserLineItemId));const h=this.lw(s);e[s.protoLineItem.advertiserLineItemId]=Object.assign({availableRequests:t.maxAvailableRequests,gdprConsent:this.yf.services.UserManagerService.isConsent(s.protoLineItem.vendorId),cachedFloorPrice:null==r?void 0:r.cachedFloorPrice,predictedFloorPrice:null==r?void 0:r.predictedFloorPrice,publisherLineItemId:s.protoLineItem.publisherLineItemId,slotHeight:null==n?void 0:n.height,slotWidth:null==n?void 0:n.width,requestNumber:s.historicalMetrics.requestNumber},h)})),e}lw(t){const i=bi({playerSkippability:this.Ux.skippability,playerSkipMin:this.Ux.skipMin,playerSkipAfter:this.Ux.skipAdAfter,lineItemSkippability:t.protoLineItem.skippability,lineItemSkipMin:t.protoLineItem.skipMin}),e=i.skippable?l.ProtoSkipEnabledEnum.Yes:l.ProtoSkipEnabledEnum.No;return Object.assign(Object.assign({},i),{skip:e})}cw(t){return!!t.adManagerLineItem.protoLineItem.forceCallingInEveryAO||this.zx.shouldRequestLineItem(t.adManagerLineItem.protoLineItem.advertiserLineItemId)}Yx(t){const{width:i,height:e,viewability:s}=t.callingState,{playerWidth:n,playerHeight:r}=this.yf.services.TrackingService.getPlayerSize();return{metadata:this.yf.services.TrackingService.getMetadataModel(),gdprCompliant:this.yf.services.UserManagerService.isGDPR(),gdprConsentData:this.yf.services.UserManagerService.getConsentPayload(),soundOn:t.callingState.sound,videoHeight:e,videoWidth:i,testMode:"true"===(0,Ks.Ph)("cnxRtbTest",this.yf.config.pageUrl),explorationMode:this.yf.config.explorationMode,viewability:s,outstream:this.Nx,domainURL:this.yf.config.domainURL,isClickToPlay:t.callingState.clickToPlay,appVersion:this.yf.config.appVersion,deviceID:this.yf.services.UserManagerService.getDeviceId(),isCcpaBlockingUserInfo:!this.yf.services.UserManagerService.isSellUserAllowed(),usPrivacyString:this.yf.services.UserManagerService.getUsPrivacyString(),gdprConsentMode:this.yf.services.UserManagerService.gdprConsentMode,customMacros:this.yf.services.MacrosService.getExtraMacros(),maxAdDuration:t.maxAdDuration,lineItems:this.aw(t.lineItemRequestDataList,t.callingState),maxBidPrice:t.maxBidPrice,playerWidth:n,playerHeight:r,useNewSkippability:!0,liveRampAtsEnvelope:this.yf.services.UserManagerService.identityEnvelope}}Xx(t){return qs.n.sendProtoRequest({endpoint:$s.n.endPoints.api.rtb,ProtoRequest:l.ProtoRtbRequest,ProtoResponse:l.ProtoRtbResponse,requestData:t,queryParams:Object.assign({[Js.Fk]:i.g.version},tn.f.getCidKeyValueObject()),logError:!1})}Qx(t,i){return 0!==t&&0!==i||((0,s.n)({message:"AdManager_BidderCaller_dimensions",exception:`width:${t}_height:${i}_destroyed:${_.S.playerDestroyed}`,level:s.D.CRITICAL},{throttle:5}),!1)}}var nn;!function(t){t.AppNexus="appnexus",t.DistrictM="districtm",t.IndexExchange="ix",t.OneVideo="oneVideo",t.OpenX="openx",t.Pubmatic="pubmatic",t.RhythmOne="rhythmone",t.Rubicon="rubicon",t.SpotX="spotx",t.Telaria="telaria",t.MediaNet="medianet",t.Adman="adman",t.SynacorMedia="synacormedia",t.Undertone="undertone",t.AmxRTB="amx",t.Smaato="smaato",t.SmartAdServer="smartadserver",t.TheMediaGrid="grid",t.Rise="rise",t.YahooSSP="yahoossp",t.Unruly="unruly",t.Kargo="kargo",t.SmileWanted="smilewanted",t.TrustX="trustx",t.EmxDigital="emx_digital",t.KrushMedia="krushmedia"}(nn||(nn={}));const rn=(t,i)=>{try{const e=JSON.parse(t);return e.length>1&&(0,s.n)({message:"AdManager_AdSourceWrappe_multiple_bidders",level:s.D.WARN,callStack:i,exception:t},{throttle:1,sendMaxLog:!1}),e[0].bidder}catch(e){(0,s.n)({message:"AdManager_AdSourceWrapper_cannot_get_bidder",level:s.D.WARN,callStack:i,exception:t},{throttle:2,sendMaxLog:!1})}},hn=1,on=["video/mp4","video/webm","application/javascript","video/ogg","video/mpeg"],an={VAST_1:1,VAST_2:2,VAST_3:3,VAST_1_WRAPPER:4,VAST_2_WRAPPER:5,VAST_3_WRAPPER:6,VAST_4:7,VAST_4_WRAPPER:8},cn={VPAID_1:1,VPAID_2:2},ln=[an.VAST_2_WRAPPER,an.VAST_2,an.VAST_3,an.VAST_3_WRAPPER],un=[cn.VPAID_1,cn.VPAID_2],dn=(t,i,e,s,n)=>{const{skip:r,skippable:h,skipmin:o,skipafter:a}=n;return{video:{playerSize:[Math.floor(t),Math.floor(i)],context:e?"outstream":"instream",mimes:on,protocols:ln,linearity:hn,api:un,frameworks:[cn.VPAID_1,cn.VPAID_2],maxduration:s,minDuration:0,skip:r,skippable:h,skipmin:o,skipafter:a}}},pn="https://prebid.adnxs.com/pbc/v1/cache",fn=()=>({cmpApi:"iab",timeout:2e3,defaultGdprScope:!0,allowAuctionWithoutConsent:!1,rules:[{purpose:"storage",enforcePurpose:!0,enforceVendor:!0},{purpose:"basicAds",enforcePurpose:!0,enforceVendor:!0},{purpose:"measurement",enforcePurpose:!0,enforceVendor:!0}]}),mn=()=>({cmpApi:"iab",timeout:2e3});var gn;!function(t){t.CACHE_ID="CACHE_ID"}(gn||(gn={}));var vn;!function(t){t.Banner="banner",t.Video="video",t.All="all"}(vn||(vn={}));const yn=(t,i,e,s)=>{const n=Object.assign(Object.assign(Object.assign(Object.assign({usePrebidCache:!0},{userSync:{syncEnabled:!0,iframeEnabled:!0,pixelEnabled:!0,filterSettings:{iframe:{bidders:"*",filter:"include"},image:{bidders:"*",filter:"include"}},syncsPerBidder:0,syncDelay:3e3,auctionDelay:0,aliasSyncEnabled:!0,userIds:[{name:"criteo"},{name:"pubCommonId",params:{enableSharedId:!0},storage:{type:"cookie",name:"_pubcid",expires:180}},{name:"flocId",params:{token:"A3dHTSoNUMjjERBLlrvJSelNnwWUCwVQhZ5tNQ+sll7y+LkPPVZXtB77u2y7CweRIxiYaGwGXNlW1/dFp8VMEgIAAAB+eyJvcmlnaW4iOiJodHRwczovL3NoYXJlZGlkLm9yZzo0NDMiLCJmZWF0dXJlIjoiSW50ZXJlc3RDb2hvcnRBUEkiLCJleHBpcnkiOjE2MjYyMjA3OTksImlzU3ViZG9tYWluIjp0cnVlLCJpc1RoaXJkUGFydHkiOnRydWV9"}},{name:"uid2"}]}}),{ix:{timeout:900}}),{targetingControls:{addTargetingKeys:[gn.CACHE_ID]}}),{yahoossp:{mode:vn.Video}});return(0,dt.QM)(s)&&(n.pageUrl=s),n.usePrebidCache&&(n.cache={url:pn}),e&&(n.schain=(t=>({validation:"strict",config:{ver:"1.0",complete:1,nodes:[{asi:t.businessDomain,hp:1,sid:(0,dt.QM)(t.supplyChainId)?t.supplyChainId:null}]}}))(e)),(t||i)&&(n.consentManagement=((t,i)=>t?{gdpr:fn()}:i?{usp:mn()}:{})(t,i)),n};class bn{constructor(t){this.yr=t,this.ly=new _s(this.yr)}loadPrebidJs(t){return new Promise(((i,e)=>{if(this.uw)return i(this.uw);this.insertPrebidJs().then((e=>{this.uw=e,this.uw.setConfig(t),i(e)})).catch((t=>e(t)))}))}insertPrebidJs(){return new Promise(((t,i)=>{this.ly.loadIframe({customHead:"<style> html, body {display: none}</style>",customHtml:`<script id='cnx-prebid-loader' type='text/javascript' src='${$s.n.endPoints.assets.plugins.prebidScript}'><\/script>`,customIframeAttributes:[{key:"class",value:"cnx-prebid-loader"}],container:this.yr.querySelector("body"),visible:!1}).then((e=>{if(e.iframe.contentWindow.pbjs)return t(e.iframe.contentWindow.pbjs);i(new Error("pbjs could not be found on the iframe window"))})).catch((t=>{i(t)}))}))}}class xn{get config(){return this.dw}}const wn={[nn.AppNexus]:new class extends xn{constructor(){super(...arguments),this.dw={vendorId:32,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t),{floorPrice:s,skippabilitySettings:{skip:n,skipafter:r}}=i;return(0,dt.r)(s)&&(e.reserve=s),e.video=Object.assign(Object.assign({},e.video),{skippable:!!n,skipoffset:r}),e}},[nn.DistrictM]:new class extends xn{constructor(){super(...arguments),this.dw={vendorId:144,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t),{floorPrice:s,skippabilitySettings:{skip:n,skipafter:r}}=i;return(0,dt.r)(s)&&(e.reserve=s),e.video=Object.assign(Object.assign({},e.video),{skippable:!!n,skipoffset:r}),e}},[nn.IndexExchange]:new class extends xn{constructor(){super(...arguments),this.dw={vendorId:10,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=t.siteId,{playerWidth:n,playerHeight:r,maxDuration:h,floorPrice:o,lineItemId:a}=i;if(!(0,dt.QM)(e))return void(0,s.n)({level:s.D.CRITICAL,message:"PrebidJS_IX_adapter_missing_siteId",callStack:a});const c={siteId:e,size:[Math.floor(n),Math.floor(r)],video:{mimes:on,minduration:0,maxduration:h,protocols:Object.keys(an).map((t=>an[t]))}};return(0,dt.kE)(t.minduration)&&(c.video.minduration=t.minduration),(0,dt.kE)(t.maxduration)&&t.maxduration<=h&&(c.video.maxduration=t.maxduration),(0,dt.QM)(t.id)&&(c.id=t.id),(0,dt.r)(o)&&(c.bidFloor=o,c.bidFloorCur="USD"),c}},[nn.OneVideo]:new class extends xn{constructor(){super(...arguments),this.dw={vendorId:25,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){(0,dt.QM)(t.pubId)||(0,s.n)({message:"AdManager_HeaderBidder_OneVideo_pubId_missing",level:s.D.CRITICAL},{throttle:2,sendMaxLog:!1});const{playerWidth:e,playerHeight:n,pageUrl:r,floorPrice:h}=i,o=Object.assign(Object.assign({},t),{pubId:t.pubId,video:{playerWidth:Math.floor(e),playerHeight:Math.floor(n),mimes:on,protocols:ln,api:un},site:{page:r}});return(0,dt.r)(h)&&(o.bidfloor=h),o}},[nn.OpenX]:new class extends xn{constructor(){super(...arguments),this.dw={vendorId:69,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t),{floorPrice:s,skippabilitySettings:n}=i,r=!!n.skip;return e.video=Object.assign(Object.assign({},e.video),{skippable:r}),(0,dt.r)(s)&&(e.customFloor=s),e}},[nn.Pubmatic]:new class extends xn{constructor(){super(...arguments),this.dw={vendorId:76,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t),s=i.floorPrice;(0,dt.r)(s)&&(e.kadfloor=String(s));const n=e.dctr;if((0,dt.$K)(n)){const t=[];Object.keys(n).forEach((i=>{t.push(`${i}=${n[i]}`)})),e.dctr=t.join("|")}return e}},[nn.RhythmOne]:new class extends xn{constructor(){super(...arguments),this.dw={vendorId:36,gdprSupport:!0,ccpaSupport:!1}}getBidParams(t,i){return(0,dt.QM)(t.placementId)||(0,s.n)({level:s.D.CRITICAL,message:"PrebidJS_RhythmOne_adapter_missing_placementId",callStack:i.lineItemId}),t}},[nn.Rubicon]:new class extends xn{constructor(){super(...arguments),this.dw={vendorId:52,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t),s=i.floorPrice;return(0,dt.r)(s)&&(e.floor=s),e}},[nn.SpotX]:new class extends xn{constructor(){super(...arguments),this.dw={vendorId:165,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t),{floorPrice:s,isOutstream:n,bidSlotId:r}=i;return e.hide_skin=!0,(0,dt.r)(s)&&(e.price_floor=s),n&&(e.outstream_options={slot:r}),e}},[nn.Telaria]:new class extends xn{constructor(){super(...arguments),this.dw={vendorId:202,gdprSupport:!0,ccpaSupport:!1}}getBidParams(t,i){const e=Object.assign({},t);return t.srcPageUrl||(e.srcPageUrl=i.pageUrl),e}},[nn.MediaNet]:new class extends xn{constructor(){super(...arguments),this.dw={vendorId:142,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t),{playerWidth:n,playerHeight:r,maxDuration:h,lineItemId:o,floorPrice:a}=i;return(0,dt.QM)(e.cid)||(0,s.n)({level:s.D.CRITICAL,message:"PrebidJS_MediaNet_adapter_missing_cid",callStack:o}),(0,dt.QM)(e.crid)||(0,s.n)({level:s.D.CRITICAL,message:"PrebidJS_MediaNet_adapter_missing_crid",callStack:o}),(0,dt.r)(a)&&(e.bidFloor=a),e.video={api:Object.keys(cn).map((t=>cn[t])),mimes:Object.keys(on).map((t=>on[t])),protocols:Object.keys(an).map((t=>an[t])),maxDuration:h,w:Math.floor(n),h:Math.floor(r)},e}},[nn.Adman]:new class extends xn{constructor(){super(...arguments),this.dw={vendorId:149,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t),{lineItemId:n,floorPrice:r}=i;return(0,dt.QM)(e.placementId)||(0,s.n)({level:s.D.CRITICAL,message:"PrebidJS_Adman_adapter_missing_placementId",callStack:n}),(0,dt.r)(r)&&(e.bidfloor=r),e}},[nn.SynacorMedia]:new class extends xn{constructor(){super(...arguments),this.dw={vendorId:void 0,gdprSupport:!1,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t);(0,dt.QM)(e.seatId)||(0,s.n)({level:s.D.CRITICAL,message:"PrebidJS_SynacorMedia_adapter_missing_seatId",callStack:i.lineItemId}),(0,dt.QM)(e.tagId)||(0,s.n)({level:s.D.CRITICAL,message:"PrebidJS_SynacorMedia_adapter_missing_tagId",callStack:i.lineItemId});const{floorPrice:n,maxDuration:r}=i;return(0,dt.r)(n)&&(e.bidfloor=n),e.video={api:Object.keys(cn).map((t=>cn[t])),mimes:Object.keys(on).map((t=>on[t])),protocols:Object.keys(an).map((t=>an[t])),maxduration:r},e}},[nn.Undertone]:new class extends xn{constructor(){super(...arguments),this.dw={vendorId:677,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t);return(0,dt.QM)(e.placementId)||(0,s.n)({level:s.D.CRITICAL,message:"PrebidJS_Undertone_adapter_missing_placementId",callStack:i.lineItemId}),(0,dt.kE)(e.publisherId)||(0,s.n)({level:s.D.CRITICAL,message:"PrebidJS_Undertone_adapter_missing_publisherId",callStack:i.lineItemId}),e.video=Object.assign(Object.assign({},e.video),{skippable:!!i.skippabilitySettings.skip}),e}},[nn.AmxRTB]:new class extends xn{constructor(){super(...arguments),this.dw={vendorId:737,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t),s=i.floorPrice;return(0,dt.r)(s)&&(e.floor=s),e}},[nn.Smaato]:new class extends xn{constructor(){super(...arguments),this.dw={vendorId:82,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t),{lineItemId:n}=i;return(0,dt.QM)(e.publisherId)||(0,s.n)({level:s.D.CRITICAL,message:"PrebidJS_Smaato_adapter_missing_publisherId",callStack:n}),(0,dt.QM)(e.adspaceId)||(0,s.n)({level:s.D.CRITICAL,message:"PrebidJS_Smaato_adapter_missing_adspaceId",callStack:n}),e}},[nn.SmartAdServer]:new class extends xn{constructor(){super(...arguments),this.dw={vendorId:18,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t),{floorPrice:n,lineItemId:r}=i;(0,dt.r)(n)&&(e.bidfloor=n);const h=Object.assign(Object.assign({},t.video),{protocol:an.VAST_3_WRAPPER});return e.video=h,(0,dt.r)(e.networkId)||(0,s.n)({level:s.D.CRITICAL,message:"PrebidJS_SmartAdServer_adapter_missing_networkId_integer",callStack:r}),(0,dt.r)(e.formatId)||(0,s.n)({level:s.D.CRITICAL,message:"PrebidJS_SmartAdServer_adapter_missing_formatId_integer",callStack:r}),(0,dt.r)(e.pageId)||(0,s.n)({level:s.D.CRITICAL,message:"PrebidJS_SmartAdServer_adapter_missing_pageId_integer",callStack:r}),(0,dt.r)(e.siteId)||(0,s.n)({level:s.D.CRITICAL,message:"PrebidJS_SmartAdServer_adapter_missing_siteId_integer",callStack:r}),e}},[nn.TheMediaGrid]:new class extends xn{constructor(){super(...arguments),this.dw={vendorId:686,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t),{floorPrice:n}=i;return(0,dt.r)(n)&&(e.bidFloor=n),(0,dt.r)(e.uid)||(0,s.n)({level:s.D.CRITICAL,message:"PrebidJS_TheMediaGrid_adapter_missing_uid_integer",callStack:i.lineItemId}),e}},[nn.Rise]:new class extends xn{constructor(){super(...arguments),this.dw={vendorId:1043,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t),{lineItemId:n,floorPrice:r}=i;return(0,dt.QM)(e.org)||(0,s.n)({level:s.D.CRITICAL,message:"PrebidJS_Rise_adapter_missing_org",callStack:n}),(0,dt.r)(r)&&(e.floorPrice=r),e}},[nn.YahooSSP]:new class extends xn{constructor(){super(...arguments),this.dw={vendorId:25,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){let e=Object.assign({},t);const n=e.bidOverride||{},r=n.imp||{},h=(0,dt.QM)(e.pos)&&(0,dt.QM)(e.dcn),o=(0,dt.QM)(e.pubId);return h||o||(0,s.n)({level:s.D.CRITICAL,message:"PrebidJS_YahooSSP_adapter_missing_required_fields",callStack:i.lineItemId}),(0,dt.r)(i.floorPrice)&&(e=Object.assign(Object.assign({},e),{bidOverride:Object.assign(Object.assign({},n),{imp:Object.assign(Object.assign({},r),{bidfloor:i.floorPrice})})})),e}},[nn.Unruly]:new class extends xn{constructor(){super(...arguments),this.dw={vendorId:36,gdprSupport:!1,ccpaSupport:!1}}getBidParams(t,i){const e=Object.assign({},t);return(0,dt.kE)(e.siteId)||(0,s.n)({level:s.D.CRITICAL,message:"PrebidJS_Unruly_adapter_missing_publisherId",callStack:i.lineItemId}),i.isOutstream&&(e.featureOverrides={canRunUnmissable:!0}),(0,dt.r)(i.floorPrice)&&(e.floor=i.floorPrice),e}},[nn.Kargo]:new class extends xn{constructor(){super(...arguments),this.dw={vendorId:972,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t);return(0,dt.QM)(e.placementId)||(0,s.n)({level:s.D.CRITICAL,message:"PrebidJS_Kargo_adapter_missing_placementId",callStack:i.lineItemId}),e}},[nn.SmileWanted]:new class extends xn{constructor(){super(...arguments),this.dw={vendorId:639,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t);return(0,dt.QM)(e.zoneId)||(0,s.n)({level:s.D.CRITICAL,message:"PrebidJS_SmileWanted_adapter_missing_zoneId",callStack:i.lineItemId}),(0,dt.r)(i.floorPrice)&&(e.bidfloor=i.floorPrice),e}},[nn.TrustX]:new class extends xn{constructor(){super(...arguments),this.dw={vendorId:void 0,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t);return(0,dt.kE)(e.uid)||(0,s.n)({level:s.D.CRITICAL,message:"PrebidJS_TrustX_adapter_missing_uid",callStack:i.lineItemId}),(0,dt.r)(i.floorPrice)&&(e.bidFloor=i.floorPrice),e}},[nn.EmxDigital]:new class extends xn{constructor(){super(...arguments),this.dw={vendorId:183,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t);return(0,dt.QM)(e.tagid)||(0,s.n)({level:s.D.CRITICAL,message:"PrebidJS_EmxDigital_adapter_missing_tagid",callStack:i.lineItemId}),(0,dt.r)(i.floorPrice)&&(e.bidfloor=i.floorPrice.toString()),e}},[nn.KrushMedia]:new class extends xn{constructor(){super(...arguments),this.dw={vendorId:void 0,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t);return(0,dt.QM)(e.key)||(0,s.n)({level:s.D.CRITICAL,message:"PrebidJS_KrushMedia_adapter_missing_key",callStack:i.lineItemId}),(0,dt.r)(i.floorPrice)&&(e.bidfloor=i.floorPrice),e}}};class _n{constructor(t,i,e,s,n,r,h,o){this.pw=t,this.Fe=i,this.Nx=e,this.fw=s,this.mw=n,this.yr=r,this.gw=h,this.yw=o,this.bw=new bn(this.yr)}requestHeaderBidder(t,i,e){return new Promise(((s,n)=>{this.xw().then((n=>{const r=t.map((t=>this.ww(n,t,i,e).then((t=>t))));Promise.all(r).then((t=>{s(t)}))})).catch((t=>{n(l.ConnatixNoBidReasonEnum.NoBid)}))}))}Sw(t,i){const e={lineItemSkippability:t,lineItemSkipMin:i,playerSkippability:this.gw.skippability,playerSkipMin:this.gw.skipMin,playerSkipAfter:this.gw.skipAdAfter},s=bi(e),n=s.skippable?1:0;return Object.assign({skip:n},s)}ww(t,i,e,s){return new Promise((n=>{let r=[];if(i.availableRequests>0){const n=i.lineItem.floorPriceData.map((t=>t.price));if((0,f.BZ)(n)){r=this.Aw(i.lineItem.floorPriceData,i.availableRequests,i.maxBidPrice).map((r=>this.Pw(t,i.lineItem,r,e,s,n,i.maxAdDuration)))}else{const h={floorPrice:i.lineItem.floorPrice,floorPriceIndex:-1,floorPriceFactor:null,floorPriceBypassReason:l.FloorPriceBypassReasonEnum.FixedCpm},o=this.Pw(t,i.lineItem,h,e,s,n,i.maxAdDuration);r.push(o)}}Promise.all(r).then((t=>{const e=[],s=[],r=i.lineItem.advertiserLineItemId;t.forEach((t=>{t.reason?s.push(t):e.push(t)}));n({bids:e,noBids:s,lineItemId:r})}))}))}Pw(t,i,e,s,n,r,h){return new Promise((o=>{this.Iw(t,i,e,s,n,r,h).then((t=>{o(t)})).catch((t=>{o(t)}))}))}xw(){const t=yn(this.fw,this.mw,this.pw,this.Fe);return new Promise(((i,e)=>{this.bw.loadPrebidJs(t).then((t=>{i(t)})).catch((t=>{(0,s.n)({message:"AdManager_HeaderBidder_unable_to_load_prebidJs_script",exception:t.message,callStack:t.stack,level:s.D.CRITICAL}),e(t)}))}))}Iw(t,i,e,n,r,h,o){return new Promise(((a,c)=>{const u=this.Sw(i.skippability,i.skipMin),d=rn(i.headerBidderBids,i.advertiserLineItemId),p=((t,i,e,s,n,r,h)=>{const o={code:(0,pi.qs)(),mediaTypes:dn(t,i,e,s,r),bids:[]};return e||h!==nn.Smaato||(o.mediaTypes.video.startdelay=0),(0,dt.r)(n)&&(o.floors=(t=>({currency:"USD",schema:{fields:["mediaType"]},values:{video:t}}))(n)),o})(n,r,this.Nx,o,e.floorPrice,u,d);try{const t=this.yw.replaceMacrosInJsonString(i.headerBidderBids);p.bids=JSON.parse(t)}catch(t){return(0,s.n)({message:"AdManager_HeaderBidder_unable_to_parse_header_bidder",exception:t.message,callStack:t.stack,level:s.D.WARN}),void c({bidderName:d,reason:l.ConnatixNoBidReasonEnum.NoBid,floorPrice:e.floorPrice,floorPriceIndex:e.floorPriceIndex})}const f=Ms();p.bids.forEach((t=>this.kw(t,n,r,e.floorPrice,i.advertiserLineItemId,o,f,u))),t.que.push((()=>{t.addAdUnits(p);const n={timeout:i.headerBidderTimeout,adUnits:[p],bidsBackHandler:()=>{try{const n=t.getHighestCpmBids(p.code)[0];if(!n)return void c({bidderName:d,reason:l.ConnatixNoBidReasonEnum.CsEmptyResponse,floorPrice:e.floorPrice,floorPriceIndex:e.floorPriceIndex});let r,o;if(this.Cw(n))r=(t=>`${pn}?uuid=${t.adserverTargeting.hb_cache_id}`)(n);else if(r=n.vastUrl,o=n.vastXml,!r&&!o)return(0,s.n)({level:s.D.WARN,message:"AdManager_HeaderBidder_no_content",exception:JSON.stringify(n)}),void c({bidderName:d,reason:l.ConnatixNoBidReasonEnum.CsInvalidResponse,floorPrice:e.floorPrice,floorPriceIndex:e.floorPriceIndex});const u=n.cpm||n.adResponse.ad.cpm,{advertiserLineItemId:m}=i,g=Object.assign(Object.assign({},e),{bidderName:d,adTagUrl:r,adTagXml:o,lineItemId:m,cpm:u,slotId:f,bidId:p.code});(0,dt.r)(e.floorPrice)&&u<e.floorPrice&&(0,s.n)({message:"AdManager_HeaderBidderRequester_cpm_lower_than_floorprice",level:s.D.WARN,exception:`floorPrices_${h}_index_${e.floorPriceIndex}_floorPrice_${e.floorPrice}_cpm_${u}_li_${i.advertiserLineItemId}`,callStack:rn(i.headerBidderBids,i.advertiserLineItemId)},{sendMaxLog:!1,throttle:5}),a(g)}catch(t){(0,s.n)({level:s.D.WARN,message:"AdManager_HeaderBidder_Prebidjs_error",exception:t.message,callStack:t.stack}),c({bidderName:d,reason:l.ConnatixNoBidReasonEnum.NoBid,floorPrice:e.floorPrice,floorPriceIndex:e.floorPriceIndex})}}};t.requestBids(n)}))}))}kw(t,i,e,s,n,r,h,o){const a=wn[t.bidder].getBidParams;a&&(t.params=a(t.params,{playerWidth:i,playerHeight:e,maxDuration:r,pageUrl:this.Fe,floorPrice:s,lineItemId:n,isOutstream:this.Nx,bidSlotId:h,skippabilitySettings:o}))}Cw(t){return t.adserverTargeting&&(0,dt.QM)(t.adserverTargeting.hb_cache_id)}Aw(t,i,e){if(0===i)return[];let s=i;const n=t.map(((t,i)=>({floorPrice:t.price,floorPriceIndex:i,floorPriceFactor:t.factor,floorPriceBypassReason:null}))).filter((({floorPrice:t})=>t>=e&&s>0&&(s--,!0)));return n.length||n.push({floorPrice:e,floorPriceIndex:-1,floorPriceFactor:null,floorPriceBypassReason:l.FloorPriceBypassReasonEnum.BidInHand}),n}}var Sn=o(7432);class An{constructor(t){this.th=t}isAdapterCallable(t){const i=(t=>{const i=Object.keys(nn).find((i=>nn[i]===t));if(i)return nn[i]})(t);return!!i&&(this.th.isGDPR()?this.Tw(i):!this.th.isCcpaApplicable()||this.Mw(i))}Ew(t){return wn[t].config.gdprSupport}Tw(t){if(this.Ew(t))return!0;const i=wn[t].config.vendorId,e=(0,dt.kE)(i)?`${i}`:"";return this.th.isConsent(e,Sn.Z)}Mw(t){return!!wn[t].config.ccpaSupport||!!this.th.isSellUserAllowed()}}class Pn{constructor(t,i,e,s,n,r,h,o,a){this.Nx=t,this.pw=i,this.yf=e,this.Hx=s,this.qx=n,this.Wx=r,this.Gx=h,this._b=o,this.gw=a,this.Bw=new Map,this.Ow=new _n(this.pw,this.yf.config.pageUrl,this.Nx,this.yf.services.UserManagerService.isGDPR(),this.yf.services.UserManagerService.isCcpaApplicable(),this.yf.services.GlobalDomUtilsService,this.gw,this.yf.services.MacrosService),this.Lw=new An(this.yf.services.UserManagerService)}request(t){const{width:i,height:e}=t.callingState,s=this.Qx(i,e),n=this.Rw(t.lineItemRequestDataList);return(0,f.BZ)(n)&&s?(t.lineItemRequestDataList=n,this.Dw(t).then((i=>Promise.resolve(this.jw(i,t)))).catch((()=>Promise.resolve({bids:[],noBids:[]})))):Promise.resolve({bids:[],noBids:[]})}destroy(){}jw(t,i){const e={bids:[],noBids:[]};return t.forEach((t=>{const s=yi(i.lineItemRequestDataList,t.lineItemId);t.bids.forEach((t=>{const n=t.bidId,r=new Di,h=new Gs({requestedFloorPrice:t.floorPrice,requestedFloorPriceIndex:t.floorPriceIndex,prebidJsBidderName:t.bidderName,requestNumber:s.historicalMetrics.requestNumber,predictedFloorPrice:s.protoLineItem.predictedFloorPrice,floorPriceFactor:t.floorPriceFactor,floorPriceBypassReason:t.floorPriceBypassReason});ji(s.protoLineItem.trackers,r),t.adTagUrl?e.bids.push(new Ws({id:n,adManagerLineItem:s,replaceTrackingMacros:!0,requestMetadata:h,trackersInformation:r,url:t.adTagUrl,callingState:i.callingState,adMacroReplacer:this.Hx,adContainer:this.qx.get(s.protoLineItem.adType),globalDomUtilsService:this.yf.services.GlobalDomUtilsService,viewabilityService:this.yf.services.ViewabilityService,trackingService:this.yf.services.TrackingService,cpm:t.cpm,adEnforcer:this.Wx,os:this.yf.config.os.os,adSlotContainerRecycler:this.Gx,bidSlotId:t.slotId,loopAdWhenFinished:this._b,pageUrl:this.yf.config.pageUrl,urlSuffixerService:this.yf.services.UrlSuffixerService})):t.adTagXml&&e.bids.push(new Us({id:n,adManagerLineItem:s,replaceTrackingMacros:!0,requestMetadata:h,trackersInformation:r,xml:t.adTagXml,callingState:i.callingState,adMacroReplacer:this.Hx,adContainer:this.qx.get(s.protoLineItem.adType),globalDomUtilsService:this.yf.services.GlobalDomUtilsService,viewabilityService:this.yf.services.ViewabilityService,trackingService:this.yf.services.TrackingService,cpm:t.cpm,adEnforcer:this.Wx,os:this.yf.config.os.os,adSlotContainerRecycler:this.Gx,bidSlotId:t.slotId,loopAdWhenFinished:this._b,pageUrl:this.yf.config.pageUrl,urlSuffixerService:this.yf.services.UrlSuffixerService}))})),t.noBids.forEach((t=>{const i=new Gs({requestedFloorPrice:t.floorPrice,requestedFloorPriceIndex:t.floorPriceIndex,requestNumber:s.historicalMetrics.requestNumber,predictedFloorPrice:s.protoLineItem.predictedFloorPrice,prebidJsBidderName:t.bidderName});e.noBids.push({lineItem:s,requestMetadata:i,reason:t.reason})}))})),e}Dw(t){const{width:i,height:e}=t.callingState,s=t.lineItemRequestDataList.map((i=>this.Vw(i,t.maxAdDuration,t.maxBidPrice)));return this.Ow.requestHeaderBidder(s,i,e)}Vw(t,i,e){const s=t.adManagerLineItem;return{availableRequests:t.maxAvailableRequests,lineItem:s.protoLineItem,maxAdDuration:i,maxBidPrice:e}}Rw(t){return t.filter((t=>{const i=this.Fw(t.adManagerLineItem);return this.Bw.has(t.adManagerLineItem)||this.Bw.set(t.adManagerLineItem,i),this.$w(i)}))}Qx(t,i){return 0!==t&&0!==i||((0,s.n)({message:"AdManager_PrebidAggregator_dimensions",exception:`width:${t}_height:${i}_destroyed:${_.S.playerDestroyed}`,level:s.D.CRITICAL},{throttle:5}),!1)}$w(t){return this.Lw.isAdapterCallable(t)}Fw(t){const i=this.Bw.get(t);return(0,dt.QM)(i)?i:rn(t.protoLineItem.headerBidderBids,t.protoLineItem.advertiserLineItemId)||""}}var In,kn=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function h(t){try{a(s.next(t))}catch(t){r(t)}}function o(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(h,o)}a((s=s.apply(t,i||[])).next())}))};class Cn{constructor(t){this.yf=t}callCoreTam(t){return kn(this,void 0,void 0,(function*(){const i=t.map((t=>{const i={lineItemId:t.lineItemId,code:t.coreTamCode,metadata:this.yf.services.TrackingService.getMetadataModel(),exploration:this.yf.config.explorationMode};return this.Nw(i)}));return Promise.all(i)}))}Nw(t){return kn(this,void 0,void 0,(function*(){try{const e=yield qs.n.sendProtoRequest({endpoint:$s.n.endPoints.api.tam,ProtoRequest:l.ProtoCoreTamBidRequest,ProtoResponse:l.ProtoCoreTamBidResponse,requestData:t,queryParams:{[Js.Fk]:i.g.version},logError:!0});return(0,dt.QM)(e.errorMessage)?{lineItemId:t.lineItemId,coreTamCode:t.code,coreTamBidResponse:null,rejectReason:l.ConnatixNoBidReasonEnum.RequestException}:(0,dt.QM)(e.encryptedBidPrice)?{lineItemId:t.lineItemId,coreTamCode:t.code,coreTamBidResponse:e,rejectReason:null}:{lineItemId:t.lineItemId,coreTamCode:t.code,coreTamBidResponse:null,rejectReason:l.ConnatixNoBidReasonEnum.InvalidResponse}}catch(i){return{lineItemId:t.lineItemId,coreTamCode:t.code,coreTamBidResponse:null,rejectReason:l.ConnatixNoBidReasonEnum.RequestException}}}))}}!function(t){t.SDK_NAME_ON_PUB_WINDOW="apstag",t.MEDIA_TYPE="video",t.VAST_TAG_BASE_URL="https://aax.amazon-adsystem.com/e/dtb/vast"}(In||(In={}));class Tn{constructor(t){this.Uw=t.amznbid,this.Hw=t.amzniid}static getTargetingFromBid(t){var i,e;return{amzniid:t.amzniid||(null===(i=t.targeting)||void 0===i?void 0:i.amzniid),amznbid:t.amznbid||(null===(e=t.targeting)||void 0===e?void 0:e.amznbid)}}static hasTargeting(t){const i=Tn.getTargetingFromBid(t);return(0,dt.QM)(i.amzniid)&&(0,dt.QM)(i.amznbid)}get amazonBidCode(){return this.Uw}getVast(){return`${In.VAST_TAG_BASE_URL}?b=${this.Hw}&pp=${this.Uw}&rnd=${(0,pi.qs)()}`}}class Mn{constructor(t){this.qw=t.targetingDeal,this.zw=t.targetingKey,this.Ww=t.targetingValue}static hasTargetings(t){const i=Mn.getTargetingsFromBid(t);return(0,f.BZ)(i)}static getTargetingsFromBid(t){const i=Mn.getDeals(t);return(0,f.BZ)(i)?i.map((i=>{const e=`${i}amzniid`;return{targetingDeal:i,targetingKey:e,targetingValue:t.targeting[e]}})).filter((t=>(0,dt.QM)(t.targetingValue))):[]}static getDeals(t){var i;return t.amzndeals||(null===(i=t.targeting)||void 0===i?void 0:i.amzndeals)}get targetingDeal(){return this.qw}get targetingKey(){return this.zw}get targetingValue(){return this.Ww}getVast(){return`${In.VAST_TAG_BASE_URL}?b=${this.Ww}&rnd=${(0,pi.qs)()}`}}class En{constructor(t){this.Uw=t.amznbid_sp,this.Hw=t.amzniid_sp}static getTargetingFromBid(t){var i,e;return{amzniid_sp:t.amzniid_sp||(null===(i=t.targeting)||void 0===i?void 0:i.amzniid_sp),amznbid_sp:t.amznbid_sp||(null===(e=t.targeting)||void 0===e?void 0:e.amznbid_sp)}}static hasTargeting(t){const i=En.getTargetingFromBid(t);return(0,dt.QM)(i.amzniid_sp)&&(0,dt.QM)(i.amznbid_sp)}get amazonBidCode(){return this.Uw}getVast(){return`${In.VAST_TAG_BASE_URL}?b=${this.Hw}&rnd=${(0,pi.qs)()}`}}class Bn{constructor(t,i){this.Gw=t,this.Qw=[],i.forEach((t=>{const i=class{static createObjects(t,i){const e=[];switch(t.creativeType){case l.ProtoCreativeTypeEnum.Tam:if(Tn.hasTargeting(i)){const t=Tn.getTargetingFromBid(i);e.push(new Tn(t))}break;case l.ProtoCreativeTypeEnum.TamDeal:if(Mn.hasTargetings(i)){const s=Mn.getTargetingsFromBid(i).filter((i=>i.targetingDeal===t.amazonDealId)).map((t=>new Mn(t)));e.push(...s)}break;case l.ProtoCreativeTypeEnum.TamPrivateAuction:if(En.hasTargeting(i)){const t=En.getTargetingFromBid(i);e.push(new En(t))}}return e}}.createObjects(this.Gw,t);this.Qw.push(...i)}))}get amazonBidList(){return this.Qw}get lineItem(){return this.Gw}get hasCoreTamDependency(){return this.Qw.every((t=>(0,dt.QM)(t.amazonBidCode)))}}var On=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function h(t){try{a(s.next(t))}catch(t){r(t)}}function o(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(h,o)}a((s=s.apply(t,i||[])).next())}))};const Ln="load";class Rn{constructor(t,i,e){this.yf=t,this.Yw=i,this.Xw=e,this.Zw=()=>{this.Kw||this.t_(),this.i_&&clearInterval(this.i_),this.Kw||(0,s.n)({message:"TamRequester_TAM_lib_not_found_on_page_loaded",level:s.D.WARN})};const n=this.yf.config.topWindow;this.e_=(0,pi.pE)(n).topFrame,this.t_()}requestBids(t){return this.n_(t)}destroy(){this.i_&&clearInterval(this.i_),this.e_.removeEventListener(Ln,this.Zw)}n_(t){return On(this,void 0,void 0,(function*(){try{const i=yield this.r_(),e=this.o_(t,i),s=yield this.a_(e);return this.c_(e,s)}catch(i){return this.l_(t,i)}}))}l_(t,i){return i.message?t.map((t=>({bids:[],lineItemId:t.advertiserLineItemId,noBids:[{reason:l.ConnatixNoBidReasonEnum.CsRequestException}]}))):t.map((t=>({bids:[],lineItemId:t.advertiserLineItemId,noBids:[{reason:i}]})))}c_(t,i){return t.map((t=>{const e=i.filter((i=>t.lineItem.advertiserLineItemId===i.lineItemId));return this.u_(t,e)}))}u_(t,i){return t.hasCoreTamDependency?this.d_(t,i):this.p_(t)}p_(t){const i=t.amazonBidList.map((i=>({encryptedPrice:null,vastTag:i.getVast(),ofskp:Ei(t.lineItem.floorPrice),successRate:t.lineItem.successRate,slotId:Ms()})));return(0,f.BZ)(i)?{bids:i,lineItemId:t.lineItem.advertiserLineItemId,noBids:[]}:{bids:[],lineItemId:t.lineItem.advertiserLineItemId,noBids:[{reason:l.ConnatixNoBidReasonEnum.NoBid}]}}d_(t,i){const e=i.map((i=>this.f_(t,i))).filter((t=>t.amazonBid&&!(0,dt.Cz)(t.coreTamRequestOutput.rejectReason,l.ConnatixNoBidReasonEnum))).map((t=>({encryptedPrice:t.coreTamRequestOutput.coreTamBidResponse.encryptedBidPrice,vastTag:t.amazonBid.getVast(),ofskp:t.coreTamRequestOutput.coreTamBidResponse.ofskp,successRate:t.coreTamRequestOutput.coreTamBidResponse.successRate,slotId:Ms()}))),s=i.filter((t=>t.rejectReason)).map((t=>({reason:t.rejectReason})));return(0,f.BZ)(e)||(0,f.BZ)(s)?{bids:e,noBids:s,lineItemId:t.lineItem.advertiserLineItemId}:{bids:[],lineItemId:t.lineItem.advertiserLineItemId,noBids:[{reason:l.ConnatixNoBidReasonEnum.NoBid}]}}f_(t,i){return{coreTamRequestOutput:i,amazonBid:t.amazonBidList.find((t=>t.amazonBidCode===i.coreTamCode))}}a_(t){return On(this,void 0,void 0,(function*(){const i=t.reduce(this.m_,[]);return this.g_(i)}))}m_(t,i){return[...t,...i.amazonBidList.filter((t=>t.amazonBidCode)).map((t=>({lineItemId:i.lineItem.advertiserLineItemId,coreTamCode:t.amazonBidCode})))]}o_(t,i){return t.map((t=>new Bn(t,i)))}g_(t){return this.Xw.callCoreTam(t)}r_(){return new Promise(((t,i)=>{this.Kw?this.Kw.fetchBids({slots:[{slotID:this.Yw,mediaType:In.MEDIA_TYPE}]},(e=>{(0,f.BZ)(e)?t(e):i(l.ConnatixNoBidReasonEnum.EmptyResponse)})):i(l.ConnatixNoBidReasonEnum.NoLibInPage)}))}t_(){const t=this.e_[In.SDK_NAME_ON_PUB_WINDOW];t?this.Kw=t:this.i_||"complete"!==this.e_.document.readyState&&(this.e_.addEventListener(Ln,this.Zw),this.i_=setInterval((()=>{this.t_()}),oi.s_)),this.Kw&&clearInterval(this.i_)}}class Dn{constructor(t,i,e,s,n,r){this.yf=t,this.v_=i,this.Hx=e,this.qx=s,this.Wx=n,this.Gx=r,this.y_=new Rn(this.yf,this.v_,new Cn(this.yf))}request(t){const{width:i,height:e}=t.callingState;return this.Qx(i,e)?this.b_(t).then((i=>Promise.resolve(this.x_(i,t)))).catch((()=>Promise.resolve({bids:[],noBids:[]}))):Promise.resolve({bids:[],noBids:[]})}destroy(){this.y_.destroy()}b_(t){const i=t.lineItemRequestDataList.map((t=>t.adManagerLineItem.protoLineItem));return this.y_.requestBids(i)}x_(t,i){const e={bids:[],noBids:[]};return t.forEach((t=>{const s=yi(i.lineItemRequestDataList,t.lineItemId);t.bids.forEach((t=>{const n=new Di,r=new Gs({encryptedPrice:t.encryptedPrice,requestNumber:s.historicalMetrics.requestNumber});ji(s.protoLineItem.trackers,n),e.bids.push(new Ws({id:(0,pi.qs)(),adManagerLineItem:s,replaceTrackingMacros:!0,requestMetadata:r,trackersInformation:n,url:t.vastTag,bidSlotId:t.slotId,callingState:i.callingState,adMacroReplacer:this.Hx,adContainer:this.qx.get(s.protoLineItem.adType),globalDomUtilsService:this.yf.services.GlobalDomUtilsService,viewabilityService:this.yf.services.ViewabilityService,trackingService:this.yf.services.TrackingService,adEnforcer:this.Wx,requestWithCredentials:!1,successRate:t.successRate,obfuscatedPrice:t.ofskp,os:this.yf.config.os.os,adSlotContainerRecycler:this.Gx,pageUrl:this.yf.config.pageUrl,urlSuffixerService:this.yf.services.UrlSuffixerService}))})),t.noBids.forEach((t=>{e.noBids.push({lineItem:s,requestMetadata:new Gs({requestNumber:s.historicalMetrics.requestNumber}),reason:t.reason})}))})),e}Qx(t,i){return 0!==t&&0!==i||((0,s.n)({message:"AdManager_PrebidAggregator_dimensions",exception:`width:${t}_height:${i}_destroyed:${_.S.playerDestroyed}`,level:s.D.CRITICAL},{throttle:5}),!1)}}const jn=[[88,31],[120,20],[120,30],[120,60],[120,90],[125,125],[168,28],[168,42],[180,150],[200,200],[200,446],[216,36],[216,54],[220,90],[234,60],[240,133],[250,250],[250,360],[292,30],[300,31],[300,50],[300,75],[300,100],[300,250],[320,50],[320,100],[320,240],[336,280],[400,350],[468,60],[480,320]];class Vn{constructor(t,i,e){this.w_=t,this.__=i,this.S_=e,this.iy=`div-gpt-ad-1589549806211-${(0,pi.qs)()}`,this.ey=new It.x,this.$g=new It.x,this.wg=new It.x}get onCreativeReceived(){return this.wg.asObservable()}get onDisplayAd(){return this.ey.asObservable()}get onError(){return this.$g.asObservable()}getAdMediaHeight(){return this.A_?this.A_.clientHeight:0}getAdMediaWidth(){return this.A_?this.A_.clientWidth:0}initializeAd(t,i){try{this.P_=t,this.eg(t);const e=this.I_(i.width,i.height);this.w_.cmd.push((()=>{this.k_=this.w_.defineSlot(this.S_,e,this.iy).addService(this.w_.pubads()).setTargeting("domains",this.__),this.w_.enableServices(),this.C_(this.k_),this.w_.pubads().isInitialLoadDisabled()&&this.w_.pubads().refresh([this.k_]),this.w_.display(this.iy)}))}catch(t){this.$g.next(zi.WrapperInitAdError)}}destroy(){this.w_.cmd.push((()=>{this.w_.destroySlots&&this.k_&&this.w_.destroySlots([this.k_])}))}C_(t){this.w_.pubads().addEventListener("slotOnload",(i=>{var e,n;if(i.slot===t){try{const t=null===(n=null===(e=null==i?void 0:i.slot)||void 0===e?void 0:e.getResponseInformation())||void 0===n?void 0:n.creativeId;t&&this.wg.next(t.toString())}catch(t){(0,s.n)({message:"AdManager_GptWrapper_creativeId",level:s.D.WARN,exception:t.message,callStack:t.stack})}this.ey.next()}})),this.w_.pubads().addEventListener("slotRenderEnded",(t=>{var i;if(t.slot===this.k_){try{this.A_=null===(i=this.P_)||void 0===i?void 0:i.getElementsByTagName("iframe")[0],(0,dt.$K)(this.k_)&&(0,e.AX)(this.A_.contentWindow,"GPTWrapper")}catch(t){}t.isEmpty&&this.$g.next(zi.AdxOverlayNoFill)}}))}eg(t){t.id=this.iy}I_(t,i){return jn.filter((e=>!Array.isArray(e)||!(0,f.fn)(e)||(0,f.BZ)(e)&&e[0]<=t&&e[1]<=i))}}var Fn=o(5049);class $n extends te{constructor(t,i){super(t,i),this.Tm=t,this.settings=i,this.adMediaType="displayAdx",this.adSourceType=l.ProtoAdsourceTypeEnum.Unknown,this.ib="adx",this.T_={[rs.FirstQuartile]:Vt.fI.AdVideoFirstQuartile,[rs.SecondQuartile]:Vt.fI.AdVideoMidpoint,[rs.ThirdQuartile]:Vt.fI.AdVideoThirdQuartile,[rs.FourthQuartile]:Vt.fI.AdVideoComplete},this.M_=[];const e=this.settings.adManagerLineItem.protoLineItem.overlayTime*oi.s_;this.Ky=new Is(this.Tm,e,500),this.M_.push(this.Ky.onTimeUpdate.subscribe((()=>{this.Um({type:Vt.fI.AdRemainingTimeChange})})),this.Ky.onTimeElapsed.subscribe((()=>{this.stopAd("adxTimerElapsed")})),this.Ky.onQuartile.subscribe((t=>{this.Um({type:this.T_[t],payload:{}})})))}initAd(t,i,e,s,n,r,h){try{super.initAd(t,i,e,s,n,r,h),this.E_={width:t,height:i},this.B_().then((t=>{this.O_=new Vn(t,this.settings.domain,this.settings.adxAdUnitPath),this.M_.push(this.O_.onCreativeReceived.subscribe((t=>{this.creativeId=t}))),this.Um({type:Vt.fI.AdLoaded,payload:{skipOffset:0}})})).catch((t=>{this.Um({type:Vt.fI.AdError,payload:{errorMessage:zi.AdxOverlayGptScriptLoad+`_${t.message}`}})}))}catch(t){this.Um({type:Vt.fI.AdError,payload:{errorMessage:zi.AdaptorInitAdError+`_${t.message}`}})}}startAd(){try{super.startAd(),this.M_.push(this.O_.onDisplayAd.subscribe((()=>{this.Um({type:Vt.fI.AdStarted}),this.Um({type:Vt.fI.AdVideoStart}),this.Um({type:Vt.fI.AdImpression,payload:{}}),this.Ky.start()})),this.O_.onError.subscribe((t=>{this.Um({type:Vt.fI.AdError,payload:{errorMessage:t}}),this.Ky.stop()}))),this.O_.initializeAd(this.Mm,this.E_)}catch(t){this.Um({type:Vt.fI.AdError,payload:{errorMessage:zi.AdaptorStartAdError+`_${t.exception}`}})}}stopAd(t){try{super.stopAd(t),this.Ky.stop(),this.Um({type:Vt.fI.AdStopped,payload:{shouldTrackPostBid:!0}})}catch(t){this.fg("AdxBidAdaptor","stopAd",t)}}resizeAd(t,i,e){this.E_&&(this.E_.width=t,this.E_.height=i)}pauseAd(){try{this.Ky.stop(),this.Um({type:Vt.fI.AdPaused})}catch(t){this.fg("AdxBidAdaptor","pauseAd",t)}}resumeAd(){try{this.Ky.start(),this.Um({type:Vt.fI.AdPlaying})}catch(t){this.fg("AdxBidAdaptor","resumeAd",t)}}expandAd(){}collapseAd(){}skipAd(){try{super.skipAd(),this.Um({type:Vt.fI.AdSkipped})}catch(t){this.fg("AdxBidAdaptor","skipAd",t)}}getAdRemainingTime(){return this.Ky.timeRemaining/oi.s_}getAdDuration(){return this.Ky.timerDuration/oi.s_}getAdVolume(){return 0}getAdMediaSize(){return{width:this.O_.getAdMediaWidth(),height:this.O_.getAdMediaHeight()}}setAdVolume(t){}get adVideoUrl(){return this.ib}get declaredDurationInSeconds(){return this.settings.adManagerLineItem.protoLineItem.duration}B_(){const t=(0,pi.pE)(window).topFrame;if(t.googletag)return Promise.resolve(t.googletag);{const i={cmd:[]};return t.googletag=window.googletag||i,new Promise(((i,s)=>{(0,e.dZ)({src:Fn.x},t.document.head,t,(()=>{i(t.googletag)}),(()=>{s()}))}))}}Cu(){var t;try{super.Cu(),this.Ky.stop(),(0,jt.i)(this.M_),null===(t=this.O_)||void 0===t||t.destroy()}catch(t){this.fg("AdxBidAdaptor","_destroy",t)}}}class Nn{constructor(t){this.settings=t,this.metrics={created:(new Date).getTime()}}fetchBid(){this.metrics.fetchStart=(new Date).getTime();const t=De.getGlobalContainer().resolve(ts),i=new $n(t,{id:this.settings.id,adManagerLineItem:this.settings.adManagerLineItem,trackers:this.settings.trackersInformation,adxAdUnitPath:this.R_(this.settings.url),requestMetadata:this.settings.requestMetadata,callingState:this.settings.callingState,domain:this.settings.pageDomain,adContainer:this.settings.adContainer,globalDomUtilsService:this.settings.globalDomUtilsService,viewabilityService:this.settings.viewabilityService,cpm:this.settings.cpm,successRate:this.settings.successRate,obfuscatedPrice:this.settings.obfuscatedPrice,adEnforcer:this.settings.adEnforcer,os:this.settings.os,adSlotContainerRecycler:this.settings.adSlotContainerRecycler,bidSlotId:this.settings.bidSlotId,urlSuffixerService:this.settings.urlSuffixerService});return this.metrics.fetchEnd=(new Date).getTime(),Promise.resolve(i)}R_(t){return t.substr("https://adx.connatix.com".length)}}var Un=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function h(t){try{a(s.next(t))}catch(t){r(t)}}function o(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(h,o)}a((s=s.apply(t,i||[])).next())}))};function Hn(){return Un(this,void 0,void 0,(function*(){try{const t=yield(0,pi.Up)((()=>Un(this,void 0,void 0,(function*(){return yield o.e("hls").then(o.t.bind(o,490,23))}))));if(!t||"object"!=typeof t)throw new Error("no_hls_module");if("function"==typeof t.isSupported)return t;if("function"!=typeof t.default||0===Object.keys(t.default).length)throw new Error("empty_hls_module");if("function"!=typeof t.default.isSupported)throw new Error("no_hls_isSupported");return t.default}catch(t){return(0,s.n)({callStack:t.stack,exception:t.message,level:s.D.WARN,message:"HLS_dynamicImport"}),null}}))}class qn extends te{constructor(t,i){super(t,i),this.Tm=t,this.settings=i,this.adMediaType="cnxMedia",this.adSourceType=l.ProtoAdsourceTypeEnum.CnxMedia,this.D_=[]}initAd(t,i,e,s,n,r,h){try{let o;super.initAd(t,i,e,s,n,r,h);let a=!1;if((0,dt.QM)(this.settings.externalMediaFile))o=this.j_(this.settings.externalMediaFile);else if((0,dt.QM)(this.settings.externalHlsFile))o=this.j_(this.settings.externalHlsFile),a=!0;else{if(!(0,f.BZ)(this.settings.renditions))return void this.Um({type:Vt.fI.AdError,payload:{errorMessage:zi.CnxMediaNoRenditions}});o=this.V_(this.settings.renditions,i,this.settings.mediaId)}this.F_=o,this.N_=new Ds(this.settings.globalDomUtilsService,this.F_,this.Em,this.settings.os,this.settings.clickUrl,this.settings.loopAdWhenFinished,this.settings.pauseAdWhenFinished,a,this.settings.hlsModule,this.settings.inApp,this.settings.pageDomain),this.D_.push(this.N_.onVpaidEvent.subscribe((t=>{this.Um(t)}))),this.N_.initAd(t,i,e,s,n,{slot:this.Mm,videoSlot:this.Em})}catch(t){this.Um({type:Vt.fI.AdError,payload:{errorMessage:zi.AdaptorInitAdError+`_${t.message}`}})}}startAd(){try{super.startAd(),this.N_.startAd()}catch(t){this.Um({type:Vt.fI.AdError,payload:{errorMessage:zi.AdaptorStartAdError+`_${t.message}`}})}}stopAd(t){super.stopAd(t),this.N_?this.N_.stopAd(t):(0,s.n)({message:"stopAd",exception:t,level:s.D.WARN})}resizeAd(t,i,e){try{this.N_.resizeAd(t,i,e)}catch(t){this.fg("CnxMediaBidAdaptor","resizeAd",t)}}pauseAd(){try{this.N_.pauseAd()}catch(t){this.fg("CnxMediaBidAdaptor","pauseAd",t)}}resumeAd(){try{this.N_.resumeAd()}catch(t){this.fg("CnxMediaBidAdaptor","resumeAd",t)}}expandAd(){try{this.N_.expandAd()}catch(t){this.fg("CnxMediaBidAdaptor","expandAd",t)}}collapseAd(){try{this.N_.collapseAd()}catch(t){this.fg("CnxMediaBidAdaptor","collapseAd",t)}}skipAd(){try{super.skipAd(),this.N_.skipAd()}catch(t){this.fg("CnxMediaBidAdaptor","skipAd",t)}}getAdRemainingTime(){try{return this.N_.getAdRemainingTime()}catch(t){return this.fg("CnxMediaBidAdaptor","getAdRemainingTime",t),0}}getAdDuration(){try{return this.N_?this.N_.getAdDuration():this.settings.adManagerLineItem.protoLineItem.duration}catch(t){return this.fg("CnxMediaBidAdaptor","getAdDuration",t),0}}getAdVolume(){try{return this.N_.getAdVolume()}catch(t){return this.fg("CnxMediaBidAdaptor","getAdVolume",t),0}}getAdMediaSize(){return{width:this.N_.getAdMediaWidth(),height:this.N_.getAdMediaHeight()}}setAdVolume(t){try{super.setAdVolume(t),this.N_.setAdVolume(t)}catch(t){this.fg("CnxMediaBidAdaptor","setAdVolume",t)}}get adVideoUrl(){return this.F_}get declaredDurationInSeconds(){return this.settings.adManagerLineItem.protoLineItem.duration}Cu(){var t;if(!this.settings.pauseAdWhenFinished&&!this.settings.loopAdWhenFinished)try{super.Cu(),(0,jt.i)(this.D_),null===(t=this.N_)||void 0===t||t.destroy()}catch(t){this.fg("CnxMediaBidAdaptor","_destroy",t)}}j_(t){return(null==t?void 0:t.includes($s.n.endPoints.base.video))?this.pd.appendParamsToUrl(t):t}V_(t,i,e){let s;s=t.filter((t=>t.codec===x.H264));const n=(0,di.DE)(i,s.map((t=>t.height)));return s=s.filter((t=>t.height===n)),s.length>0?this.pd.appendParamsToUrl(`${$s.n.endPoints.base.video}${e}/${s[0].file}`):null}}var zn,Wn,Gn,Jn=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function h(t){try{a(s.next(t))}catch(t){r(t)}}function o(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(h,o)}a((s=s.apply(t,i||[])).next())}))};class Qn{constructor(t){this.settings=t,this.metrics={created:(new Date).getTime()}}fetchBid(){return Jn(this,void 0,void 0,(function*(){let t;if(this.metrics.fetchStart=(new Date).getTime(),(0,dt.QM)(this.settings.adManagerLineItem.protoLineItem.externalHlsFile)&&(t=yield Hn(),!t))throw $i.NetworkRequestUrl;const i=De.getGlobalContainer().resolve(ts),e=new qn(i,{hlsModule:t,id:this.settings.id,adManagerLineItem:this.settings.adManagerLineItem,trackers:this.settings.trackersInformation,mediaId:this.settings.mediaId,renditions:this.settings.renditions,clickUrl:this.settings.clickUrl,requestMetadata:this.settings.requestMetadata,callingState:this.settings.callingState,globalDomUtilsService:this.settings.globalDomUtilsService,viewabilityService:this.settings.viewabilityService,adContainer:this.settings.adContainer,cpm:this.settings.cpm,obfuscatedPrice:this.settings.obfuscatedPrice,adEnforcer:this.settings.adEnforcer,externalMediaFile:this.settings.adManagerLineItem.protoLineItem.externalMediaFile,externalHlsFile:this.settings.adManagerLineItem.protoLineItem.externalHlsFile,pauseAdWhenFinished:this.settings.pauseAdWhenFinished,loopAdWhenFinished:this.settings.loopAdWhenFinished,inApp:this.settings.inApp,os:this.settings.os,adSlotContainerRecycler:this.settings.adSlotContainerRecycler,bidSlotId:this.settings.bidSlotId,urlSuffixerService:this.settings.urlSuffixerService,pageDomain:this.settings.pageDomain});return this.metrics.fetchEnd=(new Date).getTime(),e}))}}!function(t){t[t.IDLE=0]="IDLE",t[t.RUNNING=1]="RUNNING",t[t.STOPPING=2]="STOPPING"}(zn||(zn={}));class Yn{constructor(t){this.U_=t,this.H_=zn.IDLE,this.q_=Promise.resolve()}start(){(this.H_===zn.IDLE||this.H_===zn.STOPPING)&&(this.H_=zn.RUNNING,this.z_())}stop(){this.H_=zn.STOPPING}setPromiseNotifier(t){return this.W_=t,this}setIdleNotifier(t){return this.G_=t,this}getState(){return this.H_}J_(){const t=this.U_();void 0!==t?this.q_=t.then((t=>{this.W_&&this.W_(t)})).then((()=>{this.H_===zn.STOPPING&&(this.H_=zn.IDLE)})):this.H_=zn.IDLE}z_(){this.H_===zn.IDLE?this.G_&&this.G_():this.H_===zn.RUNNING&&(this.J_(),this.q_.then((()=>{this.z_()})))}}class Xn{constructor(t,i=1){this.U_=t,this.Q_=i,this.Y_=[],this.X_(i)}start(){return this.Y_.forEach((t=>{t.start()})),this}stop(){return this.Y_.forEach((t=>{t.stop()})),this}setPromiseNotifier(t){return this.Y_.forEach((i=>{i.setPromiseNotifier(t)})),this}setAllThreadsIdleNotifier(t){return this.Z_=t,this.K_(),this}setNumberOfThreads(t){if(t<=0)return;this.Q_=t;const i=t-this.Q_;i>0?this.X_(i):i<0&&this.tS(i)}getState(){return this.Y_.reduce(((t,i)=>(t[i.getState()]++,t)),{[zn.IDLE]:0,[zn.RUNNING]:0,[zn.STOPPING]:0})}X_(t){for(let i=0;i<t;i++){const t=new Yn(this.U_).setPromiseNotifier(this.W_);this.Y_.push(t)}}tS(t){t=Math.min(t,this.Y_.length);for(let i=0;i<t;i++)this.Y_.pop().stop()}K_(){const t=()=>{this.getState()[zn.IDLE]===this.Y_.length&&this.Z_()};this.Y_.forEach((i=>{i.setIdleNotifier(t)}))}}!function(t){t[t.IDLE=0]="IDLE",t[t.LOADING=1]="LOADING",t[t.READY=2]="READY",t[t.STARTED=3]="STARTED",t[t.IMPRESSION=4]="IMPRESSION"}(Wn||(Wn={})),function(t){t[t.BID_LOADING_CONSUMED=0]="BID_LOADING_CONSUMED",t[t.BID_READY_CONSUMED=1]="BID_READY_CONSUMED",t[t.BID_INVALIDATED=2]="BID_INVALIDATED"}(Gn||(Gn={}));class Zn{constructor(){this.iS=new Set}static getInstance(){return this.Yg||(this.Yg=new Zn),this.Yg}addPlatformCappedLineItemIdList(t,i){i||(0,s.n)({message:"PlatformCappedLineItemRepository_bidPool_not_provided",level:s.D.CRITICAL,exception:`${t}`},{throttle:1,sendMaxLog:!1}),t.forEach((t=>{if((0,dt.QM)(t)&&!this.iS.has(t)&&(this.iS.add(t),i)){i.getAllBidsForLineItem(t).forEach((t=>i.consumeBid(t,Gn.BID_INVALIDATED)))}}))}isLineItemPlatformCapped({advertiserLineItemId:t,publisherLineItemId:i}){return this.iS.has(t)||this.iS.has(i)}clear(){this.iS.clear()}}class Kn{constructor(t){this.settings=t,this.eS=new Map,this.wf=[],this.sS=!1,this.nS=new It.x,this.rS=()=>{const t=this.hS();if(t)return this.oS(t.lineItemList),this.aS(t.lineItemList,t.state).then((()=>{this.cS(t.lineItemList),this.lS()})).catch((()=>{this.cS(t.lineItemList),this.lS()}));this.settings.auctionManager.onNothingToCall()},this.uS=(t,i)=>this.settings.adCallerYo.getWinningYoScore(i.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,i.settings.id)-this.settings.adCallerYo.getWinningYoScore(t.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,t.settings.id),this.settings.lineItemList.forEach((t=>{vi(t.protoLineItem.creativeType)?t.protoLineItem.timeBetweenRequests=10:t.protoLineItem.timeBetweenRequests=6})),this.wf.push(this.settings.lineItemServices.lineItemServicesTimer.onTimer().subscribe((()=>{this.dS()})),this.settings.adBidPool.getBidPoolBidEvents(ki.ON_BID_LOADING).subscribe((()=>{this.dS()})),this.settings.adBidPool.getBidPoolBidEvents(ki.ON_BID_LOADING_CONSUMED).subscribe((()=>{this.dS()})),this.settings.adBidPool.getBidPoolBidEvents(ki.ON_BID_READY_CONSUMED).subscribe((()=>{this.dS()}))),this.pS=new Xn(this.rS,5),this.fS(ui.Rtb)&&this.eS.set(ui.Rtb,{auctionPending:!1,caller:new sn(this.settings.isOutstream,this.settings.skipAdSettings,this.settings.app,this.settings.adMacroReplacer,this.settings.adContainerMap,this.settings.adRequestGatekeeper,this.settings.adEnforcer,this.settings.adSlotContainerRecycler)}),this.fS(ui.HeaderBidder)&&this.eS.set(ui.HeaderBidder,{auctionPending:!1,caller:new Pn(this.settings.isOutstream,this.settings.schainSettings,this.settings.app,this.settings.adMacroReplacer,this.settings.adContainerMap,this.settings.adEnforcer,this.settings.adSlotContainerRecycler,this.settings.loopAdWhenFinished,this.settings.skipAdSettings)}),this.fS(ui.Tam)&&this.eS.set(ui.Tam,{auctionPending:!1,caller:new Dn(this.settings.app,this.settings.amazonSlotId,this.settings.adMacroReplacer,this.settings.adContainerMap,this.settings.adEnforcer,this.settings.adSlotContainerRecycler)}),this.pS.setAllThreadsIdleNotifier((()=>{this.settings.lineItemServices.lineItemServicesTimer.start()}))}get onFirstAggregatedBatchFinished(){return this.nS.asObservable()}call(t){this.pS.setNumberOfThreads(t.maxParallelCalls),this.mS=t,this.sS=!0,this.dS()}stop(){this.sS=!1,this.pS.stop()}destroy(){this.stop(),this.settings.callingValidationAggregator.destroy(),this.eS.forEach((t=>{t.caller.destroy()})),(0,jt.i)(this.wf)}fS(t){return this.settings.lineItemList.some((i=>fi[i.protoLineItem.creativeType]===t))}lS(){let t=!0;this.eS.forEach((i=>{i.auctionPending&&(t=!1)})),t&&this.nS.next()}dS(){this.sS&&this.pS.start()}hS(){const t=this.settings.adCallerYo.getCallableLineItems(this.settings.lineItemList,this.mS.stateSettings),i=this.settings.adCallerYo.getBestLineItem(t,this.mS.stateSettings);if(i)return i}oS(t){this.settings.adCallingPool.addCallingLineItems(t)}cS(t){this.settings.adCallingPool.removeCallingLineItems(t)}aS(t,i){return vi(t[0].protoLineItem.creativeType)?this.gS(t,i):this.vS(t[0],i)}vS(t,i){const e=this.yS(t,i);return this.settings.callingValidationAggregator.registerRequestForLineItem(t,this.xS()),t.historicalMetrics.requestNumber++,this.wS(e),this._S(e)}gS(t,i){const e=this.eS.get(fi[t[0].protoLineItem.creativeType]);t.forEach((t=>t.aggregators.add(e.caller))),e.auctionPending=!0;const s={lineItemRequestDataList:t.map((t=>({adManagerLineItem:t,maxAvailableRequests:this.settings.lineItemServices.requestCapsService.getAvailableRequestsForLineItem(t,this.xS())}))),callingState:i,maxAdDuration:i.adBreakState.maxAdDuration,maxBidPrice:this.SS(i)};return e.caller.request(s).then((s=>{s.bids.length||s.noBids.length||t.forEach((t=>{this.settings.callingValidationAggregator.registerRequestForLineItem(t,this.xS())})),t.forEach((t=>{t.aggregators.delete(e.caller),t.historicalMetrics.requestNumber++})),s.noBids.forEach((t=>{this.settings.callingValidationAggregator.registerRequestForLineItem(t.lineItem,this.xS()),this.AS(i,t.lineItem,t.reason,t.requestMetadata)})),s.bids.forEach((t=>this.wS(t))),s.bids.sort(this.uS);const n=s.bids.map((t=>(this.settings.callingValidationAggregator.registerRequestForLineItem(t.settings.adManagerLineItem,this.xS()),this._S(t))));return Promise.all(n)})).catch().then((()=>{e.auctionPending=!1}))}_S(t){return t.settings.adManagerLineItem.callers.add(t),t.fetchBid().catch((i=>{t.settings.adManagerLineItem.callers.delete(t);const e=t.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,s=t.settings.id;this.settings.adCallerYo.registerPreBidFromBid(e,s);const n=Ni[i]?Ni[i]:l.ConnatixNoBidReasonEnum.RequestException;return this.AS(t.settings.callingState,t.settings.adManagerLineItem,n,t.settings.requestMetadata,t.settings.trackersInformation,Date.now()-t.metrics.fetchStart),Promise.reject()})).then((i=>{t.settings.adManagerLineItem.callers.delete(t),this.PS(i,Date.now()-t.metrics.fetchStart)})).catch((t=>{void 0!==t&&(0,s.n)({message:"AdManager_AdCallerController_handleCallAdaptorRequest",exception:t.message,callStack:t.stack,level:s.D.CRITICAL},{throttle:5})}))}PS(t,i){const e=t.settings.adManagerLineItem,s=t.settings.requestMetadata;if(t.settings.requestMetadata.data.requestTrackingHandledByServer||this.settings.trackingService.addBid({advertiserLineItemId:e.protoLineItem.advertiserLineItemId,publisherLineItemId:e.protoLineItem.publisherLineItemId,requestedFloorPrice:s.data.requestedFloorPrice,requestNumber:s.data.requestNumber,syncedUser:s.data.syncedUser,prebidJsBidderName:s.data.prebidJsBidderName,customClientPrice:t.settings.cpm,timeSpent:i,dspId:s.data.dspId,encryptedPrice:s.data.encryptedPrice,rtbAdomain:s.data.rtbAdomain,creativeId:t.creativeId,rtbSeatId:s.data.rtbSeatId,cnxBidId:t.settings.requestMetadata.data.cnxBidId,predictedFloorPrice:t.settings.requestMetadata.data.predictedFloorPrice,floorPriceFactor:t.settings.requestMetadata.data.floorPriceFactor,floorPriceFactorBypassReason:t.settings.requestMetadata.data.floorPriceBypassReason}),this.settings.adRequestGatekeeper.addBid(e.protoLineItem.advertiserLineItemId,s.data.requestedFloorPrice),!this.settings.adCallerYo.isBidTargetingAllowedEverInSession(t,t.settings.callingState)||Zn.getInstance().isLineItemPlatformCapped(t.settings.adManagerLineItem.protoLineItem)){0;const i=t.settings.id,e=t.settings.adManagerLineItem.protoLineItem.advertiserLineItemId;return this.settings.adCallerYo.registerPreBidFromBid(e,i),void this.settings.auctionInfoLogging.bidIsNotWinnableEverInSession(t)}this.settings.adBidPool.addBid(t)}AS(t,i,e,s,n,r){n&&Di.track(n.adError,this.settings.adMacroReplacer,i.protoLineItem,t),s.data.requestTrackingHandledByServer||this.settings.trackingService.addPrebid({advertiserLineItemId:i.protoLineItem.advertiserLineItemId,publisherLineItemId:i.protoLineItem.publisherLineItemId,partnerCustomHeaders:s.data.partnerCustomHeaders,partnerReason:s.data.partnerReason,requestedFloorPrice:s.data.requestedFloorPrice,requestNumber:s.data.requestNumber,syncedUser:s.data.syncedUser,prebidJsBidderName:s.data.prebidJsBidderName,reason:e,timeSpent:r,predictedFloorPrice:s.data.predictedFloorPrice}),this.settings.adRequestGatekeeper.addPrebid(i.protoLineItem.advertiserLineItemId)}yS(t,i){const e=new Di;ji(t.protoLineItem.trackers,e);const s={id:(0,pi.qs)(),adManagerLineItem:t,replaceTrackingMacros:!0,requestMetadata:new Gs({requestNumber:t.historicalMetrics.requestNumber}),trackersInformation:e,callingState:i,adContainer:this.settings.adContainerMap.get(t.protoLineItem.adType),globalDomUtilsService:this.settings.app.services.GlobalDomUtilsService,viewabilityService:this.settings.app.services.ViewabilityService,cpm:t.protoLineItem.floorPrice||t.protoLineItem.customCpm,adEnforcer:this.settings.adEnforcer,os:this.settings.os,adSlotContainerRecycler:this.settings.adSlotContainerRecycler,bidSlotId:Ms(),urlSuffixerService:this.settings.app.services.UrlSuffixerService,interactionService:this.settings.app.services.InteractionService};switch(t.protoLineItem.creativeType){case l.ProtoCreativeTypeEnum.External:case l.ProtoCreativeTypeEnum.ThirdParty:return t.protoLineItem.adType===l.ProtoAdType.Overlay?new Nn(Object.assign(Object.assign({},s),{url:t.protoLineItem.adTag,pageDomain:this.settings.app.config.pageDomain})):new Ws(Object.assign(Object.assign({},s),{url:t.protoLineItem.adTag,adMacroReplacer:this.settings.adMacroReplacer,trackingService:this.settings.trackingService,loopAdWhenFinished:this.settings.loopAdWhenFinished,pageUrl:this.settings.app.config.pageUrl}));case l.ProtoCreativeTypeEnum.MediaFile:return new Qn(Object.assign(Object.assign({},s),{clickUrl:t.protoLineItem.mediaCreativeClickUrl,mediaId:t.protoLineItem.mediaCreativeId,renditions:t.protoLineItem.renditions,pauseAdWhenFinished:this.settings.pauseAdWhenFinished,loopAdWhenFinished:this.settings.loopAdWhenFinished,inApp:this.settings.app.config.isInApp,pageDomain:this.settings.app.config.pageDomain}))}}wS(t){const{creativeType:i,floorPrice:e,successRate:s,advertiserLineItemId:n,lineItemPriority:r,customCpm:h}=t.settings.adManagerLineItem.protoLineItem;this.settings.adCallerYo.registerBiddingInformation({creativeType:i,floorPrice:e,lineItemId:n,priority:r,bidId:t.settings.id,cpm:t.settings.cpm,obfuscatedPrice:t.settings.obfuscatedPrice,successRate:t.settings.successRate||s,customCpm:h})}xS(){return(this.mS.stateSettings.currentState||this.mS.stateSettings.predictedState).adOpportunity.id}SS(t){const i=[...this.settings.adBidPool.getBidsByStatus([Wn.IDLE,Wn.LOADING,Wn.READY])].filter((i=>this.settings.adCallerYo.isBidTargetingAllowed(i,t,this.settings.lineItemServices.impressionCapsService)));return(0,f.BZ)(i)?Math.max(...i.map((t=>t.getPrice()))):0}}const tr="uncategorized";class ir{resetCapsBasedOnExternalEvent(t){const i=this.St.keys();for(const e of i)this.kS(e,t)&&this.CS(e,tr)}kS(t,i){return t.protoLineItem.resetCapType===i}TS(t){return this.kS(t,l.ProtoResetCapTypeEnum.TimeCapping)&&this.MS(t)>0}}class er{constructor(t){this.ES=t,this.BS=new Map}setNumberOfImpressions({value:t,categoryId:i}){(0,dt.$K)(i)&&this.ES===l.ProtoResetCapTypeEnum.OpportunityCapping||(i=tr),this.BS.set(i,t)}getNumberOfImpressions({categoryId:t}){return(0,dt.$K)(t)&&this.ES===l.ProtoResetCapTypeEnum.OpportunityCapping||(t=tr),this.BS.get(t)||0}}class sr extends ir{constructor(t=Date.now()){super(),this.OS=t,this.St=new Map}canCall(t,i){this.LS(t);const e=this.St.get(t);return void 0===e||(0===t.protoLineItem.impressionCap||e.getNumberOfImpressions({categoryId:i})<t.protoLineItem.impressionCap)}registerImpressionForLineItem(t,i){let e=this.St.get(t);return void 0===e&&(this.St.set(t,new er(t.protoLineItem.resetCapType)),e=this.St.get(t),this.TS(t)&&(e.nextImpressionCapResetTimestamp=this.RS(this.MS(t)))),e.setNumberOfImpressions({value:e.getNumberOfImpressions({categoryId:i})+1,categoryId:i}),this}registerRequestForLineItem(t,i){return this}destroy(){this.St.clear()}CS(t,i){this.St.get(t).setNumberOfImpressions({value:0,categoryId:i})}MS(t){return t.protoLineItem.resetImpressionsCapTime*oi.s_}LS(t,i=Date.now()){if(!this.TS(t))return;const e=this.St.get(t);void 0!==e&&this.DS(t,i)&&(e.setNumberOfImpressions({value:0}),e.nextImpressionCapResetTimestamp=this.RS(this.MS(t),i))}DS(t,i){return i>=this.St.get(t).nextImpressionCapResetTimestamp}RS(t,i=Date.now()){const e=Math.ceil((i-this.OS)/t)*t;return this.OS+e}}class nr{constructor(t){this.ES=t,this.jS=new Map}setNumberOfRequests({value:t,categoryId:i}){(0,dt.$K)(i)&&this.ES===l.ProtoResetCapTypeEnum.OpportunityCapping||(i=tr),this.jS.set(i,t)}getNumberOfRequests({categoryId:t}){return(0,dt.$K)(t)&&this.ES===l.ProtoResetCapTypeEnum.OpportunityCapping||(t=tr),this.jS.get(t)||0}}class rr extends ir{constructor(t=Date.now()){super(),this.OS=t,this.allowResetOnTime=!0,this.St=new Map}canCall(t,i){this.LS(t);const e=this.St.get(t);return void 0===e||(0===t.protoLineItem.requestCap||e.getNumberOfRequests({categoryId:i})<t.protoLineItem.requestCap)}registerRequestForLineItem(t,i,e=Date.now()){let s=this.St.get(t);return void 0===s&&(this.St.set(t,new nr(t.protoLineItem.resetCapType)),s=this.St.get(t),this.TS(t)&&(s.nextRequestCapResetTimestamp=this.RS(this.MS(t)))),s.setNumberOfRequests({value:s.getNumberOfRequests({categoryId:i})+1,categoryId:i}),this}registerImpressionForLineItem(t){return this}getAvailableRequestsForLineItem(t,i){const e=this.St.get(t);return void 0===e?t.protoLineItem.requestCap:t.protoLineItem.requestCap-e.getNumberOfRequests({categoryId:i})}restoreOneCapForLineItem(t,i){if(t.protoLineItem.ignoreFilledRequests){const e=this.St.get(t);if(void 0===e)return;const s=e.getNumberOfRequests({categoryId:i});s>0&&e.setNumberOfRequests({value:s-1,categoryId:i})}}destroy(){this.St.clear()}CS(t,i){this.St.get(t).setNumberOfRequests({value:0,categoryId:i})}MS(t){return t.protoLineItem.resetRequestsCapTime*oi.s_}LS(t,i=Date.now()){if(!this.TS(t))return;const e=this.St.get(t);void 0!==e&&this.DS(t,i)&&(e.setNumberOfRequests({value:0}),e.nextRequestCapResetTimestamp=this.RS(this.MS(t),i))}DS(t,i){return i>=this.St.get(t).nextRequestCapResetTimestamp&&this.allowResetOnTime}RS(t,i=Date.now()){const e=Math.ceil((i-this.OS)/t)*t;return this.OS+e}}class hr{constructor(){this.St=new Map}registerRequestForLineItem(t,i,e=Date.now()){let s=this.St.get(t);return void 0===s&&(this.St.set(t,{}),s=this.St.get(t)),s.lastRequestTimestamp=e,s.categoryId=i,this}registerImpressionForLineItem(t){return this}canCall(t,i,e=Date.now()){const s=this.St.get(t);if(void 0===s)return!0;if(0===t.protoLineItem.timeBetweenRequests)return!0;if(e>=s.lastRequestTimestamp+t.protoLineItem.timeBetweenRequests*oi.s_)return!0;return!(s.categoryId===i||t.protoLineItem.resetCapType!==l.ProtoResetCapTypeEnum.OpportunityCapping)}destroy(){this.St.clear()}}class or{constructor(t){this.Tm=t,this.VS=null,this.FS=new It.x}start(){return this.$S(),this}stop(){return this.HS(),this}onTimer(){return this.FS.asObservable()}destroy(){this.HS()}$S(){null===this.VS&&(this.VS=this.Tm.setInterval((()=>{this.FS.next()}),500))}HS(){this.Tm.clearInterval(this.VS),this.VS=null}}class ar extends d._{constructor(t,i,e,s){super(),this.qS=t,this.zS=i,this.WS=e,this.Mu=s,this.GS=new It.x,this.JS=new Map,this.QS=[],this.forceTriggerUpdateState=()=>{this.QS.forEach((t=>this.YS(t)))},this.YS=(t,i)=>{this.JS.set(t,this.XS(this.zS.get(t),i))},this.ZS=t=>{this.KS([l.ProtoAdType.Video],t)},this.tA=t=>{this.KS([l.ProtoAdType.Overlay],t)},this.iA=t=>{this.KS([l.ProtoAdType.Nonlinear],t)},this.kr=()=>{this.KS(this.QS)},this.KS=(t,i)=>{t.forEach((t=>this.YS(t,i))),this.GS.next()},this.sA={[l.ProtoAdType.Video]:this.ZS,[l.ProtoAdType.Overlay]:this.tA,[l.ProtoAdType.Nonlinear]:this.iA},this.QS=[...this.zS.keys()],this.QS.forEach((t=>this.YS(t))),this.nA()}get onContainerStateUpdate(){return this.GS.asObservable()}getContainerMap(){return this.zS}getContainerStateMap(){return this.JS}getMainContainer(){return this.zS.get(this.qS)}getMainContainerState(){return this.getContainerStateMap().get(this.qS)}destroy(){this.zS.forEach(((t,i)=>{this.WS.off(t,this.kr),this.Mu.off(t,this.sA[i])}))}nA(){this.zS.forEach(((t,i)=>{this.WS.on(t,this.kr),this.Mu.on(t,this.sA[i],{threshold:Ft})}))}XS(t,i){let e=i;return void 0===e&&(e=this.Mu.check({element:t,threshold:Ft})),{width:t.clientWidth,height:t.clientHeight,viewability:e}}}const cr="cnxpl-vl",lr="cnxpl-rf";class ur{constructor(){this.rA=!0,this.hA=new It.x,this.oA=[],this.aA=t=>{if(this.rA)return;const i=t.target;if(i.volume>0&&(i.volume=0,!i.paused)){const t=i.getAttribute(lr);this.hA.next(t)}t.preventDefault?t.preventDefault():t.returnValue=!1}}get onVolumeDetected(){return this.hA.asObservable()}enforce(t,i){let e=t;(0,dt.cL)(t)&&(e=t.contentDocument||t.contentWindow.document),this.rA=!1;(0,f.Sz)(e.getElementsByTagName("video")).forEach((t=>{this.cA(t,i)}))}stopEnforce(){this.rA=!0}clearEnforce(t){try{const i=[];this.oA=this.oA.filter((e=>e.getAttribute(lr)!==t||(i.push(e),!1))),i.forEach((t=>{t.removeAttribute(cr),t.removeAttribute(lr),t.removeEventListener("volumechange",this.aA)}))}catch(t){}}cA(t,i){t&&!t.getAttribute("cnxpl-vl")&&(t.volume=0,t.setAttribute(cr,"true"),t.setAttribute(lr,i),t.addEventListener("volumechange",this.aA),this.oA.push(t))}}class dr{constructor(){}lA(t){const i=function(){};t.Element.prototype.scrollIntoView=i,t.Element.prototype.scrollIntoViewIfNeeded=i,t.scroll=i,t.scrollTo=i,t.scrollBy=i}enforce(t){(0,dt.cL)(t)&&this.lA(t.contentWindow)}stopEnforce(){}clearEnforce(){}}class pr{constructor(t){this.uA=t=>t.cnxEnfStorage?t.cnxEnfStorage:null,this.$e=t;try{this.uA(this.$e)||this.dA(this.$e)}catch(t){(0,s.n)({message:"AdManager_EnforcerMemory_bind_enforcement",exception:t.message,callStack:t.stack,level:s.D.CRITICAL})}}dA(t){(0,e.ML)(t.document.head,t,'!function(){function n(n){window["cnx"+n]||(window["cnx"+n]=window[n],window[n]=function(e){var t="";try{e&&(t=function n(e,t){try{if(!e)return"";if(e.cnxInnerTag)return e.cnxInnerTag;if(t<2){var r=t+1;return n(e.caller,r)}}catch(n){return""}return""}(e))}catch(n){}var r=window["cnx"+n].apply(null,arguments);if(t){var i=window.cnxEnfStorage;i[n][t]=i[n][t]||[],i[n][t].push(r)}return r})}window.cnxEnfStorage={setTimeout:{},setInterval:{},eventListeners:{},errors:[]};var e=window.location.hostname.split("."),t=window.btoa(e[e.length-2]+"."+e[e.length-1]);-1===["dG16LmNvbQ==","YmlsbGJvYXJkLmNvbQ==","aG9sbHl3b29kcmVwb3J0ZXIuY29t","dmliZS5jb20=","aG9yb3Njb3BlLmNvbQ==","YXN0cm9sb2d5LmNvbQ==","YWhvcmFtaXNtby5jb20="].indexOf(t)&&(!function(){const n=window.EventTarget?window.EventTarget.prototype:window.document;n.cnxAddEventListener||(n.cnxAddEventListener=n.addEventListener,n.addEventListener=function(n,e,t){var r=this||window;if(e&&e.cnxInnerTag){var i=window.cnxEnfStorage;i.eventListeners[e.cnxInnerTag]=i.eventListeners[e.cnxInnerTag]||[],i.eventListeners[e.cnxInnerTag].push({element:r,type:n,handler:e,options:t})}try{r.cnxAddEventListener(n,e,t)}catch(n){n.message="adlstn_"+n.message,i.errors.push(n)}})}(),n("setTimeout"),n("setInterval"))}();')}enforce(t,i){if((0,dt.cL)(t))try{t.contentWindow.self===top||t.contentWindow.Function.prototype.cnxInnerTag||t.contentWindow.Object.defineProperty(t.contentWindow.Function.prototype,"cnxInnerTag",{enumerable:!1,writable:!0,value:i}),t.contentWindow.self===top||t.contentWindow.Object.prototype.cnxInnerTag||t.contentWindow.Object.defineProperty(t.contentWindow.Object.prototype,"cnxInnerTag",{enumerable:!1,writable:!0,value:i})}catch(t){}}stopEnforce(){}clearEnforce(t){try{const i=this.uA(this.$e);i.eventListeners[t]&&(i.eventListeners[t].forEach((t=>{t.element.removeEventListener(t.type,t.handler,t.options)})),i.eventListeners[t]=[]),i.setInterval[t]&&(i.setInterval[t].forEach((t=>this.$e.clearInterval(t))),i.setInterval[t]=[]),i.setTimeout[t]&&(i.setTimeout[t].forEach((t=>this.$e.clearTimeout(t))),i.setTimeout[t]=[])}catch(t){}}}class fr{constructor(){this.pA=["viralgains","serving-sys.com","commercialadsdistributor"],this.fA=["beachfrontmedia","commercialadsdistributor"],this.mA=["commercialadsdistributor"],this.gA=["pixel.clearstream.tv","pixel.clrstm.com"],this.vA=new It.x,this.bA=new It.x}get onMalwareDetected(){return this.vA.asObservable()}get onBadUriDetected(){return this.bA.asObservable()}enforce(t,i){if((0,dt.cL)(t)){this.xA=i;try{this.wA(t),this._A(t),this.SA(t),this.AA(t)}catch(t){}}}stopEnforce(){}clearEnforce(){}PA(t,i,e,s){t.every((t=>!e.includes(t)))&&!i.getAttribute("cnx")&&(i.setAttribute("cnx","true"),this.bA.next({referenceId:this.xA,enforcementMessage:`${s}-${i}`}))}wA(t){const i=t.getAttribute("src");i&&(this.pA.forEach((t=>{i.includes(t)&&this.vA.next({referenceId:this.xA,enforcementMessage:`malware-${t}`})})),this.PA(["//","about:blank","about:self","javascript:"],t,i,"iframe"))}_A(t){(0,f.Sz)(t.contentDocument.getElementsByTagName("script")).forEach((t=>{const i=t.getAttribute("src");i&&(this.fA.forEach((t=>{i.includes(t)&&this.vA.next({referenceId:this.xA,enforcementMessage:`malware-${t}`})})),this.PA(["//"],t,i,"script"))}))}SA(t){(0,f.Sz)(t.contentDocument.getElementsByTagName("a")).forEach((t=>{const i=t.getAttribute("href");i&&this.mA.forEach((t=>{i.includes(t)&&this.vA.next({referenceId:this.xA,enforcementMessage:`malware-${t}`})}))}))}AA(t){(0,f.Sz)(t.contentDocument.getElementsByTagName("img")).forEach((t=>{const i=t.getAttribute("src");i&&this.gA.forEach((t=>{i.includes(t)&&this.vA.next({referenceId:this.xA,enforcementMessage:`malware-${t}`})}))}))}}class mr{constructor(t,i,e){if(this.IA=e,this.kA=null,this.CA=new Map,this.TA=Hi.None,this.MA=300,this.wf=[],this.EA=new Map,this.dg=new It.x,this.CA.set(Hi.MemoryLeak,new pr(i)),e||this.CA.set(Hi.ScrollHijack,new dr),!t){const t=new ur;this.CA.set(Hi.Mute,t),this.wf.push(t.onVolumeDetected.subscribe((t=>{this.BA(Ui.VOLUME_DETECTED,t,"")})))}const s=new fr;this.wf.push(s.onBadUriDetected.subscribe((t=>{this.BA(Ui.BADURI_DETECTED,t.referenceId,t.enforcementMessage)})),s.onMalwareDetected.subscribe((t=>{this.BA(Ui.MALWARE_DETECTED,t.referenceId,t.enforcementMessage)}))),this.CA.set(Hi.Malware,s)}get onEnforcerEvent(){return this.dg.asObservable()}registerContainer(t,i){this.EA.get(t)||this.EA.set(t,i)}deregisterContainer(t){this.EA.get(t)&&(this.CA.forEach((i=>{i.clearEnforce(this.EA.get(t))})),this.EA.delete(t),this.EA.size||this.stop(Hi.All))}start(t){this.IA&&(t^=Hi.ScrollHijack),this.TA|=t,null===this.kA&&(this.kA=setInterval((()=>{try{this.EA.forEach(((t,i)=>{this.OA(i,t)}))}catch(t){}}),this.MA))}stop(t){this.TA&=~t,this.TA===Hi.None&&(clearInterval(this.kA),this.kA=null),this.CA.forEach(((i,e)=>{t&e&&i.stopEnforce()}))}destroy(){this.stop(Hi.All),(0,jt.i)(this.wf),this.EA.forEach(((t,i)=>{this.deregisterContainer(i)}))}OA(t,i){(0,f.Sz)(t.getElementsByTagName("iframe")).forEach((t=>{try{this.OA(t,i)}catch(t){}})),this.CA.forEach(((e,s)=>{this.TA&s&&e.enforce(t,i)}))}BA(t,i,e){let s;this.EA.forEach(((t,e)=>{t===i&&(s=e)})),this.dg.next({message:e,type:t,detectedContainer:s})}}class gr{constructor(t){this.zt=t,this.LA=!1,this.RA=void 0,this.DA=!1,this.jA=[],this.wf=[],this.VA=!1,this.FA=new It.x,this.$A=new It.x,this.NA=[],this.wf.push(this.zt.adBidPool.getBidPoolBidEvents(ki.ON_BID_READY).subscribe((()=>{this.UA()})),this.zt.impressionCapsTimer.onTimer().subscribe((()=>{this.UA()})))}get onAdSelected(){return this.FA.asObservable()}get onAdFinished(){return this.$A.asObservable()}start(t){this.HA=t,this.LA=!0,this.UA()}stop(){this.LA=!1}destroy(){this.stop(),(0,jt.i)(this.wf),this.RA||this.qA()}UA(){if(!this.LA||this.DA)return;const t=this.zA(this.HA);if(!t)return;const i=this.WA(t);this.RA&&this.zt.removeBidIfHigherYoScore&&i?(this.qA(),this.RA.stopAd("removeStartedBid"),this.GA(t)):this.RA||this.GA(t)}GA(t){this.RA=t,this.NA=[],this.zt.adBidPool.changeBidStatus(t,Wn.STARTED),this.FA.next(t),this.JA(t),t.startAd()}qA(){this.RA&&((0,jt.i)(this.jA),this.jA=[],this.zt.adBidPool.consumeBid(this.RA,Gn.BID_READY_CONSUMED),this.RA=void 0,this.NA=[])}zA(t){const i=this.zt.adBidPool.getBidsByStatus([Wn.READY]);return this.zt.adImpressionerYo.getBestBid(i,t,this.zt.impressionCapsService)}WA(t){return!!this.RA&&this.zt.adImpressionerYo.getBetterBid(t,this.RA)!==this.RA}QA(t,i,e){this.DA&&(0,s.n)({message:"AdManager_ABaseBidAdaptor_multipleImpressions",exception:`advertiserLineItemId:${t.settings.adManagerLineItem.protoLineItem.advertiserLineItemId}_creativeId:${t.creativeId}`,callStack:`${t.adMediaType}`,level:s.D.CRITICAL},{throttle:1e3}),this.zt.adImpressionerYo.registerImpression(t.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,t.settings.id),this.VA=this.YA(e,t.getAdDuration()),this.DA=!0,this.zt.adRequestGatekeeper.addImpression(t.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,t.settings.obfuscatedPrice),this.zt.impressionCapsService.registerImpressionForLineItem(t.settings.adManagerLineItem,this.HA.adOpportunity.id),this.zt.requestCapsService.restoreOneCapForLineItem(t.settings.adManagerLineItem,this.HA.adOpportunity.id),this.zt.adBidPool.changeBidStatus(t,Wn.IMPRESSION);const n=this.zt.auctionInfoLogging.onImpression(t);this.ZA(t,i,n)}KA(t,i,e,s=!0){this.tP(t,i,e,s),this.zt.loopAdWhenFinished?t.resumeAd():this.zt.pauseAdWhenFinished?t.pauseAd():(this.$A.next(t),this.qA(),this.UA())}tP(t,i,e,s=!0){if(this.DA)return void(this.DA=!1);if(!s)return;this.zt.adImpressionerYo.registerPostBid(t.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,t.settings.id);const n=this.zt.auctionInfoLogging.onPostBid(t);this.iP(t,e,i,n)}ZA(t,i,e){var s,n;const r=this.HA.adBreakState,h=(0,dt.kE)((0,di.oK)(t.getAdDuration(),2))?(0,di.oK)(t.getAdDuration(),2):0,o=(0,dt.kE)((0,di.oK)(t.declaredDurationInSeconds,2))?(0,di.oK)(t.declaredDurationInSeconds,2):0,a=h-o,c=(0,ut.H8)(t.createdTimestamp),l=this.HA.adContainerState.get(t.settings.adManagerLineItem.protoLineItem.adType).viewability,u={adPodSlotPosition:r.adPodSlotIndex,adsourceType:t.adSourceType,advertiserLineItemId:t.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,publisherLineItemId:t.settings.adManagerLineItem.protoLineItem.publisherLineItemId,customClientPrice:t.settings.cpm,encryptedPrice:t.settings.requestMetadata.data.encryptedPrice,prebidJsBidderName:t.settings.requestMetadata.data.prebidJsBidderName,rtbAdomain:t.settings.requestMetadata.data.rtbAdomain,creativeId:t.creativeId,rtbSeatId:t.settings.requestMetadata.data.rtbSeatId,syncedUser:t.settings.requestMetadata.data.syncedUser,timeSpent:i,vastMediaType:t.adMediaType,dspId:t.settings.requestMetadata.data.dspId,cnxBidId:t.settings.requestMetadata.data.cnxBidId,winToAdLoadedTime:null===(s=t.settings.bidLifecycle)||void 0===s?void 0:s.winToAdLoadedTime,startAdToImpressionTime:null===(n=t.settings.bidLifecycle)||void 0===n?void 0:n.startAdToImpressionTime,impressionDuration:a,declaredDuration:o,useExploration:this.zt.explorationMode,requestNumber:t.settings.requestMetadata.data.requestNumber,floorPrice:t.settings.requestMetadata.data.requestedFloorPrice,predictedFloorPrice:t.settings.requestMetadata.data.predictedFloorPrice,floorPriceFactor:t.settings.requestMetadata.data.floorPriceFactor,floorPriceBypassReason:t.settings.requestMetadata.data.floorPriceBypassReason,bidElapsedTimeSeconds:c,adBreakType:r.adBreakType,liveRampAts:t.settings.requestMetadata.data.liveRampAts,dynamicElkFieldsValues:{1:t.settings.requestMetadata.data.rtbRequestId,2:t.settings.requestMetadata.data.auctionBidId,4:`${l}`,5:`${t.settings.adManagerLineItem.protoLineItem.viewability}`},hasAdSkip:this.VA};(0,dt.$K)(e)&&(u.auctionInformation=e),this.zt.trackingService.trackVideoAdImpression(u)}iP(t,i,e,s){var n;const r=this.HA.adBreakState,h=(0,ut.H8)(t.createdTimestamp),o={adPodSlotPosition:r.adPodSlotIndex,adsourceType:t.adSourceType,advertiserLineItemId:t.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,publisherLineItemId:t.settings.adManagerLineItem.protoLineItem.publisherLineItemId,error:i,loaded:!0,prebidJsBidderName:t.settings.requestMetadata.data.prebidJsBidderName,vastMediaType:t.adMediaType,syncedUser:t.settings.requestMetadata.data.syncedUser,rtbSeatId:t.settings.requestMetadata.data.rtbSeatId,rtbAdomain:t.settings.requestMetadata.data.rtbAdomain,creativeId:t.creativeId,timeSpent:e,dspId:t.settings.requestMetadata.data.dspId,cnxBidId:t.settings.requestMetadata.data.cnxBidId,winToAdLoadedTime:null===(n=t.settings.bidLifecycle)||void 0===n?void 0:n.winToAdLoadedTime,requestNumber:t.settings.requestMetadata.data.requestNumber,floorPrice:t.settings.requestMetadata.data.requestedFloorPrice,predictedFloorPrice:t.settings.requestMetadata.data.predictedFloorPrice,liveRampAts:t.settings.requestMetadata.data.liveRampAts,bidElapsedTimeSeconds:h,adBreakType:r.adBreakType};(0,dt.$K)(s)&&(o.auctionInformation=s,o.auctionPostbidReason=this.zt.auctionInfoLogging.getGeneralPostbidReason(i)),this.zt.trackingService.addPostBid(o)}eP(t,i){const e=this.NA.indexOf(i)>=0&&!(this.zt.pauseAdWhenFinished||this.zt.loopAdWhenFinished),n=this.HA.adBreakState;e?1===(0,pi.Vm)([99,1])&&(0,s.n)({message:"AdManager_AdImpressionerController_handleQuartilesTracking_track_same_quartile_twice",level:s.D.WARN,exception:t.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,callStack:t.adMediaType}):(this.NA.push(i),this.zt.trackingService.trackVideoAdQuartile({advertiserLineItemId:t.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,publisherLineItemId:t.settings.adManagerLineItem.protoLineItem.publisherLineItemId,quartile:i,rtbSeatId:t.settings.requestMetadata.data.rtbSeatId,dspId:t.settings.requestMetadata.data.dspId,adBreakType:n.adBreakType,hasAdSkip:this.VA,rtbAdomain:t.settings.requestMetadata.data.rtbAdomain}))}JA(t){const i=Date.now();this.jA.push(t.onVpaidEvent.subscribe((e=>{var n;const r=function(t,i){switch(t){case Vt.fI.AdImpression:return i.adImpression;case Vt.fI.AdClickThru:return i.adClick;case Vt.fI.AdStarted:return i.adStarted;case Vt.fI.AdVideoStart:return i.adVideoStart;case Vt.fI.AdVideoFirstQuartile:return i.adQuartileFirst;case Vt.fI.AdVideoMidpoint:return i.adQuartileSecond;case Vt.fI.AdVideoThirdQuartile:return i.adQuartileThird;case Vt.fI.AdVideoComplete:return i.adQuartileFourth;case Vt.fI.AdPaused:return i.adPause;case Vt.fI.AdPlaying:return i.adResume;case Vt.fI.AdSkipped:return i.adSkip;case Vt.fI.AdUserClose:return i.adUserClose;case Vt.fI.AdUserAcceptInvitation:return i.adUserAcceptInvitation;case Vt.fI.AdUserMinimize:return i.adUserMinimize;case Vt.fI.AdError:return i.adError}}(e.type,t.settings.trackers),h=Date.now()-i;switch(r||e.type!==Vt.fI.AdImpression||(this.sP("AdManager_AdImpressionController_tracker_impression_not_found"),(0,s.n)({message:"AdManager_AdImpressionController_tracker_impression_not_found",level:s.D.CRITICAL},{sendMaxLog:!1})),Di.track(r,this.zt.adMacroReplacer,t.settings.adManagerLineItem.protoLineItem,t.settings.callingState),e.type){case Vt.fI.AdError:this.KA(t,h,e.payload.errorMessage);break;case Vt.fI.AdSkipped:this.KA(t,h,zi.AdStopped);break;case Vt.fI.AdStopped:this.KA(t,h,zi.AdStopped,null===(n=e.payload)||void 0===n?void 0:n.shouldTrackPostBid);break;case Vt.fI.AdImpression:this.QA(t,h,e.payload.adSourceData.skipOffset);break;case Vt.fI.AdVideoFirstQuartile:this.eP(t,l.ProtoQuartilesEnum.First);break;case Vt.fI.AdVideoMidpoint:this.eP(t,l.ProtoQuartilesEnum.Second);break;case Vt.fI.AdVideoThirdQuartile:this.eP(t,l.ProtoQuartilesEnum.Third);break;case Vt.fI.AdVideoComplete:this.eP(t,l.ProtoQuartilesEnum.Fourth)}}))),this.jA.push(t.onAdViewableImpression.subscribe((i=>{i.adBreakType=this.HA.adBreakState.adBreakType,i.hasAdSkip=this.VA,this.zt.trackingService.trackVideoAdImpressionViewable(i),Di.track(t.settings.trackers.adViewableImpression,this.zt.adMacroReplacer,t.settings.adManagerLineItem.protoLineItem,t.settings.callingState)})))}YA(t,i){if((0,dt.kE)(t)&&t>=0)return!0;return ri(i,this.zt.skipAdSettings)}sP(t,i){(0,s.n)({message:t,level:s.D.CRITICAL,exception:null==i?void 0:i.message,callStack:null==i?void 0:i.stack},{sendMaxLog:!1})}}const vr={[l.ProtoAdBreakTypeEnum.PreRoll]:"preRoll",[l.ProtoAdBreakTypeEnum.MidRoll]:"midRoll",[l.ProtoAdBreakTypeEnum.PostRoll]:"postRoll"};class yr{constructor(t,i){this.yw=t,this.th=i}replace(t,i,e){this.yw.setAdWidth(e.adMacros.adWidth),this.yw.setAdHeight(e.adMacros.adHeight),this.yw.setAdPosition(vr[e.adMacros.adPostion]),e.mediaMacros.mediaDescription&&this.yw.setVideoDescription(e.mediaMacros.mediaDescription),e.mediaMacros.mediaDuration&&this.yw.setVideoDuration(e.mediaMacros.mediaDuration),e.mediaMacros.mediaId&&this.yw.setVideoId(e.mediaMacros.mediaId),e.mediaMacros.mediaTitle&&this.yw.setVideoTitle(e.mediaMacros.mediaTitle),e.mediaMacros.mediaUrl&&this.yw.setVideoUrl(e.mediaMacros.mediaUrl);const s=this.th.isConsent(i);this.yw.setGDPR(this.th.isConsentRequired()?1:0),this.yw.setConsent(s?1:0),this.yw.setGDPRConsent(this.th.getConsentPayload()),this.yw.setNPA(this.th.isPersonalisedAdsAllowed()?0:1);const n=this.th.getTrackableUser(),r=this.th.isConsentConnatix()&&s?n:void 0;return this.yw.setUUID(r),this.yw.setupMacros(t)}}var br=o(6798),xr=o(2566);function wr(t,i){return(0,br.e)((function(e,s){var n=0;e.subscribe((0,xr.x)(s,(function(e){s.next(t.call(i,e,n++))})))}))}var _r=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t};function Sr(t){return(0,Je.m)(null==t?void 0:t.then)}var Ar=o(6766);function Pr(t){return(0,Je.m)(t[Ar.L])}function Ir(t){return Symbol.asyncIterator&&(0,Je.m)(null==t?void 0:t[Symbol.asyncIterator])}function kr(t){return new TypeError("You provided "+(null!==t&&"object"==typeof t?"an invalid object":"'"+t+"'")+" where a stream was expected. You can provide an Observable, Promise, ReadableStream, Array, AsyncIterable, or Iterable.")}var Cr="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function Tr(t){return(0,Je.m)(null==t?void 0:t[Cr])}function Mr(t){return(0,je.FC)(this,arguments,(function(){var i,e,s;return(0,je.Jh)(this,(function(n){switch(n.label){case 0:i=t.getReader(),n.label=1;case 1:n.trys.push([1,,9,10]),n.label=2;case 2:return[4,(0,je.qq)(i.read())];case 3:return e=n.sent(),s=e.value,e.done?[4,(0,je.qq)(void 0)]:[3,5];case 4:return[2,n.sent()];case 5:return[4,(0,je.qq)(s)];case 6:return[4,n.sent()];case 7:return n.sent(),[3,2];case 8:return[3,10];case 9:return i.releaseLock(),[7];case 10:return[2]}}))}))}function Er(t){return(0,Je.m)(null==t?void 0:t.getReader)}var Br=o(5);function Or(t){if(t instanceof Ge.y)return t;if(null!=t){if(Pr(t))return n=t,new Ge.y((function(t){var i=n[Ar.L]();if((0,Je.m)(i.subscribe))return i.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")}));if(_r(t))return s=t,new Ge.y((function(t){for(var i=0;i<s.length&&!t.closed;i++)t.next(s[i]);t.complete()}));if(Sr(t))return e=t,new Ge.y((function(t){e.then((function(i){t.closed||(t.next(i),t.complete())}),(function(i){return t.error(i)})).then(null,Br.h)}));if(Ir(t))return Lr(t);if(Tr(t))return i=t,new Ge.y((function(t){var e,s;try{for(var n=(0,je.XA)(i),r=n.next();!r.done;r=n.next()){var h=r.value;if(t.next(h),t.closed)return}}catch(t){e={error:t}}finally{try{r&&!r.done&&(s=n.return)&&s.call(n)}finally{if(e)throw e.error}}t.complete()}));if(Er(t))return Lr(Mr(t))}var i,e,s,n;throw kr(t)}function Lr(t){return new Ge.y((function(i){(function(t,i){var e,s,n,r;return(0,je.mG)(this,void 0,void 0,(function(){var h,o;return(0,je.Jh)(this,(function(a){switch(a.label){case 0:a.trys.push([0,5,6,11]),e=(0,je.KL)(t),a.label=1;case 1:return[4,e.next()];case 2:if((s=a.sent()).done)return[3,4];if(h=s.value,i.next(h),i.closed)return[2];a.label=3;case 3:return[3,1];case 4:return[3,11];case 5:return o=a.sent(),n={error:o},[3,11];case 6:return a.trys.push([6,,9,10]),s&&!s.done&&(r=e.return)?[4,r.call(e)]:[3,8];case 7:a.sent(),a.label=8;case 8:return[3,10];case 9:if(n)throw n.error;return[7];case 10:return[7];case 11:return i.complete(),[2]}}))}))})(t,i).catch((function(t){return i.error(t)}))}))}function Rr(t,i,e,s,n){void 0===s&&(s=0),void 0===n&&(n=!1);var r=i.schedule((function(){e(),n?t.add(this.schedule(null,s)):this.unsubscribe()}),s);if(t.add(r),!n)return r}function Dr(t,i,e){return void 0===e&&(e=1/0),(0,Je.m)(i)?Dr((function(e,s){return wr((function(t,n){return i(e,t,s,n)}))(Or(t(e,s)))}),e):("number"==typeof i&&(e=i),(0,br.e)((function(i,s){return function(t,i,e,s,n,r,h,o){var a=[],c=0,l=0,u=!1,d=function(){!u||a.length||c||i.complete()},p=function(t){return c<s?f(t):a.push(t)},f=function(t){r&&i.next(t),c++;var o=!1;Or(e(t,l++)).subscribe((0,xr.x)(i,(function(t){null==n||n(t),r?p(t):i.next(t)}),(function(){o=!0}),void 0,(function(){if(o)try{c--;for(var t=function(){var t=a.shift();h?Rr(i,h,(function(){return f(t)})):f(t)};a.length&&c<s;)t();d()}catch(t){i.error(t)}})))};return t.subscribe((0,xr.x)(i,p,(function(){u=!0,d()}))),function(){null==o||o()}}(i,s,t,e)})))}var jr=o(278);function Vr(t){return void 0===t&&(t=1/0),Dr(jr.y,t)}var Fr=new Ge.y((function(t){return t.complete()}));function $r(t){return t[t.length-1]}function Nr(t){return Qe($r(t))?t.pop():void 0}function Ur(t,i){return"number"==typeof $r(t)?t.pop():i}function Hr(t,i){return void 0===i&&(i=0),(0,br.e)((function(e,s){e.subscribe((0,xr.x)(s,(function(e){return Rr(s,t,(function(){return s.next(e)}),i)}),(function(){return Rr(s,t,(function(){return s.complete()}),i)}),(function(e){return Rr(s,t,(function(){return s.error(e)}),i)})))}))}function qr(t,i){return void 0===i&&(i=0),(0,br.e)((function(e,s){s.add(t.schedule((function(){return e.subscribe(s)}),i))}))}function zr(t,i){if(!t)throw new Error("Iterable cannot be null");return new Ge.y((function(e){Rr(e,i,(function(){var s=t[Symbol.asyncIterator]();Rr(e,i,(function(){s.next().then((function(t){t.done?e.complete():e.next(t.value)}))}),0,!0)}))}))}function Wr(t,i){if(null!=t){if(Pr(t))return function(t,i){return Or(t).pipe(qr(i),Hr(i))}(t,i);if(_r(t))return function(t,i){return new Ge.y((function(e){var s=0;return i.schedule((function(){s===t.length?e.complete():(e.next(t[s++]),e.closed||this.schedule())}))}))}(t,i);if(Sr(t))return function(t,i){return Or(t).pipe(qr(i),Hr(i))}(t,i);if(Ir(t))return zr(t,i);if(Tr(t))return function(t,i){return new Ge.y((function(e){var s;return Rr(e,i,(function(){s=t[Cr](),Rr(e,i,(function(){var t,i,n;try{i=(t=s.next()).value,n=t.done}catch(t){return void e.error(t)}n?e.complete():e.next(i)}),0,!0)})),function(){return(0,Je.m)(null==s?void 0:s.return)&&s.return()}}))}(t,i);if(Er(t))return function(t,i){return zr(Mr(t),i)}(t,i)}throw kr(t)}function Gr(t,i){return i?Wr(t,i):Or(t)}var Jr=o(4975);function Qr(t,i){return void 0===i&&(i=!1),(0,br.e)((function(e,s){var n=0;e.subscribe((0,xr.x)(s,(function(e){var r=t(e,n++);(r||i)&&s.next(e),!r&&s.complete()})))}))}function Yr(t,i,e){var s=(0,Je.m)(t)||i||e?{next:t,error:i,complete:e}:t;return s?(0,br.e)((function(t,i){var e;null===(e=s.subscribe)||void 0===e||e.call(s);var n=!0;t.subscribe((0,xr.x)(i,(function(t){var e;null===(e=s.next)||void 0===e||e.call(s,t),i.next(t)}),(function(){var t;n=!1,null===(t=s.complete)||void 0===t||t.call(s),i.complete()}),(function(t){var e;n=!1,null===(e=s.error)||void 0===e||e.call(s,t),i.error(t)}),(function(){var t,i;n&&(null===(t=s.unsubscribe)||void 0===t||t.call(s)),null===(i=s.finalize)||void 0===i||i.call(s)})))})):jr.y}class Xr{constructor(t){this.bid=t,this.cancelled=!1,this.nP=new It.x,this.rP=!1,this.Fg=this.bid.onVpaidEvent.pipe((0,Jr.h)((t=>t.type===Vt.fI.AdLoaded)),Qr((()=>!this.rP)),Yr((()=>{this.rP=!0}))),this.$g=this.bid.onVpaidEvent.pipe((0,Jr.h)((t=>t.type===Vt.fI.AdError)),wr((t=>t.payload.errorMessage)),Qr((()=>!this.rP)),Yr((()=>{this.rP=!0})))}get onSuccess(){return this.Fg}get onFailure(){return function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var e=Nr(t),s=Ur(t,1/0),n=t;return n.length?1===n.length?Or(n[0]):Vr(s)(Gr(n,e)):Fr}(this.nP,this.$g)}loadBid(t,i,e,s,n){this.bid.initAd(t,i,e,s,void 0,void 0,n)}}class Zr{constructor(t){this.zt=t,this.hP=new Set,this.wf=[],this.Bu=!1,this.oP=()=>{const t=Date.now();if(this.aP())return void this.zt.auctionManager.onNothingToWin();const i=this.cP(),{selectedBid:e}=i;return e?(this.zt.auctionInfoLogging.winBid(e),this.lP(i,this.uP.vastViewMode).catch((s=>{const n=this.zt.auctionInfoLogging.onPostBid(i.selectedBid);throw this.fP(e,t,s,n),this.mP(),i})).then((()=>{this.mP()})).catch((t=>{if(t===i)return;let e="";try{e=JSON.stringify(t)}catch(t){}(0,s.n)({message:"AdManager_winBid_failed",level:s.D.CRITICAL,exception:t,callStack:e},{throttle:3,sendMaxLog:!1})}))):void 0},this.pS=new Xn(this.oP,10),this.wf.push(this.zt.adBidPool.getBidPoolBidEvents(ki.ON_BID).subscribe((t=>{const i=this.cP();this.zt.auctionInfoLogging.newBidAdded(t,i),this.mP()})),this.zt.adBidPool.getBidPoolBidEvents(ki.ON_BID_STARTED).subscribe((()=>{this.mP()})),this.zt.adBidPool.getBidPoolBidEvents(ki.ON_BID_READY_CONSUMED).subscribe((()=>{this.mP()})),this.zt.impressionCapsTimer.onTimer().subscribe((()=>{this.mP()})))}isLoadingBids(){return this.hP.size>0}win(t){this.uP=t,this.pS.setNumberOfThreads(t.maxParallelWins),this.Bu=!0,this.mP()}stop(){this.Bu=!1,this.pS.stop()}destroy(){this.stop(),(0,jt.i)(this.wf)}mP(){this.Bu&&this.pS.start()}cP(){const t=this.gP(),i=this.vP();return this.yP(t,i)}yP(t,i){const e=Object.assign({},t);return t.selectedBid&&i.selectedBid?(this.bP(i.selectedBid,t.selectedBid)&&(e.selectedBid=void 0,e.unselectedBidList.push({bid:t.selectedBid,lossReason:l.ProtoAuctionLossReasonEnum.CompetitorPriority})),e):e}aP(){if(-1===this.zt.maxNumberOfWins)return!1;const t=this.zt.adBidPool.getBidsByStatus([Wn.READY]),i=this.zt.adBidPool.getBidsByStatus([Wn.STARTED]),e=this.zt.adBidPool.getBidsByStatus([Wn.IMPRESSION]);this.xP(i,e);return t.length+this.hP.size+(i[0]?1:0)+(e[0]?1:0)>=this.zt.maxNumberOfWins}xP(t,i){t.length+i.length<=1||(0,s.n)({message:"AdWinnerController_multiple_bids_started",level:s.D.CRITICAL,callStack:`${t.length}`,exception:`${i.length}`},{throttle:2,sendMaxLog:!1})}gP(){return this.wP(this.zt.adBidPool.getBidsByStatus([Wn.IDLE]))}vP(){const t=[...(0,f.ee)(this.hP).map((t=>t.bid)),...this.zt.adBidPool.getBidsByStatus([Wn.READY])];return this.wP(t)}wP(t){return this.zt.adWinnerYo.selectBestBid(t,this.uP.stateSettings,this.zt.impressionCapsService)}bP(t,i){return!(this.zt.adWinnerYo.getWinningYoScore(t.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,t.settings.id)<=this.zt.adWinnerYo.getWinningYoScore(i.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,i.settings.id))}lP(t,i){return new Promise(((e,s)=>{const{selectedBid:n,state:r}=t,h=new Xr(n);this.hP.add(h),this.zt.adBidPool.changeBidStatus(n,Wn.LOADING),h.onSuccess.subscribe((()=>{this.hP.delete(h),this._P(n),this.zt.adBidPool.changeBidStatus(n,Wn.READY),e()})),h.onFailure.subscribe((t=>{this.hP.delete(h),this.zt.adBidPool.consumeBid(n,Gn.BID_LOADING_CONSUMED),s(t)}));const{width:o,height:a}=r.adContainerState.get(n.settings.adManagerLineItem.protoLineItem.adType);h.loadBid(o,a,i,this.zt.desiredBitRateForWins,r.soundValue),Di.track(n.settings.trackers.adWin,this.zt.adMacroReplacer,n.settings.adManagerLineItem.protoLineItem,r)}))}_P(t){const{creativeType:i,floorPrice:e,customCpm:s,successRate:n,advertiserLineItemId:r,lineItemPriority:h}=t.settings.adManagerLineItem.protoLineItem,{id:o,cpm:a,obfuscatedPrice:c,successRate:l}=t.settings,u=t.getAdDuration();this.zt.adWinnerYo.registerWinningInformation({lineItemId:r,bidId:o,creativeType:i,floorPrice:e,obfuscatedPrice:c,cpm:a,successRate:l||n,priority:h,adDuration:u,customCpm:s})}fP(t,i,e,s){this.SP(t,Date.now()-i,e,s),this.zt.adWinnerYo.registerPostBid(t.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,t.settings.id)}SP(t,i,e,s){var n,r,h,o,a;Di.track(t.settings.trackers.adError,this.zt.adMacroReplacer,t.settings.adManagerLineItem.protoLineItem,t.settings.callingState);const c=(null===(r=null===(n=this.uP.stateSettings)||void 0===n?void 0:n.currentState)||void 0===r?void 0:r.adBreakState)||(null===(o=null===(h=this.uP.stateSettings)||void 0===h?void 0:h.predictedState)||void 0===o?void 0:o.adBreakState),l=(0,ut.H8)(t.createdTimestamp),u={adPodSlotPosition:c.adPodSlotIndex,adsourceType:t.adSourceType,advertiserLineItemId:t.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,publisherLineItemId:t.settings.adManagerLineItem.protoLineItem.publisherLineItemId,error:e,loaded:!1,prebidJsBidderName:t.settings.requestMetadata.data.prebidJsBidderName,vastMediaType:t.adMediaType,syncedUser:t.settings.requestMetadata.data.syncedUser,rtbSeatId:t.settings.requestMetadata.data.rtbSeatId,rtbAdomain:t.settings.requestMetadata.data.rtbAdomain,creativeId:t.creativeId,timeSpent:i,dspId:t.settings.requestMetadata.data.dspId,cnxBidId:t.settings.requestMetadata.data.cnxBidId,winToAdLoadedTime:null===(a=t.settings.bidLifecycle)||void 0===a?void 0:a.winToAdLoadedTime,requestNumber:t.settings.requestMetadata.data.requestNumber,floorPrice:t.settings.requestMetadata.data.requestedFloorPrice,predictedFloorPrice:t.settings.requestMetadata.data.predictedFloorPrice,liveRampAts:t.settings.requestMetadata.data.liveRampAts,bidElapsedTimeSeconds:l};(0,dt.$K)(s)&&(u.auctionInformation=s,u.auctionPostbidReason=this.zt.auctionInfoLogging.getGeneralPostbidReason(e)),this.zt.trackingService.addPostBid(u)}}var Kr,th,ih;!function(t){function i(t,i){return!t.protoLineItem.sound||i.sound}function e(t,i){const e=i.adContainerState.get(t.protoLineItem.adType).viewability;return!t.protoLineItem.viewability||e}function s(t,i){return!t.protoLineItem.adBreakSettings||t.protoLineItem.adBreakSettings.adBreakTargeting.some((t=>{if(t.adRollType===i.adBreakState.adBreakType)return function(t,i){switch(t){case l.ProtoLineItemAdBreakTypeEnum.All:return!0;case l.ProtoLineItemAdBreakTypeEnum.AdPod:return i;case l.ProtoLineItemAdBreakTypeEnum.SingleAd:return!i}}(t.adBreakTypeEnum,i.adBreakState.isAdPodBreak)}))}function n(t,i){return!(t.protoLineItem.mediaIdTargeting&&!c(i.media.mediaId,t.protoLineItem.mediaIdTargeting))&&(!(t.protoLineItem.mediaKeywordsTargeting&&!c(i.media.mediaKeywords,t.protoLineItem.mediaKeywordsTargeting))&&!(t.protoLineItem.mediaLanguageTargeting&&!c(i.media.mediaLanguage,t.protoLineItem.mediaLanguageTargeting)))}function r(t,i){var e,s,n;const{advertiserContextualTargeting:r,publisherContextualTargeting:h}=t.protoLineItem,o=(null===(e=i.media.mediaInsights)||void 0===e?void 0:e.insights)||[],a=!!(null===(s=i.media.mediaInsights)||void 0===s?void 0:s.insightsFallback),c=(null===(n=i.page.insights)||void 0===n?void 0:n.insights)||[];return!((0,f.BZ)(r)&&!u(r,o,a,c))&&!((0,f.BZ)(h)&&!u(h,o,a,c))}function h(t,i){const{playerSizeTargetings:e}=t.protoLineItem,{width:s}=i.adContainerState.get(t.protoLineItem.adType);return!(0,dt.as)(e)||!(0,dt.kE)(s)||(e.sizeChoiceCriteria===l.ProtoSizeChoiceCriteriaEnum.GreaterThan?!(0,dt.kE)(e.minWidth)||s>=e.minWidth:e.sizeChoiceCriteria===l.ProtoSizeChoiceCriteriaEnum.SmallerThan?!(0,dt.kE)(e.maxWidth)||s<=e.maxWidth:e.sizeChoiceCriteria!==l.ProtoSizeChoiceCriteriaEnum.Between||(!(0,dt.kE)(e.maxWidth)||!(0,dt.kE)(e.minWidth)||s>=e.minWidth&&s<=e.maxWidth))}function o(t,i){const{playerOrientationTargeting:e}=t.protoLineItem;switch(e){case l.ProtoPlayerOrientationTargetingEnum.Landscape:if(i.playerOrientation===ci.Portrait)return!1;break;case l.ProtoPlayerOrientationTargetingEnum.Portrait:if(i.playerOrientation===ci.Landscape)return!1}return!0}function a(t,i){var e;const s=null===(e=t.protoLineItem.adBreakSettings)||void 0===e?void 0:e.adPodTargeting;if(!s)return!0;if(!i.adBreakState.isAdPodBreak)return!0;const n=i.adBreakState.adPodSlotIndex;let r=!0;switch(s.adSlotTargetingType){case l.ProtoLineItemAdSlotTargetingTypeEnum.Interval:(n<s.adSlotPositions[0]||n>s.adSlotPositions[1])&&(r=!1);break;case l.ProtoLineItemAdSlotTargetingTypeEnum.SpecificSlots:-1===s.adSlotPositions.indexOf(n)&&(r=!1)}return s.targetingType===l.ProtoLineItemTargetingTypeEnum.Except&&(r=!r),r}function c(t,i){if((0,f.BZ)(i.items)&&Array.isArray(t)){const e=(0,f.tN)(t,i.items).length;return i.choiceCriteria===l.ProtoChoiceCriteriaEnum.Only?e>0:0===e}const e=(0,f.d3)(t,i.items);return i.choiceCriteria===l.ProtoChoiceCriteriaEnum.Only?e:!e}function u(t,i,e,s){return t.some((t=>function(t,i,e,s){for(let n=0;n<t.filters.length;n++){const r=t.filters[n],h=e?r.items:r.hashedItemsIds,o=r.hashedItemsIds,a=i.filter((t=>h.includes(t))).length,c=s.filter((t=>o.includes(t))).length,u=d(r.type,a,h),p=d(r.type,c,o);switch(r.level){case l.ProtoContextualTargetingLevelEnum.Media:if(!u)return!1;break;case l.ProtoContextualTargetingLevelEnum.Page:if(!p)return!1;break;case l.ProtoContextualTargetingLevelEnum.Both:if(!u||!p)return!1}}return!0}(t,i,e,s)))}function d(t,i,e){switch(t){case l.ProtoLineItemContextualTargetingEnum.IncludeAny:if(0===i)return!1;break;case l.ProtoLineItemContextualTargetingEnum.IncludeAll:if(i!==e.length)return!1;break;case l.ProtoLineItemContextualTargetingEnum.ExcludeAny:if(i>0)return!1;break;case l.ProtoLineItemContextualTargetingEnum.ExcludeAll:if(i===e.length)return!1}return!0}t.isLineItemTargetingAllowed=function(t,c){return e(t,c)&&i(t,c)&&s(t,c)&&n(t,c)&&a(t,c)&&r(t,c)&&h(t,c)&&o(t,c)},t.isAllowedBySound=i,t.isAllowedByViewability=e,t.isAllowedByAdBreakType=s,t.isAllowedByMediaTargeting=n,t.isAllowedByContextualTargeting=r,t.isAllowedByPlayerSizeTargeting=h,t.isAllowedByPlayerOrientationTargeting=o,t.isAllowedByPodTargeting=a,t.isAllowedRegardingDuration=function(t,i){return!t||0===i||t<=i},t.isDimensionsAllowedForNonLinearBanner=function(t,i,e,s){if(!xi(t,null==i?void 0:i.nonLinearRequestType))return!0;const n=Math.ceil((0,di.Tc)(s.height,hi.NON_LINEAR_MAX_HEIGHT_PERCENT));return!(!e||(null==e?void 0:e.width)>s.width||(null==e?void 0:e.height)>n)}}(Kr||(Kr={}));class eh{constructor(t){this.AP=t}registerBiddingInformation(t){this.AP.registerBiddingInformation(t)}registerWinningInformation(t){return this.AP.registerWinningInformation(t)}registerPreBidFromBid(t,i){this.AP.registerPreBidFromBid(t,i)}registerImpression(t,i){this.AP.registerImpression(t,i)}registerPostBid(t,i){this.AP.registerPostBid(t,i)}getCallingYoScore(t){return this.AP.getCallingYoScore(t)}getWinningYoScore(t,i){return this.AP.getWinningYoScore(t,i)}getImpressionYoScore(t,i){return this.AP.getImpressionYoScore(t,i)}PP(t,i){const e=t.getAdDuration(),s=i.adBreakState.sessionMaxAdDuration;return Kr.isAllowedRegardingDuration(e,s)}IP(t,i){const e=t.getAdDuration(),s=i.adBreakState.remainingAdDuration;return Kr.isAllowedRegardingDuration(e,s)}kP(t,i){const e=t.settings.adManagerLineItem.protoLineItem;return Kr.isDimensionsAllowedForNonLinearBanner(e.adType,e.nonlinearLineItemSettings,t.settings.dimensions,i)}CP(t,i,e){return e.canCall(t.settings.adManagerLineItem,i.adOpportunity.id)&&Kr.isLineItemTargetingAllowed(t.settings.adManagerLineItem,i)&&this.PP(t,i)&&this.IP(t,i)&&this.kP(t,i)}}class sh extends eh{constructor(t,i,e,s,n,r){super(t),this.TP=e,this.MP=s,this.EP=n,this.BP=r}getBestLineItem(t,i){const e=i.currentState||i.predictedState;if(!e)return;const s=this.OP(t);return s?{state:e,lineItemList:this.LP(s,t)}:void 0}getCallableLineItems(t,i){const e=i.currentState||i.predictedState;return t.filter((t=>{if(t.aggregators.size>0)return!1;const i=[Wn.IMPRESSION],s=this.MP.getAllBidsForLineItem(t.protoLineItem.advertiserLineItemId,i);return!(!vi(t.protoLineItem.creativeType)&&(s.length>0||t.callers.size>0)&&!t.protoLineItem.forceCallingInEveryAO)&&this.BP.canCall(t,e.adOpportunity.id)})).filter((t=>!Zn.getInstance().isLineItemPlatformCapped({advertiserLineItemId:t.protoLineItem.advertiserLineItemId,publisherLineItemId:t.protoLineItem.publisherLineItemId}))).filter((t=>Kr.isLineItemTargetingAllowed(t,e))).filter((t=>this.RP(t,e)))}isBidTargetingAllowed(t,i,e){return this.CP(t,i,e)}isBidTargetingAllowedEverInSession(t,i){return this.PP(t,i)}RP(t,i){if(vi(t.protoLineItem.creativeType))return!0;if(t.protoLineItem.forceCallingInEveryAO)return!0;const e=this.MP.getBidsExceptStatus([Wn.STARTED,Wn.IMPRESSION]).filter((t=>this.isBidTargetingAllowed(t,i,this.EP))),s=t.protoLineItem.floorPrice||t.protoLineItem.customCpm,n=this.getCallingYoScore(t.protoLineItem.advertiserLineItemId),r=this.TP.callingLineItems,h=[...e.map((t=>t.getPrice()))],o=[...r.map((t=>this.getCallingYoScore(t.protoLineItem.advertiserLineItemId)))];for(let t=0;t<h.length;t++)if(s<h[t])return!1;for(let t=0;t<o.length;t++)if(n<o[t])return!1;return!0}OP(t){let i=t;return t.some((t=>vi(t.protoLineItem.creativeType)))&&(i=i.filter((t=>vi(t.protoLineItem.creativeType)))),this.DP(i)[0]}DP(t=[]){return t.sort(((t,i)=>this.getCallingYoScore(i.protoLineItem.advertiserLineItemId)-this.getCallingYoScore(t.protoLineItem.advertiserLineItemId)))}LP(t,i){const{creativeType:e}=t.protoLineItem;return vi(e)?this.DP(i.filter((t=>e===t.protoLineItem.creativeType))):[t]}}class nh extends eh{getBestBid(t,i,e){return this.jP(t,i,e)}getBetterBid(t,i){const e=t.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,s=t.settings.id,n=i.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,r=i.settings.id;return this.getImpressionYoScore(e,s)>this.getImpressionYoScore(n,r)?t:i}jP(t,i,e){return[...t].filter((t=>this.CP(t,i,e))).sort(((t,i)=>{const e=t.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,s=t.settings.id,n=i.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,r=i.settings.id;return this.getImpressionYoScore(n,r)-this.getImpressionYoScore(e,s)}))[0]}}class rh extends eh{constructor(){super(...arguments),this.VP=(t,i,e)=>{const s=[],n=[];for(const r of t){this.CP(r,i.currentState||i.predictedState,e)?s.push(r):n.push(r)}return{allowedBidList:s,notAllowedBidList:n}}}selectBestBid(t,i,e){const s=this.VP(t,i,e),{allowedBidList:n,notAllowedBidList:r}=s,h=i.currentState||i.predictedState,o=this.FP(n),a=r.map((t=>({bid:t,lossReason:this.$P(t,h)}))),c=n.filter((t=>t!==o)).map((t=>({bid:t,lossReason:l.ProtoAuctionLossReasonEnum.CompetitorPriority})));return{state:h,selectedBid:o,unselectedBidList:[...a,...c]}}isBetterBid(t,i){const e=t.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,s=t.settings.id,n=i.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,r=i.settings.id;return this.getWinningYoScore(e,s)>this.getWinningYoScore(n,r)}FP(t){if((0,f.BZ)(t))return[...t].sort(((t,i)=>{const e=t.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,s=t.settings.id,n=i.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,r=i.settings.id;return this.getWinningYoScore(n,r)-this.getWinningYoScore(e,s)}))[0]}$P(t,i){return this.IP(t,i)?l.ProtoAuctionLossReasonEnum.AdOpportunityEnd:l.ProtoAuctionLossReasonEnum.TargetingMismatch}}!function(t){t[t.ON_STARTED=0]="ON_STARTED",t[t.ON_END=1]="ON_END"}(th||(th={}));class hh{constructor(t){this.zt=t,this.NP=new It.x,this.UP=[],this.HP=!1,this.qP=!1,this.wf=[]}get onAuctionMechanismEnded(){return this.NP.asObservable()}startNewAuction(t){this.zP=t.callingState,this.qP=t.waitForNewReadyBid,this.WP(),this.GP(),this.JP(),this.QP()}cancelAuction(){this.WP()}updateState(t){if(this.zP=t,0===this.UP.length)return;const i=this.zt.adCallingPool.callingLineItems.map((t=>t.protoLineItem.advertiserLineItemId)),e=this.zt.adCallerYo.getCallableLineItems(this.zt.lineItems,this.zP.stateSettings).map((t=>t.protoLineItem.advertiserLineItemId));this.UP=this.UP.filter((t=>t.isAdCalled||(0,f.d3)(t.lineItemId,e)||(0,f.d3)(t.lineItemId,i))),this.QP()}onNothingToWin(){0!==this.UP.length&&this.UP.every((t=>!0===t.isAdCalled))&&this.QP()}onNothingToCall(){0!==this.UP.length&&(this.YP(),this.QP())}YP(){const t=this.zt.adCallingPool.callingLineItems.map((t=>t.protoLineItem.advertiserLineItemId));this.UP=this.UP.filter((i=>!0===i.isAdCalled||!1===i.isAdCalled&&(0,f.d3)(i.lineItemId,t)))}XP(){this.WP(),this.NP.next()}JP(){this.wf.push(this.zt.adBidPool.getBidPoolBidEvents(ki.ON_BID_READY).subscribe((t=>{this.HP=!0,this.QP()})),this.zt.adBidPool.getBidPoolBidEvents(ki.ON_BID_LOADING_CONSUMED).subscribe((t=>{this.QP()})),this.zt.adCallingPool.getAdCallingPoolEvents(th.ON_END).subscribe((t=>{this.ZP(t),this.QP()})))}ZP(t){this.UP.forEach((i=>{t.some((t=>t.protoLineItem.advertiserLineItemId===i.lineItemId))&&(i.isAdCalled=!0)}))}KP(){(0,jt.i)(this.wf)}QP(){this.qP&&!this.HP||(0!==this.UP.length?this.UP.every((t=>!0===t.isAdCalled))&&this.tI()&&this.XP():this.XP())}tI(){const t=this.iI(this.zt.adBidPool.getBidsByStatus([Wn.READY]));if(!t)return!1;const i=this.zt.adWinnerYo.selectBestBid(this.zt.adBidPool.getBidsByStatus([Wn.IDLE]),this.zP.stateSettings,this.zt.impressionCapsService),e=[...this.zt.adBidPool.getBidsByStatus([Wn.LOADING])];i.selectedBid&&e.push(i.selectedBid);const s=this.iI(e);if(!s)return!0;return this.zt.adWinnerYo.getWinningYoScore(t.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,t.settings.id)>=this.zt.adWinnerYo.getWinningYoScore(s.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,s.settings.id)}iI(t){if(t&&0!==t.length)return t.reduce(((t,i)=>this.zt.adWinnerYo.getWinningYoScore(t.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,t.settings.id)>this.zt.adWinnerYo.getWinningYoScore(i.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,i.settings.id)?t:i))}WP(){this.UP=[],this.HP=!1,this.KP()}GP(){this.eI(this.zP.stateSettings),this.sI(this.zP.stateSettings),this.nI()}nI(){this.zt.adCallingPool.callingLineItems.forEach((t=>{this.hI(t)}))}sI(t){const i=this.oI(),e=this.zt.adCallerYo.getCallableLineItems(i,t),s=e.filter((t=>t.protoLineItem.forceCallingInEveryAO)),n=this.aI(e,t);if(!n)return void this.cI(s);this.uI()>this.zt.adCallerYo.getCallingYoScore(n.protoLineItem.advertiserLineItemId)?this.cI(s):(this.hI(n),s.filter((t=>t!==n)).forEach((t=>{this.hI(t)})))}eI(t){const i=this.dI();this.zt.adCallerYo.getCallableLineItems(i,t).forEach((t=>{this.hI(t)}))}oI(){return this.zt.lineItems.filter((t=>!vi(t.protoLineItem.creativeType)))}dI(){return this.zt.lineItems.filter((t=>vi(t.protoLineItem.creativeType)))}aI(t,i){const e=this.zt.adCallerYo.getBestLineItem(t,i);if(e&&(0,f.BZ)(e.lineItemList))return e.lineItemList[0]}uI(){const t=this.zt.adBidPool.getBidsByStatus([Wn.READY]),i=this.iI(t);return i?this.zt.adWinnerYo.getWinningYoScore(i.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,i.settings.id):0}hI(t){this.UP.some((i=>i.lineItemId===t.protoLineItem.advertiserLineItemId))||this.UP.push({isAdCalled:!1,lineItemId:t.protoLineItem.advertiserLineItemId})}cI(t){t.forEach((t=>{this.hI(t)}))}}!function(t){t.ShortCircuitEnd="short",t.TimeoutEnd="timeout",t.Prefetch="prefetched"}(ih||(ih={}));class oh{constructor(t,i){this.Tm=t,this.pI=null,this.mI=new It.x,this.NP=new It.x,this.gI=null,this.vI={inPrefetchMode:!1,startTime:0,prefetchEnded:!1},this.yI={id:"",auctionEnded:!1},this.bI=new hh({lineItems:i.lineItems,impressionCapsService:i.impressionCapsService,requestCapsService:i.requestCapsService,yoScoreManager:i.yoScoreManager,adCallerYo:i.adCallerYo,adWinnerYo:i.adWinnerYo,adCallingPool:i.adCallingPool,adBidPool:i.adBidPool}),this.xI()}get onAuctionStopCalling(){return this.NP.asObservable()}get onAuctionEnd(){return this.mI.asObservable()}updateState(t){this.bI.updateState(t)}cancelAuction(){this.vI.inPrefetchMode=!1,this.bI.cancelAuction(),this.wI()}startPrefetch(t){this.wI(),this.vI={inPrefetchMode:!0,startTime:Date.now(),prefetchEnded:!1},this.bI.startNewAuction({callingState:t,waitForNewReadyBid:!0})}startAuction(t,i,e=3e3){if(0===e)return void this.XP();if(this.yI.id===i)return void(this.yI.auctionEnded&&this.XP());this.pI=Date.now(),this.yI={auctionEnded:!1,id:i},this.wI();let s=e;this.vI.inPrefetchMode?(s-=Date.now()-this.vI.startTime,s<0||this.vI.prefetchEnded?this.XP(ih.Prefetch):this._I(s)):(this.bI.startNewAuction({callingState:t,waitForNewReadyBid:!1}),this._I(s)),this.vI.inPrefetchMode=!1}onNothingToWin(){this.bI.onNothingToWin()}onNothingToCall(){this.bI.onNothingToCall()}destroy(){this.SI.unsubscribe(),this.SI=null}xI(){this.SI=this.bI.onAuctionMechanismEnded.subscribe((()=>{this.AI()}))}AI(){this.vI.prefetchEnded=!0,this.NP.next(),this.vI.inPrefetchMode||this.XP(ih.ShortCircuitEnd)}_I(t){this.gI=this.Tm.setTimeout((()=>{this.XP(ih.TimeoutEnd)}),t)}XP(t){null!==this.pI&&(0,dt.$K)(t)&&(this.II(t,Date.now()-this.pI),this.pI=null),this.yI.auctionEnded=!0,this.cancelAuction(),this.mI.next()}wI(){this.Tm.clearTimeout(this.gI),this.gI=null}II(t,i){(0,pi.Vm)([99,1])&&(0,s.n)({message:"AuctionManager_end_auction",exception:t,callStack:this.kI(i),level:s.D.INFO},{sendMaxLog:!1,throttle:1e4})}kI(t,i=0){const e=[0,.25,.5,.75,1,1.25,1.5,1.75,2,2.25,2.5,2.75,3,4,5][i];return void 0===e?"over_5s":t<=1e3*e?`${e}`:this.kI(t,i+1)}}class ah{constructor(){this.requestNumber=0}}class ch{constructor(t){this.protoLineItem=t,this.historicalMetrics=new ah,this.callers=new Set,this.aggregators=new Set}}class lh{constructor(t,i){this.parentContainer=t,this.xc=i,this.isImaSlot=!1,this.slotsContainer=this.xc.createElementByString('<div class= "cnx-ad-bid-slot"></div>'),this.adSlot=this.xc.createElementByString('<div class="cnx-ad-slot"></div>'),this.videoSlot=this.xc.createElementByString('<video class="cnx-ad-slot cnx-ad-video-slot"></video>'),this.videoSlot.setAttribute("playsinline",""),this.videoSlot.setAttribute("webkit-playsinline",""),this.slotsContainer.appendChild(this.videoSlot),this.slotsContainer.appendChild(this.adSlot),this.parentContainer.appendChild(this.slotsContainer)}destroy(){this.parentContainer.removeChild(this.slotsContainer)}sanitize(){}}class uh extends lh{constructor(){super(...arguments),this.isImaSlot=!0,this.CI=!1,this.TI={imaAdDisplayContainer:void 0,imaAdsLoader:void 0,imaSdk:void 0}}fetchImaDependencies(){return he.fetchImaSdk(window,!0).then((t=>this.MI(t)))}destroy(){this.TI.imaAdsLoader&&this.TI.imaAdsLoader.destroy(),this.TI.imaAdDisplayContainer&&this.TI.imaAdDisplayContainer.destroy(),super.destroy()}sanitize(){this.TI.imaAdsLoader.contentComplete(),super.sanitize()}MI(t){if(this.CI)return this.TI;t.settings.setDisableCustomPlaybackForIOS10Plus(!0);const i=this.EI(t),e=this.BI(t,i);return this.TI={imaSdk:t,imaAdDisplayContainer:i,imaAdsLoader:e},this.CI=!0,this.TI}EI(t){const i=new t.AdDisplayContainer(this.adSlot,this.videoSlot);return i.initialize(),i}BI(t,i){const e=new t.AdsLoader(i);return e.getSettings().setVpaidMode(t.ImaSdkSettings.VpaidMode.INSECURE),e.getSettings().setAutoPlayAdBreaks(!1),e}}class dh{constructor(t){this.settings=t,this.OI=new Set,this.LI=new Set,this.RI=[10,15,20],this.DI=0}preloadImaSdkSlots(t){he.preloadImaSdk(window);for(let i=1;i<=3;i++){const i=new uh(t,this.settings.globalDomUtilsService);i.fetchImaDependencies(),this.OI.add(i)}}requestAdSlot(t){const i=new lh(t,this.settings.globalDomUtilsService);return this.VI(i),this.FI(),i}requestAdSlotIma(t){let i=this.$I();return i||(i=new uh(t,this.settings.globalDomUtilsService)),this.VI(i),this.FI(),i}destroyAdSlot(t){this.LI.delete(t),t.destroy()}recycleAdSlot(t){this.LI.delete(t),this.NI(t)?(t.sanitize(),this.OI.add(t)):this.destroyAdSlot(t)}NI(t){return t.isImaSlot}$I(){let t=null;return this.OI.forEach((i=>{this.NI(i)&&null===t&&(t=i)})),t}VI(t){this.OI.delete(t),this.LI.add(t)}FI(){const t=this.OI.size+this.LI.size;t===this.RI[this.DI]&&(this.UI(this.RI[this.DI]),t===this.RI[this.RI.length-1]&&this.RI.push(this.RI[this.RI.length-1]+20),this.DI++)}UI(t){(0,s.n)({message:"AdSlotContainerRecycler_slotcount",exception:`${t}`,callStack:"",level:s.D.INFO},{throttle:20})}}class ph{constructor(t){this.HI=new Map,t.forEach((t=>{this.HI.set(t.advertiserLineItemId,Math.random())}))}getCallingYoScore(t){return this.qI(t)}getWinningYoScore(t,i){return this.qI(t)}getImpressionYoScore(t,i){return this.qI(t)}qI(t){return this.HI.get(t)}}var fh;!function(t){t[t.CALLING=0]="CALLING",t[t.WINNING=1]="WINNING",t[t.IMPRESSION=2]="IMPRESSION"}(fh||(fh={}));class mh{constructor(t){this.zI=t}getScore(){return this.WI}GI(){const{successRate:t,cpm:i,priority:e}=this.zI;return this.JI(t)*i+Gi.XY*e}JI(t){let i=0===t?Math.random():t;return i=1,1}}class gh extends mh{constructor(t,i){super(i),this.YI=t,this.zI=i,vi(this.YI)?this.WI=Math.random():this.WI=this.GI()}get metrics(){return this.zI}}class vh extends mh{constructor(t){super(t),this.zI=t,this.WI=this.GI()}get metrics(){return this.zI}}class yh extends mh{constructor(t){super(t),this.zI=t,this.XI=20,this.WI=this.GI(),this.ZI=this.KI()}get scoreIncludingDuration(){return this.ZI}KI(){const{successRate:t,cpm:i,priority:e,adDuration:s}=this.zI;return this.JI(t)*i/this.tk(s)+Gi.XY*e}tk(t){return(0,dt.r)(t)?t:this.XI}}class bh{constructor(t){this.ik=new Map,this.ek(t)}registerBiddingInformation(t){const{successRate:i,priority:e,bidId:s}=t,n=Yi(t),r=new vh({successRate:i,cpm:n,priority:e}),h=this.ik.get(t.lineItemId);h?h.winningBidYoScoreMap.set(s,r):this.sk("registerBiddingInformation",t.lineItemId)}registerPreBidFromBid(t,i){this.nk(t,i,"registerPreBidFromBid")}registerWinningInformation(t){const{successRate:i,priority:e,adDuration:s,bidId:n}=t,r=Yi(t),h=new yh({successRate:i,cpm:r,priority:e,adDuration:s}),o=this.ik.get(t.lineItemId);o?o.impressionBidYoScoreMap.set(n,h):this.sk("registerWinningInformation",`lineItemId:${t.lineItemId}_bidId:${t.bidId}`)}registerPostBid(t,i){this.nk(t,i,"registerPostBid")}registerImpression(t,i){this.nk(t,i,"registerImpression")}getCallingYoScore(t){const i=this.ik.get(t);return this.qI(i,fh.CALLING)}getWinningYoScore(t,i){const e=this.ik.get(t);return this.qI(e,fh.WINNING,i)}getImpressionYoScore(t,i){const e=this.ik.get(t);return this.qI(e,fh.IMPRESSION,i)}ek(t){t.forEach((t=>{this.rk(t)}))}rk(t){const{floorPrice:i,lineItemPriority:e,successRate:s,advertiserLineItemId:n,creativeType:r}=t,h={cpm:i,priority:e,successRate:s};this.ik.set(n,{callingLineItemYoScore:new gh(r,h),winningBidYoScoreMap:new Map,impressionBidYoScoreMap:new Map})}nk(t,i,e){const s=this.ik.get(t);s?(s.winningBidYoScoreMap.has(i)&&s.winningBidYoScoreMap.delete(i),s.impressionBidYoScoreMap.has(i)&&s.impressionBidYoScoreMap.delete(i)):this.sk(`unregisterBiddingInformation:${e}`,`lineItemId:${t}_bidId:${i}`)}qI(t,i,e){var s,n;if(!(0,dt.$K)(t))return this.sk("getYoScore",`${i}`),0;switch(i){case fh.CALLING:return t.callingLineItemYoScore.getScore();case fh.WINNING:return null===(s=t.winningBidYoScoreMap.get(e))||void 0===s?void 0:s.getScore();case fh.IMPRESSION:return null===(n=t.impressionBidYoScoreMap.get(e))||void 0===n?void 0:n.getScore();default:return 0}}sk(t,i=""){(0,s.n)({message:t,level:s.D.INFO,callStack:`YoScoreManager_${t}`,exception:i})}}class xh{constructor(t,i){this.AP=i?new ph(t):new bh(t)}registerBiddingInformation(t){this.AP.registerBiddingInformation&&this.AP.registerBiddingInformation(t)}registerPreBidFromBid(t,i){this.AP.registerPreBidFromBid&&this.AP.registerPreBidFromBid(t,i)}registerWinningInformation(t){this.AP.registerWinningInformation&&this.AP.registerWinningInformation(t)}registerPostBid(t,i){this.AP.registerPostBid&&this.AP.registerPostBid(t,i)}registerImpression(t,i){this.AP.registerImpression&&this.AP.registerImpression(t,i)}getCallingYoScore(t){return this.AP.getCallingYoScore(t)}getWinningYoScore(t,i){return this.AP.getWinningYoScore(t,i)}getImpressionYoScore(t,i){return this.AP.getImpressionYoScore(t,i)}}class wh{constructor(t,i){this.ha=t,this.MP=i,this.hk=new Map}bidIsNotWinnableEverInSession(t){if(!this.ak(t))return;const i=[...this.ck(),t.getPrice()].sort(((t,i)=>i-t)),e=this.lk(i);this.uk(t.settings.requestMetadata.data.cnxBidId,e,l.ProtoAuctionLossReasonEnum.TargetingMismatch)}newBidAdded(t,i){this.ak(t)&&(i.selectedBid?i.selectedBid!==t?this.dk(t,i):this.pk(t):this.dk(t,i))}winBid(t){if(!this.ak(t))return;const i=this.ck(),e=this.lk(i);this.hk.set(t,e)}onPostBid(t){return this.fk(t)}onImpression(t){return this.fk(t)}ak(t){return t.settings.requestMetadata.data.logAuctionInformation}pk(t){const{cnxBidId:i}=t.settings.requestMetadata.data,e=this.ck(),s=this.lk(e);this.uk(i,s,l.ProtoAuctionLossReasonEnum.CompetitorPriority)}fk(t){const i=this.mk(t);return this.gk(t),i}dk(t,i){var e,s,n,r;const{cnxBidId:h}=t.settings.requestMetadata.data,o=this.ck(),a=this.vk(t,i),c=this.lk(o);(0,dt.$K)(a)?this.uk(h,c,a):this.yk("AdManager_AuctionInfoLogging_lossReason_cannot_be_found",t.settings.requestMetadata.data.cnxBidId,null===(r=null===(n=null===(s=null===(e=i.selectedBid)||void 0===e?void 0:e.settings)||void 0===s?void 0:s.requestMetadata)||void 0===n?void 0:n.data)||void 0===r?void 0:r.cnxBidId)}mk(t){if(this.hk.has(t))return this.hk.get(t);this.ak(t)&&this.yk("AdManager_AuctionInfoLogging_cannot_find_win_bid_snapshot",t.settings.requestMetadata.data.cnxBidId)}gk(t){this.hk.has(t)&&this.hk.delete(t)}vk(t,i){var e;return null===(e=i.unselectedBidList.find((i=>i.bid===t)))||void 0===e?void 0:e.lossReason}getGeneralPostbidReason(t){switch(t){case zi.ImaScriptFailure:case zi.ImaObjectNotFound:case zi.ImaManagerInit:case zi.ImaInitSdkError:case zi.AdxOverlayGptScriptLoad:case zi.DisplayIntegratorIframeLoad:return l.ProtoAuctionPostbidReasonEnum.SDKFailure;case zi.VastUnsupportedMedia:case zi.CnxMediaSrcNotSupported:return l.ProtoAuctionPostbidReasonEnum.UnsupportedMedia;case zi.DomainBlocked:case zi.AdaptorInitAdError:case zi.AdaptorStartAdError:case zi.WrapperInitAdError:case zi.WrapperStartAdError:return l.ProtoAuctionPostbidReasonEnum.TargetingMismatch;default:return l.ProtoAuctionPostbidReasonEnum.CreativeError}}ck(){return this.MP.getAllBids().map((t=>t.getPrice())).sort(((t,i)=>i-t))}lk(t){const i=t[0]?Ei(t[0]):void 0,e=t[1]?Ei(t[1]):void 0;return i||this.yk("AdManager_AuctionInfoLogging_highestBidPrice_missing",`${i}`),{bidDensity:t.length,highestObfuscatedBidPrice:i,secondHighestObfuscatedBidPrice:e}}uk(t,i,e){this.ha.trackAuctionInfoForBid({cnxBidId:t,auctionInformation:i,auctionLossReason:e})}yk(t,i="",e=""){(0,s.n)({message:t,level:s.D.CRITICAL,callStack:i,exception:e},{throttle:5})}}class _h{constructor(){this.bk=[]}canCall(t,i){return this.bk.every((e=>e.canCall(t,i)))}registerRequestForLineItem(t,i){return this.bk.forEach((e=>{e.registerRequestForLineItem(t,i)})),this}registerImpressionForLineItem(t,i){return this.bk.forEach((e=>{e.registerImpressionForLineItem(t,i)})),this}registerCallingValidator(t){return this.bk.push(t),this}registerCallingValidators(t){return t.forEach((t=>{this.registerCallingValidator(t)})),this}destroy(){this.bk.forEach((t=>{t.destroy()}))}}class Sh{constructor(){this.xk=new It.x,this.wk=new It.x,this._k={[th.ON_STARTED]:this.xk,[th.ON_END]:this.wk},this.Sk={[th.ON_STARTED]:t=>this.xk.next(t),[th.ON_END]:t=>this.wk.next(t)}}getCallingObservable(t){return this._k[t].asObservable()}triggerEvent(t,i){(0,this.Sk[t])(i)}}class Ah{constructor(){this.Ak=[],this.Pk=new Sh}get callingLineItems(){return this.Ak}addCallingLineItems(t){this.Ak=[...this.callingLineItems,...t],this.Pk.triggerEvent(th.ON_STARTED,t)}removeCallingLineItems(t){this.Ak=this.callingLineItems.filter((i=>!(0,f.d3)(i,t))),this.Pk.triggerEvent(th.ON_END,t)}getAdCallingPoolEvents(t){return this.Pk.getCallingObservable(t)}}class Ph{constructor(){this.Ik=new It.x,this.kk=new It.x,this.Ck=new It.x,this.Tk=new It.x,this.Mk=new It.x,this.Ek=new It.x,this.Bk=new It.x,this.Lk={[ki.ON_BID]:this.Ik,[ki.ON_BID_LOADING]:this.kk,[ki.ON_BID_READY]:this.Ck,[ki.ON_BID_STARTED]:this.Tk,[ki.ON_BID_LOADING_CONSUMED]:this.Ek,[ki.ON_BID_READY_CONSUMED]:this.Bk},this.Rk={[Wn.IDLE]:t=>{this.Ik.next(t)},[Wn.LOADING]:t=>{this.kk.next(t)},[Wn.READY]:t=>{this.Ek.next(t),this.Ck.next(t)},[Wn.STARTED]:t=>{this.Tk.next(t)},[Wn.IMPRESSION]:t=>{this.Mk.next(t)}},this.Dk={[Gn.BID_LOADING_CONSUMED]:t=>{this.Ek.next(t)},[Gn.BID_READY_CONSUMED]:t=>{this.Bk.next(t)},[Gn.BID_INVALIDATED]:(t,i)=>{[Wn.IDLE,Wn.LOADING].includes(i)?this.Ek.next(t):this.Bk.next(t)}}}getBidObservable(t){return this.Lk[t].asObservable()}bidStatusChanged(t,i){(0,this.Rk[i])(t)}bidConsumed(t,i,e){(0,this.Dk[e])(t,i)}}class Ih{constructor(){this.jk=[],this.Vk=new Ph,this.$k=[]}getBidPoolBidEvents(t){return this.Vk.getBidObservable(t)}addBid(t){this.jk.push({bid:t,status:Wn.IDLE}),this.Vk.bidStatusChanged(t,Wn.IDLE)}getAllBids(){return this.Nk(),this.jk.map((t=>t.bid))}getAllBidsForLineItem(t,i=[]){return this.Nk(),this.jk.filter((t=>!i.includes(t.status))).filter((i=>i.bid.settings.adManagerLineItem.protoLineItem.advertiserLineItemId===t||i.bid.settings.adManagerLineItem.protoLineItem.publisherLineItemId===t)).map((t=>t.bid))}getBidsByStatus(t){return this.Nk(),this.jk.filter((i=>t.includes(i.status))).map((t=>t.bid))}getBidsExceptStatus(t){return this.Nk(),this.jk.filter((i=>!t.includes(i.status))).map((t=>t.bid))}changeBidStatus(t,i){const e=this.Uk(t);return e?(e.status=i,this.Vk.bidStatusChanged(t,i),!0):(this.Hk(t.settings.id)||this.qk("AdBidPool_update_bid_not_found",i),!1)}consumeBid(t,i){const e=this.Uk(t);return e?((0,f.sj)(this.jk,e),this.Vk.bidConsumed(e.bid,e.status,i),i===Gn.BID_INVALIDATED&&this.$k.push(t.settings.id),!0):(this.Hk(t.settings.id)||this.qk("AdBidPool_consume_bid_not_found",i),!1)}Nk(){this.zk().forEach((t=>{this.consumeBid(t.bid,Gn.BID_INVALIDATED)}))}zk(){return this.jk.filter((t=>{const i=t.bid.createdTimestamp,e=t.bid.settings.adManagerLineItem.protoLineItem.networkExpiryTimeSeconds;return(0,dt.r)(e)&&(0,ut.H8)(i)>=e}))}Uk(t){return this.jk.find((i=>i.bid===t))}Hk(t){return this.$k.includes(t)}qk(t,i){(0,s.n)({message:t,exception:i?`${i}`:"",level:s.D.CRITICAL},{sendMaxLog:!1,throttle:2})}}var kh=o(4974);class Ch{constructor(t){this.Wk=t,this.Gk=!1,this.Jk=!1,this.Qk=!1}get predictMode(){return this.Gk}get adFetchingAllowed(){return this.Jk}get impressionsAllowed(){return this.Qk}get currentAdPlayerState(){return this.Xk}get predictedAdPlayerState(){return this.Zk}partialStateUpdate(t){this.Xk&&(this.Xk=Object.assign(Object.assign({},this.Xk),t)),this.Zk&&(this.Zk=Object.assign(Object.assign({},this.Zk),t))}getCurrentAdManagerState(t=!1){let i=this.Xk;!this.currentAdPlayerState&&t&&(i=this.Zk);const e=this.Wk.getContainerStateMap();return this.Kk(i,e)}getPredictedAdManagerState(){const t=this.Zk,i=this.tC();return this.Kk(t,i)}Kk(t,i){if(!t)return;const{width:e,height:s,viewability:n}=this.Wk.getMainContainerState(),{clickToPlay:r,mediaMetadata:h,sound:o,adBreakState:a,linearAdOpportunity:c,playerOrientation:l}=t;return{width:e,height:s,viewability:n,clickToPlay:r,media:h,sound:!!o,soundValue:o,adContainerState:i,adBreakState:a,adOpportunity:c,playerOrientation:l,page:{insights:kh.k.pageInsights}}}tC(){let t;return this.Zk.prefetchStateType===Ii.StartSessionPrefetch?(t=new Map,this.Wk.getContainerStateMap().forEach(((i,e)=>{t.set(e,Object.assign(Object.assign({},i),{viewability:!0}))}))):t=this.Wk.getContainerStateMap(),t}getCallSettings(){return{maxParallelCalls:hi.PARALLEL_CALLS_DEFAULT,stateSettings:{currentState:this.getCurrentAdManagerState(),predictedState:this.getPredictedAdManagerState()}}}getWinSettings(){return{desiredBitRate:hi.DEFAULT_DESIRED_BITRATE,maxParallelWins:hi.PARALLEL_WINS_DEFAULT,vastViewMode:this.currentAdPlayerState?this.currentAdPlayerState.vastViewMode:this.predictedAdPlayerState.vastViewMode,stateSettings:{currentState:this.getCurrentAdManagerState(),predictedState:this.getPredictedAdManagerState()}}}enableImpression(t){this.Gk=!1,this.Xk=t,this.Zk||(this.Zk=this.Xk),this.Jk=!0}disableImpression(){this.Qk=!1,this.Jk=!1}enablePredict(t,i){this.Xk=null,this.Gk=!0,this.Zk=t,this.Zk.prefetchStateType=i,this.Jk=!0}auctionEnd(){this.Qk=!0}auctionStopCalling(){this.predictMode&&(this.Jk=!1)}}const Th=30*oi.s_;class Mh{constructor(){this.iC=null}onAdRemoved(){this.iC=null,this.eC()}pauseViaUserInteraction(){this.iC&&(this.iC.pausedWithUserInteraction=!0)}resumeViaUserInteraction(){this.iC&&(this.iC.pausedWithUserInteraction=!1,this.eC())}sC(t){this.iC={currentAd:t,isPaused:!1,pausedWithUserInteraction:!1,remainingTimeForAdToBePaused:Th,lastAdPausedStartedTimestamp:void 0},this.eC()}checkPauseAd(t,i){t&&(null===this.iC&&this.sC(t),i?this.nC(t):this.rC(t))}rC(t){this.hC(t)&&(this.iC.isPaused=!0,this.iC.lastAdPausedStartedTimestamp=Date.now(),t.pauseAd(),this.eC(),this.aC=setTimeout((()=>{t.stopAd("pauseOutOfView"),this.iC=null,this.eC()}),this.iC.remainingTimeForAdToBePaused))}nC(t){t.settings.adManagerLineItem.protoLineItem.pauseAdOutOfView&&t.impressionStarted&&this.iC.isPaused&&!this.iC.pausedWithUserInteraction&&(this.eC(),this.iC.isPaused=!1,this.iC.remainingTimeForAdToBePaused=this.iC.remainingTimeForAdToBePaused-(Date.now()-this.iC.lastAdPausedStartedTimestamp),t.resumeAd())}eC(){clearTimeout(this.aC),this.aC=void 0}hC(t){return t.settings.adManagerLineItem.protoLineItem.pauseAdOutOfView&&t.impressionStarted&&!this.iC.isPaused&&!this.iC.pausedWithUserInteraction}}class Eh{constructor(t,i,e){this.cC=t,this.Wk=i,this.lC=e,this.es=!1,this.uC=new Mh,this.Af=new It.x,this.dC()}get onVpaidEvent(){return this.Af.asObservable()}get inImpression(){return this.es}setVastViewMode(t){this.lC=t;const{width:i,height:e}=this.Wk.getContainerStateMap().get(this.cC.settings.adManagerLineItem.protoLineItem.adType);this.cC.resizeAd(i,e,t)}getAdVolume(){return this.cC.getAdVolume()}setAdVolume(t,i){if(i){const{adMacroReplacer:e,adManagerState:s}=i;this.pC(t,s,e)}this.cC.setAdVolume(t)}resizeAd(){const{width:t,height:i,viewability:e}=this.Wk.getContainerStateMap().get(this.cC.settings.adManagerLineItem.protoLineItem.adType);this.uC.checkPauseAd(this.cC,e),this.cC.resizeAd(t,i,this.lC)}skipAd(){this.cC.setAdVolume(0),this.cC.skipAd()}stopAd(t){this.cC.stopAd(t)}pauseAd(t){this.cC.pauseAd(),t&&this.uC.pauseViaUserInteraction()}resumeAd(t){this.cC.resumeAd(),t&&this.uC.resumeViaUserInteraction()}getMediaSize(){const t=this.cC.getAdMediaSize().width,i=this.cC.getAdMediaSize().height,{widthRatio:e,heightRatio:s}=(0,di.dO)(t,i);return{width:t,height:i,widthRatio:e,heightRatio:s,adType:this.cC.settings.adManagerLineItem.protoLineItem.adType}}getMetadata(){return{advertiserLineItemId:this.cC.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,publisherLineItemId:this.cC.settings.adManagerLineItem.protoLineItem.publisherLineItemId,adType:this.cC.settings.adManagerLineItem.protoLineItem.adType,duration:this.cC.getAdDuration(),adSkipMode:this.cC.settings.adManagerLineItem.protoLineItem.skipMode,moatTrackingEnabled:this.cC.settings.adManagerLineItem.protoLineItem.moatTrackingEnabled}}destroy(){this.es=!1,this.uC.onAdRemoved(),this.fC.unsubscribe(),this.fC=null}dC(){this.fC=this.cC.onVpaidEvent.subscribe((t=>{t.type===Vt.fI.AdImpression&&this.mC(),this.Af.next(t)}))}mC(){this.es=!0;const{viewability:t}=this.Wk.getContainerStateMap().get(this.cC.settings.adManagerLineItem.protoLineItem.adType);this.uC.checkPauseAd(this.cC,t)}pC(t,i,e){const s=this.cC.getAdVolume();let n=null;0===s&&t>0?n=this.cC.settings.trackers.adUnmute:s>0&&0===t&&(n=this.cC.settings.trackers.adMute);const r=this.cC.settings.adManagerLineItem.protoLineItem;n&&Di.track(n,e,r,i)}}class Bh{constructor(t){this.zt=t,this.gC=!1,this.Af=new It.x,this.vC=new It.x,this.yC=new It.x,this.wf=[],this.Yr=t=>{Zn.getInstance().addPlatformCappedLineItemIdList(t,this.MP)},this.Xr=t=>{this.vC.next(t)},this.bC=(t,i,e)=>{const s=t.find((t=>t.protoLineItem.advertiserLineItemId===i));s&&(s.protoLineItem.viewability=e)},this.GS=()=>{var t;null===(t=this.xC)||void 0===t||t.resizeAd(),this.wC()};const i=this.zt.adContainerMap.get(this._C());this.SC=(0,e.LT)(i),this.zt.app.services.TrackingService.startBidTrackingInterval(),this.AC=this.zt.lineItemList.map((t=>new ch(t))),this.PC(),this.IC(),this.kC(),this.CC()}get onVpaidEvent(){return this.Af.asObservable()}get onImpressionRevenueEvent(){return this.vC.asObservable()}get onNoFill(){return this.yC.asObservable()}setAdVolume(t){var i;this.TC.partialStateUpdate({sound:t});const e={adManagerState:this.TC.getCurrentAdManagerState(!0),adMacroReplacer:this.Hx};null===(i=this.xC)||void 0===i||i.setAdVolume(t,e)}setAdViewMode(t){var i;this.TC.partialStateUpdate({vastViewMode:t}),null===(i=this.xC)||void 0===i||i.setVastViewMode(t)}getCurrentAdMetadata(){var t;return null===(t=this.xC)||void 0===t?void 0:t.getMetadata()}getCurrentAdMediaSize(){var t;return null===(t=this.xC)||void 0===t?void 0:t.getMediaSize()}pauseAd(t){var i;null===(i=this.xC)||void 0===i||i.pauseAd(t)}resumeAd(t){var i;null===(i=this.xC)||void 0===i||i.resumeAd(t)}skipAd(){var t;null===(t=this.xC)||void 0===t||t.skipAd()}stopAd(t){var i;null===(i=this.xC)||void 0===i||i.stopAd(t)}setPlayerOrientation(t){this.TC.partialStateUpdate({playerOrientation:t}),this.wC()}enableImpressions(t){this.TC.enableImpression(t),this.Wk.forceTriggerUpdateState(),this.MC.allowResetOnTime=!0,this.EC(t),this.BC()}disableImpressions(){this.TC.impressionsAllowed&&(this.OC.stop(),this.LC.stop(),this.TC.disableImpression(),this.xC&&!this.xC.inImpression&&this.zt.app.config.isInApp&&this.xC.stopAd("inApp_disable"))}enablePredict(t,i){switch(this.TC.enablePredict(t,i),i){case Ii.StartSessionPrefetch:this.MC.allowResetOnTime=!1;break;case Ii.MidSessionPrefetch:this.MC.allowResetOnTime=!0}this.BC();const e=this.TC.getCallSettings();this.RC.startPrefetch(e)}isLoadingAds(){return!!this.xC||!!this.DC.isLoadingBids()}getMainContainerState(){return this.Wk.getMainContainerState()}getMainContainer(){return this.Wk.getMainContainer()}destroy(){var t;this.disableImpressions(),(0,jt.i)(this.wf),this.LC.destroy(),this.DC.destroy(),this.OC.destroy(),this.jC.destroy(),this.VC(),null===(t=this.xC)||void 0===t||t.stopAd("adManagerDestroy"),this.$C()}PC(){const t=De.getGlobalContainer().resolve(ts);this.jC=new or(t),this.EP=new sr,this.MC=new rr,this.NC=new hr,this.BP=(new _h).registerCallingValidators([this.MC,this.EP,this.NC]),this.zx=new Bi,this.Hx=new yr(this.zt.app.services.MacrosService,this.zt.app.services.UserManagerService)}IC(){this.UC=new Ah,this.MP=new Ih,this.Wk=new ar(this._C(),this.zt.adContainerMap,this.zt.app.services.ResizeObserver,this.zt.app.services.ViewabilityService),this.Gx=new dh({globalDomUtilsService:this.zt.app.services.GlobalDomUtilsService,recycleAdSlots:!0}),this.TC=new Ch(this.Wk);const t=new xh(this.zt.lineItemList,this.zt.app.config.explorationMode),i=new sh(t,this.zt.skipPlayerSettings,this.UC,this.MP,this.EP,this.BP),e=new rh(t);this.HC=new nh(t);const s=De.getGlobalContainer().resolve(ts);this.RC=new oh(s,{lineItems:this.AC,adCallingPool:this.UC,adBidPool:this.MP,impressionCapsService:this.EP,requestCapsService:this.MC,yoScoreManager:t,adCallerYo:i,adWinnerYo:e});const n=new wh(this.zt.app.services.TrackingService,this.MP);this.LC=new Kn({lineItemList:this.AC,adCallingPool:this.UC,adBidPool:this.MP,auctionInfoLogging:n,adCallerYo:i,adContainerMap:this.zt.adContainerMap,amazonSlotId:this.zt.amazonTamSlotId,app:this.zt.app,isOutstream:this.zt.outstream,schainSettings:this.zt.pbjsSchainSettings,skipAdSettings:this.zt.skipPlayerSettings,trackingService:this.zt.app.services.TrackingService,adMacroReplacer:this.Hx,lineItemServices:{impressionCapsService:this.EP,lineItemServicesTimer:this.jC,requestCapsService:this.MC},adRequestGatekeeper:this.zx,adEnforcer:new mr(this.zt.app.config.isMobile,this.SC,this.zt.disableScrollHijackEnforcement),pauseAdWhenFinished:this.zt.pauseAdWhenFinished,loopAdWhenFinished:this.zt.loopAdWhenFinished,os:this.zt.app.config.os.os,adSlotContainerRecycler:this.Gx,callingValidationAggregator:this.BP,auctionManager:this.RC}),this.DC=new Zr({adBidPool:this.MP,adWinnerYo:e,auctionInfoLogging:n,desiredBitRateForWins:hi.DEFAULT_DESIRED_BITRATE,maxNumberOfWins:hi.MAX_WINS_DEFAULT,trackingService:this.zt.app.services.TrackingService,impressionCapsService:this.EP,impressionCapsTimer:this.jC,adMacroReplacer:this.Hx,playerId:this.zt.app.config.playerId,auctionManager:this.RC}),this.OC=new gr({adContainer:this.Wk,adBidPool:this.MP,adImpressionerYo:this.HC,auctionInfoLogging:n,impressionCapsService:this.EP,impressionCapsTimer:this.jC,requestCapsService:this.MC,removeBidIfHigherYoScore:hi.REMOVE_BIDS_DEFAULT,trackingService:this.zt.app.services.TrackingService,adRequestGatekeeper:this.zx,pauseAdWhenFinished:this.zt.pauseAdWhenFinished,loopAdWhenFinished:this.zt.loopAdWhenFinished,adMacroReplacer:this.Hx,explorationMode:this.zt.app.config.explorationMode,playerId:this.zt.app.config.playerId,skipAdSettings:this.zt.skipPlayerSettings})}kC(){this.wf.push(this.zt.app.services.TrackingService.onLineItemPlatformCapped.subscribe((t=>{this.Yr(t)})),this.zt.app.services.TrackingService.onImpressionRevenue.subscribe((t=>{this.Xr(t)})),this.zt.app.services.TrackingService.onLineItemViewabilityChange.subscribe((([t,i])=>{this.bC(this.AC,t,i)})))}CC(){this.wf.push(this.RC.onAuctionEnd.subscribe((()=>{this.mI()})),this.RC.onAuctionStopCalling.subscribe((()=>{this.qC()})),this.Wk.onContainerStateUpdate.subscribe((()=>{this.GS()})),this.OC.onAdSelected.subscribe((t=>{this.FA(t)})),this.OC.onAdFinished.subscribe((t=>{this.$A()})))}mI(){this.TC.auctionEnd(),this.zC()}qC(){this.TC.predictMode&&this.LC.stop(),this.TC.auctionStopCalling()}FA(t){const{currentAdPlayerState:i,predictedAdPlayerState:e}=this.TC,s=(i||e).vastViewMode;this.xC=new Eh(t,this.Wk,s),this.WC(),this.xC.setAdVolume(this.TC.currentAdPlayerState.sound),this.GC(t)}GC(t){var i;this.Af.next({type:Vt.fI.AdLoaded,payload:null===(i=t.settings.adLoadedPayload)||void 0===i?void 0:i.payload})}$A(){this.$C()}wC(){this.TC.adFetchingAllowed&&this.BC(),this.TC.impressionsAllowed&&this.zC()}BC(){this.gC||(this.gC=!0,this.zt.app.services.UserManagerService.ccpaInfoLogging(this.zt.app.config.playerId));const t=this.TC.getCallSettings();this.LC.call(t);const i=this.TC.getWinSettings();this.DC.win(i)}zC(){(this.TC.currentAdPlayerState||this.TC.predictedAdPlayerState)&&this.TC.currentAdPlayerState&&this.OC.start(this.TC.getCurrentAdManagerState())}WC(){this.JC=this.xC.onVpaidEvent.subscribe((t=>{t.type===Vt.fI.AdImpression&&this.xC.setAdVolume(this.TC.currentAdPlayerState.sound),this.Af.next(t)}))}$C(){var t;null===(t=this.xC)||void 0===t||t.destroy(),this.xC=null,this.VC()}VC(){var t;null===(t=this.JC)||void 0===t||t.unsubscribe(),this.JC=null}EC(t){const i=[this.EP,this.MC];t.newContent&&i.forEach((t=>{t.resetCapsBasedOnExternalEvent(l.ProtoResetCapTypeEnum.ContentCapping)}))}}class Oh extends Bh{constructor(t){super(t),this.mI=()=>{this.QC()||this.yC.next(),super.mI()};const i=this.Wk.getMainContainer();this.Gx.preloadImaSdkSlots(i),this.MP.getBidPoolBidEvents(ki.ON_BID_READY_CONSUMED).subscribe((()=>{this.QC()||this.yC.next()}))}enableImpressions(t){super.enableImpressions(t);const i=this.TC.getCallSettings();this.RC.startAuction(i,t.linearAdOpportunity.id)}disableImpressions(){this.TC.impressionsAllowed&&(this.RC.cancelAuction(),super.disableImpressions())}BC(){const t=this.TC.getCallSettings();this.RC.updateState(t),super.BC()}_C(){return l.ProtoAdType.Video}QC(){if(!(0,f.BZ)(this.MP.getAllBids()))return!1;return!!this.HC.getBestBid(this.MP.getAllBids(),this.TC.getCurrentAdManagerState()||this.TC.getPredictedAdManagerState(),this.EP)}}class Lh extends Bh{_C(){return l.ProtoAdType.Nonlinear}enableImpressions(t){super.enableImpressions(t),this.mI()}}const Rh={[l.ProtoAdSlotsEnum.PreRoll]:l.ProtoAdBreakTypeEnum.PreRoll,[l.ProtoAdSlotsEnum.MidRoll]:l.ProtoAdBreakTypeEnum.MidRoll,[l.ProtoAdSlotsEnum.PostRoll]:l.ProtoAdBreakTypeEnum.PostRoll};var Dh,jh,Vh,Fh,$h;!function(t){t.remainTimeForAdPod=(t,i)=>!(i<=0)&&!(Math.round(i/oi.s_)>t.remainingAdDuration)}(Dh||(Dh={})),function(t){t.adLoadedPayload=t=>({payload:{adType:t.payload.adType,adSkipMode:t.payload.adSkipMode,adLoadedData:{skipOffset:t.payload.adLoadedData.skipOffset}}}),t.impressionPayload=(t,i)=>{const{adId:e,adVideoUrl:s,creativeId:n,name:r,length:h,imaMetadata:o,moatTrackingEnabled:a}=t.payload.adSourceData,{adType:c,adSkipMode:l,clickThroughUrl:u,customAdData:d,adSourceData:p}=t.payload;return{payload:{adType:c,adSkipMode:l,adSourceData:{moatTrackingEnabled:a,adId:e,length:h,imaMetadata:o,adVideoUrl:s,creativeId:n,name:r},clickThroughUrl:u,customAdData:{ADVERTISER:null==d?void 0:d.ADVERTISER,CAMPAIGN_ID:null==d?void 0:d.CAMPAIGN_ID,CREATIVE_ID:d.CREATIVE_ID},adDuration:p.length,selectedAdSlot:i}}},t.defaultPayload=t=>({payload:{adType:t.payload.adType}})}(jh||(jh={}));class Nh{constructor(t,i){this.YC=t,this.XC=i,this.ZC=new It.x,this.wf=[],this.KC=!1;const e=De.getGlobalContainer().resolve(ts);this.Ky=new Is(e),this.tT(),this.mx(),this.iT()}get onAdLifeEnding(){return this.ZC.asObservable()}isDurationExpired(){return this.KC}destroy(){this.Ky.disable(),this.wf.forEach((t=>t.unsubscribe()))}tT(){this.wf.push(this.Ky.onTimeElapsed.subscribe((()=>{this.Ky.stop(),this.KC=!0,this.ZC.next()})))}mx(){this.wf.push(this.YC.subscribe((t=>{switch(t.type){case Vt.fI.AdImpression:this.eT(t.payload.adSourceData.length);break;case Vt.fI.AdPlaying:this.iT();break;case Vt.fI.AdPaused:this.bs();break;case Vt.fI.AdStopped:case Vt.fI.AdSkipped:case Vt.fI.AdError:this.sT();break;case Vt.fI.AdVideoFirstQuartile:this.nT()}})))}bs(){this.Ky.stop()}iT(){this.Ky.start()}eT(t){if(this.rT=Date.now(),t){this.hT=t*oi.s_;const i=this.hT-this.XC;this.oT(i),this.Ky.start()}}sT(){this.Ky.stop(),this.KC=!1}nT(){if(this.hT)return;const t=Date.now()-this.rT;this.hT=4*t;const i=this.hT-t-this.XC;this.oT(i)}oT(t){const i=t<0?0:t;this.Ky.reset(i)}}class Uh{constructor(t,i){this._b=t,this.aT=new It.x,this.cT=Ii.NoPrefetch,this.lT=i===l.ProtoAdPlaybackMode.ScrollToPlay}get prefetchType(){return this.cT}get startSessionPrefetch(){return this.lT}set startSessionPrefetch(t){this.lT=t}get onMidSessionPrefetchReady(){return this.aT.asObservable()}enablePrefetch(t,i,e){this.lT=!1,this.cT=t,null==e||e.enablePredict(i,t)}disablePrefetch(){this.cT=Ii.NoPrefetch}tryPreparingMidSessionPrefetch(t,i){if(!this.uT(t))return;const e=null==t?void 0:t.disableReason;e===Pi.TimeoutBetweenAds&&this.aT.next(Ii.MidSessionPrefetch),e===Pi.InImpression&&this.dT(t,i)&&this.aT.next(Ii.MidSessionPrefetch)}uT(t){return this.cT===Ii.NoPrefetch&&null!==t}dT(t,i){return i&&t.adBreakLength<=hi.MID_SESSION_PREFETCH_MINIMUM_TIME&&!this._b}}class Hh{constructor(t,i){this.zt={[li.LINEAR]:{enable:!1,disablePayload:null,usePrefetch:!0},[li.NONLINEAR]:{enable:!1,disablePayload:null,usePrefetch:!1}},this.aT=new It.x,this.wf=[],this.fT(t,i)}get onMidSessionPrefetchReady(){return this.aT.asObservable()}getAllLinearityKeys(){return Object.keys(this.zt)}enable(t){this.zt[t].enable=!0,this.zt[t].disablePayload=null}disable(t,i){this.zt[t].enable=!1,this.zt[t].disablePayload=i}getDisablePayload(t){return this.zt[t].disablePayload}setAdManager(t,i){this.zt[t].adManager=i,this.zt[t].usePrefetch&&(this.zt[t].adLifecycleObserver=new Nh(i.onVpaidEvent,hi.MID_SESSION_PREFETCH_MINIMUM_TIME),this.wf.push(this.zt[t].adLifecycleObserver.onAdLifeEnding.subscribe((()=>{const i=this.getDisablePayload(t),e=this.zt[t].adLifecycleObserver.isDurationExpired();this.zt[t].adPrefetch.tryPreparingMidSessionPrefetch(i,e)}))))}isAdManagerEnable(t){return this.zt[t].enable}getAllAdManagers(){return this.getAllLinearityKeys().map((t=>this.zt[t].adManager))}getAllAvailableAdManagers(){return this.getAllAdManagers().filter((t=>(0,dt.$K)(t)))}getAdManagerByLinearity(t){return this.zt[t].adManager}usePrefetch(t){return this.zt[t].usePrefetch}enablePrefetch(t,i,e,s){this.usePrefetch(t)&&this.zt[t].adPrefetch.enablePrefetch(i,e,s)}startSessionPrefetch(t,i){this.zt[t].adPrefetch.startSessionPrefetch=i}disablePrefetch(t){this.usePrefetch(t)&&this.zt[t].adPrefetch.disablePrefetch()}getPrefetchType(t){if(this.usePrefetch(t))return this.zt[t].adPrefetch.prefetchType}hasStartSessionPrefetch(t){return!!this.usePrefetch(t)&&this.zt[t].adPrefetch.startSessionPrefetch}tryPreparingMidSessionPrefetch(t,i){var e;if(!this.usePrefetch(t))return;const s=(null===(e=this.zt[t].adLifecycleObserver)||void 0===e?void 0:e.isDurationExpired())||!1;this.zt[t].adPrefetch.tryPreparingMidSessionPrefetch(i,s)}destroy(){(0,jt.i)(this.wf),this.getAllAvailableAdManagers().forEach((t=>t.destroy()))}fT(t,i){this.getAllLinearityKeys().forEach((e=>{this.zt[e].usePrefetch&&(this.zt[e].adPrefetch=new Uh(t,i),this.mT(e))}))}mT(t){const i=this.zt[t].adPrefetch;this.wf.push(i.onMidSessionPrefetchReady.subscribe((i=>{this.aT.next({prefetchType:i,linearity:li[t]})})))}}class qh{constructor(t,i,e){this.Be=t,this.bf=i,this.vf=e,this.wf=[],this.Sf=new It.x,this.gT=new It.x,this.vT=new It.x,this.Tf=new It.x,this.yT=new It.x,this.Cf=new It.x,this.Lf=new It.x,this.Mf=new It.x,this.qx=new Map,this.bT={[li.LINEAR]:t=>{const i=new Oh(t);this.zt.setAdManager(li.LINEAR,i)},[li.NONLINEAR]:t=>{const i=new Lh(t);this.zt.setAdManager(li.NONLINEAR,i)}},this.xT={mediaMetadata:{},clickToPlay:!1,linearAdOpportunity:new Ti,newContent:!1,sound:0,vastViewMode:Vt.zc.Normal,adBreakState:this.vf.getAdBreakState(),playerOrientation:this.bf},this.zt=new Hh(this.Be.loopAdWhenFinished,this.Be.adPlaybackMode)}get onLinearNoFill(){return this.Mf.asObservable()}get onAdsEnable(){return this.Sf.asObservable()}get onLinearVpaidEvent(){return this.gT.asObservable()}get onNonlinearVpaidEvent(){return this.vT.asObservable()}get onLinearImpressionRevenue(){return this.Tf.asObservable()}get onNonlinearImpressionRevenue(){return this.yT.asObservable()}get onLinearImpressionPrice(){return this.Cf.asObservable()}get onNonlinearImpressionPrice(){return this.Lf.asObservable()}getCurrentAdBreakType(){return this.xT.adBreakState.adBreakType}initAd(t,i,e,s,n,r,h){this.wT(r),this.Jf(h),this.zt.getAllLinearityKeys().forEach((t=>{this._T(li[t],{sound:n})}))}getAdContainerSize(t){const i=this.qx.get(t);return{height:(null==i?void 0:i.clientHeight)||0,width:(null==i?void 0:i.clientWidth)||0}}getMainAdContainerWidth(t){var i;return null===(i=this.zt.getAdManagerByLinearity(t))||void 0===i?void 0:i.getMainContainerState().width}getCurrentAdMetadata(t){var i;return null===(i=this.zt.getAdManagerByLinearity(t))||void 0===i?void 0:i.getCurrentAdMetadata()}getCurrentAdMediaSize(t){var i;return null===(i=this.zt.getAdManagerByLinearity(t))||void 0===i?void 0:i.getCurrentAdMediaSize()}isAdInWin(t){const i=this.zt.getAdManagerByLinearity(t);return(null==i?void 0:i.isLoadingAds())||!1}enableAds(t){this.zt.enable(t),this._T(t),this.Sf.next(t)}disableAds(t,i){this.zt.disable(t,i);const e=this.zt.getAdManagerByLinearity(t);e&&(e.disableImpressions(),this.zt.usePrefetch(t)&&this.zt.tryPreparingMidSessionPrefetch(t,i))}setAdVolume(t,i){var e;null===(e=this.zt.getAdManagerByLinearity(t))||void 0===e||e.setAdVolume(i),this._T(t,{sound:i})}pauseAd(t,i){var e;null===(e=this.zt.getAdManagerByLinearity(t))||void 0===e||e.pauseAd(i)}resumeAd(t,i){var e;null===(e=this.zt.getAdManagerByLinearity(t))||void 0===e||e.resumeAd(i)}skipAd(t){var i;null===(i=this.zt.getAdManagerByLinearity(t))||void 0===i||i.skipAd()}stopAd(t,i){var e;null===(e=this.zt.getAdManagerByLinearity(t))||void 0===e||e.stopAd(i)}onAdStateChange(t,i,e){const s=Rh[i];this.ST(t,e,s)}onContentChange(){this.zt.getAllLinearityKeys().forEach((t=>{this._T(li[t],{newContent:!0})}))}setMediaRestrictions(t){const i=Object.assign(this.xT.mediaMetadata,t);this.zt.getAllLinearityKeys().forEach((t=>{const e=li[t];if(this._T(e,{mediaMetadata:i}),this.zt.usePrefetch(e)&&this.zt.hasStartSessionPrefetch(e)){const t=this.zt.getAdManagerByLinearity(e);this.AT(e,Ii.StartSessionPrefetch,t)}}))}userInteraction(t){this.zt.getAllLinearityKeys().forEach((t=>{this._T(li[t],{clickToPlay:!0})}))}setPlayerOrientation(t){this.xT.playerOrientation=t,this.zt.getAllAvailableAdManagers().forEach((i=>i.setPlayerOrientation(t)))}setVastViewMode(t){this.PT({vastViewMode:t})}newLinearAdOpportunity(){const t=li.LINEAR;this.zt.usePrefetch(t)&&(this.zt.getPrefetchType(t)===Ii.NoPrefetch&&(this.xT.linearAdOpportunity=new Ti),this._T(t,{linearAdOpportunity:this.xT.linearAdOpportunity}),this.zt.disablePrefetch(t))}updateLinearPodRemainingTime(t){const i=this.xT.adBreakState;Dh.remainTimeForAdPod(i,t)&&this.ST(li.LINEAR,t,i.adBreakType)}destroy(){try{(0,jt.i)(this.wf),this.zt.destroy()}catch(t){(0,s.n)({message:"AdManagerBridge_destroy",level:s.D.WARN,exception:t.message,callStack:t.stack})}}wT(t){t.forEach((t=>{this.qx.set(t.type,t.container)}))}ST(t,i,e){this._T(t,{adBreakState:this.vf.getAdBreakState({adSlotDuration:i,adBreakType:e})})}_T(t,i){this.PT(i);const e=this.zt.getAdManagerByLinearity(t);if(e&&this.zt.isAdManagerEnable(t)){if(this.zt.usePrefetch(t)){const i=!1;this.zt.startSessionPrefetch(t,i)}e.enableImpressions(this.xT),this.IT()}}PT(t){Object.assign(this.xT,t),this.xT.adBreakState=this.vf.getAdBreakState({adSlotDuration:this.xT.adBreakState.remainingAdDuration,adBreakType:this.xT.adBreakState.adBreakType})}IT(){this.PT({clickToPlay:!1,newContent:!1})}AT(t,i,e){this.xT.linearAdOpportunity=new Ti,this.zt.enablePrefetch(t,i,this.xT,e)}Jf(t){const i=gi(this.Be.adSourceSettings.lineItems,li.NONLINEAR),e=gi(this.Be.adSourceSettings.lineItems,li.LINEAR);(0,f.BZ)(i)&&this.kT(li.NONLINEAR,i,t),(0,f.BZ)(e)&&this.kT(li.LINEAR,e,t),this.CT(),this.TT()}kT(t,i,e){const s={lineItemList:i,adBreakHelper:this.vf,adContainerMap:this.qx,amazonTamSlotId:this.Be.amazonTamSlotId,outstream:this.Be.outstreamPlayer,pbjsSchainSettings:this.Be.prebidJsSupplyChain,skipPlayerSettings:this.Be.skipPlayerSettings,disableScrollHijackEnforcement:!this.Be.adSourceSettings.disableScrollHijackEnforcement,pauseAdWhenFinished:this.Be.pauseAdWhenFinished,loopAdWhenFinished:this.Be.loopAdWhenFinished,app:e};(0,this.bT[t])(s),this.wf.push(this.zt.onMidSessionPrefetchReady.subscribe((i=>{const{linearity:e,prefetchType:s}=i,n=this.zt.getAdManagerByLinearity(e);this.AT(t,s,n)})))}CT(){const t={[li.LINEAR]:this.gT,[li.NONLINEAR]:this.vT};Object.keys(t).forEach((i=>{const e=li[i];this.MT(e,t[e])}))}MT(t,i){const e=this.zt.getAdManagerByLinearity(t);e&&this.wf.push(e.onVpaidEvent.subscribe((e=>{var s,n;switch(e.type){case Vt.fI.AdLoaded:i.next({type:Vt.fI.AdLoaded,payload:jh.adLoadedPayload(e)});break;case Vt.fI.AdImpression:{const r=null===(n=null===(s=this.zt.getAdManagerByLinearity(t))||void 0===s?void 0:s.getCurrentAdMetadata())||void 0===n?void 0:n.adType,h=this.qx.get(r);i.next({type:Vt.fI.AdImpression,payload:jh.impressionPayload(e,h)});break}case Vt.fI.AdVideoStart:case Vt.fI.AdError:i.next(e);break;default:i.next({type:e.type,payload:jh.defaultPayload(e)})}})))}TT(){const t=this.zt.getAdManagerByLinearity(li.LINEAR),i=this.zt.getAdManagerByLinearity(li.NONLINEAR);t&&this.wf.push(t.onImpressionRevenueEvent.subscribe((t=>{this.Tf.next(t),this.Cf.next(t.impressionRevenue)})),t.onNoFill.subscribe((()=>{this.Mf.next()}))),i&&this.wf.push(i.onImpressionRevenueEvent.subscribe((t=>{this.yT.next(t),this.Lf.next(t.impressionRevenue)})))}}function zh(t,i,e,s){t.style.top=`${function(t,i,e,s,n){let r=i-s.clientY;const h=s.clientY+s.height-i;n.alignTop&&r>t.offsetHeight?r-=t.offsetHeight:!n.alignTop&&h<t.offsetHeight?r-=t.offsetHeight-h:(r+=e,r+t.offsetHeight>s.height&&(r=s.height-t.offsetHeight));return r}(t,i.clientY,i.height,e,s)}px`,t.style.left=`${function(t,i,e,s){const n=s.distanceFromMargin?s.distanceFromMargin:0;let r=Math.ceil(i)-Math.ceil(e.clientX),h=i,o=h+t.offsetWidth;const a=e.clientX+e.width;if(s.alignMiddle){const i=t.offsetWidth/2;r-=Math.ceil(i),h-=i,o-=i}if(s.alignMiddle||s.forceRight)return e.clientX>h?r=0+n:a<o&&(r-=Math.ceil(o)-Math.ceil(a)+n),r;o>a&&(r-=t.offsetWidth);return r}(t,i.clientX,e,s)}px`}!function(t){t[t.PlayButton=0]="PlayButton",t[t.BigPlayButton=1]="BigPlayButton",t[t.VolumeButton=2]="VolumeButton",t[t.VolumeProgress=3]="VolumeProgress",t[t.VolumeControls=4]="VolumeControls",t[t.ExpandButton=5]="ExpandButton",t[t.SettingsButton=6]="SettingsButton",t[t.CaptionButton=7]="CaptionButton",t[t.CaptionComponent=8]="CaptionComponent",t[t.CastButton=9]="CastButton",t[t.ShareButton=10]="ShareButton",t[t.UpNextButton=11]="UpNextButton",t[t.UpNextBox=12]="UpNextBox",t[t.PreviousButton=13]="PreviousButton",t[t.LogoComponent=14]="LogoComponent",t[t.LogoOutstream=15]="LogoOutstream",t[t.MoreButton=16]="MoreButton",t[t.ElapsedTimeLabel=17]="ElapsedTimeLabel",t[t.TotalDurationLabel=18]="TotalDurationLabel",t[t.RemainingDurationLabel=19]="RemainingDurationLabel",t[t.ProgressBar=20]="ProgressBar",t[t.QualityMenu=21]="QualityMenu",t[t.QueStateOverlay=22]="QueStateOverlay",t[t.Loader=23]="Loader",t[t.ContextMenu=24]="ContextMenu",t[t.ElementsSettingsMenu=25]="ElementsSettingsMenu",t[t.CloseButton=26]="CloseButton",t[t.SkipAdButton=27]="SkipAdButton",t[t.AdLoadingScreen=28]="AdLoadingScreen",t[t.CtaButton=29]="CtaButton",t[t.PlayspaceProgressBar=30]="PlayspaceProgressBar",t[t.PlayspaceSettingsMenu=31]="PlayspaceSettingsMenu",t[t.ClickToPlayButton=32]="ClickToPlayButton",t[t.OverlayComponent=33]="OverlayComponent",t[t.SlideTitle=34]="SlideTitle",t[t.SkipAd=35]="SkipAd",t[t.TopTitle=36]="TopTitle",t[t.TopLogo=37]="TopLogo",t[t.TopSlideTitle=38]="TopSlideTitle",t[t.TopStoryTitle=39]="TopStoryTitle",t[t.TextLabel=40]="TextLabel",t[t.LivePoster=41]="LivePoster",t[t.LiveIcon=42]="LiveIcon",t[t.ElementsCaptionMenu=43]="ElementsCaptionMenu"}(Vh||(Vh={})),function(t){t[t.Top=1]="Top",t[t.Bottom=2]="Bottom",t[t.Right=4]="Right",t[t.Left=8]="Left",t[t.Middle=16]="Middle"}(Fh||(Fh={}));class Wh extends d._{constructor(t,i,e,s,n){super(),this.mediator=t,this.yr=i,this.wc=e,this.Jt=n,this.Dc=i.createElementByString(s)}getContainer(){return this.Dc}getCoordinates(t){const i=this.yr.getElementCoordinates(this.Dc);return this.Jt&&t?((t&Fh.Top)===Fh.Top&&(i.clientY-=this.Dc.clientHeight),(t&Fh.Right)===Fh.Right&&(i.clientX+=this.Dc.clientWidth)):i.clientX+=i.width/2,i}showComponent(t=!1){if(!this.Dc||!this.Dc.parentElement)return;const i=(0,e.pv)(this.Dc.parentElement,"cnx-ui-btn")?this.Dc.parentElement:this.Dc;t&&(0,e.GF)(i)?(0,e.Ji)(i):(0,e.Ho)(i)}hideComponent(t=!1){if(!this.Dc||!this.Dc.parentElement)return;const i=(0,e.pv)(this.Dc.parentElement,"cnx-ui-btn")?this.Dc.parentElement:this.Dc;t&&!(0,e.GF)(i)?(0,e.U6)(i,(()=>(0,e.MV)(i))):(0,e.MV)(i)}destroy(){this.Dc.innerHTML="",this.Dc.style.display="none",this.wc.unregisterAll(this)}}class Gh extends Wh{constructor(t,i,e,s,n){super(t,i,e,s,n),this.eventList=[at.Z[at.Z.Scroll],at.Z[at.Z.Click]],this.ET=t=>{this.onInteractionHandler(t)},this.onBeforeClick=t=>{t.stopPropagation()},this.onClick=t=>{this.onInteractionHandler(t),this.onClickHandler(t)}}onInteractionHandler(t){t.stopPropagation()}onClickHandler(t){}initComponent(){const t={interactionstart:this.onBeforeClick,interaction:this.ET,click:this.onClick};this.wc.register(this.Dc,this,this.wc,t),this.Jt&&(this.subscribe(at.Z[at.Z.Click],this.wc,(()=>{this.onClickHandler()})),this.relay(at.Z[at.Z.Scroll],this.wc,this,this.mediator))}destroy(){this.unsubscribeAll(this.wc),super.destroy()}}class Jh extends Gh{constructor(){super(...arguments),this.onClick=t=>{this.onInteractionHandler(t),this.onClickHandler(),this.addBoomEffect()}}addBoomEffect(){(0,e.cn)(this.Dc,"cnx-boom"),(0,e.Tp)(this.Dc),(0,e.cn)(this.Dc,"cnx-boom-anim");const t=i=>{"transform"===i.propertyName&&((0,e.IV)(this.Dc,"cnx-boom"),(0,e.IV)(this.Dc,"cnx-boom-anim"),this.Dc.removeEventListener("transitionend",t))};this.Dc.addEventListener("transitionend",t)}initComponent(){super.initComponent(),this.Dc.appendChild(this.yr.createElementByString('<cnx class="cnx-boom-elem"></cnx>'))}}class Qh extends Jh{constructor(){super(...arguments),this.eventList=[_t[_t.HoverStart],_t[_t.HoverEnd],...this.eventList],this.onStartHover=()=>{(0,e.cn)(this.Dc,m.Gj.HoverStart),(0,e.cn)(this.Dc,m.Gj.HoverEnd),this.mediator.publish(this,_t[_t.HoverStart])},this.onEndHover=()=>{(0,e.IV)(this.Dc,m.Gj.HoverEnd),this.mediator.publish(this,_t[_t.HoverEnd])}}initComponent(){super.initComponent(),this.Jt?(this.Dc.addEventListener("touchstart",this.onStartHover,{passive:!0}),this.Dc.addEventListener("touchend",this.onEndHover),this.Dc.addEventListener("touchcancel",this.onEndHover)):(this.Dc.addEventListener("mouseenter",this.onStartHover),this.Dc.addEventListener("mouseleave",this.onEndHover))}destroy(){this.Jt?(this.Dc.removeEventListener("touchstart",this.onStartHover),this.Dc.removeEventListener("touchend",this.onEndHover),this.Dc.removeEventListener("touchcancel",this.onEndHover)):(this.Dc.removeEventListener("mouseenter",this.onStartHover),this.Dc.removeEventListener("mouseleave",this.onEndHover)),super.destroy()}onInteractionHandler(t){this.onEndHoverClick()}onEndHoverClick(){(0,e.IV)(this.Dc,m.Gj.HoverEnd),(0,e.IV)(this.Dc,m.Gj.HoverStart)}}!function(t){t[t.Play=0]="Play",t[t.Pause=1]="Pause"}($h||($h={}));class Yh extends Qh{constructor(t,i,e,s,n){super(t,i,e,s,n),this.BT=!1,this.eventList=[_t[_t.Play],_t[_t.Pause],_t[_t.Replay],_t[_t.StateChanged],...this.eventList],this.OT="Play",this.RT="Pause",this.setState($h.Pause)}onClickHandler(){this.H_===$h.Pause?this.mediator.publish(this,_t[_t.Pause]):this.BT?this.mediator.publish(this,_t[_t.Replay]):this.mediator.publish(this,_t[_t.Play])}DT(){}toggleReplay(t){this.BT=t}setState(t){this.H_!==t&&(this.H_=t,this.DT(),this.mediator.publish(this,_t[_t.StateChanged]))}get tooltip(){return this.H_===$h.Play?this.OT:this.RT}}class Xh{constructor(t){this.context=t}onClick(){}canTransitionToState(t){return!0}enterState(){this.initState(),this.context.currentState=this}}class Zh extends Xh{initState(){this.context.$uiContainer.classList.add(m.s_.Playing);const t=this.context.getComponent(Vh.PlayButton);t&&t.setState($h.Pause);const i=this.context.getComponent(Vh.BigPlayButton);i&&i.setState($h.Pause)}exitState(){this.context.$uiContainer.classList.remove(m.s_.Playing)}}class Kh extends Zh{constructor(){super(...arguments),this.jT=100}VT(){if(this.elapsedTimeoutId||!this.context.duration)return;const t=Date.now();this.elapsedTimeoutId=setTimeout((()=>{this.context.elapsedTime+=(Date.now()-t)/1e3;const i=this.context.getComponent(Vh.ProgressBar);i&&i.setProgress((0,di.dQ)(0,this.context.duration,0,100,this.context.elapsedTime)),this.elapsedTimeoutId=null,this.VT()}),this.jT)}initState(){super.initState(),this.context.duration&&this.VT()}exitState(){super.exitState(),this.context.duration&&(clearTimeout(this.elapsedTimeoutId),this.elapsedTimeoutId=null)}}class to extends Xh{initState(){this.context.$uiContainer.classList.add(m.s_.Paused);const t=this.context.getComponent(Vh.PlayButton);t&&t.setState($h.Play);const i=this.context.getComponent(Vh.BigPlayButton);i&&i.setState($h.Play)}exitState(){this.context.$uiContainer.classList.remove(m.s_.Paused)}}class io extends to{initState(){super.initState()}exitState(){super.exitState()}}class eo{constructor(t,i){this.FT=t,this.yr=i,this.$T=/\[\[([0-9]+)]]/g,this.NT=[],this.UT=[],this.qT=this.yr.createElementByString(this.zT(this.FT))}WT(t){return`<cnx class="pl_${t}"></cnx>`}zT(t){return t.replace(this.$T,((t,i)=>(this.NT.push(parseInt(i,10)),this.WT(i))))}GT(t,i){return this.UT.some((i=>i.slotName===t))||this.UT.some((t=>t.component===i))?null:this.qT.getElementsByClassName(`pl_${t}`)[0]}getComponentList(){return this.NT}getRenderedDom(){return this.qT}registerSlot(t,i){const e=this.GT(t,i);if(null!==e){const s=i.getContainer();return e.parentNode.replaceChild(s,e),this.UT.push({component:i,slotName:t}),!0}return!1}initComponents(){this.UT.forEach((t=>t.component.initComponent()))}}class so extends d._{constructor(t,i,e){super(),this.globalDomUtilsService=t,this.templateString=i,this.componentFactory=e,this.JT={},this.QT=new eo(i,t),this.addComponents()}addComponents(){this.QT.getComponentList().forEach((t=>{const i=this.componentFactory.createComponent(t,this);this.registerComponent(t,i)}))}registerComponent(t,i){this.QT.registerSlot(t,i),this.JT[t]=i,this.YT(i)}YT(t){t.eventList.forEach((i=>{this.subscribe(i,t,(e=>{i===_t[_t.RebindComponent]&&this.rebindComponentEvents(t),this.handleComponentEvent(i,e,t)}))}))}rebindComponentEvents(t){t&&(this.unsubscribeAll(t),this.YT(t))}getComponent(t){return this.JT[t]}destroy(){Object.keys(this.JT).forEach((t=>{this.JT[t].destroy()}))}}class no extends so{constructor(t,i,e,s,n){super(e,s,n),this.mediator=t,this.$container=i,this.componentFactory=n,this.$uiContainer=this.QT.getRenderedDom(),i.appendChild(this.$uiContainer),this.QT.initComponents()}changeState(t){const i=this.XT[t];i!==this.currentState&&this.currentState.canTransitionToState(i)&&(this.currentState.exitState(i),i.enterState())}hide(){(0,e.cn)(this.$uiContainer,m.Gj.DisplayNone)}show(){(0,e.IV)(this.$uiContainer,m.Gj.DisplayNone)}destroy(){super.destroy(),this.$uiContainer.parentNode.removeChild(this.$uiContainer)}}class ro{constructor(t,i){this.KT=t,this.yr=i,this.tM=[],this.iM={top:12,bottom:24,margin:4},this.eM=!1}sM(){this.nM=this.yr.getElementCoordinates(this.KT.parentElement)}hM(t,i){t.getElementsByClassName("cnx-tooltip-text")[0].innerHTML=i}oM(t){if(!t||!t.tooltip||this.eM)return;if(this.tM.find((i=>i.component===t)))return;const i=this.yr.createElementByString('<cnx class="cnx-tooltip-holder cnx-color-tt-bg"><cnx class="cnx-tooltip-text cnx-color-tt-text">TEST</cnx></cnx>');this.hM(i,t.tooltip),this.sM();const s=t.getCoordinates();let n=!1;const{clientY:r,height:h}=s,{clientY:o,height:a}=this.yr.getElementCoordinates(this.KT);r<=o+a/2-h?s.clientY+=this.iM.top:(s.clientY-=this.iM.bottom,n=!0),this.KT.appendChild(i),zh(i,s,this.nM,{alignMiddle:!0,alignTop:n,forceRight:!0,distanceFromMargin:this.iM.margin}),(0,e.Tp)(i),(0,e.cn)(i,m.hQ.OpacityInTransition),this.tM.push({component:t,domElement:i})}aM(t){if(!t.tooltip)return;const i=this.tM.find((i=>i.component===t));if(!i)return;const e=i.domElement;this.KT.removeChild(e),this.tM=this.tM.filter((i=>i.component!==t))}cM(t){if(!t.tooltip)return;const i=this.tM.find((t=>t.component===this.lM));i&&this.hM(i.domElement,t.tooltip)}uM(){this.lM=null,this.tM.forEach((t=>this.aM(t.component)))}setDistanceValues(t){this.iM=Object.assign(Object.assign({},this.iM),t)}hoverStart(t){this.lM=t,this.oM(t)}hoverEnd(t){this.lM=null,this.aM(t)}stateChanged(t){this.lM===t&&this.cM(t)}disableTooltips(){this.eM=!0,this.uM()}enableTooltips(){this.eM=!1,this.oM(this.lM)}}var ho,oo;!function(t){t[t.expand=0]="expand",t[t.collapse=1]="collapse"}(ho||(ho={}));class ao extends Qh{constructor(){super(...arguments),this.eventList=[_t[_t.Expand],_t[_t.Collapse],...this.eventList],this.dM="Full Screen",this.pM="Exit Full Screen"}onClickHandler(){switch(this.H_){case ho.collapse:this.mediator.publish(this,_t[_t.Expand]);break;case ho.expand:this.mediator.publish(this,_t[_t.Collapse]);break;default:this.mediator.publish(this,_t[_t.Expand])}}DT(){this.Dc&&(this.H_===ho.expand?this.Dc.classList.add(m.Gj.Active):this.Dc.classList.remove(m.Gj.Active))}setState(t){this.H_!==t&&(this.H_=t,this.DT())}get tooltip(){return this.H_===ho.expand?this.pM:this.dM}}class co extends no{constructor(t,i,e,s,n){super(t,i,e,s,n),this.fM=new ro(this.$uiContainer,e)}handleComponentEvent(t,i,e){let s=e;switch(i.payload&&i.payload.targetComponent&&(s=i.payload.targetComponent),t){case _t[_t.HoverStart]:this.fM.hoverStart(s);break;case _t[_t.HoverEnd]:this.fM.hoverEnd(s);break;case _t[_t.StateChanged]:this.fM.stateChanged(s)}}updateDuration(t,i){if(!(0,e.pv)(this.$uiContainer,m.s6.ShowControls))return;const s=this.getComponent(Vh.ElapsedTimeLabel),n=this.getComponent(Vh.TotalDurationLabel),r=this.getComponent(Vh.ProgressBar);if(s&&s.setTime(t),n&&n.setTime(i),r){const e=0,s=i,n=0,h=100;r.setProgress((0,di.dQ)(e,s,n,h,t))}}updateVolume(t){}expand(){this.getComponent(Vh.ExpandButton).setState(ho.expand)}collapse(){this.getComponent(Vh.ExpandButton).setState(ho.collapse)}}!function(t){t[t.SimpleMenuItem=0]="SimpleMenuItem",t[t.ToggleMenuItem=1]="ToggleMenuItem",t[t.SubmenuMenuItem=2]="SubmenuMenuItem"}(oo||(oo={}));class lo extends Wh{constructor(t,i,s,n,r,h,o,a){super(t,i,s,n,a),this.eventName=r,this.mM=h,this.gM=o,this.vM=[],this.eventList=[_t[_t.RebindComponent],at.Z[at.Z.HoldStart],at.Z[at.Z.HoldEnd],_t[_t.ContextMenuOpen],_t[_t.ContextMenuClose]],this.yM=!1,this.bM=10,this.xM=t=>{this.wM.removeChild(t.target),this.wM.style.width=`${this.Dc.clientWidth}px`},this.close=t=>{t&&(0,pi.Of)(t.target,m.s6.ContextController,this.bM)||!1!==this.isOpen&&(this.yM&&(this.mediator.publish(this,at.Z[at.Z.HoldEnd]),(0,e.IV)(this.gM,m.Gj.OnHold),this.yM=!1),this.isOpen=!1,this.mediator.publish(this,_t[_t.ContextMenuClose]),(0,e.cn)(this.Dc,m.Gj.Invisible),this.wc.removeGlobalActions(this.Dc),this.closeAllSubmenuItems())},this.close(),this.cacheCoordinates(),this.eventList.push(this.eventName),this.wM=this.Dc.getElementsByClassName(m.Ng.Container)[0],this._M=this.yr.createElementByString(`<cnx class="${m.Ng.Items}"></cnx>`),this.wM.appendChild(this._M),(0,e.cn)(this.wM,m.s6.ContextController)}addNewItemsEvent(t){const i=t.filter((t=>!(0,f.d3)(t,this.eventList)));i.length>0&&(this.eventList=[...this.eventList,...i],this.mediator.publish(this,_t[_t.RebindComponent],{payload:this.mM}))}cacheCoordinates(){this.nM=this.yr.getElementCoordinates(this.gM)}positionContextMenu(t){this.cacheCoordinates(),zh(this.Dc,t,this.nM,{alignMiddle:this.alignMiddle,alignTop:this.alignTop,forceRight:this.forceRight})}SM(t){switch(t.type){case oo.SimpleMenuItem:this.close();break;case oo.SubmenuMenuItem:this.AM(t)}}sendEvent(t,i){this.mediator.publish(this,t,i)}AM(t){const i=this.Dc.clientWidth;t.isOpen?(t.$menuContainer.addEventListener("transitionend",this.xM),this._M.style.left="0px",t.$menuContainer.style.left="0px"):(t.$menuContainer.removeEventListener("transitionend",this.xM),this.wM.style.width=2*i+"px",this.wM.appendChild(t.$menuContainer),(0,e.Tp)(this.wM),this._M.style.left=-i+"px",t.$menuContainer.style.left=-i+"px"),t.isOpen=!t.isOpen}closeAllSubmenuItems(){this.vM.forEach((t=>{t.type===oo.SubmenuMenuItem&&t.isOpen&&this.AM(t)}))}buildContextMenu(t){let i=[];this._M.innerHTML="",this.wM.style.width=`${this.Dc.clientWidth}px`,this.vM.forEach((t=>this.unsubscribeAll(t))),this.vM=t,this.vM.forEach((t=>{i=[...i,...t.eventList],t.eventList.forEach((i=>this.subscribe(i,t,(e=>{this.SM(t),this.sendEvent(i,e)})))),t.initComponent(),this._M.appendChild(t.getContainer())})),this.addNewItemsEvent(i)}getAnchorCoordinatesTo(t){return null==t?void 0:t.getCoordinates()}open(t,i=!1){i&&(this.yM=i,this.mediator.publish(this,at.Z[at.Z.HoldStart]),(0,e.cn)(this.gM,m.Gj.OnHold)),this.isOpen=!0,this.mediator.publish(this,_t[_t.ContextMenuOpen]),this.positionContextMenu(t);const s={interactionend:this.close};this.wc.addGlobalActions(this.Dc,s),(0,e.IV)(this.Dc,m.Gj.Invisible)}}class uo extends Gh{constructor(t,i,e,s,n){super(t,i,e,uo.getTemplate(n),s),this.mediator=t,this.Bc=!1,this.type=oo.SimpleMenuItem,this.eventList=[],this.event=n.activeEvent,this.name=n.name,n.eventList?this.eventList=n.eventList:this.eventList.push(this.event),this.IM=this.Dc.getElementsByClassName(m.Ng.ItemTitle)[0],this.kM=this.Dc.getElementsByClassName(m.Ng.ItemIcon)[0]}static getTemplate(t){const i=`<cnx class="${m.Ng.ItemIcon}">${t.icon}</cnx>`,e=`<cnx class="${m.Ng.ItemExtra}">${t.label}</cnx>`;return`<cnx class="${m.Ng.ClickOption}">\n                    ${t.icon?i:""}\n                    <cnx class="${m.Ng.ItemTitle}">${t.name}</cnx>\n                    ${t.label?e:""}\n                </cnx>`}onClickHandler(t){this.mediator.publish(this,this.event)}changeItemName(t){this.IM.innerHTML=t}changeItemIcon(t){this.kM.innerHTML=t}get isActive(){return this.Bc}set isActive(t){this.Bc=t,this.Bc?(0,e.cn)(this.Dc,m.Gj.Active,m.iu.AccentColor):(0,e.IV)(this.Dc,m.Gj.Active,m.iu.AccentColor)}}class po extends lo{constructor(t,i,e,s,n,r,h,o,a){super(t,i,e,s,n,r,h,o),this.resizeObserver=a,this.alignMiddle=!0,this.alignTop=!0,this.forceRight=!1,this.CM=[],this.TM=new uo(this,this.yr,this.wc,this.Jt,{name:"Off",activeEvent:null}),this.MM=[],this.EM=!1}sendEvent(t){this.updateCaptionSelection(t),this.mediator.publish(this,this.eventName,{payload:{event:t?_t[_t.CaptionOn]:_t[_t.CaptionOff],data:t}})}createCaptionsMenu(t){if(this.MM===t)return;0===this.CM.length?this.CM.push(this.TM):this.CM=this.CM.slice(0,1),t.forEach((t=>{this.CM.push(new uo(this,this.yr,this.wc,this.Jt,{name:t.title,activeEvent:t.file}))}));const i=this.MM.find((t=>{var i;return t.title===(null===(i=this.BM)||void 0===i?void 0:i.name)}));this.BM&&i&&this.updateCaptionSelection(i.file),(0,e.T7)(this.getContainer(),{height:"auto"}),this.MM=t,this.resizeObserver&&!this.EM&&(this.resizeObserver.on(this.getContainer(),(t=>this.OM(t))),this.EM=!0),this.buildContextMenu(this.CM)}initComponent(){}onResize(t){this.cacheCoordinates(),this.isOpen&&this.positionContextMenu(t)}updateCaptionSelection(t){this.CM.forEach((t=>t.isActive=!1));const i=this.MM.find((i=>i.file===t));i?this.BM=this.CM.find((t=>t.name===i.title)):t||(this.BM=this.CM.find((t=>"Off"===t.name))),this.BM&&(this.BM.isActive=!0)}OM(t){t.clientHeight>=188&&(0,e.T7)(t,{height:"188px"}),this.Uc||(this.Uc=new st(t,{horizontal:!1}),(0,e.cn)(t,m.Gj.HasCustomScrollbar))}}class fo extends Qh{constructor(){super(...arguments),this.eventList=[_t[_t.Settings],...this.eventList],this.LM="Settings"}onClickHandler(){this.mediator.publish(this,_t[_t.Settings])}toggleHDFlag(t){t?(0,e.cn)(this.Dc,m.Gj.Active):(0,e.IV)(this.Dc,m.Gj.Active)}get tooltip(){return this.LM}}class mo extends Qh{constructor(t,i,e,s,n,r=!1,h){super(t,i,e,s,h),this.RM=n,this.isActive=r}onClickHandler(){this.isActive=!this.isActive,this.onStateChange()}get isActive(){return this.H_}set isActive(t){this.H_=t,this.H_?(0,e.cn)(this.Dc,this.RM):(0,e.IV)(this.Dc,this.RM)}}class go extends mo{constructor(){super(...arguments),this.eventList=[_t[_t.CaptionMenu],_t[_t.CaptionOn],_t[_t.CaptionOff],_t[_t.StateChanged],...this.eventList],this.LM="Closed Captions"}onClickHandler(){this.mediator.publish(this,_t[_t.CaptionMenu])}onStateChange(){this.mediator.publish(this,this.isActive?_t[_t.CaptionOn]:_t[_t.CaptionOff]),this.mediator.publish(this,_t[_t.StateChanged])}get tooltip(){return this.LM}}const vo='<cnx class="cnx-icon-button cnx-button-caption cnx-context-controller cnx-ui-btn-hoverable"><cnx class="cnx-btn-container"><cnx class="cnx-caption-off-icon"><svg markup-inline class="cnx-color-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M20.556 5H3.444C3.163 5 3 5.15 3 5.25v13.5c0 .1.163.25.444.25h17.11c.275 0 .444-.156.444-.25V5.25c0-.094-.17-.25-.444-.25zm0-2C21.9 3 23 4.013 23 5.25v13.5c0 1.238-1.1 2.25-2.444 2.25H3.444C2.088 21 1 19.988 1 18.75V5.25C1 4.013 2.088 3 3.444 3h17.11zM11 11H9.5v-.5h-2v3h2V13H11v1c0 .55-.45 1-1 1H7c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1h3c.55 0 1 .45 1 1v1zm7 0h-1.5v-.5h-2v3h2V13H18v1c0 .55-.45 1-1 1h-3c-.55 0-1-.45-1-1v-4c0-.55.45-1 1-1h3c.55 0 1 .45 1 1v1z" fill-rule="evenodd"/></svg></cnx><cnx class="cnx-caption-on-icon"><svg markup-inline class="cnx-color-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><g fill="none"><path d="M20.6 3C21.9 3 23 4 23 5.3v13.5c0 1.2-1.1 2.2-2.4 2.2H3.4C2.1 21 1 20 1 18.8V5.3C1 4 2.1 3 3.4 3h17.2z" class="cnx-color-accent"/><path d="M11 11H9.5v-.5h-2v3h2V13H11v1c0 .6-.4 1-1 1H7c-.5 0-1-.4-1-1v-4c0-.5.5-1 1-1h3c.6 0 1 .5 1 1v1zm7 0h-1.5v-.5h-2v3h2V13H18v1c0 .6-.4 1-1 1h-3c-.5 0-1-.4-1-1v-4c0-.5.5-1 1-1h3c.6 0 1 .5 1 1v1z" class="cnx-color-icon"/></g></svg></cnx></cnx></cnx>';class yo extends Gh{constructor(){super(...arguments),this.Id=!1,this.eventList=[_t[_t.Next]]}onClickHandler(){this.mediator.publish(this,_t[_t.Next])}show(){this.Id=!0,this.Dc.classList.add("cnx-fade-in-up-next")}hide(){this.Id=!1,this.Dc.classList.remove("cnx-fade-in-up-next")}isInView(){return this.Id}updateCard(t,i){const e=this.Dc.getElementsByTagName("img")[0];e.setAttribute("src",t),e.style.display="none",e.onload=()=>{e.style.display="block"};this.Dc.getElementsByClassName("cnx-up-next-box-text")[0].innerHTML=(0,dt.QM)(i)?i:""}}class bo extends Wh{constructor(t,i,e,s,n){super(t,i,e,s),this.settings=n,this.eventList=[],this.DM=144,this.jM=36}createLogo(){let t=this.yr.createElement("img");t.onload=()=>{t=this.resizeLogo(t),this.Dc.appendChild(t)},t.src=this.settings.logoUrl,t.alt=""}resizeLogo(t){const i=t.naturalWidth,e=t.naturalHeight;if(!i||!e)return t;if(this.settings.logoPosition===$.ProtoLogoPositionMode.ControlBar)t.style.setProperty("height",`${this.jM}px`,"important"),t.style.setProperty("width",`${this.jM}px`,"important");else{const s=i/e;this.jM*s>this.DM?(t.style.setProperty("width",`${this.DM}px`,"important"),t.style.setProperty("height","auto","important")):(t.style.setProperty("width","auto","important"),t.style.setProperty("height",`${this.jM}px`,"important"))}return t}initComponent(){try{this.createLogo()}catch(t){(0,s.n)({message:"LogoComponent_createLogo",exception:t.message,callStack:t.stack,level:s.D.CRITICAL})}}}class xo extends Wh{constructor(){super(...arguments),this.eventList=[]}initComponent(){this.VM=this.Dc.getElementsByTagName("cnx-span")[0]}setTime(t){isNaN(t)||"number"!=typeof t?(0,e.cn)(this.Dc,m.Gj.Invisible):(this.VM.innerHTML=(0,ut.to)(t),(0,e.IV)(this.Dc,m.Gj.Invisible))}}const wo='<cnx class="cnx-ui-progress-label"><cnx-span></cnx-span></cnx>';class _o extends Wh{constructor(t,i,e,s,n=!1){super(t,i,e,s,n),this.FM=0,this.$M=null,this.NM=0,this.UM=0,this.HM=100,this.cacheDomElements()}cacheDomElements(){this.qM=this.Dc.getElementsByClassName("cnx-progress-fill")[0],this.Gc=this.Dc.getElementsByClassName("cnx-progress-rail")[0]}cacheWidths(){this.FM=this.fixedRailWidth?this.fixedRailWidth:this.Gc.getBoundingClientRect().width,this.$M=this.Gc.getBoundingClientRect().left}updateUi(t){const i=this.getComputedTranslation(t);this.NM=i,this.qM.style.transform=`translateX(${i}px)`}isValidTranslation(){return this.NM>=0&&this.NM<=this.FM}getComputedTranslation(t){return t<0?0:t>this.FM?this.FM:t}setProgress(t){this.cacheWidths();const i=this.getComputedTranslation((0,di.dQ)(0,100,0,this.FM,t));this.updateUi(i)}disableTransition(){(0,e.cn)(this.Dc,m.Gj.NoTransition)}enableTransition(){(0,e.IV)(this.Dc,m.Gj.NoTransition)}zM(t){this.disableTransition(),this.setProgress(t),(0,e.Tp)(this.qM),this.enableTransition()}forceStartState(){this.zM(this.UM)}forceEndState(){this.zM(this.HM)}initComponent(){this.cacheWidths()}destroy(){super.destroy()}}class So extends _o{constructor(t,i,e,s,n=!1){super(t,i,e,s,n),this.WM=0,this.xn=null,this.GM=!1,this.eventList=[_t[_t.DraggingStart],_t[_t.DraggingStopped]],this.JM=t=>{this.cacheWidths(),this.YM(this.XM(t)),this.Jt?this.Dc.addEventListener(this.ZM,this.KM):this.yr.addEventListenerOnGlobal(this.ZM,this.KM),this.onDragStart()},this.KM=t=>{null===this.xn&&(this.GM||(this.GM=!0,this.disableTransition()),this.xn=this.yr.requestAnimationFrameHelper((()=>{const i=this.tE+(this.XM(t)-this.iE);this.isValidTranslation()&&this.eE(i),this.xn=null})))},this.sE=t=>{t.stopPropagation(),this.Jt?this.Dc.removeEventListener(this.ZM,this.KM):this.yr.removeEventListenerOnGlobal(this.ZM,this.KM),this.GM=!1,this.enableTransition(),this.onDragEnd()},this.ZM=n?"touchmove":"mousemove"}cacheDomElements(){super.cacheDomElements(),this.nE=this.Dc.getElementsByClassName("cnx-progress-handle")[0]}cacheWidths(){super.cacheWidths(),this.WM=this.nE.getBoundingClientRect().width/2}updateUi(t){super.updateUi(t);const i=this.getComputedTranslation(t);this.nE.style.transform=`translateX(${i-this.WM}px)`}onDragEnd(){this.mediator.publish(this,_t[_t.DraggingStopped])}onDragStart(){this.mediator.publish(this,_t[_t.DraggingStart])}XM(t){return this.Jt?t.touches.item(0).clientX:t.clientX}YM(t){this.tE=t-this.$M,this.iE=t,this.eE(this.tE)}eE(t){if(this.isValidTranslation()){const i=this.getComputedTranslation(t),e=0,s=this.FM,n=0,r=100;this.updateUi(i),this.onProgressChange((0,di.dQ)(e,s,n,r,i))}}setProgress(t){super.setProgress(t)}initComponent(){super.initComponent();const t={interactionstart:this.JM,interactionend:this.sE};this.wc.register(this.Dc,this,this.wc,t)}destroy(){super.destroy()}}class Ao extends So{constructor(t,i,s,n,r=!1){super(t,i,s,n,r),this.rE=!1,this.hE=t=>{(0,e.cn)(this.Dc,m.Gj.HoverEnd),this.rE=!0},this.oE=t=>{const i=this.getComputedTranslation(t.clientX-this.$M);this.aE.style.transform=`translateX(${i}px)`},this.cE=t=>{this.aE.style.transform="translateX(0)",this.rE=!1,this.lE()},this.eventList=this.eventList.concat([_t[_t.Seek],_t[_t.SeekingStart],_t[_t.SeekingStopped]])}onProgressChange(t){this.mediator.publish(this,_t[_t.Seek],{payload:t-.1})}onDragEnd(){super.onDragEnd(),this.mediator.publish(this,_t[_t.SeekingStopped]),this.lE()}onDragStart(){super.onDragStart(),this.mediator.publish(this,_t[_t.SeekingStart])}lE(){this.rE||this.GM||(0,e.IV)(this.Dc,m.Gj.HoverEnd)}initComponent(){super.initComponent(),this.Dc.addEventListener("mousemove",this.oE),this.Dc.addEventListener("mouseenter",this.hE),this.Dc.addEventListener("mouseleave",this.cE),this.aE=this.Dc.getElementsByClassName("cnx-progress-follow")[0]}hide(){(0,e.MV)(this.Dc)}show(){(0,e.Ho)(this.Dc)}destroy(){super.destroy(),this.Dc.removeEventListener("mousemove",this.oE),this.Dc.removeEventListener("mouseenter",this.hE),this.Dc.removeEventListener("mouseleave",this.cE)}}class Po extends Wh{constructor(){super(...arguments),this.eventList=[]}initComponent(){this.hide()}show(){(0,e.Ho)(this.Dc)}hide(){(0,e.MV)(this.Dc)}}const Io='<cnx class="cnx-ui-loader"><svg class="cnx-color-accent" version="1.1" viewBox="0 0 79 90" xmlns="http://www.w3.org/2000/svg"><polygon points="21 73.322 11 79 11 12 21 17.678" fill="none" stroke-linecap="round" stroke-linejoin="round"/><polygon points="27 70 27 21 38 27.267 38 63.733" fill="transparent" stroke-linecap="round" stroke-linejoin="round"/><polygon points="44 61 44 31 54 36.769 54 55.231" fill="none" stroke-linecap="round" stroke-linejoin="round"/><polygon points="60 51 60 40 70 45.5" fill="none" stroke-linecap="round" stroke-linejoin="round"/></svg></cnx>';var ko=o(7089);class Co extends lo{constructor(){super(...arguments),this.alignMiddle=!1,this.alignTop=!1,this.forceRight=!0}uE(){const t=i.g.version?`V${i.g.version}`:"dev",e=[new uo(this,this.yr,this.wc,this.Jt,{activeEvent:_t[_t.AboutClick],name:"About Connatix",icon:ko,label:t})];this.buildContextMenu(e)}initComponent(){this.uE()}onResize(){this.cacheCoordinates(),this.close()}}const To="About Connatix",Mo="Closed Captions";var Eo=o(9335);class Bo extends Gh{constructor(t,i,e,s,n){super(t,i,e,Bo.getTemplate(n),s),this.mediator=t,this.vM=[],this.Bc=!1,this.type=oo.SubmenuMenuItem,this.eventList=[],this.isOpen=!1,this.event=n.event,this.eventList.push(this.event),this.dE=new uo(this,i,e,s,{activeEvent:n.event,name:n.name.toUpperCase(),icon:""}),this.$menuContainer=this.yr.createElementByString(`<cnx class="${m.Ng.Items}"></cnx>`),this.fE=this.Dc.getElementsByClassName(m.Ng.ItemExtra)[0]}static getTemplate(t){const i=`<cnx class="${m.Ng.ItemIcon}">${t.icon}</cnx>`;return`<cnx class="${m.Ng.SubmenuOption}">\n                    ${t.icon?i:""}\n                    <cnx class="${m.Ng.ItemTitle}">${t.name}</cnx>\n                    <cnx class="${m.Ng.ItemExtra} ${m.iu.AccentColor}">${t.label?t.label:""}${Eo}</cnx>\n                </cnx>`}onClickHandler(t){this.mediator.publish(this,this.event)}handleItemsEvents(t){this.mediator.publish(this,this.event,{payload:t===this.event?void 0:t})}buildContextMenu(t){this.$menuContainer.innerHTML="",this.vM.forEach((t=>this.unsubscribeAll(t))),this.vM=[this.dE,...t],this.vM.forEach((t=>{t.eventList.forEach((i=>this.subscribe(i,t,(()=>this.handleItemsEvents(i))))),t.initComponent(),this.$menuContainer.appendChild(t.getContainer())}))}changeLabel(t){this.fE.innerHTML=`${t}${Eo}`}get isActive(){return this.Bc}set isActive(t){this.Bc=t,this.Bc?(0,e.cn)(this.Dc,m.Gj.Active):(0,e.IV)(this.Dc,m.Gj.Active)}}class Oo extends Bo{constructor(t,i,e,s,n,r,h){super(t,i,e,s,{event:_t[_t.CaptionMenu],name:n,icon:vo,options:[]}),this.mediator=t,this.resizeObserver=h,this.CM=[],this.TM=new uo(this,this.yr,this.wc,this.Jt,{name:"Off",activeEvent:null}),this.MM=[],this.isActive=r}handleItemsEvents(t){t!==_t[_t.CaptionMenu]&&this.isOpen&&(this.updateSelection(t),(0,e.T7)(this.$menuContainer,{height:"0"}),this.mediator.publish(this,this.event,{payload:{event:t?_t[_t.CaptionOn]:_t[_t.CaptionOff],data:t}}))}createCaptionsMenu(t){0===this.CM.length?this.CM.push(this.TM):this.CM=this.CM.slice(0,1),t.forEach((t=>{this.CM.push(new uo(this,this.yr,this.wc,this.Jt,{name:t.title,activeEvent:t.file}))}));let i=!1;this.MM.length!==t.length&&(i=!0),this.updateMenu(),this.MM=t;const e=this.MM.find((t=>{var i;return t.title===(null===(i=this.BM)||void 0===i?void 0:i.name)}));this.BM&&e&&this.updateSelection(e.file),this.buildContextMenu(this.CM),this.resizeObserver&&i&&(this.resizeObserver.off(this.$menuContainer,(t=>this.OM(t))),this.resizeObserver.on(this.$menuContainer,(t=>this.OM(t))))}updateSelection(t){this.CM.forEach((t=>t.isActive=!1));const i=this.MM.find((i=>i.file===t));i?this.BM=this.CM.find((t=>t.name===i.title)):t||(this.BM=this.CM.find((t=>"Off"===t.name))),this.BM&&(this.BM.isActive=!0)}updateMenu(){(0,e.T7)(this.$menuContainer,{height:"auto"})}reset(){var t;this.resizeObserver.off(this.$menuContainer,(t=>this.OM(t))),null===(t=this.Uc)||void 0===t||t.removeListeners(),this.Uc=null,this.MM=[]}OM(t){t.clientHeight>=188&&(0,e.T7)(t,{height:"188px"}),this.Uc||(this.Uc=new st(t,{horizontal:!1}),(0,e.cn)(t,m.Gj.HasCustomScrollbar))}}class Lo extends lo{constructor(t,e,s,n,r,h,o,a,c,l=!0,u){super(t,e,s,n,r,h,o,c),this.alignMiddle=!1,this.alignTop=!1,this.forceRight=!1,this.mE=[new uo(this,this.yr,this.wc,this.Jt,{activeEvent:_t[_t.AboutClick],name:To,icon:ko,label:i.g.version?`V${i.g.version}`:"dev"})],this.gE=new Oo(this,this.yr,this.wc,this.Jt,Mo,l,u),this.vE=[this.gE],this.yE=a}bE(){let t=this.mE;this.yE===m.Rq.Lg&&(t=[...this.vE,...this.mE]),this.buildContextMenu(t)}initComponent(){this.bE()}onResize(t,i){this.isOpen&&this.positionContextMenu(t),this.yE!==i?(this.yE=i,this.closeAllSubmenuItems(),this.bE()):this.yE=i}toggleCaptionState(t){this.gE.isActive!==t&&(this.gE.isActive=t)}hideCaptionOption(){this.gE.hideComponent()}showCaptionOption(){this.gE.showComponent()}updateCaptionSelection(t){this.gE.updateSelection(t)}updateMenu(){this.gE.updateMenu()}getAnchorCoordinatesTo(t){let i=Fh.Right;return this.yE!==m.Rq.Xl&&this.yE!==m.Rq.Xxl&&(i|=Fh.Top),t.getCoordinates(i)}createCaptionsMenu(t){this.gE.createCaptionsMenu(t)}reset(){var t;null===(t=this.gE)||void 0===t||t.reset()}}var Ro=o(8852);class Do extends Wh{constructor(){super(...arguments),this.eventList=[]}initComponent(){this.xE=this.Dc.getElementsByClassName(m.Yk.CaptionContainer)[0]}updateCaptions(t){this.xE.innerHTML=t&&t.text?(0,Ro.f5)(t.text,"<br>"):""}}class jo extends bo{constructor(){super(...arguments),this.wE="cnx-logo-height",this._E="cnx-logo-width"}createLogo(){this.Dc.onload=()=>{this.Dc.style.visibility="visible",this.resizeLogo(this.Dc)},this.Dc.style.visibility="hidden",this.Dc.src=this.settings.logoUrl}resizeLogo(t){const i=t.naturalWidth,s=t.naturalHeight;return i&&s?(i>s?(0,e.cn)(t,this._E):(0,e.cn)(t,this.wE),t):t}}var Vo=o(834),Fo=o(1639);class $o extends So{constructor(t,i,e,s,n=!1){super(t,i,e,s,n),this.SE=80,this.fixedRailWidth=this.SE,this.eventList.push(_t[_t.Volume])}onProgressChange(t){this.mediator.publish(this,_t[_t.Volume],{payload:t})}}function No(t,i,e){const s=e?y[y.Auto]:i.height.toString();t.forEach((t=>t.name.includes(s)?t.isActive=!0:t.isActive=!1));const n=t.find((t=>y[t.event]===y.Auto));if(e){const e=t.find((t=>t.event===i.height.toString()));if(e){const t=`${n.name} (${e.name})`;n.changeItemName(t)}}else n.changeItemName(n.name)}class Uo extends lo{constructor(){super(...arguments),this.alignMiddle=!0,this.alignTop=!0,this.forceRight=!1,this.CM=[],this.AE={height:360,quality:y.Auto},this.PE=!0}sendEvent(t){this.PE=y[t]===y.Auto,this.mediator.publish(this,this.eventName,{payload:{height:this.PE?this.AE.height:parseInt(t,10),quality:this.PE?y.Auto:y.Strict}})}initComponent(){}createQualityMenu(t){this.CM=[],this.IE=t,this.IE.forEach((t=>{this.CM.push(new uo(this,this.yr,this.wc,this.Jt,{name:`${t.videoHeight}p`,activeEvent:t.videoHeight.toString(),label:t.isHD?"HD":void 0}))})),this.CM.push(new uo(this,this.yr,this.wc,this.Jt,{name:y[y.Auto],activeEvent:y[y.Auto]})),No(this.CM,this.AE,this.PE),this.buildContextMenu(this.CM)}onResize(t){this.cacheCoordinates(),this.isOpen&&this.positionContextMenu(t)}updateQuality(t){(0,f.BZ)(this.IE)&&(this.PE=t.quality===y.Auto,this.AE.quality=t.quality,this.AE.height=(0,di.DE)(t.height,this.IE.map((t=>t.videoHeight))),No(this.CM,this.AE,this.PE))}}class Ho extends Wh{constructor(){super(...arguments),this.eventList=[]}initComponent(){this.hide()}show(){(0,e.Ho)(this.Dc),(0,e.Tp)(this.Dc),(0,e.cn)(this.Dc,m.Gj.Active)}hide(){(0,e.IV)(this.Dc,m.Gj.Active),(0,e.MV)(this.Dc)}}class qo extends Qh{constructor(t,i,e,s,n,r,h){super(t,i,e,s,n),this.tooltip=h,this.CE=Vh[r],this.eventList.push(this.CE)}onClickHandler(){this.mediator.publish(this,this.CE)}}class zo extends Gh{constructor(t,i,e,s,n,r,h){super(t,i,e,s,n),this.tooltip=h,this.eventList=[],this.CE=Vh[r],this.eventList.push(this.CE)}onClickHandler(){this.mediator.publish(this,this.CE)}}class Wo{constructor(t,i,e,s){this.yr=t,this.wc=i,this.Jt=e,this.TE=new Map,Object.keys(s).forEach((t=>this.ME(Vh[t],s[t])))}getButton(t,i){const{isHoverable:e,template:s,tooltip:n}=this.EE(t);return e?new qo(i,this.yr,this.wc,s,this.Jt,t,n):new zo(i,this.yr,this.wc,s,this.Jt,t,n)}isGeneralComponent(t){return this.TE.has(t)}EE(t){return this.TE.get(t)}ME(t,i){this.TE.set(t,i)}}var Go=o(1215);function Jo(t,i,e=!0){return e?`\n            <cnx class="cnx-icon-button cnx-button-${Vh[t].toLowerCase()} cnx-ui-btn-hoverable">\n                <cnx class="cnx-btn-container">\n                    ${i}\n                </cnx>\n            </cnx>\n        `.trim():`<cnx class="cnx-button-${Vh[t].toLowerCase()}">${i}</cnx>`}var Qo=o(9040),Yo=o(89);const Xo={[Vh[Vh.MoreButton]]:{template:Jo(Vh.MoreButton,Yo),tooltip:"More",isHoverable:!0},[Vh[Vh.CloseButton]]:{template:Jo(Vh.CloseButton,Go),tooltip:"Close Player",isHoverable:!0},[Vh[Vh.UpNextButton]]:{template:Jo(Vh.UpNextButton,Qo),tooltip:"Next",isHoverable:!0},[Vh[Vh.PreviousButton]]:{template:Jo(Vh.PreviousButton,Qo),tooltip:"Previous",isHoverable:!0}};class Zo extends Qh{constructor(){super(...arguments),this.eventList=[_t[_t.SkipAd],...this.eventList],this.BE=-1,this.OE=-1}initComponent(){super.initComponent(),this.hideComponent(),this.LE=this.Dc.getElementsByTagName("cnx-span")[0],this.LE.innerHTML="Ad",this.RE=this.Dc.querySelectorAll(`.${m.Hs.Timer} svg`)[0]}setSecondsUntilSkip(t){this.BE=Math.ceil(t),this.OE=-1,this.BE>0&&(0,e.T7)(this.RE,{"animation-duration":this.BE+"s"})}tickDown(t){const i=this.BE-Math.floor(t);if(i<0||0===this.OE)return;const s=(0,e.pv)(this.Dc,m.Hs.InTimer);this.OE=i,0===this.OE?(s&&(0,e.IV)(this.Dc,m.Hs.InTimer),this.LE.innerHTML="Ad"):(s||(0,e.cn)(this.Dc,m.Hs.InTimer),this.LE.innerHTML=`in ${this.OE}s`)}get tooltip(){}onClickHandler(){0===this.OE&&this.mediator.publish(this,_t[_t.SkipAd])}}var Ko=o(4670);class ta extends Wh{constructor(){super(...arguments),this.eventList=[]}initComponent(){this.jE=this.Dc.getElementsByClassName(m.mr.BackgroundImg)[0],this.VE=this.Dc.getElementsByClassName(m.mr.Icon)[0],this.VE.innerHTML=Ko,this.FE=this.Dc.getElementsByClassName(m.mr.ButtonContainer)[0];const t=this.Dc.getElementsByClassName(m.mr.Button)[0];this.$E=this.yr.createElementByString(`<a class="${m.mr.Wrapper}" href="#">`),this.$E.target=Pt.bS.Blank,this.$E.appendChild(t),this.FE.innerHTML="",this.FE.appendChild(this.$E),this.NE=this.Dc.getElementsByClassName(m.mr.InfoContainer)[0],this.UE=this.Dc.getElementsByClassName(m.mr.FallbackContainer)[0],this.HE=this.Dc.getElementsByClassName(m.mr.SlotCountText)[0]}setBackgroundImg(t){(0,dt.QM)(t)?((0,e.IV)(this.jE,m.Gj.DisplayNone),this.jE.src=t):(0,e.cn)(this.jE,m.Gj.DisplayNone)}setClickUrl(t){if(!(0,dt.QM)(t))return(0,e.Ho)(this.UE),void(0,e.MV)(this.NE);(0,e.Ho)(this.NE),(0,e.MV)(this.UE),this.$E.href=t}setFallbackText(t,i){const e=t||1,s=i||1;this.HE.innerHTML=`Loading ad ${e}/${s}`}}var ia;!function(t){t[t.Mute=0]="Mute",t[t.Unmute=1]="Unmute"}(ia||(ia={}));class ea extends Qh{constructor(t,i,e,s,n,r){super(t,i,e,s,r),this.eventList=[_t[_t.Mute],_t[_t.Unmute],_t[_t.StateChanged],...this.eventList],this.qE="Mute",this.zE="Unmute",this.H_=n}onClickHandler(){this.H_===ia.Mute?(this.mediator.publish(this,_t[_t.Unmute]),this.setState(ia.Unmute)):(this.mediator.publish(this,_t[_t.Mute]),this.setState(ia.Mute))}DT(){this.H_===ia.Mute?(0,e.L_)(this.Dc,"cnx-sound-on","cnx-sound-off"):(0,e.L_)(this.Dc,"cnx-sound-off","cnx-sound-on")}get tooltip(){return this.H_===ia.Mute?this.zE:this.qE}initComponent(){super.initComponent(),this.DT()}setState(t){this.H_!==t&&(this.H_=t,this.DT(),this.mediator.publish(this,_t[_t.StateChanged]))}setVolume(t){t>0?this.setState(ia.Unmute):this.setState(ia.Mute)}}class sa extends so{constructor(t,i,e,s){super(i,e,s),this.mediator=t,this.Dc=this.QT.getRenderedDom()}getContainer(){return this.Dc}initComponent(){this.QT.initComponents()}showComponent(){(0,e.Ho)(this.Dc)}hideComponent(){(0,e.MV)(this.Dc)}}class na extends sa{constructor(t,i,s,n){super(t,i,s,n),this.WE=null,this.eventList=[_t[_t.Volume],_t[_t.VolumeHoverStart],_t[_t.VolumeHoverStopped],_t[_t.DraggingStopped],_t[_t.DraggingStart],_t[_t.HoverStart],_t[_t.HoverEnd],_t[_t.StateChanged]],this.GE=.2,this.JE=600,this.QE=!1,this.YE=t=>{clearTimeout(this.WE),(0,e.cn)(this.Dc,"cnx-mod-hover"),this.mediator.publish(this,_t[_t.VolumeHoverStart])},this.XE=()=>{this.QE||(null!==this.WE&&clearTimeout(this.WE),this.WE=setTimeout((()=>{(0,e.IV)(this.Dc,"cnx-mod-hover"),this.mediator.publish(this,_t[_t.VolumeHoverStopped])}),this.JE))},this.ZE=this.GE,this.KE=this.getComponent(Vh.VolumeButton),this.tB=this.getComponent(Vh.VolumeProgress)}handleComponentEvent(t,i,e){let s;switch(t){case _t[_t.Volume]:s=i.payload/100,this.iB(s),this.eB(i.payload);break;case _t[_t.Mute]:s=0,this.setVolumeProgress(0);break;case _t[_t.Unmute]:s=this.ZE,this.setVolumeProgress(100*this.ZE);break;case _t[_t.DraggingStopped]:this.QE=!1,this.mediator.publish(this,_t[_t.DraggingStopped]),this.XE();break;case _t[_t.DraggingStart]:this.QE=!0,this.mediator.publish(this,_t[_t.DraggingStart]);break;case _t[_t.HoverStart]:this.mediator.publish(this,_t[_t.HoverStart],{payload:{targetComponent:e}});break;case _t[_t.HoverEnd]:this.mediator.publish(this,_t[_t.HoverEnd],{payload:{targetComponent:e}});break;case _t[_t.StateChanged]:this.mediator.publish(this,_t[_t.StateChanged],{payload:{targetComponent:e}})}void 0!==s&&this.sB(s)}iB(t){t<this.GE?this.ZE=this.GE:this.ZE=t}sB(t){this.mediator.publish(this,_t[_t.Volume],{payload:t})}eB(t){0===t?this.KE.setState(ia.Mute):this.KE.setState(ia.Unmute)}setVolumeProgress(t){this.tB.setProgress(t)}initComponent(){super.initComponent(),this.Dc.addEventListener("mouseenter",this.YE),this.Dc.addEventListener("mouseleave",this.XE)}setVolume(t){const i=100*t;this.eB(i),this.setVolumeProgress(i)}destroy(){super.destroy(),this.Dc.removeEventListener("mouseenter",this.YE),this.Dc.removeEventListener("mouseleave",this.XE)}}const ra=`\n    <cnx class="cnx-volume-container">\n        <cnx class="cnx-ui-btn cnx-volume-btn">\n            [[${Vh.VolumeButton}]]\n        </cnx>\n        <cnx class="cnx-volume-bar">\n            [[${Vh.VolumeProgress}]]\n        </cnx>\n    </cnx>\n`.trim();var ha=o(2040),oa=o(8808);const aa={[Vh[Vh.ShareButton]]:{template:Jo(Vh.ShareButton,oa),tooltip:"Share",isHoverable:!0},[Vh[Vh.CastButton]]:{template:Jo(Vh.CastButton,ha),tooltip:"Cast",isHoverable:!0}};var ca=o(1505),la=o(3653);const ua=90*oi.Y0,da="This live stream will start shortly";class pa extends Wh{constructor(){super(...arguments),this.eventList=[],this.nB=null}initComponent(){this.rB=this.yr.createElementByString("<img/>"),this.Dc.appendChild(this.rB),this.hB=this.Dc.getElementsByTagName("cnx-span")[0],this.oB=this.Dc.getElementsByClassName("cnx-live-message")[0],this.aB=this.Dc.getElementsByClassName("cnx-live-icon")[0]}setPosterSrc(t){(0,dt.QM)(t)&&(this.rB.src=t)}setPosterAltText(t){this.rB.alt=t}setIconToStarting(){this.aB.innerHTML=`${ca}`}setIconToEnded(){this.aB.innerHTML=`${la}`}setMessageToStarting(){this.cB(da)}setMessageToEnded(){this.cB("This live stream is not currently available. Please check again shortly")}setMessageToNotSupported(){this.cB("Live stream not supported by browser")}handleDelayedStart(t){(0,dt.r)(Date.parse(t))&&(this.lB=new Date(t),this.uB()>0&&(this.dB(),clearInterval(this.nB),this.nB=setInterval((()=>{this.dB()}),oi.s_*oi.Y0)))}showMessage(){(0,e.Ho)(this.aB),(0,e.Ho)(this.oB)}hideMessage(){(0,e.MV)(this.aB),(0,e.MV)(this.oB)}show(){(0,e.Ho)(this.Dc),(0,e.cn)(this.Dc,m.Gj.Active)}hide(){(0,e.IV)(this.Dc,m.Gj.Active),(0,e.MV)(this.Dc)}destroy(){super.destroy(),clearInterval(this.nB)}dB(){const t=this.uB();if(t>0){const i=this.pB(t);this.cB(`Live in ${i}`)}else this.cB(da),clearInterval(this.nB),this.nB=null}uB(){return(Math.max(this.lB.getTime(),Date.now())-Date.now())/oi.s_}pB(t){const i=t>=ua?Math.round(t/(oi.Y0*oi.oG)):Math.ceil(t/oi.Y0);return`${i} ${t>=ua?"hours":"minute"+(1===i?"":"s")}`}cB(t){this.hB.innerHTML=t}}class fa extends Wh{constructor(){super(...arguments),this.eventList=[]}initComponent(){this.hideComponent()}}class ma extends class{constructor(t,i,e,s={},n={}){this.yr=t,this.wc=i,this.Dc=e,this.zt=s,this.fB={[Vh.PlayButton]:t=>this.mB(!1,t),[Vh.BigPlayButton]:t=>this.mB(!0,t),[Vh.VolumeProgress]:t=>new $o(t,this.yr,this.wc,'<cnx class="cnx-progress-bar"><cnx class="cnx-progress-rail-container"><cnx class="cnx-progress-rail"></cnx><cnx class="cnx-progress-fill cnx-color-icon"></cnx></cnx><cnx class="cnx-progress-handle cnx-color-icon"></cnx></cnx>'),[Vh.ExpandButton]:t=>new ao(t,this.yr,this.wc,'<cnx class="cnx-icon-button cnx-ui-btn-hoverable"><cnx class="cnx-btn-container"><cnx class="cnx-expand-icon"><svg markup-inline class="cnx-color-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M4.6 3H10v2H5v5H3V4.6A1.58 1.58 0 014.6 3zM5 14v5h5v2H4.6A1.58 1.58 0 013 19.4V14h2zM19.4 3A1.58 1.58 0 0121 4.6V10h-2V5h-5V3h5.4zM19 14h2v5.4a1.58 1.58 0 01-1.6 1.6H14v-2h5v-5z" fill-rule="evenodd"/></svg></cnx><cnx class="cnx-collapse-icon"><svg markup-inline class="cnx-color-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24" fill-rule="evenodd"><path d="M16.6 15a1.58 1.58 0 00-1.6 1.6V22h2v-5h5v-2h-5.4zM17 2h-2v5.4A1.58 1.58 0 0016.6 9H22V7h-5V2zM7.4 15A1.58 1.58 0 019 16.6V22H7v-5H2v-2h5.4zM7 2h2v5.4A1.58 1.58 0 017.4 9H2V7h5V2z"/></svg></cnx></cnx></cnx>',this.zt.isMobile),[Vh.QualityMenu]:t=>new Uo(t,this.yr,this.wc,'<cnx class="cnx-ui-cm cnx-ui-cm-quality"><cnx class="cnx-cm-container"></cnx></cnx>',_t[_t.Quality],Vh.QualityMenu,this.Dc,this.zt.isMobile),[Vh.Loader]:t=>new Ho(t,this.yr,this.wc,Io),[Vh.SkipAdButton]:t=>new Zo(t,this.yr,this.wc,'<cnx class="cnx-ad-skip-button cnx-ui-btn"><cnx class="cnx-icon-button"><cnx class="cnx-skip-ad-text">Skip&nbsp;<cnx-span></cnx-span></cnx><cnx class="cnx-skip-ad-icon"><svg markup-inline viewBox="0 0 24 24" class="cnx-color-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M18 21h3V3h-3v18zM3 21l14-9L3 3v18z" fill-rule="evenodd"/></svg></cnx></cnx><cnx class="cnx-timer-loader"><svg markup-inline xmlns="http://www.w3.org/2000/svg" width="36" height="36"><circle class="cnx-svg-circle-stroke" cx="18" cy="18" r="17"/></svg></cnx></cnx>',this.zt.isMobile),[Vh.AdLoadingScreen]:t=>new ta(t,this.yr,this.wc,'<cnx class="cnx-pod-loading-screen-container"><img alt="Loading Pods" class="cnx-pod-loading-background"><cnx class="cnx-pod-loading-info"><cnx class="cnx-pod-open-new-icon"></cnx><cnx class="cnx-pod-visit-website-text"><cnx-span>Visit Advertiser website</cnx-span></cnx><cnx class="cnx-pod-read-more-container"><cnx-span class="cnx-pod-read-more-btn">GO TO PAGE</cnx-span></cnx></cnx><cnx class="cnx-pod-loading-fallback"><cnx class="cnx-pod-loading-spinner"></cnx><cnx-span class="cnx-pod-slot-count-text"></cnx-span></cnx></cnx>')},this.mB=(t,i)=>new Yh(i,this.yr,this.wc,function(t=!1){return`\n    <cnx class="cnx-icon-button cnx-ui-btn-hoverable ${t?"cnx-button-big-play":""}">\n        <cnx class="cnx-btn-container">\n            <cnx class="cnx-play-icon">${Vo}</cnx>\n            <cnx class="cnx-pause-icon">${Fo}</cnx>\n        </cnx>\n    </cnx>\n`.trim()}(t),this.zt.isMobile),this.gB=t=>i=>{const e=this.fB[t];if(e)return e(i)},this.vB=new Wo(this.yr,this.wc,this.zt.isMobile,Object.assign(Object.assign({},Xo),n))}createComponent(t,i){const e=this.gB(t)(i);return e||(this.vB.isGeneralComponent(t)?this.vB.getButton(t,i):void 0)}}{constructor(t,i,e,s,n,r){super(t,i,e,s,aa),this.yr=t,this.Dc=e,this.zt=s,this.yB=n,this.Tr=r,this.bB={[Vh.VolumeControls]:t=>new na(t,this.yr,ra,this),[Vh.VolumeButton]:t=>new ea(t,this.yr,this.wc,'<cnx class="cnx-icon-button"><cnx class="cnx-btn-container"><cnx class="cnx-unmute-icon"><svg markup-inline class="cnx-color-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M0 7.913v7.913h4.946l5.935 5.045V1.978L4.946 7.913zm16.815 3.957a5.476 5.476 0 00-2.967-4.946v9.9a5.475 5.475 0 002.967-4.945zM13.848 0v2.077a10.39 10.39 0 010 19.585v2.077a12.05 12.05 0 008.9-11.87A12.05 12.05 0 0013.848 0z"/></svg></cnx><cnx class="cnx-mute-icon"><svg markup-inline class="cnx-color-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11 2L8.25 4.25 11 7zM0 7v9h5l6 5v-6.5L3.85 7zm17 4.5c0-1.965-1.2-3.735-3-4.5v3l2.8 2.8a3.73 3.73 0 00.2-1.3zm3.4 7.45l-1.85-1.85-2.65-2.6-1.9-1.95-3-3-4.15-4.1-4.95-5L1.45 0 0 1.45 17.15 18.6 19 20.4l3.55 3.6L24 22.55zM14 23a11.83 11.83 0 003.65-1.55l-1.25-1.3c-.747.498-1.553.902-2.4 1.2V23zm9-11.5A11.77 11.77 0 0014 0v1.6A10.53 10.53 0 0120 16l1.45 1.45A11.99 11.99 0 0023 11.5z"/></svg></cnx></cnx></cnx>',ia.Mute,this.zt.isMobile),[Vh.SettingsButton]:t=>new fo(t,this.yr,this.wc,'<cnx class="cnx-icon-button cnx-button-settings cnx-context-controller cnx-ui-btn-hoverable"><cnx class="cnx-btn-container"><cnx class="cnx-settings-icon"><svg markup-inline class="cnx-color-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 22 22"><path d="M18.454 5.847l-2.642 1.05-1.03-.784a6.014 6.014 0 00-1.39-.8l-1.205-.488-.404-2.786H10.22l-.404 2.786-1.205.488a6.48 6.48 0 00-1.413.817L6.17 6.9 3.546 5.847l-.783 1.34 2.232 1.727-.16 1.266c-.042.33-.062.59-.062.82s.02.49.062.82l.16 1.266-2.233 1.727.783 1.34 2.642-1.05 1.03.784c.444.338.904.603 1.39.8l1.205.488.404 2.786h1.563l.404-2.786 1.205-.488a6.48 6.48 0 001.413-.817l1.025-.76 2.625 1.043.783-1.34-2.233-1.727.16-1.266c.043-.337.062-.584.062-.82s-.02-.483-.062-.82l-.16-1.266 2.233-1.727-.783-1.34zm.71 6.227l2.32 1.81a.55.55 0 01.132.702l-2.198 3.793c-.132.24-.418.34-.67.24l-2.736-1.096c-.57.427-1.187.8-1.857 1.074l-.418 2.905a.535.535 0 01-.538.46H8.802a.534.534 0 01-.538-.46l-.418-2.905a8.045 8.045 0 01-1.857-1.074l-2.736 1.096a.553.553 0 01-.67-.24L.385 14.584a.553.553 0 01.132-.702l2.32-1.81A8.67 8.67 0 012.758 11a8.67 8.67 0 01.077-1.074l-2.32-1.81a.54.54 0 01-.132-.702l2.198-3.793c.132-.24.418-.34.67-.24L5.99 4.478c.57-.427 1.187-.8 1.857-1.074L8.264.5a.535.535 0 01.538-.46h4.396c.275 0 .506.197.538.46l.418 2.905c.67.274 1.286.636 1.857 1.074l2.736-1.096a.553.553 0 01.67.24l2.198 3.793a.553.553 0 01-.132.702l-2.32 1.81A8.52 8.52 0 0119.242 11a8.52 8.52 0 01-.077 1.074zM11 14.256A3.26 3.26 0 0014.256 11 3.26 3.26 0 0011 7.744 3.26 3.26 0 007.744 11 3.26 3.26 0 0011 14.256zm0-2A1.26 1.26 0 019.744 11 1.26 1.26 0 0111 9.744 1.26 1.26 0 0112.256 11 1.26 1.26 0 0111 12.256z"/></svg></cnx><cnx class="cnx-hd-flag"><svg markup-inline xmlns="http://www.w3.org/2000/svg" viewBox="0 0 17 11"><g fill="none"><rect class="cnx-color-accent" width="17" height="11" rx="2" fill="#09F"/><path class="cnx-color-icon" d="M8 9H6.9V5.9H4.1V9H3V2h1.1v2.9h2.8V2H8v7zm2 0V2h2c.6 0 1.1.2 1.6.4.4.3.8.7 1 1.2.3.5.4 1.1.4 1.7v.4c0 .7-.1 1.2-.4 1.7-.2.5-.6.9-1.1 1.2-.4.3-1 .4-1.6.4H10zm1-6v5h1.2c.6 0 1-.2 1.3-.6.3-.4.5-1 .5-1.7v-.4c0-.7-.2-1.3-.5-1.7-.3-.4-.7-.6-1.3-.6H11z"/></g></svg></cnx></cnx></cnx>',this.zt.isMobile),[Vh.CaptionButton]:t=>new go(t,this.yr,this.wc,vo,m.Gj.Active,this.zt.closedCaptionDefault,this.zt.isMobile),[Vh.UpNextBox]:t=>new yo(t,this.yr,this.wc,'<cnx class="cnx-up-next-container cnx-hide-on-single-video"><cnx class="cnx-up-next-box"><cnx class="cnx-up-next-box-image"><img></cnx><cnx class="cnx-up-next-box-gradient"></cnx><cnx class="cnx-up-next-box-text"></cnx><cnx class="cnx-up-next-box-button"><cnx class="cnx-up-next-box-button-text">NEXT</cnx></cnx></cnx></cnx>',this.zt.isMobile),[Vh.LogoComponent]:t=>{if(!(0,dt.$K)(this.zt.logoUrl)&&!(0,dt.$K)(this.zt.logoPosition))throw new Error("custom logo is undefined");return new bo(t,this.yr,this.wc,'<cnx class="cnx-logo"></cnx>',{logoUrl:this.zt.logoUrl,logoPosition:this.zt.logoPosition})},[Vh.LogoOutstream]:t=>{if(!(0,dt.$K)(this.zt.logoUrl)&&!(0,dt.$K)(this.zt.logoPosition))throw new Error("outstream logo undefined");return new jo(t,this.yr,this.wc,'<img class="cnx-home-screen-logo" />',{logoUrl:this.zt.logoUrl})},[Vh.LivePoster]:t=>new pa(t,this.yr,this.wc,'<cnx class="cnx-live-poster cnx-mod-active"><cnx class="cnx-live-broadcast"><cnx class="cnx-live-icon"><svg class="cnx-live-icon-starting" markup-inline viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><g fill="none"><path d="M22 15.5a6.5 6.5 0 100 13 6.5 6.5 0 000-13z" fill="#FFF"/><path d="M22 18a4 4 0 110 8 4 4 0 010-8z" fill="#FF4047"/><path d="M37.598 7.541c7.955 7.972 8.036 20.846.243 28.918l-.243.248-1.77-1.765c6.985-7 7.062-18.302.233-25.397l-.233-.238 1.77-1.766zm-4.722 5.225c4.34 4.926 4.415 12.803.224 17.831l-.224.262L31 29.206c3.515-3.989 3.583-10.465.203-14.55L31 14.42l1.876-1.653zM6.028 7.541c-7.955 7.972-8.036 20.846-.243 28.918l.243.248 1.77-1.765c-6.985-7-7.062-18.302-.233-25.397l.233-.238-1.77-1.766zm4.722 5.225c-4.34 4.926-4.415 12.803-.224 17.831l.224.262 1.876-1.653c-3.515-3.989-3.583-10.465-.203-14.55l.203-.236-1.876-1.653z" fill="#FFF"/></g></svg> <svg class="cnx-live-icon-ended" markup-inline viewBox="0 0 44 44" xmlns="http://www.w3.org/2000/svg"><g fill="#FFF" fill-rule="evenodd"><rect class="cnx-live-icon-svg-rectangle" transform="rotate(90 22.06 21.43)" x="20.059" y="15.929"/><path d="M37.598 7.541c7.955 7.972 8.036 20.846.243 28.918l-.243.248-1.77-1.765c6.985-7 7.062-18.302.233-25.397l-.233-.238 1.77-1.766zm-4.722 5.225c4.34 4.926 4.415 12.803.224 17.831l-.224.262L31 29.206c3.515-3.989 3.583-10.465.203-14.55L31 14.42l1.876-1.653zM6.028 7.541c-7.955 7.972-8.036 20.846-.243 28.918l.243.248 1.77-1.765c-6.985-7-7.062-18.302-.233-25.397l.233-.238-1.77-1.766zm4.722 5.225c-4.34 4.926-4.415 12.803-.224 17.831l.224.262 1.876-1.653c-3.515-3.989-3.583-10.465-.203-14.55l.203-.236-1.876-1.653z" fill-rule="nonzero" opacity=".5"/></g></svg></cnx><cnx class="cnx-live-message"><cnx-span></cnx-span></cnx></cnx></cnx>'),[Vh.LiveIcon]:t=>new fa(t,this.yr,this.wc,'<cnx class="cnx-ui-live-badge-wrapper cnx-d-md-none"><cnx class="cnx-ui-live-badge"><svg markup-inline xmlns="http://www.w3.org/2000/svg" viewBox="0 0 37 9"><path d="M15.223 9V7.816H11.35V.47H9.868V9h5.356zm3.7 0V.47h-1.477V9h1.477zm6.555 0L28.55.47h-1.63l-2.168 6.674L22.608.47h-1.623L24.043 9h1.436zm10.6 0V7.816h-4.096V5.2h3.504V4.02h-3.504V1.664h4.055V.47H30.5V9h5.578zM3 2a3 3 0 100 6 3 3 0 100-6z" fill="#fff"/><path d="M3 3a2 2 0 110 4 2 2 0 110-4z" fill="#ff4047"/></svg></cnx></cnx>'),[Vh.ElapsedTimeLabel]:t=>new xo(t,this.yr,this.wc,wo),[Vh.TotalDurationLabel]:t=>new xo(t,this.yr,this.wc,wo),[Vh.RemainingDurationLabel]:t=>new xo(t,this.yr,this.wc,wo),[Vh.ProgressBar]:t=>new Ao(t,this.yr,this.wc,'<cnx class="cnx-progress-bar cnx-video-progress"><cnx class="cnx-progress-rail-container"><cnx class="cnx-progress-rail"></cnx><cnx class="cnx-progress-fill cnx-color-accent"></cnx><cnx class="cnx-progress-follow"></cnx></cnx><cnx class="cnx-progress-handle cnx-color-accent"></cnx><cnx class="cnx-progress-hitarea"></cnx></cnx>',this.zt.isMobile),[Vh.QueStateOverlay]:t=>new Po(t,this.yr,this.wc,Io),[Vh.ContextMenu]:t=>new Co(t,this.yr,this.wc,'<cnx class="cnx-ui-cm cnx-ui-cm-context"><cnx class="cnx-cm-container"></cnx></cnx>',_t[_t.ContextClick],Vh.ContextMenu,this.Dc,this.zt.isMobile),[Vh.ElementsSettingsMenu]:t=>new Lo(t,this.yr,this.wc,'<cnx class="cnx-ui-cm cnx-ui-cm-settings"><cnx class="cnx-cm-container"></cnx></cnx>',_t[_t.SettingsMenu],Vh.ElementsSettingsMenu,this.Dc,this.yB,this.zt.isMobile,this.zt.closedCaptionDefault,this.Tr),[Vh.ElementsCaptionMenu]:t=>new po(t,this.yr,this.wc,'<cnx class="cnx-ui-cm cnx-ui-cm-captions"><cnx class="cnx-cm-container"></cnx></cnx>',_t[_t.CaptionMenu],Vh.ElementsCaptionMenu,this.Dc,this.zt.isMobile,this.Tr),[Vh.CaptionComponent]:t=>new Do(t,this.yr,this.wc,'<cnx class="cnx-captions"><cnx class="cnx-captions-container"><cnx-span class="cnx-captions-text-holder"></cnx-span></cnx></cnx>')},this.xB=t=>i=>{const e=this.bB[t];if(e)return e(i)}}createComponent(t,i){return this.xB(t)(i)||super.createComponent(t,i)}}var ga;!function(t){t.InPod="cnx-ad-in-pod",t.AdMarkerInPodTextContainer="cnx-ad-marker-text",t.AdDurationLabel="cnx-ad-duration",t.AdTitleLabel="cnx-ad-title",t.AdMarkerTitleContainer="cnx-ad-marker-title",t.AdMarkerTitleText="cnx-ad-title-text",t.CardImage="cnx-ad-card-image",t.CardTitle="cnx-ad-card-title",t.AdUiContent="cnx-ui-ad-content"}(ga||(ga={}));class va extends co{constructor(t,i,s,n,r,h,o={},a){super(t,r,i,h,a||new ma(i,n,r,o)),this.mediator=t,this.globalDomUtilsService=i,this.Mu=s,this.$container=r,this.settings=o,this.XT={[b.PlayingState]:new Kh(this),[b.PausedState]:new io(this)},this.wB=0,this.xn=null,this._B=t=>{(0,e.og)(this.$uiContainer,m.s6.UiInView,t)},this.fM.setDistanceValues({top:4,bottom:4}),this.XT[b.PausedState].enterState(),this.SB=this.$container.querySelector(`.${ga.CardImage}`),this.AB=this.$container.querySelector(`.${ga.CardTitle}`),this.PB=this.$container.querySelector(`.${ga.AdMarkerTitleText}`),this.IB=this.$container.querySelector(`.${ga.AdUiContent}`)}handleComponentEvent(t,i,e){switch(super.handleComponentEvent(t,i,e),t){case _t[_t.Volume]:this.mediator.publish(this,_t[_t.Volume],i);break;case _t[_t.Mute]:this.mediator.publish(this,_t[_t.Mute]);break;case _t[_t.Unmute]:this.mediator.publish(this,_t[_t.Unmute]);break;case Vh[Vh.CloseButton]:this.mediator.publish(this,_t[_t.Close]);break;case _t[_t.Expand]:this.mediator.publish(this,_t[_t.Expand]);break;case _t[_t.Collapse]:this.mediator.publish(this,_t[_t.Collapse]);break;default:this.mediator.publish(this,t,i)}}updateDuration(t){const i=this.getComponent(Vh.ProgressBar),e=this.getComponent(Vh.TotalDurationLabel),s=this.getComponent(Vh.SkipAdButton);!t&&s&&(s.setSecondsUntilSkip(0),s.tickDown(0)),t||!i?(this.elapsedTime=0,this.duration=t,i&&i.setProgress((0,di.dQ)(0,t,0,100,0)),e&&e.setTime(t),this.kB(this.wB)):i.setProgress(100)}updateVolume(t){const i=this.getComponent(Vh.VolumeControls),e=this.getComponent(Vh.VolumeButton);i&&i.setVolume(t),e&&e.setVolume(t)}get elapsedTime(){return this.wB}set elapsedTime(t){this.wB=t,this.kB(this.wB)}showSkipAdButton(t){const i=this.getComponent(Vh.SkipAdButton);i&&(i.showComponent(),i.setSecondsUntilSkip(t))}hideSkipAdButton(){const t=this.getComponent(Vh.SkipAdButton);t&&t.hideComponent()}addPodAdMarker(t,i){(0,e.cn)(this.$uiContainer,ga.InPod);(0,f.Sz)(this.$uiContainer.getElementsByClassName(ga.AdMarkerInPodTextContainer)).forEach((e=>{e.innerHTML=`${t+1}/${i}`}))}removeAddPodAdMarker(){(0,e.IV)(this.$uiContainer,ga.InPod)}addDurationAdMarker(){(0,e.cn)(this.$uiContainer,ga.AdDurationLabel)}removeDurationAdMarker(){(0,e.IV)(this.$uiContainer,ga.AdDurationLabel)}kB(t){const i=this.getComponent(Vh.ElapsedTimeLabel);i&&i.setTime(t);const e=this.getComponent(Vh.SkipAdButton);e&&e.tickDown(t);const s=this.getComponent(Vh.RemainingDurationLabel);if(s&&this.duration){const i=this.duration-t;i>=0&&s.setTime(i)}}hideAdLoadingScreen(){const t=this.getComponent(Vh.AdLoadingScreen);t&&t.hideComponent(),(0,e.IV)(this.$container,m.s6.PodLoadingScreen)}showAdLoadingScreen(t,i,s,n){const r=this.getComponent(Vh.AdLoadingScreen);r&&(r.showComponent(),r.setBackgroundImg(t),r.setClickUrl(i),r.setFallbackText(s,n),(0,e.cn)(this.$container,m.s6.PodLoadingScreen))}hideAdMarker(){const t=this.$container.querySelector(".cnx-ad-marker");(0,e.MV)(t)}hideProgressBar(){this.getComponent(Vh.ProgressBar).hideComponent()}setContinueReadingCard(t){this.SB.style.backgroundImage=`url("${t.imageSrc}")`,this.AB.innerText=t.title}addAdMarkerTitle(t){this.PB.innerHTML=t}cardHasData(){return(0,dt.QM)(this.SB.style.backgroundImage)&&(0,dt.QM)(this.AB.innerHTML)}showContinueReadingCard(t){(0,e.cn)(this.$container,m.s6.AdShowCard),null===this.xn&&(this.xn=this.globalDomUtilsService.requestAnimationFrameHelper((()=>{this.xn=null,(0,e.T7)(t,{height:`${this.IB.clientHeight}px`})})))}hideContinueReadingCard(t){(0,e.IV)(this.$container,m.s6.AdShowCard),(0,e.aQ)(t,"height")}showAdMarkerTitle(){(0,e.cn)(this.$uiContainer,ga.AdTitleLabel)}hideAdMarkerTitle(){(0,e.IV)(this.$uiContainer,ga.AdTitleLabel)}show(){super.show(),this.Mu.on(this.$uiContainer,this._B,{threshold:.5})}hide(){super.hide();(0,e.og)(this.$uiContainer,m.s6.UiInView,!1),this.Mu.off(this.$uiContainer,this._B)}expand(){this.getComponent(Vh.ExpandButton).setState(ho.expand)}collapse(){this.getComponent(Vh.ExpandButton).setState(ho.collapse)}}var ya=o(3204);class ba{constructor(t){this.showExpandButton=t}get template(){return`\n            <cnx class="cnx-ui cnx-ui-ad">\n                <cnx class="cnx-ui-ad-content ${this.showExpandButton?"cnx-ad-fs":""}">\n                    <cnx class="cnx-ad-marker">\n                        <cnx class="cnx-marker-cnt-first">\n                            <cnx class="cnx-marker-cnt-second">\n                                <cnx class="cnx-ad-marker-svg">${ya}</cnx>\n                                <cnx class="cnx-ad-marker-text">1/1</cnx>\n                            </cnx>\n                            <cnx class="cnx-ad-marker-duration">[[${Vh.RemainingDurationLabel}]]</cnx>\n                        </cnx>\n                        <cnx class="cnx-ad-marker-title"><cnx-span class="cnx-ad-title-text"></cnx-span></cnx>\n                    </cnx>\n                    <cnx class="cnx-ad-close-button cnx-ui-btn">[[${Vh.CloseButton}]]</cnx>\n                    <cnx class="cnx-ad-buttons">\n                        <cnx class="cnx-ad-play-button cnx-ui-btn">[[${Vh.PlayButton}]]</cnx>\n                        <cnx class="cnx-ad-volume-controls">[[${Vh.VolumeControls}]]</cnx>\n                        <cnx class="cnx-ad-volume-button cnx-ui-btn">[[${Vh.VolumeButton}]]</cnx>\n                    </cnx>\n                    [[${Vh.SkipAdButton}]]\n                    ${this.getExpandTemplate()}\n                    <cnx class="cnx-ad-progress-bar">[[${Vh.ProgressBar}]]</cnx>\n                </cnx>\n                <cnx class="cnx-ad-card">\n                    <svg class="${ga.CardImage}" viewBox="0 0 16 9" />\n                    <cnx class="cnx-ad-card-text">\n                        <cnx>Continue watching</cnx>\n                        <cnx class="${ga.CardTitle}"></cnx>\n                        <cnx>after the ad</cnx>\n                    </cnx>\n                </cnx>\n                [[${Vh.AdLoadingScreen}]]\n            </cnx>\n        `.trim()}getExpandTemplate(){return this.showExpandButton?`<cnx class="cnx-ad-expand-button cnx-ui-btn cnx-hide-on-volume-hover cnx-d-sm-none">[[${Vh.ExpandButton}]]</cnx>`:""}}class xa{static getScaledImageUrl(t,i,e,s,n){if(t&&!(0,di.ON)({width:i,height:e}))return(0,dt.r)(n)&&(i=(0,di.Tc)(i,n),e=(0,di.Tc)(e,n)),s.appendParamsToUrl(`${t}${xa.getScaledImageQueryParams(i,e)}`.trim())}static getScaledImageQueryParams(t,i){return(0,di.ON)({width:t,height:i})?"":`?width=${t}&height=${i}&fit=bounds`}static getSmartCroppedImageUrl(t,i,e,s){return(0,dt.QM)(t)||(t=$s.n.endPoints.base.image),(0,di.ON)({width:i,height:e})&&(i=140,e=80),s.appendParamsToUrl(`${t}${xa.getSmartCroppedImageQueryParams(i,e)}`)}static getSmartCroppedImageQueryParams(t,i){return(0,di.ON)({width:t,height:i})?"":`?crop=${t}:${i},smart&width=${t}&height=${i}&format=jpeg&quality=60&fit=crop`}}class wa extends d._{constructor(t,i,e,s,n,r,h,o,a){super(),this.mediator=t,this.Be=i,this.ff=e,this.gf=s,this.vf=n,this.yf=r,this.pd=h,this.bf=o,this.Df=a,this.CB=[],this.TB=!1,this.MB=!1,this.es=!1,this.EB=0,this.BB=!0,this.OB=!1,this.LB=!1,this.wf=[],this.Pf=new It.x,this.Af=new It.x,this.RB=new It.x,this.DB=new It.x,this.jB=new It.x}VB(){let t;this.wf.push(this.Df.onLinearVpaidEvent.subscribe((i=>{switch(t=!1,i.type){case Vt.fI.AdLoaded:this.OB=this.FB(i.payload),this.OB&&(i.payload.payload.adLoadedData.skipOffset=this.Be.skipAdAfter);break;case Vt.fI.AdPaused:this.$B.changeState(b.PausedState);break;case Vt.fI.AdPlaying:this.$B.changeState(b.PlayingState);break;case Vt.fI.AdImpression:this.NB(i.payload);break;case Vt.fI.AdSkipped:this.UB(l.ProtoAdClickTypeEnum.AdSkipClick),this.HB(),t=!0;break;case Vt.fI.AdStopped:case Vt.fI.AdError:if(this.qB())return;this.HB(),t=!0;break;case Vt.fI.AdClickThru:this.UB(l.ProtoAdClickTypeEnum.AdClickThrough)}this.BB&&(this.Af.next(i),this.zB(i)),this.BB=!0,t&&(this.es=!1,this.$B.changeState(b.PausedState))}))),this.subscribe(_t[_t.Volume],this.$B,(({payload:t})=>{this.setVolume(t),this.UB(l.ProtoAdClickTypeEnum.VolumeClick)})),this.subscribe(_t[_t.Play],this.$B,(()=>{this.UB(l.ProtoAdClickTypeEnum.PlayClick),this.play()})),this.subscribe(_t[_t.Pause],this.$B,(()=>{this.UB(l.ProtoAdClickTypeEnum.PauseClick),this.pause()})),this.subscribe(_t[_t.Expand],this.$B,(()=>{this.UB(l.ProtoAdClickTypeEnum.FullScreenClick),this.jB.next(_t.Expand)})),this.subscribe(_t[_t.Collapse],this.$B,(()=>{this.UB(l.ProtoAdClickTypeEnum.ExitFullScreenClick),this.jB.next(_t.Collapse)})),this.subscribe(_t[_t.Close],this.$B,(()=>{this.DB.next({type:p.Uh.UserInteraction,payload:{playback:!1}}),this.RB.next({type:_t.Close})})),this.subscribe(_t[_t.Mute],this.$B,(()=>{this.setVolume(0),this.UB(l.ProtoAdClickTypeEnum.MuteClick)})),this.subscribe(_t[_t.Unmute],this.$B,(()=>{this.setVolume(1),this.UB(l.ProtoAdClickTypeEnum.UnmuteClick)})),this.subscribe(_t[_t.SkipAd],this.$B,(()=>this.WB()))}zB(t){switch(t.type){case Vt.fI.AdPaused:this.Pf.next({type:Ht.PauseLinearEvent});break;case Vt.fI.AdPlaying:this.Pf.next({type:Ht.ResumeLinearEvent});break;case Vt.fI.AdImpression:this.Pf.next({type:Ht.ShowLinearEvent,payload:t.payload});break;case Vt.fI.AdSkipped:this.Pf.next({type:Ht.SkipLinearEvent});break;case Vt.fI.AdStopped:this.Pf.next({type:Ht.HideLinearEvent});break;case Vt.fI.AdError:this.inImpression&&this.Pf.next({type:Ht.HideLinearEvent})}}NB(t){var i;this.GB(),this.updateContinueReadingCard(),t.payload.adDuration=null===(i=this.Df.getCurrentAdMetadata(li.LINEAR))||void 0===i?void 0:i.duration,t.payload.adDuration||this.TB||this.show(),this.TB=!0,this.es=!0,this.OB&&this.JB(),t.payload.adDuration?this.$B.addDurationAdMarker():this.$B.removeDurationAdMarker(),this.$B.updateDuration(t.payload.adDuration),this.$B.changeState(b.PlayingState),this.QB=t.payload.clickThroughUrl,this.YB(t.payload.selectedAdSlot),this.vf.getTotalNumberOfSlots()>1?this.$B.addPodAdMarker(this.vf.getCurrentSlotIndex(),this.vf.getTotalNumberOfSlots()):this.$B.removeAddPodAdMarker()}XB(t=!1){const i=(e=this.Be,s=this.yf.config,{logoUrl:e.logoUrl,isMobile:s.isMobile,closeButtonMode:e.closeButtonMode,floatingCloseButtonMode:e.floatingSettings.floatingCloseButtonMode,isCloseButton:e.isCloseButton,uiComponentsVisibility:e.uiComponentsVisibility,sharingDestinations:e.sharingDestinations});var e,s;this.$B=new va(this,this.yf.services.GlobalDomUtilsService,this.yf.services.ViewabilityService,this.yf.services.InteractionService,this.ff,new ba(t).template,i),this.$B.hide()}ZB(){this.Wk=this.KB(),this.tO(this.Wk),this.CB.push(this.Wk)}KB(t=""){return this.yf.services.GlobalDomUtilsService.createElementByString(`<div class= "cnx-ad-container cnx-full-height ${t}"></div>`)}tO(t){this.ff.appendChild(t)}JB(){this.$B.showSkipAdButton(this.Be.skipAdAfter)}UB(t){var i;const e=null===(i=this.Df)||void 0===i?void 0:i.getCurrentAdMetadata(li.LINEAR);if(!e)return;const{advertiserLineItemId:s,publisherLineItemId:n}=e,r=this.Df.getCurrentAdBreakType();this.yf.services.TrackingService.trackAdClick({advertiserLineItemId:s,publisherLineItemId:n,adBreakType:r,type:t})}FB(t){var i;if(t.payload.adLoadedData.skipOffset&&t.payload.adLoadedData.skipOffset>=0)return!1;const e=null===(i=this.Df)||void 0===i?void 0:i.getCurrentAdMetadata(li.LINEAR);return!!e&&ri(e.duration,this.Be)}YB(t){this.CB.filter((i=>i!==t)).forEach((t=>{(0,e.cn)(t,m.Gj.Hide)}))}HB(){this.CB.forEach((t=>{(0,e.IV)(t,m.Gj.Hide)}))}iO(){this.LB=!1,this.$B.hideAdLoadingScreen()}GB(){this.$B.hideSkipAdButton()}start(t,i=!1){try{this.XB(i),this.ZB(),this.setVolume(t),this.VB()}catch(t){(0,s.n)({callStack:t.stack,level:s.D.CRITICAL,exception:t.message,message:"linearAdhandler_start"})}}getVolume(){return this.EB}hide(){(0,e.IV)(this.ff,m.s6.Ad,m.s6.AdOverlayType),this.$B.hide()}show(){var t,i;const s=[m.s6.Ad],n=null===(i=null===(t=this.Df)||void 0===t?void 0:t.getCurrentAdMetadata(li.LINEAR))||void 0===i?void 0:i.adType;n===l.ProtoAdType.Overlay&&s.push(m.s6.AdOverlayType),this.eO=n,(0,e.cn)(this.ff,...s),this.$B.show(),this.$B.updateVolume(this.EB),this.iO()}setVolume(t){this.EB=t,this.Df.setAdVolume(li.LINEAR,t),this.$B&&this.$B.updateVolume(t),this.DB.next({type:p.Uh.UserInteraction,payload:{volume:!0}}),this.RB.next({type:_t.Volume,payload:{volume:t}})}resizeAd(t,i){this.inImpression&&(this.updateContinueReadingCard(),this.updateShowAdMarkerTitle())}adStateChange(t,i){this.Df.onAdStateChange(li.LINEAR,t,i)}getMainAdContainerWidth(){return this.Df.getMainAdContainerWidth(li.LINEAR)}resumeWithoutUserInteraction(){this.inImpression&&this.Df.resumeAd(li.LINEAR,!1)}play(){if(!this.inImpression)return;this.Df.resumeAd(li.LINEAR,!0),this.DB.next({type:p.Uh.UserInteraction,payload:{playback:!0}})}sO(t){if((0,Ks.Ph)("cnxShowAdCard",this.yf.config.pageUrl))return!0;let i=!1;if(t.adType===l.ProtoAdType.Video){const e=this.ff.clientWidth*(t.heightRatio/t.widthRatio);i=this.ff.clientHeight-e>=76}return t.adType===l.ProtoAdType.Overlay&&(i=this.ff.clientHeight-t.height>=76),i}updateContinueReadingCard(){const t=this.Df.getCurrentAdMediaSize(li.LINEAR);(0,dt.$K)(t)&&(this.sO(t)?this.$B.showContinueReadingCard(this.Wk):this.$B.hideContinueReadingCard(this.Wk))}updateShowAdMarkerTitle(){this.MB&&this.ff.clientWidth>=320?this.$B.showAdMarkerTitle():this.$B.hideAdMarkerTitle()}setContinueReadingCard(t){this.$B.setContinueReadingCard({imageSrc:xa.getSmartCroppedImageUrl(t.imageSrc,270,150,this.pd),title:t.title})}hideContinueReadingCard(){this.$B.hideContinueReadingCard(this.Wk)}setAdMarkerTitle(t){this.$B.addAdMarkerTitle(t),this.MB=!0,this.ff.clientWidth>=320&&this.$B.showAdMarkerTitle()}hideAdMarkerTitle(){this.$B.hideAdMarkerTitle()}pause(){if(!this.inImpression)return;this.Df.pauseAd(li.LINEAR,!0),this.DB.next({type:p.Uh.UserInteraction,payload:{playback:!1}})}stopAd(t){if(!this.inImpression)return;const i=()=>{this.Af.next({type:Vt.fI.AdStopped,payload:{payload:{adType:l.ProtoAdType.Video}}}),this.Pf.next({type:Ht.HideLinearEvent}),this.BB=!1};this.Df?(i(),this.Df.stopAd(li.LINEAR,t)):this.inAdPodLoadingState&&i()}WB(){this.Df&&this.inImpression?this.Df.skipAd(li.LINEAR):this.LB&&(this.Af.next({type:Vt.fI.AdSkipped}),this.iO())}enterAdPodLoadingState(){this.LB=!0;const{width:t,height:i}=this.Df.getAdContainerSize(this.eO);this.$B.showAdLoadingScreen(xa.getSmartCroppedImageUrl(this.nO,t,i,this.pd),this.QB,this.vf.getNextSlotIndex(),this.vf.getTotalNumberOfSlots())}setAdLoadingBackgroundUrl(t){this.nO=t}destroy(){var t;this.$B&&this.unsubscribeAll(this.$B),(0,jt.i)(this.wf),null===(t=this.$B)||void 0===t||t.destroy()}get onVpaidEvent(){return this.Af.asObservable()}get onUiComponentEvent(){return this.RB.asObservable()}get onExperienceEvent(){return this.DB.asObservable()}get onLinearEvent(){return this.Pf.asObservable()}get adUserInterface(){return this.$B}get adContainer(){return this.Wk}get secondaryAdContainer(){return this.Qf}get firstAdShown(){return this.TB}get inImpression(){return this.es}get adInWin(){return this.Df.isAdInWin(li.LINEAR)}get inAdPodLoadingState(){return this.LB}get onFullcreenChange(){return this.jB.asObservable()}}class _a extends wa{NB(t){super.NB(t),this.Be.outstreamAdAsContent&&this.rO()}qB(){return this.Be.outstreamAdAsContent}rO(){this.$B.hideProgressBar(),this.$B.hideAdMarker(),this.GB()}}class Sa extends class{constructor(t,i,e,s,n,r,h,o){this.Be=t,this.ff=i,this.gf=e,this.vf=s,this.yf=n,this.pd=r,this.bf=h,this.Df=o,this.wf=[],this.Ef=new It.x,this.Af=new It.x,this.DB=new It.x,this.CB=[],this.es=!1,this.xf=Vt.zc.Normal,this.hO=!1}VB(){this.wf.push(this.Df.onNonlinearVpaidEvent.subscribe((t=>{switch(t.type){case Vt.fI.AdImpression:this.NB(t.payload);break;case Vt.fI.AdUserClose:this.UB(l.ProtoAdClickTypeEnum.AdUserClose);break;case Vt.fI.AdError:this.HB();break;case Vt.fI.AdClickThru:this.UB(l.ProtoAdClickTypeEnum.AdClickThrough)}this.Af.next(t),this.oO(t)})))}oO(t){switch(t.type){case Vt.fI.AdImpression:this.show(),this.Ef.next({type:qt.ShowNonLinearEvent,payload:t.payload});break;case Vt.fI.AdUserClose:this.hide(),this.Ef.next({type:qt.HideNonLinearEvent,payload:t.payload});break;case Vt.fI.AdStopped:this.hide(),this.Ef.next({type:qt.HideNonLinearEvent});break;case Vt.fI.AdError:this.inImpression&&this.Ef.next({type:qt.HideNonLinearEvent})}}NB(t){this.es=!0,this.YB(t.payload.selectedAdSlot)}ZB(){this.Wk=this.KB(),this.tO(this.Wk),this.CB.push(this.Wk)}KB(t=""){return this.yf.services.GlobalDomUtilsService.createElementByString(`<div class= "cnx-non-linear-ad-container cnx-full-height ${t}"></div>`)}tO(t){this.ff.appendChild(t)}UB(t){var i;const e=null===(i=this.Df)||void 0===i?void 0:i.getCurrentAdMetadata(li.NONLINEAR);if(!e)return;const{advertiserLineItemId:s,publisherLineItemId:n}=e,r=this.Df.getCurrentAdBreakType();this.yf.services.TrackingService.trackAdClick({advertiserLineItemId:s,publisherLineItemId:n,adBreakType:r,type:t})}YB(t){this.CB.filter((i=>i!==t)).forEach((t=>{(0,e.cn)(t,m.Gj.Hide)}))}HB(){this.CB.forEach((t=>{(0,e.IV)(t,m.Gj.Hide)}))}aO(){var t;const i=null===(t=this.Df.getCurrentAdMediaSize(li.NONLINEAR))||void 0===t?void 0:t.height;if(!(0,dt.r)(i))return!0;const e=this.adContainer.clientHeight,s=(0,di.Tc)(e,hi.NON_LINEAR_MAX_HEIGHT_PERCENT);return Math.ceil(s)<i}start(){try{this.ZB(),this.VB()}catch(t){(0,s.n)({callStack:t.stack,level:s.D.CRITICAL,exception:t.message,message:"nonLinearAdhandler_start"})}}hide(){(0,e.IV)(this.ff,m.s6.AdNonLinear)}show(){(0,e.cn)(this.ff,m.s6.AdNonLinear)}adStateChange(t,i){this.inImpression&&(t===l.ProtoAdSlotsEnum.PreRoll||t===l.ProtoAdSlotsEnum.PostRoll?this.pause():this.resumeWithoutUserInteraction(t),this.Df.onAdStateChange(li.NONLINEAR,t,i))}contentPlaybackStateChanged(t){this.hO=t,this.hO||this.pause()}resizeAd(t,i,e){this.inImpression&&this.hO&&(this.aO()?this.pause():this.resumeWithoutUserInteraction(e))}resumeWithoutUserInteraction(t){this.inImpression&&t!==l.ProtoAdSlotsEnum.PreRoll&&t!==l.ProtoAdSlotsEnum.PostRoll&&(this.aO()||(this.show(),this.Df.resumeAd(li.NONLINEAR,!1)))}pause(){if(!this.inImpression)return;this.hide();this.Df.pauseAd(li.NONLINEAR,!0),this.DB.next({type:p.Uh.UserInteraction,payload:{playback:!1}})}stopAd(t){if(!this.inImpression)return;const i=()=>{this.Af.next({type:Vt.fI.AdStopped,payload:{payload:{adType:l.ProtoAdType.Nonlinear}}}),this.Ef.next({type:qt.HideNonLinearEvent})};this.Df&&(i(),this.Df.stopAd(li.NONLINEAR,t))}destroy(){(0,jt.i)(this.wf)}get onExperienceEvent(){return this.DB.asObservable()}get onNonLinearEvent(){return this.Ef.asObservable()}get onVpaidEvent(){return this.Af.asObservable()}get adContainer(){return this.Wk}get inImpression(){return this.es}get adInWin(){return this.Df.isAdInWin(li.NONLINEAR)}}{}class Aa extends Ci{jf(){const t={adSourceSettings:this.Be.lineItemSettings,outstreamPlayer:this.Be.isOutStreamType(),pauseAdWhenFinished:this.Be.pauseAdWhenFinished,loopAdWhenFinished:this.Be.loopAdWhenFinished,skipPlayerSettings:{skipAdAfter:this.Be.skipAdAfter,skipMin:this.Be.skipMin,skippability:this.Be.skippability},adPlaybackMode:this.Be.adPlaybackMode,amazonTamSlotId:this.Be.amazonTamSlotId,prebidJsSupplyChain:this.Be.supplyChainSettings};return new qh(t,this.bf,this.vf)}$f(){return new _a(this,this.Be,this.ff,this.gf,this.vf,this.yf,this.pd,this.bf,this.Df)}Hf(){return new Sa(this.Be,this.ff,this.gf,this.vf,this.yf,this.pd,this.bf,this.Df)}}class Pa{constructor(t,i){this.cO=t,this.lO=i,this.uO=null,this.pO=null,this.fO=0,this.mO=0,this.gO=!1,this.vO=new Map,this.yO=new It.x,this.bO=new It.x,this.xO=new It.x,this.wO=new It.x,this._O=new It.x,this.SO=new It.x,this.AO=new It.x,this.PO=new It.x,this.IO=new It.x,this.wf=[],this.kO={inImpression:!1}}start(){this.CO();const{totalAdBreakLength:t}=this.cO.linearAdsControllerData;if(t){const i=De.getGlobalContainer().resolve(ts);this.TO=new Is(i,t),this.vO.set(this.TO,[this.TO.onTimeElapsed.subscribe((()=>{this.bO.next()}))])}}get currentPlayerAdSlot(){return this.uO}get onExperienceControllerStateChange(){return this.IO.asObservable()}get onAdSlotDurationElapsed(){return this.yO.asObservable()}get onAdPodDurationElapsed(){return this.xO.asObservable()}get onAdPodTimeUpdate(){return this.wO.asObservable()}get onAdOpportunity(){return this._O.asObservable()}get onAdsDisabled(){return this.SO.asObservable()}get onAdsEnabled(){return this.AO.asObservable()}get onTotalAdBreakDurationExpired(){return this.bO.asObservable()}get onMidRollCapped(){return this.PO.asObservable()}contentPlaybackStateChanged(t){var i,e;null===(e=(i=this.lO).contentPlaybackStateChanged)||void 0===e||e.call(i,t)}slideChanged(t){var i,e;null===(e=(i=this.lO).slideChanged)||void 0===e||e.call(i,t)}updateStoryTimeline(t){var i,e;null===(e=(i=this.lO).updateStoryTimeline)||void 0===e||e.call(i,t)}onAdImpression(t,i){this.lO.onAdImpression(t,this.uO,i),this.kO.inImpression=!0,this.MO(),this.EO()}contentChanged(t){this.lO.contentChanged(this.uO,t),this.mO=0}onAdFinished(t,i,e){this.lO.onAdFinished(this.uO,i,e),this.BO=this.OO(this.BO),i||(this.LO=this.OO(this.LO),this.uO===l.ProtoAdSlotsEnum.MidRoll?this.mO++:this.fO++),this.RO()&&!i&&this.PO.next(),t&&(this.gO=!0),this.kO.inImpression=!1}viewabilityStateChanged(t,i){var e,s;null===(s=(e=this.lO).viewabilityStateChanged)||void 0===s||s.call(e,this.uO,t,i)}onStop(){this.uO=null}onAdStateChange(t,i,e,s){this.lO.onAdStateChange(t,e,s),this.cO.linearAdsControllerData.maxAdSlotDuration=i.maxAdSlotDuration,this.cO.linearAdsControllerData.maxAdPodDuration=i.maxAdPodDuration,s||(t!==l.ProtoAdSlotsEnum.MidRoll&&(this.fO=0),null===t&&this.pO===l.ProtoAdSlotsEnum.MidRoll||(this.gO=!0),this.pO=t,this.uO=t)}canEnableAds(t){const i=this.lO.canEnableAds(this.uO,t);return i.enableAds?this.kO.inImpression?{enableAds:!1,disableReason:Pi.InImpression}:this.uO===l.ProtoAdSlotsEnum.MidRoll&&this.RO()||this.uO!==l.ProtoAdSlotsEnum.MidRoll&&this.fO>0?{enableAds:!1,disableReason:Pi.Unknown}:{enableAds:!0,disableReason:Pi.Unknown}:i}enableAds(){this.AO.next(),this.TO&&this.TO.start()}disableAds(t,i){const e={disableReason:t,adBreakLength:this.lO.getAdBreakDuration(i)};this.SO.next({payload:e}),this.TO&&!this.kO.inImpression&&this.TO.stop()}onAdPlay(){this.LO&&this.LO.start(),this.BO&&this.BO.start(),this.TO&&this.TO.start()}onAdPause(){this.LO&&this.LO.stop(),this.BO&&this.BO.stop(),this.TO&&this.TO.stop()}triggerAdOpportunity(){this.gO&&(this.gO=!1,this._O.next({payload:{adBreakType:Rh[this.uO]}}))}startAds(t){var i,e;null===(e=(i=this.lO).startAds)||void 0===e||e.call(i,this.uO,t)}destroy(){(0,jt.i)(this.wf),this.TO&&this.TO.disable(),this.BO=this.OO(this.BO),this.LO=this.OO(this.LO),this.lO.destroy()}CO(){this.wf.push(this.lO.onExperienceControllerStateChange.subscribe((()=>{this.IO.next()}))),this.lO.start()}RO(){const{numberOfMidRolls:t}=this.cO.linearAdsControllerData;return this.mO>=t&&-1!==t}OO(t){if(t)return t.stop(),(0,jt.i)(this.vO.get(t)),this.vO.delete(t),null}MO(){const{maxAdSlotDuration:t}=this.cO.linearAdsControllerData;if(!t||this.BO)return;const i=De.getGlobalContainer().resolve(ts);this.BO=new Is(i,t),this.BO.start(),this.vO.set(this.BO,[this.BO.onTimeElapsed.subscribe((()=>{this.yO.next()}))])}EO(){const{maxAdPodDuration:t}=this.cO.linearAdsControllerData;if(!t||this.LO)return;const i=De.getGlobalContainer().resolve(ts);this.LO=new Is(i,t),this.LO.start(),this.vO.set(this.LO,[this.LO.onTimeElapsed.subscribe((()=>{this.xO.next()})),this.LO.onTimeUpdate.subscribe((()=>{const t=this.LO.timeRemaining;this.wO.next(t)}))])}}class Ia{constructor(t,i){this.cO=t,this.DO=i,this.SO=new It.x,this.AO=new It.x,this.jO=0,this.IO=new It.x,this.vO=new Map,this.wf=[],this.kO={inImpression:!1,linearInImpression:!1,inPrePostRoll:!1,contentPaused:!0,linearInOpportunity:!1},this.VO=!1,this.FO=!0}start(){this.CO(),this.initTimer()}get onExperienceControllerStateChange(){return this.IO.asObservable()}initTimer(){const t=De.getGlobalContainer().resolve(ts);this.$O=new Is(t,this.cO.resetNumberOfNonLinearAdsAfter),this.vO.set(this.$O,[this.$O.onTimeElapsed.subscribe((()=>{this.jO=0,this.IO.next()}))])}CO(){this.wf.push(this.DO.onExperienceControllerStateChange.subscribe((()=>{this.IO.next()}))),this.DO.start()}get onAdsDisabled(){return this.SO.asObservable()}get onAdsEnabled(){return this.AO.asObservable()}onLinearImpressionStateChange(t){this.kO.linearInImpression=t,t?(this.$O.stop(),this.jO=0):(this.$O.reset(),this.$O.start(),this.DO.onLinearAdFinished())}onLinearOpportunityChange(t){this.kO.linearInOpportunity=t}onAdStateChange(t){this.kO.inPrePostRoll=!(t===l.ProtoAdSlotsEnum.MidRoll)}onAdFinished(){this.DO.onAdFinished(),this.kO.inImpression=!1,this.jO++}onAdImpression(){this.kO.inImpression=!0,0===this.jO&&(this.$O.reset(),this.$O.start())}canEnableAds(){return!!this.DO.canEnableAds()&&(!(this.kO.inImpression||this.kO.inPrePostRoll||this.kO.linearInImpression||this.kO.linearInOpportunity&&this.FO||this.kO.contentPaused&&this.VO)&&!(this.jO>=this.cO.numberOfNonlinearAds&&this.cO.numberOfNonlinearAds>0))}viewabilityStateChanged(t){this.VO=t}onLinearNoDemand(){this.FO=!1}enableAds(){this.AO.next()}disableAds(){this.SO.next()}contentPlaybackStateChanged(t){this.kO.contentPaused=!t,this.IO.next()}destroy(){var t;(0,jt.i)(this.wf),null===(t=this.DO)||void 0===t||t.destroy()}}class ka{constructor(t,i,e,s,n){var r;this.mediator=t,this.cO=e,this.wf=[],this.kO={stopped:!1,viewability:!1,forceDisable:!1,zeroDimension:!1,isAppBackgrounded:!1},this.NO=new Pa(e,s),this.UO(s),this.viewabilityStateChanged(i),this.onResize(this.cO.playerDimensions.width,this.cO.playerDimensions.height),this.NO.start(),(0,dt.kE)(null===(r=e.nonLinearAdsControllerData)||void 0===r?void 0:r.numberOfNonlinearAds)&&n&&this.HO(e.nonLinearAdsControllerData,n),this.onContentStop()}UO(t){this.wf.push(this.NO.onAdSlotDurationElapsed.subscribe((()=>{this.mediator.publish(this,Qt)})),this.NO.onAdPodDurationElapsed.subscribe((()=>{this.mediator.publish(this,Yt)})),this.NO.onAdPodTimeUpdate.subscribe((t=>{this.mediator.publish(this,Zt,{payload:{remainingTime:t}})})),this.NO.onAdOpportunity.subscribe((t=>{var i;null===(i=this.qO)||void 0===i||i.onLinearOpportunityChange(!0),this.mediator.publish(this,Xt,t)})),this.NO.onAdsDisabled.subscribe((t=>{this.mediator.publish(this,Jt,t)})),this.NO.onAdsEnabled.subscribe((()=>{this.mediator.publish(this,Gt)})),this.NO.onTotalAdBreakDurationExpired.subscribe((()=>{this.mediator.publish(this,Wt)})),this.NO.onMidRollCapped.subscribe((()=>{this.mediator.publish(this,zt)})),this.NO.onExperienceControllerStateChange.subscribe((()=>{this.zO()})))}HO(t,i){this.qO=new Ia(t,i),this.wf.push(this.qO.onAdsDisabled.subscribe((()=>{this.mediator.publish(this,Kt)})),this.qO.onAdsEnabled.subscribe((()=>{this.mediator.publish(this,ti)})),this.qO.onExperienceControllerStateChange.subscribe((()=>{this.zO()}))),this.qO.start()}slideChanged(t){this.NO.slideChanged(t)}updateStoryTimeline(t){this.NO.updateStoryTimeline(t)}contentPlaybackStateChanged(t){var i;this.NO.contentPlaybackStateChanged(t),null===(i=this.qO)||void 0===i||i.contentPlaybackStateChanged(t)}forceRecheck(){this.zO()}onAdImpression(t,i){var e;switch(i){case li.LINEAR:this.NO.onAdImpression(t,this.Id);const i=!0;null===(e=this.qO)||void 0===e||e.onLinearImpressionStateChange(i);break;case li.NONLINEAR:this.qO.onAdImpression()}this.zO()}onAdFinished(t,i,e=!1){var s,n;switch(i){case li.LINEAR:if(this.NO.onAdFinished(t,e,this.Id),e)this.WO();else{const t=!1;null===(s=this.qO)||void 0===s||s.onLinearImpressionStateChange(t)}break;case li.NONLINEAR:null===(n=this.qO)||void 0===n||n.onAdFinished()}e||this.zO()}onLinearAdPause(){this.NO.onAdPause()}onLinearAdPlay(){this.NO.onAdPlay()}onContentStop(){this.NO.onStop(),this.kO.stopped=!0,this.zO()}onAdStateChange(t,i,e){var s;null===(s=this.qO)||void 0===s||s.onAdStateChange(t);const n=t===this.NO.currentPlayerAdSlot&&t===l.ProtoAdSlotsEnum.MidRoll;n?this.NO.onAdStateChange(t,i,e,n):(this.NO.onAdStateChange(t,i,e,n),this.GO())}GO(){this.NO.startAds(this.Id),this.kO.stopped=!1,this.zO()}contentChanged(){this.NO.contentChanged(this.Id),this.zO()}viewabilityStateChanged(t,i=!1,e=!1){var s;this.NO.viewabilityStateChanged(t,i),null===(s=this.qO)||void 0===s||s.viewabilityStateChanged(t),this.Id=t,this.cO.viewabilityPolicy===l.ProtoAdViewabilityPolicy.Strict&&(this.kO.viewability=!t),e||this.zO()}setToggleAdsReason({isAppBackgrounded:t}){this.kO.isAppBackgrounded=t,this.zO()}onLinearNoFill(){var t;null===(t=this.qO)||void 0===t||t.onLinearOpportunityChange(!1),this.JO()}onLinearNoDemand(){var t;null===(t=this.qO)||void 0===t||t.onLinearNoDemand(),this.JO()}disableAdvertising(){this.kO.forceDisable=!0,this.zO()}enableAdvertising(){this.kO.forceDisable=!1,this.zO()}get inView(){return this.Id}onResize(t,i){this.kO.zeroDimension=0===t||0===i,this.zO()}destroy(){(0,jt.i)(this.wf),this.NO.destroy()}zO(){const t=this.YO();t.enableAds?(this.XO(),this.JO()):(this.ZO(t.disableReason),this.KO())}XO(){const t=this.NO.canEnableAds(this.Id);t.enableAds?this.WO():this.ZO(t.disableReason)}JO(){var t;(null===(t=this.qO)||void 0===t?void 0:t.canEnableAds())?this.tL():this.KO()}KO(){var t;null===(t=this.qO)||void 0===t||t.disableAds()}tL(){var t;null===(t=this.qO)||void 0===t||t.enableAds()}ZO(t){this.NO.disableAds(t,this.Id)}YO(){return Object.keys(this.kO).some((t=>this.kO[t]))?{enableAds:!1,disableReason:Pi.Unknown}:{enableAds:!0,disableReason:Pi.Unknown}}WO(){this.NO.triggerAdOpportunity(),this.NO.enableAds()}}var Ca;!function(t){t[t.None=0]="None",t[t.MinTimeBeforeFirstAd=1]="MinTimeBeforeFirstAd",t[t.TimeBetweenAds=2]="TimeBetweenAds"}(Ca||(Ca={}));class Ta{constructor(t){this.cO=t,this.iL=!1,this.eL=!1,this.kO={inTimeout:!1,limitAdsOnMidRoll:!1},this.IO=new It.x}start(){this.kO.limitAdsOnMidRoll=!0;const t=De.getGlobalContainer().resolve(ts);this.sL=new Is(t,this.cO.minTimeBeforeAdBreak),this.sL.onTimeElapsed.subscribe((()=>{this.iL||(this.iL=!0),this.kO.inTimeout=!1,this.eL=!0,this.IO.next()}))}get onExperienceControllerStateChange(){return this.IO.asObservable()}canEnableAds(t,i){if(t===$.ProtoAdSlotsEnum.MidRoll){if(this.kO.limitAdsOnMidRoll)return{enableAds:!1,disableReason:Pi.Unknown};if(this.kO.inTimeout&&i)return{enableAds:!1,disableReason:Pi.TimeoutBetweenAds}}return{enableAds:!0,disableReason:Pi.Unknown}}startAds(t,i){this.nL(t,i)}getAdBreakDuration(t){const i=this.rL(t);return i===Ca.MinTimeBeforeFirstAd?this.cO.minTimeBeforeAdBreak:i===Ca.TimeBetweenAds?this.cO.timeBetweenAds:0}onAdImpression(t,i,e){i===$.ProtoAdSlotsEnum.MidRoll&&(this.iL||(this.iL=!0)),this.hL=!e}onAdFinished(t,i,e){this.eL=!1,this.iL&&!this.hL&&e&&!i&&this.nL(t,e)}viewabilityStateChanged(t,i,e){e||this.nL(t,i)}onAdStateChange(t,i,e){const s=this.kO.limitAdsOnMidRoll;this.oL(t,i),s!==this.kO.limitAdsOnMidRoll&&this.IO.next(),e||(t!==$.ProtoAdSlotsEnum.MidRoll&&(this.iL=!1),this.eL=!1)}contentPlaybackStateChanged(t){t?this.sL.start():this.sL.stop()}contentChanged(t,i){this.kO.inTimeout=!1,this.kO.limitAdsOnMidRoll=!0,this.sL.stop(),this.iL=!1,this.eL=!1,this.nL(t,i)}destroy(){this.sL.disable()}nL(t,i){if(t===$.ProtoAdSlotsEnum.MidRoll&&!this.kO.inTimeout&&!this.eL){const t=this.rL(i);t===Ca.MinTimeBeforeFirstAd?this.aL():t===Ca.TimeBetweenAds&&this.lL(),this.IO.next()}}lL(){this.kO.inTimeout=!0,this.sL.reset(this.cO.timeBetweenAds)}aL(){this.kO.inTimeout=!0,this.sL.reset(this.cO.minTimeBeforeAdBreak)}rL(t){return!this.iL&&this.cO.minTimeBeforeAdBreak?Ca.MinTimeBeforeFirstAd:this.iL&&this.cO.timeBetweenAds&&t?Ca.TimeBetweenAds:Ca.None}oL(t,i){this.kO.limitAdsOnMidRoll=this.cO.midRollOnlyOnLongContent&&t===$.ProtoAdSlotsEnum.MidRoll&&(!i||i<480)}}class Ma{constructor(t){this.uL=t,this.kO={inTimeoutBetweenNonLinears:!1,inTimeoutBetweenLinearAndNonLinear:!1},this.IO=new It.x,this.wf=[]}start(){const t=De.getGlobalContainer().resolve(ts);this.dL=new Is(t,this.uL.timeSecondsBetweenNonlinear*oi.s_),this.pL=new Is(t,this.uL.timeSecondsBetweenLinearAndNonlinear*oi.s_),this.wf.push(this.dL.onTimeElapsed.subscribe((()=>{this.kO.inTimeoutBetweenNonLinears=!1,this.IO.next()})),this.pL.onTimeElapsed.subscribe((()=>{this.kO.inTimeoutBetweenLinearAndNonLinear=!1,this.IO.next()})))}get onExperienceControllerStateChange(){return this.IO.asObservable()}canEnableAds(){return!Object.keys(this.kO).some((t=>this.kO[t]))}onAdFinished(){this.uL.timeSecondsBetweenNonlinear&&(this.kO.inTimeoutBetweenNonLinears=!0,this.dL.reset(),this.dL.start())}onLinearAdFinished(){this.uL.timeSecondsBetweenLinearAndNonlinear&&(this.kO.inTimeoutBetweenLinearAndNonLinear=!0,this.pL.reset(),this.pL.start())}destroy(){var t,i;(0,jt.i)(this.wf),null===(t=this.dL)||void 0===t||t.disable(),null===(i=this.pL)||void 0===i||i.disable()}}class Ea extends Ai{constructor(){super(...arguments),this.rf=U,this.hf=m.Rq,this.Xp=0,this.fL=9e4}get type(){return this.Lp.playerType}wp(){return new Aa(this,this.Lp,this.$playerContainer,this.checkFloatingViewability(this.isViewable()),this.gp,this.app,this.pd,this.Fp(this.$playerContainer.clientWidth,this.$playerContainer.clientHeight))}generateHTML(){this.$playerWrapper=this.app.services.GlobalDomUtilsService.createElementByString(`<cnx class="${m.sN.PlayerWrapper}"></cnx>`),this.$playerContainer=this.app.services.GlobalDomUtilsService.createElementByString("<cnx class='cnx-video-container'></cnx>"),this.addPlayerSize(),this.$experienceContainer.appendChild(this.$playerWrapper),this.$playerWrapper.appendChild(this.$playerContainer)}addPlayerSize(){this.Lp.playerSize.responsive?(this.$playerWrapper.appendChild(this.Wp()),(0,e.cn)(this.$playerWrapper,m.Ig.Responsive)):(this.setFixedSize(this.$experienceContainer),(0,e.cn)(this.$playerWrapper,m.Ig.Fixed))}setFixedSize(t){(0,e.T7)(t,{width:`${this.Lp.playerSize.fixedWidth}px`,height:`${this.Lp.playerSize.fixedHeight}px`})}jp(){var t,i;let e;if(this.Lp.nonlinearPlayerSettings){const{timeSecondsBetweenNonlinear:t,timeSecondsBetweenLinearAndNonlinear:i}=this.Lp.nonlinearPlayerSettings;e=new Ma({timeSecondsBetweenLinearAndNonlinear:i,timeSecondsBetweenNonlinear:t})}const s=new Ta({midRollOnlyOnLongContent:this.Lp.midRollOnlyOnLongContent,minTimeBeforeAdBreak:this.Lp.minTimeBeforeFirstAd,timeBetweenAds:this.Lp.timeBetweenAds});return new ka(this,this.isViewable(),{linearAdsControllerData:{numberOfMidRolls:this.Lp.midRollNumber,maxAdSlotDuration:this.gp.getMaxAdSlotDuration(),maxAdPodDuration:this.gp.getMaxAdPodDuration(),totalAdBreakLength:this.Lp.outstreamSettings?this.Lp.outstreamSettings.totalAdBreakLength:void 0},nonLinearAdsControllerData:{resetNumberOfNonLinearAdsAfter:0!==this.Lp.midRollNumber?this.Lp.timeBetweenAds:this.fL,numberOfNonlinearAds:null===(i=null===(t=this.Lp)||void 0===t?void 0:t.nonlinearPlayerSettings)||void 0===i?void 0:i.numberOfNonlinearAds},viewabilityPolicy:this.Lp.adViewabilityPolicy,playerDimensions:{width:this.$playerContainer.offsetWidth,height:this.$playerContainer.offsetHeight}},s,e)}}class Ba{constructor(t,i,e,s,n=1200){this.mL=t,this.gL=i,this.vL=e,this.yL=s,this.bL=n,this.xL=null,this.wL=!1,this._L=()=>{if(this.wI(),!this.wL&&this.gL&&this.gL.linearAdInWin)return this.wL=!0,void this.SL(this.bL);this.mL.startContent()}}destroy(){this.wI()}changeState(t){switch(t){case b.PrerollState:this.wL=!1,this.SL(this.vL);break;case b.PostrollState:this.wL=!1,this.SL(this.yL);break;default:this.xL&&this.wI()}}setPreRollBreak(t){this.vL=t}setPostRollBreak(t){this.yL=t}wI(){clearTimeout(this.xL),this.xL=null}SL(t){this.wI(),this.xL=setTimeout(this._L,t)}}var Oa=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function h(t){try{a(s.next(t))}catch(t){r(t)}}function o(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(h,o)}a((s=s.apply(t,i||[])).next())}))};class La extends Ea{constructor(){super(...arguments),this.events=Object.assign(Object.assign({},Tt.Km),j),this.AL=new Dt.X(!1),this.PL=!1,this.IL=!0,this.kL=[],this.CL={[b.PlayingState]:()=>{var t;this.up(l.ProtoAdSlotsEnum.MidRoll);null===(t=this.adHandler)||void 0===t||t.contentPlaybackStateChanged(true),this.vp.contentPlaybackStateChanged(true)},[b.PrerollState]:()=>{this.up(l.ProtoAdSlotsEnum.PreRoll)},[b.PostrollState]:()=>{this.up(l.ProtoAdSlotsEnum.PostRoll)},[b.PausedState]:()=>{this.$s===l.ProtoAdSlotsEnum.PreRoll&&this.up(l.ProtoAdSlotsEnum.MidRoll)},[b.StoppedState]:()=>{this.$s===l.ProtoAdSlotsEnum.PostRoll&&this.Lp.upNextMode!==$.ProtoPlayerUpNextMode.Stop?(this.up(l.ProtoAdSlotsEnum.MidRoll),this.ep()):(this.bp(),this.vp.onContentStop(),this.ep())}},this.TL=({payload:t})=>{t===b.PlayingState&&(this.unsubscribe(D.StateChanged,this.mL,this.TL),this.mediator.publish(this,j.VideoStarted,{payload:this.getVideoDetails()}))},this.EL=t=>{const i=this.CL[t];return()=>{var e;if(t!==b.PlayingState){const t=!1;null===(e=this.adHandler)||void 0===e||e.contentPlaybackStateChanged(t),this.vp.contentPlaybackStateChanged(t)}i&&i()}},this.BL=()=>{this.AL.next(!0),this.OL.enterFullScreen().then((()=>{this.mL.enterFullscreen(),this.floatingModule&&this.floatingModule.fullscreenStateChange(!0)})).catch((t=>{(0,s.n)({level:s.D.WARN,message:"BaseVideoExperience_enterFullscreen"})}))},this.zp=()=>{this.AL.next(!1),this.mL.exitFullscreen(),this.floatingModule&&this.floatingModule.fullscreenStateChange(!1),this.app.services.GlobalDomUtilsService.hasIosFullscreenBehaviour(this.app.config.os.os)&&(this.PL=this.mL.isIosFullscreen=!1,this.up(this.$s)),this.mediator.publish(this,Tt.Zr.FullscreenChanged,{payload:!1}),super.zp()},this.qp=()=>{this.app.services.GlobalDomUtilsService.hasIosFullscreenBehaviour(this.app.config.os.os)&&(this.PL=this.mL.isIosFullscreen=!0,this.vp.onContentStop()),this.mediator.publish(this,Tt.Zr.FullscreenChanged,{payload:!0}),super.qp()}}start(){const t=Object.create(null,{start:{get:()=>super.start}});return Oa(this,void 0,void 0,(function*(){try{t.start.call(this),this.LL(),this.app.config.isOVPDomain?this.Pi.push(w._.onAdBlockerDetected().subscribe((t=>{t||this.RL()}))):this.RL(),this.DL(this.mL,this.adHandler),this.jL(),yield this.mL.start(),this.Vp(),this.sf(this.mL),this.VL(),this.FL()}catch(t){(0,s.n)({message:"BaseVideoExperience_Start",exception:t.message,callStack:t.stack,level:s.D.CRITICAL})}}))}$L(){const t=this.OL.onFullScreenEnter.subscribe((()=>this.qp())),i=this.OL.onFullScreenExit.subscribe((()=>this.zp()));this.kL.push(i,t)}changeVideo(t,i=!1){if(this.adHandler){if(this.adHandler.linearInImpression||this.adHandler.nonLinearInImpression)this.adHandler.stopAd("changeVideo");else{const t=!0;this.Ep(t)}this.adHandler.userInteraction(i)}this.mL.setVideo(t)}play(t=!0){this.adHandler&&this.adHandler.linearInImpression?this.adHandler.play():this.mL.play(t)}pause(t=!0){var i,e;null===(i=this.adHandler)||void 0===i||i.pause(),(null===(e=this.adHandler)||void 0===e?void 0:e.linearInImpression)||this.mL.pause(t)}setNewVolume(t){super.setNewVolume(t),this.mL.volume=t}getVolume(){return this.mL.volume}get currentTime(){return this.mL.currentTime}set currentTime(t){this.mL.currentTime=t}get duration(){return this.mL.duration}getVideoDetails(){let t;return this.mL.getCurrentVideoData((i=>{t=this.NL(i)})),t}getUpNextVideoDetails(){let t;return this.mL.getUpNextVideoData((i=>{t=this.NL(i)})),t}toggleFullscreen(t){(0,dt.$K)(t)||(t=!this.OL.isFullscreen),this.OL.isFullscreen!==t&&(t?this.BL():this.OL.exitFullScreen())}toggleCaptions(){var t;this.mL.toggleCaptions(),this.mL.updateCaptionsMenuUI(null===(t=this.getSubtitles()[0])||void 0===t?void 0:t.file)}showCaptions(t){this.mL.showCaptions(t),this.mL.updateCaptionsMenuUI(t)}getSubtitles(){return this.mL.getSubtitles()}hideCaptions(){this.mL.hideCaptions(),this.mL.updateCaptionsMenuUI()}toggleExpandButton(t){this.mL.toggleExpandButton(t)}getPlaylistId(){return this.Lp.playlistId}getQuality(){return this.mL.getQuality()}setQuality(t){this.mL.setQuality(t)}setAutoQuality(){this.mL.setAutoQuality()}getAvailableQualities(){return this.mL.getAvailableQualities()}destroy(){super.destroy(),this.UL.destroy(),this.mL&&(this.mL.destroy(),this.unsubscribeAll(this.mL)),(0,jt.i)(this.kL),(0,jt.i)(this.Od)}setPreRollBreak(t){var i;this.Lp.setPreRollBreak(t),null===(i=this.UL)||void 0===i||i.setPreRollBreak(this.Lp.preRollBreak),this.mL.hasPreroll=(0,dt.r)(this.Lp.preRollBreak)}setPostRollBreak(t){var i;this.Lp.setPostRollBreak(t),null===(i=this.UL)||void 0===i||i.setPostRollBreak(this.Lp.postRollBreak),this.mL.hasPostroll=(0,dt.r)(this.Lp.postRollBreak)}NL(t){const{imageMaxHeight:i,ratioHeight:e,ratioWidth:s}=Et,n=i/e*s;return{id:t.id,title:t.title,description:t.description,duration:(0,dt.kE)(t.duration)?t.duration:this.mL.duration,keywords:t.keywords,url:t.clickUrl?this.app.services.MacrosService.setupMacros(t.clickUrl):"",customFields:t.customFields,thumbnail:t.getThumbnailUrl(n,i)}}Qd(){if(this.wd)return;this.Sd||this.Xd();const t=Mt[l.ProtoAdSlotsEnum[this.$s]];this.wd=!0,this._d=!1;const i={adBreakPosition:t};this.$s===l.ProtoAdSlotsEnum.PostRoll&&(this.Pd=!0),this.app.services.EventsStorageService.emitAdBreakStart(i)}Yd(){this.wd&&(this.wd=!1,this.app.services.EventsStorageService.emitAdBreakComplete(),this.Pd&&(this.Pd=!1,this.ep()))}Zd(){this._d||(this.wd&&this.Yd(),this.Sd||this.Xd(),this._d=!0,this.app.services.EventsStorageService.emitPlay())}Kd(){this._d&&(this._d=!1,this.app.services.EventsStorageService.emitPause())}Xd(){this.Sd||(this.Sd=!0,this.mL.getCurrentVideoData((({title:t,id:i,sourceItemId:e,keywords:s,duration:n,customFields:r})=>{const h=this.mL.streamFormat,o=e||i;this.app.services.EventsStorageService.emitSessionStart({name:t,keywords:s,mediaId:o,length:n,streamFormat:h,customFieldList:r,feed:"Video"})})))}ep(){this.Sd&&(this.Sd=!1,this._d=!1,this.wd&&this.Yd(),this.app.services.EventsStorageService.emitSessionEnd())}sp(){this.Sd&&(this.app.services.EventsStorageService.emitContentComplete(),this.Lp.postRollBreak||this.ep())}Mp(){const t=this.$s===l.ProtoAdSlotsEnum.PostRoll?this.getUpNextVideoDetails():this.getVideoDetails();t?(this.adHandler.setContinueReadingCard({imageSrc:t.thumbnail,title:t.title}),this.adHandler.setAdMarkerTitle(t.title)):(this.adHandler.hideContinueReadingCard(),this.adHandler.hideAdMarkerTitle()),super.Mp(),this.mL.hide()}Fu(t,i=!1){super.Fu(t,i),this.HL&&(this.HL.setSoundVolume(this.mL.volume),this.HL.setViewability(t),this.HL.setIsAppBackgrounded(i))}ks(){super.ks(),this.mL&&this.mL.resize(this.breakPointsHandler.currentBreakpointClass)}handleClose(){this.floatingModule&&this.floatingModule.isInFloating?(this.floatingModule.destroy(),this.pause(!1)):this.OL.isFullscreen?this.OL.exitFullScreen():this.triggerDestroy()}generateHTML(){super.generateHTML(),this.setPlayerMinDimension(),this.qL=this.app.services.GlobalDomUtilsService.createElementByString(`<img class="${m.sN.ImagePlaceholder}">`),this.$playerWrapper.appendChild(this.qL)}setPlayerMinDimension(){this.Ld=142}zL(t){this.adHandler&&this.adHandler.setMediaRestrictions(t)}jL(){this.subscribe(_t[_t.Volume],this.mL,(({payload:{volume:t}})=>{this.adHandler?this.adHandler.setLinearVolume(t):this.ys(t)})),this.subscribe(P,this.mL,(()=>{this.mediator.publish(this,j.NewVideo),this.subscribe(D.StateChanged,this.mL,this.TL),this.mL.getCurrentVideoData((t=>{var i;const e={mediaId:t.id,mediaKeywords:t.keywords,mediaLanguage:t.languageId,mediaInsights:t.insights};this.zL(e),this.app.services.TrackingService.setNewMedia({mediaId:t.id,clickUrl:t.clickUrl,insights:(null===(i=t.insights)||void 0===i?void 0:i.insights)||[],sentimentAnalysis:t.sentimentAnalysis});const s=t.getThumbnailUrl(this.$experienceContainer.clientWidth,this.$experienceContainer.clientHeight);this.adHandler&&this.adHandler.setAdLoadingBackgroundUrl(s),this.WL(s,t.altText),this.mediator.publish(this,D.MediaMetaUpdate,{payload:{title:t.title,description:t.description}})}))})),this.subscribe(D.FirstFramePlayed,this.mL,(()=>{this.app.services.TrackingService.setMediaStart(),this.cf(),this.Xd()})),this.subscribe(D.StateChanged,this.mL,(({payload:t})=>{switch(this.UL.changeState(t),this.GL(t),t){case b.PlayingState:this.mediator.publish(this,Tt.q0.Play,{payload:this.getVideoDetails()}),this.Zd();break;case b.PausedState:this.mediator.publish(this,Tt.q0.Pause,{payload:this.getVideoDetails()}),this.app.services.TrackingService.setSessionPlayback(!1),this.Kd();break;case b.StoppedState:this.app.services.TrackingService.setSessionPlayback(!1);break;case b.PrerollState:case b.PostrollState:this.app.services.TrackingService.setSessionPlayback(!0),this.Qd();break;case b.HiddenState:this.app.services.TrackingService.setSessionPlayback(!0),this.Kd(),this.Qd();break;default:this.app.services.TrackingService.setSessionPlayback(!0)}})),this.floatingModule&&this.subscribe(p.Uh.UserInteraction,this.mL,this.$d),this.adHandler&&this.subscribe(p.Uh.UserInteraction,this.mL,(({payload:{playback:t}})=>{!1===t&&(this.adHandler.pause(),this.vp.onContentStop()),this.adHandler.userInteraction(t)})),this.subscribe(p.Uh.UserInteraction,this.mL,(({payload:{clickedNext:t,clickedPrev:i}})=>{(t||i)&&this.ep()})),this.subscribe(D.ContentQuartiles,this.mL,(({payload:t})=>{let i;switch(this.app.services.TrackingService.trackMediaQuartile(t),t){case l.ProtoQuartilesEnum.First:i=j.VideoCompleted25;break;case l.ProtoQuartilesEnum.Second:i=j.VideoCompleted50;break;case l.ProtoQuartilesEnum.Third:i=j.VideoCompleted75;break;case l.ProtoQuartilesEnum.Fourth:i=j.VideoCompleted100}i&&this.mediator.publish(this,i,{payload:this.getVideoDetails()})})),this.subscribe(D.ContentQuartiles,this.mL,(({payload:t})=>{t===l.ProtoQuartilesEnum.Fourth&&this.sp()})),this.subscribe(_t[_t.OverlayClick],this.mL,(()=>{this.mediator.publish(this,j.PlayerClicked,{payload:this.getVideoDetails()}),this.app.services.TrackingService.trackMediaClick(l.ProtoMediaClickTypeEnum.PauseClick)})),this.subscribe(E,this.mL,(t=>this.mediator.publish(this,Tt.q0.QualityChanged,t))),this.subscribe(A,this.mL,(t=>{this.mediator.publish(this,Tt.q0.PlayError,t),this.app.services.EventsStorageService.emitPlayError()})),this.subscribe(_t[_t.CaptionOn],this.mL,(()=>this.mediator.publish(this,j.SubtitlesVisibilityChanged,{payload:!0}))),this.subscribe(_t[_t.CaptionOff],this.mL,(()=>this.mediator.publish(this,j.SubtitlesVisibilityChanged,{payload:!1}))),this.adHandler&&this.kL.push(this.adHandler.onLinearUiComponentEvent.subscribe((t=>{if(t.type===_t.Volume){const{volume:i}=t.payload;this.ys(i),this.mL.volume=i}})),this.adHandler.onLinearNoFill.subscribe((()=>{var t;null===(t=this.vp)||void 0===t||t.onLinearNoFill()}))),this.subscribe(P,this.mL,(()=>{this.IL?(this.IL=!1,this.Lp.adPlaybackMode===l.ProtoAdPlaybackMode.Autoplay&&this.Lp.playbackMode!==l.ProtoPlayerPlaybackModeEnum.ClickToPlay&&0===this.Lp.preRollBreak&&this.up(l.ProtoAdSlotsEnum.MidRoll)):this.yp()})),this.Lp.isCloseButton&&this.subscribe(_t[_t.Close],this.mL,(()=>this.handleClose())),this.subscribe(p.Uh.GeneralUserInteraction,this.mL,(({payload:{type:t}})=>{this.app.services.TrackingService.trackMediaClick(t)}))}RL(){this.adHandler&&(this.adHandler.start(this.mL.width,this.mL.height,this.Lp.soundMode===$.ProtoPlayerSoundMode.On?1:0,!1,!0),this.vp.forceRecheck())}GL(t){this.EL(t)()}pp(t){!this.PL&&this.adHandler&&this.adHandler.adStateChange(t,this.gp.getMaxAdSlotDuration())}fp(t){const{duration:i}=this.mL;this.vp.onAdStateChange(t,{maxAdPodDuration:this.gp.getMaxAdPodDuration(),maxAdSlotDuration:this.gp.getMaxAdSlotDuration()},i)}VL(){this.OL=new kt(this.app.services.GlobalDomUtilsService,this.$playerContainer,this.app.config.os.os),this.JL()}JL(){this.$L(),this.subscribe(_t[_t.Expand],this.mL,this.BL),this.subscribe(_t[_t.Collapse],this.mL,(()=>this.OL.exitFullScreen()))}WL(t,i){this.qL.style.display="none",this.qL.onload=()=>{this.qL.style.display="block"},(0,dt.QM)(t)&&this.qL.setAttribute("src",t),this.qL.setAttribute("alt",i)}DL(t,i){const{preRollBreak:e,postRollBreak:s}=this.Lp;this.UL=new Ba(t,i,e,s)}FL(){this.HL=new Ot(this,this.Lp.playbackMode),this.subscribe(Bt[Bt.Play],this.HL,(t=>{var i,e;this.mL.play(),(null===(i=this.adHandler)||void 0===i?void 0:i.nonLinearInImpression)&&(null===(e=this.adHandler)||void 0===e||e.play()),t.payload&&(0,dt.kE)(t.payload.volume)&&super.setNewVolume(t.payload.volume)})),this.subscribe(Bt[Bt.Pause],this.HL,(t=>{var i,e;this.mL.pause(),(null===(i=this.adHandler)||void 0===i?void 0:i.nonLinearInImpression)&&(null===(e=this.adHandler)||void 0===e||e.pause()),t.payload&&(0,dt.kE)(t.payload.volume)&&super.setNewVolume(t.payload.volume)})),this.subscribe(p.Uh.UserInteraction,this.mL,(({payload:{playback:t}})=>{(0,dt.$K)(t)&&this.HL.setUserPlayback(t)}));const t=this.mL.canPlay().subscribe((t=>{this.HL.setCanPlay(t)})),i=this.AL.subscribe((t=>{this.HL.setIsFullscreen(t)}));this.kL.push(t,i)}}function Ra(t){return t<=0?function(){return Fr}:(0,br.e)((function(i,e){var s=0;i.subscribe((0,xr.x)(e,(function(i){++s<=t&&(e.next(i),t<=s&&e.complete())})))}))}var Da,ja;!function(t){t[t.StateChanged=0]="StateChanged",t[t.ContentEnd=1]="ContentEnd",t[t.VideoQueued=2]="VideoQueued"}(Da||(Da={}));class Va{constructor(t,i,e,s,n,r=!1,h){this.mediator=t,this.QL=i,this.YL=e,this.XL=s,this.ZL=n,this.tR=r,this.iR=h,this.eR=!1,this.sR=!1,this.nR=!1,this.rR=!1,this.hR=500,this.oR=new It.x,this.aR=0,this.cR(),this.initListeners()}cR(){this.lR=b.StoppedState,this.uR=b.StoppedState,this.iR&&(this.eR=!0)}dR(){this.pR=this.YL.onVideoEvents.subscribe((t=>{switch(t){case v.Playing:this.fR();break;case v.Error:this.mR();break;case v.Pause:this.gR()}}))}fR(){switch(this.lR){case b.PlayingState:return;case b.PausedState:case b.StoppedState:case b.BufferingState:this.vR(b.PlayingState);break;case b.HiddenState:case b.PrerollState:this.yR()}}mR(){switch(this.lR){case b.BufferingState:case b.PlayingState:this.vR(b.PausedState)}}gR(){switch(this.lR){case b.BufferingState:case b.PlayingState:this.vR(b.PausedState)}}initListeners(){var t,i;this.oR.pipe((t=400,void 0===i&&(i=ze),(0,br.e)((function(e,s){var n=null,r=null,h=null,o=function(){if(n){n.unsubscribe(),n=null;var t=r;r=null,s.next(t)}};function a(){var e=h+t,r=i.now();if(r<e)return n=this.schedule(void 0,e-r),void s.add(n);o()}e.subscribe((0,xr.x)(s,(function(e){r=e,h=i.now(),n||(n=i.schedule(a,t),s.add(n))}),(function(){o(),s.complete()}),void 0,(function(){r=n=null})))}))),Ra(1)).subscribe((t=>{this.bR(t),this.aR=0})),this.dR()}vR(t){this.lR!==t&&(this.uR=this.lR,this.lR=t,this.mediator.publish(this,Da[Da.StateChanged],{payload:this.lR}))}xR(t){return this.lR===t}wR(){this.vR(b.PrerollState),this.eR=!0}_R(){this.SR===b.PlayingState?this.AR():this.yR()}PR(){this.vR(b.PostrollState)}IR(){this.SR===b.PausedState?(this.nR=!0,this.stop()):(this.nR=!1,this.mediator.publish(this,Da[Da.ContentEnd]))}yR(){this.YL.pause(),this.vR(b.PausedState)}AR(){this.vR(b.BufferingState),this.QL.getCurrentVideoData((()=>{this.xR(b.HiddenState)||this.SR===b.PausedState||this.YL.play()}))}kR(){this.lR!==b.PostrollState&&(this.eR=!1)}resume(){this.uR&&this.vR(this.uR)}play(){this.SR=b.PlayingState,this.xR(b.PlayingState)||this.xR(b.PrerollState)||this.xR(b.PostrollState)||this.xR(b.HiddenState)||(!this.XL||this.eR||this.sR?this.xR(b.StoppedState)&&this.nR?this.IR():this.AR():this.wR())}isInPlayingState(){return this.xR(b.PlayingState)}setVideoQueue(t,i){0===this.oR.observers.length&&this.initListeners(),i?this.aR--:this.aR++;const e=this.QL.getAdjustedVideoIndex(t,this.aR);this.oR.next(e),this.mediator.publish(this,Da[Da.VideoQueued],{payload:e})}bR(t){if(this.YL.pause(),this.kR(),this.vR(b.BufferingState),this.TR&&this.TR.isPending)try{this.TR.reject(),this.TR=null}catch(t){this.TR=null}const i=this.QL.setVideo(t);this.TR=new At.C,this.TR.resolve(i),this.TR.promise.then((t=>{this.TR=null,this.YL.setSource(t).then((()=>this.play()))}))}set hasPreroll(t){this.XL=t,this.eR=!0}set hasPostroll(t){this.ZL=t}pause(t=!1){this.SR=b.PausedState,this.xR(b.PrerollState)||this.xR(b.PostrollState)||this.xR(b.HiddenState)||this.yR()}pauseToggle(){if(this.xR(b.PausedState)||this.xR(b.PlayingState))return this.xR(b.PausedState)&&this.rR?(this.rR=!1,void this.play()):this.xR(b.PlayingState)?(this.rR=!0,void this.pause()):void 0}stop(){this.YL.pause(),this.vR(b.StoppedState)}hide(){this.YL.hide(),this.YL.pause(),this.vR(b.HiddenState)}show(t=!0){this.xR(b.HiddenState)&&(this.YL.show(),this.uR!==b.PostrollState?t&&(this.SR===b.PlayingState?this.AR():this.yR()):this.IR())}handleVideoEnd(){this.ZL&&!this.sR?this.PR():this.IR()}onEnterBuffering(){this.xR(b.PlayingState)&&this.vR(b.BufferingState)}onExitBuffering(){this.xR(b.BufferingState)&&(this.SR===b.PlayingState?this.AR():this.yR())}getCurrentState(){return this.lR}replay(){this.YL.currentTime=0,!this.XL||this.sR?this.AR():this.wR()}exitRollBreak(){this.lR!==b.PostrollState?this._R():this.IR()}onFullScreenChange(t){this.tR&&(this.sR=t,t||setTimeout((()=>{this.SR===b.PlayingState?(this.pause(),this.play()):this.pause()}),this.hR))}destroy(){this.pR.unsubscribe()}}!function(t){t.Autoplay="autoplay",t.Autochain="autochain",t.UserInitiated="user initiated"}(ja||(ja={}));class Fa{constructor(t){this.streamFormat=ja.Autoplay,this.isMuted=!0,t===l.ProtoPlayerPlaybackModeEnum.ClickToPlay&&(this.streamFormat=ja.UserInitiated)}get streamFormatValue(){return`${this.streamFormat}${this.isMuted?" muted":""}`}}class $a{constructor(t){this.MR=[],this.MR=t,this.ER(0)}BR(){this.OR(this.LR).getMetadata()}ER(t){this.LR=t,this.BR()}OR(t){return this.MR[t]}setAvailableQualitiesForSourceMeta(t,i){t.setAvailableQualities(i)}get nextVideoIndex(){return this.LR===this.MR.length-1?0:this.LR+1}get prevVideoIndex(){return 0===this.LR?this.MR.length-1:this.LR-1}get currentVideoIndex(){return this.LR}getCurrentVideoData(t,i){this.OR(this.LR).getMetadata(t,i)}getVideoData(t,i){this.OR(t).getMetadata(i)}getAdjustedVideoIndex(t,i){return 1===i||-1===i?t:i>0?t+i<this.length?t+i:this.length-1:t+i<0?0:t+i}setVideo(t){return new Promise((i=>{this.OR(t).getMetadata((e=>{this.ER(t),i(e)}))}))}get length(){return this.MR.length}destroy(){this.MR=[]}}var Na=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function h(t){try{a(s.next(t))}catch(t){r(t)}}function o(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(h,o)}a((s=s.apply(t,i||[])).next())}))};const Ua={[l.ProtoVideoQuality.High1080p]:{quality:y.Strict,height:1080},[l.ProtoVideoQuality.High720p]:{quality:y.Strict,height:720},[l.ProtoVideoQuality.Medium360p]:{quality:y.Strict,height:360}};class Ha extends d._{constructor(t,i,e,s,n){super(),this.mediator=t,this.Lp=i,this.yf=e,this.ff=s,this.yB=n,this.RR=!1,this.DR=!0,this.jR=new Dt.X(!1),this.VR(),this.FR(),this.$R(),this.NR=new Fa(this.Lp.playbackMode)}set hasPostroll(t){this.HR.hasPostroll=t}set hasPreroll(t){this.HR.hasPreroll=t}start(){return Na(this,void 0,void 0,(function*(){this.VB()}))}get streamFormat(){return this.NR.streamFormatValue}play(t=!1){t&&(this.mediator.publish(this,p.Uh.UserInteraction,{payload:{playback:!0}}),this.NR.streamFormat=ja.UserInitiated),this.HR.play()}pause(t=!1){t&&this.mediator.publish(this,p.Uh.UserInteraction,{payload:{playback:!1}}),this.HR.pause(t)}setVideo(t,i=!1){this.HR.setVideoQueue(t,i)}show(t=!0){this.HR.show(t)}hide(){this.HR.hide()}get isHidden(){return this.HR.getCurrentState()===b.HiddenState}enterFullscreen(){this.fl=!0,this.qR.expand(),this.HR.onFullScreenChange(!0)}exitFullscreen(){this.fl=!1,this.qR.collapse(),this.HR.onFullScreenChange(!1)}resize(t){this.qR.onResize(t)}get width(){return this.YL.width}get height(){return this.YL.height}get volume(){return this.YL.volume}set volume(t){this.YL.volume=t,this.qR.updateVolume(t),this.NR.isMuted=t<=0}getCurrentVideoData(t){return this.QL.getCurrentVideoData(t)}getVideoData(t,i){return this.QL.getVideoData(t,i)}getUpNextVideoData(t){return this.QL.getVideoData(this.QL.nextVideoIndex,t)}get isIosFullscreen(){return this.YL.isIosFullscreen}set isIosFullscreen(t){this.YL.isIosFullscreen=t}get currentTime(){return this.YL.currentTime}set currentTime(t){this.YL.currentTime=t}get duration(){return this.YL.duration}toggleCaptions(){this.YL.hasSubtitles()&&(this.YL.toggleCaptions(),this.qR.toggleCaptionState(!0),this.mediator.publish(this,_t[_t.CaptionOn]))}showCaptions(t){this.YL.hasSubtitles()&&(this.YL.showCaptions(t),this.qR.toggleCaptionState(!0),this.mediator.publish(this,_t[_t.CaptionOn]))}updateCaptionsMenuUI(t){this.qR.updateDefaultCaptions(t)}getSubtitles(){return this.YL.getSubtitles()}hideCaptions(){this.YL.hideCaptions(),this.qR.toggleCaptionState(!1),this.mediator.publish(this,_t[_t.CaptionOff])}toggleExpandButton(t){this.qR.toggleExpandButtonDisplay(t)}getQuality(){let t;return this.QL.getCurrentVideoData((i=>{t=i.getClosestSourceQuality(this.YL.currentQualitySettings.height).videoHeight})),t}setQuality(t){this.QL.getCurrentVideoData((i=>{const e=i.getClosestSourceQuality(t);this.YL.setQuality({height:e.videoHeight,quality:y.Strict})}))}setAutoQuality(){this.YL.setQuality({height:this.YL.height,quality:y.Auto})}getAvailableQualities(){let t=[];return this.QL.getCurrentVideoData((i=>{t=i.getAvailableQualities().map((t=>t.videoHeight))})),t}stop(){this.HR&&this.HR.stop()}resume(){this.HR&&this.HR.resume()}startContent(){this.HR.exitRollBreak()}destroy(){this.qR.destroy(),this.QL.destroy(),this.YL.destroy(),this.HR.destroy()}canPlay(){return this.jR.asObservable()}zR(){return new Promise(((t,i)=>{try{this.QL.getCurrentVideoData((i=>Na(this,void 0,void 0,(function*(){yield this.YL.setSource(i),this.qR.updateCurrentVideo(i),this.GR(i,this.YL.currentQualitySettings),t()}))),(()=>i(new Error("getCurrentVideoData fail callback"))))}catch(t){i(t)}}))}JR(){this.subscribe(Da[Da.StateChanged],this.HR,(({payload:t})=>{this.qR.changeState(t),this.mediator.publish(this,D.StateChanged,{payload:t})})),this.subscribe(Da[Da.ContentEnd],this.HR,(()=>{this.QR()})),this.subscribe(Da[Da.VideoQueued],this.HR,(({payload:t})=>{this.mediator.publish(this,D.VideoQueued,{payload:{videoIndex:t}})}))}YR(){this.subscribe(_t[_t.Play],this.qR,(()=>{if(this.DR&&this.Lp.playbackMode===l.ProtoPlayerPlaybackModeEnum.ClickToPlay){const t=this.Lp.soundMode===l.ProtoPlayerSoundMode.On?1:0;this.volume=t,this.mediator.publish(this,_t[_t.Volume],{payload:{volume:t}})}this.DR=!1,this.mediator.publish(this,p.Uh.UserInteraction,{payload:{playback:!0}}),this.play()})),this.subscribe(_t[_t.Volume],this.qR,(({payload:t})=>{this.YL.volume=t,this.NR.isMuted=t<=0,this.mediator.publish(this,p.Uh.UserInteraction,{payload:{volume:!0}}),this.mediator.publish(this,_t[_t.Volume],{payload:{volume:t}})})),this.subscribe(_t[_t.Pause],this.qR,(()=>{this.mediator.publish(this,p.Uh.UserInteraction,{payload:{playback:!1}});this.pause(!0)})),this.subscribe(_t[_t.Seek],this.qR,(({payload:t})=>{this.XR=t})),this.subscribe(_t[_t.SeekingStart],this.qR,(()=>{this.HR.pauseToggle()})),this.subscribe(_t[_t.SeekingStopped],this.qR,(()=>{this.YL.forceCurrentTime(this.XR),this.HR.pauseToggle()})),this.subscribe(_t[_t.OverlayClick],this.qR,(()=>{this.QL.getCurrentVideoData((t=>{(0,dt.QM)(t.clickUrl)?(this.Lp.disableClickUrl||(this.yf.services.MacrosService.setVideoTime(this.YL.currentTime),this.yf.services.GlobalDomUtilsService.open(this.yf.services.MacrosService.setupMacros(t.clickUrl),Pt.bS.Blank)),this.mediator.publish(this,p.Uh.GeneralUserInteraction,{payload:{type:l.ProtoMediaClickTypeEnum.UrlClick}})):this.HR.pauseToggle(),this.mediator.publish(this,_t[_t.OverlayClick])}))})),this.subscribe(_t[_t.Expand],this.qR,(()=>{this.mediator.publish(this,_t[_t.Expand])})),this.subscribe(_t[_t.Collapse],this.qR,(()=>{this.mediator.publish(this,_t[_t.Collapse])})),this.subscribe(_t[_t.Quality],this.qR,(({payload:t})=>{this.YL.setQuality(t)})),this.subscribe(_t[_t.Close],this.qR,(()=>{this.mediator.publish(this,p.Uh.UserInteraction,{payload:{playback:!1,isFullscreenClose:this.fl}}),this.mediator.publish(this,_t[_t.Close])})),this.subscribe(_t[_t.CaptionOn],this.qR,(({payload:t})=>{this.showCaptions(t)})),this.subscribe(_t[_t.CaptionOff],this.qR,(()=>{this.hideCaptions()})),this.subscribe(_t[_t.CaptionOn],this.YL,(()=>{this.qR.toggleCaptionState(!0)})),this.subscribe(_t[_t.CaptionOff],this.YL,(()=>{this.qR.toggleCaptionState(!1)})),this.subscribe(_t[_t.CaptionUpdate],this.YL,(({payload:t})=>{this.qR.updateCaptions(t)})),this.subscribe(p.Uh.UserInteraction,this.qR,(()=>{this.mediator.publish(this,_t[p.Uh.UserInteraction],{payload:{videoIndex:this.QL.currentVideoIndex}})})),this.relay(p.Uh.GeneralUserInteraction,this.qR,this,this.mediator)}kR(t=!0){t&&(this.qR.closeAllMenus(),this.qR.resetCaptionsMenu(),this.QL.getCurrentVideoData((t=>{var i;if(this.ZR(t),this.qR.updateCurrentVideo(t),this.GR(t,this.YL.currentQualitySettings),this.Lp.closedCaptionDefault&&t.subtitles){const e=null===(i=t.getDefaultSubtitle())||void 0===i?void 0:i.file;setTimeout((()=>{this.showCaptions(e),this.qR.updateDefaultCaptions(e)}),0)}else this.hideCaptions(),this.qR.updateDefaultCaptions()})),this.qR.updateCaptions()),this.mediator.publish(this,P,{payload:{videoIndex:this.QL.currentVideoIndex}}),this.RR=!1,this.KR()}VB(){this.YR(),this.tD(),this.iD(),this.eD()}sD(){return{logoPosition:this.Lp.logoPosition,logoUrl:this.Lp.logoUrl,isMobile:this.yf.config.isMobile,hasUpNext:this.Lp.upNextMode===$.ProtoPlayerUpNextMode.Next,accentColor:this.Lp.accentColor||m.QO.Connatix,iconsColor:this.Lp.iconsColor||m.QO.Icons,tooltipBackgroundColor:this.Lp.tooltipBackgroundColor||m.QO.Connatix,tooltipTextColor:this.Lp.tooltipTextColor||m.QO.Icons,closeButtonMode:this.Lp.closeButtonMode,floatingCloseButtonMode:this.Lp.floatingSettings.floatingCloseButtonMode,isCloseButton:this.Lp.isCloseButton,uiComponentsVisibility:this.Lp.uiComponentsVisibility,sharingDestinations:this.Lp.sharingDestinations,closedCaptionDefault:this.Lp.closedCaptionDefault,alwaysDisplayControls:this.Lp.alwaysDisplayControls,os:this.yf.config.os.os,sdkVersion:this.yf.config.sdkVersion}}$R(){const t={browser:this.yf.config.browser.browserType,os:this.yf.config.os.os,osVersion:this.yf.config.os.osVersion},i=this.Lp.soundMode===l.ProtoPlayerSoundMode.On&&this.Lp.playbackMode!==l.ProtoPlayerPlaybackModeEnum.ClickToPlay?1:0;this.nD=Ua[this.Lp.videoQuality],this.rD(t,i),this.subscribe(O,this.YL,(({payload:{qualityList:t,videoMeta:i}})=>{this.QL.setAvailableQualitiesForSourceMeta(i,t),this.qR.updateCurrentVideo(i)})),this.subscribe(I,this.YL,(()=>{this.HR.onEnterBuffering()})),this.subscribe(k,this.YL,(()=>{this.HR.onExitBuffering()}))}GR(t,i){const e=t.getAvailableQualities();(0,f.BZ)(e)&&this.qR.updateQuality(t,i)}ZR(t){this.yf.services.MacrosService.setVideoDuration(t.duration),this.yf.services.MacrosService.setVideoTitle(t.title),this.yf.services.MacrosService.setVideoDescription(t.description),this.yf.services.MacrosService.setVideoUrl(t.clickUrl),this.yf.services.MacrosService.setVideoId(t.id)}FR(){this.QL=new $a(this.Lp.playlist),1===this.QL.length&&this.qR.togglePlaylistControls(!1)}VR(){const t=this.sD();this.hD(t),this.qR.updateVolume(this.Lp.soundMode===l.ProtoPlayerSoundMode.On?1:0)}tD(){this.relay(A,this.YL,this,this.mediator),this.subscribe(P,this.YL,(()=>{this.kR()}))}iD(){this.subscribe(v.Timeupdate,this.YL,(({payload:t})=>{this.qR.updateDuration(this.YL.currentTime,this.YL.duration),this.yf.services.MacrosService.setVideoTime(this.YL.currentTime),!this.RR&&t&&(this.RR=!0,this.mediator.publish(this,D.FirstFramePlayed)),this.YL.currentTime!==this.oD&&this.aD(t),this.oD=this.YL.currentTime})),this.subscribe(v.Ended,this.YL,(()=>{this.HR.handleVideoEnd()}))}eD(){this.subscribe(B,this.YL,(({payload:t})=>{this.QL.getCurrentVideoData((i=>{this.GR(i,t)}))})),this.subscribe(E,this.YL,(({payload:t})=>{this.QL.getCurrentVideoData((i=>{const e=i.getAvailableQualities();if((0,f.BZ)(e)){const e=i.getClosestSourceQuality(t);this.nD={quality:y.Strict,height:e.videoHeight},this.mediator.publish(this,E,{payload:e.videoHeight})}}))}))}}const qa=(t,i,e)=>{Ka(e);const s=function(t,i){const e=Wa(t),s=Wa(i),n=e.pop(),r=s.pop(),h=Ya(e,s);return 0!==h?h:n&&r?Ya(n.split("."),r.split(".")):n||r?n?-1:1:0}(t,i);return Xa[e].includes(s)},za=/^[v^~<>=]*?(\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+)(?:\.([x*]|\d+))?(?:-([\da-z\-]+(?:\.[\da-z\-]+)*))?(?:\+[\da-z\-]+(?:\.[\da-z\-]+)*)?)?)?$/i,Wa=t=>{if("string"!=typeof t)throw new TypeError("Invalid argument expected string");const i=t.match(za);if(!i)throw new Error(`Invalid argument not valid semver ('${t}' received)`);return i.shift(),i},Ga=t=>"*"===t||"x"===t||"X"===t,Ja=t=>{const i=parseInt(t,10);return isNaN(i)?t:i},Qa=(t,i)=>{if(Ga(t)||Ga(i))return 0;const[e,s]=((t,i)=>typeof t!=typeof i?[String(t),String(i)]:[t,i])(Ja(t),Ja(i));return e>s?1:e<s?-1:0},Ya=(t,i)=>{for(let e=0;e<Math.max(t.length,i.length);e++){const s=Qa(t[e]||0,i[e]||0);if(0!==s)return s}return 0},Xa={">":[1],">=":[0,1],"=":[0],"<=":[-1,0],"<":[-1]},Za=Object.keys(Xa),Ka=t=>{if("string"!=typeof t)throw new TypeError("Invalid operator type, expected string but got "+typeof t);if(-1===Za.indexOf(t))throw new Error(`Invalid operator, expected one of ${Za.join("|")}`)};var tc;!function(t){t.shouldUseExternalViewabilityService=function(t){return qa(t,"3.0.0","<")},t.showAndroidExpandButton=function(t){return qa(t,"3.2.0",">=")}}(tc||(tc={}));class ic{constructor(t,i=!1){this.zt=t,this.cD=i,this.logoGeneralPosition={top:[$.ProtoLogoPositionMode.TopLeft,$.ProtoLogoPositionMode.TopRight],bottom:[$.ProtoLogoPositionMode.BottomLeft,$.ProtoLogoPositionMode.BottomRight],center:[$.ProtoLogoPositionMode.Center],controlbar:[$.ProtoLogoPositionMode.ControlBar]},this.lD=(t,i="")=>`<cnx class="cnx-ui-btn ${i}">[[${t}]]</cnx>`}dD(t){if(t.indexOf(this.zt.logoPosition)>-1){if(this.zt.logoPosition===$.ProtoLogoPositionMode.ControlBar)return`<cnx class="cnx-ui-btn cnx-d-sm-none cnx-d-md-none cnx-hide-on-volume-hover">[[${Vh.LogoComponent}]]</cnx>`;if(this.zt.logoPosition===$.ProtoLogoPositionMode.TopLeft)return`<cnx class="cnx-logo-bar cnx-logo-top-left">[[${Vh.LogoComponent}]]</cnx>`;if(!1===this.cD||this.zt.logoPosition!==$.ProtoLogoPositionMode.BottomLeft)return`<cnx class="cnx-logo-bar">[[${Vh.LogoComponent}]]</cnx>`}return""}get pD(){return this.zt.uiComponentsVisibility.casting?this.lD(Vh.CastButton):""}get fD(){return(0,f.BZ)(this.zt.sharingDestinations)?this.lD(Vh.ShareButton):""}mD(t){return this.gD()?this.lD(Vh.ExpandButton,t):""}gD(){return!1!==this.zt.uiComponentsVisibility.expandButton&&(!this.zt.isInApp||this.zt.os!==St.M.Android||!!(0,dt.QM)(this.zt.sdkVersion)&&tc.showAndroidExpandButton(this.zt.sdkVersion))}vD(){return this.zt.isInApp?"":`<cnx class="cnx-ui-btn cnx-d-md-none">[[${Vh.SettingsButton}]]</cnx>`}get yD(){return this.zt.uiComponentsVisibility.muteWatermark?'<cnx class="cnx-mute-watermark"><cnx><svg markup-inline class="cnx-color-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M11 2L8.25 4.25 11 7zM0 7v9h5l6 5v-6.5L3.85 7zm17 4.5c0-1.965-1.2-3.735-3-4.5v3l2.8 2.8a3.73 3.73 0 00.2-1.3zm3.4 7.45l-1.85-1.85-2.65-2.6-1.9-1.95-3-3-4.15-4.1-4.95-5L1.45 0 0 1.45 17.15 18.6 19 20.4l3.55 3.6L24 22.55zM14 23a11.83 11.83 0 003.65-1.55l-1.25-1.3c-.747.498-1.553.902-2.4 1.2V23zm9-11.5A11.77 11.77 0 0014 0v1.6A10.53 10.53 0 0120 16l1.45 1.45A11.99 11.99 0 0023 11.5z"/></svg></cnx></cnx>':""}get bD(){return this.zt.isCloseButton?`<cnx class="cnx-ui-btn cnx-d-sm-none cnx-close-button">[[${Vh.CloseButton}]]</cnx>`:""}get xD(){return this.zt.hasUpNext?`[[${Vh.UpNextBox}]]`:""}get wD(){return this.cD?`[[${Vh.LivePoster}]]`:""}_D(t){return t===$.ProtoLogoPositionMode.TopRight&&this.zt.closeButtonMode?"":this.zt.logoPosition===t?"logo-right":""}SD(){return this.zt.closeButtonMode===l.ProtoPlayerCloseButtonMode.AlwaysOn}get AD(){return this.SD()?"":this.bD}get PD(){return this.SD()?this.bD:""}get ID(){return`\n            <cnx class="cnx-ui-gradient-top"></cnx>\n            [[${Vh.QueStateOverlay}]]\n            <cnx class="cnx-ui-head cnx-d-sm-none cnx-ui-bar cnx-lock-bar-on-hover ${this._D($.ProtoLogoPositionMode.TopRight)}">\n                <cnx class="cnx-ui-head-buttons">\n                    ${this.pD}\n                    ${this.fD}\n                    ${this.AD}\n                </cnx>\n                ${this.dD(this.logoGeneralPosition.top)}\n            </cnx>\n            <cnx class="cnx-ui-spacer cnx-d-sm-none"></cnx>\n            <cnx class="cnx-ui-content cnx-ui-bar cnx-center-align"><cnx class="cnx-ui-btn">[[${Vh.BigPlayButton}]]</cnx></cnx>\n            <cnx class="cnx-ui-spacer cnx-d-sm-none"></cnx>\n            <cnx class="cnx-ui-content cnx-ui-bar cnx-d-sm-none cnx-ui-wattermark ${this._D($.ProtoLogoPositionMode.BottomRight)}">\n                ${this.yD}\n                ${this.xD}\n                ${this.dD(this.logoGeneralPosition.bottom)}\n                [[${Vh.CaptionComponent}]]\n            </cnx>\n            <cnx class="cnx-ui-progress cnx-ui-bar cnx-d-sm-none">\n                ${this.kD}\n                <cnx class="cnx-ui-progress-bar">[[${Vh.ProgressBar}]]</cnx>\n                ${this.CD}\n            </cnx>\n            <cnx class="cnx-ui-buttons cnx-ui-bar cnx-lock-bar-on-hover">\n                <cnx class="cnx-ui-btn cnx-hide-on-single-video">[[${Vh.PreviousButton}]]</cnx>\n                <cnx class="cnx-ui-btn">[[${Vh.PlayButton}]]</cnx>\n                <cnx class="cnx-ui-btn cnx-hide-on-single-video">[[${Vh.UpNextButton}]]</cnx>\n                <cnx class="cnx-d-sm-none cnx-d-md-none">[[${Vh.VolumeControls}]]</cnx>\n                <cnx class="cnx-ui-btn cnx-d-sm-none cnx-d-lg-none cnx-d-xl-none">[[${Vh.VolumeButton}]]</cnx>\n                <cnx class="cnx-ui-spacer cnx-d-sm-none"></cnx>\n                <cnx class="cnx-ui-btn cnx-d-sm-none cnx-d-md-none cnx-hide-on-volume-hover">[[${Vh.CaptionButton}]]</cnx>\n                ${this.vD()}\n                ${this.mD("cnx-d-sm-none cnx-hide-on-volume-hover")}\n                ${this.dD(this.logoGeneralPosition.controlbar)}\n            </cnx>\n            <cnx class="cnx-ui-gradient-bottom"></cnx>\n    `.trim()}get TD(){return`\n            [[${Vh.QueStateOverlay}]]\n            <cnx class="cnx-ui-head cnx-d-sm-none cnx-ui-bar ${this._D($.ProtoLogoPositionMode.TopRight)}">\n                <cnx class="cnx-ui-head-buttons">\n                    ${this.pD}\n                    ${this.fD}\n                    <cnx class="cnx-ui-btn ${m.s6.ContextController}">[[${Vh.MoreButton}]]</cnx>\n                    ${this.AD}\n                </cnx>\n                ${this.dD(this.logoGeneralPosition.top)}\n            </cnx>\n            <cnx class="cnx-ui-spacer cnx-d-sm-none"></cnx>\n            <cnx class="cnx-ui-content cnx-ui-bar cnx-center-align">\n                <cnx class="cnx-ui-btn">[[${Vh.BigPlayButton}]]</cnx>\n            </cnx>\n            <cnx class="cnx-ui-content-mobile cnx-ui-bar cnx-vertical-align">\n                <cnx class="cnx-ui-spacer"></cnx>\n                <cnx class="cnx-ui-btn cnx-hide-on-single-video">[[${Vh.PreviousButton}]]</cnx>\n                <cnx class="cnx-ui-spacer"></cnx>\n                <cnx class="cnx-ui-btn">[[${Vh.PlayButton}]]</cnx>\n                <cnx class="cnx-ui-spacer"></cnx>\n                <cnx class="cnx-ui-btn cnx-hide-on-single-video">[[${Vh.UpNextButton}]]</cnx>\n                <cnx class="cnx-ui-spacer"></cnx>\n            </cnx>\n            <cnx class="cnx-ui-spacer cnx-d-sm-none"></cnx>\n            <cnx class="cnx-ui-content cnx-ui-bar cnx-d-sm-none cnx-ui-wattermark">\n                ${this.yD}\n                ${this.xD}\n            </cnx>\n            <cnx class="cnx-mobile-captions-bar cnx-ui-bar ">\n                [[${Vh.CaptionComponent}]]\n            </cnx>\n            <cnx class="cnx-ui-buttons cnx-ui-bar cnx-d-sm-none ">\n                <cnx class="cnx-ui-btn">[[${Vh.VolumeButton}]]</cnx>\n                <cnx class="cnx-ui-progress cnx-ui-bar cnx-d-sm-none">\n                    ${this.MD()}\n                    <cnx class="cnx-ui-progress-bar">[[${Vh.ProgressBar}]]</cnx>\n                </cnx>\n                <cnx class="cnx-ui-btn cnx-d-md-none cnx-d-lg-none">[[${Vh.CaptionButton}]]</cnx>\n                ${this.vD()}\n                ${this.mD()}\n                ${this.dD(this.logoGeneralPosition.controlbar)}\n                ${this.ED}\n            </cnx>\n        `.trim()}get template(){const t=this.zt.isMobile?m.s6.Mobile:"",i=this.zt.isMobile?this.TD:this.ID;return`<cnx class="cnx-ui cnx-ui-video ${this.BD} ${t}">\n                    ${this.wD}\n                    ${this.PD}\n                    ${i}\n                    [[${Vh.QualityMenu}]]\n                    [[${Vh.ContextMenu}]]\n                    [[${Vh.ElementsSettingsMenu}]]\n                    [[${Vh.ElementsCaptionMenu}]]\n                    [[${Vh.Loader}]]\n                </cnx>`.trim()}get kD(){const t=this.MD();return(0,dt.QM)(t)?t:`<cnx class="cnx-ui-progress-label cnx-d-md-none"><cnx-span>[[${Vh.ElapsedTimeLabel}]]</cnx-span></cnx>`}MD(){return this.cD?`[[${Vh.LiveIcon}]]`:""}get CD(){return this.cD?'<cnx class="cnx-ui-progress-label-live cnx-d-md-none"></cnx>':`<cnx class="cnx-ui-progress-label cnx-d-md-none"><cnx-span>[[${Vh.TotalDurationLabel}]]</cnx-span></cnx>`}get ED(){return this.cD&&this.zt.logoPosition===$.ProtoLogoPositionMode.BottomRight?`<cnx class="cnx-live-bottom-logo">[[${Vh.LogoComponent}]]</cnx>`:""}get BD(){return this.cD?"cnx-live":""}}class ec extends Zh{onClick(){this.context.mediator.publish(this.context,_t[_t.OverlayClick])}initState(){super.initState(),this.context.overlayModule.showUiControls()}exitState(){super.exitState()}}class sc extends to{onClick(){}initState(){super.initState(),this.context.overlayModule.disableMouseMove(),this.context.overlayModule.disableHover(),this.context.overlayModule.removeOverlayClickEvents(),this.context.overlayModule.showUiControls(!1)}exitState(){super.exitState(),this.context.overlayModule.enableMouseMove(),this.context.overlayModule.addOverlayClickEvents(),this.context.overlayModule.enableHover()}}class nc extends d._{constructor(t,i,s,n,r,h=!1){super(),this.mediator=t,this.KT=i,this.OD=s,this.LD=n,this.wc=r,this.Jt=h,this.RD=!1,this.DD=3e3,this.jD=!1,this.VD=t=>{"margin-top"!==t.propertyName&&"margin"!==t.propertyName&&"margin-bottom"!==t.propertyName||this.mediator.publish(this,_t[_t.UIShowStart])},this.FD=t=>{"margin-top"!==t.propertyName&&"margin"!==t.propertyName&&"margin-bottom"!==t.propertyName||this.mediator.publish(this,_t[_t.UIEndShowHide])},this.$D=()=>{this.OD&&(this.OD.show(),(0,e.Tp)(this.KT)),(0,e.pv)(this.KT,m.s_.Paused)||this.showUiControls()},this.ND=()=>{this.UD(this.DD)},this.qD=()=>{this.Jt&&this.RD?this.showUiControls():this.mediator.publish(this,_t[_t.OverlayClick])},this.nu=t=>{"transform"===t.propertyName&&(this.OD&&this.OD.hide(),this.KT.removeEventListener("transitionend",this.nu))},this.zD=()=>{this.showUiControls()},this.addOverlayClickEvents=()=>{this.unsubscribe(at.Z[at.Z.Click],this.wc,this.qD),this.subscribe(at.Z[at.Z.Click],this.wc,this.qD)},this.removeOverlayClickEvents=()=>{this.unsubscribe(at.Z[at.Z.Click],this.wc,this.qD)},this.enableMouseMove=()=>{this.LD||this.Jt||this.KT.addEventListener("mousemove",this.zD)},this.disableMouseMove=()=>{this.Jt||this.KT.removeEventListener("mousemove",this.zD)},this.enableHover=()=>{this.LD||(this.Jt?this.KT.addEventListener("touchstart",this.$D,{passive:!0}):(this.KT.addEventListener("mouseenter",this.$D),this.KT.addEventListener("mouseleave",this.ND)))},this.disableHover=()=>{this.Jt?this.KT.removeEventListener("touchstart",this.$D):(this.KT.removeEventListener("mouseenter",this.$D),this.KT.removeEventListener("mouseleave",this.ND)),clearTimeout(this.WD)},i.addEventListener("transitionend",this.FD),i.addEventListener("transitionstart",this.VD),this.Jt||this.GD(i)}GD(t){const i=t.getElementsByClassName("cnx-lock-bar-on-hover");(0,f.Sz)(i).forEach((t=>{t.addEventListener("mouseenter",(()=>{this.uiSticky=!0})),t.addEventListener("mouseleave",(()=>{this.uiSticky=!1}))}))}UD(t){clearTimeout(this.WD),this.WD=setTimeout((()=>{this.hideUiControls()}),t)}showUiControls(t=!0){if(t&&!this.LD&&this.UD(this.DD),this.Jt){const t=(0,e.pv)(this.KT,m.s6.ShowControls);this.RD=!t}!0!==this.JD&&(this.JD=!0,this.KT.removeEventListener("transitionend",this.nu),(0,e.cn)(this.KT,m.s6.ShowControls),this.OD&&this.OD.show())}hideUiControls(){!1===this.JD||this.jD||(this.JD=!1,this.mediator.publish(this,_t[_t.UIHideStart]),this.OD&&this.KT.addEventListener("transitionend",this.nu),(0,e.IV)(this.KT,m.s6.ShowControls))}start(){this.wc.register(this.KT,this,this.wc),this.relay(at.Z[at.Z.Scroll],this.wc,this,this.mediator),this.enableHover(),this.addOverlayClickEvents()}destroy(){this.disableHover(),this.disableMouseMove(),this.unsubscribeAll(this.wc),this.wc.unregisterAll(this),clearTimeout(this.WD)}set uiSticky(t){this.jD=t,!1!==t||this.LD||this.UD(this.DD)}}class rc{constructor(t){this.QD=t}YD(t){return this.QD.filter((i=>t.instance!==i.instance))}XD(t){return this.QD.find((({name:i})=>t===i))}ZD(t){t.forEach((({instance:t})=>{t.isOpen&&t.close()}))}toggleContextMenu(t,i={}){const e=this.XD(t);if(e.instance.isOpen)return e.instance.close(),!1;{const{targetCoordinates:t,holdPause:s}=i,n=t||e.instance.getAnchorCoordinatesTo(e.linkedComponent);return e.instance.open(n,s),this.ZD(this.YD(e)),!0}}isAnyContextMenuOpen(){return!!this.QD.find((({instance:t})=>t.isOpen))}closeContextMenu(t){const i=this.XD(t).instance;i.isOpen&&i.close()}closeAllContextMenus(){this.ZD(this.QD)}}class hc extends Xh{onClick(){}initState(){this.context.$uiContainer.classList.add(m.s_.Loading);const t=this.context.getComponent(Vh.Loader);t&&t.show()}exitState(){this.context.$uiContainer.classList.remove(m.s_.Loading);const t=this.context.getComponent(Vh.Loader);t&&t.hide()}}class oc extends sc{initState(){super.initState(),this.context.overlayModule.hideUiControls()}exitState(){super.exitState()}}class ac extends Xh{onClick(){}initState(){(0,e.MV)(this.context.$uiContainer)}exitState(){(0,e.Ho)(this.context.$uiContainer)}}class cc extends Xh{onClick(){}initState(){this.context.$uiContainer.classList.add(m.s_.Preroll);this.context.getComponent(Vh.QueStateOverlay).show();const t=this.context.getComponent(Vh.UpNextBox);t&&t.hide()}exitState(){this.context.$uiContainer.classList.remove(m.s_.Preroll);this.context.getComponent(Vh.QueStateOverlay).hide()}}class lc extends co{constructor(t,i,e,s,n,r,h={},o,a){super(t,n,i,r,new ma(i,e,n,h,a,s)),this.mediator=t,this.globalDomUtilsService=i,this.interactionService=e,this.resizeObserver=s,this.$container=n,this.settings=h,this.appId=o,this.XT={[b.PlayingState]:new ec(this),[b.PausedState]:new sc(this),[b.BufferingState]:new hc(this),[b.StoppedState]:new oc(this),[b.HiddenState]:new ac(this),[b.PrerollState]:new cc(this),[b.PostrollState]:new cc(this)},this.KD=0,this.tj=null,this.ij=2e3,this.ej=t=>{if(this.yB===m.Rq.Sm)return;t.preventDefault();if(!this.getComponent(Vh.ContextMenu))return;clearTimeout(this.tj),this.nj.closeAllContextMenus();const i={targetCoordinates:{clientX:t.pageX,clientY:t.pageY,height:0,width:0}};this.nj.toggleContextMenu(Vh.ContextMenu,i),this.tj=setTimeout((()=>{this.nj.closeContextMenu(Vh.ContextMenu)}),this.ij)},this.rj=()=>{this.fM.disableTooltips()},this.hj=()=>{this.fM.enableTooltips()},this.qD=()=>{this.nj.isAnyContextMenuOpen()?this.nj.closeAllContextMenus():this.currentState.onClick()},this.oj=()=>{this.nj.closeAllContextMenus()},this.aj=t=>{t.preventDefault()},this.yB=a}cj(){const t=`id_${this.appId}`;this.$uiContainer.id=t;const i=`\n            #${t} .${m.iu.Icons} {\n                fill: ${this.settings.iconsColor};\n                background-color: ${this.settings.iconsColor};\n            }\n            #${t} .${m.iu.AccentColor} {\n                fill: ${this.settings.accentColor};\n                background-color: ${this.settings.accentColor};\n                color: ${this.settings.accentColor};\n                stroke: ${this.settings.accentColor};\n            }\n            #${t} svg.${m.iu.AccentColor} {\n                fill: ${this.settings.accentColor}!important;\n                background-color: ${this.settings.accentColor};\n                color: ${this.settings.accentColor};\n                stroke: ${this.settings.accentColor};\n            }\n            #${t} .${m.iu.TooltipText} {\n                color: ${this.settings.tooltipTextColor};\n            }\n            #${t} .${m.iu.TooltipBackground} {\n                background-color: ${this.settings.tooltipBackgroundColor};\n            }\n            @keyframes ${t}-bar {\n                1% {\n                  fill: transparent; transform: scaleY(1)\n                }\n                30% {fill: ${this.settings.accentColor}; transform: scaleY(1.1)}\n                60% {fill: transparent; transform: scaleY(1)}\n                100% {fill: transparent; transform: scaleY(1)}\n            }\n\n            #${t} .cnx-ui-loader polygon {\n                animation-name: ${t}-bar;\n            }\n        `.trim();this.globalDomUtilsService.addCssString(i)}lj(){const t=[],i=this.getComponent(Vh.ElementsSettingsMenu);i&&t.push({instance:i,linkedComponent:this.getComponent(Vh.MoreButton),name:Vh.ElementsSettingsMenu});const e=this.getComponent(Vh.QualityMenu);e&&t.push({instance:e,linkedComponent:this.getComponent(Vh.SettingsButton),name:Vh.QualityMenu});const s=this.getComponent(Vh.ContextMenu);s&&t.push({instance:s,name:Vh.ContextMenu});const n=this.getComponent(Vh.ElementsCaptionMenu);n&&t.push({instance:n,linkedComponent:this.getComponent(Vh.CaptionButton),name:Vh.ElementsCaptionMenu}),this.nj=new rc(t)}uj(){this.overlayModule=new nc(this,this.$uiContainer,this.getComponent(Vh.ProgressBar),this.settings.alwaysDisplayControls,this.interactionService,this.settings.isMobile),this.subscribe(_t[_t.OverlayClick],this.overlayModule,this.qD),this.subscribe(_t[_t.UIHideStart],this.overlayModule,this.oj),this.subscribe(_t[_t.UIShowStart],this.overlayModule,this.rj),this.subscribe(_t[_t.UIEndShowHide],this.overlayModule,this.hj),this.subscribe(at.Z[at.Z.Scroll],this.overlayModule,(()=>{this.dj(at.Z[at.Z.Scroll])})),this.overlayModule.start()}pj(t){this.yB!==m.Rq.Lg&&t||this.mj.forEach((i=>{t?(0,e.cn)(i,m.Gj.Invisible):(0,e.IV)(i,m.Gj.Invisible)}))}gj(t){t?(0,e.cn)(this.$uiContainer,m.s6.Muted):(0,e.IV)(this.$uiContainer,m.s6.Muted)}vj(t){const i=this.getComponent(Vh.CaptionButton),e=this.getComponent(Vh.ElementsSettingsMenu);t?(i&&i.showComponent(),e&&e.showCaptionOption()):(i&&i.hideComponent(),e&&e.hideCaptionOption())}handleComponentEvent(t,i,e){switch(super.handleComponentEvent(t,i,e),this.dj(t),t){case _t[_t.DraggingStart]:this.overlayModule.uiSticky=!0;break;case _t[_t.DraggingStopped]:this.overlayModule.uiSticky=!1;break;case Vh[Vh.UpNextButton]:this.mediator.publish(this,_t[_t.Next],i);break;case Vh[Vh.PreviousButton]:this.mediator.publish(this,_t[_t.Prev],i);break;case _t[_t.Seek]:const e=0,s=100,n=0,r=this.KD;this.mediator.publish(this,_t[_t.Seek],{payload:(0,di.dQ)(e,s,n,r,i.payload)});break;case _t[_t.Mute]:this.gj(!0),this.mediator.publish(this,_t[_t.Volume],{payload:0});break;case _t[_t.Unmute]:this.gj(!1),this.mediator.publish(this,_t[_t.Volume],{payload:1});break;case _t[_t.Volume]:this.gj(!i.payload),this.mediator.publish(this,_t[_t.Volume],i);break;case _t[_t.VolumeHoverStart]:this.pj(!0);break;case _t[_t.VolumeHoverStopped]:this.pj(!1);break;case _t[_t.Settings]:this.nj.toggleContextMenu(Vh.QualityMenu);break;case _t[_t.Quality]:i.payload&&this.mediator.publish(this,_t[_t.Quality],{payload:i.payload});break;case Vh[Vh.MoreButton]:this.nj.toggleContextMenu(Vh.ElementsSettingsMenu);break;case Vh[Vh.CloseButton]:this.mediator.publish(this,_t[_t.Close]);break;case _t[_t.AboutClick]:this.globalDomUtilsService.open(Js.br,Pt.bS.Blank);break;case _t[_t.ContextMenuClose]:this.overlayModule.uiSticky=!1;break;case _t[_t.ContextMenuOpen]:this.overlayModule.uiSticky=!0;break;case _t[_t.CaptionMenu]:if(i.payload)this.mediator.publish(this,i.payload.event,{payload:i.payload.data}),this.isCaptionMenuInsideSettings()&&this.nj.toggleContextMenu(Vh.ElementsSettingsMenu);else{if(this.isCaptionMenuInsideSettings()){const t=this.getComponent(Vh.ElementsSettingsMenu);return void(null==t||t.updateMenu())}this.nj.toggleContextMenu(Vh.ElementsCaptionMenu)}break;default:this.mediator.publish(this,t,i)}}dj(t){let i;switch(t){case at.Z[at.Z.Scroll]:i=l.ProtoMediaClickTypeEnum.ScrollClick;break;case _t[_t.Volume]:i=l.ProtoMediaClickTypeEnum.VolumeClick;break;case Vh[Vh.PlayButton]:case Vh[Vh.BigPlayButton]:case Vh[Vh.ClickToPlayButton]:case _t[_t.Play]:i=l.ProtoMediaClickTypeEnum.PlayClick;break;case _t[_t.Pause]:i=l.ProtoMediaClickTypeEnum.PauseClick;break;case Vh[Vh.UpNextButton]:i=l.ProtoMediaClickTypeEnum.NextClick;break;case _t[_t.Prev]:case Vh[Vh.PreviousButton]:i=l.ProtoMediaClickTypeEnum.PreviousClick;break;case _t[_t.Mute]:i=l.ProtoMediaClickTypeEnum.MuteClick;break;case _t[_t.Unmute]:i=l.ProtoMediaClickTypeEnum.UnmuteClick;break;case _t[_t.Close]:case Vh[Vh.CloseButton]:i=l.ProtoMediaClickTypeEnum.CloseClick;break;case _t[_t.CaptionOff]:case _t[_t.CaptionOn]:i=l.ProtoMediaClickTypeEnum.SubtitleClick;break;case _t[_t.Expand]:i=l.ProtoMediaClickTypeEnum.FullScreenClick;break;case _t[_t.Collapse]:i=l.ProtoMediaClickTypeEnum.ExitFullScreenClick}void 0!==i&&this.mediator.publish(this,p.Uh.GeneralUserInteraction,{payload:{mediaClick:!0,type:i}})}updateUpNextBox(t,i){const e=this.getComponent(Vh.UpNextBox);e&&e.updateCard(t,i)}updateVolume(t){this.gj(!t);const i=this.getComponent(Vh.VolumeButton),e=this.getComponent(Vh.VolumeControls);e?e.setVolume(t):i&&i.setState(t>0?ia.Unmute:ia.Mute)}updateDuration(t,i){super.updateDuration(t,i),this.KD=i;const e=this.getComponent(Vh.UpNextBox);e&&(i-t<=5?e.isInView()||e.show():e.isInView()&&e.hide())}updateCaptions(t){const i=this.getComponent(Vh.CaptionComponent);i&&i.updateCaptions(t)}updateDefaultCaptions(t){const i=this.isCaptionMenuInsideSettings()?this.getComponent(Vh.ElementsSettingsMenu):this.getComponent(Vh.ElementsCaptionMenu);null==i||i.updateCaptionSelection(t)}toggleCaptionState(t){const i=this.getComponent(Vh.CaptionButton),e=this.getComponent(Vh.ElementsSettingsMenu);i&&i.isActive!==t&&(i.isActive=t),e&&e.toggleCaptionState(t)}updateQuality(t,i){const e=this.getComponent(Vh.SettingsButton),s=t.getClosestSourceQuality(i.height).isHD;e&&e.toggleHDFlag(s);const n=this.getComponent(Vh.QualityMenu);n&&n.updateQuality(i)}changeState(t){super.changeState(t)}onResize(t){this.yB=t;const i=this.getComponent(Vh.QualityMenu),e=this.getComponent(Vh.SettingsButton);i&&e&&i.onResize(e.getCoordinates());const s=this.getComponent(Vh.ContextMenu);s&&s.onResize();const n=this.getComponent(Vh.ElementsCaptionMenu),r=this.getComponent(Vh.CaptionButton);if(n&&n.onResize(r.getCoordinates()),this.settings.isMobile){const t=this.getComponent(Vh.ElementsSettingsMenu),i=this.getComponent(Vh.MoreButton);t&&i&&t.onResize(t.getAnchorCoordinatesTo(i),this.yB)}}updateCurrentVideo(t){const i=t.getAvailableQualities(),e=this.getComponent(Vh.QualityMenu);e&&e.createQualityMenu(i);const s=t.getThumbnailUrl(this.$uiContainer.clientWidth,this.$uiContainer.clientHeight);if(this.mediator.publish(this,R,{payload:{thumbnailUrl:s}}),this.vj(!!t.subtitles),t.subtitles)if(this.isCaptionMenuInsideSettings()){const i=this.getComponent(Vh.ElementsSettingsMenu);i&&i.createCaptionsMenu(t.subtitles)}else{const i=this.getComponent(Vh.ElementsCaptionMenu);i&&i.createCaptionsMenu(t.subtitles)}}togglePlaylistControls(t){const i=this.$uiContainer.getElementsByClassName(m.Gj.HideOnSingleVideo);(0,f.Sz)(i).forEach((i=>{t?(0,e.Ho)(i):(0,e.MV)(i)}))}toggleExpandButtonDisplay(t){const i=this.getComponent(Vh.ExpandButton);i&&(t?i.showComponent():i.hideComponent())}start(){try{this.uj(),this.lj(),this.yj(),this.$container.addEventListener("mousedown",this.aj),this.mj=(0,f.Sz)(this.$uiContainer.getElementsByClassName(m.Gj.HideOnVolumeHover)),this.settings.isMobile||this.$uiContainer.addEventListener("contextmenu",this.ej),this.cj()}catch(t){(0,s.n)({message:"BaseUiContent_start",exception:t.message,callStack:t.stack,level:s.D.CRITICAL})}}destroy(){super.destroy(),this.$container.removeEventListener("mousedown",this.aj)}closeAllMenus(){this.nj.closeAllContextMenus()}resetCaptionsMenu(){if(this.isCaptionMenuInsideSettings()){const t=this.getComponent(Vh.ElementsSettingsMenu);t&&t.reset()}}isCaptionMenuInsideSettings(){return this.settings.isMobile&&this.yB===m.Rq.Lg}}class uc extends oc{initState(){super.initState();const t=this.context.getComponent(Vh.BigPlayButton);t&&t.toggleReplay(!0)}exitState(){super.exitState();const t=this.context.getComponent(Vh.BigPlayButton);t&&t.toggleReplay(!1)}}class dc extends lc{constructor(){super(...arguments),this.bj={[b.ReplayState]:new uc(this)}}start(){this.XT=Object.assign(Object.assign({},this.XT),this.bj),super.start()}yj(){this.XT[b.StoppedState].enterState()}}class pc{constructor(t){this.xj=[{id:x.H264,extension:"mp4",type:"video/mp4"},{id:x.Hevc,extension:"mp4",type:"video/mp4"}],this.ic=this.xj.find((i=>i.id===t))}get type(){const t=this.ic.codecs?`codecs=${this.ic.codecs}`:"";return`${this.ic.type}; ${t}`}get id(){return this.ic.id}}class fc{constructor(t,i){this.Fl=t,this.Sl=i,this.wj={quality:y.Auto,height:360},this.resizeObserverBinded=!1,this._j=new It.x,this.Sj=new Dt.X(this.wj),this.Aj=30,this.Yl=()=>{const t=this.Sl.clientHeight;if(this.Pj(t)&&this.currentQualitySettings.quality===y.Auto){const i={height:t,quality:y.Auto};this.setCurrentQualitySettings(i),this.Sj.next(i)}}}setCurrentQualitySettings(t){this.wj.quality=t.quality,this.wj.height!==t.height&&(this.wj.height=t.height,this._j.next())}Pj(t){return!this.wj.height||t/this.wj.height*100-100>this.Aj}addResizeObserver(){this.resizeObserverBinded=!0,this.Fl.on(this.Sl,this.Yl)}removeResizeObserver(){this.resizeObserverBinded=!1,this.Fl.off(this.Sl,this.Yl)}setQuality(t){t.quality===y.Auto?this.resizeObserverBinded||(this.setCurrentQualitySettings({height:t.height,quality:t.quality}),this.addResizeObserver(),this.Yl()):(this.resizeObserverBinded&&this.removeResizeObserver(),this.setCurrentQualitySettings(t)),this.Sj.next(this.wj)}get currentQualitySettings(){return this.wj}get onQualityChange(){return this._j.asObservable()}get onCurrentQuality(){return this.Sj.asObservable()}destroy(){this.removeResizeObserver()}}class mc{constructor(t,i){this.xc=t,this.rb=i,this.Ij=new It.x,this._j=new It.x,this.Sj=new It.x,this.onTrackLoaded=this.Ij.asObservable(),this.onQualityChange=this._j.asObservable(),this.onCurrentQuality=this.Sj.asObservable(),this.kj=()=>{this.Ij.next()}}Cj(t){this.Tj=t}Mj(t){this.rb.innerHTML="",t.forEach((t=>{this.rb.appendChild(t)}))}Ej(){return this.Bj}Oj(t){var i;if(null===(i=this.Bj)||void 0===i||i.remove(),this.Bj=null,this.Tj&&this.Tj.subtitles&&t){this.rb.childNodes.forEach((t=>{"track"===t.nodeName.toLowerCase()&&t.remove()}));const i=this.xc.createElement("track");i.src=t.file,i.srclang=t.code,i.label=t.title,i.kind="subtitle",i.default=!0,i.addEventListener("load",this.kj,!1),i.addEventListener("loaded",this.kj,!1),this.rb.appendChild(i),this.Bj=i}}}var gc,vc,yc;!function(t){t[t.MP4=0]="MP4",t[t.HLS=1]="HLS"}(gc||(gc={}));class bc extends mc{constructor(t,i,e,s,n={},r){super(t,s),this.Fl=i,this.ff=e,this.nD=r,this.kL=[],this.Lj=null,this.Rj=10.13,this.handlerType=gc.MP4,this.Dj=this.jj(n)}start(){try{this.Vj=new fc(this.Fl,this.ff),this.kl(),this.setQuality(this.nD)}catch(t){(0,s.n)({message:"Mp4SourceHandler_start",exception:t.message,callStack:t.stack,level:s.D.CRITICAL})}}onQualityChanged(){return this.attachMedia()}setSource(t,i=!1){this.Cj(t),this.Fj(this.$j(),i)}setQuality(t){this.Vj.setQuality(t)}get currentQualitySettings(){return this.Vj.currentQualitySettings}attachMedia(){return new Promise((t=>{this.Nj(),t()}))}detachMedia(){this.rb.removeAttribute("src"),this.Fj(null)}destroy(){this.Vj.destroy(),(0,jt.i)(this.kL)}updateSubtitleTrackSource(t){this.Oj(t)}kl(){const t=this.Vj.onCurrentQuality.subscribe((t=>this.Sj.next(t))),i=this.Vj.onQualityChange.subscribe((()=>this.Uj(this.Vj.currentQualitySettings.height)));this.kL.push(t,i)}Uj(t){this.Fj(this.$j()),this._j.next(t)}Hj(t){this.Mj(t),this.rb.load()}$j(){return[...this.qj(),...this.Ej()?[this.Ej()]:[]]}qj(){if(!this.rb||!this.Tj)return[];const t=[];return this.Tj.getSources(this.Vj.currentQualitySettings.height,this.Dj).forEach((i=>{const e=this.xc.createElement("source");e.src=i.src,e.type=i.type,t.push(e)})),t}Nj(){this.Lj&&(this.Hj(this.Lj),this.Lj=null)}Fj(t,i=!1){this.Lj=t,i&&this.Nj()}jj(t){let i;switch(t.os){case St.M.Ios:i=[x.Hevc,x.H264];break;case St.M.Mac:i=t.osVersion>this.Rj&&t.browser===Pt.lI.Safari?[x.Hevc,x.H264]:[x.H264];break;default:i=[x.H264]}return i.map((t=>new pc(t)))}}!function(t){t.UnexpectedError="unexpectedError",t.BufferingError="bufferingError",t.FragBuffered="fragBuffered",t.ManifestLoaded="manifestLoaded",t.LevelSwitching="levelSwitching",t.StreamEnded="streamEnded"}(vc||(vc={})),function(t){t.Http="http",t.Https="https"}(yc||(yc={}));const xc={enableWorker:!1,capLevelToPlayerSize:!0,cnxRenderWindow:window,maxBufferSize:5e6,maxBufferLength:5,maxMaxBufferLength:10,liveBackBufferLength:0};class wc extends mc{constructor(t,i,e,s,n,r,h,o,a){super(t,i),this.sb=e,this.zj=s,this.nD=n,this.Wj=r,this.pd=h,this.Jj=o,this.Qj=a,this.Yj=new It.x,this.onHlsEvent=this.Yj.asObservable(),this.ob=[],this.Xj=y.Auto,this.Zj=320,this.Kj=!1,this.tV=!1,this.iV=!1,this.handlerType=gc.HLS,this.eV=new Dt.X(0),this.sV=!1,this.ub=()=>{this.lb.off(this.sb.Events.MEDIA_ATTACHED,this.ub);const t=this.nV(this.rV);this.lb.loadSource(t),this.lb.once(this.sb.Events.MANIFEST_PARSED,this.pb)},this.pb=()=>{this.lb.off(this.sb.Events.MANIFEST_PARSED,this.pb),this.lb.on(this.sb.Events.LEVEL_SWITCHING,this.hV),this.lb.on(this.sb.Events.LEVEL_SWITCHED,this.aV),this.lb.on(this.sb.Events.FRAG_BUFFERED,this.cV),this.lb.on(this.sb.Events.FRAG_LOADING,this.lV),this.lb.on(this.sb.Events.FRAG_LOADED,this.uV),this.lb.on(this.sb.Events.BUFFER_APPENDING,this.dV),this.lb.on(this.sb.Events.BUFFER_APPENDED,this.pV),this.lb.on(this.sb.Events.BUFFER_EOS,this.fV),this.rV=null,this.fb(),this.mV(),this.gV(),this.vV.resolve()},this.yV=()=>{this.rV=null,this.rb.removeEventListener(v.LoadedMetadata,this.yV),this.bV.resolve()},this.mV=()=>{const t=this.ob.map((t=>({videoHeight:t.height,isHD:t.height>=720,label:t.level.toString()})));this.Yj.next({type:vc.ManifestLoaded,payload:{qualityList:t}})},this.cV=()=>{this.Yj.next({type:vc.FragBuffered})},this.lV=()=>{this.Kj=!0},this.uV=()=>{this.Kj=!1},this.dV=()=>{this.tV=!0},this.pV=()=>{this.tV=!1},this.fV=()=>{this.Yj.next({type:vc.StreamEnded})},this.ab=(t,i)=>{if(i.details===this.sb.ErrorDetails.BUFFER_STALLED_ERROR&&(this.Kj||this.tV?this.Yj.next({type:vc.BufferingError}):(this.iV||(this.shouldRecoverMediaError()&&this.lb.recoverMediaError(),this.rb.play().then((()=>{this.iV=!1})).catch((()=>{this.iV=!1}))),this.iV=!0)),i.fatal)switch(i.type){case this.sb.ErrorTypes.NETWORK_ERROR:if(i.details===this.sb.ErrorDetails.MANIFEST_PARSING_ERROR)return void this.xV("hls_network_error_manifest_parsing_error_FATAL");if(i.details===this.sb.ErrorDetails.MANIFEST_LOAD_ERROR)return void this.Yj.next({type:vc.UnexpectedError});if(i.details===this.sb.ErrorDetails.LEVEL_LOAD_ERROR&&this.eV.next(this.eV.value+1),this.sV)return this.fV(),void(this.sV=!1);this.lb.startLoad();break;case this.sb.ErrorTypes.MEDIA_ERROR:this.lb.recoverMediaError();break;default:this.xV("hls_unexpected_error_FATAL",`type_${i.type}_details_${i.details}`)}else i.type===this.sb.ErrorTypes.MEDIA_ERROR&&i.details===this.sb.ErrorDetails.BUFFER_APPENDING_ERROR&&this.xV("hls_media_error_buffer_appending_error"),i.type===this.sb.ErrorTypes.NETWORK_ERROR&&i.details===this.sb.ErrorDetails.MANIFEST_PARSING_ERROR&&this.xV("hls_network_error_manifest_parsing_error")},this.wV=()=>{this.xV("hls_video_tag_error",`code_${this.rb.error.code}_message_${this.rb.error.message}`)},this.aV=(t,i)=>{this.Zj=this.ob.find((t=>t.level===i.level)).height,this._j.next(this.currentQualitySettings.height),this.Sj.next(this.currentQualitySettings)},this.hV=()=>{this.Yj.next({type:vc.LevelSwitching})},this.sb.isSupported()&&(this.lb=this._V(),this.Wj&&(this.lb.autoLevelCapping=1)),this.Zj=this.nD.height,this.Xj=this.nD.quality}start(){}get liveSyncPosition(){if(this.lb)return this.lb.liveSyncPosition}setSource(t,i=!1){this.SV=t.id,this.Cj(t),this.rV=t,i&&this.attachMedia()}attachMedia(){return!this.lb&&this.sb.isSupported()&&(this.lb=this._V()),new Promise((t=>{if(this.lb?this.lb.on(this.sb.Events.ERROR,this.ab):this.rb.addEventListener(v.Error,this.wV),this.initLiveStreamRetry(),this.rV){const i=this.Ej()?[this.Ej()]:[];this.Mj(i),this.lb?this.AV().then((()=>{t()})):this.PV().then((()=>{t()}))}else t()}))}detachMedia(){this.ob=[],this.lb?(this.lb.detachMedia(),this.destroy()):(this.rb.removeAttribute("src"),this.rb.removeEventListener(v.LoadedMetadata,this.yV),this.rb.removeEventListener(v.Error,this.wV))}setQuality(t){this.Xj=t.quality,this.Zj=t.height,this.lb&&this.gV(),this._j.next(this.currentQualitySettings.height),this.Sj.next(this.currentQualitySettings)}get currentQualitySettings(){return{quality:this.Xj,height:this.Zj}}onQualityChanged(){return new Promise((()=>{}))}shouldRecoverMediaError(){return!(this.Jj&&this.Qj)}destroy(){this.lb?(this.kV(),this.lb.destroy(),this.lb=null):(this.rb.removeEventListener(v.LoadedMetadata,this.yV),this.rb.removeEventListener(v.Error,this.wV))}updateSubtitleTrackSource(t){this.Oj(t)}AV(){return this.vV=new At.C,this.lb.attachMedia(this.rb),this.lb.once(this.sb.Events.MEDIA_ATTACHED,this.ub),this.vV.promise}PV(){return this.bV=new At.C,this.rb.src=this.nV(this.rV),this.rb.addEventListener(v.LoadedMetadata,this.yV),this.bV.promise}kV(){this.lb.off(this.sb.Events.MEDIA_ATTACHED,this.ub),this.lb.off(this.sb.Events.MANIFEST_PARSED,this.pb),this.lb.off(this.sb.Events.ERROR,this.ab),this.lb.off(this.sb.Events.LEVEL_SWITCHING,this.hV),this.lb.off(this.sb.Events.LEVEL_SWITCHED,this.aV),this.lb.off(this.sb.Events.FRAG_BUFFERED,this.cV),this.lb.off(this.sb.Events.FRAG_LOADING,this.lV),this.lb.off(this.sb.Events.FRAG_LOADED,this.uV),this.lb.off(this.sb.Events.BUFFER_APPENDING,this.dV),this.lb.off(this.sb.Events.BUFFER_APPENDED,this.pV),this.lb.off(this.sb.Events.BUFFER_EOS,this.fV)}fb(){this.lb.levels.forEach(((t,i)=>{this.Wj&&i>1||this.ob.find((({height:i})=>i===t.height))||this.ob.push({level:i,height:t.height})}))}xV(t,i){(0,s.n)({message:t,exception:this.SV,level:s.D.WARN,callStack:i}),this.Yj.next({type:vc.UnexpectedError})}gV(){if(this.Xj===y.Auto)this.lb.currentLevel=-1;else try{this.lb.currentLevel=this.ob.find((t=>t.height===this.Zj)).level}catch(t){(0,s.n)({message:"HlsSourceHandler_quality_not_present_in_hls_manifest",exception:t.message,callStack:t.stack,level:s.D.CRITICAL})}}nV(t){try{const i=t.getHlsSource(),e=(0,pi.bx)(i);return e&&e.protocol?this.pd.appendParamsToUrl(i):this.pd.appendParamsToUrl(`${this.zj}:${i}`)}catch(t){(0,s.n)({exception:t.message,message:"HlsSourceHandler_undefined_sourceMeta",level:s.D.CRITICAL,callStack:t.stack},{throttle:5,sendMaxLog:!1})}}_V(){return new this.sb(Object.assign(Object.assign({},xc),{cnxRenderWindow:this.xc.global}))}initLiveStreamRetry(){var t;null===(t=this.CV)||void 0===t||t.unsubscribe(),this.CV=this.eV.pipe(function(t){for(var i,e,s=[],n=1;n<arguments.length;n++)s[n-1]=arguments[n];var r=null!==(i=Nr(s))&&void 0!==i?i:ze,h=null!==(e=s[0])&&void 0!==e?e:null,o=s[1]||1/0;return(0,br.e)((function(i,e){var s=[],n=!1,a=function(t){var i=t.buffer;t.subs.unsubscribe(),(0,Ne.P)(s,t),e.next(i),n&&c()},c=function(){if(s){var i=new Ve.w0;e.add(i);var n={buffer:[],subs:i};s.push(n),Rr(i,r,(function(){return a(n)}),t)}};null!==h&&h>=0?Rr(e,r,c,h,!0):n=!0,c();var l=(0,xr.x)(e,(function(t){var i,e,n=s.slice();try{for(var r=(0,je.XA)(n),h=r.next();!h.done;h=r.next()){var c=h.value,l=c.buffer;l.push(t),o<=l.length&&a(c)}}catch(t){i={error:t}}finally{try{h&&!h.done&&(e=r.return)&&e.call(r)}finally{if(i)throw i.error}}}),(function(){for(;null==s?void 0:s.length;)e.next(s.shift().buffer);null==l||l.unsubscribe(),e.complete(),e.unsubscribe()}),void 0,(function(){return s=null}));i.subscribe(l)}))}(5e3),(0,Jr.h)((t=>t.length<3))).subscribe((()=>{this.sV=!0,this.eV.next(0)}))}}var _c;!function(t){t.Disabled="disabled",t.Hidden="hidden",t.Showing="showing"}(_c||(_c={}));class Sc{constructor(t,i,n,r){this.rb=t,this.kb=i,this.yf=r,this.TV=!1,this.EV=!1,this.BV=_c.Hidden,this.Cb=!1,this.OV=new It.x,this.LV=!1,this.RV=t=>{let i=!1;switch(t.type){case v.Play:if(!this.Cb&&this.yf.config.isInAppAndroid)return void this.pause();this.TV=!0;break;case v.Playing:clearTimeout(this.DV),this.yf.config.os.os===St.M.Ios&&this.LV&&((0,e.UR)(this.rb),this.LV=!1),this.jV(),this.OV.next({type:t.type});break;case v.Timeupdate:this.VV()&&(i=this.FV(t.type)),this.OV.next({type:t.type,payload:{payload:this.TV,isCorruptedCurrentTime:i}});break;case v.Ended:this.OV.next({type:t.type,payload:{isCorruptedCurrentTime:i}});break;case v.Seeked:i=this.FV(t.type),this.OV.next({type:t.type,payload:{isCorruptedCurrentTime:i}});break;case v.Error:clearTimeout(this.DV);const s=this.rb.error?this.rb.error.message:"";this.OV.next({type:t.type,payload:{payload:s}});break;case v.LoadedMetadata:this.EV=!0,(0,dt.kE)(this.$V)&&(this.currentTime=this.$V,this.$V=null),this.OV.next({type:t.type});break;case v.Pause:clearTimeout(this.DV),this.OV.next({type:t.type});break;default:this.OV.next({type:t.type})}},this.play=()=>{this.Cb=!0,clearTimeout(this.DV),this.DV=setTimeout((()=>{this.OV.next({type:v.Error,payload:{payload:"play_timeout"}})}),25e3),this.rb.play().catch((t=>{(0,s.n)({message:"ContentPlayer_play_promise_catch",exception:t,level:s.D.INFO})}))},this.pause=()=>{clearTimeout(this.DV),this.rb.pause(),this.TV=!1,this.Cb=!1},this.volume=n,this.kl()}get videoEvents(){return this.OV.asObservable()}kl(){this.kb.forEach((t=>{this.rb.addEventListener(t,this.RV)}))}FV(t){return this.yf.config.os.os===St.M.Ios&&this.rb.currentTime>this.rb.duration&&((0,e.UR)(this.rb),(0,s.n)({message:"ContentPlayer__CorruptedCurrentTime",callStack:`Event type: ${t}`,level:s.D.WARN},{throttle:10}),!0)}VV(){return this.rb.currentTime-this.rb.duration>.1}jV(){this.rb.textTracks&&0!==this.rb.textTracks.length&&Object.keys(this.rb.textTracks).forEach((t=>{this.BV===this.rb.textTracks[t].mode&&(this.rb.textTracks[t].mode=this.BV===_c.Hidden?_c.Disabled:_c.Hidden),this.rb.textTracks[t].mode=this.BV}))}setUnfreeze(){this.LV=!0}set poster(t){(0,dt.QM)(t)&&(this.rb.poster=t)}get poster(){return this.rb.poster}get volume(){return this.Vl}set volume(t){this.Vl=t<=1?t:t/100,this.rb.volume=this.Vl,(0,e.Q1)(this.rb,this.Vl)}get currentTime(){return this.rb.currentTime}set currentTime(t){this.EV?this.rb.currentTime=t:this.$V=t}get duration(){return this.rb.duration}get playing(){return this.TV}destroy(){this.kb.forEach((t=>{this.rb.removeEventListener(t,this.RV)}))}setTrackModes(t){this.BV=t,this.jV()}setMetaLoaded(t){this.EV=t}setCrossOriginAttribute(){this.rb.getAttribute("crossorigin")||this.rb.setAttribute("crossorigin","anonymous")}setPoster(t){this.poster=t.getThumbnailUrl(this.rb.clientWidth,this.rb.clientHeight)}getCurrentTrack(){return this.rb.textTracks&&0!==this.rb.textTracks.length?this.rb.textTracks[0]:null}}const Ac={height:0,quality:y.Auto};var Pc=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function h(t){try{a(s.next(t))}catch(t){r(t)}}function o(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(h,o)}a((s=s.apply(t,i||[])).next())}))};class Ic extends d._{constructor(t,i,e,s,n,r,h={},o,a){super(),this.mediator=t,this.yf=i,this.xc=e,this.ff=s,this.Fl=n,this.NV=r,this.ic=h,this.iR=o,this.nD=a,this.Qj=!1,this.UV=!0,this.PL=!1,this.HV=!1,this.Ob=new It.x,this.fd=.01,this.kL=[],this.qV=t=>{var i;const e={[vc.LevelSwitching]:C,[vc.StreamEnded]:T,[vc.FragBuffered]:k,[vc.BufferingError]:I}[t.type];if((0,dt.QM)(e))this.mediator.publish(this,e);else{if(t.type===vc.UnexpectedError)return this.HV=!0,void this.zV();if(t.type===vc.ManifestLoaded){const e=null===(i=t.payload)||void 0===i?void 0:i.qualityList;this.mediator.publish(this,O,{payload:{qualityList:e,videoMeta:this.WV}}),this.GV.setMetaLoaded(!0)}}},this.JV=()=>{let t;this.currentTrack.activeCues&&this.currentTrack.activeCues.length>0&&(t=this.currentTrack.activeCues[0]),this.mediator.publish(this,_t[_t.CaptionUpdate],{payload:t})},this.kj=()=>{this.currentTrack&&(this.currentTrack.mode=this.QV?_c.Hidden:_c.Disabled,this.currentTrack.oncuechange=this.JV)},this.YV(),this.XV.appendChild(this.rb),this.ff.appendChild(this.XV),this.nD=this.nD||Ac,this.ZV=new bc(e,this.Fl,this.ff,this.rb,this.ic,this.nD),this.yf.config.os.os===St.M.Ios&&this.yf.services.ViewabilityService.on(this.rb,((t,i)=>{!i&&t||this.GV.setUnfreeze()}),{threshold:this.fd})}initHlsSourceHandler(t){const i=this.xc.isHttpsProtocolUsed()?yc.Https:yc.Http,e=(0,dt.QM)(this.yf.config.bundleID);this.Fb=new wc(this.xc,this.rb,t,i,this.nD,e,this.yf.services.UrlSuffixerService,this.yf.config.browser.browserType===Pt.lI.Safari,this.Qj)}KV(){return Pc(this,void 0,void 0,(function*(){if(this.Fb)return!0;const t=yield Hn();return t&&t.isSupported()||(i=this.rb,(0,dt.QM)(i.canPlayType("application/vnd.apple.mpegurl")))?(this.initHlsSourceHandler(t),this.tF(),this.iF(),!0):(this.UV=!1,(0,s.n)({message:"Hls_not_supported",level:s.D.INFO}),!1);var i}))}get onVideoEvents(){return this.Ob.asObservable()}start(){try{this.kb=Object.values(v),this.GV=new Sc(this.rb,this.kb,this.NV,this.yf),this.eF(),this.tF(),this.sF()}catch(t){(0,s.n)({message:"VideoHandler_start",exception:t.message,callStack:t.stack,level:s.D.CRITICAL})}}zV(){this.nF=this.currentTime,this.setSource(this.WV,!0,!0),this.rF.attachMedia().then((()=>{this.GV.play()})).catch((t=>{this.HV=!1,this.Ob.next(v.Error),(0,s.n)({message:"VideoHandler_hls_error_attach_media",exception:t.message,callStack:t.callStack,level:s.D.CRITICAL})}))}iF(){this.kL.push(this.Fb.onHlsEvent.subscribe((t=>this.qV(t))))}eF(){this.hF(this.ZV)}tF(){this.Fb&&this.hF(this.Fb)}hF(t){t.start(),this.oF(t)}sF(){this.GV.videoEvents.subscribe((t=>{if(t.payload&&t.payload.isCorruptedCurrentTime)this.rF.handlerType===gc.HLS&&this.zV();else{if(t.type===v.Canplay&&this.iR&&(this.currentTime=this.iR,this.iR=null),this.Ob.next(t.type),this.HV&&(this.HV=!1,t.type===v.Playing&&(this.GV.currentTime=this.nF)),t.type===v.Error)return(0,s.n)({message:"VideoHandler_play_error_event",exception:t.payload.payload,level:s.D.WARN}),void this.mediator.publish(this,A,t.payload);this.mediator.publish(this,t.type,t.payload)}}))}oF(t){this.kL.push(t.onTrackLoaded.subscribe((()=>this.kj())),t.onQualityChange.subscribe((t=>this.onQualityChanged(t))),t.onCurrentQuality.subscribe((t=>{this.mediator.publish(this,B,{payload:t})})))}aF(t,i=!1){return Pc(this,void 0,void 0,(function*(){if(i)this.cF();else{if(t){if(yield this.KV())return void(this.rF=this.Fb)}this.cF()}}))}get width(){return this.XV.getBoundingClientRect().width}get height(){return this.XV.getBoundingClientRect().height}get currentTime(){return this.GV.currentTime}set currentTime(t){this.GV.currentTime=t}forceCurrentTime(t){this.GV.currentTime=t,this.iR=t}get duration(){return this.GV.duration}get volume(){return this.GV.volume}set volume(t){this.GV.volume=t}get playing(){return this.GV.playing}get isIosFullscreen(){return this.PL}set isIosFullscreen(t){this.PL=t,this.PL&&this.QV?this.lF():this.uF()}get currentQualitySettings(){var t;return null===(t=this.rF)||void 0===t?void 0:t.currentQualitySettings}hide(){(0,e.cn)(this.XV,m.pT)}show(){(0,e.IV)(this.XV,m.pT)}setSource(t,i=!1,e=!1){return Pc(this,void 0,void 0,(function*(){try{this.WV=t,this.rF&&this.rF.detachMedia();const s=(0,dt.QM)(t.hlsFilePath);return yield this.aF(s,e),t&&t.subtitles&&this.GV.setCrossOriginAttribute(),this.GV.setPoster(t),this.GV.setTrackModes(this.QV?_c.Hidden:_c.Disabled),i&&this.GV.setMetaLoaded(!1),this.rF.setSource(t,!0),void this.mediator.publish(this,P)}catch(t){return void(0,s.n)({message:"VideoHandler_set_video_source",exception:t.message,callStack:t.stack,level:s.D.CRITICAL})}}))}setQuality(t){this.rF.setQuality(t)}pause(){this.GV.pause(),this.Ob.next(v.Pause)}play(){var t;return this.dF=new At.C,null===(t=this.rF)||void 0===t||t.attachMedia().then((()=>{this.GV.play()})).catch((t=>{this.Ob.next(v.Error),(0,s.n)({message:"VideoHandler_public_play_attach_media_error",exception:t.message,callStack:t.callStack,level:s.D.CRITICAL})})),this.dF.promise}hasSubtitles(){return(0,f.BZ)(this.WV.subtitles)}getSubtitles(){return this.WV.subtitles}toggleCaptions(){this.rF.updateSubtitleTrackSource(this.WV.getDefaultSubtitle()),this.QV=!0,this.GV.setTrackModes(_c.Hidden)}showCaptions(t){this.rF.updateSubtitleTrackSource(this.WV.subtitles.find((i=>i.file===t))),this.QV=!0,this.GV.setTrackModes(_c.Hidden)}hideCaptions(){this.rF.updateSubtitleTrackSource(),this.QV=!1,this.GV.setTrackModes(_c.Disabled),this.mediator.publish(this,_t[_t.CaptionUpdate])}destroy(){this.rF.destroy(),this.XV.parentNode.removeChild(this.XV)}YV(){this.XV=this.xc.createElementByString('<cnx class="cnx-video-wrapper"></cnx>'),this.rb=this.xc.createElementByString('<video class="cnx-video-tag"></video>'),this.ic.os===St.M.Ios&&(this.rb.setAttribute("playsinline",""),this.rb.setAttribute("webkit-playsinline",""))}cF(){this.rF=this.ZV,this.rF.setQuality({quality:y.Auto,height:0})}onQualityChanged(t){const i=this.GV.playing;this.iR=this.currentTime,i&&this.rF.onQualityChanged&&this.rF.onQualityChanged().then((()=>{this.GV.setMetaLoaded(!1),this.GV.play()})),this.mediator.publish(this,E,{payload:t})}get currentTrack(){return this.GV.getCurrentTrack()}lF(){this.currentTrack&&(this.currentTrack.oncuechange=null,this.mediator.publish(this,_t[_t.CaptionUpdate]),this.currentTrack.mode=_c.Showing)}uF(){if(this.currentTrack){switch(this.currentTrack.mode){case _c.Showing:case _c.Hidden:this.QV=!0;break;case _c.Disabled:this.QV=!1}this.mediator.publish(this,this.QV?_t[_t.CaptionOn]:_t[_t.CaptionOff])}this.kj()}}var kc=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function h(t){try{a(s.next(t))}catch(t){r(t)}}function o(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(h,o)}a((s=s.apply(t,i||[])).next())}))};const Cc=168,Tc=91;class Mc extends Ha{constructor(){super(...arguments),this.pF=!1,this.jy=l.ProtoQuartilesEnum.Start,this.fF=new Map}start(){const t=Object.create(null,{start:{get:()=>super.start}});return kc(this,void 0,void 0,(function*(){t.start.call(this),this.jR.next(!0),this.YL.start();try{yield this.zR()}catch(t){}finally{this.JR()}}))}getCurrentVideoIndex(){return this.QL.currentVideoIndex}getPlaylistLenght(){return this.QL.length}hD(t){t=Object.assign(Object.assign({},t),{isInApp:(0,dt.QM)(this.yf.config.bundleID)});const i=new ic(t,!1);this.qR=new dc(this,this.yf.services.GlobalDomUtilsService,this.yf.services.InteractionService,this.yf.services.ResizeObserver,this.ff,i.template,t,this.yf.config.appId,this.yB),this.qR.start()}aD(t){this.Lp.upNextMode===$.ProtoPlayerUpNextMode.Next&&this.YL.duration-this.YL.currentTime<=6&&!this.pF&&(this.pF=!0,this.QL.getVideoData(this.QL.nextVideoIndex,(t=>{const i=t.getThumbnailUrl(Cc,Tc);this.qR.updateUpNextBox(i,t.description)}))),this.mF(this.YL.currentTime,this.YL.duration)}KR(){this.pF=!1,this.jy=l.ProtoQuartilesEnum.Start}QR(){switch(this.Lp.upNextMode){case $.ProtoPlayerUpNextMode.Loop:this.gF();break;case $.ProtoPlayerUpNextMode.Next:this.vF(),this.NR.streamFormat=ja.Autochain;break;case $.ProtoPlayerUpNextMode.Stop:this.HR.stop(),this.qR.changeState(b.ReplayState)}}JR(){const{preRollBreak:t,postRollBreak:i}=this.Lp,e=(0,dt.r)(t),s=(0,dt.r)(i);this.HR=new Va(this,this.QL,this.YL,e,s,this.yf.config.os.os===St.M.Ios,this.Lp.videoPosition),super.JR()}YR(){super.YR(),this.subscribe(_t[_t.Replay],this.qR,(()=>{this.mediator.publish(this,p.Uh.UserInteraction,{payload:{playback:!0}}),this.gF()})),this.subscribe(_t[_t.Next],this.qR,(()=>{this.mediator.publish(this,p.Uh.UserInteraction,{payload:{playback:!0,clickedNext:!0}}),this.vF(),this.NR.streamFormat=ja.UserInitiated})),this.subscribe(_t[_t.Prev],this.qR,(()=>{this.mediator.publish(this,p.Uh.UserInteraction,{payload:{playback:!0,clickedPrev:!0}}),this.yF()}))}rD(t,i){this.YL=new Ic(this,this.yf,this.yf.services.GlobalDomUtilsService,this.ff,this.yf.services.ResizeObserver,i,t,this.Lp.videoPosition,this.nD)}bF(t,i){return i&&t?Math.floor((0,di.dQ)(0,i,0,4,t)):l.ProtoQuartilesEnum.Start}mF(t,i){const e=this.bF(t,i);e>l.ProtoQuartilesEnum.Start&&e!==this.jy&&(this.fF.get(e)||(this.mediator.publish(this,D.ContentQuartiles,{payload:e}),this.fF.set(e,!0)),this.jy=e)}yF(){this.setVideo(this.QL.prevVideoIndex,!0),this.NR.streamFormat=ja.UserInitiated}vF(){this.setVideo(this.QL.nextVideoIndex)}kR(t=!0){super.kR(t),this.fF.clear()}gF(){this.HR.replay(),this.kR(!1)}}var Ec=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function h(t){try{a(s.next(t))}catch(t){r(t)}}function o(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(h,o)}a((s=s.apply(t,i||[])).next())}))};class Bc extends La{constructor(){super(...arguments),this.xF=!0}start(){const t=Object.create(null,{start:{get:()=>super.start}});return Ec(this,void 0,void 0,(function*(){try{t.start.call(this),this.wF()}catch(t){(0,s.n)({message:"VideoExperience_start",exception:t.message,callStack:t.stack,level:s.D.CRITICAL})}}))}nextVideo(){let t=this.mL.getCurrentVideoIndex();t+1>=this.mL.getPlaylistLenght()?this.changeVideo(0,!1):this.changeVideo(++t,!1)}prevVideo(){let t=this.mL.getCurrentVideoIndex();0!==t?this.changeVideo(--t,!1):this.changeVideo(this.mL.getPlaylistLenght()-1,!1)}getVideoIndex(){return this.mL.getCurrentVideoIndex()}setVideoIndex(t){t>=this.mL.getPlaylistLenght()||!(0,dt.r)(t+1)?console.error("The index provided is out of bounds! Please provide a valid video index!"):this.mL.setVideo(t)}destroy(){this.unsubscribeAll(this._F),super.destroy()}setVideoPosition(t){t>this.duration||!(0,dt.r)(t)&&0!==t?console.error("The timestamp provided is out of bounds! Please provide a valid timestamp!"):this.currentTime=t}Op(){this.gp.isInAdPod()?this.Rp((()=>{super.Op(),this.vp.onAdFinished(this.adHandler.linearInImpression,li.LINEAR,this.gp.isInAdPod());this.mL.show(!0)})):(super.Op(),this.mL.show(this.xF),this.xF=!0)}ks(){super.ks(),this.SF&&this.AF(),this._F&&this._F.onResize(this.$experienceContainer.clientWidth)}generateHTML(){super.generateHTML(),this.Lp.gallery&&this.PF()}LL(){this.mL=new Mc(this,this.Lp,this.app,this.$playerContainer,this.breakPointsHandler.currentBreakpointClass)}AF(){this.Lp.gallery.orientation===$.ProtoGalleryOrientationEnum.Landscape&&(0,e.T7)(this.SF,{height:`${this.$playerWrapper.clientHeight}px`})}PF(){this.SF=this.app.services.GlobalDomUtilsService.createElementByString('<cnx class="cnx-g-container"></cnx>'),this.$experienceContainer.appendChild(this.SF);const t=this.Lp.gallery.orientation===$.ProtoGalleryOrientationEnum.Landscape?m.s6.GalleryLandscape:m.s6.GalleryPortrait;(0,e.cn)(this.$experienceContainer,t)}wF(){this.Lp.gallery&&(this._F=new xt(this,this.app.services.ResizeObserver,this.app.services.GlobalDomUtilsService,this.app.services.InteractionService,this.SF,this.app.config.device,this.Lp.gallery.style,this.Lp.gallery.orientation,this.Lp.playlist),this.subscribe(D.ChangeVideo,this._F,(({payload:{videoIndex:t}})=>{this.xF=!this.mL.isHidden,this.gp.endPod(),this.changeVideo(t,!0),this.mL.getVideoData(t,(t=>{this.mediator.publish(this,j.GalleryCardClicked,{payload:this.NL(t)}),this.app.services.TrackingService.trackMediaClick(l.ProtoMediaClickTypeEnum.GalleryClick)})),this.ep()})),this.subscribe(P,this.mL,(({payload:{videoIndex:t}})=>{this._F.setCurrentIndex(t)})),this.subscribe(D.VideoQueued,this.mL,(({payload:{videoIndex:t}})=>{this._F.setCurrentIndex(t)})),this.subscribe(at.Z[at.Z.Scroll],this._F,(()=>{this.app.services.TrackingService.trackMediaClick(l.ProtoMediaClickTypeEnum.ScrollClick)})),this._F.start(),this._F.onResize(this.$experienceContainer.clientWidth))}}class Oc{constructor(){this.wf={}}on(t,i){if(this.wf[t]=this.wf[t]||[],!(0,dt.mf)(i))throw new Error(`${t} event callback is not a function`);return this.wf[t].push(i),()=>this.wf[t]=this.wf[t].filter((t=>t!==i))}once(t,i){const e=this.on(t,(t=>{try{i(t)}catch(t){}e()}))}remove(t,i){this.wf[t]&&(this.wf[t]=this.wf[t].filter((t=>t!==i)))}removeAll(){this.wf={}}trigger(t,i){this.wf[t]&&this.wf[t].forEach((t=>{try{t(i)}catch(t){}}))}}class Lc extends class{constructor(t){this.experience=t,this.IF=(t,i)=>this.da.on(t,i),this.kF=(t,i)=>{this.da.remove(t,i)},this.CF=()=>{this.da.removeAll()},this.TF=(t,i)=>{this.da.once(t,i)},this.MF=()=>this.experience.isViewable(),this.EF=t=>{this.experience.setViewableThreshold(t)},this.BF=()=>{this.experience.play()},this.OF=()=>{this.experience.pause()},this.LF=()=>this.experience.getVolume(),this.RF=t=>{this.experience.setVolume(t)},this.Cu=()=>{this.experience.triggerDestroy()},this.DF=()=>{this.experience.disableAdvertising()},this.jF=()=>{this.experience.enableAdvertising()},this.VF=()=>{this.experience.enableFloatingMode()},this.FF=()=>{this.experience.disableFloatingMode()},this.$F=()=>this.experience.isFloatingModeEnabled(),this.Tu=t=>{this.experience.setFloatingSettings(t)},this.NF=t=>{this.experience.setCustomMacros(t)},this.UF=t=>{this.experience.setAmpUserConsent(t)},this.da=new Oc}trigger(t,i){this.da.trigger(t,i)}setDestroyed(){this.trigger(Tt.Km.Removed)}getApiMethods(){return{on:this.IF,remove:this.kF,removeAll:this.CF,once:this.TF,isViewable:this.MF,setViewableThreshold:this.EF,play:this.BF,pause:this.OF,getVolume:this.LF,setVolume:this.RF,disableAdvertising:this.DF,enableAdvertising:this.jF,enableFloatingMode:this.VF,disableFloatingMode:this.FF,isFloatingModeEnabled:this.$F,setFloatingSettings:this.Tu,setMacros:this.NF,setAmpUserConsent:this.UF,destroy:this.Cu}}}{constructor(){super(...arguments),this.HF=()=>this.experience.type,this.vv=()=>this.experience.getSize(),this.qF=(t,i)=>{this.experience.setSize(t,i)}}getApiMethods(){return Object.assign(Object.assign({},super.getApiMethods()),{getPlayerType:this.HF,getSize:this.vv,setSize:this.qF})}}class Rc extends Lc{constructor(t){super(t),this.experience=t,this.zF=()=>this.experience.getVideoDetails(),this.WF=()=>this.experience.getPlaylistId(),this.JF=()=>this.experience.currentTime,this.QF=t=>{this.experience.setVideoPosition(t)},this.YF=()=>this.experience.duration,this.ZF=t=>{this.experience.toggleFullscreen(t)},this.KF=t=>{t?this.experience.toggleCaptions():this.experience.hideCaptions()},this.t$=()=>this.experience.getSubtitles(),this.i$=t=>{t&&t.file?this.experience.showCaptions(t.file):this.experience.hideCaptions()},this.e$=t=>{this.experience.toggleExpandButton(t)},this.s$=()=>this.experience.getQuality(),this.n$=t=>{this.experience.setQuality(t)},this.r$=()=>{this.experience.setAutoQuality()},this.h$=()=>this.experience.getAvailableQualities(),this.o$=()=>{this.experience.nextVideo()},this.a$=()=>{this.experience.prevVideo()},this.c$=t=>{this.experience.setPreRollBreak(t)},this.l$=t=>{this.experience.setPostRollBreak(t)},this.u$=()=>this.experience.getVideoIndex(),this.d$=t=>{this.experience.setVideoIndex(t)}}getApiMethods(){return Object.assign(Object.assign({},super.getApiMethods()),{getVideoDetails:this.zF,getVideoCurrentPosition:this.JF,setVideoPosition:this.QF,getVideoDuration:this.YF,toggleFullscreen:this.ZF,toggleSubtitles:this.KF,getSubtitles:this.t$,setSubtitle:this.i$,toggleFullscreenButton:this.e$,getPlaylistId:this.WF,getQuality:this.s$,setQuality:this.n$,setAutoQuality:this.r$,getAvailableQualities:this.h$,nextVideo:this.o$,prevVideo:this.a$,setPreRollBreak:this.c$,setPostRollBreak:this.l$,getVideoIndex:this.u$,setVideoIndex:this.d$})}}class Dc extends no{constructor(t,i,e,s,n={},r){super(t,i,e,r,new ma(e,s,i,n)),this.mediator=t,this.$container=i,this.XT={},this.$uiContainer.style.backgroundColor=`${n.backgroundColor}`}handleComponentEvent(t){switch(t){case Vh[Vh.CloseButton]:this.mediator.publish(this,_t[_t.Close]);break;case _t[_t.Expand]:this.mediator.publish(this,_t[_t.Expand]);break;case _t[_t.Collapse]:this.mediator.publish(this,_t[_t.Collapse])}}}class jc extends ic{_D(t){switch(t){case $.ProtoLogoPositionMode.BottomLeft:return"ui-home-screen-logo-bottom-left";case $.ProtoLogoPositionMode.BottomRight:return"ui-home-screen-logo-bottom-right";case $.ProtoLogoPositionMode.TopLeft:return"ui-home-screen-logo-top-left";case $.ProtoLogoPositionMode.TopRight:return this.zt.isCloseButton?"ui-home-screen-logo-top-left":"ui-home-screen-logo-top-right";case $.ProtoLogoPositionMode.Center:return"ui-home-screen-logo-center";default:return}}dD(){return`<cnx class="cnx-logo-bar ${this._D(this.zt.logoPosition)}">[[${Vh.LogoOutstream}]]</cnx>`}get template(){var t,i;return`\n        <cnx class="cnx-ui cnx-ui-home-screen">\n        ${this.dD()}\n            <cnx class="cnx-ui-bar">\n                <cnx class="cnx-ui-head-buttons">\n                    ${this.AD}\n                </cnx>\n                ${this.PD}\n            </cnx>\n          ${(null===(i=null===(t=this.zt)||void 0===t?void 0:t.uiComponentsVisibility)||void 0===i?void 0:i.expandButton)?`<cnx class="cnx-ad-expand-button cnx-ui-btn">[[${Vh.ExpandButton}]]</cnx>`:""}\n        </cnx>`.trim()}}class Vc extends Aa{constructor(){super(...arguments),this.p$=[],this.enterFullScreen=()=>{this.OL.enterFullScreen().then().catch((t=>{(0,s.n)({level:s.D.WARN,message:"OutstreamAdHandler_enterFullscreen"})}))},this.exitFullscreen=()=>{this.OL.exitFullScreen()},this.zp=()=>{this.mediator.publish(this,Tt.Zr.FullscreenChanged,{payload:!1}),this.mediator.publish(this,_t[_t.Collapse],{payload:!1}),this.yf.services.InteractionService.enableScrollEvent(),this.yf.services.EventsStorageService.emitOnExitFullscreen(),this.linearAdUserInterface.collapse(),this.setVastViewMode(Vt.zc.Normal)},this.qp=()=>{this.mediator.publish(this,Tt.Zr.FullscreenChanged,{payload:!0}),this.mediator.publish(this,_t[_t.Expand],{payload:!1}),this.yf.services.InteractionService.disableScrollEvent(),this.yf.services.EventsStorageService.emitOnEnterFullscreen(),this.linearAdUserInterface.expand(),this.setVastViewMode(Vt.zc.Fullscreen)}}initFullScreen(){this.OL=new kt(this.yf.services.GlobalDomUtilsService,this.Wf.parentElement,this.yf.config.os.os),this.JL()}JL(){this.p$.push(this.onFullcreenChange.subscribe((t=>{t===_t.Expand?this.enterFullScreen():this.exitFullscreen()}))),this.$L()}$L(){const t=this.OL.onFullScreenEnter.subscribe((()=>this.qp())),i=this.OL.onFullScreenExit.subscribe((()=>this.zp()));this.p$.push(i,t)}destroy(){super.destroy(),(0,jt.i)(this.p$)}sO(){return!1}}var Fc=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function h(t){try{a(s.next(t))}catch(t){r(t)}}function o(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(h,o)}a((s=s.apply(t,i||[])).next())}))};class $c extends Ea{constructor(){super(...arguments),this.events=Object.assign(Object.assign({},Tt.Km),V),this.f$=!1,this.m$=!1,this.g$=!1,this.v$=t=>{"max-height"===t.propertyName&&(this.$experienceContainer.removeEventListener("transitionend",this.v$),this.handleClose())}}wp(){return new Vc(this,this.Lp,this.$playerContainer,this.checkFloatingViewability(this.isViewable()),this.gp,this.app,this.pd,ci.None)}y$(){this.adHandler&&this.adHandler.linearInImpression?this.f$=!0:this.b$()}b$(){this.adHandler&&this.unsubscribeAll(this.adHandler),this.vp.onContentStop(),this.Lp.outstreamSettings.endAdBreakPolicy===$.ProtoOutstreamEndAdBreakPolicyEnum.Hide&&this.x$(!0),this.mediator.publish(this,V.AdCycleComplete)}w$(){const t={logoPosition:this.Lp.logoPosition,logoUrl:this.Lp.logoUrl,isCloseButton:this.Lp.isCloseButton,closeButtonMode:this.Lp.closeButtonMode,backgroundColor:this.Lp.outstreamSettings.houseScreenBackgroundColor,uiComponentsVisibility:{expandButton:this.Lp.uiComponentsVisibility.expandButton&&this.app.config.os.os!==St.M.Ios}},i=new jc(t).template;this._$=new Dc(this,this.$playerContainer,this.app.services.GlobalDomUtilsService,this.app.services.InteractionService,t,i),this.subscribe(_t[_t.Close],this._$,(()=>{this.handleClose()})),this.subscribe(_t[_t.Expand],this._$,(()=>{this.adHandler.enterFullScreen()})),this.subscribe(_t[_t.Collapse],this._$,(()=>{this.adHandler.exitFullscreen()}))}S$(){this.g$&&((0,e.IV)(this.$experienceContainer,m.s6.Collapsed),this.mediator.publish(this,V.Collapsed,{payload:!1}),this.g$=!1,this.lp())}x$(t=!1){if(!this.g$){if(t){const t=setTimeout((()=>{this.$experienceContainer.removeEventListener("transitionend",this.v$),this.handleClose()}),1e3);this.$experienceContainer.addEventListener("transitionend",(i=>{clearTimeout(t),this.v$(i)}))}(0,e.cn)(this.$experienceContainer,m.s6.Collapsed),this.mediator.publish(this,V.Collapsed,{payload:!0}),this.g$=!0,this.cp()}}A$(){this.$experienceContainer.style.maxHeight=`${this.$playerContainer.clientHeight}px`}P$(){this._$&&this._$.hide()}I$(){this._$&&this._$.show()}handleClose(){this.triggerDestroy()}ks(){super.ks(),this.A$()}Ep(t=!1){super.Ep(t),this.f$&&this.b$()}Fu(t,i=!1){super.Fu(t,i),!this.m$&&t&&(this.m$=!0,this.C$())}Op(){this.gp.isInAdPod()?this.Rp((()=>{this.vp.onAdFinished(this.adHandler.linearInImpression,li.LINEAR,this.gp.isInAdPod()),super.Op(),this.I$(),this.gp.setNewBreak($.ProtoAdSlotsEnum.MidRoll)})):(super.Op(),this.gp.setNewBreak($.ProtoAdSlotsEnum.MidRoll),this.I$())}Mp(){super.Mp(),this.P$()}addPlayerSize(){super.addPlayerSize(),this.Lp.playerSize.responsive?this.$playerWrapper.appendChild(this.Wp()):this.setFixedSize(this.$playerWrapper)}$p(){}C$(){var t;if(this.Lp.adPlaybackMode===$.ProtoAdPlaybackMode.ScrollToPlay&&!this.m$)return;this.up($.ProtoAdSlotsEnum.MidRoll);null===(t=this.adHandler)||void 0===t||t.contentPlaybackStateChanged(true),this.vp.contentPlaybackStateChanged(true)}mp(){this.np(ni.I.Standalone)}T$(){}start(){const t=Object.create(null,{start:{get:()=>super.start}});var i,n;return Fc(this,void 0,void 0,(function*(){try{t.start.call(this),this.Vp(),this.adHandler?(this.adHandler.start(this.$playerContainer.clientWidth,this.$playerContainer.clientHeight,this.Lp.soundMode===$.ProtoPlayerSoundMode.On?1:0,this.Lp.uiComponentsVisibility.expandButton&&this.app.config.os.os!==St.M.Ios,!1),this.adHandler.initFullScreen(),this.vp.forceRecheck(),null===(i=this.adHandler)||void 0===i||i.onVpaidEvent.subscribe((t=>{t.type===Vt.fI.AdImpression&&this.S$()})),null===(n=this.adHandler)||void 0===n||n.onLinearUiComponentEvent.subscribe((t=>{switch(t.type){case _t.Volume:const{volume:i}=t.payload;this.ys(i);break;case _t.Expand:this.expand();break;case _t.Collapse:this.collapse()}}))):this.x$(),this.C$(),this.subscribe(zt,this.vp,(()=>{this.y$()})),this.subscribe(Wt,this.vp,(()=>{this.y$()})),this.Lp.outstreamSettings.initialRendering===$.ProtoOutstreamInitialRenderingEnum.ExpandWithAd&&(this.x$(),(0,e.Tp)(this.$playerContainer)),(0,e.cn)(this.$experienceContainer,m.Gj.Collapsable),this.A$(),this.Lp.outstreamAdAsContent||this.w$()}catch(t){(0,s.n)({message:"Outsream_start",exception:t.message,callStack:t.stack,level:s.D.CRITICAL})}}))}getVolume(){if(this.adHandler)return this.adHandler.getLinearVolume()}get currentTime(){return 0}get duration(){return 0}destroy(){super.destroy(),this._$&&this._$.destroy()}expand(){var t;null===(t=this._$)||void 0===t||t.getComponent(Vh.ExpandButton).setState(ho.expand)}collapse(){var t;null===(t=this._$)||void 0===t||t.getComponent(Vh.ExpandButton).setState(ho.collapse)}}class Nc extends Va{play(){if(this.M$)return this.SR=b.PlayingState,this.M$=!1,void this.wR();super.play()}pause(t=!1){this.xR(b.LiveStreamEnded)||this.xR(b.LiveStreamStarting)||this.xR(b.LiveStreamStopped)||(t&&(this.M$=!0),super.pause())}endOfStream(){this.pause(),this.handleVideoEnd()}enterLiveNotSupported(){this.vR(b.LiveStreamNotSupported)}enterLiveStreamStopped(){this.vR(b.LiveStreamStopped)}cR(){this.lR=b.LiveStreamStarting,this.uR=b.LiveStreamStarting}IR(){this.vR(b.LiveStreamEnded)}yR(){this.YL.pause(),this.vR(b.LiveStreamStopped)}}class Uc extends Xh{initState(){const t=this.context.getComponent(Vh.LivePoster);t.setMessageToStarting(),t.show(),this.context.overlayModule.removeOverlayClickEvents(),this.context.overlayModule.disableHover()}exitState(){this.context.getComponent(Vh.LivePoster).hide(),this.context.setFullProgressBarUI(),this.context.overlayModule.addOverlayClickEvents(),this.context.overlayModule.enableHover()}}class Hc extends Xh{initState(){const t=this.context.getComponent(Vh.LivePoster);this.context.$uiContainer.classList.add(m.s_.LiveEnded),t.setIconToEnded(),t.setMessageToEnded(),t.show();const i=this.context.getComponent(Vh.LiveIcon);null==i||i.hideComponent(),this.context.overlayModule.removeOverlayClickEvents(),this.context.overlayModule.disableHover()}exitState(){}}class qc extends sc{initState(){super.initState();const t=this.context.getComponent(Vh.LivePoster);t.hideMessage(),t.show();const i=this.context.getComponent(Vh.LiveIcon);null==i||i.showComponent()}exitState(){super.exitState();const t=this.context.getComponent(Vh.LivePoster);t.hide(),t.showMessage()}}class zc extends Xh{initState(){const t=this.context.getComponent(Vh.LivePoster);(0,e.cn)(this.context.$uiContainer,m.s_.LiveEnded),t.setMessageToNotSupported(),t.show(),this.context.overlayModule.hideUiControls(),this.context.overlayModule.destroy()}exitState(){}}class Wc extends lc{constructor(){super(...arguments),this.E$={[b.LiveStreamStarting]:new Uc(this),[b.LiveStreamEnded]:new Hc(this),[b.LiveStreamStopped]:new qc(this),[b.LiveStreamNotSupported]:new zc(this)}}start(){this.XT=Object.assign(Object.assign({},this.XT),this.E$),super.start()}onResize(t){super.onResize(t),this.setFullProgressBarUI()}updateDuration(){this.setFullProgressBarUI()}setFullProgressBarUI(){const t=this.getComponent(Vh.ProgressBar);t&&t.setProgress(100)}yj(){this.XT[b.LiveStreamStarting].enterState()}updateCurrentVideo(t){super.updateCurrentVideo(t);const i=this.getComponent(Vh.LivePoster);if(i){const e=t.getThumbnailUrl(this.$uiContainer.clientWidth,this.$uiContainer.clientHeight);i.setPosterSrc(e),i.setPosterAltText(t.altText),(0,dt.QM)(t.startDate)&&i.handleDelayedStart(t.startDate)}}}class Gc extends Ic{constructor(){super(...arguments),this.Qj=!0}play(){const t=this.rF.liveSyncPosition;return t&&(this.GV.currentTime=t),super.play()}endOfStream(){this.rF.detachMedia()}get hlsSupported(){return this.UV}zV(){this.dF&&this.dF.isPending&&this.dF.reject(),this.rF.detachMedia(),this.mediator.publish(this,M)}initHlsSourceHandler(t){super.initHlsSourceHandler(t)}}var Jc=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function h(t){try{a(s.next(t))}catch(t){r(t)}}function o(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(h,o)}a((s=s.apply(t,i||[])).next())}))};class Qc extends Ha{constructor(){super(...arguments),this.B$=!1,this.O$=()=>{this.QL.getCurrentVideoData((()=>{this.YL.onVideoEvents.pipe((0,Jr.h)((t=>t===v.Playing&&!this.B$)),Ra(1),Yr((()=>this.B$=!0))).subscribe((()=>{this.HR.enterLiveStreamStopped(),this.YL.pause(),this.jR.next(!0)})),this.YL.play().catch((()=>{}))})),this.YL.play()},this.L$=()=>{this.HR.endOfStream(),this.YL.endOfStream()}}start(){const t=Object.create(null,{start:{get:()=>super.start}});return Jc(this,void 0,void 0,(function*(){t.start.call(this),this.R$(),this.D$(),this.JR(),this.YL.hlsSupported?(this.YL.start(),this.zR().then((()=>{this.O$()}))):this.HR.enterLiveNotSupported()}))}destroy(){this.j$(),this.V$(),super.destroy()}R$(){this.subscribe(T,this.YL,this.L$),this.subscribe(C,this.YL,(()=>{this.HR.onEnterBuffering()}))}D$(){this.relay(R,this.qR,this,this.mediator)}hD(t){const i=new ic(t,!0);this.qR=new Wc(this,this.yf.services.GlobalDomUtilsService,this.yf.services.InteractionService,this.yf.services.ResizeObserver,this.ff,i.template,t,this.yf.config.appId,this.yB),this.qR.start()}aD(t){this.F$(t)}KR(){}QR(){}JR(){const{preRollBreak:t,postRollBreak:i}=this.Lp,e=(0,dt.r)(t),s=(0,dt.r)(i);this.HR=new Nc(this,this.QL,this.YL,e,s,this.yf.config.os.os===St.M.Ios,this.Lp.videoPosition),super.JR()}$R(){super.$R(),this.subscribe(M,this.YL,(()=>{clearTimeout(this.$$),this.$$=setTimeout(this.O$,10*oi.s_)}))}rD(t,i){this.YL=new Gc(this,this.yf,this.yf.services.GlobalDomUtilsService,this.ff,this.yf.services.ResizeObserver,i,t,this.Lp.videoPosition)}F$(t){this.j$(),t&&(this.N$=setInterval((()=>{this.HR.isInPlayingState()&&(this.L$(),this.j$())}),10*oi.s_))}j$(){this.N$&&(clearInterval(this.N$),this.N$=null)}V$(){this.$$&&(clearInterval(this.$$),this.$$=null)}}var Yc,Xc,Zc=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function h(t){try{a(s.next(t))}catch(t){r(t)}}function o(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(h,o)}a((s=s.apply(t,i||[])).next())}))};class Kc extends La{start(){const t=Object.create(null,{start:{get:()=>super.start}});return Zc(this,void 0,void 0,(function*(){try{t.start.call(this)}catch(t){(0,s.n)({message:"LiveExperience_start",exception:t.message,callStack:t.stack,level:s.D.CRITICAL})}}))}LL(){this.mL=new Qc(this,this.Lp,this.app,this.$playerContainer,this.breakPointsHandler.currentBreakpointClass)}Op(){this.gp.isInAdPod()?this.Rp((()=>{super.Op(),this.vp.onAdFinished(this.adHandler.linearInImpression,li.LINEAR,this.gp.isInAdPod()),this.mL.show(true)})):(super.Op(),this.mL.show(true))}jL(){super.jL(),this.subscribe(R,this.mL,(({payload:{thumbnailUrl:t}})=>{this.adHandler&&this.adHandler.setAdLoadingBackgroundUrl(t)}))}}class tl extends Lc{}class il extends S{constructor(){super(...arguments),this.Ia="cnx-el"}createExperience(t,i){t.isInStreamType()?(this.experience=new Bc(this,i,this.app.services.UrlSuffixerService),this.experienceApi=new Rc(this.experience)):t.isLiveType()?(this.experience=new Kc(this,i,this.app.services.UrlSuffixerService),this.experienceApi=new Rc(this.experience)):(this.experience=new $c(this,i,this.app.services.UrlSuffixerService),this.experienceApi=new tl(this.experience))}isSupportedBreakpoint(t){return!0}subscribeToEvents(){super.subscribeToEvents(),this.playerModel.html&&this.subscribe(D.MediaMetaUpdate,this.experience,(({payload:{title:t,description:i}})=>{this.updateMacroContent(this.macroElements.title,t),this.updateMacroContent(this.macroElements.description,i)}))}getApiMethods(){return this.experienceApi.getApiMethods()}}class el{constructor(){this.U$=[],this.H$=0,this.q$=!1,this.z$=t=>{this.U$.forEach((i=>{t&&t!==i.element||this.W$(i,this.H$)}))}}J$(t){let i=this.U$.find((i=>i.element===t));return i||(i={element:t,list:[],cachedPercentInView:0},this.U$.push(i)),i.list}W$(t,i){t.list.forEach((t=>{!t.callbackSent&&t.threshold<=i?(t.callbackSent=!0,t.timeout=(0,pi.ld)(t.callback,t.callbackDelay,!0,this.q$)):t.callbackSent&&t.threshold>i&&(t.callbackSent=!1,clearTimeout(t.timeout),t.timeout=(0,pi.ld)(t.callback,0,!1,this.q$))}))}on(t,i,e){this.J$(t).push({threshold:e.threshold,callbackSent:!1,callbackDelay:e.callbackDelay,timeout:null,callback:i}),this.z$()}off(t,i){const e=this.U$.find((i=>i.element===t));if(e){for(let t=e.list.length;t--;)e.list[t].callback===i&&e.list.splice(t,1);0===e.list.length&&this.U$.splice(this.U$.indexOf(e))}}check(t={threshold:.1}){return this.H$>=t.threshold}triggerRecheck(t){this.z$(t)}Q$(t){this.q$=t}setViewableThreshold(t){this.H$=t,this.triggerRecheck()}getIsTabInFocus(){return!0}subscribe(t,i){}destroy(){for(let t=this.U$.length;t--;){const i=this.U$[t];for(let t=i.list.length;t--;)clearTimeout(i.list[t].timeout),this.off(i.element,i.list[t].callback)}}}!function(t){t[t.none=0]="none",t[t.friendly=1]="friendly",t[t.safe=2]="safe"}(Yc||(Yc={}));class sl{constructor(t,i,e=!1){this.$e=t,this.Y$=i,this.U$=[],this.X$=Yc.none,this.Z$={intersectionObserver:!1,fallbackImplementation:!1},this.K$=null,this.iN=[0,.01,.1,.2,.5],this.eN=250,this.nN=!1,this.rN=t=>{this.nN=t,this.z$(),_.S.pageFocus=t},this.z$=()=>{this.U$.forEach((t=>{const i=this.H$(t.element);this.onViewHandle(t,i)}))},this.hN=()=>{null===this.K$&&(this.K$=setTimeout((()=>{this.z$(),clearTimeout(this.K$),this.K$=null}),this.eN))},this.oN(e),this.aN(),this.cN()}cN(){this.Y$.on(this.rN),_.S.pageFocus=this.Y$.isDocumentVisible()}oN(t){this.$e.IntersectionObserver&&!t?this.Z$.intersectionObserver=!0:this.Z$.fallbackImplementation=!0,this.$e.self!==this.$e.top?(this.lN=this.uN(this.$e),null!==this.lN?this.X$=Yc.friendly:this.X$=Yc.safe):this.lN=this.$e.frameElement}uN(t){let i;try{if(i=t.parent,i===this.$e.top)return t.frameElement}catch(t){return null}return this.uN(i)}aN(){this.Z$.intersectionObserver?this.dN=new this.$e.IntersectionObserver(this.onObserverEnter.bind(this),{root:null,rootMargin:"0px",threshold:this.iN}):(this.$e.addEventListener("scroll",this.hN),this.$e.addEventListener("load",this.z$),this.$e.addEventListener("resize",this.z$))}pN(t){return this.U$.find((i=>i.element===t))}H$(t){if(this.X$===Yc.safe){const i=this.pN(t);return i?i.cachedPercentInView:0}let i=1;const e=t.getBoundingClientRect(),s={bottomRatio:e.bottom/e.height,topRatio:(this.$e.top.innerHeight-e.top)/e.height,leftRatio:(this.$e.top.innerWidth-e.left)/e.width,rightRatio:e.right/e.width};return Object.keys(s).forEach((t=>{s[t]<=0&&(i=0),s[t]>0&&s[t]<1&&(i*=s[t])})),i}onObserverEnter(t){t.forEach((t=>{this.U$.filter((i=>i.element===t.target)).forEach((i=>{this.onViewHandle(i,t.intersectionRatio)}))}))}onViewHandle(t,i){t.cachedPercentInView=i,t.list.forEach((t=>{!t.callbackSent&&t.threshold<=i&&this.nN?(t.callbackSent=!0,t.timeout=(0,pi.ld)(t.callback,t.callbackDelay,!0)):t.callbackSent&&(t.threshold>i||!this.nN)&&(t.callbackSent=!1,clearTimeout(t.timeout),t.timeout=(0,pi.ld)(t.callback,0,!1))}))}on(t,i,e={}){let s=!1;if(this.Z$.fallbackImplementation)if(this.X$===Yc.friendly&&t.ownerDocument.defaultView!==this.$e.top)t=this.lN;else if(this.X$===Yc.safe)return void(0,pi.ld)(i,0,!1);let n=this.U$.find((i=>i.element===t));n?s=!0:(n={element:t,list:[],cachedPercentInView:0},this.U$.push(n)),n.list.push({threshold:e.threshold,callbackSent:!1,callbackDelay:e.callbackDelay,timeout:null,callback:i}),this.Z$.intersectionObserver?(s&&this.dN.unobserve(t),this.dN.observe(t)):this.Z$.fallbackImplementation&&this.z$()}off(t,i){const e=this.U$.find((i=>i.element===t));if(e){let s=e.list.length;for(;s;)s--,e.list[s].callback===i&&e.list.splice(s,1);0===e.list.length&&(this.dN&&this.dN.unobserve(t),this.U$.splice(this.U$.indexOf(e),1))}}check(t={threshold:.1}){if(!t.element)return!1;let i=t.element;return this.X$===Yc.friendly&&(i=this.lN),this.H$(i)>=t.threshold&&this.nN}triggerRecheck(t){this.Z$.fallbackImplementation&&t&&this.U$.forEach((i=>{if(i.element===t){const t=this.H$(i.element);this.onViewHandle(i,t)}}))}setViewableThreshold(t){}getIsTabInFocus(){return this.nN}subscribe(t,i){}destroy(){this.$e.removeEventListener("scroll",this.hN),this.$e.removeEventListener("load",this.z$),this.$e.removeEventListener("resize",this.z$);[].slice.call(this.U$).forEach((t=>{[].slice.call(t.list).forEach((i=>{this.off(t.element,i.callback),this.$e.clearTimeout(i.timeout)}))})),this.Y$.off(this.rN),clearTimeout(this.K$)}}function nl(t){return(0,dt.as)(t)&&"[object RegExp]"!==Object.prototype.toString.call(t)&&"[object Date]"!==Object.prototype.toString.call(t)}function rl(t){return nl(t)?hl({},t):t}function hl(t,i){return function(t,i){const e={};return nl(t)&&Object.keys(t).forEach((i=>{e[i]=rl(t[i])})),Object.keys(i).forEach((s=>{nl(i[s])&&t[s]?e[s]=hl(t[s],i[s]):e[s]=rl(i[s])})),e}(t,i)}!function(t){t[t.Normal=0]="Normal",t[t.Buzzfeed=1]="Buzzfeed"}(Xc||(Xc={}));class ol{constructor(t=0){this.fN=t,this.mN=16,this.gN=9}getHeightByRatio(t){return Math.round(t/this.mN*this.gN)+this.fN}}class al{constructor(t,i,e={}){this.floatingMode=(0,dt.$K)(e.mode)?e.mode:t.floatingMode,(0,f.BZ)(e.devices)?this.floatingDeviceMode=e.devices:this.floatingDeviceMode=(0,f.BZ)(t.floatingDeviceMode)?t.floatingDeviceMode:[l.ProtoDeviceType.Desktop],(0,dt.$K)(e.closeButton)?this.floatingCloseButtonMode=e.closeButton:(0,dt.$K)(t.floatingCloseButtonMode)?this.floatingCloseButtonMode=t.floatingCloseButtonMode:this.floatingCloseButtonMode=l.ProtoPlayerCloseButtonMode.OnHover,this.floatingPosition=(0,dt.$K)(e.fixedPosition)?e.fixedPosition:t.floatingFixedPosition,this.floatingScrollPosition=(0,dt.$K)(e.scrollPosition)?e.scrollPosition:t.floatingScrollPosition,this.floatingWidth=(0,dt.$K)(e.floatingWidth)?e.floatingWidth:t.floatingWidth||400,this.floatingGutterX=(0,dt.$K)(e.floatingGutterX)?e.floatingGutterX:t.floatingGutterX,this.floatingGutterY=(0,dt.$K)(e.floatingGutterY)?e.floatingGutterY:t.floatingGutterY,this.pageElement=(0,dt.$K)(e.floatingPageElement)?e.floatingPageElement:t.floatingPageElement,this.appendLocation=(0,dt.$K)(e.floatingAppendLocation)?e.floatingAppendLocation:t.floatingAppendLocation,this.floatingYAxisPadding=(0,dt.$K)(e.floatingYAxisPadding)?e.floatingYAxisPadding:t.floatingYAxisPadding,this.setScrollPosition(this.floatingScrollPosition),this.vN=new ol(i)}setScrollPosition(t){this.yN=t===l.ProtoPositionMode.BottomLeft||t===l.ProtoPositionMode.TopLeft,this.bN=t===l.ProtoPositionMode.BottomRight||t===l.ProtoPositionMode.TopRight,this.xN=t===l.ProtoPositionMode.TopLeft||t===l.ProtoPositionMode.TopRight,this.wN=t===l.ProtoPositionMode.BottomRight||t===l.ProtoPositionMode.BottomLeft}get isPositionedLeft(){return this.yN}get isPositionedRight(){return this.bN}get isPositionedTop(){return this.xN}get isPositionedBottom(){return this.wN}set isPositionedLeft(t){this.yN=t}set isPositionedRight(t){this.bN=t}set isPositionedBottom(t){this.wN=t}set isPositionedTop(t){this.xN=t}set width(t){this.floatingWidth=t}set gutterX(t){this.floatingGutterX=t}set gutterY(t){this.floatingGutterY=t}get width(){return this.floatingWidth}getHeight(t){return`${this.vN.getHeightByRatio(t)}px`}}class cl{constructor(t){this.IE=[],this.Yf=t.id,this._N=t.title,this.Wu=t.altText,this.SN=t.description,this.AN=t.imageUrl,this.Lj=t.sources,this.wb=t.clickUrl||"",this.PN=t.hlsFilePath||"",this.IN=t.liveStreamFilePath||"",this.kN=t.liveStramStartDate||"",this.Lj&&this.Lj.forEach((t=>{this.IE.push({label:L[t.quality],videoHeight:t.quality,isHD:t.quality>=720})}))}get id(){return this.Yf}get title(){return this._N}get altText(){return(0,dt.$K)(this.Wu)?this.Wu:""}get description(){return this.SN}get clickUrl(){return this.wb}getSources(t){return[{src:this.Lj.find((i=>i.quality===this.getClosestSourceQuality(t).videoHeight)).file,type:new pc(x.H264).type}]}getHlsSource(){return this.IN||this.PN}getAvailableQualities(){return this.IE.sort(((t,i)=>t.videoHeight-i.videoHeight))}getThumbnailUrl(){return this.AN}get hlsFilePath(){return this.IN||this.PN}getClosestSourceQuality(t){let i;const e=(0,di.DE)(t,this.IE.map((t=>t.videoHeight)));return this.IE.forEach((t=>{t.videoHeight===e&&(i=t)})),i}setAvailableQualities(t){this.IE=t}get startDate(){return this.kN}getDefaultSubtitle(){return null}}class ll{constructor(t){this.CN=new cl(t)}getMetadata(t){t&&t(this.CN)}setAvailableQualities(t){this.CN.setAvailableQualities(t)}}var ul=o(5732),dl=function(t,i,e,s){return new(e||(e=Promise))((function(n,r){function h(t){try{a(s.next(t))}catch(t){r(t)}}function o(t){try{a(s.throw(t))}catch(t){r(t)}}function a(t){var i;t.done?n(t.value):(i=t.value,i instanceof e?i:new e((function(t){t(i)}))).then(h,o)}a((s=s.apply(t,i||[])).next())}))};class pl{constructor(t,i,e){this.TN=!1,this.MN=[],this.EN=[],this.BN=!1,this.Yf=t,this.LN=i,this.RN=e}getMetadata(t,i){this.TN?t&&t(this.CN):this.DN(t,i)}setAvailableQualities(t){this.CN.setAvailableQualities(t)}DN(t,i){t&&this.MN.push(t),i&&this.EN.push(i),this.BN||(this.BN=!0,this.jN().then((t=>dl(this,void 0,void 0,(function*(){const i=yield kh.k.loadInsights({id:this.Yf,versionId:this.LN,insightsInputType:ul.i.Video});this.BN=!1,this.TN=!0,this.CN=this.VN(t,i.insights,i.sentimentAnalysis),this.MN.forEach((t=>t(this.CN))),this.MN=[]})))).catch((()=>{this.BN=!1,this.EN.forEach((t=>t()))})))}}class fl{constructor(t,i,e,n,r,h,o){if(this.Yf=t,this.RN=i,this.pd=n,this.FN=o,this.$N=[],this.UN=[],this.HN=[],this.qN=[],this.zN={insights:[],insightsFallback:!1},this.IE=[],this._N=e.title,this.Wu=e.altText,this.SN=e.description,this.wb=e.clickUrl,this.$N=e.keywordList,this.WN=e.languageId,this.UN=e.trackList,this.UN&&this.UN.length>0){this.UN.forEach((t=>{t.file=this.pd.appendParamsToUrl(this.GN($s.n.endPoints.base.video,t.file))}));const t=this.UN.findIndex((t=>t.title.indexOf("English")>-1));if(t>-1){const i=this.UN.splice(t,1);this.UN.unshift(...i)}}this.JN=e.thumbnail,this.KD=e.duration,this.qN=e.customFields,this.PN=e.hlsFilePath,this.QN=e.sourceItemId,(0,f.BZ)(r)?(this.zN.insightsFallback=!1,this.zN.insights=r):(this.zN.insightsFallback=!0,this.zN.insights=e.videoIndexes),Array.isArray(r)&&r.length!==e.videoIndexes.length&&(0,s.n)({message:"VideoSourceMeta_insights_mismatch",exception:`media:${this.Yf}, revision:${h}`,callStack:`insights:${r} videoIndexes:${e.videoIndexes}`,level:s.D.WARN},{sendMaxLog:!1}),(0,f.BZ)(e.renditionList)&&(this.HN=this.YN(e.renditionList),this.XN(e.renditionList))}YN(t){return t.sort(((t,i)=>t.height-i.height))}setAvailableQualities(t){this.IE=t}XN(t){(0,f.qy)("height",t).forEach(((t,i)=>{this.IE.push({videoHeight:t.height,label:`${t.height}p`,isHD:t.height>=720})}))}ZN(t,i){return this.HN.find((e=>e.codec===t&&e.height===i))}GN(t,i){let e=`${t}${this.Yf}/`;return(0,dt.QM)(this.RN)?e+=`${this.RN}/${i}`:e+=i,e}KN(t,i){const e=(0,di.DE)(t,this.IE.map((t=>t.videoHeight)));return this.ZN(i,e)}get hlsFilePath(){return this.PN}getAvailableQualities(){return this.IE}getClosestSourceQuality(t){let i;const e=(0,di.DE)(t,this.IE.map((t=>t.videoHeight)));return this.IE.forEach((t=>{t.videoHeight===e&&(i=t)})),i}getSources(t,i){const e=[];return i.forEach((i=>{const s=this.KN(t,i.id);(0,f.BZ)(e)||s&&e.push({src:this.pd.appendParamsToUrl(this.GN($s.n.endPoints.base.video,s.file)),type:i.type})})),e}getHlsSource(){return this.GN($s.n.endPoints.base.video,this.PN)}getThumbnailUrl(t,i){const e=this.GN($s.n.endPoints.base.image,this.JN);return xa.getSmartCroppedImageUrl(e,t,i,this.pd)}getDefaultSubtitle(){const t=this.UN.find((t=>t.title.indexOf("English")>-1));return t||this.UN[0]}get title(){return this._N}get altText(){return(0,dt.$K)(this.Wu)?this.Wu:""}get description(){return this.SN}get clickUrl(){return this.wb}get keywords(){return this.$N}get languageId(){return this.WN}get sourceItemId(){return this.QN}get subtitles(){return(0,f.BZ)(this.UN)?this.UN:void 0}get spriteSheet(){return this.tU}get duration(){return this.KD}get id(){return this.Yf}get customFields(){return this.qN}get insights(){return this.zN}get sentimentAnalysis(){return this.FN}}var ml=o(7593);class gl extends pl{constructor(t,i,e,s){super(t,i,e),this.pd=s,this.iU=new ml.t(l.ProtoMediaMetadataResponse,"VideoSourceWrapper")}jN(){let t=`${$s.n.endPoints.base.metadata}${this.Yf}/`;return(0,dt.QM)(this.RN)?t+=`${this.RN}/${this.LN}_media.bin`:t+=`${this.LN}_media.bin`,this.iU.fetchMetadata(this.pd.appendParamsToUrl(t))}VN(t,i,e){return new fl(this.Yf,this.RN,t,this.pd,i,this.LN,e)}}class vl{constructor(t,i){this.IE=[],this.Yf=t,this.Wu=i.altText,this.PN=i.outputUrl,this.JN=i.thumbnailUrl,this.eU=i.name,this.sU=i.startDate}getSources(t,i){return null}setAvailableQualities(t){this.IE=t}get hlsFilePath(){return this.PN}getAvailableQualities(){return this.IE}getClosestSourceQuality(t){let i;const e=(0,di.DE)(t,this.IE.map((t=>t.videoHeight)));return this.IE.forEach((t=>{t.videoHeight===e&&(i=t)})),i}getHlsSource(){return this.PN}getThumbnailUrl(t,i){return this.JN}get id(){return this.Yf}get altText(){return(0,dt.$K)(this.Wu)?this.Wu:""}get title(){return this.eU}get startDate(){return this.sU}getDefaultSubtitle(){return null}}class yl extends pl{constructor(t,i,e){super(t,i,e),this.iU=new ml.t(l.ProtoLiveMediaMetadataResponse,"LiveVideoSourceWrapper")}jN(){const t=`${$s.n.endPoints.base.metadata}${this.Yf}/${this.LN}_liveStream.bin`;return this.iU.fetchMetadata(t)}VN(t){return new vl(this.Yf,t)}}class bl extends class{constructor(t,i,e,n,r,h,o,a,c,u,d,p=0){if(this.global=t,this.targetContainer=i,this.nU=e,this.jc=n,this.secondLevelDomain=r,this.apiConfig=h,this.isServerlessMode=o,this.supplyChainSettings=a,this.isSeoTraffic=c,this.pd=u,this.videoPosition=d,this.sharingDestinations=[],this.disableAdvertising=!1,this.adBreaks=[],this.disableClickUrl=!1,this.moatTrackingEnabled=!1,this.pauseAdWhenFinished=!1,this.loopAdWhenFinished=!1,this.adsMustBeSkippableIfLongerThan=Gi.f3,(0,dt.QM)(e.initializationSettingsJson))try{const t=JSON.parse(e.initializationSettingsJson);this.apiConfig=hl(this.apiConfig,t)}catch(t){(0,s.n)({message:"invalid_init_json",exception:t.message,callStack:t.callStack,level:s.D.CRITICAL})}if((this.apiConfig.playerMode===Xc.Buzzfeed||this.apiConfig.settings.pauseAdWhenFinished)&&(this.pauseAdWhenFinished=!0),this.rU(this.nU.lineItems),this.soundMode=(0,dt.$K)(this.apiConfig.settings.defaultSoundMode)?this.apiConfig.settings.defaultSoundMode:e.soundMode,this.playbackMode=(0,dt.$K)(this.apiConfig.settings.playbackMode)?this.apiConfig.settings.playbackMode:e.playbackMode,this.playbackMode===l.ProtoPlayerPlaybackModeEnum.ClickToPlay||this.soundMode===l.ProtoPlayerSoundMode.Mute||(0,pi.we)()||(this.soundMode=l.ProtoPlayerSoundMode.Mute),this.html=e.html,this.css=e.css,this.floatingSettings=new al(e,p,this.apiConfig.settings.customization.floating),e.logoResource||(0,dt.QM)(this.apiConfig.settings.customization.logoUrl)){let t=`${$s.n.endPoints.base.image}${e.playerId}/${e.logoResource}`;t=this.pd.appendParamsToUrl(t),this.logoUrl=(0,dt.QM)(this.apiConfig.settings.customization.logoUrl)?this.apiConfig.settings.customization.logoUrl:t}const f=e.amazonTamSlotId;(0,dt.QM)(f)&&(this.amazonTamSlotId=f),(0,dt.$K)(this.apiConfig.settings.advertising.macros)&&(this.externalMacros=this.apiConfig.settings.advertising.macros),(0,dt.$K)(this.apiConfig.settings.disableAdvertising)&&(this.disableAdvertising=this.apiConfig.settings.disableAdvertising),this.midRollNumber=(0,dt.$K)(this.apiConfig.settings.advertising.maxNumberOfMidRolls)?this.apiConfig.settings.advertising.maxNumberOfMidRolls:e.midRollNumber,this.adViewabilityPolicy=e.adViewabilityPolicy,this.preRollBreak=((0,dt.$K)(this.apiConfig.settings.advertising.preRollBreak)?(0,ut.qe)(this.apiConfig.settings.advertising.preRollBreak,500):e.preRollBreak)*oi.s_,this.postRollBreak=((0,dt.$K)(this.apiConfig.settings.advertising.postRollBreak)?(0,ut.qe)(this.apiConfig.settings.advertising.postRollBreak,500):e.postRollBreak)*oi.s_,this.playerId=e.playerId,this.floatingSettings.floatingMode===l.ProtoPlayerFloatingMode.Always?this.closeButtonMode=this.floatingSettings.floatingCloseButtonMode:this.closeButtonMode=(0,dt.$K)(this.apiConfig.settings.customization.closeButtonMode)?this.apiConfig.settings.customization.closeButtonMode:e.closeButtonMode,this.isCloseButton=!!this.closeButtonMode||!!this.floatingSettings.floatingCloseButtonMode,this.uiComponentsVisibility={casting:!1,expandButton:(0,dt.$K)(this.apiConfig.settings.customization.showExpandButton)?this.apiConfig.settings.customization.showExpandButton:e.expandButton},this.sharingDestinations=void 0,this.adPlaybackMode=e.adPlaybackMode,(0,dt.$K)(this.apiConfig.settings.disableClickUrl)&&(this.disableClickUrl=this.apiConfig.settings.disableClickUrl);const{skippability:m,skipAdAfter:g,skipMin:v}=h.settings.advertising.skipAdSettings||{};this.skipAdAfter=(0,dt.$K)(g)?g:e.skipAdAfter,this.skippability=(0,dt.$K)(m)?m:e.skippability,this.skipMin=(0,dt.$K)(v)?v:e.skipMin;const{disableTracking:y}=h.settings._connatixInternals;(y||o||this.isSeoTraffic)&&(this.disableTracking=!0),this.sessionId=this.nU.sessionId}setPreRollBreak(t){this.preRollBreak=this.hU(this.preRollBreak,t)}setPostRollBreak(t){this.postRollBreak=this.hU(this.postRollBreak,t)}hU(t,i){const e=(0,ut.w4)(i);return null===e?t:e}oU(){this.aU(),this.cU();let t=[...this.uU(),...this.dU()];t=this.pU(t),t=this.fU(t),t=this.mU(t);const i=(0,dt.$K)(this.apiConfig.settings.rendering.scrollHijackingProtection)?this.apiConfig.settings.rendering.scrollHijackingProtection:this.nU.scrollHijackingProtection;this.lineItemSettings={lineItems:t,disableScrollHijackEnforcement:i},this.gU(this.lineItemSettings)}vU(t){return t*oi.s_}yU(t,i){i.adTag=(0,dt.$K)(t.url)?t.url:i.adTag,i.requestCap=(0,dt.$K)(t.contentRequestCap)?t.contentRequestCap:i.requestCap,i.impressionCap=(0,dt.$K)(t.contentImpressionCap)?t.contentImpressionCap:i.impressionCap,i.viewability=(0,dt.$K)(t.viewability)?t.viewability:i.viewability,i.sound=(0,dt.$K)(t.sound)?t.sound:i.sound,i.ignoreFilledRequests=(0,dt.$K)(t.ignoreFilledRequests)?t.ignoreFilledRequests:i.ignoreFilledRequests,i.headerBidderBids=(0,dt.$K)(t.headerBidderBids)?t.headerBidderBids:i.headerBidderBids,i.headerBidderTimeout=(0,dt.$K)(t.headerBidderTimeout)?t.headerBidderTimeout:i.headerBidderTimeout,i.resetRequestsCapTime=(0,dt.$K)(t.resetRequestsCapTime)?t.resetRequestsCapTime:i.resetRequestsCapTime,i.resetImpressionsCapTime=(0,dt.$K)(t.resetImpressionsCapTime)?t.resetImpressionsCapTime:i.resetImpressionsCapTime,i.resetCapType=(0,dt.$K)(t.resetCapType)?t.resetCapType:i.resetCapType,i.timeBetweenRequests=(0,dt.$K)(t.timeBetweenRequests)?t.timeBetweenRequests:i.timeBetweenRequests,i.skipMode=(0,dt.$K)(t.skipMode)?t.skipMode:i.skipMode,i.floorPrice=(0,dt.$K)(t.floorPrice)?t.floorPrice:i.floorPrice,i.adBreakSettings=(0,dt.$K)(t.adBreakSettings)?t.adBreakSettings:i.adBreakSettings,i.pauseAdOutOfView=(0,dt.$K)(t.pauseAdOutOfView)?t.pauseAdOutOfView:i.pauseAdOutOfView,i.nonlinearLineItemSettings=(0,dt.$K)(t.nonlinearLineItemSettings)?this.bU(t.nonlinearLineItemSettings):i.nonlinearLineItemSettings,i.adType=(0,dt.$K)(t.nonlinearLineItemSettings)?l.ProtoAdType.Nonlinear:i.adType}bU(t){const i={nonLinearRequestType:t.nonLinearRequestType?t.nonLinearRequestType:l.ProtoNonlinearRequestType.Banner,nonLinearAdTimeSeconds:t.nonLinearAdTimeSeconds?t.nonLinearAdTimeSeconds:15};return i.nonLinearAdTimeSeconds<15&&(i.nonLinearAdTimeSeconds=15),i.nonLinearAdTimeSeconds>180&&(i.nonLinearAdTimeSeconds=180),i}aU(){this.xU(this.apiConfig.settings.advertising.preRollBreak,l.ProtoAdBreakTypeEnum.PreRoll),this.xU(this.apiConfig.settings.advertising.postRollBreak,l.ProtoAdBreakTypeEnum.PostRoll),this.xU(this.apiConfig.settings.advertising.maxNumberOfMidRolls,l.ProtoAdBreakTypeEnum.MidRoll)}xU(t,i){const e=this.wU(this.apiConfig.settings.advertising.adBreaks,i),s=this.wU(this.nU.adBreaks,i),n={maxAdPodDuration:0,maxAdSlotDuration:0,numberOfAdSlots:1,types:[i]};e?this.adBreaks.push(e):!(0,dt.$K)(t)||e||s?!e&&s&&this.adBreaks.push(s):this.adBreaks.push(n)}wU(t,i){if(!t)return;let e;return t.forEach((t=>{t.types.includes(i)&&(e=Object.assign({},t),e.types=[i])})),e}fU(t){const{adBreaks:i}=this;let e=t;const s=[];return i.forEach((t=>{t.types.forEach((i=>s.push(Object.assign(Object.assign({},t),{types:[i]}))))})),s.forEach((t=>{e=this.removeCompatibleLineItems(t,e)})),t.filter((t=>!e.includes(t)))}mU(t){return t.filter((t=>t.adType!==l.ProtoAdType.Nonlinear))}removeCompatibleLineItems(t,i){const e=t.types[0],s=t.numberOfAdSlots>1?l.ProtoLineItemAdBreakTypeEnum.AdPod:l.ProtoLineItemAdBreakTypeEnum.SingleAd;return i.filter((t=>!t.adBreakSettings.adBreakTargeting.some((t=>t.adRollType===e&&(t.adBreakTypeEnum===l.ProtoLineItemAdBreakTypeEnum.All||t.adBreakTypeEnum===s)))))}rU(t){t.forEach((t=>{t.adBreakSettings||this._U(t),this.SU(t)}))}_U(t){t.adBreakSettings={adBreakTargeting:[{adRollType:l.ProtoAdBreakTypeEnum.PreRoll,adBreakTypeEnum:l.ProtoLineItemAdBreakTypeEnum.All},{adRollType:l.ProtoAdBreakTypeEnum.MidRoll,adBreakTypeEnum:l.ProtoLineItemAdBreakTypeEnum.All},{adRollType:l.ProtoAdBreakTypeEnum.PostRoll,adBreakTypeEnum:l.ProtoLineItemAdBreakTypeEnum.All}]}}SU(t){0===t.requestCap&&(t.requestCap=20)}cU(){this.adBreaks.forEach((t=>{t.maxAdSlotDuration=this.vU(t.maxAdSlotDuration),t.maxAdPodDuration=this.vU(t.maxAdPodDuration),t.numberOfAdSlots<=1?t.maxAdPodDuration=0:t.maxAdSlotDuration>t.maxAdPodDuration&&(t.maxAdSlotDuration=t.maxAdPodDuration)}))}AU(t,i){const e=Object.assign({},i);return this.yU(t,e),(0,dt.$K)(t.externalMediaFile)&&(e.externalMediaFile=t.externalMediaFile),(0,dt.$K)(t.externalHlsFile)&&(e.externalHlsFile=t.externalHlsFile),e.customCpm=t.cpm,e}uU(){const t=[];if(!(0,f.BZ)(this.apiConfig.settings.advertising.lineItems))return[];const i=this.nU.lineItems.filter((t=>t.creativeType===l.ProtoCreativeTypeEnum.External));return this.apiConfig.settings.advertising.lineItems.forEach((e=>{if(this.SU(e),this.isServerlessMode){const i=this.PU(),s=this.AU(e,i);t.push(s)}else i.forEach((i=>{if(e.id===i.advertiserLineItemId&&(e.url||e.headerBidderBids||e.externalMediaFile||e.externalHlsFile)){const s=this.AU(e,i);t.push(s)}}))})),t}dU(){return!0===this.apiConfig.settings.advertising.blockConnatixDemand?[]:this.nU.lineItems.filter((t=>t.creativeType!==l.ProtoCreativeTypeEnum.External))}pU(t){return t.forEach((t=>{t.creativeType===l.ProtoCreativeTypeEnum.External&&(t.headerBidderBids&&"[]"!==t.headerBidderBids?t.creativeType=l.ProtoCreativeTypeEnum.HeaderBidder:t.externalMediaFile||t.externalHlsFile?t.creativeType=l.ProtoCreativeTypeEnum.MediaFile:t.creativeType=l.ProtoCreativeTypeEnum.ThirdParty)})),t}PU(){return l.ProtoLineItem.toObject(l.ProtoLineItem.fromObject({}),{defaults:!0,arrays:!0,objects:!0})}gU(t){this.moatTrackingEnabled=t.lineItems.some((t=>t.moatTrackingEnabled))}}{constructor(t,i,e,n,r,h,o,a,c,u,d){var p;super(t,i,e,n,r,h,o,a,d,c,u),this.global=t,this.targetContainer=i,this.nU=e,this.pd=c,this.videoPosition=u,this.playlist=[],this.outstreamAdAsContent=!1,this.alwaysDisplayControls=this.apiConfig.settings.customization.alwaysDisplayControls,this.playerSize=this.IU(),this.midRollOnlyOnLongContent=(0,dt.$K)(this.apiConfig.settings.advertising.midRollOnlyOnLongContent)?this.apiConfig.settings.advertising.midRollOnlyOnLongContent:e.midRollOnlyOnLongContent,this.uiComponentsVisibility.muteWatermark=(0,dt.$K)(this.apiConfig.settings.customization.showMuteWatermark)?this.apiConfig.settings.customization.showMuteWatermark:e.muteWatermark,this.displayAdCountdown=(0,dt.$K)(this.apiConfig.settings.customization.displayAdCountdown)?this.apiConfig.settings.customization.displayAdCountdown:e.displayAdCountdown,this.playlistId=e.playlistId,this.accentColor=(0,dt.QM)(this.apiConfig.settings.customization.accentColor)?this.apiConfig.settings.customization.accentColor:e.accentColor,this.iconsColor=(0,dt.QM)(this.apiConfig.settings.customization.iconsColor)?this.apiConfig.settings.customization.iconsColor:e.iconsColor,this.tooltipTextColor=(0,dt.QM)(this.apiConfig.settings.customization.tooltipTextColor)?this.apiConfig.settings.customization.tooltipTextColor:e.tooltipTextColor,this.tooltipBackgroundColor=(0,dt.QM)(this.apiConfig.settings.customization.tooltipBackgroundColor)?this.apiConfig.settings.customization.tooltipBackgroundColor:e.tooltipBackgroundColor,this.minTimeBeforeFirstAd=((0,dt.$K)(this.apiConfig.settings.advertising.timeBeforeFirstAd)?this.apiConfig.settings.advertising.timeBeforeFirstAd:e.minTimeBeforeFirstAd)*oi.s_,this.timeBetweenAds=((0,dt.$K)(this.apiConfig.settings.advertising.timeBetweenAds)?this.apiConfig.settings.advertising.timeBetweenAds:e.timeBetweenAds)*oi.s_,this.upNextMode=(0,dt.$K)(this.apiConfig.settings.nextVideoMode)?this.apiConfig.settings.nextVideoMode:e.upNextMode,this.closedCaptionDefault=(0,dt.$K)(this.apiConfig.settings.customization.closedCaptionDefault)?this.apiConfig.settings.customization.closedCaptionDefault:e.closedCaption,this.logoPosition=(0,dt.$K)(this.apiConfig.settings.customization.logoPosition)?this.apiConfig.settings.customization.logoPosition:e.logoPosition,this.playerType=e.playerType,this.playerType!==$.ProtoElementsTypeEnum.OutStream||!this.apiConfig.settings.outstreamAdAsContent&&this.apiConfig.playerMode!==Xc.Buzzfeed||(this.outstreamAdAsContent=!0);if(((0,dt.$K)(this.apiConfig.settings.outstreamSettings.endAdBreakPolicy)?this.apiConfig.settings.outstreamSettings.endAdBreakPolicy===$.ProtoOutstreamEndAdBreakPolicyEnum.Loop:e.outstreamEndAdBreakPolicy===$.ProtoOutstreamEndAdBreakPolicyEnum.Loop)&&(this.outstreamAdAsContent=!0,this.loopAdWhenFinished=!0),(0,dt.r)(this.minTimeBeforeFirstAd)||this.apiConfig.playerMode===Xc.Buzzfeed||this.outstreamAdAsContent||(this.minTimeBeforeFirstAd=10),(0,dt.QM)(this.apiConfig._appSettings.bundleID)&&!this.isInApp()&&(0,s.n)({message:"Elements_PlayerModel_bundle_id_for_non_in_app",level:s.D.CRITICAL}),!(0,dt.QM)(this.apiConfig._appSettings.bundleID)&&this.isInApp()&&(0,s.n)({message:"Elements_PlayerModel_bundle_id_missing_for_in_app",level:s.D.CRITICAL}),this.videoQuality=(0,dt.$K)(this.nU.videoQuality)?this.nU.videoQuality:$.ProtoVideoQuality.Auto,!(0,f.BZ)(this.apiConfig.settings.playlist)||(0,dt.QM)(this.apiConfig.mediaId)||(0,f.BZ)(this.apiConfig.mediaIdList)?e.playlist.length>0&&e.playlist.forEach((({mediaId:t,revisionNumber:i,mediaContentVersionId:e,insightsRevisionNumber:n})=>{if(this.nU.playerType===$.ProtoElementsTypeEnum.Live)this.playlist.push(new yl(t,i,e)),kh.k.markAsUnavailable(t);else{const r=i===n;this.playlist.push(new gl(t,i,e,this.pd)),r?kh.k.loadInsights({id:t,versionId:i,insightsInputType:ul.i.Video}):(kh.k.markAsUnavailable(t),(0,dt.kE)(i)&&(0,dt.kE)(n)&&(0,s.n)({message:"ElementsPlayerModel_InsightsRevisionNumberMismatch",exception:`media:${t}, revisionNumber:${i}, insightsRevisionNumber:${n}`,level:s.D.WARN},{sendMaxLog:!1}))}})):this.apiConfig.settings.playlist.forEach((t=>{(0,dt.QM)(t.liveStreamFilePath)&&(this.playerType=$.ProtoElementsTypeEnum.Live,this.playbackMode=$.ProtoPlayerPlaybackModeEnum.ClickToPlay),this.playlist.push(new ll(t))})),this.isOutStreamType()){const t=(0,dt.$K)(this.apiConfig.settings.outstreamSettings.initialRendering)?this.apiConfig.settings.outstreamSettings.initialRendering:e.outstreamInitialRendering,i=(0,dt.QM)(this.apiConfig.settings.outstreamSettings.houseScreenColor)?this.apiConfig.settings.outstreamSettings.houseScreenColor:e.outstreamHouseBackgroundColor,s=((0,dt.$K)(this.apiConfig.settings.outstreamSettings.totalAdBreakLength)?this.apiConfig.settings.outstreamSettings.totalAdBreakLength:e.outstreamTotalAdBreakLength)*oi.s_,n=(0,dt.$K)(this.apiConfig.settings.outstreamSettings.endAdBreakPolicy)?this.apiConfig.settings.outstreamSettings.endAdBreakPolicy:e.outstreamEndAdBreakPolicy;this.outstreamSettings={initialRendering:t,houseScreenBackgroundColor:i,totalAdBreakLength:s,endAdBreakPolicy:n}}((0,dt.$K)(this.apiConfig.settings.gallery.style)&&this.apiConfig.settings.gallery.style!==$.ProtoGalleryStyleMode.None||!(0,dt.$K)(this.apiConfig.settings.gallery.style)&&e.galleryStyle!==$.ProtoGalleryStyleMode.None)&&this.floatingSettings.floatingMode!==$.ProtoPlayerFloatingMode.Always&&(this.gallery={style:(0,dt.$K)(this.apiConfig.settings.gallery.style)?this.apiConfig.settings.gallery.style:e.galleryStyle,orientation:this.kU()}),this.nonlinearPlayerSettings=(null===(p=this.apiConfig.settings.advertising)||void 0===p?void 0:p.nonlinearPlayerSettings)?this.CU(this.apiConfig.settings.advertising.nonlinearPlayerSettings):this.nU.nonlinearPlayerSettings,this.oU(),this.nonlinearPlayerSettings||(this.lineItemSettings.lineItems=this.lineItemSettings.lineItems.filter((t=>t.adType!==l.ProtoAdType.Nonlinear)))}CU(t){const i={numberOfNonlinearAds:t.numberOfNonlinearAds?t.numberOfNonlinearAds:0,timeSecondsBetweenNonlinear:t.timeSecondsBetweenNonlinear?t.timeSecondsBetweenNonlinear:5,timeSecondsBetweenLinearAndNonlinear:t.timeSecondsBetweenLinearAndNonlinear?t.timeSecondsBetweenLinearAndNonlinear:0};i.numberOfNonlinearAds<0&&(i.numberOfNonlinearAds=0),i.numberOfNonlinearAds>10&&(i.numberOfNonlinearAds=10);i.timeSecondsBetweenNonlinear<1&&(i.timeSecondsBetweenNonlinear=1),i.timeSecondsBetweenNonlinear>180&&(i.timeSecondsBetweenNonlinear=180);return i.timeSecondsBetweenLinearAndNonlinear<0&&(i.timeSecondsBetweenLinearAndNonlinear=0),i.timeSecondsBetweenLinearAndNonlinear>180&&(i.timeSecondsBetweenLinearAndNonlinear=180),i}get urlSuffixerService(){return this.pd}isInApp(){return(0,f.d3)(this.playerType,[$.ProtoElementsTypeEnum.InStreamInApp])}isInStreamType(){return(0,f.d3)(this.playerType,[$.ProtoElementsTypeEnum.InStream,$.ProtoElementsTypeEnum.InStreamInApp])}isOutStreamType(){return(0,f.d3)(this.playerType,[$.ProtoElementsTypeEnum.OutStream])}isLiveType(){return(0,f.d3)(this.playerType,[$.ProtoElementsTypeEnum.Live])}vU(t){return this.outstreamAdAsContent?0:super.vU(t)}mU(t){return t.filter((t=>this.playerType===$.ProtoElementsTypeEnum.InStream||this.playerType===$.ProtoElementsTypeEnum.InStreamInApp||t.adType!==l.ProtoAdType.Nonlinear))}IU(){return{responsive:(0,dt.$K)(this.apiConfig.settings.customization.responsive)?this.apiConfig.settings.customization.responsive:this.nU.responsive,ratioWidth:(0,dt.$K)(this.apiConfig.settings.customization.ratioWidth)?this.apiConfig.settings.customization.ratioWidth:this.nU.ratioWidth,ratioHeight:(0,dt.$K)(this.apiConfig.settings.customization.ratioHeight)?this.apiConfig.settings.customization.ratioHeight:this.nU.ratioHeight,fixedWidth:(0,dt.$K)(this.apiConfig.settings.customization.fixedWidth)?this.apiConfig.settings.customization.fixedWidth:this.nU.fixedWidth,fixedHeight:(0,dt.$K)(this.apiConfig.settings.customization.fixedHeight)?this.apiConfig.settings.customization.fixedHeight:this.nU.fixedHeight}}kU(){return this.jc===l.ProtoDeviceType.Smartphone||this.jc===l.ProtoDeviceType.Tablet?$.ProtoGalleryOrientationEnum.Portrait:this.apiConfig.settings.gallery.orientation?this.apiConfig.settings.gallery.orientation:this.nU.galleryOrientation}}const xl=Object.assign(Object.assign(Object.assign({},Tt.Km),j),V),wl={PlaybackModeEnum:{AutoPlay:l.ProtoPlayerPlaybackModeEnum.Autoplay,ScrollToPlay:l.ProtoPlayerPlaybackModeEnum.ScrollToPlay,ClickToPlay:l.ProtoPlayerPlaybackModeEnum.ClickToPlay},DefaultSoundModeEnum:{On:l.ProtoPlayerSoundMode.On,Off:l.ProtoPlayerSoundMode.Mute,OnHover:l.ProtoPlayerSoundMode.Hover},InsertPositionEnum:{WithinContainer:l.ProtoPlayerInsertMode.WithinContainer,BeforeContainer:l.ProtoPlayerInsertMode.BeforeContainer,AfterContainer:l.ProtoPlayerInsertMode.AfterContainer,ReplaceContainer:l.ProtoPlayerInsertMode.ReplaceContainer,HideContainer:l.ProtoPlayerInsertMode.HideContainer},CloseButtonModeEnum:{Off:l.ProtoPlayerCloseButtonMode.Off,On:l.ProtoPlayerCloseButtonMode.OnHover,OnAfterFirstAd:l.ProtoPlayerCloseButtonMode.OnHoverAfterFirstAd,OnHover:l.ProtoPlayerCloseButtonMode.OnHover,OnHoverAfterFirstAd:l.ProtoPlayerCloseButtonMode.OnHoverAfterFirstAd,AlwaysOn:l.ProtoPlayerCloseButtonMode.AlwaysOn},QualityEnum:L,LineItemExcludedSlotsEnum:{PreRoll:l.ProtoAdSlotsEnum.PreRoll,MidRoll:l.ProtoAdSlotsEnum.MidRoll,PostRoll:l.ProtoAdSlotsEnum.PostRoll},ErrorTypesEnum:{SetupError:Tt.n9.SetupError,NoPlayer:Tt.n9.NoPlayer},FloatingModeEnum:{Off:l.ProtoPlayerFloatingMode.Off,OnPageLoad:l.ProtoPlayerFloatingMode.OnPageLoad,AfterInView:l.ProtoPlayerFloatingMode.AfterInView,Always:l.ProtoPlayerFloatingMode.Always},FloatingDevicesEnum:{Desktop:l.ProtoDeviceType.Desktop,Smartphone:l.ProtoDeviceType.Smartphone,Tablet:l.ProtoDeviceType.Tablet,Other:l.ProtoDeviceType.GameConsole},FloatingFixedPositionModeEnum:{Page:l.ProtoFloatingFixedPositionMode.Page,Element:l.ProtoFloatingFixedPositionMode.Element},FloatingScrollPositionEnum:{BottomRight:l.ProtoPositionMode.BottomRight,BottomLeft:l.ProtoPositionMode.BottomLeft,TopRight:l.ProtoPositionMode.TopRight,TopLeft:l.ProtoPositionMode.TopLeft},FloatingStatesEnum:{Float:Rt.Float,Embed:Rt.Embed},FloatingAppendLocationEnum:{Above:l.ProtoFloatingAppendLocationEnum.Above,Below:l.ProtoFloatingAppendLocationEnum.Below,Within:l.ProtoFloatingAppendLocationEnum.Within},ImplementationTypeEnum:{Amp:l.ProtoImplementationType.Amp,Web:l.ProtoImplementationType.Web}},_l=Object.assign(Object.assign({},wl),{NextVideoModeEnum:{Next:$.ProtoPlayerUpNextMode.Next,Loop:$.ProtoPlayerUpNextMode.Loop,Stop:$.ProtoPlayerUpNextMode.Stop},LogoPositionEnum:{None:$.ProtoLogoPositionMode.None,ControlBar:$.ProtoLogoPositionMode.ControlBar,BottomRight:$.ProtoLogoPositionMode.BottomRight,BottomLeft:$.ProtoLogoPositionMode.BottomLeft,TopRight:$.ProtoLogoPositionMode.TopRight,TopLeft:$.ProtoLogoPositionMode.TopLeft},PlayerTypesEnum:{InStream:$.ProtoElementsTypeEnum.InStream,OutStream:$.ProtoElementsTypeEnum.OutStream,InStreamInApp:$.ProtoElementsTypeEnum.InStream,Live:$.ProtoElementsTypeEnum.Live},GalleryStyleModeEnum:{None:$.ProtoGalleryStyleMode.None,Detailed:$.ProtoGalleryStyleMode.Detailed,Visual:$.ProtoGalleryStyleMode.Visual},GalleryOrientationEnum:{Landscape:$.ProtoGalleryOrientationEnum.Landscape,Portrait:$.ProtoGalleryOrientationEnum.Portrait},InitialRenderingEnum:{ExpandWithAd:$.ProtoOutstreamInitialRenderingEnum.ExpandWithAd,FullyRendered:$.ProtoOutstreamInitialRenderingEnum.FullyRendered},EndAdBreakPolicyEnum:{Hide:$.ProtoOutstreamEndAdBreakPolicyEnum.Hide,HouseScreen:$.ProtoOutstreamEndAdBreakPolicyEnum.HouseScreen,Loop:$.ProtoOutstreamEndAdBreakPolicyEnum.Loop}});function Sl(t,i){const e=t.toObject({},{defaults:!0,arrays:!0,objects:!0}),s=function(t){return t.toObject({},{defaults:!0,arrays:!0,objects:!0})}(i);return e.players.push(s),e.browser=l.Browser.toObject(l.Browser.fromObject({}),{defaults:!0,arrays:!0,objects:!0}),e.geoLocation=l.GeoLocation.toObject(l.GeoLocation.fromObject({}),{defaults:!0,arrays:!0,objects:!0}),e}var Al=o(3344),Pl=o(7382);class Il extends el{constructor(t,i){super(),this.$e=t;try{this.da=new Oc,this.Yo()}catch(t){(0,s.n)({message:"omid_verification_client_error",exception:t.message,callStack:t.callStack,level:i?s.D.CRITICAL:s.D.INFO})}}subscribe(t,i){return this.da.on(t,i)}Yo(){const t=Pl.$.getVerificationClient(this.$e);if(!t)throw new Error("omid_verification_client_not_found");if(this.TU=new t,!this.TU.isSupported())throw new Error("omid_not_implemented");this.MU(),this.VB()}MU(){this.TU.registerSessionObserver((t=>{t&&t.type===Al._f.sessionError&&(0,s.n)({message:"omid_verification_client_session_error",exception:t.data.message,level:s.D.WARN})}))}VB(){this.TU.addEventListener(Al._f.geometryChange,(t=>{try{const{percentageInView:i,reasons:e}=t.data.adView,s=[Al.li.backgrounded,Al.li.notFound].some((t=>e.includes(t)));this.Q$(s);const n=i/100;this.setViewableThreshold(n),this.da.trigger(Tt.rl.OmidViewabilityThreshold,n)}catch(t){(0,s.n)({message:"omid_verification_client_geometry_change_error",exception:t.message,callStack:t.callStack,level:s.D.CRITICAL},{throttle:1})}}))}}const kl=`cnx-player-css-${i.g.version}`;class Cl extends u.a{ue(){return{id:kl,src:$s.n.endPoints.assets.css.elements}}getDelegateHandler(){return{getCurrentPlaybackTime:()=>{if(!this.renderer)return 0;const t=this.renderer.getApiMethods();return t.getPlayerType()===$.ProtoElementsTypeEnum.OutStream?0:t.getVideoCurrentPosition()},getCurrentVolume:()=>this.renderer.getApiMethods().getVolume()}}getRendererInstance(t,i,e,s){return new il(this,t,i,e,s)}getViewabilityService(t,i){return this.externalAttributes.settings.useExternalViewabilityService?new el:this.pi?new Il(window,this.gi):new sl(t.global,i,t.isOutStreamType())}getPlayerResponse(t,e){return new Promise(((e,s)=>{qs.n.sendProtoRequest({ProtoResponse:$.ProtoElementsResponse,ProtoRequest:$.ProtoElementsRequest,requestData:t,endpoint:$s.n.endPoints.api.pls,withCredentials:!0,queryParams:Object.assign({[Js.Fk]:i.g.version},tn.f.getCidKeyValueObject()),logError:!0}).then((t=>{this.setApiHostUrl(t.apiHostUrl),window.parent.connatixDummy&&(0,Ks.Ph)("connatixDummy",this.pageUrl)&&(t.players[0]=Object.assign(Object.assign({},t.players[0]),window.parent.connatixDummy)),e(t)})).catch((t=>{s(t)}))}))}getPlayerModel(t,i,e,n){const r=new bl(t.insertWindow?t.insertWindow:this.GLOBAL,t.insertContainer,i.players[n],i.browser.device,i.secondLevelDomain,this.externalAttributes,this.isServerlessMode,i.supplyChain,e,this.queryParams.cnxVideoPosition,i.isSeoTraffic||this.queryParams.cnxIsSeoTraffic);return 0===r.playlist.length?((0,s.n)({message:"ElementsLoader_no_playlist_items",level:s.D.CRITICAL}),null):r}getApiConfigEnums(){return _l}getApiConfigEvents(){return xl}getSpecificRequestData(){const t={localTimestamp:(0,ut.x8)()};this.queryParams.cnxMediaId?t.forceMediaIdList=[this.queryParams.cnxMediaId]:this.externalAttributes.mediaIdList?t.forceMediaIdList=this.externalAttributes.mediaIdList:this.externalAttributes.mediaId&&(t.forceMediaIdList=[this.externalAttributes.mediaId]),this.queryParams.cnxPlaylistId?t.forcePlaylistId=this.queryParams.cnxPlaylistId:this.externalAttributes.playlistId&&!(0,f.BZ)(this.externalAttributes.settings.playlist)&&(t.forcePlaylistId=this.externalAttributes.playlistId);const i=this.externalAttributes.settings.forceSourceItemId;return(0,dt.QM)(i)&&(t.forceSourceItemId=i),t}Ti(){super.Ti(),this.externalAttributes.settings.gallery={},this.externalAttributes.settings.outstreamSettings={}}EU(t){t.forEach((t=>{t.ratioWidth=16,t.ratioHeight=9}))}defaultInitFromProto(){const t=Sl($.ProtoElementsResponse,$.ProtoElements);return this.EU(t.players),t}}var Tl=o(3121);class Ml{constructor(t=!1){this._debugLogging=t,this.BU="eventEmitted",this.da=new Oc}subscribe(t){return this.da.on(this.BU,t)}unsubscribe(t){this.da.remove(this.BU,t)}emitSessionStart(t){const i={videoMetadata:t};this.OU({metadata:i,name:Tl.Z.SessionStart})}emitContentComplete(){this.OU({name:Tl.Z.ContentComplete})}emitSessionEnd(){this.OU({name:Tl.Z.SessionEnd})}emitPlay(){this.OU({name:Tl.Z.Play})}emitPause(){this.OU({name:Tl.Z.Pause})}emitAdPlay(){this.OU({name:Tl.Z.AdPlay})}emitAdPause(){this.OU({name:Tl.Z.AdPause})}emitAdPlaying(t){const i={adType:t};this.OU({name:Tl.Z.AdPlaying,metadata:i})}emitAdPaused(t){const i={adType:t};this.OU({name:Tl.Z.AdPaused,metadata:i})}emitAdImpression(t,i,e){const s={adMetadata:t,customAdMetadata:i,adType:e};this.OU({metadata:s,name:Tl.Z.AdImpression})}emitAdComplete(t){const i={adType:t};this.OU({name:Tl.Z.AdComplete,metadata:i})}emitAdStopped(t){const i={adType:t};this.OU({name:Tl.Z.AdStopped,metadata:i})}emitAdBreakStart(t){const i={adBreakMetadata:t};this.OU({metadata:i,name:Tl.Z.AdBreakStart})}emitAdBreakComplete(t){const i={adType:t};this.OU({name:Tl.Z.AdBreakComplete,metadata:i})}emitPlayerResized(t){const i={playerDimensionsMetadata:t};this.OU({metadata:i,name:Tl.Z.PlayerResized})}emitOnEnterFullscreen(){this.OU({name:Tl.Z.OnEnterFullscreen})}emitOnExitFullscreen(){this.OU({name:Tl.Z.OnExitFullscreen})}emitOnPlayerCollapsed(){this.OU({name:Tl.Z.PlayerCollapsed})}emitOnPlayerExpanded(){this.OU({name:Tl.Z.PlayerExpanded})}emitAdError(t){const i={adType:t};this.OU({name:Tl.Z.AdError,metadata:i})}emitPlayError(){this.OU({name:Tl.Z.PlayError})}emitRenderError(){this.OU({name:Tl.Z.RenderError})}emitAdClickThru(t){const i={adType:t};this.OU({name:Tl.Z.AdClickThru,metadata:i})}emitAdInteraction(t){const i={adType:t};this.OU({name:Tl.Z.AdInteraction,metadata:i})}emitAdVideoStart(t,i){const e={adVideoStartMetadata:t,adType:i};this.OU({metadata:e,name:Tl.Z.AdVideoStart})}emitAdLoaded(t,i){const e={adLoadedMetadata:t,adType:i};this.OU({metadata:e,name:Tl.Z.AdLoaded})}emitAdStateChange(t,i){const e={adStateChangedMetadata:t,adType:i};this.OU({metadata:e,name:Tl.Z.AdStateChange})}emitAdVideoFirstQuartile(t){const i={adType:t};this.OU({name:Tl.Z.AdVideoFirstQuartile,metadata:i})}emitAdVideoMidpoint(t){const i={adType:t};this.OU({name:Tl.Z.AdVideoMidpoint,metadata:i})}emitAdVideoThirdQuartile(t){const i={adType:t};this.OU({name:Tl.Z.AdVideoThirdQuartile,metadata:i})}emitAdVideoComplete(t){const i={adType:t};this.OU({name:Tl.Z.AdVideoComplete,metadata:i})}emitVolumeChange(t){this.OU({name:Tl.Z.VolumeChange,metadata:{volume:t}})}emitAdVolumeChange(t){const i={adType:t};this.OU({name:Tl.Z.AdVolumeChange,metadata:i})}emitAdSkipped(t){const i={adType:t};this.OU({name:Tl.Z.AdSkipped,metadata:i})}OU(t){var i;(null===(i=null==t?void 0:t.metadata)||void 0===i?void 0:i.adType)!==l.ProtoAdType.Nonlinear&&(this._debugLogging&&console.log("Connatix Player Elements debugging: ",t),this.da.trigger(this.BU,t))}destroy(){this.OU({name:Tl.Z.Destroy}),this.da.removeAll()}}var El=o(1730);const Bl=window.parent,Ol=[],Ll=(0,e.bZ)(Js.ym,window.document.currentScript);tn.f.customerId=Ll,window.addEventListener("unload",(function(t){Ol.forEach((t=>t.destroy()))}));const Rl=(0,pi.pE)(Bl).topFrame;El.e.abServiceType=El.j.ElementsABService;const Dl=(t,i)=>i.AMP_CONTEXT_DATA||t.settings.implementationType===l.ProtoImplementationType.Amp,jl=function(t,i,n,r,h,o,a){var c,l;const u=Dl(t,Bl),d=new Cl(n,Bl,r,u,h,o,a);Ol.push(d);const p=function(){const n={id:kl,src:$s.n.endPoints.assets.css.elements};(0,pi.Up)((()=>function(t){return new Promise(((i,s)=>{if((0,e.rI)(t.id,Rl))return i();(0,e.NS)(t,Rl.document.head,Rl,(()=>i()),(t=>s(t)))}))}(n))).catch((t=>{throw(0,s.n)({message:"Prerender_Elements_Loader_add_css_link",exception:t.message,callStack:t.stack,level:s.D.INFO},{throttle:1e3}),t})).then((()=>{try{(0,e.Nb)(Bl),d.updateQueryParams(),d.loadScriptTag(t,i)?d.insertRenderer():(0,s.n)({message:"Prerender_Elements_main_no_script_tag",level:s.D.INFO},{throttle:1e3})}catch(t){(0,s.n)({message:"Prerender_Elements_main_insertRenderer",exception:t.message,callStack:t.stack,level:s.D.INFO},{throttle:1e3})}})).catch((()=>{}))};r?(d.setInappPageUrl(null===(c=null==t?void 0:t._appSettings)||void 0===c?void 0:c.appPageURL),p()):d.findPageUrl(Bl,null===(l=null==t?void 0:t.settings)||void 0===l?void 0:l.ampUrl).then((()=>p())).catch((t=>{(0,s.n)({message:"Prerender_Elements_main_init",exception:t.message,callStack:t.stack,level:s.D.INFO},{throttle:1e3}),d.registerApiError()}))};try{!function(){if((0,pi.oC)())return void(0,s.n)({message:"Prerender_Elements_main_IE_check",level:s.D.INFO},{throttle:1e3});if(!r)return;$s.n.bundleDomain=r;const i=n[r],e=r===t.elements;let h=[];Bl[i]&&(h=Bl[i].cmd),Bl[i]=function(){const t={};return t[i]=function(t){var i;t.settings=t.settings||{},t._appSettings=t._appSettings||{},t._appSettings.cmp=t._appSettings.cmp||{},t._appSettings.tcf=t._appSettings.tcf||{},t.settings.customization=t.settings.customization||{},t.settings.rendering=t.settings.rendering||{},t.settings.advertising=t.settings.advertising||{},t.settings.outstreamSettings=t.settings.outstreamSettings||{},t.settings.gallery=t.settings.gallery||{},t.settings._connatixInternals=t.settings._connatixInternals||{},t.settings.plugins=t.settings.plugins||{},t.settings.advertising.skipAdSettings=t.settings.advertising.skipAdSettings||{};return["602660809","com.thomsonreuters.reuters","12345","com.cnx.androidsdkapp"].includes(null===(i=null==t?void 0:t._appSettings)||void 0===i?void 0:i.bundleID)&&(0,s.n)({level:s.D.INFO,message:"CNX_REUTERS_APPSETTINGS",exception:JSON.stringify(t._appSettings)}),t=(t=>{var i,e,s;const n=Object.assign({},t),r=null===(i=n._appSettings)||void 0===i?void 0:i.cmp;((0,dt.QM)(null===(e=n._appSettings)||void 0===e?void 0:e.gdprConsentString)||(0,dt.QM)(null===(s=n._appSettings)||void 0===s?void 0:s.gdprParsedVendorString))&&(n._appSettings.cmp={consentString:(0,dt.QM)(null==r?void 0:r.consentString)?r.consentString:n._appSettings.gdprConsentString,parsedVendorConsents:(0,dt.QM)(null==r?void 0:r.parsedVendorConsents)?r.parsedVendorConsents:n._appSettings.gdprParsedVendorString});const h=Object.assign({},(0,Ro.EQ)(Object.assign({},n._appSettings.cmp))),o=Object.assign({},(0,Ro.EQ)(Object.assign({},n._appSettings.tcf))),{usPrivacyString:a,deviceID:c,appPageURL:l}=(0,Ro.EQ)({usPrivacyString:n._appSettings.usPrivacyString,deviceID:n._appSettings.deviceID,appPageURL:n._appSettings.appPageURL});return n._appSettings=Object.assign(Object.assign({},n._appSettings),{cmp:h,tcf:o,usPrivacyString:a,deviceID:c,appPageURL:l}),n})(t),{render:function(i,n){try{const s=(0,dt.QM)(t._appSettings.bundleID),r=(0,dt.QM)(t._appSettings.sdkVersion);r&&(t.settings.useExternalViewabilityService=tc.shouldUseExternalViewabilityService(t._appSettings.sdkVersion));const h=((t,i)=>{const{settings:{plugins:e}}=t,{cmp:s,tcf:n,usPrivacyString:r,deviceID:h}=t._appSettings,o=Dl(t,Bl);return{UserManagerService:new c.x(Rl,i,o,{cmp:s,tcf:n,usPrivacyString:r,deviceID:h}),EventsStorageService:new Ml(e._debugLogging)}})(t,s);jl(t,i,h,s,r,e,n)}catch(t){(0,s.n)({message:"Prerender_Elements_main_initPlayer",exception:t.message,callStack:t.stack,level:s.D.INFO},{throttle:1e3})}}}},t[i].cmd={push:function(t){try{t()}catch(t){(0,s.n)({message:"Prerender_Elements_main_push_callback",level:s.D.INFO,callStack:t.stack,exception:t.message},{throttle:1e3})}}},t[i].configEnums=_l,t[i].configEvents=xl,t[i]}(),h.forEach((t=>{try{t()}catch(t){(0,s.n)({message:"Prerender_Elements_main_commands_callback",exception:t.message,callStack:t.stack,level:s.D.INFO},{throttle:1e3})}}))}()}catch(t){(0,s.n)({message:"Prerender_Elements_main",exception:t.message,callStack:t.stack,level:s.D.INFO},{throttle:1e3})}})(),a=o.O(a)})();