/**
 * Skipped minification because the original files appears to be already minified.
 * Original file: /npm/playback-web-middleware@0.7.1/dist/main.js
 *
 * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files
 */
!function(t,e){if("object"==typeof exports&&"object"==typeof module)module.exports=e(require("react"),require("axios"),require("core-js/es6/promise"),require("core-js/modules/es6.object.assign"),require("core-js/modules/es6.array.find"),require("core-js/modules/es6.array.from"),require("core-js/modules/es7.array.includes"),require("core-js/modules/es6.string.includes"),require("core-js/library/fn/object/get-prototype-of"),require("core-js/library/fn/object/define-property"),require("core-js/library/fn/symbol/iterator"),require("core-js/library/fn/symbol"),require("core-js/library/fn/object/set-prototype-of"),require("core-js/library/fn/object/create"),require("core-js/library/fn/object/define-properties"),require("core-js/library/fn/array/from"),require("core-js/library/fn/object/seal"),require("core-js/library/fn/object/assign"),require("core-js/library/fn/object/freeze"),require("react-dom"),require("core-js/library/fn/is-iterable"),require("core-js/library/fn/get-iterator"),require("core-js/library/fn/object/keys"),require("core-js/library/fn/promise"));else if("function"==typeof define&&define.amd)define(["react","axios","core-js/es6/promise","core-js/modules/es6.object.assign","core-js/modules/es6.array.find","core-js/modules/es6.array.from","core-js/modules/es7.array.includes","core-js/modules/es6.string.includes","core-js/library/fn/object/get-prototype-of","core-js/library/fn/object/define-property","core-js/library/fn/symbol/iterator","core-js/library/fn/symbol","core-js/library/fn/object/set-prototype-of","core-js/library/fn/object/create","core-js/library/fn/object/define-properties","core-js/library/fn/array/from","core-js/library/fn/object/seal","core-js/library/fn/object/assign","core-js/library/fn/object/freeze","react-dom","core-js/library/fn/is-iterable","core-js/library/fn/get-iterator","core-js/library/fn/object/keys","core-js/library/fn/promise"],e);else{var n="object"==typeof exports?e(require("react"),require("axios"),require("core-js/es6/promise"),require("core-js/modules/es6.object.assign"),require("core-js/modules/es6.array.find"),require("core-js/modules/es6.array.from"),require("core-js/modules/es7.array.includes"),require("core-js/modules/es6.string.includes"),require("core-js/library/fn/object/get-prototype-of"),require("core-js/library/fn/object/define-property"),require("core-js/library/fn/symbol/iterator"),require("core-js/library/fn/symbol"),require("core-js/library/fn/object/set-prototype-of"),require("core-js/library/fn/object/create"),require("core-js/library/fn/object/define-properties"),require("core-js/library/fn/array/from"),require("core-js/library/fn/object/seal"),require("core-js/library/fn/object/assign"),require("core-js/library/fn/object/freeze"),require("react-dom"),require("core-js/library/fn/is-iterable"),require("core-js/library/fn/get-iterator"),require("core-js/library/fn/object/keys"),require("core-js/library/fn/promise")):e(t.react,t.axios,t["core-js/es6/promise"],t["core-js/modules/es6.object.assign"],t["core-js/modules/es6.array.find"],t["core-js/modules/es6.array.from"],t["core-js/modules/es7.array.includes"],t["core-js/modules/es6.string.includes"],t["core-js/library/fn/object/get-prototype-of"],t["core-js/library/fn/object/define-property"],t["core-js/library/fn/symbol/iterator"],t["core-js/library/fn/symbol"],t["core-js/library/fn/object/set-prototype-of"],t["core-js/library/fn/object/create"],t["core-js/library/fn/object/define-properties"],t["core-js/library/fn/array/from"],t["core-js/library/fn/object/seal"],t["core-js/library/fn/object/assign"],t["core-js/library/fn/object/freeze"],t["react-dom"],t["core-js/library/fn/is-iterable"],t["core-js/library/fn/get-iterator"],t["core-js/library/fn/object/keys"],t["core-js/library/fn/promise"]);for(var r in n)("object"==typeof exports?exports:t)[r]=n[r]}}(window,function(t,e,n,r,i,o,a,s,u,c,l,f,h,d,p,_,E,y,b,g,v,m,S,T){return function(t){var e={};function n(r){if(e[r])return e[r].exports;var i=e[r]={i:r,l:!1,exports:{}};return t[r].call(i.exports,i,i.exports,n),i.l=!0,i.exports}return n.m=t,n.c=e,n.d=function(t,e,r){n.o(t,e)||Object.defineProperty(t,e,{enumerable:!0,get:r})},n.r=function(t){"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})},n.t=function(t,e){if(1&e&&(t=n(t)),8&e)return t;if(4&e&&"object"==typeof t&&t&&t.__esModule)return t;var r=Object.create(null);if(n.r(r),Object.defineProperty(r,"default",{enumerable:!0,value:t}),2&e&&"string"!=typeof t)for(var i in t)n.d(r,i,function(e){return t[e]}.bind(null,i));return r},n.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return n.d(e,"a",e),e},n.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},n.p="",n(n.s=152)}([function(t,e,n){"use strict";n.d(e,"a",function(){return i});
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
var r=function(t,e){return(r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])})(t,e)};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}},function(t,e,n){"use strict";var r=n(2),i=n(35),o=n(46);var a=n(27),s=n(53),u=n(19);n.d(e,"a",function(){return c});var c=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var a=this.operator,s=function(t,e,n){if(t){if(t instanceof r.a)return t;if(t[i.a])return t[i.a]()}return t||e||n?new r.a(t,e,n):new r.a(o.a)}(t,e,n);if(a?a.call(s,this.source):s.add(this.source||u.a.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),u.a.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){u.a.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),t.error(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=l(e))(function(e,r){var i;i=n.subscribe(function(e){try{t(e)}catch(t){r(t),i&&i.unsubscribe()}},r,e)})},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[a.a]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this:Object(s.b)(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=l(t))(function(t,n){var r;e.subscribe(function(t){return r=t},function(t){return n(t)},function(){return t(r)})})},t.create=function(e){return new t(e)},t}();function l(t){if(t||(t=u.a.Promise||Promise),!t)throw new Error("no Promise impl found");return t}},function(t,e,n){"use strict";n.d(e,"a",function(){return l});var r=n(0),i=n(29),o=n(46),a=n(5),s=n(35),u=n(19),c=n(34),l=function(t){function e(e,n,r){var i=t.call(this)||this;switch(i.syncErrorValue=null,i.syncErrorThrown=!1,i.syncErrorThrowable=!1,i.isStopped=!1,arguments.length){case 0:i.destination=o.a;break;case 1:if(!e){i.destination=o.a;break}if("object"==typeof e){if(h(e)){var a=e[s.a]();i.syncErrorThrowable=a.syncErrorThrowable,i.destination=a,a.add(i)}else i.syncErrorThrowable=!0,i.destination=new f(i,e);break}default:i.syncErrorThrowable=!0,i.destination=new f(i,e,n,r)}return i}return r.a(e,t),e.prototype[s.a]=function(){return this},e.create=function(t,n,r){var i=new e(t,n,r);return i.syncErrorThrowable=!1,i},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parent,e=this._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=t,this._parents=e,this},e}(a.a),f=function(t){function e(e,n,r,a){var s,u=t.call(this)||this;u._parentSubscriber=e;var c=u;return Object(i.a)(n)?s=n:n&&(s=n.next,r=n.error,a=n.complete,n!==o.a&&(c=Object.create(n),Object(i.a)(c.unsubscribe)&&u.add(c.unsubscribe.bind(c)),c.unsubscribe=u.unsubscribe.bind(u))),u._context=c,u._next=s,u._error=r,u._complete=a,u}return r.a(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;u.a.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,n=u.a.useDeprecatedSynchronousErrorHandling;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):Object(c.a)(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;Object(c.a)(t)}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};u.a.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),u.a.useDeprecatedSynchronousErrorHandling)throw t;Object(c.a)(t)}},e.prototype.__tryOrSetError=function(t,e,n){if(!u.a.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(e){return u.a.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):(Object(c.a)(e),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(l);function h(t){return t instanceof l||"syncErrorThrowable"in t&&t[s.a]}},function(t,e,n){"use strict";e.__esModule=!0,e.default=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}},function(t,e,n){"use strict";e.__esModule=!0;var r=o(n(133)),i=o(n(135));function o(t){return t&&t.__esModule?t:{default:t}}e.default=function(){return function(t,e){if(Array.isArray(t))return t;if((0,r.default)(Object(t)))return function(t,e){var n=[],r=!0,o=!1,a=void 0;try{for(var s,u=(0,i.default)(t);!(r=(s=u.next()).done)&&(n.push(s.value),!e||n.length!==e);r=!0);}catch(t){o=!0,a=t}finally{try{!r&&u.return&&u.return()}finally{if(o)throw a}}return n}(t,e);throw new TypeError("Invalid attempt to destructure non-iterable instance")}}()},function(t,e,n){"use strict";n.d(e,"a",function(){return c});var r=n(9),i=n(58),o=n(29),a=n(47),s=n(24),u=n(38),c=function(){function t(t){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}return t.prototype.unsubscribe=function(){var t,e=!1;if(!this.closed){var n=this._parent,c=this._parents,f=this._unsubscribe,h=this._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var d=-1,p=c?c.length:0;n;)n.remove(this),n=++d<p&&c[d]||null;if(Object(o.a)(f))Object(a.a)(f).call(this)===s.a&&(e=!0,t=t||(s.a.e instanceof u.a?l(s.a.e.errors):[s.a.e]));if(Object(r.a)(h))for(d=-1,p=h.length;++d<p;){var _=h[d];if(Object(i.a)(_))if(Object(a.a)(_.unsubscribe).call(_)===s.a){e=!0,t=t||[];var E=s.a.e;E instanceof u.a?t=t.concat(l(E.errors)):t.push(E)}}if(e)throw new u.a(t)}},t.prototype.add=function(e){if(!e||e===t.EMPTY)return t.EMPTY;if(e===this)return this;var n=e;switch(typeof e){case"function":n=new t(e);case"object":if(n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if("function"!=typeof n._addParent){var r=n;(n=new t)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}return(this._subscriptions||(this._subscriptions=[])).push(n),n._addParent(this),n},t.prototype.remove=function(t){var e=this._subscriptions;if(e){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}},t.prototype._addParent=function(t){var e=this._parent,n=this._parents;e&&e!==t?n?-1===n.indexOf(t)&&n.push(t):this._parents=[t]:this._parent=t},t.EMPTY=function(t){return t.closed=!0,t}(new t),t}();function l(t){return t.reduce(function(t,e){return t.concat(e instanceof u.a?e.errors:e)},[])}},,function(t,e,n){t.exports={default:n(125),__esModule:!0}},function(t,e,n){"use strict";n.d(e,"a",function(){return i}),n.d(e,"b",function(){return o});var r=n(1),i=new r.a(function(t){return t.complete()});function o(t){return t?function(t){return new r.a(function(e){return t.schedule(function(){return e.complete()})})}(t):i}},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r=Array.isArray||function(t){return t&&"number"==typeof t.length}},function(t,e,n){"use strict";function r(t){return t&&"function"==typeof t.schedule}n.d(e,"a",function(){return r})},function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n(0),i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.a(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(e)},e.prototype.notifyError=function(t,e){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.complete()},e}(n(2).a)},function(t,e,n){t.exports={default:n(126),__esModule:!0}},function(t,e,n){"use strict";var r=n(0),i=function(t){function e(e,n,r){var i=t.call(this)||this;return i.parent=e,i.outerValue=n,i.outerIndex=r,i.index=0,i}return r.a(e,t),e.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},e.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},e}(n(2).a),o=n(63);function a(t,e,n,r){var a=new i(t,n,r);return Object(o.a)(e)(a)}n.d(e,"a",function(){return a})},function(t,e,n){"use strict";e.__esModule=!0;var r=function(t){return t&&t.__esModule?t:{default:t}}(n(117));e.default=function(t){if(Array.isArray(t)){for(var e=0,n=Array(t.length);e<t.length;e++)n[e]=t[e];return n}return(0,r.default)(t)}},function(t,e,n){"use strict";n.r(e);var r=n(1),i=n(54),o=n(0),a=n(2),s=n(5),u=n(16);a.a;var c=function(t){function e(e,n,r){var i=t.call(this,n)||this;return i.key=e,i.group=n,i.parent=r,i}return o.a(e,t),e.prototype._next=function(t){this.complete()},e.prototype._unsubscribe=function(){var t=this.parent,e=this.key;this.key=this.parent=null,t&&t.removeGroup(e)},e}(a.a),l=function(t){function e(e,n,r){var i=t.call(this)||this;return i.key=e,i.groupSubject=n,i.refCountSubscription=r,i}return o.a(e,t),e.prototype._subscribe=function(t){var e=new s.a,n=this.refCountSubscription,r=this.groupSubject;return n&&!n.closed&&e.add(new f(n)),e.add(r.subscribe(t)),e},e}(r.a),f=function(t){function e(e){var n=t.call(this)||this;return n.parent=e,e.count++,n}return o.a(e,t),e.prototype.unsubscribe=function(){var e=this.parent;e.closed||this.closed||(t.prototype.unsubscribe.call(this),e.count-=1,0===e.count&&e.attemptedToUnsubscribe&&e.unsubscribe())},e}(s.a),h=n(27),d=n(79),p=n(31),_=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return o.a(e,t),e.prototype.schedule=function(e,n){return void 0===n&&(n=0),n>0?t.prototype.schedule.call(this,e,n):(this.delay=n,this.state=e,this.scheduler.flush(this),this)},e.prototype.execute=function(e,n){return n>0||this.closed?t.prototype.execute.call(this,e,n):this._execute(e,n)},e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0?t.prototype.requestAsyncId.call(this,e,n,r):e.flush(this)},e}(p.a),E=n(30),y=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o.a(e,t),e}(E.a))(_),b=n(8),g=n(41);function v(t,e){return e?new r.a(function(n){return e.schedule(m,0,{error:t,subscriber:n})}):new r.a(function(e){return e.error(t)})}function m(t){var e=t.error;t.subscriber.error(e)}var S=function(){function t(t,e,n){this.kind=t,this.value=e,this.error=n,this.hasValue="N"===t}return t.prototype.observe=function(t){switch(this.kind){case"N":return t.next&&t.next(this.value);case"E":return t.error&&t.error(this.error);case"C":return t.complete&&t.complete()}},t.prototype.do=function(t,e,n){switch(this.kind){case"N":return t&&t(this.value);case"E":return e&&e(this.error);case"C":return n&&n()}},t.prototype.accept=function(t,e,n){return t&&"function"==typeof t.next?this.observe(t):this.do(t,e,n)},t.prototype.toObservable=function(){switch(this.kind){case"N":return Object(g.a)(this.value);case"E":return v(this.error);case"C":return Object(b.b)()}throw new Error("unexpected notification kind value")},t.createNext=function(e){return void 0!==e?new t("N",e):t.undefinedValueNotification},t.createError=function(e){return new t("E",void 0,e)},t.createComplete=function(){return t.completeNotification},t.completeNotification=new t("C"),t.undefinedValueNotification=new t("N",void 0),t}();var T=function(t){function e(e,n,r){void 0===r&&(r=0);var i=t.call(this,e)||this;return i.scheduler=n,i.delay=r,i}return o.a(e,t),e.dispatch=function(t){var e=t.notification,n=t.destination;e.observe(n),this.unsubscribe()},e.prototype.scheduleMessage=function(t){this.add(this.scheduler.schedule(e.dispatch,this.delay,new A(t,this.destination)))},e.prototype._next=function(t){this.scheduleMessage(S.createNext(t))},e.prototype._error=function(t){this.scheduleMessage(S.createError(t))},e.prototype._complete=function(){this.scheduleMessage(S.createComplete())},e}(a.a),A=function(){return function(t,e){this.notification=t,this.destination=e}}(),O=n(28),R=n(60),I=function(t){function e(e,n,r){void 0===e&&(e=Number.POSITIVE_INFINITY),void 0===n&&(n=Number.POSITIVE_INFINITY);var i=t.call(this)||this;return i.scheduler=r,i._events=[],i._infiniteTimeWindow=!1,i._bufferSize=e<1?1:e,i._windowTime=n<1?1:n,n===Number.POSITIVE_INFINITY?(i._infiniteTimeWindow=!0,i.next=i.nextInfiniteTimeWindow):i.next=i.nextTimeWindow,i}return o.a(e,t),e.prototype.nextInfiniteTimeWindow=function(e){var n=this._events;n.push(e),n.length>this._bufferSize&&n.shift(),t.prototype.next.call(this,e)},e.prototype.nextTimeWindow=function(e){this._events.push(new N(this._getNow(),e)),this._trimBufferThenGetEvents(),t.prototype.next.call(this,e)},e.prototype._subscribe=function(t){var e,n=this._infiniteTimeWindow,r=n?this._events:this._trimBufferThenGetEvents(),i=this.scheduler,o=r.length;if(this.closed)throw new O.a;if(this.isStopped||this.hasError?e=s.a.EMPTY:(this.observers.push(t),e=new R.a(this,t)),i&&t.add(t=new T(t,i)),n)for(var a=0;a<o&&!t.closed;a++)t.next(r[a]);else for(a=0;a<o&&!t.closed;a++)t.next(r[a].value);return this.hasError?t.error(this.thrownError):this.isStopped&&t.complete(),e},e.prototype._getNow=function(){return(this.scheduler||y).now()},e.prototype._trimBufferThenGetEvents=function(){for(var t=this._getNow(),e=this._bufferSize,n=this._windowTime,r=this._events,i=r.length,o=0;o<i&&!(t-r[o].time<n);)o++;return i>e&&(o=Math.max(o,i-e)),o>0&&r.splice(0,o),r},e}(u.a),N=function(){return function(t,e){this.time=t,this.value=e}}(),w=function(t){function e(){var e=null!==t&&t.apply(this,arguments)||this;return e.value=null,e.hasNext=!1,e.hasCompleted=!1,e}return o.a(e,t),e.prototype._subscribe=function(e){return this.hasError?(e.error(this.thrownError),s.a.EMPTY):this.hasCompleted&&this.hasNext?(e.next(this.value),e.complete(),s.a.EMPTY):t.prototype._subscribe.call(this,e)},e.prototype.next=function(t){this.hasCompleted||(this.value=t,this.hasNext=!0)},e.prototype.error=function(e){this.hasCompleted||t.prototype.error.call(this,e)},e.prototype.complete=function(){this.hasCompleted=!0,this.hasNext&&t.prototype.next.call(this,this.value),t.prototype.complete.call(this)},e}(u.a),C=1,P={};var L=function(t){var e=C++;return P[e]=t,Promise.resolve().then(function(){return function(t){var e=P[t];e&&e()}(e)}),e},M=function(t){delete P[t]},U=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return o.a(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e.scheduled||(e.scheduled=L(e.flush.bind(e,null))))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);0===e.actions.length&&(M(n),e.scheduled=void 0)},e}(p.a),x=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o.a(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,r=-1,i=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++r<i&&(t=n.shift()));if(this.active=!1,e){for(;++r<i&&(t=n.shift());)t.unsubscribe();throw e}},e}(E.a))(U),D=n(32),j=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r}return o.a(e,t),e.prototype.requestAsyncId=function(e,n,r){return void 0===r&&(r=0),null!==r&&r>0?t.prototype.requestAsyncId.call(this,e,n,r):(e.actions.push(this),e.scheduled||(e.scheduled=requestAnimationFrame(function(){return e.flush(null)})))},e.prototype.recycleAsyncId=function(e,n,r){if(void 0===r&&(r=0),null!==r&&r>0||null===r&&this.delay>0)return t.prototype.recycleAsyncId.call(this,e,n,r);0===e.actions.length&&(cancelAnimationFrame(n),e.scheduled=void 0)},e}(p.a),F=new(function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return o.a(e,t),e.prototype.flush=function(t){this.active=!0,this.scheduled=void 0;var e,n=this.actions,r=-1,i=n.length;t=t||n.shift();do{if(e=t.execute(t.state,t.delay))break}while(++r<i&&(t=n.shift()));if(this.active=!1,e){for(;++r<i&&(t=n.shift());)t.unsubscribe();throw e}},e}(E.a))(j),V=function(t){function e(e,n){void 0===e&&(e=k),void 0===n&&(n=Number.POSITIVE_INFINITY);var r=t.call(this,e,function(){return r.frame})||this;return r.maxFrames=n,r.frame=0,r.index=-1,r}return o.a(e,t),e.prototype.flush=function(){for(var t,e,n=this.actions,r=this.maxFrames;(e=n.shift())&&(this.frame=e.delay)<=r&&!(t=e.execute(e.state,e.delay)););if(t){for(;e=n.shift();)e.unsubscribe();throw t}},e.frameTimeFactor=10,e}(E.a),k=function(t){function e(e,n,r){void 0===r&&(r=e.index+=1);var i=t.call(this,e,n)||this;return i.scheduler=e,i.work=n,i.index=r,i.active=!0,i.index=e.index=r,i}return o.a(e,t),e.prototype.schedule=function(n,r){if(void 0===r&&(r=0),!this.id)return t.prototype.schedule.call(this,n,r);this.active=!1;var i=new e(this.scheduler,this.work);return this.add(i),i.schedule(n,r)},e.prototype.requestAsyncId=function(t,n,r){void 0===r&&(r=0),this.delay=t.frame+r;var i=t.actions;return i.push(this),i.sort(e.sortActions),!0},e.prototype.recycleAsyncId=function(t,e,n){void 0===n&&(n=0)},e.prototype._execute=function(e,n){if(!0===this.active)return t.prototype._execute.call(this,e,n)},e.sortActions=function(t,e){return t.delay===e.delay?t.index===e.index?0:t.index>e.index?1:-1:t.delay>e.delay?1:-1},e}(p.a),Y=n(49),K=n(53),B=n(22),G=n(33);function H(t){return!!t&&(t instanceof r.a||"function"==typeof t.lift&&"function"==typeof t.subscribe)}var Q=n(55),W=n(42),q=n(38),$=function(t){function e(){var n=t.call(this,"Timeout has occurred")||this;return n.name="TimeoutError",Object.setPrototypeOf(n,e.prototype),n}return o.a(e,t),e}(Error),z=n(17),J=n(9),X=n(10);function Z(t,e,n){if(e){if(!Object(X.a)(e))return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return Z(t,n).apply(void 0,r).pipe(Object(z.a)(function(t){return Object(J.a)(t)?e.apply(void 0,t):e(t)}))};n=e}return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var o,a=this,s={context:a,subject:o,callbackFunc:t,scheduler:n};return new r.a(function(r){if(n){var i={args:e,subscriber:r,params:s};return n.schedule(tt,0,i)}if(!o){o=new w;try{t.apply(a,e.concat([function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];o.next(t.length<=1?t[0]:t),o.complete()}]))}catch(t){o.error(t)}}return o.subscribe(r)})}}function tt(t){var e=this,n=t.args,r=t.subscriber,i=t.params,o=i.callbackFunc,a=i.context,s=i.scheduler,u=i.subject;if(!u){u=i.subject=new w;try{o.apply(a,n.concat([function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.length<=1?t[0]:t;e.add(s.schedule(et,0,{value:r,subject:u}))}]))}catch(t){u.error(t)}}this.add(u.subscribe(r))}function et(t){var e=t.value,n=t.subject;n.next(e),n.complete()}function nt(t,e,n){if(e){if(!Object(X.a)(e))return function(){for(var r=[],i=0;i<arguments.length;i++)r[i]=arguments[i];return nt(t,n).apply(void 0,r).pipe(Object(z.a)(function(t){return Object(J.a)(t)?e.apply(void 0,t):e(t)}))};n=e}return function(){for(var e=[],i=0;i<arguments.length;i++)e[i]=arguments[i];var o={subject:void 0,args:e,callbackFunc:t,scheduler:n,context:this};return new r.a(function(r){var i=o.context,a=o.subject;if(n)return n.schedule(rt,0,{params:o,subscriber:r,context:i});if(!a){a=o.subject=new w;try{t.apply(i,e.concat([function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.shift();n?a.error(n):(a.next(t.length<=1?t[0]:t),a.complete())}]))}catch(t){a.error(t)}}return a.subscribe(r)})}}function rt(t){var e=this,n=t.params,r=t.subscriber,i=t.context,o=n.callbackFunc,a=n.args,s=n.scheduler,u=n.subject;if(!u){u=n.subject=new w;try{o.apply(i,a.concat([function(){for(var t=[],n=0;n<arguments.length;n++)t[n]=arguments[n];var r=t.shift();if(r)e.add(s.schedule(ot,0,{err:r,subject:u}));else{var i=t.length<=1?t[0]:t;e.add(s.schedule(it,0,{value:i,subject:u}))}}]))}catch(t){this.add(s.schedule(ot,0,{err:t,subject:u}))}}this.add(u.subscribe(r))}function it(t){var e=t.value,n=t.subject;n.next(e),n.complete()}function ot(t){var e=t.err;t.subject.error(e)}var at=n(80),st=n(45),ut=n(18);function ct(t){return new r.a(function(e){var n;try{n=t()}catch(t){return void e.error(t)}return(n?Object(ut.a)(n):Object(b.b)()).subscribe(e)})}var lt=n(13),ft=n(11);function ht(){for(var t,e=[],n=0;n<arguments.length;n++)e[n]=arguments[n];return"function"==typeof e[e.length-1]&&(t=e.pop()),1===e.length&&Object(J.a)(e[0])&&(e=e[0]),0===e.length?b.a:t?ht(e).pipe(Object(z.a)(function(e){return t.apply(void 0,e)})):new r.a(function(t){return new dt(t,e)})}var dt=function(t){function e(e,n){var r=t.call(this,e)||this;r.sources=n,r.completed=0,r.haveValues=0;var i=n.length;r.values=new Array(i);for(var o=0;o<i;o++){var a=n[o],s=Object(lt.a)(r,a,null,o);s&&r.add(s)}return r}return o.a(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.values[n]=e,i._hasValue||(i._hasValue=!0,this.haveValues++)},e.prototype.notifyComplete=function(t){var e=this.destination,n=this.haveValues,r=this.values,i=r.length;t._hasValue?(this.completed++,this.completed===i&&(n===i&&e.next(r),e.complete())):e.complete()},e}(ft.a),pt=n(29);Object.prototype.toString;function _t(t,e,n,i){return Object(pt.a)(n)&&(i=n,n=void 0),i?_t(t,e,n).pipe(Object(z.a)(function(t){return Object(J.a)(t)?i.apply(void 0,t):i(t)})):new r.a(function(r){!function t(e,n,r,i,o){var a;if(function(t){return t&&"function"==typeof t.addEventListener&&"function"==typeof t.removeEventListener}(e)){var s=e;e.addEventListener(n,r,o),a=function(){return s.removeEventListener(n,r,o)}}else if(function(t){return t&&"function"==typeof t.on&&"function"==typeof t.off}(e)){var u=e;e.on(n,r),a=function(){return u.off(n,r)}}else if(function(t){return t&&"function"==typeof t.addListener&&"function"==typeof t.removeListener}(e)){var c=e;e.addListener(n,r),a=function(){return c.removeListener(n,r)}}else{if(!e||!e.length)throw new TypeError("Invalid event target");for(var l=0,f=e.length;l<f;l++)t(e[l],n,r,i,o)}i.add(a)}(t,e,function(t){arguments.length>1?r.next(Array.prototype.slice.call(arguments)):r.next(t)},r,n)})}function Et(t,e,n){return n?Et(t,e).pipe(Object(z.a)(function(t){return Object(J.a)(t)?n.apply(void 0,t):n(t)})):new r.a(function(n){var r,i=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return n.next(1===t.length?t[0]:t)};try{r=t(i)}catch(t){return void n.error(t)}if(Object(pt.a)(e))return function(){return e(i,r)}})}function yt(t,e,n,i,o){var a,s;if(1==arguments.length){var u=t;s=u.initialState,e=u.condition,n=u.iterate,a=u.resultSelector||G.a,o=u.scheduler}else void 0===i||Object(X.a)(i)?(s=t,a=G.a,o=i):(s=t,a=i);return new r.a(function(t){var r=s;if(o)return o.schedule(bt,0,{subscriber:t,iterate:n,condition:e,resultSelector:a,state:r});for(;;){if(e){var i=void 0;try{i=e(r)}catch(e){return void t.error(e)}if(!i){t.complete();break}}var u=void 0;try{u=a(r)}catch(e){return void t.error(e)}if(t.next(u),t.closed)break;try{r=n(r)}catch(e){return void t.error(e)}}})}function bt(t){var e=t.subscriber,n=t.condition;if(!e.closed){if(t.needIterate)try{t.state=t.iterate(t.state)}catch(t){return void e.error(t)}else t.needIterate=!0;if(n){var r=void 0;try{r=n(t.state)}catch(t){return void e.error(t)}if(!r)return void e.complete();if(e.closed)return}var i;try{i=t.resultSelector(t.state)}catch(t){return void e.error(t)}if(!e.closed&&(e.next(i),!e.closed))return this.schedule(t)}}function gt(t,e,n){return void 0===e&&(e=b.a),void 0===n&&(n=b.a),ct(function(){return t()?e:n})}var vt=n(81),mt=n(56),St=n(43);function Tt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(0===t.length)return b.a;var n=t[0],i=t.slice(1);return 1===t.length&&Object(J.a)(n)?Tt.apply(void 0,n):new r.a(function(t){var e=function(){return t.add(Tt.apply(void 0,i).subscribe(t))};return Object(ut.a)(n).subscribe({next:function(e){t.next(e)},error:e,complete:e})})}function At(t,e){return e?new r.a(function(n){var r=Object.keys(t),i=new s.a;return i.add(e.schedule(Ot,0,{keys:r,index:0,subscriber:n,subscription:i,obj:t})),i}):new r.a(function(e){for(var n=Object.keys(t),r=0;r<n.length&&!e.closed;r++){var i=n[r];t.hasOwnProperty(i)&&e.next([i,t[i]])}e.complete()})}function Ot(t){var e=t.keys,n=t.index,r=t.subscriber,i=t.subscription,o=t.obj;if(!r.closed)if(n<e.length){var a=e[n];r.next([a,o[a]]),i.add(this.schedule({keys:e,index:n+1,subscriber:r,subscription:i,obj:o}))}else r.complete()}var Rt=n(20);function It(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];if(1===t.length){if(!Object(J.a)(t[0]))return t[0];t=t[0]}return Object(Rt.a)(t,void 0).lift(new Nt)}var Nt=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new wt(t))},t}(),wt=function(t){function e(e){var n=t.call(this,e)||this;return n.hasFirst=!1,n.observables=[],n.subscriptions=[],n}return o.a(e,t),e.prototype._next=function(t){this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{for(var n=0;n<e&&!this.hasFirst;n++){var r=t[n],i=Object(lt.a)(this,r,r,n);this.subscriptions&&this.subscriptions.push(i),this.add(i)}this.observables=null}},e.prototype.notifyNext=function(t,e,n,r,i){if(!this.hasFirst){this.hasFirst=!0;for(var o=0;o<this.subscriptions.length;o++)if(o!==n){var a=this.subscriptions[o];a.unsubscribe(),this.remove(a)}this.subscriptions=null}this.destination.next(e)},e}(ft.a);function Ct(t,e,n){return void 0===t&&(t=0),void 0===e&&(e=0),new r.a(function(r){var i=0,o=t;if(n)return n.schedule(Pt,0,{index:i,count:e,start:t,subscriber:r});for(;;){if(i++>=e){r.complete();break}if(r.next(o++),r.closed)break}})}function Pt(t){var e=t.start,n=t.index,r=t.count,i=t.subscriber;n>=r?i.complete():(i.next(e),i.closed||(t.index=n+1,t.start=e+1,this.schedule(t)))}var Lt=n(50);function Mt(t,e,n){void 0===t&&(t=0);var i=-1;return Object(Lt.a)(e)?i=Number(e)<1?1:Number(e):Object(X.a)(e)&&(n=e),Object(X.a)(n)||(n=D.a),new r.a(function(e){var r=Object(Lt.a)(t)?t:+t-n.now();return n.schedule(Ut,r,{index:0,period:i,subscriber:e})})}function Ut(t){var e=t.index,n=t.period,r=t.subscriber;if(r.next(e),!r.closed){if(-1===n)return r.complete();t.index=e+1,this.schedule(t,n)}}function xt(t,e){return new r.a(function(n){var r,i;try{r=t()}catch(t){return void n.error(t)}try{i=e(r)}catch(t){return void n.error(t)}var o=(i?Object(ut.a)(i):b.a).subscribe(n);return function(){o.unsubscribe(),r&&r.unsubscribe()}})}var Dt=n(82),jt=n(19);n.d(e,"Observable",function(){return r.a}),n.d(e,"ConnectableObservable",function(){return i.a}),n.d(e,"GroupedObservable",function(){return l}),n.d(e,"observable",function(){return h.a}),n.d(e,"Subject",function(){return u.a}),n.d(e,"BehaviorSubject",function(){return d.a}),n.d(e,"ReplaySubject",function(){return I}),n.d(e,"AsyncSubject",function(){return w}),n.d(e,"asapScheduler",function(){return x}),n.d(e,"asyncScheduler",function(){return D.a}),n.d(e,"queueScheduler",function(){return y}),n.d(e,"animationFrameScheduler",function(){return F}),n.d(e,"VirtualTimeScheduler",function(){return V}),n.d(e,"VirtualAction",function(){return k}),n.d(e,"Scheduler",function(){return Y.a}),n.d(e,"Subscription",function(){return s.a}),n.d(e,"Subscriber",function(){return a.a}),n.d(e,"Notification",function(){return S}),n.d(e,"pipe",function(){return K.a}),n.d(e,"noop",function(){return B.a}),n.d(e,"identity",function(){return G.a}),n.d(e,"isObservable",function(){return H}),n.d(e,"ArgumentOutOfRangeError",function(){return Q.a}),n.d(e,"EmptyError",function(){return W.a}),n.d(e,"ObjectUnsubscribedError",function(){return O.a}),n.d(e,"UnsubscriptionError",function(){return q.a}),n.d(e,"TimeoutError",function(){return $}),n.d(e,"bindCallback",function(){return Z}),n.d(e,"bindNodeCallback",function(){return nt}),n.d(e,"combineLatest",function(){return at.a}),n.d(e,"concat",function(){return st.a}),n.d(e,"defer",function(){return ct}),n.d(e,"empty",function(){return b.b}),n.d(e,"forkJoin",function(){return ht}),n.d(e,"from",function(){return ut.a}),n.d(e,"fromEvent",function(){return _t}),n.d(e,"fromEventPattern",function(){return Et}),n.d(e,"generate",function(){return yt}),n.d(e,"iif",function(){return gt}),n.d(e,"interval",function(){return vt.a}),n.d(e,"merge",function(){return mt.a}),n.d(e,"never",function(){return St.b}),n.d(e,"of",function(){return g.a}),n.d(e,"onErrorResumeNext",function(){return Tt}),n.d(e,"pairs",function(){return At}),n.d(e,"race",function(){return It}),n.d(e,"range",function(){return Ct}),n.d(e,"throwError",function(){return v}),n.d(e,"timer",function(){return Mt}),n.d(e,"using",function(){return xt}),n.d(e,"zip",function(){return Dt.a}),n.d(e,"EMPTY",function(){return b.a}),n.d(e,"NEVER",function(){return St.a}),n.d(e,"config",function(){return jt.a})},function(t,e,n){"use strict";n.d(e,"b",function(){return l}),n.d(e,"a",function(){return f});var r=n(0),i=n(1),o=n(2),a=n(5),s=n(28),u=n(60),c=n(35),l=function(t){function e(e){var n=t.call(this,e)||this;return n.destination=e,n}return r.a(e,t),e}(o.a),f=function(t){function e(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return r.a(e,t),e.prototype[c.a]=function(){return new l(this)},e.prototype.lift=function(t){var e=new h(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new s.a;if(!this.isStopped)for(var e=this.observers,n=e.length,r=e.slice(),i=0;i<n;i++)r[i].next(t)},e.prototype.error=function(t){if(this.closed)throw new s.a;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,n=e.length,r=e.slice(),i=0;i<n;i++)r[i].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new s.a;this.isStopped=!0;for(var t=this.observers,e=t.length,n=t.slice(),r=0;r<e;r++)n[r].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(e){if(this.closed)throw new s.a;return t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){if(this.closed)throw new s.a;return this.hasError?(t.error(this.thrownError),a.a.EMPTY):this.isStopped?(t.complete(),a.a.EMPTY):(this.observers.push(t),new u.a(this,t))},e.prototype.asObservable=function(){var t=new i.a;return t.source=this,t},e.create=function(t,e){return new h(t,e)},e}(i.a),h=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return r.a(e,t),e.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},e.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):a.a.EMPTY},e}(f)},function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n(0),i=n(2);function o(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new a(t,e))}}var a=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.project,this.thisArg))},t}(),s=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.project=n,i.count=0,i.thisArg=r||i,i}return r.a(e,t),e.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(i.a)},function(t,e,n){"use strict";var r=n(1),i=n(66),o=n(65),a=n(27);var s=n(26);var u=n(20),c=n(5),l=n(67);var f=n(68);var h=n(64);var d=n(63);function p(t,e){if(!e)return t instanceof r.a?t:new r.a(Object(d.a)(t));if(null!=t){if(function(t){return t&&"function"==typeof t[a.a]}(t))return function(t,e){return e?new r.a(function(n){var r=new c.a;return r.add(e.schedule(function(){var i=t[a.a]();r.add(i.subscribe({next:function(t){r.add(e.schedule(function(){return n.next(t)}))},error:function(t){r.add(e.schedule(function(){return n.error(t)}))},complete:function(){r.add(e.schedule(function(){return n.complete()}))}}))})),r}):new r.a(Object(h.a)(t))}(t,e);if(Object(i.a)(t))return function(t,e){return e?new r.a(function(n){var r=new c.a;return r.add(e.schedule(function(){return t.then(function(t){r.add(e.schedule(function(){n.next(t),r.add(e.schedule(function(){return n.complete()}))}))},function(t){r.add(e.schedule(function(){return n.error(t)}))})})),r}):new r.a(Object(l.a)(t))}(t,e);if(Object(o.a)(t))return Object(u.a)(t,e);if(function(t){return t&&"function"==typeof t[s.a]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return e?new r.a(function(n){var r,i=new c.a;return i.add(function(){r&&"function"==typeof r.return&&r.return()}),i.add(e.schedule(function(){r=t[s.a](),i.add(e.schedule(function(){if(!n.closed){var t,e;try{var i=r.next();t=i.value,e=i.done}catch(t){return void n.error(t)}e?n.complete():(n.next(t),this.schedule())}}))})),i}):new r.a(Object(f.a)(t))}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}n.d(e,"a",function(){return p})},function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=!1,i={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){t&&(new Error).stack;r=t},get useDeprecatedSynchronousErrorHandling(){return r}}},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n(1),i=n(5),o=n(61);function a(t,e){return e?new r.a(function(n){var r=new i.a,o=0;return r.add(e.schedule(function(){o!==t.length?(n.next(t[o++]),n.closed||r.add(this.schedule())):n.complete()})),r}):new r.a(Object(o.a)(t))}},function(t,e,n){var r=n(71),i=n(128),o=n(129),a=r(function(t,e,n){return i(t,o(e,n))});t.exports=a},function(t,e,n){"use strict";function r(){}n.d(e,"a",function(){return r})},function(t,e,n){"use strict";e.__esModule=!0;var r=function(t){return t&&t.__esModule?t:{default:t}}(n(75));e.default=function(t,e,n){return e in t?(0,r.default)(t,e,{value:n,enumerable:!0,configurable:!0,writable:!0}):t[e]=n,t}},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r={e:{}}},function(t,e,n){window,t.exports=function(t,e,n,r,i){return function(t){function e(e){for(var n,i,o=e[0],a=e[1],s=0,c=[];s<o.length;s++)i=o[s],r[i]&&c.push(r[i][0]),r[i]=0;for(n in a)Object.prototype.hasOwnProperty.call(a,n)&&(t[n]=a[n]);for(u&&u(e);c.length;)c.shift()()}var n={},r={5:0};function i(e){if(n[e])return n[e].exports;var r=n[e]={i:e,l:!1,exports:{}};return t[e].call(r.exports,r,r.exports,i),r.l=!0,r.exports}i.e=function(t){var e=[],n=r[t];if(0!==n)if(n)e.push(n[2]);else{var o=new Promise(function(e,i){n=r[t]=[e,i]});e.push(n[2]=o);var a=document.getElementsByTagName("head")[0],s=document.createElement("script");s.charset="utf-8",s.timeout=120,i.nc&&s.setAttribute("nonce",i.nc),s.src=function(t){return i.p+""+({0:"solution.shaka",1:"solution.html5-fairplay",2:"solution.html5",3:"solution.hasplayer",4:"ui.browser"}[t]||t)+".0.7.0-hotfix.js"}(t);var u=setTimeout(function(){c({type:"timeout",target:s})},12e4);function c(e){s.onerror=s.onload=null,clearTimeout(u);var n=r[t];if(0!==n){if(n){var i=e&&("load"===e.type?"missing":e.type),o=e&&e.target&&e.target.src,a=new Error("Loading chunk "+t+" failed.\n("+i+": "+o+")");a.type=i,a.request=o,n[1](a)}r[t]=void 0}}s.onerror=s.onload=c,a.appendChild(s)}return Promise.all(e)},i.m=t,i.c=n,i.d=function(t,e,n){i.o(t,e)||Object.defineProperty(t,e,{configurable:!1,enumerable:!0,get:n})},i.r=function(t){Object.defineProperty(t,"__esModule",{value:!0})},i.n=function(t){var e=t&&t.__esModule?function(){return t.default}:function(){return t};return i.d(e,"a",e),e},i.o=function(t,e){return Object.prototype.hasOwnProperty.call(t,e)},i.p="",i.oe=function(t){throw console.error(t),t};var o=window.webpackJsonpdaznPlayer=window.webpackJsonpdaznPlayer||[],a=o.push.bind(o);o.push=e,o=o.slice();for(var s=0;s<o.length;s++)e(o[s]);var u=a;return i(i.s=69)}([function(t,e,n){"use strict";n.d(e,"a",function(){return i});
/*! *****************************************************************************
Copyright (c) Microsoft Corporation. All rights reserved.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use
this file except in compliance with the License. You may obtain a copy of the
License at http://www.apache.org/licenses/LICENSE-2.0

THIS CODE IS PROVIDED ON AN *AS IS* BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
KIND, EITHER EXPRESS OR IMPLIED, INCLUDING WITHOUT LIMITATION ANY IMPLIED
WARRANTIES OR CONDITIONS OF TITLE, FITNESS FOR A PARTICULAR PURPOSE,
MERCHANTABLITY OR NON-INFRINGEMENT.

See the Apache Version 2.0 License for specific language governing permissions
and limitations under the License.
***************************************************************************** */
var r=Object.setPrototypeOf||{__proto__:[]}instanceof Array&&function(t,e){t.__proto__=e}||function(t,e){for(var n in e)e.hasOwnProperty(n)&&(t[n]=e[n])};function i(t,e){function n(){this.constructor=t}r(t,e),t.prototype=null===e?Object.create(e):(n.prototype=e.prototype,new n)}Object.assign},function(t,e,n){"use strict";var r;!function(t){t.NONE="NONE",t.CAPTIONS_MENU_BUTTON_TAP="CAPTIONS_MENU_BUTTON_TAP",t.CAPTIONS_OPTION_TAP="CAPTIONS_OPTION_TAP",t.FAST_FORWARD_TAP="FAST_FORWARD_TAP",t.FULLSCREEN_TAP="FULLSCREEN_TAP",t.PLAY_PAUSE_TAP="PLAY_PAUSE_TAP",t.REWIND_TAP="REWIND_TAP",t.FRAME_TAP="FRAME_TAP",t.FRAME_MOUSE_ENTER="FRAME_MOUSE_ENTER",t.FRAME_MOUSE_LEAVE="FRAME_MOUSE_LEAVE",t.FRAME_MOUSE_MOVE="FRAME_MOUSE_MOVE",t.FRAME_BLUR="FRAME_BLUR",t.FRAME_FOCUS="FRAME_FOCUS",t.SEEK_TO_LIVE_EDGE_TAP="SEEK_TO_LIVE_EDGE_TAP",t.SETTINGS_CLOSE_TAP="SETTINGS_CLOSE_TAP",t.TIMECODE_TAP="TIMECODE_TAP",t.TIMELINE_INSPECT="TIMELINE_INSPECT",t.TIMELINE_SCRUB="TIMELINE_SCRUB",t.TIMELINE_TAP="TIMELINE_TAP",t.VOLUME_SLIDER_TAP="VOLUME_SLIDER_TAP",t.VOLUME_SLIDER_DRAG="VOLUME_SLIDER_DRAG",t.VOLUME_SLIDER_DRAG_END="VOLUME_SLIDER_DRAG_END",t.VOLUME_TAP="VOLUME_TAP"}(r||(r={})),e.a=r},function(t,e,n){"use strict";var r;!function(t){t.BUFFERING="BUFFERING",t.ENDED="ENDED",t.ERRORED="ERRORED",t.UNLOADED="UNLOADED",t.A_LOADING="A_LOADING",t.B_LOADING="B_LOADING",t.LOADED="LOADED",t.PAUSED="PAUSED",t.PLAYING="PLAYING"}(r||(r={})),e.a=r},function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n(0),i=n(8);function o(t,e){return function(n){return n.lift(new a(t,e))}}var a=function(){function t(t,e){this.predicate=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.predicate,this.thisArg))},t}(),s=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.thisArg=r,i.count=0,i}return r.a(e,t),e.prototype._next=function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}e&&this.destination.next(t)},e}(i.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n(0),i=n(8);function o(t,e){return function(n){if("function"!=typeof t)throw new TypeError("argument is not a function. Are you looking for `mapTo()`?");return n.lift(new a(t,e))}}var a=function(){function t(t,e){this.project=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new s(t,this.project,this.thisArg))},t}(),s=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.project=n,i.count=0,i.thisArg=r||i,i}return r.a(e,t),e.prototype._next=function(t){var e;try{e=this.project.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(i.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n(23),i=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},o=new(function(){function t(){this.enable="production"===r.a.DEVELOPMENT,this.log=this.out.bind(this,"log"),this.error=this.out.bind(this,"error")}return t.prototype.out=function(t){for(var e=[],n=1;n<arguments.length;n++)e[n-1]=arguments[n];this.enable&&console[t].apply(console,function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(i(arguments[e]));return t}(e))},t}());window._logger=o},function(e,n){e.exports=t},function(t,e,n){var r,i;/*! (C) 2016 Conviva, Inc. All rights reserved. Confidential and proprietary. */void 0===(i="function"==typeof(r=function(){var t={};return function(){"use strict";var e={};!function(){var n=t.Client=function(e,a){var u=this;this.defaultGatewayURLError=!1,this._logger=null,this._sessionFactory=null,this._systemFactory=null,this._globalSessionKey=-1,this._settings=null,this._systemSettings=null,this._exceptionCatcher=null,this._config=null,this._id=-1,this._released=!1,function(t,e){if(!(t instanceof r))throw new Error("clientSettings parameter should be an instance of ClientSettings.");if(!(e instanceof o))throw new Error("systemFactory parameter should be an instance of SystemFactory.");(t.gatewayUrl==r._httpsProtocol+r.defaultProductionGatewayDNS||t.gatewayUrl==r._httpProtocol+r.defaultProductionGatewayDNS)&&(this.defaultGatewayURLError=!0),this._settings=t.clone(),this._systemFactory=e,this._systemFactory.configure("SDK",this._settings),this._exceptionCatcher=this._systemFactory.buildExceptionCatcher(),this._exceptionCatcher.runProtected("Client.init",function(){u._id=P.uinteger32(),u._logger=u._systemFactory.buildLogger(),u._logger.setModuleName("Client"),u.defaultGatewayURLError&&u._logger.info("Gateway URL should not be set to https://cws.conviva.com or http://cws.conviva.com, therefore this call is ignored"),u._logger.info("init(): url="+u._settings.gatewayUrl+" customerKey="+u._settings.customerKey),u._config=u._systemFactory.buildConfig(),u._config.load(),u._sessionFactory=u._systemFactory.buildSessionFactory(u,u._settings,u._config),u._logger.info("init(): done.")},function(t){throw new Error("Client constructor failed: "+t.message)})}.apply(this,arguments),this.release=function(){this._released||this._exceptionCatcher.runProtected("Client.release",function(){u._logger.info("release()"),u._sessionFactory.cleanup(),u._sessionFactory=null,u._globalSessionKey=-1,u._logger=null,u._id=-1,u._exceptionCatcher=null,u._settings=null,u._systemSettings=null,u._systemFactory=null,u._released=!0})},this.createSession=function(t){var e=n.NO_SESSION_KEY;return this._released?e:null==t||t instanceof i?(this._exceptionCatcher.runProtected("Client.createSession",function(){e=u._sessionFactory.makeVideoSession(t,v.SESSION_TYPE.VIDEO)}),e):(u._logger.error("createSession(): expecting an instance of ContentMetadata for contentMetadata parameter"),e)},this.createAdSession=function(t,e){var r=n.NO_SESSION_KEY;return this._released?r:null==e||e instanceof i?(this._exceptionCatcher.runProtected("Client.createAdSession",function(){var n=u._sessionFactory.getVideoSession(t);null!=n&&((null==e.applicationName||null==e.viewerId)&&(null==e.viewerId&&null!=n._contentMetadata.viewerId&&(e.viewerId=n._contentMetadata.viewerId),null==e.applicationName&&null!=n._contentMetadata.applicationName&&(e.applicationName=n._contentMetadata.applicationName)),e.custom["c3.csid"]=N.ToString(n._id)),r=u._sessionFactory.makeVideoSession(e,v.SESSION_TYPE.AD)}),r):(u._logger.error("createAdSession(): expecting an instance of ContentMetadata for adMetadata parameter"),r)},this.reportError=function(e,n,r){return this._released?void 0:N.isValidString(n)?r!==t.Client.ErrorSeverity.FATAL&&r!==t.Client.ErrorSeverity.WARNING?void this._logger.error("reportError(): invalid error severity: "+r):void this._exceptionCatcher.runProtected("Client.reportError",function(){var t=u._sessionFactory.getVideoSession(e);null!=t&&t.reportError(n,r)}):void this._logger.error("reportError(): invalid error message string: "+n)},this.updateContentMetadata=function(t,e){return this._released?void 0:e instanceof i?void this._exceptionCatcher.runProtected("Client.updateContentMetadata",function(){var n=u._sessionFactory.getVideoSession(t);if(null!=n){var r=e.clone();n.updateContentMetadata(r)}}):void u._logger.error("updateContentMetadata(): expecting an instance of ContentMetadata for contentMetadata parameter")},this.detachPlayer=function(t){this._released||this._exceptionCatcher.runProtected("Client.detachPlayer",function(){var e=u._sessionFactory.getVideoSession(t);null!=e&&e.detachPlayer()})},this.attachPlayer=function(t,e){return this._released?void 0:e instanceof s?void this._exceptionCatcher.runProtected("Client.attachPlayer",function(){var n=u._sessionFactory.getVideoSession(t);null!=n&&n.attachPlayer(e)}):void u._logger.error("attachPlayer(): expecting an instance of PlayerStateManager for playerStateManager parameter")},this.contentPreload=function(t){this._released||this._exceptionCatcher.runProtected("Client.contentPreload",function(){var e=u._sessionFactory.getVideoSession(t);null!=e&&e.contentPreload()})},this.contentStart=function(t){this._released||this._exceptionCatcher.runProtected("Client.contentStart",function(){var e=u._sessionFactory.getVideoSession(t);null!=e&&e.contentStart()})},this.sendCustomEvent=function(t,e,r){return this._released?void 0:N.isValidString(e)?void this._exceptionCatcher.runProtected("Client.sendCustomEvent",function(){if(t==n.NO_SESSION_KEY){if(u._globalSessionKey<0){var o=new i;u._globalSessionKey=u._sessionFactory.makeGlobalSession(o,null)}t=u._globalSessionKey}var a=N.sanitizeStringToStringObject(r),s=u._sessionFactory.getSession(t);null!=s&&s.sendCustomEvent(e,a)}):void u._logger.error("sendCustomEvent(): eventName parameter must be a valid string.")},this.adStart=function(t,e,r,i){return this._released?void 0:e!==n.AdStream.CONTENT&&e!==n.AdStream.SEPARATE?void this._logger.error("adStart(): ignored, invalid value for adStream parameter: "+e):r!==n.AdPlayer.CONTENT&&r!==n.AdPlayer.SEPARATE?void this._logger.error("adStart(): ignored, invalid value for adPlayer parameter: "+r):i!==n.AdPosition.BUMPER&&i!==n.AdPosition.PREROLL&&i!==n.AdPosition.MIDROLL&&i!==n.AdPosition.POSTROLL?void this._logger.error("adStart(): ignored, invalid value for adPosition parameter: "+i):void this._exceptionCatcher.runProtected("Client.adStart",function(){var n=u._sessionFactory.getVideoSession(t);null!=n&&n.adStart(e,r,i)})},this.adEnd=function(t){this._released||this._exceptionCatcher.runProtected("Client.adEnd",function(){var e=u._sessionFactory.getVideoSession(t);null!=e&&e.adEnd()})},this.cleanupSession=function(t){return this._released?void 0:t===n.NO_SESSION_KEY?void this._logger.warning("cleanupSession(): ignored, can't cleanup Client.NO_SESSION_KEY"):void this._exceptionCatcher.runProtected("Client.cleanupSession",function(){var e=u._sessionFactory.getVideoSession(t);null!=e&&u._sessionFactory.cleanupSession(t)})},this.getAttachedPlayer=function(t){var e=null;return this._released?e:t===n.NO_SESSION_KEY?(this._logger.warning("getAttachedPlayer(): ignored for Client.NO_SESSION_KEY"),e):(this._exceptionCatcher.runProtected("Client.getAttachedPlayer",function(){var n=u._sessionFactory.getVideoSession(t);null!=n&&(e=n.getPlayerStateManager())}),e)},this.isPlayerAttached=function(t){return!this._released&&null!==this.getAttachedPlayer(t)},this.getPlayerStateManager=function(){if(this._released)throw new Error("This instance of Conviva.Client has been released.");return new s(this._systemFactory)},this.releasePlayerStateManager=function(t){if(this._released)throw new Error("This instance of Conviva.Client has been released.");this._exceptionCatcher.runProtected("Client.releasePlayerStateManager",function(){t instanceof s&&t.release()})},this.getSettings=function(){return this._settings},this.getId=function(){return this._id}};n.version="2.141.0.35966",n.NO_SESSION_KEY=-2,n.AdPosition={BUMPER:"BUMPER",PREROLL:"PREROLL",MIDROLL:"MIDROLL",POSTROLL:"POSTROLL"},n.AdStream={CONTENT:"CONTENT",SEPARATE:"SEPARATE"},n.AdPlayer={CONTENT:"CONTENT",SEPARATE:"SEPARATE"},n.ErrorSeverity={FATAL:0,WARNING:1},n.DeviceType={DESKTOP:"DESKTOP",CONSOLE:"Console",SETTOP:"Settop",MOBILE:"Mobile",TABLET:"Tablet",SMARTTV:"SmartTV",UNKNOWN:"Unknown"},n.AdTechnology={CLIENT_SIDE:"Client Side",SERVER_SIDE:"Server Side"},n.AdType={BLACKOUT_SLATE:"Blackout slate",TECHNICAL_DIFFICULTIES_SLATE:"Technical Difficulties slate",COMMERCIAL_SLATE:"Commercial Break slate",OTHER_SLATE:"Other slate",VPAID:"VPAID",REGULAR:"Regular Ad"},n.AdServingType={INLINE:"Inline",WRAPPER:"Wrapper"};var r=t.ClientSettings=function(t){var e=this;this._customerKey=null,N.defGet(this,"customerKey",function(){return this._customerKey}),N.defSet(this,"customerKey",function(t){N.isValidString(t)&&(this._customerKey=t)}),this._heartbeatInterval=r.defaultProductionHeartbeatInterval,N.defGet(this,"heartbeatInterval",function(){return this._heartbeatInterval}),N.defSet(this,"heartbeatInterval",function(t){if("number"==typeof t){var e=N.NumberToUnsignedInt(t);e===t&&(this._heartbeatInterval=e)}}),this._gatewayUrl=null,N.defGet(this,"gatewayUrl",function(){return this._gatewayUrl}),N.defSet(this,"gatewayUrl",function(t){N.isValidString(t)&&(this._gatewayUrl=t)}),function(t){if(!N.isValidString(t))throw new Error("customerKey must be valid");this.customerKey=t}.apply(this,arguments),this.equals=function(t){return this.customerKey===t.customerKey&&this.gatewayUrl===t.gatewayUrl&&this.heartbeatInterval===t.heartbeatInterval},this.clone=function(){var t=new r(this.customerKey);return t.gatewayUrl=function(t){if(N.isValidString(t)){var n=t.split("://");if("cws.conviva.com"!=n[1]&&("https"==n[0]||"http"==n[0]))return t}return"https://"+e.customerKey+"."+r.defaultProductionGatewayDNS}(this.gatewayUrl),t.heartbeatInterval=this.heartbeatInterval,t}};r.defaultDevelopmentGatewayUrl="https://conviva.testonly.conviva.com",r.defaultProductionGatewayUrl="https://cws.conviva.com",r.defaultProductionGatewayDNS="cws.conviva.com",r.defaultDevelopmentGatewayDNS="conviva.testonly.conviva.com",r._httpsProtocol="https://",r._httpProtocol="http://",r.defaultDevelopmentHeartbeatInterval=5,r.defaultProductionHeartbeatInterval=20;var i=t.ContentMetadata=function(){this._assetName=null,N.defGet(this,"assetName",function(){return this._assetName}),N.defSet(this,"assetName",function(t){"string"==typeof t&&(this._assetName=t)}),this._custom={},N.defGet(this,"custom",function(){return this._custom}),N.defSet(this,"custom",function(t){"object"==typeof t&&(this._custom=N.sanitizeStringToStringObject(t))}),this._defaultBitrateKbps=-2,N.defGet(this,"defaultBitrateKbps",function(){return this._defaultBitrateKbps}),N.defSet(this,"defaultBitrateKbps",function(t){this._defaultBitrateKbps=L.sanitizeSpecialIntegerValue(t)}),this._defaultResource=null,N.defGet(this,"defaultResource",function(){return this._defaultResource}),N.defSet(this,"defaultResource",function(t){"string"==typeof t&&(this._defaultResource=t)}),this._viewerId=null,N.defGet(this,"viewerId",function(){return this._viewerId}),N.defSet(this,"viewerId",function(t){"string"==typeof t&&(this._viewerId=t)}),this._applicationName=null,N.defGet(this,"applicationName",function(){return this._applicationName}),N.defSet(this,"applicationName",function(t){"string"==typeof t&&(this._applicationName=t)}),this._streamUrl=null,N.defGet(this,"streamUrl",function(){return this._streamUrl}),N.defSet(this,"streamUrl",function(t){"string"==typeof t&&(this._streamUrl=t)}),this._streamType=i.StreamType.UNKNOWN,N.defGet(this,"streamType",function(){return this._streamType}),N.defSet(this,"streamType",function(t){(t===i.StreamType.UNKNOWN||t===i.StreamType.VOD||t===i.StreamType.LIVE)&&(this._streamType=t)}),this._duration=-1,N.defGet(this,"duration",function(){return this._duration}),N.defSet(this,"duration",function(t){this._duration=L.sanitizeSpecialIntegerValue(t)}),this._encodedFrameRate=-1,N.defGet(this,"encodedFrameRate",function(){return this._encodedFrameRate}),N.defSet(this,"encodedFrameRate",function(t){this._encodedFrameRate=L.sanitizeSpecialIntegerValue(t)}),function(){}.apply(this,arguments),this.clone=function(){var t=new i;for(var e in t.assetName=this.assetName,t.applicationName=this.applicationName,t.streamUrl=this.streamUrl,t.viewerId=this.viewerId,t.defaultBitrateKbps=this.defaultBitrateKbps,t.defaultResource=this.defaultResource,t.streamType=this.streamType,t.duration=this.duration,t.encodedFrameRate=this.encodedFrameRate,this.custom)t.custom[e]=this.custom[e];return t}};i.StreamType={UNKNOWN:"UNKNOWN",LIVE:"LIVE",VOD:"VOD"};var o=(t.ErrorType={ERROR_UNKNOWN:"ERROR_UNKNOWN",ERROR_IO:"ERROR_IO",ERROR_TIMEOUT:"ERROR_TIMEOUT",ERROR_NULL_ASSET:"ERROR_NULL_ASSET",ERROR_MISSING_PARAMETER:"ERROR_MISSING_PARAMETER",ERROR_NO_AD_AVAILABLE:"ERROR_NO_AD_AVAILABLE",ERROR_PARSE:"ERROR_PARSE",ERROR_INVALID_VALUE:"ERROR_INVALID_VALUE",ERROR_INVALID_SLOT:"ERROR_INVALID_SLOT",ERROR_3P_COMPONENT:"ERROR_3P_COMPONENT",ERROR_UNSUPPORTED_3P_FEATURE:"ERROR_UNSUPPORTED_3P_FEATURE",ERROR_DEVICE_LIMIT:"ERROR_DEVICE_LIMIT",ERROR_UNMATCHED_SLOT_SIZE:"ERROR_UNMATCHED_SLOT_SIZE"},t.Events={AD_REQUESTED:"Conviva.AdRequested",AD_RESPONSE:"Conviva.AdResponse",AD_SLOT_STARTED:"Conviva.SlotStarted",AD_ATTEMPTED:"Conviva.AdAttempted",AD_SLOT_ENDED:"Conviva.SlotEnded",AD_IMPRESSION_START:"Conviva.AdImpression",AD_START:"Conviva.AdStart",AD_FIRST_QUARTILE:"Conviva.AdFirstQuartile",AD_MID_QUARTILE:"Conviva.AdMidQuartile",AD_THIRD_QUARTILE:"Conviva.AdThirdQuartile",AD_COMPLETE:"Conviva.AdComplete",AD_END:"Conviva.AdEnd",AD_IMPRESSION_END:"Conviva.AdImpressionEnd",AD_SKIPPED:"Conviva.AdSkipped",AD_ERROR:"Conviva.AdError",AD_PROGRESS:"Conviva.AdProgress",AD_CLOSE:"Conviva.AdClose",CONTENT_PAUSED:"Conviva.PauseContent",CONTENT_RESUMED:"Conviva.ResumeContent",POD_START:"Conviva.PodStart",POD_END:"Conviva.PodEnd"},t.SystemFactory=function(t,e){var n=this;(function(t,e){if(!(t instanceof h))throw new Error("systemInterface parameter should be an instance of SystemInterface.");this._systemInterface=t,this._timeInterface=this._systemInterface._timeInterface,this._timerInterface=this._systemInterface._timerInterface,this._httpInterface=this._systemInterface._httpInterface,this._storageInterface=this._systemInterface._storageInterface,this._metadataInterface=this._systemInterface._metadataInterface,this._loggingInterface=this._systemInterface._loggingInterface,this._settings=e instanceof a?e.clone():new a}).apply(this,arguments),this.configure=function(t,e){this._packageName=t,this._clientSettings=e},this.release=function(){this._systemInterface.release(),this._systemInterface=null,this._packageName=null,this._settings=null,this._logBuffer=null};var r={build:function(){return new U(n._loggingInterface,n._timeInterface,n.getSettings(),n._logBuffer,n._packageName)}};this.buildLogger=function(){return r.build()},this.buildSessionFactory=function(t,e,n){return new S(t,e,n,this)},this.buildPing=function(){return new C(this.buildLogger(),this.buildHttpClient(),this._clientSettings)},this.buildCallbackWithTimeout=function(){return new T(this.buildTimer())},this.buildCallbackWithTimeoutNoPing=function(){var t=new R(this.buildLogger(),null,this.getSettings()),e=new F(this.buildLogger(),this._timerInterface,t);return new T(e)},this.buildHttpClient=function(){return new M(this.buildLogger(),this._httpInterface,this.buildCallbackWithTimeoutNoPing(),this.getSettings())},this.buildExceptionCatcher=function(){return new R(this.buildLogger(),this.buildPing(),this.getSettings())},this.buildTime=function(){return new j(this._timeInterface,this.buildLogger())},this.buildTimer=function(){return new F(this.buildLogger(),this._timerInterface,this.buildExceptionCatcher())},this.buildStorage=function(){return new x(this.buildLogger(),this._storageInterface,this.buildCallbackWithTimeout(),this.getSettings())},this.buildConfig=function(){return new A(this.buildLogger(),this.buildStorage(),this.buildJsonInterface())},this.buildSystemMetadata=function(){return new D(this.buildLogger(),this._metadataInterface,this.buildExceptionCatcher())},this.buildCwsProtocol=function(){return new y},this.buildGatewayControl=function(t){return new I(t,this.buildLogger(),this.buildHttpClient(),this.buildJsonInterface())},this.buildCwsSession=function(t,e,n){var r=this.buildGatewayControl(e);return new v(this.buildEventQueue(),t,e,this.buildLogger(),this.buildExceptionCatcher(),this.buildTimer(),r,this.buildCwsProtocol(),this.buildTime(),this.getLogBuffer(),n)},this.buildSession=function(t,e,n,r,i,o){var a=this.buildExceptionCatcher(),s=this.buildLogger(),u=this.buildCwsSession(t,e,n);return new m(r,i,o,n,this.buildSystemMetadata(),u,a,s)},this.buildEventQueue=function(){return new O},this.buildJsonInterface=function(){return new b},this.getLogBuffer=function(){return this._logBuffer},this.getSettings=function(){return this._settings},this._logBuffer=new w}),a=t.SystemSettings=function(){this._logLevel=a.defaultProductionLogLevel,N.defGet(this,"logLevel",function(){return this._logLevel}),N.defSet(this,"logLevel",function(t){if("number"==typeof t){var e=N.NumberToUnsignedInt(t);e===t&&e>=a.LogLevel.DEBUG&&e<=a.LogLevel.ERROR&&(this._logLevel=e)}}),this._allowUncaughtExceptions=a.defaultProductionAllowUncaughtExceptions,N.defGet(this,"allowUncaughtExceptions",function(){return this._allowUncaughtExceptions}),N.defSet(this,"allowUncaughtExceptions",function(t){N.isBoolean(t)&&(this._allowUncaughtExceptions=t)}),this._storageTimeout=a.defaultStorageTimeout,N.defGet(this,"storageTimeout",function(){return this._storageTimeout}),N.defSet(this,"storageTimeout",function(t){if("number"==typeof t){var e=N.NumberToUnsignedInt(t);e===t&&(this._storageTimeout=e)}}),this._httpTimeout=a.defaultHttpTimeout,N.defGet(this,"httpTimeout",function(){return this._httpTimeout}),N.defSet(this,"httpTimeout",function(t){if("number"==typeof t){var e=N.NumberToUnsignedInt(t);e===t&&(this._httpTimeout=e)}}),function(){}.apply(this,arguments),this.equals=function(t){return this.logLevel===t.logLevel&&this.allowUncaughtExceptions===t.allowUncaughtExceptions&&this.storageTimeout===t.storageTimeout&&this.httpTimeout===t.httpTimeout},this.clone=function(){var t=new a;return t.logLevel=this.logLevel,t.allowUncaughtExceptions=this.allowUncaughtExceptions,t.storageTimeout=this.storageTimeout,t.httpTimeout=this.httpTimeout,t}};a.LogLevel={DEBUG:0,INFO:1,WARNING:2,ERROR:3,NONE:4},a.defaultDevelopmentLogLevel=a.LogLevel.DEBUG,a.defaultProductionLogLevel=a.LogLevel.ERROR,a.defaultDevelopmentAllowUncaughtExceptions=!0,a.defaultProductionAllowUncaughtExceptions=!1,a.defaultStorageTimeout=10,a.defaultHttpTimeout=10;var s=t.PlayerStateManager=function(n){var r=this;r._monitorNotifier=null,r._bitrateKbps=-2,r._playerState=s.PlayerState.UNKNOWN,r._currentMetadata={},r._renderedFrameRate=-2,r._encodedFrameRate=-2,r._duration=-2,r._playerVersion=null,r._playerType=null,r._streamUrl=null,r._moduleName=null,r._moduleVersion=null,r._width=-1,r._height=-1,r._connectionType=null,r._linkEncryption=null,r._lastError=null,r._pendingErrors=[],r._released=!1,this.release=function(){r._released||r._exceptionCatcher.runProtected("PlayerStateManager.release",function(){null!=r._monitorNotifier&&r._monitorNotifier.onRelease(),r.removeMonitoringNotifier(),r._systemFactory=null,r._logger=null,r._exceptionCatcher=null,r._released=!0})},this.setPlayheadTime=function(t){},this.setBufferLength=function(t){},this.setRenderedFrameRate=function(t){},this.getEncodedFrameRate=function(){return r._encodedFrameRate},this.setEncodedFrameRate=function(t){r._released||r._exceptionCatcher.runProtected("PlayerStateManager.setEncodedFrameRate",function(){var e=L.sanitizeSpecialIntegerValue(t);e>=-1&&(r._encodedFrameRate=e,null!=r._monitorNotifier&&r._monitorNotifier.onEncodedFrameRateChange(r._encodedFrameRate))})},this.getDuration=function(){return r._duration},this.setClientMeasureInterface=function(e){N.validateInterface(e,new t.ClientMeasureInterface,"ClientMeasureInterface"),this._playerInterface=e},this.getPHT=function(){return this._playerInterface&&"function"==typeof this._playerInterface.getPHT?this._playerInterface.getPHT():-1},this.getBufferLength=function(){return this._playerInterface&&"function"==typeof this._playerInterface.getBufferLength?this._playerInterface.getBufferLength():-1},this.getSignalStrength=function(){return this._playerInterface&&"function"==typeof this._playerInterface.getSignalStrength?this._playerInterface.getSignalStrength():s.DEFAULT_SIGNAL_STRENGTH},this.getRenderedFrameRate=function(){return this._playerInterface&&"function"==typeof this._playerInterface.getRenderedFrameRate?this._playerInterface.getRenderedFrameRate():s.DEFAULT_RENDERED_FRAME_RATE},this.setDuration=function(t){r._released||r._exceptionCatcher.runProtected("PlayerStateManager.setDuration",function(){var e=L.sanitizeSpecialIntegerValue(t);e>=-1&&(r._duration=e,null!=r._monitorNotifier&&r._monitorNotifier.onContentLengthChange(r._duration))})},this.getStreamUrl=function(){return r._streamUrl},this.setStreamUrl=function(t){r._released||r._exceptionCatcher.runProtected("PlayerStateManager.setStreamUrl",function(){null!=t&&(r._streamUrl=t,null!=r._monitorNotifier&&r._monitorNotifier.onStreamUrlChange(r._streamUrl))})},this.getModuleName=function(){return r._moduleName},this.getModuleVersion=function(){return r._moduleVersion},this.setModuleNameAndVersion=function(t,e){r._moduleName=t,r._moduleVersion=e},this.getPlayerType=function(){return r._playerType},this.setPlayerType=function(t){r._released||r._exceptionCatcher.runProtected("PlayerStateManager.setPlayerType",function(){r._playerType=t,null!=r._monitorNotifier&&r._monitorNotifier.onPlayerTypeChange(r._playerType)})},this.getPlayerVersion=function(){return r._playerVersion},this.setPlayerVersion=function(t){r._released||r._exceptionCatcher.runProtected("PlayerStateManager.setPlayerVersion",function(){r._playerVersion=t,null!=r._monitorNotifier&&r._monitorNotifier.onPlayerVersionChange(r._playerVersion)})},this.setMonitoringNotifier=function(t,e){return r._released?void 0:null==r._monitorNotifier&&(r._monitorNotifier=t,r._logger.setSessionId(e),!0)},this.removeMonitoringNotifier=function(){r._released||(r._monitorNotifier=null,r._logger.setSessionId(null))},this.pushCurrentState=function(){r.setPlayerState(r.getPlayerState()),r.setBitrateKbps(r.getBitrateKbps()),r.setDuration(r.getDuration()),r.setEncodedFrameRate(r.getEncodedFrameRate()),r.setStreamUrl(r.getStreamUrl()),r.setPlayerType(r.getPlayerType()),r.setPlayerVersion(r.getPlayerVersion());for(var t=0;t<r._pendingErrors.length;t++){var e=r._pendingErrors[t];r.setError(e)}r._pendingErrors=[]},this.getPlayerState=function(){return r._playerState},this.setPlayerState=function(t){r._released||r._exceptionCatcher.runProtected("PlayerStateManager.setPlayerState",function(){s.isValidPlayerState(t)?(r._playerState=t,null!=r._monitorNotifier&&r._monitorNotifier.onPlayerStateChange(r._playerState)):r._logger.error("PlayerStateManager.SetPlayerState(): invalid state: "+t)})},this.getBitrateKbps=function(){return r._bitrateKbps},this.setBitrateKbps=function(t){r._released||r._exceptionCatcher.runProtected("PlayerStateManager.setBitrateKbps",function(){var e=L.sanitizeSpecialIntegerValue(t);e>=-1&&(r._bitrateKbps=e,null!=r._monitorNotifier&&r._monitorNotifier.onBitrateChange(r._bitrateKbps))})},this.setPlayerSeekStart=function(t){r._released||r._exceptionCatcher.runProtected("PlayerStateManager.setPlayerSeekStart()",function(){null!=r._monitorNotifier&&r._monitorNotifier.onSeekEvent(s.SEEK_ACTIONS_TYPE.SEEK_START,t)})},this.setPlayerSeekEnd=function(){r._released||r._exceptionCatcher.runProtected("PlayerStateManager.setPlayerSeekEnd()",function(){null!=r._monitorNotifier&&r._monitorNotifier.onSeekEvent(s.SEEK_ACTIONS_TYPE.SEEK_END,-1)})},this.setUserSeekButtonUp=function(){r._released||r._exceptionCatcher.runProtected("PlayerStateManager.setUserSeekButtonUp()",function(){null!=r._monitorNotifier&&r._monitorNotifier.onSeekEvent(s.SEEK_ACTIONS_TYPE.BUTTON_UP,-1)})},this.setUserSeekButtonDown=function(){r._released||r._exceptionCatcher.runProtected("PlayerStateManager.setUserSeekButtonDown()",function(){null!=r._monitorNotifier&&r._monitorNotifier.onSeekEvent(s.SEEK_ACTIONS_TYPE.BUTTON_DOWN,-1)})},this.setVideoResolutionWidth=function(t){r._released||r._exceptionCatcher.runProtected("PlayerStateManager.setVideoResolutionWidth()",function(){var e=L.sanitizeSpecialIntegerValue(t);e>=0&&(r._width=e),null!=r._monitorNotifier&&r._monitorNotifier.onStreamResolutionWidthChange(r._width)})},this.setVideoResolutionHeight=function(t){r._released||r._exceptionCatcher.runProtected("PlayerStateManager.setVideoResolutionHeight()",function(){var e=L.sanitizeSpecialIntegerValue(t);e>=0&&(r._height=e),null!=r._monitorNotifier&&r._monitorNotifier.onStreamResolutionHeightChange(r._height)})},this.setConnectionType=function(t){r._released||r._exceptionCatcher.runProtected("PlayerStateManager.setConnectionType()",function(){r._connectionType=t,null!=r._monitorNotifier&&r._monitorNotifier.onConnectionTypeChange(r._connectionType)})},this.setLinkEncryption=function(t){r._released||r._exceptionCatcher.runProtected("PlayerStateManager.setLinkEncryption()",function(){r._linkEncryption=t,null!=r._monitorNotifier&&r._monitorNotifier.onLinkEncryptionChange(r._linkEncryption)})},this.setSignalStrength=function(t){},this.setError=function(t){if(r._lastError=t,null!=r._monitorNotifier){var e=t.errorCode,n=t.severity;r._monitorNotifier.onError(e,n)}else r._pendingErrors.push(t)},this.sendError=function(t,n){r._released||r._exceptionCatcher.runProtected("PlayerStateManager.sendError",function(){var i=new e.StreamerError(t,n);r.setError(i)})},this.reset=function(){r._released||r._exceptionCatcher.runProtected("PlayerStateManager.reset",function(){r._bitrateKbps=-2,r._playerState=s.PlayerState.UNKNOWN,r._currentMetadata={},r._renderedFrameRate=-1,r._encodedFrameRate=-1,r._duration=-1,r._playerVersion=null,r._playerType=null,r._streamUrl=null,r._lastError=null,r._pendingErrors=[]})},this.getError=function(){return r._lastError},function(t){r._systemFactory=t,r._logger=r._systemFactory.buildLogger(),r._logger.setModuleName("PlayerStateManager"),r._exceptionCatcher=r._systemFactory.buildExceptionCatcher()}.apply(r,arguments),s.DEFAULT_SIGNAL_STRENGTH=1e3,s.DEFAULT_RENDERED_FRAME_RATE=-1};s.PlayerState={STOPPED:"STOPPED",PLAYING:"PLAYING",BUFFERING:"BUFFERING",PAUSED:"PAUSED",UNKNOWN:"UNKNOWN",NOT_MONITORED:"NOT_MONITORED"},s.isValidPlayerState=function(t){return t===s.PlayerState.STOPPED||t===s.PlayerState.PLAYING||t===s.PlayerState.BUFFERING||t===s.PlayerState.PAUSED||t===s.PlayerState.UNKNOWN||t===s.PlayerState.NOT_MONITORED},s.SEEK_ACTIONS_TYPE={SEEK_START:"pss",SEEK_END:"pse",BUTTON_UP:"bu",BUTTON_DOWN:"bd"};var u=(t.ClientMeasureInterface=function(){this.getPHT=function(){},this.getBufferLength=function(){},this.getSignalStrength=function(){},this.getRenderedFrameRate=function(){}},t.HttpInterface=function(){this.makeRequest=function(t,e,n,r,i,o){},this.release=function(){}}),c=t.LoggingInterface=function(){this.consoleLog=function(t,e){},this.release=function(){}},l=t.MetadataInterface=function(){this.getBrowserName=function(){},this.getBrowserVersion=function(){},this.getDeviceBrand=function(){},this.getDeviceManufacturer=function(){},this.getDeviceModel=function(){},this.getDeviceType=function(){},this.getDeviceVersion=function(){},this.getFrameworkName=function(){},this.getFrameworkVersion=function(){},this.getOperatingSystemName=function(){},this.getOperatingSystemVersion=function(){},this.release=function(){}},f=t.StorageInterface=function(){this.saveData=function(t,e,n,r){},this.loadData=function(t,e,n){},this.release=function(){}},h=t.SystemInterface=function(t,e,n,r,i,o){(function(t,e,n,r,i,o){N.validateInterface(t,new d,"TimeInterface"),N.validateInterface(e,new p,"TimerInterface"),N.validateInterface(n,new u,"HttpInterface"),N.validateInterface(r,new f,"StorageInterface"),N.validateInterface(i,new l,"MetadataInterface"),N.validateInterface(o,new c,"LoggingInterface"),this._timeInterface=t,this._timerInterface=e,this._httpInterface=n,this._storageInterface=r,this._metadataInterface=i,this._loggingInterface=o}).apply(this,arguments),this.release=function(){this._timeInterface.release(),this._timeInterface=null,this._timerInterface.release(),this._timerInterface=null,this._httpInterface.release(),this._httpInterface=null,this._storageInterface.release(),this._storageInterface=null,this._metadataInterface.release(),this._metadataInterface=null,this._loggingInterface.release(),this._loggingInterface=null}},d=t.TimeInterface=function(){this.getEpochTimeMs=function(){},this.release=function(){}},p=t.TimerInterface=function(){this.createTimer=function(t,e,n){},this.release=function(){}},_=e.JSON2={};!function(){function t(t){return 10>t?"0"+t:t}function e(t){return r.lastIndex=0,r.test(t)?'"'+t.replace(r,function(t){var e=a[t];return"string"==typeof e?e:"\\u"+("0000"+t.charCodeAt(0).toString(16)).slice(-4)})+'"':'"'+t+'"'}function n(t,r){var a,u,c,l,f,h=i,d=r[t];switch(d&&"object"==typeof d&&"function"==typeof d.toJSON&&(d=d.toJSON(t)),"function"==typeof s&&(d=s.call(r,t,d)),typeof d){case"string":return e(d);case"number":return isFinite(d)?String(d):"null";case"boolean":case"null":return String(d);case"object":if(!d)return"null";if(i+=o,f=[],Object.prototype.toString.apply(d)===Object.prototype.toString.apply([])){for(l=d.length,a=0;l>a;a+=1)f[a]=n(a,d)||"null";return c=0===f.length?"[]":i?"[\n"+i+f.join(",\n"+i)+"\n"+h+"]":"["+f.join(",")+"]",i=h,c}if(s&&"object"==typeof s)for(l=s.length,a=0;l>a;a+=1)"string"==typeof s[a]&&(u=s[a],(c=n(u,d))&&f.push(e(u)+(i?": ":":")+c));else for(u in d)Object.prototype.hasOwnProperty.call(d,u)&&(c=n(u,d))&&f.push(e(u)+(i?": ":":")+c);return c=0===f.length?"{}":i?"{\n"+i+f.join(",\n"+i)+"\n"+h+"}":"{"+f.join(",")+"}",i=h,c}}var r,i,o,a,s;"function"!=typeof Date.prototype.toJSON&&(Date.prototype.toJSON=function(){return isFinite(this.valueOf())?this.getUTCFullYear()+"-"+t(this.getUTCMonth()+1)+"-"+t(this.getUTCDate())+"T"+t(this.getUTCHours())+":"+t(this.getUTCMinutes())+":"+t(this.getUTCSeconds())+"Z":null},String.prototype.toJSON=Number.prototype.toJSON=Boolean.prototype.toJSON=function(){return this.valueOf()}),"function"!=typeof _.stringify&&(r=/[\\\"\x00-\x1f\x7f-\x9f\u00ad\u0600-\u0604\u070f\u17b4\u17b5\u200c-\u200f\u2028-\u202f\u2060-\u206f\ufeff\ufff0-\uffff]/g,a={"\b":"\\b","\t":"\\t","\n":"\\n","\f":"\\f","\r":"\\r",'"':'\\"',"\\":"\\\\"},_.stringify=function(t,e,r){var a;if(i="",o="","number"==typeof r)for(a=0;r>a;a+=1)o+=" ";else"string"==typeof r&&(o=r);if(s=e,e&&"function"!=typeof e&&("object"!=typeof e||"number"!=typeof e.length))throw new Error("JSON2.stringify");return n("",{"":t})})}();var E=e.JsonParse=function(){var t,e,n,r,i={'"':'"',"\\":"\\","/":"/",b:"\b",f:"\f",n:"\n",r:"\r",t:"\t"},o=function(e){throw{name:"SyntaxError",message:e,at:t,text:n}},a=function(r){return r&&r!==e&&o("Expected '"+r+"' instead of '"+e+"'"),e=n.charAt(t),t+=1,e},s=function(){var t,n="";for("-"===e&&(n="-",a("-"));e>="0"&&"9">=e;)n+=e,a();if("."===e)for(n+=".";a()&&e>="0"&&"9">=e;)n+=e;if("e"===e||"E"===e)for(n+=e,a(),("-"===e||"+"===e)&&(n+=e,a());e>="0"&&"9">=e;)n+=e,a();return t=+n,isNaN(t)?void o("Bad number"):t},u=function(){var t,n,r,s="";if('"'===e)for(;a();){if('"'===e)return a(),s;if("\\"===e)if(a(),"u"===e){for(r=0,n=0;4>n&&(t=parseInt(a(),16),isFinite(t));n+=1)r=16*r+t;s+=String.fromCharCode(r)}else{if("string"!=typeof i[e])break;s+=i[e]}else s+=e}o("Bad string")},c=function(){for(;e&&" ">=e;)a()};return r=function(){switch(c(),e){case"{":return function(){var t,n={};if("{"===e){if(a("{"),c(),"}"===e)return a("}"),n;for(;e;){if(t=u(),c(),a(":"),Object.hasOwnProperty.call(n,t)&&o('Duplicate key "'+t+'"'),n[t]=r(),c(),"}"===e)return a("}"),n;a(","),c()}}o("Bad object")}();case"[":return function(){var t=[];if("["===e){if(a("["),c(),"]"===e)return a("]"),t;for(;e;){if(t.push(r()),c(),"]"===e)return a("]"),t;a(","),c()}}o("Bad array")}();case'"':return u();case"-":return s();default:return e>="0"&&"9">=e?s():function(){switch(e){case"t":return a("t"),a("r"),a("u"),a("e"),!0;case"f":return a("f"),a("a"),a("l"),a("s"),a("e"),!1;case"n":return a("n"),a("u"),a("l"),a("l"),null}o("Unexpected '"+e+"'")}()}},function(i,a){var s;return n=i,t=0,e=" ",s=r(),c(),e&&o("Syntax error"),"function"==typeof a?function t(e,n){var r,i,o=e[n];if(o&&"object"==typeof o)for(r in o)Object.hasOwnProperty.call(o,r)&&(void 0!==(i=t(o,r))?o[r]=i:delete o[r]);return a.call(e,n,o)}({"":s},""):s}}(),y=e.CwsProtocol=function(){this.generateEvent=function(t,e,n,r){return r.seq=t,r.st=e,r.t=n,r},this.generateSessionEndEvent=function(t,e){var n=y.EVENT_TYPE_SESSION_END;return this.generateEvent(t,e,n,{})}};y.version="2.4",y.gatewayPath="/0/wsg",y.DEFAULT_CLIENT_ID="0",y.DEFAULT_MAX_HEARTBEAT_INFOS=0,y.DEFAULT_PLAYHEAD_TIME=-1,y.DEFAULT_BUFFER_LENGTH=-1,y.DEFAULT_SIGNAL_STRENGTH=1e3,y.SDK_METADATA_SCHEMA="sdk.js.1",y.EVENT_TYPE_STATE_CHANGE="CwsStateChangeEvent",y.EVENT_TYPE_ERROR="CwsErrorEvent",y.EVENT_TYPE_SESSION_END="CwsSessionEndEvent",y.EVENT_TYPE_CUSTOM="CwsCustomEvent",y.EVENT_TYPE_SEEK="CwsSeekEvent",y.EVENT_TYPE_DATA_SAMPLE="CwsDataSamplesEvent",y.RESPONSE_STATUS_NO_ERRORS="ok",y.RESPONSE_KEY_STATUS="err",y.RESPONSE_KEY_CLIENT_ID="clid",y.RESPONSE_KEY_CONFIG="cfg",y.RESPONSE_KEY_EVENTS="evs",y.RESPONSE_CONFIG_KEY_MAX_HEARTBEAT_INFOS="maxhbinfos",y.RESPONSE_CONFIG_KEY_SEND_LOGS="slg",y.RESPONSE_CONFIG_KEY_HEARTBEAT_INTERVAL="hbi",y.RESPONSE_CONFIG_KEY_GATEWAY_URL="gw",y.MESSAGE_TYPE_SESSION_HEARTBEAT="CwsSessionHb",y.REQUEST_KEY_MESSAGE_TYPE="t",y.REQUEST_KEY_SESSION_TIME="st",y.REQUEST_KEY_SESSION_START_TIME="sst",y.REQUEST_KEY_IS_LIVE="lv",y.REQUEST_KEY_SEQUENCE_NUMBER="seq",y.REQUEST_KEY_CUSTOMER_KEY="cid",y.REQUEST_KEY_CLIENT_ID="clid",y.REQUEST_KEY_CLIENT_VERSION="clv",y.REQUEST_KEY_PROTOCOL_VERSION="pver",y.REQUEST_KEY_INSTANCE_ID="iid",y.REQUEST_KEY_SESSION_ID="sid",y.REQUEST_KEY_VIEWER_ID="vid",y.REQUEST_KEY_ASSET_NAME="an",y.REQUEST_KEY_PLAYER_NAME="pn",y.REQUEST_KEY_TAGS="tags",y.REQUEST_KEY_SESSION_FLAGS="sf",y.REQUEST_KEY_EVENTS="evs",y.REQUEST_KEY_LOGS="lg",y.REQUEST_KEY_HEARTBEAT_INFOS="hbinfos",y.REQUEST_KEY_IS_SDK_CLIENT="sdk",y.REQUEST_KEY_PAUSE_JOIN="pj",y.REQUEST_KEY_PLAYER_STATE="ps",y.REQUEST_KEY_BITRATE="br",y.REQUEST_KEY_CONTENT_LENGTH="cl",y.REQUEST_KEY_ENCODED_FRAME_RATE="efps",y.REQUEST_KEY_AVERAGE_FRAME_RATE="afps",y.REQUEST_KEY_RFPS_TOTAL="rfpstot",y.REQUEST_KEY_RFPS_COUNT="rfpscnt",y.REQUEST_KEY_RESOURCE="rs",y.REQUEST_KEY_PLAYHEAD_TIME="pht",y.REQUEST_KEY_BUFFER_LENGTH="bl",y.REQUEST_KEY_STREAM_URL="url",y.REQUEST_KEY_CAPABILITIES="caps",y.REQUEST_KEY_PLATFORM_METADATA="pm",y.REQUEST_KEY_VIDEO_WIDTH="w",y.REQUEST_KEY_VIDEO_HEIGHT="h",y.REQUEST_KEY_CONNECTION_TYPE="ct",y.REQUEST_KEY_LINK_ENCRYPTION="le",y.REQUEST_KEY_SIGNAL_STRENGTH="ss",y.REQUEST_KEY_STREAM_METADATA_CHANGE="strmetadata",y.REQUEST_PLATFORM_METADATA_KEY_SCHEMA="sch",y.REQUEST_PLATFORM_METADATA_KEY_BROWSER_NAME="br",y.REQUEST_PLATFORM_METADATA_KEY_BROWSER_VERSION="brv",y.REQUEST_PLATFORM_METADATA_KEY_DEVICE_BRAND="dvb",y.REQUEST_PLATFORM_METADATA_KEY_DEVICE_MANUFACTURER="dvma",y.REQUEST_PLATFORM_METADATA_KEY_DEVICE_MODEL="dvm",y.REQUEST_PLATFORM_METADATA_KEY_DEVICE_TYPE="dvt",y.REQUEST_PLATFORM_METADATA_KEY_DEVICE_VERSION="dvv",y.REQUEST_PLATFORM_METADATA_KEY_FRAMEWORK_NAME="fw",y.REQUEST_PLATFORM_METADATA_KEY_FRAMEWORK_VERSION="fwv",y.REQUEST_PLATFORM_METADATA_KEY_CLIENT_CONFIGURATION="cc",y.REQUEST_PLATFORM_METADATA_KEY_MODULE_NAME="mn",y.REQUEST_PLATFORM_METADATA_KEY_MODULE_VERSION="mv",y.REQUEST_PLATFORM_METADATA_KEY_OPERATING_SYSTEM_NAME="pt",y.REQUEST_PLATFORM_METADATA_KEY_OPERATING_SYSTEM_VERSION="ptv",y.REQUEST_KEY_PROTOCOL_CAPP="caps",y.REQUEST_EVENT_KEY_TYPE="t",y.REQUEST_EVENT_KEY_SEQUENCE_NUMBER="seq",y.REQUEST_EVENT_KEY_SESSION_TIME="st",y.REQUEST_EVENT_KEY_SEEK_ACT_TYPE="act",y.REQUEST_EVENT_KEY_SEEK_TO_POS="skto",y.REQUEST_ERROR_EVENT_KEY_MESSAGE="err",y.REQUEST_ERROR_EVENT_KEY_FATAL="ft",y.REQUEST_STATE_CHANGE_EVENT_KEY_NEW="new",y.REQUEST_STATE_CHANGE_EVENT_KEY_OLD="old",y.REQUEST_CUSTOM_EVENT_KEY_NAME="name",y.REQUEST_CUSTOM_EVENT_KEY_ATTRIBUTES="attr",y.REQUEST_HEARTBEAT_INFO_KEY_SEQUENCE_NUMBER="seq",y.REQUEST_HEARTBEAT_INFO_KEY_STATUS="err",y.REQUEST_HEARTBEAT_INFO_KEY_ROUNDTRIP_TIME="rtt",y.REQUEST_KEY_IS_AD_SESSION="ad",y.convertPlayerState=function(t){switch(t){case s.PlayerState.STOPPED:return y.eStopped;case s.PlayerState.PLAYING:return y.ePlaying;case s.PlayerState.BUFFERING:return y.eBuffering;case s.PlayerState.PAUSED:return y.ePaused;case s.PlayerState.NOT_MONITORED:return y.eNotMonitored;default:return y.eUnknown}},y.eStopped=1,y.ePlaying=3,y.eBuffering=6,y.ePaused=12,y.eNotMonitored=98,y.eUnknown=100,y.SessionFlags={GLOBAL:0,VIDEO:1,QUALITY_METRICS:2,BITRATE_METRICS:4},y.Capabilities={INSIGHTS:0};var b=(e.JSONInterface=function(){this.encode=function(t){},this.decode=function(t){}},e.LibJSONInterface=function(){this.encode=function(t){var e=null;try{e=_.stringify(t)}catch(t){}return e},this.decode=function(t){var e=null;try{e=E(t)}catch(t){}return N.isObject(e)||(e=null),e}}),g=e.CwsHeartbeat=function(){this._data={},function(){}.apply(this,arguments),this.get=function(){return this._data},this.setField=function(t,e){this._data[t]=e},this.setInnerField=function(t,e,n){this._data[t]||(this._data[t]={}),this._data[t][e]=n},this.setMessageType=function(t){this.setField(y.REQUEST_KEY_MESSAGE_TYPE,t)},this.setSessionTime=function(t){this.setField(y.REQUEST_KEY_SESSION_TIME,t)},this.setSessionStartTime=function(t){this.setField(y.REQUEST_KEY_SESSION_START_TIME,t)},this.setIsLive=function(t){this.setField(y.REQUEST_KEY_IS_LIVE,t)},this.setSequenceNumber=function(t){this.setField(y.REQUEST_KEY_SEQUENCE_NUMBER,t)},this.setCustomerKey=function(t){this.setField(y.REQUEST_KEY_CUSTOMER_KEY,t)},this.setClientId=function(t){this.setField(y.REQUEST_KEY_CLIENT_ID,t)},this.setClientVersion=function(t){this.setField(y.REQUEST_KEY_CLIENT_VERSION,t)},this.setProtocolVersion=function(t){this.setField(y.REQUEST_KEY_PROTOCOL_VERSION,t)},this.setCapfield=function(t){this.setField(y.REQUEST_KEY_PROTOCOL_CAPP,t)},this.setSessionId=function(t){this.setField(y.REQUEST_KEY_SESSION_ID,t)},this.setInstanceId=function(t){this.setField(y.REQUEST_KEY_INSTANCE_ID,t)},this.setViewerId=function(t){this.setField(y.REQUEST_KEY_VIEWER_ID,t)},this.setAssetName=function(t){this.setField(y.REQUEST_KEY_ASSET_NAME,t)},this.setPlayerName=function(t){this.setField(y.REQUEST_KEY_PLAYER_NAME,t)},this.setTags=function(t){this.setField(y.REQUEST_KEY_TAGS,t)},this.setSessionFlags=function(t){this.setField(y.REQUEST_KEY_SESSION_FLAGS,t)},this.setCapabilities=function(t){this.setField(y.REQUEST_KEY_CAPABILITIES,t)},this.setEvents=function(t){this.setField(y.REQUEST_KEY_EVENTS,t)},this.setIsSdkClient=function(t){this.setField(y.REQUEST_KEY_IS_SDK_CLIENT,t)},this.setLogs=function(t){this.setField(y.REQUEST_KEY_LOGS,t)},this.setHeartbeatInfos=function(t){this.setField(y.REQUEST_KEY_HEARTBEAT_INFOS,t)},this.setPlayerState=function(t){this.setField(y.REQUEST_KEY_PLAYER_STATE,t)},this.setPauseJoin=function(t){this.setField(y.REQUEST_KEY_PAUSE_JOIN,t)},this.setContentLength=function(t){this.setField(y.REQUEST_KEY_CONTENT_LENGTH,t)},this.setBitrate=function(t){this.setField(y.REQUEST_KEY_BITRATE,t)},this.setResource=function(t){this.setField(y.REQUEST_KEY_RESOURCE,t)},this.setEncodedFrameRate=function(t){this.setField(y.REQUEST_KEY_ENCODED_FRAME_RATE,t)},this.setAverageFrameRate=function(t){this.setField(y.REQUEST_KEY_AVERAGE_FRAME_RATE,t)},this.setRfpsObservationCount=function(t){this.setField(y.REQUEST_KEY_RFPS_COUNT,t)},this.setRfpsTotal=function(t){this.setField(y.REQUEST_KEY_RFPS_TOTAL,t)},this.setPlatformMetadataSchema=function(t){this.setInnerField(y.REQUEST_KEY_PLATFORM_METADATA,y.REQUEST_PLATFORM_METADATA_KEY_SCHEMA,t)},this.setBrowserName=function(t){this.setInnerField(y.REQUEST_KEY_PLATFORM_METADATA,y.REQUEST_PLATFORM_METADATA_KEY_BROWSER_NAME,t)},this.setBrowserVersion=function(t){this.setInnerField(y.REQUEST_KEY_PLATFORM_METADATA,y.REQUEST_PLATFORM_METADATA_KEY_BROWSER_VERSION,t)},this.setDeviceBrand=function(t){this.setInnerField(y.REQUEST_KEY_PLATFORM_METADATA,y.REQUEST_PLATFORM_METADATA_KEY_DEVICE_BRAND,t)},this.setDeviceManufacturer=function(t){this.setInnerField(y.REQUEST_KEY_PLATFORM_METADATA,y.REQUEST_PLATFORM_METADATA_KEY_DEVICE_MANUFACTURER,t)},this.setDeviceModel=function(t){this.setInnerField(y.REQUEST_KEY_PLATFORM_METADATA,y.REQUEST_PLATFORM_METADATA_KEY_DEVICE_MODEL,t)},this.setDeviceType=function(t){this.setInnerField(y.REQUEST_KEY_PLATFORM_METADATA,y.REQUEST_PLATFORM_METADATA_KEY_DEVICE_TYPE,t)},this.setDeviceVersion=function(t){this.setInnerField(y.REQUEST_KEY_PLATFORM_METADATA,y.REQUEST_PLATFORM_METADATA_KEY_DEVICE_VERSION,t)},this.setFrameworkName=function(t){this.setInnerField(y.REQUEST_KEY_PLATFORM_METADATA,y.REQUEST_PLATFORM_METADATA_KEY_FRAMEWORK_NAME,t),this.setField(y.REQUEST_PLATFORM_METADATA_KEY_FRAMEWORK_NAME,t)},this.setFrameworkVersion=function(t){this.setInnerField(y.REQUEST_KEY_PLATFORM_METADATA,y.REQUEST_PLATFORM_METADATA_KEY_FRAMEWORK_VERSION,t),this.setField(y.REQUEST_PLATFORM_METADATA_KEY_FRAMEWORK_VERSION,t)},this.setOperatingSystemName=function(t){this.setInnerField(y.REQUEST_KEY_PLATFORM_METADATA,y.REQUEST_PLATFORM_METADATA_KEY_OPERATING_SYSTEM_NAME,t),this.setField(y.REQUEST_PLATFORM_METADATA_KEY_OPERATING_SYSTEM_NAME,t)},this.setOperatingSystemVersion=function(t){this.setInnerField(y.REQUEST_KEY_PLATFORM_METADATA,y.REQUEST_PLATFORM_METADATA_KEY_OPERATING_SYSTEM_VERSION,t),this.setField(y.REQUEST_PLATFORM_METADATA_KEY_OPERATING_SYSTEM_VERSION,t)},this.setPlayheadTime=function(t){this.setField(y.REQUEST_KEY_PLAYHEAD_TIME,t)},this.setBufferLength=function(t){this.setField(y.REQUEST_KEY_BUFFER_LENGTH,t)},this.setStreamUrl=function(t){this.setField(y.REQUEST_KEY_STREAM_URL,t)},this.setStreamWidth=function(t){this.setField(y.REQUEST_KEY_VIDEO_WIDTH,t)},this.setStreamHeight=function(t){this.setField(y.REQUEST_KEY_VIDEO_HEIGHT,t)},this.setConnectionType=function(t){this.setField(y.REQUEST_KEY_CONNECTION_TYPE,t)},this.setLinkEncryption=function(t){this.setField(y.REQUEST_KEY_LINK_ENCRYPTION,t)},this.setIsAdSession=function(){this.setField(y.REQUEST_KEY_IS_AD_SESSION,!0)},this.setSignalStrength=function(t){this.setField(y.REQUEST_KEY_SIGNAL_STRENGTH,t)},this.setModuleName=function(t){this.setInnerField(y.REQUEST_PLATFORM_METADATA_KEY_CLIENT_CONFIGURATION,y.REQUEST_PLATFORM_METADATA_KEY_MODULE_NAME,t)},this.setModuleVersion=function(t){this.setInnerField(y.REQUEST_PLATFORM_METADATA_KEY_CLIENT_CONFIGURATION,y.REQUEST_PLATFORM_METADATA_KEY_MODULE_VERSION,t)}},v=e.CwsSession=function(t,e,r,i,o,a,u,c,l,f,h){var d=this;d._heartbeatTimerCancel=null,d._startTimeMs=0,d._heartbeatSequenceNumber=0,d._sessionFlags=y.SessionFlags.GLOBAL,d._capabilities=y.Capabilities.INSIGHTS,d._heartbeatInfos=[],d._lastRequestSentMs=-1,d._bitrateKbps=-2,d._resource=null,d._playerState=s.PlayerState.NOT_MONITORED,d._encodedFrameRate=-1,d._contentLengthSec=-1,d._streamUrl=null,d._width=-1,d._height=-1,d._playerStateManager=null,d._assetName=null,d._viewerId=null,d._playerName=null,d._isLive=null,d._tags={},d._browserName=null,d._browserVersion=null,d._deviceBrand=null,d._deviceManufacturer=null,d._deviceModel=null,d._deviceType=null,d._deviceVersion=null,d._frameworkName=null,d._frameworkVersion=null,d._operatingSystemName=null,d._operatingSystemVersion=null,d._moduleName=null,d._moduleVersion=null,d._connectionType=null,d._linkEncryption=null,d._pauseJoin=!1,d._hasJoined=!1,d._cleanedUp=!1,d._willEndSoon=!1,d._rfpsTimerCancel=null,d._rfpsTimerInterval=1e3,d._playingFpsObservationCount=0,d._playingFpsTotal=0,function(t,e,n,r,i,o,a,s,u,c,l){this._eventQueue=t,this._client=e,this._clientSettings=n,this._logger=r,this._logger.setModuleName("CwsSession"),this._exceptionCatcher=i,this._timer=o,this._gatewayControl=a,this._cwsProtocol=s,this._time=u,this._logBuffer=c,this._clientConfig=l}.apply(this,arguments),this.cleanup=function(){this._clientConfig=null,this._logBuffer=null,this._systemSettings=null,this._time=null,this._cwsProtocol=null,this._gatewayControl=null,this._timer=null,this._exceptionCatcher=null,this._logger=null,this._clientSettings=null,this._client=null,this._eventQueue.flush(),this._eventQueue=null,this._cleanedUp=!0},this.start=function(t){this._session=t,this._global=this._session._global,this._logger.setSessionId(this._session._id),this._startTimeMs=this._time.current(),(this.isVideoSession()||this.isAdSession())&&(this._sessionFlags+=v.DEFAULT_VIDEO_SESSION_FLAGS)},this.willEndSoon=function(){this._willEndSoon=!0},this.initialize=function(){this._logger.debug("initialize()")},this.end=function(){(this.isVideoSession()||this.isAdSession())&&(this._logger.debug("end(): schedule the last hb before session cleanup"+d.sessionTypeTag()),this.enqueueSessionEndEvent()),this.cancelHeartbeatTimer(),this.sendHeartbeat()},this.startSendingHeartbeats=function(){this._willEndSoon||(this.sendHeartbeat(),this.resetHeartbeatTimer())},this.setBrowserName=function(t){d._logger.debug("setBrowserName(): "+t);var e=d._browserName;e!==t&&null!=t&&(d._logger.debug("Change browserName from "+e+" to "+t),d._browserName=t)},this.setBrowserVersion=function(t){d._logger.debug("setBrowserVersion(): "+t);var e=d._browserVersion;e!==t&&null!=t&&(d._logger.debug("Change browserVersion from "+e+" to "+t),d._browserVersion=t)},this.setDeviceBrand=function(t){d._logger.debug("setDeviceBrand(): "+t);var e=d._deviceBrand;e!==t&&null!=t&&(d._logger.debug("Change deviceBrand from "+e+" to "+t),d._deviceBrand=t)},this.setDeviceManufacturer=function(t){d._logger.debug("setDeviceManufacturer(): "+t);var e=d._deviceManufacturer;e!==t&&null!=t&&(d._logger.debug("Change deviceManufacturer from "+e+" to "+t),d._deviceManufacturer=t)},this.setDeviceModel=function(t){d._logger.debug("setDeviceModel(): "+t);var e=d._deviceModel;e!==t&&null!=t&&(d._logger.debug("Change deviceModel from "+e+" to "+t),d._deviceModel=t)},this.setDeviceType=function(t){d._logger.debug("setDeviceBrand(): "+t);var e=d._deviceType;e!==t&&null!=t&&(d._logger.debug("Change deviceType from "+e+" to "+t),d._deviceType=t)},this.setDeviceVersion=function(t){d._logger.debug("setDeviceVersion(): "+t);var e=d._deviceVersion;e!==t&&null!=t&&(d._logger.debug("Change deviceVersion from "+e+" to "+t),d._deviceVersion=t)},this.setOperatingSystemName=function(t){d._logger.debug("setOperatingSystemName(): "+t);var e=d._operatingSystemName;e!==t&&null!=t&&(d._logger.debug("Change operatingSystemName from "+e+" to "+t),d._operatingSystemName=t)},this.setOperatingSystemVersion=function(t){d._logger.debug("setOperatingSystemVersion(): "+t);var e=d._operatingSystemVersion;e!==t&&null!=t&&(d._logger.debug("Change operatingSystemVersion from "+e+" to "+t),d._operatingSystemVersion=t)},this.getFrameworkName=function(){return d._frameworkName},this.setFrameworkName=function(t){d._logger.debug("setFrameworkName(): "+t);var e=d._frameworkName;e!==t&&null!=t&&(d._logger.debug("Change frameworkName from "+e+" to "+t),d._frameworkName=t)},this.getFrameworkVersion=function(){return d._frameworkVersion},this.setFrameworkVersion=function(t){d._logger.debug("setFrameworkVersion(): "+t);var e=d._frameworkVersion;e!==t&&null!=t&&(d._logger.debug("Change frameworkVersion from "+e+" to "+t),d._frameworkVersion=t)},this.setStreamUrl=function(t){d._logger.debug("setStreamUrl(): "+t);var e=d._streamUrl;e!==t&&null!=t&&(d._logger.debug("Change stream url from "+e+" to "+t),d._streamUrl=t)},this.setBitrateKbps=function(t){d._logger.debug("setBitrateKbps(): "+t);var e=d._bitrateKbps;e!==t&&t>=-1&&(d._logger.info("Change bitrate from "+e+" to "+t),d.enqueueBitrateChangeEvent(e,t),d._bitrateKbps=t)},this.setResource=function(t){d._logger.debug("setResource(): "+t);var e=d._resource;e!==t&&null!=t&&(d._logger.info("Change resource from "+e+" to "+t),d._resource=t)},this.setAssetName=function(t){d._logger.debug("setAssetName(): "+t),d._assetName!==t&&null!=t&&(d._logger.info("Change assetName from "+d._assetName+" to "+t),d._assetName=t)},this.setIsLive=function(t){d._logger.debug("setIsLive(): "+t);var e=d._isLive;e!==t&&null!=t&&(d._logger.info("Change isLive from "+e+" to "+t),d._isLive=t)},this.setViewerId=function(t){d._logger.debug("setViewerId(): "+t);var e=d._viewerId;e!==t&&null!=t&&(d._logger.info("Change viewerId from "+e+" to "+t),d._viewerId=t)},this.setPlayerName=function(t){d._logger.debug("setPlayerName(): "+t);var e=d._playerName;e!==t&&null!=t&&(d._logger.info("Change playerName from "+e+" to "+t),d._playerName=t)},this.setTags=function(t){d._logger.debug("setTags()");var e=d._tags;N.ObjectShallowEquals(e,t)||null==t||(d._logger.info("Change tags from "+N.ObjectToString(e)+" to "+N.ObjectToString(t)),d._tags=t)},this.setEncodedFrameRate=function(t){d._logger.debug("setEncodedFrameRate(): "+t),d._encodedFrameRate=t},this.setContentLength=function(t){d._logger.debug("setContentLength(): "+t),d._contentLengthSec=t},this.setPlayerState=function(t){d._logger.debug("setPlayerState(): "+t),d._hasJoined||t!=s.PlayerState.PLAYING||(d.togglePauseJoin(!1),d._hasJoined=!0);var e=d._playerState;d._logger.info("setPlayerState(): changing player state from "+e+" to "+t),d.enqueuePlayerStateChangeEvent(e,t),d._playerState=t},this.setStreamResolutionWidth=function(t){d._logger.debug("setStreamResolutionWidth(): "+t);var e=d._width;e!==t&&t>-1&&(d._logger.debug("Change stream resolution width from "+e+" to "+t),d.enqueueResolutionWidthChangeEvent(e,t),d._width=t)},this.setStreamResolutionHeight=function(t){d._logger.debug("setStreamResolutionHeight(): "+t);var e=d._height;e!==t&&t>-1&&(d._logger.debug("Change stream resolution height from "+e+" to "+t),d.enqueueResolutionHeightChangeEvent(e,t),d._height=t)},this.setConnectionType=function(t){d._logger.debug("setConnectionType(): "+t);var e=d._connectionType;e!==t&&null!=t&&(d._logger.debug("Change network connection type from "+e+" to "+t),d.enqueueConnectionTypeChangeEvent(e,t),d._connectionType=t)},this.setLinkEncryption=function(t){d._logger.debug("setLinkEncryption(): "+t);var e=d._linkEncryption;e!==t&&null!=t&&(d._logger.debug("Change network link encryption from "+e+" to "+t),d.enqueueLinkEncryptionChangeEvent(e,t),d._linkEncryption=t)},this.togglePauseJoin=function(t){if(d._logger.debug("togglePauseJoin()"),d._pauseJoin!==t){var e=d._pauseJoin,n=!d._pauseJoin;d.enqueuePauseJoinChangeEvent(e,n),d._pauseJoin=!d._pauseJoin}else d._logger.debug("togglePauseJoin(): same value, ignoring")},this.sendError=function(t,e){d.enqueueErrorEvent(t,e)},this.enqueueEvent=function(t,e){if(e[y.REQUEST_EVENT_KEY_TYPE]=t,e[y.REQUEST_EVENT_KEY_SESSION_TIME]=this.getSessionTime(),e[y.REQUEST_EVENT_KEY_SEQUENCE_NUMBER]=this._eventQueue.getNumber(),this._playerStateManager){var n=L.Integer(this._playerStateManager.getPHT(),0,null,-1),r=L.Integer(this._playerStateManager.getBufferLength(),0,null,-1);n>=0&&(e[y.REQUEST_KEY_PLAYHEAD_TIME]=n),r>=0&&(e[y.REQUEST_KEY_BUFFER_LENGTH]=r)}this._eventQueue.enqueue(e)},this.setPlayerStateManager=function(t){d._playerStateManager=t,null!=d._playerStateManager?d.startRfpsTimer():d.cancelRfpsTimer()},this.enqueueSessionEndEvent=function(){var t=this.getSessionTime(),e=this.getNextEventNumber(),n=this._cwsProtocol.generateSessionEndEvent(e,t);this._eventQueue.enqueue(n)},this.enqueueTagsChangeEvent=function(t,e){var n=null;N.dictCount(t)>0&&((n={})[y.REQUEST_KEY_TAGS]=t);var r={};r[y.REQUEST_KEY_TAGS]=e,this.declareStateChange(r,n)},this.enqueueAssetNameChangeEvent=function(t,e){var n={};n[y.REQUEST_KEY_ASSET_NAME]=e,this.declareStateChange(n,null)},this.enqueueErrorEvent=function(t,e){var n={};n[y.REQUEST_ERROR_EVENT_KEY_MESSAGE]=t,n[y.REQUEST_ERROR_EVENT_KEY_FATAL]=e,this.enqueueEvent(y.EVENT_TYPE_ERROR,n)},this.enqueueBitrateChangeEvent=function(t,e){if(!(-1>=t)){var n={},r={};r[y.REQUEST_KEY_BITRATE]=t,n[y.REQUEST_KEY_BITRATE]=e,this.declareStateChange(n,r)}},this.enqueueSeekEvent=function(t,e){var n={};n[y.REQUEST_EVENT_KEY_SEEK_ACT_TYPE]=t,e>=0&&(n[y.REQUEST_EVENT_KEY_SEEK_TO_POS]=e),this.enqueueEvent(y.EVENT_TYPE_SEEK,n)},this.enqueueResourceChangeEvent=function(t,e){var n={},r={};null!==t&&(r[y.REQUEST_KEY_RESOURCE]=t),n[y.REQUEST_KEY_RESOURCE]=e,this.declareStateChange(n,r)},this.enqueueStreamUrlChangeEvent=function(t,e){var n={},r={};null!==t&&(r[y.REQUEST_KEY_STREAM_URL]=t),n[y.REQUEST_KEY_STREAM_URL]=e,this.declareStateChange(n,r)},this.enqueueResolutionWidthChangeEvent=function(t,e){var n={},r={};-1!==t&&(r[y.REQUEST_KEY_VIDEO_WIDTH]=t),n[y.REQUEST_KEY_VIDEO_WIDTH]=e,this.declareStateChange(n,r)},this.enqueueResolutionHeightChangeEvent=function(t,e){var n={},r={};-1!==t&&(r[y.REQUEST_KEY_VIDEO_HEIGHT]=t),n[y.REQUEST_KEY_VIDEO_HEIGHT]=e,this.declareStateChange(n,r)},this.enqueueConnectionTypeChangeEvent=function(t,e){var n={},r={};null!==t&&(r[y.REQUEST_KEY_CONNECTION_TYPE]=t),n[y.REQUEST_KEY_CONNECTION_TYPE]=e,this.declareStateChange(n,r)},this.enqueueLinkEncryptionChangeEvent=function(t,e){var n={},r={};null!==t&&(r[y.REQUEST_KEY_LINK_ENCRYPTION]=t),n[y.REQUEST_KEY_LINK_ENCRYPTION]=e,this.declareStateChange(n,r)},this.enqueuePauseJoinChangeEvent=function(t,e){var n={},r={};r[y.REQUEST_KEY_PAUSE_JOIN]=t,n[y.REQUEST_KEY_PAUSE_JOIN]=e,this.declareStateChange(n,r)},this.enqueuePlayerStateChangeEvent=function(t,e){var n={},r={};n[y.REQUEST_KEY_PLAYER_STATE]=y.convertPlayerState(e),r[y.REQUEST_KEY_PLAYER_STATE]=y.convertPlayerState(t),this.declareStateChange(n,r)},this.enqueueDataSamplesEvent=function(){this.enqueueEvent(y.EVENT_TYPE_DATA_SAMPLE,{})},this.declareStateChange=function(t,e){var n={};n[y.REQUEST_STATE_CHANGE_EVENT_KEY_NEW]=t,null!=e&&N.dictCount(e)>0&&(n[y.REQUEST_STATE_CHANGE_EVENT_KEY_OLD]=e),this.enqueueEvent(y.EVENT_TYPE_STATE_CHANGE,n)},this.enqueueCustomEvent=function(t,e){var n={};n[y.REQUEST_CUSTOM_EVENT_KEY_NAME]=t,n[y.REQUEST_CUSTOM_EVENT_KEY_ATTRIBUTES]=e,this.enqueueEvent(y.EVENT_TYPE_CUSTOM,n)},this.cancelHeartbeatTimer=function(){null!=d._heartbeatTimerCancel&&(d._heartbeatTimerCancel(),d._heartbeatTimerCancel=null)},this.resetHeartbeatTimer=function(){d.cancelHeartbeatTimer();var t=1e3*d._clientSettings.heartbeatInterval;d._heartbeatTimerCancel=d._timer.create(d.sendHeartbeat,t,"Session.sendHeartbeat")},this.cancelRfpsTimer=function(){null!=d._rfpsTimerCancel&&(d._rfpsTimerCancel(),d._rfpsTimerCancel=null)},this.startRfpsTimer=function(){d.cancelRfpsTimer(),d._rfpsTimerCancel=d._timer.create(d.countRfps,d._rfpsTimerInterval,"Session.startRfpsTimer")},this.createHeartbeatInfo=function(){var t={err:"pending"};t.seq=d._heartbeatSequenceNumber-1,t.sentAt=d.getSessionTime(),t.rtt=-1,d._heartbeatInfos.push(t)},this.updateHeartbeatInfoOnFailure=function(t,e){for(var n=0;n<d._heartbeatInfos.length;n++){var r=d._heartbeatInfos[n],i=r.seq;i===t&&(r.rtt=d.getSessionTime()-r.sentAt,r.err=e)}},this.updateHeartbeatInfoOnSuccess=function(t){for(var e=0;e<d._heartbeatInfos.length;e++){var n=d._heartbeatInfos[e],r=n.seq;r===t&&(n.rtt=d.getSessionTime()-n.sentAt,n.err="ok")}},this.removeOutdatedHeartbeatInfos=function(){for(var t=d._clientConfig.get(A.CONFIG_KEY_MAX_HEARTBEAT_INFOS),e=[],n=0;n<d._heartbeatInfos.length;n++)d._heartbeatInfos[n].seq<d._heartbeatSequenceNumber-t&&e.push(n);for(var r=[],i=0;i<d._heartbeatInfos.length;i++)d._heartbeatInfos[i].seq,e.indexOf(i)<0&&r.push(d._heartbeatInfos[i]);d._heartbeatInfos=r},this.compileHeartbeatInfos=function(){d.removeOutdatedHeartbeatInfos();for(var t=[],e=0;e<d._heartbeatInfos.length;e++){var n=d._heartbeatInfos[e],r={};r[y.REQUEST_HEARTBEAT_INFO_KEY_SEQUENCE_NUMBER]=n.seq,r[y.REQUEST_HEARTBEAT_INFO_KEY_ROUNDTRIP_TIME]=n.rtt,r[y.REQUEST_HEARTBEAT_INFO_KEY_STATUS]=n.err,t.push(r)}return t},this.makeHeartbeat=function(){var t=d._eventQueue.flush();if(d.isGlobalSession()&&0===t.length)return null;var e=new g;if(e.setMessageType(y.MESSAGE_TYPE_SESSION_HEARTBEAT),e.setCustomerKey(d._clientSettings.customerKey),e.setClientId(d._clientConfig.get(A.CONFIG_KEY_CLIENT_ID)),e.setSessionId(d._session._id),e.setSequenceNumber(d._heartbeatSequenceNumber),e.setProtocolVersion(y.version),e.setClientVersion(n.version),e.setInstanceId(d._client.getId()),e.setCapfield(0),null!=d._connectionType&&e.setConnectionType(d._connectionType),null!=d._linkEncryption&&e.setLinkEncryption(d._linkEncryption),e.setPlatformMetadataSchema(y.SDK_METADATA_SCHEMA),null!=d._browserName&&e.setBrowserName(d._browserName),null!=d._browserVersion&&e.setBrowserVersion(d._browserVersion),null!=d._deviceBrand&&e.setDeviceBrand(d._deviceBrand),null!=d._deviceManufacturer&&e.setDeviceManufacturer(d._deviceManufacturer),null!=d._deviceModel&&e.setDeviceModel(d._deviceModel),null!=d._deviceType&&e.setDeviceType(d._deviceType),null!=d._deviceVersion&&e.setDeviceVersion(d._deviceVersion),null!=d._frameworkName&&e.setFrameworkName(d._frameworkName),null!=d._frameworkVersion&&e.setFrameworkVersion(d._frameworkVersion),null!=d._operatingSystemName&&e.setOperatingSystemName(d._operatingSystemName),null!=d._operatingSystemVersion&&e.setOperatingSystemVersion(d._operatingSystemVersion),null!=d._playerStateManager&&(d._moduleName=d._playerStateManager.getModuleName(),null!=d._moduleName&&e.setModuleName(d._moduleName)),null!=d._playerStateManager&&(d._moduleVersion=d._playerStateManager.getModuleVersion(),null!=d._moduleVersion&&e.setModuleVersion(d._moduleVersion)),null!=d._viewerId&&e.setViewerId(d._viewerId),N.dictCount(d._tags)>0&&e.setTags(d._tags),d.isVideoSession()||d.isAdSession()){d.isAdSession()&&e.setIsAdSession(),null!=d._assetName&&e.setAssetName(d._assetName),e.setSessionFlags(d._sessionFlags);var r,i,o,a=y.convertPlayerState(d._playerState);e.setPlayerState(a),e.setPauseJoin(d._pauseJoin),null!=d._playerName&&e.setPlayerName(d._playerName),null!=d._isLive&&e.setIsLive(d._isLive),d._contentLengthSec>0&&e.setContentLength(d._contentLengthSec),d._bitrateKbps>0&&e.setBitrate(d._bitrateKbps),null!==d._resource&&e.setResource(d._resource),d._encodedFrameRate>0&&e.setEncodedFrameRate(d._encodedFrameRate),null!=d._playerStateManager&&(r=L.Integer(d._playerStateManager.getPHT(),0,null,-1),i=L.Integer(d._playerStateManager.getBufferLength(),0,null,-1),o=d._playerStateManager.getSignalStrength()),r>=0&&e.setPlayheadTime(r),i>=0&&e.setBufferLength(i);var s=d.updateAverageFrameRate();s>=0&&e.setAverageFrameRate(s),d._playingFpsTotal>0&&e.setRfpsTotal(L.Integer(d._playingFpsTotal,0,null,-1)),d._playingFpsObservationCount>0&&e.setRfpsObservationCount(L.Integer(d._playingFpsObservationCount,0,null,-1)),0>=o&&e.setSignalStrength(o),null!=d._streamUrl&&e.setStreamUrl(d._streamUrl),d._width>0&&e.setStreamWidth(d._width),d._height>0&&e.setStreamHeight(d._height)}else e.setSessionFlags(y.SessionFlags.GLOBAL);if(t.length>0&&e.setEvents(t),e.setCapabilities(d._capabilities),e.setIsSdkClient(!0),d._clientConfig.get(A.CONFIG_KEY_SEND_LOGS)&&e.setLogs(d._logBuffer.flush()),d._clientConfig.get(A.CONFIG_KEY_MAX_HEARTBEAT_INFOS)>0){var u=d.compileHeartbeatInfos();u.length>0&&e.setHeartbeatInfos(u)}return e.setSessionStartTime(d._startTimeMs),e.setSessionTime(d.getSessionTime()),d._heartbeatSequenceNumber++,e.get()},this.sendHeartbeat=function(){if(!d._cleanedUp){var t=d.makeHeartbeat();null!=t&&d.postHeartbeat(t)}},this.countRfps=function(){if(d._playerState===s.PlayerState.PLAYING){var t=d._playerStateManager.getRenderedFrameRate();t>=0&&(d._playingFpsTotal+=t,d._playingFpsObservationCount++)}},this.updateAverageFrameRate=function(){if(d._playerState===s.PlayerState.PLAYING){var t=d._playerStateManager.getRenderedFrameRate();if(t>=0){d._playingFpsTotal+=t,d._playingFpsObservationCount++;var e=N.Int32.Cast(1*d._playingFpsTotal/d._playingFpsObservationCount);return e}return-1}return-1},this.postHeartbeat=function(t){d.createHeartbeatInfo();var e=d._heartbeatSequenceNumber-1;d._logger.info("postHeartbeat(): Send HB["+e+"]"+d.sessionTypeTag()),d._gatewayControl.send(t,function(t,n){d.onHeartbeatResponse(t,n,e)})},this.onHeartbeatResponse=function(t,e,n){d._cleanedUp||d._exceptionCatcher.runProtected("onHeartbeatResponse",function(){if(t){var r=e;if(null!=r){d._logger.debug("onHeartbeatResponse(): received valid response for HB["+n+"]"),d.updateHeartbeatInfoOnSuccess(n);var i=r[y.RESPONSE_KEY_CLIENT_ID];null!=i&&i!=d._clientConfig.get(A.CONFIG_KEY_CLIENT_ID)&&(d._logger.debug("onHeartbeatResponse(): setting the client id to "+i+" (from gateway)"),d._clientConfig.set(A.CONFIG_KEY_CLIENT_ID,i),d._clientConfig.save());var o=r[y.RESPONSE_KEY_STATUS];null!=o&&o!=y.RESPONSE_STATUS_NO_ERRORS&&d._logger.error("onHeartbeatResponse(): error from gateway: "+o);var a=r[y.RESPONSE_KEY_CONFIG];if("object"==typeof a){var s=a[y.RESPONSE_CONFIG_KEY_MAX_HEARTBEAT_INFOS];null!=s&&d._clientConfig.get(A.CONFIG_KEY_MAX_HEARTBEAT_INFOS)!==s&&(d._logger.debug("onHeartbeatResponse(): setting Maximum Heartbeat Infos to "+s+" (from gateway)"),d._clientConfig.set(A.CONFIG_KEY_MAX_HEARTBEAT_INFOS,s));var u=a[y.RESPONSE_CONFIG_KEY_SEND_LOGS],c=null!=u&&N.AsBoolean(u);c!==d._clientConfig.get(A.CONFIG_KEY_SEND_LOGS)&&(d._logger.debug("onHeartbeatResponse(): turning "+(c?"on":"off")+" sending of logs"),d._clientConfig.set(A.CONFIG_KEY_SEND_LOGS,c));var l=a[y.RESPONSE_CONFIG_KEY_HEARTBEAT_INTERVAL];if(null!=l){var f=N.Int32.Cast(l),h=f;h!=d._clientSettings.heartbeatInterval&&(d._logger.debug("onHeartbeatResponse(): received hbIntervalMs from gateway: "+h),d._clientSettings.heartbeatInterval=h,null!=d._heartbeatTimerCancel&&d.resetHeartbeatTimer())}var p=a[y.RESPONSE_CONFIG_KEY_GATEWAY_URL];null!=p&&p!=d._clientSettings.gatewayUrl&&(d._logger.debug("onHeartbeatResponse(): received gatewayUrl from gateway: "+p),d._clientSettings.gatewayUrl=p)}}else d._logger.warning("onHeartbeatResponse(): decoded heartbeat response is null.")}else{var _=e;N.isValidString(_)?N.stringStartsWith(_,"HTTP timeout")?d._logger.warning("onHeartbeatResponse(): "+_):d._logger.error("onHeartbeatResponse(): failed to send heartbeat: "+_):(_=m.DEFAULT_HEARTBEAT_ERROR_MESSAGE,d._logger.error("onHeartbeatResponse(): "+_)),d.updateHeartbeatInfoOnFailure(n,_)}})},this.getSessionTime=function(){var t=N.Int32.Cast(d._time.current()-d._startTimeMs);return t},this.getNextEventNumber=function(){return this._eventQueue.getNumber()},this.sessionTypeTag=function(){return this.isGlobalSession()?" (global session)":""},this.isGlobalSession=function(){return this._global==v.SESSION_TYPE.GLOBAL},this.isVideoSession=function(){return this._global==v.SESSION_TYPE.VIDEO},this.isAdSession=function(){return this._global==v.SESSION_TYPE.AD}};v.DEFAULT_VIDEO_SESSION_FLAGS=y.SessionFlags.VIDEO+y.SessionFlags.QUALITY_METRICS+y.SessionFlags.BITRATE_METRICS,v.SESSION_TYPE={VIDEO:"Video",GLOBAL:"Global",AD:"Ad"};var m=(e.IMonitor=function(){this.onPlayerStateChange=function(t){},this.onBitrateChange=function(t){},this.onSeekEvent=function(t,e){},this.onEncodedFrameRateChange=function(t){},this.onRenderedFrameRateChange=function(t){},this.onContentLengthChange=function(t){},this.onPlayheadTimeChange=function(t){},this.onStreamUrlChange=function(t){},this.onBufferLengthChange=function(t){},this.onPlayerTypeChange=function(t){},this.onPlayerVersionChange=function(t){},this.onStreamResolutionWidthChange=function(t){},this.onStreamResolutionHeightChange=function(t){},this.onConnectionTypeChange=function(t){},this.onLinkEncryptionChange=function(t){},this.onSignalStrengthChange=function(t){},this.onError=function(t,e){},this.onRelease=function(){}},e.Session=function(){var e=this;e._contentMetadata=null,e._playerStateManager=null,e._id=0,e._global=v.SESSION_TYPE.VIDEO,e._cleaningUp=!1,e._cleanedUp=!1,e._adPlaying=!1,e._adStream=null,e._adPlayer=null,e._adPosition=null,e._ignorePlayerState=!1,e._pooledPlayerState=s.PlayerState.NOT_MONITORED,e._ignoreBitrateAndResource=!1,e._ignorePlayheadTimeandBufferLength=!1,e._ignoreEncodedFrameRateAndDuration=!1,e._ignoreError=!1,function(t,e,n,r,i,o,a,s){this._id=t,this._global=e,this._contentMetadata=n,this._clientConfig=r,this._systemMetadata=i,this._cwsSession=o,this._exceptionCatcher=a,this._logger=s,this._logger.setModuleName("Session"),this._logger.setSessionId(N.ToString(this._id))}.apply(e,arguments),this.start=function(){e.isVideoSession()||e.isAdSession()?e._logger.info("start(): assetName="+e._contentMetadata.assetName):e._logger.info("start()"+e.sessionTypeTag()),e._cwsSession.start(this),e._clientConfig.isReady()?e.initiateSession():e._clientConfig.register(function(){e.initiateSession()})},this.cleanup=function(){e._logger.info("cleanup()"+e.sessionTypeTag()),e._cleaningUp=!0,e._cwsSession.willEndSoon(),e._clientConfig.isReady()?e.endCwsSessionAndCleanupAll():e._clientConfig.register(function(){e.endCwsSessionAndCleanupAll()})},this.cleanupAll=function(){e._logger.debug("cleanupAll()"+e.sessionTypeTag()),(e.isVideoSession()||e.isAdSession())&&null!=e._playerStateManager&&e.detachPlayer(),e._contentMetadata=null,e._logger.setSessionId(null),e._logger=null,e._exceptionCatcher=null,e._client=null,e._clientConfig=null,e._systemMetadata=null,e._cwsSession.cleanup(),e._cwsSession=null,e._cleanedUp=!0},this.endCwsSessionAndCleanupAll=function(){e._cwsSession.end(),e.cleanupAll()},this.initiateSession=function(){e._cwsSession.initialize(),e.setStatesFromSystemMetadata(),(e.isVideoSession()||e.isAdSession())&&(e.setStatesFromContentMetadata(),e.enqueueEventForContentMetadata()),e._cwsSession.startSendingHeartbeats()},this.enqueueEventForContentMetadata=function(){var n={};if(null!=e._contentMetadata.assetName?n[y.REQUEST_KEY_ASSET_NAME]=e._contentMetadata.assetName:e._logger.warning("enqueueEventForContentMetadata(): assetName was not set."),null!=e._contentMetadata.applicationName?(void 0===n[y.REQUEST_KEY_STREAM_METADATA_CHANGE]&&(n[y.REQUEST_KEY_STREAM_METADATA_CHANGE]={}),n[y.REQUEST_KEY_STREAM_METADATA_CHANGE][y.REQUEST_KEY_PLAYER_NAME]=e._contentMetadata.applicationName):e._logger.warning("enqueueEventForContentMetadata(): applicationName was not set."),null!=e._contentMetadata.streamUrl?n[y.REQUEST_KEY_STREAM_URL]=e._contentMetadata.streamUrl:e._logger.warning("enqueueEventForContentMetadata(): streamUrl was not set."),null!=e._contentMetadata.viewerId?(void 0===n[y.REQUEST_KEY_STREAM_METADATA_CHANGE]&&(n[y.REQUEST_KEY_STREAM_METADATA_CHANGE]={}),n[y.REQUEST_KEY_STREAM_METADATA_CHANGE][y.REQUEST_KEY_VIEWER_ID]=e._contentMetadata.viewerId):e._logger.warning("enqueueEventForContentMetadata(): viewerId was not set."),null!=e._contentMetadata.defaultResource?n[y.REQUEST_KEY_RESOURCE]=e._contentMetadata.defaultResource:e._logger.warning("enqueueEventForContentMetadata(): defaultResource was not set."),e._contentMetadata.duration>-1?n[y.REQUEST_KEY_CONTENT_LENGTH]=e._cwsSession._contentLengthSec:e._logger.warning("enqueueEventForContentMetadata(): duration was not set."),e._contentMetadata.encodedFrameRate>-1?n[y.REQUEST_KEY_ENCODED_FRAME_RATE]=e._contentMetadata.encodedFrameRate:e._logger.warning("enqueueEventForContentMetadata(): encodedFrameRate was not set."),e._contentMetadata.defaultBitrateKbps>0?n[y.REQUEST_KEY_BITRATE]=e._contentMetadata.defaultBitrateKbps:e._logger.warning("enqueueEventForContentMetadata(): encodedFrameRate was not set."),e._contentMetadata.streamType!=i.StreamType.UNKNOWN?e._contentMetadata.streamType==t.ContentMetadata.StreamType.LIVE?n[y.REQUEST_KEY_IS_LIVE]=!0:n[y.REQUEST_KEY_IS_LIVE]=!1:e._logger.warning("enqueueEventForContentMetadata(): streamType was not set."),N.dictCount(e._contentMetadata.custom)>0)for(var r in n[y.REQUEST_KEY_TAGS]={},e._contentMetadata.custom)n[y.REQUEST_KEY_TAGS][r]=e._contentMetadata.custom[r];else e._logger.warning("enqueueEventForContentMetadata(): custom tags were not set.");N.dictCount(n)>0&&e._cwsSession.declareStateChange(n,null)},this.setStatesFromSystemMetadata=function(){e._logger.debug("setStatesFromSystemMetadata()");var t=e._systemMetadata.get(),n=t[D.BROWSER_NAME];null!=n&&e._cwsSession.setBrowserName(n);var r=t[D.BROWSER_VERSION];null!=r&&e._cwsSession.setBrowserVersion(r);var i=t[D.DEVICE_BRAND];null!=i&&e._cwsSession.setDeviceBrand(i);var o=t[D.DEVICE_MANUFACTURER];null!=o&&e._cwsSession.setDeviceManufacturer(o);var a=t[D.DEVICE_MODEL];null!=a&&e._cwsSession.setDeviceModel(a);var s=t[D.DEVICE_TYPE];null!=s&&e._cwsSession.setDeviceType(s);var u=t[D.DEVICE_VERSION];null!=u&&e._cwsSession.setDeviceVersion(u);var c=t[D.FRAMEWORK_NAME];null!=c&&e._cwsSession.setFrameworkName(c);var l=t[D.FRAMEWORK_VERSION];null!=l&&e._cwsSession.setFrameworkVersion(l);var f=t[D.OPERATING_SYSTEM_NAME];null!=f&&e._cwsSession.setOperatingSystemName(f);var h=t[D.OPERATING_SYSTEM_VERSION];null!=h&&e._cwsSession.setOperatingSystemVersion(h)},this.setStatesFromContentMetadata=function(){if(e._logger.debug("setStatesFromContentMetadata()"),null!=e._contentMetadata.defaultResource&&e._cwsSession.setResource(e._contentMetadata.defaultResource),null!=e._contentMetadata.streamUrl&&e._cwsSession.setStreamUrl(e._contentMetadata.streamUrl),e._contentMetadata.duration>0&&e._cwsSession.setContentLength(e._contentMetadata.duration),e._contentMetadata.encodedFrameRate>0&&e._cwsSession.setEncodedFrameRate(e._contentMetadata.encodedFrameRate),e._contentMetadata.streamType!==i.StreamType.UNKNOWN){var t=e._contentMetadata.streamType===i.StreamType.LIVE;e._cwsSession.setIsLive(t)}null!=e._contentMetadata.assetName&&e._cwsSession.setAssetName(e._contentMetadata.assetName),null!=e._contentMetadata.viewerId&&e._cwsSession.setViewerId(e._contentMetadata.viewerId),null!=e._contentMetadata.applicationName&&e._cwsSession.setPlayerName(e._contentMetadata.applicationName),N.dictCount(e._contentMetadata.custom)>0&&e._cwsSession.setTags(e._contentMetadata.custom)},this.onPlayerStateChange=function(t){return e._logger.debug("onPlayerStateChange(): "+t),e._cwsSession._playerState!=t?(e._cwsSession._playerState==s.PlayerState.NOT_MONITORED&&t!=s.PlayerState.NOT_MONITORED&&(e._pooledPlayerState=t),e._ignorePlayerState?void e._logger.debug("onPlayerStateChange(): "+t+" (pooled, "+(e._adPlaying?"ad playing":"preloading")+")"):void e._cwsSession.setPlayerState(t)):void 0},this.onBitrateChange=function(t){return e._logger.debug("onBitrateChange(): "+t),e._ignoreBitrateAndResource?void e._logger.info("onBitrateChange(): ignored"):void e._cwsSession.setBitrateKbps(t)},this.onSeekEvent=function(t,n){null==n||N.isInteger(n)||(e._logger.error("onSeekEvent(): Ignored non-integer seekToPosition data: "+n),n=-1),e._cwsSession.enqueueSeekEvent(t,n)},this.onEncodedFrameRateChange=function(t){e._logger.debug("onEncodedFrameRateChange(): "+t),e._contentMetadata.encodedFrameRate>0||(t>0?e._ignoreEncodedFrameRateAndDuration?e._logger.info("onEncodedFrameRateChange(): Ignored encoded frame rate data: "+t+" (ads)"):(e._cwsSession.setEncodedFrameRate(t),e._logger.info("onEncodedFrameRateChange(): Received encoded frame rate data: "+t)):e._logger.warning("onEncodedFrameRateChange(): Ignored invalid encoded frame rate data: "+t))},this.onContentLengthChange=function(t){e._logger.debug("onContentLengthChange(): "+t),e._contentMetadata.duration>0||(t>0?e._ignoreEncodedFrameRateAndDuration?e._logger.info("setContentLength(): Ignored content length data: "+t+" (ads)"):(e._cwsSession.setContentLength(t),e._logger.info("setContentLength(): Received content length data: "+t)):e._logger.warning("setContentLength(): Ignored invalid content length data: "+t))},this.onStreamUrlChange=function(t){e._logger.debug("onStreamUrlChange(): "+t),null==e._contentMetadata.streamUrl&&e._cwsSession.setStreamUrl(t)},this.onStreamResolutionWidthChange=function(t){e._logger.debug("onStreamResolutionWidthChange(): "+t),e._cwsSession.setStreamResolutionWidth(t)},this.onStreamResolutionHeightChange=function(t){e._logger.debug("onStreamResolutionHeightChange(): "+t),e._cwsSession.setStreamResolutionHeight(t)},this.onConnectionTypeChange=function(t){e._logger.debug("onConnectionTypeChange(): "+t),e._cwsSession.setConnectionType(t)},this.onLinkEncryptionChange=function(t){e._logger.debug("onLinkEncryptionChange(): "+t),e._cwsSession.setLinkEncryption(t)},this.onPlayerTypeChange=function(t){e._logger.debug("onPlayerTypeChange(): "+t),null==e._cwsSession.getFrameworkName()&&e._cwsSession.setFrameworkName(t)},this.onPlayerVersionChange=function(t){e._logger.debug("onPlayerVersionChange(): "+t),null==e._cwsSession.getFrameworkVersion()&&e._cwsSession.setFrameworkVersion(t)},this.onError=function(t,n){e._logger.debug("onError(): "+t+" ("+n+")"),e.reportError(t,n)},this.onRelease=function(){e._logger.debug("onRelease()"),e.detachPlayer()},this.adStart=function(n,r,i){return e._logger.debug("adStart(): adStream="+n+" adPlayer="+r+" adPosition="+i),e._adPlaying?void e._logger.warning("adStart(): multiple adStart calls, ignoring"):(e._adPlaying=!0,e._adStream=n,e._adPlayer=r,e._adPosition=i,e._cwsSession._hasJoined||e._cwsSession.togglePauseJoin(!0),void(e._adStream==t.Client.AdStream.CONTENT||e._adPlayer==t.Client.AdPlayer.SEPARATE?(e._cwsSession._playerState!==s.PlayerState.NOT_MONITORED&&(e._pooledPlayerState=e._cwsSession._playerState),e._cwsSession.setPlayerState(s.PlayerState.NOT_MONITORED),e._ignorePlayerState=!0):e._adStream==t.Client.AdStream.SEPARATE&&e._adPlayer==t.Client.AdPlayer.CONTENT&&(e._cwsSession._playerState!==s.PlayerState.NOT_MONITORED&&(e._pooledPlayerState=e._cwsSession._playerState),e._cwsSession.setPlayerState(s.PlayerState.NOT_MONITORED),e._ignorePlayerState=!0,e._ignoreBitrateAndResource=!0,e._ignoreEncodedFrameRateAndDuration=!0,e._ignorePlayheadTimeandBufferLength=!0,e._ignoreError=!0)))},this.adEnd=function(){return e._logger.debug("adEnd()"),e._adPlaying?(e._cwsSession._hasJoined||e._cwsSession.togglePauseJoin(!1),e._adStream==t.Client.AdStream.CONTENT||e._adPlayer==t.Client.AdPlayer.SEPARATE?e._preloading||(e._ignorePlayerState=!1,e._cwsSession.setPlayerState(e._pooledPlayerState)):e._adStream==t.Client.AdStream.SEPARATE&&e._adPlayer==t.Client.AdPlayer.CONTENT&&(e._ignoreBitrateAndResource=!1,e._ignoreEncodedFrameRateAndDuration=!1,e._ignorePlayheadTimeandBufferLength=!1,e._ignoreError=!1,e._preloading||(e._ignorePlayerState=!1,e._cwsSession.setPlayerState(e._pooledPlayerState))),e._adPlaying=!1,void(e._adStream=e._adPlayer=e._adPosition=null)):void e._logger.debug("adEnd(): called before adStart, ignoring")},this.detachPlayer=function(){e._logger.debug("detachPlayer()"),null!==e._playerStateManager&&(e._exceptionCatcher.runProtected("Session.detachPlayer",function(){e._playerStateManager.removeMonitoringNotifier()}),e._playerStateManager=null,e._cwsSession.setPlayerStateManager(null),e._cwsSession.setPlayerState(s.PlayerState.NOT_MONITORED))},this.attachPlayer=function(t){return e._logger.debug("attachPlayer()"),null!=e._playerStateManager?void e._logger.error("attachPlayer(): detach current PlayerStateManager first"):void e._exceptionCatcher.runProtected("Session.attachPlayer()",function(){t.setMonitoringNotifier(e,e._id)?(t.pushCurrentState(),e._playerStateManager=t,e._cwsSession.setPlayerStateManager(e._playerStateManager)):e._logger.error("attachPlayer(): instance of PlayerStateManager is already attached to a session")})},this.getPlayerStateManager=function(){return e._logger.debug("getPlayerStateManager()"),e._playerStateManager},this.contentPreload=function(){return e._logger.debug("contentPreload()"),e._preloading?void e._logger.debug("contentPreload(): called twice, ignoring"):(e._preloading=!0,void(e._ignorePlayerState=!0))},this.contentStart=function(){return e._logger.debug("contentStart()"),e._preloading?(e._preloading=!1,void(e._adPlaying||(e._ignorePlayerState=!1,e._cwsSession.setPlayerState(e._pooledPlayerState)))):void e._logger.warning("contentStart(): called without contentPreload, ignoring")},this.reportError=function(n,r){if(e._logger.info("reportError(): "+n),N.isValidString(n))if(r===t.Client.ErrorSeverity.FATAL||r===t.Client.ErrorSeverity.WARNING)if(e._ignoreError)e._logger.debug("reportError(): ignored");else{var i=r===t.Client.ErrorSeverity.FATAL;e._cwsSession.sendError(n,i)}else e._logger.error("reportError(): invalid error severity: "+r);else e._logger.error("reportError(): invalid error message string: "+n)},this.updateContentMetadata=function(t){e._logger.debug("updateContentMetadata(): enter"),e._exceptionCatcher.runProtected("Session.updateContentMetadata",function(){e.mergeContentMetadata(t),e.setStatesFromContentMetadata()})},this.sendCustomEvent=function(t,n){e._logger.info("sendEvent(): eventName="+t+e.sessionTypeTag()),e._cwsSession.enqueueCustomEvent(t,n)},this.mergeContentMetadata=function(n){var r={},o={};if(N.isValidString(n.assetName)&&(e._contentMetadata.assetName!=n.assetName?(null!=e._contentMetadata.assetName&&(r[y.REQUEST_KEY_ASSET_NAME]=e._contentMetadata.assetName),o[y.REQUEST_KEY_ASSET_NAME]=n.assetName,e._contentMetadata.assetName=n.assetName):e._logger.warning("mergeContentMetadata(): assetName was not changed.")),N.isValidString(n.applicationName)&&(e._contentMetadata.applicationName!=n.applicationName?(null!=e._contentMetadata.applicationName&&(void 0===r[y.REQUEST_KEY_STREAM_METADATA_CHANGE]&&(r[y.REQUEST_KEY_STREAM_METADATA_CHANGE]={}),r[y.REQUEST_KEY_STREAM_METADATA_CHANGE][y.REQUEST_KEY_PLAYER_NAME]=e._contentMetadata.applicationName),void 0===o[y.REQUEST_KEY_STREAM_METADATA_CHANGE]&&(o[y.REQUEST_KEY_STREAM_METADATA_CHANGE]={}),o[y.REQUEST_KEY_STREAM_METADATA_CHANGE][y.REQUEST_KEY_PLAYER_NAME]=n.applicationName,e._contentMetadata.applicationName=n.applicationName):e._logger.warning("mergeContentMetadata(): applicationName was not changed.")),N.isValidString(n.streamUrl)&&(e._contentMetadata.streamUrl!=n.streamUrl?(null!=e._contentMetadata.streamUrl&&(r[y.REQUEST_KEY_STREAM_URL]=e._contentMetadata.streamUrl),o[y.REQUEST_KEY_STREAM_URL]=n.streamUrl,e._contentMetadata.streamUrl=n.streamUrl):e._logger.warning("mergeContentMetadata(): streamUrl was not changed.")),N.isValidString(n.viewerId)&&(e._contentMetadata.viewerId!=n.viewerId?(null!=e._contentMetadata.viewerId&&(void 0===r[y.REQUEST_KEY_STREAM_METADATA_CHANGE]&&(r[y.REQUEST_KEY_STREAM_METADATA_CHANGE]={}),r[y.REQUEST_KEY_STREAM_METADATA_CHANGE][y.REQUEST_KEY_VIEWER_ID]=e._contentMetadata.viewerId),void 0===o[y.REQUEST_KEY_STREAM_METADATA_CHANGE]&&(o[y.REQUEST_KEY_STREAM_METADATA_CHANGE]={}),o[y.REQUEST_KEY_STREAM_METADATA_CHANGE][y.REQUEST_KEY_VIEWER_ID]=n.viewerId,e._contentMetadata.viewerId=n.viewerId):e._logger.warning("mergeContentMetadata(): viewerId was not changed.")),N.isValidString(n.defaultResource)&&(e._contentMetadata.defaultResource!=n.defaultResource?(null!=e._contentMetadata.defaultResource&&(r[y.REQUEST_KEY_RESOURCE]=e._contentMetadata.defaultResource),o[y.REQUEST_KEY_RESOURCE]=n.defaultResource,e._contentMetadata.defaultResource=n.defaultResource):e._logger.warning("mergeContentMetadata(): defaultResource was not changed.")),N.isInteger(n.duration)&&n.duration>0&&(e._contentMetadata.duration!=n.duration?(e._cwsSession._contentLengthSec>0&&(r[y.REQUEST_KEY_CONTENT_LENGTH]=e._cwsSession._contentLengthSec),o[y.REQUEST_KEY_CONTENT_LENGTH]=n.duration,e._contentMetadata.duration=n.duration):e._logger.warning("mergeContentMetadata(): duration was not changed.")),N.isInteger(n.encodedFrameRate)&&n.encodedFrameRate>0&&(e._contentMetadata.encodedFrameRate!=n.encodedFrameRate?(e._contentMetadata.encodedFrameRate>-1&&(r[y.REQUEST_KEY_ENCODED_FRAME_RATE]=e._contentMetadata.encodedFrameRate),o[y.REQUEST_KEY_ENCODED_FRAME_RATE]=n.encodedFrameRate,e._contentMetadata.encodedFrameRate=n.encodedFrameRate):e._logger.warning("mergeContentMetadata(): encodedFrameRate was not changed.")),n.streamType!=i.StreamType.UNKNOWN&&(e._contentMetadata.streamType!=n.streamType?(e._contentMetadata.streamType!=i.StreamType.UNKNOWN&&(e._contentMetadata.streamType==t.ContentMetadata.StreamType.LIVE?r[y.REQUEST_KEY_IS_LIVE]=!0:r[y.REQUEST_KEY_IS_LIVE]=!1),n.streamType==t.ContentMetadata.StreamType.LIVE?o[y.REQUEST_KEY_IS_LIVE]=!0:o[y.REQUEST_KEY_IS_LIVE]=!1,e._contentMetadata.streamType=n.streamType):e._logger.warning("mergeContentMetadata(): streamType was not changed.")),N.dictCount(n.custom)>0){var a={},s={};for(var u in n.custom){var c=e._contentMetadata.custom[u];c!=n.custom[u]?(a[u]=n.custom[u],e._contentMetadata.custom[u]&&(s[u]=e._contentMetadata.custom[u]),e._contentMetadata.custom[u]=n.custom[u]):e._logger.info("mergeContentMetadata(): custom."+u+" was not changed.")}N.dictCount(a)>0?(N.dictCount(s)>0&&(r[y.REQUEST_KEY_TAGS]=s),o[y.REQUEST_KEY_TAGS]=a):e._logger.warning("mergeContentMetadata(): custom was not changed.")}N.dictCount(o)>0&&e._cwsSession.declareStateChange(o,r)},this.isGlobalSession=function(){return e._global==v.SESSION_TYPE.GLOBAL},this.isVideoSession=function(){return e._global==v.SESSION_TYPE.VIDEO},this.isAdSession=function(){return e._global==v.SESSION_TYPE.AD},this.sessionTypeTag=function(){return e.isGlobalSession()?" (global session)":""}});m.DEFAULT_HEARTBEAT_ERROR_MESSAGE="received no response (or a bad response) to heartbeat POST request";var S=e.SessionFactory=function(){var t=this;t._logger=null,t._logBuffer=null,t._nextSessionKey=0,t._sessionsByKey=null,function(e,n,r,i){t._client=e,t._clientSettings=n,t._clientConfig=r,t._systemFactory=i,t._logger=t._systemFactory.buildLogger(),t._logger.setModuleName("SessionFactory"),t._nextSessionKey=0,t._sessionsByKey={}}.apply(t,arguments),this.cleanup=function(){for(var e in t._logger=null,t._logBuffer=null,t._sessionsByKey){var n=t._sessionsByKey[e];n.cleanup()}t._sessionsByKey=null,t._nextSessionKey=0},this.newSessionKey=function(){var e=t._nextSessionKey;return t._nextSessionKey++,e},this.makeVideoSession=function(e,n){return null==e&&(e=new i),t.makeSession(e,n)},this.makeGlobalSession=function(e){return t.makeSession(e,v.SESSION_TYPE.GLOBAL)},this.generateSessionId=function(){return P.integer32()},this.makeSession=function(e,n){var r=e.clone(),i=t.generateSessionId(),o=t._systemFactory.buildSession(t._client,t._clientSettings,t._clientConfig,i,n,r),a=t.newSessionKey();return t.addSession(a,o),o.start(),a},this.getSession=function(e){var n=t._sessionsByKey[e];return null==n&&t._logger.error("Client: invalid sessionKey. Did you cleanup that session previously?"),n},this.getVideoSession=function(e){var n=this.getSession(e);return null!=n&&(n.isVideoSession()||n.isAdSession()||(t._logger.error("Client: invalid sessionKey. Did you cleanup that session previously?"),n=null)),n},this.addSession=function(e,n){t._sessionsByKey[e]=n},this.removeSession=function(e){delete t._sessionsByKey[e]},this.cleanupSession=function(e){var n=t.getSession(e);t.removeSession(e),n.cleanup()}},T=e.CallbackWithTimeout=function(t){this._timer=t,this.getWrapperCallback=function(t,e,n){var r=!1;return this._timer.createOnce(function(){r||(r=!0,t(!1,n+" ("+e+" ms)"))},e,"CallbackWithTimeout.wrap"),function(e,n){r||(r=!0,t(e,n))}}},A=e.Config=function(t,e,n){var r=this;this._logger=t,this._logger.setModuleName("Config"),this._storage=e,this._jsonInterface=n,this._defaultConfig={clientId:y.DEFAULT_CLIENT_ID,sendLogs:!1,maxHbInfos:y.DEFAULT_MAX_HEARTBEAT_INFOS},this._config=N.ObjectShallowCopy(this._defaultConfig),this._loaded=!1,this._loadedEmpty=!1,this._waitingConsumers=[],this.isReady=function(){return this._loaded},this.load=function(){this._storage.load(A.STORAGE_KEY,function(t,e){t?(r._parse(e),r._logger.debug("load(): configuration successfully loaded from local storage"+(r._loadedEmpty?" (was empty)":"")+".")):r._logger.error("load(): error loading configuration from local storage: "+e),r._loaded=!0,r._notify()})},this._parse=function(t){var e=this._jsonInterface.decode(t);if(null!=e){var n=e[A.CONFIG_STORAGE_KEY_CLIENT_ID];null!=n&&n!=y.DEFAULT_CLIENT_ID&&""!=n&&"null"!=n&&(this._config[A.CONFIG_KEY_CLIENT_ID]=n,this._logger.debug("parse(): loaded clientId="+n+" (from local storage)"))}else this._loadedEmpty=!0},this._marshall=function(){var t={};return t[A.CONFIG_STORAGE_KEY_CLIENT_ID]=this._config.clientId,this._logger.debug("_marshall(): saving clientId="+this._config.clientId+" (to local storage)"),this._jsonInterface.encode(t)},this.save=function(){this._storage.save(A.STORAGE_KEY,this._marshall(),function(t,e){t?r._logger.debug("save(): configuration successfully saved to local storage."):r._logger.error("save(): error saving configuration to local storage: "+e)})},this.register=function(t){return this.isReady()?void t():void this._waitingConsumers.push(t)},this.get=function(t){return this._loaded?this._config[t]:null},this.set=function(t,e){this._loaded&&(this._config[t]=e)},this._notify=function(){for(var t;null!=(t=this._waitingConsumers.shift());)t()}};A.STORAGE_KEY="sdkConfig",A.CONFIG_STORAGE_KEY_CLIENT_ID="clId",A.CONFIG_KEY_CLIENT_ID="clientId",A.CONFIG_KEY_SEND_LOGS="sendLogs",A.CONFIG_KEY_MAX_HEARTBEAT_INFOS="maxHbInfos";var O=e.EventQueue=function(){this._events=[],this._nextEventNumber=0,this.enqueue=function(t){this._events.push(t)},this.getNumber=function(){var t=this._nextEventNumber;return this._nextEventNumber++,t},this.flush=function(){var t=this._events;return this._events=[],t}},R=e.ExceptionCatcher=function(t,e,n){this._logger=t,this._logger.setModuleName("ExceptionCatcher"),this._ping=e,this._systemSettings=n,this.runProtected=function(t,e,n){try{e()}catch(e){if(null!=n)n(e);else{if(this._systemSettings.allowUncaughtExceptions)throw e;this.onUncaughtException(t,e)}}},this.onUncaughtException=function(t,e){var n="Uncaught exception: "+t+": "+e.toString();if(null!=this._ping)try{this._ping.send(n)}catch(t){this._logger.error("Caught exception while sending ping: "+t.toString())}this._logger.error(n)}},I=e.GatewayControl=function(t,e,n,r){var i=this;this._clientSettings=t,this._logger=e,this._logger.setModuleName("GatewayControl"),this._httpClient=n,this._jsonInterface=r,this.send=function(t,e){var n=this._jsonInterface.encode(t),r=this._clientSettings.gatewayUrl+y.gatewayPath;this._httpClient.request("POST",r,n,"application/json",function(t,n){if(t){var r=i._jsonInterface.decode(n);e(t,r)}else{var o=n;e(t,o)}})}},N=e.Lang={};N.isMeaningfulString=function(t){return N.isValidString(t)&&null!=t&&"undefined"!=t&&"null"!=t},N.sanitizeStringToStringObject=function(t){var e={};for(var n in t)if(N.isMeaningfulString(n)){var r=t[n];N.isMeaningfulString(r)&&(e[n]=r)}return e},N.validateInterface=function(t,e,n){if(null==t)throw new Error("Expected "+n+" implementation is null.");for(var r in e)if("function"!=typeof t[r])throw new Error("Expected method "+r+" in "+n+" implementation.")},N.dictCount=function(t){var e,n=0;for(e in t)t.hasOwnProperty(e)&&n++;return n},N.ToString=function(t){return""+t},N.NumberToInt=function(t){return Math.floor(t)},N.NumberToUnsignedInt=function(t){return Math.abs(N.NumberToInt(t))},N.AsBoolean=function(t){return Boolean(t)},N.isValidString=function(t){return"string"==typeof t&&""!==t},N.stringStartsWith=function(t,e){return"string"==typeof t&&"string"==typeof e&&"function"==typeof t.indexOf&&0===t.indexOf(e)},N.isBoolean=function(t){return"boolean"==typeof t},N.UrlEncodeString=function(t){return escape(t)},N.isObject=function(t){return"object"==typeof t},N.ObjectToString=function(t){var e="";for(var n in t){var r=t[n],i=r;e+=n+"="+i}return"Object{"+e+"}"},N.ObjectShallowCopyOmitNull=function(t){var e=N.ObjectShallowCopy(t);for(var n in e)null==e[n]&&delete e[n];return e},N.ObjectShallowCopy=function(t){var e={};for(var n in t)e[n]=t[n];return e},N.ObjectShallowEquals=function(t,e){if(typeof t!=typeof e)return!1;if(t instanceof Object&&e instanceof Object){if(N.dictCount(t)!==N.dictCount(e))return!1;for(var n in t)if(t[n]!==e[n])return!1;return!0}return t===e},N.isInteger=function(t){if("number"!=typeof t)return!1;var e=Math.round(t);return e===t},N.isArray=function(t){return"[object Array]"===Object.prototype.toString.call(t)},N.ArrayEquals=function(t,e){if(t===e)return!0;if(null==t||null==e)return!1;if(t.length!=e.length)return!1;for(var n=0;n<t.length;++n)if(N.isArray(t[n])&&N.isArray(e[n])){if(!N.ArrayEquals(t[n],e[n]))return!1}else if(t[n]!==e[n])return!1;return!0},N.isObjectDefinePropertyPresent=function(){return void 0!==Object.defineProperty&&function(){try{return Object.defineProperty({},"x",{}),!0}catch(t){return!1}}()},N.defGet=function(t,e,n){if(N.isObjectDefinePropertyPresent())Object.defineProperty(t,e,{configurable:!0,enumerable:!0,get:n});else{if(void 0===t.__defineGetter__)throw new Error("JavaScript runtime must support either Object.defineProperty or __defineGetter__");t.__defineGetter__(e,n)}},N.defSet=function(t,e,n){if(N.isObjectDefinePropertyPresent())Object.defineProperty(t,e,{configurable:!0,set:n});else{if(void 0===t.__defineSetter__)throw new Error("JavaScript runtime must support either Object.defineProperty or __defineSetter__");t.__defineSetter__(e,n)}},function(){var t={two32:4294967296};t.MaxValue=t.two32-1,t.MinValue=0,N.UInt32=t,N.UInt32.Cast=function(e){var n=parseInt(e,10);return n>t.MaxValue?n%=t.two32:n<t.MinValue&&(n=-n%t.two32,n=t.two32-n),n},N.UInt32.InRange=function(e){var n=parseInt(e,10);return n<=t.MaxValue&&n>=t.MinValue};var e={MaxValue:2147483647,MinValue:-2147483648};N.Int32=e,N.Int32.Cast=function(t){var n=parseInt(t,10);return n>e.MaxValue?n%=e.MaxValue:n<e.MinValue&&(n=e.MaxValue-(n=-n%e.MaxValue)),n},N.Int32.InRange=function(t){var n=parseInt(t,10);return n<=e.MaxValue&&n>=e.MinValue}}();var w=e.LogBuffer=function(){this._buffer=[],this.add=function(t){this._buffer.length>=32&&this._buffer.shift(),this._buffer.push(t)},this.flush=function(){var t=this._buffer;return this._buffer=[],t}},C=e.Ping=function(t,e,r){this._isSendingPing=!1,this._cachedBasePingUrl=null,this._logger=t,this._logger.setModuleName("Ping"),this._httpClient=e,this._clientSettings=r,this.send=function(t){if(!this._isSendingPing){this._isSendingPing=!0;var e=this.getBasePingUrl()+"&d="+N.UrlEncodeString(t.toString());this._logger.error("send(): "+e),this._httpClient.request("GET",e,null,null,null),this._isSendingPing=!1}},this.getBasePingUrl=function(){if(!this._cachedBasePingUrl){var t=C.SERVICE_URL+"?comp="+C.COMPONENT_NAME+"&clv="+n.version;if(this._clientSettings&&(t+="&cid="+this._clientSettings.customerKey),t+="&sch="+y.SDK_METADATA_SCHEMA,!this._clientSettings)return t;this._cachedBasePingUrl=t}return this._cachedBasePingUrl}};C.COMPONENT_NAME="sdkjs",C.SERVICE_URL="https://pings.conviva.com/ping.ping";var P=e.Random={};P.maxUInt32=4294967295,P.maxInt32=2147483647,P.minInt32=-2147483648,P.integer32=function(){return Math.floor(Math.random()*P.maxUInt32)+P.minInt32},P.uinteger32=function(){return Math.floor(Math.random()*P.maxUInt32)};var L=e.Sanitize={};L.Integer=function(t,e,n,r){if(isNaN(t))return r;if("number"!=typeof t)return r;if(t==r)return r;var i=N.NumberToInt(t);return L.EnforceBoundaries(i,e,n)},L.EnforceBoundaries=function(t,e,n){return null!=n&&t>n?t=n:null!=e&&e>t&&(t=e),t},L.sanitizeSpecialIntegerValue=function(t){return-1==t||-2==t?t:t=L.Integer(t,0,null,-1)};var M=(e.StreamerError=function(){var t=this;t.errorCode=null,t.severity=n.ErrorSeverity.FATAL,function(e,n){t.errorCode=e,t.severity=n}.apply(t,arguments)},e.HttpClient=function(t,e,n,r){this._logger=t,this._logger.setModuleName("HttpClient"),this._httpInterface=e,this._callbackWithTimeout=n,this._systemSettings=r,this.request=function(t,e,n,r,i){var o=1e3*this._systemSettings.httpTimeout,a=this._callbackWithTimeout.getWrapperCallback(i,o,"HTTP timeout");this._logger.debug("request(): calling HttpInterface.makeRequest"),this._httpInterface.makeRequest(t,e,n,r,o,a)}}),U=e.Logger=function(t,e,n,r,i){this._loggingInterface=t,this._timeInterface=e,this._settings=n,this._logBuffer=r,this._packageName=i,this.debug=function(t){this.log(t,a.LogLevel.DEBUG)},this.info=function(t){this.log(t,a.LogLevel.INFO)},this.warning=function(t){this.log(t,a.LogLevel.WARNING)},this.error=function(t){this.log(t,a.LogLevel.ERROR)},this.log=function(t,e){var n=this.formatMessage(t,e);this._logBuffer.add(n),this._settings.logLevel<=e&&this._loggingInterface.consoleLog(n,e)},this.prependModuleName=function(t){var e=t;return e="["+this._moduleName+"] "+e},this.prependPackageName=function(t){var e=t;return e="["+this._packageName+"] "+e},this.prependConvivaNamespace=function(t){var e=t;return e="[Conviva] "+e},this.prependTime=function(t){var e=this._timeInterface.getEpochTimeMs(),n=(e/1e3).toFixed(3).toString();return"["+n+"] "+t},this.prependLogLevel=function(t,e){var n=U.getLogLevelString(e),r=t;return r="["+n+"] "+r},this.prependSessionId=function(t){var e=t;return null!=this._sessionId&&(e="sid="+this._sessionId+" "+e),e},this.setSessionId=function(t){this._sessionId=t},this.setModuleName=function(t){this._moduleName=t},this.formatMessage=function(t,e){return this.prependConvivaNamespace(this.prependTime(this.prependLogLevel(this.prependPackageName(this.prependModuleName(this.prependSessionId(t))),e)))}};U.getLogLevelString=function(t){var e;switch(t){case a.LogLevel.ERROR:e="ERROR";break;case a.LogLevel.WARNING:e="WARNING";break;case a.LogLevel.INFO:e="INFO";break;case a.LogLevel.DEBUG:e="DEBUG"}return e};var x=e.Storage=function(t,e,n,r){this._logger=t,this._logger.setModuleName("Storage"),this._storageInterface=e,this._callbackWithTimeout=n,this._systemSettings=r,this.load=function(t,e){var n=this._callbackWithTimeout.getWrapperCallback(e,1e3*this._systemSettings.storageTimeout,"storage load timeout");this._logger.debug("load(): calling StorageInterface.loadData"),this._storageInterface.loadData(x.STORAGE_SPACE,t,n)},this.save=function(t,e,n){var r=this._callbackWithTimeout.getWrapperCallback(n,1e3*this._systemSettings.storageTimeout,"storage save timeout");this._logger.debug("save(): calling StorageInterface.saveData"),this._storageInterface.saveData(x.STORAGE_SPACE,t,e,r)}};x.STORAGE_SPACE="Conviva";var D=e.SystemMetadata=function(t,e,r){this._logger=t,this._logger.setModuleName("SystemMetadata"),this._metadataInterface=e,this._exceptionCatcher=r,this._cachedMetadata=null,this.get=function(){return this._cachedMetadata||this.retrieve(),this._cachedMetadata},this.retrieve=function(){function t(t,e){r._exceptionCatcher.runProtected("Session.getSystemMetadataSchema(): "+t,function(){var n=e[t];e[t]=n.call(r._metadataInterface)})}var e={};e[D.BROWSER_NAME]=this._metadataInterface.getBrowserName,e[D.BROWSER_VERSION]=this._metadataInterface.getBrowserVersion,e[D.DEVICE_BRAND]=this._metadataInterface.getDeviceBrand,e[D.DEVICE_MANUFACTURER]=this._metadataInterface.getDeviceManufacturer,e[D.DEVICE_MODEL]=this._metadataInterface.getDeviceModel,e[D.DEVICE_TYPE]=this._metadataInterface.getDeviceType,e[D.DEVICE_VERSION]=this._metadataInterface.getDeviceVersion,e[D.FRAMEWORK_NAME]=this._metadataInterface.getFrameworkName,e[D.FRAMEWORK_VERSION]=this._metadataInterface.getFrameworkVersion,e[D.OPERATING_SYSTEM_NAME]=this._metadataInterface.getOperatingSystemName,e[D.OPERATING_SYSTEM_VERSION]=this._metadataInterface.getOperatingSystemVersion;var r=this;for(var i in this._logger.debug("retrieve(): calling MetadataInterface methods"),e)t(i,e),N.isValidString(e[i])||delete e[i];e[D.DEVICE_TYPE]!==n.DeviceType.DESKTOP&&e[D.DEVICE_TYPE]!==n.DeviceType.CONSOLE&&e[D.DEVICE_TYPE]!==n.DeviceType.SETTOP&&e[D.DEVICE_TYPE]!==n.DeviceType.MOBILE&&e[D.DEVICE_TYPE]!==n.DeviceType.TABLET&&e[D.DEVICE_TYPE]!==n.DeviceType.SMARTTV&&delete e[D.DEVICE_TYPE],this._cachedMetadata=N.ObjectShallowCopyOmitNull(e)}};D.BROWSER_NAME="browserName",D.BROWSER_VERSION="browserVersion",D.DEVICE_BRAND="deviceBrand",D.DEVICE_MANUFACTURER="deviceManufacturer",D.DEVICE_MODEL="deviceModel",D.DEVICE_TYPE="deviceType",D.DEVICE_VERSION="deviceVersion",D.FRAMEWORK_NAME="frameworkName",D.FRAMEWORK_VERSION="frameworkVersion",D.OPERATING_SYSTEM_NAME="operatingSystemName",D.OPERATING_SYSTEM_VERSION="operatingSystemVersion";var j=e.Time=function(t,e){this._timeInterface=t,this._logger=e,this._logger.setModuleName("Time"),this.current=function(){var t=this._timeInterface.getEpochTimeMs();return N.isInteger(t)||this._logger.error("current(): TimeInterface.getEpochTimeMs() did not return an integer ("+t+")"),t}},F=e.Timer=function(t,e,n){var r=this;this._logger=t,this._logger.setModuleName("Timer"),this._timerInterface=e,this._exceptionCatcher=n,this.create=function(t,e,n){var i=this.createTimer(function(){r._exceptionCatcher.runProtected(n,function(){t()})},e,n);return i},this.createOnce=function(t,e,n){var i={cancel:null},o=this.createTimer(function(){r._exceptionCatcher.runProtected(n,function(){i&&"function"==typeof i.cancel&&(i.cancel(),i.cancel=null,i=null),t()})},e,n);return i.cancel=o,o},this.createTimer=function(t,e,n){return this._logger.debug("createTimer(): calling TimerInterface.create"),this._timerInterface.createTimer(t,e,n)}}}()}(),t})?r.call(e,n,e,t):r)||(t.exports=i),t.exports.default=t.exports},function(t,e,n){"use strict";n.d(e,"a",function(){return l});var r=n(0),i=n(42),o=n(43),a=n(14),s=n(26),u=n(16),c=n(27),l=function(t){function e(e,n,r){var i=t.call(this)||this;switch(i.syncErrorValue=null,i.syncErrorThrown=!1,i.syncErrorThrowable=!1,i.isStopped=!1,arguments.length){case 0:i.destination=o.a;break;case 1:if(!e){i.destination=o.a;break}if("object"==typeof e){if(function(t){return t instanceof l||"syncErrorThrowable"in t&&t[s.a]}(e)){var a=e[s.a]();i.syncErrorThrowable=a.syncErrorThrowable,i.destination=a,a.add(i)}else i.syncErrorThrowable=!0,i.destination=new f(i,e);break}default:i.syncErrorThrowable=!0,i.destination=new f(i,e,n,r)}return i}return r.a(e,t),e.prototype[s.a]=function(){return this},e.create=function(t,n,r){var i=new e(t,n,r);return i.syncErrorThrowable=!1,i},e.prototype.next=function(t){this.isStopped||this._next(t)},e.prototype.error=function(t){this.isStopped||(this.isStopped=!0,this._error(t))},e.prototype.complete=function(){this.isStopped||(this.isStopped=!0,this._complete())},e.prototype.unsubscribe=function(){this.closed||(this.isStopped=!0,t.prototype.unsubscribe.call(this))},e.prototype._next=function(t){this.destination.next(t)},e.prototype._error=function(t){this.destination.error(t),this.unsubscribe()},e.prototype._complete=function(){this.destination.complete(),this.unsubscribe()},e.prototype._unsubscribeAndRecycle=function(){var t=this._parent,e=this._parents;return this._parent=null,this._parents=null,this.unsubscribe(),this.closed=!1,this.isStopped=!1,this._parent=t,this._parents=e,this},e}(a.a),f=function(t){function e(e,n,r,a){var s,u=t.call(this)||this;u._parentSubscriber=e;var c=u;return Object(i.a)(n)?s=n:n&&(s=n.next,r=n.error,a=n.complete,n!==o.a&&(c=Object.create(n),Object(i.a)(c.unsubscribe)&&u.add(c.unsubscribe.bind(c)),c.unsubscribe=u.unsubscribe.bind(u))),u._context=c,u._next=s,u._error=r,u._complete=a,u}return r.a(e,t),e.prototype.next=function(t){if(!this.isStopped&&this._next){var e=this._parentSubscriber;u.a.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?this.__tryOrSetError(e,this._next,t)&&this.unsubscribe():this.__tryOrUnsub(this._next,t)}},e.prototype.error=function(t){if(!this.isStopped){var e=this._parentSubscriber,n=u.a.useDeprecatedSynchronousErrorHandling;if(this._error)n&&e.syncErrorThrowable?(this.__tryOrSetError(e,this._error,t),this.unsubscribe()):(this.__tryOrUnsub(this._error,t),this.unsubscribe());else if(e.syncErrorThrowable)n?(e.syncErrorValue=t,e.syncErrorThrown=!0):Object(c.a)(t),this.unsubscribe();else{if(this.unsubscribe(),n)throw t;Object(c.a)(t)}}},e.prototype.complete=function(){var t=this;if(!this.isStopped){var e=this._parentSubscriber;if(this._complete){var n=function(){return t._complete.call(t._context)};u.a.useDeprecatedSynchronousErrorHandling&&e.syncErrorThrowable?(this.__tryOrSetError(e,n),this.unsubscribe()):(this.__tryOrUnsub(n),this.unsubscribe())}else this.unsubscribe()}},e.prototype.__tryOrUnsub=function(t,e){try{t.call(this._context,e)}catch(t){if(this.unsubscribe(),u.a.useDeprecatedSynchronousErrorHandling)throw t;Object(c.a)(t)}},e.prototype.__tryOrSetError=function(t,e,n){if(!u.a.useDeprecatedSynchronousErrorHandling)throw new Error("bad call");try{e.call(this._context,n)}catch(e){return u.a.useDeprecatedSynchronousErrorHandling?(t.syncErrorValue=e,t.syncErrorThrown=!0,!0):(Object(c.a)(e),!0)}return!1},e.prototype._unsubscribe=function(){var t=this._parentSubscriber;this._context=null,this._parentSubscriber=null,t.unsubscribe()},e}(l)},function(t,e,n){"use strict";var r;!function(t){t.CAPTIONS="captions",t.CONFIG="config",t.FRAME="frame",t.MEDIA="media",t.LOCAL_STORAGE="localStorage",t.PLAYBACK="playback",t.TIMELINE="timeline",t.VOLUME="volume"}(r||(r={})),e.a=r},function(t,e,n){"use strict";var r=n(8),i=n(26),o=n(43),a=n(29),s=n(19),u=n(16);n.d(e,"a",function(){return c});var c=function(){function t(t){this._isScalar=!1,t&&(this._subscribe=t)}return t.prototype.lift=function(e){var n=new t;return n.source=this,n.operator=e,n},t.prototype.subscribe=function(t,e,n){var a=this.operator,s=function(t,e,n){if(t){if(t instanceof r.a)return t;if(t[i.a])return t[i.a]()}return t||e||n?new r.a(t,e,n):new r.a(o.a)}(t,e,n);if(a?a.call(s,this.source):s.add(this.source||u.a.useDeprecatedSynchronousErrorHandling&&!s.syncErrorThrowable?this._subscribe(s):this._trySubscribe(s)),u.a.useDeprecatedSynchronousErrorHandling&&s.syncErrorThrowable&&(s.syncErrorThrowable=!1,s.syncErrorThrown))throw s.syncErrorValue;return s},t.prototype._trySubscribe=function(t){try{return this._subscribe(t)}catch(e){u.a.useDeprecatedSynchronousErrorHandling&&(t.syncErrorThrown=!0,t.syncErrorValue=e),t.error(e)}},t.prototype.forEach=function(t,e){var n=this;return new(e=l(e))(function(e,r){var i;i=n.subscribe(function(e){try{t(e)}catch(t){r(t),i&&i.unsubscribe()}},r,e)})},t.prototype._subscribe=function(t){var e=this.source;return e&&e.subscribe(t)},t.prototype[a.a]=function(){return this},t.prototype.pipe=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 0===t.length?this:function(t){return t?1===t.length?t[0]:function(e){return t.reduce(function(t,e){return e(t)},e)}:s.a}(t)(this)},t.prototype.toPromise=function(t){var e=this;return new(t=l(t))(function(t,n){var r;e.subscribe(function(t){return r=t},function(t){return n(t)},function(){return t(r)})})},t.create=function(e){return new t(e)},t}();function l(t){if(t||(t=u.a.Promise||Promise),!t)throw new Error("no Promise impl found");return t}},function(t,e,n){"use strict";var r;!function(t){t.HIDDEN="HIDDEN",t.TOP_LEFT="TOP_LEFT",t.TOP_RIGHT="TOP_RIGHT",t.BOTTOM_LEFT="BOTTOM_LEFT",t.BOTTOM_RIGHT="BOTTOM_RIGHT"}(r||(r={})),e.a=r},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n(0),i=n(40),o=n(38);function a(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){var n;"function"==typeof t[t.length-1]&&(n=t.pop());var r=t;return e.lift(new s(r,n))}}var s=function(){function t(t,e){this.observables=t,this.project=e}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.observables,this.project))},t}(),u=function(t){function e(e,n,r){var i=t.call(this,e)||this;i.observables=n,i.project=r,i.toRespond=[];var a=n.length;i.values=new Array(a);for(var s=0;s<a;s++)i.toRespond.push(s);for(s=0;s<a;s++){var u=n[s];i.add(Object(o.a)(i,u,u,s))}return i}return r.a(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.values[n]=e;var o=this.toRespond;if(o.length>0){var a=o.indexOf(n);-1!==a&&o.splice(a,1)}},e.prototype.notifyComplete=function(){},e.prototype._next=function(t){if(0===this.toRespond.length){var e=[t].concat(this.values);this.project?this._tryProject(e):this.destination.next(e)}},e.prototype._tryProject=function(t){var e;try{e=this.project.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(i.a)},function(t,e,n){"use strict";var r;!function(t){t.ENDED="ended",t.PAUSE="pause",t.LOADED_META_DATA="loadedmetadata",t.PLAY="play",t.VOLUME_CHANGE="volumechange"}(r||(r={})),e.a=r},function(t,e,n){"use strict";var r=Array.isArray||function(t){return t&&"number"==typeof t.length},i=n(67),o=n(42),a=n(44),s=n(15),u=n(0),c=function(t){function e(n){var r=t.call(this,n?n.length+" errors occurred during unsubscription:\n  "+n.map(function(t,e){return e+1+") "+t.toString()}).join("\n  "):"")||this;return r.errors=n,r.name="UnsubscriptionError",Object.setPrototypeOf(r,e.prototype),r}return u.a(e,t),e}(Error);n.d(e,"a",function(){return l});var l=function(){function t(t){this.closed=!1,this._parent=null,this._parents=null,this._subscriptions=null,t&&(this._unsubscribe=t)}var e;return t.prototype.unsubscribe=function(){var t,e=!1;if(!this.closed){var n=this._parent,u=this._parents,l=this._unsubscribe,h=this._subscriptions;this.closed=!0,this._parent=null,this._parents=null,this._subscriptions=null;for(var d=-1,p=u?u.length:0;n;)n.remove(this),n=++d<p&&u[d]||null;if(Object(o.a)(l)&&Object(a.a)(l).call(this)===s.a&&(e=!0,t=t||(s.a.e instanceof c?f(s.a.e.errors):[s.a.e])),r(h))for(d=-1,p=h.length;++d<p;){var _=h[d];if(Object(i.a)(_)&&Object(a.a)(_.unsubscribe).call(_)===s.a){e=!0,t=t||[];var E=s.a.e;E instanceof c?t=t.concat(f(E.errors)):t.push(E)}}if(e)throw new c(t)}},t.prototype.add=function(e){if(!e||e===t.EMPTY)return t.EMPTY;if(e===this)return this;var n=e;switch(typeof e){case"function":n=new t(e);case"object":if(n.closed||"function"!=typeof n.unsubscribe)return n;if(this.closed)return n.unsubscribe(),n;if("function"!=typeof n._addParent){var r=n;(n=new t)._subscriptions=[r]}break;default:throw new Error("unrecognized teardown "+e+" added to Subscription.")}return(this._subscriptions||(this._subscriptions=[])).push(n),n._addParent(this),n},t.prototype.remove=function(t){var e=this._subscriptions;if(e){var n=e.indexOf(t);-1!==n&&e.splice(n,1)}},t.prototype._addParent=function(t){var e=this._parent,n=this._parents;e&&e!==t?n?-1===n.indexOf(t)&&n.push(t):this._parents=[t]:this._parent=t},t.EMPTY=((e=new t).closed=!0,e),t}();function f(t){return t.reduce(function(t,e){return t.concat(e instanceof c?e.errors:e)},[])}},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r={e:{}}},function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=!1,i={Promise:void 0,set useDeprecatedSynchronousErrorHandling(t){t&&(new Error).stack,r=t},get useDeprecatedSynchronousErrorHandling(){return r}}},function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n(0),i=n(8),o=n(44),a=n(15);function s(t,e){return function(n){return n.lift(new u(t,e))}}var u=function(){function t(t,e){this.compare=t,this.keySelector=e}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.compare,this.keySelector))},t}(),c=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.keySelector=r,i.hasKey=!1,"function"==typeof n&&(i.compare=n),i}return r.a(e,t),e.prototype.compare=function(t,e){return t===e},e.prototype._next=function(t){var e=t;if(this.keySelector&&(e=Object(o.a)(this.keySelector)(t))===a.a)return this.destination.error(a.a.e);var n=!1;if(this.hasKey){if((n=Object(o.a)(this.compare)(this.key,e))===a.a)return this.destination.error(a.a.e)}else this.hasKey=!0;!1===Boolean(n)&&(this.key=e,this.destination.next(t))},e}(i.a)},function(t,e,n){"use strict";var r;!function(t){t.DASH="DASH",t.HLS="HLS",t.NONE="NONE",t.SMOOTHSTREAMING="SMOOTHSTREAMING"}(r||(r={})),e.a=r},function(t,e,n){"use strict";function r(){}n.d(e,"a",function(){return r})},function(t,e,n){"use strict";var r;!function(t){t.TIME_UPDATE="TIME_UPDATE",t.CUE_CHANGE="CUE_CHANGE",t.AUTOPLAY_REJECTION="AUTOPLAY_REJECTION",t.READY="READY"}(r||(r={})),e.a=r},function(t,e,n){"use strict";var r;!function(t){t.MANIFEST_REQUEST_FAILED_DURING_LOAD="MANIFEST_REQUEST_FAILED_DURING_LOAD",t.SEGMENT_REQUEST_FAILED_DURING_LOAD="SEGMENT_REQUEST_FAILED_DURING_LOAD",t.MANIFEST_REQUEST_FAILED_DURING_PLAYBACK="MANIFEST_REQUEST_FAILED_DURING_PLAYBACK",t.SEGMENT_REQUEST_FAILED_DURING_PLAYBACK="SEGMENT_REQUEST_FAILED_DURING_PLAYBACK",t.REQUEST_TIMEOUT="REQUEST_TIMEOUT",t.UNSUPPORTED_FORMAT="UNSUPPORTED_FORMAT",t.CERTIFICATE_REQUEST_FAILED="CERTIFICATE_REQUEST_FAILED",t.CDM_UNAVAILABLE="CDM_UNAVAILABLE",t.LICENSE_REQUEST_FAILED="LICENSE_REQUEST_FAILED",t.PLAYBACK_INTERRUPTED_CONNECTION_LOST="PLAYBACK_INTERRUPTED_CONNECTION_LOST",t.UNKNOWN_SOLUTION_ERROR="UNKNOWN_SOLUTION_ERROR",t.CONSUMER="CONSUMER",t.NONE="NONE"}(r||(r={})),e.a=r},function(t,e,n){"use strict";var r;!function(t){t.FAIRPLAY="FAIRPLAY",t.NONE="NONE",t.PLAYREADY="PLAYREADY",t.WIDEVINE="WIDEVINE"}(r||(r={})),e.a=r},function(t,e,n){"use strict";var r;!function(t){t.DEVELOPMENT="development",t.PRODUCTION="production",t.TEST="test"}(r||(r={})),e.a=r},function(t,e,n){"use strict";var r=n(76),i=n(17);e.a=function(t){return t.pipe(Object(r.a)("playbackStatus"),Object(i.a)())}},function(t,e,n){"use strict";var r=n(18);e.a=function(t){return t.match(/\.mpd/)?r.a.DASH:t.match(/\.m3u/)?r.a.HLS:t.match(/\.ism/)?r.a.SMOOTHSTREAMING:r.a.NONE}},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("rxSubscriber"):"@@rxSubscriber"},function(t,e,n){"use strict";function r(t){setTimeout(function(){throw t})}n.d(e,"a",function(){return r})},function(t,e,n){"use strict";var r=function(t){return t.toString().split(".")},i=function(t){return parseInt(t.replace(/[^\d.]/g,""),10)};e.a=function(t,e){for(var n=r(t),o=r(e),a=Math.min(o.length,n.length),s=0;s<a;s++){var u=i(o[s]),c=i(n[s]);if(u<c)return!0;if(u>c)return!1}return!0}},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r="function"==typeof Symbol&&Symbol.observable||"@@observable"},function(t,e,n){"use strict";n.d(e,"a",function(){return r}),n.d(e,"b",function(){return i}),n.d(e,"c",function(){return o}),n.d(e,"d",function(){return a}),n.d(e,"e",function(){return s}),n.d(e,"f",function(){return u}),n.d(e,"g",function(){return c}),n.d(e,"h",function(){return l}),n.d(e,"i",function(){return f}),n.d(e,"j",function(){return h}),n.d(e,"k",function(){return d}),n.d(e,"l",function(){return p}),n.d(e,"m",function(){return _}),n.d(e,"n",function(){return E}),n.d(e,"o",function(){return y}),n.d(e,"p",function(){return b}),n.d(e,"s",function(){return g}),n.d(e,"q",function(){return v}),n.d(e,"r",function(){return m}),n.d(e,"t",function(){return S}),n.d(e,"u",function(){return T}),n.d(e,"v",function(){return A}),n.d(e,"w",function(){return O}),n.d(e,"x",function(){return R}),n.d(e,"y",function(){return I}),n.d(e,"z",function(){return N}),n.d(e,"A",function(){return w}),n.d(e,"B",function(){return C}),n.d(e,"C",function(){return P}),n.d(e,"D",function(){return L}),n.d(e,"F",function(){return M}),n.d(e,"E",function(){return U}),n.d(e,"G",function(){return x}),n.d(e,"H",function(){return D}),n.d(e,"I",function(){return j}),n.d(e,"M",function(){return F}),n.d(e,"J",function(){return V}),n.d(e,"L",function(){return k}),n.d(e,"K",function(){return Y}),n.d(e,"N",function(){return K}),n.d(e,"O",function(){return B}),n.d(e,"P",function(){return G}),n.d(e,"Q",function(){return H});var r="PLAYER",i="PLAYER_BAR",o="PLAYER_BAR_VISIBLE",a="PLAYER_BUTTON_ENTER_FULLSCREEN",s="PLAYER_BUTTON_EXIT_FULLSCREEN",u="PLAYER_BUTTON_FAST_FORWARD",c="PLAYER_BUTTON_FAST_FORWARD_VISIBLE",l="PLAYER_BUTTON_MUTE",f="PLAYER_BUTTON_PAUSE",h="PLAYER_BUTTON_PLAY",d="PLAYER_BUTTON_RETURN_TO_LIVE",p="PLAYER_BUTTON_RETURN_TO_LIVE_VISIBLE",_="PLAYER_BUTTON_REWIND",E="PLAYER_BUTTON_REWIND_VISIBLE",y="PLAYER_BUTTON_UNMUTE",b="PLAYER_CAPTIONS_MENU",g="PLAYER_CAPTIONS_MENU_OPTION",v="PLAYER_CAPTIONS_MENU_BUTTON_ACTIVE",m="PLAYER_CAPTIONS_MENU_BUTTON_INACTIVE",S="PLAYER_COUNTER_CURRENT_TIME",T="PLAYER_COUNTER_CURRENT_TIME_VISIBLE",A="PLAYER_COUNTER_TIMECODE",O="PLAYER_COUNTER_TIMECODE_VISIBLE",R="PLAYER_CUE",I="PLAYER_FRAME",N="PLAYER_LIVE_INDICATOR",w="PLAYER_LIVE_INDICATOR_VISIBLE",C="PLAYER_PLAYBACK_BUTTONS",P="PLAYER_PLAYBACK_BUTTONS_VISIBLE",L="PLAYER_POSTER",M="PLAYER_SETTINGS_CONTAINER",U="PLAYER_SETTINGS_CLOSE",x="PLAYER_SOLUTION",D="PLAYER_SPINNER",j="PLAYER_TIMELINE",F="PLAYER_TIMELINE_VISIBLE",V="PLAYER_TIMELINE_INSPECT",k="PLAYER_TIMELINE_PROGRESS",Y="PLAYER_TIMELINE_PLAYHEAD",K="PLAYER_UI",B="PLAYER_VOLUME_CONTROL",G="PLAYER_VOLUME_CONTROL_VISIBLE",H="PLAYER_VOLUME_TRACK"},function(t,e,n){"use strict";var r=n(23);e.a=function(t){return"production"===r.a.DEVELOPMENT||"production"===r.a.TEST?t:null}},function(t,e,n){"use strict";var r;!function(t){t.CHROME="CHROME",t.SAFARI="SAFARI",t.FIREFOX="FIREFOX",t.INTERNET_EXPLORER="INTERNET_EXPLORER",t.EDGE="EDGE",t.OPERA="OPERA",t.UNKNOWN="UNKNOWN"}(r||(r={}));var i,o=r;!function(t){t.CONSOLE="CONSOLE",t.DESKTOP="DESKTOP",t.DONGLE="DONGLE",t.MOBILE="MOBILE",t.TV="TV"}(i||(i={}));var a,s=i;!function(t){t.ANDROID="ANDROID",t.IOS="IOS",t.OSX="OSX",t.WINDOWS="WINDOWS",t.LINUX="LINUX",t.UNKNOWN="UNKNOWN"}(a||(a={}));var u=a,c=n(28),l="NT 6.1",f="NT 6.2",h=function(){function t(){}return Object.defineProperty(t.prototype,"isChrome",{get:function(){return this.browser===o.CHROME},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isFirefox",{get:function(){return this.browser===o.FIREFOX},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isSafari",{get:function(){return this.browser===o.SAFARI},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isEdge",{get:function(){return this.browser===o.EDGE},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isInternetExplorer",{get:function(){return this.browser===o.INTERNET_EXPLORER},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isOpera",{get:function(){return this.browser===o.OPERA},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isOsx",{get:function(){return this.os===u.OSX},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isWindows",{get:function(){return this.os===u.WINDOWS},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isLinux",{get:function(){return this.os===u.LINUX},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isDesktop",{get:function(){return this.deviceType===s.DESKTOP},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isMobile",{get:function(){return this.deviceType===s.MOBILE},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isTv",{get:function(){return this.deviceType===s.TV},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isConsole",{get:function(){return this.deviceType===s.CONSOLE},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isDongle",{get:function(){return this.deviceType===s.DONGLE},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isOldWindows",{get:function(){return this.isWindows&&[l,f].includes(this.osVersion)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isInternetExplorer11OnOldWindows",{get:function(){return this.isOldWindows&&this.isInternetExplorer&&this.isBrowserVersionLessThan("12")},enumerable:!0,configurable:!0}),t.prototype.isBrowserVersionAtLeast=function(t){return Object(c.a)(this.browserVersion,t)},t.prototype.isOsVersionAtLeast=function(t){return Object(c.a)(this.osVersion,t)},t.prototype.isBrowserVersionLessThan=function(t){return!this.isBrowserVersionAtLeast(t)},t.prototype.isOsVersionLessThan=function(t){return!this.isOsVersionAtLeast(t)},t}(),d={},p=(-1).toString(),_=function(t){return t?t[1]:p};e.a=function(t){if(d[t]instanceof h)return d[t];var e=function(t){return/(MSIE|rv:11.*(?=like Gecko))/.test(t)?o.INTERNET_EXPLORER:/like Gecko.*(?=Edge\/)/.test(t)?o.EDGE:/Safari/.test(t)&&!/Chrome/.test(t)?o.SAFARI:!/Chrome/.test(t)||/Edge/.test(t)||/OPR/.test(t)?/firefox/i.test(t)?o.FIREFOX:/(OPR|Opera)/.test(t)?o.OPERA:o.UNKNOWN:o.CHROME}(t),n=function(t){return/Win/g.test(t)?u.WINDOWS:/like Mac OS X/g.test(t)?u.IOS:/Mac/g.test(t)?u.OSX:/android/gi.test(t)?u.ANDROID:/Linux/g.test(t)?u.LINUX:u.UNKNOWN}(t),r={browser:e,browserVersion:function(t,e){var n;return(n={},n[o.CHROME]=function(t){return _(/Chrome\/([\d.]+)/g.exec(t))},n[o.SAFARI]=function(t){return _(/Version\/([\d.]+)/g.exec(t))},n[o.FIREFOX]=function(t){return _(/Firefox\/([\d.]+)/g.exec(t))},n[o.OPERA]=function(t){return _(/Version\/([\d.]+)/g.exec(t))},n[o.INTERNET_EXPLORER]=function(t){return _(/(?:MSIE |Trident\/.*; rv:)([\d.]+)/g.exec(t))},n[o.EDGE]=function(t){return _(/Edge\/([\d.]+)/g.exec(t))},n[o.UNKNOWN]=function(t){return p},n)[t](e)}(e,t),os:n,osVersion:function(t,e){var n;return(n={},n[u.ANDROID]=function(t){return _(/android ([\d\.]+);/gi.exec(t))},n[u.IOS]=function(t){return _(/ OS ([\d_]+)/g.exec(t)).replace(/_/g,".")},n[u.OSX]=function(t){return _(/Mac OS X ([\d_]+)/g.exec(t)).replace(/_/g,".")},n[u.WINDOWS]=function(t){return _(/Windows ([\w\. ]+);/g.exec(t))},n[u.LINUX]=function(t){return p},n[u.UNKNOWN]=function(t){return p},n)[t](e)}(n,t),deviceType:function(t,e){switch(t){case u.IOS:case u.ANDROID:return s.MOBILE;default:return s.DESKTOP}}(n)};return d[t]=Object.assign(new h,r)}},function(t,e,n){"use strict";var r;!function(t){t[t.XS=0]="XS",t[t.S=1]="S",t[t.M=2]="M",t[t.L=3]="L",t[t.XL=4]="XL"}(r||(r={})),e.a=r},function(t,e,n){"use strict";e.a=function(t,e,n){return void 0===t&&(t=navigator.onLine),void 0===e&&(e=fetch),void 0===n&&(n=2e3),function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})}(void 0,void 0,void 0,function(){return function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}(this,function(r){switch(r.label){case 0:return t?[4,new Promise(function(t){var r=setTimeout(function(){return t(!1)},n);e("https://www.dazn.com",{method:"HEAD"}).then(function(e){clearTimeout(r),t(e.ok)}).catch(function(){return t(!1)})})]:[2,!1];case 1:return[2,r.sent()]}})})}},function(t,e,n){"use strict";var r=n(22);e.a=function(t){return t.match(/\.mpd/)?r.a.WIDEVINE:t.match(/\.m3u/)?r.a.FAIRPLAY:t.match(/\.ism/)?r.a.PLAYREADY:r.a.NONE}},function(t,n){t.exports=e},function(t,e,n){var r=n(70);"string"==typeof r&&(r=[[t.i,r,""]]),n(68)(r,{hmr:!0,transform:void 0,insertInto:void 0}),r.locals&&(t.exports=r.locals)},function(t,e,n){"use strict";var r=n(0),i=function(t){function e(e,n,r){var i=t.call(this)||this;return i.parent=e,i.outerValue=n,i.outerIndex=r,i.index=0,i}return r.a(e,t),e.prototype._next=function(t){this.parent.notifyNext(this.outerValue,t,this.outerIndex,this.index++,this)},e.prototype._error=function(t){this.parent.notifyError(t,this),this.unsubscribe()},e.prototype._complete=function(){this.parent.notifyComplete(this),this.unsubscribe()},e}(n(8).a),o=n(66);function a(t,e,n,r){var a=new i(t,n,r);return Object(o.a)(e)(a)}n.d(e,"a",function(){return a})},function(t,e,n){"use strict";n.d(e,"a",function(){return u});var r=n(0),i=n(40),o=n(38),a=n(4),s=n(59);function u(t,e){return"function"==typeof e?function(n){return n.pipe(u(function(n,r){return Object(s.a)(t(n,r)).pipe(Object(a.a)(function(t,i){return e(n,t,r,i)}))}))}:function(e){return e.lift(new c(t))}}var c=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new l(t,this.project))},t}(),l=function(t){function e(e,n){var r=t.call(this,e)||this;return r.project=n,r.index=0,r}return r.a(e,t),e.prototype._next=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){var r=this.innerSubscription;r&&r.unsubscribe(),this.add(this.innerSubscription=Object(o.a)(this,t,e,n))},e.prototype._complete=function(){var e=this.innerSubscription;e&&!e.closed||t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.innerSubscription=null},e.prototype.notifyComplete=function(e){this.remove(e),this.innerSubscription=null,this.isStopped&&t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(e)},e}(i.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n(0),i=function(t){function e(){return null!==t&&t.apply(this,arguments)||this}return r.a(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(e)},e.prototype.notifyError=function(t,e){this.destination.error(t)},e.prototype.notifyComplete=function(t){this.destination.complete()},e}(n(8).a)},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r="function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"},function(t,e,n){"use strict";function r(t){return"function"==typeof t}n.d(e,"a",function(){return r})},function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n(16),i=n(27),o={closed:!0,next:function(t){},error:function(t){if(r.a.useDeprecatedSynchronousErrorHandling)throw t;Object(i.a)(t)},complete:function(){}}},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r,i=n(15);function o(){try{return r.apply(this,arguments)}catch(t){return i.a.e=t,i.a}}function a(t){return r=t,o}},function(t,e,n){(e=t.exports=n(49)(!1)).push([t.i,".fill___fill___3xEK0 {\n    position: absolute;\n    top: 0;\n    left: 0;\n    width: 100%;\n    height: 100%;\n}",""]),e.locals={fill:"fill___fill___3xEK0"}},function(t,e){t.exports={indexOf:function(t,e){var n,r;if(Array.prototype.indexOf)return t.indexOf(e);for(n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1},forEach:function(t,e,n){var r,i;if(Array.prototype.forEach)return t.forEach(e,n);for(r=0,i=t.length;r<i;r++)e.call(n,t[r],r,t)},trim:function(t){return String.prototype.trim?t.trim():t.replace(/(^\s*)|(\s*$)/g,"")},spaceIndex:function(t){var e=/\s|\n|\t/.exec(t);return e?e.index:-1}}},function(t,e,n){var r=n(53),i=n(74);for(var o in(e=t.exports=function(t,e){return new i(e).process(t)}).FilterCSS=i,r)e[o]=r[o];"undefined"!=typeof window&&(window.filterCSS=t.exports)},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n(0),i=n(8),o=n(57);function a(t,e){return void 0===e&&(e=o.a),function(n){return n.lift(new s(t,e))}}var s=function(){function t(t,e){this.dueTime=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new u(t,this.dueTime,this.scheduler))},t}(),u=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.dueTime=n,i.scheduler=r,i.debouncedSubscription=null,i.lastValue=null,i.hasValue=!1,i}return r.a(e,t),e.prototype._next=function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(c,this.dueTime,this))},e.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},e.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var t=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}},e.prototype.clearDebounce=function(){var t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)},e}(i.a);function c(t){t.debouncedNext()}},function(t,e){t.exports=function(t){var e=[];return e.toString=function(){return this.map(function(e){var n=function(t,e){var n,r=t[1]||"",i=t[3];if(!i)return r;if(e&&"function"==typeof btoa){var o=(n=i,"/*# sourceMappingURL=data:application/json;charset=utf-8;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(n))))+" */"),a=i.sources.map(function(t){return"/*# sourceURL="+i.sourceRoot+t+" */"});return[r].concat(a).concat([o]).join("\n")}return[r].join("\n")}(e,t);return e[2]?"@media "+e[2]+"{"+n+"}":n}).join("")},e.i=function(t,n){"string"==typeof t&&(t=[[null,t,""]]);for(var r={},i=0;i<this.length;i++){var o=this[i][0];"number"==typeof o&&(r[o]=!0)}for(i=0;i<t.length;i++){var a=t[i];"number"==typeof a[0]&&r[a[0]]||(n&&!a[2]?a[2]=n:n&&(a[2]="("+a[2]+") and ("+n+")"),e.push(a))}},e}},function(t,e,n){"use strict";n.r(e);var r=n(32);n.d(e,"getUserDevice",function(){return r.a});var i=n(28);n.d(e,"isVersionAtLeast",function(){return i.a});var o=n(25);n.d(e,"inferAbrFormatFromSrc",function(){return o.a});var a=n(35);n.d(e,"inferDrmTypeFromSrc",function(){return a.a});var s=n(34);n.d(e,"getIsConnectionOk",function(){return s.a})},function(t,e,n){var r=n(46);function i(t){var e=r.spaceIndex(t);if(-1===e)var n=t.slice(1,-1);else n=t.slice(1,e+1);return"/"===(n=r.trim(n).toLowerCase()).slice(0,1)&&(n=n.slice(1)),"/"===n.slice(-1)&&(n=n.slice(0,-1)),n}function o(t){return"</"===t.slice(0,2)}var a=/[^a-zA-Z0-9_:\.\-]/gim;function s(t,e){for(;e<t.length;e++){var n=t[e];if(" "!==n)return"="===n?e:-1}}function u(t,e){for(;e>0;e--){var n=t[e];if(" "!==n)return"="===n?e:-1}}function c(t){return function(t){return'"'===t[0]&&'"'===t[t.length-1]||"'"===t[0]&&"'"===t[t.length-1]}(t)?t.substr(1,t.length-2):t}e.parseTag=function(t,e,n){"user strict";var r="",a=0,s=!1,u=!1,c=0,l=t.length,f="",h="";for(c=0;c<l;c++){var d=t.charAt(c);if(!1===s){if("<"===d){s=c;continue}}else if(!1===u){if("<"===d){r+=n(t.slice(a,c)),s=c,a=c;continue}if(">"===d){r+=n(t.slice(a,s)),f=i(h=t.slice(s,c+1)),r+=e(s,r.length,f,h,o(h)),a=c+1,s=!1;continue}if(('"'===d||"'"===d)&&"="===t.charAt(c-1)){u=d;continue}}else if(d===u){u=!1;continue}}return a<t.length&&(r+=n(t.substr(a))),r},e.parseAttr=function(t,e){"user strict";var n=0,i=[],o=!1,l=t.length;function f(t,n){if(!((t=(t=r.trim(t)).replace(a,"").toLowerCase()).length<1)){var o=e(t,n||"");o&&i.push(o)}}for(var h=0;h<l;h++){var d,p=t.charAt(h);if(!1!==o||"="!==p)if(!1===o||h!==n||'"'!==p&&"'"!==p||"="!==t.charAt(h-1)){if(/\s|\n|\t/.test(p)){if(t=t.replace(/\s|\n|\t/g," "),!1===o){if(-1===(d=s(t,h))){f(r.trim(t.slice(n,h))),o=!1,n=h+1;continue}h=d-1;continue}if(-1===(d=u(t,h-1))){f(o,c(r.trim(t.slice(n,h)))),o=!1,n=h+1;continue}}}else{if(-1===(d=t.indexOf(p,h+1)))break;f(o,r.trim(t.slice(n+1,d))),o=!1,n=(h=d)+1}else o=t.slice(n,h),n=h+1}return n<t.length&&(!1===o?f(t.slice(n)):f(o,c(r.trim(t.slice(n))))),r.trim(i.join(" "))}},function(t,e){t.exports={indexOf:function(t,e){var n,r;if(Array.prototype.indexOf)return t.indexOf(e);for(n=0,r=t.length;n<r;n++)if(t[n]===e)return n;return-1},forEach:function(t,e,n){var r,i;if(Array.prototype.forEach)return t.forEach(e,n);for(r=0,i=t.length;r<i;r++)e.call(n,t[r],r,t)},trim:function(t){return String.prototype.trim?t.trim():t.replace(/(^\s*)|(\s*$)/g,"")},trimRight:function(t){return String.prototype.trimRight?t.trimRight():t.replace(/(\s*$)/g,"")}}},function(t,e){function n(){return{"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice":!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1}}var r=/javascript\s*\:/gim;e.whiteList={"align-content":!1,"align-items":!1,"align-self":!1,"alignment-adjust":!1,"alignment-baseline":!1,all:!1,"anchor-point":!1,animation:!1,"animation-delay":!1,"animation-direction":!1,"animation-duration":!1,"animation-fill-mode":!1,"animation-iteration-count":!1,"animation-name":!1,"animation-play-state":!1,"animation-timing-function":!1,azimuth:!1,"backface-visibility":!1,background:!0,"background-attachment":!0,"background-clip":!0,"background-color":!0,"background-image":!0,"background-origin":!0,"background-position":!0,"background-repeat":!0,"background-size":!0,"baseline-shift":!1,binding:!1,bleed:!1,"bookmark-label":!1,"bookmark-level":!1,"bookmark-state":!1,border:!0,"border-bottom":!0,"border-bottom-color":!0,"border-bottom-left-radius":!0,"border-bottom-right-radius":!0,"border-bottom-style":!0,"border-bottom-width":!0,"border-collapse":!0,"border-color":!0,"border-image":!0,"border-image-outset":!0,"border-image-repeat":!0,"border-image-slice":!0,"border-image-source":!0,"border-image-width":!0,"border-left":!0,"border-left-color":!0,"border-left-style":!0,"border-left-width":!0,"border-radius":!0,"border-right":!0,"border-right-color":!0,"border-right-style":!0,"border-right-width":!0,"border-spacing":!0,"border-style":!0,"border-top":!0,"border-top-color":!0,"border-top-left-radius":!0,"border-top-right-radius":!0,"border-top-style":!0,"border-top-width":!0,"border-width":!0,bottom:!1,"box-decoration-break":!0,"box-shadow":!0,"box-sizing":!0,"box-snap":!0,"box-suppress":!0,"break-after":!0,"break-before":!0,"break-inside":!0,"caption-side":!1,chains:!1,clear:!0,clip:!1,"clip-path":!1,"clip-rule":!1,color:!0,"color-interpolation-filters":!0,"column-count":!1,"column-fill":!1,"column-gap":!1,"column-rule":!1,"column-rule-color":!1,"column-rule-style":!1,"column-rule-width":!1,"column-span":!1,"column-width":!1,columns:!1,contain:!1,content:!1,"counter-increment":!1,"counter-reset":!1,"counter-set":!1,crop:!1,cue:!1,"cue-after":!1,"cue-before":!1,cursor:!1,direction:!1,display:!0,"display-inside":!0,"display-list":!0,"display-outside":!0,"dominant-baseline":!1,elevation:!1,"empty-cells":!1,filter:!1,flex:!1,"flex-basis":!1,"flex-direction":!1,"flex-flow":!1,"flex-grow":!1,"flex-shrink":!1,"flex-wrap":!1,float:!1,"float-offset":!1,"flood-color":!1,"flood-opacity":!1,"flow-from":!1,"flow-into":!1,font:!0,"font-family":!0,"font-feature-settings":!0,"font-kerning":!0,"font-language-override":!0,"font-size":!0,"font-size-adjust":!0,"font-stretch":!0,"font-style":!0,"font-synthesis":!0,"font-variant":!0,"font-variant-alternates":!0,"font-variant-caps":!0,"font-variant-east-asian":!0,"font-variant-ligatures":!0,"font-variant-numeric":!0,"font-variant-position":!0,"font-weight":!0,grid:!1,"grid-area":!1,"grid-auto-columns":!1,"grid-auto-flow":!1,"grid-auto-rows":!1,"grid-column":!1,"grid-column-end":!1,"grid-column-start":!1,"grid-row":!1,"grid-row-end":!1,"grid-row-start":!1,"grid-template":!1,"grid-template-areas":!1,"grid-template-columns":!1,"grid-template-rows":!1,"hanging-punctuation":!1,height:!0,hyphens:!1,icon:!1,"image-orientation":!1,"image-resolution":!1,"ime-mode":!1,"initial-letters":!1,"inline-box-align":!1,"justify-content":!1,"justify-items":!1,"justify-self":!1,left:!1,"letter-spacing":!0,"lighting-color":!0,"line-box-contain":!1,"line-break":!1,"line-grid":!1,"line-height":!1,"line-snap":!1,"line-stacking":!1,"line-stacking-ruby":!1,"line-stacking-shift":!1,"line-stacking-strategy":!1,"list-style":!0,"list-style-image":!0,"list-style-position":!0,"list-style-type":!0,margin:!0,"margin-bottom":!0,"margin-left":!0,"margin-right":!0,"margin-top":!0,"marker-offset":!1,"marker-side":!1,marks:!1,mask:!1,"mask-box":!1,"mask-box-outset":!1,"mask-box-repeat":!1,"mask-box-slice":!1,"mask-box-source":!1,"mask-box-width":!1,"mask-clip":!1,"mask-image":!1,"mask-origin":!1,"mask-position":!1,"mask-repeat":!1,"mask-size":!1,"mask-source-type":!1,"mask-type":!1,"max-height":!0,"max-lines":!1,"max-width":!0,"min-height":!0,"min-width":!0,"move-to":!1,"nav-down":!1,"nav-index":!1,"nav-left":!1,"nav-right":!1,"nav-up":!1,"object-fit":!1,"object-position":!1,opacity:!1,order:!1,orphans:!1,outline:!1,"outline-color":!1,"outline-offset":!1,"outline-style":!1,"outline-width":!1,overflow:!1,"overflow-wrap":!1,"overflow-x":!1,"overflow-y":!1,padding:!0,"padding-bottom":!0,"padding-left":!0,"padding-right":!0,"padding-top":!0,page:!1,"page-break-after":!1,"page-break-before":!1,"page-break-inside":!1,"page-policy":!1,pause:!1,"pause-after":!1,"pause-before":!1,perspective:!1,"perspective-origin":!1,pitch:!1,"pitch-range":!1,"play-during":!1,position:!1,"presentation-level":!1,quotes:!1,"region-fragment":!1,resize:!1,rest:!1,"rest-after":!1,"rest-before":!1,richness:!1,right:!1,rotation:!1,"rotation-point":!1,"ruby-align":!1,"ruby-merge":!1,"ruby-position":!1,"shape-image-threshold":!1,"shape-outside":!1,"shape-margin":!1,size:!1,speak:!1,"speak-as":!1,"speak-header":!1,"speak-numeral":!1,"speak-punctuation":!1,"speech-rate":!1,stress:!1,"string-set":!1,"tab-size":!1,"table-layout":!1,"text-align":!0,"text-align-last":!0,"text-combine-upright":!0,"text-decoration":!0,"text-decoration-color":!0,"text-decoration-line":!0,"text-decoration-skip":!0,"text-decoration-style":!0,"text-emphasis":!0,"text-emphasis-color":!0,"text-emphasis-position":!0,"text-emphasis-style":!0,"text-height":!0,"text-indent":!0,"text-justify":!0,"text-orientation":!0,"text-overflow":!0,"text-shadow":!0,"text-space-collapse":!0,"text-transform":!0,"text-underline-position":!0,"text-wrap":!0,top:!1,transform:!1,"transform-origin":!1,"transform-style":!1,transition:!1,"transition-delay":!1,"transition-duration":!1,"transition-property":!1,"transition-timing-function":!1,"unicode-bidi":!1,"vertical-align":!1,visibility:!1,"voice-balance":!1,"voice-duration":!1,"voice-family":!1,"voice-pitch":!1,"voice-range":!1,"voice-rate":!1,"voice-stress":!1,"voice-volume":!1,volume:!1,"white-space":!1,widows:!1,width:!0,"will-change":!1,"word-break":!0,"word-spacing":!0,"word-wrap":!0,"wrap-flow":!1,"wrap-through":!1,"writing-mode":!1,"z-index":!1},e.getDefaultWhiteList=n,e.onAttr=function(t,e,n){},e.onIgnoreAttr=function(t,e,n){},e.safeAttrValue=function(t,e){return r.test(e)?"":e}},function(t,e,n){var r=n(47).FilterCSS,i=n(47).getDefaultWhiteList,o=n(46),a=new r;function s(t){return t.replace(u,"&lt;").replace(c,"&gt;")}var u=/</g,c=/>/g,l=/"/g,f=/&quot;/g,h=/&#([a-zA-Z0-9]*);?/gim,d=/&colon;?/gim,p=/&newline;?/gim,_=/((j\s*a\s*v\s*a|v\s*b|l\s*i\s*v\s*e)\s*s\s*c\s*r\s*i\s*p\s*t\s*|m\s*o\s*c\s*h\s*a)\:/gi,E=/e\s*x\s*p\s*r\s*e\s*s\s*s\s*i\s*o\s*n\s*\(.*/gi,y=/u\s*r\s*l\s*\(.*/gi;function b(t){return t.replace(l,"&quot;")}function g(t){return t.replace(f,'"')}function v(t){return t.replace(h,function(t,e){return"x"===e[0]||"X"===e[0]?String.fromCharCode(parseInt(e.substr(1),16)):String.fromCharCode(parseInt(e,10))})}function m(t){return t.replace(d,":").replace(p," ")}function S(t){for(var e="",n=0,r=t.length;n<r;n++)e+=t.charCodeAt(n)<32?" ":t.charAt(n);return o.trim(e)}function T(t){return t=S(t=m(t=v(t=g(t))))}function A(t){return t=s(t=b(t))}var O=/<!--[\s\S]*?-->/g;e.whiteList={a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],sup:[],strong:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","loop","preload","src","height","width"]},e.getDefaultWhiteList=function(){return{a:["target","href","title"],abbr:["title"],address:[],area:["shape","coords","href","alt"],article:[],aside:[],audio:["autoplay","controls","loop","preload","src"],b:[],bdi:["dir"],bdo:["dir"],big:[],blockquote:["cite"],br:[],caption:[],center:[],cite:[],code:[],col:["align","valign","span","width"],colgroup:["align","valign","span","width"],dd:[],del:["datetime"],details:["open"],div:[],dl:[],dt:[],em:[],font:["color","size","face"],footer:[],h1:[],h2:[],h3:[],h4:[],h5:[],h6:[],header:[],hr:[],i:[],img:["src","alt","title","width","height"],ins:["datetime"],li:[],mark:[],nav:[],ol:[],p:[],pre:[],s:[],section:[],small:[],span:[],sub:[],sup:[],strong:[],table:["width","border","align","valign"],tbody:["align","valign"],td:["width","rowspan","colspan","align","valign"],tfoot:["align","valign"],th:["width","rowspan","colspan","align","valign"],thead:["align","valign"],tr:["rowspan","align","valign"],tt:[],u:[],ul:[],video:["autoplay","controls","loop","preload","src","height","width"]}},e.onTag=function(t,e,n){},e.onIgnoreTag=function(t,e,n){},e.onTagAttr=function(t,e,n){},e.onIgnoreTagAttr=function(t,e,n){},e.safeAttrValue=function(t,e,n,r){if(n=T(n),"href"===e||"src"===e){if("#"===(n=o.trim(n)))return"#";if("http://"!==n.substr(0,7)&&"https://"!==n.substr(0,8)&&"mailto:"!==n.substr(0,7)&&"tel:"!==n.substr(0,4)&&"#"!==n[0]&&"/"!==n[0])return""}else if("background"===e){if(_.lastIndex=0,_.test(n))return""}else if("style"===e){if(E.lastIndex=0,E.test(n))return"";if(y.lastIndex=0,y.test(n)&&(_.lastIndex=0,_.test(n)))return"";!1!==r&&(n=(r=r||a).process(n))}return n=A(n)},e.escapeHtml=s,e.escapeQuote=b,e.unescapeQuote=g,e.escapeHtmlEntities=v,e.escapeDangerHtml5Entities=m,e.clearNonPrintableCharacter=S,e.friendlyAttrValue=T,e.escapeAttrValue=A,e.onIgnoreTagStripAll=function(){return""},e.StripTagBody=function(t,e){"function"!=typeof e&&(e=function(){});var n=!Array.isArray(t),r=[],i=!1;return{onIgnoreTag:function(a,s,u){if(function(e){return!!n||-1!==o.indexOf(t,e)}(a)){if(u.isClosing){var c="[/removed]",l=u.position+c.length;return r.push([!1!==i?i:u.position,l]),i=!1,c}return i||(i=u.position),"[removed]"}return e(a,s,u)},remove:function(t){var e="",n=0;return o.forEach(r,function(r){e+=t.slice(n,r[0]),n=r[1]}),e+=t.slice(n)}}},e.stripCommentTag=function(t){return t.replace(O,"")},e.stripBlankChar=function(t){var e=t.split("");return(e=e.filter(function(t){var e=t.charCodeAt(0);return!(127===e||e<=31&&10!==e&&13!==e)})).join("")},e.cssFilter=a,e.getDefaultCSSWhiteList=i},function(t,e,n){var r=n(54),i=n(51),o=n(72);for(var a in(e=t.exports=function(t,e){return new o(e).process(t)}).FilterXSS=o,r)e[a]=r[a];for(var a in i)e[a]=i[a];"undefined"!=typeof window&&(window.filterXSS=t.exports),"undefined"!=typeof self&&"undefined"!=typeof DedicatedWorkerGlobalScope&&self instanceof DedicatedWorkerGlobalScope&&(self.filterXSS=t.exports)},function(t,e){t.exports=n},function(t,e,n){"use strict";var r=n(0),i=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r}return r.a(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),setInterval(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n=!1,r=void 0;try{this.work(t)}catch(t){n=!0,r=!!t&&t||new Error(t)}if(n)return this.unsubscribe(),r},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,n=e.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},e}(function(t){function e(e,n){return t.call(this)||this}return r.a(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(n(14).a)),o=function(){function t(e,n){void 0===n&&(n=t.now),this.SchedulerAction=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(n,e)},t.now=function(){return Date.now()},t}(),a=function(t){function e(n,r){void 0===r&&(r=o.now);var i=t.call(this,n,function(){return e.delegate&&e.delegate!==i?e.delegate.now():r()})||this;return i.actions=[],i.active=!1,i.scheduled=void 0,i}return r.a(e,t),e.prototype.schedule=function(n,r,i){return void 0===r&&(r=0),e.delegate&&e.delegate!==this?e.delegate.schedule(n,r,i):t.prototype.schedule.call(this,n,r,i)},e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(o);n.d(e,"a",function(){return s});var s=new a(i)},function(t,e,n){"use strict";var r=n(0),i=n(10),o=n(8),a=n(14),s=function(t){function e(){var n=t.call(this,"object unsubscribed")||this;return n.name="ObjectUnsubscribedError",Object.setPrototypeOf(n,e.prototype),n}return r.a(e,t),e}(Error),u=function(t){function e(e,n){var r=t.call(this)||this;return r.subject=e,r.subscriber=n,r.closed=!1,r}return r.a(e,t),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},e}(a.a),c=n(26),l=function(t){function e(e){var n=t.call(this,e)||this;return n.destination=e,n}return r.a(e,t),e}(o.a),f=function(t){function e(){var e=t.call(this)||this;return e.observers=[],e.closed=!1,e.isStopped=!1,e.hasError=!1,e.thrownError=null,e}return r.a(e,t),e.prototype[c.a]=function(){return new l(this)},e.prototype.lift=function(t){var e=new h(this,this);return e.operator=t,e},e.prototype.next=function(t){if(this.closed)throw new s;if(!this.isStopped)for(var e=this.observers,n=e.length,r=e.slice(),i=0;i<n;i++)r[i].next(t)},e.prototype.error=function(t){if(this.closed)throw new s;this.hasError=!0,this.thrownError=t,this.isStopped=!0;for(var e=this.observers,n=e.length,r=e.slice(),i=0;i<n;i++)r[i].error(t);this.observers.length=0},e.prototype.complete=function(){if(this.closed)throw new s;this.isStopped=!0;for(var t=this.observers,e=t.length,n=t.slice(),r=0;r<e;r++)n[r].complete();this.observers.length=0},e.prototype.unsubscribe=function(){this.isStopped=!0,this.closed=!0,this.observers=null},e.prototype._trySubscribe=function(e){if(this.closed)throw new s;return t.prototype._trySubscribe.call(this,e)},e.prototype._subscribe=function(t){if(this.closed)throw new s;return this.hasError?(t.error(this.thrownError),a.a.EMPTY):this.isStopped?(t.complete(),a.a.EMPTY):(this.observers.push(t),new u(this,t))},e.prototype.asObservable=function(){var t=new i.a;return t.source=this,t},e.create=function(t,e){return new h(t,e)},e}(i.a),h=function(t){function e(e,n){var r=t.call(this)||this;return r.destination=e,r.source=n,r}return r.a(e,t),e.prototype.next=function(t){var e=this.destination;e&&e.next&&e.next(t)},e.prototype.error=function(t){var e=this.destination;e&&e.error&&this.destination.error(t)},e.prototype.complete=function(){var t=this.destination;t&&t.complete&&this.destination.complete()},e.prototype._subscribe=function(t){return this.source?this.source.subscribe(t):a.a.EMPTY},e}(f);function d(){return function(t){return t.lift(new p(t))}}var p=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var n=this.connectable;n._refCount++;var r=new _(t,n),i=e.subscribe(r);return r.closed||(r.connection=n.connect()),i},t}(),_=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return r.a(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var n=this.connection,r=t._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null},e}(o.a),E=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}return r.a(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new a.a).add(this.source.subscribe(new b(this.getSubject(),this))),t.closed?(this._connection=null,t=a.a.EMPTY):this._connection=t),t},e.prototype.refCount=function(){return d()(this)},e}(i.a).prototype,y={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:E._subscribe},_isComplete:{value:E._isComplete,writable:!0},getSubject:{value:E.getSubject},connect:{value:E.connect},refCount:{value:E.refCount}},b=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return r.a(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}},e}(l);function g(){return new f}function v(){return function(t){return d()((e=g,function(t){var n;n="function"==typeof e?e:function(){return e};var r=Object.create(t,y);return r.source=t,r.subjectFactory=n,r})(t));var e}}o.a,function(){function t(t,e){this.subjectFactory=t,this.selector=e}t.prototype.call=function(t,e){var n=this.selector,r=this.subjectFactory(),i=n(r).subscribe(t);return i.add(e.subscribe(r)),i}}(),n.d(e,"a",function(){return v})},function(t,e,n){"use strict";var r=n(10),i=n(62),o=n(64),a=n(29),s=n(41),u=n(14),c=n(63),l=n(61),f=n(60),h=n(65),d=n(66);function p(t,e){if(!e)return t instanceof r.a?t:new r.a(Object(d.a)(t));if(null!=t){if(function(t){return t&&"function"==typeof t[a.a]}(t))return function(t,e){return e?new r.a(function(n){var r=new u.a;return r.add(e.schedule(function(){var i=t[a.a]();r.add(i.subscribe({next:function(t){r.add(e.schedule(function(){return n.next(t)}))},error:function(t){r.add(e.schedule(function(){return n.error(t)}))},complete:function(){r.add(e.schedule(function(){return n.complete()}))}}))})),r}):new r.a(Object(h.a)(t))}(t,e);if(Object(i.a)(t))return function(t,e){return e?new r.a(function(n){var r=new u.a;return r.add(e.schedule(function(){return t.then(function(t){r.add(e.schedule(function(){n.next(t),r.add(e.schedule(function(){return n.complete()}))}))},function(t){r.add(e.schedule(function(){return n.error(t)}))})})),r}):new r.a(Object(l.a)(t))}(t,e);if(Object(o.a)(t))return function(t,e){return e?new r.a(function(n){var r=new u.a,i=0;return r.add(e.schedule(function(){i!==t.length?(n.next(t[i++]),n.closed||r.add(this.schedule())):n.complete()})),r}):new r.a(Object(c.a)(t))}(t,e);if(function(t){return t&&"function"==typeof t[s.a]}(t)||"string"==typeof t)return function(t,e){if(!t)throw new Error("Iterable cannot be null");return e?new r.a(function(n){var r,i=new u.a;return i.add(function(){r&&"function"==typeof r.return&&r.return()}),i.add(e.schedule(function(){r=t[s.a](),i.add(e.schedule(function(){if(!n.closed){var t,e;try{var i=r.next();t=i.value,e=i.done}catch(t){return void n.error(t)}e?n.complete():(n.next(t),this.schedule())}}))})),i}):new r.a(Object(f.a)(t))}(t,e)}throw new TypeError((null!==t&&typeof t||t)+" is not observable")}n.d(e,"a",function(){return p})},function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n(41),i=function(t){return function(e){for(var n=t[r.a]();;){var i=n.next();if(i.done){e.complete();break}if(e.next(i.value),e.closed)break}return"function"==typeof n.return&&e.add(function(){n.return&&n.return()}),e}}},function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n(27),i=function(t){return function(e){return t.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,r.a),e}}},function(t,e,n){"use strict";function r(t){return t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}n.d(e,"a",function(){return r})},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r=function(t){return function(e){for(var n=0,r=t.length;n<r&&!e.closed;n++)e.next(t[n]);e.closed||e.complete()}}},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t}},function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n(29),i=function(t){return function(e){var n=t[r.a]();if("function"!=typeof n.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return n.subscribe(e)}}},function(t,e,n){"use strict";n.d(e,"a",function(){return d});var r=n(10),i=n(63),o=n(61),a=n(60),s=n(65),u=n(64),c=n(62),l=n(67),f=n(41),h=n(29),d=function(t){if(t instanceof r.a)return function(e){return t._isScalar?(e.next(t.value),void e.complete()):t.subscribe(e)};if(t&&"function"==typeof t[h.a])return Object(s.a)(t);if(Object(u.a)(t))return Object(i.a)(t);if(Object(c.a)(t))return Object(o.a)(t);if(t&&"function"==typeof t[f.a])return Object(a.a)(t);var e=Object(l.a)(t)?"an invalid object":"'"+t+"'";throw new TypeError("You provided "+e+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")}},function(t,e,n){"use strict";function r(t){return null!=t&&"object"==typeof t}n.d(e,"a",function(){return r})},function(t,e,n){var r,i,o={},a=(r=function(){return window&&document&&document.all&&!window.atob},function(){return void 0===i&&(i=r.apply(this,arguments)),i}),s=function(t){var e={};return function(t){if("function"==typeof t)return t();if(void 0===e[t]){var n=function(t){return document.querySelector(t)}.call(this,t);if(window.HTMLIFrameElement&&n instanceof window.HTMLIFrameElement)try{n=n.contentDocument.head}catch(t){n=null}e[t]=n}return e[t]}}(),u=null,c=0,l=[],f=n(71);function h(t,e){for(var n=0;n<t.length;n++){var r=t[n],i=o[r.id];if(i){i.refs++;for(var a=0;a<i.parts.length;a++)i.parts[a](r.parts[a]);for(;a<r.parts.length;a++)i.parts.push(b(r.parts[a],e))}else{var s=[];for(a=0;a<r.parts.length;a++)s.push(b(r.parts[a],e));o[r.id]={id:r.id,refs:1,parts:s}}}}function d(t,e){for(var n=[],r={},i=0;i<t.length;i++){var o=t[i],a=e.base?o[0]+e.base:o[0],s={css:o[1],media:o[2],sourceMap:o[3]};r[a]?r[a].parts.push(s):n.push(r[a]={id:a,parts:[s]})}return n}function p(t,e){var n=s(t.insertInto);if(!n)throw new Error("Couldn't find a style target. This probably means that the value for the 'insertInto' parameter is invalid.");var r=l[l.length-1];if("top"===t.insertAt)r?r.nextSibling?n.insertBefore(e,r.nextSibling):n.appendChild(e):n.insertBefore(e,n.firstChild),l.push(e);else if("bottom"===t.insertAt)n.appendChild(e);else{if("object"!=typeof t.insertAt||!t.insertAt.before)throw new Error("[Style Loader]\n\n Invalid value for parameter 'insertAt' ('options.insertAt') found.\n Must be 'top', 'bottom', or Object.\n (https://github.com/webpack-contrib/style-loader#insertat)\n");var i=s(t.insertInto+" "+t.insertAt.before);n.insertBefore(e,i)}}function _(t){if(null===t.parentNode)return!1;t.parentNode.removeChild(t);var e=l.indexOf(t);e>=0&&l.splice(e,1)}function E(t){var e=document.createElement("style");return void 0===t.attrs.type&&(t.attrs.type="text/css"),y(e,t.attrs),p(t,e),e}function y(t,e){Object.keys(e).forEach(function(n){t.setAttribute(n,e[n])})}function b(t,e){var n,r,i,o;if(e.transform&&t.css){if(!(o=e.transform(t.css)))return function(){};t.css=o}if(e.singleton){var a=c++;n=u||(u=E(e)),r=m.bind(null,n,a,!1),i=m.bind(null,n,a,!0)}else t.sourceMap&&"function"==typeof URL&&"function"==typeof URL.createObjectURL&&"function"==typeof URL.revokeObjectURL&&"function"==typeof Blob&&"function"==typeof btoa?(n=function(t){var e=document.createElement("link");return void 0===t.attrs.type&&(t.attrs.type="text/css"),t.attrs.rel="stylesheet",y(e,t.attrs),p(t,e),e}(e),r=function(t,e,n){var r=n.css,i=n.sourceMap,o=void 0===e.convertToAbsoluteUrls&&i;(e.convertToAbsoluteUrls||o)&&(r=f(r)),i&&(r+="\n/*# sourceMappingURL=data:application/json;base64,"+btoa(unescape(encodeURIComponent(JSON.stringify(i))))+" */");var a=new Blob([r],{type:"text/css"}),s=t.href;t.href=URL.createObjectURL(a),s&&URL.revokeObjectURL(s)}.bind(null,n,e),i=function(){_(n),n.href&&URL.revokeObjectURL(n.href)}):(n=E(e),r=function(t,e){var n=e.css,r=e.media;if(r&&t.setAttribute("media",r),t.styleSheet)t.styleSheet.cssText=n;else{for(;t.firstChild;)t.removeChild(t.firstChild);t.appendChild(document.createTextNode(n))}}.bind(null,n),i=function(){_(n)});return r(t),function(e){if(e){if(e.css===t.css&&e.media===t.media&&e.sourceMap===t.sourceMap)return;r(t=e)}else i()}}t.exports=function(t,e){if("undefined"!=typeof DEBUG&&DEBUG&&"object"!=typeof document)throw new Error("The style-loader cannot be used in a non-browser environment");(e=e||{}).attrs="object"==typeof e.attrs?e.attrs:{},e.singleton||"boolean"==typeof e.singleton||(e.singleton=a()),e.insertInto||(e.insertInto="head"),e.insertAt||(e.insertAt="bottom");var n=d(t,e);return h(n,e),function(t){for(var r=[],i=0;i<n.length;i++){var a=n[i];(s=o[a.id]).refs--,r.push(s)}for(t&&h(d(t,e),e),i=0;i<r.length;i++){var s;if(0===(s=r[i]).refs){for(var u=0;u<s.parts.length;u++)s.parts[u]();delete o[s.id]}}}};var g,v=(g=[],function(t,e){return g[t]=e,g.filter(Boolean).join("\n")});function m(t,e,n,r){var i=n?"":r.css;if(t.styleSheet)t.styleSheet.cssText=v(e,i);else{var o=document.createTextNode(i),a=t.childNodes;a[e]&&t.removeChild(a[e]),a.length?t.insertBefore(o,a[e]):t.appendChild(o)}}},function(t,e,n){"use strict";n.r(e),n(75);var r,i=n(36),o=n.n(i),a=n(5),s=n(25),u=n(35),c=n(17),l=n(4),f=n(12),h=n(24),d=n(7),p=n.n(d),_=function(t,e){return t.subscribe(function(t){var n=e(),r=Math.round(t.bitrate/1e3),i=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}(t.resolution.split("x").map(function(t){return Number(t)}),2),o=i[0],s=i[1];if(0!==r){var u=n.getBitrateKbps(),c=n._height;u!==r&&(n.setBitrateKbps(r),a.a.log("[Conviva] Bitrate changed: "+r)),c!==s&&(n.setVideoResolutionHeight(s),n.setVideoResolutionWidth(o),a.a.log("[Conviva] Resolution changed: "+t.resolution))}})};!function(t){t.NONE="NONE",t.NETWORK="NETWORK",t.SEEK="SEEK"}(r||(r={}));var E,y=r,b=n(2),g=function(t,e,n,r){var i=!1;return t.subscribe(function(t){var o=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}(t,2),s=o[0],u=o[1],c=u.bufferingType,l=u.currentTime,f=u.fatalErrorType;switch(s){case b.a.UNLOADED:r.endSession();break;case b.a.BUFFERING:c===y.SEEK&&(i=!0,function(t,e){t().setPlayerSeekStart(Math.round(e)),a.a.log("[Conviva] Starting seek at "+e)}(n,l)),function(t){var e=p.a.PlayerStateManager.PlayerState.BUFFERING;t().setPlayerState(e),a.a.log("[Conviva] Setting player state to "+e)}(n);break;case b.a.ENDED:!function(t,e){var n=p.a.PlayerStateManager.PlayerState.STOPPED;t().setPlayerState(n),a.a.log("[Conviva] Setting player state to "+n),e()}(n,r.endSession.bind(r));break;case b.a.A_LOADING:case b.a.B_LOADING:r.startSession.bind(r)();break;case b.a.PAUSED:!function(t){var e=p.a.PlayerStateManager.PlayerState.PAUSED;t().setPlayerState(e),a.a.log("[Conviva] Setting player state to "+e)}(n);break;case b.a.PLAYING:i&&(function(t){t().setPlayerSeekEnd(),a.a.log("[Conviva] Ending seek")}(n),i=!1),function(t,e){var n=p.a.PlayerStateManager.PlayerState.PLAYING;t().setPlayerState(n),a.a.log("[Conviva] Setting player state to "+n),e()}(n,r.updateSession.bind(r));break;case b.a.ERRORED:!function(t,e,n){t.reportError(e(),n,p.a.Client.ErrorSeverity.FATAL),a.a.log("[Conviva] Reporting fatal error "+n)}(e,r.resolveSessionKey.bind(r),f)}})},v=function(t,e,n,r){var i=e.state.stores.playback;return[function(t,e,n){return t.subscribe(function(t){e.reportError(n.resolveSessionKey(),t.type,p.a.Client.ErrorSeverity.FATAL),a.a.log("[Conviva] Reporting error "+t.type)})}(e.consumerOutput.errors$,r,t),g(function(t){return Object(h.a)(t).pipe(Object(f.a)(t))}(i.update$),r,n,t),_(function(t){return t.pipe(Object(c.a)(function(t,e){return t.bitrate===e.bitrate&&t.resolution===e.resolution}),Object(l.a)(function(t){return{bitrate:t.bitrate,resolution:t.resolution,estimatedBandwidth:t.estimatedBandwidth}}))}(i.update$),n)]},m=function(){function t(){}return t.prototype.makeRequest=function(t,e,n,r,i,o){void 0===n&&(n=null),void 0===r&&(r=null),void 0===o&&(o=null);var a=new XMLHttpRequest;return a.open(t,e,!0),r&&a.overrideMimeType&&a.overrideMimeType(r),r&&a.setRequestHeader&&a.setRequestHeader("Content-Type",r),i>0&&(a.timeout=i,a.ontimeout=function(){a.ontimeout=a.onreadystatechange=null,o&&o(!1,"timeout after "+i+" ms")}),a.onreadystatechange=function(){4===a.readyState&&(a.ontimeout=a.onreadystatechange=null,200===a.status?o&&o(!0,a.responseText):o&&o(!1,"http status "+a.status))},a.send(n),null},t.prototype.release=function(){},t}(),S=function(){function t(){}return t.prototype.consoleLog=function(t,e){"undefined"!=typeof console&&(console.log&&e===p.a.SystemSettings.LogLevel.DEBUG||e===p.a.SystemSettings.LogLevel.INFO?console.log(t):console.warn&&e===p.a.SystemSettings.LogLevel.WARNING?console.warn(t):console.error&&e===p.a.SystemSettings.LogLevel.ERROR&&console.error(t))},t.prototype.release=function(){},t}(),T=function(){function t(){}return t.prototype.getBrowserName=function(){return null},t.prototype.getBrowserVersion=function(){return null},t.prototype.getDeviceBrand=function(){return null},t.prototype.getDeviceManufacturer=function(){return null},t.prototype.getDeviceModel=function(){return null},t.prototype.getDeviceType=function(){return null},t.prototype.getDeviceVersion=function(){return null},t.prototype.getFrameworkName=function(){return null},t.prototype.getFrameworkVersion=function(){return null},t.prototype.getOperatingSystemName=function(){return null},t.prototype.getOperatingSystemVersion=function(){return null},t.prototype.release=function(){},t}(),A=function(){function t(){}return t.prototype.saveData=function(t,e,n,r){var i=t+"."+e;try{window.localStorage.setItem(i,n),r(!0,null)}catch(t){r(!1,t.toString())}},t.prototype.loadData=function(t,e,n){var r=t+"."+e;try{n(!0,window.localStorage.getItem(r))}catch(t){n(!1,t.toString())}},t.prototype.release=function(){},t}(),O=function(){function t(){}return t.prototype.getEpochTimeMs=function(){return(new Date).getTime()},t.prototype.release=function(){},t}(),R=function(){function t(){}return t.prototype.createTimer=function(t,e){var n=window.setInterval(t,e);return function(){-1!==n&&(clearInterval(n),n=-1)}},t.prototype.release=function(){},t}(),I=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},N=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(I(arguments[e]));return t},w=function(){function t(t){var e,n=this;this.client=null,this.sessionKey=p.a.Client.NO_SESSION_KEY,this.subscriptions=[],this.isSessionDataFullyPopulated=!1,this.player=t;var r=t.state.stores.config.value.analytics;if(r.enable&&r.convivaCustomerKey){a.a.log("[Conviva] Analytics enabled");var i=new p.a.SystemInterface(new O,new R,new m,new A,new T,new S),o=new p.a.SystemSettings,s=new p.a.ClientSettings(r.convivaCustomerKey);this.systemFactory=new p.a.SystemFactory(i,o),""!==r.convivaGatewayUrl&&(s.gatewayUrl=r.convivaGatewayUrl),this.client=new p.a.Client(s,this.systemFactory),this.playerStateManager=this.client.getPlayerStateManager(),(e=this.subscriptions).push.apply(e,N(v(this,this.player,function(){return n.playerStateManager},this.client)))}}return Object.defineProperty(t.prototype,"isEnabled",{get:function(){return null!==this.client},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isSessionActive",{get:function(){return this.sessionKey!==p.a.Client.NO_SESSION_KEY},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isPlayerStateManagerActive",{get:function(){return null!==this.playerStateManager&&!this.playerStateManager._released},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"playerType",{get:function(){return"[DAZN 2.0]"+(this.player.solution?" "+this.player.solution.type:"")},enumerable:!0,configurable:!0}),t.prototype.resolveSessionKey=function(){return this.sessionKey},t.prototype.destroy=function(){for(this.isSessionActive&&this.endSession(),this.isEnabled&&(this.client.release(),this.systemFactory.release());this.subscriptions.length>0;)this.subscriptions.pop().unsubscribe()},t.prototype.startSession=function(){if(!this.isSessionActive){var e=this.player.state.stores,n=e.media,r=e.config,i=t.createContentMetadata(n.value,r.value,this.playerType,this.player.solution.type,this.player.solution.version);this.sessionKey=this.client.createSession(i),a.a.log("[Conviva] Analytics session created with ID: "+this.client.getId()+" and key: "+this.sessionKey),a.a.log("[Conviva]     viewerId: "+i.viewerId),a.a.log("[Conviva]     assetName: "+i.assetName),a.a.log("[Conviva]     custom: "+JSON.stringify(i.custom)),a.a.log("[Conviva]     streamType: "+i.streamType),a.a.log("[Conviva]     streamUrl: "+n.value.src),a.a.log("[Conviva]     playerType: "+this.playerType),this.isPlayerStateManagerActive||(this.playerStateManager=this.client.getPlayerStateManager()),this.playerStateManager.setStreamUrl(n.value.src),this.playerStateManager.setPlayerType(this.playerType),this.playerStateManager.setPlayerState(p.a.PlayerStateManager.PlayerState.BUFFERING),a.a.log("[Conviva] Setting player state to "+p.a.PlayerStateManager.PlayerState.BUFFERING),this.client.attachPlayer(this.sessionKey,this.playerStateManager)}},t.prototype.updateSession=function(){if(!this.isSessionDataFullyPopulated&&this.isPlayerStateManagerActive){var t=this.player.state.stores.playback;t.value.media.isLinear||(a.a.log("[Conviva] Updating with session with:"),a.a.log("[Conviva]     duration: "+t.value.duration),this.playerStateManager.setDuration(t.value.duration)),this.isSessionDataFullyPopulated=!0}},t.prototype.endSession=function(){this.isSessionActive&&(a.a.log("[Conviva] Ending session with ID: "+this.client.getId()+" and key: "+this.sessionKey),this.client.detachPlayer(this.sessionKey),this.client.releasePlayerStateManager(this.playerStateManager),this.client.cleanupSession(this.sessionKey),this.sessionKey=p.a.Client.NO_SESSION_KEY,this.isSessionDataFullyPopulated=!1)},t.createContentMetadata=function(t,e,n,r,i){var o=new p.a.ContentMetadata;o.applicationName=n,o.viewerId=e.analytics.viewerId,o.assetName=t.title,o.custom=t.convivaCustomMetaData,o.applicationName=n;var a=o.custom.applicationVersion||"";return o.custom.drmType=Object(u.a)(t.src),o.custom.streamingProtocol=Object(s.a)(t.src),o.custom.applicationVersion=a?a+"/0.7.0-hotfix":"0.7.0-hotfix",o.custom.applicationType=n,o.custom.nativePlayerVendor=r||"Unknown nativePlayerVendor",o.custom.nativePlayerVersion=i||"Unknown nativePlayerVersion",o.streamType=t.isLiveOrLinear?p.a.ContentMetadata.StreamType.LIVE:p.a.ContentMetadata.StreamType.VOD,o},t}(),C=n(32);!function(t){t.NONE="NONE",t.MOCK="MOCK",t.HTML5="HTML5",t.HTML5_FAIRPLAY="HTML5_FAIRPLAY",t.SHAKA="SHAKA",t.HAS_PLAYER="HAS_PLAYER"}(E||(E={}));var P=E,L=n(18),M=function(){function t(){}return t.fetchSolutionModuleOfType=function(t){return function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})}(void 0,void 0,void 0,function(){return function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}(this,function(e){switch(e.label){case 0:switch(t){case P.HAS_PLAYER:return[3,1];case P.HTML5:return[3,3];case P.HTML5_FAIRPLAY:return[3,5];case P.SHAKA:return[3,7]}return[3,9];case 1:return[4,n.e(3).then(n.bind(null,243))];case 2:return[2,e.sent()];case 3:return[4,n.e(2).then(n.bind(null,242))];case 4:return[2,e.sent()];case 5:return[4,n.e(1).then(n.bind(null,245))];case 6:return[2,e.sent()];case 7:return[4,n.e(0).then(n.bind(null,244))];case 8:return[2,e.sent()];case 9:throw new RangeError('No solution found for type "'+t+'"')}})})},t.getSolutionType=function(t,e){switch(t){case L.a.NONE:return P.HTML5;case L.a.HLS:return P.HTML5_FAIRPLAY;case L.a.SMOOTHSTREAMING:return e.isInternetExplorer11OnOldWindows||e.isOldWindows?P.NONE:P.HAS_PLAYER;default:return P.SHAKA}},t}(),U=function(t,e){var n=e.src;return function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})}(void 0,void 0,void 0,function(){var e,r,i,o;return function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}}(this,function(a){switch(a.label){case 0:return e=Object(s.a)(n),r=Object(C.a)(window.navigator.userAgent),i=t.hasLoadedSolution?t.solution.type:P.NONE,(o=M.getSolutionType(e,r))===i?[2,t.solution]:[4,M.fetchSolutionModuleOfType(o)];case 1:return[2,new(0,a.sent().default)(t,o)]}})})},x=n(3),D=n(20),j=n(1),F=n(0),V=n(8);function k(){return function(t){return t.lift(new Y)}}var Y=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new K(t))},t}(),K=function(t){function e(e){var n=t.call(this,e)||this;return n.hasPrev=!1,n}return F.a(e,t),e.prototype._next=function(t){this.hasPrev?this.destination.next([this.prev,t]):this.hasPrev=!0,this.prev=t},e}(V.a);function B(t){return function(e){return e.lift(new G(t))}}var G=function(){function t(t){this.value=t}return t.prototype.call=function(t,e){return e.subscribe(new H(t,this.value))},t}(),H=function(t){function e(e,n){var r=t.call(this,e)||this;return r.value=n,r}return F.a(e,t),e.prototype._next=function(t){this.destination.next(this.value)},e}(V.a),Q=function(t){return t.pipe(k(),Object(x.a)(function(t){var e=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}(t,2),n=e[0],r=e[1];return[b.a.A_LOADING,b.a.B_LOADING].includes(n)&&[b.a.PLAYING,b.a.PAUSED].includes(r)}),B(void 0))},W=function(t){var e=t.solution,n=t.state.stores,r=n.captions,i=n.frame,o=n.playback,a=t.ui.uiEvents$;return[function(t,e){return t.subscribe(function(t){var n=t.eventData;return e.actions.setActiveTrack(n.language)})}(function(t){return t.pipe(Object(x.a)(function(t){return t.type===j.a.CAPTIONS_OPTION_TAP}))}(a),r),function(t,e){return t.subscribe(function(t){return e.actions.deriveFrame(t)})}(i.update$,r),function(t,e,n){return t.subscribe(function(){var t=e.textTracks;n.actions.loadTracks(t)})}(Q(Object(h.a)(o.update$)),e,r),function(t,e){return t.subscribe(function(t){var n=t.state.activeCues;n.length<1?e.actions.hideCues():e.actions.showCues(n)})}(function(t){return t.pipe(Object(x.a)(function(t){return t.type===D.a.CUE_CHANGE}))}(e.mediaEvents$),r)]},q=function(t){return[function(t,e){return t.subscribe(function(t){return e.actions.configure(t)})}(function(t){return t.pipe(Object(x.a)(function(t){return t&&Object.keys(t).length>0}))}(t.consumerInput.config$),t.state.stores.config)]},$=n(6),z=n(57),J=n(40),X=n(38),Z={leading:!0,trailing:!1};function tt(t,e,n){return void 0===e&&(e=z.a),void 0===n&&(n=Z),function(r){return r.lift(new et(t,e,n.leading,n.trailing))}}J.a;var et=function(){function t(t,e,n,r){this.duration=t,this.scheduler=e,this.leading=n,this.trailing=r}return t.prototype.call=function(t,e){return e.subscribe(new nt(t,this.duration,this.scheduler,this.leading,this.trailing))},t}(),nt=function(t){function e(e,n,r,i,o){var a=t.call(this,e)||this;return a.duration=n,a.scheduler=r,a.leading=i,a.trailing=o,a._hasTrailingValue=!1,a._trailingValue=null,a}return F.a(e,t),e.prototype._next=function(t){this.throttled?this.trailing&&(this._trailingValue=t,this._hasTrailingValue=!0):(this.add(this.throttled=this.scheduler.schedule(rt,this.duration,{subscriber:this})),this.leading&&this.destination.next(t))},e.prototype._complete=function(){this._hasTrailingValue?(this.destination.next(this._trailingValue),this.destination.complete()):this.destination.complete()},e.prototype.clearThrottle=function(){var t=this.throttled;t&&(this.trailing&&this._hasTrailingValue&&(this.destination.next(this._trailingValue),this._trailingValue=null,this._hasTrailingValue=!1),t.unsubscribe(),this.remove(t),this.throttled=null)},e}(V.a);function rt(t){t.subscriber.clearThrottle()}var it=n(58),ot=n(13),at=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},st=function(t,e){return Object($.fromEvent)(t,"exitfullscreen").pipe(Object(f.a)(e),Object(x.a)(function(t){var e=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}(t,2);return e[0],e[1].isFrameFullscreened}),Object(l.a)(function(){}))},ut=n(48),ct=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},lt=function(t,e){return t.pipe(Object(x.a)(function(t){var e=t.type;return e===j.a.SETTINGS_CLOSE_TAP||e===j.a.FRAME_TAP}),Object(f.a)(e),Object(x.a)(function(t){return function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}(t,2)[1].isSettingsOpen}),Object(l.a)(function(){}))},ft=n(39),ht=n(59),dt=function(){function t(t,e){void 0===e&&(e=Number.POSITIVE_INFINITY),this.project=t,this.concurrent=e}return t.prototype.call=function(t,e){return e.subscribe(new pt(t,this.project,this.concurrent))},t}(),pt=function(t){function e(e,n,r){void 0===r&&(r=Number.POSITIVE_INFINITY);var i=t.call(this,e)||this;return i.project=n,i.concurrent=r,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return F.a(e,t),e.prototype._next=function(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this.active++,this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){this.add(Object(X.a)(this,t,e,n))},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete()},e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(e)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.remove(t),this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(J.a),_t=function(t){function e(){var n=t.call(this,"no elements in sequence")||this;return n.name="EmptyError",Object.setPrototypeOf(n,e.prototype),n}return F.a(e,t),e}(Error),Et=function(t){function e(){var n=t.call(this,"argument out of range")||this;return n.name="ArgumentOutOfRangeError",Object.setPrototypeOf(n,e.prototype),n}return F.a(e,t),e}(Error),yt=n(10),bt=new yt.a(function(t){return t.complete()});function gt(t){return function(e){return 0===t?function(t){return t?function(t){return new yt.a(function(e){return t.schedule(function(){return e.complete()})})}(t):bt}():e.lift(new vt(t))}}var vt=function(){function t(t){if(this.total=t,this.total<0)throw new Et}return t.prototype.call=function(t,e){return e.subscribe(new mt(t,this.total))},t}(),mt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return F.a(e,t),e.prototype._next=function(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))},e}(V.a),St=function(){function t(t){this.defaultValue=t}return t.prototype.call=function(t,e){return e.subscribe(new Tt(t,this.defaultValue))},t}(),Tt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.defaultValue=n,r.isEmpty=!0,r}return F.a(e,t),e.prototype._next=function(t){this.isEmpty=!1,this.destination.next(t)},e.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},e}(V.a),At=n(19),Ot=n(42),Rt=function(){function t(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n}return t.prototype.call=function(t,e){return e.subscribe(new It(t,this.nextOrObserver,this.error,this.complete))},t}(),It=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o._tapNext=At.a,o._tapError=At.a,o._tapComplete=At.a,o._tapError=r||At.a,o._tapComplete=i||At.a,Object(Ot.a)(n)?(o._context=o,o._tapNext=n):n&&(o._context=n,o._tapNext=n.next||At.a,o._tapError=n.error||At.a,o._tapComplete=n.complete||At.a),o}return F.a(e,t),e.prototype._next=function(t){try{this._tapNext.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.next(t)},e.prototype._error=function(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)},e.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()},e}(V.a),Nt=function(t){return void 0===t&&(t=wt),e={hasValue:!1,next:function(){this.hasValue=!0},complete:function(){if(!this.hasValue)throw t()}},function(t){return t.lift(new Rt(e,void 0,void 0))};var e};function wt(){return new _t}function Ct(t){return t}var Pt,Lt=n(11),Mt=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},Ut=[Lt.a.BOTTOM_LEFT,Lt.a.BOTTOM_RIGHT,Lt.a.TOP_LEFT,Lt.a.TOP_RIGHT],xt=function(t,e,n){return t.pipe(function(t,e){var n=arguments.length>=2;return function(r){return r.pipe(t?Object(x.a)(function(e,n){return t(e,n,r)}):Ct,gt(1),n?function(t){return void 0===t&&(t=null),function(e){return e.lift(new St(t))}}(e):Nt(function(){return new _t}))}}(),Object(ft.a)(function(t){return function(t,e){return Object($.timer)(0,t.intervalDuration,e).pipe(B(t))}(t.watermark,n)}),function t(e,n,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),"function"==typeof n?function(i){return i.pipe(t(function(t,r){return Object(ht.a)(e(t,r)).pipe(Object(l.a)(function(e,i){return n(t,e,r,i)}))},r))}:("number"==typeof n&&(r=n),function(t){return t.lift(new dt(e,r))})}(function(t){return function(t,e){return Object($.timer)((n=t,r=n.intervalDuration,i=n.wobbleRangeDuration,o=n.wobbleOffsetDuration,r+(Math.random()*i+o)),e).pipe(B(t));var n,r,i,o}(t,n)}),Object(ft.a)(function(t){return function(t,e){return Object($.timer)(0,(n=t,r=n.displayOffsetDuration,i=n.displayRangeDuration,Math.random()*i+r),e).pipe(gt(2),Object(l.a)(function(t){return t>0?Lt.a.HIDDEN:(e=Math.floor(Math.random()*Ut.length),Ut[e]);var e}));var n,r,i}(t,n)}),Object(f.a)(e),Object(x.a)(function(t){var e=Mt(t,2),n=e[0],r=e[1];return n===Lt.a.HIDDEN||r.isPlaying}),Object(l.a)(function(t){return Mt(t,1)[0]}))};!function(t){t.WINDOWED="WINDOWED",t.FULLSCREENED="FULLSCREENED",t.AFFIXED="AFFIXED"}(Pt||(Pt={}));var Dt=Pt,jt=function(t,e){return t.subscribe(function(t){return function(t,e){switch(null===t&&(t=document.body),e){case Dt.FULLSCREENED:!function(t){var e=t.requestFullscreen||t.msRequestFullscreen||t.mozRequestFullScreen||t.webkitRequestFullscreen;"function"==typeof e&&e.call(t)}(t);break;case Dt.WINDOWED:!function(){var t=document.exitFullscreen||document.msExitFullscreen||document.mozCancelFullScreen||document.webkitExitFullscreen;"function"==typeof t&&t.call(document)}()}}(e.value.behaviour.fullscreenElement,t)})},Ft=function(t){var e=t.state.stores,n=e.config,r=e.frame,i=e.playback,o=e.volume,a=t.ui.uiEvents$,s=function(t,e,n,r,i){return Object($.merge)(function(t){return t.pipe(k(),Object(x.a)(function(t){var e=at(t,2),n=e[0].isLoading,r=e[1].isPlaying;return n&&r}))}(r),function(t,e,n){var r=n||Date,i=-1/0;return t.pipe(Object(f.a)(e),Object(x.a)(function(t){var e=at(t,2),n=e[0],o=e[1].areControlsIdle,a=!1;return n.type===j.a.FRAME_TAP&&(i=r.now()),(n.type===j.a.FRAME_MOUSE_MOVE&&r.now()-i<500||n.type===j.a.FRAME_TAP&&!o)&&(a=!0),n.type!==j.a.FRAME_MOUSE_LEAVE&&!a}),Object(l.a)(function(t){return at(t,1)[0]}))}(t,n,i),function(t){return t.pipe(Object(x.a)(function(t){var e=t.type;return[ot.a.ENDED,ot.a.PAUSE,ot.a.VOLUME_CHANGE].includes(e)}))}(e)).pipe(tt(200,i),Object(l.a)(function(){}),Object(it.a)())}(a,t.solution.mediaEvents$,r.update$,i.update$);return[jt(function(t){return t.pipe(Object(l.a)(function(t){return t.frameStatus}),Object(c.a)())}(r.update$),n),function(t,e){return t.subscribe(function(){return e.actions.exitFullscreen()})}(st(window,r.update$),r),function(t,e){return t.subscribe(function(){e.value.isFrameFullscreened?e.actions.exitFullscreen():e.actions.enterFullscreen()})}(function(t){return t.pipe(Object(x.a)(function(t){return t.type===j.a.FULLSCREEN_TAP}),Object(l.a)(function(){}))}(a),r),function(t,e){return t.subscribe(function(){return setTimeout(e.actions.idleControls())})}(function(t,e,n,r,i,o){return Object($.merge)(t.pipe(Object(ut.a)(3e3,o)),function(t){return t.pipe(Object(x.a)(function(t){var e=t.type;return[j.a.FRAME_MOUSE_LEAVE,j.a.FRAME_TAP].includes(e)}),Object(l.a)(function(){}))}(e)).pipe(function(t,e,n){return function(r){return r.pipe(Object(f.a)(Object($.combineLatest)(t,e,n)),Object(l.a)(function(t){var e=ct(t,2);return e[0],e[1]}))}}(n,r,i),Object(x.a)(function(t){var e=ct(t,3),n=e[0],r=e[1],i=e[2];return n.areControlsActive&&r.isPlaying&&!i.isSliderActive}),Object(l.a)(function(){}))}(s,a,r.update$,i.update$,o.update$),r),function(t,e){return t.subscribe(function(){return setTimeout(function(){return e.actions.activateControls()})})}(s,r),function(t,e){return t.subscribe(function(t){return t?e.actions.focus():e.actions.blur()})}(function(t,e){return t.pipe(Object(x.a)(function(t){var e=t.type;return[j.a.FRAME_FOCUS,j.a.FRAME_BLUR].includes(e)}),Object(ut.a)(200,void 0),Object(l.a)(function(t){return t.type===j.a.FRAME_FOCUS}),Object(c.a)())}(a),r),function(t,e){return t.subscribe(function(t){return t?e.actions.activateControls():e.actions.idleControls()})}(t.consumerInput.toggleControls$,r),function(t,e){return t.subscribe(function(t){return t?e.actions.enterFullscreen():e.actions.exitFullscreen()})}(t.consumerInput.toggleFullscreen$,r),function(t,e){return t.subscribe(function(t){switch(t){case Lt.a.HIDDEN:e.actions.hideWatermark();break;default:e.actions.showWatermark(t)}})}(xt(n.update$,i.update$),r),function(t,e){return t.subscribe(function(){return e.actions.openSettings()})}(function(t){return t.pipe(Object(x.a)(function(t){return t.type===j.a.CAPTIONS_MENU_BUTTON_TAP}),Object(l.a)(function(){}))}(a),r),function(t,e){return t.subscribe(function(){return e.actions.closeSettings()})}(lt(a,r.update$),r)]};function Vt(t){return function(e){return e.lift(new Yt(t))}}var kt,Yt=function(){function t(t){this.total=t}return t.prototype.call=function(t,e){return e.subscribe(new Kt(t,this.total))},t}(),Kt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return F.a(e,t),e.prototype._next=function(t){++this.count>this.total&&this.destination.next(t)},e}(V.a),Bt=function(t){var e=t.state.stores,n=e.localStorage,r=e.playback,i=e.volume;return[function(t,e){return t.subscribe(function(t){e.actions.write({estimatedBandwidth:t})})}(function(t,e){return t.pipe(Object(l.a)(function(t){return t.estimatedBandwidth}),Object(x.a)(function(t){return t>0}),tt(1e4,e),Object(c.a)())}(r.update$),n),function(t,e){return t.subscribe(function(t){t>0&&e.actions.write({volumeLevel:t})})}(function(t){return t.pipe(Vt(1),Object(x.a)(function(t){return!t.isSliderActive}),Object(l.a)(function(t){return t.level}),Object(c.a)())}(i.update$),n),function(t,e){return t.subscribe(function(t){e.actions.write({volumeMuted:t})})}(function(t){return t.pipe(Vt(1),Object(l.a)(function(t){return t.isMuted}),Object(c.a)())}(i.update$),n)]},Gt=function(t){return[function(t,e){return t.subscribe(function(t){return e.actions.load(t)})}(function(t){return t.pipe(Object(x.a)(Boolean))}(t.consumerInput.media$),t.state.stores.media)]},Ht=function(t){return t.pipe(Object(x.a)(function(t){return t.type===D.a.AUTOPLAY_REJECTION}),B(void 0))},Qt=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},Wt=function(t){var e=Qt(t,2),n=e[0].state,r=e[1],i=r.media,o=r.isLoading;return!o||0===i.startTime||o&&i.startTime>0&&n.currentTime>=i.startTime},qt=function(t,e){return t.pipe(Object(f.a)(e),Object(x.a)(function(t){var e=Qt(t,2),n=e[0].type,r=e[1],i=r.isPlaying,o=r.isBuffering,a=r.isLoading;return n===D.a.TIME_UPDATE&&(i||o||a)}),Object(x.a)(Wt),Object(l.a)(function(t){return Qt(t,1)[0].state.currentTime}),k(),Object(l.a)(function(t){var e=Qt(t,2),n=e[0];return e[1]-n}),Object(l.a)((n=!1,function(t){var e=Math.abs(t);return e<.1||e>28800?n?y.SEEK:y.NETWORK:(n=e>1&&e<28800,y.NONE)})),Object(c.a)());var n},$t=function(t,e){return t.pipe(Object(f.a)(e),Object(x.a)(function(t){var e=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}(t,2),n=e[0].type,r=e[1].hasEnded;return n===ot.a.ENDED&&!r}),Object(l.a)(function(){}))},zt=function(t){return t.pipe(Object(x.a)(function(t){return t.type===j.a.FAST_FORWARD_TAP}),Object(l.a)(function(){}))},Jt=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},Xt=function(t,e){return Object($.fromEvent)(t,"keypress").pipe(Object(f.a)(e),Object(x.a)(function(t){var e=Jt(t,2),n=e[0],r=e[1].isFocused;return 32===n.keyCode&&r}),Object(l.a)(function(t){return Jt(t,1)[0]}))},Zt=function(t,e){return t.pipe(Object(f.a)(e),Object(x.a)(function(t){var e=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}(t,2),n=e[0].type,r=e[1],i=r.isPaused,o=r.isLoading;return n===ot.a.PAUSE&&!i&&!o}),B(void 0))},te=function(t){return t.pipe(Object(c.a)(function(t,e){return t.bitrate===e.bitrate&&t.resolution===e.resolution&&t.estimatedBandwidth===e.estimatedBandwidth}))},ee=function(t,e){return Object($.timer)(0,500,e).pipe(Object(ft.a)(function(){return t.getBitrate()}),Object(l.a)(function(e){var n=t.state;return{bitrate:e,resolution:n.resolution,estimatedBandwidth:n.estimatedBandwidth}}))},ne=function(t){return t.pipe(Object(x.a)(function(t){return t.type===j.a.PLAY_PAUSE_TAP}),Object(l.a)(function(){}))},re=function(t,e){return t.pipe(Object(f.a)(e),Object(x.a)(function(t){var e=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}(t,2),n=e[0].type,r=e[1],i=r.isPlaying,o=r.isLoading;return n===ot.a.PLAY&&!i&&!o}),Object(l.a)(function(){}))},ie=function(t){return t.pipe(Object(x.a)(function(t){return t.type===j.a.REWIND_TAP}),Object(l.a)(function(){}))},oe=function(t){return t.pipe(Object(x.a)(function(t){return t.type===j.a.SEEK_TO_LIVE_EDGE_TAP}),Object(l.a)(function(){}))},ae=function(t){return t.pipe(Object(x.a)(function(t){return t.type===j.a.TIMECODE_TAP}),Object(l.a)(function(){}))},se=function(t,e){return t.pipe(Object(x.a)(function(t){return t.type===j.a.TIMELINE_TAP}),Object(f.a)(e),Object(l.a)(function(t){var e=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a}(t,2),n=e[0].eventData,r=e[1],i=r.minTime,o=r.duration;return i+n.multiplier*o}))},ue=function(t){return t.pipe(Object(x.a)(function(t){var e=t.type,n=t.state;return e===D.a.TIME_UPDATE&&!isNaN(n.maxTime)}),Object(c.a)(function(t,e){var n=t.state,r=e.state;return n.currentTime===r.currentTime&&n.maxTime===r.maxTime}),Object(l.a)(function(t){return t.state}),Object(it.a)())},ce=function(t){var e=t.solution,n=t.consumerInput,r=e.mediaEvents$,i=t.ui.uiEvents$,o=t.state.stores,a=o.playback,s=o.media,u=o.frame,c=o.volume,l=ue(r),f=ee(e);return[function(t,e){return t.subscribe(function(t){t===y.NONE||e.value.isBuffering||e.value.isLoading?t!==y.NONE||e.value.isPlaying||e.actions.play():e.actions.buffer(t)})}(qt(r,a.update$),a),function(t,e){return t.subscribe(function(t){return e.actions.error(t)})}(n.error$,a),function(t,e){return t.subscribe(function(t){return e.actions.updateCurrentTime(t)})}(n.seek$,a),function(t,e){return t.subscribe(function(t){return t?e.actions.play():e.actions.pause()})}(n.togglePlayPause$,a),function(t,e){return t.subscribe(function(){return e.actions.end()})}($t(r,a.update$),a),function(t,e){return t.subscribe(function(){return e.actions.fastForward()})}(zt(i),a),function(t,e){return t.subscribe(function(t){t.preventDefault(),e.value.isPlaying?e.actions.pause():e.actions.play()})}(Xt(window,u.update$),a),function(t,e){return t.subscribe(function(t){var n=e.value.media;n&&n.src===t.src||(e.actions.deriveMedia(t),t.isLoaded?e.actions.load():e.actions.unload())})}(s.update$,a),function(t,e){return t.subscribe(function(){return e.actions.pause()})}(Zt(r,a.update$),a),function(t,e){return t.subscribe(function(){return e.actions.play()})}(re(r,a.update$),a),function(t,e){return t.subscribe(function(){return e.value.isPlaying?e.actions.pause():e.actions.play()})}(ne(i),a),function(t,e){return t.subscribe(function(){return e.actions.rewind()})}(ie(i),a),function(t,e){return t.subscribe(function(){return e.actions.seekToLiveEdge()})}(oe(i),a),function(t,e){return t.subscribe(function(){return e.actions.toggleTimecodeMode()})}(ae(i),a),function(t,e){return t.subscribe(function(t){return e.actions.updateCurrentTime(t)})}(se(i,a.update$),a),function(t,e){return t.subscribe(function(t){return e.actions.updateTime({currentTime:t.currentTime,minTime:t.minTime,maxTime:t.maxTime})})}(l,a),function(t,e){return t.subscribe(function(t){return e.actions.updatePlaybackQuality(t)})}(te(f),a),function(t,e,n){return t.subscribe(function(){n.value.isForceMuted&&e.actions.pause()})}(Ht(e.mediaEvents$),a,c)]},le=function(t){var e=t.ui.uiEvents$,n=t.state.stores,r=n.playback,i=n.timeline;return[function(t,e){return t.subscribe(function(t){return e.actions.derivePlayback(t)})}(r.update$,i),function(t,e){return t.subscribe(function(t){return e.actions.inspect(t)})}(function(t){return t.pipe(Object(x.a)(function(t){return t.type===j.a.TIMELINE_INSPECT}),Object(l.a)(function(t){return t.eventData.multiplier}))}(e),i),function(t,e){return t.subscribe(function(t){return e.actions.scrub(t)})}(function(t){return t.pipe(Object(x.a)(function(t){return t.type===j.a.TIMELINE_SCRUB}),Object(l.a)(function(t){return t.eventData.multiplier}))}(e),i),function(t,e){return t.subscribe(function(){e.value.isScrubbing&&e.actions.track()})}(function(t){return t.pipe(Object(x.a)(function(t){return t.type===j.a.TIMELINE_TAP}),Object(l.a)(function(){}))}(e),i)]},fe=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},he=function(t){var e=t.state.stores,n=e.localStorage,r=e.volume,i=t.ui.uiEvents$,o=t.solution.mediaEvents$;return[function(t,e){return t.subscribe(function(t){var n=t.volumeLevel;t.volumeMuted?e.actions.mute():e.actions.setLevel(n),e.actions.setPreMuteLevel(n)})}(function(t){return t.pipe(gt(1),Object(x.a)(function(t){var e=t.volumeLevel,n=t.volumeMuted;return null!==e&&null!==n}))}(n.update$),r),function(t,e){return t.subscribe(function(){return e.actions.deactivateSlider()})}(function(t,e){return t.pipe(Object(x.a)(function(t){return t.type===j.a.VOLUME_SLIDER_DRAG_END}),Object(ut.a)(200,e),Object(l.a)(function(){}))}(i),r),function(t,e){return t.subscribe(function(t){return e.actions.setLevel(t)})}(function(t,e){return t.pipe(Object(f.a)(e),Object(x.a)(function(t){var e=fe(t,2),n=e[0],r=n.type,i=n.state,o=e[1];return r===ot.a.VOLUME_CHANGE&&i.volume!==o.level}),Object(l.a)(function(t){return fe(t,1)[0].state.volume}))}(o,r.update$),r),function(t,e){return t.subscribe(function(t){return e.actions.dragToSetLevel(t)})}(function(t){return t.pipe(Object(x.a)(function(t){return t.type===j.a.VOLUME_SLIDER_DRAG}),Object(l.a)(function(t){return t.eventData.multiplier}))}(i),r),function(t,e){return t.subscribe(function(t){return e.actions.setLevel(t)})}(function(t){return t.pipe(Object(x.a)(function(t){return t.type===j.a.VOLUME_SLIDER_TAP}),Object(l.a)(function(t){return t.eventData.multiplier}))}(i),r),function(t,e){return t.subscribe(function(){return e.value.isMutedOrForceMuted?e.actions.unMute():e.actions.mute()})}(function(t){return t.pipe(Object(x.a)(function(t){return t.type===j.a.VOLUME_TAP}),Object(l.a)(function(){}))}(i),r),function(t,e){return t.subscribe(function(t){return e.actions.setLevel(t)})}(t.consumerInput.volume$,r),function(t,e){return t.subscribe(function(){e.value.isForceMuted||e.actions.forceMute()})}(Ht(o),r)]},de=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},pe=function(t){return function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(de(arguments[e]));return t}(W(t),q(t),Ft(t),Bt(t),Gt(t),ce(t),le(t),he(t))},_e=n(56),Ee=n(23),ye=n(9),be=function(){function t(){this.frame=null,this.tracks=[],this.activeCues=[]}return Object.defineProperty(t.prototype,"activeTrack",{get:function(){return this.tracks.find(function(t){return t.isActive})||null},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"areCaptionsActive",{get:function(){return null!==this.activeTrack},enumerable:!0,configurable:!0}),t}(),ge=n(55),ve=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},me="ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789",Se=function(){return function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(ve(arguments[e]));return t}(Array(5)).reduce(function(t){return t+me.charAt(Math.floor(Math.random()*me.length))},"")};!function(t){t[t.DEFAULT=0]="DEFAULT"}(kt||(kt={}));var Te,Ae=kt,Oe=function(){this.id=Se(),this.text="",this.position=Ae.DEFAULT},Re=function(t){return{loadTracks:function(e){t.tracks=e},setActiveTrack:function(e){t.tracks=t.tracks.map(function(t){return e===t.language?t.isActive=!0:t.isActive=!1,t})},showCues:function(e){t.activeCues=e.map(function(t){return Object.assign(new Oe,{text:ge(t.text,{whiteList:{i:[],b:[],u:[]}})})})},hideCues:function(){t.activeCues=[]},deriveFrame:function(e){t.frame=e}}},Ie=function(){this.viewerId="",this.enable=!1,this.convivaCustomerKey="e2570d46af0ee5302e3bddf2d43804b477ae7ab0",this.convivaGatewayUrl="",Object.seal(this)},Ne=function(){this.autoplay=!0,this.tabIndex=999,this.fullscreenElement=null,this.fallbackImageUrl=""};!function(t){t[t.DEFAULT=0]="DEFAULT"}(Te||(Te={}));var we,Ce=Te;!function(t){t[t.DEFAULT=0]="DEFAULT"}(we||(we={}));var Pe,Le=we;!function(t){t[t.DEFAULT=0]="DEFAULT"}(Pe||(Pe={}));var Me,Ue=Pe,xe=n(33),De=function(){this.enable=!1,this.cueBackdrop=Ce.DEFAULT,this.cueColour=Le.DEFAULT,this.cueFont=Ue.DEFAULT,this.cueSize=xe.a.M,Object.seal(this)},je=function(){this.authToken="",this.fairplayCertificateUrl="https://cdn.dazn.com/config/cert/fairplay.cer",this.licenseUrl="",this.releasePid="",Object.seal(this)},Fe=function(){this.liveLabel="Live",Object.seal(this)},Ve=1e3,ke=60*Ve,Ye=function(){function t(){this.content="",this.displayRangeDuration=10*Ve,this.displayOffsetDuration=10*Ve,this.intervalDuration=15*ke,this.wobbleRangeDuration=2*ke,this.wobbleOffsetDuration=-ke,Object.seal(this)}return Object.defineProperty(t.prototype,"showWatermark",{get:function(){return""!==this.content},enumerable:!0,configurable:!0}),t}(),Ke=function(){this.captions=new De,this.behaviour=new Ne,this.watermark=new Ye,this.drm=new je,this.analytics=new Ie,this.text=new Fe,Object.freeze(this)},Be=function(t){return{configure:function(e){o()(t,e,!0)}}};!function(t){t.ENTER_FULLSCREEN="fullscreen",t.EXIT_FULLSCREEN="exitFullscreen",t.FAST_FORWARD="fastforward",t.LIVE_INDICATOR_CLICK="liveIndicatorClick",t.MUTE="mute",t.PAUSE="pause",t.PLAY="play",t.REWIND="rewind",t.SEEK_BACKWARD="barClickBackward",t.SEEK_FORWARD="barClickForward",t.TIMECODE_CLICK="timeCodeClick",t.UNMUTE="unmute",t.VOLUME_DOWN="volumeDown",t.VOLUME_UP="volumeUp"}(Me||(Me={}));var Ge,He=Me;!function(t){t.ACTIVE="ACTIVE",t.IDLE="IDLE"}(Ge||(Ge={}));var Qe,We=Ge,qe=function(){function t(){this.frameStatus=Dt.WINDOWED,this.controlsStatus=We.ACTIVE,this.watermarkStatus=Lt.a.HIDDEN,this.isFocused=!1,this.isSettingsOpen=!1}return Object.defineProperty(t.prototype,"isFrameWindowed",{get:function(){return this.frameStatus===Dt.WINDOWED},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isFrameFullscreened",{get:function(){return this.frameStatus===Dt.FULLSCREENED},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"areControlsActive",{get:function(){return this.controlsStatus===We.ACTIVE},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"areControlsIdle",{get:function(){return this.controlsStatus===We.IDLE},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isWatermarkShown",{get:function(){return this.watermarkStatus!==Lt.a.HIDDEN},enumerable:!0,configurable:!0}),t}(),$e=function(t,e,n){void 0===n&&(n={});var r=function(t){return function(e,n){return{idleControls:function(){e.controlsStatus=We.IDLE},activateControls:function(){e.controlsStatus=We.ACTIVE},enterFullscreen:function(){e.frameStatus=Dt.FULLSCREENED,t.next({type:He.ENTER_FULLSCREEN})},exitFullscreen:function(){e.frameStatus=Dt.WINDOWED,t.next({type:He.EXIT_FULLSCREEN})},showWatermark:function(t){e.watermarkStatus=t},hideWatermark:function(){e.watermarkStatus=Lt.a.HIDDEN},focus:function(){e.isFocused=!0},blur:function(){e.isFocused=!1},openSettings:function(){e.isSettingsOpen=!0},closeSettings:function(){e.isSettingsOpen=!1,n.activateControls()}}}}(e);return t.createStore({name:ye.a.FRAME,model:qe,actions:r},n)},ze=function(){this.estimatedBandwidth=null,this.volumeLevel=null,this.volumeMuted=null},Je=function(t){return{write:function(e){Object.assign(t,e);try{window.localStorage.setItem("daznPlayer",JSON.stringify(t))}catch(t){a.a.error(t)}}}},Xe=function(){var t={};try{Object.assign(t,JSON.parse(window.localStorage.getItem("daznPlayer")))}catch(t){a.a.error(t)}return t};!function(t){t.VOD="VOD",t.LINEAR="LINEAR",t.LIVE="LIVE"}(Qe||(Qe={}));var Ze,tn=Qe,en=function(){function t(){this.src="",this.title="",this.isEncrypted=!1,this.posterUrl="",this.mediaType=tn.VOD,this.startTime=0,this.convivaCustomMetaData={},Object.seal(this)}return Object.defineProperty(t.prototype,"isLive",{get:function(){return this.mediaType===tn.LIVE},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isLinear",{get:function(){return this.mediaType===tn.LINEAR},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isVod",{get:function(){return this.mediaType===tn.VOD},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isVodOrLive",{get:function(){return[tn.VOD,tn.LIVE].includes(this.mediaType)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isLiveOrLinear",{get:function(){return[tn.LIVE,tn.LINEAR].includes(this.mediaType)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasPoster",{get:function(){return""!==this.posterUrl},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isLoaded",{get:function(){return""!==this.src},enumerable:!0,configurable:!0}),t}(),nn=function(t){return{load:function(e){Object.assign(t,new en,e)}}},rn=n(21);!function(t){t.DURATION="DURATION",t.REMAINING="REMAINING"}(Ze||(Ze={}));var on,an=Ze,sn=function(t){return(t="string"==typeof t?parseInt(t):t)<10?"0"+t.toString():t.toString()},un=function(t,e,n){void 0===e&&(e=!0),void 0===n&&(n=!1);var r=[];t=t===1/0?0:t;var i=parseInt((t%60).toString()),o=parseInt((t/60).toString())%60,a=parseInt((t/3600).toString())%24;return r.unshift(sn(i)),e&&(r.unshift(sn(o)),n&&r.unshift(sn(a))),r.join(":")},cn=function(){function t(){this.playbackStatus=b.a.UNLOADED,this.bufferingType=y.NONE,this.currentTime=0,this.fatalErrorType=rn.a.NONE,this.minTime=0,this.maxTime=1/0,this.media=null,this.timecodeMode=an.DURATION,this.hasPlayed=!1,this.resolution="",this.bitrate=-1,this.estimatedBandwidth=-1}return Object.defineProperty(t.prototype,"hasMedia",{get:function(){return null!==this.media},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isUnloaded",{get:function(){return this.playbackStatus===b.a.UNLOADED},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isLoading",{get:function(){return this.playbackStatus===b.a.A_LOADING||this.playbackStatus===b.a.B_LOADING},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isPlaying",{get:function(){return this.playbackStatus===b.a.PLAYING},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isPaused",{get:function(){return this.playbackStatus===b.a.PAUSED},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isBuffering",{get:function(){return this.playbackStatus===b.a.BUFFERING},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isNetworkInducedBuffering",{get:function(){return this.isBuffering&&this.bufferingType===y.NETWORK},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isSeekInducedBuffering",{get:function(){return this.isBuffering&&this.bufferingType===y.SEEK},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasEnded",{get:function(){return this.playbackStatus===b.a.ENDED},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isAtEndAndStopped",{get:function(){return this.hasEnded||this.hasMedia&&this.media.isVod&&this.playbackStatus===b.a.PAUSED&&this.isAtVideoEdge},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasErrored",{get:function(){return this.playbackStatus===b.a.ERRORED},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isAtVideoEdge",{get:function(){return this.adjustedCurrentTime>=this.duration-t.VIDEO_EDGE_MARGIN_OF_ERROR},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isAtLiveEdge",{get:function(){return this.hasMedia&&this.isAtVideoEdge&&this.media.isLiveOrLinear},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"duration",{get:function(){return Math.max(0,this.maxTime-this.minTime)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"adjustedCurrentTime",{get:function(){return Math.max(0,this.currentTime-this.minTime)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isAtLeastOneHour",{get:function(){return this.duration>3600},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isShowDurationMode",{get:function(){return this.timecodeMode===an.DURATION},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isShowRemainingMode",{get:function(){return this.timecodeMode===an.REMAINING},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"timeRemaining",{get:function(){return this.duration-this.currentTime},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"humanReadableCurrentTime",{get:function(){return un(this.adjustedCurrentTime,!0,this.isAtLeastOneHour)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"humanReadableDuration",{get:function(){return un(this.duration,!0,this.isAtLeastOneHour)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"humanReadableTimeRemaining",{get:function(){return(this.timeRemaining>0?"-":"")+un(this.timeRemaining,!0,this.isAtLeastOneHour)},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"humanReadableTimecode",{get:function(){return this.timecodeMode===an.REMAINING?this.humanReadableTimeRemaining:this.humanReadableDuration},enumerable:!0,configurable:!0}),t.REWIND_AMOUNT=30,t.FAST_FORWARD_AMOUNT=30,t.SEEK_MARGIN_OF_ERROR=.2,t.VIDEO_EDGE_MARGIN_OF_ERROR=7,t}(),ln=function(t,e,n){void 0===n&&(n={});var r=function(t){return function(e,n){return{load:function(){e.playbackStatus===b.a.A_LOADING?e.playbackStatus=b.a.B_LOADING:e.playbackStatus=b.a.A_LOADING,this.resetPlayback(),this.resetBuffering()},unload:function(){e.playbackStatus=b.a.UNLOADED,this.resetPlayback(),this.resetBuffering()},resetPlayback:function(){e.currentTime=0,e.hasPlayed=!1,e.fatalErrorType=rn.a.NONE},play:function(){e.isPaused&&t.next({type:He.PLAY,data:{currentTime:e.currentTime}}),e.hasEnded?e.playbackStatus=b.a.A_LOADING:e.playbackStatus=b.a.PLAYING,this.resetBuffering()},pause:function(){var n=e.media.isVod&&e.isAtVideoEdge;e.hasErrored||n?e.playbackStatus=b.a.ENDED:(e.playbackStatus=b.a.PAUSED,t.next({type:He.PAUSE,data:{currentTime:e.currentTime}}))},buffer:function(t){e.playbackStatus=b.a.BUFFERING,e.bufferingType=t},resetBuffering:function(){e.bufferingType!==y.NONE&&(e.bufferingType=y.NONE)},end:function(){e.playbackStatus=b.a.ENDED,this.resetBuffering()},error:function(t){e.playbackStatus=b.a.ERRORED,e.fatalErrorType=t,this.resetBuffering()},updateTime:function(t){n.updateCurrentTime(t.currentTime),n.updateMinTime(t.minTime),n.updateMaxTime(t.maxTime)},updateCurrentTime:function(r){e.hasPlayed||r===e.currentTime||(e.hasPlayed=!0),e.hasEnded&&r<e.duration&&n.pause(),Math.abs(r-e.currentTime)>1&&t.next({type:r>e.currentTime?He.SEEK_FORWARD:He.SEEK_BACKWARD,data:{currentTime:e.currentTime,nextCurrentTime:r}}),e.currentTime=r},updateMinTime:function(t){e.minTime=t},updateMaxTime:function(t){e.maxTime=t},updatePlaybackQuality:function(t){var n=t.resolution,r=t.bitrate,i=t.estimatedBandwidth;e.resolution=n,e.bitrate=r,e.estimatedBandwidth=i},toggleTimecodeMode:function(){var n=e.timecodeMode===an.REMAINING?an.DURATION:an.REMAINING;t.next({type:He.TIMECODE_CLICK,data:{currentTime:e.currentTime,timecodeMode:e.timecodeMode,nextTimecodeMode:n}}),e.timecodeMode=n},rewind:function(){var n=Math.max(0,e.currentTime-cn.REWIND_AMOUNT);t.next({type:He.REWIND,data:{currentTime:e.currentTime,nextCurrentTime:n}}),e.currentTime=n},fastForward:function(){var n=Math.min(e.maxTime-cn.SEEK_MARGIN_OF_ERROR,e.currentTime+cn.FAST_FORWARD_AMOUNT);t.next({type:He.FAST_FORWARD,data:{currentTime:e.currentTime,nextCurrentTime:n}}),e.currentTime=n},seekToLiveEdge:function(){var n=e.maxTime;t.next({type:He.LIVE_INDICATOR_CLICK,data:{currentTime:e.currentTime,nextCurrentTime:n}}),e.currentTime=n},deriveMedia:function(t){e.media=t}}}}(e);return t.createStore({name:ye.a.PLAYBACK,model:cn,actions:r},n)};!function(t){t.TRACKING="TRACKING",t.SCRUBBING="SCRUBBING"}(on||(on={}));var fn,hn=on,dn=function(t){return{track:function(e){void 0===e&&(e=-1),t.isTracking||(t.timelineStatus=hn.TRACKING),e>-1&&(t.multiplierProgress=e)},scrub:function(e){t.isScrubbing||(t.timelineStatus=hn.SCRUBBING),t.multiplierProgress=t.multiplierInspect=e},inspect:function(e){t.multiplierInspect=e},derivePlayback:function(e){t.playback=e}}},pn=function(){function t(){this.multiplierProgress=0,this.multiplierInspect=0,this.timelineStatus=hn.TRACKING,this.playback=null}return Object.defineProperty(t.prototype,"isTracking",{get:function(){return this.timelineStatus===hn.TRACKING},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isScrubbing",{get:function(){return this.timelineStatus===hn.SCRUBBING},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"percentProgress",{get:function(){var t;return t=this.isScrubbing?100*this.multiplierProgress:this.playback.adjustedCurrentTime/this.playback.duration*100,Math.max(0,Math.min(100,t))},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"percentInspect",{get:function(){return 100*this.multiplierInspect},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"inspectTime",{get:function(){return this.playback.duration*this.multiplierInspect},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"humanReadableInspectTime",{get:function(){return un(this.inspectTime,!0,this.playback.isAtLeastOneHour)},enumerable:!0,configurable:!0}),t}();!function(t){t.AUDIBLE="AUDIBLE",t.MUTED="MUTED",t.FORCE_MUTED="FORCE_MUTED"}(fn||(fn={}));var _n,En=fn,yn=function(){function t(){this.level=t.DEFAULT_LEVEL,this.preMuteLevel=0,this.volumeStatus=En.AUDIBLE,this.isSliderActive=!1}return Object.defineProperty(t.prototype,"isZero",{get:function(){return 0===this.level},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isLow",{get:function(){return!this.isZero&&this.level<1/3},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isMedium",{get:function(){return!this.isZero&&!this.isLow&&this.level<2/3},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isHigh",{get:function(){return!this.isZero&&!this.isLow&&!this.isMedium},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isMuted",{get:function(){return this.volumeStatus===En.MUTED},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isForceMuted",{get:function(){return this.volumeStatus===En.FORCE_MUTED},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isMutedOrForceMuted",{get:function(){return this.isMuted||this.isForceMuted},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isAudible",{get:function(){return this.volumeStatus===En.AUDIBLE},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"bottom",{get:function(){return 100*this.level},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"humanReadableVolumeLevel",{get:function(){return Math.round(this.level*t.MAX_VOLUME_PERCENT).toString()+"%"},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"canShowLowVolumeBar",{get:function(){return this.isLow||this.isMedium||this.isHigh},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"canShowMediumVolumeBar",{get:function(){return this.isMedium||this.isHigh},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"canShowHighVolumeBar",{get:function(){return this.isHigh},enumerable:!0,configurable:!0}),t.MAX_VOLUME_PERCENT=110,t.DEFAULT_LEVEL=.681,t}(),bn=function(t,e,n){void 0===n&&(n={});var r=function(t){return function(e,n){return{dragToSetLevel:function(t){e.isSliderActive||(n.activateSlider(),n.setPreMuteLevel(e.level)),n.setLevel(t)},setLevel:function(n){t.next({type:n>e.level?He.VOLUME_UP:He.VOLUME_DOWN}),e.level=n,e.isMutedOrForceMuted&&n>0?e.volumeStatus=En.AUDIBLE:e.isMutedOrForceMuted||0!==n||(e.volumeStatus=En.MUTED)},setPreMuteLevel:function(t){e.preMuteLevel=t},mute:function(){e.preMuteLevel=e.level,e.volumeStatus=En.MUTED,e.level=0,t.next({type:He.MUTE})},forceMute:function(){e.preMuteLevel=e.level||e.preMuteLevel,e.volumeStatus=En.FORCE_MUTED,e.level=0},unMute:function(){e.volumeStatus=En.AUDIBLE,e.level=e.preMuteLevel,t.next({type:He.UNMUTE})},activateSlider:function(){e.isSliderActive=!0},deactivateSlider:function(){e.isSliderActive=!1}}}}(e);return t.createStore({name:ye.a.VOLUME,model:yn,actions:r},n)},gn=Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t},vn=function(t,e){var n=Object(_e.createState)({debug:"production"===Ee.a.DEVELOPMENT}),r=Xe(),i=e||{},o=i.captions,a=i.config,s=i.frame,u=i.localStorage,c=i.media,l=i.playback,f=i.timeline,h=i.volume,d=Object.keys(r).length>0?gn({},r,u):u;return function(t,e){void 0===e&&(e={}),t.createStore({name:ye.a.CAPTIONS,model:be,actions:Re,containsNestedProps:!0},e)}(n,o),function(t,e){t.createStore({name:ye.a.CONFIG,model:Ke,actions:Be,containsNestedProps:!0},e)}(n,a),$e(n,t,s),function(t,e){void 0===e&&(e={}),t.createStore({name:ye.a.LOCAL_STORAGE,model:ze,actions:Je},e)}(n,d),function(t,e){void 0===e&&(e={}),t.createStore({name:ye.a.MEDIA,model:en,actions:nn},e)}(n,c),ln(n,t,l),function(t,e){t.createStore({name:ye.a.TIMELINE,model:pn,actions:dn},e)}(n,f),bn(n,t,h),n},mn=n(31),Sn=n(30);!function(t){t.BROWSER="BROWSER"}(_n||(_n={}));var Tn,An=_n,On=function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})},Rn=function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},In=function(t){return On(void 0,void 0,void 0,function(){return Rn(this,function(e){switch(e.label){case 0:return[4,(r=An.BROWSER,On(void 0,void 0,void 0,function(){return Rn(this,function(t){switch(t.label){case 0:switch(r){case An.BROWSER:return[3,1]}return[3,3];case 1:return[4,n.e(4).then(n.bind(null,246))];case 2:return[2,t.sent()];case 3:return[2]}})}))];case 1:return[2,new(0,e.sent().default)(t)]}var r})})},Nn=function(){if(!Boolean(document.webkitFullscreenElement||document.mozFullScreenElement||document.fullscreenElement)){var t=new CustomEvent("exitfullscreen",{bubbles:!0});document.dispatchEvent(t)}},wn=function(t){return[(window.addEventListener("webkitfullscreenchange",Nn),window.addEventListener("mozfullscreenchange",Nn),window.addEventListener("MSFullscreenchange",Nn),window.addEventListener("fullscreenchange",Nn),{release:function(){window.removeEventListener("webkitfullscreenchange",Nn),window.removeEventListener("mozfullscreenchange",Nn),window.removeEventListener("MSFullscreenchange",Nn),window.removeEventListener("fullscreenchange",Nn)}}),function(t){var e=function(){return t.ui.uiEvents$.next({type:j.a.FRAME_FOCUS})},n=t.refs.root;return n.addEventListener("focus",e),{release:function(){return n.removeEventListener("focus",e)}}}(t),function(t){var e=function(){return t.ui.uiEvents$.next({type:j.a.FRAME_BLUR})},n=t.refs.root;return n.addEventListener("blur",e),{release:function(){return n.removeEventListener("blur",e)}}}(t),function(t){var e=function(){return t.refs.root.focus()},n=t.refs.root;return n.addEventListener("click",e),{release:function(){return n.removeEventListener("click",e)}}}(t),function(t){var e=function(){return t.ui.uiEvents$.next({type:j.a.FRAME_MOUSE_ENTER})},n=t.state.stores.config.value.behaviour.fullscreenElement||t.refs.root;return n.addEventListener("mouseenter",e),{release:function(){return n.removeEventListener("mouseenter",e)}}}(t),function(t){var e=function(){return t.ui.uiEvents$.next({type:j.a.FRAME_MOUSE_LEAVE})},n=t.state.stores.config.value.behaviour.fullscreenElement||t.refs.root;return n.addEventListener("mouseleave",e),{release:function(){return n.removeEventListener("mouseleave",e)}}}(t),function(t){var e=function(){return t.ui.uiEvents$.next({type:j.a.FRAME_MOUSE_MOVE})},n=t.state.stores.config.value.behaviour.fullscreenElement||t.refs.root;return n.addEventListener("mousemove",e),{release:function(){return n.removeEventListener("mousemove",e)}}}(t)]},Cn=n(34);!function(t){t.LOAD="load",t.BUFFER="buffer",t.PLAY="play",t.PAUSE="pause",t.END="end",t.ERROR="error",t.TIMEUPDATE="timeupdate"}(Tn||(Tn={}));var Pn=Tn,Ln=function(t,e,n){void 0===n&&(n=null);var r=new CustomEvent(e,{bubbles:!0,cancelable:!0,detail:n});t.dispatchEvent(r)},Mn=function(t){return[function(t,e){return t.subscribe(function(t){Ln(e,Pn.ERROR,t),a.a.error("[DAZN Web Player] "+t.type,t.source)})}(t.errors$,t),function(t,e){return t.subscribe(function(t){var n=e.state.stores.playback.value.bufferingType;switch(t){case b.a.BUFFERING:Ln(e,Pn.BUFFER,n);break;case b.a.ENDED:Ln(e,Pn.END);break;case b.a.PAUSED:case b.a.ERRORED:Ln(e,Pn.PAUSE);break;case b.a.A_LOADING:case b.a.B_LOADING:Ln(e,Pn.LOAD);break;case b.a.PLAYING:Ln(e,Pn.PLAY)}})}(Object(h.a)(t.state.stores.playback.update$),t),function(t,e){return t.subscribe(function(t){return e.next(t)})}(function(t,e){return void 0===e&&(e=Cn.a),t.pipe(Object(x.a)(function(t){return t.isNetworkInducedBuffering}),Object(ft.a)(function(){return Object($.from)(e())}),Object(x.a)(function(t){return!t}),B({type:rn.a.PLAYBACK_INTERRUPTED_CONNECTION_LOST,source:null}))}(t.state.stores.playback.update$),t.consumerOutput.errors$)]},Un=function(){this.media$=new $.Subject,this.config$=new $.Subject,this.togglePlayPause$=new $.Subject,this.toggleFullscreen$=new $.Subject,this.seek$=new $.Subject,this.volume$=new $.Subject,this.toggleControls$=new $.Subject,this.error$=new $.Subject},xn=function(){this.state$=null,this.interactions$=new $.Subject,this.errors$=new $.Subject},Dn=n(37),jn=function(){this.wrapper=null,this.root=null,this.solution=null,this.ui=null},Fn=function(t,e,n,r){return new(n||(n=Promise))(function(i,o){function a(t){try{u(r.next(t))}catch(t){o(t)}}function s(t){try{u(r.throw(t))}catch(t){o(t)}}function u(t){t.done?i(t.value):new n(function(e){e(t.value)}).then(a,s)}u((r=r.apply(t,e||[])).next())})},Vn=function(t,e){var n,r,i,o,a={label:0,sent:function(){if(1&i[0])throw i[1];return i[1]},trys:[],ops:[]};return o={next:s(0),throw:s(1),return:s(2)},"function"==typeof Symbol&&(o[Symbol.iterator]=function(){return this}),o;function s(o){return function(s){return function(o){if(n)throw new TypeError("Generator is already executing.");for(;a;)try{if(n=1,r&&(i=2&o[0]?r.return:o[0]?r.throw||((i=r.return)&&i.call(r),0):r.next)&&!(i=i.call(r,o[1])).done)return i;switch(r=0,i&&(o=[2&o[0],i.value]),o[0]){case 0:case 1:i=o;break;case 4:return a.label++,{value:o[1],done:!1};case 5:a.label++,r=o[1],o=[0];continue;case 7:o=a.ops.pop(),a.trys.pop();continue;default:if(!(i=(i=a.trys).length>0&&i[i.length-1])&&(6===o[0]||2===o[0])){a=0;continue}if(3===o[0]&&(!i||o[1]>i[0]&&o[1]<i[3])){a.label=o[1];break}if(6===o[0]&&a.label<i[1]){a.label=i[1],i=o;break}if(i&&a.label<i[2]){a.label=i[2],a.ops.push(o);break}i[2]&&a.ops.pop(),a.trys.pop();continue}o=e.call(t,a)}catch(t){o=[6,t],r=0}finally{n=i=0}if(5&o[0])throw o[1];return{value:o[0]?o[1]:void 0,done:!0}}([o,s])}}},kn=function(t,e){var n="function"==typeof Symbol&&t[Symbol.iterator];if(!n)return t;var r,i,o=n.call(t),a=[];try{for(;(void 0===e||e-- >0)&&!(r=o.next()).done;)a.push(r.value)}catch(t){i={error:t}}finally{try{r&&!r.done&&(n=o.return)&&n.call(o)}finally{if(i)throw i.error}}return a},Yn=function(){for(var t=[],e=0;e<arguments.length;e++)t=t.concat(kn(arguments[e]));return t},Kn=function(){function t(t,e){this.solution=null,this.ui=null,this.refs=null,this.state=null,this.consumerInput=new Un,this.consumerOutput=new xn,this.subscriptions=[],this.eventBindings=[],this.eventTarget=document.createDocumentFragment(),this.state=vn(this.consumerOutput.interactions$,{config:e}),this.refs=this.buildSkeleton(t),this.consumerOutput.state$=this.state.update$,this.addEventListener=this.eventTarget.addEventListener.bind(this.eventTarget),this.removeEventListener=this.eventTarget.removeEventListener.bind(this.eventTarget),this.dispatchEvent=this.eventTarget.dispatchEvent.bind(this.eventTarget),this.analytics=new w(this)}return Object.defineProperty(t.prototype,"state$",{get:function(){return this.consumerOutput.state$},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"interactions$",{get:function(){return this.consumerOutput.interactions$},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"errors$",{get:function(){return this.consumerOutput.errors$},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasLoadedSolution",{get:function(){return null!==this.solution},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"hasLoadedUi",{get:function(){return null!==this.ui},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"config",{get:function(){return this.state.stores.config.value},enumerable:!0,configurable:!0}),t.prototype.load=function(t){var e=this;if("string"!=typeof t.src||0===t.src.length)throw new TypeError("Invalid media source provided");var n=o()(new en,t);if(![tn.LINEAR,tn.LIVE,tn.VOD].includes(n.mediaType))throw new RangeError('Invalid media type "'+n.mediaType+'" provided');this.loadDependencies(n).then(function(){return e.consumerInput.media$.next(n)}).catch(function(t){return console.error(t)})},t.prototype.unload=function(){this.consumerInput.media$.next({})},t.prototype.configure=function(t){this.state.stores.config.actions.configure(t)},t.prototype.play=function(){this.consumerInput.togglePlayPause$.next(!0)},t.prototype.pause=function(){this.consumerInput.togglePlayPause$.next(!1)},t.prototype.seek=function(t){this.consumerInput.seek$.next(t)},t.prototype.volume=function(t){this.consumerInput.volume$.next(t)},t.prototype.fadeOutVolume=function(){},t.prototype.fadeInVolume=function(){},t.prototype.showControls=function(){this.consumerInput.toggleControls$.next(!0)},t.prototype.hideControls=function(){this.consumerInput.toggleControls$.next(!1)},t.prototype.enterFullscreen=function(){this.consumerInput.toggleFullscreen$.next(!0)},t.prototype.exitFullscreen=function(){this.consumerInput.toggleFullscreen$.next(!1)},t.prototype.error=function(t){this.consumerInput.error$.next(t)},t.prototype.destroy=function(){return Fn(this,void 0,void 0,function(){return Vn(this,function(t){switch(t.label){case 0:return this.disconnectSubscriptions(),this.ui&&this.ui.unmount(),this.solution?[4,this.solution.destroy()]:[3,2];case 1:t.sent(),t.label=2;case 2:return this.analytics.destroy(),this.refs.wrapper.innerHTML="",[2]}})})},t.prototype.loadDependencies=function(t){return Fn(this,void 0,void 0,function(){var e,n,r,i,o,a=this;return Vn(this,function(s){switch(s.label){case 0:return this.disconnectSubscriptions(),[4,U(this,t)];case 1:return r=s.sent(),this.hasLoadedSolution&&r!==this.solution?[4,this.solution.destroy()]:[3,3];case 2:s.sent(),s.label=3;case 3:return this.solution=r,this.hasLoadedUi?[3,5]:(i=this,[4,In(this)]);case 4:i.ui=s.sent(),s.label=5;case 5:return o=[this.solution.mediaErrors$.subscribe(function(t){return a.errors$.next(t)})],(e=this.subscriptions).push.apply(e,Yn(Mn(this),pe(this),o)),(n=this.eventBindings).push.apply(n,Yn(wn(this))),this.ui.mount(),[2]}})})},t.prototype.disconnectSubscriptions=function(){this.subscriptions.forEach(function(t){return t.unsubscribe()}),this.eventBindings.forEach(function(t){return t.release()}),this.subscriptions.length=this.eventBindings.length=0},t.prototype.buildSkeleton=function(t){var e=new jn,n=e.root=document.createElement("div"),r=e.solution=document.createElement("div"),i=e.ui=document.createElement("div"),o=Object(mn.a)(Sn.a),a=Object(mn.a)(Sn.G),s=Object(mn.a)(Sn.N);return n.className=Dn.player,n.tabIndex=this.config.behaviour.tabIndex,r.className=Dn.solution,i.className=Dn.ui,n.setAttribute("data-version","0.7.0-hotfix"),n.appendChild(r),n.appendChild(i),t.appendChild(n),e.wrapper=t,o&&n.setAttribute("data-test-id",o),a&&r.setAttribute("data-test-id",a),s&&i.setAttribute("data-test-id",s),e},t}(),Bn=function(t,e){var n=new Kn(t,e);this.configure=n.configure.bind(n),this.destroy=n.destroy.bind(n),this.error=n.error.bind(n),this.load=n.load.bind(n),this.unload=n.unload.bind(n),this.play=n.play.bind(n),this.pause=n.pause.bind(n),this.seek=n.seek.bind(n),this.volume=n.volume.bind(n),this.fadeInVolume=n.fadeInVolume.bind(n),this.fadeOutVolume=n.fadeOutVolume.bind(n),this.showControls=n.showControls.bind(n),this.hideControls=n.hideControls.bind(n),this.enterFullscreen=n.enterFullscreen.bind(n),this.exitFullscreen=n.exitFullscreen.bind(n),this.addEventListener=n.addEventListener.bind(n),this.removeEventListener=n.removeEventListener.bind(n),Object.defineProperties(this,{state:{get:function(){return n.state}},state$:{get:function(){return n.state$}},interactions$:{get:function(){return n.interactions$}},errors$:{get:function(){return n.errors$}}})},Gn=function(t,e){if(void 0===e&&(e={}),!(t instanceof HTMLElement))throw new TypeError("No valid parent element provided");return new Bn(t,e)},Hn=n(50),Qn=n(22);n.d(e,"createPlayer",function(){return Gn}),n.d(e,"create",function(){return Gn}),n.d(e,"CueBackdrop",function(){return Ce}),n.d(e,"CueColour",function(){return Le}),n.d(e,"CueFont",function(){return Ue}),n.d(e,"CueSize",function(){return xe.a}),n.d(e,"DrmType",function(){return Qn.a}),n.d(e,"MediaType",function(){return tn}),n.d(e,"ErrorType",function(){return rn.a}),n.d(e,"EventType",function(){return Pn}),n.d(e,"Util",function(){return Hn}),n.d(e,"UiEventType",function(){return j.a})},function(t,e,n){(e=t.exports=n(49)(!1)).i(n(45),void 0),e.push([t.i,".player___player___UhGVK {\n    position: relative;\n    padding-top: 56.25%;\n    background: black;\n}\n\n.player___player___UhGVK:focus {\n    outline: none;\n}\n\n.player___player___UhGVK *,\n.player___player___UhGVK *::before,\n.player___player___UhGVK *::after {\n    box-sizing: border-box;\n}\n\n*:-webkit-full-screen .player___player___UhGVK {\n    position: absolute;\n    top: 0;\n    right: 0;\n    bottom: 0;\n    left: 0;\n    padding-top: 0;\n    width: 100%;\n    height: 100%;\n}\n\n.player___player___UhGVK:-webkit-full-screen {\n    position: absolute;\n    top: 0;\n    right: 0;\n    bottom: 0;\n    left: 0;\n    padding-top: 0;\n    width: 100%;\n    height: 100%;\n}\n\n*:-moz-full-screen .player___player___UhGVK {\n    position: absolute;\n    top: 0;\n    right: 0;\n    bottom: 0;\n    left: 0;\n    padding-top: 0;\n    width: 100%;\n    height: 100%;\n}\n\n.player___player___UhGVK:-moz-full-screen {\n    position: absolute;\n    top: 0;\n    right: 0;\n    bottom: 0;\n    left: 0;\n    padding-top: 0;\n    width: 100%;\n    height: 100%;\n}\n\n*:-ms-fullscreen .player___player___UhGVK {\n    position: absolute;\n    top: 0;\n    right: 0;\n    bottom: 0;\n    left: 0;\n    padding-top: 0;\n    width: 100%;\n    height: 100%;\n}\n\n.player___player___UhGVK:-ms-fullscreen {\n    position: absolute;\n    top: 0;\n    right: 0;\n    bottom: 0;\n    left: 0;\n    padding-top: 0;\n    width: 100%;\n    height: 100%;\n}\n\n*:fullscreen .player___player___UhGVK {\n    position: absolute;\n    top: 0;\n    right: 0;\n    bottom: 0;\n    left: 0;\n    padding-top: 0;\n    width: 100%;\n    height: 100%;\n}\n\n.player___player___UhGVK:fullscreen {\n    position: absolute;\n    top: 0;\n    right: 0;\n    bottom: 0;\n    left: 0;\n    padding-top: 0;\n    width: 100%;\n    height: 100%;\n}\n\n.player___solution___19ZcW,\n.player___ui___3Nhx8 {\n}\n\n.player___solution___19ZcW video {\n    position: absolute;\n    object-fit: contain;\n    width: 100%;\n    height: 100%;\n}\n",""]),e.locals={player:"player___player___UhGVK",solution:"player___solution___19ZcW "+n(45).locals.fill,ui:"player___ui___3Nhx8 "+n(45).locals.fill}},function(t,e){t.exports=function(t){var e="undefined"!=typeof window&&window.location;if(!e)throw new Error("fixUrls requires window.location");if(!t||"string"!=typeof t)return t;var n=e.protocol+"//"+e.host,r=n+e.pathname.replace(/\/[^\/]*$/,"/");return t.replace(/url\s*\(((?:[^)(]|\((?:[^)(]+|\([^)(]*\))*\))*)\)/gi,function(t,e){var i,o=e.trim().replace(/^"(.*)"$/,function(t,e){return e}).replace(/^'(.*)'$/,function(t,e){return e});return/^(#|data:|http:\/\/|https:\/\/|file:\/\/\/|\s*$)/i.test(o)?t:(i=0===o.indexOf("//")?o:0===o.indexOf("/")?n+o:r+o.replace(/^\.\//,""),"url("+JSON.stringify(i)+")")})}},function(t,e,n){var r=n(47).FilterCSS,i=n(54),o=n(51),a=o.parseTag,s=o.parseAttr,u=n(46);function c(t){return void 0===t||null===t}function l(t){(t=function(t){var e={};for(var n in t)e[n]=t[n];return e}(t||{})).stripIgnoreTag&&(t.onIgnoreTag&&console.error('Notes: cannot use these two options "stripIgnoreTag" and "onIgnoreTag" at the same time'),t.onIgnoreTag=i.onIgnoreTagStripAll),t.whiteList=t.whiteList||i.whiteList,t.onTag=t.onTag||i.onTag,t.onTagAttr=t.onTagAttr||i.onTagAttr,t.onIgnoreTag=t.onIgnoreTag||i.onIgnoreTag,t.onIgnoreTagAttr=t.onIgnoreTagAttr||i.onIgnoreTagAttr,t.safeAttrValue=t.safeAttrValue||i.safeAttrValue,t.escapeHtml=t.escapeHtml||i.escapeHtml,this.options=t,!1===t.css?this.cssFilter=!1:(t.css=t.css||{},this.cssFilter=new r(t.css))}l.prototype.process=function(t){if(!(t=(t=t||"").toString()))return"";var e=this.options,n=e.whiteList,r=e.onTag,o=e.onIgnoreTag,l=e.onTagAttr,f=e.onIgnoreTagAttr,h=e.safeAttrValue,d=e.escapeHtml,p=this.cssFilter;e.stripBlankChar&&(t=i.stripBlankChar(t)),e.allowCommentTag||(t=i.stripCommentTag(t));var _=!1;e.stripIgnoreTagBody&&(_=i.StripTagBody(e.stripIgnoreTagBody,o),o=_.onIgnoreTag);var E=a(t,function(t,e,i,a,_){var E,y={sourcePosition:t,position:e,isClosing:_,isWhite:n.hasOwnProperty(i)};if(!c(E=r(i,a,y)))return E;if(y.isWhite){if(y.isClosing)return"</"+i+">";var b=function(t){var e=u.spaceIndex(t);if(-1===e)return{html:"",closing:"/"===t[t.length-2]};var n="/"===(t=u.trim(t.slice(e+1,-1)))[t.length-1];return n&&(t=u.trim(t.slice(0,-1))),{html:t,closing:n}}(a),g=n[i],v=s(b.html,function(t,e){var n,r=-1!==u.indexOf(g,t);return c(n=l(i,t,e,r))?r?(e=h(i,t,e,p))?t+'="'+e+'"':t:c(n=f(i,t,e,r))?void 0:n:n});return a="<"+i,v&&(a+=" "+v),b.closing&&(a+=" /"),a+=">"}return c(E=o(i,a,y))?d(a):E},d);return _&&(E=_.remove(E)),E},t.exports=l},function(t,e,n){var r=n(52);t.exports=function(t,e){";"!==(t=r.trimRight(t))[t.length-1]&&(t+=";");var n=t.length,i=!1,o=0,a=0,s="";function u(){if(!i){var n=r.trim(t.slice(o,a)),u=n.indexOf(":");if(-1!==u){var c=r.trim(n.slice(0,u)),l=r.trim(n.slice(u+1));if(c){var f=e(o,s.length,c,l,n);f&&(s+=f+"; ")}}}o=a+1}for(;a<n;a++){var c=t[a];if("/"===c&&"*"===t[a+1]){var l=t.indexOf("*/",a+2);if(-1===l)break;o=(a=l+1)+1,i=!1}else"("===c?i=!0:")"===c?i=!1:";"===c?i||u():"\n"===c&&u()}return r.trim(s)}},function(t,e,n){var r=n(53),i=n(73);function o(t){return void 0===t||null===t}function a(t){(t=function(t){var e={};for(var n in t)e[n]=t[n];return e}(t||{})).whiteList=t.whiteList||r.whiteList,t.onAttr=t.onAttr||r.onAttr,t.onIgnoreAttr=t.onIgnoreAttr||r.onIgnoreAttr,t.safeAttrValue=t.safeAttrValue||r.safeAttrValue,this.options=t}n(52),a.prototype.process=function(t){if(!(t=(t=t||"").toString()))return"";var e=this.options,n=e.whiteList,r=e.onAttr,a=e.onIgnoreAttr,s=e.safeAttrValue;return i(t,function(t,e,i,u,c){var l=n[i],f=!1;if(!0===l?f=l:"function"==typeof l?f=l(u):l instanceof RegExp&&(f=l.test(u)),!0!==f&&(f=!1),u=s(i,u)){var h,d={position:e,sourcePosition:t,source:c,isWhite:f};return f?o(h=r(i,u,d))?i+":"+u:h:o(h=a(i,u,d))?void 0:h}})},t.exports=a},function(t,e){!function(){if("function"==typeof window.CustomEvent)return!1;function t(t,e){e=e||{bubbles:!1,cancelable:!1,detail:void 0};var n=document.createEvent("CustomEvent");return n.initCustomEvent(t,e.bubbles,e.cancelable,e.detail),n}t.prototype=window.Event.prototype,window.CustomEvent=t}()},function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n(4);function i(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.length;if(0===n)throw new Error("list of properties cannot be empty.");return function(e){return Object(r.a)(function(t,e){return function(n){for(var r=n,i=0;i<e;i++){var o=r[t[i]];if(void 0===o)return;r=o}return r}}(t,n))(e)}}},function(t,e){t.exports=r},function(t,e){t.exports=i}])}(n(15),n(37),n(73),n(57),n(132))},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r=function(){return"function"==typeof Symbol&&Symbol.iterator?Symbol.iterator:"@@iterator"}()},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r="function"==typeof Symbol&&Symbol.observable||"@@observable"},function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n(0),i=function(t){function e(){var n=t.call(this,"object unsubscribed")||this;return n.name="ObjectUnsubscribedError",Object.setPrototypeOf(n,e.prototype),n}return r.a(e,t),e}(Error)},function(t,e,n){"use strict";function r(t){return"function"==typeof t}n.d(e,"a",function(){return r})},function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n(0),i=n(49),o=function(t){function e(n,r){void 0===r&&(r=i.a.now);var o=t.call(this,n,function(){return e.delegate&&e.delegate!==o?e.delegate.now():r()})||this;return o.actions=[],o.active=!1,o.scheduled=void 0,o}return r.a(e,t),e.prototype.schedule=function(n,r,i){return void 0===r&&(r=0),e.delegate&&e.delegate!==this?e.delegate.schedule(n,r,i):t.prototype.schedule.call(this,n,r,i)},e.prototype.flush=function(t){var e=this.actions;if(this.active)e.push(t);else{var n;this.active=!0;do{if(n=t.execute(t.state,t.delay))break}while(t=e.shift());if(this.active=!1,n){for(;t=e.shift();)t.unsubscribe();throw n}}},e}(i.a)},function(t,e,n){"use strict";var r=n(0),i=function(t){function e(e,n){return t.call(this)||this}return r.a(e,t),e.prototype.schedule=function(t,e){return void 0===e&&(e=0),this},e}(n(5).a);n.d(e,"a",function(){return o});var o=function(t){function e(e,n){var r=t.call(this,e,n)||this;return r.scheduler=e,r.work=n,r.pending=!1,r}return r.a(e,t),e.prototype.schedule=function(t,e){if(void 0===e&&(e=0),this.closed)return this;this.state=t;var n=this.id,r=this.scheduler;return null!=n&&(this.id=this.recycleAsyncId(r,n,e)),this.pending=!0,this.delay=e,this.id=this.id||this.requestAsyncId(r,this.id,e),this},e.prototype.requestAsyncId=function(t,e,n){return void 0===n&&(n=0),setInterval(t.flush.bind(t,this),n)},e.prototype.recycleAsyncId=function(t,e,n){if(void 0===n&&(n=0),null!==n&&this.delay===n&&!1===this.pending)return e;clearInterval(e)},e.prototype.execute=function(t,e){if(this.closed)return new Error("executing a cancelled action");this.pending=!1;var n=this._execute(t,e);if(n)return n;!1===this.pending&&null!=this.id&&(this.id=this.recycleAsyncId(this.scheduler,this.id,null))},e.prototype._execute=function(t,e){var n=!1,r=void 0;try{this.work(t)}catch(t){n=!0,r=!!t&&t||new Error(t)}if(n)return this.unsubscribe(),r},e.prototype._unsubscribe=function(){var t=this.id,e=this.scheduler,n=e.actions,r=n.indexOf(this);this.work=null,this.state=null,this.pending=!1,this.scheduler=null,-1!==r&&n.splice(r,1),null!=t&&(this.id=this.recycleAsyncId(e,t,null)),this.delay=null},e}(i)},function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n(31),i=new(n(30).a)(r.a)},function(t,e,n){"use strict";function r(t){return t}n.d(e,"a",function(){return r})},function(t,e,n){"use strict";function r(t){setTimeout(function(){throw t})}n.d(e,"a",function(){return r})},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r="function"==typeof Symbol&&"function"==typeof Symbol.for?Symbol.for("rxSubscriber"):"@@rxSubscriber"},function(t,e,n){"use strict";e.__esModule=!0;var r=function(t){return t&&t.__esModule?t:{default:t}}(n(75));e.default=function(){function t(t,e){for(var n=0;n<e.length;n++){var i=e[n];i.enumerable=i.enumerable||!1,i.configurable=!0,"value"in i&&(i.writable=!0),(0,r.default)(t,i.key,i)}}return function(e,n,r){return n&&t(e.prototype,n),r&&t(e,r),e}}()},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(77),i=n(70);e.ArrayStrategy=i.default,e.default=r.default},function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n(0),i=function(t){function e(n){var r=t.call(this,n?n.length+" errors occurred during unsubscription:\n  "+n.map(function(t,e){return e+1+") "+t.toString()}).join("\n  "):"")||this;return r.errors=n,r.name="UnsubscriptionError",Object.setPrototypeOf(r,e.prototype),r}return r.a(e,t),e}(Error)},function(t,e,n){var r=n(72);t.exports=function(t){return function e(n){return 0===arguments.length||r(n)?e:t.apply(this,arguments)}}},function(t,e,n){var r=n(39),i=n(72);t.exports=function(t){return function e(n,o){switch(arguments.length){case 0:return e;case 1:return i(n)?e:r(function(e){return t(n,e)});default:return i(n)&&i(o)?e:i(n)?r(function(e){return t(e,o)}):i(o)?r(function(e){return t(n,e)}):t(n,o)}}}},function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n(10),i=n(20),o=n(8),a=n(62);function s(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];switch(Object(r.a)(n)?t.pop():n=void 0,t.length){case 0:return Object(o.b)(n);case 1:return n?Object(i.a)(t,n):Object(a.a)(t[0]);default:return Object(i.a)(t,n)}}},function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n(0),i=function(t){function e(){var n=t.call(this,"no elements in sequence")||this;return n.name="EmptyError",Object.setPrototypeOf(n,e.prototype),n}return r.a(e,t),e}(Error)},function(t,e,n){"use strict";n.d(e,"a",function(){return o}),n.d(e,"b",function(){return a});var r=n(1),i=n(22),o=new r.a(i.a);function a(){return o}},function(t,e,n){t.exports={default:n(147),__esModule:!0}},function(t,e,n){"use strict";var r=n(10),i=n(41),o=n(18),a=n(69);function s(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return 1===t.length||2===t.length&&Object(r.a)(t[1])?Object(o.a)(t[0]):Object(a.a)(1)(i.a.apply(void 0,t))}n.d(e,"a",function(){return s})},function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n(19),i=n(34),o={closed:!0,next:function(t){},error:function(t){if(r.a.useDeprecatedSynchronousErrorHandling)throw t;Object(i.a)(t)},complete:function(){}}},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r,i=n(24);function o(){try{return r.apply(this,arguments)}catch(t){return i.a.e=t,i.a}}function a(t){return r=t,o}},function(t,e,n){t.exports=n(148)},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r=function(){function t(e,n){void 0===n&&(n=t.now),this.SchedulerAction=e,this.now=n}return t.prototype.schedule=function(t,e,n){return void 0===e&&(e=0),new this.SchedulerAction(this,t).schedule(n,e)},t.now=function(){return Date.now()},t}()},function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n(9);function i(t){return!Object(r.a)(t)&&t-parseFloat(t)+1>=0}},function(t,e){t.exports=function(t,e){switch(t){case 0:return function(){return e.apply(this,arguments)};case 1:return function(t){return e.apply(this,arguments)};case 2:return function(t,n){return e.apply(this,arguments)};case 3:return function(t,n,r){return e.apply(this,arguments)};case 4:return function(t,n,r,i){return e.apply(this,arguments)};case 5:return function(t,n,r,i,o){return e.apply(this,arguments)};case 6:return function(t,n,r,i,o,a){return e.apply(this,arguments)};case 7:return function(t,n,r,i,o,a,s){return e.apply(this,arguments)};case 8:return function(t,n,r,i,o,a,s,u){return e.apply(this,arguments)};case 9:return function(t,n,r,i,o,a,s,u,c){return e.apply(this,arguments)};case 10:return function(t,n,r,i,o,a,s,u,c,l){return e.apply(this,arguments)};default:throw new Error("First argument to _arity must be a non-negative integer no greater than ten")}}},function(t,e,n){"use strict";e.__esModule=!0;var r=a(n(108)),i=a(n(110)),o="function"==typeof i.default&&"symbol"==typeof r.default?function(t){return typeof t}:function(t){return t&&"function"==typeof i.default&&t.constructor===i.default&&t!==i.default.prototype?"symbol":typeof t};function a(t){return t&&t.__esModule?t:{default:t}}e.default="function"==typeof i.default&&"symbol"===o(r.default)?function(t){return void 0===t?"undefined":o(t)}:function(t){return t&&"function"==typeof i.default&&t.constructor===i.default&&t!==i.default.prototype?"symbol":void 0===t?"undefined":o(t)}},function(t,e,n){"use strict";n.d(e,"a",function(){return i}),n.d(e,"b",function(){return o});var r=n(22);function i(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return o(t)}function o(t){return t?1===t.length?t[0]:function(e){return t.reduce(function(t,e){return e(t)},e)}:r.a}},function(t,e,n){"use strict";n.d(e,"a",function(){return c}),n.d(e,"b",function(){return f});var r=n(0),i=n(16),o=n(1),a=n(2),s=n(5),u=n(59),c=function(t){function e(e,n){var r=t.call(this)||this;return r.source=e,r.subjectFactory=n,r._refCount=0,r._isComplete=!1,r}return r.a(e,t),e.prototype._subscribe=function(t){return this.getSubject().subscribe(t)},e.prototype.getSubject=function(){var t=this._subject;return t&&!t.isStopped||(this._subject=this.subjectFactory()),this._subject},e.prototype.connect=function(){var t=this._connection;return t||(this._isComplete=!1,(t=this._connection=new s.a).add(this.source.subscribe(new h(this.getSubject(),this))),t.closed?(this._connection=null,t=s.a.EMPTY):this._connection=t),t},e.prototype.refCount=function(){return Object(u.a)()(this)},e}(o.a),l=c.prototype,f={operator:{value:null},_refCount:{value:0,writable:!0},_subject:{value:null,writable:!0},_connection:{value:null,writable:!0},_subscribe:{value:l._subscribe},_isComplete:{value:l._isComplete,writable:!0},getSubject:{value:l.getSubject},connect:{value:l.connect},refCount:{value:l.refCount}},h=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return r.a(e,t),e.prototype._error=function(e){this._unsubscribe(),t.prototype._error.call(this,e)},e.prototype._complete=function(){this.connectable._isComplete=!0,this._unsubscribe(),t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._connection;t._refCount=0,t._subject=null,t._connection=null,e&&e.unsubscribe()}},e}(i.b);a.a},function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n(0),i=function(t){function e(){var n=t.call(this,"argument out of range")||this;return n.name="ArgumentOutOfRangeError",Object.setPrototypeOf(n,e.prototype),n}return r.a(e,t),e}(Error)},function(t,e,n){"use strict";n.d(e,"a",function(){return s});var r=n(1),i=n(10),o=n(69),a=n(20);function s(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=Number.POSITIVE_INFINITY,s=null,u=t[t.length-1];return Object(i.a)(u)?(s=t.pop(),t.length>1&&"number"==typeof t[t.length-1]&&(n=t.pop())):"number"==typeof u&&(n=t.pop()),null===s&&1===t.length&&t[0]instanceof r.a?t[0]:Object(o.a)(n)(Object(a.a)(t,s))}},function(e,n){e.exports=t},function(t,e,n){"use strict";function r(t){return null!=t&&"object"==typeof t}n.d(e,"a",function(){return r})},function(t,e,n){"use strict";n.d(e,"a",function(){return o});var r=n(0),i=n(2);function o(){return function(t){return t.lift(new a(t))}}var a=function(){function t(t){this.connectable=t}return t.prototype.call=function(t,e){var n=this.connectable;n._refCount++;var r=new s(t,n),i=e.subscribe(r);return r.closed||(r.connection=n.connect()),i},t}(),s=function(t){function e(e,n){var r=t.call(this,e)||this;return r.connectable=n,r}return r.a(e,t),e.prototype._unsubscribe=function(){var t=this.connectable;if(t){this.connectable=null;var e=t._refCount;if(e<=0)this.connection=null;else if(t._refCount=e-1,e>1)this.connection=null;else{var n=this.connection,r=t._connection;this.connection=null,!r||n&&r!==n||r.unsubscribe()}}else this.connection=null},e}(i.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n(0),i=function(t){function e(e,n){var r=t.call(this)||this;return r.subject=e,r.subscriber=n,r.closed=!1,r}return r.a(e,t),e.prototype.unsubscribe=function(){if(!this.closed){this.closed=!0;var t=this.subject,e=t.observers;if(this.subject=null,e&&0!==e.length&&!t.isStopped&&!t.closed){var n=e.indexOf(this.subscriber);-1!==n&&e.splice(n,1)}}},e}(n(5).a)},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r=function(t){return function(e){for(var n=0,r=t.length;n<r&&!e.closed;n++)e.next(t[n]);e.closed||e.complete()}}},function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n(1);function i(t){var e=new r.a(function(e){e.next(t),e.complete()});return e._isScalar=!0,e.value=t,e}},function(t,e,n){"use strict";n.d(e,"a",function(){return d});var r=n(1),i=n(61),o=n(67),a=n(68),s=n(64),u=n(65),c=n(66),l=n(58),f=n(26),h=n(27),d=function(t){if(t instanceof r.a)return function(e){return t._isScalar?(e.next(t.value),void e.complete()):t.subscribe(e)};if(t&&"function"==typeof t[h.a])return Object(s.a)(t);if(Object(u.a)(t))return Object(i.a)(t);if(Object(c.a)(t))return Object(o.a)(t);if(t&&"function"==typeof t[f.a])return Object(a.a)(t);var e=Object(l.a)(t)?"an invalid object":"'"+t+"'";throw new TypeError("You provided "+e+" where a stream was expected. You can provide an Observable, Promise, Array, or Iterable.")}},function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n(27),i=function(t){return function(e){var n=t[r.a]();if("function"!=typeof n.subscribe)throw new TypeError("Provided object does not correctly implement Symbol.observable");return n.subscribe(e)}}},function(t,e,n){"use strict";n.d(e,"a",function(){return r});var r=function(t){return t&&"number"==typeof t.length&&"function"!=typeof t}},function(t,e,n){"use strict";function r(t){return t&&"function"!=typeof t.subscribe&&"function"==typeof t.then}n.d(e,"a",function(){return r})},function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n(34),i=function(t){return function(e){return t.then(function(t){e.closed||(e.next(t),e.complete())},function(t){return e.error(t)}).then(null,r.a),e}}},function(t,e,n){"use strict";n.d(e,"a",function(){return i});var r=n(26),i=function(t){return function(e){for(var n=t[r.a]();;){var i=n.next();if(i.done){e.complete();break}if(e.next(i.value),e.closed)break}return"function"==typeof n.return&&e.add(function(){n.return&&n.return()}),e}}},function(t,e,n){"use strict";var r=n(0),i=n(13),o=n(11),a=n(17),s=n(18);var u=function(){function t(t,e){void 0===e&&(e=Number.POSITIVE_INFINITY),this.project=t,this.concurrent=e}return t.prototype.call=function(t,e){return e.subscribe(new c(t,this.project,this.concurrent))},t}(),c=function(t){function e(e,n,r){void 0===r&&(r=Number.POSITIVE_INFINITY);var i=t.call(this,e)||this;return i.project=n,i.concurrent=r,i.hasCompleted=!1,i.buffer=[],i.active=0,i.index=0,i}return r.a(e,t),e.prototype._next=function(t){this.active<this.concurrent?this._tryNext(t):this.buffer.push(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this.active++,this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){this.add(Object(i.a)(this,t,e,n))},e.prototype._complete=function(){this.hasCompleted=!0,0===this.active&&0===this.buffer.length&&this.destination.complete()},e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(e)},e.prototype.notifyComplete=function(t){var e=this.buffer;this.remove(t),this.active--,e.length>0?this._next(e.shift()):0===this.active&&this.hasCompleted&&this.destination.complete()},e}(o.a),l=n(33);function f(t){return void 0===t&&(t=Number.POSITIVE_INFINITY),function t(e,n,r){return void 0===r&&(r=Number.POSITIVE_INFINITY),"function"==typeof n?function(i){return i.pipe(t(function(t,r){return Object(s.a)(e(t,r)).pipe(Object(a.a)(function(e,i){return n(t,e,r,i)}))},r))}:("number"==typeof n&&(r=n),function(t){return t.lift(new u(e,r))})}(l.a,t)}n.d(e,"a",function(){return f})},function(t,e,n){"use strict";var r;Object.defineProperty(e,"__esModule",{value:!0}),function(t){t.PUSH="PUSH",t.REPLACE="REPLACE"}(r||(r={})),e.default=r},function(t,e,n){var r=n(39),i=n(40),o=n(72);t.exports=function(t){return function e(n,a,s){switch(arguments.length){case 0:return e;case 1:return o(n)?e:i(function(e,r){return t(n,e,r)});case 2:return o(n)&&o(a)?e:o(n)?i(function(e,n){return t(e,a,n)}):o(a)?i(function(e,r){return t(n,e,r)}):r(function(e){return t(n,a,e)});default:return o(n)&&o(a)&&o(s)?e:o(n)&&o(a)?i(function(e,n){return t(e,n,s)}):o(n)&&o(s)?i(function(e,n){return t(e,a,n)}):o(a)&&o(s)?i(function(e,r){return t(n,e,r)}):o(n)?r(function(e){return t(e,a,s)}):o(a)?r(function(e){return t(n,e,s)}):o(s)?r(function(e){return t(n,a,e)}):t(n,a,s)}}}},function(t,e){t.exports=function(t){return null!=t&&"object"==typeof t&&!0===t["@@functional/placeholder"]}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(119);e.createState=r.default;var i=n(76);e.State=i.default;var o=n(83);e.Store=o.default},function(t,e,n){"use strict";e.__esModule=!0;var r=function(t){return t&&t.__esModule?t:{default:t}}(n(52));e.default=function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!==(void 0===e?"undefined":(0,r.default)(e))&&"function"!=typeof e?t:e}},function(t,e,n){t.exports={default:n(107),__esModule:!0}},function(t,e,n){"use strict";var r=this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t};Object.defineProperty(e,"__esModule",{value:!0});var i=n(37),o=n(15),a=n(123),s=n(83),u=n(124),c=function(){function t(t){void 0===t&&(t={}),this.history=[{}],this.isTraversing=!1,this.update$=new o.BehaviorSubject(null),this.config=new u.default,this.historyIndex=0,i.default(this.config,t)}return Object.defineProperty(t.prototype,"snapshot",{get:function(){return this.history[this.historyIndex]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isActioning",{get:function(){return!Object.isFrozen(this.snapshot)},enumerable:!0,configurable:!0}),t.prototype.createStore=function(t,e){if(this.historyIndex>0)throw new Error("Cannot create store after state initialisation");Object.isFrozen(this.snapshot)&&(this.history[0]=r({},this.snapshot)),this.stores||(this.stores={});var n=i.default(new a.default,t),o=n.name,u=n.model,c=n.actions;if(!o||"string"!=typeof o)throw new TypeError("Invalid store name provided");if(!u||"function"!=typeof u)throw new TypeError("Invalid store model provided for store `"+o+"`");if(!c||"function"!=typeof c)throw new TypeError("Invalid actions resolver provided for store `"+o+"`");var l=this.stores[n.name]=new s.default(this,n,e);return Object.freeze(this.snapshot),l},t.prototype.pushNextSnapshotToHistory=function(t){this.history.length===this.config.maxHistoryLength?this.history.shift():this.historyIndex++,this.history.push(t)},t.prototype.go=function(t){var e=this.snapshot,n=this.historyIndex+t;if(n>this.history.length-1||n<0)throw new RangeError("History index out of bounds");for(var r in this.isTraversing=!0,this.historyIndex=n,this.stores){var i=this.stores[r];this.snapshot[i.name]!==e[i.name]&&i.update$.next(i.value)}this.isTraversing=!1},t}();e.default=c},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(120),i=n(70),o=n(121),a=n(122),s=n(78);function u(t,e,n){void 0===n&&(n=null);var o,c=void 0!==typeof window,l=[];if(o=n instanceof r.default?n:new r.default,"boolean"==typeof n&&!0===n)o.deep=!0;else if(n&&o!==n&&"object"==typeof n&&(u(o,n),[i.default.PUSH,i.default.REPLACE].indexOf(o.arrayStrategy)<0))throw RangeError(s.INVALID_ARRAY_STRATEGY(o.arrayStrategy));if(!t||"object"!=typeof t)throw new TypeError(s.TYPE_ERROR_TARGET(t));if(!e||"object"!=typeof e)throw new TypeError(s.TYPE_ERROR_SOURCE(e));if(Array.isArray(e)){if(o.arrayStrategy===i.default.PUSH)return t.push.apply(t,e),t;for(var f=0;f<e.length;f++)l.push(f.toString())}else l=Object.getOwnPropertyNames(e);for(var h=0,d=l;h<d.length;h++){var p=d[h],_=Object.getOwnPropertyDescriptor(e,p);if(("function"!=typeof _.get||_.set||o.includeReadOnly)&&(_.enumerable||o.includeNonEmurable))if(!o.deep||"object"!=typeof e[p]||c&&e[p]instanceof window.Node||c&&e[p]===window.document.body||c&&e[p]===window.document.documentElement||null===e[p]||Array.isArray(e[p])&&o.useReferenceIfArray||!t[p]&&o.useReferenceIfTargetUnset)try{t[p]=e[p]}catch(e){a.default(e,t,p,o.errorMessage)}else{if(!Object.prototype.hasOwnProperty.call(t,p)||null===t[p])try{t[p]=Array.isArray(e[p])?[]:{}}catch(e){a.default(e,t,p,o.errorMessage)}u(t[p],e[p],o)}}return t}Object.keys(o.default.prototype).forEach(function(t){return u[t]=function(t){return function(){for(var e,n=[],r=0;r<arguments.length;r++)n[r]=arguments[r];return(e=new o.default)[t].apply(e,n)}}(t)}),e.default=u},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0}),e.MERGE_ERROR=function(t,e){return void 0===e&&(e=""),'Unknown property "'+t+'"'+(e?'. Did you mean "'+e+'"?':"")},e.TYPE_ERROR_TARGET=function(t){return'[Helpful Merge] Target "'+t+'" must be a valid object'},e.TYPE_ERROR_SOURCE=function(t){return'[Helpful Merge] Source "'+t+'" must be a valid object'},e.INVALID_ARRAY_STRATEGY=function(t){return'[Helpful Merge] Invalid array strategy "'+t+'"'}},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n(0),i=n(16),o=n(28),a=function(t){function e(e){var n=t.call(this)||this;return n._value=e,n}return r.a(e,t),Object.defineProperty(e.prototype,"value",{get:function(){return this.getValue()},enumerable:!0,configurable:!0}),e.prototype._subscribe=function(e){var n=t.prototype._subscribe.call(this,e);return n&&!n.closed&&e.next(this._value),n},e.prototype.getValue=function(){if(this.hasError)throw this.thrownError;if(this.closed)throw new o.a;return this._value},e.prototype.next=function(e){t.prototype.next.call(this,this._value=e)},e}(i.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return l});var r=n(0),i=n(10),o=n(9),a=n(11),s=n(13),u=n(20),c={};function l(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=null,r=null;return Object(i.a)(t[t.length-1])&&(r=t.pop()),"function"==typeof t[t.length-1]&&(n=t.pop()),1===t.length&&Object(o.a)(t[0])&&(t=t[0]),Object(u.a)(t,r).lift(new f(n))}var f=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new h(t,this.resultSelector))},t}(),h=function(t){function e(e,n){var r=t.call(this,e)||this;return r.resultSelector=n,r.active=0,r.values=[],r.observables=[],r}return r.a(e,t),e.prototype._next=function(t){this.values.push(c),this.observables.push(t)},e.prototype._complete=function(){var t=this.observables,e=t.length;if(0===e)this.destination.complete();else{this.active=e,this.toRespond=e;for(var n=0;n<e;n++){var r=t[n];this.add(Object(s.a)(this,r,r,n))}}},e.prototype.notifyComplete=function(t){0==(this.active-=1)&&this.destination.complete()},e.prototype.notifyNext=function(t,e,n,r,i){var o=this.values,a=o[n],s=this.toRespond?a===c?--this.toRespond:this.toRespond:0;o[n]=e,0===s&&(this.resultSelector?this._tryResultSelector(o):this.destination.next(o.slice()))},e.prototype._tryResultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(a.a)},function(t,e,n){"use strict";n.d(e,"a",function(){return a});var r=n(1),i=n(32),o=n(50);function a(t,e){return void 0===t&&(t=0),void 0===e&&(e=i.a),(!Object(o.a)(t)||t<0)&&(t=0),e&&"function"==typeof e.schedule||(e=i.a),new r.a(function(n){return n.add(e.schedule(s,t,{subscriber:n,counter:0,period:t})),n})}function s(t){var e=t.subscriber,n=t.counter,r=t.period;e.next(n),this.schedule({subscriber:e,counter:n+1,period:r},r)}},function(t,e,n){"use strict";n.d(e,"a",function(){return l});var r=n(0),i=n(20),o=n(9),a=n(2),s=n(11),u=n(13),c=n(26);function l(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t[t.length-1];return"function"==typeof n&&t.pop(),Object(i.a)(t,void 0).lift(new f(n))}var f=function(){function t(t){this.resultSelector=t}return t.prototype.call=function(t,e){return e.subscribe(new h(t,this.resultSelector))},t}(),h=function(t){function e(e,n,r){void 0===r&&(r=Object.create(null));var i=t.call(this,e)||this;return i.iterators=[],i.active=0,i.resultSelector="function"==typeof n?n:null,i.values=r,i}return r.a(e,t),e.prototype._next=function(t){var e=this.iterators;Object(o.a)(t)?e.push(new p(t)):"function"==typeof t[c.a]?e.push(new d(t[c.a]())):e.push(new _(this.destination,this,t))},e.prototype._complete=function(){var t=this.iterators,e=t.length;if(0!==e){this.active=e;for(var n=0;n<e;n++){var r=t[n];r.stillUnsubscribed?this.add(r.subscribe(r,n)):this.active--}}else this.destination.complete()},e.prototype.notifyInactive=function(){this.active--,0===this.active&&this.destination.complete()},e.prototype.checkIterators=function(){for(var t=this.iterators,e=t.length,n=this.destination,r=0;r<e;r++){if("function"==typeof(a=t[r]).hasValue&&!a.hasValue())return}var i=!1,o=[];for(r=0;r<e;r++){var a,s=(a=t[r]).next();if(a.hasCompleted()&&(i=!0),s.done)return void n.complete();o.push(s.value)}this.resultSelector?this._tryresultSelector(o):n.next(o),i&&n.complete()},e.prototype._tryresultSelector=function(t){var e;try{e=this.resultSelector.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(a.a),d=function(){function t(t){this.iterator=t,this.nextResult=t.next()}return t.prototype.hasValue=function(){return!0},t.prototype.next=function(){var t=this.nextResult;return this.nextResult=this.iterator.next(),t},t.prototype.hasCompleted=function(){var t=this.nextResult;return t&&t.done},t}(),p=function(){function t(t){this.array=t,this.index=0,this.length=0,this.length=t.length}return t.prototype[c.a]=function(){return this},t.prototype.next=function(t){var e=this.index++,n=this.array;return e<this.length?{value:n[e],done:!1}:{value:null,done:!0}},t.prototype.hasValue=function(){return this.array.length>this.index},t.prototype.hasCompleted=function(){return this.array.length===this.index},t}(),_=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.parent=n,i.observable=r,i.stillUnsubscribed=!0,i.buffer=[],i.isComplete=!1,i}return r.a(e,t),e.prototype[c.a]=function(){return this},e.prototype.next=function(){var t=this.buffer;return 0===t.length&&this.isComplete?{value:null,done:!0}:{value:t.shift(),done:!1}},e.prototype.hasValue=function(){return this.buffer.length>0},e.prototype.hasCompleted=function(){return 0===this.buffer.length&&this.isComplete},e.prototype.notifyComplete=function(){this.buffer.length>0?(this.isComplete=!0,this.parent.notifyInactive()):this.destination.complete()},e.prototype.notifyNext=function(t,e,n,r,i){this.buffer.push(e),this.parent.checkIterators()},e.prototype.subscribe=function(t,e){return Object(u.a)(this,this.observable,this,e)},e}(s.a)},function(t,e,n){"use strict";var r=this&&this.__assign||Object.assign||function(t){for(var e,n=1,r=arguments.length;n<r;n++)for(var i in e=arguments[n])Object.prototype.hasOwnProperty.call(e,i)&&(t[i]=e[i]);return t};Object.defineProperty(e,"__esModule",{value:!0});var i=n(37),o=n(15),a=function(){function t(t,e,n){void 0===n&&(n={}),this.config=e,this.state=t,this.name=this.config.name,this.Model=this.config.model;var r=i.default.to(new this.Model).from(n).with({deep:this.config.containsNestedProps,useReferenceIfTargetUnset:!0}).exec();this.state.snapshot[this.name]=Object.freeze(r),this.proxy=this.createStoreProxy(this.value),this.actions=this.createStoreActions(this.proxy,this.config.actions),this.update$=this.config.emitOnSubscription?new o.BehaviorSubject(this.value):new o.Subject}return Object.defineProperty(t.prototype,"value",{get:function(){return this.state.snapshot[this.name]},enumerable:!0,configurable:!0}),Object.defineProperty(t.prototype,"isActioning",{get:function(){return!Object.isFrozen(this.value)},enumerable:!0,configurable:!0}),t.prototype.readPropertyValue=function(t){return this.value[t]},t.prototype.updatePropertyValue=function(t,e){this.value[t]=e},t.prototype.createStoreProxy=function(t){return Object.seal(this.getPropertyDescriptorsFromValue(t).reduce(function(t,e){var n=e.key,r=e.get,i=e.set;return Object.defineProperty(t,n,{enumerable:!0,get:r,set:i})},{}))},t.prototype.getPropertyDescriptorsFromValue=function(t){var e=this,n=Object.getPrototypeOf(t);return Object.keys(t).concat(Object.getOwnPropertyNames(n)).reduce(function(r,i){var o=Object.getOwnPropertyDescriptor(t,i)||Object.getOwnPropertyDescriptor(n,i);if("constructor"!==i){var a="function"==typeof o.get;r.push({get:e.readPropertyValue.bind(e,i),set:a?void 0:e.updatePropertyValue.bind(e,i),key:i})}return r},[])},t.prototype.createStoreActions=function(t,e){var n=this,r={},i=e(t,r);return Object.keys(i).reduce(function(t,e){return t[e]=n.createActionProxy(i[e]),t},r)},t.prototype.createActionProxy=function(t){var e=this;return function(){for(var n=[],o=0;o<arguments.length;o++)n[o]=arguments[o];if(!e.state.isTraversing){var a=!1,s=!1;e.state.isActioning||(a=!0,e.state.pushNextSnapshotToHistory(r({},e.state.snapshot))),e.isActioning||(s=!0,e.state.snapshot[e.name]=i.default.to(new e.Model).from(e.value).with({deep:e.config.containsNestedProps,useReferenceIfTargetUnset:!0}).exec()),t.apply(e.actions,n),s&&(Object.freeze(e.value),e.update$.next(e.value)),a&&(Object.freeze(e.state.snapshot),e.state.update$.next(e.state.snapshot),e.state.config.debug&&console.info('Store "'+e.name+'" updated by action `'+t.name+"()`"))}}},t}();e.default=a},function(t,e){t.exports=Array.isArray||function(t){return null!=t&&t.length>=0&&"[object Array]"===Object.prototype.toString.call(t)}},function(t,e){t.exports=function(t){return"[object String]"===Object.prototype.toString.call(t)}},function(t,e,n){var r=n(84);t.exports=function(t,e){return function(){var n=arguments.length;if(0===n)return e();var i=arguments[n-1];return r(i)||"function"!=typeof i[t]?e.apply(this,arguments):i[t].apply(i,Array.prototype.slice.call(arguments,0,n-1))}}},function(t,e,n){t.exports={default:n(106),__esModule:!0}},function(t,e,n){"use strict";e.__esModule=!0;var r=a(n(112)),i=a(n(114)),o=a(n(52));function a(t){return t&&t.__esModule?t:{default:t}}e.default=function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+(void 0===e?"undefined":(0,o.default)(e)));t.prototype=(0,i.default)(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(r.default?(0,r.default)(t,e):t.__proto__=e)}},function(t,e,n){t.exports={default:n(116),__esModule:!0}},function(t,e,n){t.exports={default:n(127),__esModule:!0}},function(t,e,n){var r=n(130),i=n(131)(r);t.exports=i},function(t,n){t.exports=e},function(t,e,n){var r=n(137),i=n(146);t.exports=function(){if(0===arguments.length)throw new Error("composeP requires at least one argument");return r.apply(this,i(arguments))}},function(t,e,n){var r=n(40)(function(t,e){return null!=e&&e.constructor===t||e instanceof t});t.exports=r},function(t,e,n){"use strict";e.__esModule=!0;var r=function(t){return t&&t.__esModule?t:{default:t}}(n(12));e.default=r.default||function(t){for(var e=1;e<arguments.length;e++){var n=arguments[e];for(var r in n)Object.prototype.hasOwnProperty.call(n,r)&&(t[r]=n[r])}return t}},function(t,e,n){var r=n(51),i=n(39)(function(t){var e,n=!1;return r(t.length,function(){return n?e:(n=!0,e=t.apply(this,arguments))})});t.exports=i},function(t,e,n){"use strict";e.__esModule=!0;var r=function(t){return t&&t.__esModule?t:{default:t}}(n(150));e.default=function(t){return function(){var e=t.apply(this,arguments);return new r.default(function(t,n){return function i(o,a){try{var s=e[o](a),u=s.value}catch(t){return void n(t)}if(!s.done)return r.default.resolve(u).then(function(t){i("next",t)},function(t){i("throw",t)});t(u)}("next")})}}},function(t){t.exports={a:"0.7.1"}},function(t,e){t.exports=n},function(t,e){t.exports=r},function(t,e){t.exports=i},function(t,e){t.exports=o},function(t,e){t.exports=a},function(t,e){t.exports=s},function(t,e){!function(t){"use strict";if(!t.fetch){var e={searchParams:"URLSearchParams"in t,iterable:"Symbol"in t&&"iterator"in Symbol,blob:"FileReader"in t&&"Blob"in t&&function(){try{return new Blob,!0}catch(t){return!1}}(),formData:"FormData"in t,arrayBuffer:"ArrayBuffer"in t};if(e.arrayBuffer)var n=["[object Int8Array]","[object Uint8Array]","[object Uint8ClampedArray]","[object Int16Array]","[object Uint16Array]","[object Int32Array]","[object Uint32Array]","[object Float32Array]","[object Float64Array]"],r=function(t){return t&&DataView.prototype.isPrototypeOf(t)},i=ArrayBuffer.isView||function(t){return t&&n.indexOf(Object.prototype.toString.call(t))>-1};l.prototype.append=function(t,e){t=s(t),e=u(e);var n=this.map[t];this.map[t]=n?n+","+e:e},l.prototype.delete=function(t){delete this.map[s(t)]},l.prototype.get=function(t){return t=s(t),this.has(t)?this.map[t]:null},l.prototype.has=function(t){return this.map.hasOwnProperty(s(t))},l.prototype.set=function(t,e){this.map[s(t)]=u(e)},l.prototype.forEach=function(t,e){for(var n in this.map)this.map.hasOwnProperty(n)&&t.call(e,this.map[n],n,this)},l.prototype.keys=function(){var t=[];return this.forEach(function(e,n){t.push(n)}),c(t)},l.prototype.values=function(){var t=[];return this.forEach(function(e){t.push(e)}),c(t)},l.prototype.entries=function(){var t=[];return this.forEach(function(e,n){t.push([n,e])}),c(t)},e.iterable&&(l.prototype[Symbol.iterator]=l.prototype.entries);var o=["DELETE","GET","HEAD","OPTIONS","POST","PUT"];E.prototype.clone=function(){return new E(this,{body:this._bodyInit})},_.call(E.prototype),_.call(b.prototype),b.prototype.clone=function(){return new b(this._bodyInit,{status:this.status,statusText:this.statusText,headers:new l(this.headers),url:this.url})},b.error=function(){var t=new b(null,{status:0,statusText:""});return t.type="error",t};var a=[301,302,303,307,308];b.redirect=function(t,e){if(-1===a.indexOf(e))throw new RangeError("Invalid status code");return new b(null,{status:e,headers:{location:t}})},t.Headers=l,t.Request=E,t.Response=b,t.fetch=function(t,n){return new Promise(function(r,i){var o=new E(t,n),a=new XMLHttpRequest;a.onload=function(){var t={status:a.status,statusText:a.statusText,headers:function(t){var e=new l;return t.replace(/\r?\n[\t ]+/g," ").split(/\r?\n/).forEach(function(t){var n=t.split(":"),r=n.shift().trim();if(r){var i=n.join(":").trim();e.append(r,i)}}),e}(a.getAllResponseHeaders()||"")};t.url="responseURL"in a?a.responseURL:t.headers.get("X-Request-URL");var e="response"in a?a.response:a.responseText;r(new b(e,t))},a.onerror=function(){i(new TypeError("Network request failed"))},a.ontimeout=function(){i(new TypeError("Network request failed"))},a.open(o.method,o.url,!0),"include"===o.credentials?a.withCredentials=!0:"omit"===o.credentials&&(a.withCredentials=!1),"responseType"in a&&e.blob&&(a.responseType="blob"),o.headers.forEach(function(t,e){a.setRequestHeader(e,t)}),a.send(void 0===o._bodyInit?null:o._bodyInit)})},t.fetch.polyfill=!0}function s(t){if("string"!=typeof t&&(t=String(t)),/[^a-z0-9\-#$%&'*+.\^_`|~]/i.test(t))throw new TypeError("Invalid character in header field name");return t.toLowerCase()}function u(t){return"string"!=typeof t&&(t=String(t)),t}function c(t){var n={next:function(){var e=t.shift();return{done:void 0===e,value:e}}};return e.iterable&&(n[Symbol.iterator]=function(){return n}),n}function l(t){this.map={},t instanceof l?t.forEach(function(t,e){this.append(e,t)},this):Array.isArray(t)?t.forEach(function(t){this.append(t[0],t[1])},this):t&&Object.getOwnPropertyNames(t).forEach(function(e){this.append(e,t[e])},this)}function f(t){if(t.bodyUsed)return Promise.reject(new TypeError("Already read"));t.bodyUsed=!0}function h(t){return new Promise(function(e,n){t.onload=function(){e(t.result)},t.onerror=function(){n(t.error)}})}function d(t){var e=new FileReader,n=h(e);return e.readAsArrayBuffer(t),n}function p(t){if(t.slice)return t.slice(0);var e=new Uint8Array(t.byteLength);return e.set(new Uint8Array(t)),e.buffer}function _(){return this.bodyUsed=!1,this._initBody=function(t){if(this._bodyInit=t,t)if("string"==typeof t)this._bodyText=t;else if(e.blob&&Blob.prototype.isPrototypeOf(t))this._bodyBlob=t;else if(e.formData&&FormData.prototype.isPrototypeOf(t))this._bodyFormData=t;else if(e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t))this._bodyText=t.toString();else if(e.arrayBuffer&&e.blob&&r(t))this._bodyArrayBuffer=p(t.buffer),this._bodyInit=new Blob([this._bodyArrayBuffer]);else{if(!e.arrayBuffer||!ArrayBuffer.prototype.isPrototypeOf(t)&&!i(t))throw new Error("unsupported BodyInit type");this._bodyArrayBuffer=p(t)}else this._bodyText="";this.headers.get("content-type")||("string"==typeof t?this.headers.set("content-type","text/plain;charset=UTF-8"):this._bodyBlob&&this._bodyBlob.type?this.headers.set("content-type",this._bodyBlob.type):e.searchParams&&URLSearchParams.prototype.isPrototypeOf(t)&&this.headers.set("content-type","application/x-www-form-urlencoded;charset=UTF-8"))},e.blob&&(this.blob=function(){var t=f(this);if(t)return t;if(this._bodyBlob)return Promise.resolve(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(new Blob([this._bodyArrayBuffer]));if(this._bodyFormData)throw new Error("could not read FormData body as blob");return Promise.resolve(new Blob([this._bodyText]))},this.arrayBuffer=function(){return this._bodyArrayBuffer?f(this)||Promise.resolve(this._bodyArrayBuffer):this.blob().then(d)}),this.text=function(){var t=f(this);if(t)return t;if(this._bodyBlob)return function(t){var e=new FileReader,n=h(e);return e.readAsText(t),n}(this._bodyBlob);if(this._bodyArrayBuffer)return Promise.resolve(function(t){for(var e=new Uint8Array(t),n=new Array(e.length),r=0;r<e.length;r++)n[r]=String.fromCharCode(e[r]);return n.join("")}(this._bodyArrayBuffer));if(this._bodyFormData)throw new Error("could not read FormData body as text");return Promise.resolve(this._bodyText)},e.formData&&(this.formData=function(){return this.text().then(y)}),this.json=function(){return this.text().then(JSON.parse)},this}function E(t,e){var n=(e=e||{}).body;if(t instanceof E){if(t.bodyUsed)throw new TypeError("Already read");this.url=t.url,this.credentials=t.credentials,e.headers||(this.headers=new l(t.headers)),this.method=t.method,this.mode=t.mode,n||null==t._bodyInit||(n=t._bodyInit,t.bodyUsed=!0)}else this.url=String(t);if(this.credentials=e.credentials||this.credentials||"omit",!e.headers&&this.headers||(this.headers=new l(e.headers)),this.method=function(t){var e=t.toUpperCase();return o.indexOf(e)>-1?e:t}(e.method||this.method||"GET"),this.mode=e.mode||this.mode||null,this.referrer=null,("GET"===this.method||"HEAD"===this.method)&&n)throw new TypeError("Body not allowed for GET or HEAD requests");this._initBody(n)}function y(t){var e=new FormData;return t.trim().split("&").forEach(function(t){if(t){var n=t.split("="),r=n.shift().replace(/\+/g," "),i=n.join("=").replace(/\+/g," ");e.append(decodeURIComponent(r),decodeURIComponent(i))}}),e}function b(t,e){e||(e={}),this.type="default",this.status=void 0===e.status?200:e.status,this.ok=this.status>=200&&this.status<300,this.statusText="statusText"in e?e.statusText:"OK",this.headers=new l(e.headers),this.url=e.url||"",this._initBody(t)}}("undefined"!=typeof self?self:this)},function(t,e){t.exports=u},function(t,e){t.exports=c},function(t,e,n){t.exports={default:n(109),__esModule:!0}},function(t,e){t.exports=l},function(t,e,n){t.exports={default:n(111),__esModule:!0}},function(t,e){t.exports=f},function(t,e,n){t.exports={default:n(113),__esModule:!0}},function(t,e){t.exports=h},function(t,e,n){t.exports={default:n(115),__esModule:!0}},function(t,e){t.exports=d},function(t,e){t.exports=p},function(t,e,n){t.exports={default:n(118),__esModule:!0}},function(t,e){t.exports=_},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(76);e.default=function(t){return void 0===t&&(t={}),new r.default(t)}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(70),i=n(78),o=function(){return function(){this.deep=!1,this.useReferenceIfTargetUnset=!1,this.useReferenceIfArray=!1,this.includeReadOnly=!1,this.includeNonEmurable=!1,this.arrayStrategy=r.default.REPLACE,this.errorMessage=i.MERGE_ERROR,Object.seal(this)}}();e.default=o},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=n(77),i=function(){function t(){this.target=null,this.sources=[],this.config={}}return t.prototype.to=function(t){return this.target=t,this},t.prototype.from=function(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return this.sources=t,this},t.prototype.with=function(t){return this.config=t,this},t.prototype.exec=function(){var t=this;return this.sources.reduce(function(e,n){return r.default(e,n,t.config)},this.target||{})},t}();e.default=i},function(t,e,n){"use strict";function r(t,e){for(var n=t.length>e.length?t:e,r=n===t?e:t,i=0,o=0,a=0,s=-1;i<n.length;i++){for(;0===a&&n[i]!==r[o]&&o<r.length;)o++;if(n[i]===r[o]){if(s!==i-1&&(a=0),s=i,o++,++a===r.length)break}else{if(a>1)break;a=o=0}}s=-1;for(var u=0,c=0,l=0,f=n.length-1,h=r.length-1;u<n.length-i;u++){for(;0===l&&n[f-u]!==r[h-c]&&c<r.length;)c++;if(n[f-u]===r[h-c])s!==u-1&&(l=0),s=u,l++,c++;else{if(l>1)break;l=c=0}}return Math.min(r.length,a+l)}Object.defineProperty(e,"__esModule",{value:!0}),e.getTotalMatching=r,e.default=function(t,e,n,i){if(Object.hasOwnProperty.call(e,n)||!Object.isSealed(e)||Object.isExtensible(e)||!(t instanceof TypeError))throw t;var o=function(t,e,n,i){var o=r(i.toLowerCase(),t),a=Math.abs(i.length-e.length);return o>n.totalMatching||o===n.totalMatching&&a<n.delta?{key:i,delta:a,totalMatching:o}:n}.bind(null,n,n.toLowerCase()),a={key:"",delta:1/0,totalMatching:0},s=Object.keys(e).reduce(o,a),u=s&&s.totalMatching>1?s.key:"";throw new TypeError(i(n,u))}},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){return function(){this.name="",this.model=null,this.actions=null,this.containsNestedProps=!1,this.emitOnSubscription=!0,Object.seal(this)}}();e.default=r},function(t,e,n){"use strict";Object.defineProperty(e,"__esModule",{value:!0});var r=function(){return function(){this.debug=!1,this.maxHistoryLength=10,Object.seal(this)}}();e.default=r},function(t,e){t.exports=E},function(t,e){t.exports=y},function(t,e){t.exports=b},function(t,e,n){var r=n(40)(function(t,e){return null==e||e!=e?t:e});t.exports=r},function(t,e,n){var r=n(40)(function(t,e){for(var n=e,r=0;r<t.length;){if(null==n)return;n=n[t[r]],r+=1}return n});t.exports=r},function(t,e){t.exports=function(t,e){var n;t=t||[],e=e||[];var r=t.length,i=e.length,o=[];for(n=0;n<r;)o[o.length]=t[n],n+=1;for(n=0;n<i;)o[o.length]=e[n],n+=1;return o}},function(t,e,n){var r=n(51),i=n(40);t.exports=function(t){return i(function(e,n){return r(Math.max(0,e.length-n.length),function(){return e.apply(this,t(n,arguments))})})}},function(t,e){t.exports=g},function(t,e,n){t.exports={default:n(134),__esModule:!0}},function(t,e){t.exports=v},function(t,e,n){t.exports={default:n(136),__esModule:!0}},function(t,e){t.exports=m},function(t,e,n){var r=n(51),i=n(138),o=n(139),a=n(144);t.exports=function(){if(0===arguments.length)throw new Error("pipeP requires at least one argument");return r(arguments[0].length,o(i,arguments[0],a(arguments)))}},function(t,e){t.exports=function(t,e){return function(){var n=this;return t.apply(n,arguments).then(function(t){return e.call(n,t)})}}},function(t,e,n){var r=n(71)(n(140));t.exports=r},function(t,e,n){var r=n(141),i=n(142),o=n(143);function a(t,e,n){for(var r=n.next();!r.done;){if((e=t["@@transducer/step"](e,r.value))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r=n.next()}return t["@@transducer/result"](e)}function s(t,e,n,r){return t["@@transducer/result"](n[r](o(t["@@transducer/step"],t),e))}var u="undefined"!=typeof Symbol?Symbol.iterator:"@@iterator";t.exports=function(t,e,n){if("function"==typeof t&&(t=i(t)),r(n))return function(t,e,n){for(var r=0,i=n.length;r<i;){if((e=t["@@transducer/step"](e,n[r]))&&e["@@transducer/reduced"]){e=e["@@transducer/value"];break}r+=1}return t["@@transducer/result"](e)}(t,e,n);if("function"==typeof n["fantasy-land/reduce"])return s(t,e,n,"fantasy-land/reduce");if(null!=n[u])return a(t,e,n[u]());if("function"==typeof n.next)return a(t,e,n);if("function"==typeof n.reduce)return s(t,e,n,"reduce");throw new TypeError("reduce: list must be array or iterable")}},function(t,e,n){var r=n(39),i=n(84),o=n(85),a=r(function(t){return!!i(t)||!!t&&("object"==typeof t&&(!o(t)&&(1===t.nodeType?!!t.length:0===t.length||t.length>0&&(t.hasOwnProperty(0)&&t.hasOwnProperty(t.length-1)))))});t.exports=a},function(t,e){var n=function(){function t(t){this.f=t}return t.prototype["@@transducer/init"]=function(){throw new Error("init not implemented on XWrap")},t.prototype["@@transducer/result"]=function(t){return t},t.prototype["@@transducer/step"]=function(t,e){return this.f(t,e)},t}();t.exports=function(t){return new n(t)}},function(t,e,n){var r=n(51),i=n(40)(function(t,e){return r(t.length,function(){return t.apply(e,arguments)})});t.exports=i},function(t,e,n){var r=n(86),i=n(39)(r("tail",n(145)(1,1/0)));t.exports=i},function(t,e,n){var r=n(86),i=n(71)(r("slice",function(t,e,n){return Array.prototype.slice.call(n,t,e)}));t.exports=i},function(t,e,n){var r=n(39),i=n(85),o=r(function(t){return i(t)?t.split("").reverse().join(""):Array.prototype.slice.call(t,0).reverse()});t.exports=o},function(t,e){t.exports=S},function(t,e,n){var r=function(){return this}()||Function("return this")(),i=r.regeneratorRuntime&&Object.getOwnPropertyNames(r).indexOf("regeneratorRuntime")>=0,o=i&&r.regeneratorRuntime;if(r.regeneratorRuntime=void 0,t.exports=n(149),i)r.regeneratorRuntime=o;else try{delete r.regeneratorRuntime}catch(t){r.regeneratorRuntime=void 0}},function(t,e){!function(e){"use strict";var n,r=Object.prototype,i=r.hasOwnProperty,o="function"==typeof Symbol?Symbol:{},a=o.iterator||"@@iterator",s=o.asyncIterator||"@@asyncIterator",u=o.toStringTag||"@@toStringTag",c="object"==typeof t,l=e.regeneratorRuntime;if(l)c&&(t.exports=l);else{(l=e.regeneratorRuntime=c?t.exports:{}).wrap=v;var f="suspendedStart",h="suspendedYield",d="executing",p="completed",_={},E={};E[a]=function(){return this};var y=Object.getPrototypeOf,b=y&&y(y(P([])));b&&b!==r&&i.call(b,a)&&(E=b);var g=A.prototype=S.prototype=Object.create(E);T.prototype=g.constructor=A,A.constructor=T,A[u]=T.displayName="GeneratorFunction",l.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===T||"GeneratorFunction"===(e.displayName||e.name))},l.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,A):(t.__proto__=A,u in t||(t[u]="GeneratorFunction")),t.prototype=Object.create(g),t},l.awrap=function(t){return{__await:t}},O(R.prototype),R.prototype[s]=function(){return this},l.AsyncIterator=R,l.async=function(t,e,n,r){var i=new R(v(t,e,n,r));return l.isGeneratorFunction(e)?i:i.next().then(function(t){return t.done?t.value:i.next()})},O(g),g[u]="Generator",g[a]=function(){return this},g.toString=function(){return"[object Generator]"},l.keys=function(t){var e=[];for(var n in t)e.push(n);return e.reverse(),function n(){for(;e.length;){var r=e.pop();if(r in t)return n.value=r,n.done=!1,n}return n.done=!0,n}},l.values=P,C.prototype={constructor:C,reset:function(t){if(this.prev=0,this.next=0,this.sent=this._sent=n,this.done=!1,this.delegate=null,this.method="next",this.arg=n,this.tryEntries.forEach(w),!t)for(var e in this)"t"===e.charAt(0)&&i.call(this,e)&&!isNaN(+e.slice(1))&&(this[e]=n)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(t){if(this.done)throw t;var e=this;function r(r,i){return s.type="throw",s.arg=t,e.next=r,i&&(e.method="next",e.arg=n),!!i}for(var o=this.tryEntries.length-1;o>=0;--o){var a=this.tryEntries[o],s=a.completion;if("root"===a.tryLoc)return r("end");if(a.tryLoc<=this.prev){var u=i.call(a,"catchLoc"),c=i.call(a,"finallyLoc");if(u&&c){if(this.prev<a.catchLoc)return r(a.catchLoc,!0);if(this.prev<a.finallyLoc)return r(a.finallyLoc)}else if(u){if(this.prev<a.catchLoc)return r(a.catchLoc,!0)}else{if(!c)throw new Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return r(a.finallyLoc)}}}},abrupt:function(t,e){for(var n=this.tryEntries.length-1;n>=0;--n){var r=this.tryEntries[n];if(r.tryLoc<=this.prev&&i.call(r,"finallyLoc")&&this.prev<r.finallyLoc){var o=r;break}}o&&("break"===t||"continue"===t)&&o.tryLoc<=e&&e<=o.finallyLoc&&(o=null);var a=o?o.completion:{};return a.type=t,a.arg=e,o?(this.method="next",this.next=o.finallyLoc,_):this.complete(a)},complete:function(t,e){if("throw"===t.type)throw t.arg;return"break"===t.type||"continue"===t.type?this.next=t.arg:"return"===t.type?(this.rval=this.arg=t.arg,this.method="return",this.next="end"):"normal"===t.type&&e&&(this.next=e),_},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.finallyLoc===t)return this.complete(n.completion,n.afterLoc),w(n),_}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var n=this.tryEntries[e];if(n.tryLoc===t){var r=n.completion;if("throw"===r.type){var i=r.arg;w(n)}return i}}throw new Error("illegal catch attempt")},delegateYield:function(t,e,r){return this.delegate={iterator:P(t),resultName:e,nextLoc:r},"next"===this.method&&(this.arg=n),_}}}function v(t,e,n,r){var i=e&&e.prototype instanceof S?e:S,o=Object.create(i.prototype),a=new C(r||[]);return o._invoke=function(t,e,n){var r=f;return function(i,o){if(r===d)throw new Error("Generator is already running");if(r===p){if("throw"===i)throw o;return L()}for(n.method=i,n.arg=o;;){var a=n.delegate;if(a){var s=I(a,n);if(s){if(s===_)continue;return s}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(r===f)throw r=p,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);r=d;var u=m(t,e,n);if("normal"===u.type){if(r=n.done?p:h,u.arg===_)continue;return{value:u.arg,done:n.done}}"throw"===u.type&&(r=p,n.method="throw",n.arg=u.arg)}}}(t,n,a),o}function m(t,e,n){try{return{type:"normal",arg:t.call(e,n)}}catch(t){return{type:"throw",arg:t}}}function S(){}function T(){}function A(){}function O(t){["next","throw","return"].forEach(function(e){t[e]=function(t){return this._invoke(e,t)}})}function R(t){var e;this._invoke=function(n,r){function o(){return new Promise(function(e,o){!function e(n,r,o,a){var s=m(t[n],t,r);if("throw"!==s.type){var u=s.arg,c=u.value;return c&&"object"==typeof c&&i.call(c,"__await")?Promise.resolve(c.__await).then(function(t){e("next",t,o,a)},function(t){e("throw",t,o,a)}):Promise.resolve(c).then(function(t){u.value=t,o(u)},a)}a(s.arg)}(n,r,e,o)})}return e=e?e.then(o,o):o()}}function I(t,e){var r=t.iterator[e.method];if(r===n){if(e.delegate=null,"throw"===e.method){if(t.iterator.return&&(e.method="return",e.arg=n,I(t,e),"throw"===e.method))return _;e.method="throw",e.arg=new TypeError("The iterator does not provide a 'throw' method")}return _}var i=m(r,t.iterator,e.arg);if("throw"===i.type)return e.method="throw",e.arg=i.arg,e.delegate=null,_;var o=i.arg;return o?o.done?(e[t.resultName]=o.value,e.next=t.nextLoc,"return"!==e.method&&(e.method="next",e.arg=n),e.delegate=null,_):o:(e.method="throw",e.arg=new TypeError("iterator result is not an object"),e.delegate=null,_)}function N(t){var e={tryLoc:t[0]};1 in t&&(e.catchLoc=t[1]),2 in t&&(e.finallyLoc=t[2],e.afterLoc=t[3]),this.tryEntries.push(e)}function w(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function C(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(N,this),this.reset(!0)}function P(t){if(t){var e=t[a];if(e)return e.call(t);if("function"==typeof t.next)return t;if(!isNaN(t.length)){var r=-1,o=function e(){for(;++r<t.length;)if(i.call(t,r))return e.value=t[r],e.done=!1,e;return e.value=n,e.done=!0,e};return o.next=o}}return{next:L}}function L(){return{value:n,done:!0}}}(function(){return this}()||Function("return this")())},function(t,e,n){t.exports={default:n(151),__esModule:!0}},function(t,e){t.exports=T},function(t,e,n){"use strict";n.r(e);n(99),n(100),n(101),n(102),n(103),n(104),n(105);var r=n(87),i=n.n(r),o=n(3),a=n.n(o),s=n(36),u=n.n(s),c=n(74),l=n.n(c),f=n(88),h=n.n(f),d=n(57),p=n.n(d),_=n(89),E=n.n(_),y=n(14),b=n.n(y),g=n(73),v=n(37),m=n.n(v),S=n(7),T=n.n(S),A=function t(){a()(this,t),this.type="",this.assetId="",this.tileImageUrl="",this.expirationDate="",T()(this)},O=n(12),R=n.n(O),I=function(t){return{updateAsset:function(e){R()(t,new A,e)}}},N={ASSET:"asset",CONCURRENCY:"concurrency",CONFIG:"config",CONVIVA:"confiva",PLAYBACK:"playback",PRECISION:"precision",RESUME_POINTS:"resumePoints",USER_ACTIONS:"userActions"},w=function(t){return t.createStore({name:N.ASSET,model:A,actions:I,emitOnSubscription:!1})},C=n(90),P=n.n(C),L=function t(){a()(this,t),this.convivaCustomerKey="",T()(this)},M=function t(){a()(this,t),this.fullscreenElement=null,this.fallbackImageUrl="",T()(this)},U=function t(){a()(this,t),this.enable=!1,T()(this)},x=function t(){a()(this,t),this.authToken="",this.language="",this.manufacturer="",this.platform="",this.playerId="",this.viewerId="",this.personalisationEnabled=null,T()(this)},D=function t(){a()(this,t),this.playback="",this.resumePoints="",this.concurrency="",this.precision="",this.userActions="",this.userActionsWatched="",T()(this)},j=function t(){a()(this,t),this.liveLabel="",T()(this)},F=function t(){a()(this,t),this.serviceUrls=new D,this.text=new j,this.behaviour=new M,this.analytics=new L,this.environment=new x,this.captions=new U,P()(this)},V=function(t){return{configure:function(e){m()(t,e,{deep:!0})}}},k=function(t,e){return t.createStore({name:N.CONFIG,model:F,actions:V,containsNestedProps:!0},e)},Y=function(){function t(){a()(this,t),this.partialServiceUrl="",this.encryptedLock="",this.lockId="",this.playerId="",this.sequenceToken="",this.updateIntervalMs=-1,this.isEnabled=!1,T()(this)}return u()(t,[{key:"serviceUrl",get:function(){return this.partialServiceUrl+"/web/Concurrency/update"}}]),t}(),K=function(t){return{updateConcurrency:function(e){R()(t,e)},disableFeature:function(){t.isEnabled=!1}}},B=function(t){return t.createStore({name:N.CONCURRENCY,model:Y,actions:K})},G={VOD:"VOD",LIVE:"LIVE",LINEAR:"LINEAR",UNSET:""},H=function(){function t(){a()(this,t),this.licenseUrl="",this.releasePid="",this.manifests=[],this.mediaType=G.UNSET,this.asset=null,this.media=null,this.isEnabled=!1,T()(this)}return u()(t,[{key:"isLive",get:function(){return this.mediaType===G.LIVE}}]),t}(),Q=function(t){return{updatePlayback:function(e){var n=R()(new H,e);R()(t,n)},disableFeature:function(){t.isEnabled=!1}}},W=function(t){return t.createStore({name:N.PLAYBACK,model:H,actions:Q,emitOnSubscription:!1})},q=function t(){a()(this,t),this.cdns=[],this.isRefreshable=!1,this.minRefreshWindowMs=-1,this.isEnabled=!1,T()(this)},$=function(t){return{updatePrecision:function(e){R()(t,new q,e)},disableFeature:function(){t.isEnabled=!1}}},z=function(t){return t.createStore({name:N.PRECISION,model:q,actions:$})},J=function t(){a()(this,t),this.resumeFrom=0,this.updateIntervalMs=-1,this.isEnabled=!1,T()(this)},X=function(t){return{updateResumePoints:function(e){R()(t,new J,e)},disableFeature:function(){t.isEnabled=!1}}},Z=function(t){return t.createStore({name:N.RESUME_POINTS,model:J,actions:X,emitOnSubscription:!1})},tt=function t(){a()(this,t),this.watched={},T()(this)},et=function(t){return t.config.tileTypes.reduce(function(t,e){return t[e.type]=e.watchDuration,t},{})},nt=function(t){return{updateUserActions:function(e){e.watched=et(e.watched),R()(t,new tt,e)}}},rt=function(t){return t.createStore({name:N.USER_ACTIONS,model:tt,actions:nt})},it=n(21),ot=n.n(it),at=n(91),st=function(){for(var t=arguments.length,e=Array(t),n=0;n<t;n++)e[n]=arguments[n];return ot()("",["dazn"].concat(e),window)},ut=n.n(at)()(st,["startupData","ServiceDictionary"]),ct=function(){return{serviceUrls:{playback:ut("Playback","Versions","v2","ServicePath"),resumePoints:ut("ResumePoint","Versions","v1","ServicePath"),precision:ut("PlaybackPrecision","Versions","v1","ServicePath"),userActions:ut("UserActions","Versions","v1","ServicePath"),userActionsWatched:ut("UserActions","Versions","v1","ServicePath")+"/watched"},environment:{manufacturer:st("manufacturer"),platform:st("platform"),viewerId:st("userProfile","ViewerId"),language:st("userProfile","UserLanguageLocaleKey"),personalisationEnabled:function(){var t=st("userProfile","Preferences","OptedOutFromPersonalisation");return!(t="string"==typeof t?"true"===t:Boolean(t))}()},analytics:{convivaCustomerKey:st("startupData","Conviva","CustomerKey")},text:{liveLabel:st("resourceStringsData","Strings","player_live")},captions:{enable:function(){var t=st("dazn","startupData","FeatureToggles","ClosedCaptionsV1");return""!==t&&t}()}}},lt=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=Object(g.createState)(),n=t.config,r=ct(),i=m()(r,n,!0);return w(e),k(e,i),B(e),W(e),z(e),Z(e),rt(e),e},ft=n(25),ht=function(t,e){var n=e.behaviour,r=e.analytics;return Object(ft.create)(t,{behaviour:{fullscreenElement:n.fullscreenElement,fallbackImageUrl:n.fallbackImageUrl},analytics:{convivaCustomerKey:r.convivaCustomerKey,enable:!0}})},dt=n(16),pt=function t(){a()(this,t),this.asset$=new dt.a,this.config$=new dt.a},_t=n(4),Et=n.n(_t),yt=n(80),bt=n(17);function gt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];var n=t.length;if(0===n)throw new Error("list of properties cannot be empty.");return function(e){return Object(bt.a)(function(t,e){return function(n){for(var r=n,i=0;i<e;i++){var o=r[t[i]];if(void 0===o)return;r=o}return r}}(t,n))(e)}}var vt=n(0),mt=n(2),St=n(47),Tt=n(24);function At(t,e){return function(n){return n.lift(new Ot(t,e))}}var Ot=function(){function t(t,e){this.compare=t,this.keySelector=e}return t.prototype.call=function(t,e){return e.subscribe(new Rt(t,this.compare,this.keySelector))},t}(),Rt=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.keySelector=r,i.hasKey=!1,"function"==typeof n&&(i.compare=n),i}return vt.a(e,t),e.prototype.compare=function(t,e){return t===e},e.prototype._next=function(t){var e=t;if(this.keySelector&&(e=Object(St.a)(this.keySelector)(t))===Tt.a)return this.destination.error(Tt.a.e);var n=!1;if(this.hasKey){if((n=Object(St.a)(this.compare)(this.key,e))===Tt.a)return this.destination.error(Tt.a.e)}else this.hasKey=!0;!1===Boolean(n)&&(this.key=e,this.destination.next(t))},e}(mt.a),It=function(t){return t.pipe(gt("currentTime"),At())},Nt=function(t){return t.pipe(gt("maxTime"),At())},wt=function(t){return t.pipe(gt("hasEnded"),At())},Ct=function(t){return t.pipe(gt("areControlsActive"),Object(bt.a)(function(t){return!t}),At())},Pt=function(t){return t.pipe(Object(bt.a)(function(t){var e=t.isLive,n=t.isLinear;return e||n}),At())},Lt=function(t){return t.pipe(gt("isFrameFullscreened"),At())},Mt=function(t,e,n,r){var i=It(n),o=wt(n),a=Lt(t),s=Pt(e),u=Nt(n),c=Ct(t);return Object(yt.a)(i,o,r,a,s,u,c).pipe(Object(bt.a)(function(t){var e=Et()(t,7);return{currentTime:e[0],ended:e[1],errors:e[2],fullscreen:e[3],isLive:e[4],maxTime:e[5],playerInteractions:null,uiHidden:e[6]}}))},Ut=function t(e,n){a()(this,t),this.playerInteractions$=new dt.a;var r=e.state.stores,i=r.playback,o=r.frame,s=r.media;this.legacyShim$=Mt(o.update$,s.update$,i.update$,n)},xt=n(23),Dt=n.n(xt),jt={CONTENT_TYPE:"Content-Type",AUTHORIZATION:"Authorization"},Ft={CONTENT_TYPE_JSON:"application/json",BEARER:"Bearer"},Vt={POST:"POST",GET:"GET"},kt={PLAYBACK:"playback",CONCURRENCY:"concurrency",PRECISION:"precision",RESUME_POINTS:"resumePoints",USER_ACTIONS:"userActions",USER_ACTIONS_WATCHED:"userActionsWatched"},Yt=function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=jt.AUTHORIZATION,r=jt.CONTENT_TYPE,i=Ft.CONTENT_TYPE_JSON,o=Ft.BEARER;return{method:Vt.GET,headers:(t={},Dt()(t,r,i),Dt()(t,n,o+" "+e.authToken),t),params:{AssetId:e.assetId,PlayerId:e.playerId||"test",Platform:e.platform||"web",Format:e.assetFormat||"MPEG-DASH",LanguageCode:e.language||"en",Model:null,Secure:"true",Latitude:null,Longitude:null,Manufacturer:null,PlayReadyInitiator:"true"}}},Kt=n(11),Bt=n(13);function Gt(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){var n;"function"==typeof t[t.length-1]&&(n=t.pop());var r=t;return e.lift(new Ht(r,n))}}var Ht=function(){function t(t,e){this.observables=t,this.project=e}return t.prototype.call=function(t,e){return e.subscribe(new Qt(t,this.observables,this.project))},t}(),Qt=function(t){function e(e,n,r){var i=t.call(this,e)||this;i.observables=n,i.project=r,i.toRespond=[];var o=n.length;i.values=new Array(o);for(var a=0;a<o;a++)i.toRespond.push(a);for(a=0;a<o;a++){var s=n[a];i.add(Object(Bt.a)(i,s,s,a))}return i}return vt.a(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.values[n]=e;var o=this.toRespond;if(o.length>0){var a=o.indexOf(n);-1!==a&&o.splice(a,1)}},e.prototype.notifyComplete=function(){},e.prototype._next=function(t){if(0===this.toRespond.length){var e=[t].concat(this.values);this.project?this._tryProject(e):this.destination.next(e)}},e.prototype._tryProject=function(t){var e;try{e=this.project.apply(this,t)}catch(t){return void this.destination.error(t)}this.destination.next(e)},e}(Kt.a),Wt=n(18);function qt(t,e){return"function"==typeof e?function(n){return n.pipe(qt(function(n,r){return Object(Wt.a)(t(n,r)).pipe(Object(bt.a)(function(t,i){return e(n,t,r,i)}))}))}:function(e){return e.lift(new $t(t))}}var $t=function(){function t(t){this.project=t}return t.prototype.call=function(t,e){return e.subscribe(new zt(t,this.project))},t}(),zt=function(t){function e(e,n){var r=t.call(this,e)||this;return r.project=n,r.index=0,r}return vt.a(e,t),e.prototype._next=function(t){var e,n=this.index++;try{e=this.project(t,n)}catch(t){return void this.destination.error(t)}this._innerSub(e,t,n)},e.prototype._innerSub=function(t,e,n){var r=this.innerSubscription;r&&r.unsubscribe(),this.add(this.innerSubscription=Object(Bt.a)(this,t,e,n))},e.prototype._complete=function(){var e=this.innerSubscription;e&&!e.closed||t.prototype._complete.call(this)},e.prototype._unsubscribe=function(){this.innerSubscription=null},e.prototype.notifyComplete=function(e){this.remove(e),this.innerSubscription=null,this.isStopped&&t.prototype._complete.call(this)},e.prototype.notifyNext=function(t,e,n,r,i){this.destination.next(e)},e}(Kt.a),Jt=n(54);var Xt=function(){function t(t,e){this.subjectFactory=t,this.selector=e}return t.prototype.call=function(t,e){var n=this.selector,r=this.subjectFactory(),i=n(r).subscribe(t);return i.add(e.subscribe(r)),i},t}(),Zt=n(59);function te(){return new dt.a}function ee(){return function(t){return Object(Zt.a)()(function(t,e){return function(n){var r;if(r="function"==typeof t?t:function(){return t},"function"==typeof e)return n.lift(new Xt(r,e));var i=Object.create(n,Jt.b);return i.source=n,i.subjectFactory=r,i}}(te)(t))}}var ne=n(41);var re=function(){function t(t,e){this.count=t,this.source=e}return t.prototype.call=function(t,e){return e.subscribe(new ie(t,this.count,this.source))},t}(),ie=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.count=n,i.source=r,i}return vt.a(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=this.source,r=this.count;if(0===r)return t.prototype.error.call(this,e);r>-1&&(this.count=r-1),n.subscribe(this._unsubscribeAndRecycle())}},e}(mt.a);var oe=function(){function t(t){this.selector=t}return t.prototype.call=function(t,e){return e.subscribe(new ae(t,this.selector,this.caught))},t}(),ae=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.selector=n,i.caught=r,i}return vt.a(e,t),e.prototype.error=function(e){if(!this.isStopped){var n=void 0;try{n=this.selector(e,this.caught)}catch(e){return void t.prototype.error.call(this,e)}this._unsubscribeAndRecycle(),this.add(Object(Bt.a)(this,n))}},e}(Kt.a);function se(t,e){return function(n){return n.lift(new ue(t,e))}}var ue=function(){function t(t,e){this.predicate=t,this.thisArg=e}return t.prototype.call=function(t,e){return e.subscribe(new ce(t,this.predicate,this.thisArg))},t}(),ce=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.predicate=n,i.thisArg=r,i.count=0,i}return vt.a(e,t),e.prototype._next=function(t){var e;try{e=this.predicate.call(this.thisArg,t,this.count++)}catch(t){return void this.destination.error(t)}e&&this.destination.next(t)},e}(mt.a),le=n(92),fe=n.n(le),he=n(93),de=n.n(he),pe=function(t,e,n,r,i){var o=n(i);o.url=e;return de()(r,function(t){return t.data},t)(o)}.bind(null,fe.a),_e=function(t,e,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:1;return Object(ne.a)(r).pipe(qt(function(r){return Object(Wt.a)(pe(t,e,n,r))}),function(t){return void 0===t&&(t=-1),function(e){return e.lift(new re(t,e))}}(o),function(t){return function(e){var n=new oe(t),r=e.lift(n);return n.caught=r}}(function(t){return i(t),Object(ne.a)(void 0)}),se(Boolean))},Ee=n(44),ye=n.n(Ee),be=n(94),ge=n.n(be),ve=function(t){return t.match(/[_-]/)?t.replace(/([_-][a-z0-9])/g,function(t){return t.toUpperCase().replace(/[_-]/,"")}):t.charAt(0).toLowerCase()+t.slice(1)},me=function(t){return ge()(Object,t)&&!Array.isArray(t)},Se=function t(e){return ye()(e).reduce(function(n,r){var i=ve(r),o=e[r];return Array.isArray(o)?o=o.map(function(e){return me(e)?t(e):e}):me(o)&&(o=t(o)),n[i]=o,n},{})},Te=function(t,e,n,r,i){var o=arguments.length>5&&void 0!==arguments[5]?arguments[5]:function(t){return Object(ne.a)(t)},a=arguments.length>6&&void 0!==arguments[6]?arguments[6]:Se,s=function(t,e){var n=Et()(e,2);return{requestData:n[0],serviceUrl:n[1].serviceUrls[t]}}.bind(null,t),u=new dt.a;return{request$:u,response$:u.pipe(Gt(e),Object(bt.a)(s),qt(function(t){var e=t.requestData,o=t.serviceUrl;return _e(o,n,a,e,r,i)}),qt(o),ee())}},Ae=n(95),Oe=n.n(Ae)()({},ft.ErrorType,{API_SERVICE_PLAYBACK:"API_SERVICE_PLAYBACK",API_SERVICE_PRECISION:"API_SERVICE_PRECISION",API_SERVICE_CONCURRENCY:"API_SERVICE_CONCURRENCY",API_SERVICE_RESUME_POINTS:"API_SERVICE_RESUME_POINTS",API_SERVICE_PLAYBACK_MISSING_DATA:"API_SERVICE_PLAYBACK_MISSING_DATA",API_SERVICE_PLAYBACK_MEDIA_UNAVAILABLE:"API_SERVICE_PLAYBACK_MEDIA_UNAVAILABLE",API_SERVICE_PLAYBACK_ASSET_UNAVAILABLE:"API_SERVICE_PLAYBACK_ASSET_UNAVAILABLE",API_SERVICE_PLAYBACK_PLAYBACKDETAILS_UNAVAILABLE:"API_SERVICE_PLAYBACK_PLAYBACKDETAILS_UNAVAILABLE",API_SERVICE_PLAYBACK_RESTRICTED_LOCATION:"API_SERVICE_PLAYBACK_RESTRICTED_LOCATION",API_SERVICE_PLAYBACK_CONCURRENT_USER_LIMIT:"API_SERVICE_PLAYBACK_CONCURRENT_USER_LIMIT",PLAYBACK_SOURCE_STARTUP:"PLAYBACK_SOURCE_STARTUP",PLAYBACK_SOURCE_MIDSTREAM:"PLAYBACK_SOURCE_MIDSTREAM",EXCESSIVE_BUFFERING:"EXCESSIVE_BUFFERING",UNKNOWN_ERROR:"UNKNOWN_ERROR"}),Re=function t(e,n){a()(this,t),this.type=e||Oe.UNKNOWN_ERROR,this.source=n||new TypeError("Error source not defined")},Ie=function(t){return function(e){var n=void 0;switch(ot()("10000",["response","data","odata.error","code"],e).toString()){case"10008":n=Oe.API_SERVICE_PLAYBACK_CONCURRENT_USER_LIMIT;break;case"10006":case"10013":n=Oe.API_SERVICE_PLAYBACK_RESTRICTED_LOCATION;break;case"10000":default:n=Oe.API_SERVICE_PLAYBACK}t(new Re(n,e))}},Ne=n(52),we=n.n(Ne),Ce=n(43),Pe=function(t){if("number"==typeof t||"boolean"==typeof t)return!1;if(void 0===t||null===t)return!0;if(void 0!==t.length)return 0===t.length;var e=0;for(var n in t)t.hasOwnProperty(n)&&e++;return 0===e},Le=function(t){return function(e){if(Pe(e)||"object"!==(void 0===e?"undefined":we()(e)))return t({type:Oe.API_SERVICE_PLAYBACK_MISSING_DATA,source:new Error(Oe.API_SERVICE_PLAYBACK_MISSING_DATA)}),Object(Ce.b)();var n=ye()(e).reduce(function(n,r){var i=e[r];if(Pe(i)){var o="API_SERVICE_PLAYBACK_"+r.toUpperCase()+"_UNAVAILABLE",a=new Error(o);t({type:o,source:a}),n[r]=null}else n[r]=i;return n},{});return Object(ne.a)(n)}},Me=function(t,e){return Te(kt.PLAYBACK,t,Yt,Ie(e),2,Le(e))},Ue=function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=jt.AUTHORIZATION,r=jt.CONTENT_TYPE,i=Ft.CONTENT_TYPE_JSON,o=Ft.BEARER;return{method:Vt.GET,headers:(t={},Dt()(t,r,i),Dt()(t,n,o+" "+e.token),t),body:{AnalyticsSessionId:e.analyticsSessionId,AssetTypeId:e.assetTypeId,VideoFormat:e.videoFormat,VideoType:e.videoType,Manufacturer:e.manufacturer,Platform:e.platform||""}}},xe=function(t,e){return function(n){return e(new Re(function(t){return"API_SERVICE_"+t.toUpperCase()}(t),n))}},De=function(t,e){return Te(kt.PRECISION,t,Ue,xe(kt.PRECISION,e),2)},je=function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=jt.AUTHORIZATION,r=jt.CONTENT_TYPE,i=Ft.CONTENT_TYPE_JSON,o=Ft.BEARER,a=Vt.POST,s=(t={},Dt()(t,r,i),Dt()(t,n,o+" "+e.authToken),t),u={assetId:e.assetId,articleTypeId:e.articleTypeId,contentLength:e.contentLength,position:e.position,videoType:e.videoType};return e.eventId&&(u.eventId=e.eventId),{method:a,headers:s,data:u}},Fe=function(t,e){return Te(kt.RESUME_POINTS,t,je,xe(kt.RESUME_POINTS,e),2)},Ve=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{};return{method:Vt.GET,params:{form:"json",schema:"1.0",_clientId:t.playerId,_encryptedLock:t.encryptedLock,_id:t.lockId,_sequenceToken:t.sequenceToken}}},ke=function(t,e){return Te(kt.CONCURRENCY,t,Ve,xe(kt.CONCURRENCY,e),2)},Ye=function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=jt.AUTHORIZATION,r=jt.CONTENT_TYPE,i=Ft.CONTENT_TYPE_JSON,o=Ft.BEARER;return{method:Vt.GET,headers:(t={},Dt()(t,r,i),Dt()(t,n,o+" "+e.token),t)}},Ke=function(t,e){return Te(kt.USER_ACTIONS,t,Ye,xe(kt.USER_ACTIONS,e),1)},Be=function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},n=jt.AUTHORIZATION,r=jt.CONTENT_TYPE,i=Ft.CONTENT_TYPE_JSON,o=Ft.BEARER;return{method:Vt.POST,headers:(t={},Dt()(t,r,i),Dt()(t,n,o+" "+e.token),t),data:{assetId:e.assetId,duration:e.duration,type:e.type}}},Ge=function(t,e){return Te(kt.USER_ACTIONS_WATCHED,t,Be,xe(kt.USER_ACTIONS_WATCHED,e),1)},He=function t(e){a()(this,t);var n=e.state.stores.config.update$,r=e.errorsHandler.handleError;this.playback=Me(n,r),this.resumePoints=Fe(n,r),this.precision=De(n,r),this.concurrency=ke(n,r),this.userActions=Ke(n,r),this.userActionsWatched=Ge(n,r)},Qe=n(79),We=function t(e,n){a()(this,t),this.errorCode=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.id,n=t.category,r=t.status;if(Boolean(e&&n&&r))return t;throw new TypeError("CONSUMER_ERROR_PAYLOAD_INVALID_SCHEMA")}(e),this.stackTrace=n||new Error("CONSUMER_ERROR_PAYLOAD_STACKTRACE_UNAVAILABLE")},qe={400:"BAD_REQUEST",401:"UNAUTHORIZED",403:"FORBIDDEN",404:"NOT_FOUND","000":"GENERIC"},$e={GENERIC:"000",PLAYBACK_INTERRUPTED_CONNECTION_LOST:"005",DRM:"012",PLAYBACK_SOURCE_STARTUP:"064",PLAYBACK_SOURCE_MIDSTREAM:"065",API_SERVICE_PLAYBACK_MISSING_PLAYBACK_DETAILS:"066",API_SERVICE_PLAYBACK_CONCURRENT_USER_LIMIT:"068",BAD_REQUEST:"067",NOT_FOUND:"069"},ze={UNKNOWN:"00",PLAYBACK_INTERRUPTED_CONNECTION_LOST:"10",PLAYBACK_SOURCE:"11",API_SERVICE_PLAYBACK:"65"},Je={GENERIC:"000",PLAYBACK_INTERRUPTED_CONNECTION_LOST:"001",PLAYBACK_SOURCE_STARTUP:"011",DRM:"012",PLAYBACK_SOURCE_MIDSTREAM:"013",BAD_REQUEST:"400",UNAUTHORIZED:"401",FORBIDDEN:"403",NOT_FOUND:"404"},Xe=function(t){return ot()(Je.GENERIC,["response","status"],t).toString()},Ze=function(t){return ot()("10000",["response","data","odata.error","code"],t)},tn=function(t){return t.toString().substring(2)},en=function(t){switch(t.type){case Oe.API_SERVICE_PLAYBACK:return function(t){var e=Xe(t.source),n={category:ze.API_SERVICE_PLAYBACK,id:ot()(null,[qe[e]],$e)||tn(Ze(t.source)),status:e};return new We(n,t)}(t);case Oe.API_SERVICE_PLAYBACK_MISSING_DATA:case Oe.API_SERVICE_PLAYBACK_MEDIA_UNAVAILABLE:case Oe.API_SERVICE_PLAYBACK_ASSET_UNAVAILABLE:case Oe.API_SERVICE_PLAYBACK_PLAYBACKDETAILS_UNAVAILABLE:return function(t){return new We({category:ze.API_SERVICE_PLAYBACK,id:$e.API_SERVICE_PLAYBACK_MISSING_PLAYBACK_DETAILS,status:Je.GENERIC},t)}(t);case Oe.API_SERVICE_PLAYBACK_CONCURRENT_USER_LIMIT:return function(t){var e={category:ze.API_SERVICE_PLAYBACK,id:$e.API_SERVICE_PLAYBACK_CONCURRENT_USER_LIMIT,status:Xe(t.source)};return new We(e,t)}(t);case Oe.API_SERVICE_PLAYBACK_RESTRICTED_LOCATION:return function(t){var e={category:ze.API_SERVICE_PLAYBACK,id:tn(Ze(t.source)),status:Xe(t.source)};return new We(e,t)}(t);case Oe.PLAYBACK_SOURCE_STARTUP:return function(t){return new We({category:ze.PLAYBACK_SOURCE,id:$e.PLAYBACK_SOURCE_STARTUP,status:Je.PLAYBACK_SOURCE_STARTUP},t)}(t);case Oe.PLAYBACK_SOURCE_MIDSTREAM:return function(t){return new We({category:ze.PLAYBACK_SOURCE,id:$e.PLAYBACK_SOURCE_MIDSTREAM,status:Je.PLAYBACK_SOURCE_MIDSTREAM},t)}(t);case Oe.LICENSE_REQUEST_FAILED:case Oe.CERTIFICATE_REQUEST_FAILED:return function(t){return new We({category:ze.PLAYBACK_SOURCE,id:$e.DRM,status:Je.DRM},t)}(t);case Oe.PLAYBACK_INTERRUPTED_CONNECTION_LOST:return function(t){return new We({category:ze.PLAYBACK_INTERRUPTED_CONNECTION_LOST,id:$e.PLAYBACK_INTERRUPTED_CONNECTION_LOST,status:Je.PLAYBACK_INTERRUPTED_CONNECTION_LOST},t)}(t);default:return function(t){var e=Xe(t.source),n={category:ze.UNKNOWN,id:ot()(Je.GENERIC,[qe[e]],$e),status:e};return new We(n,t)}(t)}},nn=function t(){var e=this;a()(this,t),this.handleError=function(t){"string"==typeof t.type&&t.type||e.handleError({type:Oe.UNKNOWN_ERROR,source:t}),e.reportError$.next(t)},this.subscribeToConsumerErrors=function(){return e.reportError$.pipe(Object(bt.a)(en)).subscribe(e.consumerError$)},this.reportError$=new dt.a,this.consumerError$=new Qe.a(null),this.consumerSubscription=this.subscribeToConsumerErrors()},rn=function(t,e,n){return t.subscribe(function(t){n.unload(),e.actions.updateAsset({type:t.type,assetId:t.assetId,tileImageUrl:ot()("",["tileImage","imageUrl"],t)})})},on=function(t){return[rn(t.consumerInput.asset$,t.state.stores.asset,t.player)]},an=function(t,e){switch(!0){case t:return G.LINEAR;case e:return G.LIVE;default:return G.VOD}},sn=function t(){a()(this,t),this.name="",this.url="",T()(this)},un=function(t){return t.map(function(t){return{name:t.cdnName,url:t.manifestUrl}}).map(function(t){return R()(new sn,t)})},cn=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:[],n=t.reduce(function(t,n){var r=Et()(t,2),i=r[0],o=r[1],a=e.indexOf(n.name);return a>-1?i.splice(a,1,n):o.push(n),t},[Array(e.length),[]]),r=Et()(n,2),i=r[0],o=r[1];return i.concat(o).filter(Boolean)},ln=function(t,e,n){return t.subscribe(function(t){var r=t.asset,i=t.media,o=t.playbackDetails,a=t.playbackPrecision;if(Pe(r)||Pe(i)||Pe(o))return e.actions.disableFeature();var s=o,u=Et()(s,1)[0],c=r.isLinear,l=r.isLive,f=un(s);Pe(a)?n.actions.disableFeature():f=cn(f,a.cdns),e.actions.updatePlayback({asset:r,media:i,manifests:f,licenseUrl:u.laUrl,releasePid:u.releasePid,mediaType:an(c,l),isEnabled:!0})})},fn=function(t){return[ln(t.apiServices.playback.response$,t.state.stores.playback,t.state.stores.precision)]},hn=function(t){return t.pipe(se(function(t){return t.partialServiceUrl}),Object(bt.a)(function(t){return t.serviceUrl}),At())},dn=function(t,e){return t.subscribe(function(t){return e.actions.configure({serviceUrls:{concurrency:t}})})},pn=function(t,e){return t.subscribe(function(t){return e.actions.configure(t)})},_n=function(t){var e=t.state.stores,n=e.config,r=e.concurrency;return[pn(t.consumerInput.config$,n),dn(hn(r.update$),n)]},En=function(t,e){return t.subscribe(function(t){var n=t&&t.playbackLock;if(Pe(n))return e.actions.disableFeature();var r=n.concurrencyServiceUrl,i=n.encryptedLock,o=n.lockId,a=n.playerId,s=n.sequenceToken,u=n.updateLockIntervalSeconds;e.actions.updateConcurrency({partialServiceUrl:r,encryptedLock:i,lockId:o,playerId:a,sequenceToken:s,updateIntervalMs:1e3*u,isEnabled:!0})})},yn=function(t,e){return t.subscribe(function(t){var n=t&&t.updateResponse;if(Pe(n)||!n.id||!n.encryptedLock||!n.sequenceToken)return e.actions.disableFeature();var r=t.updateResponse,i=r.id,o=r.encryptedLock,a=r.sequenceToken;e.actions.updateConcurrency({encryptedLock:o,sequenceToken:a,lockId:i})})},bn=function(t){return[En(t.apiServices.playback.response$,t.state.stores.concurrency),yn(t.apiServices.concurrency.response$,t.state.stores.concurrency)]},gn=function(t,e){return t.subscribe(function(t){var n=t.cdns,r=t.refreshable,i=t.minRefreshInterval;e.actions.updatePrecision({cdns:n,isRefreshable:r,minRefreshWindowMs:i})})},vn=function(t){return[gn(t.apiServices.precision.response$,t.state.stores.precision)]},mn=function(t,e){return t.subscribe(function(t){var n=t&&t.resumePoints;if(Pe(n))return e.actions.disableFeature();var r=n.updateInterval,i=n.resumeFrom;e.actions.updateResumePoints({updateIntervalMs:1e3*r,resumeFrom:i,isEnabled:!0})})},Sn=function(t){return[mn(t.apiServices.playback.response$,t.state.stores.resumePoints)]},Tn=function(t){return[].concat(b()(on(t)),b()(bn(t)),b()(_n(t)),b()(fn(t)),b()(vn(t)),b()(Sn(t)))},An={DASH:"MPEG-DASH",HLS:"M3U",SMOOTH_STREAMING:"ISM"},On=function(t){var e=An.DASH;return t.isSafari&&(e=An.HLS),(t.isEdge||t.isInternetExplorer)&&(e=An.SMOOTH_STREAMING),e},Rn=function(t,e){return t.subscribe(function(t){var n=Et()(t,2),r=n[0],i=n[1].environment,o=i.authToken,a=i.playerId,s=i.platform,u=i.language,c=ft.Util.getUserDevice(window.navigator.userAgent),l=On(c);if("string"!=typeof o||!o)throw new TypeError("A valid `authToken` must be provided");var f={assetId:r.assetId,playerId:a,platform:s,language:u,assetFormat:l,authToken:o};e.next(f)})},In=function(t,e){return t.pipe(Gt(e))},Nn=function(t){var e=t.state.stores,n=e.config,r=e.asset;return[Rn(In(r.update$,n.update$),t.apiServices.playback.request$)]},wn=n(81);function Cn(t){return function(e){return e.lift(new Pn(t))}}var Pn=function(){function t(t){this.notifier=t}return t.prototype.call=function(t,e){var n=new Ln(t),r=Object(Bt.a)(n,this.notifier);return r&&!r.closed?(n.add(r),e.subscribe(n)):n},t}(),Ln=function(t){function e(e){return t.call(this,e)||this}return vt.a(e,t),e.prototype.notifyNext=function(t,e,n,r,i){this.complete()},e.prototype.notifyComplete=function(){},e}(Kt.a),Mn=function(t,e,n){return e.pipe(se(function(t){return t.isEnabled}),qt(function(t){var r=t.updateIntervalMs;return Object(wn.a)(r,n).pipe(Cn(e))}),Gt(t),se(function(t){return Et()(t,2)[1].isPlaying}),Object(bt.a)(function(t){return Et()(t,2)[1].currentTime}))};var Un=function(){function t(){}return t.prototype.call=function(t,e){return e.subscribe(new xn(t))},t}(),xn=function(t){function e(e){var n=t.call(this,e)||this;return n.hasPrev=!1,n}return vt.a(e,t),e.prototype._next=function(t){this.hasPrev?this.destination.next([this.prev,t]):this.hasPrev=!0,this.prev=t},e}(mt.a),Dn=function(t){var e=Et()(t,2),n=e[0],r=e[1];return Math.abs(n-r)},jn=function(t,e){return t.pipe(gt("currentTime"),At(),function(t){return t.lift(new Un)},Object(bt.a)(Dn),se(function(t){return t>2}),Gt(e),se(function(t){return Et()(t,2)[1].isEnabled}),Gt(t),Object(bt.a)(function(t){return Et()(t,2)[1].currentTime}))},Fn=n(56),Vn=function(t){var e=Et()(t,2),n=e[0],r=Et()(e[1],3);return[n,r[0],r[1],r[2]]},kn=function(t,e,n,r,i){var o=Object(yt.a)(n,r,i);return Object(Fn.a)(t,e).pipe(se(function(t){return t>0}),Gt(o),Object(bt.a)(Vn))},Yn=function(t,e){return parseInt(t-e,10)},Kn=function(t,e){return t.subscribe(function(t){var n=Et()(t,4),r=n[0],i=n[1],o=n[2],a=n[3],s=a.minTime,u=a.maxTime,c=i.environment.authToken,l=o.asset,f=o.media,h={assetId:l.id,articleTypeId:l.type.id,contentLength:Yn(u,s),position:Yn(r,s),videoType:f.videoType,eventId:l.eventId,authToken:c};e.next(h)})},Bn=function(t){var e=t.player,n=t.state;return t.apiServices.resumePoints.response$.subscribe(function(){}),[Kn(kn(Mn(e.state.stores.playback.update$,n.stores.resumePoints.update$),jn(e.state.stores.playback.update$,n.stores.resumePoints.update$),n.stores.config.update$,n.stores.playback.update$,e.state.stores.playback.update$),t.apiServices.resumePoints.request$)]},Gn=function(t,e){return t.pipe(Object(bt.a)(function(t){return t.updateIntervalMs}),se(function(t){return t>0}),At(),qt(function(t){return Object(wn.a)(t,e)}),Gt(t),Object(bt.a)(function(t){return Et()(t,2)[1]}))},Hn=function(t,e){return t.subscribe(function(t){var n=t.playerId,r=t.encryptedLock,i=t.lockId,o=t.sequenceToken;e.next({playerId:n,encryptedLock:r,lockId:i,sequenceToken:o})})},Qn=function(t){return[Hn(Gn(t.state.stores.concurrency.update$),t.apiServices.concurrency.request$)]},Wn=function(t){return t.pipe(se(function(t){return t.environment.personalisationEnabled}),Object(bt.a)(function(t){return t.environment.authToken}),se(Boolean),At())},qn=function(t,e){return t.subscribe(function(t){var n={token:t};e.next(n)})},$n=function(t,e){return t.subscribe(function(t){var n=t[0];e.actions.updateUserActions({watched:n})})},zn=function(t){var e=t.state.stores,n=e.config,r=e.userActions;return[qn(Wn(n.update$),t.apiServices.userActions.request$),$n(t.apiServices.userActions.response$,r)]};var Jn=function(){function t(t,e){this.bufferSize=t,this.startBufferEvery=e,this.subscriberClass=e&&t!==e?Zn:Xn}return t.prototype.call=function(t,e){return e.subscribe(new this.subscriberClass(t,this.bufferSize,this.startBufferEvery))},t}(),Xn=function(t){function e(e,n){var r=t.call(this,e)||this;return r.bufferSize=n,r.buffer=[],r}return vt.a(e,t),e.prototype._next=function(t){var e=this.buffer;e.push(t),e.length==this.bufferSize&&(this.destination.next(e),this.buffer=[])},e.prototype._complete=function(){var e=this.buffer;e.length>0&&this.destination.next(e),t.prototype._complete.call(this)},e}(mt.a),Zn=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.bufferSize=n,i.startBufferEvery=r,i.buffers=[],i.count=0,i}return vt.a(e,t),e.prototype._next=function(t){var e=this.bufferSize,n=this.startBufferEvery,r=this.buffers,i=this.count;this.count++,i%n==0&&r.push([]);for(var o=r.length;o--;){var a=r[o];a.push(t),a.length===e&&(r.splice(o,1),this.destination.next(a))}},e.prototype._complete=function(){for(var e=this.buffers,n=this.destination;e.length>0;){var r=e.shift();r.length>0&&n.next(r)}t.prototype._complete.call(this)},e}(mt.a);function tr(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){return e.lift.call(Fn.a.apply(void 0,[e].concat(t)))}}function er(t){return function(e){return e.lift(new nr(t))}}var nr=function(){function t(t){this.value=t}return t.prototype.call=function(t,e){return e.subscribe(new rr(t,this.value))},t}(),rr=function(t){function e(e,n){var r=t.call(this,e)||this;return r.value=n,r}return vt.a(e,t),e.prototype._next=function(t){this.destination.next(this.value)},e}(mt.a);var ir=n(20),or=n(62),ar=n(8),sr=n(45),ur=n(10);function cr(){for(var t=[],e=0;e<arguments.length;e++)t[e]=arguments[e];return function(e){var n=t[t.length-1];Object(ur.a)(n)?t.pop():n=null;var r=t.length;return 1!==r||n?r>0?Object(sr.a)(Object(ir.a)(t,n),e):Object(sr.a)(Object(ar.b)(n),e):Object(sr.a)(Object(or.a)(t[0]),e)}}var lr=function(){function t(t,e,n){void 0===n&&(n=!1),this.accumulator=t,this.seed=e,this.hasSeed=n}return t.prototype.call=function(t,e){return e.subscribe(new fr(t,this.accumulator,this.seed,this.hasSeed))},t}(),fr=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o.accumulator=n,o._seed=r,o.hasSeed=i,o.index=0,o}return vt.a(e,t),Object.defineProperty(e.prototype,"seed",{get:function(){return this._seed},set:function(t){this.hasSeed=!0,this._seed=t},enumerable:!0,configurable:!0}),e.prototype._next=function(t){if(this.hasSeed)return this._tryNext(t);this.seed=t,this.destination.next(t)},e.prototype._tryNext=function(t){var e,n=this.index++;try{e=this.accumulator(this.seed,t,n)}catch(t){this.destination.error(t)}this.seed=e,this.destination.next(e)},e}(mt.a),hr=n(42),dr=n(55);var pr=function(){function t(t){if(this.total=t,this.total<0)throw new dr.a}return t.prototype.call=function(t,e){return e.subscribe(new _r(t,this.total))},t}(),_r=function(t){function e(e,n){var r=t.call(this,e)||this;return r.total=n,r.count=0,r}return vt.a(e,t),e.prototype._next=function(t){var e=this.total,n=++this.count;n<=e&&(this.destination.next(t),n===e&&(this.destination.complete(),this.unsubscribe()))},e}(mt.a);var Er=function(){function t(t){this.defaultValue=t}return t.prototype.call=function(t,e){return e.subscribe(new yr(t,this.defaultValue))},t}(),yr=function(t){function e(e,n){var r=t.call(this,e)||this;return r.defaultValue=n,r.isEmpty=!0,r}return vt.a(e,t),e.prototype._next=function(t){this.isEmpty=!1,this.destination.next(t)},e.prototype._complete=function(){this.isEmpty&&this.destination.next(this.defaultValue),this.destination.complete()},e}(mt.a),br=n(22),gr=n(29);function vr(t,e,n){return function(r){return r.lift(new mr(t,e,n))}}var mr=function(){function t(t,e,n){this.nextOrObserver=t,this.error=e,this.complete=n}return t.prototype.call=function(t,e){return e.subscribe(new Sr(t,this.nextOrObserver,this.error,this.complete))},t}(),Sr=function(t){function e(e,n,r,i){var o=t.call(this,e)||this;return o._tapNext=br.a,o._tapError=br.a,o._tapComplete=br.a,o._tapError=r||br.a,o._tapComplete=i||br.a,Object(gr.a)(n)?(o._context=o,o._tapNext=n):n&&(o._context=n,o._tapNext=n.next||br.a,o._tapError=n.error||br.a,o._tapComplete=n.complete||br.a),o}return vt.a(e,t),e.prototype._next=function(t){try{this._tapNext.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.next(t)},e.prototype._error=function(t){try{this._tapError.call(this._context,t)}catch(t){return void this.destination.error(t)}this.destination.error(t)},e.prototype._complete=function(){try{this._tapComplete.call(this._context)}catch(t){return void this.destination.error(t)}return this.destination.complete()},e}(mt.a),Tr=function(t){return void 0===t&&(t=Ar),vr({hasValue:!1,next:function(){this.hasValue=!0},complete:function(){if(!this.hasValue)throw t()}})};function Ar(){return new hr.a}var Or=n(33);function Rr(t,e){var n=arguments.length>=2;return function(r){return r.pipe(t?se(function(e,n){return t(e,n,r)}):Or.a,function(t){return function(e){return 0===t?Object(ar.b)():e.lift(new pr(t))}}(1),n?function(t){return void 0===t&&(t=null),function(e){return e.lift(new Er(t))}}(e):Tr(function(){return new hr.a}))}}var Ir=function(t,e,n,r,i){var o=e.pipe(tr(n)),a=n.pipe(er(function(){return 0})),s=r.pipe(Cn(o),er(function(t){return t+1})).pipe(tr(a));return t.pipe(function(t,e){return e?qt(function(){return t},e):qt(function(){return t})}(s),cr(0),function(t,e){var n=!1;return arguments.length>=2&&(n=!0),function(r){return r.lift(new lr(t,e,n))}}(function(t,e){return e(t)}),se(function(t){return t>=i}),Rr())},Nr=Object(wn.a)(333),wr=function(t,e,n,r){return Object(yt.a)(t,n,e).pipe(qt(function(t){var e=Et()(t,3),n=e[0],i=e[1],o=e[2],a=r.state.stores.playback.update$.pipe(gt("playbackStatus"),At()),s=a.pipe(se(function(t){return"PLAYING"===t})),u=a.pipe(se(function(t){return"PAUSED"===t||"BUFFERING"===t})),c=a.pipe(se(function(t){return"UNLOADED"===t})),l=o.watched[i.type];return Ir(s,u,c,Nr.pipe(function(t,e){return void 0===e&&(e=null),function(n){return n.lift(new Jn(t,e))}}(3)),l).pipe(Object(bt.a)(function(){return{token:n,assetId:i.assetId,duration:l,type:i.type}}))}))},Cr=function(t,e){return t.subscribe(function(t){var n={assetId:t.assetId,duration:t.duration,type:t.type,token:t.token};e.next(n)})},Pr=function(t){return t.subscribe()},Lr=function(t){var e=t.state.stores,n=e.asset,r=e.config,i=e.userActions;return[Cr(wr(Wn(r.update$),i.update$,n.update$,t.player),t.apiServices.userActionsWatched.request$),Pr(t.apiServices.userActionsWatched.response$)]},Mr=function(t){return[].concat(b()(Nn(t)),b()(Bn(t)),b()(Qn(t)),b()(zn(t)),b()(Lr(t)))},Ur=n(82),xr=function(t){var e=Et()(t,2),n=Et()(e[0],2),r=Et()(n[0],2);return[r[0],r[1],n[1],e[1]]},Dr=function(t){return t.pipe(Object(bt.a)(function(t){var e=t.type,n=t.data;return{name:e,event:void 0===n?{}:n}}))},jr=function(t,e){return t.subscribe(function(t){return e.next(t)})},Fr=n(96),Vr=n.n(Fr),kr=n(48),Yr=n.n(kr),Kr=n(97),Br=n.n(Kr),Gr=function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:ft.Util.getIsConnectionOk,e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:6e4,n=null;return Br()(Yr.a.mark(function r(){var i;return Yr.a.wrap(function(r){for(;;)switch(r.prev=r.next){case 0:if(!n){r.next=2;break}return r.abrupt("return",n);case 2:return r.next=4,t();case 4:return(i=r.sent)&&setTimeout(function(){return n=null},e),n=i,r.abrupt("return",n);case 8:case"end":return r.stop()}},r,void 0)}))},Hr=[ft.ErrorType.MANIFEST_REQUEST_FAILED_DURING_LOAD,ft.ErrorType.SEGMENT_REQUEST_FAILED_DURING_LOAD],Qr=[ft.ErrorType.MANIFEST_REQUEST_FAILED_DURING_PLAYBACK,ft.ErrorType.SEGMENT_REQUEST_FAILED_DURING_PLAYBACK],Wr=[ft.ErrorType.UNKNOWN_SOLUTION_ERROR],qr=function(t,e){var n=e.type;return t.includes(n)},$r=qr.bind(null,Hr),zr=qr.bind(null,Qr),Jr=qr.bind(null,Wr),Xr=n(98),Zr={articleId:["id"],awayContestantId:["contestants",1,"id"],awayContestantName:["contestants",1,"title"],competitionId:["competition","id"],competitionName:["competition","title"],contentId:["id"],contentName:["title"],contentType:["type","name"],fixtureId:["eventId"],homeContestantId:["contestants",0,"id"],homeContestantName:["contestants",0,"title"],publicationDate:["pubDate"],sportId:["sport","id"],sportName:["sport","title"],stageId:["stage","id"],stageName:["stage","title"],venueId:["venue","id"],venueName:["venue","title"]},ti={videoType:["videoType"]},ei={expireDate:["expirationDate"]},ni={commentatoryLanguage:["environment","language"],interfaceLanguage:["environment","language"]},ri={applicationType:["dazn","platform"],daznUserAgent:["navigator","userAgent"],countryCode:["dazn","userProfile","UserCountryCode"],site:["location","hostname"]},ii=function(t,e){return ye()(e).reduce(function(n,r){return n[r]=ot()(null,e[r],t)||"Unknown "+r,n},{})},oi=function(t,e,n,r){var i=ii(t.asset,Zr),o=ii(t.media,ti),a=ii(n,ei),s=ii(e,ni),u=ii(r,ri),c={applicationVersion:Xr.a,autoPlay:"true",accountType:function(t){return JSON.parse(atob(t.split(".")[1])).userstatus}(e.environment.authToken),productionValue:function(t){return t.map(function(t){return t.name}).join(", ")}(t.asset.categories)};return R()(i,o,a,s,u,c,{deviceCarrier:"Unknown deviceCarrier",deviceConnectionType:"Unknown deviceConnectionType"})},ai=function(t,e){var n=Et()(t,4),r=n[0],i=n[1].resumeFrom,o=n[2],a=n[3],s=r.mediaType,u=r.licenseUrl,c=r.releasePid,l=o.environment,f=l.authToken,h=l.viewerId,d=a.tileImageUrl,p=ot()(!1,["dazn","startupData","FeatureToggles","ClosedCaptionsV1"],window),_=oi(r,o,a,window);return{mediaType:s,licenseUrl:u,releasePid:c,manifestUrl:e.url,authToken:f,tileImageUrl:d,resumeFrom:i,title:"["+r.asset.id+"] "+r.asset.title,convivaCustomMetaData:_,viewerId:h,enableClosedCaptions:p}},si=Yr.a.mark(ui);function ui(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[];return Yr.a.wrap(function(n){for(;;)switch(n.prev=n.next){case 0:return t=e.slice(0),n.delegateYield(t,"t0",2);case 2:case"end":return n.stop()}},si,this)}var ci=ui,li=n(32);var fi=function(){function t(t,e){this.dueTime=t,this.scheduler=e}return t.prototype.call=function(t,e){return e.subscribe(new hi(t,this.dueTime,this.scheduler))},t}(),hi=function(t){function e(e,n,r){var i=t.call(this,e)||this;return i.dueTime=n,i.scheduler=r,i.debouncedSubscription=null,i.lastValue=null,i.hasValue=!1,i}return vt.a(e,t),e.prototype._next=function(t){this.clearDebounce(),this.lastValue=t,this.hasValue=!0,this.add(this.debouncedSubscription=this.scheduler.schedule(di,this.dueTime,this))},e.prototype._complete=function(){this.debouncedNext(),this.destination.complete()},e.prototype.debouncedNext=function(){if(this.clearDebounce(),this.hasValue){var t=this.lastValue;this.lastValue=null,this.hasValue=!1,this.destination.next(t)}},e.prototype.clearDebounce=function(){var t=this.debouncedSubscription;null!==t&&(this.remove(t),t.unsubscribe(),this.debouncedSubscription=null)},e}(mt.a);function di(t){t.debouncedNext()}var pi={type:Oe.EXCESSIVE_BUFFERING,data:{duration:8e3}},_i=function(t,e){return t.pipe(gt("playbackStatus"),At(),function(t,e){return void 0===e&&(e=li.a),function(n){return n.lift(new fi(t,e))}}(8e3,e),se(function(t){return"BUFFERING"===t}),er(pi))},Ei=function(t){return t.pipe(se(function(t){return Jr(t)||$r(t)||zr(t)}))},yi=function(t,e,n){var r=arguments.length>3&&void 0!==arguments[3]?arguments[3]:2,i=Et()(n,1)[0].manifests,o=new dt.a,a=function(){return ci(i)},s=a(),u=0,c=null,l=function(){return c},f=Ei(t.errors$,o),h=_i(t.state.stores.playback.update$),d=Gr();return Object(Fn.a)(f,h).pipe(Cn(o),qt(function(t){return Object(Wt.a)(d()).pipe(se(Boolean),er(t))}),vr(Vr()(function(t){c=$r(t)?Oe.PLAYBACK_SOURCE_STARTUP:Oe.PLAYBACK_SOURCE_MIDSTREAM})),Object(bt.a)(function(){var t=s.next().value;return!t&&u<=r&&(u++,t=(s=a()).next().value),u>r?(e({type:l(),source:n}),void o.next()):t}),se(Boolean),Object(bt.a)(ai.bind(null,n)),Object(bt.a)(function(t,e,n){return t()===Oe.PLAYBACK_SOURCE_MIDSTREAM&&(n.resumeFrom=e.state.snapshot.playback.currentTime),n}.bind(null,l,t)),cr(ai(n,s.next().value)))},bi=function(t,e,n){return t.pipe(qt(function(t){return yi(e,n,t)}))},gi=function(t,e){return t.subscribe(function(t){var n=t.mediaType,r=t.licenseUrl,i=t.releasePid,o=t.manifestUrl,a=t.authToken,s=t.tileImageUrl,u=t.resumeFrom,c=t.title,l=t.convivaCustomMetaData,f=t.viewerId,h=t.enableClosedCaptions;e.load({src:o,mediaType:n,isEncrypted:!0,startTime:u,posterUrl:s,title:c,convivaCustomMetaData:l}),e.configure({drm:{authToken:a,licenseUrl:r,releasePid:i},analytics:{viewerId:f},watermark:{content:f},captions:{enable:h}})})},vi=function(t,e){return t.subscribe(e)},mi=function(t){var e=t.state.stores,n=e.playback,r=e.resumePoints,i=e.config,o=e.asset,a=t.player,s=t.consumerOutput,u=function(t,e,n,r){return Object(Ur.a)(t,e).pipe(Gt(n),Gt(r),Object(bt.a)(xr))}(n.update$.pipe(se(function(t){return t.isEnabled})),r.update$,i.update$,o.update$);return[gi(bi(u,t.player,t.errorsHandler.handleError),t.player),jr(Dr(a.interactions$),s.playerInteractions$),vi(t.player.errors$,t.errorsHandler.handleError)]},Si=[Oe.API_SERVICE_PLAYBACK,Oe.API_SERVICE_PLAYBACK_CONCURRENT_USER_LIMIT,Oe.API_SERVICE_PLAYBACK_RESTRICTED_LOCATION,Oe.PLAYBACK_SOURCE_STARTUP,Oe.PLAYBACK_SOURCE_MIDSTREAM,Oe.LICENSE_REQUEST_FAILED,Oe.CERTIFICATE_REQUEST_FAILED,Oe.PLAYBACK_INTERRUPTED_CONNECTION_LOST],Ti=function(t,e){return t.subscribe(function(t){e.exitFullscreen(),e.error(t.type)})},Ai=function(t){var e=t.player,n=t.errorsHandler.reportError$;return[Ti(function(t){return t.pipe(se(function(t){return Si.includes(t.type)}))}(n),e)]},Oi=function(){function t(e,n){a()(this,t),this.state=lt({config:n}),this.errorsHandler=new nn,this.apiServices=new He(this),this.player=ht(e,this.state.stores.config.value),this.consumerInput=new pt,this.consumerOutput=new Ut(this.player,this.errorsHandler.consumerError$),this.subscriptions=[].concat(b()(mi(this)),b()(Mr(this)),b()(Tn(this)),b()(Ai(this)))}return u()(t,[{key:"configure",value:function(t){this.consumerInput.config$.next(t)}},{key:"loadAsset",value:function(t){this.player.showControls(),this.consumerInput.asset$.next(t)}},{key:"fadeOutVolume",value:function(){this.player.fadeOutVolume()}},{key:"fadeInVolume",value:function(){this.player.fadeInVolume()}},{key:"showControls",value:function(){this.player.showControls()}},{key:"hideControls",value:function(){this.player.hideControls()}},{key:"exitFullscreen",value:function(){this.player.exitFullscreen()}},{key:"destroy",value:function(){this.disconnectSubscriptions(),this.player.destroy()}},{key:"disconnectSubscriptions",value:function(){for(;this.subscriptions.length>0;)this.subscriptions.pop().unsubscribe()}},{key:"legacyShim$",get:function(){return this.consumerOutput.legacyShim$}},{key:"playerInteractions$",get:function(){return this.consumerOutput.playerInteractions$}}]),t}(),Ri=function t(e,n){a()(this,t);var r=new Oi(e,n);this.configure=r.configure.bind(r),this.loadAsset=r.loadAsset.bind(r),this.fadeInVolume=r.fadeInVolume.bind(r),this.fadeOutVolume=r.fadeOutVolume.bind(r),this.showControls=r.showControls.bind(r),this.hideControls=r.hideControls.bind(r),this.destroy=r.destroy.bind(r),this.exitFullscreen=r.exitFullscreen.bind(r),E()(this,{state:{get:function(){return r.state}},legacyShim$:{get:function(){return r.legacyShim$}},playerInteractions$:{get:function(){return r.playerInteractions$}}})},Ii=function(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};return new Ri(t,e)},Ni=function(t){function e(){var t,n,r,o;a()(this,e);for(var s=arguments.length,u=Array(s),c=0;c<s;c++)u[c]=arguments[c];return n=r=l()(this,(t=e.__proto__||i()(e)).call.apply(t,[this].concat(u))),r.setWrapperElement=r.setWrapperElement.bind(r),o=n,l()(r,o)}return h()(e,t),u()(e,[{key:"componentDidMount",value:function(){this.middleware=Ii(this.wrapperElement,this.props.config),this.props.onPlayerReady(this.middleware)}},{key:"componentWillUnmount",value:function(){this.middleware.destroy(),this.middleware=null}},{key:"setWrapperElement",value:function(t){this.wrapperElement=t}},{key:"render",value:function(){return p.a.createElement("div",{ref:this.setWrapperElement})}}]),e}(p.a.Component);e.default=Ni}])});
//# sourceMappingURL=main.js.map