(()=>{var e,t,i={8048:(e,t,i)=>{"use strict";i.d(t,{Z:()=>a});var r=i(8081),n=i.n(r),o=i(3645),s=i.n(o)()(n());s.push([e.id,'.omp-native-bottom-wrapper{display:flex;flex-direction:row;justify-content:space-between;gap:6%;padding:8px 6px;background-color:#fff}.omp-native-texts-wrapper{padding-top:8px;display:flex;flex-direction:column;gap:6px}.omp-native-texts-wrapper .omp-native-title,.omp-native-texts-wrapper .omp-native-description,.omp-native-texts-wrapper .omp-sponsor-brand{overflow:hidden;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical}.omp-native-texts-wrapper .omp-sponsor-brand{-webkit-line-clamp:1}.omp-native-texts-wrapper .omp-native-title{color:#000;font-size:18px;font-weight:700}.omp-native-texts-wrapper .omp-native-description{color:#4a4950;font-size:14px;font-weight:normal}.omp-native-logo-wrapper{display:flex;flex-direction:row;gap:6px;align-items:center;background-color:#fff}.omp-native-logo-wrapper>.omp-logo{width:30px;height:30px}.omp-native-logo-wrapper>.omp-logo>img{width:100%;height:100%}.omp-native-logo-wrapper>.omp-sponsor-brand{font-size:12px;font-weight:400;color:#646464}.omp-native-button-wrapper{display:flex;align-items:center;max-width:30%}.omp-native-button-wrapper .omp-native-button{cursor:pointer;white-space:nowrap;padding:0 10px;overflow:hidden;text-overflow:ellipsis;border:.5px solid #000;border-radius:4px;color:#000;text-decoration:none;font-style:normal;font-weight:500;font-size:12px;align-items:center;justify-content:center;height:29px;display:block;line-height:29px}.omp-in-video-native-wrapper{display:flex;justify-content:space-between;gap:20px;z-index:999;top:0;position:absolute;transform:translateY(-100%);padding:10px 14px 16px;box-sizing:border-box;color:#fff;width:100%;transition:transform .6s;background:linear-gradient(180deg, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.1) 70%, rgba(0, 0, 0, 0) 100%)}.omp-in-video-native-wrapper .omp-native-texts-wrapper{padding-top:0}.omp-in-video-native-wrapper .omp-native-texts-wrapper .omp-native-title{color:#fff}.omp-in-video-native-wrapper .omp-native-button-wrapper{display:block}.omp-in-video-native-wrapper .omp-native-button-wrapper .omp-native-button{border-color:#fff;color:#fff;background:rgba(0,0,0,.8)}.ob-omp-controls-visible .omp-in-video-native-wrapper{transform:translateY(0)}div[id^=wrapperContainerForShadowDom_],.obv-video-wrapper{position:relative}div[id^=wrapperContainerForShadowDom_] .ob-player-wrapper,.obv-video-wrapper .ob-player-wrapper{z-index:1;top:0;margin-right:auto;margin-left:auto;display:flex;flex-direction:column;position:relative}div[id^=wrapperContainerForShadowDom_] .ob-player-wrapper.above-widget,div[id^=wrapperContainerForShadowDom_] .ob-player-wrapper.below-widget,.obv-video-wrapper .ob-player-wrapper.above-widget,.obv-video-wrapper .ob-player-wrapper.below-widget{margin:20px auto}div[id^=wrapperContainerForShadowDom_] .ob-player-wrapper.hlr-widget,.obv-video-wrapper .ob-player-wrapper.hlr-widget{transition:opacity .2s linear;opacity:1}div[id^=wrapperContainerForShadowDom_] .ob-player-wrapper.ghost-fixed-size,.obv-video-wrapper .ob-player-wrapper.ghost-fixed-size{margin:unset}div[id^=wrapperContainerForShadowDom_] .ob-player-wrapper.obv-hide-wrapper,.obv-video-wrapper .ob-player-wrapper.obv-hide-wrapper{visibility:hidden;position:absolute;z-index:0;opacity:0}div[id^=wrapperContainerForShadowDom_] .ob-player-wrapper.ob-sticky .omp-native-description,div[id^=wrapperContainerForShadowDom_] .ob-player-wrapper.ob-sticky .omp-native-title,.obv-video-wrapper .ob-player-wrapper.ob-sticky .omp-native-description,.obv-video-wrapper .ob-player-wrapper.ob-sticky .omp-native-title{-webkit-line-clamp:1}div[id^=wrapperContainerForShadowDom_] .ob-player-wrapper.ob-sticky .omp-native-title,.obv-video-wrapper .ob-player-wrapper.ob-sticky .omp-native-title{font-size:16px}div[id^=wrapperContainerForShadowDom_] .ob-player-wrapper.ob-sticky .omp-native-description,.obv-video-wrapper .ob-player-wrapper.ob-sticky .omp-native-description{font-size:12px}div[id^=wrapperContainerForShadowDom_] .ob-player-wrapper.ob-sticky .omp-sponsor-brand,.obv-video-wrapper .ob-player-wrapper.ob-sticky .omp-sponsor-brand{font-size:11px}div[id^=wrapperContainerForShadowDom_] .ob-player-wrapper.ob-sticky .omp-native-button,.obv-video-wrapper .ob-player-wrapper.ob-sticky .omp-native-button{font-size:11px}div[id^=wrapperContainerForShadowDom_] .ob-player-wrapper.ob-sticky-z-index,.obv-video-wrapper .ob-player-wrapper.ob-sticky-z-index{z-index:1}div[id^=wrapperContainerForShadowDom_] .ob-player-wrapper .ob-inner-player-wrapper,.obv-video-wrapper .ob-player-wrapper .ob-inner-player-wrapper{position:relative;flex:1;overflow:hidden;max-height:100%;max-width:100%}div[id^=wrapperContainerForShadowDom_] .ob-player-wrapper .ob-inner-player-wrapper .ob-player,.obv-video-wrapper .ob-player-wrapper .ob-inner-player-wrapper .ob-player{width:100%;height:100%;position:absolute;visibility:hidden;z-index:0;top:0}div[id^=wrapperContainerForShadowDom_] .ob-player-wrapper .ob-inner-player-wrapper .ob-player.obv-playing,.obv-video-wrapper .ob-player-wrapper .ob-inner-player-wrapper .ob-player.obv-playing{visibility:visible;position:relative;z-index:1;display:block}div[id^=wrapperContainerForShadowDom_] .ob-player-wrapper .ob-inner-player-wrapper .ob-player.obv-playing .ob-inner-player-wrapper,.obv-video-wrapper .ob-player-wrapper .ob-inner-player-wrapper .ob-player.obv-playing .ob-inner-player-wrapper{overflow:visible}div[id^=wrapperContainerForShadowDom_] .ob-player-wrapper .obv-title-wrapper,.obv-video-wrapper .ob-player-wrapper .obv-title-wrapper{padding:8px 6px 0;font-size:14px;color:#000}div[id^=wrapperContainerForShadowDom_] .ob-player-wrapper .obv-skip-wrapper,.obv-video-wrapper .ob-player-wrapper .obv-skip-wrapper{position:absolute;direction:ltr !important;bottom:14%;right:0;z-index:3;border-radius:2px;border:solid .5px rgba(255,255,255,.7);background-color:rgba(0,0,0,.8);cursor:pointer;font-family:Lato,"sans-serif";font-size:12px;display:flex;align-items:center;color:#fff;gap:8px;padding:8px;line-height:1}div[id^=wrapperContainerForShadowDom_] .ob-player-wrapper .obv-skip-wrapper.minimize-skip-button,.obv-video-wrapper .ob-player-wrapper .obv-skip-wrapper.minimize-skip-button{bottom:20%}div[id^=wrapperContainerForShadowDom_] .ob-player-wrapper .obv-skip-wrapper.minimize-skip-button>span:first-child,.obv-video-wrapper .ob-player-wrapper .obv-skip-wrapper.minimize-skip-button>span:first-child{font-size:13px}div[id^=wrapperContainerForShadowDom_] .ob-player-wrapper .obv-skip-wrapper.minimize-skip-button>.obv-skip-icon,.obv-video-wrapper .ob-player-wrapper .obv-skip-wrapper.minimize-skip-button>.obv-skip-icon{font-size:10px}div[id^=wrapperContainerForShadowDom_] .ob-player-wrapper .obv-skip-wrapper.minimize-skip-button>.obv-skip-icon:after,.obv-video-wrapper .ob-player-wrapper .obv-skip-wrapper.minimize-skip-button>.obv-skip-icon:after{font-size:12px}div[id^=wrapperContainerForShadowDom_] .ob-player-wrapper .obv-skip-wrapper>span:first-child,.obv-video-wrapper .ob-player-wrapper .obv-skip-wrapper>span:first-child{direction:ltr !important;font-family:Arial,"sans-serif";font-size:18px}div[id^=wrapperContainerForShadowDom_] .ob-player-wrapper .obv-skip-wrapper>.obv-skip-icon,.obv-video-wrapper .ob-player-wrapper .obv-skip-wrapper>.obv-skip-icon{font-size:12px;position:relative}div[id^=wrapperContainerForShadowDom_] .ob-player-wrapper .obv-skip-wrapper>.obv-skip-icon:after,.obv-video-wrapper .ob-player-wrapper .obv-skip-wrapper>.obv-skip-icon:after{content:"⏽";font-size:14px;margin-left:1px}div[id^=wrapperContainerForShadowDom_] #skip-btn,.obv-video-wrapper #skip-btn{display:none !important}div[id^=wrapperContainerForShadowDom_] .obv-visual-id,.obv-video-wrapper .obv-visual-id{position:absolute;color:#e5e4e2;font-size:8px;bottom:1px;right:1px;z-index:1;opacity:.5;letter-spacing:1px;text-shadow:-1px -1px 0 #000,1px -1px 0 #000,-1px 1px 0 #000,1px 1px 0 #000}in-widget-styling,div[id^=wrapperContainerForShadowDom_] .ob-player-wrapper.in-widget,.obv-video-wrapper .ob-player-wrapper.in-widget,div[id^=wrapperContainerForShadowDom_] .ob-player-wrapper.covering-widget,.obv-video-wrapper .ob-player-wrapper.covering-widget{position:absolute}in-widget-styling .ob-player[id$=VI_Player],div[id^=wrapperContainerForShadowDom_] .ob-player-wrapper.in-widget .ob-player[id$=VI_Player],.obv-video-wrapper .ob-player-wrapper.in-widget .ob-player[id$=VI_Player],div[id^=wrapperContainerForShadowDom_] .ob-player-wrapper.covering-widget .ob-player[id$=VI_Player],.obv-video-wrapper .ob-player-wrapper.covering-widget .ob-player[id$=VI_Player]{display:flex !important;align-items:center;background:#000}.no-transition{transition:unset !important}',""]);const a=s},3645:e=>{"use strict";e.exports=function(e){var t=[];return t.toString=function(){return this.map((function(t){var i="",r=void 0!==t[5];return t[4]&&(i+="@supports (".concat(t[4],") {")),t[2]&&(i+="@media ".concat(t[2]," {")),r&&(i+="@layer".concat(t[5].length>0?" ".concat(t[5]):""," {")),i+=e(t),r&&(i+="}"),t[2]&&(i+="}"),t[4]&&(i+="}"),i})).join("")},t.i=function(e,i,r,n,o){"string"==typeof e&&(e=[[null,e,void 0]]);var s={};if(r)for(var a=0;a0?" ".concat(c[5]):""," {").concat(c[1],"}")),c[5]=o),i&&(c[2]?(c[1]="@media ".concat(c[2]," {").concat(c[1],"}"),c[2]=i):c[2]=i),n&&(c[4]?(c[1]="@supports (".concat(c[4],") {").concat(c[1],"}"),c[4]=n):c[4]="".concat(n)),t.push(c))}},t}},8081:e=>{"use strict";e.exports=function(e){return e[1]}},6515:(e,t,i)=>{"use strict";i.d(t,{X:()=>n});var r=i(655),n=function(e){function t(t){var i=e.call(this)||this;return i._value=t,i}return(0,r.ZT)(t,e),Object.defineProperty(t.prototype,"value",{get:function(){return this.getValue()},enumerable:!1,configurable:!0}),t.prototype._subscribe=function(t){var i=e.prototype._subscribe.call(this,t);return!i.closed&&t.next(this._value),i},t.prototype.getValue=function(){var e=this,t=e.hasError,i=e.thrownError,r=e._value;if(t)throw i;return this._throwIfClosed(),r},t.prototype.next=function(t){e.prototype.next.call(this,this._value=t)},t}(i(6716).x)},1480:(e,t,i)=>{"use strict";i.d(t,{y:()=>p});var r=i(5642),n=i(5720),o=i(6766),s=i(278);function a(e){return 0===e.length?s.y:1===e.length?e[0]:function(t){return e.reduce((function(e,t){return t(e)}),t)}}var d=i(3912),l=i(8474),c=i(8846),p=function(){function e(e){e&&(this._subscribe=e)}return e.prototype.lift=function(t){var i=new e;return i.source=this,i.operator=t,i},e.prototype.subscribe=function(e,t,i){var o,s=this,a=(o=e)&&o instanceof r.Lv||function(e){return e&&(0,l.m)(e.next)&&(0,l.m)(e.error)&&(0,l.m)(e.complete)}(o)&&(0,n.Nn)(o)?e:new r.Hp(e,t,i);return(0,c.x)((function(){var e=s,t=e.operator,i=e.source;a.add(t?t.call(a,i):i?s._subscribe(a):s._trySubscribe(a))})),a},e.prototype._trySubscribe=function(e){try{return this._subscribe(e)}catch(t){e.error(t)}},e.prototype.forEach=function(e,t){var i=this;return new(t=g(t))((function(t,n){var o=new r.Hp({next:function(t){try{e(t)}catch(e){n(e),o.unsubscribe()}},error:n,complete:t});i.subscribe(o)}))},e.prototype._subscribe=function(e){var t;return null===(t=this.source)||void 0===t?void 0:t.subscribe(e)},e.prototype[o.L]=function(){return this},e.prototype.pipe=function(){for(var e=[],t=0;t{"use strict";i.d(t,{x:()=>l});var r=i(655),n=i(1480),o=i(5720),s=(0,i(1819).d)((function(e){return function(){e(this),this.name="ObjectUnsubscribedError",this.message="object unsubscribed"}})),a=i(3699),d=i(8846),l=function(e){function t(){var t=e.call(this)||this;return t.closed=!1,t.currentObservers=null,t.observers=[],t.isStopped=!1,t.hasError=!1,t.thrownError=null,t}return(0,r.ZT)(t,e),t.prototype.lift=function(e){var t=new c(this,this);return t.operator=e,t},t.prototype._throwIfClosed=function(){if(this.closed)throw new s},t.prototype.next=function(e){var t=this;(0,d.x)((function(){var i,n;if(t._throwIfClosed(),!t.isStopped){t.currentObservers||(t.currentObservers=Array.from(t.observers));try{for(var o=(0,r.XA)(t.currentObservers),s=o.next();!s.done;s=o.next()){s.value.next(e)}}catch(e){i={error:e}}finally{try{s&&!s.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}}}))},t.prototype.error=function(e){var t=this;(0,d.x)((function(){if(t._throwIfClosed(),!t.isStopped){t.hasError=t.isStopped=!0,t.thrownError=e;for(var i=t.observers;i.length;)i.shift().error(e)}}))},t.prototype.complete=function(){var e=this;(0,d.x)((function(){if(e._throwIfClosed(),!e.isStopped){e.isStopped=!0;for(var t=e.observers;t.length;)t.shift().complete()}}))},t.prototype.unsubscribe=function(){this.isStopped=this.closed=!0,this.observers=this.currentObservers=null},Object.defineProperty(t.prototype,"observed",{get:function(){var e;return(null===(e=this.observers)||void 0===e?void 0:e.length)>0},enumerable:!1,configurable:!0}),t.prototype._trySubscribe=function(t){return this._throwIfClosed(),e.prototype._trySubscribe.call(this,t)},t.prototype._subscribe=function(e){return this._throwIfClosed(),this._checkFinalizedStatuses(e),this._innerSubscribe(e)},t.prototype._innerSubscribe=function(e){var t=this,i=this,r=i.hasError,n=i.isStopped,s=i.observers;return r||n?o.Lc:(this.currentObservers=null,s.push(e),new o.w0((function(){t.currentObservers=null,(0,a.P)(s,e)})))},t.prototype._checkFinalizedStatuses=function(e){var t=this,i=t.hasError,r=t.thrownError,n=t.isStopped;i?e.error(r):n&&e.complete()},t.prototype.asObservable=function(){var e=new n.y;return e.source=this,e},t.create=function(e,t){return new c(e,t)},t}(n.y),c=function(e){function t(t,i){var r=e.call(this)||this;return r.destination=t,r.source=i,r}return(0,r.ZT)(t,e),t.prototype.next=function(e){var t,i;null===(i=null===(t=this.destination)||void 0===t?void 0:t.next)||void 0===i||i.call(t,e)},t.prototype.error=function(e){var t,i;null===(i=null===(t=this.destination)||void 0===t?void 0:t.error)||void 0===i||i.call(t,e)},t.prototype.complete=function(){var e,t;null===(t=null===(e=this.destination)||void 0===e?void 0:e.complete)||void 0===t||t.call(e)},t.prototype._subscribe=function(e){var t,i;return null!==(i=null===(t=this.source)||void 0===t?void 0:t.subscribe(e))&&void 0!==i?i:o.Lc},t}(l)},5642:(e,t,i)=>{"use strict";i.d(t,{Hp:()=>w,Lv:()=>u});var r=i(655),n=i(8474),o=i(5720),s=i(3912),a=i(5);function d(){}var l=c("C",void 0,void 0);function c(e,t,i){return{kind:e,value:t,error:i}}var p=i(8380),g=i(8846),u=function(e){function t(t){var i=e.call(this)||this;return i.isStopped=!1,t?(i.destination=t,(0,o.Nn)(t)&&t.add(i)):i.destination=b,i}return(0,r.ZT)(t,e),t.create=function(e,t,i){return new w(e,t,i)},t.prototype.next=function(e){this.isStopped?f(function(e){return c("N",e,void 0)}(e),this):this._next(e)},t.prototype.error=function(e){this.isStopped?f(c("E",void 0,e),this):(this.isStopped=!0,this._error(e))},t.prototype.complete=function(){this.isStopped?f(l,this):(this.isStopped=!0,this._complete())},t.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,e.prototype.unsubscribe.call(this),this.destination=null)},t.prototype._next=function(e){this.destination.next(e)},t.prototype._error=function(e){try{this.destination.error(e)}finally{this.unsubscribe()}},t.prototype._complete=function(){try{this.destination.complete()}finally{this.unsubscribe()}},t}(o.w0),h=Function.prototype.bind;function v(e,t){return h.call(e,t)}var y=function(){function e(e){this.partialObserver=e}return e.prototype.next=function(e){var t=this.partialObserver;if(t.next)try{t.next(e)}catch(e){m(e)}},e.prototype.error=function(e){var t=this.partialObserver;if(t.error)try{t.error(e)}catch(e){m(e)}else m(e)},e.prototype.complete=function(){var e=this.partialObserver;if(e.complete)try{e.complete()}catch(e){m(e)}},e}(),w=function(e){function t(t,i,r){var o,a,d=e.call(this)||this;(0,n.m)(t)||!t?o={next:null!=t?t:void 0,error:null!=i?i:void 0,complete:null!=r?r:void 0}:d&&s.v.useDeprecatedNextContext?((a=Object.create(t)).unsubscribe=function(){return d.unsubscribe()},o={next:t.next&&v(t.next,a),error:t.error&&v(t.error,a),complete:t.complete&&v(t.complete,a)}):o=t;return d.destination=new y(o),d}return(0,r.ZT)(t,e),t}(u);function m(e){s.v.useDeprecatedSynchronousErrorHandling?(0,g.O)(e):(0,a.h)(e)}function f(e,t){var i=s.v.onStoppedNotification;i&&p.z.setTimeout((function(){return i(e,t)}))}var b={closed:!0,next:d,error:function(e){throw e},complete:d}},5720:(e,t,i)=>{"use strict";i.d(t,{Lc:()=>d,w0:()=>a,Nn:()=>l});var r=i(655),n=i(8474),o=(0,i(1819).d)((function(e){return function(t){e(this),this.message=t?t.length+" errors occurred during unsubscription:\n"+t.map((function(e,t){return t+1+") "+e.toString()})).join("\n "):"",this.name="UnsubscriptionError",this.errors=t}})),s=i(3699),a=function(){function e(e){this.initialTeardown=e,this.closed=!1,this._parentage=null,this._finalizers=null}var t;return e.prototype.unsubscribe=function(){var e,t,i,s,a;if(!this.closed){this.closed=!0;var d=this._parentage;if(d)if(this._parentage=null,Array.isArray(d))try{for(var l=(0,r.XA)(d),p=l.next();!p.done;p=l.next()){p.value.remove(this)}}catch(t){e={error:t}}finally{try{p&&!p.done&&(t=l.return)&&t.call(l)}finally{if(e)throw e.error}}else d.remove(this);var g=this.initialTeardown;if((0,n.m)(g))try{g()}catch(e){a=e instanceof o?e.errors:[e]}var u=this._finalizers;if(u){this._finalizers=null;try{for(var h=(0,r.XA)(u),v=h.next();!v.done;v=h.next()){var y=v.value;try{c(y)}catch(e){a=null!=a?a:[],e instanceof o?a=(0,r.ev)((0,r.ev)([],(0,r.CR)(a)),(0,r.CR)(e.errors)):a.push(e)}}}catch(e){i={error:e}}finally{try{v&&!v.done&&(s=h.return)&&s.call(h)}finally{if(i)throw i.error}}}if(a)throw new o(a)}},e.prototype.add=function(t){var i;if(t&&t!==this)if(this.closed)c(t);else{if(t instanceof e){if(t.closed||t._hasParent(this))return;t._addParent(this)}(this._finalizers=null!==(i=this._finalizers)&&void 0!==i?i:[]).push(t)}},e.prototype._hasParent=function(e){var t=this._parentage;return t===e||Array.isArray(t)&&t.includes(e)},e.prototype._addParent=function(e){var t=this._parentage;this._parentage=Array.isArray(t)?(t.push(e),t):t?[t,e]:e},e.prototype._removeParent=function(e){var t=this._parentage;t===e?this._parentage=null:Array.isArray(t)&&(0,s.P)(t,e)},e.prototype.remove=function(t){var i=this._finalizers;i&&(0,s.P)(i,t),t instanceof e&&t._removeParent(this)},e.EMPTY=((t=new e).closed=!0,t),e}(),d=a.EMPTY;function l(e){return e instanceof a||e&&"closed"in e&&(0,n.m)(e.remove)&&(0,n.m)(e.add)&&(0,n.m)(e.unsubscribe)}function c(e){(0,n.m)(e)?e():e.unsubscribe()}},3912:(e,t,i)=>{"use strict";i.d(t,{v:()=>r});var r={onUnhandledError:null,onStoppedNotification:null,Promise:void 0,useDeprecatedSynchronousErrorHandling:!1,useDeprecatedNextContext:!1}},2566:(e,t,i)=>{"use strict";i.d(t,{x:()=>n});var r=i(655);function n(e,t,i,r,n){return new o(e,t,i,r,n)}var o=function(e){function t(t,i,r,n,o,s){var a=e.call(this,t)||this;return a.onFinalize=o,a.shouldUnsubscribe=s,a._next=i?function(e){try{i(e)}catch(e){t.error(e)}}:e.prototype._next,a._error=n?function(e){try{n(e)}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._error,a._complete=r?function(){try{r()}catch(e){t.error(e)}finally{this.unsubscribe()}}:e.prototype._complete,a}return(0,r.ZT)(t,e),t.prototype.unsubscribe=function(){var t;if(!this.shouldUnsubscribe||this.shouldUnsubscribe()){var i=this.closed;e.prototype.unsubscribe.call(this),!i&&(null===(t=this.onFinalize)||void 0===t||t.call(this))}},t}(i(5642).Lv)},8639:(e,t,i)=>{"use strict";i.d(t,{P:()=>p,z:()=>c});var r=i(655),n=function(e){function t(t,i){return e.call(this)||this}return(0,r.ZT)(t,e),t.prototype.schedule=function(e,t){return void 0===t&&(t=0),this},t}(i(5720).w0),o={setInterval:function(e,t){for(var i=[],n=2;n{"use strict";i.d(t,{z:()=>n});var r=i(655),n={setTimeout:function(e,t){for(var i=[],o=2;o{"use strict";i.d(t,{L:()=>r});var r="function"==typeof Symbol&&Symbol.observable||"@@observable"},3699:(e,t,i)=>{"use strict";function r(e,t){if(e){var i=e.indexOf(t);0<=i&&e.splice(i,1)}}i.d(t,{P:()=>r})},1819:(e,t,i)=>{"use strict";function r(e){var t=e((function(e){Error.call(e),e.stack=(new Error).stack}));return t.prototype=Object.create(Error.prototype),t.prototype.constructor=t,t}i.d(t,{d:()=>r})},8846:(e,t,i)=>{"use strict";i.d(t,{O:()=>s,x:()=>o});var r=i(3912),n=null;function o(e){if(r.v.useDeprecatedSynchronousErrorHandling){var t=!n;if(t&&(n={errorThrown:!1,error:null}),e(),t){var i=n,o=i.errorThrown,s=i.error;if(n=null,o)throw s}}else e()}function s(e){r.v.useDeprecatedSynchronousErrorHandling&&n&&(n.errorThrown=!0,n.error=e)}},278:(e,t,i)=>{"use strict";function r(e){return e}i.d(t,{y:()=>r})},8474:(e,t,i)=>{"use strict";function r(e){return"function"==typeof e}i.d(t,{m:()=>r})},6798:(e,t,i)=>{"use strict";i.d(t,{e:()=>n});var r=i(8474);function n(e){return function(t){if(function(e){return(0,r.m)(null==e?void 0:e.lift)}(t))return t.lift((function(t){try{return e(t,this)}catch(e){this.error(e)}}));throw new TypeError("Unable to lift unknown Observable type")}}},5:(e,t,i)=>{"use strict";i.d(t,{h:()=>o});var r=i(3912),n=i(8380);function o(e){n.z.setTimeout((function(){var t=r.v.onUnhandledError;if(!t)throw e;t(e)}))}},212:(e,t,i)=>{"use strict";var r=i(3379),n=i.n(r),o=i(7795),s=i.n(o),a=i(569),d=i.n(a),l=i(3565),c=i.n(l),p=i(9216),g=i.n(p),u=i(4589),h=i.n(u),v=i(8048),y={};y.styleTagTransform=h(),y.setAttributes=c(),y.insert=d().bind(null,"head"),y.domAPI=s(),y.insertStyleElement=g();n()(v.Z,y),v.Z&&v.Z.locals&&v.Z.locals},3379:e=>{"use strict";var t=[];function i(e){for(var i=-1,r=0;r{"use strict";var t={};e.exports=function(e,i){var r=function(e){if(void 0===t[e]){var i=document.querySelector(e);if(window.HTMLIFrameElement&&i instanceof window.HTMLIFrameElement)try{i=i.contentDocument.head}catch(e){i=null}t[e]=i}return t[e]}(e);if(!r)throw new Error("Couldn't find a style target. This probably means that the value for the 'insert' parameter is invalid.");r.appendChild(i)}},9216:e=>{"use strict";e.exports=function(e){var t=document.createElement("style");return e.setAttributes(t,e.attributes),e.insert(t,e.options),t}},3565:(e,t,i)=>{"use strict";e.exports=function(e){var t=i.nc;t&&e.setAttribute("nonce",t)}},7795:e=>{"use strict";e.exports=function(e){var t=e.insertStyleElement(e);return{update:function(i){!function(e,t,i){var r="";i.supports&&(r+="@supports (".concat(i.supports,") {")),i.media&&(r+="@media ".concat(i.media," {"));var n=void 0!==i.layer;n&&(r+="@layer".concat(i.layer.length>0?" ".concat(i.layer):""," {")),r+=i.css,n&&(r+="}"),i.media&&(r+="}"),i.supports&&(r+="}");var o=i.sourceMap;o&&"undefined"!=typeof btoa&&(r+="\n/*# sourceMappingURL=data:application/json;base64,".concat(btoa(unescape(encodeURIComponent(JSON.stringify(o))))," */")),t.styleTagTransform(r,e,t.options)}(t,e,i)},remove:function(){!function(e){if(null===e.parentNode)return!1;e.parentNode.removeChild(e)}(t)}}}},4589:e=>{"use strict";e.exports=function(e,t){if(t.styleSheet)t.styleSheet.cssText=e;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(e))}}},7656:()=>{"use strict";window.OB_VIDEO_VERSION="v1.408.3"},4528:(e,t,i)=>{"use strict";i.d(t,{LB:()=>a,ZP:()=>d,_i:()=>s,dj:()=>o,fP:()=>n});var r=i(4452);const n={providers:{[r.B.Aniview]:{providerPath:"aniview/index"},[r.B.Vidazoo]:{providerPath:"vidazoo/index"},[r.B.OPA]:{providerPath:"opa/index"},[r.B.NATIVETOVIDEO]:{providerPath:"n2v/index"},[r.B.VI]:{providerPath:"vi/index"}}},o={Prod:"https://videoevents.outbrain.com/events/recordOBV",Sim:"https://sim-eventsrecorder.outbrain.com/EventsRecorder/api/events/recordOBV"},s={partner:"Outbrain",version:"1.0.0"},a=10,d=n},2391:(e,t,i)=>{"use strict";i.d(t,{E:()=>n,G:()=>r});const r=3e4,n=5e3},8178:(e,t,i)=>{"use strict";i.d(t,{d:()=>n});var r=i(4452);const n={providers:[{defaultProvider:!0,name:r.B.OPA,pauseOutOfView:!1,playMode:"auto-play",currentPlayMode:0,playWaitingTime:4e3,noReadyAdsTimeoutSec:void 0},{defaultProvider:!0,name:r.B.Vidazoo,pauseOutOfView:!1,playMode:"auto-play",currentPlayMode:0,playWaitingTime:3e3,noReadyAdsTimeoutSec:void 0},{defaultProvider:!0,name:r.B.Aniview,pauseOutOfView:!1,playMode:"auto-play",currentPlayMode:0,playWaitingTime:3e3,noReadyAdsTimeoutSec:void 0},{defaultProvider:!1,name:r.B.VI,pauseOutOfView:!1,playMode:"auto-play",currentPlayMode:0,playWaitingTime:3e3,noReadyAdsTimeoutSec:void 0},{defaultProvider:!1,name:r.B.NATIVETOVIDEO,pauseOutOfView:!1,playMode:"in-view",currentPlayMode:0,playWaitingTime:3e3,noReadyAdsTimeoutSec:void 0}]}},7927:(e,t,i)=>{"use strict";i.d(t,{M:()=>n});var r=i(5148);class n{static shouldHoldVidgetByParallelPlayPolicy(e,t){switch(e.getPlayMode()){case"avoid":return this.getVideoTagsPlayingOnPage().length>0;case"avoid in viewport":return e.isInView()&&n.isVideoPlayingInViewport(e.isInstream());default:return!1}}static shouldDisposeVidget(e,t){const i=Array.from(document.getElementsByTagName("video")),r=t?Array.from(t.getElementsByTagName("video")):[];let n=!1;for(let e=0;ee.currentTime>0&&!e.paused&&!e.ended&&e.readyState>2))}static isVideoPlayingInViewport(e,t=!0){const i=n.getVideoTagsPlayingOnPage();if(0===i.length)return!1;let o=i.filter((e=>r.Z.viewPercentage(e)>0));const s=t?0:1;return e&&(o=o.filter((e=>!e.closest(".ob-outstream")))),o.length>s}}},3917:(e,t,i)=>{"use strict";i.d(t,{B:()=>D});var r=i(6515),n=i(6798),o=i(2566);var s=i(4452),a=i(4528),d=i(2465),l=i(5148);class c{static getVidgetData(e){const t={},i=c.prepareObjectData(e,"vidgetData");let r=d.r.getWidgetSetting(e,"vidgetIndexes",null);if(r=/^([0-9]+(,[0-9]+)*)?$/.test(r)&&!d.r.isHlrWidget(e)?r:"1","0"===r){const i=d.r.getWidgetElement(e);r=`0,${l.Z.getSubtree(i).querySelectorAll("[class*='ob-recIdx-']").length}`,t.coveredWidget=!0}let n=0,o=0;const s=Array.from(new Set(r.split(",")));return s.length>=2&&s.sort(),r?.length&&(n=s.length&&parseInt(s[0])>0?parseInt(s[0])-1:0,o=s.length?parseInt(s[s.length-1])-1:0),t.firstIndex=n,t.lastIndex=o,t.indexes=s.length>1?Array.from({length:o-n+1},((e,t)=>t+n+1+"")):s,t.initialDelay=c.setInitialDelay(i,e),t.sliderPercentBottom=c.getSliderPercentBottom(i.sliderPercentBottom),t.sticky=c.getStickyPlayerSettings(i),t.placementType=c.getPlacementType(i.stickyPlayer,d.r.getWidgetSetting(e,"placementType","footer")),t.ghostFixedSize=void 0!==i.ghostFixedSize&&i.ghostFixedSize,t.title=void 0!==i.title?i.title:void 0,t.xButtonLeft=i.xButtonLeft||!1,t.sliderBelowCard=i.sliderBelowCard||!1,t.adIconUrl=i.adIconUrl||null,t.identifierOpacity=i.identifierOpacity||null,c.isInAppWidget(e)?c.setInAppWidgetConfig(t,i,e):t.inApp=!1,t.env=window.location.search.includes("videoEnv=test")?"TEST":"PROD",t.opaDemoBidder=void 0!==i.opaDemoBidder?i.opaDemoBidder:void 0,t.workerBypass="boolean"==typeof i.workerBypass&&i.workerBypass,t.gdprInt=this.getGdprOrLegit(e,i),t.viPubId=i.viPubId,t.viChannelId=i.viChannelId,t}static prepareObjectData(e,t){let i;try{i=JSON.parse(d.r.getWidgetSetting(e,t,"{}"))}catch(e){i={}}return i}static setInitialDelay(e,t){const i=d.r.getStickyPlayerType(t);return null!==i&&"regular"!==i?2e3:void 0!==e.initialDelay?1e3*parseInt(e.initialDelay):5e3}static getSliderPercentBottom(e){return void 0!==e?`${Math.max(0,(e-17)%100)}%`:"2px"}static getStickyPlayerSettings(e){const t=l.Z.isMobile()?200:400;return{sliderPosition:c.getSliderPosition(e.sliderPosition),sliderEntry:/^side|bottom$/gi.test(e.sliderEntry)?e.sliderEntry:"side",width:c.getStickyWidth(e.sliderWidthPercent,t),get height(){return Math.ceil(this.width/this.ratio)},ratio:16/9,widthDefault:t,sliderPercentBottom:e.sliderPercentBottom}}static getSliderPosition(e){switch(e){case"left":return"bottom-left";case"top-right":return"top-right";case"top-left":return"top-left";case"page-center":return"page-center";case"feed-center":return"feed-center";default:return"bottom-right"}}static getStickyWidth(e,t){return e?Math.min(Math.max(e,50),250)*(t/100):t}static getPlacementType(e,t){return"slider"===e||"sliderAlwaysRight"===e?"slider":/in-article|sidebar|in-feed|header/gi.test(t)?t:"footer"}static isInAppWidget(e){const t="mobile-app-js-widget"===d.r.getWidgetSetting(e,"InstallationType","web-js-widget");let i=!1;const r=c.getWidgetExtraParams(e);return r&&r.indexOf("inApp=true")>-1&&(i=!0),t||i}static setInAppWidgetConfig(e,t,i){e.inApp=!0;const r=c.getWidgetExetrnalParamMap(i);if(e.inAppBridge=r&&"true"===r.inApp,e.appName=t.appName||r.appName||d.r.getWidgetRequest(i,"app_name",null),e.appCategory=t.appCategory||void 0,e.packageName=t.packageName||r.appBundleId||d.r.getWidgetRequest(i,"app_id",null),e.bundleId=t.bundleId||r.appBundleId||d.r.getWidgetRequest(i,"appBundleId",null),e.appStoreUrl=t.appStoreUrl||void 0,e.playStoreUrl=t.playStoreUrl||void 0,e.mobileUserId=c.getApiUserId(i),r.platform)e.platform=r.platform.toLowerCase();else{const t=navigator.userAgent;t.includes("iPhone")||t.includes("iPad")?e.platform="ios":t.includes("Android")&&(e.platform="android")}}static getGdprOrLegit(e,t){const i=d.r.getWidgetRequest(e,"gdpr",0);return 1==i&&"void"!=d.r.getWidgetRequest(e,"cnsnt","void")?1:"undefined"!==t.gdpr&&"legitimate"==t.gdpr?2:i}static getWidgetExetrnalParamMap(e){const t=c.getWidgetExtraParams(e),i={};return t&&t.split("&").reduce(((e,t)=>{const i=t.split("=");return e[i[0]]=i[1]?decodeURIComponent(i[1]):"",e}),i),i}static getWidgetExtraParams(e){if(d.r.widgetProxy&&"function"==typeof d.r.widgetProxy.getExtraParams)try{return d.r.widgetProxy.getExtraParams(e)}catch(e){throw"*** Get Widget extra params from widget proxy failed ***"}return null}static getApiUserId(e){if(d.r.widgetProxy&&"function"==typeof d.r.widgetProxy.getUserId)try{return d.r.widgetProxy.getUserId(e)}catch(e){throw"*** Get Api user id from widget proxy failed ***"}return null}}var p=i(5259);const g={VIDGET_DEBUG:p.i.DEBUG,PIXEL_FIRED:p.i.DEBUG,VIDGET_CONFIG_ERROR:p.i.DEBUG,PROVIDER_PASS:p.i.INFO,VIDGET_AD_LOADED:p.i.DEBUG,RESUME:p.i.DEBUG,MUTE:p.i.DEBUG,UNMUTE:p.i.DEBUG,FIRST_QUARTILE:p.i.DEBUG,SECOND_QUARTILE:p.i.DEBUG,THIRD_QUARTILE:p.i.DEBUG,VIDGET_LOADED:p.i.INFO,VIDGET_VIEWABILITY:p.i.INFO,PLAY:p.i.INFO,PAUSE:p.i.INFO,VIDGET_PENDING:p.i.INFO,COMPLETE:p.i.INFO,CLICK:p.i.INFO,CLOSE:p.i.INFO,ERROR:p.i.INFO,SKIP:p.i.INFO,VIDGET_FEATURE:p.i.INFO,VIDGET_REPORT:p.i.INFO};class u{sessionId;widgetSettings;vidgetData;auditUrl;widgetReqId;version;staticParams;constructor(e,t,i){this.sessionId=e,this.widgetSettings=t,this.vidgetData=i,this.widgetReqId=t.reqID,this.auditUrl=u.getAuditUrl(i),this.version=window.OB_VIDEO_VERSION?window.OB_VIDEO_VERSION:null,this.staticParams=this.prepareStaticParams()}prepareStaticParams(){return{abTestList:this.widgetSettings.layeredTestInfo,abTestVal:this.widgetSettings.abTestVal,adBlocker:this.widgetSettings.adBlockStatus,cardIdx:this.widgetSettings.cardIdx,ccpaPrivacy:this.widgetSettings.ccpaPrivacy,configuredNative:this.widgetSettings.nativeVideoMode,configuredProvidersCount:this.widgetSettings.providers?this.widgetSettings.providers.length:1,configuredReloadCount:this.widgetSettings.configuredReloadCount||1,contentSource:this.widgetSettings.vidgetContentSource&&"none"!==this.widgetSettings.vidgetContentSource?this.widgetSettings.vidgetContentSource:null,docId:this.widgetSettings.docId,featureFlag:this.widgetSettings.featureFlag,feedVersion:this.widgetSettings.feedVersion,gdpr:this.vidgetData.gdprInt,iframe:this.widgetSettings.isIframe,obRecsAbtestAndVars:this.widgetSettings.obRecsAbtestAndVars,odbVidTag:this.widgetSettings.odbVidTag,placementType:this.vidgetData.placementType,playerLocation:u.getAuditPlayerLocation(this.widgetSettings),publisherId:this.widgetSettings.pubID?this.widgetSettings.pubID:"10683",screenResolution:[window.screen.availHeight,"x",window.screen.availWidth].join(""),sessionId:this.sessionId,sourceDocUrl:this.widgetSettings.datasrc||window.location.href,sourceId:this.widgetSettings.sourceId?this.widgetSettings.sourceId:"6852067",sourcePvId:this.widgetSettings.pageViewId,sourceRequestId:this.widgetReqId,sourceSubWidgetId:this.widgetSettings.reportedSubWidgetId,sourceWidgetId:this.widgetSettings.reportedWidgetId?this.widgetSettings.reportedWidgetId:"AR_1",sticky:this.widgetSettings.stickyPlayer?this.widgetSettings.stickyPlayer.toString():null,subPlatform:this.vidgetData.inApp?"app":"web",version:this.version?this.version:null,waterfall:this.widgetSettings.originalWaterfall,widgetIdx:this.widgetSettings.widgetIdx,externalId:this.widgetSettings.externalId,externalIdSecondary:this.widgetSettings.externalId2,publisherImpId:this.widgetSettings.publisherImpId,isAdnginControl:this.widgetSettings.isAdnginControl,onyxFeedMode:this.widgetSettings.onyxFeedMode,supplyChain:this.widgetSettings.logLevel>=p.i.DEBUG?u.createSupplyChainString(this.widgetSettings):void 0}}send(e,t={},i=p.i.INFO){const r=g[e];if(this.widgetSettings.logLevel{s.searchParams.append(e,t)})),fetch(s.href)}static createSupplyChainString(e){const t=e.sellerJsonChain;return`${t.ver},${t.complete}!${t.nodes[0].asi},${t.nodes[0].sid},${t.nodes[0].hp},,,`}static beautifyAuditParams(e){e.playMode=u.getAuditPlayMode(e.playMode),e.provider=e.provider?.toUpperCase(),e.activeProvider=e.activeProvider?.toUpperCase()}static clearNullValues(e){return Object.keys(e).filter((t=>null!=e[t])).reduce(((t,i)=>({...t,[i]:e[i]})),{})}static getAuditUrl(e){switch(e.env){case"SIM":case"TEST":return a.dj.Sim;default:return a.dj.Prod}}static getAuditPlayMode(e){switch(e){case"auto-play":return"AUTO_PLAY";case"in-view":return"VIEW_TO_PLAY";case"in-view-preload":return"VIEW_PRELOAD";default:return"UNKNOWN"}}static getAuditPlayerLocation(e){return e.playerLocation?e.isHlrWidget?"midroll":e.playerLocation:null}static shouldThrottleEvent(e,t){return t!==p.i.DEBUG&&(["VIDGET_LOADED","PROVIDER_PASS"].includes(e)?Math.floor(100*Math.random())+1<=100-a.LB:!!["VIDGET_REPORT"].includes(e)&&Math.floor(100*Math.random())+1<=99)}}const h=u;var v=i(7589);class y{widgetElement;sliderSettings;widgetContainerElement;onSliderChangesCallback;static transitionDuration=300;static viewPortObserverSettings={threshold:.4,debounce:200};static sliderNoScrollTimeout=1e3+y.transitionDuration;static widgetPropsToCopyToPlaceholder=["marginTop","marginBottom","marginLeft","marginRight","paddingBottom","paddingTop","paddingLeft","paddingRight","height","width","top","left","position"];static widgetRestoredProperties=["top","left","position","transition"];placeholderElement;inViewSubscription;outOfViewSubscription;feedBordersWidgetSubscription;_isSliderActive=!1;originalWidgetProps={};sliderTrackingFunction=this.slideToPlace.bind(this);scrollEventListenerController;sliderChanges={isSliderHidden:!0,isSliderActive:!1,width:0,height:0};constructor(e,t,i,r){if(this.widgetElement=e,this.sliderSettings=t,this.widgetContainerElement=i,this.onSliderChangesCallback=r,"page-center"!==t.sliderPosition&&"feed-center"!==t.sliderPosition||(t.sliderEntry="bottom-up"),"sliderAlwaysRight"!==t.sliderMode)if("noScroll"!==t.sliderMode)if("feedBorders"!==t.sliderMode)if(l.Z.viewPercentage(this.widgetElement)>=100*y.viewPortObserverSettings.threshold)this.widgetInViewPort();else{let e=this.widgetElement;"slider"===this.sliderSettings.sliderMode&&(this.switchToSliderMode(!0),e=this.placeholderElement),this.widgetOutOfViewPort(e)}else this.handleFeedBordersOnWidget();else this.handleNoScrollBehavior();else this.switchToSliderMode(!0)}static convertToPx(e){return`${e}px`}static getSliderDimension(e){return"function"==typeof e?e():e}static calcMarginInPx(e,t){return t.endsWith("%")?parseFloat(t.slice(0,-1))/100*e:t.endsWith("px")?parseInt(t.slice(0,-2)):0}static getInnerDimensions(e){const t=getComputedStyle(e),i=e.clientHeight-parseFloat(t.paddingTop)-parseFloat(t.paddingBottom);return{elementWidth:e.clientWidth-parseFloat(t.paddingLeft)-parseFloat(t.paddingRight),elementHeight:i}}get isSliderActive(){return this._isSliderActive}destroySlider(){return new Promise((e=>{this.inViewSubscription?.unsubscribe(),this.outOfViewSubscription?.unsubscribe(),this.feedBordersWidgetSubscription?.unsubscribe(),window.removeEventListener("resize",this.sliderTrackingFunction),this.scrollEventListenerController?.abort(),this._isSliderActive?(this.handleEntry(),setTimeout((()=>{this.restoreOriginalWidgetProps(),this.placeholderElement?.remove(),e()}),y.transitionDuration)):setTimeout((()=>{this.placeholderElement&&(this.restoreOriginalWidgetProps(),this.placeholderElement?.remove()),e()}),y.transitionDuration)}))}widgetOutOfViewPort(e){this.outOfViewSubscription=v.J.elementInViewChange(e,y.viewPortObserverSettings).subscribe((e=>{1===e&&(this.outOfViewSubscription.unsubscribe(),this._isSliderActive&&this.switchToPlayerMode(),this.widgetInViewPort())}))}widgetInViewPort(){this.inViewSubscription=v.J.elementInViewChange(this.widgetElement,y.viewPortObserverSettings).subscribe((e=>{const t="feedBorders"===this.sliderSettings.sliderMode&&0===e&&this.widgetContainerElement&&l.Z.viewPercentage(this.widgetContainerElement)>=10,i=t&&!this.sliderSettings.enabledSliderBelowCardOnFeedBorders||t&&this.sliderSettings.enabledSliderBelowCardOnFeedBorders&&this.widgetElement.getBoundingClientRect().top<0;("feedBorders"!==this.sliderSettings.sliderMode&&0===e||i)&&(this.inViewSubscription.unsubscribe(),this._isSliderActive||this.switchToSliderMode(!1),this.widgetOutOfViewPort(this.placeholderElement))}))}handleFeedBordersOnWidget(){this.widgetContainerElement&&(this.feedBordersWidgetSubscription=v.J.elementInViewChange(this.widgetContainerElement,{threshold:0,debounce:50,rootMargin:y.getSliderDimension(this.sliderSettings.sliderHeight)}).subscribe((e=>{if(1===e){this.inViewSubscription?.unsubscribe(),this.outOfViewSubscription?.unsubscribe();const e=new AbortController;window.addEventListener("scroll",this.endOfWidgetHandle.bind(this),{signal:e.signal}),l.Z.viewPercentage(this.widgetElement)>=10?this.widgetInViewPort():this.sliderSettings.enabledSliderBelowCardOnFeedBorders&&this.widgetOutOfViewPort(this.widgetElement),(!this.sliderSettings.enabledSliderBelowCardOnFeedBorders||this.sliderSettings.enabledSliderBelowCardOnFeedBorders&&!this.isTopOfElementInViewport(this.widgetContainerElement))&&setTimeout((()=>{!this._isSliderActive&&l.Z.viewPercentage(this.widgetElement)<=10&&this.switchToSliderMode(!1),this.placeholderElement&&this.widgetOutOfViewPort(this.placeholderElement)}),0)}0===e&&(this.outOfViewSubscription?.unsubscribe(),this.inViewSubscription?.unsubscribe(),this._isSliderActive&&this.switchToPlayerMode())})))}endOfWidgetHandle(){this._isSliderActive&&(this.isBottomOfElementInViewport(this.widgetContainerElement)?(this.widgetElement.classList.add("no-transition"),this.widgetElement.style.top=y.convertToPx(this.widgetContainerElement.getBoundingClientRect().bottom-y.getSliderDimension(this.sliderSettings.sliderHeight))):this.widgetElement.classList.remove("no-transition"))}isBottomOfElementInViewport(e){const t=e.getBoundingClientRect(),i=window.innerHeight||document.documentElement.clientHeight;return t.bottom<=i}isTopOfElementInViewport(e){const t=e.getBoundingClientRect();return t.top>=0&&t.top{i.abort()}),e)}restoreOriginalWidgetProps(){const e=this.placeholderElement.getBoundingClientRect();this.widgetElement.style.top=y.convertToPx(e.y),this.widgetElement.style.left=y.convertToPx(e.x),this.sliderSettings.sliderClassnames&&this.sliderSettings.sliderClassnames.length>0&&this.sliderSettings.sliderClassnames.forEach((e=>{this.widgetElement.classList.remove(e)}));const{elementWidth:t,elementHeight:i}=y.getInnerDimensions(this.placeholderElement);this.widgetElement.style.width=t+"px",this.widgetElement.style.height=i+"px",y.widgetRestoredProperties.forEach((e=>{this.widgetElement.style[e]=this.originalWidgetProps[e]}))}switchToPlayerMode(){this.sliderSettings.sliderClassnames&&this.sliderSettings.sliderClassnames.length>0&&this.sliderSettings.sliderClassnames.forEach((e=>{this.widgetElement.classList.remove(e)})),this.trackToPosition(y.transitionDuration,(()=>{const e=this.placeholderElement.getBoundingClientRect();this.widgetElement.style.top=y.convertToPx(e.y),this.widgetElement.style.left=y.convertToPx(e.x)})),this._isSliderActive=!1,this.trackResize(!1);const{elementWidth:e,elementHeight:t}=y.getInnerDimensions(this.placeholderElement);this.widgetElement.style.width=e+"px",this.widgetElement.style.height=t+"px",this.notifySliderChange({isSliderActive:this.isSliderActive,height:t,width:e}),setTimeout((()=>{this.placeholderElement.remove(),y.widgetRestoredProperties.forEach((e=>{this.widgetElement.style[e]=this.originalWidgetProps[e]}))}),y.transitionDuration)}switchToSliderMode(e){this.createPlaceholderElement(),this.widgetElement.insertAdjacentElement("afterend",this.placeholderElement),this.sliderSettings.sliderClassnames&&this.sliderSettings.sliderClassnames.length>0&&this.sliderSettings.sliderClassnames.forEach((e=>{this.widgetElement.classList.add(e)})),this.showSlider(e),this.trackResize(!0)}showSlider(e){if(!e){const e=this.placeholderElement.getBoundingClientRect();this.widgetElement.style.top=y.convertToPx(e.y),this.widgetElement.style.left=y.convertToPx(e.x)}this.widgetElement.style.transition="none",this.widgetElement.style.position="fixed",this.startSliderTransition(e),this.notifySliderChange({isSliderActive:this.isSliderActive,isSliderHidden:!1,height:y.getSliderDimension(this.sliderSettings.sliderHeight),width:y.getSliderDimension(this.sliderSettings.sliderWidth)})}createPlaceholderElement(){this.placeholderElement=document.createElement("div"),"sliderAlwaysRight"!==this.sliderSettings.sliderMode&&"noScroll"!==this.sliderSettings.sliderMode&&y.widgetPropsToCopyToPlaceholder.forEach((e=>{this.placeholderElement.style[e]=this.widgetElement.style[e]})),y.widgetRestoredProperties.forEach((e=>{this.originalWidgetProps[e]=this.widgetElement.style[e]})),this.sliderSettings.placeholderClassname&&this.placeholderElement.classList.add(this.sliderSettings.placeholderClassname)}startSliderTransition(e){e&&this.handleEntry(),this.slideToPlace()}handleEntry(){const{horizontalMargin:e,verticalMargin:t}=this.calcHorizontalVerticalMargin();"sideways"===this.sliderSettings.sliderEntry?this.setSidewaysEntry(t):this.setVerticalEntry(e)}setSidewaysEntry(e){switch(this.sliderSettings.sliderPosition){case"top-left":this.widgetElement.style.top=y.convertToPx(e),this.widgetElement.style.left=y.convertToPx(-y.getSliderDimension(this.sliderSettings.sliderWidth));break;case"bottom-left":this.widgetElement.style.top=y.convertToPx(window.innerHeight-y.getSliderDimension(this.sliderSettings.sliderHeight)-e),this.widgetElement.style.left=y.convertToPx(-y.getSliderDimension(this.sliderSettings.sliderWidth));break;case"top-right":this.widgetElement.style.top=y.convertToPx(e),this.widgetElement.style.left=y.convertToPx(window.document.documentElement.clientWidth);break;case"page-center":case"feed-center":break;default:this.widgetElement.style.top=y.convertToPx(window.innerHeight-y.getSliderDimension(this.sliderSettings.sliderHeight)-e),this.widgetElement.style.left=y.convertToPx(window.document.documentElement.clientWidth)}}setVerticalEntry(e){switch("bottom-up"===this.sliderSettings.sliderEntry?this.widgetElement.style.top=y.convertToPx(window.innerHeight):"top-down"===this.sliderSettings.sliderEntry&&(this.widgetElement.style.top=y.convertToPx(-y.getSliderDimension(this.sliderSettings.sliderHeight))),this.sliderSettings.sliderPosition){case"top-left":case"bottom-left":this.widgetElement.style.left=y.convertToPx(e);break;case"page-center":this.widgetElement.style.left=y.convertToPx(window.document.documentElement.clientWidth/2-y.getSliderDimension(this.sliderSettings.sliderWidth)/2-e);break;case"feed-center":{const t=this.widgetContainerElement?.getBoundingClientRect();this.widgetElement.style.left=y.convertToPx(t.x+t.width/2-y.getSliderDimension(this.sliderSettings.sliderWidth)/2-e);break}default:this.widgetElement.style.left=y.convertToPx(window.document.documentElement.clientWidth-y.getSliderDimension(this.sliderSettings.sliderWidth)-e)}}slideToPlace(){const{horizontalMargin:e,verticalMargin:t}=this.calcHorizontalVerticalMargin();switch(this.widgetElement.style.transitionProperty="top, left, width, height",this.widgetElement.style.transitionDuration=`${y.transitionDuration}ms`,this.widgetElement.style.width=y.convertToPx(y.getSliderDimension(this.sliderSettings.sliderWidth)),this.widgetElement.style.height=y.convertToPx(y.getSliderDimension(this.sliderSettings.sliderHeight)),this._isSliderActive=!0,this.sliderSettings.sliderPosition){case"top-left":this.widgetElement.style.top=y.convertToPx(t),this.widgetElement.style.left=y.convertToPx(e);break;case"top-right":this.widgetElement.style.top=y.convertToPx(t),this.widgetElement.style.left=y.convertToPx(window.document.documentElement.clientWidth-y.getSliderDimension(this.sliderSettings.sliderWidth)-e);break;case"bottom-left":this.widgetElement.style.top=y.convertToPx(window.innerHeight-y.getSliderDimension(this.sliderSettings.sliderHeight)-t),this.widgetElement.style.left=y.convertToPx(e);break;case"page-center":this.widgetElement.style.top=y.convertToPx(window.innerHeight-y.getSliderDimension(this.sliderSettings.sliderHeight)-t),this.widgetElement.style.left=y.convertToPx(window.document.documentElement.clientWidth/2-y.getSliderDimension(this.sliderSettings.sliderWidth)/2-e);break;case"feed-center":{const i=this.widgetContainerElement?.getBoundingClientRect();this.widgetElement.style.top=y.convertToPx(window.innerHeight-y.getSliderDimension(this.sliderSettings.sliderHeight)-t),this.widgetElement.style.left=y.convertToPx(i.x+i.width/2-y.getSliderDimension(this.sliderSettings.sliderWidth)/2-e);break}default:this.widgetElement.style.top=y.convertToPx(window.innerHeight-y.getSliderDimension(this.sliderSettings.sliderHeight)-t),this.widgetElement.style.left=y.convertToPx(window.document.documentElement.clientWidth-y.getSliderDimension(this.sliderSettings.sliderWidth)-e)}}trackResize(e){e?window.addEventListener("resize",this.sliderTrackingFunction):window.removeEventListener("resize",this.sliderTrackingFunction)}notifySliderChange(e){if(this.onSliderChangesCallback){const t={...this.sliderChanges,...e};this.onSliderChangesCallback({prev:this.sliderChanges,next:t}),this.sliderChanges=t}}handleNoScrollBehavior(){this.switchToSliderMode(!0),this.scrollEventListenerController=new AbortController;let e,t=!0;window.addEventListener("scroll",(()=>{t&&(t=!1,this.hideSlider()),window.clearTimeout(e),e=setTimeout((()=>{t=!0,this.showSlider(!0)}),y.sliderNoScrollTimeout)}),{signal:this.scrollEventListenerController.signal})}hideSlider(){this.handleEntry(),this.notifySliderChange({isSliderHidden:!0})}calcHorizontalVerticalMargin(){return{horizontalMargin:this.sliderSettings.horizontalMargin?y.calcMarginInPx(window.document.documentElement.clientWidth,this.sliderSettings.horizontalMargin):0,verticalMargin:this.sliderSettings.verticalMargin?y.calcMarginInPx(window.innerHeight,this.sliderSettings.verticalMargin):0}}}class w{widgetElement;skipWrapper;constructor(e){this.widgetElement=e,this.createSkipButton()}reset(e){window.setTimeout((()=>{this.skipWrapper.style.opacity="1",this.skipWrapper.addEventListener("click",(()=>{w.notifySkipClick(e),this.resetStyle()}))}),2e3)}createSkipButton(){this.skipWrapper=document.createElement("div"),this.skipWrapper.classList.add("obv-skip-wrapper"),this.skipWrapper.style.opacity="0.5";const e=document.createElement("span");this.minimizeSkipButtonSize(e),e.innerText="Skip Ad";const t=document.createElement("div");t.classList.add("obv-skip-icon"),t.innerHTML="▶",this.skipWrapper.appendChild(e),this.skipWrapper.appendChild(t),this.widgetElement.appendChild(this.skipWrapper)}minimizeSkipButtonSize(e){this.widgetElement.getBoundingClientRect().height<350&&(this.skipWrapper.classList.add("minimize-skip-button"),e.classList.add("minimize-skip-button-text"))}static notifySkipClick(e){e&&e()}resetStyle(){this.skipWrapper.style.opacity="0.5"}}class m{widgetSettings;vidgetData;sessionId;playerWrapperElement;playerDimensions;playerIdsPrefix;_innerPlayerWrapper;footerWrapper;titleElement;videoWrapperViewportChanges$;videoWrapperViewportSubscription;containerId;widgetElement;widgetId;slider=null;skipAd=null;resizeObserver=null;get playerWrapper(){return this.playerWrapperElement}get innerPlayerWrapper(){return this._innerPlayerWrapper}constructor(e,t,i,r){this.widgetSettings=e,this.vidgetData=t,this.sessionId=r,this.playerIdsPrefix=e.containerID+"_"+e.widgetID+"_",this.containerId=this.widgetSettings.containerID,this.widgetElement=d.r.getWidgetElement(i),this.widgetId=this.widgetSettings.widgetID}getAuditParams(){return{orientation:window.innerHeight>window.innerWidth?"PORTRAIT":"LANDSCAPE",viewability:this.getCurrentViewability()}}getCurrentViewability(){return l.Z.viewPercentage(this._innerPlayerWrapper)}async create(){const e=l.Z.viewPercentage(this._innerPlayerWrapper)>50?1:0;this.videoWrapperViewportChanges$=new r.X(e),this.playerWrapperElement=this.createPlayerWrapperElement(),this.createInnerPlayerWrapper(),this.playerWrapperElement&&(this.videoWrapperViewportSubscription=v.J.elementInViewChange(this._innerPlayerWrapper,{debounce:100,threshold:.5}).subscribe((e=>{1===e?this.videoWrapperViewportChanges$.next(1):this.videoWrapperViewportChanges$.next(0)})),await this.createSkip())}async createSkip(){this.widgetSettings.isHlrWidget&&(this.skipAd=new w(this.innerPlayerWrapper))}getPlayerWrapperId(){return this.playerIdsPrefix}createInnerPlayerWrapper(){this.playerWrapperElement&&(this._innerPlayerWrapper=document.createElement("div"),this._innerPlayerWrapper.classList.add("ob-inner-player-wrapper"),this.playerWrapperElement.appendChild(this._innerPlayerWrapper))}createPlayerWrapperElement(){return({aboveWidget:()=>this.createAboveWidgetPlayerWrapper(),belowWidget:()=>this.createBelowWidgetPlayerWrapper(),coveringWidget:()=>this.createCoveringWidgetPlayerWrapper(),inWidget:()=>this.createInWidgetPlayerWrapper()}[this.widgetSettings.playerLocation]||this.createInWidgetPlayerWrapper)()}isVRLLayout(e){return e.classList.contains("ob-video-reel-layout")}createBelowWidgetPlayerWrapper(){try{const e=this.widgetSettings.playerMaxWidth.horizontal,t=l.Z.getSubtree(this.widgetElement).querySelectorAll(".ob-widget-items-container")||l.Z.getSubtree(this.widgetElement).querySelectorAll(".ob-widget");if(t?.length){const i=t[t.length-1];this.playerDimensions=m.getPlayerDimensionsForOuterPlayer(i,this.widgetElement,e,"horizontal");const r=this.createPlayerWrapperDiv(this.playerDimensions.width,this.playerDimensions.height,["below-widget"]),n=this.createContainerElement(this.containerId,this.widgetElement,r,!!this.widgetElement.shadowRoot);return null!=n&&(i.parentElement&&!this.isVRLLayout(i)?i.parentElement.insertBefore(n,i.nextSibling):i.appendChild(n)),r}}catch(e){throw new Error(`createBelowWidgetPlayerWrapper(): ${e.toString()}`)}}createAboveWidgetPlayerWrapper(){try{const e=l.Z.getSubtree(this.widgetElement),t=e.querySelector(".ob-widget-items-container")||e.querySelector(".ob-widget")||e.querySelector(".ob_video_container"),i=this.widgetSettings.playerMaxWidth.horizontal,r=[];if(!t)throw new Error("could not find firstWidgetItemsContainer");const n=this.vidgetData.ghostFixedSize?this.widgetElement:t;this.vidgetData.ghostFixedSize&&r.push("ghost-fixed-size"),this.playerDimensions=m.getPlayerDimensionsForOuterPlayer(n,this.widgetElement,i,"horizontal",!!this.vidgetData.ghostFixedSize);const o=this.createPlayerWrapperDiv(this.playerDimensions.width,this.playerDimensions.height,["above-widget",...r]),s=this.createContainerElement(this.containerId,this.widgetElement,o,!!this.widgetElement.shadowRoot);if(s){const e=t.parentElement;e&&!this.isVRLLayout(t)?e.insertBefore(s,t):t.appendChild(s)}return o}catch(e){throw new Error(`createAboveWidgetPlayerWrapper(): ${e?.toString()}`)}}createCoveringWidgetPlayerWrapper(){try{const e=this.widgetElement,t=this.createPlayerWrapperDiv(e.clientWidth,e.clientHeight,["covering-widget"]);t.style.top="unset";const i=this.createContainerElement(this.containerId,e,t,!!e.shadowRoot);return i&&e.insertBefore(i,e.firstChild),t}catch(e){const t=`createCoveringWidgetPlayerWrapper(): ${e?.toString()}`;throw new Error(t)}}createInWidgetPlayerWrapper(){const e=this.vidgetData.firstIndex,t=this.vidgetData.lastIndex,i=l.Z.getSubtree(this.widgetElement).querySelector(".ob-recIdx-"+e),r=l.Z.getSubtree(this.widgetElement).querySelector(".ob-recIdx-"+t);let n;if(this.vidgetData.coveredWidget){const e=l.Z.getSubtree(this.widgetElement).querySelector(".ob-widget > .ob-first")||l.Z.getSubtree(this.widgetElement).querySelector(".ob-widget > .ob-widget-items-container"),t=this.getCoveredPlayerHeight(e,e.clientWidth);n=this.createPlayerWrapperDiv(e.clientWidth,t,["in-widget"]),n.style.top="unset";const i=this.createContainerElement(this.containerId,this.widgetElement,n,!!this.widgetElement.shadowRoot);null!=i&&e.insertBefore(i,e.firstChild)}else if(this.widgetSettings.isHlrWidget){const e=l.Z.getSubtree(this.widgetElement).querySelector(".ob-widget > .ob-reel-track");n=this.createPlayerWrapperDiv(this.widgetElement.offsetWidth,i.clientHeight,["in-widget","hlr-widget"]),n.style.zIndex="10";const t=this.createContainerElement(this.containerId,this.widgetElement,n,!!this.widgetElement.shadowRoot);this.widgetElement.shadowRoot?n?.parentElement?.style.setProperty("position","unset"):t?.style.setProperty("position","unset"),null!=t&&e.appendChild(t)}else{this.playerDimensions=m.getPlayerDimensions(i,r),n=this.createPlayerWrapperDiv(this.playerDimensions.width,this.playerDimensions.height,["in-widget"]);const e=this.createContainerElement(this.containerId,this.widgetElement,n,!!this.widgetElement.shadowRoot,"unset");null!=e&&i.appendChild(e)}return n}getCoveredPlayerHeight(e,t=0){let i=Math.floor(9*t/16);if(e.clientHeighti){i=r;break}}return i}static getPlayerDimensionsForOuterPlayer(e,t,i,r,n=!1){if(t.getAttribute("data-feed-idx")){const e=l.Z.getSubtree(t).querySelector(".ob-widget-section");return m.getPlayerDimensions(e,null,i,r,n)}return m.getPlayerDimensions(e,null,i,r,n)}createPlayerWrapperDiv(e,t,i=[]){const r=`${this.containerId}_${this.widgetId}_playerWrapper`,n=document.createElement("div");return n.id=r,n.classList.add("ob-player-wrapper",...i),n.style.setProperty("width",`${e}px`,"important"),n.style.setProperty("height",`${t}px`,"important"),n}createContainerElement(e,t,i,r=!1,n){if(r){const r="wrapperContainerForShadowDom_"+e,o=t.querySelector("#"+r);o&&o.remove();const s=window.document.createElement("div");s.id=r,s.slot="obvSlot",s.appendChild(i),t.appendChild(s),n&&s?.style.setProperty("position",n);const a=window.document.createElement("slot");return a.name="obvSlot",a}{const e=window.document.createElement("div");return e.classList.add("obv-video-wrapper"),e.appendChild(i),n&&e?.style.setProperty("position",n),e}}static getPlayerDimensions(e,t=null,i=null,r=null,n=!1){if(n)return{width:e.clientWidth,height:e.clientHeight};const o=e.getBoundingClientRect();if(t){const i=t.getBoundingClientRect(),r={top:Math.min(o.top,i.top),bottom:Math.max(o.bottom,i.bottom),left:Math.min(o.left,i.left),right:Math.max(o.right,i.right)},n=l.Z.getSiblingsBetweenRecs(e,t);for(const e of n){const t=e.getBoundingClientRect().bottom;t>r.bottom&&(r.bottom=t)}const s=r.right-r.left,a=r.bottom-r.top;return{width:s>0?s:0,height:a>0?a:0}}const s=i&&i{t.classList.remove("obv-playing"),t.getAttribute("id")?.endsWith(e.getPlayerSuffix())&&t.classList.add("obv-playing")}))}hideAllPlayers(){this.destroySlider().then((()=>{this.playerWrapperElement.classList.add("obv-hide-wrapper"),[...this._innerPlayerWrapper.children].forEach((e=>{e.classList.remove("obv-playing")})),this.removeFooterContent(),this.removeTitle(),this.restorePlayerWrapperHeight(),this.unRegisterToWidgetResize()}))}onVideoStartPlaying(e){if(this.isHeightChangeAllowed()){const{width:t,height:i}=e.getVideoDimensions();this.adjustVideoHeight(t,i),this.setFooterElement(e.getFooterElement()),e.getProviderName()===s.B.OPA&&this.resizeContainer(),this.registerToWidgetResize(e)}else this.widgetSettings.isHlrWidget&&this.widgetSettings.isReelV2&&(this.setFooterElement(e.getFooterElement()),this.registerToWidgetResize(e));this.handleSlider(e),this.handleSkip(e),this.handleTitle(),this.showVisualIdentifier()}registerToWidgetResize(e){this.resizeObserver=new ResizeObserver((t=>{if(this.widgetSettings.isReelV2)return this.playerWrapperElement.style.setProperty("width",t[0].contentRect.width+"px","important"),void this.playerWrapperElement.style.setProperty("height",t[0].contentRect.height+"px","important");const i=this.playerWrapperElement.getBoundingClientRect(),r=t[0].contentRect.width;if(r!==i.width){if(this.widgetSettings.playerMaxWidth.horizontal&&r>this.widgetSettings.playerMaxWidth.horizontal)return;const n=i.width/i.height,o=t[0].contentRect.width,s=o/n;if(this.widgetSettings.playerMaxWidth.vertical&&s>this.widgetSettings.playerMaxWidth.vertical)return;this.playerWrapperElement.style.setProperty("width",o+"px","important"),this.playerWrapperElement.style.setProperty("height",s+"px","important"),e.resize(o,s)}})),this.resizeObserver.observe(this.widgetElement)}unRegisterToWidgetResize(){this.resizeObserver?.disconnect()}handleTitle(){this.removeTitle(),null!=this.vidgetData.title&&""!==this.vidgetData.title&&(this.titleElement=document.createElement("div"),this.titleElement.classList.add("obv-title-wrapper"),this.titleElement.innerText=this.vidgetData.title,this.playerWrapperElement.append(this.titleElement),this.playerWrapperElement.style.height=this.playerWrapperElement.getBoundingClientRect().height+(this.titleElement?.getBoundingClientRect().height||0)+"px")}showVisualIdentifier(){const e=this.sessionId.slice(-5),t=document.createElement("div");t.classList.add("obv-visual-id"),t.innerText=e.toUpperCase(),this.vidgetData.identifierOpacity&&(t.style.opacity=this.vidgetData.identifierOpacity),this._innerPlayerWrapper.append(t)}removeTitle(){this.titleElement?.remove()}handleSlider(e){if(null==this.widgetSettings.stickyPlayer)return;const{width:t,height:i}=this.playerWrapperElement.getBoundingClientRect(),r=this.vidgetData.sticky.width*i/t,n={sliderClassnames:["ob-sticky","ob-sticky-z-index"],placeholderClassname:"outbrain-place-holder-wrapper",sliderEntry:"side"===this.vidgetData.sticky?.sliderEntry?"sideways":"bottom-up",sliderHeight:r,sliderWidth:this.vidgetData.sticky?.width,sliderPosition:this.vidgetData.sticky?.sliderPosition,verticalMargin:this.vidgetData.sticky?.sliderPercentBottom?this.vidgetData.sticky.sliderPercentBottom+"%":"30px",horizontalMargin:"2px",sliderMode:this.widgetSettings.stickyPlayer,enabledSliderBelowCardOnFeedBorders:this.vidgetData.sliderBelowCard},o=this.widgetElement.closest(`.${this.widgetSettings.reportedWidgetId}`)||this.widgetElement;this.slider=new y(this.playerWrapperElement,n,o,(t=>{t.prev.isSliderActive!==t.next.isSliderActive&&t.next.isSliderActive?(this.unRegisterToWidgetResize(),e.resize(t.next.width,t.next.height)):t.prev.isSliderActive===t.next.isSliderActive||t.next.isSliderActive||(this.registerToWidgetResize(e),e.resize(this.playerDimensions.width,this.playerDimensions.height))}))}destroySlider(){return new Promise((e=>{this.slider?this.slider?.destroySlider().then((()=>{this.slider=null,e()})):e()}))}handleSkip(e){if(!this.widgetSettings.isHlrWidget)return;this.skipAd?.reset((()=>{e.skipAd()}))}setFooterElement(e){this.footerWrapper&&this.removeFooterContent(),e&&(this.footerWrapper=document.createElement("div"),this.footerWrapper.classList.add("obv-footer-wrapper"),this.footerWrapper.style.fontFamily=this.widgetSettings.fontFamily,this.footerWrapper.appendChild(e),this.playerWrapperElement.append(this.footerWrapper))}removeFooterContent(){this.footerWrapper?.remove()}restorePlayerWrapperHeight(){this.playerDimensions?.height&&(this.playerWrapperElement.style.height=this.playerDimensions.height+"px")}adjustVideoHeight(e,t){if(!e||!t)return;const i=e/t,r=this.playerWrapperElement.getBoundingClientRect().width/i,n=this.widgetSettings.playerMaxWidth.vertical||Number.MAX_VALUE;this.playerWrapperElement.style.height=Math.min(r,n)+"px"}isHeightChangeAllowed(){return!["inWidget","coveringWidget"].includes(this.widgetSettings.playerLocation)&&!this.vidgetData.ghostFixedSize}resizeContainer(){const e=this.playerWrapperElement.getBoundingClientRect().height;this.playerWrapperElement.style.height=e+(this.footerWrapper?.getBoundingClientRect().height||0)+"px"}destroy(){const e=this.destroySlider();return e.then((()=>{this.videoWrapperViewportSubscription?.unsubscribe();const e=this.playerWrapperElement.parentElement;e?.classList.contains("obv-video-wrapper")?e.remove():this.playerWrapperElement.remove()})),e}}i(212);var f=i(3443),b=i(6716),P=i(1480),S=i(8639),E=i(8474);function x(e,t,i){void 0===e&&(e=0),void 0===i&&(i=S.P);var r,n=-1;return null!=t&&((r=t)&&(0,E.m)(r.schedule)?i=t:n=t),new P.y((function(t){var r=function(e){return e instanceof Date&&!isNaN(e)}(e)?+e-i.now():e;r<0&&(r=0);var o=0;return i.schedule((function(){t.closed||(t.next(o++),0<=n?this.schedule(void 0,n):t.complete())}),r)}))}class I{time;timeElapsed=0;timer=null;subscription=null;update=new b.x;constructor(e){this.time=e}start(){const e=1e3;return this.timer=x(e,e),this.subscription=this.timer.subscribe((()=>{this.timeElapsed=this.timeElapsed+e,this.timeElapsed>=this.time&&(this.update.next(this.timeElapsed),this.subscription?.unsubscribe())})),this.update}pause(){this.stop()}resume(){this.timer||this.start()}stop(){this.timer&&(this.subscription?.unsubscribe(),this.timer=null)}}var W=i(2391),T=i(8178),C=i(7927);class V{widgetSettings;pendingPlayProviders=[];previousProvider=null;constructor(e){this.widgetSettings=e}getDefaultPriority(e){return[...new Set([...e.map((e=>e.provider.getProviderName()))])].reduce(((e,t)=>({...e,[t]:2})),{})}getHighestPriority(e){return Math.max(...Object.values(e))}setPriority(e,t){Object.keys(e).forEach((i=>{const r=this.widgetSettings.providers.find((e=>i===e.name));i===s.B.NATIVETOVIDEO&&(e[i]=1),"in-view-preload"!==r?.playMode&&"in-view"!==r?.playMode&&1!==r?.currentPlayMode||(e[i]=t?3:0),this.previousProvider?.getProviderName()===s.B.NATIVETOVIDEO&&i===s.B.NATIVETOVIDEO&&(e[i]=0)}))}getNextProviderName(e){const t=this.getDefaultPriority(this.pendingPlayProviders);this.setPriority(t,e);const i=this.getHighestPriority(t);return Object.keys(t).find((e=>t[e]===i&&0!==t[e]))}extractNextProvider(e){const t=this.getNextProviderName(e),i=this.pendingPlayProviders.findIndex((e=>{if(e.provider.getProviderName()===t)return e.provider})),r=-1!==i?this.pendingPlayProviders.splice(i,1)[0]:null;return r?.provider||null}setPreviousProvider(e){this.previousProvider=e}pushToQueue(e,t){this.pendingPlayProviders.push({provider:e,playingPriority:2,bidCpm:t.bidCpm||0,duration:t.duration||0}),this.pendingPlayProviders.sort(((e,t)=>t.bidCpm-e.bidCpm))}isPendingPlayProviders(){return!!this.pendingPlayProviders.length}getQueueSize(){return this.pendingPlayProviders?.length}removeAdsForProvider(e){this.pendingPlayProviders=this.pendingPlayProviders?.filter((t=>t.provider.getProviderName()!==e))}}class D{sessionId;callbacks;audit;widgetSettings;vidgetData;providers=[];playerWrapperManager;viewabilityMeasurementSubscription;numOfPlays=0;activeProvider=null;providersState={};statusChange$;isVideoPlayed=!1;engagePlayTimer=null;engagePlayTimerSub$;currentWidget;vidgetTimeout=null;adQueue;wasPlacementViewedForFirstTime=!1;placementViewabilityMeasurementSubscription;placementViewabilityReached=!1;viewabilityMeasurementSettings;visibilityChange$;providersPendingInView=!1;endTimeOfLastVideo=0;get id(){return this.sessionId}constructor(e,t,i={}){this.sessionId=e,this.callbacks=i;try{this.currentWidget=t,this.vidgetData=c.getVidgetData(t),this.widgetSettings=this.createWidgetSettings(t),this.adQueue=new V(this.widgetSettings),this.viewabilityMeasurementSettings={threshold:this.widgetSettings.viewabilityPercentageThreshold/100,timeInMilliseconds:1e3*this.widgetSettings.viewabiltyEventTime}}catch(t){throw this.audit=new h(e,{},{}),this.sendEvent({event:"ERROR",description:`providersManager failed to init: ${t.toString()}`}),this.destroy(),t}this.audit=new h(e,this.widgetSettings,this.vidgetData),this.statusChange$=new r.X(0),this.visibilityChange$=new r.X(1);const n=Math.round(performance?.now());this.sendEvent({event:"VIDGET_LOADED",description:`time from page load is ${n}`}),(0,f.S)(`[${this.widgetSettings.reportedWidgetId}-${this.widgetSettings.reportedSubWidgetId}] - obVideo loaded after ${n} ms`)}createWidgetSettings(e){return d.r.getWidgetSettings(e)}createPlayerWrapper(){this.playerWrapperManager=new m(this.widgetSettings,this.vidgetData,this.currentWidget,this.sessionId);try{this.playerWrapperManager.create(),this.playerWrapperManager.hideAllPlayers()}catch(e){this.sendEvent({event:"ERROR",description:"createPlayerWrapper failed to init: "+e.toString()})}}registerToVideoWrapperViewportChanges(){this.playerWrapperManager.videoWrapperViewportChanges$.subscribe((e=>{1!==e||this.wasPlacementViewedForFirstTime||(this.wasPlacementViewedForFirstTime=!0,this.sendEvent({event:"VIDGET_PLACEMENT_VIEWABILITY"}),this.widgetSettings.shouldLogViewability&&l.Z.logViewability(this.widgetSettings.reqID,this.widgetSettings.lsd)),this.placementViewabilityReached||(1===e?this.startPlacementViewabilityMeasurement():this.stopPlacementViewabilityMeasurement()),3===this.statusChange$.value&&1===e&&this.adQueue.isPendingPlayProviders()&&this.statusChange$.next(1),this.providers.forEach((t=>{t.onViewabilityChange(e)}))}))}async createProvider(e){const t=Object.keys(s.B).find((t=>t===e.name));if(null==t)return null;const r=a.fP.providers[t].providerPath;let n;try{n=await i(5434)(`./${r}`)}catch(t){return this.sendEvent({event:"ERROR",description:`could not load provider ${e.name} chunk, ${t}`}),null}const o=this.playerWrapperManager.getPlayerWrapperId(),d=this.playerWrapperManager.getPlayerWrapperDimensions(),l=new n.Provider(this.widgetSettings,this.vidgetData,e,o,d,this.currentWidget,this.isInstream(),this.sessionId);return this.providers.push(l),l}onAdLoaded(e,t){(0,f.S)(`[${this.widgetSettings.reportedWidgetId}-${this.widgetSettings.reportedSubWidgetId}] - got ad loaded from ${e.getProviderName()}`),this.providersState[e.getProviderName()].loadedAds++,this.adQueue.pushToQueue(e,t),2!==this.statusChange$.value&&1!==this.statusChange$.value&&this.statusChange$.next(1)}sendEvent(e,t){"ERROR"===e.event&&(0,f.S)(`[${this.widgetSettings?.reportedWidgetId}-${this.widgetSettings?.reportedSubWidgetId}] - ERROR for provider ${t?.getProviderName()}: ${e.description}`);try{const i="VIDGET_REPORT"===e.event?{}:t?.getProviderAuditParams(),r={currentReload:this.numOfPlays,activeProvider:this.activeProvider?.getProviderName(),provider:t?.getProviderName(),description:e.description,isViewablePlay:t?.isViewabilityReached,playingType:this.isInstream()?"INSTREAM":"OUTSTREAM",...e.extraParams,modifiedWaterfall:this.providers.map((e=>e.getProviderName())).toString(),...i,...this.playerWrapperManager?.getAuditParams(),providersStatus:JSON.stringify(this.providersState),...this.getSpecialAuditParams(e)};"PLAY"===e.event&&(0,f.S)(`[${this.widgetSettings?.reportedWidgetId}-${this.widgetSettings?.reportedSubWidgetId}] - PLAY event was fired for provider ${t?.getProviderName()}, payload: `,r),this.audit.send(e.event,r)}catch(i){this.audit.send("ERROR",{description:`could not send event ${e.event} from provider ${t?.getProviderName()}, error: ${i}`})}}onPlayerStatusChange(e,t){const i=e.getProviderName()===this.activeProvider?.getProviderName();switch(t.event){case"PROVIDER_PASS":this.handleProviderPass(e);break;case"VIDGET_AD_LOADED":this.onAdLoaded(e,t.extraParams)}i&&this.handleActiveProviderEvent(t,e),this.sendEvent(t,e)}handleProviderPass(e){const t=e.getProviderName();(0,f.S)(`[${this.widgetSettings.reportedWidgetId}-${this.widgetSettings.reportedSubWidgetId}] - provider ${t} reported no more ads found`),t===this.activeProvider?.getProviderName()&&this.skipCurrentProvider(e),this.adQueue.removeAdsForProvider(e.getProviderName()),this.destroyProvider(e),this.providersPendingInView||0!==this.providers.length||((0,f.S)(`[${this.widgetSettings.reportedWidgetId}-${this.widgetSettings.reportedSubWidgetId}] - all providers reported no ad found, running post video run flow`),this.execPostVideoRunFlow())}handleActiveProviderEvent(e,t){switch(e.event){case"CLOSE":return this.sendEvent(e,t),void this.destroy();case"SKIP":case"ERROR":case"COMPLETE":this.skipCurrentProvider(t);break;case"PAUSE":this.onPlayerPause();break;case"RESUME":this.onPlayerResume(t);break;case"PLAY":this.onProviderPlay(t)}}onProviderPlay(e){this.startViewabilityMeasurement(e),this.measureEngagedPlay(e),this.playerWrapperManager.onVideoStartPlaying(e),this.providersState[e.getProviderName()].playedAds++,this.fireExternalPixels()}skipCurrentProvider(e){this.endTimeOfLastVideo=Date.now(),this.adQueue.setPreviousProvider(this.activeProvider),this.activeProvider=null,this.stopViewabilityMeasurement(),this.stopEngagePlayMeasurement(),this.playerWrapperManager.hideAllPlayers(),e.endVideo(),e.getProviderName()===s.B.NATIVETOVIDEO&&"playOnce"===this.widgetSettings.vidgetN2vBackfill&&e.destroy(),this.playNextProvider()}onPlayerPause(){this.stopViewabilityMeasurement(),this.pauseEngagePlayMeasurement()}onPlayerResume(e){this.resumeEngagePlayMeasurement(),e.isViewabilityReached||this.startViewabilityMeasurement(e)}stopViewabilityMeasurement(){this.viewabilityMeasurementSubscription?.unsubscribe()}stopPlacementViewabilityMeasurement(){this.placementViewabilityMeasurementSubscription?.unsubscribe()}startViewabilityMeasurement(e){this.viewabilityMeasurementSubscription=v.J.measureViewability(this.playerWrapperManager.innerPlayerWrapper,this.viewabilityMeasurementSettings).subscribe((t=>{e.onViewabilityReached(t),this.sendEvent({event:"VIDGET_VIEWABILITY",description:"viewability percentage threshold: "+this.widgetSettings.viewabilityPercentageThreshold,extraParams:{viewability:t}},e),this.stopViewabilityMeasurement()}))}startPlacementViewabilityMeasurement(){this.placementViewabilityMeasurementSubscription=v.J.measureViewability(this.playerWrapperManager.playerWrapper,this.viewabilityMeasurementSettings).subscribe((e=>{this.sendEvent({event:"VIDGET_PLAYER_VIEWABILITY",description:"viewability percentage threshold: "+this.widgetSettings.viewabilityPercentageThreshold,extraParams:{viewability:e}}),this.placementViewabilityReached=!0,this.stopPlacementViewabilityMeasurement()}))}playNextProvider(){if(this.numOfPlays>=this.widgetSettings.configuredReloadCount)return this.sendEvent({event:"VIDGET_DEBUG",description:`playNextProvider, configuredReloadCount of ${this.widgetSettings.configuredReloadCount} reached`}),(0,f.S)(`[${this.widgetSettings.reportedWidgetId}-${this.widgetSettings.reportedSubWidgetId}] - configured reload count is ${this.widgetSettings.configuredReloadCount} and num of plays is ${this.numOfPlays}, finishing playing vidget`),void this.statusChange$.next(4);if(this.numOfPlays>0&&C.M.shouldHoldVidgetByParallelPlayPolicy(this,[]))return this.sendEvent({event:"VIDGET_PENDING",description:`playNextProvider parallelPlayPolicy stopped the flow with parallelPlay policy: ${this.getPlayMode()}`}),this.statusChange$.next(3),void(this.adQueue.isPendingPlayProviders()&&this.statusChange$.next(1));if(this.isVideoPlayed&&this.widgetSettings.isHlrWidget)return this.sendEvent({event:"VIDGET_DEBUG",description:"playNextProvider, reelWidget cannot start playing independently"}),this.statusChange$.next(3),this.isVideoPlayed=!1,void(this.adQueue.isPendingPlayProviders()&&this.statusChange$.next(1));if(!this.adQueue.isPendingPlayProviders())return this.sendEvent({event:"VIDGET_DEBUG",description:"playNextProvider, no provider has left in the queue"}),(0,f.S)(`[${this.widgetSettings.reportedWidgetId}-${this.widgetSettings.reportedSubWidgetId}] - pendingPlayProviders is empty`),void this.statusChange$.next(3);const e=this.adQueue.extractNextProvider(this.isInView());if(null==e)return this.sendEvent({event:"VIDGET_DEBUG",description:"playNextProvider, could not find eligible provider"}),(0,f.S)(`[${this.widgetSettings.reportedWidgetId}-${this.widgetSettings.reportedSubWidgetId}] - nextProvidrIsNull`),void this.statusChange$.next(3);this.activeProvider=e,setTimeout((()=>{this.playNextAd(e)}),this.calcBreakTime())}calcBreakTime(){if(0===this.numOfPlays)return 0;const e=Date.now()-this.endTimeOfLastVideo;return Math.max(0,this.widgetSettings.configuredReloadTime-e)}playNextAd(e){if(e.hasAdReady()){this.clearVidgetTimeout(),(0,f.S)(`[${this.widgetSettings.reportedWidgetId}-${this.widgetSettings.reportedSubWidgetId}] - telling provider ${e.getProviderName()} to play`),this.showPlayerBeforePlaying(e),this.sendEvent({event:"VIDGET_DEBUG",description:"playNextAd, calling provider play"},e);try{e.playLoadedAd()}catch(t){this.onPlayFailed(e,t)}this.numOfPlays++,this.isVideoPlayed=!0,this.stopViewabilityMeasurement(),2!==this.statusChange$.value&&this.statusChange$.next(2)}else this.onPlayFailed(e,"start ad called but no ad is pending to play")}onPlayFailed(e,t){this.skipCurrentProvider(e),this.sendEvent({event:"ERROR",description:t},e)}showPlayerBeforePlaying(e){this.playerWrapperManager.showPlayer(e),this.visibilityChange$.next(0)}load(){this.createPlayerWrapper(),this.registerToVideoWrapperViewportChanges(),this.applyVideoWidgetTimeout();const{providersToLoadNow:e,providersToLoadLater:t}=this.widgetSettings.providers.reduce(((e,t)=>("in-view"===t.playMode?e.providersToLoadLater.push(t):e.providersToLoadNow.push(t),e)),{providersToLoadNow:[],providersToLoadLater:[]}),i=this.getN2vProvider();var r,s;i&&t.push(i),t.length>0&&(this.providersPendingInView=!0,this.playerWrapperManager.videoWrapperViewportChanges$.pipe((r=e=>0===e,s=!0,void 0===s&&(s=!1),(0,n.e)((function(e,t){var i=0;e.subscribe((0,o.x)(t,(function(e){var n=r(e,i++);(n||s)&&t.next(e),!n&&t.complete()})))})))).subscribe((e=>{1===e&&(this.loadProviders([...t]),this.providersPendingInView=!1)}))),this.loadProviders([...e])}getN2vProvider(){if(["afterEach","playOnce"].indexOf(this.widgetSettings.vidgetN2vBackfill)>-1){let e=this.widgetSettings.providers.find((e=>e.name===s.B.NATIVETOVIDEO));return e||(e=T.d.providers?.find((e=>e.name===s.B.NATIVETOVIDEO))),e}}loadProviders(e){e.forEach((async e=>{(0,f.S)(`[${this.widgetSettings.reportedWidgetId}-${this.widgetSettings.reportedSubWidgetId}] - about to init ${e.name}`);const t=await this.createProvider(e);null!=t&&(this.providersState[t.getProviderName()]={playedAds:0,loadedAds:0},t.onViewabilityChange(this.playerWrapperManager.videoWrapperViewportChanges$.value),this.createProviderPlayer(t))}))}createProviderPlayer(e){this.playerWrapperManager.appendPlayer(e.getPlayerElement()),e.createPlayer().then((()=>{(0,f.S)(`[${this.widgetSettings.reportedWidgetId}-${this.widgetSettings.reportedSubWidgetId}] - player initiated ${e.getProviderName()}`),this.registerToProviderChanges(e),this.sendDebugStats(e)}))}sendDebugStats(e){const t=e.getDebugStats();Object.keys(t).length>0&&this.sendEvent({event:"VIDGET_DEBUG",description:`debug stats: ${JSON.stringify(t)}`},e)}registerToProviderChanges(e){e.stateChanges$.subscribe((t=>{this.onPlayerStatusChange(e,t)}))}startPlaying(){this.sendEvent({event:"VIDGET_DEBUG",description:"providersManager, startPlaying was called"}),this.playNextProvider()}getPlayMode(){return this.widgetSettings.parallelPlay}isInApp(){return this.vidgetData?.inAppBridge||!1}getPlayersWrapperElement(){return this.playerWrapperManager?.innerPlayerWrapper}isInView(){return 1===this.playerWrapperManager?.videoWrapperViewportChanges$?.value||!1}isInstream(){return!1}measureEngagedPlay(e){this.engagePlayTimer=new I(W.G),this.engagePlayTimerSub$=this.engagePlayTimer.start().subscribe((()=>{this.stopEngagePlayMeasurement(),this.sendEvent({event:"ENGAGED_PLAY",extraParams:{videoProgress:Math.round(e.getProviderAuditParams().videoProgress/1e3),viewability:this.playerWrapperManager.getCurrentViewability()}},e)}))}resumeEngagePlayMeasurement(){this.engagePlayTimer?.resume()}pauseEngagePlayMeasurement(){this.engagePlayTimer?.pause()}stopEngagePlayMeasurement(){this.engagePlayTimer?.stop(),this.engagePlayTimerSub$?.unsubscribe()}fireExternalPixels(){this.widgetSettings.vidgetExternalImpressionPixels&&l.Z.firePixels(this.widgetSettings.vidgetExternalImpressionPixels,this.widgetSettings,null,(e=>{this.sendEvent({event:"PIXEL_FIRED",description:e.substring(0,75)})}))}destroyProvider(e){e.stateChanges$.unsubscribe(),e.destroy(),this.providers=this.providers.filter((t=>t.getProviderName()!==e.getProviderName()))}destroy(){(0,f.S)(`[${this.widgetSettings?.reportedWidgetId}-${this.widgetSettings?.reportedSubWidgetId}] - destroying`),this.stopViewabilityMeasurement(),this.stopPlacementViewabilityMeasurement(),this.stopEngagePlayMeasurement(),this.playerWrapperManager?this.playerWrapperManager.destroy().then((()=>{this.destroyProviders()})):this.destroyProviders()}destroyProviders(){this.providers?.forEach((e=>{this.destroyProvider(e)}))}execPostVideoRunFlow(){if(this.vidgetTimeout&&this.clearVidgetTimeout(),"afterAll"!==this.widgetSettings.vidgetN2vBackfill||0!==this.numOfPlays)this.statusChange$.next(4);else{this.widgetSettings.configuredReloadCount=1;const e=T.d.providers?.find((e=>e.name===s.B.NATIVETOVIDEO));this.loadProviders([e])}}applyVideoWidgetTimeout(){this.widgetSettings.vidgetTimeout&&(this.vidgetTimeout=setTimeout((()=>{(0,f.S)(`[${this.widgetSettings.reportedWidgetId}-${this.widgetSettings.reportedSubWidgetId}] - vidgetTimeout of ${this.widgetSettings.vidgetTimeout} reached, running post video run flow`),this.sendEvent({event:"VIDGET_DEBUG",description:`[${this.widgetSettings.reportedWidgetId}-${this.widgetSettings.reportedSubWidgetId}] - vidgetTimeout of ${this.widgetSettings.vidgetTimeout} reached`}),this.destroyProviders(),this.execPostVideoRunFlow()}),this.widgetSettings.vidgetTimeout))}clearVidgetTimeout(){clearTimeout(this.vidgetTimeout),this.vidgetTimeout=null}getSpecialAuditParams(e){const t={};return"COMPLETE"===e.event&&this.wasPlacementViewedForFirstTime&&(t.completeInview=!0),t}}},7589:(e,t,i)=>{"use strict";i.d(t,{J:()=>S});var r=i(6716),n=i(8639),o=i(6798),s=i(2566);var a=i(278);function d(e,t){return e===t}function l(e){return(0,o.e)((function(t,i){try{t.subscribe(i)}finally{i.add(e)}}))}var c=i(655),p=function(e){return e&&"number"==typeof e.length&&"function"!=typeof e},g=i(8474);var u=i(1480),h=i(6766);var v="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator";var y=i(5);function w(e){if(e instanceof u.y)return e;if(null!=e){if(function(e){return(0,g.m)(e[h.L])}(e))return o=e,new u.y((function(e){var t=o[h.L]();if((0,g.m)(t.subscribe))return t.subscribe(e);throw new TypeError("Provided object does not correctly implement Symbol.observable")}));if(p(e))return n=e,new u.y((function(e){for(var t=0;t0&&(t=new f.Hp({next:function(e){return v.next(e)},error:function(e){p=!0,g(),r=P(u,s,e),v.error(e)},complete:function(){l=!0,g(),r=P(u,d),v.complete()}}),w(e).subscribe(t))}))(e)}}function P(e,t){for(var i=[],r=2;r{c.next(e)}),{root:null,rootMargin:isNaN(t.rootMargin)?"0px":`-${t.rootMargin}px`,threshold:isNaN(t.threshold)?1:t.threshold});var g,u,h,v;return p.observe(e),c.pipe((h=t.debounce||S.debounceTime,void 0===v&&(v=n.z),(0,o.e)((function(e,t){var i=null,r=null,n=null,o=function(){if(i){i.unsubscribe(),i=null;var e=r;r=null,t.next(e)}};function a(){var e=n+h,r=v.now();if(re[0].isIntersecting===t[0].isIntersecting,void 0===u&&(u=a.y),g=null!=g?g:d,(0,o.e)((function(e,t){var i,r=!0;e.subscribe((0,s.x)(t,(function(e){var n=u(e);!r&&g(i,n)||(r=!1,i=n,t.next(e))})))})))).subscribe((e=>{i.next(e[0].isIntersecting?1:0)})),i.pipe(l((()=>{c.unsubscribe(),p.disconnect()})),b())}static measureViewability(e,t){if(!window.IntersectionObserver)return new r.x;let i;const n=new r.x,o=new IntersectionObserver((e=>{e[0].isIntersecting?i=setTimeout((()=>{((e,t)=>{e.disconnect(),n.next(t.intersectionRatio)})(o,e[0])}),t.timeInMilliseconds):i&&clearTimeout(i)}),{root:null,rootMargin:"0px",threshold:t.threshold||1});return o.observe(e),n.pipe(l((()=>{i&&clearTimeout(i),o?.disconnect()})),b())}static isElementInViewportRange(e,t){const i=e.getBoundingClientRect(),r=i.top-t<=window.innerHeight,n=i.bottom+t>=0;return r&&n}}},5259:(e,t,i)=>{"use strict";var r;i.d(t,{i:()=>r}),function(e){e[e.INFO=0]="INFO",e[e.DEBUG=1]="DEBUG",e[e.VERBOSE=2]="VERBOSE"}(r||(r={}))},4452:(e,t,i)=>{"use strict";var r;i.d(t,{B:()=>r}),function(e){e.Aniview="Aniview",e.Vidazoo="Vidazoo",e.OPA="OPA",e.VI="VI",e.NATIVETOVIDEO="NATIVETOVIDEO"}(r||(r={}))},578:(e,t,i)=>{"use strict";var r;i.d(t,{D:()=>r}),function(e){e.LINEAR="1",e.NON_LINEAR="2"}(r||(r={}))},5148:(e,t,i)=>{"use strict";i.d(t,{Z:()=>n});class r{static loadScript(e,t="head"){return new Promise(((i,r)=>{const n=document.createElement("script");n.src=e,n.onload=i,n.onerror=r,document.getElementsByTagName(t)[0].appendChild(n)}))}static isMobile(){return/(iphone|ipod|symbian|android|windows ce|blackberry|palm|ipad)/.test(navigator.userAgent.toLowerCase())}static equalsIgnoreCase(e,t){return e?.toLowerCase()===t.toLowerCase()}static nodeToString(e){let t=document.createElement("div");t.appendChild(e.cloneNode(!0));const i=t.innerHTML;return t=e=null,i}static viewPercentage(e){if(!e)return 0;const t=e.getBoundingClientRect(),i=r.getViewportSizeGlobal().height,n=e.clientHeight;if(!n)return 0;const o=t.top,s=t.top+n;let a=0;if(o>0){if(o>i)return 0;if(si?i:s}return Math.round(100*a/n)}static getViewportSizeGlobal(){const e={height:0,width:0},t=void 0!==window.innerWidth,i=0!==document?.documentElement?.clientWidth,r=!t&&!i;return t?(e.height=window.innerHeight,e.width=window.innerWidth):i?(e.height=document?.documentElement.clientHeight,e.width=document?.documentElement.clientWidth):r&&(e.height=document.getElementsByTagName("body")[0].clientHeight,e.width=document.getElementsByTagName("body")[0].clientWidth),e}static performRandomWithBalance(e){let t=0;const i=[];if(!e)return null;for(const r in e)t+=e[r],i.push({name:r,balance:e[r]});t<1&&(i[0].balance+=1-t),t>1&&(i[0].balance-=t-1);const r=Math.random();for(let e=0,t=0;e{e=r.replaceMacros(e,t,i);(new Image).src=e,n&&n(e)}))}static replaceMacros(e,t,i){return e=r.replaceAll(e,"{{widget_id}}",t.widgetID),e=r.replaceAll(e,"{{publisher_id}}",t.pubID),e=r.replaceAll(e,"{{rand}}",(Math.random()+1).toString(36).substring(2)),e=r.replaceAll(e,"{{req_id}}",t.reqID),e=r.replaceAll(e,"{{publisher_name}}",t.publisherName),e=r.replaceAll(e,"{{doc_id}}",t.docId),e=r.replaceAll(e,"{{time_stamp}}",Date.now().toString()),i?.campaignId&&(e=r.replaceAll(e,"{{campaign_id}}",i.campaignId.toString())),i?.marketerName&&(e=r.replaceAll(e,"{{adv_name}}",i.marketerName)),e}static replaceAll(e,t,i){return e.replace(new RegExp(t,"g"),i)}static getSiblingsBetweenRecs(e,t){const i=e.parentNode?.children,r=t.parentNode?.children;if(!i||!r)throw Error("invalid htmlElement");const n=Array.from(i).concat(e.parentNode!==t.parentNode?Array.from(r):[]),o=[];let s=!1;for(const i of n){const r=i===e,n=i===t;if(s||r)if(r){if(n)break;s=!0}else if(s){if(n)break;o.push(i)}}return o}static logViewability(e,t){fetch("https://log.outbrainimg.com/api/loggerBatch/log-viewability",{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify([{requestId:e,position:-1,lsd:t}])})}}const n=r},3443:(e,t,i)=>{"use strict";i.d(t,{S:()=>n});const r=performance?.now(),n=(...e)=>{const t=`(${((performance?.now()-r)/1e3).toFixed(2)}s)`;e.push(t),window.obvlog=e;const i=new URL(window.location.href);("true"===i.searchParams.get("dlog")||i.search.indexOf("dlog=true")>-1)&&console.log("Vidget:",...e)}},2465:(e,t,i)=>{"use strict";i.d(t,{r:()=>l});var r=i(5148),n=i(4528),o=i(5259),s=i(8178);var a=i(3443),d=i(4452);class l{static widgetProxy=function(){if(window.OB_PROXY)return window.OB_PROXY;throw"fatal error, could not obtain obProxy"}();static getWidgetRequest(e,t,i){return l.widgetProxy?.getRequest?.(e,t,i)}static getWidgetRawResponse(e){return l.widgetProxy?.getRawResponse?.(e)}static getAbTestVal(e,t,i){const r=l.widgetProxy.getFeedFatherAB;if(r.constructor===Function&&r(e)){const n=r(e);if(n&&n!==i){const r=this.getWidgetRequest(e,t,i).split("-")[1];return r?n+"-"+r:n}return n}return l.getWidgetRequest(e,t,i)}static getCardIdx(e){return l.widgetProxy?.getCardIdx?.(e)}static getWidgetSetting(e,t,i){return l.widgetProxy.getSet(e,t,i)}static getWidgetSettings(e){const t=l.getWidgetIndex(e),i=t?"outbrain_widget_"+t:"outbrain_widget_0",n=l.getWidgetElement(e),o=l.widgetProxy.getDataSrcFinalUrl?l.widgetProxy.getDataSrcFinalUrl(e):void 0,s={widgetID:l.getWidgetId(e),reportedWidgetId:l.getReportedWidgetJSId(e,n),widgetIdx:t||0,isSmartFeed:l.isSmartFeed(n),pubID:l.getWidgetRequest(e,"pid",null),reqID:l.getWidgetRequest(e,"req_id",-1),pageViewId:l.getWidgetRequest(e,"pvId",""),containerID:i,docId:l.getWidgetRequest(e,"did",-1),sourceId:l.getWidgetRequest(e,"sid",null),lazyListingsPixel:l.getWidgetMeta(e,"lazyListingsPixel",null),datasrc:o||l.getDocUrl(n),parallelPlay:l.getWidgetSetting(e,"vidgetParallelPlay","avoid in viewport"),excludeInAppParamsPlayer:l.getWidgetSetting(e,"excludeInAppParamsPlayer",!1),viewabiltyEventTime:l.getWidgetSetting(e,"vidgetViewabilityMinDuration",2),viewabilityPercentageThreshold:l.getWidgetSetting(e,"vidgetViewabilityPercentageThreshold",50),playerMaxWidth:this.getPlayerMaxWidth(l.getWidgetSetting(e,"vidgetPlayerMaximalWidth",null)),playerOrientation:"horizontal",screenOrientation:this.getScreenOrientation(),playOnlyOnWifi:l.getWidgetSetting(e,"vidgetPlayOnlyOnWifi",!0),reportedSubWidgetId:l.getReportedSubWidgetId(e,n),ccpaPrivacy:l.getWidgetRequest(e,"ccpa",null),abTestVal:l.getAbTestVal(e,"abTestVal","no_abtest")||"void",obRecsAbtestAndVars:l.getWidgetRequest(e,"obRecsAbtestAndVars",null),isIframe:r.Z.isIframe(),recsNumber:l.getWidgetRequest(e,"tcr",0),fAB:l.widgetProxy.getFeedFatherAB(e)?l.widgetProxy.getFeedFatherAB(e):"no_abtest",layeredTestInfo:l.getWidgetRequest(e,"layeredTestInfo",null),fid:l.getFeedFatherId(e,n),fIndex:l.getFeedFatherIndex(e,n),feedIdx:l.widgetProxy.getRequest(e,"feedIdx",null),cardIdx:l.getCardIdx(e),stickyPlayer:l.getStickyPlayerType(e),brandingType:l.getWidgetSetting(e,"whatIsBrandingType","Amelia + copy"),titleHeight:21,adBlockStatus:"true"===l.widgetProxy.getAdBlockerStatus(),feedVersion:l.widgetProxy.getRequest(e,"feedVersion",null),onlyVideoWidget:0===l.getWidgetRequest(e,"tcr",0)||/odb_dynamic_video-reel/gi.test(l.getWidgetSetting(e,"recMode","")),odbVidTag:l.getWidgetRequest(e,"odb_vid_tag",null),externalId:l.getObExtId(e,"getExtId"),externalId2:l.getObExtId(e,"getExtId2"),featureFlag:l.getWidgetSetting(e,"vidgetFeatureFlag","GA"),vidgetOrientation:l.getWidgetSetting(e,"vidgetOrientation","both"),nativeVideoMode:l.getWidgetSetting(e,"vidgetNativeVideo","never"),nativeVideoBtnPosition:l.getWidgetSetting(e,"nativeVideoBtnPosition","belowVideo"),nativeVideoLogoPosition:l.getWidgetSetting(e,"nativeVideoLogoPosition","belowVideo"),recMode:l.getWidgetSetting(e,"recMode",""),isVideoReel:/odb_dynamic_video-reel/gi.test(l.getWidgetSetting(e,"recMode","")),vidgetContentSource:l.getWidgetSetting(e,"VidgetContentSource","none"),reelsTransitionDuration:l.getWidgetSetting(e,"reelsTransitionDuration",20),maxOrganicRecs:l.getWidgetSetting(e,"maxOrganicVideos",5),isProviderControlledPauseOutOfView:!1,vidgetN2vBackfill:l.getWidgetSetting(e,"vidgetN2vBackfill","none"),adLoaded:!1,displayAdMaxSize:l.getWidgetSetting(e,"displayAdSize",""),vidgetWaterfallOptimization:l.getWidgetSetting(e,"vidgetWaterfallOptimization",0),logLevel:l.getLogLevel(e),vidgetPassBack:l.getWidgetSetting(e,"vidgetPassBack",null),vidgetPassbackTrigger:l.getWidgetSetting(e,"vidgetPassbackTrigger","none"),vidgetPassbackTimeout:l.getWidgetSetting(e,"vidgetPassbackTimeout","none"),vidgetTimeout:l.getVidgetTimeout(e),configuredReloadTime:1e3*parseInt(l.getWidgetSetting(e,"vidgetReloadTime",4)),configuredReloadCount:l.getWidgetSetting(e,"vidgetReloadCount",3),actualReloadCount:l.getWidgetSetting(e,"vidgetReloadCount",3),vidgetCustomControls:this.isValidJson(l.getWidgetSetting(e,"vidgetCustomControls","")),vidgetNativeEndCard:l.getWidgetSetting(e,"VidgetNativeEndCard",!0),vidgetDeliveryMode:l.getWidgetSetting(e,"vidgetDeliveryMode","progressive"),vidgetFootprint:l.getWidgetSetting(e,"vidgetFootprint","standard"),vidgetExternalMeasure:l.getWidgetSetting(e,"VidgetExternalMeasure",!1),firstAucationExceuted:!1,vidgetDynamicReloads:l.getWidgetSetting(e,"vidgetDynamicReloads",0),country:l.getWidgetRequest(e,"country",null),widgetPlatform:l.getWidgetRequest(e,"readerPlatform",null),publisherName:l.getWidgetRequest(e,"pubName",null),forceVI:l.getWidgetSetting(e,"forceVI",!1),bidFloor:l.getBidFloor(e),vidgetHLRExternalProviders:this.isValidJson(l.getWidgetSetting(e,"VidgetHLRExternalProviders",{})),providersChannelIds:this.getFallbackChannelId(e),contentCategory:l.getWidgetSetting(e,"vidgetContentCategory",null),language:l.getWidgetRequest(e,"lang",null),externalPublisherGroupId:l.getWidgetRequest(e,"expgid",null),lsd:l.getWidgetRequest(e,"lsd",""),t:l.getWidgetRequest(e,"t",""),permalinkFieldName:l.getPermalinkFieldName(e),installationKeyParam:l.getInstallationKeyParam(e),vidStatus:l.getVidStatus(e),consentData:l.getConsentData(e),fontFamily:l.getWidgetSetting(e,"dynamic:TitleFontFamily","inherit"),isReelV2:l.getWidgetSetting(e,"isReelV2",!1),isAdnginControl:l.getWidgetRequest(e,"isAdnginControl",!1),n2vTemplate:l.getWidgetSetting(e,"n2vTemplate","random"),isIiqOn:l.getWidgetSetting(e,"vidgetIIQEnabled",!0),disableVideoIndirectDemand:l.getWidgetSetting(e,"vidgetDisableVideoIndirectDemand","false"),sellerJsonChain:{ver:"1.0",complete:1,nodes:[{asi:"outbrain.com",sid:l.getWidgetRequest(e,"schain","0000000000000000000000000000000000"),hp:1}]},dfpInfo:{isDfp:!1,dfpFrame:null,dfpOriginalHeight:null},playedReloadIndexes:[],optimizeLogicExcludeCount:{providers:l.getProvidersDefaultCounts(),waterfallExcludeList:[],numberOfStrikes:2},brandingTag:"",providers:l.getProvidersData(e),isHlrWidget:l.isHlrWidget(e),closeButton:!l.isHlrWidget(e),vidgetExternalImpressionPixels:this.getExternalImpressionPixels(e),publisherImpId:l.getPublisherImpId(e),onyxFeedMode:l.getWidgetSetting(e,"onyxFeedMode","None"),isSyndicationAllowed:!1,shouldLogViewability:!1,iabCatsV1:l.getWidgetRequest(e,"iabCatsV1",null),optedOut:l.getWidgetRequest(e,"oo",!1),playerLocation:"aboveWidget",originalWaterfall:l.getWidgetSetting(e,"vidgetProvidersWaterfall","")};return s.playerLocation=l.getPlayerLocation(e,s),s.isSyndicationAllowed=s.isVideoReel&&"syndication"===s.vidgetContentSource.toLowerCase(),s.shouldLogViewability="odb_dynamic_video-reel"===s.recMode,(0,a.S)(`[${s.reportedWidgetId}-${s.reportedSubWidgetId}] - obVideo config:`,s),s}static getVidgetTimeout(e){let t=l.getWidgetSetting(e,"vidgetTimeout",null);const i=l.getWidgetSetting(e,"vidgetPassbackTimeout",null),r=l.getWidgetSetting(e,"vidgetPassbackTrigger","none");return i&&"timeout"===r&&(t=i),t?1e3*t:null}static getBidFloor(e){return+l.getWidgetSetting(e,"vidgetOPABidFloor","")||null}static getLogLevel(e){const t=l.getWidgetSetting(e,"vidgetLogLevel","INFO").toUpperCase();return o.i[t]}static getProvidersDefaultCounts(){const e={};return Object.keys(n.ZP.providers).forEach((t=>e[t]=0)),e}static getPlayerLocation(e,t){switch(t.recMode){case"odb_dynamic_reel":return"inWidget";case"odb_dynamic_video-reel":return"aboveWidget";default:{if("2"===t.feedVersion&&"2"===t.cardIdx)return"belowWidget";const i=l.getWidgetSetting(e,"placementType","footer");if(l.isInFeed(e)&&"in-article"!==i)return"aboveWidget";const r=l.getQueryString("obLocation"),n=l.getWidgetSetting(e,"vidgetPlayerLocation","inWidget");return r||n}}}static getObExtId(e,t){try{return l?.widgetProxy?.[t]?.(e)??null}catch(e){throw"*** Get OB_ExtId from widget proxy failed for "+t+"***"}}static isHlrWidget(e){return new RegExp("odb_dynamic_reel","gi").test(l.getWidgetSetting(e,"recMode",""))}static isVrlHiddenMode(e){return"vrlHiddenMode"===e.featureFlag||("None"===e.onyxFeedMode||"onyxNonHiddenMode"!==e.featureFlag)&&"MOA"!==e.onyxFeedMode&&("ATF"===e.onyxFeedMode||"MOA VRL COVER"===e.onyxFeedMode)}static getWidgetElement(e){return l.widgetProxy.getContainer(e)}static getDocUrl(e){const t=e.getAttribute("data-src");if(t?.includes("http"))return t;{const t=e.getAttribute("data-ob-contentUrl");if(t)return t;const i=e.getAttribute("data-ob-bundleUrl");if(i)return i;const r=e.getAttribute("data-ob-portalUrl");if(r)return r}return window.location.href}static getProvidersData(e){let t=l.getQueryString("playMode");const i=this.getProvidersWaterfall(e);if(!i)return[];let n=l.getWidgetSetting(e,"vidgetPlayMode",void 0);try{n=JSON.parse(n)}catch(e){n=null}return n&&!Array.isArray(n)&&(t=t||n.globalPlayMode||null,n=null),i.map((e=>{const i=n?.find((t=>r.Z.equalsIgnoreCase(t.name,e))),o=s.d.providers?.find((t=>r.Z.equalsIgnoreCase(t.name,e))),a=n?.find((e=>r.Z.equalsIgnoreCase(e.name,"global"))),d={...o,...a,...i};return{name:e,playMode:t??d?.playMode,currentPlayMode:d?.currentPlayMode,pauseOutOfView:d?.pauseOutOfView,playWaitingTime:d?.playWaitingTime,noReadyAdsTimeoutSec:d?.noReadyAdsTimeoutSec}}))}static getProvidersWaterfall(e){return l.getWidgetSetting(e,"vidgetProvidersWaterfall",this.getDefaultProvidersWaterfallAsString()).split(",").map((e=>e?.trim())).filter((t=>{if(this.shouldDisableIndirectDemand(e)){return[d.B.OPA,d.B.VI,d.B.NATIVETOVIDEO].includes(t)}return!0}))}static shouldDisableIndirectDemand(e){const t=l.getWidgetSetting(e,"vidgetDisableVideoIndirectDemand","false");return["all","vpaid"].includes(t)}static getDefaultProvidersWaterfallAsString(){const e=s.d.providers?.filter((e=>e.defaultProvider));return e.map((e=>e.name)).join(",")}static isInFeed(e){const t=!!l.widgetProxy.getFeedParentWidget(e),i="2"===l.widgetProxy.getRequest(e,"feedVersion",null);return!(!t||!i)}static getStickyPlayerType(e){switch(l.getQueryString("obSticky")||l.getWidgetSetting(e,"vidgetActivateStickyPlayer","none").toString()){case"none":default:return null;case"regular":return"regular";case"slider":return"slider";case"sliderAlwaysRight":return"sliderAlwaysRight";case"noScroll":return"noScroll";case"sliderOnFeedBorders":return"feedBorders"}}static getPlayerMaxWidth(e){const t={horizontal:null,vertical:null},i=l.isValidJson(e);return i&&isNaN(Number(e))?(isNaN(Number(i.horizontal))||0==i.horizontal||(t.horizontal=i.horizontal),isNaN(Number(i.vertical))||0==i.vertical||(t.vertical=i.vertical)):t.horizontal=isNaN(Number(e))||0==e?null:e,t}static getScreenOrientation(){return window.matchMedia("(orientation: portrait)").matches?"vertical":"horizontal"}static getPublisherImpId(e){const t=l.widgetProxy?.getPubImpId?.(e);return t?encodeURIComponent(t):null}static isValidJson(e){try{return JSON.parse(e)}catch(e){return}}static getQueryString(e){const t=new RegExp("[?&]"+e+"=([^&#]*)","i").exec(window.location.href);return t?t[1]:null}static getWidgetId(e){return l.getWidgetRequest(e,"widgetJsId",l.widgetProxy.getWidgetId(e))}static getWidgetIndex(e){return l.widgetProxy.getWidgetIndex?l.widgetProxy.getWidgetIndex(e):null}static getReportedWidgetJSId(e,t){let i=l.getWidgetId(e);if(l.isSmartFeed(t)){const t=l.widgetProxy.getFeedParentWidget?l.widgetProxy.getFeedParentWidget(e):e;i=l.getWidgetId(t)}return i}static getFeedFatherId(e,t){if(l.isSmartFeed(t)){const t=l.widgetProxy.getFeedParentWidget?l.widgetProxy.getFeedParentWidget(e):e;return l.getWidgetRequest(t,"wnid",null)}return null}static getFeedFatherIndex(e,t){if(l.isSmartFeed(t)){const t=l.widgetProxy.getFeedParentWidget?l.widgetProxy.getFeedParentWidget(e):e;return l.getWidgetIndex(t)}return null}static isSmartFeed(e){return!(!e||!(e.getAttribute&&(e.getAttribute("data-feed-idx")||e.getAttribute("data-card-idx"))||e.host?.getAttribute("data-feed-idx")||e.host?.getAttribute("data-card-idx")))}static getReportedSubWidgetId(e,t){const i=l.getWidgetId(e);return l.isSmartFeed(t)?i:null}static getWidgetMeta(e,t,i){if("function"==typeof l.widgetProxy?.getMeta)try{return l.widgetProxy.getMeta(e,t,i)}catch(e){throw"*** Get widget meta from widget proxy failed ***"}return null}static getExternalImpressionPixels(e){const t=l.getWidgetSetting(e,"vidgetExternalImpressionPixels",void 0);return t?t.split(",").map((e=>e.trim())):void 0}static getFallbackChannelId(e){const t={};return t.Aniview=l.getWidgetRequest(e,"fallbackChannelIdAniview",null),t}static getPermalinkFieldName(e){return l?.widgetProxy?.getPermalinkFieldName?.(e)||"permalink"}static getInstallationKeyParam(e){return l?.widgetProxy?.getInstallationKey?.(e)}static getConsentData(e){const t=l.getWidgetRequest(e,"cnsntv2",null);return t||l.getWidgetRequest(e,"cnsnt","")}static getVidStatus(e){let t;try{const i=l.getWidgetId(e),r=l.getQueryString("forceVid");if(r){const[e,n]=r.split(":");e===i&&null!=n&&(t=parseInt(n))}}catch(e){t=null}return t||l.getWidgetRequest(e,"vid",1)}}},655:(e,t,i)=>{"use strict";i.d(t,{CR:()=>d,FC:()=>p,Jh:()=>s,KL:()=>g,XA:()=>a,ZT:()=>n,ev:()=>l,mG:()=>o,qq:()=>c});var r=function(e,t){return r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(e,t){e.__proto__=t}||function(e,t){for(var i in t)Object.prototype.hasOwnProperty.call(t,i)&&(e[i]=t[i])},r(e,t)};function n(e,t){if("function"!=typeof t&&null!==t)throw new TypeError("Class extends value "+String(t)+" is not a constructor or null");function i(){this.constructor=e}r(e,t),e.prototype=null===t?Object.create(t):(i.prototype=t.prototype,new i)}function o(e,t,i,r){return new(i||(i=Promise))((function(n,o){function s(e){try{d(r.next(e))}catch(e){o(e)}}function a(e){try{d(r.throw(e))}catch(e){o(e)}}function d(e){var t;e.done?n(e.value):(t=e.value,t instanceof i?t:new i((function(e){e(t)}))).then(s,a)}d((r=r.apply(e,t||[])).next())}))}function s(e,t){var i,r,n,o,s={label:0,sent:function(){if(1&n[0])throw n[1];return n[1]},trys:[],ops:[]};return o={next:a(0),throw:a(1),return:a(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function a(a){return function(d){return function(a){if(i)throw new TypeError("Generator is already executing.");for(;o&&(o=0,a[0]&&(s=0)),s;)try{if(i=1,r&&(n=2&a[0]?r.return:a[0]?r.throw||((n=r.return)&&n.call(r),0):r.next)&&!(n=n.call(r,a[1])).done)return n;switch(r=0,n&&(a=[2&a[0],n.value]),a[0]){case 0:case 1:n=a;break;case 4:return s.label++,{value:a[1],done:!1};case 5:s.label++,r=a[1],a=[0];continue;case 7:a=s.ops.pop(),s.trys.pop();continue;default:if(!(n=s.trys,(n=n.length>0&&n[n.length-1])||6!==a[0]&&2!==a[0])){s=0;continue}if(3===a[0]&&(!n||a[1]>n[0]&&a[1]=e.length&&(e=void 0),{value:e&&e[r++],done:!e}}};throw new TypeError(t?"Object is not iterable.":"Symbol.iterator is not defined.")}function d(e,t){var i="function"==typeof Symbol&&e[Symbol.iterator];if(!i)return e;var r,n,o=i.call(e),s=[];try{for(;(void 0===t||t-- >0)&&!(r=o.next()).done;)s.push(r.value)}catch(e){n={error:e}}finally{try{r&&!r.done&&(i=o.return)&&i.call(o)}finally{if(n)throw n.error}}return s}function l(e,t,i){if(i||2===arguments.length)for(var r,n=0,o=t.length;n1||a(e,t)}))})}function a(e,t){try{(i=n[e](t)).value instanceof c?Promise.resolve(i.value.v).then(d,l):p(o[0][2],i)}catch(e){p(o[0][3],e)}var i}function d(e){a("next",e)}function l(e){a("throw",e)}function p(e,t){e(t),o.shift(),o.length&&a(o[0][0],o[0][1])}}function g(e){if(!Symbol.asyncIterator)throw new TypeError("Symbol.asyncIterator is not defined.");var t,i=e[Symbol.asyncIterator];return i?i.call(e):(e=a(e),t={},r("next"),r("throw"),r("return"),t[Symbol.asyncIterator]=function(){return this},t);function r(i){t[i]=e[i]&&function(t){return new Promise((function(r,n){(function(e,t,i,r){Promise.resolve(r).then((function(t){e({value:t,done:i})}),t)})(r,n,(t=e[i](t)).done,t.value)}))}}}Object.create},5434:(e,t,i)=>{var r={"./aniview":[1668,372,668],"./aniview/":[1668,372,668],"./aniview/aniview-player-settings.handler":[5372,372],"./aniview/aniview-player-settings.handler.ts":[5372,372],"./aniview/aniview.controller":[5565,372,565],"./aniview/aniview.controller.ts":[5565,372,565],"./aniview/config/aniview-player-events.enum":[1665,665],"./aniview/config/aniview-player-events.enum.ts":[1665,665],"./aniview/config/aniview.config":[7701,701],"./aniview/config/aniview.config.ts":[7701,701],"./aniview/index":[1668,372,668],"./aniview/index.ts":[1668,372,668],"./aniview/interfaces/aniview-audit-params.interface":[4080,80],"./aniview/interfaces/aniview-audit-params.interface.ts":[4080,80],"./aniview/interfaces/aniview-player-config.interface":[8459,459],"./aniview/interfaces/aniview-player-config.interface.ts":[8459,459],"./base/base.controller":[2339,339],"./base/base.controller.ts":[2339,339],"./n2v":[5180,960,886,180],"./n2v/":[5180,960,886,180],"./n2v/config/n2v.config":[7234,234],"./n2v/config/n2v.config.ts":[7234,234],"./n2v/index":[5180,960,886,180],"./n2v/index.ts":[5180,960,886,180],"./n2v/n2v.controller":[804,960,886,804],"./n2v/n2v.controller.ts":[804,960,886,804],"./opa":[2822,960,886,822],"./opa/":[2822,960,886,822],"./opa/config/opa-player-events.enum":[6527,527],"./opa/config/opa-player-events.enum.ts":[6527,527],"./opa/config/opa.config":[5512,512],"./opa/config/opa.config.ts":[5512,512],"./opa/enums/opa-player-error-level.enum":[5575,575],"./opa/enums/opa-player-error-level.enum.ts":[5575,575],"./opa/enums/pixel-event-type.enum":[8312,312],"./opa/enums/pixel-event-type.enum.ts":[8312,312],"./opa/enums/tracker-method.enum":[3588,588],"./opa/enums/tracker-method.enum.ts":[3588,588],"./opa/index":[2822,960,886,822],"./opa/index.ts":[2822,960,886,822],"./opa/interfaces/opa-audit-params.interface":[9926,926],"./opa/interfaces/opa-audit-params.interface.ts":[9926,926],"./opa/interfaces/opa-player-config.interface":[9829,829],"./opa/interfaces/opa-player-config.interface.ts":[9829,829],"./opa/interfaces/opa-settings.interface":[5568,568],"./opa/interfaces/opa-settings.interface.ts":[5568,568],"./opa/interfaces/trackers.interface":[7768,768],"./opa/interfaces/trackers.interface.ts":[7768,768],"./opa/opa-player-settings.handler":[5837,960,837],"./opa/opa-player-settings.handler.ts":[5837,960,837],"./opa/opa.controller":[2886,960,886],"./opa/opa.controller.ts":[2886,960,886],"./vi":[182,960,182],"./vi/":[182,960,182],"./vi/config/vi-forced-settings.const":[7917,917],"./vi/config/vi-forced-settings.const.ts":[7917,917],"./vi/config/vi.config":[8132,132],"./vi/config/vi.config.ts":[8132,132],"./vi/enums/vi-ad-unit-type.enum":[1319,319],"./vi/enums/vi-ad-unit-type.enum.ts":[1319,319],"./vi/enums/vi-partner-ids.enum":[4031,31],"./vi/enums/vi-partner-ids.enum.ts":[4031,31],"./vi/enums/vi-player-events.enum":[6308,308],"./vi/enums/vi-player-events.enum.ts":[6308,308],"./vi/enums/vi-properties.enum":[1995,995],"./vi/enums/vi-properties.enum.ts":[1995,995],"./vi/enums/vi-traffic-type.enum":[7197,197],"./vi/enums/vi-traffic-type.enum.ts":[7197,197],"./vi/index":[182,960,182],"./vi/index.ts":[182,960,182],"./vi/interfaces/instream-data.interface":[5544,544],"./vi/interfaces/instream-data.interface.ts":[5544,544],"./vi/interfaces/outstream-data.interface":[5438,438],"./vi/interfaces/outstream-data.interface.ts":[5438,438],"./vi/interfaces/vi-ad-source.interface":[348,348],"./vi/interfaces/vi-ad-source.interface.ts":[348,348],"./vi/interfaces/vi-audit-params.interface":[2721,721],"./vi/interfaces/vi-audit-params.interface.ts":[2721,721],"./vi/interfaces/vi-paid-play-params.interface":[8356,356],"./vi/interfaces/vi-paid-play-params.interface.ts":[8356,356],"./vi/interfaces/vi-player-config.interface":[3209,209],"./vi/interfaces/vi-player-config.interface.ts":[3209,209],"./vi/interfaces/vi-video-player-settings.interface":[8299,299],"./vi/interfaces/vi-video-player-settings.interface.ts":[8299,299],"./vi/vi-player-settings.handler":[8960,960],"./vi/vi-player-settings.handler.ts":[8960,960],"./vi/vi.controller":[1724,960,724],"./vi/vi.controller.ts":[1724,960,724],"./vidazoo":[8334,848,334],"./vidazoo/":[8334,848,334],"./vidazoo/config/vidazoo-player-events.enum":[2586,586],"./vidazoo/config/vidazoo-player-events.enum.ts":[2586,586],"./vidazoo/config/vidazoo.config":[4727,727],"./vidazoo/config/vidazoo.config.ts":[4727,727],"./vidazoo/index":[8334,848,334],"./vidazoo/index.ts":[8334,848,334],"./vidazoo/interfaces/vidazoo-audit-params.interface":[8147,147],"./vidazoo/interfaces/vidazoo-audit-params.interface.ts":[8147,147],"./vidazoo/interfaces/vidazoo-player-config.interface":[9717,717],"./vidazoo/interfaces/vidazoo-player-config.interface.ts":[9717,717],"./vidazoo/vidazoo-player-settings.handler":[1848,848],"./vidazoo/vidazoo-player-settings.handler.ts":[1848,848],"./vidazoo/vidazoo.controller":[417,848,417],"./vidazoo/vidazoo.controller.ts":[417,848,417]};function n(e){if(!i.o(r,e))return Promise.resolve().then((()=>{var t=new Error("Cannot find module '"+e+"'");throw t.code="MODULE_NOT_FOUND",t}));var t=r[e],n=t[0];return Promise.all(t.slice(1).map(i.e)).then((()=>i(n)))}n.keys=()=>Object.keys(r),n.id=5434,e.exports=n}},r={};function n(e){var t=r[e];if(void 0!==t)return t.exports;var o=r[e]={id:e,exports:{}};return i[e](o,o.exports,n),o.exports}n.m=i,n.n=e=>{var t=e&&e.__esModule?()=>e.default:()=>e;return n.d(t,{a:t}),t},n.d=(e,t)=>{for(var i in t)n.o(t,i)&&!n.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:t[i]})},n.f={},n.e=e=>Promise.all(Object.keys(n.f).reduce(((t,i)=>(n.f[i](e,t),t)),[])),n.u=e=>e+"."+{31:"e655efd4c1193c95528c",80:"c3ec0ca398f3adc62f0d",132:"76e705ef12eef08807e3",147:"ccbce56b763d34dc128a",180:"2fa85e724b3352a0aaff",182:"6ced412f963c6f64d84f",197:"13de7d81c49d49c49780",209:"ec3f9e53266037cbfeb0",234:"19096a16ab6fc8d9fe0f",299:"ddf2c759da2ff6c0577c",308:"eaad7c2dec99cd10586b",312:"f62443207057b97ba094",319:"45646db3d9c2a31b4ccd",334:"dc5ecb6053aa5696bfbe",339:"e7eb56df7306a1c374b5",348:"db803f19eed2b6917b3a",356:"bc64028fe11eb9838fc5",372:"fd949040a62305b6c488",417:"22c082bc02135edc89e5",438:"496c4dba1a206d43fae6",459:"661cbec02393f443f701",512:"3f6d03c67082d4a43d38",527:"aaa9dedcf064f82692aa",544:"7e53fac065584202dbf5",565:"31f62270a303f7860ac5",568:"e03e1dcfc28b5c2c61f6",575:"53c4d97c9b5c3cb8e012",586:"fa180d0a25a921e29ac2",588:"ad7149c096f47045f5fc",665:"5502661624d5a02b0c61",668:"eab81675c7e3c38df2db",701:"8d4b20bb6470e92d535d",717:"5d8e95c86e26953040e8",721:"00a36e6ac6d31258d5e8",724:"0f78222f5c32c5f0c651",727:"0b23e93131e8ac200cbe",768:"3dffb24e904ebd46e6b8",804:"0d19f5872527f6a71640",822:"90ec282a565e324005b7",828:"cb764262e1b8b94a5c9c",829:"1d6605248c13c90917f4",837:"23ecc331a9f19285cc16",848:"3b43a6192944332dd538",886:"0d2be1252eff3829eab9",917:"75972fb4b5bd83c91f77",926:"44daa1a258fdf00b227f",960:"54aafd128e813098f787",995:"3a0d907398604de25850"}[e]+".js",n.miniCssF=e=>{},n.g=function(){if("object"==typeof globalThis)return globalThis;try{return this||new Function("return this")()}catch(e){if("object"==typeof window)return window}}(),n.o=(e,t)=>Object.prototype.hasOwnProperty.call(e,t),e={},t="vidget:",n.l=(i,r,o,s)=>{if(e[i])e[i].push(r);else{var a,d;if(void 0!==o)for(var l=document.getElementsByTagName("script"),c=0;c{a.onerror=a.onload=null,clearTimeout(u);var n=e[i];if(delete e[i],a.parentNode&&a.parentNode.removeChild(a),n&&n.forEach((e=>e(r))),t)return t(r)},u=setTimeout(g.bind(null,void 0,{type:"timeout",target:a}),12e4);a.onerror=g.bind(null,a.onerror),a.onload=g.bind(null,a.onload),d&&document.head.appendChild(a)}},n.r=e=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(e,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(e,"__esModule",{value:!0})},(()=>{var e;n.g.importScripts&&(e=n.g.location+"");var t=n.g.document;if(!e&&t&&(t.currentScript&&(e=t.currentScript.src),!e)){var i=t.getElementsByTagName("script");if(i.length)for(var r=i.length-1;r>-1&&!e;)e=i[r--].src}if(!e)throw new Error("Automatic publicPath is not supported in this browser");e=e.replace(/#.*$/,"").replace(/\?.*$/,"").replace(/\/[^\/]+$/,"/"),n.p=e})(),(()=>{var e={179:0};n.f.j=(t,i)=>{var r=n.o(e,t)?e[t]:void 0;if(0!==r)if(r)i.push(r[2]);else{var o=new Promise(((i,n)=>r=e[t]=[i,n]));i.push(r[2]=o);var s=n.p+n.u(t),a=new Error;n.l(s,(i=>{if(n.o(e,t)&&(0!==(r=e[t])&&(e[t]=void 0),r)){var o=i&&("load"===i.type?"missing":i.type),s=i&&i.target&&i.target.src;a.message="Loading chunk "+t+" failed.\n("+o+": "+s+")",a.name="ChunkLoadError",a.type=o,a.request=s,r[1](a)}}),"chunk-"+t,t)}};var t=(t,i)=>{var r,o,[s,a,d]=i,l=0;if(s.some((t=>0!==e[t]))){for(r in a)n.o(a,r)&&(n.m[r]=a[r]);if(d)d(n)}for(t&&t(i);l{"use strict";var e=n(5148),t=n(7927),i=n(3917),r=(n(7656),n(2391)),o=n(2465),s=n(578);const a=[];Object.defineProperty(window,"obvlog",{get(){const e=btoa(JSON.stringify(a));console.log({obvLog:e})},set(e){a.push(e)}});class d{vidgets=[];startPlayingTimeout=null;lastOdbCallTimestamp=0;async init(i,r,n={}){const o=e.Z.guid(),s=await d.initiateProviderManager(o,i,n);if(!s)throw"could not create providerManager";s.statusChange$.subscribe((e=>{this.onVidgetStatusChange(s,e)})),s.visibilityChange$.subscribe((e=>{0===e&&d.callWidgetCallback(s.callbacks,"onShow",s.widgetSettings.widgetIdx)})),t.M.shouldDisposeVidget(s.getPlayMode(),s.getPlayersWrapperElement())?d.destroyVidgetDueToStrictMode(s):setTimeout((()=>{s.load(),this.vidgets.push(s)}),s.isInApp()?5e3:0)}static async initiateProviderManager(e,t,r){if(1===o.r.getVidStatus(t))return Promise.resolve(new i.B(e,t,r));{const{InstreamProvidersManager:i}=await Promise.all([n.e(960),n.e(828)]).then(n.bind(n,6828));return new i(e,t,r)}}getHLRVidgetEligibleToPlay(e){return this.vidgets.find((t=>t.widgetSettings.isHlrWidget&&t.widgetSettings.widgetIdx==e&&1===t.statusChange$.value))}play(e){const i=this.getHLRVidgetEligibleToPlay(e);if(i){if(t.M.shouldDisposeVidget(i.getPlayMode(),i.getPlayersWrapperElement()))return d.destroyVidgetDueToStrictMode(i),!1;if(!t.M.shouldHoldVidgetByParallelPlayPolicy(i,this.vidgets))return i.startPlaying(),!0;i.sendEvent({event:"VIDGET_PENDING",description:`hlr providersManager with parallelPlay policy: ${i.getPlayMode()} is pending`}),setTimeout((()=>{d.callWidgetCallback(i.callbacks,"onReady",i.widgetSettings.widgetIdx)}),1e3)}return!1}onVidgetStatusChange(e,t){switch(t){case 1:e.sendEvent({event:"VIDGET_DEBUG",description:'providerManager fired "readyToPlay"'}),d.callWidgetCallback(e.callbacks,"onReady",e.widgetSettings.widgetIdx),e.widgetSettings.isHlrWidget||this.onVidgetReadyToPlay(e);break;case 2:d.callWidgetCallback(e.callbacks,"onPlay",e.widgetSettings.widgetIdx);break;case 3:d.callWidgetCallback(e.callbacks,"onClose",e.widgetSettings.widgetIdx),this.playNextVidget();break;case 4:case 5:d.callWidgetCallback(e.callbacks,"onClose",e.widgetSettings.widgetIdx),this.runPassback(e),this.removeVidget(e),this.playNextVidget()}}runPassback(t){const{vidgetPassbackTrigger:i,vidgetPassBack:r}=t.widgetSettings;"none"===i||!r||"endOfReloadsNoPlay"===i&&t.isVideoPlayed||"timeout"===i&&!t.widgetSettings.vidgetTimeout||e.Z.firePassbackScript(r,t.id)}static callWidgetCallback(e,t,i){e?.[t]?.(i)}onVidgetReadyToPlay(e){null!=this.vidgets.find((t=>t.id===e.id))&&(t.M.shouldDisposeVidget(e.getPlayMode(),e.getPlayersWrapperElement())?d.destroyVidgetDueToStrictMode(e):t.M.shouldHoldVidgetByParallelPlayPolicy(e,this.vidgets)?(e.sendEvent({event:"VIDGET_PENDING",description:`providersManager with parallelPlay policy: ${e.getPlayMode()} is pending`}),clearTimeout(this.startPlayingTimeout),this.startPlayingTimeout=setTimeout((()=>{this.onVidgetReadyToPlay(e)}),r.E)):e.startPlaying())}static destroyVidgetDueToStrictMode(e){e.sendEvent({event:"VIDGET_CONFIG_ERROR",description:`Other video exists on page, parallelPlay policy: ${e.getPlayMode()}`}),e.destroy()}removeVidget(e){const t=e.id;e.destroy(),this.vidgets.splice(this.vidgets.findIndex((e=>e.id===t)),1)}playNextVidget(){const e=this.vidgets.filter((e=>1===e.statusChange$.value&&!e.widgetSettings.isHlrWidget));if(0===e.length)return;if(1===e.length)return void e[0].startPlaying();const t=e.filter((e=>e.isInView()));0!==t.length?1!==t.length||t[0].startPlaying():e[0].startPlaying()}getExtraRtbRequestParams(e,t){const i=Date.now(),r=(()=>{if(!(t===s.D.LINEAR))return!1;if(0===this.lastOdbCallTimestamp)return!0;const r=i-this.lastOdbCallTimestamp>3e4;return e&&r})();return r&&(this.lastOdbCallTimestamp=i),`&iv30=${r}`}reloadObVideo(){this.destroy(),window.OB_VIDEO=window.OB_VIDEO||new d}destroy(){this.vidgets.forEach((e=>{e.destroy()})),delete window.OB_VIDEO}}window.OB_VIDEO=window.OB_VIDEO||new d,window.OB_PROXY&&window.OB_PROXY.makeHandshake?window.OB_PROXY.makeHandshake("OB_VIDEO"):console.log("no ob-proxy")})()})();