@clickview/library-editor 1.55.0-rc.0 → 1.56.0-rc.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/bundles.json +2 -2
- package/dist/css/{4001-library-editor-f6d2f9fb58.chunk.css → 4001-library-editor-da87291909.chunk.css} +1 -1
- package/dist/css/{535-library-editor-e2b19f99ee.chunk.css → 535-library-editor-fa24102d7f.chunk.css} +1 -1
- package/dist/css/{61-library-editor-f25bac2db6.chunk.css → 61-library-editor-b5c939f10f.chunk.css} +2 -1
- package/dist/css/{library-editor-app-bcca987662.css → library-editor-app-6b401b236c.css} +3 -3
- package/dist/languages/en.json +1 -1
- package/dist/scripts/{112-4f413f94c0.chunk.js → 112-5209a9a2d0.chunk.js} +1 -1
- package/dist/scripts/{2601-d46e5810eb.chunk.js → 2601-0bbd055a92.chunk.js} +1 -1
- package/dist/scripts/2644-17c596a0c9.chunk.js +1 -0
- package/dist/scripts/{343-41502b5d24.chunk.js → 343-a3dabdd615.chunk.js} +1 -1
- package/dist/scripts/{3551-ad62e3a403.chunk.js → 3551-d2ea1832c5.chunk.js} +1 -1
- package/dist/scripts/376-d76b864238.chunk.js +1 -0
- package/dist/scripts/4001-319ffe95a1.chunk.js +2 -0
- package/dist/scripts/{4024-5bc8aa8dcd.chunk.js → 4024-218556677c.chunk.js} +1 -1
- package/dist/scripts/471-7ede525821.chunk.js +2 -0
- package/dist/scripts/5173-f2d72d7c3e.chunk.js +1 -0
- package/dist/scripts/{61-ec794cf02d.chunk.js → 61-de99ab5568.chunk.js} +2 -2
- package/dist/scripts/{6352-6452f77c89.chunk.js → 6352-50c10c1bc6.chunk.js} +1 -1
- package/dist/scripts/{7002-eef9319d36.chunk.js → 7002-6d9f52d6d3.chunk.js} +1 -1
- package/dist/scripts/708-f7536cb7a4.chunk.js +1 -0
- package/dist/scripts/8130-f0c1977041.chunk.js +1 -0
- package/dist/scripts/{8727-9077c2b877.chunk.js → 8727-188101f028.chunk.js} +1 -1
- package/dist/scripts/{8952-a9a7742f72.chunk.js → 8952-4201ae6599.chunk.js} +1 -1
- package/dist/scripts/{9369-1e706eb521.chunk.js → 9369-d078677c28.chunk.js} +1 -1
- package/dist/scripts/bundle-b38a9aa50e.min.js +2 -0
- package/package.json +1 -1
- package/dist/scripts/2644-98304e9394.chunk.js +0 -1
- package/dist/scripts/376-83584040a3.chunk.js +0 -1
- package/dist/scripts/4001-9194fbe77b.chunk.js +0 -2
- package/dist/scripts/5173-d333602893.chunk.js +0 -1
- package/dist/scripts/6532-48f3f080f5.chunk.js +0 -2
- package/dist/scripts/708-c74c75f82a.chunk.js +0 -1
- package/dist/scripts/8130-0a0a9c4cab.chunk.js +0 -1
- package/dist/scripts/bundle-0a99cc18ef.min.js +0 -2
- package/typings/libs/CVEvents.d.ts +0 -13
- package/typings/libs/lodash.d.ts +0 -11
- /package/dist/scripts/{101-8f41923234.chunk.js → 101-c2af2cc10c.chunk.js} +0 -0
- /package/dist/scripts/{1010-4a381a84d4.chunk.js → 1010-f1c8bca022.chunk.js} +0 -0
- /package/dist/scripts/{1409-58db6bd9f7.chunk.js → 1409-ae672618b1.chunk.js} +0 -0
- /package/dist/scripts/{1703-45ced13ccd.chunk.js → 1703-0f9e8a489f.chunk.js} +0 -0
- /package/dist/scripts/{1832-6a54b38248.chunk.js → 1832-52444b0088.chunk.js} +0 -0
- /package/dist/scripts/{1876-e0567188b8.chunk.js → 1876-0a931d62d9.chunk.js} +0 -0
- /package/dist/scripts/{2417-7628573bf3.chunk.js → 2417-9731b9da6b.chunk.js} +0 -0
- /package/dist/scripts/{243-25fcce188c.chunk.js → 243-c4bb9e995e.chunk.js} +0 -0
- /package/dist/scripts/{259-e24fcf8f12.chunk.js → 259-ef5133c0fd.chunk.js} +0 -0
- /package/dist/scripts/{299-1a0d6a88dc.chunk.js → 299-5585deab1d.chunk.js} +0 -0
- /package/dist/scripts/{35-68aa98885c.chunk.js → 35-dde0c25008.chunk.js} +0 -0
- /package/dist/scripts/{3746-9c62c31099.chunk.js → 3746-588ea9d62d.chunk.js} +0 -0
- /package/dist/scripts/{4001-9194fbe77b.chunk.js.LICENSE.txt → 4001-319ffe95a1.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{4245-59b4242cad.chunk.js → 4245-db2d86c59d.chunk.js} +0 -0
- /package/dist/scripts/{4523-55c4df85c8.chunk.js → 4523-fec10bbbcb.chunk.js} +0 -0
- /package/dist/scripts/{6532-48f3f080f5.chunk.js.LICENSE.txt → 471-7ede525821.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{5046-cb525612c6.chunk.js → 5046-b65e8db7c0.chunk.js} +0 -0
- /package/dist/scripts/{5286-7aac82c4d1.chunk.js → 5286-c574f5b574.chunk.js} +0 -0
- /package/dist/scripts/{535-27d0457532.chunk.js → 535-794be8eab5.chunk.js} +0 -0
- /package/dist/scripts/{546-f770211173.chunk.js → 546-2ee5c90feb.chunk.js} +0 -0
- /package/dist/scripts/{5707-fcb653aa7a.chunk.js → 5707-b2b239ff4e.chunk.js} +0 -0
- /package/dist/scripts/{5747-674f00efcd.chunk.js → 5747-7ca7ad6c1d.chunk.js} +0 -0
- /package/dist/scripts/{5891-0864c38750.chunk.js → 5891-ac4d3f803a.chunk.js} +0 -0
- /package/dist/scripts/{61-ec794cf02d.chunk.js.LICENSE.txt → 61-de99ab5568.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{6963-0e2bf1bde7.chunk.js → 6963-254d82f6c2.chunk.js} +0 -0
- /package/dist/scripts/{7053-35b82818eb.chunk.js → 7053-91a52f57d7.chunk.js} +0 -0
- /package/dist/scripts/{7071-6f7e375aaa.chunk.js → 7071-6d98c3dcfa.chunk.js} +0 -0
- /package/dist/scripts/{7153-57796cd98e.chunk.js → 7153-fc080e3d53.chunk.js} +0 -0
- /package/dist/scripts/{7295-474c754cb6.chunk.js → 7295-49780496e2.chunk.js} +0 -0
- /package/dist/scripts/{7408-15b5cc4a39.chunk.js → 7408-c1551d3e0d.chunk.js} +0 -0
- /package/dist/scripts/{7827-ce63697325.chunk.js → 7827-c1f1b4f608.chunk.js} +0 -0
- /package/dist/scripts/{8952-a9a7742f72.chunk.js.LICENSE.txt → 8952-4201ae6599.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{9369-1e706eb521.chunk.js.LICENSE.txt → 9369-d078677c28.chunk.js.LICENSE.txt} +0 -0
- /package/dist/scripts/{9383-d58506608c.chunk.js → 9383-4ed13f5993.chunk.js} +0 -0
- /package/dist/scripts/{bundle-0a99cc18ef.min.js.LICENSE.txt → bundle-b38a9aa50e.min.js.LICENSE.txt} +0 -0
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
/*! For license information please see 61-
|
|
2
|
-
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[61],{57e3:function(t,e,r){"use strict";r.d(e,{l:function(){return v}});var n=r(48088),o=r(39479),i=r.n(o),a=r(31647),u=r(17111);function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function l(){l=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),u=new R(n||[]);return o(a,"_invoke",{value:E(t,r,u)}),a}function y(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=p;var h="suspendedStart",v="suspendedYield",d="executing",b="completed",m={};function g(){}function w(){}function O(){}var P={};f(P,a,(function(){return this}));var j=Object.getPrototypeOf,S=j&&j(j(B([])));S&&S!==r&&n.call(S,a)&&(P=S);var _=O.prototype=g.prototype=Object.create(P);function k(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function C(t,e){function r(o,i,a,u){var l=y(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==c(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===b){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=T(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var l=y(e,r,n);if("normal"===l.type){if(o=n.done?b:v,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=b,n.method="throw",n.arg=l.arg)}}}function T(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,T(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=y(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function x(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 L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function B(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(c(e)+" is not iterable")}return w.prototype=O,o(_,"constructor",{value:O,configurable:!0}),o(O,"constructor",{value:w,configurable:!0}),w.displayName=f(O,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,O):(t.__proto__=O,f(t,s,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},k(C.prototype),f(C.prototype,u,(function(){return this})),e.AsyncIterator=C,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new C(p(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(_),f(_,s,"Generator"),f(_,a,(function(){return this})),f(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=B,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):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),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:B(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,f(n.key),n)}}function f(t){var e=function(t){if("object"!=c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==c(e)?e:e+""}function p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(p=function(){return!!t})()}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function h(t,e){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},h(t,e)}var v=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=y(e),function(t,e){if(e&&("object"==c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,p()?Reflect.construct(e,r||[],y(t).constructor):e.apply(t,r))}(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&h(t,e)}(e,t),r=e,(o=[{key:"initialize",value:function(){var t=this;this.onTimeUpdate=i().bind(this._onTimeUpdate,this),this.playbackObject=new Promise((function(e){t.setPlaybackObject=e}))}},{key:"name",get:function(){return"PlayerComponent"}},{key:"className",get:function(){return""}},{key:"template",get:function(){return function(){return"<div></div>"}}},{key:"initListeners",value:function(){this.player.on("timeupdate",this.onTimeUpdate)}},{key:"onDestroy",value:function(){this.player&&(this.player.off("timeupdate",this.onTimeUpdate),this.player.dispose())}},{key:"_onTimeUpdate",value:function(){n.Radio.channel(this.options.channelName).trigger("timeupdate",this.currentTime())}},{key:"currentTime",value:function(t){return this.player.currentTime(t)}},{key:"getChapters",value:function(){var t,e,r,n,o,i;return r=this,n=void 0,o=void 0,i=l().mark((function r(){var n;return l().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.playbackObject;case 2:return n=r.sent,r.abrupt("return",null!==(e=null===(t=n.chapters)||void 0===t?void 0:t.list)&&void 0!==e?e:[]);case 4:case"end":return r.stop()}}),r,this)})),new(o||(o=Promise))((function(t,e){function a(t){try{c(i.next(t))}catch(t){e(t)}}function u(t){try{c(i.throw(t))}catch(t){e(t)}}function c(e){var r;e.done?t(e.value):(r=e.value,r instanceof o?r:new o((function(t){t(r)}))).then(a,u)}c((i=i.apply(r,n||[])).next())}))}},{key:"setChapters",value:function(t){this.player.setChapters(t)}},{key:"duration",value:function(){return this.player.duration()}},{key:"onRender",value:function(){var t=this;this.player||(this.player=new u.J(this.el,{viewKey:this.model.get("viewKey"),playerApi:new URL(this.options.playerApiUrl),hotkeyElQuerySelector:"body",autoplay:!0,aspectRatio:"16:9",overflowControls:!0,inactivityTimeout:this.options.inactivityTimeout,allowFullscreen:!1}),this.player.one("cv-playback-data-loaded",(function(e){t.setPlaybackObject(e)})),this.options.channelName&&this.player.ready((function(){n.Radio.channel(t.options.channelName).trigger("player:loaded"),t.initListeners()})))}}])&&s(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(a.Q.wA)},89167:function(t,e,r){"use strict";r.d(e,{Q:function(){return K}});var n=r(53019),o=r(48088),i=r(60810),a=r(39479),u="cv-player-play",c="cv-player-pause",l="cv-player-ended",s="cv-player-chapterchange",f="cv-player-timeupdate",p="cv-player-fullscreenchange",y="cv-player-querycallback",h="cv-player-pong",v="_cvwp:fsc",d="_cvwp:devices:click",b="cv-player-seekto",m="cv-player-query",g="cv-player-ping",w="_cv:showdevicesbtn",O="_cv:showfsbtn",P="paused",j="getChapters",S=r(11306),_=r(99249),k=r(68003),C=r(31647),E=r(97779),T=r(52076),x=r(70065);function L(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t&&t.id){var r={id:t.id};return t.name&&!e.ignoreTitle&&(r.title=t.name),r}}function R(t){return R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},R(t)}function B(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,I(n.key),n)}}function I(t){var e=function(t){if("object"!=R(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=R(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==R(e)?e:e+""}function D(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(D=function(){return!!t})()}function M(t){return M=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},M(t)}function A(t,e){return A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},A(t,e)}var N=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,r){return e=M(e),function(t,e){if(e&&("object"==R(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,D()?Reflect.construct(e,r||[],M(t).constructor):e.apply(t,r))}(this,e,[t])).captureInterval=60,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&A(t,e)}(e,t),r=e,n=[{key:"name",get:function(){return"VideoAnalyticsTracker"}},{key:"initialize",value:function(){this.eventsApi=this.options.eventsApi,this.options.video||C.Q.Ry.throw(new S.H("Video logging requires video to be passed in.")),this.model=this.options.video,this.playbackStatus=this.getNewPlaybackStatus(),this.options.captureInterval&&(this.captureInterval=this.options.captureInterval),this.bindListeners(),this.getChapters()}},{key:"bindListeners",value:function(){this.eventsApi.on(f,a.bind(this.onPlayerTimeUpdate,this)),this.eventsApi.on(l,a.bind(this.onEnd,this)),this.eventsApi.on(p,a.bind(this.onFullScreen,this)),this.eventsApi.on(s,a.bind(this.onChapterChange,this))}},{key:"unbindListeners",value:function(){this.eventsApi.off(f),this.eventsApi.off(l),this.eventsApi.off(p),this.eventsApi.off(s)}},{key:"getChapters",value:function(){var t=this;this.queryWebplayer(j,(function(e,r){t.setInitialChapter(r),t.setVideoDuration(r)}))}},{key:"queryWebplayer",value:function(t,e){var r=a.uniqueId(this.name),n="".concat(y,"-").concat(r);this.eventsApi.one(n,e),this.eventsApi.trigger(m,t,r)}},{key:"onEnd",value:function(){this.setCurrentPosition(this.playbackStatus.totalDuration),this.logVerbose(x.UX.Finish),this.resetPlaybackStatus()}},{key:"onFullScreen",value:function(t,e){var r=e?x.UX.FullScreenEnter:x.UX.FullScreenExit;this.logVerbose(r)}},{key:"onPlayerTimeUpdate",value:function(t,e){var r=this;this.queryWebplayer(P,(function(t,n){r.updateTime(e,n)}))}},{key:"onChapterChange",value:function(t,e){a.isObject(e)&&this.setCurrentChapter(e.number)}},{key:"updateTime",value:function(t,e){var r=Math.floor(t);r&&r!==this.getCurrentPositon()&&(this.setCurrentPosition(r),e||(this.playbackHasStarted()||(this.logVerbose(x.UX.Start),this.setPlaybackStarted()),this.incrementWatchTime(),this.getWatchTime()%this.captureInterval==0&&this.logVerbose(x.UX.Playback),8===this.getWatchTime()&&this.logStream()))}},{key:"setInitialChapter",value:function(t){var e=a.find(t,(function(t){return!0===t.current}));a.isObject(e)&&this.setCurrentChapter(e.number)}},{key:"setVideoDuration",value:function(t){var e=a.reduce(t,(function(t,e){return t+e.duration}),0);!a.isNaN(e)&&a.isNumber(e)&&(this.playbackStatus.totalDuration=Math.floor(e))}},{key:"setCurrentPosition",value:function(t){this.playbackStatus.position=t}},{key:"getCurrentPositon",value:function(){return this.playbackStatus.position}},{key:"setCurrentChapter",value:function(t){this.playbackStatus.chapter=t}},{key:"setPlaybackStarted",value:function(){this.playbackStatus.hasStarted=!0}},{key:"playbackHasStarted",value:function(){return this.playbackStatus.hasStarted}},{key:"getWatchTime",value:function(){return this.playbackStatus.totalWatched}},{key:"incrementWatchTime",value:function(){this.playbackStatus.totalWatched+=1}},{key:"getNewPlaybackStatus",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.duration;return{position:0,chapter:0,hasStarted:!1,totalWatched:t.watched||0,totalDuration:e||0}}},{key:"resetPlaybackStatus",value:function(){var t={duration:this.playbackStatus.totalDuration,watched:this.playbackStatus.totalWatched};this.playbackStatus=this.getNewPlaybackStatus(t)}},{key:"unbindUnload",value:function(){$(window).off("unload")}},{key:"bindUnload",value:function(){$(window).on("unload",a.bind(this.logUnload,this))}},{key:"logUnload",value:function(){this.playbackHasStarted()&&this.logVerbose(x.UX.Terminate)}},{key:"logStream",value:function(){var t,e,r,n,o,i,a,u,c=T.k.buildActionContext(this.options.analyticsOptions),l=(t=this.getPlaybackData(),e=t.model,r={id:e.id.toString(),year:e.productionYear,title:e.name,trackingCode:e.trackingCode},n=function(t){if(t&&t.code)return t.code}(e.rating),o=L(e.series),i=function(t){if(t&&t.length){var e=t[0];return{id:e.id,title:e.name}}}(e.categories),a=L(e.owner,{ignoreTitle:!0}),u=L(e.playlist),n&&(r.rating=n),a&&(r.ownerId=a.id),o&&(r.seriesId=o.id,r.series=o.title),i&&(r.category=i.title),u&&(r.playlist=u),r);E.c.log(x.Vw.Stream,l,c)}},{key:"logVerbose",value:function(t){}},{key:"getPlaybackData",value:function(){return{model:(t=this.model,t instanceof C.Q.Hn||t instanceof C.Q.FE||t instanceof o.Model||t instanceof o.Collection?t.toJSON():t),playbackStatus:a.omit(this.playbackStatus,"hasStarted")};var t}},{key:"onDestroy",value:function(){this.unbindListeners(),this.unbindUnload(),this.logUnload()}}],n&&B(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(C.Q.t6),F=r(63791),Z=r(57098),z=r(61577),V=r.n(z),U={webPlayerContainer:"SlCu8",webPlayer:"NlTKl",svgContainer:"hFe3U"};function G(t){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(t)}function q(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,H(n.key),n)}}function H(t){var e=function(t){if("object"!=G(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=G(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==G(e)?e:e+""}function W(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(W=function(){return!!t})()}function Q(t){return Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Q(t)}function Y(t,e){return Y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Y(t,e)}var K=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=Q(e),function(t,e){if(e&&("object"==G(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,W()?Reflect.construct(e,r||[],Q(t).constructor):e.apply(t,r))}(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Y(t,e)}(e,t),r=e,(s=[{key:"elements",get:function(){return{iframe:"iframe"}}},{key:"name",get:function(){return"WebPlayerView"}},{key:"template",get:function(){return V()}},{key:"className",get:function(){return"".concat(U.webPlayerContainer," ratio ratio-16x9")}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"defaults",get:function(){return{captureAnalytics:!0,showDevicesButton:!1}}},{key:"viewModelDefaults",get:function(){return{width:640,height:360,autoplay:!!this.options.autoplay,parameters:{s:!1,bc:!1,bf:!1,uid:this.options.currentUser.get("id"),cid:this.options.currentUser.get("customerId")},webPlayerHost:this.options.webPlayerUrl}}},{key:"initialize",value:function(){this.enableIeFs=this.isTop(),this.getViewModel()}},{key:"seekTo",value:function(t){this.eventsApi&&this.eventsApi.trigger(b,t)}},{key:"seekToChapter",value:function(t){this.eventsApi&&this.eventsApi.trigger("cv-player-changechapter",t)}},{key:"getViewModel",value:function(){var t=this.model.get("id");t||(t=this.model.get("trackingCode")),this.viewModel=_.r.get("".concat(Z._2.NAME,"-").concat(t)),this.viewModel.get("initialized")||this.initViewModel(),this.setUrl()}},{key:"initViewModel",value:function(){var t=this.model.pick("id");t.id||(t=this.model.pick("trackingCode")),t.id||t.trackingCode||C.Q.Ry.throw(new S.H("Must provide either a master id or a tracking code to ".concat(this.name)));var e=a.extend({},this.viewModelDefaults,t,this.viewModel.toJSON(),{initialized:!0});this.viewModel.set(e)}},{key:"initWebPlayerEvents",value:function(){if(this.enableIeFs){var t=this.getUI("iframe");t&&0!==t.length&&t.on("load",this.bindWebPlayerEvents.bind(this))}}},{key:"bindWebPlayerEvents",value:function(){if(!this.iframeReady){var t=this.getUI("iframe").get(0);this.eventsApi=new i.CVEventsApi(t.contentWindow),this.eventsApi.on(h,this.onPong.bind(this)),this.eventsApi.trigger(g),this.eventsApi.on(v,this.onFullscreenChange.bind(this)),this.eventsApi.trigger(O),this.eventsApi.on(f,this.onTimeUpdate.bind(this)),this.eventsApi.on(u,this.onPlay.bind(this)),this.eventsApi.on(c,this.onPause.bind(this)),this.eventsApi.on(l,this.onEnded.bind(this)),this.options.showDevicesButton&&(this.eventsApi.on(d,this.showDeviceToggle.bind(this)),this.eventsApi.trigger(w)),this.options.captureAnalytics&&(this.tracker=new N({video:this.model.toJSON(),eventsApi:this.eventsApi,analyticsOptions:this.options.analyticsOptions}))}}},{key:"unbindWebPlayerEvents",value:function(){this.eventsApi&&(this.eventsApi.off(v),this.eventsApi.off(f),this.eventsApi.off(u),this.eventsApi.off(c),this.eventsApi.off(l),this.eventsApi.off(h),this.eventsApi.off(d))}},{key:"setUrl",value:function(){var t="".concat(this.viewModel.get("webPlayerHost"),"embed"),e=a.omit(this.viewModel.get("parameters"),["p","vid"])||{};e.a=!!this.viewModel.get("autoplay");var r=this.viewModel.get("id");r&&(e.vid=r);var o=this.viewModel.get("trackingCode");o&&(e.p=o),this.viewModel.get("currenttime")&&(e.t=this.viewModel.get("currenttime"),e.a=!this.viewModel.get("paused"));var i=k._.urlBuilder(t,e),u=(0,n.signUrl)(i,{timestamp:!0});this.viewModel.set({url:u})}},{key:"isTop",value:function(){return window.top===window}},{key:"onTimeUpdate",value:function(t,e){this.viewModel.set("ready",!0),this.viewModel.set("currenttime",e)}},{key:"onPlay",value:function(){this.viewModel.set("ready",!0),this.viewModel.set("paused",!1)}},{key:"onPause",value:function(){this.viewModel.set("ready",!0),this.viewModel.set("paused",!0)}},{key:"onEnded",value:function(){this.viewModel.trigger("ended")}},{key:"onPong",value:function(){this.iframeReady=!0,this.viewModel.set("ready",!0),o.Radio.channel(this.channelName).trigger("loaded"),this.options.parentChannelName&&o.Radio.channel(this.options.parentChannelName).trigger("webplayer:loaded")}},{key:"onFullscreenChange",value:function(t,e,r){e?this.requestFs(r):this.cancelFs(r)}},{key:"requestFs",value:function(t){t||$("html").addClass("player-fullscreen")}},{key:"cancelFs",value:function(t){t||$("html").removeClass("player-fullscreen")}},{key:"showDeviceToggle",value:function(t){this.viewModel.trigger("showDevices",!!t)}},{key:"query",value:function(t,e){var r=this;if(this.iframeReady){var n=a.uniqueId("cveventsapi");this.eventsApi.one("".concat(y,"-").concat(n),(function(t,r){e(r)})),this.eventsApi.trigger(m,t,n)}else this.listenToOnce(this.channelName,"loaded",(function(){return r.query(t,e)}))}},{key:"viewOptions",value:function(){return a.extend({},{styles:U,playSvg:F.Nj.getSvg(F.vn.Play)},this.viewModel.toJSON())}},{key:"onRender",value:function(){this.initWebPlayerEvents()}},{key:"onBeforeDestroy",value:function(){this.unbindWebPlayerEvents(),this.tracker&&this.tracker.destroy()}}])&&q(r.prototype,s),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,s}(C.Q.wA)},12424:function(t,e,r){"use strict";r.d(e,{Z:function(){return f}});var n=r(94445);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,a(n.key),n)}}function a(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}function u(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(u=function(){return!!t})()}function c(){return c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=l(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},c.apply(null,arguments)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function s(t,e){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},s(t,e)}var f=function(t){function e(t,r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=l(e),function(t,e){if(e&&("object"==o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,u()?Reflect.construct(e,r||[],l(t).constructor):e.apply(t,r))}(this,e,[t,r])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&s(t,e)}(e,t),r=e,a=[{key:"createEl",value:function(){return n.Z.dom.createEl("li",{className:"vjs-menu-item cv-collapsible-menu-heading cv-divider-after-menu-item",innerHTML:'<span class="vjs-menu-item-text">'.concat(this.localize(this.options_.label),"</span>"),tabIndex:-1})}},{key:"handleClick",value:function(t){var r,n,o,i=this;(r=e,n=this,"function"==typeof(o=c(l(1&3?r.prototype:r),"handleClick",n))?function(t){return o.apply(n,t)}:o)([t]),this.options_.onClickBack?this.options_.onClickBack():this.requestAnimationFrame((function(){i.player_.getChild("collapserator").getChild("cogButton").pressButton()}))}}],a&&i(r.prototype,a),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,a}(n.Z.getComponent("MenuItem"))},4579:function(t,e,r){"use strict";r.d(e,{C:function(){return g},Z:function(){return m}});var n=r(94445),o=r(90244);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,l(n.key),n)}}function c(t,e,r){return e&&u(t.prototype,e),r&&u(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}function s(t,e,r){return e=h(e),function(t,e){if(e&&("object"==i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,f()?Reflect.construct(e,r||[],h(t).constructor):e.apply(t,r))}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(f=function(){return!!t})()}function p(t,e,r,n){var o=y(h(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function y(){return y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},y.apply(null,arguments)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function v(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}function d(t,e){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},d(t,e)}var b=n.Z.getComponent("MenuItem"),m=function(t){function e(t,r){var n;return a(this,e),(n=s(this,e,[t,r])).onChange=(0,o.Ds)(n.onChange,100,!1,n),n.bindEventListeners(),n}return v(e,t),c(e,[{key:"createEl",value:function(){var t=this.localize("Search");return p(e,"createEl",this,3)(["li",{className:"vjs-menu-item ".concat(this.options_.className||"").trim(),innerHTML:'\n <div class="cv-search-input-menu-item">\n <span class="cv-search-icon">\n <svg viewBox="0 0 24 24">\n <path d="M15.803 14.306l3.917 3.954a1 1 0 0 1-.007 1.417l-.018.018-.018.018a.997.997 0 0 1-1.41 0l-3.918-3.953-.3.214c-1.14.713-2.323 1.07-3.549 1.07-1.796 0-3.328-.642-4.597-1.925C4.634 13.836 4 12.296 4 10.5c0-1.796.634-3.328 1.903-4.597C7.172 4.634 8.704 4 10.5 4c1.796 0 3.329.634 4.597 1.903 1.27 1.269 1.904 2.801 1.904 4.597a6.447 6.447 0 0 1-1.027 3.507l-.17.3zM10.5 5.368c-1.425 0-2.637.5-3.635 1.497-.998.998-1.497 2.21-1.497 3.635 0 1.426.5 2.637 1.497 3.635.998.998 2.21 1.497 3.635 1.497 1.426 0 2.637-.499 3.635-1.497 1.027-1.026 1.54-2.238 1.54-3.635 0-1.397-.513-2.608-1.54-3.635-.998-.998-2.21-1.497-3.635-1.497z"/>\n </svg>\n </span><input placeholder="'.concat(t,'" type="text" autocomplete="off" spellcheck="false" aria-label="').concat(t,'" />\n </div>\n ')}])}},{key:"focus",value:function(){this.$("input").focus()}},{key:"handleClick",value:function(t){t.stopImmediatePropagation(),this.$("input").focus()}},{key:"handleKeyDown",value:function(){this.focus()}},{key:"bindEventListeners",value:function(){var t=this,e=this.$("input");this.onChange=this.onChange.bind(this),e.addEventListener("keyup",this.onChange),e.addEventListener("blur",(function(e){t.options_.menuButton.menu.handleBlur(e)}))}},{key:"onChange",value:function(t){var e=t.target;this.options_.search(e.value)}}])}(b);n.Z.registerComponent("SearchInputMenuItem",m);var g=function(t){function e(){return a(this,e),s(this,e,arguments)}return v(e,t),c(e,[{key:"createEl",value:function(t,r,n){return p(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:"vjs-menu-item cv-no-results"}),n])}},{key:"setLabel",value:function(t){var e=this.$(".vjs-menu-item-text");e&&(e.innerHTML=t)}}])}(b);n.Z.registerComponent("NoMatchingResultsMenuItem",g)},61876:function(t,e,r){"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t){var e="function"==typeof Map?new Map:void 0;return o=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return function(t,e,r){if(i())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,e);var o=new(t.bind.apply(t,n));return r&&a(o,r.prototype),o}(t,arguments,u(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),a(r,t)},o(t)}function i(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(i=function(){return!!t})()}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}r.d(e,{M:function(){return c}});var c=function(t){function e(t,r){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(o=function(t,e,r){return e=u(e),function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,i()?Reflect.construct(e,r||[],u(t).constructor):e.apply(t,r))}(this,e,[(null==r?void 0:r.title)||"Ajax error"])).url=t,o.response=r,o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(e,t),r=e,Object.defineProperty(r,"prototype",{writable:!1}),r;var r}(o(Error))},6950:function(t,e,r){"use strict";r.d(e,{r:function(){return ip}}),r(39674);var n=r(94445);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,c(n.key),n)}}function u(t,e,r){return e&&a(t.prototype,e),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}function l(t,e,r){return e=y(e),function(t,e){if(e&&("object"==o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,s()?Reflect.construct(e,r||[],y(t).constructor):e.apply(t,r))}function s(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(s=function(){return!!t})()}function f(t,e,r,n){var o=p(y(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function p(){return p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=y(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},p.apply(null,arguments)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function h(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&v(t,e)}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}var d=function(t){function e(t,r){return i(this,e),l(this,e,[t,r])}return h(e,t),u(e,[{key:"handleClick",value:function(t){var r=this;f(e,"handleClick",this,3)([t]),this.requestAnimationFrame((function(){r.options_.item.showCollapsibleMenu()}))}},{key:"createEl",value:function(t,r,o){if(!this.options_.item)return f(e,"createEl",this,3)([t,r,o]);var i=this.options_.item.getCollabsibleName(),a=this.options_.item.getCollabsibleValue(),u=this.options_.item.className,c='<span class="vjs-menu-item-text">'.concat(i,"</span>");this.valueHolder_=n.Z.dom.createEl("span",{innerHTML:a});var l=f(e,"createEl",this,3)([t,{className:"vjs-menu-item cv-cog-menu-item ".concat(a?"cv-has-cog-value":""," ").concat(u||"").trim(),innerHTML:c},o]);return l.appendChild(this.valueHolder_),l}},{key:"updateCollapsibleValue",value:function(){this.valueHolder_.innerHTML=this.options_.item.getCollabsibleValue()}}])}(n.Z.getComponent("MenuItem")),b=function(t){function e(t,r){var n;return i(this,e),(n=l(this,e,[t,r])).controlText("Settings"),n}return h(e,t),u(e,[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-cog-menu-button ".concat(f(e,"buildWrapperCSSClass",this,3)([]))}},{key:"buildCSSClass",value:function(){return"cv-cog-button ".concat(f(e,"buildCSSClass",this,3)([]))}},{key:"pressButton",value:function(){this.player_.options_.deferMenus?this.player_.deferMenusPlugin().deferMenu():(this.menu.children_.forEach((function(t){t.updateCollapsibleValue&&t.updateCollapsibleValue()})),f(e,"pressButton",this,3)([]))}},{key:"createItems",value:function(){for(var t,e=this,r=[],n=0;n<this.options_.items.length;n++){var o=this.options_.items[n];o.isCollabsible&&o.showInCollabsibleMenu()&&o.isCollapsed&&r.push(new d(this.player_,{item:o}))}return(null===(t=this.additionalItems)||void 0===t?void 0:t.length)&&this.additionalItems.forEach((function(t){var n,o=new t.ctor(e.player_,Object.assign(Object.assign({},e.options_),null!==(n=t.options)&&void 0!==n?n:{}));r.splice(t.index,0,o)})),r}},{key:"update",value:function(){f(e,"update",this,3)([]),this.player_.trigger("resizemenus")}},{key:"addItem",value:function(t){this.additionalItems||(this.additionalItems=[]),this.additionalItems.some((function(e){return e.name===t.name}))||(this.additionalItems.push(t),this.update())}}])}(n.Z.getComponent("MenuButton"));n.Z.registerComponent("cogButton",b);var m=r(12424);function g(t){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g(t)}function w(){return w="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=C(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},w.apply(null,arguments)}function O(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function P(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,S(n.key),n)}}function j(t,e,r){return e&&P(t.prototype,e),r&&P(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function S(t){var e=function(t){if("object"!=g(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=g(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==g(e)?e:e+""}function _(t,e,r){return e=C(e),function(t,e){if(e&&("object"==g(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,k()?Reflect.construct(e,r||[],C(t).constructor):e.apply(t,r))}function k(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(k=function(){return!!t})()}function C(t){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},C(t)}function E(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&T(t,e)}function T(t,e){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},T(t,e)}var x=n.Z.getComponent("MenuItem"),L=n.Z.getComponent("MenuButton"),R=["large","medium","small"],B=function(t){function e(t,r){return O(this,e),_(this,e,[t,r])}return E(e,t),j(e,[{key:"handleClick",value:function(){this.player_.textTrackSettings.setSizeSetting(this.options_.value)}}])}(x),I=function(t){function e(t,r){var n;return O(this,e),(n=_(this,e,[t,r])).alwaysCollapsed=!0,n.isCollapsed=!1,n.isCollabsible=!0,n.player_.ready((function(){n.update()})),n}return E(e,t),j(e,[{key:"createItems",value:function(){var t=this,e=this.player_.textTrackSettings;if(e){var r=e.getSizeSetting(),n=[new m.Z(this.player_,{label:"Caption Text Size",onClickBack:function(){t.requestAnimationFrame((function(){t.player_.getChild("collapserator").getChild("subsCapsButton").pressButton()}))}})];return R.map((function(e){n.push(new B(t.player_,{label:e.charAt(0).toUpperCase()+e.substring(1),selectable:!0,multiSelectable:!1,selected:e===r,value:e}))})),n}}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((t=e,r=this,"function"==typeof(n=w(C(1&3?t.prototype:t),"buildWrapperCSSClass",r))?function(t){return n.apply(r,t)}:n)([]));var t,r,n}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){L.prototype.handleClick.apply(this)}}])}(L);n.Z.registerComponent("SubtitleSizeButton",I);var D=r(94878),M=r(4579);function A(t){return A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},A(t)}function N(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,F(n.key),n)}}function F(t){var e=function(t){if("object"!=A(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=A(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==A(e)?e:e+""}function Z(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Z=function(){return!!t})()}function z(t){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},z(t)}function V(t,e){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},V(t,e)}var U=function(t){function e(t,r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=z(e),function(t,e){if(e&&("object"==A(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Z()?Reflect.construct(e,r||[],z(t).constructor):e.apply(t,r))}(this,e,[t,r])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&V(t,e)}(e,t),r=e,(n=[{key:"update",value:function(t,e){var r=this;if(null==t?void 0:t.length){var n=[],o=0;t.forEach((function(t){var i=r.options_.label.substr(o,t);i&&n.push(i),n.push('<span class="cv-highlight">'),n.push(r.options_.label.substr(t,e)),n.push("</span>"),o=t+e})),n.push(this.options_.label.substring(o,this.options_.label.length)),this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(n.join(""),"</span>")}else this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(this.options_.label,"</span>")}},{key:"handleClick",value:function(t){t.stopImmediatePropagation(),this.player_.currentTime(this.options_.cue.startTime)}}])&&N(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getComponent("MenuItem"));function G(t){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(t)}function q(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,H(n.key),n)}}function H(t){var e=function(t){if("object"!=G(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=G(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==G(e)?e:e+""}function W(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(W=function(){return!!t})()}function Q(t,e,r,n){var o=Y(K(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function Y(){return Y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=K(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Y.apply(null,arguments)}function K(t){return K=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},K(t)}function $(t,e){return $=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},$(t,e)}var X=n.Z.getComponent("MenuButton"),J=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=K(e),function(t,e){if(e&&("object"==G(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,W()?Reflect.construct(e,r||[],K(t).constructor):e.apply(t,r))}(this,e,[t,r])).alwaysCollapsed=!0,n.isCollapsed=!1,n.isCollabsible=!0,n.update=n.update.bind(n),n.search=n.search.bind(n),n.player_.textTracks().addEventListener("selectedlanguagechange",n.update),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$(t,e)}(e,t),r=e,(n=[{key:"bindTrackEvents",value:function(t){var e=this;t.removeEventListener("loadeddata",this.update),t.addEventListener("loadeddata",this.update),this.player_.one("dispose",(function(){t.removeEventListener("loadeddata",e.update)}))}},{key:"createItems",value:function(){var t,e=D.O.getCurrentTextTrack(this.player_);if(e){if(null===(t=e.cues)||void 0===t?void 0:t.length){for(var r=[new M.Z(this.player_,{menuButton:this,search:this.search})],n=0;n<e.cues.length;n++){var o=e.cues[n];r.push(new U(this.player_,{cue:o,label:o.text,selected:!1,multiSelectable:!1}))}var i=new M.C(this.player_,{label:"No matching results",selected:!1,selectable:!1,multiSelectable:!1});return i.hide(),r.push(i),r}this.bindTrackEvents(e)}}},{key:"search",value:function(t){var e;t=t.trim();var r=D.O.getCurrentTextTrack(this.player_);if(null===(e=null==r?void 0:r.cues)||void 0===e?void 0:e.length){var n=this.findMatches(t,r);this.toggleItemVisibility(t,n),this.toggleNoResults(t,n)}}},{key:"findMatches",value:function(t,e){var r={};if(!t)return r;for(var n=new RegExp(t,"gi"),o=0;o<e.cues.length;o++){for(var i=e.cues[o].text,a=[],u=void 0;u=n.exec(i);)a.push(u.index);a.length&&(r[o]=a)}return r}},{key:"toggleItemVisibility",value:function(t,e){this.menu.children_.slice(1,this.menu.children_.length-1).forEach((function(r,n){!t||e[n]?r.show():r.hide(),r.update(e[n],t.length)}))}},{key:"toggleNoResults",value:function(t,e){var r=this.menu.children_[this.menu.children_.length-1];!t||Object.keys(e).length?r.hide():r.show()}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big cv-subtitle-search-button ".concat(Q(e,"buildWrapperCSSClass",this,3)([]))}},{key:"update",value:function(){Q(e,"update",this,3)([]),this.player_.trigger("resizemenus")}},{key:"pressButton",value:function(){Q(e,"pressButton",this,3)([]);var t=this.menu.children_[0];(null==t?void 0:t.focus)&&(null==t||t.focus())}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){X.prototype.handleClick.apply(this)}}])&&q(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(X);function tt(t){return tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tt(t)}function et(){return et="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ct(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},et.apply(null,arguments)}function rt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,it(n.key),n)}}function ot(t,e,r){return e&&nt(t.prototype,e),r&&nt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function it(t){var e=function(t){if("object"!=tt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=tt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==tt(e)?e:e+""}function at(t,e,r){return e=ct(e),function(t,e){if(e&&("object"==tt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ut()?Reflect.construct(e,r||[],ct(t).constructor):e.apply(t,r))}function ut(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ut=function(){return!!t})()}function ct(t){return ct=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ct(t)}function lt(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&st(t,e)}function st(t,e){return st=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},st(t,e)}n.Z.registerComponent("subtitleSearchButton",J);var ft=n.Z.getComponent("MenuItem"),pt=n.Z.getComponent("MenuButton"),yt=[{label:"Play / Pause",type:"play-pause"},{label:"Volume",type:"volume"},{label:"Mute",type:"mute"},{label:"Toggle fullscreen",type:"fullscreen"},{label:"Exit fullscreen",type:"exit-fullscreen"}],ht=function(t){function e(t,r){return rt(this,e),at(this,e,[t,r])}return lt(e,t),ot(e,[{key:"createEl",value:function(){return n.Z.dom.createEl("li",{className:"vjs-menu-item",tabIndex:-1,innerHTML:'\n <span class="vjs-menu-item-text">'.concat(this.options_.label,"</span>\n <span>").concat(this.getDisplayHtml(this.options_.type),"\n ")})}},{key:"getDisplayHtml",value:function(t){switch(t){case"play-pause":return'<span class="cv-keyboard-button">Spacebar</span>';case"volume":return'<span class="cv-keyboard-button">Shift</span> + \n <span class="cv-keyboard-button cv-single-key">⇑</span> / \n <span class="cv-keyboard-button">Shift</span> +\n <span class="cv-keyboard-button cv-single-key">⇓</span>';case"mute":return'<span class="cv-keyboard-button cv-single-key">m</span>';case"fullscreen":return'<span class="cv-keyboard-button cv-single-key">f</span>';case"exit-fullscreen":return'<span class="cv-keyboard-button cv-single-key">esc</span>'}return""}}])}(ft),vt=function(t){function e(){var t;return rt(this,e),(t=at(this,e,arguments)).alwaysCollapsed=!0,t.isCollapsed=!1,t.isCollabsible=!0,t}return lt(e,t),ot(e,[{key:"createItems",value:function(){var t=this,e=[];return e.push(new m.Z(this.player_,{label:"Keyboard Shortcuts"})),yt.forEach((function(r){e.push(new ht(t.player_,r))})),e}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-keyboard-shortcuts ".concat((t=e,r=this,"function"==typeof(n=et(ct(1&3?t.prototype:t),"buildWrapperCSSClass",r))?function(t){return n.apply(r,t)}:n)([]));var t,r,n}},{key:"getCollabsibleName",value:function(){return"Keyboard Shortcuts"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!this.player_.options_.mobile}},{key:"showCollapsibleMenu",value:function(){pt.prototype.handleClick.apply(this)}}])}(pt);function dt(t){return dt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dt(t)}function bt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,mt(n.key),n)}}function mt(t){var e=function(t){if("object"!=dt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=dt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==dt(e)?e:e+""}function gt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(gt=function(){return!!t})()}function wt(t,e,r,n){var o=Ot(Pt(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function Ot(){return Ot="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Pt(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Ot.apply(null,arguments)}function Pt(t){return Pt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Pt(t)}function jt(t,e){return jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},jt(t,e)}n.Z.registerComponent("KeyboardShortcutsButton",vt);var St="cv-collapsed",_t=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Pt(e),function(t,e){if(e&&("object"==dt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,gt()?Reflect.construct(e,r||[],Pt(t).constructor):e.apply(t,r))}(this,e,[t,r])).addChild("cogButton",{items:n.children_},n.children_.length-1),n.update=n.update.bind(n),n.player_.on("cv-updatecog",n.update),n.player_.on("playerresize",n.update),n.player_.one("play",n.update),n.player_.on("dispose",(function(){n.player_.off("cv-updatecog",n.update),n.player_.off("playerresize",n.update),n.player_.off("play",n.update)})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&jt(t,e)}(e,t),r=e,(n=[{key:"toggleHidden",value:function(t){for(var e=0;e<this.children_.length;e++){var r=this.children_[e];r.isCollabsible&&(r.alwaysCollapsed||t?(r.isCollapsed=!0,r.addClass(St)):(r.isCollapsed=!1,r.removeClass(St)))}this.getChild("cogButton").update()}},{key:"update",value:function(){var t=this.player_.isFullscreen(),e=this.player_.whiteboardModePlugin().side,r=this.player_.el().getBoundingClientRect(),n=!t||"left"!==e&&"right"!==e?r.width:r.height;if(n){this.addClass("cv-collapsorator-ready");var o=n<(!t||"left"!==e&&"right"!==e&&"top"!==e?600:1200);this.player_.options_.deferMenus&&(o=!0),this.toggleHidden(o)}}},{key:"buildCSSClass",value:function(){return"cv-collapsorator ".concat(wt(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return wt(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass()}),n])}}])&&bt(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getComponent("Component"));n.Z.registerComponent("collapserator",_t);var kt=["playToggle","volumePanel","customControlSpacer","playbackRateMenuButton","chaptersButton","qualityButton","keyboardShortcutsButton","subsCapsButton","whiteboardModeButton","subtitleSizeButton","subtitleSearchButton","fullscreenToggle"],Ct=r(4705),Et=r(81884),Tt=r(70065),xt=r(35490);function Lt(t){return Lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lt(t)}function Rt(){Rt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,P=O&&O(O(L([])));P&&P!==r&&n.call(P,a)&&(w=P);var j=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Lt(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function C(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function E(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 T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Lt(e)+" is not iterable")}return m.prototype=g,o(j,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(j),l(j,c,"Generator"),l(j,a,(function(){return this})),l(j,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):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),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function Bt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,It(n.key),n)}}function It(t){var e=function(t){if("object"!=Lt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Lt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Lt(e)?e:e+""}var Dt=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=e,this.initialize()},(e=[{key:"logStream",value:function(){var t="v:".concat(this.options.videoId);Ct.SG.cacheExists(t)||(this.collectionApiClient.log({type:Tt.Vw.WebPlayerStream,actionContext:this.getActionContext(),data:this.getAnalyticsData(),eventVersion:Tt.eq.V3}),Ct.SG&&Ct.SG.cacheSet(t,null,300))}},{key:"logVideoProgress",value:function(t){var e=this,r=this.getAnalyticsData();this.collectionApiClient.log(t.map((function(t){return{type:Tt.Vw.StreamProgress,actionContext:e.getActionContext(),data:Object.assign(Object.assign({},r),{progress:t}),eventVersion:Tt.eq.V2}})))}},{key:"logUserAction",value:function(t,e){var r=Object.assign(Object.assign({},this.getAnalyticsData()),t),n=Object.assign(Object.assign({},this.getActionContext()),e);this.collectionApiClient.log({type:e.actionType,data:r,actionContext:n,eventVersion:e.eventVersion||Tt.eq.V2})}},{key:"getAnalyticsData",value:function(){var t=Object.assign({video:{id:this.options.videoId},flags:{isUsingLocalCache:this.options.isUsingLocalCache}},this.options.additionalAnalyticsData||{});this.options.shareId&&(t.video.shareId=this.options.shareId);var e=this.getEntityType();return e===Tt.py.Interactive?t.interactive={id:+this.options.mediaId}:e===Tt.py.Clip&&(t.clip={id:+this.options.mediaId}),t}},{key:"initialize",value:function(){this.setupCollectionApiClient()}},{key:"setupCollectionApiClient",value:function(){var t=this;this.collectionApiClient=new Et.q({productName:"player.web",productVersion:this.options.productVersion,regionName:this.options.regionName,collectionApiUrls:this.options.collectionApiUrls,collectionApiClientId:this.options.collectionApiClientId,getUser:function(){return t.getCurrentUser()},shouldLog:xt.k.shouldLog,formatData:xt.k.formatData})}},{key:"getCurrentUser",value:function(){return t=this,e=void 0,r=void 0,n=Rt().mark((function t(){return Rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",{id:this.options.userId,customerId:this.options.customerId});case 1:case"end":return t.stop()}}),t,this)})),new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}));var t,e,r,n}},{key:"getActionContext",value:function(){return{entity:this.getEntityType(),location:this.getLocationContext(),productArea:void 0,descriptor:this.options.isEmbedded?Tt.MC.Embedded:void 0,workflowPhase:void 0}}},{key:"getEntityType",value:function(){switch(this.options.mediaType){case"MasterVideo":return Tt.py.Video;case"MasterInteractive":return Tt.py.Interactive;case"MasterClip":return Tt.py.Clip}}},{key:"getLocationContext",value:function(){switch(this.options.playerType){case"player":return Tt.LZ.Player;case"interactive-player":return Tt.LZ.InteractivePlayer;case"create-clip-player":return Tt.LZ.CreateClipPlayer}}}])&&Bt(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}(),Mt=r(61380),At=r(19389),Nt=r.n(At);function Ft(t){return Ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ft(t)}function Zt(t,e,r){return(e=function(t){var e=function(t){if("object"!=Ft(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ft(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ft(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function zt(t){t.paused()?t.play():t.pause()}function Vt(t,e){t.currentTime(t.currentTime()+e)}function Ut(t,e){t.volume(t.volume()+e)}var Gt,qt=Zt(Zt(Zt(Zt(Zt(Zt(Zt(Zt(Zt(Zt({},"f",(function(t){document[t.fsApi_.fullscreenEnabled]&&(t.isFullscreen()?t.exitFullscreen():t.requestFullscreen())})),"m",(function(t){var e=t.volume(),r=t.lastVolume_();if(0===e){var n=r<.1?.1:r;t.volume(n),t.muted(!1)}else t.muted(!t.muted())})),"k",zt),"space",zt),"left",(function(t){return Vt(t,-5)})),"right",(function(t){return Vt(t,5)})),"j",(function(t){return Vt(t,-10)})),"l",(function(t){return Vt(t,10)})),"up",(function(t){return Ut(t,.05)})),"down",(function(t){return Ut(t,-.05)})),Ht=r(61876);!function(t){t.PhysicallyChapteredVideo="physically-chaptered-video"}(Gt||(Gt={}));var Wt=r(29573);function Qt(t){return Qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qt(t)}function Yt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Kt(n.key),n)}}function Kt(t){var e=function(t){if("object"!=Qt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Qt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Qt(e)?e:e+""}function $t(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return($t=function(){return!!t})()}function Xt(){return Xt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Jt(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Xt.apply(null,arguments)}function Jt(t){return Jt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Jt(t)}function te(t,e){return te=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},te(t,e)}r(52002);var ee=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Jt(e),function(t,e){if(e&&("object"==Qt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,$t()?Reflect.construct(e,r||[],Jt(t).constructor):e.apply(t,r))}(this,e,[t])).options=r,n.configureMenuDimensions=n.configureMenuDimensions.bind(n),n.initialize(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&te(t,e)}(e,t),r=e,n=[{key:"initialize",value:function(){this.player.ready(this.configureMenuDimensions),this.player.one("play",this.configureMenuDimensions),this.player.on("resize",this.configureMenuDimensions),this.player.on("fullscreenchange",this.configureMenuDimensions),this.player.on("resizemenus",this.configureMenuDimensions),this.player.on("ready",this.configureMenuDimensions)}},{key:"dispose",value:function(){var t,r,n;this.player.off("resize",this.configureMenuDimensions),this.player.off("fullscreenchange",this.configureMenuDimensions),this.player.off("resizemenus",this.configureMenuDimensions),this.player.off("ready",this.configureMenuDimensions),(t=e,r=this,"function"==typeof(n=Xt(Jt(1&3?t.prototype:t),"dispose",r))?function(t){return n.apply(r,t)}:n)([])}},{key:"configureMenuDimensions",value:function(){var t=this,e=function(e){if(!t.options.mobile){var r=t.player.getChild("collapserator"),n=r.getChild("volumePanel"),o=r.children_.indexOf(n);r.removeChild(n),r.addChild("volumePanel",{inline:e},o),t.player.trigger("volumechange")}},r=this.player.isFullscreen();if(r&&!this.options.mobile){var n=this.player.whiteboardModePlugin().side;if(e("top"!==n),"left"===n||"right"===n||"top"===n){var o=this.player.currentWidth();return void this.player.el().querySelectorAll(".vjs-menu").forEach((function(t){t.style.paddingTop=null,t.style.marginBottom=null,t.style.width="calc(".concat(o,"px - 4em)")}))}}r||e(!0);var i=this.player.currentWidth(),a=this.player.currentHeight()/i*100,u=this.player.el().querySelector(".cv-collapsorator"),c=this.player.el().querySelectorAll(".vjs-menu"),l=u&&u.offsetHeight;l?("CreateClipSeekBar"===this.options.seekBarName&&(l+=22),c&&c.length&&c.forEach((function(e){!r&&t.options.overflowControls?e.style.paddingTop="80%":e.style.paddingTop="calc(".concat(a,"% - ").concat(l,"px)"),e.style.marginBottom="".concat(l,"px"),e.style.width=null,e.querySelector(".vjs-menu-content")&&(i<=450?t.player.addClass("cv-player-small"):t.player.removeClass("cv-player-small"))}))):this.player.one("play",this.configureMenuDimensions)}}],n&&Yt(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getPlugin("plugin"));n.Z.registerPlugin("configureMenuDimensionsPlugin",ee);var re=r(69140);function ne(t){return ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ne(t)}function oe(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ie(n.key),n)}}function ie(t){var e=function(t){if("object"!=ne(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ne(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ne(e)?e:e+""}function ae(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ae=function(){return!!t})()}function ue(){return ue="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ce(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},ue.apply(null,arguments)}function ce(t){return ce=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ce(t)}function le(t,e){return le=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},le(t,e)}var se=n.Z.getPlugin("plugin"),fe="cvplayer-volume",pe="cvplayer-mute",ye=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,r){return e=ce(e),function(t,e){if(e&&("object"==ne(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ae()?Reflect.construct(e,r||[],ce(t).constructor):e.apply(t,r))}(this,e,[t])).enabled=!0,r.player.ready((function(){return r.initialize()})),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&le(t,e)}(e,t),r=e,n=[{key:"initialize",value:function(){this.player.options_.mobile?this.removeVolumeControl():re.S.hasLocalStorage()&&(this.saveVolumeState=this.saveVolumeState.bind(this),this.player.on("volumechange",this.saveVolumeState),this.applyUserPreferences())}},{key:"applyUserPreferences",value:function(){var t=re.S.get(fe),e=re.S.get(pe);t&&this.player.volume(+t),e&&this.player.muted("true"===e)}},{key:"saveVolumeState",value:function(){this.enabled&&(re.S.set(fe,this.player.volume().toString()),re.S.set(pe,this.player.muted().toString()))}},{key:"removeVolumeControl",value:function(){this.player.volume(1);var t=this.player.getChild("collapserator"),e=t.getChild("volumePanel");t.removeChild(e)}},{key:"enable",value:function(){this.enabled=!0}},{key:"disable",value:function(){this.enabled=!1}},{key:"dispose",value:function(){var t,r,n;this.player.off("volumechange",this.saveVolumeState),(t=e,r=this,"function"==typeof(n=ue(ce(1&3?t.prototype:t),"dispose",r))?function(t){return n.apply(r,t)}:n)([])}}],n&&oe(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(se);function he(t){return he="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},he(t)}function ve(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,de(n.key),n)}}function de(t){var e=function(t){if("object"!=he(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=he(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==he(e)?e:e+""}function be(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(be=function(){return!!t})()}function me(t){return me=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},me(t)}function ge(t,e){return ge=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ge(t,e)}n.Z.registerPlugin("persistVolumePlugin",ye);var we=n.Z.getPlugin("plugin"),Oe="cvplayer-playback-rate",Pe=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=me(e),function(t,e){if(e&&("object"==he(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,be()?Reflect.construct(e,r||[],me(t).constructor):e.apply(t,r))}(this,e,[t])).options=r,n.player.dataLoaded((function(){return n.initialize()})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ge(t,e)}(e,t),r=e,(n=[{key:"initialize",value:function(){var t,e=this;if(re.S.hasLocalStorage()){this.savePlaybackRate=this.savePlaybackRate.bind(this),this.player.on("ratechange",this.savePlaybackRate),this.one("dispose",(function(){e.player.off("ratechange",e.savePlaybackRate)}));var r=+re.S.get(Oe);(null===(t=this.player.options_.playbackRates)||void 0===t?void 0:t.some((function(t){return t===r})))&&this.player.playbackRate(r)}}},{key:"savePlaybackRate",value:function(){var t,e=this.player.playbackRate().toString();re.S.set(Oe,e),null===(t=this.options.analyticsService)||void 0===t||t.logUserAction({rate:e},{actionType:Tt.Vw.Select,workflowPhase:Tt.eu.Complete,descriptor:Tt.UX.ChangeSpeed,entity:Tt.py.PlaybackSpeed,eventVersion:Tt.eq.V3})}}])&&ve(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(we);function je(t){return je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},je(t)}function Se(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,_e(n.key),n)}}function _e(t){var e=function(t){if("object"!=je(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=je(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==je(e)?e:e+""}function ke(t,e){if(e&&("object"==je(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ce(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ce=function(){return!!t})()}function Ee(t){return Ee=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ee(t)}function Te(t,e){return Te=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Te(t,e)}n.Z.registerPlugin("persistPlaybackRatePlugin",Pe);var xe=function(t){function e(t){var r,n,o,i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),n=this,i=[t],o=Ee(o=e),(r=ke(n,Ce()?Reflect.construct(o,i||[],Ee(n).constructor):o.apply(n,i))).fullscreenBecauseOfRotate=!1,r.player.supportsFullScreen()?(r.onRotate=r.onRotate.bind(r),r.onFullscreenChange=r.onFullscreenChange.bind(r),r.player.ready((function(){return r.initialize()})),r):ke(r)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Te(t,e)}(e,t),r=e,(n=[{key:"initialize",value:function(){this.player.on("fullscreenchange",this.onFullscreenChange),window.addEventListener("orientationchange",this.onRotate)}},{key:"dispose",value:function(){this.player.off("fullscreenchange",this.onFullscreenChange),window.removeEventListener("orientationchange",this.onRotate)}},{key:"onFullscreenChange",value:function(){this.player.isFullscreen()||(this.fullscreenBecauseOfRotate=!1)}},{key:"onRotate",value:function(){var t=this.getAngle();90===t||-90===t||270===t?(this.player.requestFullscreen(),this.fullscreenBecauseOfRotate=!0):this.fullscreenBecauseOfRotate&&this.player.isFullscreen()&&this.player.exitFullscreen()}},{key:"getAngle",value:function(){var t,e;return"number"==typeof(null===(e=null===(t=window.screen)||void 0===t?void 0:t.orientation)||void 0===e?void 0:e.angle)?window.screen.orientation.angle:0}}])&&Se(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getPlugin("plugin"));n.Z.registerPlugin("fullscreenOnRotatePlugin",xe);var Le="\n <svg viewBox='0 0 434 71'>\n <g>\n <path fill='#FFFFFF' d='M114.44 56.57l3.5 3.5a32.87 32.87 0 0 1-25.16 11.26c-19.63 0-33.62-15.54-33.62-35.16C59.16 16.55 73.16 1 92.78 1a32.31 32.31 0 0 1 24.19 10.4l-3.6 3.3a27.32 27.32 0 0 0-20.59-8.74c-16.91 0-28.39 13.5-28.39 30.21s11.48 30.21 28.39 30.21a28.08 28.08 0 0 0 21.66-9.81zM126.64 1h4.55v70.22h-4.73L126.64 1zm17.3 10.6a3.7 3.7 0 1 1 0 7.4 3.7 3.7 0 0 1 0-7.4zm-2.41 15.07h4.81v44.56h-4.81V26.67zm48 33.15l3.33 3.15a21.8 21.8 0 0 1-17.31 8.61c-12.59 0-21.76-10-21.76-22.22 0-12.22 9.17-22.22 21.76-22.22a21.84 21.84 0 0 1 16.85 8l-3.43 3.06a17.15 17.15 0 0 0-13.42-6.3c-10.09 0-16.76 8.15-16.76 17.5s6.67 17.5 16.76 17.5a17.38 17.38 0 0 0 13.98-7.08zm14.99-9.33v20.74h-4.73V1.01h4.73v47.75l20.74-19.02h6.64l-21.56 19.84L234 71.23h-7.01l-22.47-20.74z'/>\n <path fill='#F8981D' d='M304.09 19.4a5.56 5.56 0 1 1 0-11.12 5.56 5.56 0 0 1 0 11.12zm-5.56 7.27h11.11v44.56h-11.11V26.67zm61.42 22.15c0 .81 0 2.42-.09 4h-31.75c.8 3.77 5.2 8.61 11.93 8.61a17.11 17.11 0 0 0 11.66-4.31l5.38 8.16a27.23 27.23 0 0 1-17 6.1c-12.92 0-22.88-9.87-22.88-22.34s9.06-22.33 21.35-22.33c11.62-.04 21.4 9.02 21.4 22.11zm-10.77-3.76c-.18-3.68-3.58-8.62-10.67-8.62-6.91 0-10.05 4.85-10.4 8.62h21.07zM385.92 71h-6.42l-19.64-44.37h13.97l9.16 23.98 9.72-23.98h8.31l9.63 23.98 9.16-23.98h13.97L414.24 71h-6.52l-10.85-23.7L385.92 71zm-120.22.35h-6L226.11 1.01h17.01l19.42 44.18 18.08-44.18h16.91L265.7 71.35zM0 1l41 35L0 71V1z'/>\n </g>\n </svg>\n",Re=r(90244);function Be(t){return Be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Be(t)}function Ie(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,De(n.key),n)}}function De(t){var e=function(t){if("object"!=Be(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Be(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Be(e)?e:e+""}function Me(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Me=function(){return!!t})()}function Ae(t){return Ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ae(t)}function Ne(t,e){return Ne=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ne(t,e)}var Fe=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Ae(e),function(t,e){if(e&&("object"==Be(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Me()?Reflect.construct(e,r||[],Ae(t).constructor):e.apply(t,r))}(this,e,[t,r])).update=(0,Re.P2)(n.update.bind(n),1e3),t.on("timeupdate",n.update),t.one("dispose",(function(){t.off("timeupdate",n.update),n.el_.removeEventListener("click",n.pause)})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ne(t,e)}(e,t),r=e,(o=[{key:"update",value:function(){var t=this.player_.currentTime();this.el_.href=this.options_.getExternalLink({currentTime:Math.round(t)})}},{key:"buildCSSClass",value:function(){return"cv-open-externally-button"}},{key:"createEl",value:function(){var t={innerHTML:Le,className:this.buildCSSClass()},e={type:"button",href:this.options_.getExternalLink({currentTime:0}),target:"_blank"},r=n.Z.dom.createEl("a",t,e);return this.createControlTextEl(r),r.addEventListener("click",this.pause.bind(this)),r}},{key:"pause",value:function(){this.player_.pause()}}])&&Ie(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n.Z.getComponent("Button"));function Ze(t){return Ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ze(t)}function ze(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ve(n.key),n)}}function Ve(t){var e=function(t){if("object"!=Ze(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ze(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ze(e)?e:e+""}function Ue(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ue=function(){return!!t})()}function Ge(t){return Ge=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ge(t)}function qe(t,e){return qe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},qe(t,e)}Fe.prototype.controlText_="Open in ClickView",n.Z.registerComponent("OpenExternallyButton",Fe);var He=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Ge(e),function(t,e){if(e&&("object"==Ze(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ue()?Reflect.construct(e,r||[],Ge(t).constructor):e.apply(t,r))}(this,e,[t,r])).options=r,t.ready((function(){return n.onReady()})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qe(t,e)}(e,t),r=e,(n=[{key:"onReady",value:function(){var t=this.player.getChild("collapserator"),e=t.getChild("customControlSpacer"),r=t.children_.indexOf(e);t.addChild("OpenExternallyButton",{getExternalLink:this.options.getExternalLink},r+1)}}])&&ze(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getPlugin("plugin"));function We(t){return We="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},We(t)}function Qe(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ye(n.key),n)}}function Ye(t){var e=function(t){if("object"!=We(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=We(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==We(e)?e:e+""}function Ke(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ke=function(){return!!t})()}function $e(t,e,r,n){var o=Xe(Je(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function Xe(){return Xe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Je(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Xe.apply(null,arguments)}function Je(t){return Je=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Je(t)}function tr(t,e){return tr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},tr(t,e)}n.Z.registerPlugin("openExternallyPlugin",He);var er=function(t){function e(t,r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=Je(e),function(t,e){if(e&&("object"==We(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ke()?Reflect.construct(e,r||[],Je(t).constructor):e.apply(t,r))}(this,e,[t,r])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&tr(t,e)}(e,t),r=e,(n=[{key:"buildCSSClass",value:function(){return"cv-touch-control-ui ".concat($e(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return $e(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass()}),n])}},{key:"setUi",value:function(t,e){var r=this,n=t>0,o=n?"cv-touch-right":"cv-touch-left";this.el_.className=this.buildCSSClass()+" cv-ui-touch-active",this.el_.innerHTML="\n <div class='".concat(o,"'>\n <div class='cv-touch-text'>\n ").concat(n?"+":"").concat(10*t,"s\n </div>\n </div>\n "),window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){r.removeText()}),e)}},{key:"removeText",value:function(){this.el_.className=this.buildCSSClass(),this.el_.innerHTML=""}}])&&Qe(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getComponent("component"));function rr(t){return rr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rr(t)}function nr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,or(n.key),n)}}function or(t){var e=function(t){if("object"!=rr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=rr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==rr(e)?e:e+""}function ir(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ir=function(){return!!t})()}function ar(){return ar="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ur(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},ar.apply(null,arguments)}function ur(t){return ur=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ur(t)}function cr(t,e){return cr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},cr(t,e)}n.Z.registerComponent("TouchControls",er);var lr=n.Z.getPlugin("plugin"),sr=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,r){return e=ur(e),function(t,e){if(e&&("object"==rr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ir()?Reflect.construct(e,r||[],ur(t).constructor):e.apply(t,r))}(this,e,[t])).doubleTouchCount=0,r.seekStartTime=0,r.directionModifier=0,r.bindFunctions(),r.player.ready((function(){return r.initialize()})),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cr(t,e)}(e,t),r=e,n=[{key:"bindFunctions",value:function(){this.onTouchStart=this.onTouchStart.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.reBindEventListeners=this.reBindEventListeners.bind(this),this.unBindEventListeners=this.unBindEventListeners.bind(this)}},{key:"initialize",value:function(){var t=this;this.player.addChild("TouchControls"),this.touchControls=this.player.getChild("TouchControls"),this.player.on("ready",this.reBindEventListeners),this.one("dispose",(function(){t.player.off("ready",t.reBindEventListeners)})),this.reBindEventListeners()}},{key:"reBindEventListeners",value:function(){this.unBindEventListeners(),this.tech=this.player.tech(!0),"Html5"===this.tech.name()&&(this.tech.on("touchstart",this.onTouchStart),this.tech.on("touchend",this.onTouchEnd))}},{key:"unBindEventListeners",value:function(){this.tech&&"Html5"===this.tech.name()&&(this.tech.off("touchstart",this.onTouchStart),this.tech.off("touchend",this.onTouchEnd))}},{key:"dispose",value:function(){var t,r,n;(t=e,r=this,"function"==typeof(n=ar(ur(1&3?t.prototype:t),"dispose",r))?function(t){return n.apply(r,t)}:n)([]),this.unBindEventListeners()}},{key:"onTouchStart",value:function(t){this.touchStartTime=t.timeStamp,this.userActive=this.player.userActive()}},{key:"onTouchEnd",value:function(t){var e=this;if(t.changedTouches.length){if(t.timeStamp-this.lastTouchTime<300)return this.onDoubleTouch(t),void(this.lastTouchTime=t.timeStamp);this.resetProperties(),this.lastTouchTime=t.timeStamp,t.timeStamp-this.touchStartTime<300&&window.setTimeout((function(){e.doubleTouchCount||(e.player.paused()?e.player.play():e.userActive&&e.player.pause())}),300)}}},{key:"resetProperties",value:function(){this.doubleTouchCount=0,this.seekStartTime=0,this.directionModifier=0}},{key:"onDoubleTouch",value:function(t){var e=this.player.el().getBoundingClientRect(),r=e.left+e.width/2;if(0===this.doubleTouchCount&&(this.seekStartTime=this.player.currentTime(),t.changedTouches[0].pageX<r?this.directionModifier=-1:this.directionModifier=1),this.doubleTouchCount++,this.directionModifier<0){if(10*this.doubleTouchCount>this.seekStartTime+10)return;return this.touchControls.setUi(-this.doubleTouchCount,900),void this.player.currentTime(this.player.currentTime()-10)}var n=this.player.duration()-this.seekStartTime;10*this.doubleTouchCount>n+10||(this.touchControls.setUi(this.doubleTouchCount,900),this.player.currentTime(this.player.currentTime()+10))}}],n&&nr(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(lr);function fr(t){return fr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fr(t)}function pr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,yr(n.key),n)}}function yr(t){var e=function(t){if("object"!=fr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=fr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==fr(e)?e:e+""}n.Z.registerPlugin("touchControls",sr);var hr=function(){return t=function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.id=r.id,this.plugin=e,this.source=r,this.enabled=this.enabled.bind(this)},(e=[{key:"enabled",value:function(t){return void 0===t?this.plugin.currentSource===this.source:(t&&this.plugin.setSource(this.source.id),t)}}])&&pr(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function vr(t){return vr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vr(t)}function dr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,br(n.key),n)}}function br(t){var e=function(t){if("object"!=vr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=vr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==vr(e)?e:e+""}function mr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(mr=function(){return!!t})()}function gr(t){return gr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},gr(t)}function wr(t,e){return wr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},wr(t,e)}var Or=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=gr(e),function(t,e){if(e&&("object"==vr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,mr()?Reflect.construct(e,r||[],gr(t).constructor):e.apply(t,r))}(this,e,[t])).options_=r,n.player.ready((function(){return n.initialize()})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&wr(t,e)}(e,t),r=e,n=[{key:"initialize",value:function(){var t=this;this.sources=[],this.qualityLevels=this.player.qualityLevels(),this.populateSources(this.options_.sources),this.onQualityChange=this.onQualityChange.bind(this),this.qualityLevels.on("change",this.onQualityChange),this.player.one("dispose",(function(){t.qualityLevels.off("change",t.onQualityChange)}))}},{key:"currentSource",get:function(){return this._currentSource}},{key:"onQualityChange",value:function(){var t=this.qualityLevels[this.qualityLevels.selectedIndex];this.player.trigger("cv-quality-change",t.id)}},{key:"setSource",value:function(t){var e=this,r=this.getSourceById(t);if(null===r)return this.currentSource;var n=this.player.currentTime(),o=!this.player.paused();this._currentSource=r;var i=this.player.playbackRate();return this.player.src({src:r.url,type:r.mimeType}),this.player.one("loadedmetadata",(function(){e.player.playbackRate(i),e.player.currentTime()!==n&&e.player.currentTime(n),o&&e.player.play()})),this.trigger({event:"sourcechange",source:r}),this.sourceChangeUpdateQualityLevels(r),r}},{key:"getSourceById",value:function(t){return this.sources.find((function(e){return e.id===t}))}},{key:"repopulateSources",value:function(t){for(var e=null;this.qualityLevels.length;)this.qualityLevels[0].enabled&&(e=this.qualityLevels[0].id),this.qualityLevels.removeQualityLevel(this.qualityLevels[0]);this.sources=[],this.populateSources(t,e)}},{key:"sortSources",value:function(t){return t.sort((function(t,e){return t.id===e.id?0:+t.id>+e.id?-1:1}))}},{key:"populateSources",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=null;(t=this.sortSources(t)).forEach((function(t){e.qualityLevels.addQualityLevel(new hr(e,t)),e.sources.push(t),e.trigger({event:"addsource",source:t}),null===r?t.default&&(n=t):t.id===r&&(n=t)})),null===n&&(n=this.sources[0]),null!==n&&this.setSource(n.id)}},{key:"sourceChangeUpdateQualityLevels",value:function(t){for(var e=this.qualityLevels,r=-1,n=0;n<e.length;n++)if(e[n].id===t.id){r=n;break}e.selectedIndex_=r,e.trigger({selectedIndex:r,type:"change"})}}],n&&dr(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getPlugin("plugin"));function Pr(t){return Pr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pr(t)}function jr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Sr(n.key),n)}}function Sr(t){var e=function(t){if("object"!=Pr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Pr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Pr(e)?e:e+""}n.Z.registerPlugin("progressiveFiles",Or);var _r=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"getKnownProfiles",value:function(){return["1080","720","480","360","240"]}},{key:"enableProfileOrNextBest",value:function(t,e){var r=t.getQualityLevelById(e);if(r||(r=this.getNextBestQuality(t,e)),!r)return null;for(var n=0;n<t.length;n++){var o=t[n];o.enabled=r.id===o.id}return r}},{key:"getNextBestQuality",value:function(t,e){var r=this.getKnownProfiles(),n=r.indexOf(e);if(n>=0){for(var o=n+1;o<r.length;o++){var i=r[o],a=t.getQualityLevelById(i);if(a)return a}for(var u=n-1;u>0;u--){var c=r[u],l=t.getQualityLevelById(c);if(l)return l}}return null}}],null&&jr(t.prototype,null),e&&jr(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function kr(t){return kr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kr(t)}function Cr(){Cr=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,P=O&&O(O(L([])));P&&P!==r&&n.call(P,a)&&(w=P);var j=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==kr(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function C(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function E(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 T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(kr(e)+" is not iterable")}return m.prototype=g,o(j,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(j),l(j,c,"Generator"),l(j,a,(function(){return this})),l(j,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):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),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function Er(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Tr(n.key),n)}}function Tr(t){var e=function(t){if("object"!=kr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=kr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==kr(e)?e:e+""}var xr=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.name=e.name,this.playbackProfile=e.playbackProfile,this.address=new URL(e.httpsAddress)},(e=[{key:"getUrl",value:function(t){return t?this.address+"cache?file="+encodeURIComponent(t):null}},{key:"ping",value:function(){return t=this,e=void 0,r=void 0,n=Cr().mark((function t(){var e,r,n,o;return Cr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=new AbortController,r=setTimeout((function(){return e.abort()}),1e3),t.prev=3,t.next=6,fetch(this.address+"ping",{method:"GET",mode:"cors",signal:e.signal});case 6:return n=t.sent,t.next=9,n.text();case 9:return o=t.sent,clearTimeout(r),t.abrupt("return","PONG"===o);case 14:return t.prev=14,t.t0=t.catch(3),t.abrupt("return",!1);case 17:case"end":return t.stop()}}),t,this,[[3,14]])})),new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}));var t,e,r,n}}])&&Er(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Lr(t){return Lr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lr(t)}function Rr(){Rr=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,P=O&&O(O(L([])));P&&P!==r&&n.call(P,a)&&(w=P);var j=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Lr(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function C(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function E(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 T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Lr(e)+" is not iterable")}return m.prototype=g,o(j,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(j),l(j,c,"Generator"),l(j,a,(function(){return this})),l(j,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):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),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function Br(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ir(n.key),n)}}function Ir(t){var e=function(t){if("object"!=Lr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Lr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Lr(e)?e:e+""}var Dr=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.player=e,this.logger=n.Z.log.createLogger("localcache")},(e=[{key:"setSource",value:function(t,e){return r=this,n=void 0,o=void 0,i=Rr().mark((function r(){var n;return Rr().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!this.player.localCache||void 0===(null==t?void 0:t.src)){r.next=5;break}return r.next=3,this.player.localCache().getActiveLocalCache();case 3:null!==(n=r.sent)&&(this.logger.debug("Using Local Cache",n),t.src=n.getUrl(t.src));case 5:e(null,t);case 6:case"end":return r.stop()}}),r,this)})),new(o||(o=Promise))((function(t,e){function a(t){try{c(i.next(t))}catch(t){e(t)}}function u(t){try{c(i.throw(t))}catch(t){e(t)}}function c(e){var r;e.done?t(e.value):(r=e.value,r instanceof o?r:new o((function(t){t(r)}))).then(a,u)}c((i=i.apply(r,n||[])).next())}));var r,n,o,i}}])&&Br(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Mr(t){return Mr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mr(t)}function Ar(){Ar=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,P=O&&O(O(L([])));P&&P!==r&&n.call(P,a)&&(w=P);var j=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Mr(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function C(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function E(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 T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Mr(e)+" is not iterable")}return m.prototype=g,o(j,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(j),l(j,c,"Generator"),l(j,a,(function(){return this})),l(j,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):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),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function Nr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Fr(n.key),n)}}function Fr(t){var e=function(t){if("object"!=Mr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Mr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Mr(e)?e:e+""}function Zr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Zr=function(){return!!t})()}function zr(){return zr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Vr(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},zr.apply(null,arguments)}function Vr(t){return Vr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Vr(t)}function Ur(t,e){return Ur=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ur(t,e)}n.Z.use("*",(function(t){return new Dr(t)}));var Gr='<?xml version="1.0" encoding="UTF-8"?><svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Artboard" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.9"><g id="Local-Cache" transform="translate(2.000000, 2.000000)"><rect id="Rectangle" fill="#FFFFFF" x="0" y="2.4" width="18.8" height="15.2"></rect><ellipse id="Oval" fill="#FFFFFF" cx="9.4" cy="2.4" rx="9.4" ry="2.4"></ellipse><ellipse id="Oval-Copy" fill="#FFFFFF" cx="9.4" cy="17.6" rx="9.4" ry="2.4"></ellipse><g id="Logo/Circle" transform="translate(2.500000, 3.000000)"><circle id="Oval" fill="#FFFFFF" cx="7" cy="7" r="7"></circle><polygon id="Fill-1" fill="#F8981D" points="4.66666667 2.33333333 4.66666667 11.4245258 10.0383286 6.87866667"></polygon></g></g></g></svg>',qr=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Vr(e),function(t,e){if(e&&("object"==Mr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Zr()?Reflect.construct(e,r||[],Vr(t).constructor):e.apply(t,r))}(this,e,[t,r])).hide(),n.onLocalCacheChange=n.onLocalCacheChange.bind(n),t.ready((function(){n.initialize()})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ur(t,e)}(e,t),r=e,n=[{key:"createEl",value:function(){return(t=e,r=this,"function"==typeof(n=zr(Vr(1&3?t.prototype:t),"createEl",r))?function(t){return n.apply(r,t)}:n)(["div",{className:"vjs-local-cache-indicator",innerHTML:'<div class="vjs-local-cache-indicator-icon">'.concat(Gr,"</div>"),title:"Streaming from ClickView Local Cache"}]);var t,r,n}},{key:"initialize",value:function(){var t=this;this.localCachePlugin=this.player_.localCache(),this.localCachePlugin&&(this.localCachePlugin.on("localcachechanged",this.onLocalCacheChange),this.player_.on("dispose",(function(){t.localCachePlugin.off("localcachechanged",t.onLocalCacheChange)})),this.onLocalCacheChange())}},{key:"onLocalCacheChange",value:function(){return t=this,e=void 0,r=void 0,n=Ar().mark((function t(){return Ar().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.localCachePlugin.getActiveLocalCache();case 2:t.sent?this.show():this.hide();case 4:case"end":return t.stop()}}),t,this)})),new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}));var t,e,r,n}}],n&&Nr(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getComponent("Component"));function Hr(t){return Hr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hr(t)}function Wr(){Wr=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,P=O&&O(O(L([])));P&&P!==r&&n.call(P,a)&&(w=P);var j=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Hr(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function C(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function E(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 T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Hr(e)+" is not iterable")}return m.prototype=g,o(j,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(j),l(j,c,"Generator"),l(j,a,(function(){return this})),l(j,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):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),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function Qr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Yr(n.key),n)}}function Yr(t){var e=function(t){if("object"!=Hr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Hr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Hr(e)?e:e+""}function Kr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Kr=function(){return!!t})()}function $r(){return $r="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Xr(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},$r.apply(null,arguments)}function Xr(t){return Xr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Xr(t)}function Jr(t,e){return Jr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Jr(t,e)}n.Z.registerComponent("localCacheIndicator",qr);var tn=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}))},en=function(t){function e(t,r){var o;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(o=function(t,e,r){return e=Xr(e),function(t,e){if(e&&("object"==Hr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Kr()?Reflect.construct(e,r||[],Xr(t).constructor):e.apply(t,r))}(this,e,[t])).logger_=n.Z.log.createLogger("localcache"),void 0===r)throw Error("no options defined");return o.localCaches_=r.localCacheAddresses.map((function(t){return new xr(t)})),o.player.ready((function(){o.initialize(),r.enabled&&o.enable()})),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Jr(t,e)}(e,t),r=e,o=[{key:"isEnabled",get:function(){return this.enabled_}},{key:"enable",value:function(){this.enabled_=!0,this.resetActiveLocalCache()}},{key:"disable",value:function(){this.enabled_=!1}},{key:"getActiveLocalCache",value:function(){return this.enabled_?this.activeLocalCache_:null}},{key:"resetActiveLocalCache",value:function(){this.clearActiveLocalCache(),this.activeLocalCache_=this.getActiveLocalCacheInternal()}},{key:"clearActiveLocalCache",value:function(){this.activeLocalCache_&&(this.activeLocalCache_=null,this.onLocalCacheChange(null))}},{key:"removeLocalCache",value:function(t){this.localCaches_=this.localCaches_.filter((function(e){return e!==t}))}},{key:"dispose",value:function(){var t,r,n;(t=e,r=this,"function"==typeof(n=$r(Xr(1&3?t.prototype:t),"dispose",r))?function(t){return n.apply(r,t)}:n)([])}},{key:"initialize",value:function(){this.player.controlBar.addChild("localCacheIndicator")}},{key:"handleNetworkError",value:function(){return tn(this,void 0,void 0,Wr().mark((function t(){var e;return Wr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getActiveLocalCache();case 2:if(!(e=t.sent)){t.next=8;break}return t.next=6,e.ping();case 6:t.sent&&this.removeLocalCache(e);case 8:return this.resetActiveLocalCache(),t.next=11,this.getActiveLocalCache();case 11:return this.resetSource(),t.abrupt("return",!0);case 13:case"end":return t.stop()}}),t,this)})))}},{key:"resetSource",value:function(){for(var t=this.player.qualityLevels(),e=0;e<t.length;e++)t[e].enabled&&(t[e].enabled=!0)}},{key:"getActiveLocalCacheInternal",value:function(){return tn(this,void 0,void 0,Wr().mark((function t(){var e,r,n,o=this;return Wr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=[],r=function(t){return tn(o,void 0,void 0,Wr().mark((function r(){return Wr().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t.ping();case 2:if(!r.sent){r.next=4;break}e.push(t);case 4:case"end":return r.stop()}}),r)})))},t.next=4,Promise.all(this.localCaches_.map((function(t){return r(t)})));case 4:if(!(e.length>0)){t.next=8;break}return n=e[0],this.onLocalCacheChange(n),t.abrupt("return",n);case 8:return t.abrupt("return",null);case 9:case"end":return t.stop()}}),t,this)})))}},{key:"onLocalCacheChange",value:function(t){this.logger_.debug("Local Cache changed",t),this.trigger("localcachechanged",{localCache:t});var e=!1;t&&t.playbackProfile&&(this.logger_.debug("Changing active profile for local cache",t.playbackProfile),_r.enableProfileOrNextBest(this.player.qualityLevels(),t.playbackProfile),e=!0),e||this.player.src(this.player.src())}}],o&&Qr(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n.Z.getPlugin("plugin"));function rn(t){return rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rn(t)}function nn(){nn=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,P=O&&O(O(L([])));P&&P!==r&&n.call(P,a)&&(w=P);var j=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==rn(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function C(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function E(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 T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(rn(e)+" is not iterable")}return m.prototype=g,o(j,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(j),l(j,c,"Generator"),l(j,a,(function(){return this})),l(j,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):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),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function on(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,an(n.key),n)}}function an(t){var e=function(t){if("object"!=rn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=rn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==rn(e)?e:e+""}function un(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(un=function(){return!!t})()}function cn(){return cn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ln(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},cn.apply(null,arguments)}function ln(t){return ln=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ln(t)}function sn(t,e){return sn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},sn(t,e)}n.Z.registerPlugin("localCache",en);var fn=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}))},pn=function(t){function e(t,r){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(o=function(t,e,r){return e=ln(e),function(t,e){if(e&&("object"==rn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,un()?Reflect.construct(e,r||[],ln(t).constructor):e.apply(t,r))}(this,e,[t])).playerApi=r.playerApi,o.fileToken=r.fileToken,o.logger=n.Z.log.createLogger("video-signature-expiry-plugin"),o.bindErrorHandlers(),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&sn(t,e)}(e,t),r=e,o=[{key:"bindErrorHandlers",value:function(){this.onError=this.onError.bind(this),this.player.on("error",this.onError)}},{key:"dispose",value:function(){var t,r,n;this.player.off("error",this.onError),(t=e,r=this,"function"==typeof(n=cn(ln(1&3?t.prototype:t),"dispose",r))?function(t){return n.apply(r,t)}:n)([])}},{key:"onError",value:function(){return fn(this,void 0,void 0,nn().mark((function t(){var e,r=this;return nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((e=this.player.error().code)===MediaError.MEDIA_ERR_NETWORK||e===MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,this.player.localCache().getActiveLocalCache();case 5:if(!t.sent){t.next=8;break}return this.callErrorHandler((function(){return r.player.localCache().handleNetworkError()})),t.abrupt("return");case 8:this.callErrorHandler((function(){return r.handleVideoSignatureExpiry()}));case 9:case"end":return t.stop()}}),t,this)})))}},{key:"handleVideoSignatureExpiry",value:function(){return fn(this,void 0,void 0,nn().mark((function t(){var e,r;return nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.playerApi&&this.fileToken){t.next=2;break}return t.abrupt("return",!1);case 2:if(!(this.refetchedSourcesTimestamp+9e5>Date.now())){t.next=4;break}return t.abrupt("return",!1);case 4:return this.refetchedSourcesTimestamp=Date.now(),e=null,t.prev=6,this.logger.debug("Detected expired mp4 urls, attempting to refetch"),r="".concat(this.playerApi.origin,"/api/files?fileToken=").concat(this.fileToken),t.next=11,Mt.e.get(r);case 11:e=t.sent,t.next=18;break;case 14:return t.prev=14,t.t0=t.catch(6),this.logger.error("Failed to refetch expired mp4 urls"),t.abrupt("return",!1);case 18:return this.logger.debug("Mp4 urls successfully refetched"),this.player.progressiveFiles().repopulateSources(e.progressive.map((function(t){return{id:t.profile,mimeType:t.mimeType,url:t.url}}))),this.fileToken=e.fileToken,t.abrupt("return",!0);case 22:case"end":return t.stop()}}),t,this,[[6,14]])})))}},{key:"callErrorHandler",value:function(t){return fn(this,void 0,void 0,nn().mark((function e(){var r,n,o,i,a=this;return nn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.player.currentTime(),n=!this.player.paused(),o=this.player.playbackRate(),i=function(){a.player.playbackRate(o),a.player.currentTime(r),n&&a.player.play(),a.player.error(null)},this.player.one("loadedmetadata",i),e.next=7,t();case 7:if(!e.sent){e.next=9;break}return e.abrupt("return");case 9:this.player.off("loadedmetadata",i);case 10:case"end":return e.stop()}}),e,this)})))}}],o&&on(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n.Z.getPlugin("plugin"));function yn(t){return yn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yn(t)}function hn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,vn(n.key),n)}}function vn(t){var e=function(t){if("object"!=yn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=yn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==yn(e)?e:e+""}function dn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(dn=function(){return!!t})()}function bn(t){return bn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},bn(t)}function mn(t,e){return mn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},mn(t,e)}n.Z.registerPlugin("handleNetworkErrors",pn);var gn=n.Z.getPlugin("plugin"),wn="cvplayer-show-subtitles",On="cvplayer-selected-language",Pn="cvplayer-subtitle-size",jn=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=bn(e),function(t,e){if(e&&("object"==yn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,dn()?Reflect.construct(e,r||[],bn(t).constructor):e.apply(t,r))}(this,e,[t])).options=r,n.initialize(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&mn(t,e)}(e,t),r=e,(n=[{key:"initialize",value:function(){this.applyUserPreferences=this.applyUserPreferences.bind(this),this.player.textTracks().length&&(this.bindEventListeners(),this.applyUserPreferences())}},{key:"applyUserPreferences",value:function(){var t=!!this.options.showSubtitles,e=this.safeGet(wn);if("true"===e&&(t=!0),"false"===e&&(t=!1),t){var r=this.guessWhichTrack();r&&(r.mode="showing")}else this.disableSubtitles();var n=this.safeGet(Pn);n||(n=this.options.subtitleSize),this.player.options_.mobile&&(n="medium"),n&&this.player.textTrackSettings.setSizeSetting(n)}},{key:"safeGet",value:function(t){if(re.S.hasLocalStorage())return re.S.get(t)}},{key:"onSelectedLanguageChange",value:function(){for(var t,e,r=this.player.textTracks(),n=0;n<r.length;n++){var o=r[n];if("showing"===o.mode)return re.S.set(wn,"true"),re.S.set(On,o.language),void(null===(t=this.options.analyticsService)||void 0===t||t.logUserAction({language:o.language},{actionType:Tt.Vw.Select,entity:Tt.py.Subtitle,workflowPhase:Tt.eu.Complete,descriptor:Tt.DL.On}))}re.S.set(wn,"false"),re.S.remove(On),null===(e=this.options.analyticsService)||void 0===e||e.logUserAction({language:""},{actionType:Tt.Vw.Select,entity:Tt.py.Subtitle,workflowPhase:Tt.eu.Complete,descriptor:Tt.DL.Off,eventVersion:Tt.eq.V3})}},{key:"bindEventListeners",value:function(){var t=this;re.S.hasLocalStorage()&&(this.onSelectedLanguageChange=this.onSelectedLanguageChange.bind(this),this.onChangeSubtitleSize=this.onChangeSubtitleSize.bind(this),this.player.on("cv:languageselected",this.onSelectedLanguageChange),this.player.on("changesubtitlesize",this.onChangeSubtitleSize),this.one("dispose",(function(){t.player.off("cv:languageselected",t.onSelectedLanguageChange),t.player.off("changesubtitlesize",t.onChangeSubtitleSize)})))}},{key:"onChangeSubtitleSize",value:function(){var t=this.player.textTrackSettings.getSizeSetting();re.S.set(Pn,t)}},{key:"guessWhichTrack",value:function(){for(var t,e,r=this.safeGet(On)||window.navigator.language,n=this.getLanguageParts(r),o=n.language,i=n.country,a=this.player.textTracks(),u=0;u<a.length;u++){var c=a[u],l=this.getLanguageParts(c.language),s=l.language,f=l.country;if(s===o&&(t=c,f||(e=c),f===i))return t}return e||t||null}},{key:"getLanguageParts",value:function(t){var e=t.toLowerCase().split("-");return{language:e[0],country:e[1]}}},{key:"disableSubtitles",value:function(){for(var t=this.player.textTracks(),e=0;e<t.length;e++)t[e].mode="disabled"}},{key:"previewModeSubtitles",value:function(){var t=this.guessWhichTrack();t&&(t.mode="showing"),this.player.off("changesubtitlesize",this.onChangeSubtitleSize),this.player.textTrackSettings.setSizeSetting("large"),this.player.on("changesubtitlesize",this.onChangeSubtitleSize)}}])&&hn(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(gn);function Sn(t){return Sn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sn(t)}function _n(){_n=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,P=O&&O(O(L([])));P&&P!==r&&n.call(P,a)&&(w=P);var j=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Sn(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function C(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function E(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 T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Sn(e)+" is not iterable")}return m.prototype=g,o(j,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(j),l(j,c,"Generator"),l(j,a,(function(){return this})),l(j,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):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),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function kn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Cn(n.key),n)}}function Cn(t){var e=function(t){if("object"!=Sn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Sn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Sn(e)?e:e+""}function En(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(En=function(){return!!t})()}function Tn(t){return Tn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Tn(t)}function xn(t,e){return xn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},xn(t,e)}n.Z.registerPlugin("persistSubtitleSettingsPlugin",jn);var Ln=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}))},Rn=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Tn(e),function(t,e){if(e&&("object"==Sn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,En()?Reflect.construct(e,r||[],Tn(t).constructor):e.apply(t,r))}(this,e,[t])).options=r,n.player.ready((function(){return n.initialize()})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xn(t,e)}(e,t),r=e,(n=[{key:"initialize",value:function(){return Ln(this,void 0,void 0,_n().mark((function t(){var e,r,n,o,i=this;return _n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getActiveLocalCache();case 2:if(e=t.sent,(r=e?this.options.playbackProfileLocalCache:this.options.playbackProfile)||(r="1080"),re.S.hasLocalStorage()&&(n=re.S.get(this.getStorageKey(!!e)))&&(r=n),o=this.player.qualityLevels(),(null==e?void 0:e.playbackProfile)||_r.enableProfileOrNextBest(o,r),re.S.hasLocalStorage()){t.next=10;break}return t.abrupt("return");case 10:this.onQualityLevelsChange=this.onQualityLevelsChange.bind(this),o.on("change",this.onQualityLevelsChange),this.on("dispose",(function(){o.off("change",i.onQualityLevelsChange)}));case 13:case"end":return t.stop()}}),t,this)})))}},{key:"onQualityLevelsChange",value:function(){var t;return Ln(this,void 0,void 0,_n().mark((function e(){var r,n,o;return _n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.isLocalCacheActive();case 2:r=e.sent,n=this.player.qualityLevels(),o=n[n.selectedIndex],re.S.set(this.getStorageKey(r),o.id),null===(t=this.options.analyticsService)||void 0===t||t.logUserAction({quality:o.id},{actionType:Tt.Vw.Select,workflowPhase:Tt.eu.Complete,descriptor:Tt.UX.ChangeResolution,entity:Tt.py.Resolution,eventVersion:Tt.eq.V3});case 7:case"end":return e.stop()}}),e,this)})))}},{key:"isLocalCacheActive",value:function(){return Ln(this,void 0,void 0,_n().mark((function t(){return _n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.player.localCache().getActiveLocalCache();case 2:return t.abrupt("return",!!t.sent);case 3:case"end":return t.stop()}}),t,this)})))}},{key:"getActiveLocalCache",value:function(){return this.player.localCache().getActiveLocalCache()}},{key:"getStorageKey",value:function(t){return t?"cvplayer-localcache-playback-quality":"cvplayer-playback-quality"}}])&&kn(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getPlugin("plugin"));function Bn(t){return Bn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bn(t)}function In(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function Dn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Mn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Nn(n.key),n)}}function An(t,e,r){return e&&Mn(t.prototype,e),r&&Mn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Nn(t){var e=function(t){if("object"!=Bn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Bn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Bn(e)?e:e+""}function Fn(t,e,r){return e=zn(e),function(t,e){if(e&&("object"==Bn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Zn()?Reflect.construct(e,r||[],zn(t).constructor):e.apply(t,r))}function Zn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Zn=function(){return!!t})()}function zn(t){return zn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},zn(t)}function Vn(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Un(t,e)}function Un(t,e){return Un=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Un(t,e)}n.Z.registerPlugin("persistQualitySettingsPlugin",Rn);var Gn=n.Z.getComponent("Component"),qn=function(t){function e(t,r){return Dn(this,e),Fn(this,e,[t,r])}return Vn(e,t),An(e,[{key:"createEl",value:function(){return n.Z.dom.createEl("div",{className:"cv-progress-reporter-item"})}},{key:"update",value:function(){var t=this.options_.event,e=this.player_.duration(),r=(t.end.time-t.start.time)/e;this.el_.style.width=100*r+"%";var n=t.start.time/e;this.el_.style.left=100*n+"%"}}])}(Gn),Hn=function(t){function e(){var t;return Dn(this,e),(t=Fn(this,e,arguments)).events_=[],t}return Vn(e,t),An(e,[{key:"update",value:function(){for(var t=this,e=this.children(),r=e.length;r>0;r--)this.removeChild(e[r]);this.events_.forEach((function(e){var r=new qn(t.player(),{event:e});t.addChild(r),r.update()}))}},{key:"addEvents",value:function(t){var e,r;(e=this.events_).push.apply(e,function(t){if(Array.isArray(t))return In(t)}(r=t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(r)||function(t,e){if(t){if("string"==typeof t)return In(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?In(t,e):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),this.update()}},{key:"createEl",value:function(){return n.Z.dom.createEl("div",{className:"cv-progress-reporter-display"})}}])}(Gn);function Wn(t){return Wn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wn(t)}function Qn(t,e,r){return(e=Kn(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Yn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Kn(n.key),n)}}function Kn(t){var e=function(t){if("object"!=Wn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Wn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Wn(e)?e:e+""}function $n(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return($n=function(){return!!t})()}function Xn(t){return Xn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Xn(t)}function Jn(t,e){return Jn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Jn(t,e)}var to=n.Z.getPlugin("plugin"),eo="play",ro="playing",no="pause",oo="seekstart",io="ended",ao="pausedseek",uo=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Xn(e),function(t,e){if(e&&("object"==Wn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,$n()?Reflect.construct(e,r||[],Xn(t).constructor):e.apply(t,r))}(this,e,[t,r])).eventBuffer=[],n.latestTime=0,n.lastPlayingTime=0,n.isPlaying=!1,n.isSeeking=!1,n.hasEnded=!1,n.shouldLogPlayOnTimeUpdate=!1,n.options=r,n.player.ready((function(){return n.initialize()})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Jn(t,e)}(e,t),r=e,n=[{key:"initialize",value:function(){this.validateOptions(),this.bindListeners(),this.startInterval(),this.addEasterEgg()}},{key:"validateOptions",value:function(){if("function"!=typeof this.options.onFlush)throw new Error("Please provide the onFlush option")}},{key:"bindListeners",value:function(){var t=this,e=Qn(Qn(Qn(Qn(Qn(Qn({},eo,(function(){return t.onPlay()})),no,(function(){return t.onPause()})),"timeupdate",(function(){return t.onTimeUpdate()})),"seeking",(function(){return t.onSeeking()})),io,(function(){return t.onEnded()})),ro,(function(){return t.onPlaying()})),r=Object.keys(e);r.forEach((function(r){return t.player.on(r,e[r])})),this.one("dispose",(function(){r.forEach((function(r){return t.player.off(r,e[r])}))}))}},{key:"startInterval",value:function(){var t=this,e=this.options.interval||5e3;this.interval=window.setInterval((function(){return t.flushBuffer()}),e),this.player.one("dispose",(function(){return window.clearInterval(t.interval)}))}},{key:"addEasterEgg",value:function(){var t,e,r=this,n="",o=function(e){"ArrowUpArrowUpArrowDownArrowDownArrowLeftArrowRightArrowLeftArrowRightba"===(n+=e.key)&&r.addDisplay(),window.clearTimeout(t),t=window.setTimeout((function(){n=""}),500)},i=!1,a=function(){i=!0,e=window.setTimeout((function(){i&&r.addDisplay()}),1e4)};function u(){i=!1,window.clearTimeout(e)}this.player.el().addEventListener("keyup",o);var c=this.player.getChild("Collapserator").getChild("PlayToggle");c.on("touchstart",a),c.on("touchend",u),this.player.one("dispose",(function(){var t,e;null===(e=null===(t=r.player)||void 0===t?void 0:t.el())||void 0===e||e.removeEventListener("keyup",o),c.off("touchstart",a),c.off("touchend",u)}))}},{key:"addDisplay",value:function(){var t=this;this.progressReporterDisplay||(this.progressReporterDisplay=new Hn(this.player),this.player.addChild(this.progressReporterDisplay),this.player.options_.inactivityTimeout=0,this.player.one("dispose",(function(){t.progressReporterDisplay=void 0})))}},{key:"onPlay",value:function(){return this.isPlaying=!0,this.isSeeking?(this.logEvent("seekend"),void(this.isSeeking=!1)):this.hasEnded?(this.shouldLogPlayOnTimeUpdate=!0,void(this.hasEnded=!1)):void this.logEvent(eo)}},{key:"onPause",value:function(){var t=this;this.isSeeking||(this.pauseTimeout=window.setTimeout((function(){t.isPlaying=!1,t.logEvent(no),delete t.pauseTimeout}),50))}},{key:"onTimeUpdate",value:function(){this.shouldLogPlayOnTimeUpdate&&(this.shouldLogPlayOnTimeUpdate=!1,this.logEvent(eo)),this.isPlaying&&!this.isSeeking&&this.logEvent(ro)}},{key:"onSeeking",value:function(){this.pauseTimeout&&(this.latestTime=this.previousLatestTime,window.clearTimeout(this.pauseTimeout),delete this.pauseTimeout),this.isPlaying||this.logEvent(ao),!this.isSeeking&&this.isPlaying&&(this.isSeeking=!0,this.logEvent(oo))}},{key:"onEnded",value:function(){this.hasEnded=!0,this.logEvent(io)}},{key:"onPlaying",value:function(){this.isSeeking=!1,this.isPlaying=!0}},{key:"logEvent",value:function(t){if(this.player){var e=this.player.currentTime();t===oo&&(e=this.latestTime),this.previousLatestTime=this.latestTime,this.latestTime=this.player.currentTime(),this.eventBuffer.push({time:e,type:t})}}},{key:"shouldUseCarriedOverTime",value:function(t){return this.lastPlayingTime&&(t===ro||t===eo)}},{key:"shouldSaveCarriedOverTime",value:function(t){return t===ro||t===no}},{key:"shouldClearCarriedOverTime",value:function(t){return t===io||t===ao}},{key:"flushBuffer",value:function(){for(var t,e,r=[],n={};this.eventBuffer.length;){var o=this.eventBuffer.shift();this.shouldClearCarriedOverTime(o.type)?delete this.lastPlayingTime:n.start?o.type===ro&&this.eventBuffer.length>0||(this.shouldSaveCarriedOverTime(o.type)&&(this.lastPlayingTime=o.time),n.end=o,r.push(n),n={}):(this.shouldUseCarriedOverTime(o.type)&&(o.time=this.lastPlayingTime,delete this.lastPlayingTime),n.start=o)}this.eventBuffer=[],r.length&&this.validateEvents(r)&&(this.options.onFlush(r),null===(t=this.player)||void 0===t||t.trigger("progressflush"),null===(e=this.progressReporterDisplay)||void 0===e||e.addEvents(r))}},{key:"validateEvents",value:function(t){var e=0;t.forEach((function(t){e+=t.end.time-t.start.time}));var r=this.options.interval||5e3;return r/=1e3,r+=.5,r*=this.player.playbackRate(),e<r}}],n&&Yn(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(to);function co(t){return co="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},co(t)}function lo(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,so(n.key),n)}}function so(t){var e=function(t){if("object"!=co(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=co(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==co(e)?e:e+""}function fo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(fo=function(){return!!t})()}function po(t){return po=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},po(t)}function yo(t,e){return yo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},yo(t,e)}n.Z.registerPlugin("progressReporterPlugin",uo);var ho=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=po(e),function(t,e){if(e&&("object"==co(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,fo()?Reflect.construct(e,r||[],po(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&yo(t,e)}(e,t),r=e,(o=[{key:"createEl",value:function(){return n.Z.dom.createEl("span",{innerHTML:'<span class="vjs-icon-placeholder"></span>',className:"cv-drag-handle vjs-control vjs-button"},{})}}])&&lo(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n.Z.getComponent("Component")),vo=["top","left","right","bottom"],bo={top:"Top",left:"Left",right:"Right",bottom:"Bottom"};function mo(t){return mo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mo(t)}function go(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wo(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Po(n.key),n)}}function Oo(t,e,r){return e&&wo(t.prototype,e),r&&wo(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Po(t){var e=function(t){if("object"!=mo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=mo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==mo(e)?e:e+""}function jo(t,e,r){return e=ko(e),function(t,e){if(e&&("object"==mo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,So()?Reflect.construct(e,r||[],ko(t).constructor):e.apply(t,r))}function So(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(So=function(){return!!t})()}function _o(){return _o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ko(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},_o.apply(null,arguments)}function ko(t){return ko=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ko(t)}function Co(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Eo(t,e)}function Eo(t,e){return Eo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Eo(t,e)}var To=n.Z.getComponent("Component"),xo=function(t){function e(t,r){var n;return go(this,e),(n=jo(this,e,[t,r])).bindEventListeners(),n}return Co(e,t),Oo(e,[{key:"createEl",value:function(){return(t=e,r=this,"function"==typeof(n=_o(ko(1&3?t.prototype:t),"createEl",r))?function(t){return n.apply(r,t)}:n)(["div",{},{class:"cv-drop-target cv-drop-".concat(this.options_.side)}]);var t,r,n}},{key:"bindEventListeners",value:function(){var t=this,e=this.el(),r=function(e){e.preventDefault(),e.dataTransfer.dropEffect="move",t.addClass("cv-drag-over")},n=function(e){e.preventDefault(),t.removeClass("cv-drag-over"),t.player_.whiteboardModePlugin().setWhiteboardMode(t.options_.side)},o=function(){t.removeClass("cv-drag-over")};e.addEventListener("dragover",r),e.addEventListener("drop",n),e.addEventListener("dragleave",o),this.on("dispose",(function(){e.removeEventListener("dragover",r),e.removeEventListener("drop",n),e.removeEventListener("dragleave",o)}))}}])}(To),Lo=function(t){function e(t,r){var n;return go(this,e),(n=jo(this,e,[t,r])).addChildren(),n}return Co(e,t),Oo(e,[{key:"addChildren",value:function(){var t=this;vo.forEach((function(e){t.addChild(new xo(t.player_,{side:e}))}))}}])}(To);function Ro(t){return Ro="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ro(t)}function Bo(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Io(n.key),n)}}function Io(t){var e=function(t){if("object"!=Ro(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ro(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ro(e)?e:e+""}function Do(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Do=function(){return!!t})()}function Mo(t){return Mo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Mo(t)}function Ao(t,e){return Ao=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ao(t,e)}var No=function(t){function e(t,r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=Mo(e),function(t,e){if(e&&("object"==Ro(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Do()?Reflect.construct(e,r||[],Mo(t).constructor):e.apply(t,r))}(this,e,[t,r])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ao(t,e)}(e,t),r=e,(n=[{key:"handleClick",value:function(){this.player_.whiteboardModePlugin().setWhiteboardMode(this.options_.side)}}])&&Bo(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getComponent("MenuItem"));function Fo(t){return Fo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fo(t)}function Zo(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,zo(n.key),n)}}function zo(t){var e=function(t){if("object"!=Fo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Fo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Fo(e)?e:e+""}function Vo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Vo=function(){return!!t})()}function Uo(){return Uo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Go(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Uo.apply(null,arguments)}function Go(t){return Go=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Go(t)}function qo(t,e){return qo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},qo(t,e)}var Ho=n.Z.getComponent("MenuButton"),Wo=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,r){return e=Go(e),function(t,e){if(e&&("object"==Fo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Vo()?Reflect.construct(e,r||[],Go(t).constructor):e.apply(t,r))}(this,e,arguments)).alwaysCollapsed=!0,t.isCollapsed=!1,t.isCollabsible=!0,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qo(t,e)}(e,t),r=e,n=[{key:"createItems",value:function(){var t=this,e=this.player_.whiteboardModePlugin().side,r=[new m.Z(this.player_,{label:"Video Controls"})];return vo.forEach((function(n){r.push(new No(t.player_,{side:n,label:bo[n],selectable:!0,multiSelectable:!1,selected:n===e}))})),r}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((t=e,r=this,"function"==typeof(n=Uo(Go(1&3?t.prototype:t),"buildWrapperCSSClass",r))?function(t){return n.apply(r,t)}:n)([]));var t,r,n}},{key:"getCollabsibleName",value:function(){return"Video Controls"}},{key:"getCollabsibleValue",value:function(){var t=this.player_.whiteboardModePlugin().side;return bo[t]}},{key:"showInCollabsibleMenu",value:function(){return this.player_.isFullscreen()}},{key:"showCollapsibleMenu",value:function(){Ho.prototype.handleClick.apply(this)}}],n&&Zo(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Ho);function Qo(t){return Qo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qo(t)}function Yo(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ko(n.key),n)}}function Ko(t){var e=function(t){if("object"!=Qo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Qo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Qo(e)?e:e+""}function $o(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return($o=function(){return!!t})()}function Xo(t){return Xo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Xo(t)}function Jo(t,e){return Jo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Jo(t,e)}var ti="cv-whiteboard-side",ei=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,r){return e=Xo(e),function(t,e){if(e&&("object"==Qo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,$o()?Reflect.construct(e,r||[],Xo(t).constructor):e.apply(t,r))}(this,e,[t])).side="bottom",r.player.ready((function(){r.initialize()})),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Jo(t,e)}(e,t),r=e,o=[{key:"initialize",value:function(){if(!this.player.options_.mobile){if(re.S.hasLocalStorage()){var t=re.S.get(ti);t&&(this.side=t)}this.initCollapserator(),this.initDragTargets(),this.initFullscreenListener()}}},{key:"initCollapserator",value:function(){var t=this,e=this.player.getChild("collapserator"),r=new ho(this.player);this.button=new Wo(this.player),e.addChild(r),e.addChild(this.button),this.player.trigger("cv-updatecog");var n=function(){t.player.isFullscreen()&&e.el().setAttribute("draggable","true")},o=function(){t.player.isFullscreen()&&e.el().setAttribute("draggable","false")},i=function(e){t.player.isFullscreen()&&(t.player.addClass("cv-dragging"),e.dataTransfer.setData("text/plain","handle"))},a=function(){t.player.isFullscreen()&&(t.player.removeClass("cv-dragging"),e.el().setAttribute("draggable","false"))};r.el().addEventListener("mousedown",n),r.el().addEventListener("mouseup",o),e.el().addEventListener("dragstart",i),e.el().addEventListener("dragend",a),this.on("dispose",(function(){r.el().removeEventListener("mousedown",n),r.el().removeEventListener("mouseup",o),e.el().removeEventListener("dragstart",i),e.el().removeEventListener("dragend",a)}))}},{key:"initDragTargets",value:function(){this.player.addChild(new Lo(this.player))}},{key:"initFullscreenListener",value:function(){var t=this;this.update=this.update.bind(this),this.player.on("fullscreenchange",this.update),this.one("dispose",(function(){t.player.off("fullscreenchange",t.update)}))}},{key:"setWhiteboardMode",value:function(t){this.side=t,this.button.update(),re.S.hasLocalStorage()&&re.S.set(ti,t),this.player.trigger("cv-whiteboard-change"),this.update()}},{key:"update",value:function(){this.player.removeClass("cv-whiteboard-top"),this.player.removeClass("cv-whiteboard-left"),this.player.removeClass("cv-whiteboard-right"),n.Z.dom.removeClass(window.document.documentElement,"cv-whiteboard-html-font-size"),this.player.trigger("resizemenus"),this.player.trigger("cv-updatecog"),this.player.isFullscreen()&&"bottom"!==this.side&&(this.player.addClass("cv-whiteboard-".concat(this.side)),n.Z.dom.addClass(window.document.documentElement,"cv-whiteboard-html-font-size"))}}],o&&Yo(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n.Z.getPlugin("plugin"));function ri(t){return ri="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ri(t)}function ni(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,oi(n.key),n)}}function oi(t){var e=function(t){if("object"!=ri(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ri(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ri(e)?e:e+""}function ii(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ii=function(){return!!t})()}function ai(t){return ai=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ai(t)}function ui(t,e){return ui=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ui(t,e)}n.Z.registerPlugin("whiteboardModePlugin",ei);var ci=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=ai(e),function(t,e){if(e&&("object"==ri(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ii()?Reflect.construct(e,r||[],ai(t).constructor):e.apply(t,r))}(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ui(t,e)}(e,t),r=e,(n=[{key:"deferMenu",value:function(){var t={subtitles:this.buildSubtitles(),qualities:this.buildQualities(),playbackSpeeds:this.buildPlaybackSpeeds()};this.player.trigger("cv-defer-menus",t)}},{key:"buildSubtitles",value:function(){for(var t=[],e=!1,r=this.player.textTracks(),n=0;n<r.length;n++){var o=r[n],i="showing"===o.mode;t.unshift({id:o.label,name:o.label,selected:i}),i&&(e=!0)}return t.push({id:null,name:"Off",selected:!e}),t}},{key:"buildQualities",value:function(){for(var t=[],e=this.player.qualityLevels(),r=0;r<e.length;r++){var n=e[r];t.push({id:n.id,name:n.id+"p",selected:n.enabled})}return t}},{key:"buildPlaybackSpeeds",value:function(){var t=this.player.playbackRate();return this.player.options_.playbackRates.map((function(e){return{id:e,name:e+"x"+(1===e?" (Normal)":""),selected:t===e}}))}}])&&ni(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getPlugin("plugin"));function li(t){return li="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},li(t)}function si(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,fi(n.key),n)}}function fi(t){var e=function(t){if("object"!=li(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=li(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==li(e)?e:e+""}function pi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(pi=function(){return!!t})()}function yi(t){return yi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},yi(t)}function hi(t,e){return hi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},hi(t,e)}n.Z.registerPlugin("deferMenusPlugin",ci),r(51976);var vi=n.Z.getComponent("Button"),di="cv-muted",bi=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,r){return e=yi(e),function(t,e){if(e&&("object"==li(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,pi()?Reflect.construct(e,r||[],yi(t).constructor):e.apply(t,r))}(this,e,[t])).update(),r.update=r.update.bind(r),t.on("volumechange",r.update),t.on("dispose",(function(){return t.off("volumechange",r.update)})),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&hi(t,e)}(e,t),r=e,(n=[{key:"handleClick",value:function(){this.player_.muted(!this.player_.muted()),this.update()}},{key:"update",value:function(){this.player_.muted()?this.addClass(di):this.removeClass(di)}},{key:"buildCSSClass",value:function(){return"cv-mute-button cv-muted"}}])&&si(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(vi);function mi(t){return mi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mi(t)}function gi(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,wi(n.key),n)}}function wi(t){var e=function(t){if("object"!=mi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=mi(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==mi(e)?e:e+""}function Oi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Oi=function(){return!!t})()}function Pi(){return Pi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ji(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Pi.apply(null,arguments)}function ji(t){return ji=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ji(t)}function Si(t,e){return Si=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Si(t,e)}n.Z.registerComponent("muteButton",bi),bi.prototype.controlText_="Mute";var _i,ki=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=ji(e),function(t,e){if(e&&("object"==mi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Oi()?Reflect.construct(e,r||[],ji(t).constructor):e.apply(t,r))}(this,e,[t,r]))._onClickHandler=r.onClickHandler,n.bindEventListeners(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Si(t,e)}(e,t),r=e,o=[{key:"createEl",value:function(){return n.Z.dom.createEl("div",{className:"cv-player-overlay"})}},{key:"handleClick",value:function(t){"function"==typeof this._onClickHandler&&(t.stopImmediatePropagation(),this._onClickHandler())}},{key:"dispose",value:function(){var t,r,n;this.off("click",this.handleClick),(t=e,r=this,"function"==typeof(n=Pi(ji(1&3?t.prototype:t),"dispose",r))?function(t){return n.apply(r,t)}:n)([])}},{key:"bindEventListeners",value:function(){this.on("click",this.handleClick)}}],o&&gi(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n.Z.getComponent("Component"));function Ci(t){return Ci="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ci(t)}function Ei(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ti(n.key),n)}}function Ti(t){var e=function(t){if("object"!=Ci(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ci(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ci(e)?e:e+""}function xi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(xi=function(){return!!t})()}function Li(t){return Li=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Li(t)}function Ri(t,e){return Ri=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ri(t,e)}n.Z.registerComponent("playerOverlay",ki),function(t){t.Default="play",t.Hover="hover"}(_i||(_i={}));var Bi=n.Z.getPlugin("plugin"),Ii="cv-preview-mode",Di=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,r){return e=Li(e),function(t,e){if(e&&("object"==Ci(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,xi()?Reflect.construct(e,r||[],Li(t).constructor):e.apply(t,r))}(this,e,[t])).buttonAdded=!1,r.mode=null,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ri(t,e)}(e,t),r=e,(n=[{key:"getMode",value:function(){return this.mode}},{key:"setPlayerMode",value:function(t,e){var r=this.mode;if(this.mode=t,t===_i.Hover)return this.buttonAdded||this.addButtons(e),this.player.addClass(Ii),this.enableSubtites(),this.mute(),this.removeActivityTimeout(),void this.player.trigger("resize");r===_i.Hover&&(this.player.removeClass(Ii),this.disableSubtitles(),this.unmute(),this.restoreActivityTimeout(),this.player.trigger("resize"))}},{key:"addButtons",value:function(t){var e=new bi(this.player),r=new ki(this.player,{onClickHandler:t});this.player.addChild(e),this.player.addChild(r),this.buttonAdded=!0}},{key:"enableSubtites",value:function(){var t=this;this.player.dataLoaded((function(){return t.player.persistSubtitleSettingsPlugin().previewModeSubtitles()}))}},{key:"disableSubtitles",value:function(){var t=this;this.player.dataLoaded((function(){return t.player.persistSubtitleSettingsPlugin().applyUserPreferences()}))}},{key:"mute",value:function(){var t=this;this.player.ready((function(){t.player.persistVolumePlugin().disable(),t.player.muted(!0)}))}},{key:"unmute",value:function(){var t=this;this.player.ready((function(){t.player.persistVolumePlugin().applyUserPreferences(),t.player.persistVolumePlugin().enable()}))}},{key:"removeActivityTimeout",value:function(){this.player.cache_.inactivityTimeout=this.player.options_.inactivityTimeout,this.player.options_.inactivityTimeout=0}},{key:"restoreActivityTimeout",value:function(){this.player.options_.inactivityTimeout=this.player.cache_.inactivityTimeout}}])&&Ei(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Bi);function Mi(t){return Mi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mi(t)}function Ai(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ni(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Zi(n.key),n)}}function Fi(t,e,r){return e&&Ni(t.prototype,e),r&&Ni(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Zi(t){var e=function(t){if("object"!=Mi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Mi(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Mi(e)?e:e+""}function zi(t,e,r){return e=Ui(e),function(t,e){if(e&&("object"==Mi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Vi()?Reflect.construct(e,r||[],Ui(t).constructor):e.apply(t,r))}function Vi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Vi=function(){return!!t})()}function Ui(t){return Ui=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ui(t)}function Gi(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qi(t,e)}function qi(t,e){return qi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},qi(t,e)}n.Z.registerPlugin("playerModePlugin",Di);var Hi=n.Z.getComponent("Component"),Wi=n.Z.getComponent("ClickableComponent"),Qi=function(t){function e(){return Ai(this,e),zi(this,e,arguments)}return Gi(e,t),Fi(e,[{key:"createEl",value:function(){return Hi.prototype.createEl.call(this,"span",{className:"cv-favourite-button-svg",innerHTML:"<span class='cv-favourite-heart'>".concat('\n <svg version="1.1" viewBox="0 0 24 24">\n <path id="Heart-Filled" d="m18.833 5.9735c-0.78916-0.95022-1.8839-1.4735-3.0826-1.4735-1.6859 0-2.7532 1.0685-3.3517 1.9648-0.15528 0.2326-0.28738 0.46582-0.39828 0.68529-0.11091-0.21946-0.24297-0.45269-0.39828-0.68529-0.5985-0.89636-1.6658-1.9648-3.3517-1.9648-1.1987 0-2.2935 0.52333-3.0827 1.4735-0.75275 0.90644-1.1673 2.1204-1.1673 3.4183 0 1.4128 0.51978 2.7268 1.6358 4.1353 0.99741 1.2588 2.4323 2.5564 4.0939 4.0589 0.61916 0.5599 1.2594 1.1389 1.9411 1.7718l0.02047 0.01903c0.08837 0.08211 0.19856 0.12313 0.30875 0.12313s0.22038-0.04105 0.30875-0.12313l0.02047-0.01903c0.68166-0.63289 1.3219-1.2119 1.9412-1.7719 1.6615-1.5024 3.0964-2.8 4.0938-4.0588 1.116-1.4085 1.6358-2.7225 1.6358-4.1353 0-1.2979-0.41459-2.5119-1.1674-3.4183z"/>\n </svg>\n',"</span><span class='cv-favourite-outline'>").concat('\n <svg version="1.1" viewBox="0 0 24 24">\n <path id="Shape" d="m18.959 5.9741c-0.76992-0.92705-1.9357-1.5351-3.1052-1.5351-1.6448 0-2.8808 0.74937-3.4647 1.6238-0.15149 0.22693-0.28074 0.55125-0.38894 0.76537-0.10821-0.21411-0.23718-0.53844-0.38871-0.76537-0.58391-0.87451-1.8205-1.6238-3.4653-1.6238-1.1695 0-2.2376 0.60808-3.0075 1.5351-0.7344 0.88434-1.1388 1.9712-1.1388 3.2374 0 1.3784 0.50711 3.0509 1.5959 4.4251 0.97309 1.2281 2.373 2.4941 3.9941 3.9599 0.60406 0.54625 1.2285 1.1104 1.8936 1.7278l0.01997 0.01934c0.08622 0.08011 0.38931 0.21727 0.49681 0.21727 0.1075 0 0.40992-0.13796 0.49614-0.21804l0.0201-0.0178c0.66504-0.61746 1.2897-1.1824 1.8939-1.7287 1.621-1.4658 3.0209-2.7317 3.994-3.9598 1.0888-1.3742 1.5955-3.0467 1.5955-4.4251 0-1.2663-0.30646-2.3531-1.0409-3.2374zm-5.337 10.688c-0.51948 0.47226-1.0567 0.95549-1.6218 1.4768-0.56507-0.52124-1.101-1.0059-1.6219-1.4769-3.1725-2.8689-5.2684-4.7641-5.2684-7.2556 0-1.0298 0.32333-1.9863 0.91044-2.6933 0.59385-0.71497 1.4183-1.1088 2.3213-1.1088 1.254 0 2.0645 0.81976 2.5237 1.5074 0.41187 0.61679 0.62678 1.2385 0.70006 1.4772 0.06131 0.19978 0.23683 0.33499 0.43482 0.33499s0.37351-0.1352 0.43482-0.33499c0.07329-0.23867 0.28821-0.86044 0.70006-1.4773 0.45914-0.68766 1.2698-1.5074 2.5237-1.5074 0.90309 0 1.7274 0.39377 2.3213 1.1088 0.58714 0.70695 0.91047 1.6634 0.91047 2.6933 0 2.4914-2.1035 4.3783-5.2685 7.2557z" stroke-width=".97562"/>\n </svg>\n',"</span>")})}}])}(Hi),Yi=function(t){function e(t,r){var n;return Ai(this,e),(n=zi(this,e,[t,r])).isFavourited=r.isFavourited,n.renderIcon(),n.update(),n}return Gi(e,t),Fi(e,[{key:"renderIcon",value:function(){this.icon&&this.removeChild(this.icon),this.icon=new Qi(this.player_),this.addChild(this.icon)}},{key:"update",value:function(){this.isFavourited?this.addClass("cv-favourited"):this.removeClass("cv-favourited")}},{key:"createEl",value:function(t,e,r){e=Object.assign({innerHTML:"",className:"cv-favourite-button"},e),r=Object.assign({type:"button"},r);var n=Hi.prototype.createEl.call(this,"button",e,r);return this.createControlTextEl(n),n}},{key:"handleClick",value:function(){this.isFavourited=!this.isFavourited,this.update(),this.options_.clickHandler&&this.options_.clickHandler(this.isFavourited)}}])}(Wi);function Ki(t){return Ki="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ki(t)}function $i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Xi(n.key),n)}}function Xi(t){var e=function(t){if("object"!=Ki(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ki(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ki(e)?e:e+""}function Ji(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ji=function(){return!!t})()}function ta(t){return ta=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ta(t)}function ea(t,e){return ea=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ea(t,e)}Yi.prototype.controlText_="Favourite";var ra=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=ta(e),function(t,e){if(e&&("object"==Ki(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ji()?Reflect.construct(e,r||[],ta(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ea(t,e)}(e,t),r=e,(n=[{key:"setFavourite",value:function(t,e){if(!this.initialized){var r=new Yi(this.player,{isFavourited:t,clickHandler:e});this.player.addChild(r),this.initialized=!0}}}])&&$i(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getPlugin("plugin"));n.Z.registerPlugin("favouritePlugin",ra);var na=r(86777);function oa(t){return oa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oa(t)}function ia(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,aa(n.key),n)}}function aa(t){var e=function(t){if("object"!=oa(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=oa(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==oa(e)?e:e+""}function ua(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ua=function(){return!!t})()}function ca(t,e,r,n){var o=la(sa(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function la(){return la="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=sa(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},la.apply(null,arguments)}function sa(t){return sa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},sa(t)}function fa(t,e){return fa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},fa(t,e)}var pa=n.Z.getComponent("Menu"),ya=pa.prototype,ha=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=sa(e),function(t,e){if(e&&("object"==oa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ua()?Reflect.construct(e,r||[],sa(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&fa(t,e)}(e,t),r=e,(n=[{key:"createEl",value:function(){var t=ca(e,"createEl",this,3)([]);return this.simpleBar=new na.Z(this.contentEl(),{autoHide:!1}),t}},{key:"contentEl",value:function(){return this.simpleBar?this.simpleBar.getContentElement():ca(e,"contentEl",this,3)([])}},{key:"dispose",value:function(){this.simpleBar&&(this.simpleBar.unMount(),delete this.simpleBar),ca(e,"dispose",this,3)([])}},{key:"addItem",value:function(t){ca(e,"addItem",this,3)([t]),this.simpleBar.recalculate()}},{key:"lockShowing",value:function(){ca(e,"lockShowing",this,3)([]),this.simpleBar.recalculate()}},{key:"recalculateScrollBar",value:function(){this.simpleBar.recalculate()}},{key:"handleBlur",value:function(t){var e=t.relatedTarget||document.activeElement;this.el().contains(e)||ya.handleBlur.call(this,t)}}])&&ia(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(pa);function va(t){return va="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},va(t)}function da(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ba(n.key),n)}}function ba(t){var e=function(t){if("object"!=va(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=va(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==va(e)?e:e+""}function ma(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ma=function(){return!!t})()}function ga(t){return ga=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ga(t)}function wa(t,e){return wa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},wa(t,e)}ha.originalProto=ya,pa.prototype=ha.prototype,n.Z.registerComponent("Menu",ha);var Oa=n.Z.getComponent("Component"),Pa=n.Z.getComponent("MenuButton"),ja=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=ga(e),function(t,e){if(e&&("object"==va(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ma()?Reflect.construct(e,r||[],ga(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&wa(t,e)}(e,t),r=e,(o=[{key:"createMenu",value:function(){var t,e=new ha(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var r=n.Z.dom.createEl("li",{className:"vjs-menu-title",innerHTML:(t=this.options_.title,"string"!=typeof t?t:t.replace(/./,(function(t){return t.toUpperCase()}))),tabIndex:-1});this.hideThreshold_+=1;var o=new Oa(this.player_,{el:r});e.addItem(o)}if(this.items=this.createItems(),this.items)for(var i=0;i<this.items.length;i++)e.addItem(this.items[i]);return e}}])&&da(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(Pa),Sa=Pa.prototype.pressButton;Pa.prototype.pressButton=function(){Sa.call(this),this.inactivityTimeout=this.player_.cache_.inactivityTimeout,this.player_.cache_.inactivityTimeout=0,this.player_.options_.inactivityTimeout=0};var _a=Pa.prototype.unpressButton;function ka(t){return ka="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ka(t)}function Ca(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ea(n.key),n)}}function Ea(t){var e=function(t){if("object"!=ka(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ka(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ka(e)?e:e+""}function Ta(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ta=function(){return!!t})()}function xa(t,e,r,n){var o=La(Ra(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function La(){return La="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ra(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},La.apply(null,arguments)}function Ra(t){return Ra=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ra(t)}function Ba(t,e){return Ba=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ba(t,e)}Pa.prototype.unpressButton=function(){_a.call(this),this.player_.cache_.inactivityTimeout=this.inactivityTimeout,this.player_.options_.inactivityTimeout=this.inactivityTimeout,this.player_.reportUserActivity()},n.Z.registerComponent("MenuButton",ja);var Ia=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=Ra(e),function(t,e){if(e&&("object"==ka(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ta()?Reflect.construct(e,r||[],Ra(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ba(t,e)}(e,t),r=e,(n=[{key:"buildCSSClass",value:function(){return"cv-time-wrapper ".concat(xa(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return xa(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass()}),n])}}])&&Ca(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getComponent("Component"));function Da(t){return Da="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Da(t)}function Ma(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Aa(n.key),n)}}function Aa(t){var e=function(t){if("object"!=Da(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Da(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Da(e)?e:e+""}function Na(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Na=function(){return!!t})()}function Fa(t){return Fa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Fa(t)}function Za(t,e){return Za=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Za(t,e)}Ia.prototype.options_={children:["currentTimeDisplay","remainingTimeDisplay"]},n.Z.registerComponent("TimeWrapper",Ia);var za=n.Z.getComponent("SeekBar"),Va=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=Fa(e),function(t,e){if(e&&("object"==Da(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Na()?Reflect.construct(e,r||[],Fa(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Za(t,e)}(e,t),r=e,(n=[{key:"handleMouseDown",value:function(t){var e=this.player_.preventScrubbingPlugin();e.isEnabled&&this.getMouseTime(t)>e.furthestVisitedTime||(za.prototype.handleMouseDown.call(this,t),this.player_.addClass("cv-disable-play-pause-feedback"))}},{key:"handleMouseMove",value:function(t){za.prototype.handleMouseMove.call(this,t),this.update()}},{key:"getPercent",value:function(){var t=this.player_.currentTime()/this.player_.duration();return t>=1?1:t}},{key:"handleMouseUp",value:function(t){var e=this;za.prototype.handleMouseUp.call(this,t),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){e.player_.removeClass("cv-disable-play-pause-feedback")}),500)}},{key:"clamp",value:function(t,e,r){return Math.min(Math.max(t,e),r)}},{key:"getMouseTime",value:function(t){return this.clamp(za.prototype.calculateDistance.call(this,t).x,0,1)*this.player_.duration()}}])&&Ma(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(za);function Ua(t){return Ua="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ua(t)}function Ga(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,qa(n.key),n)}}function qa(t){var e=function(t){if("object"!=Ua(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ua(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ua(e)?e:e+""}function Ha(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ha=function(){return!!t})()}function Wa(t,e,r,n){var o=Qa(Ya(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function Qa(){return Qa="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ya(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Qa.apply(null,arguments)}function Ya(t){return Ya=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ya(t)}function Ka(t,e){return Ka=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ka(t,e)}n.Z.registerComponent("SeekBar",Va);var $a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=Ya(e),function(t,e){if(e&&("object"==Ua(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ha()?Reflect.construct(e,r||[],Ya(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ka(t,e)}(e,t),r=e,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-load-progress ".concat(Wa(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return Wa(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass()}),n])}},{key:"update",value:function(t){this.el_.style.width=100*t+"%"}}])&&Ga(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getComponent("Component"));function Xa(t){return Xa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xa(t)}function Ja(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,tu(n.key),n)}}function tu(t){var e=function(t){if("object"!=Xa(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Xa(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Xa(e)?e:e+""}function eu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(eu=function(){return!!t})()}function ru(t,e,r,n){var o=nu(ou(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function nu(){return nu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ou(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},nu.apply(null,arguments)}function ou(t){return ou=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ou(t)}function iu(t,e){return iu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},iu(t,e)}var au=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=ou(e),function(t,e){if(e&&("object"==Xa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,eu()?Reflect.construct(e,r||[],ou(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&iu(t,e)}(e,t),r=e,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-play-progress ".concat(ru(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return ru(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass()}),n])}},{key:"update",value:function(t){t>0&&t<1?this.addClass("cv-current"):this.removeClass("cv-current"),this.el_.style.width=100*t+"%"}}])&&Ja(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getComponent("Component"));function uu(t){return uu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uu(t)}function cu(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,lu(n.key),n)}}function lu(t){var e=function(t){if("object"!=uu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=uu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==uu(e)?e:e+""}function su(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(su=function(){return!!t})()}function fu(t,e,r,n){var o=pu(yu(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function pu(){return pu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=yu(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},pu.apply(null,arguments)}function yu(t){return yu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},yu(t)}function hu(t,e){return hu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},hu(t,e)}var vu=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=yu(e),function(t,e){if(e&&("object"==uu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,su()?Reflect.construct(e,r||[],yu(t).constructor):e.apply(t,r))}(this,e,[t,r])).playProgress=new au(n.player_),n.addChild(n.playProgress),n.loadProgress=new $a(n.player_),n.addChild(n.loadProgress),n.update(),n.updateBuffered(0),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&hu(t,e)}(e,t),r=e,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-item ".concat(fu(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return fu(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass()}),n])}},{key:"getCurrentTime",value:function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}},{key:"update",value:function(){var t=this.player_.duration()||3600,e=this.options_.endTime-this.options_.startTime;if(t!==this.duration_){var r=e/t;this.el_.style.width=100*r+"%";var n=this.options_.startTime/t;this.el_.style.left=100*n+"%",this.duration_=t}var o=this.getCurrentTime();o<this.options_.startTime?this.playProgress.update(0):o>this.options_.endTime?this.playProgress.update(1):this.playProgress.update((o-this.options_.startTime)/e)}},{key:"updateBuffered",value:function(t){var e=this.options_.endTime-this.options_.startTime;t<this.options_.startTime?this.loadProgress.update(0):t>this.options_.endTime?this.loadProgress.update(1):this.loadProgress.update((t-this.options_.startTime)/e)}}])&&cu(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getComponent("Component")),du=r(39232);function bu(t){return bu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bu(t)}function mu(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,gu(n.key),n)}}function gu(t){var e=function(t){if("object"!=bu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=bu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==bu(e)?e:e+""}function wu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(wu=function(){return!!t})()}function Ou(t,e,r,n){var o=Pu(ju(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function Pu(){return Pu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ju(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Pu.apply(null,arguments)}function ju(t){return ju=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ju(t)}function Su(t,e){return Su=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Su(t,e)}var _u=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=ju(e),function(t,e){if(e&&("object"==bu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,wu()?Reflect.construct(e,r||[],ju(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Su(t,e)}(e,t),r=e,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-items ".concat(Ou(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return Ou(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass()}),n])}},{key:"update",value:function(){this.children_.forEach((function(t){t.update()}))}},{key:"updateBuffered",value:function(){var t=this;this.children_.forEach((function(e){e.updateBuffered((0,du.b)(t.player_))}))}}])&&mu(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getComponent("Component"));function ku(t){return ku="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ku(t)}function Cu(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Eu(n.key),n)}}function Eu(t){var e=function(t){if("object"!=ku(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ku(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ku(e)?e:e+""}function Tu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Tu=function(){return!!t})()}function xu(t,e,r,n){var o=Lu(Ru(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function Lu(){return Lu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ru(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Lu.apply(null,arguments)}function Ru(t){return Ru=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ru(t)}function Bu(t,e){return Bu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Bu(t,e)}var Iu=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Ru(e),function(t,e){if(e&&("object"==ku(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Tu()?Reflect.construct(e,r||[],Ru(t).constructor):e.apply(t,r))}(this,e,[t,r])).onDurationChange=n.onDurationChange.bind(n),n.createChapterItems=n.createChapterItems.bind(n),n.updateBuffered=n.updateBuffered.bind(n),D.O.useTrack(n.player_,"chapters",null,n.createChapterItems),n.player_.on("durationchange",n.onDurationChange),n.player_.on("progress",n.updateBuffered),n.createChapterItems(),n.update(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Bu(t,e)}(e,t),r=e,(o=[{key:"dispose",value:function(){this.player_.off("durationchange",this.onDurationChange),this.player_.off("progress",this.updateBuffered),xu(e,"dispose",this,3)([])}},{key:"createEl",value:function(){return n.Z.dom.createEl("div",{className:"vjs-progress-holder cv-chapter-seek-bar"},{"aria-label":this.localize("Progress Bar"),role:"progressbar"})}},{key:"onDurationChange",value:function(){this.createChapterItems(),this.update()}},{key:"update",value:function(){var t=xu(e,"update",this,3)([]);return this.chapterBarItems&&this.chapterBarItems.update(),t}},{key:"updateBuffered",value:function(){this.chapterBarItems.updateBuffered()}},{key:"bindUpdateListener",value:function(t){var e=this,r=function(){e.createChapterItems(),e.updateBuffered()};t.addEventListener("cv:cuechange",r),this.player_.one("dispose",(function(){return t.removeEventListener("cv:cuechange",r)}))}},{key:"createChapterItems",value:function(t){var e,r;t&&(this.track_||this.bindUpdateListener(t),this.track_=t);var n=new _u(this.player_);if((null===(r=null===(e=this.track_)||void 0===e?void 0:e.cues)||void 0===r?void 0:r.length)&&!this.options_.ignoreChapters)for(var o=0;o<this.track_.cues.length;o++){var i=this.track_.cues[o],a=i.startTime,u=i.endTime,c=this.player_.duration();c&&(o===this.track_.cues.length-1&&i.endTime<this.player_.duration()&&(u=this.player_.duration()),u>c&&(u=c));var l=new vu(this.player_,{startTime:a,endTime:u});if(n.addChild(l),c&&u===c)break}else n.addChild(new vu(this.player_,{startTime:0,endTime:this.player_.duration()||3600}));this.chapterBarItems&&this.removeChild(this.chapterBarItems),this.chapterBarItems=n,this.addChild(this.chapterBarItems)}}])&&Cu(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n.Z.getComponent("SeekBar"));function Du(t){return Du="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Du(t)}function Mu(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Au(n.key),n)}}function Au(t){var e=function(t){if("object"!=Du(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Du(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Du(e)?e:e+""}function Nu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Nu=function(){return!!t})()}function Fu(){return Fu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Zu(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Fu.apply(null,arguments)}function Zu(t){return Zu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Zu(t)}function zu(t,e){return zu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},zu(t,e)}Iu.prototype.options_={children:["playProgressBar"],barName:"playProgressBar"},n.Z.browser.IS_IOS||n.Z.browser.IS_ANDROID||Iu.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),n.Z.registerComponent("ChapterSeekBar",Iu);var Vu=n.Z.getComponent("ProgressControl"),Uu="seekBar",Gu=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,r){return e=Zu(e),function(t,e){if(e&&("object"==Du(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Nu()?Reflect.construct(e,r||[],Zu(t).constructor):e.apply(t,r))}(this,e,arguments)).seekBarName_=Uu,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zu(t,e)}(e,t),r=e,n=[{key:"setSeekBarName",value:function(t){this.seekBarName_=t}},{key:"getChild",value:function(t){return(null==t?void 0:t.toLowerCase())===Uu.toLowerCase()&&(t=this.seekBarName_),(r=e,n=this,"function"==typeof(o=Fu(Zu(1&3?r.prototype:r),"getChild",n))?function(t){return o.apply(n,t)}:o)([t]);var r,n,o}}],n&&Mu(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Vu);Gu.prototype.options_={children:[]},n.Z.registerComponent("ProgressControl",Gu);var qu=r(28788),Hu=r(30708);function Wu(t){return Wu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wu(t)}function Qu(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Yu(n.key),n)}}function Yu(t){var e=function(t){if("object"!=Wu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Wu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Wu(e)?e:e+""}function Ku(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ku=function(){return!!t})()}function $u(){return $u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Xu(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},$u.apply(null,arguments)}function Xu(t){return Xu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Xu(t)}function Ju(t,e){return Ju=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ju(t,e)}var tc=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Xu(e),function(t,e){if(e&&("object"==Wu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ku()?Reflect.construct(e,r||[],Xu(t).constructor):e.apply(t,r))}(this,e,[t,r])).hasCustomChapterText=!1,D.O.useTrack(n.player_,"chapters",!1,(function(t){n.track_=t})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ju(t,e)}(e,t),r=e,o=[{key:"createEl",value:function(){var t,r,o,i=(t=e,r=this,"function"==typeof(o=$u(Xu(1&3?t.prototype:t),"createEl",r))?function(t){return o.apply(r,t)}:o)([]);return this.chapter_=n.Z.dom.createEl("div"),i.appendChild(this.chapter_),this.time_=n.Z.dom.createEl("div"),i.appendChild(this.time_),i}},{key:"updateTime",value:function(t){var e=this.player_.duration();if(n.Z.dom.textContent(this.time_,(0,Hu.m)(t,e)),this.track_&&!this.hasCustomChapterText){for(var r=0;r<this.track_.cues.length;r++){var o=this.track_.cues[r],i=o.endTime||e;if(o.startTime<=t&&i>=t)return void n.Z.dom.textContent(this.chapter_,o.text)}n.Z.dom.textContent(this.chapter_,"")}}},{key:"clearChapterContent",value:function(){n.Z.dom.textContent(this.chapter_,"")}},{key:"updateText",value:function(t){n.Z.dom.textContent(this.time_,t)}},{key:"setCustomChapterText",value:function(t){this.hasCustomChapterText=!!t,n.Z.dom.textContent(this.chapter_,null!=t?t:"")}}],o&&Qu(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n.Z.getComponent("TimeTooltip"));function ec(t){return ec="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ec(t)}function rc(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,nc(n.key),n)}}function nc(t){var e=function(t){if("object"!=ec(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ec(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ec(e)?e:e+""}function oc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(oc=function(){return!!t})()}function ic(){return ic="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ac(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},ic.apply(null,arguments)}function ac(t){return ac=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ac(t)}function uc(t,e){return uc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},uc(t,e)}n.Z.registerComponent("TimeTooltip",tc);var cc=function(t){function e(t,r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=ac(e),function(t,e){if(e&&("object"==ec(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,oc()?Reflect.construct(e,r||[],ac(t).constructor):e.apply(t,r))}(this,e,[t,r])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&uc(t,e)}(e,t),r=e,o=[{key:"setTrack",value:function(t){this.track_=t}},{key:"createEl",value:function(){var t,r,o,i=(t=e,r=this,"function"==typeof(o=ic(ac(1&3?t.prototype:t),"createEl",r))?function(t){return o.apply(r,t)}:o)(["div",{className:"cv-thumbnail-display"}]);return this.img_=n.Z.dom.createEl("img"),i.appendChild(this.img_),i}},{key:"enable",value:function(){this.addClass("cv-thumbnail-display-enabled")}},{key:"disable",value:function(){this.removeClass("cv-thumbnail-display-enabled")}},{key:"parseImageLink",value:function(t){var e=t.indexOf("#");if(-1===e)return{src:t,w:0,h:0,x:0,y:0};var r=t.substr(0,e),n=t.substr(e+1);if("xywh="!==n.substr(0,5))return{src:t,w:0,h:0,x:0,y:0};var o=this.getScale(),i=n.substr(5).split(",");return{src:r,w:parseInt(i[2])*o,h:parseInt(i[3])*o,x:parseInt(i[0])*o,y:parseInt(i[1])*o}}},{key:"getScale",value:function(){var t=this.options_.scaleFactor,e=this.player_.whiteboardModePlugin().side;return this.player_.isFullscreen()&&"bottom"!==e&&(t*=2),t}},{key:"update",value:function(t){var e,r;if(null===(r=null===(e=this.track_)||void 0===e?void 0:e.cues)||void 0===r?void 0:r.length){for(var n,o=t,i=0;i<this.track_.cues.length;){var a=this.track_.cues[i];if(a.startTime<=o&&a.endTime>=o){n=this.parseImageLink(a.text);break}i++}if(null==n?void 0:n.src){this.enable();var u=n,c=u.src,l=u.w,s=u.h,f=u.x,p=u.y,y=this.getScale();this.img_.src=c,this.img_.style.left=-f+"px",this.img_.style.top=-p+"px",this.img_.style.transformOrigin="0 0",this.img_.style.transform="scale(".concat(y,")"),this.el_.style.width=l+"px",this.el_.style.height=s+"px"}else this.disable()}}}],o&&rc(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n.Z.getComponent("Component"));function lc(t){return lc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lc(t)}function sc(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,fc(n.key),n)}}function fc(t){var e=function(t){if("object"!=lc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=lc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==lc(e)?e:e+""}function pc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(pc=function(){return!!t})()}function yc(t){return yc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},yc(t)}function hc(t,e){return hc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},hc(t,e)}cc.prototype.options_={scaleFactor:1},n.Z.registerComponent("ThumbnailDisplay",cc);var vc=n.Z.getComponent("MouseTimeDisplay"),dc="cv-mouse-time-display-force-show",bc=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),n=function(t,e,r){return e=yc(e),function(t,e){if(e&&("object"==lc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,pc()?Reflect.construct(e,r||[],yc(t).constructor):e.apply(t,r))}(this,e,[t,r]),D.O.useTrack(n.player_,"metadata","thumbnails",(function(t){n.getChild("ThumbnailDisplay").setTrack(t)})),n.update=n.update.bind(n),n.player_.on("durationchange",n.update),n.player_.one("dispose",(function(){n.player_.off("durationchange",n.update)})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&hc(t,e)}(e,t),r=e,(n=[{key:"update",value:function(t,e){var r=this;this.requestAnimationFrame((function(){var n=r.getChild("TimeTooltip"),o=r.getChild("ThumbnailDisplay"),i=e*r.player_.duration(),a=r.player_.preventScrubbingPlugin(),u=r.player_.controlBar.getChild("progressControl").getChild(qu.Hx),c=!1;a.isEnabled&&(c=i>a.furthestVisitedTime),c?(r.hide(),u.show(),(0,Re.Ds)(u.hide,qu.D,!1,u)()):(r.show(),u&&u.hide(!0),o.update(i),n.updateTime(i));var l=r.el_.getBoundingClientRect();r.el_.style.marginLeft=-l.width/2+"px";var s=t.width*e;s<l.width/2?r.el_.style.left=l.width/2+"px":s>t.width-l.width/2?r.el_.style.left=t.width-l.width/2+"px":r.el_.style.left=t.width*e+"px"}))}},{key:"forceShow",value:function(){this.addClass(dc)}},{key:"removeForceShow",value:function(){this.removeClass(dc)}}])&&sc(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(vc);function mc(t){return mc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mc(t)}function gc(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,wc(n.key),n)}}function wc(t){var e=function(t){if("object"!=mc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=mc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==mc(e)?e:e+""}function Oc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Oc=function(){return!!t})()}function Pc(){return Pc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=jc(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Pc.apply(null,arguments)}function jc(t){return jc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},jc(t)}function Sc(t,e){return Sc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Sc(t,e)}bc.prototype.options_={children:["ThumbnailDisplay","TimeTooltip"]},n.Z.registerComponent("MouseTimeDisplay",bc);var _c=n.Z.getComponent("ChaptersTrackMenuItem"),kc=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=jc(e),function(t,e){if(e&&("object"==mc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Oc()?Reflect.construct(e,r||[],jc(t).constructor):e.apply(t,r))}(this,e,[t,r])).nonIconControl=!1,n.thumbnailDisplay=new cc(n.player_,{scaleFactor:.5}),n.el().insertBefore(n.thumbnailDisplay.el(),n.el().firstChild),D.O.useTrack(n.player_,"metadata","thumbnails",(function(t){n.addClass("cv-has-thumbnails"),n.thumbnailDisplay.setTrack(t),n.thumbnailDisplay.update(n.options_.cue.startTime)})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Sc(t,e)}(e,t),r=e,n=[{key:"update",value:function(){this.player_&&_c.prototype.update.call(this)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-chapter-menu-item"}},{key:"createEl",value:function(t,r,n){return this.nonIconControl=!0,(o=e,i=this,"function"==typeof(a=Pc(jc(1&3?o.prototype:o),"createEl",i))?function(t){return a.apply(i,t)}:a)(["li",Object.assign({className:this.buildCSSClass(),innerHTML:this.getInnerHTML(),tabIndex:-1},r),n]);var o,i,a}},{key:"getInnerHTML",value:function(){var t=this.player_.duration();return'<span class="vjs-menu-item-text cv-chapter-menu-item-text">'+"<p>".concat(this.localize(this.options_.label),"</p>")+"<p>(".concat((0,Hu.m)(this.options_.cue.startTime,t),")</p>")+"</span>"}}],n&&gc(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(_c);function Cc(t){return Cc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cc(t)}function Ec(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Tc(n.key),n)}}function Tc(t){var e=function(t){if("object"!=Cc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Cc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Cc(e)?e:e+""}function xc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(xc=function(){return!!t})()}function Lc(t,e,r,n){var o=Rc(Bc(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function Rc(){return Rc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Bc(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Rc.apply(null,arguments)}function Bc(t){return Bc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Bc(t)}function Ic(t,e){return Ic=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ic(t,e)}var Dc=function(t){function e(t,r,n){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(o=function(t,e,r){return e=Bc(e),function(t,e){if(e&&("object"==Cc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,xc()?Reflect.construct(e,r||[],Bc(t).constructor):e.apply(t,r))}(this,e,[t,r,n])).alwaysCollapsed=!1,o.isCollapsed=!1,o.isCollabsible=!0,o.update=o.update.bind(o),o.player_.on("cv-whiteboard-change",o.update),o.player_.on("fullscreenchange",o.update),o.player_.on("dispose",(function(){o.player_.off("cv-whiteboard-change",o.update),o.player_.off("fullscreenchange",o.update)})),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ic(t,e)}(e,t),r=e,(n=[{key:"buildCSSClass",value:function(){return"cv-chapters-button ".concat(Lc(e,"buildCSSClass",this,3)([]))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big ".concat(Lc(e,"buildWrapperCSSClass",this,3)([]))}},{key:"createItems",value:function(){var t=[];if(!this.track_)return t;var e=this.track_.cues;if(!e)return t;for(var r=0,n=e.length;r<n;r++){var o=e[r],i=new kc(this.player_,{track:this.track_,cue:o});t.push(i)}return t}},{key:"setTrack",value:function(t){var r=this;if(Lc(e,"setTrack",this,3)([t]),this.track_&&"chapters"===this.track_.kind){t.one("loadeddata",this.update);var n=function(){r.update(),r.player_.trigger("resizemenus")};t.on("cv:cuechange",n),this.player_.one("dispose",(function(){return t.off("cv:cueupdate",n)}))}}},{key:"update",value:function(t){Lc(e,"update",this,3)([t])}},{key:"getCollabsibleName",value:function(){return"Chapters"}},{key:"getCollabsibleValue",value:function(){var t=this.track_.activeCues[0];return(null==t?void 0:t.text)||""}},{key:"showInCollabsibleMenu",value:function(){if(!this.track_)return!1;var t=this.track_.cues;return!(!t||!t.length)}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}])&&Ec(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getComponent("ChaptersButton"));function Mc(t){return Mc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mc(t)}function Ac(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Nc(n.key),n)}}function Nc(t){var e=function(t){if("object"!=Mc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Mc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Mc(e)?e:e+""}function Fc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Fc=function(){return!!t})()}function Zc(){return Zc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=zc(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Zc.apply(null,arguments)}function zc(t){return zc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},zc(t)}function Vc(t,e){return Vc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Vc(t,e)}n.Z.registerComponent("ChaptersButton",Dc);var Uc=n.Z.getComponent("OffTextTrackMenuItem"),Gc=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=zc(e),function(t,e){if(e&&("object"==Mc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Fc()?Reflect.construct(e,r||[],zc(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Vc(t,e)}(e,t),r=e,n=[{key:"handleClick",value:function(t){Uc.prototype.handleClick.call(this,t),this.player_.trigger("cv:languageselected")}},{key:"createEl",value:function(t,r,n){return(o=e,i=this,"function"==typeof(a=Zc(zc(1&3?o.prototype:o),"createEl",i))?function(t){return a.apply(i,t)}:a)(["li",Object.assign(Object.assign({className:"vjs-menu-item",tabIndex:-1},r),{innerHTML:'<span class="vjs-menu-item-text">Off</span>'}),n]);var o,i,a}}],n&&Ac(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Uc);function qc(t){return qc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qc(t)}function Hc(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Wc(n.key),n)}}function Wc(t){var e=function(t){if("object"!=qc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=qc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==qc(e)?e:e+""}function Qc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Qc=function(){return!!t})()}function Yc(t){return Yc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Yc(t)}function Kc(t,e){return Kc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Kc(t,e)}n.Z.registerComponent("OffTextTrackMenuItem",Gc);var $c=n.Z.getComponent("TextTrackButton"),Xc=n.Z.getComponent("TextTrackMenuItem"),Jc=n.Z.getComponent("OffTextTrackMenuItem"),tl=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=Yc(e),function(t,e){if(e&&("object"==qc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Qc()?Reflect.construct(e,r||[],Yc(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Kc(t,e)}(e,t),r=e,n=[{key:"createItems",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Xc;this.label_&&(t="".concat(this.label_," off")),e.push(new Jc(this.player_,{kinds:this.kinds_,kind:this.kind_,label:t})),this.hideThreshold_+=1;var n=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var o=0;o<n.length;o++){var i=n[o];if(this.kinds_.indexOf(i.kind)>-1){var a=new r(this.player_,{track:i,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});a.addClass("vjs-".concat(i.kind,"-menu-item")),e.push(a)}}return e}}],n&&Hc(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}($c);function el(t){return el="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},el(t)}function rl(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,nl(n.key),n)}}function nl(t){var e=function(t){if("object"!=el(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=el(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==el(e)?e:e+""}function ol(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ol=function(){return!!t})()}function il(t){return il=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},il(t)}function al(t,e){return al=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},al(t,e)}n.Z.registerComponent("TextTrackButton",tl);var ul=n.Z.getComponent("SubsCapsMenuItem"),cl=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=il(e),function(t,e){if(e&&("object"==el(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ol()?Reflect.construct(e,r||[],il(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&al(t,e)}(e,t),r=e,(n=[{key:"handleClick",value:function(t){ul.prototype.handleClick.call(this,t),this.player_.trigger("cv:languageselected")}}])&&rl(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(ul);function ll(t){return ll="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ll(t)}function sl(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,fl(n.key),n)}}function fl(t){var e=function(t){if("object"!=ll(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ll(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ll(e)?e:e+""}function pl(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(pl=function(){return!!t})()}function yl(t){return yl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},yl(t)}function hl(t,e){return hl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},hl(t,e)}var vl=function(t){function e(t){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n={};n.track={player:t,kind:"subtitle",label:"Search Captions",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="SubtitleSearchMenuItem",(r=function(t,e,r){return e=yl(e),function(t,e){if(e&&("object"==ll(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,pl()?Reflect.construct(e,r||[],yl(t).constructor):e.apply(t,r))}(this,e,[t,n])).addClass("vjs-texttrack-settings"),r.addClass("cv-subtitle-search-menu-item"),r.controlText(", opens subtitle search"),r.toggleEnabled=r.toggleEnabled.bind(r);var o=r.player_.textTracks();return o.addEventListener("selectedlanguagechange",r.toggleEnabled),r.player_.one("dispose",(function(){o.removeEventListener("selectedlanguagechange",r.toggleEnabled)})),r.toggleEnabled(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&hl(t,e)}(e,t),r=e,(n=[{key:"toggleEnabled",value:function(){var t;if(this.player_){var e=D.O.getCurrentTextTrack(this.player_);e?(null===(t=e.cues)||void 0===t?void 0:t.length)?this.removeClass("vjs-disabled"):(this.bindTrackEvents(e),this.addClass("vjs-disabled")):this.addClass("vjs-disabled")}}},{key:"bindTrackEvents",value:function(t){var e=this;t.removeEventListener("loadeddata",this.toggleEnabled),t.addEventListener("loadeddata",this.toggleEnabled),this.player_.one("dispose",(function(){t.removeEventListener("loadeddata",e.toggleEnabled)}))}},{key:"handleClick",value:function(){var t,e=this,r=D.O.getCurrentTextTrack(this.player_);(null===(t=null==r?void 0:r.cues)||void 0===t?void 0:t.length)&&this.requestAnimationFrame((function(){e.player_.getChild("collapserator").getChild("subtitleSearchButton").showCollapsibleMenu()}))}}])&&sl(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getComponent("TextTrackMenuItem"));function dl(t){return dl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dl(t)}function bl(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ml(n.key),n)}}function ml(t){var e=function(t){if("object"!=dl(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=dl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==dl(e)?e:e+""}function gl(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(gl=function(){return!!t})()}function wl(t){return wl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},wl(t)}function Ol(t,e){return Ol=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ol(t,e)}var Pl=function(t){function e(t){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n={};return n.track={player:t,kind:"subtitle",label:"Caption Text Size",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="SubtitleSizeMenuItem",(r=function(t,e,r){return e=wl(e),function(t,e){if(e&&("object"==dl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,gl()?Reflect.construct(e,r||[],wl(t).constructor):e.apply(t,r))}(this,e,[t,n])).addClass("vjs-texttrack-settings"),r.addClass("cv-divider-after-menu-item"),r.addClass("cv-subtitle-size-menu-item"),r.controlText(", opens subtitle size settings"),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ol(t,e)}(e,t),r=e,(n=[{key:"handleClick",value:function(){var t=this;this.requestAnimationFrame((function(){t.player_.getChild("collapserator").getChild("subtitleSizeButton").showCollapsibleMenu()}))}}])&&bl(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getComponent("TextTrackMenuItem"));function jl(t){return jl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jl(t)}function Sl(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,_l(n.key),n)}}function _l(t){var e=function(t){if("object"!=jl(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=jl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==jl(e)?e:e+""}function kl(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(kl=function(){return!!t})()}function Cl(){return Cl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=El(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Cl.apply(null,arguments)}function El(t){return El=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},El(t)}function Tl(t,e){return Tl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Tl(t,e)}var xl=n.Z.getComponent("TextTrackButton"),Ll=n.Z.getComponent("SubsCapsButton"),Rl=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,r){return e=El(e),function(t,e){if(e&&("object"==jl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,kl()?Reflect.construct(e,r||[],El(t).constructor):e.apply(t,r))}(this,e,arguments)).alwaysCollapsed=!1,t.isCollapsed=!1,t.isCollabsible=!0,t.className="cv-subs-caps-menu-button",t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Tl(t,e)}(e,t),r=e,n=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((t=e,r=this,"function"==typeof(n=Cl(El(1&3?t.prototype:t),"buildWrapperCSSClass",r))?function(t){return n.apply(r,t)}:n)([]));var t,r,n}},{key:"createItems",value:function(){var t=[];return this.player_.options_.mobile||(t.push(new vl(this.player_)),t.push(new Pl(this.player_)),this.hideThreshold_=this.hideThreshold_+2),xl.prototype.createItems.call(this,t,cl)}},{key:"getCollabsibleName",value:function(){return"Subtitles"}},{key:"getCollabsibleValue",value:function(){for(var t=this.player_.textTracks(),e=0;e<t.length;e++){var r=t[e];if(this.kinds_.indexOf(r.kind)>-1&&"showing"===r.mode)return r.label}return"Off"}},{key:"showInCollabsibleMenu",value:function(){for(var t=this.player_.textTracks(),e=0;e<t.length;e++){var r=t[e];if(this.kinds_.indexOf(r.kind)>-1)return!0}return!1}},{key:"showCollapsibleMenu",value:function(){Ll.prototype.handleClick.apply(this)}}],n&&Sl(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Ll);function Bl(t){return Bl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bl(t)}function Il(){Il=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,P=O&&O(O(L([])));P&&P!==r&&n.call(P,a)&&(w=P);var j=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Bl(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function C(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function E(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 T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Bl(e)+" is not iterable")}return m.prototype=g,o(j,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(j),l(j,c,"Generator"),l(j,a,(function(){return this})),l(j,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):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),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function Dl(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ml(n.key),n)}}function Ml(t){var e=function(t){if("object"!=Bl(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Bl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Bl(e)?e:e+""}function Al(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Al=function(){return!!t})()}function Nl(t){return Nl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Nl(t)}function Fl(t,e){return Fl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Fl(t,e)}n.Z.registerComponent("SubsCapsButton",Rl);var Zl="<span class='vjs-local-cache-indicator-icon' title='Streaming from ClickView Local Cache'>".concat(Gr,"</span>"),zl=function(t){function e(t,r){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Nl(e),function(t,e){if(e&&("object"==Bl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Al()?Reflect.construct(e,r||[],Nl(t).constructor):e.apply(t,r))}(this,e,[t,r])).qualityId=r.qualityId;var o=t.qualityLevels(),i=n.handleQualityChange.bind(n);return o.on("change",i),t.one("dispose",(function(){o.off("change",i)})),n.handleLocalCacheChange=n.handleLocalCacheChange.bind(n),n.player_.ready((function(){n.player_&&(n.player_.on("localcachechanged",n.handleLocalCacheChange),n.player_.one("dispose",(function(){var t;null===(t=n.player_)||void 0===t||t.off("localcachechanged",n.handleLocalCacheChange)})),n.handleLocalCacheChange())})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Fl(t,e)}(e,t),r=e,(n=[{key:"handleLocalCacheChange",value:function(){return t=this,e=void 0,r=void 0,n=Il().mark((function t(){var e,r;return Il().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.player_.localCache(),t.next=3,e.getActiveLocalCache();case 3:if(null==(r=t.sent)?void 0:r.playbackProfile){t.next=9;break}return this.show(),this.enable(),this.setLabel(this.options_.label),t.abrupt("return");case 9:r.playbackProfile!==this.qualityId?this.disable():this.setLabel(this.options_.label+Zl);case 10:case"end":return t.stop()}}),t,this)})),new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}));var t,e,r,n}},{key:"setLabel",value:function(t){var e=this.$(".vjs-menu-item-text");e&&(e.innerHTML=t)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-quality-menu-item"}},{key:"handleClick",value:function(){for(var t=this.player_.qualityLevels(),e=0;e<t.length;e++){var r=t[e];r.enabled=r.id===this.qualityId}}},{key:"handleQualityChange",value:function(){if(this.player_){var t=this.player_.qualityLevels(),e=t[t.selectedIndex],r=e&&e.id===this.qualityId;r!==this.isSelected_&&this.selected(r)}}}])&&Dl(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getComponent("MenuItem"));function Vl(t){return Vl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vl(t)}function Ul(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Gl(n.key),n)}}function Gl(t){var e=function(t){if("object"!=Vl(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Vl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Vl(e)?e:e+""}function ql(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ql=function(){return!!t})()}function Hl(t,e,r,n){var o=Wl(Ql(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function Wl(){return Wl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ql(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Wl.apply(null,arguments)}function Ql(t){return Ql=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ql(t)}function Yl(t,e){return Yl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Yl(t,e)}var Kl={144:"144p (Preview)",240:"240p",360:"360p",480:"480p",720:"720p",1080:"1080p"},$l=n.Z.getComponent("MenuButton"),Xl=function(t){function e(t,r){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Ql(e),function(t,e){if(e&&("object"==Vl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ql()?Reflect.construct(e,r||[],Ql(t).constructor):e.apply(t,r))}(this,e,[t,r])).alwaysCollapsed=!0,n.isCollapsed=!1,n.isCollabsible=!0,n.className="cv-quality-menu-button";var o=n.player_.qualityLevels(),i=n.update.bind(n);return o.on("addqualitylevel",i),o.on("removequalitylevel",i),t.one("dispose",(function(){o.removeEventListener("addqualitylevel",i),o.removeEventListener("removequalitylevel",i)})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Yl(t,e)}(e,t),r=e,(n=[{key:"buildCSSClass",value:function(){return"cv-quality-button ".concat(Hl(e,"buildCSSClass",this,3)([]))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small vjs-quality-button cv-has-left-icons ".concat(Hl(e,"buildWrapperCSSClass",this,3)([]))}},{key:"createItems",value:function(){var t=[],e=this.player_.qualityLevels();t.push(new m.Z(this.player_,{label:"Quality"}));for(var r=0;r<e.length;r++){var n=e[r];if(n){var o=Kl[n.id];o&&t.push(new zl(this.player_,{qualityId:n.id,label:o,selectable:!0,multiSelectable:!1}))}}return t}},{key:"getCollabsibleName",value:function(){return"Quality"}},{key:"getCollabsibleValue",value:function(){var t=this.player_.qualityLevels(),e=t[t.selectedIndex];return e?Kl[e.id]:""}},{key:"showInCollabsibleMenu",value:function(){return!!this.player_.qualityLevels().length}},{key:"showCollapsibleMenu",value:function(){$l.prototype.handleClick.apply(this)}}])&&Ul(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}($l);function Jl(t){return Jl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jl(t)}function ts(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,es(n.key),n)}}function es(t){var e=function(t){if("object"!=Jl(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Jl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Jl(e)?e:e+""}function rs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(rs=function(){return!!t})()}function ns(){return ns="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=os(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},ns.apply(null,arguments)}function os(t){return os=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},os(t)}function is(t,e){return is=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},is(t,e)}n.Z.registerComponent("QualityButton",Xl);var as=n.Z.getComponent("Menu"),us=n.Z.getComponent("MenuButton"),cs=n.Z.getComponent("PlaybackRateMenuItem"),ls=n.Z.getComponent("PlaybackRateMenuButton"),ss=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,r){return e=os(e),function(t,e){if(e&&("object"==Jl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,rs()?Reflect.construct(e,r||[],os(t).constructor):e.apply(t,r))}(this,e,arguments)).alwaysCollapsed=!0,t.isCollapsed=!1,t.isCollabsible=!0,t.className="cv-playback-rate-menu-button",t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&is(t,e)}(e,t),r=e,o=[{key:"createEl",value:function(){for(var t,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return(t=us.prototype.createEl).apply.apply(t,[this].concat(r))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((t=e,r=this,"function"==typeof(n=ns(os(1&3?t.prototype:t),"buildWrapperCSSClass",r))?function(t){return n.apply(r,t)}:n)([]));var t,r,n}},{key:"createMenu",value:function(){var t=new as(this.player(),{menuButton:this});t.addItem(new m.Z(this.player_,{label:"Playback Speed"}));var e=this.playbackRates();if(e)for(var r=0;r<e.length;r++){var n=e[r]+"x";1===e[r]&&(n+=" (Normal)"),t.addItem(new cs(this.player(),{rate:n}))}return t}},{key:"handleClick",value:function(){for(var t,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return(t=us.prototype.handleClick).apply.apply(t,[this].concat(r))}},{key:"updateLabel",value:function(){var t;this.setupLabelEl();for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return(t=ls.prototype.updateLabel).apply.apply(t,[this].concat(r))}},{key:"setupLabelEl",value:function(){if(!this.labelEl_){var t=this.$("button");t&&(this.labelEl_=n.Z.dom.createEl("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),t.appendChild(this.labelEl_))}}},{key:"getCollabsibleName",value:function(){return"Playback Speed"}},{key:"getCollabsibleValue",value:function(){return this.player().playbackRate()+"x"}},{key:"showInCollabsibleMenu",value:function(){return!!this.playbackRates()}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}],o&&ts(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(ls);function fs(t){return fs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fs(t)}function ps(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ys(n.key),n)}}function ys(t){var e=function(t){if("object"!=fs(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=fs(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==fs(e)?e:e+""}function hs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(hs=function(){return!!t})()}function vs(t){return vs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},vs(t)}function ds(t,e){return ds=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ds(t,e)}n.Z.registerComponent("PlaybackRateMenuButton",ss);var bs=n.Z.getComponent("TextTrackSettings"),ms={backgroundColor:"#000",backgroundOpacity:"1",color:"#FFF",edgeStyle:void 0,fontFamily:"proportionalSansSerif",fontPercent:1,textOpacity:"1",windowColor:"#000",windowOpacity:"0"},gs={small:ms,medium:Object.assign(Object.assign({},ms),{fontPercent:1.5}),large:Object.assign(Object.assign({},ms),{fontPercent:2})},ws=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=vs(e),function(t,e){if(e&&("object"==fs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,hs()?Reflect.construct(e,r||[],vs(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ds(t,e)}(e,t),r=e,(n=[{key:"setSizeSetting",value:function(t){var e=this;this.size_=t,this.player_.getChild("textTrackDisplay").updateDisplay();var r=this.player_.getChild("collapserator").getChild("subtitleSizeButton");this.player_.trigger("changesubtitlesize",this.size_),window.requestAnimationFrame((function(){r.update(),e.player_.trigger("resizemenus")}))}},{key:"getSizeSetting",value:function(){return this.size_||"small"}},{key:"getValues",value:function(){return gs[this.size_]?gs[this.size_]:ms}}])&&ps(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(bs);function Os(t){return Os="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Os(t)}function Ps(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,js(n.key),n)}}function js(t){var e=function(t){if("object"!=Os(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Os(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Os(e)?e:e+""}function Ss(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ss=function(){return!!t})()}function _s(t,e,r,n){var o=ks(Cs(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function ks(){return ks="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Cs(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},ks.apply(null,arguments)}function Cs(t){return Cs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Cs(t)}function Es(t,e){return Es=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Es(t,e)}n.Z.registerComponent("TextTrackSettings",ws);var Ts=window.navigator&&window.navigator.userAgent||"",xs=(/iPod/i.test(Ts),/Android/i.test(Ts),n.Z.getComponent("Player")),Ls=function(t){function e(t,r){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Cs(e),function(t,e){if(e&&("object"==Os(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ss()?Reflect.construct(e,r||[],Cs(t).constructor):e.apply(t,r))}(this,e,[t,r]))._dataLoaded=!1,r.mobile&&n.addClass("cv-mobile-player");var o=function(){return n._dataLoaded=!0};return n.on("cv-playback-data-loaded",o),n.on("dispose",(function(){return n.off("cv-playback-data-loaded",o)})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Es(t,e)}(e,t),r=e,(n=[{key:"dataLoaded",value:function(t){var e=this;this._dataLoaded?t():(this.one("cv-playback-data-loaded",t),this.one("dispose",(function(){e.off("cv-playback-data-loaded",t)})))}},{key:"lock",value:function(t){this.callback_=t}},{key:"unlock",value:function(){delete this.callback_}},{key:"currentTime",value:function(t,r){var n=this;if("number"!=typeof t||!this.callback_||r)return _s(e,"currentTime",this,3)([t]);this.callback_((function(){n.unlock(),n.currentTime(t)}))}},{key:"play",value:function(){var t=this;if(!this.callback_)return _s(e,"play",this,3)([]);this.callback_((function(){t.unlock(),t.play()}))}},{key:"updateStyleEl_",value:function(){if(xs.prototype.updateStyleEl_.call(this),this.options_.fluid){var t=this.el_.parentNode;if(t&&this.options_.setMaxHeight){var e=this.aspectRatio();if(void 0!==e&&"auto"!==e||(e=this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9"),this.player_.playerModePlugin().getMode()===_i.Hover)return t.style.removeProperty("maxWidth"),void t.style.removeProperty("margin");var r=e.split(":"),n=+r[1]/+r[0];t.style.maxWidth=85/n+"vh",t.style.margin="0 auto"}}}},{key:"listenForUserActivity_",value:function(){var t=this;xs.prototype.listenForUserActivity_.call(this);var e=this.getChild("collapserator");e.on("mouseenter",(function(){t.player().cache_.inactivityTimeout=t.player().options_.inactivityTimeout,t.player().options_.inactivityTimeout=0})),e.on("mouseleave",(function(){t.player().options_.inactivityTimeout=t.player().cache_.inactivityTimeout}))}}])&&Ps(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(xs);function Rs(t){return Rs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rs(t)}function Bs(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Is(n.key),n)}}function Is(t){var e=function(t){if("object"!=Rs(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Rs(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Rs(e)?e:e+""}function Ds(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ds=function(){return!!t})()}function Ms(t){return Ms=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ms(t)}function As(t,e){return As=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},As(t,e)}Ls.prototype.options_=Object.assign(Object.assign({},xs.prototype.options_),{setMaxHeight:!0}),n.Z.registerComponent("player",Ls);var Ns=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Ms(e),function(t,e){if(e&&("object"==Rs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ds()?Reflect.construct(e,r||[],Ms(t).constructor):e.apply(t,r))}(this,e,[t,r])).player_.addClass("cv-disable-play-pause-feedback"),n.onFirstPlay=n.onFirstPlay.bind(n),n.player_.one("firstplay",n.onFirstPlay),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&As(t,e)}(e,t),r=e,(o=[{key:"dispose",value:function(){this.player_.off("firstplay",this.onFirstPlay)}},{key:"onFirstPlay",value:function(){var t=this;window.setTimeout((function(){t.player_.isDisposed()||t.player_.removeClass("cv-disable-play-pause-feedback")}),500)}},{key:"createEl",value:function(){return n.Z.dom.createEl("div",{className:"cv-play-pause-feedback"})}}])&&Bs(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n.Z.getComponent("Component"));function Fs(t){return Fs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fs(t)}function Zs(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,zs(n.key),n)}}function zs(t){var e=function(t){if("object"!=Fs(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Fs(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Fs(e)?e:e+""}function Vs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Vs=function(){return!!t})()}function Us(t){return Us=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Us(t)}function Gs(t,e){return Gs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Gs(t,e)}n.Z.registerComponent("PlayPauseFeedback",Ns);var qs=n.Z.getComponent("PlayToggle"),Hs=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=Us(e),function(t,e){if(e&&("object"==Fs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Vs()?Reflect.construct(e,r||[],Us(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gs(t,e)}(e,t),r=e,(n=[{key:"handleClick",value:function(t){var e=this;qs.prototype.handleClick.call(this,t),this.player_.addClass("cv-disable-play-pause-feedback"),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){e.player_.removeClass("cv-disable-play-pause-feedback")}),500)}}])&&Zs(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(qs);function Ws(t){return Ws="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ws(t)}function Qs(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ys(n.key),n)}}function Ys(t){var e=function(t){if("object"!=Ws(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ws(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ws(e)?e:e+""}function Ks(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ks=function(){return!!t})()}function $s(t){return $s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$s(t)}function Xs(t,e){return Xs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Xs(t,e)}n.Z.registerComponent("PlayToggle",Hs);var Js=n.Z.getComponent("TextTrackDisplay"),tf=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=$s(e),function(t,e){if(e&&("object"==Ws(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ks()?Reflect.construct(e,r||[],$s(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xs(t,e)}(e,t),r=e,(n=[{key:"updateDisplayState",value:function(t){Js.prototype.updateDisplayState.call(this,t);for(var e=this.player_.textTrackSettings.getValues(),r=t.activeCues,n=r.length;n--;){var o=r[n];if(o){var i=o.displayState;if(e.fontPercent&&1!==e.fontPercent){var a=.025*this.el().getBoundingClientRect().width*100/100;i.style.fontSize=a*e.fontPercent+"px"}}}}}])&&Qs(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Js);function ef(t){return ef="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ef(t)}function rf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,nf(n.key),n)}}function nf(t){var e=function(t){if("object"!=ef(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ef(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ef(e)?e:e+""}function of(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(of=function(){return!!t})()}function af(t){return af=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},af(t)}function uf(t,e){return uf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},uf(t,e)}n.Z.registerComponent("TextTrackDisplay",tf);var cf=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=af(e),function(t,e){if(e&&("object"==ef(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,of()?Reflect.construct(e,r||[],af(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&uf(t,e)}(e,t),r=e,(o=[{key:"createEl",value:function(){return n.Z.dom.createEl("div",{className:"cv-control-bar-gradient-container",innerHTML:'<div class="cv-control-bar-gradient"></div>'})}}])&&rf(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n.Z.getComponent("Component"));function lf(t){return lf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lf(t)}function sf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ff(n.key),n)}}function ff(t){var e=function(t){if("object"!=lf(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=lf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==lf(e)?e:e+""}function pf(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(pf=function(){return!!t})()}function yf(t,e,r,n){var o=hf(vf(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function hf(){return hf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=vf(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},hf.apply(null,arguments)}function vf(t){return vf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},vf(t)}function df(t,e){return df=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},df(t,e)}n.Z.registerComponent("ControlBarGradient",cf);var bf=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=vf(e),function(t,e){if(e&&("object"==lf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,pf()?Reflect.construct(e,r||[],vf(t).constructor):e.apply(t,r))}(this,e,[t,r])).options_=r,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&df(t,e)}(e,t),r=e,(n=[{key:"createEl",value:function(){var t=this.options_.title;if(!this.options_.seriesName)return yf(e,"createEl",this,3)(["h1",{innerHTML:t}]);var r=this.buildSeasonEpisodeString();return r?(t="<div class='cv-splash-series'>".concat(this.options_.seriesName.toUpperCase()," ").concat(r,"</div>")+t,yf(e,"createEl",this,3)(["h1",{innerHTML:t}])):(t="<div class='cv-splash-series'>".concat(this.options_.seriesName.toUpperCase(),"</div>")+t,yf(e,"createEl",this,3)(["h1",{innerHTML:t}]))}},{key:"buildSeasonEpisodeString",value:function(){if(!this.options_.seasonNumber||!this.options_.episodeNumber)return"";var t=this.padNumber(this.options_.seasonNumber,2),e=this.padNumber(this.options_.episodeNumber,2);return"S".concat(t," • E").concat(e)}},{key:"padNumber",value:function(t,e){var r=t.toString();if(r.length>=e)return r;for(e-=r.length;e>0;)r="0"+r,e--;return r}}])&&sf(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getComponent("Component"));function mf(t){return mf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mf(t)}function gf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,wf(n.key),n)}}function wf(t){var e=function(t){if("object"!=mf(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=mf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==mf(e)?e:e+""}function Of(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Of=function(){return!!t})()}function Pf(){return Pf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=jf(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Pf.apply(null,arguments)}function jf(t){return jf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},jf(t)}function Sf(t,e){return Sf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Sf(t,e)}var _f=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=jf(e),function(t,e){if(e&&("object"==mf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Of()?Reflect.construct(e,r||[],jf(t).constructor):e.apply(t,r))}(this,e,[t,r])).options_=r,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Sf(t,e)}(e,t),r=e,n=[{key:"buildCSSClass",value:function(){return"cv-splash-rating ".concat((t=this.options_.ratingValue)?function(t){switch(!0){case t<32:return"cv-rating-purple";case t<48:return"cv-rating-green";case t<80:return"cv-rating-blue";case t<96:return"cv-rating-red";case t<128:return"cv-rating-pink";case t>=128:return"cv-rating-yellow";default:return""}}(t):"");var t}},{key:"createEl",value:function(t,r,n){return this.options_.ratingCode?(o=e,i=this,"function"==typeof(a=Pf(jf(1&3?o.prototype:o),"createEl",i))?function(t){return a.apply(i,t)}:a)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass(),innerHTML:this.options_.ratingCode}),n]):null;var o,i,a}}],n&&gf(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getComponent("Component"));function kf(t){return kf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kf(t)}function Cf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ef(n.key),n)}}function Ef(t){var e=function(t){if("object"!=kf(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=kf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==kf(e)?e:e+""}function Tf(t,e){if(e&&("object"==kf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function xf(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(xf=function(){return!!t})()}function Lf(t){return Lf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Lf(t)}function Rf(t,e){return Rf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Rf(t,e)}var Bf=function(t){function e(t,r){var n,o,i,a;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o=this,a=[t,r],i=Lf(i=e),n=Tf(o,xf()?Reflect.construct(i,a||[],Lf(o).constructor):i.apply(o,a)),r.embed?(n.addChild(new bf(t,r)),n.addChild(new _f(t,r)),n):Tf(n,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Rf(t,e)}(e,t),r=e,(o=[{key:"createEl",value:function(){return n.Z.dom.createEl("div",{className:"cv-splash-metadata"})}}])&&Cf(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n.Z.getComponent("Component"));function If(t){return If="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},If(t)}function Df(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Mf(n.key),n)}}function Mf(t){var e=function(t){if("object"!=If(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=If(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==If(e)?e:e+""}function Af(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Af=function(){return!!t})()}function Nf(t){return Nf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Nf(t)}function Ff(t,e){return Ff=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ff(t,e)}var Zf=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Nf(e),function(t,e){if(e&&("object"==If(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Af()?Reflect.construct(e,r||[],Nf(t).constructor):e.apply(t,r))}(this,e,[t,r])).addChild(new Bf(t,r)),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ff(t,e)}(e,t),r=e,(o=[{key:"createEl",value:function(){var t="<div class='cv-splash-mask'></div>";return this.options_.embed&&(t+="<div class='cv-splash-logo'>".concat(Le,"</div>")),n.Z.dom.createEl("div",{className:"vjs-poster cv-embed-splash cv-embed-splash-black",tabIndex:-1,innerHTML:t})}}])&&Df(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n.Z.getComponent("posterImage"));function zf(t){return zf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zf(t)}function Vf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Uf(n.key),n)}}function Uf(t){var e=function(t){if("object"!=zf(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=zf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==zf(e)?e:e+""}function Gf(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Gf=function(){return!!t})()}function qf(t){return qf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},qf(t)}function Hf(t,e){return Hf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Hf(t,e)}n.Z.registerComponent("posterImage",Zf);var Wf=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=qf(e),function(t,e){if(e&&("object"==zf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Gf()?Reflect.construct(e,r||[],qf(t).constructor):e.apply(t,r))}(this,e,[t,r])).el().prepend(n.getErrorImage()),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Hf(t,e)}(e,t),r=e,(o=[{key:"getErrorImage",value:function(){return n.Z.dom.createEl("div",{className:"cv-error-image",innerHTML:'\n <svg viewBox="0 0 301 185" xmlns="http://www.w3.org/2000/svg">\n <path d="M267.393 36.6514V167.906C267.393 168.182 267.169 168.406 266.893 168.406H32C31.7239 168.406 31.5 168.182 31.5 167.906V36.6514C31.5 36.3752 31.7239 36.1514 32 36.1514H80.5C80.7761 36.1514 81 36.3752 81 36.6514V57.7196C81 58.7622 82.0375 59.4868 83.0164 59.1279L95.7377 54.4634C95.9961 54.3687 96.2825 54.5006 96.3785 54.7585L102.094 70.1194C102.677 71.6866 105 71.2685 105 69.5964V48.4925C105 47.7632 104.475 47.1396 103.757 47.0146L94.2479 45.3609C93.9436 45.308 93.7596 44.9946 93.8616 44.7031L96.7376 36.4862C96.8077 36.2856 96.997 36.1514 97.2095 36.1514H266.893C267.169 36.1514 267.393 36.3752 267.393 36.6514Z" stroke="white"/>\n <path d="M163.296 101.777L149.437 90.1217C148.275 89.1441 146.5 89.9705 146.5 91.4894V113.664C146.5 115.141 148.191 115.98 149.367 115.087L163.226 104.569C164.139 103.876 164.173 102.515 163.296 101.777Z" stroke="white" stroke-linecap="round"/>\n <path d="M295.53 23.0783L277.524 26.2801L283.252 32.7192L274.855 38.9079L292.861 35.7061L287.133 29.2671L295.53 23.0783Z" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M268.06 2.91764L254.192 14.8403L262.401 17.4661L258.324 27.0679L272.192 15.1453L263.983 12.5194L268.06 2.91764Z" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n '})}}])&&Vf(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n.Z.getComponent("ErrorDisplay"));n.Z.registerComponent("ErrorDisplay",Wf);var Qf=r(87013),Yf=r(88483);function Kf(t){return Kf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kf(t)}function $f(){$f=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,P=O&&O(O(L([])));P&&P!==r&&n.call(P,a)&&(w=P);var j=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Kf(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function C(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function E(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 T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Kf(e)+" is not iterable")}return m.prototype=g,o(j,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(j),l(j,c,"Generator"),l(j,a,(function(){return this})),l(j,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):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),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function Xf(t){return function(t){if(Array.isArray(t))return Jf(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Jf(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Jf(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jf(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function tp(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ep(n.key),n)}}function ep(t){var e=function(t){if("object"!=Kf(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Kf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Kf(e)?e:e+""}var rp,np=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}))},op=n.Z.getComponent("Player"),ip=function(){return t=function t(e,r){var o=this;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.streamLogged=!1,this.options=n.Z.mergeOptions({},t.options_,r),null===this.options.playerApi)throw new Error("PlayerApi required");this.initialize(),this.createEl(e),this.buildVideoJs(),this.options.splash&&this.setupSplash(this.options.splash),this.bindEventListeners(),this.setupSeekBar(),this.fetchConfig(),this.logStream=this.logStream.bind(this),this.player.ready((function(){o._configurePlugins(),o.options.setup&&o.options.setup(o.options,o.player),o.fetch().catch((function(t){return o.handleFetchError(t)}))}))},(e=[{key:"initialize",value:function(){}},{key:"_configurePlugins",value:function(){this.player.configureMenuDimensionsPlugin({mobile:this.options.mobile,overflowControls:this.options.overflowControls,seekBarName:this.getSeekBarName()}),this.player.progressReporterPlugin({onFlush:this.onFlushProgress=this.onFlushProgress.bind(this)}),this.player.persistVolumePlugin(),!this.options.mobile&&this.options.allowFullscreen&&this.player.fullscreenOnRotatePlugin(),this.player.touchControls(),this.options.getExternalLink&&this.player.openExternallyPlugin({getExternalLink:this.options.getExternalLink}),this.configurePlugins()}},{key:"configurePlugins",value:function(){}},{key:"onFlushProgress",value:function(t){var e;null===(e=this.analyticsService)||void 0===e||e.logVideoProgress(t)}},{key:"buildVideoJs",value:function(){return this.player=(0,n.Z)(this.el,this.getPlayerOptions())}},{key:"getInactivityTimeout",value:function(){if("number"==typeof this.options.inactivityTimeout)return this.options.inactivityTimeout;var t=500;return(this.options.mobile||n.Z.browser.IS_IOS||n.Z.browser.IS_ANDROID)&&(t=3e3),t}},{key:"getPlayerOptions",value:function(){var t=this,e=op.prototype.options_.children;return e=e.filter((function(t){return"bigPlayButton"!==t&&"posterImage"!==t})),{controls:this.options.controls,fluid:!this.options.embed&&!this.options.mobile,fill:this.options.embed||this.options.mobile,inactivityTimeout:this.getInactivityTimeout(),controlBar:{children:["timeWrapper","progressControl"]},children:[].concat(Xf(e),[{name:"collapserator",children:kt.filter((function(e){return!("fullscreenToggle"===e&&!t.options.allowFullscreen)}))},"playPauseFeedback","controlBarGradient"]),userActions:{hotkeys:function(e){return function(t,e,r){var n=Nt()(t);("f"!==n||r.allowFullscreen)&&qt[n]&&(["space"].includes(n)&&(t.preventDefault(),t.stopPropagation()),qt[n](e,t))}(e,t.player,t.options)}},playbackRates:this.options.playbackRates,techOrder:["html5"],html5:{nativeTextTracks:!1},playsinline:!0,aspectRatio:this.options.aspectRatio,mobile:this.options.mobile,deferMenus:this.options.deferMenus,muted:this.options.muted,devicesConfig:this.options.devicesConfig}}},{key:"getPlaybackObject",value:function(){return np(this,void 0,void 0,$f().mark((function t(){var e,r,n=this;return $f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.options.offlinePlaybackObject){t.next=2;break}return t.abrupt("return",this.options.offlinePlaybackObject);case 2:if(e=this.options.fetch,void 0===this.options.fetch&&(e=function(t){var e="".concat(n.options.playerApi.origin,"/api/playback?viewKey=").concat(t);return Mt.e.get(e)}),this.options.viewKey){t.next=6;break}throw new Error("Please specify a viewKey or a fetch function");case 6:return t.next=8,e(this.options.viewKey);case 8:if(r=t.sent){t.next=11;break}throw new Error("Error fetching playback object");case 11:return t.abrupt("return",r);case 12:case"end":return t.stop()}}),t,this)})))}},{key:"setChaptersInternal",value:function(t,e){var r=D.O.getTrack(this.player,"chapters",null);r||(r=this.player.addTextTrack("chapters")),Xf(r.cues.cues_).forEach((function(t){return r.removeCue(t)})),t.forEach((function(t){r.addCue({startTime:t.timestamp,endTime:t.endTimestamp,text:t.name})})),e&&r.trigger({type:"cv:cuechange",target:r}),r.trigger({type:"loadeddata",target:r})}},{key:"setChapters",value:function(t){this.setChaptersInternal(t,!0)}},{key:"setPlayerMode",value:function(t,e){this.player.playerModePlugin().setPlayerMode(t,e)}},{key:"setFavourite",value:function(t,e){this.player.favouritePlugin().setFavourite(t,e)}},{key:"fetch",value:function(){var t,e,r,n,o;return np(this,void 0,void 0,$f().mark((function i(){var a,u,c,l=this;return $f().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,this.getPlaybackObject();case 2:if(a=i.sent,!this.isDisposed()){i.next=5;break}return i.abrupt("return");case 5:u="MasterClip"===a.mediaType,c=null===(t=a.additionalData)||void 0===t?void 0:t.clipData,(null===(r=null===(e=a.chapters)||void 0===e?void 0:e.list)||void 0===r?void 0:r.length)>0&&!u&&!c&&this.setChaptersInternal(a.chapters.list,!1),this.player.localCache({localCacheAddresses:null!==(n=a.localCacheAddresses)&&void 0!==n?n:[],enabled:null===(o=this.options.enableLocalCache)||void 0===o||o}),this.player.progressiveFiles({sources:a.files.progressive.map((function(t){return{id:t.profile,mimeType:t.mimeType,url:t.url}}))}),this.player.handleNetworkErrors({playerApi:this.options.playerApi,fileToken:a.files.fileToken}),a.subtitles.list.length>0&&a.subtitles.list.forEach((function(t){if("text/vtt"===t.mimeType){var e=l.player.addRemoteTextTrack({kind:"subtitles",src:t.url,language:t.language,label:t.label},!0);D.O.sanitizeTrack(e.track,l.player)}})),a.posterUrl&&this.player.poster(Qf.j.createUrl(a.posterUrl,{size:Yf.h2.Large})),this.setupSplash({title:a.title,posterUrl:a.posterUrl,episodeNumber:a.episodeNumber,ratingCode:a.ratingCode,seasonNumber:a.seasonNumber,seriesName:a.seriesName}),this.additionalSetup(a),this.handleAutoplay(a),this.options.startTime&&this.player.ready((function(){l.player.currentTime(l.options.startTime)})),this.player.trigger("cv-playback-data-loaded",a);case 18:case"end":return i.stop()}}),i,this)})))}},{key:"handleFetchError",value:function(t){var e,r=t.message;t instanceof Ht.M&&(null===(e=t.response)||void 0===e?void 0:e.type)===Gt.PhysicallyChapteredVideo&&(r="Video cannot be played because it is either corrupt or damaged."),this.player.error(r),this.options.onError&&this.options.onError(t)}},{key:"fetchConfig",value:function(){return np(this,void 0,void 0,$f().mark((function t(){var e;return $f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(rp||this.options.fetch||this.options.offlinePlaybackObject)){t.next=2;break}return t.abrupt("return");case 2:return e="".concat(this.options.playerApi.origin,"/api/config"),t.next=5,Mt.e.get(e);case 5:if(rp=t.sent,!this.isDisposed()){t.next=8;break}return t.abrupt("return");case 8:this.trigger("config:loaded");case 9:case"end":return t.stop()}}),t,this)})))}},{key:"additionalSetup",value:function(t){var e,r=this;this.player.whiteboardModePlugin(),this.player.deferMenusPlugin();var n=this.options.enableLocalCache&&!!(null===(e=t.localCacheAddresses)||void 0===e?void 0:e.length);rp?this.setupAnalyticsService(t,n):this.one("config:loaded",(function(){return r.setupAnalyticsService(t,n)})),this.analyticsService||!this.isAnalyticsEnabled()?this.setupAnalyticsDependentPlugins(t):this.one("analytics:loaded",(function(){return r.setupAnalyticsDependentPlugins(t)}))}},{key:"setupAnalyticsService",value:function(t,e){this.options.eventLogging&&(this.analyticsService=new Dt({collectionApiUrls:rp.collectionApi.urls,collectionApiClientId:rp.collectionApi.clientId,productVersion:"1.28.0",videoId:t.videoId,mediaId:t.mediaId,userId:t.viewerId,shareId:t.shareId,customerId:t.viewerCustomerId,mediaType:t.mediaType,playerType:this.getAnalyticsPlayerType(),isEmbedded:this.options.embed,isUsingLocalCache:e,additionalAnalyticsData:this.getAdditionalAnalyticsData(t),regionName:t.instanceRegion||this.options.sharerInstanceRegion||Wt.M.CvApSoutheast1}),this.on("timeupdate",this.logStream),this.trigger("analytics:loaded"))}},{key:"setupAnalyticsDependentPlugins",value:function(t){var e,r,n,o;this.player.persistSubtitleSettingsPlugin({showSubtitles:null===(e=t.settings)||void 0===e?void 0:e.showSubtitles,subtitleSize:null===(r=t.settings)||void 0===r?void 0:r.playbackSubtitleSizeDefault,analyticsService:this.analyticsService}),this.player.persistQualitySettingsPlugin({playbackProfile:null===(n=t.settings)||void 0===n?void 0:n.playbackProfile,playbackProfileLocalCache:null===(o=t.settings)||void 0===o?void 0:o.playbackProfileLocalCache,analyticsService:this.analyticsService}),this.player.persistPlaybackRatePlugin({analyticsService:this.analyticsService})}},{key:"getAdditionalAnalyticsData",value:function(t){return{}}},{key:"isAnalyticsEnabled",value:function(){return!this.options.fetch&&!this.options.offlinePlaybackObject&&this.options.eventLogging}},{key:"handleAutoplay",value:function(t){var e=this;this.options.autoplay&&this.player.ready((function(){e.player.play().catch((function(){e.isDisposed()||e.showSplash()}))}))}},{key:"logStream",value:function(){this.analyticsService&&(this.player.currentTime()<3||this.streamLogged||(this.analyticsService.logStream(),this.streamLogged=!0,this.off("timeupdate",this.logStream)))}},{key:"getAnalyticsPlayerType",value:function(){return"player"}},{key:"createEl",value:function(t){var e;"string"==typeof t?(t=function(t){return 0===t.indexOf("#")?t.slice(1):t}(t),e=n.Z.dom.$("#"+t)):e=t;var r="video-js";return this.getPlayerClassName()&&(r+=" ".concat(this.getPlayerClassName())),this.el=n.Z.dom.createEl("video",{},{class:r}),e.appendChild(this.el),this.el}},{key:"getPlayerClassName",value:function(){return""}},{key:"on",value:function(t,e){this.player.on(t,e)}},{key:"one",value:function(t,e){this.player.one(t,e)}},{key:"off",value:function(t,e){this.player.off(t,e)}},{key:"trigger",value:function(t,e){return this.player.trigger(t,e)}},{key:"dispose",value:function(){this.player.dispose()}},{key:"ready",value:function(t){this.player.ready(t)}},{key:"isDisposed",value:function(){return this.player.isDisposed()}},{key:"play",value:function(){this.player.play()}},{key:"pause",value:function(){this.player.pause()}},{key:"isPaused",value:function(){return this.player.paused()}},{key:"currentTime",value:function(t){return this.player.currentTime(t)}},{key:"muted",value:function(t){return this.player.muted(t)}},{key:"duration",value:function(){return this.player.duration()}},{key:"isFullscreen",value:function(){return this.player.isFullscreen()}},{key:"requestFullscreen",value:function(){this.player.requestFullscreen()}},{key:"exitFullscreen",value:function(){this.player.exitFullscreen()}},{key:"playbackRate",value:function(t){return this.player.playbackRate(t)}},{key:"quality",value:function(t){for(var e=this.player.qualityLevels(),r=0;r<e.length;r++){var n=e[r];if(t)n.enabled=n.id===t.toString();else if(n.enabled)return n.id}}},{key:"subtitles",value:function(t){for(var e=this.player.textTracks(),r=0;r<e.length;r++){var n=e[r];if(void 0===t){if("showing"===n.mode)return n.label}else n.label===t?n.mode="showing":n.mode="disabled"}}},{key:"bindEventListeners",value:function(){var t=this,e=function(t){return t.preventDefault()};if(this.showSplash=this.showSplash.bind(this),this.hideSplash=this.hideSplash.bind(this),this.player.on("ended",this.showSplash),this.player.on("play",this.hideSplash),this.player.tech(!0).on("contextmenu",e),this.player.one("dispose",(function(){t.off("ended",t.showSplash),t.off("play",t.hideSplash),t.player.tech(!0).off("contextmenu",e)})),this.options.hotkeyElQuerySelector){var r=n.Z.dom.$(this.options.hotkeyElQuerySelector);r&&(this.player.on(r,"keydown",this.player.handleKeyDown),this.player.one("dispose",(function(){t.player.off(r,"keydown",t.player.handleKeyDown)})))}}},{key:"setupSeekBar",value:function(){var t=this.getSeekBarName(),e=this.player.controlBar.getChild("progressControl");e.addChild(t,this.getSeekBarOptions()),e.setSeekBarName(t)}},{key:"setupSplash",value:function(t){this._splashAdded||(this._splashAdded=!0,this.player.addChild("posterImage",Object.assign({embed:this.options.embed},t)),this.player.addChild("bigPlayButton"),this.options.autoplay?this.hideSplash():this.showSplash())}},{key:"showSplash",value:function(){this.player.hasStarted(!1),this.player.getChild("posterImage").show(),this.player.getChild("bigPlayButton").show()}},{key:"hideSplash",value:function(){this.player.getChild("posterImage").hide(),this.player.getChild("bigPlayButton").hide()}},{key:"getSeekBarOptions",value:function(){return{}}},{key:"getSeekBarName",value:function(){return"ChapterSeekBar"}}])&&tp(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();ip.options_={viewKey:null,controls:!0,playbackRates:[.25,.5,.75,1,1.25,1.5,1.75,2],playerApi:new URL("http://localhost:52000"),enableLocalCache:!0,eventLogging:!0,allowFullscreen:!0}},17111:function(t,e,r){"use strict";r.d(e,{J:function(){return ce}});var n=r(6950),o=(r(96263),r(94445));function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function u(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function l(){return l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=s(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},l.apply(null,arguments)}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}function f(t,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},f(t,e)}var p=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,r){return e=s(e),function(t,e){if(e&&("object"==i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,r||[],s(t).constructor):e.apply(t,r))}(this,e,arguments)).alwaysCollapsed=!1,t.isCollapsed=!1,t.isCollabsible=!0,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}(e,t),r=e,n=[{key:"buildCSSClass",value:function(){return"cv-create-clip-button"}},{key:"getCollabsibleName",value:function(){return this.controlText_}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){var t,r,n;(t=e,r=this,"function"==typeof(n=l(s(1&3?t.prototype:t),"handleClick",r))?function(t){return n.apply(r,t)}:n)([null])}}],n&&a(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(o.Z.getComponent("Button"));function y(t){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},y(t)}function h(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,v(n.key),n)}}function v(t){var e=function(t){if("object"!=y(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==y(e)?e:e+""}function d(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(d=function(){return!!t})()}function b(t){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},b(t)}function m(t,e){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},m(t,e)}p.prototype.controlText_="Create Clip",o.Z.registerComponent("CreateClipButton",p);var g=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=b(e),function(t,e){if(e&&("object"==y(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,d()?Reflect.construct(e,r||[],b(t).constructor):e.apply(t,r))}(this,e,[t,r])).options=r,t.ready((function(){return n.onReady()})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&m(t,e)}(e,t),r=e,(n=[{key:"onReady",value:function(){var t,e=this.player.getChild("collapserator"),r=null===(t=null==e?void 0:e.children())||void 0===t?void 0:t.findIndex((function(t){return"CustomControlSpacer"===t.name()}));r&&-1!==r&&e.addChild("CreateClipButton",{clickHandler:this.options.onClick},r+1)}}])&&h(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(o.Z.getPlugin("plugin"));function w(t){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},w(t)}function O(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,P(n.key),n)}}function P(t){var e=function(t){if("object"!=w(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=w(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==w(e)?e:e+""}function j(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(j=function(){return!!t})()}function S(t){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},S(t)}function _(t,e){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_(t,e)}o.Z.registerPlugin("createClipButtonPlugin",g);var k=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=S(e),function(t,e){if(e&&("object"==w(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,j()?Reflect.construct(e,r||[],S(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_(t,e)}(e,t),r=e,(n=[{key:"handlePictureInPictureEnabledChange",value:function(){this.enable()}}])&&O(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(o.Z.getComponent("PictureInPictureToggle"));function C(t){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},C(t)}function E(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,T(n.key),n)}}function T(t){var e=function(t){if("object"!=C(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=C(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==C(e)?e:e+""}function x(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(x=function(){return!!t})()}function L(){return L="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=R(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},L.apply(null,arguments)}function R(t){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},R(t)}function B(t,e){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},B(t,e)}o.Z.registerComponent("PictureInPictureToggle",k);var I=o.Z.getComponent("PlayToggle"),D=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=R(e),function(t,e){if(e&&("object"==C(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,x()?Reflect.construct(e,r||[],R(t).constructor):e.apply(t,r))}(this,e,[t,r])).pictureInPictureEnabled=!1,n.options=r,n.bindFunctions(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&B(t,e)}(e,t),r=e,n=[{key:"bindFunctions",value:function(){this.requestPictureInPicture=this.requestPictureInPicture.bind(this),this.exitPictureInPicture=this.exitPictureInPicture.bind(this),this.onPlayerResize=this.onPlayerResize.bind(this),this.playerRequestPictureInPictureFn=this.player.requestPictureInPicture,this.playerExitPictureInPictureFn=this.player.exitPictureInPicture,this.player.requestPictureInPicture=this.requestPictureInPicture,this.player.exitPictureInPicture=this.exitPictureInPicture}},{key:"enablePictureInPicture",value:function(){var t=this;if(this.player.options_.fluid&&!this.pictureInPictureEnabled){var e=this.getToggleParentComponent();if(e){this.pictureInPictureEnabled=!0;var r=e.children().findIndex((function(t){var e;return"fullscreentoggle"===(null===(e=t.name())||void 0===e?void 0:e.toLowerCase())}));-1===r&&(r=e.children().length-1),e.addChild("pictureInPictureToggle",{},r);var n=e.getChild("pictureInPictureToggle");null==n||n.enable(),this.player.on("playerresize",this.onPlayerResize),this.player.on("dispose",(function(){var e;null===(e=t.player)||void 0===e||e.off("playerresize",t.onPlayerResize)}))}}}},{key:"disablePictureInPicture",value:function(){if(this.pictureInPictureEnabled){this.pictureInPictureEnabled=!1;var t=this.getToggleParentComponent(),e=null==t?void 0:t.getChild("pictureInPictureToggle");e&&t.removeChild(e),this.player.off("playerresize",this.onPlayerResize)}}},{key:"togglePictureInPicture",value:function(t){if(t!==this.player.isInPictureInPicture()){var e=t?"enterpictureinpicture":"leavepictureinpicture";this.player.isInPictureInPicture(t),this.player.trigger(e),t?this.addPipStyles():this.removePipStyles()}}},{key:"onPlayerResize",value:function(){if(!this.player.isInPictureInPicture()){var t=this.player.el().getBoundingClientRect();0!==t.width&&(t.width<800?this.disablePictureInPicture():this.enablePictureInPicture())}}},{key:"addPipStyles",value:function(){this.player.addClass("cv-picture-in-picture"),this.playToggle=new I(this.player),this.playToggle.addClass("cv-pip-play-toggle"),this.player.addChild(this.playToggle),this.player.paused()?this.playToggle.handlePause():this.playToggle.handlePlay()}},{key:"removePipStyles",value:function(){this.player.removeClass("cv-picture-in-picture"),this.player.removeChild(this.playToggle),delete this.playToggle}},{key:"requestPictureInPicture",value:function(){var t;this.pictureInPictureEnabled&&(this.togglePictureInPicture(!0),"function"==typeof(null===(t=this.options)||void 0===t?void 0:t.onRequestPictureInPicture)&&this.options.onRequestPictureInPicture(!0))}},{key:"exitPictureInPicture",value:function(){this.togglePictureInPicture(!1),this.options.onRequestPictureInPicture(!1),this.removePipStyles()}},{key:"getToggleParentComponent",value:function(){return this.player.getChild("collapserator")}},{key:"dispose",value:function(){var t,r,n;this.player.requestPictureInPicture=this.playerRequestPictureInPictureFn,this.player.exitPictureInPicture=this.playerExitPictureInPictureFn,(t=e,r=this,"function"==typeof(n=L(R(1&3?t.prototype:t),"dispose",r))?function(t){return n.apply(r,t)}:n)([])}}],n&&E(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(o.Z.getPlugin("plugin"));o.Z.registerPlugin("pictureInPicture",D);var M=r(39232),A=r(69140);function N(t){return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},N(t)}function F(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Z(n.key),n)}}function Z(t){var e=function(t){if("object"!=N(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=N(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==N(e)?e:e+""}var z=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.listeners={}},e=[{key:"subscribe",value:function(t,e){this.registerListener(t,e)}},{key:"subscribeOnce",value:function(t,e){this.registerListener(t,e,1)}},{key:"unsubscribe",value:function(t,e){this.deregisterListener(t,e)}},{key:"trigger",value:function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];this.triggerCallbacks(t,r)}},{key:"registerListener",value:function(t,e,r){var n;if("string"!=typeof t)throw new Error("Event name must be a string");if("function"!=typeof e)throw new Error("Event callback must be a function");if(r&&"number"!=typeof r)throw new Error("Execution limit must be a number or undefined");this.listeners[t]=null!==(n=this.listeners[t])&&void 0!==n?n:[],this.listeners[t].push({callback:e,executionLimit:r})}},{key:"deregisterListener",value:function(t,e){var r;if("string"!=typeof t)throw new Error("Event name must be a string");if(e&&"function"!=typeof e)throw new Error("Event callback must be a function");if(e){var n=null===(r=this.listeners[t])||void 0===r?void 0:r.findIndex((function(t){return t.callback===e}));"number"==typeof n&&-1!==n&&(this.listeners[t].splice(n,1),0===this.listeners[t].length&&delete this.listeners[t])}else this.listeners[t]=[]}},{key:"triggerCallbacks",value:function(t){for(var e=this,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];if(this.listeners[t]){var i=[];this.listeners[t].forEach((function(t){var e,r;"number"==typeof t.executionLimit&&(t.executionCount=null!==(r=t.executionCount)&&void 0!==r?r:0,t.executionCount++,t.executionCount===t.executionLimit&&i.push(t.callback)),(e=t.callback).apply.apply(e,[null].concat(n))})),i.length&&i.forEach((function(r){return e.deregisterListener(t,r)}))}}}],e&&F(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}(),V=new z;function U(t){return U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},U(t)}function G(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,q(n.key),n)}}function q(t){var e=function(t){if("object"!=U(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=U(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==U(e)?e:e+""}function H(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(H=function(){return!!t})()}function W(t,e,r,n){var o=Q(Y(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function Q(){return Q="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Y(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Q.apply(null,arguments)}function Y(t){return Y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Y(t)}function K(t,e){return K=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},K(t,e)}var $=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Y(e),function(t,e){if(e&&("object"==U(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,H()?Reflect.construct(e,r||[],Y(t).constructor):e.apply(t,r))}(this,e,[t,r])).hasBuffered=!1,n.hasPlayed=!1,n.eventsService=V,n.pointOfInterest=r.pointOfInterest,n.onMouseOver=n.onMouseOver.bind(n),n.onMouseLeave=n.onMouseLeave.bind(n),n.onGlancePointOfInterestMouseEnter=n.onGlancePointOfInterestMouseEnter.bind(n),n.onGlancePointOfInterestMouseLeave=n.onGlancePointOfInterestMouseLeave.bind(n),n.initialize(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&K(t,e)}(e,t),r=e,(n=[{key:"initialize",value:function(){this.setPosition(),this.bindListeners()}},{key:"buildCSSClass",value:function(){return"cv-point-of-interest-indicator ".concat(W(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return W(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass()}),n])}},{key:"bindListeners",value:function(){this.on("mouseover",this.onMouseOver),this.on("mouseleave",this.onMouseLeave),this.eventsService.subscribe("glance:poi:mouseover",this.onGlancePointOfInterestMouseEnter),this.eventsService.subscribe("glance:poi:mouseleave",this.onGlancePointOfInterestMouseLeave)}},{key:"dispose",value:function(){this.eventsService.unsubscribe("glance:poi:mouseover",this.onGlancePointOfInterestMouseEnter),this.eventsService.unsubscribe("glance:poi:mouseleave",this.onGlancePointOfInterestMouseLeave)}},{key:"getPointOfInterestTime",value:function(){return this.pointOfInterest.startTime}},{key:"setPosition",value:function(){var t=this.player().duration();this.el_.style.left=this.getPointOfInterestTime()/t*100+"%"}},{key:"updateBuffered",value:function(t){var e=this.getPointOfInterestTime()<=t;if(e!==this.hasBuffered){this.hasBuffered=e;var r="cv-point-of-interest-indicator-buffered";this.hasBuffered?this.addClass(r):this.removeClass(r)}}},{key:"updatePlaybackProgress",value:function(t){var e=this.getPointOfInterestTime()<=t;if(e!==this.hasPlayed){this.hasPlayed=e;var r="cv-point-of-interest-indicator-played";e?this.addClass(r):this.removeClass(r)}}},{key:"toggleVisibility",value:function(t){var e="cv-point-of-interest-indicator-hidden";t?this.removeClass(e):this.addClass(e)}},{key:"onMouseOver",value:function(){this.setTimeTooltipText(),this.eventsService.trigger("player:poi:mouseover",this.pointOfInterest)}},{key:"onMouseLeave",value:function(){this.clearTimeTooltipText(),this.eventsService.trigger("player:poi:mouseleave")}},{key:"onGlancePointOfInterestMouseEnter",value:function(t){t.id===this.pointOfInterest.id&&(this.addClass("cv-point-of-interest-indicator-highlight"),this.setTimeTooltipTime(),this.setTimeTooltipText(),this.positionMouseTimeDisplay(),this.showMouseTimeDisplay())}},{key:"onGlancePointOfInterestMouseLeave",value:function(){this.removeClass("cv-point-of-interest-indicator-highlight"),this.hideMouseTimeDisplay()}},{key:"setTimeTooltipText",value:function(){var t;null===(t=this.getTimeTooltip())||void 0===t||t.setCustomChapterText(this.pointOfInterest.description)}},{key:"clearTimeTooltipText",value:function(){var t;null===(t=this.getTimeTooltip())||void 0===t||t.setCustomChapterText()}},{key:"setTimeTooltipTime",value:function(){var t=this.getTimeTooltip();null==t||t.updateTime(this.getPointOfInterestTime())}},{key:"positionMouseTimeDisplay",value:function(){var t,e,r=null===(t=this.getSeekBar())||void 0===t?void 0:t.el();if(r){var n=o.Z.dom.findPosition(r),i=this.getPointOfInterestTime()/this.player().duration();null===(e=this.getMouseTimeDisplay())||void 0===e||e.update(n,i)}}},{key:"showMouseTimeDisplay",value:function(){var t;null===(t=this.getMouseTimeDisplay())||void 0===t||t.forceShow()}},{key:"hideMouseTimeDisplay",value:function(){var t;null===(t=this.getMouseTimeDisplay())||void 0===t||t.removeForceShow()}},{key:"getSeekBar",value:function(){var t;return null===(t=this.player().controlBar.getChild("ProgressControl"))||void 0===t?void 0:t.getChild("SeekBar")}},{key:"getMouseTimeDisplay",value:function(){var t;return null===(t=this.getSeekBar())||void 0===t?void 0:t.getChild("MouseTimeDisplay")}},{key:"getTimeTooltip",value:function(){var t;return null===(t=this.getMouseTimeDisplay())||void 0===t?void 0:t.getChild("TimeTooltip")}}])&&G(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(o.Z.getComponent("Component"));function X(t){return X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},X(t)}function J(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,tt(n.key),n)}}function tt(t){var e=function(t){if("object"!=X(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=X(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==X(e)?e:e+""}function et(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(et=function(){return!!t})()}function rt(){return rt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=nt(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},rt.apply(null,arguments)}function nt(t){return nt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},nt(t)}function ot(t,e){return ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ot(t,e)}var it=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=nt(e),function(t,e){if(e&&("object"==X(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,et()?Reflect.construct(e,r||[],nt(t).constructor):e.apply(t,r))}(this,e,[t,r])).pointsOfInterestVisible=r.pointsOfInterestVisible,n.toggle(n.pointsOfInterestVisible),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ot(t,e)}(e,t),r=e,n=[{key:"handleToggle",value:function(){this.toggle(!this.pointsOfInterestVisible)}},{key:"toggle",value:function(t){t?this.toggleOn():this.toggleOff()}},{key:"toggleOn",value:function(){o.Z.dom.addClass(this.toggleEl,"on"),o.Z.dom.setAttribute(this.toggleEl,"aria-checked","true"),this.pointsOfInterestVisible=!0,this.player().pointsOfInterestPlugin().togglePointsOfInterest(this.pointsOfInterestVisible)}},{key:"toggleOff",value:function(){o.Z.dom.removeClass(this.toggleEl,"on"),o.Z.dom.setAttribute(this.toggleEl,"aria-checked","false"),this.pointsOfInterestVisible=!1,this.player().pointsOfInterestPlugin().togglePointsOfInterest(this.pointsOfInterestVisible)}},{key:"handleClick",value:function(t){t.stopImmediatePropagation()}},{key:"createEl",value:function(t,r,n){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=o.Z.dom.createEl("div",{className:"custom-toggle custom-toggle-info toggle-option float-end",innerHTML:'<span class="handle"></span></div>'}),o.Z.dom.setAttribute(this.toggleEl,"id","poi-toggle"),o.Z.dom.setAttribute(this.toggleEl,"role","switch"),this.toggleEl.addEventListener("click",this.handleToggle);var i,a,u,c=(i=e,a=this,"function"==typeof(u=rt(nt(1&3?i.prototype:i),"createEl",a))?function(t){return u.apply(a,t)}:u)([t,{className:"vjs-menu-item cv-cog-menu-item cv-poi-toggle",innerHTML:'\n <label for="poi-toggle" class="vjs-menu-item-text">Points of Interest</label>\n <span class="cv-toggle-container"></span>'},n]);return c.children[1].appendChild(this.toggleEl),c}}],n&&J(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(o.Z.getComponent("MenuItem"));function at(t){return at="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},at(t)}function ut(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ct(n.key),n)}}function ct(t){var e=function(t){if("object"!=at(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=at(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==at(e)?e:e+""}function lt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(lt=function(){return!!t})()}function st(t){return st=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},st(t)}function ft(t,e){return ft=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ft(t,e)}o.Z.registerComponent("PointsOfInterestMenuItem",it);var pt=o.Z.getPlugin("plugin"),yt="cvplayer-points-of-interest",ht=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=st(e),function(t,e){if(e&&("object"==at(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,lt()?Reflect.construct(e,r||[],st(t).constructor):e.apply(t,r))}(this,e,[t])).pointOfInterestIndicators=[],n.enabled=!0,n.pointsOfInterest=null==r?void 0:r.pointsOfInterest,n.initialize=n.initialize.bind(n),n.updateBuffered=n.updateBuffered.bind(n),n.updatePlaybackProgress=n.updatePlaybackProgress.bind(n),n.player.one("loadedmetadata",(function(){return n.player.ready(n.initialize)})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ft(t,e)}(e,t),r=e,(n=[{key:"initialize",value:function(){this.pointsOfInterest&&(A.S.hasLocalStorage()&&"false"===A.S.get(yt)&&(this.enabled=!1),this.setupTrack(),this.createPointOfInterestIndicators(),this.addMenuItem(),this.bindListeners())}},{key:"bindListeners",value:function(){var t=this;this.player.on("progress",this.updateBuffered),this.player.on("timeupdate",this.updatePlaybackProgress),this.player.on("dispose",(function(){var e,r;null===(e=t.player)||void 0===e||e.off("progress",t.updateBuffered),null===(r=t.player)||void 0===r||r.off("timeupdate",t.updatePlaybackProgress)}))}},{key:"togglePointsOfInterest",value:function(t){A.S.set(yt,t.toString()),this.pointOfInterestIndicators.forEach((function(e){return e.toggleVisibility(t)}))}},{key:"setupTrack",value:function(){var t=this.player.addTextTrack("metadata","pointsofinterest");this.pointsOfInterest.forEach((function(e){t.addCue({startTime:e.startTime,endTime:e.endTime,text:e.description})})),t.trigger({type:"loadeddata",target:t})}},{key:"createPointOfInterestIndicators",value:function(){var t,e=this,r=null===(t=this.player.controlBar.getChild("ProgressControl"))||void 0===t?void 0:t.getChild("SeekBar");this.pointsOfInterest.forEach((function(t){var n=new $(e.player,{pointOfInterest:t});e.pointOfInterestIndicators.push(n),r.addChild(n)}))}},{key:"addMenuItem",value:function(){var t;(null===(t=this.player.getChild("collapserator"))||void 0===t?void 0:t.getChild("cogButton")).addItem({index:0,ctor:it,name:"PointsOfInterestMenuItem",options:{pointsOfInterestVisible:this.enabled}})}},{key:"updateBuffered",value:function(){var t=this;this.pointOfInterestIndicators.forEach((function(e){return e.updateBuffered((0,M.b)(t.player))}))}},{key:"updatePlaybackProgress",value:function(){var t=this;this.pointOfInterestIndicators.forEach((function(e){return e.updatePlaybackProgress(t.player.currentTime())}))}}])&&ut(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(pt);function vt(t){return vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vt(t)}function dt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,bt(n.key),n)}}function bt(t){var e=function(t){if("object"!=vt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=vt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==vt(e)?e:e+""}function mt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(mt=function(){return!!t})()}function gt(t,e,r,n){var o=wt(Ot(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function wt(){return wt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ot(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},wt.apply(null,arguments)}function Ot(t){return Ot=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ot(t)}function Pt(t,e){return Pt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Pt(t,e)}o.Z.registerPlugin("pointsOfInterestPlugin",ht),r(24910);var jt=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Ot(e),function(t,e){if(e&&("object"==vt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,mt()?Reflect.construct(e,r||[],Ot(t).constructor):e.apply(t,r))}(this,e,[t,r])).initialize(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Pt(t,e)}(e,t),r=e,(n=[{key:"initialize",value:function(){this.setPosition()}},{key:"buildCSSClass",value:function(){return"cv-range-indicator ".concat(gt(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return gt(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass()}),n])}},{key:"setPosition",value:function(){var t=this.player().duration();this.el_.style.left=this.options_.time/t*100+"%"}}])&&dt(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(o.Z.getComponent("Component"));function St(t){return St="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},St(t)}function _t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,kt(n.key),n)}}function kt(t){var e=function(t){if("object"!=St(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=St(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==St(e)?e:e+""}function Ct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ct=function(){return!!t})()}function Et(t,e,r,n){var o=Tt(xt(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function Tt(){return Tt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=xt(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Tt.apply(null,arguments)}function xt(t){return xt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},xt(t)}function Lt(t,e){return Lt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Lt(t,e)}var Rt=function(t){function e(t,r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=xt(e),function(t,e){if(e&&("object"==St(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ct()?Reflect.construct(e,r||[],xt(t).constructor):e.apply(t,r))}(this,e,[t,r])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Lt(t,e)}(e,t),r=e,(n=[{key:"buildCSSClass",value:function(){return"cv-replay-view-button ".concat(Et(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return Et(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{innerHTML:'<span class="'.concat(this.options_.iconClassName,'"></span><span>').concat(this.options_.label,"</span>"),className:this.buildCSSClass()}),n])}},{key:"handleClick",value:function(){this.options_.onPress()}}])&&_t(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(o.Z.getComponent("ClickableComponent"));function Bt(t){return Bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bt(t)}function It(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Dt(n.key),n)}}function Dt(t){var e=function(t){if("object"!=Bt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Bt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Bt(e)?e:e+""}function Mt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Mt=function(){return!!t})()}function At(t,e,r,n){var o=Nt(Ft(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function Nt(){return Nt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ft(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Nt.apply(null,arguments)}function Ft(t){return Ft=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ft(t)}function Zt(t,e){return Zt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Zt(t,e)}var zt=function(t){function e(t,r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=Ft(e),function(t,e){if(e&&("object"==Bt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Mt()?Reflect.construct(e,r||[],Ft(t).constructor):e.apply(t,r))}(this,e,[t,r])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zt(t,e)}(e,t),r=e,(n=[{key:"buildCSSClass",value:function(){return"cv-replay-view ".concat(At(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){var i=At(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass()}),n]),a=o.Z.dom.createEl("h5",{innerHTML:this.localize("This clip has finished"),className:"cv-replay-heading"}),u=o.Z.dom.createEl("div",{className:"cv-button-container"}),c=new Rt(this.player_,{label:this.localize("Replay clip"),iconClassName:"cv-replay-icon",onPress:this.options_.onReplayPress}),l=new Rt(this.player_,{label:this.localize("Continue watching"),iconClassName:"cv-continue-icon",onPress:this.options_.onContinuePress});return i.appendChild(a),i.appendChild(u),u.appendChild(c.el()),u.appendChild(l.el()),i}}])&&It(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(o.Z.getComponent("Component"));function Vt(t){return Vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vt(t)}function Ut(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Gt(n.key),n)}}function Gt(t){var e=function(t){if("object"!=Vt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Vt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Vt(e)?e:e+""}function qt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(qt=function(){return!!t})()}function Ht(){return Ht="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Wt(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Ht.apply(null,arguments)}function Wt(t){return Wt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Wt(t)}function Qt(t,e){return Qt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Qt(t,e)}var Yt=function(t){function e(t,r){var n;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Wt(e),function(t,e){if(e&&("object"==Vt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,qt()?Reflect.construct(e,r||[],Wt(t).constructor):e.apply(t,r))}(this,e,[t,r])).startTime=parseFloat(r.startTime.toPrecision(4)),n.endTime=parseFloat(r.endTime.toPrecision(4)),n.dismissed=!1,n.startTime>n.endTime)throw Error("Range start cannot be greater than range end");return n.bindFunctions(),n.initialize(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Qt(t,e)}(e,t),r=e,n=[{key:"bindFunctions",value:function(){this.onReady=this.onReady.bind(this),this.onTimeUpdateOrSeeked=this.onTimeUpdateOrSeeked.bind(this),this.onReplayPress=this.onReplayPress.bind(this),this.onContinuePress=this.onContinuePress.bind(this)}},{key:"initialize",value:function(){var t=this;this.player.one("loadedmetadata",(function(){return t.player.ready(t.onReady)})),this.player.on("timeupdate",this.onTimeUpdateOrSeeked),this.player.on("seeked",this.onTimeUpdateOrSeeked)}},{key:"onReady",value:function(){this.addCssClasses(),this.showRangeIndicators(),this.addMaskToProgressBar()}},{key:"onTimeUpdateOrSeeked",value:function(){if(!this.dismissed){var t=this.player.currentTime();if(!(t<this.startTime))return t>this.endTime?(this.showReplayView(),this.disablePlayToggle(),this.player.pause(),void this.player.currentTime(this.endTime)):void 0;this.player.currentTime(this.startTime)}}},{key:"onReplayPress",value:function(){this.player.currentTime(this.startTime),this.player.play(),this.hideReplayView(),this.enablePlayToggle()}},{key:"onContinuePress",value:function(){this.dismissed=!0,this.player.play(),this.hideRangeIndicators(),this.removeMaskFromProgressBar(),this.hideReplayView(),this.enablePlayToggle(),this.removeCssClasses()}},{key:"showRangeIndicators",value:function(){var t,e=null===(t=this.player.controlBar.getChild("ProgressControl"))||void 0===t?void 0:t.getChild("SeekBar");this.startTimeIndicator||(this.startTimeIndicator=new jt(this.player,{time:this.startTime}),null==e||e.addChild(this.startTimeIndicator)),this.endTimeIndicator||(this.endTimeIndicator=new jt(this.player,{time:this.endTime}),null==e||e.addChild(this.endTimeIndicator))}},{key:"hideRangeIndicators",value:function(){var t,e;null===(t=this.startTimeIndicator)||void 0===t||t.hide(),null===(e=this.endTimeIndicator)||void 0===e||e.hide()}},{key:"addMaskToProgressBar",value:function(){var t,e=null===(t=this.player.controlBar.getChild("ProgressControl"))||void 0===t?void 0:t.getChild("SeekBar"),r=null==e?void 0:e.el().getElementsByClassName("cv-chapter-bar-items");if(r&&r.length){var n=r[0],o=this.player.duration(),i=this.startTime/o*100,a=100-this.endTime/o*100;n.style.clipPath="inset(".concat(-5,"em ").concat(a,"% ").concat(-5,"em ").concat(i,"%)")}}},{key:"removeMaskFromProgressBar",value:function(){var t,e=null===(t=this.player.controlBar.getChild("ProgressControl"))||void 0===t?void 0:t.getChild("SeekBar"),r=null==e?void 0:e.el().getElementsByClassName("cv-chapter-bar-items");r&&r.length&&(r[0].style.clipPath="")}},{key:"showReplayView",value:function(){this.replayView||(this.replayView=new zt(this.player,{onContinuePress:this.onContinuePress,onReplayPress:this.onReplayPress}),this.player.addChild(this.replayView)),this.replayView.show()}},{key:"hideReplayView",value:function(){var t;null===(t=this.replayView)||void 0===t||t.hide()}},{key:"getPlayToggle",value:function(){var t=this.player.getChild("collapserator");return null==t?void 0:t.getChild("PlayToggle")}},{key:"enablePlayToggle",value:function(){var t=this.getPlayToggle();t&&t.enable()}},{key:"disablePlayToggle",value:function(){var t=this.getPlayToggle();t&&t.disable()}},{key:"addCssClasses",value:function(){this.player.addClass("cv-range-indicator-plugin")}},{key:"removeCssClasses",value:function(){this.player.removeClass("cv-range-indicator-plugin")}},{key:"dispose",value:function(){var t,r,n,o,i,a;this.removeCssClasses(),this.player.off("timeupdate",this.onTimeUpdateOrSeeked),this.player.off("seeked",this.onTimeUpdateOrSeeked),null===(t=this.startTimeIndicator)||void 0===t||t.dispose(),null===(r=this.endTimeIndicator)||void 0===r||r.dispose(),null===(n=this.replayView)||void 0===n||n.dispose(),(o=e,i=this,"function"==typeof(a=Ht(Wt(1&3?o.prototype:o),"dispose",i))?function(t){return a.apply(i,t)}:a)([])}}],n&&Ut(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(o.Z.getPlugin("plugin"));o.Z.registerPlugin("rangeIndicatorPlugin",Yt);var Kt=r(27993);function $t(t){return $t="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},$t(t)}function Xt(){Xt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,P=O&&O(O(L([])));P&&P!==r&&n.call(P,a)&&(w=P);var j=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==$t(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function C(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function E(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 T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError($t(e)+" is not iterable")}return m.prototype=g,o(j,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(j),l(j,c,"Generator"),l(j,a,(function(){return this})),l(j,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):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),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function Jt(t){return function(t){if(Array.isArray(t))return te(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return te(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?te(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function te(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function ee(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,re(n.key),n)}}function re(t){var e=function(t){if("object"!=$t(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=$t(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==$t(e)?e:e+""}function ne(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ne=function(){return!!t})()}function oe(t,e,r,n){var o=ie(ae(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function ie(){return ie="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ae(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},ie.apply(null,arguments)}function ae(t){return ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ae(t)}function ue(t,e){return ue=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ue(t,e)}var ce=function(t){function e(t,r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=ae(e),function(t,e){if(e&&("object"==$t(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ne()?Reflect.construct(e,r||[],ae(t).constructor):e.apply(t,r))}(this,e,[t,r])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ue(t,e)}(e,t),r=e,(n=[{key:"getPlayerOptions",value:function(){var t,r=oe(e,"getPlayerOptions",this,3)([]);return(null===(t=r.devicesConfig)||void 0===t?void 0:t.canUserCastToDevices)?Object.assign(Object.assign({},r),{techOrder:["devices"].concat(Jt(r.techOrder)),devices:{instanceId:Kt.x.generateRandomId()}}):r}},{key:"configurePlugins",value:function(){var t;try{this.options.onClickCreateClip&&this.player.createClipButtonPlugin({onClick:this.options.onClickCreateClip}),this.options.onRequestPictureInPicture&&this.player.pictureInPicture({onRequestPictureInPicture:this.options.onRequestPictureInPicture}),(null===(t=this.options.pointsOfInterest)||void 0===t?void 0:t.length)&&this.player.pointsOfInterestPlugin({pointsOfInterest:this.options.pointsOfInterest})}catch(t){console.log("failed to register plugins",t)}}},{key:"setNextVideo",value:function(t,e,r){this.player.nextVideoPlugin&&this.player.nextVideoPlugin().setNextVideo(t,e,r)}},{key:"enablePictureInPicture",value:function(){var t=this.player.pictureInPicture();t&&t.enablePictureInPicture()}},{key:"disablePictureInPicture",value:function(){var t=this.player.pictureInPicture();t&&t.disablePictureInPicture()}},{key:"togglePictureInPicture",value:function(t){var e=this.player.pictureInPicture();e&&e.togglePictureInPicture(t)}},{key:"additionalSetup",value:function(t){var r,n,o,i,a,u=this,c=Object.create(null,{additionalSetup:{get:function(){return oe(e,"additionalSetup",u,1)}}});return n=this,o=void 0,i=void 0,a=Xt().mark((function e(){var n;return Xt().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c.additionalSetup.call(this,t),this.options.showResources&&t.resources&&this.player.resourcesPlugin&&this.player.resourcesPlugin({resources:t.resources.list,imageCdnUrl:this.options.imageCdnUrl}),"MasterClip"!==t.mediaType){e.next=7;break}if(null!==(n=t.additionalData)){e.next=6;break}throw Error("Invalid clip data");case 6:this.player.clipPlugin({startTime:n.startTime,endTime:n.endTime});case 7:if(!(null===(r=this.options.devicesConfig)||void 0===r?void 0:r.canUserCastToDevices)){e.next=11;break}if(this.player.devicesPlugin){e.next=10;break}return e.abrupt("return");case 10:this.player.devicesPlugin(Object.assign(Object.assign({},this.options.devicesConfig),{userId:parseInt(t.viewerId),title:t.title,analyticsService:this.analyticsService}));case 11:"MasterVideo"===t.mediaType&&this.options.startTime&&this.options.endTime&&this.player.rangeIndicatorPlugin({startTime:this.options.startTime,endTime:this.options.endTime});case 12:case"end":return e.stop()}}),e,this)})),new(i||(i=Promise))((function(t,e){function r(t){try{c(a.next(t))}catch(t){e(t)}}function u(t){try{c(a.throw(t))}catch(t){e(t)}}function c(e){var n;e.done?t(e.value):(n=e.value,n instanceof i?n:new i((function(t){t(n)}))).then(r,u)}c((a=a.apply(n,o||[])).next())}))}},{key:"setActivityStatus",value:function(t,e){this.player.activityStatusPlugin().setActivityStatus(t,e)}}])&&ee(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.r)},24910:function(t,e,r){"use strict";var n,o=r(94445);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function u(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function s(t,e){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},s(t,e)}!function(t){t.None="None",t.Complete="Complete",t.Incomplete="Incomplete"}(n||(n={}));var f=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=l(e),function(t,e){if(e&&("object"==i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,r||[],l(t).constructor):e.apply(t,r))}(this,e,[t,r])).update(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&s(t,e)}(e,t),r=e,o=[{key:"update",value:function(){this.options_.activityStatus===n.Complete?this.addClass("cv-activity-completed"):this.removeClass("cv-activity-completed")}},{key:"handleClick",value:function(){if(this.options_.activityStatus=this.getToggledActivityStatus(),this.update(),this.options_.clickHandler){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];this.options_.clickHandler.call(this,e)}}},{key:"buildCSSClass",value:function(){return"cv-activity-status-button"}},{key:"getToggledActivityStatus",value:function(){return this.options_.activityStatus===n.None||this.options_.activityStatus===n.Incomplete?n.Complete:this.options_.activityStatus===n.Complete?n.Incomplete:void 0}}],o&&a(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(o.Z.getComponent("Button"));function p(t){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p(t)}function y(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,h(n.key),n)}}function h(t){var e=function(t){if("object"!=p(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==p(e)?e:e+""}function v(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(v=function(){return!!t})()}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}function b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}f.prototype.controlText_="Complete";var m=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=d(e),function(t,e){if(e&&("object"==p(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,v()?Reflect.construct(e,r||[],d(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&b(t,e)}(e,t),r=e,(n=[{key:"setActivityStatus",value:function(t,e){var r=this;t!==this.activityStatus&&(this.activityStatus=t,this.onToggleStatus=e,this.player.ready((function(){r.renderActivityStatusButton()})))}},{key:"renderActivityStatusButton",value:function(){this.button&&this.player.removeChild(this.button),this.button=new f(this.player,{activityStatus:this.activityStatus,clickHandler:this.onToggleStatus}),this.player.addChild(this.button)}}])&&y(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(o.Z.getPlugin("plugin"));o.Z.registerPlugin("activityStatusPlugin",m)},96263:function(t,e,r){"use strict";var n=r(94445);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,a(n.key),n)}}function a(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}function u(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(u=function(){return!!t})()}function c(){return c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=l(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},c.apply(null,arguments)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function s(t,e){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},s(t,e)}var f=function(t){function e(t,r){var n;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),n=function(t,e,r){return e=l(e),function(t,e){if(e&&("object"==o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,u()?Reflect.construct(e,r||[],l(t).constructor):e.apply(t,r))}(this,e,[t]),void 0===r.startTime)throw Error("Invalid clip start");if(void 0===r.endTime)throw Error("Invalid clip end");if(r.startTime>r.endTime)throw Error("Clip start cannot be greater than clip end");return n._clipStart=parseFloat(r.startTime.toPrecision(4)),n._clipEnd=parseFloat(r.endTime.toPrecision(4)),n.playerEndedFn=n.player.ended.bind(t),n.playerDurationFn=n.player.duration.bind(t),n.playerCurrentTimeFn=n.player.currentTime.bind(t),n.playerbufferedFn=n.player.buffered.bind(t),n.player.ended=n.ended.bind(n),n.player.duration=n.duration.bind(n),n.player.currentTime=n.currentTime.bind(n),n.player.buffered=n.buffered.bind(n),n.initialize(),n.player.ready((function(){n.player.trigger("durationchange")})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&s(t,e)}(e,t),r=e,a=[{key:"clipStart",get:function(){var t=this.playerDurationFn();return this._clipStart>t?t:this._clipStart}},{key:"clipEnd",get:function(){var t=this.playerDurationFn();return t<=0?this._clipEnd:this._clipEnd>t?t:this._clipEnd}},{key:"dispose",value:function(){var t,r,n;this.player.off("timeupdate",this.onTimeUpdate),this.player.off("play",this.onPlay),this.player.ended=this.playerEndedFn,this.player.duration=this.playerDurationFn,this.player.currentTime=this.playerCurrentTimeFn,this.player.buffered=this.playerbufferedFn,this.player.trigger("durationchange"),(t=e,r=this,"function"==typeof(n=c(l(1&3?t.prototype:t),"dispose",r))?function(t){return n.apply(r,t)}:n)([])}},{key:"initialize",value:function(){this.onTimeUpdate=this.onTimeUpdate.bind(this),this.onPlay=this.onPlay.bind(this),this.player.on("timeupdate",this.onTimeUpdate),this.player.on("play",this.onPlay)}},{key:"onPlay",value:function(){this._isEnded&&this.player.currentTime(0)}},{key:"onTimeUpdate",value:function(){var t=this.getCurrentTime(!1);t>this.clipEnd?this._isEnded||(this.player.pause(),this.player.trigger("ended"),this._isEnded=!0):(this._isEnded=!1,t<this.clipStart-10&&this.playerCurrentTimeFn(this.clipStart,!0))}},{key:"ended",value:function(){return this.getCurrentTime(!1)>this.clipEnd}},{key:"duration",value:function(t){return t&&t>0&&(this.playerDurationFn()?console.info("The duration of the player has already been set. This is a no-op."):this.playerDurationFn(t)),this.clipEnd-this.clipStart}},{key:"currentTime",value:function(t){if("number"!=typeof t)return this.getCurrentTime(!0);for(var e=t+this.clipStart,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];this.playerCurrentTimeFn(e,n)}},{key:"getCurrentTime",value:function(t){var e=this.playerCurrentTimeFn(),r=0;return e>=this.clipStart&&(r=e-this.clipStart),this.player.getCache().currentTime=r,t?r:e}},{key:"buffered",value:function(){for(var t=this.playerbufferedFn(),e=[],r=0;r<t.length;r++)e[r]=[Math.max(0,t.start(r)-this.clipStart),Math.min(Math.max(0,t.end(r)-this.clipStart),this.player.duration())];return n.Z.createTimeRanges(e)}}],a&&i(r.prototype,a),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,a}(n.Z.getPlugin("plugin"));n.Z.registerPlugin("clipPlugin",f)},51976:function(t,e,r){"use strict";var n=r(94445),o=r(28788),i=r(90244);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function u(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,c(n.key),n)}}function c(t){var e=function(t){if("object"!=a(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==a(e)?e:e+""}function l(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(l=function(){return!!t})()}function s(t,e,r,n){var o=f(p(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},f.apply(null,arguments)}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}var h=n.Z.getComponent("Component"),v="cv-prevent-scrubbing-tooltip-show",d="cv-prevent-scrubbing-tooltip-remove-transition",b=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,r){return e=p(e),function(t,e){if(e&&("object"==a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,l()?Reflect.construct(e,r||[],p(t).constructor):e.apply(t,r))}(this,e,arguments)).isShowing=!1,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&y(t,e)}(e,t),r=e,n=[{key:"buildCSSClass",value:function(){return"cv-prevent-scrubbing-tooltip ".concat(s(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return s(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass(),innerText:o.vn}),n])}},{key:"show",value:function(){this.isShowing||(this.player_.userActive(!0),this.addClass(v),this.isShowing=!0)}},{key:"hide",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isShowing&&(e&&(this.addClass(d),window.requestAnimationFrame((function(){t.removeClass(d)}))),this.player_.userActive(!1),this.removeClass(v),this.isShowing=!1)}}],n&&u(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(h);function m(t){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m(t)}function g(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,w(n.key),n)}}function w(t){var e=function(t){if("object"!=m(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=m(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==m(e)?e:e+""}function O(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(O=function(){return!!t})()}function P(){return P="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=j(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},P.apply(null,arguments)}function j(t){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},j(t)}function S(t,e){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},S(t,e)}n.Z.registerComponent(o.Hx,b);var _=function(t){function e(t,r){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=j(e),function(t,e){if(e&&("object"==m(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,O()?Reflect.construct(e,r||[],j(t).constructor):e.apply(t,r))}(this,e,[t])).isEnabled=!1,n.isPreviewing=!1;var o=null!=r?r:{},i=o.furthestVisitedTime,a=void 0===i?0:i,u=o.isEnabled,c=void 0!==u&&u;return n.playerCurrentTimeFn=n.player.currentTime.bind(t),n.player.currentTime=n.currentTime.bind(n),n.onTimeUpdate=n.onTimeUpdate.bind(n),n.furthestVisitedTime=a,n.isEnabled=c,c&&n.enable(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&S(t,e)}(e,t),r=e,n=[{key:"dispose",value:function(){var t,r,n;this.player.currentTime=this.playerCurrentTimeFn,this.isEnabled&&(this.disable(),(t=e,r=this,"function"==typeof(n=P(j(1&3?t.prototype:t),"dispose",r))?function(t){return n.apply(r,t)}:n)([]))}},{key:"togglePreview",value:function(t){if(t){if(this.configurePreview(),this.isEnabled)return;this.enable(),this.isPreviewing=!0}else this.disable(),this.isPreviewing=!1}},{key:"configurePreview",value:function(){this.player.currentTime(0),this.furthestVisitedTime=0}},{key:"enable",value:function(){this.player.on("timeupdate",this.onTimeUpdate),this.getProgressControl().addChild(o.Hx),this.isEnabled=!0}},{key:"disable",value:function(){this.player.off("timeupdate",this.onTimeUpdate),this.getProgressControl().removeChild(this.getPreventScrubbingTooltip()),this.isEnabled=!1}},{key:"getProgressControl",value:function(){return this.player.controlBar.getChild("progressControl")}},{key:"onTimeUpdate",value:function(){var t=this.playerCurrentTimeFn();t>this.furthestVisitedTime&&(this.furthestVisitedTime=t)}},{key:"currentTime",value:function(t){for(var e,r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];if("number"!=typeof t)return this.playerCurrentTimeFn.apply(this,[t].concat(n));if(this.isEnabled){var u=this.getPreventScrubbingTooltip(),c=null===(e=this.getSeekBar())||void 0===e?void 0:e.getChild("MouseTimeDisplay");if(t>this.furthestVisitedTime)return u.show(),(0,i.Ds)(u.hide,o.D,!1,u)(),null==c||c.hide(),void this.playerCurrentTimeFn(this.furthestVisitedTime,n);null==c||c.show(),u.hide(!0),this.playerCurrentTimeFn(t,n)}else this.playerCurrentTimeFn.apply(this,[t].concat(n))}},{key:"getPreventScrubbingTooltip",value:function(){return this.getProgressControl().getChild(o.Hx)}},{key:"getSeekBar",value:function(){var t;return null===(t=this.player.controlBar.getChild("ProgressControl"))||void 0===t?void 0:t.getChild("SeekBar")}}],n&&g(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getPlugin("plugin"));n.Z.registerPlugin("preventScrubbingPlugin",_)},28788:function(t,e,r){"use strict";r.d(e,{D:function(){return i},Hx:function(){return o},vn:function(){return n}});var n="No skipping ahead!",o="PreventScrubbingTooltip",i=1e3},61380:function(t,e,r){"use strict";r.d(e,{e:function(){return s}});var n=r(61876);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(){i=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var o=e&&e.prototype instanceof g?e:g,i=Object.create(o.prototype),u=new R(n||[]);return a(i,"_invoke",{value:E(t,r,u)}),i}function y(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=p;var h="suspendedStart",v="suspendedYield",d="executing",b="completed",m={};function g(){}function w(){}function O(){}var P={};f(P,c,(function(){return this}));var j=Object.getPrototypeOf,S=j&&j(j(B([])));S&&S!==r&&n.call(S,c)&&(P=S);var _=O.prototype=g.prototype=Object.create(P);function k(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function C(t,e){function r(i,a,u,c){var l=y(t[i],t,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==o(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,u,c)}),(function(t){r("throw",t,u,c)})):e.resolve(f).then((function(t){s.value=t,u(s)}),(function(t){return r("throw",t,u,c)}))}c(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===b){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=T(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var l=y(e,r,n);if("normal"===l.type){if(o=n.done?b:v,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=b,n.method="throw",n.arg=l.arg)}}}function T(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,T(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=y(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function x(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 L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function B(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(o(e)+" is not iterable")}return w.prototype=O,a(_,"constructor",{value:O,configurable:!0}),a(O,"constructor",{value:w,configurable:!0}),w.displayName=f(O,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,O):(t.__proto__=O,f(t,s,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},k(C.prototype),f(C.prototype,l,(function(){return this})),e.AsyncIterator=C,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new C(p(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(_),f(_,s,"Generator"),f(_,c,(function(){return this})),f(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=B,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):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),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:B(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function u(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var c=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}))},l=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tokens={gateway:null}},e=[{key:"get",value:function(t,e){return c(this,void 0,void 0,i().mark((function r(){return i().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=this,r.next=3,fetch(t,{method:"GET",mode:"cors",headers:this.getHeaders(e)});case 3:return r.t1=r.sent,r.next=6,r.t0.parseResponse.call(r.t0,r.t1);case 6:return r.abrupt("return",r.sent);case 7:case"end":return r.stop()}}),r,this)})))}},{key:"delete",value:function(t,e){return c(this,void 0,void 0,i().mark((function r(){return i().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,fetch(t,{method:"DELETE",headers:this.getHeaders(e)});case 2:case"end":return r.stop()}}),r,this)})))}},{key:"post",value:function(t,e,r){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return c(this,void 0,void 0,i().mark((function o(){var a;return i().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,fetch(t,{method:"POST",headers:this.getHeaders(r),body:e,mode:"cors"});case 2:if(a=o.sent,!n){o.next=7;break}return o.next=6,this.parseResponse(a);case 6:return o.abrupt("return",o.sent);case 7:case"end":return o.stop()}}),o,this)})))}},{key:"put",value:function(t,e,r){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return c(this,void 0,void 0,i().mark((function o(){var a;return i().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,fetch(t,{method:"PUT",headers:this.getHeaders(r),body:e,mode:"cors"});case 2:if(a=o.sent,!n){o.next=7;break}return o.next=6,this.parseResponse(a);case 6:return o.abrupt("return",o.sent);case 7:case"end":return o.stop()}}),o,this)})))}},{key:"setToken",value:function(t,e){this.tokens[t]=e}},{key:"getHeaders",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={"Content-Type":"application/json"};return this.tokens[t.tokenName]&&(e.authorization="Bearer ".concat(this.tokens[t.tokenName])),e}},{key:"parseResponse",value:function(t){return c(this,void 0,void 0,i().mark((function e(){var r,o;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(404!==t.status){e.next=2;break}return e.abrupt("return",null);case 2:if(t.ok){e.next=15;break}return e.prev=3,e.next=6,t.json();case 6:r=e.sent,e.next=12;break;case 9:throw e.prev=9,e.t0=e.catch(3),new n.M(t.url);case 12:throw e.prev=12,new n.M(t.url,r);case 15:return e.next=17,t.json();case 17:return o=e.sent,e.abrupt("return",o);case 19:case"end":return e.stop()}}),e,null,[[3,9,12,15]])})))}}],e&&a(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}(),s=new l},90244:function(t,e,r){"use strict";r.d(e,{Ds:function(){return o},P2:function(){return n}});var n=function(t,e){var r=window.performance.now();return function(){var n=window.performance.now();n-r>=e&&(t.apply(void 0,arguments),r=n)}},o=function(t,e,r){var n,o=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window,a=function(){for(var a=arguments.length,u=new Array(a),c=0;c<a;c++)u[c]=arguments[c];var l=!1,s=function(){n=null,s=null,t.apply(this,u)};return!n&&r&&(t.apply(o,u),l=!0),i.clearTimeout(n),n=i.setTimeout(s,e),l};return a.cancel=function(){i.clearTimeout(n),n=null},a}},30708:function(t,e,r){"use strict";function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;t=t<0?0:t;var r=Math.floor(t%60),n=Math.floor(t/60%60),o=Math.floor(t/3600),i=Math.floor(e/60%60),a=Math.floor(e/3600);return(isNaN(t)||t===1/0)&&(o=n=r="-"),(o=o>0||a>0?o+":":"")+(n=((o||i>=10)&&n<10?"0"+n:n)+":")+(r<10?"0"+r:r)}r.d(e,{m:function(){return n}})},39232:function(t,e,r){"use strict";function n(t){for(var e=t.buffered(),r=t.currentTime(),n=0,o=0;o<e.length;o++){var i=e.start(o),a=e.end(o);if(i<=r&&a>=r){n=a;break}}return n}r.d(e,{b:function(){return n}})},27993:function(t,e,r){"use strict";r.d(e,{x:function(){return n}});var n={generateRandomId:function(){var t,e,r;return null!==(r=null===(e=null===(t=window.crypto)||void 0===t?void 0:t.randomUUID)||void 0===e?void 0:e.call(t))&&void 0!==r?r:Math.random().toString()}}},69140:function(t,e,r){"use strict";r.d(e,{S:function(){return o}});var n="cv-persisttest",o={hasLocalStorage:function(){try{return window.localStorage.setItem(n,"cv-player-storage-test"),window.localStorage.removeItem(n),!0}catch(t){return!1}},get:function(t){return window.localStorage.getItem(t)},set:function(t,e){window.localStorage.setItem(t,e)},remove:function(t){window.localStorage.removeItem(t)}}},94878:function(t,e,r){"use strict";r.d(e,{O:function(){return u}});var n=r(63151);function o(t,e,r){if(t.length)for(var n=t.length-1;n>=0;n--){var o=t[n];if(o.kind===e){if(r&&o.label!==r)continue;return o}}}function i(t,e,r,n){t.kind===e&&(r&&t.label!==r||(t.loaded_?n(t):t.one("loadeddata",(function(){n(t)}))))}function a(t){if(null==t?void 0:t.cues.length)for(var e=0;e<t.cues.length;e++){var r=t.cues[e];(null==r?void 0:r.text)&&(r.text=n.m.sanitize(r.text))}}var u={getTrack:function(t,e,r){return o(t.textTracks(),e,r)},useTrack:function(t,e,r,n){var a=t.textTracks(),u=o(a,e,r);if(u)i(u,e,r,n);else{var c=function(t){i(t.track,e,r,n)};a.addEventListener("addtrack",c),t.one("dispose",(function(){a.removeEventListener("addtrack",c)}))}},getCurrentTextTrack:function(t){return this.findTrackByPredicate(t,(function(t){return"showing"===t.mode}))},findTrackByPredicate:function(t,e){if(!t)return null;for(var r=t.textTracks(),n=0;n<r.length;n++){var o=r[n];if(e(o))return o}return null},forEachTrack:function(t,e){if(t)for(var r=t.textTracks(),n=0;n<r.length;n++)e(r[n])},sanitizeTrack:function(t,e){if(t&&e)if(t.loaded)a(t);else{var r=function(){return a(t)};t.addEventListener("loadeddata",r),e.one("dispose",(function(){t.removeEventListener("loadeddata",r)}))}}}},61577:function(t,e,r){var n=r(32227);t.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(t,e,r,n,o){t.propertyIsEnumerable;var i,a=t.lambda,u=t.escapeExpression;return'<iframe class="'+u(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.webPlayer:i,e))+'" id="'+u(a(null!=(i=null!=e?e.options:e)?i.id:i,e))+'" allowfullscreen webkitallowfullscreen mozallowfullscreen allow="autoplay; fullscreen" frameborder="0" width="'+u(a(null!=(i=null!=e?e.options:e)?i.width:i,e))+'" height="'+u(a(null!=(i=null!=e?e.options:e)?i.height:i,e))+'" src="'+u(a(null!=(i=null!=e?e.options:e)?i.url:i,e))+'"></iframe>\n<div class="'+u(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.svgContainer:i,e))+'">'+(null!=(i=a(null!=(i=null!=e?e.options:e)?i.playSvg:i,e))?i:"")+"</div>"},useData:!0})},58421:function(){}}]);
|
|
1
|
+
/*! For license information please see 61-de99ab5568.chunk.js.LICENSE.txt */
|
|
2
|
+
(self.webpackChunk_clickview_library_editor=self.webpackChunk_clickview_library_editor||[]).push([[61],{57e3:function(t,e,r){"use strict";r.d(e,{l:function(){return v}});var n=r(48088),o=r(39479),i=r.n(o),a=r(31647),u=r(87860);function c(t){return c="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},c(t)}function l(){l=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",s=i.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var i=e&&e.prototype instanceof g?e:g,a=Object.create(i.prototype),u=new R(n||[]);return o(a,"_invoke",{value:E(t,r,u)}),a}function y(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=p;var h="suspendedStart",v="suspendedYield",d="executing",b="completed",m={};function g(){}function w(){}function O(){}var P={};f(P,a,(function(){return this}));var j=Object.getPrototypeOf,S=j&&j(j(B([])));S&&S!==r&&n.call(S,a)&&(P=S);var _=O.prototype=g.prototype=Object.create(P);function k(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function C(t,e){function r(o,i,a,u){var l=y(t[o],t,i);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==c(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(f).then((function(t){s.value=t,a(s)}),(function(t){return r("throw",t,a,u)}))}u(l.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===b){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=T(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var l=y(e,r,n);if("normal"===l.type){if(o=n.done?b:v,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=b,n.method="throw",n.arg=l.arg)}}}function T(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,T(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=y(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function x(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 L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function B(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(c(e)+" is not iterable")}return w.prototype=O,o(_,"constructor",{value:O,configurable:!0}),o(O,"constructor",{value:w,configurable:!0}),w.displayName=f(O,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,O):(t.__proto__=O,f(t,s,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},k(C.prototype),f(C.prototype,u,(function(){return this})),e.AsyncIterator=C,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new C(p(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(_),f(_,s,"Generator"),f(_,a,(function(){return this})),f(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=B,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):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),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:B(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function s(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,f(n.key),n)}}function f(t){var e=function(t){if("object"!=c(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=c(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==c(e)?e:e+""}function p(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(p=function(){return!!t})()}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function h(t,e){return h=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},h(t,e)}var v=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=y(e),function(t,e){if(e&&("object"==c(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,p()?Reflect.construct(e,r||[],y(t).constructor):e.apply(t,r))}(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&h(t,e)}(e,t),r=e,(o=[{key:"initialize",value:function(){var t=this;this.onTimeUpdate=i().bind(this._onTimeUpdate,this),this.playbackObject=new Promise((function(e){t.setPlaybackObject=e}))}},{key:"name",get:function(){return"PlayerComponent"}},{key:"className",get:function(){return""}},{key:"template",get:function(){return function(){return"<div></div>"}}},{key:"initListeners",value:function(){this.player.on("timeupdate",this.onTimeUpdate)}},{key:"onDestroy",value:function(){this.player&&(this.player.off("timeupdate",this.onTimeUpdate),this.player.dispose())}},{key:"_onTimeUpdate",value:function(){n.Radio.channel(this.options.channelName).trigger("timeupdate",this.currentTime())}},{key:"currentTime",value:function(t){return this.player.currentTime(t)}},{key:"getChapters",value:function(){var t,e,r,n,o,i;return r=this,n=void 0,o=void 0,i=l().mark((function r(){var n;return l().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,this.playbackObject;case 2:return n=r.sent,r.abrupt("return",null!==(e=null===(t=n.chapters)||void 0===t?void 0:t.list)&&void 0!==e?e:[]);case 4:case"end":return r.stop()}}),r,this)})),new(o||(o=Promise))((function(t,e){function a(t){try{c(i.next(t))}catch(t){e(t)}}function u(t){try{c(i.throw(t))}catch(t){e(t)}}function c(e){var r;e.done?t(e.value):(r=e.value,r instanceof o?r:new o((function(t){t(r)}))).then(a,u)}c((i=i.apply(r,n||[])).next())}))}},{key:"setChapters",value:function(t){this.player.setChapters(t)}},{key:"duration",value:function(){return this.player.duration()}},{key:"onRender",value:function(){var t=this;this.player||(this.player=new u.J(this.el,{viewKey:this.model.get("viewKey"),playerApi:new URL(this.options.playerApiUrl),hotkeyElQuerySelector:"body",autoplay:!0,aspectRatio:"16:9",overflowControls:!0,inactivityTimeout:this.options.inactivityTimeout,allowFullscreen:!1}),this.player.one("cv-playback-data-loaded",(function(e){t.setPlaybackObject(e)})),this.options.channelName&&this.player.ready((function(){n.Radio.channel(t.options.channelName).trigger("player:loaded"),t.initListeners()})))}}])&&s(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(a.Q.wA)},89167:function(t,e,r){"use strict";r.d(e,{Q:function(){return K}});var n=r(86027),o=r(53019),i=r(48088),a=r(39479),u="cv-player-play",c="cv-player-pause",l="cv-player-ended",s="cv-player-chapterchange",f="cv-player-timeupdate",p="cv-player-fullscreenchange",y="cv-player-querycallback",h="cv-player-pong",v="_cvwp:fsc",d="_cvwp:devices:click",b="cv-player-seekto",m="cv-player-query",g="cv-player-ping",w="_cv:showdevicesbtn",O="_cv:showfsbtn",P="paused",j="getChapters",S=r(11306),_=r(99249),k=r(68003),C=r(31647),E=r(97779),T=r(52076),x=r(70065);function L(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{};if(t&&t.id){var r={id:t.id};return t.name&&!e.ignoreTitle&&(r.title=t.name),r}}function R(t){return R="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},R(t)}function B(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,I(n.key),n)}}function I(t){var e=function(t){if("object"!=R(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=R(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==R(e)?e:e+""}function M(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(M=function(){return!!t})()}function D(t){return D=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},D(t)}function A(t,e){return A=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},A(t,e)}var N=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,r){return e=D(e),function(t,e){if(e&&("object"==R(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,M()?Reflect.construct(e,r||[],D(t).constructor):e.apply(t,r))}(this,e,[t])).captureInterval=60,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&A(t,e)}(e,t),r=e,n=[{key:"name",get:function(){return"VideoAnalyticsTracker"}},{key:"initialize",value:function(){this.eventsApi=this.options.eventsApi,this.options.video||C.Q.Ry.throw(new S.H("Video logging requires video to be passed in.")),this.model=this.options.video,this.playbackStatus=this.getNewPlaybackStatus(),this.options.captureInterval&&(this.captureInterval=this.options.captureInterval),this.bindListeners(),this.getChapters()}},{key:"bindListeners",value:function(){this.eventsApi.on(f,a.bind(this.onPlayerTimeUpdate,this)),this.eventsApi.on(l,a.bind(this.onEnd,this)),this.eventsApi.on(p,a.bind(this.onFullScreen,this)),this.eventsApi.on(s,a.bind(this.onChapterChange,this))}},{key:"unbindListeners",value:function(){this.eventsApi.off(f),this.eventsApi.off(l),this.eventsApi.off(p),this.eventsApi.off(s)}},{key:"getChapters",value:function(){var t=this;this.queryWebplayer(j,(function(e,r){t.setInitialChapter(r),t.setVideoDuration(r)}))}},{key:"queryWebplayer",value:function(t,e){var r=a.uniqueId(this.name),n="".concat(y,"-").concat(r);this.eventsApi.one(n,e),this.eventsApi.trigger(m,t,r)}},{key:"onEnd",value:function(){this.setCurrentPosition(this.playbackStatus.totalDuration),this.logVerbose(x.UX.Finish),this.resetPlaybackStatus()}},{key:"onFullScreen",value:function(t,e){var r=e?x.UX.FullScreenEnter:x.UX.FullScreenExit;this.logVerbose(r)}},{key:"onPlayerTimeUpdate",value:function(t,e){var r=this;this.queryWebplayer(P,(function(t,n){r.updateTime(e,n)}))}},{key:"onChapterChange",value:function(t,e){a.isObject(e)&&this.setCurrentChapter(e.number)}},{key:"updateTime",value:function(t,e){var r=Math.floor(t);r&&r!==this.getCurrentPositon()&&(this.setCurrentPosition(r),e||(this.playbackHasStarted()||(this.logVerbose(x.UX.Start),this.setPlaybackStarted()),this.incrementWatchTime(),this.getWatchTime()%this.captureInterval==0&&this.logVerbose(x.UX.Playback),8===this.getWatchTime()&&this.logStream()))}},{key:"setInitialChapter",value:function(t){var e=a.find(t,(function(t){return!0===t.current}));a.isObject(e)&&this.setCurrentChapter(e.number)}},{key:"setVideoDuration",value:function(t){var e=a.reduce(t,(function(t,e){return t+e.duration}),0);!a.isNaN(e)&&a.isNumber(e)&&(this.playbackStatus.totalDuration=Math.floor(e))}},{key:"setCurrentPosition",value:function(t){this.playbackStatus.position=t}},{key:"getCurrentPositon",value:function(){return this.playbackStatus.position}},{key:"setCurrentChapter",value:function(t){this.playbackStatus.chapter=t}},{key:"setPlaybackStarted",value:function(){this.playbackStatus.hasStarted=!0}},{key:"playbackHasStarted",value:function(){return this.playbackStatus.hasStarted}},{key:"getWatchTime",value:function(){return this.playbackStatus.totalWatched}},{key:"incrementWatchTime",value:function(){this.playbackStatus.totalWatched+=1}},{key:"getNewPlaybackStatus",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e=t.duration;return{position:0,chapter:0,hasStarted:!1,totalWatched:t.watched||0,totalDuration:e||0}}},{key:"resetPlaybackStatus",value:function(){var t={duration:this.playbackStatus.totalDuration,watched:this.playbackStatus.totalWatched};this.playbackStatus=this.getNewPlaybackStatus(t)}},{key:"unbindUnload",value:function(){$(window).off("unload")}},{key:"bindUnload",value:function(){$(window).on("unload",a.bind(this.logUnload,this))}},{key:"logUnload",value:function(){this.playbackHasStarted()&&this.logVerbose(x.UX.Terminate)}},{key:"logStream",value:function(){var t,e,r,n,o,i,a,u,c=T.k.buildActionContext(this.options.analyticsOptions),l=(t=this.getPlaybackData(),e=t.model,r={id:e.id.toString(),year:e.productionYear,title:e.name,trackingCode:e.trackingCode},n=function(t){if(t&&t.code)return t.code}(e.rating),o=L(e.series),i=function(t){if(t&&t.length){var e=t[0];return{id:e.id,title:e.name}}}(e.categories),a=L(e.owner,{ignoreTitle:!0}),u=L(e.playlist),n&&(r.rating=n),a&&(r.ownerId=a.id),o&&(r.seriesId=o.id,r.series=o.title),i&&(r.category=i.title),u&&(r.playlist=u),r);E.c.log(x.Vw.Stream,l,c)}},{key:"logVerbose",value:function(t){}},{key:"getPlaybackData",value:function(){return{model:(t=this.model,t instanceof C.Q.Hn||t instanceof C.Q.FE||t instanceof i.Model||t instanceof i.Collection?t.toJSON():t),playbackStatus:a.omit(this.playbackStatus,"hasStarted")};var t}},{key:"onDestroy",value:function(){this.unbindListeners(),this.unbindUnload(),this.logUnload()}}],n&&B(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(C.Q.t6),F=r(63791),Z=r(57098),z=r(61577),V=r.n(z),U={webPlayerContainer:"SlCu8",webPlayer:"NlTKl",svgContainer:"hFe3U"};function G(t){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(t)}function q(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,H(n.key),n)}}function H(t){var e=function(t){if("object"!=G(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=G(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==G(e)?e:e+""}function W(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(W=function(){return!!t})()}function Q(t){return Q=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Q(t)}function Y(t,e){return Y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Y(t,e)}var K=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=Q(e),function(t,e){if(e&&("object"==G(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,W()?Reflect.construct(e,r||[],Q(t).constructor):e.apply(t,r))}(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Y(t,e)}(e,t),r=e,(s=[{key:"elements",get:function(){return{iframe:"iframe"}}},{key:"name",get:function(){return"WebPlayerView"}},{key:"template",get:function(){return V()}},{key:"className",get:function(){return"".concat(U.webPlayerContainer," ratio ratio-16x9")}},{key:"channelName",get:function(){return"".concat(this.name).concat(this.cid)}},{key:"defaults",get:function(){return{captureAnalytics:!0,showDevicesButton:!1}}},{key:"viewModelDefaults",get:function(){return{width:640,height:360,autoplay:!!this.options.autoplay,parameters:{s:!1,bc:!1,bf:!1,uid:this.options.currentUser.get("id"),cid:this.options.currentUser.get("customerId")},webPlayerHost:this.options.webPlayerUrl}}},{key:"initialize",value:function(){this.enableIeFs=this.isTop(),this.getViewModel()}},{key:"seekTo",value:function(t){this.eventsApi&&this.eventsApi.trigger(b,t)}},{key:"seekToChapter",value:function(t){this.eventsApi&&this.eventsApi.trigger("cv-player-changechapter",t)}},{key:"getViewModel",value:function(){var t=this.model.get("id");t||(t=this.model.get("trackingCode")),this.viewModel=_.r.get("".concat(Z._2.NAME,"-").concat(t)),this.viewModel.get("initialized")||this.initViewModel(),this.setUrl()}},{key:"initViewModel",value:function(){var t=this.model.pick("id");t.id||(t=this.model.pick("trackingCode")),t.id||t.trackingCode||C.Q.Ry.throw(new S.H("Must provide either a master id or a tracking code to ".concat(this.name)));var e=a.extend({},this.viewModelDefaults,t,this.viewModel.toJSON(),{initialized:!0});this.viewModel.set(e)}},{key:"initWebPlayerEvents",value:function(){if(this.enableIeFs){var t=this.getUI("iframe");t&&0!==t.length&&t.on("load",this.bindWebPlayerEvents.bind(this))}}},{key:"bindWebPlayerEvents",value:function(){if(!this.iframeReady){var t=this.getUI("iframe").get(0);this.eventsApi=new n.CVEventsApi(t.contentWindow),this.eventsApi.on(h,this.onPong.bind(this)),this.eventsApi.trigger(g),this.eventsApi.on(v,this.onFullscreenChange.bind(this)),this.eventsApi.trigger(O),this.eventsApi.on(f,this.onTimeUpdate.bind(this)),this.eventsApi.on(u,this.onPlay.bind(this)),this.eventsApi.on(c,this.onPause.bind(this)),this.eventsApi.on(l,this.onEnded.bind(this)),this.options.showDevicesButton&&(this.eventsApi.on(d,this.showDeviceToggle.bind(this)),this.eventsApi.trigger(w)),this.options.captureAnalytics&&(this.tracker=new N({video:this.model.toJSON(),eventsApi:this.eventsApi,analyticsOptions:this.options.analyticsOptions}))}}},{key:"unbindWebPlayerEvents",value:function(){this.eventsApi&&(this.eventsApi.off(v),this.eventsApi.off(f),this.eventsApi.off(u),this.eventsApi.off(c),this.eventsApi.off(l),this.eventsApi.off(h),this.eventsApi.off(d))}},{key:"setUrl",value:function(){var t="".concat(this.viewModel.get("webPlayerHost"),"embed"),e=a.omit(this.viewModel.get("parameters"),["p","vid"])||{};e.a=!!this.viewModel.get("autoplay");var r=this.viewModel.get("id");r&&(e.vid=r);var n=this.viewModel.get("trackingCode");n&&(e.p=n),this.viewModel.get("currenttime")&&(e.t=this.viewModel.get("currenttime"),e.a=!this.viewModel.get("paused"));var i=k._.urlBuilder(t,e),u=(0,o.signUrl)(i,{timestamp:!0});this.viewModel.set({url:u})}},{key:"isTop",value:function(){return window.top===window}},{key:"onTimeUpdate",value:function(t,e){this.viewModel.set("ready",!0),this.viewModel.set("currenttime",e)}},{key:"onPlay",value:function(){this.viewModel.set("ready",!0),this.viewModel.set("paused",!1)}},{key:"onPause",value:function(){this.viewModel.set("ready",!0),this.viewModel.set("paused",!0)}},{key:"onEnded",value:function(){this.viewModel.trigger("ended")}},{key:"onPong",value:function(){this.iframeReady=!0,this.viewModel.set("ready",!0),i.Radio.channel(this.channelName).trigger("loaded"),this.options.parentChannelName&&i.Radio.channel(this.options.parentChannelName).trigger("webplayer:loaded")}},{key:"onFullscreenChange",value:function(t,e,r){e?this.requestFs(r):this.cancelFs(r)}},{key:"requestFs",value:function(t){t||$("html").addClass("player-fullscreen")}},{key:"cancelFs",value:function(t){t||$("html").removeClass("player-fullscreen")}},{key:"showDeviceToggle",value:function(t){this.viewModel.trigger("showDevices",!!t)}},{key:"query",value:function(t,e){var r=this;if(this.iframeReady){var n=a.uniqueId("cveventsapi");this.eventsApi.one("".concat(y,"-").concat(n),(function(t,r){e(r)})),this.eventsApi.trigger(m,t,n)}else this.listenToOnce(this.channelName,"loaded",(function(){return r.query(t,e)}))}},{key:"viewOptions",value:function(){return a.extend({},{styles:U,playSvg:F.Nj.getSvg(F.vn.Play)},this.viewModel.toJSON())}},{key:"onRender",value:function(){this.initWebPlayerEvents()}},{key:"onBeforeDestroy",value:function(){this.unbindWebPlayerEvents(),this.tracker&&this.tracker.destroy()}}])&&q(r.prototype,s),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,s}(C.Q.wA)},12424:function(t,e,r){"use strict";r.d(e,{Z:function(){return f}});var n=r(94445);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,a(n.key),n)}}function a(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}function u(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(u=function(){return!!t})()}function c(){return c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=l(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},c.apply(null,arguments)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function s(t,e){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},s(t,e)}var f=function(t){function e(t,r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=l(e),function(t,e){if(e&&("object"==o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,u()?Reflect.construct(e,r||[],l(t).constructor):e.apply(t,r))}(this,e,[t,r])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&s(t,e)}(e,t),r=e,a=[{key:"createEl",value:function(){return n.Z.dom.createEl("li",{className:"vjs-menu-item cv-collapsible-menu-heading cv-divider-after-menu-item",innerHTML:'<span class="vjs-menu-item-text">'.concat(this.localize(this.options_.label),"</span>"),tabIndex:-1})}},{key:"handleClick",value:function(t){var r,n,o,i=this;(r=e,n=this,"function"==typeof(o=c(l(1&3?r.prototype:r),"handleClick",n))?function(t){return o.apply(n,t)}:o)([t]),this.options_.onClickBack?this.options_.onClickBack():this.requestAnimationFrame((function(){i.player_.getChild("collapserator").getChild("cogButton").pressButton()}))}}],a&&i(r.prototype,a),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,a}(n.Z.getComponent("MenuItem"))},4579:function(t,e,r){"use strict";r.d(e,{C:function(){return g},Z:function(){return m}});var n=r(94445),o=r(90244);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function a(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function u(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,l(n.key),n)}}function c(t,e,r){return e&&u(t.prototype,e),r&&u(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function l(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}function s(t,e,r){return e=h(e),function(t,e){if(e&&("object"==i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,f()?Reflect.construct(e,r||[],h(t).constructor):e.apply(t,r))}function f(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(f=function(){return!!t})()}function p(t,e,r,n){var o=y(h(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function y(){return y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=h(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},y.apply(null,arguments)}function h(t){return h=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},h(t)}function v(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&d(t,e)}function d(t,e){return d=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},d(t,e)}var b=n.Z.getComponent("MenuItem"),m=function(t){function e(t,r){var n;return a(this,e),(n=s(this,e,[t,r])).onChange=(0,o.Ds)(n.onChange,100,!1,n),n.bindEventListeners(),n}return v(e,t),c(e,[{key:"createEl",value:function(){var t=this.localize("Search");return p(e,"createEl",this,3)(["li",{className:"vjs-menu-item ".concat(this.options_.className||"").trim(),innerHTML:'\n <div class="cv-search-input-menu-item">\n <span class="cv-search-icon">\n <svg viewBox="0 0 24 24">\n <path d="M15.803 14.306l3.917 3.954a1 1 0 0 1-.007 1.417l-.018.018-.018.018a.997.997 0 0 1-1.41 0l-3.918-3.953-.3.214c-1.14.713-2.323 1.07-3.549 1.07-1.796 0-3.328-.642-4.597-1.925C4.634 13.836 4 12.296 4 10.5c0-1.796.634-3.328 1.903-4.597C7.172 4.634 8.704 4 10.5 4c1.796 0 3.329.634 4.597 1.903 1.27 1.269 1.904 2.801 1.904 4.597a6.447 6.447 0 0 1-1.027 3.507l-.17.3zM10.5 5.368c-1.425 0-2.637.5-3.635 1.497-.998.998-1.497 2.21-1.497 3.635 0 1.426.5 2.637 1.497 3.635.998.998 2.21 1.497 3.635 1.497 1.426 0 2.637-.499 3.635-1.497 1.027-1.026 1.54-2.238 1.54-3.635 0-1.397-.513-2.608-1.54-3.635-.998-.998-2.21-1.497-3.635-1.497z"/>\n </svg>\n </span><input placeholder="'.concat(t,'" type="text" autocomplete="off" spellcheck="false" aria-label="').concat(t,'" />\n </div>\n ')}])}},{key:"focus",value:function(){this.$("input").focus()}},{key:"handleClick",value:function(t){t.stopImmediatePropagation(),this.$("input").focus()}},{key:"handleKeyDown",value:function(){this.focus()}},{key:"bindEventListeners",value:function(){var t=this,e=this.$("input");this.onChange=this.onChange.bind(this),e.addEventListener("keyup",this.onChange),e.addEventListener("blur",(function(e){t.options_.menuButton.menu.handleBlur(e)}))}},{key:"onChange",value:function(t){var e=t.target;this.options_.search(e.value)}}])}(b);n.Z.registerComponent("SearchInputMenuItem",m);var g=function(t){function e(){return a(this,e),s(this,e,arguments)}return v(e,t),c(e,[{key:"createEl",value:function(t,r,n){return p(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:"vjs-menu-item cv-no-results"}),n])}},{key:"setLabel",value:function(t){var e=this.$(".vjs-menu-item-text");e&&(e.innerHTML=t)}}])}(b);n.Z.registerComponent("NoMatchingResultsMenuItem",g)},61876:function(t,e,r){"use strict";function n(t){return n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},n(t)}function o(t){var e="function"==typeof Map?new Map:void 0;return o=function(t){if(null===t||!function(t){try{return-1!==Function.toString.call(t).indexOf("[native code]")}catch(e){return"function"==typeof t}}(t))return t;if("function"!=typeof t)throw new TypeError("Super expression must either be null or a function");if(void 0!==e){if(e.has(t))return e.get(t);e.set(t,r)}function r(){return function(t,e,r){if(i())return Reflect.construct.apply(null,arguments);var n=[null];n.push.apply(n,e);var o=new(t.bind.apply(t,n));return r&&a(o,r.prototype),o}(t,arguments,u(this).constructor)}return r.prototype=Object.create(t.prototype,{constructor:{value:r,enumerable:!1,writable:!0,configurable:!0}}),a(r,t)},o(t)}function i(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(i=function(){return!!t})()}function a(t,e){return a=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},a(t,e)}function u(t){return u=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},u(t)}r.d(e,{M:function(){return c}});var c=function(t){function e(t,r){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(o=function(t,e,r){return e=u(e),function(t,e){if(e&&("object"==n(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,i()?Reflect.construct(e,r||[],u(t).constructor):e.apply(t,r))}(this,e,[(null==r?void 0:r.title)||"Ajax error"])).url=t,o.response=r,o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&a(t,e)}(e,t),r=e,Object.defineProperty(r,"prototype",{writable:!1}),r;var r}(o(Error))},6950:function(t,e,r){"use strict";r.d(e,{r:function(){return ip}}),r(39674);var n=r(94445);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,c(n.key),n)}}function u(t,e,r){return e&&a(t.prototype,e),r&&a(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function c(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}function l(t,e,r){return e=y(e),function(t,e){if(e&&("object"==o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,s()?Reflect.construct(e,r||[],y(t).constructor):e.apply(t,r))}function s(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(s=function(){return!!t})()}function f(t,e,r,n){var o=p(y(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function p(){return p="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=y(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},p.apply(null,arguments)}function y(t){return y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},y(t)}function h(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&v(t,e)}function v(t,e){return v=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},v(t,e)}var d=function(t){function e(t,r){return i(this,e),l(this,e,[t,r])}return h(e,t),u(e,[{key:"handleClick",value:function(t){var r=this;f(e,"handleClick",this,3)([t]),this.requestAnimationFrame((function(){r.options_.item.showCollapsibleMenu()}))}},{key:"createEl",value:function(t,r,o){if(!this.options_.item)return f(e,"createEl",this,3)([t,r,o]);var i=this.options_.item.getCollabsibleName(),a=this.options_.item.getCollabsibleValue(),u=this.options_.item.className,c='<span class="vjs-menu-item-text">'.concat(i,"</span>");this.valueHolder_=n.Z.dom.createEl("span",{innerHTML:a});var l=f(e,"createEl",this,3)([t,{className:"vjs-menu-item cv-cog-menu-item ".concat(a?"cv-has-cog-value":""," ").concat(u||"").trim(),innerHTML:c},o]);return l.appendChild(this.valueHolder_),l}},{key:"updateCollapsibleValue",value:function(){this.valueHolder_.innerHTML=this.options_.item.getCollabsibleValue()}}])}(n.Z.getComponent("MenuItem")),b=function(t){function e(t,r){var n;return i(this,e),(n=l(this,e,[t,r])).controlText("Settings"),n}return h(e,t),u(e,[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-cog-menu-button ".concat(f(e,"buildWrapperCSSClass",this,3)([]))}},{key:"buildCSSClass",value:function(){return"cv-cog-button ".concat(f(e,"buildCSSClass",this,3)([]))}},{key:"pressButton",value:function(){this.player_.options_.deferMenus?this.player_.deferMenusPlugin().deferMenu():(this.menu.children_.forEach((function(t){t.updateCollapsibleValue&&t.updateCollapsibleValue()})),f(e,"pressButton",this,3)([]))}},{key:"createItems",value:function(){for(var t,e=this,r=[],n=0;n<this.options_.items.length;n++){var o=this.options_.items[n];o.isCollabsible&&o.showInCollabsibleMenu()&&o.isCollapsed&&r.push(new d(this.player_,{item:o}))}return(null===(t=this.additionalItems)||void 0===t?void 0:t.length)&&this.additionalItems.forEach((function(t){var n,o=new t.ctor(e.player_,Object.assign(Object.assign({},e.options_),null!==(n=t.options)&&void 0!==n?n:{}));r.splice(t.index,0,o)})),r}},{key:"update",value:function(){f(e,"update",this,3)([]),this.player_.trigger("resizemenus")}},{key:"addItem",value:function(t){this.additionalItems||(this.additionalItems=[]),this.additionalItems.some((function(e){return e.name===t.name}))||(this.additionalItems.push(t),this.update())}}])}(n.Z.getComponent("MenuButton"));n.Z.registerComponent("cogButton",b);var m=r(12424);function g(t){return g="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},g(t)}function w(){return w="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=C(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},w.apply(null,arguments)}function O(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function P(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,S(n.key),n)}}function j(t,e,r){return e&&P(t.prototype,e),r&&P(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function S(t){var e=function(t){if("object"!=g(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=g(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==g(e)?e:e+""}function _(t,e,r){return e=C(e),function(t,e){if(e&&("object"==g(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,k()?Reflect.construct(e,r||[],C(t).constructor):e.apply(t,r))}function k(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(k=function(){return!!t})()}function C(t){return C=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},C(t)}function E(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&T(t,e)}function T(t,e){return T=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},T(t,e)}var x=n.Z.getComponent("MenuItem"),L=n.Z.getComponent("MenuButton"),R=["large","medium","small"],B=function(t){function e(t,r){return O(this,e),_(this,e,[t,r])}return E(e,t),j(e,[{key:"handleClick",value:function(){this.player_.textTrackSettings.setSizeSetting(this.options_.value)}}])}(x),I=function(t){function e(t,r){var n;return O(this,e),(n=_(this,e,[t,r])).alwaysCollapsed=!0,n.isCollapsed=!1,n.isCollabsible=!0,n.player_.ready((function(){n.update()})),n}return E(e,t),j(e,[{key:"createItems",value:function(){var t=this,e=this.player_.textTrackSettings;if(e){var r=e.getSizeSetting(),n=[new m.Z(this.player_,{label:"Caption Text Size",onClickBack:function(){t.requestAnimationFrame((function(){t.player_.getChild("collapserator").getChild("subsCapsButton").pressButton()}))}})];return R.map((function(e){n.push(new B(t.player_,{label:e.charAt(0).toUpperCase()+e.substring(1),selectable:!0,multiSelectable:!1,selected:e===r,value:e}))})),n}}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((t=e,r=this,"function"==typeof(n=w(C(1&3?t.prototype:t),"buildWrapperCSSClass",r))?function(t){return n.apply(r,t)}:n)([]));var t,r,n}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){L.prototype.handleClick.apply(this)}}])}(L);n.Z.registerComponent("SubtitleSizeButton",I);var M=r(94878),D=r(4579);function A(t){return A="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},A(t)}function N(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,F(n.key),n)}}function F(t){var e=function(t){if("object"!=A(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=A(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==A(e)?e:e+""}function Z(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Z=function(){return!!t})()}function z(t){return z=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},z(t)}function V(t,e){return V=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},V(t,e)}var U=function(t){function e(t,r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=z(e),function(t,e){if(e&&("object"==A(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Z()?Reflect.construct(e,r||[],z(t).constructor):e.apply(t,r))}(this,e,[t,r])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&V(t,e)}(e,t),r=e,(n=[{key:"update",value:function(t,e){var r=this;if(null==t?void 0:t.length){var n=[],o=0;t.forEach((function(t){var i=r.options_.label.substr(o,t);i&&n.push(i),n.push('<span class="cv-highlight">'),n.push(r.options_.label.substr(t,e)),n.push("</span>"),o=t+e})),n.push(this.options_.label.substring(o,this.options_.label.length)),this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(n.join(""),"</span>")}else this.el().innerHTML='<span class="vjs-menu-item-text">'.concat(this.options_.label,"</span>")}},{key:"handleClick",value:function(t){t.stopImmediatePropagation(),this.player_.currentTime(this.options_.cue.startTime)}}])&&N(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getComponent("MenuItem"));function G(t){return G="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},G(t)}function q(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,H(n.key),n)}}function H(t){var e=function(t){if("object"!=G(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=G(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==G(e)?e:e+""}function W(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(W=function(){return!!t})()}function Q(t,e,r,n){var o=Y(K(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function Y(){return Y="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=K(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Y.apply(null,arguments)}function K(t){return K=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},K(t)}function $(t,e){return $=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},$(t,e)}var X=n.Z.getComponent("MenuButton"),J=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=K(e),function(t,e){if(e&&("object"==G(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,W()?Reflect.construct(e,r||[],K(t).constructor):e.apply(t,r))}(this,e,[t,r])).alwaysCollapsed=!0,n.isCollapsed=!1,n.isCollabsible=!0,n.update=n.update.bind(n),n.search=n.search.bind(n),n.player_.textTracks().addEventListener("selectedlanguagechange",n.update),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&$(t,e)}(e,t),r=e,(n=[{key:"bindTrackEvents",value:function(t){var e=this;t.removeEventListener("loadeddata",this.update),t.addEventListener("loadeddata",this.update),this.player_.one("dispose",(function(){t.removeEventListener("loadeddata",e.update)}))}},{key:"createItems",value:function(){var t,e=M.O.getCurrentTextTrack(this.player_);if(e){if(null===(t=e.cues)||void 0===t?void 0:t.length){for(var r=[new D.Z(this.player_,{menuButton:this,search:this.search})],n=0;n<e.cues.length;n++){var o=e.cues[n];r.push(new U(this.player_,{cue:o,label:o.text,selected:!1,multiSelectable:!1}))}var i=new D.C(this.player_,{label:"No matching results",selected:!1,selectable:!1,multiSelectable:!1});return i.hide(),r.push(i),r}this.bindTrackEvents(e)}}},{key:"search",value:function(t){var e;t=t.trim();var r=M.O.getCurrentTextTrack(this.player_);if(null===(e=null==r?void 0:r.cues)||void 0===e?void 0:e.length){var n=this.findMatches(t,r);this.toggleItemVisibility(t,n),this.toggleNoResults(t,n)}}},{key:"findMatches",value:function(t,e){var r={};if(!t)return r;for(var n=new RegExp(t,"gi"),o=0;o<e.cues.length;o++){for(var i=e.cues[o].text,a=[],u=void 0;u=n.exec(i);)a.push(u.index);a.length&&(r[o]=a)}return r}},{key:"toggleItemVisibility",value:function(t,e){this.menu.children_.slice(1,this.menu.children_.length-1).forEach((function(r,n){!t||e[n]?r.show():r.hide(),r.update(e[n],t.length)}))}},{key:"toggleNoResults",value:function(t,e){var r=this.menu.children_[this.menu.children_.length-1];!t||Object.keys(e).length?r.hide():r.show()}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big cv-subtitle-search-button ".concat(Q(e,"buildWrapperCSSClass",this,3)([]))}},{key:"update",value:function(){Q(e,"update",this,3)([]),this.player_.trigger("resizemenus")}},{key:"pressButton",value:function(){Q(e,"pressButton",this,3)([]);var t=this.menu.children_[0];(null==t?void 0:t.focus)&&(null==t||t.focus())}},{key:"getCollabsibleName",value:function(){return"Subtitle Size"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!1}},{key:"showCollapsibleMenu",value:function(){X.prototype.handleClick.apply(this)}}])&&q(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(X);function tt(t){return tt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},tt(t)}function et(){return et="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ct(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},et.apply(null,arguments)}function rt(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function nt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,it(n.key),n)}}function ot(t,e,r){return e&&nt(t.prototype,e),r&&nt(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function it(t){var e=function(t){if("object"!=tt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=tt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==tt(e)?e:e+""}function at(t,e,r){return e=ct(e),function(t,e){if(e&&("object"==tt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ut()?Reflect.construct(e,r||[],ct(t).constructor):e.apply(t,r))}function ut(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ut=function(){return!!t})()}function ct(t){return ct=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ct(t)}function lt(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&st(t,e)}function st(t,e){return st=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},st(t,e)}n.Z.registerComponent("subtitleSearchButton",J);var ft=n.Z.getComponent("MenuItem"),pt=n.Z.getComponent("MenuButton"),yt=[{label:"Play / Pause",type:"play-pause"},{label:"Volume",type:"volume"},{label:"Mute",type:"mute"},{label:"Toggle fullscreen",type:"fullscreen"},{label:"Exit fullscreen",type:"exit-fullscreen"}],ht=function(t){function e(t,r){return rt(this,e),at(this,e,[t,r])}return lt(e,t),ot(e,[{key:"createEl",value:function(){return n.Z.dom.createEl("li",{className:"vjs-menu-item",tabIndex:-1,innerHTML:'\n <span class="vjs-menu-item-text">'.concat(this.options_.label,"</span>\n <span>").concat(this.getDisplayHtml(this.options_.type),"\n ")})}},{key:"getDisplayHtml",value:function(t){switch(t){case"play-pause":return'<span class="cv-keyboard-button">Spacebar</span>';case"volume":return'<span class="cv-keyboard-button">Shift</span> + \n <span class="cv-keyboard-button cv-single-key">⇑</span> / \n <span class="cv-keyboard-button">Shift</span> +\n <span class="cv-keyboard-button cv-single-key">⇓</span>';case"mute":return'<span class="cv-keyboard-button cv-single-key">m</span>';case"fullscreen":return'<span class="cv-keyboard-button cv-single-key">f</span>';case"exit-fullscreen":return'<span class="cv-keyboard-button cv-single-key">esc</span>'}return""}}])}(ft),vt=function(t){function e(){var t;return rt(this,e),(t=at(this,e,arguments)).alwaysCollapsed=!0,t.isCollapsed=!1,t.isCollabsible=!0,t}return lt(e,t),ot(e,[{key:"createItems",value:function(){var t=this,e=[];return e.push(new m.Z(this.player_,{label:"Keyboard Shortcuts"})),yt.forEach((function(r){e.push(new ht(t.player_,r))})),e}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-keyboard-shortcuts ".concat((t=e,r=this,"function"==typeof(n=et(ct(1&3?t.prototype:t),"buildWrapperCSSClass",r))?function(t){return n.apply(r,t)}:n)([]));var t,r,n}},{key:"getCollabsibleName",value:function(){return"Keyboard Shortcuts"}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!this.player_.options_.mobile}},{key:"showCollapsibleMenu",value:function(){pt.prototype.handleClick.apply(this)}}])}(pt);function dt(t){return dt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dt(t)}function bt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,mt(n.key),n)}}function mt(t){var e=function(t){if("object"!=dt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=dt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==dt(e)?e:e+""}function gt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(gt=function(){return!!t})()}function wt(t,e,r,n){var o=Ot(Pt(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function Ot(){return Ot="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Pt(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Ot.apply(null,arguments)}function Pt(t){return Pt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Pt(t)}function jt(t,e){return jt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},jt(t,e)}n.Z.registerComponent("KeyboardShortcutsButton",vt);var St="cv-collapsed",_t=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Pt(e),function(t,e){if(e&&("object"==dt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,gt()?Reflect.construct(e,r||[],Pt(t).constructor):e.apply(t,r))}(this,e,[t,r])).addChild("cogButton",{items:n.children_},n.children_.length-1),n.update=n.update.bind(n),n.player_.on("cv-updatecog",n.update),n.player_.on("playerresize",n.update),n.player_.one("play",n.update),n.player_.on("dispose",(function(){n.player_.off("cv-updatecog",n.update),n.player_.off("playerresize",n.update),n.player_.off("play",n.update)})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&jt(t,e)}(e,t),r=e,(n=[{key:"toggleHidden",value:function(t){for(var e=0;e<this.children_.length;e++){var r=this.children_[e];r.isCollabsible&&(r.alwaysCollapsed||t?(r.isCollapsed=!0,r.addClass(St)):(r.isCollapsed=!1,r.removeClass(St)))}this.getChild("cogButton").update()}},{key:"update",value:function(){var t=this.player_.isFullscreen(),e=this.player_.whiteboardModePlugin().side,r=this.player_.el().getBoundingClientRect(),n=!t||"left"!==e&&"right"!==e?r.width:r.height;if(n){this.addClass("cv-collapsorator-ready");var o=n<(!t||"left"!==e&&"right"!==e&&"top"!==e?600:1200);this.player_.options_.deferMenus&&(o=!0),this.toggleHidden(o)}}},{key:"buildCSSClass",value:function(){return"cv-collapsorator ".concat(wt(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return wt(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass()}),n])}}])&&bt(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getComponent("Component"));n.Z.registerComponent("collapserator",_t);var kt=["playToggle","volumePanel","customControlSpacer","playbackRateMenuButton","chaptersButton","qualityButton","keyboardShortcutsButton","subsCapsButton","whiteboardModeButton","subtitleSizeButton","subtitleSearchButton","fullscreenToggle"],Ct=r(4705),Et=r(81884),Tt=r(70065),xt=r(35490);function Lt(t){return Lt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lt(t)}function Rt(){Rt=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,P=O&&O(O(L([])));P&&P!==r&&n.call(P,a)&&(w=P);var j=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Lt(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function C(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function E(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 T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Lt(e)+" is not iterable")}return m.prototype=g,o(j,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(j),l(j,c,"Generator"),l(j,a,(function(){return this})),l(j,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):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),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function Bt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,It(n.key),n)}}function It(t){var e=function(t){if("object"!=Lt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Lt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Lt(e)?e:e+""}var Mt=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.options=e,this.initialize()},(e=[{key:"logStream",value:function(){var t="v:".concat(this.options.videoId);Ct.SG.cacheExists(t)||(this.collectionApiClient.log({type:Tt.Vw.WebPlayerStream,actionContext:this.getActionContext(),data:this.getAnalyticsData(),eventVersion:Tt.eq.V3}),Ct.SG&&Ct.SG.cacheSet(t,null,300))}},{key:"logVideoProgress",value:function(t){var e=this,r=this.getAnalyticsData();this.collectionApiClient.log(t.map((function(t){return{type:Tt.Vw.StreamProgress,actionContext:e.getActionContext(),data:Object.assign(Object.assign({},r),{progress:t}),eventVersion:Tt.eq.V2}})))}},{key:"logUserAction",value:function(t,e){var r=Object.assign(Object.assign({},this.getAnalyticsData()),t),n=Object.assign(Object.assign({},this.getActionContext()),e);this.collectionApiClient.log({type:e.actionType,data:r,actionContext:n,eventVersion:e.eventVersion||Tt.eq.V2})}},{key:"getAnalyticsData",value:function(){var t=Object.assign({video:{id:this.options.videoId},flags:{isUsingLocalCache:this.options.isUsingLocalCache}},this.options.additionalAnalyticsData||{});this.options.shareId&&(t.video.shareId=this.options.shareId);var e=this.getEntityType();return e===Tt.py.Interactive?t.interactive={id:+this.options.mediaId}:e===Tt.py.Clip&&(t.clip={id:+this.options.mediaId}),t}},{key:"initialize",value:function(){this.setupCollectionApiClient()}},{key:"setupCollectionApiClient",value:function(){var t=this;this.collectionApiClient=new Et.q({productName:"player.web",productVersion:this.options.productVersion,regionName:this.options.regionName,collectionApiUrls:this.options.collectionApiUrls,collectionApiClientId:this.options.collectionApiClientId,getUser:function(){return t.getCurrentUser()},shouldLog:xt.k.shouldLog,formatData:xt.k.formatData})}},{key:"getCurrentUser",value:function(){return t=this,e=void 0,r=void 0,n=Rt().mark((function t(){return Rt().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.abrupt("return",{id:this.options.userId,customerId:this.options.customerId});case 1:case"end":return t.stop()}}),t,this)})),new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}));var t,e,r,n}},{key:"getActionContext",value:function(){return{entity:this.getEntityType(),location:this.getLocationContext(),productArea:void 0,descriptor:this.options.isEmbedded?Tt.MC.Embedded:void 0,workflowPhase:void 0}}},{key:"getEntityType",value:function(){switch(this.options.mediaType){case"MasterVideo":return Tt.py.Video;case"MasterInteractive":return Tt.py.Interactive;case"MasterClip":return Tt.py.Clip}}},{key:"getLocationContext",value:function(){switch(this.options.playerType){case"player":return Tt.LZ.Player;case"interactive-player":return Tt.LZ.InteractivePlayer;case"create-clip-player":return Tt.LZ.CreateClipPlayer}}}])&&Bt(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}(),Dt=r(61380),At=r(19389),Nt=r.n(At);function Ft(t){return Ft="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ft(t)}function Zt(t,e,r){return(e=function(t){var e=function(t){if("object"!=Ft(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ft(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ft(e)?e:e+""}(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function zt(t){t.paused()?t.play():t.pause()}function Vt(t,e){t.currentTime(t.currentTime()+e)}function Ut(t,e){t.volume(t.volume()+e)}var Gt,qt=Zt(Zt(Zt(Zt(Zt(Zt(Zt(Zt(Zt(Zt({},"f",(function(t){document[t.fsApi_.fullscreenEnabled]&&(t.isFullscreen()?t.exitFullscreen():t.requestFullscreen())})),"m",(function(t){var e=t.volume(),r=t.lastVolume_();if(0===e){var n=r<.1?.1:r;t.volume(n),t.muted(!1)}else t.muted(!t.muted())})),"k",zt),"space",zt),"left",(function(t){return Vt(t,-5)})),"right",(function(t){return Vt(t,5)})),"j",(function(t){return Vt(t,-10)})),"l",(function(t){return Vt(t,10)})),"up",(function(t){return Ut(t,.05)})),"down",(function(t){return Ut(t,-.05)})),Ht=r(61876);!function(t){t.PhysicallyChapteredVideo="physically-chaptered-video"}(Gt||(Gt={}));var Wt=r(29573);function Qt(t){return Qt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qt(t)}function Yt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Kt(n.key),n)}}function Kt(t){var e=function(t){if("object"!=Qt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Qt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Qt(e)?e:e+""}function $t(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return($t=function(){return!!t})()}function Xt(){return Xt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Jt(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Xt.apply(null,arguments)}function Jt(t){return Jt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Jt(t)}function te(t,e){return te=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},te(t,e)}r(52002);var ee=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Jt(e),function(t,e){if(e&&("object"==Qt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,$t()?Reflect.construct(e,r||[],Jt(t).constructor):e.apply(t,r))}(this,e,[t])).options=r,n.configureMenuDimensions=n.configureMenuDimensions.bind(n),n.initialize(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&te(t,e)}(e,t),r=e,n=[{key:"initialize",value:function(){this.player.ready(this.configureMenuDimensions),this.player.one("play",this.configureMenuDimensions),this.player.on("resize",this.configureMenuDimensions),this.player.on("fullscreenchange",this.configureMenuDimensions),this.player.on("resizemenus",this.configureMenuDimensions),this.player.on("ready",this.configureMenuDimensions)}},{key:"dispose",value:function(){var t,r,n;this.player.off("resize",this.configureMenuDimensions),this.player.off("fullscreenchange",this.configureMenuDimensions),this.player.off("resizemenus",this.configureMenuDimensions),this.player.off("ready",this.configureMenuDimensions),(t=e,r=this,"function"==typeof(n=Xt(Jt(1&3?t.prototype:t),"dispose",r))?function(t){return n.apply(r,t)}:n)([])}},{key:"configureMenuDimensions",value:function(){var t=this,e=function(e){if(!t.options.mobile){var r=t.player.getChild("collapserator"),n=r.getChild("volumePanel"),o=r.children_.indexOf(n);r.removeChild(n),r.addChild("volumePanel",{inline:e},o),t.player.trigger("volumechange")}},r=this.player.isFullscreen();if(r&&!this.options.mobile){var n=this.player.whiteboardModePlugin().side;if(e("top"!==n),"left"===n||"right"===n||"top"===n){var o=this.player.currentWidth();return void this.player.el().querySelectorAll(".vjs-menu").forEach((function(t){t.style.paddingTop=null,t.style.marginBottom=null,t.style.width="calc(".concat(o,"px - 4em)")}))}}r||e(!0);var i=this.player.currentWidth(),a=this.player.currentHeight()/i*100,u=this.player.el().querySelector(".cv-collapsorator"),c=this.player.el().querySelectorAll(".vjs-menu"),l=u&&u.offsetHeight;l?("CreateClipSeekBar"===this.options.seekBarName&&(l+=22),c&&c.length&&c.forEach((function(e){!r&&t.options.overflowControls?e.style.paddingTop="80%":e.style.paddingTop="calc(".concat(a,"% - ").concat(l,"px)"),e.style.marginBottom="".concat(l,"px"),e.style.width=null,e.querySelector(".vjs-menu-content")&&(i<=450?t.player.addClass("cv-player-small"):t.player.removeClass("cv-player-small"))}))):this.player.one("play",this.configureMenuDimensions)}}],n&&Yt(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getPlugin("plugin"));n.Z.registerPlugin("configureMenuDimensionsPlugin",ee);var re=r(69140);function ne(t){return ne="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ne(t)}function oe(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ie(n.key),n)}}function ie(t){var e=function(t){if("object"!=ne(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ne(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ne(e)?e:e+""}function ae(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ae=function(){return!!t})()}function ue(){return ue="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ce(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},ue.apply(null,arguments)}function ce(t){return ce=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ce(t)}function le(t,e){return le=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},le(t,e)}var se=n.Z.getPlugin("plugin"),fe="cvplayer-volume",pe="cvplayer-mute",ye=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,r){return e=ce(e),function(t,e){if(e&&("object"==ne(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ae()?Reflect.construct(e,r||[],ce(t).constructor):e.apply(t,r))}(this,e,[t])).enabled=!0,r.player.ready((function(){return r.initialize()})),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&le(t,e)}(e,t),r=e,n=[{key:"initialize",value:function(){this.player.options_.mobile?this.removeVolumeControl():re.S.hasLocalStorage()&&(this.saveVolumeState=this.saveVolumeState.bind(this),this.player.on("volumechange",this.saveVolumeState),this.applyUserPreferences())}},{key:"applyUserPreferences",value:function(){var t=re.S.get(fe),e=re.S.get(pe);t&&this.player.volume(+t),e&&this.player.muted("true"===e)}},{key:"saveVolumeState",value:function(){this.enabled&&(re.S.set(fe,this.player.volume().toString()),re.S.set(pe,this.player.muted().toString()))}},{key:"removeVolumeControl",value:function(){this.player.volume(1);var t=this.player.getChild("collapserator"),e=t.getChild("volumePanel");t.removeChild(e)}},{key:"enable",value:function(){this.enabled=!0}},{key:"disable",value:function(){this.enabled=!1}},{key:"dispose",value:function(){var t,r,n;this.player.off("volumechange",this.saveVolumeState),(t=e,r=this,"function"==typeof(n=ue(ce(1&3?t.prototype:t),"dispose",r))?function(t){return n.apply(r,t)}:n)([])}}],n&&oe(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(se);function he(t){return he="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},he(t)}function ve(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,de(n.key),n)}}function de(t){var e=function(t){if("object"!=he(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=he(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==he(e)?e:e+""}function be(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(be=function(){return!!t})()}function me(t){return me=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},me(t)}function ge(t,e){return ge=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ge(t,e)}n.Z.registerPlugin("persistVolumePlugin",ye);var we=n.Z.getPlugin("plugin"),Oe="cvplayer-playback-rate",Pe=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=me(e),function(t,e){if(e&&("object"==he(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,be()?Reflect.construct(e,r||[],me(t).constructor):e.apply(t,r))}(this,e,[t])).options=r,n.player.dataLoaded((function(){return n.initialize()})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ge(t,e)}(e,t),r=e,(n=[{key:"initialize",value:function(){var t,e=this;if(re.S.hasLocalStorage()){this.savePlaybackRate=this.savePlaybackRate.bind(this),this.player.on("ratechange",this.savePlaybackRate),this.one("dispose",(function(){e.player.off("ratechange",e.savePlaybackRate)}));var r=+re.S.get(Oe);(null===(t=this.player.options_.playbackRates)||void 0===t?void 0:t.some((function(t){return t===r})))&&this.player.playbackRate(r)}}},{key:"savePlaybackRate",value:function(){var t,e=this.player.playbackRate().toString();re.S.set(Oe,e),null===(t=this.options.analyticsService)||void 0===t||t.logUserAction({rate:e},{actionType:Tt.Vw.Select,workflowPhase:Tt.eu.Complete,descriptor:Tt.UX.ChangeSpeed,entity:Tt.py.PlaybackSpeed,eventVersion:Tt.eq.V3})}}])&&ve(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(we);function je(t){return je="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},je(t)}function Se(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,_e(n.key),n)}}function _e(t){var e=function(t){if("object"!=je(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=je(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==je(e)?e:e+""}function ke(t,e){if(e&&("object"==je(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function Ce(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ce=function(){return!!t})()}function Ee(t){return Ee=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ee(t)}function Te(t,e){return Te=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Te(t,e)}n.Z.registerPlugin("persistPlaybackRatePlugin",Pe);var xe=function(t){function e(t){var r,n,o,i;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),n=this,i=[t],o=Ee(o=e),(r=ke(n,Ce()?Reflect.construct(o,i||[],Ee(n).constructor):o.apply(n,i))).fullscreenBecauseOfRotate=!1,r.player.supportsFullScreen()?(r.onRotate=r.onRotate.bind(r),r.onFullscreenChange=r.onFullscreenChange.bind(r),r.player.ready((function(){return r.initialize()})),r):ke(r)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Te(t,e)}(e,t),r=e,(n=[{key:"initialize",value:function(){this.player.on("fullscreenchange",this.onFullscreenChange),window.addEventListener("orientationchange",this.onRotate)}},{key:"dispose",value:function(){this.player.off("fullscreenchange",this.onFullscreenChange),window.removeEventListener("orientationchange",this.onRotate)}},{key:"onFullscreenChange",value:function(){this.player.isFullscreen()||(this.fullscreenBecauseOfRotate=!1)}},{key:"onRotate",value:function(){var t=this.getAngle();90===t||-90===t||270===t?(this.player.requestFullscreen(),this.fullscreenBecauseOfRotate=!0):this.fullscreenBecauseOfRotate&&this.player.isFullscreen()&&this.player.exitFullscreen()}},{key:"getAngle",value:function(){var t,e;return"number"==typeof(null===(e=null===(t=window.screen)||void 0===t?void 0:t.orientation)||void 0===e?void 0:e.angle)?window.screen.orientation.angle:0}}])&&Se(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getPlugin("plugin"));n.Z.registerPlugin("fullscreenOnRotatePlugin",xe);var Le="\n <svg viewBox='0 0 434 71'>\n <g>\n <path fill='#FFFFFF' d='M114.44 56.57l3.5 3.5a32.87 32.87 0 0 1-25.16 11.26c-19.63 0-33.62-15.54-33.62-35.16C59.16 16.55 73.16 1 92.78 1a32.31 32.31 0 0 1 24.19 10.4l-3.6 3.3a27.32 27.32 0 0 0-20.59-8.74c-16.91 0-28.39 13.5-28.39 30.21s11.48 30.21 28.39 30.21a28.08 28.08 0 0 0 21.66-9.81zM126.64 1h4.55v70.22h-4.73L126.64 1zm17.3 10.6a3.7 3.7 0 1 1 0 7.4 3.7 3.7 0 0 1 0-7.4zm-2.41 15.07h4.81v44.56h-4.81V26.67zm48 33.15l3.33 3.15a21.8 21.8 0 0 1-17.31 8.61c-12.59 0-21.76-10-21.76-22.22 0-12.22 9.17-22.22 21.76-22.22a21.84 21.84 0 0 1 16.85 8l-3.43 3.06a17.15 17.15 0 0 0-13.42-6.3c-10.09 0-16.76 8.15-16.76 17.5s6.67 17.5 16.76 17.5a17.38 17.38 0 0 0 13.98-7.08zm14.99-9.33v20.74h-4.73V1.01h4.73v47.75l20.74-19.02h6.64l-21.56 19.84L234 71.23h-7.01l-22.47-20.74z'/>\n <path fill='#F8981D' d='M304.09 19.4a5.56 5.56 0 1 1 0-11.12 5.56 5.56 0 0 1 0 11.12zm-5.56 7.27h11.11v44.56h-11.11V26.67zm61.42 22.15c0 .81 0 2.42-.09 4h-31.75c.8 3.77 5.2 8.61 11.93 8.61a17.11 17.11 0 0 0 11.66-4.31l5.38 8.16a27.23 27.23 0 0 1-17 6.1c-12.92 0-22.88-9.87-22.88-22.34s9.06-22.33 21.35-22.33c11.62-.04 21.4 9.02 21.4 22.11zm-10.77-3.76c-.18-3.68-3.58-8.62-10.67-8.62-6.91 0-10.05 4.85-10.4 8.62h21.07zM385.92 71h-6.42l-19.64-44.37h13.97l9.16 23.98 9.72-23.98h8.31l9.63 23.98 9.16-23.98h13.97L414.24 71h-6.52l-10.85-23.7L385.92 71zm-120.22.35h-6L226.11 1.01h17.01l19.42 44.18 18.08-44.18h16.91L265.7 71.35zM0 1l41 35L0 71V1z'/>\n </g>\n </svg>\n",Re=r(90244);function Be(t){return Be="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Be(t)}function Ie(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Me(n.key),n)}}function Me(t){var e=function(t){if("object"!=Be(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Be(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Be(e)?e:e+""}function De(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(De=function(){return!!t})()}function Ae(t){return Ae=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ae(t)}function Ne(t,e){return Ne=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ne(t,e)}var Fe=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Ae(e),function(t,e){if(e&&("object"==Be(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,De()?Reflect.construct(e,r||[],Ae(t).constructor):e.apply(t,r))}(this,e,[t,r])).update=(0,Re.P2)(n.update.bind(n),1e3),t.on("timeupdate",n.update),t.one("dispose",(function(){t.off("timeupdate",n.update),n.el_.removeEventListener("click",n.pause)})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ne(t,e)}(e,t),r=e,(o=[{key:"update",value:function(){var t=this.player_.currentTime();this.el_.href=this.options_.getExternalLink({currentTime:Math.round(t)})}},{key:"buildCSSClass",value:function(){return"cv-open-externally-button"}},{key:"createEl",value:function(){var t={innerHTML:Le,className:this.buildCSSClass()},e={type:"button",href:this.options_.getExternalLink({currentTime:0}),target:"_blank"},r=n.Z.dom.createEl("a",t,e);return this.createControlTextEl(r),r.addEventListener("click",this.pause.bind(this)),r}},{key:"pause",value:function(){this.player_.pause()}}])&&Ie(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n.Z.getComponent("Button"));function Ze(t){return Ze="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ze(t)}function ze(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ve(n.key),n)}}function Ve(t){var e=function(t){if("object"!=Ze(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ze(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ze(e)?e:e+""}function Ue(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ue=function(){return!!t})()}function Ge(t){return Ge=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ge(t)}function qe(t,e){return qe=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},qe(t,e)}Fe.prototype.controlText_="Open in ClickView",n.Z.registerComponent("OpenExternallyButton",Fe);var He=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Ge(e),function(t,e){if(e&&("object"==Ze(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ue()?Reflect.construct(e,r||[],Ge(t).constructor):e.apply(t,r))}(this,e,[t,r])).options=r,t.ready((function(){return n.onReady()})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qe(t,e)}(e,t),r=e,(n=[{key:"onReady",value:function(){var t=this.player.getChild("collapserator"),e=t.getChild("customControlSpacer"),r=t.children_.indexOf(e);t.addChild("OpenExternallyButton",{getExternalLink:this.options.getExternalLink},r+1)}}])&&ze(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getPlugin("plugin"));function We(t){return We="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},We(t)}function Qe(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ye(n.key),n)}}function Ye(t){var e=function(t){if("object"!=We(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=We(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==We(e)?e:e+""}function Ke(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ke=function(){return!!t})()}function $e(t,e,r,n){var o=Xe(Je(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function Xe(){return Xe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Je(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Xe.apply(null,arguments)}function Je(t){return Je=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Je(t)}function tr(t,e){return tr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},tr(t,e)}n.Z.registerPlugin("openExternallyPlugin",He);var er=function(t){function e(t,r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=Je(e),function(t,e){if(e&&("object"==We(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ke()?Reflect.construct(e,r||[],Je(t).constructor):e.apply(t,r))}(this,e,[t,r])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&tr(t,e)}(e,t),r=e,(n=[{key:"buildCSSClass",value:function(){return"cv-touch-control-ui ".concat($e(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return $e(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass()}),n])}},{key:"setUi",value:function(t,e){var r=this,n=t>0,o=n?"cv-touch-right":"cv-touch-left";this.el_.className=this.buildCSSClass()+" cv-ui-touch-active",this.el_.innerHTML="\n <div class='".concat(o,"'>\n <div class='cv-touch-text'>\n ").concat(n?"+":"").concat(10*t,"s\n </div>\n </div>\n "),window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){r.removeText()}),e)}},{key:"removeText",value:function(){this.el_.className=this.buildCSSClass(),this.el_.innerHTML=""}}])&&Qe(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getComponent("component"));function rr(t){return rr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rr(t)}function nr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,or(n.key),n)}}function or(t){var e=function(t){if("object"!=rr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=rr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==rr(e)?e:e+""}function ir(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ir=function(){return!!t})()}function ar(){return ar="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ur(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},ar.apply(null,arguments)}function ur(t){return ur=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ur(t)}function cr(t,e){return cr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},cr(t,e)}n.Z.registerComponent("TouchControls",er);var lr=n.Z.getPlugin("plugin"),sr=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,r){return e=ur(e),function(t,e){if(e&&("object"==rr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ir()?Reflect.construct(e,r||[],ur(t).constructor):e.apply(t,r))}(this,e,[t])).doubleTouchCount=0,r.seekStartTime=0,r.directionModifier=0,r.bindFunctions(),r.player.ready((function(){return r.initialize()})),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&cr(t,e)}(e,t),r=e,n=[{key:"bindFunctions",value:function(){this.onTouchStart=this.onTouchStart.bind(this),this.onTouchEnd=this.onTouchEnd.bind(this),this.reBindEventListeners=this.reBindEventListeners.bind(this),this.unBindEventListeners=this.unBindEventListeners.bind(this)}},{key:"initialize",value:function(){var t=this;this.player.addChild("TouchControls"),this.touchControls=this.player.getChild("TouchControls"),this.player.on("ready",this.reBindEventListeners),this.one("dispose",(function(){t.player.off("ready",t.reBindEventListeners)})),this.reBindEventListeners()}},{key:"reBindEventListeners",value:function(){this.unBindEventListeners(),this.tech=this.player.tech(!0),"Html5"===this.tech.name()&&(this.tech.on("touchstart",this.onTouchStart),this.tech.on("touchend",this.onTouchEnd))}},{key:"unBindEventListeners",value:function(){this.tech&&"Html5"===this.tech.name()&&(this.tech.off("touchstart",this.onTouchStart),this.tech.off("touchend",this.onTouchEnd))}},{key:"dispose",value:function(){var t,r,n;(t=e,r=this,"function"==typeof(n=ar(ur(1&3?t.prototype:t),"dispose",r))?function(t){return n.apply(r,t)}:n)([]),this.unBindEventListeners()}},{key:"onTouchStart",value:function(t){this.touchStartTime=t.timeStamp,this.userActive=this.player.userActive()}},{key:"onTouchEnd",value:function(t){var e=this;if(t.changedTouches.length){if(t.timeStamp-this.lastTouchTime<300)return this.onDoubleTouch(t),void(this.lastTouchTime=t.timeStamp);this.resetProperties(),this.lastTouchTime=t.timeStamp,t.timeStamp-this.touchStartTime<300&&window.setTimeout((function(){e.doubleTouchCount||(e.player.paused()?e.player.play():e.userActive&&e.player.pause())}),300)}}},{key:"resetProperties",value:function(){this.doubleTouchCount=0,this.seekStartTime=0,this.directionModifier=0}},{key:"onDoubleTouch",value:function(t){var e=this.player.el().getBoundingClientRect(),r=e.left+e.width/2;if(0===this.doubleTouchCount&&(this.seekStartTime=this.player.currentTime(),t.changedTouches[0].pageX<r?this.directionModifier=-1:this.directionModifier=1),this.doubleTouchCount++,this.directionModifier<0){if(10*this.doubleTouchCount>this.seekStartTime+10)return;return this.touchControls.setUi(-this.doubleTouchCount,900),void this.player.currentTime(this.player.currentTime()-10)}var n=this.player.duration()-this.seekStartTime;10*this.doubleTouchCount>n+10||(this.touchControls.setUi(this.doubleTouchCount,900),this.player.currentTime(this.player.currentTime()+10))}}],n&&nr(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(lr);function fr(t){return fr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fr(t)}function pr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,yr(n.key),n)}}function yr(t){var e=function(t){if("object"!=fr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=fr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==fr(e)?e:e+""}n.Z.registerPlugin("touchControls",sr);var hr=function(){return t=function t(e,r){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.id=r.id,this.plugin=e,this.source=r,this.enabled=this.enabled.bind(this)},(e=[{key:"enabled",value:function(t){return void 0===t?this.plugin.currentSource===this.source:(t&&this.plugin.setSource(this.source.id),t)}}])&&pr(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function vr(t){return vr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vr(t)}function dr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,br(n.key),n)}}function br(t){var e=function(t){if("object"!=vr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=vr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==vr(e)?e:e+""}function mr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(mr=function(){return!!t})()}function gr(t){return gr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},gr(t)}function wr(t,e){return wr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},wr(t,e)}var Or=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=gr(e),function(t,e){if(e&&("object"==vr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,mr()?Reflect.construct(e,r||[],gr(t).constructor):e.apply(t,r))}(this,e,[t])).options_=r,n.player.ready((function(){return n.initialize()})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&wr(t,e)}(e,t),r=e,n=[{key:"initialize",value:function(){var t=this;this.sources=[],this.qualityLevels=this.player.qualityLevels(),this.populateSources(this.options_.sources),this.onQualityChange=this.onQualityChange.bind(this),this.qualityLevels.on("change",this.onQualityChange),this.player.one("dispose",(function(){t.qualityLevels.off("change",t.onQualityChange)}))}},{key:"currentSource",get:function(){return this._currentSource}},{key:"onQualityChange",value:function(){var t=this.qualityLevels[this.qualityLevels.selectedIndex];this.player.trigger("cv-quality-change",t.id)}},{key:"setSource",value:function(t){var e=this,r=this.getSourceById(t);if(null===r)return this.currentSource;var n=this.player.currentTime(),o=!this.player.paused();this._currentSource=r;var i=this.player.playbackRate();return this.player.src({src:r.url,type:r.mimeType}),this.player.one("loadedmetadata",(function(){e.player.playbackRate(i),e.player.currentTime()!==n&&e.player.currentTime(n),o&&e.player.play()})),this.trigger({event:"sourcechange",source:r}),this.sourceChangeUpdateQualityLevels(r),r}},{key:"getSourceById",value:function(t){return this.sources.find((function(e){return e.id===t}))}},{key:"repopulateSources",value:function(t){for(var e=null;this.qualityLevels.length;)this.qualityLevels[0].enabled&&(e=this.qualityLevels[0].id),this.qualityLevels.removeQualityLevel(this.qualityLevels[0]);this.sources=[],this.populateSources(t,e)}},{key:"sortSources",value:function(t){return t.sort((function(t,e){return t.id===e.id?0:+t.id>+e.id?-1:1}))}},{key:"populateSources",value:function(t){var e=this,r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:null,n=null;(t=this.sortSources(t)).forEach((function(t){e.qualityLevels.addQualityLevel(new hr(e,t)),e.sources.push(t),e.trigger({event:"addsource",source:t}),null===r?t.default&&(n=t):t.id===r&&(n=t)})),null===n&&(n=this.sources[0]),null!==n&&this.setSource(n.id)}},{key:"sourceChangeUpdateQualityLevels",value:function(t){for(var e=this.qualityLevels,r=-1,n=0;n<e.length;n++)if(e[n].id===t.id){r=n;break}e.selectedIndex_=r,e.trigger({selectedIndex:r,type:"change"})}}],n&&dr(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getPlugin("plugin"));function Pr(t){return Pr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Pr(t)}function jr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Sr(n.key),n)}}function Sr(t){var e=function(t){if("object"!=Pr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Pr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Pr(e)?e:e+""}n.Z.registerPlugin("progressiveFiles",Or);var _r=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t)},e=[{key:"getKnownProfiles",value:function(){return["1080","720","480","360","240"]}},{key:"enableProfileOrNextBest",value:function(t,e){var r=t.getQualityLevelById(e);if(r||(r=this.getNextBestQuality(t,e)),!r)return null;for(var n=0;n<t.length;n++){var o=t[n];o.enabled=r.id===o.id}return r}},{key:"getNextBestQuality",value:function(t,e){var r=this.getKnownProfiles(),n=r.indexOf(e);if(n>=0){for(var o=n+1;o<r.length;o++){var i=r[o],a=t.getQualityLevelById(i);if(a)return a}for(var u=n-1;u>0;u--){var c=r[u],l=t.getQualityLevelById(c);if(l)return l}}return null}}],null&&jr(t.prototype,null),e&&jr(t,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function kr(t){return kr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kr(t)}function Cr(){Cr=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,P=O&&O(O(L([])));P&&P!==r&&n.call(P,a)&&(w=P);var j=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==kr(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function C(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function E(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 T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(kr(e)+" is not iterable")}return m.prototype=g,o(j,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(j),l(j,c,"Generator"),l(j,a,(function(){return this})),l(j,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):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),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function Er(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Tr(n.key),n)}}function Tr(t){var e=function(t){if("object"!=kr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=kr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==kr(e)?e:e+""}var xr=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.name=e.name,this.playbackProfile=e.playbackProfile,this.address=new URL(e.httpsAddress)},(e=[{key:"getUrl",value:function(t){return t?this.address+"cache?file="+encodeURIComponent(t):null}},{key:"ping",value:function(){return t=this,e=void 0,r=void 0,n=Cr().mark((function t(){var e,r,n,o;return Cr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=new AbortController,r=setTimeout((function(){return e.abort()}),1e3),t.prev=3,t.next=6,fetch(this.address+"ping",{method:"GET",mode:"cors",signal:e.signal});case 6:return n=t.sent,t.next=9,n.text();case 9:return o=t.sent,clearTimeout(r),t.abrupt("return","PONG"===o);case 14:return t.prev=14,t.t0=t.catch(3),t.abrupt("return",!1);case 17:case"end":return t.stop()}}),t,this,[[3,14]])})),new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}));var t,e,r,n}}])&&Er(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Lr(t){return Lr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Lr(t)}function Rr(){Rr=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,P=O&&O(O(L([])));P&&P!==r&&n.call(P,a)&&(w=P);var j=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Lr(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function C(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function E(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 T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Lr(e)+" is not iterable")}return m.prototype=g,o(j,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(j),l(j,c,"Generator"),l(j,a,(function(){return this})),l(j,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):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),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function Br(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ir(n.key),n)}}function Ir(t){var e=function(t){if("object"!=Lr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Lr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Lr(e)?e:e+""}var Mr=function(){return t=function t(e){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.player=e,this.logger=n.Z.log.createLogger("localcache")},(e=[{key:"setSource",value:function(t,e){return r=this,n=void 0,o=void 0,i=Rr().mark((function r(){var n;return Rr().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:if(!this.player.localCache||void 0===(null==t?void 0:t.src)){r.next=5;break}return r.next=3,this.player.localCache().getActiveLocalCache();case 3:null!==(n=r.sent)&&(this.logger.debug("Using Local Cache",n),t.src=n.getUrl(t.src));case 5:e(null,t);case 6:case"end":return r.stop()}}),r,this)})),new(o||(o=Promise))((function(t,e){function a(t){try{c(i.next(t))}catch(t){e(t)}}function u(t){try{c(i.throw(t))}catch(t){e(t)}}function c(e){var r;e.done?t(e.value):(r=e.value,r instanceof o?r:new o((function(t){t(r)}))).then(a,u)}c((i=i.apply(r,n||[])).next())}));var r,n,o,i}}])&&Br(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();function Dr(t){return Dr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dr(t)}function Ar(){Ar=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,P=O&&O(O(L([])));P&&P!==r&&n.call(P,a)&&(w=P);var j=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Dr(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function C(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function E(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 T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Dr(e)+" is not iterable")}return m.prototype=g,o(j,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(j),l(j,c,"Generator"),l(j,a,(function(){return this})),l(j,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):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),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function Nr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Fr(n.key),n)}}function Fr(t){var e=function(t){if("object"!=Dr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Dr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Dr(e)?e:e+""}function Zr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Zr=function(){return!!t})()}function zr(){return zr="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Vr(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},zr.apply(null,arguments)}function Vr(t){return Vr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Vr(t)}function Ur(t,e){return Ur=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ur(t,e)}n.Z.use("*",(function(t){return new Mr(t)}));var Gr='<?xml version="1.0" encoding="UTF-8"?><svg width="24px" height="24px" viewBox="0 0 24 24" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"><g id="Artboard" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd" opacity="0.9"><g id="Local-Cache" transform="translate(2.000000, 2.000000)"><rect id="Rectangle" fill="#FFFFFF" x="0" y="2.4" width="18.8" height="15.2"></rect><ellipse id="Oval" fill="#FFFFFF" cx="9.4" cy="2.4" rx="9.4" ry="2.4"></ellipse><ellipse id="Oval-Copy" fill="#FFFFFF" cx="9.4" cy="17.6" rx="9.4" ry="2.4"></ellipse><g id="Logo/Circle" transform="translate(2.500000, 3.000000)"><circle id="Oval" fill="#FFFFFF" cx="7" cy="7" r="7"></circle><polygon id="Fill-1" fill="#F8981D" points="4.66666667 2.33333333 4.66666667 11.4245258 10.0383286 6.87866667"></polygon></g></g></g></svg>',qr=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Vr(e),function(t,e){if(e&&("object"==Dr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Zr()?Reflect.construct(e,r||[],Vr(t).constructor):e.apply(t,r))}(this,e,[t,r])).hide(),n.onLocalCacheChange=n.onLocalCacheChange.bind(n),t.ready((function(){n.initialize()})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ur(t,e)}(e,t),r=e,n=[{key:"createEl",value:function(){return(t=e,r=this,"function"==typeof(n=zr(Vr(1&3?t.prototype:t),"createEl",r))?function(t){return n.apply(r,t)}:n)(["div",{className:"vjs-local-cache-indicator",innerHTML:'<div class="vjs-local-cache-indicator-icon">'.concat(Gr,"</div>"),title:"Streaming from ClickView Local Cache"}]);var t,r,n}},{key:"initialize",value:function(){var t=this;this.localCachePlugin=this.player_.localCache(),this.localCachePlugin&&(this.localCachePlugin.on("localcachechanged",this.onLocalCacheChange),this.player_.on("dispose",(function(){t.localCachePlugin.off("localcachechanged",t.onLocalCacheChange)})),this.onLocalCacheChange())}},{key:"onLocalCacheChange",value:function(){return t=this,e=void 0,r=void 0,n=Ar().mark((function t(){return Ar().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.localCachePlugin.getActiveLocalCache();case 2:t.sent?this.show():this.hide();case 4:case"end":return t.stop()}}),t,this)})),new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}));var t,e,r,n}}],n&&Nr(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getComponent("Component"));function Hr(t){return Hr="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Hr(t)}function Wr(){Wr=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,P=O&&O(O(L([])));P&&P!==r&&n.call(P,a)&&(w=P);var j=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Hr(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function C(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function E(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 T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Hr(e)+" is not iterable")}return m.prototype=g,o(j,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(j),l(j,c,"Generator"),l(j,a,(function(){return this})),l(j,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):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),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function Qr(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Yr(n.key),n)}}function Yr(t){var e=function(t){if("object"!=Hr(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Hr(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Hr(e)?e:e+""}function Kr(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Kr=function(){return!!t})()}function $r(){return $r="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Xr(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},$r.apply(null,arguments)}function Xr(t){return Xr=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Xr(t)}function Jr(t,e){return Jr=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Jr(t,e)}n.Z.registerComponent("localCacheIndicator",qr);var tn=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}))},en=function(t){function e(t,r){var o;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(o=function(t,e,r){return e=Xr(e),function(t,e){if(e&&("object"==Hr(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Kr()?Reflect.construct(e,r||[],Xr(t).constructor):e.apply(t,r))}(this,e,[t])).logger_=n.Z.log.createLogger("localcache"),void 0===r)throw Error("no options defined");return o.localCaches_=r.localCacheAddresses.map((function(t){return new xr(t)})),o.player.ready((function(){o.initialize(),r.enabled&&o.enable()})),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Jr(t,e)}(e,t),r=e,o=[{key:"isEnabled",get:function(){return this.enabled_}},{key:"enable",value:function(){this.enabled_=!0,this.resetActiveLocalCache()}},{key:"disable",value:function(){this.enabled_=!1}},{key:"getActiveLocalCache",value:function(){return this.enabled_?this.activeLocalCache_:null}},{key:"resetActiveLocalCache",value:function(){this.clearActiveLocalCache(),this.activeLocalCache_=this.getActiveLocalCacheInternal()}},{key:"clearActiveLocalCache",value:function(){this.activeLocalCache_&&(this.activeLocalCache_=null,this.onLocalCacheChange(null))}},{key:"removeLocalCache",value:function(t){this.localCaches_=this.localCaches_.filter((function(e){return e!==t}))}},{key:"dispose",value:function(){var t,r,n;(t=e,r=this,"function"==typeof(n=$r(Xr(1&3?t.prototype:t),"dispose",r))?function(t){return n.apply(r,t)}:n)([])}},{key:"initialize",value:function(){this.player.controlBar.addChild("localCacheIndicator")}},{key:"handleNetworkError",value:function(){return tn(this,void 0,void 0,Wr().mark((function t(){var e;return Wr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getActiveLocalCache();case 2:if(!(e=t.sent)){t.next=8;break}return t.next=6,e.ping();case 6:t.sent&&this.removeLocalCache(e);case 8:return this.resetActiveLocalCache(),t.next=11,this.getActiveLocalCache();case 11:return this.resetSource(),t.abrupt("return",!0);case 13:case"end":return t.stop()}}),t,this)})))}},{key:"resetSource",value:function(){for(var t=this.player.qualityLevels(),e=0;e<t.length;e++)t[e].enabled&&(t[e].enabled=!0)}},{key:"getActiveLocalCacheInternal",value:function(){return tn(this,void 0,void 0,Wr().mark((function t(){var e,r,n,o=this;return Wr().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=[],r=function(t){return tn(o,void 0,void 0,Wr().mark((function r(){return Wr().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,t.ping();case 2:if(!r.sent){r.next=4;break}e.push(t);case 4:case"end":return r.stop()}}),r)})))},t.next=4,Promise.all(this.localCaches_.map((function(t){return r(t)})));case 4:if(!(e.length>0)){t.next=8;break}return n=e[0],this.onLocalCacheChange(n),t.abrupt("return",n);case 8:return t.abrupt("return",null);case 9:case"end":return t.stop()}}),t,this)})))}},{key:"onLocalCacheChange",value:function(t){this.logger_.debug("Local Cache changed",t),this.trigger("localcachechanged",{localCache:t});var e=!1;t&&t.playbackProfile&&(this.logger_.debug("Changing active profile for local cache",t.playbackProfile),_r.enableProfileOrNextBest(this.player.qualityLevels(),t.playbackProfile),e=!0),e||this.player.src(this.player.src())}}],o&&Qr(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n.Z.getPlugin("plugin"));function rn(t){return rn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},rn(t)}function nn(){nn=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,P=O&&O(O(L([])));P&&P!==r&&n.call(P,a)&&(w=P);var j=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==rn(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function C(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function E(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 T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(rn(e)+" is not iterable")}return m.prototype=g,o(j,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(j),l(j,c,"Generator"),l(j,a,(function(){return this})),l(j,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):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),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function on(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,an(n.key),n)}}function an(t){var e=function(t){if("object"!=rn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=rn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==rn(e)?e:e+""}function un(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(un=function(){return!!t})()}function cn(){return cn="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ln(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},cn.apply(null,arguments)}function ln(t){return ln=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ln(t)}function sn(t,e){return sn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},sn(t,e)}n.Z.registerPlugin("localCache",en);var fn=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}))},pn=function(t){function e(t,r){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(o=function(t,e,r){return e=ln(e),function(t,e){if(e&&("object"==rn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,un()?Reflect.construct(e,r||[],ln(t).constructor):e.apply(t,r))}(this,e,[t])).playerApi=r.playerApi,o.fileToken=r.fileToken,o.logger=n.Z.log.createLogger("video-signature-expiry-plugin"),o.bindErrorHandlers(),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&sn(t,e)}(e,t),r=e,o=[{key:"bindErrorHandlers",value:function(){this.onError=this.onError.bind(this),this.player.on("error",this.onError)}},{key:"dispose",value:function(){var t,r,n;this.player.off("error",this.onError),(t=e,r=this,"function"==typeof(n=cn(ln(1&3?t.prototype:t),"dispose",r))?function(t){return n.apply(r,t)}:n)([])}},{key:"onError",value:function(){return fn(this,void 0,void 0,nn().mark((function t(){var e,r=this;return nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if((e=this.player.error().code)===MediaError.MEDIA_ERR_NETWORK||e===MediaError.MEDIA_ERR_SRC_NOT_SUPPORTED){t.next=3;break}return t.abrupt("return");case 3:return t.next=5,this.player.localCache().getActiveLocalCache();case 5:if(!t.sent){t.next=8;break}return this.callErrorHandler((function(){return r.player.localCache().handleNetworkError()})),t.abrupt("return");case 8:this.callErrorHandler((function(){return r.handleVideoSignatureExpiry()}));case 9:case"end":return t.stop()}}),t,this)})))}},{key:"handleVideoSignatureExpiry",value:function(){return fn(this,void 0,void 0,nn().mark((function t(){var e,r;return nn().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(this.playerApi&&this.fileToken){t.next=2;break}return t.abrupt("return",!1);case 2:if(!(this.refetchedSourcesTimestamp+9e5>Date.now())){t.next=4;break}return t.abrupt("return",!1);case 4:return this.refetchedSourcesTimestamp=Date.now(),e=null,t.prev=6,this.logger.debug("Detected expired mp4 urls, attempting to refetch"),r="".concat(this.playerApi.origin,"/api/files?fileToken=").concat(this.fileToken),t.next=11,Dt.e.get(r);case 11:e=t.sent,t.next=18;break;case 14:return t.prev=14,t.t0=t.catch(6),this.logger.error("Failed to refetch expired mp4 urls"),t.abrupt("return",!1);case 18:return this.logger.debug("Mp4 urls successfully refetched"),this.player.progressiveFiles().repopulateSources(e.progressive.map((function(t){return{id:t.profile,mimeType:t.mimeType,url:t.url}}))),this.fileToken=e.fileToken,t.abrupt("return",!0);case 22:case"end":return t.stop()}}),t,this,[[6,14]])})))}},{key:"callErrorHandler",value:function(t){return fn(this,void 0,void 0,nn().mark((function e(){var r,n,o,i,a=this;return nn().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return r=this.player.currentTime(),n=!this.player.paused(),o=this.player.playbackRate(),i=function(){a.player.playbackRate(o),a.player.currentTime(r),n&&a.player.play(),a.player.error(null)},this.player.one("loadedmetadata",i),e.next=7,t();case 7:if(!e.sent){e.next=9;break}return e.abrupt("return");case 9:this.player.off("loadedmetadata",i);case 10:case"end":return e.stop()}}),e,this)})))}}],o&&on(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n.Z.getPlugin("plugin"));function yn(t){return yn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},yn(t)}function hn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,vn(n.key),n)}}function vn(t){var e=function(t){if("object"!=yn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=yn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==yn(e)?e:e+""}function dn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(dn=function(){return!!t})()}function bn(t){return bn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},bn(t)}function mn(t,e){return mn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},mn(t,e)}n.Z.registerPlugin("handleNetworkErrors",pn);var gn=n.Z.getPlugin("plugin"),wn="cvplayer-show-subtitles",On="cvplayer-selected-language",Pn="cvplayer-subtitle-size",jn=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=bn(e),function(t,e){if(e&&("object"==yn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,dn()?Reflect.construct(e,r||[],bn(t).constructor):e.apply(t,r))}(this,e,[t])).options=r,n.initialize(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&mn(t,e)}(e,t),r=e,(n=[{key:"initialize",value:function(){this.applyUserPreferences=this.applyUserPreferences.bind(this),this.player.textTracks().length&&(this.bindEventListeners(),this.applyUserPreferences())}},{key:"applyUserPreferences",value:function(){var t=!!this.options.showSubtitles,e=this.safeGet(wn);if("true"===e&&(t=!0),"false"===e&&(t=!1),t){var r=this.guessWhichTrack();r&&(r.mode="showing")}else this.disableSubtitles();var n=this.safeGet(Pn);n||(n=this.options.subtitleSize),this.player.options_.mobile&&(n="medium"),n&&this.player.textTrackSettings.setSizeSetting(n)}},{key:"safeGet",value:function(t){if(re.S.hasLocalStorage())return re.S.get(t)}},{key:"onSelectedLanguageChange",value:function(){for(var t,e,r=this.player.textTracks(),n=0;n<r.length;n++){var o=r[n];if("showing"===o.mode)return re.S.set(wn,"true"),re.S.set(On,o.language),void(null===(t=this.options.analyticsService)||void 0===t||t.logUserAction({language:o.language},{actionType:Tt.Vw.Select,entity:Tt.py.Subtitle,workflowPhase:Tt.eu.Complete,descriptor:Tt.DL.On}))}re.S.set(wn,"false"),re.S.remove(On),null===(e=this.options.analyticsService)||void 0===e||e.logUserAction({language:""},{actionType:Tt.Vw.Select,entity:Tt.py.Subtitle,workflowPhase:Tt.eu.Complete,descriptor:Tt.DL.Off,eventVersion:Tt.eq.V3})}},{key:"bindEventListeners",value:function(){var t=this;re.S.hasLocalStorage()&&(this.onSelectedLanguageChange=this.onSelectedLanguageChange.bind(this),this.onChangeSubtitleSize=this.onChangeSubtitleSize.bind(this),this.player.on("cv:languageselected",this.onSelectedLanguageChange),this.player.on("changesubtitlesize",this.onChangeSubtitleSize),this.one("dispose",(function(){t.player.off("cv:languageselected",t.onSelectedLanguageChange),t.player.off("changesubtitlesize",t.onChangeSubtitleSize)})))}},{key:"onChangeSubtitleSize",value:function(){var t=this.player.textTrackSettings.getSizeSetting();re.S.set(Pn,t)}},{key:"guessWhichTrack",value:function(){for(var t,e,r=this.safeGet(On)||window.navigator.language,n=this.getLanguageParts(r),o=n.language,i=n.country,a=this.player.textTracks(),u=0;u<a.length;u++){var c=a[u],l=this.getLanguageParts(c.language),s=l.language,f=l.country;if(s===o&&(t=c,f||(e=c),f===i))return t}return e||t||null}},{key:"getLanguageParts",value:function(t){var e=t.toLowerCase().split("-");return{language:e[0],country:e[1]}}},{key:"disableSubtitles",value:function(){for(var t=this.player.textTracks(),e=0;e<t.length;e++)t[e].mode="disabled"}},{key:"previewModeSubtitles",value:function(){var t=this.guessWhichTrack();t&&(t.mode="showing"),this.player.off("changesubtitlesize",this.onChangeSubtitleSize),this.player.textTrackSettings.setSizeSetting("large"),this.player.on("changesubtitlesize",this.onChangeSubtitleSize)}}])&&hn(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(gn);function Sn(t){return Sn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Sn(t)}function _n(){_n=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,P=O&&O(O(L([])));P&&P!==r&&n.call(P,a)&&(w=P);var j=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Sn(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function C(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function E(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 T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Sn(e)+" is not iterable")}return m.prototype=g,o(j,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(j),l(j,c,"Generator"),l(j,a,(function(){return this})),l(j,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):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),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function kn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Cn(n.key),n)}}function Cn(t){var e=function(t){if("object"!=Sn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Sn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Sn(e)?e:e+""}function En(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(En=function(){return!!t})()}function Tn(t){return Tn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Tn(t)}function xn(t,e){return xn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},xn(t,e)}n.Z.registerPlugin("persistSubtitleSettingsPlugin",jn);var Ln=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}))},Rn=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Tn(e),function(t,e){if(e&&("object"==Sn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,En()?Reflect.construct(e,r||[],Tn(t).constructor):e.apply(t,r))}(this,e,[t])).options=r,n.player.ready((function(){return n.initialize()})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&xn(t,e)}(e,t),r=e,(n=[{key:"initialize",value:function(){return Ln(this,void 0,void 0,_n().mark((function t(){var e,r,n,o,i=this;return _n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.getActiveLocalCache();case 2:if(e=t.sent,(r=e?this.options.playbackProfileLocalCache:this.options.playbackProfile)||(r="1080"),re.S.hasLocalStorage()&&(n=re.S.get(this.getStorageKey(!!e)))&&(r=n),o=this.player.qualityLevels(),(null==e?void 0:e.playbackProfile)||_r.enableProfileOrNextBest(o,r),re.S.hasLocalStorage()){t.next=10;break}return t.abrupt("return");case 10:this.onQualityLevelsChange=this.onQualityLevelsChange.bind(this),o.on("change",this.onQualityLevelsChange),this.on("dispose",(function(){o.off("change",i.onQualityLevelsChange)}));case 13:case"end":return t.stop()}}),t,this)})))}},{key:"onQualityLevelsChange",value:function(){var t;return Ln(this,void 0,void 0,_n().mark((function e(){var r,n,o;return _n().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:return e.next=2,this.isLocalCacheActive();case 2:r=e.sent,n=this.player.qualityLevels(),o=n[n.selectedIndex],re.S.set(this.getStorageKey(r),o.id),null===(t=this.options.analyticsService)||void 0===t||t.logUserAction({quality:o.id},{actionType:Tt.Vw.Select,workflowPhase:Tt.eu.Complete,descriptor:Tt.UX.ChangeResolution,entity:Tt.py.Resolution,eventVersion:Tt.eq.V3});case 7:case"end":return e.stop()}}),e,this)})))}},{key:"isLocalCacheActive",value:function(){return Ln(this,void 0,void 0,_n().mark((function t(){return _n().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return t.next=2,this.player.localCache().getActiveLocalCache();case 2:return t.abrupt("return",!!t.sent);case 3:case"end":return t.stop()}}),t,this)})))}},{key:"getActiveLocalCache",value:function(){return this.player.localCache().getActiveLocalCache()}},{key:"getStorageKey",value:function(t){return t?"cvplayer-localcache-playback-quality":"cvplayer-playback-quality"}}])&&kn(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getPlugin("plugin"));function Bn(t){return Bn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bn(t)}function In(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function Mn(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Dn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Nn(n.key),n)}}function An(t,e,r){return e&&Dn(t.prototype,e),r&&Dn(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Nn(t){var e=function(t){if("object"!=Bn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Bn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Bn(e)?e:e+""}function Fn(t,e,r){return e=zn(e),function(t,e){if(e&&("object"==Bn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Zn()?Reflect.construct(e,r||[],zn(t).constructor):e.apply(t,r))}function Zn(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Zn=function(){return!!t})()}function zn(t){return zn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},zn(t)}function Vn(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Un(t,e)}function Un(t,e){return Un=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Un(t,e)}n.Z.registerPlugin("persistQualitySettingsPlugin",Rn);var Gn=n.Z.getComponent("Component"),qn=function(t){function e(t,r){return Mn(this,e),Fn(this,e,[t,r])}return Vn(e,t),An(e,[{key:"createEl",value:function(){return n.Z.dom.createEl("div",{className:"cv-progress-reporter-item"})}},{key:"update",value:function(){var t=this.options_.event,e=this.player_.duration(),r=(t.end.time-t.start.time)/e;this.el_.style.width=100*r+"%";var n=t.start.time/e;this.el_.style.left=100*n+"%"}}])}(Gn),Hn=function(t){function e(){var t;return Mn(this,e),(t=Fn(this,e,arguments)).events_=[],t}return Vn(e,t),An(e,[{key:"update",value:function(){for(var t=this,e=this.children(),r=e.length;r>0;r--)this.removeChild(e[r]);this.events_.forEach((function(e){var r=new qn(t.player(),{event:e});t.addChild(r),r.update()}))}},{key:"addEvents",value:function(t){var e,r;(e=this.events_).push.apply(e,function(t){if(Array.isArray(t))return In(t)}(r=t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(r)||function(t,e){if(t){if("string"==typeof t)return In(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?In(t,e):void 0}}(r)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()),this.update()}},{key:"createEl",value:function(){return n.Z.dom.createEl("div",{className:"cv-progress-reporter-display"})}}])}(Gn);function Wn(t){return Wn="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wn(t)}function Qn(t,e,r){return(e=Kn(e))in t?Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}):t[e]=r,t}function Yn(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Kn(n.key),n)}}function Kn(t){var e=function(t){if("object"!=Wn(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Wn(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Wn(e)?e:e+""}function $n(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return($n=function(){return!!t})()}function Xn(t){return Xn=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Xn(t)}function Jn(t,e){return Jn=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Jn(t,e)}var to=n.Z.getPlugin("plugin"),eo="play",ro="playing",no="pause",oo="seekstart",io="ended",ao="pausedseek",uo=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Xn(e),function(t,e){if(e&&("object"==Wn(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,$n()?Reflect.construct(e,r||[],Xn(t).constructor):e.apply(t,r))}(this,e,[t,r])).eventBuffer=[],n.latestTime=0,n.lastPlayingTime=0,n.isPlaying=!1,n.isSeeking=!1,n.hasEnded=!1,n.shouldLogPlayOnTimeUpdate=!1,n.options=r,n.player.ready((function(){return n.initialize()})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Jn(t,e)}(e,t),r=e,n=[{key:"initialize",value:function(){this.validateOptions(),this.bindListeners(),this.startInterval(),this.addEasterEgg()}},{key:"validateOptions",value:function(){if("function"!=typeof this.options.onFlush)throw new Error("Please provide the onFlush option")}},{key:"bindListeners",value:function(){var t=this,e=Qn(Qn(Qn(Qn(Qn(Qn({},eo,(function(){return t.onPlay()})),no,(function(){return t.onPause()})),"timeupdate",(function(){return t.onTimeUpdate()})),"seeking",(function(){return t.onSeeking()})),io,(function(){return t.onEnded()})),ro,(function(){return t.onPlaying()})),r=Object.keys(e);r.forEach((function(r){return t.player.on(r,e[r])})),this.one("dispose",(function(){r.forEach((function(r){return t.player.off(r,e[r])}))}))}},{key:"startInterval",value:function(){var t=this,e=this.options.interval||5e3;this.interval=window.setInterval((function(){return t.flushBuffer()}),e),this.player.one("dispose",(function(){return window.clearInterval(t.interval)}))}},{key:"addEasterEgg",value:function(){var t,e,r=this,n="",o=function(e){"ArrowUpArrowUpArrowDownArrowDownArrowLeftArrowRightArrowLeftArrowRightba"===(n+=e.key)&&r.addDisplay(),window.clearTimeout(t),t=window.setTimeout((function(){n=""}),500)},i=!1,a=function(){i=!0,e=window.setTimeout((function(){i&&r.addDisplay()}),1e4)};function u(){i=!1,window.clearTimeout(e)}this.player.el().addEventListener("keyup",o);var c=this.player.getChild("Collapserator").getChild("PlayToggle");c.on("touchstart",a),c.on("touchend",u),this.player.one("dispose",(function(){var t,e;null===(e=null===(t=r.player)||void 0===t?void 0:t.el())||void 0===e||e.removeEventListener("keyup",o),c.off("touchstart",a),c.off("touchend",u)}))}},{key:"addDisplay",value:function(){var t=this;this.progressReporterDisplay||(this.progressReporterDisplay=new Hn(this.player),this.player.addChild(this.progressReporterDisplay),this.player.options_.inactivityTimeout=0,this.player.one("dispose",(function(){t.progressReporterDisplay=void 0})))}},{key:"onPlay",value:function(){return this.isPlaying=!0,this.isSeeking?(this.logEvent("seekend"),void(this.isSeeking=!1)):this.hasEnded?(this.shouldLogPlayOnTimeUpdate=!0,void(this.hasEnded=!1)):void this.logEvent(eo)}},{key:"onPause",value:function(){var t=this;this.isSeeking||(this.pauseTimeout=window.setTimeout((function(){t.isPlaying=!1,t.logEvent(no),delete t.pauseTimeout}),50))}},{key:"onTimeUpdate",value:function(){this.shouldLogPlayOnTimeUpdate&&(this.shouldLogPlayOnTimeUpdate=!1,this.logEvent(eo)),this.isPlaying&&!this.isSeeking&&this.logEvent(ro)}},{key:"onSeeking",value:function(){this.pauseTimeout&&(this.latestTime=this.previousLatestTime,window.clearTimeout(this.pauseTimeout),delete this.pauseTimeout),this.isPlaying||this.logEvent(ao),!this.isSeeking&&this.isPlaying&&(this.isSeeking=!0,this.logEvent(oo))}},{key:"onEnded",value:function(){this.hasEnded=!0,this.logEvent(io)}},{key:"onPlaying",value:function(){this.isSeeking=!1,this.isPlaying=!0}},{key:"logEvent",value:function(t){if(this.player){var e=this.player.currentTime();t===oo&&(e=this.latestTime),this.previousLatestTime=this.latestTime,this.latestTime=this.player.currentTime(),this.eventBuffer.push({time:e,type:t})}}},{key:"shouldUseCarriedOverTime",value:function(t){return this.lastPlayingTime&&(t===ro||t===eo)}},{key:"shouldSaveCarriedOverTime",value:function(t){return t===ro||t===no}},{key:"shouldClearCarriedOverTime",value:function(t){return t===io||t===ao}},{key:"flushBuffer",value:function(){for(var t,e,r=[],n={};this.eventBuffer.length;){var o=this.eventBuffer.shift();this.shouldClearCarriedOverTime(o.type)?delete this.lastPlayingTime:n.start?o.type===ro&&this.eventBuffer.length>0||(this.shouldSaveCarriedOverTime(o.type)&&(this.lastPlayingTime=o.time),n.end=o,r.push(n),n={}):(this.shouldUseCarriedOverTime(o.type)&&(o.time=this.lastPlayingTime,delete this.lastPlayingTime),n.start=o)}this.eventBuffer=[],r.length&&this.validateEvents(r)&&(this.options.onFlush(r),null===(t=this.player)||void 0===t||t.trigger("progressflush"),null===(e=this.progressReporterDisplay)||void 0===e||e.addEvents(r))}},{key:"validateEvents",value:function(t){var e=0;t.forEach((function(t){e+=t.end.time-t.start.time}));var r=this.options.interval||5e3;return r/=1e3,r+=.5,r*=this.player.playbackRate(),e<r}}],n&&Yn(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(to);function co(t){return co="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},co(t)}function lo(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,so(n.key),n)}}function so(t){var e=function(t){if("object"!=co(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=co(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==co(e)?e:e+""}function fo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(fo=function(){return!!t})()}function po(t){return po=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},po(t)}function yo(t,e){return yo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},yo(t,e)}n.Z.registerPlugin("progressReporterPlugin",uo);var ho=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=po(e),function(t,e){if(e&&("object"==co(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,fo()?Reflect.construct(e,r||[],po(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&yo(t,e)}(e,t),r=e,(o=[{key:"createEl",value:function(){return n.Z.dom.createEl("span",{innerHTML:'<span class="vjs-icon-placeholder"></span>',className:"cv-drag-handle vjs-control vjs-button"},{})}}])&&lo(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n.Z.getComponent("Component")),vo=["top","left","right","bottom"],bo={top:"Top",left:"Left",right:"Right",bottom:"Bottom"};function mo(t){return mo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mo(t)}function go(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function wo(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Po(n.key),n)}}function Oo(t,e,r){return e&&wo(t.prototype,e),r&&wo(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Po(t){var e=function(t){if("object"!=mo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=mo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==mo(e)?e:e+""}function jo(t,e,r){return e=ko(e),function(t,e){if(e&&("object"==mo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,So()?Reflect.construct(e,r||[],ko(t).constructor):e.apply(t,r))}function So(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(So=function(){return!!t})()}function _o(){return _o="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ko(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},_o.apply(null,arguments)}function ko(t){return ko=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ko(t)}function Co(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Eo(t,e)}function Eo(t,e){return Eo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Eo(t,e)}var To=n.Z.getComponent("Component"),xo=function(t){function e(t,r){var n;return go(this,e),(n=jo(this,e,[t,r])).bindEventListeners(),n}return Co(e,t),Oo(e,[{key:"createEl",value:function(){return(t=e,r=this,"function"==typeof(n=_o(ko(1&3?t.prototype:t),"createEl",r))?function(t){return n.apply(r,t)}:n)(["div",{},{class:"cv-drop-target cv-drop-".concat(this.options_.side)}]);var t,r,n}},{key:"bindEventListeners",value:function(){var t=this,e=this.el(),r=function(e){e.preventDefault(),e.dataTransfer.dropEffect="move",t.addClass("cv-drag-over")},n=function(e){e.preventDefault(),t.removeClass("cv-drag-over"),t.player_.whiteboardModePlugin().setWhiteboardMode(t.options_.side)},o=function(){t.removeClass("cv-drag-over")};e.addEventListener("dragover",r),e.addEventListener("drop",n),e.addEventListener("dragleave",o),this.on("dispose",(function(){e.removeEventListener("dragover",r),e.removeEventListener("drop",n),e.removeEventListener("dragleave",o)}))}}])}(To),Lo=function(t){function e(t,r){var n;return go(this,e),(n=jo(this,e,[t,r])).addChildren(),n}return Co(e,t),Oo(e,[{key:"addChildren",value:function(){var t=this;vo.forEach((function(e){t.addChild(new xo(t.player_,{side:e}))}))}}])}(To);function Ro(t){return Ro="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ro(t)}function Bo(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Io(n.key),n)}}function Io(t){var e=function(t){if("object"!=Ro(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ro(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ro(e)?e:e+""}function Mo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Mo=function(){return!!t})()}function Do(t){return Do=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Do(t)}function Ao(t,e){return Ao=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ao(t,e)}var No=function(t){function e(t,r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=Do(e),function(t,e){if(e&&("object"==Ro(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Mo()?Reflect.construct(e,r||[],Do(t).constructor):e.apply(t,r))}(this,e,[t,r])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ao(t,e)}(e,t),r=e,(n=[{key:"handleClick",value:function(){this.player_.whiteboardModePlugin().setWhiteboardMode(this.options_.side)}}])&&Bo(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getComponent("MenuItem"));function Fo(t){return Fo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fo(t)}function Zo(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,zo(n.key),n)}}function zo(t){var e=function(t){if("object"!=Fo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Fo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Fo(e)?e:e+""}function Vo(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Vo=function(){return!!t})()}function Uo(){return Uo="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Go(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Uo.apply(null,arguments)}function Go(t){return Go=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Go(t)}function qo(t,e){return qo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},qo(t,e)}var Ho=n.Z.getComponent("MenuButton"),Wo=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,r){return e=Go(e),function(t,e){if(e&&("object"==Fo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Vo()?Reflect.construct(e,r||[],Go(t).constructor):e.apply(t,r))}(this,e,arguments)).alwaysCollapsed=!0,t.isCollapsed=!1,t.isCollabsible=!0,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qo(t,e)}(e,t),r=e,n=[{key:"createItems",value:function(){var t=this,e=this.player_.whiteboardModePlugin().side,r=[new m.Z(this.player_,{label:"Video Controls"})];return vo.forEach((function(n){r.push(new No(t.player_,{side:n,label:bo[n],selectable:!0,multiSelectable:!1,selected:n===e}))})),r}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((t=e,r=this,"function"==typeof(n=Uo(Go(1&3?t.prototype:t),"buildWrapperCSSClass",r))?function(t){return n.apply(r,t)}:n)([]));var t,r,n}},{key:"getCollabsibleName",value:function(){return"Video Controls"}},{key:"getCollabsibleValue",value:function(){var t=this.player_.whiteboardModePlugin().side;return bo[t]}},{key:"showInCollabsibleMenu",value:function(){return this.player_.isFullscreen()}},{key:"showCollapsibleMenu",value:function(){Ho.prototype.handleClick.apply(this)}}],n&&Zo(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Ho);function Qo(t){return Qo="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Qo(t)}function Yo(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ko(n.key),n)}}function Ko(t){var e=function(t){if("object"!=Qo(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Qo(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Qo(e)?e:e+""}function $o(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return($o=function(){return!!t})()}function Xo(t){return Xo=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Xo(t)}function Jo(t,e){return Jo=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Jo(t,e)}var ti="cv-whiteboard-side",ei=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,r){return e=Xo(e),function(t,e){if(e&&("object"==Qo(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,$o()?Reflect.construct(e,r||[],Xo(t).constructor):e.apply(t,r))}(this,e,[t])).side="bottom",r.player.ready((function(){r.initialize()})),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Jo(t,e)}(e,t),r=e,o=[{key:"initialize",value:function(){if(!this.player.options_.mobile){if(re.S.hasLocalStorage()){var t=re.S.get(ti);t&&(this.side=t)}this.initCollapserator(),this.initDragTargets(),this.initFullscreenListener()}}},{key:"initCollapserator",value:function(){var t=this,e=this.player.getChild("collapserator"),r=new ho(this.player);this.button=new Wo(this.player),e.addChild(r),e.addChild(this.button),this.player.trigger("cv-updatecog");var n=function(){t.player.isFullscreen()&&e.el().setAttribute("draggable","true")},o=function(){t.player.isFullscreen()&&e.el().setAttribute("draggable","false")},i=function(e){t.player.isFullscreen()&&(t.player.addClass("cv-dragging"),e.dataTransfer.setData("text/plain","handle"))},a=function(){t.player.isFullscreen()&&(t.player.removeClass("cv-dragging"),e.el().setAttribute("draggable","false"))};r.el().addEventListener("mousedown",n),r.el().addEventListener("mouseup",o),e.el().addEventListener("dragstart",i),e.el().addEventListener("dragend",a),this.on("dispose",(function(){r.el().removeEventListener("mousedown",n),r.el().removeEventListener("mouseup",o),e.el().removeEventListener("dragstart",i),e.el().removeEventListener("dragend",a)}))}},{key:"initDragTargets",value:function(){this.player.addChild(new Lo(this.player))}},{key:"initFullscreenListener",value:function(){var t=this;this.update=this.update.bind(this),this.player.on("fullscreenchange",this.update),this.one("dispose",(function(){t.player.off("fullscreenchange",t.update)}))}},{key:"setWhiteboardMode",value:function(t){this.side=t,this.button.update(),re.S.hasLocalStorage()&&re.S.set(ti,t),this.player.trigger("cv-whiteboard-change"),this.update()}},{key:"update",value:function(){this.player.removeClass("cv-whiteboard-top"),this.player.removeClass("cv-whiteboard-left"),this.player.removeClass("cv-whiteboard-right"),n.Z.dom.removeClass(window.document.documentElement,"cv-whiteboard-html-font-size"),this.player.trigger("resizemenus"),this.player.trigger("cv-updatecog"),this.player.isFullscreen()&&"bottom"!==this.side&&(this.player.addClass("cv-whiteboard-".concat(this.side)),n.Z.dom.addClass(window.document.documentElement,"cv-whiteboard-html-font-size"))}}],o&&Yo(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n.Z.getPlugin("plugin"));function ri(t){return ri="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ri(t)}function ni(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,oi(n.key),n)}}function oi(t){var e=function(t){if("object"!=ri(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ri(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ri(e)?e:e+""}function ii(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ii=function(){return!!t})()}function ai(t){return ai=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ai(t)}function ui(t,e){return ui=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ui(t,e)}n.Z.registerPlugin("whiteboardModePlugin",ei);var ci=function(t){function e(t){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=ai(e),function(t,e){if(e&&("object"==ri(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ii()?Reflect.construct(e,r||[],ai(t).constructor):e.apply(t,r))}(this,e,[t])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ui(t,e)}(e,t),r=e,(n=[{key:"deferMenu",value:function(){var t={subtitles:this.buildSubtitles(),qualities:this.buildQualities(),playbackSpeeds:this.buildPlaybackSpeeds()};this.player.trigger("cv-defer-menus",t)}},{key:"buildSubtitles",value:function(){for(var t=[],e=!1,r=this.player.textTracks(),n=0;n<r.length;n++){var o=r[n],i="showing"===o.mode;t.unshift({id:o.label,name:o.label,selected:i}),i&&(e=!0)}return t.push({id:null,name:"Off",selected:!e}),t}},{key:"buildQualities",value:function(){for(var t=[],e=this.player.qualityLevels(),r=0;r<e.length;r++){var n=e[r];t.push({id:n.id,name:n.id+"p",selected:n.enabled})}return t}},{key:"buildPlaybackSpeeds",value:function(){var t=this.player.playbackRate();return this.player.options_.playbackRates.map((function(e){return{id:e,name:e+"x"+(1===e?" (Normal)":""),selected:t===e}}))}}])&&ni(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getPlugin("plugin"));function li(t){return li="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},li(t)}function si(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,fi(n.key),n)}}function fi(t){var e=function(t){if("object"!=li(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=li(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==li(e)?e:e+""}function pi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(pi=function(){return!!t})()}function yi(t){return yi=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},yi(t)}function hi(t,e){return hi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},hi(t,e)}n.Z.registerPlugin("deferMenusPlugin",ci),r(51976);var vi=n.Z.getComponent("Button"),di="cv-muted",bi=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,r){return e=yi(e),function(t,e){if(e&&("object"==li(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,pi()?Reflect.construct(e,r||[],yi(t).constructor):e.apply(t,r))}(this,e,[t])).update(),r.update=r.update.bind(r),t.on("volumechange",r.update),t.on("dispose",(function(){return t.off("volumechange",r.update)})),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&hi(t,e)}(e,t),r=e,(n=[{key:"handleClick",value:function(){this.player_.muted(!this.player_.muted()),this.update()}},{key:"update",value:function(){this.player_.muted()?this.addClass(di):this.removeClass(di)}},{key:"buildCSSClass",value:function(){return"cv-mute-button cv-muted"}}])&&si(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(vi);function mi(t){return mi="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mi(t)}function gi(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,wi(n.key),n)}}function wi(t){var e=function(t){if("object"!=mi(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=mi(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==mi(e)?e:e+""}function Oi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Oi=function(){return!!t})()}function Pi(){return Pi="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ji(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Pi.apply(null,arguments)}function ji(t){return ji=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ji(t)}function Si(t,e){return Si=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Si(t,e)}n.Z.registerComponent("muteButton",bi),bi.prototype.controlText_="Mute";var _i,ki=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=ji(e),function(t,e){if(e&&("object"==mi(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Oi()?Reflect.construct(e,r||[],ji(t).constructor):e.apply(t,r))}(this,e,[t,r]))._onClickHandler=r.onClickHandler,n.bindEventListeners(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Si(t,e)}(e,t),r=e,o=[{key:"createEl",value:function(){return n.Z.dom.createEl("div",{className:"cv-player-overlay"})}},{key:"handleClick",value:function(t){"function"==typeof this._onClickHandler&&(t.stopImmediatePropagation(),this._onClickHandler())}},{key:"dispose",value:function(){var t,r,n;this.off("click",this.handleClick),(t=e,r=this,"function"==typeof(n=Pi(ji(1&3?t.prototype:t),"dispose",r))?function(t){return n.apply(r,t)}:n)([])}},{key:"bindEventListeners",value:function(){this.on("click",this.handleClick)}}],o&&gi(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n.Z.getComponent("Component"));function Ci(t){return Ci="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ci(t)}function Ei(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ti(n.key),n)}}function Ti(t){var e=function(t){if("object"!=Ci(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ci(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ci(e)?e:e+""}function xi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(xi=function(){return!!t})()}function Li(t){return Li=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Li(t)}function Ri(t,e){return Ri=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ri(t,e)}n.Z.registerComponent("playerOverlay",ki),function(t){t.Default="play",t.Hover="hover"}(_i||(_i={}));var Bi=n.Z.getPlugin("plugin"),Ii="cv-preview-mode",Mi=function(t){function e(t){var r;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(r=function(t,e,r){return e=Li(e),function(t,e){if(e&&("object"==Ci(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,xi()?Reflect.construct(e,r||[],Li(t).constructor):e.apply(t,r))}(this,e,[t])).buttonAdded=!1,r.mode=null,r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ri(t,e)}(e,t),r=e,(n=[{key:"getMode",value:function(){return this.mode}},{key:"setPlayerMode",value:function(t,e){var r=this.mode;if(this.mode=t,t===_i.Hover)return this.buttonAdded||this.addButtons(e),this.player.addClass(Ii),this.enableSubtites(),this.mute(),this.removeActivityTimeout(),void this.player.trigger("resize");r===_i.Hover&&(this.player.removeClass(Ii),this.disableSubtitles(),this.unmute(),this.restoreActivityTimeout(),this.player.trigger("resize"))}},{key:"addButtons",value:function(t){var e=new bi(this.player),r=new ki(this.player,{onClickHandler:t});this.player.addChild(e),this.player.addChild(r),this.buttonAdded=!0}},{key:"enableSubtites",value:function(){var t=this;this.player.dataLoaded((function(){return t.player.persistSubtitleSettingsPlugin().previewModeSubtitles()}))}},{key:"disableSubtitles",value:function(){var t=this;this.player.dataLoaded((function(){return t.player.persistSubtitleSettingsPlugin().applyUserPreferences()}))}},{key:"mute",value:function(){var t=this;this.player.ready((function(){t.player.persistVolumePlugin().disable(),t.player.muted(!0)}))}},{key:"unmute",value:function(){var t=this;this.player.ready((function(){t.player.persistVolumePlugin().applyUserPreferences(),t.player.persistVolumePlugin().enable()}))}},{key:"removeActivityTimeout",value:function(){this.player.cache_.inactivityTimeout=this.player.options_.inactivityTimeout,this.player.options_.inactivityTimeout=0}},{key:"restoreActivityTimeout",value:function(){this.player.options_.inactivityTimeout=this.player.cache_.inactivityTimeout}}])&&Ei(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Bi);function Di(t){return Di="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Di(t)}function Ai(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}function Ni(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Zi(n.key),n)}}function Fi(t,e,r){return e&&Ni(t.prototype,e),r&&Ni(t,r),Object.defineProperty(t,"prototype",{writable:!1}),t}function Zi(t){var e=function(t){if("object"!=Di(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Di(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Di(e)?e:e+""}function zi(t,e,r){return e=Ui(e),function(t,e){if(e&&("object"==Di(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Vi()?Reflect.construct(e,r||[],Ui(t).constructor):e.apply(t,r))}function Vi(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Vi=function(){return!!t})()}function Ui(t){return Ui=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ui(t)}function Gi(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&qi(t,e)}function qi(t,e){return qi=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},qi(t,e)}n.Z.registerPlugin("playerModePlugin",Mi);var Hi=n.Z.getComponent("Component"),Wi=n.Z.getComponent("ClickableComponent"),Qi=function(t){function e(){return Ai(this,e),zi(this,e,arguments)}return Gi(e,t),Fi(e,[{key:"createEl",value:function(){return Hi.prototype.createEl.call(this,"span",{className:"cv-favourite-button-svg",innerHTML:"<span class='cv-favourite-heart'>".concat('\n <svg version="1.1" viewBox="0 0 24 24">\n <path id="Heart-Filled" d="m18.833 5.9735c-0.78916-0.95022-1.8839-1.4735-3.0826-1.4735-1.6859 0-2.7532 1.0685-3.3517 1.9648-0.15528 0.2326-0.28738 0.46582-0.39828 0.68529-0.11091-0.21946-0.24297-0.45269-0.39828-0.68529-0.5985-0.89636-1.6658-1.9648-3.3517-1.9648-1.1987 0-2.2935 0.52333-3.0827 1.4735-0.75275 0.90644-1.1673 2.1204-1.1673 3.4183 0 1.4128 0.51978 2.7268 1.6358 4.1353 0.99741 1.2588 2.4323 2.5564 4.0939 4.0589 0.61916 0.5599 1.2594 1.1389 1.9411 1.7718l0.02047 0.01903c0.08837 0.08211 0.19856 0.12313 0.30875 0.12313s0.22038-0.04105 0.30875-0.12313l0.02047-0.01903c0.68166-0.63289 1.3219-1.2119 1.9412-1.7719 1.6615-1.5024 3.0964-2.8 4.0938-4.0588 1.116-1.4085 1.6358-2.7225 1.6358-4.1353 0-1.2979-0.41459-2.5119-1.1674-3.4183z"/>\n </svg>\n',"</span><span class='cv-favourite-outline'>").concat('\n <svg version="1.1" viewBox="0 0 24 24">\n <path id="Shape" d="m18.959 5.9741c-0.76992-0.92705-1.9357-1.5351-3.1052-1.5351-1.6448 0-2.8808 0.74937-3.4647 1.6238-0.15149 0.22693-0.28074 0.55125-0.38894 0.76537-0.10821-0.21411-0.23718-0.53844-0.38871-0.76537-0.58391-0.87451-1.8205-1.6238-3.4653-1.6238-1.1695 0-2.2376 0.60808-3.0075 1.5351-0.7344 0.88434-1.1388 1.9712-1.1388 3.2374 0 1.3784 0.50711 3.0509 1.5959 4.4251 0.97309 1.2281 2.373 2.4941 3.9941 3.9599 0.60406 0.54625 1.2285 1.1104 1.8936 1.7278l0.01997 0.01934c0.08622 0.08011 0.38931 0.21727 0.49681 0.21727 0.1075 0 0.40992-0.13796 0.49614-0.21804l0.0201-0.0178c0.66504-0.61746 1.2897-1.1824 1.8939-1.7287 1.621-1.4658 3.0209-2.7317 3.994-3.9598 1.0888-1.3742 1.5955-3.0467 1.5955-4.4251 0-1.2663-0.30646-2.3531-1.0409-3.2374zm-5.337 10.688c-0.51948 0.47226-1.0567 0.95549-1.6218 1.4768-0.56507-0.52124-1.101-1.0059-1.6219-1.4769-3.1725-2.8689-5.2684-4.7641-5.2684-7.2556 0-1.0298 0.32333-1.9863 0.91044-2.6933 0.59385-0.71497 1.4183-1.1088 2.3213-1.1088 1.254 0 2.0645 0.81976 2.5237 1.5074 0.41187 0.61679 0.62678 1.2385 0.70006 1.4772 0.06131 0.19978 0.23683 0.33499 0.43482 0.33499s0.37351-0.1352 0.43482-0.33499c0.07329-0.23867 0.28821-0.86044 0.70006-1.4773 0.45914-0.68766 1.2698-1.5074 2.5237-1.5074 0.90309 0 1.7274 0.39377 2.3213 1.1088 0.58714 0.70695 0.91047 1.6634 0.91047 2.6933 0 2.4914-2.1035 4.3783-5.2685 7.2557z" stroke-width=".97562"/>\n </svg>\n',"</span>")})}}])}(Hi),Yi=function(t){function e(t,r){var n;return Ai(this,e),(n=zi(this,e,[t,r])).isFavourited=r.isFavourited,n.renderIcon(),n.update(),n}return Gi(e,t),Fi(e,[{key:"renderIcon",value:function(){this.icon&&this.removeChild(this.icon),this.icon=new Qi(this.player_),this.addChild(this.icon)}},{key:"update",value:function(){this.isFavourited?this.addClass("cv-favourited"):this.removeClass("cv-favourited")}},{key:"createEl",value:function(t,e,r){e=Object.assign({innerHTML:"",className:"cv-favourite-button"},e),r=Object.assign({type:"button"},r);var n=Hi.prototype.createEl.call(this,"button",e,r);return this.createControlTextEl(n),n}},{key:"handleClick",value:function(){this.isFavourited=!this.isFavourited,this.update(),this.options_.clickHandler&&this.options_.clickHandler(this.isFavourited)}}])}(Wi);function Ki(t){return Ki="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ki(t)}function $i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Xi(n.key),n)}}function Xi(t){var e=function(t){if("object"!=Ki(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ki(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ki(e)?e:e+""}function Ji(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ji=function(){return!!t})()}function ta(t){return ta=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ta(t)}function ea(t,e){return ea=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ea(t,e)}Yi.prototype.controlText_="Favourite";var ra=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=ta(e),function(t,e){if(e&&("object"==Ki(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ji()?Reflect.construct(e,r||[],ta(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ea(t,e)}(e,t),r=e,(n=[{key:"setFavourite",value:function(t,e){if(!this.initialized){var r=new Yi(this.player,{isFavourited:t,clickHandler:e});this.player.addChild(r),this.initialized=!0}}}])&&$i(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getPlugin("plugin"));n.Z.registerPlugin("favouritePlugin",ra);var na=r(86777);function oa(t){return oa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},oa(t)}function ia(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,aa(n.key),n)}}function aa(t){var e=function(t){if("object"!=oa(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=oa(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==oa(e)?e:e+""}function ua(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ua=function(){return!!t})()}function ca(t,e,r,n){var o=la(sa(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function la(){return la="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=sa(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},la.apply(null,arguments)}function sa(t){return sa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},sa(t)}function fa(t,e){return fa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},fa(t,e)}var pa=n.Z.getComponent("Menu"),ya=pa.prototype,ha=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=sa(e),function(t,e){if(e&&("object"==oa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ua()?Reflect.construct(e,r||[],sa(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&fa(t,e)}(e,t),r=e,(n=[{key:"createEl",value:function(){var t=ca(e,"createEl",this,3)([]);return this.simpleBar=new na.Z(this.contentEl(),{autoHide:!1}),t}},{key:"contentEl",value:function(){return this.simpleBar?this.simpleBar.getContentElement():ca(e,"contentEl",this,3)([])}},{key:"dispose",value:function(){this.simpleBar&&(this.simpleBar.unMount(),delete this.simpleBar),ca(e,"dispose",this,3)([])}},{key:"addItem",value:function(t){ca(e,"addItem",this,3)([t]),this.simpleBar.recalculate()}},{key:"lockShowing",value:function(){ca(e,"lockShowing",this,3)([]),this.simpleBar.recalculate()}},{key:"recalculateScrollBar",value:function(){this.simpleBar.recalculate()}},{key:"handleBlur",value:function(t){var e=t.relatedTarget||document.activeElement;this.el().contains(e)||ya.handleBlur.call(this,t)}}])&&ia(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(pa);function va(t){return va="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},va(t)}function da(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ba(n.key),n)}}function ba(t){var e=function(t){if("object"!=va(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=va(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==va(e)?e:e+""}function ma(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ma=function(){return!!t})()}function ga(t){return ga=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ga(t)}function wa(t,e){return wa=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},wa(t,e)}ha.originalProto=ya,pa.prototype=ha.prototype,n.Z.registerComponent("Menu",ha);var Oa=n.Z.getComponent("Component"),Pa=n.Z.getComponent("MenuButton"),ja=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=ga(e),function(t,e){if(e&&("object"==va(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ma()?Reflect.construct(e,r||[],ga(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&wa(t,e)}(e,t),r=e,(o=[{key:"createMenu",value:function(){var t,e=new ha(this.player_,{menuButton:this});if(this.hideThreshold_=0,this.options_.title){var r=n.Z.dom.createEl("li",{className:"vjs-menu-title",innerHTML:(t=this.options_.title,"string"!=typeof t?t:t.replace(/./,(function(t){return t.toUpperCase()}))),tabIndex:-1});this.hideThreshold_+=1;var o=new Oa(this.player_,{el:r});e.addItem(o)}if(this.items=this.createItems(),this.items)for(var i=0;i<this.items.length;i++)e.addItem(this.items[i]);return e}}])&&da(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(Pa),Sa=Pa.prototype.pressButton;Pa.prototype.pressButton=function(){Sa.call(this),this.inactivityTimeout=this.player_.cache_.inactivityTimeout,this.player_.cache_.inactivityTimeout=0,this.player_.options_.inactivityTimeout=0};var _a=Pa.prototype.unpressButton;function ka(t){return ka="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ka(t)}function Ca(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ea(n.key),n)}}function Ea(t){var e=function(t){if("object"!=ka(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ka(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ka(e)?e:e+""}function Ta(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ta=function(){return!!t})()}function xa(t,e,r,n){var o=La(Ra(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function La(){return La="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ra(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},La.apply(null,arguments)}function Ra(t){return Ra=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ra(t)}function Ba(t,e){return Ba=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ba(t,e)}Pa.prototype.unpressButton=function(){_a.call(this),this.player_.cache_.inactivityTimeout=this.inactivityTimeout,this.player_.options_.inactivityTimeout=this.inactivityTimeout,this.player_.reportUserActivity()},n.Z.registerComponent("MenuButton",ja);var Ia=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=Ra(e),function(t,e){if(e&&("object"==ka(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ta()?Reflect.construct(e,r||[],Ra(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ba(t,e)}(e,t),r=e,(n=[{key:"buildCSSClass",value:function(){return"cv-time-wrapper ".concat(xa(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return xa(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass()}),n])}}])&&Ca(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getComponent("Component"));function Ma(t){return Ma="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ma(t)}function Da(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Aa(n.key),n)}}function Aa(t){var e=function(t){if("object"!=Ma(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ma(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ma(e)?e:e+""}function Na(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Na=function(){return!!t})()}function Fa(t){return Fa=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Fa(t)}function Za(t,e){return Za=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Za(t,e)}Ia.prototype.options_={children:["currentTimeDisplay","remainingTimeDisplay"]},n.Z.registerComponent("TimeWrapper",Ia);var za=n.Z.getComponent("SeekBar"),Va=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=Fa(e),function(t,e){if(e&&("object"==Ma(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Na()?Reflect.construct(e,r||[],Fa(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Za(t,e)}(e,t),r=e,(n=[{key:"handleMouseDown",value:function(t){var e=this.player_.preventScrubbingPlugin();e.isEnabled&&this.getMouseTime(t)>e.furthestVisitedTime||(za.prototype.handleMouseDown.call(this,t),this.player_.addClass("cv-disable-play-pause-feedback"))}},{key:"handleMouseMove",value:function(t){za.prototype.handleMouseMove.call(this,t),this.update()}},{key:"getPercent",value:function(){var t=this.player_.currentTime()/this.player_.duration();return t>=1?1:t}},{key:"handleMouseUp",value:function(t){var e=this;za.prototype.handleMouseUp.call(this,t),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){e.player_.removeClass("cv-disable-play-pause-feedback")}),500)}},{key:"clamp",value:function(t,e,r){return Math.min(Math.max(t,e),r)}},{key:"getMouseTime",value:function(t){return this.clamp(za.prototype.calculateDistance.call(this,t).x,0,1)*this.player_.duration()}}])&&Da(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(za);function Ua(t){return Ua="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ua(t)}function Ga(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,qa(n.key),n)}}function qa(t){var e=function(t){if("object"!=Ua(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ua(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ua(e)?e:e+""}function Ha(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ha=function(){return!!t})()}function Wa(t,e,r,n){var o=Qa(Ya(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function Qa(){return Qa="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ya(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Qa.apply(null,arguments)}function Ya(t){return Ya=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ya(t)}function Ka(t,e){return Ka=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ka(t,e)}n.Z.registerComponent("SeekBar",Va);var $a=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=Ya(e),function(t,e){if(e&&("object"==Ua(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ha()?Reflect.construct(e,r||[],Ya(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ka(t,e)}(e,t),r=e,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-load-progress ".concat(Wa(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return Wa(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass()}),n])}},{key:"update",value:function(t){this.el_.style.width=100*t+"%"}}])&&Ga(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getComponent("Component"));function Xa(t){return Xa="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Xa(t)}function Ja(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,tu(n.key),n)}}function tu(t){var e=function(t){if("object"!=Xa(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Xa(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Xa(e)?e:e+""}function eu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(eu=function(){return!!t})()}function ru(t,e,r,n){var o=nu(ou(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function nu(){return nu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ou(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},nu.apply(null,arguments)}function ou(t){return ou=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ou(t)}function iu(t,e){return iu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},iu(t,e)}var au=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=ou(e),function(t,e){if(e&&("object"==Xa(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,eu()?Reflect.construct(e,r||[],ou(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&iu(t,e)}(e,t),r=e,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-play-progress ".concat(ru(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return ru(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass()}),n])}},{key:"update",value:function(t){t>0&&t<1?this.addClass("cv-current"):this.removeClass("cv-current"),this.el_.style.width=100*t+"%"}}])&&Ja(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getComponent("Component"));function uu(t){return uu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},uu(t)}function cu(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,lu(n.key),n)}}function lu(t){var e=function(t){if("object"!=uu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=uu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==uu(e)?e:e+""}function su(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(su=function(){return!!t})()}function fu(t,e,r,n){var o=pu(yu(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function pu(){return pu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=yu(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},pu.apply(null,arguments)}function yu(t){return yu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},yu(t)}function hu(t,e){return hu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},hu(t,e)}var vu=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=yu(e),function(t,e){if(e&&("object"==uu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,su()?Reflect.construct(e,r||[],yu(t).constructor):e.apply(t,r))}(this,e,[t,r])).playProgress=new au(n.player_),n.addChild(n.playProgress),n.loadProgress=new $a(n.player_),n.addChild(n.loadProgress),n.update(),n.updateBuffered(0),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&hu(t,e)}(e,t),r=e,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-item ".concat(fu(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return fu(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass()}),n])}},{key:"getCurrentTime",value:function(){return this.player_.scrubbing()?this.player_.getCache().currentTime:this.player_.currentTime()}},{key:"update",value:function(){var t=this.player_.duration()||3600,e=this.options_.endTime-this.options_.startTime;if(t!==this.duration_){var r=e/t;this.el_.style.width=100*r+"%";var n=this.options_.startTime/t;this.el_.style.left=100*n+"%",this.duration_=t}var o=this.getCurrentTime();o<this.options_.startTime?this.playProgress.update(0):o>this.options_.endTime?this.playProgress.update(1):this.playProgress.update((o-this.options_.startTime)/e)}},{key:"updateBuffered",value:function(t){var e=this.options_.endTime-this.options_.startTime;t<this.options_.startTime?this.loadProgress.update(0):t>this.options_.endTime?this.loadProgress.update(1):this.loadProgress.update((t-this.options_.startTime)/e)}}])&&cu(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getComponent("Component")),du=r(39232);function bu(t){return bu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},bu(t)}function mu(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,gu(n.key),n)}}function gu(t){var e=function(t){if("object"!=bu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=bu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==bu(e)?e:e+""}function wu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(wu=function(){return!!t})()}function Ou(t,e,r,n){var o=Pu(ju(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function Pu(){return Pu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ju(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Pu.apply(null,arguments)}function ju(t){return ju=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ju(t)}function Su(t,e){return Su=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Su(t,e)}var _u=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=ju(e),function(t,e){if(e&&("object"==bu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,wu()?Reflect.construct(e,r||[],ju(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Su(t,e)}(e,t),r=e,(n=[{key:"buildCSSClass",value:function(){return"cv-chapter-bar-items ".concat(Ou(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return Ou(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass()}),n])}},{key:"update",value:function(){this.children_.forEach((function(t){t.update()}))}},{key:"updateBuffered",value:function(){var t=this;this.children_.forEach((function(e){e.updateBuffered((0,du.b)(t.player_))}))}}])&&mu(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getComponent("Component"));function ku(t){return ku="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ku(t)}function Cu(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Eu(n.key),n)}}function Eu(t){var e=function(t){if("object"!=ku(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ku(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ku(e)?e:e+""}function Tu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Tu=function(){return!!t})()}function xu(t,e,r,n){var o=Lu(Ru(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function Lu(){return Lu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ru(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Lu.apply(null,arguments)}function Ru(t){return Ru=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ru(t)}function Bu(t,e){return Bu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Bu(t,e)}var Iu=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Ru(e),function(t,e){if(e&&("object"==ku(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Tu()?Reflect.construct(e,r||[],Ru(t).constructor):e.apply(t,r))}(this,e,[t,r])).onDurationChange=n.onDurationChange.bind(n),n.createChapterItems=n.createChapterItems.bind(n),n.updateBuffered=n.updateBuffered.bind(n),M.O.useTrack(n.player_,"chapters",null,n.createChapterItems),n.player_.on("durationchange",n.onDurationChange),n.player_.on("progress",n.updateBuffered),n.createChapterItems(),n.update(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Bu(t,e)}(e,t),r=e,(o=[{key:"dispose",value:function(){this.player_.off("durationchange",this.onDurationChange),this.player_.off("progress",this.updateBuffered),xu(e,"dispose",this,3)([])}},{key:"createEl",value:function(){return n.Z.dom.createEl("div",{className:"vjs-progress-holder cv-chapter-seek-bar"},{"aria-label":this.localize("Progress Bar"),role:"progressbar"})}},{key:"onDurationChange",value:function(){this.createChapterItems(),this.update()}},{key:"update",value:function(){var t=xu(e,"update",this,3)([]);return this.chapterBarItems&&this.chapterBarItems.update(),t}},{key:"updateBuffered",value:function(){this.chapterBarItems.updateBuffered()}},{key:"bindUpdateListener",value:function(t){var e=this,r=function(){e.createChapterItems(),e.updateBuffered()};t.addEventListener("cv:cuechange",r),this.player_.one("dispose",(function(){return t.removeEventListener("cv:cuechange",r)}))}},{key:"createChapterItems",value:function(t){var e,r;t&&(this.track_||this.bindUpdateListener(t),this.track_=t);var n=new _u(this.player_);if((null===(r=null===(e=this.track_)||void 0===e?void 0:e.cues)||void 0===r?void 0:r.length)&&!this.options_.ignoreChapters)for(var o=0;o<this.track_.cues.length;o++){var i=this.track_.cues[o],a=i.startTime,u=i.endTime,c=this.player_.duration();c&&(o===this.track_.cues.length-1&&i.endTime<this.player_.duration()&&(u=this.player_.duration()),u>c&&(u=c));var l=new vu(this.player_,{startTime:a,endTime:u});if(n.addChild(l),c&&u===c)break}else n.addChild(new vu(this.player_,{startTime:0,endTime:this.player_.duration()||3600}));this.chapterBarItems&&this.removeChild(this.chapterBarItems),this.chapterBarItems=n,this.addChild(this.chapterBarItems)}}])&&Cu(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n.Z.getComponent("SeekBar"));function Mu(t){return Mu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Mu(t)}function Du(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Au(n.key),n)}}function Au(t){var e=function(t){if("object"!=Mu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Mu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Mu(e)?e:e+""}function Nu(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Nu=function(){return!!t})()}function Fu(){return Fu="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Zu(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Fu.apply(null,arguments)}function Zu(t){return Zu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Zu(t)}function zu(t,e){return zu=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},zu(t,e)}Iu.prototype.options_={children:["playProgressBar"],barName:"playProgressBar"},n.Z.browser.IS_IOS||n.Z.browser.IS_ANDROID||Iu.prototype.options_.children.splice(1,0,"mouseTimeDisplay"),n.Z.registerComponent("ChapterSeekBar",Iu);var Vu=n.Z.getComponent("ProgressControl"),Uu="seekBar",Gu=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,r){return e=Zu(e),function(t,e){if(e&&("object"==Mu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Nu()?Reflect.construct(e,r||[],Zu(t).constructor):e.apply(t,r))}(this,e,arguments)).seekBarName_=Uu,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&zu(t,e)}(e,t),r=e,n=[{key:"setSeekBarName",value:function(t){this.seekBarName_=t}},{key:"getChild",value:function(t){return(null==t?void 0:t.toLowerCase())===Uu.toLowerCase()&&(t=this.seekBarName_),(r=e,n=this,"function"==typeof(o=Fu(Zu(1&3?r.prototype:r),"getChild",n))?function(t){return o.apply(n,t)}:o)([t]);var r,n,o}}],n&&Du(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Vu);Gu.prototype.options_={children:[]},n.Z.registerComponent("ProgressControl",Gu);var qu=r(28788),Hu=r(30708);function Wu(t){return Wu="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Wu(t)}function Qu(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Yu(n.key),n)}}function Yu(t){var e=function(t){if("object"!=Wu(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Wu(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Wu(e)?e:e+""}function Ku(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ku=function(){return!!t})()}function $u(){return $u="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Xu(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},$u.apply(null,arguments)}function Xu(t){return Xu=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Xu(t)}function Ju(t,e){return Ju=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ju(t,e)}var tc=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Xu(e),function(t,e){if(e&&("object"==Wu(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ku()?Reflect.construct(e,r||[],Xu(t).constructor):e.apply(t,r))}(this,e,[t,r])).hasCustomChapterText=!1,M.O.useTrack(n.player_,"chapters",!1,(function(t){n.track_=t})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ju(t,e)}(e,t),r=e,o=[{key:"createEl",value:function(){var t,r,o,i=(t=e,r=this,"function"==typeof(o=$u(Xu(1&3?t.prototype:t),"createEl",r))?function(t){return o.apply(r,t)}:o)([]);return this.chapter_=n.Z.dom.createEl("div"),i.appendChild(this.chapter_),this.time_=n.Z.dom.createEl("div"),i.appendChild(this.time_),i}},{key:"updateTime",value:function(t){var e=this.player_.duration();if(n.Z.dom.textContent(this.time_,(0,Hu.m)(t,e)),this.track_&&!this.hasCustomChapterText){for(var r=0;r<this.track_.cues.length;r++){var o=this.track_.cues[r],i=o.endTime||e;if(o.startTime<=t&&i>=t)return void n.Z.dom.textContent(this.chapter_,o.text)}n.Z.dom.textContent(this.chapter_,"")}}},{key:"clearChapterContent",value:function(){n.Z.dom.textContent(this.chapter_,"")}},{key:"updateText",value:function(t){n.Z.dom.textContent(this.time_,t)}},{key:"setCustomChapterText",value:function(t){this.hasCustomChapterText=!!t,n.Z.dom.textContent(this.chapter_,null!=t?t:"")}}],o&&Qu(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n.Z.getComponent("TimeTooltip"));function ec(t){return ec="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ec(t)}function rc(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,nc(n.key),n)}}function nc(t){var e=function(t){if("object"!=ec(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ec(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ec(e)?e:e+""}function oc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(oc=function(){return!!t})()}function ic(){return ic="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=ac(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},ic.apply(null,arguments)}function ac(t){return ac=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},ac(t)}function uc(t,e){return uc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},uc(t,e)}n.Z.registerComponent("TimeTooltip",tc);var cc=function(t){function e(t,r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=ac(e),function(t,e){if(e&&("object"==ec(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,oc()?Reflect.construct(e,r||[],ac(t).constructor):e.apply(t,r))}(this,e,[t,r])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&uc(t,e)}(e,t),r=e,o=[{key:"setTrack",value:function(t){this.track_=t}},{key:"createEl",value:function(){var t,r,o,i=(t=e,r=this,"function"==typeof(o=ic(ac(1&3?t.prototype:t),"createEl",r))?function(t){return o.apply(r,t)}:o)(["div",{className:"cv-thumbnail-display"}]);return this.img_=n.Z.dom.createEl("img"),i.appendChild(this.img_),i}},{key:"enable",value:function(){this.addClass("cv-thumbnail-display-enabled")}},{key:"disable",value:function(){this.removeClass("cv-thumbnail-display-enabled")}},{key:"parseImageLink",value:function(t){var e=t.indexOf("#");if(-1===e)return{src:t,w:0,h:0,x:0,y:0};var r=t.substr(0,e),n=t.substr(e+1);if("xywh="!==n.substr(0,5))return{src:t,w:0,h:0,x:0,y:0};var o=this.getScale(),i=n.substr(5).split(",");return{src:r,w:parseInt(i[2])*o,h:parseInt(i[3])*o,x:parseInt(i[0])*o,y:parseInt(i[1])*o}}},{key:"getScale",value:function(){var t=this.options_.scaleFactor,e=this.player_.whiteboardModePlugin().side;return this.player_.isFullscreen()&&"bottom"!==e&&(t*=2),t}},{key:"update",value:function(t){var e,r;if(null===(r=null===(e=this.track_)||void 0===e?void 0:e.cues)||void 0===r?void 0:r.length){for(var n,o=t,i=0;i<this.track_.cues.length;){var a=this.track_.cues[i];if(a.startTime<=o&&a.endTime>=o){n=this.parseImageLink(a.text);break}i++}if(null==n?void 0:n.src){this.enable();var u=n,c=u.src,l=u.w,s=u.h,f=u.x,p=u.y,y=this.getScale();this.img_.src=c,this.img_.style.left=-f+"px",this.img_.style.top=-p+"px",this.img_.style.transformOrigin="0 0",this.img_.style.transform="scale(".concat(y,")"),this.el_.style.width=l+"px",this.el_.style.height=s+"px"}else this.disable()}}}],o&&rc(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n.Z.getComponent("Component"));function lc(t){return lc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lc(t)}function sc(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,fc(n.key),n)}}function fc(t){var e=function(t){if("object"!=lc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=lc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==lc(e)?e:e+""}function pc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(pc=function(){return!!t})()}function yc(t){return yc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},yc(t)}function hc(t,e){return hc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},hc(t,e)}cc.prototype.options_={scaleFactor:1},n.Z.registerComponent("ThumbnailDisplay",cc);var vc=n.Z.getComponent("MouseTimeDisplay"),dc="cv-mouse-time-display-force-show",bc=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),n=function(t,e,r){return e=yc(e),function(t,e){if(e&&("object"==lc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,pc()?Reflect.construct(e,r||[],yc(t).constructor):e.apply(t,r))}(this,e,[t,r]),M.O.useTrack(n.player_,"metadata","thumbnails",(function(t){n.getChild("ThumbnailDisplay").setTrack(t)})),n.update=n.update.bind(n),n.player_.on("durationchange",n.update),n.player_.one("dispose",(function(){n.player_.off("durationchange",n.update)})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&hc(t,e)}(e,t),r=e,(n=[{key:"update",value:function(t,e){var r=this;this.requestAnimationFrame((function(){var n=r.getChild("TimeTooltip"),o=r.getChild("ThumbnailDisplay"),i=e*r.player_.duration(),a=r.player_.preventScrubbingPlugin(),u=r.player_.controlBar.getChild("progressControl").getChild(qu.Hx),c=!1;a.isEnabled&&(c=i>a.furthestVisitedTime),c?(r.hide(),u.show(),(0,Re.Ds)(u.hide,qu.D,!1,u)()):(r.show(),u&&u.hide(!0),o.update(i),n.updateTime(i));var l=r.el_.getBoundingClientRect();r.el_.style.marginLeft=-l.width/2+"px";var s=t.width*e;s<l.width/2?r.el_.style.left=l.width/2+"px":s>t.width-l.width/2?r.el_.style.left=t.width-l.width/2+"px":r.el_.style.left=t.width*e+"px"}))}},{key:"forceShow",value:function(){this.addClass(dc)}},{key:"removeForceShow",value:function(){this.removeClass(dc)}}])&&sc(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(vc);function mc(t){return mc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mc(t)}function gc(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,wc(n.key),n)}}function wc(t){var e=function(t){if("object"!=mc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=mc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==mc(e)?e:e+""}function Oc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Oc=function(){return!!t})()}function Pc(){return Pc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=jc(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Pc.apply(null,arguments)}function jc(t){return jc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},jc(t)}function Sc(t,e){return Sc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Sc(t,e)}bc.prototype.options_={children:["ThumbnailDisplay","TimeTooltip"]},n.Z.registerComponent("MouseTimeDisplay",bc);var _c=n.Z.getComponent("ChaptersTrackMenuItem"),kc=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=jc(e),function(t,e){if(e&&("object"==mc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Oc()?Reflect.construct(e,r||[],jc(t).constructor):e.apply(t,r))}(this,e,[t,r])).nonIconControl=!1,n.thumbnailDisplay=new cc(n.player_,{scaleFactor:.5}),n.el().insertBefore(n.thumbnailDisplay.el(),n.el().firstChild),M.O.useTrack(n.player_,"metadata","thumbnails",(function(t){n.addClass("cv-has-thumbnails"),n.thumbnailDisplay.setTrack(t),n.thumbnailDisplay.update(n.options_.cue.startTime)})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Sc(t,e)}(e,t),r=e,n=[{key:"update",value:function(){this.player_&&_c.prototype.update.call(this)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-chapter-menu-item"}},{key:"createEl",value:function(t,r,n){return this.nonIconControl=!0,(o=e,i=this,"function"==typeof(a=Pc(jc(1&3?o.prototype:o),"createEl",i))?function(t){return a.apply(i,t)}:a)(["li",Object.assign({className:this.buildCSSClass(),innerHTML:this.getInnerHTML(),tabIndex:-1},r),n]);var o,i,a}},{key:"getInnerHTML",value:function(){var t=this.player_.duration();return'<span class="vjs-menu-item-text cv-chapter-menu-item-text">'+"<p>".concat(this.localize(this.options_.label),"</p>")+"<p>(".concat((0,Hu.m)(this.options_.cue.startTime,t),")</p>")+"</span>"}}],n&&gc(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(_c);function Cc(t){return Cc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Cc(t)}function Ec(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Tc(n.key),n)}}function Tc(t){var e=function(t){if("object"!=Cc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Cc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Cc(e)?e:e+""}function xc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(xc=function(){return!!t})()}function Lc(t,e,r,n){var o=Rc(Bc(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function Rc(){return Rc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Bc(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Rc.apply(null,arguments)}function Bc(t){return Bc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Bc(t)}function Ic(t,e){return Ic=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ic(t,e)}var Mc=function(t){function e(t,r,n){var o;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(o=function(t,e,r){return e=Bc(e),function(t,e){if(e&&("object"==Cc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,xc()?Reflect.construct(e,r||[],Bc(t).constructor):e.apply(t,r))}(this,e,[t,r,n])).alwaysCollapsed=!1,o.isCollapsed=!1,o.isCollabsible=!0,o.update=o.update.bind(o),o.player_.on("cv-whiteboard-change",o.update),o.player_.on("fullscreenchange",o.update),o.player_.on("dispose",(function(){o.player_.off("cv-whiteboard-change",o.update),o.player_.off("fullscreenchange",o.update)})),o}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ic(t,e)}(e,t),r=e,(n=[{key:"buildCSSClass",value:function(){return"cv-chapters-button ".concat(Lc(e,"buildCSSClass",this,3)([]))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big ".concat(Lc(e,"buildWrapperCSSClass",this,3)([]))}},{key:"createItems",value:function(){var t=[];if(!this.track_)return t;var e=this.track_.cues;if(!e)return t;for(var r=0,n=e.length;r<n;r++){var o=e[r],i=new kc(this.player_,{track:this.track_,cue:o});t.push(i)}return t}},{key:"setTrack",value:function(t){var r=this;if(Lc(e,"setTrack",this,3)([t]),this.track_&&"chapters"===this.track_.kind){t.one("loadeddata",this.update);var n=function(){r.update(),r.player_.trigger("resizemenus")};t.on("cv:cuechange",n),this.player_.one("dispose",(function(){return t.off("cv:cueupdate",n)}))}}},{key:"update",value:function(t){Lc(e,"update",this,3)([t])}},{key:"getCollabsibleName",value:function(){return"Chapters"}},{key:"getCollabsibleValue",value:function(){var t=this.track_.activeCues[0];return(null==t?void 0:t.text)||""}},{key:"showInCollabsibleMenu",value:function(){if(!this.track_)return!1;var t=this.track_.cues;return!(!t||!t.length)}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}])&&Ec(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getComponent("ChaptersButton"));function Dc(t){return Dc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Dc(t)}function Ac(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Nc(n.key),n)}}function Nc(t){var e=function(t){if("object"!=Dc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Dc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Dc(e)?e:e+""}function Fc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Fc=function(){return!!t})()}function Zc(){return Zc="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=zc(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Zc.apply(null,arguments)}function zc(t){return zc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},zc(t)}function Vc(t,e){return Vc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Vc(t,e)}n.Z.registerComponent("ChaptersButton",Mc);var Uc=n.Z.getComponent("OffTextTrackMenuItem"),Gc=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=zc(e),function(t,e){if(e&&("object"==Dc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Fc()?Reflect.construct(e,r||[],zc(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Vc(t,e)}(e,t),r=e,n=[{key:"handleClick",value:function(t){Uc.prototype.handleClick.call(this,t),this.player_.trigger("cv:languageselected")}},{key:"createEl",value:function(t,r,n){return(o=e,i=this,"function"==typeof(a=Zc(zc(1&3?o.prototype:o),"createEl",i))?function(t){return a.apply(i,t)}:a)(["li",Object.assign(Object.assign({className:"vjs-menu-item",tabIndex:-1},r),{innerHTML:'<span class="vjs-menu-item-text">Off</span>'}),n]);var o,i,a}}],n&&Ac(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Uc);function qc(t){return qc="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},qc(t)}function Hc(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Wc(n.key),n)}}function Wc(t){var e=function(t){if("object"!=qc(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=qc(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==qc(e)?e:e+""}function Qc(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Qc=function(){return!!t})()}function Yc(t){return Yc=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Yc(t)}function Kc(t,e){return Kc=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Kc(t,e)}n.Z.registerComponent("OffTextTrackMenuItem",Gc);var $c=n.Z.getComponent("TextTrackButton"),Xc=n.Z.getComponent("TextTrackMenuItem"),Jc=n.Z.getComponent("OffTextTrackMenuItem"),tl=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=Yc(e),function(t,e){if(e&&("object"==qc(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Qc()?Reflect.construct(e,r||[],Yc(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Kc(t,e)}(e,t),r=e,n=[{key:"createItems",value:function(){var t,e=arguments.length>0&&void 0!==arguments[0]?arguments[0]:[],r=arguments.length>1&&void 0!==arguments[1]?arguments[1]:Xc;this.label_&&(t="".concat(this.label_," off")),e.push(new Jc(this.player_,{kinds:this.kinds_,kind:this.kind_,label:t})),this.hideThreshold_+=1;var n=this.player_.textTracks();Array.isArray(this.kinds_)||(this.kinds_=[this.kind_]);for(var o=0;o<n.length;o++){var i=n[o];if(this.kinds_.indexOf(i.kind)>-1){var a=new r(this.player_,{track:i,kinds:this.kinds_,kind:this.kind_,selectable:!0,multiSelectable:!1});a.addClass("vjs-".concat(i.kind,"-menu-item")),e.push(a)}}return e}}],n&&Hc(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}($c);function el(t){return el="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},el(t)}function rl(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,nl(n.key),n)}}function nl(t){var e=function(t){if("object"!=el(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=el(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==el(e)?e:e+""}function ol(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ol=function(){return!!t})()}function il(t){return il=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},il(t)}function al(t,e){return al=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},al(t,e)}n.Z.registerComponent("TextTrackButton",tl);var ul=n.Z.getComponent("SubsCapsMenuItem"),cl=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=il(e),function(t,e){if(e&&("object"==el(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ol()?Reflect.construct(e,r||[],il(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&al(t,e)}(e,t),r=e,(n=[{key:"handleClick",value:function(t){ul.prototype.handleClick.call(this,t),this.player_.trigger("cv:languageselected")}}])&&rl(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(ul);function ll(t){return ll="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ll(t)}function sl(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,fl(n.key),n)}}function fl(t){var e=function(t){if("object"!=ll(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ll(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ll(e)?e:e+""}function pl(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(pl=function(){return!!t})()}function yl(t){return yl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},yl(t)}function hl(t,e){return hl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},hl(t,e)}var vl=function(t){function e(t){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n={};n.track={player:t,kind:"subtitle",label:"Search Captions",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="SubtitleSearchMenuItem",(r=function(t,e,r){return e=yl(e),function(t,e){if(e&&("object"==ll(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,pl()?Reflect.construct(e,r||[],yl(t).constructor):e.apply(t,r))}(this,e,[t,n])).addClass("vjs-texttrack-settings"),r.addClass("cv-subtitle-search-menu-item"),r.controlText(", opens subtitle search"),r.toggleEnabled=r.toggleEnabled.bind(r);var o=r.player_.textTracks();return o.addEventListener("selectedlanguagechange",r.toggleEnabled),r.player_.one("dispose",(function(){o.removeEventListener("selectedlanguagechange",r.toggleEnabled)})),r.toggleEnabled(),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&hl(t,e)}(e,t),r=e,(n=[{key:"toggleEnabled",value:function(){var t;if(this.player_){var e=M.O.getCurrentTextTrack(this.player_);e?(null===(t=e.cues)||void 0===t?void 0:t.length)?this.removeClass("vjs-disabled"):(this.bindTrackEvents(e),this.addClass("vjs-disabled")):this.addClass("vjs-disabled")}}},{key:"bindTrackEvents",value:function(t){var e=this;t.removeEventListener("loadeddata",this.toggleEnabled),t.addEventListener("loadeddata",this.toggleEnabled),this.player_.one("dispose",(function(){t.removeEventListener("loadeddata",e.toggleEnabled)}))}},{key:"handleClick",value:function(){var t,e=this,r=M.O.getCurrentTextTrack(this.player_);(null===(t=null==r?void 0:r.cues)||void 0===t?void 0:t.length)&&this.requestAnimationFrame((function(){e.player_.getChild("collapserator").getChild("subtitleSearchButton").showCollapsibleMenu()}))}}])&&sl(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getComponent("TextTrackMenuItem"));function dl(t){return dl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},dl(t)}function bl(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ml(n.key),n)}}function ml(t){var e=function(t){if("object"!=dl(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=dl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==dl(e)?e:e+""}function gl(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(gl=function(){return!!t})()}function wl(t){return wl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},wl(t)}function Ol(t,e){return Ol=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ol(t,e)}var Pl=function(t){function e(t){var r;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e);var n={};return n.track={player:t,kind:"subtitle",label:"Caption Text Size",selectable:!1,default:!1,mode:"disabled"},n.selectable=!1,n.name="SubtitleSizeMenuItem",(r=function(t,e,r){return e=wl(e),function(t,e){if(e&&("object"==dl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,gl()?Reflect.construct(e,r||[],wl(t).constructor):e.apply(t,r))}(this,e,[t,n])).addClass("vjs-texttrack-settings"),r.addClass("cv-divider-after-menu-item"),r.addClass("cv-subtitle-size-menu-item"),r.controlText(", opens subtitle size settings"),r}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ol(t,e)}(e,t),r=e,(n=[{key:"handleClick",value:function(){var t=this;this.requestAnimationFrame((function(){t.player_.getChild("collapserator").getChild("subtitleSizeButton").showCollapsibleMenu()}))}}])&&bl(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getComponent("TextTrackMenuItem"));function jl(t){return jl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},jl(t)}function Sl(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,_l(n.key),n)}}function _l(t){var e=function(t){if("object"!=jl(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=jl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==jl(e)?e:e+""}function kl(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(kl=function(){return!!t})()}function Cl(){return Cl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=El(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Cl.apply(null,arguments)}function El(t){return El=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},El(t)}function Tl(t,e){return Tl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Tl(t,e)}var xl=n.Z.getComponent("TextTrackButton"),Ll=n.Z.getComponent("SubsCapsButton"),Rl=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,r){return e=El(e),function(t,e){if(e&&("object"==jl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,kl()?Reflect.construct(e,r||[],El(t).constructor):e.apply(t,r))}(this,e,arguments)).alwaysCollapsed=!1,t.isCollapsed=!1,t.isCollabsible=!0,t.className="cv-subs-caps-menu-button",t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Tl(t,e)}(e,t),r=e,n=[{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((t=e,r=this,"function"==typeof(n=Cl(El(1&3?t.prototype:t),"buildWrapperCSSClass",r))?function(t){return n.apply(r,t)}:n)([]));var t,r,n}},{key:"createItems",value:function(){var t=[];return this.player_.options_.mobile||(t.push(new vl(this.player_)),t.push(new Pl(this.player_)),this.hideThreshold_=this.hideThreshold_+2),xl.prototype.createItems.call(this,t,cl)}},{key:"getCollabsibleName",value:function(){return"Subtitles"}},{key:"getCollabsibleValue",value:function(){for(var t=this.player_.textTracks(),e=0;e<t.length;e++){var r=t[e];if(this.kinds_.indexOf(r.kind)>-1&&"showing"===r.mode)return r.label}return"Off"}},{key:"showInCollabsibleMenu",value:function(){for(var t=this.player_.textTracks(),e=0;e<t.length;e++){var r=t[e];if(this.kinds_.indexOf(r.kind)>-1)return!0}return!1}},{key:"showCollapsibleMenu",value:function(){Ll.prototype.handleClick.apply(this)}}],n&&Sl(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Ll);function Bl(t){return Bl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bl(t)}function Il(){Il=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,P=O&&O(O(L([])));P&&P!==r&&n.call(P,a)&&(w=P);var j=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Bl(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function C(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function E(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 T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Bl(e)+" is not iterable")}return m.prototype=g,o(j,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(j),l(j,c,"Generator"),l(j,a,(function(){return this})),l(j,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):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),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function Ml(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Dl(n.key),n)}}function Dl(t){var e=function(t){if("object"!=Bl(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Bl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Bl(e)?e:e+""}function Al(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Al=function(){return!!t})()}function Nl(t){return Nl=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Nl(t)}function Fl(t,e){return Fl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Fl(t,e)}n.Z.registerComponent("SubsCapsButton",Rl);var Zl="<span class='vjs-local-cache-indicator-icon' title='Streaming from ClickView Local Cache'>".concat(Gr,"</span>"),zl=function(t){function e(t,r){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Nl(e),function(t,e){if(e&&("object"==Bl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Al()?Reflect.construct(e,r||[],Nl(t).constructor):e.apply(t,r))}(this,e,[t,r])).qualityId=r.qualityId;var o=t.qualityLevels(),i=n.handleQualityChange.bind(n);return o.on("change",i),t.one("dispose",(function(){o.off("change",i)})),n.handleLocalCacheChange=n.handleLocalCacheChange.bind(n),n.player_.ready((function(){n.player_&&(n.player_.on("localcachechanged",n.handleLocalCacheChange),n.player_.one("dispose",(function(){var t;null===(t=n.player_)||void 0===t||t.off("localcachechanged",n.handleLocalCacheChange)})),n.handleLocalCacheChange())})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Fl(t,e)}(e,t),r=e,(n=[{key:"handleLocalCacheChange",value:function(){return t=this,e=void 0,r=void 0,n=Il().mark((function t(){var e,r;return Il().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:return e=this.player_.localCache(),t.next=3,e.getActiveLocalCache();case 3:if(null==(r=t.sent)?void 0:r.playbackProfile){t.next=9;break}return this.show(),this.enable(),this.setLabel(this.options_.label),t.abrupt("return");case 9:r.playbackProfile!==this.qualityId?this.disable():this.setLabel(this.options_.label+Zl);case 10:case"end":return t.stop()}}),t,this)})),new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}));var t,e,r,n}},{key:"setLabel",value:function(t){var e=this.$(".vjs-menu-item-text");e&&(e.innerHTML=t)}},{key:"buildCSSClass",value:function(){return"vjs-menu-item cv-quality-menu-item"}},{key:"handleClick",value:function(){for(var t=this.player_.qualityLevels(),e=0;e<t.length;e++){var r=t[e];r.enabled=r.id===this.qualityId}}},{key:"handleQualityChange",value:function(){if(this.player_){var t=this.player_.qualityLevels(),e=t[t.selectedIndex],r=e&&e.id===this.qualityId;r!==this.isSelected_&&this.selected(r)}}}])&&Ml(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getComponent("MenuItem"));function Vl(t){return Vl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vl(t)}function Ul(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Gl(n.key),n)}}function Gl(t){var e=function(t){if("object"!=Vl(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Vl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Vl(e)?e:e+""}function ql(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(ql=function(){return!!t})()}function Hl(t,e,r,n){var o=Wl(Ql(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function Wl(){return Wl="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ql(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Wl.apply(null,arguments)}function Ql(t){return Ql=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ql(t)}function Yl(t,e){return Yl=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Yl(t,e)}var Kl={144:"144p (Preview)",240:"240p",360:"360p",480:"480p",720:"720p",1080:"1080p"},$l=n.Z.getComponent("MenuButton"),Xl=function(t){function e(t,r){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Ql(e),function(t,e){if(e&&("object"==Vl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,ql()?Reflect.construct(e,r||[],Ql(t).constructor):e.apply(t,r))}(this,e,[t,r])).alwaysCollapsed=!0,n.isCollapsed=!1,n.isCollabsible=!0,n.className="cv-quality-menu-button";var o=n.player_.qualityLevels(),i=n.update.bind(n);return o.on("addqualitylevel",i),o.on("removequalitylevel",i),t.one("dispose",(function(){o.removeEventListener("addqualitylevel",i),o.removeEventListener("removequalitylevel",i)})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Yl(t,e)}(e,t),r=e,(n=[{key:"buildCSSClass",value:function(){return"cv-quality-button ".concat(Hl(e,"buildCSSClass",this,3)([]))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small vjs-quality-button cv-has-left-icons ".concat(Hl(e,"buildWrapperCSSClass",this,3)([]))}},{key:"createItems",value:function(){var t=[],e=this.player_.qualityLevels();t.push(new m.Z(this.player_,{label:"Quality"}));for(var r=0;r<e.length;r++){var n=e[r];if(n){var o=Kl[n.id];o&&t.push(new zl(this.player_,{qualityId:n.id,label:o,selectable:!0,multiSelectable:!1}))}}return t}},{key:"getCollabsibleName",value:function(){return"Quality"}},{key:"getCollabsibleValue",value:function(){var t=this.player_.qualityLevels(),e=t[t.selectedIndex];return e?Kl[e.id]:""}},{key:"showInCollabsibleMenu",value:function(){return!!this.player_.qualityLevels().length}},{key:"showCollapsibleMenu",value:function(){$l.prototype.handleClick.apply(this)}}])&&Ul(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}($l);function Jl(t){return Jl="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Jl(t)}function ts(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,es(n.key),n)}}function es(t){var e=function(t){if("object"!=Jl(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Jl(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Jl(e)?e:e+""}function rs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(rs=function(){return!!t})()}function ns(){return ns="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=os(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},ns.apply(null,arguments)}function os(t){return os=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},os(t)}function is(t,e){return is=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},is(t,e)}n.Z.registerComponent("QualityButton",Xl);var as=n.Z.getComponent("Menu"),us=n.Z.getComponent("MenuButton"),cs=n.Z.getComponent("PlaybackRateMenuItem"),ls=n.Z.getComponent("PlaybackRateMenuButton"),ss=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,r){return e=os(e),function(t,e){if(e&&("object"==Jl(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,rs()?Reflect.construct(e,r||[],os(t).constructor):e.apply(t,r))}(this,e,arguments)).alwaysCollapsed=!0,t.isCollapsed=!1,t.isCollabsible=!0,t.className="cv-playback-rate-menu-button",t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&is(t,e)}(e,t),r=e,o=[{key:"createEl",value:function(){for(var t,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return(t=us.prototype.createEl).apply.apply(t,[this].concat(r))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-small cv-has-left-icons ".concat((t=e,r=this,"function"==typeof(n=ns(os(1&3?t.prototype:t),"buildWrapperCSSClass",r))?function(t){return n.apply(r,t)}:n)([]));var t,r,n}},{key:"createMenu",value:function(){var t=new as(this.player(),{menuButton:this});t.addItem(new m.Z(this.player_,{label:"Playback Speed"}));var e=this.playbackRates();if(e)for(var r=0;r<e.length;r++){var n=e[r]+"x";1===e[r]&&(n+=" (Normal)"),t.addItem(new cs(this.player(),{rate:n}))}return t}},{key:"handleClick",value:function(){for(var t,e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return(t=us.prototype.handleClick).apply.apply(t,[this].concat(r))}},{key:"updateLabel",value:function(){var t;this.setupLabelEl();for(var e=arguments.length,r=new Array(e),n=0;n<e;n++)r[n]=arguments[n];return(t=ls.prototype.updateLabel).apply.apply(t,[this].concat(r))}},{key:"setupLabelEl",value:function(){if(!this.labelEl_){var t=this.$("button");t&&(this.labelEl_=n.Z.dom.createEl("div",{className:"vjs-playback-rate-value",innerHTML:"1x"}),t.appendChild(this.labelEl_))}}},{key:"getCollabsibleName",value:function(){return"Playback Speed"}},{key:"getCollabsibleValue",value:function(){return this.player().playbackRate()+"x"}},{key:"showInCollabsibleMenu",value:function(){return!!this.playbackRates()}},{key:"showCollapsibleMenu",value:function(){this.handleClick(null)}}],o&&ts(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(ls);function fs(t){return fs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},fs(t)}function ps(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ys(n.key),n)}}function ys(t){var e=function(t){if("object"!=fs(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=fs(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==fs(e)?e:e+""}function hs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(hs=function(){return!!t})()}function vs(t){return vs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},vs(t)}function ds(t,e){return ds=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ds(t,e)}n.Z.registerComponent("PlaybackRateMenuButton",ss);var bs=n.Z.getComponent("TextTrackSettings"),ms={backgroundColor:"#000",backgroundOpacity:"1",color:"#FFF",edgeStyle:void 0,fontFamily:"proportionalSansSerif",fontPercent:1,textOpacity:"1",windowColor:"#000",windowOpacity:"0"},gs={small:ms,medium:Object.assign(Object.assign({},ms),{fontPercent:1.5}),large:Object.assign(Object.assign({},ms),{fontPercent:2})},ws=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=vs(e),function(t,e){if(e&&("object"==fs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,hs()?Reflect.construct(e,r||[],vs(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ds(t,e)}(e,t),r=e,(n=[{key:"setSizeSetting",value:function(t){var e=this;this.size_=t,this.player_.getChild("textTrackDisplay").updateDisplay();var r=this.player_.getChild("collapserator").getChild("subtitleSizeButton");this.player_.trigger("changesubtitlesize",this.size_),window.requestAnimationFrame((function(){r.update(),e.player_.trigger("resizemenus")}))}},{key:"getSizeSetting",value:function(){return this.size_||"small"}},{key:"getValues",value:function(){return gs[this.size_]?gs[this.size_]:ms}}])&&ps(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(bs);function Os(t){return Os="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Os(t)}function Ps(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,js(n.key),n)}}function js(t){var e=function(t){if("object"!=Os(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Os(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Os(e)?e:e+""}function Ss(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ss=function(){return!!t})()}function _s(t,e,r,n){var o=ks(Cs(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function ks(){return ks="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Cs(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},ks.apply(null,arguments)}function Cs(t){return Cs=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Cs(t)}function Es(t,e){return Es=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Es(t,e)}n.Z.registerComponent("TextTrackSettings",ws);var Ts=window.navigator&&window.navigator.userAgent||"",xs=(/iPod/i.test(Ts),/Android/i.test(Ts),n.Z.getComponent("Player")),Ls=function(t){function e(t,r){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Cs(e),function(t,e){if(e&&("object"==Os(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ss()?Reflect.construct(e,r||[],Cs(t).constructor):e.apply(t,r))}(this,e,[t,r]))._dataLoaded=!1,r.mobile&&n.addClass("cv-mobile-player");var o=function(){return n._dataLoaded=!0};return n.on("cv-playback-data-loaded",o),n.on("dispose",(function(){return n.off("cv-playback-data-loaded",o)})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Es(t,e)}(e,t),r=e,(n=[{key:"dataLoaded",value:function(t){var e=this;this._dataLoaded?t():(this.one("cv-playback-data-loaded",t),this.one("dispose",(function(){e.off("cv-playback-data-loaded",t)})))}},{key:"lock",value:function(t){this.callback_=t}},{key:"unlock",value:function(){delete this.callback_}},{key:"currentTime",value:function(t,r){var n=this;if("number"!=typeof t||!this.callback_||r)return _s(e,"currentTime",this,3)([t]);this.callback_((function(){n.unlock(),n.currentTime(t)}))}},{key:"play",value:function(){var t=this;if(!this.callback_)return _s(e,"play",this,3)([]);this.callback_((function(){t.unlock(),t.play()}))}},{key:"updateStyleEl_",value:function(){if(xs.prototype.updateStyleEl_.call(this),this.options_.fluid){var t=this.el_.parentNode;if(t&&this.options_.setMaxHeight){var e=this.aspectRatio();if(void 0!==e&&"auto"!==e||(e=this.videoWidth()>0?this.videoWidth()+":"+this.videoHeight():"16:9"),this.player_.playerModePlugin().getMode()===_i.Hover)return t.style.removeProperty("maxWidth"),void t.style.removeProperty("margin");var r=e.split(":"),n=+r[1]/+r[0];t.style.maxWidth=85/n+"vh",t.style.margin="0 auto"}}}},{key:"listenForUserActivity_",value:function(){var t=this;xs.prototype.listenForUserActivity_.call(this);var e=this.getChild("collapserator");e.on("mouseenter",(function(){t.player().cache_.inactivityTimeout=t.player().options_.inactivityTimeout,t.player().options_.inactivityTimeout=0})),e.on("mouseleave",(function(){t.player().options_.inactivityTimeout=t.player().cache_.inactivityTimeout}))}}])&&Ps(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(xs);function Rs(t){return Rs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Rs(t)}function Bs(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Is(n.key),n)}}function Is(t){var e=function(t){if("object"!=Rs(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Rs(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Rs(e)?e:e+""}function Ms(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ms=function(){return!!t})()}function Ds(t){return Ds=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ds(t)}function As(t,e){return As=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},As(t,e)}Ls.prototype.options_=Object.assign(Object.assign({},xs.prototype.options_),{setMaxHeight:!0}),n.Z.registerComponent("player",Ls);var Ns=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Ds(e),function(t,e){if(e&&("object"==Rs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ms()?Reflect.construct(e,r||[],Ds(t).constructor):e.apply(t,r))}(this,e,[t,r])).player_.addClass("cv-disable-play-pause-feedback"),n.onFirstPlay=n.onFirstPlay.bind(n),n.player_.one("firstplay",n.onFirstPlay),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&As(t,e)}(e,t),r=e,(o=[{key:"dispose",value:function(){this.player_.off("firstplay",this.onFirstPlay)}},{key:"onFirstPlay",value:function(){var t=this;window.setTimeout((function(){t.player_.isDisposed()||t.player_.removeClass("cv-disable-play-pause-feedback")}),500)}},{key:"createEl",value:function(){return n.Z.dom.createEl("div",{className:"cv-play-pause-feedback"})}}])&&Bs(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n.Z.getComponent("Component"));function Fs(t){return Fs="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Fs(t)}function Zs(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,zs(n.key),n)}}function zs(t){var e=function(t){if("object"!=Fs(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Fs(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Fs(e)?e:e+""}function Vs(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Vs=function(){return!!t})()}function Us(t){return Us=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Us(t)}function Gs(t,e){return Gs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Gs(t,e)}n.Z.registerComponent("PlayPauseFeedback",Ns);var qs=n.Z.getComponent("PlayToggle"),Hs=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=Us(e),function(t,e){if(e&&("object"==Fs(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Vs()?Reflect.construct(e,r||[],Us(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Gs(t,e)}(e,t),r=e,(n=[{key:"handleClick",value:function(t){var e=this;qs.prototype.handleClick.call(this,t),this.player_.addClass("cv-disable-play-pause-feedback"),this.timeoutId&&window.clearTimeout(this.timeoutId),this.timeoutId=window.setTimeout((function(){e.player_.removeClass("cv-disable-play-pause-feedback")}),500)}}])&&Zs(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(qs);function Ws(t){return Ws="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Ws(t)}function Qs(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ys(n.key),n)}}function Ys(t){var e=function(t){if("object"!=Ws(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Ws(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Ws(e)?e:e+""}function Ks(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ks=function(){return!!t})()}function $s(t){return $s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},$s(t)}function Xs(t,e){return Xs=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Xs(t,e)}n.Z.registerComponent("PlayToggle",Hs);var Js=n.Z.getComponent("TextTrackDisplay"),tf=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=$s(e),function(t,e){if(e&&("object"==Ws(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ks()?Reflect.construct(e,r||[],$s(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Xs(t,e)}(e,t),r=e,(n=[{key:"updateDisplayState",value:function(t){Js.prototype.updateDisplayState.call(this,t);for(var e=this.player_.textTrackSettings.getValues(),r=t.activeCues,n=r.length;n--;){var o=r[n];if(o){var i=o.displayState;if(e.fontPercent&&1!==e.fontPercent){var a=.025*this.el().getBoundingClientRect().width*100/100;i.style.fontSize=a*e.fontPercent+"px"}}}}}])&&Qs(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(Js);function ef(t){return ef="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ef(t)}function rf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,nf(n.key),n)}}function nf(t){var e=function(t){if("object"!=ef(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ef(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ef(e)?e:e+""}function of(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(of=function(){return!!t})()}function af(t){return af=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},af(t)}function uf(t,e){return uf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},uf(t,e)}n.Z.registerComponent("TextTrackDisplay",tf);var cf=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=af(e),function(t,e){if(e&&("object"==ef(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,of()?Reflect.construct(e,r||[],af(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&uf(t,e)}(e,t),r=e,(o=[{key:"createEl",value:function(){return n.Z.dom.createEl("div",{className:"cv-control-bar-gradient-container",innerHTML:'<div class="cv-control-bar-gradient"></div>'})}}])&&rf(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n.Z.getComponent("Component"));function lf(t){return lf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},lf(t)}function sf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ff(n.key),n)}}function ff(t){var e=function(t){if("object"!=lf(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=lf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==lf(e)?e:e+""}function pf(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(pf=function(){return!!t})()}function yf(t,e,r,n){var o=hf(vf(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function hf(){return hf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=vf(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},hf.apply(null,arguments)}function vf(t){return vf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},vf(t)}function df(t,e){return df=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},df(t,e)}n.Z.registerComponent("ControlBarGradient",cf);var bf=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=vf(e),function(t,e){if(e&&("object"==lf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,pf()?Reflect.construct(e,r||[],vf(t).constructor):e.apply(t,r))}(this,e,[t,r])).options_=r,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&df(t,e)}(e,t),r=e,(n=[{key:"createEl",value:function(){var t=this.options_.title;if(!this.options_.seriesName)return yf(e,"createEl",this,3)(["h1",{innerHTML:t}]);var r=this.buildSeasonEpisodeString();return r?(t="<div class='cv-splash-series'>".concat(this.options_.seriesName.toUpperCase()," ").concat(r,"</div>")+t,yf(e,"createEl",this,3)(["h1",{innerHTML:t}])):(t="<div class='cv-splash-series'>".concat(this.options_.seriesName.toUpperCase(),"</div>")+t,yf(e,"createEl",this,3)(["h1",{innerHTML:t}]))}},{key:"buildSeasonEpisodeString",value:function(){if(!this.options_.seasonNumber||!this.options_.episodeNumber)return"";var t=this.padNumber(this.options_.seasonNumber,2),e=this.padNumber(this.options_.episodeNumber,2);return"S".concat(t," • E").concat(e)}},{key:"padNumber",value:function(t,e){var r=t.toString();if(r.length>=e)return r;for(e-=r.length;e>0;)r="0"+r,e--;return r}}])&&sf(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getComponent("Component"));function mf(t){return mf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},mf(t)}function gf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,wf(n.key),n)}}function wf(t){var e=function(t){if("object"!=mf(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=mf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==mf(e)?e:e+""}function Of(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Of=function(){return!!t})()}function Pf(){return Pf="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=jf(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Pf.apply(null,arguments)}function jf(t){return jf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},jf(t)}function Sf(t,e){return Sf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Sf(t,e)}var _f=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=jf(e),function(t,e){if(e&&("object"==mf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Of()?Reflect.construct(e,r||[],jf(t).constructor):e.apply(t,r))}(this,e,[t,r])).options_=r,n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Sf(t,e)}(e,t),r=e,n=[{key:"buildCSSClass",value:function(){return"cv-splash-rating ".concat((t=this.options_.ratingValue)?function(t){switch(!0){case t<32:return"cv-rating-purple";case t<48:return"cv-rating-green";case t<80:return"cv-rating-blue";case t<96:return"cv-rating-red";case t<128:return"cv-rating-pink";case t>=128:return"cv-rating-yellow";default:return""}}(t):"");var t}},{key:"createEl",value:function(t,r,n){return this.options_.ratingCode?(o=e,i=this,"function"==typeof(a=Pf(jf(1&3?o.prototype:o),"createEl",i))?function(t){return a.apply(i,t)}:a)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass(),innerHTML:this.options_.ratingCode}),n]):null;var o,i,a}}],n&&gf(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getComponent("Component"));function kf(t){return kf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},kf(t)}function Cf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Ef(n.key),n)}}function Ef(t){var e=function(t){if("object"!=kf(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=kf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==kf(e)?e:e+""}function Tf(t,e){if(e&&("object"==kf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}function xf(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(xf=function(){return!!t})()}function Lf(t){return Lf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Lf(t)}function Rf(t,e){return Rf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Rf(t,e)}var Bf=function(t){function e(t,r){var n,o,i,a;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),o=this,a=[t,r],i=Lf(i=e),n=Tf(o,xf()?Reflect.construct(i,a||[],Lf(o).constructor):i.apply(o,a)),r.embed?(n.addChild(new bf(t,r)),n.addChild(new _f(t,r)),n):Tf(n,n)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Rf(t,e)}(e,t),r=e,(o=[{key:"createEl",value:function(){return n.Z.dom.createEl("div",{className:"cv-splash-metadata"})}}])&&Cf(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n.Z.getComponent("Component"));function If(t){return If="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},If(t)}function Mf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Df(n.key),n)}}function Df(t){var e=function(t){if("object"!=If(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=If(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==If(e)?e:e+""}function Af(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Af=function(){return!!t})()}function Nf(t){return Nf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Nf(t)}function Ff(t,e){return Ff=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Ff(t,e)}var Zf=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Nf(e),function(t,e){if(e&&("object"==If(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Af()?Reflect.construct(e,r||[],Nf(t).constructor):e.apply(t,r))}(this,e,[t,r])).addChild(new Bf(t,r)),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Ff(t,e)}(e,t),r=e,(o=[{key:"createEl",value:function(){var t="<div class='cv-splash-mask'></div>";return this.options_.embed&&(t+="<div class='cv-splash-logo'>".concat(Le,"</div>")),n.Z.dom.createEl("div",{className:"vjs-poster cv-embed-splash cv-embed-splash-black",tabIndex:-1,innerHTML:t})}}])&&Mf(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n.Z.getComponent("posterImage"));function zf(t){return zf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},zf(t)}function Vf(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Uf(n.key),n)}}function Uf(t){var e=function(t){if("object"!=zf(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=zf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==zf(e)?e:e+""}function Gf(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Gf=function(){return!!t})()}function qf(t){return qf=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},qf(t)}function Hf(t,e){return Hf=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Hf(t,e)}n.Z.registerComponent("posterImage",Zf);var Wf=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=qf(e),function(t,e){if(e&&("object"==zf(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Gf()?Reflect.construct(e,r||[],qf(t).constructor):e.apply(t,r))}(this,e,[t,r])).el().prepend(n.getErrorImage()),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Hf(t,e)}(e,t),r=e,(o=[{key:"getErrorImage",value:function(){return n.Z.dom.createEl("div",{className:"cv-error-image",innerHTML:'\n <svg viewBox="0 0 301 185" xmlns="http://www.w3.org/2000/svg">\n <path d="M267.393 36.6514V167.906C267.393 168.182 267.169 168.406 266.893 168.406H32C31.7239 168.406 31.5 168.182 31.5 167.906V36.6514C31.5 36.3752 31.7239 36.1514 32 36.1514H80.5C80.7761 36.1514 81 36.3752 81 36.6514V57.7196C81 58.7622 82.0375 59.4868 83.0164 59.1279L95.7377 54.4634C95.9961 54.3687 96.2825 54.5006 96.3785 54.7585L102.094 70.1194C102.677 71.6866 105 71.2685 105 69.5964V48.4925C105 47.7632 104.475 47.1396 103.757 47.0146L94.2479 45.3609C93.9436 45.308 93.7596 44.9946 93.8616 44.7031L96.7376 36.4862C96.8077 36.2856 96.997 36.1514 97.2095 36.1514H266.893C267.169 36.1514 267.393 36.3752 267.393 36.6514Z" stroke="white"/>\n <path d="M163.296 101.777L149.437 90.1217C148.275 89.1441 146.5 89.9705 146.5 91.4894V113.664C146.5 115.141 148.191 115.98 149.367 115.087L163.226 104.569C164.139 103.876 164.173 102.515 163.296 101.777Z" stroke="white" stroke-linecap="round"/>\n <path d="M295.53 23.0783L277.524 26.2801L283.252 32.7192L274.855 38.9079L292.861 35.7061L287.133 29.2671L295.53 23.0783Z" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>\n <path d="M268.06 2.91764L254.192 14.8403L262.401 17.4661L258.324 27.0679L272.192 15.1453L263.983 12.5194L268.06 2.91764Z" stroke="white" stroke-linecap="round" stroke-linejoin="round"/>\n </svg>\n '})}}])&&Vf(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(n.Z.getComponent("ErrorDisplay"));n.Z.registerComponent("ErrorDisplay",Wf);var Qf=r(87013),Yf=r(88483);function Kf(t){return Kf="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kf(t)}function $f(){$f=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,P=O&&O(O(L([])));P&&P!==r&&n.call(P,a)&&(w=P);var j=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==Kf(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function C(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function E(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 T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(Kf(e)+" is not iterable")}return m.prototype=g,o(j,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(j),l(j,c,"Generator"),l(j,a,(function(){return this})),l(j,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):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),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function Xf(t){return function(t){if(Array.isArray(t))return Jf(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return Jf(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?Jf(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function Jf(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function tp(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ep(n.key),n)}}function ep(t){var e=function(t){if("object"!=Kf(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Kf(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Kf(e)?e:e+""}var rp,np=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}))},op=n.Z.getComponent("Player"),ip=function(){return t=function t(e,r){var o=this;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.streamLogged=!1,this.options=n.Z.mergeOptions({},t.options_,r),null===this.options.playerApi)throw new Error("PlayerApi required");this.initialize(),this.createEl(e),this.buildVideoJs(),this.options.splash&&this.setupSplash(this.options.splash),this.bindEventListeners(),this.setupSeekBar(),this.fetchConfig(),this.logStream=this.logStream.bind(this),this.player.ready((function(){o._configurePlugins(),o.options.setup&&o.options.setup(o.options,o.player),o.fetch().catch((function(t){return o.handleFetchError(t)}))}))},(e=[{key:"initialize",value:function(){}},{key:"_configurePlugins",value:function(){this.player.configureMenuDimensionsPlugin({mobile:this.options.mobile,overflowControls:this.options.overflowControls,seekBarName:this.getSeekBarName()}),this.player.progressReporterPlugin({onFlush:this.onFlushProgress=this.onFlushProgress.bind(this)}),this.player.persistVolumePlugin(),!this.options.mobile&&this.options.allowFullscreen&&this.player.fullscreenOnRotatePlugin(),this.player.touchControls(),this.options.getExternalLink&&this.player.openExternallyPlugin({getExternalLink:this.options.getExternalLink}),this.configurePlugins()}},{key:"configurePlugins",value:function(){}},{key:"onFlushProgress",value:function(t){var e;null===(e=this.analyticsService)||void 0===e||e.logVideoProgress(t)}},{key:"buildVideoJs",value:function(){return this.player=(0,n.Z)(this.el,this.getPlayerOptions())}},{key:"getInactivityTimeout",value:function(){if("number"==typeof this.options.inactivityTimeout)return this.options.inactivityTimeout;var t=500;return(this.options.mobile||n.Z.browser.IS_IOS||n.Z.browser.IS_ANDROID)&&(t=3e3),t}},{key:"getPlayerOptions",value:function(){var t=this,e=op.prototype.options_.children;return e=e.filter((function(t){return"bigPlayButton"!==t&&"posterImage"!==t})),{controls:this.options.controls,fluid:!this.options.embed&&!this.options.mobile,fill:this.options.embed||this.options.mobile,inactivityTimeout:this.getInactivityTimeout(),controlBar:{children:["timeWrapper","progressControl"]},children:[].concat(Xf(e),[{name:"collapserator",children:kt.filter((function(e){return!("fullscreenToggle"===e&&!t.options.allowFullscreen)}))},"playPauseFeedback","controlBarGradient"]),userActions:{hotkeys:function(e){return function(t,e,r){var n=Nt()(t);("f"!==n||r.allowFullscreen)&&qt[n]&&(["space"].includes(n)&&(t.preventDefault(),t.stopPropagation()),qt[n](e,t))}(e,t.player,t.options)}},playbackRates:this.options.playbackRates,techOrder:["html5"],html5:{nativeTextTracks:!1},playsinline:!0,aspectRatio:this.options.aspectRatio,mobile:this.options.mobile,deferMenus:this.options.deferMenus,muted:this.options.muted,devicesConfig:this.options.devicesConfig}}},{key:"getPlaybackObject",value:function(){return np(this,void 0,void 0,$f().mark((function t(){var e,r,n=this;return $f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!this.options.offlinePlaybackObject){t.next=2;break}return t.abrupt("return",this.options.offlinePlaybackObject);case 2:if(e=this.options.fetch,void 0===this.options.fetch&&(e=function(t){var e="".concat(n.options.playerApi.origin,"/api/playback?viewKey=").concat(t);return Dt.e.get(e)}),this.options.viewKey){t.next=6;break}throw new Error("Please specify a viewKey or a fetch function");case 6:return t.next=8,e(this.options.viewKey);case 8:if(r=t.sent){t.next=11;break}throw new Error("Error fetching playback object");case 11:return t.abrupt("return",r);case 12:case"end":return t.stop()}}),t,this)})))}},{key:"setChaptersInternal",value:function(t,e){var r=M.O.getTrack(this.player,"chapters",null);r||(r=this.player.addTextTrack("chapters")),Xf(r.cues.cues_).forEach((function(t){return r.removeCue(t)})),t.forEach((function(t){r.addCue({startTime:t.timestamp,endTime:t.endTimestamp,text:t.name})})),e&&r.trigger({type:"cv:cuechange",target:r}),r.trigger({type:"loadeddata",target:r})}},{key:"setChapters",value:function(t){this.setChaptersInternal(t,!0)}},{key:"setPlayerMode",value:function(t,e){this.player.playerModePlugin().setPlayerMode(t,e)}},{key:"setFavourite",value:function(t,e){this.player.favouritePlugin().setFavourite(t,e)}},{key:"fetch",value:function(){var t,e,r,n,o;return np(this,void 0,void 0,$f().mark((function i(){var a,u,c,l=this;return $f().wrap((function(i){for(;;)switch(i.prev=i.next){case 0:return i.next=2,this.getPlaybackObject();case 2:if(a=i.sent,!this.isDisposed()){i.next=5;break}return i.abrupt("return");case 5:u="MasterClip"===a.mediaType,c=null===(t=a.additionalData)||void 0===t?void 0:t.clipData,(null===(r=null===(e=a.chapters)||void 0===e?void 0:e.list)||void 0===r?void 0:r.length)>0&&!u&&!c&&this.setChaptersInternal(a.chapters.list,!1),this.player.localCache({localCacheAddresses:null!==(n=a.localCacheAddresses)&&void 0!==n?n:[],enabled:null===(o=this.options.enableLocalCache)||void 0===o||o}),this.player.progressiveFiles({sources:a.files.progressive.map((function(t){return{id:t.profile,mimeType:t.mimeType,url:t.url}}))}),this.player.handleNetworkErrors({playerApi:this.options.playerApi,fileToken:a.files.fileToken}),a.subtitles.list.length>0&&a.subtitles.list.forEach((function(t){if("text/vtt"===t.mimeType){var e=l.player.addRemoteTextTrack({kind:"subtitles",src:t.url,language:t.language,label:t.label},!0);M.O.sanitizeTrack(e.track,l.player)}})),a.posterUrl&&this.player.poster(Qf.j.createUrl(a.posterUrl,{size:Yf.h2.Large})),this.setupSplash({title:a.title,posterUrl:a.posterUrl,episodeNumber:a.episodeNumber,ratingCode:a.ratingCode,seasonNumber:a.seasonNumber,seriesName:a.seriesName}),this.additionalSetup(a),this.handleAutoplay(a),this.options.startTime&&(this.player.currentTime(this.options.startTime),this.player.one("canplay",(function(){l.player.currentTime(l.options.startTime)}))),this.player.trigger("cv-playback-data-loaded",a);case 18:case"end":return i.stop()}}),i,this)})))}},{key:"handleFetchError",value:function(t){var e,r=t.message;t instanceof Ht.M&&(null===(e=t.response)||void 0===e?void 0:e.type)===Gt.PhysicallyChapteredVideo&&(r="Video cannot be played because it is either corrupt or damaged."),this.player.error(r),this.options.onError&&this.options.onError(t)}},{key:"fetchConfig",value:function(){return np(this,void 0,void 0,$f().mark((function t(){var e;return $f().wrap((function(t){for(;;)switch(t.prev=t.next){case 0:if(!(rp||this.options.fetch||this.options.offlinePlaybackObject)){t.next=2;break}return t.abrupt("return");case 2:return e="".concat(this.options.playerApi.origin,"/api/config"),t.next=5,Dt.e.get(e);case 5:if(rp=t.sent,!this.isDisposed()){t.next=8;break}return t.abrupt("return");case 8:this.trigger("config:loaded");case 9:case"end":return t.stop()}}),t,this)})))}},{key:"additionalSetup",value:function(t){var e,r=this;this.player.whiteboardModePlugin(),this.player.deferMenusPlugin();var n=this.options.enableLocalCache&&!!(null===(e=t.localCacheAddresses)||void 0===e?void 0:e.length);rp?this.setupAnalyticsService(t,n):this.one("config:loaded",(function(){return r.setupAnalyticsService(t,n)})),this.analyticsService||!this.isAnalyticsEnabled()?this.setupAnalyticsDependentPlugins(t):this.one("analytics:loaded",(function(){return r.setupAnalyticsDependentPlugins(t)}))}},{key:"setupAnalyticsService",value:function(t,e){this.options.eventLogging&&(this.analyticsService=new Mt({collectionApiUrls:rp.collectionApi.urls,collectionApiClientId:rp.collectionApi.clientId,productVersion:"1.29.0",videoId:t.videoId,mediaId:t.mediaId,userId:t.viewerId,shareId:t.shareId,customerId:t.viewerCustomerId,mediaType:t.mediaType,playerType:this.getAnalyticsPlayerType(),isEmbedded:this.options.embed,isUsingLocalCache:e,additionalAnalyticsData:this.getAdditionalAnalyticsData(t),regionName:t.instanceRegion||this.options.sharerInstanceRegion||Wt.M.CvApSoutheast1}),this.on("timeupdate",this.logStream),this.trigger("analytics:loaded"))}},{key:"setupAnalyticsDependentPlugins",value:function(t){var e,r,n,o;this.player.persistSubtitleSettingsPlugin({showSubtitles:null===(e=t.settings)||void 0===e?void 0:e.showSubtitles,subtitleSize:null===(r=t.settings)||void 0===r?void 0:r.playbackSubtitleSizeDefault,analyticsService:this.analyticsService}),this.player.persistQualitySettingsPlugin({playbackProfile:null===(n=t.settings)||void 0===n?void 0:n.playbackProfile,playbackProfileLocalCache:null===(o=t.settings)||void 0===o?void 0:o.playbackProfileLocalCache,analyticsService:this.analyticsService}),this.player.persistPlaybackRatePlugin({analyticsService:this.analyticsService})}},{key:"getAdditionalAnalyticsData",value:function(t){return{}}},{key:"isAnalyticsEnabled",value:function(){return!this.options.fetch&&!this.options.offlinePlaybackObject&&this.options.eventLogging}},{key:"handleAutoplay",value:function(t){var e=this;this.options.autoplay&&this.player.ready((function(){e.player.play().catch((function(){e.isDisposed()||e.showSplash()}))}))}},{key:"logStream",value:function(){this.analyticsService&&(this.player.currentTime()<3||this.streamLogged||(this.analyticsService.logStream(),this.streamLogged=!0,this.off("timeupdate",this.logStream)))}},{key:"getAnalyticsPlayerType",value:function(){return"player"}},{key:"createEl",value:function(t){var e;"string"==typeof t?(t=function(t){return 0===t.indexOf("#")?t.slice(1):t}(t),e=n.Z.dom.$("#"+t)):e=t;var r="video-js";return this.getPlayerClassName()&&(r+=" ".concat(this.getPlayerClassName())),this.el=n.Z.dom.createEl("video",{},{class:r}),e.appendChild(this.el),this.el}},{key:"getPlayerClassName",value:function(){return""}},{key:"on",value:function(t,e){this.player.on(t,e)}},{key:"one",value:function(t,e){this.player.one(t,e)}},{key:"off",value:function(t,e){this.player.off(t,e)}},{key:"trigger",value:function(t,e){return this.player.trigger(t,e)}},{key:"dispose",value:function(){this.player.dispose()}},{key:"ready",value:function(t){this.player.ready(t)}},{key:"isDisposed",value:function(){return this.player.isDisposed()}},{key:"play",value:function(){this.player.play()}},{key:"pause",value:function(){this.player.pause()}},{key:"isPaused",value:function(){return this.player.paused()}},{key:"currentTime",value:function(t){return this.player.currentTime(t)}},{key:"muted",value:function(t){return this.player.muted(t)}},{key:"duration",value:function(){return this.player.duration()}},{key:"isFullscreen",value:function(){return this.player.isFullscreen()}},{key:"requestFullscreen",value:function(){this.player.requestFullscreen()}},{key:"exitFullscreen",value:function(){this.player.exitFullscreen()}},{key:"playbackRate",value:function(t){return this.player.playbackRate(t)}},{key:"quality",value:function(t){for(var e=this.player.qualityLevels(),r=0;r<e.length;r++){var n=e[r];if(t)n.enabled=n.id===t.toString();else if(n.enabled)return n.id}}},{key:"subtitles",value:function(t){for(var e=this.player.textTracks(),r=0;r<e.length;r++){var n=e[r];if(void 0===t){if("showing"===n.mode)return n.label}else n.label===t?n.mode="showing":n.mode="disabled"}}},{key:"bindEventListeners",value:function(){var t=this,e=function(t){return t.preventDefault()};if(this.showSplash=this.showSplash.bind(this),this.hideSplash=this.hideSplash.bind(this),this.player.on("ended",this.showSplash),this.player.on("play",this.hideSplash),this.player.tech(!0).on("contextmenu",e),this.player.one("dispose",(function(){t.off("ended",t.showSplash),t.off("play",t.hideSplash),t.player.tech(!0).off("contextmenu",e)})),this.options.hotkeyElQuerySelector){var r=n.Z.dom.$(this.options.hotkeyElQuerySelector);r&&(this.player.on(r,"keydown",this.player.handleKeyDown),this.player.one("dispose",(function(){t.player.off(r,"keydown",t.player.handleKeyDown)})))}}},{key:"setupSeekBar",value:function(){var t=this.getSeekBarName(),e=this.player.controlBar.getChild("progressControl");e.addChild(t,this.getSeekBarOptions()),e.setSeekBarName(t)}},{key:"setupSplash",value:function(t){this._splashAdded||(this._splashAdded=!0,this.player.addChild("posterImage",Object.assign({embed:this.options.embed},t)),this.player.addChild("bigPlayButton"),this.options.autoplay?this.hideSplash():this.showSplash())}},{key:"showSplash",value:function(){this.player.hasStarted(!1),this.player.getChild("posterImage").show(),this.player.getChild("bigPlayButton").show()}},{key:"hideSplash",value:function(){this.player.getChild("posterImage").hide(),this.player.getChild("bigPlayButton").hide()}},{key:"getSeekBarOptions",value:function(){return{}}},{key:"getSeekBarName",value:function(){return"ChapterSeekBar"}}])&&tp(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}();ip.options_={viewKey:null,controls:!0,playbackRates:[.25,.5,.75,1,1.25,1.5,1.75,2],playerApi:new URL("http://localhost:52000"),enableLocalCache:!0,eventLogging:!0,allowFullscreen:!0}},87860:function(t,e,r){"use strict";r.d(e,{J:function(){return Ce}});var n=r(6950),o=(r(96263),r(94445));function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function u(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function l(){return l="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=s(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},l.apply(null,arguments)}function s(t){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},s(t)}function f(t,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},f(t,e)}var p=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,r){return e=s(e),function(t,e){if(e&&("object"==i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,r||[],s(t).constructor):e.apply(t,r))}(this,e,arguments)).alwaysCollapsed=!1,t.isCollapsed=!1,t.isCollabsible=!0,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&f(t,e)}(e,t),r=e,n=[{key:"buildCSSClass",value:function(){return"cv-create-clip-button"}},{key:"getCollabsibleName",value:function(){return this.controlText_}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){var t,r,n;(t=e,r=this,"function"==typeof(n=l(s(1&3?t.prototype:t),"handleClick",r))?function(t){return n.apply(r,t)}:n)([null])}}],n&&a(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(o.Z.getComponent("Button"));function y(t){return y="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},y(t)}function h(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,v(n.key),n)}}function v(t){var e=function(t){if("object"!=y(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=y(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==y(e)?e:e+""}function d(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(d=function(){return!!t})()}function b(t){return b=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},b(t)}function m(t,e){return m=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},m(t,e)}p.prototype.controlText_="Create Clip",o.Z.registerComponent("CreateClipButton",p);var g=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=b(e),function(t,e){if(e&&("object"==y(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,d()?Reflect.construct(e,r||[],b(t).constructor):e.apply(t,r))}(this,e,[t,r])).options=r,t.ready((function(){return n.onReady()})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&m(t,e)}(e,t),r=e,(n=[{key:"onReady",value:function(){var t,e=this.player.getChild("collapserator"),r=null===(t=null==e?void 0:e.children())||void 0===t?void 0:t.findIndex((function(t){return"CustomControlSpacer"===t.name()}));r&&-1!==r&&e.addChild("CreateClipButton",{clickHandler:this.options.onClick},r+1)}}])&&h(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(o.Z.getPlugin("plugin"));function w(t){return w="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},w(t)}function O(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,P(n.key),n)}}function P(t){var e=function(t){if("object"!=w(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=w(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==w(e)?e:e+""}function j(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(j=function(){return!!t})()}function S(t){return S=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},S(t)}function _(t,e){return _=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},_(t,e)}o.Z.registerPlugin("createClipButtonPlugin",g);var k=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=S(e),function(t,e){if(e&&("object"==w(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,j()?Reflect.construct(e,r||[],S(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&_(t,e)}(e,t),r=e,(n=[{key:"handlePictureInPictureEnabledChange",value:function(){this.enable()}}])&&O(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(o.Z.getComponent("PictureInPictureToggle"));function C(t){return C="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},C(t)}function E(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,T(n.key),n)}}function T(t){var e=function(t){if("object"!=C(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=C(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==C(e)?e:e+""}function x(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(x=function(){return!!t})()}function L(){return L="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=R(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},L.apply(null,arguments)}function R(t){return R=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},R(t)}function B(t,e){return B=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},B(t,e)}o.Z.registerComponent("PictureInPictureToggle",k);var I=o.Z.getComponent("PlayToggle"),M=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=R(e),function(t,e){if(e&&("object"==C(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,x()?Reflect.construct(e,r||[],R(t).constructor):e.apply(t,r))}(this,e,[t,r])).pictureInPictureEnabled=!1,n.options=r,n.bindFunctions(),t.ready((function(){return n.onReady()})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&B(t,e)}(e,t),r=e,n=[{key:"bindFunctions",value:function(){this.requestPictureInPicture=this.requestPictureInPicture.bind(this),this.exitPictureInPicture=this.exitPictureInPicture.bind(this),this.onPlayerResize=this.onPlayerResize.bind(this),this.playerRequestPictureInPictureFn=this.player.requestPictureInPicture,this.playerExitPictureInPictureFn=this.player.exitPictureInPicture,this.player.requestPictureInPicture=this.requestPictureInPicture,this.player.exitPictureInPicture=this.exitPictureInPicture}},{key:"onReady",value:function(){var t=this.getToggleParentComponent(),e=null==t?void 0:t.getChild("pictureInPictureToggle");this.toggle=e}},{key:"enablePictureInPicture",value:function(){var t=this;if(this.player.options_.fluid&&!this.pictureInPictureEnabled){var e=this.getToggleParentComponent();if(e){this.pictureInPictureEnabled=!0;var r=e.children().findIndex((function(t){var e;return"fullscreentoggle"===(null===(e=t.name())||void 0===e?void 0:e.toLowerCase())}));-1===r&&(r=e.children().length-1),e.addChild("pictureInPictureToggle",{},r);var n=e.getChild("pictureInPictureToggle");null==n||n.enable(),this.player.on("playerresize",this.onPlayerResize),this.player.on("dispose",(function(){var e;null===(e=t.player)||void 0===e||e.off("playerresize",t.onPlayerResize)}))}}}},{key:"disablePictureInPicture",value:function(){if(this.pictureInPictureEnabled){this.pictureInPictureEnabled=!1;var t=this.getToggleParentComponent(),e=null==t?void 0:t.getChild("pictureInPictureToggle");e&&t.removeChild(e),this.player.off("playerresize",this.onPlayerResize)}}},{key:"togglePictureInPicture",value:function(t){if(t!==this.player.isInPictureInPicture()){var e=t?"enterpictureinpicture":"leavepictureinpicture";this.player.isInPictureInPicture(t),this.player.trigger(e),t?this.addPipStyles():this.removePipStyles()}}},{key:"onPlayerResize",value:function(){var t,e;if(!this.player.isInPictureInPicture()){var r=this.player.el().getBoundingClientRect();0!==r.width&&(r.width<800?null===(t=this.toggle)||void 0===t||t.hide():null===(e=this.toggle)||void 0===e||e.show())}}},{key:"addPipStyles",value:function(){this.player.addClass("cv-picture-in-picture"),this.playToggle=new I(this.player),this.playToggle.addClass("cv-pip-play-toggle"),this.player.addChild(this.playToggle),this.player.paused()?this.playToggle.handlePause():this.playToggle.handlePlay()}},{key:"removePipStyles",value:function(){this.player.removeClass("cv-picture-in-picture"),this.player.removeChild(this.playToggle),delete this.playToggle}},{key:"requestPictureInPicture",value:function(){var t;this.pictureInPictureEnabled&&(this.togglePictureInPicture(!0),"function"==typeof(null===(t=this.options)||void 0===t?void 0:t.onRequestPictureInPicture)&&this.options.onRequestPictureInPicture(!0))}},{key:"exitPictureInPicture",value:function(){this.togglePictureInPicture(!1),this.options.onRequestPictureInPicture(!1),this.removePipStyles()}},{key:"getToggleParentComponent",value:function(){return this.player.getChild("collapserator")}},{key:"dispose",value:function(){var t,r,n;this.player.requestPictureInPicture=this.playerRequestPictureInPictureFn,this.player.exitPictureInPicture=this.playerExitPictureInPictureFn,(t=e,r=this,"function"==typeof(n=L(R(1&3?t.prototype:t),"dispose",r))?function(t){return n.apply(r,t)}:n)([])}}],n&&E(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(o.Z.getPlugin("plugin"));o.Z.registerPlugin("pictureInPicture",M);var D=r(39232),A=r(69140);function N(t){return N="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},N(t)}function F(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Z(n.key),n)}}function Z(t){var e=function(t){if("object"!=N(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=N(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==N(e)?e:e+""}var z=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.listeners={}},e=[{key:"subscribe",value:function(t,e){this.registerListener(t,e)}},{key:"subscribeOnce",value:function(t,e){this.registerListener(t,e,1)}},{key:"unsubscribe",value:function(t,e){this.deregisterListener(t,e)}},{key:"trigger",value:function(t){for(var e=arguments.length,r=new Array(e>1?e-1:0),n=1;n<e;n++)r[n-1]=arguments[n];this.triggerCallbacks(t,r)}},{key:"registerListener",value:function(t,e,r){var n;if("string"!=typeof t)throw new Error("Event name must be a string");if("function"!=typeof e)throw new Error("Event callback must be a function");if(r&&"number"!=typeof r)throw new Error("Execution limit must be a number or undefined");this.listeners[t]=null!==(n=this.listeners[t])&&void 0!==n?n:[],this.listeners[t].push({callback:e,executionLimit:r})}},{key:"deregisterListener",value:function(t,e){var r;if("string"!=typeof t)throw new Error("Event name must be a string");if(e&&"function"!=typeof e)throw new Error("Event callback must be a function");if(e){var n=null===(r=this.listeners[t])||void 0===r?void 0:r.findIndex((function(t){return t.callback===e}));"number"==typeof n&&-1!==n&&(this.listeners[t].splice(n,1),0===this.listeners[t].length&&delete this.listeners[t])}else this.listeners[t]=[]}},{key:"triggerCallbacks",value:function(t){for(var e=this,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];if(this.listeners[t]){var i=[];this.listeners[t].forEach((function(t){var e,r;"number"==typeof t.executionLimit&&(t.executionCount=null!==(r=t.executionCount)&&void 0!==r?r:0,t.executionCount++,t.executionCount===t.executionLimit&&i.push(t.callback)),(e=t.callback).apply.apply(e,[null].concat(n))})),i.length&&i.forEach((function(r){return e.deregisterListener(t,r)}))}}}],e&&F(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}(),V=new z;function U(t){return U="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},U(t)}function G(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,q(n.key),n)}}function q(t){var e=function(t){if("object"!=U(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=U(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==U(e)?e:e+""}function H(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(H=function(){return!!t})()}function W(t,e,r,n){var o=Q(Y(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function Q(){return Q="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Y(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Q.apply(null,arguments)}function Y(t){return Y=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Y(t)}function K(t,e){return K=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},K(t,e)}var $=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Y(e),function(t,e){if(e&&("object"==U(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,H()?Reflect.construct(e,r||[],Y(t).constructor):e.apply(t,r))}(this,e,[t,r])).hasBuffered=!1,n.hasPlayed=!1,n.eventsService=V,n.pointOfInterest=r.pointOfInterest,n.onMouseOver=n.onMouseOver.bind(n),n.onMouseLeave=n.onMouseLeave.bind(n),n.onGlancePointOfInterestMouseEnter=n.onGlancePointOfInterestMouseEnter.bind(n),n.onGlancePointOfInterestMouseLeave=n.onGlancePointOfInterestMouseLeave.bind(n),n.initialize(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&K(t,e)}(e,t),r=e,(n=[{key:"initialize",value:function(){this.setPosition(),this.bindListeners()}},{key:"buildCSSClass",value:function(){return"cv-point-of-interest-indicator ".concat(W(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return W(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass()}),n])}},{key:"bindListeners",value:function(){this.on("mouseover",this.onMouseOver),this.on("mouseleave",this.onMouseLeave),this.eventsService.subscribe("glance:poi:mouseover",this.onGlancePointOfInterestMouseEnter),this.eventsService.subscribe("glance:poi:mouseleave",this.onGlancePointOfInterestMouseLeave)}},{key:"dispose",value:function(){this.eventsService.unsubscribe("glance:poi:mouseover",this.onGlancePointOfInterestMouseEnter),this.eventsService.unsubscribe("glance:poi:mouseleave",this.onGlancePointOfInterestMouseLeave)}},{key:"getPointOfInterestTime",value:function(){return this.pointOfInterest.startTime}},{key:"setPosition",value:function(){var t=this.player().duration();this.el_.style.left=this.getPointOfInterestTime()/t*100+"%"}},{key:"updateBuffered",value:function(t){var e=this.getPointOfInterestTime()<=t;if(e!==this.hasBuffered){this.hasBuffered=e;var r="cv-point-of-interest-indicator-buffered";this.hasBuffered?this.addClass(r):this.removeClass(r)}}},{key:"updatePlaybackProgress",value:function(t){var e=this.getPointOfInterestTime()<=t;if(e!==this.hasPlayed){this.hasPlayed=e;var r="cv-point-of-interest-indicator-played";e?this.addClass(r):this.removeClass(r)}}},{key:"toggleVisibility",value:function(t){var e="cv-point-of-interest-indicator-hidden";t?this.removeClass(e):this.addClass(e)}},{key:"onMouseOver",value:function(){this.setTimeTooltipText(),this.eventsService.trigger("player:poi:mouseover",this.pointOfInterest)}},{key:"onMouseLeave",value:function(){this.clearTimeTooltipText(),this.eventsService.trigger("player:poi:mouseleave")}},{key:"onGlancePointOfInterestMouseEnter",value:function(t){t.id===this.pointOfInterest.id&&(this.addClass("cv-point-of-interest-indicator-highlight"),this.setTimeTooltipTime(),this.setTimeTooltipText(),this.positionMouseTimeDisplay(),this.showMouseTimeDisplay())}},{key:"onGlancePointOfInterestMouseLeave",value:function(){this.removeClass("cv-point-of-interest-indicator-highlight"),this.hideMouseTimeDisplay()}},{key:"setTimeTooltipText",value:function(){var t;null===(t=this.getTimeTooltip())||void 0===t||t.setCustomChapterText(this.pointOfInterest.description)}},{key:"clearTimeTooltipText",value:function(){var t;null===(t=this.getTimeTooltip())||void 0===t||t.setCustomChapterText()}},{key:"setTimeTooltipTime",value:function(){var t=this.getTimeTooltip();null==t||t.updateTime(this.getPointOfInterestTime())}},{key:"positionMouseTimeDisplay",value:function(){var t,e,r=null===(t=this.getSeekBar())||void 0===t?void 0:t.el();if(r){var n=o.Z.dom.findPosition(r),i=this.getPointOfInterestTime()/this.player().duration();null===(e=this.getMouseTimeDisplay())||void 0===e||e.update(n,i)}}},{key:"showMouseTimeDisplay",value:function(){var t;null===(t=this.getMouseTimeDisplay())||void 0===t||t.forceShow()}},{key:"hideMouseTimeDisplay",value:function(){var t;null===(t=this.getMouseTimeDisplay())||void 0===t||t.removeForceShow()}},{key:"getSeekBar",value:function(){var t;return null===(t=this.player().controlBar.getChild("ProgressControl"))||void 0===t?void 0:t.getChild("SeekBar")}},{key:"getMouseTimeDisplay",value:function(){var t;return null===(t=this.getSeekBar())||void 0===t?void 0:t.getChild("MouseTimeDisplay")}},{key:"getTimeTooltip",value:function(){var t;return null===(t=this.getMouseTimeDisplay())||void 0===t?void 0:t.getChild("TimeTooltip")}}])&&G(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(o.Z.getComponent("Component"));function X(t){return X="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},X(t)}function J(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,tt(n.key),n)}}function tt(t){var e=function(t){if("object"!=X(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=X(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==X(e)?e:e+""}function et(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(et=function(){return!!t})()}function rt(){return rt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=nt(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},rt.apply(null,arguments)}function nt(t){return nt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},nt(t)}function ot(t,e){return ot=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ot(t,e)}var it=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=nt(e),function(t,e){if(e&&("object"==X(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,et()?Reflect.construct(e,r||[],nt(t).constructor):e.apply(t,r))}(this,e,[t,r])).pointsOfInterestVisible=r.pointsOfInterestVisible,n.toggle(n.pointsOfInterestVisible),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ot(t,e)}(e,t),r=e,n=[{key:"handleToggle",value:function(){this.toggle(!this.pointsOfInterestVisible)}},{key:"toggle",value:function(t){t?this.toggleOn():this.toggleOff()}},{key:"toggleOn",value:function(){o.Z.dom.addClass(this.toggleEl,"on"),o.Z.dom.setAttribute(this.toggleEl,"aria-checked","true"),this.pointsOfInterestVisible=!0,this.player().pointsOfInterestPlugin().togglePointsOfInterest(this.pointsOfInterestVisible)}},{key:"toggleOff",value:function(){o.Z.dom.removeClass(this.toggleEl,"on"),o.Z.dom.setAttribute(this.toggleEl,"aria-checked","false"),this.pointsOfInterestVisible=!1,this.player().pointsOfInterestPlugin().togglePointsOfInterest(this.pointsOfInterestVisible)}},{key:"handleClick",value:function(t){t.stopImmediatePropagation()}},{key:"createEl",value:function(t,r,n){this.handlerBound||(this.handleToggle=this.handleToggle.bind(this),this.handlerBound=!0),this.toggleEl&&this.toggleEl.removeEventListener("click",this.handleToggle),this.toggleEl=o.Z.dom.createEl("div",{className:"custom-toggle custom-toggle-info toggle-option float-end",innerHTML:'<span class="handle"></span></div>'}),o.Z.dom.setAttribute(this.toggleEl,"id","poi-toggle"),o.Z.dom.setAttribute(this.toggleEl,"role","switch"),this.toggleEl.addEventListener("click",this.handleToggle);var i,a,u,c=(i=e,a=this,"function"==typeof(u=rt(nt(1&3?i.prototype:i),"createEl",a))?function(t){return u.apply(a,t)}:u)([t,{className:"vjs-menu-item cv-cog-menu-item cv-poi-toggle",innerHTML:'\n <label for="poi-toggle" class="vjs-menu-item-text">Points of Interest</label>\n <span class="cv-toggle-container"></span>'},n]);return c.children[1].appendChild(this.toggleEl),c}}],n&&J(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(o.Z.getComponent("MenuItem"));function at(t){return at="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},at(t)}function ut(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,ct(n.key),n)}}function ct(t){var e=function(t){if("object"!=at(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=at(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==at(e)?e:e+""}function lt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(lt=function(){return!!t})()}function st(t){return st=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},st(t)}function ft(t,e){return ft=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ft(t,e)}o.Z.registerComponent("PointsOfInterestMenuItem",it);var pt=o.Z.getPlugin("plugin"),yt="cvplayer-points-of-interest",ht=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=st(e),function(t,e){if(e&&("object"==at(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,lt()?Reflect.construct(e,r||[],st(t).constructor):e.apply(t,r))}(this,e,[t])).pointOfInterestIndicators=[],n.enabled=!0,n.pointsOfInterest=null==r?void 0:r.pointsOfInterest,n.initialize=n.initialize.bind(n),n.updateBuffered=n.updateBuffered.bind(n),n.updatePlaybackProgress=n.updatePlaybackProgress.bind(n),n.player.one("loadedmetadata",(function(){return n.player.ready(n.initialize)})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ft(t,e)}(e,t),r=e,(n=[{key:"initialize",value:function(){this.pointsOfInterest&&(A.S.hasLocalStorage()&&"false"===A.S.get(yt)&&(this.enabled=!1),this.setupTrack(),this.createPointOfInterestIndicators(),this.addMenuItem(),this.bindListeners())}},{key:"bindListeners",value:function(){var t=this;this.player.on("progress",this.updateBuffered),this.player.on("timeupdate",this.updatePlaybackProgress),this.player.on("dispose",(function(){var e,r;null===(e=t.player)||void 0===e||e.off("progress",t.updateBuffered),null===(r=t.player)||void 0===r||r.off("timeupdate",t.updatePlaybackProgress)}))}},{key:"togglePointsOfInterest",value:function(t){A.S.set(yt,t.toString()),this.pointOfInterestIndicators.forEach((function(e){return e.toggleVisibility(t)}))}},{key:"setupTrack",value:function(){var t=this.player.addTextTrack("metadata","pointsofinterest");this.pointsOfInterest.forEach((function(e){t.addCue({startTime:e.startTime,endTime:e.endTime,text:e.description})})),t.trigger({type:"loadeddata",target:t})}},{key:"createPointOfInterestIndicators",value:function(){var t,e=this,r=null===(t=this.player.controlBar.getChild("ProgressControl"))||void 0===t?void 0:t.getChild("SeekBar");this.pointsOfInterest.forEach((function(t){var n=new $(e.player,{pointOfInterest:t});e.pointOfInterestIndicators.push(n),r.addChild(n)}))}},{key:"addMenuItem",value:function(){var t;(null===(t=this.player.getChild("collapserator"))||void 0===t?void 0:t.getChild("cogButton")).addItem({index:0,ctor:it,name:"PointsOfInterestMenuItem",options:{pointsOfInterestVisible:this.enabled}})}},{key:"updateBuffered",value:function(){var t=this;this.pointOfInterestIndicators.forEach((function(e){return e.updateBuffered((0,D.b)(t.player))}))}},{key:"updatePlaybackProgress",value:function(){var t=this;this.pointOfInterestIndicators.forEach((function(e){return e.updatePlaybackProgress(t.player.currentTime())}))}}])&&ut(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(pt);function vt(t){return vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},vt(t)}function dt(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,bt(n.key),n)}}function bt(t){var e=function(t){if("object"!=vt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=vt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==vt(e)?e:e+""}function mt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(mt=function(){return!!t})()}function gt(t,e,r,n){var o=wt(Ot(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function wt(){return wt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ot(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},wt.apply(null,arguments)}function Ot(t){return Ot=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ot(t)}function Pt(t,e){return Pt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Pt(t,e)}o.Z.registerPlugin("pointsOfInterestPlugin",ht),r(24910);var jt=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Ot(e),function(t,e){if(e&&("object"==vt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,mt()?Reflect.construct(e,r||[],Ot(t).constructor):e.apply(t,r))}(this,e,[t,r])).initialize(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Pt(t,e)}(e,t),r=e,(n=[{key:"initialize",value:function(){this.setPosition()}},{key:"buildCSSClass",value:function(){return"cv-range-indicator ".concat(gt(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return gt(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass()}),n])}},{key:"setPosition",value:function(){var t=this.player().duration();this.el_.style.left=this.options_.time/t*100+"%"}}])&&dt(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(o.Z.getComponent("Component"));function St(t){return St="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},St(t)}function _t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,kt(n.key),n)}}function kt(t){var e=function(t){if("object"!=St(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=St(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==St(e)?e:e+""}function Ct(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Ct=function(){return!!t})()}function Et(t,e,r,n){var o=Tt(xt(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function Tt(){return Tt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=xt(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Tt.apply(null,arguments)}function xt(t){return xt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},xt(t)}function Lt(t,e){return Lt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Lt(t,e)}var Rt=function(t){function e(t,r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=xt(e),function(t,e){if(e&&("object"==St(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Ct()?Reflect.construct(e,r||[],xt(t).constructor):e.apply(t,r))}(this,e,[t,r])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Lt(t,e)}(e,t),r=e,(n=[{key:"buildCSSClass",value:function(){return"cv-replay-view-button ".concat(Et(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return Et(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{innerHTML:'<span class="'.concat(this.options_.iconClassName,'"></span><span>').concat(this.options_.label,"</span>"),className:this.buildCSSClass()}),n])}},{key:"handleClick",value:function(){this.options_.onPress()}}])&&_t(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(o.Z.getComponent("ClickableComponent"));function Bt(t){return Bt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Bt(t)}function It(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Mt(n.key),n)}}function Mt(t){var e=function(t){if("object"!=Bt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Bt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Bt(e)?e:e+""}function Dt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Dt=function(){return!!t})()}function At(t,e,r,n){var o=Nt(Ft(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function Nt(){return Nt="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Ft(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Nt.apply(null,arguments)}function Ft(t){return Ft=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Ft(t)}function Zt(t,e){return Zt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Zt(t,e)}var zt=function(t){function e(t,r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=Ft(e),function(t,e){if(e&&("object"==Bt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Dt()?Reflect.construct(e,r||[],Ft(t).constructor):e.apply(t,r))}(this,e,[t,r])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Zt(t,e)}(e,t),r=e,(n=[{key:"buildCSSClass",value:function(){return"cv-replay-view ".concat(At(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){var i=At(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass()}),n]),a=o.Z.dom.createEl("h5",{innerHTML:this.localize("This clip has finished"),className:"cv-replay-heading"}),u=o.Z.dom.createEl("div",{className:"cv-button-container"}),c=new Rt(this.player_,{label:this.localize("Replay clip"),iconClassName:"cv-replay-icon",onPress:this.options_.onReplayPress}),l=new Rt(this.player_,{label:this.localize("Continue watching"),iconClassName:"cv-continue-icon",onPress:this.options_.onContinuePress});return i.appendChild(a),i.appendChild(u),u.appendChild(c.el()),u.appendChild(l.el()),i}}])&&It(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(o.Z.getComponent("Component"));function Vt(t){return Vt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Vt(t)}function Ut(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Gt(n.key),n)}}function Gt(t){var e=function(t){if("object"!=Vt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Vt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Vt(e)?e:e+""}function qt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(qt=function(){return!!t})()}function Ht(){return Ht="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=Wt(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Ht.apply(null,arguments)}function Wt(t){return Wt=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},Wt(t)}function Qt(t,e){return Qt=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},Qt(t,e)}var Yt=function(t){function e(t,r){var n;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=Wt(e),function(t,e){if(e&&("object"==Vt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,qt()?Reflect.construct(e,r||[],Wt(t).constructor):e.apply(t,r))}(this,e,[t,r])).startTime=parseFloat(r.startTime.toPrecision(4)),n.endTime=parseFloat(r.endTime.toPrecision(4)),n.dismissed=!1,n.startTime>n.endTime)throw Error("Range start cannot be greater than range end");return n.bindFunctions(),n.initialize(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&Qt(t,e)}(e,t),r=e,n=[{key:"bindFunctions",value:function(){this.onReady=this.onReady.bind(this),this.onTimeUpdateOrSeeked=this.onTimeUpdateOrSeeked.bind(this),this.onReplayPress=this.onReplayPress.bind(this),this.onContinuePress=this.onContinuePress.bind(this)}},{key:"initialize",value:function(){var t=this;this.player.one("loadedmetadata",(function(){return t.player.ready(t.onReady)})),this.player.on("timeupdate",this.onTimeUpdateOrSeeked),this.player.on("seeked",this.onTimeUpdateOrSeeked)}},{key:"onReady",value:function(){this.addCssClasses(),this.showRangeIndicators(),this.addMaskToProgressBar()}},{key:"onTimeUpdateOrSeeked",value:function(){if(!this.dismissed){var t=this.player.currentTime();if(!(t<this.startTime))return t>this.endTime?(this.showReplayView(),this.disablePlayToggle(),this.player.pause(),void this.player.currentTime(this.endTime)):void 0;this.player.currentTime(this.startTime)}}},{key:"onReplayPress",value:function(){this.player.currentTime(this.startTime),this.player.play(),this.hideReplayView(),this.enablePlayToggle()}},{key:"onContinuePress",value:function(){this.dismissed=!0,this.player.play(),this.hideRangeIndicators(),this.removeMaskFromProgressBar(),this.hideReplayView(),this.enablePlayToggle(),this.removeCssClasses()}},{key:"showRangeIndicators",value:function(){var t,e=null===(t=this.player.controlBar.getChild("ProgressControl"))||void 0===t?void 0:t.getChild("SeekBar");this.startTimeIndicator||(this.startTimeIndicator=new jt(this.player,{time:this.startTime}),null==e||e.addChild(this.startTimeIndicator)),this.endTimeIndicator||(this.endTimeIndicator=new jt(this.player,{time:this.endTime}),null==e||e.addChild(this.endTimeIndicator))}},{key:"hideRangeIndicators",value:function(){var t,e;null===(t=this.startTimeIndicator)||void 0===t||t.hide(),null===(e=this.endTimeIndicator)||void 0===e||e.hide()}},{key:"addMaskToProgressBar",value:function(){var t,e=null===(t=this.player.controlBar.getChild("ProgressControl"))||void 0===t?void 0:t.getChild("SeekBar"),r=null==e?void 0:e.el().getElementsByClassName("cv-chapter-bar-items");if(r&&r.length){var n=r[0],o=this.player.duration(),i=this.startTime/o*100,a=100-this.endTime/o*100;n.style.clipPath="inset(".concat(-5,"em ").concat(a,"% ").concat(-5,"em ").concat(i,"%)")}}},{key:"removeMaskFromProgressBar",value:function(){var t,e=null===(t=this.player.controlBar.getChild("ProgressControl"))||void 0===t?void 0:t.getChild("SeekBar"),r=null==e?void 0:e.el().getElementsByClassName("cv-chapter-bar-items");r&&r.length&&(r[0].style.clipPath="")}},{key:"showReplayView",value:function(){this.replayView||(this.replayView=new zt(this.player,{onContinuePress:this.onContinuePress,onReplayPress:this.onReplayPress}),this.player.addChild(this.replayView)),this.replayView.show()}},{key:"hideReplayView",value:function(){var t;null===(t=this.replayView)||void 0===t||t.hide()}},{key:"getPlayToggle",value:function(){var t=this.player.getChild("collapserator");return null==t?void 0:t.getChild("PlayToggle")}},{key:"enablePlayToggle",value:function(){var t=this.getPlayToggle();t&&t.enable()}},{key:"disablePlayToggle",value:function(){var t=this.getPlayToggle();t&&t.disable()}},{key:"addCssClasses",value:function(){this.player.addClass("cv-range-indicator-plugin")}},{key:"removeCssClasses",value:function(){this.player.removeClass("cv-range-indicator-plugin")}},{key:"dispose",value:function(){var t,r,n,o,i,a;this.removeCssClasses(),this.player.off("timeupdate",this.onTimeUpdateOrSeeked),this.player.off("seeked",this.onTimeUpdateOrSeeked),null===(t=this.startTimeIndicator)||void 0===t||t.dispose(),null===(r=this.endTimeIndicator)||void 0===r||r.dispose(),null===(n=this.replayView)||void 0===n||n.dispose(),(o=e,i=this,"function"==typeof(a=Ht(Wt(1&3?o.prototype:o),"dispose",i))?function(t){return a.apply(i,t)}:a)([])}}],n&&Ut(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(o.Z.getPlugin("plugin"));function Kt(t){return Kt="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},Kt(t)}function $t(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Xt(n.key),n)}}function Xt(t){var e=function(t){if("object"!=Kt(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=Kt(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==Kt(e)?e:e+""}function Jt(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Jt=function(){return!!t})()}function te(t,e,r,n){var o=ee(re(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function ee(){return ee="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=re(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},ee.apply(null,arguments)}function re(t){return re=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},re(t)}function ne(t,e){return ne=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ne(t,e)}o.Z.registerPlugin("rangeIndicatorPlugin",Yt);var oe=o.Z.getComponent("MenuButton"),ie="cv-theatre-mode-button",ae=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,r){return e=re(e),function(t,e){if(e&&("object"==Kt(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Jt()?Reflect.construct(e,r||[],re(t).constructor):e.apply(t,r))}(this,e,arguments)).alwaysCollapsed=!1,t.isCollapsed=!1,t.isCollabsible=!0,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ne(t,e)}(e,t),r=e,(n=[{key:"getCollabsibleName",value:function(){return this.controlText_}},{key:"getCollabsibleValue",value:function(){return""}},{key:"showInCollabsibleMenu",value:function(){return!0}},{key:"showCollapsibleMenu",value:function(){te(e,"handleClick",this,3)([null])}},{key:"buildCSSClass",value:function(){return"cv-default-mode-button ".concat(te(e,"buildCSSClass",this,3)([]))}},{key:"buildWrapperCSSClass",value:function(){return"cv-menu-big ".concat(te(e,"buildWrapperCSSClass",this,3)([]))}},{key:"handleClick",value:function(){this.player_.theatreModePlugin().toggleTheatreMode()}}])&&$t(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(oe);function ue(t){return ue="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},ue(t)}function ce(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,le(n.key),n)}}function le(t){var e=function(t){if("object"!=ue(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=ue(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==ue(e)?e:e+""}function se(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(se=function(){return!!t})()}function fe(){return fe="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=pe(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},fe.apply(null,arguments)}function pe(t){return pe=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},pe(t)}function ye(t,e){return ye=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ye(t,e)}ae.prototype.controlText_="Theatre Mode",o.Z.registerComponent("theatreModeButton",ae);var he=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=pe(e),function(t,e){if(e&&("object"==ue(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,se()?Reflect.construct(e,r||[],pe(t).constructor):e.apply(t,r))}(this,e,[t,r])).options=r,n.bindListeners(),t.ready((function(){return n.onReady()})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ye(t,e)}(e,t),r=e,n=[{key:"bindListeners",value:function(){this.onResize=this.onResize.bind(this),this.onFullscreenChange=this.onFullscreenChange.bind(this),this.player.on("playerresize",this.onResize),this.player.on("fullscreenchange",this.onFullscreenChange)}},{key:"onReady",value:function(){var t;if(this.options&&!(window.innerWidth<992)&&this.getCollapserator()){this.button=this.createButton();var e=this.options.theatreMode;e&&(null===(t=this.button)||void 0===t||t.addClass(ie),this.options.onRequestTheatreMode(e))}}},{key:"dispose",value:function(){var t,r,n;this.player.off("playerresize",this.onResize),this.player.off("fullscreenchange",this.onFullscreenChange),(t=e,r=this,"function"==typeof(n=fe(pe(1&3?t.prototype:t),"dispose",r))?function(t){return n.apply(r,t)}:n)([])}},{key:"toggleTheatreMode",value:function(t){var e;if(this.options){var r=this.options.theatreMode,n=void 0!==t?t:!r;if(this.options.onRequestTheatreMode(n),this.button)return n?this.button.addClass(ie):null===(e=this.button)||void 0===e||e.removeClass(ie),this.options.theatreMode=n,n}}},{key:"onResize",value:function(){var t,e;window.innerWidth<992?(null===(t=this.button)||void 0===t||t.hide(),this.options.onRequestTheatreMode(!1)):this.player.isFullscreen()||null===(e=this.button)||void 0===e||e.show()}},{key:"createButton",value:function(){var t=this.getCollapserator();return(null==t?void 0:t.getChild("theatreModeButton"))||t.addChild("theatreModeButton",{},t.children_.length-3),null==t?void 0:t.getChild("theatreModeButton")}},{key:"onFullscreenChange",value:function(){var t,e;this.player.isFullscreen()?null===(t=this.button)||void 0===t||t.hide():null===(e=this.button)||void 0===e||e.show()}},{key:"getCollapserator",value:function(){return this.player.getChild("collapserator")}}],n&&ce(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(o.Z.getPlugin("plugin"));o.Z.registerPlugin("theatreModePlugin",he);var ve=r(27993);function de(t){return de="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},de(t)}function be(){be=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,o=Object.defineProperty||function(t,e,r){t[e]=r.value},i="function"==typeof Symbol?Symbol:{},a=i.iterator||"@@iterator",u=i.asyncIterator||"@@asyncIterator",c=i.toStringTag||"@@toStringTag";function l(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{l({},"")}catch(t){l=function(t,e,r){return t[e]=r}}function s(t,e,r,n){var i=e&&e.prototype instanceof b?e:b,a=Object.create(i.prototype),u=new x(n||[]);return o(a,"_invoke",{value:k(t,r,u)}),a}function f(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=s;var p="suspendedStart",y="suspendedYield",h="executing",v="completed",d={};function b(){}function m(){}function g(){}var w={};l(w,a,(function(){return this}));var O=Object.getPrototypeOf,P=O&&O(O(L([])));P&&P!==r&&n.call(P,a)&&(w=P);var j=g.prototype=b.prototype=Object.create(w);function S(t){["next","throw","return"].forEach((function(e){l(t,e,(function(t){return this._invoke(e,t)}))}))}function _(t,e){function r(o,i,a,u){var c=f(t[o],t,i);if("throw"!==c.type){var l=c.arg,s=l.value;return s&&"object"==de(s)&&n.call(s,"__await")?e.resolve(s.__await).then((function(t){r("next",t,a,u)}),(function(t){r("throw",t,a,u)})):e.resolve(s).then((function(t){l.value=t,a(l)}),(function(t){return r("throw",t,a,u)}))}u(c.arg)}var i;o(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function k(e,r,n){var o=p;return function(i,a){if(o===h)throw Error("Generator is already running");if(o===v){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=C(u,n);if(c){if(c===d)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===p)throw o=v,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=h;var l=f(e,r,n);if("normal"===l.type){if(o=n.done?v:y,l.arg===d)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=v,n.method="throw",n.arg=l.arg)}}}function C(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,C(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),d;var i=f(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,d;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,d):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,d)}function E(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 T(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function x(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(E,this),this.reset(!0)}function L(e){if(e||""===e){var r=e[a];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var o=-1,i=function r(){for(;++o<e.length;)if(n.call(e,o))return r.value=e[o],r.done=!1,r;return r.value=t,r.done=!0,r};return i.next=i}}throw new TypeError(de(e)+" is not iterable")}return m.prototype=g,o(j,"constructor",{value:g,configurable:!0}),o(g,"constructor",{value:m,configurable:!0}),m.displayName=l(g,c,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===m||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,g):(t.__proto__=g,l(t,c,"GeneratorFunction")),t.prototype=Object.create(j),t},e.awrap=function(t){return{__await:t}},S(_.prototype),l(_.prototype,u,(function(){return this})),e.AsyncIterator=_,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new _(s(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},S(j),l(j,c,"Generator"),l(j,a,(function(){return this})),l(j,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=L,x.prototype={constructor:x,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(T),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,d):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),d},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),T(r),d}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;T(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:L(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),d}},e}function me(t){return function(t){if(Array.isArray(t))return ge(t)}(t)||function(t){if("undefined"!=typeof Symbol&&null!=t[Symbol.iterator]||null!=t["@@iterator"])return Array.from(t)}(t)||function(t,e){if(t){if("string"==typeof t)return ge(t,e);var r={}.toString.call(t).slice(8,-1);return"Object"===r&&t.constructor&&(r=t.constructor.name),"Map"===r||"Set"===r?Array.from(t):"Arguments"===r||/^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(r)?ge(t,e):void 0}}(t)||function(){throw new TypeError("Invalid attempt to spread non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method.")}()}function ge(t,e){(null==e||e>t.length)&&(e=t.length);for(var r=0,n=Array(e);r<e;r++)n[r]=t[r];return n}function we(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,Oe(n.key),n)}}function Oe(t){var e=function(t){if("object"!=de(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=de(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==de(e)?e:e+""}function Pe(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(Pe=function(){return!!t})()}function je(t,e,r,n){var o=Se(_e(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function Se(){return Se="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=_e(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},Se.apply(null,arguments)}function _e(t){return _e=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},_e(t)}function ke(t,e){return ke=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},ke(t,e)}var Ce=function(t){function e(t,r){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=_e(e),function(t,e){if(e&&("object"==de(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,Pe()?Reflect.construct(e,r||[],_e(t).constructor):e.apply(t,r))}(this,e,[t,r])}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&ke(t,e)}(e,t),r=e,(n=[{key:"getPlayerOptions",value:function(){var t,r=je(e,"getPlayerOptions",this,3)([]);return(null===(t=r.devicesConfig)||void 0===t?void 0:t.canUserCastToDevices)?Object.assign(Object.assign({},r),{techOrder:["devices"].concat(me(r.techOrder)),devices:{instanceId:ve.x.generateRandomId()}}):r}},{key:"configurePlugins",value:function(){var t;try{this.options.onClickCreateClip&&this.player.createClipButtonPlugin({onClick:this.options.onClickCreateClip}),this.options.onRequestPictureInPicture&&this.player.pictureInPicture({onRequestPictureInPicture:this.options.onRequestPictureInPicture}),(null===(t=this.options.pointsOfInterest)||void 0===t?void 0:t.length)&&this.player.pointsOfInterestPlugin({pointsOfInterest:this.options.pointsOfInterest})}catch(t){console.log("failed to register plugins",t)}}},{key:"setNextVideo",value:function(t,e,r){this.player.nextVideoPlugin&&this.player.nextVideoPlugin().setNextVideo(t,e,r)}},{key:"enablePictureInPicture",value:function(){var t=this.player.pictureInPicture();t&&t.enablePictureInPicture()}},{key:"disablePictureInPicture",value:function(){var t=this.player.pictureInPicture();t&&t.disablePictureInPicture()}},{key:"togglePictureInPicture",value:function(t){var e=this.player.pictureInPicture();e&&e.togglePictureInPicture(t)}},{key:"toggleTheatreMode",value:function(t){var e=this.player.theatreModePlugin();e&&e.toggleTheatreMode(t)}},{key:"additionalSetup",value:function(t){var r,n,o,i,a,u=this,c=Object.create(null,{additionalSetup:{get:function(){return je(e,"additionalSetup",u,1)}}});return n=this,o=void 0,i=void 0,a=be().mark((function e(){var n;return be().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(c.additionalSetup.call(this,t),this.options.showResources&&t.resources&&this.player.resourcesPlugin&&this.player.resourcesPlugin({resources:t.resources.list,imageCdnUrl:this.options.imageCdnUrl}),this.options.onRequestTheatreMode&&this.options.allowTheatreMode&&this.player.theatreModePlugin&&this.player.theatreModePlugin({onRequestTheatreMode:this.options.onRequestTheatreMode,theatreMode:this.options.theatreMode}),"MasterClip"!==t.mediaType){e.next=8;break}if(null!==(n=t.additionalData)){e.next=7;break}throw Error("Invalid clip data");case 7:this.player.clipPlugin({startTime:n.startTime,endTime:n.endTime});case 8:if(!(null===(r=this.options.devicesConfig)||void 0===r?void 0:r.canUserCastToDevices)){e.next=12;break}if(this.player.devicesPlugin){e.next=11;break}return e.abrupt("return");case 11:this.player.devicesPlugin(Object.assign(Object.assign({},this.options.devicesConfig),{userId:parseInt(t.viewerId),title:t.title,analyticsService:this.analyticsService}));case 12:"MasterVideo"===t.mediaType&&this.options.startTime&&this.options.endTime&&this.player.rangeIndicatorPlugin({startTime:this.options.startTime,endTime:this.options.endTime});case 13:case"end":return e.stop()}}),e,this)})),new(i||(i=Promise))((function(t,e){function r(t){try{c(a.next(t))}catch(t){e(t)}}function u(t){try{c(a.throw(t))}catch(t){e(t)}}function c(e){var n;e.done?t(e.value):(n=e.value,n instanceof i?n:new i((function(t){t(n)}))).then(r,u)}c((a=a.apply(n,o||[])).next())}))}},{key:"setActivityStatus",value:function(t,e){this.player.activityStatusPlugin().setActivityStatus(t,e)}}])&&we(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.r)},24910:function(t,e,r){"use strict";var n,o=r(94445);function i(t){return i="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},i(t)}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function u(t){var e=function(t){if("object"!=i(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=i(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==i(e)?e:e+""}function c(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(c=function(){return!!t})()}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function s(t,e){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},s(t,e)}!function(t){t.None="None",t.Complete="Complete",t.Incomplete="Incomplete"}(n||(n={}));var f=function(t){function e(t,r){var n;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=l(e),function(t,e){if(e&&("object"==i(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,c()?Reflect.construct(e,r||[],l(t).constructor):e.apply(t,r))}(this,e,[t,r])).update(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&s(t,e)}(e,t),r=e,o=[{key:"update",value:function(){this.options_.activityStatus===n.Complete?this.addClass("cv-activity-completed"):this.removeClass("cv-activity-completed")}},{key:"handleClick",value:function(){if(this.options_.activityStatus=this.getToggledActivityStatus(),this.update(),this.options_.clickHandler){for(var t=arguments.length,e=new Array(t),r=0;r<t;r++)e[r]=arguments[r];this.options_.clickHandler.call(this,e)}}},{key:"buildCSSClass",value:function(){return"cv-activity-status-button"}},{key:"getToggledActivityStatus",value:function(){return this.options_.activityStatus===n.None||this.options_.activityStatus===n.Incomplete?n.Complete:this.options_.activityStatus===n.Complete?n.Incomplete:void 0}}],o&&a(r.prototype,o),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,o}(o.Z.getComponent("Button"));function p(t){return p="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},p(t)}function y(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,h(n.key),n)}}function h(t){var e=function(t){if("object"!=p(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=p(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==p(e)?e:e+""}function v(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(v=function(){return!!t})()}function d(t){return d=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},d(t)}function b(t,e){return b=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},b(t,e)}f.prototype.controlText_="Complete";var m=function(t){function e(){return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),function(t,e,r){return e=d(e),function(t,e){if(e&&("object"==p(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,v()?Reflect.construct(e,r||[],d(t).constructor):e.apply(t,r))}(this,e,arguments)}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&b(t,e)}(e,t),r=e,(n=[{key:"setActivityStatus",value:function(t,e){var r=this;t!==this.activityStatus&&(this.activityStatus=t,this.onToggleStatus=e,this.player.ready((function(){r.renderActivityStatusButton()})))}},{key:"renderActivityStatusButton",value:function(){this.button&&this.player.removeChild(this.button),this.button=new f(this.player,{activityStatus:this.activityStatus,clickHandler:this.onToggleStatus}),this.player.addChild(this.button)}}])&&y(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(o.Z.getPlugin("plugin"));o.Z.registerPlugin("activityStatusPlugin",m)},96263:function(t,e,r){"use strict";var n=r(94445);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,a(n.key),n)}}function a(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}function u(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(u=function(){return!!t})()}function c(){return c="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=l(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},c.apply(null,arguments)}function l(t){return l=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},l(t)}function s(t,e){return s=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},s(t,e)}var f=function(t){function e(t,r){var n;if(function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),n=function(t,e,r){return e=l(e),function(t,e){if(e&&("object"==o(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,u()?Reflect.construct(e,r||[],l(t).constructor):e.apply(t,r))}(this,e,[t]),void 0===r.startTime)throw Error("Invalid clip start");if(void 0===r.endTime)throw Error("Invalid clip end");if(r.startTime>r.endTime)throw Error("Clip start cannot be greater than clip end");return n._clipStart=parseFloat(r.startTime.toPrecision(4)),n._clipEnd=parseFloat(r.endTime.toPrecision(4)),n.playerEndedFn=n.player.ended.bind(t),n.playerDurationFn=n.player.duration.bind(t),n.playerCurrentTimeFn=n.player.currentTime.bind(t),n.playerbufferedFn=n.player.buffered.bind(t),n.player.ended=n.ended.bind(n),n.player.duration=n.duration.bind(n),n.player.currentTime=n.currentTime.bind(n),n.player.buffered=n.buffered.bind(n),n.initialize(),n.player.ready((function(){n.player.trigger("durationchange")})),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&s(t,e)}(e,t),r=e,a=[{key:"clipStart",get:function(){var t=this.playerDurationFn();return this._clipStart>t?t:this._clipStart}},{key:"clipEnd",get:function(){var t=this.playerDurationFn();return t<=0?this._clipEnd:this._clipEnd>t?t:this._clipEnd}},{key:"dispose",value:function(){var t,r,n;this.player.off("timeupdate",this.onTimeUpdate),this.player.off("play",this.onPlay),this.player.ended=this.playerEndedFn,this.player.duration=this.playerDurationFn,this.player.currentTime=this.playerCurrentTimeFn,this.player.buffered=this.playerbufferedFn,this.player.trigger("durationchange"),(t=e,r=this,"function"==typeof(n=c(l(1&3?t.prototype:t),"dispose",r))?function(t){return n.apply(r,t)}:n)([])}},{key:"initialize",value:function(){this.onTimeUpdate=this.onTimeUpdate.bind(this),this.onPlay=this.onPlay.bind(this),this.player.on("timeupdate",this.onTimeUpdate),this.player.on("play",this.onPlay)}},{key:"onPlay",value:function(){this._isEnded&&this.player.currentTime(0)}},{key:"onTimeUpdate",value:function(){var t=this.getCurrentTime(!1);t>this.clipEnd?this._isEnded||(this.player.pause(),this.player.trigger("ended"),this._isEnded=!0):(this._isEnded=!1,t<this.clipStart-10&&this.playerCurrentTimeFn(this.clipStart,!0))}},{key:"ended",value:function(){return this.getCurrentTime(!1)>this.clipEnd}},{key:"duration",value:function(t){return t&&t>0&&(this.playerDurationFn()?console.info("The duration of the player has already been set. This is a no-op."):this.playerDurationFn(t)),this.clipEnd-this.clipStart}},{key:"currentTime",value:function(t){if("number"!=typeof t)return this.getCurrentTime(!0);for(var e=t+this.clipStart,r=arguments.length,n=new Array(r>1?r-1:0),o=1;o<r;o++)n[o-1]=arguments[o];this.playerCurrentTimeFn(e,n)}},{key:"getCurrentTime",value:function(t){var e=this.playerCurrentTimeFn(),r=0;return e>=this.clipStart&&(r=e-this.clipStart),this.player.getCache().currentTime=r,t?r:e}},{key:"buffered",value:function(){for(var t=this.playerbufferedFn(),e=[],r=0;r<t.length;r++)e[r]=[Math.max(0,t.start(r)-this.clipStart),Math.min(Math.max(0,t.end(r)-this.clipStart),this.player.duration())];return n.Z.createTimeRanges(e)}}],a&&i(r.prototype,a),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,a}(n.Z.getPlugin("plugin"));n.Z.registerPlugin("clipPlugin",f)},51976:function(t,e,r){"use strict";var n=r(94445),o=r(28788),i=r(90244);function a(t){return a="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},a(t)}function u(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,c(n.key),n)}}function c(t){var e=function(t){if("object"!=a(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=a(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==a(e)?e:e+""}function l(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(l=function(){return!!t})()}function s(t,e,r,n){var o=f(p(1&n?t.prototype:t),e,r);return 2&n&&"function"==typeof o?function(t){return o.apply(r,t)}:o}function f(){return f="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=p(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},f.apply(null,arguments)}function p(t){return p=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},p(t)}function y(t,e){return y=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},y(t,e)}var h=n.Z.getComponent("Component"),v="cv-prevent-scrubbing-tooltip-show",d="cv-prevent-scrubbing-tooltip-remove-transition",b=function(t){function e(){var t;return function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(t=function(t,e,r){return e=p(e),function(t,e){if(e&&("object"==a(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,l()?Reflect.construct(e,r||[],p(t).constructor):e.apply(t,r))}(this,e,arguments)).isShowing=!1,t}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&y(t,e)}(e,t),r=e,n=[{key:"buildCSSClass",value:function(){return"cv-prevent-scrubbing-tooltip ".concat(s(e,"buildCSSClass",this,3)([]))}},{key:"createEl",value:function(t,r,n){return s(e,"createEl",this,3)([t,Object.assign(Object.assign({},r),{className:this.buildCSSClass(),innerText:o.vn}),n])}},{key:"show",value:function(){this.isShowing||(this.player_.userActive(!0),this.addClass(v),this.isShowing=!0)}},{key:"hide",value:function(){var t=this,e=arguments.length>0&&void 0!==arguments[0]&&arguments[0];this.isShowing&&(e&&(this.addClass(d),window.requestAnimationFrame((function(){t.removeClass(d)}))),this.player_.userActive(!1),this.removeClass(v),this.isShowing=!1)}}],n&&u(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(h);function m(t){return m="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},m(t)}function g(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,w(n.key),n)}}function w(t){var e=function(t){if("object"!=m(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=m(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==m(e)?e:e+""}function O(){try{var t=!Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){})))}catch(t){}return(O=function(){return!!t})()}function P(){return P="undefined"!=typeof Reflect&&Reflect.get?Reflect.get.bind():function(t,e,r){var n=function(t,e){for(;!{}.hasOwnProperty.call(t,e)&&null!==(t=j(t)););return t}(t,e);if(n){var o=Object.getOwnPropertyDescriptor(n,e);return o.get?o.get.call(arguments.length<3?t:r):o.value}},P.apply(null,arguments)}function j(t){return j=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},j(t)}function S(t,e){return S=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(t,e){return t.__proto__=e,t},S(t,e)}n.Z.registerComponent(o.Hx,b);var _=function(t){function e(t,r){var n;!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,e),(n=function(t,e,r){return e=j(e),function(t,e){if(e&&("object"==m(e)||"function"==typeof e))return e;if(void 0!==e)throw new TypeError("Derived constructors may only return object or undefined");return function(t){if(void 0===t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return t}(t)}(t,O()?Reflect.construct(e,r||[],j(t).constructor):e.apply(t,r))}(this,e,[t])).isEnabled=!1,n.isPreviewing=!1;var o=null!=r?r:{},i=o.furthestVisitedTime,a=void 0===i?0:i,u=o.isEnabled,c=void 0!==u&&u;return n.playerCurrentTimeFn=n.player.currentTime.bind(t),n.player.currentTime=n.currentTime.bind(n),n.onTimeUpdate=n.onTimeUpdate.bind(n),n.furthestVisitedTime=a,n.isEnabled=c,c&&n.enable(),n}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function");t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,writable:!0,configurable:!0}}),Object.defineProperty(t,"prototype",{writable:!1}),e&&S(t,e)}(e,t),r=e,n=[{key:"dispose",value:function(){var t,r,n;this.player.currentTime=this.playerCurrentTimeFn,this.isEnabled&&(this.disable(),(t=e,r=this,"function"==typeof(n=P(j(1&3?t.prototype:t),"dispose",r))?function(t){return n.apply(r,t)}:n)([]))}},{key:"togglePreview",value:function(t){if(t){if(this.configurePreview(),this.isEnabled)return;this.enable(),this.isPreviewing=!0}else this.disable(),this.isPreviewing=!1}},{key:"configurePreview",value:function(){this.player.currentTime(0),this.furthestVisitedTime=0}},{key:"enable",value:function(){this.player.on("timeupdate",this.onTimeUpdate),this.getProgressControl().addChild(o.Hx),this.isEnabled=!0}},{key:"disable",value:function(){this.player.off("timeupdate",this.onTimeUpdate),this.getProgressControl().removeChild(this.getPreventScrubbingTooltip()),this.isEnabled=!1}},{key:"getProgressControl",value:function(){return this.player.controlBar.getChild("progressControl")}},{key:"onTimeUpdate",value:function(){var t=this.playerCurrentTimeFn();t>this.furthestVisitedTime&&(this.furthestVisitedTime=t)}},{key:"currentTime",value:function(t){for(var e,r=arguments.length,n=new Array(r>1?r-1:0),a=1;a<r;a++)n[a-1]=arguments[a];if("number"!=typeof t)return this.playerCurrentTimeFn.apply(this,[t].concat(n));if(this.isEnabled){var u=this.getPreventScrubbingTooltip(),c=null===(e=this.getSeekBar())||void 0===e?void 0:e.getChild("MouseTimeDisplay");if(t>this.furthestVisitedTime)return u.show(),(0,i.Ds)(u.hide,o.D,!1,u)(),null==c||c.hide(),void this.playerCurrentTimeFn(this.furthestVisitedTime,n);null==c||c.show(),u.hide(!0),this.playerCurrentTimeFn(t,n)}else this.playerCurrentTimeFn.apply(this,[t].concat(n))}},{key:"getPreventScrubbingTooltip",value:function(){return this.getProgressControl().getChild(o.Hx)}},{key:"getSeekBar",value:function(){var t;return null===(t=this.player.controlBar.getChild("ProgressControl"))||void 0===t?void 0:t.getChild("SeekBar")}}],n&&g(r.prototype,n),Object.defineProperty(r,"prototype",{writable:!1}),r;var r,n}(n.Z.getPlugin("plugin"));n.Z.registerPlugin("preventScrubbingPlugin",_)},28788:function(t,e,r){"use strict";r.d(e,{D:function(){return i},Hx:function(){return o},vn:function(){return n}});var n="No skipping ahead!",o="PreventScrubbingTooltip",i=1e3},61380:function(t,e,r){"use strict";r.d(e,{e:function(){return s}});var n=r(61876);function o(t){return o="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},o(t)}function i(){i=function(){return e};var t,e={},r=Object.prototype,n=r.hasOwnProperty,a=Object.defineProperty||function(t,e,r){t[e]=r.value},u="function"==typeof Symbol?Symbol:{},c=u.iterator||"@@iterator",l=u.asyncIterator||"@@asyncIterator",s=u.toStringTag||"@@toStringTag";function f(t,e,r){return Object.defineProperty(t,e,{value:r,enumerable:!0,configurable:!0,writable:!0}),t[e]}try{f({},"")}catch(t){f=function(t,e,r){return t[e]=r}}function p(t,e,r,n){var o=e&&e.prototype instanceof g?e:g,i=Object.create(o.prototype),u=new R(n||[]);return a(i,"_invoke",{value:E(t,r,u)}),i}function y(t,e,r){try{return{type:"normal",arg:t.call(e,r)}}catch(t){return{type:"throw",arg:t}}}e.wrap=p;var h="suspendedStart",v="suspendedYield",d="executing",b="completed",m={};function g(){}function w(){}function O(){}var P={};f(P,c,(function(){return this}));var j=Object.getPrototypeOf,S=j&&j(j(B([])));S&&S!==r&&n.call(S,c)&&(P=S);var _=O.prototype=g.prototype=Object.create(P);function k(t){["next","throw","return"].forEach((function(e){f(t,e,(function(t){return this._invoke(e,t)}))}))}function C(t,e){function r(i,a,u,c){var l=y(t[i],t,a);if("throw"!==l.type){var s=l.arg,f=s.value;return f&&"object"==o(f)&&n.call(f,"__await")?e.resolve(f.__await).then((function(t){r("next",t,u,c)}),(function(t){r("throw",t,u,c)})):e.resolve(f).then((function(t){s.value=t,u(s)}),(function(t){return r("throw",t,u,c)}))}c(l.arg)}var i;a(this,"_invoke",{value:function(t,n){function o(){return new e((function(e,o){r(t,n,e,o)}))}return i=i?i.then(o,o):o()}})}function E(e,r,n){var o=h;return function(i,a){if(o===d)throw Error("Generator is already running");if(o===b){if("throw"===i)throw a;return{value:t,done:!0}}for(n.method=i,n.arg=a;;){var u=n.delegate;if(u){var c=T(u,n);if(c){if(c===m)continue;return c}}if("next"===n.method)n.sent=n._sent=n.arg;else if("throw"===n.method){if(o===h)throw o=b,n.arg;n.dispatchException(n.arg)}else"return"===n.method&&n.abrupt("return",n.arg);o=d;var l=y(e,r,n);if("normal"===l.type){if(o=n.done?b:v,l.arg===m)continue;return{value:l.arg,done:n.done}}"throw"===l.type&&(o=b,n.method="throw",n.arg=l.arg)}}}function T(e,r){var n=r.method,o=e.iterator[n];if(o===t)return r.delegate=null,"throw"===n&&e.iterator.return&&(r.method="return",r.arg=t,T(e,r),"throw"===r.method)||"return"!==n&&(r.method="throw",r.arg=new TypeError("The iterator does not provide a '"+n+"' method")),m;var i=y(o,e.iterator,r.arg);if("throw"===i.type)return r.method="throw",r.arg=i.arg,r.delegate=null,m;var a=i.arg;return a?a.done?(r[e.resultName]=a.value,r.next=e.nextLoc,"return"!==r.method&&(r.method="next",r.arg=t),r.delegate=null,m):a:(r.method="throw",r.arg=new TypeError("iterator result is not an object"),r.delegate=null,m)}function x(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 L(t){var e=t.completion||{};e.type="normal",delete e.arg,t.completion=e}function R(t){this.tryEntries=[{tryLoc:"root"}],t.forEach(x,this),this.reset(!0)}function B(e){if(e||""===e){var r=e[c];if(r)return r.call(e);if("function"==typeof e.next)return e;if(!isNaN(e.length)){var i=-1,a=function r(){for(;++i<e.length;)if(n.call(e,i))return r.value=e[i],r.done=!1,r;return r.value=t,r.done=!0,r};return a.next=a}}throw new TypeError(o(e)+" is not iterable")}return w.prototype=O,a(_,"constructor",{value:O,configurable:!0}),a(O,"constructor",{value:w,configurable:!0}),w.displayName=f(O,s,"GeneratorFunction"),e.isGeneratorFunction=function(t){var e="function"==typeof t&&t.constructor;return!!e&&(e===w||"GeneratorFunction"===(e.displayName||e.name))},e.mark=function(t){return Object.setPrototypeOf?Object.setPrototypeOf(t,O):(t.__proto__=O,f(t,s,"GeneratorFunction")),t.prototype=Object.create(_),t},e.awrap=function(t){return{__await:t}},k(C.prototype),f(C.prototype,l,(function(){return this})),e.AsyncIterator=C,e.async=function(t,r,n,o,i){void 0===i&&(i=Promise);var a=new C(p(t,r,n,o),i);return e.isGeneratorFunction(r)?a:a.next().then((function(t){return t.done?t.value:a.next()}))},k(_),f(_,s,"Generator"),f(_,c,(function(){return this})),f(_,"toString",(function(){return"[object Generator]"})),e.keys=function(t){var e=Object(t),r=[];for(var n in e)r.push(n);return r.reverse(),function t(){for(;r.length;){var n=r.pop();if(n in e)return t.value=n,t.done=!1,t}return t.done=!0,t}},e.values=B,R.prototype={constructor:R,reset:function(e){if(this.prev=0,this.next=0,this.sent=this._sent=t,this.done=!1,this.delegate=null,this.method="next",this.arg=t,this.tryEntries.forEach(L),!e)for(var r in this)"t"===r.charAt(0)&&n.call(this,r)&&!isNaN(+r.slice(1))&&(this[r]=t)},stop:function(){this.done=!0;var t=this.tryEntries[0].completion;if("throw"===t.type)throw t.arg;return this.rval},dispatchException:function(e){if(this.done)throw e;var r=this;function o(n,o){return u.type="throw",u.arg=e,r.next=n,o&&(r.method="next",r.arg=t),!!o}for(var i=this.tryEntries.length-1;i>=0;--i){var a=this.tryEntries[i],u=a.completion;if("root"===a.tryLoc)return o("end");if(a.tryLoc<=this.prev){var c=n.call(a,"catchLoc"),l=n.call(a,"finallyLoc");if(c&&l){if(this.prev<a.catchLoc)return o(a.catchLoc,!0);if(this.prev<a.finallyLoc)return o(a.finallyLoc)}else if(c){if(this.prev<a.catchLoc)return o(a.catchLoc,!0)}else{if(!l)throw Error("try statement without catch or finally");if(this.prev<a.finallyLoc)return o(a.finallyLoc)}}}},abrupt:function(t,e){for(var r=this.tryEntries.length-1;r>=0;--r){var o=this.tryEntries[r];if(o.tryLoc<=this.prev&&n.call(o,"finallyLoc")&&this.prev<o.finallyLoc){var i=o;break}}i&&("break"===t||"continue"===t)&&i.tryLoc<=e&&e<=i.finallyLoc&&(i=null);var a=i?i.completion:{};return a.type=t,a.arg=e,i?(this.method="next",this.next=i.finallyLoc,m):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),m},finish:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.finallyLoc===t)return this.complete(r.completion,r.afterLoc),L(r),m}},catch:function(t){for(var e=this.tryEntries.length-1;e>=0;--e){var r=this.tryEntries[e];if(r.tryLoc===t){var n=r.completion;if("throw"===n.type){var o=n.arg;L(r)}return o}}throw Error("illegal catch attempt")},delegateYield:function(e,r,n){return this.delegate={iterator:B(e),resultName:r,nextLoc:n},"next"===this.method&&(this.arg=t),m}},e}function a(t,e){for(var r=0;r<e.length;r++){var n=e[r];n.enumerable=n.enumerable||!1,n.configurable=!0,"value"in n&&(n.writable=!0),Object.defineProperty(t,u(n.key),n)}}function u(t){var e=function(t){if("object"!=o(t)||!t)return t;var e=t[Symbol.toPrimitive];if(void 0!==e){var r=e.call(t,"string");if("object"!=o(r))return r;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(t)}(t);return"symbol"==o(e)?e:e+""}var c=function(t,e,r,n){return new(r||(r=Promise))((function(o,i){function a(t){try{c(n.next(t))}catch(t){i(t)}}function u(t){try{c(n.throw(t))}catch(t){i(t)}}function c(t){var e;t.done?o(t.value):(e=t.value,e instanceof r?e:new r((function(t){t(e)}))).then(a,u)}c((n=n.apply(t,e||[])).next())}))},l=function(){return t=function t(){!function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")}(this,t),this.tokens={gateway:null}},e=[{key:"get",value:function(t,e){return c(this,void 0,void 0,i().mark((function r(){return i().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.t0=this,r.next=3,fetch(t,{method:"GET",mode:"cors",headers:this.getHeaders(e)});case 3:return r.t1=r.sent,r.next=6,r.t0.parseResponse.call(r.t0,r.t1);case 6:return r.abrupt("return",r.sent);case 7:case"end":return r.stop()}}),r,this)})))}},{key:"delete",value:function(t,e){return c(this,void 0,void 0,i().mark((function r(){return i().wrap((function(r){for(;;)switch(r.prev=r.next){case 0:return r.next=2,fetch(t,{method:"DELETE",headers:this.getHeaders(e)});case 2:case"end":return r.stop()}}),r,this)})))}},{key:"post",value:function(t,e,r){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return c(this,void 0,void 0,i().mark((function o(){var a;return i().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,fetch(t,{method:"POST",headers:this.getHeaders(r),body:e,mode:"cors"});case 2:if(a=o.sent,!n){o.next=7;break}return o.next=6,this.parseResponse(a);case 6:return o.abrupt("return",o.sent);case 7:case"end":return o.stop()}}),o,this)})))}},{key:"put",value:function(t,e,r){var n=!(arguments.length>3&&void 0!==arguments[3])||arguments[3];return c(this,void 0,void 0,i().mark((function o(){var a;return i().wrap((function(o){for(;;)switch(o.prev=o.next){case 0:return o.next=2,fetch(t,{method:"PUT",headers:this.getHeaders(r),body:e,mode:"cors"});case 2:if(a=o.sent,!n){o.next=7;break}return o.next=6,this.parseResponse(a);case 6:return o.abrupt("return",o.sent);case 7:case"end":return o.stop()}}),o,this)})))}},{key:"setToken",value:function(t,e){this.tokens[t]=e}},{key:"getHeaders",value:function(){var t=arguments.length>0&&void 0!==arguments[0]?arguments[0]:{},e={"Content-Type":"application/json"};return this.tokens[t.tokenName]&&(e.authorization="Bearer ".concat(this.tokens[t.tokenName])),e}},{key:"parseResponse",value:function(t){return c(this,void 0,void 0,i().mark((function e(){var r,o;return i().wrap((function(e){for(;;)switch(e.prev=e.next){case 0:if(404!==t.status){e.next=2;break}return e.abrupt("return",null);case 2:if(t.ok){e.next=15;break}return e.prev=3,e.next=6,t.json();case 6:r=e.sent,e.next=12;break;case 9:throw e.prev=9,e.t0=e.catch(3),new n.M(t.url);case 12:throw e.prev=12,new n.M(t.url,r);case 15:return e.next=17,t.json();case 17:return o=e.sent,e.abrupt("return",o);case 19:case"end":return e.stop()}}),e,null,[[3,9,12,15]])})))}}],e&&a(t.prototype,e),Object.defineProperty(t,"prototype",{writable:!1}),t;var t,e}(),s=new l},90244:function(t,e,r){"use strict";r.d(e,{Ds:function(){return o},P2:function(){return n}});var n=function(t,e){var r=window.performance.now();return function(){var n=window.performance.now();n-r>=e&&(t.apply(void 0,arguments),r=n)}},o=function(t,e,r){var n,o=this,i=arguments.length>3&&void 0!==arguments[3]?arguments[3]:window,a=function(){for(var a=arguments.length,u=new Array(a),c=0;c<a;c++)u[c]=arguments[c];var l=!1,s=function(){n=null,s=null,t.apply(this,u)};return!n&&r&&(t.apply(o,u),l=!0),i.clearTimeout(n),n=i.setTimeout(s,e),l};return a.cancel=function(){i.clearTimeout(n),n=null},a}},30708:function(t,e,r){"use strict";function n(t){var e=arguments.length>1&&void 0!==arguments[1]?arguments[1]:t;t=t<0?0:t;var r=Math.floor(t%60),n=Math.floor(t/60%60),o=Math.floor(t/3600),i=Math.floor(e/60%60),a=Math.floor(e/3600);return(isNaN(t)||t===1/0)&&(o=n=r="-"),(o=o>0||a>0?o+":":"")+(n=((o||i>=10)&&n<10?"0"+n:n)+":")+(r<10?"0"+r:r)}r.d(e,{m:function(){return n}})},39232:function(t,e,r){"use strict";function n(t){for(var e=t.buffered(),r=t.currentTime(),n=0,o=0;o<e.length;o++){var i=e.start(o),a=e.end(o);if(i<=r&&a>=r){n=a;break}}return n}r.d(e,{b:function(){return n}})},27993:function(t,e,r){"use strict";r.d(e,{x:function(){return n}});var n={generateRandomId:function(){var t,e,r;return null!==(r=null===(e=null===(t=window.crypto)||void 0===t?void 0:t.randomUUID)||void 0===e?void 0:e.call(t))&&void 0!==r?r:Math.random().toString()}}},69140:function(t,e,r){"use strict";r.d(e,{S:function(){return o}});var n="cv-persisttest",o={hasLocalStorage:function(){try{return window.localStorage.setItem(n,"cv-player-storage-test"),window.localStorage.removeItem(n),!0}catch(t){return!1}},get:function(t){return window.localStorage.getItem(t)},set:function(t,e){window.localStorage.setItem(t,e)},remove:function(t){window.localStorage.removeItem(t)}}},94878:function(t,e,r){"use strict";r.d(e,{O:function(){return u}});var n=r(63151);function o(t,e,r){if(t.length)for(var n=t.length-1;n>=0;n--){var o=t[n];if(o.kind===e){if(r&&o.label!==r)continue;return o}}}function i(t,e,r,n){t.kind===e&&(r&&t.label!==r||(t.loaded_?n(t):t.one("loadeddata",(function(){n(t)}))))}function a(t){if(null==t?void 0:t.cues.length)for(var e=0;e<t.cues.length;e++){var r=t.cues[e];(null==r?void 0:r.text)&&(r.text=n.m.sanitize(r.text))}}var u={getTrack:function(t,e,r){return o(t.textTracks(),e,r)},useTrack:function(t,e,r,n){var a=t.textTracks(),u=o(a,e,r);if(u)i(u,e,r,n);else{var c=function(t){i(t.track,e,r,n)};a.addEventListener("addtrack",c),t.one("dispose",(function(){a.removeEventListener("addtrack",c)}))}},getCurrentTextTrack:function(t){return this.findTrackByPredicate(t,(function(t){return"showing"===t.mode}))},findTrackByPredicate:function(t,e){if(!t)return null;for(var r=t.textTracks(),n=0;n<r.length;n++){var o=r[n];if(e(o))return o}return null},forEachTrack:function(t,e){if(t)for(var r=t.textTracks(),n=0;n<r.length;n++)e(r[n])},sanitizeTrack:function(t,e){if(t&&e)if(t.loaded)a(t);else{var r=function(){return a(t)};t.addEventListener("loadeddata",r),e.one("dispose",(function(){t.removeEventListener("loadeddata",r)}))}}}},61577:function(t,e,r){var n=r(32227);t.exports=(n.default||n).template({compiler:[8,">= 4.3.0"],main:function(t,e,r,n,o){t.propertyIsEnumerable;var i,a=t.lambda,u=t.escapeExpression;return'<iframe class="'+u(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.webPlayer:i,e))+'" id="'+u(a(null!=(i=null!=e?e.options:e)?i.id:i,e))+'" allowfullscreen webkitallowfullscreen mozallowfullscreen allow="autoplay; fullscreen" frameborder="0" width="'+u(a(null!=(i=null!=e?e.options:e)?i.width:i,e))+'" height="'+u(a(null!=(i=null!=e?e.options:e)?i.height:i,e))+'" src="'+u(a(null!=(i=null!=e?e.options:e)?i.url:i,e))+'"></iframe>\n<div class="'+u(a(null!=(i=null!=(i=null!=e?e.options:e)?i.styles:i)?i.svgContainer:i,e))+'">'+(null!=(i=a(null!=(i=null!=e?e.options:e)?i.playSvg:i,e))?i:"")+"</div>"},useData:!0})},58421:function(){}}]);
|