MCPcopy Index your code
hub / github.com/GoogleChrome/lighthouse / replace

Method replace

cli/test/fixtures/unused-javascript.js:9–9  ·  view source on GitHub ↗
(t,i,e)

Source from the content-addressed store, hash-verified

7/*eslint-disable*/
8
9(()=>{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,"R",{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.B||(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.F||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.U||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,"R",{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,"R",{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.B||(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,"R",{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,"R",{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,"R",{value:!0});var s=e(250),n=function(){function t(){}var i,e,n,r,h,o,a,c,l,u,d,p,f,v,g,m,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,v=s.Fields.purposeOneTreatment,g=s.Fields.specialFeatureOptins,m=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[v]=1,t[g]=12,t[m]=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,"R",{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,"R",{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,"R",{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,"R",{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,"R",{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,v,g,m,y,b,w,x,S,_,A,P,k,I,T,C,M,E,L,O,R;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,v=s.Fields.consentLanguage,g=s.Fields.vendorListVersion,m=s.Fields.policyVersion,y=s.Fields.isServiceSpecific,b=s.Fields.useNonStandardStacks,w=s.Fields.specialFeatureOptins,x=s.Fields.purposeConsents,S=s.Fields.purposeLegitimateInterests,_=s.Fields.purposeOneTreatment,A=s.Fields.publisherCountryCode,P=s.Fields.vendorConsents,k=s.Fields.vendorLegitimateInterests,I=s.Fields.publisherRestrictions,T=s.Fields.vendorsDisclosed,C=s.Fields.vendorsAllowed,M=s.Fields.publisherConsents,E=s.Fields.publisherLegitimateInterests,L=s.Fields.numCustomPurposes,O=s.Fields.publisherCustomConsents,R=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[v]=a.LangEncoder,t[g]=o.IntEncoder,t[m]=o.IntEncoder,t[y]=n.BooleanEncoder,t[b]=n.BooleanEncoder,t[w]=h.FixedVectorEncoder,t[x]=h.FixedVectorEncoder,t[S]=h.FixedVectorEncoder,t[_]=n.BooleanEncoder,t[A]=a.LangEncoder,t[P]=l.VendorVectorEncoder,t[k]=l.VendorVectorEncoder,t[I]=c.PurposeRestrictionVectorEncoder,t.segmentType=o.IntEncoder,t[T]=l.VendorVectorEncoder,t[C]=l.VendorVectorEncoder,t[M]=h.FixedVectorEncoder,t[E]=h.FixedVectorEncoder,t[L]=o.IntEncoder,t[O]=h.FixedVectorEncoder,t[R]=h.FixedVectorEncoder,t}();i.FieldEncoderMap=u},8937:(t,i,e)=>{"use strict";Object.defineProperty(i,"R",{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,"R",{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,"R",{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,"R",{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 v=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,v){var m=h.IntEncoder.decode(t.substr(i,s.BitLength.vendorId),s.BitLength.vendorId);if(i+=s.BitLength.vendorId,m<g)throw new r.DecodingError("Invalid RangeEntry: endVendorId "+m+" is less than "+g);for(var y=g;y<=m;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,"R",{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,"R",{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 v=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,v){var m=r.IntEncoder.decode(t.substr(l,n.BitLength.vendorId),n.BitLength.vendorId);l+=n.BitLength.vendorId;for(var y=g;y<=m;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,"R",{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,"R",{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,"R",{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,"R",{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,"R",{value:!0}),s(e(4014)),s(e(1333))},1265:function(t,i){"use strict";var e,s=this&&this.B||(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,"R",{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.B||(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,"R",{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.B||(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,"R",{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.B||(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,"R",{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,"R",{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.B||(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,"R",{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,"R",{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,"R",{value:!0}),(e=i.DeviceDisclosureStorageAccessType||(i.DeviceDisclosureStorageAccessType={})).COOKIE="cookie",e.WEB="web",e.APP="app"},4731:(t,i)=>{"use strict";Object.defineProperty(i,"R",{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.B||(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,"R",{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.B||(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,"R",{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,"R",{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,"R",{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,"R",{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.B||(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){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,"R",{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,"R",{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.W={}}t.exports=i,i.prototype.on=function(t,i,e){return(this.W[t]||(this.W[t]=[])).push({fn:i,ctx:e||this}),this},i.prototype.off=function(t,i){if(void 0===t)this.W={};else if(void 0===i)this.W[t]=[];else for(var e=this.W[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.W[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,v=i.cmpVersion,g=i.consentScreen,m=i.consentLanguage,y={version:e,cmpId:s,vendorListVersion:h,allowedPurposeIds:n(o),maxVendorId:a,created:c,lastUpdated:l,cmpVersion:v,consentScreen:g,consentLanguage:m};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 w=1;w<=a;w+=1)(d&&!b[w]||!d&&b[w])&&-1===y.allowedVendorIds.indexOf(w)&&y.allowedVendorIds.push(w)}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,v,g="function"==typeof h?h(e):h;switch(r){case"int":return{fieldValue:o(i,s,g)};case"bool":return{fieldValue:(f=i,v=s,1===parseInt(f.substr(v,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.J.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.J[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.J.length;++e){var l=t.J[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.J.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.K=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.K&&(this.K=!1!==this.getOption("packed")),this.K}}),c.prototype.setOption=function(t,i,e){return"packed"===t&&(this.K=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.tt=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.tt(s.Root),s.Namespace.tt(s.Type,s.Service,s.Enum),s.Root.tt(s.Type),s.Field.tt(s.Type)},9482:(t,i,e)=>{"use strict";var s=i;function n(){s.util.tt(),s.Writer.tt(s.BufferWriter),s.Reader.tt(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.it=null}function d(t){return t.it=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.it||(this.it=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.it[n]instanceof u&&(s=this.it[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.tt=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.et(this)},r.prototype.onRemove=function(t){var i=t.root;i instanceof s&&i.st(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.tt=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.nt=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.nt.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.tt=function(t){s=t,a.create=u(),s.tt();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.tt=function(){n.Buffer&&(r.prototype.nt=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.tt()},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 v,g=0;g<i.length;++g)(v=n.resolvePath("",i[g]))&&p(v);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.et=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.et(t.it[e]);p.test(t.name)&&(t.parent[t.name]=t)}},u.prototype.st=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.st(t.it[e]);p.test(t.name)&&delete t.parent[t.name]}},u.tt=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.rt=null}function a(t){return t.rt=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.rt||(this.rt=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.rt[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),v=e(4497),g=e(3996),m=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.ht=null,this.J=null,this.ot=null,this.ct=null}function b(t){return t.ht=t.J=t.ot=null,delete t.encode,delete t.decode,delete t.verify,t}Object.defineProperties(y.prototype,{fieldsById:{get:function(){if(this.ht)return this.ht;this.ht={};for(var t=Object.keys(this.fields),i=0;i<t.length;++i){var e=this.fields[t[i]],s=e.id;if(this.ht[s])throw Error("duplicate id "+s+" in "+this);this.ht[s]=e}return this.ht}},fieldsArray:{get:function(){return this.J||(this.J=d.toArray(this.fields))}},oneofsArray:{get:function(){return this.ot||(this.ot=d.toArray(this.oneofs))}},ctor:{get:function(){return this.ct||(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.ct=t;for(var e=0;e<this.fieldsArray.length;++e)this.J[e].resolve();var s={};for(e=0;e<this.oneofsArray.length;++e)s[this.ot[e].resolve().name]={get:d.oneOfGetter(this.ot[e].oneof),set:d.oneOfSetter(this.ot[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.J[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.ht?this.ht[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.J[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=v(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=m[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.lt=null,s.ut=null,s.newBuffer=function(t){return"number"==typeof t?s.Buffer?s.ut(t):new s.Array(t):s.Buffer?s.lt(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.tt=function(){var t=s.Buffer;t?(s.lt=t.from!==Uint8Array.from&&t.from||function(i,e){return new t(i,e)},s.ut=t.allocUnsafe||function(i){return new t(i)}):s.lt=s.ut=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.J[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 v(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.dt=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.dt(v,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.dt(v,i.length(),i)},u.prototype.int64=u.prototype.uint64,u.prototype.sint64=function(t){var i=r.from(t).zzEncode();return this.dt(v,i.length(),i)},u.prototype.bool=function(t){return this.dt(p,1,t?1:0)},u.prototype.fixed32=function(t){return this.dt(g,4,t>>>0)},u.prototype.sfixed32=u.prototype.fixed32,u.prototype.fixed64=function(t){var i=r.from(t);return this.dt(g,4,i.lo).dt(g,4,i.hi)},u.prototype.sfixed64=u.prototype.fixed64,u.prototype.float=function(t){return this.dt(n.float.writeFloatLE,4,t)},u.prototype.double=function(t){return this.dt(n.float.writeDoubleLE,8,t)};var m=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.dt(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).dt(m,i,t)},u.prototype.string=function(t){var i=o.length(t);return i?this.uint32(i).dt(o.write,i,t):this.dt(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.tt=function(t){s=t,u.create=d(),s.tt()}},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.tt=function(){r.alloc=n.ut,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.lt(t,"base64"));var i=t.length>>>0;return this.uint32(i),i&&this.dt(r.writeBytesBuffer,i,t),this},r.prototype.string=function(t){var i=n.Buffer.byteLength(t);return this.uint32(i),i&&this.dt(h,i,t),this},r.tt()},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(B(e)){if(!z(t))throw new TypeError;if(!W(i))throw new TypeError;return A(t,i)}if(!z(t))throw new TypeError;if(!F(i))throw new TypeError;if(!F(s)&&!B(s)&&!D(s))throw new TypeError;return D(s)&&(s=void 0),P(t,i,e=H(e),s)}function v(t,i){function e(e,s){if(!F(e))throw new TypeError;if(!B(s)&&!G(s))throw new TypeError;E(t,i,e,s)}return e}function g(t,i,e,s){if(!F(e))throw new TypeError;return B(s)||(s=H(s)),E(t,i,e,s)}function m(t,i,e){if(!F(i))throw new TypeError;return B(e)||(e=H(e)),I(t,i,e)}function y(t,i,e){if(!F(i))throw new TypeError;return B(e)||(e=H(e)),T(t,i,e)}function b(t,i,e){if(!F(i))throw new TypeError;return B(e)||(e=H(e)),C(t,i,e)}function w(t,i,e){if(!F(i))throw new TypeError;return B(e)||(e=H(e)),M(t,i,e)}function x(t,i){if(!F(t))throw new TypeError;return B(i)||(i=H(i)),L(t,i)}function S(t,i){if(!F(t))throw new TypeError;return B(i)||(i=H(i)),O(t,i)}function _(t,i,e){if(!F(i))throw new TypeError;B(e)||(e=H(e));var s=k(i,e,!1);if(B(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(!B(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(!B(r)&&!D(r)){if(!F(r))throw new TypeError;s=r}}return s}function k(t,i,e){var s=p.get(t);if(B(s)){if(!e)return;s=new u,p.set(t,s)}var n=s.get(i);if(B(n)){if(!e)return;n=new u,s.set(i,n)}return n}function I(t,i,e){if(T(t,i,e))return!0;var s=Z(i);return!D(s)&&I(t,s,e)}function T(t,i,e){var s=k(i,e,!1);return!B(s)&&U(s.has(t))}function C(t,i,e){if(T(t,i,e))return M(t,i,e);var s=Z(i);return D(s)?void 0:C(t,s,e)}function M(t,i,e){var s=k(i,e,!1);if(!B(s))return s.get(t)}function E(t,i,e,s){k(e,s,!0).set(t,i)}function L(t,i){var e=O(t,i),s=Z(t);if(null===s)return e;var n=L(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=k(t,i,!1);if(B(s))return e;for(var n=Q(s.keys()),r=0;;){var h=Y(n);if(!h)return e.length=r,e;var o=X(h);try{e[r]=o}catch(t){try{K(n)}finally{throw t}}r++}}function R(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 B(t){return void 0===t}function D(t){return null===t}function j(t){return"symbol"==typeof t}function F(t){return"object"==typeof t?null!==t:"function"==typeof t}function $(t,i){switch(R(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(F(r))throw new TypeError;return r}return V(t,"default"===e?"number":e)}function V(t,i){if("string"===i){var e=t.toString;if(q(e))if(!F(n=e.call(t)))return n;if(q(s=t.valueOf))if(!F(n=s.call(t)))return n}else{var s;if(q(s=t.valueOf))if(!F(n=s.call(t)))return n;var n,r=t.toString;if(q(r))if(!F(n=r.call(t)))return n}throw new TypeError}function U(t){return!!t}function N(t){return""+t}function H(t){var i=$(t,3);return j(i)?i:N(i)}function z(t){return Array.isArray?Array.isArray(t):t instanceof Object?t instanceof Array:"[object Array]"===Object.prototype.toString.call(t)}function q(t){return"function"==typeof t}function W(t){return"function"==typeof t}function G(t){switch(R(t)){case 3:case 4:return!0;default:return!1}}function J(t,i){var e=t[i];if(null!=e){if(!q(e))throw new TypeError;return e}}function Q(t){var i=J(t,n);if(!q(i))throw new TypeError;var e=i.call(t);if(!F(e))throw new TypeError;return e}function X(t){return t.value}function Y(t){var i=t.next();return!i.done&&i}function K(t){var i=t.return;i&&i.call(t)}function Z(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.ft=0,this.vt=t,this.gt=i,this.yt=e}return t.prototype["@@iterator"]=function(){return this},t.prototype[n]=function(){return this},t.prototype.next=function(){var t=this.ft;if(t>=0&&t<this.vt.length){var e=this.yt(this.vt[t],this.gt[t]);return t+1>=this.vt.length?(this.ft=-1,this.vt=i,this.gt=i):this.ft++,{value:e,done:!1}}return{value:void 0,done:!0}},t.prototype.throw=function(t){throw this.ft>=0&&(this.ft=-1,this.vt=i,this.gt=i),t},t.prototype.return=function(t){return this.ft>=0&&(this.ft=-1,this.vt=i,this.gt=i),{value:t,done:!0}},t}();return function(){function i(){this.vt=[],this.gt=[],this.bt=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.xt(t,!1)>=0},i.prototype.get=function(t){var i=this.xt(t,!1);return i>=0?this.gt[i]:void 0},i.prototype.set=function(t,i){var e=this.xt(t,!0);return this.gt[e]=i,this},i.prototype.delete=function(i){var e=this.xt(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.gt[n-1]=this.gt[n];return this.vt.length--,this.gt.length--,i===this.bt&&(this.bt=t,this.wt=-2),!0}return!1},i.prototype.clear=function(){this.vt.length=0,this.gt.length=0,this.bt=t,this.wt=-2},i.prototype.keys=function(){return new e(this.vt,this.gt,s)},i.prototype.values=function(){return new e(this.vt,this.gt,r)},i.prototype.entries=function(){return new e(this.vt,this.gt,h)},i.prototype["@@iterator"]=function(){return this.entries()},i.prototype[n]=function(){return this.entries()},i.prototype.xt=function(t,i){return this.bt!==t&&(this.wt=this.vt.indexOf(this.bt=t)),this.wt<0&&i&&(this.wt=this.vt.length,this.vt.push(t),this.gt.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._t=n()}return t.prototype.has=function(t){var i=r(t,!1);return void 0!==i&&a.has(i,this._t)},t.prototype.get=function(t){var i=r(t,!1);return void 0!==i?a.get(i,this._t):void 0},t.prototype.set=function(t,i){return r(t,!0)[this._t]=i,this},t.prototype.delete=function(t){var i=r(t,!1);return void 0!==i&&delete i[this._t]},t.prototype.clear=function(){this._t=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.At=void 0,delete t.At,t}t("decorate",f),t("metadata",v),t("defineMetadata",g),t("hasMetadata",m),t("hasOwnMetadata",y),t("getMetadata",b),t("getOwnMetadata",w),t("getMetadataKeys",x),t("getOwnMetadataKeys",S),t("deleteMetadata",_)}(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.Pt=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.Pt),e},i.prototype.getValue=function(){var t=this,i=t.hasError,e=t.thrownError,s=t.Pt;if(i)throw e;return this.It(),s},i.prototype.next=function(i){t.prototype.next.call(this,this.Pt=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.It=function(){if(this.closed)throw new h},i.prototype.next=function(t){var i=this;(0,a.x)((function(){var e,n;if(i.It(),!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.It(),!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.It(),!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.It(),t.prototype.Tt.call(this,i)},i.prototype.kt=function(t){return this.It(),this.Ct(t),this.Mt(t)},i.prototype.Mt=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.Ct=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:()=>m,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=w,e}return(0,s.ZT)(i,t),i.create=function(t,i,e){return new m(t,i,e)},i.prototype.next=function(t){this.isStopped?b(function(t){return l("N",t,void 0)}(t),this):this.Et(t)},i.prototype.error=function(t){this.isStopped?b(l("E",void 0,t),this):(this.isStopped=!0,this.Lt(t))},i.prototype.complete=function(){this.isStopped?b(c,this):(this.isStopped=!0,this.Ot())},i.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this),this.destination=null)},i.prototype.Et=function(t){this.destination.next(t)},i.prototype.Lt=function(t){try{this.destination.error(t)}finally{this.unsubscribe()}},i.prototype.Ot=function(){try{this.destination.complete()}finally{this.unsubscribe()}},i}(r.w0),f=Function.prototype.bind;function v(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}(),m=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&&v(i.next,o),error:i.error&&v(i.error,o),complete:i.complete&&v(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 w={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.Bt=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.Bt;if(p){this.Bt=null;try{for(var f=(0,s.XA)(p),v=f.next();!v.done;v=f.next()){var g=v.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{v&&!v.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.Dt(this))return;i.jt(this)}(this.Bt=null!==(e=this.Bt)&&void 0!==e?e:[]).push(i)}},t.prototype.Dt=function(t){var i=this.Rt;return i===t||Array.isArray(i)&&i.includes(t)},t.prototype.jt=function(t){var i=this.Rt;this.Rt=Array.isArray(i)?(i.push(t),i):i?[i,t]:t},t.prototype.$t=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.Bt;e&&(0,h.P)(e,i),i instanceof t&&i.$t(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.Et=e?function(t){try{e(t)}catch(t){i.error(t)}}:t.prototype.Et,o.Lt=n?function(t){try{n(t)}catch(t){i.error(t)}finally{this.unsubscribe()}}:t.prototype.Lt,o.Ot=s?function(){try{s()}catch(t){i.error(t)}finally{this.unsubscribe()}}:t.prototype.Ot,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,{x:()=>r,O:()=>h});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,{Zr:()=>s,rl:()=>n,Km:()=>r,n9:()=>h});const s={FullscreenChanged:"fullscreenChanged",PlayerFloatChanged:"playerFloatChanged",FloatingEnterStart:"floatingEnterStart",FloatingEnterStop:"floatingEnterStop",FloatingExitStart:"floatingExitStart",FloatingExitStop:"floatingExitStop"},n={OmidViewabilityThreshold:"OmidViewabilityThreshold"},r=Object.assign(Object.assign(Object.assign(Object.assign({Ready:"ready",Removed:"removed",SetupError:"setupError",IsViewable:"isViewable",SizeChanged:"sizeChanged",BrandingClicked:"brandingClicked",ImpressionPrice:"impressionPrice",ImpressionRevenue:"impressionRevenue"},{Play:"play",Pause:"pause",QualityChanged:"qualityChanged",PlayError:"playError",VolumeChanged:"volumeChanged"}),s),n),{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 h;!function(t){t.SetupError="SetupError",t.NoPlayer="NoPlayer",t.RenderError="RenderError"}(h||(h={}))},2817:(t,i,e)=>{"use strict";var s,n;e.d(i,{lI:()=>s,do:()=>n,Ht:()=>r,bS:()=>h}),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,s6:()=>n,s_:()=>r,Rq:()=>h,vF:()=>o,Ig:()=>a,Ng:()=>c,iu:()=>l,ed:()=>u,QO:()=>d,Yk:()=>p,_7:()=>f,jG:()=>v,PK:()=>g,hQ:()=>m,sN:()=>b,oV:()=>w,pT:()=>x,Hs:()=>S,mr:()=>_}),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.AdOverlayType="cnx-in-ad-overlay",t.AdNonLinearType="cnx-in-ad-nonlinear",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.HideNonLinearAd="cnx-in-hide-non-linear",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"},o={Xxl:"cnx-bp-xxl-st",Xl:"cnx-bp-xl-st",Lg:"cnx-bp-lg-st",Md:"cnx-bp-md-st",Sm:"cnx-bp-sm-st",Xs:"cnx-bp-xs-st",Xxs:"cnx-bp-xxs-st"};var a,c,l,u,d,p,f;!function(t){t.Responsive="cnx-size-responsive",t.Fixed="cnx-size-fixed"}(a||(a={})),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"}(c||(c={})),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"}(l||(l={})),function(t){t.InheritTitleFontFamily="cnx-inherit-title-font-family",t.InheritBodyFontFamily="cnx-inherit-body-font-family"}(u||(u={})),function(t){t.Connatix="#0099FF",t.Icons="#FFFFFF",t.PrimaryBackground="#F1F1F1",t.PrimaryForeground="#000000",t.SecondaryBackground="#000000",t.SecondaryForeground="#F1F1F1",t.AccentForeground="#FFFFFF"}(d||(d={})),function(t){t.CaptionContainer="cnx-captions-text-holder"}(p||(p={})),function(t){t.MainClass="cnx-float",t.TransitionClass="cnx-float-transition",t.AlwaysFloating="cnx-always-floating"}(f||(f={}));const v={FadeOutBase:"cnx-fade-out-base",FadeOut:"cnx-fade-out",FadeInBase:"cnx-fade-in-base",FadeIn:"cnx-fade-in"};var g,m,y;!function(t){t.CurrentSlide="cnx-slide-current",t.NextSlide="cnx-slide-next",t.SlideLeft="cnx-slide-left",t.SlideRight="cnx-slide-right"}(g||(g={})),function(t){t.OpacityInTransition="cnx-tooltip-animation-in"}(m||(m={})),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"}(y||(y={}));const b={MainContainer:"cnx-main-container",MainContainerFlex:"cnx-main-container-flex",PlayerWrapper:"cnx-player-wrapper",ImagePlaceholder:"cnx-image-placeholder"},w="cnx-ratio",x="cnx-hide-video",S={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:()=>s,x:()=>n});const s=JSON.parse('{"version":154690,"domainPrefix":"","logToConsole":false,"logToServer":true,"env":"production"}'),n=!0},782:(t,i,e)=>{"use strict";var s,n;e.d(i,{Xh:()=>s,Uh:()=>n,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,xs:()=>h,fJ:()=>o,kd:()=>a});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,{a:()=>n,M:()=>r});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,{br:()=>s,Fk:()=>n,Kp:()=>r,a8:()=>h,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,p7:()=>n,uD:()=>r,s_:()=>h,Y0:()=>o,ti:()=>a,oG:()=>c});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,{zc:()=>s,fI:()=>n,r5:()=>r}),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,{j:()=>s,e:()=>o});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.Ut}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.zt());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.Ut&&this.Ut!==t&&(0,a.n)({message:"AdBlockerDetection_changed_after_new_global",level:a.D.INFO,exception:`${this.Ut}`},{throttle:2,sendMaxLog:!1}),this.Ut=t,this.Ut&&(this.Nt.next(!0),this.Nt.complete())}static zt(){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.Ut=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.Wt=t,this.Gt=100,this.Jt=(0,n.pE)(window).topFrame,this.Qt=s.a.indexOf(this.Wt.browser.device)>-1,this.Xt=(0,n.dz)(),this.Yt={browserType:this.Kt(),browserVersion:this.Wt.browser.browserVersion},this.Zt=this.ii(),this.ei=this.pageUrl.substr(0,this.Gt),this.si=(0,h._Y)(this.ei)}Kt(){let t;return Object.keys(r.lI).forEach((i=>{this.Wt.browser.browserType.toLowerCase().includes(r.lI[i])&&(t=r.lI[i])})),t}ii(){let t,i=0;const e=this.Wt.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.Wt.browser.device}get browser(){return this.Yt}get os(){return this.Zt}get geoLocation(){return this.Wt.geoLocation}get pageUrl(){return this.Wt.pageUrl||""}get pageUrlTrunc(){return this.ei}get pageDomain(){return this.si}get isMobile(){return this.Qt}get isInApp(){return(0,o.QM)(this.Wt.bundleID)}get isInAppAndroid(){return this.isInApp&&this.os.os===s.M.Android}get playerId(){return this.Wt.playerId}get appId(){return this.Xt}get bundleID(){return(0,o.QM)(this.Wt.iOSAppID)?this.Wt.iOSAppID:this.Wt.bundleID}get domainURL(){return this.Wt.domainURL}get storeURL(){return this.Wt.storeURL}get explorationMode(){return this.Wt.explorationMode}get appName(){return this.Wt.appName}get appCategories(){return this.Wt.appCategories}get appVersion(){return this.Wt.appVersion}get sdkVersion(){return this.Wt.sdkVersion}get appPrivacyPolicy(){return this.Wt.appPrivacyPolicy}get appIsPaid(){return this.Wt.appIsPaid}get deviceId(){return this.Wt.deviceId}get topWindow(){return this.Jt}get appPageURL(){return this.Wt.appPageURL}get isOVPDomain(){return this.Wt.isOVPDomain}}},1995:(t,i,e)=>{"use strict";e.d(i,{C:()=>s});class s{constructor(){this.ni=!1,this.promise=new Promise(((t,i)=>{this.ri=t,this.oi=i}))}ai(){this.ni||(this.ni=!0)}resolve(t){this.ai(),this.ri(t)}reject(t){this.ai(),this.oi(t)}get isPending(){return!this.ni}}},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.ci=t,this.ui=i,this.di=e,this.pi(s)}addFraudSensorScript(){if(this.ui.getElementById(o))return;const t={id:o,src:this.ci.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.ui.insertScript(t,null,"FraudSensor_script_error")}pi(t){t=(0,n.QM)(t)?t:"00000000-0000-0000-0000-000000000000";const{lookupId:i,lookupResponseCode:e,publisherAdsTxt:s,deviceIdentifier:r}=this.di,o=h[this.di.deviceType];this.ci.setPublisherId(s),this.ci.setUserId(t),this.ci.setFraudSensorMacros({lookupId:i,lookupResponseCode:e,deviceType:o,mediaType:2,deviceIdentifier:r})}}},8804:(t,i,e)=>{"use strict";e.d(i,{a:()=>z});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),v=e(7427),g=e(3030),m=e(5055),y=e(2356),b=e(1730),w=e(7272),x=e(3352),S=e(1580),_=e(3217),A=e(3810),P=e(5880),k=e(782),I=e(2820),T=e(649),C=e(7754),M=e(6284),E=e(3640),L=e(4280),O=e(2645),R=e(6243),B=e(7382),D=e(5732),j=e(4974),F=e(525),$=e(8852),V=e(7577),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())}))};const N="player_instance",H=",";class z extends P._{constructor(t,i,e,s,n,r,h){super(),this.services=t,this.GLOBAL=i,this.vi=e,this.gi=s,this.mi=n,this.yi=r,this.readyCallback=h,this.bi={},this.wi="<cnx-placeholder></cnx-placeholder>",this.xi=100,this.Si=1e3,this.isServerlessMode=!1,this._i=!1,this.Ai=[],this.Pi="{{omidVerificationClient}}",this.ki=[],this.vi&&this.Ii(),L._.detectUsingCSS(this.GLOBAL),this.Ti=(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:F.n.bundleDomain,urlParams:[(0,$.IS)(e,t.playerId)]}),i}Mi(){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}Ei(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)}Li(t,i){try{return this.Oi(t,i)}catch(t){return null}}Ri(t){let i;try{i=eval(t)}catch(e){i=t.replace(/\[(\d+)]/g,":nth-child($1)")}return i}Bi(t,i){const e=this.Li(t,i);return null===e?new Promise((e=>{setTimeout((()=>{e(this.Bi(t,i))}),this.xi)})):Promise.resolve(e)}Di(t,i){const e=this.Ri(t);return Promise.resolve(this.Bi(e,i))}Oi(t,i){let e;return t.split(/(\.cnxEq\(\d+\))/).filter((t=>t)).forEach((t=>{e=t.includes("cnxEq")?this.ji(e,t):e?e.querySelectorAll(t):(0,o.Wb)(t,i)})),e?(e.hasOwnProperty("length")&&(e=e.length>0?e[0]:null),e):null}ji(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]}Fi(){return this.gi?s.ProtoImplementationType.Amp:s.ProtoImplementationType.Web}$i(t,i){const e=(0,h.pE)(this.GLOBAL);let s;return s=(0,v.$K)(this.externalAttributes.settings.rendering.forceInsertPath)?this.externalAttributes.settings.rendering.forceInsertPath:i.forceInsertPath,new Promise(((n,r)=>{let h=(0,o.G$)(this.wi,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,I.Gj.DisplayNone),t=(0,v.QM)(this.externalAttributes.settings.rendering.containerSelector)?this.externalAttributes.settings.rendering.containerSelector:i.containerSelector,s=(0,v.$K)(this.externalAttributes.settings.rendering.insertPosition)?this.externalAttributes.settings.rendering.insertPosition:i.insertPosition,r=(0,v.$K)(this.externalAttributes.settings.rendering.position)?this.externalAttributes.settings.rendering.position:i.position,this.Di(t,e.topFrame).then((t=>{this.Vi(t,h,s,r),n({insertContainer:h,insertWindow:e.topFrame})}))}else e.topChildFrame&&!i.renderInFrame?(h=(0,o.G$)(this.wi,e.topFrame),e.topChildFrame.frameElement.parentNode.insertBefore(h,e.topChildFrame.frameElement),(0,o.cn)(e.topChildFrame.frameElement,I.Gj.DisplayNone),n({insertContainer:h,insertWindow:e.topFrame})):(t.tag.parentNode.insertBefore(h,t.tag),n({insertContainer:h}))}))}Ui(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)}}Vi(t,i,e,n){e===s.ProtoPlayerInsertMode.WithinContainer?this.Ui(t,i,n):this.Ni(t,i,e)}Hi(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:"_"})}zi(t,i){const e=t.players[i],{playerModel:n,globalDomUtilsService:r,urlSuffixerService:h}=this.bi[i];if(this.qi(t.cookieSyncUrls),this.services.UserManagerService.setGeoLocation(t.geoLocation),f.S.sessionId=e.sessionId,this.Wi.addPlayerSession(e.playerId,e.sessionId),!n)return void this.registerApiError(m.n9.SetupError,"No playlist was provided!");const o=new u.X({iOSAppID:this.vi&&!this.mi?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.yi}),a=new y.v(r),d=this.getViewabilityService(n,a);L._.detectUsingCSS(n.global);const p=new l.c(n,t.geoLocation,o.pageUrl,o.pageDomain,this.externalAttributes._appSettings,this.Ti,t.publisherNetworkCode),g={services:{GlobalDomUtilsService:r,ViewabilityService:d,TrackingService:this.Gi(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};L._.isBannerBlocked&&g.services.TrackingService.trackSessionAdBlocker(s.ProtoAdBlockDetectionTypeEnum.Banner),g.services.UserManagerService.setPageUrl(g.config.pageUrl);const b=this.Fi();g.services.TrackingService.setImplementationTypeOnMeta(b),n.externalMacros&&g.services.MacrosService.addExtraMacros(n.externalMacros),g.services.UserManagerService.onEvent([w.k.CCPA_INFO_RECEIVED]).then((()=>{g.services.MacrosService.setUsPrivacyString(g.services.UserManagerService.getUsPrivacyString())})),g.services.UserManagerService.onEvent([w.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,v.QM)(t),this.services.UserManagerService.gdprConsentMode===s.ProtoGdprConsentModeEnum.NoConsent||this.vi){const t=n.lineItemSettings.lineItems.filter((t=>(0,v.QM)(t.vendorId))).every((t=>this.services.UserManagerService.isConsent(t.vendorId)));this.services.UserManagerService.gdprConsentMode=t?s.ProtoGdprConsentModeEnum.AllGood:s.ProtoGdprConsentModeEnum.NotAllDemandConsent}}));const x={wasPlayerReloaded:this.Wi.wasPlayerReloaded(e.playerId),wasPlayerInView:this.Wi.getSessionInView(e.playerId)};this.renderer=this.getRendererInstance(n,g,x,this.externalAttributes._appSettings),this.subscribe(k.Xh.SessionView,this.renderer,(()=>{this.Wi.addSessionInView(e.playerId)})),this.subscribe(k.Xh.SessionRendered,this.renderer,(()=>{this.Qi(p,r,g.config)}));const S=Object.assign({configEnums:this.getApiConfigEnums(),configEvents:this.getApiConfigEvents()},this.renderer.getApiMethods());let _=e.customJsCode;if(_){const t=`${N}_${g.config.appId}`;this.GLOBAL[t]=S,_=_.cnx_replaceAll(`"{{${N}}}"`,`window.${t}`)}this.renderer.init((()=>{this.Xi(_)}))?this.registerApiSuccess(S):this.registerApiError(m.n9.RenderError,"Player size under supported value")}Gi(t,i,e){return t.disableTracking?new x.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})}Xi(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.Pi.includes("{{omidVerificationClient"))return;const t={useSafeMode:!1,global:window};this.Xi(decodeURI(this.Pi),t)}Yi(){const{playerId:t,parseDomain:i}=this.Ki;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(m.n9.SetupError,"player data call error"),this.te(),i}))}ie(t){return U(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.di={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.Mi(),this._i=!0),Object.keys(t.players).forEach((i=>{this.se(t,this.Ki,i)}))):this.registerApiError(m.n9.NoPlayer,`No player available for given player id:${this.Ki.playerId}`),this.te()}))}te(){this.ne(),this.re()}re(){setTimeout((()=>{if(!this._i){const t=this.Ai[0];this.readyCallback&&this.readyCallback(t.apiErrorObj,t.apiConfigObj)}this.he()}))}he(){this.Ai.filter((t=>t.apiErrorObj)).forEach((()=>{this.services.EventsStorageService.emitRenderError()}))}se(t,i,e){const s=t.players[e],{playerModel:n}=this.bi[e];this.Ei(s.renderInFrame),this.zi(t,e),this.ae(n,this.renderer.playerContainer)}Zi(t,i=!1){let e={parseDomain:i,referrer:this.Ti,pageUrl:this.pageUrl,tokens:[t]};e.bundleId=this.externalAttributes._appSettings.bundleID,this.queryParams.cnxLineItemId&&(e.forceLineItemIds=this.queryParams.cnxLineItemId.split(H).filter((t=>(0,v.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,v.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.Fi(),e.reloadedPlayers=this.Wi.getCookiePlayersSession(),e=Object.assign(Object.assign({},e),this.getSpecificRequestData()),this.Ki.playerId?this.getPlayerResponse(e,this.Ki.playerId||"serverless"):new Promise(((t,i)=>{this.isServerlessMode=!0,t(this.defaultInitFromProto())}))}ce(){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,v.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)}}ae(t,i){const e=this.getDelegateHandler(),s=new S.N(this.GLOBAL,this.services.EventsStorageService,e,t,i);this.yi?L._.isBannerBlocked||this.ki.push(L._.onAdBlockerDetected().subscribe((t=>{t||s.start()}))):s.start()}Qi(t,i,e){if(!this.di)return;const s=this.services.UserManagerService.getTrackableUser();this.di.deviceIdentifier=e.bundleID;const n=new C.P(t,i,this.di,s);this.yi?this.ki.push(L._.onAdBlockerDetected().subscribe((t=>{t||n.addFraudSensorScript()}))):n.addFraudSensorScript()}qi(t){L._.isBannerBlocked||(this.yi?this.ki.push(L._.onAdBlockerDetected().subscribe((i=>{i||this.services.UserManagerService.setThirdPartySyncUrls(t)}))):this.services.UserManagerService.setThirdPartySyncUrls(t))}le(){const t=B.$.getSessionClient(this.GLOBAL);t?this.ue=new _.Z(t,this.services.EventsStorageService,this.externalAttributes._appSettings.sdkVersion):(0,r.n)({message:"OmidSessionClient not found.",level:r.D.CRITICAL})}de(t){const i=()=>new Promise(((i,e)=>{const s=this.pe();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?V.Kp:t.bandwidthLoggingState===s.ProtoBandwidthLoggingEnum.SaaS?V.a8:void 0}setApiHostUrl(t){F.n.apiHostUrl=t}setInappPageUrl(t){(0,v.QM)(t)&&(this.pageUrl=t)}updateQueryParams(){this.queryParams=this.ce()}loadScriptTag(t,i){let e;if(this.externalAttributes=t,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(m.n9.SetupError,"Could not locate any script tag ids in the page"),!1;const s=(0,v.as)(t.settings.plugins.adobeAnalyticsSettings);return this.mi&&this.le(),this.Ki={parseDomain:s,playerId:t.playerId,tag:e},!0}insertRenderer(){try{this.Wi=new A.e(this.queryParams.cnxReloadTime),this.Ei();const t=()=>{try{this.Yi().then((t=>{const i=[];t.players.forEach(((e,s)=>{t.players[s].limitClientSideApiUse&&this.Mi();const n=this.$i(this.Ki,e).then((i=>{this.Hi(e,t.lineItems);const n=this.initUrlSuffixer(e),r=this.getPlayerModel(i,t,n,s.toString()),h=new T.m(r.global);return(0,E.u)(r.lineItemSettings.lineItems),this.bi[s]={playerModel:r,globalDomUtilsService:h,urlSuffixerService:n},this.de(h)})).catch((t=>{this.registerApiError(m.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.ie(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.ne=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.Si)}));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=m.n9.SetupError,i=""){this.Ai.push({apiErrorObj:{type:t,message:i}})}registerApiSuccess(t){this.Ai.push({apiConfigObj:t})}destroy(){this.renderer&&this.renderer.destroy(),(0,R.i)(this.ki)}}},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.fe={},this.ve={},this.ge={},this.Jt=(0,s.pE)(window).topFrame,this.me(t);try{this.ye()}catch(t){(0,n.n)({message:"PlayerReloader_cookie_fetch_failed",level:n.D.WARN,exception:t})}}wasPlayerReloaded(t){return!!this.fe[t]}addPlayerSession(t,i){this.ve[t]=i}getCookiePlayersSession(){return this.fe}addSessionInView(t){this.ve[t]+=this.SESSION_IN_VIEW_FLAG}getSessionInView(t){return this.ge[t]}me(t){setTimeout((()=>{this.be(),this.Jt.location.reload()}),t||this.RELOAD_TIME)}ye(){decodeURIComponent(this.Jt.document.cookie).split(";").forEach((t=>{const i=t.split("=");i[0].includes(this.RELOAD_COOKIES)&&(this.fe=JSON.parse(i[1]))})),this.xe(),this.Se()}xe(){Object.keys(this.fe).forEach((t=>{const i=this.fe[t].indexOf(this.SESSION_IN_VIEW_FLAG);i>-1&&(this.fe[t]=this.fe[t].substr(0,i),this.ge[t]=!0)}))}Se(){this.Jt.document.cookie=`${this.RELOAD_COOKIES}=; expires = Thu, 01 Jan 1970 00:00:00 GMT; path=/`}be(){Object.keys(this.ge).forEach((t=>{this.ve[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.Jt.document.cookie=`${this.RELOAD_COOKIES}=${JSON.stringify(this.ve)}; 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._e=t,this.Ae=i,this.Pe=(t,i)=>new Promise(((e,s)=>{h.n.sendProtoRequest({ProtoResponse:this._e,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.ke(t);return new Promise(((o,a)=>{(0,s.Up)((()=>this.Pe(t,n)),i,h).then((i=>{if((0,r.as)(i))return o(i);const e=new Error("invalid metadata");return this.Ie({url:t,metadata:i,e}),a(e)})).catch((i=>{e&&this.Ie({url:t,e:i}),a(i)}))}))}Ie(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.Ae}_${e}:${JSON.stringify(t)}`,callStack:t.e&&t.e.stack,level:n.D.CRITICAL})}ke(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.Te={}}subscribe(t,i,e){this.Te[t]||(this.Te[t]=[]),this.Te[t].push({context:i,func:e})}unsubscribe(t,i,e){this.Te[t]&&(this.Te[t]=this.Te[t].filter((t=>!(t.context===i&&(t.func===e||!e)))))}unsubscribeAll(t){Object.keys(this.Te).forEach((i=>{this.Te[i]=this.Te[i].filter((i=>i.context!==t))}))}publish(t,i,e={payload:void 0}){Object.prototype.hasOwnProperty.call(this.Te,i)&&this.Te[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.Ce=[],this.Me=t=>{this.Ce.push(t)},this.Ee=t.subscribe(this.Me)}get cachedEvents(){return this.Ce}destroy(){this.Ce=null,this.Ee()}}!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.Le=i,this.Oe=e,this.Re=s,this.Be=n,this.De=[],this.je=t=>{try{this.Fe(t);const i=this.De.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.Re.apiConfig.settings.plugins,{secondLevelDomain:h,playerId:o}=this.Re,a={cachedEvents:e,adobeAnalyticsSettings:s,moatAnalyticsSettings:n,_debugLogging:r,secondLevelDomain:h,playerId:o,pageName:this.$e,pageUrl:this.Ue,version:u.g.version,delegateHandlers:this.Oe,playerContainer:this.Be,playerWindow:window};t.getInstance().start(this.Le,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.Ne=r.topFrame,this.Ue=(0,c.lU)(r,this.Ne),this.Ue=(0,l.sH)(this.Ue),this.$e=(0,l._Y)(this.Ue)}start(){this.He(),this.ze(),this.Ne.cnxPlugins.pluginsHandlers.push(this.je)}He(){let t=[];Array.isArray(this.Ne.cnxPlugins)&&this.Ne.cnxPlugins.length>0&&(t=this.Ne.cnxPlugins,t.forEach((t=>this.je(t)))),(0,h.as)(this.Ne.cnxPlugins)||this.We(t)}ze(){const t=this.Ge();(0,a.BZ)(t)&&this.Je(t)}Qe(t){const i=this.Ne.cnxPlugins.cachedPlugins;if((0,a.BZ)(i))return i.find((i=>i.type===t))}Fe(t){this.Qe(t.type)||this.Ne.cnxPlugins.cachedPlugins.push(t)}We(t){this.Ne.cnxPlugins={cachedPlugins:t,pluginsHandlers:[],push:function(t){this.pluginsHandlers.forEach((i=>{i(t)}))}}}Je(t){t.forEach((t=>{this.Qe(t)||this.De.push({name:t,started:!1,eventsCacheHandler:new r(this.Le)})})),this.De.forEach((({name:t})=>this.Xe(t)))}Ye(t){return Object.values(t).every((t=>(0,h.QM)(t)))}Ge(){const t=[];return this.Re.apiConfig.settings.plugins.adobeAnalyticsSettings&&this.Ye(this.Re.apiConfig.settings.plugins.adobeAnalyticsSettings)&&t.push(s.AdobeAnalytics),this.Re.moatTrackingEnabled&&t.push(s.MoatAnalytics),t}Xe(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.Ne.document.getElementById(i.id)||(0,n.dZ)(i,this.Ne.document.head,this.Ne,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,{cv:()=>s,jI:()=>n,fi:()=>r,yA:()=>h,Ve:()=>o,sm:()=>a,qZ:()=>c,_f:()=>l,li:()=>u});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.Ke(t);this.Ze&&this.Ze.name===i||this.mediator.publish(this,n.StateChanged,{payload:{state:i}}),this.Ze={dimensions:t,name:i},this.ts||i!==s.Normal||(this.ts=Object.assign({},this.Ze))}setPlayerState(t){this.Ze&&this.Ze.name===t||this.mediator.publish(this,n.StateChanged,{payload:{state:t}}),this.Ze={name:t},this.ts||t!==s.Normal||(this.ts=Object.assign({},this.Ze))}get currentState(){return this.Ze&&this.Ze.name}Ke(t){if(!this.ts)return s.Normal;const{width:i,height:e}=this.ts.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.es=t,this.Le=i,this.ss=new a(this),this.ns=!1,this.rs={[h.Z.AdError]:()=>this.hs(),[h.Z.PlayError]:()=>this.cs(),[h.Z.RenderError]:()=>this.ls(),[h.Z.AdImpression]:()=>this.us(),[h.Z.AdComplete]:()=>this.ds(),[h.Z.AdVideoStart]:({adVideoStartMetadata:t})=>this.ps(t),[h.Z.AdVideoFirstQuartile]:()=>this.vs(),[h.Z.AdVideoMidpoint]:()=>this.gs(),[h.Z.AdVideoThirdQuartile]:()=>this.ys(),[h.Z.AdVideoComplete]:()=>this.bs(),[h.Z.VolumeChange]:({volume:t})=>this.ws(t),[h.Z.AdPause]:()=>this.Ss(),[h.Z.AdPlay]:()=>this._s(),[h.Z.AdSkipped]:()=>this.As(),[h.Z.AdClickThru]:()=>this.Ps(),[h.Z.AdInteraction]:()=>this.ks(),[h.Z.AdLoaded]:({adLoadedMetadata:t})=>this.Is(t),[h.Z.AdStateChange]:({adStateChangedMetadata:t})=>this.Ts(t),[h.Z.PlayerResized]:({playerDimensionsMetadata:t})=>this.Cs(t),[h.Z.OnEnterFullscreen]:()=>this.Es(),[h.Z.PlayerCollapsed]:()=>this.Ls(),[h.Z.PlayerExpanded]:()=>this.Os(),[h.Z.Destroy]:()=>this.unsubscribeAll(this.ss)},this.Rs=t=>{try{const i=this.rs[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.es,r=this.Bs(e);this.Ds=new t(r),this.js=new i(this.Ds),this.$s=new s(this.Ds),this.Le.subscribe(this.Rs),this.subscribe(n.StateChanged,this.ss,(({payload:{state:t}})=>{this.Vs(t)})),this.Us()}catch(t){(0,l.n)({message:"SessionClientWrapper_omsdk_classes_init_err",exception:t.message,callStack:t.callStack,level:l.D.WARN})}}hs(){this.Ds.error(r.jI.Video,h.Z.AdError)}cs(){this.Ds.error(r.jI.Video,h.Z.PlayError)}ls(){this.Ds.error(r.jI.Generic,h.Z.RenderError)}Bs(t){const{Partner:i,Context:e}=this.es;return new e(new i(r.cv,t))}us(){this.ns=!0,this.js.impressionOccurred();const t=this.ss.currentState;t!==s.Normal&&this.Vs(t)}ds(){this.ns=!1}ps(t){const{duration:i,mediaPlayerVolume:e}=t;this.$s.start(i,e)}vs(){this.$s.firstQuartile()}gs(){this.$s.midpoint()}ys(){this.$s.thirdQuartile()}bs(){this.$s.complete()}ws(t){this.ns&&this.$s.volumeChange(t)}Ss(){this.$s.pause()}_s(){this.$s.resume()}As(){this.$s.skipped()}Ps(){this.$s.adUserInteraction(r.fi.Click)}ks(){this.$s.adUserInteraction(r.fi.InvitationAccept)}Is(t){const{isSkippable:i,skipOffset:e,isAutoPlay:s}=t,{VastProperties:n}=this.es,r=new n(i,e,s,this.Ns);this.js.loaded(r)}Ts({state:t}){this.Ns=r.yA[o.I[t]]}Vs(t){t&&this.$s.playerStateChange(t)}zs(t){this.ss.computeState(t)}Ws(t){this.ss.setPlayerState(t)}Cs(t){this.zs(t)}Es(){this.Ws(s.Fullscreen)}Ls(){this.Ws(s.Minimized)}Os(){this.Ws(s.Normal)}Us(){this.Ds.registerSessionObserver((t=>{t.type===r.Ve.SessionStart?this.Gs(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})}))}Gs(t){t.data.creativeType===r.qZ.DefinedByJavascript&&this.Ds.setCreativeType(r.qZ.Video),t.data.impressionType===r.sm.DefinedByJavascript&&this.Ds.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,{u:()=>u,A:()=>d});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.Js(t.assets)}player.css`,playspace:`${this.Js(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`}}}Js(t){return"development"===n.g.env?`//cd.${a.bundleDomain}/`:`${t}p/${n.g.version}/`}}class a{static set bundleDomain(t){this.Qs=t}static get bundleDomain(){if(!(0,h.QM)(this.Qs))throw new Error("bundleDomain missing");return this.Qs}static set apiHostUrl(t){this.Ys=t,a.Ks=a.Zs()}static tn(t){let i=`capi{{env}}.${t}`;return this.Ys&&(i=this.Ys),{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 Zs(){const t=(0,s.Ph)("cnxEnv",(0,r.pE)(window).topFrame.location.href);t&&(n.g.domainPrefix=`-${t}`);const i=this.tn(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.Ks&&(a.Ks=a.Zs()),a.Ks}}a.Ks=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:()=>c});var s=e(8423),n=e(1561),r=e(525),h=e(3030),o=e(7726),a=e(7427);class c{constructor(t){this.createElement=(t,i=this.Ne)=>i.document.createElement(t),this.Ne=t,this.addPreconnect()}get global(){return this.Ne}addCssString(t,i=""){return(0,n.uc)(t,i,this.Ne)}addPreconnect(){(0,n.tp)(r.n.endPoints.base.video,this.Ne),(0,n.tp)(r.n.endPoints.base.core,this.Ne),(0,n.tp)(r.n.endPoints.base.image,this.Ne)}getLineHeightPropertyValue(t){return(0,n.Dx)(t,this.Ne).getPropertyValue("line-height")}getFontSizePropertyValue(t){return(0,n.Dx)(t,this.Ne).getPropertyValue("font-size")}getFontWeightPropertyValue(t){return(0,n.Dx)(t,this.Ne).getPropertyValue("font-weight")}getTransformPropertyValue(t){return(0,n.Dx)(t,this.Ne).getPropertyValue("transform")}getPaddingTopPropertyValue(t){return(0,n.Dx)(t,this.Ne).getPropertyValue("padding-top")}getPaddingBottomPropertyValue(t){return(0,n.Dx)(t,this.Ne).getPropertyValue("padding-bottom")}getMarginTopPropertyValue(t){return(0,n.Dx)(t,this.Ne).getPropertyValue("margin-top")}getMarginBottomPropertyValue(t){return(0,n.Dx)(t,this.Ne).getPropertyValue("margin-bottom")}getMarginLeftPropertyValue(t){return(0,n.Dx)(t,this.Ne).getPropertyValue("margin-left")}getMarginRightPropertyValue(t){return(0,n.Dx)(t,this.Ne).getPropertyValue("margin-right")}createElementByString(t,i=this.Ne){return(0,n.G$)(t,i)}createDocumentFragment(t=this.Ne){return t.document.createDocumentFragment()}isHttpsProtocolUsed(){return(0,n.eA)(this.Ne)}isURLSameDomainToTop(t){return(0,n.uh)(t,this.Ne)}isDetachedFromDOM(t){let i=t;for(;i.parentNode;)if(i=i.parentNode,i===this.Ne.document.body)return!1;return!0}querySelector(t,i=this.Ne){let e;try{e=i.document.querySelector(t)}catch(t){}return e}addCssStylesheetToHead(t,i,e){const s=this.Ne.document;s.getElementById(t.id)?(0,a.mf)(i)&&i():(0,n.NS)(t,s.head,this.Ne,i,e)}getFullscreenKeys(t){return(0,n.S0)(t||this.Ne.document)}exitFullscreen(t,i){(i||this.Ne.document)[t]()}getDocumentProperty(t){return this.Ne.document[t]}addEventListenerOnGlobal(t,i,e,s=!1){(e?this.Ne.document:this.Ne).addEventListener(t,i,s)}removeEventListenerOnGlobal(t,i,e,s=!1){(e?this.Ne.document:this.Ne).removeEventListener(t,i,s)}trackWithImages(t,i){(0,s.Hh)(t,this.Ne,i)}getElementCoordinates(t){let{top:i,left:e}=t.getBoundingClientRect();const{width:s,height:n}=t.getBoundingClientRect();return i+=this.Ne.pageYOffset,e+=this.Ne.pageXOffset,{clientX:e,clientY:i,width:s,height:n}}requestAnimationFrameHelper(t){return(0,n.PM)(this.Ne,t)}cancelRequestAnimationFrame(t){return(0,n.h_)(this.Ne,t)}getGlobalLocationProperties(){const t=this.Ne.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.Ne.open(t,i)}getComputedTranslateX(t){let i=0;const e=(0,n.Dx)(t,this.Ne).getPropertyValue("transform").match(/^matrix\((.+)\)$/);return(0,h.BZ)(e)&&(i=parseFloat(e[1].split(", ")[4])),i}getBodyDimensions(){try{const t=(0,s.pE)(this.Ne).topFrame.document.body;let{offsetWidth:i,offsetHeight:e}=t;const r=(0,n.Dx)(t,this.Ne);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.Ne).topFrame.document.body.clientWidth}getViewportHeight(){return(0,s.pE)(this.Ne).topFrame.innerHeight}getGlobalClosestTop(){return(0,s.pE)(this.Ne)}stripHtmlTags(t){return(0,n.ju)(t,this.Ne)}getComputedStyle(t,i){return(0,n.Dx)(t,this.Ne,i)}getElementById(t){return(0,n.rI)(t,this.Ne)}getElementsByClassName(t){return(0,n.Fs)(t,this.Ne)}insertScript(t,i,e){this.Ne.document.getElementById(t.id)?(0,a.mf)(i)&&i():(0,n.dZ)(t,this.Ne.document.head,this.Ne,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,{qs:()=>s,HT:()=>n,WR:()=>r,Av:()=>h}),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.en=t,this.Qt=i,this.mediator=null,this.nn=30,this.rn=250,this.hn=25,this.an=[],this.ln={},this.un=0,this.dn=0,this.pn=!0,this.vn=null,this.gn=!1,this.mn=!1,this.yn=!1,this.bn=!1,this.wn=0,this.xn=0,this.Sn=null,this._n=null,this.An=null,this.Pn=!0,this.kn=!1,this.In=t=>{this.Qt?(t.element.addEventListener("touchstart",this.Tn,{passive:!0}),t.element.addEventListener("touchmove",this.Cn,{passive:!0}),t.element.addEventListener("touchend",this.Mn),t.element.addEventListener("touchcancel",this.En),t.element.addEventListener("mouseup",this.Ln)):(t.element.addEventListener("mousedown",this.Rn),t.element.addEventListener("mouseup",this.Ln))},this.Bn=t=>{this.Qt?(t.element.removeEventListener("touchstart",this.Tn),t.element.removeEventListener("touchmove",this.Cn),t.element.removeEventListener("touchend",this.Mn),t.element.removeEventListener("touchcancel",this.En),t.element.removeEventListener("mouseup",this.Ln)):(t.element.removeEventListener("mousedown",this.Rn),t.element.removeEventListener("mouseup",this.Ln))},this.Tn=t=>{t.stopPropagation();const i=this.Dn(t);this.An=i,this.mn=!1,this.jn(i,r.WR.Hold)&&this.Fn(t);const e=this.$n(t);this.dn=e.eventX,this.un=e.eventY,this.Vn(t,i,r.HT.InteractionStart),this.pn=!0},this.Cn=t=>{t.stopPropagation();const i=this.Dn(t),e=this.$n(t);if(this.pn&&(Math.abs(e.deltaXFromStart)>this.hn||Math.abs(e.deltaYFromStart)>this.hn)&&(this.pn=!1),this.gn||this.jn(i,r.WR.Swipe)){if(null===this.Sn&&this.Un(i,e),this.Sn===r.qs.Y)return;null===this._n&&(this._n=(0,o.PM)(this.en,(()=>{this._n=null,this.Hn(e.deltaXFromStart),i.mediator.publish(i.context,n.Z[n.Z.SwipeMove],{payload:e.deltaXFromStart})})))}},this.Mn=t=>{const i=this.Dn(t);if(this.kn=!1,this.An===i){const e=this.$n(t);t.cancelable&&this.jn(i,r.WR.Hold)&&Math.abs(e.deltaXFromStart)<this.hn&&Math.abs(e.deltaYFromStart)<this.hn&&t.preventDefault(),this.zn(t,i,e);this.qn(e)===r.qs.Y&&Math.abs(e.deltaYFromStart)>=this.hn?this.Pn&&i.mediator.publish(i.context,n.Z[n.Z.Scroll]):!this.pn||this.yn||this.mn||(this.kn=!0)}this.An=null},this.En=t=>{const i=this.Dn(t);this.zn(t,i),this.An=null},this.Rn=t=>{if(!c(t))return void this.Wn(r.HT.InteractionStart,t);const i=this.Dn(t);this.An=i,t.stopPropagation(),t.preventDefault(),this.jn(i,r.WR.Hold)&&this.Fn(t),this.Vn(t,i,r.HT.InteractionStart)},this.Ln=t=>{const i=this.Dn(t);return this.kn?(i.mediator.publish(i.context,n.Z[n.Z.Click]),void(this.kn=!1)):c(t)&&this.An?(t.stopPropagation(),t.preventDefault(),this.Vn(t,this.An,r.HT.Interaction),this.Vn(t,this.An,r.HT.InteractionEnd),(this.gn||this.jn(i,r.WR.Hold))&&this.Gn(t),this.An===i&&(this.Vn(t,i,r.HT.Click),i.mediator.publish(i.context,n.Z[n.Z.Click])),void(this.An=null)):(this.Wn(r.HT.Interaction,t),void this.Wn(r.HT.InteractionEnd,t))},this.Jn=t=>{if(!c(t))return this.Wn(r.HT.Interaction,t),void this.Wn(r.HT.InteractionEnd,t);this.An=null},this.Qn=t=>{if(!c(t)||!this.An)return this.Wn(r.HT.Interaction,t),void this.Wn(r.HT.InteractionEnd,t);this.Vn(t,this.An,r.HT.Interaction),this.Vn(t,this.An,r.HT.InteractionEnd),(this.gn||this.jn(this.An,r.WR.Hold))&&this.Gn(t),this.An=null};const{leftTapSizeThreshold:s,holdTriggerDuration:h,scrollThreshold:a}=Object.assign({},e);this.nn=s||this.nn,this.rn=h||this.rn,this.hn=a||this.hn,this.en.document.addEventListener("mousedown",this.Jn),this.en.document.addEventListener("mouseup",this.Qn)}register(t,i,e,s={},n=[]){const r={element:t,mediator:i,context:e,callbacks:s||{},allowedSpecialInteractions:n,disabledSpecialInteractions:[]};this.an.push(r),this.In(r)}unregister(t){const i=this.an.find((i=>i.element===t));i&&(this.an=this.an.filter((i=>i.element!==t)),this.Bn(i))}unregisterAll(t){const i=this.an.filter((i=>i.mediator===t));i.forEach(this.Bn),this.an=(0,h.V7)(this.an,i)}addGlobalActions(t,i){Object.keys(Object.assign({},i)).forEach((e=>{this.ln[e]=this.ln[e]||[],this.ln[e].push({initiator:t,action:i[e]})}))}removeGlobalActions(t){Object.keys(this.ln).forEach((i=>{this.ln[i].some((i=>i.initiator===t))&&(this.ln[i]=this.ln[i].filter((i=>i.initiator!==t)))}))}disableSpecialInteractions(t){const i=this.Xn(t);i&&(i.disabledSpecialInteractions=(0,h.gX)(i.allowedSpecialInteractions))}enableSpecialInteractions(t){const i=this.Xn(t);i&&(i.disabledSpecialInteractions=[])}getNonInterruptibleInteractions(){return[n.Z.HoldStart,n.Z.HoldEnd,n.Z.SwipeMove,n.Z.SwipeEnd,n.Z.Scroll]}disableScrollEvent(){this.Pn=!1}enableScrollEvent(){this.Pn=!0}destroy(){clearTimeout(this.vn),this.an.forEach(this.Bn),this.en.document.removeEventListener("mousedown",this.Jn),this.en.document.removeEventListener("mouseup",this.Qn)}Yn(t){const i=this.Dn(t),e=i.element.getBoundingClientRect(),s=this.Kn(t),n=e.width,r=(0,l.dQ)(0,n,0,100,s);this.Zn(i,this.nn,r)}Zn(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])}Fn(t){clearTimeout(this.vn),this.gn=!1,this.yn=!1;const i=this.Dn(t);(0,o.cn)(i.element,s.Gj.OnHold),this.vn=setTimeout((()=>{this.gn=!0,this.pn&&(this.yn=!0,i.mediator.publish(i.context,n.Z[n.Z.HoldStart]))}),this.rn)}Gn(t){clearTimeout(this.vn);const i=this.Dn(t);(0,o.IV)(i.element,s.Gj.OnHold),this.gn?(this.gn=!1,this.yn&&(this.yn=!1,i.mediator.publish(i.context,n.Z[n.Z.HoldEnd]))):(this.mn=!0,this.Yn(t))}zn(t,i,e){e=e||this.$n(t),t.stopPropagation(),this.Vn(t,i,r.HT.Interaction),this.Vn(t,i,r.HT.InteractionEnd),(this.gn||this.bn||this.pn&&this.jn(i,r.WR.Hold))&&this.Gn(t),(this.bn||this.jn(i,r.WR.Swipe))&&this.tr(i,e)}Un(t,i){this.Sn=this.qn(i),this.Sn===r.qs.X&&(this.bn=!0,this.gn||(clearTimeout(this.vn),this.vn=null,this.gn=!0,t.mediator.publish(t.context,n.Z[n.Z.HoldStart])))}tr(t,i){if(this.bn){const e=this.ir(i);t.mediator.publish(t.context,n.Z[n.Z.SwipeEnd],{payload:e})}(0,o.h_)(this.en,this._n),this._n=null,this.bn=!1,this.dn=null,this.un=null,this.Sn=null,this.wn=0,this.xn=0}Hn(t){this.xn<this.hn?this.xn++:(this.wn=t,this.xn=0)}qn(t){return Math.abs(t.deltaXFromStart)>=Math.abs(t.deltaYFromStart)?r.qs.X:r.qs.Y}ir(t){return t.deltaXFromStart-this.wn<0?r.Av.Left:r.Av.Right}$n(t){const i=t.changedTouches[0];return{deltaXFromStart:i.clientX-this.dn,deltaYFromStart:i.clientY-this.un,eventX:i.clientX,eventY:i.clientY}}Dn(t){return this.An||this.Xn(t.currentTarget)}Xn(t){return this.an.find((i=>i.element===t))}Kn(t){const i=this.Dn(t);if(this.Qt){return t.changedTouches[0].clientX-i.element.getBoundingClientRect().left}return t.offsetX}jn(t,i){return t.allowedSpecialInteractions.includes(i)&&!t.disabledSpecialInteractions.includes(i)}Vn(t,i,e){const s=i.callbacks[e];(0,u.mf)(s)&&s(t),this.Wn(e,t)}Wn(t,i){var e;null===(e=this.ln[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.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.er=new Map,this.sr="[",this.nr="]",this.er.set(n.Autoplay,t.playbackMode===r.ProtoPlayerPlaybackModeEnum.Autoplay),this.er.set(n.UserAgent,navigator.userAgent),this.er.set(n.UserLong,i.lon),this.er.set(n.UserLat,i.lat),this.er.set(n.Ip,i.ip),this.rr(h),this.hr(o),this.ar(e),this.cr(),this.er.set(n.Domain,s),this.er.set(n.CnxSupplierId,a.kd),this.er.set(n.SessionId,t.sessionId),(0,c.QM)(l)&&this.er.set(n.AdxPublisherNetworkCode,`,${l}`)}rr(t){this.er.set(n.AppBundle,t.bundleID),this.er.set(n.AppName,t.appName),this.er.set(n.AppUrl,t.storeURL)}hr(t){this.er.set(n.SourceReferrer,t)}cr(){const t=(0,o.w6)()?1:0;this.er.set(n.DoNotTrack,t)}ar(t){this.er.set(n.PageUrl,t),this.er.set(n.Url,t),this.er.set(n.Publisher,t),this.er.set(n.Site,t),this.er.set(n.DescriptionUrl,t)}lr(){const t=(0,h.qs)();this.er.set(n.CashBuster,t),this.er.set(n.Random,t),this.er.set(n.Ctd,t)}ur(t){return t.split("?")[0]}dr(t){return t.split("?").slice(1).join("?")}pr(t,i){const e=this.ur(t),s=this.vr(this.dr(t),i);return`${e}${s?`?${s}`:""}`}vr(t,i,e=!1){let n=t;const r=n.split("&"),h=[this.sr,this.nr];try{r.forEach((t=>{const r=t.split("=");if(r[1])if(s.isMacroString(r[1],h))n=n.replace(r[1],this.gr(r[1].toLowerCase(),i,e));else if(decodeURIComponent(r[1]).split("=").length>1){const t=this.vr(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.yr(n,i),this.wr(n)}wr(t){return t.includes(this.sr)&&(t=t.cnx_replaceAll(this.sr,encodeURIComponent(this.sr))),t.includes(this.nr)&&(t=t.cnx_replaceAll(this.nr,encodeURIComponent(this.nr))),t}gr(t,i,e){let s,n=t;return i.forEach(((t,i)=>{for(;n.includes(this.sr+i.toLowerCase()+this.nr);)s=e?t:encodeURIComponent(t),n=n.replace(this.sr+i.toLowerCase()+this.nr,s)})),n}yr(t,i){const e=`${this.sr}${n.AdxPublisherNetworkCode}${this.nr}`;return t.includes(e)?i.has(n.AdxPublisherNetworkCode)?t.cnx_replaceAll(e,i.get(n.AdxPublisherNetworkCode)):t.cnx_replaceAll(e,""):t}setAdWidth(t){this.er.set(n.Width,Math.floor(t))}setAdHeight(t){this.er.set(n.Height,Math.floor(t))}setSubId(t){this.er.set(n.SubId,t)}setGDPR(t){this.er.set(n.Gdpr,t)}setUUID(t){this.er.set(n.Uuid,t)}setGDPRConsent(t){this.er.set(n.GdprConsent,t)}setConsent(t){this.er.set(n.Consent,t)}setVideoId(t){this.er.set(n.VideoId,t)}setVideoTime(t){this.er.set(n.VideoTime,Math.floor(t))}setVideoUrl(t){this.er.set(n.VideoUrl,t)}setVideoDescription(t){this.er.set(n.VideoDescription,t)}setVideoDuration(t){this.er.set(n.VideoDuration,t),this.er.set(n.ContentLength,t)}setVideoTitle(t){let i;this.er.set(n.VideoTitle,t),this.er.set(n.MediaTitle,t),t&&(i=t.split(" ").join(",")),this.er.set(n.VideoKeywords,i)}setAdPosition(t="midRoll"){this.er.set(n.AdPosition,t)}setupMacros(t){return this.lr(),this.pr(t,this.er)}replaceMacrosInJsonString(t){const i=[this.sr,this.nr],e=JSON.parse(t),n=s.searchAndReplaceMacrosInJson(e,this.er,i);return JSON.stringify(n)}addExtraMacros(t){const i=Object.values(n);Object.keys(t).filter((t=>!i.includes(t.toUpperCase()))).forEach((i=>{this.er.set(i,t[i])}))}getExtraMacros(){const t=Object.values(n),i={};return this.er.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.er.set(n.UsPrivacyString,i)}setUserId(t){this.er.set(n.FraudSensorUserId,t)}setPublisherId(t){this.er.set(n.PublisherId,t)}setFraudSensorMacros(t){this.er.set(n.FraudSensorDeviceType,t.deviceType),this.er.set(n.FraudSensorLookupId,t.lookupId),this.er.set(n.FraudSensorLookupResponseCode,t.lookupResponseCode),this.er.set(n.FraudSensorMediaType,t.mediaType),this.er.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.Sr=t,this._r=[],this.Ar(),this.Pr()}on(t){this._r.push(t),t(this.isDocumentVisible())}off(t){this._r=this._r.filter((i=>i!==t))}Ar(){void 0!==this.Sr.getDocumentProperty(s.hidden)?(this.kr=s.hidden,this.Ir=n.visibilitychange):void 0!==this.Sr.getDocumentProperty(s.msHidden)?(this.kr=s.msHidden,this.Ir=n.msvisibilitychange):void 0!==this.Sr.getDocumentProperty(s.webkitHidden)&&(this.kr=s.webkitHidden,this.Ir=n.webkitvisibilitychange)}Pr(){this.Sr.addEventListenerOnGlobal(this.Ir,(()=>{this._r.forEach((t=>{t(this.isDocumentVisible())}))}),!0,!1)}isDocumentVisible(){return!this.Sr.getDocumentProperty(this.kr)}}},7398:(t,i,e)=>{"use strict";e.d(i,{a:()=>q});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)},v="undefined"!=typeof window?window:{},g=new WeakMap,m=/auto|scroll/,y=/^tb|vertical/,b=/msie|trident/i.test(v.navigator&&v.navigator.userAgent),w=function(t){return parseFloat(t||"0")},x=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)},S=c({devicePixelContentBoxSize:x(),borderBoxSize:x(),contentBoxSize:x(),contentRect:new u(0,0,0,0)}),_=function(t,i){if(void 0===i&&(i=!1),g.has(t)&&!i)return g.get(t);if(p(t))return g.set(t,S),S;var e=getComputedStyle(t),s=d(t)&&t.ownerSVGElement&&t.getBBox(),n=!b&&"border-box"===e.boxSizing,r=y.test(e.writingMode||""),h=!s&&m.test(e.overflowY||""),o=!s&&m.test(e.overflowX||""),a=s?0:w(e.paddingTop),l=s?0:w(e.paddingRight),f=s?0:w(e.paddingBottom),v=s?0:w(e.paddingLeft),_=s?0:w(e.borderTopWidth),A=s?0:w(e.borderRightWidth),P=s?0:w(e.borderBottomWidth),k=v+l,I=a+f,T=(s?0:w(e.borderLeftWidth))+A,C=_+P,M=o?t.offsetHeight-C-t.clientHeight:0,E=h?t.offsetWidth-T-t.clientWidth:0,L=n?k+T:0,O=n?I+C:0,R=s?s.width:w(e.width)-L-E,B=s?s.height:w(e.height)-O-M,D=R+k+E+T,j=B+I+M+C,F=c({devicePixelContentBoxSize:x(Math.round(R*devicePixelRatio),Math.round(B*devicePixelRatio),r),borderBoxSize:x(D,j,r),contentBoxSize:x(R,B,r),contentRect:new u(v,a,R,B)});return g.set(t,F),F},A=function(t,i,e){var n=_(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=_(t);this.target=t,this.contentRect=i.contentRect,this.borderBoxSize=c([i.borderBoxSize]),this.contentBoxSize=c([i.contentBoxSize]),this.devicePixelContentBoxSize=c([i.devicePixelContentBoxSize])},k=function(t){if(p(t))return 1/0;for(var i=0,e=t.parentNode;e;)i+=1,e=e.parentNode;return i},I=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=k(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},T=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()&&(k(e.target)>t?i.activeTargets.push(e):i.skippedTargets.push(e))}))}))},C=function(){var t,i=0;for(T(i);h.some((function(t){return t.activeTargets.length>0}));)i=I(),T(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()},L=0,O={attributes:!0,characterData:!0,childList:!0,subtree:!0},R=["resize","load","transitionend","animationend","animationstart","animationiteration","keyup","keydown","mouseup","mousedown","mouseover","mouseout","blur","focus"],B=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=B(t);e=function(){var e=!1;try{e=C()}finally{if(D=!1,t=s-B(),!L)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():v.addEventListener("DOMContentLoaded",i)},t.prototype.start=function(){var t=this;this.stopped&&(this.stopped=!1,this.observer=new MutationObserver(this.listener),this.observe(),R.forEach((function(i){return v.addEventListener(i,t.listener,!0)})))},t.prototype.stop=function(){var t=this;this.stopped||(this.observer&&this.observer.disconnect(),R.forEach((function(i){return v.removeEventListener(i,t.listener,!0)})),this.stopped=!0)},t}()),F=function(t){!L&&t>0&&j.start(),!(L+=t)&&j.stop()},$=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}(),V=function(t,i){this.activeTargets=[],this.skippedTargets=[],this.observationTargets=[],this.observer=t,this.callback=i},U=new WeakMap,N=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 V(t,i);U.set(t,e)},t.observe=function(t,i,e){var s=U.get(t),n=0===s.observationTargets.length;N(s.observationTargets,i)<0&&(n&&h.push(s),s.observationTargets.push(new $(i,e&&e.box)),F(1),j.schedule())},t.unobserve=function(t,i){var e=U.get(t),s=N(e.observationTargets,i),n=1===e.observationTargets.length;s>=0&&(n&&h.splice(h.indexOf(e),1),e.observationTargets.splice(s,1),F(-1))},t.disconnect=function(t){var i=this,e=U.get(t);e.observationTargets.slice().forEach((function(e){return i.unobserve(t,e.target)})),e.activeTargets.splice(0,e.activeTargets.length)},t}(),z=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 q{constructor(t){this.Tr=[],this.Cr=(t,i)=>{t.forEach((t=>{this.Mr(t.target).forEach((t=>{t&&((0,r.Tp)(t.element),t.callback(t.element))}))}))};try{const i=t.ResizeObserver||z;this.Er=new i(this.Cr)}catch(t){(0,n.n)({message:"ResizeObserver_constructor",callStack:t.stack,exception:t.message,level:n.D.CRITICAL})}}on(t,i){this.Lr(t,i)||(this.Tr.push({element:t,callback:i}),this.Er.observe(t))}off(t,i){const e=this.Lr(t,i);if(!e)return;this.Er.unobserve(e.element);const s=this.Tr.indexOf(e);s>=0&&this.Tr.splice(s,1)}destroy(){if(this.Tr)for(;this.Tr.length>0;)this.Tr.pop();this.Er.disconnect()}Mr(t){return this.Tr.filter((i=>i.element===t))}Lr(t,i){return this.Tr.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)),v=e(4974),g=e(1886),m=e(9115);class y{constructor(){this.Or=null,this.Rr=0}Br(){if(null===this.Or)return;const t=(new Date).getTime();this.Rr=t-this.Or}startCountingTime(){this.Or=(new Date).getTime()}stopCountingTime(){this.Br(),this.Or=null}fetchTime(t){this.Br();const i=Math.round(this.Rr/m.s_);return this.Rr=0,null!==this.Or&&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,Dr:a,userManagerService:l,customParam1:p,customParam2:v,customParam3:g,customParam4:m,customParam5:b,abTestId:w,explorationMode:x,bundleAbId:S,bundlePart:_}){super(),this.hasGdprConsentPayload=!1,this.jr={},this.Fr={},this.$r=!1,this.Vr=!1,this.Ur=!1,this.Nr=!1,this.Hr=[],this.zr=[],this.qr=[],this.Wr=5e3,this.Gr=!1,this.Jr=[{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.Qr=0,this.Xr=0,this.Yr=0,this.Kr=new f.x,this.th=new f.x,this.ih=new f.x;(0,d.d3)(i,[])?this.jr.trackAllRequests=!0:this.jr.trackAllRequests=1===(0,u.Vm)([99,1]),this.eh=l,this.jr.userId=t,this.jr.playerId=i,this.jr.geo=e,this.jr.browser=s,this.jr.version=r.g.version,this.jr.sessionId=n,this.jr.clientAb0=c.e.clientAb0,this.jr.clientAb1=c.e.clientAb1,this.jr.serverAb0=c.e.serverAb0,this.jr.serverAb1=c.e.serverAb1,this.jr.pageUrl=h,this.jr.bundleId=o,this.jr.customParam1=p,this.jr.customParam2=v,this.jr.customParam3=g,this.jr.customParam4=m,this.jr.customParam5=b,this.jr.bundleAbId=S,this.jr.bundlePart=_,this.jr.abTestId=w,this.sh=new y,this.nh=new y,this.rh=x}hh(t,i=n.ProtoTrackingRequest,e,r=!0){return this.jr.pageInFocus=p.S.pageFocus,s.n.sendProtoBeaconRequest({endpoint:t,ProtoRequest:i,requestData:Object.assign({trackingRequestMeta:r?this.jr:void 0},e),logError:!1})}oh(t,i=n.ProtoTrackingRequest,e){this.jr.pageInFocus=p.S.pageFocus;const h=s.n.sendProtoRequest({endpoint:t,ProtoRequest:i,ProtoResponse:n.ProtoTrackingResponse,requestData:Object.assign({trackingRequestMeta:this.jr},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.Kr.next(s);const{impressionRevenue:n,adServerLineItemName:r}=t;if((0,a.r)(n)&&(0,a.QM)(r)&&this.th.next({impressionRevenue:n,adServerLineItemName:r}),(0,a.$K)(t.viewability)){const s=null===(i=e)||void 0===i?void 0:i.advertiserLineItemId;this.ih.next([s,t.viewability])}})).catch((t=>{})),h}ah(t,i,e=n.ProtoMediaTrackingRequest){const s=Object.assign({},i);(0,a.QM)(this.Fr.mediaId)&&(s.mediaGuid=this.Fr.mediaId),this.oh(t,e,s)}lh(){var t;this.Gr||(this.Gr=!0,this.oh(h.n.endPoints.tracking.playerStart,n.ProtoPlayerStartRequest,{pageInsightIndexes:null===(t=v.k.pageInsights)||void 0===t?void 0:t.insights}))}dh(t,i,e=n.ProtoMediaTrackingRequest){var s;return this.oh(t,e,Object.assign({mediaGuid:this.Fr.mediaId,insightIndexes:this.Fr.insights,sentimentAnalysis:this.Fr.sentimentAnalysis,pageInsightIndexes:null===(s=v.k.pageInsights)||void 0===s?void 0:s.insights},i))}ph(t){this.ah(h.n.endPoints.tracking.media_quartile,{baseMeta:this.Fr,mediaId:this.Fr.mediaId,insightIndexes:this.Fr.insights,sentimentAnalysis:this.Fr.sentimentAnalysis,quartile:t})}fh(){this.gh(this.zr,this.Hr,this.qr),this.zr=[],this.Hr=[],this.qr=[]}gh(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.Fr.mediaId,prebids:t,bids:i,postBids:e,logEveryting:this.jr.trackAllRequests,hasGdprConsentPayload:this.hasGdprConsentPayload,gdprConsentMode:this.eh.gdprConsentMode,useExploration:this.rh};this.oh(h.n.endPoints.tracking.bids,n.ProtoBidTrackingsRequest,s)}mh(t){var i;this.oh(h.n.endPoints.tracking.ad_click,n.ProtoAdClickTrackingRequest,Object.assign({mediaGuid:this.Fr.mediaId,insightIndexes:this.Fr.insights,sentimentAnalysis:this.Fr.sentimentAnalysis,pageInsightIndexes:null===(i=v.k.pageInsights)||void 0===i?void 0:i.insights},t))}yh(t){this.hh(h.n.endPoints.tracking.heavy_ad_intervention,n.ProtoHeavyAdTrackingRequest,t)}bh(){const t=this.Jr[this.Qr];clearTimeout(this.wh),this.wh=setTimeout((()=>{this.xh(t.delay),(0,a.r)(t.timesRepeatDelay)&&t.timesRepeatDelay--,0===t.timesRepeatDelay&&this.Qr++,this.bh()}),1e3*t.delay)}xh(t){var i;this.oh(h.n.endPoints.tracking.session_time,n.ProtoSessionTimeTrackingRequest,{trackingRequestMeta:this.jr,sessionTime:t,timePlayed:this.sh.fetchTime(t),timePlayedInView:this.nh.fetchTime(t),pageInsightIndexes:null===(i=v.k.pageInsights)||void 0===i?void 0:i.insights})}Sh(t){return t.playerWidth=this.Xr,t.playerHeight=this.Yr,t}get onLineItemPlatformCapped(){return this.Kr.asObservable()}get onLineItemViewabilityChange(){return this.ih.asObservable()}get onImpressionRevenue(){return this.th.asObservable()}setNewMedia(t){this.Fr=t}updateMediaMetadata(t){this.Fr=t}setImplementationTypeOnMeta(t){this.jr.implementationType=t}setMediaStart(){this.ph(n.ProtoQuartilesEnum.Start)}setContentStart(){this.lh()}setSessionPlayback(t){this.Ur!==t&&(this.Ur=t,this.Nr&&this.Ur&&this.nh.startCountingTime(),this.Ur?this.sh.startCountingTime():(this.sh.stopCountingTime(),this.nh.stopCountingTime()))}setSessionViewability(t){this.Nr!==t&&(this.Nr=t,this.Nr&&this.Ur?this.nh.startCountingTime():this.Nr||this.nh.stopCountingTime())}trackSessionRendered(t){var i;if(this.$r)return;this.oh(h.n.endPoints.tracking.session_rendered,n.ProtoTrackingRequest,{playerHeight:this.Yr,playerWidth:this.Xr,hasAdBlocker:t,bundleName:"connatix.playspace.js",pageInsightIndexes:null===(i=v.k.pageInsights)||void 0===i?void 0:i.insights}),this.$r=!0,this.bh()}trackSessionViewability(){var t;!this.Vr&&this.Gr&&(this.oh(h.n.endPoints.tracking.session_view,n.ProtoSessionViewRequest,{pageInsightIndexes:null===(t=v.k.pageInsights)||void 0===t?void 0:t.insights}),this.Vr=!0)}trackMediaQuartile(t){this.ph(t)}trackMediaClick(t=n.ProtoMediaClickTypeEnum.Click){const i={type:t,clickUrl:t===n.ProtoMediaClickTypeEnum.UrlClick?this.Fr.clickUrl:void 0,insightIndexes:this.Fr.insights,sentimentAnalysis:this.Fr.sentimentAnalysis,slideTitle:this.Fr.slideTitle,slideNumber:this.Fr.slideNumber,slideMediaType:this.Fr.slideMediaType};this.ah(h.n.endPoints.tracking.media_click,i,n.ProtoMediaClickTrackingRequest)}setAdStart(){this.lh()}startBidTrackingInterval(){this._h=setInterval((()=>{this.fh()}),this.Wr)}addPrebid(t){t=this.Sh(t),this.zr.push(t)}addPostBid(t){t=this.Sh(t),(0,a.HD)(t.error)||(t.error=JSON.stringify(t.error)),this.qr.push(t)}addBid(t){t=this.Sh(t),this.Hr.push(t)}trackAuctionInfoForBid(t){this.oh(h.n.endPoints.tracking.auctionInformation,n.ProtoAuctionInfoRequest,t)}trackVideoAdImpression(t){return t=this.Sh(t),this.dh(h.n.endPoints.tracking.ad_impression,t,n.ProtoVideoAdImpressionRequest)}trackVideoAdImpressionViewable(t){return this.dh(h.n.endPoints.tracking.ad_impression_viewable,t,n.ProtoVideoAdImpressionViewableRequest)}trackVideoAdQuartile(t){var i;t=Object.assign(Object.assign({},t),{insightIndexes:this.Fr.insights,sentimentAnalysis:this.Fr.sentimentAnalysis,pageInsightIndexes:null===(i=v.k.pageInsights)||void 0===i?void 0:i.insights}),this.ah(h.n.endPoints.tracking.ad_quartile,t,n.ProtoVideoAdQuartilesRequest)}trackAdClick(t){this.mh(t)}trackAdOpportunity(t){var i;const{sessionId:e}=this.jr;t.sessionId=e,t.pageInsightIndexes=null===(i=v.k.pageInsights)||void 0===i?void 0:i.insights,this.oh(h.n.endPoints.tracking.adOpportunity,n.ProtoAdOpportunityRequest,t)}trackSessionAdBlocker(t){this.oh(h.n.endPoints.tracking.sessionAdBlocker,n.ProtoSessionAdBlockerRequest,{trackingRequestMeta:this.jr,adBlockDetectionType:t})}getMetadataModel(){return this.jr}getPlayerSize(){return{playerWidth:this.Xr,playerHeight:this.Yr}}updateMetadataModel(t){this.jr=Object.assign(Object.assign({},this.jr),t)}updatePlayerDimensions(t,i){this.Xr=t,this.Yr=i}trackHeavyAdIntervention(t){this.yh(t)}destroy(){clearInterval(this.wh),clearInterval(this._h)}}},2645:(t,i,e)=>{"use strict";e.d(i,{f:()=>h});var s=e(3030),n=e(6615),r=e(7427);class h{constructor(){this.Ah={},this.kh={domain:"",urlParams:[]},this.ignoredDomains=[]}setQueryParams(t){this.Ah=t}setUrlParams(t){this.kh=t}appendParamsToUrl(t){return this.isIgnoredDomain(t)?t:this.Ih(t)}appendQueryParamsToUrl(t){return this.isIgnoredDomain(t)?t:this.Th(t,Object.keys(this.Ah).map((t=>({paramName:t,paramValue:this.Ah[t]}))))}Ih(t){if(!(0,s.BZ)(Object.keys(this.kh))||!(0,s.BZ)(this.kh.urlParams)||!t.includes(this.kh.domain))return t;const i=this.kh.urlParams.reduce(((t,i)=>`${t}${i}`),"");return t.replace(this.kh.domain,this.kh.domain+"/"+i)}Th(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))}}},9207:(t,i,e)=>{"use strict";var s;e.d(i,{Q:()=>s}),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={}))},7272:(t,i,e)=>{"use strict";e.d(i,{k:()=>K,x:()=>it});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.Mh=!0,this.Eh="",this.Lh=!1,this.Oh=[]}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.Rh))return this.Rh.split("_")[0]}set userId(t){this.Rh=t}get isCcpaApplicable(){return this.Mh}set isCcpaApplicable(t){this.Mh=t}get usPrivacyString(){return this.Eh}set usPrivacyString(t){this.Eh=t}get consentPayload(){return this.Bh}set consentPayload(t){this.Bh||(this.Bh=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.Lh?(this.Oh.push(t),()=>{}):this.userId?(t(),()=>{}):(this.Lh=!0,t(),()=>{this.Lh=!1,this.Oh.forEach((t=>t())),this.Oh=[]})}}var p,f,v=e(2324),g=e(7726),m=e(3030);!function(t){t.USER_ID="cnx_userId"}(p||(p={}));class y{constructor(t,i){this.Dh=t,this.Ne=i,this.jh={[p.USER_ID]:30},this.Fh=["Facebook App","Google App","Flipboard App","Instagram App","Pinterest App"],this.$h=!1}Vh({name:t,value:i}){t===p.USER_ID&&(this.Dh.userId=this.Nh(i))}zh(t){let i="";const e=this.jh[t.name];if(e){i=`; expires=${new Date((0,v.XF)(e)).toUTCString()}`}this.Ne.document.cookie=`${t.name}=${t.value}${i}; path=/`}qh(t,i){if(!(0,m.BZ)(t))return;const e={cookieList:t,secureMode:i?o.ProtoCookieSecureModeEnum.Unsecure:o.ProtoCookieSecureModeEnum.Auto,browserInfo:this.Wh};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})))}Nh(t){return t.split("_")[0]}Gh(t){try{const i=t+"=",e=decodeURIComponent(this.Ne.document.cookie).split(";");for(let t of e){for(;" "===t.charAt(0);)t=t.substring(1);if(t.includes(i))return this.Nh(t.substring(i.length,t.length))}}catch(t){}return""}getUserId(){return this.Dh.userId}syncFirstPartyCookie(t){const i={name:t,value:"",timestamp:(0,v.XF)(this.jh[t])};t===p.USER_ID&&(i.value=this.Dh.userId),(0,c.QM)(i.value)&&this.zh(i)}syncThirdPartyCookieList(t){const i=[p.USER_ID],e=[];i.forEach((t=>{t===p.USER_ID&&(0,c.QM)(this.Dh.userId)&&e.push({name:p.USER_ID,value:this.Dh.userId,timestamp:(0,v.XF)(this.jh[p.USER_ID])})})),this.qh(e,t)}setBrowserInfo(t,i){this.Wh=t,this.$h=this.Fh.includes(t.browserType),this.$h&&i&&this.syncThirdPartyCookieList(this.$h)}setUserInformation(t){t&&this.Vh({name:p.USER_ID,value:t.userId})}fetchCookies(){[p.USER_ID].map((t=>({name:t,value:this.Gh(t)}))).filter((({value:t})=>(0,c.QM)(t))).forEach((t=>this.Vh(t)))}get unsecuredCookieSync(){return this.$h}}!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 w{constructor(t,i){this.Qh=t,this.Yh=i,this.apiType=f.CmpApi,this.Kh={},this.Bh=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.io)if(e.io.callId===this.eo){const t=e.io.returnValue&&e.io.returnValue.vendorConsents;this.so(t).then((()=>i(this.eo)))}else if(e.io.callId===this.no){const t=e.io.returnValue&&e.io.returnValue.consentData;this.ro(t).then((()=>i(this.no)))}}catch(t){e()}}))}isApiOnPage(){return null!==this.Qh||null!==this.Yh}bindToApi(){return null!==this.Qh?new Promise(((t,i)=>{this.ho(this.Qh).then((()=>t())).catch((t=>i(t)))})):null!==this.Yh?this.oo(this.Yh):Promise.reject()}isConsentForVendor(t){return!!this.Kh[t]}getConsentPayload(){return this.Bh}setInAppConsentData(t){this.so(t),this.ro(t.consentString)}hasIvtConsent(){return this.isConsentForVendor(s.Connatix)}isConsentForPurposes(t){return!0}oo(t){this.no=(0,n.qs)(),this.eo=(0,n.qs)();const i={};return new Promise((e=>{const s=t=>{this.Zh(t).then((t=>{i[t]=!0,i[this.no]&&i[this.eo]&&(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({ao:{command:n,parameter:null,callId:this.eo}},"*"),t.postMessage({ao:{command:r,parameter:null,callId:this.no}},"*")}))}ho(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.so(i).then((()=>s()))}}))})),r=new Promise((e=>{t[i](s,null,((t,i)=>{if(i){const{consentData:i}=t;this.ro(i).then((()=>e()))}}))}));return Promise.all([n,r])}return Promise.reject()}so(t){return(0,c.as)(t)?(this.Kh=t,Promise.resolve()):Promise.reject()}ro(t){return(0,c.HD)(t)?(this.Bh=t,Promise.resolve()):Promise.reject()}}var x=e(1561),S=e(8462),_=e(2381);const A=(t,i)=>{const e=b[i].windowPropertyName;return(0,x.uq)(t,e)},P=(t,i)=>{const e=b[i].framePropertyName;return(0,x.wl)(t,e)},k=(t,i)=>null!==A(t,i)||null!==P(t,i),I=t=>{const i=_.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}},T=t=>{const i=S.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(""))},C=(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)},L=({cmpEncodedString:t,tcfEncodedString:i})=>{if(!(0,c.QM)(t)&&!(0,c.QM)(i))return null;let e=null;return(0,c.QM)(i)&&(e=C(i,I,T)),(0,c.as)(e)?e:(0,c.QM)(t)?(e=C(t,T,I),(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.co=t,this.uo=i,this.apiType=f.TcfApi,this.po=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.fo&&s.fo.callId===this.vo){const t=s.fo.returnValue.tcString;this.so(t).then((()=>i(this.vo))).catch((t=>e()))}}catch(t){e()}}))}isApiOnPage(){return null!==this.co||null!==this.uo}bindToApi(){return null!==this.co?new Promise(((t,i)=>{this.ho(this.co).then((()=>t())).catch((t=>i(t)))})):null!==this.uo?this.oo(this.uo):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]))}oo(t){this.vo=(0,n.qs)();const i={};return new Promise((e=>{const s=t=>{this.po(t).then((t=>{i[t]=!0,i[this.vo]&&(window.removeEventListener("message",s,!1),e())})).catch((t=>{}))};window.addEventListener("message",s,!1);const n=b[f.TcfApi].getVendorConsentDataMethodName;t.postMessage({yo:{command:n,parameter:null,callId:this.vo}},"*")}))}ho(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.co[i](e,2,((e,n)=>{if(n&&("useractioncomplete"===e.eventStatus||"tcloaded"===e.eventStatus)){const n=e.tcString;this.so(n).then((()=>t())),this.co[i](s,2,(()=>{}),e.listenerId)}}))})):Promise.reject()}so(t){const i=L({tcfEncodedString:t});return M(i)?(this.mo=i,Promise.resolve()):Promise.reject()}}var R=e(9207);const B=[R.Q.P1,R.Q.P2,R.Q.P4,R.Q.P7,R.Q.P8];class D{constructor(t,i,e={}){var s,n;this.bo=t,this.Ne=i;const r=L({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.wo(r);null!==h?(this.xo(h),(M(r)||E(r))&&this.So.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.Ue=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.Ue});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.Ue}`},{throttle:2,sendMaxLog:!1});const o=L({tcfEncodedString:r,cmpEncodedString:r});M(o)?h=new O(null,null):E(o)&&(h=new w(null,null)),h?h?(this.So=h,this.So.setInAppConsentData(o)):(0,g.n)({message:"UserConsentApiManager_amp_userConsentApi_not_found",level:g.D.WARN,callStack:r,exception:`${JSON.stringify(t)}__pageURL__${this.Ue}`},{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.Ue}`},{throttle:2,sendMaxLog:!1})}isConsentRequired(){return this.bo}isConsent(t,i=[]){if(this.isConsentRequired()){return this.So.isConsentForVendor(t)&&this.So.isConsentForPurposes(i)}return!0}isConsentConnatix(){return this.isConsent(s.Connatix,B)}getConsentDataPayload(){return this.So.getConsentPayload()}bindToConsentApi(){return this.So.bindToApi()}isConsentApiOnPage(){return this.So.isApiOnPage()}hasIVTConsent(){return this.So.hasIvtConsent()}getConsentApiType(){return this.So.apiType}xo(t){const i=A(this.Ne,t),e=P(this.Ne,t);t===f.TcfApi?this.So=new O(i,e):this.So=new w(i,e)}wo(t){if(M(t))return f.TcfApi;if(E(t))return f.CmpApi;if(k(this.Ne,f.TcfApi))return f.TcfApi;return k(this.Ne,f.CmpApi)?f.CmpApi:f.TcfApi}}var j=e(6615);const F="PUBMATIC",$="predirect",V="UserThirdPartySyncManager_Pubmatic",U="CookieSync_syncScript_not_properly_loaded",N="CookieSync_param_not_parsed_properly",H=(t,i)=>{if(!window.PubMaticSync)return q(U,F),!1;const e=Number.parseInt(t,10);return(0,c.kE)(e)?!!(0,c.QM)(i)||(q(N,F,$),!1):(q(N,F,"p"),!1)},z=(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 W{constructor(t,i){this._o=t,this.bo=i,this.Ao=[]}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}Po(t,i){try{if(this.ko(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,x.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}}ko(t){switch(t.vendorId){case s.Rubicon:case s.Pubmatic:return!0;default:return!!t.url.includes("yellowblue.io")}}syncUrls(t,i){this.Ao.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,j.Ph)("p",t),h=(0,j.Ph)($,t);if(window.PubMaticSync){if(!H(r,h))return void n();z(r,h,i,e),s(!0)}else(0,x.dZ)({src:"//ads.pubmatic.com/AdServer/js/userSync.js"},window.document.head,window,(()=>{H(r,h)?(z(r,h,i,e),s(!0)):n()}),(()=>{n()}),!0,V)})))(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.bo){e.url=(0,j.Bp)(e.url,"gdpr","1");const t=this._o.getConsentDataPayload();e.url=(0,j.Bp)(e.url,"gdpr_consent",t)}this.Po(e,i)&&(e.synced=!0)}}))}setSyncUrls(t={}){return!(this.Ao.length>0)&&(this.Ao=[],Object.keys(t).forEach((i=>{this.Ao.push({vendorId:i,url:t[i],synced:!1})})),!0)}}var G=e(1995);const J={California:5332921},Q={US:6252001};var X;!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"}(X||(X={}));class Y{constructor(t,i){this.Dh=t,this.Io=1,this.To="__uspapi",this.Co="getUSPData",this.Mo={isPending:!0,isRejected:!1,isDelayed:!1,promise:new Promise((()=>{}))},this.Eo(i)}getUsPrivacyString(){if(this.Dh.usPrivacyString||this.Dh.isCcpaApplicable)return this.Dh.usPrivacyString}isCcpaApplicable(){return this.Dh.isCcpaApplicable}isSellUserAllowed(){return!this.Dh.isCcpaApplicable||this.Lo()}setGeoLocation(t){this.Oo=t,t.subdivisionId!==J.California&&(this.Dh.isCcpaApplicable=!1)}fetchUsPrivacyString(){return this.Ro()&&this.Bo(),this.isCcpaApplicable()?new Promise((t=>{this.getUsPrivacyString()?t():t(this.Do())})):Promise.resolve()}Do(){return this.Mo.promise=new Promise(((t,i)=>{const e=this.Dh.getScope()[this.To];e?(this.jo=!0,e(this.Co,this.Io,((e,s)=>{s?(this.Eo(e.uspString),t()):i()}))):i()})),this.makeQuerablePromise(this.Mo),this.Mo.promise}Lo(){return!this.Dh.usPrivacyString||(0,m.d3)(this.Dh.usPrivacyString,r)}Eo(t){this.Dh.usPrivacyString=t}Ro(){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,v.k$)(t,i)}Bo(){const{countryGeoId:t,subdivisionId:i}=this.Oo;t===Q.US&&(0,g.n)({message:"UserCcpaManager_logCCPA",level:g.D.INFO,callStack:JSON.stringify(i),exception:this.Dh.usPrivacyString})}ccpaInfoLogging(t){this.isCcpaApplicable()&&this.jo&&(this.Mo.isPending?((0,g.n)({message:X.CCPA_Pending,exception:"CCPA_Pending_At_Start_AdRequest",level:g.D.INFO,callStack:t}),this.Mo.isDelayed=!0,this.Fo=t):this.Mo.isRejected&&(0,g.n)({message:X.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:X.CCPA_Delayed_Success,exception:"CCPA_Success_After_Delay",level:g.D.INFO,callStack:this.Fo})})).catch((i=>{throw t.isRejected=!0,t.isPending=!1,t.isDelayed&&(0,g.n)({message:X.CCPA_Delayed_Failure,exception:"CCPA_Failed_After_Delay",level:g.D.INFO,callStack:this.Fo}),i}))}}var K,Z,tt=e(5348);!function(t){t.CCPA_INFO_RECEIVED="ccpaInfoReceived",t.CONSENT_DATA_UPDATE="consentDataUpdate"}(K||(K={})),function(t){t.SYNC_URLS_RECEIVED="thirdPartySyncUrlsReceived",t.USER_INFO_RECEIVED="userInfoReceived"}(Z||(Z={}));class it{constructor(t,i,e,s={}){this.vi=i,this.gi=e,this._appSettings=s,this.gdprConsentMode=o.ProtoGdprConsentModeEnum.Unknown,this.$o={},this.Vo="",this.Uo=!1,this.zo=()=>{!this._o.isConsentRequired()||this.vi?this.resolveEvent(K.CONSENT_DATA_UPDATE):(this.gdprConsentMode=this._o.isConsentApiOnPage()||this.gi?o.ProtoGdprConsentModeEnum.NoConsent:o.ProtoGdprConsentModeEnum.NoCmp,this._o.bindToConsentApi().then((()=>{this.isConsentConnatix()||(this.gdprConsentMode=o.ProtoGdprConsentModeEnum.NoConnatixConsent),this.resolveEvent(K.CONSENT_DATA_UPDATE)})).catch((t=>{})))},this.Wo=()=>{tt.$.getEnvelope(this.Jt,this._o)},this.Go=()=>{this.isConsentConnatix()&&(this.onEvent([Z.USER_INFO_RECEIVED]).then((()=>{this.Uo&&(this.Jo.syncThirdPartyCookieList(),this.Jo.unsecuredCookieSync&&this.Jo.syncThirdPartyCookieList(this.Jo.unsecuredCookieSync),this.Jo.syncFirstPartyCookie(p.USER_ID))})),this.onEvent([Z.SYNC_URLS_RECEIVED,K.CONSENT_DATA_UPDATE,K.CCPA_INFO_RECEIVED]).then((()=>{if(this.isConsentConnatix()&&this.Qo.isSellUserAllowed())try{this.Xo.syncUrls(this.Dh.userId,this.Dh.getScope())}catch(t){(0,g.n)({level:g.D.WARN,message:"UserManager_syncUrls",exception:t.message,callStack:t.stack})}})))};try{this.Jt=t,this.Dh=d.getInstance(t),this.vi||(this.Jo=new y(this.Dh,t));const{cmp:i,tcf:e}=this._appSettings;this._o=new D(!!this.Vo,t,{cmp:i,tcf:e}),this.Xo=new W(this._o,this.isGDPR()),this.Qo=new Y(this.Dh,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 tt.$.getValidEnvelope()}Yo(){this.Jo&&this.Jo.fetchCookies(),this.zo(),this.onEvent([K.CONSENT_DATA_UPDATE]).then((()=>{this.Wo(),setTimeout((()=>{try{if(this.vi)return;this.Go()}catch(t){(0,g.n)({callStack:t.stack,exception:t.message,message:"UserManager_consent_data_received",level:g.D.CRITICAL})}}),0)}))}Ko(t){return void 0===this.$o[t]&&(this.$o[t]=new G.C,this.$o[t].promise.catch((()=>this.$o[t].reject()))),this.$o[t]}resolveEvent(t,i){this.Ko(t).resolve(i)}setAmpUserConsent(t){this._o.setAmpUserConsent(t),this.resolveEvent(K.CONSENT_DATA_UPDATE)}setPageUrl(t){this._o&&this._o.setPageUrl(t)}onEvent(t){const i=t.map((t=>this.Ko(t).promise));return Promise.all(i)}isConsent(t,i){return this._o.isConsent(t,i)}isConsentConnatix(){return this._o.isConsentConnatix()}ccpaInfoLogging(t){this.Qo.ccpaInfoLogging(t)}getConsentPayload(){return this._o.getConsentDataPayload()}isConsentRequired(){return this._o.isConsentRequired()}setThirdPartySyncUrls(t){this.vi||this.Xo.setSyncUrls(t)&&this.resolveEvent(Z.SYNC_URLS_RECEIVED)}setGeoLocation(t){this.Qo.setGeoLocation(t),this.Qo.fetchUsPrivacyString().then((()=>{this.resolveEvent(K.CCPA_INFO_RECEIVED)})).catch((()=>{this.resolveEvent(K.CCPA_INFO_RECEIVED)}))}getUserId(){if(this.isConsentConnatix()&&this.Jo)return this.Jo.getUserId()}Zo(){return this.Jo&&this.Jo.getUserId()}setUserInformation(t){this.Jo&&(this.Jo.setUserInformation(t),this.resolveEvent(Z.USER_INFO_RECEIVED),!this.vi&&this.isConsentConnatix()&&this.Jo.syncFirstPartyCookie(p.USER_ID))}isGDPR(){return!!this.Vo}getUsPrivacyString(){return this.Qo.getUsPrivacyString()}isCcpaApplicable(){return this.Qo.isCcpaApplicable()}isSellUserAllowed(){return this.vi||this.Qo.isSellUserAllowed()}getDeviceId(){if(this.isConsentConnatix())return this._appSettings.deviceID}ta(){return this._appSettings.deviceID}getTrackableUser(){return this.vi?this.getDeviceId():this.getUserId()}getForcedTrackableUser(){return this.vi?this.ta():this.Zo()}registerPlsCall(t){return this.isConsentConnatix()||(this.Uo=!0),this.Dh.registerPlsCall(t)}setBrowserInfo(t){this.Jo&&this.Jo.setBrowserInfo(t,this.isConsentConnatix())}getGdprConsentApiType(){return this._o.getConsentApiType()}}},3030:(t,i,e)=>{"use strict";e.d(i,{d3:()=>h,qo:()=>o,qy:()=>a,Sz:()=>c,ti:()=>l,BZ:()=>u,fn:()=>d,Gg:()=>p,V7:()=>f,tN:()=>v,gX:()=>g,sj:()=>m,ee:()=>y});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 v(t,i){return t.filter((t=>i.includes(t)))}function g(t){return t.filter(((i,e)=>t.indexOf(i)===e))}function m(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,{MV:()=>d,Ho:()=>p,T7:()=>f,aQ:()=>v,bX:()=>g,NS:()=>m,dZ:()=>y,ML:()=>b,cn:()=>w,IV:()=>x,pv:()=>S,og:()=>_,L_:()=>A,rI:()=>P,Dx:()=>k,Fs:()=>I,uc:()=>T,tp:()=>C,G$:()=>M,Q1:()=>E,S0:()=>L,Tp:()=>O,PM:()=>R,h_:()=>B,nw:()=>j,fj:()=>F,LT:()=>$,jG:()=>V,IS:()=>U,Vt:()=>N,BE:()=>H,oG:()=>z,U6:()=>W,Ji:()=>G,GF:()=>J,SH:()=>Q,ju:()=>X,w6:()=>Y,uq:()=>K,wl:()=>Z,Wb:()=>tt,eA:()=>it,Nb:()=>et,sw:()=>st,uh:()=>nt,Kk:()=>rt,AX:()=>ht,UR:()=>ot,_w:()=>at,bZ:()=>ct});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 v(t,...i){i.forEach((i=>{t.style[i]=""}))}function g(t){t&&t.parentNode&&t.parentNode.removeChild(t)}function m(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 w(t,...i){t&&t.classList.add(...i)}function x(t,...i){t&&t.classList.remove(...i)}function S(t,i){return t&&t.classList.contains(i)}function _(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),k=(t,i,e)=>i.getComputedStyle(t,e),I=(t,i)=>i.document.getElementsByClassName(t);function T(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 C(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 L(t){return s.Ht.find((i=>{if(i.keys.fullscreenEnabled in t)return!0}))}function O(t){t.getBoundingClientRect()}function R(t,i){return(t.requestAnimationFrame||t.webkitRequestAnimationFrame||function(t){return setTimeout(t,20)})(i)}function B(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?k(e,$(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 F(t){const i=D(["p"],t,"font-family");return i||"inherit"}function $(t){try{return t.ownerDocument.defaultView}catch(t){return null}}function V(t,i){t&&i&&(Array.isArray(t)?t.forEach((t=>i.appendChild(t))):i.appendChild(t))}function U(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)?N(n[i],...t):N(n[i],t);break}s||V(t,i)}function N(t,...i){if(t&&t.parentElement)for(let e=i.length;e--;)t.parentElement.insertBefore(i[e],t)}function H(t,...i){for(let e=i.length;e--;)t.parentNode.insertBefore(i[e],t.nextSibling)}function z(t,i){return(0,r.Sz)(i.children).indexOf(t)}function q(t){const i=$(t);if(!i)return;const{display:e}=k(t,i);"none"===e&&(t.style.display="block")}function W(t,i=(()=>{})){const e=function(s){"opacity"===s.propertyName&&(x(t,h.jG.FadeOutBase,h.jG.FadeOut),i(),t.removeEventListener("transitionend",e))};w(t,h.jG.FadeOutBase),q(t),O(t),t.addEventListener("transitionend",e),w(t,h.jG.FadeOut)}function G(t,i=(()=>{})){const e=function(s){"opacity"===s.propertyName&&(x(t,h.jG.FadeInBase,h.jG.FadeIn),i(),t.removeEventListener("transitionend",e))};w(t,h.jG.FadeInBase),q(t),O(t),t.addEventListener("transitionend",e),w(t,h.jG.FadeIn)}function J(t){const i=$(t);if(!i)return!0;const{display:e,opacity:s}=k(t,i);return"none"===e||"0"===s}function Q(t,i){return null===t.firstChild?t.appendChild(i):t.insertBefore(i,t.firstChild)}function X(t,i){const e=i.document.createElement("div");return e.innerHTML=t||"",e.innerText}function Y(){const t=window.navigator&&window.navigator.doNotTrack||window.doNotTrack;return"1"===t||"yes"===t}function K(t,i){const e=(0,o.pE)(t).topFrame;return e[i]?e:null}function Z(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 tt(t,i){let e=[];try{e=e.slice.call(i.document.querySelectorAll(t),0)}catch(t){}return e}function it(t){return(0,o.pE)(t).topFrame.location.protocol.includes("https")}function et(t){if(!it(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 st(t){return(0,o.pE)(t).topFrame.document.referrer}function nt(t,i){const e=(0,o.pE)(i).topFrame.location.hostname,s=(0,o.bx)(t);return s&&s.hostname===e}function rt(t){t.removeAttribute("href"),t.removeAttribute("target"),t.removeAttribute("download"),t.removeAttribute("ping"),t.removeAttribute("rel"),t.removeAttribute("media"),t.removeAttribute("hreflang"),t.removeAttribute("type")}function ht(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 ot(t){setTimeout((()=>{let i=t.currentTime+.01;i>t.duration&&(i=.01),t.currentTime=i}),0)}function at(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 ct(t,i){if(!i||"SCRIPT"!==i.tagName)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)}},8423:(t,i,e)=>{"use strict";e.d(i,{qs:()=>o,dz:()=>a,lU:()=>c,bx:()=>l,pE:()=>u,Hh:()=>d,Vm:()=>p,we:()=>f,ld:()=>v,Of:()=>g,Xf:()=>m,Up:()=>y,oC:()=>b,rM:()=>w});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,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 l(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 u(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 d(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 p(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 f(){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 v(t,i=0,...e){return setTimeout((()=>{t.apply(this,e)}),i)}function g(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 m(t,i){try{const e=/^#?([a-f\d]{2})([a-f\d]{2})([a-f\d]{2})$/i.exec(t);let s=parseInt(e[1],16),n=parseInt(e[2],16),r=parseInt(e[3],16);s/=255,n/=255,r/=255;const h=Math.max(s,n,r),o=Math.min(s,n,r);let a,c,l=(h+o)/2;if(h===o)a=c=0;else{const t=h-o;switch(c=l>.5?t/(2-h-o):t/(h+o),h){case s:a=(n-r)/t+(n<r?6:0);break;case n:a=(r-s)/t+2;break;case r:a=(s-n)/t+4}a/=6}return a=Math.round(360*a),c=Math.round(100*c),l=Math.round(100*l),l+=i/100*(100-l),`hsl(${a},${c}%,${l}%)`}catch(i){return t}}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 w(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,{Ph:()=>r,Bp:()=>h,CK:()=>o,_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,{dQ:()=>n,DE:()=>r,aX:()=>h,Tc:()=>o,oK:()=>a,ON:()=>c,uc:()=>l,dO:()=>u});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){let e=t,s=i;for(;0!==e&&0!==s;)e>s?e%=s:s%=e;return 0===e?s:e}function o(t,i){return i/100*t}function a(t,i){const e=Math.pow(10,i);return Math.round(t*e)/e}function c(t){return!(0,s.r)(t.width)||!(0,s.r)(t.height)}function l(t){const i=[{value:1,symbol:""},{value:1e3,symbol:"k"},{value:1e6,symbol:"M"}],e=/\.0+$|(\.[0-9]*[1-9])0+$/;let s;for(s=i.length-1;s>0&&!(t>=i[s].value);s--);return t/i[s].value<i[s].value/10?(Math.floor(t/i[s].value*10)/10).toFixed(1).replace(e,"$1")+i[s].symbol:Math.floor(t/i[s].value).toFixed(0)+i[s].symbol}function u(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,{f5:()=>r,J5:()=>h,EQ:()=>o,k0:()=>a,V7:()=>c,Ft:()=>l,hF:()=>u,IS:()=>d});var s=e(7726),n=e(7427);function r(t,i){return t.replace(/(?:\r\n|\r|\n)/g,i)}function h(t){return t.replace(/[-—]/g,"&#x2011;")}function o(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 a(t){return/<[a-z/][\s\S]*>/i.test(t)}function c(t,i){const e=i.replace(/[-\/\\^$*+?.()|[\]{}]/g,"\\$&"),s=new RegExp(`<${e}>(.*?)</${e}>`,"g");return t.replace(s,((t,e)=>e.split(" ").map((t=>`<${i}>${t}</${i}>`)).join(" ")))}function l(t){return!!t.match(/[\u3000-\u303f\u3040-\u309f\u30a0-\u30ff\uff00-\uff9f\u4e00-\u9faf\u3400-\u4dbf]/)}function u(t){return t.replace(/^\s+|\s+$|\s+(?=\s)/g,"")}function d(t,i){return`${t}-${i}`}},2324:(t,i,e)=>{"use strict";e.d(i,{pP:()=>r,QI:()=>h,XF:()=>o,to:()=>a,VG:()=>c,k$:()=>l,H8:()=>u,qe:()=>d,w4:()=>p});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){const i=Date.parse(t+" GMT");if(!(0,n.kE)(i))return;const e=Math.floor((Date.parse(new Date(Date.now()).toUTCString())-i)/1e3);if(!(0,n.r)(e))return"just now";const s=[{value:1,symbol:"s"},{value:60,symbol:"m"},{value:3599,symbol:"h"},{value:86399,symbol:"d"}];let r;for(r=s.length-1;r>0&&!(e>=s[r].value);r--);return Math.floor(e/s[r].value).toFixed(0)+s[r].symbol+" ago"}function l(t,i){const e=Date.now();return!(e<t||e>i)}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}e.d(i,{HD:()=>s,kE:()=>n,r:()=>r,QM:()=>h,$K:()=>o,mf:()=>a,as:()=>c,cL:()=>l})},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,{ZT:()=>n,mG:()=>r,Jh:()=>h,XA:()=>o,CR:()=>a,ev:()=>c,qq:()=>l,FC:()=>u,KL:()=>d});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},490:function(t){"undefined"!=typeof window&&(t.exports=function(t){var i={};function e(s){if(i[s])return i[s].exports;var n=i[s]={i:s,l:!1,exports:{}};return t[s].call(n.exports,n,n.exports,e),n.l=!0,n.exports}return e.m=t,e.c=i,e.d=function(t,i,s){e.o(t,i)||Object.defineProperty(t,i,{enumerable:!0,get:s})},e.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"R",{value:!0})},e.t=function(t,i){if(1&i&&(t=e(t)),8&i)return t;if(4&i&&"object"==typeof t&&t&&t.R)return t;var s=Object.create(null);if(e.r(s),Object.defineProperty(s,"default",{enumerable:!0,value:t}),2&i&&"string"!=typeof t)for(var n in t)e.d(s,n,function(i){return t[i]}.bind(null,n));return s},e.n=function(t){var i=t&&t.R?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},e.p="/dist/",e(e.s=13)}([function(t,i,e){"use strict";e.d(i,"a",(function(){return l})),e.d(i,"b",(function(){return u}));var s=e(5);function n(){}var r={trace:n,debug:n,log:n,warn:n,info:n,error:n},h=r;function o(t,i){return"["+t+"] > "+i}var a=Object(s.a)();function c(t){var i=a.console[t];return i?function(){for(var e=arguments.length,s=new Array(e),n=0;n<e;n++)s[n]=arguments[n];s[0]&&(s[0]=o(t,s[0])),i.apply(a.console,s)}:n}var l=function(t){if(a.console&&!0===t||"object"==typeof t){!function(t){for(var i=arguments.length,e=new Array(i>1?i-1:0),s=1;s<i;s++)e[s-1]=arguments[s];e.forEach((function(i){h[i]=t[i]?t[i].bind(t):c(i)}))}(t,"debug","log","info","warn","error");try{h.log()}catch(t){h=r}}else h=r},u=h},function(t,i,e){"use strict";i.a={MEDIA_ATTACHING:"hlsMediaAttaching",MEDIA_ATTACHED:"hlsMediaAttached",MEDIA_DETACHING:"hlsMediaDetaching",MEDIA_DETACHED:"hlsMediaDetached",BUFFER_RESET:"hlsBufferReset",BUFFER_CODECS:"hlsBufferCodecs",BUFFER_CREATED:"hlsBufferCreated",BUFFER_APPENDING:"hlsBufferAppending",BUFFER_APPENDED:"hlsBufferAppended",BUFFER_EOS:"hlsBufferEos",BUFFER_FLUSHING:"hlsBufferFlushing",BUFFER_FLUSHED:"hlsBufferFlushed",MANIFEST_LOADING:"hlsManifestLoading",MANIFEST_LOADED:"hlsManifestLoaded",MANIFEST_PARSED:"hlsManifestParsed",LEVEL_SWITCHING:"hlsLevelSwitching",LEVEL_SWITCHED:"hlsLevelSwitched",LEVEL_LOADING:"hlsLevelLoading",LEVEL_LOADED:"hlsLevelLoaded",LEVEL_UPDATED:"hlsLevelUpdated",LEVEL_PTS_UPDATED:"hlsLevelPtsUpdated",AUDIO_TRACKS_UPDATED:"hlsAudioTracksUpdated",AUDIO_TRACK_SWITCHING:"hlsAudioTrackSwitching",AUDIO_TRACK_SWITCHED:"hlsAudioTrackSwitched",AUDIO_TRACK_LOADING:"hlsAudioTrackLoading",AUDIO_TRACK_LOADED:"hlsAudioTrackLoaded",SUBTITLE_TRACKS_UPDATED:"hlsSubtitleTracksUpdated",SUBTITLE_TRACK_SWITCH:"hlsSubtitleTrackSwitch",SUBTITLE_TRACK_LOADING:"hlsSubtitleTrackLoading",SUBTITLE_TRACK_LOADED:"hlsSubtitleTrackLoaded",SUBTITLE_FRAG_PROCESSED:"hlsSubtitleFragProcessed",INIT_PTS_FOUND:"hlsInitPtsFound",FRAG_LOADING:"hlsFragLoading",FRAG_LOAD_PROGRESS:"hlsFragLoadProgress",FRAG_LOAD_EMERGENCY_ABORTED:"hlsFragLoadEmergencyAborted",FRAG_LOADED:"hlsFragLoaded",FRAG_DECRYPTED:"hlsFragDecrypted",FRAG_PARSING_INIT_SEGMENT:"hlsFragParsingInitSegment",FRAG_PARSING_USERDATA:"hlsFragParsingUserdata",FRAG_PARSING_METADATA:"hlsFragParsingMetadata",FRAG_PARSING_DATA:"hlsFragParsingData",FRAG_PARSED:"hlsFragParsed",FRAG_BUFFERED:"hlsFragBuffered",FRAG_CHANGED:"hlsFragChanged",FPS_DROP:"hlsFpsDrop",FPS_DROP_LEVEL_CAPPING:"hlsFpsDropLevelCapping",ERROR:"hlsError",DESTROYING:"hlsDestroying",KEY_LOADING:"hlsKeyLoading",KEY_LOADED:"hlsKeyLoaded",STREAM_STATE_TRANSITION:"hlsStreamStateTransition",LIVE_BACK_BUFFER_REACHED:"hlsLiveBackBufferReached"}},function(t,i,e){"use strict";var s,n;e.d(i,"b",(function(){return s})),e.d(i,"a",(function(){return n})),function(t){t.NETWORK_ERROR="networkError",t.MEDIA_ERROR="mediaError",t.KEY_SYSTEM_ERROR="keySystemError",t.MUX_ERROR="muxError",t.OTHER_ERROR="otherError"}(s||(s={})),function(t){t.KEY_SYSTEM_NO_KEYS="keySystemNoKeys",t.KEY_SYSTEM_NO_ACCESS="keySystemNoAccess",t.KEY_SYSTEM_NO_SESSION="keySystemNoSession",t.KEY_SYSTEM_LICENSE_REQUEST_FAILED="keySystemLicenseRequestFailed",t.KEY_SYSTEM_NO_INIT_DATA="keySystemNoInitData",t.MANIFEST_LOAD_ERROR="manifestLoadError",t.MANIFEST_LOAD_TIMEOUT="manifestLoadTimeOut",t.MANIFEST_PARSING_ERROR="manifestParsingError",t.MANIFEST_INCOMPATIBLE_CODECS_ERROR="manifestIncompatibleCodecsError",t.LEVEL_LOAD_ERROR="levelLoadError",t.LEVEL_LOAD_TIMEOUT="levelLoadTimeOut",t.LEVEL_SWITCH_ERROR="levelSwitchError",t.AUDIO_TRACK_LOAD_ERROR="audioTrackLoadError",t.AUDIO_TRACK_LOAD_TIMEOUT="audioTrackLoadTimeOut",t.FRAG_LOAD_ERROR="fragLoadError",t.FRAG_LOAD_TIMEOUT="fragLoadTimeOut",t.FRAG_DECRYPT_ERROR="fragDecryptError",t.FRAG_PARSING_ERROR="fragParsingError",t.REMUX_ALLOC_ERROR="remuxAllocError",t.KEY_LOAD_ERROR="keyLoadError",t.KEY_LOAD_TIMEOUT="keyLoadTimeOut",t.BUFFER_ADD_CODEC_ERROR="bufferAddCodecError",t.BUFFER_APPEND_ERROR="bufferAppendError",t.BUFFER_APPENDING_ERROR="bufferAppendingError",t.BUFFER_STALLED_ERROR="bufferStalledError",t.BUFFER_FULL_ERROR="bufferFullError",t.BUFFER_SEEK_OVER_HOLE="bufferSeekOverHole",t.BUFFER_NUDGE_ON_STALL="bufferNudgeOnStall",t.INTERNAL_EXCEPTION="internalException"}(n||(n={}))},function(t,i,e){"use strict";e.d(i,"a",(function(){return s}));var s=Number.isFinite||function(t){return"number"==typeof t&&isFinite(t)}},function(t,i,e){"use strict";e.d(i,"b",(function(){return o}));var s,n=e(5),r=function(){function t(){}return t.isHeader=function(t,i){return i+10<=t.length&&73===t[i]&&68===t[i+1]&&51===t[i+2]&&t[i+3]<255&&t[i+4]<255&&t[i+6]<128&&t[i+7]<128&&t[i+8]<128&&t[i+9]<128},t.isFooter=function(t,i){return i+10<=t.length&&51===t[i]&&68===t[i+1]&&73===t[i+2]&&t[i+3]<255&&t[i+4]<255&&t[i+6]<128&&t[i+7]<128&&t[i+8]<128&&t[i+9]<128},t.getID3Data=function(i,e){for(var s=e,n=0;t.isHeader(i,e);)n+=10,n+=t.ia(i,e+6),t.isFooter(i,e+10)&&(n+=10),e+=n;if(n>0)return i.subarray(s,s+n)},t.ia=function(t,i){var e=0;return e=(127&t[i])<<21,e|=(127&t[i+1])<<14,(e|=(127&t[i+2])<<7)|127&t[i+3]},t.getTimeStamp=function(i){for(var e=t.getID3Frames(i),s=0;s<e.length;s++){var n=e[s];if(t.isTimeStampFrame(n))return t.ea(n)}},t.isTimeStampFrame=function(t){return t&&"PRIV"===t.key&&"com.apple.streaming.transportStreamTimestamp"===t.info},t.sa=function(i){var e=String.fromCharCode(i[0],i[1],i[2],i[3]),s=t.ia(i,4);return{type:e,size:s,data:i.subarray(10,10+s)}},t.getID3Frames=function(i){for(var e=0,s=[];t.isHeader(i,e);){for(var n=t.ia(i,e+6),r=(e+=10)+n;e+8<r;){var h=t.sa(i.subarray(e)),o=t.na(h);o&&s.push(o),e+=h.size+10}t.isFooter(i,e)&&(e+=10)}return s},t.na=function(i){return"PRIV"===i.type?t.ra(i):"T"===i.type[0]?t.ha(i):"W"===i.type[0]?t.oa(i):void 0},t.ea=function(t){if(8===t.data.byteLength){var i=new Uint8Array(t.data),e=1&i[3],s=(i[4]<<23)+(i[5]<<15)+(i[6]<<7)+i[7];return s/=45,e&&(s+=47721858.84),Math.round(s)}},t.ra=function(i){if(!(i.size<2)){var e=t.aa(i.data,!0),s=new Uint8Array(i.data.subarray(e.length+1));return{key:i.type,info:e,data:s.buffer}}},t.ha=function(i){if(!(i.size<2)){if("TXXX"===i.type){var e=1,s=t.aa(i.data.subarray(e),!0);e+=s.length+1;var n=t.aa(i.data.subarray(e));return{key:i.type,info:s,data:n}}var r=t.aa(i.data.subarray(1));return{key:i.type,data:r}}},t.oa=function(i){if("WXXX"===i.type){if(i.size<2)return;var e=1,s=t.aa(i.data.subarray(e));e+=s.length+1;var n=t.aa(i.data.subarray(e));return{key:i.type,info:s,data:n}}var r=t.aa(i.data);return{key:i.type,data:r}},t.aa=function(t,i){void 0===i&&(i=!1);var e=h();if(e){var s=e.decode(t);if(i){var n=s.indexOf("\0");return-1!==n?s.substring(0,n):s}return s.replace(/\0/g,"")}for(var r,o,a,c=t.length,l="",u=0;u<c;){if(0===(r=t[u++])&&i)return l;if(0!==r&&3!==r)switch(r>>4){case 0:case 1:case 2:case 3:case 4:case 5:case 6:case 7:l+=String.fromCharCode(r);break;case 12:case 13:o=t[u++],l+=String.fromCharCode((31&r)<<6|63&o);break;case 14:o=t[u++],a=t[u++],l+=String.fromCharCode((15&r)<<12|(63&o)<<6|(63&a)<<0)}}return l},t}();function h(){var t=Object(n.a)();return s||void 0===t.TextDecoder||(s=new t.TextDecoder("utf-8")),s}var o=r.aa;i.a=r},function(t,i,e){"use strict";function s(){return"undefined"==typeof window?self:window.cnxRenderWindow?window.cnxRenderWindow:window}e.d(i,"a",(function(){return s}))},function(t,i,e){var s,n,r,h,o;s=/^((?:[a-zA-Z0-9+\-.]+:)?)(\/\/[^\/?#]*)?((?:[^\/\?#]*\/)*.*?)??(;.*?)?(\?.*?)?(#.*?)?$/,n=/^([^\/?#]*)(.*)$/,r=/(?:\/|^)\.(?=\/)/g,h=/(?:\/|^)\.\.\/(?!\.\.\/).*?(?=\/)/g,o={buildAbsoluteURL:function(t,i,e){if(e=e||{},t=t.trim(),!(i=i.trim())){if(!e.alwaysNormalize)return t;var s=o.parseURL(t);if(!s)throw new Error("Error trying to parse base URL.");return s.path=o.normalizePath(s.path),o.buildURLFromParts(s)}var r=o.parseURL(i);if(!r)throw new Error("Error trying to parse relative URL.");if(r.scheme)return e.alwaysNormalize?(r.path=o.normalizePath(r.path),o.buildURLFromParts(r)):i;var h=o.parseURL(t);if(!h)throw new Error("Error trying to parse base URL.");if(!h.netLoc&&h.path&&"/"!==h.path[0]){var a=n.exec(h.path);h.netLoc=a[1],h.path=a[2]}h.netLoc&&!h.path&&(h.path="/");var c={scheme:h.scheme,netLoc:r.netLoc,path:null,params:r.params,query:r.query,fragment:r.fragment};if(!r.netLoc&&(c.netLoc=h.netLoc,"/"!==r.path[0]))if(r.path){var l=h.path,u=l.substring(0,l.lastIndexOf("/")+1)+r.path;c.path=o.normalizePath(u)}else c.path=h.path,r.params||(c.params=h.params,r.query||(c.query=h.query));return null===c.path&&(c.path=e.alwaysNormalize?o.normalizePath(r.path):r.path),o.buildURLFromParts(c)},parseURL:function(t){var i=s.exec(t);return i?{scheme:i[1]||"",netLoc:i[2]||"",path:i[3]||"",params:i[4]||"",query:i[5]||"",fragment:i[6]||""}:null},normalizePath:function(t){for(t=t.split("").reverse().join("").replace(r,"");t.length!==(t=t.replace(h,"")).length;);return t.split("").reverse().join("")},buildURLFromParts:function(t){return t.scheme+t.netLoc+t.path+t.params+t.query+t.fragment}},t.exports=o},function(t,i){t.exports=void 0},function(t,i,e){"use strict";var s=Object.prototype.hasOwnProperty,n="~";function r(){}function h(t,i,e){this.fn=t,this.context=i,this.once=e||!1}function o(t,i,e,s,r){if("function"!=typeof e)throw new TypeError("The listener must be a function");var o=new h(e,s||t,r),a=n?n+i:i;return t.ca[a]?t.ca[a].fn?t.ca[a]=[t.ca[a],o]:t.ca[a].push(o):(t.ca[a]=o,t.la++),t}function a(t,i){0==--t.la?t.ca=new r:delete t.ca[i]}function c(){this.ca=new r,this.la=0}Object.create&&(r.prototype=Object.create(null),(new r).__proto__||(n=!1)),c.prototype.eventNames=function(){var t,i,e=[];if(0===this.la)return e;for(i in t=this.ca)s.call(t,i)&&e.push(n?i.slice(1):i);return Object.getOwnPropertySymbols?e.concat(Object.getOwnPropertySymbols(t)):e},c.prototype.listeners=function(t){var i=n?n+t:t,e=this.ca[i];if(!e)return[];if(e.fn)return[e.fn];for(var s=0,r=e.length,h=new Array(r);s<r;s++)h[s]=e[s].fn;return h},c.prototype.listenerCount=function(t){var i=n?n+t:t,e=this.ca[i];return e?e.fn?1:e.length:0},c.prototype.emit=function(t,i,e,s,r,h){var o=n?n+t:t;if(!this.ca[o])return!1;var a,c,l=this.ca[o],u=arguments.length;if(l.fn){switch(l.once&&this.removeListener(t,l.fn,void 0,!0),u){case 1:return l.fn.call(l.context),!0;case 2:return l.fn.call(l.context,i),!0;case 3:return l.fn.call(l.context,i,e),!0;case 4:return l.fn.call(l.context,i,e,s),!0;case 5:return l.fn.call(l.context,i,e,s,r),!0;case 6:return l.fn.call(l.context,i,e,s,r,h),!0}for(c=1,a=new Array(u-1);c<u;c++)a[c-1]=arguments[c];l.fn.apply(l.context,a)}else{var d,p=l.length;for(c=0;c<p;c++)switch(l[c].once&&this.removeListener(t,l[c].fn,void 0,!0),u){case 1:l[c].fn.call(l[c].context);break;case 2:l[c].fn.call(l[c].context,i);break;case 3:l[c].fn.call(l[c].context,i,e);break;case 4:l[c].fn.call(l[c].context,i,e,s);break;default:if(!a)for(d=1,a=new Array(u-1);d<u;d++)a[d-1]=arguments[d];l[c].fn.apply(l[c].context,a)}}return!0},c.prototype.on=function(t,i,e){return o(this,t,i,e,!1)},c.prototype.once=function(t,i,e){return o(this,t,i,e,!0)},c.prototype.removeListener=function(t,i,e,s){var r=n?n+t:t;if(!this.ca[r])return this;if(!i)return a(this,r),this;var h=this.ca[r];if(h.fn)h.fn!==i||s&&!h.once||e&&h.context!==e||a(this,r);else{for(var o=0,c=[],l=h.length;o<l;o++)(h[o].fn!==i||s&&!h[o].once||e&&h[o].context!==e)&&c.push(h[o]);c.length?this.ca[r]=1===c.length?c[0]:c:a(this,r)}return this},c.prototype.removeAllListeners=function(t){var i;return t?(i=n?n+t:t,this.ca[i]&&a(this,i)):(this.ca=new r,this.la=0),this},c.prototype.off=c.prototype.removeListener,c.prototype.addListener=c.prototype.on,c.prefixed=n,c.EventEmitter=c,t.exports=c},function(t,i,e){"use strict";var s=e(1),n=e(2),r=function(){function t(t,i){this.subtle=t,this.aesIV=i}return t.prototype.decrypt=function(t,i){return this.subtle.decrypt({name:"AES-CBC",iv:this.aesIV},i,t)},t}(),h=function(){function t(t,i){this.subtle=t,this.key=i}return t.prototype.expandKey=function(){return this.subtle.importKey("raw",this.key,{name:"AES-CBC"},!1,["encrypt","decrypt"])},t}(),o=function(){function t(){this.rcon=[0,1,2,4,8,16,32,64,128,27,54],this.subMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.invSubMix=[new Uint32Array(256),new Uint32Array(256),new Uint32Array(256),new Uint32Array(256)],this.sBox=new Uint32Array(256),this.invSBox=new Uint32Array(256),this.key=new Uint32Array(0),this.initTable()}var i=t.prototype;return i.uint8ArrayToUint32Array_=function(t){for(var i=new DataView(t),e=new Uint32Array(4),s=0;s<4;s++)e[s]=i.getUint32(4*s);return e},i.initTable=function(){var t=this.sBox,i=this.invSBox,e=this.subMix,s=e[0],n=e[1],r=e[2],h=e[3],o=this.invSubMix,a=o[0],c=o[1],l=o[2],u=o[3],d=new Uint32Array(256),p=0,f=0,v=0;for(v=0;v<256;v++)d[v]=v<128?v<<1:v<<1^283;for(v=0;v<256;v++){var g=f^f<<1^f<<2^f<<3^f<<4;g=g>>>8^255&g^99,t[p]=g,i[g]=p;var m=d[p],y=d[m],b=d[y],w=257*d[g]^16843008*g;s[p]=w<<24|w>>>8,n[p]=w<<16|w>>>16,r[p]=w<<8|w>>>24,h[p]=w,w=16843009*b^65537*y^257*m^16843008*p,a[g]=w<<24|w>>>8,c[g]=w<<16|w>>>16,l[g]=w<<8|w>>>24,u[g]=w,p?(p=m^d[d[d[b^m]]],f^=d[d[f]]):p=f=1}},i.expandKey=function(t){for(var i=this.uint8ArrayToUint32Array_(t),e=!0,s=0;s<i.length&&e;)e=i[s]===this.key[s],s++;if(!e){this.key=i;var n=this.keySize=i.length;if(4!==n&&6!==n&&8!==n)throw new Error("Invalid aes key size="+n);var r,h,o,a,c=this.ksRows=4*(n+6+1),l=this.keySchedule=new Uint32Array(c),u=this.invKeySchedule=new Uint32Array(c),d=this.sBox,p=this.rcon,f=this.invSubMix,v=f[0],g=f[1],m=f[2],y=f[3];for(r=0;r<c;r++)r<n?o=l[r]=i[r]:(a=o,r%n==0?(a=d[(a=a<<8|a>>>24)>>>24]<<24|d[a>>>16&255]<<16|d[a>>>8&255]<<8|d[255&a],a^=p[r/n|0]<<24):n>6&&r%n==4&&(a=d[a>>>24]<<24|d[a>>>16&255]<<16|d[a>>>8&255]<<8|d[255&a]),l[r]=o=(l[r-n]^a)>>>0);for(h=0;h<c;h++)r=c-h,a=3&h?l[r]:l[r-4],u[h]=h<4||r<=4?a:v[d[a>>>24]]^g[d[a>>>16&255]]^m[d[a>>>8&255]]^y[d[255&a]],u[h]=u[h]>>>0}},i.networkToHostOrderSwap=function(t){return t<<24|(65280&t)<<8|(16711680&t)>>8|t>>>24},i.decrypt=function(t,i,e,s){for(var n,r,h,o,a,c,l,u,d,p,f,v,g,m,y,b,w,x=this.keySize+6,S=this.invKeySchedule,_=this.invSBox,A=this.invSubMix,P=A[0],k=A[1],I=A[2],T=A[3],C=this.uint8ArrayToUint32Array_(e),M=C[0],E=C[1],L=C[2],O=C[3],R=new Int32Array(t),B=new Int32Array(R.length),D=this.networkToHostOrderSwap;i<R.length;){for(d=D(R[i]),p=D(R[i+1]),f=D(R[i+2]),v=D(R[i+3]),a=d^S[0],c=v^S[1],l=f^S[2],u=p^S[3],g=4,m=1;m<x;m++)n=P[a>>>24]^k[c>>16&255]^I[l>>8&255]^T[255&u]^S[g],r=P[c>>>24]^k[l>>16&255]^I[u>>8&255]^T[255&a]^S[g+1],h=P[l>>>24]^k[u>>16&255]^I[a>>8&255]^T[255&c]^S[g+2],o=P[u>>>24]^k[a>>16&255]^I[c>>8&255]^T[255&l]^S[g+3],a=n,c=r,l=h,u=o,g+=4;n=_[a>>>24]<<24^_[c>>16&255]<<16^_[l>>8&255]<<8^_[255&u]^S[g],r=_[c>>>24]<<24^_[l>>16&255]<<16^_[u>>8&255]<<8^_[255&a]^S[g+1],h=_[l>>>24]<<24^_[u>>16&255]<<16^_[a>>8&255]<<8^_[255&c]^S[g+2],o=_[u>>>24]<<24^_[a>>16&255]<<16^_[c>>8&255]<<8^_[255&l]^S[g+3],g+=3,B[i]=D(n^M),B[i+1]=D(o^E),B[i+2]=D(h^L),B[i+3]=D(r^O),M=d,E=p,L=f,O=v,i+=4}return s?(w=(b=(y=B.buffer).byteLength)&&new DataView(y).getUint8(b-1))?y.slice(0,b-w):y:B.buffer},i.destroy=function(){this.key=void 0,this.keySize=void 0,this.ksRows=void 0,this.sBox=void 0,this.invSBox=void 0,this.subMix=void 0,this.invSubMix=void 0,this.keySchedule=void 0,this.invKeySchedule=void 0,this.rcon=void 0},t}(),a=e(0),c=e(5),l=function(){function t(t,i,e){var s=(void 0===e?{}:e).removePKCS7Padding,n=void 0===s||s;if(this.logEnabled=!0,this.observer=t,this.config=i,this.removePKCS7Padding=n,n)try{var r=Object(c.a)().crypto;r&&(this.subtle=r.subtle||r.webkitSubtle)}catch(t){}this.disableWebCrypto=!this.subtle}var i=t.prototype;return i.isSync=function(){return this.disableWebCrypto&&this.config.enableSoftwareAES},i.decrypt=function(t,i,e,s){var n=this;if(this.disableWebCrypto&&this.config.enableSoftwareAES){this.logEnabled&&(a.b.log("JS AES decrypt"),this.logEnabled=!1);var c=this.decryptor;c||(this.decryptor=c=new o),c.expandKey(i),s(c.decrypt(t,0,e,this.removePKCS7Padding))}else{this.logEnabled&&(a.b.log("WebCrypto AES decrypt"),this.logEnabled=!1);var l=this.subtle;this.key!==i&&(this.key=i,this.fastAesKey=new h(l,i)),this.fastAesKey.expandKey().then((function(h){new r(l,e).decrypt(t,h).catch((function(r){n.onWebCryptoError(r,t,i,e,s)})).then((function(t){s(t)}))})).catch((function(r){n.onWebCryptoError(r,t,i,e,s)}))}},i.onWebCryptoError=function(t,i,e,r,h){this.config.enableSoftwareAES?(a.b.log("WebCrypto Error, disable WebCrypto API"),this.disableWebCrypto=!0,this.logEnabled=!0,this.decrypt(i,e,r,h)):(a.b.error("decrypting error : "+t.message),this.observer.trigger(s.a.ERROR,{type:n.b.MEDIA_ERROR,details:n.a.FRAG_DECRYPT_ERROR,fatal:!0,reason:t.message}))},i.destroy=function(){var t=this.decryptor;t&&(t.destroy(),this.decryptor=void 0)},t}(),u=e(3);function d(t,i){return 255===t[i]&&240==(246&t[i+1])}function p(t,i){return 1&t[i+1]?7:9}function f(t,i){return(3&t[i+3])<<11|t[i+4]<<3|(224&t[i+5])>>>5}function v(t,i){return!!(i+1<t.length&&d(t,i))}function g(t,i){if(v(t,i)){var e=p(t,i);i+5<t.length&&(e=f(t,i));var s=i+e;if(s===t.length||s+1<t.length&&d(t,s))return!0}return!1}function m(t,i,e,r,h){if(!t.samplerate){var o=function(t,i,e,r){var h,o,c,l,u,d=navigator.userAgent.toLowerCase(),p=r,f=[96e3,88200,64e3,48e3,44100,32e3,24e3,22050,16e3,12e3,11025,8e3,7350];if(h=1+((192&i[e+2])>>>6),!((o=(60&i[e+2])>>>2)>f.length-1))return l=(1&i[e+2])<<2,l|=(192&i[e+3])>>>6,a.b.log("manifest codec:"+r+",ADTS data:type:"+h+",sampleingIndex:"+o+"["+f[o]+"Hz],channelConfig:"+l),/firefox/i.test(d)?o>=6?(h=5,u=new Array(4),c=o-3):(h=2,u=new Array(2),c=o):-1!==d.indexOf("android")?(h=2,u=new Array(2),c=o):(h=5,u=new Array(4),r&&(-1!==r.indexOf("mp4a.40.29")||-1!==r.indexOf("mp4a.40.5"))||!r&&o>=6?c=o-3:((r&&-1!==r.indexOf("mp4a.40.2")&&(o>=6&&1===l||/vivaldi/i.test(d))||!r&&1===l)&&(h=2,u=new Array(2)),c=o)),u[0]=h<<3,u[0]|=(14&o)>>1,u[1]|=(1&o)<<7,u[1]|=l<<3,5===h&&(u[1]|=(14&c)>>1,u[2]=(1&c)<<7,u[2]|=8,u[3]=0),{config:u,samplerate:f[o],channelCount:l,codec:"mp4a.40."+h,manifestCodec:p};t.trigger(s.a.ERROR,{type:n.b.MEDIA_ERROR,details:n.a.FRAG_PARSING_ERROR,fatal:!0,reason:"invalid ADTS sampling index:"+o})}(i,e,r,h);t.config=o.config,t.samplerate=o.samplerate,t.channelCount=o.channelCount,t.codec=o.codec,t.manifestCodec=o.manifestCodec,a.b.log("parsed codec:"+t.codec+",rate:"+o.samplerate+",nb channel:"+o.channelCount)}}function y(t){return 9216e4/t}function b(t,i,e,s,n){var r=function(t,i,e,s,n){var r,h,o=t.length;if(r=p(t,i),h=f(t,i),(h-=r)>0&&i+r+h<=o)return{headerLength:r,frameLength:h,stamp:e+s*n}}(i,e,s,n,y(t.samplerate));if(r){var h=r.stamp,o=r.headerLength,a=r.frameLength,c={unit:i.subarray(e+o,e+o+a),pts:h,dts:h};return t.samples.push(c),{sample:c,length:a+o}}}var w=e(4),x=function(){function t(t,i,e){this.observer=t,this.config=e,this.remuxer=i}var i=t.prototype;return i.resetInitSegment=function(t,i,e,s){this.ua={container:"audio/adts",type:"audio",id:0,sequenceNumber:0,isAAC:!0,samples:[],len:0,manifestCodec:i,duration:s,inputTimeScale:9e4}},i.resetTimeStamp=function(){},t.probe=function(t){if(!t)return!1;for(var i=(w.a.getID3Data(t,0)||[]).length,e=t.length;i<e;i++)if(g(t,i))return a.b.log("ADTS sync word found !"),!0;return!1},i.append=function(t,i,e,s){for(var n=this.ua,r=w.a.getID3Data(t,0)||[],h=w.a.getTimeStamp(r),o=Object(u.a)(h)?90*h:9e4*i,c=0,l=o,d=t.length,p=r.length,f=[{pts:l,dts:l,data:r}];p<d-1;)if(v(t,p)&&p+5<d){m(n,this.observer,t,p,n.manifestCodec);var g=b(n,t,p,o,c);if(!g){a.b.log("Unable to parse AAC frame");break}p+=g.length,l=g.sample.pts,c++}else w.a.isHeader(t,p)?(r=w.a.getID3Data(t,p),f.push({pts:l,dts:l,data:r}),p+=r.length):p++;this.remuxer.remux(n,{samples:[]},{samples:f,inputTimeScale:9e4},{samples:[]},i,e,s)},i.destroy=function(){},t}(),S=e(10),_={BitratesMap:[32,64,96,128,160,192,224,256,288,320,352,384,416,448,32,48,56,64,80,96,112,128,160,192,224,256,320,384,32,40,48,56,64,80,96,112,128,160,192,224,256,320,32,48,56,64,80,96,112,128,144,160,176,192,224,256,8,16,24,32,40,48,56,64,80,96,112,128,144,160],SamplingRateMap:[44100,48e3,32e3,22050,24e3,16e3,11025,12e3,8e3],SamplesCoefficients:[[0,72,144,12],[0,0,0,0],[0,72,144,12],[0,144,144,12]],BytesInSlot:[0,1,1,4],appendFrame:function(t,i,e,s,n){if(!(e+24>i.length)){var r=this.parseHeader(i,e);if(r&&e+r.frameLength<=i.length){var h=s+n*(9e4*r.samplesPerFrame/r.sampleRate),o={unit:i.subarray(e,e+r.frameLength),pts:h,dts:h};return t.config=[],t.channelCount=r.channelCount,t.samplerate=r.sampleRate,t.samples.push(o),{sample:o,length:r.frameLength}}}},parseHeader:function(t,i){var e=t[i+1]>>3&3,s=t[i+1]>>1&3,n=t[i+2]>>4&15,r=t[i+2]>>2&3,h=t[i+2]>>1&1;if(1!==e&&0!==n&&15!==n&&3!==r){var o=3===e?3-s:3===s?3:4,a=1e3*_.BitratesMap[14*o+n-1],c=3===e?0:2===e?1:2,l=_.SamplingRateMap[3*c+r],u=t[i+3]>>6==3?1:2,d=_.SamplesCoefficients[e][s],p=_.BytesInSlot[s],f=8*d*p;return{sampleRate:l,channelCount:u,frameLength:parseInt(d*a/l+h,10)*p,samplesPerFrame:f}}},isHeaderPattern:function(t,i){return 255===t[i]&&224==(224&t[i+1])&&0!=(6&t[i+1])},isHeader:function(t,i){return!!(i+1<t.length&&this.isHeaderPattern(t,i))},probe:function(t,i){if(i+1<t.length&&this.isHeaderPattern(t,i)){var e=this.parseHeader(t,i),s=4;e&&e.frameLength&&(s=e.frameLength);var n=i+s;if(n===t.length||n+1<t.length&&this.isHeaderPattern(t,n))return!0}return!1}},A=_,P=function(){function t(t){this.data=t,this.bytesAvailable=t.byteLength,this.word=0,this.bitsAvailable=0}var i=t.prototype;return i.loadWord=function(){var t=this.data,i=this.bytesAvailable,e=t.byteLength-i,s=new Uint8Array(4),n=Math.min(4,i);if(0===n)throw new Error("no bytes available");s.set(t.subarray(e,e+n)),this.word=new DataView(s.buffer).getUint32(0),this.bitsAvailable=8*n,this.bytesAvailable-=n},i.skipBits=function(t){var i;this.bitsAvailable>t?(this.word<<=t,this.bitsAvailable-=t):(t-=this.bitsAvailable,t-=(i=t>>3)>>3,this.bytesAvailable-=i,this.loadWord(),this.word<<=t,this.bitsAvailable-=t)},i.readBits=function(t){var i=Math.min(this.bitsAvailable,t),e=this.word>>>32-i;return t>32&&a.b.error("Cannot read more than 32 bits at a time"),this.bitsAvailable-=i,this.bitsAvailable>0?this.word<<=i:this.bytesAvailable>0&&this.loadWord(),(i=t-i)>0&&this.bitsAvailable?e<<i|this.readBits(i):e},i.skipLZ=function(){var t;for(t=0;t<this.bitsAvailable;++t)if(0!=(this.word&2147483648>>>t))return this.word<<=t,this.bitsAvailable-=t,t;return this.loadWord(),t+this.skipLZ()},i.skipUEG=function(){this.skipBits(1+this.skipLZ())},i.skipEG=function(){this.skipBits(1+this.skipLZ())},i.readUEG=function(){var t=this.skipLZ();return this.readBits(t+1)-1},i.readEG=function(){var t=this.readUEG();return 1&t?1+t>>>1:-1*(t>>>1)},i.readBoolean=function(){return 1===this.readBits(1)},i.readUByte=function(){return this.readBits(8)},i.readUShort=function(){return this.readBits(16)},i.readUInt=function(){return this.readBits(32)},i.skipScalingList=function(t){var i,e=8,s=8;for(i=0;i<t;i++)0!==s&&(s=(e+this.readEG()+256)%256),e=0===s?e:s},i.readSPS=function(){var t,i,e,s,n,r,h,o=0,a=0,c=0,l=0,u=this.readUByte.bind(this),d=this.readBits.bind(this),p=this.readUEG.bind(this),f=this.readBoolean.bind(this),v=this.skipBits.bind(this),g=this.skipEG.bind(this),m=this.skipUEG.bind(this),y=this.skipScalingList.bind(this);if(u(),t=u(),d(5),v(3),u(),m(),100===t||110===t||122===t||244===t||44===t||83===t||86===t||118===t||128===t){var b=p();if(3===b&&v(1),m(),m(),v(1),f())for(r=3!==b?8:12,h=0;h<r;h++)f()&&y(h<6?16:64)}m();var w=p();if(0===w)p();else if(1===w)for(v(1),g(),g(),i=p(),h=0;h<i;h++)g();m(),v(1),e=p(),s=p(),0===(n=d(1))&&v(1),v(1),f()&&(o=p(),a=p(),c=p(),l=p());var x=[1,1];if(f()&&f())switch(u()){case 1:x=[1,1];break;case 2:x=[12,11];break;case 3:x=[10,11];break;case 4:x=[16,11];break;case 5:x=[40,33];break;case 6:x=[24,11];break;case 7:x=[20,11];break;case 8:x=[32,11];break;case 9:x=[80,33];break;case 10:x=[18,11];break;case 11:x=[15,11];break;case 12:x=[64,33];break;case 13:x=[160,99];break;case 14:x=[4,3];break;case 15:x=[3,2];break;case 16:x=[2,1];break;case 255:x=[u()<<8|u(),u()<<8|u()]}return{width:Math.ceil(16*(e+1)-2*o-2*a),height:(2-n)*(s+1)*16-(n?2:4)*(c+l),pixelRatio:x}},i.readSliceType=function(){return this.readUByte(),this.readUEG(),this.readUEG()},t}(),k=function(){function t(t,i,e,s){this.decryptdata=e,this.discardEPB=s,this.decrypter=new l(t,i,{removePKCS7Padding:!1})}var i=t.prototype;return i.decryptBuffer=function(t,i){this.decrypter.decrypt(t,this.decryptdata.key.buffer,this.decryptdata.iv.buffer,i)},i.decryptAacSample=function(t,i,e,s){var n=t[i].unit,r=n.subarray(16,n.length-n.length%16),h=r.buffer.slice(r.byteOffset,r.byteOffset+r.length),o=this;this.decryptBuffer(h,(function(r){r=new Uint8Array(r),n.set(r,16),s||o.decryptAacSamples(t,i+1,e)}))},i.decryptAacSamples=function(t,i,e){for(;;i++){if(i>=t.length)return void e();if(!(t[i].unit.length<32)){var s=this.decrypter.isSync();if(this.decryptAacSample(t,i,e,s),!s)return}}},i.getAvcEncryptedData=function(t){for(var i=16*Math.floor((t.length-48)/160)+16,e=new Int8Array(i),s=0,n=32;n<=t.length-16;n+=160,s+=16)e.set(t.subarray(n,n+16),s);return e},i.getAvcDecryptedUnit=function(t,i){i=new Uint8Array(i);for(var e=0,s=32;s<=t.length-16;s+=160,e+=16)t.set(i.subarray(e,e+16),s);return t},i.decryptAvcSample=function(t,i,e,s,n,r){var h=this.discardEPB(n.data),o=this.getAvcEncryptedData(h),a=this;this.decryptBuffer(o.buffer,(function(o){n.data=a.getAvcDecryptedUnit(h,o),r||a.decryptAvcSamples(t,i,e+1,s)}))},i.decryptAvcSamples=function(t,i,e,s){for(;;i++,e=0){if(i>=t.length)return void s();for(var n=t[i].units;!(e>=n.length);e++){var r=n[e];if(!(r.length<=48||1!==r.type&&5!==r.type)){var h=this.decrypter.isSync();if(this.decryptAvcSample(t,i,e,s,r,h),!h)return}}}},t}(),I={video:1,audio:2,id3:3,text:4},T=function(){function t(t,i,e,s){this.observer=t,this.config=e,this.typeSupported=s,this.remuxer=i,this.sampleAes=null}var i=t.prototype;return i.setDecryptData=function(t){null!=t&&null!=t.key&&"SAMPLE-AES"===t.method?this.sampleAes=new k(this.observer,this.config,t,this.discardEPB):this.sampleAes=null},t.probe=function(i){var e=t.da(i);return!(e<0||(e&&a.b.warn("MPEG2-TS detected but first sync word found @ offset "+e+", junk ahead ?"),0))},t.da=function(t){for(var i=Math.min(1e3,t.length-564),e=0;e<i;){if(71===t[e]&&71===t[e+188]&&71===t[e+376])return e;e++}return-1},t.createTrack=function(t,i){return{container:"video"===t||"audio"===t?"video/mp2t":void 0,type:t,id:I[t],pid:-1,inputTimeScale:9e4,sequenceNumber:0,samples:[],dropped:"video"===t?0:void 0,isAAC:"audio"===t||void 0,duration:"audio"===t?i:void 0}},i.resetInitSegment=function(i,e,s,n){this.pmtParsed=!1,this.pa=-1,this.fa=t.createTrack("video",n),this.ua=t.createTrack("audio",n),this.va=t.createTrack("id3",n),this.ga=t.createTrack("text",n),this.aacOverFlow=null,this.aacLastPTS=null,this.avcSample=null,this.audioCodec=e,this.videoCodec=s,this.ma=n},i.resetTimeStamp=function(){},i.append=function(i,e,r,h){var o,c,l,u,d,p=i.length,f=!1;this.contiguous=r;var v=this.pmtParsed,g=this.fa,m=this.ua,y=this.va,b=g.pid,w=m.pid,x=y.pid,S=this.pa,_=g.pesData,A=m.pesData,P=y.pesData,k=this.ya,I=this.ba,T=this.wa,C=this.xa.bind(this),M=this.Sa.bind(this),E=this._a.bind(this),L=this.Aa.bind(this),O=t.da(i);for(p-=(p+O)%188,o=O;o<p;o+=188)if(71===i[o]){if(c=!!(64&i[o+1]),l=((31&i[o+1])<<8)+i[o+2],(48&i[o+3])>>4>1){if((u=o+5+i[o+4])===o+188)continue}else u=o+4;switch(l){case b:c&&(_&&(d=T(_))&&C(d,!1),_={data:[],size:0}),_&&(_.data.push(i.subarray(u,o+188)),_.size+=o+188-u);break;case w:c&&(A&&(d=T(A))&&(m.isAAC?M(d):E(d)),A={data:[],size:0}),A&&(A.data.push(i.subarray(u,o+188)),A.size+=o+188-u);break;case x:c&&(P&&(d=T(P))&&L(d),P={data:[],size:0}),P&&(P.data.push(i.subarray(u,o+188)),P.size+=o+188-u);break;case 0:c&&(u+=i[u]+1),S=this.pa=k(i,u);break;case S:c&&(u+=i[u]+1);var R=I(i,u,!0===this.typeSupported.mpeg||!0===this.typeSupported.mp3,null!=this.sampleAes);(b=R.avc)>0&&(g.pid=b),(w=R.audio)>0&&(m.pid=w,m.isAAC=R.isAAC),(x=R.id3)>0&&(y.pid=x),f&&!v&&(a.b.log("reparse from beginning"),f=!1,o=O-188),v=this.pmtParsed=!0;break;case 17:case 8191:break;default:f=!0}}else this.observer.trigger(s.a.ERROR,{type:n.b.MEDIA_ERROR,details:n.a.FRAG_PARSING_ERROR,fatal:!1,reason:"TS packet did not start with 0x47"});_&&(d=T(_))?(C(d,!0),g.pesData=null):g.pesData=_,A&&(d=T(A))?(m.isAAC?M(d):E(d),m.pesData=null):(A&&A.size&&a.b.log("last AAC PES packet truncated,might overlap between fragments"),m.pesData=A),P&&(d=T(P))?(L(d),y.pesData=null):y.pesData=P,null==this.sampleAes?this.remuxer.remux(m,g,y,this.ga,e,r,h):this.decryptAndRemux(m,g,y,this.ga,e,r,h)},i.decryptAndRemux=function(t,i,e,s,n,r,h){if(t.samples&&t.isAAC){var o=this;this.sampleAes.decryptAacSamples(t.samples,0,(function(){o.decryptAndRemuxAvc(t,i,e,s,n,r,h)}))}else this.decryptAndRemuxAvc(t,i,e,s,n,r,h)},i.decryptAndRemuxAvc=function(t,i,e,s,n,r,h){if(i.samples){var o=this;this.sampleAes.decryptAvcSamples(i.samples,0,0,(function(){o.remuxer.remux(t,i,e,s,n,r,h)}))}else this.remuxer.remux(t,i,e,s,n,r,h)},i.destroy=function(){this.Pa=this.ka=void 0,this.ma=0},i.ya=function(t,i){return(31&t[i+10])<<8|t[i+11]},i.ba=function(t,i,e,s){var n,r,h={audio:-1,avc:-1,id3:-1,isAAC:!0};for(n=i+3+((15&t[i+1])<<8|t[i+2])-4,i+=12+((15&t[i+10])<<8|t[i+11]);i<n;){switch(r=(31&t[i+1])<<8|t[i+2],t[i]){case 207:if(!s){a.b.log("unknown stream type:"+t[i]);break}case 15:-1===h.audio&&(h.audio=r);break;case 21:-1===h.id3&&(h.id3=r);break;case 219:if(!s){a.b.log("unknown stream type:"+t[i]);break}case 27:-1===h.avc&&(h.avc=r);break;case 3:case 4:e?-1===h.audio&&(h.audio=r,h.isAAC=!1):a.b.log("MPEG audio found, not supported in this browser for now");break;case 36:a.b.warn("HEVC stream type found, not supported for now");break;default:a.b.log("unknown stream type:"+t[i])}i+=5+((15&t[i+3])<<8|t[i+4])}return h},i.wa=function(t){var i,e,s,n,r,h,o,c,l=0,u=t.data;if(!t||0===t.size)return null;for(;u[0].length<19&&u.length>1;){var d=new Uint8Array(u[0].length+u[1].length);d.set(u[0]),d.set(u[1],u[0].length),u[0]=d,u.splice(1,1)}if(1===((i=u[0])[0]<<16)+(i[1]<<8)+i[2]){if((s=(i[4]<<8)+i[5])&&s>t.size-6)return null;if(192&(e=i[7])&&((h=536870912*(14&i[9])+4194304*(255&i[10])+16384*(254&i[11])+128*(255&i[12])+(254&i[13])/2)>4294967295&&(h-=8589934592),64&e?((o=536870912*(14&i[14])+4194304*(255&i[15])+16384*(254&i[16])+128*(255&i[17])+(254&i[18])/2)>4294967295&&(o-=8589934592),h-o>54e5&&(a.b.warn(Math.round((h-o)/9e4)+"s delta between PTS and DTS, align them"),h=o)):o=h),c=(n=i[8])+9,t.size<=c)return null;t.size-=c,r=new Uint8Array(t.size);for(var p=0,f=u.length;p<f;p++){var v=(i=u[p]).byteLength;if(c){if(c>v){c-=v;continue}i=i.subarray(c),v-=c,c=0}r.set(i,l),l+=v}return s&&(s-=n+3),{data:r,pts:h,dts:o,len:s}}return null},i.pushAccesUnit=function(t,i){if(t.units.length&&t.frame){var e=i.samples,s=e.length;if(isNaN(t.pts)){if(!s)return void i.dropped++;var n=e[s-1];t.pts=n.pts,t.dts=n.dts}!this.config.forceKeyFrameOnDiscontinuity||!0===t.key||i.sps&&(s||this.contiguous)?(t.id=s,e.push(t)):i.dropped++}t.debug.length&&a.b.log(t.pts+"/"+t.dts+":"+t.debug)},i.xa=function(t,i){var e,s,n,r=this,h=this.fa,o=this.Ia(t.data),a=this.avcSample,c=!1,l=this.pushAccesUnit.bind(this),u=function(t,i,e,s){return{key:t,pts:i,dts:e,units:[],debug:s}};t.data=null,a&&o.length&&!h.audFound&&(l(a,h),a=this.avcSample=u(!1,t.pts,t.dts,"")),o.forEach((function(i){switch(i.type){case 1:s=!0,a||(a=r.avcSample=u(!0,t.pts,t.dts,"")),a.frame=!0;var o=i.data;if(c&&o.length>4){var d=new P(o).readSliceType();2!==d&&4!==d&&7!==d&&9!==d||(a.key=!0)}break;case 5:s=!0,a||(a=r.avcSample=u(!0,t.pts,t.dts,"")),a.key=!0,a.frame=!0;break;case 6:s=!0,(e=new P(r.discardEPB(i.data))).readUByte();for(var p=0,f=0,v=!1,g=0;!v&&e.bytesAvailable>1;){p=0;do{p+=g=e.readUByte()}while(255===g);f=0;do{f+=g=e.readUByte()}while(255===g);if(4===p&&0!==e.bytesAvailable){if(v=!0,181===e.readUByte()&&49===e.readUShort()&&1195456820===e.readUInt()&&3===e.readUByte()){var m=e.readUByte(),y=31&m,b=[m,e.readUByte()];for(n=0;n<y;n++)b.push(e.readUByte()),b.push(e.readUByte()),b.push(e.readUByte());r.Ta(r.ga.samples,{type:3,pts:t.pts,bytes:b})}}else if(5===p&&0!==e.bytesAvailable){if(v=!0,f>16){var x=[];for(n=0;n<16;n++)x.push(e.readUByte().toString(16)),3!==n&&5!==n&&7!==n&&9!==n||x.push("-");var S=f-16,_=new Uint8Array(S);for(n=0;n<S;n++)_[n]=e.readUByte();r.Ta(r.ga.samples,{pts:t.pts,payloadType:p,uuid:x.join(""),userDataBytes:_,userData:Object(w.b)(_.buffer)})}}else if(f<e.bytesAvailable)for(n=0;n<f;n++)e.readUByte()}break;case 7:if(s=!0,c=!0,!h.sps){var A=(e=new P(i.data)).readSPS();h.width=A.width,h.height=A.height,h.pixelRatio=A.pixelRatio,h.sps=[i.data],h.duration=r.ma;var k=i.data.subarray(1,4),I="avc1.";for(n=0;n<3;n++){var T=k[n].toString(16);T.length<2&&(T="0"+T),I+=T}h.codec=I}break;case 8:s=!0,h.pps||(h.pps=[i.data]);break;case 9:s=!1,h.audFound=!0,a&&l(a,h),a=r.avcSample=u(!1,t.pts,t.dts,"");break;case 12:s=!1;break;default:s=!1,a&&(a.debug+="unknown NAL "+i.type+" ")}a&&s&&a.units.push(i)})),i&&a&&(l(a,h),this.avcSample=null)},i.Ta=function(t,i){var e=t.length;if(e>0){if(i.pts>=t[e-1].pts)t.push(i);else for(var s=e-1;s>=0;s--)if(i.pts<t[s].pts){t.splice(s,0,i);break}}else t.push(i)},i.Ca=function(){var t,i=this.avcSample;if(!i||0===i.units.length){var e=this.fa.samples;i=e[e.length-1]}if(i){var s=i.units;t=s[s.length-1]}return t},i.Ia=function(t){var i,e,s,n,r=0,h=t.byteLength,o=this.fa,a=o.naluState||0,c=a,l=[],u=-1;for(-1===a&&(u=0,n=31&t[0],a=0,r=1);r<h;)if(i=t[r++],a)if(1!==a)if(i)if(1===i){if(u>=0)s={data:t.subarray(u,r-a-1),type:n},l.push(s);else{var d=this.Ca();if(d&&(c&&r<=4-c&&d.state&&(d.data=d.data.subarray(0,d.data.byteLength-c)),(e=r-a-1)>0)){var p=new Uint8Array(d.data.byteLength+e);p.set(d.data,0),p.set(t.subarray(0,e),d.data.byteLength),d.data=p}}r<h?(u=r,n=31&t[r],a=0):a=-1}else a=0;else a=3;else a=i?0:2;else a=i?0:1;if(u>=0&&a>=0&&(s={data:t.subarray(u,h),type:n,state:a},l.push(s)),0===l.length){var f=this.Ca();if(f){var v=new Uint8Array(f.data.byteLength+t.byteLength);v.set(f.data,0),v.set(t,f.data.byteLength),f.data=v}}return o.naluState=a,l},i.discardEPB=function(t){for(var i,e,s=t.byteLength,n=[],r=1;r<s-2;)0===t[r]&&0===t[r+1]&&3===t[r+2]?(n.push(r+2),r+=2):r++;if(0===n.length)return t;i=s-n.length,e=new Uint8Array(i);var h=0;for(r=0;r<i;h++,r++)h===n[0]&&(h++,n.shift()),e[r]=t[h];return e},i.Sa=function(t){var i,e,r,h,o,c,l,u=this.ua,d=t.data,p=t.pts,f=this.aacOverFlow,g=this.aacLastPTS;if(f){var w=new Uint8Array(f.byteLength+d.byteLength);w.set(f,0),w.set(d,f.byteLength),d=w}for(r=0,o=d.length;r<o-1&&!v(d,r);r++);if(!r||(r<o-1?(c="AAC PES did not start with ADTS header,offset:"+r,l=!1):(c="no ADTS header found in AAC PES",l=!0),a.b.warn("parsing error:"+c),this.observer.trigger(s.a.ERROR,{type:n.b.MEDIA_ERROR,details:n.a.FRAG_PARSING_ERROR,fatal:l,reason:c}),!l)){if(m(u,this.observer,d,r,this.audioCodec),e=0,i=y(u.samplerate),f&&g){var x=g+i;Math.abs(x-p)>1&&(a.b.log("AAC: align PTS for overlapping frames by "+Math.round((x-p)/90)),p=x)}for(;r<o;){if(v(d,r)){if(r+5<o){var S=b(u,d,r,p,e);if(S){r+=S.length,h=S.sample.pts,e++;continue}}break}r++}f=r<o?d.subarray(r,o):null,this.aacOverFlow=f,this.aacLastPTS=h}},i._a=function(t){for(var i=t.data,e=i.length,s=0,n=0,r=t.pts;n<e;)if(A.isHeader(i,n)){var h=A.appendFrame(this.ua,i,n,r,s);if(!h)break;n+=h.length,s++}else n++},i.Aa=function(t){this.va.samples.push(t)},t}(),C=function(){function t(t,i,e){this.observer=t,this.config=e,this.remuxer=i}var i=t.prototype;return i.resetInitSegment=function(t,i,e,s){this.ua={container:"audio/mpeg",type:"audio",id:-1,sequenceNumber:0,isAAC:!1,samples:[],len:0,manifestCodec:i,duration:s,inputTimeScale:9e4}},i.resetTimeStamp=function(){},t.probe=function(t){var i,e,s=w.a.getID3Data(t,0);if(s&&void 0!==w.a.getTimeStamp(s))for(i=s.length,e=Math.min(t.length-1,i+100);i<e;i++)if(A.probe(t,i))return a.b.log("MPEG Audio sync word found !"),!0;return!1},i.append=function(t,i,e,s){for(var n=w.a.getID3Data(t,0),r=w.a.getTimeStamp(n),h=r?90*r:9e4*i,o=n.length,a=t.length,c=0,l=0,u=this.ua,d=[{pts:h,dts:h,data:n}];o<a;)if(A.isHeader(t,o)){var p=A.appendFrame(u,t,o,h,c);if(!p)break;o+=p.length,l=p.sample.pts,c++}else w.a.isHeader(t,o)?(n=w.a.getID3Data(t,o),d.push({pts:l,dts:l,data:n}),o+=n.length):o++;this.remuxer.remux(u,{samples:[]},{samples:d,inputTimeScale:9e4},{samples:[]},i,e,s)},i.destroy=function(){},t}(),M=function(){function t(){}return t.getSilentFrame=function(t,i){if("mp4a.40.2"===t){if(1===i)return new Uint8Array([0,200,0,128,35,128]);if(2===i)return new Uint8Array([33,0,73,144,2,25,0,35,128]);if(3===i)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,142]);if(4===i)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,128,44,128,8,2,56]);if(5===i)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,56]);if(6===i)return new Uint8Array([0,200,0,128,32,132,1,38,64,8,100,0,130,48,4,153,0,33,144,2,0,178,0,32,8,224])}else{if(1===i)return new Uint8Array([1,64,34,128,163,78,230,128,186,8,0,0,0,28,6,241,193,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(2===i)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94]);if(3===i)return new Uint8Array([1,64,34,128,163,94,230,128,186,8,0,0,0,0,149,0,6,241,161,10,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,90,94])}return null},t}(),E=Math.pow(2,32)-1,L=function(){function t(){}return t.init=function(){var i;for(i in t.types={avc1:[],avcC:[],btrt:[],dinf:[],dref:[],esds:[],ftyp:[],hdlr:[],mdat:[],mdhd:[],mdia:[],mfhd:[],minf:[],moof:[],moov:[],mp4a:[],".mp3":[],mvex:[],mvhd:[],pasp:[],sdtp:[],stbl:[],stco:[],stsc:[],stsd:[],stsz:[],stts:[],tfdt:[],tfhd:[],traf:[],trak:[],trun:[],trex:[],tkhd:[],vmhd:[],smhd:[]},t.types)t.types.hasOwnProperty(i)&&(t.types[i]=[i.charCodeAt(0),i.charCodeAt(1),i.charCodeAt(2),i.charCodeAt(3)]);var e=new Uint8Array([0,0,0,0,0,0,0,0,118,105,100,101,0,0,0,0,0,0,0,0,0,0,0,0,86,105,100,101,111,72,97,110,100,108,101,114,0]),s=new Uint8Array([0,0,0,0,0,0,0,0,115,111,117,110,0,0,0,0,0,0,0,0,0,0,0,0,83,111,117,110,100,72,97,110,100,108,101,114,0]);t.HDLR_TYPES={video:e,audio:s};var n=new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,12,117,114,108,32,0,0,0,1]),r=new Uint8Array([0,0,0,0,0,0,0,0]);t.STTS=t.STSC=t.STCO=r,t.STSZ=new Uint8Array([0,0,0,0,0,0,0,0,0,0,0,0]),t.VMHD=new Uint8Array([0,0,0,1,0,0,0,0,0,0,0,0]),t.SMHD=new Uint8Array([0,0,0,0,0,0,0,0]),t.STSD=new Uint8Array([0,0,0,0,0,0,0,1]);var h=new Uint8Array([105,115,111,109]),o=new Uint8Array([97,118,99,49]),a=new Uint8Array([0,0,0,1]);t.FTYP=t.box(t.types.ftyp,h,a,h,o),t.DINF=t.box(t.types.dinf,t.box(t.types.dref,n))},t.box=function(t){for(var i,e=Array.prototype.slice.call(arguments,1),s=8,n=e.length,r=n;n--;)s+=e[n].byteLength;for((i=new Uint8Array(s))[0]=s>>24&255,i[1]=s>>16&255,i[2]=s>>8&255,i[3]=255&s,i.set(t,4),n=0,s=8;n<r;n++)i.set(e[n],s),s+=e[n].byteLength;return i},t.hdlr=function(i){return t.box(t.types.hdlr,t.HDLR_TYPES[i])},t.mdat=function(i){return t.box(t.types.mdat,i)},t.mdhd=function(i,e){e*=i;var s=Math.floor(e/(E+1)),n=Math.floor(e%(E+1));return t.box(t.types.mdhd,new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,i>>24&255,i>>16&255,i>>8&255,255&i,s>>24,s>>16&255,s>>8&255,255&s,n>>24,n>>16&255,n>>8&255,255&n,85,196,0,0]))},t.mdia=function(i){return t.box(t.types.mdia,t.mdhd(i.timescale,i.duration),t.hdlr(i.type),t.minf(i))},t.mfhd=function(i){return t.box(t.types.mfhd,new Uint8Array([0,0,0,0,i>>24,i>>16&255,i>>8&255,255&i]))},t.minf=function(i){return"audio"===i.type?t.box(t.types.minf,t.box(t.types.smhd,t.SMHD),t.DINF,t.stbl(i)):t.box(t.types.minf,t.box(t.types.vmhd,t.VMHD),t.DINF,t.stbl(i))},t.moof=function(i,e,s){return t.box(t.types.moof,t.mfhd(i),t.traf(s,e))},t.moov=function(i){for(var e=i.length,s=[];e--;)s[e]=t.trak(i[e]);return t.box.apply(null,[t.types.moov,t.mvhd(i[0].timescale,i[0].duration)].concat(s).concat(t.mvex(i)))},t.mvex=function(i){for(var e=i.length,s=[];e--;)s[e]=t.trex(i[e]);return t.box.apply(null,[t.types.mvex].concat(s))},t.mvhd=function(i,e){e*=i;var s=Math.floor(e/(E+1)),n=Math.floor(e%(E+1)),r=new Uint8Array([1,0,0,0,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,i>>24&255,i>>16&255,i>>8&255,255&i,s>>24,s>>16&255,s>>8&255,255&s,n>>24,n>>16&255,n>>8&255,255&n,0,1,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,255,255,255,255]);return t.box(t.types.mvhd,r)},t.sdtp=function(i){var e,s,n=i.samples||[],r=new Uint8Array(4+n.length);for(s=0;s<n.length;s++)e=n[s].flags,r[s+4]=e.dependsOn<<4|e.isDependedOn<<2|e.hasRedundancy;return t.box(t.types.sdtp,r)},t.stbl=function(i){return t.box(t.types.stbl,t.stsd(i),t.box(t.types.stts,t.STTS),t.box(t.types.stsc,t.STSC),t.box(t.types.stsz,t.STSZ),t.box(t.types.stco,t.STCO))},t.avc1=function(i){var e,s,n,r=[],h=[];for(e=0;e<i.sps.length;e++)n=(s=i.sps[e]).byteLength,r.push(n>>>8&255),r.push(255&n),r=r.concat(Array.prototype.slice.call(s));for(e=0;e<i.pps.length;e++)n=(s=i.pps[e]).byteLength,h.push(n>>>8&255),h.push(255&n),h=h.concat(Array.prototype.slice.call(s));var o=t.box(t.types.avcC,new Uint8Array([1,r[3],r[4],r[5],255,224|i.sps.length].concat(r).concat([i.pps.length]).concat(h))),a=i.width,c=i.height,l=i.pixelRatio[0],u=i.pixelRatio[1];return t.box(t.types.avc1,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,a>>8&255,255&a,c>>8&255,255&c,0,72,0,0,0,72,0,0,0,0,0,0,0,1,18,100,97,105,108,121,109,111,116,105,111,110,47,104,108,115,46,106,115,0,0,0,0,0,0,0,0,0,0,0,0,0,0,24,17,17]),o,t.box(t.types.btrt,new Uint8Array([0,28,156,128,0,45,198,192,0,45,198,192])),t.box(t.types.pasp,new Uint8Array([l>>24,l>>16&255,l>>8&255,255&l,u>>24,u>>16&255,u>>8&255,255&u])))},t.esds=function(t){var i=t.config.length;return new Uint8Array([0,0,0,0,3,23+i,0,1,0,4,15+i,64,21,0,0,0,0,0,0,0,0,0,0,0,5].concat([i]).concat(t.config).concat([6,1,2]))},t.mp4a=function(i){var e=i.samplerate;return t.box(t.types.mp4a,new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,i.channelCount,0,16,0,0,0,0,e>>8&255,255&e,0,0]),t.box(t.types.esds,t.esds(i)))},t.mp3=function(i){var e=i.samplerate;return t.box(t.types[".mp3"],new Uint8Array([0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,i.channelCount,0,16,0,0,0,0,e>>8&255,255&e,0,0]))},t.stsd=function(i){return"audio"===i.type?i.isAAC||"mp3"!==i.codec?t.box(t.types.stsd,t.STSD,t.mp4a(i)):t.box(t.types.stsd,t.STSD,t.mp3(i)):t.box(t.types.stsd,t.STSD,t.avc1(i))},t.tkhd=function(i){var e=i.id,s=i.duration*i.timescale,n=i.width,r=i.height,h=Math.floor(s/(E+1)),o=Math.floor(s%(E+1));return t.box(t.types.tkhd,new Uint8Array([1,0,0,7,0,0,0,0,0,0,0,2,0,0,0,0,0,0,0,3,e>>24&255,e>>16&255,e>>8&255,255&e,0,0,0,0,h>>24,h>>16&255,h>>8&255,255&h,o>>24,o>>16&255,o>>8&255,255&o,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,64,0,0,0,n>>8&255,255&n,0,0,r>>8&255,255&r,0,0]))},t.traf=function(i,e){var s=t.sdtp(i),n=i.id,r=Math.floor(e/(E+1)),h=Math.floor(e%(E+1));return t.box(t.types.traf,t.box(t.types.tfhd,new Uint8Array([0,0,0,0,n>>24,n>>16&255,n>>8&255,255&n])),t.box(t.types.tfdt,new Uint8Array([1,0,0,0,r>>24,r>>16&255,r>>8&255,255&r,h>>24,h>>16&255,h>>8&255,255&h])),t.trun(i,s.length+16+20+8+16+8+8),s)},t.trak=function(i){return i.duration=i.duration||4294967295,t.box(t.types.trak,t.tkhd(i),t.mdia(i))},t.trex=function(i){var e=i.id;return t.box(t.types.trex,new Uint8Array([0,0,0,0,e>>24,e>>16&255,e>>8&255,255&e,0,0,0,1,0,0,0,0,0,0,0,0,0,1,0,1]))},t.trun=function(i,e){var s,n,r,h,o,a,c=i.samples||[],l=c.length,u=12+16*l,d=new Uint8Array(u);for(e+=8+u,d.set([0,0,15,1,l>>>24&255,l>>>16&255,l>>>8&255,255&l,e>>>24&255,e>>>16&255,e>>>8&255,255&e],0),s=0;s<l;s++)r=(n=c[s]).duration,h=n.size,o=n.flags,a=n.cts,d.set([r>>>24&255,r>>>16&255,r>>>8&255,255&r,h>>>24&255,h>>>16&255,h>>>8&255,255&h,o.isLeading<<2|o.dependsOn,o.isDependedOn<<6|o.hasRedundancy<<4|o.paddingValue<<1|o.isNonSync,61440&o.degradPrio,15&o.degradPrio,a>>>24&255,a>>>16&255,a>>>8&255,255&a],12+16*s);return t.box(t.types.trun,d)},t.initSegment=function(i){t.types||t.init();var e,s=t.moov(i);return(e=new Uint8Array(t.FTYP.byteLength+s.byteLength)).set(t.FTYP),e.set(s,t.FTYP.byteLength),e},t}();function O(t,i,e,s){void 0===e&&(e=1),void 0===s&&(s=!1);var n=t*i*e;return s?Math.round(n):n}function R(t,i){return void 0===i&&(i=!1),O(t,1e3,1/9e4,i)}function B(t,i){return void 0===i&&(i=1),O(t,9e4,1/i)}var D,j=B(10),F=B(.2),$=function(){function t(t,i,e,s){this.observer=t,this.config=i,this.typeSupported=e;var n=navigator.userAgent;this.isSafari=s&&s.indexOf("Apple")>-1&&n&&!n.match("CriOS"),this.ISGenerated=!1}var i=t.prototype;return i.destroy=function(){},i.resetTimeStamp=function(t){this.Pa=this.ka=t},i.resetInitSegment=function(){this.ISGenerated=!1},i.remux=function(t,i,e,n,r,h,o){if(this.ISGenerated||this.generateIS(t,i,r),this.ISGenerated){var c=t.samples.length,l=i.samples.length,u=r,d=r;if(c&&l){var p=(t.samples[0].pts-i.samples[0].pts)/i.inputTimeScale;u+=Math.max(0,p),d+=Math.max(0,-p)}if(c){t.timescale||(a.b.warn("regenerate InitSegment as audio detected"),this.generateIS(t,i,r));var f,v=this.remuxAudio(t,u,h,o);l&&(v&&(f=v.endPTS-v.startPTS),i.timescale||(a.b.warn("regenerate InitSegment as video detected"),this.generateIS(t,i,r)),this.remuxVideo(i,d,h,f,o))}else if(l){var g=this.remuxVideo(i,d,h,0,o);g&&t.codec&&this.remuxEmptyAudio(t,u,h,g)}}e.samples.length&&this.remuxID3(e,r),n.samples.length&&this.remuxText(n,r),this.observer.trigger(s.a.FRAG_PARSED)},i.generateIS=function(t,i,e){var r,h,o=this.observer,c=t.samples,l=i.samples,u=this.typeSupported,d="audio/mp4",p={},f={tracks:p},v=void 0===this.Pa;if(v&&(r=h=1/0),t.config&&c.length&&(t.timescale=t.samplerate,a.b.log("audio sampling rate : "+t.samplerate),t.isAAC||(u.mpeg?(d="audio/mpeg",t.codec=""):u.mp3&&(t.codec="mp3")),p.audio={container:d,codec:t.codec,initSegment:!t.isAAC&&u.mpeg?new Uint8Array:L.initSegment([t]),metadata:{channelCount:t.channelCount}},v&&(r=h=c[0].pts-t.inputTimeScale*e)),i.sps&&i.pps&&l.length){var g=i.inputTimeScale;i.timescale=g,p.video={container:"video/mp4",codec:i.codec,initSegment:L.initSegment([i]),metadata:{width:i.width,height:i.height}},v&&(r=Math.min(r,l[0].pts-g*e),h=Math.min(h,l[0].dts-g*e),this.observer.trigger(s.a.INIT_PTS_FOUND,{initPTS:r}))}Object.keys(p).length?(o.trigger(s.a.FRAG_PARSING_INIT_SEGMENT,f),this.ISGenerated=!0,v&&(this.Pa=r,this.ka=h)):o.trigger(s.a.ERROR,{type:n.b.MEDIA_ERROR,details:n.a.FRAG_PARSING_ERROR,fatal:!1,reason:"no audio/video samples found"})},i.remuxVideo=function(t,i,e,r,h){var o,c,l,u,d,p,f,v=8,g=t.timescale,m=t.samples,y=[],b=m.length,w=this.Ma,x=this.Pa,S=this.nextAvcDts,_=this.isSafari;if(0!==b){_&&(e|=m.length&&S&&(h&&Math.abs(i-S/g)<.1||Math.abs(m[0].pts-S-x)<g/5)),e||(S=i*g),m.forEach((function(t){t.pts=w(t.pts-x,S),t.dts=w(t.dts-x,S)})),m.sort((function(t,i){var e=t.dts-i.dts,s=t.pts-i.pts;return e||s||t.id-i.id}));var A=m.reduce((function(t,i){return Math.max(Math.min(t,i.pts-i.dts),-1*F)}),0);if(A<0){a.b.warn("PTS < DTS detected in video samples, shifting DTS by "+R(A,!0)+" ms to overcome this issue");for(var P=0;P<m.length;P++)m[P].dts+=A}var k=m[0];d=Math.max(k.dts,0),u=Math.max(k.pts,0);var I=d-S;e&&I&&(I>1?a.b.log("AVC: "+R(I,!0)+" ms hole between fragments detected,filling it"):I<-1&&a.b.log("AVC: "+R(-I,!0)+" ms overlapping between fragments detected"),d=S,m[0].dts=d,u=Math.max(u-I,S),m[0].pts=u,a.b.log("Video: PTS/DTS adjusted: "+R(u,!0)+"/"+R(d,!0)+", delta: "+R(I,!0)+" ms")),k=m[m.length-1],f=Math.max(k.dts,0),p=Math.max(k.pts,0,f),_&&(o=Math.round((f-d)/(m.length-1)));for(var T=0,C=0,M=0;M<b;M++){for(var E=m[M],O=E.units,B=O.length,D=0,j=0;j<B;j++)D+=O[j].data.length;C+=D,T+=B,E.length=D,E.dts=_?d+M*o:Math.max(E.dts,d),E.pts=Math.max(E.pts,E.dts)}var $=C+4*T+8;try{c=new Uint8Array($)}catch(t){return void this.observer.trigger(s.a.ERROR,{type:n.b.MUX_ERROR,details:n.a.REMUX_ALLOC_ERROR,fatal:!1,bytes:$,reason:"fail allocating video mdat "+$})}var V=new DataView(c.buffer);V.setUint32(0,$),c.set(L.types.mdat,4);for(var U=0;U<b;U++){for(var N=m[U],H=N.units,z=0,q=void 0,W=0,G=H.length;W<G;W++){var J=H[W],Q=J.data,X=J.data.byteLength;V.setUint32(v,X),v+=4,c.set(Q,v),v+=X,z+=4+X}if(_)q=Math.max(0,o*Math.round((N.pts-N.dts)/o));else{if(U<b-1)o=m[U+1].dts-N.dts;else{var Y=this.config,K=N.dts-m[U>0?U-1:U].dts;if(Y.stretchShortVideoTrack){var Z=Y.maxBufferHole,tt=Math.floor(Z*g),it=(r?u+r*g:this.nextAudioPts)-N.pts;it>tt?((o=it-K)<0&&(o=K),a.b.log("It is approximately "+R(it,!1)+" ms to the next segment; using duration "+R(o,!1)+" ms for the last video frame.")):o=K}else o=K}q=Math.round(N.pts-N.dts)}y.push({size:z,duration:o,cts:q,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:N.key?2:1,isNonSync:N.key?0:1}})}this.nextAvcDts=f+o;var et=t.dropped;if(t.nbNalu=0,t.dropped=0,y.length&&navigator.userAgent.toLowerCase().indexOf("chrome")>-1){var st=y[0].flags;st.dependsOn=2,st.isNonSync=0}t.samples=y,l=L.moof(t.sequenceNumber++,d,t),t.samples=[];var nt={data1:l,data2:c,startPTS:u/g,endPTS:(p+o)/g,startDTS:d/g,endDTS:this.nextAvcDts/g,type:"video",hasAudio:!1,hasVideo:!0,nb:y.length,dropped:et};return this.observer.trigger(s.a.FRAG_PARSING_DATA,nt),nt}},i.remuxAudio=function(t,i,e,r){var h,o,c,l,u,d,p=t.inputTimeScale,f=t.timescale,v=p/f,g=(t.isAAC?1024:1152)*v,m=this.Ma,y=this.Pa,b=!t.isAAC&&this.typeSupported.mpeg,w=b?0:8,x=t.samples,S=[],_=this.nextAudioPts;if(e|=x.length&&_&&(r&&Math.abs(i-_/p)<.1||Math.abs(x[0].pts-_-y)<20*g),x.forEach((function(t){t.pts=t.dts=m(t.pts-y,i*p)})),0!==(x=x.filter((function(t){return t.pts>=0}))).length){if(e||(_=r?i*p:x[0].pts),t.isAAC)for(var A=this.config.maxAudioFramesDrift,P=0,k=_;P<x.length;){var I,T=x[P];if((I=T.pts-k)<=-A*g)a.b.warn("Dropping 1 audio frame @ "+R(k,!0)+" ms due to "+R(I,!0)+" ms overlap."),x.splice(P,1);else if(I>=A*g&&I<j&&k){var C=Math.round(I/g);a.b.warn("Injecting "+C+" audio frames @ "+R(k,!0)+" ms due to "+R(k,!0)+" ms gap.");for(var E=0;E<C;E++){var O=Math.max(k,0);(o=M.getSilentFrame(t.manifestCodec||t.codec,t.channelCount))||(a.b.log("Unable to get silent frame for given audio codec; duplicating last frame instead."),o=T.unit.subarray()),x.splice(P,0,{unit:o,pts:O,dts:O}),k+=g,P++}T.pts=T.dts=k,k+=g,P++}else Math.abs(I),T.pts=T.dts=k,k+=g,P++}for(var B=x.length,D=0;B--;)D+=x[B].unit.byteLength;for(var F=0,$=x.length;F<$;F++){var V=x[F],U=V.unit,N=V.pts;if(void 0!==d)h.duration=Math.round((N-d)/v);else{var H=N-_,z=0;if(e&&t.isAAC&&H){if(H>0&&H<j)z=Math.round((N-_)/g),a.b.log(R(H,!0)+" ms hole between AAC samples detected,filling it"),z>0&&((o=M.getSilentFrame(t.manifestCodec||t.codec,t.channelCount))||(o=U.subarray()),D+=z*o.length);else if(H<-12){a.b.log("drop overlapping AAC sample, expected/parsed/delta: "+R(_,!0)+" ms / "+R(N,!0)+" ms / "+R(-H,!0)+" ms"),D-=U.byteLength;continue}N=_}if(u=N,!(D>0))return;D+=w;try{c=new Uint8Array(D)}catch(t){return void this.observer.trigger(s.a.ERROR,{type:n.b.MUX_ERROR,details:n.a.REMUX_ALLOC_ERROR,fatal:!1,bytes:D,reason:"fail allocating audio mdat "+D})}b||(new DataView(c.buffer).setUint32(0,D),c.set(L.types.mdat,4));for(var q=0;q<z;q++)(o=M.getSilentFrame(t.manifestCodec||t.codec,t.channelCount))||(a.b.log("Unable to get silent frame for given audio codec; duplicating this frame instead."),o=U.subarray()),c.set(o,w),w+=o.byteLength,h={size:o.byteLength,cts:0,duration:1024,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},S.push(h)}c.set(U,w);var W=U.byteLength;w+=W,h={size:W,cts:0,duration:0,flags:{isLeading:0,isDependedOn:0,hasRedundancy:0,degradPrio:0,dependsOn:1}},S.push(h),d=N}var G=0;if((B=S.length)>=2&&(G=S[B-2].duration,h.duration=G),B){this.nextAudioPts=_=d+v*G,t.samples=S,l=b?new Uint8Array:L.moof(t.sequenceNumber++,u/v,t),t.samples=[];var J=u/p,Q=_/p,X={data1:l,data2:c,startPTS:J,endPTS:Q,startDTS:J,endDTS:Q,type:"audio",hasAudio:!0,hasVideo:!1,nb:B};return this.observer.trigger(s.a.FRAG_PARSING_DATA,X),X}return null}},i.remuxEmptyAudio=function(t,i,e,s){var n=t.inputTimeScale,r=n/(t.samplerate?t.samplerate:n),h=this.nextAudioPts,o=(void 0!==h?h:s.startDTS*n)+this.ka,c=s.endDTS*n+this.ka,l=1024*r,u=Math.ceil((c-o)/l),d=M.getSilentFrame(t.manifestCodec||t.codec,t.channelCount);if(a.b.warn("remux empty Audio"),d){for(var p=[],f=0;f<u;f++){var v=o+f*l;p.push({unit:d,pts:v,dts:v})}t.samples=p,this.remuxAudio(t,i,e)}else a.b.trace("Unable to remuxEmptyAudio since we were unable to get a silent frame for given audio codec!")},i.remuxID3=function(t){var i,e=t.samples.length,n=t.inputTimeScale,r=this.Pa,h=this.ka;if(e){for(var o=0;o<e;o++)(i=t.samples[o]).pts=(i.pts-r)/n,i.dts=(i.dts-h)/n;this.observer.trigger(s.a.FRAG_PARSING_METADATA,{samples:t.samples})}t.samples=[]},i.remuxText=function(t){t.samples.sort((function(t,i){return t.pts-i.pts}));var i,e=t.samples.length,n=t.inputTimeScale,r=this.Pa;if(e){for(var h=0;h<e;h++)(i=t.samples[h]).pts=(i.pts-r)/n;this.observer.trigger(s.a.FRAG_PARSING_USERDATA,{samples:t.samples})}t.samples=[]},i.Ma=function(t,i){var e;if(void 0===i)return t;for(e=i<t?-8589934592:8589934592;Math.abs(t-i)>4294967296;)t+=e;return t},t}(),V=function(){function t(t){this.observer=t}var i=t.prototype;return i.destroy=function(){},i.resetTimeStamp=function(){},i.resetInitSegment=function(){},i.remux=function(t,i,e,n,r,h,o,a){var c=this.observer,l="";t&&(l+="audio"),i&&(l+="video"),c.trigger(s.a.FRAG_PARSING_DATA,{data1:a,startPTS:r,startDTS:r,type:l,hasAudio:!!t,hasVideo:!!i,nb:1,dropped:0}),c.trigger(s.a.FRAG_PARSED)},t}(),U=Object(c.a)();try{D=U.performance.now.bind(U.performance)}catch(t){a.b.debug("Unable to use Performance API on this environment"),D=U.Date.now}var N=function(){function t(t,i,e,s){this.observer=t,this.typeSupported=i,this.config=e,this.vendor=s}var i=t.prototype;return i.destroy=function(){var t=this.demuxer;t&&t.destroy()},i.push=function(t,i,e,n,r,h,o,a,c,u,d,p){var f=this;if(t.byteLength>0&&null!=i&&null!=i.key&&"AES-128"===i.method){var v=this.decrypter;null==v&&(v=this.decrypter=new l(this.observer,this.config));var g=D();v.decrypt(t,i.key.buffer,i.iv.buffer,(function(t){var l=D();f.observer.trigger(s.a.FRAG_DECRYPTED,{stats:{tstart:g,tdecrypt:l}}),f.pushDecrypted(new Uint8Array(t),i,new Uint8Array(e),n,r,h,o,a,c,u,d,p)}))}else this.pushDecrypted(new Uint8Array(t),i,new Uint8Array(e),n,r,h,o,a,c,u,d,p)},i.pushDecrypted=function(t,i,e,r,h,o,a,c,l,u,d,p){var f=this.demuxer;if(!f||(a||c)&&!this.probe(t)){for(var v=this.observer,g=this.typeSupported,m=this.config,y=[{demux:T,remux:$},{demux:S.a,remux:V},{demux:x,remux:$},{demux:C,remux:$}],b=0,w=y.length;b<w;b++){var _=y[b],A=_.demux.probe;if(A(t)){var P=this.remuxer=new _.remux(v,m,g,this.vendor);f=new _.demux(v,P,m,g),this.probe=A;break}}if(!f)return void v.trigger(s.a.ERROR,{type:n.b.MEDIA_ERROR,details:n.a.FRAG_PARSING_ERROR,fatal:!0,reason:"no demux matching with content found"});this.demuxer=f}var k=this.remuxer;(a||c)&&(f.resetInitSegment(e,r,h,u),k.resetInitSegment()),a&&(f.resetTimeStamp(p),k.resetTimeStamp(p)),"function"==typeof f.setDecryptData&&f.setDecryptData(i),f.append(t,o,l,d)},t}();i.a=N},function(t,i,e){"use strict";var s=e(0),n=e(1),r=Math.pow(2,32)-1,h=function(){function t(t,i){this.observer=t,this.remuxer=i}var i=t.prototype;return i.resetTimeStamp=function(t){this.initPTS=t},i.resetInitSegment=function(i,e,s,r){if(i&&i.byteLength){var h=this.initData=t.parseInitSegment(i);null==e&&(e="mp4a.40.5"),null==s&&(s="avc1.42e01e");var o={};h.audio&&h.video?o.audiovideo={container:"video/mp4",codec:e+","+s,initSegment:r?i:null}:(h.audio&&(o.audio={container:"audio/mp4",codec:e,initSegment:r?i:null}),h.video&&(o.video={container:"video/mp4",codec:s,initSegment:r?i:null})),this.observer.trigger(n.a.FRAG_PARSING_INIT_SEGMENT,{tracks:o})}else e&&(this.audioCodec=e),s&&(this.videoCodec=s)},t.probe=function(i){return t.findBox({data:i,start:0,end:Math.min(i.length,16384)},["moof"]).length>0},t.bin2str=function(t){return String.fromCharCode.apply(null,t)},t.readUint16=function(t,i){t.data&&(i+=t.start,t=t.data);var e=t[i]<<8|t[i+1];return e<0?65536+e:e},t.readUint32=function(t,i){t.data&&(i+=t.start,t=t.data);var e=t[i]<<24|t[i+1]<<16|t[i+2]<<8|t[i+3];return e<0?4294967296+e:e},t.writeUint32=function(t,i,e){t.data&&(i+=t.start,t=t.data),t[i]=e>>24,t[i+1]=e>>16&255,t[i+2]=e>>8&255,t[i+3]=255&e},t.findBox=function(i,e){var s,n,r,h,o,a,c=[];if(i.data?(o=i.start,r=i.end,i=i.data):(o=0,r=i.byteLength),!e.length)return null;for(s=o;s<r;)a=(n=t.readUint32(i,s))>1?s+n:r,t.bin2str(i.subarray(s+4,s+8))===e[0]&&(1===e.length?c.push({data:i,start:s+8,end:a}):(h=t.findBox({data:i,start:s+8,end:a},e.slice(1))).length&&(c=c.concat(h))),s=a;return c},t.parseSegmentIndex=function(i){var e,s=t.findBox(i,["moov"])[0],n=s?s.end:null,r=0,h=t.findBox(i,["sidx"]);if(!h||!h[0])return null;e=[];var o=(h=h[0]).data[0];r=0===o?8:16;var a=t.readUint32(h,r);r+=4,r+=0===o?8:16,r+=2;var c=h.end+0,l=t.readUint16(h,r);r+=2;for(var u=0;u<l;u++){var d=r,p=t.readUint32(h,d);d+=4;var f=2147483647&p;if(1==(2147483648&p)>>>31)return void console.warn("SIDX has hierarchical references (not supported)");var v=t.readUint32(h,d);d+=4,e.push({referenceSize:f,subsegmentDuration:v,info:{duration:v/a,start:c,end:c+f-1}}),c+=f,r=d+=4}return{earliestPresentationTime:0,timescale:a,version:o,referencesCount:l,references:e,moovEndOffset:n}},t.parseInitSegment=function(i){var e=[];return t.findBox(i,["moov","trak"]).forEach((function(i){var n=t.findBox(i,["tkhd"])[0];if(n){var r=n.data[n.start],h=0===r?12:20,o=t.readUint32(n,h),a=t.findBox(i,["mdia","mdhd"])[0];if(a){h=0===(r=a.data[a.start])?12:20;var c=t.readUint32(a,h),l=t.findBox(i,["mdia","hdlr"])[0];if(l){var u={soun:"audio",vide:"video"}[t.bin2str(l.data.subarray(l.start+8,l.start+12))];if(u){var d=t.findBox(i,["mdia","minf","stbl","stsd"]);if(d.length){d=d[0];var p=t.bin2str(d.data.subarray(d.start+12,d.start+16));s.b.log("MP4Demuxer:"+u+":"+p+" found")}e[o]={timescale:c,type:u},e[u]={timescale:c,id:o}}}}}})),e},t.getStartDTS=function(i,e){var s,n,r;return s=t.findBox(e,["moof","traf"]),n=[].concat.apply([],s.map((function(e){return t.findBox(e,["tfhd"]).map((function(s){var n,r;return n=t.readUint32(s,4),r=i[n].timescale||9e4,t.findBox(e,["tfdt"]).map((function(i){var e,s;return e=i.data[i.start],s=t.readUint32(i,4),1===e&&(s*=Math.pow(2,32),s+=t.readUint32(i,8)),s}))[0]/r}))}))),r=Math.min.apply(null,n),isFinite(r)?r:0},t.offsetStartDTS=function(i,e,s){t.findBox(e,["moof","traf"]).map((function(e){return t.findBox(e,["tfhd"]).map((function(n){var h=t.readUint32(n,4),o=i[h].timescale||9e4;t.findBox(e,["tfdt"]).map((function(i){var e=i.data[i.start],n=t.readUint32(i,4);if(0===e)t.writeUint32(i,4,n-s*o);else{n*=Math.pow(2,32),n+=t.readUint32(i,8),n-=s*o,n=Math.max(n,0);var h=Math.floor(n/(r+1)),a=Math.floor(n%(r+1));t.writeUint32(i,4,h),t.writeUint32(i,8,a)}}))}))}))},i.append=function(i,e,s,r){var h=this.initData;h||(this.resetInitSegment(i,this.audioCodec,this.videoCodec,!1),h=this.initData);var o,a=this.initPTS;if(void 0===a){var c=t.getStartDTS(h,i);this.initPTS=a=c-e,this.observer.trigger(n.a.INIT_PTS_FOUND,{initPTS:a})}t.offsetStartDTS(h,i,a),o=t.getStartDTS(h,i),this.remuxer.remux(h.audio,h.video,null,null,o,s,r,i)},i.destroy=function(){},t}();i.a=h},function(t,i,e){function s(t){var i={};function e(s){if(i[s])return i[s].exports;var n=i[s]={i:s,l:!1,exports:{}};return t[s].call(n.exports,n,n.exports,e),n.l=!0,n.exports}e.m=t,e.c=i,e.i=function(t){return t},e.d=function(t,i,s){e.o(t,i)||Object.defineProperty(t,i,{configurable:!1,enumerable:!0,get:s})},e.r=function(t){Object.defineProperty(t,"R",{value:!0})},e.n=function(t){var i=t&&t.R?function(){return t.default}:function(){return t};return e.d(i,"a",i),i},e.o=function(t,i){return Object.prototype.hasOwnProperty.call(t,i)},e.p="/",e.oe=function(t){throw console.error(t),t};var s=e(e.s=ENTRY_MODULE);return s.default||s}var n="\\(\\s*(/\\*.*?\\*/)?\\s*.*?([\\.|\\-|\\+|\\w|/|@]+).*?\\)";function r(t){return(t+"").replace(/[.?*+^$[\]\\(){}|-]/g,"\\$&")}function h(t,i,s){var h={};h[s]=[];var o=i.toString(),a=o.match(/^function\s?\w*\(\w+,\s*\w+,\s*(\w+)\)/);if(!a)return h;for(var c,l=a[1],u=new RegExp("(\\\\n|\\W)"+r(l)+n,"g");c=u.exec(o);)"dll-reference"!==c[3]&&h[s].push(c[3]);for(u=new RegExp("\\("+r(l)+'\\("(dll-reference\\s([\\.|\\-|\\+|\\w|/|@]+))"\\)\\)'+n,"g");c=u.exec(o);)t[c[2]]||(h[s].push(c[1]),t[c[2]]=e(c[1]).m),h[c[2]]=h[c[2]]||[],h[c[2]].push(c[4]);for(var d,p=Object.keys(h),f=0;f<p.length;f++)for(var v=0;v<h[p[f]].length;v++)d=h[p[f]][v],isNaN(1*d)||(h[p[f]][v]=1*h[p[f]][v]);return h}function o(t){return Object.keys(t).reduce((function(i,e){return i||t[e].length>0}),!1)}t.exports=function(t,i){i=i||{};var n={main:e.m},r=i.all?{main:Object.keys(n.main)}:function(t,i){for(var e={main:[i]},s={main:[]},n={main:{}};o(e);)for(var r=Object.keys(e),a=0;a<r.length;a++){var c=r[a],l=e[c].pop();if(n[c]=n[c]||{},!n[c][l]&&t[c][l]){n[c][l]=!0,s[c]=s[c]||[],s[c].push(l);for(var u=h(t,t[c][l],c),d=Object.keys(u),p=0;p<d.length;p++)e[d[p]]=e[d[p]]||[],e[d[p]]=e[d[p]].concat(u[d[p]])}}return s}(n,t),a="";Object.keys(r).filter((function(t){return"main"!==t})).forEach((function(t){for(var i=0;r[t][i];)i++;r[t].push(i),n[t][i]="(function(module, exports, __webpack_require__) { module.exports = __webpack_require__; })",a=a+"var "+t+" = ("+s.toString().replace("ENTRY_MODULE",JSON.stringify(i))+")({"+r[t].map((function(i){return JSON.stringify(i)+": "+n[t][i].toString()})).join(",")+"});\n"})),a=a+"new (("+s.toString().replace("ENTRY_MODULE",JSON.stringify(t))+")({"+r.main.map((function(t){return JSON.stringify(t)+": "+n.main[t].toString()})).join(",")+"}))(self);";var c=new window.Blob([a],{type:"text/javascript"});if(i.bare)return c;var l=(window.URL||window.webkitURL||window.mozURL||window.msURL).createObjectURL(c),u=new window.Worker(l);return u.objectURL=l,u}},function(t,i,e){"use strict";e.r(i);var s=e(9),n=e(1),r=e(0),h=e(8);i.default=function(t){var i=new h.EventEmitter;i.trigger=function(t){for(var e=arguments.length,s=new Array(e>1?e-1:0),n=1;n<e;n++)s[n-1]=arguments[n];i.emit.apply(i,[t,t].concat(s))},i.off=function(t){for(var e=arguments.length,s=new Array(e>1?e-1:0),n=1;n<e;n++)s[n-1]=arguments[n];i.removeListener.apply(i,[t].concat(s))};var e=function(i,e){t.postMessage({event:i,data:e})};t.addEventListener("message",(function(n){var h=n.data;switch(h.cmd){case"init":var o=JSON.parse(h.config);t.demuxer=new s.a(i,h.typeSupported,o,h.vendor),Object(r.a)(o.debug),e("init",null);break;case"demux":t.demuxer.push(h.data,h.decryptdata,h.initSegment,h.audioCodec,h.videoCodec,h.timeOffset,h.discontinuity,h.trackSwitch,h.contiguous,h.duration,h.accurateTimeOffset,h.defaultInitPTS)}})),i.on(n.a.FRAG_DECRYPTED,e),i.on(n.a.FRAG_PARSING_INIT_SEGMENT,e),i.on(n.a.FRAG_PARSED,e),i.on(n.a.ERROR,e),i.on(n.a.FRAG_PARSING_METADATA,e),i.on(n.a.FRAG_PARSING_USERDATA,e),i.on(n.a.INIT_PTS_FOUND,e),i.on(n.a.FRAG_PARSING_DATA,(function(i,e){var s=[],n={event:i,data:e};e.data1&&(n.data1=e.data1.buffer,s.push(e.data1.buffer),delete e.data1),e.data2&&(n.data2=e.data2.buffer,s.push(e.data2.buffer),delete e.data2),t.postMessage(n,s)}))}},function(t,i,e){"use strict";e.r(i);var s,n,r=e(6),h=e(2),o=e(3),a=e(1),c=e(0),l={hlsEventGeneric:!0,hlsHandlerDestroying:!0,hlsHandlerDestroyed:!0},u=function(){function t(t){this.hls=void 0,this.handledEvents=void 0,this.useGenericHandler=void 0,this.hls=t,this.onEvent=this.onEvent.bind(this);for(var i=arguments.length,e=new Array(i>1?i-1:0),s=1;s<i;s++)e[s-1]=arguments[s];this.handledEvents=e,this.useGenericHandler=!0,this.registerListeners()}var i=t.prototype;return i.destroy=function(){this.onHandlerDestroying(),this.unregisterListeners(),this.onHandlerDestroyed()},i.onHandlerDestroying=function(){},i.onHandlerDestroyed=function(){},i.isEventHandler=function(){return"object"==typeof this.handledEvents&&this.handledEvents.length&&"function"==typeof this.onEvent},i.registerListeners=function(){this.isEventHandler()&&this.handledEvents.forEach((function(t){if(l[t])throw new Error("Forbidden event-name: "+t);this.hls.on(t,this.onEvent)}),this)},i.unregisterListeners=function(){this.isEventHandler()&&this.handledEvents.forEach((function(t){this.hls.off(t,this.onEvent)}),this)},i.onEvent=function(t,i){this.onEventGeneric(t,i)},i.onEventGeneric=function(t,i){try{(function(t,i){var e="on"+t.replace("hls","");if("function"!=typeof this[e])throw new Error("Event "+t+" has no generic handler in this "+this.constructor.name+" class (tried "+e+")");return this[e].bind(this,i)}).call(this,t,i).call()}catch(i){c.b.error("An internal error happened while handling event "+t+'. Error message: "'+i.message+'". Here is a stacktrace:',i),this.hls.trigger(a.a.ERROR,{type:h.b.OTHER_ERROR,details:h.a.INTERNAL_EXCEPTION,fatal:!1,event:t,err:i})}},t}();!function(t){t.MANIFEST="manifest",t.LEVEL="level",t.AUDIO_TRACK="audioTrack",t.SUBTITLE_TRACK="subtitleTrack"}(s||(s={})),function(t){t.MAIN="main",t.AUDIO="audio",t.SUBTITLE="subtitle"}(n||(n={}));var d=e(10);function p(t,i){for(var e=0;e<i.length;e++){var s=i[e];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}var f,v=function(){function t(t,i){this.Ea=null,this.baseuri=void 0,this.reluri=void 0,this.method=null,this.key=null,this.iv=null,this.baseuri=t,this.reluri=i}var i,e,s;return i=t,(e=[{key:"uri",get:function(){return!this.Ea&&this.reluri&&(this.Ea=Object(r.buildAbsoluteURL)(this.baseuri,this.reluri,{alwaysNormalize:!0})),this.Ea}}])&&p(i.prototype,e),s&&p(i,s),t}();function g(t,i){for(var e=0;e<i.length;e++){var s=i[e];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}!function(t){t.AUDIO="audio",t.VIDEO="video"}(f||(f={}));var m=function(){function t(){var t;this.La=null,this.Oa=null,this.Ra=null,this.Ba=((t={})[f.AUDIO]=!1,t[f.VIDEO]=!1,t),this.deltaPTS=0,this.rawProgramDateTime=null,this.programDateTime=null,this.title=null,this.tagList=[],this.cc=void 0,this.type=void 0,this.relurl=void 0,this.baseurl=void 0,this.duration=void 0,this.start=void 0,this.sn=0,this.urlId=0,this.level=0,this.levelkey=void 0,this.loader=void 0}var i,e,s,n=t.prototype;return n.setByteRange=function(t,i){var e=t.split("@",2),s=[];1===e.length?s[0]=i?i.byteRangeEndOffset:0:s[0]=parseInt(e[1]),s[1]=parseInt(e[0])+s[0],this.Oa=s},n.addElementaryStream=function(t){this.Ba[t]=!0},n.hasElementaryStream=function(t){return!0===this.Ba[t]},n.createInitializationVector=function(t){for(var i=new Uint8Array(16),e=12;e<16;e++)i[e]=t>>8*(15-e)&255;return i},n.setDecryptDataFromLevelKey=function(t,i){var e=t;return t&&t.method&&t.uri&&!t.iv&&((e=new v(t.baseuri,t.reluri)).method=t.method,e.iv=this.createInitializationVector(i)),e},i=t,(e=[{key:"url",get:function(){return!this.La&&this.relurl&&(this.La=Object(r.buildAbsoluteURL)(this.baseurl,this.relurl,{alwaysNormalize:!0})),this.La},set:function(t){this.La=t}},{key:"byteRange",get:function(){return this.Oa?this.Oa:[]}},{key:"byteRangeStartOffset",get:function(){return this.byteRange[0]}},{key:"byteRangeEndOffset",get:function(){return this.byteRange[1]}},{key:"decryptdata",get:function(){if(!this.levelkey&&!this.Ra)return null;if(!this.Ra&&this.levelkey){var t=this.sn;"number"!=typeof t&&(this.levelkey&&"AES-128"===this.levelkey.method&&!this.levelkey.iv&&c.b.warn('missing IV for initialization segment with method="'+this.levelkey.method+'" - compliance issue'),t=0),this.Ra=this.setDecryptDataFromLevelKey(this.levelkey,t)}return this.Ra}},{key:"endProgramDateTime",get:function(){if(null===this.programDateTime)return null;if(!Object(o.a)(this.programDateTime))return null;var t=Object(o.a)(this.duration)?this.duration:0;return this.programDateTime+1e3*t}},{key:"encrypted",get:function(){return!(!this.decryptdata||null===this.decryptdata.uri||null!==this.decryptdata.key)}}])&&g(i.prototype,e),s&&g(i,s),t}();function y(t,i){for(var e=0;e<i.length;e++){var s=i[e];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}var b=function(){function t(t){this.endCC=0,this.endSN=0,this.fragments=[],this.initSegment=null,this.live=!0,this.needSidxRanges=!1,this.startCC=0,this.startSN=0,this.startTimeOffset=null,this.targetduration=0,this.totalduration=0,this.type=null,this.url=t,this.version=null}var i,e,s;return i=t,(e=[{key:"hasProgramDateTime",get:function(){return!(!this.fragments[0]||!Object(o.a)(this.fragments[0].programDateTime))}}])&&y(i.prototype,e),s&&y(i,s),t}(),w=/^(\d+)x(\d+)$/,x=/\s*(.+?)\s*=((?:\".*?\")|.*?)(?:,|$)/g,S=function(){function t(i){for(var e in"string"==typeof i&&(i=t.parseAttrList(i)),i)i.hasOwnProperty(e)&&(this[e]=i[e])}var i=t.prototype;return i.decimalInteger=function(t){var i=parseInt(this[t],10);return i>Number.MAX_SAFE_INTEGER?1/0:i},i.hexadecimalInteger=function(t){if(this[t]){var i=(this[t]||"0x").slice(2);i=(1&i.length?"0":"")+i;for(var e=new Uint8Array(i.length/2),s=0;s<i.length/2;s++)e[s]=parseInt(i.slice(2*s,2*s+2),16);return e}return null},i.hexadecimalIntegerAsNumber=function(t){var i=parseInt(this[t],16);return i>Number.MAX_SAFE_INTEGER?1/0:i},i.decimalFloatingPoint=function(t){return parseFloat(this[t])},i.enumeratedString=function(t){return this[t]},i.decimalResolution=function(t){var i=w.exec(this[t]);if(null!==i)return{width:parseInt(i[1],10),height:parseInt(i[2],10)}},t.parseAttrList=function(t){var i,e={};for(x.lastIndex=0;null!==(i=x.exec(t));){var s=i[2];0===s.indexOf('"')&&s.lastIndexOf('"')===s.length-1&&(s=s.slice(1,-1)),e[i[1]]=s}return e},t}(),_={audio:{a3ds:!0,"ac-3":!0,"ac-4":!0,alac:!0,alaw:!0,dra1:!0,"dts+":!0,"dts-":!0,dtsc:!0,dtse:!0,dtsh:!0,"ec-3":!0,enca:!0,g719:!0,g726:!0,m4ae:!0,mha1:!0,mha2:!0,mhm1:!0,mhm2:!0,mlpa:!0,mp4a:!0,"raw ":!0,Opus:!0,samr:!0,sawb:!0,sawp:!0,sevc:!0,sqcp:!0,ssmv:!0,twos:!0,ulaw:!0},video:{avc1:!0,avc2:!0,avc3:!0,avc4:!0,avcp:!0,drac:!0,dvav:!0,dvhe:!0,encv:!0,hev1:!0,hvc1:!0,mjp2:!0,mp4v:!0,mvc1:!0,mvc2:!0,mvc3:!0,mvc4:!0,resv:!0,rv60:!0,s263:!0,svc1:!0,svc2:!0,"vc-1":!0,vp08:!0,vp09:!0}};function A(t,i){return MediaSource.isTypeSupported((i||"video")+'/mp4;codecs="'+t+'"')}var P=/#EXT-X-STREAM-INF:([^\n\r]*)[\r\n]+([^\r\n]+)/g,k=/#EXT-X-MEDIA:(.*)/g,I=new RegExp([/#EXTINF:\s*(\d*(?:\.\d+)?)(?:,(.*)\s+)?/.source,/|(?!#)([\S+ ?]+)/.source,/|#EXT-X-BYTERANGE:*(.+)/.source,/|#EXT-X-PROGRAM-DATE-TIME:(.+)/.source,/|#.*/.source].join(""),"g"),T=/(?:(?:#(EXTM3U))|(?:#EXT-X-(PLAYLIST-TYPE):(.+))|(?:#EXT-X-(MEDIA-SEQUENCE): *(\d+))|(?:#EXT-X-(TARGETDURATION): *(\d+))|(?:#EXT-X-(KEY):(.+))|(?:#EXT-X-(START):(.+))|(?:#EXT-X-(ENDLIST))|(?:#EXT-X-(DISCONTINUITY-SEQ)UENCE:(\d+))|(?:#EXT-X-(DIS)CONTINUITY))|(?:#EXT-X-(VERSION):(\d+))|(?:#EXT-X-(MAP):(.+))|(?:(#)([^:]*):(.*))|(?:(#)(.*))(?:.*)\r?\n?/,C=/\.(mp4|m4s|m4v|m4a)$/i,M=function(){function t(){}return t.findGroup=function(t,i){for(var e=0;e<t.length;e++){var s=t[e];if(s.id===i)return s}},t.convertAVC1ToAVCOTI=function(t){var i,e=t.split(".");return e.length>2?(i=e.shift()+".",i+=parseInt(e.shift()).toString(16),i+=("000"+parseInt(e.shift()).toString(16)).substr(-4)):i=t,i},t.resolve=function(t,i){return t=L(i,t),r.buildAbsoluteURL(i,t,{alwaysNormalize:!0})},t.parseMasterPlaylist=function(i,e){var s,n=[];function r(t,i){["video","audio"].forEach((function(e){var s=t.filter((function(t){return function(t,i){var e=_[i];return!!e&&!0===e[t.slice(0,4)]}(t,e)}));if(s.length){var n=s.filter((function(t){return 0===t.lastIndexOf("avc1",0)||0===t.lastIndexOf("mp4a",0)}));i[e+"Codec"]=n.length>0?n[0]:s[0],t=t.filter((function(t){return-1===s.indexOf(t)}))}})),i.unknownCodecs=t}for(P.lastIndex=0;null!=(s=P.exec(i));){var h={},o=h.attrs=new S(s[1]);h.url=t.resolve(s[2],e);var a=o.decimalResolution("RESOLUTION");a&&(h.width=a.width,h.height=a.height),h.bitrate=o.decimalInteger("AVERAGE-BANDWIDTH")||o.decimalInteger("BANDWIDTH"),h.name=o.NAME,r([].concat((o.CODECS||"").split(/[ ,]+/)),h),h.videoCodec&&-1!==h.videoCodec.indexOf("avc1")&&(h.videoCodec=t.convertAVC1ToAVCOTI(h.videoCodec)),n.push(h)}return n},t.parseMasterPlaylistMedia=function(i,e,s,n){var r;void 0===n&&(n=[]);var h=[],o=0;for(k.lastIndex=0;null!==(r=k.exec(i));){var a=new S(r[1]);if(a.TYPE===s){var c={id:o++,groupId:a["GROUP-ID"],name:a.NAME||a.LANGUAGE,type:s,default:"YES"===a.DEFAULT,autoselect:"YES"===a.AUTOSELECT,forced:"YES"===a.FORCED,lang:a.LANGUAGE};if(a.URI&&(c.url=t.resolve(a.URI,e)),n.length){var l=t.findGroup(n,c.groupId);c.audioCodec=l?l.codec:n[0].codec}h.push(c)}}return h},t.parseLevelPlaylist=function(t,i,e,s,n){var r,h,a,l=0,u=0,d=new b(i),p=0,f=null,g=new m,y=null;for(I.lastIndex=0;null!==(r=I.exec(t));){var w=r[1];if(w){g.duration=parseFloat(w);var x=(" "+r[2]).slice(1);g.title=x||null,g.tagList.push(x?["INF",w,x]:["INF",w])}else if(r[3]){if(Object(o.a)(g.duration)){var _=l++;g.type=s,g.start=u,a&&(g.levelkey=a),g.sn=_,g.level=e,g.cc=p,g.urlId=n,g.baseurl=i,g.relurl=(" "+r[3]).slice(1),g.relurl=L(g.baseurl,g.relurl),E(g,f),d.fragments.push(g),f=g,u+=g.duration,g=new m}}else if(r[4]){var A=(" "+r[4]).slice(1);f?g.setByteRange(A,f):g.setByteRange(A)}else if(r[5])g.rawProgramDateTime=(" "+r[5]).slice(1),g.tagList.push(["PROGRAM-DATE-TIME",g.rawProgramDateTime]),null===y&&(y=d.fragments.length);else{if(!(r=r[0].match(T))){c.b.warn("No matches on slow regex match for level playlist!");continue}for(h=1;h<r.length&&void 0===r[h];h++);var P=(" "+r[h+1]).slice(1),k=(" "+r[h+2]).slice(1);switch(r[h]){case"#":g.tagList.push(k?[P,k]:[P]);break;case"PLAYLIST-TYPE":d.type=P.toUpperCase();break;case"MEDIA-SEQUENCE":l=d.startSN=parseInt(P);break;case"TARGETDURATION":d.targetduration=parseFloat(P);break;case"VERSION":d.version=parseInt(P);break;case"EXTM3U":break;case"ENDLIST":d.live=!1;break;case"DIS":p++,g.tagList.push(["DIS"]);break;case"DISCONTINUITY-SEQ":p=parseInt(P);break;case"KEY":var M=new S(P),O=M.enumeratedString("METHOD"),R=M.URI,B=M.hexadecimalInteger("IV");O&&(a=new v(i,R),R&&["AES-128","SAMPLE-AES","SAMPLE-AES-CENC"].indexOf(O)>=0&&(a.method=O,a.key=null,a.iv=B));break;case"START":var D=new S(P).decimalFloatingPoint("TIME-OFFSET");Object(o.a)(D)&&(d.startTimeOffset=D);break;case"MAP":var j=new S(P);g.relurl=j.URI,j.BYTERANGE&&g.setByteRange(j.BYTERANGE),g.baseurl=i,g.level=e,g.type=s,g.sn="initSegment",g.relurl=L(g.baseurl,g.relurl),d.initSegment=g,(g=new m).rawProgramDateTime=d.initSegment.rawProgramDateTime;break;default:c.b.warn("line parsed but not handled: "+r)}}}return(g=f)&&!g.relurl&&(d.fragments.pop(),u-=g.duration),d.totalduration=u,d.averagetargetduration=u/d.fragments.length,d.endSN=l-1,d.startCC=d.fragments[0]?d.fragments[0].cc:0,d.endCC=p,!d.initSegment&&d.fragments.length&&d.fragments.every((function(t){return C.test(t.relurl)}))&&(c.b.warn("MP4 fragments found but no init segment (probably no MAP, incomplete M3U8), trying to fetch SIDX"),(g=new m).relurl=d.fragments[0].relurl,g.baseurl=i,g.level=e,g.type=s,g.sn="initSegment",g.relurl=L(g.baseurl,g.relurl),d.initSegment=g,d.needSidxRanges=!0),y&&function(t,i){for(var e=t[i],s=i-1;s>=0;s--){var n=t[s];n.programDateTime=e.programDateTime-1e3*n.duration,e=n}}(d.fragments,y),d},t}();function E(t,i){t.rawProgramDateTime?t.programDateTime=Date.parse(t.rawProgramDateTime):i&&i.programDateTime&&(t.programDateTime=i.endProgramDateTime),Object(o.a)(t.programDateTime)||(t.programDateTime=null,t.rawProgramDateTime=null)}function L(t,i){var e=r.parseURL(t);return e&&e.query&&(i+=e.query),i}var O=window.performance,R=function(t){var i,e;function r(i){var e;return(e=t.call(this,i,a.a.MANIFEST_LOADING,a.a.LEVEL_LOADING,a.a.AUDIO_TRACK_LOADING,a.a.SUBTITLE_TRACK_LOADING)||this).loaders={},e}e=t,(i=r).prototype=Object.create(e.prototype),i.prototype.constructor=i,i.__proto__=e,r.canHaveQualityLevels=function(t){return t!==s.AUDIO_TRACK&&t!==s.SUBTITLE_TRACK},r.mapContextToLevelType=function(t){switch(t.type){case s.AUDIO_TRACK:return n.AUDIO;case s.SUBTITLE_TRACK:return n.SUBTITLE;default:return n.MAIN}},r.getResponseUrl=function(t,i){var e=t.url;return void 0!==e&&0!==e.indexOf("data:")||(e=i.url),e};var l=r.prototype;return l.createInternalLoader=function(t){var i=this.hls.config,e=i.pLoader,s=i.loader,n=new(e||s)(i);return t.loader=n,this.loaders[t.type]=n,n},l.getInternalLoader=function(t){return this.loaders[t.type]},l.resetInternalLoader=function(t){this.loaders[t]&&delete this.loaders[t]},l.destroyInternalLoaders=function(){for(var t in this.loaders){var i=this.loaders[t];i&&i.destroy(),this.resetInternalLoader(t)}},l.destroy=function(){this.destroyInternalLoaders(),t.prototype.destroy.call(this)},l.onManifestLoading=function(t){this.load({url:t.url,type:s.MANIFEST,level:0,id:null,responseType:"text"})},l.onLevelLoading=function(t){this.load({url:t.url,type:s.LEVEL,level:t.level,id:t.id,responseType:"text"})},l.onAudioTrackLoading=function(t){this.load({url:t.url,type:s.AUDIO_TRACK,level:null,id:t.id,responseType:"text"})},l.onSubtitleTrackLoading=function(t){this.load({url:t.url,type:s.SUBTITLE_TRACK,level:null,id:t.id,responseType:"text"})},l.load=function(t){var i=this.hls.config;c.b.debug("Loading playlist of type "+t.type+", level: "+t.level+", id: "+t.id);var e,n,r,h,o=this.getInternalLoader(t);if(o){var a=o.context;if(a&&a.url===t.url)return c.b.trace("playlist request ongoing"),!1;c.b.warn("aborting previous loader for type: "+t.type),o.abort()}switch(t.type){case s.MANIFEST:e=i.manifestLoadingMaxRetry,n=i.manifestLoadingTimeOut,r=i.manifestLoadingRetryDelay,h=i.manifestLoadingMaxRetryTimeout;break;case s.LEVEL:e=0,h=0,r=0,n=i.levelLoadingTimeOut;break;default:e=i.levelLoadingMaxRetry,n=i.levelLoadingTimeOut,r=i.levelLoadingRetryDelay,h=i.levelLoadingMaxRetryTimeout}o=this.createInternalLoader(t);var l={timeout:n,maxRetry:e,retryDelay:r,maxRetryDelay:h},u={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};return c.b.debug("Calling internal loader delegate for URL: "+t.url),o.load(t,l,u),!0},l.loadsuccess=function(t,i,e,s){if(void 0===s&&(s=null),e.isSidxRequest)return this.Da(t,e),void this.ja(t,i,e,s);if(this.resetInternalLoader(e.type),"string"!=typeof t.data)throw new Error('expected responseType of "text" for PlaylistLoader');var n=t.data;i.tload=O.now(),0===n.indexOf("#EXTM3U")?n.indexOf("#EXTINF:")>0||n.indexOf("#EXT-X-TARGETDURATION:")>0?this.Fa(t,i,e,s):this.$a(t,i,e,s):this.Va(t,e,"no EXTM3U delimiter",s)},l.loaderror=function(t,i,e){void 0===e&&(e=null),this.Ua(i,e,!1,t)},l.loadtimeout=function(t,i,e){void 0===e&&(e=null),this.Ua(i,e,!0)},l.$a=function(t,i,e,s){var n=this.hls,h=t.data,o=r.getResponseUrl(t,e),l=M.parseMasterPlaylist(h,o);if(l.length){var u=l.map((function(t){return{id:t.attrs.AUDIO,codec:t.audioCodec}})),d=M.parseMasterPlaylistMedia(h,o,"AUDIO",u),p=M.parseMasterPlaylistMedia(h,o,"SUBTITLES");if(d.length){var f=!1;d.forEach((function(t){t.url||(f=!0)})),!1===f&&l[0].audioCodec&&!l[0].attrs.AUDIO&&(c.b.log("audio codec signaled in quality level, but no embedded audio track signaled, create one"),d.unshift({type:"main",name:"main",default:!1,autoselect:!1,forced:!1,id:-1}))}n.trigger(a.a.MANIFEST_LOADED,{levels:l,audioTracks:d,subtitles:p,url:o,stats:i,networkDetails:s})}else this.Va(t,e,"no level found in manifest",s)},l.Fa=function(t,i,e,n){var h=this.hls,c=e.id,l=e.level,u=e.type,d=r.getResponseUrl(t,e),p=Object(o.a)(c)?c:0,f=Object(o.a)(l)?l:p,v=r.mapContextToLevelType(e),g=M.parseLevelPlaylist(t.data,d,f,v,p);if(g.tload=i.tload,u===s.MANIFEST){var m={url:d,details:g};h.trigger(a.a.MANIFEST_LOADED,{levels:[m],audioTracks:[],url:d,stats:i,networkDetails:n})}if(i.tparsed=O.now(),g.needSidxRanges){var y=g.initSegment.url;this.load({url:y,isSidxRequest:!0,type:u,level:l,levelDetails:g,id:c,rangeStart:0,rangeEnd:2048,responseType:"arraybuffer"})}else e.levelDetails=g,this.ja(t,i,e,n)},l.Da=function(t,i){if("string"==typeof t.data)throw new Error("sidx request must be made with responseType of array buffer");var e=d.a.parseSegmentIndex(new Uint8Array(t.data));if(e){var s=e.references,n=i.levelDetails;s.forEach((function(t,i){var e=t.info;if(n){var s=n.fragments[i];0===s.byteRange.length&&s.setByteRange(String(1+e.end-e.start)+"@"+String(e.start))}})),n&&n.initSegment.setByteRange(String(e.moovEndOffset)+"@0")}},l.Va=function(t,i,e,s){this.hls.trigger(a.a.ERROR,{type:h.b.NETWORK_ERROR,details:h.a.MANIFEST_PARSING_ERROR,fatal:!0,url:t.url,reason:e,networkDetails:s})},l.Ua=function(t,i,e,n){var r,o;void 0===e&&(e=!1),void 0===n&&(n=null),c.b.info("A network error occured while loading a "+t.type+"-type playlist");var l=this.getInternalLoader(t);switch(t.type){case s.MANIFEST:r=e?h.a.MANIFEST_LOAD_TIMEOUT:h.a.MANIFEST_LOAD_ERROR,o=!0;break;case s.LEVEL:r=e?h.a.LEVEL_LOAD_TIMEOUT:h.a.LEVEL_LOAD_ERROR,o=!1;break;case s.AUDIO_TRACK:r=e?h.a.AUDIO_TRACK_LOAD_TIMEOUT:h.a.AUDIO_TRACK_LOAD_ERROR,o=!1;break;default:o=!1}l&&(l.abort(),this.resetInternalLoader(t.type));var u={type:h.b.NETWORK_ERROR,details:r,fatal:o,url:t.url,loader:l,context:t,networkDetails:i};n&&(u.response=n),this.hls.trigger(a.a.ERROR,u)},l.ja=function(t,i,e,n){var h=e.type,o=e.level,c=e.id,l=e.levelDetails;if(l&&l.targetduration)if(r.canHaveQualityLevels(e.type))this.hls.trigger(a.a.LEVEL_LOADED,{details:l,level:o||0,id:c||0,stats:i,networkDetails:n});else switch(h){case s.AUDIO_TRACK:this.hls.trigger(a.a.AUDIO_TRACK_LOADED,{details:l,id:c,stats:i,networkDetails:n});break;case s.SUBTITLE_TRACK:this.hls.trigger(a.a.SUBTITLE_TRACK_LOADED,{details:l,id:c,stats:i,networkDetails:n})}else this.Va(t,e,"invalid target duration",n)},r}(u),B=function(t){var i,e;function s(i){var e;return(e=t.call(this,i,a.a.FRAG_LOADING)||this).loaders={},e}e=t,(i=s).prototype=Object.create(e.prototype),i.prototype.constructor=i,i.__proto__=e;var n=s.prototype;return n.destroy=function(){var i=this.loaders;for(var e in i){var s=i[e];s&&s.destroy()}this.loaders={},t.prototype.destroy.call(this)},n.onFragLoading=function(t){var i=t.frag,e=i.type,s=this.loaders,n=this.hls.config,r=n.fLoader,h=n.loader;i.loaded=0;var a,l,u,d=s[e];d&&(c.b.warn("abort previous fragment loader for type: "+e),d.abort()),d=s[e]=i.loader=n.fLoader?new r(n):new h(n),a={url:i.url,frag:i,responseType:"arraybuffer",progressData:!1};var p=i.byteRangeStartOffset,f=i.byteRangeEndOffset;Object(o.a)(p)&&Object(o.a)(f)&&(a.rangeStart=p,a.rangeEnd=f),l={timeout:n.fragLoadingTimeOut,maxRetry:0,retryDelay:0,maxRetryDelay:n.fragLoadingMaxRetryTimeout},u={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this),onProgress:this.loadprogress.bind(this)},d.load(a,l,u)},n.loadsuccess=function(t,i,e,s){void 0===s&&(s=null);var n=t.data,r=e.frag;r.loader=void 0,this.loaders[r.type]=void 0,this.hls.trigger(a.a.FRAG_LOADED,{payload:n,frag:r,stats:i,networkDetails:s})},n.loaderror=function(t,i,e){void 0===e&&(e=null);var s=i.frag,n=s.loader;n&&n.abort(),this.loaders[s.type]=void 0,this.hls.trigger(a.a.ERROR,{type:h.b.NETWORK_ERROR,details:h.a.FRAG_LOAD_ERROR,fatal:!1,frag:i.frag,response:t,networkDetails:e})},n.loadtimeout=function(t,i,e){void 0===e&&(e=null);var s=i.frag,n=s.loader;n&&n.abort(),this.loaders[s.type]=void 0,this.hls.trigger(a.a.ERROR,{type:h.b.NETWORK_ERROR,details:h.a.FRAG_LOAD_TIMEOUT,fatal:!1,frag:i.frag,networkDetails:e})},n.loadprogress=function(t,i,e,s){void 0===s&&(s=null);var n=i.frag;n.loaded=t.loaded,this.hls.trigger(a.a.FRAG_LOAD_PROGRESS,{frag:n,stats:t,networkDetails:s})},s}(u),D=function(t){var i,e;function s(i){var e;return(e=t.call(this,i,a.a.KEY_LOADING)||this).loaders={},e.decryptkey=null,e.decrypturl=null,e}e=t,(i=s).prototype=Object.create(e.prototype),i.prototype.constructor=i,i.__proto__=e;var n=s.prototype;return n.destroy=function(){for(var i in this.loaders){var e=this.loaders[i];e&&e.destroy()}this.loaders={},t.prototype.destroy.call(this)},n.onKeyLoading=function(t){var i=t.frag,e=i.type,s=this.loaders[e];if(i.decryptdata){var n=i.decryptdata.uri;if(n!==this.decrypturl||null===this.decryptkey){var r=this.hls.config;if(s&&(c.b.warn("abort previous key loader for type:"+e),s.abort()),!n)return void c.b.warn("key uri is falsy");i.loader=this.loaders[e]=new r.loader(r),this.decrypturl=n,this.decryptkey=null;var h={url:n,frag:i,responseType:"arraybuffer"},o={timeout:r.fragLoadingTimeOut,maxRetry:0,retryDelay:r.fragLoadingRetryDelay,maxRetryDelay:r.fragLoadingMaxRetryTimeout},l={onSuccess:this.loadsuccess.bind(this),onError:this.loaderror.bind(this),onTimeout:this.loadtimeout.bind(this)};i.loader.load(h,o,l)}else this.decryptkey&&(i.decryptdata.key=this.decryptkey,this.hls.trigger(a.a.KEY_LOADED,{frag:i}))}else c.b.warn("Missing decryption data on fragment in onKeyLoading")},n.loadsuccess=function(t,i,e){var s=e.frag;s.decryptdata?(this.decryptkey=s.decryptdata.key=new Uint8Array(t.data),s.loader=void 0,delete this.loaders[s.type],this.hls.trigger(a.a.KEY_LOADED,{frag:s})):c.b.error("after key load, decryptdata unset")},n.loaderror=function(t,i){var e=i.frag,s=e.loader;s&&s.abort(),delete this.loaders[e.type],this.hls.trigger(a.a.ERROR,{type:h.b.NETWORK_ERROR,details:h.a.KEY_LOAD_ERROR,fatal:!1,frag:e,response:t})},n.loadtimeout=function(t,i){var e=i.frag,s=e.loader;s&&s.abort(),delete this.loaders[e.type],this.hls.trigger(a.a.ERROR,{type:h.b.NETWORK_ERROR,details:h.a.KEY_LOAD_TIMEOUT,fatal:!1,frag:e})},s}(u),j="NOT_LOADED",F="APPENDING",$="PARTIAL",V="OK",U=function(t){var i,e;function s(i){var e;return(e=t.call(this,i,a.a.BUFFER_APPENDED,a.a.FRAG_BUFFERED,a.a.FRAG_LOADED)||this).bufferPadding=.2,e.fragments=Object.create(null),e.timeRanges=Object.create(null),e.config=i.config,e}e=t,(i=s).prototype=Object.create(e.prototype),i.prototype.constructor=i,i.__proto__=e;var n=s.prototype;return n.destroy=function(){this.fragments=Object.create(null),this.timeRanges=Object.create(null),this.config=null,u.prototype.destroy.call(this),t.prototype.destroy.call(this)},n.getBufferedFrag=function(t,i){var e=this.fragments,s=Object.keys(e).filter((function(s){var n=e[s];if(n.body.type!==i)return!1;if(!n.buffered)return!1;var r=n.body;return r.startPTS<=t&&t<=r.endPTS}));if(0===s.length)return null;var n=s.pop();return e[n].body},n.detectEvictedFragments=function(t,i){var e,s,n=this;Object.keys(this.fragments).forEach((function(r){var h=n.fragments[r];if(!0===h.buffered){var o=h.range[t];if(o){e=o.time;for(var a=0;a<e.length;a++)if(s=e[a],!1===n.isTimeBuffered(s.startPTS,s.endPTS,i)){n.removeFragment(h.body);break}}}}))},n.detectPartialFragments=function(t){var i=this,e=this.getFragmentKey(t),s=this.fragments[e];s&&(s.buffered=!0,Object.keys(this.timeRanges).forEach((function(e){if(t.hasElementaryStream(e)){var n=i.timeRanges[e];s.range[e]=i.getBufferedTimes(t.startPTS,t.endPTS,n)}})))},n.getBufferedTimes=function(t,i,e){for(var s,n,r=[],h=!1,o=0;o<e.length;o++){if(s=e.start(o)-this.bufferPadding,n=e.end(o)+this.bufferPadding,t>=s&&i<=n){r.push({startPTS:Math.max(t,e.start(o)),endPTS:Math.min(i,e.end(o))});break}if(t<n&&i>s)r.push({startPTS:Math.max(t,e.start(o)),endPTS:Math.min(i,e.end(o))}),h=!0;else if(i<=s)break}return{time:r,partial:h}},n.getFragmentKey=function(t){return t.type+"_"+t.level+"_"+t.urlId+"_"+t.sn},n.getPartialFragment=function(t){var i,e,s,n=this,r=null,h=0;return Object.keys(this.fragments).forEach((function(o){var a=n.fragments[o];n.isPartial(a)&&(e=a.body.startPTS-n.bufferPadding,s=a.body.endPTS+n.bufferPadding,t>=e&&t<=s&&(i=Math.min(t-e,s-t),h<=i&&(r=a.body,h=i)))})),r},n.getState=function(t){var i=this.getFragmentKey(t),e=this.fragments[i],s=j;return void 0!==e&&(s=e.buffered?!0===this.isPartial(e)?$:V:F),s},n.isPartial=function(t){return!0===t.buffered&&(void 0!==t.range.video&&!0===t.range.video.partial||void 0!==t.range.audio&&!0===t.range.audio.partial)},n.isTimeBuffered=function(t,i,e){for(var s,n,r=0;r<e.length;r++){if(s=e.start(r)-this.bufferPadding,n=e.end(r)+this.bufferPadding,t>=s&&i<=n)return!0;if(i<=s)return!1}return!1},n.onFragLoaded=function(t){var i=t.frag;Object(o.a)(i.sn)&&!i.bitrateTest&&(this.fragments[this.getFragmentKey(i)]={body:i,range:Object.create(null),buffered:!1})},n.onBufferAppended=function(t){var i=this;this.timeRanges=t.timeRanges,Object.keys(this.timeRanges).forEach((function(t){var e=i.timeRanges[t];i.detectEvictedFragments(t,e)}))},n.onFragBuffered=function(t){this.detectPartialFragments(t.frag)},n.hasFragment=function(t){var i=this.getFragmentKey(t);return void 0!==this.fragments[i]},n.removeFragment=function(t){var i=this.getFragmentKey(t);delete this.fragments[i]},n.removeAllFragments=function(){this.fragments=Object.create(null)},s}(u),N={search:function(t,i){for(var e=0,s=t.length-1,n=null,r=null;e<=s;){var h=i(r=t[n=(e+s)/2|0]);if(h>0)e=n+1;else{if(!(h<0))return r;s=n-1}}return null}},H=function(){function t(){}return t.isBuffered=function(t,i){try{if(t)for(var e=t.buffered,s=0;s<e.length;s++)if(i>=e.start(s)&&i<=e.end(s))return!0}catch(t){}return!1},t.bufferInfo=function(t,i,e){try{if(t){var s,n=t.buffered,r=[];for(s=0;s<n.length;s++)r.push({start:n.start(s),end:n.end(s)});return this.bufferedInfo(r,i,e)}}catch(t){}return{len:0,start:i,end:i,nextStart:void 0}},t.bufferedInfo=function(t,i,e){t.sort((function(t,i){return t.start-i.start||i.end-t.end}));var s=[];if(e)for(var n=0;n<t.length;n++){var r=s.length;if(r){var h=s[r-1].end;t[n].start-h<e?t[n].end>h&&(s[r-1].end=t[n].end):s.push(t[n])}else s.push(t[n])}else s=t;for(var o,a=0,c=i,l=i,u=0;u<s.length;u++){var d=s[u].start,p=s[u].end;if(i+e>=d&&i<p)c=d,a=(l=p)-i;else if(i+e<d){o=d;break}}return{len:a,start:c,end:l,nextStart:o}},t}(),z=e(8),q=e(11),W=e(9);function G(){return window.MediaSource||window.WebKitMediaSource}var J=e(5),Q=function(t){var i,e;function s(){return t.apply(this,arguments)||this}return e=t,(i=s).prototype=Object.create(e.prototype),i.prototype.constructor=i,i.__proto__=e,s.prototype.trigger=function(t){for(var i=arguments.length,e=new Array(i>1?i-1:0),s=1;s<i;s++)e[s-1]=arguments[s];this.emit.apply(this,[t,t].concat(e))},s}(z.EventEmitter),X=G()||{isTypeSupported:function(){return!1}},Y=function(){function t(t,i){var e=this;this.hls=t,this.id=i;var s=this.observer=new Q,n=t.config,r=function(i,s){(s=s||{}).frag=e.frag,s.id=e.id,t.trigger(i,s)};s.on(a.a.FRAG_DECRYPTED,r),s.on(a.a.FRAG_PARSING_INIT_SEGMENT,r),s.on(a.a.FRAG_PARSING_DATA,r),s.on(a.a.FRAG_PARSED,r),s.on(a.a.ERROR,r),s.on(a.a.FRAG_PARSING_METADATA,r),s.on(a.a.FRAG_PARSING_USERDATA,r),s.on(a.a.INIT_PTS_FOUND,r);var o={mp4:X.isTypeSupported("video/mp4"),mpeg:X.isTypeSupported("audio/mpeg"),mp3:X.isTypeSupported('audio/mp4; codecs="mp3"')},l=navigator.vendor;if(n.enableWorker&&"undefined"!=typeof Worker){var u;c.b.log("demuxing in webworker");try{u=this.w=q(12),this.onwmsg=this.onWorkerMessage.bind(this),u.addEventListener("message",this.onwmsg),u.onerror=function(i){t.trigger(a.a.ERROR,{type:h.b.OTHER_ERROR,details:h.a.INTERNAL_EXCEPTION,fatal:!0,event:"demuxerWorker",err:{message:i.message+" ("+i.filename+":"+i.lineno+")"}})},u.postMessage({cmd:"init",typeSupported:o,vendor:l,id:i,config:JSON.stringify(n)})}catch(t){c.b.warn("Error in worker:",t),c.b.error("Error while initializing DemuxerWorker, fallback on DemuxerInline"),u&&Object(J.a)().URL.revokeObjectURL(u.objectURL),this.demuxer=new W.a(s,o,n,l),this.w=void 0}}else this.demuxer=new W.a(s,o,n,l)}var i=t.prototype;return i.destroy=function(){var t=this.w;if(t)t.removeEventListener("message",this.onwmsg),t.terminate(),this.w=null;else{var i=this.demuxer;i&&(i.destroy(),this.demuxer=null)}var e=this.observer;e&&(e.removeAllListeners(),this.observer=null)},i.push=function(t,i,e,s,n,r,h,a){var l=this.w,u=Object(o.a)(n.startPTS)?n.startPTS:n.start,d=n.decryptdata,p=this.frag,f=!(p&&n.cc===p.cc),v=!(p&&n.level===p.level),g=p&&n.sn===p.sn+1,m=!v&&g;if(f&&c.b.log(this.id+":discontinuity detected"),v&&c.b.log(this.id+":switch detected"),this.frag=n,l)l.postMessage({cmd:"demux",data:t,decryptdata:d,initSegment:i,audioCodec:e,videoCodec:s,timeOffset:u,discontinuity:f,trackSwitch:v,contiguous:m,duration:r,accurateTimeOffset:h,defaultInitPTS:a},t instanceof ArrayBuffer?[t]:[]);else{var y=this.demuxer;y&&y.push(t,d,i,e,s,u,f,v,m,r,h,a)}},i.onWorkerMessage=function(t){var i=t.data,e=this.hls;switch(i.event){case"init":Object(J.a)().URL.revokeObjectURL(this.w.objectURL);break;case a.a.FRAG_PARSING_DATA:i.data.data1=new Uint8Array(i.data1),i.data2&&(i.data.data2=new Uint8Array(i.data2));default:i.data=i.data||{},i.data.frag=this.frag,i.data.id=this.id,e.trigger(i.event,i.data)}},t}();function K(t,i,e){switch(i){case"audio":t.audioGroupIds||(t.audioGroupIds=[]),t.audioGroupIds.push(e);break;case"text":t.textGroupIds||(t.textGroupIds=[]),t.textGroupIds.push(e)}}function Z(t,i,e){var s=t[i],n=t[e],r=n.startPTS;Object(o.a)(r)?e>i?(s.duration=r-s.start,s.duration<0&&c.b.warn("negative duration computed for frag "+s.sn+",level "+s.level+", there should be some duration drift between playlist and fragment!")):(n.duration=s.start-r,n.duration<0&&c.b.warn("negative duration computed for frag "+n.sn+",level "+n.level+", there should be some duration drift between playlist and fragment!")):n.start=e>i?s.start+s.duration:Math.max(s.start-n.duration,0)}function tt(t,i,e,s,n,r){var h=e;if(Object(o.a)(i.startPTS)){var a=Math.abs(i.startPTS-e);Object(o.a)(i.deltaPTS)?i.deltaPTS=Math.max(a,i.deltaPTS):i.deltaPTS=a,h=Math.max(e,i.startPTS),e=Math.min(e,i.startPTS),s=Math.max(s,i.endPTS),n=Math.min(n,i.startDTS),r=Math.max(r,i.endDTS)}var c=e-i.start;i.start=i.startPTS=e,i.maxStartPTS=h,i.endPTS=s,i.startDTS=n,i.endDTS=r,i.duration=s-e;var l,u,d,p=i.sn;if(!t||p<t.startSN||p>t.endSN)return 0;for(l=p-t.startSN,(u=t.fragments)[l]=i,d=l;d>0;d--)Z(u,d,d-1);for(d=l;d<u.length-1;d++)Z(u,d,d+1);return t.PTSKnown=!0,c}function it(t,i,e){if(t&&i)for(var s=Math.max(t.startSN,i.startSN)-i.startSN,n=Math.min(t.endSN,i.endSN)-i.startSN,r=i.startSN-t.startSN,h=s;h<=n;h++){var o=t.fragments[r+h],a=i.fragments[h];if(!o||!a)break;e(o,a,h)}}var et={toString:function(t){for(var i="",e=t.length,s=0;s<e;s++)i+="["+t.start(s).toFixed(3)+","+t.end(s).toFixed(3)+"]";return i}};function st(t,i){i.fragments.forEach((function(i){if(i){var e=i.start+t;i.start=i.startPTS=e,i.endPTS=e+i.duration}})),i.PTSKnown=!0}function nt(t,i,e){!function(t,i,e){if(function(t,i,e){var s=!1;return i&&i.details&&e&&(e.endCC>e.startCC||t&&t.cc<e.startCC)&&(s=!0),s}(t,e,i)){var s=function(t,i){var e=t.fragments,s=i.fragments;if(s.length&&e.length){var n=function(t,i){for(var e=null,s=0;s<t.length;s+=1){var n=t[s];if(n&&n.cc===i){e=n;break}}return e}(e,s[0].cc);if(n&&(!n||n.startPTS))return n;c.b.log("No frag in previous level to align on")}else c.b.log("No fragments to align")}(e.details,i);s&&(c.b.log("Adjusting PTS using last level due to CC increase within current level"),st(s.start,i))}}(t,e,i),!e.PTSKnown&&i&&function(t,i){if(i&&i.fragments.length){if(!t.hasProgramDateTime||!i.hasProgramDateTime)return;var e=i.fragments[0].programDateTime,s=(t.fragments[0].programDateTime-e)/1e3+i.fragments[0].start;Object(o.a)(s)&&(c.b.log("adjusting PTS using programDateTime delta, sliding:"+s.toFixed(3)),st(s,t))}}(e,i.details)}function rt(t,i,e){void 0===t&&(t=0),void 0===i&&(i=0);var s=Math.min(i,e.duration+(e.deltaPTS?e.deltaPTS:0));return e.start+e.duration-s<=t?1:e.start-s>t&&e.start?-1:0}function ht(t,i,e){var s=1e3*Math.min(i,e.duration+(e.deltaPTS?e.deltaPTS:0));return(e.endProgramDateTime||0)-s>t}var ot=function(){function t(t,i,e,s){this.config=t,this.media=i,this.fragmentTracker=e,this.hls=s,this.nudgeRetry=0,this.stallReported=!1,this.stalled=null,this.moved=!1,this.seeking=!1}var i=t.prototype;return i.poll=function(t){var i=this.config,e=this.media,s=this.stalled,n=e.currentTime,r=e.seeking,h=this.seeking&&!r,o=!this.seeking&&r;if(this.seeking=r,n===t){if((o||h)&&(this.stalled=null),!e.paused&&!e.ended&&0!==e.playbackRate&&e.buffered.length){var a=H.bufferInfo(e,n,0),l=a.len>0,u=a.nextStart||0;if(l||u){if(r){if(a.len>2||!u||u-n>2)return;this.moved=!1}if(!this.moved&&this.stalled){var d=Math.max(u,a.start||0)-n;if(d>0&&d<=2)return void this.Na(null)}var p=self.performance.now();if(null!==s){var f=p-s;!r&&f>=250&&this.Ha(a.len);var v=H.bufferInfo(e,n,i.maxBufferHole);this.za(v,f)}else this.stalled=p}}}else if(this.moved=!0,null!==s){if(this.stallReported){var g=self.performance.now()-s;c.b.warn("playback not stuck anymore @"+n+", after "+Math.round(g)+"ms"),this.stallReported=!1}this.stalled=null,this.nudgeRetry=0}},i.za=function(t,i){var e=this.config,s=this.fragmentTracker,n=this.media.currentTime,r=s.getPartialFragment(n);r&&this.Na(r)||t.len>e.maxBufferHole&&i>1e3*e.highBufferWatchdogPeriod&&(c.b.warn("Trying to nudge playhead over buffer-hole"),this.stalled=null,this.qa())},i.Ha=function(t){var i=this.hls,e=this.media;this.stallReported||(this.stallReported=!0,c.b.warn("Playback stalling at @"+e.currentTime+" due to low buffer"),i.trigger(a.a.ERROR,{type:h.b.MEDIA_ERROR,details:h.a.BUFFER_STALLED_ERROR,fatal:!1,buffer:t}))},i.Na=function(t){for(var i=this.config,e=this.hls,s=this.media,n=s.currentTime,r=0,o=0;o<s.buffered.length;o++){var l=s.buffered.start(o);if(n+i.maxBufferHole>=r&&n<l){var u=Math.max(l+.05,s.currentTime+.1);return c.b.warn("skipping hole, adjusting currentTime from "+n+" to "+u),this.moved=!0,this.stalled=null,s.currentTime=u,t&&e.trigger(a.a.ERROR,{type:h.b.MEDIA_ERROR,details:h.a.BUFFER_SEEK_OVER_HOLE,fatal:!1,reason:"fragment loaded with buffer holes, seeking from "+n+" to "+u,frag:t}),u}r=s.buffered.end(o)}return 0},i.qa=function(){var t=this.config,i=this.hls,e=this.media,s=e.currentTime,n=(this.nudgeRetry||0)+1;if(this.nudgeRetry=n,n<t.nudgeMaxRetry){var r=s+n*t.nudgeOffset;c.b.warn("Nudging 'currentTime' from "+s+" to "+r),e.currentTime=r,i.trigger(a.a.ERROR,{type:h.b.MEDIA_ERROR,details:h.a.BUFFER_NUDGE_ON_STALL,fatal:!1})}else c.b.error("Playhead still not moving while enough data buffered @"+s+" after "+t.nudgeMaxRetry+" nudges"),i.trigger(a.a.ERROR,{type:h.b.MEDIA_ERROR,details:h.a.BUFFER_STALLED_ERROR,fatal:!0})},t}();function at(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}var ct="STOPPED",lt="IDLE",ut="KEY_LOADING",dt="FRAG_LOADING",pt="FRAG_LOADING_WAITING_RETRY",ft="PARSING",vt="PARSED",gt="BUFFER_FLUSHING",mt="ENDED",yt="ERROR",bt="WAITING_LEVEL";function wt(t,i){for(var e=0;e<i.length;e++){var s=i[e];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}var xt=function(t){var i,e;function s(i,e){var s;return(s=t.call(this,i,a.a.MEDIA_ATTACHED,a.a.MEDIA_DETACHING,a.a.MANIFEST_LOADING,a.a.MANIFEST_PARSED,a.a.LEVEL_LOADED,a.a.KEY_LOADED,a.a.FRAG_LOADED,a.a.FRAG_LOAD_EMERGENCY_ABORTED,a.a.FRAG_PARSING_INIT_SEGMENT,a.a.FRAG_PARSING_DATA,a.a.FRAG_PARSED,a.a.ERROR,a.a.AUDIO_TRACK_SWITCHING,a.a.AUDIO_TRACK_SWITCHED,a.a.BUFFER_CREATED,a.a.BUFFER_APPENDED,a.a.BUFFER_FLUSHED)||this).fragmentTracker=e,s.config=i.config,s.audioCodecSwap=!1,s.Wa=ct,s.stallReported=!1,s.gapController=null,s.altAudio=!1,s}e=t,(i=s).prototype=Object.create(e.prototype),i.prototype.constructor=i,i.__proto__=e;var r,l,u,d=s.prototype;return d.startLoad=function(t){if(this.levels){var i=this.lastCurrentTime,e=this.hls;if(this.stopLoad(),this.setInterval(100),this.level=-1,this.fragLoadError=0,!this.startFragRequested){var s=e.startLevel;-1===s&&(s=0,this.bitrateTest=!0),this.level=e.nextLoadLevel=s,this.loadedmetadata=!1}i>0&&-1===t&&(c.b.log("override startPosition with lastCurrentTime @"+i.toFixed(3)),t=i),this.state=lt,this.nextLoadPosition=this.startPosition=this.lastCurrentTime=t,this.tick()}else this.forceStartLoad=!0,this.state=ct},d.stopLoad=function(){this.forceStartLoad=!1,t.prototype.stopLoad.call(this)},d.doTick=function(){switch(this.state){case gt:this.fragLoadError=0;break;case lt:this.Ga();break;case bt:var t=this.levels[this.level];t&&t.details&&(this.state=lt);break;case pt:var i=window.performance.now(),e=this.retryDate;(!e||i>=e||this.media&&this.media.seeking)&&(c.b.log("mediaController: retryDate reached, switch back to IDLE state"),this.state=lt)}this.Ja(),this.Qa()},d.Ga=function(){var t=this.hls,i=t.config,e=this.media;if(void 0!==this.levelLastLoaded&&(e||!this.startFragRequested&&i.startFragPrefetch)){var s;s=this.loadedmetadata?e.currentTime:this.nextLoadPosition;var n=t.nextLoadLevel,r=this.levels[n];if(r){var h,o=r.bitrate;h=o?Math.max(8*i.maxBufferSize/o,i.maxBufferLength):i.maxBufferLength,h=Math.min(h,i.maxMaxBufferLength);var l=H.bufferInfo(this.mediaBuffer?this.mediaBuffer:e,s,i.maxBufferHole),u=l.len;if(!(u>=h)){c.b.trace("buffer length of "+u.toFixed(3)+" is below max of "+h.toFixed(3)+". checking for more payload ..."),this.level=t.nextLoadLevel=n;var d=r.details;if(!d||d.live&&this.levelLastLoaded!==n)this.state=bt;else{if(this.Xa(l,d)){var p={};return this.altAudio&&(p.type="video"),this.hls.trigger(a.a.BUFFER_EOS,p),void(this.state=mt)}this.Ya(s,l,d)}}}}},d.Ya=function(t,i,e){var s=this.fragPrevious,n=this.level,r=e.fragments,h=r.length;if(0!==h){var o,a=r[0].start,l=r[h-1].start+r[h-1].duration,u=i.end;if(e.initSegment&&!e.initSegment.data)o=e.initSegment;else if(e.live){var d=this.config.initialLiveManifestSize;if(h<d)return void c.b.warn("Can not start playback of a level, reason: not enough fragments "+h+" < "+d);if(null===(o=this.Ka(e,u,a,l,s,r,h)))return}else u<a&&(o=r[0]);o||(o=this.Za(a,s,h,r,u,l,e)),o&&(o.encrypted?(c.b.log("Loading key for "+o.sn+" of ["+e.startSN+" ,"+e.endSN+"],level "+n),this.tc(o)):(c.b.log("Loading "+o.sn+" of ["+e.startSN+" ,"+e.endSN+"],level "+n+", currentTime:"+t.toFixed(3)+",bufferEnd:"+u.toFixed(3)),this.ic(o)))}},d.Ka=function(t,i,e,s,n,r,h){var a,l=this.hls.config,u=this.media,d=void 0!==l.liveMaxLatencyDuration?l.liveMaxLatencyDuration:l.liveMaxLatencyDurationCount*t.targetduration;if(i<Math.max(e-l.maxFragLookUpTolerance,s-d)){var p=this.liveSyncPosition=this.computeLivePosition(e,t);i=p,u&&!u.paused&&u.readyState&&u.duration>p&&p>u.currentTime&&(c.b.log("buffer end: "+i.toFixed(3)+" is located too far from the end of live sliding playlist, reset currentTime to : "+p.toFixed(3)),u.currentTime=p),this.nextLoadPosition=p}if(t.PTSKnown&&i>s&&u&&u.readyState)return null;if(this.startFragRequested&&!t.PTSKnown){if(n)if(t.hasProgramDateTime)c.b.log("live playlist, switching playlist, load frag with same PDT: "+n.programDateTime),a=function(t,i,e){if(null===i||!Array.isArray(t)||!t.length||!Object(o.a)(i))return null;if(i<(t[0].programDateTime||0))return null;if(i>=(t[t.length-1].endProgramDateTime||0))return null;e=e||0;for(var s=0;s<t.length;++s){var n=t[s];if(ht(i,e,n))return n}return null}(r,n.endProgramDateTime,l.maxFragLookUpTolerance);else{var f=n.sn+1;if(f>=t.startSN&&f<=t.endSN){var v=r[f-t.startSN];n.cc===v.cc&&(a=v,c.b.log("live playlist, switching playlist, load frag with next SN: "+a.sn))}a||(a=N.search(r,(function(t){return n.cc-t.cc})))&&c.b.log("live playlist, switching playlist, load frag with same CC: "+a.sn)}a||(a=r[Math.min(h-1,Math.round(h/2))],c.b.log("live playlist, switching playlist, unknown, load middle frag : "+a.sn))}return a},d.Za=function(t,i,e,s,n,r,h){var o,a=this.hls.config;if(o=n<r?function(t,i,e,s){void 0===e&&(e=0),void 0===s&&(s=0);var n=t?i[t.sn-i[0].sn+1]:null;return n&&!rt(e,s,n)?n:N.search(i,rt.bind(null,e,s))}(i,s,n,n>r-a.maxFragLookUpTolerance?0:a.maxFragLookUpTolerance):s[e-1],o){var l=o.sn-h.startSN,u=i&&o.level===i.level,d=s[l-1],p=s[l+1];if(i&&o.sn===i.sn)if(u&&!o.backtracked)if(o.sn<h.endSN){var f=i.deltaPTS;f&&f>a.maxBufferHole&&i.dropped&&l?(o=d,c.b.warn("Previous fragment was dropped with large PTS gap between audio and video. Maybe fragment is not starting with a keyframe? Loading previous one to try to overcome this")):(o=p,c.b.log("Re-loading fragment with SN: "+o.sn))}else o=null;else o.backtracked&&(p&&p.backtracked?(c.b.warn("Already backtracked from fragment "+p.sn+", will not backtrack to fragment "+o.sn+". Loading fragment "+p.sn),o=p):(c.b.warn("Loaded fragment with dropped frames, backtracking 1 segment to find a keyframe"),o.dropped=0,d?(o=d).backtracked=!0:l&&(o=null)))}return o},d.tc=function(t){this.state=ut,this.hls.trigger(a.a.KEY_LOADING,{frag:t})},d.ic=function(t){var i=this.fragmentTracker.getState(t);this.fragCurrent=t,"initSegment"!==t.sn&&(this.startFragRequested=!0),Object(o.a)(t.sn)&&!t.bitrateTest&&(this.nextLoadPosition=t.start+t.duration),t.backtracked||i===j||i===$?(t.autoLevel=this.hls.autoLevelEnabled,t.bitrateTest=this.bitrateTest,this.hls.trigger(a.a.FRAG_LOADING,{frag:t}),this.demuxer||(this.demuxer=new Y(this.hls,"main")),this.state=dt):i===F&&this.ec(t.duration)&&this.fragmentTracker.removeFragment(t)},d.getBufferedFrag=function(t){return this.fragmentTracker.getBufferedFrag(t,n.MAIN)},d.followingBufferedFrag=function(t){return t?this.getBufferedFrag(t.endPTS+.5):null},d.Qa=function(){var t,i,e=this.media;if(e&&e.readyState&&!1===e.seeking&&((i=e.currentTime)>this.lastCurrentTime&&(this.lastCurrentTime=i),H.isBuffered(e,i)?t=this.getBufferedFrag(i):H.isBuffered(e,i+.1)&&(t=this.getBufferedFrag(i+.1)),t)){var s=t;if(s!==this.fragPlaying){this.hls.trigger(a.a.FRAG_CHANGED,{frag:s});var n=s.level;this.fragPlaying&&this.fragPlaying.level===n||this.hls.trigger(a.a.LEVEL_SWITCHED,{level:n}),this.fragPlaying=s}}},d.immediateLevelSwitch=function(){if(c.b.log("immediateLevelSwitch"),!this.immediateSwitch){this.immediateSwitch=!0;var t,i=this.media;i?(t=i.paused,i.pause()):t=!0,this.previouslyPaused=t}var e=this.fragCurrent;e&&e.loader&&e.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)},d.immediateLevelSwitchEnd=function(){var t=this.media;t&&t.buffered.length&&(this.immediateSwitch=!1,H.isBuffered(t,t.currentTime)&&(t.currentTime-=1e-4),this.previouslyPaused||t.play())},d.nextLevelSwitch=function(){var t=this.media;if(t&&t.readyState){var i,e,s;if((e=this.getBufferedFrag(t.currentTime))&&e.startPTS>1&&this.flushMainBuffer(0,e.startPTS-1),t.paused)i=0;else{var n=this.hls.nextLoadLevel,r=this.levels[n],h=this.fragLastKbps;i=h&&this.fragCurrent?this.fragCurrent.duration*r.bitrate/(1e3*h)+1:0}if((s=this.getBufferedFrag(t.currentTime+i))&&(s=this.followingBufferedFrag(s))){var o=this.fragCurrent;o&&o.loader&&o.loader.abort(),this.fragCurrent=null,this.flushMainBuffer(s.maxStartPTS,Number.POSITIVE_INFINITY)}}},d.flushMainBuffer=function(t,i){this.state=gt;var e={startOffset:t,endOffset:i};this.altAudio&&(e.type="video"),this.hls.trigger(a.a.BUFFER_FLUSHING,e)},d.onMediaAttached=function(t){var i=this.media=this.mediaBuffer=t.media;this.onvseeking=this.onMediaSeeking.bind(this),this.onvseeked=this.onMediaSeeked.bind(this),this.onvended=this.onMediaEnded.bind(this),i.addEventListener("seeking",this.onvseeking),i.addEventListener("seeked",this.onvseeked),i.addEventListener("ended",this.onvended);var e=this.config;this.levels&&e.autoStartLoad&&this.hls.startLoad(e.startPosition),this.gapController=new ot(e,i,this.fragmentTracker,this.hls)},d.onMediaDetaching=function(){var t=this.media;t&&t.ended&&(c.b.log("MSE detaching and video ended, reset startPosition"),this.startPosition=this.lastCurrentTime=0);var i=this.levels;i&&i.forEach((function(t){t.details&&t.details.fragments.forEach((function(t){t.backtracked=void 0}))})),t&&(t.removeEventListener("seeking",this.onvseeking),t.removeEventListener("seeked",this.onvseeked),t.removeEventListener("ended",this.onvended),this.onvseeking=this.onvseeked=this.onvended=null),this.fragmentTracker.removeAllFragments(),this.media=this.mediaBuffer=null,this.loadedmetadata=!1,this.stopLoad()},d.onMediaSeeked=function(){var t=this.media,i=t?t.currentTime:void 0;Object(o.a)(i)&&c.b.log("media seeked to "+i.toFixed(3)),this.tick()},d.onManifestLoading=function(){c.b.log("trigger BUFFER_RESET"),this.hls.trigger(a.a.BUFFER_RESET),this.fragmentTracker.removeAllFragments(),this.stalled=!1,this.startPosition=this.lastCurrentTime=0},d.onManifestParsed=function(t){var i,e=!1,s=!1;t.levels.forEach((function(t){(i=t.audioCodec)&&(-1!==i.indexOf("mp4a.40.2")&&(e=!0),-1!==i.indexOf("mp4a.40.5")&&(s=!0))})),this.audioCodecSwitch=e&&s,this.audioCodecSwitch&&c.b.log("both AAC/HE-AAC audio found in levels; declaring level codec as HE-AAC"),this.altAudio=t.altAudio,this.levels=t.levels,this.startFragRequested=!1;var n=this.config;(n.autoStartLoad||this.forceStartLoad)&&this.hls.startLoad(n.startPosition)},d.onLevelLoaded=function(t){var i=t.details,e=t.level,s=this.levels[this.levelLastLoaded],n=this.levels[e],r=i.totalduration,h=0;if(c.b.log("level "+e+" loaded ["+i.startSN+","+i.endSN+"],duration:"+r),i.live){var l=n.details;l&&i.fragments.length>0?(function(t,i){i.initSegment&&t.initSegment&&(i.initSegment=t.initSegment);var e,s=0;if(it(t,i,(function(t,n){s=t.cc-n.cc,Object(o.a)(t.startPTS)&&(n.start=n.startPTS=t.startPTS,n.endPTS=t.endPTS,n.duration=t.duration,n.backtracked=t.backtracked,n.dropped=t.dropped,e=n),i.PTSKnown=!0})),i.PTSKnown){if(s){c.b.log("discontinuity sliding from playlist, take drift into account");for(var n=i.fragments,r=0;r<n.length;r++)n[r].cc+=s}e?tt(i,e,e.startPTS,e.endPTS,e.startDTS,e.endDTS):function(t,i){var e=i.startSN-t.startSN,s=t.fragments,n=i.fragments;if(!(e<0||e>s.length))for(var r=0;r<n.length;r++)n[r].start+=s[e].start}(t,i),i.PTSKnown=t.PTSKnown}}(l,i),h=i.fragments[0].start,this.liveSyncPosition=this.computeLivePosition(h,l),i.PTSKnown&&Object(o.a)(h)?c.b.log("live playlist sliding:"+h.toFixed(3)):(c.b.log("live playlist - outdated PTS, unknown sliding"),nt(this.fragPrevious,s,i))):(c.b.log("live playlist - first load, unknown sliding"),i.PTSKnown=!1,nt(this.fragPrevious,s,i))}else i.PTSKnown=!1;if(n.details=i,this.levelLastLoaded=e,this.hls.trigger(a.a.LEVEL_UPDATED,{details:i,level:e}),!1===this.startFragRequested){if(-1===this.startPosition||-1===this.lastCurrentTime){var u=i.startTimeOffset;Object(o.a)(u)?(u<0&&(c.b.log("negative start time offset "+u+", count from end of last fragment"),u=h+r+u),c.b.log("start time offset found in playlist, adjust startPosition to "+u),this.startPosition=u):i.live?(this.startPosition=this.computeLivePosition(h,i),c.b.log("configure startPosition to "+this.startPosition)):this.startPosition=0,this.lastCurrentTime=this.startPosition}this.nextLoadPosition=this.startPosition}this.state===bt&&(this.state=lt),this.tick()},d.onKeyLoaded=function(){this.state===ut&&(this.state=lt,this.tick())},d.onFragLoaded=function(t){var i=this.fragCurrent,e=this.hls,s=this.levels,n=this.media,r=t.frag;if(this.state===dt&&i&&"main"===r.type&&r.level===i.level&&r.sn===i.sn){var h=t.stats,o=s[i.level],l=o.details;if(this.bitrateTest=!1,this.stats=h,c.b.log("Loaded "+i.sn+" of ["+l.startSN+" ,"+l.endSN+"],level "+i.level),r.bitrateTest&&e.nextLoadLevel)this.state=lt,this.startFragRequested=!1,h.tparsed=h.tbuffered=window.performance.now(),e.trigger(a.a.FRAG_BUFFERED,{stats:h,frag:i,id:"main"}),this.tick();else if("initSegment"===r.sn)this.state=lt,h.tparsed=h.tbuffered=window.performance.now(),l.initSegment.data=t.payload,e.trigger(a.a.FRAG_BUFFERED,{stats:h,frag:i,id:"main"}),this.tick();else{c.b.log("Parsing "+i.sn+" of ["+l.startSN+" ,"+l.endSN+"],level "+i.level+", cc "+i.cc),this.state=ft,this.pendingBuffering=!0,this.appended=!1,r.bitrateTest&&(r.bitrateTest=!1,this.fragmentTracker.onFragLoaded({frag:r}));var u=!(n&&n.seeking)&&(l.PTSKnown||!l.live),d=l.initSegment?l.initSegment.data:[],p=this.sc(o);(this.demuxer=this.demuxer||new Y(this.hls,"main")).push(t.payload,d,p,o.videoCodec,i,l.totalduration,u)}}this.fragLoadError=0},d.onFragParsingInitSegment=function(t){var i=this.fragCurrent,e=t.frag;if(i&&"main"===t.id&&e.sn===i.sn&&e.level===i.level&&this.state===ft){var s,n,r=t.tracks;if(r.audio&&this.altAudio&&delete r.audio,n=r.audio){var h=this.levels[this.level].audioCodec,o=navigator.userAgent.toLowerCase();h&&this.audioCodecSwap&&(c.b.log("swapping playlist audio codec"),h=-1!==h.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5"),this.audioCodecSwitch&&1!==n.metadata.channelCount&&-1===o.indexOf("firefox")&&(h="mp4a.40.5"),-1!==o.indexOf("android")&&"audio/mpeg"!==n.container&&(h="mp4a.40.2",c.b.log("Android: force audio codec to "+h)),n.levelCodec=h,n.id=t.id}for(s in(n=r.video)&&(n.levelCodec=this.levels[this.level].videoCodec,n.id=t.id),this.hls.trigger(a.a.BUFFER_CODECS,r),r){n=r[s],c.b.log("main track:"+s+",container:"+n.container+",codecs[level/parsed]=["+n.levelCodec+"/"+n.codec+"]");var l=n.initSegment;l&&(this.appended=!0,this.pendingBuffering=!0,this.hls.trigger(a.a.BUFFER_APPENDING,{type:s,data:l,parent:"main",content:"initSegment"}))}this.tick()}},d.onFragParsingData=function(t){var i=this,e=this.fragCurrent,s=t.frag;if(e&&"main"===t.id&&s.sn===e.sn&&s.level===e.level&&("audio"!==t.type||!this.altAudio)&&this.state===ft){var n=this.levels[this.level],r=e;if(Object(o.a)(t.endPTS)||(t.endPTS=t.startPTS+e.duration,t.endDTS=t.startDTS+e.duration),!0===t.hasAudio&&r.addElementaryStream(f.AUDIO),!0===t.hasVideo&&r.addElementaryStream(f.VIDEO),c.b.log("Parsed "+t.type+",PTS:["+t.startPTS.toFixed(3)+","+t.endPTS.toFixed(3)+"],DTS:["+t.startDTS.toFixed(3)+"/"+t.endDTS.toFixed(3)+"],nb:"+t.nb+",dropped:"+(t.dropped||0)),"video"===t.type)if(r.dropped=t.dropped,r.dropped)if(r.backtracked)c.b.warn("Already backtracked on this fragment, appending with the gap",r.sn);else{var h=n.details;if(!h||r.sn!==h.startSN)return c.b.warn("missing video frame(s), backtracking fragment",r.sn),this.fragmentTracker.removeFragment(r),r.backtracked=!0,this.nextLoadPosition=t.startPTS,this.state=lt,this.fragPrevious=r,void this.tick();c.b.warn("missing video frame(s) on first frag, appending with gap",r.sn)}else r.backtracked=!1;var l=tt(n.details,r,t.startPTS,t.endPTS,t.startDTS,t.endDTS),u=this.hls;u.trigger(a.a.LEVEL_PTS_UPDATED,{details:n.details,level:this.level,drift:l,type:t.type,start:t.startPTS,end:t.endPTS}),[t.data1,t.data2].forEach((function(e){e&&e.length&&i.state===ft&&(i.appended=!0,i.pendingBuffering=!0,u.trigger(a.a.BUFFER_APPENDING,{type:t.type,data:e,parent:"main",content:"data"}))})),this.tick()}},d.onFragParsed=function(t){var i=this.fragCurrent,e=t.frag;i&&"main"===t.id&&e.sn===i.sn&&e.level===i.level&&this.state===ft&&(this.stats.tparsed=window.performance.now(),this.state=vt,this.nc())},d.onAudioTrackSwitching=function(t){var i=!!t.url,e=t.id;if(!i){if(this.mediaBuffer!==this.media){c.b.log("switching on main audio, use media.buffered to schedule main fragment loading"),this.mediaBuffer=this.media;var s=this.fragCurrent;s.loader&&(c.b.log("switching to main audio track, cancel main fragment load"),s.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.state=lt}var n=this.hls;n.trigger(a.a.BUFFER_FLUSHING,{startOffset:0,endOffset:Number.POSITIVE_INFINITY,type:"audio"}),n.trigger(a.a.AUDIO_TRACK_SWITCHED,{id:e}),this.altAudio=!1}},d.onAudioTrackSwitched=function(t){var i=t.id,e=!!this.hls.audioTracks[i].url;if(e){var s=this.videoBuffer;s&&this.mediaBuffer!==s&&(c.b.log("switching on alternate audio, use video.buffered to schedule main fragment loading"),this.mediaBuffer=s)}this.altAudio=e,this.tick()},d.onBufferCreated=function(t){var i,e,s=t.tracks,n=!1;for(var r in s){var h=s[r];"main"===h.id?(e=r,i=h,"video"===r&&(this.videoBuffer=s[r].buffer)):n=!0}n&&i?(c.b.log("alternate track found, use "+e+".buffered to schedule main fragment loading"),this.mediaBuffer=i.buffer):this.mediaBuffer=this.media},d.onBufferAppended=function(t){if("main"===t.parent){var i=this.state;i!==ft&&i!==vt||(this.pendingBuffering=t.pending>0,this.nc())}},d.nc=function(){if(!(this.state!==vt||this.appended&&this.pendingBuffering)){var t=this.fragCurrent;if(t){var i=this.mediaBuffer?this.mediaBuffer:this.media;c.b.log("main buffered : "+et.toString(i.buffered)),this.fragPrevious=t;var e=this.stats;e.tbuffered=window.performance.now(),this.fragLastKbps=Math.round(8*e.total/(e.tbuffered-e.tfirst)),this.hls.trigger(a.a.FRAG_BUFFERED,{stats:e,frag:t,id:"main"}),this.state=lt}this.tick()}},d.onError=function(t){var i=t.frag||this.fragCurrent;if(!i||"main"===i.type){var e=!!this.media&&H.isBuffered(this.media,this.media.currentTime)&&H.isBuffered(this.media,this.media.currentTime+.5);switch(t.details){case h.a.FRAG_LOAD_ERROR:case h.a.FRAG_LOAD_TIMEOUT:case h.a.KEY_LOAD_ERROR:case h.a.KEY_LOAD_TIMEOUT:if(!t.fatal)if(this.fragLoadError+1<=this.config.fragLoadingMaxRetry){var s=Math.min(Math.pow(2,this.fragLoadError)*this.config.fragLoadingRetryDelay,this.config.fragLoadingMaxRetryTimeout);c.b.warn("mediaController: frag loading failed, retry in "+s+" ms"),this.retryDate=window.performance.now()+s,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.fragLoadError++,this.state=pt}else c.b.error("mediaController: "+t.details+" reaches max retry, redispatch as fatal ..."),t.fatal=!0,this.state=yt;break;case h.a.LEVEL_LOAD_ERROR:case h.a.LEVEL_LOAD_TIMEOUT:this.state!==yt&&(t.fatal?(this.state=yt,c.b.warn("streamController: "+t.details+",switch to "+this.state+" state ...")):t.levelRetry||this.state!==bt||(this.state=lt));break;case h.a.BUFFER_FULL_ERROR:"main"!==t.parent||this.state!==ft&&this.state!==vt||(e?(this.ec(this.config.maxBufferLength),this.state=lt):(c.b.warn("buffer full error also media.currentTime is not buffered, flush everything"),this.fragCurrent=null,this.flushMainBuffer(0,Number.POSITIVE_INFINITY)))}}},d.ec=function(t){var i=this.config;return i.maxMaxBufferLength>=t&&(i.maxMaxBufferLength/=2,c.b.warn("main:reduce max buffer length to "+i.maxMaxBufferLength+"s"),!0)},d.Ja=function(){var t=this.media;if(t&&0!==t.readyState){var i=(this.mediaBuffer?this.mediaBuffer:t).buffered;!this.loadedmetadata&&i.length?(this.loadedmetadata=!0,this.rc()):this.immediateSwitch?this.immediateLevelSwitchEnd():this.gapController.poll(this.lastCurrentTime,i)}},d.onFragLoadEmergencyAborted=function(){this.state=lt,this.loadedmetadata||(this.startFragRequested=!1,this.nextLoadPosition=this.startPosition),this.tick()},d.onBufferFlushed=function(){var t=this.mediaBuffer?this.mediaBuffer:this.media;t&&this.fragmentTracker.detectEvictedFragments(f.VIDEO,t.buffered),this.state=lt,this.fragPrevious=null},d.swapAudioCodec=function(){this.audioCodecSwap=!this.audioCodecSwap},d.rc=function(){var t=this.media,i=t.currentTime,e=t.seeking?i:this.startPosition;i!==e&&e>=0&&(c.b.log("target start position not buffered, seek to buffered.start(0) "+e+" from current time "+i+" "),t.currentTime=e)},d.sc=function(t){var i=this.config.defaultAudioCodec||t.audioCodec;return this.audioCodecSwap&&(c.b.log("swapping playlist audio codec"),i&&(i=-1!==i.indexOf("mp4a.40.5")?"mp4a.40.2":"mp4a.40.5")),i},r=s,(l=[{key:"state",set:function(t){if(this.state!==t){var i=this.state;this.Wa=t,c.b.log("main stream-controller: "+i+"->"+t),this.hls.trigger(a.a.STREAM_STATE_TRANSITION,{previousState:i,nextState:t})}},get:function(){return this.Wa}},{key:"currentLevel",get:function(){var t=this.media;if(t){var i=this.getBufferedFrag(t.currentTime);if(i)return i.level}return-1}},{key:"nextBufferedFrag",get:function(){var t=this.media;return t?this.followingBufferedFrag(this.getBufferedFrag(t.currentTime)):null}},{key:"nextLevel",get:function(){var t=this.nextBufferedFrag;return t?t.level:-1}},{key:"liveSyncPosition",get:function(){return this.hc},set:function(t){this.hc=t}}])&&wt(r.prototype,l),u&&wt(r,u),s}(function(t){var i,e;function s(){return t.apply(this,arguments)||this}e=t,(i=s).prototype=Object.create(e.prototype),i.prototype.constructor=i,i.__proto__=e;var n=s.prototype;return n.doTick=function(){},n.startLoad=function(){},n.stopLoad=function(){var t=this.fragCurrent;t&&(t.loader&&t.loader.abort(),this.fragmentTracker.removeFragment(t)),this.demuxer&&(this.demuxer.destroy(),this.demuxer=null),this.fragCurrent=null,this.fragPrevious=null,this.clearInterval(),this.clearNextTick(),this.state=ct},n.Xa=function(t,i){var e=this.fragCurrent,s=this.fragmentTracker;if(!i.live&&e&&!e.backtracked&&e.sn===i.endSN&&!t.nextStart){var n=s.getState(e);return n===$||n===V}return!1},n.onMediaSeeking=function(){var t=this.config,i=this.media,e=this.mediaBuffer,s=this.state,n=i?i.currentTime:null,r=H.bufferInfo(e||i,n,this.config.maxBufferHole);if(Object(o.a)(n)&&c.b.log("media seeking to "+n.toFixed(3)),s===dt){var h=this.fragCurrent;if(0===r.len&&h){var a=t.maxFragLookUpTolerance,l=h.start-a,u=h.start+h.duration+a;n<l||n>u?(h.loader&&(c.b.log("seeking outside of buffer while fragment load in progress, cancel fragment load"),h.loader.abort()),this.fragCurrent=null,this.fragPrevious=null,this.state=lt):c.b.log("seeking outside of buffer but within currently loaded fragment range")}}else s===mt&&(0===r.len&&(this.fragPrevious=null,this.fragCurrent=null),this.state=lt);i&&(this.lastCurrentTime=n),this.loadedmetadata||(this.nextLoadPosition=this.startPosition=n),this.tick()},n.onMediaEnded=function(){this.startPosition=this.lastCurrentTime=0},n.onHandlerDestroying=function(){this.stopLoad(),t.prototype.onHandlerDestroying.call(this)},n.onHandlerDestroyed=function(){this.state=ct,this.fragmentTracker=null},n.computeLivePosition=function(t,i){var e=void 0!==this.config.liveSyncDuration?this.config.liveSyncDuration:this.config.liveSyncDurationCount*i.targetduration;return t+Math.max(0,i.totalduration-e)},s}(function(t){var i,e;function s(i){for(var e,s=arguments.length,n=new Array(s>1?s-1:0),r=1;r<s;r++)n[r-1]=arguments[r];return(e=t.call.apply(t,[this,i].concat(n))||this).oc=void 0,e.ac=null,e.lc=null,e.dc=0,e.oc=e.tick.bind(at(e)),e}e=t,(i=s).prototype=Object.create(e.prototype),i.prototype.constructor=i,i.__proto__=e;var n=s.prototype;return n.onHandlerDestroying=function(){this.clearNextTick(),this.clearInterval()},n.hasInterval=function(){return!!this.lc},n.hasNextTick=function(){return!!this.ac},n.setInterval=function(t){return!this.lc&&(this.lc=self.setInterval(this.oc,t),!0)},n.clearInterval=function(){return!!this.lc&&(self.clearInterval(this.lc),this.lc=null,!0)},n.clearNextTick=function(){return!!this.ac&&(self.clearTimeout(this.ac),this.ac=null,!0)},n.tick=function(){this.dc++,1===this.dc&&(this.doTick(),this.dc>1&&(this.clearNextTick(),this.ac=self.setTimeout(this.oc,0)),this.dc=0)},n.doTick=function(){},s}(u)));function St(t,i){for(var e=0;e<i.length;e++){var s=i[e];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}window.performance;var _t,At=function(t){var i,e;function s(i){var e;return(e=t.call(this,i,a.a.MANIFEST_LOADED,a.a.LEVEL_LOADED,a.a.AUDIO_TRACK_SWITCHED,a.a.FRAG_LOADED,a.a.ERROR)||this).canload=!1,e.currentLevelIndex=null,e.manualLevelIndex=-1,e.timer=null,_t=/chrome|firefox/.test(navigator.userAgent.toLowerCase()),e}e=t,(i=s).prototype=Object.create(e.prototype),i.prototype.constructor=i,i.__proto__=e;var n,r,o,l=s.prototype;return l.onHandlerDestroying=function(){this.clearTimer(),this.manualLevelIndex=-1},l.clearTimer=function(){null!==this.timer&&(clearTimeout(this.timer),this.timer=null)},l.startLoad=function(){var t=this.fc;this.canload=!0,this.levelRetryCount=0,t&&t.forEach((function(t){t.loadError=0;var i=t.details;i&&i.live&&(t.details=void 0)})),null!==this.timer&&this.loadLevel()},l.stopLoad=function(){this.canload=!1},l.onManifestLoaded=function(t){var i,e=[],s=[],n={},r=null,o=!1,l=!1;if(t.levels.forEach((function(t){var i=t.attrs;t.loadError=0,t.fragmentError=!1,o=o||!!t.videoCodec,l=l||!!t.audioCodec,_t&&t.audioCodec&&-1!==t.audioCodec.indexOf("mp4a.40.34")&&(t.audioCodec=void 0),(r=n[t.bitrate])?r.url.push(t.url):(t.url=[t.url],t.urlId=0,n[t.bitrate]=t,e.push(t)),i&&(i.AUDIO&&(l=!0,K(r||t,"audio",i.AUDIO)),i.SUBTITLES&&K(r||t,"text",i.SUBTITLES))})),o&&l&&(e=e.filter((function(t){return!!t.videoCodec}))),e=e.filter((function(t){var i=t.audioCodec,e=t.videoCodec;return(!i||A(i,"audio"))&&(!e||A(e,"video"))})),t.audioTracks&&(s=t.audioTracks.filter((function(t){return!t.audioCodec||A(t.audioCodec,"audio")}))).forEach((function(t,i){t.id=i})),e.length>0){i=e[0].bitrate,e.sort((function(t,i){return t.bitrate-i.bitrate})),this.fc=e;for(var u=0;u<e.length;u++)if(e[u].bitrate===i){this.vc=u,c.b.log("manifest loaded,"+e.length+" level(s) found, first bitrate:"+i);break}this.hls.trigger(a.a.MANIFEST_PARSED,{levels:e,audioTracks:s,firstLevel:this.vc,stats:t.stats,audio:l,video:o,altAudio:s.some((function(t){return!!t.url}))})}else this.hls.trigger(a.a.ERROR,{type:h.b.MEDIA_ERROR,details:h.a.MANIFEST_INCOMPATIBLE_CODECS_ERROR,fatal:!0,url:this.hls.url,reason:"no level with compatible codecs found in manifest"})},l.setLevelInternal=function(t){var i=this.fc,e=this.hls;if(t>=0&&t<i.length){if(this.clearTimer(),this.currentLevelIndex!==t){c.b.log("switching to level "+t),this.currentLevelIndex=t;var s=i[t];s.level=t,e.trigger(a.a.LEVEL_SWITCHING,s)}var n=i[t],r=n.details;if(!r||r.live){var o=n.urlId;e.trigger(a.a.LEVEL_LOADING,{url:n.url[o],level:t,id:o})}}else e.trigger(a.a.ERROR,{type:h.b.OTHER_ERROR,details:h.a.LEVEL_SWITCH_ERROR,level:t,fatal:!1,reason:"invalid level idx"})},l.onError=function(t){if(t.fatal)t.type===h.b.NETWORK_ERROR&&this.clearTimer();else{var i,e=!1,s=!1;switch(t.details){case h.a.FRAG_LOAD_ERROR:case h.a.FRAG_LOAD_TIMEOUT:case h.a.KEY_LOAD_ERROR:case h.a.KEY_LOAD_TIMEOUT:i=t.frag.level,s=!0;break;case h.a.LEVEL_LOAD_ERROR:case h.a.LEVEL_LOAD_TIMEOUT:i=t.context.level,e=!0;break;case h.a.REMUX_ALLOC_ERROR:i=t.level,e=!0}void 0!==i&&this.recoverLevel(t,i,e,s)}},l.recoverLevel=function(t,i,e,s){var n,r,h,o=this,a=this.hls.config,l=t.details,u=this.fc[i];if(u.loadError++,u.fragmentError=s,e){if(!(this.levelRetryCount+1<=a.levelLoadingMaxRetry))return c.b.error("level controller, cannot recover from "+l+" error"),this.currentLevelIndex=null,this.clearTimer(),void(t.fatal=!0);r=Math.min(Math.pow(2,this.levelRetryCount)*a.levelLoadingRetryDelay,a.levelLoadingMaxRetryTimeout),this.timer=setTimeout((function(){return o.loadLevel()}),r),t.levelRetry=!0,this.levelRetryCount++,c.b.warn("level controller, "+l+", retry in "+r+" ms, current retry count is "+this.levelRetryCount)}(e||s)&&((n=u.url.length)>1&&u.loadError<n?(u.urlId=(u.urlId+1)%n,u.details=void 0,c.b.warn("level controller, "+l+" for level "+i+": switching to redundant URL-id "+u.urlId)):-1===this.manualLevelIndex?(h=0===i?this.fc.length-1:i-1,c.b.warn("level controller, "+l+": switch to "+h),this.hls.nextAutoLevel=this.currentLevelIndex=h):s&&(c.b.warn("level controller, "+l+": reload a fragment"),this.currentLevelIndex=null))},l.onFragLoaded=function(t){var i=t.frag;if(void 0!==i&&"main"===i.type){var e=this.fc[i.level];void 0!==e&&(e.fragmentError=!1,e.loadError=0,this.levelRetryCount=0)}},l.onLevelLoaded=function(t){var i=this,e=t.level,s=t.details;if(e===this.currentLevelIndex){var n=this.fc[e];if(n.fragmentError||(n.loadError=0,this.levelRetryCount=0),s.live){var r=function(t,i,e){var s=1e3*(i.averagetargetduration?i.averagetargetduration:i.targetduration),n=s/2;return t&&i.endSN===t.endSN&&(s=n),e&&(s=Math.max(n,s-(window.performance.now()-e))),Math.round(s)}(n.details,s,t.stats.trequest);c.b.log("live playlist, reload in "+Math.round(r)+" ms"),this.timer=setTimeout((function(){return i.loadLevel()}),r)}else this.clearTimer()}},l.onAudioTrackSwitched=function(t){var i=this.hls.audioTracks[t.id].groupId,e=this.hls.levels[this.currentLevelIndex];if(e&&e.audioGroupIds){for(var s=-1,n=0;n<e.audioGroupIds.length;n++)if(e.audioGroupIds[n]===i){s=n;break}s!==e.urlId&&(e.urlId=s,this.startLoad())}},l.loadLevel=function(){if(c.b.debug("call to loadLevel"),null!==this.currentLevelIndex&&this.canload){var t=this.fc[this.currentLevelIndex];if("object"==typeof t&&t.url.length>0){var i=this.currentLevelIndex,e=t.urlId,s=t.url[e];c.b.log("Attempt loading level index "+i+" with URL-id "+e),this.hls.trigger(a.a.LEVEL_LOADING,{url:s,level:i,id:e})}}},n=s,(r=[{key:"levels",get:function(){return this.fc}},{key:"level",get:function(){return this.currentLevelIndex},set:function(t){var i=this.fc;i&&(t=Math.min(t,i.length-1),this.currentLevelIndex===t&&i[t].details||this.setLevelInternal(t))}},{key:"manualLevel",get:function(){return this.manualLevelIndex},set:function(t){this.manualLevelIndex=t,void 0===this.gc&&(this.gc=t),-1!==t&&(this.level=t)}},{key:"firstLevel",get:function(){return this.vc},set:function(t){this.vc=t}},{key:"startLevel",get:function(){if(void 0===this.gc){var t=this.hls.config.startLevel;return void 0!==t?t:this.vc}return this.gc},set:function(t){this.gc=t}},{key:"nextLoadLevel",get:function(){return-1!==this.manualLevelIndex?this.manualLevelIndex:this.hls.nextAutoLevel},set:function(t){this.level=t,-1===this.manualLevelIndex&&(this.hls.nextAutoLevel=t)}}])&&St(n.prototype,r),o&&St(n,o),s}(u),Pt=e(4);function kt(t,i){var e;try{e=new Event("addtrack")}catch(t){(e=document.createEvent("Event")).initEvent("addtrack",!1,!1)}e.track=t,i.dispatchEvent(e)}var It=function(t){var i,e;function s(i){var e;return(e=t.call(this,i,a.a.MEDIA_ATTACHED,a.a.MEDIA_DETACHING,a.a.FRAG_PARSING_METADATA,a.a.LIVE_BACK_BUFFER_REACHED)||this).id3Track=void 0,e.media=void 0,e}e=t,(i=s).prototype=Object.create(e.prototype),i.prototype.constructor=i,i.__proto__=e;var n=s.prototype;return n.destroy=function(){u.prototype.destroy.call(this)},n.onMediaAttached=function(t){this.media=t.media,this.media},n.onMediaDetaching=function(){!function(t){if(t&&t.cues)for(;t.cues.length>0;)t.removeCue(t.cues[0])}(this.id3Track),this.id3Track=void 0,this.media=void 0},n.getID3Track=function(t){for(var i=0;i<t.length;i++){var e=t[i];if("metadata"===e.kind&&"id3"===e.label)return kt(e,this.media),e}return this.media.addTextTrack("metadata","id3")},n.onFragParsingMetadata=function(t){var i=t.frag,e=t.samples;this.id3Track||(this.id3Track=this.getID3Track(this.media.textTracks),this.id3Track.mode="hidden");for(var s=this.hls.config.cnxRenderWindow.WebKitDataCue||this.hls.config.cnxRenderWindow.VTTCue||this.hls.config.cnxRenderWindow.TextTrackCue,n=0;n<e.length;n++){var r=Pt.a.getID3Frames(e[n].data);if(r){var h=e[n].pts,o=n<e.length-1?e[n+1].pts:i.endPTS;h===o?o+=1e-4:h>o&&(c.b.warn("detected an id3 sample with endTime < startTime, adjusting endTime to (startTime + 0.25)"),o=h+.25);for(var a=0;a<r.length;a++){var l=r[a];if(!Pt.a.isTimeStampFrame(l)){var u=new s(h,o,"");u.value=l,this.id3Track.addCue(u)}}}}},n.onLiveBackBufferReached=function(t){var i=t.bufferEnd,e=this.id3Track;if(e&&e.cues&&e.cues.length){var s=function(t,i){if(i<t[0].endTime)return t[0];if(i>t[t.length-1].endTime)return t[t.length-1];for(var e=0,s=t.length-1;e<=s;){var n=Math.floor((s+e)/2);if(i<t[n].endTime)s=n-1;else{if(!(i>t[n].endTime))return t[n];e=n+1}}return t[e].endTime-i<i-t[s].endTime?t[e]:t[s]}(e.cues,i);if(s)for(;e.cues[0]!==s;)e.removeCue(e.cues[0])}},s}(u),Tt=function(){function t(t){this.alpha_=void 0,this.estimate_=void 0,this.totalWeight_=void 0,this.alpha_=t?Math.exp(Math.log(.5)/t):0,this.estimate_=0,this.totalWeight_=0}var i=t.prototype;return i.sample=function(t,i){var e=Math.pow(this.alpha_,t);this.estimate_=i*(1-e)+e*this.estimate_,this.totalWeight_+=t},i.getTotalWeight=function(){return this.totalWeight_},i.getEstimate=function(){if(this.alpha_){var t=1-Math.pow(this.alpha_,this.totalWeight_);return this.estimate_/t}return this.estimate_},t}(),Ct=function(){function t(t,i,e,s){this.hls=void 0,this.defaultEstimate_=void 0,this.minWeight_=void 0,this.minDelayMs_=void 0,this.slow_=void 0,this.fast_=void 0,this.hls=t,this.defaultEstimate_=s,this.minWeight_=.001,this.minDelayMs_=50,this.slow_=new Tt(i),this.fast_=new Tt(e)}var i=t.prototype;return i.sample=function(t,i){var e=(t=Math.max(t,this.minDelayMs_))/1e3,s=8*i/e;this.fast_.sample(e,s),this.slow_.sample(e,s)},i.canEstimate=function(){var t=this.fast_;return t&&t.getTotalWeight()>=this.minWeight_},i.getEstimate=function(){return this.canEstimate()?Math.min(this.fast_.getEstimate(),this.slow_.getEstimate()):this.defaultEstimate_},i.destroy=function(){},t}();function Mt(t,i){for(var e=0;e<i.length;e++){var s=i[e];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}var Et=window.performance,Lt=function(t){var i,e;function s(i){var e;return(e=t.call(this,i,a.a.FRAG_LOADING,a.a.FRAG_LOADED,a.a.FRAG_BUFFERED,a.a.ERROR)||this).lastLoadedFragLevel=0,e.mc=-1,e.hls=i,e.timer=null,e.bwEstimator=null,e.onCheck=e.yc.bind(function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(e)),e}e=t,(i=s).prototype=Object.create(e.prototype),i.prototype.constructor=i,i.__proto__=e;var n,r,l,d=s.prototype;return d.destroy=function(){this.clearTimer(),u.prototype.destroy.call(this)},d.onFragLoading=function(t){var i=t.frag;if("main"===i.type&&(this.timer||(this.fragCurrent=i,this.timer=setInterval(this.onCheck,100)),!this.bwEstimator)){var e,s,n=this.hls,r=n.config,h=i.level;n.levels[h].details.live?(e=r.abrEwmaFastLive,s=r.abrEwmaSlowLive):(e=r.abrEwmaFastVoD,s=r.abrEwmaSlowVoD),this.bwEstimator=new Ct(n,s,e,r.abrEwmaDefaultEstimate)}},d.yc=function(){var t=this.hls,i=t.media,e=this.fragCurrent;if(e){var s=e.loader,n=t.minAutoLevel;if(!s||s.stats&&s.stats.aborted)return c.b.warn("frag loader destroy or aborted, disarm abandonRules"),this.clearTimer(),void(this.mc=-1);var r=s.stats;if(i&&r&&(!i.paused&&0!==i.playbackRate||!i.readyState)&&e.autoLevel&&e.level){var h=Et.now()-r.trequest,o=Math.abs(i.playbackRate);if(h>500*e.duration/o){var l=t.levels,u=Math.max(1,r.bw?r.bw/8:1e3*r.loaded/h),d=l[e.level],p=d.realBitrate?Math.max(d.realBitrate,d.bitrate):d.bitrate,f=r.total?r.total:Math.max(r.loaded,Math.round(e.duration*p/8)),v=i.currentTime,g=(f-r.loaded)/u,m=(H.bufferInfo(i,v,t.config.maxBufferHole).end-v)/o;if(m<2*e.duration/o&&g>m){var y;for(y=e.level-1;y>n;y--){var b=l[y].realBitrate?Math.max(l[y].realBitrate,l[y].bitrate):l[y].bitrate;if(e.duration*b/(6.4*u)<m)break}void 0<g&&(c.b.warn("loading too slow, abort fragment loading and switch to level "+y+":fragLoadedDelay["+y+"]<fragLoadedDelay["+(e.level-1)+"];bufferStarvationDelay:"+(void 0).toFixed(1)+"<"+g.toFixed(1)+":"+m.toFixed(1)),t.nextLoadLevel=y,this.bwEstimator.sample(h,r.loaded),s.abort(),this.clearTimer(),t.trigger(a.a.FRAG_LOAD_EMERGENCY_ABORTED,{frag:e,stats:r}))}}}}},d.onFragLoaded=function(t){var i=t.frag;if("main"===i.type&&Object(o.a)(i.sn)){if(this.clearTimer(),this.lastLoadedFragLevel=i.level,this.mc=-1,this.hls.config.abrMaxWithRealBitrate){var e=this.hls.levels[i.level],s=(e.loaded?e.loaded.bytes:0)+t.stats.loaded,n=(e.loaded?e.loaded.duration:0)+t.frag.duration;e.loaded={bytes:s,duration:n},e.realBitrate=Math.round(8*s/n)}if(t.frag.bitrateTest){var r=t.stats;r.tparsed=r.tbuffered=r.tload,this.onFragBuffered(t)}}},d.onFragBuffered=function(t){var i=t.stats,e=t.frag;if(!0!==i.aborted&&"main"===e.type&&Object(o.a)(e.sn)&&(!e.bitrateTest||i.tload===i.tbuffered)){var s=i.tparsed-i.trequest;c.b.log("latency/loading/parsing/append/kbps:"+Math.round(i.tfirst-i.trequest)+"/"+Math.round(i.tload-i.tfirst)+"/"+Math.round(i.tparsed-i.tload)+"/"+Math.round(i.tbuffered-i.tparsed)+"/"+Math.round(8*i.loaded/(i.tbuffered-i.trequest))),this.bwEstimator.sample(s,i.loaded),i.bwEstimate=this.bwEstimator.getEstimate(),e.bitrateTest?this.bitrateTestDelay=s/1e3:this.bitrateTestDelay=0}},d.onError=function(t){switch(t.details){case h.a.FRAG_LOAD_ERROR:case h.a.FRAG_LOAD_TIMEOUT:this.clearTimer()}},d.clearTimer=function(){clearInterval(this.timer),this.timer=null},d.bc=function(t,i,e,s,n,r,h,o,a){for(var l=n;l>=s;l--){var u=a[l];if(u){var d=u.details,p=d?d.totalduration/d.fragments.length:i,f=!!d&&d.live,v=void 0;v=l<=t?h*e:o*e;var g=a[l].realBitrate?Math.max(a[l].realBitrate,a[l].bitrate):a[l].bitrate,m=g*p/v;if(c.b.trace("level/adjustedbw/bitrate/avgDuration/maxFetchDuration/fetchDuration: "+l+"/"+Math.round(v)+"/"+g+"/"+p+"/"+r+"/"+m),v>g&&(!m||f&&!this.bitrateTestDelay||m<r))return l}}return-1},n=s,(r=[{key:"nextAutoLevel",get:function(){var t=this.mc,i=this.bwEstimator;if(!(-1===t||i&&i.canEstimate()))return t;var e=this.nextABRAutoLevel;return-1!==t&&(e=Math.min(t,e)),e},set:function(t){this.mc=t}},{key:"nextABRAutoLevel",get:function(){var t=this.hls,i=t.maxAutoLevel,e=t.levels,s=t.config,n=t.minAutoLevel,r=t.media,h=this.lastLoadedFragLevel,o=this.fragCurrent?this.fragCurrent.duration:0,a=r?r.currentTime:0,l=r&&0!==r.playbackRate?Math.abs(r.playbackRate):1,u=this.bwEstimator?this.bwEstimator.getEstimate():s.abrEwmaDefaultEstimate,d=(H.bufferInfo(r,a,s.maxBufferHole).end-a)/l,p=this.bc(h,o,u,n,i,d,s.abrBandWidthFactor,s.abrBandWidthUpFactor,e);if(p>=0)return p;c.b.trace("rebuffering expected to happen, lets try to find a quality level minimizing the rebuffering");var f=o?Math.min(o,s.maxStarvationDelay):s.maxStarvationDelay,v=s.abrBandWidthFactor,g=s.abrBandWidthUpFactor;if(0===d){var m=this.bitrateTestDelay;m&&(f=(o?Math.min(o,s.maxLoadingDelay):s.maxLoadingDelay)-m,c.b.trace("bitrate test took "+Math.round(1e3*m)+"ms, set first fragment max fetchDuration to "+Math.round(1e3*f)+" ms"),v=g=1)}return p=this.bc(h,o,u,n,i,d+f,v,g,e),Math.max(p,0)}}])&&Mt(n.prototype,r),l&&Mt(n,l),s}(u),Ot=G(),Rt=function(t){var i,e;function s(i){var e;return(e=t.call(this,i,a.a.MEDIA_ATTACHING,a.a.MEDIA_DETACHING,a.a.MANIFEST_PARSED,a.a.BUFFER_RESET,a.a.BUFFER_APPENDING,a.a.BUFFER_CODECS,a.a.BUFFER_EOS,a.a.BUFFER_FLUSHING,a.a.LEVEL_PTS_UPDATED,a.a.LEVEL_UPDATED)||this).wc=null,e.xc=null,e.Sc=10,e._c=null,e.Ac=null,e.Pc=!1,e.kc=!1,e.config=void 0,e.audioTimestampOffset=void 0,e.bufferCodecEventsExpected=0,e.Ic=0,e.media=null,e.mediaSource=null,e.segments=[],e.parent=void 0,e.appending=!1,e.appended=0,e.appendError=0,e.flushBufferCounter=0,e.tracks={},e.pendingTracks={},e.sourceBuffer={},e.flushRange=[],e.Cc=function(){c.b.log("media source opened"),e.hls.trigger(a.a.MEDIA_ATTACHED,{media:e.media});var t=e.mediaSource;t&&t.removeEventListener("sourceopen",e.Cc),e.checkPendingTracks()},e.Mc=function(){c.b.log("media source closed")},e.Ec=function(){c.b.log("media source ended")},e.Oc=function(){if(e.audioTimestampOffset&&e.sourceBuffer.audio){var t=e.sourceBuffer.audio;c.b.warn("change mpeg audio timestamp offset from "+t.timestampOffset+" to "+e.audioTimestampOffset),t.timestampOffset=e.audioTimestampOffset,delete e.audioTimestampOffset}e.Pc&&e.doFlush(),e.kc&&e.checkEos(),e.appending=!1;var i=e.parent,s=e.segments.reduce((function(t,e){return e.parent===i?t+1:t}),0),n={},r=e.sourceBuffer;for(var h in r){var o=r[h];if(!o)throw Error("handling source buffer update end error: source buffer for "+h+" uninitilized and unable to update buffered TimeRanges.");n[h]=o.buffered}e.hls.trigger(a.a.BUFFER_APPENDED,{parent:i,pending:s,timeRanges:n}),e.Pc||e.doAppending(),e.updateMediaElementDuration(),0===s&&e.flushLiveBackBuffer()},e.Rc=function(t){c.b.error("sourceBuffer error:",t),e.hls.trigger(a.a.ERROR,{type:h.b.MEDIA_ERROR,details:h.a.BUFFER_APPENDING_ERROR,fatal:!1})},e.config=i.config,e}e=t,(i=s).prototype=Object.create(e.prototype),i.prototype.constructor=i,i.__proto__=e;var n=s.prototype;return n.destroy=function(){u.prototype.destroy.call(this)},n.onLevelPtsUpdated=function(t){var i=t.type,e=this.tracks.audio;if("audio"===i&&e&&"audio/mpeg"===e.container){var s=this.sourceBuffer.audio;if(!s)throw Error("Level PTS Updated and source buffer for audio uninitalized");if(Math.abs(s.timestampOffset-t.start)>.1){var n=s.updating;try{s.abort()}catch(t){c.b.warn("can not abort audio buffer: "+t)}n?this.audioTimestampOffset=t.start:(c.b.warn("change mpeg audio timestamp offset from "+s.timestampOffset+" to "+t.start),s.timestampOffset=t.start)}}},n.onManifestParsed=function(t){this.bufferCodecEventsExpected=this.Ic=t.altAudio?2:1,c.b.log(this.bufferCodecEventsExpected+" bufferCodec event(s) expected")},n.onMediaAttaching=function(t){var i=this.media=t.media;if(i&&Ot){var e=this.mediaSource=new Ot;e.addEventListener("sourceopen",this.Cc),e.addEventListener("sourceended",this.Ec),e.addEventListener("sourceclose",this.Mc),i.src=window.URL.createObjectURL(e),this.Ac=i.src}},n.onMediaDetaching=function(){c.b.log("media source detaching");var t=this.mediaSource;if(t){if("open"===t.readyState)try{t.endOfStream()}catch(t){c.b.warn("onMediaDetaching:"+t.message+" while calling endOfStream")}t.removeEventListener("sourceopen",this.Cc),t.removeEventListener("sourceended",this.Ec),t.removeEventListener("sourceclose",this.Mc),this.media&&(this.Ac&&this.hls.config.cnxRenderWindow.URL.revokeObjectURL(this.Ac),this.media.src===this.Ac?(this.media.removeAttribute("src"),this.media.load()):c.b.warn("media.src was changed by a third party - skip cleanup")),this.mediaSource=null,this.media=null,this.Ac=null,this.bufferCodecEventsExpected=this.Ic,this.pendingTracks={},this.tracks={},this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0}this.hls.trigger(a.a.MEDIA_DETACHED)},n.checkPendingTracks=function(){var t=this.bufferCodecEventsExpected,i=this.pendingTracks,e=Object.keys(i).length;(e&&!t||2===e)&&(this.createSourceBuffers(i),this.pendingTracks={},this.doAppending())},n.onBufferReset=function(){var t=this.sourceBuffer;for(var i in t){var e=t[i];try{e&&(this.mediaSource&&this.mediaSource.removeSourceBuffer(e),e.removeEventListener("updateend",this.Oc),e.removeEventListener("error",this.Rc))}catch(t){}}this.sourceBuffer={},this.flushRange=[],this.segments=[],this.appended=0},n.onBufferCodecs=function(t){var i=this;Object.keys(this.sourceBuffer).length||(Object.keys(t).forEach((function(e){i.pendingTracks[e]=t[e]})),this.bufferCodecEventsExpected=Math.max(this.bufferCodecEventsExpected-1,0),this.mediaSource&&"open"===this.mediaSource.readyState&&this.checkPendingTracks())},n.createSourceBuffers=function(t){var i=this.sourceBuffer,e=this.mediaSource;if(!e)throw Error("createSourceBuffers called when mediaSource was null");for(var s in t)if(!i[s]){var n=t[s];if(!n)throw Error("source buffer exists for track "+s+", however track does not");var r=n.levelCodec||n.codec,o=n.container+";codecs="+r;c.b.log("creating sourceBuffer("+o+")");try{var l=i[s]=e.addSourceBuffer(o);l.addEventListener("updateend",this.Oc),l.addEventListener("error",this.Rc),this.tracks[s]={buffer:l,codec:r,id:n.id,container:n.container,levelCodec:n.levelCodec}}catch(t){c.b.error("error while trying to add sourceBuffer:"+t.message),this.hls.trigger(a.a.ERROR,{type:h.b.MEDIA_ERROR,details:h.a.BUFFER_ADD_CODEC_ERROR,fatal:!1,err:t,mimeType:o})}}this.hls.trigger(a.a.BUFFER_CREATED,{tracks:this.tracks})},n.onBufferAppending=function(t){this.Pc||(this.segments?this.segments.push(t):this.segments=[t],this.doAppending())},n.onBufferEos=function(t){for(var i in this.sourceBuffer)if(!t.type||t.type===i){var e=this.sourceBuffer[i];e&&!e.ended&&(e.ended=!0,c.b.log(i+" sourceBuffer now EOS"))}this.checkEos()},n.checkEos=function(){var t=this.sourceBuffer,i=this.mediaSource;if(i&&"open"===i.readyState){for(var e in t){var s=t[e];if(s){if(!s.ended)return;if(s.updating)return void(this.kc=!0)}}c.b.log("all media data are available, signal endOfStream() to MediaSource and stop loading fragment");try{i.endOfStream()}catch(t){c.b.warn("exception while calling mediaSource.endOfStream()")}this.kc=!1}else this.kc=!1},n.onBufferFlushing=function(t){t.type?this.flushRange.push({start:t.startOffset,end:t.endOffset,type:t.type}):(this.flushRange.push({start:t.startOffset,end:t.endOffset,type:"video"}),this.flushRange.push({start:t.startOffset,end:t.endOffset,type:"audio"})),this.flushBufferCounter=0,this.doFlush()},n.flushLiveBackBuffer=function(){if(this._c){var t=this.config.liveBackBufferLength;if(isFinite(t)&&!(t<0))if(this.media)for(var i=this.media.currentTime,e=this.sourceBuffer,s=Object.keys(e),n=i-Math.max(t,this.Sc),r=s.length-1;r>=0;r--){var h=s[r],o=e[h];if(o){var l=o.buffered;l.length>0&&n>l.start(0)&&this.removeBufferRange(h,o,0,n)&&this.hls.trigger(a.a.LIVE_BACK_BUFFER_REACHED,{bufferEnd:n})}}else c.b.error("flushLiveBackBuffer called without attaching media")}},n.onLevelUpdated=function(t){var i=t.details;i.fragments.length>0&&(this.xc=i.totalduration+i.fragments[0].start,this.Sc=i.averagetargetduration||i.targetduration||10,this._c=i.live,this.updateMediaElementDuration())},n.updateMediaElementDuration=function(){var t,i=this.config;if(null!==this.xc&&this.media&&this.mediaSource&&this.sourceBuffer&&0!==this.media.readyState&&"open"===this.mediaSource.readyState){for(var e in this.sourceBuffer){var s=this.sourceBuffer[e];if(s&&!0===s.updating)return}t=this.media.duration,null===this.wc&&(this.wc=this.mediaSource.duration),!0===this._c&&!0===i.liveDurationInfinity?(c.b.log("Media Source duration is set to Infinity"),this.wc=this.mediaSource.duration=1/0):(this.xc>this.wc&&this.xc>t||!Object(o.a)(t))&&(c.b.log("Updating Media Source duration to "+this.xc.toFixed(3)),this.wc=this.mediaSource.duration=this.xc)}},n.doFlush=function(){for(;this.flushRange.length;){var t=this.flushRange[0];if(!this.flushBuffer(t.start,t.end,t.type))return void(this.Pc=!0);this.flushRange.shift(),this.flushBufferCounter=0}if(0===this.flushRange.length){this.Pc=!1;var i=0,e=this.sourceBuffer;try{for(var s in e){var n=e[s];n&&(i+=n.buffered.length)}}catch(t){c.b.error("error while accessing sourceBuffer.buffered")}this.appended=i,this.hls.trigger(a.a.BUFFER_FLUSHED)}},n.doAppending=function(){var t=this.config,i=this.hls,e=this.segments,s=this.sourceBuffer;if(Object.keys(s).length){if(!this.media||this.media.error)return this.segments=[],void c.b.error("trying to append although a media error occured, flush segment and abort");if(!this.appending){var n=e.shift();if(n)try{var r=s[n.type];if(!r)return void this.Oc();if(r.updating)return void e.unshift(n);r.ended=!1,this.parent=n.parent,r.appendBuffer(n.data),this.appendError=0,this.appended++,this.appending=!0}catch(s){c.b.error("error while trying to append buffer:"+s.message),e.unshift(n);var o={type:h.b.MEDIA_ERROR,parent:n.parent,details:"",fatal:!1};22===s.code?(this.segments=[],o.details=h.a.BUFFER_FULL_ERROR):(this.appendError++,o.details=h.a.BUFFER_APPEND_ERROR,this.appendError>t.appendErrorMaxRetry&&(c.b.log("fail "+t.appendErrorMaxRetry+" times to append segment in sourceBuffer"),this.segments=[],o.fatal=!0)),i.trigger(a.a.ERROR,o)}}}},n.flushBuffer=function(t,i,e){var s=this.sourceBuffer;if(!Object.keys(s).length)return!0;var n="null";if(this.media&&(n=this.media.currentTime.toFixed(3)),c.b.log("flushBuffer,pos/start/end: "+n+"/"+t+"/"+i),this.flushBufferCounter>=this.appended)return c.b.warn("abort flushing too many retries"),!0;var r=s[e];if(r){if(r.ended=!1,r.updating)return c.b.warn("cannot flush, sb updating in progress"),!1;if(this.removeBufferRange(e,r,t,i))return this.flushBufferCounter++,!1}return c.b.log("buffer flushed"),!0},n.removeBufferRange=function(t,i,e,s){try{for(var n=0;n<i.buffered.length;n++){var r=i.buffered.start(n),h=i.buffered.end(n),o=Math.max(r,e),a=Math.min(h,s);if(Math.min(a,h)-o>.5){var l="null";return this.media&&(l=this.media.currentTime.toString()),c.b.log("sb remove "+t+" ["+o+","+a+"], of ["+r+","+h+"], pos:"+l),i.remove(o,a),!0}}}catch(t){c.b.warn("removeBufferRange failed",t)}return!1},s}(u);function Bt(t,i){for(var e=0;e<i.length;e++){var s=i[e];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}var Dt,jt=function(t){var i,e;function s(i){var e;return(e=t.call(this,i,a.a.FPS_DROP_LEVEL_CAPPING,a.a.MEDIA_ATTACHING,a.a.MANIFEST_PARSED,a.a.BUFFER_CODECS,a.a.MEDIA_DETACHING)||this).autoLevelCapping=Number.POSITIVE_INFINITY,e.firstLevel=null,e.levels=[],e.media=null,e.restrictedLevels=[],e.timer=null,e}e=t,(i=s).prototype=Object.create(e.prototype),i.prototype.constructor=i,i.__proto__=e;var n,r,h,o=s.prototype;return o.destroy=function(){this.hls.config.capLevelToPlayerSize&&(this.media=null,this.stopCapping())},o.onFpsDropLevelCapping=function(t){s.isLevelAllowed(t.droppedLevel,this.restrictedLevels)&&this.restrictedLevels.push(t.droppedLevel)},o.onMediaAttaching=function(t){this.media=t.media instanceof this.hls.config.cnxRenderWindow.HTMLVideoElement?t.media:null},o.onManifestParsed=function(t){var i=this.hls;this.restrictedLevels=[],this.levels=t.levels,this.firstLevel=t.firstLevel,i.config.capLevelToPlayerSize&&t.video&&this.startCapping()},o.onBufferCodecs=function(t){this.hls.config.capLevelToPlayerSize&&t.video&&this.startCapping()},o.onLevelsUpdated=function(t){this.levels=t.levels},o.onMediaDetaching=function(){this.stopCapping()},o.detectPlayerSize=function(){if(this.media){var t=this.levels?this.levels.length:0;if(t){var i=this.hls;i.autoLevelCapping=this.getMaxLevel(t-1),i.autoLevelCapping>this.autoLevelCapping&&i.streamController.nextLevelSwitch(),this.autoLevelCapping=i.autoLevelCapping}}},o.getMaxLevel=function(t){var i=this;if(!this.levels)return-1;var e=this.levels.filter((function(e,n){return s.isLevelAllowed(n,i.restrictedLevels)&&n<=t}));return s.getMaxLevelByMediaSize(e,this.mediaWidth,this.mediaHeight)},o.startCapping=function(){this.timer||(this.autoLevelCapping=Number.POSITIVE_INFINITY,this.hls.firstLevel=this.getMaxLevel(this.firstLevel),clearInterval(this.timer),this.timer=setInterval(this.detectPlayerSize.bind(this),1e3),this.detectPlayerSize())},o.stopCapping=function(){this.restrictedLevels=[],this.firstLevel=null,this.autoLevelCapping=Number.POSITIVE_INFINITY,this.timer&&(this.timer=clearInterval(this.timer),this.timer=null)},s.isLevelAllowed=function(t,i){return void 0===i&&(i=[]),-1===i.indexOf(t)},s.getMaxLevelByMediaSize=function(t,i,e){if(!t||t&&!t.length)return-1;for(var s,n,r=t.length-1,h=0;h<t.length;h+=1){var o=t[h];if((o.width>=i||o.height>=e)&&(s=o,!(n=t[h+1])||s.width!==n.width||s.height!==n.height)){r=h;break}}return r},n=s,h=[{key:"contentScaleFactor",get:function(){return 1}}],(r=[{key:"mediaWidth",get:function(){var t,i=this.media;return i&&(t=i.width||i.clientWidth||i.offsetWidth,t*=s.contentScaleFactor),t}},{key:"mediaHeight",get:function(){var t,i=this.media;return i&&(t=i.height||i.clientHeight||i.offsetHeight,t*=s.contentScaleFactor),t}}])&&Bt(n.prototype,r),h&&Bt(n,h),s}(u),Ft=window.performance,$t=function(t){var i,e;function s(i){return t.call(this,i,a.a.MEDIA_ATTACHING)||this}e=t,(i=s).prototype=Object.create(e.prototype),i.prototype.constructor=i,i.__proto__=e;var n=s.prototype;return n.destroy=function(){this.timer&&clearInterval(this.timer),this.isVideoPlaybackQualityAvailable=!1},n.onMediaAttaching=function(t){var i=this.hls.config;i.capLevelOnFPSDrop&&("function"==typeof(this.video=t.media instanceof this.hls.config.cnxRenderWindow.HTMLVideoElement?t.media:null).getVideoPlaybackQuality&&(this.isVideoPlaybackQualityAvailable=!0),clearInterval(this.timer),this.timer=setInterval(this.checkFPSInterval.bind(this),i.fpsDroppedMonitoringPeriod))},n.checkFPS=function(t,i,e){var s=Ft.now();if(i){if(this.lastTime){var n=s-this.lastTime,r=e-this.lastDroppedFrames,h=i-this.lastDecodedFrames,o=1e3*r/n,l=this.hls;if(l.trigger(a.a.FPS_DROP,{currentDropped:r,currentDecoded:h,totalDroppedFrames:e}),o>0&&r>l.config.fpsDroppedMonitoringThreshold*h){var u=l.currentLevel;c.b.warn("drop FPS ratio greater than max allowed value for currentLevel: "+u),u>0&&(-1===l.autoLevelCapping||l.autoLevelCapping>=u)&&(u-=1,l.trigger(a.a.FPS_DROP_LEVEL_CAPPING,{level:u,droppedLevel:l.currentLevel}),l.autoLevelCapping=u,l.streamController.nextLevelSwitch())}}this.lastTime=s,this.lastDroppedFrames=e,this.lastDecodedFrames=i}},n.checkFPSInterval=function(){var t=this.video;if(t)if(this.isVideoPlaybackQualityAvailable){var i=t.getVideoPlaybackQuality();this.checkFPS(t,i.totalVideoFrames,i.droppedVideoFrames)}else this.checkFPS(t,t.webkitDecodedFrameCount,t.webkitDroppedFrameCount)},s}(u),Vt=window,Ut=Vt.performance,Nt=Vt.XMLHttpRequest,Ht=function(){function t(t){t&&t.xhrSetup&&(this.xhrSetup=t.xhrSetup)}var i=t.prototype;return i.destroy=function(){this.abort(),this.loader=null},i.abort=function(){var t=this.loader;t&&4!==t.readyState&&(this.stats.aborted=!0,t.abort()),window.clearTimeout(this.requestTimeout),this.requestTimeout=null,window.clearTimeout(this.retryTimeout),this.retryTimeout=null},i.load=function(t,i,e){this.context=t,this.config=i,this.callbacks=e,this.stats={trequest:Ut.now(),retry:0},this.retryDelay=i.retryDelay,this.loadInternal()},i.loadInternal=function(){var t,i=this.context;t=this.loader=new Nt;var e=this.stats;e.tfirst=0,e.loaded=0;var s=this.xhrSetup;try{if(s)try{s(t,i.url)}catch(e){t.open("GET",i.url,!0),s(t,i.url)}t.readyState||t.open("GET",i.url,!0)}catch(e){return void this.callbacks.onError({code:t.status,text:e.message},i,t)}i.rangeEnd&&t.setRequestHeader("Range","bytes="+i.rangeStart+"-"+(i.rangeEnd-1)),t.onreadystatechange=this.readystatechange.bind(this),t.onprogress=this.loadprogress.bind(this),t.responseType=i.responseType,this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),this.config.timeout),t.send()},i.readystatechange=function(t){var i=t.currentTarget,e=i.readyState,s=this.stats,n=this.context,r=this.config;if(!s.aborted&&e>=2)if(window.clearTimeout(this.requestTimeout),0===s.tfirst&&(s.tfirst=Math.max(Ut.now(),s.trequest)),4===e){var h=i.status;if(h>=200&&h<300){var o,a;s.tload=Math.max(s.tfirst,Ut.now()),a="arraybuffer"===n.responseType?(o=i.response).byteLength:(o=i.responseText).length,s.loaded=s.total=a;var l={url:i.responseURL,data:o};this.callbacks.onSuccess(l,s,n,i)}else s.retry>=r.maxRetry||h>=400&&h<499?(c.b.error(h+" while loading "+n.url),this.callbacks.onError({code:h,text:i.statusText},n,i)):(c.b.warn(h+" while loading "+n.url+", retrying in "+this.retryDelay+"..."),this.destroy(),this.retryTimeout=window.setTimeout(this.loadInternal.bind(this),this.retryDelay),this.retryDelay=Math.min(2*this.retryDelay,r.maxRetryDelay),s.retry++)}else this.requestTimeout=window.setTimeout(this.loadtimeout.bind(this),r.timeout)},i.loadtimeout=function(){c.b.warn("timeout while loading "+this.context.url),this.callbacks.onTimeout(this.stats,this.context,null)},i.loadprogress=function(t){var i=t.currentTarget,e=this.stats;e.loaded=t.loaded,t.lengthComputable&&(e.total=t.total);var s=this.callbacks.onProgress;s&&s(e,this.context,null,i)},t}();e(7),function(t){t.WIDEVINE="com.widevine.alpha",t.PLAYREADY="com.microsoft.playready"}(Dt||(Dt={}));var zt=function(){var t=window.cnxRenderWindow;return void 0!==t&&t.navigator&&t.navigator.requestMediaKeySystemAccess?t.navigator.requestMediaKeySystemAccess.bind(t.navigator):null}();function qt(t,i,e){return i in t?Object.defineProperty(t,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[i]=e,t}var Wt=function(t){for(var i=1;i<arguments.length;i++){var e=null!=arguments[i]?arguments[i]:{},s=Object.keys(e);"function"==typeof Object.getOwnPropertySymbols&&(s=s.concat(Object.getOwnPropertySymbols(e).filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})))),s.forEach((function(i){qt(t,i,e[i])}))}return t}({cnxRenderWindow:window,autoStartLoad:!0,startPosition:-1,defaultAudioCodec:void 0,debug:!1,capLevelOnFPSDrop:!1,capLevelToPlayerSize:!1,initialLiveManifestSize:1,maxBufferLength:30,maxBufferSize:6e7,maxBufferHole:.5,lowBufferWatchdogPeriod:.5,highBufferWatchdogPeriod:3,nudgeOffset:.1,nudgeMaxRetry:3,maxFragLookUpTolerance:.25,liveSyncDurationCount:3,liveMaxLatencyDurationCount:1/0,liveSyncDuration:void 0,liveMaxLatencyDuration:void 0,liveDurationInfinity:!1,liveBackBufferLength:1/0,maxMaxBufferLength:600,enableWorker:!0,enableSoftwareAES:!0,manifestLoadingTimeOut:1e4,manifestLoadingMaxRetry:1,manifestLoadingRetryDelay:1e3,manifestLoadingMaxRetryTimeout:64e3,startLevel:void 0,levelLoadingTimeOut:1e4,levelLoadingMaxRetry:4,levelLoadingRetryDelay:1e3,levelLoadingMaxRetryTimeout:64e3,fragLoadingTimeOut:2e4,fragLoadingMaxRetry:6,fragLoadingRetryDelay:1e3,fragLoadingMaxRetryTimeout:64e3,startFragPrefetch:!1,fpsDroppedMonitoringPeriod:5e3,fpsDroppedMonitoringThreshold:.2,appendErrorMaxRetry:3,loader:Ht,fLoader:void 0,pLoader:void 0,xhrSetup:void 0,licenseXhrSetup:void 0,abrController:Lt,bufferController:Rt,capLevelController:jt,fpsController:$t,stretchShortVideoTrack:!1,maxAudioFramesDrift:1,forceKeyFrameOnDiscontinuity:!0,abrEwmaFastLive:3,abrEwmaSlowLive:9,abrEwmaFastVoD:3,abrEwmaSlowVoD:9,abrEwmaDefaultEstimate:5e5,abrBandWidthFactor:.95,abrBandWidthUpFactor:.7,abrMaxWithRealBitrate:!1,maxStarvationDelay:4,maxLoadingDelay:4,minAutoBitrate:0,emeEnabled:!1,widevineLicenseUrl:void 0,requestMediaKeySystemAccessFunc:zt},{},{subtitleStreamController:void 0,subtitleTrackController:void 0,timelineController:void 0,audioStreamController:void 0,audioTrackController:void 0,emeController:void 0});function Gt(t,i,e){return i in t?Object.defineProperty(t,i,{value:e,enumerable:!0,configurable:!0,writable:!0}):t[i]=e,t}function Jt(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}function Qt(t,i){for(var e=0;e<i.length;e++){var s=i[e];s.enumerable=s.enumerable||!1,s.configurable=!0,"value"in s&&(s.writable=!0),Object.defineProperty(t,s.key,s)}}function Xt(t,i,e){return i&&Qt(t.prototype,i),e&&Qt(t,e),t}e.d(i,"default",(function(){return Yt}));var Yt=function(t){var i,e;function s(i){var e;void 0===i&&(i={}),(e=t.call(this)||this).config=void 0,e.Bc=void 0,e.abrController=void 0,e.capLevelController=void 0,e.levelController=void 0,e.streamController=void 0,e.networkControllers=void 0,e.audioTrackController=void 0,e.subtitleTrackController=void 0,e.emeController=void 0,e.coreComponents=void 0,e.media=null,e.url=null;var n=s.DefaultConfig;if((i.liveSyncDurationCount||i.liveMaxLatencyDurationCount)&&(i.liveSyncDuration||i.liveMaxLatencyDuration))throw new Error("Illegal hls.js config: don't mix up liveSyncDurationCount/liveMaxLatencyDurationCount and liveSyncDuration/liveMaxLatencyDuration");e.config=function(t){for(var i=1;i<arguments.length;i++){var e=null!=arguments[i]?arguments[i]:{},s=Object.keys(e);"function"==typeof Object.getOwnPropertySymbols&&(s=s.concat(Object.getOwnPropertySymbols(e).filter((function(t){return Object.getOwnPropertyDescriptor(e,t).enumerable})))),s.forEach((function(i){Gt(t,i,e[i])}))}return t}({},n,i),window.cnxRenderWindow=e.config.cnxRenderWindow;var r=Jt(e).config;if(void 0!==r.liveMaxLatencyDurationCount&&r.liveMaxLatencyDurationCount<=r.liveSyncDurationCount)throw new Error('Illegal hls.js config: "liveMaxLatencyDurationCount" must be gt "liveSyncDurationCount"');if(void 0!==r.liveMaxLatencyDuration&&(void 0===r.liveSyncDuration||r.liveMaxLatencyDuration<=r.liveSyncDuration))throw new Error('Illegal hls.js config: "liveMaxLatencyDuration" must be gt "liveSyncDuration"');Object(c.a)(r.debug),e.Bc=-1;var h=e.abrController=new r.abrController(Jt(e)),o=new r.bufferController(Jt(e)),a=e.capLevelController=new r.capLevelController(Jt(e)),l=new r.fpsController(Jt(e)),u=new R(Jt(e)),d=new B(Jt(e)),p=new D(Jt(e)),f=new It(Jt(e)),v=e.levelController=new At(Jt(e)),g=new U(Jt(e)),m=[v,e.streamController=new xt(Jt(e),g)],y=r.audioStreamController;y&&m.push(new y(Jt(e),g)),e.networkControllers=m;var b=[u,d,p,h,o,a,l,f,g];if(y=r.audioTrackController){var w=new y(Jt(e));e.audioTrackController=w,b.push(w)}if(y=r.subtitleTrackController){var x=new y(Jt(e));e.subtitleTrackController=x,m.push(x)}if(y=r.emeController){var S=new y(Jt(e));e.emeController=S,b.push(S)}return(y=r.subtitleStreamController)&&m.push(new y(Jt(e),g)),(y=r.timelineController)&&b.push(new y(Jt(e))),e.coreComponents=b,e}e=t,(i=s).prototype=Object.create(e.prototype),i.prototype.constructor=i,i.__proto__=e,s.isSupported=function(){return function(){var t=G();if(!t)return!1;var i=self.SourceBuffer||self.WebKitSourceBuffer,e=t&&"function"==typeof t.isTypeSupported&&t.isTypeSupported('video/mp4; codecs="avc1.42E01E,mp4a.40.2"'),s=!i||i.prototype&&"function"==typeof i.prototype.appendBuffer&&"function"==typeof i.prototype.remove;return!!e&&!!s}()},Xt(s,null,[{key:"version",get:function(){}},{key:"Events",get:function(){return a.a}},{key:"ErrorTypes",get:function(){return h.b}},{key:"ErrorDetails",get:function(){return h.a}},{key:"DefaultConfig",get:function(){return s.defaultConfig?s.defaultConfig:Wt},set:function(t){s.defaultConfig=t}}]);var n=s.prototype;return n.destroy=function(){c.b.log("destroy"),this.trigger(a.a.DESTROYING),this.detachMedia(),this.coreComponents.concat(this.networkControllers).forEach((function(t){t.destroy()})),this.url=null,this.removeAllListeners(),this.Bc=-1},n.attachMedia=function(t){c.b.log("attachMedia"),this.media=t,this.trigger(a.a.MEDIA_ATTACHING,{media:t})},n.detachMedia=function(){c.b.log("detachMedia"),this.trigger(a.a.MEDIA_DETACHING),this.media=null},n.loadSource=function(t){t=r.buildAbsoluteURL(this.config.cnxRenderWindow.location.href,t,{alwaysNormalize:!0}),c.b.log("loadSource:"+t),this.url=t,this.trigger(a.a.MANIFEST_LOADING,{url:t})},n.startLoad=function(t){void 0===t&&(t=-1),c.b.log("startLoad("+t+")"),this.networkControllers.forEach((function(i){i.startLoad(t)}))},n.stopLoad=function(){c.b.log("stopLoad"),this.networkControllers.forEach((function(t){t.stopLoad()}))},n.swapAudioCodec=function(){c.b.log("swapAudioCodec"),this.streamController.swapAudioCodec()},n.recoverMediaError=function(){c.b.log("recoverMediaError");var t=this.media;this.detachMedia(),t&&this.attachMedia(t)},Xt(s,[{key:"levels",get:function(){return this.levelController.levels}},{key:"currentLevel",get:function(){return this.streamController.currentLevel},set:function(t){c.b.log("set currentLevel:"+t),this.loadLevel=t,this.streamController.immediateLevelSwitch()}},{key:"nextLevel",get:function(){return this.streamController.nextLevel},set:function(t){c.b.log("set nextLevel:"+t),this.levelController.manualLevel=t,this.streamController.nextLevelSwitch()}},{key:"loadLevel",get:function(){return this.levelController.level},set:function(t){c.b.log("set loadLevel:"+t),this.levelController.manualLevel=t}},{key:"nextLoadLevel",get:function(){return this.levelController.nextLoadLevel},set:function(t){this.levelController.nextLoadLevel=t}},{key:"firstLevel",get:function(){return Math.max(this.levelController.firstLevel,this.minAutoLevel)},set:function(t){c.b.log("set firstLevel:"+t),this.levelController.firstLevel=t}},{key:"startLevel",get:function(){return this.levelController.startLevel},set:function(t){c.b.log("set startLevel:"+t),-1!==t&&(t=Math.max(t,this.minAutoLevel)),this.levelController.startLevel=t}},{key:"capLevelToPlayerSize",set:function(t){var i=!!t;i!==this.config.capLevelToPlayerSize&&(i?this.capLevelController.startCapping():(this.capLevelController.stopCapping(),this.autoLevelCapping=-1,this.streamController.nextLevelSwitch()),this.config.capLevelToPlayerSize=i)}},{key:"autoLevelCapping",get:function(){return this.Bc},set:function(t){c.b.log("set autoLevelCapping:"+t),this.Bc=t}},{key:"bandwidthEstimate",get:function(){var t=this.abrController.bwEstimator;return t?t.getEstimate():NaN}},{key:"autoLevelEnabled",get:function(){return-1===this.levelController.manualLevel}},{key:"manualLevel",get:function(){return this.levelController.manualLevel}},{key:"minAutoLevel",get:function(){for(var t=this.levels,i=this.config.minAutoBitrate,e=t?t.length:0,s=0;s<e;s++)if((t[s].realBitrate?Math.max(t[s].realBitrate,t[s].bitrate):t[s].bitrate)>i)return s;return 0}},{key:"maxAutoLevel",get:function(){var t=this.levels,i=this.autoLevelCapping;return-1===i&&t&&t.length?t.length-1:i}},{key:"nextAutoLevel",get:function(){return Math.min(Math.max(this.abrController.nextAutoLevel,this.minAutoLevel),this.maxAutoLevel)},set:function(t){this.abrController.nextAutoLevel=Math.max(this.minAutoLevel,t)}},{key:"audioTracks",get:function(){var t=this.audioTrackController;return t?t.audioTracks:[]}},{key:"audioTrack",get:function(){var t=this.audioTrackController;return t?t.audioTrack:-1},set:function(t){var i=this.audioTrackController;i&&(i.audioTrack=t)}},{key:"liveSyncPosition",get:function(){return this.streamController.liveSyncPosition}},{key:"subtitleTracks",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTracks:[]}},{key:"subtitleTrack",get:function(){var t=this.subtitleTrackController;return t?t.subtitleTrack:-1},set:function(t){var i=this.subtitleTrackController;i&&(i.subtitleTrack=t)}},{key:"subtitleDisplay",get:function(){var t=this.subtitleTrackController;return!!t&&t.subtitleDisplay},set:function(t){var i=this.subtitleTrackController;i&&(i.subtitleDisplay=t)}}]),s}(Q);Yt.defaultConfig=void 0}]).default)},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:{Dc:{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:{jc:{oneof:["cachedFloorPrice"]},Dc:{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:{Fc:{oneof:["floorPriceFactor"]},$c:{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:{Dc:{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:{Vc:{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}}},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}}},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}},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:{Uc:{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:{Dc:{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}},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)},5648:function(t,i,e){var s,n,r;n=[e(4492)],void 0===(r="function"==typeof(s=function(t){"use strict";return(t.roots.playspace||(t.roots.playspace=new t.Root)).addJSON({ProtoPlayspaceVideoSlideRendition:{fields:{width:{type:"int32",id:1},height:{type:"int32",id:2},videoUrl:{type:"string",id:3},codec:{type:"ProtoPlayspaceCodecEnum",id:4}}},ProtoPlayspaceVideoSettings:{fields:{renditions:{rule:"repeated",type:"ProtoPlayspaceVideoSlideRendition",id:1}}},ProtoSlideCapabilityMetadata:{fields:{label:{type:"string",id:1}}},ProtoPlayspaceSlideCapability:{fields:{type:{type:"ProtoPlayspaceSlideCapabilitiesEnum",id:1},metadata:{type:"ProtoSlideCapabilityMetadata",id:2}}},ProtoFallbackStoryResponse:{fields:{storyId:{type:"string",id:1},activeVersionId:{type:"string",id:2}}},ProtoPlayspaceMediaMetadataResponse:{fields:{slides:{rule:"repeated",type:"ProtoPlayspaceSlideMetadata",id:1},storyTitle:{type:"string",id:2}}},ProtoPlayspaceSlideMetadata:{fields:{mediaType:{type:"ProtoMediaTypeEnum",id:1},title:{type:"string",id:2},clickUrl:{type:"string",id:3},imageUrl:{type:"string",id:4},slideDuration:{type:"int32",id:5},videoRendition:{type:"ProtoPlayspaceVideoSettings",id:6},type:{type:"ProtoPlayspaceSlideTypeEnum",id:7},coverMetadata:{type:"ProtoPlayspaceCoverMetadata",id:8},descriptionMetadata:{type:"ProtoPlayspaceDescriptionMetadata",id:9},bulletListMetadata:{type:"ProtoPlayspaceBulletListMetadata",id:10},quoteMetadata:{type:"ProtoPlayspaceQuoteMetadata",id:12},instagramMetadata:{type:"ProtoPlayspaceInstagramMetadata",id:16},capabilityList:{rule:"repeated",type:"ProtoPlayspaceSlideCapability",id:13},portraitImageUrl:{type:"string",id:14},mediaContext:{type:"ProtoMediaContextEnum",id:15},altText:{type:"string",id:17}}},ProtoPlayspaceCoverMetadata:{fields:{title:{type:"string",id:1},subtitle:{type:"string",id:2}}},ProtoPlayspaceDescriptionChunk:{fields:{text:{type:"string",id:1},colorScheme:{type:"ProtoPlayspaceColorSchemeEnum",id:2}}},ProtoPlayspaceDescriptionMetadata:{fields:{chunkList:{rule:"repeated",type:"ProtoPlayspaceDescriptionChunk",id:1},label:{type:"ProtoPlayspaceDescriptionChunk",id:2}}},ProtoBulletOptions:{fields:{title:{type:"string",id:1},description:{type:"string",id:2}}},ProtoPlayspaceBulletListMetadata:{fields:{title:{type:"string",id:1},items:{rule:"repeated",type:"ProtoBulletOptions",id:2}}},ProtoPlayspaceQuoteMetadata:{fields:{text:{type:"string",id:1},source:{type:"string",id:2}}},ProtoPlayspaceInstagramMetadata:{fields:{handle:{type:"string",id:1},createdDate:{type:"string",id:2},likes:{type:"string",id:3},comments:{type:"string",id:4}}},ProtoPlayspaceColorPrimary:{fields:{background:{type:"string",id:1,options:{default:"#F1F1F1"}},foreground:{type:"string",id:2,options:{default:"#000000"}}}},ProtoPlayspaceColorSecondary:{fields:{background:{type:"string",id:1,options:{default:"#000000 "}},foreground:{type:"string",id:2,options:{default:"#F1F1F1"}}}},ProtoPlayspaceColorAccent:{fields:{background:{type:"string",id:1},foreground:{type:"string",id:2}}},ProtoPlayspaceRequest:{fields:{tokens:{rule:"repeated",type:"string",id:1},pageUrl:{type:"string",id:3},userId:{type:"string",id:5},forcePlayerId:{type:"string",id:7},forceStoryId:{type:"string",id:8},version:{type:"int32",id:9},clientAb0:{type:"int32",id:10},clientAb1:{type:"int32",id:11},forceLineItemIds:{rule:"repeated",type:"string",id:12},customParam1:{type:"string",id:14},customParam2:{type:"string",id:15},customParam3:{type:"string",id:16},forceExploration:{type:"bool",id:17},es6:{type:"bool",id:18},bundleId:{type:"string",id:19},parseDomain:{type:"bool",id:20},implementationType:{type:"ProtoImplementationType",id:21},queryJsTargeting:{keyType:"string",type:"string",id:22},isConsentConnatix:{type:"bool",id:23,options:{default:!0}},reloadedPlayers:{keyType:"string",type:"string",id:25},disableTracking:{type:"bool",id:27},referrer:{type:"string",id:28},customParam4:{type:"string",id:29},customParam5:{type:"string",id:30}}},ProtoPlayspace:{fields:{playerId:{type:"string",id:1},playbackMode:{type:"ProtoPlayerPlaybackModeEnum",id:2},soundMode:{type:"ProtoPlayerSoundMode",id:3},endOfCycleMode:{type:"ProtoEndOfSlideCycleMode",id:4},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}},slidesBetweenAds:{type:"int32",id:14},minSlidesBeforeFirstAd:{type:"int32",id:15},adViewabilityPolicy:{type:"ProtoAdViewabilityPolicy",id:16},casting:{type:"bool",id:18},sharingDestinations:{rule:"repeated",type:"ProtoSharingDestination",id:19,options:{packed:!1}},expandButton:{type:"bool",id:20},closeButtonMode:{type:"ProtoPlayerCloseButtonMode",id:21},floatingMode:{type:"ProtoPlayerFloatingMode",id:22},floatingDeviceMode:{rule:"repeated",type:"ProtoDeviceType",id:23,options:{packed:!1}},floatingCloseButtonMode:{type:"ProtoPlayerCloseButtonMode",id:24},floatingFixedPosition:{type:"ProtoFloatingFixedPositionMode",id:25},floatingPageElement:{type:"string",id:26},floatingUseElementWidth:{type:"bool",id:27},floatingScrollPosition:{type:"ProtoPositionMode",id:28},floatingGutterX:{type:"int32",id:29},floatingGutterY:{type:"int32",id:30},floatingWidth:{type:"int32",id:31},html:{type:"string",id:35},lineItems:{rule:"repeated",type:"ProtoLineItem",id:37},adPlaybackMode:{type:"ProtoAdPlaybackMode",id:38},css:{type:"string",id:39},sessionId:{type:"string",id:40},orientation:{type:"ProtoPlayerOrientationEnum",id:41},orientationBreakpoint:{type:"int32",id:42},activeVersion:{type:"string",id:43},storyId:{type:"string",id:44},floatingAppendLocation:{type:"ProtoFloatingAppendLocationEnum",id:50},floatingYAxisPadding:{type:"int32",id:51},contentTitleTextColor:{type:"string",id:57},useAccentColorForProgressBar:{type:"bool",id:58},primaryColorList:{type:"ProtoPlayspaceColorPrimary",id:59},secondaryColorList:{type:"ProtoPlayspaceColorSecondary",id:60},accentColorList:{type:"ProtoPlayspaceColorAccent",id:61},customJsCode:{type:"string",id:62},initializationSettingsJson:{type:"string",id:63},publisherName:{type:"string",id:64},skipAdAfter:{type:"int32",id:66,options:{default:5}},adBreaks:{rule:"repeated",type:"ProtoAdBreak",id:67},amazonTamSlotId:{type:"string",id:68},limitClientSideApiUse:{type:"bool",id:69},abTestId:{type:"string",id:70},skipMin:{type:"int32",id:71,options:{default:31}},skippability:{type:"ProtoPlayerSkippabilityType",id:72},logoResource:{type:"string",id:73},activeVersionHasInsights:{type:"bool",id:74},bandwidthLoggingState:{type:"ProtoBandwidthLoggingEnum",id:76}}},ProtoPlayspaceResponse:{fields:{errorMessage:{type:"string",id:1},players:{rule:"repeated",type:"ProtoPlayspace",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}}},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}}},CreativeTrackerViewModel:{fields:{type:{type:"ProtoTrackerType",id:1},trigger:{type:"ProtoTrackerTriggerType",id:2},url:{type:"string",id:3}}},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:{Dc:{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}}}},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}}}},ProtoPlayspaceCodecEnum:{values:{h264:0,hevc:1}},ProtoPlayerOrientationEnum:{values:{Mixed:0,Portrait:1,Landscape:2}},ProtoEndOfSlideCycleMode:{values:{Loop:0,Stop:1}},ProtoPlayspaceColorSchemeEnum:{values:{Default:0,Accent:1,Primary:2,Secondary:3}},ProtoPlayspaceSlideTypeEnum:{values:{Default:0,Cover:1,Description:2,BulletList:3,Stock:4,Quote:5,Instagram:6}},ProtoPlayspaceSlideCapabilitiesEnum:{values:{VolumeControls:0,PlaybackControls:1,PlaylistControls:2,CtaButton:3,TopStoryTitle:4,TopSlideTitle:5}},ProtoMediaContextEnum:{values:{None:0,Logo:1}},ProtoMediaTypeEnum:{values:{Image:0,Video:1}},ProtoDeviceType:{values:{Desktop:0,Smartphone:1,Tablet:2,GameConsole:3,SmartTV:4,WearableComputer:5,PDA:6,Unrecognized:7}},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}},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}},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}}})})?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'},3475:t=>{"use strict";t.exports='<svg class="cnx-color-icon" xmlns="http://www.w3.org/2000/svg"><g stroke-width="3" viewBox="0 0 32 32"><circle class="cnx-svg-circle-stroke" cx="16" cy="17" r="14"/></g></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>'},9479:t=>{"use strict";t.exports='<svg 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 0 0-1.6 1.6V22h2v-5h5v-2h-5.4zM17 2h-2v5.4A1.58 1.58 0 0 0 16.6 9H22V7h-5V2zM7.4 15A1.58 1.58 0 0 1 9 16.6V22H7v-5H2v-2h5.4zM7 2h2v5.4A1.58 1.58 0 0 1 7.4 9H2V7h5V2z"/></svg>\n'},1954:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11 11"><path style="opacity:0.8598999977111816;fill:#a0a0a0" d="M3.85,11a.58.58,0,0,1-.6-.6V8.8H1.05A1.11,1.11,0,0,1,0,7.7V1.1A1.11,1.11,0,0,1,1.05,0h8.8A1.11,1.11,0,0,1,11,1.1V7.7a1.11,1.11,0,0,1-1.1,1.1H6.45l-2,2a.52.52,0,0,1-.4.2h-.2m.6-3.3V9.4l1.7-1.7H10V1.1H1.15V7.7h3.3M2.25,2.8h6.6V3.9H2.25V2.8m0,2.1h4.9V6H2.25Z"/></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'},3409:t=>{"use strict";t.exports='<svg 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 0 1 4.6 3zM5 14v5h5v2H4.6A1.58 1.58 0 0 1 3 19.4V14h2zM19.4 3A1.58 1.58 0 0 1 21 4.6V10h-2V5h-5V3h5.4zM19 14h2v5.4a1.58 1.58 0 0 1-1.6 1.6H14v-2h5v-5z" fill-rule="evenodd"/></svg>\n'},889:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 20"><path d="M14.2,0A5.8,5.8,0,0,1,20,5.8v8.4A5.8,5.8,0,0,1,14.2,20H5.8A5.8,5.8,0,0,1,0,14.2V5.8A5.8,5.8,0,0,1,5.8,0ZM2,5.6v8.8A3.59,3.59,0,0,0,5.6,18h8.8A3.59,3.59,0,0,0,18,14.4V5.6A3.59,3.59,0,0,0,14.4,2H5.6A3.59,3.59,0,0,0,2,5.6Zm14.5-.8a1.3,1.3,0,1,1-1.3-1.3A1.32,1.32,0,0,1,16.5,4.8ZM15,10a5,5,0,1,1-5-5A5,5,0,0,1,15,10ZM10,7a3,3,0,0,0-3,3,3,3,0,0,0,3,3,3,3,0,0,0,3-3A3,3,0,0,0,10,7Z"/></svg>'},6514:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 11 11"><path d="M5.55,9.4h0C2.85,6.8,1.15,5,1.15,3.3a2,2,0,0,1,1.9-2.1,2.28,2.28,0,0,1,2,1.4h1a2.17,2.17,0,0,1,2-1.4A2,2,0,0,1,10,3.3c0,1.7-1.8,3.4-4.4,6.1ZM8,0a3.34,3.34,0,0,0-2.5,1.2A3.13,3.13,0,0,0,3.05,0a3.09,3.09,0,0,0-3,3.3c0,2.3,1.9,4.1,4.7,6.9l.8.8.8-.8c2.8-2.8,4.7-4.7,4.7-6.9A3.16,3.16,0,0,0,8,0Z" style="fill:#a0a0a0;opacity:0.8598999977111816"/></svg>'},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'},4562:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" class="cnx-color-accent cnx-quote-icon" width="13" height="10" viewBox="0 0 13 10"><path d="M7 6.9C7 6.2 7.1 5.5 7.3 4.7 7.5 4 7.9 3.4 8.4 2.8 8.8 2.2 9.5 1.7 10.2 1.2 11 0.7 11.9 0.3 13 0L13 1.5C11.8 1.9 10.9 2.3 10.4 2.8 9.8 3.4 9.5 4 9.5 4.7 9.5 4.9 9.6 5.1 9.7 5.2 9.9 5.4 10 5.5 10.2 5.7 10.4 5.8 10.6 5.9 10.9 6 11.1 6.1 11.3 6.3 11.5 6.4 11.7 6.6 11.9 6.8 12 7 12.1 7.3 12.2 7.6 12.2 7.9 12.2 8.6 12 9.1 11.5 9.5 11.1 9.8 10.5 10 9.8 10 9.5 10 9.1 9.9 8.8 9.8 8.4 9.7 8.1 9.5 7.8 9.2 7.6 9 7.4 8.6 7.2 8.2 7.1 7.9 7 7.4 7 6.9ZM0 6.9C0 6.2 0.1 5.5 0.3 4.7 0.5 4 0.9 3.4 1.4 2.8 1.8 2.2 2.5 1.7 3.2 1.2 4 0.7 4.9 0.3 6 0L6 1.5C4.8 1.9 3.9 2.3 3.4 2.8 2.8 3.4 2.5 4 2.5 4.7 2.5 4.9 2.6 5.1 2.7 5.2 2.8 5.4 3 5.5 3.2 5.7 3.4 5.8 3.6 5.9 3.9 6 4.1 6.1 4.3 6.3 4.5 6.4 4.7 6.6 4.9 6.8 5 7 5.1 7.3 5.2 7.6 5.2 7.9 5.2 8.6 5 9.1 4.5 9.5 4.1 9.8 3.5 10 2.8 10 2.4 10 2.1 9.9 1.7 9.8 1.4 9.7 1.1 9.5 0.8 9.2 0.6 9 0.4 8.6 0.2 8.2 0.1 7.9 0 7.4 0 6.9Z"/></svg>\n'},4368:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 20 12"><polygon points="0 5 16.17 5 12.59 1.41 14 0 20 6 14 12 12.59 10.59 16.17 7 0 7 0 5"/></svg>'},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'},8757:t=>{"use strict";t.exports='<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 12 12"><path style="opacity:0.8598999977111816;fill:#a0a0a0"d="M6.05,11a5,5,0,0,0,5-5,5,5,0,0,0-5-5,5,5,0,0,0-5,5,5,5,0,0,0,5,5m0-11a5.6,5.6,0,0,1,4.2,1.8A6.37,6.37,0,0,1,12.05,6a6,6,0,0,1-12,0,6,6,0,0,1,6-6m0,3V5.9l3,1.5-.5.6L5.05,6.3V3Z"/></svg>'},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;function n(e){var s=i[e];if(void 0!==s)return s.exports;var r=i[e]={id:e,loaded:!1,exports:{}};return t[e].call(r.exports,r,r.exports,n),r.loaded=!0,r.exports}n.n=t=>{var i=t&&t.R?()=>t.default:()=>t;return n.d(i,{a:i}),i},s=Object.getPrototypeOf?t=>Object.getPrototypeOf(t):t=>t.__proto__,n.t=function(t,i){if(1&i&&(t=this(t)),8&i)return t;if("object"==typeof t&&t){if(4&i&&t.R)return t;if(16&i&&"function"==typeof t.then)return t}var r=Object.create(null);n.r(r);var h={};e=e||[null,s({}),s([]),s(s)];for(var o=2&i&&t;"object"==typeof o&&!~e.indexOf(o);o=s(o))Object.getOwnPropertyNames(o).forEach((i=>h[i]=()=>t[i]));return h.default=()=>t,n.d(r,h),r},n.d=(t,i)=>{for(var e in i)n.o(i,e)&&!n.o(t,e)&&Object.defineProperty(t,e,{enumerable:!0,get:i[e]})},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(t){if("object"==typeof window)return window}}(),n.o=(t,i)=>Object.prototype.hasOwnProperty.call(t,i),n.r=t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"R",{value:!0})},n.nmd=t=>(t.paths=[],t.children||(t.children=[]),t);var r={};(()=>{"use strict";n(8660);var t,i=n(7726),e=n(7272),s=(n(6450),n(289)),r=n(8804),h=n(5880),o=n(782),a=n(3030),c=n(2820);!function(t){t.Deprecation="deprecation",t.Intervention="intervention",t.Crash="crash"}(t||(t={}));class l{constructor(t,i,e){this.Ne=t,this.Nc=i,this.Hc=e,this.qc=!1,this.Wc=()=>{"hidden"===this.Ne.document.visibilityState&&this.Gc()},this.Gc=()=>{if(this.qc||!this.Jc)return;const t=this.Jc.takeRecords();this.Qc(t),this.qc=!0},this.Qc=t=>{t.filter((({body:t})=>"HeavyAdIntervention"===(null==t?void 0:t.id))).forEach((()=>{this.Nc.trackHeavyAdIntervention(this.Hc)}))},this.Xc()&&this.Yo()}destroy(){this.Ne.removeEventListener("pagehide",this.Gc),this.Ne.removeEventListener("visibilitychange",this.Wc)}Xc(){return!!this.Ne.ReportingObserver}Yo(){this.Jc=new this.Ne.ReportingObserver((t=>{this.Qc(t)}),{buffered:!0,types:[t.Intervention]}),this.Jc.observe(),this.Ne.addEventListener("pagehide",this.Gc),this.Ne.addEventListener("visibilitychange",this.Wc)}}var u=n(4280),d=n(497);class p extends h._{constructor(t,i,e,n,r){super(),this.mediator=t,this.playerModel=i,this.app=e,this.Yc=n,this._appSettings=r,this.macroElements={player:[]},this.Kc=!1,this.Zc={description:"{{description}}",title:"{{title}}",player:"{{player}}"},this.tl=null,this.il=500,this.createExperience(i,r),this.el=new l(i.global,this.app.services.TrackingService,{heavyAdBlockTypeEnum:s.ProtoHeavyAdBlockTypeEnum.Global}),this.sl=new l(window,this.app.services.TrackingService,{heavyAdBlockTypeEnum:s.ProtoHeavyAdBlockTypeEnum.Script})}subscribeToEvents(){this.subscribe(o.Uh.Destroy,this.experience,(()=>{this.destroy()})),this.subscribe(o.Uh.CanStart,this.experience,(()=>{this.experience.start()})),this.subscribe(o.Xh.SessionRendered,this.experience,(()=>{this.Yc.wasPlayerReloaded||this.app.services.TrackingService.trackSessionRendered(u._.isBannerBlocked),this.mediator.publish(this,o.Xh.SessionRendered)})),this.subscribe(o.Xh.SessionView,this.experience,(()=>{this.Yc.wasPlayerInView||(this.app.services.TrackingService.trackSessionViewability(),this.mediator.publish(this,o.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}))}de(){this.playerModel.css&&this.app.services.GlobalDomUtilsService.addCssString(this.playerModel.css,`cnx-custom-css-${this.app.config.appId}`)}nl(t){return`<cnx>${t}</cnx>`.replace(/{\{([^}]+)}}/g,"<cnx-span>$&</cnx-span>")}hl(){if(this.experienceContainer=this.ol(),this.playerModel.html){const t=this.app.services.GlobalDomUtilsService.createElementByString(this.nl(this.playerModel.html));this.al(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,a.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)}ol(){const t=this.app.config.isMobile?c.s6.Mobile:c.s6.Desktop;return this.app.services.GlobalDomUtilsService.createElementByString(`<cnx class="${c.sN.MainContainer} ${t} ${this.cl}"></cnx>`)}al(t){(0,a.Sz)(t.children).forEach((t=>{t.children.length>0&&this.al(t),Object.keys(this.Zc).forEach((i=>{const e=this.Zc[i];t.textContent.includes(e)&&this.ll(i,t)}))}))}ll(t,i){this.macroElements[t]||(this.macroElements[t]=[]),this.macroElements[t].push(i),i.textContent=""}ul(){null!==this.tl&&(clearInterval(this.tl),this.tl=null)}init(t){this.de(),this.hl();const e=this.app.config.device;return this.isSupportedBreakpoint(e)?(this.subscribeToEvents(),this.experience.dl(this.playerModel,this.app,this.experienceContainer,t),this.tl=setInterval((()=>{this.Kc?this.ul():this.app.services.GlobalDomUtilsService.isDetachedFromDOM(this.experienceContainer)&&(this.destroy(),(0,i.n)({message:"player_removed_from_DOM",level:i.D.INFO}))}),this.il),!0):(this.destroy(),!1)}getApiMethods(){return this.experienceApi.getApiMethods()}get playerContainer(){return this.experienceContainer}destroy(){try{d.S.playerDestroyed=!0,this.Kc=!0,this.ul(),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.el.destroy(),this.sl.destroy()}catch(t){(0,i.n)({callStack:t.stack,level:i.D.WARN,message:"Renderer_destroy",exception:t.message})}}}var f,v,g=n(9078),m=n(1561);!function(t){t[t.DirectionIn=0]="DirectionIn",t[t.DirectionOut=1]="DirectionOut",t[t.FadeIn=2]="FadeIn"}(f||(f={})),function(t){t.Float="float",t.Embed="embed"}(v||(v={}));const y=.5;class b{constructor(t,i,e,s,n,r=0){this.pl=t,this.Wt=i,this.fl=e,this.vl=s,this.Sr=n,this.gl=r,this.ml=void 0,this.yl=null,this.bl=!1,this.Sl=()=>{if(!this.ml||!this._l)return;const t=this.Al(),i=!!this._l;this.Pl(t,i)},this.kl=()=>{var t;if(this.Il()&&(this.Wt.width=null===(t=this._l)||void 0===t?void 0:t.clientWidth),this.Tl(),this.ml){const t=!1,i=this.Al();this.Pl(i,t)}},this.Tl=()=>{this.Cl()?!this.Ml||this.ml||this.bl?this.El():this.Ll():this.ml&&this.Ol()},this.Rl=t=>{if(this.Bl(t.propertyName))switch(this.transitionState){case f.DirectionIn:this.transitionState=void 0,this.Dl();break;case f.DirectionOut:this.transitionState=void 0,this.jl();break;case f.FadeIn:this.transitionState=void 0,this.Fl()}}}get transitionState(){return this.$l}set transitionState(t){this.$l===f.FadeIn&&this.Vl(c.jG.FadeInBase,c.jG.FadeIn),this.$l=t}Ul(...t){(0,m.cn)(this.fl,...t)}Vl(...t){(0,m.IV)(this.fl,...t)}El(){this.vl!==s.ProtoDeviceType.Smartphone&&(this.fl.style.width=`${this.Wt.width}px`);const t=this.fl.getBoundingClientRect().width;this.fl.style.height=this.Wt.getHeight(t)}Nl(){return(0,a.d3)(this.vl,this.Wt.floatingDeviceMode)}Hl(){this.Sr.addEventListenerOnGlobal("scroll",this.Sl)}zl(){this.Sr.removeEventListenerOnGlobal("scroll",this.Sl)}ql(){this._l=this.Sr.querySelector(this.Wt.pageElement),this._l&&(clearInterval(this.yl),this.Wt.width=this._l.clientWidth,this.Tl(),this.pl.on(this._l,this.kl))}Wl(){var t,i;const e=null===(t=this._l)||void 0===t?void 0:t.getBoundingClientRect().top;return this.Wt.appendLocation===s.ProtoFloatingAppendLocationEnum.Above?e-this.fl.offsetHeight-this.Wt.floatingYAxisPadding:this.Wt.appendLocation===s.ProtoFloatingAppendLocationEnum.Below?e+(null===(i=this._l)||void 0===i?void 0:i.offsetHeight)+this.Wt.floatingYAxisPadding:e}Gl(){this.yl=setInterval((()=>{this.ql()}),500),this.ql()}Il(){return this.Wt.floatingPosition===s.ProtoFloatingFixedPositionMode.Element}Bl(t){switch(this.transitionState){case f.DirectionIn:case f.DirectionOut:if("transform"===t)return!0;break;case f.FadeIn:if("opacity"===t)return!0}return!1}Jl(){this.fl.style.top="",this.fl.style.bottom="",this.fl.style.left="",this.fl.style.right="",this.fl.style.width="",this.fl.style.height="",this.fl.style.transform=""}jl(){this.ml=!1,this.Vl(c._7.MainClass,c._7.TransitionClass),this.Jl(),this.Ql()}Pl({x:t,y:i},e){this.Yl(e);const s=()=>this.fl.style.transform=`translate(${t}px, ${i}px)`;e?(this.Sr.cancelRequestAnimationFrame(this.Kl),this.Kl=null,this.Kl=this.Sr.requestAnimationFrameHelper((()=>{s()}))):s()}Yl(t){t?this.Ul(c._7.TransitionClass):this.Vl(c._7.TransitionClass)}Al(){let t,i;if(this.Il()&&this._l){this.Zl();const e=this.Wt.isPositionedLeft?this.Wt.floatingGutterX:-this.Wt.floatingGutterX;t=this.Sr.getElementCoordinates(this._l).clientX+e;const s=this.Wl();return i=s<this.Wt.floatingGutterY?this.Wt.floatingGutterY:s,{x:t,y:i}}if(this.Wt.isPositionedLeft)t=this.Wt.floatingGutterX;else{t=this.Sr.getViewportWidth()-this.fl.offsetWidth-this.Wt.floatingGutterX}if(this.Wt.isPositionedTop)i=this.Wt.floatingGutterY;else{i=this.Sr.getViewportHeight()-this.fl.offsetHeight-this.Wt.floatingGutterY}return{x:t,y:i}}tu(){const t=(this.Wt.floatingWidth||1e3)+20,i=this.Sr.getViewportWidth();return this.Wt.isPositionedLeft?-t:i+t}Cl(){return(0,m.LT)(this.fl).document.body.getBoundingClientRect().width>=this.gl}Ll(){if(!this.eu())return;this.Il()&&this.Hl(),this.ml=!0,this.transitionState=f.DirectionIn,this.Ul(c._7.MainClass),this.El();const t=this.Al(),i=this.tu();this.su(),this.Pl({x:i,y:t.y},!1),(0,m.Tp)(this.fl);this.Pl(t,!0)}eu(){return!!this.Cl()&&!(this.Il()&&(!this._l||this._l&&0===this._l.clientWidth))}Zl(){this._l&&(this.Sr.getElementCoordinates(this._l).clientX<this.Sr.getBodyDimensions().width/2?(this.Wt.isPositionedLeft=!0,this.Wt.isPositionedRight=!1):(this.Wt.isPositionedLeft=!1,this.Wt.isPositionedRight=!0))}Ol(t=!0){t&&(this.transitionState=f.DirectionOut),this.Il()&&this.zl(),this.nu();const{y:i}=this.Al(),e=this.tu();this.Pl({y:i,x:e},t),t||this.jl()}ru(){this.fl.addEventListener("transitionend",this.Rl),this.pl.on(this.fl,this.Tl),this.pl.on(this.Sr.getGlobalClosestTop().topFrame.document.body,this.kl),this.Il()&&this.Gl()}hu(){this.pl.off(this.fl,this.Tl),this.fl.removeEventListener("transitionend",this.Rl),this.pl.off(this.Sr.getGlobalClosestTop().topFrame.document.body,this.kl),this._l&&(this.pl.off(this._l,this.kl),this.zl(),clearInterval(this.yl))}ou(t){void 0!==t.scrollPosition&&this.Wt.setScrollPosition(t.scrollPosition),(null==t?void 0:t.floatingWidth)&&(this.Wt.width=t.floatingWidth),(null==t?void 0:t.floatingGutterX)&&(this.Wt.gutterX=t.floatingGutterX),(null==t?void 0:t.floatingGutterY)&&(this.Wt.gutterY=t.floatingGutterY)}get isInFloating(){return this.ml}}var w,x=n(6716);class S extends b{constructor(t,i,e,n,r,h,o=0){super(i,n,e,r,h,o),this.au=t,this.cu=!0,this.lu=!0,this.uu=!1,this.Ml=!1,this.du=new x.x,this.pu=new x.x,this.fu=new x.x,this.vu=new x.x,this.gu=t=>{const i=this.au.getIsTabInFocus();t&&this.isInFloating&&(this.Ml=!1,this.Ol()),this.cu&&this.Wt.floatingMode===s.ProtoPlayerFloatingMode.AfterInView&&t&&(this.cu=!1),!t&&!this.cu&&this.lu&&i&&(this.Ml=!0,super.Ll())},this.El=()=>{this.isInFloating&&super.El()}}get onFloatingEnterStart(){return this.du.asObservable()}get onFloatingEnterStop(){return this.pu.asObservable()}get onFloatingExitStart(){return this.fu.asObservable()}get onFloatingExitStop(){return this.vu.asObservable()}isFloatingModeEnabled(){return this.cu&&(this.enabled=!1),this.enabled}enableFloatingMode(){this.cu=!1,this.lu=!0,this.start()}disableFloatingMode(){this.lu=!1,this.destroy()}setFloatingSettings(t){this.ou(t),this.start()}Ol(){const t=!this.uu;super.Ol(t)}nu(){this.fu.next()}Ql(){this.mu()}su(){this.du.next()}mu(){this.transitionState=f.FadeIn,this.Vl(c.jG.FadeIn),this.Ul(c.jG.FadeInBase),(0,m.Tp)(this.fl),this.Ul(c.jG.FadeIn)}Dl(){this.pu.next()}Fl(){this.Vl(c.jG.FadeInBase,c.jG.FadeIn),this.vu.next(),this.bl&&super.hu()}yu(){this.au.on(this.fl.parentElement,this.gu,{threshold:y})}bu(){this.au.off(this.fl.parentElement,this.gu)}start(){this.Nl()&&(super.ru(),this.Wt.floatingMode===s.ProtoPlayerFloatingMode.OnPageLoad&&(this.cu=!1),this.yu(),this.gu(this.au.check({element:this.fl.parentElement,threshold:y})))}canFloat(){return this.Nl()&&this.Wt.floatingMode!==s.ProtoPlayerFloatingMode.Off}destroy(){this.isInFloating?(this.jl(),this.bl=!0):super.hu(),this.bu()}get enabled(){return this.lu}set enabled(t){this.lu=t}fullscreenStateChange(t){this.uu=t,t?this.bu():this.yu(),this.gu(t)}}!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"}(w||(w={}));var _,A,P=n(7427),k=n(5055);class I extends b{constructor(t,i,e,s,n,r=0){super(t,e,i,s,n,r),this.Ml=!0,this.pu=new x.x}get onFloatingEnterStop(){return this.pu.asObservable()}su(){}Dl(){this.pu.next()}nu(){}Ql(){}Fl(){}start(){this.Nl()&&(this.Ul(c._7.AlwaysFloating),super.ru(),super.Ll())}setFloatingSettings(t){this.ou(t),this.start()}}!function(t){t.ShowLinearEvent="showLinearEvent",t.HideLinearEvent="hideLinearEvent",t.PauseLinearEvent="pauseLinearEvent",t.ResumeLinearEvent="resumeLinearEvent",t.SkipLinearEvent="skipLinearEvent"}(_||(_={})),function(t){t.ShowNonLinearEvent="showNonLinearEvent",t.HideNonLinearEvent="hideNonLinearEvent"}(A||(A={}));class T{constructor(t,i,e,s){this.fl=t,this.wu=s,this.xu=this.Su(e,i)}Su(t,i){return Object.assign({},t[i]||t[s.ProtoDeviceType.Smartphone])}updateWidth(t){const i=this._u(t);i!==this.currentBreakpointClass&&((0,m.IV)(this.fl,this.currentBreakpointClass),(0,m.cn)(this.fl,i),this.currentBreakpointClass=i)}_u(t){switch(!0){case t>=this.xu.xxl:return this.wu.Xxl;case t>=this.xu.xl:return this.wu.Xl;case t>=this.xu.lg:return this.wu.Lg;case t>=this.xu.md:return this.wu.Md;case t>=this.xu.sm:return this.wu.Sm;case t>=this.xu.xs:return this.wu.Xs;default:return this.wu.Xxs}}}const C="midRollCapped",M="totalAdBreakDurationExpired",E="enableLinearAds",L="disableLinearAds",O="ForceStopAdSlot",R="ForceStopAdPod",B="linearAdOpportunity",D="AdPodRemainingTime",j="disableNonLinearAds",F="enableNonLinearAds";var $;!function(t){t[t.Portrait=0]="Portrait",t[t.Landscape=1]="Landscape"}($||($={}));const V=$;class U{constructor(t){this.urlSuffixerService=t,this.Au={},this.Pu=[]}getImage(t,i,e,s,n="",r=!1){return this.ku=t,this.Iu=(0,P.QM)(i)?i:"",this.Tu=e,this.Cu=s,this.Mu=n,this.Eu=r,this.Lu()}Lu(){const t=this.Ou();if(t)return t;const i=this.ku+this.Mu,e=new Image;return e.src=this.urlSuffixerService.appendParamsToUrl(i),e.alt=this.Iu,this.Au[this.ku]=this.Au[this.ku]||{},this.Au[this.ku][this.Tu]=this.Au[this.ku][this.Tu]||{},this.Au[this.ku][this.Tu][this.Cu]=this.Au[this.ku][this.Tu][this.Cu]||{},this.Au[this.ku][this.Tu][this.Cu][this.Mu]=e,e}Ou(){const t=this.Ru();if(t)return t;if(!this.Eu)return;this.Bu();const i=this.Du();if(i)return i;const e=this.Fu();return e||void 0}Bu(){const t=[];if(!this.Au[this.ku])return void(this.Pu=[]);const i=this.Au[this.ku],e=this.Tu>this.Cu?V.Landscape:V.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?V.Landscape:V.Portrait)!==e)return;const r={area:n*s,img:this.$u(this.ku,n,s)};t.push(r)}))})),this.Pu=[...t]}$u(t,i,e){if(this.Au[t]&&this.Au[t][i]&&this.Au[t][i][e])return this.Au[t][i][e][Object.keys(this.Au[t][i][e])[0]]}Ru(){return this.Au[this.ku]&&this.Au[this.ku][this.Tu]&&this.Au[this.ku][this.Tu][this.Cu]&&this.Au[this.ku][this.Tu][this.Cu][this.Mu]}Du(){if(0===this.Pu.length)return;const t=this.Tu*this.Cu,i=this.Pu.filter((({area:i})=>i>t)).sort(((t,i)=>t.area-i.area));return 0!==i.length?i[0].img:void 0}Fu(){if(0===this.Pu.length)return;const t=this.Tu*this.Cu,i=this.Pu.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 N,H,z,q,W=n(4959);!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"}(N||(N={})),function(t){t[t.Auto=0]="Auto",t[t.Strict=1]="Strict"}(H||(H={})),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"}(z||(z={})),function(t){t.H264="h264",t.Hevc="hevc"}(q||(q={}));const G="playError",J="newVideo",Q="buffering",X="buffered",Y="levelSwitching",K="endOfStream",Z="VideoQualityChanged",tt="CurrentQuality",it="QualityListLoaded";var et;!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"}(et||(et={}));function st(t,i){const e=t.length-1;return{currentIndex:i,nextIndex:i===e?0:i+1,prevIndex:0===i?e:i-1,firstIndex:0,lastIndex:e}}function nt(t,i){return!(i.skippability===s.ProtoPlayerSkippabilityType.AllowNonSkipAdsIfTheyAreShorterThan&&t<i.skipMin)}var rt,ht=n(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.DEFAULT_MAX_AD_DURATION=180}(rt||(rt={}));class ot{constructor(t){this.Vu=t,this.Uu={breakType:s.ProtoAdBreakTypeEnum.None,currentPodNumber:0,maxAdSlotDuration:0,maxAdPodDuration:0,totalNumberOfAdSlots:0},this.Nu=null}get adBreaks(){return this.Vu}setNewBreak(t){this.Vu.forEach((i=>{i.types.forEach((e=>{(function(t,i){let e=!1;switch(t){case s.ProtoAdBreakTypeEnum.PreRoll:e=i===s.ProtoAdSlotsEnum.PreRoll;break;case s.ProtoAdBreakTypeEnum.MidRoll:e=i===s.ProtoAdSlotsEnum.MidRoll;break;case s.ProtoAdBreakTypeEnum.PostRoll:e=i===s.ProtoAdSlotsEnum.PostRoll}return e})(e,t)&&(this.Uu.currentPodNumber=i.numberOfAdSlots,this.Uu.maxAdSlotDuration=i.maxAdSlotDuration,this.Uu.maxAdPodDuration=i.maxAdPodDuration,this.Uu.totalNumberOfAdSlots=i.numberOfAdSlots)}))}))}adStarted(){this.Hu(),0===this.Uu.currentPodNumber&&(this.Uu.currentPodNumber=this.Uu.totalNumberOfAdSlots),this.Uu.currentPodNumber--}endPod(){this.Hu(),this.Uu.currentPodNumber=0}enterPodTimeout(t){this.Hu(),this.Nu=setTimeout((()=>{this.Hu(),t()}),5e3)}isInAdPod(){return this.Uu.currentPodNumber>0}isCurrentBreakInPod(){return this.Uu.totalNumberOfAdSlots>1}getMaxAdSlotDuration(){return this.Uu.maxAdSlotDuration}getMaxAdPodDuration(){return this.Uu.maxAdPodDuration}getMaxAdSlotPossibleDuration(){let t=0;for(let i=0;i<this.Vu.length;i++){if(0===this.Vu[i].maxAdSlotDuration)return 0;t=Math.max(t,this.Vu[i].maxAdSlotDuration)}return t}getCurrentSlotIndex(){return this.Uu.totalNumberOfAdSlots-this.Uu.currentPodNumber}getNextSlotIndex(){const t=this.getCurrentSlotIndex();return this.Uu.totalNumberOfAdSlots>t?t+1:1}getTotalNumberOfSlots(){return this.Uu.totalNumberOfAdSlots}isInPodTimeout(){return!!this.Nu}getAdBreakState(t){if(!(0,P.$K)(t))return this.zu();const{adSlotDuration:i,adBreakType:e}=t;return{isAdPodBreak:this.isCurrentBreakInPod(),adPodSlotIndex:this.isCurrentBreakInPod()?this.getNextSlotIndex():0,maxAdDuration:Math.round(this.getMaxAdSlotDuration()/ht.s_||rt.DEFAULT_MAX_AD_DURATION),remainingAdDuration:Math.round(i/ht.s_),sessionMaxAdDuration:Math.round(this.getMaxAdSlotPossibleDuration()/ht.s_),adBreakType:e}}zu(){let t=s.ProtoAdBreakTypeEnum.MidRoll;this.adBreaks.forEach((i=>{i.types.some((t=>t===s.ProtoAdBreakTypeEnum.PreRoll))&&(t=s.ProtoAdBreakTypeEnum.PreRoll)}));const i=this.getMaxAdSlotDuration();return this.getAdBreakState({adSlotDuration:i,adBreakType:t})}Hu(){clearTimeout(this.Nu),this.Nu=null}}var at,ct,lt=n(2231),ut=n(8423),dt=n(308),pt=n(6243);!function(t){t[t.None=0]="None",t[t.Portrait=1]="Portrait",t[t.Landscape=2]="Landscape"}(at||(at={})),function(t){t.LINEAR="LINEAR",t.NONLINEAR="NONLINEAR"}(ct||(ct={}));var ft=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 vt=["com.accuweather.android"],gt=.05*ht.s_;class mt extends h._{constructor(t,i,e){super(),this.mediator=t,this._appSettings=i,this.qu=e,this.Wu=.01,this.Gu=.5,this.Ju=2e3,this.Qu=0,this.Xu=!1,this.Yu=!1,this.Ku=!1,this.Zu=!1,this.td=!1,this.sd=!1,this.nd=!1,this.Ns=s.ProtoAdSlotsEnum.PreRoll,this.rd=!1,this.hd=!1,this.od=!1,this.ud=!1,this.dd=[],this.ki=[],this.pd=[],this.fd=0,this.vd=t=>{this.hd=t,t&&(this.app.services.ViewabilityService.off(this.$playerContainer,this.vd),this.gd())},this.yd=t=>{t&&this.adHandler&&!this.ud&&setTimeout((()=>{this.adHandler.resumeWithoutUserInteraction(this.Ns)}),gt)},this.bd=()=>{this.isBelowSmBreakpoint(this.$experienceContainer.clientWidth)||(0,m.IV)(this.$experienceContainer,c.Gj.NoHeight),!this.Yu&&this.wd()&&(this.mediator.publish(this,o.Uh.CanStart),this.app.services.ResizeObserver.off(this.$experienceContainer,this.bd))},this.xd=t=>{const{playback:i,isFullscreenClose:e}=t;this.floatingModule&&(0,P.$K)(i)&&!e&&(this.floatingModule.enabled=i)},this.Sd=()=>{this._d(1)},this.Pd=()=>{this._d(0)},this.Id=t=>{this.xd(t);const{playback:i}=t;(0,P.$K)(i)&&(i?(this.app.services.EventsStorageService.emitAdPlay(),this.ud=!1):(this.app.services.EventsStorageService.emitAdPause(),this.ud=!0))},this.Td=new U(e)}Cd(){}Ed(t,i,e){this.app.services.EventsStorageService.emitAdImpression(t,i,e)}Ld(t){this.app.services.EventsStorageService.emitAdComplete(t)}Od(){}Rd(){}Bd(){}Dd(){}jd(){}Fd(){}$d(){}Vd(t){const i={state:t};this.app.services.EventsStorageService.emitAdStateChange(i)}Ud(){const{clientWidth:t,clientHeight:i}=this.$playerContainer,e={width:t,height:i};this.app.services.EventsStorageService.emitPlayerResized(e)}Nd(){this.app.services.EventsStorageService.emitOnEnterFullscreen()}Hd(){this.app.services.EventsStorageService.emitOnExitFullscreen()}zd(){this.app.services.EventsStorageService.emitOnPlayerCollapsed()}qd(){this.app.services.EventsStorageService.emitOnPlayerExpanded()}Wd(t){this.Gd(t),this.Jd(t),this.Qd(t),this.Ns=t,this.Xd(t)}Jd(t){this.adHandler&&this.adHandler.adStateChange(t,this.Yd.getMaxAdSlotDuration())}Qd(t){this.Kd.onAdStateChange(t,{maxAdPodDuration:this.Yd.getMaxAdPodDuration(),maxAdSlotDuration:this.Yd.getMaxAdSlotDuration()})}Gd(t){this.Yd.setNewBreak(t)}Xd(t){this.Vd(W.V[t])}Zd(){var t;null===(t=this.adHandler)||void 0===t||t.contentChanged(),this.Kd.contentChanged()}ep(){var t;null===(t=this.adHandler)||void 0===t||t.contentEnded()}sp(){var t,i,e,s,n,r;this.adHandler=this.np(),this.rp(),null===(t=this.adHandler)||void 0===t||t.onLinearImpressionPrice.subscribe((t=>{this.mediator.publish(this,k.Km.ImpressionPrice,{payload:t})})),null===(i=this.adHandler)||void 0===i||i.onNonLinearImpressionPrice.subscribe((t=>{this.mediator.publish(this,k.Km.ImpressionPrice,{payload:t})})),null===(e=this.adHandler)||void 0===e||e.onLinearImpressionRevenue.subscribe((t=>{this.mediator.publish(this,k.Km.ImpressionRevenue,{payload:t})})),null===(s=this.adHandler)||void 0===s||s.onNonLinearImpressionRevenue.subscribe((t=>{this.mediator.publish(this,k.Km.ImpressionRevenue,{payload:t})})),null===(n=this.adHandler)||void 0===n||n.onLinearExperienceEvent.subscribe((t=>{o.Uh.UserInteraction===t.type&&this.Id(t.payload)}));const h=()=>{this.app.services.TrackingService.setAdStart(),this.od=!0,this.ud=!1,this.gd(),this.op.unsubscribe()};this.op=null===(r=this.adHandler)||void 0===r?void 0:r.onAdsEnable.subscribe((()=>{h()}))}rp(){this.ap(),this.cp(),this.lp()}ap(){this.pd.push(this.adHandler.onVpaidEvent.subscribe((t=>{switch(t.type){case g.fI.AdImpression:{this.mediator.publish(this,k.Km.AdImpression,t.payload);const{adSourceData:i,customAdData:e,adType:s}=t.payload.payload;this.Ed(i,e,s);break}case g.fI.AdStopped:{if(this.mediator.publish(this,k.Km.AdStopped,t.payload),this.nd&&this.Rd(),!t.payload)return;const{adType:i}=t.payload.payload;this.Ld(i),this.app.services.EventsStorageService.emitAdStopped(i);break}case g.fI.AdError:{const{adType:i}=t.payload;this.mediator.publish(this,k.Km.AdError,t),this.app.services.EventsStorageService.emitAdError(i);break}case g.fI.AdSkipped:{const{adType:i}=t.payload.payload;this.mediator.publish(this,k.Km.AdSkipped,t.payload),this.app.services.EventsStorageService.emitAdSkipped(i),this.Ld(i),this.nd&&this.Rd();break}case g.fI.AdPaused:{const{adType:i}=t.payload.payload;this.app.services.TrackingService.setSessionPlayback(!1),this.app.services.EventsStorageService.emitAdPaused(i),this.mediator.publish(this,k.Km.AdPause,t.payload);break}case g.fI.AdPlaying:{const{adType:i}=t.payload.payload;this.app.services.TrackingService.setSessionPlayback(!0),this.app.services.EventsStorageService.emitAdPlaying(i),this.mediator.publish(this,k.Km.AdPlay,t.payload);break}case g.fI.AdVideoFirstQuartile:{const{adType:i}=t.payload.payload;this.mediator.publish(this,k.Km.AdCompleted25,t.payload),this.app.services.EventsStorageService.emitAdVideoFirstQuartile(i);break}case g.fI.AdVideoMidpoint:{const{adType:i}=t.payload.payload;this.mediator.publish(this,k.Km.AdCompleted50,t.payload),this.app.services.EventsStorageService.emitAdVideoMidpoint(i);break}case g.fI.AdVideoThirdQuartile:{const{adType:i}=t.payload.payload;this.mediator.publish(this,k.Km.AdCompleted75,t.payload),this.app.services.EventsStorageService.emitAdVideoThirdQuartile(i);break}case g.fI.AdVideoComplete:{const{adType:i}=t.payload.payload;this.mediator.publish(this,k.Km.AdCompleted100,t.payload),this.app.services.EventsStorageService.emitAdVideoComplete(i);break}case g.fI.AdClickThru:{const{adType:i}=t.payload.payload;this.mediator.publish(this,k.Km.AdClick,t.payload),this.app.services.EventsStorageService.emitAdClickThru(i);break}case g.fI.AdInteraction:{const{adType:i}=t.payload.payload;this.app.services.EventsStorageService.emitAdInteraction(i);break}case g.fI.AdUserAcceptInvitation:{const{adType:i}=t.payload.payload;this.app.services.EventsStorageService.emitAdInteraction(i);break}case g.fI.AdUserClose:{const{adType:i}=t.payload.payload;this.app.services.EventsStorageService.emitAdInteraction(i);break}case g.fI.AdUserMinimize:{const{adType:i}=t.payload.payload;this.app.services.EventsStorageService.emitAdInteraction(i);break}case g.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 g.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.up(s);this.app.services.EventsStorageService.emitAdLoaded(n,e);break}case g.fI.AdVolumeChange:{const{adType:i}=t.payload.payload;this.app.services.EventsStorageService.emitAdVolumeChange(i);break}case g.fI.AdLog:}})))}cp(){this.pd.push(this.adHandler.onLinearEvent.subscribe((t=>{switch(t.type){case _.ShowLinearEvent:this.Kd.onAdImpression(t.payload,ct.LINEAR),this.dp();break;case _.HideLinearEvent:this.pp();break;case _.PauseLinearEvent:this.Kd.onLinearAdPause();break;case _.ResumeLinearEvent:this.Kd.onLinearAdPlay();break;case _.SkipLinearEvent:const i=!0;this.floatingModule&&(this.floatingModule.enabled=!0),this.pp(i)}})))}lp(){this.pd.push(this.adHandler.onNonLinearEvent.subscribe((t=>{switch(t.type){case A.ShowNonLinearEvent:this.Kd.onAdImpression(t.payload,ct.NONLINEAR);break;case A.HideNonLinearEvent:const i=!1;this.Kd.onAdFinished(this.adHandler.nonLinearInImpression,ct.NONLINEAR,i)}})))}dp(){this.Yd.adStarted(),this.adHandler.showLinear()}fp(){this.adHandler.hideLinear()}pp(t=!1){let i=this.Yd.isInAdPod();t&&(i=!1,this.Yd.endPod()),this.Kd.onAdFinished(this.adHandler.linearInImpression,ct.LINEAR,i),this.fp(),this.vp.isCloseButton&&this.adHandler&&this.adHandler.firstLinearAdShown&&(this.vp.closeButtonMode!==s.ProtoPlayerCloseButtonMode.OnHoverAfterFirstAd||(0,m.pv)(this.$playerContainer,c.s6.CloseHover)||(0,m.cn)(this.$playerContainer,c.s6.CloseHover),this.vp.floatingSettings.floatingCloseButtonMode!==s.ProtoPlayerCloseButtonMode.OnHoverAfterFirstAd||(0,m.pv)(this.$playerContainer,c.s6.CloseFloatHover)||(0,m.cn)(this.$playerContainer,c.s6.CloseFloatHover))}gp(t){this.adHandler.enterAdPodLoadingState(),this.Yd.enterPodTimeout((()=>{this.Yd.endPod(),t()}))}mp(){(0,m.Tp)(this.$playerContainer),this.Kd=this.yp(),this.subscribe(F,this.Kd,(()=>{var t;null===(t=this.adHandler)||void 0===t||t.enableAds(ct.NONLINEAR)})),this.subscribe(j,this.Kd,(t=>{var i;const e=t.payload;null===(i=this.adHandler)||void 0===i||i.disableAds(ct.NONLINEAR,e)})),this.subscribe(E,this.Kd,(()=>{var t;null===(t=this.adHandler)||void 0===t||t.enableAds(ct.LINEAR)})),this.subscribe(L,this.Kd,(t=>{var i;const e=t.payload;null===(i=this.adHandler)||void 0===i||i.disableAds(ct.LINEAR,e)})),this.subscribe(O,this.Kd,(()=>{var t;null===(t=this.adHandler)||void 0===t||t.stopAd("forceStopAdSlot")})),this.subscribe(R,this.Kd,(()=>{if(this.adHandler)if(this.adHandler.linearInImpression)this.Yd.endPod(),this.adHandler.stopAd("forceStopAdPod");else{const t=!0;this.pp(t)}})),this.subscribe(D,this.Kd,(t=>{var i;null===(i=this.adHandler)||void 0===i||i.updateLinearPodRemainingTime(t.payload.remainingTime)})),this.subscribe(B,this.Kd,(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,P.$K)(n)?n:this.$playerContainer.clientWidth};this.app.services.TrackingService.trackAdOpportunity(r),null===(e=this.adHandler)||void 0===e||e.newLinearAdOpportunity()}))}bp(){this.app.services.ViewabilityService.on(this.$playerContainer,this.vd,{threshold:this.Gu,callbackDelay:this.Ju}),this.app.services.ViewabilityService.on(this.$playerContainer,((t,i)=>this.gu(t,i)),{threshold:this.Wu}),this.app.services.ViewabilityService.subscribe(k.rl.OmidViewabilityThreshold,(t=>{this.mediator.publish(this,k.rl.OmidViewabilityThreshold,{payload:{threshold:t}})})),this.app.config.os.os===dt.M.Ios&&this.app.services.PageFocusService.on(this.yd)}gd(){this.hd&&this.od&&this.mediator.publish(this,o.Xh.SessionView)}gu(t,i=!1){this.Kd.setToggleAdsReason({isAppBackgrounded:i}),this.app.config.isInApp&&(i?(this.wp=this.getVolume(),this.setVolume(0)):this.wp&&(this.setVolume(this.wp),this.wp=null)),this.nd=t,this.mediator.publish(this,k.Km.IsViewable,{payload:t}),this.Kd.viewabilityStateChanged(this.checkFloatingViewability(t),this.Yd.isInAdPod(),this.Yd.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}Cs(){var t,e,s;const n=this.$playerContainer.clientWidth,r=this.$playerContainer.clientHeight,h=this.rd?g.zc.Fullscreen:g.zc.Normal;null===(t=this.adHandler)||void 0===t||t.resizeAd(n,r,h,this.Ns);try{null===(e=this.Kd)||void 0===e||e.onResize(n,r)}catch(t){(0,i.n)({message:"BaseExperience_onResize_player",callStack:t.stack,exception:t.message,level:i.D.WARN})}null===(s=this.adHandler)||void 0===s||s.setPlayerOrientation(this.xp(n,r)),this.breakPointsHandler.updateWidth(n),this.app.services.TrackingService.updatePlayerDimensions(n,r),setTimeout((()=>{this.mediator.publish(this,k.Km.SizeChanged,{payload:{width:n,height:r}}),this.Sp()}))}isBelowSmBreakpoint(t){return t<this.fd}xp(t,i){return t<i?at.Portrait:t>i?at.Landscape:at.None}Sp(){this.rd||this.Ud()}_p(){this.app.services.ResizeObserver.on(this.$playerContainer,(()=>{this.Cs()}))}Ap(){var t;this.rd=!0,this.app.services.InteractionService.disableScrollEvent(),this.Nd(),null===(t=this.adHandler)||void 0===t||t.setVastViewMode(g.zc.Fullscreen)}Pp(){var t;this.rd=!1,this.app.services.InteractionService.enableScrollEvent(),this.Hd(),null===(t=this.adHandler)||void 0===t||t.setVastViewMode(g.zc.Normal)}kp(){const t=`<cnx class='${c.oV}'></cnx>`,i=this.app.services.GlobalDomUtilsService.createElementByString(t);return this.Cp(i),i}Cp(t){(0,m.T7)(t,{"padding-bottom":`${this.Mp()}%`})}Mp(){return this.vp.playerSize.ratioHeight/this.vp.playerSize.ratioWidth*100}Ep(){this.dd.push(this.floatingModule.onFloatingEnterStart.subscribe((()=>{this.mediator.publish(this,k.Zr.PlayerFloatChanged,{payload:v.Float}),this.mediator.publish(this,k.Zr.FloatingEnterStart,{payload:!0})})),this.floatingModule.onFloatingExitStart.subscribe((()=>{this.mediator.publish(this,k.Zr.FloatingExitStart,{payload:!0})})),this.floatingModule.onFloatingExitStop.subscribe((()=>{this.mediator.publish(this,k.Zr.PlayerFloatChanged,{payload:v.Embed}),this.mediator.publish(this,k.Zr.FloatingExitStop,{payload:!0})})),this.floatingModule.onFloatingEnterStop.subscribe((()=>{this.mediator.publish(this,k.Zr.FloatingEnterStop,{payload:!0}),this.gu(!0)})))}Lp(){this.floatingModule=new S(this.app.services.ViewabilityService,this.app.services.ResizeObserver,this.$playerContainer,this.vp.floatingSettings,this.app.config.device,this.app.services.GlobalDomUtilsService,this.Op),this.Ep(),this.floatingModule.start()}Rp(){this.alwaysFloatingModule=new I(this.app.services.ResizeObserver,this.$experienceContainer,this.vp.floatingSettings,this.app.config.device,this.app.services.GlobalDomUtilsService),this.dd.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)}Dp(){var t;this.jp(),null===(t=this.adHandler)||void 0===t||t.onLinearExperienceEvent.subscribe((t=>{var i;t.type===o.Uh.UserInteraction&&(null===(i=t.payload)||void 0===i?void 0:i.volume)&&this.Fp()}))}$p(t){this.subscribe(o.Uh.UserInteraction,t,(({payload:{volume:t}})=>{t&&this.Fp()}))}ws(t){this.mediator.publish(this,k.Km.VolumeChanged,{payload:t}),this.app.services.EventsStorageService.emitVolumeChange(t)}_d(t){this.getVolume()!==t&&this.setNewVolume(t)}jp(){this.Xu=!0,this.$playerContainer.addEventListener("mouseover",this.Sd),this.$playerContainer.addEventListener("mouseout",this.Pd)}Fp(){this.Xu&&(this.Xu=!1,this.$playerContainer.removeEventListener("mouseover",this.Sd),this.$playerContainer.removeEventListener("mouseout",this.Pd))}Vp(){this.breakPointsHandler=new T(this.$playerContainer,this.app.config.device,this.Np,this.zp),this.breakPointsHandler.updateWidth(this.$playerContainer.clientWidth)}qp(){var t;if(this.vp.isCloseButton){switch(this.ki.push(null===(t=this.adHandler)||void 0===t?void 0:t.onLinearUiComponentEvent.subscribe((t=>{t.type===w.Close&&this.handleClose()}))),this.vp.closeButtonMode){case s.ProtoPlayerCloseButtonMode.AlwaysOn:(0,m.cn)(this.$playerContainer,c.s6.CloseOn);break;case s.ProtoPlayerCloseButtonMode.Off:(0,m.cn)(this.$playerContainer,c.s6.CloseOff);break;case s.ProtoPlayerCloseButtonMode.OnHover:(0,m.cn)(this.$playerContainer,c.s6.CloseHover)}switch(this.vp.floatingSettings.floatingCloseButtonMode){case s.ProtoPlayerCloseButtonMode.AlwaysOn:(0,m.cn)(this.$playerContainer,c.s6.CloseFloatOn);break;case s.ProtoPlayerCloseButtonMode.Off:(0,m.cn)(this.$playerContainer,c.s6.CloseFloatOff);break;case s.ProtoPlayerCloseButtonMode.OnHover:(0,m.cn)(this.$playerContainer,c.s6.CloseFloatHover)}}}up(t){const{skipOffset:i}=t;return{isAutoPlay:this.vp.playbackMode===s.ProtoPlayerPlaybackModeEnum.Autoplay,skipOffset:i,isSkippable:(0,P.kE)(i)}}Wp(){this.od=!0,this.app.services.TrackingService.setContentStart(),this.gd()}wd(){const{clientWidth:t,clientHeight:i}=this.$experienceContainer;return!(0,lt.ON)({width:t,height:i})&&!this.isBelowSmBreakpoint(t)||((0,m.cn)(this.$experienceContainer,c.Gj.NoHeight),this.Gp())}Gp(){return vt.includes(this.app.config.bundleID)}Jp(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"}}}Qp(){if(!(0,ut.Vm)([95,5]))return;const t={parent:this.Jp(this.$experienceContainer.parentElement),main:this.Jp(this.$experienceContainer)};(0,i.n)({message:"BaseExperience_invalid_dimensions",level:i.D.INFO,exception:JSON.stringify(t)})}Xp(){this.Yd=new ot(this.vp.adBreaks)}dl(t,i,e,s){this.vp=t,this.app=i,this.$experienceContainer=e,s&&s(),this.Cd(),this.app.services.ViewabilityService.setViewableThreshold(this.Qu),this.generateHTML(),this.Xp(),this.app.services.ResizeObserver.on(this.$experienceContainer,this.bd),this.wd()?this.mediator.publish(this,o.Uh.CanStart):this.Qp()}start(){return ft(this,void 0,void 0,(function*(){this.Yu=!0,this.app.services.TrackingService.updatePlayerDimensions(this.$playerContainer.clientWidth,this.$playerContainer.clientHeight),(0,m.cn)(this.$experienceContainer,c.sN.MainContainerFlex),this.mediator.publish(this,o.Xh.SessionRendered),this.Vp(),this._p(),this.vp.floatingSettings.floatingMode===s.ProtoPlayerFloatingMode.Always?this.Rp():(this.Ud(),this.Lp()),this.vp.lineItemSettings.lineItems.length>0&&!this.vp.disableAdvertising&&!u._.isBannerBlocked&&(this.app.config.isOVPDomain?this.ki.push(u._.onAdBlockerDetected().subscribe((t=>{t||this.sp()}))):this.sp()),this.app.config.isMobile||this.vp.soundMode!==s.ProtoPlayerSoundMode.Hover||this.Dp(),this.vp.isCloseButton&&this.qp(),this.vp.displayAdCountdown&&(0,m.cn)(this.$playerContainer,c.s6.AdShowCountdown);try{this.mp()}catch(t){(0,i.n)({message:"BaseExperience_initAdsController",exception:t.message,callStack:t.stack,level:i.D.INFO})}u._.isBannerBlocked||u._.detectUsingScript().then((t=>{t&&(this.app.services.TrackingService.trackSessionAdBlocker(s.ProtoAdBlockDetectionTypeEnum.Network),this.Kd.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.Fp()}getSize(){return{width:this.$experienceContainer.clientWidth,height:this.$experienceContainer.clientHeight}}setSize(t,i){(0,lt.ON)({width:t,height:i})||(0,m.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.Wu})}setViewableThreshold(t){this.app?this.app.services.ViewabilityService.setViewableThreshold(t):this.Qu=t}setAmpUserConsent(t){this.app.services.UserManagerService.setAmpUserConsent(t)}triggerDestroy(){this.app.services.EventsStorageService.destroy(),this.mediator.publish(this,o.Uh.Destroy)}disableAdvertising(){this.Kd.disableAdvertising()}enableAdvertising(){this.Kd.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()}setFloatingSettings(t){this.floatingModule?this.floatingModule.setFloatingSettings(t):this.alwaysFloatingModule.setFloatingSettings(t)}destroy(){(0,pt.i)(this.ki),this.adHandler&&((0,pt.i)(this.pd),this.op.unsubscribe(),this.adHandler.destroy()),this.Kd&&this.Kd.destroy(),this.floatingModule&&(this.floatingModule.destroy(),this.floatingModule=null,(0,pt.i)(this.dd))}}var yt,bt,wt=n(7953);!function(t){t[t.Unknown=0]="Unknown",t[t.TimeoutBetweenAds=1]="TimeoutBetweenAds",t[t.InImpression=2]="InImpression",t[t.LinearDemandMissing=3]="LinearDemandMissing"}(yt||(yt={}));class xt extends h._{constructor(t,i,e,s,n,r,h,o){super(),this.mediator=t,this.Re=i,this.Yp=e,this.Zp=s,this.tf=n,this.if=r,this.qu=h,this.ef=o,this.sf=g.zc.Normal,this.nf=[],this.rf=new x.x,this.hf=new x.x,this.af=new x.x,this.cf=new x.x,this.lf=new x.x,this.uf=new x.x,this.df=new x.x,this.pf=new x.x,this.ff=new x.x,this.vf=new x.x,this.gf=new x.x,this.yf=this.bf(),this.wf(),this.xf=this.Sf(),this.Af(),this.Pf=this.kf(),this.Pf&&this.If()}Tf(t,i){const e=[{container:this.Cf,width:t,height:i,type:wt.ProtoAdType.Overlay},{container:this.Cf,width:t,height:i,type:wt.ProtoAdType.Video},{container:this.Mf,width:t,height:i,type:wt.ProtoAdType.Nonlinear}];return this.Mf||e.pop(),e}wf(){this.nf.push(this.yf.onAdsEnable.subscribe((t=>{this.rf.next(t)})))}If(){var t,i,e;this.nf.push(null===(t=this.Pf)||void 0===t?void 0:t.onVpaidEvent.subscribe((t=>{this.hf.next(t)})),null===(i=this.Pf)||void 0===i?void 0:i.onNonLinearEvent.subscribe((t=>{this.pf.next(t)})),null===(e=this.Pf)||void 0===e?void 0:e.onExperienceEvent.subscribe((t=>{this.ff.next({type:t.type,payload:t.payload})})),this.yf.onNonlinearImpressionPrice.subscribe((t=>{this.vf.next(t)})),this.yf.onNonlinearImpressionRevenue.subscribe((t=>{this.gf.next(t)})))}Af(){this.nf.push(this.xf.onVpaidEvent.subscribe((t=>{this.hf.next(t)})),this.xf.onUiComponentEvent.subscribe((t=>{this.cf.next(t)})),this.xf.onExperienceEvent.subscribe((t=>{this.lf.next({type:t.type,payload:t.payload})})),this.xf.onLinearEvent.subscribe((t=>{t.type===_.ShowLinearEvent&&this.nonLinearInImpression&&this.Pf.pause(this.linearInImpression),this.af.next(t)})),this.yf.onLinearImpressionPrice.subscribe((t=>{this.uf.next(t)})),this.yf.onLinearImpressionRevenue.subscribe((t=>{this.df.next(t)})))}Ef(t,i,e){this.yf.initAd(t,i,this.sf,1,e,this.Tf(t,i),this.if)}adStateChange(t,i){var e;this.xf.adStateChange(t,i),null===(e=this.Pf)||void 0===e||e.adStateChange(t,i)}contentPlaybackStateChanged(t){var i;null===(i=this.Pf)||void 0===i||i.contentPlaybackStateChanged(t)}disableAds(t,i){this.yf.disableAds(t,i)}enableAds(t){this.yf.enableAds(t)}start(t,i,e,s=!1,n=!1){n&&this.startNonLinear(),this.startLinear(e,s),this.Ef(t,i,e)}stopAd(t){var i;this.xf.stopAd(t),null===(i=this.Pf)||void 0===i||i.stopAd(t)}play(){this.xf.play()}pause(){var t;this.xf.pause(),this.linearInImpression||null===(t=this.Pf)||void 0===t||t.pause()}resumeWithoutUserInteraction(t){var i;this.xf.resumeWithoutUserInteraction(),null===(i=this.Pf)||void 0===i||i.resumeWithoutUserInteraction(t)}resizeAd(t,i,e,s){var n;this.setVastViewMode(e),this.xf.resizeAd(t,i),null===(n=this.Pf)||void 0===n||n.resizeAd(t,i,s)}setPlayerOrientation(t){this.yf.setPlayerOrientation(t)}setVastViewMode(t){this.sf=t,this.yf.setVastViewMode(t)}contentChanged(){this.yf.onContentChange()}newLinearAdOpportunity(){this.yf.newLinearAdOpportunity()}destroy(){var t,i,e;(0,pt.i)(this.nf),this.xf.destroy(),null===(t=this.Pf)||void 0===t||t.destroy(),null===(i=this.yf)||void 0===i||i.disableAds(ct.LINEAR,{disableReason:yt.Unknown}),null===(e=this.yf)||void 0===e||e.disableAds(ct.NONLINEAR,{disableReason:yt.Unknown}),this.yf.destroy()}get onAdsEnable(){return this.rf.asObservable()}get onVpaidEvent(){return this.hf.asObservable()}startNonLinear(){var t;null===(t=this.Pf)||void 0===t||t.start()}contentEnded(){var t;this.nonLinearInImpression&&(null===(t=this.Pf)||void 0===t||t.pause())}get onNonLinearEvent(){return this.pf.asObservable()}get onNonLinearExperienceEvent(){return this.ff.asObservable()}get onNonLinearImpressionPrice(){return this.vf.asObservable()}get onNonLinearImpressionRevenue(){return this.gf.asObservable()}get nonLinearInImpression(){return!!this.Pf&&this.Pf.inImpression}get Mf(){var t;return null===(t=this.Pf)||void 0===t?void 0:t.adContainer}startLinear(t,i=!1){this.xf.start(t,i)}setMediaRestrictions(t){this.yf.setMediaRestrictions(t)}getLinearVolume(){return this.xf.getVolume()}setLinearVolume(t){this.xf.setVolume(t)}hideLinear(){this.xf.hide()}showLinear(){this.xf.show()}updateContinueReadingCard(){this.xf.updateContinueReadingCard()}setContinueReadingCard(t){this.xf.setContinueReadingCard(t)}hideContinueReadingCard(){this.xf.hideContinueReadingCard()}setAdMarkerTitle(t){this.xf.setAdMarkerTitle(t)}hideAdMarkerTitle(){this.xf.hideAdMarkerTitle()}enterAdPodLoadingState(){this.xf.enterAdPodLoadingState()}setAdLoadingBackgroundUrl(t){this.xf.setAdLoadingBackgroundUrl(t)}updateLinearPodRemainingTime(t){this.yf.updateLinearPodRemainingTime(t)}get onLinearEvent(){return this.af.asObservable()}get onLinearUiComponentEvent(){return this.cf.asObservable()}get onLinearExperienceEvent(){return this.lf.asObservable()}get onLinearImpressionPrice(){return this.uf.asObservable()}get onLinearImpressionRevenue(){return this.df.asObservable()}get linearInImpression(){return this.xf.inImpression}get Cf(){return this.xf.adContainer}get Lf(){return this.xf.secondaryAdContainer}get linearAdUserInterface(){return this.xf.adUserInterface}get onFullcreenChange(){return this.xf.onFullcreenChange}get linearAdInWin(){return this.xf.adInWin}get firstLinearAdShown(){return this.xf.firstAdShown}get inAdPodLoadingState(){return this.xf.inAdPodLoadingState}getLinearAdContainerWidth(){return this.xf.getMainAdContainerWidth()}userInteraction(t){this.yf.userInteraction(t)}}class St{constructor(){this.Rf=(0,ut.qs)()}get id(){return this.Rf}}!function(t){t[t.NoPrefetch=0]="NoPrefetch",t[t.StartSessionPrefetch=1]="StartSessionPrefetch",t[t.MidSessionPrefetch=2]="MidSessionPrefetch"}(bt||(bt={}));function _t(t){return 2*(t+41)}function At(t){return t/2-41}class Pt{constructor(){this.Bf=Date.now(),this.Df={advertiser:{}}}addPrebid(t){(0,P.$K)(this.Df.advertiser[t])||this.jf(t),this.Df.advertiser[t].prebidData.push({timestamp:Date.now()})}addBid(t,i){(0,P.$K)(this.Df.advertiser[t])||this.jf(t),this.Df.advertiser[t].bidsFloorPriceList.push({timestamp:Date.now(),floorPrice:i})}addImpression(t,i){(0,P.$K)(this.Df.advertiser[t])||this.jf(t),this.Df.advertiser[t].impressionRevenueList.push({timestamp:Date.now(),obfuscatedPrice:i})}shouldRequestLineItem(t){const i=Date.now();return!(this.Ff(i,3)&&this.$f(t,i,5)<-.5&&this.Vf(t,i,3)>=11.5&&this.Uf(t,i,10,.1)<.35)}Ff(t,i){return t-this.Bf>=i*ht.uD}$f(t,i,e){const s=this.Df.advertiser[t];if(!(0,P.$K)(s))return-1;const n=this.Nf(s.impressionRevenueList,i,e).map((t=>t.obfuscatedPrice));let r=0;return(0,a.BZ)(n)&&(r=n.reduce(((t,i)=>t+_t(i)))),this.Hf(r)}Vf(t,i,e){const s=this.Df.advertiser[t];if(!(0,P.$K)(s))return-1;const n=this.Nf(s.prebidData,i,e).length;return this.Hf(n)}Uf(t,i,e,s){const n=this.Df.advertiser[t];if(!(0,P.$K)(n))return-1;const r=this.Nf(n.impressionRevenueList,i,e).map((t=>t.floorPrice)),h=this.zf(r,s);return this.Hf(h)}Nf(t,i,e){const s=i-ht.s_,n=i-e*ht.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}Hf(t){return 0===t?-1:t}jf(t){this.Df.advertiser[t]={prebidData:[],bidsFloorPriceList:[],impressionRevenueList:[]}}zf(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 kt{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 It{constructor(t){this.clickTrackings=[],this.customClicks=[],this.errorUrls=[],this.impressions=[],this.trackingEvents=new kt,t.inLine?this.qf(t.inLine):this.Wf(t.wrapper)}qf(t){this.Gf(t.errors),this.Jf(t.impressions),this.Qf(t.creatives)}Wf(t){this.Gf(t.errors),this.Jf(t.impressions),this.Qf(t.creatives)}Yf(t){this.Kf(t.trackingEvents),this.Zf(t.videoClicks)}Zf(t){t&&(this.tv(t.clickTrackings),this.sv(t.customClicks))}tv(t){this.clickTrackings.push(...t)}sv(t){this.customClicks.push(...t)}Kf(t){t.forEach((t=>{try{this.trackingEvents[t.name].push(t.uri)}catch(e){(0,i.n)({message:"AdManager_VastResponse_tracker",exception:`${t.name}`,callStack:e.stack,level:i.D.INFO})}}))}Qf(t){t.forEach((t=>{t.linear?this.Yf(t.linear):t.nonLinear&&this.Kf(t.nonLinear.trackingEvents)}))}Gf(t){this.errorUrls.push(...t)}Jf(t){this.impressions.push(...t)}}const Tt={[s.ProtoTrackerTriggerType.Impression]:"adImpression",[s.ProtoTrackerTriggerType.Complete25Pc]:"adQuartileFirst",[s.ProtoTrackerTriggerType.Complete50Pc]:"adQuartileSecond",[s.ProtoTrackerTriggerType.Complete75Pc]:"adQuartileThird",[s.ProtoTrackerTriggerType.ViewCompletion]:"adQuartileFourth",[s.ProtoTrackerTriggerType.VideoClick]:"adClick",[s.ProtoTrackerTriggerType.Pause]:"adPause",[s.ProtoTrackerTriggerType.Resume]:"adResume",[s.ProtoTrackerTriggerType.Mute]:"adMute",[s.ProtoTrackerTriggerType.Unmute]:"adUnmute"};class Ct{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,e,n){if(!Array.isArray(t))return;const{width:r,height:h}=n.adContainerState.get(e.adType),{adBreakType:o}=n.adBreakState,{mediaDescription:a,mediaDuration:c,mediaId:l,mediaUrl:u,mediaTitle:d}=n.media;t.forEach((t=>{if(t.url)try{const n=i.replace(t.url,e.vendorId,{adMacros:{adWidth:r,adHeight:h,adPostion:o},mediaMacros:{mediaDescription:a,mediaDuration:c,mediaId:l,mediaUrl:u,mediaTitle:d}});switch(t.type){case s.ProtoTrackerType.Image:(0,ut.Hh)([n],window);break;case s.ProtoTrackerType.Javascript:(0,m.dZ)({src:n},window.document.head,window)}}catch(t){}}))}}function Mt(t,i){t.forEach((t=>function(t,i){(function(t,i){return i[Tt[t]]})(t.trigger,i).push({type:t.type,url:t.url})}(t,i)))}function Et(t){return{type:s.ProtoTrackerType.Image,url:t}}function Lt(t){return t.map((t=>Et(t)))}var Ot;!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"}(Ot||(Ot={}));const Rt={[Ot.HandlingSdkUrl]:s.ConnatixNoBidReasonEnum.CsRequestException,[Ot.NetworkRequestUrl]:s.ConnatixNoBidReasonEnum.CsRequestException,[Ot.XmlInvalidString]:s.ConnatixNoBidReasonEnum.CsEmptyResponse,[Ot.XmlParseGeneral]:s.ConnatixNoBidReasonEnum.CsInvalidResponse,[Ot.XmlInvalidTree]:s.ConnatixNoBidReasonEnum.CsInvalidResponse,[Ot.XmlInvalidAd]:s.ConnatixNoBidReasonEnum.CsInvalidResponse,[Ot.XmlAdaptorWrapperLimit]:s.ConnatixNoBidReasonEnum.CsInvalidResponse,[Ot.HTMLUnknownMimeType]:s.ConnatixNoBidReasonEnum.CsInvalidResponse,[Ot.ImaAdsManagerInit]:s.ConnatixNoBidReasonEnum.CsRequestException,[Ot.ImaVastEmptyResponse]:s.ConnatixNoBidReasonEnum.CsInvalidResponse,[Ot.ImaRequestException]:s.ConnatixNoBidReasonEnum.CsRequestException,[Ot.ImaTimeout]:s.ConnatixNoBidReasonEnum.Timeout,[Ot.ImaInvalidResponse]:s.ConnatixNoBidReasonEnum.CsInvalidResponse,[Ot.InvalidCreativeUrl]:s.ConnatixNoBidReasonEnum.CsRequestException,[Ot.BidIsNotTargetingAllowedEver]:s.ConnatixNoBidReasonEnum.BidIsNotTargetingAllowedEver};var Bt,Dt;!function(t){t.VOLUME_DETECTED="volume_detected",t.MALWARE_DETECTED="malware_detected",t.BADURI_DETECTED="baduri_detected"}(Bt||(Bt={})),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"}(Dt||(Dt={}));class jt{constructor(){this.hf=new x.x}get onVpaidEvent(){return this.hf.asObservable()}handshakeVersion(t="2.0"){return"2.0"}}var Ft=n(2157);function $t(t){switch(t.creativeType){case s.ProtoCreativeTypeEnum.Tam:case s.ProtoCreativeTypeEnum.TamDeal:case s.ProtoCreativeTypeEnum.Rtb:return _t(t.obfuscatedPrice);case s.ProtoCreativeTypeEnum.HeaderBidder:return t.cpm;default:return t.floorPrice}}var Vt,Ut,Nt;n(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"}(Vt||(Vt={})),function(t){t[t.Win=0]="Win",t[t.AdLoaded=1]="AdLoaded",t[t.AdStarted=2]="AdStarted",t[t.AdImpression=3]="AdImpression"}(Ut||(Ut={}));class Ht{constructor(t){this.nv=t,this.rv=new Map,(0,P.$K)(this.nv.settings.bidLifecycle)||(this.nv.settings.bidLifecycle={})}onTrackingLifecycleEvent(t){switch(this.rv.set(t,Date.now()),t){case Ut.AdLoaded:this.hv();break;case Ut.AdImpression:this.ov()}}hv(){this.nv.settings.bidLifecycle.winToAdLoadedTime=this.av}ov(){this.nv.settings.bidLifecycle.startAdToImpressionTime=this.lv}get lv(){return this.rv.get(Ut.AdImpression)&&this.rv.get(Ut.AdStarted)?this.rv.get(Ut.AdImpression)-this.rv.get(Ut.AdStarted):0}get av(){return this.rv.get(Ut.AdLoaded)&&this.rv.get(Ut.Win)?this.rv.get(Ut.AdLoaded)-this.rv.get(Ut.Win):0}}!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"}(Nt||(Nt={}));const zt="cnx-ad-bid-slot-selected",qt="Connatix Ad";class Wt extends jt{constructor(t,i){super(),this.uv=t,this.settings=i,this.dv=null,this.fv=null,this.vv=null,this.gv=null,this.mv=void 0,this.yv=!1,this.bl=!1,this.bv=!1,this.wv=!1,this.xv=null,this.nf=[],this.Sv=new x.x,this._v=()=>{this.Pv({type:g.fI.AdError,payload:{errorMessage:Vt.Timeout}}),this.kv()},this.Iv=()=>{this.Tv(),this.Cv(Nt.VIEWABLE_IMPRESSION_TIMEOUT).clearTimeout(),this.settings.viewabilityService.off(this.dv,this.Mv)},this.Mv=t=>{const i=this.Cv(Nt.VIEWABLE_IMPRESSION_TIMEOUT);t?i.timeoutHandle.timeoutId||i.setTimeout():i.clearTimeout()},this.Ev=()=>{this.Pv({type:g.fI.AdSkipped}),this.kv()},this.Ov=()=>{this.Pv({type:g.fI.AdStopped,payload:{shouldTrackPostBid:!0}}),this.kv()},this.Rv=()=>{this.Pv({type:g.fI.AdError,payload:{errorMessage:Vt.TimeoutLoaded}}),this.kv()},this.Cv=t=>{const i=this.Bv[t];return{timeoutHandle:i,setTimeout:()=>{i.timeoutId=this.uv.setTimeout((()=>{i.callback()}),i.timeout)},clearTimeout:()=>{null!==i.timeoutId&&(this.uv.clearTimeout(i.timeoutId),i.timeoutId=null)}}},this.Dv=Date.now(),this.creativeId=this.settings.externalCreativeId,this.jv=`cnx-ad-bid-slot-id-${this.settings.requestMetadata.data.cnxBidId}`,this.Fv=`cnx-ad-slot-${this.settings.id}`;const{adType:e}=this.settings.adManagerLineItem.protoLineItem;this.Bv={[Nt.IMPRESSION_TIMEOUT]:{callback:this._v,timeout:25e3,timeoutId:null},[Nt.VIEWABLE_IMPRESSION_TIMEOUT]:{callback:this.Iv,timeout:Ft.xs[e],timeoutId:null},[Nt.SKIP_AD_TIMEOUT]:{callback:this.Ev,timeout:500,timeoutId:null},[Nt.STOP_AD_TIMEOUT]:{callback:this.Ov,timeout:500,timeoutId:null},[Nt.AD_LOADED_TIMEOUT]:{callback:this.Rv,timeout:25e3,timeoutId:null}},this.qu=i.urlSuffixerService}get createdTimestamp(){return this.Dv}getPrice(){const{advertiserLineItemId:t,creativeType:i,floorPrice:e,lineItemPriority:s}=this.settings.adManagerLineItem.protoLineItem;return $t({lineItemId:t,bidId:this.settings.id,creativeType:i,floorPrice:e,obfuscatedPrice:this.settings.obfuscatedPrice,successRate:this.settings.successRate,priority:s,cpm:this.settings.cpm})}skipAd(){this.Cv(Nt.SKIP_AD_TIMEOUT).setTimeout()}stopAd(t){this.Cv(Nt.STOP_AD_TIMEOUT).setTimeout()}startAd(){this.wv&&(0,i.n)({message:"AdManager_ABaseBidAdaptor_samebid",exception:"startAd",callStack:`adv:${this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId} bidid: ${this.Fv}`,level:i.D.CRITICAL}),this.wv=!0,this.Cv(Nt.IMPRESSION_TIMEOUT).setTimeout()}initAd(t,e,s,n,r,h,o){this.bv&&(0,i.n)({message:"AdManager_ABaseBidAdaptor_samebid",exception:"initAd",callStack:`adv:${this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId} bidid: ${this.Fv}`,level:i.D.CRITICAL}),this.bv=!0,this.Cv(Nt.AD_LOADED_TIMEOUT).setTimeout(),this.$v(o),this.Vv=new Ht(this),this.Vv.onTrackingLifecycleEvent(Ut.Win)}setAdVolume(t){this.fv.volume=t,(0,m.Q1)(this.fv,t),t<=0?this.settings.adEnforcer.start(Dt.Mute):this.settings.adEnforcer.stop(Dt.Mute)}get impressionStarted(){return this.yv}get creativeId(){return this.mv}set creativeId(t){(0,P.QM)(this.creativeId)||(this.mv=t)}get onAdViewableImpression(){return this.Sv.asObservable()}Uv(t){let i;(0,P.kE)(t.payload.skipOffset)&&(i=t.payload.skipOffset);const e={type:g.fI.AdLoaded,payload:{adType:this.settings.adManagerLineItem.protoLineItem.adType,adLoadedData:{skipOffset:i},adSkipMode:this.settings.adManagerLineItem.protoLineItem.skipMode}};return this.settings.adLoadedPayload=e,e}Nv(t){return{type:g.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:qt,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}}}}Hv(t){return{type:g.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:qt},customAdData:{ADVERTISER:this.settings.requestMetadata.data.rtbAdomain,CREATIVE_ID:this.creativeId,CAMPAIGN_ID:this.settings.requestMetadata.data.rtbCampainId}}}}Pv(t){if(t.payload||(t.payload={}),t.payload.adType=this.settings.adManagerLineItem.protoLineItem.adType,this.zv(t))switch(t.type){case g.fI.AdLoaded:0,this.Vv.onTrackingLifecycleEvent(Ut.AdLoaded),this.Cv(Nt.AD_LOADED_TIMEOUT).clearTimeout(),this.hf.next(this.Uv(t));break;case g.fI.AdImpression:this.Vv.onTrackingLifecycleEvent(Ut.AdImpression),this.Cv(Nt.IMPRESSION_TIMEOUT).clearTimeout(),this.qv(),(0,m.cn)(this.vv,zt),this.hf.next(this.Nv(t)),this.yv=!0;break;case g.fI.AdVideoStart:this.Vv.onTrackingLifecycleEvent(Ut.AdStarted),this.hf.next(this.Hv(t));break;case g.fI.AdStopped:case g.fI.AdSkipped:case g.fI.AdError:this.bl&&(0,i.n)({message:"AdManager_ABaseBidAdaptor_double_destroy",exception:this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,level:i.D.WARN}),this.hu(),this.hf.next(t);break;default:this.hf.next(t)}else this.Pv({type:g.fI.AdError,payload:{errorMessage:Vt.InvalidVpaidEvent}})}$v(t){this.gv=this.Wv(),this.vv=this.gv.slotsContainer,(0,m.cn)(this.vv,this.jv),this.dv=this.gv.adSlot,this.dv.id=this.Fv,this.vv.id=this.settings.bidSlotId,this.fv=this.gv.videoSlot,this.fv.volume=t,(0,m.Q1)(this.fv,t),this.settings.adEnforcer.registerContainer(this.vv,this.Fv),this.nf.push(this.settings.adEnforcer.onEnforcerEvent.subscribe((t=>{this.Gv(t)}))),this.settings.adEnforcer.start(Dt.All)}Wv(){return this.settings.adSlotContainerRecycler.requestAdSlot(this.settings.adContainer)}hu(){this.bl=!0,(0,m.IV)(this.vv,zt),(0,m.IV)(this.vv,this.jv),this.dv.removeAttribute("id"),this.vv.removeAttribute("id"),(0,pt.i)(this.nf),this.kv(),this.settings.adEnforcer.deregisterContainer(this.vv),this.settings.viewabilityService.off(this.dv,this.Mv),null!==this.xv&&this.uv.clearTimeout(this.xv),this.Jv()}Jv(){this.xv=this.uv.setTimeout((()=>{this.settings.adSlotContainerRecycler.destroyAdSlot(this.gv)}),500)}Tv(){const{advertiserLineItemId:t,publisherLineItemId:i}=this.settings.adManagerLineItem.protoLineItem;this.Sv.next({advertiserLineItemId:t,publisherLineItemId:i,rtbSeatId:this.settings.requestMetadata.data.rtbSeatId,dspId:this.settings.requestMetadata.data.dspId})}qv(){const t=Ft.fJ,i=this.dv;this.settings.viewabilityService.on(i,this.Mv,{threshold:t}),this.Mv(this.settings.viewabilityService.check({threshold:t,element:i}))}kv(){Object.keys(this.Bv).forEach((t=>{this.Cv(t).clearTimeout()}))}zv(t){return!(!this.yv&&(t.type===g.fI.AdStopped||t.type===g.fI.AdSkipped))}Gv(t){if(t.detectedContainer!==this.vv)return;let e;switch(t.type){case Bt.BADURI_DETECTED:e="AdManager_enforcer_BadUri";break;case Bt.MALWARE_DETECTED:e="AdManager_enforcer_malware",this.Pv({type:g.fI.AdError,payload:{errorMessage:Vt.EnforcementMalware}});break;case Bt.VOLUME_DETECTED:e="AdManager_enforcer_soundBlock",this.Pv({type:g.fI.AdError,payload:{errorMessage:Vt.EnforcementVolume}})}(0,i.n)({message:e,exception:t.message,level:i.D.WARN})}Qv(t,e,s){const n=this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,r=this.creativeId;(0,i.n)({message:`AdManager_${t}_${e}`,exception:`advertiserLineItemId:${n}_creativeId:${r}_errorMessage:${null==s?void 0:s.message}`,callStack:null==s?void 0:s.stack,level:i.D.WARN},{throttle:5})}}var Gt;!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"]}(Gt||(Gt={}));var Jt=n(3640);class Qt extends jt{constructor(t,i,e,s,n,r,h){super(),this.Xv=t,this.Zt=i,this.Yv=e,this.Kv=s,this.Zv=n,this.tg=r,this.ig=h,this.eg=new x.x,this.sg=t=>{if(!this.ng(t))return;let i="";try{i=t.getError().getMessage()+"_"+t.getError().getErrorCode()+"_"+t.getError().getVastErrorCode()}catch(t){}this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.ImaError+"_"+i}})},this.rg=t=>{const i=this.Xv.AdEvent.Type;switch(t.type){case i.CLICK:this.hf.next({type:g.fI.AdClickThru,payload:{}});break;case i.LOADED:this.Is(t);break;case i.IMPRESSION:const e={adsManager:this.Zv,adContainer:this.hg,viewMode:this.ag(this.cg),adTag:this.Kv};this.hf.next({type:g.fI.AdVideoStart}),this.hf.next({type:g.fI.AdImpression,payload:{imaMetadata:e}});break;case i.STARTED:this.hf.next({type:g.fI.AdStarted});break;case i.FIRST_QUARTILE:this.hf.next({type:g.fI.AdVideoFirstQuartile});break;case i.MIDPOINT:this.hf.next({type:g.fI.AdVideoMidpoint});break;case i.THIRD_QUARTILE:this.hf.next({type:g.fI.AdVideoThirdQuartile});break;case i.COMPLETE:this.hf.next({type:g.fI.AdVideoComplete}),this.hf.next({type:g.fI.AdStopped,payload:{shouldTrackPostBid:!0}});break;case i.ALL_ADS_COMPLETED:break;case i.DURATION_CHANGE:this.hf.next({type:g.fI.AdDurationChange});break;case i.PAUSED:this.hf.next({type:g.fI.AdPaused});break;case i.RESUMED:this.hf.next({type:g.fI.AdPlaying});break;case i.LINEAR_CHANGED:this.hf.next({type:g.fI.AdLinearChange});break;case i.SKIPPABLE_STATE_CHANGED:this.hf.next({type:g.fI.AdSkippableStateChange});break;case i.SKIPPED:this.hf.next({type:g.fI.AdSkipped});break;case i.VOLUME_CHANGED:this.hf.next({type:g.fI.AdVolumeChange});break;case i.USER_CLOSE:this.hf.next({type:g.fI.AdUserClose});break;case i.LOG:this.hf.next({type:g.fI.AdLog})}},this.ug()}get onCreativeReceived(){return this.eg.asObservable()}initAd(t,i,e,s,n,r){this.hg=r.slot,this.dg=r.videoSlot,this.cg=e||g.zc.Normal;try{this.Zv.setVolume(0),this.Zv.init(t,i,this.ag(this.cg))}catch(t){this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.ImaManagerInit}})}}startAd(){try{this.Zv.start()}catch(t){this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.WrapperStartAdError+`_${t.message}`}})}}stopAd(t){this.Zv.stop(),this.hf.next({type:g.fI.AdStopped,payload:{shouldTrackPostBid:!0}})}resizeAd(t,i,e){this.Zv.resize(t,i,this.ag(e))}pauseAd(){this.Zv.pause()}resumeAd(){this.Zv.resume(),this.Zt===dt.M.Ios&&(0,m.UR)(this.dg)}expandAd(){this.Zv.expand()}collapseAd(){this.Zv.collapse()}skipAd(){this.Zv.skip()}getAdRemainingTime(){return this.Zv.getRemainingTime()||0}getAdDuration(){return this.pg?this.pg.getDuration():0}getAdVolume(){return this.Zv.getVolume()}getAdMediaWidth(){return this.pg?this.pg.getVastMediaWidth():0}getAdMediaHeight(){return this.pg?this.pg.getVastMediaHeight():0}setAdVolume(t){this.Zv.setVolume(t)}getMediaFile(){return this.pg?this.pg.getMediaUrl():void 0}ug(){this.Yv.addEventListener(this.Xv.AdErrorEvent.Type.AD_ERROR,this.sg),this.Zv.addEventListener(this.Xv.AdErrorEvent.Type.AD_ERROR,this.sg),Object.keys(this.Xv.AdEvent.Type).forEach((t=>{this.Zv.addEventListener(this.Xv.AdEvent.Type[t],this.rg,!1)}))}fg(){this.Yv.removeEventListener(this.Xv.AdErrorEvent.Type.AD_ERROR,this.sg),this.Zv.removeEventListener(this.Xv.AdErrorEvent.Type.AD_ERROR,this.sg),Object.keys(this.Xv.AdEvent.Type).forEach((t=>{this.Zv.removeEventListener(this.Xv.AdEvent.Type[t],this.rg,!1)}))}ag(t){return t===g.zc.Fullscreen?this.Xv.ViewMode.FULLSCREEN:this.Xv.ViewMode.NORMAL}vg(t){return Gt.BANNED_IMA_ADS_ID.some((i=>i===t))}ng(t){const i=t.getUserRequestContext();return!i||i.id===this.tg.id}Is(t){if(this.pg=t.getAd(),this.vg(this.pg.getAdId()))return void this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.VpaidInvalid}});this.eg.next(this.pg.getCreativeId());let i=-1,e="";try{i=this.pg.getSkipTimeOffset();const s=t.getAdData().clickThroughUrl;e=(0,P.QM)(s)?s:void 0}catch(t){}(0,Jt.A)(this.ig,e).then((t=>{t?this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.DomainBlocked}}):this.hf.next({type:g.fI.AdLoaded,payload:{skipOffset:i}})}))}destroy(){try{this.fg(),setTimeout((()=>{this.Zv.destroy()}))}catch(t){}}}const Xt={ImaObjectNotFound:Vt.ImaObjectNotFound,ImaScriptFailure:Vt.ImaScriptFailure},Yt="//imasdk.googleapis.com/js/sdkloader/ima3.js";class Kt{static preloadImaSdk(t){(0,m._w)(Yt,t)}static fetchImaSdk(t,e){return new Promise(((s,n)=>{const r=Kt.gg(t);if(r)return void s(r);const h=e&&1===(0,ut.Vm)([95,5]);(0,m.dZ)({src:Yt},t.document.head,t,(()=>{const e=Kt.gg(t);e?s(e):(h&&(0,i.n)({message:"AdManager_ImaIntegrator_no_image_object_found_after_loading_script",level:i.D.CRITICAL},{throttle:2,sendMaxLog:!1}),n(Xt.ImaObjectNotFound))}),(()=>{n(Xt.ImaScriptFailure)}),h,"AdManager_ImaIntegrator_unable_to_insert_ima_sdk_script")}))}static gg(t){return t.google&&t.google.ima}}class Zt extends Wt{constructor(t,i){super(t,i),this.uv=t,this.settings=i,this.gv=null,this.adMediaType="ima",this.adSourceType=s.ProtoAdsourceTypeEnum.Ima,this.mg=[],this.gv=this.settings.imaAdSlotContainer,this.yg=new Qt(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.bg(),this.mg.push(this.yg.onVpaidEvent.subscribe((t=>{this.Pv(t)})),this.yg.onCreativeReceived.subscribe((t=>{this.creativeId=t}))),this.yg.initAd(t,i,e,s,n,{slot:this.dv,videoSlot:this.fv})}catch(t){this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.AdaptorInitAdError+`_${t.message}`}})}}startAd(){try{super.startAd(),this.yg.startAd()}catch(t){this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.AdaptorStartAdError+`_${t.message}`}})}}stopAd(t){try{super.stopAd(t),this.yg.stopAd(t)}catch(t){this.Qv("ImaBidAdaptor","stopAd",t)}}resizeAd(t,i,e){try{this.yg.resizeAd(t,i,e)}catch(t){this.Qv("ImaBidAdaptor","resizeAd",t)}}pauseAd(){try{this.yg.pauseAd()}catch(t){this.Qv("ImaBidAdaptor","pauseAd",t)}}resumeAd(){try{this.yg.resumeAd()}catch(t){this.Qv("ImaBidAdaptor","resumeAd",t)}}expandAd(){try{this.yg.expandAd()}catch(t){this.Qv("ImaBidAdaptor","expandAd",t)}}collapseAd(){try{this.yg.collapseAd()}catch(t){this.Qv("ImaBidAdaptor","collapseAd",t)}}skipAd(){try{super.skipAd(),this.yg.skipAd()}catch(t){this.Qv("ImaBidAdaptor","skipAd",t)}}getAdRemainingTime(){try{return this.yg.getAdRemainingTime()}catch(t){return this.Qv("ImaBidAdaptor","getAdRemainingTime",t),0}}getAdDuration(){try{return this.yg&&this.yg.getAdDuration()||this.settings.adManagerLineItem.protoLineItem.duration}catch(t){return this.Qv("ImaBidAdaptor","getAdDuration",t),0}}getAdVolume(){try{return this.yg.getAdVolume()}catch(t){return this.Qv("ImaBidAdaptor","getAdVolume",t),0}}getAdMediaSize(){return{width:this.yg.getAdMediaWidth(),height:this.yg.getAdMediaHeight()}}setAdVolume(t){try{super.setAdVolume(t),this.yg.setAdVolume(t)}catch(t){this.Qv("ImaBidAdaptor","setAdVolume",t)}}get adVideoUrl(){return this.yg.getMediaFile()}get declaredDurationInSeconds(){return this.yg.getAdDuration()}Nv(t){const i=super.Nv(t);return i.payload.adSourceData.imaMetadata=t.payload.imaMetadata,i}Wv(){return this.gv}Jv(){this.settings.adSlotContainerRecycler.recycleAdSlot(this.gv)}bg(){Kt.fetchImaSdk(this.settings.globalDomUtilsService.getGlobalClosestTop().topFrame,!1)}hu(){try{super.hu(),(0,pt.i)(this.mg),this.yg.destroy()}catch(t){this.Qv("ImaBidAdaptor","_destroy",t)}}}class ti{constructor(t,i,e,s,n,r,h){this.Xv=t,this.Yv=i,this.Tu=e,this.Cu=s,this.Kv=n,this.dg=r,this.Ue=h,this.wg=new x.x,this.xg=new x.x,this.Sg={id:(0,ut.qs)()},this.Zv=null,this.sg=t=>{if(!this.ng(t))return;switch(t.getError().getErrorCode()){case this.Xv.AdError.ErrorCode.VAST_EMPTY_RESPONSE:this._g(Ot.ImaVastEmptyResponse);break;case this.Xv.AdError.ErrorCode.VAST_WRAPPER_ERROR:case this.Xv.AdError.ErrorCode.VAST_MALFORMED_RESPONSE:this._g(Ot.ImaInvalidResponse);break;default:this._g(Ot.ImaRequestException)}},this.Ag=t=>{this.ng(t)&&(this.Zv=t.getAdsManager(this.dg,{loadVideoTimeout:25*ht.s_}),this.Pg(),this.wg.next({imaAdsManager:this.Zv,requestAdsContext:this.Sg}))},this.Yv.addEventListener(this.Xv.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.Ag),this.Yv.addEventListener(this.Xv.AdErrorEvent.Type.AD_ERROR,this.sg)}get onSuccess(){return this.wg.asObservable()}get onError(){return this.xg.asObservable()}loadAd(){const t=new this.Xv.AdsRequest;t.adTagUrl=this.Kv,t.linearAdSlotWidth=t.nonLinearAdSlotWidth=this.Tu,t.linearAdSlotHeight=t.nonLinearAdSlotHeight=this.Cu,t.pageUrl=this.Ue,this.Yv.requestAds(t,this.Sg)}_g(t){this.xg.next(t)}Pg(){this.Yv.removeEventListener(this.Xv.AdsManagerLoadedEvent.Type.ADS_MANAGER_LOADED,this.Ag),this.Yv.removeEventListener(this.Xv.AdErrorEvent.Type.AD_ERROR,this.sg)}ng(t){const i=t.getUserRequestContext();return!i||i.id===this.Sg.id}destroy(){var t;try{this.Pg(),null===(t=this.Zv)||void 0===t||t.destroy()}catch(t){}}}var ii;!function(t){t[t.Transient=0]="Transient",t[t.Singleton=1]="Singleton",t[t.ResolutionScoped=2]="ResolutionScoped",t[t.ContainerScoped=3]="ContainerScoped"}(ii||(ii={}));const ei=ii;var si=function(t,i){return si=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])},si(t,i)};function ni(t,i){function e(){this.constructor=t}si(t,i),t.prototype=null===i?Object.create(i):(e.prototype=i.prototype,new e)}function ri(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 hi(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 oi(){for(var t=[],i=0;i<arguments.length;i++)t=t.concat(hi(arguments[i]));return t}function ai(t){return!!t.useClass}function ci(t){return!!t.useFactory}var li=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,oi(i))}})),i},t}();function ui(t){return"string"==typeof t||"symbol"==typeof t}function di(t){return"object"==typeof t&&"token"in t&&"transform"in t}function pi(t){return!!t.useToken}function fi(t){return null!=t.useValue}const vi=function(){function t(){this.kg=new Map}return t.prototype.entries=function(){return this.kg.entries()},t.prototype.getAll=function(t){return this.ensure(t),this.kg.get(t)},t.prototype.get=function(t){this.ensure(t);var i=this.kg.get(t);return i[i.length-1]||null},t.prototype.set=function(t,i){this.ensure(t),this.kg.get(t).push(i)},t.prototype.setAll=function(t,i){this.kg.set(t,i)},t.prototype.has=function(t){return this.ensure(t),this.kg.get(t).length>0},t.prototype.clear=function(){this.kg.clear()},t.prototype.ensure=function(t){this.kg.has(t)||this.kg.set(t,[])},t}();const gi=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return ni(i,t),i}(vi);const mi=function(){this.scopedResolutions=new Map};function yi(t,i,e){var s,n,r=hi(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=" "),oi([s],e.message.split("\n").map((function(t){return n+t}))).join("\n")}var bi=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return ni(i,t),i}(vi),wi=function(t){function i(){return null!==t&&t.apply(this,arguments)||this}return ni(i,t),i}(vi);const xi=function(){this.preResolution=new bi,this.postResolution=new wi};var Si=new Map,_i=function(){function t(t){this.parent=t,this.Tg=new gi,this.interceptors=new xi}return t.prototype.register=function(t,i,e){var s;if(void 0===e&&(e={lifecycle:ei.Transient}),s=function(t){return ai(t)||fi(t)||pi(t)||ci(t)}(i)?i:{useClass:i},pi(s))for(var n=[t],r=s;null!=r;){var h=r.useToken;if(n.includes(h))throw new Error("Token registration cycle detected! "+oi(n,[h]).join(" -> "));n.push(h);var o=this.Tg.get(h);r=o&&pi(o.provider)?o.provider:null}if((e.lifecycle===ei.Singleton||e.lifecycle==ei.ContainerScoped||e.lifecycle==ei.ResolutionScoped)&&(fi(s)||ci(s)))throw new Error('Cannot use lifecycle "'+ei[e.lifecycle]+'" with ValueProviders or FactoryProviders');return this.Tg.set(t,{provider:s,options:e}),this},t.prototype.registerType=function(t,i){return ui(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(ui(t)){if(ui(i))return this.register(t,{useToken:i},{lifecycle:ei.Singleton});if(i)return this.register(t,{useClass:i},{lifecycle:ei.Singleton});throw new Error('Cannot register a type name as a singleton without a "to" token')}var e=t;return i&&!ui(i)&&(e=i),this.register(t,{useClass:e},{lifecycle:ei.Singleton})},t.prototype.resolve=function(t,i){void 0===i&&(i=new mi);var e=this.getRegistration(t);if(!e&&ui(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 li}(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=ri(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=ri(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===ei.ResolutionScoped&&i.scopedResolutions.has(t))return i.scopedResolutions.get(t);var e,s=t.options.lifecycle===ei.Singleton,n=t.options.lifecycle===ei.ContainerScoped,r=s||n;return e=fi(t.provider)?t.provider.useValue:pi(t.provider)?r?t.instance||(t.instance=this.resolve(t.provider.useToken,i)):this.resolve(t.provider.useToken,i):ai(t.provider)?r?t.instance||(t.instance=this.construct(t.provider.useClass,i)):this.construct(t.provider.useClass,i):ci(t.provider)?t.provider.useFactory(this):this.construct(t.provider,i),t.options.lifecycle===ei.ResolutionScoped&&i.scopedResolutions.set(t,e),e},t.prototype.resolveAll=function(t,i){var e=this;void 0===i&&(i=new mi);var s=this.getAllRegistrations(t);if(!s&&ui(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.Tg.has(t)||i&&(this.parent||!1)&&this.parent.isRegistered(t,!0)},t.prototype.reset=function(){this.Tg.clear(),this.interceptors.preResolution.clear(),this.interceptors.postResolution.clear()},t.prototype.clearInstances=function(){var t,i;try{for(var e=ri(this.Tg.entries()),s=e.next();!s.done;s=e.next()){var n=hi(s.value,2),r=n[0],h=n[1];this.Tg.setAll(r,h.filter((function(t){return!fi(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=ri(this.Tg.entries()),r=n.next();!r.done;r=n.next()){var h=hi(r.value,2),o=h[0],a=h[1];a.some((function(t){return t.options.lifecycle===ei.ContainerScoped}))&&s.Tg.setAll(o,a.map((function(t){return t.options.lifecycle===ei.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.Tg.get(t):this.parent?this.parent.getRegistration(t):null},t.prototype.getAllRegistrations=function(t){return this.isRegistered(t)?this.Tg.getAll(t):this.parent?this.parent.getAllRegistrations(t):null},t.prototype.construct=function(t,i){var e=this;if(t instanceof li)return t.createProxy((function(t){return e.resolve(t,i)}));var s=Si.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,oi([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?di(s)?s.multiple?(r=e.resolve(s.transform)).transform.apply(r,oi([e.resolveAll(s.token)],s.transformArgs)):(h=e.resolve(s.transform)).transform.apply(h,oi([e.resolve(s.token,t)],s.transformArgs)):s.multiple?e.resolveAll(s.token):e.resolve(s.token,t):di(s)?(o=e.resolve(s.transform,t)).transform.apply(o,oi([e.resolve(s.token,t)],s.transformArgs)):e.resolve(s,t)}catch(t){throw new Error(yi(i,n,t))}}},t}(),Ai=new _i;var Pi="injectionTokens";const ki=function(){return function(t){Si.set(t,function(t){var i=Reflect.getMetadata("design:paramtypes",t)||[],e=Reflect.getOwnMetadata(Pi,t)||{};return Object.keys(e).forEach((function(t){i[+t]=e[t]})),i}(t))}};const Ii=function(){return function(t){ki()(t),Ai.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 Ti{constructor(t=Ai){this.Cg=t}static getInstance(){return this.Mg||(this.Mg=new Ti),this.Mg}static getGlobalContainer(){return this.getInstance().globalContainer}get globalContainer(){return this.Cg}}var Ci=n(655),Mi=n(5720),Ei=function(t){function i(i,e){return t.call(this)||this}return(0,Ci.ZT)(i,t),i.prototype.schedule=function(t,i){return void 0===i&&(i=0),this},i}(Mi.w0),Li={setInterval:function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var e=Li.delegate;return((null==e?void 0:e.setInterval)||setInterval).apply(void 0,(0,Ci.ev)([],(0,Ci.CR)(t)))},clearInterval:function(t){var i=Li.delegate;return((null==i?void 0:i.clearInterval)||clearInterval)(t)},delegate:void 0},Oi=n(3699),Ri=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,Ci.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),Li.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;Li.clearInterval(i)},i.prototype.execute=function(t,i){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var e=this.Eg(t,i);if(e)return e;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},i.prototype.Eg=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,Oi.P)(s,this),null!=i&&(this.id=this.recycleAsyncId(e,i,null)),this.delay=null,t.prototype.unsubscribe.call(this)}},i}(Ei),Bi={now:function(){return(Bi.delegate||Date).now()},delegate:void 0},Di=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=Bi.now,t}(),ji=new(function(t){function i(i,e){void 0===e&&(e=Di.now);var s=t.call(this,i,e)||this;return s.actions=[],s.Og=!1,s.Rg=void 0,s}return(0,Ci.ZT)(i,t),i.prototype.flush=function(t){var i=this.actions;if(this.Og)i.push(t);else{var e;this.Og=!0;do{if(e=t.execute(t.state,t.delay))break}while(t=i.shift());if(this.Og=!1,e){for(;t=i.shift();)t.unsubscribe();throw e}}},i}(Di))(Ri),Fi=ji,$i=n(1480),Vi=n(8474);function Ui(t){return t&&(0,Vi.m)(t.schedule)}function Ni(t,i,e){void 0===t&&(t=0),void 0===e&&(e=Fi);var s=-1;return null!=i&&(Ui(i)?e=i:s=i),new $i.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 Hi,zi=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},qi=function(t,i){if("object"==typeof Reflect&&"function"==typeof Reflect.metadata)return Reflect.metadata(t,i)};let Wi=Hi=class{constructor(){var t,i;this.Bg=new Map,this.Dg=0,this.jg=(void 0===(t=Hi.TIME_BETWEEN_TICKS)&&(t=0),void 0===i&&(i=ji),t<0&&(t=0),Ni(t,t,i)),this.jg.subscribe((()=>this.Fg()))}setTimeout(t,i=0){return this.$g(t,i,!0)}clearTimeout(t){this.Bg.delete(t)}setInterval(t,i=0){return this.$g(t,i,!1)}clearInterval(t){this.Bg.delete(t)}Vg(t){try{t.callback()}catch(t){(0,i.n)({message:"TimerService_error",callStack:t.stack,exception:t.message,level:i.D.INFO},{throttle:1})}}Fg(){const t=(new Date).getTime(),i=[];for(const[e,s]of this.Bg)t-s.startTime<s.duration*(s.intervalTimesCalled+1)||(this.Vg(s),s.isTimeout?i.push(e):s.intervalTimesCalled++);for(const t of i)this.Bg.delete(t)}$g(t,i,e){const s=++this.Dg;return this.Bg.set(s,{startTime:(new Date).getTime(),isTimeout:e,callback:t,duration:i,intervalTimesCalled:0}),s}};Wi.TIME_BETWEEN_TICKS=100,Wi=Hi=zi([Ii(),qi("design:paramtypes",[])],Wi);class Gi{constructor(t){this.settings=t,this.Ug=!1,this.Hg=[],this.metrics={created:(new Date).getTime()}}fetchBid(){this.metrics.fetchStart=(new Date).getTime(),this.zg=this.settings.adSlotContainerRecycler.requestAdSlotIma(this.settings.adContainer);const t=new Promise(((t,i)=>{setTimeout((()=>{i(Ot.ImaTimeout)}),25e3)})),i=this.qg(this.zg);return Promise.race([i,t]).then((t=>(this.metrics.fetchEnd=(new Date).getTime(),this.Ug=!0,this.Wg&&(0,pt.i)(this.Hg),t))).catch((t=>{throw this.metrics.fetchEnd=(new Date).getTime(),this.Ug=!0,this.Wg&&((0,pt.i)(this.Hg),this.Wg.destroy(),this.settings.adSlotContainerRecycler.recycleAdSlot(this.zg)),t}))}qg(t){return t.fetchImaDependencies().then((t=>(this.Jg=t,this.Qg(t)))).then((t=>this.Xg(t))).catch((t=>{throw(0,P.$K)(t)?t:Ot.ImaRequestException}))}Qg(t){return this.Ug?Promise.reject():new Promise(((i,e)=>{const s=this.Yg();this.Wg=new ti(t.imaSdk,t.imaAdsLoader,s.width,s.height,this.settings.url,this.zg.videoSlot,this.settings.pageUrl),this.Hg.push(this.Wg.onSuccess.subscribe((t=>{i(t)})),this.Wg.onError.subscribe((t=>{e(t)}))),this.Wg.loadAd()}))}Yg(){return this.settings.callingState.adContainerState.get(this.settings.adManagerLineItem.protoLineItem.adType)}Xg(t){const i=Ti.getGlobalContainer().resolve(Wi);return new Zt(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.Jg.imaSdk,imaAdsLoader:this.Jg.imaAdsLoader,imaAdsManager:t.imaAdsManager,requestAdsContext:t.requestAdsContext,imaAdSlotContainer:this.zg,bidSlotId:this.settings.bidSlotId,pageUrl:this.settings.pageUrl,urlSuffixerService:this.settings.urlSuffixerService})}}var Ji,Qi,Xi,Yi=n(2324);!function(t){t[t.Javascript=0]="Javascript",t[t.Video=1]="Video"}(Ji||(Ji={})),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,"&")}}(Qi||(Qi={}));class Ki{constructor(t){this.Kg=["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.Zg="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=Qi.getKeyValue(t)}isSupported(){return!("application/x-shockwave-flash"===this.type||"video/x-flv"===this.type)}getMediaFileType(){return this.apiFramework===this.Zg||(0,a.d3)(this.type,this.Kg)?Ji.Javascript:Ji.Video}}class Zi{constructor(t){this.clickThrough=void 0,this.clickTrackings=[],this.customClicks=[],this.clickThrough=Qi.getKeyValue(t.clickthrough),this.clickTrackings=this.tm((0,a.qo)(t.clicktracking)),this.customClicks=this.tm((0,a.qo)(t.customclick))}tm(t){const i=[];return void 0!==t[0]&&t.forEach((t=>{i.push(Qi.getKeyValue(t))})),i}}class te{constructor(t){this.duration=void 0,this.mediaFiles=[],this.trackingEvents=[],this.skipoffset=void 0,this.videoClicks=void 0,this.duration=(0,Yi.pP)(Qi.getKeyValue(t.duration)),this.skipoffset=(0,Yi.QI)(t.keyAttributes.skipoffset,this.duration),t.mediafiles&&(this.mediaFiles=this.im((0,a.qo)(t.mediafiles.mediafile))),t.trackingevents&&(this.trackingEvents=Xi.parseTrackingEvents((0,a.qo)(t.trackingevents.tracking),this.duration)),t.videoclicks&&(this.videoClicks=new Zi(t.videoclicks)),t.adparameters&&(this.adParameters=Qi.getKeyValue(t.adparameters),t.adparameters["@xmlEncoded"]&&(this.adParameters=Qi.decodeXMLText(this.adParameters)))}im(t){const i=[];return void 0!==t[0]&&t.forEach((t=>{const e=new Ki(t);e.isSupported()&&i.push(e)})),i}isSupported(){return!0}}class ie{constructor(t){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,Yi.pP)(t.keyAttributes.minsuggestedduration),this.nonLinearClickThrough=t.nonlinearclickthrough.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,i.n)({message:"AdManager_NonLinearAd_VPAID_found",level:i.D.INFO}),!1):this.width&&this.height?!(!this.staticResource.creativeType||!this.staticResource.uri)||(this.htmlResource.uri&&(0,i.n)({message:"AdManager_NonLinearAd_htmlResource_found",level:i.D.INFO}),this.iframeResource.uri&&(0,i.n)({message:"AdManager_NonLinearAd_iframeResource_found",level:i.D.INFO}),!1):((0,i.n)({message:"AdManager_NonLinearAd_no_dimensions",level:i.D.INFO}),!1)}}class ee{constructor(t){this.nonLinearAdList=[],this.trackingEvents=[],t.nonlinear&&(this.nonLinearAdList=this.nm((0,a.qo)(t.nonlinear))),t.trackingevents&&(this.trackingEvents=Xi.parseTrackingEvents((0,a.qo)(t.trackingevents.tracking))),t.adparameters&&(this.adParameters=Qi.getKeyValue(t.adparameters),t.adparameters["@xmlEncoded"]&&(this.adParameters=Qi.decodeXMLText(this.adParameters)))}isSupported(){return!0}nm(t){const i=[];return t.forEach((t=>{const e=new ie(t);e.isSupported()&&i.push(e)})),i}}class se{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 te(t.linear)}catch(t){(0,i.n)({callStack:t.stack,level:i.D.WARN,exception:t.message,message:"Creative_Linear"})}if(t.nonlinearads)try{this.nonLinear=new ee(t.nonlinearads)}catch(t){(0,i.n)({callStack:t.stack,level:i.D.WARN,exception:t.message,message:"Creative_NonLinear"})}}isSupported(){return!0}}class ne{constructor(t,i){this.name=t.keyAttributes.event,this.uri=Qi.getKeyValue(t),"progress"===this.name&&(this.offset=(0,Yi.QI)(t.keyAttributes.offset,i))}}!function(t){function i(t){const i=[];return void 0!==t[0]&&t.forEach((t=>{i.push(Qi.getKeyValue(t))})),i}t.parseImpressions=function(t){return i(t)},t.parseCretives=function(t){const i=[];return t.forEach((t=>{i.push(new se(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 ne(t,i))})),e}}(Xi||(Xi={}));class re{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=Qi.getKeyValue(t.adtitle),this.adSystem=Qi.getKeyValue(t.adsystem),this.impressions=Xi.parseImpressions((0,a.qo)(t.impression)),this.creatives=(null===(i=t.creatives)||void 0===i?void 0:i.creative)?Xi.parseCretives((0,a.qo)(t.creatives.creative)):[],this.description=Qi.getKeyValue(t.description),this.advertiser=Qi.getKeyValue(t.advertiser),this.surveys=Qi.getKeyValue(t.survey),this.errors=Xi.parseErrors((0,a.qo)(t.error)),this.pricing=Qi.getKeyValue(t.pricing),this.extensions=Qi.getKeyValue(t.extensions)}isSupported(){return!0}}class he{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=Qi.getKeyValue(t.adsystem),this.impressions=Xi.parseImpressions((0,a.qo)(t.impression)),this.VASTAdTagURI=Qi.getKeyValue(t.vastadtaguri),this.creatives=(null===(i=t.creatives)||void 0===i?void 0:i.creative)?Xi.parseCretives((0,a.qo)(t.creatives.creative)):[],this.errors=Xi.parseErrors((0,a.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 oe{constructor(t){Array.isArray(t)?this.rm(t):this.hm(t)}isSupported(){return!0}hm(t){this.id=t.keyAttributes.id,this.sequence=t.keyAttributes.sequence,t.inline?this.inLine=new re(t.inline):t.wrapper&&(this.wrapper=new he(t.wrapper))}rm(t){const i=t.filter((t=>{const i=this.om(t).filter((t=>t.linear));return!!(0,a.BZ)(i)}));(0,a.BZ)(i)&&this.hm(i[0])}om(t){return t.inline?(0,a.qo)(t.inline.creatives.creative):t.wrapper?(0,a.qo)(t.wrapper.creatives.creative):[]}}class ae{constructor(t=2){this.am=t}parseVastXml(t){try{if(!this.lm(t))return{error:!0,errorReason:Ot.XmlInvalidString};if(this.um(t))return{error:!0,errorReason:Ot.XmlInvalidAd};const i=(new DOMParser).parseFromString(t,"application/xml"),e=new Qi.JXONTree(i.documentElement);if(!this.dm(e,this.am))return{error:!0,errorReason:Ot.XmlInvalidTree};const s=new oe(e.ad);return this.pm(s)?{error:!1,result:s}:{error:!0,errorReason:Ot.XmlInvalidAd}}catch(t){return{error:!0,errorReason:Ot.XmlParseGeneral}}}lm(t){return(0,P.QM)(t)}um(t){return Gt.KEYWORDS_FOR_BANNED_VAST.some((i=>t.includes(i)))}dm(t,i){if(!t.ad)return!1;const e=parseInt(t.keyAttributes.version,10);return!(e&&e<i)}pm(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,a.BZ)(t)&&!(0,a.BZ)(i))return!1}return!0}}class ce{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.Qf(t.inLine.creatives)):t.wrapper&&this.Qf(t.wrapper.creatives)}))}Yf(t){this.duration=t.duration,this.fm(t.mediaFiles),this.vm(t.skipoffset),this.gm(t.adParameters),t.videoClicks&&t.videoClicks.clickThrough&&this.bm(t.videoClicks.clickThrough)}wm(t){this.xm(t.nonLinearAdList),this.gm(t.adParameters)}xm(t){this.nonLinearFiles=[...this.nonLinearFiles,...t]}gm(t){this.adParameters=t}vm(t){this.skipoffset=t}fm(t){this.mediaFiles=[...this.mediaFiles,...t]}bm(t){this.linearClickThrough=t}Qf(t){t.forEach((t=>{this.creativeId=t.id,t.linear&&this.Yf(t.linear),t.nonLinear&&this.wm(t.nonLinear)}))}}var le,ue=n(2817);!function(t){t[t.FirstQuartile=0]="FirstQuartile",t[t.SecondQuartile=1]="SecondQuartile",t[t.ThirdQuartile=2]="ThirdQuartile",t[t.FourthQuartile=3]="FourthQuartile"}(le||(le={}));var de,pe,fe=n(5874);function ve(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.Top=1]="Top",t[t.Bottom=2]="Bottom",t[t.Right=4]="Right",t[t.Left=8]="Left",t[t.Middle=16]="Middle"}(de||(de={}));class ge extends h._{constructor(t,i,e,s,n){super(),this.mediator=t,this.Sr=i,this._m=e,this.Qt=n,this.Am=i.createElementByString(s)}getContainer(){return this.Am}getCoordinates(t){const i=this.Sr.getElementCoordinates(this.Am);return this.Qt&&t?((t&de.Top)===de.Top&&(i.clientY-=this.Am.clientHeight),(t&de.Right)===de.Right&&(i.clientX+=this.Am.clientWidth)):i.clientX+=i.width/2,i}showComponent(t=!1){if(!this.Am||!this.Am.parentElement)return;const i=(0,m.pv)(this.Am.parentElement,"cnx-ui-btn")?this.Am.parentElement:this.Am;t&&(0,m.GF)(i)?(0,m.Ji)(i):(0,m.Ho)(i)}hideComponent(t=!1){if(!this.Am||!this.Am.parentElement)return;const i=(0,m.pv)(this.Am.parentElement,"cnx-ui-btn")?this.Am.parentElement:this.Am;t&&!(0,m.GF)(i)?(0,m.U6)(i,(()=>(0,m.MV)(i))):(0,m.MV)(i)}destroy(){this.Am.innerHTML="",this.Am.style.display="none",this._m.unregisterAll(this)}}!function(t){t[t.SimpleMenuItem=0]="SimpleMenuItem",t[t.ToggleMenuItem=1]="ToggleMenuItem",t[t.SubmenuMenuItem=2]="SubmenuMenuItem"}(pe||(pe={}));class me extends ge{constructor(t,i,e,s,n,r,h,o){super(t,i,e,s,o),this.eventName=n,this.Pm=r,this.km=h,this.Im=[],this.eventList=[w[w.RebindComponent],fe.Z[fe.Z.HoldStart],fe.Z[fe.Z.HoldEnd],w[w.ContextMenuOpen],w[w.ContextMenuClose]],this.Tm=!1,this.Cm=10,this.Mm=t=>{this.Em.removeChild(t.target),this.Em.style.width=`${this.Am.clientWidth}px`},this.close=t=>{t&&(0,ut.Of)(t.target,c.s6.ContextController,this.Cm)||!1!==this.isOpen&&(this.Tm&&(this.mediator.publish(this,fe.Z[fe.Z.HoldEnd]),(0,m.IV)(this.km,c.Gj.OnHold),this.Tm=!1),this.isOpen=!1,this.mediator.publish(this,w[w.ContextMenuClose]),(0,m.cn)(this.Am,c.Gj.Invisible),this._m.removeGlobalActions(this.Am),this.closeAllSubmenuItems())},this.close(),this.cacheCoordinates(),this.eventList.push(this.eventName),this.Em=this.Am.getElementsByClassName(c.Ng.Container)[0],this.Lm=this.Sr.createElementByString(`<cnx class="${c.Ng.Items}"></cnx>`),this.Em.appendChild(this.Lm),(0,m.cn)(this.Em,c.s6.ContextController)}addNewItemsEvent(t){const i=t.filter((t=>!(0,a.d3)(t,this.eventList)));i.length>0&&(this.eventList=[...this.eventList,...i],this.mediator.publish(this,w[w.RebindComponent],{payload:this.Pm}))}cacheCoordinates(){this.Om=this.Sr.getElementCoordinates(this.km)}positionContextMenu(t){this.cacheCoordinates(),ve(this.Am,t,this.Om,{alignMiddle:this.alignMiddle,alignTop:this.alignTop,forceRight:this.forceRight})}Rm(t){switch(t.type){case pe.SimpleMenuItem:this.close();break;case pe.SubmenuMenuItem:this.Bm(t)}}sendEvent(t,i){this.mediator.publish(this,t,i)}Bm(t){const i=this.Am.clientWidth;t.isOpen?(t.$menuContainer.addEventListener("transitionend",this.Mm),this.Lm.style.left="0px",t.$menuContainer.style.left="0px"):(t.$menuContainer.removeEventListener("transitionend",this.Mm),this.Em.style.width=2*i+"px",this.Em.appendChild(t.$menuContainer),(0,m.Tp)(this.Em),this.Lm.style.left=-i+"px",t.$menuContainer.style.left=-i+"px"),t.isOpen=!t.isOpen}closeAllSubmenuItems(){this.Im.forEach((t=>{t.type===pe.SubmenuMenuItem&&t.isOpen&&this.Bm(t)}))}buildContextMenu(t){let i=[];this.Lm.innerHTML="",this.Em.style.width=`${this.Am.clientWidth}px`,this.Im.forEach((t=>this.unsubscribeAll(t))),this.Im=t,this.Im.forEach((t=>{i=[...i,...t.eventList],t.eventList.forEach((i=>this.subscribe(i,t,(e=>{this.Rm(t),this.sendEvent(i,e)})))),t.initComponent(),this.Lm.appendChild(t.getContainer())})),this.addNewItemsEvent(i)}getAnchorCoordinatesTo(t){return null==t?void 0:t.getCoordinates()}open(t,i=!1){i&&(this.Tm=i,this.mediator.publish(this,fe.Z[fe.Z.HoldStart]),(0,m.cn)(this.km,c.Gj.OnHold)),this.isOpen=!0,this.mediator.publish(this,w[w.ContextMenuOpen]),this.positionContextMenu(t);const e={interactionend:this.close};this._m.addGlobalActions(this.Am,e),(0,m.IV)(this.Am,c.Gj.Invisible)}}class ye extends ge{constructor(t,i,e,s,n){super(t,i,e,s,n),this.eventList=[fe.Z[fe.Z.Scroll],fe.Z[fe.Z.Click]],this.Dm=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.Dm,click:this.onClick};this._m.register(this.Am,this,this._m,t),this.Qt&&(this.subscribe(fe.Z[fe.Z.Click],this._m,(()=>{this.onClickHandler()})),this.relay(fe.Z[fe.Z.Scroll],this._m,this,this.mediator))}destroy(){this.unsubscribeAll(this._m),super.destroy()}}class be extends ye{constructor(t,i,e,s,n){super(t,i,e,be.getTemplate(n),s),this.mediator=t,this.jm=!1,this.type=pe.SimpleMenuItem,this.eventList=[],this.event=n.activeEvent,this.name=n.name,n.eventList?this.eventList=n.eventList:this.eventList.push(this.event),this.Fm=this.Am.getElementsByClassName(c.Ng.ItemTitle)[0],this.$m=this.Am.getElementsByClassName(c.Ng.ItemIcon)[0]}static getTemplate(t){const i=`<cnx class="${c.Ng.ItemIcon}">${t.icon}</cnx>`,e=`<cnx class="${c.Ng.ItemExtra}">${t.label}</cnx>`;return`<cnx class="${c.Ng.ClickOption}">\n ${t.icon?i:""}\n <cnx class="${c.Ng.ItemTitle}">${t.name}</cnx>\n ${t.label?e:""}\n </cnx>`}onClickHandler(t){this.mediator.publish(this,this.event)}changeItemName(t){this.Fm.innerHTML=t}changeItemIcon(t){this.$m.innerHTML=t}get isActive(){return this.jm}set isActive(t){this.jm=t,this.jm?(0,m.cn)(this.Am,c.Gj.Active,c.iu.AccentColor):(0,m.IV)(this.Am,c.Gj.Active,c.iu.AccentColor)}}var we,xe;!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"}(we||(we={}));class Se{constructor(t,i={}){if(this.Um=t,this.Wt=i,this.Nm=0,this.Hm=t=>{t.preventDefault(),this.zm=t.pageY,this.qm=t.pageX,(0,m.cn)(this.Wm,we.PreventSelect),(0,m.cn)(this.Ne.document.body,we.PreventSelect),this.Ne.document.addEventListener("mousemove",this.Gm),this.Ne.document.addEventListener("mouseup",this.Jm)},this.Gm=t=>{const i=this.Wt.horizontal?t.pageX-this.qm:t.pageY-this.zm;this.zm=t.pageY,this.qm=t.pageX,(0,m.PM)(this.Ne,(()=>{this.Wt.horizontal?this.Qm.scrollLeft+=i/this.Xm:this.Qm.scrollTop+=i/this.Xm}))},this.Jm=t=>{(0,m.IV)(this.Wm,we.PreventSelect),(0,m.IV)(this.Ne.document.body,we.PreventSelect),this.Ne.document.removeEventListener("mousemove",this.Gm),this.Ne.document.removeEventListener("mouseup",this.Jm)},this.Ym=t=>{if(!this.Wt.horizontal)return;const i=t.deltaMode?100*(t.deltaY<0?-1:1):t.deltaY,e=Math.floor(i)/33*20,s=this.Nm+e;s>=-1*this.Wm.clientWidth&&s<=this.Qm.scrollWidth-this.Wm.clientWidth&&(this.Nm=s),(0,m.PM)(this.Ne,(()=>this.Qm.scrollLeft=this.Nm))},this.Zm=()=>{clearTimeout(this.ty),this.ty=setTimeout((()=>{this.iy()}),50)},this.iy=()=>{const t=this.Wt.horizontal?this.Qm.scrollWidth:this.Qm.scrollHeight,i=this.Wt.horizontal?this.Um.clientWidth:this.Um.clientHeight;this.Xm=i/t;const e=-1*(this.Um.clientWidth-(this.Wm.clientWidth||4)-4),s=this.Um.clientHeight-this.Wm.clientHeight-4;(0,m.PM)(this.Ne,(()=>{if(this.Xm>=1)(0,m.MV)(this.Wm);else{if((0,m.Ho)(this.Wm),this.Wt.horizontal)return void(0,m.T7)(this.Wm,{width:`${Math.max(100*this.Xm,10)}%`,height:"",top:`${s}px`,right:"",left:this.Qm.scrollLeft/t*100+"%"});(0,m.T7)(this.Wm,{width:"",height:`${Math.max(100*this.Xm,10)}%`,top:this.Qm.scrollTop/t*100+"%",right:`${e}px`,left:""})}}))},this.Ne=(0,m.LT)(t),!this.Ne)throw new Error("window was not found");this.ey(),this.Wm.addEventListener("mousedown",this.Hm),this.Wt.overrideNativeHorizontalScroll&&this.Qm.addEventListener("wheel",this.Ym,{passive:!0}),this.Ne.addEventListener("resize",this.Zm),this.Qm.addEventListener("scroll",this.iy),this.Qm.addEventListener("mouseenter",this.iy),(0,m.cn)(this.Um,we.MainContainer,this.Wt.horizontal?we.Horizontal:void 0,this.Wt.showOnHover?we.ShowOnHover:void 0),this.iy();const e=(0,m.Dx)(this.Um,this.Ne);"0px"===e.height&&"0px"!==e.maxHeight&&(0,m.T7)(this.Um,{height:e.maxHeight})}ey(){for(this.Wm=(0,m.G$)(`<cnx class="${we.Handle}">`,this.Ne),this.sy=(0,m.G$)(`<cnx class="${we.Wrapper}">`,this.Ne),this.Qm=(0,m.G$)(`<cnx class="${we.Content}">`,this.Ne),this.sy.appendChild(this.Qm);this.Um.firstChild;)this.Qm.appendChild(this.Um.firstChild);this.Um.appendChild(this.sy),this.Um.insertAdjacentElement("beforeend",this.Wm)}destroy(){for(this.removeListeners(),(0,m.bX)(this.Wm);this.Qm.firstChild;)this.Um.appendChild(this.Qm.firstChild);(0,m.bX)(this.sy),(0,m.IV)(this.Um,we.MainContainer,we.Horizontal,we.ShowOnHover)}removeListeners(){this.Ne.document.removeEventListener("mousemove",this.Gm),this.Ne.document.removeEventListener("mouseup",this.Jm),this.Wm.removeEventListener("mousedown",this.Hm),this.Qm.removeEventListener("wheel",this.Ym),this.Ne.removeEventListener("resize",this.Zm),this.Qm.removeEventListener("scroll",this.iy),this.Qm.removeEventListener("mouseenter",this.iy)}}class _e extends me{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.ny=[],this.hy=new be(this,this.Sr,this._m,this.Qt,{name:"Off",activeEvent:null}),this.oy=[],this.ly=!1}sendEvent(t){this.updateCaptionSelection(t),this.mediator.publish(this,this.eventName,{payload:{event:t?w[w.CaptionOn]:w[w.CaptionOff],data:t}})}createCaptionsMenu(t){if(this.oy===t)return;0===this.ny.length?this.ny.push(this.hy):this.ny=this.ny.slice(0,1),t.forEach((t=>{this.ny.push(new be(this,this.Sr,this._m,this.Qt,{name:t.title,activeEvent:t.file}))}));const i=this.oy.find((t=>{var i;return t.title===(null===(i=this.uy)||void 0===i?void 0:i.name)}));this.uy&&i&&this.updateCaptionSelection(i.file),(0,m.T7)(this.getContainer(),{height:"auto"}),this.oy=t,this.resizeObserver&&!this.ly&&(this.resizeObserver.on(this.getContainer(),(t=>this.py(t))),this.ly=!0),this.buildContextMenu(this.ny)}initComponent(){}onResize(t){this.cacheCoordinates(),this.isOpen&&this.positionContextMenu(t)}updateCaptionSelection(t){this.ny.forEach((t=>t.isActive=!1));const i=this.oy.find((i=>i.file===t));i?this.uy=this.ny.find((t=>t.name===i.title)):t||(this.uy=this.ny.find((t=>"Off"===t.name))),this.uy&&(this.uy.isActive=!0)}py(t){t.clientHeight>=188&&(0,m.T7)(t,{height:"188px"}),this.vy||(this.vy=new Se(t,{horizontal:!1}),(0,m.cn)(t,c.Gj.HasCustomScrollbar))}}!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.SlideTitle=33]="SlideTitle",t[t.SkipAd=34]="SkipAd",t[t.TopTitle=35]="TopTitle",t[t.TopLogo=36]="TopLogo",t[t.TopSlideTitle=37]="TopSlideTitle",t[t.TopStoryTitle=38]="TopStoryTitle",t[t.TextLabel=39]="TextLabel",t[t.LivePoster=40]="LivePoster",t[t.LiveIcon=41]="LiveIcon",t[t.ElementsCaptionMenu=42]="ElementsCaptionMenu",t[t.NonLinearComponent=43]="NonLinearComponent"}(xe||(xe={}));class Ae extends ye{constructor(){super(...arguments),this.onClick=t=>{this.onInteractionHandler(t),this.onClickHandler(),this.addBoomEffect()}}addBoomEffect(){(0,m.cn)(this.Am,"cnx-boom"),(0,m.Tp)(this.Am),(0,m.cn)(this.Am,"cnx-boom-anim");const t=i=>{"transform"===i.propertyName&&((0,m.IV)(this.Am,"cnx-boom"),(0,m.IV)(this.Am,"cnx-boom-anim"),this.Am.removeEventListener("transitionend",t))};this.Am.addEventListener("transitionend",t)}initComponent(){super.initComponent(),this.Am.appendChild(this.Sr.createElementByString('<cnx class="cnx-boom-elem"></cnx>'))}}class Pe extends Ae{constructor(){super(...arguments),this.eventList=[w[w.HoverStart],w[w.HoverEnd],...this.eventList],this.onStartHover=()=>{(0,m.cn)(this.Am,c.Gj.HoverStart),(0,m.cn)(this.Am,c.Gj.HoverEnd),this.mediator.publish(this,w[w.HoverStart])},this.onEndHover=()=>{(0,m.IV)(this.Am,c.Gj.HoverEnd),this.mediator.publish(this,w[w.HoverEnd])}}initComponent(){super.initComponent(),this.Qt?(this.Am.addEventListener("touchstart",this.onStartHover,{passive:!0}),this.Am.addEventListener("touchend",this.onEndHover),this.Am.addEventListener("touchcancel",this.onEndHover)):(this.Am.addEventListener("mouseenter",this.onStartHover),this.Am.addEventListener("mouseleave",this.onEndHover))}destroy(){this.Qt?(this.Am.removeEventListener("touchstart",this.onStartHover),this.Am.removeEventListener("touchend",this.onEndHover),this.Am.removeEventListener("touchcancel",this.onEndHover)):(this.Am.removeEventListener("mouseenter",this.onStartHover),this.Am.removeEventListener("mouseleave",this.onEndHover)),super.destroy()}onInteractionHandler(t){this.onEndHoverClick()}onEndHoverClick(){(0,m.IV)(this.Am,c.Gj.HoverEnd),(0,m.IV)(this.Am,c.Gj.HoverStart)}}class ke extends Pe{constructor(){super(...arguments),this.eventList=[w[w.Settings],...this.eventList],this.gy="Settings"}onClickHandler(){this.mediator.publish(this,w[w.Settings])}toggleHDFlag(t){t?(0,m.cn)(this.Am,c.Gj.Active):(0,m.IV)(this.Am,c.Gj.Active)}get tooltip(){return this.gy}}const Ie='<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>';class Te extends Pe{constructor(t,i,e,s,n,r=!1,h){super(t,i,e,s,h),this.my=n,this.isActive=r}onClickHandler(){this.isActive=!this.isActive,this.onStateChange()}get isActive(){return this.Wa}set isActive(t){this.Wa=t,this.Wa?(0,m.cn)(this.Am,this.my):(0,m.IV)(this.Am,this.my)}}class Ce extends Te{constructor(){super(...arguments),this.eventList=[w[w.CaptionMenu],w[w.CaptionOn],w[w.CaptionOff],w[w.StateChanged],...this.eventList],this.gy="Closed Captions"}onClickHandler(){this.mediator.publish(this,w[w.CaptionMenu])}onStateChange(){this.mediator.publish(this,this.isActive?w[w.CaptionOn]:w[w.CaptionOff]),this.mediator.publish(this,w[w.StateChanged])}get tooltip(){return this.gy}}const Me='<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 Ee extends ye{constructor(){super(...arguments),this.nd=!1,this.eventList=[w[w.Next]]}onClickHandler(){this.mediator.publish(this,w[w.Next])}show(){this.nd=!0,this.Am.classList.add("cnx-fade-in-up-next")}hide(){this.nd=!1,this.Am.classList.remove("cnx-fade-in-up-next")}isInView(){return this.nd}updateCard(t,i){const e=this.Am.getElementsByTagName("img")[0];e.setAttribute("src",t),e.style.display="none",e.onload=()=>{e.style.display="block"};this.Am.getElementsByClassName("cnx-up-next-box-text")[0].innerHTML=(0,P.QM)(i)?i:""}}class Le extends ge{constructor(t,i,e,s,n){super(t,i,e,s),this.settings=n,this.eventList=[],this.yy=144,this.by=36}createLogo(){let t=this.Sr.createElement("img");t.onload=()=>{t=this.resizeLogo(t),this.Am.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===wt.ProtoLogoPositionMode.ControlBar)t.style.setProperty("height",`${this.by}px`,"important"),t.style.setProperty("width",`${this.by}px`,"important");else{const s=i/e;this.by*s>this.yy?(t.style.setProperty("width",`${this.yy}px`,"important"),t.style.setProperty("height","auto","important")):(t.style.setProperty("width","auto","important"),t.style.setProperty("height",`${this.by}px`,"important"))}return t}initComponent(){try{this.createLogo()}catch(t){(0,i.n)({message:"LogoComponent_createLogo",exception:t.message,callStack:t.stack,level:i.D.CRITICAL})}}}class Oe extends ge{constructor(){super(...arguments),this.eventList=[]}initComponent(){this.wy=this.Am.getElementsByTagName("cnx-span")[0]}setTime(t){isNaN(t)||"number"!=typeof t?(0,m.cn)(this.Am,c.Gj.Invisible):(this.wy.innerHTML=(0,Yi.to)(t),(0,m.IV)(this.Am,c.Gj.Invisible))}}const Re='<cnx class="cnx-ui-progress-label"><cnx-span></cnx-span></cnx>';class Be extends ge{constructor(t,i,e,s,n=!1){super(t,i,e,s,n),this.xy=0,this.Sy=null,this._y=0,this.Ay=0,this.Py=100,this.cacheDomElements()}cacheDomElements(){this.ky=this.Am.getElementsByClassName("cnx-progress-fill")[0],this.Iy=this.Am.getElementsByClassName("cnx-progress-rail")[0]}cacheWidths(){this.xy=this.fixedRailWidth?this.fixedRailWidth:this.Iy.getBoundingClientRect().width,this.Sy=this.Iy.getBoundingClientRect().left}updateUi(t){const i=this.getComputedTranslation(t);this._y=i,this.ky.style.transform=`translateX(${i}px)`}isValidTranslation(){return this._y>=0&&this._y<=this.xy}getComputedTranslation(t){return t<0?0:t>this.xy?this.xy:t}setProgress(t){this.cacheWidths();const i=this.getComputedTranslation((0,lt.dQ)(0,100,0,this.xy,t));this.updateUi(i)}disableTransition(){(0,m.cn)(this.Am,c.Gj.NoTransition)}enableTransition(){(0,m.IV)(this.Am,c.Gj.NoTransition)}Ty(t){this.disableTransition(),this.setProgress(t),(0,m.Tp)(this.ky),this.enableTransition()}forceStartState(){this.Ty(this.Ay)}forceEndState(){this.Ty(this.Py)}initComponent(){this.cacheWidths()}destroy(){super.destroy()}}class De extends Be{constructor(t,i,e,s,n=!1){super(t,i,e,s,n),this.Cy=0,this._n=null,this.My=!1,this.eventList=[w[w.DraggingStart],w[w.DraggingStopped]],this.Ey=t=>{this.cacheWidths(),this.Ly(this.Oy(t)),this.Qt?this.Am.addEventListener(this.Ry,this.By):this.Sr.addEventListenerOnGlobal(this.Ry,this.By),this.onDragStart()},this.By=t=>{null===this._n&&(this.My||(this.My=!0,this.disableTransition()),this._n=this.Sr.requestAnimationFrameHelper((()=>{const i=this.Dy+(this.Oy(t)-this.jy);this.isValidTranslation()&&this.Fy(i),this._n=null})))},this.$y=t=>{t.stopPropagation(),this.Qt?this.Am.removeEventListener(this.Ry,this.By):this.Sr.removeEventListenerOnGlobal(this.Ry,this.By),this.My=!1,this.enableTransition(),this.onDragEnd()},this.Ry=n?"touchmove":"mousemove"}cacheDomElements(){super.cacheDomElements(),this.Vy=this.Am.getElementsByClassName("cnx-progress-handle")[0]}cacheWidths(){super.cacheWidths(),this.Cy=this.Vy.getBoundingClientRect().width/2}updateUi(t){super.updateUi(t);const i=this.getComputedTranslation(t);this.Vy.style.transform=`translateX(${i-this.Cy}px)`}onDragEnd(){this.mediator.publish(this,w[w.DraggingStopped])}onDragStart(){this.mediator.publish(this,w[w.DraggingStart])}Oy(t){return this.Qt?t.touches.item(0).clientX:t.clientX}Ly(t){this.Dy=t-this.Sy,this.jy=t,this.Fy(this.Dy)}Fy(t){if(this.isValidTranslation()){const i=this.getComputedTranslation(t),e=0,s=this.xy,n=0,r=100;this.updateUi(i),this.onProgressChange((0,lt.dQ)(e,s,n,r,i))}}setProgress(t){super.setProgress(t)}initComponent(){super.initComponent();const t={interactionstart:this.Ey,interactionend:this.$y};this._m.register(this.Am,this,this._m,t)}destroy(){super.destroy()}}class je extends De{constructor(t,i,e,s,n=!1){super(t,i,e,s,n),this.Uy=!1,this.Ny=t=>{(0,m.cn)(this.Am,c.Gj.HoverEnd),this.Uy=!0},this.Hy=t=>{const i=this.getComputedTranslation(t.clientX-this.Sy);this.zy.style.transform=`translateX(${i}px)`},this.Wy=t=>{this.zy.style.transform="translateX(0)",this.Uy=!1,this.Gy()},this.eventList=this.eventList.concat([w[w.Seek],w[w.SeekingStart],w[w.SeekingStopped]])}onProgressChange(t){this.mediator.publish(this,w[w.Seek],{payload:t-.1})}onDragEnd(){super.onDragEnd(),this.mediator.publish(this,w[w.SeekingStopped]),this.Gy()}onDragStart(){super.onDragStart(),this.mediator.publish(this,w[w.SeekingStart])}Gy(){this.Uy||this.My||(0,m.IV)(this.Am,c.Gj.HoverEnd)}initComponent(){super.initComponent(),this.Am.addEventListener("mousemove",this.Hy),this.Am.addEventListener("mouseenter",this.Ny),this.Am.addEventListener("mouseleave",this.Wy),this.zy=this.Am.getElementsByClassName("cnx-progress-follow")[0]}hide(){(0,m.MV)(this.Am)}show(){(0,m.Ho)(this.Am)}destroy(){super.destroy(),this.Am.removeEventListener("mousemove",this.Hy),this.Am.removeEventListener("mouseenter",this.Ny),this.Am.removeEventListener("mouseleave",this.Wy)}}const Fe='<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>';class $e extends ge{constructor(){super(...arguments),this.eventList=[]}initComponent(){this.hide()}show(){(0,m.Ho)(this.Am)}hide(){(0,m.MV)(this.Am)}}const Ve='<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 Ue=n(7089),Ne=n(45);class He extends me{constructor(){super(...arguments),this.alignMiddle=!1,this.alignTop=!1,this.forceRight=!0}Jy(){const t=Ne.g.version?`V${Ne.g.version}`:"dev",i=[new be(this,this.Sr,this._m,this.Qt,{activeEvent:w[w.AboutClick],name:"About Connatix",icon:Ue,label:t})];this.buildContextMenu(i)}initComponent(){this.Jy()}onResize(){this.cacheCoordinates(),this.close()}}const ze="About Connatix",qe="Closed Captions";var We=n(9335);class Ge extends ye{constructor(t,i,e,s,n){super(t,i,e,Ge.getTemplate(n),s),this.mediator=t,this.Im=[],this.jm=!1,this.type=pe.SubmenuMenuItem,this.eventList=[],this.isOpen=!1,this.event=n.event,this.eventList.push(this.event),this.Qy=new be(this,i,e,s,{activeEvent:n.event,name:n.name.toUpperCase(),icon:""}),this.$menuContainer=this.Sr.createElementByString(`<cnx class="${c.Ng.Items}"></cnx>`),this.Xy=this.Am.getElementsByClassName(c.Ng.ItemExtra)[0]}static getTemplate(t){const i=`<cnx class="${c.Ng.ItemIcon}">${t.icon}</cnx>`;return`<cnx class="${c.Ng.SubmenuOption}">\n ${t.icon?i:""}\n <cnx class="${c.Ng.ItemTitle}">${t.name}</cnx>\n <cnx class="${c.Ng.ItemExtra} ${c.iu.AccentColor}">${t.label?t.label:""}${We}</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.Im.forEach((t=>this.unsubscribeAll(t))),this.Im=[this.Qy,...t],this.Im.forEach((t=>{t.eventList.forEach((i=>this.subscribe(i,t,(()=>this.handleItemsEvents(i))))),t.initComponent(),this.$menuContainer.appendChild(t.getContainer())}))}changeLabel(t){this.Xy.innerHTML=`${t}${We}`}get isActive(){return this.jm}set isActive(t){this.jm=t,this.jm?(0,m.cn)(this.Am,c.Gj.Active):(0,m.IV)(this.Am,c.Gj.Active)}}class Je extends Ge{constructor(t,i,e,s,n,r,h){super(t,i,e,s,{event:w[w.CaptionMenu],name:n,icon:Me,options:[]}),this.mediator=t,this.resizeObserver=h,this.ny=[],this.hy=new be(this,this.Sr,this._m,this.Qt,{name:"Off",activeEvent:null}),this.oy=[],this.isActive=r}handleItemsEvents(t){t!==w[w.CaptionMenu]&&this.isOpen&&(this.updateSelection(t),(0,m.T7)(this.$menuContainer,{height:"0"}),this.mediator.publish(this,this.event,{payload:{event:t?w[w.CaptionOn]:w[w.CaptionOff],data:t}}))}createCaptionsMenu(t){0===this.ny.length?this.ny.push(this.hy):this.ny=this.ny.slice(0,1),t.forEach((t=>{this.ny.push(new be(this,this.Sr,this._m,this.Qt,{name:t.title,activeEvent:t.file}))}));let i=!1;this.oy.length!==t.length&&(i=!0),this.updateMenu(),this.oy=t;const e=this.oy.find((t=>{var i;return t.title===(null===(i=this.uy)||void 0===i?void 0:i.name)}));this.uy&&e&&this.updateSelection(e.file),this.buildContextMenu(this.ny),this.resizeObserver&&i&&(this.resizeObserver.off(this.$menuContainer,(t=>this.py(t))),this.resizeObserver.on(this.$menuContainer,(t=>this.py(t))))}updateSelection(t){this.ny.forEach((t=>t.isActive=!1));const i=this.oy.find((i=>i.file===t));i?this.uy=this.ny.find((t=>t.name===i.title)):t||(this.uy=this.ny.find((t=>"Off"===t.name))),this.uy&&(this.uy.isActive=!0)}updateMenu(){(0,m.T7)(this.$menuContainer,{height:"auto"})}reset(){var t;this.resizeObserver.off(this.$menuContainer,(t=>this.py(t))),null===(t=this.vy)||void 0===t||t.removeListeners(),this.vy=null,this.oy=[]}py(t){t.clientHeight>=188&&(0,m.T7)(t,{height:"188px"}),this.vy||(this.vy=new Se(t,{horizontal:!1}),(0,m.cn)(t,c.Gj.HasCustomScrollbar))}}class Qe extends me{constructor(t,i,e,s,n,r,h,o,a,c=!0,l){super(t,i,e,s,n,r,h,a),this.alignMiddle=!1,this.alignTop=!1,this.forceRight=!1,this.Yy=[new be(this,this.Sr,this._m,this.Qt,{activeEvent:w[w.AboutClick],name:ze,icon:Ue,label:Ne.g.version?`V${Ne.g.version}`:"dev"})],this.Ky=new Je(this,this.Sr,this._m,this.Qt,qe,c,l),this.Zy=[this.Ky],this.tb=o}ib(){let t=this.Yy;this.tb===c.Rq.Lg&&(t=[...this.Zy,...this.Yy]),this.buildContextMenu(t)}initComponent(){this.ib()}onResize(t,i){this.isOpen&&this.positionContextMenu(t),this.tb!==i?(this.tb=i,this.closeAllSubmenuItems(),this.ib()):this.tb=i}toggleCaptionState(t){this.Ky.isActive!==t&&(this.Ky.isActive=t)}hideCaptionOption(){this.Ky.hideComponent()}showCaptionOption(){this.Ky.showComponent()}updateCaptionSelection(t){this.Ky.updateSelection(t)}updateMenu(){this.Ky.updateMenu()}getAnchorCoordinatesTo(t){let i=de.Right;return this.tb!==c.Rq.Xl&&this.tb!==c.Rq.Xxl&&(i|=de.Top),t.getCoordinates(i)}createCaptionsMenu(t){this.Ky.createCaptionsMenu(t)}reset(){var t;null===(t=this.Ky)||void 0===t||t.reset()}}var Xe=n(8852);class Ye extends ge{constructor(){super(...arguments),this.eventList=[]}initComponent(){this.eb=this.Am.getElementsByClassName(c.Yk.CaptionContainer)[0]}updateCaptions(t){this.eb.innerHTML=t&&t.text?(0,Xe.f5)(t.text,"<br>"):""}}class Ke extends Le{constructor(){super(...arguments),this.sb="cnx-logo-height",this.rb="cnx-logo-width"}createLogo(){this.Am.onload=()=>{this.Am.style.visibility="visible",this.resizeLogo(this.Am)},this.Am.style.visibility="hidden",this.Am.src=this.settings.logoUrl}resizeLogo(t){const i=t.naturalWidth,e=t.naturalHeight;return i&&e?(i>e?(0,m.cn)(t,this.rb):(0,m.cn)(t,this.sb),t):t}}var Ze,ts=n(834),is=n(1639);!function(t){t[t.Play=0]="Play",t[t.Pause=1]="Pause"}(Ze||(Ze={}));class es extends Pe{constructor(t,i,e,s,n){super(t,i,e,s,n),this.hb=!1,this.eventList=[w[w.Play],w[w.Pause],w[w.Replay],w[w.StateChanged],...this.eventList],this.ob="Play",this.ab="Pause",this.setState(Ze.Pause)}onClickHandler(){this.Wa===Ze.Pause?this.mediator.publish(this,w[w.Pause]):this.hb?this.mediator.publish(this,w[w.Replay]):this.mediator.publish(this,w[w.Play])}cb(){}toggleReplay(t){this.hb=t}setState(t){this.Wa!==t&&(this.Wa=t,this.cb(),this.mediator.publish(this,w[w.StateChanged]))}get tooltip(){return this.Wa===Ze.Play?this.ob:this.ab}}class ss extends De{constructor(t,i,e,s,n=!1){super(t,i,e,s,n),this.lb=80,this.fixedRailWidth=this.lb,this.eventList.push(w[w.Volume])}onProgressChange(t){this.mediator.publish(this,w[w.Volume],{payload:t})}}var ns;!function(t){t[t.expand=0]="expand",t[t.collapse=1]="collapse"}(ns||(ns={}));class rs extends Pe{constructor(){super(...arguments),this.eventList=[w[w.Expand],w[w.Collapse],...this.eventList],this.ub="Full Screen",this.pb="Exit Full Screen"}onClickHandler(){switch(this.Wa){case ns.collapse:this.mediator.publish(this,w[w.Expand]);break;case ns.expand:this.mediator.publish(this,w[w.Collapse]);break;default:this.mediator.publish(this,w[w.Expand])}}cb(){this.Am&&(this.Wa===ns.expand?this.Am.classList.add(c.Gj.Active):this.Am.classList.remove(c.Gj.Active))}setState(t){this.Wa!==t&&(this.Wa=t,this.cb())}get tooltip(){return this.Wa===ns.expand?this.pb:this.ub}}function hs(t,i,e){const s=e?H[H.Auto]:i.height.toString();t.forEach((t=>t.name.includes(s)?t.isActive=!0:t.isActive=!1));const n=t.find((t=>H[t.event]===H.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 os extends me{constructor(){super(...arguments),this.alignMiddle=!0,this.alignTop=!0,this.forceRight=!1,this.ny=[],this.fb={height:360,quality:H.Auto},this.vb=!0}sendEvent(t){this.vb=H[t]===H.Auto,this.mediator.publish(this,this.eventName,{payload:{height:this.vb?this.fb.height:parseInt(t,10),quality:this.vb?H.Auto:H.Strict}})}initComponent(){}createQualityMenu(t){this.ny=[],this.gb=t,this.gb.forEach((t=>{this.ny.push(new be(this,this.Sr,this._m,this.Qt,{name:`${t.videoHeight}p`,activeEvent:t.videoHeight.toString(),label:t.isHD?"HD":void 0}))})),this.ny.push(new be(this,this.Sr,this._m,this.Qt,{name:H[H.Auto],activeEvent:H[H.Auto]})),hs(this.ny,this.fb,this.vb),this.buildContextMenu(this.ny)}onResize(t){this.cacheCoordinates(),this.isOpen&&this.positionContextMenu(t)}updateQuality(t){(0,a.BZ)(this.gb)&&(this.vb=t.quality===H.Auto,this.fb.quality=t.quality,this.fb.height=(0,lt.DE)(t.height,this.gb.map((t=>t.videoHeight))),hs(this.ny,this.fb,this.vb))}}class as extends ge{constructor(){super(...arguments),this.eventList=[]}initComponent(){this.hide()}show(){(0,m.Ho)(this.Am),(0,m.Tp)(this.Am),(0,m.cn)(this.Am,c.Gj.Active)}hide(){(0,m.IV)(this.Am,c.Gj.Active),(0,m.MV)(this.Am)}}class cs extends Pe{constructor(t,i,e,s,n,r,h){super(t,i,e,s,n),this.tooltip=h,this.mb=xe[r],this.eventList.push(this.mb)}onClickHandler(){this.mediator.publish(this,this.mb)}}class ls extends ye{constructor(t,i,e,s,n,r,h){super(t,i,e,s,n),this.tooltip=h,this.eventList=[],this.mb=xe[r],this.eventList.push(this.mb)}onClickHandler(){this.mediator.publish(this,this.mb)}}class us{constructor(t,i,e,s){this.Sr=t,this._m=i,this.Qt=e,this.yb=new Map,Object.keys(s).forEach((t=>this.bb(xe[t],s[t])))}getButton(t,i){const{isHoverable:e,template:s,tooltip:n}=this.wb(t);return e?new cs(i,this.Sr,this._m,s,this.Qt,t,n):new ls(i,this.Sr,this._m,s,this.Qt,t,n)}isGeneralComponent(t){return this.yb.has(t)}wb(t){return this.yb.get(t)}bb(t,i){this.yb.set(t,i)}}var ds=n(1215);function ps(t,i,e=!0){return e?`\n <cnx class="cnx-icon-button cnx-button-${xe[t].toLowerCase()} cnx-ui-btn-hoverable">\n <cnx class="cnx-btn-container">\n ${i}\n </cnx>\n </cnx>\n `.trim():`<cnx class="cnx-button-${xe[t].toLowerCase()}">${i}</cnx>`}var fs=n(9040),vs=n(89);const gs={[xe[xe.MoreButton]]:{template:ps(xe.MoreButton,vs),tooltip:"More",isHoverable:!0},[xe[xe.CloseButton]]:{template:ps(xe.CloseButton,ds),tooltip:"Close Player",isHoverable:!0},[xe[xe.UpNextButton]]:{template:ps(xe.UpNextButton,fs),tooltip:"Next",isHoverable:!0},[xe[xe.PreviousButton]]:{template:ps(xe.PreviousButton,fs),tooltip:"Previous",isHoverable:!0}};class ms extends Pe{constructor(){super(...arguments),this.eventList=[w[w.SkipAd],...this.eventList],this.xb=-1,this.Sb=-1}initComponent(){super.initComponent(),this.hideComponent(),this._b=this.Am.getElementsByTagName("cnx-span")[0],this._b.innerHTML="Ad",this.Ab=this.Am.querySelectorAll(`.${c.Hs.Timer} svg`)[0]}setSecondsUntilSkip(t){this.xb=Math.ceil(t),this.Sb=-1,this.xb>0&&(0,m.T7)(this.Ab,{"animation-duration":this.xb+"s"})}tickDown(t){const i=this.xb-Math.floor(t);if(i<0||0===this.Sb)return;const e=(0,m.pv)(this.Am,c.Hs.InTimer);this.Sb=i,0===this.Sb?(e&&(0,m.IV)(this.Am,c.Hs.InTimer),this._b.innerHTML="Ad"):(e||(0,m.cn)(this.Am,c.Hs.InTimer),this._b.innerHTML=`in ${this.Sb}s`)}get tooltip(){}onClickHandler(){0===this.Sb&&this.mediator.publish(this,w[w.SkipAd])}}var ys=n(4670);class bs extends ge{constructor(){super(...arguments),this.eventList=[]}initComponent(){this.Pb=this.Am.getElementsByClassName(c.mr.BackgroundImg)[0],this.kb=this.Am.getElementsByClassName(c.mr.Icon)[0],this.kb.innerHTML=ys,this.Ib=this.Am.getElementsByClassName(c.mr.ButtonContainer)[0];const t=this.Am.getElementsByClassName(c.mr.Button)[0];this.Tb=this.Sr.createElementByString(`<a class="${c.mr.Wrapper}" href="#">`),this.Tb.target=ue.bS.Blank,this.Tb.appendChild(t),this.Ib.innerHTML="",this.Ib.appendChild(this.Tb),this.Cb=this.Am.getElementsByClassName(c.mr.InfoContainer)[0],this.Mb=this.Am.getElementsByClassName(c.mr.FallbackContainer)[0],this.Eb=this.Am.getElementsByClassName(c.mr.SlotCountText)[0]}setBackgroundImg(t){(0,P.QM)(t)?((0,m.IV)(this.Pb,c.Gj.DisplayNone),this.Pb.src=t):(0,m.cn)(this.Pb,c.Gj.DisplayNone)}setClickUrl(t){if(!(0,P.QM)(t))return(0,m.Ho)(this.Mb),void(0,m.MV)(this.Cb);(0,m.Ho)(this.Cb),(0,m.MV)(this.Mb),this.Tb.href=t}setFallbackText(t,i){const e=t||1,s=i||1;this.Eb.innerHTML=`Loading ad ${e}/${s}`}}class ws{constructor(t,i,e,s={},n={}){this.Sr=t,this._m=i,this.Am=e,this.Wt=s,this.Lb={[xe.PlayButton]:t=>this.Ob(!1,t),[xe.BigPlayButton]:t=>this.Ob(!0,t),[xe.VolumeProgress]:t=>new ss(t,this.Sr,this._m,'<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>'),[xe.ExpandButton]:t=>new rs(t,this.Sr,this._m,'<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.Wt.isMobile),[xe.QualityMenu]:t=>new os(t,this.Sr,this._m,'<cnx class="cnx-ui-cm cnx-ui-cm-quality"><cnx class="cnx-cm-container"></cnx></cnx>',w[w.Quality],xe.QualityMenu,this.Am,this.Wt.isMobile),[xe.Loader]:t=>new as(t,this.Sr,this._m,Ve),[xe.SkipAdButton]:t=>new ms(t,this.Sr,this._m,'<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.Wt.isMobile),[xe.AdLoadingScreen]:t=>new bs(t,this.Sr,this._m,'<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.Ob=(t,i)=>new es(i,this.Sr,this._m,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">${ts}</cnx>\n <cnx class="cnx-pause-icon">${is}</cnx>\n </cnx>\n </cnx>\n`.trim()}(t),this.Wt.isMobile),this.Rb=t=>i=>{const e=this.Lb[t];if(e)return e(i)},this.Bb=new us(this.Sr,this._m,this.Wt.isMobile,Object.assign(Object.assign({},gs),n))}createComponent(t,i){const e=this.Rb(t)(i);return e||(this.Bb.isGeneralComponent(t)?this.Bb.getButton(t,i):void 0)}}var xs;!function(t){t[t.Mute=0]="Mute",t[t.Unmute=1]="Unmute"}(xs||(xs={}));class Ss extends Pe{constructor(t,i,e,s,n,r){super(t,i,e,s,r),this.eventList=[w[w.Mute],w[w.Unmute],w[w.StateChanged],...this.eventList],this.Db="Mute",this.jb="Unmute",this.Wa=n}onClickHandler(){this.Wa===xs.Mute?(this.mediator.publish(this,w[w.Unmute]),this.setState(xs.Unmute)):(this.mediator.publish(this,w[w.Mute]),this.setState(xs.Mute))}cb(){this.Wa===xs.Mute?(0,m.L_)(this.Am,"cnx-sound-on","cnx-sound-off"):(0,m.L_)(this.Am,"cnx-sound-off","cnx-sound-on")}get tooltip(){return this.Wa===xs.Mute?this.jb:this.Db}initComponent(){super.initComponent(),this.cb()}setState(t){this.Wa!==t&&(this.Wa=t,this.cb(),this.mediator.publish(this,w[w.StateChanged]))}setVolume(t){t>0?this.setState(xs.Unmute):this.setState(xs.Mute)}}class _s{constructor(t,i){this.Fb=t,this.Sr=i,this.$b=/\[\[([0-9]+)]]/g,this.Vb=[],this.Ub=[],this.Hb=this.Sr.createElementByString(this.zb(this.Fb))}qb(t){return`<cnx class="pl_${t}"></cnx>`}zb(t){return t.replace(this.$b,((t,i)=>(this.Vb.push(parseInt(i,10)),this.qb(i))))}Gb(t,i){return this.Ub.some((i=>i.slotName===t))||this.Ub.some((t=>t.component===i))?null:this.Hb.getElementsByClassName(`pl_${t}`)[0]}getComponentList(){return this.Vb}getRenderedDom(){return this.Hb}registerSlot(t,i){const e=this.Gb(t,i);if(null!==e){const s=i.getContainer();return e.parentNode.replaceChild(s,e),this.Ub.push({component:i,slotName:t}),!0}return!1}initComponents(){this.Ub.forEach((t=>t.component.initComponent()))}}class As extends h._{constructor(t,i,e){super(),this.globalDomUtilsService=t,this.templateString=i,this.componentFactory=e,this.Jb={},this.Qb=new _s(i,t),this.addComponents()}addComponents(){this.Qb.getComponentList().forEach((t=>{const i=this.componentFactory.createComponent(t,this);this.registerComponent(t,i)}))}registerComponent(t,i){this.Qb.registerSlot(t,i),this.Jb[t]=i,this.Xb(i)}Xb(t){t.eventList.forEach((i=>{this.subscribe(i,t,(e=>{i===w[w.RebindComponent]&&this.rebindComponentEvents(t),this.handleComponentEvent(i,e,t)}))}))}rebindComponentEvents(t){t&&(this.unsubscribeAll(t),this.Xb(t))}getComponent(t){return this.Jb[t]}destroy(){Object.keys(this.Jb).forEach((t=>{this.Jb[t].destroy()}))}}class Ps extends As{constructor(t,i,e,s){super(i,e,s),this.mediator=t,this.Am=this.Qb.getRenderedDom()}getContainer(){return this.Am}initComponent(){this.Qb.initComponents()}showComponent(){(0,m.Ho)(this.Am)}hideComponent(){(0,m.MV)(this.Am)}}class ks extends Ps{constructor(t,i,e,s){super(t,i,e,s),this.Yb=null,this.eventList=[w[w.Volume],w[w.VolumeHoverStart],w[w.VolumeHoverStopped],w[w.DraggingStopped],w[w.DraggingStart],w[w.HoverStart],w[w.HoverEnd],w[w.StateChanged]],this.Kb=.2,this.Zb=600,this.tw=!1,this.iw=t=>{clearTimeout(this.Yb),(0,m.cn)(this.Am,"cnx-mod-hover"),this.mediator.publish(this,w[w.VolumeHoverStart])},this.ew=()=>{this.tw||(null!==this.Yb&&clearTimeout(this.Yb),this.Yb=setTimeout((()=>{(0,m.IV)(this.Am,"cnx-mod-hover"),this.mediator.publish(this,w[w.VolumeHoverStopped])}),this.Zb))},this.rw=this.Kb,this.hw=this.getComponent(xe.VolumeButton),this.ow=this.getComponent(xe.VolumeProgress)}handleComponentEvent(t,i,e){let s;switch(t){case w[w.Volume]:s=i.payload/100,this.aw(s),this.cw(i.payload);break;case w[w.Mute]:s=0,this.setVolumeProgress(0);break;case w[w.Unmute]:s=this.rw,this.setVolumeProgress(100*this.rw);break;case w[w.DraggingStopped]:this.tw=!1,this.mediator.publish(this,w[w.DraggingStopped]),this.ew();break;case w[w.DraggingStart]:this.tw=!0,this.mediator.publish(this,w[w.DraggingStart]);break;case w[w.HoverStart]:this.mediator.publish(this,w[w.HoverStart],{payload:{targetComponent:e}});break;case w[w.HoverEnd]:this.mediator.publish(this,w[w.HoverEnd],{payload:{targetComponent:e}});break;case w[w.StateChanged]:this.mediator.publish(this,w[w.StateChanged],{payload:{targetComponent:e}})}void 0!==s&&this.lw(s)}aw(t){t<this.Kb?this.rw=this.Kb:this.rw=t}lw(t){this.mediator.publish(this,w[w.Volume],{payload:t})}cw(t){0===t?this.hw.setState(xs.Mute):this.hw.setState(xs.Unmute)}setVolumeProgress(t){this.ow.setProgress(t)}initComponent(){super.initComponent(),this.Am.addEventListener("mouseenter",this.iw),this.Am.addEventListener("mouseleave",this.ew)}setVolume(t){const i=100*t;this.cw(i),this.setVolumeProgress(i)}destroy(){super.destroy(),this.Am.removeEventListener("mouseenter",this.iw),this.Am.removeEventListener("mouseleave",this.ew)}}const Is=`\n <cnx class="cnx-volume-container">\n <cnx class="cnx-ui-btn cnx-volume-btn">\n [[${xe.VolumeButton}]]\n </cnx>\n <cnx class="cnx-volume-bar">\n [[${xe.VolumeProgress}]]\n </cnx>\n </cnx>\n`.trim();var Ts=n(2040),Cs=n(8808);const Ms={[xe[xe.ShareButton]]:{template:ps(xe.ShareButton,Cs),tooltip:"Share",isHoverable:!0},[xe[xe.CastButton]]:{template:ps(xe.CastButton,Ts),tooltip:"Cast",isHoverable:!0}};var Es=n(1505),Ls=n(3653);const Os=90*ht.Y0,Rs="This live stream will start shortly";class Bs extends ge{constructor(){super(...arguments),this.eventList=[],this.uw=null}initComponent(){this.dw=this.Sr.createElementByString("<img/>"),this.Am.appendChild(this.dw),this.pw=this.Am.getElementsByTagName("cnx-span")[0],this.fw=this.Am.getElementsByClassName("cnx-live-message")[0],this.gw=this.Am.getElementsByClassName("cnx-live-icon")[0]}setPosterSrc(t){(0,P.QM)(t)&&(this.dw.src=t)}setPosterAltText(t){this.dw.alt=t}setIconToStarting(){this.gw.innerHTML=`${Es}`}setIconToEnded(){this.gw.innerHTML=`${Ls}`}setMessageToStarting(){this.mw(Rs)}setMessageToEnded(){this.mw("This live stream is not currently available. Please check again shortly")}setMessageToNotSupported(){this.mw("Live stream not supported by browser")}handleDelayedStart(t){(0,P.r)(Date.parse(t))&&(this.yw=new Date(t),this.ww()>0&&(this.xw(),clearInterval(this.uw),this.uw=setInterval((()=>{this.xw()}),ht.s_*ht.Y0)))}showMessage(){(0,m.Ho)(this.gw),(0,m.Ho)(this.fw)}hideMessage(){(0,m.MV)(this.gw),(0,m.MV)(this.fw)}show(){(0,m.Ho)(this.Am),(0,m.cn)(this.Am,c.Gj.Active)}hide(){(0,m.IV)(this.Am,c.Gj.Active),(0,m.MV)(this.Am)}destroy(){super.destroy(),clearInterval(this.uw)}xw(){const t=this.ww();if(t>0){const i=this.Sw(t);this.mw(`Live in ${i}`)}else this.mw(Rs),clearInterval(this.uw),this.uw=null}ww(){return(Math.max(this.yw.getTime(),Date.now())-Date.now())/ht.s_}Sw(t){const i=t>=Os?Math.round(t/(ht.Y0*ht.oG)):Math.ceil(t/ht.Y0);return`${i} ${t>=Os?"hours":"minute"+(1===i?"":"s")}`}mw(t){this.pw.innerHTML=t}}class Ds extends ge{constructor(){super(...arguments),this.eventList=[]}initComponent(){this.hideComponent()}}class js extends Pe{constructor(){super(...arguments),this.eventList=[w[w.NonLinearClose],...this.eventList]}initComponent(){super.initComponent(),this.showComponent()}get tooltip(){}onClickHandler(){this.mediator.publish(this,w[w.NonLinearClose])}}class Fs extends ws{constructor(t,i,e,s,n,r){super(t,i,e,s,Ms),this.Sr=t,this.Am=e,this.Wt=s,this.Aw=n,this.Er=r,this.Pw={[xe.VolumeControls]:t=>new ks(t,this.Sr,Is,this),[xe.VolumeButton]:t=>new Ss(t,this.Sr,this._m,'<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>',xs.Mute,this.Wt.isMobile),[xe.SettingsButton]:t=>new ke(t,this.Sr,this._m,Ie,this.Wt.isMobile),[xe.CaptionButton]:t=>new Ce(t,this.Sr,this._m,Me,c.Gj.Active,this.Wt.closedCaptionDefault,this.Wt.isMobile),[xe.UpNextBox]:t=>new Ee(t,this.Sr,this._m,'<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.Wt.isMobile),[xe.LogoComponent]:t=>{if(!(0,P.$K)(this.Wt.logoUrl)&&!(0,P.$K)(this.Wt.logoPosition))throw new Error("custom logo is undefined");return new Le(t,this.Sr,this._m,'<cnx class="cnx-logo"></cnx>',{logoUrl:this.Wt.logoUrl,logoPosition:this.Wt.logoPosition})},[xe.LogoOutstream]:t=>{if(!(0,P.$K)(this.Wt.logoUrl)&&!(0,P.$K)(this.Wt.logoPosition))throw new Error("outstream logo undefined");return new Ke(t,this.Sr,this._m,'<img class="cnx-home-screen-logo" />',{logoUrl:this.Wt.logoUrl})},[xe.LivePoster]:t=>new Bs(t,this.Sr,this._m,'<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>'),[xe.LiveIcon]:t=>new Ds(t,this.Sr,this._m,'<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>'),[xe.ElapsedTimeLabel]:t=>new Oe(t,this.Sr,this._m,Re),[xe.TotalDurationLabel]:t=>new Oe(t,this.Sr,this._m,Re),[xe.RemainingDurationLabel]:t=>new Oe(t,this.Sr,this._m,Re),[xe.ProgressBar]:t=>new je(t,this.Sr,this._m,Fe,this.Wt.isMobile),[xe.QueStateOverlay]:t=>new $e(t,this.Sr,this._m,Ve),[xe.ContextMenu]:t=>new He(t,this.Sr,this._m,'<cnx class="cnx-ui-cm cnx-ui-cm-context"><cnx class="cnx-cm-container"></cnx></cnx>',w[w.ContextClick],xe.ContextMenu,this.Am,this.Wt.isMobile),[xe.ElementsSettingsMenu]:t=>new Qe(t,this.Sr,this._m,'<cnx class="cnx-ui-cm cnx-ui-cm-settings"><cnx class="cnx-cm-container"></cnx></cnx>',w[w.SettingsMenu],xe.ElementsSettingsMenu,this.Am,this.Aw,this.Wt.isMobile,this.Wt.closedCaptionDefault,this.Er),[xe.ElementsCaptionMenu]:t=>new _e(t,this.Sr,this._m,'<cnx class="cnx-ui-cm cnx-ui-cm-captions"><cnx class="cnx-cm-container"></cnx></cnx>',w[w.CaptionMenu],xe.ElementsCaptionMenu,this.Am,this.Wt.isMobile,this.Er),[xe.CaptionComponent]:t=>new Ye(t,this.Sr,this._m,'<cnx class="cnx-captions"><cnx class="cnx-captions-container"><cnx-span class="cnx-captions-text-holder"></cnx-span></cnx></cnx>'),[xe.NonLinearComponent]:t=>new js(t,this.Sr,this._m,'<cnx class="cnx-non-linear"><cnx class="cnx-non-linear-ad-slot"></cnx><cnx class="cnx-ad-close-non-linear-button cnx-ui-btn"><svg markup-inline 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 011.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 01-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 001.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 00-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 00-.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 01.246.861 1.63 1.63 0 01-.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 01-.328-1.049h1.084c.02.363.164.652.433.867s.633.316 1.078.316c.41 0 .738-.082.984-.246a.77.77 0 00.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 011.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 00.697-.621l.662.516c-.531.816-1.328 1.225-2.391 1.225zm-.135-5.684a1.44 1.44 0 00-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 01-.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 011.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 01-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 00-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></cnx></cnx>',this.Wt.isMobile)},this.kw=t=>i=>{const e=this.Pw[t];if(e)return e(i)}}createComponent(t,i){return this.kw(t)(i)||super.createComponent(t,i)}}var $s;!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",t.AdUiNonLinearAdSlot="cnx-non-linear-ad-slot"}($s||($s={}));class Vs extends As{constructor(t,i,e,s,n){super(e,s,n),this.mediator=t,this.$container=i,this.componentFactory=n,this.$uiContainer=this.Qb.getRenderedDom(),i.appendChild(this.$uiContainer),this.Qb.initComponents()}changeState(t){const i=this.Iw[t];i!==this.currentState&&this.currentState.canTransitionToState(i)&&(this.currentState.exitState(i),i.enterState())}hide(){(0,m.cn)(this.$uiContainer,c.Gj.DisplayNone)}show(){(0,m.IV)(this.$uiContainer,c.Gj.DisplayNone)}destroy(){super.destroy(),this.$uiContainer.parentNode.removeChild(this.$uiContainer)}}class Us extends Vs{constructor(t,i,e,s,n,r={}){super(t,s,i,n,new Fs(i,e,s,r)),this.mediator=t,this.globalDomUtilsService=i,this.$container=s,this.settings=r,this.Iw={},this.Tw=this.$container.querySelector(`.${$s.AdUiNonLinearAdSlot}`)}handleComponentEvent(t,i){this.mediator.publish(this,t,i)}show(){super.show()}hide(){super.hide()}get adUiNonLinearAdSlot(){return this.Tw}}class Ns{constructor(){}get template(){return`\n <cnx class="cnx-ui cnx-ui-ad">\n <cnx class="cnx-ui-non-linear-ad-content">\n [[${xe.NonLinearComponent}]]\n </cnx>\n </cnx>\n `.trim()}}class Hs extends h._{constructor(t,i,e){super(),this.imageUrl=t,this.Cw=i,this._m=e,this.Mw=new x.x,this.xg=new x.x,this.Ew=new x.x,this.Lw=new x.x}get onDisplayAd(){return this.Mw.asObservable()}get onError(){return this.xg.asObservable()}get onClick(){return this.Ew.asObservable()}get onClickClose(){return this.Lw.asObservable()}destroy(){this.Ow.hide(),this.Ow.adUiNonLinearAdSlot.removeChild(this.Rw),this.Ow.destroy()}initializeAd(t,i,e,s){this.Bw=t,this.Dw(),this.jw(s,i,e),this.Ow.adUiNonLinearAdSlot.appendChild(this.Rw)}getAdMediaWidth(){return this.Rw.clientWidth}getAdMediaHeight(){return this.Rw.clientHeight}jw(t,i,e){this.Rw=this.Cw.createElement("img"),this.Rw.onload=()=>{this.Mw.next()},this.Rw.onerror=()=>{this.xg.next(Vt.VastNonLinearImageLoadFailure)},this.Rw.onclick=()=>{this.Ew.next()},t?this.Fw(i,e):(0,m.T7)(this.Rw,{height:`${i.height}px`,width:`${i.width}px`,display:"block","pointer-events":"all"}),this.Rw.src=this.imageUrl}Dw(){this.Ow=new Us(this,this.Cw,this._m,this.Bw,(new Ns).template),this.subscribe(w[w.NonLinearClose],this.Ow,(()=>{this.Lw.next()}))}Fw(t,i){const e=(0,lt.Tc)(i.height,rt.NON_LINEAR_MAX_HEIGHT_PERCENT),s=i.width,n=t.height/e;t.width/s>n?(0,m.T7)(this.Rw,{width:"100%",display:"block","pointer-events":"all"}):(0,m.T7)(this.Rw,{height:"100%",display:"block","pointer-events":"all"})}}class zs{constructor(t,i=0,e=1e3){this.uv=t,this.timerDuration=i,this.$w=e,this.Vw=0,this.Uw=null,this.Nw=!1,this.Hw=!1,this.zw=new x.x,this.qw=new x.x,this.Ww=new x.x,this.Gw=[{event:le.FirstQuartile,quartile:1},{event:le.SecondQuartile,quartile:2},{event:le.ThirdQuartile,quartile:3},{event:le.FourthQuartile,quartile:4}],this.Qw=null,this.Xw=()=>{this.Yw(),this.zw.next(),this.Kw(this.Vw,this.timerDuration),this.Zw(),this.tx=(new Date).getTime()},i||this.disable()}start(){this.Hw=!0,null===this.Uw&&this.sx()}stop(){this.Hw=!1,null!==this.Uw&&(this.Yw(),this.nx())}reset(t){t&&(this.timerDuration=t),this.Vw=0,this.Nw=!1,this.Qw=null,(null!==this.Uw||this.Hw)&&(this.nx(),this.sx())}get timeElapsed(){return this.Vw}get timeRemaining(){return this.timerDuration-this.Vw}disable(){this.Nw=!0,this.nx()}get onTimeUpdate(){return this.zw.asObservable()}get onTimeElapsed(){return this.qw.asObservable()}get onQuartile(){return this.Ww.asObservable()}Yw(){this.Vw+=(new Date).getTime()-this.tx}sx(){this.Nw||(this.Zw(),this.tx=(new Date).getTime(),this.Uw=this.uv.setInterval(this.Xw,this.$w))}nx(){this.uv.clearInterval(this.Uw),this.Uw=null}hx(){this.disable(),this.qw.next(),this.Vw=0}Zw(){this.Vw/ht.s_>=this.timerDuration/ht.s_&&this.hx()}Kw(t,i){const e=Math.floor((0,lt.dQ)(0,i,1,4,t));this.Qw<=e&&this.Gw.forEach((({event:t,quartile:i})=>{i===e&&i!==this.Qw&&(this.Ww.next(t),this.Qw=i)}))}}const qs={[le.FirstQuartile]:g.fI.AdVideoFirstQuartile,[le.SecondQuartile]:g.fI.AdVideoMidpoint,[le.ThirdQuartile]:g.fI.AdVideoThirdQuartile,[le.FourthQuartile]:g.fI.AdVideoComplete};class Ws extends Wt{constructor(t,i){super(t,i),this.uv=t,this.settings=i,this.adMediaType="nonLinearVast",this.adSourceType=s.ProtoAdsourceTypeEnum.VastMedia,this.ox=[],this.$w=500,this.lx=0,this.nonLinearOnClick=()=>{this.ux.nonLinearClickTracking.uri&&this.settings.globalDomUtilsService.trackWithImages([this.ux.nonLinearClickTracking.uri]),this.ux.nonLinearClickThrough&&this.settings.globalDomUtilsService.open(this.ux.nonLinearClickThrough,ue.bS.Blank),this.Pv({type:g.fI.AdClickThru,payload:{}})}}initAd(t,i,e,s,n,r,h){try{if(super.initAd(t,i,e,s,n,r,h),this.ux=this.vx(),!this.ux)return void this.Pv({type:g.fI.AdError,payload:{errorMessage:Vt.VastUnsupportedMedia}});this.gx(),this.mx(),this.Pv({type:g.fI.AdLoaded,payload:{}})}catch(t){this.Pv({type:g.fI.AdError,payload:{errorMessage:Vt.AdaptorInitAdError+`_${t.message}`}})}}startAd(){super.startAd(),this.yx.start(),this.ox.push(this.wx.onDisplayAd.subscribe((()=>{this.Pv({type:g.fI.AdStarted}),this.Pv({type:g.fI.AdVideoStart}),this.Pv({type:g.fI.AdImpression,payload:{}})})),this.wx.onError.subscribe((t=>{this.Pv({type:g.fI.AdError,payload:{errorMessage:t}})})),this.wx.onClick.subscribe((()=>this.nonLinearOnClick())),this.wx.onClickClose.subscribe((()=>{this.Pv({type:g.fI.AdUserClose,payload:{}}),this.stopAd(g.r5)})));const t={height:this.ux.height,width:this.ux.width},i={height:this.fv.clientHeight,width:this.fv.clientWidth};this.wx.initializeAd(this.dv,t,i,this.ux.scalable)}get adVideoUrl(){return this.xx}get declaredDurationInSeconds(){return this.lx/ht.s_}getAdMediaSize(){return{height:this.wx.getAdMediaHeight(),width:this.wx.getAdMediaWidth()}}resizeAd(t,i,e){}pauseAd(){this.yx.stop()}resumeAd(){this.yx.start()}expandAd(){}collapseAd(){}getAdRemainingTime(){return this.yx.timeRemaining}getAdDuration(){return this.lx/ht.s_}getAdVolume(){return 0}gx(){this.ux.staticResource&&(this.wx=new Hs(this.ux.staticResource.uri,this.settings.globalDomUtilsService,this.settings.interactionService),this.xx=this.ux.staticResource.creativeType,this.Sx())}Sx(){this.fv.style.visibility="hidden"}mx(){var t;this.lx=(null===(t=this.settings.adManagerLineItem.protoLineItem.nonlinearLineItemSettings)||void 0===t?void 0:t.nonLinearAdTimeSeconds)*ht.s_,this.yx=new zs(this.uv,this.lx,this.$w),this.ox.push(this.yx.onTimeUpdate.subscribe((()=>{this.Pv({type:g.fI.AdRemainingTimeChange})})),this.yx.onTimeElapsed.subscribe((()=>{this.stopAd("nonLinearTimerElapsed")})),this.yx.onQuartile.subscribe((t=>{this.Pv({type:qs[t],payload:{}})})))}hu(){var t,i;try{super.hu(),null===(t=this.yx)||void 0===t||t.stop(),(0,pt.i)(this.ox),null===(i=this.wx)||void 0===i||i.destroy()}catch(t){this.Qv("NonLinearBidAdaptor","_destroy",t)}}vx(){let t;if(t=this.settings.vastResponse.nonLinearFiles.find((t=>!0===t.scalable)),!t){const i=(0,lt.Tc)(this.fv.clientHeight,rt.NON_LINEAR_MAX_HEIGHT_PERCENT);t=this.settings.vastResponse.nonLinearFiles.find((t=>t.height<=i&&t.width<=this.fv.clientWidth))}return t}}function Gs(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 Js=()=>`cnx_bid_slot_${(0,ut.qs)()}`,Qs={enableWorker:!1,capLevelToPlayerSize:!0,cnxRenderWindow:window,maxBufferSize:5e6,maxBufferLength:5,maxMaxBufferLength:10,liveBackBufferLength:0};class Xs{constructor(t,i,e,s,n){this._x=t,this.Ax=i,this.Px=e,this.Cw=s,this.kx=n,this.Ix=[],this.Tx=(t,i)=>{if(i.fatal)switch(i.type){case this._x.ErrorTypes.NETWORK_ERROR:if(i.details===this._x.ErrorDetails.MANIFEST_PARSING_ERROR||i.details===this._x.ErrorDetails.MANIFEST_LOAD_ERROR)return void this.Cx();this.Mx.startLoad();break;case this._x.ErrorTypes.MEDIA_ERROR:this.Mx.recoverMediaError();break;default:this.Cx()}},this.Ex=()=>{this.Mx.off(this._x.Events.MEDIA_ATTACHED,this.Ex),this.Mx.loadSource(this.Ax),this.Mx.once(this._x.Events.MANIFEST_PARSED,this.Lx)},this.Lx=()=>{this.Mx.off(this._x.Events.MANIFEST_PARSED,this.Lx),this.Ox(),this.kx.forceMaxLevel&&this.Rx(),this.kx.forceResolutionHeight&&this.Bx(this.kx.forceResolutionHeight),this.jx()},(this.kx.forceMaxLevel||this.kx.forceResolutionHeight)&&(Qs.capLevelToPlayerSize=!1)}start(t,i){this.jx=t,this.Cx=i,this._x&&this._x.isSupported()?(this.Mx=new this._x(Object.assign(Object.assign({},Qs),{cnxRenderWindow:this.Cw.global})),this.Fx()):this.Cx()}destroy(){this.Mx&&(this.Mx.destroy(),this.Mx=null)}Fx(){this.Mx.on(this._x.Events.ERROR,this.Tx),this.Mx.attachMedia(this.Px),this.Mx.once(this._x.Events.MEDIA_ATTACHED,this.Ex)}Rx(){const t=this.Mx.levels.length-1;this.$x(t)}Bx(t){const i=this.Ix.find((i=>i.height===t));i&&this.$x(i.level)}$x(t){this.Mx.currentLevel=t,this.Mx.startLevel=t,this.Mx.nextLevel=t}Ox(){this.Mx.levels.forEach(((t,i)=>{this.Ix.find((({height:i})=>i===t.height))||this.Ix.push({level:i,height:t.height})}))}}var Ys=n(2356);const Ks="huffpost",Zs=540;class tn extends jt{constructor(t,e,s,n,r,h,o,a,c,l=!1,u){super(),this.Sr=t,this.Vx=e,this.dg=s,this.Zt=n,this.Ux=r,this.Nx=h,this.Hx=o,this.zx=a,this._x=c,this.qx=l,this.si=u,this.Wx=!1,this.pageFocus=new Ys.v(this.Sr),this.Gx=Object.values(N),this.Jx=!1,this.Qx=!0,this.Xx=!1,this.Yx=[{event:g.fI.AdVideoStart,position:0},{event:g.fI.AdVideoFirstQuartile,position:25},{event:g.fI.AdVideoMidpoint,position:50},{event:g.fI.AdVideoThirdQuartile,position:75},{event:g.fI.AdVideoComplete,position:100}],this.Kx=this.Yx[0],this.Zx=t=>{try{switch(t.type){case N.Pause:if(this.Nx&&!this.Qx)return this.Qx=!0,void this.tS("pause_event_loopAd");this.Jx=!1;break;case N.Play:if(!this.Jx&&this.qx)return void this.dg.pause();break;case N.Canplay:case N.Durationchange:this.iS();break;case N.Timeupdate:this.eS();break;case N.Error:this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.VastVideoTagEventError}});break;case"click":this.hf.next({type:g.fI.AdClickThru,payload:{}})}}catch(t){(0,i.n)({level:i.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.dg=r.videoSlot,this.width=t,this.height=i,this.bm(this.Ux,this.dg.parentElement),this.resizeAd(t,i,e),this.addVideoEvents(this.dg),this.zx&&this._x&&this._x.isSupported()?this.sS(this._x):(this.dg.setAttribute("src",this.Vx),this.dg.setAttribute("preload","metadata"),this.dg.load()),this.pageFocus.isDocumentVisible()||this.iS()}catch(t){this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.WrapperInitAdError+`_${t.message}`}})}}startAd(){try{(0,m.cn)(this.dg,"cnx-ad-video-slot"),this.Jx=!0,this.pageFocus.isDocumentVisible()?this.dg.play().then((()=>{this.hf.next({type:g.fI.AdStarted}),this.hf.next({type:g.fI.AdImpression,payload:{}})})).catch((t=>{this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.VastPlayPromiseReject}})})):(this.hf.next({type:g.fI.AdStarted}),this.hf.next({type:g.fI.AdImpression,payload:{}}),this.dg.play())}catch(t){this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.WrapperStartAdError+`_${t.message}`}})}}stopAd(t){this.qx&&this.dg.pause(),"videoComplete"===t&&this.Nx?this.hf.next({type:g.fI.AdStopped,payload:{shouldTrackPostBid:!1}}):this.hf.next({type:g.fI.AdStopped,payload:{shouldTrackPostBid:!0}})}resizeAd(t,i,e){(0,m.T7)(this.dg,{width:`${t}px`,height:`${i}px`}),this.hf.next({type:g.fI.AdSizeChange})}pauseAd(){this.Jx=!1,this.Hx&&void 0===this.Kx&&(this.Kx=this.Yx[0]),this.dg.pause(),this.hf.next({type:g.fI.AdPaused})}resumeAd(){this.Nx&&void 0===this.Kx&&(this.Kx=this.Yx[0]),this.Jx=!0,this.tS("resumeAd"),this.Zt===dt.M.Ios&&(0,m.UR)(this.dg),this.hf.next({type:g.fI.AdPlaying})}expandAd(){}collapseAd(){}skipAd(){this.hf.next({type:g.fI.AdSkipped})}getAdRemainingTime(){return this.dg.duration-this.dg.currentTime}getAdDuration(){return this.dg.duration?this.dg.duration:0}getAdVolume(){return this.dg.volume}setAdVolume(t){this.dg.volume=t}getAdMediaWidth(){return this.dg.videoWidth}getAdMediaHeight(){return this.dg.videoHeight}destroy(){if(!this.Hx&&!this.Nx)try{(0,m.IV)(this.dg,"cnx-ad-video-slot"),this.nS(this.dg),this.dg.removeAttribute("src"),this.rS&&(this.rS.destroy(),this.rS=null)}catch(t){(0,i.n)({level:i.D.WARN,message:"AdManager_VastIntegrator_destroyAd",exception:t.message,callStack:t.stack})}}sS(t){let i={forceMaxLevel:!0};this.si&&this.si.includes(Ks)&&(i={forceMaxLevel:!1,forceResolutionHeight:Zs}),this.rS=new Xs(t,this.Vx,this.dg,this.Sr,i),this.rS.start((()=>{this.iS()}),(()=>{this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.CnxMediaSrcNotSupported}})}))}bm(t,i){this.hS=this.Sr.createElement("a"),t&&(this.hS.href=t,this.hS.target="_blank"),(0,m.cn)(this.hS,"cnx-ad-slot"),i.appendChild(this.hS),this.hS.addEventListener("click",this.Zx)}addVideoEvents(t){this.Gx.forEach((i=>{t.addEventListener(i,this.Zx)})),this.hS&&this.hS.addEventListener("click",this.Zx)}nS(t){this.Gx.forEach((i=>{t.removeEventListener(i,this.Zx)})),this.hS&&this.hS.removeEventListener("click",this.Zx)}iS(){this.Wx||(this.Wx=!0,this.hf.next({type:g.fI.AdLoaded,payload:{}}))}eS(){this.hf.next({type:g.fI.AdRemainingTimeChange});const t=(0,lt.dQ)(0,this.dg.duration,0,100,this.dg.currentTime);if(this.Kx&&t>=this.Kx.position){this.Xx||this.hf.next({type:this.Kx.event});const t=this.Kx;this.Kx=this.Yx[this.Yx.indexOf(this.Kx)+1],t.event===g.fI.AdVideoComplete&&(this.Nx&&(this.dg.currentTime=.01),this.Qx=!1,this.stopAd("videoComplete"),this.Xx=!0)}}tS(t){try{this.dg.play().catch((e=>(0,i.n)({level:i.D.WARN,message:`AdManager_VastIntegrator_play_${t}`,exception:`playError: ${e.message}`,callStack:e.stack})))}catch(e){(0,i.n)({level:i.D.WARN,message:`AdManager_VastIntegrator__play_${t}`,exception:`promiseError: ${e.message}`,callStack:e.stack})}}}var en,sn;!function(t){t.errorIframe="Error creating iframe"}(en||(en={}));class nn{constructor(t,i,e){this.Sr=t,this.Nc=i,this.en=e}oS(t,i,e){let s=!1;return n=>{n.contentWindow&&!s&&(s=!0,this.aS(n,this.cS(t,i),e))}}lS(t,i,e,s,n,r,h=!0){return this.uS(t,this.oS(i,e,s),n,r,h)}uS(t,i,e,s,n=!0){const r=this.Sr.createElement("iframe",s);return r.allow="autoplay",r.src="javascript:false",r.srcdoc="",r.width="100%",r.height="100%",r.style.position="absolute",r.style.left="0",r.style.top="0",r.style.margin="0px",r.style.padding="0px",r.style.border="0px",r.style.width="100%",r.style.height="100%",n||(r.style.display="none"),r.setAttribute("SCROLLING","NO"),null==e||e.forEach((t=>{r.setAttribute(t.key,t.value)})),r.onload=()=>{i(r)},t.appendChild(r),i(r),r}aS(t,i,e){const s=(0,m.LT)(t);(class{static executeAsync(t,i){this.dS(t)(i)}static pS(t){return!!t.cnxProxyTask}static dS(t){return this.pS(t)||this.fS(t),t.cnxProxyTask}static fS(t){const i=t.document.head;(0,m.ML)(i,t,"\n window.cnxProxyTask = function(task) {\n setTimeout(function(){\n task();\n }, 0);\n }\n")}}).executeAsync(s,(()=>{try{const e=t.contentWindow&&t.contentWindow.document;e.open(),e.write(i)}catch(i){this.vS(t,i),t=null}e(t)}))}cS(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,ut.qs)();return new Promise(((s,n)=>{this.gS=this.lS(t.container,i,{iframeID:e},(i=>{if(null===i)return void n(en.errorIframe);const r=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",r),s({iframe:i})):n("The Iframe is no longer in the DOM"))};try{if(i.contentWindow.addEventListener("message",r),!t.customReportingLog||!this.Nc)return;const{advertiserLineItemId:e,heavyAdBlockTypeEnum:s}=t.customReportingLog;this.mS=new l(this.gS.contentWindow,this.Nc,{advertiserLineItemId:e,heavyAdBlockTypeEnum:s})}catch(t){this.vS(i,t),n("Iframe callback error")}}),t.customIframeAttributes,this.en,t.visible)}))}get iframe(){return this.gS}destroy(){var t;null===(t=this.mS)||void 0===t||t.destroy(),this.gS=null}vS(t,e){this.Sr.isDetachedFromDOM(t)?(0,i.n)({message:"iframeLoader_(inDom_false)",exception:e.message,callStack:e.stack,level:i.D.WARN},{sendMaxLog:!1,throttle:1}):(0,i.n)({message:"iframeLoader_(inDom_true)",exception:e.message,callStack:e.stack,level:i.D.WARN},{sendMaxLog:!1,throttle:1}),(0,m.bX)(t)}}class rn{constructor(t,i,e,s,n){this.yS=t,this.Sr=i,this.Nc=e,this.Xt=s,this.wS=n,this.xS={bodyTamplate:`<div class="ad-element" id="cnx-ad-element"></div><script type="text/javascript" src="${this.yS}"><\/script>'\n <script type="text/javascript">\n window.Object.defineProperty(Object.prototype, 'cnxInnerTag', { enumerable: !1, writable: !0, value: '${this.Xt}' });\n window.Object.defineProperty(Function.prototype, 'cnxInnerTag',\n { enumerable: !1, writable: !0, value: '${this.Xt}' });\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.SS=new nn(this.Sr,this.Nc)}_S(t){return this.SS.loadIframe({customHead:this.xS.headTamplate,customHtml:this.xS.bodyTamplate,container:t,customReportingLog:{heavyAdBlockTypeEnum:s.ProtoHeavyAdBlockTypeEnum.VpaidIframe,advertiserLineItemId:this.wS}})}loadAdUnitIframe(t){return new Promise(((i,e)=>{this._S(t).then((t=>{t.adContainer=t.iframe.contentWindow.document.querySelector(".ad-element"),i(t)})).catch((t=>{e(t)}))}))}destroyAdUnit(){try{const t=this.SS.iframe.contentWindow.clearAll;t&&t()}catch(t){(0,i.n)({message:"AdManager_VPAIClient_destroyAdUnit",exception:null==t?void 0:t.message,callStack:null==t?void 0:t.stack,level:i.D.WARN},{throttle:2,sendMaxLog:!0})}this.SS.destroy(),this.SS=null}}!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"}(sn||(sn={}));class hn extends jt{constructor(t,e,s,n,r,h,o){super(),this.Vx=t,this.Sr=e,this.Nc=s,this.AS=n,this.wS=r,this.mv=h,this.Zt=o,this.PS=[],this.kS=new Set,this.TS=new Set,this.CS=(t,i,e)=>{const s={url:t,playerHandles:e};this.MS(g.fI.AdClickThru,s)},this.MS=(t,e)=>{if(this.TS.add(t),!this.kS.has(t))return t!==g.fI.AdImpression||this.TS.has(g.fI.AdLoaded)?void this.ES(t,e):((0,i.n)({message:"AdManager_AdVpaidWrapper_ImpressionBeforeAdLoaded",exception:`advertiserLineItemId:${this.wS}_creativeId:${this.mv}_vpaidSrc:${this.Vx}`,callStack:JSON.stringify((0,a.ee)(this.TS)),level:i.D.WARN},{throttle:1e3}),this.kS.add(g.fI.AdLoaded),void this.ES(g.fI.AdLoaded,e))},this.ES=(t,i)=>{switch(t){case g.fI.AdError:this.hf.next({type:g.fI.AdError,payload:{errorMessage:(0,P.HD)(i)?i:JSON.stringify(i)}});break;case g.fI.AdLoaded:this.hf.next({type:g.fI.AdLoaded,payload:{skipOffset:(0,P.as)(i)?i.skipOffset:void 0}});break;case g.fI.AdImpression:this.hf.next({type:g.fI.AdImpression,payload:{}});break;case g.fI.AdClickThru:this.hf.next({type:g.fI.AdClickThru,payload:(0,P.as)(i)?i:{}});break;default:this.hf.next({type:g.fI[t]})}}}initAd(t,i,e,s,n,r){try{this.Tu=t,this.Cu=i,this.cg=e,this.LS=s,this.OS=n,this.RS=r,this.BS=new rn(this.Vx,this.Sr,this.Nc,this.AS,this.wS),this.DS=this.BS.loadAdUnitIframe(r.slot).then((t=>{this.jS(t)})).catch((t=>{this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.VpaidOnLoad}})}))}catch(t){this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.VpaidOnLoad}})}}startAd(){try{this.TS.has(g.fI.AdImpression)&&!this.kS.has(g.fI.AdImpression)&&((0,i.n)({message:"AdManager_AdVpaidWrapper_brokenImpressionHandle",exception:`advertiserLineItemId:${this.wS}_creativeId:${this.mv}_vpaidSrc:${this.Vx}`,callStack:JSON.stringify((0,a.ee)(this.TS)),level:i.D.WARN},{throttle:1e3}),this.kS.add(g.fI.AdImpression),this.hf.next({type:g.fI.AdImpression,payload:{}})),this.FS.startAd()}catch(t){this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.WrapperStartAdError}})}}stopAd(t){var e;null===(e=this.DS)||void 0===e||e.then((()=>{this.FS?this.FS.stopAd(t):(0,i.n)({message:"stopAd",exception:t,level:i.D.WARN})}))}resizeAd(t,i,e){this.FS.resizeAd(t,i,e)}pauseAd(){this.FS.pauseAd()}resumeAd(){this.FS.resumeAd(),this.Zt===dt.M.Ios&&(0,m.UR)(this.RS.videoSlot)}expandAd(){this.FS.expandAd()}collapseAd(){this.FS.collapseAd()}skipAd(){this.FS.skipAd()}getAdRemainingTime(){return this.FS.getAdRemainingTime()}getAdDuration(){var t;return null===(t=this.FS)||void 0===t?void 0:t.getAdDuration()}getAdVolume(){return this.FS.getAdVolume()}setAdVolume(t){this.FS.setAdVolume(t)}destroy(){var t;this.$S(),this.PS.length=0,this.FS=null,null===(t=this.BS)||void 0===t||t.destroyAdUnit()}jS(t){const i=t.iframe.contentWindow.getVPAIDAd;if("function"==typeof i){const e=i();this.FS=e,this.VS(),this.HS(e)?e.initAd(this.Tu,this.Cu,this.cg,this.LS,this.OS,{slot:t.adContainer,videoSlot:this.RS.videoSlot}):this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.VpaidInvalid}})}else this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.VpaidGetVpaidAdError}})}VS(){Object.keys(g.fI).forEach((t=>{let i=this.MS.bind(this,g.fI[t]);g.fI[t]===g.fI.AdClickThru&&(i=this.CS),this.PS.push({handler:i,event:t}),this.FS.subscribe(i,t)}))}$S(){this.PS.forEach((t=>{this.FS.unsubscribe(t.handler,t.event)}))}HS(t){return Object.keys((0,a.ti)(sn)).every((i=>(0,P.mf)(t[sn[i]])))}}var on=n(525);class an extends Wt{constructor(t,i){super(t,i),this.uv=t,this.settings=i,this.adSourceType=s.ProtoAdsourceTypeEnum.Unknown,this.zS=[],this.creativeId=i.vastResponse.creativeId}initAd(t,i,e,n,r,h,o){try{super.initAd(t,i,e,n,r,h,o),(0,Jt.A)(this.settings.adManagerLineItem.protoLineItem.publisherLineItemId,this.settings.vastResponse.linearClickThrough).then((r=>{var h;if(r)return void this.Pv({type:g.fI.AdError,payload:{errorMessage:Vt.DomainBlocked}});if(this.qS=this.WS(t,this.fv),null===this.qS)return void this.Pv({type:g.fI.AdError,payload:{errorMessage:Vt.VastUnsupportedMedia}});(null===(h=this.qS.src)||void 0===h?void 0:h.includes(on.n.endPoints.base.video))&&(this.qS.src=this.qu.appendParamsToUrl(this.qS.src)),this.adMediaType=this.qS.type,this.qS.getMediaFileType()===Ji.Video?(this.GS=new tn(this.settings.globalDomUtilsService,this.qS.src,this.fv,this.settings.os,this.settings.vastResponse.linearClickThrough,this.settings.loopAdWhenFinished),this.adSourceType=s.ProtoAdsourceTypeEnum.VastMedia):(this.GS=new hn(this.qS.src,this.settings.globalDomUtilsService,this.settings.trackingService,this.Fv,this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,this.creativeId,this.settings.os),this.adSourceType=s.ProtoAdsourceTypeEnum.Vpaid),this.zS.push(this.GS.onVpaidEvent.subscribe((t=>{if(t.type===g.fI.AdLoaded&&(t.payload.skipOffset=this.settings.vastResponse.skipoffset),t.type===g.fI.AdClickThru){this.JS=t.payload.url;const i=t.payload.url||this.settings.vastResponse.linearClickThrough;i&&t.payload.playerHandles&&this.settings.globalDomUtilsService.open(i,ue.bS.Blank)}this.Pv(t)})));const o={AdParameters:this.settings.vastResponse.adParameters,adParameters:this.settings.vastResponse.adParameters};this.GS.initAd(t,i,e,n,o,{slot:this.dv,videoSlot:this.fv})})).catch((t=>this.QS(t)))}catch(t){this.QS(t)}}startAd(){try{super.startAd(),this.GS.startAd()}catch(t){this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.AdaptorStartAdError+`_${t.message}`}})}}stopAd(t){super.stopAd(t),this.GS?this.GS.stopAd(t):(0,i.n)({message:"stopAd",exception:t,level:i.D.WARN})}resizeAd(t,i,e){try{this.GS.resizeAd(t,i,e)}catch(t){this.Qv("VastBidAdaptor","resizeAd",t)}}pauseAd(){try{this.GS.pauseAd()}catch(t){this.Qv("VastBidAdaptor","pauseAd",t)}}resumeAd(){try{this.GS.resumeAd()}catch(t){this.Qv("VastBidAdaptor","resumeAd",t)}}expandAd(){try{this.GS.expandAd()}catch(t){this.Qv("VastBidAdaptor","expandAd",t)}}collapseAd(){try{this.GS.collapseAd()}catch(t){this.Qv("VastBidAdaptor","collapseAd",t)}}skipAd(){try{super.skipAd(),this.GS.skipAd()}catch(t){this.Qv("VastBidAdaptor","skipAd",t)}}getAdRemainingTime(){try{return this.GS.getAdRemainingTime()}catch(t){return this.Qv("VastBidAdaptor","getAdRemainingTime",t),0}}getAdDuration(){try{return this.GS&&this.GS.getAdDuration()||Math.round(this.settings.vastResponse.duration/ht.s_)}catch(t){return this.Qv("VastBidAdaptor","getAdDuration",t),0}}getAdVolume(){try{return this.GS.getAdVolume()}catch(t){return this.Qv("VastBidAdaptor","getAdVolume",t),0}}getAdMediaSize(){let t=0,i=0;return this.GS instanceof tn?(t=this.GS.getAdMediaWidth(),i=this.GS.getAdMediaHeight()):(t=this.qS.width,i=this.qS.height),{width:t,height:i}}setAdVolume(t){try{super.setAdVolume(t),this.GS.setAdVolume(t)}catch(t){this.Qv("VastBidAdaptor","setAdVolume",t)}}get adVideoUrl(){var t;return null===(t=this.qS)||void 0===t?void 0:t.src}get declaredDurationInSeconds(){return this.settings.vastResponse.duration/ht.s_}Hv(t){const i=super.Hv(t);return this.XS(i)}Nv(t){const i=super.Nv(t);return this.XS(i)}hu(){var t;if(!this.settings.loopAdWhenFinished)try{super.hu(),(0,pt.i)(this.zS),null===(t=this.GS)||void 0===t||t.destroy()}catch(t){this.Qv("VastBidAdaptor","_destroy",t)}}XS(t){var i;return t.payload.adSourceData.name=null===(i=this.settings.vastResponse)||void 0===i?void 0:i.adTitle,t.payload.clickThroughUrl=this.JS||this.settings.vastResponse.linearClickThrough,t}YS(t,i){return t.filter((t=>t.getMediaFileType()===Ji.Video&&i.canPlayType(t.type)))}WS(t,i){const e=this.YS(this.settings.vastResponse.mediaFiles,i),s=e.filter((t=>"video/mp4"===t.type));if(s.length)return Gs(s,t);if(e.length)return Gs(e,t);const n=this.settings.vastResponse.mediaFiles.filter((t=>t.getMediaFileType()===Ji.Javascript));return n.length?Gs(n,t):null}QS(t){this.hf.next({type:g.fI.AdError,payload:{errorMessage:Vt.AdaptorInitAdError+`_${t.message}`}})}}class cn{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.KS(this.settings.xml).then((t=>(this.metrics.fetchEnd=(new Date).getTime(),t))).catch((t=>{throw this.metrics.fetchEnd=(new Date).getTime(),t}))}KS(t){return new Promise(((i,e)=>{const s=new ae(2).parseVastXml(t);!0!==s.error?(this.ZS(s.result),i(this.t_(s.result))):e(s.errorReason)}))}t_(t){return new Promise(((i,e)=>{if(t.wrapper){this.settings.maxWrapperLimit<=0&&e(Ot.XmlAdaptorWrapperLimit);const s=this.settings.maxWrapperLimit-1;i(new pn({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=Ti.getGlobalContainer().resolve(Wi);if(this.settings.adManagerLineItem.protoLineItem.adType===wt.ProtoAdType.Nonlinear){const i=Object.assign(Object.assign({},e),{vastResponse:new ce(this.settings.vastAdsChain),interactionService:this.settings.interactionService});t=new Ws(s,i)}else{const i=Object.assign(Object.assign({},e),{vastResponse:new ce(this.settings.vastAdsChain),trackingService:this.settings.trackingService,loopAdWhenFinished:this.settings.loopAdWhenFinished});t=new an(s,i)}i(t)}}))}ZS(t){!function(t,i){const e=new It(t);i.adError.push(...Lt(e.errorUrls)),i.adImpression.push(...Lt(e.impressions)),i.adViewableImpression.push(...Lt(e.trackingEvents.viewable_impression)),i.adClick.push(...Lt(e.clickTrackings)),i.adMute.push(...Lt(e.trackingEvents.mute)),i.adPause.push(...Lt(e.trackingEvents.pause)),i.adQuartileFirst.push(...Lt(e.trackingEvents.firstQuartile)),i.adQuartileSecond.push(...Lt(e.trackingEvents.midpoint)),i.adQuartileThird.push(...Lt(e.trackingEvents.thirdQuartile)),i.adQuartileFourth.push(...Lt(e.trackingEvents.complete)),i.adResume.push(...Lt(e.trackingEvents.resume)),i.adSkip.push(...Lt(e.trackingEvents.skip)),i.adStarted.push(...Lt(e.trackingEvents.creativeView)),i.adVideoStart.push(...Lt([...e.trackingEvents.start])),i.adUnmute.push(...i.adUnmute,...Lt(e.trackingEvents.unmute)),i.adUserAcceptInvitation.push(...Lt([...e.trackingEvents.acceptInvitation,...e.trackingEvents.acceptInvitationLinear])),i.adUserClose.push(...Lt(e.trackingEvents.close)),i.adUserMinimize.push(...i.adUserMinimize,...Lt([...e.trackingEvents.collapse,...e.trackingEvents.playerCollapse,...e.trackingEvents.adCollapse]))}(t,this.settings.trackersInformation),this.settings.vastAdsChain.push(t)}}var ln,un=n(158);!function(t){t[t.None=0]="None",t[t.Ima=1]="Ima"}(ln||(ln={}));const dn={[ln.Ima]:".g.doubleclick.net"};class pn{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.i_(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}))}e_(t){let i=ln.None;return Object.keys(dn).forEach((e=>{t.includes(dn[e])&&(i=parseInt(e,10))})),i}i_(t){let e;try{e=this.n_(t)}catch(t){return Promise.reject(Ot.InvalidCreativeUrl)}let s=this.e_(t);switch(this.settings.adManagerLineItem.protoLineItem.adType===wt.ProtoAdType.Nonlinear&&(s===ln.Ima&&(0,i.n)({message:"AdManager_VastUrlCallAdaptor_found_ima_in_nonLinear",level:i.D.INFO}),s=ln.None),s){case ln.None:return this.r_(e);case ln.Ima:return this.o_(e);default:return Promise.reject(Ot.HandlingSdkUrl)}}o_(t){return Promise.resolve(new Gi({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}))}r_(t){return un.n.fetchXMLRequest(t,this.settings.requestWithCredentials).catch((()=>!1===this.settings.requestWithCredentials?Promise.reject(Ot.NetworkRequestUrl):un.n.fetchXMLRequest(t,!1))).catch((()=>Promise.reject(Ot.NetworkRequestUrl))).then((t=>new cn({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})))}n_(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 fn{constructor(t){this.data=t,(0,P.QM)(this.data.cnxBidId)||(this.data.cnxBidId=(0,ut.qs)())}}var vn,gn=n(7577);!function(t){t.Html="text/html",t.Javascript="application/javascript"}(vn||(vn={}));var mn=n(5522);class yn{constructor(t,i,e,s,n,r){this.a_=t,this.c_=i,this.wS=e,this.Sr=s,this.Nc=n,this.l_=r,this.u_="div-cnx-display",this.Mw=new x.x,this.Lw=new x.x,this.xg=new x.x,this.d_=t=>{this.Lw.next()}}get onDisplayAd(){return this.Mw.asObservable()}get onError(){return this.xg.asObservable()}get onClickClose(){return this.Lw.asObservable()}initializeAd(t,i){try{this.dv=t,this.SS=new nn(this.Sr,this.Nc);let e="";this.a_===vn.Html&&(e=this.c_);const n=this.p_(this.dv,i);let r="",h="",o="",a="";const c="cnx-htmlBidAdaptor-id";switch(this.l_){case s.ProtoAdType.Nonlinear:const t="cnx-htmlBidAdaptor-close-button";a=`\n <style>\n .${t} {\n width: 75px;\n height: 24px;\n display: flex;\n align-items: center;\n cursor: pointer;\n }\n .${t}, svg {\n opacity: 0.8;\n fill: #FFF;\n }\n .${t}, svg:hover {\n opacity: 1;\n }\n .${t}, svg:active {\n opacity: 0.5;\n filter: drop-shadow(2px 2px 2px rgba(0, 0, 0, 0.87))\n }\n </style>`,o=`\n <div id=${c} class=${t}>\n ${mn}\n </div>`;break;case s.ProtoAdType.Overlay:r="{position:absolute;left:50%;top:50%;transform:translate(-50%,-50%)}",h="{border:3px solid white}"}this.SS.loadIframe({customHead:a+"<style>html, body {position:relative;width:100%;height:100%}#"+this.u_+r+"#"+this.u_+h+"#"+this.u_+" iframe{display:block}</style>",customHtml:'<div id="'+this.u_+'">'+e+"</div>"+o,container:n,customReportingLog:{heavyAdBlockTypeEnum:s.ProtoHeavyAdBlockTypeEnum.OverlayIframe,advertiserLineItemId:this.wS}}).then((t=>{this.f_=t.iframe;const i=this.f_.contentWindow;if(this.v_=i.document.getElementById(this.u_),this.a_===vn.Javascript&&(0,m.ML)(this.v_,i,this.c_),""===this.f_.contentWindow.document.head.innerHTML){const t="html, body {position:relative;width:100%;height:100%;margin:0;border:0}";this.g_(t)}(0,m.AX)(this.f_.contentWindow,"AdHtmlWrapper"),this.l_===s.ProtoAdType.Nonlinear&&(this.m_=i.document.getElementById(c),this.m_.addEventListener("click",this.d_)),this.Mw.next()})).catch((t=>{this.xg.next(Vt.DisplayIntegratorIframeLoad)}))}catch(t){this.xg.next(Vt.WrapperInitAdError)}}getAdMediaWidth(){return this.v_.clientWidth}getAdMediaHeight(){return this.v_.clientHeight}destroy(){this.m_&&this.m_.removeEventListener("click",this.d_),this.f_&&this.dv&&(0,m.bX)(this.f_),this.SS&&(this.SS.destroy(),this.SS=null)}p_(t,i){if(!i.width||!i.height)return t;const e=this.Sr.createElementByString(`<div class="cnx-iframe-container" style="width: ${i.width}px; height: ${i.height}px"></div>`);return this.dv.appendChild(e),e}g_(t){const i=this.f_.contentWindow.document.createElement("style"),e=this.f_.contentWindow.document.createTextNode(t);i.appendChild(e),this.f_.contentWindow.document.head.appendChild(i)}}const bn={[le.FirstQuartile]:g.fI.AdVideoFirstQuartile,[le.SecondQuartile]:g.fI.AdVideoMidpoint,[le.ThirdQuartile]:g.fI.AdVideoThirdQuartile,[le.FourthQuartile]:g.fI.AdVideoComplete};class wn extends Wt{constructor(t,i){let e;super(t,i),this.uv=t,this.settings=i,this.adSourceType=s.ProtoAdsourceTypeEnum.Unknown,this.$w=500,this.y_=[],this.settings.adManagerLineItem.protoLineItem.adType===wt.ProtoAdType.Nonlinear?(this.adMediaType="displayHtmlNonLinear",this.xx="htmlNonLinear",e=this.settings.adManagerLineItem.protoLineItem.nonlinearLineItemSettings.nonLinearAdTimeSeconds):(this.adMediaType="displayHtml",this.xx="html",e=this.settings.adManagerLineItem.protoLineItem.overlayTime);const n=e*ht.s_;this.yx=new zs(this.uv,n,this.$w),this.y_.push(this.yx.onTimeUpdate.subscribe((()=>{this.Pv({type:g.fI.AdRemainingTimeChange})})),this.yx.onTimeElapsed.subscribe((()=>{this.stopAd("htmlTimerElapsed")})),this.yx.onQuartile.subscribe((t=>{this.Pv({type:bn[t],payload:{}})})))}get adVideoUrl(){return this.xx}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.Tu=t,this.Cu=i,this.Pv({type:g.fI.AdLoaded,payload:{}})}catch(t){this.Pv({type:g.fI.AdError,payload:{errorMessage:Vt.AdaptorInitAdError+`_${t.message}`}})}}startAd(){try{super.startAd(),this.yx.start(),this.b_=new yn(this.settings.mime,this.settings.html,this.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,this.settings.globalDomUtilsService,this.settings.trackingService,this.settings.adManagerLineItem.protoLineItem.adType),this.y_.push(this.b_.onDisplayAd.subscribe((()=>{this.Pv({type:g.fI.AdStarted}),this.Pv({type:g.fI.AdVideoStart}),this.Pv({type:g.fI.AdImpression,payload:{}})})),this.b_.onError.subscribe((t=>{this.Pv({type:g.fI.AdError,payload:{errorMessage:t}}),this.yx.stop()})),this.b_.onClickClose.subscribe((()=>{this.Pv({type:g.fI.AdUserClose,payload:{}}),this.stopAd(g.r5)}))),this.b_.initializeAd(this.dv,{width:this.Tu,height:this.Cu})}catch(t){this.Pv({type:g.fI.AdError,payload:{errorMessage:Vt.AdaptorStartAdError+`_${t.message}`}})}}stopAd(t){try{super.stopAd(t),this.yx.stop(),this.Pv({type:g.fI.AdStopped,payload:{shouldTrackPostBid:!0}})}catch(t){this.Qv("HtmlBidAdaptor","stopAd",t)}}skipAd(){try{super.skipAd(),this.Pv({type:g.fI.AdSkipped})}catch(t){this.Qv("HtmlBidAdaptor","skipAd",t)}}pauseAd(){try{this.yx.stop(),this.Pv({type:g.fI.AdPaused})}catch(t){this.Qv("HtmlBidAdaptor","pauseAd",t)}}resumeAd(){try{this.yx.start(),this.Pv({type:g.fI.AdPlaying})}catch(t){this.Qv("HtmlBidAdaptor","resumeAd",t)}}collapseAd(){}expandAd(){}getAdDuration(){return this.yx.timerDuration/ht.s_}getAdRemainingTime(){return this.yx.timeRemaining/ht.s_}getAdVolume(){return 0}getAdMediaSize(){return{width:this.b_.getAdMediaWidth(),height:this.b_.getAdMediaHeight()}}setAdVolume(t){}resizeAd(t,i,e){this.Tu=t,this.Cu=i}hu(){var t;try{super.hu(),this.yx.stop(),(0,pt.i)(this.y_),null===(t=this.b_)||void 0===t||t.destroy()}catch(t){this.Qv("HtmlBidAdaptor","_destroy",t)}}}class xn{constructor(t){this.settings=t,this.metrics={created:(new Date).getTime()}}fetchBid(){if(this.metrics.fetchStart=(new Date).getTime(),!this.w_(this.settings.mime))return Promise.reject(Ot.HTMLUnknownMimeType);const t=Ti.getGlobalContainer().resolve(Wi),i=new wn(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});return this.metrics.fetchEnd=(new Date).getTime(),Promise.resolve(i)}w_(t){return Object.keys(vn).some((i=>vn[i]===t))}}const Sn={[ct.LINEAR]:[s.ProtoAdType.Video,s.ProtoAdType.Overlay],[ct.NONLINEAR]:[s.ProtoAdType.Nonlinear]};function _n(t,i){return t.filter((t=>Sn[i].includes(t.adType)))}function An(t,i){return t.find((t=>t.adManagerLineItem.protoLineItem.advertiserLineItemId===i)).adManagerLineItem}function Pn(t){return[s.ProtoCreativeTypeEnum.Tam,s.ProtoCreativeTypeEnum.TamDeal,s.ProtoCreativeTypeEnum.Rtb,s.ProtoCreativeTypeEnum.HeaderBidder].includes(t)}const kn=({playerSkippability:t,playerSkipMin:i,playerSkipAfter:e,lineItemSkippability:n,lineItemSkipMin:r})=>{let h={skippable:!0,skipafter:e};switch(t){case s.ProtoPlayerSkippabilityType.AllowNonSkipAdsIfTheyAreShorterThan:h=function({skippabitySettings:t,playerSkipMin:i,lineItemSkippability:e,lineItemSkipMin:n}){if(e===s.ProtoLineItemSkippabilityType.RequirePublisherToAllowNonSkipAdsShorterThan)n<i?t.skipmin=i:(t.skipmin=n,t.minDuration=n);else t.skipmin=i;return t}({skippabitySettings:h,playerSkipMin:i,lineItemSkippability:n,lineItemSkipMin:r});break;case s.ProtoPlayerSkippabilityType.RequireAdsToBeSkippable:n===s.ProtoLineItemSkippabilityType.RequirePublisherToAllowNonSkipAdsShorterThan&&(h.skipmin=r,h.minDuration=r)}return h};var In=n(6615),Tn=n(1886),Cn=n(5348);class Mn{constructor(t,i,e,s,n,r,h,o){this.x_=t,this.S_=i,this.if=e,this.__=s,this.A_=n,this.P_=r,this.k_=h,this.I_=o,this.T_=new Map}request(t){const{width:e,height:s}=t.callingState,n=this.C_(e,s),r=this.M_(t);return!n||Object.keys(r.lineItems).length<=0?Promise.resolve({bids:[],noBids:[]}):this.E_(r).then((i=>(r.liveRampAtsEnvelope&&Cn.$.setEnvelopeStatus(i.liveRampEnvelopeStatus),this.O_(i,t)))).catch((t=>((0,i.n)({message:"RtbCallAggregator",exception:t.message,level:i.D.CRITICAL}),{bids:[],noBids:[]})))}destroy(){}O_(t,i){const e={bids:[],noBids:[]};return t.lineItemResponses.forEach((s=>{const n=An(i.lineItemRequestDataList,s.id),r={cachedFloorPrice:(0,P.r)(s.cachedFloorPrice)?s.cachedFloorPrice:void 0,predictedFloorPrice:s.predictedFloorPrice};this.T_.set(s.id,r),s.bids.forEach((s=>{const r=this.R_(s,n,t,i.callingState);r&&e.bids.push(r)})),s.noBids.forEach((i=>{e.noBids.push(this.B_(i,n,t))}))})),e}B_(t,i,e){var s;const n=null===(s=this.T_.get(i.protoLineItem.advertiserLineItemId))||void 0===s?void 0:s.predictedFloorPrice;return{lineItem:i,requestMetadata:new fn({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}}R_(t,i,e,s){var n;let r=t;const h=this.D_(r,i),o=null===(n=this.T_.get(i.protoLineItem.advertiserLineItemId))||void 0===n?void 0:n.predictedFloorPrice,a=new fn({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=Js(),l={id:(0,ut.qs)(),adContainer:this.A_.get(i.protoLineItem.adType),adEnforcer:this.k_,adManagerLineItem:i,adSlotContainerRecycler:this.I_,bidSlotId:c,callingState:s,globalDomUtilsService:this.if.services.GlobalDomUtilsService,os:this.if.config.os.os,replaceTrackingMacros:!0,requestMetadata:a,trackersInformation:h,urlSuffixerService:this.if.services.UrlSuffixerService,viewabilityService:this.if.services.ViewabilityService,creativeId:r.creativeId,interactionService:this.if.services.InteractionService,obfuscatedPrice:r.gtkpbp,successRate:r.successRate,trackingService:this.if.services.TrackingService};return this.j_(i.protoLineItem)?new cn(Object.assign(Object.assign({},l),{xml:r.vastTag,adMacroReplacer:this.__,pageUrl:this.if.config.pageUrl})):new xn(Object.assign(Object.assign({},l),{dimensions:{width:r.width,height:r.height},html:r.vastTag,mime:r.mime}))}j_(t){return t.adType===s.ProtoAdType.Nonlinear&&t.nonlinearLineItemSettings.nonLinearRequestType===s.ProtoNonlinearRequestType.Video||t.adType===s.ProtoAdType.Video}D_(t,i){const e=new Ct;Mt(i.protoLineItem.trackers,e);const s=[...t.billingNoticeUrlList,t.adQualityCheckUrl].filter((t=>(0,P.QM)(t))).map((t=>Et(t)));return e.adImpression.push(...s),(0,P.QM)(t.winNoticeUrl)&&e.adWin.push(Et(t.winNoticeUrl)),e}F_(t,i){if(t.protoLineItem.adType!==s.ProtoAdType.Overlay)return null;const e=i.adContainerState.get(s.ProtoAdType.Video),n=i.adContainerState.get(s.ProtoAdType.Overlay);return e.height!==n.height||e.width!==n.width?{width:n.width,height:n.height}:void 0}V_(t,i){const e={};return t.filter((t=>this.U_(t))).forEach((t=>{const s=t.adManagerLineItem,n=this.F_(s,i);let r;this.T_.has(s.protoLineItem.advertiserLineItemId)&&(r=this.T_.get(s.protoLineItem.advertiserLineItemId));const h=this.N_(s);e[s.protoLineItem.advertiserLineItemId]=Object.assign({availableRequests:t.maxAvailableRequests,gdprConsent:this.if.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}N_(t){const i=kn({playerSkippability:this.S_.skippability,playerSkipMin:this.S_.skipMin,playerSkipAfter:this.S_.skipAdAfter,lineItemSkippability:t.protoLineItem.skippability,lineItemSkipMin:t.protoLineItem.skipMin}),e=i.skippable?s.ProtoSkipEnabledEnum.Yes:s.ProtoSkipEnabledEnum.No;return Object.assign(Object.assign({},i),{skip:e})}U_(t){return!!t.adManagerLineItem.protoLineItem.forceCallingInEveryAO||this.P_.shouldRequestLineItem(t.adManagerLineItem.protoLineItem.advertiserLineItemId)}M_(t){const{width:i,height:e,viewability:s}=t.callingState,{playerWidth:n,playerHeight:r}=this.if.services.TrackingService.getPlayerSize();return{metadata:this.if.services.TrackingService.getMetadataModel(),gdprCompliant:this.if.services.UserManagerService.isGDPR(),gdprConsentData:this.if.services.UserManagerService.getConsentPayload(),soundOn:t.callingState.sound,videoHeight:e,videoWidth:i,testMode:"true"===(0,In.Ph)("cnxRtbTest",this.if.config.pageUrl),explorationMode:this.if.config.explorationMode,viewability:s,outstream:this.x_,domainURL:this.if.config.domainURL,isClickToPlay:t.callingState.clickToPlay,appVersion:this.if.config.appVersion,deviceID:this.if.services.UserManagerService.getDeviceId(),isCcpaBlockingUserInfo:!this.if.services.UserManagerService.isSellUserAllowed(),usPrivacyString:this.if.services.UserManagerService.getUsPrivacyString(),gdprConsentMode:this.if.services.UserManagerService.gdprConsentMode,customMacros:this.if.services.MacrosService.getExtraMacros(),maxAdDuration:t.maxAdDuration,lineItems:this.V_(t.lineItemRequestDataList,t.callingState),maxBidPrice:t.maxBidPrice,playerWidth:n,playerHeight:r,useNewSkippability:!0,liveRampAtsEnvelope:this.if.services.UserManagerService.identityEnvelope}}E_(t){return un.n.sendProtoRequest({endpoint:on.n.endPoints.api.rtb,ProtoRequest:s.ProtoRtbRequest,ProtoResponse:s.ProtoRtbResponse,requestData:t,queryParams:Object.assign({[gn.Fk]:Ne.g.version},Tn.f.getCidKeyValueObject()),logError:!1})}C_(t,e){return 0!==t&&0!==e||((0,i.n)({message:"AdManager_BidderCaller_dimensions",exception:`width:${t}_height:${e}_destroyed:${d.S.playerDestroyed}`,level:i.D.CRITICAL},{throttle:5}),!1)}}var En;!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"}(En||(En={}));const Ln=(t,e)=>{try{const s=JSON.parse(t);return s.length>1&&(0,i.n)({message:"AdManager_AdSourceWrappe_multiple_bidders",level:i.D.WARN,callStack:e,exception:t},{throttle:1,sendMaxLog:!1}),s[0].bidder}catch(s){(0,i.n)({message:"AdManager_AdSourceWrapper_cannot_get_bidder",level:i.D.WARN,callStack:e,exception:t},{throttle:2,sendMaxLog:!1})}},On=1,Rn=["video/mp4","video/webm","application/javascript","video/ogg","video/mpeg"],Bn={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},Dn={VPAID_1:1,VPAID_2:2},jn=[Bn.VAST_2_WRAPPER,Bn.VAST_2,Bn.VAST_3,Bn.VAST_3_WRAPPER],Fn=[Dn.VPAID_1,Dn.VPAID_2],$n=(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:Rn,protocols:jn,linearity:On,api:Fn,frameworks:[Dn.VPAID_1,Dn.VPAID_2],maxduration:s,minDuration:0,skip:r,skippable:h,skipmin:o,skipafter:a}}},Vn="https://prebid.adnxs.com/pbc/v1/cache";var Un=n(9207);const Nn=[Un.Q.P1,Un.Q.P2,Un.Q.P4,Un.Q.P7,Un.Q.P8],Hn=()=>({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}]}),zn=()=>({cmpApi:"iab",timeout:2e3});var qn;!function(t){t.CACHE_ID="CACHE_ID"}(qn||(qn={}));var Wn;!function(t){t.Banner="banner",t.Video="video",t.All="all"}(Wn||(Wn={}));const Gn=(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:[qn.CACHE_ID]}}),{yahoossp:{mode:Wn.Video}});return(0,P.QM)(s)&&(n.pageUrl=s),n.usePrebidCache&&(n.cache={url:Vn}),e&&(n.schain=(t=>({validation:"strict",config:{ver:"1.0",complete:1,nodes:[{asi:t.businessDomain,hp:1,sid:(0,P.QM)(t.supplyChainId)?t.supplyChainId:null}]}}))(e)),(t||i)&&(n.consentManagement=((t,i)=>t?{gdpr:Hn()}:i?{usp:zn()}:{})(t,i)),n};class Jn{constructor(t){this.Sr=t,this.SS=new nn(this.Sr)}loadPrebidJs(t){return new Promise(((i,e)=>{if(this.H_)return i(this.H_);this.insertPrebidJs().then((e=>{this.H_=e,this.H_.setConfig(t),i(e)})).catch((t=>e(t)))}))}insertPrebidJs(){return new Promise(((t,i)=>{this.SS.loadIframe({customHead:"<style> html, body {display: none}</style>",customHtml:`<script id='cnx-prebid-loader' type='text/javascript' src='${on.n.endPoints.assets.plugins.prebidScript}'><\/script>`,customIframeAttributes:[{key:"class",value:"cnx-prebid-loader"}],container:this.Sr.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 Qn{get config(){return this.z_}}const Xn={[En.AppNexus]:new class extends Qn{constructor(){super(...arguments),this.z_={vendorId:32,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t),{floorPrice:s,skippabilitySettings:{skip:n,skipafter:r}}=i;return(0,P.r)(s)&&(e.reserve=s),e.video=Object.assign(Object.assign({},e.video),{skippable:!!n,skipoffset:r}),e}},[En.DistrictM]:new class extends Qn{constructor(){super(...arguments),this.z_={vendorId:144,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t),{floorPrice:s,skippabilitySettings:{skip:n,skipafter:r}}=i;return(0,P.r)(s)&&(e.reserve=s),e.video=Object.assign(Object.assign({},e.video),{skippable:!!n,skipoffset:r}),e}},[En.IndexExchange]:new class extends Qn{constructor(){super(...arguments),this.z_={vendorId:10,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,e){const s=t.siteId,{playerWidth:n,playerHeight:r,maxDuration:h,floorPrice:o,lineItemId:a}=e;if(!(0,P.QM)(s))return void(0,i.n)({level:i.D.CRITICAL,message:"PrebidJS_IX_adapter_missing_siteId",callStack:a});const c={siteId:s,size:[Math.floor(n),Math.floor(r)],video:{mimes:Rn,minduration:0,maxduration:h,protocols:Object.keys(Bn).map((t=>Bn[t]))}};return(0,P.kE)(t.minduration)&&(c.video.minduration=t.minduration),(0,P.kE)(t.maxduration)&&t.maxduration<=h&&(c.video.maxduration=t.maxduration),(0,P.QM)(t.id)&&(c.id=t.id),(0,P.r)(o)&&(c.bidFloor=o,c.bidFloorCur="USD"),c}},[En.OneVideo]:new class extends Qn{constructor(){super(...arguments),this.z_={vendorId:25,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,e){(0,P.QM)(t.pubId)||(0,i.n)({message:"AdManager_HeaderBidder_OneVideo_pubId_missing",level:i.D.CRITICAL},{throttle:2,sendMaxLog:!1});const{playerWidth:s,playerHeight:n,pageUrl:r,floorPrice:h}=e,o=Object.assign(Object.assign({},t),{pubId:t.pubId,video:{playerWidth:Math.floor(s),playerHeight:Math.floor(n),mimes:Rn,protocols:jn,api:Fn},site:{page:r}});return(0,P.r)(h)&&(o.bidfloor=h),o}},[En.OpenX]:new class extends Qn{constructor(){super(...arguments),this.z_={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,P.r)(s)&&(e.customFloor=s),e}},[En.Pubmatic]:new class extends Qn{constructor(){super(...arguments),this.z_={vendorId:76,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t),s=i.floorPrice;(0,P.r)(s)&&(e.kadfloor=String(s));const n=e.dctr;if((0,P.$K)(n)){const t=[];Object.keys(n).forEach((i=>{t.push(`${i}=${n[i]}`)})),e.dctr=t.join("|")}return e}},[En.RhythmOne]:new class extends Qn{constructor(){super(...arguments),this.z_={vendorId:36,gdprSupport:!0,ccpaSupport:!1}}getBidParams(t,e){return(0,P.QM)(t.placementId)||(0,i.n)({level:i.D.CRITICAL,message:"PrebidJS_RhythmOne_adapter_missing_placementId",callStack:e.lineItemId}),t}},[En.Rubicon]:new class extends Qn{constructor(){super(...arguments),this.z_={vendorId:52,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t),s=i.floorPrice;return(0,P.r)(s)&&(e.floor=s),e}},[En.SpotX]:new class extends Qn{constructor(){super(...arguments),this.z_={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,P.r)(s)&&(e.price_floor=s),n&&(e.outstream_options={slot:r}),e}},[En.Telaria]:new class extends Qn{constructor(){super(...arguments),this.z_={vendorId:202,gdprSupport:!0,ccpaSupport:!1}}getBidParams(t,i){const e=Object.assign({},t);return t.srcPageUrl||(e.srcPageUrl=i.pageUrl),e}},[En.MediaNet]:new class extends Qn{constructor(){super(...arguments),this.z_={vendorId:142,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,e){const s=Object.assign({},t),{playerWidth:n,playerHeight:r,maxDuration:h,lineItemId:o,floorPrice:a}=e;return(0,P.QM)(s.cid)||(0,i.n)({level:i.D.CRITICAL,message:"PrebidJS_MediaNet_adapter_missing_cid",callStack:o}),(0,P.QM)(s.crid)||(0,i.n)({level:i.D.CRITICAL,message:"PrebidJS_MediaNet_adapter_missing_crid",callStack:o}),(0,P.r)(a)&&(s.bidFloor=a),s.video={api:Object.keys(Dn).map((t=>Dn[t])),mimes:Object.keys(Rn).map((t=>Rn[t])),protocols:Object.keys(Bn).map((t=>Bn[t])),maxDuration:h,w:Math.floor(n),h:Math.floor(r)},s}},[En.Adman]:new class extends Qn{constructor(){super(...arguments),this.z_={vendorId:149,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,e){const s=Object.assign({},t),{lineItemId:n,floorPrice:r}=e;return(0,P.QM)(s.placementId)||(0,i.n)({level:i.D.CRITICAL,message:"PrebidJS_Adman_adapter_missing_placementId",callStack:n}),(0,P.r)(r)&&(s.bidfloor=r),s}},[En.SynacorMedia]:new class extends Qn{constructor(){super(...arguments),this.z_={vendorId:void 0,gdprSupport:!1,ccpaSupport:!0}}getBidParams(t,e){const s=Object.assign({},t);(0,P.QM)(s.seatId)||(0,i.n)({level:i.D.CRITICAL,message:"PrebidJS_SynacorMedia_adapter_missing_seatId",callStack:e.lineItemId}),(0,P.QM)(s.tagId)||(0,i.n)({level:i.D.CRITICAL,message:"PrebidJS_SynacorMedia_adapter_missing_tagId",callStack:e.lineItemId});const{floorPrice:n,maxDuration:r}=e;return(0,P.r)(n)&&(s.bidfloor=n),s.video={api:Object.keys(Dn).map((t=>Dn[t])),mimes:Object.keys(Rn).map((t=>Rn[t])),protocols:Object.keys(Bn).map((t=>Bn[t])),maxduration:r},s}},[En.Undertone]:new class extends Qn{constructor(){super(...arguments),this.z_={vendorId:677,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,e){const s=Object.assign({},t);return(0,P.QM)(s.placementId)||(0,i.n)({level:i.D.CRITICAL,message:"PrebidJS_Undertone_adapter_missing_placementId",callStack:e.lineItemId}),(0,P.kE)(s.publisherId)||(0,i.n)({level:i.D.CRITICAL,message:"PrebidJS_Undertone_adapter_missing_publisherId",callStack:e.lineItemId}),s.video=Object.assign(Object.assign({},s.video),{skippable:!!e.skippabilitySettings.skip}),s}},[En.AmxRTB]:new class extends Qn{constructor(){super(...arguments),this.z_={vendorId:737,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,i){const e=Object.assign({},t),s=i.floorPrice;return(0,P.r)(s)&&(e.floor=s),e}},[En.Smaato]:new class extends Qn{constructor(){super(...arguments),this.z_={vendorId:82,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,e){const s=Object.assign({},t),{lineItemId:n}=e;return(0,P.QM)(s.publisherId)||(0,i.n)({level:i.D.CRITICAL,message:"PrebidJS_Smaato_adapter_missing_publisherId",callStack:n}),(0,P.QM)(s.adspaceId)||(0,i.n)({level:i.D.CRITICAL,message:"PrebidJS_Smaato_adapter_missing_adspaceId",callStack:n}),s}},[En.SmartAdServer]:new class extends Qn{constructor(){super(...arguments),this.z_={vendorId:18,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,e){const s=Object.assign({},t),{floorPrice:n,lineItemId:r}=e;(0,P.r)(n)&&(s.bidfloor=n);const h=Object.assign(Object.assign({},t.video),{protocol:Bn.VAST_3_WRAPPER});return s.video=h,(0,P.r)(s.networkId)||(0,i.n)({level:i.D.CRITICAL,message:"PrebidJS_SmartAdServer_adapter_missing_networkId_integer",callStack:r}),(0,P.r)(s.formatId)||(0,i.n)({level:i.D.CRITICAL,message:"PrebidJS_SmartAdServer_adapter_missing_formatId_integer",callStack:r}),(0,P.r)(s.pageId)||(0,i.n)({level:i.D.CRITICAL,message:"PrebidJS_SmartAdServer_adapter_missing_pageId_integer",callStack:r}),(0,P.r)(s.siteId)||(0,i.n)({level:i.D.CRITICAL,message:"PrebidJS_SmartAdServer_adapter_missing_siteId_integer",callStack:r}),s}},[En.TheMediaGrid]:new class extends Qn{constructor(){super(...arguments),this.z_={vendorId:686,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,e){const s=Object.assign({},t),{floorPrice:n}=e;return(0,P.r)(n)&&(s.bidFloor=n),(0,P.r)(s.uid)||(0,i.n)({level:i.D.CRITICAL,message:"PrebidJS_TheMediaGrid_adapter_missing_uid_integer",callStack:e.lineItemId}),s}},[En.Rise]:new class extends Qn{constructor(){super(...arguments),this.z_={vendorId:1043,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,e){const s=Object.assign({},t),{lineItemId:n,floorPrice:r}=e;return(0,P.QM)(s.org)||(0,i.n)({level:i.D.CRITICAL,message:"PrebidJS_Rise_adapter_missing_org",callStack:n}),(0,P.r)(r)&&(s.floorPrice=r),s}},[En.YahooSSP]:new class extends Qn{constructor(){super(...arguments),this.z_={vendorId:25,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,e){let s=Object.assign({},t);const n=s.bidOverride||{},r=n.imp||{},h=(0,P.QM)(s.pos)&&(0,P.QM)(s.dcn),o=(0,P.QM)(s.pubId);return h||o||(0,i.n)({level:i.D.CRITICAL,message:"PrebidJS_YahooSSP_adapter_missing_required_fields",callStack:e.lineItemId}),(0,P.r)(e.floorPrice)&&(s=Object.assign(Object.assign({},s),{bidOverride:Object.assign(Object.assign({},n),{imp:Object.assign(Object.assign({},r),{bidfloor:e.floorPrice})})})),s}},[En.Unruly]:new class extends Qn{constructor(){super(...arguments),this.z_={vendorId:36,gdprSupport:!1,ccpaSupport:!1}}getBidParams(t,e){const s=Object.assign({},t);return(0,P.kE)(s.siteId)||(0,i.n)({level:i.D.CRITICAL,message:"PrebidJS_Unruly_adapter_missing_publisherId",callStack:e.lineItemId}),e.isOutstream&&(s.featureOverrides={canRunUnmissable:!0}),(0,P.r)(e.floorPrice)&&(s.floor=e.floorPrice),s}},[En.Kargo]:new class extends Qn{constructor(){super(...arguments),this.z_={vendorId:972,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,e){const s=Object.assign({},t);return(0,P.QM)(s.placementId)||(0,i.n)({level:i.D.CRITICAL,message:"PrebidJS_Kargo_adapter_missing_placementId",callStack:e.lineItemId}),s}},[En.SmileWanted]:new class extends Qn{constructor(){super(...arguments),this.z_={vendorId:639,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,e){const s=Object.assign({},t);return(0,P.QM)(s.zoneId)||(0,i.n)({level:i.D.CRITICAL,message:"PrebidJS_SmileWanted_adapter_missing_zoneId",callStack:e.lineItemId}),(0,P.r)(e.floorPrice)&&(s.bidfloor=e.floorPrice),s}},[En.TrustX]:new class extends Qn{constructor(){super(...arguments),this.z_={vendorId:void 0,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,e){const s=Object.assign({},t);return(0,P.kE)(s.uid)||(0,i.n)({level:i.D.CRITICAL,message:"PrebidJS_TrustX_adapter_missing_uid",callStack:e.lineItemId}),(0,P.r)(e.floorPrice)&&(s.bidFloor=e.floorPrice),s}},[En.EmxDigital]:new class extends Qn{constructor(){super(...arguments),this.z_={vendorId:183,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,e){const s=Object.assign({},t);return(0,P.QM)(s.tagid)||(0,i.n)({level:i.D.CRITICAL,message:"PrebidJS_EmxDigital_adapter_missing_tagid",callStack:e.lineItemId}),(0,P.r)(e.floorPrice)&&(s.bidfloor=e.floorPrice.toString()),s}},[En.KrushMedia]:new class extends Qn{constructor(){super(...arguments),this.z_={vendorId:void 0,gdprSupport:!0,ccpaSupport:!0}}getBidParams(t,e){const s=Object.assign({},t);return(0,P.QM)(s.key)||(0,i.n)({level:i.D.CRITICAL,message:"PrebidJS_KrushMedia_adapter_missing_key",callStack:e.lineItemId}),(0,P.r)(e.floorPrice)&&(s.bidfloor=e.floorPrice),s}}};class Yn{constructor(t,i,e,s,n,r,h,o){this.q_=t,this.Ue=i,this.x_=e,this.W_=s,this.G_=n,this.Sr=r,this.J_=h,this.Q_=o,this.X_=new Jn(this.Sr)}requestHeaderBidder(t,i,e){return new Promise(((n,r)=>{this.Y_().then((s=>{const r=t.map((t=>this.K_(s,t,i,e).then((t=>t))));Promise.all(r).then((t=>{n(t)}))})).catch((t=>{r(s.ConnatixNoBidReasonEnum.NoBid)}))}))}Z_(t,i){const e={lineItemSkippability:t,lineItemSkipMin:i,playerSkippability:this.J_.skippability,playerSkipMin:this.J_.skipMin,playerSkipAfter:this.J_.skipAdAfter},s=kn(e),n=s.skippable?1:0;return Object.assign({skip:n},s)}K_(t,i,e,n){return new Promise((r=>{let h=[];if(i.availableRequests>0){const r=i.lineItem.floorPriceData.map((t=>t.price));if((0,a.BZ)(r)){h=this.tA(i.lineItem.floorPriceData,i.availableRequests,i.maxBidPrice).map((s=>this.iA(t,i.lineItem,s,e,n,r,i.maxAdDuration)))}else{const o={floorPrice:i.lineItem.floorPrice,floorPriceIndex:-1,floorPriceFactor:null,floorPriceBypassReason:s.FloorPriceBypassReasonEnum.FixedCpm},a=this.iA(t,i.lineItem,o,e,n,r,i.maxAdDuration);h.push(a)}}Promise.all(h).then((t=>{const e=[],s=[],n=i.lineItem.advertiserLineItemId;t.forEach((t=>{t.reason?s.push(t):e.push(t)}));r({bids:e,noBids:s,lineItemId:n})}))}))}iA(t,i,e,s,n,r,h){return new Promise((o=>{this.sA(t,i,e,s,n,r,h).then((t=>{o(t)})).catch((t=>{o(t)}))}))}Y_(){const t=Gn(this.W_,this.G_,this.q_,this.Ue);return new Promise(((e,s)=>{this.X_.loadPrebidJs(t).then((t=>{e(t)})).catch((t=>{(0,i.n)({message:"AdManager_HeaderBidder_unable_to_load_prebidJs_script",exception:t.message,callStack:t.stack,level:i.D.CRITICAL}),s(t)}))}))}sA(t,e,n,r,h,o,a){return new Promise(((c,l)=>{const u=this.Z_(e.skippability,e.skipMin),d=Ln(e.headerBidderBids,e.advertiserLineItemId),p=((t,i,e,s,n,r,h)=>{const o={code:(0,ut.qs)(),mediaTypes:$n(t,i,e,s,r),bids:[]};return e||h!==En.Smaato||(o.mediaTypes.video.startdelay=0),(0,P.r)(n)&&(o.floors=(t=>({currency:"USD",schema:{fields:["mediaType"]},values:{video:t}}))(n)),o})(r,h,this.x_,a,n.floorPrice,u,d);try{const t=this.Q_.replaceMacrosInJsonString(e.headerBidderBids);p.bids=JSON.parse(t)}catch(t){return(0,i.n)({message:"AdManager_HeaderBidder_unable_to_parse_header_bidder",exception:t.message,callStack:t.stack,level:i.D.WARN}),void l({bidderName:d,reason:s.ConnatixNoBidReasonEnum.NoBid,floorPrice:n.floorPrice,floorPriceIndex:n.floorPriceIndex})}const f=Js();p.bids.forEach((t=>this.nA(t,r,h,n.floorPrice,e.advertiserLineItemId,a,f,u))),t.que.push((()=>{t.addAdUnits(p);const r={timeout:e.headerBidderTimeout,adUnits:[p],bidsBackHandler:()=>{try{const r=t.getHighestCpmBids(p.code)[0];if(!r)return void l({bidderName:d,reason:s.ConnatixNoBidReasonEnum.CsEmptyResponse,floorPrice:n.floorPrice,floorPriceIndex:n.floorPriceIndex});let h,a;if(this.rA(r))h=(t=>`${Vn}?uuid=${t.adserverTargeting.hb_cache_id}`)(r);else if(h=r.vastUrl,a=r.vastXml,!h&&!a)return(0,i.n)({level:i.D.WARN,message:"AdManager_HeaderBidder_no_content",exception:JSON.stringify(r)}),void l({bidderName:d,reason:s.ConnatixNoBidReasonEnum.CsInvalidResponse,floorPrice:n.floorPrice,floorPriceIndex:n.floorPriceIndex});const u=r.cpm||r.adResponse.ad.cpm,{advertiserLineItemId:v}=e,g=Object.assign(Object.assign({},n),{bidderName:d,adTagUrl:h,adTagXml:a,lineItemId:v,cpm:u,slotId:f,bidId:p.code});(0,P.r)(n.floorPrice)&&u<n.floorPrice&&(0,i.n)({message:"AdManager_HeaderBidderRequester_cpm_lower_than_floorprice",level:i.D.WARN,exception:`floorPrices_${o}_index_${n.floorPriceIndex}_floorPrice_${n.floorPrice}_cpm_${u}_li_${e.advertiserLineItemId}`,callStack:Ln(e.headerBidderBids,e.advertiserLineItemId)},{sendMaxLog:!1,throttle:5}),c(g)}catch(t){(0,i.n)({level:i.D.WARN,message:"AdManager_HeaderBidder_Prebidjs_error",exception:t.message,callStack:t.stack}),l({bidderName:d,reason:s.ConnatixNoBidReasonEnum.NoBid,floorPrice:n.floorPrice,floorPriceIndex:n.floorPriceIndex})}}};t.requestBids(r)}))}))}nA(t,i,e,s,n,r,h,o){const a=Xn[t.bidder].getBidParams;a&&(t.params=a(t.params,{playerWidth:i,playerHeight:e,maxDuration:r,pageUrl:this.Ue,floorPrice:s,lineItemId:n,isOutstream:this.x_,bidSlotId:h,skippabilitySettings:o}))}rA(t){return t.adserverTargeting&&(0,P.QM)(t.adserverTargeting.hb_cache_id)}tA(t,i,e){if(0===i)return[];let n=i;const r=t.map(((t,i)=>({floorPrice:t.price,floorPriceIndex:i,floorPriceFactor:t.factor,floorPriceBypassReason:null}))).filter((({floorPrice:t})=>t>=e&&n>0&&(n--,!0)));return r.length||r.push({floorPrice:e,floorPriceIndex:-1,floorPriceFactor:null,floorPriceBypassReason:s.FloorPriceBypassReasonEnum.BidInHand}),r}}class Kn{constructor(t){this.eh=t}isAdapterCallable(t){const i=(t=>{const i=Object.keys(En).find((i=>En[i]===t));if(i)return En[i]})(t);return!!i&&(this.eh.isGDPR()?this.hA(i):!this.eh.isCcpaApplicable()||this.oA(i))}aA(t){return Xn[t].config.gdprSupport}hA(t){if(this.aA(t))return!0;const i=Xn[t].config.vendorId,e=(0,P.kE)(i)?`${i}`:"";return this.eh.isConsent(e,Nn)}oA(t){return!!Xn[t].config.ccpaSupport||!!this.eh.isSellUserAllowed()}}class Zn{constructor(t,i,e,s,n,r,h,o,a){this.x_=t,this.q_=i,this.if=e,this.__=s,this.A_=n,this.k_=r,this.I_=h,this.Nx=o,this.J_=a,this.cA=new Map,this.lA=new Yn(this.q_,this.if.config.pageUrl,this.x_,this.if.services.UserManagerService.isGDPR(),this.if.services.UserManagerService.isCcpaApplicable(),this.if.services.GlobalDomUtilsService,this.J_,this.if.services.MacrosService),this.uA=new Kn(this.if.services.UserManagerService)}request(t){const{width:i,height:e}=t.callingState,s=this.C_(i,e),n=this.dA(t.lineItemRequestDataList);return(0,a.BZ)(n)&&s?(t.lineItemRequestDataList=n,this.pA(t).then((i=>Promise.resolve(this.fA(i,t)))).catch((()=>Promise.resolve({bids:[],noBids:[]})))):Promise.resolve({bids:[],noBids:[]})}destroy(){}fA(t,i){const e={bids:[],noBids:[]};return t.forEach((t=>{const s=An(i.lineItemRequestDataList,t.lineItemId);t.bids.forEach((t=>{const n=t.bidId,r=new Ct,h=new fn({requestedFloorPrice:t.floorPrice,requestedFloorPriceIndex:t.floorPriceIndex,prebidJsBidderName:t.bidderName,requestNumber:s.historicalMetrics.requestNumber,predictedFloorPrice:s.protoLineItem.predictedFloorPrice,floorPriceFactor:t.floorPriceFactor,floorPriceBypassReason:t.floorPriceBypassReason});Mt(s.protoLineItem.trackers,r),t.adTagUrl?e.bids.push(new pn({id:n,adManagerLineItem:s,replaceTrackingMacros:!0,requestMetadata:h,trackersInformation:r,url:t.adTagUrl,callingState:i.callingState,adMacroReplacer:this.__,adContainer:this.A_.get(s.protoLineItem.adType),globalDomUtilsService:this.if.services.GlobalDomUtilsService,viewabilityService:this.if.services.ViewabilityService,trackingService:this.if.services.TrackingService,cpm:t.cpm,adEnforcer:this.k_,os:this.if.config.os.os,adSlotContainerRecycler:this.I_,bidSlotId:t.slotId,loopAdWhenFinished:this.Nx,pageUrl:this.if.config.pageUrl,urlSuffixerService:this.if.services.UrlSuffixerService})):t.adTagXml&&e.bids.push(new cn({id:n,adManagerLineItem:s,replaceTrackingMacros:!0,requestMetadata:h,trackersInformation:r,xml:t.adTagXml,callingState:i.callingState,adMacroReplacer:this.__,adContainer:this.A_.get(s.protoLineItem.adType),globalDomUtilsService:this.if.services.GlobalDomUtilsService,viewabilityService:this.if.services.ViewabilityService,trackingService:this.if.services.TrackingService,cpm:t.cpm,adEnforcer:this.k_,os:this.if.config.os.os,adSlotContainerRecycler:this.I_,bidSlotId:t.slotId,loopAdWhenFinished:this.Nx,pageUrl:this.if.config.pageUrl,urlSuffixerService:this.if.services.UrlSuffixerService}))})),t.noBids.forEach((t=>{const i=new fn({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}pA(t){const{width:i,height:e}=t.callingState,s=t.lineItemRequestDataList.map((i=>this.vA(i,t.maxAdDuration,t.maxBidPrice)));return this.lA.requestHeaderBidder(s,i,e)}vA(t,i,e){const s=t.adManagerLineItem;return{availableRequests:t.maxAvailableRequests,lineItem:s.protoLineItem,maxAdDuration:i,maxBidPrice:e}}dA(t){return t.filter((t=>{const i=this.gA(t.adManagerLineItem);return this.cA.has(t.adManagerLineItem)||this.cA.set(t.adManagerLineItem,i),this.mA(i)}))}C_(t,e){return 0!==t&&0!==e||((0,i.n)({message:"AdManager_PrebidAggregator_dimensions",exception:`width:${t}_height:${e}_destroyed:${d.S.playerDestroyed}`,level:i.D.CRITICAL},{throttle:5}),!1)}mA(t){return this.uA.isAdapterCallable(t)}gA(t){const i=this.cA.get(t);return(0,P.QM)(i)?i:Ln(t.protoLineItem.headerBidderBids,t.protoLineItem.advertiserLineItemId)||""}}const tr="apstag",ir="video",er="https://aax.amazon-adsystem.com/e/dtb/vast",sr="load";class nr{constructor(t,e){this.if=t,this.bA=e,this.wA=()=>{this.xA||this.SA(),this._A&&clearInterval(this._A),this.xA||(0,i.n)({message:"TamRequester_TAM_lib_not_found_on_page_loaded",level:i.D.WARN})};const s=this.if.config.topWindow;this.AA=(0,ut.pE)(s).topFrame,this.SA()}requestBids(t){const i=t.map((t=>this.PA(t)));return Promise.all(i)}destroy(){this._A&&clearInterval(this._A),this.AA.removeEventListener(sr,this.wA)}PA(t){return this.kA(this.bA,ir,t.amazonDealId).then((i=>t.amazonDealId?this.IA(t,i):this.TA(t,i))).then((i=>({bids:[i],lineItemId:t.advertiserLineItemId,noBids:[]}))).catch((i=>({bids:[],lineItemId:t.advertiserLineItemId,noBids:[{reason:i}]})))}kA(t,i,e){return new Promise(((n,r)=>{this.xA?this.xA.fetchBids({slots:[{slotID:t,mediaType:i}]},(t=>{(0,a.BZ)(t)?(0,P.QM)(e)?n(this.CA(t,e)):n(this.MA(t)):r(s.ConnatixNoBidReasonEnum.EmptyResponse)})):r(s.ConnatixNoBidReasonEnum.NoLibInPage)}))}MA(t){return new Promise(((i,e)=>{const n=this.EA(t);if(!(0,a.BZ)(n))return this.LA(),void e(s.ConnatixNoBidReasonEnum.InvalidResponse);i(n[0])}))}CA(t,i){return new Promise(((e,n)=>{const r=this.OA(t);if(!(0,a.BZ)(r))return this.LA(),void n(s.ConnatixNoBidReasonEnum.InvalidResponse);const h=t.find((t=>t.targeting.amzndeals.includes(i)));h?e(h):n(s.ConnatixNoBidReasonEnum.DealIdMismatch)}))}EA(t){return t.filter((t=>{var i;return!(!t.amznbid&&!(null===(i=t.targeting)||void 0===i?void 0:i.amzniid))}))}OA(t){return t.filter((t=>{var i;return(0,a.BZ)(null===(i=t.targeting)||void 0===i?void 0:i.amzndeals)}))}LA(){(0,i.n)({message:"TamRequester_FetchBids_CreativeType_Mismatch",level:i.D.CRITICAL},{throttle:1})}TA(t,i){var e;const n={lineItemId:t.advertiserLineItemId,code:i.amznbid||(null===(e=i.targeting)||void 0===e?void 0:e.amznbid),metadata:this.if.services.TrackingService.getMetadataModel(),exploration:this.if.config.explorationMode};return new Promise(((t,e)=>{un.n.sendProtoRequest({endpoint:on.n.endPoints.api.tam,ProtoRequest:s.ProtoCoreTamBidRequest,ProtoResponse:s.ProtoCoreTamBidResponse,requestData:n,queryParams:{[gn.Fk]:Ne.g.version},logError:!0}).then((n=>{(0,P.QM)(n.errorMessage)?e(s.ConnatixNoBidReasonEnum.RequestException):n.encryptedBidPrice?t({encryptedPrice:n.encryptedBidPrice,vastTag:this.RA(i),ofskp:n.ofskp,successRate:n.successRate,slotId:Js()}):e(s.ConnatixNoBidReasonEnum.InvalidResponse)})).catch((()=>{e(s.ConnatixNoBidReasonEnum.RequestException)}))}))}IA(t,i){return{encryptedPrice:null,vastTag:this.BA(i),ofskp:At(t.floorPrice),successRate:t.successRate,slotId:Js()}}RA(t){var i,e;const s=t.amzniid||(null===(i=t.targeting)||void 0===i?void 0:i.amzniid),n=t.amznbid||(null===(e=t.targeting)||void 0===e?void 0:e.amznbid);return`${er}?b=${s}&pp=${n}&rnd=${(0,ut.qs)()}`}BA(t){const i=t.helpers.targetingKeys[0];return`${er}?b=${t.targeting[i]}&rnd=${(0,ut.qs)()}`}SA(){this.AA[tr]?this.xA=this.AA[tr]:this._A||"complete"!==this.AA.document.readyState&&(this.AA.addEventListener(sr,this.wA),this._A=setInterval((()=>{this.SA()}),ht.s_)),this.xA&&clearInterval(this._A)}}class rr{constructor(t,i,e,s,n,r){this.if=t,this.DA=i,this.__=e,this.A_=s,this.k_=n,this.I_=r,this.jA=new nr(this.if,this.DA)}request(t){const{width:i,height:e}=t.callingState;return this.C_(i,e)?this.FA(t).then((i=>Promise.resolve(this.$A(i,t)))).catch((()=>Promise.resolve({bids:[],noBids:[]}))):Promise.resolve({bids:[],noBids:[]})}destroy(){this.jA.destroy()}FA(t){const i=t.lineItemRequestDataList.map((t=>t.adManagerLineItem.protoLineItem));return this.jA.requestBids(i)}$A(t,i){const e={bids:[],noBids:[]};return t.forEach((t=>{const s=An(i.lineItemRequestDataList,t.lineItemId);t.bids.forEach((t=>{const n=new Ct,r=new fn({encryptedPrice:t.encryptedPrice,requestNumber:s.historicalMetrics.requestNumber});Mt(s.protoLineItem.trackers,n),e.bids.push(new pn({id:(0,ut.qs)(),adManagerLineItem:s,replaceTrackingMacros:!0,requestMetadata:r,trackersInformation:n,url:t.vastTag,bidSlotId:t.slotId,callingState:i.callingState,adMacroReplacer:this.__,adContainer:this.A_.get(s.protoLineItem.adType),globalDomUtilsService:this.if.services.GlobalDomUtilsService,viewabilityService:this.if.services.ViewabilityService,trackingService:this.if.services.TrackingService,adEnforcer:this.k_,requestWithCredentials:!1,successRate:t.successRate,obfuscatedPrice:t.ofskp,os:this.if.config.os.os,adSlotContainerRecycler:this.I_,pageUrl:this.if.config.pageUrl,urlSuffixerService:this.if.services.UrlSuffixerService}))})),t.noBids.forEach((t=>{e.noBids.push({lineItem:s,requestMetadata:new fn({requestNumber:s.historicalMetrics.requestNumber}),reason:t.reason})}))})),e}C_(t,e){return 0!==t&&0!==e||((0,i.n)({message:"AdManager_PrebidAggregator_dimensions",exception:`width:${t}_height:${e}_destroyed:${d.S.playerDestroyed}`,level:i.D.CRITICAL},{throttle:5}),!1)}}const hr=[[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 or{constructor(t,i,e){this.VA=t,this.UA=i,this.NA=e,this.u_=`div-gpt-ad-1589549806211-${(0,ut.qs)()}`,this.Mw=new x.x,this.xg=new x.x,this.eg=new x.x}get onCreativeReceived(){return this.eg.asObservable()}get onDisplayAd(){return this.Mw.asObservable()}get onError(){return this.xg.asObservable()}getAdMediaHeight(){return this.HA?this.HA.clientHeight:0}getAdMediaWidth(){return this.HA?this.HA.clientWidth:0}initializeAd(t,i){try{this.zA=t,this.$v(t);const e=this.qA(i.width,i.height);this.VA.cmd.push((()=>{this.WA=this.VA.defineSlot(this.NA,e,this.u_).addService(this.VA.pubads()).setTargeting("domains",this.UA),this.VA.enableServices(),this.GA(this.WA),this.VA.pubads().isInitialLoadDisabled()&&this.VA.pubads().refresh([this.WA]),this.VA.display(this.u_)}))}catch(t){this.xg.next(Vt.WrapperInitAdError)}}destroy(){this.VA.cmd.push((()=>{this.VA.destroySlots&&this.WA&&this.VA.destroySlots([this.WA])}))}GA(t){this.VA.pubads().addEventListener("slotOnload",(e=>{var s,n;if(e.slot===t){try{const t=null===(n=null===(s=null==e?void 0:e.slot)||void 0===s?void 0:s.getResponseInformation())||void 0===n?void 0:n.creativeId;t&&this.eg.next(t.toString())}catch(t){(0,i.n)({message:"AdManager_GptWrapper_creativeId",level:i.D.WARN,exception:t.message,callStack:t.stack})}this.Mw.next()}})),this.VA.pubads().addEventListener("slotRenderEnded",(t=>{var i;if(t.slot===this.WA){try{this.HA=null===(i=this.zA)||void 0===i?void 0:i.getElementsByTagName("iframe")[0],(0,P.$K)(this.WA)&&(0,m.AX)(this.HA.contentWindow,"GPTWrapper")}catch(t){}t.isEmpty&&this.xg.next(Vt.AdxOverlayNoFill)}}))}$v(t){t.id=this.u_}qA(t,i){return hr.filter((e=>!Array.isArray(e)||!(0,a.fn)(e)||(0,a.BZ)(e)&&e[0]<=t&&e[1]<=i))}}var ar=n(5049);class cr extends Wt{constructor(t,i){super(t,i),this.uv=t,this.settings=i,this.adMediaType="displayAdx",this.adSourceType=s.ProtoAdsourceTypeEnum.Unknown,this.xx="adx",this.JA={[le.FirstQuartile]:g.fI.AdVideoFirstQuartile,[le.SecondQuartile]:g.fI.AdVideoMidpoint,[le.ThirdQuartile]:g.fI.AdVideoThirdQuartile,[le.FourthQuartile]:g.fI.AdVideoComplete},this.QA=[];const e=this.settings.adManagerLineItem.protoLineItem.overlayTime*ht.s_;this.yx=new zs(this.uv,e,500),this.QA.push(this.yx.onTimeUpdate.subscribe((()=>{this.Pv({type:g.fI.AdRemainingTimeChange})})),this.yx.onTimeElapsed.subscribe((()=>{this.stopAd("adxTimerElapsed")})),this.yx.onQuartile.subscribe((t=>{this.Pv({type:this.JA[t],payload:{}})})))}initAd(t,i,e,s,n,r,h){try{super.initAd(t,i,e,s,n,r,h),this.YA={width:t,height:i},this.KA().then((t=>{this.ZA=new or(t,this.settings.domain,this.settings.adxAdUnitPath),this.QA.push(this.ZA.onCreativeReceived.subscribe((t=>{this.creativeId=t}))),this.Pv({type:g.fI.AdLoaded,payload:{skipOffset:0}})})).catch((t=>{this.Pv({type:g.fI.AdError,payload:{errorMessage:Vt.AdxOverlayGptScriptLoad+`_${t.message}`}})}))}catch(t){this.Pv({type:g.fI.AdError,payload:{errorMessage:Vt.AdaptorInitAdError+`_${t.message}`}})}}startAd(){try{super.startAd(),this.QA.push(this.ZA.onDisplayAd.subscribe((()=>{this.Pv({type:g.fI.AdStarted}),this.Pv({type:g.fI.AdVideoStart}),this.Pv({type:g.fI.AdImpression,payload:{}}),this.yx.start()})),this.ZA.onError.subscribe((t=>{this.Pv({type:g.fI.AdError,payload:{errorMessage:t}}),this.yx.stop()}))),this.ZA.initializeAd(this.dv,this.YA)}catch(t){this.Pv({type:g.fI.AdError,payload:{errorMessage:Vt.AdaptorStartAdError+`_${t.exception}`}})}}stopAd(t){try{super.stopAd(t),this.yx.stop(),this.Pv({type:g.fI.AdStopped,payload:{shouldTrackPostBid:!0}})}catch(t){this.Qv("AdxBidAdaptor","stopAd",t)}}resizeAd(t,i,e){this.YA&&(this.YA.width=t,this.YA.height=i)}pauseAd(){try{this.yx.stop(),this.Pv({type:g.fI.AdPaused})}catch(t){this.Qv("AdxBidAdaptor","pauseAd",t)}}resumeAd(){try{this.yx.start(),this.Pv({type:g.fI.AdPlaying})}catch(t){this.Qv("AdxBidAdaptor","resumeAd",t)}}expandAd(){}collapseAd(){}skipAd(){try{super.skipAd(),this.Pv({type:g.fI.AdSkipped})}catch(t){this.Qv("AdxBidAdaptor","skipAd",t)}}getAdRemainingTime(){return this.yx.timeRemaining/ht.s_}getAdDuration(){return this.yx.timerDuration/ht.s_}getAdVolume(){return 0}getAdMediaSize(){return{width:this.ZA.getAdMediaWidth(),height:this.ZA.getAdMediaHeight()}}setAdVolume(t){}get adVideoUrl(){return this.xx}get declaredDurationInSeconds(){return this.settings.adManagerLineItem.protoLineItem.duration}KA(){const t=(0,ut.pE)(window).topFrame;if(t.googletag)return Promise.resolve(t.googletag);{const i={cmd:[]};return t.googletag=window.googletag||i,new Promise(((i,e)=>{(0,m.dZ)({src:ar.x},t.document.head,t,(()=>{i(t.googletag)}),(()=>{e()}))}))}}hu(){var t;try{super.hu(),this.yx.stop(),(0,pt.i)(this.QA),null===(t=this.ZA)||void 0===t||t.destroy()}catch(t){this.Qv("AdxBidAdaptor","_destroy",t)}}}class lr{constructor(t){this.settings=t,this.metrics={created:(new Date).getTime()}}fetchBid(){this.metrics.fetchStart=(new Date).getTime();const t=Ti.getGlobalContainer().resolve(Wi),i=new cr(t,{id:this.settings.id,adManagerLineItem:this.settings.adManagerLineItem,trackers:this.settings.trackersInformation,adxAdUnitPath:this.tP(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)}tP(t){return t.substr("https://adx.connatix.com".length)}}var ur=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 dr(){return ur(this,void 0,void 0,(function*(){try{const t=yield(0,ut.Up)((()=>ur(this,void 0,void 0,(function*(){return yield Promise.resolve().then(n.t.bind(n,490,23))}))));return t.default?t.default:t}catch(t){return(0,i.n)({callStack:t.stack,exception:t.message,level:i.D.WARN,message:"HLS_dynamicImport"}),null}}))}class pr extends Wt{constructor(t,i){super(t,i),this.uv=t,this.settings=i,this.adMediaType="cnxMedia",this.adSourceType=s.ProtoAdsourceTypeEnum.CnxMedia,this.iP=[]}initAd(t,i,e,s,n,r,h){try{let o;super.initAd(t,i,e,s,n,r,h);let c=!1;if((0,P.QM)(this.settings.externalMediaFile))o=this.eP(this.settings.externalMediaFile);else if((0,P.QM)(this.settings.externalHlsFile))o=this.eP(this.settings.externalHlsFile),c=!0;else{if(!(0,a.BZ)(this.settings.renditions))return void this.Pv({type:g.fI.AdError,payload:{errorMessage:Vt.CnxMediaNoRenditions}});o=this.sP(this.settings.renditions,i,this.settings.mediaId)}this.nP=o,this.rP=new tn(this.settings.globalDomUtilsService,this.nP,this.fv,this.settings.os,this.settings.clickUrl,this.settings.loopAdWhenFinished,this.settings.pauseAdWhenFinished,c,this.settings.hlsModule,this.settings.inApp,this.settings.pageDomain),this.iP.push(this.rP.onVpaidEvent.subscribe((t=>{this.Pv(t)}))),this.rP.initAd(t,i,e,s,n,{slot:this.dv,videoSlot:this.fv})}catch(t){this.Pv({type:g.fI.AdError,payload:{errorMessage:Vt.AdaptorInitAdError+`_${t.message}`}})}}startAd(){try{super.startAd(),this.rP.startAd()}catch(t){this.Pv({type:g.fI.AdError,payload:{errorMessage:Vt.AdaptorStartAdError+`_${t.message}`}})}}stopAd(t){super.stopAd(t),this.rP?this.rP.stopAd(t):(0,i.n)({message:"stopAd",exception:t,level:i.D.WARN})}resizeAd(t,i,e){try{this.rP.resizeAd(t,i,e)}catch(t){this.Qv("CnxMediaBidAdaptor","resizeAd",t)}}pauseAd(){try{this.rP.pauseAd()}catch(t){this.Qv("CnxMediaBidAdaptor","pauseAd",t)}}resumeAd(){try{this.rP.resumeAd()}catch(t){this.Qv("CnxMediaBidAdaptor","resumeAd",t)}}expandAd(){try{this.rP.expandAd()}catch(t){this.Qv("CnxMediaBidAdaptor","expandAd",t)}}collapseAd(){try{this.rP.collapseAd()}catch(t){this.Qv("CnxMediaBidAdaptor","collapseAd",t)}}skipAd(){try{super.skipAd(),this.rP.skipAd()}catch(t){this.Qv("CnxMediaBidAdaptor","skipAd",t)}}getAdRemainingTime(){try{return this.rP.getAdRemainingTime()}catch(t){return this.Qv("CnxMediaBidAdaptor","getAdRemainingTime",t),0}}getAdDuration(){try{return this.rP?this.rP.getAdDuration():this.settings.adManagerLineItem.protoLineItem.duration}catch(t){return this.Qv("CnxMediaBidAdaptor","getAdDuration",t),0}}getAdVolume(){try{return this.rP.getAdVolume()}catch(t){return this.Qv("CnxMediaBidAdaptor","getAdVolume",t),0}}getAdMediaSize(){return{width:this.rP.getAdMediaWidth(),height:this.rP.getAdMediaHeight()}}setAdVolume(t){try{super.setAdVolume(t),this.rP.setAdVolume(t)}catch(t){this.Qv("CnxMediaBidAdaptor","setAdVolume",t)}}get adVideoUrl(){return this.nP}get declaredDurationInSeconds(){return this.settings.adManagerLineItem.protoLineItem.duration}hu(){var t;if(!this.settings.pauseAdWhenFinished&&!this.settings.loopAdWhenFinished)try{super.hu(),(0,pt.i)(this.iP),null===(t=this.rP)||void 0===t||t.destroy()}catch(t){this.Qv("CnxMediaBidAdaptor","_destroy",t)}}eP(t){return(null==t?void 0:t.includes(on.n.endPoints.base.video))?this.qu.appendParamsToUrl(t):t}sP(t,i,e){let s;s=t.filter((t=>t.codec===q.H264));const n=(0,lt.DE)(i,s.map((t=>t.height)));return s=s.filter((t=>t.height===n)),s.length>0?this.qu.appendParamsToUrl(`${on.n.endPoints.base.video}${e}/${s[0].file}`):null}}var fr,vr,gr,mr,yr=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 br{constructor(t){this.settings=t,this.metrics={created:(new Date).getTime()}}fetchBid(){return yr(this,void 0,void 0,(function*(){let t;if(this.metrics.fetchStart=(new Date).getTime(),(0,P.QM)(this.settings.adManagerLineItem.protoLineItem.externalHlsFile)&&(t=yield dr(),!t))throw Ot.NetworkRequestUrl;const i=Ti.getGlobalContainer().resolve(Wi),e=new pr(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"}(fr||(fr={}));class wr{constructor(t){this.hP=t,this.Wa=fr.IDLE,this.oP=Promise.resolve()}start(){(this.Wa===fr.IDLE||this.Wa===fr.STOPPING)&&(this.Wa=fr.RUNNING,this.aP())}stop(){this.Wa=fr.STOPPING}setPromiseNotifier(t){return this.cP=t,this}setIdleNotifier(t){return this.lP=t,this}getState(){return this.Wa}uP(){const t=this.hP();void 0!==t?this.oP=t.then((t=>{this.cP&&this.cP(t)})).then((()=>{this.Wa===fr.STOPPING&&(this.Wa=fr.IDLE)})):this.Wa=fr.IDLE}aP(){this.Wa===fr.IDLE?this.lP&&this.lP():this.Wa===fr.RUNNING&&(this.uP(),this.oP.then((()=>{this.aP()})))}}class xr{constructor(t,i=1){this.hP=t,this.fP=i,this.vP=[],this.gP(i)}start(){return this.vP.forEach((t=>{t.start()})),this}stop(){return this.vP.forEach((t=>{t.stop()})),this}setPromiseNotifier(t){return this.vP.forEach((i=>{i.setPromiseNotifier(t)})),this}setAllThreadsIdleNotifier(t){return this.mP=t,this.yP(),this}setNumberOfThreads(t){if(t<=0)return;this.fP=t;const i=t-this.fP;i>0?this.gP(i):i<0&&this.bP(i)}getState(){return this.vP.reduce(((t,i)=>(t[i.getState()]++,t)),{[fr.IDLE]:0,[fr.RUNNING]:0,[fr.STOPPING]:0})}gP(t){for(let i=0;i<t;i++){const t=new wr(this.hP).setPromiseNotifier(this.cP);this.vP.push(t)}}bP(t){t=Math.min(t,this.vP.length);for(let i=0;i<t;i++)this.vP.pop().stop()}yP(){const t=()=>{this.getState()[fr.IDLE]===this.vP.length&&this.mP()};this.vP.forEach((i=>{i.setIdleNotifier(t)}))}}!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"}(vr||(vr={})),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"}(gr||(gr={})),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"}(mr||(mr={}));class Sr{constructor(){this.wP=new Set}static getInstance(){return this.Mg||(this.Mg=new Sr),this.Mg}addPlatformCappedLineItemIdList(t,e){e||(0,i.n)({message:"PlatformCappedLineItemRepository_bidPool_not_provided",level:i.D.CRITICAL,exception:`${t}`},{throttle:1,sendMaxLog:!1}),t.forEach((t=>{if((0,P.QM)(t)&&!this.wP.has(t)&&(this.wP.add(t),e)){e.getAllBidsForLineItem(t).forEach((t=>e.consumeBid(t,mr.BID_INVALIDATED)))}}))}isLineItemPlatformCapped({advertiserLineItemId:t,publisherLineItemId:i}){return this.wP.has(t)||this.wP.has(i)}clear(){this.wP.clear()}}var _r;!function(t){t[t.Rtb=1]="Rtb",t[t.HeaderBidder=2]="HeaderBidder",t[t.Tam=3]="Tam"}(_r||(_r={}));const Ar={[s.ProtoCreativeTypeEnum.Rtb]:_r.Rtb,[s.ProtoCreativeTypeEnum.HeaderBidder]:_r.HeaderBidder,[s.ProtoCreativeTypeEnum.Tam]:_r.Tam,[s.ProtoCreativeTypeEnum.TamDeal]:_r.Tam};class Pr{constructor(t){this.settings=t,this.xP=new Map,this.nf=[],this.SP=!1,this._P=new x.x,this.AP=()=>{const t=this.PP();if(t)return this.kP(t.lineItemList),this.IP(t.lineItemList,t.state).then((()=>{this.TP(t.lineItemList),this.CP()})).catch((()=>{this.TP(t.lineItemList),this.CP()}));this.settings.auctionManager.onNothingToCall()},this.MP=(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=>{Pn(t.protoLineItem.creativeType)?t.protoLineItem.timeBetweenRequests=10:t.protoLineItem.timeBetweenRequests=6})),this.nf.push(this.settings.lineItemServices.lineItemServicesTimer.onTimer().subscribe((()=>{this.EP()})),this.settings.adBidPool.getBidPoolBidEvents(vr.ON_BID_LOADING).subscribe((()=>{this.EP()})),this.settings.adBidPool.getBidPoolBidEvents(vr.ON_BID_LOADING_CONSUMED).subscribe((()=>{this.EP()})),this.settings.adBidPool.getBidPoolBidEvents(vr.ON_BID_READY_CONSUMED).subscribe((()=>{this.EP()}))),this.LP=new xr(this.AP,5),this.settings.lineItemList.find((t=>t.protoLineItem.creativeType===s.ProtoCreativeTypeEnum.Rtb))&&this.xP.set(_r.Rtb,{auctionPending:!1,caller:new Mn(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.settings.lineItemList.find((t=>t.protoLineItem.creativeType===s.ProtoCreativeTypeEnum.HeaderBidder))&&this.xP.set(_r.HeaderBidder,{auctionPending:!1,caller:new Zn(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.settings.lineItemList.find((t=>t.protoLineItem.creativeType===s.ProtoCreativeTypeEnum.Tam||t.protoLineItem.creativeType===s.ProtoCreativeTypeEnum.TamDeal))&&this.xP.set(_r.Tam,{auctionPending:!1,caller:new rr(this.settings.app,this.settings.amazonSlotId,this.settings.adMacroReplacer,this.settings.adContainerMap,this.settings.adEnforcer,this.settings.adSlotContainerRecycler)}),this.LP.setAllThreadsIdleNotifier((()=>{this.settings.lineItemServices.lineItemServicesTimer.start()}))}get onFirstAggregatedBatchFinished(){return this._P.asObservable()}call(t){this.LP.setNumberOfThreads(t.maxParallelCalls),this.OP=t,this.SP=!0,this.EP()}stop(){this.SP=!1,this.LP.stop()}destroy(){this.stop(),this.settings.callingValidationAggregator.destroy(),this.xP.forEach((t=>{t.caller.destroy()})),(0,pt.i)(this.nf)}CP(){let t=!0;this.xP.forEach((i=>{i.auctionPending&&(t=!1)})),t&&this._P.next()}EP(){this.SP&&this.LP.start()}PP(){const t=this.settings.adCallerYo.getCallableLineItems(this.settings.lineItemList,this.OP.stateSettings),i=this.settings.adCallerYo.getBestLineItem(t,this.OP.stateSettings);if(i)return i}kP(t){this.settings.adCallingPool.addCallingLineItems(t)}TP(t){this.settings.adCallingPool.removeCallingLineItems(t)}IP(t,i){return Pn(t[0].protoLineItem.creativeType)?this.RP(t,i):this.BP(t[0],i)}BP(t,i){const e=this.DP(t,i);return this.settings.callingValidationAggregator.registerRequestForLineItem(t,this.jP()),t.historicalMetrics.requestNumber++,this.FP(e),this.$P(e)}RP(t,i){const e=this.xP.get(Ar[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.jP())}))),callingState:i,maxAdDuration:i.adBreakState.maxAdDuration,maxBidPrice:this.VP(i)};return e.caller.request(s).then((s=>{s.bids.length||s.noBids.length||t.forEach((t=>{this.settings.callingValidationAggregator.registerRequestForLineItem(t,this.jP())})),t.forEach((t=>{t.aggregators.delete(e.caller),t.historicalMetrics.requestNumber++})),s.noBids.forEach((t=>{this.settings.callingValidationAggregator.registerRequestForLineItem(t.lineItem,this.jP()),this.UP(i,t.lineItem,t.reason,t.requestMetadata)})),s.bids.forEach((t=>this.FP(t))),s.bids.sort(this.MP);const n=s.bids.map((t=>(this.settings.callingValidationAggregator.registerRequestForLineItem(t.settings.adManagerLineItem,this.jP()),this.$P(t))));return Promise.all(n)})).catch().then((()=>{e.auctionPending=!1}))}$P(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,n=t.settings.id;this.settings.adCallerYo.registerPreBidFromBid(e,n);const r=Rt[i]?Rt[i]:s.ConnatixNoBidReasonEnum.RequestException;return this.UP(t.settings.callingState,t.settings.adManagerLineItem,r,t.settings.requestMetadata,t.settings.trackersInformation,Date.now()-t.metrics.fetchStart),Promise.reject()})).then((i=>{t.settings.adManagerLineItem.callers.delete(t),this.NP(i,Date.now()-t.metrics.fetchStart)})).catch((t=>{void 0!==t&&(0,i.n)({message:"AdManager_AdCallerController_handleCallAdaptorRequest",exception:t.message,callStack:t.stack,level:i.D.CRITICAL},{throttle:5})}))}NP(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)||Sr.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)}UP(t,i,e,s,n,r){n&&Ct.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)}DP(t,i){const e=new Ct;Mt(t.protoLineItem.trackers,e);const n={id:(0,ut.qs)(),adManagerLineItem:t,replaceTrackingMacros:!0,requestMetadata:new fn({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:Js(),urlSuffixerService:this.settings.app.services.UrlSuffixerService,interactionService:this.settings.app.services.InteractionService};switch(t.protoLineItem.creativeType){case s.ProtoCreativeTypeEnum.External:case s.ProtoCreativeTypeEnum.ThirdParty:return t.protoLineItem.adType===s.ProtoAdType.Overlay?new lr(Object.assign(Object.assign({},n),{url:t.protoLineItem.adTag,pageDomain:this.settings.app.config.pageDomain})):new pn(Object.assign(Object.assign({},n),{url:t.protoLineItem.adTag,adMacroReplacer:this.settings.adMacroReplacer,trackingService:this.settings.trackingService,loopAdWhenFinished:this.settings.loopAdWhenFinished,pageUrl:this.settings.app.config.pageUrl}));case s.ProtoCreativeTypeEnum.MediaFile:return new br(Object.assign(Object.assign({},n),{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}))}}FP(t){const{creativeType:i,floorPrice:e,successRate:s,advertiserLineItemId:n,lineItemPriority:r}=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})}jP(){return(this.OP.stateSettings.currentState||this.OP.stateSettings.predictedState).adOpportunity.id}VP(t){const i=[...this.settings.adBidPool.getBidsByStatus([gr.IDLE,gr.LOADING,gr.READY])].filter((i=>this.settings.adCallerYo.isBidTargetingAllowed(i,t,this.settings.lineItemServices.impressionCapsService)));return(0,a.BZ)(i)?Math.max(...i.map((t=>t.getPrice()))):0}}const kr="uncategorized";class Ir{resetCapsBasedOnExternalEvent(t){const i=this.St.keys();for(const e of i)this.HP(e,t)&&this.zP(e,kr)}HP(t,i){return t.protoLineItem.resetCapType===i}qP(t){return this.HP(t,s.ProtoResetCapTypeEnum.TimeCapping)&&this.WP(t)>0}}class Tr{constructor(t){this.GP=t,this.JP=new Map}setNumberOfImpressions({value:t,categoryId:i}){(0,P.$K)(i)&&this.GP===s.ProtoResetCapTypeEnum.OpportunityCapping||(i=kr),this.JP.set(i,t)}getNumberOfImpressions({categoryId:t}){return(0,P.$K)(t)&&this.GP===s.ProtoResetCapTypeEnum.OpportunityCapping||(t=kr),this.JP.get(t)||0}}class Cr extends Ir{constructor(t=Date.now()){super(),this.QP=t,this.St=new Map}canCall(t,i){this.XP(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 Tr(t.protoLineItem.resetCapType)),e=this.St.get(t),this.qP(t)&&(e.nextImpressionCapResetTimestamp=this.YP(this.WP(t)))),e.setNumberOfImpressions({value:e.getNumberOfImpressions({categoryId:i})+1,categoryId:i}),this}registerRequestForLineItem(t,i){return this}destroy(){this.St.clear()}zP(t,i){this.St.get(t).setNumberOfImpressions({value:0,categoryId:i})}WP(t){return t.protoLineItem.resetImpressionsCapTime*ht.s_}XP(t,i=Date.now()){if(!this.qP(t))return;const e=this.St.get(t);void 0!==e&&this.KP(t,i)&&(e.setNumberOfImpressions({value:0}),e.nextImpressionCapResetTimestamp=this.YP(this.WP(t),i))}KP(t,i){return i>=this.St.get(t).nextImpressionCapResetTimestamp}YP(t,i=Date.now()){const e=Math.ceil((i-this.QP)/t)*t;return this.QP+e}}class Mr{constructor(t){this.GP=t,this.ZP=new Map}setNumberOfRequests({value:t,categoryId:i}){(0,P.$K)(i)&&this.GP===s.ProtoResetCapTypeEnum.OpportunityCapping||(i=kr),this.ZP.set(i,t)}getNumberOfRequests({categoryId:t}){return(0,P.$K)(t)&&this.GP===s.ProtoResetCapTypeEnum.OpportunityCapping||(t=kr),this.ZP.get(t)||0}}class Er extends Ir{constructor(t=Date.now()){super(),this.QP=t,this.allowResetOnTime=!0,this.St=new Map}canCall(t,i){this.XP(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 Mr(t.protoLineItem.resetCapType)),s=this.St.get(t),this.qP(t)&&(s.nextRequestCapResetTimestamp=this.YP(this.WP(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()}zP(t,i){this.St.get(t).setNumberOfRequests({value:0,categoryId:i})}WP(t){return t.protoLineItem.resetRequestsCapTime*ht.s_}XP(t,i=Date.now()){if(!this.qP(t))return;const e=this.St.get(t);void 0!==e&&this.KP(t,i)&&(e.setNumberOfRequests({value:0}),e.nextRequestCapResetTimestamp=this.YP(this.WP(t),i))}KP(t,i){return i>=this.St.get(t).nextRequestCapResetTimestamp&&this.allowResetOnTime}YP(t,i=Date.now()){const e=Math.ceil((i-this.QP)/t)*t;return this.QP+e}}class Lr{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 n=this.St.get(t);if(void 0===n)return!0;if(0===t.protoLineItem.timeBetweenRequests)return!0;if(e>=n.lastRequestTimestamp+t.protoLineItem.timeBetweenRequests*ht.s_)return!0;return!(n.categoryId===i||t.protoLineItem.resetCapType!==s.ProtoResetCapTypeEnum.OpportunityCapping)}destroy(){this.St.clear()}}class Or{constructor(t){this.uv=t,this.tk=null,this.ik=new x.x}start(){return this.ek(),this}stop(){return this.sk(),this}onTimer(){return this.ik.asObservable()}destroy(){this.sk()}ek(){null===this.tk&&(this.tk=this.uv.setInterval((()=>{this.ik.next()}),500))}sk(){this.uv.clearInterval(this.tk),this.tk=null}}class Rr extends h._{constructor(t,i,e,n){super(),this.nk=t,this.rk=i,this.hk=e,this.au=n,this.ak=new x.x,this.ck=new Map,this.lk=[],this.forceTriggerUpdateState=()=>{this.lk.forEach((t=>this.uk(t)))},this.uk=(t,i)=>{this.ck.set(t,this.dk(this.rk.get(t),i))},this.pk=t=>{this.fk([s.ProtoAdType.Video],t)},this.vk=t=>{this.fk([s.ProtoAdType.Overlay],t)},this.gk=t=>{this.fk([s.ProtoAdType.Nonlinear],t)},this.Cr=()=>{this.fk(this.lk)},this.fk=(t,i)=>{t.forEach((t=>this.uk(t,i))),this.ak.next()},this.mk={[s.ProtoAdType.Video]:this.pk,[s.ProtoAdType.Overlay]:this.vk,[s.ProtoAdType.Nonlinear]:this.gk},this.lk=[...this.rk.keys()],this.lk.forEach((t=>this.uk(t))),this.yk()}get onContainerStateUpdate(){return this.ak.asObservable()}getContainerMap(){return this.rk}getContainerStateMap(){return this.ck}getMainContainer(){return this.rk.get(this.nk)}getMainContainerState(){return this.getContainerStateMap().get(this.nk)}destroy(){this.rk.forEach(((t,i)=>{this.hk.off(t,this.Cr),this.au.off(t,this.mk[i])}))}yk(){this.rk.forEach(((t,i)=>{this.hk.on(t,this.Cr),this.au.on(t,this.mk[i],{threshold:y})}))}dk(t,i){let e=i;return void 0===e&&(e=this.au.check({element:t,threshold:y})),{width:t.clientWidth,height:t.clientHeight,viewability:e}}}const Br="cnxpl-vl",Dr="cnxpl-rf";class jr{constructor(){this.bk=!0,this.wk=new x.x,this.xk=[],this.Sk=t=>{if(this.bk)return;const i=t.target;if(i.volume>0&&(i.volume=0,!i.paused)){const t=i.getAttribute(Dr);this.wk.next(t)}t.preventDefault?t.preventDefault():t.returnValue=!1}}get onVolumeDetected(){return this.wk.asObservable()}enforce(t,i){let e=t;(0,P.cL)(t)&&(e=t.contentDocument||t.contentWindow.document),this.bk=!1;(0,a.Sz)(e.getElementsByTagName("video")).forEach((t=>{this._k(t,i)}))}stopEnforce(){this.bk=!0}clearEnforce(t){try{const i=[];this.xk=this.xk.filter((e=>e.getAttribute(Dr)!==t||(i.push(e),!1))),i.forEach((t=>{t.removeAttribute(Br),t.removeAttribute(Dr),t.removeEventListener("volumechange",this.Sk)}))}catch(t){}}_k(t,i){t&&!t.getAttribute("cnxpl-vl")&&(t.volume=0,t.setAttribute(Br,"true"),t.setAttribute(Dr,i),t.addEventListener("volumechange",this.Sk),this.xk.push(t))}}class Fr{constructor(){}Ak(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,P.cL)(t)&&this.Ak(t.contentWindow)}stopEnforce(){}clearEnforce(){}}class $r{constructor(t){this.Pk=t=>t.cnxEnfStorage?t.cnxEnfStorage:null,this.Ne=t;try{this.Pk(this.Ne)||this.kk(this.Ne)}catch(t){(0,i.n)({message:"AdManager_EnforcerMemory_bind_enforcement",exception:t.message,callStack:t.stack,level:i.D.CRITICAL})}}kk(t){(0,m.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,P.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.Pk(this.Ne);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.Ne.clearInterval(t))),i.setInterval[t]=[]),i.setTimeout[t]&&(i.setTimeout[t].forEach((t=>this.Ne.clearTimeout(t))),i.setTimeout[t]=[])}catch(t){}}}class Vr{constructor(){this.Ik=["viralgains","serving-sys.com","commercialadsdistributor"],this.Tk=["beachfrontmedia","commercialadsdistributor"],this.Ck=["commercialadsdistributor"],this.Mk=["pixel.clearstream.tv","pixel.clrstm.com"],this.Ek=new x.x,this.Lk=new x.x}get onMalwareDetected(){return this.Ek.asObservable()}get onBadUriDetected(){return this.Lk.asObservable()}enforce(t,i){if((0,P.cL)(t)){this.Rk=i;try{this.Bk(t),this.Dk(t),this.jk(t),this.$k(t)}catch(t){}}}stopEnforce(){}clearEnforce(){}Vk(t,i,e,s){t.every((t=>!e.includes(t)))&&!i.getAttribute("cnx")&&(i.setAttribute("cnx","true"),this.Lk.next({referenceId:this.Rk,enforcementMessage:`${s}-${i}`}))}Bk(t){const i=t.getAttribute("src");i&&(this.Ik.forEach((t=>{i.includes(t)&&this.Ek.next({referenceId:this.Rk,enforcementMessage:`malware-${t}`})})),this.Vk(["//","about:blank","about:self","javascript:"],t,i,"iframe"))}Dk(t){(0,a.Sz)(t.contentDocument.getElementsByTagName("script")).forEach((t=>{const i=t.getAttribute("src");i&&(this.Tk.forEach((t=>{i.includes(t)&&this.Ek.next({referenceId:this.Rk,enforcementMessage:`malware-${t}`})})),this.Vk(["//"],t,i,"script"))}))}jk(t){(0,a.Sz)(t.contentDocument.getElementsByTagName("a")).forEach((t=>{const i=t.getAttribute("href");i&&this.Ck.forEach((t=>{i.includes(t)&&this.Ek.next({referenceId:this.Rk,enforcementMessage:`malware-${t}`})}))}))}$k(t){(0,a.Sz)(t.contentDocument.getElementsByTagName("img")).forEach((t=>{const i=t.getAttribute("src");i&&this.Mk.forEach((t=>{i.includes(t)&&this.Ek.next({referenceId:this.Rk,enforcementMessage:`malware-${t}`})}))}))}}class Ur{constructor(t,i,e){if(this.Uk=e,this.Nk=null,this.Hk=new Map,this.zk=Dt.None,this.qk=300,this.nf=[],this.Wk=new Map,this.Gv=new x.x,this.Hk.set(Dt.MemoryLeak,new $r(i)),e||this.Hk.set(Dt.ScrollHijack,new Fr),!t){const t=new jr;this.Hk.set(Dt.Mute,t),this.nf.push(t.onVolumeDetected.subscribe((t=>{this.Gk(Bt.VOLUME_DETECTED,t,"")})))}const s=new Vr;this.nf.push(s.onBadUriDetected.subscribe((t=>{this.Gk(Bt.BADURI_DETECTED,t.referenceId,t.enforcementMessage)})),s.onMalwareDetected.subscribe((t=>{this.Gk(Bt.MALWARE_DETECTED,t.referenceId,t.enforcementMessage)}))),this.Hk.set(Dt.Malware,s)}get onEnforcerEvent(){return this.Gv.asObservable()}registerContainer(t,i){this.Wk.get(t)||this.Wk.set(t,i)}deregisterContainer(t){this.Wk.get(t)&&(this.Hk.forEach((i=>{i.clearEnforce(this.Wk.get(t))})),this.Wk.delete(t),this.Wk.size||this.stop(Dt.All))}start(t){this.Uk&&(t^=Dt.ScrollHijack),this.zk|=t,null===this.Nk&&(this.Nk=setInterval((()=>{try{this.Wk.forEach(((t,i)=>{this.Jk(i,t)}))}catch(t){}}),this.qk))}stop(t){this.zk&=~t,this.zk===Dt.None&&(clearInterval(this.Nk),this.Nk=null),this.Hk.forEach(((i,e)=>{t&e&&i.stopEnforce()}))}destroy(){this.stop(Dt.All),(0,pt.i)(this.nf),this.Wk.forEach(((t,i)=>{this.deregisterContainer(i)}))}Jk(t,i){(0,a.Sz)(t.getElementsByTagName("iframe")).forEach((t=>{try{this.Jk(t,i)}catch(t){}})),this.Hk.forEach(((e,s)=>{this.zk&s&&e.enforce(t,i)}))}Gk(t,i,e){let s;this.Wk.forEach(((t,e)=>{t===i&&(s=e)})),this.Gv.next({message:e,type:t,detectedContainer:s})}}class Nr{constructor(t){this.Wt=t,this.Qk=!1,this.Xk=void 0,this.Zk=!1,this.tI=[],this.nf=[],this.iI=!1,this.eI=new x.x,this.sI=new x.x,this.nI=[],this.nf.push(this.Wt.adBidPool.getBidPoolBidEvents(vr.ON_BID_READY).subscribe((()=>{this.hI()})),this.Wt.impressionCapsTimer.onTimer().subscribe((()=>{this.hI()})))}get onAdSelected(){return this.eI.asObservable()}get onAdFinished(){return this.sI.asObservable()}start(t){this.oI=t,this.Qk=!0,this.hI()}stop(){this.Qk=!1}destroy(){this.stop(),(0,pt.i)(this.nf),this.Xk||this.aI()}hI(){if(!this.Qk||this.Zk)return;const t=this.cI(this.oI);if(!t)return;const i=this.uI(t);this.Xk&&this.Wt.removeBidIfHigherYoScore&&i?(this.aI(),this.Xk.stopAd("removeStartedBid"),this.dI(t)):this.Xk||this.dI(t)}dI(t){this.Xk=t,this.nI=[],this.Wt.adBidPool.changeBidStatus(t,gr.STARTED),this.eI.next(t),this.pI(t),t.startAd()}aI(){this.Xk&&((0,pt.i)(this.tI),this.tI=[],this.Wt.adBidPool.consumeBid(this.Xk,mr.BID_READY_CONSUMED),this.Xk=void 0,this.nI=[])}cI(t){const i=this.Wt.adBidPool.getBidsByStatus([gr.READY]);return this.Wt.adImpressionerYo.getBestBid(i,t,this.Wt.impressionCapsService)}uI(t){return!!this.Xk&&this.Wt.adImpressionerYo.getBetterBid(t,this.Xk)!==this.Xk}vI(t,e,s){this.Zk&&(0,i.n)({message:"AdManager_ABaseBidAdaptor_multipleImpressions",exception:`advertiserLineItemId:${t.settings.adManagerLineItem.protoLineItem.advertiserLineItemId}_creativeId:${t.creativeId}`,callStack:`${t.adMediaType}`,level:i.D.CRITICAL},{throttle:1e3}),this.Wt.adImpressionerYo.registerImpression(t.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,t.settings.id),this.iI=this.gI(s,t.getAdDuration()),this.Zk=!0,this.Wt.adRequestGatekeeper.addImpression(t.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,t.settings.obfuscatedPrice),this.Wt.impressionCapsService.registerImpressionForLineItem(t.settings.adManagerLineItem,this.oI.adOpportunity.id),this.Wt.requestCapsService.restoreOneCapForLineItem(t.settings.adManagerLineItem,this.oI.adOpportunity.id),this.Wt.adBidPool.changeBidStatus(t,gr.IMPRESSION);const n=this.Wt.auctionInfoLogging.onImpression(t);this.mI(t,e,n)}yI(t,i,e,s=!0){this.bI(t,i,e,s),this.Wt.loopAdWhenFinished?t.resumeAd():this.Wt.pauseAdWhenFinished?t.pauseAd():(this.sI.next(t),this.aI(),this.hI())}bI(t,i,e,s=!0){if(this.Zk)return void(this.Zk=!1);if(!s)return;this.Wt.adImpressionerYo.registerPostBid(t.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,t.settings.id);const n=this.Wt.auctionInfoLogging.onPostBid(t);this.wI(t,e,i,n)}mI(t,i,e){var s,n;const r=this.oI.adBreakState,h=(0,P.kE)((0,lt.oK)(t.getAdDuration(),2))?(0,lt.oK)(t.getAdDuration(),2):0,o=(0,P.kE)((0,lt.oK)(t.declaredDurationInSeconds,2))?(0,lt.oK)(t.declaredDurationInSeconds,2):0,a=h-o,c=(0,Yi.H8)(t.createdTimestamp),l=this.oI.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.Wt.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.iI};(0,P.$K)(e)&&(u.auctionInformation=e),this.Wt.trackingService.trackVideoAdImpression(u)}wI(t,i,e,s){var n;const r=this.oI.adBreakState,h=(0,Yi.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,P.$K)(s)&&(o.auctionInformation=s,o.auctionPostbidReason=this.Wt.auctionInfoLogging.getGeneralPostbidReason(i)),this.Wt.trackingService.addPostBid(o)}xI(t,e){const s=this.nI.indexOf(e)>=0&&!(this.Wt.pauseAdWhenFinished||this.Wt.loopAdWhenFinished),n=this.oI.adBreakState;s?1===(0,ut.Vm)([99,1])&&(0,i.n)({message:"AdManager_AdImpressionerController_handleQuartilesTracking_track_same_quartile_twice",level:i.D.WARN,exception:t.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,callStack:t.adMediaType}):(this.nI.push(e),this.Wt.trackingService.trackVideoAdQuartile({advertiserLineItemId:t.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,publisherLineItemId:t.settings.adManagerLineItem.protoLineItem.publisherLineItemId,quartile:e,rtbSeatId:t.settings.requestMetadata.data.rtbSeatId,dspId:t.settings.requestMetadata.data.dspId,adBreakType:n.adBreakType,hasAdSkip:this.iI}))}pI(t){const e=Date.now();this.tI.push(t.onVpaidEvent.subscribe((n=>{var r;const h=function(t,i){switch(t){case g.fI.AdImpression:return i.adImpression;case g.fI.AdClickThru:return i.adClick;case g.fI.AdStarted:return i.adStarted;case g.fI.AdVideoStart:return i.adVideoStart;case g.fI.AdVideoFirstQuartile:return i.adQuartileFirst;case g.fI.AdVideoMidpoint:return i.adQuartileSecond;case g.fI.AdVideoThirdQuartile:return i.adQuartileThird;case g.fI.AdVideoComplete:return i.adQuartileFourth;case g.fI.AdPaused:return i.adPause;case g.fI.AdPlaying:return i.adResume;case g.fI.AdSkipped:return i.adSkip;case g.fI.AdUserClose:return i.adUserClose;case g.fI.AdUserAcceptInvitation:return i.adUserAcceptInvitation;case g.fI.AdUserMinimize:return i.adUserMinimize;case g.fI.AdError:return i.adError}}(n.type,t.settings.trackers),o=Date.now()-e;switch(h||n.type!==g.fI.AdImpression||(this.SI("AdManager_AdImpressionController_tracker_impression_not_found"),(0,i.n)({message:"AdManager_AdImpressionController_tracker_impression_not_found",level:i.D.CRITICAL},{sendMaxLog:!1})),Ct.track(h,this.Wt.adMacroReplacer,t.settings.adManagerLineItem.protoLineItem,t.settings.callingState),n.type){case g.fI.AdError:this.yI(t,o,n.payload.errorMessage);break;case g.fI.AdSkipped:this.yI(t,o,Vt.AdStopped);break;case g.fI.AdStopped:this.yI(t,o,Vt.AdStopped,null===(r=n.payload)||void 0===r?void 0:r.shouldTrackPostBid);break;case g.fI.AdImpression:this.vI(t,o,n.payload.adSourceData.skipOffset);break;case g.fI.AdVideoFirstQuartile:this.xI(t,s.ProtoQuartilesEnum.First);break;case g.fI.AdVideoMidpoint:this.xI(t,s.ProtoQuartilesEnum.Second);break;case g.fI.AdVideoThirdQuartile:this.xI(t,s.ProtoQuartilesEnum.Third);break;case g.fI.AdVideoComplete:this.xI(t,s.ProtoQuartilesEnum.Fourth)}}))),this.tI.push(t.onAdViewableImpression.subscribe((i=>{i.adBreakType=this.oI.adBreakState.adBreakType,i.hasAdSkip=this.iI,this.Wt.trackingService.trackVideoAdImpressionViewable(i),Ct.track(t.settings.trackers.adViewableImpression,this.Wt.adMacroReplacer,t.settings.adManagerLineItem.protoLineItem,t.settings.callingState)})))}gI(t,i){if((0,P.kE)(t)&&t>=0)return!0;return nt(i,this.Wt.skipAdSettings)}SI(t,e){(0,i.n)({message:t,level:i.D.CRITICAL,exception:null==e?void 0:e.message,callStack:null==e?void 0:e.stack},{sendMaxLog:!1})}}const Hr={[s.ProtoAdBreakTypeEnum.PreRoll]:"preRoll",[s.ProtoAdBreakTypeEnum.MidRoll]:"midRoll",[s.ProtoAdBreakTypeEnum.PostRoll]:"postRoll"};class zr{constructor(t,i){this.Q_=t,this.eh=i}replace(t,i,e){this.Q_.setAdWidth(e.adMacros.adWidth),this.Q_.setAdHeight(e.adMacros.adHeight),this.Q_.setAdPosition(Hr[e.adMacros.adPostion]),e.mediaMacros.mediaDescription&&this.Q_.setVideoDescription(e.mediaMacros.mediaDescription),e.mediaMacros.mediaDuration&&this.Q_.setVideoDuration(e.mediaMacros.mediaDuration),e.mediaMacros.mediaId&&this.Q_.setVideoId(e.mediaMacros.mediaId),e.mediaMacros.mediaTitle&&this.Q_.setVideoTitle(e.mediaMacros.mediaTitle),e.mediaMacros.mediaUrl&&this.Q_.setVideoUrl(e.mediaMacros.mediaUrl);const s=this.eh.isConsent(i);this.Q_.setGDPR(this.eh.isConsentRequired()?1:0),this.Q_.setConsent(s?1:0),this.Q_.setGDPRConsent(this.eh.getConsentPayload());const n=this.eh.getTrackableUser(),r=this.eh.isConsentConnatix()&&s?n:void 0;return this.Q_.setUUID(r),this.Q_.setupMacros(t)}}var qr=n(6798),Wr=n(2566);function Gr(t,i){return(0,qr.e)((function(e,s){var n=0;e.subscribe((0,Wr.x)(s,(function(e){s.next(t.call(i,e,n++))})))}))}var Jr=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t};function Qr(t){return(0,Vi.m)(null==t?void 0:t.then)}var Xr=n(6766);function Yr(t){return(0,Vi.m)(t[Xr.L])}function Kr(t){return Symbol.asyncIterator&&(0,Vi.m)(null==t?void 0:t[Symbol.asyncIterator])}function Zr(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 th="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";function ih(t){return(0,Vi.m)(null==t?void 0:t[th])}function eh(t){return(0,Ci.FC)(this,arguments,(function(){var i,e,s;return(0,Ci.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,Ci.qq)(i.read())];case 3:return e=n.sent(),s=e.value,e.done?[4,(0,Ci.qq)(void 0)]:[3,5];case 4:return[2,n.sent()];case 5:return[4,(0,Ci.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 sh(t){return(0,Vi.m)(null==t?void 0:t.getReader)}var nh=n(5);function rh(t){if(t instanceof $i.y)return t;if(null!=t){if(Yr(t))return n=t,new $i.y((function(t){var i=n[Xr.L]();if((0,Vi.m)(i.subscribe))return i.subscribe(t);throw new TypeError("Provided object does not correctly implement Symbol.observable")}));if(Jr(t))return s=t,new $i.y((function(t){for(var i=0;i<s.length&&!t.closed;i++)t.next(s[i]);t.complete()}));if(Qr(t))return e=t,new $i.y((function(t){e.then((function(i){t.closed||(t.next(i),t.complete())}),(function(i){return t.error(i)})).then(null,nh.h)}));if(Kr(t))return hh(t);if(ih(t))return i=t,new $i.y((function(t){var e,s;try{for(var n=(0,Ci.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(sh(t))return hh(eh(t))}var i,e,s,n;throw Zr(t)}function hh(t){return new $i.y((function(i){(function(t,i){var e,s,n,r;return(0,Ci.mG)(this,void 0,void 0,(function(){var h,o;return(0,Ci.Jh)(this,(function(a){switch(a.label){case 0:a.trys.push([0,5,6,11]),e=(0,Ci.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 oh(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 ah(t,i,e){return void 0===e&&(e=1/0),(0,Vi.m)(i)?ah((function(e,s){return Gr((function(t,n){return i(e,t,s,n)}))(rh(t(e,s)))}),e):("number"==typeof i&&(e=i),(0,qr.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;rh(e(t,l++)).subscribe((0,Wr.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?oh(i,h,(function(){return f(t)})):f(t)};a.length&&c<s;)t();d()}catch(t){i.error(t)}})))};return t.subscribe((0,Wr.x)(i,p,(function(){u=!0,d()}))),function(){null==o||o()}}(i,s,t,e)})))}var ch=n(278);function lh(t){return void 0===t&&(t=1/0),ah(ch.y,t)}var uh=new $i.y((function(t){return t.complete()}));function dh(t){return t[t.length-1]}function ph(t){return Ui(dh(t))?t.pop():void 0}function fh(t,i){return"number"==typeof dh(t)?t.pop():i}function vh(t,i){return void 0===i&&(i=0),(0,qr.e)((function(e,s){e.subscribe((0,Wr.x)(s,(function(e){return oh(s,t,(function(){return s.next(e)}),i)}),(function(){return oh(s,t,(function(){return s.complete()}),i)}),(function(e){return oh(s,t,(function(){return s.error(e)}),i)})))}))}function gh(t,i){return void 0===i&&(i=0),(0,qr.e)((function(e,s){s.add(t.schedule((function(){return e.subscribe(s)}),i))}))}function mh(t,i){if(!t)throw new Error("Iterable cannot be null");return new $i.y((function(e){oh(e,i,(function(){var s=t[Symbol.asyncIterator]();oh(e,i,(function(){s.next().then((function(t){t.done?e.complete():e.next(t.value)}))}),0,!0)}))}))}function yh(t,i){if(null!=t){if(Yr(t))return function(t,i){return rh(t).pipe(gh(i),vh(i))}(t,i);if(Jr(t))return function(t,i){return new $i.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(Qr(t))return function(t,i){return rh(t).pipe(gh(i),vh(i))}(t,i);if(Kr(t))return mh(t,i);if(ih(t))return function(t,i){return new $i.y((function(e){var s;return oh(e,i,(function(){s=t[th](),oh(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,Vi.m)(null==s?void 0:s.return)&&s.return()}}))}(t,i);if(sh(t))return function(t,i){return mh(eh(t),i)}(t,i)}throw Zr(t)}function bh(t,i){return i?yh(t,i):rh(t)}var wh=n(4975);function xh(t,i){return void 0===i&&(i=!1),(0,qr.e)((function(e,s){var n=0;e.subscribe((0,Wr.x)(s,(function(e){var r=t(e,n++);(r||i)&&s.next(e),!r&&s.complete()})))}))}function Sh(t,i,e){var s=(0,Vi.m)(t)||i||e?{next:t,error:i,complete:e}:t;return s?(0,qr.e)((function(t,i){var e;null===(e=s.subscribe)||void 0===e||e.call(s);var n=!0;t.subscribe((0,Wr.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)})))})):ch.y}class _h{constructor(t){this.bid=t,this.cancelled=!1,this._I=new x.x,this.AI=!1,this.wg=this.bid.onVpaidEvent.pipe((0,wh.h)((t=>t.type===g.fI.AdLoaded)),xh((()=>!this.AI)),Sh((()=>{this.AI=!0}))),this.xg=this.bid.onVpaidEvent.pipe((0,wh.h)((t=>t.type===g.fI.AdError)),Gr((t=>t.payload.errorMessage)),xh((()=>!this.AI)),Sh((()=>{this.AI=!0})))}get onSuccess(){return this.wg}get onFailure(){return function(){for(var t=[],i=0;i<arguments.length;i++)t[i]=arguments[i];var e=ph(t),s=fh(t,1/0),n=t;return n.length?1===n.length?rh(n[0]):lh(s)(bh(n,e)):uh}(this._I,this.xg)}loadBid(t,i,e,s,n){this.bid.initAd(t,i,e,s,void 0,void 0,n)}}class Ah{constructor(t){this.Wt=t,this.kI=new Set,this.nf=[],this.lu=!1,this.II=()=>{const t=Date.now();if(this.TI())return void this.Wt.auctionManager.onNothingToWin();const e=this.CI(),{selectedBid:s}=e;return s?(this.Wt.auctionInfoLogging.winBid(s),this.MI(e,this.EI.vastViewMode).catch((i=>{const n=this.Wt.auctionInfoLogging.onPostBid(e.selectedBid);throw this.LI(s,t,i,n),this.OI(),e})).then((()=>{this.OI()})).catch((t=>{if(t===e)return;let s="";try{s=JSON.stringify(t)}catch(t){}(0,i.n)({message:"AdManager_winBid_failed",level:i.D.CRITICAL,exception:t,callStack:s},{throttle:3,sendMaxLog:!1})}))):void 0},this.LP=new xr(this.II,10),this.nf.push(this.Wt.adBidPool.getBidPoolBidEvents(vr.ON_BID).subscribe((t=>{const i=this.CI();this.Wt.auctionInfoLogging.newBidAdded(t,i),this.OI()})),this.Wt.adBidPool.getBidPoolBidEvents(vr.ON_BID_STARTED).subscribe((()=>{this.OI()})),this.Wt.adBidPool.getBidPoolBidEvents(vr.ON_BID_READY_CONSUMED).subscribe((()=>{this.OI()})),this.Wt.impressionCapsTimer.onTimer().subscribe((()=>{this.OI()})))}isLoadingBids(){return this.kI.size>0}win(t){this.EI=t,this.LP.setNumberOfThreads(t.maxParallelWins),this.lu=!0,this.OI()}stop(){this.lu=!1,this.LP.stop()}destroy(){this.stop(),(0,pt.i)(this.nf)}OI(){this.lu&&this.LP.start()}CI(){const t=this.RI(),i=this.BI();return this.DI(t,i)}DI(t,i){const e=Object.assign({},t);return t.selectedBid&&i.selectedBid?(this.FI(i.selectedBid,t.selectedBid)&&(e.selectedBid=void 0,e.unselectedBidList.push({bid:t.selectedBid,lossReason:s.ProtoAuctionLossReasonEnum.CompetitorPriority})),e):e}TI(){if(-1===this.Wt.maxNumberOfWins)return!1;const t=this.Wt.adBidPool.getBidsByStatus([gr.READY]),i=this.Wt.adBidPool.getBidsByStatus([gr.STARTED]),e=this.Wt.adBidPool.getBidsByStatus([gr.IMPRESSION]);this.$I(i,e);return t.length+this.kI.size+(i[0]?1:0)+(e[0]?1:0)>=this.Wt.maxNumberOfWins}$I(t,e){t.length+e.length<=1||(0,i.n)({message:"AdWinnerController_multiple_bids_started",level:i.D.CRITICAL,callStack:`${t.length}`,exception:`${e.length}`},{throttle:2,sendMaxLog:!1})}RI(){return this.VI(this.Wt.adBidPool.getBidsByStatus([gr.IDLE]))}BI(){const t=[...(0,a.ee)(this.kI).map((t=>t.bid)),...this.Wt.adBidPool.getBidsByStatus([gr.READY])];return this.VI(t)}VI(t){return this.Wt.adWinnerYo.selectBestBid(t,this.EI.stateSettings,this.Wt.impressionCapsService)}FI(t,i){return!(this.Wt.adWinnerYo.getWinningYoScore(t.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,t.settings.id)<=this.Wt.adWinnerYo.getWinningYoScore(i.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,i.settings.id))}MI(t,i){return new Promise(((e,s)=>{const{selectedBid:n,state:r}=t,h=new _h(n);this.kI.add(h),this.Wt.adBidPool.changeBidStatus(n,gr.LOADING),h.onSuccess.subscribe((()=>{this.kI.delete(h),this.UI(n),this.Wt.adBidPool.changeBidStatus(n,gr.READY),e()})),h.onFailure.subscribe((t=>{this.kI.delete(h),this.Wt.adBidPool.consumeBid(n,mr.BID_LOADING_CONSUMED),s(t)}));const{width:o,height:a}=r.adContainerState.get(n.settings.adManagerLineItem.protoLineItem.adType);h.loadBid(o,a,i,this.Wt.desiredBitRateForWins,r.soundValue),Ct.track(n.settings.trackers.adWin,this.Wt.adMacroReplacer,n.settings.adManagerLineItem.protoLineItem,r)}))}UI(t){const{creativeType:i,floorPrice:e,successRate:s,advertiserLineItemId:n,lineItemPriority:r}=t.settings.adManagerLineItem.protoLineItem,{id:h,cpm:o,obfuscatedPrice:a,successRate:c}=t.settings,l=t.getAdDuration();this.Wt.adWinnerYo.registerWinningInformation({lineItemId:n,bidId:h,creativeType:i,floorPrice:e,obfuscatedPrice:a,cpm:o,successRate:c||s,priority:r,adDuration:l})}LI(t,i,e,s){this.NI(t,Date.now()-i,e,s),this.Wt.adWinnerYo.registerPostBid(t.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,t.settings.id)}NI(t,i,e,s){var n,r,h,o,a;Ct.track(t.settings.trackers.adError,this.Wt.adMacroReplacer,t.settings.adManagerLineItem.protoLineItem,t.settings.callingState);const c=(null===(r=null===(n=this.EI.stateSettings)||void 0===n?void 0:n.currentState)||void 0===r?void 0:r.adBreakState)||(null===(o=null===(h=this.EI.stateSettings)||void 0===h?void 0:h.predictedState)||void 0===o?void 0:o.adBreakState),l=(0,Yi.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,P.$K)(s)&&(u.auctionInformation=s,u.auctionPostbidReason=this.Wt.auctionInfoLogging.getGeneralPostbidReason(e)),this.Wt.trackingService.addPostBid(u)}}var Ph,kh,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 n(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 s.ProtoLineItemAdBreakTypeEnum.All:return!0;case s.ProtoLineItemAdBreakTypeEnum.AdPod:return i;case s.ProtoLineItemAdBreakTypeEnum.SingleAd:return!i}}(t.adBreakTypeEnum,i.adBreakState.isAdPodBreak)}))}function r(t,i){return!(t.protoLineItem.mediaIdTargeting&&!u(i.media.mediaId,t.protoLineItem.mediaIdTargeting))&&(!(t.protoLineItem.mediaKeywordsTargeting&&!u(i.media.mediaKeywords,t.protoLineItem.mediaKeywordsTargeting))&&!(t.protoLineItem.mediaLanguageTargeting&&!u(i.media.mediaLanguage,t.protoLineItem.mediaLanguageTargeting)))}function h(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)||[],c=!!(null===(s=i.media.mediaInsights)||void 0===s?void 0:s.insightsFallback),l=(null===(n=i.page.insights)||void 0===n?void 0:n.insights)||[];return!((0,a.BZ)(r)&&!d(r,o,c,l))&&!((0,a.BZ)(h)&&!d(h,o,c,l))}function o(t,i){const{playerSizeTargetings:e}=t.protoLineItem,{width:n}=i.adContainerState.get(t.protoLineItem.adType);return!(0,P.as)(e)||!(0,P.kE)(n)||(e.sizeChoiceCriteria===s.ProtoSizeChoiceCriteriaEnum.GreaterThan?!(0,P.kE)(e.minWidth)||n>=e.minWidth:e.sizeChoiceCriteria===s.ProtoSizeChoiceCriteriaEnum.SmallerThan?!(0,P.kE)(e.maxWidth)||n<=e.maxWidth:e.sizeChoiceCriteria!==s.ProtoSizeChoiceCriteriaEnum.Between||(!(0,P.kE)(e.maxWidth)||!(0,P.kE)(e.minWidth)||n>=e.minWidth&&n<=e.maxWidth))}function c(t,i){const{playerOrientationTargeting:e}=t.protoLineItem;switch(e){case wt.ProtoPlayerOrientationTargetingEnum.Landscape:if(i.playerOrientation===at.Portrait)return!1;break;case wt.ProtoPlayerOrientationTargetingEnum.Portrait:if(i.playerOrientation===at.Landscape)return!1}return!0}function l(t,i){var e;const n=null===(e=t.protoLineItem.adBreakSettings)||void 0===e?void 0:e.adPodTargeting;if(!n)return!0;if(!i.adBreakState.isAdPodBreak)return!0;const r=i.adBreakState.adPodSlotIndex;let h=!0;switch(n.adSlotTargetingType){case s.ProtoLineItemAdSlotTargetingTypeEnum.Interval:(r<n.adSlotPositions[0]||r>n.adSlotPositions[1])&&(h=!1);break;case s.ProtoLineItemAdSlotTargetingTypeEnum.SpecificSlots:-1===n.adSlotPositions.indexOf(r)&&(h=!1)}return n.targetingType===s.ProtoLineItemTargetingTypeEnum.Except&&(h=!h),h}function u(t,i){if((0,a.BZ)(i.items)&&Array.isArray(t)){const e=(0,a.tN)(t,i.items).length;return i.choiceCriteria===s.ProtoChoiceCriteriaEnum.Only?e>0:0===e}const e=(0,a.d3)(t,i.items);return i.choiceCriteria===s.ProtoChoiceCriteriaEnum.Only?e:!e}function d(t,i,e,n){return t.some((t=>function(t,i,e,n){for(let r=0;r<t.filters.length;r++){const h=t.filters[r],o=e?h.items:h.hashedItemsIds,a=h.hashedItemsIds,c=i.filter((t=>o.includes(t))).length,l=n.filter((t=>a.includes(t))).length,u=p(h.type,c,o),d=p(h.type,l,a);switch(h.level){case s.ProtoContextualTargetingLevelEnum.Media:if(!u)return!1;break;case s.ProtoContextualTargetingLevelEnum.Page:if(!d)return!1;break;case s.ProtoContextualTargetingLevelEnum.Both:if(!u||!d)return!1}}return!0}(t,i,e,n)))}function p(t,i,e){switch(t){case s.ProtoLineItemContextualTargetingEnum.IncludeAny:if(0===i)return!1;break;case s.ProtoLineItemContextualTargetingEnum.IncludeAll:if(i!==e.length)return!1;break;case s.ProtoLineItemContextualTargetingEnum.ExcludeAny:if(i>0)return!1;break;case s.ProtoLineItemContextualTargetingEnum.ExcludeAll:if(i===e.length)return!1}return!0}t.isLineItemTargetingAllowed=function(t,s){return e(t,s)&&i(t,s)&&n(t,s)&&r(t,s)&&l(t,s)&&h(t,s)&&o(t,s)&&c(t,s)},t.isAllowedBySound=i,t.isAllowedByViewability=e,t.isAllowedByAdBreakType=n,t.isAllowedByMediaTargeting=r,t.isAllowedByContextualTargeting=h,t.isAllowedByPlayerSizeTargeting=o,t.isAllowedByPlayerOrientationTargeting=c,t.isAllowedByPodTargeting=l,t.isAllowedRegardingDuration=function(t,i){return!t||0===i||t<=i}}(Ph||(Ph={}));class Th{constructor(t){this.HI=t}registerBiddingInformation(t){this.HI.registerBiddingInformation(t)}registerWinningInformation(t){return this.HI.registerWinningInformation(t)}registerPreBidFromBid(t,i){this.HI.registerPreBidFromBid(t,i)}registerImpression(t,i){this.HI.registerImpression(t,i)}registerPostBid(t,i){this.HI.registerPostBid(t,i)}getCallingYoScore(t){return this.HI.getCallingYoScore(t)}getWinningYoScore(t,i){return this.HI.getWinningYoScore(t,i)}getImpressionYoScore(t,i){return this.HI.getImpressionYoScore(t,i)}zI(t,i){const e=t.getAdDuration(),s=i.adBreakState.sessionMaxAdDuration;return Ph.isAllowedRegardingDuration(e,s)}qI(t,i){const e=t.getAdDuration(),s=i.adBreakState.remainingAdDuration;return Ph.isAllowedRegardingDuration(e,s)}WI(t,i,e){return e.canCall(t.settings.adManagerLineItem,i.adOpportunity.id)&&Ph.isLineItemTargetingAllowed(t.settings.adManagerLineItem,i)&&this.zI(t,i)&&this.qI(t,i)}}class Ch extends Th{constructor(t,i,e,s,n,r){super(t),this.GI=e,this.JI=s,this.XI=n,this.YI=r}getBestLineItem(t,i){const e=i.currentState||i.predictedState;if(!e)return;const s=this.KI(t);return s?{state:e,lineItemList:this.ZI(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=[gr.IMPRESSION],s=this.JI.getAllBidsForLineItem(t.protoLineItem.advertiserLineItemId,i);return!(!Pn(t.protoLineItem.creativeType)&&(s.length>0||t.callers.size>0)&&!t.protoLineItem.forceCallingInEveryAO)&&this.YI.canCall(t,e.adOpportunity.id)})).filter((t=>!Sr.getInstance().isLineItemPlatformCapped({advertiserLineItemId:t.protoLineItem.advertiserLineItemId,publisherLineItemId:t.protoLineItem.publisherLineItemId}))).filter((t=>Ph.isLineItemTargetingAllowed(t,e))).filter((t=>this.tT(t,e)))}isBidTargetingAllowed(t,i,e){return this.WI(t,i,e)}isBidTargetingAllowedEverInSession(t,i){return this.zI(t,i)}tT(t,i){if(Pn(t.protoLineItem.creativeType))return!0;if(t.protoLineItem.forceCallingInEveryAO)return!0;const e=this.JI.getBidsExceptStatus([gr.STARTED,gr.IMPRESSION]).filter((t=>this.isBidTargetingAllowed(t,i,this.XI))),s=t.protoLineItem.floorPrice||t.protoLineItem.customCpm,n=this.getCallingYoScore(t.protoLineItem.advertiserLineItemId),r=this.GI.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}KI(t){let i=t;return t.some((t=>Pn(t.protoLineItem.creativeType)))&&(i=i.filter((t=>Pn(t.protoLineItem.creativeType)))),this.iT(i)[0]}iT(t=[]){return t.sort(((t,i)=>this.getCallingYoScore(i.protoLineItem.advertiserLineItemId)-this.getCallingYoScore(t.protoLineItem.advertiserLineItemId)))}ZI(t,i){const{creativeType:e}=t.protoLineItem;return Pn(e)?this.iT(i.filter((t=>e===t.protoLineItem.creativeType))):[t]}}class Mh extends Th{getBestBid(t,i,e){return this.eT(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}eT(t,i,e){return[...t].filter((t=>this.WI(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 Eh extends Th{constructor(){super(...arguments),this.sT=(t,i,e)=>{const s=[],n=[];for(const r of t){this.WI(r,i.currentState||i.predictedState,e)?s.push(r):n.push(r)}return{allowedBidList:s,notAllowedBidList:n}}}selectBestBid(t,i,e){const n=this.sT(t,i,e),{allowedBidList:r,notAllowedBidList:h}=n,o=i.currentState||i.predictedState,a=this.nT(r),c=h.map((t=>({bid:t,lossReason:this.rT(t,o)}))),l=r.filter((t=>t!==a)).map((t=>({bid:t,lossReason:s.ProtoAuctionLossReasonEnum.CompetitorPriority})));return{state:o,selectedBid:a,unselectedBidList:[...c,...l]}}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)}nT(t){if((0,a.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]}rT(t,i){return this.qI(t,i)?s.ProtoAuctionLossReasonEnum.AdOpportunityEnd:s.ProtoAuctionLossReasonEnum.TargetingMismatch}}!function(t){t[t.ON_STARTED=0]="ON_STARTED",t[t.ON_END=1]="ON_END"}(kh||(kh={}));class Lh{constructor(t){this.Wt=t,this.hT=new x.x,this.oT=[],this.aT=!1,this.cT=!1,this.nf=[]}get onAuctionMechanismEnded(){return this.hT.asObservable()}startNewAuction(t){this.lT=t.callingState,this.cT=t.waitForNewReadyBid,this.uT(),this.dT(),this.fT(),this.vT()}cancelAuction(){this.uT()}updateState(t){if(this.lT=t,0===this.oT.length)return;const i=this.Wt.adCallingPool.callingLineItems.map((t=>t.protoLineItem.advertiserLineItemId)),e=this.Wt.adCallerYo.getCallableLineItems(this.Wt.lineItems,this.lT.stateSettings).map((t=>t.protoLineItem.advertiserLineItemId));this.oT=this.oT.filter((t=>t.isAdCalled||(0,a.d3)(t.lineItemId,e)||(0,a.d3)(t.lineItemId,i))),this.vT()}onNothingToWin(){0!==this.oT.length&&this.oT.every((t=>!0===t.isAdCalled))&&this.vT()}onNothingToCall(){0!==this.oT.length&&(this.gT(),this.vT())}gT(){const t=this.Wt.adCallingPool.callingLineItems.map((t=>t.protoLineItem.advertiserLineItemId));this.oT=this.oT.filter((i=>!0===i.isAdCalled||!1===i.isAdCalled&&(0,a.d3)(i.lineItemId,t)))}mT(){this.uT(),this.hT.next()}fT(){this.nf.push(this.Wt.adBidPool.getBidPoolBidEvents(vr.ON_BID_READY).subscribe((t=>{this.aT=!0,this.vT()})),this.Wt.adBidPool.getBidPoolBidEvents(vr.ON_BID_LOADING_CONSUMED).subscribe((t=>{this.vT()})),this.Wt.adCallingPool.getAdCallingPoolEvents(kh.ON_END).subscribe((t=>{this.yT(t),this.vT()})))}yT(t){this.oT.forEach((i=>{t.some((t=>t.protoLineItem.advertiserLineItemId===i.lineItemId))&&(i.isAdCalled=!0)}))}bT(){(0,pt.i)(this.nf)}vT(){this.cT&&!this.aT||(0!==this.oT.length?this.oT.every((t=>!0===t.isAdCalled))&&this.wT()&&this.mT():this.mT())}wT(){const t=this.xT(this.Wt.adBidPool.getBidsByStatus([gr.READY]));if(!t)return!1;const i=this.Wt.adWinnerYo.selectBestBid(this.Wt.adBidPool.getBidsByStatus([gr.IDLE]),this.lT.stateSettings,this.Wt.impressionCapsService),e=[...this.Wt.adBidPool.getBidsByStatus([gr.LOADING])];i.selectedBid&&e.push(i.selectedBid);const s=this.xT(e);if(!s)return!0;return this.Wt.adWinnerYo.getWinningYoScore(t.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,t.settings.id)>=this.Wt.adWinnerYo.getWinningYoScore(s.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,s.settings.id)}xT(t){if(t&&0!==t.length)return t.reduce(((t,i)=>this.Wt.adWinnerYo.getWinningYoScore(t.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,t.settings.id)>this.Wt.adWinnerYo.getWinningYoScore(i.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,i.settings.id)?t:i))}uT(){this.oT=[],this.aT=!1,this.bT()}dT(){this.ST(this.lT.stateSettings),this._T(this.lT.stateSettings),this.AT()}AT(){this.Wt.adCallingPool.callingLineItems.forEach((t=>{this.PT(t)}))}_T(t){const i=this.kT(),e=this.Wt.adCallerYo.getCallableLineItems(i,t),s=e.filter((t=>t.protoLineItem.forceCallingInEveryAO)),n=this.IT(e,t);if(!n)return void this.TT(s);this.CT()>this.Wt.adCallerYo.getCallingYoScore(n.protoLineItem.advertiserLineItemId)?this.TT(s):(this.PT(n),s.filter((t=>t!==n)).forEach((t=>{this.PT(t)})))}ST(t){const i=this.MT();this.Wt.adCallerYo.getCallableLineItems(i,t).forEach((t=>{this.PT(t)}))}kT(){return this.Wt.lineItems.filter((t=>!Pn(t.protoLineItem.creativeType)))}MT(){return this.Wt.lineItems.filter((t=>Pn(t.protoLineItem.creativeType)))}IT(t,i){const e=this.Wt.adCallerYo.getBestLineItem(t,i);if(e&&(0,a.BZ)(e.lineItemList))return e.lineItemList[0]}CT(){const t=this.Wt.adBidPool.getBidsByStatus([gr.READY]),i=this.xT(t);return i?this.Wt.adWinnerYo.getWinningYoScore(i.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,i.settings.id):0}PT(t){this.oT.some((i=>i.lineItemId===t.protoLineItem.advertiserLineItemId))||this.oT.push({isAdCalled:!1,lineItemId:t.protoLineItem.advertiserLineItemId})}TT(t){t.forEach((t=>{this.PT(t)}))}}!function(t){t.ShortCircuitEnd="short",t.TimeoutEnd="timeout",t.Prefetch="prefetched"}(Ih||(Ih={}));class Oh{constructor(t,i){this.uv=t,this.ET=null,this.OT=new x.x,this.hT=new x.x,this.RT=null,this.BT={inPrefetchMode:!1,startTime:0,prefetchEnded:!1},this.DT={id:"",auctionEnded:!1},this.jT=new Lh({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.FT()}get onAuctionStopCalling(){return this.hT.asObservable()}get onAuctionEnd(){return this.OT.asObservable()}updateState(t){this.jT.updateState(t)}cancelAuction(){this.BT.inPrefetchMode=!1,this.jT.cancelAuction(),this.$T()}startPrefetch(t){this.$T(),this.BT={inPrefetchMode:!0,startTime:Date.now(),prefetchEnded:!1},this.jT.startNewAuction({callingState:t,waitForNewReadyBid:!0})}startAuction(t,i,e=3e3){if(0===e)return void this.mT();if(this.DT.id===i)return void(this.DT.auctionEnded&&this.mT());this.ET=Date.now(),this.DT={auctionEnded:!1,id:i},this.$T();let s=e;this.BT.inPrefetchMode?(s-=Date.now()-this.BT.startTime,s<0||this.BT.prefetchEnded?this.mT(Ih.Prefetch):this.VT(s)):(this.jT.startNewAuction({callingState:t,waitForNewReadyBid:!1}),this.VT(s)),this.BT.inPrefetchMode=!1}onNothingToWin(){this.jT.onNothingToWin()}onNothingToCall(){this.jT.onNothingToCall()}destroy(){this.UT.unsubscribe(),this.UT=null}FT(){this.UT=this.jT.onAuctionMechanismEnded.subscribe((()=>{this.NT()}))}NT(){this.BT.prefetchEnded=!0,this.hT.next(),this.BT.inPrefetchMode||this.mT(Ih.ShortCircuitEnd)}VT(t){this.RT=this.uv.setTimeout((()=>{this.mT(Ih.TimeoutEnd)}),t)}mT(t){null!==this.ET&&(0,P.$K)(t)&&(this.zT(t,Date.now()-this.ET),this.ET=null),this.DT.auctionEnded=!0,this.cancelAuction(),this.OT.next()}$T(){this.uv.clearTimeout(this.RT),this.RT=null}zT(t,e){(0,ut.Vm)([99,1])&&(0,i.n)({message:"AuctionManager_end_auction",exception:t,callStack:this.qT(e),level:i.D.INFO},{sendMaxLog:!1,throttle:1e4})}qT(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.qT(t,i+1)}}class Rh{constructor(){this.requestNumber=0}}class Bh{constructor(t){this.protoLineItem=t,this.historicalMetrics=new Rh,this.callers=new Set,this.aggregators=new Set}}class Dh{constructor(t,i){this.parentContainer=t,this.Cw=i,this.isImaSlot=!1,this.slotsContainer=this.Cw.createElementByString('<div class= "cnx-ad-bid-slot"></div>'),this.adSlot=this.Cw.createElementByString('<div class="cnx-ad-slot"></div>'),this.videoSlot=this.Cw.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 jh extends Dh{constructor(){super(...arguments),this.isImaSlot=!0,this.WT=!1,this.GT={imaAdDisplayContainer:void 0,imaAdsLoader:void 0,imaSdk:void 0}}fetchImaDependencies(){return Kt.fetchImaSdk(window,!0).then((t=>this.JT(t)))}destroy(){this.GT.imaAdsLoader&&this.GT.imaAdsLoader.destroy(),this.GT.imaAdDisplayContainer&&this.GT.imaAdDisplayContainer.destroy(),super.destroy()}sanitize(){this.GT.imaAdsLoader.contentComplete(),super.sanitize()}JT(t){if(this.WT)return this.GT;t.settings.setDisableCustomPlaybackForIOS10Plus(!0);const i=this.QT(t),e=this.XT(t,i);return this.GT={imaSdk:t,imaAdDisplayContainer:i,imaAdsLoader:e},this.WT=!0,this.GT}QT(t){const i=new t.AdDisplayContainer(this.adSlot,this.videoSlot);return i.initialize(),i}XT(t,i){const e=new t.AdsLoader(i);return e.getSettings().setVpaidMode(t.ImaSdkSettings.VpaidMode.INSECURE),e.getSettings().setAutoPlayAdBreaks(!1),e}}class Fh{constructor(t){this.settings=t,this.YT=new Set,this.KT=new Set,this.tC=[10,15,20],this.iC=0}preloadImaSdkSlots(t){Kt.preloadImaSdk(window);for(let i=1;i<=3;i++){const i=new jh(t,this.settings.globalDomUtilsService);i.fetchImaDependencies(),this.YT.add(i)}}requestAdSlot(t){const i=new Dh(t,this.settings.globalDomUtilsService);return this.eC(i),this.sC(),i}requestAdSlotIma(t){let i=this.nC();return i||(i=new jh(t,this.settings.globalDomUtilsService)),this.eC(i),this.sC(),i}destroyAdSlot(t){this.KT.delete(t),t.destroy()}recycleAdSlot(t){this.KT.delete(t),this.rC(t)?(t.sanitize(),this.YT.add(t)):this.destroyAdSlot(t)}rC(t){return t.isImaSlot}nC(){let t=null;return this.YT.forEach((i=>{this.rC(i)&&null===t&&(t=i)})),t}eC(t){this.YT.delete(t),this.KT.add(t)}sC(){const t=this.YT.size+this.KT.size;t===this.tC[this.iC]&&(this.hC(this.tC[this.iC]),t===this.tC[this.tC.length-1]&&this.tC.push(this.tC[this.tC.length-1]+20),this.iC++)}hC(t){(0,i.n)({message:"AdSlotContainerRecycler_slotcount",exception:`${t}`,callStack:"",level:i.D.INFO},{throttle:20})}}class $h{constructor(t){this.aC=new Map,t.forEach((t=>{this.aC.set(t.advertiserLineItemId,Math.random())}))}getCallingYoScore(t){return this.cC(t)}getWinningYoScore(t,i){return this.cC(t)}getImpressionYoScore(t,i){return this.cC(t)}cC(t){return this.aC.get(t)}}var Vh;!function(t){t[t.CALLING=0]="CALLING",t[t.WINNING=1]="WINNING",t[t.IMPRESSION=2]="IMPRESSION"}(Vh||(Vh={}));class Uh{constructor(t){this.lC=t}getScore(){return this.uC}dC(){const{successRate:t,cpm:i,priority:e}=this.lC;return this.pC(t)*i+Ft.XY*e}pC(t){let i=0===t?Math.random():t;return i=1,1}}class Nh extends Uh{constructor(t,i){super(i),this.fC=t,this.lC=i,Pn(this.fC)?this.uC=Math.random():this.uC=this.dC()}get metrics(){return this.lC}}class Hh extends Uh{constructor(t){super(t),this.lC=t,this.uC=this.dC()}get metrics(){return this.lC}}class zh extends Uh{constructor(t){super(t),this.lC=t,this.vC=20,this.uC=this.dC(),this.gC=this.mC()}get scoreIncludingDuration(){return this.gC}mC(){const{successRate:t,cpm:i,priority:e,adDuration:s}=this.lC;return this.pC(t)*i/this.yC(s)+Ft.XY*e}yC(t){return(0,P.r)(t)?t:this.vC}}class qh{constructor(t){this.bC=new Map,this.wC(t)}registerBiddingInformation(t){const{successRate:i,priority:e,bidId:s}=t,n=$t(t),r=new Hh({successRate:i,cpm:n,priority:e}),h=this.bC.get(t.lineItemId);h?h.winningBidYoScoreMap.set(s,r):this.xC("registerBiddingInformation",t.lineItemId)}registerPreBidFromBid(t,i){this.SC(t,i,"registerPreBidFromBid")}registerWinningInformation(t){const{successRate:i,priority:e,adDuration:s,bidId:n}=t,r=$t(t),h=new zh({successRate:i,cpm:r,priority:e,adDuration:s}),o=this.bC.get(t.lineItemId);o?o.impressionBidYoScoreMap.set(n,h):this.xC("registerWinningInformation",`lineItemId:${t.lineItemId}_bidId:${t.bidId}`)}registerPostBid(t,i){this.SC(t,i,"registerPostBid")}registerImpression(t,i){this.SC(t,i,"registerImpression")}getCallingYoScore(t){const i=this.bC.get(t);return this.cC(i,Vh.CALLING)}getWinningYoScore(t,i){const e=this.bC.get(t);return this.cC(e,Vh.WINNING,i)}getImpressionYoScore(t,i){const e=this.bC.get(t);return this.cC(e,Vh.IMPRESSION,i)}wC(t){t.forEach((t=>{this._C(t)}))}_C(t){const{floorPrice:i,lineItemPriority:e,successRate:s,advertiserLineItemId:n,creativeType:r}=t,h={cpm:i,priority:e,successRate:s};this.bC.set(n,{callingLineItemYoScore:new Nh(r,h),winningBidYoScoreMap:new Map,impressionBidYoScoreMap:new Map})}SC(t,i,e){const s=this.bC.get(t);s?(s.winningBidYoScoreMap.has(i)&&s.winningBidYoScoreMap.delete(i),s.impressionBidYoScoreMap.has(i)&&s.impressionBidYoScoreMap.delete(i)):this.xC(`unregisterBiddingInformation:${e}`,`lineItemId:${t}_bidId:${i}`)}cC(t,i,e){var s,n;if(!(0,P.$K)(t))return this.xC("getYoScore",`${i}`),0;switch(i){case Vh.CALLING:return t.callingLineItemYoScore.getScore();case Vh.WINNING:return null===(s=t.winningBidYoScoreMap.get(e))||void 0===s?void 0:s.getScore();case Vh.IMPRESSION:return null===(n=t.impressionBidYoScoreMap.get(e))||void 0===n?void 0:n.getScore();default:return 0}}xC(t,e=""){(0,i.n)({message:t,level:i.D.INFO,callStack:`YoScoreManager_${t}`,exception:e})}}class Wh{constructor(t,i){this.HI=i?new $h(t):new qh(t)}registerBiddingInformation(t){this.HI.registerBiddingInformation&&this.HI.registerBiddingInformation(t)}registerPreBidFromBid(t,i){this.HI.registerPreBidFromBid&&this.HI.registerPreBidFromBid(t,i)}registerWinningInformation(t){this.HI.registerWinningInformation&&this.HI.registerWinningInformation(t)}registerPostBid(t,i){this.HI.registerPostBid&&this.HI.registerPostBid(t,i)}registerImpression(t,i){this.HI.registerImpression&&this.HI.registerImpression(t,i)}getCallingYoScore(t){return this.HI.getCallingYoScore(t)}getWinningYoScore(t,i){return this.HI.getWinningYoScore(t,i)}getImpressionYoScore(t,i){return this.HI.getImpressionYoScore(t,i)}}class Gh{constructor(t,i){this.Nc=t,this.JI=i,this.AC=new Map}bidIsNotWinnableEverInSession(t){if(!this.PC(t))return;const i=[...this.kC(),this.IC(t)].sort(((t,i)=>i-t)),e=this.TC(i);this.CC(t.settings.requestMetadata.data.cnxBidId,e,s.ProtoAuctionLossReasonEnum.TargetingMismatch)}newBidAdded(t,i){this.PC(t)&&(i.selectedBid?i.selectedBid!==t?this.MC(t,i):this.EC(t):this.MC(t,i))}winBid(t){if(!this.PC(t))return;const i=this.kC(),e=this.TC(i);this.AC.set(t,e)}onPostBid(t){return this.LC(t)}onImpression(t){return this.LC(t)}PC(t){return t.settings.requestMetadata.data.logAuctionInformation}EC(t){const{cnxBidId:i}=t.settings.requestMetadata.data,e=this.kC(),n=this.TC(e);this.CC(i,n,s.ProtoAuctionLossReasonEnum.CompetitorPriority)}LC(t){const i=this.OC(t);return this.RC(t),i}MC(t,i){var e,s,n,r;const{cnxBidId:h}=t.settings.requestMetadata.data,o=this.kC(),a=this.BC(t,i),c=this.TC(o);(0,P.$K)(a)?this.CC(h,c,a):this.DC("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)}OC(t){if(this.AC.has(t))return this.AC.get(t);this.PC(t)&&this.DC("AdManager_AuctionInfoLogging_cannot_find_win_bid_snapshot",t.settings.requestMetadata.data.cnxBidId)}RC(t){this.AC.has(t)&&this.AC.delete(t)}BC(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 Vt.ImaScriptFailure:case Vt.ImaObjectNotFound:case Vt.ImaManagerInit:case Vt.ImaInitSdkError:case Vt.AdxOverlayGptScriptLoad:case Vt.DisplayIntegratorIframeLoad:return s.ProtoAuctionPostbidReasonEnum.SDKFailure;case Vt.VastUnsupportedMedia:case Vt.CnxMediaSrcNotSupported:return s.ProtoAuctionPostbidReasonEnum.UnsupportedMedia;case Vt.DomainBlocked:case Vt.AdaptorInitAdError:case Vt.AdaptorStartAdError:case Vt.WrapperInitAdError:case Vt.WrapperStartAdError:return s.ProtoAuctionPostbidReasonEnum.TargetingMismatch;default:return s.ProtoAuctionPostbidReasonEnum.CreativeError}}kC(){return this.JI.getAllBids().map((t=>this.IC(t))).sort(((t,i)=>i-t))}IC(t){switch(t.settings.adManagerLineItem.protoLineItem.creativeType){case s.ProtoCreativeTypeEnum.Rtb:case s.ProtoCreativeTypeEnum.Tam:case s.ProtoCreativeTypeEnum.TamDeal:return _t(t.settings.obfuscatedPrice);case s.ProtoCreativeTypeEnum.HeaderBidder:return t.settings.cpm;default:return t.settings.adManagerLineItem.protoLineItem.floorPrice||t.settings.adManagerLineItem.protoLineItem.customCpm}}TC(t){const i=t[0]?At(t[0]):void 0,e=t[1]?At(t[1]):void 0;return i||this.DC("AdManager_AuctionInfoLogging_highestBidPrice_missing",`${i}`),{bidDensity:t.length,highestObfuscatedBidPrice:i,secondHighestObfuscatedBidPrice:e}}CC(t,i,e){this.Nc.trackAuctionInfoForBid({cnxBidId:t,auctionInformation:i,auctionLossReason:e})}DC(t,e="",s=""){(0,i.n)({message:t,level:i.D.CRITICAL,callStack:e,exception:s},{throttle:5})}}class Jh{constructor(){this.jC=[]}canCall(t,i){return this.jC.every((e=>e.canCall(t,i)))}registerRequestForLineItem(t,i){return this.jC.forEach((e=>{e.registerRequestForLineItem(t,i)})),this}registerImpressionForLineItem(t,i){return this.jC.forEach((e=>{e.registerImpressionForLineItem(t,i)})),this}registerCallingValidator(t){return this.jC.push(t),this}registerCallingValidators(t){return t.forEach((t=>{this.registerCallingValidator(t)})),this}destroy(){this.jC.forEach((t=>{t.destroy()}))}}class Qh{constructor(){this.$C=new x.x,this.VC=new x.x,this.UC={[kh.ON_STARTED]:this.$C,[kh.ON_END]:this.VC},this.NC={[kh.ON_STARTED]:t=>this.$C.next(t),[kh.ON_END]:t=>this.VC.next(t)}}getCallingObservable(t){return this.UC[t].asObservable()}triggerEvent(t,i){(0,this.NC[t])(i)}}class Xh{constructor(){this.HC=[],this.zC=new Qh}get callingLineItems(){return this.HC}addCallingLineItems(t){this.HC=[...this.callingLineItems,...t],this.zC.triggerEvent(kh.ON_STARTED,t)}removeCallingLineItems(t){this.HC=this.callingLineItems.filter((i=>!(0,a.d3)(i,t))),this.zC.triggerEvent(kh.ON_END,t)}getAdCallingPoolEvents(t){return this.zC.getCallingObservable(t)}}class Yh{constructor(){this.qC=new x.x,this.WC=new x.x,this.GC=new x.x,this.JC=new x.x,this.QC=new x.x,this.XC=new x.x,this.YC=new x.x,this.KC={[vr.ON_BID]:this.qC,[vr.ON_BID_LOADING]:this.WC,[vr.ON_BID_READY]:this.GC,[vr.ON_BID_STARTED]:this.JC,[vr.ON_BID_LOADING_CONSUMED]:this.XC,[vr.ON_BID_READY_CONSUMED]:this.YC},this.ZC={[gr.IDLE]:t=>{this.qC.next(t)},[gr.LOADING]:t=>{this.WC.next(t)},[gr.READY]:t=>{this.XC.next(t),this.GC.next(t)},[gr.STARTED]:t=>{this.JC.next(t)},[gr.IMPRESSION]:t=>{this.QC.next(t)}},this.tM={[mr.BID_LOADING_CONSUMED]:t=>{this.XC.next(t)},[mr.BID_READY_CONSUMED]:t=>{this.YC.next(t)},[mr.BID_INVALIDATED]:(t,i)=>{[gr.IDLE,gr.LOADING].includes(i)?this.XC.next(t):this.YC.next(t)}}}getBidObservable(t){return this.KC[t].asObservable()}bidStatusChanged(t,i){(0,this.ZC[i])(t)}bidConsumed(t,i,e){(0,this.tM[e])(t,i)}}class Kh{constructor(){this.iM=[],this.eM=new Yh,this.sM=[]}getBidPoolBidEvents(t){return this.eM.getBidObservable(t)}addBid(t){this.iM.push({bid:t,status:gr.IDLE}),this.eM.bidStatusChanged(t,gr.IDLE)}getAllBids(){return this.nM(),this.iM.map((t=>t.bid))}getAllBidsForLineItem(t,i=[]){return this.nM(),this.iM.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.nM(),this.iM.filter((i=>t.includes(i.status))).map((t=>t.bid))}getBidsExceptStatus(t){return this.nM(),this.iM.filter((i=>!t.includes(i.status))).map((t=>t.bid))}changeBidStatus(t,i){const e=this.hM(t);return e?(e.status=i,this.eM.bidStatusChanged(t,i),!0):(this.oM(t.settings.id)||this.aM("AdBidPool_update_bid_not_found",i),!1)}consumeBid(t,i){const e=this.hM(t);return e?((0,a.sj)(this.iM,e),this.eM.bidConsumed(e.bid,e.status,i),i===mr.BID_INVALIDATED&&this.sM.push(t.settings.id),!0):(this.oM(t.settings.id)||this.aM("AdBidPool_consume_bid_not_found",i),!1)}nM(){this.cM().forEach((t=>{this.consumeBid(t.bid,mr.BID_INVALIDATED)}))}cM(){return this.iM.filter((t=>{const i=t.bid.createdTimestamp,e=t.bid.settings.adManagerLineItem.protoLineItem.networkExpiryTimeSeconds;return(0,P.r)(e)&&(0,Yi.H8)(i)>=e}))}hM(t){return this.iM.find((i=>i.bid===t))}oM(t){return this.sM.includes(t)}aM(t,e){(0,i.n)({message:t,exception:e?`${e}`:"",level:i.D.CRITICAL},{sendMaxLog:!1,throttle:2})}}var Zh=n(4974);class to{constructor(t){this.lM=t,this.uM=!1,this.dM=!1,this.pM=!1}get predictMode(){return this.uM}get adFetchingAllowed(){return this.dM}get impressionsAllowed(){return this.pM}get currentAdPlayerState(){return this.fM}get predictedAdPlayerState(){return this.vM}partialStateUpdate(t){this.fM&&(this.fM=Object.assign(Object.assign({},this.fM),t)),this.vM&&(this.vM=Object.assign(Object.assign({},this.vM),t))}getCurrentAdManagerState(t=!1){let i=this.fM;!this.currentAdPlayerState&&t&&(i=this.vM);const e=this.lM.getContainerStateMap();return this.gM(i,e)}getPredictedAdManagerState(){const t=this.vM,i=this.mM();return this.gM(t,i)}gM(t,i){if(!t)return;const{width:e,height:s,viewability:n}=this.lM.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:Zh.k.pageInsights}}}mM(){let t;return this.vM.prefetchStateType===bt.StartSessionPrefetch?(t=new Map,this.lM.getContainerStateMap().forEach(((i,e)=>{t.set(e,Object.assign(Object.assign({},i),{viewability:!0}))}))):t=this.lM.getContainerStateMap(),t}getCallSettings(){return{maxParallelCalls:rt.PARALLEL_CALLS_DEFAULT,stateSettings:{currentState:this.getCurrentAdManagerState(),predictedState:this.getPredictedAdManagerState()}}}getWinSettings(){return{desiredBitRate:rt.DEFAULT_DESIRED_BITRATE,maxParallelWins:rt.PARALLEL_WINS_DEFAULT,vastViewMode:this.currentAdPlayerState?this.currentAdPlayerState.vastViewMode:this.predictedAdPlayerState.vastViewMode,stateSettings:{currentState:this.getCurrentAdManagerState(),predictedState:this.getPredictedAdManagerState()}}}enableImpression(t){this.uM=!1,this.fM=t,this.vM||(this.vM=this.fM),this.dM=!0}disableImpression(){this.pM=!1,this.dM=!1}enablePredict(t,i){this.fM=null,this.uM=!0,this.vM=t,this.vM.prefetchStateType=i,this.dM=!0}auctionEnd(){this.pM=!0}auctionStopCalling(){this.predictMode&&(this.dM=!1)}}const io=30*ht.s_;class eo{constructor(){this.yM=null}onAdRemoved(){this.yM=null,this.bM()}pauseViaUserInteraction(){this.yM&&(this.yM.pausedWithUserInteraction=!0)}resumeViaUserInteraction(){this.yM&&(this.yM.pausedWithUserInteraction=!1,this.bM())}wM(t){this.yM={currentAd:t,isPaused:!1,pausedWithUserInteraction:!1,remainingTimeForAdToBePaused:io,lastAdPausedStartedTimestamp:void 0},this.bM()}checkPauseAd(t,i){t&&(null===this.yM&&this.wM(t),i?this.xM(t):this.SM(t))}SM(t){this._M(t)&&(this.yM.isPaused=!0,this.yM.lastAdPausedStartedTimestamp=Date.now(),t.pauseAd(),this.bM(),this.AM=setTimeout((()=>{t.stopAd("pauseOutOfView"),this.yM=null,this.bM()}),this.yM.remainingTimeForAdToBePaused))}xM(t){t.settings.adManagerLineItem.protoLineItem.pauseAdOutOfView&&t.impressionStarted&&this.yM.isPaused&&!this.yM.pausedWithUserInteraction&&(this.bM(),this.yM.isPaused=!1,this.yM.remainingTimeForAdToBePaused=this.yM.remainingTimeForAdToBePaused-(Date.now()-this.yM.lastAdPausedStartedTimestamp),t.resumeAd())}bM(){clearTimeout(this.AM),this.AM=void 0}_M(t){return t.settings.adManagerLineItem.protoLineItem.pauseAdOutOfView&&t.impressionStarted&&!this.yM.isPaused&&!this.yM.pausedWithUserInteraction}}class so{constructor(t,i,e){this.kM=t,this.lM=i,this.IM=e,this.ns=!1,this.TM=new eo,this.hf=new x.x,this.CM()}get onVpaidEvent(){return this.hf.asObservable()}get inImpression(){return this.ns}setVastViewMode(t){this.IM=t;const{width:i,height:e}=this.lM.getContainerStateMap().get(this.kM.settings.adManagerLineItem.protoLineItem.adType);this.kM.resizeAd(i,e,t)}getAdVolume(){return this.kM.getAdVolume()}setAdVolume(t,i){if(i){const{adMacroReplacer:e,adManagerState:s}=i;this.MM(t,s,e)}this.kM.setAdVolume(t)}resizeAd(){const{width:t,height:i,viewability:e}=this.lM.getContainerStateMap().get(this.kM.settings.adManagerLineItem.protoLineItem.adType);this.TM.checkPauseAd(this.kM,e),this.kM.resizeAd(t,i,this.IM)}skipAd(){this.kM.setAdVolume(0),this.kM.skipAd()}stopAd(t){this.kM.stopAd(t)}pauseAd(t){this.kM.pauseAd(),t&&this.TM.pauseViaUserInteraction()}resumeAd(t){this.kM.resumeAd(),t&&this.TM.resumeViaUserInteraction()}getMediaSize(){const t=this.kM.getAdMediaSize().width,i=this.kM.getAdMediaSize().height,{widthRatio:e,heightRatio:s}=(0,lt.dO)(t,i);return{width:t,height:i,widthRatio:e,heightRatio:s,adType:this.kM.settings.adManagerLineItem.protoLineItem.adType}}getMetadata(){return{advertiserLineItemId:this.kM.settings.adManagerLineItem.protoLineItem.advertiserLineItemId,publisherLineItemId:this.kM.settings.adManagerLineItem.protoLineItem.publisherLineItemId,adType:this.kM.settings.adManagerLineItem.protoLineItem.adType,duration:this.kM.getAdDuration(),adSkipMode:this.kM.settings.adManagerLineItem.protoLineItem.skipMode,moatTrackingEnabled:this.kM.settings.adManagerLineItem.protoLineItem.moatTrackingEnabled}}destroy(){this.ns=!1,this.TM.onAdRemoved(),this.EM.unsubscribe(),this.EM=null}CM(){this.EM=this.kM.onVpaidEvent.subscribe((t=>{t.type===g.fI.AdImpression&&this.LM(),this.hf.next(t)}))}LM(){this.ns=!0;const{viewability:t}=this.lM.getContainerStateMap().get(this.kM.settings.adManagerLineItem.protoLineItem.adType);this.TM.checkPauseAd(this.kM,t)}MM(t,i,e){const s=this.kM.getAdVolume();let n=null;0===s&&t>0?n=this.kM.settings.trackers.adUnmute:s>0&&0===t&&(n=this.kM.settings.trackers.adMute);const r=this.kM.settings.adManagerLineItem.protoLineItem;n&&Ct.track(n,e,r,i)}}class no{constructor(t){this.Wt=t,this.OM=!1,this.hf=new x.x,this.RM=new x.x,this.nf=[],this.Kr=t=>{Sr.getInstance().addPlatformCappedLineItemIdList(t,this.JI)},this.th=t=>{this.RM.next(t)},this.BM=(t,i,e)=>{const s=t.find((t=>t.protoLineItem.advertiserLineItemId===i));s&&(s.protoLineItem.viewability=e)},this.OT=()=>{this.DM.auctionEnd(),this.jM()},this.ak=()=>{var t;null===(t=this.FM)||void 0===t||t.resizeAd(),this.$M()};const i=this.Wt.adContainerMap.get(this.VM());this.UM=(0,m.LT)(i),this.Wt.app.services.TrackingService.startBidTrackingInterval(),this.NM=this.Wt.lineItemList.map((t=>new Bh(t))),this.HM(),this.zM(),this.qM(),this.WM()}get onVpaidEvent(){return this.hf.asObservable()}get onImpressionRevenueEvent(){return this.RM.asObservable()}setAdVolume(t){var i;this.DM.partialStateUpdate({sound:t});const e={adManagerState:this.DM.getCurrentAdManagerState(!0),adMacroReplacer:this.__};null===(i=this.FM)||void 0===i||i.setAdVolume(t,e)}setAdViewMode(t){var i;this.DM.partialStateUpdate({vastViewMode:t}),null===(i=this.FM)||void 0===i||i.setVastViewMode(t)}getCurrentAdMetadata(){var t;return null===(t=this.FM)||void 0===t?void 0:t.getMetadata()}getCurrentAdMediaSize(){var t;return null===(t=this.FM)||void 0===t?void 0:t.getMediaSize()}pauseAd(t){var i;null===(i=this.FM)||void 0===i||i.pauseAd(t)}resumeAd(t){var i;null===(i=this.FM)||void 0===i||i.resumeAd(t)}skipAd(){var t;null===(t=this.FM)||void 0===t||t.skipAd()}stopAd(t){var i;null===(i=this.FM)||void 0===i||i.stopAd(t)}setPlayerOrientation(t){this.DM.partialStateUpdate({playerOrientation:t}),this.$M()}enableImpressions(t){this.DM.enableImpression(t),this.lM.forceTriggerUpdateState(),this.GM.allowResetOnTime=!0,this.JM(t),this.XM()}disableImpressions(){this.DM.impressionsAllowed&&(this.YM.stop(),this.KM.stop(),this.DM.disableImpression(),this.FM&&!this.FM.inImpression&&this.Wt.app.config.isInApp&&this.FM.stopAd("inApp_disable"))}enablePredict(t,i){switch(this.DM.enablePredict(t,i),i){case bt.StartSessionPrefetch:this.GM.allowResetOnTime=!1;break;case bt.MidSessionPrefetch:this.GM.allowResetOnTime=!0}this.XM();const e=this.DM.getCallSettings();this.ZM.startPrefetch(e)}isLoadingAds(){return!!this.FM||!!this.tE.isLoadingBids()}getMainContainerState(){return this.lM.getMainContainerState()}getMainContainer(){return this.lM.getMainContainer()}destroy(){var t;this.disableImpressions(),(0,pt.i)(this.nf),this.KM.destroy(),this.tE.destroy(),this.YM.destroy(),this.iE.destroy(),this.eE(),null===(t=this.FM)||void 0===t||t.stopAd("adManagerDestroy"),this.sE()}HM(){const t=Ti.getGlobalContainer().resolve(Wi);this.iE=new Or(t),this.XI=new Cr,this.GM=new Er,this.nE=new Lr,this.YI=(new Jh).registerCallingValidators([this.GM,this.XI,this.nE]),this.P_=new Pt,this.__=new zr(this.Wt.app.services.MacrosService,this.Wt.app.services.UserManagerService)}zM(){this.rE=new Xh,this.JI=new Kh,this.lM=new Rr(this.VM(),this.Wt.adContainerMap,this.Wt.app.services.ResizeObserver,this.Wt.app.services.ViewabilityService),this.I_=new Fh({globalDomUtilsService:this.Wt.app.services.GlobalDomUtilsService,recycleAdSlots:!0}),this.DM=new to(this.lM);const t=new Wh(this.Wt.lineItemList,this.Wt.app.config.explorationMode),i=new Ch(t,this.Wt.skipPlayerSettings,this.rE,this.JI,this.XI,this.YI),e=new Eh(t),s=new Mh(t),n=Ti.getGlobalContainer().resolve(Wi);this.ZM=new Oh(n,{lineItems:this.NM,adCallingPool:this.rE,adBidPool:this.JI,impressionCapsService:this.XI,requestCapsService:this.GM,yoScoreManager:t,adCallerYo:i,adWinnerYo:e});const r=new Gh(this.Wt.app.services.TrackingService,this.JI);this.KM=new Pr({lineItemList:this.NM,adCallingPool:this.rE,adBidPool:this.JI,auctionInfoLogging:r,adCallerYo:i,adContainerMap:this.Wt.adContainerMap,amazonSlotId:this.Wt.amazonTamSlotId,app:this.Wt.app,isOutstream:this.Wt.outstream,schainSettings:this.Wt.pbjsSchainSettings,skipAdSettings:this.Wt.skipPlayerSettings,trackingService:this.Wt.app.services.TrackingService,adMacroReplacer:this.__,lineItemServices:{impressionCapsService:this.XI,lineItemServicesTimer:this.iE,requestCapsService:this.GM},adRequestGatekeeper:this.P_,adEnforcer:new Ur(this.Wt.app.config.isMobile,this.UM,this.Wt.disableScrollHijackEnforcement),pauseAdWhenFinished:this.Wt.pauseAdWhenFinished,loopAdWhenFinished:this.Wt.loopAdWhenFinished,os:this.Wt.app.config.os.os,adSlotContainerRecycler:this.I_,callingValidationAggregator:this.YI,auctionManager:this.ZM}),this.tE=new Ah({adBidPool:this.JI,adWinnerYo:e,auctionInfoLogging:r,desiredBitRateForWins:rt.DEFAULT_DESIRED_BITRATE,maxNumberOfWins:rt.MAX_WINS_DEFAULT,trackingService:this.Wt.app.services.TrackingService,impressionCapsService:this.XI,impressionCapsTimer:this.iE,adMacroReplacer:this.__,playerId:this.Wt.app.config.playerId,auctionManager:this.ZM}),this.YM=new Nr({adContainer:this.lM,adBidPool:this.JI,adImpressionerYo:s,auctionInfoLogging:r,impressionCapsService:this.XI,impressionCapsTimer:this.iE,requestCapsService:this.GM,removeBidIfHigherYoScore:rt.REMOVE_BIDS_DEFAULT,trackingService:this.Wt.app.services.TrackingService,adRequestGatekeeper:this.P_,pauseAdWhenFinished:this.Wt.pauseAdWhenFinished,loopAdWhenFinished:this.Wt.loopAdWhenFinished,adMacroReplacer:this.__,explorationMode:this.Wt.app.config.explorationMode,playerId:this.Wt.app.config.playerId,skipAdSettings:this.Wt.skipPlayerSettings})}qM(){this.nf.push(this.Wt.app.services.TrackingService.onLineItemPlatformCapped.subscribe((t=>{this.Kr(t)})),this.Wt.app.services.TrackingService.onImpressionRevenue.subscribe((t=>{this.th(t)})),this.Wt.app.services.TrackingService.onLineItemViewabilityChange.subscribe((([t,i])=>{this.BM(this.NM,t,i)})))}WM(){this.nf.push(this.ZM.onAuctionEnd.subscribe((()=>{this.OT()})),this.ZM.onAuctionStopCalling.subscribe((()=>{this.hE()})),this.lM.onContainerStateUpdate.subscribe((()=>{this.ak()})),this.YM.onAdSelected.subscribe((t=>{this.eI(t)})),this.YM.onAdFinished.subscribe((t=>{this.sI()})))}hE(){this.DM.predictMode&&this.KM.stop(),this.DM.auctionStopCalling()}eI(t){const{currentAdPlayerState:i,predictedAdPlayerState:e}=this.DM,s=(i||e).vastViewMode;this.FM=new so(t,this.lM,s),this.oE(),this.FM.setAdVolume(this.DM.currentAdPlayerState.sound),this.aE(t)}aE(t){var i;this.hf.next({type:g.fI.AdLoaded,payload:null===(i=t.settings.adLoadedPayload)||void 0===i?void 0:i.payload})}sI(){this.sE()}$M(){this.DM.adFetchingAllowed&&this.XM(),this.DM.impressionsAllowed&&this.jM()}XM(){this.OM||(this.OM=!0,this.Wt.app.services.UserManagerService.ccpaInfoLogging(this.Wt.app.config.playerId));const t=this.DM.getCallSettings();this.KM.call(t);const i=this.DM.getWinSettings();this.tE.win(i)}jM(){(this.DM.currentAdPlayerState||this.DM.predictedAdPlayerState)&&this.DM.currentAdPlayerState&&this.YM.start(this.DM.getCurrentAdManagerState())}oE(){this.cE=this.FM.onVpaidEvent.subscribe((t=>{t.type===g.fI.AdImpression&&this.FM.setAdVolume(this.DM.currentAdPlayerState.sound),this.hf.next(t)}))}sE(){var t;null===(t=this.FM)||void 0===t||t.destroy(),this.FM=null,this.eE()}eE(){var t;null===(t=this.cE)||void 0===t||t.unsubscribe(),this.cE=null}JM(t){const i=[this.XI,this.GM];t.newContent&&i.forEach((t=>{t.resetCapsBasedOnExternalEvent(s.ProtoResetCapTypeEnum.ContentCapping)}))}}class ro extends no{constructor(t){super(t);const i=this.lM.getMainContainer();this.I_.preloadImaSdkSlots(i)}enableImpressions(t){super.enableImpressions(t);const i=this.DM.getCallSettings();this.ZM.startAuction(i,t.linearAdOpportunity.id)}disableImpressions(){this.DM.impressionsAllowed&&(this.ZM.cancelAuction(),super.disableImpressions())}XM(){const t=this.DM.getCallSettings();this.ZM.updateState(t),super.XM()}VM(){return s.ProtoAdType.Video}}class ho extends no{VM(){return s.ProtoAdType.Nonlinear}enableImpressions(t){super.enableImpressions(t),this.OT()}}const oo={[s.ProtoAdSlotsEnum.PreRoll]:s.ProtoAdBreakTypeEnum.PreRoll,[s.ProtoAdSlotsEnum.MidRoll]:s.ProtoAdBreakTypeEnum.MidRoll,[s.ProtoAdSlotsEnum.PostRoll]:s.ProtoAdBreakTypeEnum.PostRoll};var ao,co;!function(t){t.remainTimeForAdPod=(t,i)=>!(i<=0)&&!(Math.round(i/ht.s_)>t.remainingAdDuration)}(ao||(ao={})),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}})}(co||(co={}));class lo{constructor(t,i){this.lE=t,this.uE=i,this.dE=new x.x,this.nf=[],this.fE=!1;const e=Ti.getGlobalContainer().resolve(Wi);this.yx=new zs(e),this.vE(),this.VS(),this.gE()}get onAdLifeEnding(){return this.dE.asObservable()}isDurationExpired(){return this.fE}destroy(){this.yx.disable(),this.nf.forEach((t=>t.unsubscribe()))}vE(){this.nf.push(this.yx.onTimeElapsed.subscribe((()=>{this.yx.stop(),this.fE=!0,this.dE.next()})))}VS(){this.nf.push(this.lE.subscribe((t=>{switch(t.type){case g.fI.AdImpression:this.mE(t.payload.adSourceData.length);break;case g.fI.AdPlaying:this.gE();break;case g.fI.AdPaused:this.Ss();break;case g.fI.AdStopped:case g.fI.AdSkipped:case g.fI.AdError:this.yE();break;case g.fI.AdVideoFirstQuartile:this.bE()}})))}Ss(){this.yx.stop()}gE(){this.yx.start()}mE(t){if(this.wE=Date.now(),t){this.xE=t*ht.s_;const i=this.xE-this.uE;this.SE(i),this.yx.start()}}yE(){this.yx.stop(),this.fE=!1}bE(){if(this.xE)return;const t=Date.now()-this.wE;this.xE=4*t;const i=this.xE-t-this.uE;this.SE(i)}SE(t){const i=t<0?0:t;this.yx.reset(i)}}class uo{constructor(t,i){this.Nx=t,this._E=new x.x,this.AE=bt.NoPrefetch,this.PE=i===s.ProtoAdPlaybackMode.ScrollToPlay}get prefetchType(){return this.AE}get startSessionPrefetch(){return this.PE}set startSessionPrefetch(t){this.PE=t}get onMidSessionPrefetchReady(){return this._E.asObservable()}enablePrefetch(t,i,e){this.PE=!1,this.AE=t,null==e||e.enablePredict(i,t)}disablePrefetch(){this.AE=bt.NoPrefetch}tryPreparingMidSessionPrefetch(t,i){if(!this.IE(t))return;const e=null==t?void 0:t.disableReason;e===yt.TimeoutBetweenAds&&this._E.next(bt.MidSessionPrefetch),e===yt.InImpression&&this.TE(t,i)&&this._E.next(bt.MidSessionPrefetch)}IE(t){return this.AE===bt.NoPrefetch&&null!==t}TE(t,i){return i&&t.adBreakLength<=rt.MID_SESSION_PREFETCH_MINIMUM_TIME&&!this.Nx}}class po{constructor(t,i){this.Wt={[ct.LINEAR]:{enable:!1,disablePayload:null,usePrefetch:!0},[ct.NONLINEAR]:{enable:!1,disablePayload:null,usePrefetch:!1}},this._E=new x.x,this.nf=[],this.CE(t,i)}get onMidSessionPrefetchReady(){return this._E.asObservable()}getAllLinearityKeys(){return Object.keys(this.Wt)}enable(t){this.Wt[t].enable=!0,this.Wt[t].disablePayload=null}disable(t,i){this.Wt[t].enable=!1,this.Wt[t].disablePayload=i}getDisablePayload(t){return this.Wt[t].disablePayload}setAdManager(t,i){this.Wt[t].adManager=i,this.Wt[t].usePrefetch&&(this.Wt[t].adLifecycleObserver=new lo(i.onVpaidEvent,rt.MID_SESSION_PREFETCH_MINIMUM_TIME),this.nf.push(this.Wt[t].adLifecycleObserver.onAdLifeEnding.subscribe((()=>{const i=this.getDisablePayload(t),e=this.Wt[t].adLifecycleObserver.isDurationExpired();this.Wt[t].adPrefetch.tryPreparingMidSessionPrefetch(i,e)}))))}isAdManagerEnable(t){return this.Wt[t].enable}getAllAdManagers(){return this.getAllLinearityKeys().map((t=>this.Wt[t].adManager))}getAllAvailableAdManagers(){return this.getAllAdManagers().filter((t=>(0,P.$K)(t)))}getAdManagerByLinearity(t){return this.Wt[t].adManager}usePrefetch(t){return this.Wt[t].usePrefetch}enablePrefetch(t,i,e,s){this.usePrefetch(t)&&this.Wt[t].adPrefetch.enablePrefetch(i,e,s)}startSessionPrefetch(t,i){this.Wt[t].adPrefetch.startSessionPrefetch=i}disablePrefetch(t){this.usePrefetch(t)&&this.Wt[t].adPrefetch.disablePrefetch()}getPrefetchType(t){if(this.usePrefetch(t))return this.Wt[t].adPrefetch.prefetchType}hasStartSessionPrefetch(t){return!!this.usePrefetch(t)&&this.Wt[t].adPrefetch.startSessionPrefetch}tryPreparingMidSessionPrefetch(t,i){var e;if(!this.usePrefetch(t))return;const s=(null===(e=this.Wt[t].adLifecycleObserver)||void 0===e?void 0:e.isDurationExpired())||!1;this.Wt[t].adPrefetch.tryPreparingMidSessionPrefetch(i,s)}destroy(){(0,pt.i)(this.nf),this.getAllAvailableAdManagers().forEach((t=>t.destroy()))}CE(t,i){this.getAllLinearityKeys().forEach((e=>{this.Wt[e].usePrefetch&&(this.Wt[e].adPrefetch=new uo(t,i),this.ME(e))}))}ME(t){const i=this.Wt[t].adPrefetch;this.nf.push(i.onMidSessionPrefetchReady.subscribe((i=>{this._E.next({prefetchType:i,linearity:ct[t]})})))}}class fo{constructor(t,i,e){this.Re=t,this.ef=i,this.tf=e,this.nf=[],this.rf=new x.x,this.EE=new x.x,this.LE=new x.x,this.df=new x.x,this.OE=new x.x,this.uf=new x.x,this.vf=new x.x,this.A_=new Map,this.RE={[ct.LINEAR]:t=>{const i=new ro(t);this.Wt.setAdManager(ct.LINEAR,i)},[ct.NONLINEAR]:t=>{const i=new ho(t);this.Wt.setAdManager(ct.NONLINEAR,i)}},this.jE={mediaMetadata:{},clickToPlay:!1,linearAdOpportunity:new St,newContent:!1,sound:0,vastViewMode:g.zc.Normal,adBreakState:this.tf.getAdBreakState(),playerOrientation:this.ef},this.Wt=new po(this.Re.loopAdWhenFinished,this.Re.adPlaybackMode)}get onAdsEnable(){return this.rf.asObservable()}get onLinearVpaidEvent(){return this.EE.asObservable()}get onNonlinearVpaidEvent(){return this.LE.asObservable()}get onLinearImpressionRevenue(){return this.df.asObservable()}get onNonlinearImpressionRevenue(){return this.OE.asObservable()}get onLinearImpressionPrice(){return this.uf.asObservable()}get onNonlinearImpressionPrice(){return this.vf.asObservable()}getCurrentAdBreakType(){return this.jE.adBreakState.adBreakType}initAd(t,i,e,s,n,r,h){this.FE(r),this.Ef(h),this.Wt.getAllLinearityKeys().forEach((t=>{this.$E(ct[t],{sound:n})}))}getAdContainerSize(t){const i=this.A_.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.Wt.getAdManagerByLinearity(t))||void 0===i?void 0:i.getMainContainerState().width}getCurrentAdMetadata(t){var i;return null===(i=this.Wt.getAdManagerByLinearity(t))||void 0===i?void 0:i.getCurrentAdMetadata()}getCurrentAdMediaSize(t){var i;return null===(i=this.Wt.getAdManagerByLinearity(t))||void 0===i?void 0:i.getCurrentAdMediaSize()}isAdInWin(t){const i=this.Wt.getAdManagerByLinearity(t);return(null==i?void 0:i.isLoadingAds())||!1}enableAds(t){this.Wt.enable(t),this.$E(t),this.rf.next(t)}disableAds(t,i){this.Wt.disable(t,i);const e=this.Wt.getAdManagerByLinearity(t);e&&(e.disableImpressions(),this.Wt.usePrefetch(t)&&this.Wt.tryPreparingMidSessionPrefetch(t,i))}setAdVolume(t,i){var e;null===(e=this.Wt.getAdManagerByLinearity(t))||void 0===e||e.setAdVolume(i),this.$E(t,{sound:i})}pauseAd(t,i){var e;null===(e=this.Wt.getAdManagerByLinearity(t))||void 0===e||e.pauseAd(i)}resumeAd(t,i){var e;null===(e=this.Wt.getAdManagerByLinearity(t))||void 0===e||e.resumeAd(i)}skipAd(t){var i;null===(i=this.Wt.getAdManagerByLinearity(t))||void 0===i||i.skipAd()}stopAd(t,i){var e;null===(e=this.Wt.getAdManagerByLinearity(t))||void 0===e||e.stopAd(i)}onAdStateChange(t,i,e){const s=oo[i];this.VE(t,e,s)}onContentChange(){this.Wt.getAllLinearityKeys().forEach((t=>{this.$E(ct[t],{newContent:!0})}))}setMediaRestrictions(t){const i=Object.assign(this.jE.mediaMetadata,t);this.Wt.getAllLinearityKeys().forEach((t=>{const e=ct[t];if(this.$E(e,{mediaMetadata:i}),this.Wt.usePrefetch(e)&&this.Wt.hasStartSessionPrefetch(e)){const t=this.Wt.getAdManagerByLinearity(e);this.UE(e,bt.StartSessionPrefetch,t)}}))}userInteraction(t){this.Wt.getAllLinearityKeys().forEach((t=>{this.$E(ct[t],{clickToPlay:!0})}))}setPlayerOrientation(t){this.jE.playerOrientation=t,this.Wt.getAllAvailableAdManagers().forEach((i=>i.setPlayerOrientation(t)))}setVastViewMode(t){this.NE({vastViewMode:t})}newLinearAdOpportunity(){const t=ct.LINEAR;this.Wt.usePrefetch(t)&&(this.Wt.getPrefetchType(t)===bt.NoPrefetch&&(this.jE.linearAdOpportunity=new St),this.$E(t,{linearAdOpportunity:this.jE.linearAdOpportunity}),this.Wt.disablePrefetch(t))}updateLinearPodRemainingTime(t){const i=this.jE.adBreakState;ao.remainTimeForAdPod(i,t)&&this.VE(ct.LINEAR,t,i.adBreakType)}destroy(){try{(0,pt.i)(this.nf),this.Wt.destroy()}catch(t){(0,i.n)({message:"AdManagerBridge_destroy",level:i.D.WARN,exception:t.message,callStack:t.stack})}}FE(t){t.forEach((t=>{this.A_.set(t.type,t.container)}))}VE(t,i,e){this.$E(t,{adBreakState:this.tf.getAdBreakState({adSlotDuration:i,adBreakType:e})})}$E(t,i){this.NE(i);const e=this.Wt.getAdManagerByLinearity(t);if(e&&this.Wt.isAdManagerEnable(t)){if(this.Wt.usePrefetch(t)){const i=!1;this.Wt.startSessionPrefetch(t,i)}e.enableImpressions(this.jE),this.HE()}}NE(t){Object.assign(this.jE,t),this.jE.adBreakState=this.tf.getAdBreakState({adSlotDuration:this.jE.adBreakState.remainingAdDuration,adBreakType:this.jE.adBreakState.adBreakType})}HE(){this.NE({clickToPlay:!1,newContent:!1})}UE(t,i,e){this.jE.linearAdOpportunity=new St,this.Wt.enablePrefetch(t,i,this.jE,e)}Ef(t){const i=_n(this.Re.adSourceSettings.lineItems,ct.NONLINEAR),e=_n(this.Re.adSourceSettings.lineItems,ct.LINEAR);(0,a.BZ)(i)&&this.zE(ct.NONLINEAR,i,t),(0,a.BZ)(e)&&this.zE(ct.LINEAR,e,t),this.qE(),this.WE()}zE(t,i,e){const s={lineItemList:i,adBreakHelper:this.tf,adContainerMap:this.A_,amazonTamSlotId:this.Re.amazonTamSlotId,outstream:this.Re.outstreamPlayer,pbjsSchainSettings:this.Re.prebidJsSupplyChain,skipPlayerSettings:this.Re.skipPlayerSettings,disableScrollHijackEnforcement:!this.Re.adSourceSettings.disableScrollHijackEnforcement,pauseAdWhenFinished:this.Re.pauseAdWhenFinished,loopAdWhenFinished:this.Re.loopAdWhenFinished,app:e};(0,this.RE[t])(s),this.nf.push(this.Wt.onMidSessionPrefetchReady.subscribe((i=>{const{linearity:e,prefetchType:s}=i,n=this.Wt.getAdManagerByLinearity(e);this.UE(t,s,n)})))}qE(){const t={[ct.LINEAR]:this.EE,[ct.NONLINEAR]:this.LE};Object.keys(t).forEach((i=>{const e=ct[i];this.GE(e,t[e])}))}GE(t,i){const e=this.Wt.getAdManagerByLinearity(t);e&&this.nf.push(e.onVpaidEvent.subscribe((e=>{var s,n;switch(e.type){case g.fI.AdLoaded:i.next({type:g.fI.AdLoaded,payload:co.adLoadedPayload(e)});break;case g.fI.AdImpression:{const r=null===(n=null===(s=this.Wt.getAdManagerByLinearity(t))||void 0===s?void 0:s.getCurrentAdMetadata())||void 0===n?void 0:n.adType,h=this.A_.get(r);i.next({type:g.fI.AdImpression,payload:co.impressionPayload(e,h)});break}case g.fI.AdVideoStart:case g.fI.AdError:i.next(e);break;default:i.next({type:e.type,payload:co.defaultPayload(e)})}})))}WE(){const t=this.Wt.getAdManagerByLinearity(ct.LINEAR),i=this.Wt.getAdManagerByLinearity(ct.NONLINEAR);t&&this.nf.push(t.onImpressionRevenueEvent.subscribe((t=>{this.df.next(t),this.uf.next(t.impressionRevenue)}))),i&&this.nf.push(i.onImpressionRevenueEvent.subscribe((t=>{this.OE.next(t),this.vf.next(t.impressionRevenue)})))}}const vo="cnx-in-ps-portrait",go="cnx-in-ps-landscape",mo="cnx-playspace-container",yo="cnx-playspace-content",bo="cnx-playspace-footer",wo="cnx-playspace-slider",xo="cnx-playspace-slide-container",So="cnx-ui-click-to-play-overlay",_o="cnx-ui-ps-image-wrapper",Ao="cnx-ui-ps-image-background",Po="cnx-is-media-logo",ko="cnx-ad-video-size-slot",Io="cnx-top-title",To="cnx-top-title-logo-container",Co="cnx-top-title-logo",Mo="cnx-top-title-logo-portrait",Eo="cnx-top-title-logo-landscape",Lo="cnx-top-title-logo-animation",Oo="cnx-top-title-text-container",Ro="cnx-top-title-story-text",Bo="cnx-top-title-slide-text",Do="cnx-top-title-highlight-text-placeholder",jo="cnx-top-title-highlight-text",Fo="cnx-top-title-highlight-text-outer-container",$o="cnx-top-title-highlight-text-inner-container",Vo="cnx-top-title-slide-in",Uo="cnx-top-title-slide-out",No="cnx-top-title-slide-down",Ho="cnx-top-title-slide-initial";class zo{constructor(t){this.context=t}onClick(){}canTransitionToState(t){return!0}enterState(){this.initState(),this.context.currentState=this}}class qo extends zo{initState(){this.context.$uiContainer.classList.add(c.s_.Playing);const t=this.context.getComponent(xe.PlayButton);t&&t.setState(Ze.Pause);const i=this.context.getComponent(xe.BigPlayButton);i&&i.setState(Ze.Pause)}exitState(){this.context.$uiContainer.classList.remove(c.s_.Playing)}}class Wo extends qo{constructor(){super(...arguments),this.JE=100}QE(){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(xe.ProgressBar);i&&i.setProgress((0,lt.dQ)(0,this.context.duration,0,100,this.context.elapsedTime)),this.elapsedTimeoutId=null,this.QE()}),this.JE)}initState(){super.initState(),this.context.duration&&this.QE()}exitState(){super.exitState(),this.context.duration&&(clearTimeout(this.elapsedTimeoutId),this.elapsedTimeoutId=null)}}class Go extends zo{initState(){this.context.$uiContainer.classList.add(c.s_.Paused);const t=this.context.getComponent(xe.PlayButton);t&&t.setState(Ze.Play);const i=this.context.getComponent(xe.BigPlayButton);i&&i.setState(Ze.Play)}exitState(){this.context.$uiContainer.classList.remove(c.s_.Paused)}}class Jo extends Go{initState(){super.initState()}exitState(){super.exitState()}}class Qo{constructor(t,i){this.XE=t,this.Sr=i,this.YE=[],this.KE={top:12,bottom:24,margin:4},this.ZE=!1}tL(){this.Om=this.Sr.getElementCoordinates(this.XE.parentElement)}iL(t,i){t.getElementsByClassName("cnx-tooltip-text")[0].innerHTML=i}eL(t){if(!t||!t.tooltip||this.ZE)return;if(this.YE.find((i=>i.component===t)))return;const i=this.Sr.createElementByString('<cnx class="cnx-tooltip-holder cnx-color-tt-bg"><cnx class="cnx-tooltip-text cnx-color-tt-text">TEST</cnx></cnx>');this.iL(i,t.tooltip),this.tL();const e=t.getCoordinates();let s=!1;const{clientY:n,height:r}=e,{clientY:h,height:o}=this.Sr.getElementCoordinates(this.XE);n<=h+o/2-r?e.clientY+=this.KE.top:(e.clientY-=this.KE.bottom,s=!0),this.XE.appendChild(i),ve(i,e,this.Om,{alignMiddle:!0,alignTop:s,forceRight:!0,distanceFromMargin:this.KE.margin}),(0,m.Tp)(i),(0,m.cn)(i,c.hQ.OpacityInTransition),this.YE.push({component:t,domElement:i})}sL(t){if(!t.tooltip)return;const i=this.YE.find((i=>i.component===t));if(!i)return;const e=i.domElement;this.XE.removeChild(e),this.YE=this.YE.filter((i=>i.component!==t))}nL(t){if(!t.tooltip)return;const i=this.YE.find((t=>t.component===this.rL));i&&this.iL(i.domElement,t.tooltip)}hL(){this.rL=null,this.YE.forEach((t=>this.sL(t.component)))}setDistanceValues(t){this.KE=Object.assign(Object.assign({},this.KE),t)}hoverStart(t){this.rL=t,this.eL(t)}hoverEnd(t){this.rL=null,this.sL(t)}stateChanged(t){this.rL===t&&this.nL(t)}disableTooltips(){this.ZE=!0,this.hL()}enableTooltips(){this.ZE=!1,this.eL(this.rL)}}class Xo extends Vs{constructor(t,i,e,s,n){super(t,i,e,s,n),this.oL=new Qo(this.$uiContainer,e)}handleComponentEvent(t,i,e){let s=e;switch(i.payload&&i.payload.targetComponent&&(s=i.payload.targetComponent),t){case w[w.HoverStart]:this.oL.hoverStart(s);break;case w[w.HoverEnd]:this.oL.hoverEnd(s);break;case w[w.StateChanged]:this.oL.stateChanged(s)}}updateDuration(t,i){if(!(0,m.pv)(this.$uiContainer,c.s6.ShowControls))return;const e=this.getComponent(xe.ElapsedTimeLabel),s=this.getComponent(xe.TotalDurationLabel),n=this.getComponent(xe.ProgressBar);if(e&&e.setTime(t),s&&s.setTime(i),n){const e=0,s=i,r=0,h=100;n.setProgress((0,lt.dQ)(e,s,r,h,t))}}updateVolume(t){}expand(){this.getComponent(xe.ExpandButton).setState(ns.expand)}collapse(){this.getComponent(xe.ExpandButton).setState(ns.collapse)}}class Yo extends Xo{constructor(t,i,e,s,n,r,h={},o){super(t,n,i,r,o||new Fs(i,s,n,h)),this.mediator=t,this.globalDomUtilsService=i,this.au=e,this.$container=n,this.settings=h,this.Iw={[z.PlayingState]:new Wo(this),[z.PausedState]:new Jo(this)},this.aL=0,this._n=null,this.lL=t=>{(0,m.og)(this.$uiContainer,c.s6.UiInView,t)},this.oL.setDistanceValues({top:4,bottom:4}),this.Iw[z.PausedState].enterState(),this.uL=this.$container.querySelector(`.${$s.CardImage}`),this.dL=this.$container.querySelector(`.${$s.CardTitle}`),this.pL=this.$container.querySelector(`.${$s.AdMarkerTitleText}`),this.fL=this.$container.querySelector(`.${$s.AdUiContent}`)}handleComponentEvent(t,i,e){switch(super.handleComponentEvent(t,i,e),t){case w[w.Volume]:this.mediator.publish(this,w[w.Volume],i);break;case w[w.Mute]:this.mediator.publish(this,w[w.Mute]);break;case w[w.Unmute]:this.mediator.publish(this,w[w.Unmute]);break;case xe[xe.CloseButton]:this.mediator.publish(this,w[w.Close]);break;case w[w.Expand]:this.mediator.publish(this,w[w.Expand]);break;case w[w.Collapse]:this.mediator.publish(this,w[w.Collapse]);break;default:this.mediator.publish(this,t,i)}}updateDuration(t){const i=this.getComponent(xe.ProgressBar),e=this.getComponent(xe.TotalDurationLabel),s=this.getComponent(xe.SkipAdButton);!t&&s&&(s.setSecondsUntilSkip(0),s.tickDown(0)),t||!i?(this.elapsedTime=0,this.duration=t,i&&i.setProgress((0,lt.dQ)(0,t,0,100,0)),e&&e.setTime(t),this.vL(this.aL)):i.setProgress(100)}updateVolume(t){const i=this.getComponent(xe.VolumeControls),e=this.getComponent(xe.VolumeButton);i&&i.setVolume(t),e&&e.setVolume(t)}get elapsedTime(){return this.aL}set elapsedTime(t){this.aL=t,this.vL(this.aL)}showSkipAdButton(t){const i=this.getComponent(xe.SkipAdButton);i&&(i.showComponent(),i.setSecondsUntilSkip(t))}hideSkipAdButton(){const t=this.getComponent(xe.SkipAdButton);t&&t.hideComponent()}addPodAdMarker(t,i){(0,m.cn)(this.$uiContainer,$s.InPod);(0,a.Sz)(this.$uiContainer.getElementsByClassName($s.AdMarkerInPodTextContainer)).forEach((e=>{e.innerHTML=`${t+1}/${i}`}))}removeAddPodAdMarker(){(0,m.IV)(this.$uiContainer,$s.InPod)}addDurationAdMarker(){(0,m.cn)(this.$uiContainer,$s.AdDurationLabel)}removeDurationAdMarker(){(0,m.IV)(this.$uiContainer,$s.AdDurationLabel)}vL(t){const i=this.getComponent(xe.ElapsedTimeLabel);i&&i.setTime(t);const e=this.getComponent(xe.SkipAdButton);e&&e.tickDown(t);const s=this.getComponent(xe.RemainingDurationLabel);if(s&&this.duration){const i=this.duration-t;i>=0&&s.setTime(i)}}hideAdLoadingScreen(){const t=this.getComponent(xe.AdLoadingScreen);t&&t.hideComponent(),(0,m.IV)(this.$container,c.s6.PodLoadingScreen)}showAdLoadingScreen(t,i,e,s){const n=this.getComponent(xe.AdLoadingScreen);n&&(n.showComponent(),n.setBackgroundImg(t),n.setClickUrl(i),n.setFallbackText(e,s),(0,m.cn)(this.$container,c.s6.PodLoadingScreen))}hideAdMarker(){const t=this.$container.querySelector(".cnx-ad-marker");(0,m.MV)(t)}hideProgressBar(){this.getComponent(xe.ProgressBar).hideComponent()}setContinueReadingCard(t){this.uL.style.backgroundImage=`url("${t.imageSrc}")`,this.dL.innerText=t.title}addAdMarkerTitle(t){this.pL.innerHTML=t}cardHasData(){return(0,P.QM)(this.uL.style.backgroundImage)&&(0,P.QM)(this.dL.innerHTML)}showContinueReadingCard(t){(0,m.cn)(this.$container,c.s6.AdShowCard),null===this._n&&(this._n=this.globalDomUtilsService.requestAnimationFrameHelper((()=>{this._n=null,(0,m.T7)(t,{height:`${this.fL.clientHeight}px`})})))}hideContinueReadingCard(t){(0,m.IV)(this.$container,c.s6.AdShowCard),(0,m.aQ)(t,"height")}showAdMarkerTitle(){(0,m.cn)(this.$uiContainer,$s.AdTitleLabel)}hideAdMarkerTitle(){(0,m.IV)(this.$uiContainer,$s.AdTitleLabel)}show(){super.show(),this.au.on(this.$uiContainer,this.lL,{threshold:.5})}hide(){super.hide();(0,m.og)(this.$uiContainer,c.s6.UiInView,!1),this.au.off(this.$uiContainer,this.lL)}expand(){this.getComponent(xe.ExpandButton).setState(ns.expand)}collapse(){this.getComponent(xe.ExpandButton).setState(ns.collapse)}}var Ko=n(3204);class Zo{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">${Ko}</cnx>\n <cnx class="cnx-ad-marker-text">1/1</cnx>\n </cnx>\n <cnx class="cnx-ad-marker-duration">[[${xe.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">[[${xe.CloseButton}]]</cnx>\n <cnx class="cnx-ad-buttons">\n <cnx class="cnx-ad-play-button cnx-ui-btn">[[${xe.PlayButton}]]</cnx>\n <cnx class="cnx-ad-volume-controls">[[${xe.VolumeControls}]]</cnx>\n <cnx class="cnx-ad-volume-button cnx-ui-btn">[[${xe.VolumeButton}]]</cnx>\n </cnx>\n [[${xe.SkipAdButton}]]\n ${this.getExpandTemplate()}\n <cnx class="cnx-ad-progress-bar">[[${xe.ProgressBar}]]</cnx>\n </cnx>\n <cnx class="cnx-ad-card">\n <svg class="${$s.CardImage}" viewBox="0 0 16 9" />\n <cnx class="cnx-ad-card-text">\n <cnx>Continue watching</cnx>\n <cnx class="${$s.CardTitle}"></cnx>\n <cnx>after the ad</cnx>\n </cnx>\n </cnx>\n [[${xe.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">[[${xe.ExpandButton}]]</cnx>`:""}}class ta{static getScaledImageUrl(t,i,e,s,n){if(t&&!(0,lt.ON)({width:i,height:e}))return(0,P.r)(n)&&(i=(0,lt.Tc)(i,n),e=(0,lt.Tc)(e,n)),s.appendParamsToUrl(`${t}${ta.getScaledImageQueryParams(i,e)}`.trim())}static getScaledImageQueryParams(t,i){return(0,lt.ON)({width:t,height:i})?"":`?width=${t}&height=${i}&fit=bounds`}static getSmartCroppedImageUrl(t,i,e,s){return(0,P.QM)(t)||(t=on.n.endPoints.base.image),(0,lt.ON)({width:i,height:e})&&(i=140,e=80),s.appendParamsToUrl(`${t}${ta.getSmartCroppedImageQueryParams(i,e)}`)}static getSmartCroppedImageQueryParams(t,i){return(0,lt.ON)({width:t,height:i})?"":`?crop=${t}:${i},smart&width=${t}&height=${i}&format=jpeg&quality=60&fit=crop`}}class ia extends h._{constructor(t,i,e,s,n,r,h,o,a){super(),this.mediator=t,this.Re=i,this.Yp=e,this.Zp=s,this.tf=n,this.if=r,this.qu=h,this.ef=o,this.yf=a,this.gL=[],this.mL=!1,this.yL=!1,this.ns=!1,this.bL=0,this.wL=!0,this.xL=!1,this.SL=!1,this.nf=[],this.af=new x.x,this.hf=new x.x,this._L=new x.x,this.AL=new x.x,this.PL=new x.x}kL(){let t;this.nf.push(this.yf.onLinearVpaidEvent.subscribe((i=>{switch(t=!1,i.type){case g.fI.AdLoaded:this.xL=this.IL(i.payload),this.xL&&(i.payload.payload.adLoadedData.skipOffset=this.Re.skipAdAfter);break;case g.fI.AdPaused:this.TL.changeState(z.PausedState);break;case g.fI.AdPlaying:this.TL.changeState(z.PlayingState);break;case g.fI.AdImpression:this.CL(i.payload);break;case g.fI.AdSkipped:this.EL(s.ProtoAdClickTypeEnum.AdSkipClick),this.LL(),t=!0;break;case g.fI.AdStopped:case g.fI.AdError:if(this.OL())return;this.LL(),t=!0;break;case g.fI.AdClickThru:this.EL(s.ProtoAdClickTypeEnum.AdClickThrough)}this.wL&&(this.hf.next(i),this.RL(i)),this.wL=!0,t&&(this.ns=!1,this.TL.changeState(z.PausedState))}))),this.subscribe(w[w.Volume],this.TL,(({payload:t})=>{this.setVolume(t),this.EL(s.ProtoAdClickTypeEnum.VolumeClick)})),this.subscribe(w[w.Play],this.TL,(()=>{this.EL(s.ProtoAdClickTypeEnum.PlayClick),this.play()})),this.subscribe(w[w.Pause],this.TL,(()=>{this.EL(s.ProtoAdClickTypeEnum.PauseClick),this.pause()})),this.subscribe(w[w.Expand],this.TL,(()=>{this.EL(s.ProtoAdClickTypeEnum.FullScreenClick),this.PL.next(w.Expand)})),this.subscribe(w[w.Collapse],this.TL,(()=>{this.EL(s.ProtoAdClickTypeEnum.ExitFullScreenClick),this.PL.next(w.Collapse)})),this.subscribe(w[w.Close],this.TL,(()=>{this.AL.next({type:o.Uh.UserInteraction,payload:{playback:!1}}),this._L.next({type:w.Close})})),this.subscribe(w[w.Mute],this.TL,(()=>{this.setVolume(0),this.EL(s.ProtoAdClickTypeEnum.MuteClick)})),this.subscribe(w[w.Unmute],this.TL,(()=>{this.setVolume(1),this.EL(s.ProtoAdClickTypeEnum.UnmuteClick)})),this.subscribe(w[w.SkipAd],this.TL,(()=>this.BL()))}RL(t){switch(t.type){case g.fI.AdPaused:this.af.next({type:_.PauseLinearEvent});break;case g.fI.AdPlaying:this.af.next({type:_.ResumeLinearEvent});break;case g.fI.AdImpression:this.af.next({type:_.ShowLinearEvent,payload:t.payload});break;case g.fI.AdSkipped:this.af.next({type:_.SkipLinearEvent});break;case g.fI.AdStopped:this.af.next({type:_.HideLinearEvent});break;case g.fI.AdError:this.inImpression&&this.af.next({type:_.HideLinearEvent})}}CL(t){var i;this.DL(),this.updateContinueReadingCard(),t.payload.adDuration=null===(i=this.yf.getCurrentAdMetadata(ct.LINEAR))||void 0===i?void 0:i.duration,t.payload.adDuration||this.mL||this.show(),this.mL=!0,this.ns=!0,this.xL&&this.jL(),t.payload.adDuration?this.TL.addDurationAdMarker():this.TL.removeDurationAdMarker(),this.TL.updateDuration(t.payload.adDuration),this.TL.changeState(z.PlayingState),this.FL=t.payload.clickThroughUrl,this.$L(t.payload.selectedAdSlot),this.tf.getTotalNumberOfSlots()>1?this.TL.addPodAdMarker(this.tf.getCurrentSlotIndex(),this.tf.getTotalNumberOfSlots()):this.TL.removeAddPodAdMarker()}VL(t=!1){const i=(e=this.Re,s=this.if.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.TL=new Yo(this,this.if.services.GlobalDomUtilsService,this.if.services.ViewabilityService,this.if.services.InteractionService,this.Yp,new Zo(t).template,i),this.TL.hide()}UL(){this.lM=this.NL(),this.HL(this.lM),this.gL.push(this.lM)}NL(t=""){return this.if.services.GlobalDomUtilsService.createElementByString(`<div class= "cnx-ad-container cnx-full-height ${t}"></div>`)}HL(t){this.Yp.appendChild(t)}jL(){this.TL.showSkipAdButton(this.Re.skipAdAfter)}EL(t){var i;const e=null===(i=this.yf)||void 0===i?void 0:i.getCurrentAdMetadata(ct.LINEAR);if(!e)return;const{advertiserLineItemId:s,publisherLineItemId:n}=e,r=this.yf.getCurrentAdBreakType();this.if.services.TrackingService.trackAdClick({advertiserLineItemId:s,publisherLineItemId:n,adBreakType:r,type:t})}IL(t){var i;if(t.payload.adLoadedData.skipOffset&&t.payload.adLoadedData.skipOffset>=0)return!1;const e=null===(i=this.yf)||void 0===i?void 0:i.getCurrentAdMetadata(ct.LINEAR);return!!e&&nt(e.duration,this.Re)}$L(t){this.gL.filter((i=>i!==t)).forEach((t=>{(0,m.cn)(t,c.Gj.Hide)}))}LL(){this.gL.forEach((t=>{(0,m.IV)(t,c.Gj.Hide)}))}zL(){this.SL=!1,this.TL.hideAdLoadingScreen()}DL(){this.TL.hideSkipAdButton()}start(t,e=!1){try{this.VL(e),this.UL(),this.setVolume(t),this.kL()}catch(t){(0,i.n)({callStack:t.stack,level:i.D.CRITICAL,exception:t.message,message:"linearAdhandler_start"})}}getVolume(){return this.bL}hide(){(0,m.IV)(this.Yp,c.s6.Ad,c.s6.AdOverlayType),this.TL.hide()}show(){var t,i;const e=[c.s6.Ad],n=null===(i=null===(t=this.yf)||void 0===t?void 0:t.getCurrentAdMetadata(ct.LINEAR))||void 0===i?void 0:i.adType;n===s.ProtoAdType.Overlay&&e.push(c.s6.AdOverlayType),this.qL=n,(0,m.cn)(this.Yp,...e),this.TL.show(),this.TL.updateVolume(this.bL),this.zL()}setVolume(t){this.bL=t,this.yf.setAdVolume(ct.LINEAR,t),this.TL&&this.TL.updateVolume(t),this.AL.next({type:o.Uh.UserInteraction,payload:{volume:!0}}),this._L.next({type:w.Volume,payload:{volume:t}})}resizeAd(t,i){this.inImpression&&(this.updateContinueReadingCard(),this.updateShowAdMarkerTitle())}adStateChange(t,i){this.yf.onAdStateChange(ct.LINEAR,t,i)}getMainAdContainerWidth(){return this.yf.getMainAdContainerWidth(ct.LINEAR)}resumeWithoutUserInteraction(){this.inImpression&&this.yf.resumeAd(ct.LINEAR,!1)}play(){if(!this.inImpression)return;this.yf.resumeAd(ct.LINEAR,!0),this.AL.next({type:o.Uh.UserInteraction,payload:{playback:!0}})}WL(t){if((0,In.Ph)("cnxShowAdCard",this.if.config.pageUrl))return!0;let i=!1;if(t.adType===s.ProtoAdType.Video){const e=this.Yp.clientWidth*(t.heightRatio/t.widthRatio);i=this.Yp.clientHeight-e>=76}return t.adType===s.ProtoAdType.Overlay&&(i=this.Yp.clientHeight-t.height>=76),i}updateContinueReadingCard(){const t=this.yf.getCurrentAdMediaSize(ct.LINEAR);(0,P.$K)(t)&&(this.WL(t)?this.TL.showContinueReadingCard(this.lM):this.TL.hideContinueReadingCard(this.lM))}updateShowAdMarkerTitle(){this.yL&&this.Yp.clientWidth>=320?this.TL.showAdMarkerTitle():this.TL.hideAdMarkerTitle()}setContinueReadingCard(t){this.TL.setContinueReadingCard({imageSrc:ta.getSmartCroppedImageUrl(t.imageSrc,270,150,this.qu),title:t.title})}hideContinueReadingCard(){this.TL.hideContinueReadingCard(this.lM)}setAdMarkerTitle(t){this.TL.addAdMarkerTitle(t),this.yL=!0,this.Yp.clientWidth>=320&&this.TL.showAdMarkerTitle()}hideAdMarkerTitle(){this.TL.hideAdMarkerTitle()}pause(){if(!this.inImpression)return;this.yf.pauseAd(ct.LINEAR,!0),this.AL.next({type:o.Uh.UserInteraction,payload:{playback:!1}})}stopAd(t){if(!this.inImpression)return;const i=()=>{this.hf.next({type:g.fI.AdStopped,payload:{payload:{adType:s.ProtoAdType.Video}}}),this.af.next({type:_.HideLinearEvent}),this.wL=!1};this.yf?(i(),this.yf.stopAd(ct.LINEAR,t)):this.inAdPodLoadingState&&i()}BL(){this.yf&&this.inImpression?this.yf.skipAd(ct.LINEAR):this.SL&&(this.hf.next({type:g.fI.AdSkipped}),this.zL())}enterAdPodLoadingState(){this.SL=!0;const{width:t,height:i}=this.yf.getAdContainerSize(this.qL);this.TL.showAdLoadingScreen(ta.getSmartCroppedImageUrl(this.GL,t,i,this.qu),this.FL,this.tf.getNextSlotIndex(),this.tf.getTotalNumberOfSlots())}setAdLoadingBackgroundUrl(t){this.GL=t}destroy(){var t;this.TL&&this.unsubscribeAll(this.TL),(0,pt.i)(this.nf),null===(t=this.TL)||void 0===t||t.destroy()}get onVpaidEvent(){return this.hf.asObservable()}get onUiComponentEvent(){return this._L.asObservable()}get onExperienceEvent(){return this.AL.asObservable()}get onLinearEvent(){return this.af.asObservable()}get adUserInterface(){return this.TL}get adContainer(){return this.lM}get secondaryAdContainer(){return this.Lf}get firstAdShown(){return this.mL}get inImpression(){return this.ns}get adInWin(){return this.yf.isAdInWin(ct.LINEAR)}get inAdPodLoadingState(){return this.SL}get onFullcreenChange(){return this.PL.asObservable()}}class ea extends ia{constructor(t,i,e,s,n,r,h,o,a){super(t,i,e,s,n,r,h,o,a)}JL(){this.Lf=this.NL(ko),this.HL(this.Lf),this.gL.push(this.Lf)}UL(){super.UL(),this.JL()}$L(t){super.$L(t),t===this.Lf&&(0,m.cn)(this.Yp,c.s6.AdFullSize)}BL(){super.BL(),this.yf.userInteraction(!0)}OL(){return!1}updateContinueReadingCard(){const t=this.yf.getCurrentAdMediaSize(ct.LINEAR);(0,P.$K)(t)&&(this.WL(t)?this.TL.showContinueReadingCard(this.lM):this.TL.hideContinueReadingCard(this.lM))}}class sa extends xt{bf(){const t={adSourceSettings:this.Re.lineItemSettings,outstreamPlayer:!1,pauseAdWhenFinished:this.Re.pauseAdWhenFinished,loopAdWhenFinished:this.Re.loopAdWhenFinished,skipPlayerSettings:{skipAdAfter:this.Re.skipAdAfter,skipMin:this.Re.skipMin,skippability:this.Re.skippability},adPlaybackMode:this.Re.adPlaybackMode,amazonTamSlotId:this.Re.amazonTamSlotId,prebidJsSupplyChain:this.Re.supplyChainSettings};return new fo(t,this.ef,this.tf)}Tf(t,i){return[{container:this.Cf,width:this.Cf.offsetWidth,height:this.Cf.offsetHeight,type:s.ProtoAdType.Overlay},{container:this.Lf,width:this.Lf.offsetWidth,height:this.Lf.offsetHeight,type:s.ProtoAdType.Video}]}Sf(){return new ea(this,this.Re,this.Yp,this.Zp,this.tf,this.if,this.qu,this.ef,this.yf)}kf(){}}const na={ProgressBarItemClicked:"progressBarItemClicked",CallToAction:"callToAction",CloseButtonClicked:"closeButtonClicked",GeneralClickInteraction:"generalClickInteraction"},ra={ChangeSlide:"changeSlide",ContentStart:"contentStart",ContentComplete:"contentComplete",LayoutChanged:"layoutChanged"},ha=Object.assign(Object.assign({},o.dP),{ContentHandlerReady:"contentHandlerReady",NewStory:"newStory",ContentStart:"ContentStart",ContentEnd:"ContentEnd"}),oa="slideTransitionStart",aa="slideChanged",ca="slideTransitionEnd",la="slideTimeUpdate",ua="slideCycleEnd",da=Object.assign(Object.assign({},ra),na);class pa{constructor(t,i=0){this.QL=t,this.setCurrentSlide(i)}XL(t=this.QL.indexOf(this.YL)){return st(this.QL,t)}get currentSlide(){return this.YL}getCurrentThumbnailUrlParams(t,i){return this.YL.media.getThumbnailUrlParams(t,i)}getCurrentMetadata(){return this.YL.metadata}setCurrentSlide(t){this.YL=this.QL[t]}get currentSlideIndex(){return this.XL().currentIndex}get nextSlideIndex(){return this.XL().nextIndex}get prevSlideIndex(){return this.XL().prevIndex}get firstSlideIndex(){return this.XL().firstIndex}get lastSlideIndex(){return this.XL().lastIndex}get slides(){return this.QL}get nextSlide(){return this.slides[this.nextSlideIndex]}get prevSlide(){return this.slides[this.prevSlideIndex]}getAdjacentSlides(t=this.XL().currentIndex){const i=[];for(let e=0,s=t,n=t;e<2;e++)s=this.XL(s).nextIndex,n=this.XL(n).prevIndex,i.push(this.QL[n],this.QL[s]);return(0,a.gX)(i)}}var fa;!function(t){t[t.Right=0]="Right",t[t.Left=1]="Left"}(fa||(fa={}));class va extends h._{constructor(t,i){super(),this.mediator=t,this.ZL=i,this.inTransition=!1,this.tO=0,this.iO=null,this.eO=!1,this.sO=400,this.nO=!0,this.rO=()=>{clearTimeout(this.iO),this.iO=null,this.eO=!1,this.hO(),this.tO=this.oO(this.aO),this.mediator.publish(this,ca),this.cO()},this.lO=t=>{t.stopPropagation();t.target.parentElement===this.ZL&&this.uO()&&(this.iO=setTimeout((()=>{this.eO&&this.pO()}),this.sO))},this.fO=t=>{t.stopPropagation();t.target.parentElement===this.ZL&&this.inTransition&&this.eO&&this.uO()&&this.pO()},this.vO=(0,a.Sz)(this.ZL.childNodes),this.ZL.addEventListener("transitionstart",this.lO),this.ZL.addEventListener("transitionend",this.fO)}destroy(){clearTimeout(this.iO),this.iO=null,this.ZL.removeEventListener("transitionend",this.fO),this.ZL.removeEventListener("transitionstart",this.lO)}setCurrentSlide(t,i,e=!0){this.aO=t,this.nO||(e=!1),e&&!this.gO(this.aO)&&this.mO()&&this.nO?this.inTransition||(this.tO<this.oO(this.aO)?this.yO(i):this.yO(fa.Left)):this.bO()}offsetSlides(t,i){this.inTransition||((0,m.cn)(i,c.PK.NextSlide),this.hO(),this.wO(t))}removeNextClass(t){t.forEach((t=>{(0,m.IV)(t,c.PK.NextSlide)}))}cleanLastSlide(t,i){(0,m.aQ)(t,"transform"),(0,m.IV)(i,c.PK.NextSlide)}setAnimationAllowed(t){this.nO=t}wO(t){(0,m.T7)(this.xO(),{transform:`translate(${t}px)`})}bO(){(0,m.IV)(this.xO(),c.PK.CurrentSlide,c.PK.SlideLeft,c.PK.SlideRight),this.SO(this.oO(this.aO)),(0,m.cn)(this.aO,c.PK.CurrentSlide),this.rO()}yO(t){this.SO(this.oO(this.aO)),this._O(),(0,m.cn)(this.aO,c.PK.NextSlide),t===fa.Right?((0,m.cn)(this.aO,c.PK.CurrentSlide),(0,m.cn)(this.xO(),c.PK.SlideLeft)):t===fa.Left&&((0,m.cn)(this.aO,c.PK.CurrentSlide),(0,m.cn)(this.xO(),c.PK.SlideRight)),(0,m.aQ)(this.xO(),"transform")}gO(t){return t===this.xO()}cO(){this.mediator.publish(this,aa)}SO(t){this.eO=!0,this.mediator.publish(this,oa,{payload:{nextIndex:t}})}mO(){return(0,P.$K)(this.xO())}oO(t){return(0,m.oG)(t,this.ZL)}xO(){return this.vO[this.tO]}_O(){this.AO(),this.PO()}hO(){this.kO(),this.IO()}IO(){(0,m.cn)(this.ZL,c.Gj.NoTransition)}AO(){(0,m.IV)(this.ZL,c.Gj.NoTransition)}kO(){this.inTransition=!1}PO(){this.inTransition=!0}TO(){(0,m.IV)(this.xO(),c.PK.CurrentSlide,c.PK.SlideLeft,c.PK.SlideRight),(0,m.L_)(this.aO,c.PK.NextSlide,c.PK.CurrentSlide)}pO(){this.TO(),this.rO()}uO(){return(0,m.pv)(this.xO(),c.PK.SlideLeft)||(0,m.pv)(this.xO(),c.PK.SlideRight)}}class ga extends h._{constructor(t,i,e,s,n,r){super(),this.mediator=t,this.Cw=i,this.CO=e,this.MO=s,this.EO=n,this.LO=r,this.OO=!1,this.RO=[],this.BO=!1,this.DO=()=>{this.goToNextSlide()},this.jO=()=>{this.mediator.publish(this,la,{payload:{elapsedTime:this.yx.timeElapsed,duration:this.FO.currentSlide.media.duration}})},this.$O=this.Cw.createElementByString(`<cnx class="${wo}"></cnx>`),this.MO.appendChild(this.$O),this.VO()}UO(){this.CO.on((t=>{this.BO=t,this.NO.setAnimationAllowed(t)}))}HO(t=fa.Right){this.NO.setCurrentSlide(this.FO.currentSlide.$container,t)}zO(){let t;this.FO.currentSlide.load(),t=this.LO?[...this.FO.slides]:[...this.FO.getAdjacentSlides()],t.forEach((t=>t.load()))}qO(){this.NO=new va(this,this.$O),this.subscribe(oa,this.NO,(({payload:{nextIndex:t}})=>{this.BO&&this.yx.disable(),this.mediator.publish(this,oa,{payload:{nextSlide:this.FO.slides[t]}})})),this.subscribe(aa,this.NO,(()=>{this.yx.reset(this.FO.currentSlide.media.duration),this.FO.slides.forEach((t=>t.media.reset()));const t={payload:{index:this.FO.currentSlideIndex}};this.mediator.publish(this,aa,t),this.OO?this.FO.currentSlide.media.play():this.pause()})),this.subscribe(ca,this.NO,(()=>{this.mediator.publish(this,ca)}))}VO(){const t=Ti.getGlobalContainer().resolve(Wi);this.yx=new zs(t,0,100),this.yx.onTimeElapsed.subscribe(this.DO),this.yx.onTimeUpdate.subscribe(this.jO)}WO(t){this.RO=t;const i=this.GO(t),e=t.map((t=>{const e=this.EO.getSlide(t,this,i);return this.subscribe(na.CallToAction,e,(()=>{this.mediator.publish(this,na.CallToAction)})),this.relay(na.GeneralClickInteraction,e,this,this.mediator),this.subscribe(w[w.Next],e,(()=>{this.mediator.publish(this,w[w.Next])})),e}));this.FO=new pa(e),this.yx.reset(this.FO.currentSlide.media.duration),this.$O.innerHTML="",this.FO.slides.forEach((t=>{(0,m.jG)(t.$container,this.$O),this.relay(Z,t.media,this,this.mediator)}))}GO(t){const i=t.map((t=>t.slideDuration)).reduce(((t,i)=>t+i),0);return(0,P.r)(i)?Math.ceil(i/ht.Y0):1}JO(){const t=this.FO.getAdjacentSlides().map((t=>t.$container));this.NO.removeNextClass(t)}XO(t){return(t>0?this.FO.prevSlide:this.FO.nextSlide).$container}getNextSlide(){return this.FO.nextSlide}setCurrentSlide(t,i){this.NO.inTransition||(this.FO.currentSlide&&this.FO.currentSlide.media.pause(),this.FO.setCurrentSlide(t),this.zO(),this.HO(i))}getCurrentSlide(){if(this.FO)return this.FO.currentSlide}getCurrentThumbnailUrlParams(t,i){if(this.FO)return this.FO.getCurrentThumbnailUrlParams(t,i)}getCurrentMetadata(){if(this.FO)return this.FO.getCurrentMetadata()}goToNextSlide(){if(this.FO.currentSlideIndex===this.FO.lastSlideIndex)return this.NO.cleanLastSlide(this.getCurrentSlide().$container,this.getNextSlide().$container),void this.mediator.publish(this,ua);this.setCurrentSlide(this.FO.nextSlideIndex,fa.Right)}goToPrevSlide(){this.setCurrentSlide(this.FO.prevSlideIndex,fa.Left)}resetSlider(){this.setCurrentSlide(this.FO.firstSlideIndex)}setVolume(t){this.FO&&this.FO.slides.forEach((i=>{i.media.type===s.ProtoMediaTypeEnum.Video&&(i.media.volume=t)}))}play(){this.OO=!0,this.yx.start(),this.FO.currentSlide.media.play()}pause(){this.OO=!1,this.yx.stop(),this.FO.currentSlide.media.pause()}stop(){this.FO.setCurrentSlide(this.FO.firstSlideIndex),this.zO(),this.pause(),this.NO.setCurrentSlide(this.FO.currentSlide.$container,null,!1)}get remainingTime(){return this.yx.timeRemaining}setQuality(t){this.FO.slides.forEach((i=>{if(i.media.type===s.ProtoMediaTypeEnum.Video){const e={height:i.media.getClosestSourceQuality(t.height).videoHeight,quality:t.quality};i.media.setQuality(e)}}))}getQuality(){const{currentSlide:t}=this.FO;if(t.media.type===s.ProtoMediaTypeEnum.Image)return;const{getClosestSourceQuality:i,currentQuality:e}=t.media;return i(e.height).videoHeight}start(t){try{this.WO(t),this.qO(),this.UO()}catch(t){(0,i.n)({message:"SlidesManager_start",exception:t.message,callStack:t.stack,level:i.D.CRITICAL})}}offsetSlides(t){if(this.JO(),0===t)return;const i=this.XO(t);this.NO.offsetSlides(t,i)}destroy(){this.yx.disable(),this.NO&&this.NO.destroy()}get isPlaying(){return this.OO}onPlayerContainerResize(){(0,P.$K)(this.FO)&&(0,a.BZ)(this.FO.slides)&&this.FO.slides.forEach((t=>t.media.onSlideResizeCallback()))}get slides(){return(0,P.$K)(this.FO)&&(0,a.BZ)(this.FO.slides)?this.FO.slides:[]}get currentSlideIndex(){return(0,P.$K)(this.FO)?this.FO.currentSlideIndex:0}updateCapabilityMetadata(t,i){if(!(0,P.$K)(this.FO)||!(0,a.BZ)(this.FO.slides))return;const e=this.FO.slides[t];e&&e.updateCapabilityMetadata(i)}get slidesMetadata(){return this.RO}}var ma=n(5648);class ya{constructor(t){this.YO=t}get template(){return`\n <cnx class="cnx-ui cnx-ui-ps">\n <cnx class="cnx-ui-click-to-play-overlay"></cnx>\n <cnx class="${yo}">\n [[${xe.ClickToPlayButton}]]\n <cnx class="cnx-ui-ratio-container">\n <cnx class="cnx-ui-ps-head">\n <cnx class="cnx-ui-ps-nav">\n ${this.KO()}\n </cnx>\n <cnx class="cnx-ui-ps-subhead cnx-ui-ps-side-mg">\n <cnx class="cnx-ui-ps-branding">\n [[${xe.TopTitle}]]\n </cnx>\n <cnx class="cnx-ui-ps-btns">\n <cnx class="cnx-ui-btn ${c.s6.ContextController}">[[${xe.MoreButton}]]</cnx>\n <cnx class="cnx-ui-btn cnx-close-button">[[${xe.CloseButton}]]</cnx>\n </cnx>\n </cnx>\n </cnx>\n <cnx class="cnx-ui-ps-controls--wrapper cnx-ui-ps-side-mg">\n <cnx class="cnx-ui-ps-controls">\n <cnx class="cnx-ui-btn cnx-ui-ps-nav-btn">[[${xe.PreviousButton}]]</cnx>\n <cnx class="cnx-ui-btn">[[${xe.PlayButton}]]</cnx>\n <cnx class="cnx-ui-btn cnx-ui-ps-nav-btn">[[${xe.UpNextButton}]]</cnx>\n <cnx class="cnx-ui-btn">[[${xe.VolumeButton}]]</cnx>\n </cnx>\n </cnx>\n <cnx class="cnx-ui-ps-footer cnx-ui-ps-side-mg"></cnx>\n [[${xe.PlayspaceSettingsMenu}]]\n </cnx>\n </cnx>\n <cnx class="${bo}">\n <cnx class="cnx-ui-ps-content cnx-ui-ps-side-mg">\n ${this.ZO()}\n </cnx>\n </cnx>\n [[${xe.Loader}]]\n </cnx>\n `.trim()}KO(){return this.YO.disableStoryProgressBarRendering?"":`[[${xe.PlayspaceProgressBar}]]`}ZO(){return this.YO.disableTitleRendering?"":`[[${xe.SlideTitle}]]`}}class ba extends Be{constructor(){super(...arguments),this.tR=100,this.eventList=[fe.Z[fe.Z.Scroll]],this.isEndState=!1,this.iR=()=>{this.mediator.publish(this,na.ProgressBarItemClicked,{payload:this.Am})},this.eR=t=>{t.stopPropagation()}}sR(){const t=this.Sr.getComputedTranslateX(this.ky),i=this.xy;return(0,lt.dQ)(0,i,0,100,t)}nR(t){(0,m.T7)(this.ky,{transition:`transform ${t}ms linear`})}rR(){(0,m.T7)(this.ky,{transition:"none"})}startProgress(t){this.nR(t),this.setProgress(this.tR)}pauseProgress(){this.setProgress(this.sR()),this.rR()}forceEndState(){this.rR(),super.forceEndState(),this.isEndState=!0}forceStartState(){this.rR(),super.forceStartState(),this.isEndState=!1}initComponent(){super.initComponent();const t={click:this.iR,interactionstart:this.eR};this._m.register(this.Am,this,this._m,t),this.Qt&&(this.subscribe(fe.Z[fe.Z.Click],this._m,(()=>{this.iR()})),this.relay(fe.Z[fe.Z.Scroll],this._m,this,this.mediator))}destroy(){super.destroy()}onResize(t,i){this.setProgress(this.sR()),this.rR(),i&&(this.setProgress(this.tR),this.nR(t))}}class wa extends ge{constructor(){super(...arguments),this.eventList=[na.ProgressBarItemClicked,fe.Z[fe.Z.Scroll]],this.QL=[],this.hR=({payload:t})=>{const i=(0,m.oG)(t,this.Am);this.mediator.publish(this,na.ProgressBarItemClicked,{payload:i})}}oR(t){const i=this.QL[t];i.forceStartState(),i.startProgress(this.ma)}startProgress(){if((0,P.$K)(this.tO)){for(let t=0;t<this.QL.length;t++)t<this.tO?this.QL[t].forceEndState():(t!==this.tO||this.QL[t].isEndState)&&this.QL[t].forceStartState();this.QL[this.tO].startProgress(this.ma)}}pauseProgress(){this.QL[this.tO]&&this.QL[this.tO].pauseProgress()}resetProgress(){(0,P.$K)(this.tO)&&this.QL.forEach((t=>t.forceStartState()))}setSlides(t){if(!t)throw new Error("PlayspaceProgressBar: no slides provided");for(let i=0;i<t;i++){const t=new ba(this,this.Sr,this._m,'<cnx class="cnx-progress-bar"><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-hitarea"></cnx></cnx>',this.Qt);this.subscribe(na.ProgressBarItemClicked,t,this.hR),this.relay(fe.Z[fe.Z.Scroll],t,this,this.mediator),this.QL.push(t),t.initComponent(),this.Am.appendChild(t.getContainer())}}setDuration(t){this.ma=t}setCurrentIndex(t){t===this.tO&&this.oR(t),this.tO=t}initComponent(){}destroy(){super.destroy(),this.QL.forEach((t=>t.destroy()))}resizeProgressBar(t,i){this.QL.forEach(((e,s)=>{s<this.tO&&e.forceEndState(),s===this.tO&&e.onResize(t,i)}))}}class xa extends Ge{constructor(t,i,e,s,n){super(t,i,e,s,{event:w[w.Quality],name:n,icon:Ie,options:[]}),this.mediator=t,this.fb={height:360,quality:H.Auto},this.vb=!0}handleItemsEvents(t){if(t===w[w.Quality])return;this.vb=t===H[H.Auto];const i={height:this.vb?this.fb.height:parseInt(t,10),quality:this.vb?H.Auto:H.Strict};this.mediator.publish(this,this.event,{payload:i})}aR(){let t=null;if(this.vb)t=H[H.Auto];else{const i=this.cR.find((t=>t.event===this.fb.height.toString()));i&&(t=i.name)}t&&this.changeLabel(t)}updateQuality(t,i=!1){(0,a.BZ)(this.gb)&&(this.vb=t.quality===H.Auto,this.fb.quality=t.quality,this.fb.height=(0,lt.DE)(t.height,this.gb.map((t=>t.videoHeight))),this.aR(),hs(this.cR,this.fb,this.vb),this.isActive=i)}updateAvailableQualities(t){this.cR=[],this.gb=t,this.cR=this.gb.map((t=>new be(this,this.Sr,this._m,this.Qt,{name:`${t.videoHeight}p`,activeEvent:t.videoHeight.toString(),label:t.isHD?"HD":void 0}))),this.cR.push(new be(this,this.Sr,this._m,this.Qt,{name:H[H.Auto],activeEvent:H[H.Auto]})),this.aR(),hs(this.cR,this.fb,this.vb),this.buildContextMenu(this.cR)}}var Sa=n(3409),_a=n(9479);const Aa="About Connatix",Pa="Video Settings",ka="Full Screen";class Ia extends me{constructor(t,i,e,s,n,r,h,o){super(t,i,e,s,n,r,h,o),this.alignMiddle=!1,this.alignTop=!1,this.forceRight=!1}initComponent(){this.lR=new be(this,this.Sr,this._m,this.Qt,{activeEvent:w[w.Expand],eventList:[w[w.Expand],w[w.Collapse]],icon:Sa,name:ka}),this.uR=new xa(this,this.Sr,this._m,this.Qt,Pa),this.buildContextMenu([this.uR,this.lR,new be(this,this.Sr,this._m,this.Qt,{activeEvent:w[w.AboutClick],name:Aa,icon:Ue,label:Ne.g.version?`V${Ne.g.version}`:"dev"})])}setExpand(){this.lR.event=w[w.Collapse],this.lR.changeItemIcon(_a)}setCollapse(){this.lR.event=w[w.Expand],this.lR.changeItemIcon(Sa)}showExpandButton(){this.lR.showComponent()}hideExpandButton(){this.lR.hideComponent()}updateQualityMenu(t){(0,a.BZ)(t)?(this.uR.updateAvailableQualities(t),this.uR.showComponent()):this.uR.hideComponent()}updateQuality(t,i=!1){this.uR.updateQuality(t,i)}}var Ta,Ca;!function(t){t[t.VolumeControls=0]="VolumeControls",t[t.PlaybackControls=1]="PlaybackControls",t[t.PlaylistControls=2]="PlaylistControls",t[t.CtaButton=3]="CtaButton",t[t.SlideTitle=4]="SlideTitle",t[t.TopLogo=5]="TopLogo",t[t.TopStoryTitle=6]="TopStoryTitle",t[t.TopSlideTitle=7]="TopSlideTitle",t[t.TextLabel=8]="TextLabel"}(Ta||(Ta={})),function(t){t[t.Default=0]="Default",t[t.Description=1]="Description",t[t.Quote=2]="Quote",t[t.Bullet=3]="Bullet",t[t.Cover=4]="Cover",t[t.Instagram=5]="Instagram"}(Ca||(Ca={}));const Ma="cnx-cta-btn-timer-label",Ea="cnx-svg-circle-stroke",La="cnx-cta-btn-text",Oa="cnx-cta-btn-content",Ra="cnx-cta-align-with-content";class Ba extends ye{constructor(t,i,e,s,n,r,h){super(t,i,e,n.template,r),this.Er=s,this.dR=n,this.pR=h,this.eventList=[na.CallToAction,fe.Z[fe.Z.Scroll]],this.fR=!1,this.vR=!1,this.gR=!1,this.Cr=()=>{this.mR()},this.zw=()=>{const t=Math.round(this.yx.timeRemaining/ht.s_);this.yR(t.toString())},this.bR=this.Am.querySelector(".cnx-ui-ps-cta")}startProgress(){this.fR=!0,this.yx&&(this.yx.start(),this.zw())}pauseProgress(){this.fR=!1,this.yx&&(this.yx.stop(),this.zw())}changeLabel(t){(0,P.QM)(t)&&(this.wy.innerHTML=t.substring(0,16))}initComponent(){super.initComponent(),this.wy=this.Am.querySelector(`.${La}`),this.Xy=this.Am.querySelector(`.${Oa}`)}onSlideTimeUpdate(){}onSlideTransitionEnd(){}onSlideTransitionStart(t){if(!(0,a.BZ)(t))return;const i=t.find((({type:t})=>t===Ta.CtaButton));if(!i||!i.metadata)return;const{url:e,label:s,duration:n,ctaAlignToContent:r,ctaAlignToFooter:h,title:o}=i.metadata;this.vR=h,this.wR(e,o),this.changeLabel(s);const c=(0,P.r)(n);this.xR(c),this.SR(c,n),this._R(r),this.AR()}setFooterElement(t){this.PR=t,this.AR()}handleCapabilities(t){this.onSlideTransitionStart(t)}hideComponent(){super.hideComponent(),this.kR()}_R(t){t?(0,m.cn)(this.bR,Ra):(0,m.IV)(this.bR,Ra)}onClickHandler(){const t={payload:null};(0,P.QM)(this.La)&&(t.payload=this.La),this.mediator.publish(this,na.CallToAction,t)}AR(){this.gR||this.PR&&this.vR&&(this.Er.on(this.PR,this.Cr),this.gR=!0)}mR(){if(!this.PR)return void(0,m.aQ)(this.Am,"bottom");const t=(this.PR.clientHeight-this.Am.clientHeight)/2*-1;(0,m.T7)(this.Am,{bottom:`${t}px`})}xR(t){t?this.IR||this.TR():this.MR()}TR(){this.IR=this.Sr.createElementByString(this.dR.getTimerTemplate()),(0,m.Vt)(this.Xy,this.IR),this.ER(this.IR)}ER(t){this.LR=t.querySelector(`.${Ma}`),this.OR=t.querySelector(`.${Ea}`)}MR(){(0,m.bX)(this.IR),this.IR=null,this.LR=null,this.OR=null}SR(t,i){t?(this.RR(),this.yx.reset(i*ht.s_),this.yR(i.toString()),this.fR&&this.yx.start(),this.BR(),(0,m.T7)(this.OR,{"animation-duration":`${i}s`})):this.kR()}RR(){if(this.yx)return;const t=Ti.getGlobalContainer().resolve(Wi);this.yx=new zs(t),this.DR=this.yx.onTimeUpdate.subscribe(this.zw)}kR(){this.yx&&(this.DR.unsubscribe(),this.yx.disable(),this.yx=null)}BR(){(0,m.L_)(this.OR,Ea,Ea,!0)}yR(t){this.LR&&(0,P.QM)(t)&&(this.LR.innerText=t)}wR(t,i){if(this.La=t,t&&(this.bR.title=i,!this.pR)){this.bR.href=t;const i=this.Sr.isURLSameDomainToTop(t);this.bR.target=i?ue.bS.Top:ue.bS.Blank,this.bR.rel="nofollow"}}}var Da=n(3475),ja=n(889),Fa=n(4368);class $a{get template(){return`\n <cnx class="cnx-ui-ps-cta-placeholder">\n <a class="cnx-ui-ps-cta">\n <cnx class="cnx-cta-btn cnx-color-accent">\n <cnx class="cnx-cta-btn-container">\n <cnx class="cnx-cta-btn-content">\n <cnx-span class="cnx-cta-btn-instagram">\n ${ja}\n </cnx-span>\n <cnx-span class="cnx-cta-btn-text">\n READ MORE\n </cnx-span>\n <cnx-span class="cnx-cta-btn-arrow">\n ${Fa}\n </cnx-span>\n </cnx>\n </cnx>\n </cnx>\n </a>\n </cnx>\n `.trim()}getTimerTemplate(){return`\n <cnx class="cnx-cta-btn-timer-container">\n <cnx class="cnx-cta-btn-timer-loader-wrapper">\n ${Da}\n ${Da}\n </cnx>\n <cnx class="cnx-cta-btn-timer-label-wrapper">\n <cnx class="${Ma}">\n </cnx>\n </cnx>\n </cnx>\n `.trim()}}class Va extends ye{constructor(){super(...arguments),this.eventList=[w[w.Play]]}onClickHandler(){this.mediator.publish(this,w[w.Play])}}var Ua;!function(t){t[t.TopLogo=0]="TopLogo",t[t.TopSlideTitle=1]="TopSlideTitle",t[t.TopStoryTitle=2]="TopStoryTitle"}(Ua||(Ua={}));const Na={[Ta.TopLogo]:Ua.TopLogo,[Ta.TopSlideTitle]:Ua.TopSlideTitle,[Ta.TopStoryTitle]:Ua.TopStoryTitle},Ha={[Ua.TopLogo]:Ta.TopLogo,[Ua.TopSlideTitle]:Ta.TopSlideTitle,[Ua.TopStoryTitle]:Ta.TopStoryTitle},za=[Ua.TopLogo,Ua.TopStoryTitle,Ua.TopSlideTitle];class qa extends Ps{constructor(t,i,e,s){super(t,i,e,s),this.eventList=[w[w.LogoClicked],fe.Z[fe.Z.Scroll]],this.jR=[],this.FR={},this.$R=this.Am.querySelector(`.${Oo}`)}triggerLogoAnimation(){const t=this.getComponent(xe.TopLogo);t&&t.triggerLogoAnimation()}onSlideTransitionStart(t){const i=this.VR(t);this.FR=Object.assign({},i),this.NR(t)}onSlideTransitionEnd(){}onSlideTimeUpdate(t,i){}handleComponentEvent(t,i,e){this.mediator.publish(this,t,i)}HR(t){return t.map((({type:t})=>Na[t])).filter((t=>(0,P.$K)(t)))}VR(t){return t.reduce(((t,{type:i,metadata:e})=>{switch(i){case Ha[Ua.TopStoryTitle]:if(!e.label&&!e.useFallbackLabel)return t;const i=e.label||"Top Articles";return Object.assign(Object.assign({},t),{[Ua[Ua.TopStoryTitle]]:this.zR(i,e.useTransition)});case Ha[Ua.TopSlideTitle]:return Object.assign(Object.assign({},t),{[Ua[Ua.TopSlideTitle]]:this.zR(e.label,e.useTransition)});case Ha[Ua.TopLogo]:return Object.assign(Object.assign({},t),{[Ua[Ua.TopLogo]]:Object.assign({},e)});default:return t}}),{})}zR(t,i=!1){return{useTransition:i,label:this.qR(t)}}qR(t){if(t)return t.length>36?`${t.substring(0,36)}...`:t}NR(t,i=!1){const e=this.HR(t),s=(0,a.V7)(za,e),n=(0,a.V7)(e,this.jR),r=(0,a.tN)(e,this.jR);this.jR=e,this.GR(e),(0,m.Tp)(this.$R),s.forEach((t=>this.JR(t,i))),n.forEach((t=>this.QR(t,i))),r.forEach((t=>this.XR(t,i)))}GR(t){switch(!0){case this.YR(t):this.KR();break;case this.ZR(t):this.tB();break;default:this.iB()}}YR(t){return t.includes(Ua.TopSlideTitle)&&t.includes(Ua.TopStoryTitle)}ZR(t){const i=t.includes(Ua.TopSlideTitle)&&!t.includes(Ua.TopStoryTitle),e=!t.includes(Ua.TopSlideTitle)&&t.includes(Ua.TopStoryTitle);return i||e}KR(){(0,m.IV)(this.$R,No),(0,m.cn)(this.$R,Ho)}tB(){(0,m.IV)(this.$R,Ho),(0,m.cn)(this.$R,No)}iB(){(0,m.IV)(this.$R,Ho,No)}JR(t,i=!1){const e=this.eB(t);if(!e)return;const s=this.sB(t);i&&(s.useTransition=!1),e.hide(s)}QR(t,i=!1){const e=this.eB(t);if(!e)return;const s=this.sB(t);i&&(s.useTransition=!1),e.show(s)}XR(t,i=!1){const e=this.eB(t);if(!e)return;const s=this.sB(t);i&&(s.useTransition=!1),e.update(s)}eB(t){return this.getComponent(xe[Ua[t]])}sB(t){return this.FR[Ua[t]]||{}}}var Wa,Ga,Ja;!function(t){t.Wrapper="cnx-ui-ps__wrapper",t.Container="cnx-ui-ps__container",t.Placeholder="cnx-ui-ps__placeholder",t.Text="cnx-ui__span--text",t.Label="cnx-ui__span--label",t.Title="cnx-ui__span--title",t.VerticalLine="cnx-ui-ps__vertical-line",t.Instagram="cnx-ui-ps__slide--instagram",t.Cover="cnx-ui-ps__slide--cover",t.HighlightInner="cnx-top-title-highlight-text-inner-container",t.HighlightText="cnx-ui-ps-highlight-text"}(Wa||(Wa={})),function(t){t.Default="cnx-ui-ps__sliding--default",t.Basic="cnx-ui-ps__sliding--basic",t.Cover="cnx-ui-ps__sliding--cover",t.SlideIn="cnx-title-slide-in",t.SlideOut="cnx-title-slide-out"}(Ga||(Ga={})),function(t){t.Cover="cnx-ui-ps__title--cover",t.Quote="cnx-ui-ps__title--quote",t.Bullet="cnx-ui-ps__title--bullet",t.Default="cnx-ui-ps__title--default",t.Description="cnx-ui-ps__title--description",t.Instagram="cnx-ui-ps__title--instagram"}(Ja||(Ja={}));const Qa="em";class Xa{constructor(t,i=0,e=true){if(this.nB=t,this.rB=e,!(0,a.BZ)(this.nB))throw new Error("PlaylistManager: list was not supplied");this.setCurrentItem(i)}setCurrentItem(t){this.hB=this.nB[t]}get currentItem(){return this.hB}goToNextItem(){this.XL().nextIndex===this.XL().firstIndex&&this.rB?this.setCurrentItem(this.XL().firstIndex):this.setCurrentItem(this.XL().nextIndex)}get listLength(){return this.nB.length}get previousItem(){return this.nB[this.XL().prevIndex]}get currentItemIndex(){return this.XL().currentIndex}XL(t=this.nB.indexOf(this.hB)){return st(this.nB,t)}}class Ya{constructor(t){this.oB=t}getChunks(t){return(0,Xe.k0)(t)?this.aB(t):this.cB(t)}cB(t){const i=[];let e="";for(let s=0;s<t.length;s++)e+=t[s],this.lB(t[s])&&(i.push(e),e="");return e.length>0&&i.push(e),i}aB(t){try{const i=document.createElement("cnx");i.innerHTML=t;const e=[];return(0,a.Sz)(i.childNodes).forEach((t=>{t.outerHTML?e.push(t.outerHTML):e.push(...this.cB(t.nodeValue))})),e}catch(e){return(0,i.n)({message:"TextChunker_splitHtmlStringIntoWords",exception:e.message,level:i.D.INFO,callStack:e.stack},{throttle:1,sendMaxLog:!1}),[t]}}lB(t){return this.oB.some((i=>i(t)))}}const Ka="cnx-aux",Za="cnx-aux-container";class tc{constructor(t){this.Sr=t,this.uB=new Ya([t=>/\s/.test(t)])}dB(t,e){const{maxLineWidth:s,maxLines:n,minLines:r}=e,h=[...t],o=[],a=t.map((t=>t.innerHTML)).some((t=>(0,Xe.Ft)(t)));if(!h.length||!(0,P.r)(s))return o;let c=0,l=-1,u=0;for(;h.length>0;){if(c=0,l++,o[l]=[],u++,u>=250){(0,i.n)({message:"Split text base line wrap infinite loop",level:i.D.INFO},{throttle:1,sendMaxLog:!1});break}for(;h[0]&&c+h[0].width<=s;)if(c+=h[0].width,o[l].push(h.shift()),u++,u>=250){(0,i.n)({message:"Split text base line wrap infinite loop",level:i.D.INFO},{throttle:1,sendMaxLog:!1});break}if(h[0]&&o.length>=n){o[l].push(...h);break}if(1===h.length&&h[0].width>s){o[l].push(...h);break}}return o.length<r&&o[0].length>4&&(o[1]=o[0].splice(-2,2)),!a&&o[l].length<2&&o.length>1&&o[l].unshift(o[l-1].pop()),o}pB(t){return t.map((t=>({innerHTML:t.nodeName.toLowerCase()===Ka?t.innerHTML:t.outerHTML,width:t.getBoundingClientRect().width,height:t.getBoundingClientRect().height})))}getWordsHtml(t){if(!(0,P.QM)(t))return"";return this.uB.getChunks(t.trim()).map((t=>`<cnx-aux>${t}</cnx-aux>`)).join("")}fB(t,i){const e=t.querySelectorAll(i),s=t.clientWidth?t.clientWidth:t.getBoundingClientRect().width;(0,a.Sz)(e).forEach((t=>{const i=(0,a.Sz)(t.querySelectorAll(Ka)),e=t.parentElement;if(!i.length||t.nodeType!==Node.ELEMENT_NODE)return;const n=this.Sr.getComputedStyle(t),r=parseInt(this.Sr.getComputedStyle(t,"before").getPropertyValue("width"),10),h=parseInt(n.getPropertyValue("--max-title-lines"),10),o=parseInt(n.getPropertyValue("--min-title-lines"),10),c=parseInt(n.getPropertyValue("font-size"),10),l={maxLineWidth:r||t.getBoundingClientRect().width-20,maxLines:h||15,minLines:o||1},u=this.pB(i),d=this.dB(u,l),p=this.Sr.createElementByString("<cnx class='cnx-ui-lines'></cnx>");p.dataset.split=s.toString(),p.dataset.split+=","+c,d.forEach((i=>{const e=t.cloneNode();(0,m.IV)(e,Za);const s=i.filter((t=>(0,P.as)(t))).map((t=>t.innerHTML));e.innerHTML+=s.join("").trim(),p.dataset.split+=","+i.length,(0,m.jG)(e,p)})),this.vB(p).lines!==this.vB(e).lines?t.classList.contains(Za)?this.Sr.requestAnimationFrameHelper((()=>{null!==e.parentNode&&(0,m.BE)(e,p),(0,m.bX)(e)})):this.Sr.requestAnimationFrameHelper((()=>{null!==t.parentNode&&(0,m.BE)(t,p),(0,m.bX)(t)})):(0,m.bX)(t)}))}brakeLongLines(t,i){const e=t.querySelectorAll(i);if(!e.length)return;const s=t.clientWidth?t.clientWidth:t.getBoundingClientRect().width,n=this.vB(e[0].parentElement);if(isNaN(n.width))return void this.fB(t,i);if(n.width&&0===Math.abs(n.width-s))return;const r=t.querySelectorAll(".cnx-ui-lines[data-split]");(0,a.Sz)(r).forEach((t=>{const e=t.querySelectorAll(i),s=e[0].cloneNode(!1),n=(0,a.Sz)(e).map((t=>t.innerHTML)).join("");s.innerHTML=this.getWordsHtml(n),(0,m.cn)(s,Za),t.prepend(s)})),this.fB(t,i)}vB(t){const i=t.dataset.split?t.dataset.split.split(","):[],e=i.shift();return{width:parseInt(e,10),lines:i.join("")}}}class ic extends ye{constructor(t,i,e,s,n,r){super(t,i,e,r.template,n),this.mediator=t,this.Sr=i,this.Er=s,this.Qt=n,this.gB=r,this.splitTextSelector=`.${Wa.Text}`,this.Cr=()=>{this.Sr.requestAnimationFrameHelper((()=>{this.mB.brakeLongLines(this.Am,this.splitTextSelector)}))},this.yB=i.createDocumentFragment(),this.mB=new tc(i)}get $templateFragment(){return this.yB}bB(t,i){const e=this.gB.titleTemplate(t,i);return this.Sr.createElementByString(e)}wB(t,i){const e=this.gB.labelTemplate(t,i);return this.Sr.createElementByString(e)}xB(t,i){const e=this.gB.textTemplate(t,i);return this.Sr.createElementByString(e)}SB(){const t=this.gB.placeholderTemplate();return this.Sr.createElementByString(t)}mR(){}_B(){this.resetAnimation(),(0,m.cn)(this.Am,Ga.SlideIn)}AB(){this.resetAnimation(),(0,m.cn)(this.Am,Ga.SlideOut)}onSlideTransitionStart(t){this.PB(t),this.resetAnimation(),this.render()}onSlideTransitionEnd(){this._B()}onSlideTimeUpdate(t,i){}resetAnimation(){const t=[Ga.SlideIn,Ga.SlideOut];(0,m.IV)(this.Am,...t)}initComponent(t){super.initComponent(),this.kB=t,this.Er.on(this.kB,this.Cr)}render(){(0,m.SH)(this.Am,this.yB),(0,m.jG)(this.Am,this.kB)}setFooterElement(t){return this.PR=t,this.mR(),this.PR}destroy(){this.Er.off(this.kB,this.Cr),(0,m.bX)(this.Am),this.Am=this.Sr.createElementByString(this.gB.template),this.unsubscribeAll(this._m),this._m.unregisterAll(this)}}function ec(t,i){const e=(0,Xe.hF)(t);return(0,Xe.V7)((0,Xe.J5)(e),i)}const sc={[ma.ProtoPlayspaceColorSchemeEnum.Accent]:c.iu.AccentColor,[ma.ProtoPlayspaceColorSchemeEnum.Primary]:c.iu.PrimaryColor,[ma.ProtoPlayspaceColorSchemeEnum.Secondary]:c.iu.SecondaryColor};class nc extends ic{constructor(t,i,e,s,n,r){super(t,i,e,s,n,r),this.mediator=t,this.Sr=i,this.Qt=n,this.gB=r,this.eventList=[],this.className=Ja.Description}IB(t){return t/this.TB.listLength*(this.TB.currentItemIndex+1)}CB(t){const i=t.map(((t,i)=>{const e=this.MB(t);return(0,m.jG)(e,this.$templateFragment),0===i&&(0,m.cn)(e,"active"),Object.assign(Object.assign({},t),{shown:!1,element:e})}));this.TB=new Xa(i)}EB(t){return this.wB(t.text,sc[t.colorScheme])}MB(t){return this.xB(this.mB.getWordsHtml(ec(t.text,Qa)),sc[t.colorScheme])}PB(t){const{descriptionChunkList:i,label:e,labelColorScheme:s}=t,n={text:e,colorScheme:s};(0,P.QM)(n.text)&&(0,m.jG)(this.EB(n),this.$templateFragment),(0,a.BZ)(i)&&this.CB(i)}LB(){this.TB.currentItem.shown=!0,(0,m.IV)(this.TB.currentItem.element,"active"),this.TB.goToNextItem(),this.Sr.requestAnimationFrameHelper((()=>{this.resetAnimation(),this.Sr.requestAnimationFrameHelper((()=>{(0,m.cn)(this.TB.currentItem.element,"active"),this._B()}))}))}onSlideTimeUpdate(t,i){t>=i||t>=this.IB(i)&&!this.TB.currentItem.shown&&this.LB()}}class rc{get template(){return`<cnx class="${c.iu.TitleComponent}"></cnx>`}titleTemplate(t,i){return`<cnx class="${Wa.Title} ${i}">${t}</cnx>`}labelTemplate(t,i){return`<cnx class="${Wa.Label} ${i} ">${t}</cnx>`}textTemplate(t,i){return`<cnx class="${Wa.Text} ${i}">${t}</cnx>`}containerTemplate(){return`<cnx class="${Wa.Container}"></cnx>`}placeholderTemplate(){return`<cnx class="${Wa.Placeholder}"></cnx>`}wrapeprTemplate(){return`<cnx class="${Wa.Wrapper}"></cnx>`}}class hc extends rc{get template(){return`<cnx class="${Ga.Basic} ${c.iu.TitleComponent}"></cnx>`}textTemplate(t,i){return`<cnx class="${Wa.Placeholder}">\n <cnx class="${Wa.Text} ${i}">${t}</cnx>\n </cnx>`}}class oc extends rc{get template(){return`<cnx class="${Ga.Default} ${c.iu.TitleComponent}">\n <cnx class="${Wa.VerticalLine} ${c.iu.AccentColor}"></cnx>\n </cnx>`.trim()}textTemplate(t){return`<cnx class="${c.ed.InheritBodyFontFamily} ${Wa.Text} ${c.iu.PrimaryColor} ${Wa.HighlightInner} ${Wa.HighlightText}">${t}</cnx>`.trim()}}class ac extends ic{constructor(t,i,e,s,n,r){super(t,i,e,s,n,r),this.mediator=t,this.Sr=i,this.Qt=n,this.gB=r,this.className=Ja.Default,this.OB=!0,this.eventList=[...this.eventList,na.CallToAction]}PB(t){const{url:i,label:e}=t;if(i?(this.Am.setAttribute("title",i),(0,m.cn)(this.Am,c.iu.TitleLink)):(this.Am.removeAttribute("title"),(0,m.IV)(this.Am,c.iu.TitleLink)),(0,P.QM)(e)){const t=this.mB.getWordsHtml(ec(e,Qa));(0,m.jG)(this.xB(t),this.$templateFragment)}}onClickHandler(){this.mediator.publish(this,na.CallToAction)}onSlideTransitionEnd(){super.onSlideTransitionEnd(),this.OB=!0}onSlideTimeUpdate(t,i){this.OB&&i-t<1200&&(this.AB(),this.OB=!1)}destroy(){super.destroy(),this.unsubscribeAll(this._m),this._m.unregisterAll(this)}}class cc extends ic{constructor(t,i,e,s,n,r){super(t,i,e,s,n,r),this.mediator=t,this.Sr=i,this.Qt=n,this.gB=r,this.eventList=[],this.className=Ja.Bullet}CB(t){const i=t.map((t=>{if(!(0,P.QM)(t.title))return;const i=this.RB(t);return(0,m.jG)(i,this.$templateFragment),Object.assign(Object.assign({},t),{activated:!1,element:i,titleElement:i.firstChild,containerElement:i.querySelector(`.${Wa.Container}`)})}));this.BB=new Xa(i)}DB(t){const i=t.element.querySelector(`.${Wa.Container}`),e=i.querySelectorAll(`.${Wa.Text}`),s=(0,P.$K)(e)?e.length:0,n=(0,P.$K)(e[0])?e[0].clientHeight:0;(0,m.T7)(i,{"max-height":s*n+"px"}),t.activated=!0,(0,m.L_)(t.titleElement,c.iu.PrimaryColor,c.iu.SecondaryColor),(0,m.cn)(t.element,"active")}jB(t){const i=t.element.querySelector(`.${Wa.Container}`);(0,m.aQ)(i,"max-height"),(0,m.L_)(t.titleElement,c.iu.SecondaryColor,c.iu.PrimaryColor),(0,m.IV)(t.element,"active")}FB(t){const i=this.gB.labelTemplate(t);return this.Sr.createElementByString(i)}RB(t){const i=this.FB(t.title),e=this.xB(this.mB.getWordsHtml(t.description)),s=this.SB();return(0,m.jG)([i,e],s),s}PB(t){const{label:i,bulletChunkList:e}=t;(0,P.QM)(i)&&(0,m.jG)(this.bB(i),this.$templateFragment),(0,a.BZ)(e)&&this.CB(e.slice(0,3))}onSlideTimeUpdate(t,i){const e=this.BB;e&&!e.currentItem.activated&&(0===e.currentItemIndex?t>=1e3&&(this.DB(e.currentItem),e.goToNextItem()):(i-1e3)/e.listLength*e.currentItemIndex+1e3<t&&(this.jB(e.previousItem),this.DB(e.currentItem),e.goToNextItem()))}}class lc extends rc{get template(){return`<cnx class="${Ga.Basic} ${c.iu.TitleComponent}"></cnx>`}titleTemplate(t){return`<cnx class="${Wa.Title} ${c.iu.AccentColor}">${t}</cnx>`}labelTemplate(t){return`<cnx class="${Wa.Label} ${c.iu.PrimaryColor}">\n <cnx class="${Wa.VerticalLine} ${c.iu.AccentColor}"></cnx>\n ${t}\n </cnx>`.trim()}textTemplate(t){return`<cnx class="${Wa.Container}">\n <cnx class="${Wa.Text} ${c.iu.SecondaryColor}">${t}</cnx>\n </cnx>\n `.trim()}}class uc extends ic{constructor(t,i,e,s,n,r){super(t,i,e,s,n,r),this.mediator=t,this.Sr=i,this.Qt=n,this.gB=r,this.eventList=[],this.className=Ja.Cover,this.splitTextSelector=`.${Wa.Text}, .${Wa.Title}`,this.Cr=()=>{this.Sr.requestAnimationFrameHelper((()=>{if(this.mB.brakeLongLines(this.Am,this.splitTextSelector),this.PR){const t=this.PR.clientHeight/2*-1;(0,m.T7)(this.labelElement,{bottom:`${t}px`,position:"absolute"})}}))}}PB(t){let{coverChunk:{title:i,subtitle:e}}=t;const{label:s}=t;if((0,P.QM)(i)&&(i=ec(i,Qa),(0,m.jG)(this.bB(this.mB.getWordsHtml(i)),this.$templateFragment)),(0,P.QM)(e)&&(e=ec(e,Qa),(0,m.jG)(this.xB(this.mB.getWordsHtml(e)),this.$templateFragment)),(0,P.QM)(s)){if(this.labelElement=this.wB(s),this.PR){const t=(this.PR.clientHeight-this.Am.clientHeight)/2*-1;(0,m.T7)(this.labelElement,{bottom:`${t}px`,position:"absolute"})}(0,m.jG)(this.labelElement,this.$templateFragment)}}}class dc extends rc{get template(){return`<cnx class="${Ga.Cover} ${c.iu.TitleComponent}"></cnx>`}titleTemplate(t){return`<cnx class="${Wa.Placeholder}">\n <cnx class="${Wa.Title} ${c.iu.PrimaryColor}">${t}</cnx>\n </cnx>`}textTemplate(t){return`<cnx class="${Wa.Placeholder}">\n <cnx class="${Wa.Text} ${c.iu.SecondaryColor}">${t}</cnx>\n </cnx>`}labelTemplate(t){return`<cnx class="${Wa.Placeholder}">\n <cnx class="${Wa.Label}">${t}</cnx>\n </cnx>`}}var pc=n(4562);class fc extends ic{constructor(t,i,e,s,n,r){super(t,i,e,s,n,r),this.mediator=t,this.Sr=i,this.Qt=n,this.gB=r,this.eventList=[],this.className=Ja.Quote}PB(t){const{quote:i,source:e}=t;if((0,P.QM)(i)){const t=this.mB.getWordsHtml(`${pc}${(0,Xe.J5)(i)}${pc}`);(0,m.jG)(this.xB(t),this.$templateFragment)}(0,P.QM)(e)&&(0,m.jG)(this.wB(e),this.$templateFragment)}}class vc extends rc{get template(){return`\n <cnx class="${Ga.Basic} ${c.iu.TitleComponent}"></cnx>\n `.trim()}textTemplate(t){return`\n <cnx class="${Wa.Text} ${c.iu.PrimaryColor}"> ${t}</cnx>`.trim()}labelTemplate(t){return`<cnx class="${Wa.Label}">${t}</cnx>`.trim()}}class gc extends ic{constructor(t,i,e,s,n,r){super(t,i,e,s,n,r),this.mediator=t,this.Sr=i,this.Qt=n,this.gB=r,this.eventList=[],this.className=Ja.Instagram}PB(t){const{instagramMetadata:{createdDate:i,comments:e,likes:s},label:n}=t;this.$B({createdDate:i,comments:e,likes:s}),(0,P.QM)(n)&&(0,m.jG)(this.bB(n),this.$templateFragment)}$B(t){const{createdDate:i,comments:e,likes:s}=t,n=this.Sr.createElementByString(this.gB.instagramMetaTemplate(i,s,e));if(this.VB(e)&&this.VB(s)){const t=n.querySelector(`.${Wa.Instagram}-date cnx-span`);(0,m.cn)(t,c.Gj.Show)}(0,m.jG)(n,this.$templateFragment)}VB(t){return!(0,P.QM)(t)||"0"===t}}var mc=n(6514),yc=n(1954),bc=n(8757);class wc extends rc{get template(){return`<cnx class="${Ga.Basic} ${c.iu.TitleComponent}"></cnx>`.trim()}instagramMetaTemplate(t,i,e){const s=(0,P.QM)(t)?`\n <cnx-span class="cnx-ui-ps-instagram-title-date ${c.ed.InheritBodyFontFamily}">\n ${bc}\n <cnx-span class="cnx-date-label ${c.ed.InheritBodyFontFamily}">Posted </cnx-span>${(0,Yi.VG)(t)}\n </cnx-span>`.trim():"",n=(0,P.QM)(i)?`\n <cnx-span class="cnx-ui-ps-instagram-title-likes ${c.ed.InheritBodyFontFamily}">\n ${mc} ${(0,lt.uc)(parseInt(i,10))}\n </cnx-span>`.trim():"",r=(0,P.QM)(e)?`\n <cnx-span class="cnx-ui-ps-instagram-title-comments ${c.ed.InheritBodyFontFamily}">\n ${yc} ${(0,lt.uc)(parseInt(e,10))}\n </cnx-span>`.trim():"";return`\n <cnx class="cnx-ui-ps-instagram-title-row ${c.ed.InheritBodyFontFamily}">\n ${s}\n ${n}\n ${r}\n </cnx>\n `.trim()}titleTemplate(t){return`\n <cnx class="cnx-ui-ps-instagram-title-row ${Wa.Instagram}-title ${c.ed.InheritBodyFontFamily}">\n ${t}\n </cnx>\n `.trim()}}class xc extends ge{constructor(t,i,e,s,n,r,h){super(t,i,e,s,r),this.mediator=t,this.Sr=i,this.Er=n,this.Qt=r,this.pR=h,this.eventList=[],this.UB=new Map,this.NB()}setFooterElement(t){this.UB.forEach((i=>{i.setFooterElement(t)}))}onSlideTransitionStart(t){(0,m.Kk)(this.Am),this.Am.removeAttribute("title");const i=t.find((({type:t})=>t===Ta.SlideTitle)),e=t.find((({type:t})=>t===Ta.CtaButton));if(e&&e.metadata&&e.metadata.url){if(this.HB=e.metadata.url,!this.pR){this.Am.href=this.HB;const t=this.Sr.isURLSameDomainToTop(this.HB);this.Am.target=t?ue.bS.Top:ue.bS.Blank}this.Am.title=i.metadata.label,e.metadata.title=i.metadata.label}if(!(0,P.as)(i)||!(0,P.as)(i.metadata))return;const s=this.UB.get(i.metadata.titleType);if(s){if(this.zB(s),(0,P.QM)(i.metadata.label)){(0,Xe.Ft)(i.metadata.label)&&(0,m.cn)(this.Am,"cnx-japanese-charset")}this.qB.onSlideTransitionStart(i.metadata)}}onSlideTransitionEnd(){this.qB&&this.qB.onSlideTransitionEnd()}onSlideTimeUpdate(t,i){this.qB&&this.qB.onSlideTimeUpdate(t,i)}initComponent(){}zB(t){this.qB?(this.qB.destroy(),(0,m.L_)(this.Am,this.WB,t.className)):(0,m.cn)(this.Am,t.className),this.WB=t.className,this.Am.innerHTML="",this.qB=t,this.qB.initComponent(this.Am)}NB(){this.UB.set(Ca.Default,new ac(this,this.Sr,this._m,this.Er,this.Qt,new oc)),this.UB.set(Ca.Description,new nc(this,this.Sr,this._m,this.Er,this.Qt,new hc)),this.UB.set(Ca.Quote,new fc(this,this.Sr,this._m,this.Er,this.Qt,new vc)),this.UB.set(Ca.Bullet,new cc(this,this.Sr,this._m,this.Er,this.Qt,new lc)),this.UB.set(Ca.Cover,new uc(this,this.Sr,this._m,this.Er,this.Qt,new dc)),this.UB.set(Ca.Instagram,new gc(this,this.Sr,this._m,this.Er,this.Qt,new wc)),this.UB.forEach((t=>{t.eventList.forEach((i=>{this.subscribe(i,t,(()=>{const t={payload:null};i===na.CallToAction&&(t.payload=this.HB),this.mediator.publish(this,i,t)}))}))}))}destroy(){super.destroy(),this.qB&&this.qB.destroy()}}const Sc="Skip Ad",_c={[xe[xe.SkipAd]]:{template:ps(xe.SkipAd,Sc,!1),tooltip:Sc,isHoverable:!1}};class Ac{constructor(t){this.GB=t}get template(){return`\n <cnx class="${Io}">\n ${this.JB()}\n <cnx class="${Oo}">\n [[${xe.TopStoryTitle}]]\n [[${xe.TopSlideTitle}]]\n </cnx>\n </cnx>\n `.trim()}JB(){return this.GB?`[[${xe.TopLogo}]]`:""}}class Pc{get template(){return`<a class="${Wa.Wrapper}"></a>`}}class kc extends ye{constructor(t,i,e,s,n,r){super(t,i,e,s,n),this.mediator=t,this.Qt=n,this.eventList=[...this.eventList,w[w.LogoClicked]],this.hideComponent(!1),this.QB=this.Am.querySelector(`.${Co}`),this.QB.src=`${r}`,this.QB.alt="",this.QB.onload=()=>{this.XB()}}show(t){this.showComponent(t.useTransition)}hide(t){this.hideComponent(t.useTransition)}update(t){this.showComponent(t.useTransition)}triggerLogoAnimation(){(0,m.cn)(this.Am,Lo)}onClickHandler(){this.mediator.publish(this,w[w.LogoClicked])}XB(){this.QB.naturalHeight>this.QB.naturalWidth?this.QB.naturalWidth>this.QB.parentElement.clientWidth&&this.QB.naturalWidth/this.QB.naturalHeight>=.8?(0,m.cn)(this.QB,Eo):(0,m.cn)(this.QB,Mo):this.QB.naturalHeight>this.QB.parentElement.clientHeight&&this.QB.naturalHeight/this.QB.naturalWidth>=.8?(0,m.cn)(this.QB,Mo):(0,m.cn)(this.QB,Eo)}}class Ic{get template(){return`\n <cnx class="${To}">\n <img class="${Co}" />\n </cnx>\n `.trim()}}class Tc{get template(){return`\n <cnx class="${Bo} ${c.ed.InheritTitleFontFamily}">\n <cnx class="${Do}">\n <cnx class="${jo} ${c.iu.SecondaryColor}">\n <cnx class="${Fo}">\n <cnx class="${$o}"></cnx>\n </cnx>\n </cnx>\n </cnx>\n </cnx>\n `.trim()}}class Cc{get template(){return`\n <cnx class="${Ro} ${c.ed.InheritTitleFontFamily}">\n <cnx class="${Do}">\n <cnx class="${jo} ${c.iu.SecondaryColor}">\n <cnx class="${Fo}">\n <cnx class="${$o}"></cnx>\n </cnx>\n </cnx>\n </cnx>\n </cnx>\n `.trim()}}class Mc extends ge{constructor(t,i,e,s,n){super(t,i,e,s,n),this.mediator=t,this.eventList=[],this.YB=this.Am.querySelector(`.${$o}`)}show(t){if(!this.YB)return;const{label:i,useTransition:e}=t;(0,P.QM)(i)&&i!==this.EB&&(clearTimeout(this.KB),this.EB=i,this.ZB(i),this._B(e))}initComponent(){}hide(t){const{useTransition:i}=t;clearTimeout(this.KB),this.AB(i),this.EB=null}update(t){if(!this.YB)return;const{label:i,useTransition:e}=t;(0,P.QM)(i)&&i!==this.EB&&(clearTimeout(this.KB),this.AB(e),this.EB=i,this.KB=setTimeout((()=>{this.ZB(i),this._B(e)}),600))}ZB(t){(0,P.QM)(t)&&(0,Xe.Ft)(t)&&(0,m.cn)(this.Am,"cnx-japanese-charset"),this.YB.innerHTML=t}_B(t=!1){if(t){if((0,m.pv)(this.Am,Vo))return;this.tD(),(0,m.IV)(this.Am,c.Gj.Hide,c.Gj.Active),(0,m.Tp)(this.Am),(0,m.L_)(this.Am,Uo,Vo)}else(0,m.L_)(this.Am,c.Gj.Hide,c.Gj.Active),(0,m.IV)(this.Am,Vo,Uo)}AB(t=!1){t?((0,m.IV)(this.Am,c.Gj.Hide,c.Gj.Active),(0,m.L_)(this.Am,Vo,Uo)):((0,m.L_)(this.Am,c.Gj.Active,c.Gj.Hide),(0,m.IV)(this.Am,Vo,Uo))}tD(){const t=[Vo,Uo];(0,m.IV)(this.YB,...t),(0,m.Tp)(this.YB)}}class Ec extends ge{constructor(){super(...arguments),this.eventList=[]}initComponent(){}onSlideTimeUpdate(){}onSlideTransitionEnd(){}onSlideTransitionStart(t){const i=this.iD(t);i&&this.eD(i.metadata.label)}iD(t){return t.find((({type:t,metadata:i})=>t===Ta.TextLabel&&(0,P.as)(i)))}eD(t){(0,P.QM)(t)&&(this.Am.innerText=t)}}class Lc extends ws{constructor(t,i,e,s,n){super(t,i,s,n,_c),this.Sr=t,this._m=i,this.pl=e,this.Am=s,this.Wt=n,this.Pw={[xe.VolumeButton]:t=>new Ss(t,this.Sr,this._m,'<cnx class="cnx-icon-button cnx-ui-btn-hoverable"><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>',xs.Mute,this.Wt.isMobile),[xe.PlayspaceProgressBar]:t=>new wa(t,this.Sr,this._m,'<cnx class="cnx-slides-progress-bar"></cnx>',this.Wt.isMobile),[xe.PlayspaceSettingsMenu]:t=>new Ia(t,this.Sr,this._m,'<cnx class="cnx-ui-cm cnx-ui-cm-settings"><cnx class="cnx-cm-container"></cnx></cnx>',w[w.SettingsMenu],xe.PlayspaceSettingsMenu,this.Am,this.Wt.isMobile),[xe.CtaButton]:t=>new Ba(t,this.Sr,this._m,this.pl,new $a,this.Wt.isMobile,this.Wt.disableClickUrl),[xe.ClickToPlayButton]:t=>new Va(t,this.Sr,this._m,'<cnx class="cnx-ui-click-to-play-btn"><cnx class="cnx-ui-click-to-play-btn-content"><svg markup-inline class="cnx-click-to-play-btn-icon cnx-color-accent" class="cnx-color-icon" xmlns="http://www.w3.org/2000/svg" viewBox="0 0 24 24"><path d="M5 1v22l18-11.083z"/></svg><cnx class="cnx-onion-ring"></cnx><cnx-span class="cnx-click-to-play-btn-text">PLAY</cnx-span></cnx></cnx>',this.Wt.isMobile),[xe.TopTitle]:t=>new qa(t,this.Sr,new Ac(this.Wt.logoUrl).template,this),[xe.TopLogo]:t=>new kc(t,this.Sr,this._m,(new Ic).template,this.Wt.isMobile,this.Wt.logoUrl),[xe.TopSlideTitle]:t=>new Mc(t,this.Sr,this._m,(new Tc).template,this.Wt.isMobile),[xe.TopStoryTitle]:t=>new Mc(t,this.Sr,this._m,(new Cc).template,this.Wt.isMobile),[xe.SlideTitle]:t=>new xc(t,this.Sr,this._m,(new Pc).template,this.pl,this.Wt.isMobile,this.Wt.disableClickUrl),[xe.ElapsedTimeLabel]:t=>new Oe(t,this.Sr,this._m,Re),[xe.TotalDurationLabel]:t=>new Oe(t,this.Sr,this._m,Re),[xe.VolumeControls]:t=>new ks(t,this.Sr,Is,this),[xe.ProgressBar]:t=>new je(t,this.Sr,this._m,Fe,this.Wt.isMobile),[xe.TextLabel]:t=>new Ec(t,this.Sr,this._m,'<cnx class="cnx-button-text-label">1 min. story</cnx>')},this.kw=t=>i=>{const e=this.Pw[t];if(e)return e(i)}}createComponent(t,i){return this.kw(t)(i)||super.createComponent(t,i)}}class Oc{constructor(t){this.sD=t}nD(t){return this.sD.filter((i=>t.instance!==i.instance))}rD(t){return this.sD.find((({name:i})=>t===i))}hD(t){t.forEach((({instance:t})=>{t.isOpen&&t.close()}))}toggleContextMenu(t,i={}){const e=this.rD(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.hD(this.nD(e)),!0}}isAnyContextMenuOpen(){return!!this.sD.find((({instance:t})=>t.isOpen))}closeContextMenu(t){const i=this.rD(t).instance;i.isOpen&&i.close()}closeAllContextMenus(){this.hD(this.sD)}}class Rc extends qo{enterState(){super.enterState();const t=this.context.getComponent(xe.PlayspaceProgressBar);t&&t.startProgress();const i=this.context.getComponent(xe.CtaButton);i&&i.startProgress(),this.context.interactionService.enableSpecialInteractions(this.context.$container),this.context.autoHideHandler&&this.context.autoHideHandler.startAutoHide()}exitState(){super.exitState(),this.context.autoHideHandler&&this.context.autoHideHandler.showUi()}updateDuration(){const t=this.context.getComponent(xe.PlayspaceProgressBar);t&&t.startProgress()}}class Bc extends Go{enterState(){super.enterState();const t=this.context.getComponent(xe.PlayspaceProgressBar);t&&t.pauseProgress();const i=this.context.getComponent(xe.CtaButton);i&&i.pauseProgress(),this.context.interactionService.disableSpecialInteractions(this.context.$container)}exitState(){super.exitState()}updateDuration(){}}class Dc extends Bc{enterState(){super.enterState(),this.context.interactionService.disableSpecialInteractions(this.context.$container)}exitState(){super.exitState()}}class jc extends Bc{enterState(){super.enterState(),(0,m.cn)(this.context.$uiContainer,c.s_.Preroll);const t=this.context.getComponent(xe.Loader);t&&t.show(),this.context.interactionService.disableSpecialInteractions(this.context.$container)}exitState(){super.exitState(),(0,m.IV)(this.context.$uiContainer,c.s_.Preroll);const t=this.context.getComponent(xe.Loader);t&&t.hide()}}class Fc extends Bc{enterState(){super.enterState(),this.context.interactionService.disableSpecialInteractions(this.context.$container)}exitState(){super.exitState()}updateDuration(){const t=this.context.getComponent(xe.PlayspaceProgressBar);t&&t.resetProgress()}}const $c={[Ta.PlaybackControls]:[xe.PlayButton],[Ta.VolumeControls]:[xe.VolumeButton],[Ta.CtaButton]:[xe.CtaButton],[Ta.PlaylistControls]:[xe.UpNextButton,xe.PreviousButton],[Ta.SlideTitle]:[xe.SlideTitle],[Ta.TextLabel]:[xe.TextLabel]};class Vc{constructor(){this.oD=Object.keys($c).reduce(((t,i)=>[...t,...$c[i]]),[])}setCapabilityList(t){this.aD=t.map((t=>$c[t.type])).filter((t=>Array.isArray(t))).reduce(((t,i)=>[...t,...i]),[])}getComponentList(){return{excludedComponents:(0,a.V7)(this.oD,this.aD),includedComponents:(0,a.tN)(this.oD,this.aD)}}}class Uc{constructor(t){this.Am=t,this.cD=!1}isUIHidden(){return this.cD}startAutoHide(){this.lD=setTimeout((()=>{this.dD()}),3e3)}showUi(){clearTimeout(this.lD),this.pD()}resetAutoHideTimer(){clearTimeout(this.lD),this.pD(),this.startAutoHide()}dD(){(0,m.cn)(this.Am,c.s6.HideUI),this.cD=!0}pD(){(0,m.IV)(this.Am,c.s6.HideUI),this.cD=!1}}var Nc=n(5256);class Hc extends Vs{constructor(t,i,e,s,n,r,h,o,a){super(t,i,e,n,new Lc(e,a,s,i,r)),this.mediator=t,this.$container=i,this.globalDomUtilsService=e,this.settings=r,this.Xt=h,this.interactionService=a,this.fD=80,this.vD=[xe.SlideTitle,xe.CtaButton,xe.TopTitle,xe.TextLabel],this.Iw={[z.PlayingState]:new Rc(this),[z.PausedState]:new Bc(this),[z.StoppedState]:new Dc(this),[z.HiddenState]:new Fc(this),[z.PrerollState]:new jc(this),[z.PostrollState]:new jc(this)},this.gD=new Vc,this.mD=()=>{this.mediator.publish(this,w[w.Play]),this.yD(w[w.Play])},this.PR=this.$container.querySelector(`.${bo}`),this.bD(),this.wD(),this.xD(),this.SD(),this.Iw[o].enterState(),this._D(),this.AD(!1),this.PD(),this.kD=this.$uiContainer.querySelector(`.${yo}`),this.ID=this.$uiContainer.querySelector(`.${So}`),this.interactionService.register(this.ID,this,this.interactionService),this.subscribe(fe.Z[fe.Z.Click],this.interactionService,(()=>{this.mD()}))}bD(){const t=this.getComponent(xe.SlideTitle);t&&t.setFooterElement(this.footer)}TD(t,i){const e=this.getComponent(xe.PlayspaceProgressBar);e&&e.resizeProgressBar(t,i)}handleComponentEvent(t,i,e){switch(this.yD(t),t){case w[w.Mute]:this.mediator.publish(this,w[w.Volume],{payload:0});break;case w[w.Unmute]:this.mediator.publish(this,w[w.Volume],{payload:1});break;case xe[xe.CloseButton]:this.mediator.publish(this,w[w.Close]);break;case xe[xe.MoreButton]:const e={holdPause:!0};this.CD.toggleContextMenu(xe.PlayspaceSettingsMenu,e);break;case w[w.AboutClick]:this.globalDomUtilsService.open(gn.br,ue.bS.Blank);break;case w[w.Quality]:i.payload&&this.mediator.publish(this,w[w.Quality],{payload:i.payload});break;case xe[xe.UpNextButton]:this.mediator.publish(this,w[w.Next]);break;case xe[xe.PreviousButton]:this.mediator.publish(this,w[w.Prev]);break;case na.CallToAction:(0,P.QM)(i.payload)?this.mediator.publish(this,na.CallToAction,i):this.mediator.publish(this,w[w.Next]);break;default:this.mediator.publish(this,t,i)}}yD(t){switch(t){case na.CallToAction:this.mediator.publish(this,na.GeneralClickInteraction,{payload:s.ProtoMediaClickTypeEnum.UrlClick});break;case fe.Z[fe.Z.Scroll]:this.mediator.publish(this,na.GeneralClickInteraction,{payload:s.ProtoMediaClickTypeEnum.ScrollClick});break;case xe[xe.VolumeButton]:case xe[xe.VolumeProgress]:case xe[xe.VolumeControls]:this.mediator.publish(this,na.GeneralClickInteraction,{payload:s.ProtoMediaClickTypeEnum.VolumeClick});break;case xe[xe.PlayButton]:case xe[xe.BigPlayButton]:case xe[xe.ClickToPlayButton]:case w[w.Play]:this.mediator.publish(this,na.GeneralClickInteraction,{payload:s.ProtoMediaClickTypeEnum.PlayClick});break;case w[w.Pause]:this.mediator.publish(this,na.GeneralClickInteraction,{payload:s.ProtoMediaClickTypeEnum.PauseClick});break;case w[w.Next]:case xe[xe.UpNextButton]:case xe[xe.UpNextBox]:case fe.Z[fe.Z.TapRight]:this.mediator.publish(this,na.GeneralClickInteraction,{payload:s.ProtoMediaClickTypeEnum.NextClick});break;case w[w.Prev]:case xe[xe.PreviousButton]:case fe.Z[fe.Z.TapLeft]:this.mediator.publish(this,na.GeneralClickInteraction,{payload:s.ProtoMediaClickTypeEnum.PreviousClick});break;case w[w.Mute]:this.mediator.publish(this,na.GeneralClickInteraction,{payload:s.ProtoMediaClickTypeEnum.MuteClick});break;case w[w.Unmute]:this.mediator.publish(this,na.GeneralClickInteraction,{payload:s.ProtoMediaClickTypeEnum.UnmuteClick});break;case w[w.Close]:case xe[xe.CloseButton]:this.mediator.publish(this,na.GeneralClickInteraction,{payload:s.ProtoMediaClickTypeEnum.CloseClick})}}xD(){const t=[],i=this.MD();i&&t.push({instance:i,linkedComponent:this.getComponent(xe.MoreButton),name:xe.PlayspaceSettingsMenu}),this.CD=new Oc(t)}SD(){this.settings.isMobile&&this.ED(),this.interactionService.register(this.$container,this,this.interactionService,{},[Nc.WR.Hold,Nc.WR.Swipe]);const t=this.interactionService.getNonInterruptibleInteractions();Object.keys(fe.Z).filter((t=>isNaN(parseInt(t,10)))).forEach((i=>{this.subscribe(i,this.interactionService,(e=>{const s=!t.includes(fe.Z[i]);if(this.autoHideHandler&&s){if(this.autoHideHandler.isUIHidden())return void this.autoHideHandler.resetAutoHideTimer();this.autoHideHandler.resetAutoHideTimer()}this.yD(i),this.mediator.publish(this,i,e)}))}))}ED(){this.autoHideHandler=new Uc(this.$container)}wD(){const t=`id_${this.Xt}`;this.$uiContainer.id=t;const{bodyFontFamily:i,titleFontFamily:e}=this.LD(),s=`\n #${t} .${c.iu.AccentColor} {\n fill: ${this.settings.accentColorList.background};\n background-color: ${this.settings.accentColorList.background};\n color: ${this.settings.accentColorList.foreground};\n stroke: ${this.settings.accentColorList.background};\n }\n #${t} .${c.iu.AccentColor} .cnx-cta-btn-arrow svg{\n fill: ${this.settings.accentColorList.foreground};\n }\n @keyframes ${t}-bar {\n 1% {\n fill: transparent; transform: scaleY(1)\n }\n 30% {fill: ${this.settings.accentColorList.background}; transform: scaleY(1.1)}\n 60% {fill: transparent; transform: scaleY(1)}\n 100% {fill: transparent; transform: scaleY(1)}\n }\n #${t} .cnx-ui-loader polygon {\n animation-name: ${t}-bar;\n }\n #${t} .${c.iu.PrimaryColor} {\n background: ${this.settings.primaryColorList.background};\n color: ${this.settings.primaryColorList.foreground};\n }\n #${t} .${c.iu.SecondaryColor} {\n background: ${this.settings.secondaryColorList.background};\n color: ${this.settings.secondaryColorList.foreground};\n }\n #${t} .${c.iu.TitleComponent}.${c.iu.TitleLink}:${this.settings.isMobile?"active":"hover"} .${Wa.Text} {\n background-color: ${(0,ut.Xf)(this.settings.accentColorList.background,this.fD)}\n }\n #${t} .${c.iu.SlideProgressBar} .${c.iu.ProgressFill}.${c.iu.AccentColor} {\n background-color: ${this.settings.useAccentColorForProgressBar?this.settings.accentColorList.background:c.QO.Icons}\n }\n #${t} em {\n color: ${this.settings.accentColorList.background};\n }\n #${t} .${c.ed.InheritTitleFontFamily} {\n font-family: ${e} !important;\n }\n #${t} .${c.ed.InheritBodyFontFamily} {\n font-family: ${i} !important;\n }\n `.trim();this.globalDomUtilsService.addCssString(s)}LD(){const{bodyFontFamily:t,titleFontFamily:i}=this.settings.fontFamilySettings;return(0,P.QM)(t)&&(0,P.QM)(i)?this.settings.fontFamilySettings:{titleFontFamily:(0,m.nw)(this.$container),bodyFontFamily:(0,m.fj)(this.$container)}}PD(){this.OD()&&this.hideExpandButton()}OD(){return this.RD()||!this.BD()}RD(){return this.settings.os===dt.M.Ios}BD(){return!0===this.settings.expandButtonEnabled}DD(t={}){const i=this.getComponent(xe.CtaButton);i&&(0,P.QM)(t.label)&&i.changeLabel(t.label)}hideExpandButton(){this.MD().hideExpandButton()}showExpandButton(){this.MD().showExpandButton()}MD(){return this.getComponent(xe.PlayspaceSettingsMenu)}_D(t=[]){this.gD.setCapabilityList(t)}AD(t=!0){const{excludedComponents:i,includedComponents:e}=this.gD.getComponentList();i.map((t=>this.getComponent(t))).forEach((i=>i&&i.hideComponent(t))),e.map((t=>this.getComponent(t))).forEach((i=>i&&i.showComponent(t)))}updateQualityMenu(t){const i=this.getComponent(xe.PlayspaceSettingsMenu);i&&i.updateQualityMenu(t)}updateQuality(t){const i=this.getComponent(xe.PlayspaceSettingsMenu);i&&i.updateQuality(t)}setTotalSlides(t){const i=this.getComponent(xe.PlayspaceProgressBar);i&&i.setSlides(t)}setDuration(t){const i=this.getComponent(xe.PlayspaceProgressBar);i&&(i.setDuration(t),this.currentState.updateDuration())}setCurrentIndex(t){const i=this.getComponent(xe.PlayspaceProgressBar);i&&i.setCurrentIndex(t)}updateVolume(t){const i=this.getComponent(xe.VolumeButton);i&&i.setState(t>0?xs.Unmute:xs.Mute)}expand(){this.MD().setExpand()}collapse(){this.MD().setCollapse()}onResizeUi(t,i){this.CD.closeAllContextMenus(),this.TD(t,i)}onFirstTimeInView(){const t=this.getComponent(xe.TopTitle);t&&t.triggerLogoAnimation()}hide(){super.hide()}setMediaContainerRatio(t){(0,m.SH)(this.kD,t)}get $mediaContainer(){return this.kD}onSlideTransitionStart(t){const i=this.getComponent(xe.PlayspaceProgressBar);i&&i.pauseProgress(),this._D(t),this.AD(),this.vD.forEach((i=>{const e=this.getComponent(i);e&&e.onSlideTransitionStart&&e.onSlideTransitionStart(t)}))}onSlideTransitionEnd(){this.vD.forEach((t=>{const i=this.getComponent(t);i&&i.onSlideTransitionEnd&&i.onSlideTransitionEnd()}))}onSlideTimeUpdate(t,i){this.vD.forEach((e=>{const s=this.getComponent(e);s&&s.onSlideTimeUpdate&&s.onSlideTimeUpdate(t,i)}))}updateCapabilityMetadata(t){if(t.type===Ta.CtaButton)this.DD(t.metadata)}get footer(){return this.PR}destroy(){this.interactionService.unregisterAll(this),this.unsubscribeAll(this),super.destroy()}}const zc="stateChanged",qc="contentReset";class Wc{constructor(t,i,e,s,n,r,h){this.mediator=t,this.jD=i,this.FD=e,this.$D=s,this.VD=n,this.UD=r,this.ND=h,this.zD=!1,this.qD=!1,this.WD=!1,this.nd=!1,this.GD=!1,this.JD=!0,this.QD=()=>{this.zD=!0,this.XD===z.PlayingState?this.play(!1):this.pause(!1)},this.YD=()=>{switch(this.qD=!0,this.UD){case ma.ProtoEndOfSlideCycleMode.Loop:this.reset();break;case ma.ProtoEndOfSlideCycleMode.Stop:this.stop()}},this.KD=null,this.ZD=null,this.ND&&(this.zD=!0)}tj(t){this.KD!==t&&(this.ZD=this.KD,this.KD=t,this.mediator.publish(this,zc,{payload:this.KD}))}ij(t){return this.KD===t}resume(){this.ZD&&this.tj(this.ZD)}stop(){this.jD.stop(),this.tj(z.StoppedState)}handleSlidesEnd(){this.ej()}nj(){this.tj(z.PrerollState)}ej(){this.mediator.publish(this,ha.ContentEnd),this.VD?this.tj(z.PostrollState):this.YD()}rj(t){return t===z.PrerollState||t===z.PostrollState}hj(t){return t===z.PrerollState&&this.zD||t===z.PostrollState&&this.qD}setViewabilityState(t){this.nd=t}play(t){if(this.XD=z.PlayingState,!(this.ij(z.PlayingState)||this.ij(z.HiddenState)&&this.WD||this.rj(this.KD)&&!this.hj(this.KD)||this.ij(z.StoppedState)&&!t))if(!this.$D||this.zD){if(this.ij(z.StoppedState))return this.zD=!1,void this.reset();this.FD.setDuration(this.jD.remainingTime),this.jD.play(),this.tj(z.PlayingState),this.JD&&(this.JD=!1,this.mediator.publish(this,ha.ContentStart))}else this.nj()}reset(){this.mediator.publish(this,qc),this.KD=null,this.qD=!1,this.JD=!0,this.jD.resetSlider(),this.play(!1)}pause(t){this.XD=z.PausedState,this.ij(z.PausedState)||this.ij(z.HiddenState)||this.rj(this.KD)&&!this.hj(this.KD)||this.ij(z.StoppedState)&&!t||(this.jD.pause(),this.tj(z.PausedState))}pauseToggle(){if(this.ij(z.PausedState)||this.ij(z.PlayingState))return this.ij(z.PausedState)&&this.GD?(this.GD=!1,void this.play(!1)):this.ij(z.PlayingState)?(this.GD=!0,void this.pause(!1)):void 0}hide(){this.jD.pause(),this.WD=!0,this.tj(z.HiddenState)}show(){this.ij(z.HiddenState)&&(this.WD=!1,this.ZD!==z.PostrollState?this.ZD!==z.PrerollState?this.nd?this.goToNextSlide():this.XD===z.PlayingState?this.play(!1):this.pause(!1):this.QD():this.YD())}setCurrentSlide(t){this.rj(this.KD)&&!this.hj(this.KD)||this.jD.setCurrentSlide(t)}goToNextSlide(){this.rj(this.KD)&&!this.hj(this.KD)||(this.jD.goToNextSlide(),this.ij(z.StoppedState)||this.play(!1))}goToPrevSlide(){this.rj(this.KD)||(this.play(!1),this.jD.goToPrevSlide())}exitRollBreak(){this.KD!==z.PostrollState?this.QD():this.YD()}set hasPreroll(t){this.$D=t,this.zD=!0}set hasPostroll(t){this.VD=t}}class Gc extends h._{constructor(t,i,e,s,n){super(),this.mediator=t,this.oj=i,this.Cw=e,this.pl=s,this.qu=n,this.jm=!1,this.aj=!1,(0,P.QM)(i.imageUrl)||(i.imageUrl=on.n.endPoints.base.image),this.Td=new U(n),this.kD=this.Cw.createElementByString(this.cj()),this.lj()}set isLoaded(t){this.aj=t}get isLoaded(){return this.aj}uj(t,i){const e=t>i?V.Landscape:V.Portrait;return{imageUrl:this.dj[e],altText:(0,P.$K)(this.oj.altText)?this.oj.altText:"",queryParams:this.oj.mediaContext===ma.ProtoMediaContextEnum.Logo?ta.getScaledImageQueryParams(t,i):ta.getSmartCroppedImageQueryParams(t,i),width:t,height:i}}lj(){const{imageUrl:t,portraitImageUrl:i}=this.oj;this.dj={[V.Landscape]:t,[V.Portrait]:(0,P.QM)(i)?i:t}}get duration(){return this.oj.slideDuration*ht.s_}getThumbnailUrlParams(t,i){return this.uj(t,i)}destroy(){}}class Jc extends Gc{constructor(t,i,e,n,r){super(t,i,e,n,r),this.type=s.ProtoMediaTypeEnum.Image,this.pj=t=>{t.preventDefault()},this.vj()}vj(){this.oj.mediaContext===ma.ProtoMediaContextEnum.Logo&&(0,m.cn)(this.kD,Po)}gj(){this.mj=this.kD.clientWidth,this.yj=this.kD.clientHeight}bj(){this.wj=setTimeout((()=>{const{clientWidth:t,clientHeight:i}=this.kD.parentElement,{imageUrl:e,altText:s,width:n,height:r,queryParams:h}=this.uj(t,i),o=this.Td.getImage(e,s,n,r,h,!0);this.dw&&this.kD.removeChild(this.dw),o&&(this.kD.appendChild(o),this.dw=o,this.xj(this.dw))}),0)}Sj(){this.dw&&(0,P.QM)(this.oj.imageUrl)&&this.bj()}_j(){return(0,P.$K)(this.kD)&&(0,P.$K)(this.mj)&&(0,P.$K)(this.yj)}Aj(t){return!!this._j()&&Math.abs(this.mj-this.kD.clientWidth)>=this.mj/t}Pj(t){return!!this._j()&&Math.abs(this.yj-this.kD.clientHeight)>=this.yj/t}xj(t){t.addEventListener("mousedown",this.pj)}kj(t){t.removeEventListener("mousedown",this.pj)}cj(){return'<cnx class="cnx-ui-ps-image-container cnx-ui-ps-image-background"></cnx>'}reset(){this.isLoaded&&(this.kD.style.transitionDuration="",this.kD.style.transform="matrix(1.1, 0, 0, 1.1, 0, 0)")}onSlideResizeCallback(){(this.Aj(10)||this.Pj(10))&&(this.Sj(),this.gj())}play(){this.isLoaded&&(this.kD.style.transform="",this.kD.style.transitionDuration=`${this.oj.slideDuration}s`,(0,m.L_)(this.kD,c.s_.Paused,c.s_.Playing))}pause(){this.isLoaded&&(this.kD.style.transitionDuration="",this.kD.style.transform=this.Cw.getTransformPropertyValue(this.kD),(0,m.L_)(this.kD,c.s_.Playing,c.s_.Paused))}load(t){this.isLoaded||(this.isLoaded=!0,t.appendChild(this.kD),this.gj(),this.pause(),this.bj())}destroy(){this.dw&&this.kj(this.dw),clearTimeout(this.wj),super.destroy()}}class Qc{constructor(t){this.Ij=[{id:q.H264,extension:"mp4",type:"video/mp4"},{id:q.Hevc,extension:"mp4",type:"video/mp4"}],this.Tj=this.Ij.find((i=>i.id===t))}get type(){const t=this.Tj.codecs?`codecs=${this.Tj.codecs}`:"";return`${this.Tj.type}; ${t}`}get id(){return this.Tj.id}}var Xc=n(6515);class Yc{constructor(t,i){this.pl=t,this.Cj=i,this.Mj={quality:H.Auto,height:360},this.resizeObserverBinded=!1,this.Ej=new x.x,this.Lj=new Xc.X(this.Mj),this.Oj=30,this.Tl=()=>{const t=this.Cj.clientHeight;if(this.Rj(t)&&this.currentQualitySettings.quality===H.Auto){const i={height:t,quality:H.Auto};this.setCurrentQualitySettings(i),this.Lj.next(i)}}}setCurrentQualitySettings(t){this.Mj.quality=t.quality,this.Mj.height!==t.height&&(this.Mj.height=t.height,this.Ej.next())}Rj(t){return!this.Mj.height||t/this.Mj.height*100-100>this.Oj}addResizeObserver(){this.resizeObserverBinded=!0,this.pl.on(this.Cj,this.Tl)}removeResizeObserver(){this.resizeObserverBinded=!1,this.pl.off(this.Cj,this.Tl)}setQuality(t){t.quality===H.Auto?this.resizeObserverBinded||(this.setCurrentQualitySettings({height:t.height,quality:t.quality}),this.addResizeObserver(),this.Tl()):(this.resizeObserverBinded&&this.removeResizeObserver(),this.setCurrentQualitySettings(t)),this.Lj.next(this.Mj)}get currentQualitySettings(){return this.Mj}get onQualityChange(){return this.Ej.asObservable()}get onCurrentQuality(){return this.Lj.asObservable()}destroy(){this.removeResizeObserver()}}class Kc{constructor(t,i){this.Cw=t,this.Px=i,this.Bj=new x.x,this.Ej=new x.x,this.Lj=new x.x,this.onTrackLoaded=this.Bj.asObservable(),this.onQualityChange=this.Ej.asObservable(),this.onCurrentQuality=this.Lj.asObservable(),this.Dj=()=>{this.Bj.next()}}jj(t){this.Fj=t}$j(t){this.Px.innerHTML="",t.forEach((t=>{this.Px.appendChild(t)}))}Vj(){return this.Uj}Nj(t){var i;if(null===(i=this.Uj)||void 0===i||i.remove(),this.Uj=null,this.Fj&&this.Fj.subtitles&&t){this.Px.childNodes.forEach((t=>{"track"===t.nodeName.toLowerCase()&&t.remove()}));const i=this.Cw.createElement("track");i.src=t.file,i.srclang=t.code,i.label=t.title,i.kind="subtitle",i.default=!0,i.addEventListener("load",this.Dj,!1),i.addEventListener("loaded",this.Dj,!1),this.Px.appendChild(i),this.Uj=i}}}var Zc,tl,il;!function(t){t[t.MP4=0]="MP4",t[t.HLS=1]="HLS"}(Zc||(Zc={}));class el extends Kc{constructor(t,i,e,s,n={},r){super(t,s),this.pl=i,this.Yp=e,this.Hj=r,this.zj=[],this.qj=null,this.Wj=10.13,this.handlerType=Zc.MP4,this.Jj=this.Qj(n)}start(){try{this.Xj=new Yc(this.pl,this.Yp),this.Yj(),this.setQuality(this.Hj)}catch(t){(0,i.n)({message:"Mp4SourceHandler_start",exception:t.message,callStack:t.stack,level:i.D.CRITICAL})}}onQualityChanged(){return this.attachMedia()}setSource(t,i=!1){this.jj(t),this.Kj(this.Zj(),i)}setQuality(t){this.Xj.setQuality(t)}get currentQualitySettings(){return this.Xj.currentQualitySettings}attachMedia(){return new Promise((t=>{this.tF(),t()}))}detachMedia(){this.Px.removeAttribute("src"),this.Kj(null)}destroy(){this.Xj.destroy(),(0,pt.i)(this.zj)}updateSubtitleTrackSource(t){this.Nj(t)}Yj(){const t=this.Xj.onCurrentQuality.subscribe((t=>this.Lj.next(t))),i=this.Xj.onQualityChange.subscribe((()=>this.iF(this.Xj.currentQualitySettings.height)));this.zj.push(t,i)}iF(t){this.Kj(this.Zj()),this.Ej.next(t)}eF(t){this.$j(t),this.Px.load()}Zj(){return[...this.sF(),...this.Vj()?[this.Vj()]:[]]}sF(){if(!this.Px||!this.Fj)return[];const t=[];return this.Fj.getSources(this.Xj.currentQualitySettings.height,this.Jj).forEach((i=>{const e=this.Cw.createElement("source");e.src=i.src,e.type=i.type,t.push(e)})),t}tF(){this.qj&&(this.eF(this.qj),this.qj=null)}Kj(t,i=!1){this.qj=t,i&&this.tF()}Qj(t){let i;switch(t.os){case dt.M.Ios:i=[q.Hevc,q.H264];break;case dt.M.Mac:i=t.osVersion>this.Wj&&t.browser===ue.lI.Safari?[q.Hevc,q.H264]:[q.H264];break;default:i=[q.H264]}return i.map((t=>new Qc(t)))}}!function(t){t.UnexpectedError="unexpectedError",t.BufferingError="bufferingError",t.FragBuffered="fragBuffered",t.ManifestLoaded="manifestLoaded",t.LevelSwitching="levelSwitching",t.StreamEnded="streamEnded"}(tl||(tl={})),function(t){t.Http="http",t.Https="https"}(il||(il={}));var sl=n(1995);const nl={enableWorker:!1,capLevelToPlayerSize:!0,cnxRenderWindow:window,maxBufferSize:5e6,maxBufferLength:5,maxMaxBufferLength:10,liveBackBufferLength:0};class rl extends Kc{constructor(t,i,e,s,n,r,h,o,a){super(t,i),this._x=e,this.nF=s,this.Hj=n,this.rF=r,this.qu=h,this.oF=o,this.aF=a,this.cF=new x.x,this.onHlsEvent=this.cF.asObservable(),this.Ix=[],this.lF=H.Auto,this.uF=320,this.dF=!1,this.pF=!1,this.fF=!1,this.handlerType=Zc.HLS,this.gF=new Xc.X(0),this.mF=!1,this.Ex=()=>{this.Mx.off(this._x.Events.MEDIA_ATTACHED,this.Ex);const t=this.yF(this.bF);this.Mx.loadSource(t),this.Mx.once(this._x.Events.MANIFEST_PARSED,this.Lx)},this.Lx=()=>{this.Mx.off(this._x.Events.MANIFEST_PARSED,this.Lx),this.Mx.on(this._x.Events.LEVEL_SWITCHING,this.wF),this.Mx.on(this._x.Events.LEVEL_SWITCHED,this.xF),this.Mx.on(this._x.Events.FRAG_BUFFERED,this.SF),this.Mx.on(this._x.Events.FRAG_LOADING,this._F),this.Mx.on(this._x.Events.FRAG_LOADED,this.AF),this.Mx.on(this._x.Events.BUFFER_APPENDING,this.PF),this.Mx.on(this._x.Events.BUFFER_APPENDED,this.kF),this.Mx.on(this._x.Events.BUFFER_EOS,this.IF),this.bF=null,this.Ox(),this.TF(),this.CF(),this.MF.resolve()},this.EF=()=>{this.bF=null,this.Px.removeEventListener(N.LoadedMetadata,this.EF),this.LF.resolve()},this.TF=()=>{const t=this.Ix.map((t=>({videoHeight:t.height,isHD:t.height>=720,label:t.level.toString()})));this.cF.next({type:tl.ManifestLoaded,payload:{qualityList:t}})},this.SF=()=>{this.cF.next({type:tl.FragBuffered})},this._F=()=>{this.dF=!0},this.AF=()=>{this.dF=!1},this.PF=()=>{this.pF=!0},this.kF=()=>{this.pF=!1},this.IF=()=>{this.cF.next({type:tl.StreamEnded})},this.Tx=(t,i)=>{if(i.details===this._x.ErrorDetails.BUFFER_STALLED_ERROR&&(this.dF||this.pF?this.cF.next({type:tl.BufferingError}):(this.fF||(this.shouldRecoverMediaError()&&this.Mx.recoverMediaError(),this.Px.play().then((()=>{this.fF=!1})).catch((()=>{this.fF=!1}))),this.fF=!0)),i.fatal)switch(i.type){case this._x.ErrorTypes.NETWORK_ERROR:if(i.details===this._x.ErrorDetails.MANIFEST_PARSING_ERROR)return void this.OF("hls_network_error_manifest_parsing_error_FATAL");if(i.details===this._x.ErrorDetails.MANIFEST_LOAD_ERROR)return void this.cF.next({type:tl.UnexpectedError});if(i.details===this._x.ErrorDetails.LEVEL_LOAD_ERROR&&this.gF.next(this.gF.value+1),this.mF)return this.IF(),void(this.mF=!1);this.Mx.startLoad();break;case this._x.ErrorTypes.MEDIA_ERROR:this.Mx.recoverMediaError();break;default:this.OF("hls_unexpected_error_FATAL",`type_${i.type}_details_${i.details}`)}else i.type===this._x.ErrorTypes.MEDIA_ERROR&&i.details===this._x.ErrorDetails.BUFFER_APPENDING_ERROR&&this.OF("hls_media_error_buffer_appending_error"),i.type===this._x.ErrorTypes.NETWORK_ERROR&&i.details===this._x.ErrorDetails.MANIFEST_PARSING_ERROR&&this.OF("hls_network_error_manifest_parsing_error")},this.RF=()=>{this.OF("hls_video_tag_error",`code_${this.Px.error.code}_message_${this.Px.error.message}`)},this.xF=(t,i)=>{this.uF=this.Ix.find((t=>t.level===i.level)).height,this.Ej.next(this.currentQualitySettings.height),this.Lj.next(this.currentQualitySettings)},this.wF=()=>{this.cF.next({type:tl.LevelSwitching})},this._x.isSupported()&&(this.Mx=this.BF(),this.rF&&(this.Mx.autoLevelCapping=1)),this.uF=this.Hj.height,this.lF=this.Hj.quality}start(){}get liveSyncPosition(){if(this.Mx)return this.Mx.liveSyncPosition}setSource(t,i=!1){this.DF=t.id,this.jj(t),this.bF=t,i&&this.attachMedia()}attachMedia(){return!this.Mx&&this._x.isSupported()&&(this.Mx=this.BF()),new Promise((t=>{if(this.Mx?this.Mx.on(this._x.Events.ERROR,this.Tx):this.Px.addEventListener(N.Error,this.RF),this.initLiveStreamRetry(),this.bF){const i=this.Vj()?[this.Vj()]:[];this.$j(i),this.Mx?this.jF().then((()=>{t()})):this.FF().then((()=>{t()}))}else t()}))}detachMedia(){this.Ix=[],this.Mx?(this.Mx.detachMedia(),this.destroy()):(this.Px.removeAttribute("src"),this.Px.removeEventListener(N.LoadedMetadata,this.EF),this.Px.removeEventListener(N.Error,this.RF))}setQuality(t){this.lF=t.quality,this.uF=t.height,this.Mx&&this.CF(),this.Ej.next(this.currentQualitySettings.height),this.Lj.next(this.currentQualitySettings)}get currentQualitySettings(){return{quality:this.lF,height:this.uF}}onQualityChanged(){return new Promise((()=>{}))}shouldRecoverMediaError(){return!(this.oF&&this.aF)}destroy(){this.Mx?(this.$F(),this.Mx.destroy(),this.Mx=null):(this.Px.removeEventListener(N.LoadedMetadata,this.EF),this.Px.removeEventListener(N.Error,this.RF))}updateSubtitleTrackSource(t){this.Nj(t)}jF(){return this.MF=new sl.C,this.Mx.attachMedia(this.Px),this.Mx.once(this._x.Events.MEDIA_ATTACHED,this.Ex),this.MF.promise}FF(){return this.LF=new sl.C,this.Px.src=this.yF(this.bF),this.Px.addEventListener(N.LoadedMetadata,this.EF),this.LF.promise}$F(){this.Mx.off(this._x.Events.MEDIA_ATTACHED,this.Ex),this.Mx.off(this._x.Events.MANIFEST_PARSED,this.Lx),this.Mx.off(this._x.Events.ERROR,this.Tx),this.Mx.off(this._x.Events.LEVEL_SWITCHING,this.wF),this.Mx.off(this._x.Events.LEVEL_SWITCHED,this.xF),this.Mx.off(this._x.Events.FRAG_BUFFERED,this.SF),this.Mx.off(this._x.Events.FRAG_LOADING,this._F),this.Mx.off(this._x.Events.FRAG_LOADED,this.AF),this.Mx.off(this._x.Events.BUFFER_APPENDING,this.PF),this.Mx.off(this._x.Events.BUFFER_APPENDED,this.kF),this.Mx.off(this._x.Events.BUFFER_EOS,this.IF)}Ox(){this.Mx.levels.forEach(((t,i)=>{this.rF&&i>1||this.Ix.find((({height:i})=>i===t.height))||this.Ix.push({level:i,height:t.height})}))}OF(t,e){(0,i.n)({message:t,exception:this.DF,level:i.D.WARN,callStack:e}),this.cF.next({type:tl.UnexpectedError})}CF(){if(this.lF===H.Auto)this.Mx.currentLevel=-1;else try{this.Mx.currentLevel=this.Ix.find((t=>t.height===this.uF)).level}catch(t){(0,i.n)({message:"HlsSourceHandler_quality_not_present_in_hls_manifest",exception:t.message,callStack:t.stack,level:i.D.CRITICAL})}}yF(t){try{const i=t.getHlsSource(),e=(0,ut.bx)(i);return e&&e.protocol?this.qu.appendParamsToUrl(i):this.qu.appendParamsToUrl(`${this.nF}:${i}`)}catch(t){(0,i.n)({exception:t.message,message:"HlsSourceHandler_undefined_sourceMeta",level:i.D.CRITICAL,callStack:t.stack},{throttle:5,sendMaxLog:!1})}}BF(){return new this._x(Object.assign(Object.assign({},nl),{cnxRenderWindow:this.Cw.global}))}initLiveStreamRetry(){var t;null===(t=this.VF)||void 0===t||t.unsubscribe(),this.VF=this.gF.pipe(function(t){for(var i,e,s=[],n=1;n<arguments.length;n++)s[n-1]=arguments[n];var r=null!==(i=ph(s))&&void 0!==i?i:ji,h=null!==(e=s[0])&&void 0!==e?e:null,o=s[1]||1/0;return(0,qr.e)((function(i,e){var s=[],n=!1,a=function(t){var i=t.buffer;t.subs.unsubscribe(),(0,Oi.P)(s,t),e.next(i),n&&c()},c=function(){if(s){var i=new Mi.w0;e.add(i);var n={buffer:[],subs:i};s.push(n),oh(i,r,(function(){return a(n)}),t)}};null!==h&&h>=0?oh(e,r,c,h,!0):n=!0,c();var l=(0,Wr.x)(e,(function(t){var i,e,n=s.slice();try{for(var r=(0,Ci.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,wh.h)((t=>t.length<3))).subscribe((()=>{this.mF=!0,this.gF.next(0)}))}}var hl;!function(t){t.Disabled="disabled",t.Hidden="hidden",t.Showing="showing"}(hl||(hl={}));class ol{constructor(t,e,s,n){this.Px=t,this.Gx=e,this.if=n,this.UF=!1,this.NF=!1,this.HF=hl.Hidden,this.Jx=!1,this.zF=new x.x,this.qF=!1,this.WF=t=>{let i=!1;switch(t.type){case N.Play:if(!this.Jx&&this.if.config.isInAppAndroid)return void this.pause();this.UF=!0;break;case N.Playing:clearTimeout(this.JF),this.if.config.os.os===dt.M.Ios&&this.qF&&((0,m.UR)(this.Px),this.qF=!1),this.QF(),this.zF.next({type:t.type});break;case N.Timeupdate:this.YF()&&(i=this.KF(t.type)),this.zF.next({type:t.type,payload:{payload:this.UF,isCorruptedCurrentTime:i}});break;case N.Ended:this.zF.next({type:t.type,payload:{isCorruptedCurrentTime:i}});break;case N.Seeked:i=this.KF(t.type),this.zF.next({type:t.type,payload:{isCorruptedCurrentTime:i}});break;case N.Error:clearTimeout(this.JF);const e=this.Px.error?this.Px.error.message:"";this.zF.next({type:t.type,payload:{payload:e}});break;case N.LoadedMetadata:this.NF=!0,(0,P.kE)(this.ZF)&&(this.currentTime=this.ZF,this.ZF=null),this.zF.next({type:t.type});break;case N.Pause:clearTimeout(this.JF),this.zF.next({type:t.type});break;default:this.zF.next({type:t.type})}},this.play=()=>{this.Jx=!0,clearTimeout(this.JF),this.JF=setTimeout((()=>{this.zF.next({type:N.Error,payload:{payload:"play_timeout"}})}),25e3),this.Px.play().catch((t=>{(0,i.n)({message:"ContentPlayer_play_promise_catch",exception:t,level:i.D.INFO})}))},this.pause=()=>{clearTimeout(this.JF),this.Px.pause(),this.UF=!1,this.Jx=!1},this.volume=s,this.Yj()}get videoEvents(){return this.zF.asObservable()}Yj(){this.Gx.forEach((t=>{this.Px.addEventListener(t,this.WF)}))}KF(t){return this.if.config.os.os===dt.M.Ios&&this.Px.currentTime>this.Px.duration&&((0,m.UR)(this.Px),(0,i.n)({message:"ContentPlayer__CorruptedCurrentTime",callStack:`Event type: ${t}`,level:i.D.WARN},{throttle:10}),!0)}YF(){return this.Px.currentTime-this.Px.duration>.1}QF(){this.Px.textTracks&&0!==this.Px.textTracks.length&&Object.keys(this.Px.textTracks).forEach((t=>{this.HF===this.Px.textTracks[t].mode&&(this.Px.textTracks[t].mode=this.HF===hl.Hidden?hl.Disabled:hl.Hidden),this.Px.textTracks[t].mode=this.HF}))}setUnfreeze(){this.qF=!0}set poster(t){(0,P.QM)(t)&&(this.Px.poster=t)}get poster(){return this.Px.poster}get volume(){return this.wp}set volume(t){this.wp=t<=1?t:t/100,this.Px.volume=this.wp,(0,m.Q1)(this.Px,this.wp)}get currentTime(){return this.Px.currentTime}set currentTime(t){this.NF?this.Px.currentTime=t:this.ZF=t}get duration(){return this.Px.duration}get playing(){return this.UF}destroy(){this.Gx.forEach((t=>{this.Px.removeEventListener(t,this.WF)}))}setTrackModes(t){this.HF=t,this.QF()}setMetaLoaded(t){this.NF=t}setCrossOriginAttribute(){this.Px.getAttribute("crossorigin")||this.Px.setAttribute("crossorigin","anonymous")}setPoster(t){this.poster=t.getThumbnailUrl(this.Px.clientWidth,this.Px.clientHeight)}getCurrentTrack(){return this.Px.textTracks&&0!==this.Px.textTracks.length?this.Px.textTracks[0]:null}}const al={height:0,quality:H.Auto};var cl=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 ll extends h._{constructor(t,i,e,s,n,r,h={},o,a){super(),this.mediator=t,this.if=i,this.Cw=e,this.Yp=s,this.pl=n,this.t$=r,this.Tj=h,this.i$=o,this.Hj=a,this.aF=!1,this.e$=!0,this.s$=!1,this.n$=!1,this.Zx=new x.x,this.Wu=.01,this.zj=[],this.r$=t=>{var i;const e={[tl.LevelSwitching]:Y,[tl.StreamEnded]:K,[tl.FragBuffered]:X,[tl.BufferingError]:Q}[t.type];if((0,P.QM)(e))this.mediator.publish(this,e);else{if(t.type===tl.UnexpectedError)return this.n$=!0,void this.h$();if(t.type===tl.ManifestLoaded){const e=null===(i=t.payload)||void 0===i?void 0:i.qualityList;this.mediator.publish(this,it,{payload:{qualityList:e,videoMeta:this.o$}}),this.a$.setMetaLoaded(!0)}}},this.c$=()=>{let t;this.currentTrack.activeCues&&this.currentTrack.activeCues.length>0&&(t=this.currentTrack.activeCues[0]),this.mediator.publish(this,w[w.CaptionUpdate],{payload:t})},this.Dj=()=>{this.currentTrack&&(this.currentTrack.mode=this.l$?hl.Hidden:hl.Disabled,this.currentTrack.oncuechange=this.c$)},this.u$(),this.d$.appendChild(this.Px),this.Yp.appendChild(this.d$),this.Hj=this.Hj||al,this.p$=new el(e,this.pl,this.Yp,this.Px,this.Tj,this.Hj),this.if.config.os.os===dt.M.Ios&&this.if.services.ViewabilityService.on(this.Px,((t,i)=>{!i&&t||this.a$.setUnfreeze()}),{threshold:this.Wu})}initHlsSourceHandler(t){const i=this.Cw.isHttpsProtocolUsed()?il.Https:il.Http,e=(0,P.QM)(this.if.config.bundleID);this.rS=new rl(this.Cw,this.Px,t,i,this.Hj,e,this.if.services.UrlSuffixerService,this.if.config.browser.browserType===ue.lI.Safari,this.aF)}f$(){return cl(this,void 0,void 0,(function*(){if(this.rS)return!0;const t=yield dr();return t&&t.isSupported()||(e=this.Px,(0,P.QM)(e.canPlayType("application/vnd.apple.mpegurl")))?(this.initHlsSourceHandler(t),this.v$(),this.g$(),!0):(this.e$=!1,(0,i.n)({message:"Hls_not_supported",level:i.D.INFO}),!1);var e}))}get onVideoEvents(){return this.Zx.asObservable()}start(){try{this.Gx=Object.values(N),this.a$=new ol(this.Px,this.Gx,this.t$,this.if),this.m$(),this.v$(),this.y$()}catch(t){(0,i.n)({message:"VideoHandler_start",exception:t.message,callStack:t.stack,level:i.D.CRITICAL})}}h$(){this.b$=this.currentTime,this.setSource(this.o$,!0,!0),this.w$.attachMedia().then((()=>{this.a$.play()})).catch((t=>{this.n$=!1,this.Zx.next(N.Error),(0,i.n)({message:"VideoHandler_hls_error_attach_media",exception:t.message,callStack:t.callStack,level:i.D.CRITICAL})}))}g$(){this.zj.push(this.rS.onHlsEvent.subscribe((t=>this.r$(t))))}m$(){this.x$(this.p$)}v$(){this.rS&&this.x$(this.rS)}x$(t){t.start(),this.S$(t)}y$(){this.a$.videoEvents.subscribe((t=>{if(t.payload&&t.payload.isCorruptedCurrentTime)this.w$.handlerType===Zc.HLS&&this.h$();else{if(t.type===N.Canplay&&this.i$&&(this.currentTime=this.i$,this.i$=null),this.Zx.next(t.type),this.n$&&(this.n$=!1,t.type===N.Playing&&(this.a$.currentTime=this.b$)),t.type===N.Error)return(0,i.n)({message:"VideoHandler_play_error_event",exception:t.payload.payload,level:i.D.WARN}),void this.mediator.publish(this,G,t.payload);this.mediator.publish(this,t.type,t.payload)}}))}S$(t){this.zj.push(t.onTrackLoaded.subscribe((()=>this.Dj())),t.onQualityChange.subscribe((t=>this.onQualityChanged(t))),t.onCurrentQuality.subscribe((t=>{this.mediator.publish(this,tt,{payload:t})})))}_$(t,i=!1){return cl(this,void 0,void 0,(function*(){if(i)this.A$();else{if(t){if(yield this.f$())return void(this.w$=this.rS)}this.A$()}}))}get width(){return this.d$.getBoundingClientRect().width}get height(){return this.d$.getBoundingClientRect().height}get currentTime(){return this.a$.currentTime}set currentTime(t){this.a$.currentTime=t}forceCurrentTime(t){this.a$.currentTime=t,this.i$=t}get duration(){return this.a$.duration}get volume(){return this.a$.volume}set volume(t){this.a$.volume=t}get playing(){return this.a$.playing}get isIosFullscreen(){return this.s$}set isIosFullscreen(t){this.s$=t,this.s$&&this.l$?this.P$():this.I$()}get currentQualitySettings(){var t;return null===(t=this.w$)||void 0===t?void 0:t.currentQualitySettings}hide(){(0,m.cn)(this.d$,c.pT)}show(){(0,m.IV)(this.d$,c.pT)}setSource(t,e=!1,s=!1){return cl(this,void 0,void 0,(function*(){try{this.o$=t,this.w$&&this.w$.detachMedia();const i=(0,P.QM)(t.hlsFilePath);return yield this._$(i,s),t&&t.subtitles&&this.a$.setCrossOriginAttribute(),this.a$.setPoster(t),this.a$.setTrackModes(this.l$?hl.Hidden:hl.Disabled),e&&this.a$.setMetaLoaded(!1),this.w$.setSource(t,!0),void this.mediator.publish(this,J)}catch(t){return void(0,i.n)({message:"VideoHandler_set_video_source",exception:t.message,callStack:t.stack,level:i.D.CRITICAL})}}))}setQuality(t){this.w$.setQuality(t)}pause(){this.a$.pause(),this.Zx.next(N.Pause)}play(){var t;return this.T$=new sl.C,null===(t=this.w$)||void 0===t||t.attachMedia().then((()=>{this.a$.play()})).catch((t=>{this.Zx.next(N.Error),(0,i.n)({message:"VideoHandler_public_play_attach_media_error",exception:t.message,callStack:t.callStack,level:i.D.CRITICAL})})),this.T$.promise}hasSubtitles(){return(0,a.BZ)(this.o$.subtitles)}getSubtitles(){return this.o$.subtitles}toggleCaptions(){this.w$.updateSubtitleTrackSource(this.o$.getDefaultSubtitle()),this.l$=!0,this.a$.setTrackModes(hl.Hidden)}showCaptions(t){this.w$.updateSubtitleTrackSource(this.o$.subtitles.find((i=>i.file===t))),this.l$=!0,this.a$.setTrackModes(hl.Hidden)}hideCaptions(){this.w$.updateSubtitleTrackSource(),this.l$=!1,this.a$.setTrackModes(hl.Disabled),this.mediator.publish(this,w[w.CaptionUpdate])}destroy(){this.w$.destroy(),this.d$.parentNode.removeChild(this.d$)}u$(){this.d$=this.Cw.createElementByString('<cnx class="cnx-video-wrapper"></cnx>'),this.Px=this.Cw.createElementByString('<video class="cnx-video-tag"></video>'),this.Tj.os===dt.M.Ios&&(this.Px.setAttribute("playsinline",""),this.Px.setAttribute("webkit-playsinline",""))}A$(){this.w$=this.p$,this.w$.setQuality({quality:H.Auto,height:0})}onQualityChanged(t){const i=this.a$.playing;this.i$=this.currentTime,i&&this.w$.onQualityChanged&&this.w$.onQualityChanged().then((()=>{this.a$.setMetaLoaded(!1),this.a$.play()})),this.mediator.publish(this,Z,{payload:t})}get currentTrack(){return this.a$.getCurrentTrack()}P$(){this.currentTrack&&(this.currentTrack.oncuechange=null,this.mediator.publish(this,w[w.CaptionUpdate]),this.currentTrack.mode=hl.Showing)}I$(){if(this.currentTrack){switch(this.currentTrack.mode){case hl.Showing:case hl.Hidden:this.l$=!0;break;case hl.Disabled:this.l$=!1}this.mediator.publish(this,this.l$?w[w.CaptionOn]:w[w.CaptionOff])}this.Dj()}}class ul extends class{constructor(t,e,s,n,r,h,o){if(this.Rf=t,this.C$=e,this.qu=n,this.M$=o,this.E$=[],this.L$=[],this.O$=[],this.R$=[],this.B$={insights:[],insightsFallback:!1},this.gb=[],this.D$=s.title,this.Iu=s.altText,this.j$=s.description,this.Ux=s.clickUrl,this.E$=s.keywordList,this.F$=s.languageId,this.L$=s.trackList,this.L$&&this.L$.length>0){this.L$.forEach((t=>{t.file=this.qu.appendParamsToUrl(this.$$(on.n.endPoints.base.video,t.file))}));const t=this.L$.findIndex((t=>t.title.indexOf("English")>-1));if(t>-1){const i=this.L$.splice(t,1);this.L$.unshift(...i)}}this.V$=s.thumbnail,this.ma=s.duration,this.R$=s.customFields,this.U$=s.hlsFilePath,this.N$=s.sourceItemId,(0,a.BZ)(r)?(this.B$.insightsFallback=!1,this.B$.insights=r):(this.B$.insightsFallback=!0,this.B$.insights=s.videoIndexes),Array.isArray(r)&&r.length!==s.videoIndexes.length&&(0,i.n)({message:"VideoSourceMeta_insights_mismatch",exception:`media:${this.Rf}, revision:${h}`,callStack:`insights:${r} videoIndexes:${s.videoIndexes}`,level:i.D.WARN},{sendMaxLog:!1}),(0,a.BZ)(s.renditionList)&&(this.O$=this.H$(s.renditionList),this.z$(s.renditionList))}H$(t){return t.sort(((t,i)=>t.height-i.height))}setAvailableQualities(t){this.gb=t}z$(t){(0,a.qy)("height",t).forEach(((t,i)=>{this.gb.push({videoHeight:t.height,label:`${t.height}p`,isHD:t.height>=720})}))}q$(t,i){return this.O$.find((e=>e.codec===t&&e.height===i))}$$(t,i){let e=`${t}${this.Rf}/`;return(0,P.QM)(this.C$)?e+=`${this.C$}/${i}`:e+=i,e}W$(t,i){const e=(0,lt.DE)(t,this.gb.map((t=>t.videoHeight)));return this.q$(i,e)}get hlsFilePath(){return this.U$}getAvailableQualities(){return this.gb}getClosestSourceQuality(t){let i;const e=(0,lt.DE)(t,this.gb.map((t=>t.videoHeight)));return this.gb.forEach((t=>{t.videoHeight===e&&(i=t)})),i}getSources(t,i){const e=[];return i.forEach((i=>{const s=this.W$(t,i.id);(0,a.BZ)(e)||s&&e.push({src:this.qu.appendParamsToUrl(this.$$(on.n.endPoints.base.video,s.file)),type:i.type})})),e}getHlsSource(){return this.$$(on.n.endPoints.base.video,this.U$)}getThumbnailUrl(t,i){const e=this.$$(on.n.endPoints.base.image,this.V$);return ta.getSmartCroppedImageUrl(e,t,i,this.qu)}getDefaultSubtitle(){const t=this.L$.find((t=>t.title.indexOf("English")>-1));return t||this.L$[0]}get title(){return this.D$}get altText(){return(0,P.$K)(this.Iu)?this.Iu:""}get description(){return this.j$}get clickUrl(){return this.Ux}get keywords(){return this.E$}get languageId(){return this.F$}get sourceItemId(){return this.N$}get subtitles(){return(0,a.BZ)(this.L$)?this.L$:void 0}get spriteSheet(){return this.J$}get duration(){return this.ma}get id(){return this.Rf}get customFields(){return this.R$}get insights(){return this.B$}get sentimentAnalysis(){return this.M$}}{constructor(t,i){super(null,null,t,i,null,null,null),this.qu=i}getSources(t,i){return i.map((({id:i,type:e})=>{const s=this.W$(t,i);if(s)return{type:e,src:this.qu.appendParamsToUrl(`${s.file}`)}})).filter((t=>t))}getThumbnailUrl(t,i){return ta.getSmartCroppedImageUrl(this.V$,t,i,this.qu)}}class dl extends Gc{constructor(t,i,e,n,r,h=0,o={}){super(t,i,n,r,e.services.UrlSuffixerService),this.if=e,this.t$=h,this.Tj=o,this.Q$=.1,this.type=s.ProtoMediaTypeEnum.Video,this.X$={[V.Landscape]:{renditionList:[],videoSourceMeta:void 0},[V.Portrait]:{renditionList:[],videoSourceMeta:void 0}},this.Y$=null,this.getClosestSourceQuality=t=>(this.K$||this.Z$(),this.X$[this.K$].videoSourceMeta.getClosestSourceQuality(t)),this.tV(),this.iV()}tV(){this.oj.videoRendition.renditions.forEach((({codec:t,height:i,width:e,videoUrl:s})=>{const n={codec:ma.ProtoPlayspaceCodecEnum[t],height:i,file:s};i<e?this.X$[V.Landscape].renditionList.push(n):this.X$[V.Portrait].renditionList.push(n)}));const t=this.X$[V.Landscape].renditionList,e=this.X$[V.Portrait].renditionList;(0,a.BZ)(t)||(0,a.BZ)(e)?((0,a.BZ)(t)||(this.X$[V.Landscape].renditionList=e),(0,a.BZ)(e)||(this.X$[V.Portrait].renditionList=t)):(0,i.n)({message:"SlideVideo_no_renditions",level:i.D.CRITICAL})}iV(){Object.keys(this.X$).forEach((t=>{const i=this.X$[t];i.videoSourceMeta=new ul({title:this.oj.title,altText:this.oj.altText,clickUrl:this.oj.clickUrl,renditionList:i.renditionList,thumbnail:this.oj.imageUrl},this.qu)}))}eV(t){this.sV=new ll(this,this.if,this.Cw,t,this.pl,this.t$,this.Tj,this.Q$)}nV(){this.subscribe(Z,this.sV,(({payload:t})=>{const i=this.getClosestSourceQuality(t);this.mediator.publish(this,Z,{payload:i.videoHeight})}))}Z$(){const{clientHeight:t,clientWidth:i}=this.kD;this.K$=t<i?V.Landscape:V.Portrait}rV(t){let i;this.sV&&(t&&(i=this.sV.currentTime),this.sV.setSource(this.X$[this.K$].videoSourceMeta,!0).then((()=>{t&&this.sV.forceCurrentTime(i),this.sV.playing&&this.hV()})))}cj(){return'<cnx class="cnx-ui-ps-video-container"></cnx>'}hV(){this.sV.play().catch((()=>{}))}play(){this.isLoaded&&this.hV()}pause(){this.isLoaded&&this.sV.pause()}reset(){this.aj&&(this.sV.currentTime=this.Q$)}load(t){this.isLoaded||(t.appendChild(this.kD),this.isLoaded=!0,this.eV(this.kD),this.nV(),this.sV.start(),this.Z$(),this.rV(),this.Y$&&this.setQuality(this.Y$),this.pause())}getAvailableQualities(){return this.X$[this.K$].videoSourceMeta.getAvailableQualities()}get currentQuality(){return this.sV.currentQualitySettings}get volume(){return this.isLoaded?this.sV.volume:this.t$}set volume(t){this.isLoaded?this.sV.volume=t:this.t$=t}setQuality(t){this.sV?this.sV.setQuality(t):this.Y$=t}onSlideResizeCallback(){const t=this.K$;this.Cw.cancelRequestAnimationFrame(this.aV),this.aV=this.Cw.requestAnimationFrameHelper((()=>{if(this.Z$(),t!==this.K$){const t=!0;this.rV(t)}}))}}class pl{constructor(t){this.YO=t}get template(){return`\n <cnx class="cnx-ui-ps-slide-wrapper">\n <cnx class="cnx-ui-ps-slide"></cnx>\n <cnx class="cnx-ui-ps-slide-bg"></cnx>\n <cnx class="cnx-ui-ps-cta-wrapper">\n ${this.cV()}\n </cnx>\n </cnx>\n `.trim()}cV(){return this.YO.disableCTARendering?"":`[[${xe.CtaButton}]]`}}class fl extends qo{enterState(){super.enterState();const t=this.context.getComponent(xe.PlayspaceProgressBar);t&&t.startProgress();const i=this.context.getComponent(xe.CtaButton);i&&i.startProgress()}exitState(){super.exitState()}updateDuration(){const t=this.context.getComponent(xe.PlayspaceProgressBar);t&&t.startProgress()}}class vl extends Go{enterState(){super.enterState();const t=this.context.getComponent(xe.PlayspaceProgressBar);t&&t.pauseProgress();const i=this.context.getComponent(xe.CtaButton);i&&i.pauseProgress()}exitState(){super.exitState()}updateDuration(){}}class gl extends vl{enterState(){super.enterState()}exitState(){super.exitState()}}class ml extends vl{enterState(){super.enterState()}exitState(){super.exitState()}}class yl extends vl{enterState(){super.enterState()}exitState(){super.exitState()}}class bl extends Vs{constructor(t,i,e,s,n,r,h,o,a){super(t,i,e,n,new Lc(e,a,s,i,{isMobile:r})),this.mediator=t,this.$container=i,this.Cw=e,this.PR=h,this.oD=[xe.CtaButton],this.gD=new Vc,this.Iw={[z.PlayingState]:new fl(this),[z.PausedState]:new vl(this),[z.StoppedState]:new gl(this),[z.HiddenState]:new ml(this),[z.PrerollState]:new yl(this),[z.PostrollState]:new yl(this)},this.lV(),this.Iw[o].enterState(),this._D(),this.AD(!1)}lV(){const t=this.getComponent(xe.CtaButton);t&&t.setFooterElement(this.PR)}_D(t=[]){this.gD.setCapabilityList(t)}AD(t=!0){const{excludedComponents:i,includedComponents:e}=this.gD.getComponentList();i.map((t=>this.getComponent(t))).forEach((i=>i&&i.hideComponent(t))),e.map((t=>this.getComponent(t))).forEach((i=>i&&i.showComponent(t)))}yD(t){switch(t){case na.CallToAction:this.mediator.publish(this,na.GeneralClickInteraction,{payload:s.ProtoMediaClickTypeEnum.UrlClick});break;case fe.Z[fe.Z.Scroll]:this.mediator.publish(this,na.GeneralClickInteraction,{payload:s.ProtoMediaClickTypeEnum.ScrollClick})}}handleComponentEvent(t,i,e){this.yD(t),t===na.CallToAction?(0,P.QM)(i.payload)?this.mediator.publish(this,na.CallToAction,i):this.mediator.publish(this,w[w.Next]):this.mediator.publish(this,t,i)}handleCapabilityList(t){this._D(t),this.AD(),this.oD.forEach((i=>{const e=this.getComponent(i);e&&e.handleCapabilities(t)}))}}class wl extends h._{constructor(t,i,e,s,n,r,h,o,a,c){super(),this.mediator=t,this.oj=i,this.Cw=e,this._m=s,this.pl=n,this.uV=r,this.Qt=h,this.YO=o,this.PR=a,this.vp=c,this.dV=[{type:Ta.TopLogo,metadata:{}}],this.Am=this.Cw.createElementByString(`<cnx class="${xo}"></cnx>`),this.pV(),this.fV=this.Am.querySelector(".cnx-ui-ps-slide")}get $container(){return this.Am}get slideCapabilityList(){return this.dV}get metadata(){return this.oj}get media(){return this.uV}load(){this.uV.load(this.fV)}get clickUrl(){return this.oj.clickUrl}updateCapabilityMetadata(t){if(!(0,a.BZ)(this.dV))return;const i=this.dV.find((({type:i})=>i===t.type));i&&(i.metadata=Object.assign(Object.assign({},i.metadata),t.metadata))}changeState(t){this.FD.changeState(t)}pV(){this.FD=new bl(this,this.Am,this.Cw,this.pl,this.cj(),this.Qt,this.PR,this.vp.playbackMode===ma.ProtoPlayerPlaybackModeEnum.ClickToPlay?z.StoppedState:z.PausedState,this._m),this.subscribe(na.CallToAction,this.FD,(({payload:t})=>{this.mediator.publish(this,na.CallToAction)})),this.relay(na.GeneralClickInteraction,this.FD,this,this.mediator),this.subscribe(w[w.Next],this.FD,(()=>{this.mediator.publish(this,w[w.Next])}))}cj(){return new pl(this.YO).template}vV(t,i){this.dV.push({type:t,metadata:i})}gV(){const t=this.mV(this.oj);if(!t)return;const i={label:t,useTransition:!0};this.vV(Ta.TopSlideTitle,i)}mV(t){const i=t.publisherName||t.title,e=this.Cw.stripHtmlTags(i).trim();return t.publisherName?`by <em>${e}</em>`:e}onSlideTransitionStart(t){this.FD&&this.FD.handleCapabilityList(t)}}class xl extends wl{constructor(t,e,s,n,r,h,o,c,l,u){super(t,e,s,n,r,h,o,c,l,u),this.type=ma.ProtoPlayspaceSlideTypeEnum.BulletList,(0,P.as)(e.bulletListMetadata)&&(0,a.BZ)(this.metadata.bulletListMetadata.items)?(this.yV(),this.onSlideTransitionStart(this.dV)):(0,i.n)({message:"BulletSlide_no_metadata",level:i.D.CRITICAL})}yV(){this.bV(),this.gV(),this.wV()}bV(){const{title:t,items:i}=this.oj.bulletListMetadata;i.length>4&&(i.length=4);const e=Ta.SlideTitle,s={bulletChunkList:i,titleType:Ca.Bullet};(0,P.QM)(t)&&(s.label=t),this.vV(e,s)}wV(){const t={label:this.oj.storyTitle,useFallbackLabel:!0};this.vV(Ta.TopStoryTitle,t)}}class Sl extends wl{constructor(t,e,s,n,r,h,o,c,l,u){super(t,e,s,n,r,h,o,c,l,u),this.type=ma.ProtoPlayspaceSlideTypeEnum.Description,(0,P.as)(e.descriptionMetadata)&&(0,a.BZ)(this.metadata.descriptionMetadata.chunkList)?(this.xV(),this.SV(),this.onSlideTransitionStart(this.dV)):(0,i.n)({message:"DescriptionSlide_no_metadata",level:i.D.CRITICAL})}xV(){const{chunkList:t,label:i}=this.oj.descriptionMetadata;let e=!1;const s=t=>(0,P.r)(t);(0,P.as)(i)&&(0,P.QM)(i.text)&&(e=!0,i.colorScheme=s(i.colorScheme)?i.colorScheme:ma.ProtoPlayspaceColorSchemeEnum.Primary),(0,a.BZ)(t)&&t.forEach(((t,i)=>{t.colorScheme=0!==i||e?s(t.colorScheme)?t.colorScheme:ma.ProtoPlayspaceColorSchemeEnum.Secondary:s(t.colorScheme)?t.colorScheme:ma.ProtoPlayspaceColorSchemeEnum.Primary}))}SV(){this._V(),this.wV(),this.gV()}_V(){const{chunkList:t,label:i}=this.oj.descriptionMetadata,e=Ta.SlideTitle,s={descriptionChunkList:t,titleType:Ca.Description};(0,P.as)(i)&&(s.label=i.text,s.labelColorScheme=i.colorScheme),this.vV(e,s)}wV(){const t={label:this.oj.storyTitle,useFallbackLabel:!0};this.vV(Ta.TopStoryTitle,t)}}const _l={[s.ProtoMediaTypeEnum.Image]:"Read more",[s.ProtoMediaTypeEnum.Video]:"Continue video"};class Al extends wl{constructor(t,i,e,s,n,r,h,o,a,c){super(t,i,e,s,n,r,h,o,a,c),this.type=ma.ProtoPlayspaceSlideTypeEnum.Default,this.SV(),this.onSlideTransitionStart(this.dV)}SV(){this.AV(),this.PV(),this.kV(),this.TV(),this.CV(),this.wV(),this.oj.publisherName&&this.gV()}AV(){const{clickUrl:t,title:i}=this.oj,e={url:t,label:i,titleType:Ca.Default};this.vV(Ta.SlideTitle,e)}PV(){this.vV(Ta.PlaybackControls)}kV(){this.vV(Ta.PlaylistControls)}CV(){const{clickUrl:t,title:i}=this.oj;if(!(0,P.QM)(t))return;const e={url:t,label:this.EV(this.oj),title:i,ctaAlignToContent:!0};this.vV(Ta.CtaButton,e)}TV(){this.oj.mediaType===s.ProtoMediaTypeEnum.Video&&this.vV(Ta.VolumeControls)}wV(){const t=this.Cw.stripHtmlTags(this.oj.storyTitle).trim();if(!t)return;const i={label:t,useFallbackLabel:!0};this.vV(Ta.TopStoryTitle,i)}EV(t){const{capabilityList:i,mediaType:e}=t;if(!(0,a.BZ)(i))return _l[e];const s=i.find((({type:t})=>t===ma.ProtoPlayspaceSlideCapabilitiesEnum.CtaButton));return s&&s.metadata?s.metadata.label:_l[e]}}class Pl extends wl{constructor(t,i,e,s,n,r,h,o,a,c,l){super(t,i,e,s,n,r,o,a,c,l),this.LV=h,this.type=ma.ProtoPlayspaceSlideTypeEnum.Cover,this.OV(),this.SV(),this.onSlideTransitionStart(this.dV)}OV(){(0,m.cn)(this.Am,Wa.Cover)}SV(){this.AV(),this.CV()}AV(){const t=Ta.SlideTitle,i={titleType:Ca.Cover,coverChunk:this.oj.coverMetadata,label:`${this.LV} min. story`};this.vV(t,i)}CV(){const t={label:"START",duration:this.oj.slideDuration,ctaAlignToContent:!1,ctaAlignToFooter:!0};this.vV(Ta.CtaButton,t)}}class kl extends wl{constructor(t,e,s,n,r,h,o,a,c,l){super(t,e,s,n,r,h,o,a,c,l),this.type=ma.ProtoPlayspaceSlideTypeEnum.Quote,(0,P.as)(e.quoteMetadata)?(this.SV(),this.onSlideTransitionStart(this.dV)):(0,i.n)({message:"QuoteSlide_no_metadata",level:i.D.CRITICAL})}SV(){this.wV(),this.gV(),this.RV()}wV(){const t={label:this.oj.storyTitle,useFallbackLabel:!0};this.vV(Ta.TopStoryTitle,t)}RV(){const{text:t,source:i}=this.oj.quoteMetadata,e=Ta.SlideTitle,s={quote:t,source:i,titleType:Ca.Quote};this.vV(e,s)}}class Il extends wl{constructor(t,i,e,s,n,r,h,o,a,c){super(t,i,e,s,n,r,h,o,a,c),this.type=ma.ProtoPlayspaceSlideTypeEnum.Instagram,this.OV(),this.SV(),this.onSlideTransitionStart(this.dV)}OV(){(0,m.cn)(this.Am,Wa.Instagram)}SV(){this.BV(),this.wV(),this.gV(),this.CV()}BV(){const{createdDate:t,comments:i,likes:e}=this.oj.instagramMetadata,s={label:this.oj.title,instagramMetadata:{createdDate:t,comments:i,likes:e},titleType:Ca.Instagram};this.vV(Ta.SlideTitle,s)}wV(){const t={label:this.oj.storyTitle,useFallbackLabel:!0};this.vV(Ta.TopStoryTitle,t)}CV(){const{clickUrl:t,title:i}=this.oj;if(!(0,P.QM)(t))return;const e={url:t,label:"VISIT POST",title:i,ctaAlignToContent:!1,ctaAlignToFooter:!0};this.vV(Ta.CtaButton,e)}DV(t){const i=this.metadata.instagramMetadata.handle||t.publisherName,e=this.Cw.stripHtmlTags(i).trim();return t.publisherName?`by <em>${e}</em>`:e}gV(){const t=this.DV(this.oj);if(!t)return;const i={label:t,useTransition:!0};this.vV(Ta.TopSlideTitle,i)}}class Tl{constructor(t,i,e,s,n,r,h,o,a,c){this.if=t,this.Cw=i,this._m=e,this.pl=s,this.t$=n,this.Tj=r,this.Qt=h,this.jV=o,this.PR=a,this.vp=c,this.FV={[ma.ProtoPlayspaceSlideTypeEnum.Description]:Sl,[ma.ProtoPlayspaceSlideTypeEnum.Default]:Al,[ma.ProtoPlayspaceSlideTypeEnum.Quote]:kl,[ma.ProtoPlayspaceSlideTypeEnum.BulletList]:xl,[ma.ProtoPlayspaceSlideTypeEnum.Instagram]:Il}}getSlide(t,i,e){const s=this.FV[t.type]||Al,n=this.$V(t,i);return t.type===ma.ProtoPlayspaceSlideTypeEnum.Cover?new Pl(i,t,this.Cw,this._m,this.pl,n,e,this.Qt,this.jV,this.PR,this.vp):new s(i,t,this.Cw,this._m,this.pl,n,this.Qt,this.jV,this.PR,this.vp)}$V(t,i){if(t.mediaType===s.ProtoMediaTypeEnum.Video)return new dl(i,t,this.if,this.Cw,this.pl,this.t$,this.Tj);if(t.mediaType===s.ProtoMediaTypeEnum.Image)return new Jc(i,t,this.Cw,this.pl,this.if.services.UrlSuffixerService);throw new Error("Slide not found")}}var Cl=n(7593),Ml=n(5732),El=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 Ll extends h._{constructor(t,i,e,n,r,h,o){super(),this.mediator=t,this.Cw=i,this.pl=e,this.vp=n,this.if=r,this.MO=h,this.VV=o,this.UV=new Cl.t(ma.ProtoPlayspaceMediaMetadataResponse,"PlayspaceContentHandler"),this.NV=0,this.HV=!1,this.zV=new Xc.X(!1),this.qV=t=>{t&&(this.FD.onFirstTimeInView(),this.if.services.ViewabilityService.off(this.MO,this.qV))},this.WV(),this.pV(),this.GV(),this.JV(),this.volume=this.vp.soundMode===s.ProtoPlayerSoundMode.On?1:0,this.kL(),this.if.services.ViewabilityService.on(this.MO,this.qV,{threshold:.5})}QV(t){return new Promise(((e,s)=>{this.UV.fetchMetadata(t).then((t=>{if(window.parent.cnx_ps_slide_list&&(0,In.Ph)("cnx_ps_slide_list",this.if.config.pageUrl)&&(t.slides=[...window.parent.cnx_ps_slide_list,...t.slides]),t.slides=this.XV(t.slides),t.slides=this.YV(t.slides),t.slides.length>=2)e(t);else{if(this.HV)return void s({message:"fallbackstory_already_used"});this.HV=!0,this.KV().then((t=>{const i=this.if.services.UrlSuffixerService.appendParamsToUrl(`${on.n.endPoints.base.metadata}${t.storyId}/${t.activeVersionId}.bin`);e(this.QV(i))})).catch((t=>{(0,i.n)({level:i.D.CRITICAL,message:"PlayspaceContentH_error_getting_default_story"}),s(t)}))}})).catch((t=>{s(t)}))}))}KV(){return new Promise(((t,i)=>{this.ZV&&t(this.ZV),un.n.sendProtoRequest({ProtoResponse:ma.ProtoFallbackStoryResponse,endpoint:on.n.endPoints.api.fallbackstory,logError:!0}).then((i=>{this.ZV=i,t(i)})).catch((t=>{i(t)}))}))}XV(t){const i=["newsid"],{hostname:e,pathname:s,search:n}=this.tU(this.if.config.appPageURL),r={};(0,P.QM)(n)&&i.forEach((t=>{n.indexOf(t)>-1&&(r[t]=(0,In.Ph)(t,n))}));let h=`${e}${s}`;return Object.keys(r).forEach((t=>{h=(0,In.Bp)(h,t,r[t])})),t.filter((t=>{const i=(0,ut.bx)(t.clickUrl);return!(i&&i.hostname+i.pathname===h)}))}tU(t){const{hostname:i,pathname:e,search:s}=(0,P.QM)(t)?(0,ut.bx)(t):this.Cw.getGlobalLocationProperties();return{hostname:i,pathname:e,search:s}}YV(t){return t.filter((t=>t.type!==ma.ProtoPlayspaceSlideTypeEnum.Stock))}GV(){const{browserType:t}=this.if.config.browser,{os:i,osVersion:e}=this.if.config.os,n={disableCTARendering:this.vp.disableCTARendering};this.jD=new ga(this,this.Cw,this.if.services.PageFocusService,this.FD.$mediaContainer,new Tl(this.if,this.Cw,this.if.services.InteractionService,this.pl,this.vp.soundMode===s.ProtoPlayerSoundMode.On?1:0,{browser:t,os:i,osVersion:e},this.if.config.isMobile,n,this.FD.footer,this.vp),this.vp.isSeoTraffic)}WV(){this.iU={logoUrl:this.vp.logoUrl,isMobile:this.if.config.isMobile,closeButtonMode:this.vp.closeButtonMode,floatingCloseButtonMode:this.vp.floatingSettings.floatingCloseButtonMode,isCloseButton:this.vp.isCloseButton,sharingDestinations:this.vp.sharingDestinations,os:this.if.config.os.os,expandButtonEnabled:this.vp.uiComponentsVisibility.expandButton,primaryColorList:{background:this.vp.primaryColorList.background||c.QO.PrimaryBackground,foreground:this.vp.primaryColorList.foreground||c.QO.PrimaryForeground},secondaryColorList:{background:this.vp.secondaryColorList.background||c.QO.SecondaryBackground,foreground:this.vp.secondaryColorList.foreground||c.QO.SecondaryForeground},accentColorList:{background:this.vp.accentColorList.background,foreground:this.vp.accentColorList.foreground||c.QO.AccentForeground},useAccentColorForProgressBar:this.vp.useAccentColorForProgressBar,disableClickUrl:this.vp.disableClickUrl,fontFamilySettings:this.vp.fontFamilySettings}}pV(){const t=new ya({disableStoryProgressBarRendering:this.vp.disableStoryProgressBarRendering,disableTitleRendering:this.vp.disableTitleRendering});this.FD=new Hc(this,this.MO,this.if.services.GlobalDomUtilsService,this.if.services.ResizeObserver,t.template,this.iU,this.if.config.appId,this.vp.playbackMode===s.ProtoPlayerPlaybackModeEnum.ClickToPlay?z.StoppedState:z.PausedState,this.if.services.InteractionService),this.FD.setMediaContainerRatio(this.VV.getContentRatioContainer()),this.FD.show()}kL(){this.subscribe(oa,this.jD,(({payload:{nextSlide:t}})=>{const i=t;let e=[];i.media.type===s.ProtoMediaTypeEnum.Video&&(e=i.media.getAvailableQualities(),this.FD.updateQuality(i.media.currentQuality)),this.FD.updateQualityMenu(e),this.FD.onSlideTransitionStart(i.slideCapabilityList),i.onSlideTransitionStart(i.slideCapabilityList)})),this.subscribe(ca,this.jD,(()=>{this.FD.onSlideTransitionEnd()})),this.subscribe(la,this.jD,(({payload:{elapsedTime:t,duration:i}})=>{this.FD.onSlideTimeUpdate(t,i)})),this.subscribe(aa,this.jD,(({payload:{index:t}})=>{this.FD.setCurrentIndex(t),this.FD.setDuration(this.jD.remainingTime),this.mediator.publish(this,ra.ChangeSlide)})),this.subscribe(ua,this.jD,(()=>{this.eU.handleSlidesEnd()})),this.subscribe(Z,this.jD,(({payload:t})=>{const i=this.jD.getCurrentSlide();i&&i.media.type===s.ProtoMediaTypeEnum.Video&&this.FD.updateQuality(i.media.currentQuality),this.mediator.publish(this,Z,{payload:t})})),this.subscribe(w[w.Play],this.FD,(()=>{this.mediator.publish(this,o.Uh.UserInteraction,{payload:{playback:!0}});this.play(!0)})),this.subscribe(w[w.Pause],this.FD,(()=>{this.mediator.publish(this,o.Uh.UserInteraction,{payload:{playback:!1}});this.pause(!0)})),this.subscribe(w[w.Volume],this.FD,(({payload:t})=>{this.volume=t,this.mediator.publish(this,o.Uh.UserInteraction,{payload:{volume:!0}}),this.mediator.publish(this,w[w.Volume],{payload:{volume:t}})})),this.subscribe(w[w.Close],this.FD,(()=>{this.mediator.publish(this,o.Uh.UserInteraction,{payload:{playback:!1}}),this.mediator.publish(this,w[w.Close])})),this.subscribe(w[w.LogoClicked],this.FD,(()=>{this.mediator.publish(this,w[w.LogoClicked])})),this.subscribe(na.ProgressBarItemClicked,this.FD,(({payload:t})=>{this.mediator.publish(this,o.Uh.UserInteraction,{payload:{playback:!0}}),this.setSlide(t),this.mediator.publish(this,na.ProgressBarItemClicked,{payload:t})})),this.subscribe(na.CallToAction,this.jD,(()=>{this.mediator.publish(this,na.CallToAction)})),this.subscribe(w[w.Expand],this.FD,(()=>{this.mediator.publish(this,w[w.Expand])})),this.subscribe(w[w.Collapse],this.FD,(()=>{this.mediator.publish(this,w[w.Collapse])})),this.subscribe(fe.Z[fe.Z.HoldStart],this.FD,(()=>{this.eU.pauseToggle()})),this.subscribe(fe.Z[fe.Z.HoldEnd],this.FD,(()=>{this.eU.pauseToggle()})),this.subscribe(fe.Z[fe.Z.TapLeft],this.FD,(()=>{this.sU(),this.goToPrevSlide()})),this.subscribe(fe.Z[fe.Z.TapRight],this.FD,(()=>{this.sU(),this.goToNextSlide()})),this.subscribe(fe.Z[fe.Z.SwipeEnd],this.FD,(({payload:t})=>{t===Nc.Av.Left?this.eU.goToNextSlide():this.eU.goToPrevSlide()})),this.subscribe(fe.Z[fe.Z.SwipeMove],this.FD,(({payload:t})=>{this.jD.offsetSlides(t)})),this.subscribe(w[w.Quality],this.FD,(({payload:t})=>{this.jD.setQuality(t)})),this.subscribe(w[w.Next],this.FD,(()=>{this.sU(),this.goToNextSlide()})),this.subscribe(w[w.Next],this.jD,(()=>{this.sU(),this.goToNextSlide()})),this.subscribe(w[w.Prev],this.FD,(()=>{this.sU(),this.goToPrevSlide()})),this.relay(na.GeneralClickInteraction,this.FD,this,this.mediator),this.relay(na.GeneralClickInteraction,this.jD,this,this.mediator)}nU(){if((0,P.$K)(this.vp.storyMetadata)){const t=this.vp.storyMetadata;this.rU(t)}else{let{storyId:t,activeVersion:e}=this.vp;const s=(0,In.Ph)("cnx_force_fallback",this.if.config.pageUrl);s&&(t="00000000-0000-0000-0000-000000000002",e=s);const n=this.if.services.UrlSuffixerService.appendParamsToUrl(`${on.n.endPoints.base.metadata}${t}/${e}.bin`);if(!(0,P.QM)(e))return void this.hU();this.QV(n).catch((t=>{throw this.hU(),t})).then((t=>{this.rU(t)})).catch((t=>{(0,i.n)({message:"PlayspaceContentH_error_fetchMetadata",level:i.D.CRITICAL,exception:t.message,callStack:t.stack})}))}}hU(){this.KV().then((t=>{const i=this.if.services.UrlSuffixerService.appendParamsToUrl(`${on.n.endPoints.base.metadata}${t.storyId}/${t.activeVersionId}.bin`);return this.QV(i)})).then((t=>{this.HV=!0,this.rU(t)}))}rU(t){return El(this,void 0,void 0,(function*(){const i=yield this.oU();t.slides=t.slides.map((i=>Object.assign(Object.assign({},i),{storyTitle:t.storyTitle,publisherName:this.vp.publisherName}))),this.aU=Object.assign(Object.assign({},i),t),this.jD.start(t.slides),this.FD.setTotalSlides(t.slides.length);const e=this.vp.storyPosition&&this.vp.storyPosition<t.slides.length?this.vp.storyPosition:0;this.jD.setCurrentSlide(e),this.mediator.publish(this,ha.ContentHandlerReady),this.zV.next(!0)}))}oU(){return El(this,void 0,void 0,(function*(){try{let t=this.vp.storyId,i=this.vp.activeVersion;if(this.HV){const e=yield this.KV();t=e.storyId,i=e.activeVersionId}const e=yield Zh.k.loadInsights({insightsInputType:Ml.i.Story,id:t,versionId:i});return{storyId:t,activeVersion:i,insights:e}}catch(t){return{}}}))}JV(){const{preRollBreak:t,postRollBreak:i}=this.vp,e=(0,P.r)(t),s=(0,P.r)(i);this.eU=new Wc(this,this.jD,this.FD,e,s,this.vp.endOfSlideCycleMode,null!==this.vp.storyPosition),this.cU()}cU(){this.subscribe(zc,this.eU,(({payload:t})=>{this.FD.changeState(t);const i=this.jD.getCurrentSlide();i&&i.changeState(t),this.mediator.publish(this,ha.StateChanged,{payload:t})})),this.subscribe(qc,this.eU,(()=>{this.mediator.publish(this,ha.NewStory)})),this.relay([ha.ContentStart,ha.ContentEnd],this.eU,this,this.mediator)}sU(){this.mediator.publish(this,o.Uh.UserInteraction,{payload:{playback:!0}})}set hasPostroll(t){this.eU.hasPostroll=t}set hasPreroll(t){this.eU.hasPreroll=t}setViewabilityState(t){this.eU.setViewabilityState(t)}goToNextSlide(){this.eU.goToNextSlide()}goToPrevSlide(){this.eU.goToPrevSlide()}getNextSlide(){return this.jD.getNextSlide()}getCurrentThumbnailUrlParams(t,i){return this.jD.getCurrentThumbnailUrlParams(t,i)}getCurrentMetadata(){return this.jD.getCurrentMetadata()}getCurrentStoryMeta(){return this.aU}start(){return El(this,void 0,void 0,(function*(){this.nU()}))}get volume(){return this.NV}set volume(t){this.NV=t,this.jD.setVolume(t),this.FD.updateVolume(t)}play(t){this.eU.play(t)}pause(t){this.eU.pause(t)}show(){this.eU.show()}hide(){this.eU.hide()}enterFullscreen(){this.FD.expand()}exitFullscreen(){this.FD.collapse()}setSlide(t){this.play(!1),this.eU.setCurrentSlide(t)}onResize(){this.jD.onPlayerContainerResize(),this.FD.onResizeUi(this.jD.remainingTime,this.jD.isPlaying)}get currentSlideIndex(){return this.jD.currentSlideIndex}get slides(){return this.jD.slides}updateCtaLabel(t,i){const e={type:Ta.CtaButton,metadata:{label:i}};this.jD.updateCapabilityMetadata(t,e),t===this.jD.currentSlideIndex&&this.FD.updateCapabilityMetadata(e)}get slidesMetadata(){return this.jD.slidesMetadata}toggleExpandButton(t){t?this.FD.showExpandButton():this.FD.hideExpandButton()}getQuality(){return this.jD.getQuality()}setQuality(t){const i={height:t,quality:H.Strict};this.jD.setQuality(i)}stop(){this.eU&&this.eU.stop()}resume(){this.eU&&this.eU.resume()}startContent(){this.eU.exitRollBreak()}canPlay(){return this.zV.asObservable()}destroy(){this.jD&&this.jD.destroy(),this.FD&&this.FD.destroy()}}var Ol,Rl;!function(t){t[t.Play=0]="Play",t[t.Pause=1]="Pause"}(Ol||(Ol={}));class Bl{constructor(t,i){switch(this.mediator=t,this.inView=!1,this.uU=!1,this.dU=!1,this.pU=!1,this.fU=()=>{},i){case s.ProtoPlayerPlaybackModeEnum.Autoplay:this.vU(this.gU);break;case s.ProtoPlayerPlaybackModeEnum.ClickToPlay:this.vU(this.mU);break;case s.ProtoPlayerPlaybackModeEnum.ScrollToPlay:this.vU(this.yU)}}vU(t){this.fU=()=>{this.uU||t.call(this)}}gU(){this.pU&&!this.dU&&this.inView&&(this.dU=!0,this.mediator.publish(this,Ol[Ol.Play]))}yU(){this.pU&&(this.inView||this.rd&&!this.inView?(this.mediator.publish(this,Ol[Ol.Play],{payload:{volume:this.wp}}),this.wp=null):(this.wp=this.volume,this.mediator.publish(this,Ol[Ol.Pause],{payload:{volume:0}})))}mU(){}setViewability(t){this.inView=t,this.fU()}setSoundVolume(t){this.volume=t}setUserPlayback(t){!this.dU&&t&&(this.dU=t),this.uU=!t}setCanPlay(t){this.pU=t,this.uU||!this.inView&&!this.dU||this.fU()}setIsFullscreen(t){this.rd=t}}!function(t){t.enter="enterFullscreen",t.exit="exitFullscreen"}(Rl||(Rl={}));class Dl{constructor(t,e,s,n){if(this.mediator=t,this.Cw=e,this.Zt=n,this.bU=!1,this.wU=1e3,this.xU=!0,this.rd=!1,this.SU=()=>{this.bU&&this._U()},this.AU=t=>{this.bU?null!==this.fullscreenElement?this._U():this.PU():this.mediator.publish(this,Rl.exit)},this.PU=()=>{this.rd=!1,this.kU.reject(),this.bU=!1,clearTimeout(this.IU)},this.Cj=n&&n===dt.M.Ios?s.getElementsByTagName("video")[0]:s,!this.Cj)throw new Error("element is missing");try{const t=this.TU();if(null==t)return void(this.xU=!1);this.CU=t.keys,this.MU=t.name,this.Yj()}catch(t){this.xU=!1,(0,i.n)({message:"Fullscreen init failed",exception:t.message,callStack:t.stack,level:i.D.CRITICAL})}}TU(){let t;return t=this.Zt===dt.M.Ios?this.Cw.getFullscreenKeys(this.Cj):this.Cw.getFullscreenKeys(),t}get fullscreenElement(){return this.Cw.getDocumentProperty(this.CU.fullscreenElement)}get fullscreenEnabled(){return this.Cw.getDocumentProperty(this.CU.fullscreenEnabled)}enterFullScreen(){if(this.xU){this.kU=new sl.C,this.bU=!0,clearTimeout(this.IU),this.IU=setTimeout(this.PU,this.wU);try{this.Cj[this.CU.requestFullscreen]()}catch(t){this.PU()}return this.kU.promise}}exitFullScreen(){try{this.Cw.exitFullscreen(this.CU.exitFullscreen,this.Zt===dt.M.Ios?this.Cj:void 0)}catch(t){(0,i.n)({message:"fullscreen_exit",exception:t.message,callStack:t.stack,level:i.D.WARN})}this.rd=!1}Yj(){this.MU===ue.do.Moz||this.MU===ue.do.Ms?(this.Cw.addEventListenerOnGlobal(this.CU.fullscreenchange,this.AU),this.Cw.addEventListenerOnGlobal(this.CU.fullscreenerror,this.PU)):(this.Cj.addEventListener(this.CU.fullscreenchange,this.AU),this.Cj.addEventListener(this.CU.fullscreenerror,this.PU)),this.Zt===dt.M.Ios&&(this.Cj.addEventListener("webkitbeginfullscreen",this.SU),this.Cj.addEventListener("webkitendfullscreen",this.AU))}EU(){this.MU===ue.do.Moz||this.MU===ue.do.Ms?(this.Cw.removeEventListenerOnGlobal(this.CU.fullscreenchange,this.AU),this.Cw.removeEventListenerOnGlobal(this.CU.fullscreenerror,this.PU)):(this.Cj.removeEventListener(this.CU.fullscreenchange,this.AU),this.Cj.removeEventListener(this.CU.fullscreenerror,this.PU)),this.Zt===dt.M.Ios&&(this.Cj.removeEventListener("webkitbeginfullscreen",this.SU),this.Cj.removeEventListener("webkitendfullscreen",this.AU))}_U(){this.rd=!0,this.mediator.publish(this,Rl.enter),this.kU.resolve(),this.bU=!1,clearTimeout(this.IU)}get isFullscreen(){return this.rd}destroy(){this.isFullscreen&&this.exitFullScreen(),this.EU(),this.kU&&this.kU.isPending&&this.kU.reject()}}const jl={xl:720,lg:320,md:204,sm:142,xs:0},Fl={[s.ProtoDeviceType.Desktop]:{xl:468,lg:388,md:248,sm:142,xs:0},[s.ProtoDeviceType.Tablet]:Object.assign({},jl),[s.ProtoDeviceType.Smartphone]:Object.assign({},jl)},$l={xl:720,lg:320,md:204,sm:142,xs:0},Vl={[s.ProtoDeviceType.Desktop]:{xl:468,lg:388,md:248,sm:142,xs:0},[s.ProtoDeviceType.Tablet]:Object.assign({},$l),[s.ProtoDeviceType.Smartphone]:Object.assign({},$l)},Ul=176,Nl=160,Hl=144,zl=112,ql={xl:$l.xl+Ul,lg:$l.lg+Nl,md:$l.md+Hl,sm:$l.sm+zl},Wl={[s.ProtoDeviceType.Desktop]:{xl:468+Ul,lg:388+Nl,md:248+Hl,sm:142+zl,xs:0},[s.ProtoDeviceType.Tablet]:Object.assign({},ql),[s.ProtoDeviceType.Smartphone]:Object.assign({},ql)},Gl={lg:320,md:204,sm:0},Jl={[s.ProtoDeviceType.Desktop]:{xl:468,lg:388,md:248,sm:0},[s.ProtoDeviceType.Tablet]:Object.assign({},Gl),[s.ProtoDeviceType.Smartphone]:Object.assign({},Gl)},Ql={xxl:1080,xl:0},Xl={[s.ProtoDeviceType.Desktop]:{xxl:720,xl:0},[s.ProtoDeviceType.Tablet]:Object.assign({},Ql),[s.ProtoDeviceType.Smartphone]:Object.assign({},Ql)},Yl=(wt.ProtoGalleryOrientationEnum.Landscape,wt.ProtoGalleryStyleMode.Detailed,wt.ProtoGalleryStyleMode.Visual,wt.ProtoGalleryOrientationEnum.Portrait,wt.ProtoGalleryStyleMode.Detailed,wt.ProtoGalleryStyleMode.Visual,Object.assign(Object.assign({},k.Km),da));var Kl;!function(t){t[t.PlayerOrientationChange=0]="PlayerOrientationChange",t[t.MainOrientationChange=1]="MainOrientationChange"}(Kl||(Kl={}));class Zl{constructor(t,i,e,s){this.mediator=t,this.Wt=i,this.LU=e,this.Sr=s,this.OU={current:null,previous:null},this.RU={current:null,previous:null},this.BU=!1}setFloatingModule(t){this.DU=t}start(t){this.Be=t,this.jU(this.Wt.orientation),this.FU(this.Wt.orientation)}forceOrientation(t){this.BU=!1,this.setMainOrientation(t),this.setPlayerClassByOrientation(t),this.BU=!0}setPlayerClassByOrientation(t=this.Wt.orientation){this.jU(t),this.OU.previous&&this.OU.current===this.OU.previous||(this.$U(this.LU),this.OU.previous=this.OU.current,this.mediator.publish(this,Kl[Kl.PlayerOrientationChange],{payload:this.OU.current}))}setMainOrientation(t=this.Wt.orientation){this.FU(t),this.RU.previous&&this.RU.previous===this.RU.current||(this.RU.previous=this.RU.current,this.mediator.publish(this,Kl[Kl.MainOrientationChange],{payload:this.RU.current}))}get playerOrientation(){return this.OU.current}get mainOrientation(){return this.RU.current}shouldChangeMainOrientation(){return!this.ml()}jU(t){this.OU.current=this.xp(t)}FU(t){this.RU.current=this.VU(t)}xp(t){return this.ml()?ma.ProtoPlayerOrientationEnum.Landscape:this.BU?this.RU.current:t===ma.ProtoPlayerOrientationEnum.Mixed?this.UU():t}VU(t){return this.BU?this.RU.current:t===ma.ProtoPlayerOrientationEnum.Mixed?this.UU():t}ml(){return this.DU&&this.DU.isInFloating}UU(){return this.Sr.getViewportWidth()<this.Wt.orientationBreakpoint?ma.ProtoPlayerOrientationEnum.Portrait:ma.ProtoPlayerOrientationEnum.Landscape}$U(t){this.OU.previous?(0,m.L_)(this.Be,t(this.OU.previous),t(this.OU.current)):(0,m.cn)(this.Be,t(this.OU.current))}}class tu{constructor(t){this.Cw=t,this.NU=[]}createRatioContainer(t){const i=this.HU();return this.NU.push(i),this.setRatio(t),i}setRatio(t){this.zU=t,this.qU()}HU(){return this.Cw.createElementByString(`<cnx class='${c.oV}'></cnx>`)}qU(){this.NU.forEach((t=>{(0,m.T7)(t,{"padding-bottom":`${this.zU}%`})}))}}class iu{constructor(t,i){this.WU={width:1,height:1},this.GU=t,this.JU=i}start(t){this.QU(t)}getComputedPlayspaceRatio(t){return this.XU(t)/this.YU(t)*100}getComputedContentRatio(t){return this.KU(t)/this.ZU(t)*100}QU(t){this.iN=t}YU(t){if(t===ma.ProtoPlayerOrientationEnum.Landscape){if(!this.iN.clientWidth)return this.GU.width;const t=this.eN();return this.iN.clientWidth/t}return this.JU.width}XU(t){if(t===ma.ProtoPlayerOrientationEnum.Landscape){if(!this.iN.clientWidth)return this.GU.height;return this.nN()/this.eN()}return this.JU.height}nN(){return this.GU.height/this.GU.width*this.iN.clientWidth+72}eN(){const t=this.nN();return(0,lt.aX)(this.iN.clientWidth,t)}ZU(t){return t===ma.ProtoPlayerOrientationEnum.Landscape?this.GU.width:this.WU.width}KU(t){return t===ma.ProtoPlayerOrientationEnum.Landscape?this.GU.height:this.WU.height}}class eu extends h._{constructor(t,i,e,s,n){super(),this.mediator=t,this.Wt=i,this.Cw=n,this.rN(),this.hN=new iu(e,s),this.oN=new tu(n),this.aN=new tu(n)}setFloatingModule(t){this.cN.setFloatingModule(t),this.setRatio()}start(t,i){this.cN.start(t),this.hN.start(i)}getPlayspaceRatioContainer(){return this.oN.createRatioContainer(this.lN())}getContentRatioContainer(){return this.aN.createRatioContainer(this.uN())}setRatio(t=!1){this.cN.setPlayerClassByOrientation(),(t||this.cN.shouldChangeMainOrientation())&&(this.cN.setMainOrientation(),this.oN.setRatio(this.lN())),this.aN.setRatio(this.uN())}getOrientation(){return this.cN.playerOrientation}setOrientation(t){this.cN.forceOrientation(t),this.oN.setRatio(this.lN()),this.aN.setRatio(this.uN())}rN(){this.cN=new Zl(this,this.Wt,this.LU,this.Cw),this.subscribe(Kl[Kl.PlayerOrientationChange],this.cN,(({payload:t})=>{this.mediator.publish(this,Kl[Kl.PlayerOrientationChange],{payload:t})})),this.subscribe(Kl[Kl.MainOrientationChange],this.cN,(({payload:t})=>{this.mediator.publish(this,Kl[Kl.MainOrientationChange],{payload:t})}))}lN(){const t=this.cN.mainOrientation;return this.hN.getComputedPlayspaceRatio(t)}uN(){const t=this.cN.playerOrientation;return this.hN.getComputedContentRatio(t)}LU(t){return t===ma.ProtoPlayerOrientationEnum.Portrait?vo:go}}const su={PlaybackModeEnum:{AutoPlay:s.ProtoPlayerPlaybackModeEnum.Autoplay,ScrollToPlay:s.ProtoPlayerPlaybackModeEnum.ScrollToPlay,ClickToPlay:s.ProtoPlayerPlaybackModeEnum.ClickToPlay},DefaultSoundModeEnum:{On:s.ProtoPlayerSoundMode.On,Off:s.ProtoPlayerSoundMode.Mute,OnHover:s.ProtoPlayerSoundMode.Hover},InsertPositionEnum:{WithinContainer:s.ProtoPlayerInsertMode.WithinContainer,BeforeContainer:s.ProtoPlayerInsertMode.BeforeContainer,AfterContainer:s.ProtoPlayerInsertMode.AfterContainer,ReplaceContainer:s.ProtoPlayerInsertMode.ReplaceContainer,HideContainer:s.ProtoPlayerInsertMode.HideContainer},CloseButtonModeEnum:{Off:s.ProtoPlayerCloseButtonMode.Off,On:s.ProtoPlayerCloseButtonMode.OnHover,OnAfterFirstAd:s.ProtoPlayerCloseButtonMode.OnHoverAfterFirstAd,OnHover:s.ProtoPlayerCloseButtonMode.OnHover,OnHoverAfterFirstAd:s.ProtoPlayerCloseButtonMode.OnHoverAfterFirstAd,AlwaysOn:s.ProtoPlayerCloseButtonMode.AlwaysOn},QualityEnum:et,LineItemExcludedSlotsEnum:{PreRoll:s.ProtoAdSlotsEnum.PreRoll,MidRoll:s.ProtoAdSlotsEnum.MidRoll,PostRoll:s.ProtoAdSlotsEnum.PostRoll},ErrorTypesEnum:{SetupError:k.n9.SetupError,NoPlayer:k.n9.NoPlayer},FloatingModeEnum:{Off:s.ProtoPlayerFloatingMode.Off,OnPageLoad:s.ProtoPlayerFloatingMode.OnPageLoad,AfterInView:s.ProtoPlayerFloatingMode.AfterInView,Always:s.ProtoPlayerFloatingMode.Always},FloatingDevicesEnum:{Desktop:s.ProtoDeviceType.Desktop,Smartphone:s.ProtoDeviceType.Smartphone,Tablet:s.ProtoDeviceType.Tablet,Other:s.ProtoDeviceType.GameConsole},FloatingFixedPositionModeEnum:{Page:s.ProtoFloatingFixedPositionMode.Page,Element:s.ProtoFloatingFixedPositionMode.Element},FloatingScrollPositionEnum:{BottomRight:s.ProtoPositionMode.BottomRight,BottomLeft:s.ProtoPositionMode.BottomLeft,TopRight:s.ProtoPositionMode.TopRight,TopLeft:s.ProtoPositionMode.TopLeft},FloatingStatesEnum:{Float:v.Float,Embed:v.Embed},FloatingAppendLocationEnum:{Above:s.ProtoFloatingAppendLocationEnum.Above,Below:s.ProtoFloatingAppendLocationEnum.Below,Within:s.ProtoFloatingAppendLocationEnum.Within},ImplementationTypeEnum:{Amp:s.ProtoImplementationType.Amp,Web:s.ProtoImplementationType.Web}},nu=Object.assign(Object.assign({},su),{EndOfSlideCycleEnum:{Loop:ma.ProtoEndOfSlideCycleMode.Loop,Stop:ma.ProtoEndOfSlideCycleMode.Stop},LayoutEnum:{Portrait:V.Portrait,Landscape:V.Landscape},OrientationEnum:{Mixed:ma.ProtoPlayerOrientationEnum.Mixed,Portrait:ma.ProtoPlayerOrientationEnum.Portrait,Landscape:ma.ProtoPlayerOrientationEnum.Landscape}});class ru{constructor(t,i,e,s,n=1200){this.dN=t,this.pN=i,this.fN=e,this.vN=s,this.gN=n,this.mN=null,this.yN=!1,this.bN=()=>{if(this.$T(),!this.yN&&this.pN&&this.pN.linearAdInWin)return this.yN=!0,void this.wN(this.gN);this.dN.startContent()}}destroy(){this.$T()}changeState(t){switch(t){case z.PrerollState:this.yN=!1,this.wN(this.fN);break;case z.PostrollState:this.yN=!1,this.wN(this.vN);break;default:this.mN&&this.$T()}}setPreRollBreak(t){this.fN=t}setPostRollBreak(t){this.vN=t}$T(){clearTimeout(this.mN),this.mN=null}wN(t){this.$T(),this.mN=setTimeout(this.bN,t)}}class hu{constructor(t,i){this.xN=t,this.SN=i,this._N=null,this.AN=null,this.PN=0,this.kN=0,this.IN=!1,this.TN=new Map,this.CN=new x.x,this.MN=new x.x,this.EN=new x.x,this.LN=new x.x,this.RN=new x.x,this.BN=new x.x,this.DN=new x.x,this.jN=new x.x,this.FN=new x.x,this.nf=[],this.$N={inImpression:!1,linearDemandMissing:!1},this.$N.linearDemandMissing=!this.xN.linearAdsControllerData.hasLinearDemand}start(){this.VN();const{totalAdBreakLength:t}=this.xN.linearAdsControllerData;if(t){const i=Ti.getGlobalContainer().resolve(Wi);this.UN=new zs(i,t),this.TN.set(this.UN,[this.UN.onTimeElapsed.subscribe((()=>{this.MN.next()}))])}}get currentPlayerAdSlot(){return this._N}get onExperienceControllerStateChange(){return this.FN.asObservable()}get onAdSlotDurationElapsed(){return this.CN.asObservable()}get onAdPodDurationElapsed(){return this.EN.asObservable()}get onAdPodTimeUpdate(){return this.LN.asObservable()}get onAdOpportunity(){return this.RN.asObservable()}get onAdsDisabled(){return this.BN.asObservable()}get onAdsEnabled(){return this.DN.asObservable()}get onTotalAdBreakDurationExpired(){return this.MN.asObservable()}get onMidRollCapped(){return this.jN.asObservable()}contentPlaybackStateChanged(t){var i,e;null===(e=(i=this.SN).contentPlaybackStateChanged)||void 0===e||e.call(i,t)}slideChanged(t){var i,e;null===(e=(i=this.SN).slideChanged)||void 0===e||e.call(i,t)}updateStoryTimeline(t){var i,e;null===(e=(i=this.SN).updateStoryTimeline)||void 0===e||e.call(i,t)}onAdImpression(t,i){this.SN.onAdImpression(t,this._N,i),this.$N.inImpression=!0,this.NN(),this.HN()}contentChanged(t){this.SN.contentChanged(this._N,t),this.kN=0}onAdFinished(t,i,e){this.SN.onAdFinished(this._N,i,e),this.zN=this.qN(this.zN),i||(this.WN=this.qN(this.WN),this._N===s.ProtoAdSlotsEnum.MidRoll?this.kN++:this.PN++),this.GN()&&!i&&this.jN.next(),t&&(this.IN=!0),this.$N.inImpression=!1}viewabilityStateChanged(t,i){var e,s;null===(s=(e=this.SN).viewabilityStateChanged)||void 0===s||s.call(e,this._N,t,i)}onStop(){this._N=null}onAdStateChange(t,i,e,n){this.SN.onAdStateChange(t,e,n),this.xN.linearAdsControllerData.maxAdSlotDuration=i.maxAdSlotDuration,this.xN.linearAdsControllerData.maxAdPodDuration=i.maxAdPodDuration,n||(t!==s.ProtoAdSlotsEnum.MidRoll&&(this.PN=0),null===t&&this.AN===s.ProtoAdSlotsEnum.MidRoll||(this.IN=!0),this.AN=t,this._N=t)}canEnableAds(t){const i=this.SN.canEnableAds(this._N,t);return i.enableAds?this.$N.inImpression?{enableAds:!1,disableReason:yt.InImpression}:this.$N.linearDemandMissing?{enableAds:!1,disableReason:yt.LinearDemandMissing}:this._N===s.ProtoAdSlotsEnum.MidRoll&&this.GN()||this._N!==s.ProtoAdSlotsEnum.MidRoll&&this.PN>0?{enableAds:!1,disableReason:yt.Unknown}:{enableAds:!0,disableReason:yt.Unknown}:i}enableAds(){this.DN.next(),this.UN&&this.UN.start()}disableAds(t,i){const e={disableReason:t,adBreakLength:this.SN.getAdBreakDuration(i)};this.BN.next({payload:e}),this.UN&&!this.$N.inImpression&&this.UN.stop()}onAdPlay(){this.WN&&this.WN.start(),this.zN&&this.zN.start(),this.UN&&this.UN.start()}onAdPause(){this.WN&&this.WN.stop(),this.zN&&this.zN.stop(),this.UN&&this.UN.stop()}triggerAdOpportunity(){this.IN&&(this.IN=!1,this.RN.next({payload:{adBreakType:oo[this._N]}}))}startAds(t){var i,e;null===(e=(i=this.SN).startAds)||void 0===e||e.call(i,this._N,t)}destroy(){(0,pt.i)(this.nf),this.UN&&this.UN.disable(),this.zN=this.qN(this.zN),this.WN=this.qN(this.WN),this.SN.destroy()}VN(){this.nf.push(this.SN.onExperienceControllerStateChange.subscribe((()=>{this.FN.next()}))),this.SN.start()}GN(){const{numberOfMidRolls:t}=this.xN.linearAdsControllerData;return this.kN>=t&&-1!==t}qN(t){if(t)return t.stop(),(0,pt.i)(this.TN.get(t)),this.TN.delete(t),null}NN(){const{maxAdSlotDuration:t}=this.xN.linearAdsControllerData;if(!t||this.zN)return;const i=Ti.getGlobalContainer().resolve(Wi);this.zN=new zs(i,t),this.zN.start(),this.TN.set(this.zN,[this.zN.onTimeElapsed.subscribe((()=>{this.CN.next()}))])}HN(){const{maxAdPodDuration:t}=this.xN.linearAdsControllerData;if(!t||this.WN)return;const i=Ti.getGlobalContainer().resolve(Wi);this.WN=new zs(i,t),this.WN.start(),this.TN.set(this.WN,[this.WN.onTimeElapsed.subscribe((()=>{this.EN.next()})),this.WN.onTimeUpdate.subscribe((()=>{const t=this.WN.timeRemaining;this.LN.next(t)}))])}}class ou{constructor(t,i){this.xN=t,this.JN=i,this.BN=new x.x,this.DN=new x.x,this.QN=0,this.FN=new x.x,this.nf=[],this.$N={inImpression:!1,linearInImpression:!1,inPrePostRoll:!1,contentPaused:!0}}start(){this.VN()}get onExperienceControllerStateChange(){return this.FN.asObservable()}VN(){this.nf.push(this.JN.onExperienceControllerStateChange.subscribe((()=>{this.FN.next()}))),this.JN.start()}get onAdsDisabled(){return this.BN.asObservable()}get onAdsEnabled(){return this.DN.asObservable()}onLinearImpressionStateChange(t){this.$N.linearInImpression=t,t?this.QN=0:this.JN.onLinearAdFinished()}onAdStateChange(t){this.$N.inPrePostRoll=!(t===s.ProtoAdSlotsEnum.MidRoll)}onAdFinished(){this.JN.onAdFinished(),this.$N.inImpression=!1,this.QN++}onAdImpression(){this.$N.inImpression=!0}canEnableAds(){return!!this.JN.canEnableAds()&&(!Object.keys(this.$N).some((t=>this.$N[t]))&&!(this.QN>=this.xN.numberOfNonlinearAds&&this.xN.numberOfNonlinearAds>0))}enableAds(){this.DN.next()}disableAds(){this.BN.next()}contentPlaybackStateChanged(t){this.$N.contentPaused=!t,this.FN.next()}destroy(){var t;(0,pt.i)(this.nf),null===(t=this.JN)||void 0===t||t.destroy()}}class au{constructor(t,i,e,s,n){var r;this.mediator=t,this.xN=e,this.nf=[],this.$N={stopped:!1,viewability:!1,forceDisable:!1,zeroDimension:!1,isAppBackgrounded:!1},this.XN=new hu(e,s),this.YN(s),this.viewabilityStateChanged(i),this.onResize(this.xN.playerDimensions.width,this.xN.playerDimensions.height),this.XN.start(),(0,P.kE)(null===(r=e.nonLinearAdsControllerData)||void 0===r?void 0:r.numberOfNonlinearAds)&&n&&this.KN(e.nonLinearAdsControllerData,n),this.onContentStop()}YN(t){this.nf.push(this.XN.onAdSlotDurationElapsed.subscribe((()=>{this.mediator.publish(this,O)})),this.XN.onAdPodDurationElapsed.subscribe((()=>{this.mediator.publish(this,R)})),this.XN.onAdPodTimeUpdate.subscribe((t=>{this.mediator.publish(this,D,{payload:{remainingTime:t}})})),this.XN.onAdOpportunity.subscribe((t=>{this.mediator.publish(this,B,t)})),this.XN.onAdsDisabled.subscribe((t=>{this.mediator.publish(this,L,t)})),this.XN.onAdsEnabled.subscribe((()=>{this.mediator.publish(this,E)})),this.XN.onTotalAdBreakDurationExpired.subscribe((()=>{this.mediator.publish(this,M)})),this.XN.onMidRollCapped.subscribe((()=>{this.mediator.publish(this,C)})),this.XN.onExperienceControllerStateChange.subscribe((()=>{this.ZN()})))}KN(t,i){this.tH=new ou(t,i),this.nf.push(this.tH.onAdsDisabled.subscribe((()=>{this.mediator.publish(this,j)})),this.tH.onAdsEnabled.subscribe((()=>{this.mediator.publish(this,F)})),this.tH.onExperienceControllerStateChange.subscribe((()=>{this.ZN()}))),this.tH.start()}slideChanged(t){this.XN.slideChanged(t)}updateStoryTimeline(t){this.XN.updateStoryTimeline(t)}contentPlaybackStateChanged(t){var i;this.XN.contentPlaybackStateChanged(t),null===(i=this.tH)||void 0===i||i.contentPlaybackStateChanged(t)}forceRecheck(){this.ZN()}onAdImpression(t,i){var e;switch(i){case ct.LINEAR:this.XN.onAdImpression(t,this.nd);const i=!0;null===(e=this.tH)||void 0===e||e.onLinearImpressionStateChange(i);break;case ct.NONLINEAR:this.tH.onAdImpression()}this.ZN()}onAdFinished(t,i,e=!1){var s,n;switch(i){case ct.LINEAR:if(this.XN.onAdFinished(t,e,this.nd),e)this.iH();else{const t=!1;null===(s=this.tH)||void 0===s||s.onLinearImpressionStateChange(t)}break;case ct.NONLINEAR:null===(n=this.tH)||void 0===n||n.onAdFinished()}e||this.ZN()}onLinearAdPause(){this.XN.onAdPause()}onLinearAdPlay(){this.XN.onAdPlay()}onContentStop(){this.XN.onStop(),this.$N.stopped=!0,this.ZN()}onAdStateChange(t,i,e){var n;null===(n=this.tH)||void 0===n||n.onAdStateChange(t);const r=t===this.XN.currentPlayerAdSlot&&t===s.ProtoAdSlotsEnum.MidRoll;r?this.XN.onAdStateChange(t,i,e,r):(this.XN.onAdStateChange(t,i,e,r),this.eH())}eH(){this.XN.startAds(this.nd),this.$N.stopped=!1,this.ZN()}contentChanged(){this.XN.contentChanged(this.nd),this.ZN()}viewabilityStateChanged(t,i=!1,e=!1){this.XN.viewabilityStateChanged(t,i),this.nd=t,this.xN.viewabilityPolicy===s.ProtoAdViewabilityPolicy.Strict&&(this.$N.viewability=!t),e||this.ZN()}setToggleAdsReason({isAppBackgrounded:t}){this.$N.isAppBackgrounded=t,this.ZN()}disableAdvertising(){this.$N.forceDisable=!0,this.ZN()}enableAdvertising(){this.$N.forceDisable=!1,this.ZN()}get inView(){return this.nd}onResize(t,i){this.$N.zeroDimension=0===t||0===i,this.ZN()}destroy(){(0,pt.i)(this.nf),this.XN.destroy()}ZN(){const t=this.nH();t.enableAds?this.rH():(this.hH(t.disableReason),this.oH())}rH(){const t=this.XN.canEnableAds(this.nd);t.enableAds?(this.iH(),this.oH()):(this.hH(t.disableReason),this.aH())}aH(){var t;(null===(t=this.tH)||void 0===t?void 0:t.canEnableAds())?this.cH():this.oH()}oH(){var t;null===(t=this.tH)||void 0===t||t.disableAds()}cH(){var t;null===(t=this.tH)||void 0===t||t.enableAds()}hH(t){this.XN.disableAds(t,this.nd)}nH(){return Object.keys(this.$N).some((t=>this.$N[t]))?{enableAds:!1,disableReason:yt.Unknown}:{enableAds:!0,disableReason:yt.Unknown}}iH(){this.XN.triggerAdOpportunity(),this.XN.enableAds()}}var cu;!function(t){t[t.None=0]="None",t[t.MinSlidesBeforeFirstAd=1]="MinSlidesBeforeFirstAd",t[t.SlidesBetweenAds=2]="SlidesBetweenAds"}(cu||(cu={}));class lu{constructor(t){this.xN=t,this.lH=!1,this.uH=0,this.dH=0,this.pH=[],this.fH=0,this.$N={slides:!1},this.FN=new x.x}get onExperienceControllerStateChange(){return this.FN.asObservable()}start(){this.vH()}canEnableAds(t,i){return t===s.ProtoAdSlotsEnum.MidRoll&&this.$N.slides&&i?{enableAds:!1,disableReason:yt.TimeoutBetweenAds}:{enableAds:!0,disableReason:yt.Unknown}}getAdBreakDuration(t){const i=this.gH();return t&&0!==this.pH.length&&i!==cu.None?i===cu.MinSlidesBeforeFirstAd?this.mH(this.xN.minSlidesBeforeFirstAd-this.dH):i===cu.SlidesBetweenAds?this.mH(this.xN.slidesBetweenAds-this.uH):0:0}onAdImpression(t,i,e){this.uH=0,i===s.ProtoAdSlotsEnum.MidRoll&&(this.lH||(this.lH=!0))}onAdFinished(t,i,e){i||this.vH()}onAdStateChange(t,i,e){t===s.ProtoAdSlotsEnum.MidRoll||e||(this.lH=!1)}contentChanged(t,i){this.vH(),this.lH=!1}slideChanged(t){this.fH=t,this.uH++,this.dH++,this.vH()}updateStoryTimeline(t){this.pH=t}destroy(){}vH(){this.$N.slides=!1;const t=this.gH();t===cu.MinSlidesBeforeFirstAd?this.yH():t===cu.SlidesBetweenAds&&this.bH(),this.FN.next()}yH(){this.dH<=this.xN.minSlidesBeforeFirstAd&&(this.$N.slides=!0)}bH(){this.uH<=this.xN.slidesBetweenAds&&(this.$N.slides=!0)}mH(t){let i=0,e=t;for(let t=0;t<this.pH.length&&0!==e;t++)t<this.fH||(i+=this.pH[t],e--);return i}gH(){return!this.lH&&this.xN.minSlidesBeforeFirstAd?cu.MinSlidesBeforeFirstAd:this.lH&&this.xN.slidesBetweenAds?cu.SlidesBetweenAds:cu.None}}const uu={lg:630,md:400,sm:320,xs:0},du={[s.ProtoDeviceType.Desktop]:Object.assign({},uu),[s.ProtoDeviceType.Tablet]:Object.assign({},uu),[s.ProtoDeviceType.Smartphone]:Object.assign({},uu)};var pu=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 fu extends mt{constructor(){super(...arguments),this.zj=[],this.Np=du,this.zp=c.vF,this.Op=288,this.GU={width:16,height:9},this.JU={width:4,height:5},this.events=Object.assign({},Yl),this.wH=()=>{const t=this.xH(this.dN.getCurrentStoryMeta());this._H(t),this.Kd.updateStoryTimeline(this.getStoryTimeline()),this.AH(),this.PH(),this.vp.adPlaybackMode===ma.ProtoAdPlaybackMode.Autoplay&&this.vp.playbackMode!==ma.ProtoPlayerPlaybackModeEnum.ClickToPlay&&0===this.vp.preRollBreak&&this.Wd(ma.ProtoAdSlotsEnum.MidRoll),this.mediator.publish(this,Yl.Ready)},this.kH=()=>{this.IH.enterFullScreen().then((()=>{this.TH()})).catch((()=>{(0,i.n)({message:"PlayspaceExperience_enterFullscreen",level:i.D.WARN})}))},this.Pp=()=>{this.dN.exitFullscreen(),this.floatingModule&&this.floatingModule.fullscreenStateChange(!1),this.mediator.publish(this,Yl.FullscreenChanged,{payload:!1}),super.Pp()},this.Ap=()=>{this.mediator.publish(this,Yl.FullscreenChanged,{payload:!0}),super.Ap()}}Cd(){const t={orientation:this.vp.orientation,orientationBreakpoint:this.vp.orientationBreakpoint};this.CH=new eu(this,t,this.GU,this.JU,this.app.services.GlobalDomUtilsService),this.subscribe(Kl[Kl.PlayerOrientationChange],this.CH,(({payload:t})=>{this.mediator.publish(this,Yl.LayoutChanged,{payload:nu.LayoutEnum[ma.ProtoPlayerOrientationEnum[t]]})})),this.subscribe(Kl[Kl.MainOrientationChange],this.CH,(({payload:t})=>{switch(t){case ma.ProtoPlayerOrientationEnum.Landscape:(0,m.aQ)(this.$experienceContainer,"maxWidth");break;case ma.ProtoPlayerOrientationEnum.Portrait:(0,m.T7)(this.$experienceContainer,{maxWidth:du[this.app.config.device].lg-1+"px"})}}))}MH(t){this.CH.setFloatingModule(t)}generateHTML(){this.$playerWrapper=this.app.services.GlobalDomUtilsService.createElementByString(`<cnx class="${c.sN.PlayerWrapper}"></cnx>`),this.$playerContainer=this.app.services.GlobalDomUtilsService.createElementByString(`<cnx class="${mo}"></cnx>`),this.CH.start(this.$playerContainer,this.$playerWrapper),this.addPlayerSize(),this.$experienceContainer.appendChild(this.$playerWrapper),this.$playerWrapper.appendChild(this.$playerContainer),this.CH.setRatio(),this.EH()}EH(){this.LH=this.app.services.GlobalDomUtilsService.createElementByString(`<cnx class="${_o} ${Ao}"></cnx>`),this.$playerWrapper.appendChild(this.LH)}OH(){return this.dN.getCurrentThumbnailUrlParams(this.$experienceContainer.clientWidth,this.$experienceContainer.clientHeight)}RH(){const t=this.OH();if(!t)return;const{imageUrl:i,altText:e,width:s,height:n,queryParams:r}=t,h=this.Td.getImage(i,e,s,n,r,!0);h&&(h.className=c.sN.ImagePlaceholder,this.BH&&this.LH.removeChild(this.BH),this.LH.appendChild(h),this.BH=h,this.adHandler&&this.adHandler.setAdLoadingBackgroundUrl(i))}DH(){this.floatingModule&&this.floatingModule.canFloat()&&this.RH()}jH(t=!1){this.LH&&(t?(0,m.cn)(this.LH,Po):(0,m.IV)(this.LH,Po))}addPlayerSize(){const t=this.CH.getPlayspaceRatioContainer();this.$playerWrapper.appendChild(t),(0,m.cn)(this.$playerWrapper,c.Ig.Responsive)}handleClose(){this.mediator.publish(this,Yl.CloseButtonClicked),this.ml()?(this.floatingModule.destroy(),this.pause()):this.IH&&this.IH.isFullscreen?this.IH.exitFullScreen():this.triggerDestroy()}getVolume(){return this.dN.volume}setNewVolume(t){super.setNewVolume(t),this.dN.volume=t,this.ws(t)}destroy(){var t;super.destroy(),null===(t=this.FH)||void 0===t||t.destroy(),this.dN&&this.dN.destroy(),this.IH&&this.IH.destroy(),(0,pt.i)(this.zj)}$H(){var t;this.dN=new Ll(this,this.app.services.GlobalDomUtilsService,this.app.services.ResizeObserver,this.vp,this.app,this.$playerContainer,this.CH),this.subscribe(ha.ContentHandlerReady,this.dN,this.wH),this.vp.isCloseButton&&this.subscribe(w[w.Close],this.dN,(()=>this.handleClose())),this.subscribe(w[w.Volume],this.dN,(({payload:{volume:t}})=>{this.ws(t),this.adHandler&&this.adHandler.setLinearVolume(t)})),this.subscribe(ha.StateChanged,this.dN,(({payload:t})=>{var i;null===(i=this.FH)||void 0===i||i.changeState(t),this.VH(t),t===z.PlayingState&&this.Wp(),this.UH(t)})),this.subscribe(ra.ChangeSlide,this.dN,(()=>{this.Kd.slideChanged(this.getStoryPosition());const t=this.NH();if(this.RH(),this.floatingModule&&this.floatingModule.canFloat()){const i=t&&t.mediaContext===ma.ProtoMediaContextEnum.Logo;this.jH(i)}this.app.services.TrackingService.updateMediaMetadata(this.HH()),this.mediator.publish(this,Yl.ChangeSlide,{payload:t})})),this.subscribe(ha.NewStory,this.dN,(()=>{this.Zd(),this.AH()})),this.subscribe(ha.ContentStart,this.dN,(()=>{this.app.services.TrackingService.setMediaStart(),this.mediator.publish(this,Yl.ContentStart,{payload:this.getStorySlidesMetadata()})})),this.subscribe(ha.ContentEnd,this.dN,(()=>{this.app.services.TrackingService.trackMediaQuartile(s.ProtoQuartilesEnum.Fourth),this.mediator.publish(this,Yl.ContentComplete,{payload:this.getStorySlidesMetadata()})})),this.floatingModule&&this.subscribe(o.Uh.UserInteraction,this.dN,this.xd),this.subscribe(na.ProgressBarItemClicked,this.dN,(({payload:t})=>{this.mediator.publish(this,Yl.ProgressBarItemClicked,{payload:this.zH(t)})})),null===(t=this.adHandler)||void 0===t||t.onLinearUiComponentEvent.subscribe((t=>{if(t.type===w.Volume){const{volume:i}=t.payload;this.ws(i),this.dN.volume=i}})),this.subscribe(na.CallToAction,this.dN,(()=>{this.mediator.publish(this,Yl.CallToAction,{payload:this.NH()})})),this.subscribe(w[w.LogoClicked],this.dN,(()=>{this.mediator.publish(this,Yl.BrandingClicked)})),this.subscribe(Z,this.dN,(({payload:t})=>{this.Y$!==t&&(this.Y$=t,this.mediator.publish(this,Yl.QualityChanged,{payload:t}))})),this.subscribe(na.GeneralClickInteraction,this.dN,(({payload:t})=>{this.app.services.TrackingService.trackMediaClick(t)}))}qH(t,i){const{preRollBreak:e,postRollBreak:s}=this.vp;this.FH=new ru(t,i,e,s)}VH(t){switch(t){case z.PlayingState:this.Wd(ma.ProtoAdSlotsEnum.MidRoll);break;case z.PrerollState:this.Wd(ma.ProtoAdSlotsEnum.PreRoll);break;case z.PostrollState:this.Wd(ma.ProtoAdSlotsEnum.PostRoll);break;case z.PausedState:this.vp.adViewabilityPolicy===s.ProtoAdViewabilityPolicy.Default&&!this.WH.inView||this.Kd.onContentStop();break;case z.StoppedState:this.Kd.onContentStop()}}UH(t){switch(t){case z.PlayingState:this.app.services.TrackingService.setSessionPlayback(!0),this.mediator.publish(this,Yl.Play,{payload:this.NH()});break;case z.PausedState:this.mediator.publish(this,Yl.Pause,{payload:this.NH()}),this.app.services.TrackingService.setSessionPlayback(!1);break;case z.StoppedState:this.mediator.publish(this,Yl.ContentComplete,{payload:this.getStorySlidesMetadata()}),this.app.services.TrackingService.setSessionPlayback(!1);break;default:this.app.services.TrackingService.setSessionPlayback(!0)}}PH(){this.WH=new Bl(this,this.vp.playbackMode),this.subscribe(Ol[Ol.Play],this.WH,(t=>{this.dN.play(!1),t.payload&&(0,P.kE)(t.payload.volume)&&super.setNewVolume(t.payload.volume)})),this.subscribe(Ol[Ol.Pause],this.WH,(t=>{this.dN.pause(!1),t.payload&&(0,P.kE)(t.payload.volume)&&super.setNewVolume(t.payload.volume)})),this.subscribe(o.Uh.UserInteraction,this.dN,(({payload:{playback:t}})=>{(0,P.$K)(t)&&this.WH.setUserPlayback(t)})),this.WH.setViewability(this.app.services.ViewabilityService.check({element:this.$playerContainer,threshold:this.Wu}));const t=this.dN.canPlay().subscribe((t=>{this.WH.setCanPlay(t)}));this.zj.push(t)}GH(){this.adHandler&&(this.adHandler.start(this.$playerContainer.clientWidth,this.$playerContainer.clientHeight,this.vp.soundMode===ma.ProtoPlayerSoundMode.On?1:0,!1,!1),this.Kd.forceRecheck())}dp(){const t=this.getNextSlide();this.adHandler.setContinueReadingCard({imageSrc:t.metadata.imageUrl,title:t.metadata.title}),super.dp(),this.dN.hide()}fp(){this.Yd.isInAdPod()?this.gp((()=>{this.Kd.onAdFinished(this.adHandler.linearInImpression,ct.LINEAR,this.Yd.isInAdPod()),super.fp(),this.dN.show()})):(super.fp(),this.dN.show())}np(){return new sa(this,this.vp,this.$playerContainer,this.checkFloatingViewability(this.isViewable()),this.Yd,this.app,this.qu,this.xp(this.$playerContainer.clientWidth,this.$playerContainer.clientHeight))}yp(){const t=new lu({minSlidesBeforeFirstAd:this.vp.minSlidesBeforeFirstAd,slidesBetweenAds:this.vp.slidesBetweenAds});return new au(this,this.isViewable(),{linearAdsControllerData:{numberOfMidRolls:this.vp.midRollNumber,maxAdSlotDuration:this.Yd.getMaxAdSlotDuration(),maxAdPodDuration:this.Yd.getMaxAdPodDuration(),hasLinearDemand:this.vp.lineItemSettings.lineItems.some((t=>t.adType!==s.ProtoAdType.Nonlinear))},viewabilityPolicy:this.vp.adViewabilityPolicy,playerDimensions:{width:this.$playerContainer.offsetWidth,height:this.$playerContainer.offsetHeight}},t)}Cs(){super.Cs(),this.dN&&this.dN.onResize(),this.CH.setRatio(),this.DH(),this.JH.updateWidth(this.$playerContainer.clientWidth)}ml(){return this.floatingModule&&this.floatingModule.isInFloating}gu(t,i=!1){super.gu(t,i),this.WH&&(this.WH.setViewability(t),this.WH.setSoundVolume(this.dN.volume)),this.dN&&this.dN.setViewabilityState(t)}QH(){const t=this.app.services.GlobalDomUtilsService.getGlobalClosestTop().topFrame.document.body;this.app.services.ResizeObserver.on(t,(()=>{this.CH.setRatio(!0)}))}up(){return{isAutoPlay:this.vp.playbackMode===ma.ProtoPlayerPlaybackModeEnum.Autoplay,isSkippable:!0,skipOffset:0}}start(){const t=Object.create(null,{start:{get:()=>super.start}});return pu(this,void 0,void 0,(function*(){try{t.start.call(this),this.MH(this.floatingModule),this.$H(),this.GH(),this.qH(this.dN,this.adHandler),this.$p(this.dN),this.XH(),this.QH(),this.JH=new T(this.$playerContainer,this.app.config.device,Fl,c.Rq),this.YH(this.$playerContainer),yield this.dN.start(),this.bp()}catch(t){(0,i.n)({message:"PlayspaceExperience_start",exception:t.message,callStack:t.stack,level:i.D.CRITICAL})}}))}setSlide(t){this.dN.setSlide(t)}getNextSlide(){return this.dN.getNextSlide()}play(){super.play();this.dN.play(!1)}pause(){super.pause();this.dN.pause(!1)}getStoryId(){return this.vp.storyId}getStoryPosition(){return this.dN.currentSlideIndex}getStoryTimeline(){return this.dN.slides.map((t=>t.media.duration/ht.s_))}updateCtaLabel(t,i){(0,P.kE)(t)&&(0,P.QM)(i)&&this.dN.updateCtaLabel(t,i)}getStorySlidesMetadata(){return this.dN.slidesMetadata.map((({title:t,clickUrl:i,slideDuration:e})=>({title:t,clickUrl:i,duration:e})))}toggleFullscreenButton(t){this.dN.toggleExpandButton(t)}toggleFullscreen(t){(0,P.$K)(t)||(t=!this.IH.isFullscreen),this.IH.isFullscreen!==t&&(t?this.kH():this.IH.exitFullScreen())}getQuality(){return this.dN.getQuality()}setQuality(t){this.dN.setQuality(t)}getOrientation(){return this.CH.getOrientation()}setOrientation(t){this.CH.setOrientation(t)}setPreRollBreak(t){var i;this.vp.setPreRollBreak(t),null===(i=this.FH)||void 0===i||i.setPreRollBreak(this.vp.preRollBreak),this.dN.hasPreroll=(0,P.r)(this.vp.preRollBreak)}setPostRollBreak(t){var i;this.vp.setPostRollBreak(t),null===(i=this.FH)||void 0===i||i.setPostRollBreak(this.vp.postRollBreak),this.dN.hasPostroll=(0,P.r)(this.vp.postRollBreak)}XH(){this.app.config.os.os!==dt.M.Ios&&(this.IH=new Dl(this,this.app.services.GlobalDomUtilsService,this.$playerContainer,this.app.config.os.os),this.KH())}KH(){this.subscribe(w[w.Expand],this.dN,this.kH),this.subscribe(w[w.Collapse],this.dN,(()=>this.IH.exitFullScreen())),this.subscribe(Rl.exit,this.IH,this.Pp),this.subscribe(Rl.enter,this.IH,this.Ap)}TH(){this.dN.enterFullscreen(),this.floatingModule&&this.floatingModule.fullscreenStateChange(!0)}NH(){return this.dN.getCurrentMetadata()}zH(t){if(!(t<0||this.dN.slidesMetadata.length<t))return this.dN.slidesMetadata[t]}AH(){this.app.services.TrackingService.setNewMedia(this.HH())}HH(){const t=this.dN.getCurrentStoryMeta(),i=this.dN.getCurrentMetadata(),e=i.title||i.coverMetadata&&i.coverMetadata.title;return{mediaId:(null==t?void 0:t.storyId)||this.vp.storyId,clickUrl:i.clickUrl,slideTitle:e,slideNumber:this.dN.currentSlideIndex+1,slideMediaType:i.mediaType,insights:(null==t?void 0:t.insights.insights)||[],sentimentAnalysis:(null==t?void 0:t.insights.sentimentAnalysis)||{}}}_H(t){this.adHandler&&this.adHandler.setMediaRestrictions(t)}xH(t){return{mediaInsights:{insights:t.insights.insights,insightsFallback:!1}}}YH(t){if(!(0,P.QM)(this.vp.sdkVersion)&&(0,P.QM)(this.app.config.bundleID)){const e=this.app.services.GlobalDomUtilsService.querySelector("body");(0,m.T7)(e,{margin:"0"}),t.clientWidth>=300&&((0,m.T7)(t,{"min-height":"250px"}),(0,m.Tp)(t)),(0,ut.Vm)([95,5])&&(0,i.n)({message:"PlayspaceExperience_start",exception:"IN_APP_RENDER_PLAYER_SIZE",callStack:`width: ${this.$playerContainer.clientWidth}: height: ${this.$playerContainer.clientHeight} `,level:i.D.INFO})}}ZH(){}}class vu{constructor(){this.nf={}}on(t,i){if(this.nf[t]=this.nf[t]||[],!(0,P.mf)(i))throw new Error(`${t} event callback is not a function`);return this.nf[t].push(i),()=>this.nf[t]=this.nf[t].filter((t=>t!==i))}once(t,i){const e=this.on(t,(t=>{try{i(t)}catch(t){}e()}))}remove(t,i){this.nf[t]&&(this.nf[t]=this.nf[t].filter((t=>t!==i)))}removeAll(){this.nf={}}trigger(t,i){this.nf[t]&&this.nf[t].forEach((t=>{try{t(i)}catch(t){}}))}}class gu extends class{constructor(t){this.experience=t,this.tz=(t,i)=>this.Jc.on(t,i),this.iz=(t,i)=>{this.Jc.remove(t,i)},this.ez=()=>{this.Jc.removeAll()},this.sz=(t,i)=>{this.Jc.once(t,i)},this.nz=()=>this.experience.isViewable(),this.rz=t=>{this.experience.setViewableThreshold(t)},this.hz=()=>{this.experience.play()},this.oz=()=>{this.experience.pause()},this.az=()=>this.experience.getVolume(),this.cz=t=>{this.experience.setVolume(t)},this.hu=()=>{this.experience.triggerDestroy()},this.lz=()=>{this.experience.disableAdvertising()},this.uz=()=>{this.experience.enableAdvertising()},this.pz=()=>{this.experience.enableFloatingMode()},this.fz=()=>{this.experience.disableFloatingMode()},this.vz=()=>this.experience.isFloatingModeEnabled(),this.ou=t=>{this.experience.setFloatingSettings(t)},this.gz=t=>{this.experience.setCustomMacros(t)},this.mz=t=>{this.experience.setAmpUserConsent(t)},this.Jc=new vu}trigger(t,i){this.Jc.trigger(t,i)}setDestroyed(){this.trigger(k.Km.Removed)}getApiMethods(){return{on:this.tz,remove:this.iz,removeAll:this.ez,once:this.sz,isViewable:this.nz,setViewableThreshold:this.rz,play:this.hz,pause:this.oz,getVolume:this.az,setVolume:this.cz,disableAdvertising:this.lz,enableAdvertising:this.uz,enableFloatingMode:this.pz,disableFloatingMode:this.fz,isFloatingModeEnabled:this.vz,setFloatingSettings:this.ou,setMacros:this.gz,setAmpUserConsent:this.mz,destroy:this.hu}}}{constructor(){super(...arguments),this.yz=()=>this.experience.getStoryPosition(),this.bz=()=>this.experience.getStoryId(),this.wz=()=>this.experience.getStoryTimeline(),this.xz=t=>{this.experience.setSlide(t)},this._z=(t,i)=>{this.experience.updateCtaLabel(t,i)},this.oU=()=>this.experience.getStorySlidesMetadata(),this.Az=t=>{this.experience.toggleFullscreenButton(t)},this.Pz=t=>{this.experience.toggleFullscreen(t)},this.kz=()=>this.experience.getQuality(),this.Iz=t=>{this.experience.setQuality(t)},this.Tz=()=>{const t=this.experience.getOrientation();return nu.LayoutEnum[ma.ProtoPlayerOrientationEnum[t]]},this.Cz=t=>{const i=Object.keys(nu.LayoutEnum).find((i=>nu.LayoutEnum[i]===t));i&&ma.ProtoPlayerOrientationEnum[i]&&this.experience.setOrientation(ma.ProtoPlayerOrientationEnum[i])},this.Mz=()=>this.experience.getSize(),this.Ez=t=>{this.experience.setPreRollBreak(t)},this.Lz=t=>{this.experience.setPostRollBreak(t)}}getApiMethods(){return Object.assign(Object.assign({},super.getApiMethods()),{getStoryPosition:this.yz,setStoryPosition:this.xz,getStoryId:this.bz,getStoryTimeline:this.wz,setCtaLabel:this._z,getStoryMetadata:this.oU,toggleFullscreen:this.Pz,toggleFullscreenButton:this.Az,getQuality:this.kz,setQuality:this.Iz,getLayout:this.Tz,setLayout:this.Cz,getPlayerSize:this.Mz,setPreRollBreak:this.Ez,setPostRollBreak:this.Lz})}}class mu extends p{constructor(){super(...arguments),this.cl="cnx-ps"}createExperience(t,i){this.experience=new fu(this,i,this.app.services.UrlSuffixerService),this.experienceApi=new gu(this.experience)}getApiMethods(){return this.experienceApi.getApiMethods()}isSupportedBreakpoint(t){return!(this.experienceContainer.clientWidth<du[t].xs)}}var yu,bu;!function(t){t[t.none=0]="none",t[t.friendly=1]="friendly",t[t.safe=2]="safe"}(yu||(yu={}));class wu{constructor(t,i,e=!1){this.Ne=t,this.CO=i,this.Oz=[],this.Rz=yu.none,this.Bz={intersectionObserver:!1,fallbackImplementation:!1},this.Dz=null,this.jz=[0,.01,.1,.2,.5],this.Fz=250,this.$z=!1,this.Vz=t=>{this.$z=t,this.Uz(),d.S.pageFocus=t},this.Uz=()=>{this.Oz.forEach((t=>{const i=this.Nz(t.element);this.onViewHandle(t,i)}))},this.zz=()=>{null===this.Dz&&(this.Dz=setTimeout((()=>{this.Uz(),clearTimeout(this.Dz),this.Dz=null}),this.Fz))},this.qz(e),this.Wz(),this.Gz()}Gz(){this.CO.on(this.Vz),d.S.pageFocus=this.CO.isDocumentVisible()}qz(t){this.Ne.IntersectionObserver&&!t?this.Bz.intersectionObserver=!0:this.Bz.fallbackImplementation=!0,this.Ne.self!==this.Ne.top?(this.Jz=this.Qz(this.Ne),null!==this.Jz?this.Rz=yu.friendly:this.Rz=yu.safe):this.Jz=this.Ne.frameElement}Qz(t){let i;try{if(i=t.parent,i===this.Ne.top)return t.frameElement}catch(t){return null}return this.Qz(i)}Wz(){this.Bz.intersectionObserver?this.Xz=new this.Ne.IntersectionObserver(this.onObserverEnter.bind(this),{root:null,rootMargin:"0px",threshold:this.jz}):(this.Ne.addEventListener("scroll",this.zz),this.Ne.addEventListener("load",this.Uz),this.Ne.addEventListener("resize",this.Uz))}Yz(t){return this.Oz.find((i=>i.element===t))}Nz(t){if(this.Rz===yu.safe){const i=this.Yz(t);return i?i.cachedPercentInView:0}let i=1;const e=t.getBoundingClientRect(),s={bottomRatio:e.bottom/e.height,topRatio:(this.Ne.top.innerHeight-e.top)/e.height,leftRatio:(this.Ne.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.Oz.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.$z?(t.callbackSent=!0,t.timeout=(0,ut.ld)(t.callback,t.callbackDelay,!0)):t.callbackSent&&(t.threshold>i||!this.$z)&&(t.callbackSent=!1,clearTimeout(t.timeout),t.timeout=(0,ut.ld)(t.callback,0,!1))}))}on(t,i,e={}){let s=!1;if(this.Bz.fallbackImplementation)if(this.Rz===yu.friendly&&t.ownerDocument.defaultView!==this.Ne.top)t=this.Jz;else if(this.Rz===yu.safe)return void(0,ut.ld)(i,0,!1);let n=this.Oz.find((i=>i.element===t));n?s=!0:(n={element:t,list:[],cachedPercentInView:0},this.Oz.push(n)),n.list.push({threshold:e.threshold,callbackSent:!1,callbackDelay:e.callbackDelay,timeout:null,callback:i}),this.Bz.intersectionObserver?(s&&this.Xz.unobserve(t),this.Xz.observe(t)):this.Bz.fallbackImplementation&&this.Uz()}off(t,i){const e=this.Oz.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.Xz&&this.Xz.unobserve(t),this.Oz.splice(this.Oz.indexOf(e),1))}}check(t={threshold:.1}){if(!t.element)return!1;let i=t.element;return this.Rz===yu.friendly&&(i=this.Jz),this.Nz(i)>=t.threshold&&this.$z}triggerRecheck(t){this.Bz.fallbackImplementation&&t&&this.Oz.forEach((i=>{if(i.element===t){const t=this.Nz(i.element);this.onViewHandle(i,t)}}))}setViewableThreshold(t){}getIsTabInFocus(){return this.$z}subscribe(t,i){}destroy(){this.Ne.removeEventListener("scroll",this.zz),this.Ne.removeEventListener("load",this.Uz),this.Ne.removeEventListener("resize",this.Uz);[].slice.call(this.Oz).forEach((t=>{[].slice.call(t.list).forEach((i=>{this.off(t.element,i.callback),this.Ne.clearTimeout(i.timeout)}))})),this.CO.off(this.Vz),clearTimeout(this.Dz)}}class xu{constructor(){this.Oz=[],this.Nz=0,this.Kz=!1,this.Uz=t=>{this.Oz.forEach((i=>{t&&t!==i.element||this.Zz(i,this.Nz)}))}}tq(t){let i=this.Oz.find((i=>i.element===t));return i||(i={element:t,list:[],cachedPercentInView:0},this.Oz.push(i)),i.list}Zz(t,i){t.list.forEach((t=>{!t.callbackSent&&t.threshold<=i?(t.callbackSent=!0,t.timeout=(0,ut.ld)(t.callback,t.callbackDelay,!0,this.Kz)):t.callbackSent&&t.threshold>i&&(t.callbackSent=!1,clearTimeout(t.timeout),t.timeout=(0,ut.ld)(t.callback,0,!1,this.Kz))}))}on(t,i,e){this.tq(t).push({threshold:e.threshold,callbackSent:!1,callbackDelay:e.callbackDelay,timeout:null,callback:i}),this.Uz()}off(t,i){const e=this.Oz.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.Oz.splice(this.Oz.indexOf(e))}}check(t={threshold:.1}){return this.Nz>=t.threshold}triggerRecheck(t){this.Uz(t)}iq(t){this.Kz=t}setViewableThreshold(t){this.Nz=t,this.triggerRecheck()}getIsTabInFocus(){return!0}subscribe(t,i){}destroy(){for(let t=this.Oz.length;t--;){const i=this.Oz[t];for(let t=i.list.length;t--;)clearTimeout(i.list[t].timeout),this.off(i.element,i.list[t].callback)}}}function Su(t){return(0,P.as)(t)&&"[object RegExp]"!==Object.prototype.toString.call(t)&&"[object Date]"!==Object.prototype.toString.call(t)}function _u(t){return Su(t)?Au({},t):t}function Au(t,i){return function(t,i){const e={};return Su(t)&&Object.keys(t).forEach((i=>{e[i]=_u(t[i])})),Object.keys(i).forEach((s=>{Su(i[s])&&t[s]?e[s]=Au(t[s],i[s]):e[s]=_u(i[s])})),e}(t,i)}!function(t){t[t.Normal=0]="Normal",t[t.Buzzfeed=1]="Buzzfeed"}(bu||(bu={}));class Pu{constructor(t=0){this.eq=t,this.sq=16,this.nq=9}getHeightByRatio(t){return Math.round(t/this.sq*this.nq)+this.eq}}class ku{constructor(t,i,e={}){this.floatingMode=(0,P.$K)(e.mode)?e.mode:t.floatingMode,(0,a.BZ)(e.devices)?this.floatingDeviceMode=e.devices:this.floatingDeviceMode=(0,a.BZ)(t.floatingDeviceMode)?t.floatingDeviceMode:[s.ProtoDeviceType.Desktop],(0,P.$K)(e.closeButton)?this.floatingCloseButtonMode=e.closeButton:(0,P.$K)(t.floatingCloseButtonMode)?this.floatingCloseButtonMode=t.floatingCloseButtonMode:this.floatingCloseButtonMode=s.ProtoPlayerCloseButtonMode.OnHover,this.floatingPosition=(0,P.$K)(e.fixedPosition)?e.fixedPosition:t.floatingFixedPosition,this.floatingScrollPosition=(0,P.$K)(e.scrollPosition)?e.scrollPosition:t.floatingScrollPosition,this.floatingWidth=(0,P.$K)(e.floatingWidth)?e.floatingWidth:t.floatingWidth||400,this.floatingGutterX=(0,P.$K)(e.floatingGutterX)?e.floatingGutterX:t.floatingGutterX,this.floatingGutterY=(0,P.$K)(e.floatingGutterY)?e.floatingGutterY:t.floatingGutterY,this.pageElement=(0,P.$K)(e.floatingPageElement)?e.floatingPageElement:t.floatingPageElement,this.appendLocation=(0,P.$K)(e.floatingAppendLocation)?e.floatingAppendLocation:t.floatingAppendLocation,this.floatingYAxisPadding=(0,P.$K)(e.floatingYAxisPadding)?e.floatingYAxisPadding:t.floatingYAxisPadding,this.setScrollPosition(this.floatingScrollPosition),this.rq=new Pu(i)}setScrollPosition(t){this.hq=t===s.ProtoPositionMode.BottomLeft||t===s.ProtoPositionMode.TopLeft,this.oq=t===s.ProtoPositionMode.BottomRight||t===s.ProtoPositionMode.TopRight,this.aq=t===s.ProtoPositionMode.TopLeft||t===s.ProtoPositionMode.TopRight,this.cq=t===s.ProtoPositionMode.BottomRight||t===s.ProtoPositionMode.BottomLeft}get isPositionedLeft(){return this.hq}get isPositionedRight(){return this.oq}get isPositionedTop(){return this.aq}get isPositionedBottom(){return this.cq}set isPositionedLeft(t){this.hq=t}set isPositionedRight(t){this.oq=t}set isPositionedBottom(t){this.cq=t}set isPositionedTop(t){this.aq=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.rq.getHeightByRatio(t)}px`}}class Iu extends class{constructor(t,e,n,r,h,o,a,c,l,u,d,p=0){if(this.global=t,this.targetContainer=e,this.lq=n,this.vl=r,this.secondLevelDomain=h,this.apiConfig=o,this.isServerlessMode=a,this.supplyChainSettings=c,this.isSeoTraffic=l,this.qu=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=Ft.f3,(0,P.QM)(n.initializationSettingsJson))try{const t=JSON.parse(n.initializationSettingsJson);this.apiConfig=Au(this.apiConfig,t)}catch(t){(0,i.n)({message:"invalid_init_json",exception:t.message,callStack:t.callStack,level:i.D.CRITICAL})}if((this.apiConfig.playerMode===bu.Buzzfeed||this.apiConfig.settings.pauseAdWhenFinished)&&(this.pauseAdWhenFinished=!0),this.dq(this.lq.lineItems),this.soundMode=(0,P.$K)(this.apiConfig.settings.defaultSoundMode)?this.apiConfig.settings.defaultSoundMode:n.soundMode,this.playbackMode=(0,P.$K)(this.apiConfig.settings.playbackMode)?this.apiConfig.settings.playbackMode:n.playbackMode,this.playbackMode===s.ProtoPlayerPlaybackModeEnum.ClickToPlay||this.soundMode===s.ProtoPlayerSoundMode.Mute||(0,ut.we)()||(this.soundMode=s.ProtoPlayerSoundMode.Mute),this.html=n.html,this.css=n.css,this.floatingSettings=new ku(n,p,this.apiConfig.settings.customization.floating),n.logoResource||(0,P.QM)(this.apiConfig.settings.customization.logoUrl)){let t=`${on.n.endPoints.base.image}${n.playerId}/${n.logoResource}`;t=this.qu.appendParamsToUrl(t),this.logoUrl=(0,P.QM)(this.apiConfig.settings.customization.logoUrl)?this.apiConfig.settings.customization.logoUrl:t}const f=n.amazonTamSlotId;(0,P.QM)(f)&&(this.amazonTamSlotId=f),(0,P.$K)(this.apiConfig.settings.advertising.macros)&&(this.externalMacros=this.apiConfig.settings.advertising.macros),(0,P.$K)(this.apiConfig.settings.disableAdvertising)&&(this.disableAdvertising=this.apiConfig.settings.disableAdvertising),this.midRollNumber=(0,P.$K)(this.apiConfig.settings.advertising.maxNumberOfMidRolls)?this.apiConfig.settings.advertising.maxNumberOfMidRolls:n.midRollNumber,this.adViewabilityPolicy=n.adViewabilityPolicy,this.preRollBreak=((0,P.$K)(this.apiConfig.settings.advertising.preRollBreak)?(0,Yi.qe)(this.apiConfig.settings.advertising.preRollBreak,500):n.preRollBreak)*ht.s_,this.postRollBreak=((0,P.$K)(this.apiConfig.settings.advertising.postRollBreak)?(0,Yi.qe)(this.apiConfig.settings.advertising.postRollBreak,500):n.postRollBreak)*ht.s_,this.playerId=n.playerId,this.floatingSettings.floatingMode===s.ProtoPlayerFloatingMode.Always?this.closeButtonMode=this.floatingSettings.floatingCloseButtonMode:this.closeButtonMode=(0,P.$K)(this.apiConfig.settings.customization.closeButtonMode)?this.apiConfig.settings.customization.closeButtonMode:n.closeButtonMode,this.isCloseButton=!!this.closeButtonMode||!!this.floatingSettings.floatingCloseButtonMode,this.uiComponentsVisibility={casting:!1,expandButton:(0,P.$K)(this.apiConfig.settings.customization.showExpandButton)?this.apiConfig.settings.customization.showExpandButton:n.expandButton},this.sharingDestinations=void 0,this.adPlaybackMode=n.adPlaybackMode,(0,P.$K)(this.apiConfig.settings.disableClickUrl)&&(this.disableClickUrl=this.apiConfig.settings.disableClickUrl);const{skippability:v,skipAdAfter:g,skipMin:m}=o.settings.advertising.skipAdSettings||{};this.skipAdAfter=(0,P.$K)(g)?g:n.skipAdAfter,this.skippability=(0,P.$K)(v)?v:n.skippability,this.skipMin=(0,P.$K)(m)?m:n.skipMin;const{disableTracking:y}=o.settings._connatixInternals;(y||a||this.isSeoTraffic)&&(this.disableTracking=!0),this.sessionId=this.lq.sessionId}setPreRollBreak(t){this.preRollBreak=this.pq(this.preRollBreak,t)}setPostRollBreak(t){this.postRollBreak=this.pq(this.postRollBreak,t)}pq(t,i){const e=(0,Yi.w4)(i);return null===e?t:e}fq(){this.vq(),this.gq();let t=[...this.mq(),...this.yq()];t=this.bq(t),t=this.wq(t),t=this.xq(t);const i=(0,P.$K)(this.apiConfig.settings.rendering.scrollHijackingProtection)?this.apiConfig.settings.rendering.scrollHijackingProtection:this.lq.scrollHijackingProtection;this.lineItemSettings={lineItems:t,disableScrollHijackEnforcement:i},this.Sq(this.lineItemSettings)}_q(t){return t*ht.s_}Aq(t,i){i.adTag=(0,P.$K)(t.url)?t.url:i.adTag,i.requestCap=(0,P.$K)(t.contentRequestCap)?t.contentRequestCap:i.requestCap,i.impressionCap=(0,P.$K)(t.contentImpressionCap)?t.contentImpressionCap:i.impressionCap,i.viewability=(0,P.$K)(t.viewability)?t.viewability:i.viewability,i.sound=(0,P.$K)(t.sound)?t.sound:i.sound,i.ignoreFilledRequests=(0,P.$K)(t.ignoreFilledRequests)?t.ignoreFilledRequests:i.ignoreFilledRequests,i.headerBidderBids=(0,P.$K)(t.headerBidderBids)?t.headerBidderBids:i.headerBidderBids,i.headerBidderTimeout=(0,P.$K)(t.headerBidderTimeout)?t.headerBidderTimeout:i.headerBidderTimeout,i.resetRequestsCapTime=(0,P.$K)(t.resetRequestsCapTime)?t.resetRequestsCapTime:i.resetRequestsCapTime,i.resetImpressionsCapTime=(0,P.$K)(t.resetImpressionsCapTime)?t.resetImpressionsCapTime:i.resetImpressionsCapTime,i.resetCapType=(0,P.$K)(t.resetCapType)?t.resetCapType:i.resetCapType,i.timeBetweenRequests=(0,P.$K)(t.timeBetweenRequests)?t.timeBetweenRequests:i.timeBetweenRequests,i.skipMode=(0,P.$K)(t.skipMode)?t.skipMode:i.skipMode,i.floorPrice=(0,P.$K)(t.floorPrice)?t.floorPrice:i.floorPrice,i.adBreakSettings=(0,P.$K)(t.adBreakSettings)?t.adBreakSettings:i.adBreakSettings,i.pauseAdOutOfView=(0,P.$K)(t.pauseAdOutOfView)?t.pauseAdOutOfView:i.pauseAdOutOfView,i.nonlinearLineItemSettings=(0,P.$K)(t.nonlinearLineItemSettings)?this.Pq(t.nonlinearLineItemSettings):i.nonlinearLineItemSettings,i.adType=(0,P.$K)(t.nonlinearLineItemSettings)?wt.ProtoAdType.Nonlinear:i.adType}Pq(t){const i={nonLinearRequestType:t.nonLinearRequestType?t.nonLinearRequestType:s.ProtoNonlinearRequestType.Banner,nonLinearAdTimeSeconds:t.nonLinearAdTimeSeconds?t.nonLinearAdTimeSeconds:15};return i.nonLinearAdTimeSeconds<15&&(i.nonLinearAdTimeSeconds=15),i.nonLinearAdTimeSeconds>180&&(i.nonLinearAdTimeSeconds=180),i}vq(){this.kq(this.apiConfig.settings.advertising.preRollBreak,s.ProtoAdBreakTypeEnum.PreRoll),this.kq(this.apiConfig.settings.advertising.postRollBreak,s.ProtoAdBreakTypeEnum.PostRoll),this.kq(this.apiConfig.settings.advertising.maxNumberOfMidRolls,s.ProtoAdBreakTypeEnum.MidRoll)}kq(t,i){const e=this.Iq(this.apiConfig.settings.advertising.adBreaks,i),s=this.Iq(this.lq.adBreaks,i),n={maxAdPodDuration:0,maxAdSlotDuration:0,numberOfAdSlots:1,types:[i]};e?this.adBreaks.push(e):!(0,P.$K)(t)||e||s?!e&&s&&this.adBreaks.push(s):this.adBreaks.push(n)}Iq(t,i){if(!t)return;let e;return t.forEach((t=>{t.types.includes(i)&&(e=Object.assign({},t),e.types=[i])})),e}wq(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)))}xq(t){return t.filter((t=>t.adType!==wt.ProtoAdType.Nonlinear))}removeCompatibleLineItems(t,i){const e=t.types[0],n=t.numberOfAdSlots>1?s.ProtoLineItemAdBreakTypeEnum.AdPod:s.ProtoLineItemAdBreakTypeEnum.SingleAd;return i.filter((t=>!t.adBreakSettings.adBreakTargeting.some((t=>t.adRollType===e&&(t.adBreakTypeEnum===s.ProtoLineItemAdBreakTypeEnum.All||t.adBreakTypeEnum===n)))))}dq(t){t.forEach((t=>{t.adBreakSettings||this.Tq(t),this.Cq(t)}))}Tq(t){t.adBreakSettings={adBreakTargeting:[{adRollType:s.ProtoAdBreakTypeEnum.PreRoll,adBreakTypeEnum:s.ProtoLineItemAdBreakTypeEnum.All},{adRollType:s.ProtoAdBreakTypeEnum.MidRoll,adBreakTypeEnum:s.ProtoLineItemAdBreakTypeEnum.All},{adRollType:s.ProtoAdBreakTypeEnum.PostRoll,adBreakTypeEnum:s.ProtoLineItemAdBreakTypeEnum.All}]}}Cq(t){0===t.requestCap&&(t.requestCap=20)}gq(){this.adBreaks.forEach((t=>{t.maxAdSlotDuration=this._q(t.maxAdSlotDuration),t.maxAdPodDuration=this._q(t.maxAdPodDuration),t.numberOfAdSlots<=1?t.maxAdPodDuration=0:t.maxAdSlotDuration>t.maxAdPodDuration&&(t.maxAdSlotDuration=t.maxAdPodDuration)}))}Mq(t,i){const e=Object.assign({},i);return this.Aq(t,e),(0,P.$K)(t.externalMediaFile)&&(e.externalMediaFile=t.externalMediaFile),(0,P.$K)(t.externalHlsFile)&&(e.externalHlsFile=t.externalHlsFile),e.customCpm=t.cpm,e}mq(){const t=[];if(!(0,a.BZ)(this.apiConfig.settings.advertising.lineItems))return[];const i=this.lq.lineItems.filter((t=>t.creativeType===s.ProtoCreativeTypeEnum.External));return this.apiConfig.settings.advertising.lineItems.forEach((e=>{if(this.Cq(e),this.isServerlessMode){const i=this.Eq(),s=this.Mq(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.Mq(e,i);t.push(s)}}))})),t}yq(){return!0===this.apiConfig.settings.advertising.blockConnatixDemand?[]:this.lq.lineItems.filter((t=>t.creativeType!==s.ProtoCreativeTypeEnum.External))}bq(t){return t.forEach((t=>{t.creativeType===s.ProtoCreativeTypeEnum.External&&(t.headerBidderBids&&"[]"!==t.headerBidderBids?t.creativeType=s.ProtoCreativeTypeEnum.HeaderBidder:t.externalMediaFile||t.externalHlsFile?t.creativeType=s.ProtoCreativeTypeEnum.MediaFile:t.creativeType=s.ProtoCreativeTypeEnum.ThirdParty)})),t}Eq(){return s.ProtoLineItem.toObject(s.ProtoLineItem.fromObject({}),{defaults:!0,arrays:!0,objects:!0})}Sq(t){this.moatTrackingEnabled=t.lineItems.some((t=>t.moatTrackingEnabled))}}{constructor(t,i,e,s,n,r,h,o,a,c,l,u){super(t,i,e,s,n,r,h,o,u,a,c,72),this.global=t,this.targetContainer=i,this.lq=e,this.qu=a,this.videoPosition=c,this.storyPosition=l,this.fontFamilySettings={},this.primaryColorList={},this.secondaryColorList={},this.accentColorList={},this.disableCTARendering=!1,this.disableStoryProgressBarRendering=!1,this.disableTitleRendering=!1,this.activeVersion=this.lq.activeVersion,this.storyId=this.lq.storyId,this.storyMetadata=this.apiConfig.settings.story,this.sdkVersion=this.apiConfig._appSettings.sdkVersion,this.minSlidesBeforeFirstAd=(0,P.$K)(this.apiConfig.settings.advertising.slidesBeforeFirstAd)?this.apiConfig.settings.advertising.slidesBeforeFirstAd:this.lq.minSlidesBeforeFirstAd,this.slidesBetweenAds=(0,P.$K)(this.apiConfig.settings.advertising.slidesBetweenAds)?this.apiConfig.settings.advertising.slidesBetweenAds:this.lq.slidesBetweenAds,this.lq.floatingMode===ma.ProtoPlayerFloatingMode.Always?this.orientation=ma.ProtoPlayerOrientationEnum.Landscape:this.orientation=(0,P.$K)(this.apiConfig.settings.customization.orientation)?this.apiConfig.settings.customization.orientation:this.lq.orientation,this.orientationBreakpoint=(0,P.$K)(this.apiConfig.settings.customization.orientationBreakpoint)?this.apiConfig.settings.customization.orientationBreakpoint:this.lq.orientationBreakpoint,(0,P.as)(this.apiConfig.settings.customization.fontFamilySettings)&&(this.fontFamilySettings=this.apiConfig.settings.customization.fontFamilySettings),this.Lq(),this.Oq(),this.Bq(),this.Dq(),this.jq(),this.Fq(),this.useAccentColorForProgressBar=(0,P.$K)(this.apiConfig.settings.customization.useAccentColorForProgressBar)?this.apiConfig.settings.customization.useAccentColorForProgressBar:this.lq.useAccentColorForProgressBar,this.endOfSlideCycleMode=(0,P.$K)(this.apiConfig.settings.endOfSlideCycleMode)?this.apiConfig.settings.endOfSlideCycleMode:this.lq.endOfCycleMode,this.uiComponentsVisibility.expandButton=!1,this.disableCTARendering=(0,P.$K)(this.apiConfig.settings.disableCTARendering)&&this.apiConfig.settings.disableCTARendering,this.disableStoryProgressBarRendering=(0,P.$K)(this.apiConfig.settings.disableStoryProgressBarRendering)&&this.apiConfig.settings.disableStoryProgressBarRendering,this.disableTitleRendering=(0,P.$K)(this.apiConfig.settings.disableTitleRendering)&&this.apiConfig.settings.disableTitleRendering,this.publisherName=(0,P.QM)(this.apiConfig.settings.customization.publisherName)?this.apiConfig.settings.customization.publisherName:this.lq.publisherName,this.fq(),this.activeVersionHasInsights=this.lq.activeVersionHasInsights,this.activeVersionHasInsights?(0,P.QM)(this.storyId)&&(0,P.QM)(this.activeVersion)&&Zh.k.loadInsights({insightsInputType:Ml.i.Story,id:this.storyId,versionId:this.activeVersion}):Zh.k.markAsUnavailable(this.storyId)}Lq(){this.apiConfig.settings.customization.primaryColorList&&(0,P.QM)(this.apiConfig.settings.customization.primaryColorList.background)?this.primaryColorList.background=this.apiConfig.settings.customization.primaryColorList.background:this.lq.primaryColorList&&(0,P.QM)(this.lq.primaryColorList.background)&&(this.primaryColorList.background=this.lq.primaryColorList.background)}Oq(){this.apiConfig.settings.customization.primaryColorList&&(0,P.QM)(this.apiConfig.settings.customization.primaryColorList.foreground)?this.primaryColorList.foreground=this.apiConfig.settings.customization.primaryColorList.foreground:this.lq.primaryColorList&&(0,P.QM)(this.lq.primaryColorList.foreground)&&(this.primaryColorList.foreground=this.lq.primaryColorList.foreground)}Bq(){this.apiConfig.settings.customization.secondaryColorList&&(0,P.QM)(this.apiConfig.settings.customization.secondaryColorList.background)?this.secondaryColorList.background=this.apiConfig.settings.customization.secondaryColorList.background:this.lq.secondaryColorList&&(0,P.QM)(this.lq.secondaryColorList.background)&&(this.secondaryColorList.background=this.lq.secondaryColorList.background)}Dq(){this.apiConfig.settings.customization.secondaryColorList&&(0,P.QM)(this.apiConfig.settings.customization.secondaryColorList.foreground)?this.secondaryColorList.foreground=this.apiConfig.settings.customization.secondaryColorList.foreground:this.lq.secondaryColorList&&(0,P.QM)(this.lq.secondaryColorList.foreground)&&(this.secondaryColorList.foreground=this.lq.secondaryColorList.foreground)}jq(){this.apiConfig.settings.customization.accentColorList&&(0,P.QM)(this.apiConfig.settings.customization.accentColorList.background)?this.accentColorList.background=this.apiConfig.settings.customization.accentColorList.background:this.lq.accentColorList&&(0,P.QM)(this.lq.accentColorList.background)&&(this.accentColorList.background=this.lq.accentColorList.background)}Fq(){this.apiConfig.settings.customization.accentColorList&&(0,P.QM)(this.apiConfig.settings.customization.accentColorList.foreground)?this.accentColorList.foreground=this.apiConfig.settings.customization.accentColorList.foreground:this.lq.accentColorList&&(0,P.QM)(this.lq.accentColorList.foreground)&&(this.accentColorList.foreground=this.lq.accentColorList.foreground)}}function Tu(t,i){const e=t.toObject({},{defaults:!0,arrays:!0,objects:!0}),n=function(t){return t.toObject({},{defaults:!0,arrays:!0,objects:!0})}(i);return e.players.push(n),e.browser=s.Browser.toObject(s.Browser.fromObject({}),{defaults:!0,arrays:!0,objects:!0}),e.geoLocation=s.GeoLocation.toObject(s.GeoLocation.fromObject({}),{defaults:!0,arrays:!0,objects:!0}),e}var Cu=n(3344),Mu=n(7382);class Eu extends xu{constructor(t,e){super(),this.Ne=t;try{this.Jc=new vu,this.Yo()}catch(t){(0,i.n)({message:"omid_verification_client_error",exception:t.message,callStack:t.callStack,level:e?i.D.CRITICAL:i.D.INFO})}}subscribe(t,i){return this.Jc.on(t,i)}Yo(){const t=Mu.$.getVerificationClient(this.Ne);if(!t)throw new Error("omid_verification_client_not_found");if(this.$q=new t,!this.$q.isSupported())throw new Error("omid_not_implemented");this.Vq(),this.kL()}Vq(){this.$q.registerSessionObserver((t=>{t&&t.type===Cu._f.sessionError&&(0,i.n)({message:"omid_verification_client_session_error",exception:t.data.message,level:i.D.WARN})}))}kL(){this.$q.addEventListener(Cu._f.geometryChange,(t=>{try{const{percentageInView:i,reasons:e}=t.data.adView,s=[Cu.li.backgrounded,Cu.li.notFound].some((t=>e.includes(t)));this.iq(s);const n=i/100;this.setViewableThreshold(n),this.Jc.trigger(k.rl.OmidViewabilityThreshold,n)}catch(t){(0,i.n)({message:"omid_verification_client_geometry_change_error",exception:t.message,callStack:t.callStack,level:i.D.CRITICAL},{throttle:1})}}))}}const Lu=`cnx-playspace-css-${Ne.g.version}`;class Ou extends r.a{pe(){return{id:Lu,src:on.n.endPoints.assets.css.playspace}}getDelegateHandler(){return{getCurrentVolume:()=>this.renderer.getApiMethods().getVolume()}}getRendererInstance(t,i,e,s){return new mu(this,t,i,e,s)}getViewabilityService(t,i){return this.externalAttributes.settings.useExternalViewabilityService?new xu:this.vi?new Eu(window,this.mi):new wu(t.global,i)}getPlayerResponse(t,i){return new Promise(((i,e)=>{un.n.sendProtoRequest({ProtoResponse:ma.ProtoPlayspaceResponse,ProtoRequest:ma.ProtoPlayspaceRequest,requestData:t,endpoint:on.n.endPoints.api.story,withCredentials:!0,queryParams:Object.assign({[gn.Fk]:Ne.g.version},Tn.f.getCidKeyValueObject()),logError:!0}).then((t=>{this.setApiHostUrl(t.apiHostUrl),window.parent.connatixDummy&&(0,In.Ph)("connatixDummy",this.pageUrl)&&(t.players[0]=Object.assign(Object.assign({},t.players[0]),window.parent.connatixDummy)),i(t)})).catch((t=>{this.GLOBAL.cnxDummyResponse?i(this.GLOBAL.cnxDummyResponse):e(t)}))}))}getPlayerModel(t,i,e,s){return new Iu(t.insertWindow?t.insertWindow:this.GLOBAL,t.insertContainer,i.players[s],i.browser.device,i.secondLevelDomain,this.externalAttributes,this.isServerlessMode,i.supplyChain,e,this.queryParams.cnxVideoPosition,this.queryParams.cnxStoryPosition,i.isSeoTraffic||this.queryParams.cnxIsSeoTraffic)}getApiConfigEnums(){return nu}getApiConfigEvents(){return Yl}getSpecificRequestData(){const t={};return this.queryParams.cnxStoryId?t.forceStoryId=this.queryParams.cnxStoryId:this.externalAttributes.storyId&&(t.forceStoryId=this.externalAttributes.storyId),t}defaultInitFromProto(){return Tu(ma.ProtoPlayspaceResponse,ma.ProtoPlayspace)}Mi(){super.Mi(),this.externalAttributes.settings.story=void 0}}var Ru=n(1730),Bu=n(3121);class Du{constructor(t=!1){this._debugLogging=t,this.Uq="eventEmitted",this.Jc=new vu}subscribe(t){return this.Jc.on(this.Uq,t)}unsubscribe(t){this.Jc.remove(this.Uq,t)}emitSessionStart(t){const i={videoMetadata:t};this.Nq({metadata:i,name:Bu.Z.SessionStart})}emitContentComplete(){this.Nq({name:Bu.Z.ContentComplete})}emitSessionEnd(){this.Nq({name:Bu.Z.SessionEnd})}emitPlay(){this.Nq({name:Bu.Z.Play})}emitPause(){this.Nq({name:Bu.Z.Pause})}emitAdPlay(){this.Nq({name:Bu.Z.AdPlay})}emitAdPause(){this.Nq({name:Bu.Z.AdPause})}emitAdPlaying(t){const i={adType:t};this.Nq({name:Bu.Z.AdPlaying,metadata:i})}emitAdPaused(t){const i={adType:t};this.Nq({name:Bu.Z.AdPaused,metadata:i})}emitAdImpression(t,i,e){const s={adMetadata:t,customAdMetadata:i,adType:e};this.Nq({metadata:s,name:Bu.Z.AdImpression})}emitAdComplete(t){const i={adType:t};this.Nq({name:Bu.Z.AdComplete,metadata:i})}emitAdStopped(t){const i={adType:t};this.Nq({name:Bu.Z.AdStopped,metadata:i})}emitAdBreakStart(t){const i={adBreakMetadata:t};this.Nq({metadata:i,name:Bu.Z.AdBreakStart})}emitAdBreakComplete(t){const i={adType:t};this.Nq({name:Bu.Z.AdBreakComplete,metadata:i})}emitPlayerResized(t){const i={playerDimensionsMetadata:t};this.Nq({metadata:i,name:Bu.Z.PlayerResized})}emitOnEnterFullscreen(){this.Nq({name:Bu.Z.OnEnterFullscreen})}emitOnExitFullscreen(){this.Nq({name:Bu.Z.OnExitFullscreen})}emitOnPlayerCollapsed(){this.Nq({name:Bu.Z.PlayerCollapsed})}emitOnPlayerExpanded(){this.Nq({name:Bu.Z.PlayerExpanded})}emitAdError(t){const i={adType:t};this.Nq({name:Bu.Z.AdError,metadata:i})}emitPlayError(){this.Nq({name:Bu.Z.PlayError})}emitRenderError(){this.Nq({name:Bu.Z.RenderError})}emitAdClickThru(t){const i={adType:t};this.Nq({name:Bu.Z.AdClickThru,metadata:i})}emitAdInteraction(t){const i={adType:t};this.Nq({name:Bu.Z.AdInteraction,metadata:i})}emitAdVideoStart(t,i){const e={adVideoStartMetadata:t,adType:i};this.Nq({metadata:e,name:Bu.Z.AdVideoStart})}emitAdLoaded(t,i){const e={adLoadedMetadata:t,adType:i};this.Nq({metadata:e,name:Bu.Z.AdLoaded})}emitAdStateChange(t,i){const e={adStateChangedMetadata:t,adType:i};this.Nq({metadata:e,name:Bu.Z.AdStateChange})}emitAdVideoFirstQuartile(t){const i={adType:t};this.Nq({name:Bu.Z.AdVideoFirstQuartile,metadata:i})}emitAdVideoMidpoint(t){const i={adType:t};this.Nq({name:Bu.Z.AdVideoMidpoint,metadata:i})}emitAdVideoThirdQuartile(t){const i={adType:t};this.Nq({name:Bu.Z.AdVideoThirdQuartile,metadata:i})}emitAdVideoComplete(t){const i={adType:t};this.Nq({name:Bu.Z.AdVideoComplete,metadata:i})}emitVolumeChange(t){this.Nq({name:Bu.Z.VolumeChange,metadata:{volume:t}})}emitAdVolumeChange(t){const i={adType:t};this.Nq({name:Bu.Z.AdVolumeChange,metadata:i})}emitAdSkipped(t){const i={adType:t};this.Nq({name:Bu.Z.AdSkipped,metadata:i})}Nq(t){var i;(null===(i=null==t?void 0:t.metadata)||void 0===i?void 0:i.adType)!==s.ProtoAdType.Nonlinear&&(this._debugLogging&&console.log("Connatix Player Elements debugging: ",t),this.Jc.trigger(this.Uq,t))}destroy(){this.Nq({name:Bu.Z.Destroy}),this.Jc.removeAll()}}var ju,Fu=n(2645);!function(t){t.connatix="connatix.com",t.elements="elements.video"}(ju||(ju={}));ju.connatix,ju.elements;const $u=window.parent,Vu=(0,m.bZ)(gn.ym,window.document.currentScript);Tn.f.customerId=Vu;const Uu=[];window.addEventListener("unload",(function(t){Uu.forEach((t=>t.destroy()))}));const Nu=(0,ut.pE)($u).topFrame;Ru.e.abServiceType=Ru.j.PlayspaceABService;const Hu=function(t,n,r){var h,o;const a=(0,P.QM)(t._appSettings.bundleID),c=(0,P.QM)(t._appSettings.sdkVersion);if(c){const i=parseInt(t._appSettings.sdkVersion.substr(0,1),10);t.settings.useExternalViewabilityService=!(i>=3)}const{cmp:l,tcf:u,usPrivacyString:d,deviceID:p}=t._appSettings,f=((t,i)=>i.AMP_CONTEXT_DATA||t.settings.implementationType===s.ProtoImplementationType.Amp)(t,$u),v={UserManagerService:new e.x(Nu,a,f,{cmp:l,tcf:u,usPrivacyString:d,deviceID:p}),EventsStorageService:new Du(t.settings.plugins._debugLogging),UrlSuffixerService:new Fu.f},g=new Ou(v,$u,a,f,c,!1,r);Uu.push(g);const y=function(){const e={id:Lu,src:on.n.endPoints.assets.css.playspace};(0,ut.Up)((()=>function(t){return new Promise(((i,e)=>{if((0,m.rI)(t.id,Nu))return i();(0,m.NS)(t,Nu.document.head,Nu,(()=>i()),(t=>e(t)))||e()}))}(e))).catch((t=>{throw(0,i.n)({message:"Prerender_Playspace_Loader_add_css_link",exception:t.message,callStack:t.stack,level:i.D.INFO},{throttle:1e3}),t})).then((()=>{try{(0,m.Nb)($u),g.updateQueryParams(),g.loadScriptTag(t,n)?g.insertRenderer():(0,i.n)({message:"Prerender_Playspace_main_no_script_tag",level:i.D.INFO},{throttle:1e3})}catch(t){(0,i.n)({message:"Prerender_Playspace_main_insertRenderer",exception:t.message,callStack:t.stack,level:i.D.INFO},{throttle:1e3})}})).catch((()=>{}))};a?(g.setInappPageUrl(null===(h=null==t?void 0:t._appSettings)||void 0===h?void 0:h.appPageURL),y()):g.findPageUrl($u,null===(o=null==t?void 0:t.settings)||void 0===o?void 0:o.ampUrl).then((()=>y())).catch((t=>{(0,i.n)({message:"Prerender_Playspace_main_init",exception:t.message,callStack:t.stack,level:i.D.INFO},{throttle:1e3}),g.registerApiError()}))};try{!function(){if((0,ut.oC)())return void(0,i.n)({message:"Prerender_Playspace_main_IE_check",level:i.D.INFO},{throttle:1e3});on.n.bundleDomain=ju.connatix;let t=[];$u.cnxps&&(t=$u.cnxps.cmd),$u.cnxps=function(){function t(t){var e;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._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===(e=null==t?void 0:t._appSettings)||void 0===e?void 0:e.bundleID)&&(0,i.n)({level:i.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,P.QM)(null===(e=n._appSettings)||void 0===e?void 0:e.gdprConsentString)||(0,P.QM)(null===(s=n._appSettings)||void 0===s?void 0:s.gdprParsedVendorString))&&(n._appSettings.cmp={consentString:(0,P.QM)(null==r?void 0:r.consentString)?r.consentString:n._appSettings.gdprConsentString,parsedVendorConsents:(0,P.QM)(null==r?void 0:r.parsedVendorConsents)?r.parsedVendorConsents:n._appSettings.gdprParsedVendorString});const h=Object.assign({},(0,Xe.EQ)(Object.assign({},n._appSettings.cmp))),o=Object.assign({},(0,Xe.EQ)(Object.assign({},n._appSettings.tcf))),{usPrivacyString:a,deviceID:c,appPageURL:l}=(0,Xe.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(e,s){try{Hu(t,e,s)}catch(t){(0,i.n)({message:"Prerender_Playspace_main_initPlayer",exception:t.message,callStack:t.stack,level:i.D.INFO},{throttle:1e3})}}}}return t.cmd={push:function(t){try{t()}catch(t){(0,i.n)({message:"Prerender_Playspace_main_push_callback",level:i.D.INFO,exception:t.message,callStack:t.stack},{throttle:1e3})}}},t.configEnums=nu,t.configEvents=Yl,t}(),t.forEach((t=>{try{t()}catch(t){(0,i.n)({message:"Prerender_Playspace_main_commands_callback",exception:t.message,callStack:t.stack,level:i.D.INFO},{throttle:1e3})}}))}()}catch(t){(0,i.n)({message:"Prerender_Playspace_main",exception:t.message,callStack:t.stack,level:i.D.INFO},{throttle:1e3})}})()})();

Callers 15

makeNodesMethod · 0.80
getRawCspsAndXfoMethod · 0.80
getRawCoopMethod · 0.80
getRawCspsMethod · 0.80
getRawHstsMethod · 0.80
getRawCspsMethod · 0.80
auditMethod · 0.80
_evaluateInContextMethod · 0.80
_callFunctionOnMethod · 0.80
kebabCaseToCamelCaseFunction · 0.80

Calls 15

setAdWidthMethod · 0.80
setAdHeightMethod · 0.80
setAdPositionMethod · 0.80
setVideoDescriptionMethod · 0.80
setVideoDurationMethod · 0.80
setVideoIdMethod · 0.80
setVideoTitleMethod · 0.80
setVideoUrlMethod · 0.80
setGDPRMethod · 0.80
setConsentMethod · 0.80
setGDPRConsentMethod · 0.80
getTrackableUserMethod · 0.80

Tested by

no test coverage detected