var ezVideoAdConductor=function(t){var e={};function r(n){if(e[n])return e[n].exports;var a=e[n]={i:n,l:!1,exports:{}};return t[n].call(a.exports,a,a.exports,r),a.l=!0,a.exports}return r.m=t,r.c=e,r.d=function(t,e,n){r.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:n})},r.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},r.t=function(t,e){if(1&e&&(t=r(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var n=Object.create(null);if(r.r(n),Object.defineProperty(n,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var a in t)r.d(n,a,function(e){return t[e]}.bind(null,a));return n},r.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return r.d(e,"a",e),e},r.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},r.p="",r(r.s=8)}([function(t,e,r){var n=r(7)();t.exports=n;try{regeneratorRuntime=n}catch(t){"object"==typeof globalThis?globalThis.regeneratorRuntime=n:Function("r","regeneratorRuntime = r")(n)}},function(t,e){function r(t,e,r,n,a,o,i){try{var s=t[o](i),u=s.value}catch(t){return void r(t)}s.done?e(u):Promise.resolve(u).then(n,a)}t.exports=function(t){return function(){var e=this,n=arguments;return new Promise((function(a,o){var i=t.apply(e,n);function s(t){r(i,a,o,s,u,"next",t)}function u(t){r(i,a,o,s,u,"throw",t)}s(void 0)}))}},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){function r(e){return t.exports=r="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},t.exports.__esModule=!0,t.exports.default=t.exports,r(e)}t.exports=r,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e){t.exports=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){var n=r(5);function a(t,e){for(var r=0;r=0;--a){var o=this.tryEntries[a],s=o.completion;if("root"===o.tryLoc)return n("end");if(o.tryLoc<=this.prev){var u=i.call(o,"catchLoc"),l=i.call(o,"finallyLoc");if(u&&l){if(this.prev=0;--r){var n=this.tryEntries[r];if(n.tryLoc<=this.prev&&i.call(n,"finallyLoc")&&this.prev=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),I(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var a=n.arg;I(r)}return a}}throw new Error("illegal catch attempt")},delegateYield:function(t,r,n){return this.delegate={iterator:F(t),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=e),m}},r}t.exports=a,t.exports.__esModule=!0,t.exports.default=t.exports},function(t,e,r){"use strict";r.r(e),r.d(e,"getVideoAdConductor",(function(){return f}));var n=r(1),a=r.n(n),o=r(3),i=r.n(o),s=r(4),u=r.n(s),l=r(0),c=r.n(l);function d(t){"1"===new URLSearchParams(window.location.search).get("ez_conductor_debug")&&console.log("%c[conductor] ".concat(t),"color: #FFD700")}var h=new(function(){function t(){i()(this,t),this.target=new EventTarget,this.outstreamPlayer=null,this.autoPlayInstreamPlayer=null,this.clickToPlayInstreamPlayer=null,this.outstreamPlayer=null,this.isAutoPlayFloating=!1,this.addListener("clickToPlayStarted",this.handleClickToPlayStarted.bind(this)),this.addListener("autoPlayStarted",this.handleAutoPlayStarted.bind(this)),this.addListener("clickToPlayEnded",this.handleClickToPlayEnded.bind(this)),this.addListener("instreamAdResumed",this.handleInstreamAdResumed.bind(this)),this.addListener("instreamAdEnded",this.handleInstreamAdEnded.bind(this)),this.addListener("autoPlayFloating",this.handleAutoPlayFloating.bind(this)),this.addListener("autoPlayNotFloating",this.handleAutoPlayNotFloating.bind(this)),this.addListener("nonMagicPlayStarted",this.handleNonMagicPlayStarted.bind(this))}var e,r,n,o;return u()(t,[{key:"setAutoPlayInstreamPlayer",value:function(t){this.autoPlayInstreamPlayer=t}},{key:"setClickToPlayInstreamPlayer",value:function(t){this.clickToPlayInstreamPlayer=t}},{key:"setOutstreamPlayer",value:function(t){this.outstreamPlayer=t}},{key:"addListener",value:function(t,e,r){this.target.addEventListener(t,e,r)}},{key:"addListenerOnce",value:function(t,e){this.target.addEventListener(t,e,{once:!0})}},{key:"removeListener",value:function(t,e){this.target.removeEventListener(t,e)}},{key:"dispatchEvent",value:function(t,e){var r=this;return new Promise((function(n,a){d("triggering event: "+t),e||(e={});e.done=function(){n()},e.fail=a;var o=new CustomEvent(t,{detail:e,bubbles:!0,cancelable:!1});r.target.dispatchEvent(o)}))}},{key:"handleClickToPlayStarted",value:function(t){d("clickToPlayStarted triggered"),this.dispatchEvent("pauseAutoPlay",{}),this.dispatchEvent("pauseOutstream",{}),this.dispatchEvent("pauseNonMagicPlay",{}),t&&t.detail&&t.detail.done&&t.detail.done()}},{key:"handleAutoPlayStarted",value:(o=a()(c.a.mark((function t(e){return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:d("autoPlayStarted triggered"),this.dispatchEvent("pauseNonMagicPlay",{}),e&&e.detail&&e.detail.done&&e.detail.done();case 3:case"end":return t.stop()}}),t,this)}))),function(t){return o.apply(this,arguments)})},{key:"handleClickToPlayEnded",value:function(t){d("clickToPlayEnded triggered"),this.dispatchEvent("startAutoPlay",{}),this.dispatchEvent("pauseNonMagicPlay",{}),t&&t.detail&&t.detail.done&&t.detail.done()}},{key:"handleAutoPlayFloating",value:(n=a()(c.a.mark((function t(e){return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(d("autoPlayFloating triggered"),this.isAutoPlayFloating=!0,"undefined"==typeof __ezOutstream){t.next=5;break}return t.next=5,this.dispatchEvent("pauseOutstream",{});case 5:this.dispatchEvent("startAutoPlay",{}),e&&e.detail&&e.detail.done&&e.detail.done();case 7:case"end":return t.stop()}}),t,this)}))),function(t){return n.apply(this,arguments)})},{key:"handleAutoPlayNotFloating",value:(r=a()(c.a.mark((function t(e){return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(d("autoPlayNotFloating triggered"),this.isAutoPlayFloating=!1,!this.clickToPlayInstreamPlayer||this.clickToPlayInstreamPlayer.paused()){t.next=5;break}return e&&e.detail&&e.detail.done&&e.detail.done(),t.abrupt("return");case 5:if(!this.clickToPlayInstreamPlayer||!this.clickToPlayInstreamPlayer.isAdInProgress()||this.clickToPlayInstreamPlayer.isAdPaused()){t.next=8;break}return e&&e.detail&&e.detail.done&&e.detail.done(),t.abrupt("return");case 8:this.dispatchEvent("startOutstream",{}),e&&e.detail&&e.detail.done&&e.detail.done();case 10:case"end":return t.stop()}}),t,this)}))),function(t){return r.apply(this,arguments)})},{key:"handleInstreamAdResumed",value:(e=a()(c.a.mark((function t(e){var r;return c.a.wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(d("instreamAdResumed triggered"),r=e.detail.player,this.clickToPlayInstreamPlayer==r?this.dispatchEvent("pauseAutoPlay",{}):this.autoPlayInstreamPlayer==r&&this.dispatchEvent("pauseClickToPlay",{}),"undefined"==typeof __ezOutstream){t.next=6;break}return t.next=6,this.dispatchEvent("pauseOutstream",{});case 6:this.dispatchEvent("pauseNonMagicPlay",{player:r}),e&&e.detail&&e.detail.done&&e.detail.done();case 8:case"end":return t.stop()}}),t,this)}))),function(t){return e.apply(this,arguments)})},{key:"handleNonMagicPlayStarted",value:function(t){d("nonMagicPlayStarted triggered");var e=t.detail.player;this.dispatchEvent("pauseAutoPlay",{}),this.dispatchEvent("pauseClickToPlay",{}),this.dispatchEvent("pauseNonMagicPlay",{player:e}),this.dispatchEvent("pauseOutstream",{}),t&&t.detail&&t.detail.done&&t.detail.done()}},{key:"handleInstreamAdEnded",value:function(t){d("instreamAdEnded triggered"),this.isAutoPlayFloating=this.autoPlayInstreamPlayer&&this.autoPlayInstreamPlayer.isCurrentlyFloating();var e=this.clickToPlayInstreamPlayer&&this.clickToPlayInstreamPlayer.isAdInProgress(),r=this.autoPlayInstreamPlayer&&this.autoPlayInstreamPlayer.isAdInProgress();!this.isAutoPlayFloating&&!e&&!r&&this.dispatchEvent("startOutstream",{}),t&&t.detail&&t.detail.done&&t.detail.done()}}]),t}());function f(){return h}}]);